wide cards in odd/even rows are now displayed differently

This commit is contained in:
eclipse 2025-02-12 12:16:32 +01:00
parent d16d5a4b23
commit 8a5749ed22
3 changed files with 13 additions and 12 deletions

View File

@ -1,11 +1,16 @@
--- ---
title: Kurzprosa title: Kurzprosa
author: Tobias Radloff author: Tobias Radloff
summary: Meine Kurzgeschichten und Erzählungen summary: Kurzgeschichten und Erzählungen
lang: de lang: de
category: Kurzprosa category: Kurzprosa
template: cards template: cards
card_selector_key: category card_selector_key: category
save_as: kurzprosa/index.html save_as: kurzprosa/index.html
url: kurzprosa/ url: kurzprosa/
featured_images:
- pic: images/kurzprosa/blinde-flecken.jpg
post: kurzprosa/blinde-flecken.html
alt: Blinde Flecken
y_offset: 65%
--- ---

View File

@ -277,7 +277,7 @@ a {
/* see https://www.smashingmagazine.com/2012/04/pure-css3-cycling-slideshow/ */ /* see https://www.smashingmagazine.com/2012/04/pure-css3-cycling-slideshow/ */
.wcard { .wcard {
display: flex; display: flex;
flex-flow: row wrap; flex-flow: wrap;
column-gap: calc(var(--pico-nav-element-spacing-horizontal) * 2); column-gap: calc(var(--pico-nav-element-spacing-horizontal) * 2);
.wcard-gallery { .wcard-gallery {
@ -318,7 +318,6 @@ a {
animation: image-slide 20s ease-in-out infinite; animation: image-slide 20s ease-in-out infinite;
left: -100%; left: -100%;
opacity: 0; opacity: 0;
z-index: 0;
a { a {
display: block; display: block;
@ -363,20 +362,17 @@ a {
31% { 31% {
left: -100%; left: -100%;
opacity: 0; opacity: 0;
z-index: 0;
} }
5%, 5%,
25% { 25% {
left: 0px; left: 0px;
opacity: 1; opacity: 1;
z-index: 1;
} }
30% { 30% {
left: 100%; left: 100%;
opacity: 0; opacity: 0;
z-index: 0;
} }
} }

View File

@ -8,20 +8,20 @@ original order #}
{% do wcards.append(pages | selectattr("slug", "==", wide_card) | list | first) if pages | selectattr("slug", "==", {% do wcards.append(pages | selectattr("slug", "==", wide_card) | list | first) if pages | selectattr("slug", "==",
wide_card) | list | first is defined %} wide_card) | list | first is defined %}
{% endfor %} {% endfor %}
{# now we can finally iterate over the corcect pages #} {# now we can finally iterate over the correct pages (max. 4 pages) #}
{% for wcard in wcards %} {% for wcard in wcards[:4] %}
<article class="wcard"> <article class="wcard" style="flex-direction: {{ loop.cycle('row', 'row-reverse') }};">
<div class="wcard-title"> <div class="wcard-title">
<h2><a href="{{ SITEURL }}/{{ wcard.title|lower }}/">{{ wcard.title }}</a></h2> <h2><a href="{{ SITEURL }}/{{ wcard.title|lower }}/" title="{{ wcard.summary | striptags }}"> {{- wcard.title }}</a></h2>
</div> </div>
<div class="wcard-gallery"> <div class="wcard-gallery">
{% if wcard.featured_images is defined %} {% if wcard.featured_images is defined %}
<div class="wcard-gallery-mask"> <div class="wcard-gallery-mask">
<ul> <ul>
{% for image in wcard.featured_images %} {% for image in wcard.featured_images %}
<li class="wcard-image" style="animation-delay: {{ loop.index0 * 5 }}s"> <li class="wcard-image" style="animation-delay: {{ loop.index0 * 5 }}s;">
<a href="{{ SITEURL }}/{{ image.post }}"> <a href="{{ SITEURL }}/{{ image.post }}">
<img src="{{ SITEURL }}/{{ image.pic }}" alt="{{ image.alt }}" {% if image.y_offset is defined %}style="bottom: {{ image.y_offset }};" {% endif %} /> <img src="{{ SITEURL }}/{{ image.pic }}" alt="{{ image.alt }}" {%- if image.y_offset is defined %} style="bottom: {{ image.y_offset }};" {% endif %} />
</a> </a>
<div class="wcard-tooltip"> <div class="wcard-tooltip">
<p>{{ image.alt }}</p> <p>{{ image.alt }}</p>