From 231964080b26b3b3cab91b2c6144a784d3bef99d Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sun, 14 Jun 2020 00:06:35 +0800 Subject: In-post APlayer now support multiple files --- layouts/_default/single.html | 2 +- layouts/partials/head.html | 2 +- layouts/partials/scripts-end.html | 21 +++++++++++++-------- 3 files changed, 15 insertions(+), 10 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index db5e2f5..413cacc 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,7 +7,7 @@
{{ partial "post-meta.html" . }}
- {{ with .Params.playerURL }} + {{ with .Params.player }}
{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 0603c4d..6470262 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -41,7 +41,7 @@ {{ end }} -{{ if .Params.playerURL }} +{{ if .Params.player }} {{ end }} {{ if .Site.Params.useDisqusJS }} diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html index 862e0e2..2e1de5f 100644 --- a/layouts/partials/scripts-end.html +++ b/layouts/partials/scripts-end.html @@ -7,20 +7,25 @@ -{{ with .Params.playerURL }} +{{ with .Params.player }} - {{ with .Params.player }} diff --git a/layouts/shortcodes/img-lazy.html b/layouts/shortcodes/img-lazy.html index fef9bd3..e57b8fb 100644 --- a/layouts/shortcodes/img-lazy.html +++ b/layouts/shortcodes/img-lazy.html @@ -1,10 +1,22 @@ -{{ if len .Params | eq 2 }} -{{ index .Params 0 }} -{{ else if len .Params | eq 3 }}{{ if eq (index .Params 0) "row" }} -{{ index .Params 1 }} -{{ else if eq (index .Params 0) "col" }} -{{ index .Params 1 }} -{{ else }}{{ end }}{{ else }}{{ end }} \ No newline at end of file +{{- if len .Params | eq 2 -}} +

+ + {{ index .Params 0 }} + +

+{{- else if len .Params | eq 3 }}{{ if eq (index .Params 0) "row" -}} +

+ + {{ index .Params 1 }} + +

+{{- else if eq (index .Params 0) "col" -}} +

+ + {{ index .Params 1 }} + +

+{{- else -}}{{- end -}}{{- else -}}{{ end -}} \ No newline at end of file diff --git a/layouts/shortcodes/img-nz-lazy.html b/layouts/shortcodes/img-nz-lazy.html deleted file mode 100644 index bfdb26a..0000000 --- a/layouts/shortcodes/img-nz-lazy.html +++ /dev/null @@ -1,25 +0,0 @@ -{{ if len .Params | eq 2 }} -{{ index .Params 0 }} -{{ else if len .Params | eq 3 }}{{ if eq (index .Params 0) "row" }} -{{ index .Params 1 }} -{{ else if eq (index .Params 0) "col" }} -{{ index .Params 1 }} -{{ else }} - - {{ index .Params 0 }} - -{{ end }}{{ else if len .Params | eq 4 }}{{ if eq (index .Params 0) "row" }} - - {{ index .Params 1 }} - -{{ else if eq (index .Params 0) "col" }} - - {{ index .Params 1 }} - -{{ else }}{{ end }}{{ else }}{{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/img-nz.html b/layouts/shortcodes/img-nz.html deleted file mode 100644 index 1b4f791..0000000 --- a/layouts/shortcodes/img-nz.html +++ /dev/null @@ -1,7 +0,0 @@ -{{ if (index .Params 2) }} - - {{ index .Params 0 }} - -{{ else }} -{{ index .Params 0 }} -{{ end }} \ No newline at end of file -- cgit v1.2.3 From 72ccecdc5b8bd5fef140c706902eb2139068d748 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sun, 14 Jun 2020 23:30:00 +0800 Subject: Generate json for searching --- layouts/_default/index.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 layouts/_default/index.json (limited to 'layouts') diff --git a/layouts/_default/index.json b/layouts/_default/index.json new file mode 100644 index 0000000..a823e62 --- /dev/null +++ b/layouts/_default/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "search" slice -}} +{{- range (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}} + {{- $.Scratch.Add "search" (dict "title" .Title "tags" .Params.tags "contents" .Plain "permalink" .Permalink) -}} +{{- end -}} +{{- $.Scratch.Get "search" | jsonify -}} \ No newline at end of file -- cgit v1.2.3 From d0569100c68fc2dd9c7fae4d91915fd49da8d71f Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Mon, 15 Jun 2020 14:13:02 +0800 Subject: Search page template --- layouts/_default/search.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 layouts/_default/search.html (limited to 'layouts') diff --git a/layouts/_default/search.html b/layouts/_default/search.html new file mode 100644 index 0000000..b92861a --- /dev/null +++ b/layouts/_default/search.html @@ -0,0 +1,20 @@ +{{ define "main" }} + +
+
+
+ +
+
+ +
+
+
+ +
+

+ Not Finished Yet +

+
+ +{{ end }} \ No newline at end of file -- cgit v1.2.3