diff --git a/themes/tabi/sass/main.scss b/themes/tabi/sass/main.scss index 16b6967..3a3bc36 100644 --- a/themes/tabi/sass/main.scss +++ b/themes/tabi/sass/main.scss @@ -196,7 +196,7 @@ article { } .section-title { - display: block; + display: flex; margin: 0; margin-top: -0.15em; color: var(--text-color-high-contrast); diff --git a/themes/tabi/sass/parts/_misc.scss b/themes/tabi/sass/parts/_misc.scss index 0580780..76b6ce2 100644 --- a/themes/tabi/sass/parts/_misc.scss +++ b/themes/tabi/sass/parts/_misc.scss @@ -48,6 +48,9 @@ ul { .title-container { padding-bottom: 8px; + .social { + margin-inline-start: 0.5rem; + } } .bottom-divider { diff --git a/themes/tabi/templates/base.html b/themes/tabi/templates/base.html index 899354a..582a72f 100644 --- a/themes/tabi/templates/base.html +++ b/themes/tabi/templates/base.html @@ -1,12 +1,13 @@ +{% import "macros/feed_utils.html" as feed_utils %} {% import "macros/format_date.html" as macros_format_date %} {% import "macros/list_posts.html" as macros_list_posts %} {% import "macros/page_header.html" as macros_page_header %} {% import "macros/rel_attributes.html" as macros_rel_attributes %} +{% import "macros/series_page.html" as macros_series_page %} {% import "macros/settings.html" as macros_settings %} {% import "macros/table_of_contents.html" as macros_toc %} -{% import "macros/translate.html" as macros_translate %} -{% import "macros/series_page.html" as macros_series_page %} {% import "macros/target_attribute.html" as macros_target_attribute %} +{% import "macros/translate.html" as macros_translate %} {# Load the internationalisation data for the current language from the .toml files in the user's '/i18n' folder, falling back to the theme's. diff --git a/themes/tabi/templates/macros/feed_utils.html b/themes/tabi/templates/macros/feed_utils.html new file mode 100644 index 0000000..7a649b8 --- /dev/null +++ b/themes/tabi/templates/macros/feed_utils.html @@ -0,0 +1,17 @@ +{#- Feed utility macros -#} + + {#- Zola 0.19.0 uses `generate_feeds`. Prior versions use `generate_feed` -#} + {%- macro get_generate_feed() -%} + {{- config.generate_feeds | default(value=config.generate_feed) -}} + {%- endmacro get_generate_feed -%} + + {%- macro get_feed_url() -%} + {{- config.feed_filenames[0] | default(value=(config.feed_filename)) -}} + {%- endmacro get_feed_url -%} + + {#- Check footer feed icon conditions -#} + {%- macro should_show_footer_feed_icon() -%} + {%- set generate_feed = feed_utils::get_generate_feed() -%} + {%- set feed_url = feed_utils::get_feed_url() -%} + {{- generate_feed and config.extra.feed_icon and feed_url -}} + {%- endmacro should_show_footer_feed_icon -%} diff --git a/themes/tabi/templates/macros/page_header.html b/themes/tabi/templates/macros/page_header.html index 58a23dc..0d24999 100644 --- a/themes/tabi/templates/macros/page_header.html +++ b/themes/tabi/templates/macros/page_header.html @@ -1,5 +1,18 @@ -{% macro page_header(title) %} +{% macro page_header(title, show_feed_icon=false) %} + + {% set rel_attributes = macros_rel_attributes::rel_attributes() | trim %} + + + {%- set blank_target = macros_target_attribute::target_attribute(new_tab=config.markdown.external_links_target_blank) -%} +