Added featured cases to index, other improvements

This commit is contained in:
Nathan Schneider
2025-06-26 11:34:30 -07:00
parent dfda606591
commit aea2038ba5
54 changed files with 349 additions and 5 deletions

View File

@@ -1,7 +1,14 @@
{{ define "main" }}
<article>
<header class="article-header">
{{ if .Params.image }}
{{ if .Params.banner }}
<div class="article-banner">
<img src="{{ .Params.banner }}" alt="{{ .Title }} banner" class="case-detail-banner" />
{{ if .Params.image }}
<img src="{{ .Params.image }}" alt="{{ .Title }} logo" class="case-detail-logo-overlay" />
{{ end }}
</div>
{{ else if .Params.image }}
<img src="{{ .Params.image }}" alt="{{ .Title }} logo" class="case-detail-logo" />
{{ end }}
<h1>{{ .Title }}</h1>
@@ -100,5 +107,34 @@
color: var(--text-primary);
transform: translateY(-1px);
}
.article-banner {
position: relative;
margin-bottom: 2rem;
border-radius: 16px;
overflow: hidden;
aspect-ratio: 16/9;
max-height: 300px;
}
.case-detail-banner {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.case-detail-logo-overlay {
position: absolute;
bottom: 20px;
right: 20px;
width: 96px;
height: 96px;
object-fit: contain;
background: rgba(255, 255, 255, 0.95);
border-radius: 16px;
padding: 12px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
</style>
{{ end }}