From 6bdd1c4c0ea567c45fdecb1e858a99ee5da246ad Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Mon, 13 Apr 2020 19:13:39 +0800 Subject: Initial commit --- layouts/_default/baseof.html | 14 ++++++++++++++ layouts/_default/list.html | 14 ++++++++++++++ layouts/_default/single.html | 24 +++++++++++++++++++++++ layouts/index.html | 36 +++++++++++++++++++++++++++++++++++ layouts/partials/favicon.html | 1 + layouts/partials/footer.html | 9 +++++++++ layouts/partials/head.html | 23 ++++++++++++++++++++++ layouts/partials/header.html | 9 +++++++++ layouts/partials/math.html | 5 +++++ layouts/partials/post-meta.html | 12 ++++++++++++ layouts/partials/scripts.html | 5 +++++ layouts/partials/sidebar.html | 37 ++++++++++++++++++++++++++++++++++++ layouts/tags/list.html | 42 +++++++++++++++++++++++++++++++++++++++++ 13 files changed, 231 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/favicon.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/math.html create mode 100644 layouts/partials/post-meta.html create mode 100644 layouts/partials/scripts.html create mode 100644 layouts/partials/sidebar.html create mode 100644 layouts/tags/list.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..13f61d2 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,14 @@ + + +{{ partial "head.html" . }} + + + {{ partial "header.html" . }} + + {{ block "main" . }}{{ end }} + + {{ partial "footer.html" . }} + {{ partial "scripts.html" . }} + + + \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..0275644 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,14 @@ +{{ define "main" }} +
+
+ +
+ 404 NOT FOUND +
+ + +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..9da2c59 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,24 @@ +{{ define "main" }} +
+
+ +
+
+

+ {{ .Title }} +

+
+ {{ partial "post-meta.html" . }} +
+
+ {{ .Content }} +
+
+
+ + +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..0373851 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,36 @@ +{{ define "main" }} +
+
+ +
+ + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }} + {{ range $paginator.Pages }} +
+

+ {{ .Title }} +

+
+ {{ partial "post-meta.html" . }} +
+
+ {{ .Summary }} +
+
+ > READ MORE ... +
+
+ {{ end }} + {{ if gt $paginator.TotalPages 1 }} + + {{ end }} +
+ + +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/favicon.html b/layouts/partials/favicon.html new file mode 100644 index 0000000..c152663 --- /dev/null +++ b/layouts/partials/favicon.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..a5317e1 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..8d035ce --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,23 @@ + + + + + + +{{ hugo.Generator }} +{{ partial "favicon.html" . }} + +{{ if .IsHome }} +{{ .Site.Title }} - {{ .Site.Params.subTitle }} +{{ else }} +{{ .Title }} - {{ .Site.Title }} +{{ end }} + +{{ $sass := resources.Get "sass/main.scss" }} +{{ $style := $sass | resources.ToCSS }} + + + +{{ if or .Params.math .Site.Params.math }} +{{ partial "math.html" . }} +{{ end }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..7f3a254 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,9 @@ +
+ +
+
+ {{ .Site.Title }} + {{ .Site.Params.subTitle }} +
+
+
\ No newline at end of file diff --git a/layouts/partials/math.html b/layouts/partials/math.html new file mode 100644 index 0000000..621a2c8 --- /dev/null +++ b/layouts/partials/math.html @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html new file mode 100644 index 0000000..9d9832d --- /dev/null +++ b/layouts/partials/post-meta.html @@ -0,0 +1,12 @@ + + + + + {{ if .Params.tags }} + {{ range .Params.tags }} + {{ . }} + {{ end }} + {{ else }} + 无标签 + {{ end }} + \ No newline at end of file diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..4caf7ba --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..5150a87 --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,37 @@ +
+
页面
+ +
+
+
标签
+
+ {{ range .Site.Taxonomies.tags }} + + {{ .Page.Title }} + + {{ end }} +
+
+ +{{ with .Site.Params.bgmImageChart }} +
+
番剧
+ +
+{{ end }} \ No newline at end of file diff --git a/layouts/tags/list.html b/layouts/tags/list.html new file mode 100644 index 0000000..076cfc9 --- /dev/null +++ b/layouts/tags/list.html @@ -0,0 +1,42 @@ +{{ define "main" }} +
+
+ +
+ + {{ if eq .RelPermalink "/tags/" }} + 404 NOT FOUND + {{ else }} +
+ 拥有标签 {{ .Title }} 的文章: +
+ {{ range .Paginator.Pages }} +
+

+ {{ .Title }} +

+
+ {{ partial "post-meta.html" . }} +
+
+ {{ .Summary }} +
+
+ > READ MORE ... +
+
+ {{ end }} + {{ end }} + {{ if gt .Paginator.TotalPages 1 }} + + {{ end }} +
+ + +
+
+{{ end }} \ No newline at end of file -- cgit v1.2.3