From c891ab2588159e3d349baf2fe2768d0c44abcaeb Mon Sep 17 00:00:00 2001 From: Thiago Perrotta Date: Tue, 18 Jan 2022 00:00:32 -0500 Subject: [PATCH] Add several icons to menus according to their roles - refresh: https://tabler-icons.io/i/refresh - edit: https://tabler-icons.io/i/edit - delete: https://tabler-icons.io/i/delete - mark page as read: https://tabler-icons.io/i/check - mark all as read: https://tabler-icons.io/i/checks - show all entries: https://tabler-icons.io/i/eye - show only unread entries: https://tabler-icons.io/i/eye-off - create category: https://tabler-icons.io/i/folder-plus - add subscription: https://tabler-icons.io/i/plus - import: https://tabler-icons.io/i/file-import - export: https://tabler-icons.io/i/file-export - categories: https://tabler-icons.io/i/folders --- template/templates/common/feed_menu.html | 12 ++--- template/templates/views/categories.html | 2 +- .../templates/views/category_entries.html | 12 ++--- template/templates/views/category_feeds.html | 6 +-- template/templates/views/create_category.html | 2 +- template/templates/views/edit_category.html | 6 +-- template/templates/views/edit_feed.html | 6 +-- template/templates/views/feed_entries.html | 16 +++---- template/templates/views/sessions.html | 2 +- template/templates/views/unread_entries.html | 6 +-- ui/static/bin/sprite.svg | 48 ++++++++++++++++++- 11 files changed, 82 insertions(+), 36 deletions(-) diff --git a/template/templates/common/feed_menu.html b/template/templates/common/feed_menu.html index faba6fd2..bbbdcf04 100644 --- a/template/templates/common/feed_menu.html +++ b/template/templates/common/feed_menu.html @@ -1,19 +1,19 @@ {{ define "feed_menu" }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/template/templates/views/categories.html b/template/templates/views/categories.html index 4ecd8a46..8e593474 100644 --- a/template/templates/views/categories.html +++ b/template/templates/views/categories.html @@ -5,7 +5,7 @@

{{ t "page.categories.title" }} ({{ .total }})

