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