use 'dark' class locally in header, hero or custom sections. adapt dark styles.

This commit is contained in:
Mathieu Jaumotte 2023-11-08 14:32:14 +01:00
parent 2133aabfb9
commit e3c547979a
9 changed files with 102 additions and 46 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,6 +1,6 @@
///// HOMEPAGE ///// HOMEPAGE
/// Chill colors /// Chill brand colors
$chill-blue: #334d5c; $chill-blue: #334d5c;
$chill-green: #43b29d; $chill-green: #43b29d;
$chill-beige: #d3c7b1; $chill-beige: #d3c7b1;
@ -10,41 +10,66 @@ $chill-orange: #e89463;
$chill-lightgray: #efefef; $chill-lightgray: #efefef;
$chill-yellow: #f1d275; $chill-yellow: #f1d275;
/// Other custom colors
$bg-dark-blue: #0d242e;
$bg-light-blue: #a0dcff;
$btn-orange: #f46839;
$text-green: #56c4aa;
$icon-red: #f0384d;
$icon-yellow: #fcc958;
// Pattern
// hugo needs to precompile images in public dir, and make it automatically with images called from content.
// here we need to use it in css, then need to generate it, calling it first from a content md file.
@mixin apply-bgpattern-01() {
background-repeat: repeat;
background-position: bottom center;
background-image: url('../images/bg/dessin-3.png');
}
// Theme Custom sections // Theme Custom sections
header.header { header.header {
background-color: $chill-blue; background-color: $bg-dark-blue;
} }
main > section { main > section {
&:first-child { &.hero {
background-color: $chill-blue; background-color: $bg-dark-blue;
@include apply-bgpattern-01();
h1 {
color: $text-green;
}
p {
color: white;
font-weight: bolder;
}
} }
&.section-1 { &.section-1 {
background-color: $bg-light-blue;
} }
&.section-2 { &.section-2 {
} }
&.section-3 { &.section-3 {
background-color: $text-green;
} }
&.section-4 { &.section-4 {
} }
&.section-5 { &.section-5 {
background-color: transparentize($color: $text-green, $amount: 0.7)
} }
&.section-6 { &.section-6 {
background-color: $chill-blue; background-color: $bg-dark-blue;
background-repeat: repeat; @include apply-bgpattern-01();
background-position: bottom center;
background-image: url('../images/bg/dessin-3.png');
/* hugoplate needs to compile images in public, and make it automatically for images called from content.
we need to call first image from content md files, if we need to use it in css
*/
} }
&.section-7 { &.section-7 {
background-color: $bg-light-blue;
} }
} }
// Change bulletlists rendering in flex bloc // Change bulletlists rendering in flex bloc
section.section-1, section.section-1,
section.section-6 { section.section-5,
section.section-7 {
.container .row { .container .row {
& > div { & > div {
&:last-child { &:last-child {
@ -69,4 +94,16 @@ section.section-6 {
} }
} }
} }
}
// Dark context (homepage header, hero, footer)
.dark {
// Overwrite primary button design
.btn-primary {
background-color: $btn-orange;
color: white;
border: 1px solid $btn-orange;
border-radius: 2em;
}
} }

View File

@ -1,31 +1,43 @@
#################### default parameters ################################ #################### default parameters ################################
# favicon # favicon
favicon = "images/favicon.png" favicon = "images/favicon.png"
# logo # logo
logo = "images/logo.png" logo = "images/logo.png"
logo_darkmode = "images/logo-darkmode.png" logo_darkmode = "images/logo-darkmode.png"
# use `px` or `x` with logo_width, example: "100px". # use `px` or `x` with logo_width, example: "100px".
# Note: logo_width is not work with .svg file # Note: logo_width is not work with .svg file
logo_width = "160px" logo_width = "160px"
logo_height = "32px" logo_height = "32px"
# if logo_webp set false, will not generate WEBP version of logo | default is true # if logo_webp set false, will not generate WEBP version of logo | default is true
logo_webp = true logo_webp = true
# logo text will only show when logo is missing. # logo text will only show when logo is missing.
logo_text = "Hugoplate" logo_text = "Hugoplate"
# navbar fixed to top # navbar fixed to top
navbar_fixed = true navbar_fixed = false
# theme-mode # theme-mode
theme_switcher = true # available options [light/dark/system]
theme_default = "dark" # available options [light/dark/system] theme_switcher = false
theme_default = "light"
# Main Sections # Main Sections
mainSections = ["blog"] mainSections = ["blog"]
# contact form action # contact form action
contact_form_action = "#" # contact form works with [https://airform.io/] or [https://formspree.io] contact_form_action = "#" # contact form works with [https://airform.io/] or [https://formspree.io]
# google tag manager, see https://developers.google.com/tag-manager/ # google tag manager, see https://developers.google.com/tag-manager/
google_tag_manager = "" # example: G-XXXXXXXXXX # google_tag_manager = "" # example: G-XXXXXXXXXX
google_adsense = "" # example: ca-pub-xxxxxxxxxxxxxxxx # google_adsense = "" # example: ca-pub-xxxxxxxxxxxxxxxx
# custom script on header, example: custom_script= "<script>console.log(\"Hello World\")</script>" # custom script on header, example: custom_script= "<script>console.log(\"Hello World\")</script>"
custom_script = "" custom_script = ""
# copyright # copyright
copyright = "Designed & Developed by [Zeon Studio](https://zeon.studio)" copyright = "Designed & Developed by [Zeon Studio](https://zeon.studio)"

View File

@ -1,9 +1,10 @@
--- ---
# Banner # Banner
banner: banner:
class: dark
image: "/images/banner.png"
title: "Le compagnon du travailleur social" title: "Le compagnon du travailleur social"
content: "CHILL est une application web open source, un logiciel métier dédié à l'accompagnement des personnes, pour améliorer et faciliter le travail social." content: "CHILL est une application web open source, un logiciel métier dédié à l'accompagnement des personnes, pour améliorer et faciliter le travail social."
image: "/images/banner.png"
button: button:
enable: true enable: true
label: "Essayer la démo" label: "Essayer la démo"
@ -27,6 +28,10 @@ features:
image: "/images/service-20.png" image: "/images/service-20.png"
title: title:
content: "CHILL nourrit les travailleurs sociaux des informations dont ils ont besoin au quotidien, tout en leur offrant une vision densemble sur la situation de vie, les dossiers et les parcours sociaux des personnes accompagnées." content: "CHILL nourrit les travailleurs sociaux des informations dont ils ont besoin au quotidien, tout en leur offrant une vision densemble sur la situation de vie, les dossiers et les parcours sociaux des personnes accompagnées."
button:
enable: false
label: "Test button style"
link: "#"
- -
class: section-3 class: section-3
@ -43,7 +48,7 @@ features:
- -
class: section-4 class: section-4
image: "/images/service-20.png" image: "/images/service-3.png"
title: title:
content: " content: "
Via les divers supports et manuels pédagogiques mis à disposition, CHILL permet lautonomie des utilisateurs et des administrateurs, que ce soit pour l'utiliser ou pour le configurer." Via les divers supports et manuels pédagogiques mis à disposition, CHILL permet lautonomie des utilisateurs et des administrateurs, que ce soit pour l'utiliser ou pour le configurer."
@ -53,18 +58,7 @@ features:
link: "start/user" link: "start/user"
- -
class: section-5 class: section-5 dark
image: "/images/service-30.png"
title:
content: "
**Flexible et adaptable à de nombreuses réalités, CHILL s'adapte à une diversité de grosses comme de petites structures.**
<br><br>
CHILL a été développé dans le cadre d'un processus participatif avec les travailleurs sociaux de différents secteurs, afin que le logiciel réponde à leur besoin et à une diversité de réalités de terrain.
<br><br>
"
-
class: section-6
image: "/images/service-20.png" image: "/images/service-20.png"
title: title:
content: content:
@ -74,9 +68,20 @@ features:
- "**Respecte les principes du RGPD** de *privacy by design* et *security by design*, en offrant la possibilité aux administrateurs de paramétrer différents rôles, cercles dutilisateurs et règles daccès aux contenus." - "**Respecte les principes du RGPD** de *privacy by design* et *security by design*, en offrant la possibilité aux administrateurs de paramétrer différents rôles, cercles dutilisateurs et règles daccès aux contenus."
- "**Sinscrit dans la philosophie du logiciel libre** et dans un processus damélioration continue pour un code source restant ouvert, car largent public doit fabriquer du code public." - "**Sinscrit dans la philosophie du logiciel libre** et dans un processus damélioration continue pour un code source restant ouvert, car largent public doit fabriquer du code public."
-
class: section-6
image: "/images/service-30.png"
title:
content: "
**Flexible et adaptable à de nombreuses réalités, CHILL s'adapte à une diversité de grosses comme de petites structures.**
<br><br>
CHILL a été développé dans le cadre d'un processus participatif avec les travailleurs sociaux de différents secteurs, afin que le logiciel réponde à leur besoin et à une diversité de réalités de terrain.
<br><br>
"
- -
class: section-7 class: section-7
image: "/images/service-3.png" image: "/images/service-30.png"
title: "Ce qu'il faut retenir" title: "Ce qu'il faut retenir"
content: content:
bulletpoints: bulletpoints:

View File

@ -18,8 +18,8 @@
"theme_color": { "theme_color": {
"primary": "#fff", "primary": "#fff",
"body": "#1c1c1c", "body": "#1c1c1c",
"border": "#3E3E3E", "border": "#ffffff09",
"theme_light": "#222222", "theme_light": "#0d242e",
"theme_dark": "" "theme_dark": ""
}, },
"text_color": { "text_color": {
@ -31,14 +31,12 @@
}, },
"fonts": { "fonts": {
"font_family": { "font_family": {
"primary": "Heebo:wght@400;600", "primary": "OpenSans:wght@300;400;500;600;700;800",
"primary_type": "sans-serif", "primary_type": "sans-serif"
"secondary": "Signika:wght@500;700",
"secondary_type": "sans-serif"
}, },
"font_size": { "font_size": {
"base": "16", "base": "15",
"scale": "1.250" "scale": "1.25"
} }
} }
} }

