Files
dedinit.ru/openspec/specs/series-and-menu/spec.md
T

46 lines
1.8 KiB
Markdown

# series-and-menu Specification
## Purpose
Шапка и контент dedinit.ru: таксономия серий постов (series), переключатель
темы справа у меню, иконки соцсетей в верхнем меню.
## Requirements
### Requirement: Series taxonomy
Таксономия `series` позволяет группировать посты в серии и показывает на
странице поста модуль навигации по серии.
#### Scenario: Taxonomy enabled
- Given hugo.toml has `[taxonomies] series = "series"`
- When site is built
- Then `/series/` term page exists and posts can be marked with `series`
#### Scenario: Series module on a post
- Given a post with `series: ["Test"]` and `series_order: 2` in front-matter
- When that post is rendered
- Then a "Серия" block is visible at the top of the content
- And it shows the series name, position («2 из N»)
- And it links to the previous article (if any) and next article (if any)
### Requirement: Theme toggle on the right
Переключатель темы (солнце/луна) отображается в правой части шапки, сразу
после пунктов меню.
#### Scenario: Toggle next to the menu
- Given the header markup with `.logo-switches` inside `.logo`
- When the page is rendered
- Then the theme toggle button is displayed at the right end of `.nav`,
after `#menu`
### Requirement: Social icons in the header
Иконки соцсетей из `[params.socialIcons]` отображаются в верхнем меню рядом
с переключателем темы.
#### Scenario: Icons rendered from params
- Given `[params.socialIcons]` with github and telegram entries
- When the page is rendered
- Then links with SVG icons appear in the header nav, next to the menu