1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
|
import React from "react";
import styled from "styled-components";
import { StaticImage } from "gatsby-plugin-image";
import "../styles/main.css";
import { FaGithub, FaMastodon } from "react-icons/fa";
const TIMESTAMP = "1668805149";
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 dateArr = [
date.getUTCFullYear(),
date.getUTCMonth(),
date.getUTCDate(),
date.getUTCHours(),
date.getUTCMinutes(),
];
return dateArr.map(toShort).join(".") + "-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 = (): React.ReactElement => {
return (
<main>
<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 site was recently rebuilt using 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">
<FaMastodon size={20} style={{ marginBottom: "-4px" }} />{" "}
@kjhoerr@cybr.es
</a>
</div>
<div className="link">
<a href="https://github.com/kjhoerr">
<FaGithub size={20} style={{ marginBottom: "-4px" }} /> My git
projects
</a>
</div>
</div>
</div>
<div id="meta">
<span>
©2022 kjhoerr@https://submelon.dev/:
{getTimestamp(parseInt(TIMESTAMP))}
</span>
</div>
</StyledContainer>
</main>
);
};
export default IndexPage;
export { Head } from "../components/SEO";
|