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

banner stuff #437

Merged
merged 1 commit into from
Feb 29, 2024
Merged
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
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;
}
Loading