Skip to content

Commit

Permalink
Updated logo and moved contact form to Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
mhawkinsbasis committed Oct 6, 2023
1 parent 37d2650 commit edc7752
Show file tree
Hide file tree
Showing 8 changed files with 290 additions and 142 deletions.
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const config = {
title: 'Dynamic Web Client for Java',
logo: {
alt: 'My Site Logo',
src: 'img/logo.v1.png',
src: 'img/logo.png',
},
items: [
// {
Expand Down
335 changes: 214 additions & 121 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@emotion/styled": "^11.11.0",
"@mdx-js/react": "^1.6.22",
"@mui/icons-material": "^5.14.1",
"@mui/material": "^5.14.1",
"@mui/material": "^5.14.11",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
Expand Down
79 changes: 61 additions & 18 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import HomepageSection from '@site/src/components/HomepageFeatures/HomepageSection'

import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';
import CircularProgress from '@mui/material/CircularProgress';

import logo from "../../static/img/logo.png"
import { css, jsx } from '@emotion/react';

Expand Down Expand Up @@ -39,7 +46,37 @@ function HomepageHeader() {
}

function HomepageTitle(){


const [open, setOpen] = useState(false);
const [loading, setLoading] = useState(true);

const handleOpen = () => {
setOpen(true);
};

const handleClose = () => {
setOpen(false);
};

useEffect(() => {
const script = document.createElement('script');
script.charset = 'utf-8';
script.type = 'text/javascript';
script.src = '//js.hsforms.net/forms/embed/v2.js';

script.onload = () => {
hbspt.forms.create({
region: 'na1',
portalId: '14494994',
formId: '3ba0ef89-b572-4fa5-833c-4f63f25586d0',
target: `#script-container`,
});
setLoading(false)
};
document.body.appendChild(script);
}, [open]);

const headerStyles = css`
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -96,6 +133,15 @@ function HomepageTitle(){
}
`

const dialogStyles = css`
/* display: flex; */
width: 500px;
@media screen and (max-width: 992px) {
display: flex;
width: unset;
}
`


return(
<div css={headerStyles}>
Expand All @@ -114,11 +160,26 @@ function HomepageTitle(){
Get Started
</Link>
<Link
onClick={handleOpen}
className="button button--secondary button--lg"
to='#script-container'>
Contact Us
</Link>
</div>
<Dialog open={open} onClose={handleClose}>
{/* <DialogTitle>Dialog Title</DialogTitle> */}
<DialogContent css={dialogStyles}>
<DialogContentText>
{loading ? <CircularProgress /> : <div id='script-container'>
</div>}
</DialogContentText>
</DialogContent>
<DialogActions>
{/* <Link onClick={handleClose} className="button button--secondary button--lg">
Close
</Link> */}
</DialogActions>
</Dialog>
</div>
);
}
Expand Down Expand Up @@ -189,23 +250,7 @@ function HomepageAnnoucement(){


export default function Home() {
useEffect(() => {
const script = document.createElement('script');
script.charset = 'utf-8';
script.type = 'text/javascript';
script.src = '//js.hsforms.net/forms/embed/v2.js';

script.onload = () => {
hbspt.forms.create({
region: 'na1',
portalId: '14494994',
formId: '3ba0ef89-b572-4fa5-833c-4f63f25586d0',
target: `#script-container`,
});
};

document.body.appendChild(script);
}, []);

const mainStyles = css`
display: flex;
Expand All @@ -222,8 +267,6 @@ export default function Home() {
<HomepageTitle />
{/* <HomepageAnnoucement /> */}
<HomepageSection />
<div id='script-container'>
</div>
</div>
</Layout>
);
Expand Down
Binary file modified static/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion static/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/logo_OLD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions static/img/logo_OLD.svg
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 edc7752

Please sign in to comment.