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>

View File

@@ -0,0 +1,241 @@
/* Dreamscape Theme — Val's Journal */
:root {
--bg: #0a0a1a;
--bg2: #12122a;
--surface: #1a1a3e;
--text: #e0e0f0;
--text2: #9090b0;
--accent: #7b68ee;
--accent2: #9370db;
--glow: rgba(123,104,238,0.15);
--radius: 8px;
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
line-height: 1.7;
min-height: 100vh;
}
/* --- Header --- */
.site-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
border-bottom: 1px solid rgba(123,104,238,0.15);
background: var(--bg2);
backdrop-filter: blur(10px);
position: sticky;
top: 0;
z-index: 100;
}
.logo {
font-size: 1.1rem;
font-weight: 700;
color: var(--accent);
text-decoration: none;
letter-spacing: 0.5px;
}
.site-header nav a {
color: var(--text2);
text-decoration: none;
margin-left: 1.5rem;
font-size: 0.9rem;
transition: color 0.2s;
}
.site-header nav a:hover { color: var(--accent); }
/* --- Main --- */
main {
max-width: 900px;
margin: 0 auto;
padding: 2rem;
}
/* --- Hero --- */
.hero {
text-align: center;
padding: 4rem 0 2rem;
}
.hero-title {
font-size: 2.2rem;
font-weight: 800;
background: linear-gradient(135deg, var(--accent), #b388ff, var(--accent2));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
}
.hero-subtitle {
color: var(--text2);
font-size: 1rem;
}
/* --- Sections --- */
.section { margin-top: 3rem; }
.section-title {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid rgba(123,104,238,0.2);
}
.section-title a { color: var(--accent); text-decoration: none; }
/* --- Cards --- */
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 1rem;
}
.card {
background: var(--surface);
border-radius: var(--radius);
padding: 1.2rem;
border: 1px solid rgba(123,104,238,0.1);
transition: border-color 0.2s, transform 0.15s;
}
.card:hover {
border-color: rgba(123,104,238,0.3);
transform: translateY(-2px);
}
.card-meta {
font-size: 0.75rem;
color: var(--text2);
margin-bottom: 0.5rem;
}
.card-title {
font-size: 1rem;
margin-bottom: 0.4rem;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-summary { font-size: 0.85rem; color: var(--text2); }
/* --- Tags --- */
.tags { margin-left: 0.5rem; }
.tag {
display: inline-block;
font-size: 0.7rem;
background: var(--glow);
color: var(--accent);
padding: 1px 8px;
border-radius: 10px;
margin-right: 4px;
}
/* --- Article --- */
.page-header { margin-bottom: 2rem; }
.page-header h1 {
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 0.3rem;
}
.page-header .meta {
font-size: 0.85rem;
color: var(--text2);
margin-top: 0.5rem;
}
.article { line-height: 1.8; }
.article h2 { font-size: 1.4rem; margin: 2rem 0 1rem; color: var(--accent); }
.article h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
.article p { margin-bottom: 1rem; }
.article a { color: var(--accent); }
.article img { max-width: 100%; border-radius: var(--radius); }
.article blockquote {
border-left: 3px solid var(--accent);
padding-left: 1rem;
margin: 1rem 0;
color: var(--text2);
font-style: italic;
}
.article pre {
background: var(--bg2);
border: 1px solid rgba(123,104,238,0.15);
border-radius: var(--radius);
padding: 1rem;
overflow-x: auto;
margin: 1rem 0;
font-size: 0.85rem;
}
.article code {
background: var(--bg2);
padding: 2px 6px;
border-radius: 4px;
font-size: 0.9em;
}
/* --- List --- */
.list-item {
padding: 1rem 0;
border-bottom: 1px solid rgba(123,104,238,0.1);
}
.list-item time {
font-size: 0.8rem;
color: var(--text2);
}
.list-item h3 {
font-size: 1.1rem;
margin: 0.3rem 0;
}
.list-item h3 a { color: var(--text); text-decoration: none; }
.list-item h3 a:hover { color: var(--accent); }
.list-item p { font-size: 0.85rem; color: var(--text2); }
/* --- Post Nav --- */
.post-nav {
display: flex;
justify-content: space-between;
margin-top: 3rem;
padding-top: 1rem;
border-top: 1px solid rgba(123,104,238,0.15);
}
.post-nav a { color: var(--accent2); text-decoration: none; font-size: 0.9rem; }
.post-nav a:hover { color: var(--accent); }
/* --- Footer --- */
.site-footer {
text-align: center;
padding: 2rem;
color: var(--text2);
font-size: 0.8rem;
border-top: 1px solid rgba(123,104,238,0.1);
margin-top: 4rem;
}
/* --- Responsive --- */
@media (max-width: 640px) {
.site-header { padding: 0.8rem 1rem; }
.site-header nav a { margin-left: 1rem; font-size: 0.8rem; }
main { padding: 1rem; }
.hero { padding: 2rem 0 1rem; }
.hero-title { font-size: 1.6rem; }
.card-grid { grid-template-columns: 1fr; }
}