From b97920e51efe34cd3b399ff6c4d70dbc03c5ebaa Mon Sep 17 00:00:00 2001 From: Simon C Date: Tue, 23 May 2023 23:41:55 +0200 Subject: [PATCH] feat: Update design black --- assets/scss/app.scss | 2 + assets/scss/common/_variables.scss | 191 -------------------------- config/_default/module.toml | 8 +- layouts/_default/baseof.html | 32 +++++ layouts/partials/header/header.html | 199 ++++++++++++++++++++++++++++ 5 files changed, 237 insertions(+), 195 deletions(-) delete mode 100644 assets/scss/common/_variables.scss create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/partials/header/header.html diff --git a/assets/scss/app.scss b/assets/scss/app.scss index 03d19ca..6f08b0b 100644 --- a/assets/scss/app.scss +++ b/assets/scss/app.scss @@ -2,6 +2,8 @@ @import "bootstrap/scss/functions"; /** Import theme variables */ +$primary: #42b883; +$link-color-dark: $primary; @import "common/variables"; /** Import Bootstrap */ diff --git a/assets/scss/common/_variables.scss b/assets/scss/common/_variables.scss deleted file mode 100644 index a840230..0000000 --- a/assets/scss/common/_variables.scss +++ /dev/null @@ -1,191 +0,0 @@ -// Color system - -$white: #fff; -$gray-100: #f8f9fa; -$gray-200: #e9ecef; -$gray-300: #dee2e6; -$gray-400: #ced4da; -$gray-500: #adb5bd; -$gray-600: #6c757d; -$gray-700: #495057; -$gray-800: #343a40; -$gray-900: #212529; -$black: #000; - -$yellow: #ffe000; -$black: #1d2d35; -$beige: #fbf7f0; - -$red: #e55235; -$purple: #5d2f86; -$brown: #aa9c84; -$green: #42b883; - -$blue-300: #8ed6fb; -$pink-100: #fcfaff; -$pink-500: #d32e9d; - -$primary: $green; - -$color-btn-bg: $pink-500; -$color-btn-border: darken($pink-500, 5%); -$color-btn-text: $white; - -// Options -// -// Quickly modify global styling by enabling or disabling optional features. - -$enable-caret: true; -$enable-rounded: true; -$enable-shadows: false; -$enable-gradients: false; -$enable-transitions: true; -$enable-reduced-motion: true; -$enable-smooth-scroll: true; -$enable-grid-classes: true; -$enable-button-pointers: true; -$enable-rfs: true; -$enable-validation-icons: true; -$enable-negative-margins: true; -$enable-deprecation-messages: true; -$enable-important-utilities: true; - -/** Bootstrap navbar fix (https://git.io/fADqW) */ -$navbar-dark-toggler-icon-bg: none; -$navbar-light-toggler-icon-bg: none; - -// Options -// -// Quickly modify global styling by enabling or disabling optional features. - -// $enable-responsive-font-sizes: true; - -// Body -// -// Settings for the `` element. - -$body-bg: $white; -$body-color: $black; - -// Links -// -// Style anchor elements. - -$link-color: $primary; -$link-decoration: none; - -// Grid containers -// -// Define the maximum width of `.container` for different screen sizes. - -$container-max-widths: ( - sm: 540px, - md: 720px, - lg: 960px, - xl: 1240px, - xxl: 1320px -); - -@include _assert-ascending($container-max-widths, "$container-max-widths"); - -// Grid columns -// -// Set the number of columns and specify the width of the gutters. - -$grid-columns: 16; -$grid-gutter-width: 48px; -$grid-row-columns: 6; - -// Components -// -// Define common padding and border radius sizes and more. - -$border-color: $gray-200; - -// Typography -// -// Font, line-height, and color for body text, headings, and more. - -// stylelint-disable value-keyword-case -$font-family-sans-serif: "Jost", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; -$font-family-monospace: sfmono-regular, menlo, monaco, consolas, "Liberation Mono", "Courier New", monospace; -$font-family-base: $font-family-sans-serif; -// stylelint-enable value-keyword-case - -$font-size-base: 1rem; // Assumes the browser default, typically `16px` -$font-size-xl: $font-size-base * 1.375; -$font-size-lg: $font-size-base * 1.25; -$font-size-md: $font-size-base * 1.125; -$font-size-sm: $font-size-base * 0.875; - -// $line-height-base: 1.5; - -$headings-font-family: null; -$headings-font-weight: 700; - -$lead-font-weight: 400; - -// Spacing -// -// Control the default styling of most Bootstrap elements by modifying these -// variables. Mostly focused on spacing. -// You can add more entries to the $spacers map, should you need more variation. - -$spacer: 1rem; - -// Navbar - -$navbar-padding-y: $spacer / 2; -$navbar-padding-x: null; - -$navbar-nav-link-padding-x: 0.5rem; - -$navbar-light-color: $black; -$navbar-light-hover-color: $primary; -$navbar-light-active-color: $primary; - -// Cards - -$card-border-color: $gray-200; - -// Alerts -// -// Define alert colors, border radius, and padding. - -$alert-padding-y: $spacer; -$alert-padding-x: $spacer * 1.5; -$alert-margin-bottom: 0; -$alert-border-radius: 0; -$alert-link-font-weight: $headings-font-weight; -$alert-border-width: 0; - -$alert-bg-scale: 0; -$alert-border-scale: 0; -$alert-color-scale: 0; - -// docsearch -$dropdown-config: ( - main-color: $primary, - layout-type: normal, - layout-width: normal, - layout-alignment: align, - background-color: $white, - border-radius: 4, - border-width: 1, - border-color: $gray-200, - box-shadow: none, - branding-position: bottom, - spacing: normal, - include-desc: yes, - background-category-header: $white, - font-size: normal, - header-color: $black, - title-color: $black, - subtitle-color: $black, - text-color: $black, - highlight-color: $primary, - highlight-opacity: 0.1, - highlight-type: underline -); - -$input-btn-focus-width: 0; diff --git a/config/_default/module.toml b/config/_default/module.toml index 66fcd50..2d28624 100644 --- a/config/_default/module.toml +++ b/config/_default/module.toml @@ -3,10 +3,6 @@ min = "0.80.0" max = "" -[[mounts]] - source = "assets" - target = "assets" - [[mounts]] source = "node_modules/@hyas/doks/archetypes" target = "archetypes" @@ -15,6 +11,10 @@ source = "node_modules/@hyas/doks/assets" target = "assets" +[[mounts]] + source = "assets" + target = "assets" + # [[mounts]] # source = "node_modules/@hyas/doks/content" # target = "content" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..7fe3b6b --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,32 @@ + + + {{ partial "head/head.html" . }} + {{ if eq .Kind "home" -}} + {{ .Scratch.Set "class" "home" -}} + {{ else if eq .Kind "404" -}} + {{ .Scratch.Set "class" "error404" -}} + {{ else if eq .Kind "page" -}} + {{ .Scratch.Set "class" .Type -}} + {{ .Scratch.Add "class" " single" -}} + {{ else -}} + {{ .Scratch.Set "class" .Type -}} + {{ .Scratch.Add "class" " list" -}} + {{ end -}} + + {{ partial "header/header.html" . }} +
+
+ {{ block "main" . }}{{ end }} +
+
+ {{ block "sidebar-prefooter" . }}{{ end }} + {{ block "sidebar-footer" . }}{{ end }} + {{ partial "footer/footer.html" . }} + {{ partial "footer/script-footer.html" . }} + {{ if eq .Site.Params.options.toTopButton true -}} +
+ Top +
+ {{ end }} + + \ No newline at end of file diff --git a/layouts/partials/header/header.html b/layouts/partials/header/header.html new file mode 100644 index 0000000..f283868 --- /dev/null +++ b/layouts/partials/header/header.html @@ -0,0 +1,199 @@ +{{ if .Site.Params.alert -}} + {{ partial "header/alert.html" . }} +{{ end -}} + +{{ if eq .Site.Params.options.navbarSticky true -}} +
+{{ end -}} + +
+ + + +{{ if eq .Site.Params.options.navbarSticky true }} +
+{{ end -}} + +{{ if eq .Section "docs" -}} +
+ +
+ +{{ else if ne .CurrentSection .FirstSection -}} + + +
+ +
+{{ end -}}