Skip to content

Commit

Permalink
Move Banner to just the landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
fhammerschmidt committed Jan 11, 2024
1 parent 2bd8446 commit dfec593
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
3 changes: 3 additions & 0 deletions src/components/Banner.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@react.component
let make = (~children) =>
<div className="bg-fire-70 text-white text-center text-14 py-3"> children </div>
13 changes: 0 additions & 13 deletions src/components/Navigation.res
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,6 @@ module MobileNav = {
}
}

module Banner = {
@react.component
let make = (~children) => <div className="bg-fire-70 text-white text-center py-1"> children </div>
}

/* isOverlayOpen: if the mobile overlay is toggled open */
@react.component
let make = (~fixed=true, ~overlayState: (bool, (bool => bool) => unit)) => {
Expand Down Expand Up @@ -615,13 +610,5 @@ let make = (~fixed=true, ~overlayState: (bool, (bool => bool) => unit)) => {
->unsafeAddProp("WebkitBackdropFilter", "blur(2px)")
}
/>
// Delete this again, when ReScript 11 is out for some time.
<Banner>
{React.string("ReScript 11 is out! Read the ")}
<Link href="/blog/release-11-0-0" className="underline">
{React.string("announcement blog post")}
</Link>
{React.string(".")}
</Banner>
</>
}
11 changes: 9 additions & 2 deletions src/layouts/LandingPageLayout.res
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ module Sponsors = {
@react.component
let make = (~components=MarkdownComponents.default, ~children) => {
let overlayState = React.useState(() => false)
let hasBanner = true

<>
<Meta
Expand All @@ -705,7 +704,15 @@ let make = (~components=MarkdownComponents.default, ~children) => {
<div className="mt-4 xs:mt-16">
<div className="text-gray-80 text-18 z">
<Navigation overlayState />
<div className={`absolute w-full ${hasBanner ? "top-[99px]" : "top-16"}`}>
<div className="absolute w-full top-16">
// Delete this again, when ReScript 11 is out for some time.
<Banner>
{React.string("ReScript 11 is out! Read the ")}
<Next.Link href="/blog/release-11-0-0" className="underline">
{React.string("announcement blog post")}
</Next.Link>
{React.string(".")}
</Banner>
<div className="relative overflow-hidden pb-32">
<main className="mt-10 min-w-320 lg:align-center w-full">
<MdxProvider components>
Expand Down

0 comments on commit dfec593

Please sign in to comment.