feat: simplify pill
class usage
This commit is contained in:
parent
72b80f7e8f
commit
c2471ea467
8 changed files with 55 additions and 138 deletions
|
@ -1,29 +1,21 @@
|
|||
{% macro one(post, format = "MM/DD") %}
|
||||
<article class="[ posts-list-item column-gap-0.5 justify-between line-height-l ]">
|
||||
<a href="{{ post.url }}">{{ post.data.title }}</a>
|
||||
<time datetime="{{ post.date }}" class="[ text-fadeText ]">{{ post.date | formatDate(format) }}</time>
|
||||
<p class="[ text-fadeText font-size-s line-height-m ]">{{ post.data.excerpt }}</p>
|
||||
</article>
|
||||
<article class="[ posts-list-item column-gap-0.5 justify-between line-height-l ]">
|
||||
<a href="{{ post.url }}">{{ post.data.title }}</a>
|
||||
<time datetime="{{ post.date }}" class="[ text-fadeText ]">{{ post.date | formatDate(<built-in function format>) }}</time>
|
||||
<p class="[ text-fadeText font-size-s line-height-m ]">{{ post.data.excerpt }}</p>
|
||||
</article>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro list(posts, format = "MM/DD") %}
|
||||
<ol class="[ flow p-0 ]" role="list">
|
||||
{% for post in posts %}
|
||||
<li class="[ flow-space-0.5 ]">
|
||||
{{ one(post, format) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
<ol class="[ flow p-0 ]" role="list">
|
||||
{% for post in posts %}<li class="[ flow-space-0.5 ]">{{ one(post, format) }}</li>{% endfor %}
|
||||
</ol>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro yearList(posts, year, format = "MM/DD") %}
|
||||
<section class="[ flow ]">
|
||||
<header class="[ cluster gap-0.5 ]">
|
||||
<h2>{{ year }}</h2>
|
||||
<p class="[ pill ]" data-state="extrasmall">
|
||||
{{ posts | length }}
|
||||
</p>
|
||||
</header>
|
||||
{{ list(posts, format) }}
|
||||
</section>
|
||||
<section class="[ flow ]">
|
||||
<header class="[ cluster gap-0.5 ]">
|
||||
<h2>{{ year }}</h2>
|
||||
<p class="[ pill ]">{{ posts | length }}</p>
|
||||
</header>
|
||||
{{ list(posts, format) }}
|
||||
</section>
|
||||
{% endmacro %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue