aboutsummaryrefslogtreecommitdiff
path: root/templates/macros
diff options
context:
space:
mode:
authorJieiku2022-06-10 22:25:01 -0700
committerJieiku2022-06-10 22:25:01 -0700
commitb299a35f3970c94f7fb5987801fa72c374937584 (patch)
tree048f8756a4b34b866e39af3a569e32a2fe9a2506 /templates/macros
parent8fa86ba6c13335eed38e4dc65731bece92ce2f74 (diff)
downloadabridge-b299a35f3970c94f7fb5987801fa72c374937584.tar.gz
abridge-b299a35f3970c94f7fb5987801fa72c374937584.tar.bz2
abridge-b299a35f3970c94f7fb5987801fa72c374937584.zip
Meta Data Options
Diffstat (limited to 'templates/macros')
-rw-r--r--templates/macros/macros.html87
1 files changed, 77 insertions, 10 deletions
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index 4b6c7d5..e818bfd 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -1,20 +1,87 @@
{%- macro title(page) %}
- <h1><a href="{{ page.permalink | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ page.title }}</a></h1>
- <span>
- {%- if page.taxonomies.authors and config.taxonomies %}
- <span class="hpad"><b>{%- for author in page.taxonomies.authors %}
+ <span{%- if config.extra.meta_post.size %} class="{{ config.extra.meta_post.size }}"{% endif %}>
+
+ {#- Author #}
+ {%- if page.taxonomies.authors and config.taxonomies %}
+ {%- for author in page.taxonomies.authors %}
+ {%- if author_flag %} and {% endif %}
+ <a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ author }}</a>
+ {%- set_global author_flag = true %}
+ {%- endfor %}
+ {%- elif config.extra.author and config.extra.meta_post.author %}
+ {%- if config.extra.icon_author %}<i class="{{ config.extra.icon_author }}"></i>{%- endif %}{{ config.extra.author }}
+ {%- endif %}
+
+ {#- divider #}
+ {%- if config.extra.meta_post.author %}
+ {%- if config.extra.meta_post.readtime or config.extra.meta_post.date or config.extra.meta_post.categories_tags %}
+ {%- if config.extra.meta_post.divider %}<span class="hpad">{{ config.extra.meta_post.divider | safe }}</span>{%- else %} {%- endif %}
+ {%- endif %}
+ {%- endif %}
+
+ {#- ReadTime #}
+ {%- if config.extra.meta_post.readtime %} {%- if config.extra.icon_read %}<i class="{{ config.extra.icon_read }}"></i>{%- endif %}{{ page.reading_time }} {{ config.extra.meta_post.readstring | default(value="min") }}
+ {#- divider #}
+ {%- if config.extra.meta_post.date or config.extra.meta_post.categories_tags %}
+ {%- if config.extra.meta_post.divider %}<span class="hpad">{{ config.extra.meta_post.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{%- endif %}
+
+ {#- Date #}
+ {%- if config.extra.meta_post.date %} {%- if config.extra.icon_date %}<i class="{{ config.extra.icon_date }}"></i>{%- endif %}{{ page.date | date(format="%B %d, %Y") }}
+ {#- divider #}
+ {%- if config.extra.meta_post.categories_tags %}
+ {%- if config.extra.meta_post.divider %}<span class="hpad">{{ config.extra.meta_post.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{% endif %}
+
+ {#- Categories #}
+ {%- if page.taxonomies.categories %} {%- if config.extra.icon_info %}<i class="{{ config.extra.icon_info }}"></i>{%- endif %}[{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind='categories', name=cat) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ cat }}</a>{% endfor %}]{% endif %}
+
+ {#- Tags #}
+ {%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ tag }}</a> {% endfor -%}{%- endif %}</span>
+{%- endmacro title %}
+
+
+{%- macro title_index(page) %}
+ <span{%- if config.extra.meta_index.size %} class="{{ config.extra.meta_index.size }}"{% endif %}>
+
+ {#- Author #}
+ {%- if page.taxonomies.authors and config.taxonomies %}
+ {%- for author in page.taxonomies.authors %}
{%- if author_flag %} and {% endif %}
<a href="{{ get_taxonomy_url(kind='authors', name=author) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ author }}</a>
{%- set_global author_flag = true %}
- {%- endfor %}</b></span>
- {%- elif config.extra.author and config.extra.author_show %}<span class="hpad"><b>{{ config.extra.author }}</b></span>
- {%- endif %}<span class="rpad"> {{ page.date | date(format="%B %d, %Y") }}</span>
-{%- if page.taxonomies.categories %}<span class="rpad"> [{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind='categories', name=cat) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ cat }}</a>{% endfor %}]</span>{% endif %}
-{%- if page.taxonomies.tags %}<span class="rpad"> {%- for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ tag }}</a> {% endfor -%}</span>{%- endif %}
-{%- if config.extra.readtime %}<span class="rpad"> {{ page.reading_time }} {{ config.extra.readtime_string | default(value="min") }} </span>{% endif %}</span>
+ {%- endfor %}
+ {%- elif config.extra.author and config.extra.meta_index.author %}
+ {%- if config.extra.icon_author %}<i class="{{ config.extra.icon_author }}"></i>{%- endif %}{{ config.extra.author }}
+ {%- endif %}
+
+ {#- divider #}
+ {%- if config.extra.meta_index.author %}
+ {%- if config.extra.meta_index.readtime or config.extra.meta_index.date or config.extra.meta_index.categories_tags %}
+ {%- if config.extra.meta_index.divider %}<span class="hpad">{{ config.extra.meta_index.divider | safe }}</span>{%- else %} {%- endif %}
+ {%- endif %}
+ {%- endif %}
+
+ {#- ReadTime #}
+ {%- if config.extra.meta_index.readtime %} {%- if config.extra.icon_read %}<i class="{{ config.extra.icon_read }}"></i>{%- endif %}{{ page.reading_time }} {{ config.extra.meta_index.readstring | default(value="min") }}
+ {#- divider #}
+ {%- if config.extra.meta_index.date or config.extra.meta_index.categories_tags %}
+ {%- if config.extra.meta_index.divider %}<span class="hpad">{{ config.extra.meta_index.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{%- endif %}
+
+ {#- Date #}
+ {%- if config.extra.meta_index.date %} {%- if config.extra.icon_date %}<i class="{{ config.extra.icon_date }}"></i>{%- endif %}{{ page.date | date(format="%B %d, %Y") }}
+ {#- divider #}
+ {%- if config.extra.meta_index.categories_tags %}
+ {%- if config.extra.meta_index.divider %}<span class="hpad">{{ config.extra.meta_index.divider | safe }}</span>{%- else %} {%- endif %}{%- endif %}{% endif %}
+
+ {#- Categories #}
+ {%- if page.taxonomies.categories %} {%- if config.extra.icon_info %}<i class="{{ config.extra.icon_info }}"></i>{%- endif %}[{% for cat in page.taxonomies.categories %}<a href="{{ get_taxonomy_url(kind='categories', name=cat) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ cat }}</a>{% endfor %}]{% endif %}
+
+ {#- Tags #}
+ {%- if page.taxonomies.tags %} {%- for tag in page.taxonomies.tags %} #<a href="{{ get_taxonomy_url(kind='tags', name=tag) | safe }}{%- if config.extra.uglyurls %}index.html{%- endif %}">{{ tag }}</a> {% endfor -%}{%- endif %}</span>
{%- endmacro title %}
+
+
{%- macro footer(page) %}
<p><b><a href="#">Back to top</a></b></p>
{%- endmacro footer %}