diff --git a/sass/main.scss b/sass/main.scss index f2b36c7..cb72361 100644 --- a/sass/main.scss +++ b/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/sass/parts/_misc.scss b/sass/parts/_misc.scss index 0580780..d798ddd 100644 --- a/sass/parts/_misc.scss +++ b/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/templates/base.html b/templates/base.html index 6933a48..20eafa7 100644 --- a/templates/base.html +++ b/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/templates/macros/feed_utils.html b/templates/macros/feed_utils.html new file mode 100644 index 0000000..653fcda --- /dev/null +++ b/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/templates/macros/page_header.html b/templates/macros/page_header.html index 58a23dc..daa8d02 100644 --- a/templates/macros/page_header.html +++ b/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) -%} +