From 996806b680ecbc4c5e0029c4d60709ea9c6a76c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20R=C3=A9millard?= Date: Fri, 16 Feb 2024 15:35:44 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20Renommage=20et=20am=C3=A9lioration=20du?= =?UTF-8?q?=20Jumbotron=20(anciennement=20Hero)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/base/_button.scss | 36 +++++++++++++++----- src/assets/scss/base/_typography.scss | 3 ++ src/assets/scss/globals.scss | 1 + src/components/Hero.astro | 47 --------------------------- src/components/Jumbotron.astro | 38 ++++++++++++++++++++++ src/pages/index.astro | 17 ++++++++-- 6 files changed, 85 insertions(+), 57 deletions(-) create mode 100644 src/assets/scss/base/_typography.scss delete mode 100644 src/components/Hero.astro create mode 100644 src/components/Jumbotron.astro diff --git a/src/assets/scss/base/_button.scss b/src/assets/scss/base/_button.scss index b205d4a..d535fea 100644 --- a/src/assets/scss/base/_button.scss +++ b/src/assets/scss/base/_button.scss @@ -3,20 +3,36 @@ // | ------------------------------------------------------------- .button { - display: inline-block; - padding: 0.75rem 1rem; - font-weight: bold; text-decoration: none; text-align: center; color: var(--neutral-900); - background-color: var(--primary-100); - border: 3px solid var(--primary-100); - border-radius: 3px; - transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; + + display: flex; + align-items: center; + text-align: center; + white-space: nowrap; + vertical-align: middle; + user-select: none; + position: relative; + padding: 12px 30px; + margin: 0.3125rem 1px; + font-size: 0.75rem; + font-weight: 400; + line-height: 1.42857; + text-decoration: none; + text-transform: uppercase; + letter-spacing: 0; + cursor: pointer; + background-color: transparent; + border: 0; + border-radius: 45px; + outline: 0; + transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1); + will-change: box-shadow, transform; &:hover, &:focus { - text-decoration: underline; + text-decoration: none; background-color: var(--primary-200); border-color: var(--primary-200); } @@ -25,6 +41,10 @@ color: var(--neutral-900); } + &.primary { + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12); + } + &.color-secondary { background-color: var(--secondary-100); border-color: (var(--secondary-100)); diff --git a/src/assets/scss/base/_typography.scss b/src/assets/scss/base/_typography.scss new file mode 100644 index 0000000..8e6edfd --- /dev/null +++ b/src/assets/scss/base/_typography.scss @@ -0,0 +1,3 @@ +.text-primary { + color: var(--primary-200) !important; +} diff --git a/src/assets/scss/globals.scss b/src/assets/scss/globals.scss index b15c208..ac130c9 100644 --- a/src/assets/scss/globals.scss +++ b/src/assets/scss/globals.scss @@ -5,6 +5,7 @@ @use 'base/reset'; @use 'base/root'; @use 'base/font'; +@use 'base/typography'; @use 'base/list'; @use 'base/container'; @use 'base/breakpoint'; diff --git a/src/components/Hero.astro b/src/components/Hero.astro deleted file mode 100644 index 39fca5f..0000000 --- a/src/components/Hero.astro +++ /dev/null @@ -1,47 +0,0 @@ ---- -import { Icon } from 'astro-icon/components' - -const { src = '/astronaut-hero-img.webp' } = Astro.props ---- - -
- -
- - diff --git a/src/components/Jumbotron.astro b/src/components/Jumbotron.astro new file mode 100644 index 0000000..ca5a883 --- /dev/null +++ b/src/components/Jumbotron.astro @@ -0,0 +1,38 @@ +--- +import { Icon } from 'astro-icon/components' + +const { imageSrc = 'https://picsum.photos/400/500', imageAlt = '', header, subHeader } = Astro.props +--- + +
+
+
+
+

+ {header} +

+ {subHeader &&

{subHeader}

} +
+
+ +
+
+
+ + diff --git a/src/pages/index.astro b/src/pages/index.astro index d785d32..9b68f94 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,13 +1,26 @@ --- import DefaultLayout from '../layouts/DefaultLayout.astro' -import Hero from '../components/Hero.astro' +import Jumbotron from '../components/Jumbotron.astro' import Feature from '../components/Feature.astro' import Counter from '../components/Counter.astro' import ContentMedia from '../components/ContentMedia.astro' +import { Icon } from 'astro-icon/components' --- - Super Starter for Astro + + + + Obtenir + + + Read the Docs + +

Features