docs/src/config/pages.md
57 lines · 1811 bytes
1# Layout config
2
3The layout config determins the position of where each item is placed, mainly their order. The config file can be found in `~/.config/youtube-tui/pages.yml`.
4
5## Example layout config
6
7```yaml
8main_menu:
9 layout:
10 - !NonCenteredRow
11 - SearchBar
12 - SearchFilters
13 - !CenteredRow
14 - Popular
15 - Trending
16 - History
17 - !NonCenteredRow
18 - ItemList
19 - !NonCenteredRow
20 - MessageBar
21 message: Loading main menu...
22
23# and much more ...
24```
25
26## Items
27
28Each item is an individual "thing", these things can be optionally selectable, or hoverable by the cursor.
29
30## Rows
31
32A row is a horizontal row of items, it can be either centered (like the buttons) or non centered (which will align to the left).
33
34> Non centered rows are faster and less crash prone compared to centered rows.
35
36Each item are ordered from left to right.
37
38## Message
39
40The message to display when loading the page.
41
42### Items reference
43
44|Item|Can be used in page|Description|
45|---|---|---|
46|MessageBar|Any|The panel (default in the bottom of every page) that displays message and error messages|
47|SearchBar|Any|A text field that searches that entered query|
48|SearchFilters|Any|A button that brings up a popup for modifying search filters|
49|Trending|Any|Loads the trending page|
50|Popular|Any|Loads the popular page|
51|History|Any|Loads the watch history page|
52|ItemList|Main menu/search|Display multiple videos, channels, or playlists in a list|
53|SingleItemInfo|Single item|Display info of one single item (a single video or playlist)|
54|ChannelDisplay|Channel display|Display information of a channel, depending on the page|
55|ChannelMain|Channel display|Loads the main channel page|
56|ChannelVideos|Channel display|Loads the channel videos page|
57|ChannelPlaylists|Channel display|Loads the channel playlists page|