From d4f172ed203e6f3f6d1143f49c304cea8d45170e Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Thu, 22 Apr 2021 01:39:47 -0400 Subject: Changes --- src/components/SEO.tsx | 76 ++++++++++++++++++ src/images/favicon-70x70.png | Bin 0 -> 10940 bytes src/images/icon.png | Bin 11189 -> 0 bytes src/images/main.png | Bin 0 -> 75449 bytes src/pages/404.js | 54 ------------- src/pages/404.tsx | 54 +++++++++++++ src/pages/index.js | 184 ------------------------------------------- src/pages/index.tsx | 149 +++++++++++++++++++++++++++++++++++ src/styles/main.css | 93 ++++++++++++++++++++++ 9 files changed, 372 insertions(+), 238 deletions(-) create mode 100644 src/components/SEO.tsx create mode 100644 src/images/favicon-70x70.png delete mode 100644 src/images/icon.png create mode 100644 src/images/main.png delete mode 100644 src/pages/404.js create mode 100644 src/pages/404.tsx delete mode 100644 src/pages/index.js create mode 100644 src/pages/index.tsx create mode 100644 src/styles/main.css (limited to 'src') diff --git a/src/components/SEO.tsx b/src/components/SEO.tsx new file mode 100644 index 0000000..ce86222 --- /dev/null +++ b/src/components/SEO.tsx @@ -0,0 +1,76 @@ +import React from "react" +import PropTypes from "prop-types" +import { Helmet } from "react-helmet" +import { useStaticQuery, graphql } from "gatsby" + +function SEO({ description, lang, meta, title }) { + const { site } = useStaticQuery( + graphql` + query { + site { + siteMetadata { + title + description + author + } + } + } + ` + ) + const metaDescription = description || site.siteMetadata.description + return ( + + ) +} +SEO.defaultProps = { + lang: `en`, + meta: [], + description: ``, +} +SEO.propTypes = { + description: PropTypes.string, + lang: PropTypes.string, + meta: PropTypes.arrayOf(PropTypes.object), + title: PropTypes.string.isRequired, +} +export default SEO \ No newline at end of file diff --git a/src/images/favicon-70x70.png b/src/images/favicon-70x70.png new file mode 100644 index 0000000..4d68d0f Binary files /dev/null and b/src/images/favicon-70x70.png differ diff --git a/src/images/icon.png b/src/images/icon.png deleted file mode 100644 index 38b2fb0..0000000 Binary files a/src/images/icon.png and /dev/null differ diff --git a/src/images/main.png b/src/images/main.png new file mode 100644 index 0000000..a8557c9 Binary files /dev/null and b/src/images/main.png differ diff --git a/src/pages/404.js b/src/pages/404.js deleted file mode 100644 index 053ae0e..0000000 --- a/src/pages/404.js +++ /dev/null @@ -1,54 +0,0 @@ -import * as React from "react" -import { Link } from "gatsby" - -// styles -const pageStyles = { - color: "#232129", - padding: "96px", - fontFamily: "-apple-system, Roboto, sans-serif, serif", -} -const headingStyles = { - marginTop: 0, - marginBottom: 64, - maxWidth: 320, -} - -const paragraphStyles = { - marginBottom: 48, -} -const codeStyles = { - color: "#8A6534", - padding: 4, - backgroundColor: "#FFF4DB", - fontSize: "1.25rem", - borderRadius: 4, -} - -// markup -const NotFoundPage = () => { - return ( -
- Not found -

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. -

-
- ) -} - -export default NotFoundPage diff --git a/src/pages/404.tsx b/src/pages/404.tsx new file mode 100644 index 0000000..053ae0e --- /dev/null +++ b/src/pages/404.tsx @@ -0,0 +1,54 @@ +import * as React from "react" +import { Link } from "gatsby" + +// styles +const pageStyles = { + color: "#232129", + padding: "96px", + fontFamily: "-apple-system, Roboto, sans-serif, serif", +} +const headingStyles = { + marginTop: 0, + marginBottom: 64, + maxWidth: 320, +} + +const paragraphStyles = { + marginBottom: 48, +} +const codeStyles = { + color: "#8A6534", + padding: 4, + backgroundColor: "#FFF4DB", + fontSize: "1.25rem", + borderRadius: 4, +} + +// markup +const NotFoundPage = () => { + return ( +
+ Not found +

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. +

