Skip to content

Commit

Permalink
Enable reworked donation banner
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi committed Nov 27, 2024
1 parent 5324762 commit 192797c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
3 changes: 1 addition & 2 deletions site/DataCatalog/DataCatalogPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const DataCatalogPage = (props: {
></script>
</Head>
<body className="DataCatalogPage">
<SiteHeader baseUrl={baseUrl} hideDonationFlag />
<SiteHeader baseUrl={baseUrl} />
<main
id="data-catalog-page-root"
className="grid grid-cols-12-full-width"
Expand All @@ -45,7 +45,6 @@ export const DataCatalogPage = (props: {
<SiteFooter
context={SiteFooterContext.dataCatalogPage}
baseUrl={baseUrl}
hideDonationFlag
/>
</body>
</html>
Expand Down
6 changes: 5 additions & 1 deletion site/DonatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ export const DonatePage = (props: {
) : null}
</main>

<SiteFooter hideDonate={true} baseUrl={props.baseUrl} />
<SiteFooter
hideDonate={true}
baseUrl={props.baseUrl}
hideDonationFlag
/>

<script
type="module"
Expand Down
19 changes: 11 additions & 8 deletions site/SiteNavigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,19 @@
}
}
.site-navigation__giving {
@include sm-only {
display: none;
}
position: absolute;
padding: 5px 10px;
margin-left: -10px;
color: $white;
@include body-3-medium;
display: block;
width: 100%;
text-align: center;
padding: 2px 0 5px;
color: $white;
background-color: $vermillion;

&:hover {
background-color: $accent-vermillion;
text-decoration: underline;
}

@include sm-only {
display: none;
}
}
12 changes: 6 additions & 6 deletions site/SiteNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export enum Menu {

// Note: tranforming the flag from an env string to a boolean in
// clientSettings.ts is convoluted due to the two-pass SSR/Vite build process.
const HAS_DONATION_FLAG = false
const HAS_DONATION_FLAG = true

export const SiteNavigation = ({
baseUrl,
Expand Down Expand Up @@ -219,13 +219,13 @@ export const SiteNavigation = ({
</a>
</div>
</div>
{HAS_DONATION_FLAG && !hideDonationFlag && (
<a href="/donate" className="site-navigation__giving">
Giving season
</a>
)}
</div>
</div>
{HAS_DONATION_FLAG && !hideDonationFlag && (
<a href="/donate" className="site-navigation__giving">
It’s Giving Season. Help us do more with a donation.
</a>
)}
</>
)
}
Expand Down

0 comments on commit 192797c

Please sign in to comment.