Move title to an include

This commit is contained in:
Nemo 2023-06-12 14:48:46 +05:30
parent c552514082
commit e3211ebefc
3 changed files with 9 additions and 15 deletions

View File

@ -0,0 +1,6 @@
{% if include.trigger_warning %}
<span class="trigger-warning">{{include.trigger_warning |strip_html | strip}}</span>
<span class="real-title">{{include.title}}</span>
{% else %}
{{include.title | strip}}
{% endif %}

View File

@ -1,12 +1,7 @@
<details data-hash="{{include.story.id}}-{{include.story.date | date: '%s'}}">
<summary>
<h3>
{% if post.trigger_warning %}
<span class="trigger-warning">{{post.trigger_warning |strip_html | strip}}</span>
<span class="real-title">{{post.title}}</span>
{% else %}
{{post.title | strip}}
{% endif %}
{% include_cached post-title.html trigger_warning=include.story.trigger_warning title=include.story.title %}
</h3>
{% if include.story.content.downcase contains "developing story" %}<span title="Developing Story"></span>{%endif%}
</summary>

View File

@ -10,18 +10,11 @@ layout: default
<p class="topic-date"><time datetime="{{site.time | date: '%y-%m-%d'}}">{{site.time | date: "%A, %b, %e, %Y"}}</time></p>
{% for post in site.pages %}
{% if post.topics contains page.topic and post.days_ago < 2 %}
{% if post.topics contains page.topic %}
<details data-hash="{{post.id}}-{{post.date | date: '%s'}}">
<summary>
<h2>
{% if post.trigger_warning %}
<span class="trigger-warning">{{post.trigger_warning |strip_html | strip}}</span>
<span class="real-title">{{post.title}}</span>
{% else %}
{{post.title | strip}}
{% endif %}
{% include_cached post-title.html trigger_warning=post.trigger_warning title=post.title %}
</h2>
<a class="topic-title" href="{{post.url}}">🔗</a>
{% if post.syndicated %}