From 898fd9ed0ffe498b5b5ede23b378bf48a29cc780 Mon Sep 17 00:00:00 2001 From: Yader Velasquez Date: Fri, 9 Feb 2024 17:25:37 -0600 Subject: [PATCH] Improve icons for links --- core/routes.go | 5 +- static/css/style.css | 22 ++++++++- templates/link_list.html | 104 ++++++++++++++++++++------------------- 3 files changed, 78 insertions(+), 53 deletions(-) diff --git a/core/routes.go b/core/routes.go index f2f0edd..20b14c6 100644 --- a/core/routes.go +++ b/core/routes.go @@ -1298,8 +1298,8 @@ func (s *Service) OrgLinksList(c echo.Context) error { pd := localizer.NewPageData(lt.Translate("Bookmarks")) pd.Data["bookmark"] = lt.Translate("bookmark") pd.Data["saved"] = lt.Translate("saved") - pd.Data["public_post"] = lt.Translate("Public Post") - pd.Data["private_post"] = lt.Translate("Private Post") + pd.Data["public"] = lt.Translate("Public") + pd.Data["private"] = lt.Translate("Private") pd.Data["edit"] = lt.Translate("Edit") pd.Data["delete"] = lt.Translate("Delete") pd.Data["next"] = lt.Translate("Next") @@ -1317,6 +1317,7 @@ func (s *Service) OrgLinksList(c echo.Context) error { pd.Data["mark_as_starred"] = lt.Translate("Star") pd.Data["mark_as_non_starred"] = lt.Translate("Unstar") pd.Data["no_links"] = lt.Translate("No Links") + pd.Data["archive"] = lt.Translate("Archive") orgLinks := result.OrgLinks.Result gmap := gobwebs.Map{ "pd": pd, diff --git a/static/css/style.css b/static/css/style.css index edaec2f..a6bf6f2 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -436,6 +436,11 @@ a.bullet-link:before { color: var(--color-darkGrey); } +.icon-link { + line-height: 0; + margin-left: 10px; +} + .tooltip-link[data-tooltip] { position: relative; } @@ -448,10 +453,25 @@ a.bullet-link:before { left: 50%; transform: translateX(-50%); background-color: #fff; - padding: 5px; white-space: nowrap; z-index: 1000; border: 1px solid var(--color-darkGrey); padding: 10px 2px 10px 2px; opacity: 1 !important; } + +.lock-icon { + margin-top: 9px; +} +.lock-icon[data-tooltip]:hover::after { + content: attr(data-tooltip); + color: var(--color-darkGrey); + position: absolute; + transform: translateX(-50%); + background-color: #fff; + white-space: nowrap; + z-index: 1000; + border: 1px solid var(--color-darkGrey); + padding: 0 2px 0 3px; + opacity: 1 !important; +} diff --git a/templates/link_list.html b/templates/link_list.html index 2547b82..cefa46e 100644 --- a/templates/link_list.html +++ b/templates/link_list.html @@ -28,53 +28,21 @@
{{if $.isOrgLink}} {{if $.canRead }} - - {{if .IsPrivate}} - - {{else}} - - {{end}} - - {{end}} - {{if .Unread}} - {{if eq .UserID $.currentUserID}} - - - - - - {{end}} - {{else}} - {{if eq .UserID $.currentUserID}} - - - - - - {{end}} - {{end}} - {{if not .Starred}} - {{if eq .UserID $.currentUserID}} - - - - - - {{end}} - {{else}} - {{if eq .UserID $.currentUserID}} - - - - - - {{end}} + + + {{if .IsPrivate}} + + {{else}} + + {{end}} + + {{end}} {{end}}

@@ -85,18 +53,54 @@ {{end}} {{if $.isOrgLink}} {{if eq .UserID $.currentUserID}} - + + {{if .Unread}} + + + + + + {{else}} + + + + + + {{end}} + + + {{if .Starred}} + + + + + + {{else}} + + + + + + {{end}} + + + - + + + + + {{if .ArchiveURL}} - + -- 2.45.2