diff options
Diffstat (limited to 'themes/neonxp/layouts/partials')
-rw-r--r-- | themes/neonxp/layouts/partials/comments.html | 32 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/footer.html | 12 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/head.html | 9 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/head/css.html | 36 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/head/js.html | 12 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/header.html | 8 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/hmenu.html | 51 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/icon.html | 6 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/list.html | 23 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/menu.html | 53 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/pagination.html | 98 | ||||
-rw-r--r-- | themes/neonxp/layouts/partials/terms.html | 9 |
12 files changed, 0 insertions, 349 deletions
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 -}} -<article class="comments"> - <header>Комментарии</header> - <div id="remark42"></div> -</article> -<script> - var remark_config = { - host: '{{ .host }}', - site_id: '{{ .site }}', - components: ['embed'], - url: '{{ $.Permalink }}', - max_shown_comments: {{ default 15 .max_shown_comments }}, - theme: (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)?'dark':'light', - page_title: '{{ $.Title }}', - locale: '{{ default "en" .locale }}', - show_email_subscription: {{ default true .show_email_subscription }} - }; - - !function(e, n) { - for (var o = 0; o < e.length; o++) { - var r = n.createElement('script'), - c = '.js', - d = n.head || n.body; - 'noModule' in r ? (r.type = 'module', c = '.mjs') : r.async = !0, r.defer = !0, r.src = remark_config.host + '/web/' + e[o] + c, d.appendChild(r) - } - }(remark_config.components || ['embed'], document); - - window.addEventListener('onColorSchemeChange', (e) => { - window.REMARK42.changeTheme(e.detail); - }) -</script> -{{- 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 @@ -<nav> - <ul> - <li> - <cite>2007—{{ now.Year }} Александр NeonXP Кирюхин. г.Казань</cite> - </li> - </ul> - <ul> - <li><a href="https://git.neonxp.ru/neonxp/blog">Исходный код</a></li> - <li><a href="mailto:i@neonxp.ru" rel="me">Электропочта</a></li> - <li><a href="https://neonxp.ru/posts/index.xml">РСС</a></li> - </ul> -</nav> 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 @@ -<meta charset="utf-8"> -<meta name="viewport" content="width=device-width"> -<link rel="icon" type="image/png" href="/favicon.png"> -<link rel="authorization_endpoint" href="https://indieauth.com/auth"> -<link rel="token_endpoint" href="https://tokens.indieauth.com/token"> -<link rel="micropub" href="https://neonxp.ru/micropub"> -<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title> -{{ 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" }} - <link rel="stylesheet" href="{{ .RelPermalink }}"> - {{- else }} - {{- with . | minify | fingerprint }} - <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> - {{- end }} - {{- end }} -{{- end }} -{{- with resources.Get "css/flexboxgrid.min.css" }} - {{- if eq hugo.Environment "development" }} - <link rel="stylesheet" href="{{ .RelPermalink }}"> - {{- else }} - {{- with . | minify | fingerprint }} - <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> - {{- end }} - {{- end }} -{{- end }} -{{- with resources.Get "css/syntax.css" }} - {{- if eq hugo.Environment "development" }} - <link rel="stylesheet" href="{{ .RelPermalink }}"> - {{- else }} - {{- with . | minify | fingerprint }} - <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> - {{- end }} - {{- end }} -{{- end }} -{{- with resources.Get "css/main.css" }} - {{- if eq hugo.Environment "development" }} - <link rel="stylesheet" href="{{ .RelPermalink }}"> - {{- else }} - {{- with . | minify | fingerprint }} - <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> - {{- 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 }} - <script src="{{ .RelPermalink }}"></script> - {{- end }} - {{- else }} - {{- $opts := dict "minify" true }} - {{- with . | js.Build $opts | fingerprint }} - <script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script> - {{- 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 @@ -<nav> - <ul> - <li> - <a href="/"><img class="logo" src="{{ .Site.Params.Logo }}" /><strong>{{ .Site.Title }}</strong></a> - </li> - </ul> - {{ partial "hmenu.html" (dict "menuID" "main" "page" .) }} -</nav> 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 }} - <nav> - <ul> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ul> - </nav> -{{- 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 }} - <li> - <a - {{- range $k, $v := $attrs }} - {{- with $v }} - {{- printf " %s=%q" $k $v | safeHTMLAttr }} - {{- end }} - {{- end -}} - >{{ $name }}</a> - {{- with .Children }} - <ul> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ul> - {{- end }} - </li> - {{- 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 @@ -<article> - <header> - <div class="row between-sm"> - <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> - {{ if .Date }} - <span> - {{- .Date | time.Format (or .Site.Params.dateFormat.published "02 Jan 2006") -}} - </span> - {{ end }} - </div> - </header> - {{ if .Description }} - {{ .Description }} - {{ else }} - {{ .Summary }} - {{ if .Truncated }} - <a href="{{ .RelPermalink }}">Далее...</a> - {{ end }} - {{ end }} - <footer> - {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} - </footer> -</article>
\ 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 }} - <aside> - <nav> - <ol> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ol> - </nav> - </aside> -{{- 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 }} - <li> - <a - {{- range $k, $v := $attrs }} - {{- with $v }} - {{- printf " %s=%q" $k $v | safeHTMLAttr }} - {{- end }} - {{- end -}} - >{{ $name }}</a> - {{- with .Children }} - <ol> - {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} - </ol> - {{- end }} - </li> - {{- 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 }} - <ul class="pagination pagination-{{ $format }}"> - {{- partial (printf "partials/inline/pagination/%s" $format) $page }} - </ul> - {{- end }} -{{- else }} - {{- errorf $msg2 (delimit $validFormats ", ") }} -{{- end -}} - -{{/* --------------------------------------------------------------------- */}} -{{- define "partials/inline/pagination/default" }} - {{- with .Paginator }} - {{- $currentPageNumber := .PageNumber }} - - {{- with .First }} - {{- if ne $currentPageNumber .PageNumber }} - <li class="page-item"> - <a href="{{ .URL }}" aria-label="First" class="page-link"><span aria-hidden="true">⇚</span></a> - </li> - {{- else }} - <li class="page-item disabled"> - <a aria-disabled="true" aria-label="First" class="page-link" tabindex="-1"><span aria-hidden="true">⇚</span></a> - </li> - {{- end }} - {{- end }} - - {{- with .Prev }} - <li class="page-item"> - <a href="{{ .URL }}" aria-label="Previous" class="page-link"><span aria-hidden="true">←</span></a> - </li> - {{- else }} - <li class="page-item disabled"> - <a aria-disabled="true" aria-label="Previous" class="page-link" tabindex="-1"><span aria-hidden="true">←</span></a> - </li> - {{- 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 }} - <li class="page-item active"> - [{{ $k }}] - </li> - {{- else }} - <li class="page-item"> - <a href="{{ (index $.Paginator.Pagers (sub $k 1)).URL }}" aria-label="Page {{ $k }}" class="page-link">{{ $k }}</a> - </li> - {{- end }} - {{- end }} - - {{- with .Next }} - <li class="page-item"> - <a href="{{ .URL }}" aria-label="Next" class="page-link"><span aria-hidden="true">→</span></a> - </li> - {{- else }} - <li class="page-item disabled"> - <a aria-disabled="true" aria-label="Next" class="page-link" tabindex="-1"><span aria-hidden="true">→</span></a> - </li> - {{- end }} - - {{- with .Last }} - {{- if ne $currentPageNumber .PageNumber }} - <li class="page-item"> - <a href="{{ .URL }}" aria-label="Last" class="page-link"><span aria-hidden="true">⇛</span></a> - </li> - {{- else }} - <li class="page-item disabled"> - <a aria-disabled="true" aria-label="Last" class="page-link" tabindex="-1"><span aria-hidden="true">⇛</span></a> - </li> - {{- 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 . }} - <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> - {{- end }} -{{- end }} |