diff --git a/public/images/icons/exit-cross.png b/public/images/icons/exit-cross.png new file mode 100644 index 0000000..442f6a7 Binary files /dev/null and b/public/images/icons/exit-cross.png differ diff --git a/src/components/Banner/banner.jsx b/src/components/Banner/banner.jsx new file mode 100644 index 0000000..9dfebdf --- /dev/null +++ b/src/components/Banner/banner.jsx @@ -0,0 +1,49 @@ +import { useEffect, useState } from 'react'; +import styles from './banner.module.scss'; + +export function Banner() { + const [displayBanner, setDisplayBanner] = useState(null); + + useEffect(() => { + const stateCondition = localStorage.getItem('displayBanner'); + console.log('localStorage = ' + localStorage.getItem('displayBanner')); + if (stateCondition === 'false') { + setDisplayBanner(false); + } else { + setDisplayBanner(true); + } + console.log('stateCondition =' + stateCondition); + }, []); + + const hideBanner = () => { + localStorage.setItem('displayBanner', 'false'); + setDisplayBanner(false); + }; + + const display = displayBanner ? styles.banner : styles.hidden; + + return ( +
+
+

Method Conference

+
+
+

Join us for a full day of code & learning.

+

Saturday, October 12, 2024, @ eFactory

+
+
+ + + + +
+
+ ); +} diff --git a/src/components/Banner/banner.module.scss b/src/components/Banner/banner.module.scss new file mode 100644 index 0000000..8f74a2a --- /dev/null +++ b/src/components/Banner/banner.module.scss @@ -0,0 +1,84 @@ +@import '@/styles/utils/all'; + +.container{ + display: flex; + justify-content: space-between; + + width: 12em; +} + +.hidden { + display: none; +} + +.banner { + display: flex; + + height: 120px; + width: 98%; + + margin: .5em; + padding: 0em 2em; + + border-radius: 1em; + background-color: #E9F5FF; + + + justify-content: space-between; + align-items: center; + + text-align: center; +} + +.textArea{ + margin: 0em 1em; +} + +.textBold{ + font-family: sans-serif; + font-size: 1.5em; + font-weight: bold; + color: #0094FF; +} + +.text{ + font-family: sans-serif; + font-size: 1.5em; + color: #0094FF; +} + +.button{ + border: none; + + padding: 1rem 2rem; + + background-color: #0094FF; + color: #FFFFFF; + + min-width: 150px; +} + +.anchor :hover{ + cursor: pointer; +} + +.exit{ + height: 1em; +} + +.exitButton{ + border: none; + background-color: #E9F5FF; +} + +.exitButton :hover{ + cursor: pointer; +} +@media (max-width:600px) { + .banner{ + flex-direction: column; + justify-content: space-around; + + height: 20vh; + } +} \ No newline at end of file diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index ea533ff..e33f2cb 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -1,3 +1,4 @@ +import { Banner } from '@/components/Banner/banner.jsx'; import { Footer } from '@/components/Footer/Footer'; import { Navbar } from '@/components/Navbar/Navbar'; import styles from './layout.module.scss'; @@ -11,6 +12,7 @@ export function Layout({ children }: ILayout): JSX.Element {
+ {children}