From 683589e1f84c315f9ec88adf68bf2fc79654fd24 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Mon, 16 Dec 2024 10:28:53 +0300 Subject: [PATCH] Add custom styles for book --- docs/book.css | 110 +++++++++++++++++++++++++++++++++++++++++++++++++ docs/book.toml | 1 + 2 files changed, 111 insertions(+) create mode 100644 docs/book.css diff --git a/docs/book.css b/docs/book.css new file mode 100644 index 0000000..7612e77 --- /dev/null +++ b/docs/book.css @@ -0,0 +1,110 @@ +.sidebar-resize-handle { display: none !important; } + +footer { + contain: content; + border-top: 3px solid #f4f4f4; +} + +footer a.telegram, footer a.github { + display: block; + margin-bottom: 10px; + margin-top: 10px; + display: flex; + align-items: center; + text-decoration: none; +} + +.content .github, .content .telegram { + display: flex; + align-items: center; + text-align: center; + justify-content: center; +} + +.telegram::before, .github::before { + font-family: FontAwesome; + margin-right: 0.3em; + font-size: 1.6em; + color: black; +} + +.github::before { + content: "\f09b"; +} + +.telegram::before { + font-size: 1.4em; + color: #0084c5; + content: "\f2c6"; +} + +.content hr { + border: none; + border-top: 2px solid #c9c9c9; + margin: 2em 0; +} + +.content img { + display: block; + margin: 0 auto; +} + +.content img.border { + border: 1px solid #c9c9c9; +} + +.firmware { + position: relative; + margin: 20px 0; + padding: 20px 20px; + padding-left: 60px; + color: var(--fg); + background-color: var(--quote-bg); + border-block-start: .1em solid var(--quote-border); + border-block-end: .1em solid var(--quote-border); +} + +.firmware::before { + font-family: FontAwesome; + font-size: 1.5em; + content: "\f15b"; + position: absolute; + width: 20px; + text-align: center; + left: 20px; +} + +.alert { + margin-top: 20px; + margin-bottom: 20px; + position: relative; + border-left: 2px solid #0a69da; + padding: 20px; + padding-left: 60px; +} + +.alert::before { + font-family: FontAwesome; + font-size: 1.5em; + color: #0a69da; + content: "\f05a"; + position: absolute; + width: 20px; + text-align: center; + left: 20px; +} + +.alert-tip { border-left-color: #1b7f37; } +.alert-tip::before { color: #1b7f37; content: '\f0eb'; } + +.alert-caution { border-left-color: #cf212e; } +.alert-caution::before { color: #cf212e; content: '\f071'; } + +.alert-important { border-left-color: #8250df; } +.alert-important::before { color: #8250df; content: '\f06a'; } + +.alert-warning { border-left-color: #f0ad4e; } +.alert-warning::before { color: #f0ad4e; content: '\f071'; } + +.alert-code { border-left-color: #333; } +.alert-code::before { color: #333; content: '\f121'; } diff --git a/docs/book.toml b/docs/book.toml index a75ce6c..4d381a8 100644 --- a/docs/book.toml +++ b/docs/book.toml @@ -10,6 +10,7 @@ description = "Учебник по разработке полетного ко build-dir = "build" [output.html] +additional-css = ["book.css"] edit-url-template = "https://github.com/okalachev/flix/blob/master/docs/{path}?plain=1" mathjax-support = true