View File

@ -7,9 +7,11 @@
} }
.btn-primary { .btn-primary {
@apply border-primary bg-primary dark:border-darkmode-primary dark:text-dark text-white dark:bg-white; @apply border-primary text-white bg-primary
dark:border-darkmode-primary dark:text-dark dark:bg-white;
} }
.btn-outline-primary { .btn-outline-primary {
@apply border-dark text-dark hover:bg-dark dark:hover:text-dark bg-transparent hover:text-white dark:border-white dark:text-white dark:hover:bg-white; @apply text-dark bg-transparent border-dark hover:bg-dark hover:text-white
dark:text-white dark:border-white dark:hover:text-dark dark:hover:bg-white;
} }

View File

@ -1,7 +1,7 @@
{{ define "main" }} {{ define "main" }}
<!-- Banner --> <!-- Banner -->
{{ with .Params.banner }} {{ with .Params.banner }}
<section class="section pt-14"> <section class="section pt-14 hero {{ with .class }}{{ . }}{{ end }}">
<div class="container"> <div class="container">
<div class="row justify-center"> <div class="row justify-center">
<div class="lg:col-7 mb-8 text-center"> <div class="lg:col-7 mb-8 text-center">
@ -31,7 +31,7 @@
<!-- Features --> <!-- Features -->
{{ range $i, $e:= .Params.features }} {{ range $i, $e:= .Params.features }}
<section class="section-sm {{ with .class }}{{ . }}{{ end }} {{ if (modBool $i 2) }}bg-gradient{{ end }}"> <section class="section-sm sn-{{ add $i 1 }} {{ with .class }}{{ . }}{{ end }}">
<div class="container"> <div class="container">
<div class="row items-center justify-between"> <div class="row items-center justify-between">
<div <div

