init: hugo site with mytheme
This commit is contained in:
0
.hugo_build.lock
Normal file
0
.hugo_build.lock
Normal file
19
content/posts/hello-world.md
Normal file
19
content/posts/hello-world.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: "Hello World"
|
||||
date: 2026-04-13
|
||||
categories: ["随笔"]
|
||||
tags: ["测试"]
|
||||
description: "茶凉小记的第一篇文章"
|
||||
---
|
||||
|
||||
欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。
|
||||
|
||||
## 关于这个博客
|
||||
|
||||
这里记录技术、生活与想法。
|
||||
|
||||
```javascript
|
||||
console.log("Hello, Hugo!");
|
||||
```
|
||||
|
||||
> 简单、纯粹、持久。
|
||||
15
hugo.toml
Normal file
15
hugo.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
baseURL = "https://ziven1220.ac.cn/"
|
||||
languageCode = "zh-CN"
|
||||
title = "茶凉小记"
|
||||
theme = "mytheme"
|
||||
|
||||
[params]
|
||||
subtitle = "记录技术、生活与想法"
|
||||
beian = "浙ICP备2023002438号"
|
||||
|
||||
[taxonomies]
|
||||
tag = "tags"
|
||||
category = "categories"
|
||||
|
||||
[build]
|
||||
writeStats = true
|
||||
47
hugo_stats.json
Normal file
47
hugo_stats.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"htmlElements": {
|
||||
"tags": [
|
||||
"a",
|
||||
"article",
|
||||
"blockquote",
|
||||
"body",
|
||||
"div",
|
||||
"footer",
|
||||
"h1",
|
||||
"h2",
|
||||
"head",
|
||||
"header",
|
||||
"html",
|
||||
"link",
|
||||
"main",
|
||||
"meta",
|
||||
"nav",
|
||||
"p",
|
||||
"pre",
|
||||
"title"
|
||||
],
|
||||
"classes": [
|
||||
"footer-inner",
|
||||
"header-inner",
|
||||
"hero-sub",
|
||||
"highlight",
|
||||
"home-hero",
|
||||
"list-title",
|
||||
"main-content",
|
||||
"post-card",
|
||||
"post-content",
|
||||
"post-list",
|
||||
"post-meta",
|
||||
"post-single",
|
||||
"post-summary",
|
||||
"post-title",
|
||||
"site-footer",
|
||||
"site-header",
|
||||
"site-nav",
|
||||
"site-title"
|
||||
],
|
||||
"ids": [
|
||||
"关于这个博客"
|
||||
]
|
||||
}
|
||||
}
|
||||
5
public/categories/index.html
Normal file
5
public/categories/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang=zh-CN data-theme=dark><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Categories - 茶凉小记</title>
|
||||
<link rel=preconnect href=https://fonts.googleapis.com><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel=stylesheet><link rel=stylesheet href=/css/main.css></head><body><header class=site-header><div class=header-inner><a href=/ class=site-title>茶凉小记</a><nav class=site-nav><a href=/>首页</a>
|
||||
<a href=/posts/>归档</a>
|
||||
<a href=/categories/>分类</a>
|
||||
<a href=/tags/>标签</a></nav></div></header><main class=main-content><div class=post-list><h1 class=list-title>Categories</h1><div class=post-card><h2><a href=/categories/%E9%9A%8F%E7%AC%94/>随笔</a></h2><div class=post-meta>2026-04-13</div><p class=post-summary></p></div></div></main><footer class=site-footer><div class=footer-inner><p>© 2026 茶凉小记</p><p><a href=https://beian.miit.gov.cn target=_blank>浙ICP备2023002438号</a></p></div></footer></body></html>
|
||||
1
public/categories/index.xml
Normal file
1
public/categories/index.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Categories on 茶凉小记</title><link>https://ziven1220.ac.cn/categories/</link><description>Recent content in Categories on 茶凉小记</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 13 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ziven1220.ac.cn/categories/index.xml" rel="self" type="application/rss+xml"/><item><title>随笔</title><link>https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/</guid><description/></item></channel></rss>
|
||||
2
public/categories/page/1/index.html
Normal file
2
public/categories/page/1/index.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!doctype html><html lang=zh-CN><head><title>https://ziven1220.ac.cn/categories/</title>
|
||||
<link rel=canonical href=https://ziven1220.ac.cn/categories/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://ziven1220.ac.cn/categories/"></head></html>
|
||||
5
public/categories/随笔/index.html
Normal file
5
public/categories/随笔/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang=zh-CN data-theme=dark><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>随笔 - 茶凉小记</title>
|
||||
<link rel=preconnect href=https://fonts.googleapis.com><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel=stylesheet><link rel=stylesheet href=/css/main.css></head><body><header class=site-header><div class=header-inner><a href=/ class=site-title>茶凉小记</a><nav class=site-nav><a href=/>首页</a>
|
||||
<a href=/posts/>归档</a>
|
||||
<a href=/categories/>分类</a>
|
||||
<a href=/tags/>标签</a></nav></div></header><main class=main-content><div class=post-list><h1 class=list-title>随笔</h1><div class=post-card><h2><a href=/posts/hello-world/>Hello World</a></h2><div class=post-meta>2026-04-13 · [随笔]</div><p class=post-summary>茶凉小记的第一篇文章</p></div></div></main><footer class=site-footer><div class=footer-inner><p>© 2026 茶凉小记</p><p><a href=https://beian.miit.gov.cn target=_blank>浙ICP备2023002438号</a></p></div></footer></body></html>
|
||||
3
public/categories/随笔/index.xml
Normal file
3
public/categories/随笔/index.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>随笔 on 茶凉小记</title><link>https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/</link><description>Recent content in 随笔 on 茶凉小记</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 13 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/index.xml" rel="self" type="application/rss+xml"/><item><title>Hello World</title><link>https://ziven1220.ac.cn/posts/hello-world/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://ziven1220.ac.cn/posts/hello-world/</guid><description>欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。
|
||||
关于这个博客 这里记录技术、生活与想法。
|
||||
console.log(&#34;Hello, Hugo!&#34;); 简单、纯粹、持久。</description></item></channel></rss>
|
||||
2
public/categories/随笔/page/1/index.html
Normal file
2
public/categories/随笔/page/1/index.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!doctype html><html lang=zh-CN><head><title>https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/</title>
|
||||
<link rel=canonical href=https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/"></head></html>
|
||||
5
public/index.html
Normal file
5
public/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang=zh-CN data-theme=dark><head><meta name=generator content="Hugo 0.123.7"><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>茶凉小记</title>
|
||||
<link rel=preconnect href=https://fonts.googleapis.com><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel=stylesheet><link rel=stylesheet href=/css/main.css></head><body><header class=site-header><div class=header-inner><a href=/ class=site-title>茶凉小记</a><nav class=site-nav><a href=/>首页</a>
|
||||
<a href=/posts/>归档</a>
|
||||
<a href=/categories/>分类</a>
|
||||
<a href=/tags/>标签</a></nav></div></header><main class=main-content><div class=home-hero><h1>茶凉小记</h1><p class=hero-sub>记录技术、生活与想法</p></div><div class=post-list><div class=post-card><h2><a href=/posts/hello-world/>Hello World</a></h2><div class=post-meta>2026-04-13 · [随笔]</div><p class=post-summary>茶凉小记的第一篇文章</p></div></div></main><footer class=site-footer><div class=footer-inner><p>© 2026 茶凉小记</p><p><a href=https://beian.miit.gov.cn target=_blank>浙ICP备2023002438号</a></p></div></footer></body></html>
|
||||
3
public/index.xml
Normal file
3
public/index.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>茶凉小记</title><link>https://ziven1220.ac.cn/</link><description>Recent content on 茶凉小记</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 13 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ziven1220.ac.cn/index.xml" rel="self" type="application/rss+xml"/><item><title>Hello World</title><link>https://ziven1220.ac.cn/posts/hello-world/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://ziven1220.ac.cn/posts/hello-world/</guid><description>欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。
|
||||
关于这个博客 这里记录技术、生活与想法。
|
||||
console.log(&#34;Hello, Hugo!&#34;); 简单、纯粹、持久。</description></item></channel></rss>
|
||||
6
public/posts/hello-world/index.html
Normal file
6
public/posts/hello-world/index.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<!doctype html><html lang=zh-CN data-theme=dark><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Hello World - 茶凉小记</title>
|
||||
<link rel=preconnect href=https://fonts.googleapis.com><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel=stylesheet><link rel=stylesheet href=/css/main.css></head><body><header class=site-header><div class=header-inner><a href=/ class=site-title>茶凉小记</a><nav class=site-nav><a href=/>首页</a>
|
||||
<a href=/posts/>归档</a>
|
||||
<a href=/categories/>分类</a>
|
||||
<a href=/tags/>标签</a></nav></div></header><main class=main-content><article class=post-single><h1 class=post-title>Hello World</h1><div class=post-meta>2026-04-13 · [随笔]</div><div class=post-content><p>欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。</p><h2 id=关于这个博客>关于这个博客</h2><p>这里记录技术、生活与想法。</p><div class=highlight><pre tabindex=0 style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-javascript data-lang=javascript><span style=display:flex><span><span style=color:#a6e22e>console</span>.<span style=color:#a6e22e>log</span>(<span style=color:#e6db74>"Hello, Hugo!"</span>);
|
||||
</span></span></code></pre></div><blockquote><p>简单、纯粹、持久。</p></blockquote></div></article></main><footer class=site-footer><div class=footer-inner><p>© 2026 茶凉小记</p><p><a href=https://beian.miit.gov.cn target=_blank>浙ICP备2023002438号</a></p></div></footer></body></html>
|
||||
5
public/posts/index.html
Normal file
5
public/posts/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang=zh-CN data-theme=dark><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Posts - 茶凉小记</title>
|
||||
<link rel=preconnect href=https://fonts.googleapis.com><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel=stylesheet><link rel=stylesheet href=/css/main.css></head><body><header class=site-header><div class=header-inner><a href=/ class=site-title>茶凉小记</a><nav class=site-nav><a href=/>首页</a>
|
||||
<a href=/posts/>归档</a>
|
||||
<a href=/categories/>分类</a>
|
||||
<a href=/tags/>标签</a></nav></div></header><main class=main-content><div class=post-list><h1 class=list-title>Posts</h1><div class=post-card><h2><a href=/posts/hello-world/>Hello World</a></h2><div class=post-meta>2026-04-13 · [随笔]</div><p class=post-summary>茶凉小记的第一篇文章</p></div></div></main><footer class=site-footer><div class=footer-inner><p>© 2026 茶凉小记</p><p><a href=https://beian.miit.gov.cn target=_blank>浙ICP备2023002438号</a></p></div></footer></body></html>
|
||||
3
public/posts/index.xml
Normal file
3
public/posts/index.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Posts on 茶凉小记</title><link>https://ziven1220.ac.cn/posts/</link><description>Recent content in Posts on 茶凉小记</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 13 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ziven1220.ac.cn/posts/index.xml" rel="self" type="application/rss+xml"/><item><title>Hello World</title><link>https://ziven1220.ac.cn/posts/hello-world/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://ziven1220.ac.cn/posts/hello-world/</guid><description>欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。
|
||||
关于这个博客 这里记录技术、生活与想法。
|
||||
console.log(&#34;Hello, Hugo!&#34;); 简单、纯粹、持久。</description></item></channel></rss>
|
||||
2
public/posts/page/1/index.html
Normal file
2
public/posts/page/1/index.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!doctype html><html lang=zh-CN><head><title>https://ziven1220.ac.cn/posts/</title>
|
||||
<link rel=canonical href=https://ziven1220.ac.cn/posts/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://ziven1220.ac.cn/posts/"></head></html>
|
||||
1
public/sitemap.xml
Normal file
1
public/sitemap.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"><url><loc>https://ziven1220.ac.cn/categories/</loc><lastmod>2026-04-13T00:00:00+00:00</lastmod></url><url><loc>https://ziven1220.ac.cn/posts/hello-world/</loc><lastmod>2026-04-13T00:00:00+00:00</lastmod></url><url><loc>https://ziven1220.ac.cn/posts/</loc><lastmod>2026-04-13T00:00:00+00:00</lastmod></url><url><loc>https://ziven1220.ac.cn/tags/</loc><lastmod>2026-04-13T00:00:00+00:00</lastmod></url><url><loc>https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/</loc><lastmod>2026-04-13T00:00:00+00:00</lastmod></url><url><loc>https://ziven1220.ac.cn/</loc><lastmod>2026-04-13T00:00:00+00:00</lastmod></url><url><loc>https://ziven1220.ac.cn/categories/%E9%9A%8F%E7%AC%94/</loc><lastmod>2026-04-13T00:00:00+00:00</lastmod></url></urlset>
|
||||
5
public/tags/index.html
Normal file
5
public/tags/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang=zh-CN data-theme=dark><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Tags - 茶凉小记</title>
|
||||
<link rel=preconnect href=https://fonts.googleapis.com><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel=stylesheet><link rel=stylesheet href=/css/main.css></head><body><header class=site-header><div class=header-inner><a href=/ class=site-title>茶凉小记</a><nav class=site-nav><a href=/>首页</a>
|
||||
<a href=/posts/>归档</a>
|
||||
<a href=/categories/>分类</a>
|
||||
<a href=/tags/>标签</a></nav></div></header><main class=main-content><div class=post-list><h1 class=list-title>Tags</h1><div class=post-card><h2><a href=/tags/%E6%B5%8B%E8%AF%95/>测试</a></h2><div class=post-meta>2026-04-13</div><p class=post-summary></p></div></div></main><footer class=site-footer><div class=footer-inner><p>© 2026 茶凉小记</p><p><a href=https://beian.miit.gov.cn target=_blank>浙ICP备2023002438号</a></p></div></footer></body></html>
|
||||
1
public/tags/index.xml
Normal file
1
public/tags/index.xml
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tags on 茶凉小记</title><link>https://ziven1220.ac.cn/tags/</link><description>Recent content in Tags on 茶凉小记</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 13 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ziven1220.ac.cn/tags/index.xml" rel="self" type="application/rss+xml"/><item><title>测试</title><link>https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/</guid><description/></item></channel></rss>
|
||||
2
public/tags/page/1/index.html
Normal file
2
public/tags/page/1/index.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!doctype html><html lang=zh-CN><head><title>https://ziven1220.ac.cn/tags/</title>
|
||||
<link rel=canonical href=https://ziven1220.ac.cn/tags/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://ziven1220.ac.cn/tags/"></head></html>
|
||||
5
public/tags/测试/index.html
Normal file
5
public/tags/测试/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!doctype html><html lang=zh-CN data-theme=dark><head><meta charset=UTF-8><meta name=viewport content="width=device-width,initial-scale=1"><title>测试 - 茶凉小记</title>
|
||||
<link rel=preconnect href=https://fonts.googleapis.com><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel=stylesheet><link rel=stylesheet href=/css/main.css></head><body><header class=site-header><div class=header-inner><a href=/ class=site-title>茶凉小记</a><nav class=site-nav><a href=/>首页</a>
|
||||
<a href=/posts/>归档</a>
|
||||
<a href=/categories/>分类</a>
|
||||
<a href=/tags/>标签</a></nav></div></header><main class=main-content><div class=post-list><h1 class=list-title>测试</h1><div class=post-card><h2><a href=/posts/hello-world/>Hello World</a></h2><div class=post-meta>2026-04-13 · [随笔]</div><p class=post-summary>茶凉小记的第一篇文章</p></div></div></main><footer class=site-footer><div class=footer-inner><p>© 2026 茶凉小记</p><p><a href=https://beian.miit.gov.cn target=_blank>浙ICP备2023002438号</a></p></div></footer></body></html>
|
||||
3
public/tags/测试/index.xml
Normal file
3
public/tags/测试/index.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>测试 on 茶凉小记</title><link>https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/</link><description>Recent content in 测试 on 茶凉小记</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Mon, 13 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/index.xml" rel="self" type="application/rss+xml"/><item><title>Hello World</title><link>https://ziven1220.ac.cn/posts/hello-world/</link><pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate><guid>https://ziven1220.ac.cn/posts/hello-world/</guid><description>欢迎来到茶凉小记!这是一个用 Hugo 搭建的静态博客。
|
||||
关于这个博客 这里记录技术、生活与想法。
|
||||
console.log(&#34;Hello, Hugo!&#34;); 简单、纯粹、持久。</description></item></channel></rss>
|
||||
2
public/tags/测试/page/1/index.html
Normal file
2
public/tags/测试/page/1/index.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!doctype html><html lang=zh-CN><head><title>https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/</title>
|
||||
<link rel=canonical href=https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/><meta name=robots content="noindex"><meta charset=utf-8><meta http-equiv=refresh content="0; url=https://ziven1220.ac.cn/tags/%E6%B5%8B%E8%AF%95/"></head></html>
|
||||
60
themes/mytheme/assets/css/main.css
Normal file
60
themes/mytheme/assets/css/main.css
Normal file
@@ -0,0 +1,60 @@
|
||||
/** 茶凉小记 - 赛博深色风格 */
|
||||
:root {
|
||||
--bg: #0a0a0f;
|
||||
--surface: #12121a;
|
||||
--border: #1e1e2e;
|
||||
--text: #e0e0e0;
|
||||
--text-muted: #888;
|
||||
--accent: #00d4ff;
|
||||
--accent-dim: #00d4ff33;
|
||||
--code-bg: #16161f;
|
||||
--font: 'JetBrains Mono', monospace;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html { scroll-behavior: smooth; }
|
||||
body {
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
font-size: 15px;
|
||||
line-height: 1.7;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
a { color: var(--accent); text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
|
||||
.site-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); }
|
||||
.header-inner { max-width: 800px; margin: 0 auto; padding: 0 2rem; display: flex; justify-content: space-between; align-items: center; }
|
||||
.site-title { font-size: 1.2rem; font-weight: 700; color: var(--accent) !important; letter-spacing: 0.05em; }
|
||||
.site-nav a { color: var(--text-muted); margin-left: 2rem; font-size: 0.85rem; }
|
||||
.site-nav a:hover { color: var(--accent); text-decoration: none; }
|
||||
|
||||
.main-content { flex: 1; max-width: 800px; margin: 0 auto; padding: 4rem 2rem; width: 100%; }
|
||||
.home-hero { text-align: center; padding: 4rem 0 3rem; }
|
||||
.home-hero h1 { font-size: 2.5rem; font-weight: 700; color: var(--accent); margin-bottom: 0.5rem; }
|
||||
.hero-sub { color: var(--text-muted); font-size: 0.9rem; }
|
||||
.post-list { margin-top: 2rem; }
|
||||
.post-card { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
|
||||
.post-card h2 { font-size: 1.1rem; margin-bottom: 0.3rem; }
|
||||
.post-card h2 a { color: var(--text); }
|
||||
.post-card h2 a:hover { color: var(--accent); text-decoration: none; }
|
||||
.post-meta { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.5rem; }
|
||||
.post-summary { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }
|
||||
.post-single { max-width: 680px; margin: 0 auto; }
|
||||
.post-title { font-size: 1.8rem; color: var(--text); margin-bottom: 0.5rem; }
|
||||
.post-single .post-meta { margin-bottom: 2rem; }
|
||||
.post-content { line-height: 1.8; }
|
||||
.post-content h2, .post-content h3 { color: var(--text); margin: 2rem 0 1rem; }
|
||||
.post-content p { margin-bottom: 1.2rem; }
|
||||
.post-content code { background: var(--code-bg); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.88em; color: var(--accent); }
|
||||
.post-content pre { background: var(--code-bg); padding: 1.2rem; border-radius: 6px; overflow-x: auto; margin-bottom: 1.2rem; }
|
||||
.post-content pre code { background: none; padding: 0; color: var(--text); }
|
||||
.post-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text-muted); margin: 1.5rem 0; }
|
||||
.post-content img { max-width: 100%; border-radius: 6px; margin: 1.5rem 0; }
|
||||
.site-footer { border-top: 1px solid var(--border); padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.8rem; }
|
||||
.footer-inner p { margin: 0.3rem 0; }
|
||||
.footer-inner a { color: var(--text-muted); }
|
||||
.footer-inner a:hover { color: var(--accent); }
|
||||
@media (max-width: 600px) { .header-inner { flex-direction: column; gap: 1rem; } .site-nav a { margin: 0 0.8rem; } .home-hero h1 { font-size: 1.8rem; } .post-title { font-size: 1.4rem; } }
|
||||
31
themes/mytheme/layouts/_default/baseof.html
Normal file
31
themes/mytheme/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" data-theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<div class="header-inner">
|
||||
<a href="/" class="site-title">{{ .Site.Title }}</a>
|
||||
<nav class="site-nav">
|
||||
<a href="/">首页</a>
|
||||
<a href="/posts/">归档</a>
|
||||
<a href="/categories/">分类</a>
|
||||
<a href="/tags/">标签</a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<main class="main-content">{{ block "main" . }}{{ end }}</main>
|
||||
<footer class="site-footer">
|
||||
<div class="footer-inner">
|
||||
<p>© {{ now.Year }} {{ .Site.Title }}</p>
|
||||
{{ with .Site.Params.beian }}<p><a href="https://beian.miit.gov.cn" target="_blank">{{ . }}</a></p>{{ end }}
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
15
themes/mytheme/layouts/_default/index.html
Normal file
15
themes/mytheme/layouts/_default/index.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<div class="home-hero">
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
<p class="hero-sub">{{ .Site.Params.subtitle }}</p>
|
||||
</div>
|
||||
<div class="post-list">
|
||||
{{ range first 10 (where .Site.RegularPages "Type" "posts") }}
|
||||
<div class="post-card">
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
<div class="post-meta">{{ .Date.Format "2006-01-02" }}{{ with .Params.categories }} · {{ . }}{{ end }}</div>
|
||||
<p class="post-summary">{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
13
themes/mytheme/layouts/_default/list.html
Normal file
13
themes/mytheme/layouts/_default/list.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
|
||||
{{ define "main" }}
|
||||
<div class="post-list">
|
||||
<h1 class="list-title">{{ .Title }}</h1>
|
||||
{{ range .Paginator.Pages }}
|
||||
<div class="post-card">
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
<div class="post-meta">{{ .Date.Format "2006-01-02" }}{{ with .Params.categories }} · {{ . }}{{ end }}</div>
|
||||
<p class="post-summary">{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
8
themes/mytheme/layouts/_default/single.html
Normal file
8
themes/mytheme/layouts/_default/single.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
|
||||
{{ define "main" }}
|
||||
<article class="post-single">
|
||||
<h1 class="post-title">{{ .Title }}</h1>
|
||||
<div class="post-meta">{{ .Date.Format "2006-01-02" }}{{ with .Params.categories }} · {{ . }}{{ end }}</div>
|
||||
<div class="post-content">{{ .Content }}</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
15
themes/mytheme/layouts/index.html
Normal file
15
themes/mytheme/layouts/index.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<div class="home-hero">
|
||||
<h1>{{ .Site.Title }}</h1>
|
||||
<p class="hero-sub">{{ .Site.Params.subtitle }}</p>
|
||||
</div>
|
||||
<div class="post-list">
|
||||
{{ range first 10 (where .Site.RegularPages "Type" "posts") }}
|
||||
<div class="post-card">
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
<div class="post-meta">{{ .Date.Format "2006-01-02" }}{{ with .Params.categories }} · {{ . }}{{ end }}</div>
|
||||
<p class="post-summary">{{ with .Description }}{{ . }}{{ else }}{{ .Summary }}{{ end }}</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
3
themes/mytheme/theme.toml
Normal file
3
themes/mytheme/theme.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
name = "mytheme"
|
||||
license = "MIT"
|
||||
min_version = "0.123.0"
|
||||
Reference in New Issue
Block a user