mirror of
https://github.com/naoufalzerai/zerai.xyz.git
synced 2025-12-24 22:43:58 +00:00
change theme again :D
This commit is contained in:
24
themes/notepadium/layouts/shortcodes/bilibili.html
Normal file
24
themes/notepadium/layouts/shortcodes/bilibili.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<div class="video_wrapper" style="position: relative; padding-bottom: 75%;">
|
||||
{{- $bvid := "" -}}
|
||||
{{if .Get "id"}}
|
||||
{{$bvid = .Get "id"}}
|
||||
{{else if .Get 0}}
|
||||
{{$bvid = .Get 0}}
|
||||
{{end}}
|
||||
{{if $bvid}}
|
||||
<iframe
|
||||
style="position: absolute; top: 0; left: 0;"
|
||||
width="100%"
|
||||
height="100%"
|
||||
src="//player.bilibili.com/player.html?aid=123456&bvid={{ $bvid }}&cid=123456&page=1"
|
||||
scrolling="no"
|
||||
border="0"
|
||||
frameborder="no"
|
||||
framespacing="0"
|
||||
allowfullscreen="true"
|
||||
>
|
||||
</iframe>
|
||||
{{else}}
|
||||
<h6>请填写视频 url 中的视频 id,例如:BV1FV411d7u7</h6>
|
||||
{{end}}
|
||||
</div>
|
||||
36
themes/notepadium/layouts/shortcodes/figure.html
Normal file
36
themes/notepadium/layouts/shortcodes/figure.html
Normal file
@@ -0,0 +1,36 @@
|
||||
<span{{ with .Get "class" }} class="{{ . }}"{{ else }} class="image-container"{{ end }}>
|
||||
{{- $src := .Get "src" -}}
|
||||
{{- $link := .Get "link" -}}
|
||||
{{- $target := .Get "target" -}}
|
||||
{{- $alt := .Get "alt" -}}
|
||||
{{- $caption := .Get "caption" -}}
|
||||
{{- $title := .Get "title" -}}
|
||||
{{- $attr := .Get "attr" -}}
|
||||
{{- $attrlink := .Get "attrlink" -}}
|
||||
{{- if not $link -}}{{- $link = $src -}}{{- end -}}
|
||||
{{- if not $target -}}{{- $target = "_blank" -}}{{- end -}}
|
||||
<span class="link" ><a href="{{ $link }}"
|
||||
target="{{ $target }}"{{ with .Get "rel" }}
|
||||
rel="{{ . }}"{{ end }}><img class="img" src="{{ $src }}"
|
||||
{{- if or $alt $caption }}
|
||||
alt="{{ with $alt }}{{ . }}{{ else }}{{ $caption | markdownify| plainify }}{{ end }}"
|
||||
{{- end -}}
|
||||
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
||||
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
||||
/></a></span>
|
||||
{{- if or (or $title $caption) $attr -}}
|
||||
<span class="caption">
|
||||
{{ with $title -}}
|
||||
<span class="title">{{ . }}</span class="image-container-caption">
|
||||
{{- end -}}
|
||||
{{- if or $caption $attr -}}<p>
|
||||
{{- $caption | markdownify -}}
|
||||
{{- with $attrlink }}
|
||||
<a href="{{ . }}">
|
||||
{{- end -}}
|
||||
{{- $attr | markdownify -}}
|
||||
{{- if $attrlink }}</a>{{ end }}</p>
|
||||
{{- end }}
|
||||
</span>
|
||||
{{- end }}
|
||||
</span>
|
||||
18
themes/notepadium/layouts/shortcodes/gravizo.html
Normal file
18
themes/notepadium/layouts/shortcodes/gravizo.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{{ $title := "Diagram" }}
|
||||
{{ if .IsNamedParams }}
|
||||
{{ with .Get "title" }}
|
||||
{{ $title = . }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Get 0 }}
|
||||
{{ $title = . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<figure>
|
||||
<img
|
||||
src='https://g.gravizo.com/svg?{{ .Inner }}'
|
||||
alt='{{ $title }}'
|
||||
/>
|
||||
<figcaption>{{ $title }}</figcaption>
|
||||
</figure>
|
||||
13
themes/notepadium/layouts/shortcodes/plist.html
Normal file
13
themes/notepadium/layouts/shortcodes/plist.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- with .Params -}}
|
||||
<table class="plstable">
|
||||
{{- range . -}}
|
||||
{{- $arg := split . ":" -}}
|
||||
{{- $key := index $arg 0 -}}
|
||||
{{- $value := index $arg 1 -}}
|
||||
<tr>
|
||||
<th>{{- $key | markdownify -}}</th>
|
||||
<td>{{- $value | markdownify -}}</td>
|
||||
</tr>
|
||||
{{- end -}}
|
||||
</table>
|
||||
{{- end -}}
|
||||
1
themes/notepadium/layouts/shortcodes/pquote.html
Normal file
1
themes/notepadium/layouts/shortcodes/pquote.html
Normal file
@@ -0,0 +1 @@
|
||||
<p><q>{{ .Inner }}</q></p>
|
||||
2
themes/notepadium/layouts/shortcodes/raw.html
Normal file
2
themes/notepadium/layouts/shortcodes/raw.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!-- raw html -->
|
||||
{{ .Inner }}
|
||||
Reference in New Issue
Block a user