fix: correct tag display

feat/integration_ideo
Nicolas Doby 2022-10-27 15:02:13 +02:00
parent 55129557ee
commit c99ee8e7bc
3 changed files with 39 additions and 22 deletions

View File

@ -5,13 +5,17 @@
<h2> <h2>
<a href="{{ post.url }}" class="post-list-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a> <a href="{{ post.url }}" class="post-list-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
</h2> </h2>
<ul class="post-metadata"> <div class="post-metadata">
<li class="post-metadata__header">Le <time datetime="{{ post.data.date | htmlDateString }}">{{ post.data.date | readableDate }}</time> {{ post.data.authors | readableAuthors }}</li> <div>
{%- for tag in post.data.tags | filterTagList %} Le <time datetime="{{ post.data.date | htmlDateString }}">{{ post.data.date | readableDate }}</time> {{ post.data.authors | readableAuthors }}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} </div>
<li><a href="{{ tagUrl }}" class="post-tag">#{{ tag }}</a>{%- if not loop.last %} {% endif %}</li> <ul >
{%- endfor %} {%- for tag in post.data.tags | filterTagList %}
</ul> {%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">#{{ tag }}</a>{%- if not loop.last %} {% endif %}</li>
{%- endfor %}
</ul>
</div>
</header> </header>
<p>{{ post.data.resume }}</p> <p>{{ post.data.resume }}</p>
<footer class="post-list-footer"> <footer class="post-list-footer">

View File

@ -4,15 +4,17 @@ templateClass: tmpl-post
--- ---
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
<ul class="post-metadata"> <div class="post-metadata">
<li class="post-metadata__header"> <div class="post-metadata__header">
Le <time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time> {{ authors | readableAuthors }} Le <time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time> {{ authors | readableAuthors }}
</li> </div>
{%- for tag in tags | filterTagList %} <ul>
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} {%- for tag in tags | filterTagList %}
<li><a href="{{ tagUrl }}" class="post-tag">#{{ tag }}</a>{%- if not loop.last %} {% endif %}</li> {%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
{%- endfor %} <li><a href="{{ tagUrl }}" class="post-tag">#{{ tag }}</a>{%- if not loop.last %} {% endif %}</li>
</ul> {%- endfor %}
</ul>
</div>
{{ content | safe }} {{ content | safe }}

View File

@ -269,22 +269,26 @@ figure figcaption {
.post-metadata { .post-metadata {
display: flex; display: flex;
gap: .5em; gap: .5em;
list-style: none; font-size: 0.8125rem; /* 13px /16 */
padding: 0; color: var(--text-color-sub);
margin: 0;
} }
.post-list .post-metadata { .post-list .post-metadata {
flex-direction: column; flex-direction: column;
} }
.post-metadata ul {
display: flex;
gap: .5em;
list-style: none;
padding: 0;
margin: 0;
}
h1 + .post-metadata { h1 + .post-metadata {
margin: 0 0 4rem; margin: 0 0 4rem;
} }
.post-list time {
font-size: 0.8125rem; /* 13px /16 */
color: var(--text-color-sub);
}
.post-metadata .post-metadata__header { .post-metadata .post-metadata__header {
flex-grow: 1; flex-grow: 1;
font-size: 0.8125rem; /* 13px /16 */ font-size: 0.8125rem; /* 13px /16 */
@ -424,6 +428,13 @@ pre[class*="language-diff-"] {
padding-left: 0; padding-left: 0;
padding-top: 5rem; padding-top: 5rem;
} }
h1 + .post-metadata {
flex-direction: column;
}
h1 + .post-metadata ul {
flex-wrap: wrap;
}
.main-footer { .main-footer {
flex-direction: column-reverse; flex-direction: column-reverse;
height: auto; height: auto;