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' -%}
|
{%- when 'divider' -%}
|
||||||
{{ block.markup | markdown }}
|
{{ block.markup | markdown }}
|
||||||
{%- when 'addon_links' -%}
|
{%- 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 -%}
|
{%- endcase -%}
|
||||||
{%- endfor -%}
|
{%- 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 -%}
|
{%- if popularPosts.size > 0 -%}
|
||||||
<article>
|
<article>
|
||||||
<h3 class="article">
|
<h3>
|
||||||
{% tablericon "chart-bar-popular" "Popular" %}
|
<a class="article" href="/posts">
|
||||||
Popular posts
|
{% tablericon "chart-bar-popular" "Popular" %}
|
||||||
|
Popular posts
|
||||||
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
<ol type="1">
|
<ol type="1">
|
||||||
{%- for post in popularPosts limit: 5 -%}
|
{%- for post in popularPosts limit: 5 -%}
|
|
@ -1,8 +1,10 @@
|
||||||
{%- if links.size > 0 -%}
|
{%- if links.size > 0 -%}
|
||||||
<article>
|
<article>
|
||||||
<h3 class="link">
|
<h3>
|
||||||
{% tablericon "link" "Links" %}
|
<a class="link" href="/links">
|
||||||
Recent links
|
{% tablericon "link" "Links" %}
|
||||||
|
Recent links
|
||||||
|
</a>
|
||||||
</h3>
|
</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for link in links limit: 5 -%}
|
{%- for link in links limit: 5 -%}
|
|
@ -51,6 +51,6 @@ schema: blog
|
||||||
shows: post.shows
|
shows: post.shows
|
||||||
%}
|
%}
|
||||||
{% render "blocks/banners/coffee.liquid" %}
|
{% 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>
|
</div>
|
||||||
</article>
|
</article>
|
Reference in a new issue