diff --git a/content/gallery.md b/content/gallery.md index b7c4c5f..fb6b542 100755 --- a/content/gallery.md +++ b/content/gallery.md @@ -1,11 +1,7 @@ +++ -# title = 'Галерея' +title = 'Галерея' slug = 'gallery' +++ -{{< rawhtml >}} -

Галерея

-{{< /rawhtml >}} - {{< load-photoswipe >}} {{< gallery caption-effect="fade" >}} {{< figure src="https://s3.regru.cloud/sleeptrip-dev/images/Radiotele_20250406_1.jpg" >}} diff --git a/content/map.md b/content/map.md index 758aada..ea2dc0a 100755 --- a/content/map.md +++ b/content/map.md @@ -1,12 +1,8 @@ +++ -# title = 'Карта поездок' +title = 'Карта поездок' slug = 'map' disableComments = true +++ -{{< rawhtml >}} -

Карта поездок

-{{< /rawhtml >}} - {{< rawhtml >}} {{< /rawhtml >}} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 6c46b42..0f4a0f1 100755 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -27,8 +27,8 @@ NB this overrides Hugo's built-in "figure" shortcode but is backwards compatible
-
- +
+
{{ with $linkURL }}{{ end }} {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html index 2e803a9..dba1941 100755 --- a/layouts/shortcodes/gallery.html +++ b/layouts/shortcodes/gallery.html @@ -41,5 +41,5 @@ Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ {{- end }}
- -{{ partial "back-to-top.html" . }} + + diff --git a/static/css/copyright-visible.css b/static/css/copyright-visible.css index 3bfc4ee..03a2730 100755 --- a/static/css/copyright-visible.css +++ b/static/css/copyright-visible.css @@ -1,33 +1,21 @@ -/* Улучшение видимости copyright текста */ +/* Copyright */ #copyright { opacity: 1 !important; - color: rgba(255, 255, 255, 0.8) !important; - font-weight: 600 !important; - text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important; - background: rgba(0, 0, 0, 0.3) !important; - padding: 10px 20px !important; - border-radius: 5px !important; - backdrop-filter: blur(5px) !important; - text-align: center !important; -} - -#copyright ul { - margin: 0 !important; - padding: 0 !important; - list-style: none !important; -} - -#copyright li { - display: inline-block !important; - margin: 0 5px !important; - color: rgba(255, 255, 255, 0.9) !important; -} - -#copyright li:after { - content: " | " !important; color: rgba(255, 255, 255, 0.6) !important; + font-weight: 400 !important; + text-shadow: none !important; + background: none !important; + padding: 0 !important; + border-radius: 0 !important; + backdrop-filter: none !important; } -#copyright li:last-child:after { +/* Убираем ::after — у темы уже есть border-left */ +#copyright li:after { content: "" !important; +} + +#copyright ul li { + color: rgba(255, 255, 255, 0.6) !important; + border-left-color: rgba(255, 255, 255, 0.2) !important; } \ No newline at end of file diff --git a/static/css/hugo-easy-gallery.css b/static/css/hugo-easy-gallery.css index 76537f5..cc61677 100755 --- a/static/css/hugo-easy-gallery.css +++ b/static/css/hugo-easy-gallery.css @@ -1,30 +1,33 @@ /* -Simple Gallery CSS - Small thumbnails in rows +Gallery CSS — responsive grid with aspect-ratio thumbnails */ -/* Основные стили галереи */ +/* Основной контейнер — CSS Grid */ .gallery { - display: flex; - flex-wrap: wrap; - gap: 1.5%; - padding: 10px; + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 6px; + padding: 0; max-width: 1400px; margin: 0 auto; - justify-content: space-between; } /* Контейнер изображения */ .gallery .box { - width: 23%; - height: 250px; + aspect-ratio: 1; + border-radius: 8px; + overflow: hidden; transition: transform 0.2s ease; border: none; - border-radius: 15px; + width: 100%; + height: auto; } /* Эффект наведения */ .gallery .box:hover { - transform: scale(1.05); + transform: scale(1.03); + z-index: 1; + position: relative; } /* Figure элемент */ @@ -34,7 +37,6 @@ Simple Gallery CSS - Small thumbnails in rows margin: 0; position: relative; overflow: hidden; - border: none; } /* Изображение */ @@ -44,7 +46,12 @@ Simple Gallery CSS - Small thumbnails in rows background-size: cover; background-position: center; background-repeat: no-repeat; - border-radius: 15px; + border-radius: 8px; + transition: transform 0.3s ease; +} + +.gallery .box:hover .img { + transform: scale(1.08); } /* Скрываем обычные img теги */ @@ -57,72 +64,48 @@ Simple Gallery CSS - Small thumbnails in rows display: block; width: 100%; height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 2; } -/* Подпись скрыта для компактности */ +/* Подписи скрыты */ .gallery figcaption { display: none; } -/* Адаптивность */ -@media (max-width: 768px) { - .gallery .box { - width: 23%; - height: 180px; - } - +/* Планшет — 3 колонки */ +@media (max-width: 900px) { .gallery { - gap: 1.5%; + grid-template-columns: repeat(3, 1fr); + gap: 5px; } } -@media (max-width: 480px) { +/* Мобиль — 2 колонки */ +@media (max-width: 600px) { .gallery { - flex-direction: column; - gap: 15px; - padding: 15px; - align-items: center; + grid-template-columns: repeat(2, 1fr); + gap: 3px; } - + .gallery .box { - width: 95%; - max-width: 400px; - height: 250px; - border-radius: 12px; + border-radius: 4px; } - + .gallery .img { - border-radius: 12px; + border-radius: 4px; } -} -/* Эффекты для подписей */ -.gallery.caption-effect-fade figcaption { - background: rgba(0, 0, 0, 0.7); - transform: none; - opacity: 0; - transition: opacity 0.3s ease; -} + /* Убираем hover-scale на тач-устройствах */ + .gallery .box:hover { + transform: none; + } -.gallery.caption-effect-fade .box:hover figcaption { - opacity: 1; -} - -.gallery.caption-position-center figcaption { - top: 50%; - bottom: auto; - transform: translateY(-50%); - background: rgba(0, 0, 0, 0.7); - text-align: center; - padding: 16px; -} - -.gallery.caption-position-center .box:hover figcaption { - transform: translateY(-50%); -} - -.gallery.caption-position-none figcaption { - display: none; + .gallery .box:hover .img { + transform: none; + } } /* Отдельные figure элементы (не в галерее) */ @@ -145,4 +128,4 @@ Simple Gallery CSS - Small thumbnails in rows height: 200px; background-size: cover; background-position: center; -} \ No newline at end of file +} diff --git a/static/css/mobile-pagination.css b/static/css/mobile-pagination.css index a1c21e6..e2529ce 100755 --- a/static/css/mobile-pagination.css +++ b/static/css/mobile-pagination.css @@ -1,104 +1 @@ -/* Скрываем номера страниц на мобильных устройствах */ -@media (max-width: 768px) { - /* Скрываем все элементы с номерами страниц */ - .pagination .page-number-item { - display: none !important; - } - - /* Дополнительная защита - скрываем по классам */ - .pagination .page, - .pagination .page.active, - .pagination .extra { - display: none !important; - } - - /* Центрируем оставшиеся кнопки */ - .pagination { - display: flex !important; - justify-content: center !important; - align-items: center !important; - gap: 1rem !important; - margin: 1rem 0 !important; - } - - .pagination ul { - display: flex !important; - justify-content: center !important; - align-items: center !important; - list-style: none !important; - padding: 0 !important; - margin: 0 !important; - gap: 1rem !important; - } - - /* Стилизуем кнопки Назад/Далее */ - .pagination .previous, - .pagination .next { - padding: 0.8rem 1.2rem !important; - font-size: 0.9rem !important; - min-width: 80px !important; - text-align: center !important; - border: none !important; - border-radius: 0 !important; - display: flex !important; - align-items: center !important; - justify-content: center !important; - line-height: 1.2 !important; - white-space: nowrap !important; - box-shadow: none !important; - outline: none !important; - } - - /* Показываем только навигационные кнопки */ - .pagination li:has(.previous), - .pagination li:has(.next) { - display: block !important; - } - - /* Дополнительное выравнивание для li элементов */ - .pagination li { - display: flex !important; - align-items: center !important; - justify-content: center !important; - } - - /* Убираем возможные конфликты со стилями темы */ - .pagination .previous a, - .pagination .next a { - display: flex !important; - align-items: center !important; - justify-content: center !important; - text-align: center !important; - width: 100% !important; - height: 100% !important; - border: none !important; - box-shadow: none !important; - outline: none !important; - } - - /* Скрываем информацию о страницах */ - .pagination-info, - .pagination .info, - .pagination .page-info, - .pagination-status { - display: none !important; - } -} - -@media (max-width: 480px) { - .pagination .previous, - .pagination .next { - padding: 0.7rem 1rem !important; - font-size: 0.8rem !important; - min-width: 70px !important; - display: flex !important; - align-items: center !important; - justify-content: center !important; - text-align: center !important; - line-height: 1.2 !important; - border: none !important; - border-radius: 0 !important; - box-shadow: none !important; - outline: none !important; - } -} \ No newline at end of file +/* Этот файл намеренно пуст — стили пагинации перенесены в pagination-info.css */ diff --git a/static/css/typography-improvements.css b/static/css/typography-improvements.css index 932541c..97260e7 100755 --- a/static/css/typography-improvements.css +++ b/static/css/typography-improvements.css @@ -185,6 +185,30 @@ } } +/* Мобильный: первый (закреплённый) пост — центрировать */ +@media screen and (max-width: 736px) { + #main > section.posts:first-of-type article { + text-align: center !important; + padding: 1.5rem 1.25rem !important; + } + + #main > section.posts:first-of-type article header h2 { + text-align: center !important; + font-size: 1.45rem !important; + -webkit-line-clamp: unset !important; + overflow: visible !important; + } + + #main > section.posts:first-of-type article header h2 a { + color: inherit; + } + + #main > section.posts:first-of-type article .image.main { + margin: 0.75rem auto !important; + display: block !important; + } +} + /* Адаптивность для мобильных */ @media (max-width: 768px) { #main article h1 { diff --git a/themes/hugo-theme-massively/assets/scss/main.scss b/themes/hugo-theme-massively/assets/scss/main.scss index 4446067..b9d9eb3 100755 --- a/themes/hugo-theme-massively/assets/scss/main.scss +++ b/themes/hugo-theme-massively/assets/scss/main.scss @@ -6,7 +6,7 @@ @import 'libs/html-grid'; @import 'libs/fixed-grid'; @import 'font-awesome.min.css'; -@import url('https://fonts.googleapis.com/css?family=Merriweather:300,700,300italic,700italic|Source+Sans+Pro:900'); +@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,700;1,300;1,700&family=Source+Sans+Pro:wght@900&display=swap'); /* Massively by HTML5 UP diff --git a/themes/hugo-theme-massively/layouts/_default/single.html b/themes/hugo-theme-massively/layouts/_default/single.html index a3b6539..f7cd6ac 100755 --- a/themes/hugo-theme-massively/layouts/_default/single.html +++ b/themes/hugo-theme-massively/layouts/_default/single.html @@ -20,7 +20,7 @@

{{ .Description }}

{{ if .Params.image }} -
+
{{ .Title }}
{{ end }} {{ .Content }} diff --git a/themes/hugo-theme-massively/layouts/partials/copyright.html b/themes/hugo-theme-massively/layouts/partials/copyright.html index 33cdc69..ad74f1c 100755 --- a/themes/hugo-theme-massively/layouts/partials/copyright.html +++ b/themes/hugo-theme-massively/layouts/partials/copyright.html @@ -1,4 +1,8 @@ diff --git a/themes/hugo-theme-massively/layouts/partials/htmlhead.html b/themes/hugo-theme-massively/layouts/partials/htmlhead.html index fa8f4e2..b8b8c07 100755 --- a/themes/hugo-theme-massively/layouts/partials/htmlhead.html +++ b/themes/hugo-theme-massively/layouts/partials/htmlhead.html @@ -9,6 +9,27 @@ {{ if eq (.Site.Title) (.Title) }}{{ .Site.Title }}{{ else }}{{ .Title }} · {{ .Site.Title }}{{ end }} + + {{ $description := "" }} + {{ if .Description }}{{ $description = .Description }}{{ else if .Summary }}{{ $description = .Summary | plainify | truncate 160 }}{{ else }}{{ $description = .Site.Params.description | default "Путешествия и приключения — блог о поездках по России и миру" }}{{ end }} + {{ $image := "" }} + {{ if .Params.image }}{{ $image = .Params.image | absURL }}{{ else }}{{ $image = (print .Site.BaseURL "images/desktop.webp") }}{{ end }} + + + + + + + + + + + + + + {{ if .IsPage }} + + {{ end }} {{ if hugo.IsServer }} {{ $style := resources.Get "scss/main.scss" | resources.ExecuteAsTemplate "main.scss" . | toCSS (dict "targetPath" "assets/css/main.css" "enableSourceMap" true) }} diff --git a/themes/hugo-theme-massively/layouts/partials/posts/list.html b/themes/hugo-theme-massively/layouts/partials/posts/list.html index f02dd99..bd45357 100755 --- a/themes/hugo-theme-massively/layouts/partials/posts/list.html +++ b/themes/hugo-theme-massively/layouts/partials/posts/list.html @@ -10,7 +10,7 @@

{{ .Title }}

{{ if .Params.image }} - + {{ .Title }} {{ end }} {{ if .Description }}

{{ .Description }}

diff --git a/themes/hugo-theme-massively/layouts/partials/posts/pagination.html b/themes/hugo-theme-massively/layouts/partials/posts/pagination.html index bd6ff79..21aabb9 100755 --- a/themes/hugo-theme-massively/layouts/partials/posts/pagination.html +++ b/themes/hugo-theme-massively/layouts/partials/posts/pagination.html @@ -1,74 +1,46 @@ {{ $paginator := .paginator }} {{ $outer := .outer}} - - - -{{ $show_first_last := $outer.Site.Params.Posts.showFirstLast | default false }} - - -{{ $adjacent_links := $outer.Site.Params.Posts.paginationPages | default 2 }} - - -{{ $max_links := (add (mul $adjacent_links 2) 1) }} - - -{{ $lower_limit := (add $adjacent_links 1) }} - - -{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} - {{ if gt $paginator.TotalPages 1 }} - -{{ end }} \ No newline at end of file + +{{ end }} diff --git a/themes/hugo-theme-massively/layouts/partials/scripts/index.html b/themes/hugo-theme-massively/layouts/partials/scripts/index.html index 14d356b..6919fa3 100755 --- a/themes/hugo-theme-massively/layouts/partials/scripts/index.html +++ b/themes/hugo-theme-massively/layouts/partials/scripts/index.html @@ -9,5 +9,5 @@ {{ $js := slice $jQuery $scrollex $scrolly $browser $breakpoints $util $main | resources.Concat "assets/js/bundle.js" }} - +