Unify post and event cards to one style on the home page
This commit is contained in:
1 parent
4fa17429b5
commit
43e6ed7743
6 files changed
+67
-76
No files matched your search
@@ -7,15 +7,16 @@
|
||||
@foreach (var ev in _upcomingEvents)
|
||||
{
|
||||
<li>
|
||||
<EventDate Value="ev" />
|
||||
<span class="event-title">@ev.Title</span>
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Location))
|
||||
{
|
||||
<span class="event-location">@ev.Location</span>
|
||||
}
|
||||
<a class="card-link" href="/events">
|
||||
<span class="event-title">@ev.Title</span>
|
||||
<EventDate Value="ev" />
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Location))
|
||||
{
|
||||
<span class="event-location">@ev.Location</span>
|
||||
}
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
<p class="embed-more"><a href="/events">Alle Termine <span aria-hidden="true">→</span></a></p>
|
||||
</section>
|
||||
}
|
||||
@@ -7,11 +7,12 @@
|
||||
@foreach (var post in _latest)
|
||||
{
|
||||
<li>
|
||||
<a href="@($"/posts/{post.Slug}")">@post.Title</a>
|
||||
<PostDate Value="post.Date" />
|
||||
<a class="card-link" href="@($"/posts/{post.Slug}")">
|
||||
<span class="post-title">@post.Title</span>
|
||||
<PostDate Value="post.Date" />
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
<p class="embed-more"><a href="/posts">Alle Beiträge <span aria-hidden="true">→</span></a></p>
|
||||
</section>
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
/* The date's own look: small and softened, matching <PostDate> so post and event
|
||||
cards read as one style. Lives with the component so every place that renders
|
||||
<EventDate> (list, home embed) shows the date the same way. Positioning (margin
|
||||
to neighbours) is NOT set here -- that is the surrounding list's job. */
|
||||
time {
|
||||
display: block;
|
||||
color: var(--color-text-soft); /* token, so it adapts in dark mode */
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
@@ -39,16 +39,18 @@ else
|
||||
@foreach (var ev in _upcomingEvents)
|
||||
{
|
||||
<li>
|
||||
<EventDate Value="ev" />
|
||||
<span class="event-title">@ev.Title</span>
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Location))
|
||||
{
|
||||
<span class="event-location">@ev.Location</span>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Note))
|
||||
{
|
||||
<p class="event-note">@ev.Note</p>
|
||||
}
|
||||
<a class="card-link" href="/events">
|
||||
<span class="event-title">@ev.Title</span>
|
||||
<EventDate Value="ev" />
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Location))
|
||||
{
|
||||
<span class="event-location">@ev.Location</span>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Note))
|
||||
{
|
||||
<p class="event-note">@ev.Note</p>
|
||||
}
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
@@ -61,12 +63,14 @@ else
|
||||
@foreach (var ev in _pastEvents)
|
||||
{
|
||||
<li>
|
||||
<EventDate Value="ev" />
|
||||
<span class="event-title">@ev.Title</span>
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Location))
|
||||
{
|
||||
<span class="event-location">@ev.Location</span>
|
||||
}
|
||||
<a class="card-link" href="/events">
|
||||
<span class="event-title">@ev.Title</span>
|
||||
<EventDate Value="ev" />
|
||||
@if (!string.IsNullOrWhiteSpace(ev.Location))
|
||||
{
|
||||
<span class="event-location">@ev.Location</span>
|
||||
}
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
@@ -29,8 +29,10 @@ else
|
||||
@foreach (var post in _posts)
|
||||
{
|
||||
<li>
|
||||
<a href="@($"/posts/{post.Slug}")">@post.Title</a>
|
||||
<PostDate Value="post.Date" />
|
||||
<a class="card-link" href="@($"/posts/{post.Slug}")">
|
||||
<span class="post-title">@post.Title</span>
|
||||
<PostDate Value="post.Date" />
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
Reference in new issue
Block a user