diff --git a/README.md b/README.md index 3ad2748..7f232f8 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ baseURL = "https://<имя>.github.io" languageCode = "en-us" title = "<имя>" theme="themu" + # Подсветка кода pygmentsstyle = "monokai" pygmentscodefences = true @@ -48,6 +49,7 @@ pygmentscodefencesguesssyntax = true paginate=3 # статей на страницу [params] + subtitleFile = true subtitle = "Минимальная и чистая [тема блога для Hugo](https://github.com/fruworg)" # Социальные ссылки diff --git a/layouts/index.html b/layouts/index.html index 0abfc57..6b5fdc6 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -8,9 +8,10 @@
- {{- if isset .Site.Params "description" -}} -
{{ template "partials/subtitle.html" . }}
- + {{- if .Param "subtitleFile" -}} + {{ template "partials/subtitle.html" . }} + {{- else if isset .Site.Params "subtitle" -}} +

{{ .Site.Params.Subtitle | markdownify }}

{{- end -}}
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} diff --git a/static/js/clock.js b/static/js/clock.js deleted file mode 100644 index d3a2268..0000000 --- a/static/js/clock.js +++ /dev/null @@ -1,35 +0,0 @@ -// Функция для форматирования числа (добавляет ведущий ноль, если число меньше 10) -function formatNumber(num) { - return num < 10 ? '0' + num : num; -} - -// Функция для получения текущего времени и дgkgаты в поясе UTC+6 -function getCurrentDateTimeUTCPlus6() { - const currentTime = new Date(); - const offset = currentTime.getTimezoneOffset(); // Получаем разницу в минутах между UTC и локальным временем - const utcPlus6DateTime = new Date(currentTime.getTime() + 6 * 60 * 60 * 1000); // Добавляем 6 часов к UTC+0 - return utcPlus6DateTime; -} - -// Функция для обновления времени и даты на странице -function updateClock() { - const timeElement = document.getElementById('time'); - if (timeElement) { - const currentDateTime = getCurrentDateTimeUTCPlus6(); - const date = formatNumber(currentDateTime.getUTCDate()); - const month = formatNumber(currentDateTime.getUTCMonth() + 1); - const year = currentDateTime.getUTCFullYear().toString().slice(-2); // Получаем последние две цифры года - const hours = formatNumber(currentDateTime.getUTCHours()); - const minutes = formatNumber(currentDateTime.getUTCMinutes()); - const seconds = formatNumber(currentDateTime.getUTCSeconds()); - - const dateTimeString = `${date}.${month}.${year} ${hours}:${minutes}:${seconds} UTC+6`; - timeElement.innerText = dateTimeString; - } -} - -// Обновляем время и дату каждую секунду -setInterval(updateClock, 1000); - -// Вызываем функцию для первоначального обновления времени и даты -updateClock(); \ No newline at end of file