Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conference Banner #155

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/images/icons/exit-cross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions src/components/Banner/banner.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from "react";

Check warning on line 1 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Replace `"react"` with `'react'`
import styles from './banner.module.scss';


Check warning on line 4 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Replace `⏎export·default·function·Banner(){⏎` with `export·default·function·Banner()·{`
export default function Banner(){

Check failure on line 5 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Prefer named exports

const [displayBanner, setDisplayBanner] = React.useState(true)

Check warning on line 7 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Insert `;`

const display = displayBanner ? styles.banner : styles.hidden;

function toggleBanner(){

Check warning on line 11 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Insert `·`
setDisplayBanner(prevState => !prevState)

Check warning on line 12 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Replace `prevState·=>·!prevState)` with `(prevState)·=>·!prevState);`
}

return (
<div className={display}>

Check warning on line 16 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Replace `············` with `········`
<div>

Check warning on line 17 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Delete `····`
<h3 className={styles.textBold}>Method Conference</h3>

Check warning on line 18 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Delete `····`
</div>

Check warning on line 19 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Replace `················` with `············`
<div className={styles.textArea}>

Check warning on line 20 in src/components/Banner/banner.jsx

View workflow job for this annotation

GitHub Actions / Run linters

Delete `····`
<p className={styles.textBold}>Join us for a full day of code & learning.</p>
<p className={styles.text}>Saturday, October 12, 2024, @ eFactory</p>
</div>
<div className={styles.container}>
<a href="https://www.methodconf.com/2024/" target="_blank">
<button className={styles.button}>BUY TICKETS</button>
</a>
<button className={styles.exitButton} onClick={toggleBanner}>
<img src="/images/icons/exit-cross.png" className={styles.exit} alt="close banner"/>
</button>
</div>
</div>
)

}
77 changes: 77 additions & 0 deletions src/components/Banner/banner.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
@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: "Source Sans 3", sans-serif;
font-size: 1.5em;
font-weight: bold;
color: #0094FF;
}

.text{
font-family: "Source Sans 3", sans-serif;
font-size: 1.5em;
color: #0094FF;
}

.button{
border: none;

padding: 1rem 2rem;

background-color: #0094FF;
color: #FFFFFF;

min-width: 150px;
}

.exit{
height: 1em;
}

.exitButton{
border: none;
background-color: #E9F5FF;
}

@media (max-width:600px) {
.banner{
flex-direction: column;
justify-content: space-around;

height: 20vh;
}
}
4 changes: 4 additions & 0 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
import React from 'react';
import { Footer } from '@/components/Footer/Footer';

Check failure on line 2 in src/components/Layout.tsx

View workflow job for this annotation

GitHub Actions / Run linters

Imports should be sorted alphabetically
import { Navbar } from '@/components/Navbar/Navbar';
import Banner from '@/components/Banner/banner.jsx'

Check failure on line 4 in src/components/Layout.tsx

View workflow job for this annotation

GitHub Actions / Run linters

Imports should be sorted alphabetically
import styles from './layout.module.scss';

interface ILayout {
children: any;
}

export function Layout({ children }: ILayout): JSX.Element {

return (
<div className={styles.pageContainer}>
<div className={styles.contentWrapper}>
<Navbar />
<Banner />
{children}
</div>
<Footer />
Expand Down
1 change: 1 addition & 0 deletions styles/base/typography.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');
@import '@/styles/utils/all';

html {
Expand Down
Loading