diff options
Diffstat (limited to 'themes/hugo-theme-stack/layouts/shortcodes')
6 files changed, 0 insertions, 79 deletions
diff --git a/themes/hugo-theme-stack/layouts/shortcodes/bilibili.html b/themes/hugo-theme-stack/layouts/shortcodes/bilibili.html deleted file mode 100644 index cb72e43..0000000 --- a/themes/hugo-theme-stack/layouts/shortcodes/bilibili.html +++ /dev/null @@ -1,23 +0,0 @@ -{{ $vid := (.Get 0) }}
-{{ $videopage := default 1 (.Get 1) }}
-{{ $basicQuery := querify "page" $videopage "high_quality" 1 "as_wide" 1 }}
-{{ $videoQuery := "" }}
-
-{{ if strings.HasPrefix (lower $vid) "av" }}
- {{ $videoQuery = querify "aid" (strings.TrimPrefix "av" (lower $vid)) }}
-{{ else if strings.HasPrefix (lower $vid) "bv" }}
- {{ $videoQuery = querify "bvid" $vid }}
-{{ else }}
- <p>Bilibili 视频av号或BV号错误!请检查视频av号或BV号是否正确</p>
- <p>当前视频av或BV号:{{ $vid }},视频分P:{{ $videopage }}</p>
-{{ end }}
-
-<div class="video-wrapper">
- <iframe src="https://player.bilibili.com/player.html?{{ $basicQuery | safeURL }}&{{ $videoQuery | safeURL }}"
- scrolling="no"
- frameborder="no"
- framespacing="0"
- allowfullscreen="true"
- >
- </iframe>
-</div>
diff --git a/themes/hugo-theme-stack/layouts/shortcodes/gitlab.html b/themes/hugo-theme-stack/layouts/shortcodes/gitlab.html deleted file mode 100644 index b5a16cf..0000000 --- a/themes/hugo-theme-stack/layouts/shortcodes/gitlab.html +++ /dev/null @@ -1,4 +0,0 @@ -<script - type="application/javascript" - src="https://gitlab.com/-/snippets/{{ index .Params 0 }}.js" -></script>
\ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/shortcodes/quote.html b/themes/hugo-theme-stack/layouts/shortcodes/quote.html deleted file mode 100644 index 09bb07c..0000000 --- a/themes/hugo-theme-stack/layouts/shortcodes/quote.html +++ /dev/null @@ -1,15 +0,0 @@ -<blockquote> - <p>{{ .Inner | markdownify }}</p> - {{- if or (.Get "author") (.Get "source") -}} - <span class="cite"><span>― </span> - {{- if .Get "author" -}} - <span> - {{- .Get "author" -}}{{- if .Get "source" -}}, {{ end -}} - </span> - {{- end -}} - {{- with .Get "url" -}}<a href="{{ . }}">{{- end -}} - <cite>{{ .Get "source" }}</cite> - {{- if .Get "url" -}}</a>{{- end -}} - </span> - {{- end -}} -</blockquote>
\ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/shortcodes/tencent.html b/themes/hugo-theme-stack/layouts/shortcodes/tencent.html deleted file mode 100644 index 463dec5..0000000 --- a/themes/hugo-theme-stack/layouts/shortcodes/tencent.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ $vid := .Get 0 }}
-<div class="video-wrapper">
- <iframe src="https://v.qq.com/txp/iframe/player.html?vid={{ $vid }}&auto=0"
- scrolling="no"
- frameborder="no"
- framespacing="0"
- allowfullscreen="true"
- >
- </iframe>
-</div>
\ No newline at end of file diff --git a/themes/hugo-theme-stack/layouts/shortcodes/video.html b/themes/hugo-theme-stack/layouts/shortcodes/video.html deleted file mode 100644 index 5324754..0000000 --- a/themes/hugo-theme-stack/layouts/shortcodes/video.html +++ /dev/null @@ -1,14 +0,0 @@ -{{- $src := .Get "src" | default (.Get 0) -}} -<div class="video-wrapper"> - <video - controls - src="{{- $src -}}" - {{ with .Get "poster" }}poster="{{- . -}}"{{ end }} - {{ with .Get "autoplay" }}autoplay{{ end }} - > - <p> - Your browser doesn't support HTML5 video. Here is a - <a href="{{- $src -}}">link to the video</a> instead. - </p> - </video> -</div> diff --git a/themes/hugo-theme-stack/layouts/shortcodes/youtube.html b/themes/hugo-theme-stack/layouts/shortcodes/youtube.html deleted file mode 100644 index 2f85931..0000000 --- a/themes/hugo-theme-stack/layouts/shortcodes/youtube.html +++ /dev/null @@ -1,13 +0,0 @@ -{{- $pc := .Page.Site.Config.Privacy.YouTube -}} -{{- if not $pc.Disable -}} -{{- $ytHost := cond $pc.PrivacyEnhanced "www.youtube-nocookie.com" "www.youtube.com" -}} -{{- $id := .Get "id" | default (.Get 0) -}} -<div class="video-wrapper"> - <iframe loading="lazy" - src="https://{{ $ytHost }}/embed/{{ $id }}{{ with .Get "autoplay" }}{{ if eq . "true" }}?autoplay=1{{ end }}{{ end }}" - allowfullscreen - title="YouTube Video" - > - </iframe> -</div> -{{ end -}}
\ No newline at end of file |