Initial commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<div id="global-back-to-top" class="back-to-top-btn" onclick="scrollToTop()">
|
||||
↑
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function scrollToTop() {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('scroll', function() {
|
||||
const backToTopBtn = document.getElementById('global-back-to-top');
|
||||
|
||||
// Вычисляем высоту страницы и положение скролла
|
||||
const documentHeight = document.documentElement.scrollHeight;
|
||||
const windowHeight = window.innerHeight;
|
||||
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
||||
|
||||
// Показываем кнопку только в последней трети страницы
|
||||
const scrollPercent = (scrollTop + windowHeight) / documentHeight;
|
||||
|
||||
if (scrollPercent > 0.66) { // Показываем когда прокрутили 66% страницы
|
||||
backToTopBtn.classList.add('show');
|
||||
} else {
|
||||
backToTopBtn.classList.remove('show');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -43,25 +43,44 @@
|
||||
{{ end }}
|
||||
{{ with $data.social }}
|
||||
<section>
|
||||
<h3>{{ i18n "MENU_FOOTER" . }}</h3>
|
||||
<ul class="icons alt">
|
||||
<ul class="footer-nav-links">
|
||||
{{ with .home}}
|
||||
<li><a href="{{ . }}" class="icon alt fab fa-home"><span class="label">Домой</span></a></li>
|
||||
<li><a href="{{ . }}" class="footer-nav-link">
|
||||
<i class="icon fa-home"></i>
|
||||
<span>Главная</span>
|
||||
</a></li>
|
||||
{{ end }}
|
||||
{{ with .plan}}
|
||||
<li><a href="{{ . }}" class="icon alt fab fa-calendar"><span class="label">Хочу поехать</span></a></li>
|
||||
<li><a href="{{ . }}" class="footer-nav-link">
|
||||
<i class="icon fa-calendar"></i>
|
||||
<span>Хочу поехать</span>
|
||||
</a></li>
|
||||
{{ end }}
|
||||
{{ with .map}}
|
||||
<li><a href="{{ . }}" class="icon alt fab fa-map"><span class="label">Маршруты</span></a></li>
|
||||
<li><a href="{{ . }}" class="footer-nav-link">
|
||||
<i class="icon fa-map"></i>
|
||||
<span>Маршруты</span>
|
||||
</a></li>
|
||||
{{ end }}
|
||||
{{ with .ask}}
|
||||
<li><a href="{{ . }}" class="icon alt fab fa-question"><span class="label">Спросить</span></a></li>
|
||||
<li><a href="{{ . }}" class="footer-nav-link">
|
||||
<i class="icon fa-question"></i>
|
||||
<span>Спросить</span>
|
||||
</a></li>
|
||||
{{ end }}
|
||||
{{ with .gallery}}
|
||||
<li><a href="{{ . }}" class="icon alt fab fa-image"><span class="label">Галерея</span></a></li>
|
||||
<li><a href="{{ . }}" class="footer-nav-link">
|
||||
<i class="icon fa-image"></i>
|
||||
<span>Галерея</span>
|
||||
</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
<!-- Seasonal Background Info -->
|
||||
<div style="text-align: center; padding: 10px; font-size: 0.8em; color: rgba(255,255,255,0.5);">
|
||||
{{ partial "current-season.html" . }}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{{- $months := slice "января" "февраля" "марта" "апреля" "мая" "июня" "июля" "августа" "сентября" "октября" "ноября" "декабря" -}}
|
||||
{{- $day := .Day -}}
|
||||
{{- $month := index $months (sub .Month 1) -}}
|
||||
{{- $year := .Year -}}
|
||||
{{ $day }} {{ $month }} {{ $year }}
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
|
||||
<!-- CSS -->
|
||||
{{ if .Site.IsServer }}
|
||||
{{ if hugo.IsServer }}
|
||||
{{ $style := resources.Get "scss/main.scss" | resources.ExecuteAsTemplate "main.scss" . | toCSS (dict "targetPath" "assets/css/main.css" "enableSourceMap" true) }}
|
||||
<link rel="stylesheet" href="{{ ($style).RelPermalink }}">
|
||||
{{ else }}
|
||||
@@ -22,5 +22,16 @@
|
||||
{{ end }}
|
||||
{{ $noscript := resources.Get "scss/noscript.scss" | resources.ExecuteAsTemplate "noscript.scss" . | toCSS (dict "targetPath" "assets/css/noscript.css" "enableSourceMap" false) }}
|
||||
<noscript><link rel="stylesheet" href='{{ $noscript.RelPermalink }}' /></noscript>
|
||||
<link rel="stylesheet" href="/css/yandex-maps.css">
|
||||
<link rel="stylesheet" href="/css/footer-nav.css">
|
||||
<link rel="stylesheet" href="/css/mobile-pagination.css">
|
||||
<link rel="stylesheet" href="/css/back-to-top.css">
|
||||
<link rel="stylesheet" href="/css/typography-improvements.css">
|
||||
<link rel="stylesheet" href="/css/about-site.css">
|
||||
<link rel="stylesheet" href="/css/copyright-visible.css">
|
||||
<link rel="stylesheet" href="/css/nav-background.css">
|
||||
<link rel="stylesheet" href="/css/pagination-info.css">
|
||||
<link rel="stylesheet" href="/css/forms.css">
|
||||
<link rel="stylesheet" href="/css/page-spacing.css">
|
||||
{{ partial "htmlhead.custom.html" }}
|
||||
</head>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ $currentPage := .Page }}
|
||||
<nav id="nav">
|
||||
<ul class="links">
|
||||
<li class="{{ if eq ($currentPage.RelPermalink) (`/`) }}active{{end}}"><a href='{{ "/" | relLangURL }}'>{{ .Site.Title }}</a></li>
|
||||
<li class="{{ if eq ($currentPage.RelPermalink) (`/`) }}active{{end}}"><a href='{{ "/" | relLangURL }}'>Главная</a></li>
|
||||
{{- with $data.nav.items -}}
|
||||
{{- range $i, $e := . -}}
|
||||
<li class="{{ if eq ($currentPage.RelPermalink) (print .url `/`) }}active{{end}}"><a href='{{ .url | relLangURL }}'>{{- .title -}}</a></li>
|
||||
|
||||
@@ -1,17 +1,30 @@
|
||||
<!-- Featured Post -->
|
||||
{{ $data := .siteData }}
|
||||
{{ range .firstpost }}
|
||||
{{ if .Params.pinned }}
|
||||
<section class="posts">
|
||||
<article>
|
||||
<header>
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
</header>
|
||||
{{ if .Params.image }}
|
||||
<a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></a>
|
||||
{{ end }}
|
||||
</article>
|
||||
</section>
|
||||
{{ else if not .Params.pinned }}
|
||||
<article class="post featured">
|
||||
<header class="major">
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
{{ if .Description }}
|
||||
<p>{{ .Description }}</p>
|
||||
<p class="featured-description">{{ .Description }}</p>
|
||||
{{ else }}
|
||||
<p>{{ .Summary }}</p>
|
||||
<p class="featured-description">{{ .Summary }}</p>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ if .Params.image }}
|
||||
<a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></a>
|
||||
<a href="{{ .Permalink }}" class="image main featured-image"><img src="{{ .Params.image | relURL }}" alt="" /></a>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
{{ range .posts.Pages }}
|
||||
<article>
|
||||
<header>
|
||||
{{ if not .Date.IsZero }}
|
||||
<span class="date">{{ .Date.Format (.Site.Params.DateFormat | default "January 2, 2006") }}</span>
|
||||
{{ if and (not .Date.IsZero) (not .Params.pinned) }}
|
||||
<span class="date">{{ partial "format-date-ru.html" .Date }}</span>
|
||||
{{ end }}
|
||||
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||
</header>
|
||||
{{ if .Params.image }}
|
||||
<a href="{{ .Permalink }}" class="image fit"><img src="{{ .Params.image | relURL }}" alt="" /></a>
|
||||
<a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></a>
|
||||
{{ end }}
|
||||
{{ if .Description }}
|
||||
<p>{{ .Description }}</p>
|
||||
|
||||
@@ -42,57 +42,12 @@
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
<!-- Page numbers. -->
|
||||
{{ range $paginator.Pagers }}
|
||||
{{ $outer.Scratch.Set "page_number_flag" false }}
|
||||
|
||||
<!-- Advanced page numbers. -->
|
||||
{{ if gt $paginator.TotalPages $max_links }}
|
||||
|
||||
<!-- Lower limit pages. -->
|
||||
<!-- If the user is on a page which is in the lower limit. -->
|
||||
{{ if le $paginator.PageNumber $lower_limit }}
|
||||
|
||||
<!-- If the current loop page is less than max_links. -->
|
||||
{{ if le .PageNumber $max_links }}
|
||||
{{ $outer.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Upper limit pages. -->
|
||||
<!-- If the user is on a page which is in the upper limit. -->
|
||||
{{ else if ge $paginator.PageNumber $upper_limit }}
|
||||
|
||||
<!-- If the current loop page is greater than total pages minus $max_links -->
|
||||
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
|
||||
{{ $outer.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Middle pages. -->
|
||||
{{ else }}
|
||||
|
||||
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
|
||||
{{ $outer.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
<!-- Simple page numbers. -->
|
||||
{{ else }}
|
||||
|
||||
{{ $outer.Scratch.Set "page_number_flag" true }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
<!-- Output page numbers. -->
|
||||
{{ if eq ($outer.Scratch.Get "page_number_flag") true }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" class="page{{ if eq . $paginator }} active{{ end }}">
|
||||
{{ .PageNumber }}
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
<!-- Информация о страницах для десктопа -->
|
||||
<li class="page-info desktop-only">
|
||||
<span class="current-page">{{ $paginator.PageNumber }}</span>
|
||||
<span class="separator">из</span>
|
||||
<span class="total-pages">{{ $paginator.TotalPages }}</span>
|
||||
</li>
|
||||
|
||||
<!-- Next page. -->
|
||||
{{ if $paginator.HasNext }}
|
||||
|
||||
Reference in New Issue
Block a user