From 49458f5ffd5a48c465117ec27f6437683f75acc1 Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Sat, 31 Jan 2026 20:38:50 +0300 Subject: initial --- themes/neonxp/layouts/_default/section.atom.xml | 23 ++++++++++++ themes/neonxp/layouts/_partials/footer.html | 1 + themes/neonxp/layouts/_partials/head.html | 12 ++++++ themes/neonxp/layouts/_partials/head/css.html | 27 +++++++++++++ themes/neonxp/layouts/_partials/head/js.html | 16 ++++++++ themes/neonxp/layouts/_partials/header.html | 2 + themes/neonxp/layouts/_partials/menu.html | 50 +++++++++++++++++++++++++ themes/neonxp/layouts/_partials/terms.html | 27 +++++++++++++ themes/neonxp/layouts/baseof.html | 17 +++++++++ themes/neonxp/layouts/home.html | 21 +++++++++++ themes/neonxp/layouts/page.html | 37 ++++++++++++++++++ themes/neonxp/layouts/section.html | 26 +++++++++++++ themes/neonxp/layouts/taxonomy.html | 11 ++++++ themes/neonxp/layouts/term.html | 7 ++++ 14 files changed, 277 insertions(+) create mode 100644 themes/neonxp/layouts/_default/section.atom.xml create mode 100644 themes/neonxp/layouts/_partials/footer.html create mode 100644 themes/neonxp/layouts/_partials/head.html create mode 100644 themes/neonxp/layouts/_partials/head/css.html create mode 100644 themes/neonxp/layouts/_partials/head/js.html create mode 100644 themes/neonxp/layouts/_partials/header.html create mode 100644 themes/neonxp/layouts/_partials/menu.html create mode 100644 themes/neonxp/layouts/_partials/terms.html create mode 100644 themes/neonxp/layouts/baseof.html create mode 100644 themes/neonxp/layouts/home.html create mode 100644 themes/neonxp/layouts/page.html create mode 100644 themes/neonxp/layouts/section.html create mode 100644 themes/neonxp/layouts/taxonomy.html create mode 100644 themes/neonxp/layouts/term.html (limited to 'themes/neonxp/layouts') diff --git a/themes/neonxp/layouts/_default/section.atom.xml b/themes/neonxp/layouts/_default/section.atom.xml new file mode 100644 index 0000000..9ddb7d2 --- /dev/null +++ b/themes/neonxp/layouts/_default/section.atom.xml @@ -0,0 +1,23 @@ +{{ print ""| safeHTML }} +{{ print ""| safeHTML }} + + {{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }} + + {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }} + + Alexander NeonXP Kiryukhin + i@neonxp.ru + https://neonxp.ru/ + + {{ .Permalink }} + {{ range first 15 .Data.Pages }} + + {{ .Title }} + + {{ .Permalink }} + {{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }} + {{ .Lastmod.Format "2006-01-02T15:04:05-0700" | safeHTML }} + {{ .Content | html }} + + {{ end }} + diff --git a/themes/neonxp/layouts/_partials/footer.html b/themes/neonxp/layouts/_partials/footer.html new file mode 100644 index 0000000..2c30eaa --- /dev/null +++ b/themes/neonxp/layouts/_partials/footer.html @@ -0,0 +1 @@ +

© 2007 — {{ now.Year }} Александр NeonXP Кирюхин. i@neonxp.ru

