fix: h3 for cards on home, improve card-blog include by setting scoped defaults
This commit is contained in:
parent
0b277fd5f2
commit
7f66c709ca
3 changed files with 8 additions and 14 deletions
|
|
@ -1,12 +1,13 @@
|
|||
{% set headingLevel = headingLevel | default("h2") %}
|
||||
{% set definedDate = definedDate | default(item.date) %}
|
||||
{% set showTags = showTags | default(true) %}
|
||||
|
||||
<custom-card clickable>
|
||||
<h2 slot="headline" class="text-step-2">
|
||||
<{{ headingLevel }} slot="headline" class="text-step-2">
|
||||
<a href="{{ item.url | url }}">{{ item.data.title }}</a>
|
||||
</h2>
|
||||
</{{ headingLevel }}>
|
||||
<span slot="date"> {% include "partials/date.njk" %} </span>
|
||||
{%
|
||||
if
|
||||
item.data.tags.length > 1
|
||||
%}
|
||||
{% if showTags and item.data.tags.length > 1 %}
|
||||
<div slot="tag" webc:nokeep>
|
||||
{% for tag in item.data.tags %}
|
||||
{% if tag != "posts" %}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ permalink: 'blog/{% if pagination.pageNumber >=1 %}page-{{ pagination.pageNumber
|
|||
|
||||
<custom-masonry layout="50-50">
|
||||
{% asyncEach item in pagination.items %}
|
||||
{% set definedDate = item.date %}
|
||||
|
||||
{% include "partials/card-blog.njk" %}
|
||||
{% endeach %}
|
||||
</custom-masonry>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ blog:
|
|||
<div class="section__inner flow region">
|
||||
<h1 class="text-center" style="color: var(--color-light);">{{ title }}</h1>
|
||||
</div>
|
||||
|
||||
{% svg "divider/waves", null, "seperator" %}
|
||||
</header>
|
||||
|
||||
|
|
@ -38,18 +37,14 @@ blog:
|
|||
<section class="full | region">
|
||||
<div class="wrapper flow prose">
|
||||
<h2>{{ blog.title }}</h2>
|
||||
<!-- blog intro text is optional. -->
|
||||
|
||||
{% if blog.intro %}
|
||||
<p>{{ blog.intro }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="feature | region region-space-l">
|
||||
<custom-masonry layout="50-50">
|
||||
<!-- loop posts -->
|
||||
{% set itemList = collections.allPosts %}
|
||||
{% asyncEach item in itemList.slice(0, 4) %}
|
||||
{% set definedDate = item.date %}
|
||||
{% set headingLevel = "h3" %}
|
||||
{% include "partials/card-blog.njk" %}
|
||||
{% endeach %}
|
||||
</custom-masonry>
|
||||
|
|
|
|||
Loading…
Reference in a new issue