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/_default/home.html | 7 +++-- themes/neonxp/layouts/_default/list.html | 7 ++++- themes/neonxp/layouts/_default/single.html | 8 ++++-- themes/neonxp/layouts/partials/icon.html | 6 +++++ themes/neonxp/layouts/partials/list.html | 16 +++++++----- themes/neonxp/layouts/shortcodes/figure.html | 38 ++++++++++++++++++++++++++++ themes/neonxp/layouts/shortcodes/gist.html | 1 + themes/neonxp/layouts/shortcodes/quote.html | 15 +++++++++++ 8 files changed, 86 insertions(+), 12 deletions(-) create mode 100644 themes/neonxp/layouts/partials/icon.html 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') diff --git a/themes/neonxp/layouts/_default/home.html b/themes/neonxp/layouts/_default/home.html index 9d97e21..d1ec7bc 100644 --- a/themes/neonxp/layouts/_default/home.html +++ b/themes/neonxp/layouts/_default/home.html @@ -8,8 +8,11 @@
-
- {{ .Title }} +
+
+ {{ .Title }} + {{ partial "icon.html" "rss" }} +
{{ .Content }} diff --git a/themes/neonxp/layouts/_default/list.html b/themes/neonxp/layouts/_default/list.html index 6a399e7..208d565 100644 --- a/themes/neonxp/layouts/_default/list.html +++ b/themes/neonxp/layouts/_default/list.html @@ -9,7 +9,12 @@
{{ if .Title }} {{ end }} diff --git a/themes/neonxp/layouts/_default/single.html b/themes/neonxp/layouts/_default/single.html index 1508d26..e959051 100644 --- a/themes/neonxp/layouts/_default/single.html +++ b/themes/neonxp/layouts/_default/single.html @@ -14,17 +14,20 @@
-
+
+
{{ .Title }} {{ if .Date }} {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ $dateHuman := .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") }} {{ end }} +
{{ .Summary }}
{{ .Content }}
-
+
+
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} @@ -34,6 +37,7 @@ {{ if .Params.Location }} @ {{.Params.Location}} {{ end }} +
{{ if .Params.comments }} {{ partial "comments.html" . }} {{ end }} diff --git a/themes/neonxp/layouts/partials/icon.html b/themes/neonxp/layouts/partials/icon.html new file mode 100644 index 0000000..72162e8 --- /dev/null +++ b/themes/neonxp/layouts/partials/icon.html @@ -0,0 +1,6 @@ +{{- $iconFile := resources.GetMatch (printf "icons/%s.svg" .) -}} +{{- if $iconFile -}} + {{- $iconFile.Content | safeHTML -}} +{{- else -}} + {{- errorf "Error: icon '%s.svg' is not found under 'assets/icons' folder" . -}} +{{- end -}} \ No newline at end of file diff --git a/themes/neonxp/layouts/partials/list.html b/themes/neonxp/layouts/partials/list.html index 72d546c..3c5811e 100644 --- a/themes/neonxp/layouts/partials/list.html +++ b/themes/neonxp/layouts/partials/list.html @@ -1,11 +1,13 @@
-
- {{ .LinkTitle }} - {{ if .Date }} - - {{- .Date | time.Format (or .Site.Params.dateFormat.published "02 Jan 2006") -}} - - {{ end }} +
+
+ {{ .LinkTitle }} + {{ if .Date }} + + {{- .Date | time.Format (or .Site.Params.dateFormat.published "02 Jan 2006") -}} + + {{ end }} +
{{ if .Description }} {{ .Description }} 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