summaryrefslogtreecommitdiff
path: root/themes/PaperMod/layouts/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'themes/PaperMod/layouts/shortcodes')
m---------themes/PaperMod0
-rw-r--r--themes/PaperMod/layouts/shortcodes/collapse.html8
-rw-r--r--themes/PaperMod/layouts/shortcodes/figure.html31
-rw-r--r--themes/PaperMod/layouts/shortcodes/inTextImg.html5
-rw-r--r--themes/PaperMod/layouts/shortcodes/ltr.html15
-rw-r--r--themes/PaperMod/layouts/shortcodes/rawhtml.html2
-rw-r--r--themes/PaperMod/layouts/shortcodes/rtl.html15
7 files changed, 76 insertions, 0 deletions
diff --git a/themes/PaperMod b/themes/PaperMod
deleted file mode 160000
-Subproject 3a0a4811cbc07c0bea09ef55b3c1bfb39b48cdd
diff --git a/themes/PaperMod/layouts/shortcodes/collapse.html b/themes/PaperMod/layouts/shortcodes/collapse.html
new file mode 100644
index 0000000..17d8d3b
--- /dev/null
+++ b/themes/PaperMod/layouts/shortcodes/collapse.html
@@ -0,0 +1,8 @@
+{{ if .Get "summary" }}
+{{ else }}
+{{ warnf "missing value for param 'summary': %s" .Position }}
+{{ end }}
+<p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}>
+ <summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
+ {{ .Inner | markdownify }}
+</details></p>
diff --git a/themes/PaperMod/layouts/shortcodes/figure.html b/themes/PaperMod/layouts/shortcodes/figure.html
new file mode 100644
index 0000000..8c93eff
--- /dev/null
+++ b/themes/PaperMod/layouts/shortcodes/figure.html
@@ -0,0 +1,31 @@
+<figure{{ if or (.Get "class") (eq (.Get "align") "center") }} class="
+ {{- if eq (.Get "align") "center" }}align-center {{ end }}
+ {{- with .Get "class" }}{{ . }}{{- end }}"
+{{- end -}}>
+ {{- if .Get "link" -}}
+ <a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
+ {{- end }}
+ <img loading="lazy" src="{{ .Get "src" }}{{- if eq (.Get "align") "center" }}#center{{- end }}"
+ {{- if or (.Get "alt") (.Get "caption") }}
+ alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
+ {{- end -}}
+ {{- with .Get "width" }} width="{{ . }}"{{ end -}}
+ {{- with .Get "height" }} height="{{ . }}"{{ end -}}
+ /> <!-- Closing img tag -->
+ {{- if .Get "link" }}</a>{{ end -}}
+ {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
+ <figcaption>
+ {{ with (.Get "title") -}}
+ {{ . }}
+ {{- end -}}
+ {{- if or (.Get "caption") (.Get "attr") -}}<p>
+ {{- .Get "caption" | markdownify -}}
+ {{- with .Get "attrlink" }}
+ <a href="{{ . }}">
+ {{- end -}}
+ {{- .Get "attr" | markdownify -}}
+ {{- if .Get "attrlink" }}</a>{{ end }}</p>
+ {{- end }}
+ </figcaption>
+ {{- end }}
+</figure>
diff --git a/themes/PaperMod/layouts/shortcodes/inTextImg.html b/themes/PaperMod/layouts/shortcodes/inTextImg.html
new file mode 100644
index 0000000..0239fd6
--- /dev/null
+++ b/themes/PaperMod/layouts/shortcodes/inTextImg.html
@@ -0,0 +1,5 @@
+{{- $Img := (.Get "url") }}
+{{- $height := (.Get "height") }}
+{{- $alt := (.Get "alt") }}
+
+<img class="in-text" height="{{ $height | default `15` }}" src="{{$Img}}" alt="{{$alt}}">
diff --git a/themes/PaperMod/layouts/shortcodes/ltr.html b/themes/PaperMod/layouts/shortcodes/ltr.html
new file mode 100644
index 0000000..4ad7682
--- /dev/null
+++ b/themes/PaperMod/layouts/shortcodes/ltr.html
@@ -0,0 +1,15 @@
+{{ $.Scratch.Set "md" false }}
+
+{{ if .IsNamedParams }}
+{{ $.Scratch.Set "md" (.Get "md") }}
+{{ else }}
+{{ $.Scratch.Set "md" (.Get 0) }}
+{{ end }}
+
+<div dir="ltr">
+ {{ if eq ($.Scratch.Get "md") false }}
+ {{ .Inner }}
+ {{ else }}
+ {{ .Inner | markdownify }}
+ {{ end }}
+</div>
diff --git a/themes/PaperMod/layouts/shortcodes/rawhtml.html b/themes/PaperMod/layouts/shortcodes/rawhtml.html
new file mode 100644
index 0000000..9350c13
--- /dev/null
+++ b/themes/PaperMod/layouts/shortcodes/rawhtml.html
@@ -0,0 +1,2 @@
+<!-- raw html -->
+{{- .Inner -}} \ No newline at end of file
diff --git a/themes/PaperMod/layouts/shortcodes/rtl.html b/themes/PaperMod/layouts/shortcodes/rtl.html
new file mode 100644
index 0000000..a69b8ce
--- /dev/null
+++ b/themes/PaperMod/layouts/shortcodes/rtl.html
@@ -0,0 +1,15 @@
+{{ $.Scratch.Set "md" false }}
+
+{{ if .IsNamedParams }}
+{{ $.Scratch.Set "md" (.Get "md") }}
+{{ else }}
+{{ $.Scratch.Set "md" (.Get 0) }}
+{{ end }}
+
+<div dir="rtl">
+ {{ if eq ($.Scratch.Get "md") false }}
+ {{ .Inner }}
+ {{ else }}
+ {{ .Inner | markdownify }}
+ {{ end }}
+</div>