First draft

This commit is contained in:
2023-06-14 21:16:37 +02:00
parent ff4a8ce413
commit e8a8269c6c
102 changed files with 5407 additions and 0 deletions

View File

@ -0,0 +1,12 @@
{{/* 单个帖子的模板 */}}
{{ define "main" }}
<div class="single-container is-centered">
<div class="archive">
<h1 class="title is-1">{{ .Title }}</h1>
<div class="content about-content">
{{ .Content }}
</div>
</div>
</div>
{{ end }}

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
{{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}}
<main>
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
</body>
</html>

View File

@ -0,0 +1,5 @@
{{- $.Scratch.Add "index" slice -}}
{{- range .Site.RegularPages -}}
{{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink "date" .Date "section" .Section) -}}
{{- end -}}
{{- $.Scratch.Get "index" | jsonify -}}

View File

@ -0,0 +1,16 @@
{{/* 列表类型页面的通用模板.点击blog之后展示出来的页面 */}}
{{/* user为博客文章列表创建一个索引页面。
>> hugo new blog/_index.md */}}
{{ define "main" }}
<div class="container">
<div class="section">
<div class="content">
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ range .Pages.ByPublishDate.Reverse }}
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{ end }}
</div>
</div>
</div>
{{ end }}

View File

@ -0,0 +1,15 @@
{{ define "main" }}
{{- with site.Params.homeInfoParams }}
<article class="first-entry home-info">
<header class="entry-header">
<h1>{{ .Title }}</h1>
</header>
<div class="entry-content">
{{ .Content}}
</div>
<footer class="entry-footer">
{{ partial "social_icons.html" site.Params.socialIcons }}
</footer>
</article>
{{- end -}}
{{ end }}

View File

@ -0,0 +1,26 @@
<article class="post">
<div class="single-container column is-centered">
<div class="archive" id="post-container">
<header class="post-header">
<h1 class="post-title hover-underline-animation"><a class="post-link" href="{{ .RelPermalink }}">{{ .Title
}}</a></h1>
</header>
<div class="post-content">
<div class="excerpt post-summary">
{{ if .Params.protected}}
<p>Psst! The article you seek is guarded by a mischievous password, hidden within the realms of whimsy and giggles. Unleash your inner unicorn, sprinkle some sparkle, and let the charm of curiosity guide you to unlock its enchanting secrets!</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div>
<div class="post-time-container">
<span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span>
</div>
</div>
</div>
</div>
</article>