chore: linked headers
This commit is contained in:
parent
86cde92ba7
commit
cb9a3b8f48
6 changed files with 21 additions and 17 deletions
|
@ -1,9 +0,0 @@
|
|||
|
||||
<div class="addon-links">
|
||||
{%- if popularPosts.size > 0 -%}
|
||||
{% render "blocks/popular-posts.liquid", popularPosts:popularPosts %}
|
||||
{%- endif -%}
|
||||
{%- if links.size > 0 -%}
|
||||
{% render "blocks/recent-links.liquid", links:links %}
|
||||
{%- endif -%}
|
||||
</div>
|
|
@ -15,6 +15,6 @@
|
|||
{%- when 'divider' -%}
|
||||
{{ block.markup | markdown }}
|
||||
{%- when 'addon_links' -%}
|
||||
{% render "blocks/addon-links.liquid", popularPosts:collections.popularPosts, links:links %}
|
||||
{% render "blocks/links/addon-links.liquid", popularPosts:collections.popularPosts, links:links %}
|
||||
{%- endcase -%}
|
||||
{%- endfor -%}
|
9
src/includes/blocks/links/addon-links.liquid
Normal file
9
src/includes/blocks/links/addon-links.liquid
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
<div class="addon-links">
|
||||
{%- if popularPosts.size > 0 -%}
|
||||
{% render "blocks/links/popular-posts.liquid", popularPosts:popularPosts %}
|
||||
{%- endif -%}
|
||||
{%- if links.size > 0 -%}
|
||||
{% render "blocks/links/recent-links.liquid", links:links %}
|
||||
{%- endif -%}
|
||||
</div>
|
|
@ -1,8 +1,10 @@
|
|||
{%- if popularPosts.size > 0 -%}
|
||||
<article>
|
||||
<h3 class="article">
|
||||
{% tablericon "chart-bar-popular" "Popular" %}
|
||||
Popular posts
|
||||
<h3>
|
||||
<a class="article" href="/posts">
|
||||
{% tablericon "chart-bar-popular" "Popular" %}
|
||||
Popular posts
|
||||
</a>
|
||||
</h3>
|
||||
<ol type="1">
|
||||
{%- for post in popularPosts limit: 5 -%}
|
|
@ -1,8 +1,10 @@
|
|||
{%- if links.size > 0 -%}
|
||||
<article>
|
||||
<h3 class="link">
|
||||
{% tablericon "link" "Links" %}
|
||||
Recent links
|
||||
<h3>
|
||||
<a class="link" href="/links">
|
||||
{% tablericon "link" "Links" %}
|
||||
Recent links
|
||||
</a>
|
||||
</h3>
|
||||
<ul>
|
||||
{%- for link in links limit: 5 -%}
|
|
@ -51,6 +51,6 @@ schema: blog
|
|||
shows: post.shows
|
||||
%}
|
||||
{% render "blocks/banners/coffee.liquid" %}
|
||||
{% render "blocks/addon-links.liquid", popularPosts:collections.popularPosts, links:links %}
|
||||
{% render "blocks/links/addon-links.liquid", popularPosts:collections.popularPosts, links:links %}
|
||||
</div>
|
||||
</article>
|
Reference in a new issue