From 6b0b0ebbe76a5cf4eef8de18c9c5ae9a5af39b83 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 30 Jul 2026 14:04:57 +0200 Subject: Use icon sets on the public page and add a public-site shortcut in admin realm --- app/views/layouts/_nav_controls.html.erb | 5 +++++ app/views/layouts/application.html.erb | 4 ++-- config/locales/de.yml | 7 ++++--- config/locales/en.yml | 1 + public/stylesheets/ccc.css | 6 ++++++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/app/views/layouts/_nav_controls.html.erb b/app/views/layouts/_nav_controls.html.erb index d6053dab..bae1082b 100644 --- a/app/views/layouts/_nav_controls.html.erb +++ b/app/views/layouts/_nav_controls.html.erb @@ -1,7 +1,12 @@ + <% if current_user %> <%= link_to icon("home", library: "tabler", "aria-hidden": true), admin_path, "aria-label": t(".dashboard"), title: t(".dashboard") %> " title="<%= t(".search") %>"><%= icon("search", library: "tabler", "aria-hidden": true) %> <% end %> +<%= link_to root_path, class: "nav_toggle", + "aria-label" => t(".public_site"), title: t(".public_site") do %> + <%= icon("world", library: "tabler", "aria-hidden": true) %> +<% end %> <%= link_to url_for(locale: (:en unless I18n.locale == :en)), diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 6947d329..b9a53fd3 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -49,8 +49,8 @@ <% end %> diff --git a/config/locales/de.yml b/config/locales/de.yml index 4f0739ce..e8a65cea 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -282,7 +282,7 @@ de: title: "cccms Dashboard" search_placeholder: "Nodes und Tags durchsuchen…" create_post: "Beitrag anlegen" - find_chapter: "Chapter finden" + find_chapter: "Dezentrale finden" upload_asset: "Asset hochladen" add_in_tree: "Seite im Seitenbaum anlegen" drafts_widget: "In Arbeit (%{total})" @@ -433,7 +433,7 @@ de: sitemap: title: "Sitemap" chapters: - title: "Chapters" + title: "Dezentrale" filter: "Filter" node_list: search_placeholder: "Titel, Abstract, Text durchsuchen…" @@ -645,7 +645,7 @@ de: application: light_mode_aria: "Zwischen dunklem und hellem Modus wechseln" light_mode_label: "Licht" - admin: "Verwaltung" + admin: "Admin" overview: "Übersicht" edit: "Bearbeiten" flash: @@ -668,6 +668,7 @@ de: nav_controls: dashboard: "Dashboard" search: "Suche" + public_site: "Zur Website" switch_locale: "Sprache umschalten" scheme_override: "Hell/Dunkel umschalten" log_out: "Abmelden" diff --git a/config/locales/en.yml b/config/locales/en.yml index 703e14ec..da87777d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -620,6 +620,7 @@ en: nav_controls: dashboard: "Dashboard" search: "Search" + public_site: "To the website" switch_locale: "Toggle language" scheme_override: "Toggle light/dark" log_out: "Log out" diff --git a/public/stylesheets/ccc.css b/public/stylesheets/ccc.css index faa9c18d..5b10fa26 100644 --- a/public/stylesheets/ccc.css +++ b/public/stylesheets/ccc.css @@ -344,6 +344,12 @@ div#center_column { } } +.admin_edit_link svg { + width: 1em; + height: 1em; + vertical-align: -0.125em; +} + /* Footer */ #footer { border-bottom: 1px solid color-mix(in srgb, CanvasText, Canvas 60%); -- cgit v1.3