From d9a68f6ced3f510e5a52d5f857ca9c19aed8924b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 21 Apr 2020 07:58:44 +0200 Subject: Enhanced navigation menu in material theme --- app/Resources/static/themes/material/css/nav.scss | 12 ++++ app/Resources/static/themes/material/index.js | 2 + .../Resources/translations/messages.da.yml | 1 + .../Resources/translations/messages.de.yml | 1 + .../Resources/translations/messages.en.yml | 1 + .../Resources/translations/messages.es.yml | 1 + .../Resources/translations/messages.fa.yml | 1 + .../Resources/translations/messages.fr.yml | 1 + .../Resources/translations/messages.it.yml | 1 + .../Resources/translations/messages.ja.yml | 1 + .../Resources/translations/messages.oc.yml | 1 + .../Resources/translations/messages.pl.yml | 1 + .../Resources/translations/messages.pt.yml | 1 + .../Resources/translations/messages.ro.yml | 1 + .../Resources/translations/messages.ru.yml | 1 + .../Resources/translations/messages.th.yml | 1 + .../Resources/translations/messages.tr.yml | 1 + .../Resources/translations/messages.zh.yml | 1 + .../views/themes/material/layout.html.twig | 65 +++++++++------------- web/wallassets/material.css | 2 +- web/wallassets/material.js | 2 +- 21 files changed, 59 insertions(+), 40 deletions(-) diff --git a/app/Resources/static/themes/material/css/nav.scss b/app/Resources/static/themes/material/css/nav.scss index b7288278..c84f7957 100644 --- a/app/Resources/static/themes/material/css/nav.scss +++ b/app/Resources/static/themes/material/css/nav.scss @@ -141,3 +141,15 @@ nav { display: none; } } + +.dropdown-content { + min-width: 300px; + + .material-icons { + line-height: initial !important; + } + + li > a { + padding: 10px; + } +} diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 1c28401d..d8f5628c 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -63,6 +63,8 @@ $(document).ready(() => { container: 'body', }); + $('.dropdown-trigger').dropdown({ hover: false }); + initFilters(); initExport(); initRandom(); diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml index 54df2e64..4f8b071f 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtrer artikler' # random_entry: Jump to a random entry from that list # export: 'Export' + # account: 'My account' search_form: input_label: 'Indtast søgning' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml index 549704d0..4c701223 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Artikel filtern' # random_entry: Jump to a random entry from that list export: 'Exportieren' + # account: 'My account' search_form: input_label: 'Suchbegriff hier eingeben' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml index a68a7d7d..c314bb1d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filter entries' random_entry: Jump to a random entry from that list export: 'Export' + account: 'My account' search_form: input_label: 'Enter your search here' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml index c3e3ba81..e42be021 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtrar los artículos' random_entry: 'Ir a un artículo aleatório de esta lista' export: 'Exportar' + # account: 'My account' search_form: input_label: 'Introduzca su búsqueda aquí' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml index 4a52a208..1bbcda23 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'فیلترکردن مقاله‌ها' # random_entry: Jump to a random entry from that list export: 'برون‌بری' + # account: 'My account' search_form: input_label: 'جستجوی خود را این‌جا بنویسید:' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 2cfab8cf..3aa1f657 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -41,6 +41,7 @@ menu: filter_entries: "Filtrer les articles" random_entry: Aller à un article aléatoire de cette liste export: "Exporter" + account: "Mon compte" search_form: input_label: "Saisissez votre terme de recherche" diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml index af1c1fe7..933eac85 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtra contenuti' # random_entry: Jump to a random entry from that list export: 'Esporta' + # account: 'My account' search_form: input_label: 'Inserisci qui la tua ricerca' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ja.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ja.yml index f6530a83..ce18732d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ja.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ja.yml @@ -40,6 +40,7 @@ menu: filter_entries: 'フィルターを使用' random_entry: このリストの中からランダムに記事に記事を表示 export: 'エクスポート' + # account: 'My account' search_form: input_label: '検索内容を入力' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml index 59dd9b22..ae2b8c55 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtrar los articles' random_entry: "Sautar a un article a l'azard" export: 'Exportar' + # account: 'My account' search_form: input_label: 'Picatz vòstre mot-clau a cercar aquí' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml index c09ef47a..3b174981 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtruj wpisy' # random_entry: Jump to a random entry from that list export: 'Eksportuj' + # account: 'My account' search_form: input_label: 'Wpisz swoje zapytanie tutaj' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml index 293a4e44..e2eaf25d 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtrar os artigos' random_entry: Ir para um artigo aleatório desta lista export: 'Exportar' + # account: 'My account' search_form: input_label: 'Digite aqui sua pesquisa' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml index 3c605709..0b744108 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtrează articolele' # random_entry: Jump to a random entry from that list # export: 'Export' + # account: 'My account' search_form: input_label: 'Introdu căutarea ta' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml index eead4ec6..3c1a8596 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ru.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Фильтр записей' # random_entry: Jump to a random entry from that list export: 'Экспорт' + # account: 'My account' search_form: input_label: 'Введите текст для поиска' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml index 8d2b05f3..29025d2e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.th.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'ตัวกรองรายการ' # random_entry: Jump to a random entry from that list export: 'นำข้อมูลออก' + # account: 'My account' search_form: input_label: 'ค้นหาที่นี้' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml index dfbc3010..62f7be02 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml @@ -41,6 +41,7 @@ menu: filter_entries: 'Filtrele' # random_entry: Jump to a random entry from that list export: 'Dışa Aktar' + # account: 'My account' search_form: input_label: 'Aramak istediğiniz herhangi bir şey yazın' diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.zh.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.zh.yml index f48ce37a..da125371 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.zh.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.zh.yml @@ -40,6 +40,7 @@ menu: filter_entries: '筛选项目' random_entry: '随机跳到该列表中的一个项目' export: '导出' + # account: 'My account' search_form: input_label: '输入搜索关键词' diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig index d9b6d190..59705e89 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig @@ -62,45 +62,9 @@
  • {{ 'menu.left.all_articles'|trans }} {{ count_entries('all') }}
  • -
  • +
  • {{ 'menu.left.tags'|trans }} {{ count_tags() }}
  • -
  • - {{ 'menu.left.config'|trans }} -
  • - {% if craue_setting('restricted_access') %} -
  • - {{ 'menu.left.site_credentials'|trans }} -
  • - {% endif %} - {% if is_granted('ROLE_SUPER_ADMIN') %} -
  • - {{ 'menu.left.users_management'|trans }} -
  • - -
  • - {{ 'menu.left.internal_settings'|trans }} -
  • - -
  • - {{ 'menu.left.ignore_origin_instance_rules'|trans }} -
  • - {% endif %} -
  • - {{ 'menu.left.import'|trans }} -
  • -
  • - {{ 'menu.left.developer'|trans }} -
  • -
  • - {{ 'menu.left.howto'|trans }} -
  • -
  • - {{ 'menu.left.quickstart'|trans }} -
  • -
  • - {{ 'menu.left.logout'|trans }} -