First batch of day one
This commit is contained in:
@@ -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
themes/hugo-theme-relearn/layouts/shortcodes/badge.html
Normal file
9
themes/hugo-theme-relearn/layouts/shortcodes/badge.html
Normal file
@@ -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
themes/hugo-theme-relearn/layouts/shortcodes/button.html
Normal file
16
themes/hugo-theme-relearn/layouts/shortcodes/button.html
Normal file
@@ -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" .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
themes/hugo-theme-relearn/layouts/shortcodes/children.html
Normal file
10
themes/hugo-theme-relearn/layouts/shortcodes/children.html
Normal file
@@ -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
themes/hugo-theme-relearn/layouts/shortcodes/expand.html
Normal file
9
themes/hugo-theme-relearn/layouts/shortcodes/expand.html
Normal file
@@ -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
themes/hugo-theme-relearn/layouts/shortcodes/highlight.html
Normal file
27
themes/hugo-theme-relearn/layouts/shortcodes/highlight.html
Normal file
@@ -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
themes/hugo-theme-relearn/layouts/shortcodes/icon.html
Normal file
5
themes/hugo-theme-relearn/layouts/shortcodes/icon.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/icon.html" (dict
|
||||
"page" .Page
|
||||
"icon" (.Get "icon" | default (.Get 0))
|
||||
) }}
|
||||
@@ -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
themes/hugo-theme-relearn/layouts/shortcodes/math.html
Normal file
6
themes/hugo-theme-relearn/layouts/shortcodes/math.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/math.html" (dict
|
||||
"page" .Page
|
||||
"content" .Inner
|
||||
"align" (.Get "align")
|
||||
) }}
|
||||
@@ -0,0 +1,7 @@
|
||||
{{- $_hugo_config := `{ "version": 1 }` }}
|
||||
{{- partial "shortcodes/mermaid.html" (dict
|
||||
"page" .Page
|
||||
"content" .Inner
|
||||
"align" (.Get "align")
|
||||
"zoom" (.Get "zoom")
|
||||
) }}
|
||||
9
themes/hugo-theme-relearn/layouts/shortcodes/notice.html
Normal file
9
themes/hugo-theme-relearn/layouts/shortcodes/notice.html
Normal file
@@ -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))
|
||||
) }}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{- $id := "" }}
|
||||
{{- partial "shortcodes/openapi.html" (dict
|
||||
"page" .Page
|
||||
"src" (.Get "src")
|
||||
"id" $id
|
||||
) }}
|
||||
11
themes/hugo-theme-relearn/layouts/shortcodes/resources.html
Normal file
11
themes/hugo-theme-relearn/layouts/shortcodes/resources.html
Normal file
@@ -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")
|
||||
) }}
|
||||
@@ -0,0 +1,4 @@
|
||||
{{- partial "shortcodes/siteparam.html" (dict
|
||||
"page" .Page
|
||||
"name" (.Get "name" | default (.Get 0))
|
||||
) }}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{- $id := "" }}
|
||||
{{- partial "shortcodes/swagger.html" (dict
|
||||
"page" .Page
|
||||
"src" (.Get "src")
|
||||
"id" $id
|
||||
) }}
|
||||
33
themes/hugo-theme-relearn/layouts/shortcodes/tab.html
Normal file
33
themes/hugo-theme-relearn/layouts/shortcodes/tab.html
Normal file
@@ -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 }}
|
||||
{{- $c:=""}}{{/* 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
themes/hugo-theme-relearn/layouts/shortcodes/tabs.html
Normal file
19
themes/hugo-theme-relearn/layouts/shortcodes/tabs.html
Normal file
@@ -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" .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
|
||||
) }}
|
||||
Reference in New Issue
Block a user