Skip to content

Commit

Permalink
Updated components/pages to use the new Picture component
Browse files Browse the repository at this point in the history
  • Loading branch information
anti-mony committed Oct 20, 2020
1 parent 715abfd commit 193c57c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 38 deletions.
25 changes: 13 additions & 12 deletions frontend/components/footer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box, Typography } from "@material-ui/core";
import Picture from "./picture";

const Footer = () => {
const style = {
Expand All @@ -22,25 +23,25 @@ const Footer = () => {
p={4}
>
<a href="http://miccom-center.org/" target="_blank" rel="noopener">
<img
src="/images/MICCoMLogo.webp"
<Picture
imgSrc="/images/MICCoMLogo"
imgAlt="Miccom Logo"
height="48px"
alt="Miccom Logo"
></img>
/>
</a>
<a href="https://www.anl.gov/" target="_blank" rel="noopener">
<img
src="/images/ArgonneLogo.webp"
<Picture
imgSrc="/images/ArgonneLogo"
imgAlt="Miccom Logo"
height="48px"
alt="Argonne National Lab Logo"
></img>
/>
</a>
<a href="https://www.uchicago.edu/" target="_blank" rel="noopener">
<img
src="/images/UchicagoLogo.webp"
<Picture
imgSrc="/images/UchicagoLogo"
imgAlt="Miccom Logo"
height="48px"
alt="University of Chicago Logo"
></img>
/>
</a>
</Box>
<Box
Expand Down
11 changes: 7 additions & 4 deletions frontend/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import StyledButton, {
InternalStyledButton,
ExternalStyledButton,
} from "./button";

import Picture from "./picture";

import Link from "next/link";

const Header = () => {
Expand Down Expand Up @@ -74,11 +77,11 @@ const Header = () => {
<Box display="flex" alignItems="center" flexGrow={1}>
<Link href="/">
<Button>
<img
src="/images/Qresp-logo.png"
<Picture
imgSrc="/images/qrespLogo"
imgAlt="Qresp Logo"
height="64px"
alt="Qresp Logo"
></img>
/>
</Button>
</Link>
</Box>
Expand Down
32 changes: 10 additions & 22 deletions frontend/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Fragment } from "react";
import { InternalStyledButton } from "../components/button";
import SEO from "../components/seo";
import Picture from "../components/picture";
import { Box, Typography, Container } from "@material-ui/core";

export default function Home() {
Expand All @@ -23,12 +24,17 @@ export default function Home() {
maxHeight: "48vh",
}}
>
<img
src="/images/qrespPoster.webp"
<Picture
imgSrc="/images/qrespPoster"
imgAlt="Qresp Banner Blurred Background"
width="100%"
className="blur"
></img>
<img src="/images/qrespPoster.webp" className="poster"></img>
/>
<Picture
imgSrc="/images/qrespPoster"
imgAlt="Qresp Banner"
className="poster"
/>
</div>
<Box display="flex" m={3} alignItems="center" justifyContent="center">
<Container>
Expand Down Expand Up @@ -56,24 +62,6 @@ export default function Home() {
</Container>
</Box>
</Box>
<style jsx>
{`
.poster {
object-fit: scale-down;
position: absolute;
left: 50%;
transform: translate(-50%);
min-height: 48vmin;
max-width: 125vmin;
}
.blur {
overflow: hidden;
height: 48vmin;
filter: blur(10px);
}
`}
</style>
</Fragment>
);
}

0 comments on commit 193c57c

Please sign in to comment.