From 519f3347ab6361c87ef3e0469256750ce1a852df Mon Sep 17 00:00:00 2001 From: beuleu Date: Mon, 23 Oct 2023 17:46:55 +0200 Subject: [PATCH] feature, add darkmode and change original colorpalette --- src/components/Hero.astro | 15 ++--- src/components/projets/ProjetCard.astro | 5 +- src/components/shared/Footer.astro | 80 ++++++++++++------------- src/components/shared/Header.astro | 25 ++++---- src/components/shared/ThemeIcon.astro | 62 +++++++++++++++++++ src/layouts/Layout.astro | 57 ++++++++++++++---- src/layouts/ProjectLayout.astro | 24 ++++++-- src/pages/contact.astro | 27 +++++---- src/pages/cv.astro | 2 +- src/pages/projets/index.astro | 2 +- 10 files changed, 204 insertions(+), 95 deletions(-) create mode 100644 src/components/shared/ThemeIcon.astro diff --git a/src/components/Hero.astro b/src/components/Hero.astro index 28d9369..2b6c917 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -37,12 +37,11 @@ .titre { font-size : 3em; font-weight : 600; - color : #444; } .sous-titre { font-size : 2em; - color : #444; + color : var(--accentTextColor); } .desc { @@ -61,10 +60,10 @@ .cta a { width : 100%; - color : #FFF; + color : var(--backgroundColor); font-weight : 600; font-size : 1.2em; - background : #555; + background : var(--backgroundUI); padding : .8em 1.6em; border-radius : 3px; box-shadow : rgba(99, 99, 99, 0.2) 0 2px 8px 0; @@ -72,15 +71,13 @@ } .cta a:hover { - background : #F6F6F6; + background : var(--backgroundColor); box-shadow : rgba(0, 0, 0, 0.25) 0 54px 55px, rgba(0, 0, 0, 0.12) 0 -12px 30px, rgba(0, 0, 0, 0.12) 0 4px 6px, rgba(0, 0, 0, 0.17) 0 12px 13px, rgba(0, 0, 0, 0.09) 0 -3px 5px; - color : #333; + color : var(--textColor); } .cta a:active { - box-shadow : rgba(0, 0, 0, 0.35) 0 5px 15px; - background : #676767; - color : #FFF + transform: translate(2px, -2px); } @media screen and (min-width : 450px) { diff --git a/src/components/projets/ProjetCard.astro b/src/components/projets/ProjetCard.astro index d99da19..cc698d9 100644 --- a/src/components/projets/ProjetCard.astro +++ b/src/components/projets/ProjetCard.astro @@ -47,7 +47,7 @@ const { .card { display : flex; flex-direction : column; - border : 1px solid black; + border : 1px solid var(--accentTextColor); border-radius : 3px; max-width : 60ch; min-height : 100%; @@ -56,7 +56,8 @@ const { } .card:focus-within { - outline : 1px solid #000000EB; + outline : 1px solid var(--contrastTextColor2); + border: transparent; } .card:focus-within a:focus { diff --git a/src/components/shared/Footer.astro b/src/components/shared/Footer.astro index ba66421..ef92bb8 100644 --- a/src/components/shared/Footer.astro +++ b/src/components/shared/Footer.astro @@ -4,24 +4,24 @@ import Socials from "../Socials.astro"; const menuItems = [ { title: "Mon CV", - path: "/cv", + path: "/cv" } ]; --- -
+
\ No newline at end of file diff --git a/src/components/shared/Header.astro b/src/components/shared/Header.astro index d421808..4fc3b8b 100644 --- a/src/components/shared/Header.astro +++ b/src/components/shared/Header.astro @@ -1,5 +1,6 @@ --- import Socials from "../Socials.astro"; +import ThemeIcon from "./ThemeIcon.astro"; const menuItems: { title: string; path: string; @@ -65,6 +66,7 @@ const menuItems: { )) } + @@ -72,15 +74,15 @@ const menuItems: { + + + + \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index e3857fc..9f2983e 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -26,11 +26,13 @@ const { titre, description } = Astro.props;
- +