feat: Textkarten mit Overlay-Zeitstempel + klickbar
- Text-only cards now use .story-time-overlay like media cards - Overlay positioned top-right within .card-content (position:relative) - Cards wrapped in <a> link → klick öffnet /beitrag/ID - .card-link styles mit hover-Effekt (gleicher Lift wie .story-card) - left:auto für Text-Overlay (resetet left:8px der Basis-Regel)
This commit is contained in:
@@ -1753,13 +1753,29 @@ def public_frontend():
|
||||
time_block = ""
|
||||
if time_html:
|
||||
time_overlay = f'<div class="story-time-overlay">{time_html}</div>'
|
||||
if media_first:
|
||||
time_block = time_overlay
|
||||
else:
|
||||
time_block = f'<div class="story-time">{time_html}</div>'
|
||||
time_block = time_overlay # Always overlay now
|
||||
elif not media_first:
|
||||
time_block = f'<div class="story-time">{date_str}</div>'
|
||||
cards += f"""<article class="story-card{text_only_class}">
|
||||
time_block = ''
|
||||
|
||||
if not media_first:
|
||||
# Text-only card: link-wrapped, time overlay inside card-content
|
||||
cards += f"""<a href="/beitrag/{r['id']}" class="card-link">
|
||||
<article class="story-card text-only">
|
||||
""" + (f'<div class="story-halle-badge">📍 {r["halle"]}</div>' if r["halle"] else '') + """
|
||||
""" + (f'<div class="story-ausverkauft-badge">🚫 AUSVERKAUFT: {r["spiel_titel"]}</div>' if r["category"] == "ausverkauft" and r["spiel_titel"] else '') + """
|
||||
<div class="card-content">
|
||||
""" + time_block + """
|
||||
<div class="story-meta">
|
||||
<span class="story-type">""" + type_emoji + """</span>
|
||||
<span class="story-author">""" + name + """</span>
|
||||
</div>
|
||||
<p class="story-preview">""" + preview + """</p>
|
||||
</div>
|
||||
</article>
|
||||
</a>"""
|
||||
else:
|
||||
# Media card: existing structure
|
||||
cards += f"""<article class="story-card">
|
||||
""" + media_first + time_block + """
|
||||
""" + (f'<div class="story-halle-badge">📍 {r["halle"]}</div>' if r["halle"] else '') + """
|
||||
""" + (f'<div class="story-ausverkauft-badge">🚫 AUSVERKAUFT: {r["spiel_titel"]}</div>' if r["category"] == "ausverkauft" and r["spiel_titel"] else '') + """
|
||||
@@ -1797,9 +1813,14 @@ def public_frontend():
|
||||
/* Main grid — masonry (CSS columns) */
|
||||
.main-grid { max-width:1300px; margin:1.5rem auto; padding:0 1rem; column-count:4; column-gap:1.2rem; }
|
||||
|
||||
/* Card link wrapper (text-only) */
|
||||
.card-link { text-decoration:none; color:inherit; display:inline-block; width:100%; margin-bottom:1.2rem; break-inside:avoid; }
|
||||
.card-link:hover .story-card { transform:translateY(-3px); box-shadow:0 8px 32px rgba(0,0,0,0.18),0 3px 10px rgba(0,0,0,0.08); }
|
||||
|
||||
/* Card — masonry tiles, compact */
|
||||
.story-card { background:#fff; border-radius:14px; overflow:hidden; box-shadow:0 4px 18px rgba(0,0,0,0.10),0 1px 4px rgba(0,0,0,0.05); transition:box-shadow 0.25s ease,transform 0.2s ease; display:inline-block; width:100%; margin-bottom:1.2rem; break-inside:avoid; }
|
||||
.story-card:hover { transform:translateY(-3px); box-shadow:0 8px 32px rgba(0,0,0,0.18),0 3px 10px rgba(0,0,0,0.08); }
|
||||
a.card-link .story-card { margin-bottom:0; }
|
||||
.story-card img { width:100%; height:100%; object-fit:cover; display:block; }
|
||||
.story-card video { width:100%; height:auto; max-height:600px; object-fit:contain; display:block; background:#000; }
|
||||
.story-card { position:relative; }
|
||||
@@ -1816,7 +1837,8 @@ def public_frontend():
|
||||
.story-time-overlay .story-time-rel { color:#dc3545; }
|
||||
.story-preview { display:none; }
|
||||
.text-only .story-preview { display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; text-overflow:ellipsis; font-size:0.8rem; line-height:1.4; color:#444; margin-bottom:0.35rem; }
|
||||
.text-only .card-content { padding:0.55rem 0.85rem 0.65rem; }
|
||||
.text-only .card-content { position:relative; padding:0.55rem 0.85rem 0.65rem; }
|
||||
.text-only .story-time-overlay { position:absolute; top:0.45rem; right:0.6rem; left:auto; z-index:5; }
|
||||
|
||||
/* Frontend filter bar */
|
||||
.frontend-filter { max-width:1100px; margin:1rem auto 0; padding:0 1.5rem; display:flex; gap:0.4rem; flex-wrap:wrap; align-items:center; }
|
||||
|
||||
Reference in New Issue
Block a user