\ No newline at end of file diff --git a/themes/neonxp/layouts/_partials/head.html b/themes/neonxp/layouts/_partials/head.html new file mode 100644 index 0000000..7826e2a --- /dev/null +++ b/themes/neonxp/layouts/_partials/head.html @@ -0,0 +1,12 @@ + + + +{{ partial "opengraph.html" . }} + + {{ if .IsHome }} + {{ site.Title }} + {{ else }} + {{ printf "%s | %s" .Title site.Title }} + {{ end }} + +{{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} \ No newline at end of file diff --git a/themes/neonxp/layouts/_partials/head/css.html b/themes/neonxp/layouts/_partials/head/css.html new file mode 100644 index 0000000..9324758 --- /dev/null +++ b/themes/neonxp/layouts/_partials/head/css.html @@ -0,0 +1,27 @@ +{{- with resources.Get "css/reset.css" }} +{{- if hugo.IsDevelopment }} + +{{- else }} +{{- with . | minify | fingerprint }} + +{{- end }} +{{- end }} +{{- end }} +{{- with resources.Get "css/paper.css" }} +{{- if hugo.IsDevelopment }} + +{{- else }} +{{- with . | minify | fingerprint }} + +{{- end }} +{{- end }} +{{- end }} +{{- with resources.Get "css/main.css" }} +{{- if hugo.IsDevelopment }} + +{{- 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 new file mode 100644 index 0000000..1b7c18e --- /dev/null +++ b/themes/neonxp/layouts/_partials/head/js.html @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/themes/neonxp/layouts/_partials/header.html b/themes/neonxp/layouts/_partials/header.html new file mode 100644 index 0000000..7980a00 --- /dev/null +++ b/themes/neonxp/layouts/_partials/header.html @@ -0,0 +1,2 @@ +

{{ site.Title }}

+{{ partial "menu.html" (dict "menuID" "main" "page" .) }} diff --git a/themes/neonxp/layouts/_partials/menu.html b/themes/neonxp/layouts/_partials/menu.html new file mode 100644 index 0000000..ebad53f --- /dev/null +++ b/themes/neonxp/layouts/_partials/menu.html @@ -0,0 +1,50 @@ +{{- /* +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 }} +
  • + + {{if .Pre}} + {{.Pre}} + {{end}} + {{ $name }} + + {{- with .Children }} + + {{- 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 new file mode 100644 index 0000000..f826abb --- /dev/null +++ b/themes/neonxp/layouts/_partials/terms.html @@ -0,0 +1,27 @@ +{{- /* +For a given taxonomy, renders a list of terms assigned to the page. + +@context {page} page The current page. +@context {string} taxonomy The taxonomy. + +@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +*/}} + +{{- $page := .page }} +{{- $taxonomy := .taxonomy }} + +{{- with $page.GetTerms $taxonomy }} +{{- if . }} +
    + {{- $label := (index . 0).Parent.LinkTitle }} +
    +

    {{ $label }}:

    + +
    + {{- end }} +
    +{{- end }} \ No newline at end of file diff --git a/themes/neonxp/layouts/baseof.html b/themes/neonxp/layouts/baseof.html new file mode 100644 index 0000000..39dcbec --- /dev/null +++ b/themes/neonxp/layouts/baseof.html @@ -0,0 +1,17 @@ + + + + {{ partial "head.html" . }} + + +
    + {{ partial "header.html" . }} +
    +
    + {{ block "main" . }}{{ end }} +
    + + + diff --git a/themes/neonxp/layouts/home.html b/themes/neonxp/layouts/home.html new file mode 100644 index 0000000..1f26b97 --- /dev/null +++ b/themes/neonxp/layouts/home.html @@ -0,0 +1,21 @@ +{{ define "main" }} +
    +

    {{ .Title }}

    + {{ .Content }} +
    +
    + {{ range .Pages }} +
    +

    {{ .LinkTitle }}

    + {{if .Date }} + {{ $dateMachine := .Date | time.Format "2006-01-02 15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + {{end}} +
    + {{ .Summary }} +
    +
    + {{ end }} +
    +{{ end }} \ No newline at end of file diff --git a/themes/neonxp/layouts/page.html b/themes/neonxp/layouts/page.html new file mode 100644 index 0000000..506b56a --- /dev/null +++ b/themes/neonxp/layouts/page.html @@ -0,0 +1,37 @@ +{{ define "main" }} +
    +
    +

    {{ .Title }}

    + {{if .Date }} + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + {{end}} +
    +
    + {{ .Content }} +
    + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} + {{if .Param "comments"}} +

    Комментарии

    + {{ range $key, $comment := where .Site.Data.comments "url" "eq" .Page.Path }} +
    + {{$comment.from}}: +

    {{$comment.comment}}

    +
    + {{ else }} +
    Комментариев пока нет.
    + {{ end }} + +
    + {{ $comment := (print "mailto:blog@neonxp.ru?subject=" .Page.Permalink | safeHTML) }} + Для отправки комментария достаточно отправить e-mail со своим комментарием + на адрес + blog@neonxp.ru, в теме нужно указать ссылку на + пост.
    + Или просто нажать кнопку ниже. Всё очень просто :)
    + Написать комментарий +
    + {{end}} +
    +{{ end }} \ No newline at end of file diff --git a/themes/neonxp/layouts/section.html b/themes/neonxp/layouts/section.html new file mode 100644 index 0000000..a330f20 --- /dev/null +++ b/themes/neonxp/layouts/section.html @@ -0,0 +1,26 @@ +{{ define "main" }} +
    +

    {{ .Title }}

    + {{ .Content }} +
    +
    + + {{ range .Paginator.Pages }} +
    +

    {{ .LinkTitle }}

    + {{if .Date }} + {{ $dateMachine := .Date | time.Format "2006-01-02 15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + {{end}} +
    + {{ .Summary }} +
    + Читать дальше... +
    + {{ end }} +
    + {{ partial "pagination.html" . }} +
    +
    +{{ end }} \ No newline at end of file diff --git a/themes/neonxp/layouts/taxonomy.html b/themes/neonxp/layouts/taxonomy.html new file mode 100644 index 0000000..ff8e552 --- /dev/null +++ b/themes/neonxp/layouts/taxonomy.html @@ -0,0 +1,11 @@ +{{ define "main" }} +
    +

    {{ .Title }}

    + {{ .Content }} +
    +
    + {{ range .Pages }} +

    {{ .LinkTitle }}

    + {{ end }} +
    +{{ end }} \ No newline at end of file diff --git a/themes/neonxp/layouts/term.html b/themes/neonxp/layouts/term.html new file mode 100644 index 0000000..c2e7875 --- /dev/null +++ b/themes/neonxp/layouts/term.html @@ -0,0 +1,7 @@ +{{ define "main" }} +

    {{ .Title }}

    + {{ .Content }} + {{ range .Pages }} +

    {{ .LinkTitle }}

    + {{ end }} +{{ end }} -- cgit v1.2.3