diff --git a/build.py b/build.py old mode 100755 new mode 100644 index 7fffff5..f383ded --- a/build.py +++ b/build.py @@ -1,48 +1,66 @@ #!/usr/bin/env python3 import os from io import TextIOWrapper +import shutil import sys +import re NAVBAR_FMT = ''' ''' +NAVBAR_LINES = NAVBAR_FMT.split('\n') SELECT_FMT = ' <' -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() diff --git a/includes/footer.html b/includes/footer.html index 7ad85e7..7351d0b 100644 --- a/includes/footer.html +++ b/includes/footer.html @@ -1,5 +1,5 @@ -

Hand written by Aaron Cook +

+ Website source, all hand written, available - - + here.

diff --git a/includes/header.html b/includes/header.html index f1ee96e..afd2533 100644 --- a/includes/header.html +++ b/includes/header.html @@ -1,2 +1 @@ - - \ No newline at end of file + diff --git a/includes/titlebar.html b/includes/titlebar.html index 51b6436..6db7355 100644 --- a/includes/titlebar.html +++ b/includes/titlebar.html @@ -1 +1 @@ -

Aaron G.C. Personal Website

\ No newline at end of file +

Aaron Cook's Content Cavern

diff --git a/src/about.html b/src/about.html index bda6349..bb143fe 100644 --- a/src/about.html +++ b/src/about.html @@ -15,7 +15,48 @@
-

Site currently under construction.

+
+
+

+ I am an embedded firmware developer and hobbyist based out of + Minneapolis. I am actively engaged in the fighting game and furry + communities. +

+

+ Generally, each year I attend the + Furry Migration + and + Fursquared + furry conventions, as well as the annual MN fighting game tournament + Midwest Mixfest. + Feel free to say hi if you see me there! +

+ +

Development profiles:

+ + +

Social media profiles:

+ +
+
+

Sonas

+ +

Aaron - Red Wolf

+ +

Mim - Mouse

+
+
@@ -24,4 +65,4 @@ - \ No newline at end of file + diff --git a/src/blog/2026-11-23.html b/src/blog/2026-11-23.html new file mode 100644 index 0000000..4885bc4 --- /dev/null +++ b/src/blog/2026-11-23.html @@ -0,0 +1,26 @@ + + +
+ {{header.html}} +
+ + +
+ {{titlebar.html}} +
+ +
+ + +
+

...TODO...

+
+
+ + + + diff --git a/src/index.html b/src/index.html index a62e6fb..b70bafb 100644 --- a/src/index.html +++ b/src/index.html @@ -14,8 +14,18 @@ {{NAVBAR}} -
-

Site currently under construction.

+
+

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

+

+ The website is primarily hosted at + aarongc.com with a mirror located at + lab.aarongc.com. It contains no + JavaScript and has no external dependencies. +

diff --git a/src/main.css b/src/main.css index cd70c27..3b3ec06 100644 --- a/src/main.css +++ b/src/main.css @@ -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); -} diff --git a/src/media/mim_web.jpg b/src/media/mim_web.jpg new file mode 100644 index 0000000..20934f6 Binary files /dev/null and b/src/media/mim_web.jpg differ diff --git a/src/media/pfp_web.jpg b/src/media/pfp_web.jpg new file mode 100644 index 0000000..8493401 Binary files /dev/null and b/src/media/pfp_web.jpg differ