mirror of
https://github.com/welpo/tabi.git
synced 2025-12-17 04:48:44 +01:00
refactor(posts): make meta column width adaptable
The meta column of the blogposts list was fixed to 13.5rem. I can be annoying when displaying something else but a date as it was initially planned. Width set to 13.5rem has been kept when displaying a date to avoid any regression. Nevertheless, it is possible to get rid of it in the future if needed. Feed has been adapted accordingly.
This commit is contained in:
parent
769d5a373f
commit
506a4a86e5
3 changed files with 56 additions and 31 deletions
|
|
@ -6,14 +6,15 @@
|
|||
{% for post in posts %}
|
||||
{% if loop.index <= max %}
|
||||
{% if loop.index == max %}
|
||||
<section class="bloglist-row">
|
||||
{% set bottom_divider = false %}
|
||||
{% elif loop.last %}
|
||||
<section class="bloglist-row">
|
||||
{% set bottom_divider = false %}
|
||||
{% else %}
|
||||
<section class="bloglist-row bottom-divider">
|
||||
{% set bottom_divider = true %}
|
||||
{% endif %}
|
||||
|
||||
<ul class="bloglist-meta">
|
||||
<section class="bloglist-meta {% if bottom_divider -%}bottom-divider{%- endif -%}">
|
||||
<ul>
|
||||
{%- set allowed_post_listing_dates = ["date", "updated", "both"] -%}
|
||||
{%- set post_listing_date = config.extra.post_listing_date | default(value="date") -%}
|
||||
{%- if post_listing_date not in allowed_post_listing_dates -%}
|
||||
|
|
@ -42,7 +43,9 @@
|
|||
<li class="draft-label">{{ macros_translate::translate(key="draft", default="DRAFT", language_strings=language_strings) }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="bloglist-content">
|
||||
</section>
|
||||
<section class="bloglist-content {% if bottom_divider -%}bottom-divider{%- endif -%}">
|
||||
<div>
|
||||
<h2 class="bloglist-title">
|
||||
<a href="{{ post.permalink }}">{{ post.title }}</a>
|
||||
</h2>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue