Фикс темы под мобильные устройства

This commit is contained in:
Александр Кирюхин 2024-11-18 23:18:18 +03:00
parent 1c1ae00942
commit 74b65dd83f
Signed by: neonxp
SSH key fingerprint: SHA256:SVt7TjxbVc87m1QYaQziOJ0N3OCFURv2g76gD/UTTXI
14 changed files with 101 additions and 107 deletions

View file

@ -1,6 +1,6 @@
+++ +++
title = '~/NeonXP.log' title = 'Привет!'
+++ +++
Добро пожаловать на мой личный сервер. Да, это старая добрая домашняя страница, персональный сайт, «хомяк», называйте как привычнее. Добро пожаловать на мой личный сервер. Да, это старая добрая домашняя страница, персональный сайт, «хомяк», называйте как привычнее.
<!--more--> <!--more-->
Меня зовут Саня, я Go разработчик. Остальное обо мне на [отдельной странице](/pages/me). А ниже [мой бортжурнал](/posts/). Меня зовут Саня, я Go разработчик. Остальное обо мне на [отдельной странице](/pages/me). А рядом — [мой бортжурнал](/posts/).

View file

@ -15,7 +15,7 @@ enabled = true
enabled = true enabled = true
[params.dateFormat] [params.dateFormat]
published = "02.01.2006" published = "Monday, 02 January 2006"
lastUpdated = "15:04 02.01.2006" lastUpdated = "15:04 02.01.2006"
[params.comments] [params.comments]

File diff suppressed because one or more lines are too long

View file

@ -12,21 +12,36 @@
height: 64px; height: 64px;
} }
@media (min-width: 1030px) { .print-footer {
.single-page { display: none;
display: flex; }
flex-direction: row;
gap: var(--pico-block-spacing-horizontal); @media print {
}
.sidebar { .sidebar {
min-width: 300px; display: none;
height: auto;
} }
.sidebar .toc { article {
min-width: 300px; border: 0
}
article footer {
display: none;
}
.container>header {
display: none;
}
.container>footer {
display: none;
}
.comments {
display: none;
} }
.h-entry { .h-entry {
width: 100%; width: 100% !important;
max-width: 1130px; }
.container {
width: 100% !important;
}
.print-footer {
display: block !important;
} }
} }

View file

@ -1,7 +1,26 @@
{{ define "main" }} {{ define "main" }}
{{ .Content }} <div class="row">
{{ range site.RegularPages }} <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 last-xs last-sm first-md first-lg sidebar">
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> <article>
{{ .Summary }} <header>Навигатор</header>
{{ end }} {{ partial "menu.html" (dict "menuID" "sections" "page" .) }}
</article>
</div>
<div class="h-entry col-xs-12 col-sm-12 col-md-8 col-lg-8">
<article>
<header class="p-name">
{{ .Title }}
</header>
<div class="e-content">
{{ .Content }}
</div>
</article>
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate $pages 7 }}
{{ range $paginator.Pages }}
{{ partial "list.html" . }}
{{ end }}
<nav>{{ partial "pagination.html" . }}</nav>
</div>
</div>
{{ end }} {{ end }}

View file

@ -1,19 +1,18 @@
{{ define "main" }} {{ define "main" }}
<div class="single-page"> <div class="row">
<div class="sidebar"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 last-xs last-sm first-md first-lg sidebar">
<article class="toc"> <article>
<header>Навигатор</header> <header>Навигатор</header>
{{ partial "menu.html" (dict "menuID" "sections" "page" .) }} {{ partial "menu.html" (dict "menuID" "sections" "page" .) }}
</article> </article>
</div> </div>
<div class="h-entry"> <div class="h-entry col-xs-12 col-sm-12 col-md-8 col-lg-8">
{{ if .Title }} {{ if .Title }}
<article> <article>
<header>{{ .Title }}</header> <header>{{ .Title }}</header>
{{ .Content }} {{ .Content }}
</article> </article>
{{ end }} {{ end }}
<h1>Страницы:</h1>
{{ $paginator := .Paginate .Pages 7 }} {{ $paginator := .Paginate .Pages 7 }}
{{ range $paginator.Pages }} {{ range $paginator.Pages }}
{{ partial "list.html" . }} {{ partial "list.html" . }}

View file

@ -1,52 +1,38 @@
{{ define "main" }} {{ define "main" }}
<div class="single-page"> <div class="row">
<div class="sidebar"> <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 last-xs last-sm first-md first-lg sidebar">
<div class="toc">
{{ if .Params.toc }} {{ if .Params.toc }}
<article>
<header>Содержание</header>
<aside>{{ .TableOfContents }}</aside>
</article>
{{ end }}
<article> <article>
<header>Разделы</header> <header>Содержание</header>
{{ partial "menu.html" (dict "menuID" "sections" "page" .) }} <aside>{{ .TableOfContents }}</aside>
</article>
{{ end }}
<article>
<header>Навигатор</header>
{{ partial "menu.html" (dict "menuID" "sections" "page" .) }}
</article> </article>
</div>
</div> </div>
<div class="h-entry"> <div class="h-entry col-xs-12 col-sm-12 col-md-8 col-lg-8">
<article> <article>
<header class="space-between"> <header class="space-between">
<span class="p-name"> <span class="p-name"> {{ .Title }} </span>
{{ .Title }}
</span>
{{ if .Date }} {{ if .Date }}
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") }} {{ $dateHuman := .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") }}
<time class="dt-published" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> <time class="dt-published" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ end }} {{ end }}
</header> </header>
<div class="p-summary"> <div class="p-summary">{{ .Summary }}</div>
{{ .Summary }} <div class="e-content">{{ .Content }}</div>
</div>
<div class="e-content">
{{ .Content }}
</div>
<footer class="space-between"> <footer class="space-between">
<span> <span>
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
</span> </span>
<a class="u-url" href="{{ .Permalink }}">#</a> <a class="u-url" href="{{ .Permalink }}">#</a>
{{ if .Params.Location }}
<span class="p-location">@ {{.Params.Location}}</span>
{{ end }}
{{ if .Lastmod }} {{ if .Params.Location }}
{{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }} <span class="p-location">@ {{.Params.Location}}</span>
{{ $dateHuman := .Lastmod | time.Format (or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006") }}
<time class="dt-updated" datetime="{{ $dateMachine }}">Изм: {{ $dateHuman }}</time>
{{ end }} {{ end }}
</footer> </footer>
</article> </article>

View file

@ -1,30 +0,0 @@
{{ define "main" }}
<div class="single-page">
<div class="sidebar">
<article class="toc">
<header>Навигатор</header>
{{ partial "menu.html" (dict "menuID" "sections" "page" .) }}
</article>
</div>
<div class="h-entry">
<article>
<header class="p-name">
{{ .Title }}
</header>
<div class="p-summary">
{{ .Summary }}
</div>
<div class="e-content">
{{ .Content }}
</div>
</article>
<h1>Блог</h1>
{{ $pages := where site.RegularPages "Type" "posts" }}
{{ $paginator := .Paginate $pages 7 }}
{{ range $paginator.Pages }}
{{ partial "list.html" . }}
{{ end }}
<nav>{{ partial "pagination.html" . }}</nav>
</div>
</div>
{{ end }}

View file

@ -1,5 +1,5 @@
{{- with .Site.Params.comments -}} {{- with .Site.Params.comments -}}
<article> <article class="comments">
<header>Комментарии</header> <header>Комментарии</header>
<div id="remark42"></div> <div id="remark42"></div>
</article> </article>

View file

@ -1,19 +1,12 @@
<nav> <nav>
<ul> <ul>
<li> <li>
<cite>2007—{{ now.Year }}</cite> <cite>2007—{{ now.Year }} Александр NeonXP Кирюхин. г.Казань</cite>
</li>
<li>
<cite> Александр NeonXP Кирюхин. </cite>
</li>
<li>
<cite>г.Казань</cite>
</li> </li>
</ul> </ul>
<ul> <ul>
<li><a href="https://git.neonxp.ru/neonxp/blog">Исходный код</a>.</li> <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="mailto:i@neonxp.ru" rel="me">Электропочта</a></li>
<li><a href="https://neonxp.ru/posts/index.xml">РСС</a>.</li> <li><a href="https://neonxp.ru/posts/index.xml">РСС</a></li>
</ul> </ul>
</nav> </nav>

View file

@ -3,7 +3,7 @@
<link rel="icon" type="image/png" href="/favicon.png"> <link rel="icon" type="image/png" href="/favicon.png">
<link rel="authorization_endpoint" href="https://indieauth.com/auth"> <link rel="authorization_endpoint" href="https://indieauth.com/auth">
<link rel="token_endpoint" href="https://tokens.indieauth.com/token"> <link rel="token_endpoint" href="https://tokens.indieauth.com/token">
<link rel="micropub" href="https://eo7kjtzrfq0v1s2.m.pipedream.net/micropub"> <link rel="micropub" href="https://neonxp.ru/micropub">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title> <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "head/css.html" . }} {{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }} {{ partialCached "head/js.html" . }}

View file

@ -7,6 +7,15 @@
{{- end }} {{- end }}
{{- end }} {{- 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" }} {{- with resources.Get "css/syntax.css" }}
{{- if eq hugo.Environment "development" }} {{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}"> <link rel="stylesheet" href="{{ .RelPermalink }}">

View file

@ -3,7 +3,7 @@
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ if .Date }} {{ if .Date }}
<span> <span>
{{- .Date | time.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}} {{- .Date | time.Format (or .Site.Params.dateFormat.published "02 Jan 2006") -}}
</span> </span>
{{ end }} {{ end }}
</header> </header>

View file

@ -12,9 +12,11 @@ Renders a menu for the given menu ID.
{{- with index site.Menus $menuID }} {{- with index site.Menus $menuID }}
<aside> <aside>
<ul> <nav>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} <ol>
</ul> {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ol>
</nav>
</aside> </aside>
{{- end }} {{- end }}
@ -42,9 +44,9 @@ Renders a menu for the given menu ID.
{{- end -}} {{- end -}}
>{{ $name }}</a> >{{ $name }}</a>
{{- with .Children }} {{- with .Children }}
<ul> <ol>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }} {{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}
</ul> </ol>
{{- end }} {{- end }}
</li> </li>
{{- end }} {{- end }}