diff --git a/app.vue b/app.vue index fdb8ffe..9a0ea28 100644 --- a/app.vue +++ b/app.vue @@ -42,29 +42,26 @@ font-family: var(--text-font-family); font-size: var(--text-font-size); font-weight: var(--regular-font-weight); - line-height: var(--text-line-height); - color: white; - background-color: var(--eerie-black); + line-height: var(--line-height); + color: var(--secondary-color); + background-color: var(--primary-color); } h1 { font-family: var(--title-font-family); font-size: var(--h1-font-size); font-weight: var(--medium-font-weight); - line-height: var(--h1-line-height); } h2 { font-family: var(--title-font-family); font-size: var(--h2-font-size); - line-height: var(--h2-line-height); margin: 0 0 4rem 0; } h3 { font-family: var(--text-font-family); font-size: var(--h3-font-size); - line-height: var(--h3-line-height); margin: 2rem 0 1rem 0; } @@ -81,24 +78,57 @@ // -------------------------------------------------- a { - color: white; - text-decoration: underline var(--emerald); + color: var(--secondary-color); + text-decoration: underline var(--accent-color); border-radius: 2px; transition: color 200ms ease-in-out; &:hover, &:focus, &:active { - color: var(--emerald); + color: var(--accent-color); } &:focus-visible { - outline: 1px dashed var(--emerald); + outline: 1px dashed var(--accent-color); outline-offset: 2px; animation: expand-outline 200ms ease-in-out; } } + // -------------------------------------------------- + // BUTTON STYLE + // -------------------------------------------------- + + button { + padding: 1rem 1.5rem; + color: var(--primary-color); + background-image: var(--button-gradient); + background-size: 100%; + background-position: right center; + border: none; + border-radius: 30px; + cursor: pointer; + font-family: var(--text-font-family); + font-size: var(--text-font-size); + font-weight: var(--semi-bold-font-weight); + line-height: var(--line-height); + text-align: center; + transition: background-size 200ms ease-in-out; + + &:hover, + &:focus, + &:active { + background-size: 300%; + } + + &:focus-visible { + outline: 1px dashed var(--accent-color); + outline-offset: 4px; + animation: expand-outline 200ms ease-in-out; + } + } + // -------------------------------------------------- // LAYOUT // -------------------------------------------------- diff --git a/assets/styles/_animations.scss b/assets/styles/_animations.scss index a5801f4..88ebf0b 100644 --- a/assets/styles/_animations.scss +++ b/assets/styles/_animations.scss @@ -2,6 +2,15 @@ ANIMATIONS =========================================================================== */ +@keyframes expand-outline { + 0% { + outline-offset: 0; + } + 100% { + outline-offset: 4px; + } +} + @keyframes expand-width { 0% { width: 0; diff --git a/assets/styles/_variables.scss b/assets/styles/_variables.scss index 6575db3..66dc384 100644 --- a/assets/styles/_variables.scss +++ b/assets/styles/_variables.scss @@ -16,22 +16,20 @@ --bold-font-weight: 700; --extra-bold-font-weight: 800; --black-font-weight: 900; - --text-font-size: 1.2rem; - --text-line-height: calc(var(--text-font-size) * 1.2); - --caption-font-size: 1.1rem; - --caption-line-height: calc(var(--caption-font-size) * 1.2); - --footnote-font-size: 1rem; - --footnote-line-height: calc(var(--footnote-font-size) * 1.2); --h1-font-size: 2rem; - --h1-line-height: calc(var(--h1-font-size) * 1.2); --h2-font-size: 1.8rem; - --h2-line-height: calc(var(--h2-font-size) * 1.2); --h3-font-size: 1.6rem; - --h3-line-height: calc(var(--h3-font-size) * 1.2); + --button-font-size: 1.4rem; + --text-font-size: 1.2rem; + --caption-font-size: 1.1rem; + --footnote-font-size: 1rem; + --line-height: 1.2; // Dimensions - --icon-size: 2.5rem; + --regular-icon-size: 2.5rem; + --small-icon-size: 1.2rem; + // Colors @@ -39,16 +37,34 @@ --emerald: #72C080; --granny-smith-apple: #A3F3B0; --middle-green: #428F53; + + --primary-color: var(--eerie-black); + --primary-color-dark: black; + --secondary-color: white; + --accent-color: var(--emerald); + --accent-color-light: var(--granny-smith-apple); + --accent-color-dark: var(--middle-green); + --button-gradient: linear-gradient( + 30deg, + hsl(131deg 38% 60%) 1%, + hsl(131deg 40% 62%) 34%, + hsl(130deg 43% 64%) 46%, + hsl(130deg 46% 66%) 54%, + hsl(130deg 49% 69%) 60%, + hsl(130deg 53% 71%) 66%, + hsl(130deg 58% 73%) 71%, + hsl(130deg 63% 75%) 76%, + hsl(130deg 69% 77%) 83%, + hsl(130deg 77% 80%) 100% + ); + + // Media queries + + --tablet-media-query: 48rem; + --desktop-media-query: 62rem; } // Media queries $tablet-media-query: 48rem; $desktop-media-query: 62rem; - -@media screen and (min-width: $tablet-media-query) { - - :root { - - } -} diff --git a/components/AppError.vue b/components/AppError.vue index 89e9a45..fde3b09 100644 --- a/components/AppError.vue +++ b/components/AppError.vue @@ -1,7 +1,18 @@ @@ -12,8 +23,99 @@ // DATA // -------------------------------------------------- + const props = defineProps({ + errorMessage: String + }); const emit = defineEmits([ 'handleError' ]); + + diff --git a/components/AppFooter.vue b/components/AppFooter.vue index 1316584..f6c3ba8 100644 --- a/components/AppFooter.vue +++ b/components/AppFooter.vue @@ -28,7 +28,7 @@ } span { - color: var(--emerald); + color: var(--accent-color); } } diff --git a/error.vue b/error.vue index 5ca1af6..4a23c72 100644 --- a/error.vue +++ b/error.vue @@ -1,7 +1,7 @@ @@ -15,13 +15,13 @@ const props = defineProps({ error: Object }); - const pageTitleChunk = `Erreur ${props.error.statusCode}`; + const errorMessage = `Erreur ${props.error.statusCode}`; // -------------------------------------------------- // HEAD // -------------------------------------------------- - useAppHead(pageTitleChunk); + useAppHead(errorMessage); // -------------------------------------------------- // LOGIC diff --git a/pages/index.vue b/pages/index.vue index 40267e8..491b8ee 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -3,7 +3,7 @@

Paul Nicoué

-
+

Intégrateur web & développeur full stack

@@ -46,7 +46,7 @@ width: 0; height: 1px; margin: 0.5rem auto; - background-color: var(--emerald); + background-color: var(--accent-color); animation: expand-width 400ms ease-in-out 200ms forwards; }