+
+ ) +} + +export default NotFoundPage diff --git a/src/pages/index.js b/src/pages/index.js deleted file mode 100644 index dbc0fb9..0000000 --- a/src/pages/index.js +++ /dev/null @@ -1,184 +0,0 @@ -import * as React from "react" - -// styles -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 listItemStyles = { - fontWeight: 300, - fontSize: 24, - maxWidth: 560, - marginBottom: 30, -} - -const linkStyle = { - color: "#8954A8", - fontWeight: "bold", - fontSize: 16, - verticalAlign: "5%", -} - -const docLinkStyle = { - ...linkStyle, - listStyleType: "none", - marginBottom: 24, -} - -const descriptionStyle = { - color: "#232129", - fontSize: 14, - marginTop: 10, - marginBottom: 0, - lineHeight: 1.25, -} - -const docLink = { - text: "Documentation", - url: "https://www.gatsbyjs.com/docs/", - 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", - top: -2, - marginLeft: 10, - lineHeight: 1, -} - -// data -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.", - 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", - }, -] - -// markup -const IndexPage = () => { - return ( -
- Home Page -

- Congratulations -
- โ€” you just made a Gatsby site! - - ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰ - -

-

- Edit src/pages/index.js to see this page - update in real-time.{" "} - - ๐Ÿ˜Ž - -

- - Gatsby G Logo -
- ) -} - -export default IndexPage diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..884f829 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,149 @@ +import React from "react"; +import styled from "styled-components"; +import { StaticImage } from "gatsby-plugin-image"; +import SEO from "../components/SEO"; +import "../styles/main.css"; + +const SHORT_CHARS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; + +function toShort (valu: number): string { + return valu.toString().match(/.{1,2}/g).map((s) => SHORT_CHARS[parseInt(s)]).join(""); +} + +function getTimestamp (seconds: number): string { + const date = new Date(seconds * 1000); + const year = date.getFullYear(); + const month = date.getMonth(); + const day = date.getDate(); + const hour = date.getHours(); + const minute = date.getMinutes(); + return toShort(year)+'.'+toShort(month)+'.'+toShort(day)+'.'+toShort(hour)+'.'+toShort(minute)+"-0"; +} + +// styles +const StyledContainer = styled.div` +div#content { + width: 350px; + margin: 0px auto; + margin-bottom: 120px; + padding-top: 136px; +} +div#header { + text-align: center; + pointer-events: none; + user-select: none; +} +div#tagline { + background-color: #000; + width: 100%; + text-align: center; + color: #fff; + font-size: 36px; + font-weight: bold; +} +div#info { + padding: 4px 8px; +} +div#info a, div#info a:visited, div#info a:hover { + text-decoration: none; + color: #000; + padding: 1px 3px; +} +div#info a, div#info a:visited { + background-color: #e1e1e1; +} +div#info a:hover { + background-color: #d5d5d5; +} +div#info,div.link { + background-color: #fff; + border: 1px #000 solid; + border-left: 3px #000 solid; + border-right: 3px #000 solid; +} +div.link, div#tagline { + margin-top: 3px; +} +div.link > a, div.link > a:visited, div.link > a:active { + padding: 8px; + width: 328px; + display: block; + text-align: center; + text-decoration: none; + color: #666; +} +div.link:hover { + background-color: #ddd; + color: #222; +} +div.link:last-child, div.link:last-child > a { + border-bottom-left-radius: 18px; + border-bottom-right-radius: 18px; +} +q, p, em { + display: block; + text-indent: 28px; +} + +p { + margin: 0px 0px 16px; +} + +div#meta { + width: 100%; + position: fixed; + left: 0px; + bottom: 0px; + text-align: center; + font-size: 12px; +} +div#meta > span { + background-color: #e1e1e1; +} +`; + +// markup +const IndexPage = () => { + return ( +
+ + + +
+ +
Hello!
+
+

