From fa0b21a62eaed6a95084c6470e721d5852a62174 Mon Sep 17 00:00:00 2001 From: Dylan Bennett Date: Wed, 24 Apr 2024 11:14:22 +0000 Subject: [PATCH 1/2] Improve Header --- ckanext/smdh/assets/css/smdh.css | 1 + ckanext/smdh/templates/header.html | 44 ++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/ckanext/smdh/assets/css/smdh.css b/ckanext/smdh/assets/css/smdh.css index 7f5e422..bcb8d80 100644 --- a/ckanext/smdh/assets/css/smdh.css +++ b/ckanext/smdh/assets/css/smdh.css @@ -117,6 +117,7 @@ button.navbar-toggle { .masthead { background: #ffffff; box-shadow: 0px 4px 3px 1px rgb(11 10 10 / 27%); + padding: 0px; } .masthead .navigation .nav-pills li a { diff --git a/ckanext/smdh/templates/header.html b/ckanext/smdh/templates/header.html index 94f4f6e..c17b946 100644 --- a/ckanext/smdh/templates/header.html +++ b/ckanext/smdh/templates/header.html @@ -3,42 +3,58 @@ {% block header_site_navigation_tabs %}
  • DataHub
  • {{ h.build_nav_main( - ('dataset.search', _('Datasets')), - ('organization.index', _('Organizations')), - ('home.about', _('About')) ) + ('dataset.search', _('Datasets')), + ('organization.index', _('Organizations')), + ) +}} + +
  • Guides
  • + +{{ + h.build_nav_main( + ('home.about', _('About')), + ) }} {% endblock %} {% block header_account_logged %} {% if c.userobj.sysadmin %} -
  • +
  • - + {{ _('Admin') }}
  • {% endif %} -
  • +
  • {{ h.user_image((c.user if c and c.user else ''), size=22) }} {{ c.userobj.display_name }}
  • + +
  • + + + {{ _('Profile settings') }} + +
  • + {% set new_activities = h.new_activities() %} -
  • +
  • {% set notifications_tooltip = ngettext('Dashboard (%(num)d new item)', 'Dashboard (%(num)d new items)', new_activities) %}
    - + {{ _('Dashboard') }} {% if new_activities != 0 %} - + {{ _('Profile settings') }}
  • {% endblock %} {% block header_account_log_out_link %} -
  • +
  • - + {{ _('Log out') }}
  • From 4ad462ed876922e33e893909c744bad4320f247d Mon Sep 17 00:00:00 2001 From: Dylan Bennett Date: Wed, 24 Apr 2024 11:14:47 +0000 Subject: [PATCH 2/2] Change home breadcrumb --- ckanext/smdh/templates/snippets/home_breadcrumb_item.html | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ckanext/smdh/templates/snippets/home_breadcrumb_item.html diff --git a/ckanext/smdh/templates/snippets/home_breadcrumb_item.html b/ckanext/smdh/templates/snippets/home_breadcrumb_item.html new file mode 100644 index 0000000..f505578 --- /dev/null +++ b/ckanext/smdh/templates/snippets/home_breadcrumb_item.html @@ -0,0 +1,2 @@ +{# Used to insert the home icon into a breadcrumb #} +
  • {{ _('Home') }}

    {{ _('Home') }}