From 2c68061517c4795db0c820f246991ff9adf7ed56 Mon Sep 17 00:00:00 2001 From: Slesa Adhikari Date: Mon, 29 Jan 2024 10:41:35 -0600 Subject: [PATCH] Update banner to summer school info (#277) * Update banner to summer school content * Generalize banner --- overrides/home/{ams-banner.tsx => banner.tsx} | 11 ++++++----- overrides/home/component.tsx | 4 ++-- veda.config.js | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) rename overrides/home/{ams-banner.tsx => banner.tsx} (88%) diff --git a/overrides/home/ams-banner.tsx b/overrides/home/banner.tsx similarity index 88% rename from overrides/home/ams-banner.tsx rename to overrides/home/banner.tsx index 591494640..b7f0aca6e 100644 --- a/overrides/home/ams-banner.tsx +++ b/overrides/home/banner.tsx @@ -10,7 +10,7 @@ import { import Hug from "$veda-ui-scripts/styles/hug"; import { getString } from 'veda'; -const AMS_BANNER_KEY = 'show-ams-banner' +const BANNER_KEY = 'dismissedBannerUrl' const BannerBox = styled.div` position: absolute; @@ -53,13 +53,14 @@ const BannerContent = styled.div` ` export default function Banner() { - const showBanner = (localStorage.getItem(AMS_BANNER_KEY) !== 'false') && !!getString('tempBanner')?.other + const bannerUrl = getString('tempBannerUrl')?.other || ""; + const showBanner = (localStorage.getItem(BANNER_KEY) !== bannerUrl) && !!getString('tempBanner')?.other const [ showTempBanner, setShowTempBanner ] = useState(showBanner); function onClick () { localStorage.setItem( - AMS_BANNER_KEY, - 'false' + BANNER_KEY, + bannerUrl ); setShowTempBanner(false); } @@ -78,4 +79,4 @@ export default function Banner() { ) -} \ No newline at end of file +} diff --git a/overrides/home/component.tsx b/overrides/home/component.tsx index bbda723eb..0a5b37db2 100644 --- a/overrides/home/component.tsx +++ b/overrides/home/component.tsx @@ -11,7 +11,7 @@ import { variableGlsp } from "$veda-ui-scripts/styles/variable-utils"; import Partners from "./partners"; import Keypoints from "./keypoints"; import { ArrowLink } from "./arrow-link"; -import AMSBanner from './ams-banner'; +import Banner from './banner'; const HomeContent = styled(Hug)` padding: ${variableGlsp(2.5, 0)}; @@ -89,7 +89,7 @@ const InfoCalloutHeadline = styled.div` export default function HomeComponent() { return ( <> - + Welcome diff --git a/veda.config.js b/veda.config.js index dffcd11ea..d37bb86ce 100644 --- a/veda.config.js +++ b/veda.config.js @@ -42,9 +42,9 @@ module.exports = { "This dashboard is for exploring key datasets that provide insight into greenhouse gas sources, sinks, emissions, fluxes, and events.", // Temporary Banner Text/URL tempBanner: - "Attending AMS Annual Meeting in Baltimore? Join the GHG Center / VEDA workshop and learn about Greenhouse Gases using Open Source data and tools. Register Here!", + "Graduate students and early career post-docs are invited to apply for the Summer School for Inverse Modeling of Greenhouse Gases to be held June 11-21, 2024 in Fort Collins, CO. Applications due 1/31/2024.", tempBannerUrl: - "https://www.ametsoc.org/index.cfm/ams/education-careers/careers/professional-development/short-courses/advancing-open-science-an-interactive-workshop-on-harnessing-veda-for-earth-science-research-at-the-u-s-greenhouse-gas-center/" + "https://www.cira.colostate.edu/conferences/rmtgw/" }, theme: {