Skip to content

Commit

Permalink
background
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Weisberg committed Dec 2, 2022
1 parent c1ec297 commit 41b6b1c
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 137 deletions.
2 changes: 1 addition & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
// https://css-tricks.com/meta-theme-color-and-trickery/
// theme_color: `#663399`,
display: `minimal-ui`,
icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
icon: `src/images/dp-icon.svg`, // This path is relative to the root of the site.
},
},
],
Expand Down
90 changes: 90 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"prop-types": "^15.8.1",
"react": "^18.1.0",
"react-bootstrap": "^2.6.0",
"react-dom": "^18.1.0"
"react-dom": "^18.1.0",
"styled-components": "^5.3.6"
},
"devDependencies": {
"prettier": "^2.7.1"
Expand Down
24 changes: 24 additions & 0 deletions src/components/background.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as React from "react"
import s from "styled-components"

const Hero = s.div`
text-align: center;
color: white;
padding-top: 3rem;
padding-bottom: 1rem;
width: 100vw;
animation: animateBg 5s linear infinite;
background-image: linear-gradient(0deg,#fb7264,#19bafd,#fb7264,#19bafd);
background-size: 100% 300%;
@keyframes animateBg {
0% { background-position: 0% 0%; }
100% { background-position: 0% 100%; }
}
`

const Background = () => {
return <Hero></Hero>
}

export default Background
9 changes: 1 addition & 8 deletions src/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ const Header = ({ siteTitle }) => {
Explore
</Offcanvas.Title>
</Offcanvas.Header>
<Offcanvas.Body>
Under construction
{/* <Nav className="justify-content-end flex-grow-1 pe-3">
{otherPubs.map(p => (
<Nav.Link>{p}</Nav.Link>
))}
</Nav> */}
</Offcanvas.Body>
<Offcanvas.Body>Under construction</Offcanvas.Body>
</Navbar.Offcanvas>
</Container>
</Navbar>
Expand Down
14 changes: 1 addition & 13 deletions src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,13 @@ const Layout = ({ children }) => {

return (
<>
<Header siteTitle={data.site.siteMetadata?.title || `Title`} />
<Header siteTitle={"DP Crosswords"} />
<div
style={{
margin: `0 auto`,
maxWidth: `var(--size-content)`,
padding: `var(--size-gutter)`,
}}
>
<main>{children}</main>
<footer
style={{
marginTop: `var(--space-5)`,
fontSize: `var(--font-sm)`,
}}
>
© {new Date().getFullYear()} &middot; Built with
{` `}
<a href="https://www.gatsbyjs.com">Gatsby</a>
</footer>
</div>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Seo({ description, title, children }) {

return (
<>
<title>{defaultTitle ? `${title} | ${defaultTitle}` : title}</title>
<title>{`${title}`}</title>
<meta name="description" content={metaDescription} />
<meta property="og:title" content={title} />
<meta property="og:description" content={metaDescription} />
Expand Down
116 changes: 3 additions & 113 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,124 +5,14 @@ import { StaticImage } from "gatsby-plugin-image"
import Layout from "../components/layout"
import Seo from "../components/seo"
import * as styles from "../components/index.module.css"

const links = [
{
text: "Tutorial",
url: "https://www.gatsbyjs.com/docs/tutorial",
description:
"A great place to get started if you're new to web development. Designed to guide you through setting up your first Gatsby site.",
},
{
text: "Examples",
url: "https://github.com/gatsbyjs/gatsby/tree/master/examples",
description:
"A collection of websites ranging from very basic to complex/complete that illustrate how to accomplish specific tasks within your Gatsby sites.",
},
{
text: "Plugin Library",
url: "https://www.gatsbyjs.com/plugins",
description:
"Learn how to add functionality and customize your Gatsby site or app with thousands of plugins built by our amazing developer community.",
},
{
text: "Build and Host",
url: "https://www.gatsbyjs.com/cloud",
description:
"Now you’re ready to show the world! Give your Gatsby site superpowers: Build and host on Gatsby Cloud. Get started for free!",
},
]

const samplePageLinks = [
{
text: "Page 2",
url: "page-2",
badge: false,
description:
"A simple example of linking to another page within a Gatsby site",
},
{ text: "TypeScript", url: "using-typescript" },
{ text: "Server Side Rendering", url: "using-ssr" },
{ text: "Deferred Static Generation", url: "using-dsg" },
]

const moreLinks = [
{ text: "Join us on Discord", url: "https://gatsby.dev/discord" },
{
text: "Documentation",
url: "https://gatsbyjs.com/docs/",
},
{
text: "Starters",
url: "https://gatsbyjs.com/starters/",
},
{
text: "Showcase",
url: "https://gatsbyjs.com/showcase/",
},
{
text: "Contributing",
url: "https://www.gatsbyjs.com/contributing/",
},
{ text: "Issues", url: "https://github.com/gatsbyjs/gatsby/issues" },
]

const utmParameters = `?utm_source=starter&utm_medium=start-page&utm_campaign=default-starter`
import Background from "../components/background"

const IndexPage = () => (
<Layout>
<div className={styles.textCenter}>
<StaticImage
src="../images/example.png"
loading="eager"
width={64}
quality={95}
formats={["auto", "webp", "avif"]}
alt=""
style={{ marginBottom: `var(--space-3)` }}
/>
<h1>
Welcome to <b>Gatsby!</b>
</h1>
<p className={styles.intro}>
<b>Example pages:</b>{" "}
{samplePageLinks.map((link, i) => (
<React.Fragment key={link.url}>
<Link to={link.url}>{link.text}</Link>
{i !== samplePageLinks.length - 1 && <> · </>}
</React.Fragment>
))}
<br />
Edit <code>src/pages/index.js</code> to update this page.
</p>
</div>
<ul className={styles.list}>
{links.map(link => (
<li key={link.url} className={styles.listItem}>
<a
className={styles.listItemLink}
href={`${link.url}${utmParameters}`}
>
{link.text}
</a>
<p className={styles.listItemDescription}>{link.description}</p>
</li>
))}
</ul>
{moreLinks.map((link, i) => (
<React.Fragment key={link.url}>
<a href={`${link.url}${utmParameters}`}>{link.text}</a>
{i !== moreLinks.length - 1 && <> · </>}
</React.Fragment>
))}
<Background />
</Layout>
)

/**
* Head export to define metadata for the page
*
* See: https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-head/
*/
export const Head = () => <Seo title="Home" />
export const Head = () => <Seo title="DP Crosswords" />

export default IndexPage

0 comments on commit 41b6b1c

Please sign in to comment.