From 113e8433e4b511e6f32091349b7ddccdc3718181 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sun, 28 Apr 2024 22:43:10 +0100 Subject: Source commit --- src/global.d.ts | 7 ++ src/images/banner_pattern.svg | 1 + src/images/icon.png | Bin 11189 -> 3621 bytes src/images/logo.png | Bin 0 -> 65293 bytes src/images/logo.svg | 179 ++++++++++++++++++++++++++++++++++++++++ src/layout/page.tsx | 80 ++++++++++++++++++ src/pages/404.tsx | 64 ++++++--------- src/pages/index.tsx | 187 ++---------------------------------------- 8 files changed, 297 insertions(+), 221 deletions(-) create mode 100644 src/global.d.ts create mode 100644 src/images/banner_pattern.svg create mode 100644 src/images/logo.png create mode 100644 src/images/logo.svg create mode 100644 src/layout/page.tsx diff --git a/src/global.d.ts b/src/global.d.ts new file mode 100644 index 0000000..ee6b267 --- /dev/null +++ b/src/global.d.ts @@ -0,0 +1,7 @@ +declare module "*.png" { + export default "" as string; +} + +declare module "*.svg" { + export default "" as string; +} diff --git a/src/images/banner_pattern.svg b/src/images/banner_pattern.svg new file mode 100644 index 0000000..6b4609b --- /dev/null +++ b/src/images/banner_pattern.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/images/icon.png b/src/images/icon.png index 38b2fb0..35ae5a5 100644 Binary files a/src/images/icon.png and b/src/images/icon.png differ diff --git a/src/images/logo.png b/src/images/logo.png new file mode 100644 index 0000000..8985a81 Binary files /dev/null and b/src/images/logo.png differ diff --git a/src/images/logo.svg b/src/images/logo.svg new file mode 100644 index 0000000..78a9051 --- /dev/null +++ b/src/images/logo.svg @@ -0,0 +1,179 @@ + + + + +DevOps開発者!無政府状態 + + diff --git a/src/layout/page.tsx b/src/layout/page.tsx new file mode 100644 index 0000000..c133462 --- /dev/null +++ b/src/layout/page.tsx @@ -0,0 +1,80 @@ +import * as React from "react"; +import styled, { createGlobalStyle } from "styled-components"; + +import logo from "../images/logo.svg"; +import logoPng from "../images/logo.png"; + +import tile from "../images/banner_pattern.svg"; + +const GlobalStyle = createGlobalStyle` + body { + margin: 0; + padding: 0; + background: url(${tile}); + background-size: 128px; + font-family: 'Titillium Web', Arial, sans-serif; + margin-left: 5vw; + margin-right: 5vw; + color: #fff; + } +`; + +const CenterImage = styled.img` + display: block; + margin: 0 auto; + margin-top: 50px; + width: 70%; + height: auto; + max-width: 600px; +` + +const Header = styled.h1` + font-size: 3em; + margin: 0; +` + +const SubHeader = styled.h2` +margin: 0; +` + +const HeaderDiv = styled.div` + margin-bottom: 20px; +` + +type PageLayoutProps = { + children: React.ReactNode; + header?: string; + subheader?: string; +} + +const PageLayout: React.FC = ({ children, header, subheader }) => { + return ( + <> + +
+ + + {header &&
{header}
} + {subheader && {subheader}} +
+ {children} +
+ + ); +} + +export default PageLayout; + +export const generateHeader = (title: string, description: string) => { + return () => <> + {title} • PyDis Ops + + + + + + + + ; +} + diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 972f139..7dcd580 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,49 +1,33 @@ import * as React from "react" -import { Link, HeadFC, PageProps } from "gatsby" +import type { HeadFC, PageProps } from "gatsby" -const pageStyles = { - color: "#232129", - padding: "96px", - fontFamily: "-apple-system, Roboto, sans-serif, serif", -} -const headingStyles = { - marginTop: 0, - marginBottom: 64, - maxWidth: 320, -} +import logo from "../images/logo.svg"; +import PageLayout, { generateHeader } from "../layout/page"; +import styled from "styled-components"; -const paragraphStyles = { - marginBottom: 48, -} -const codeStyles = { - color: "#8A6534", - padding: 4, - backgroundColor: "#FFF4DB", - fontSize: "1.25rem", - borderRadius: 4, -} +const CenterImage = styled.img` + display: block; + margin: 0 auto; + margin-top: 50px; + width: 70%; + height: auto; + max-width: 600px; +` -const NotFoundPage: React.FC = () => { +const NotFound: React.FC = () => { return ( -
-

Page not found

-

- Sorry 😔, we couldn’t find what you were looking for. -
- {process.env.NODE_ENV === "development" ? ( - <> -
- Try creating a page in src/pages/. -
- - ) : null} -
- Go home. -

-
+ +
+ +
+

404: Not Found

+

The page you are looking for does not exist.

+
+
+
) } -export default NotFoundPage +export default NotFound -export const Head: HeadFC = () => Not found +export const Head: HeadFC = generateHeader("Not Found", "Page could not be found."); diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 2da81b8..db1eba2 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,193 +1,18 @@ import * as React from "react" import type { HeadFC, PageProps } from "gatsby" -const pageStyles = { - color: "#232129", - padding: 96, - fontFamily: "-apple-system, Roboto, sans-serif, serif", -} -const headingStyles = { - marginTop: 0, - marginBottom: 64, - maxWidth: 320, -} -const headingAccentStyles = { - color: "#663399", -} -const paragraphStyles = { - marginBottom: 48, -} -const codeStyles = { - color: "#8A6534", - padding: 4, - backgroundColor: "#FFF4DB", - fontSize: "1.25rem", - borderRadius: 4, -} -const listStyles = { - marginBottom: 96, - paddingLeft: 0, -} -const doclistStyles = { - paddingLeft: 0, -} -const listItemStyles = { - fontWeight: 300, - fontSize: 24, - maxWidth: 560, - marginBottom: 30, -} - -const linkStyle = { - color: "#8954A8", - fontWeight: "bold", - fontSize: 16, - verticalAlign: "5%", -} - -const docLinkStyle = { - ...linkStyle, - listStyleType: "none", - display: `inline-block`, - marginBottom: 24, - marginRight: 12, -} - -const descriptionStyle = { - color: "#232129", - fontSize: 14, - marginTop: 10, - marginBottom: 0, - lineHeight: 1.25, -} - -const docLinks = [ - { - text: "TypeScript Documentation", - url: "https://www.gatsbyjs.com/docs/how-to/custom-configuration/typescript/", - color: "#8954A8", - }, - { - text: "GraphQL Typegen Documentation", - url: "https://www.gatsbyjs.com/docs/how-to/local-development/graphql-typegen/", - color: "#8954A8", - } -] - -const badgeStyle = { - color: "#fff", - backgroundColor: "#088413", - border: "1px solid #088413", - fontSize: 11, - fontWeight: "bold", - letterSpacing: 1, - borderRadius: 4, - padding: "4px 6px", - display: "inline-block", - position: "relative" as "relative", - top: -2, - marginLeft: 10, - lineHeight: 1, -} +import PageLayout, { generateHeader } from "../layout/page"; -const links = [ - { - text: "Tutorial", - url: "https://www.gatsbyjs.com/docs/tutorial/getting-started/", - 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.", - color: "#E95800", - }, - { - text: "How to Guides", - url: "https://www.gatsbyjs.com/docs/how-to/", - description: - "Practical step-by-step guides to help you achieve a specific goal. Most useful when you're trying to get something done.", - color: "#1099A8", - }, - { - text: "Reference Guides", - url: "https://www.gatsbyjs.com/docs/reference/", - description: - "Nitty-gritty technical descriptions of how Gatsby works. Most useful when you need detailed information about Gatsby's APIs.", - color: "#BC027F", - }, - { - text: "Conceptual Guides", - url: "https://www.gatsbyjs.com/docs/conceptual/", - description: - "Big-picture explanations of higher-level Gatsby concepts. Most useful for building understanding of a particular topic.", - color: "#0D96F2", - }, - { - text: "Plugin Library", - url: "https://www.gatsbyjs.com/plugins", - description: - "Add functionality and customize your Gatsby site or app with thousands of plugins built by our amazing developer community.", - color: "#8EB814", - }, - { - text: "Build and Host", - url: "https://www.gatsbyjs.com/cloud", - badge: true, - description: - "Now you’re ready to show the world! Give your Gatsby site superpowers: Build and host on Gatsby Cloud. Get started for free!", - color: "#663399", - }, -] const IndexPage: React.FC = () => { return ( -
-

- Congratulations -
- — you just made a Gatsby site! 🎉🎉🎉 -

-

- Edit src/pages/index.tsx to see this page - update in real-time. 😎 -

- -
    - {links.map(link => ( -
  • - - - {link.text} - - {link.badge && ( - - NEW! - - )} -

    {link.description}

    -
    -
  • - ))} -
- Gatsby G Logo -
+ +
+
+
) } export default IndexPage -export const Head: HeadFC = () => Home Page +export const Head: HeadFC = generateHeader("PyDis Ops", "Internal services for Python Discord."); -- cgit v1.2.3