remove git modules
This commit is contained in:
23
themes/hugo-theme-stack/layouts/shortcodes/bilibili.html
Normal file
23
themes/hugo-theme-stack/layouts/shortcodes/bilibili.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{ $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>
|
||||
4
themes/hugo-theme-stack/layouts/shortcodes/gitlab.html
Normal file
4
themes/hugo-theme-stack/layouts/shortcodes/gitlab.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<script
|
||||
type="application/javascript"
|
||||
src="https://gitlab.com/-/snippets/{{ index .Params 0 }}.js"
|
||||
></script>
|
||||
15
themes/hugo-theme-stack/layouts/shortcodes/quote.html
Normal file
15
themes/hugo-theme-stack/layouts/shortcodes/quote.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<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>
|
||||
10
themes/hugo-theme-stack/layouts/shortcodes/tencent.html
Normal file
10
themes/hugo-theme-stack/layouts/shortcodes/tencent.html
Normal file
@@ -0,0 +1,10 @@
|
||||
{{ $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>
|
||||
14
themes/hugo-theme-stack/layouts/shortcodes/video.html
Normal file
14
themes/hugo-theme-stack/layouts/shortcodes/video.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{- $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>
|
||||
13
themes/hugo-theme-stack/layouts/shortcodes/youtube.html
Normal file
13
themes/hugo-theme-stack/layouts/shortcodes/youtube.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- $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 -}}
|
||||
Reference in New Issue
Block a user