Val's Dreamscape Journal - initial

This commit is contained in:
Chen Gu
2026-04-23 12:20:19 +08:00
commit 4423c3a648
18 changed files with 1077 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
{{- partial "head.html" . -}}
</head>
<body class="{{ if .IsHome }}home{{ else }}page{{ end }}">
{{- partial "header.html" . -}}
<main>
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@@ -0,0 +1,16 @@
{{ define "main" }}
<div class="page-header">
<h1>{{ .Title | default .Section | title }}</h1>
{{ if .Content }}<div class="section-desc">{{ .Content }}</div>{{ end }}
</div>
<div class="list">
{{ range .Paginator.Pages }}
<article class="list-item">
<time>{{ .Date.Format "2006-01-02" }}</time>
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<p>{{ .Summary | truncate 100 }}</p>
</article>
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,19 @@
{{ define "main" }}
<div class="page-header">
<h1>{{ .Title }}</h1>
{{ if .Params.subtitle }}<p class="subtitle">{{ .Params.subtitle }}</p>{{ end }}
<div class="meta">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006年01月02日" }}</time>
{{ with .Params.tags }}<span class="tags">{{ range . }}<span class="tag">{{ . }}</span>{{ end }}</span>{{ end }}
</div>
</div>
<article class="article">
{{ .Content }}
</article>
<nav class="post-nav">
{{ with .PrevInSection }}<a href="{{ .RelPermalink }}" class="prev">← {{ .Title }}</a>{{ end }}
{{ with .NextInSection }}<a href="{{ .RelPermalink }}" class="next">{{ .Title }} →</a>{{ end }}
</nav>
{{ end }}

View File

@@ -0,0 +1,32 @@
{{ define "main" }}
<div class="home">
<section class="hero">
<h1 class="hero-title">{{ .Site.Title }}</h1>
<p class="hero-subtitle">{{ .Site.Params.description }}</p>
</section>
{{ $sections := slice "journey" "sketch" "gallery" "essay" }}
{{ range $sections }}
{{ $pages := where $.Site.RegularPages "Section" . }}
{{ if $pages }}
<section class="section">
<h2 class="section-title">
<a href="/{{ . }}/">{{ . | title }} · {{ len $pages }}</a>
</h2>
<div class="card-grid">
{{ range first 3 $pages }}
<article class="card">
<div class="card-meta">
<time>{{ .Date.Format "2006-01-02" }}</time>
{{ with .Params.tags }}<span class="tags">{{ range . }}<span class="tag">{{ . }}</span>{{ end }}</span>{{ end }}
</div>
<h3 class="card-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<p class="card-summary">{{ .Summary | truncate 120 }}</p>
</article>
{{ end }}
</div>
</section>
{{ end }}
{{ end }}
</div>
{{ end }}

View File

@@ -0,0 +1,3 @@
<footer class="site-footer">
<p>&copy; {{ now.Year }} {{ .Site.Params.author }} · {{ .Site.Title }}</p>
</footer>

View File

@@ -0,0 +1,3 @@
<meta name="theme-color" content="#1a1a2e">
<link rel="stylesheet" href="/css/style.css">
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | relURL }}">

View File

@@ -0,0 +1,8 @@
<header class="site-header">
<a href="/" class="logo">{{ .Site.Title }}</a>
<nav>
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</header>