Initial work on adding i18n support, drop footer link support (breaking change!)

This commit is contained in:
daudix
2024-06-15 22:36:03 +03:00
parent c1f9247c86
commit a4a68c8b61
25 changed files with 821 additions and 100 deletions

View File

@ -10,6 +10,43 @@ build_search_index = false
author = "Duck Quack"
taxonomies = [{ name = "tags", feed = true }]
default_language = "en"
[languages.ru]
title = "Duckquill"
description = "Современная, симпатичная и аккуратная тема."
generate_feed = true
taxonomies = [{ name = "tags", feed = true }]
[languages.ru.translations]
archived = "Архивировано"
author = "Автор"
comments = "Комментарии"
comments_description = "Вы можете оставить комментарий к этому блог-посту, публично ответив на него с помощью аккаунта Mastodon или другого аккаунта ActivityPub/Fediverse. Известные неприватные ответы отображены ниже."
comments_loading = "Загрузка…"
comments_noscript = "Загрузка комментариев зависит от JavaScript. Попробуйте включить JavaScript и перезагрузить, или посетите оригинальный пост на Mastodon."
disclaimer = "Дисклеймер"
drafted = "Черновик"
feed = "Лента"
file_an_issue = "Отправить Отчет об Ошибке"
filter_by_tag = "Фильтр по тегам"
footer_powered_by = "Работает на базе"
footer_powered_by_and = "и"
footer_source = "Исходный код веб-сайта"
go_to_top = "Перейти в Начало"
load_comments = "Загрузить Комментарии"
newest_to_oldest = "От новейшего к старейшему"
page_next = "Следующий"
page_previous = "Предыдущий"
posts_in_total = "всего постов"
posts_with_tag = "Посты с тегом"
see_all_tags = "Показать все теги"
skip_to_content = "Перейти к основному содержанию"
table_of_contents = "Оглавление"
tags = "Теги"
tags_in_total = "тегов в общем"
trigger_warning = "Предупреждение о неожиданности"
[markdown]
highlight_code = true
@ -64,17 +101,12 @@ show_feed = true
# i.e "@/blog/_index.md".
# See https://www.getzola.org/documentation/content/linking/#internal-links
links = [
{ url = "@/blog/_index.md", name = "Blog" },
{ url = "@/demo/index.md", name = "Demo" },
{ url = "https://codeberg.org/daudix/duckquill", name = "Repo" },
{ url = "@/blog/_index.md", name = "Blog", name_ru = "Блог" },
{ url = "@/demo/index.md", name = "Demo", name_ru = "Демо" },
{ url = "https://codeberg.org/daudix/duckquill", name = "Repo", name_ru = "Репо" },
]
[extra.footer]
# Links used in the footer.
# For local files use same link format as in Markdown,
# i.e "@/blog/_index.md".
# See https://www.getzola.org/documentation/content/linking/#internal-links
# links = []
# Social links in the footer.
# Any URL-encoded SVG can be used as an icon.
# https://simpleicons.org is recommended source of SVG icons.

180
content/_index.ru.md Normal file
View File