diff --git a/template/templates/views/category_entries.html b/template/templates/views/category_entries.html index 392a40dc..7041e19f 100644 --- a/template/templates/views/category_entries.html +++ b/template/templates/views/category_entries.html @@ -12,7 +12,7 @@ data-label-yes="{{ t "confirm.yes" }}" data-label-no="{{ t "confirm.no" }}" data-label-loading="{{ t "confirm.loading" }}" - data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }} + data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}
  • {{ t "menu.mark_all_as_read" }} + data-url="{{ route "markCategoryAsRead" "categoryID" .category.ID }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}
  • {{ end }} {{ if .showOnlyUnreadEntries }}
  • - {{ t "menu.show_all_entries" }} + {{ icon "show-all-entries" }}{{ t "menu.show_all_entries" }}
  • {{ else }}
  • - {{ t "menu.show_only_unread_entries" }} + {{ icon "show-unread-entries" }}{{ t "menu.show_only_unread_entries" }}
  • {{ end }}
  • - {{ t "menu.feeds" }} + {{ icon "feeds" }}{{ t "menu.feeds" }}
  • @@ -71,7 +71,7 @@ data-label-yes="{{ t "confirm.yes" }}" data-label-no="{{ t "confirm.no" }}" data-label-loading="{{ t "confirm.loading" }}" - data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }} + data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }} {{ end }} diff --git a/template/templates/views/category_feeds.html b/template/templates/views/category_feeds.html index 9e92d153..26d4d2a7 100644 --- a/template/templates/views/category_feeds.html +++ b/template/templates/views/category_feeds.html @@ -5,10 +5,10 @@

    {{ .category.Title }} > {{ t "page.feeds.title" }} ({{ .total }})

    diff --git a/template/templates/views/create_category.html b/template/templates/views/create_category.html index 1a7212c6..c6be3e6f 100644 --- a/template/templates/views/create_category.html +++ b/template/templates/views/create_category.html @@ -5,7 +5,7 @@

    {{ t "page.new_category.title" }}

    diff --git a/template/templates/views/edit_category.html b/template/templates/views/edit_category.html index 5fbc91e1..4412ff97 100644 --- a/template/templates/views/edit_category.html +++ b/template/templates/views/edit_category.html @@ -5,13 +5,13 @@

    {{ t "page.edit_category.title" .category.Title }}

    diff --git a/template/templates/views/edit_feed.html b/template/templates/views/edit_feed.html index b4c3efa1..f29e33e5 100644 --- a/template/templates/views/edit_feed.html +++ b/template/templates/views/edit_feed.html @@ -5,13 +5,13 @@

    {{ .feed.Title }}

    diff --git a/template/templates/views/feed_entries.html b/template/templates/views/feed_entries.html index f3796e15..0a731551 100644 --- a/template/templates/views/feed_entries.html +++ b/template/templates/views/feed_entries.html @@ -15,7 +15,7 @@ data-label-yes="{{ t "confirm.yes" }}" data-label-no="{{ t "confirm.no" }}" data-label-loading="{{ t "confirm.loading" }}" - data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }} + data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}
  • {{ t "menu.mark_all_as_read" }} + data-url="{{ route "markFeedAsRead" "feedID" .feed.ID }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}
  • {{ end }} {{ if .showOnlyUnreadEntries }}
  • - {{ t "menu.show_all_entries" }} + {{ icon "show-all-entries" }}{{ t "menu.show_all_entries" }}
  • {{ else }}
  • - {{ t "menu.show_only_unread_entries" }} + {{ icon "show-unread-entries" }}{{ t "menu.show_only_unread_entries" }}
  • {{ end }}
  • - {{ t "menu.refresh_feed" }} + {{ icon "refresh" }}{{ t "menu.refresh_feed" }}
  • - {{ t "menu.edit_feed" }} + {{ icon "edit" }}{{ t "menu.edit_feed" }}
  • {{ t "action.remove_feed" }} + data-redirect-url="{{ route "feeds" }}">{{ icon "delete" }}{{ t "action.remove_feed" }}
  • @@ -99,7 +99,7 @@ data-label-yes="{{ t "confirm.yes" }}" data-label-no="{{ t "confirm.no" }}" data-label-loading="{{ t "confirm.loading" }}" - data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ t "menu.mark_page_as_read" }} + data-show-only-unread="{{ if .showOnlyUnreadEntries }}1{{ end }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }} {{ end }} diff --git a/template/templates/views/sessions.html b/template/templates/views/sessions.html index 09772b68..24192843 100644 --- a/template/templates/views/sessions.html +++ b/template/templates/views/sessions.html @@ -28,7 +28,7 @@ data-label-yes="{{ t "confirm.yes" }}" data-label-no="{{ t "confirm.no" }}" data-label-loading="{{ t "confirm.loading" }}" - data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "action.remove" }} + data-url="{{ route "removeSession" "sessionID" .ID }}">{{ icon "delete" }}{{ t "action.remove" }} {{ end }} diff --git a/template/templates/views/unread_entries.html b/template/templates/views/unread_entries.html index 8e00a055..b78153d2 100644 --- a/template/templates/views/unread_entries.html +++ b/template/templates/views/unread_entries.html @@ -12,7 +12,7 @@ data-label-question="{{ t "confirm.question" }}" data-label-yes="{{ t "confirm.yes" }}" data-label-no="{{ t "confirm.no" }}" - data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_page_as_read" }} + data-label-loading="{{ t "confirm.loading" }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }}
  • {{ t "menu.mark_all_as_read" }} + data-label-loading="{{ t "confirm.loading" }}">{{ icon "mark-all-as-read" }}{{ t "menu.mark_all_as_read" }}
  • {{ end }} @@ -59,7 +59,7 @@ data-label-question="{{ t "confirm.question" }}" data-label-yes="{{ t "confirm.yes" }}" data-label-no="{{ t "confirm.no" }}" - data-label-loading="{{ t "confirm.loading" }}">{{ t "menu.mark_page_as_read" }} + data-label-loading="{{ t "confirm.loading" }}">{{ icon "mark-page-as-read" }}{{ t "menu.mark_page_as_read" }} {{ end }} diff --git a/ui/static/bin/sprite.svg b/ui/static/bin/sprite.svg index 19163c10..99aff3fa 100644 --- a/ui/static/bin/sprite.svg +++ b/ui/static/bin/sprite.svg @@ -115,4 +115,50 @@ Source: https://github.com/tabler/tabler-icons - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +