From 8b78390987476352a6459460e00d5c4cdc0717c2 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Wed, 20 Nov 2024 03:20:47 +0300 Subject: Обновил стиль MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/neonxp/layouts/shortcodes/figure.html | 38 ++++++++++++++++++++++++++++ themes/neonxp/layouts/shortcodes/gist.html | 1 + themes/neonxp/layouts/shortcodes/quote.html | 15 +++++++++++ 3 files changed, 54 insertions(+) create mode 100644 themes/neonxp/layouts/shortcodes/figure.html create mode 100644 themes/neonxp/layouts/shortcodes/gist.html create mode 100644 themes/neonxp/layouts/shortcodes/quote.html (limited to 'themes/neonxp/layouts/shortcodes') diff --git a/themes/neonxp/layouts/shortcodes/figure.html b/themes/neonxp/layouts/shortcodes/figure.html new file mode 100644 index 0000000..a4bae51 --- /dev/null +++ b/themes/neonxp/layouts/shortcodes/figure.html @@ -0,0 +1,38 @@ + + {{- if .Get "link" -}} + + {{- end -}} + + {{- $u := urls.Parse (.Get "src") -}} + {{- $src := $u.String -}} + {{- if not $u.IsAbs -}} + {{- with or (.Page.Resources.Get $u.Path) (resources.Get $u.Path) -}} + {{- $src = .RelPermalink -}} + {{- end -}} + {{- end -}} + + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} + {{ . }} + {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + \ No newline at end of file diff --git a/themes/neonxp/layouts/shortcodes/gist.html b/themes/neonxp/layouts/shortcodes/gist.html new file mode 100644 index 0000000..783fa1e --- /dev/null +++ b/themes/neonxp/layouts/shortcodes/gist.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/themes/neonxp/layouts/shortcodes/quote.html b/themes/neonxp/layouts/shortcodes/quote.html new file mode 100644 index 0000000..09bb07c --- /dev/null +++ b/themes/neonxp/layouts/shortcodes/quote.html @@ -0,0 +1,15 @@ +
+

{{ .Inner | markdownify }}

+ {{- if or (.Get "author") (.Get "source") -}} + + {{- if .Get "author" -}} + + {{- .Get "author" -}}{{- if .Get "source" -}}, {{ end -}} + + {{- end -}} + {{- with .Get "url" -}}{{- end -}} + {{ .Get "source" }} + {{- if .Get "url" -}}{{- end -}} + + {{- end -}} +
\ No newline at end of file -- cgit v1.2.3