Skip to content

Commit a11a06e

Browse files
committed
docs: add readme to frontend, documenting some of the structure
1 parent 158440e commit a11a06e

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ docker run -it --init \
5353
### Docker compose
5454

5555
```yaml
56-
version: '3.8'
57-
5856
name: reiverr
5957

6058
services:
@@ -172,3 +170,13 @@ If you'd like to develop your own plugin, easiest way to get started is by getti
172170
![Series Page](images/screenshot-2.png)
173171

174172
![Library Page](images/screenshot-3.png)
173+
174+
# Star History
175+
176+
<a href="https://www.star-history.com/#aleksilassila/reiverr&type=date&legend=top-left">
177+
<picture>
178+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=aleksilassila/reiverr&type=date&theme=dark&legend=top-left" />
179+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=aleksilassila/reiverr&type=date&legend=top-left" />
180+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=aleksilassila/reiverr&type=date&legend=top-left" />
181+
</picture>
182+
</a>

frontend/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Frontend
2+
3+
Here you can find an overview of the most important internal components and practices that are used in the frontend.
4+
5+
## Important Components
6+
7+
<!-- src/**App.svelte**
8+
9+
--- -->
10+
11+
[src/lib/components/**Container.svelte**](src/lib/components/Container.svelte)
12+
13+
A component that can be navigated to with dpad/keyboard, backbone of the dpad navigation system.
14+
15+
## Important Contexts and Stores
16+
17+
[src/lib/components/StackRouter/**stack-router.store.ts**](src/lib/components/StackRouter/stack-router.store.ts)
18+
19+
Provides access to the stack router, which is used for client side navigation and routing, as well as passing context between stack pages. Important functions:
20+
21+
- useComponentStack: provides access to the stack router component stack
22+
- navigate: navigate to a url
23+
- getContext, setContext, hasContext: custom context implementation, is used the same as svelte's context
24+
25+
---
26+
27+
[src/lib/stores/**data**/](src/lib/stores/data/)
28+
29+
Data fetching stores and utilities.
30+
31+
---
32+
33+
[src/lib/components/GlobalBackground/**background-stack.store.ts**](src/lib/components/GlobalBackground/background-stack.store.ts)
34+
35+
Provides access to the global background stack, which allows reusing backgrounds between pages.
36+
37+
<!-- ---
38+
39+
- breadcrumbsContext -->
40+
41+
## Notes & Tips
42+
43+
**backface-visibility: hidden**: Add to scroll containers to fix repaint issues on old browsers.
44+
45+
<!-- TODO: verify
46+
**Prefer padding over margin**: Spacing should be done by parents. -->

frontend/src/lib/components/StackRouter/stack-router.store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ type HistoryState = {
198198

199199
export type StackRouterStore = ReturnType<typeof useStackRouter>;
200200

201-
export function useStackRouter({
201+
function useStackRouter({
202202
routes,
203203
notFound,
204204
maxDepth

0 commit comments

Comments
 (0)