I'm a computer science and math graduate from Millersville University. I work as an IT consultant and specialize in development operations and systems validation for web applications.

+

My most recent projects have been focused on full-stack development. I use Kubernetes for orchestration, NextJS for front-end, and rust+actix-web for my backend services with GraphQL serving as the public API.

+

This was recently rebuilt in GatsbyJS since the instance formerly holding this website broke during upgrades. Thank goodness for backups.

+ - Kevin H. +
+ +
+ +
©2021 kjhoerr@//submelon.tech/:{getTimestamp(parseInt(process.env.GATSBY_TIMESTAMP))}
+
+
+ ); +}; + +export default IndexPage; diff --git a/src/styles/main.css b/src/styles/main.css new file mode 100644 index 0000000..fc55a61 --- /dev/null +++ b/src/styles/main.css @@ -0,0 +1,93 @@ +/** https://submelon.tech/res/css/main.css + * Main stylesheet for submelon.tech website. + * Author: Kevin J Hoerr + */ +body { + background-color: #e1e1e1; /* #e1e1e1, #d5d5d5 */ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAGXpUWHRUaXRsZQAACNdLSkzOTi/KL81LAQAWSwQhPQTyzQAAABt6VFh0QXV0aG9yAAAI1/NOLcvMU/DITy0qAgAYDwQeUS3vvwAAAZNJREFUeNrt3bFtQ0EMREH5x+q/M3Wi3IJaMGR7yHtbwCWDBY4J+fV4PL5vH879fr9tz/P5/JV3rzAcjI+DhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhAGBhDHglxXG/+RdjisMB2N1QyZirAWZirESZDLGOpDpGKtANmCsAdmCsQJkE8Z4kG0Yo0E2YowF2YoxEmQzxjiQ7RijQE7AGANyCsYIkJMweJDTMGiQEzFYkFMxSJCTMTiQ0zEokDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAgkDAGTuph/E3e5bjCcDBGNOS03fRXGA4GDXLq1YYrDAeDBDn9nskVhoNBgYQBgYQBgYQBgYQBgYQBgYQBgYQBgYQBgYQBgYQBgYQBgYQBgYTxs7wA+yQwVSKvoHMAAAAASUVORK5CYII=); + background-repeat: repeat; + font-family: Verdana; + font-size: 16px; +} +::selection { + background-color: #999; + color: #fff; +} +div#content { + width: 350px; + margin: 0px auto; + margin-bottom: 120px; + padding-top: 136px; +} +div#header { + text-align: center; + pointer-events: none; + user-select: none; +} +div#tagline { + background-color: #000; + width: 100%; + text-align: center; + color: #fff; + font-size: 36px; + font-weight: bold; +} +div#info { + padding: 4px 8px; +} +div#info a, div#info a:visited, div#info a:hover { + text-decoration: none; + color: #000; + padding: 1px 3px; +} +div#info a, div#info a:visited { + background-color: #e1e1e1; +} +div#info a:hover { + background-color: #d5d5d5; +} +div#info,div.link { + background-color: #fff; + border: 1px #000 solid; + border-left: 3px #000 solid; + border-right: 3px #000 solid; +} +div.link, div#tagline { + margin-top: 3px; +} +div.link > a, div.link > a:visited, div.link > a:active { + padding: 8px; + width: 328px; + display: block; + text-align: center; + text-decoration: none; + color: #666; +} +div.link:hover { + background-color: #ddd; + color: #222; +} +div.link:last-child, div.link:last-child > a { + border-bottom-left-radius: 18px; + border-bottom-right-radius: 18px; +} +q, p, em { + display: block; + text-indent: 28px; +} + +p { + margin: 0px 0px 16px; +} + +div#meta { + width: 100%; + position: fixed; + left: 0px; + bottom: 0px; + text-align: center; + font-size: 12px; +} +div#meta > span { + background-color: #e1e1e1; +} -- cgit