Turn the blog into a project landing page
Build and deploy the poweronoff.click hugo / build (push) Successful in 45s
Build and deploy the poweronoff.click hugo / build (push) Successful in 45s
The site is now a single page introducing Stan and listing his projects, with a short description and a link for each. Blog posts, the about page, the post archetype and the new-post helper are gone (git history keeps them). The Impressum and Datenschutzerklärung stay: they are legally required and the footer links to them. Projects are data-driven: - data/projects.yaml: name, url, description, optional status/tags - layouts/shortcodes/projects.html: renders cards and fails the build when a required field is missing or the URL is not absolute - layouts/_partials/extend_head.html: card CSS using PaperMod variables, so light/dark keeps working; no theme fork First entry is Berlin Crime Stories, described from its own site (German crime stories set in Berlin, published in German/English/Russian). Config: site title and copy retargeted to projects, homeInfoParams/menu/social icons/pagination/search output removed, taxonomies disabled (no posts), locale set to de so html lang and og:locale are German. make check now also asserts that the cards, the Berlin Crime Stories link and both legal pages exist, and make new-project documents how to add one.
This commit is contained in:
1 parent
d59b91c4bd
commit
ae2aab5753
15 files changed
+259
-390
No files matched your search
@@ -0,0 +1,85 @@
|
||||
{{- /* Custom head content. Kept minimal on purpose: the only thing we add is
|
||||
styling for the project cards rendered by layouts/shortcodes/projects.html.
|
||||
PaperMod calls this partial from its own head.html, so no theme fork. */ -}}
|
||||
|
||||
{{- if .IsHome }}
|
||||
<style>
|
||||
.projects {
|
||||
margin: 2rem 0 1rem;
|
||||
}
|
||||
|
||||
.project-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 1rem;
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
.project-card {
|
||||
background: var(--entry);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 1.3rem 1.4rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: transform 0.15s ease, border-color 0.15s ease;
|
||||
}
|
||||
|
||||
.project-card:hover {
|
||||
border-color: var(--secondary);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.project-header {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.project-header h3 {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.project-status {
|
||||
flex-shrink: 0;
|
||||
font-size: 0.72rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.06em;
|
||||
color: var(--secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
padding: 0.1rem 0.55rem;
|
||||
}
|
||||
|
||||
.project-description {
|
||||
color: var(--secondary);
|
||||
line-height: 1.65;
|
||||
margin: 0.75rem 0 1rem;
|
||||
}
|
||||
|
||||
.project-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.4rem;
|
||||
list-style: none;
|
||||
margin: 0 0 1rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.project-tags li {
|
||||
font-size: 0.78rem;
|
||||
color: var(--secondary);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 999px;
|
||||
padding: 0.1rem 0.55rem;
|
||||
}
|
||||
|
||||
.project-link {
|
||||
margin-top: auto;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{- /* Renders the project cards on the landing page from data/projects.yaml.
|
||||
Validates the data so a broken entry fails the build instead of shipping
|
||||
an empty card. Styling lives in layouts/_partials/extend_head.html. */ -}}
|
||||
|
||||
{{- with hugo.Data.projects -}}
|
||||
<section id="projekte" class="projects">
|
||||
<h2>Projekte</h2>
|
||||
<div class="project-grid">
|
||||
{{- range $project := . }}
|
||||
{{- if or (not $project.name) (not $project.url) (not $project.description) }}
|
||||
{{- errorf "data/projects.yaml: entry %q needs name, url and description" (default "<unnamed>" $project.name) }}
|
||||
{{- end }}
|
||||
{{- if not (hasPrefix $project.url "http") }}
|
||||
{{- errorf "data/projects.yaml: %q must use an absolute http(s) url, got %q" $project.name $project.url }}
|
||||
{{- end }}
|
||||
<article class="project-card">
|
||||
<header class="project-header">
|
||||
<h3><a href="{{ $project.url }}">{{ $project.name }}</a></h3>
|
||||
{{- with $project.status }}
|
||||
<span class="project-status">{{ . }}</span>
|
||||
{{- end }}
|
||||
</header>
|
||||
<p class="project-description">{{ $project.description }}</p>
|
||||
{{- with $project.tags }}
|
||||
<ul class="project-tags">
|
||||
{{- range . }}
|
||||
<li>{{ . }}</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
{{- end }}
|
||||
<a class="project-link" href="{{ $project.url }}">Projekt ansehen →</a>
|
||||
</article>
|
||||
{{- end }}
|
||||
</div>
|
||||
</section>
|
||||
{{- else -}}
|
||||
{{- errorf "data/projects.yaml is missing or empty" -}}
|
||||
{{- end -}}
|
||||
Reference in new issue
Block a user