Add content for about and home page

Additionally added build script support for a blog page, and removed the
external dependency on NerdFont CSS.
This commit is contained in:
Aaron Cook 2026-11-23 01:38:31 -06:00
commit 949dfa14bb
10 changed files with 202 additions and 50 deletions

94
build.py Executable file → Normal file
View file

@ -1,48 +1,66 @@
#!/usr/bin/env python3
import os
from io import TextIOWrapper
import shutil
import sys
import re
NAVBAR_FMT = '''
<ul>
<li><a href="index.html">
<li><a href="/index.html">
Home{}
</a></li>
<li><a href="projects.html">
<li><a href="/projects.html">
Projects{}
</a></li>
<li><a href="about.html">
<details BLOG_OPEN>
<summary>Ramblings</summary>
<ul>
<li><a href="/blog/2026-11-23.html">
2026-11-22{}
</a></li>
</ul>
</details>
<li><a href="/about.html">
About & Contact{}
</a></li>
</ul>
'''
NAVBAR_LINES = NAVBAR_FMT.split('\n')
SELECT_FMT = ' &lt;'
current_source = ''
def token_to_str(token: str) -> str:
global current_source
def token_to_str(token: str, current_source: str) -> str:
if token == 'NAVBAR':
home_str = ''
projects_str = ''
about_str = ''
fmt_strs = []
href_re = re.compile('href\\="(.+)"')
current_href = ''
if current_source == 'index.html':
home_str = SELECT_FMT
elif current_source == 'projects.html':
projects_str = SELECT_FMT
elif current_source == 'about.html':
about_str = SELECT_FMT
for line in NAVBAR_LINES:
m = href_re.search(line)
if m is not None:
current_href = m.group(1)
return NAVBAR_FMT.format(home_str, projects_str, about_str)
if '{}' in line:
if (f'src{current_href}' == current_source):
fmt_strs.append(SELECT_FMT)
else:
fmt_strs.append('')
if current_source.startswith('src/blog'):
navbar_fmt = NAVBAR_FMT.replace('BLOG_OPEN', 'open')
else:
navbar_fmt = NAVBAR_FMT.replace('BLOG_OPEN', '')
print(fmt_strs)
return navbar_fmt.format(*fmt_strs)
elif token.endswith('.html'):
return open('includes/' + token).read()
else:
return '{{' + token + '}}'
def replace_line(line: str) -> (str, int):
def replace_line(line: str, current_source: str) -> (str, int):
ret = ''
count = 0
@ -53,7 +71,7 @@ def replace_line(line: str) -> (str, int):
if replacing:
if line[i:i+2] == r'}}':
replacing = False
ret += token_to_str(token)
ret += token_to_str(token, current_source)
i += 2
token = ''
count += 1
@ -74,7 +92,7 @@ def replace_line(line: str) -> (str, int):
return (ret, count)
def stream_template(in_fd: TextIOWrapper, out_fd: TextIOWrapper) -> int:
def stream_template(in_fd: TextIOWrapper, out_fd: TextIOWrapper, current_source: str) -> int:
replacements = 0
while True:
@ -82,31 +100,43 @@ def stream_template(in_fd: TextIOWrapper, out_fd: TextIOWrapper) -> int:
if line == '':
break
new_line, count = replace_line(line)
new_line, count = replace_line(line, current_source)
out_fd.write(new_line)
replacements += count
return replacements
def main():
global current_source
def source_dir_to_output(source_dir: str, output_dir: str):
sources = os.listdir(source_dir)
if not os.path.isdir(output_dir):
os.mkdir(output_dir)
for source in sources:
source_full = f'{source_dir}/{source}'
output_full = f'{output_dir}/{source}'
if os.path.isdir(source_full):
source_dir_to_output(source_full, output_full)
continue
if source_full.endswith('.html'):
in_fd = open(source_full, 'r')
out_fd = open(output_full, 'w')
stream_template(in_fd, out_fd, source_full)
else:
shutil.copy(source_full, output_full)
def main():
print(NAVBAR_FMT)
includes = os.listdir('includes')
sources = os.listdir('src')
print(includes)
print(sources)
if not os.path.isdir('public'):
os.mkdir('public')
for source in sources:
current_source = source
in_fd = open('src/' + source, 'r')
out_fd = open('public/' + source, 'w')
stream_template(in_fd, out_fd)
source_dir_to_output('src', 'public')
if __name__ == '__main__':
main()

View file

@ -1,5 +1,5 @@
<p>Hand written by Aaron Cook
<p>
Website source, all hand written, available
<a href="https://lab.aarongc.com/forge/cook/aarongc.com" target="_blank" rel="noopener noreferrer">
<i class="nf nf-dev-forgejo"></i>
</a>
here</a>.
</p>

View file

@ -1,2 +1 @@
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="https://www.nerdfonts.com/assets/css/webfont.css">
<link rel="stylesheet" href="/main.css">

View file

@ -1 +1 @@
<h1>Aaron G.C. Personal Website</h1>
<h1>Aaron Cook's Content Cavern</h1>

