Skip to content

Commit

Permalink
rebuilding site 2024年 7月 2日 星期二 11时39分40秒 CST
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiny-Wang committed Jul 2, 2024
1 parent 202dbc0 commit 3109f34
Show file tree
Hide file tree
Showing 18 changed files with 231 additions and 0 deletions.
11 changes: 11 additions & 0 deletions layouts/shortcodes/attachments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/attachments.html" (dict
"page" .Page
"color" (.Get "color")
"content" .Inner
"icon" (.Get "icon")
"pattern" (.Get "pattern")
"style" (.Get "style")
"sort" (.Get "sort")
"title" (.Get "title")
) }}
9 changes: 9 additions & 0 deletions layouts/shortcodes/badge.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/badge.html" (dict
"page" .Page
"color" (.Get "color")
"content" .Inner
"icon" (.Get "icon")
"style" (.Get "style")
"title" (.Get "title")
) }}
16 changes: 16 additions & 0 deletions layouts/shortcodes/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- if (.Get "icon-position") }}
{{- warnf "%q: DEPRECATED parameter 'icon-position' for shortcode 'button' found, use 'iconposition' instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/button#parameter" .Page.File.Filename }}
{{- end }}
{{- partial "shortcodes/button.html" (dict
"page" .Page
"color" (.Get "color")
"content" .Inner
"href" (.Get "href")
"icon" (.Get "icon")
"iconposition" ((.Get "iconposition") | default (.Get "icon-position"))
"style" (.Get "style")
"title" (.Get "title")
"target" (.Get "target")
"type" (.Get "type")
) }}
10 changes: 10 additions & 0 deletions layouts/shortcodes/children.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/children.html" (dict
"page" .Page
"containerstyle" (.Get "containerstyle")
"description" (.Get "description")
"depth" (.Get "depth")
"showhidden" (.Get "showhidden")
"sort" (.Get "sort")
"style" (.Get "style")
) }}
9 changes: 9 additions & 0 deletions layouts/shortcodes/expand.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- $id := "" }}
{{- partial "shortcodes/expand.html" (dict
"page" .Page
"content" .Inner
"open" (.Get "open" | default (.Get 1))
"title" (.Get "title" | default (.Get 0))
"id" $id
) }}
27 changes: 27 additions & 0 deletions layouts/shortcodes/highlight.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- $content := "" }}
{{- $content = .InnerDeindent }}
{{- $attributes := dict }}
{{- $options := dict }}
{{- $type := "" }}
{{- range $k, $v := .Params }}
{{- if eq $k 0 }}
{{- $type = $v }}
{{- else if eq $k 1 }}
{{- $options = $v }}
{{- else if eq $k "type" }}
{{- $type = $v }}
{{- else if eq $k "title" }}
{{- $attributes = $attributes | merge (dict $k $v) }}
{{- else if eq $k "wrap" }}
{{- $attributes = $attributes | merge (dict $k $v) }}
{{- else }}
{{- $options = $options | merge (dict $k $v) }}
{{- end }}
{{- end }}
{{- partial "shortcodes/highlight.html" (dict
"page" .Page
"attributes" $attributes
"content" $content
"options" $options
"type" $type
) }}
5 changes: 5 additions & 0 deletions layouts/shortcodes/icon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/icon.html" (dict
"page" .Page
"icon" (.Get "icon" | default (.Get 0))
) }}
8 changes: 8 additions & 0 deletions layouts/shortcodes/include.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- if (.Get "showfirstheading") }}
{{- warnf "%q: UNSUPPORTED parameter 'showfirstheading' for shortcode 'include' found, use 'hidefirstheading' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#420" .Page.File.Filename }}
{{- end }}
{{- partial "shortcodes/include.html" (dict
"page" .Page
"file" (.Get "file" | default (.Get 0))
"hidefirstheading" (.Get "hidefirstheading" | default (.Get 1))
) }}
6 changes: 6 additions & 0 deletions layouts/shortcodes/math.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/math.html" (dict
"page" .Page
"content" .Inner
"align" (.Get "align")
) }}
7 changes: 7 additions & 0 deletions layouts/shortcodes/mermaid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/mermaid.html" (dict
"page" .Page
"content" .Inner
"align" (.Get "align")
"zoom" (.Get "zoom")
) }}
9 changes: 9 additions & 0 deletions layouts/shortcodes/notice.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/notice.html" (dict
"page" .Page
"color" (.Get "color")
"content" .Inner
"icon" (.Get "icon" | default (.Get 2))
"style" (.Get "style" | default (.Get 0))
"title" (.Get "title" | default (.Get 1))
) }}
6 changes: 6 additions & 0 deletions layouts/shortcodes/openapi.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- $id := "" }}
{{- partial "shortcodes/openapi.html" (dict
"page" .Page
"src" (.Get "src")
"id" $id
) }}
35 changes: 35 additions & 0 deletions layouts/shortcodes/ppt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<style type="text/css">
#googleslides_shortcodes {
padding-bottom: 66%;
position: relative;
display: block;
width: 100%;
border-bottom: 5px solid;
}
#googleslides_shortcodes iframe {
position: absolute;
top: 0;
left: 0
}
</style>
<title></title>
</head>
<body>
<div id="googleslides_shortcodes">
<iframe id="googleSlideIframe"
width="100%"
height="100%"
src="{{ .Get "src" }}"
frameborder="0"
allowfullscreen="" >
</iframe>
</div>
</body>
</html>

<!-- ————————————————
版权声明:这部分copy自 Sulv's Blog」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://www.sulvblog.cn/posts/blog/shortcodes/#61-ppt-%e5%b1%95%e7%a4%ba -->
11 changes: 11 additions & 0 deletions layouts/shortcodes/resources.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- partial "shortcodes/resources.html" (dict
"page" .Page
"color" (.Get "color")
"content" .Inner
"icon" (.Get "icon")
"pattern" (.Get "pattern")
"style" (.Get "style")
"sort" (.Get "sort")
"title" (.Get "title")
) }}
4 changes: 4 additions & 0 deletions layouts/shortcodes/siteparam.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{- partial "shortcodes/siteparam.html" (dict
"page" .Page
"name" (.Get "name" | default (.Get 0))
) }}
6 changes: 6 additions & 0 deletions layouts/shortcodes/swagger.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{- $id := "" }}
{{- partial "shortcodes/swagger.html" (dict
"page" .Page
"src" (.Get "src")
"id" $id
) }}
33 changes: 33 additions & 0 deletions layouts/shortcodes/tab.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- $_hugo_config := `{ "version": 1 }` }}
{{- $color := (.Get "color") }}
{{- $content := .Inner }}
{{- $icon := (.Get "icon") }}
{{- $name := (.Get "name") }}
{{- $style := (.Get "style") }}
{{- $title := (.Get "title") }}
{{- $tabs := slice }}
{{- if and .Parent (.Parent.Scratch.Get "tabs") }}
{{- $tabs = .Parent.Scratch.Get "tabs" }}
{{- end }}
{{- $tabs = $tabs | append (dict
"color" $color
"content" $content
"icon" $icon
"name" $name
"style" $style
"title" $title
) }}
{{- if .Parent }}
{{- $.Parent.Scratch.Set "tabs" $tabs }}
{{- else }}
{{- /* if no containing tabs shortcode is present, we display this tab as single */}}
{{- partial "shortcodes/tabs.html" (dict
"page" .Page
"color" ""
"content" $tabs
"groupid" ""
"icon" ""
"style" ""
"title" ""
) }}
{{- end }}
19 changes: 19 additions & 0 deletions layouts/shortcodes/tabs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- $unused := .Inner }}
{{- $color := (.Get "color") }}
{{- $groupid := ((.Get "groupid") | default (.Get "groupId")) }}
{{- if (.Get "groupId") }}
{{- warnf "%q: DEPRECATED parameter 'groupId' for shortcode 'tabs' found, use 'groupid' instead; see https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tabs#parameter" .Page.File.Filename }}
{{- end }}
{{- $icon := (.Get "icon") }}
{{- $style := (.Get "style") }}
{{- $title := (.Get "title") }}
{{- $tabs := (.Scratch.Get "tabs") }}
{{- partial "shortcodes/tabs.html" (dict
"page" .Page
"color" $color
"content" $tabs
"groupid" $groupid
"icon" $icon
"style" $style
"title" $title
) }}

0 comments on commit 3109f34

Please sign in to comment.