From 830fa91359cea05f2a3c1654bedce6b575401ad4 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Sun, 30 Sep 2018 01:04:22 +0200 Subject: Minor fixes --- assets/book.scss | 183 +++++++++++++++++++++++++++++++++++ assets/styles.scss | 183 ----------------------------------- layouts/docs/baseof.html | 4 +- layouts/partials/docs/brand.html | 3 + layouts/partials/docs/html-head.html | 2 +- 5 files changed, 188 insertions(+), 187 deletions(-) create mode 100644 assets/book.scss delete mode 100644 assets/styles.scss create mode 100644 layouts/partials/docs/brand.html diff --git a/assets/book.scss b/assets/book.scss new file mode 100644 index 0000000..06961bb --- /dev/null +++ b/assets/book.scss @@ -0,0 +1,183 @@ +@import 'variables'; +@import 'markdown'; + + +html { + font-size: $font-size-base; +} + +html, body { + min-width: $body-min-width; + overflow: hidden auto; +} + +body { + color: $body-font-color; + background: $body-background; + font-family: 'Roboto', sans-serif; + font-weight: $body-font-weight; + + box-sizing: border-box; + * { + box-sizing: inherit; + } +} + +h1, h2, h3, h4, h5 { + font-weight: 400; +} + +a { + text-decoration: none; + color: $color-link; + + &:visited { + color: $color-visited-link; + } +} + +aside { + ul { + margin: 0; + padding-left: $padding-16; + list-style: none; + line-height: 2em; + + li { + a { + display: block; + } + + a:hover { + opacity: .5; + } + + img { + height: $padding-16; + } + } + } + + // start padding on second level + nav > ul { + padding-left: 0; + } +} + +aside.fixed nav { + position: fixed; + top: 0; + bottom: 0; + overflow: hidden auto; +} + +.container { + max-width: $content-max-width; + margin: 0 auto; + + display: flex; + flex-flow: row; + + .menu nav, .page, .markdown { + transition: .2s ease-in-out; + transition-property: transform, margin-left, opacity; + will-change: transform, margin-left; + } + + .menu { + flex: 0 0 $nav-menu-width; + + nav { + width: $nav-menu-width; + padding: $padding-16; + font-size: $font-size-14; + } + + a { + color: $nav-link-color; + } + + a.active { + color: $color-link; + } + + .brand { + margin-top: 0; + margin-bottom: $padding-16; + } + + .flat { + margin-bottom: $padding-16; + > a { font-weight: 700; } + > ul { padding-left: 0; } + } + } + + .header { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: $padding-16; + + display: none; + } + + .page { + flex: 1 0; + width: 0; + min-width: $body-min-width; + padding: $padding-16; + } + + .toc { + flex: 0 0 $toc-menu-width; + + nav { + width: $toc-menu-width; + padding: $padding-16; + font-size: $font-size-12; + + ul ul { + padding-left: $padding-8; + } + } + } +} + +// Responsive styles +$menu-hide-point: $nav-menu-width + $body-min-width; +$toc-hide-point: $menu-hide-point + $nav-menu-width; + +@media screen and (max-width: $toc-hide-point) { + .toc { + display: none; + } +} + +@media screen and (max-width: $menu-hide-point) { + .menu { + margin-left: -$nav-menu-width; + } + + .container .header { + display: flex; + } + + #menu-control:checked + .container { + .menu nav, .page { + transform: translateX($nav-menu-width); + } + + .header label img { + transform: rotate(90deg); + } + + .markdown { + opacity: .25; + } + } +} + +.muted { + opacity: .75; +} \ No newline at end of file diff --git a/assets/styles.scss b/assets/styles.scss deleted file mode 100644 index 06961bb..0000000 --- a/assets/styles.scss +++ /dev/null @@ -1,183 +0,0 @@ -@import 'variables'; -@import 'markdown'; - - -html { - font-size: $font-size-base; -} - -html, body { - min-width: $body-min-width; - overflow: hidden auto; -} - -body { - color: $body-font-color; - background: $body-background; - font-family: 'Roboto', sans-serif; - font-weight: $body-font-weight; - - box-sizing: border-box; - * { - box-sizing: inherit; - } -} - -h1, h2, h3, h4, h5 { - font-weight: 400; -} - -a { - text-decoration: none; - color: $color-link; - - &:visited { - color: $color-visited-link; - } -} - -aside { - ul { - margin: 0; - padding-left: $padding-16; - list-style: none; - line-height: 2em; - - li { - a { - display: block; - } - - a:hover { - opacity: .5; - } - - img { - height: $padding-16; - } - } - } - - // start padding on second level - nav > ul { - padding-left: 0; - } -} - -aside.fixed nav { - position: fixed; - top: 0; - bottom: 0; - overflow: hidden auto; -} - -.container { - max-width: $content-max-width; - margin: 0 auto; - - display: flex; - flex-flow: row; - - .menu nav, .page, .markdown { - transition: .2s ease-in-out; - transition-property: transform, margin-left, opacity; - will-change: transform, margin-left; - } - - .menu { - flex: 0 0 $nav-menu-width; - - nav { - width: $nav-menu-width; - padding: $padding-16; - font-size: $font-size-14; - } - - a { - color: $nav-link-color; - } - - a.active { - color: $color-link; - } - - .brand { - margin-top: 0; - margin-bottom: $padding-16; - } - - .flat { - margin-bottom: $padding-16; - > a { font-weight: 700; } - > ul { padding-left: 0; } - } - } - - .header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: $padding-16; - - display: none; - } - - .page { - flex: 1 0; - width: 0; - min-width: $body-min-width; - padding: $padding-16; - } - - .toc { - flex: 0 0 $toc-menu-width; - - nav { - width: $toc-menu-width; - padding: $padding-16; - font-size: $font-size-12; - - ul ul { - padding-left: $padding-8; - } - } - } -} - -// Responsive styles -$menu-hide-point: $nav-menu-width + $body-min-width; -$toc-hide-point: $menu-hide-point + $nav-menu-width; - -@media screen and (max-width: $toc-hide-point) { - .toc { - display: none; - } -} - -@media screen and (max-width: $menu-hide-point) { - .menu { - margin-left: -$nav-menu-width; - } - - .container .header { - display: flex; - } - - #menu-control:checked + .container { - .menu nav, .page { - transform: translateX($nav-menu-width); - } - - .header label img { - transform: rotate(90deg); - } - - .markdown { - opacity: .25; - } - } -} - -.muted { - opacity: .75; -} \ No newline at end of file diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 9beb261..cff1524 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -12,9 +12,7 @@