From a5639769e216c759695c4f6fab4c0f877070497a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 12 Jul 2023 18:09:17 +0600 Subject: [PATCH] start adding of navigation docs --- docs/navigation/index.md | 35 +++++++++++++++++++++++ docs/resources/stylesheets/navigation.css | 13 +++++++++ mkdocs.yml | 5 ++++ 3 files changed, 53 insertions(+) create mode 100644 docs/navigation/index.md create mode 100644 docs/resources/stylesheets/navigation.css diff --git a/docs/navigation/index.md b/docs/navigation/index.md new file mode 100644 index 0000000..96a9b81 --- /dev/null +++ b/docs/navigation/index.md @@ -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. diff --git a/docs/resources/stylesheets/navigation.css b/docs/resources/stylesheets/navigation.css new file mode 100644 index 0000000..7468782 --- /dev/null +++ b/docs/resources/stylesheets/navigation.css @@ -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; +} diff --git a/mkdocs.yml b/mkdocs.yml index 7315cc8..4bb0445 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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 +