diff options
author | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-12-22 02:13:20 +0300 |
---|---|---|
committer | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-12-22 02:13:20 +0300 |
commit | ef736304163e0952735a8620a48564c288864a94 (patch) | |
tree | 2155560a188341cf6d242856e397aa20775ca512 /layouts | |
parent | 4a53507256bfefd1e8094defd98d6b28316fa965 (diff) |
Auto-commit 2024-12-22
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/_markup/render-header.html | 0 | ||||
-rw-r--r-- | layouts/_default/list.gmi | 7 | ||||
-rw-r--r-- | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/_default/list.txt | 8 | ||||
-rw-r--r-- | layouts/_default/single.html | 31 | ||||
-rw-r--r-- | layouts/go/single.html | 22 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/pico8/single.html | 166 | ||||
-rw-r--r-- | layouts/projects/single.html | 54 | ||||
-rw-r--r-- | layouts/shortcodes/abbr.html | 1 |
10 files changed, 187 insertions, 106 deletions
diff --git a/layouts/_default/_markup/render-header.html b/layouts/_default/_markup/render-header.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/_default/_markup/render-header.html diff --git a/layouts/_default/list.gmi b/layouts/_default/list.gmi index 8560760..cbdba50 100644 --- a/layouts/_default/list.gmi +++ b/layouts/_default/list.gmi @@ -1,12 +1,7 @@ # {{ .Title }} -{{ $content := .Content -}} +{{ $content := .RawContent -}} -{{ $content := $content | replaceRE `{{<\s*(?:rel)?ref\s+"([^"]+)"\s*>}}` "$1" -}} -{{ $content := $content | replaceRE `{{<\s*figure\s*(?:.*)?src="([^"]+)"(?:.*)?caption="([^"]+)"(?:.*)?>}}` "![$2]($1)" -}} -{{ $content := $content | replaceRE `{{<\s*image\s*.*?src="([^"]+)".*?>}}` "![]($1)" -}} -{{ $content := $content | replaceRE "(?s:< !--more-- >)" "" -}} -{{ $content := $content | replace "<!-- more -->" "" -}} {{ $content := $content | replaceRE `\[(.+?)\]\((.+?)\)` "\n=> $2 $1\n" -}} {{ $content }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b7799ea..6409b6c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,7 +7,7 @@ {{ .Title }} </h1> {{ .Content }} - <a href="index.xml" class="btn btn-primary">{{ partial "icon.html" "rss" }} Пописка</a> + <a href="index.xml" class="btn btn-primary">{{ partial "icon.html" "rss" }} Подписка</a> {{ end }} </div> <div class="col-xs-12 col-sm-12 col-md-8 content"> diff --git a/layouts/_default/list.txt b/layouts/_default/list.txt index 3dbd917..0d9cee8 100644 --- a/layouts/_default/list.txt +++ b/layouts/_default/list.txt @@ -1,3 +1,9 @@ +# {{ .Title }} + +{{ $content := .RawContent -}} + +{{ $content }} + {{ range .Pages.ByPublishDate.Reverse }} -{{ .Date.Format "2006-01-02" }} {{ .Title }} {{ with .OutputFormats.Get "txt" -}} {{ .RelPermalink }}{{ end }} +=> {{ .RelPermalink | replaceRE `index.txt` `` }}{{if .Date }} {{ .Date.Format "2006-01-02" }}{{ end }} {{ .Title }} {{ end }}
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c5f73ba..507553d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,9 +1,28 @@ {{ define "main" }} -<div class="container mx-auto my-5"> - <div class="post"> - {{ partial "single/header.html" . }} - <div class="e-content">{{ .Content }}</div> - {{ partial "single/footer.html" . }} - </div> +<div class="container"> + <div class="row"> + <div class="col-xs-12 col-sm-12 col-md-4 sidebar"> + <h1 class="post-title fw-semibold">{{.Page.FirstSection.Title}}</h1> + {{ if len .Page.TableOfContents }} + <h2 class="fw-semibold">Содержание</h2> + {{ .Page.TableOfContents }} {{ end }} {{if .Page.FirstSection.Pages}} + <h2 class="fw-semibold">Остальное</h2> + <ul> + {{ range .Page.CurrentSection.Pages }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> + {{ end }} + </ul> + {{ end }} + </div> + <div class="col-xs-12 col-sm-12 col-md-8 content"> + <div class="post"> + {{ partial "single/header.html" . }} + <div class="e-content">{{ .Content }}</div> + {{ partial "single/footer.html" . }} + </div> + </div> + </div> </div> {{ end }} diff --git a/layouts/go/single.html b/layouts/go/single.html index 75cf89f..99c6d28 100644 --- a/layouts/go/single.html +++ b/layouts/go/single.html @@ -1,5 +1,22 @@ {{ define "main" }} -<div class="container mx-auto my-5"> +<div class="container"> + <div class="row"> + <div class="col-xs-12 col-sm-12 col-md-4 sidebar"> + <h1 class="post-title fw-semibold">{{.Page.FirstSection.Title}}</h1> + {{ if .Page.TableOfContents }} + <h2 class="fw-semibold">Содержание</h2> + {{ .Page.TableOfContents }} {{ end }} {{if .Page.FirstSection.Pages}} + <h2 class="fw-semibold">Остальное</h2> + <ul> + {{ range .Page.CurrentSection.Pages }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> + {{ end }} + </ul> + {{ end }} + </div> + <div class="col-xs-12 col-sm-12 col-md-8 content"> <div class="post"> {{ partial "single/header.html" . }} <div class="alert alert-info" role="alert"> @@ -14,4 +31,7 @@ {{ partial "single/footer.html" . }} </div> </div> + </div> + </div> + </div> {{ end }}
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 2347e65..3c1a604 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -8,7 +8,7 @@ </h1> <img src="{{.Site.Params.Logo}}" /> {{ .Content }} - <a href="/feed/" class="btn btn-primary">{{ partial "icon.html" "rss" }} Пописка</a> + <a href="/feed/" class="btn btn-primary">{{ partial "icon.html" "rss" }} Подписка</a> {{ end }} </div> <div class="col-xs-12 col-sm-12 col-md-8 content"> diff --git a/layouts/pico8/single.html b/layouts/pico8/single.html index 01797ce..4871f4f 100644 --- a/layouts/pico8/single.html +++ b/layouts/pico8/single.html @@ -1,79 +1,97 @@ {{ define "main" }} -<div class="posts-container mx-auto my-5"> - <div class="post"> - {{ partial "single/header.html" . }} - <div id="pico-container"> - <!-- <div class="buttons"> - <button - id="pico-up" - style="grid-area: up" - onclick="PicoPress(3, 0)" - > - ⇑ - </button> - <button - id="pico-down" - style="grid-area: down" - onclick="PicoPress(3, 0)" - > - ⇓ - </button> - <button - id="pico-left" - style="grid-area: left" - onclick="PicoPress(3, 0)" - > - ⇐ - </button> - <button - id="pico-right" - style="grid-area: right" - onclick="PicoPress(3, 0)" - > - ⇒ - </button> - <button - id="pico-a" - style="grid-area: a" - onclick="PicoPress(3, 0)" - > - A - </button> - <button - id="pico-b" - style="grid-area: b" - onclick="PicoPress(3, 0)" - > - B - </button> - <div class="square_hack"></div> - </div> --> - </div> - <h2>Управление</h2> - <h3>Игрок 1</h3> - <img src="/img/p8_lf.webp" />← - <img src="/img/p8_rt.webp" />→ - <img src="/img/p8_up.webp" />↑ - <img src="/img/p8_dw.webp" />↓ - <img src="/img/p8_x.webp" />Z C - <img src="/img/p8_o.webp" />X V - <h3>Игрок 2</h3> - <img src="/img/p8_lf.webp" /> S - <img src="/img/p8_rt.webp" /> F - <img src="/img/p8_up.webp" /> E - <img src="/img/p8_dw.webp" /> D - <img src="/img/p8_x.webp" />Q W - <img src="/img/p8_o.webp" />TAB - <h3>Пауза</h3> - P/Enter - <footer> - <div class="row between-xs"> - <a href="{{ .Params.Game }}">Скачать</a> - </div> - </footer> - {{ partial "single/footer.html" . }} +<div class="container"> + <div class="row"> + <div class="col-xs-12 col-sm-12 col-md-4 sidebar"> + <h1 class="post-title fw-semibold">{{.Page.CurrentSection.Title}}</h1> + {{if .Page.CurrentSection.Pages}} + <h2 class="fw-semibold">Остальное</h2> + <ul> + {{ range .Page.CurrentSection.Pages }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> + {{ end }} + </ul> + {{ end }} </div> - </div> + <div class="col-xs-12 col-sm-12 col-md-8 content"> + <div class="post"> + {{ partial "single/header.html" . }} + <div id="pico-container"> + <!-- <div class="buttons"> + <button + id="pico-up" + style="grid-area: up" + onclick="PicoPress(3, 0)" + > + ⇑ + </button> + <button + id="pico-down" + style="grid-area: down" + onclick="PicoPress(3, 0)" + > + ⇓ + </button> + <button + id="pico-left" + style="grid-area: left" + onclick="PicoPress(3, 0)" + > + ⇐ + </button> + <button + id="pico-right" + style="grid-area: right" + onclick="PicoPress(3, 0)" + > + ⇒ + </button> + <button + id="pico-a" + style="grid-area: a" + onclick="PicoPress(3, 0)" + > + A + </button> + <button + id="pico-b" + style="grid-area: b" + onclick="PicoPress(3, 0)" + > + B + </button> + <div class="square_hack"></div> + </div> --> + </div> + <h2>Управление</h2> + <h3>Игрок 1</h3> + <img src="/img/p8_lf.webp" />← + <img src="/img/p8_rt.webp" />→ + <img src="/img/p8_up.webp" />↑ + <img src="/img/p8_dw.webp" />↓ + <img src="/img/p8_x.webp" />Z C + <img src="/img/p8_o.webp" />X V + <h3>Игрок 2</h3> + <img src="/img/p8_lf.webp" /> S + <img src="/img/p8_rt.webp" /> F + <img src="/img/p8_up.webp" /> E + <img src="/img/p8_dw.webp" /> D + <img src="/img/p8_x.webp" />Q W + <img src="/img/p8_o.webp" />TAB + <h3>Пауза</h3> + P/Enter + <footer> + <div class="row between-xs"> + <a href="{{ .Params.Game }}">Скачать</a> + </div> + </footer> + {{ partial "single/footer.html" . }} + </div> + </div> + </div> + </div> +</div> <script src="/js/picoplayer.js"></script> <script src="/js/pico8.js"></script> diff --git a/layouts/projects/single.html b/layouts/projects/single.html index c10b21c..35ef62b 100644 --- a/layouts/projects/single.html +++ b/layouts/projects/single.html @@ -1,21 +1,43 @@ {{ define "main" }} -<div class="container mx-auto my-5"> - <div class="post"> - {{ partial "single/header.html" . }} - <div class="alert alert-info" role="alert"> - <div class="btn-group"> - <a class="btn btn-primary" href="{{.Params.project_url}}"> - {{ partial "icon.html" "link" }} {{.Params.project_url}} - </a> - {{ if .Params.git_url}} - <a class="btn btn-primary" href="{{.Params.git_url}}"> - {{ partial "icon.html" "git" }} {{.Params.git_url}} - </a> - {{ end }} - </div> +<div class="container"> + <div class="row"> + <div class="col-xs-12 col-sm-12 col-md-4 sidebar"> + <h1 class="post-title fw-semibold">{{.Page.CurrentSection.Title}}</h1> + {{ if .Page.TableOfContents }} + <h2 class="fw-semibold">Содержание</h2> + {{ .Page.TableOfContents }} + {{ end }} + {{if .Page.CurrentSection.Pages}} + <h2 class="fw-semibold">Остальное</h2> + <ul> + {{ range .Page.CurrentSection.Pages }} + <li> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> + {{ end }} + </ul> + {{ end }} + </div> + <div class="col-xs-12 col-sm-12 col-md-8 content"> + <div class="post"> + {{ partial "single/header.html" . }} + <div class="alert alert-info" role="alert"> + <div class="btn-group"> + <a class="btn btn-primary" href="{{.Params.project_url}}"> + {{ partial "icon.html" "link" }} {{.Params.project_url}} + </a> + {{ if .Params.git_url}} + <a class="btn btn-primary" href="{{.Params.git_url}}"> + {{ partial "icon.html" "git" }} {{.Params.git_url}} + </a> + {{ end }} + </div> + </div> + <div class="e-content">{{ .Content }}</div> + {{ partial "single/footer.html" . }} </div> - <div class="e-content">{{ .Content }}</div> - {{ partial "single/footer.html" . }} + </div> </div> + </div> </div> {{ end }} diff --git a/layouts/shortcodes/abbr.html b/layouts/shortcodes/abbr.html new file mode 100644 index 0000000..7ccfcd3 --- /dev/null +++ b/layouts/shortcodes/abbr.html @@ -0,0 +1 @@ +<abbr title="{{ .Get "title" }}">{{ .Get "text" }}</abbr>
\ No newline at end of file |