28 | {{ partial "header.html" . }}
29 |
30 | {{ block "main" . }}
31 | {{ end }}
32 |
33 |
34 | {{ block "footer" . }}
35 | {{ partial "footer.html" . }}
36 | {{ end }}
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/baseof.json:
--------------------------------------------------------------------------------
1 | {
2 | "data" : {{ block "response" .}}{{ end }}
3 | }
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/books.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 |
3 |
{{.Title}}
4 |
5 | {{$movieitems := getJSON "https://dbapi.immmmm.com/list?type=book" }}
6 |
7 |
8 | {{range $item := $movieitems.results}}
9 | {{ $itemRating := default 0 (float $item.douban_score) }}
10 |
11 |
12 |
13 |
{{ $itemRating }}
14 |
15 |
16 |
17 | {{end}}
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{ end }}
25 |
26 | {{ define "footer" }}
27 |
28 | {{ end }}
29 |
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/caipu.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 |
3 |
11 |
12 |
13 |
{{.Title}}
14 |
15 | {{ if .Params.toc }}{{ .TableOfContents }}{{ end }}
16 | {{ .Content }}
17 | {{ .Render "path"}}
18 |
19 |
20 |
21 |
24 | {{ end }}
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/chat.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | {{ .Content }}
8 |
9 | {{ range $goods.good}}
10 |
11 |
12 |
{{ .jiage }}
13 |
14 |
{{ .note }}
15 |
16 | {{ end }}
17 |
18 |
19 |
20 | {{ if not (eq .Params.Comments "false") }}
21 | {{ partial "comments.html" . }}
22 | {{ end }}
23 |
24 | {{ end }}
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/item.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "{{ .Title }}",
3 | "date": "{{ .Date }}",
4 | "permalink" : "{{ .Permalink }}",
5 | "content" : "{{ .Content }}"
6 | }
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/list.json:
--------------------------------------------------------------------------------
1 | {{ define "response" }}
2 | {
3 | {{ with eq .Kind "section" -}}"section" : "{{ $.Section }}",{{- end }}
4 | "count" : "{{- len .Data.Pages -}}",
5 | "items" : [
6 | {{ range $i, $e := .Data.Pages -}}
7 | {{ if $i }},{{ end }}
8 | {{- .Render "item" }}
9 | {{- end}}
10 | ]
11 | }
12 | {{- end }}
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/movies.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 |
3 |
{{.Title}}
4 |
5 | {{$movieitems := getJSON "https://dbapi.immmmm.com/list?type=movie" }}
6 |
7 |
8 | {{range $item := $movieitems.results}}
9 | {{ $itemRating := default 0 (float $item.douban_score) }}
10 |
11 |
12 |
13 |
{{ $itemRating }}
14 |
15 |
16 |
17 | {{end}}
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{ end }}
25 |
26 | {{ define "footer" }}
27 |
28 | {{ end }}
29 |
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/_default/path.html:
--------------------------------------------------------------------------------
1 | {{ if .Params.path }}
2 | {{$Path := .Params.path}}
3 |
3 |
{{.Title}}
4 | 共计 {{ len (where .Site.RegularPages "Section" "posts") }} 篇日志
5 |
6 | {{- range (where (where .Site.Pages "Type" "in" "posts") "Kind" "page").GroupByDate "2006" }}
7 |
8 |
9 | {{- range .Pages.GroupByDate "2006-01" }}
10 |
11 |
{{ .Key }}
12 |
13 | {{- range .Pages }}
14 |
17 | {{ end }}
18 |
19 |
20 | {{- end }}
21 |
22 | {{- end }}
23 |
24 | {{ end }}
25 |
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/index.json:
--------------------------------------------------------------------------------
1 | {{- $.Scratch.Add "index" slice -}}
2 | {{- range (where .Site.RegularPages "Type" "posts" ) -}}
3 | {{- $.Scratch.Add "index" (dict "title" .Title "permalink" .Permalink "summary" .Summary "date" (.Date.Format "2006-01-02")) -}}
4 | {{- end -}}
5 | {{- $.Scratch.Get "index" | jsonify -}}
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/partials/breadcrumb.html:
--------------------------------------------------------------------------------
1 |
2 | {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
3 |
4 |
5 | {{ define "breadcrumbnav" }}
6 | {{ if .p1.Parent }}
7 | {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
8 | {{ else if not .p1.IsHome }}
9 | {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
10 | {{ end }}
11 |
2 | {{ "" | markdownify }}
3 |
4 |
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/partials/comments.html:
--------------------------------------------------------------------------------
1 |
2 | {{- if .Site.Params.twikoo.enable}}
3 | {{- if not .Site.IsServer }}
4 |
8 |
9 |
10 |
11 | {{- end }}
12 | {{- end }}
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/partials/greater-icon.html:
--------------------------------------------------------------------------------
1 |
5 | {{- range (sort $files "Name" "asc") -}}
6 | {{- if ( .Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp|webp|avif|jxl)") }}
7 | {{- $linkURL := print $baseURL "/" ($.Get 0) "/" .Name | absURL }}
8 |
9 |

10 |
{{ .Name | replaceRE "\\..*" ""}}
11 |
12 | {{- end }}
13 | {{- end }}
14 |
15 | {{- end }}
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/shortcodes/getdata.html:
--------------------------------------------------------------------------------
1 | {{ $dataJ := getJSON (.Get 0) }}
2 | {{if $dataJ}}
3 |
5 | {{- range (sort $files "Name" "asc") -}}
6 | {{- if ( .Name | findRE "\\.(gif|jpg|jpeg|tiff|png|bmp|webp|avif|jxl)") }}
7 | {{- $linkURL := print $baseURL "photos/" .Name | absURL }}
8 |
9 |

10 |
{{ .Name | replaceRE "\\..*" ""}}
11 |
12 | {{- end }}
13 | {{- end }}
14 |
15 |
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/shortcodes/link.html:
--------------------------------------------------------------------------------
1 | {{$URL := .Get 0}}
2 | {{ with .Site.GetPage $URL }}
3 |
4 | {{ with .Params.feature }}
5 | {{ $.Scratch.Set "feature" . }}
6 | {{ else }}
7 | {{ with findRE `!\[(.*?)\]\((.*?)\)` .RawContent }}
8 | {{ range first 1 . }}
9 | {{ $url := replaceRE `!\[(.*?)\]\((.*?)\)` "$2" . }}
10 | {{$.Scratch.Set "feature" $url }}
11 | {{ end }}
12 | {{ else }}
13 | {{ $.Scratch.Set "feature" false }}
14 | {{ end }}
15 | {{ end }}
16 |
17 |
18 |
19 |
20 |
23 |
24 | {{ if .Params.tags }}
25 |
{{ range .Params.tags }}#{{ . }} {{ end }}
26 | {{ end }}
27 |
28 | {{ .Summary | plainify }}
29 |
30 |
31 |
32 | {{with ($.Scratch.Get "feature")}}
33 |

34 | {{end}}
35 |
36 | {{ end }}
--------------------------------------------------------------------------------
/themes/hello-friend/layouts/shortcodes/memos.html:
--------------------------------------------------------------------------------
1 |
3 | {{ partial "breadcrumb.html" . }}
4 |
5 |
{{.Title}}
6 |
11 |
12 | {{- range (where (where .Pages "Type" "in" (slice "post" "posts")) "Kind" "page").GroupByDate "2006" }}
13 |
14 | {{- range .Pages.GroupByDate "2006-01" }}
15 |
16 |
{{ .Key }}
17 |
18 | {{- range .Pages }}
19 |
22 | {{ end }}
23 |
24 |
25 | {{- end }}
26 |
27 | {{- end }}
28 |
29 | {{ end }}
30 |
--------------------------------------------------------------------------------
/themes/hello-friend/static/imgStatus.min.js:
--------------------------------------------------------------------------------
1 | !function(){this.loaded=0,this.failed=0,this.total=0,this.watch=function(a,b){var c=document.querySelectorAll(a);if(!c.length)return console.log("[imgStatus]: There aren't any images associated with this selector ("+a+")!");this.total=c.length;for(var d=0;d