From 54375572e11d23dacb20c5742d171af3072d7b9c Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Thu, 28 Nov 2024 00:46:17 +0300 Subject: Серьезная реновация MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/neonxp/layouts/_default/baseof.html | 17 ----- themes/neonxp/layouts/_default/home.html | 29 -------- themes/neonxp/layouts/_default/list.html | 29 -------- themes/neonxp/layouts/_default/rss.xml | 47 ------------ themes/neonxp/layouts/_default/single.html | 46 ------------ themes/neonxp/layouts/partials/comments.html | 32 --------- themes/neonxp/layouts/partials/footer.html | 12 ---- themes/neonxp/layouts/partials/head.html | 9 --- themes/neonxp/layouts/partials/head/css.html | 36 ---------- themes/neonxp/layouts/partials/head/js.html | 12 ---- themes/neonxp/layouts/partials/header.html | 8 --- themes/neonxp/layouts/partials/hmenu.html | 51 -------------- themes/neonxp/layouts/partials/icon.html | 6 -- themes/neonxp/layouts/partials/list.html | 23 ------ themes/neonxp/layouts/partials/menu.html | 53 -------------- themes/neonxp/layouts/partials/pagination.html | 98 -------------------------- themes/neonxp/layouts/partials/terms.html | 9 --- themes/neonxp/layouts/shortcodes/figure.html | 38 ---------- themes/neonxp/layouts/shortcodes/gist.html | 1 - themes/neonxp/layouts/shortcodes/quote.html | 15 ---- 20 files changed, 571 deletions(-) delete mode 100644 themes/neonxp/layouts/_default/baseof.html delete mode 100644 themes/neonxp/layouts/_default/home.html delete mode 100644 themes/neonxp/layouts/_default/list.html delete mode 100644 themes/neonxp/layouts/_default/rss.xml delete mode 100644 themes/neonxp/layouts/_default/single.html delete mode 100644 themes/neonxp/layouts/partials/comments.html delete mode 100644 themes/neonxp/layouts/partials/footer.html delete mode 100644 themes/neonxp/layouts/partials/head.html delete mode 100644 themes/neonxp/layouts/partials/head/css.html delete mode 100644 themes/neonxp/layouts/partials/head/js.html delete mode 100644 themes/neonxp/layouts/partials/header.html delete mode 100644 themes/neonxp/layouts/partials/hmenu.html delete mode 100644 themes/neonxp/layouts/partials/icon.html delete mode 100644 themes/neonxp/layouts/partials/list.html delete mode 100644 themes/neonxp/layouts/partials/menu.html delete mode 100644 themes/neonxp/layouts/partials/pagination.html delete mode 100644 themes/neonxp/layouts/partials/terms.html delete mode 100644 themes/neonxp/layouts/shortcodes/figure.html delete mode 100644 themes/neonxp/layouts/shortcodes/gist.html delete mode 100644 themes/neonxp/layouts/shortcodes/quote.html (limited to 'themes/neonxp/layouts') diff --git a/themes/neonxp/layouts/_default/baseof.html b/themes/neonxp/layouts/_default/baseof.html deleted file mode 100644 index e2e4362..0000000 --- a/themes/neonxp/layouts/_default/baseof.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - {{ partial "head.html" . }} - - -
-
- {{ partial "header.html" . }} -
- {{ block "main" . }}{{ end }} -
- {{ partial "footer.html" . }} -
-
- - diff --git a/themes/neonxp/layouts/_default/home.html b/themes/neonxp/layouts/_default/home.html deleted file mode 100644 index d1ec7bc..0000000 --- a/themes/neonxp/layouts/_default/home.html +++ /dev/null @@ -1,29 +0,0 @@ -{{ define "main" }} -
- -
- - {{ $pages := where site.RegularPages "Type" "posts" }} - {{ $paginator := .Paginate $pages 7 }} - {{ range $paginator.Pages }} - {{ partial "list.html" . }} - {{ end }} - -
-
-{{ end }} diff --git a/themes/neonxp/layouts/_default/list.html b/themes/neonxp/layouts/_default/list.html deleted file mode 100644 index 208d565..0000000 --- a/themes/neonxp/layouts/_default/list.html +++ /dev/null @@ -1,29 +0,0 @@ -{{ define "main" }} -
- -
- {{ if .Title }} - - {{ end }} - {{ $paginator := .Paginate .Pages 7 }} - {{ range $paginator.Pages }} - {{ partial "list.html" . }} - {{ end }} - -
-
- -{{ end }} diff --git a/themes/neonxp/layouts/_default/rss.xml b/themes/neonxp/layouts/_default/rss.xml deleted file mode 100644 index da8fb0c..0000000 --- a/themes/neonxp/layouts/_default/rss.xml +++ /dev/null @@ -1,47 +0,0 @@ -{{- $pctx := . -}} -{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $pages := slice -}} -{{- if or $.IsHome $.IsSection -}} -{{- $pages = $pctx.RegularPages -}} -{{- else -}} -{{- $pages = $pctx.Pages -}} -{{- end -}} -{{- $pages := where $pages "Params.hidden" "!=" true -}} -{{- $limit := .Site.Config.Services.RSS.Limit -}} -{{- if ge $limit 1 -}} -{{- $pages = $pages | first $limit -}} -{{- end -}} -{{- printf "" | safeHTML }} -{{- printf "" | safeHTML }} - - - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} - Hugo -- gohugo.io{{ with .Site.LanguageCode }} - {{.}}{{end}}{{ with .Site.Params.Author.email }} - {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Params.Author.email }} - {{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} - {{.}}{{end}}{{ if not .Date.IsZero }} - {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - {{- with .OutputFormats.Get "RSS" -}} - {{ printf "" .Permalink .MediaType | safeHTML }} - {{- end -}} - {{ range $pages }} - {{- $content := safeHTML (.Summary | html) -}} - {{- if .Params.Description -}} - {{- $content = safeHTML ( .Params.Description | html) -}} - {{- end -}} - - {{ .Title }} - {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Params.Author.email }}{{.}}{{ with $.Site.Params.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} - - {{ $content }} - - - {{ end }} - - diff --git a/themes/neonxp/layouts/_default/single.html b/themes/neonxp/layouts/_default/single.html deleted file mode 100644 index e959051..0000000 --- a/themes/neonxp/layouts/_default/single.html +++ /dev/null @@ -1,46 +0,0 @@ -{{ define "main" }} -
- -
-
-
-
- {{ .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" .) }} - - - # - - {{ if .Params.Location }} - @ {{.Params.Location}} - {{ end }} -
-
-
- {{ if .Params.comments }} {{ partial "comments.html" . }} {{ end }} -
-
-{{ end }} diff --git a/themes/neonxp/layouts/partials/comments.html b/themes/neonxp/layouts/partials/comments.html deleted file mode 100644 index 77b4410..0000000 --- a/themes/neonxp/layouts/partials/comments.html +++ /dev/null @@ -1,32 +0,0 @@ -{{- with .Site.Params.comments -}} -
-
Комментарии
-
-
- -{{- end -}} \ No newline at end of file diff --git a/themes/neonxp/layouts/partials/footer.html b/themes/neonxp/layouts/partials/footer.html deleted file mode 100644 index f520850..0000000 --- a/themes/neonxp/layouts/partials/footer.html +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/themes/neonxp/layouts/partials/head.html b/themes/neonxp/layouts/partials/head.html deleted file mode 100644 index 6731ae0..0000000 --- a/themes/neonxp/layouts/partials/head.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - -{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} -{{ partialCached "head/css.html" . }} -{{ partialCached "head/js.html" . }} diff --git a/themes/neonxp/layouts/partials/head/css.html b/themes/neonxp/layouts/partials/head/css.html deleted file mode 100644 index c0dc59e..0000000 --- a/themes/neonxp/layouts/partials/head/css.html +++ /dev/null @@ -1,36 +0,0 @@ -{{- with resources.Get "css/pico.min.css" }} - {{- if eq hugo.Environment "development" }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} -{{- end }} -{{- with resources.Get "css/flexboxgrid.min.css" }} - {{- if eq hugo.Environment "development" }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} -{{- end }} -{{- with resources.Get "css/syntax.css" }} - {{- if eq hugo.Environment "development" }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} -{{- end }} -{{- with resources.Get "css/main.css" }} - {{- if eq hugo.Environment "development" }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/themes/neonxp/layouts/partials/head/js.html b/themes/neonxp/layouts/partials/head/js.html deleted file mode 100644 index 18fe842..0000000 --- a/themes/neonxp/layouts/partials/head/js.html +++ /dev/null @@ -1,12 +0,0 @@ -{{- with resources.Get "js/main.js" }} - {{- if eq hugo.Environment "development" }} - {{- with . | js.Build }} - - {{- end }} - {{- else }} - {{- $opts := dict "minify" true }} - {{- with . | js.Build $opts | fingerprint }} - - {{- end }} - {{- end }} -{{- end }} diff --git a/themes/neonxp/layouts/partials/header.html b/themes/neonxp/layouts/partials/header.html deleted file mode 100644 index c9b4934..0000000 --- a/themes/neonxp/layouts/partials/header.html +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/themes/neonxp/layouts/partials/hmenu.html b/themes/neonxp/layouts/partials/hmenu.html deleted file mode 100644 index 7183180..0000000 --- a/themes/neonxp/layouts/partials/hmenu.html +++ /dev/null @@ -1,51 +0,0 @@ -{{- /* -Renders a menu for the given menu ID. - -@context {page} page The current page. -@context {string} menuID The menu ID. - -@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} -*/}} - -{{- $page := .page }} -{{- $menuID := .menuID }} - -{{- with index site.Menus $menuID }} - -{{- end }} - -{{- define "partials/inline/menu/walk.html" }} - {{- $page := .page }} - {{- range .menuEntries }} - {{- $attrs := dict "href" .URL }} - {{- if $page.IsMenuCurrent .Menu . }} - {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} - {{- else if $page.HasMenuCurrent .Menu .}} - {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} - {{- end }} - {{- $name := .Name }} - {{- with .Identifier }} - {{- with T . }} - {{- $name = . }} - {{- end }} - {{- end }} -
  • - {{ $name }} - {{- with .Children }} - - {{- end }} -
  • - {{- end }} -{{- end }} diff --git a/themes/neonxp/layouts/partials/icon.html b/themes/neonxp/layouts/partials/icon.html deleted file mode 100644 index 72162e8..0000000 --- a/themes/neonxp/layouts/partials/icon.html +++ /dev/null @@ -1,6 +0,0 @@ -{{- $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 deleted file mode 100644 index 3c5811e..0000000 --- a/themes/neonxp/layouts/partials/list.html +++ /dev/null @@ -1,23 +0,0 @@ -
    -
    -
    - {{ .LinkTitle }} - {{ if .Date }} - - {{- .Date | time.Format (or .Site.Params.dateFormat.published "02 Jan 2006") -}} - - {{ end }} -
    -
    - {{ if .Description }} - {{ .Description }} - {{ else }} - {{ .Summary }} - {{ if .Truncated }} - Далее... - {{ end }} - {{ end }} -
    - {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} -
    -
    \ No newline at end of file diff --git a/themes/neonxp/layouts/partials/menu.html b/themes/neonxp/layouts/partials/menu.html deleted file mode 100644 index c860b4c..0000000 --- a/themes/neonxp/layouts/partials/menu.html +++ /dev/null @@ -1,53 +0,0 @@ -{{- /* -Renders a menu for the given menu ID. - -@context {page} page The current page. -@context {string} menuID The menu ID. - -@example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} -*/}} - -{{- $page := .page }} -{{- $menuID := .menuID }} - -{{- with index site.Menus $menuID }} - -{{- end }} - -{{- define "partials/inline/menu/walk.html" }} - {{- $page := .page }} - {{- range .menuEntries }} - {{- $attrs := dict "href" .URL }} - {{- if $page.IsMenuCurrent .Menu . }} - {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} - {{- else if $page.HasMenuCurrent .Menu .}} - {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} - {{- end }} - {{- $name := .Name }} - {{- with .Identifier }} - {{- with T . }} - {{- $name = . }} - {{- end }} - {{- end }} -
  • - {{ $name }} - {{- with .Children }} -
      - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} -
    - {{- end }} -
  • - {{- end }} -{{- end }} diff --git a/themes/neonxp/layouts/partials/pagination.html b/themes/neonxp/layouts/partials/pagination.html deleted file mode 100644 index ee7a171..0000000 --- a/themes/neonxp/layouts/partials/pagination.html +++ /dev/null @@ -1,98 +0,0 @@ -{{- $validFormats := slice "default" "terse" }} - -{{- $msg1 := "When passing a map to the internal pagination template, one of the elements must be named 'page', and it must be set to the context of the current page." }} -{{- $msg2 := "The 'format' specified in the map passed to the internal pagination template is invalid. Valid choices are: %s." }} - -{{- $page := . }} -{{- $format := "default" }} - -{{- if reflect.IsMap . }} - {{- with .page }} - {{- $page = . }} - {{- else }} - {{- errorf $msg1 }} - {{- end }} - {{- with .format }} - {{- $format = lower . }} - {{- end }} -{{- end }} - -{{- if in $validFormats $format }} - {{- if gt $page.Paginator.TotalPages 1 }} - - {{- end }} -{{- else }} - {{- errorf $msg2 (delimit $validFormats ", ") }} -{{- end -}} - -{{/* --------------------------------------------------------------------- */}} -{{- define "partials/inline/pagination/default" }} - {{- with .Paginator }} - {{- $currentPageNumber := .PageNumber }} - - {{- with .First }} - {{- if ne $currentPageNumber .PageNumber }} -
  • - -
  • - {{- else }} -
  • - -
  • - {{- end }} - {{- end }} - - {{- with .Prev }} -
  • - -
  • - {{- else }} -
  • - -
  • - {{- end }} - - {{- $slots := 5 }} - {{- $start := math.Max 1 (sub .PageNumber (math.Floor (div $slots 2))) }} - {{- $end := math.Min .TotalPages (sub (add $start $slots) 1) }} - {{- if lt (add (sub $end $start) 1) $slots }} - {{- $start = math.Max 1 (add (sub $end $slots) 1) }} - {{- end }} - - {{- range $k := seq $start $end }} - {{- if eq $.Paginator.PageNumber $k }} -
  • - [{{ $k }}] -
  • - {{- else }} -
  • - {{ $k }} -
  • - {{- end }} - {{- end }} - - {{- with .Next }} -
  • - -
  • - {{- else }} -
  • - -
  • - {{- end }} - - {{- with .Last }} - {{- if ne $currentPageNumber .PageNumber }} -
  • - -
  • - {{- else }} -
  • - -
  • - {{- end }} - {{- end }} - {{- end }} -{{- end -}} \ No newline at end of file diff --git a/themes/neonxp/layouts/partials/terms.html b/themes/neonxp/layouts/partials/terms.html deleted file mode 100644 index 9802a11..0000000 --- a/themes/neonxp/layouts/partials/terms.html +++ /dev/null @@ -1,9 +0,0 @@ -{{- $page := .page }} -{{- $taxonomy := .taxonomy }} - -{{- with $page.GetTerms $taxonomy }} - {{- $label := (index . 0).Parent.LinkTitle }} - {{- range . }} - {{ .LinkTitle }}  - {{- end }} -{{- end }} diff --git a/themes/neonxp/layouts/shortcodes/figure.html b/themes/neonxp/layouts/shortcodes/figure.html deleted file mode 100644 index a4bae51..0000000 --- a/themes/neonxp/layouts/shortcodes/figure.html +++ /dev/null @@ -1,38 +0,0 @@ - - {{- 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 deleted file mode 100644 index 783fa1e..0000000 --- a/themes/neonxp/layouts/shortcodes/gist.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/themes/neonxp/layouts/shortcodes/quote.html b/themes/neonxp/layouts/shortcodes/quote.html deleted file mode 100644 index 09bb07c..0000000 --- a/themes/neonxp/layouts/shortcodes/quote.html +++ /dev/null @@ -1,15 +0,0 @@ -
    -

    {{ .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