Skip to content

Commit

Permalink
Add custom styles for book
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed Dec 16, 2024
1 parent cabd88c commit 683589e
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
110 changes: 110 additions & 0 deletions docs/book.css
Original file line number Diff line number Diff line change
@@ -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'; }
1 change: 1 addition & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 683589e

Please sign in to comment.