From dc5aaf7c8735514e56056306d06e26f949fa9619 Mon Sep 17 00:00:00 2001 From: VividTruthKeeper Date: Thu, 23 Jun 2022 14:04:25 +0500 Subject: [PATCH] section title desktop --- src/components/global/SectionTitle.tsx | 25 +++++++++++++++ src/icons/bishop.svg | 8 +++++ src/pages/Main.tsx | 1 + src/styles/_section-title.scss | 43 ++++++++++++++++++++++++++ src/styles/_variables.scss | 2 ++ src/styles/style.scss | 1 + 6 files changed, 80 insertions(+) create mode 100644 src/components/global/SectionTitle.tsx create mode 100644 src/icons/bishop.svg create mode 100644 src/styles/_section-title.scss diff --git a/src/components/global/SectionTitle.tsx b/src/components/global/SectionTitle.tsx new file mode 100644 index 0000000..14a7142 --- /dev/null +++ b/src/components/global/SectionTitle.tsx @@ -0,0 +1,25 @@ +// Modules + +// Icons +import bishop from "../../icons/bishop.svg"; + +interface Props { + title: string; +} + +const SectionTitle = ({ title }: Props) => { + return ( +
+
+ +
+

{title}

+
+
+
+
+
+ ); +}; + +export default SectionTitle; diff --git a/src/icons/bishop.svg b/src/icons/bishop.svg new file mode 100644 index 0000000..78ccd7e --- /dev/null +++ b/src/icons/bishop.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/pages/Main.tsx b/src/pages/Main.tsx index bc177d6..477e8c6 100644 --- a/src/pages/Main.tsx +++ b/src/pages/Main.tsx @@ -2,6 +2,7 @@ // Components import MainSlider from "../components/main/MainSlider"; +import SectionTitle from "../components/global/SectionTitle"; const Main = () => { return ( diff --git a/src/styles/_section-title.scss b/src/styles/_section-title.scss new file mode 100644 index 0000000..c2681b3 --- /dev/null +++ b/src/styles/_section-title.scss @@ -0,0 +1,43 @@ +.section-title { + position: relative; + background: $base-gray; + display: flex; + align-items: center; + gap: 1.6rem; + padding: 1.6rem; + overflow: hidden; + margin-bottom: 10rem; +} + +.section-title-title { + font-size: 2.8rem; + z-index: 2; +} + +.section-title-deco { + z-index: 0; + position: absolute; + right: 0; + top: 0; + height: 100%; + width: 46.78rem; + overflow: hidden; + + * { + background: $base-green; + position: absolute; + } + + .deco-rotated { + right: 29rem; + width: 8rem; + height: 200%; + transform: rotate(38deg); + } + + .deco { + right: 0; + width: 30rem; + height: 100%; + } +} diff --git a/src/styles/_variables.scss b/src/styles/_variables.scss index 2770885..5a84424 100644 --- a/src/styles/_variables.scss +++ b/src/styles/_variables.scss @@ -1,6 +1,8 @@ // Colors $base-green: #01815e; $base-black: #1c1717; +$base-gray: #f8f8f8; +$hover-green: #0e654e; // Flex @mixin flex-c { diff --git a/src/styles/style.scss b/src/styles/style.scss index 8933641..ec9dc8d 100644 --- a/src/styles/style.scss +++ b/src/styles/style.scss @@ -1,6 +1,7 @@ @import "./nullifier"; @import "./variables"; @import "./general"; +@import "./section-title"; @import "./nav"; @import "./footer"; @import "./main";