diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-07-22 15:04:21 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-07-25 19:50:27 +0300 |
commit | f8b5644df99f356db93099b188f54f85a4ae715a (patch) | |
tree | 8ef66459fc0c31cec969f3ef713eb94a96db1bfd | |
parent | 8747bb9a215ebd51b11426dca1900ef41a1dcc3f (diff) |
Rework the example site variable overrides
-rw-r--r-- | assets/scss/slate/_variables.scss | 19 | ||||
-rw-r--r-- | assets/scss/slate/docuapi_overrides.scss | 4 | ||||
-rw-r--r-- | exampleSite/assets/scss/slate/docuapi_overrides.scss | 13 | ||||
-rw-r--r-- | go.mod | 5 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | postcss.config.js | 16 |
6 files changed, 46 insertions, 13 deletions
diff --git a/assets/scss/slate/_variables.scss b/assets/scss/slate/_variables.scss index d901d4e..ee06b31 100644 --- a/assets/scss/slate/_variables.scss +++ b/assets/scss/slate/_variables.scss @@ -55,14 +55,19 @@ $phone-width: $tablet-width - $nav-width !default; // min width before reverting // FONTS //////////////////// +$font-default-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default; +$font-default-size: 14px !default; +$font-default-weight: 400 !default; -@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&display=swap'); +$font-header-weight: 700 !default; +$font-code-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif !default; +$font-code-size: 12px !default; %default-font { - font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-size: 14px; - font-weight: 400; + font-family: $font-default-family; + font-size: $font-default-size; + font-weight: $font-default-weight; } %header-font { @@ -71,8 +76,8 @@ $phone-width: $tablet-width - $nav-width !default; // min width before reverting } %code-font { - font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif; - font-size: 12px; + font-family: $font-code-family; + font-size: $font-code-size; line-height: 1.5; } @@ -91,4 +96,4 @@ $search-box-border-color: #666 !default; %break-words { word-break: break-all; hyphens: auto; -}
\ No newline at end of file +} diff --git a/assets/scss/slate/docuapi_overrides.scss b/assets/scss/slate/docuapi_overrides.scss index fe83af3..a98250d 100644 --- a/assets/scss/slate/docuapi_overrides.scss +++ b/assets/scss/slate/docuapi_overrides.scss @@ -1,2 +1,4 @@ -// This is an empty placeholder for en user customizations. +// This is the recommended place for user overrides. +// See _variables.scss for available tweaks. +// Also see exampleSite/assets/scss/slate/docuapi_overrides.scss for some example tweaks. diff --git a/exampleSite/assets/scss/slate/docuapi_overrides.scss b/exampleSite/assets/scss/slate/docuapi_overrides.scss new file mode 100644 index 0000000..debd4bf --- /dev/null +++ b/exampleSite/assets/scss/slate/docuapi_overrides.scss @@ -0,0 +1,13 @@ +// Overrides + +// BACKGROUND COLORS +//////////////////// +$nav-bg:#254E70 !default; +$examples-bg: #002642 !default; + + +// FONTS +//////////////////// +@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700&display=swap"); + +$font-default-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; @@ -2,7 +2,4 @@ module github.com/bep/docuapi go 1.12 -require ( - github.com/bep/hugotestmods/mymounts v1.2.0 // indirect - github.com/lord/slate v2.3.1+incompatible // indirect -) +require github.com/lord/slate v2.3.1+incompatible // indirect diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c166d37..4384487 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -13,7 +13,7 @@ <a href="#" id="nav-button"> <span> NAV - <img src='{{ relURL "slate/images/navbar.png" }}'/> + <img src='{{ relURL "images/navbar.png" }}'/> </span> </a> <div class="toc-wrapper"> diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..3b18218 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,16 @@ +module.exports = { + plugins: { + autoprefixer: { + browsers: [ + "Android 2.3", + "Android >= 4", + "Chrome >= 20", + "Firefox >= 24", + "Explorer >= 8", + "iOS >= 6", + "Opera >= 12", + "Safari >= 6" + ] + } + }, +}
\ No newline at end of file |