@ -0,0 +1,180 @@
+++
insert_anchor_links = "right"
+++
{% crt() %}
```
_ _ _ _ _
>(')____, >(')____, >(')____, >(')____, >(') ___,
(` =~~/ (` =~~/ (` =~~/ (` =~~/ (` =~~/
jgs~^~^`---'~^~^~^`---'~^~^~^`---'~^~^~^`---'~^~^~^`---'~^~^~
```
{% end %}
# Duckquill
Duckquill - это современная, красивая и чистая (и мнительная) тема [Zola](https://www.getzola.org), цель которой - значительно упростить процесс создания вашего блога. Она призвана предоставить все необходимые опции для комфортного письма, сохраняя при этом баланс простоты оформления.
Отредактируйте немного метаданных и измените графику - и блог будет готов за считанные минуты!
- Красивая, но легкая. Не используется JavaScript (за исключением комментариев, хех).
- Цвета подкрашиваются выбранным пользователем основным цветом для приятного вида.
- Размер ~90 кБ; выкуси, Medium весящий 12 МБ!
- Использует системные шрифты для молниеносной загрузки.
- Дружелюбена к мобильным устройствам, имеет правильный темный вариант.
- Правильный фавикон для современных браузеров и иконки устройств Apple.
- Мета-карточки для Twitter, Mastodon и других социальных сетей для удобства публикации. Попробуйте [Share Preview](https://apps.gnome.org/SharePreview/), чтобы протестировать.
- [Комментарии с использованием Mastodon](https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/); комментируйте, используя совместимый сервер ActivityPub, отвечая на пост Mastodon.
> Duckquill создан на основе нужд [моего сайта](https://daudix.codeberg.page), если вам нужна какая-то функция/конфигурация, которой не существует, не стесняйтесь открыть тему или, еще лучше, запрос на исправление!
## Установка
Сначала клонируйте эту тему в каталог `themes`:
```sh
git clone https://codeberg.org/daudix/duckquill.git themes/duckquill
```
...или добавьте в качестве субмодуля для удобства обновления (рекомендуется, если у вас уже настроен git на сайте):
```sh
git submodule init
git submodule add https://codeberg.org/daudix/duckquill.git themes/duckquill
```
Настоятельно рекомендуется переключиться с ветки `main` на последний выпуск:
```sh
cd themes/duckquill
git checkout tags/v2.1.0
```
Чтобы обновить субмодуль, просто переключитесь на новый тег:
> **Примечание:** Проверьте в журнале изменений все версии, вышедшие после той, которую вы используете, возможно, в них есть изменения, требующие ручного вмешательства.
```sh
git submodule update --remote --merge
git tag --list
git checkout tags/v2.1.0
```
Затем включите её в файле `config.toml`:
```toml
theme = "duckquill"
```
## Конфигурации
Duckquill предлагает несколько вариантов конфигурации, чтобы сделать его более подходящим для вас; большинство вариантов имеют довольно подробные комментарии, так что понять, что они делают, не составит труда.
### Пользовательские Таблицы Стилей
Вы можете добавить свои собственные или переопределить существующие стили, создав пользовательскую таблицу стилей и добавив ее в `config.toml`:
```toml
[extra]
stylesheets = [
"YOUR_STYLE.css"
]
```
Дополнительные таблицы стилей; ожидает, что они будут находиться в директории `static`. Если вы используете Sass, они будут скомпилированы там в любом случае.
Если по какой-то причине переопределенные классы не учитываются, попробуйте использовать `!important`. Вы можете импортировать стили из Duckquill, используя:
```scss
@use "../themes/duckquill/sass/NEEDED_FILE.scss";
```
### Основной Цвет
Duckquill везде соблюдает выбранный основной цвет, просто измените основной цвет в `config.toml`:
```toml
[extra]
primary_color = "COLOR_CODE"
primary_color_alpha = "COLOR_CODE"
```
## Тестовые Страницы
- [Демо страница](@/demo/index.ru.md)
- [Тортовая вечеринка!](@/demo/page.ru.md)
- [Демо комментариев ActivityPub/Fediverse](@/demo/comments.ru.md)
- [Демо блока кода (требуется Zola v0.18.0 и выше)](@/demo/code.ru.md)
## В Дикой Природе
<details>
<summary>Список становится длинным, поэтому нажмите, чтобы развернуть.</summary>
- [agustinramirodiaz.github.io](https://agustinramirodiaz.github.io)
- [alavi.me](https://alavi.me)
- [bano.dev](https://bano.dev)
- [blog.pansi21.xyz](https://blog.pansi21.xyz)
- [daudix.codeberg.page](https://daudix.codeberg.page) <small>(очевидно)</small>
- [daveparr.info](https://www.daveparr.info)
- [digital-horror.com](https://digital-horror.com)
- [enriquekesslerm.com](https://enriquekesslerm.com)
- [jzbor.de](https://jzbor.de)
- [licu.dev](https://licu.dev)
- [luciengheerbrant.com](https://luciengheerbrant.com)
- [lukoktonos.com](http://www.lukoktonos.com)
- [malloc.garden](https://malloc.garden)
- [mourelask.xyz](https://mourelask.xyz)
- [nbenedek.me](https://nbenedek.me)
- [notaplace.com](https://notaplace.com)
- [pyter.at](https://pyter.at)
- [rbd.gg](https://www.rbd.gg)
- [rerere.unlogic.co.uk](https://rerere.unlogic.co.uk)
- [siddharthsabron.in](https://siddharthsabron.in)
- [skaven.org](https://skaven.org)
- [sorcery.nexus](https://sorcery.nexus)
- [sorg.codeberg.page](https://sorg.codeberg.page)
- [sungsphinx.codeberg.page](https://sungsphinx.codeberg.page)
- [treeniks.github.io](https://treeniks.github.io)
- [vikramxd.github.io](https://vikramxd.github.io)
- [zorrn.net](https://www.zorrn.net)
- Ваш? <small>(не стесняйтесь [связаться со мной](https://daudix.codeberg.page/about/#contacts) или отправьте запрос на исправление)</small>
</details>
## В Титрах
- [andreatitolo.com](https://www.andreatitolo.com/credits)
- [aplos.gxbs.me](https://aplos.gxbs.me)
- [archaeoramblings.com](https://www.archaeoramblings.com/credits)
- [oomfie.town](https://oomfie.town/credits)
- [veeronniecaw.space](https://veeronniecaw.space)
## Исходники Ресурсов
Все исходники ресурсов Duckquill доступны [здесь](https://codeberg.org/daudix/archive/src/branch/main/duckquill/src) и лицензированы под CC BY-SA 4.0. Причина не размещать исходники в том же репо, что и сам Duckquill, проста: Я хочу, чтобы он был как можно меньше, чтобы клонирование репо было быстрым и не утяжеляло сайт; именно поэтому в демо используются удаленные изображения, а не локальные копии.
## Кредиты
- [Изображение пера, используемое в карточке метаданных](https://commons.wikimedia.org/wiki/File:3quills.jpg)
## Использованные Инструменты
- [VSCodium](https://vscodium.com) - Бесплатные/открытые программные бинарные файлы VSCode
- [Capitalize](https://marketplace.visualstudio.com/items?itemName=viablelab.capitalize) - Капитализация заголовков без случайных сайтов.
- [Django](https://marketplace.visualstudio.com/items?itemName=batisteo.vscode-django) - Tera местами очень похожа на Liquid.
- [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) - В основном для `config.toml`.
- [Monokai Pro](https://marketplace.visualstudio.com/items?itemName=monokai.theme-monokai-pro-vscode) - Ужасно красивая тема.
- [SCSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-scss) - Не уверен, что это действительно работает. ¯\\\_(ツ)_/¯
- [Sort CSS](https://marketplace.visualstudio.com/items?itemName=piyushsarkar.sort-css-properties) - Спасатель для длинных свойств CSS.
- [Инструменты разработчика Firefox](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Tools_and_setup/What_are_browser_developer_tools) - Лучшие в своем роде.
Что касается форматирования кода, то я использую встроенный в VSCodium. Prettier хорош, но мне не нравится, как он пытается вместить код в очень узкую колонку, это, конечно, можно изменить, но встроенный форматер делает свое дело, поэтому я не заморачиваюсь.
## Спасибо
- [Якубу Штайнеру](https://jimmac.eu) за [OS Component Website](https://jimmac.github.io/os-component-website), который послужил отправной точкой и вдохновением.
- [Карлу Швану](https://carlschwan.eu) за [Mastodon-powered Comments](https://carlschwan.eu/2020/12/29/adding-comments-to-your-static-blog-with-mastodon/).
- [Джонатану Нилу](https://jonneal.dev) за [normalize.css](https://csstools.github.io/normalize.css/).
- [Modern Font Stacks](https://modernfontstacks.com) за стек системных шрифтов.
- Всем, кто поддерживал меня и говорил хорошие вещи <3

View File

@ -0,0 +1,7 @@
+++
title = "Writings of Duck's Feet"
description = "Welcome to my quack'in blog, I quack about various stuff, but mostly I'm a demo"
sort_by = "date"
template = "article_list.html"
page_template = "article.html"
+++

View File

@ -0,0 +1,17 @@
+++
authors = ["John Draft"]
title = "Drafty draft"
description = "Drafted post, very drafty."
date = 2024-04-29
draft = true
[taxonomies]
tags = ["Draft"]
[extra]
toc = false
+++
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur. Quod idem licet transferre in voluptatem, ut postea.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea bona praeterita grata recordatione renovata delectant. Est.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea.

View File

@ -0,0 +1,16 @@
+++
authors = ["John Ipsum"]
title = "Ipsum"
description = "Lorem ipsum dolor sit amet."
date = 1970-01-02
[taxonomies]
tags = ["Lorem", "Ipsum"]
[extra]
toc = false
+++
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur. Quod idem licet transferre in voluptatem, ut postea.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea bona praeterita grata recordatione renovata delectant. Est.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea.

View File

@ -0,0 +1,17 @@
+++
authors = ["Long Long Man"]
title = "Loooooong Loooooong Loooooong Loooooong Loooooong Man"
description = "Veeery, veeery looong man."
date = 2017-01-01
[taxonomies]
tags = ["Draft"]
[extra]
toc = false
archive = "This page is, in fact, not archived."
+++
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur. Quod idem licet transferre in voluptatem, ut postea.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea bona praeterita grata recordatione renovata delectant. Est.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea.

View File

@ -0,0 +1,16 @@
+++
authors = ["John Lorem"]
title = "Lorem"
description = "Lorem ipsum dolor sit amet."
date = 1970-01-01
[taxonomies]
tags = ["Lorem", "Ipsum"]
[extra]
toc = false
+++
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim aeque doleamus animo, cum corpore dolemus, fieri tamen permagna accessio potest, si aliquod aeternum et infinitum impendere malum nobis opinemur. Quod idem licet transferre in voluptatem, ut postea.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea bona praeterita grata recordatione renovata delectant. Est.
Ullus investigandi veri, nisi inveneris, et quaerendi defatigatio turpis est, cum esset accusata et vituperata ab Hortensio. Qui liber cum et mortem contemnit, qua qui est imbutus quietus esse numquam potest. Praeterea.

View File

@ -0,0 +1,65 @@
+++
authors = ["Duck Quack"]
title = "The Quill of Duck"
description = "This is a Duckquill post example, this post has nothing but a bunch of text and random formatting, acting like a demo."
date = 2023-08-31
[taxonomies]
tags = ["Demo", "Test"]
[extra]
archive = "This page is, in fact, not archived."
toc = true
disclaimer = """
See [demo](@/demo/index.md) for showcase of all Duckquill possibilities. This page is a demo of a post with title, publication date, tags, disclaimer, table of contents and comments.
"""
[extra.comments]
host = "toot.community"
user = "sungsphinx"
id = "111789185826519979"
+++
![Quill](quill.png)
## The what?
This is a Duckquill post example, this post has nothing but a bunch of text and random formatting, acting like a demo.
## Some info
Well, open this file and look at how it's made, it includes all the essential front matter stuff.
Now to the _Stanley!_
## The _Stanley_!
This is the story of a man named _Stanley_.
_Stanley_ worked for a company in a big building where he was Employee `#427`.
![The Office](the-office.webp)
<figcaption>The Office where Stanley works, it has yellow floor and beige walls</figcaption>
Employee `#427`'s job was simple: he sat at his desk in Room `427` and he pushed buttons on a keyboard.
Orders came to him through a monitor on his desk telling him what buttons to push, how long to push them, and in what order.
This is what Employee `#427` did every day of every month of every year, and although others may have considered it soul rending,
_Stanley_ relished every moment that the orders came in, as though he had been made exactly for this job.
And _Stanley_ was happy.
And then one day, something very peculiar happened.
Something that would forever change _Stanley_;
Something he would never quite forget.
He had been at his desk for nearly an hour when he had realized not one single order had arrived on the monitor for him to follow.
No one had shown up to give him instructions, call a meeting, or even say 'hi'. Never in all his years at the company had this happened, this complete isolation.
Something was very clearly wrong. Shocked, frozen solid, _Stanley_ found himself unable to move for the longest time.
But as he came to his wits and regained his senses, he got up from his desk and stepped out of his office.
All of his co-workers were gone. What could it mean? Stanley decided to go to the meeting room; perhaps he had simply missed a memo.

21
content/demo/code.ru.md Normal file
View File

@ -0,0 +1,21 @@
+++
title = "Демо блока кода"
+++
```scss, linenos, linenostart=10, hl_lines=3-4 8-9, hide_lines=2 7
pre mark {
display: block;
color: currentcolor;
}
pre table td:nth-of-type(1) {
color: #6b6b6b;
font-style: italic;
}
```

View File

@ -0,0 +1,8 @@
+++
template = "article.html"
title = "Демо комментариев ActivityPub/Fediverse"
[extra.comments]
host = "toot.community"
user = "sungsphinx"
id = "111784580759701190"
+++

View File

@ -18,7 +18,7 @@ Text can be **bold**, _italic_, or ~~strikethrough~~.
There should be whitespace between paragraphs.
There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project.
We recommend including a README, or a file with information about your project.
# Heading 1
@ -33,7 +33,7 @@ This is a normal paragraph following a header. Codeberg is a code hosting platfo
### Heading 3
```js
// Javascript code with syntax highlighting.
// Javascript code with syntax highlighting
var fun = function lang(l) {
dateformat.i18n = require("./lang/" + l);
return true;
@ -82,9 +82,9 @@ end
## And an ordered list:
1. Item one
1. Item two
1. Item three
1. Item four
2. Item two
3. Item three
4. Item four
## And a nested list:

327
content/demo/index.ru.md Normal file
View File

@ -0,0 +1,327 @@
+++
template = "article.html"
title = "Демо Страница"
[extra]
archive = "Эта страница, на деле, не архивирована, а это значит, что она будет получать обновления контента."
trigger = "Эта страница содержит блэкджек и проституток, а также плохие шутки, такие как эта."
disclaimer = """
- Все трюки на этой странице выполнены лаборантами, не пытайтесь повторить это дома
- Не подвергайте себя воздействию 4000° по Кельвину
- Не принимайте позу распридилителя вечеринок
- Не взаимодействуйте с асбестом и лунными камнями
"""
+++
Текст может быть **жирным**, урсивным_ или ~~зачеркнутым~~.
[Ссылка на другую страницу](@/demo/page.ru.md).
Между абзацами должны быть пробелы.
Рекомендуется включить README или файл с информацией о вашем проекте.
# Заголовок 1
Это обычный абзац, следующий за заголовком. Codeberg - это платформа хостинга кода для контроля версий и совместной работы. Она позволяет вам и другим людям работать над проектами из любого места.
## Заголовок 2
> Это блок-цитата, следующая за заголовком.
>
> > Когда что-то достаточно важно, вы делаете это, даже если шансы не в вашу пользу.
### Заголовок 3
```js
// Javascript-код с подсветкой синтаксиса
var fun = function lang(l) {
dateformat.i18n = require("./lang/" + l);
return true;
};
```
```ruby
# Код на языке Ruby с подсветкой синтаксиса
GitHubPages::Dependencies.gems.each do |gem, version|
s.add_dependency(gem, "= #{version}")
end
```
#### Заголовок 4
- Это неупорядоченный список, следующий за заголовком.
- Это неупорядоченный список, следующий за заголовком.
- Это неупорядоченный список, следующий за заголовком.
##### Заголовок 5
1. Это упорядоченный список, следующий за заголовком.
2. Это упорядоченный список, следующий за заголовком.
3. Это упорядоченный список, следующий за заголовком.
###### Заголовок 6
| head1 | head two | three |
| :----------- | :---------------- | :---- |
| ok | good swedish fish | nice |
| out of stock | good and plenty | nice |
| ok | good `oreos` | hmm |
| ok | good `zoute` drop | yumm |
## Под этим есть горизонтальный разделитель.
---
## Вот неупорядоченный список:
- Item foo
- Item bar
- Item baz
- Item zip
## И упорядоченный список:
1. Item one
2. Item two
3. Item three
4. Item four
## И вложенный список:
- level 1 item
- level 2 item
- level 2 item
- level 3 item
- level 3 item
- level 1 item
- level 2 item
- level 2 item
- level 2 item
- level 1 item
- level 2 item
- level 2 item
- level 1 item
## Вот галочки:
- [ ] Milk
- [x] Eggs
- [x] Flour
- [ ] Coffee
- [x] Combustible lemons
### То же, но интерактивно:
<ul>
<li><input type="checkbox"> Milk</li>
<li><input checked="" type="checkbox"> Eggs</li>
<li><input checked="" type="checkbox"> Flour</li>
<li><input type="checkbox"> Coffee</li>
<li><input checked="" type="checkbox"> Combustible lemons</li>
</ul>
### С типом radio
<ul>
<li><input type="radio" name="test"> Milk</li>
<li><input type="radio" name="test"> Eggs</li>
<li><input type="radio" name="test"> Flour</li>
<li><input checked="" type="radio" name="test"> Coffee</li>
<li><input type="radio" name="test" disabled=""> Combustible lemons</li>
</ul>
## Маленькое изображение
{{ image(url="https://codeberg.org/Codeberg/Design/raw/branch/main/logo/icon/png/codeberg-logo_icon_blue-64x64.png", alt="Codeberg icon", transparent=true, no_hover=true) }}
## Большое изображение
{{ image(url="https://codeberg.org/Codeberg/Design/raw/branch/main/logo/horizontal/png/codeberg-logo_horizontal_blue-850x250.png", alt="Codeberg horizontal", transparent=true, no_hover=true) }}
## Списки определений можно использовать с синтаксисом HTML.
<dl>
<dt>Name</dt>
<dd>Godzilla</dd>
<dt>Born</dt>
<dd>1952</dd>
<dt>Birthplace</dt>
<dd>Japan</dd>
<dt>Color</dt>
<dd>Green</dd>
</dl>
```
Длинные однострочные блоки кода не должны сворачиваться. Они должны горизонтально прокручиваться, если они слишком длинные. Эта строка должна быть достаточно длинной, чтобы продемонстрировать это.
```
```
Последний элемент.
```
## Дополнительное
Ладно, теперь, когда обычная (немного расширенная) демо-страница ~~Jekyll~~ Zola закончилась, мы можем перейти к пользовательским вещам, которые, поверьте мне, очень хороши.
😭😂🥺🤣❤️✨🙏😍🥰😊
### Шорткоды
Duckquill предоставляет несколько полезных [шорткодов](https://www.getzola.org/documentation/content/shortcodes/), которые упрощают некоторые задачи.
#### Изображение
По умолчанию изображения имеют такие стили, как закругленные углы и тень. Для тонкой настройки можно использовать шорткоды с различными комбинациями переменных.
Доступны следующие переменные:
- `url`: URL-адрес изображения.
- `url_min`: URL-адрес сжатой версии изображения, оригинал можно открыть, щелкнув по изображению.
- `alt`: Alt-текст, такой же, как если бы текст был заключен в квадратные скобки в Markdown.
- `full`: Заставляет изображение/видео быть во всю ширину.
- `pixels`: Использует алгоритм nearest neighbor для масштабирования, полезно для сохранения четкости пиксель-арта.
- `transparent`: Удаляет закругленные углы и тень, полезно для прозрачных изображений.
- `no_hover`: Убирает масштабирование при наведении.
Переменные должны быть разделены запятыми и находиться внутри скобок.
```jinja2
{{/* image(url="image.png", alt="This is an image" no_hover=true) */}}
```
{{ image(url="https://i1.theportalwiki.net/img/2/23/Ashpd_blueprint.jpg", alt="Portal Gun blueprint", no_hover=true) }}
<figcaption>Изображение с alt-текстом и без масштабирования при наведении</figcaption>
{{ image(url="https://upload.wikimedia.org/wikipedia/commons/b/b4/JPEG_example_JPG_RIP_100.jpg", url_min="https://upload.wikimedia.org/wikipedia/commons/3/38/JPEG_example_JPG_RIP_010.jpg", alt="The gravestone of J.P.G.", no_hover=true) }}
<figcaption>Изображение со сжатой версией, альт-текстом и без масштабирования при наведении</figcaption>
В качестве альтернативы вы можете добавить следующие url- якоря. В некоторых случаях это может быть удобнее, например, такие изображения будут нормально отображаться в любом редакторе Markdown, в отличие от шорткодов Zola.
- `#full`: Заставляет изображение/видео быть во всю ширину.
- `#pixels`: Использует алгоритм nearest neighbor для масштабирования, полезно для сохранения четкости пиксель-арта.
- `#transparent`: Удаляет закругленные углы и тень, полезно для прозрачных изображений.
- `#no-hover`: Убирает масштабирование при наведении.
![Toolbx header image](https://containertoolbx.org/assets/toolbx.gif#full#pixels#transparent#no-hover)
<figcaption>Изображение во всю ширину с alt-текстом, пиксель-арт рендеринг, без тени и закругленных углов, а также без масштабирования при наведении</figcaption>
#### Видео
То же самое, что и с изображениями, но с некоторыми отличиями: `no_hover` и `url_min` недоступны.
```jinja2
{{/* video(url="video.webm", alt="This is a video") */}}
```
{{ video(url="https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.webm", alt="Red flower wakes up") }}
<figcaption>WebM видео пример взятый с MDN</figcaption>
#### ЭЛТ
Ладно, этот не упрощает ничего, он просто добавляет эффект, напоминающий ЭЛТ, вокруг блоков кода Markdown.
```jinja2
{%/* crt() */%}
-> Markdown code block <-
{%/* end */%}
```
{% crt() %}
```
_____________________________________________
|.'', Public_Library_Halls ,''.|
|.'.'', ,''.'.|
|.'.'.'', ,''.'.'.|
|.'.'.'.'', ,''.'.'.'.|
|.'.'.'.'.| |.'.'.'.'.|
|.'.'.'.'.|===; ;===|.'.'.'.'.|
|.'.'.'.'.|:::|', ,'|:::|.'.'.'.'.|
|.'.'.'.'.|---|'.|, _______ ,|.'|---|.'.'.'.'.|
|.'.'.'.'.|:::|'.|'|???????|'|.'|:::|.'.'.'.'.|
|,',',',',|---|',|'|???????|'|,'|---|,',',',',|
|.'.'.'.'.|:::|'.|'|???????|'|.'|:::|.'.'.'.'.|
|.'.'.'.'.|---|',' /%%%\ ','|---|.'.'.'.'.|
|.'.'.'.'.|===:' /%%%%%\ ':===|.'.'.'.'.|
|.'.'.'.'.|%%%%%%%%%%%%%%%%%%%%%%%%%|.'.'.'.'.|
|.'.'.'.',' /%%%%%%%%%\ ','.'.'.'.|
|.'.'.',' /%%%%%%%%%%%\ ','.'.'.|
|.'.',' /%%%%%%%%%%%%%\ ','.'.|
|.',' /%%%%%%%%%%%%%%%\ ','.|
|;____________/%%%%%Spicer%%%%%%\____________;|
```
{% end %}
## Подписи
Медиа может иметь дополнительное текстовое описание с помощью HTML-тега `<figcaption>` непосредственно под ним.
```markdown
![The Office](https://i.ibb.co/MPDJRsT/ImMAXM3.png)
<figcaption>Подпись к изображению</figcaption>
```
![The Office](https://i.ibb.co/MPDJRsT/ImMAXM3.png)
<figcaption>Офис, в котором работает Стэнли, с желтым полом и бежевыми стенами</figcaption>
## Аккордеон
<details>
<summary>Я могу быть спойлером, я могу быть длинным текстом, я могу быть чем угодно.</summary>
_Кря-кря!_
![Cute duck](https://i.ibb.co/x5Wd5dm/EEVSKgV.jpg)
</details>
## Маленький
<small>Маленький, симпатичный текст, который не привлекает внимания.</small>
## Аббревиатура
Искусство <abbr title="American Standard Code for Information Interchange">ASCII</abbr> - великолепно!
## В стороне
<aside>
Перо и пергамент
<img class="transparent no-hover" style="margin-bottom: 0; border-radius: 0;" alt="Перо и пергамент" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/%D7%A7%D7%9C%D7%A3%2C_%D7%A0%D7%95%D7%A6%D7%94_%D7%95%D7%93%D7%99%D7%95.jpg/326px-%D7%A7%D7%9C%D7%A3%2C_%D7%A0%D7%95%D7%A6%D7%94_%D7%95%D7%93%D7%99%D7%95.jpg" />
</aside>
Перо - это инструмент для письма, изготовленный из линяющего летного пера (предпочтительно первичного крыла) крупной птицы. Перья использовались для письма чернилами до изобретения чернильного пера, пера с металлическим наконечником, перьевой ручки и, в конце концов, шариковой ручки.
Как и у более раннего тростникового (и более позднего чернильного) пера, у пера нет внутреннего резервуара для чернил, поэтому во время письма его необходимо периодически окунать в чернильницу. Вырезанное вручную гусиное перо теперь редко используется в качестве инструмента для каллиграфии, поскольку многие виды бумаги теперь производятся из древесной массы и быстро изнашивают перо. Тем не менее оно по-прежнему остается любимым инструментом некоторых писцов, которые отмечают, что перья обеспечивают непревзойденную четкость штриха, а также большую гибкость, чем стальное перо.
## Комбинации клавиш
```html
<kbd>⌘ Super</kbd> + <kbd>Space</kbd>
```
Для переключения раскладки клавиатуры, нажмите <kbd>⌘ Super</kbd> + <kbd>Space</kbd>.
## Выделенный
Знаете что? Я собираюсь сказать кое-что <mark>очень важное</mark>, настолько <mark>важное</mark>, что даже **жирного** недостаточно.
## Внешняя ссылка
```html
<a class="external" href="https://example.org">Ссылка на сайт</a>
```
<a class="external" href="https://example.org">Ссылка на сайт</a>
## Кнопки
```html.j2
<div class="dialog-buttons">
<a class="inline-button" href="#top">Go to top</a>
<a href="{{site.issuesurl}}">File an issue</a>
</div>
```
> Посмотрите в конец этой страницы xD

10
content/demo/page.ru.md Normal file
View File

@ -0,0 +1,10 @@
+++
+++
# Добро пожаловать на тортовую вечеринку
<img class="transparent no-hover" style="width:50%" src="https://i1.theportalwiki.net/img/0/0a/Portal_Cake.png"/>
К сожалению, торт это ожь_
<a class="inline-button" href="../">Плакать</a>

View File

@ -11,7 +11,7 @@
</time>
{%- if page.authors %}
<span></span>
<span>Author: {{ page.authors[0] }}</span>
<span>{{ trans(key="author", default="Author", lang=lang) }}: {{ page.authors[0] }}</span>
{%- endif %}
{%- if page.taxonomies %}
{%- for name, taxon in page.taxonomies %}
@ -19,7 +19,7 @@
<ul class="tags">
{%-for item in taxon %}
<li>
<a class="tag" href="{{ get_taxonomy_url(kind=name, name=item) }}">{{ item }}</a>
<a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a>
</li>
{%- endfor %}
</ul>
@ -32,7 +32,7 @@
<div class="statement-container archive">
<strong class="big">
<i class="icon"></i>
Archived
{{ trans(key="archived", default="Archived", lang=lang) }}
</strong>
{{ page.extra.archive | markdown | safe }}
</div>
@ -42,7 +42,7 @@
<div class="statement-container trigger">
<strong class="big">
<i class="icon"></i>
Trigger Warning
{{ trans(key="trigger_warning", default="Trigger Warning", lang=lang) }}
</strong>
{{ page.extra.trigger | markdown | safe }}
</div>
@ -52,14 +52,14 @@
<div class="statement-container disclaimer">
<strong class="big">
<i class="icon"></i>
Disclaimer
{{ trans(key="disclaimer", default="Disclaimer", lang=lang) }}
</strong>
{{ page.extra.disclaimer | markdown | safe }}
</div>
{% endif %}
{% if page.extra.toc %}
<h2>Table of Contents</h2>
<h2>{{ trans(key="table_of_contents", default="Table of Contents", lang=lang) }}</h2>
<ul>
{% for h1 in page.toc %}
<li>
@ -82,7 +82,7 @@
</article>
{% if page.extra.comments.id %}
{% include "partials/comments.html" %}
{% include "partials/comments.html" ignore missing %}
{% endif %}
{% if page.lower or page.higher %}
@ -90,13 +90,13 @@
<nav id="post-nav">
{% if page.higher %}
<a class="post-nav-item post-nav-prev" href="{{ page.higher.permalink }}">
<div class="nav-arrow">Previous</div>
<div class="nav-arrow">{{ trans(key="page_previous", default="Previous", lang=lang) }}</div>
<span class="post-title">{{ page.higher.title }}</span>
</a>
{% endif %}
{% if page.lower %}
<a class="post-nav-item post-nav-next" href="{{ page.lower.permalink }}">
<div class="nav-arrow">Next</div>
<div class="nav-arrow">{{ trans(key="page_next", default="Next", lang=lang) }}</div>
<span class="post-title">{{ page.lower.title }}</span>
</a>
{% endif %}
@ -104,9 +104,9 @@
{% endif %}
<div class="dialog-buttons">
<a class="inline-button" href="#top">Go to Top</a>
<a class="inline-button" href="#top">{{ trans(key="go_to_top", default="Go to Top", lang=lang) }}</a>
{% if config.extra.issues_url %}
<a class="inline-button colored" href="{{ config.extra.issues_url }}">File an Issue</a>
<a class="inline-button colored" href="{{ config.extra.issues_url }}">{{ trans(key="file_an_issue", default="File an Issue", lang=lang) }}</a>
{% endif %}
</div>
{% endblock content %}

View File

@ -6,9 +6,9 @@
{{ section.description | markdown | safe }}
<small>
<a class="link-page" href="{{ get_url(path='tags') }}">Filter by tag</a>
<a class="link-page" href="{{ get_url(path='tags', lang=lang) }}">{{ trans(key="filter_by_tag", default="Filter by tag", lang=lang) }}</a>
<br />
From newest to oldest ↓
{{ trans(key="newest_to_oldest", default="From newest to oldest", lang=lang) }}
</small>
<div id="article-list">
@ -18,13 +18,13 @@
{%- if page.draft %}
<span class="draft-badge">
<i class="icon"></i>
Drafted
{{ trans(key="drafted", default="Drafted", lang=lang) }}
</span>
{%- endif %}
{%- if page.extra.archive %}
<span class="archive-badge">
<i class="icon"></i>
Archived
{{ trans(key="archived", default="Archived", lang=lang) }}
</span>
{%- endif %}
{%- if page.description %}
@ -35,14 +35,14 @@
<time datetime="{{ page.date | date(format='%+') }}" pubdate>{{- page.date | date(format=config.extra.date_format) -}}</time>
{%- if page.authors %}
<span></span>
<span>Author: {{ page.authors[0] }}</span>
<span>{{ trans(key="author", default="Author", lang=lang) }}: {{ page.authors[0] }}</span>
{%- endif %}
{%- if page.taxonomies %}
{%- for name, taxon in page.taxonomies %}
<span></span>
<ul class="tags">
{%-for item in taxon %}
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item) }}">{{ item }}</a></li>
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
{%- endfor %}
</ul>
{%- endfor %}

View File

@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="en">
{% include "partials/head.html" -%}
{% include "partials/head.html" ignore missing %}
<body>
{% include "partials/nav.html" -%}
{% include "partials/nav.html" ignore missing %}
<div id="main" class="container">
{% block custom %}{%- endblock -%}
{% block content %}{%- endblock -%}
</div>
{% include "partials/footer.html" -%}
{% include "partials/footer.html" ignore missing %}
</body>
</html>

View File

@ -5,7 +5,7 @@
<div class="statement-container archive">
<strong class="big">
<i class="icon"></i>
Archived
{{ trans(key="archived", default="Archived", lang=lang) }}
</strong>
{{ page.extra.archive | markdown | safe }}
</div>

View File

@ -13,31 +13,23 @@
{% endif %}
{% set id = page.extra.comments.id %}
{% set post_url = "https://{{ host }}/@{{ username }}/{{ id }}" %}
<section id="comments">
{% if config.extra.comments.show_qr %}
<img id="qrcode" class="no-hover pixels" alt="QR code to a Mastodon post" src="https://api.qrserver.com/v1/create-qr-code/?data=https://{{ host }}/@{{ username }}/{{ id }}&format=gif" />
<img id="qrcode" class="no-hover pixels" alt="QR code to a Mastodon post" src="https://api.qrserver.com/v1/create-qr-code/?data={{ post_url }}&format=gif" />
{% endif %}
<h2>Comments</h2>
<p>
You can comment on this blog post by publicly replying to this <a href="https://{{ host }}/@{{ username }}/{{ id }}">post</a> using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.
</p>
<h2>{{ trans(key="comments", default="Comments", lang=lang) }}</h2>
<p>{{ trans(key="comments_description", default="You can comment on this blog post by publicly replying to this post using a Mastodon or other ActivityPub/Fediverse account. Known non-private replies are displayed below.", lang=lang) }}</p>
<p>
<a id="load-comments" class="inline-button" onclick="loadComments()" onkeypress="loadComments()" tabindex="0">Load Comments</a>
<a id="load-comments" class="inline-button" onclick="loadComments()" onkeypress="loadComments()" tabindex="0">{{ trans(key="load_comments", default="Load Comments", lang=lang) }}</a>
</p>
<div id="comments-wrapper">
<noscript>
<p>
Loading comments relies on JavaScript. Try enabling JavaScript and
reloading, or visit
<a href="https://{{ host }}/@{{ username }}/{{ id }}">
the original post
</a>
on Mastodon.
</p>
<p>{{ trans(key="comments_noscript", default="Loading comments relies on JavaScript. Try enabling JavaScript and reloading, or visit the original post on Mastodon.", lang=lang) }}</p>
</noscript>
</div>
<script type="text/javascript">
@ -76,7 +68,7 @@
function loadComments() {
let commentsWrapper = document.getElementById("comments-wrapper");
document.getElementById("load-comments").innerHTML = "Loading…";
document.getElementById("load-comments").innerHTML = "{{ trans(key='comments_loading', default='Loading…', lang=lang) }}";
fetch("https://{{ host }}/api/v1/statuses/{{ id }}/context")
.then(function (response) {
return response.json();

View File

@ -1,36 +1,18 @@
<footer id="site-footer">
{% if config.extra.footer.links %}
<nav>
<ul id="links">
{% for link in config.extra.footer.links %}
{%- if link.url is matching('https?://') %}
<li>
<a href="{{ link.url | safe }}">{{ link.name }}</a>
</li>
{%- else %}
<li>
<a href="{{ get_url(path=link.url | safe )}}">{{ link.name }}</a>
</li>
{%- endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% if config.extra.footer.show_copyright %}
<p title="Last built at {{ now() | date(format='%F %a %R') }}">&copy; {{ config.title }}, {{ now() | date(format="%Y") }}</p>
{% endif %}
{% if config.extra.source_url and config.extra.footer.show_source %}
<p>
<a href="{{ config.extra.source_url | safe }}">Website source</a>
<a href="{{ config.extra.source_url }}">{{ trans(key='footer_source', default="Website source", lang=lang) }}</a>
</p>
{% endif %}
{% if config.extra.footer.show_powered_by %}
<p>
<small>
Powered by <a href="https://www.getzola.org">Zola</a> and <a href="https://daudix.codeberg.page/duckquill">Duckquill</a>
{{ trans(key="footer_powered_by", default="Powered by", lang=lang) }} <a href="https://www.getzola.org">Zola</a> {{ trans(key="footer_powered_by_and", default="and", lang=lang) }} <a href="https://daudix.codeberg.page/duckquill">Duckquill</a>
</small>
</p>
{% endif %}

View File

@ -6,20 +6,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="{{ config.extra.primary_color }}" />
<link rel="canonical" href="{{ current_url | default(value='/') | safe }}" />
<title>
{%- if page.title -%}
{{- page.title }} - {{ config.title -}}
{%- elif section.title -%}
{{- section.title }} - {{ config.title -}}
{%- else -%}
{{- config.title -}}
{%- endif -%}
</title>
<title>{% block title %}{% include "partials/title.html" ignore missing %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{{ get_url(path='style.css') }}" />
<link rel="stylesheet" type="text/css" href="{{ get_url(path='syntax-theme-dark.css') }}" media="(prefers-color-scheme: dark)" />
<link rel="stylesheet" type="text/css" href="{{ get_url(path='syntax-theme-light.css') }}" media="(prefers-color-scheme: light)" />
{% if config.extra.stylesheets %}
{% for stylesheet in config.extra.stylesheets %}
<link rel="stylesheet" type="text/css" href="{{ get_url(path=stylesheet) }}" />
@ -51,6 +42,7 @@
{% if config.extra.comments %}
<link rel="me" href="https://{{ config.extra.comments.host }}/@{{ config.extra.comments.user }}" />
{% endif %}
{% if config.extra.emoji_favicon %}
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext x='-.07em' y='.89em' font-size='90'%3E{{ config.extra.emoji_favicon }}%3C/text%3E%3C/svg%3E">
{% elif config.extra.animated_favicon %}
@ -58,10 +50,18 @@
{% else %}
<link rel="icon" type="image/png" href="{{ get_url(path='favicon.png') }}" />
{% endif %}
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="{{ get_url(path='apple-touch-icon.png') }}" />
{% if config.generate_feed %}
{% block feed -%}
<link rel="alternate" type={% if config.feed_filename == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filename) | safe }}">
{% endblock -%}
{% endif %}
<!-- Open Graph -->
<meta property="og:site_name" content="{{ config.title }}" />
<meta property="og:title" content="{%- if page.title -%}{{- page.title }} - {{ config.title -}}{%- elif section.title -%}{{- section.title }} - {{ config.title -}}{%- else -%}{{- config.title -}}{%- endif -%}" />
<meta property="og:title" content="{% include 'partials/title.html' ignore missing %}" />
<meta property="og:url" content="{{ current_url | default(value='/') | safe }}" />
<meta property="og:description" content="{{ page.description | default(value=config.description) }}" />
<meta property="og:image" content="{{ get_url(path='card.png') }}" />

View File

@ -0,0 +1,12 @@
{% if config.extra.language_switcher %}
<div class="lang" aria-label="{{ trans(key="language", lang=lang) }}">
{% set language_agnostic_path = current_path | default(value="/") | replace(from='/' ~ lang ~ '/', to = '/') | trim_start_matches(pat = '/') %}
{% for tr in config.extra.translations %}
{% if tr.code == lang %}
<span class="active">{{ tr.name }}</span>
{% else %}
<a href="{{ get_url(path=language_agnostic_path, lang=tr.code) ~ "/" }}" hreflang="{{ tr.code }}" lang="{{ tr.code }}">{{ tr.name }}</a>
{% endif %}
{% endfor %}
</div>
{% endif %}

View File

@ -1,42 +1,54 @@
{% set current_lang = config.default_language %}
{% if page %}
{% set current_lang = page.lang %}
{% elif section %}
{%- set current_lang = section.lang %}
{% endif %}
{% if config.extra.nav.links %}
<header id="site-nav">
<nav>
<a href="#main" id="main-content" tabindex="0">Skip to main content</a>
<a href="#main" id="main-content" tabindex="0">{{ trans(key="skip_to_content", default="Skip to main content", lang=lang) }}</a>
<ul>
<li id="home">
<a href="{{ get_url(path='/') | safe }}"
{% if current_url | default(value='/') | trim_end_matches(pat='/') | safe == get_url(path='/') | safe %}
<a href="{{ get_url(path='/', lang=lang) }}"
{% if current_url | default(value='/') | trim_end_matches(pat='/') == get_url(path='/') %}
class="active"
{% endif %}>
{{ config.title }}
</a>
</li>
{% for link in config.extra.nav.links %}
{% if current_lang == config.default_language %}
{% set title = link.name %}
{% else %}
{% set language_key = 'name_' ~ current_lang %}
{% set title = link[language_key] %}
{% endif %}
{%- if link.url is matching('https?://') %}
<li class="link">
<a href="{{ link.url | safe }}"
{% if current_url | default(value='/') | safe == link.url | safe %}
<a href="{{ link.url }}"
{% if current_url | default(value='/') == link.url %}
class="active"
{% endif %}>
{{ link.name }}
{{ title }}
</a>
</li>
{%- else %}
<li class="link">
<a href="{{ get_url(path=link.url | safe )}}"
{% if current_url | default(value='/') | safe == get_url(path=link.url) | safe %}
<a href="{{ get_url(path=link.url, lang=lang)}}"
{% if current_url | default(value='/') == get_url(path=link.url, lang=lang) %}
class="active"
{% endif %}>
{{ link.name }}
{{ title }}
</a>
</li>
{%- endif %}
{% endfor %}
{% if config.extra.nav.show_feed %}
{% if config.generate_feed and config.extra.nav.show_feed %}
<li id="feed">
<a href="{{ get_url(path=config.feed_filename) | safe }}">
<a href="{{ get_url(path=config.feed_filename) }}">
<i class="icon"></i>
<span>Feed</span>
<span>{{ trans(key="feed", default="Feed", lang=lang) }}</span>
</a>
</li>
{% endif %}

View File

@ -0,0 +1,7 @@
{%- if page.title -%}
{{- page.title }} - {{ config.title -}}
{%- elif section.title -%}
{{- section.title }} - {{ config.title -}}
{%- else -%}
{{- config.title -}}
{%- endif -%}

View File

@ -1,13 +1,13 @@
{% extends "base.html" %}
{% block content %}
<h1>Tags</h1>
<small> {{ terms | length }} tags in total </small>
<h1>{{ trans(key="tags", default="Tags", lang=lang) }}</h1>
<small>{{ terms | length }} {{ trans(key="tags_in_total", default="tags in total", lang=lang) }}</small>
<br />
<small>
<ul class="tags">
{% for tag in terms %}
<li><a class="tag" href="{{ get_taxonomy_url(kind='tags', name=tag.name) }}">{{ tag.name }}</a></li>
<li><a class="tag" href="{{ get_taxonomy_url(kind='tags', name=tag.name, lang=lang) }}">{{ tag.name }}</a></li>
{% endfor %}
</ul>
</small>

View File

@ -1,11 +1,11 @@
{% extends "base.html" %}
{% block content %}
<h1>Posts with tag “{{ term.name }}”</h1>
<h1>{{ trans(key="posts_with_tag", default="Posts with tag", lang=lang) }} “{{ term.name }}”</h1>
<small>
<a class="link-page" href="{{ get_url(path='tags') }}">See all tags</a>
<a class="link-page" href="{{ get_url(path='tags', lang=lang) }}">{{ trans(key="see_all_tags", default="See all tags", lang=lang) }}</a>
<br />
{{ term.pages | length }} posts in total
{{ term.pages | length }} {{ trans(key="posts_in_total", default="posts in total", lang=lang) }}
</small>
<article>
{% for page in term.pages %}
@ -20,7 +20,7 @@
<span></span>
<ul class="tags">
{%-for item in taxon %}
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item) }}">{{ item }}</a></li>
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
{%- endfor %}
</ul>
{%- endfor %}