New design

This commit is contained in:
Buliway 2024-07-06 07:31:22 +03:00
parent 5bbb4c734c
commit 1a6d1ad114
34 changed files with 449 additions and 96 deletions

View file

@ -27,6 +27,8 @@ hugo server
Visit [stack.jimmycai.com](https://stack.jimmycai.com) Visit [stack.jimmycai.com](https://stack.jimmycai.com)
Список моих изменений описан [тут](https://buliway.ru/p/мои-изменения-в-теме-hugo-stack/)
## Copyright ## Copyright
**Licensed under the GNU General Public License v3.0** **Licensed under the GNU General Public License v3.0**

20
assets/icons/at.svg Normal file
View file

@ -0,0 +1,20 @@
<!--
tags: [email, message, mention, sign, "@"]
version: "1.0"
unicode: "ea2b"
category: Text
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0" />
<path d="M16 12v1.5a2.5 2.5 0 0 0 5 0v-1.5a9 9 0 1 0 -5.5 8.28" />
</svg>

After

Width:  |  Height:  |  Size: 431 B

View file

@ -0,0 +1,19 @@
<!--
tags: [payment, finance, mobile, app, money, transfer]
category: Brand
unicode: "f391"
version: "1.92"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M17.1 8.648a.568 .568 0 0 1 -.761 .011a5.682 5.682 0 0 0 -3.659 -1.34c-1.102 0 -2.205 .363 -2.205 1.374c0 1.023 1.182 1.364 2.546 1.875c2.386 .796 4.363 1.796 4.363 4.137c0 2.545 -1.977 4.295 -5.204 4.488l-.295 1.364a.557 .557 0 0 1 -.546 .443h-2.034l-.102 -.011a.568 .568 0 0 1 -.432 -.67l.318 -1.444a7.432 7.432 0 0 1 -3.273 -1.784v-.011a.545 .545 0 0 1 0 -.773l1.137 -1.102c.214 -.2 .547 -.2 .761 0a5.495 5.495 0 0 0 3.852 1.5c1.478 0 2.466 -.625 2.466 -1.614c0 -.989 -1 -1.25 -2.886 -1.954c-2 -.716 -3.898 -1.728 -3.898 -4.091c0 -2.75 2.284 -4.091 4.989 -4.216l.284 -1.398a.545 .545 0 0 1 .545 -.432h2.023l.114 .012a.544 .544 0 0 1 .42 .647l-.307 1.557a8.528 8.528 0 0 1 2.818 1.58l.023 .022c.216 .228 .216 .569 0 .773l-1.057 1.057z" />
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,22 @@
<!--
tags: [app, application, logo, communication, talks, gamers, freeware, platform]
category: Brand
version: "1.21"
unicode: "ece3"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M8 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0" />
<path d="M14 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0" />
<path d="M15.5 17c0 1 1.5 3 2 3c1.5 0 2.833 -1.667 3.5 -3c.667 -1.667 .5 -5.833 -1.5 -11.5c-1.457 -1.015 -3 -1.34 -4.5 -1.5l-.972 1.923a11.913 11.913 0 0 0 -4.053 0l-.975 -1.923c-1.5 .16 -3.043 .485 -4.5 1.5c-2 5.667 -2.167 9.833 -1.5 11.5c.667 1.333 2 3 3.5 3c.5 0 2 -2 2 -3" />
<path d="M7 16.5c3.5 1 6.5 1 10 0" />
</svg>

After

Width:  |  Height:  |  Size: 769 B

View file

@ -0,0 +1,21 @@
<!--
category: Brand
version: "2.16"
unicode: "fa50"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M19.875 6.27c.7 .398 1.13 1.143 1.125 1.948v7.284c0 .809 -.443 1.555 -1.158 1.948l-6.75 4.27a2.269 2.269 0 0 1 -2.184 0l-6.75 -4.27a2.225 2.225 0 0 1 -1.158 -1.948v-7.285c0 -.809 .443 -1.554 1.158 -1.947l6.75 -3.98a2.33 2.33 0 0 1 2.25 0l6.75 3.98h-.033z" />
<path d="M9 8v8" />
<path d="M15 8v8" />
<path d="M9 12h6" />
</svg>

After

Width:  |  Height:  |  Size: 603 B

View file

@ -0,0 +1,19 @@
<!--
tags: [logo, app, application, communicator, internet, cloud, messages, text, images, photos, videos, record, file, send]
category: Brand
version: "1.9"
unicode: "ec26"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4" />
</svg>

After

Width:  |  Height:  |  Size: 442 B

View file

@ -0,0 +1,24 @@
<!--
tags: [money, earn, salary, change]
category: E-commerce
version: "1.81"
unicode: "f2be"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
<path d="M9 8h4.09c1.055 0 1.91 .895 1.91 2s-.855 2 -1.91 2c1.055 0 1.91 .895 1.91 2s-.855 2 -1.91 2h-4.09" />
<path d="M10 12h4" />
<path d="M10 7v10v-9" />
<path d="M13 7v1" />
<path d="M13 16v1" />
</svg>

After

Width:  |  Height:  |  Size: 575 B

View file

@ -0,0 +1,20 @@
<!--
tags: [money, earn, salary, change]
category: E-commerce
unicode: "f4a0"
version: "1.96"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
<path d="M4 16h4v-7l4 4l4 -4v7h4" />
</svg>

After

Width:  |  Height:  |  Size: 403 B

21
assets/icons/coin.svg Normal file
View file

@ -0,0 +1,21 @@
<!--
tags: [money, earn, salary, change, dollar]
version: "1.3"
category: E-commerce
unicode: "eb82"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
<path d="M14.8 9a2 2 0 0 0 -1.8 -1h-2a2 2 0 1 0 0 4h2a2 2 0 1 1 0 4h-2a2 2 0 0 1 -1.8 -1" />
<path d="M12 7v10" />
</svg>

After

Width:  |  Height:  |  Size: 490 B

View file

@ -0,0 +1,22 @@
<!--
tags: [money, purchase, payment, cc]
version: "1.0"
unicode: "ea84"
category: E-commerce
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z" />
<path d="M3 10l18 0" />
<path d="M7 15l.01 0" />
<path d="M11 15l2 0" />
</svg>

After

Width:  |  Height:  |  Size: 479 B

View file

@ -0,0 +1,20 @@
<!--
category: Currencies
tags: [american, us, dollar, usd, sign, bucks, usa, money, banknote, pay]
version: "1.3"
unicode: "eb84"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M16.7 8a3 3 0 0 0 -2.7 -2h-4a3 3 0 0 0 0 6h4a3 3 0 0 1 0 6h-4a3 3 0 0 1 -2.7 -2" />
<path d="M12 3v3m0 12v3" />
</svg>

After

Width:  |  Height:  |  Size: 468 B

View file

@ -0,0 +1,22 @@
<!--
tags: [send, massage, quick, delivery, speed, communication]
version: "1.58"
category: Communication
unicode: "f069"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M3 7h3" />
<path d="M3 11h2" />
<path d="M9.02 8.801l-.6 6a2 2 0 0 0 1.99 2.199h7.98a2 2 0 0 0 1.99 -1.801l.6 -6a2 2 0 0 0 -1.99 -2.199h-7.98a2 2 0 0 0 -1.99 1.801z" />
<path d="M9.8 7.5l2.982 3.28a3 3 0 0 0 4.238 .202l3.28 -2.982" />
</svg>

After

Width:  |  Height:  |  Size: 586 B

View file

@ -0,0 +1,22 @@
<!--
category: Communication
tags: [inbox, gmail, email, envelope, message, read]
version: "1.0"
unicode: "eae4"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M3 9l9 6l9 -6l-9 -6l-9 6" />
<path d="M21 9v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10" />
<path d="M3 19l6 -6" />
<path d="M15 13l6 6" />
</svg>

After

Width:  |  Height:  |  Size: 480 B

20
assets/icons/mail.svg Normal file
View file

@ -0,0 +1,20 @@
<!--
category: Communication
tags: [inbox, gmail, email, envelope, message]
version: "1.0"
unicode: "eae5"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z" />
<path d="M3 7l9 6l9 -6" />
</svg>

After

Width:  |  Height:  |  Size: 443 B

View file

@ -0,0 +1,21 @@
<!--
tags: [coin, finance, saving, bank]
category: Animals
unicode: "f38c"
version: "1.91"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M15 11v.01" />
<path d="M5.173 8.378a3 3 0 1 1 4.656 -1.377" />
<path d="M16 4v3.803a6.019 6.019 0 0 1 2.658 3.197h1.341a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-1.342c-.336 .95 -.907 1.8 -1.658 2.473v2.027a1.5 1.5 0 0 1 -3 0v-.583a6.04 6.04 0 0 1 -1 .083h-4a6.04 6.04 0 0 1 -1 -.083v.583a1.5 1.5 0 0 1 -3 0v-2l0 -.027a6 6 0 0 1 4 -10.473h2.5l4.5 -3h0z" />
</svg>

After

Width:  |  Height:  |  Size: 666 B

View file

@ -0,0 +1,21 @@
<!--
tags: [money, work, job, cash, dollar]
version: "1.49"
unicode: "efbd"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
<path d="M13.867 9.75c-.246 -.48 -.708 -.769 -1.2 -.75h-1.334c-.736 0 -1.333 .67 -1.333 1.5c0 .827 .597 1.499 1.333 1.499h1.334c.736 0 1.333 .671 1.333 1.5c0 .828 -.597 1.499 -1.333 1.499h-1.334c-.492 .019 -.954 -.27 -1.2 -.75" />
<path d="M12 7v2" />
<path d="M12 15v2" />
</svg>

After

Width:  |  Height:  |  Size: 626 B

19
assets/icons/wallet.svg Normal file
View file

@ -0,0 +1,19 @@
<!--
tags: [money, pay, banknote, coin, payment, bank]
version: "1.2"
unicode: "eb75"
-->
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>
<path d="M17 8v-3a1 1 0 0 0 -1 -1h-10a2 2 0 0 0 0 4h12a1 1 0 0 1 1 1v3m0 4v3a1 1 0 0 1 -1 1h-12a2 2 0 0 1 -2 -2v-12" />
<path d="M20 12v4h-4a2 2 0 0 1 0 -4h4" />
</svg>

After

Width:  |  Height:  |  Size: 464 B

View file

@ -18,9 +18,6 @@ a {
.section-title { .section-title {
text-transform: uppercase; text-transform: uppercase;
margin-top: 0;
margin-bottom: 10px;
display: block;
font-size: 1.6rem; font-size: 1.6rem;
font-weight: bold; font-weight: bold;
color: var(--body-text-color); color: var(--body-text-color);

View file

@ -33,17 +33,15 @@
} }
} }
} }
}
}
@for $i from 1 through length($defaultTagBackgrounds) { @for $i from 1 through length($defaultTagBackgrounds) {
&:nth-child(#{length($defaultTagBackgrounds)}n + #{$i}) { .article-category:nth-child(#{length($defaultTagBackgrounds)}n + #{$i}) a {
.article-category a {
background: nth($defaultTagBackgrounds, $i); background: nth($defaultTagBackgrounds, $i);
color: nth($defaultTagColors, $i); color: nth($defaultTagColors, $i);
} }
} }
}
}
}
.article-details { .article-details {
display: flex; display: flex;

View file

@ -3,6 +3,9 @@
flex-direction: column; flex-direction: column;
.widget-icon { .widget-icon {
display: flex;
align-items: center; /* Центрирование по вертикали */
gap: 10px; /* Расстояние между SVG и текстом */
svg { svg {
width: 32px; width: 32px;
height: 32px; height: 32px;

View file

@ -1,8 +0,0 @@
---
menu:
main:
name: 主页
weight: -100
params:
icon: home
---

View file

@ -13,17 +13,19 @@ links:
description: Поддержать меня на Boosty description: Поддержать меня на Boosty
website: https://boosty.to/buliway website: https://boosty.to/buliway
image: /boosty.png image: /boosty.png
series: ["Hugo Guide"] series: ["Hugo Guide"] # Серия статей на какую-то тему
math: true math: true # Вкл/Выкл KaTeX рендеринг
# lastmod: # Дата редактирования поста
# image: string # Изображение поста # image: string # Изображение поста
# comments: bool # Вкл/Выкл комментариев под данным постом # comments: false # Вкл/Выкл комментариев под данным постом
# toc: bool # Вкл/Выкл навигацию по заголовкам справа от поста # toc: false # Вкл/Выкл навигацию по заголовкам справа от поста
# keywords: []string # Keywords of the page. Useful for SEO. # keywords: []string # Keywords of the page. Useful for SEO.
# draft: true # Если вкл, то не рендерит эту страницу. Для недописанных постов
--- ---
## Введение ## Введение
Эта статья содержит в себе сборник всех изначально встроенных статей в эту тему Hugo. Тут будет всё о markdown для написания статей. Как именно это написать в `.md` файле я показывать буду лишь частично. Эта статья скорее для меня как для админа, чтоб я мог вернуться и глянуть как пишется какой-либо функционал. Эта статья содержит в себе сборник всех изначально встроенных статей в эту тему Hugo. Тут будет всё о markdown для написания статей. Как именно это написать в `.md` файле я показывать буду лишь частично. Полностью можно посмотреть в [файле на github](https://raw.githubusercontent.com/Buliway/hugo-theme-stack/master/exampleSite/content/post/Markdown%20Syntax%20Guide/index.ru.md). Эта статья скорее для меня как для админа, чтоб я мог вернуться и глянуть как пишется какой-либо функционал.
В начале статьи надо добавить поле, которое называется [frontmatter](https://gohugo.io/content-management/front-matter/). В документации написаны все возможные параметры, которые туда можно написать. Выделить настройки можно либо через `---`, либо через `+++`. Разница в том, что `---` будет иметь синтаксис `yaml` формата, а `+++` будет иметь синтаксис `toml`. В настройки, например, можно добавить поле `series = ["Themes Guide"]`. Это будет означать серию статей о какой-то теме, чтоб читатели могли видеть связанный контент. Как я понимаю, речь про рекомендации в конце поста. Хотя рекомендации, в теории, должны работать и без этого, просто по общим категориям и тегам. В начале статьи надо добавить поле, которое называется [frontmatter](https://gohugo.io/content-management/front-matter/). В документации написаны все возможные параметры, которые туда можно написать. Выделить настройки можно либо через `---`, либо через `+++`. Разница в том, что `---` будет иметь синтаксис `yaml` формата, а `+++` будет иметь синтаксис `toml`. В настройки, например, можно добавить поле `series = ["Themes Guide"]`. Это будет означать серию статей о какой-то теме, чтоб читатели могли видеть связанный контент. Как я понимаю, речь про рекомендации в конце поста. Хотя рекомендации, в теории, должны работать и без этого, просто по общим категориям и тегам.

View file

@ -1,46 +1,25 @@
baseurl: https://example.com baseurl: https://buliway.ru
languageCode: en-us languageCode: ru-RU
theme: hugo-theme-stack theme: hugo-theme-stack
paginate: 3 paginate: 10
title: Example Site title: Buliway
copyright: Example Person copyright: Buliway
# Theme i18n support # Theme i18n support
# Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw # Available values: ar, bn, ca, de, el, en, es, fr, hu, id, it, ja, ko, nl, pt-br, th, uk, zh-cn, zh-hk, zh-tw
DefaultContentLanguage: en DefaultContentLanguage: ru
# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] # Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko]
# This will make .Summary and .WordCount behave correctly for CJK languages. # This will make .Summary and .WordCount behave correctly for CJK languages.
hasCJKLanguage: false hasCJKLanguage: false
languages: languages:
en: ru:
languageName: English languageName: Russian
title: Example Site
weight: 1 weight: 1
timeZone: Europe/Moscow
params: params:
description: Example description description: Блог о программировании # Это описание сайта, а не языка
zh-cn:
languageName: 中文
title: 演示站点
weight: 2
params:
description: 演示说明
ar:
languageName: عربي
languagedirection: rtl
title: موقع تجريبي
weight: 3
params:
description: وصف تجريبي
services:
# Change it to your Disqus shortname before using
disqus:
shortname: "hugo-theme-stack"
# GA Tracking ID
googleAnalytics:
id:
permalinks: permalinks:
post: /p/:slug/ post: /p/:slug/
@ -51,19 +30,15 @@ params:
- post - post
featuredImageField: image featuredImageField: image
rssFullContent: true rssFullContent: true
favicon: # e.g.: favicon placed in `static/favicon.ico` of your site folder, then set this field to `/favicon.ico` (`/` is necessary) favicon: # Это иконка сайта. Сначала создаём `static/favicon.ico`, потом пишем в это поле `/favicon.ico` (/ обязателен)
footer: footer:
since: 2020 since: 2024
customText: customText:
dateFormat:
published: Jan 02, 2006
lastUpdated: Jan 02, 2006 15:04 MST
sidebar: sidebar:
emoji: 🍥 # emoji: 🍥
subtitle: Lorem ipsum dolor sit amet, consectetur adipiscing elit. subtitle: Текст под сайтом
avatar: avatar:
enabled: true enabled: true
local: true local: true
@ -78,8 +53,8 @@ params:
default: Licensed under CC BY-NC-SA 4.0 default: Licensed under CC BY-NC-SA 4.0
comments: comments:
enabled: true enabled: false
provider: disqus provider: remark42
disqusjs: disqusjs:
shortname: shortname:
@ -163,15 +138,15 @@ params:
widgets: widgets:
homepage: homepage:
- type: search - type: search
- type: archives
params:
limit: 5
- type: categories - type: categories
params: params:
limit: 10 limit: 10
- type: tag-cloud - type: tag-cloud
params: params:
limit: 10 limit: 20
- type: archives
params:
limit: 5
page: page:
- type: toc - type: toc
@ -194,7 +169,7 @@ params:
toggle: true toggle: true
# Available values: auto, light, dark # Available values: auto, light, dark
default: auto default: dark
imageProcessing: imageProcessing:
cover: cover:
@ -211,15 +186,34 @@ menu:
social: social:
- identifier: github - identifier: github
name: GitHub name: GitHub
url: https://github.com/CaiJimmy/hugo-theme-stack url: https://github.com/Buliway/
params: params:
icon: brand-github icon: brand-github
- identifier: twitter - identifier: discord
name: Twitter name: Discord
url: https://twitter.com url: https://discord.gg/MwKdpYujYh
params: params:
icon: brand-twitter icon: brand-discord
- identifier: telegram
name: Telegram
url: https://t.me/+q6STihSO6XQ4Mzhi
params:
icon: brand-telegram
- identifier: email
name: Email
url: mailto:example@example.com
params:
icon: mail
- identifier: boosty
name: Boosty
url: https://boosty.to/buliway
params:
icon: coin
related: related:
includeNewer: true includeNewer: true
@ -249,3 +243,5 @@ markup:
lineNos: true lineNos: true
lineNumbersInTable: true lineNumbersInTable: true
tabWidth: 4 tabWidth: 4
enableGitInfo: true

View file

@ -71,3 +71,7 @@ footer:
designedBy: designedBy:
other: Theme {{ .Theme }} designed by {{ .DesignedBy }} other: Theme {{ .Theme }} designed by {{ .DesignedBy }}
tags:
web: Web
hugo: Hugo

View file

@ -2,7 +2,7 @@ toggleMenu:
other: Показать/скрыть меню other: Показать/скрыть меню
darkMode: darkMode:
other: Тёмный режим other: Тёмная тема
list: list:
page: page:
@ -47,6 +47,9 @@ widget:
tagCloud: tagCloud:
title: title:
other: Теги other: Теги
categoriesCloud:
title:
other: Категории
search: search:
title: title:
@ -61,3 +64,7 @@ footer:
other: Создано при помощи {{ .Generator }} other: Создано при помощи {{ .Generator }}
designedBy: designedBy:
other: Тема {{ .Theme }}, дизайн {{ .DesignedBy }} other: Тема {{ .Theme }}, дизайн {{ .DesignedBy }}
tags:
web: Веб
hugo: Hugo

View file

@ -4,7 +4,7 @@
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}} {{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
{{- $terms := $taxonomy.Pages -}} {{- $terms := $taxonomy.Pages -}}
{{ if $terms }} {{ if $terms }}
<h2 class="section-title">{{ $taxonomy.Title }}</h2> <h2 class="section-title">{{ T "widget.categoriesCloud.title" }}</h2>
<div class="subsection-list"> <div class="subsection-list">
<div class="article-list--tile"> <div class="article-list--tile">
{{ range $terms }} {{ range $terms }}
@ -15,6 +15,19 @@
{{ end }} {{ end }}
</header> </header>
<section class="widget tagCloud">
<h2 class="section-title">{{ T "widget.tagCloud.title" }}</h2>
<div class="tagCloud-tags">
{{ range first 1000 $.Site.Taxonomies.tags.ByCount }}
{{ $tagID := printf "tags.%s" (.Page.Title | urlize | lower) }}
{{ $translation := i18n $tagID }}
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
{{ $translation }}
</a>
{{ end }}
</div>
</section>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
{{ $filtered := ($pages | intersect $notHidden) }} {{ $filtered := ($pages | intersect $notHidden) }}

View file

@ -1,5 +1,5 @@
{{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections -}} {{- $pages := where .Site.AllPages "Type" "in" .Site.Params.mainSections -}}
{{- $notHidden := where .Site.RegularPages "Params.hidden" "!=" true -}} {{- $notHidden := where .Site.AllPages "Params.hidden" "!=" true -}}
{{- $filtered := ($pages | intersect $notHidden) -}} {{- $filtered := ($pages | intersect $notHidden) -}}
{{- $result := slice -}} {{- $result := slice -}}

View file

@ -1,13 +1,4 @@
<div class="article-details"> <div class="article-details">
{{ if .Params.categories }}
<header class="article-category">
{{ range (.GetTerms "categories") }}
<a href="{{ .RelPermalink }}" {{ with .Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
{{ .LinkTitle }}
</a>
{{ end }}
</header>
{{ end }}
<div class="article-title-wrapper"> <div class="article-title-wrapper">
<h2 class="article-title"> <h2 class="article-title">
@ -32,7 +23,7 @@
<div> <div>
{{ partial "helper/icon" "date" }} {{ partial "helper/icon" "date" }}
<time class="article-time--published"> <time class="article-time--published">
{{- .Date.Format (or .Site.Params.dateFormat.published "Jan 02, 2006") -}} {{- time.Format "2 January 2006" .Date -}}
</time> </time>
</div> </div>
{{ end }} {{ end }}
@ -58,4 +49,14 @@
</div> </div>
</footer> </footer>
{{ end }} {{ end }}
{{ if .Params.categories }}
<header class="article-category">
{{ range (.GetTerms "categories") }}
<a href="{{ .RelPermalink }}" {{ with .Params.style }}style="background-color: {{ .background }}; color: {{ .color }};"{{ end }}>
{{ .LinkTitle }}
</a>
{{ end }}
</header>
{{ end }}
</div> </div>

View file

@ -12,7 +12,7 @@
<section class="article-lastmod"> <section class="article-lastmod">
{{ partial "helper/icon" "clock" }} {{ partial "helper/icon" "clock" }}
<span> <span>
{{ T "article.lastUpdatedOn" }} {{ .Lastmod.Format ( or .Site.Params.dateFormat.lastUpdated "Jan 02, 2006 15:04 MST" ) }} {{ T "article.lastUpdatedOn" }} {{ time.Format "02 January 2006 15:04" .Lastmod }}
</span> </span>
</section> </section>
{{- end -}} {{- end -}}

View file

@ -1,7 +1,9 @@
{{ if .Params.Tags }} {{ if .Params.Tags }}
<section class="article-tags"> <section class="article-tags">
{{ range (.GetTerms "tags") }} {{ range (.GetTerms "tags") }}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> {{ $tagID := printf "tags.%s" (.LinkTitle | urlize | lower) }}
{{ $translation := i18n $tagID }}
<a href="{{ .RelPermalink }}">{{ $translation }}</a>
{{ end }} {{ end }}
</section> </section>
{{ end }} {{ end }}

View file

@ -6,8 +6,8 @@
<section class="widget archives"> <section class="widget archives">
<div class="widget-icon"> <div class="widget-icon">
{{ partial "helper/icon" "infinity" }} {{ partial "helper/icon" "infinity" }}
</div>
<h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2> <h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2>
</div>
{{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }} {{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }}
{{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }} {{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }}

View file

@ -3,8 +3,8 @@
<section class="widget tagCloud"> <section class="widget tagCloud">
<div class="widget-icon"> <div class="widget-icon">
{{ partial "helper/icon" "categories" }} {{ partial "helper/icon" "categories" }}
</div>
<h2 class="widget-title section-title">{{ T "widget.categoriesCloud.title" }}</h2> <h2 class="widget-title section-title">{{ T "widget.categoriesCloud.title" }}</h2>
</div>
<div class="tagCloud-tags"> <div class="tagCloud-tags">
{{ range first $limit $context.Site.Taxonomies.categories.ByCount }} {{ range first $limit $context.Site.Taxonomies.categories.ByCount }}

View file

@ -3,14 +3,17 @@
<section class="widget tagCloud"> <section class="widget tagCloud">
<div class="widget-icon"> <div class="widget-icon">
{{ partial "helper/icon" "tag" }} {{ partial "helper/icon" "tag" }}
</div>
<h2 class="widget-title section-title">{{ T "widget.tagCloud.title" }}</h2> <h2 class="widget-title section-title">{{ T "widget.tagCloud.title" }}</h2>
</div>
<div class="tagCloud-tags"> <div class="tagCloud-tags">
{{ range first $limit $context.Site.Taxonomies.tags.ByCount }} {{ range first $limit $context.Site.Taxonomies.tags.ByCount }}
{{ $tagID := printf "tags.%s" (.Page.Title | urlize | lower) }}
{{ $translation := i18n $tagID }}
<a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}"> <a href="{{ .Page.RelPermalink }}" class="font_size_{{ .Count }}">
{{ .Page.Title }} {{ $translation }}
</a> </a>
{{ end }} {{ end }}
</div> </div>
</section> </section>

View file

@ -2,8 +2,8 @@
<section class="widget archives"> <section class="widget archives">
<div class="widget-icon"> <div class="widget-icon">
{{ partial "helper/icon" "hash" }} {{ partial "helper/icon" "hash" }}
</div>
<h2 class="widget-title section-title">{{ T "article.tableOfContents" }}</h2> <h2 class="widget-title section-title">{{ T "article.tableOfContents" }}</h2>
</div>
<div class="widget--toc"> <div class="widget--toc">
{{ .Context.TableOfContents }} {{ .Context.TableOfContents }}