aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pages
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@protonmail.com>2021-04-22 01:39:47 -0400
committerKevin J Hoerr <kjhoerr@protonmail.com>2021-04-22 01:39:47 -0400
commitd4f172ed203e6f3f6d1143f49c304cea8d45170e (patch)
tree2d1d611052df544df9603d2ebd9f17905a90ebea /src/pages
parent9bfb5ce80ce8b5c2e7821b7ebea28a5f35848135 (diff)
downloadsubmelon.dev-d4f172ed203e6f3f6d1143f49c304cea8d45170e.tar.gz
submelon.dev-d4f172ed203e6f3f6d1143f49c304cea8d45170e.tar.bz2
submelon.dev-d4f172ed203e6f3f6d1143f49c304cea8d45170e.zip
Changes
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/404.tsx (renamed from src/pages/404.js)0
-rw-r--r--src/pages/index.js184
-rw-r--r--src/pages/index.tsx149
3 files changed, 149 insertions, 184 deletions
diff --git a/src/pages/404.js b/src/pages/404.tsx
index 053ae0e..053ae0e 100644
--- a/src/pages/404.js
+++ b/src/pages/404.tsx
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 (
- <main style={pageStyles}>
- <title>Home Page</title>
- <h1 style={headingStyles}>
- Congratulations
- <br />
- <span style={headingAccentStyles}>β€” you just made a Gatsby site! </span>
- <span role="img" aria-label="Party popper emojis">
- πŸŽ‰πŸŽ‰πŸŽ‰
- </span>
- </h1>
- <p style={paragraphStyles}>
- Edit <code style={codeStyles}>src/pages/index.js</code> to see this page
- update in real-time.{" "}
- <span role="img" aria-label="Sunglasses smiley emoji">
- 😎
- </span>
- </p>
- <ul style={listStyles}>
- <li style={docLinkStyle}>
- <a
- style={linkStyle}
- href={`${docLink.url}?utm_source=starter&utm_medium=start-page&utm_campaign=minimal-starter`}
- >
- {docLink.text}
- </a>
- </li>
- {links.map(link => (
- <li key={link.url} style={{ ...listItemStyles, color: link.color }}>
- <span>
- <a
- style={linkStyle}
- href={`${link.url}?utm_source=starter&utm_medium=start-page&utm_campaign=minimal-starter`}
- >
- {link.text}
- </a>
- {link.badge && (
- <span style={badgeStyle} aria-label="New Badge">
- NEW!
- </span>
- )}
- <p style={descriptionStyle}>{link.description}</p>
- </span>
- </li>
- ))}
- </ul>
- <img
- alt="Gatsby G Logo"
- src="data:image/svg+xml,%3Csvg width='24' height='24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 110 20 10 10 0 010-20zm0 2c-3.73 0-6.86 2.55-7.75 6L14 19.75c3.45-.89 6-4.02 6-7.75h-5.25v1.5h3.45a6.37 6.37 0 01-3.89 4.44L6.06 9.69C7 7.31 9.3 5.63 12 5.63c2.13 0 4 1.04 5.18 2.65l1.23-1.06A7.959 7.959 0 0012 4zm-8 8a8 8 0 008 8c.04 0 .09 0-8-8z' fill='%23639'/%3E%3C/svg%3E"
- />
- </main>
- )
-}
-
-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 (
+ <main>
+ <SEO title="Kevin J Hoerr <kjhoerr@submelon.tech>" />
+ <StyledContainer>
+
+ <div id="content">
+ <div id="header">
+ <StaticImage
+ src="../images/main.png"
+ alt="Kevin J Hoerr"
+ placeholder="blurred"
+ layout="fixed"
+ width={340}
+ height={340}
+ />
+ </div>
+ <div id="tagline">Hello!</div>
+ <div id="info">
+ <p>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.</p>
+ <p>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.</p>
+ <p>This was recently rebuilt in GatsbyJS since the instance formerly holding this website broke during upgrades. Thank goodness for backups.</p>
+ <em>- Kevin H.</em>
+ </div>
+ <div id="links">
+ <div className="link">
+ <a href="https://cybr.es/@kjhoerr" rel="me">Mastodon: @kjhoerr@cybr.es</a>
+ </div>
+ <div className="link">
+ <a href="https://order.blackrockbrews.com">Black Rock Brewing (recent project)</a>
+ </div>
+ <div className="link">
+ <a href="https://git.submelon.dev">My Gitea instance for pet projects</a>
+ </div>
+ </div>
+ </div>
+
+ <div id="meta"><span>&copy;2021 kjhoerr@//submelon.tech/:{getTimestamp(parseInt(process.env.GATSBY_TIMESTAMP))}</span></div>
+ </StyledContainer>
+ </main>
+ );
+};
+
+export default IndexPage;