View File

@ -1,3 +1,4 @@
<div class="dark">
<footer class="bg-theme-light dark:bg-darkmode-theme-light"> <footer class="bg-theme-light dark:bg-darkmode-theme-light">
<div class="container"> <div class="container">
<div class="row items-center py-10"> <div class="row items-center py-10">
@ -55,3 +56,4 @@
</div> </div>
</div> </div>
</footer> </footer>
</div>

View File

@ -1,5 +1,5 @@
<header <header
class="header {{ if site.Params.navbar_fixed }}sticky top-0{{ end }} z-30"> class="header dark {{ if site.Params.navbar_fixed }}sticky top-0{{ end }} z-30">
<nav class="navbar container"> <nav class="navbar container">
<!-- logo --> <!-- logo -->
<div class="order-0"> <div class="order-0">
@ -126,7 +126,7 @@
{{ if site.Params.navigation_button.enable }} {{ if site.Params.navigation_button.enable }}
<a <a
href="{{ site.Params.navigation_button.link | relLangURL }}" href="{{ site.Params.navigation_button.link | relLangURL }}"
class="btn btn-outline-primary btn-sm hidden lg:inline-block"> class="btn btn-primary btn-sm hidden lg:inline-block">
{{ site.Params.navigation_button.label }} {{ site.Params.navigation_button.label }}
</a> </a>
{{ end }} {{ end }}