diff --git a/sass/parts/_header.scss b/sass/parts/_header.scss index fbba0bda5..a6ceebb4c 100644 --- a/sass/parts/_header.scss +++ b/sass/parts/_header.scss @@ -24,12 +24,14 @@ header { .nav-navs { display: flex; flex-wrap: wrap; + align-items: center; ul { display: flex; - flex-wrap: wrap; - justify-content: center; - align-items: center; + flex-wrap: inherit; + justify-content: inherit; + align-items: inherit; + gap: inherit; gap: 1px; margin: 0; padding: 0; @@ -37,6 +39,12 @@ header { } } +#menu-icons-group { + gap: 1px; + margin: 0; + padding: 0; +} + .nav-links { justify-content: right; padding: 0.66rem; @@ -76,11 +84,22 @@ header { ul, li { - display: inline; + display: inline-block; + margin-inline-end: 0.2rem; font-family: var(--sans-serif-font); list-style-type: none; } + + .tag { + margin-inline-end: 0; + } + + .separator { + margin-inline-end: 0.2rem; + user-select: none; + } } + .language-switcher { display: flex; justify-content: center; @@ -147,21 +166,17 @@ header { .nav-navs { display: flex; - justify-content: flex-end; + justify-content: center; } } @media only screen and (max-width: 600px) { .nav-navs { - flex-wrap: wrap; - justify-content: center; margin-top: 0.8rem; - width: 100%; } .navbar { flex-direction: column; - justify-content: center; align-items: center; } } diff --git a/templates/page.html b/templates/page.html index c269531ad..c2a9b7452 100644 --- a/templates/page.html +++ b/templates/page.html @@ -140,24 +140,26 @@

{%- set previous_visible = true -%} {% endif %} + {%- set separator_with_class = ""-%} + {#- Date -#} {% if page.date and macros_settings::evaluate_setting_priority(setting="show_date", page=page, default_global_value=true) == "true" %} - {%- if previous_visible -%} {{ separator }} {%- endif -%}
  • {{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}
  • +
  • {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_format_date::format_date(date=page.date, short=true, language_strings=language_strings) }}
  • {#- Variable to keep track of whether we've shown a section, to avoid separators as the first element -#} {%- set previous_visible = true -%} {% endif %} {#- Reading time -#} {% if macros_settings::evaluate_setting_priority(setting="show_reading_time", page=page, default_global_value=true) == "true" %} - {%- if previous_visible -%} {{ separator }} {%- endif -%}
  • {{ macros_translate::translate(key="min_read", number=page.reading_time, default="$NUMBER min read", language_strings=language_strings) }}
  • +
  • {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{ macros_translate::translate(key="min_read", number=page.reading_time, default="$NUMBER min read", language_strings=language_strings) }}
  • {%- set previous_visible = true -%} {% endif %} {#- Tags -#} {%- if page.taxonomies and page.taxonomies.tags -%} - {%- if previous_visible -%} {{ separator }} {%- endif -%}
  • {{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: 
  • +
  • {%- if previous_visible -%}{{ separator_with_class | safe }}{%- endif -%}{{- macros_translate::translate(key="tags", default="tags", language_strings=language_strings) | capitalize -}}: 
  • {%- for tag in page.taxonomies.tags -%} -
  • {{ tag }} +
  • {{ tag }} {%- if not loop.last -%} ,  {%- endif -%} @@ -174,8 +176,7 @@

    diff --git a/templates/partials/nav.html b/templates/partials/nav.html index e2ea1553c..ba61dc8b2 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -18,28 +18,31 @@ {% endfor %} {%- endif -%} - {# Search #} - {%- if config.build_search_index %} - {%- set search_icon_title = macros_translate::translate(key='search_icon_title', default='Press $SHORTCUT to open search', language_strings=language_strings) -%} -
  • -
    - - - -
    -
  • - {%- endif %} + {#- Wrap the icons in a div to keep them all together -#} + {% endif %}