From 82e642c7512183656c3aec522e94ca4296f271c3 Mon Sep 17 00:00:00 2001 From: wood Date: Sun, 10 Jan 2021 16:36:48 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=96=B0=E5=A2=9E=E8=85=BE=E8=AE=AF?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=9A=84=E6=94=AF=E6=8C=81=20-=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=80=9A=E8=BF=87frontmatter=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=9C=A8=E6=96=87=E7=AB=A0=E4=B8=AD=E6=8F=92=E5=85=A5=E9=9F=B3?= =?UTF-8?q?=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/article/article.html | 10 ++++++++ .../partials/article/components/audio.html | 24 +++++++++++++++++++ .../partials/article/components/header.html | 7 ++++++ layouts/shortcodes/tencent.html | 13 ++++++++++ 4 files changed, 54 insertions(+) create mode 100644 layouts/partials/article/components/audio.html create mode 100644 layouts/shortcodes/tencent.html diff --git a/layouts/partials/article/article.html b/layouts/partials/article/article.html index f3f7e90..c5ad53c 100644 --- a/layouts/partials/article/article.html +++ b/layouts/partials/article/article.html @@ -1,8 +1,18 @@
{{ partial "article/components/header" . }} + {{ if .Params.audio }} + {{ if or ( eq .Params.audio.p "before" ) ( not .Params.audio.p ) }} + {{ partial "article/components/audio" . }} + {{ end }} + {{ end }} + {{ partial "article/components/content" . }} + {{ if or ( eq .Params.audio.p "after") ( eq .Params.audio.p "fixed" ) }} + {{ partial "article/components/audio" . }} + {{ end }} + {{ partial "article/components/footer" . }} {{ if or .Params.math .Site.Params.article.math }} diff --git a/layouts/partials/article/components/audio.html b/layouts/partials/article/components/audio.html new file mode 100644 index 0000000..d521201 --- /dev/null +++ b/layouts/partials/article/components/audio.html @@ -0,0 +1,24 @@ +
+ + +
\ No newline at end of file diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html index 7582ec2..f6e0a73 100644 --- a/layouts/partials/article/components/header.html +++ b/layouts/partials/article/components/header.html @@ -32,4 +32,11 @@ {{ end }} {{ partialCached "article/components/details" . .RelPermalink }} + + {{ if .Params.audio }} + + + + + {{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/tencent.html b/layouts/shortcodes/tencent.html new file mode 100644 index 0000000..fb0afa5 --- /dev/null +++ b/layouts/shortcodes/tencent.html @@ -0,0 +1,13 @@ + +{{ $vid := (.Get 0) }} + +
+ +
\ No newline at end of file