Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI fixes #356

Merged
merged 19 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ REACT_APP_GOOGLE_CLIENT_ID=
REACT_APP_ORCID_URL=
REACT_APP_ORCID_CLIENT_ID=
REACT_APP_ORCID_CLIENT_SECRET=
REACT_APP_SERVER_URL=
REACT_APP_SERVER_URL=
REACT_APP_BCOAPI_TOKEN=
14 changes: 14 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"focus-trap-react": "^10.2.3",
"formik": "^2.2.9",
"jslint": "^0.12.1",
"jwt-decode": "^4.0.0",
"object-hash": "^3.0.0",
"react": "^17.0.2",
"react-bootstrap": "^2.7.2",
Expand Down
14 changes: 12 additions & 2 deletions client/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@


/* about pages */
.about-main {
margin: 2%;
}

.member-image {
width: 150px;
height: 150px;
Expand Down Expand Up @@ -97,7 +101,6 @@
text-decoration: none;
color: white;
background-color: primary;

}

.hover-background {
Expand Down Expand Up @@ -286,7 +289,7 @@
}

.home-linkcard {
min-height: 470px;
min-height: 350px;
min-width: 275;
text-align: center;
margin-top: 5;
Expand Down Expand Up @@ -323,6 +326,10 @@
font-weight: bold !important;
}

.resources-citation {
text-align: left;
}

.resources-linkcard {
min-height: auto;
text-align: center;
Expand Down Expand Up @@ -366,6 +373,9 @@
color: var(--main-red-color) !important;
}

.table-card {
padding: 2%;
}

/* text field */
.large_textfield {
Expand Down
4 changes: 3 additions & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ function initializeReactGA() {
page: global.window.location.pathname,
});

// Load the script with a version in the query string
const script = global.document.createElement("script");
script.src = `https://www.google-analytics.com/ga.js?v=${version}`;
script.async = true;
global.document.head.appendChild(script);
}



function App() {

initializeReactGA();
return (
<BrowserRouter>
Expand Down
35 changes: 35 additions & 0 deletions client/src/components/FullWidthBox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// src/views/home/HomeView/FdaBox.js

import React from "react";
import {
Box,
Card,
CardActionArea,
CardContent,
Typography
} from "@mui/material";

export default function FullWidthBox({link, title, content, image, imageAlt, cssClass}) {

const handleClickOpen = () => {
if (link !== "") {
global.window.open(link)
}
};

return (
<Card className="home-notice">
<Box className={cssClass}>
<CardActionArea onClick={handleClickOpen}>
<CardContent >
<Typography className="home-intro-title">
{title}
</Typography>
{image && <img src={image} height={100} alt={imageAlt} />}
<Typography >{content}</Typography>
</CardContent>
</CardActionArea>
</Box>
</Card>
);
}
44 changes: 44 additions & 0 deletions client/src/components/ThirdBox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// src/views/home/HomeView/BcoDb.js

import React from "react";
import {
Card,
CardActionArea,
CardContent,
Typography
} from "@mui/material";
import { Link } from "react-router-dom"

export default function ThirdBox({link, title, content, image, imageAlt, cssClass}) {
const styling = cssClass

return (
<Card className="home-linkcard" elevation={1}>
{link && link.includes("https://") ?(
<CardActionArea onClick={() => global.window.open(link)}>
<CardContent>
<Typography className="home-intro-title">
{title}
<br />
{image && <img src={image} height={100} alt={imageAlt} />}
<br />
</Typography>
<Typography className={styling}>{content}</Typography>
</CardContent>
</CardActionArea>
) : (
<CardActionArea className="home-linkcard" component={Link} to={link}>
<CardContent>
<Typography className="home-intro-title">
{title}
<br />
{image && <img src={image} height={100} alt={imageAlt} />}
<br />
</Typography>
<Typography className={styling}>{content}</Typography>
</CardContent>
</CardActionArea>
)}
</Card>
);
}
32 changes: 0 additions & 32 deletions client/src/components/about/About.js

This file was deleted.

32 changes: 0 additions & 32 deletions client/src/components/about/BCOnexus.js

This file was deleted.

48 changes: 0 additions & 48 deletions client/src/components/about/HorizontalHeading.js

This file was deleted.

24 changes: 0 additions & 24 deletions client/src/components/about/MeetOurTeam.js

This file was deleted.

Loading
Loading