-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from near/feat/redacted-banner
Redacted banner on all pages
- Loading branch information
Showing
6 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.redactedBanner { | ||
display: grid; | ||
grid-template-columns: 1fr 1fr; | ||
|
||
a { | ||
display: block; | ||
outline: none; | ||
transition: box-shadow 300ms; | ||
position: relative; | ||
|
||
&::before { | ||
content: ''; | ||
display: block; | ||
position: absolute; | ||
inset: 0; | ||
transition: box-shadow 300ms; | ||
} | ||
|
||
&:hover { | ||
z-index: 100; | ||
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3); | ||
} | ||
|
||
&:focus-visible { | ||
z-index: 100; | ||
&::before { | ||
box-shadow: inset 0 0 0 4px var(--violet5); | ||
} | ||
} | ||
|
||
img { | ||
width: 100%; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Container } from '@near-pagoda/ui'; | ||
|
||
import s from './RedactedBanner.module.scss'; | ||
|
||
export const RedactedBanner = () => { | ||
const now = Date.now(); | ||
const redactedEndTime = 1731139200000; // Nov 9th 2024 | ||
const hackathonEndTime = 1727247600000; // Oct 25th 2024 | ||
const hackathonEndPassed = now > hackathonEndTime; | ||
const redactedEndPassed = now > redactedEndTime; | ||
|
||
if (redactedEndPassed) return null; | ||
|
||
return ( | ||
<Container> | ||
<div className={s.redactedBanner}> | ||
<a href="https://airtable.com/appdLXQkwmt4rqtW0/pag21sUeq3cAW994V/form" target="_blank"> | ||
<img | ||
src="/images/redacted/redacted-left.png" | ||
alt="Redacted: Reclaim your sovereignty at no cost. Click to be there IRL" | ||
/> | ||
</a> | ||
|
||
{hackathonEndPassed ? ( | ||
<img src="/images/redacted/redacted-right-empty.png" alt="Redacted" /> | ||
) : ( | ||
<a href="https://redacted.devpost.com/" target="_blank"> | ||
<img | ||
src="/images/redacted/redacted-right.png" | ||
alt="Redacted: It's so much more than a hackathon. Click to learn more" | ||
/> | ||
</a> | ||
)} | ||
</div> | ||
</Container> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters