Skip to content

Commit

Permalink
Merge pull request #118 from RENCI/feature/nopp
Browse files Browse the repository at this point in the history
Logo changes for NOPP branded website
  • Loading branch information
PhillipsOwen authored Jul 17, 2024
2 parents 1b010c0 + cd35bfd commit 137e66f
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 11 deletions.
49 changes: 49 additions & 0 deletions src/components/control-panel/branding.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from 'react';
import {
Box,
Stack,
} from '@mui/joy';
import apsLogo from '@images/aps-trans-logo.png';
import noppLogo from '@images/nopp-logo.png';
import { getBrandingHandler } from "@utils/map-utils";


export const Branding = () => {

// get the branded website if any
let product_code = getBrandingHandler();
// for testing: let product_code = '&project_code=nopp';
if (product_code) {
product_code = product_code.split('=')[1];
}

return (
<div>
{product_code === "nopp" ?
( <Stack direction="row" gap={ 1 } alignItems="center">
<Box
component="img"
width="100px"
alt="National Oceanograhic Partnership Program"
src={noppLogo}
/>
<Box
component="img"
width="150px"
alt="ADCIRC Prediction System"
src={apsLogo}
/>
</Stack>)
:
( <Stack direction="column" gap={ 1 } alignItems="center">
<Box
component="img"
width="250px"
alt="ADCIRC Prediction System"
src={apsLogo}
/>
</Stack>)
}
</div>
);
};
13 changes: 2 additions & 11 deletions src/components/control-panel/control-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Accordion,
AccordionDetails,
AccordionSummary,
Box,
Divider,
IconButton,
Stack,
Expand All @@ -23,8 +22,8 @@ import {
Water as MaxElevationIcon,
Waves as HIResMaxElevationIcon,
} from '@mui/icons-material';
import apsLogo from '@images/aps-trans-logo.png';
import { getBrandingHandler, getNamespacedEnvParam } from "@utils/map-utils";
import { Branding } from './branding';

const layerIcons = {
maxele63: <MaxElevationIcon />,
Expand Down Expand Up @@ -327,15 +326,7 @@ export const ControlPanel = () => {
}}
>
<AccordionSummary slotProps={{buttonClasses: {size: 'xx-large'}}}>
{/* <ExpandMoreIcon sx={{ color: 'blue', size: 'xx-large' }} /> */}
<Stack direction="column" gap={ 1 } alignItems="center">
<Box
component="img"
width="250px"
alt="ADCIRC Prediction System"
src={apsLogo}
/>
</Stack>
<Branding/>
</AccordionSummary>
<AccordionDetails sx={{'marginBottom': '15px'}}>
<Stack direciton="column" gap={ 1 } alignItems="center">
Expand Down
Binary file added src/images/nopp-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 137e66f

Please sign in to comment.