Skip to content

Commit

Permalink
banner stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Grato committed Feb 29, 2024
1 parent f783a43 commit c240e4d
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 17 deletions.
36 changes: 36 additions & 0 deletions client/components/navigation/MainNav/MainNav.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,39 @@ button.exit_button {
line-height: 20px;
}
}

.marquee {
&_container {
display: flex;
justify-content: center;
align-items: center;
padding: 15px;
@include mobile-down {
padding: 20px;
}
}

& section {
@include mobile-down {
display: inline-block;
padding-left: 100%;
animation: marquee 20s linear infinite;
}
}

@include mobile-down {
white-space: nowrap;
overflow: hidden;
position: absolute;
width: 100vw;
}
}

@keyframes marquee {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(-100%, 0);
}
}
28 changes: 27 additions & 1 deletion client/components/navigation/MainNav/MainNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,33 @@ const MainNav = ({
*/
return (
<nav className={`${styles.main_nav} ${classProp}`}>
<div className={styles.banner_gradient} />
<div className={styles.banner_gradient}>
<div className={styles.marquee_container}>
<div className={styles.marquee}>
<section className={styles.banner_text}>
<div className="flex-align-center">
<div>
<Icon name="info" classProp="mr-10 mt-3" />
</div>
<p className="body-sm-bold ">
Important Notice: Mozilla Hubs will shut down on May 31, 2024.
For more information about the shutdown and how you can
support Hubs&apos; life beyond Mozilla, please read{' '}
<a
target="_blank"
href="https://hubs.mozilla.com/labs/sunset/"
className="primary-link"
rel="noreferrer"
>
this article
</a>
.
</p>
</div>
</section>
</div>
</div>
</div>

<div className={styles.main_nav_wrapper}>
<div className={styles.main_nav_container}>
Expand Down
2 changes: 1 addition & 1 deletion client/styles/ui/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
flex-direction: column;
min-height: 100vh;
background: $gradient-rainbow;
padding-top: 88px;
padding-top: 160px;
margin: 0;
}
37 changes: 23 additions & 14 deletions marketing/components/navigation/MainNav/MainNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,31 @@ const MainNav = ({
return (
<nav className={`${styles.main_nav} ${classProp}`}>
<div className={styles.banner_gradient}>
{navData?.bannerText && (
<div className={styles.marquee_container}>
<div className={styles.marquee}>
<section className={styles.banner_text}>
<div className="flex-align-center">
<div>
<Icon name={navData.bannerIcon} classProp="mr-10 mt-3" />
</div>
<p className="body-sm-bold flex-align-center">
{navData?.bannerText}
</p>
<div className={styles.marquee_container}>
<div className={styles.marquee}>
<section className={styles.banner_text}>
<div className="flex-align-center">
<div>
<Icon name="info" classProp="mr-10 mt-3" />
</div>
</section>
</div>
<p className="body-sm-bold ">
Important Notice: Mozilla Hubs will shut down on May 31, 2024.
For more information about the shutdown and how you can
support Hubs&apos; life beyond Mozilla, please read{' '}
<a
target="_blank"
href="https://hubs.mozilla.com/labs/sunset/"
className="primary-link"
rel="noreferrer"
>
this article
</a>
.
</p>
</div>
</section>
</div>
)}
</div>
</div>

<div className={styles.main_nav_wrapper}>
Expand Down
2 changes: 1 addition & 1 deletion marketing/styles/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ p {
flex: 1;
flex-direction: column;
min-height: 100vh;
margin: 90px 0 0 0;
margin: 160px 0 0 0;
}

0 comments on commit c240e4d

Please sign in to comment.