Skip to content

Commit

Permalink
Merge pull request #92 from berlin/staging
Browse files Browse the repository at this point in the history
Feat : info banner for meetup
  • Loading branch information
hanshack authored Oct 26, 2022
2 parents d5af79d + 2f75a89 commit d166a2b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { mapRawQueryToState } from '@lib/utils/queryUtil'
import { ParsedUrlQuery } from 'querystring'
import { StrictMode, FC } from 'react'
import { Banner } from '@components/Banner'
import { Head } from '@components/Head'
import '../src/style/global.css'
import { useMatomo } from '@lib/hooks/useMatomo'
Expand Down Expand Up @@ -30,6 +31,7 @@ const App: FC<{

return (
<StrictMode>
{pathname !== '/share' && <Banner />}
<Head pageTitle={pageProps.title || ''} />
{pathname !== '/share' && <Header {...pageProps.query} />}
<Component {...pageProps} query={parsedQuery} />
Expand Down
35 changes: 35 additions & 0 deletions src/components/Banner/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { FC, useState } from 'react'
import { Button } from '@components/Button'
import { Cross } from '@components/Icons'

export const Banner: FC = () => {
const [showBanner, setShowBanner] = useState(true)

return showBanner ? (
<div className="bg-blue text-white">
<button
onClick={() => setShowBanner(false)}
className="p-2 font-medium text-brand cursor-pointer absolute right-0"
>
<Cross color1={'white'} />
</button>
<div className="px-4 sm:px-0 container m-auto py-6 flex gap-4 items-end flex-wrap sm:flex-nowrap">
<p className="grow">
<b>Liebe Developer, </b>
am 23.11.22 um 19 Uhr findet im CityLAB Berlin das nächste Developer
Meetup statt.
<br />
Du bist herzlich willkommen, uns über die Schulter zu schauen und
selbst aktiv mitzumachen. Wir freuen uns auf euch!
</p>
<span className="shrink-0 self-center">
<Button
href={'https://citylab-berlin.org/de/events/developer-meetup-3/'}
>
Mehr Erfahren
</Button>
</span>
</div>
</div>
) : null
}
1 change: 1 addition & 0 deletions src/style/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const colors = Object.assign(
'900': '#111827',
},
brand: '#c41b31',
blue: '#324FA3',
},
palette
)
Expand Down

1 comment on commit d166a2b

@vercel
Copy link

@vercel vercel bot commented on d166a2b Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.