start adding of navigation docs

This commit is contained in:
InsanusMokrassar 2023-07-12 18:09:17 +06:00
parent c924bef2d9
commit a5639769e2
3 changed files with 53 additions and 0 deletions

35
docs/navigation/index.md Normal file
View File

@ -0,0 +1,35 @@
# Navigation
Navigation is a library for simple management for your app views (or some other logics). In this library there are several
important terms:
* `Node` - is a core thing. Node itself contains current config and its state
* `Chain` - some sequence of nodes. In one chain **only the last one** node can be active
## Nodes tree
Let's see the next sample:
```mermaid
flowchart BT
NodeN1(N1)
NodeN2(N2)
NodeN3(N3)
class NodeN1 navigation-paused;
class NodeN1 navigation-part;
class NodeN2 navigation-paused;
class NodeN2 navigation-part;
class NodeN3 navigation-resumed;
class NodeN3 navigation-part;
subgraph RootChain
NodeN1 --> NodeN2
NodeN2 --> NodeN3
end
class RootChain navigation-resumed;
class RootChain navigation-part;
```
Any hierarchy starts with some root chain.

View File

@ -0,0 +1,13 @@
.navigation-part > rect {
stroke: black !important;
}
.navigation-paused > rect {
fill: #FFFF00AA !important;
color: black !important;
}
.navigation-resumed > rect {
fill: #00FF0022 !important;
color: white !important;
}

View File

@ -43,6 +43,8 @@ nav:
- KDocs: 'https://kslog.inmo.dev/'
- 'kslog/setup.md'
- 'kslog/logging.md'
- 'Navigation':
- 'navigation/index.md'
use_directory_urls: false
@ -135,3 +137,6 @@ extra:
link: https://twitter.com/InsanusMokrassa
# annotate:
# json: [.s2]
extra_css:
- resources/stylesheets/navigation.css