From 5a1448872cc5eb2878e7d104eb4e7686fea684ed Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Tue, 26 Nov 2024 17:23:45 -0500 Subject: [PATCH] WIP --- _headers | 1 - _redirects | 1 - content/photography/2017-06-21-old-quebec.md | 8 -- .../2017-06-21-stormy-quebec-street.md | 8 -- .../2017-06-22-montmorency-falls.md | 8 -- .../2017-08-04-rocky-shore-halifax.md | 8 -- .../photography/2019-08-04-halifax-port.md | 10 -- .../photography/2019-08-09-jacobs-ladder.md | 10 -- content/photography/2020-07-19-my-desk.md | 8 -- content/photography/2020-07-23-two-cars.md | 10 -- .../2020-07-24-above-the-thames.md | 10 -- .../2022-01-18-snow-day-in-space.md | 8 -- content/photography/2022-03-06-icy-shore.md | 10 -- content/photography/_index.md | 6 -- content/privacy/_index.md | 8 -- content/privacy/applications/slice.md | 5 - scripts/find_external_assets.py | 37 -------- scripts/fix_md_file_aliases.py | 66 ------------- src/404.html | 10 ++ src/_layouts/default.html | 38 +++++++- src/_sass/default.scss | 89 ++++++++++++++++++ .../assets/profile-photos}/2017/128x128.jpg | Bin .../assets/profile-photos}/2019/977x977.jpeg | Bin .../assets/profile-photos}/2021/460x460.png | Bin .../assets/profile-photos}/2022/1023x1023.png | Bin .../assets/profile-photos}/2022/1823x1823.png | Bin .../assets/profile-photos}/2022/460x460.png | Bin .../assets/profile-photos}/2022/460x460.webp | Bin src/blog.html | 8 ++ src/index.md | 2 +- 30 files changed, 145 insertions(+), 224 deletions(-) delete mode 120000 _headers delete mode 120000 _redirects delete mode 100644 content/photography/2017-06-21-old-quebec.md delete mode 100644 content/photography/2017-06-21-stormy-quebec-street.md delete mode 100644 content/photography/2017-06-22-montmorency-falls.md delete mode 100644 content/photography/2017-08-04-rocky-shore-halifax.md delete mode 100644 content/photography/2019-08-04-halifax-port.md delete mode 100644 content/photography/2019-08-09-jacobs-ladder.md delete mode 100644 content/photography/2020-07-19-my-desk.md delete mode 100644 content/photography/2020-07-23-two-cars.md delete mode 100644 content/photography/2020-07-24-above-the-thames.md delete mode 100644 content/photography/2022-01-18-snow-day-in-space.md delete mode 100644 content/photography/2022-03-06-icy-shore.md delete mode 100644 content/photography/_index.md delete mode 100644 content/privacy/_index.md delete mode 100644 content/privacy/applications/slice.md delete mode 100644 scripts/find_external_assets.py delete mode 100644 scripts/fix_md_file_aliases.py create mode 100644 src/404.html rename {static/images/pfp => src/assets/profile-photos}/2017/128x128.jpg (100%) rename {static/images/pfp => src/assets/profile-photos}/2019/977x977.jpeg (100%) rename {static/images/pfp => src/assets/profile-photos}/2021/460x460.png (100%) rename {static/images/pfp => src/assets/profile-photos}/2022/1023x1023.png (100%) rename {static/images/pfp => src/assets/profile-photos}/2022/1823x1823.png (100%) rename {static/images/pfp => src/assets/profile-photos}/2022/460x460.png (100%) rename {static/images/pfp => src/assets/profile-photos}/2022/460x460.webp (100%) create mode 100644 src/blog.html diff --git a/_headers b/_headers deleted file mode 120000 index c73f6b0..0000000 --- a/_headers +++ /dev/null @@ -1 +0,0 @@ -./static/_headers \ No newline at end of file diff --git a/_redirects b/_redirects deleted file mode 120000 index 12b15c0..0000000 --- a/_redirects +++ /dev/null @@ -1 +0,0 @@ -./static/_redirects \ No newline at end of file diff --git a/content/photography/2017-06-21-old-quebec.md b/content/photography/2017-06-21-old-quebec.md deleted file mode 100644 index 11fe3be..0000000 --- a/content/photography/2017-06-21-old-quebec.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Old Quebec -date: 2017-06-21 -extra: - cover_image: /photos/2017-06-21-old-quebec.preview.jpeg ---- - -![Old Quebec](/photos/2017-06-21-old-quebec.jpeg) diff --git a/content/photography/2017-06-21-stormy-quebec-street.md b/content/photography/2017-06-21-stormy-quebec-street.md deleted file mode 100644 index f4690ee..0000000 --- a/content/photography/2017-06-21-stormy-quebec-street.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Stormy Street in Quebec -date: 2017-06-21 -extra: - cover_image: /photos/2017-06-21-stormy-quebec-street.preview.jpeg ---- - -![Stormy Street in Quebec](/photos/2017-06-21-stormy-quebec-street.jpeg) diff --git a/content/photography/2017-06-22-montmorency-falls.md b/content/photography/2017-06-22-montmorency-falls.md deleted file mode 100644 index 9369336..0000000 --- a/content/photography/2017-06-22-montmorency-falls.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Montmorency Falls -date: 2017-06-22 -extra: - cover_image: /photos/2017-06-22-montmorency-falls.preview.jpeg ---- - -![Montmorency Falls](/photos/2017-06-22-montmorency-falls.jpeg) diff --git a/content/photography/2017-08-04-rocky-shore-halifax.md b/content/photography/2017-08-04-rocky-shore-halifax.md deleted file mode 100644 index e147efd..0000000 --- a/content/photography/2017-08-04-rocky-shore-halifax.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Rocky Shore -date: 2017-08-04 -extra: - cover_image: /photos/2017-08-04-rocky-shore-halifax.preview.jpeg ---- - -![Rocky Shore](/photos/2017-08-04-rocky-shore-halifax.jpeg) diff --git a/content/photography/2019-08-04-halifax-port.md b/content/photography/2019-08-04-halifax-port.md deleted file mode 100644 index 796cd0d..0000000 --- a/content/photography/2019-08-04-halifax-port.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Halifax Port -date: 2019-08-04 -extra: - cover_image: /photos/2019-08-04-halifax-port.preview.jpeg ---- - -![Halifax Port](/photos/2019-08-04-halifax-port.jpeg) - -*Shot at [PSA International](https://www.globalpsa.com/)'s Halifax port.* diff --git a/content/photography/2019-08-09-jacobs-ladder.md b/content/photography/2019-08-09-jacobs-ladder.md deleted file mode 100644 index df2b668..0000000 --- a/content/photography/2019-08-09-jacobs-ladder.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Jacob's Ladder -date: 2019-08-09 -extra: - cover_image: /photos/2019-08-09-jacobs-ladder.preview.jpeg ---- - -![Jacob's Ladder](/photos/2019-08-09-jacobs-ladder.jpeg) - -*Shot at Jacob's Ladder, a stairway in Victoria Park, Truro, Nova Scotia.* diff --git a/content/photography/2020-07-19-my-desk.md b/content/photography/2020-07-19-my-desk.md deleted file mode 100644 index a9e5c56..0000000 --- a/content/photography/2020-07-19-my-desk.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: My Desk -date: 2020-07-19 -extra: - cover_image: /photos/2020-07-19-my-desk.preview.png ---- - -![My Desk](/photos/2020-07-19-my-desk.png) diff --git a/content/photography/2020-07-23-two-cars.md b/content/photography/2020-07-23-two-cars.md deleted file mode 100644 index 3e026ae..0000000 --- a/content/photography/2020-07-23-two-cars.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Two Cars -date: 2020-07-23 -extra: - cover_image: /photos/2020-07-23-two-cars.preview.png ---- - -![Two Cars](/photos/2020-07-23-two-cars.png) - -*Two Cars* was shot from a few hundred feet in the air on a DJI Mavic Mini. \ No newline at end of file diff --git a/content/photography/2020-07-24-above-the-thames.md b/content/photography/2020-07-24-above-the-thames.md deleted file mode 100644 index 4cbea9a..0000000 --- a/content/photography/2020-07-24-above-the-thames.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Above the Thames -date: 2020-07-24 -extra: - cover_image: /photos/2020-07-24-above-the-thames.preview.jpg ---- - -![Above the Thames](/photos/2020-07-24-above-the-thames.jpg) - -Looking down at the Thames River in the heart of London, Ontario. diff --git a/content/photography/2022-01-18-snow-day-in-space.md b/content/photography/2022-01-18-snow-day-in-space.md deleted file mode 100644 index 0d21be3..0000000 --- a/content/photography/2022-01-18-snow-day-in-space.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Snow Day in Space -date: 2022-01-18 -extra: - cover_image: /photos/2022-01-18-snow-day-in-space.preview.jpg ---- - -![Snow Day in Space](/photos/2022-01-18-snow-day-in-space.jpg) diff --git a/content/photography/2022-03-06-icy-shore.md b/content/photography/2022-03-06-icy-shore.md deleted file mode 100644 index 8dea18d..0000000 --- a/content/photography/2022-03-06-icy-shore.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Icy Shore -date: 2022-03-06 -extra: - cover_image: /photos/2022-03-06-icy-shore.preview.jpg ---- - -![Icy Shore](/photos/2022-03-06-icy-shore.jpg) - -Shot at Sixteen Mile Creek in Oakville, Ontario. \ No newline at end of file diff --git a/content/photography/_index.md b/content/photography/_index.md deleted file mode 100644 index 50ff35d..0000000 --- a/content/photography/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Photography -sort_by: date -template: "photo-timeline.html" ---- - diff --git a/content/privacy/_index.md b/content/privacy/_index.md deleted file mode 100644 index 8c01cf8..0000000 --- a/content/privacy/_index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Privacy Policies ---- - -The following documents define the privacy policies for various things I've made: - -- Applications - - [Slice](/privacy/applications/slice) (WearOS watch face) diff --git a/content/privacy/applications/slice.md b/content/privacy/applications/slice.md deleted file mode 100644 index a9412f1..0000000 --- a/content/privacy/applications/slice.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Slice Privacy Policy ---- - -The "Slice" watch face for WearOS does not intentionally collect any data. It does not connect to the internet, and it does not use any third-party services. diff --git a/scripts/find_external_assets.py b/scripts/find_external_assets.py deleted file mode 100644 index 84401b2..0000000 --- a/scripts/find_external_assets.py +++ /dev/null @@ -1,37 +0,0 @@ -import re -from pathlib import Path - -REPO_ROOT = Path(__file__).parent.parent - -# Find all MD and HTML files -md_files = list(REPO_ROOT.rglob("*.md")) -html_files = list(REPO_ROOT.rglob("*.html")) - -# Ignore any files in the `public` directory -md_files = [f for f in md_files if "public" not in f.parts] -html_files = [f for f in html_files if "public" not in f.parts] - -# Result storage -external_assets = set() - -# Find Markdown images -for file in md_files: - body = file.read_text() - for match in re.finditer(r"!\[.*?\]\((.*?)\)", body): - link = match.group(1) - if link.startswith("http"): - external_assets.add((file, link)) - -# Search HTML -for file in html_files: - body = file.read_text() - for match in re.finditer(r'src="(.*?)"', body): - link = match.group(1) - if link.startswith("http"): - external_assets.add((file, link)) - -# Print all external assets -for file_path, link in external_assets: - # Strip the prefix off the file path - file_path = file_path.relative_to(REPO_ROOT) - print(f"{file_path}:\t{link}") \ No newline at end of file diff --git a/scripts/fix_md_file_aliases.py b/scripts/fix_md_file_aliases.py deleted file mode 100644 index b08eea1..0000000 --- a/scripts/fix_md_file_aliases.py +++ /dev/null @@ -1,66 +0,0 @@ -import argparse -import sys -import re -import frontmatter -import yaml -from pathlib import Path - -BLOG_POST_RE = re.compile(r"^\d{4}-\d+-\d+-(.*)\.md$") - - -def main() -> int: - # Handle program arguments - ap = argparse.ArgumentParser( - description="Fixes the `aliases` field in the front matter of markdown files" - ) - ap.add_argument( - "--root", - type=Path, - default=Path(__file__).parent.parent / "content" / "blog", - help="The root directory to search for markdown files", - ) - args = ap.parse_args() - - # Find all markdown files - md_files = list(args.root.glob("**/*.md")) - print(f"Found {len(md_files)} markdown files") - - # Handle each file - for file in md_files: - print(f"Processing: {file}") - - # Determine what the alias path should be - title_matches = BLOG_POST_RE.match(file.name) - if not title_matches: - print("Skipping file, not a blog post") - continue - - title = title_matches.group(1) - correct_alias = f"/blog/{title.lower()}" - print("Correct alias:", correct_alias) - - # Load and parse the frontmatter - post = frontmatter.load(file) - - # Get the list of aliases - aliases = post.metadata.get("aliases", []) - - # If the alias is already correct, skip it - if correct_alias in aliases: - print("Found correct alias") - continue - - # Otherwise, add the correct alias - aliases.append(correct_alias) - - # Write out the new frontmatter - post.metadata["aliases"] = aliases - file_contents = frontmatter.dumps(post, sort_keys=False) - file_contents += "\n" - file.write_text(file_contents) - - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/src/404.html b/src/404.html new file mode 100644 index 0000000..969c978 --- /dev/null +++ b/src/404.html @@ -0,0 +1,10 @@ +--- +layout: default +title: Not Found +permalink: /404.html +--- + +

Not Found

+

+ The page you were looking for was not found. +

\ No newline at end of file diff --git a/src/_layouts/default.html b/src/_layouts/default.html index 77bd4f4..f58d366 100644 --- a/src/_layouts/default.html +++ b/src/_layouts/default.html @@ -15,7 +15,43 @@
- +
+ A photo of Evan Pratten +
+ Evan Pratten +
+ +
+
+
{{ content }} diff --git a/src/_sass/default.scss b/src/_sass/default.scss index 86f4133..bd3dc68 100644 --- a/src/_sass/default.scss +++ b/src/_sass/default.scss @@ -13,10 +13,99 @@ body { // Default background color background-color: #f0f0f0; + // Remove all link decoration + a { + text-decoration: none; + color: blue; + } + header { + font-family: "IBM Plex Serif", serif; + + .title-card { + margin: 1em; + display: flex; + flex-direction: row; + justify-content: center; + + img { + width: 90px; + height: 90px; + } + div { + margin-left: 1em; + height: max-content; + .name { + margin: 0; + font-size: 2rem; + font-weight: 700; + margin-bottom: 0.5rem; + } + hr { + margin: 0; + } + ul { + padding: 0; + margin: 0; + li { + list-style: none; + a { + display: flex; + flex-direction: row; + align-items: center; + + svg { + display: inline-block; + margin-right: 1px; + height: 1em; + width: 1em; + filter: invert(9%) sepia(97%) saturate(6581%) hue-rotate(247deg) + brightness(94%) contrast(144%); + } + } + } + } + } + } + nav { + ul { + padding: 0; + margin: 0; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + li { + list-style-type: none; + font-weight: 500; + &:not(:first-child)::before { + content: " ยท "; + margin-left: 0.25em; + } + } + } + } } main { + h1, + h2, + h3, + h4, + h5, + h6 { + font-family: "IBM Plex Serif", serif; + border-bottom: 1px solid #d7dde3; + padding-bottom: 0.3em; + } + + p { + margin-top: 0; + margin-bottom: 16px; + padding: 0 0.25em; + font-size: 1.25rem; + } + img { border-radius: 5px; } diff --git a/static/images/pfp/2017/128x128.jpg b/src/assets/profile-photos/2017/128x128.jpg similarity index 100% rename from static/images/pfp/2017/128x128.jpg rename to src/assets/profile-photos/2017/128x128.jpg diff --git a/static/images/pfp/2019/977x977.jpeg b/src/assets/profile-photos/2019/977x977.jpeg similarity index 100% rename from static/images/pfp/2019/977x977.jpeg rename to src/assets/profile-photos/2019/977x977.jpeg diff --git a/static/images/pfp/2021/460x460.png b/src/assets/profile-photos/2021/460x460.png similarity index 100% rename from static/images/pfp/2021/460x460.png rename to src/assets/profile-photos/2021/460x460.png diff --git a/static/images/pfp/2022/1023x1023.png b/src/assets/profile-photos/2022/1023x1023.png similarity index 100% rename from static/images/pfp/2022/1023x1023.png rename to src/assets/profile-photos/2022/1023x1023.png diff --git a/static/images/pfp/2022/1823x1823.png b/src/assets/profile-photos/2022/1823x1823.png similarity index 100% rename from static/images/pfp/2022/1823x1823.png rename to src/assets/profile-photos/2022/1823x1823.png diff --git a/static/images/pfp/2022/460x460.png b/src/assets/profile-photos/2022/460x460.png similarity index 100% rename from static/images/pfp/2022/460x460.png rename to src/assets/profile-photos/2022/460x460.png diff --git a/static/images/pfp/2022/460x460.webp b/src/assets/profile-photos/2022/460x460.webp similarity index 100% rename from static/images/pfp/2022/460x460.webp rename to src/assets/profile-photos/2022/460x460.webp diff --git a/src/blog.html b/src/blog.html new file mode 100644 index 0000000..7a5e13b --- /dev/null +++ b/src/blog.html @@ -0,0 +1,8 @@ +--- +layout: default +title: Blog +--- + +{% for post in site.posts %} + {{post}} +{% endfor %} diff --git a/src/index.md b/src/index.md index edc7abd..cd04319 100644 --- a/src/index.md +++ b/src/index.md @@ -22,4 +22,4 @@ I am currently: Some of the more notable things I've worked on in the past are: - The animated TV series [PAW Patrol](https://www.imdb.com/title/tt3121722/) and [Daniel Spellbound](https://www.imdb.com/title/tt13983670/) -- A [fleet of robots](/robotics/5024) at Raider Robotics +- A [fleet of robots](/robotics/5024) at Raider Robotics test