diff --git a/layout/_macro/post-collapse.swig b/layout/_macro/post-collapse.swig index 7fca6ff606..af931d67aa 100644 --- a/layout/_macro/post-collapse.swig +++ b/layout/_macro/post-collapse.swig @@ -13,7 +13,7 @@ {%- endif %} {# endshow #} -
+
<{%- if theme.seo %}h3{% else %}h2{%- endif %} class="post-title"> @@ -23,11 +23,7 @@ {{ next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url' }) }} {% else %} {%- endif %} diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index cb8b4fc252..27b84ec041 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -1,9 +1,4 @@ - {%- set headlessPost = Array.prototype.indexOf.call(['quote', 'picture'], post.type) > -1 %} - - {%- set post_class = 'post post-type-' + post.type | default('normal') %} - {%- if post_extra_class > 0 %} - {%- set post_class = post_class + ' ' + post_extra_class | default('') %} - {%- endif %} + {%- set post_class = 'post' %} {%- if post.sticky > 0 %} {%- set post_class = post_class + ' post-sticky' %} {%- endif %} @@ -29,35 +24,31 @@ - {%- if not headlessPost %} + {%- if post.header !== false %}
- - {# Not to show title for quote posts that do not have a title #} - {%- if not (is_index and post.type === 'quote' and not post.title) %} - <{%- if theme.seo %}h2{% else %}h1{%- endif %} class="post-title{%- if post.direction && post.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}" itemprop="name headline">{# - #}{# Link posts #}{# - #}{%- if post.link %} - {%- if post.sticky > 0 %} - - - - {%- endif %} - {%- set postTitleIcon = '' %} - {%- set postText = post.title or post.link %} - {{ next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url' }) }} - {% elif is_index %} - {%- if post.sticky > 0 %} - - - - {%- endif %} - {{ next_url(post.path, post.title | default(__('post.untitled')), {class: 'post-title-link', itemprop: 'url' }) }} - {% else -%} - {{- post.title -}} - {% include '../_partials/post-edit.swig' %} + <{%- if theme.seo %}h2{% else %}h1{%- endif %} class="post-title{%- if post.direction &&post.direction.toLowerCase() === 'rtl' %} rtl{%- endif %}" itemprop="name headline">{# + #}{# Link posts #}{# + #}{%- if post.link %} + {%- if post.sticky > 0 %} + + + {%- endif %} - - {%- endif %} + {%- set postTitleIcon = '' %} + {%- set postText = post.title or post.link %} + {{ next_url(post.link, postText + postTitleIcon, {class: 'post-title-link post-title-link-external', itemprop: 'url' }) }} + {% elif is_index %} + {%- if post.sticky > 0 %} + + + + {%- endif %} + {{ next_url(post.path, post.title | default(__('post.untitled')), {class: 'post-title-link', itemprop: 'url' }) }} + {% else -%} + {{- post.title -}} + {% include '../_partials/post-edit.swig' %} + {%- endif %} +