View file

@ -15,7 +15,48 @@
</div>
<div class="page">
<p>Site currently under construction.</p>
<div class="w-75 horizontal">
<div>
<p>
I am an embedded firmware developer and hobbyist based out of
Minneapolis. I am actively engaged in the fighting game and furry
communities.
</p>
<p>
Generally, each year I attend the
<a href="https://www.furrymigration.org/" target="_blank" rel="noopener noreferrer">Furry Migration</a>
and
<a href="https://fursquared.com/" target="_blank" rel="noopener noreferrer">Fursquared</a>
furry conventions, as well as the annual MN fighting game tournament
<a href="https://www.runthemix.com/mixfest" target="_blank" rel="noopener noreferrer">Midwest Mixfest</a>.
Feel free to say hi if you see me there!
</p>
<p>Development profiles:</p>
<ul>
<li>Personal Forgejo: <a href="https://lab.aarongc.com/forge/cook" target="_blank" rel="noopener noreferrer">cook</a></li>
<li>Codeberg: <a href="https://codeberg.org/agcook" target="_blank" rel="noopener noreferrer">agcook</a></li>
<li>GitLab: <a href="https://gitlab.com/CookenMonster" target="_blank" rel="noopener noreferrer">CookenMonster</a></li>
<li>GitHub: <a href="https://github.com/cookthebook" target="_blank" rel="noopener noreferrer">cookthebook</a></li>
</ul>
<p>Social media profiles:</p>
<ul>
<li>Bluesky: <a href="https://bsky.app/profile/cookenmonster.bsky.social" target="_blank" rel="noopener noreferrer">@cookenmonster.bsky.social</a></li>
<li>Twitter: <a href="https://twitter.com/cooknmonster" target="_blank" rel="noopener noreferrer">@cooknmonster</a></li>
<li>Matrix: @cook:aarongc.com</li>
<li>Telegram: @cookenmonster</li>
<li>Discord: cookenmonster</li>
</ul>
</div>
<div style="text-align: center;">
<h2>Sonas</h2>
<img src="/media/pfp_web.jpg" class="pfp-image border-aqua" />
<p>Aaron - Red Wolf</p>
<img src="/media/mim_web.jpg" class="pfp-image border-orange" />
<p>Mim - Mouse</p>
</div>
</div>
</div>
</div>
@ -24,4 +65,4 @@
</div>
</body>
</html>
</html>

26
src/blog/2026-11-23.html Normal file
View file

@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<header>
{{header.html}}
</header>
<body>
<div class="titlebar">
{{titlebar.html}}
</div>
<div class="content">
<div class="navbar">
{{NAVBAR}}
</div>
<div class="page">
<p>...TODO...</p>
</div>
</div>
<div class="footer">
{{footer.html}}
</div>
</body>
</html>

View file

@ -14,8 +14,18 @@
{{NAVBAR}}
</div>
<div class="page">
<p>Site currently under construction.</p>
<div class="page w-50">
<p>
Welcome to my personal website and corner of the internet. Here you will
find static content for anything I wish to share with the surfers of the
world wide web. All content can be navigated to via the sidebar.
</p>
<p>
The website is primarily hosted at
<a href="https://aarongc.com">aarongc.com</a> with a mirror located at
<a href="https://lab.aarongc.com">lab.aarongc.com</a>. It contains no
JavaScript and has no external dependencies.
</p>
</div>
</div>

View file

@ -18,7 +18,7 @@
--aqua: #679d6a;
--aqua-light: #8ec07c;
--orange: #d65d0e;
--orange-light: fe8019;
--orange-light: #fe8019;
}
body {
@ -79,11 +79,62 @@ a:visited {
color: var(--green);
}
.navbar details summary {
list-style-type: none;
&::before {
content: "+ "
}
[open] &::before {
content: "- "
}
}
.navbar details li a {
&::before {
content: "> "
}
}
/**** Page ****/
.page {
margin: auto;
padding: 1rem;
max-width: 75%;
}
.horizontal {
height: 100%;
width: 100%;
display: flex;
}
.w-25 { max-width: 25%; width: 25%; }
.w-50 { max-width: 50%; width: 50%; }
.w-75 { max-width: 75%; width: 75%; }
.w-33 { max-width: 33.33%; width: 33.33%; }
.w-67 { max-width: 66.67%; width: 66.67%; }
.w-100 { max-width: 100%; width: 100%; }
.pfp-image {
margin: auto;
border-radius: 50%;
display: flex;
max-width: 10rem;
margin: 1rem;
}
.border-aqua {
border: 0.2rem solid var(--aqua-light);
}
.border-orange {
border: 0.2rem solid var(--orange-light);
}
.link-newtab {
target: "_blank";
rel: "noopener noreferrer";
}
@ -92,8 +143,3 @@ a:visited {
.footer {
text-align: center;
}
.footer a {
text-decoration: none;
color: var(--orange);
}

BIN
src/media/mim_web.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
src/media/pfp_web.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB