From 007bc10c07d6a6b7cb6c03a138cc90f6f74a3058 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 8 Oct 2019 17:03:40 +0200 Subject: Introduce SCSS plugins: dark mode and numbered headings --- assets/plugins/_dark.scss | 9 +++++++++ assets/plugins/_numbered.scss | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 assets/plugins/_dark.scss create mode 100644 assets/plugins/_numbered.scss (limited to 'assets/plugins') diff --git a/assets/plugins/_dark.scss b/assets/plugins/_dark.scss new file mode 100644 index 0000000..c4df68b --- /dev/null +++ b/assets/plugins/_dark.scss @@ -0,0 +1,9 @@ +$gray-100: rgba(255, 255, 255, 0.1); +$gray-200: rgba(255, 255, 255, 0.2); + +$body-background: #343a40; +$body-font-color: #e9ecef; + +$color-link: #84b2ff; +$color-visited-link: #b88dff; +$color-dark-link: $body-font-color; diff --git a/assets/plugins/_numbered.scss b/assets/plugins/_numbered.scss new file mode 100644 index 0000000..a1e89d8 --- /dev/null +++ b/assets/plugins/_numbered.scss @@ -0,0 +1,23 @@ +.book-page { + .markdown { + @for $h from 1 through 6 { + > h#{$h} { + counter-increment: h#{$h}; + counter-reset: h#{$h + 1}; + + $content: ""; + @for $n from 1 through $h { + $content: $content + 'counter(h#{$n})"."'; + } + + &::before { + content: unquote($content) " "; + } + } + } + } + + + .book-toc nav ul { + list-style: decimal; + } +} -- cgit v1.2.3