diff --git a/src/routes/generic.py b/src/routes/generic.py index 5785e27..e737f1a 100644 --- a/src/routes/generic.py +++ b/src/routes/generic.py @@ -1,5 +1,5 @@ # Imports -from flask import Blueprint, render_template, request, abort, send_from_directory +from flask import Blueprint, render_template, request, abort, send_from_directory, send_file from os import getenv as env import logging @@ -23,22 +23,31 @@ def index(): return render_template('index.html') -# Route for robots.txt, sitemap.xml, and favicon.ico -@bp.route('/robots.txt') -@bp.route('/sitemap.xml') +# Route for favicon @bp.route('/favicon.ico') -def web_stuffs(): - return send_from_directory( - env('STATIC_FOLDER', default='../static'), - request.path.lstrip('/') - ) +def favicon(): + return send_file('../static/content/other/favicon.ico') -# catch-all route for any other static pages (only in root path) -@bp.route('/') -def static_files(filename): +# Route for robots.txt +@bp.route('/robots.txt') +def robots(): + return send_file('../static/content/other/robots.txt') + + +# Route for sitemap.xml +@bp.route('/sitemap.xml') +def sitemap(): + return send_file('../static/content/other/sitemap.xml') + + +# Catch-all route for generic pages +@bp.route('/') +def catch_all(filename): + # try to find template in the pages directory and add .html extension + if not filename.endswith('.html'): + filename += '.html' try: - return render_template(filename if filename.endswith('.html') else filename + '.html') + return render_template(f'pages/{filename}') except Exception as e: - log.error(f"Error serving static file {filename}: {e}") - abort(404) \ No newline at end of file + abort(404, f"Template '{filename}' not found: {e}") \ No newline at end of file diff --git a/static/content/Irken-Like-AllCaps.woff b/static/content/fonts/Irken-Like-AllCaps.woff similarity index 100% rename from static/content/Irken-Like-AllCaps.woff rename to static/content/fonts/Irken-Like-AllCaps.woff diff --git a/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_141943558.jpg b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_141943558.jpg new file mode 100644 index 0000000..0d80717 Binary files /dev/null and b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_141943558.jpg differ diff --git a/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_150138054.jpg b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_150138054.jpg new file mode 100644 index 0000000..a621983 Binary files /dev/null and b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_150138054.jpg differ diff --git a/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_150249916.jpg b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_150249916.jpg new file mode 100644 index 0000000..ed2da3b Binary files /dev/null and b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_150249916.jpg differ diff --git a/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_183614897.jpg b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_183614897.jpg new file mode 100644 index 0000000..7694d3f Binary files /dev/null and b/static/content/fur_meets/03-08-2025_paws_n_pistons/PXL_20250803_183614897.jpg differ diff --git a/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_152110445.jpg b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_152110445.jpg new file mode 100644 index 0000000..bd8eb15 Binary files /dev/null and b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_152110445.jpg differ diff --git a/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155134418.jpg b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155134418.jpg new file mode 100644 index 0000000..5c956c7 Binary files /dev/null and b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155134418.jpg differ diff --git a/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155226274.jpg b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155226274.jpg new file mode 100644 index 0000000..92ee64f Binary files /dev/null and b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155226274.jpg differ diff --git a/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155434701.jpg b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155434701.jpg new file mode 100644 index 0000000..ca9c9e8 Binary files /dev/null and b/static/content/fur_meets/26-08-2025_critters_mk/PXL_20250726_155434701.jpg differ diff --git a/static/content/background.png b/static/content/general_images/background.png similarity index 100% rename from static/content/background.png rename to static/content/general_images/background.png diff --git a/static/content/haj.gif b/static/content/general_images/haj.gif similarity index 100% rename from static/content/haj.gif rename to static/content/general_images/haj.gif diff --git a/static/content/icon.webp b/static/content/general_images/icon.webp similarity index 100% rename from static/content/icon.webp rename to static/content/general_images/icon.webp diff --git a/static/content/buttons.txt b/static/content/other/buttons.txt similarity index 100% rename from static/content/buttons.txt rename to static/content/other/buttons.txt diff --git a/static/favicon.ico b/static/content/other/favicon.ico similarity index 100% rename from static/favicon.ico rename to static/content/other/favicon.ico diff --git a/static/robots.txt b/static/content/other/robots.txt similarity index 100% rename from static/robots.txt rename to static/content/other/robots.txt diff --git a/static/sitemap.xml b/static/content/other/sitemap.xml similarity index 100% rename from static/sitemap.xml rename to static/content/other/sitemap.xml diff --git a/static/content/Toaster_v1.0_Dark.png b/static/content/toaster/Toaster_v1.0_Dark.png similarity index 100% rename from static/content/Toaster_v1.0_Dark.png rename to static/content/toaster/Toaster_v1.0_Dark.png diff --git a/static/css/base.css b/static/css/base.css index 6bfbf8d..f731444 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -1,7 +1,7 @@ @import url('https://fonts.googleapis.com/css2?family=Fredoka:wdth,wght@125,700&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap'); @font-face { font-family:"Irken"; - src:url("/static/content/Irken-Like-AllCaps.woff") format("woff"); + src:url("/static/content/fonts/Irken-Like-AllCaps.woff") format("woff"); font-weight:normal; font-style:normal; } @@ -227,7 +227,7 @@ main section a { right: 0; bottom: 0; opacity: 0.1; - background-image: url('/static/content/background.png'); + background-image: url('/static/content/general_images/background.png'); background-repeat: no-repeat; background-position: 50% 0; background-size: cover; diff --git a/static/css/toaster.css b/static/css/toaster.css index 3863cdc..e6ab74d 100644 --- a/static/css/toaster.css +++ b/static/css/toaster.css @@ -34,6 +34,35 @@ ul#toaster-specs li { height: 100%; } +.fur-meet-gallery-small { + display: flex; + flex-wrap: wrap; + gap: 5px; +} + +.fur-meet-gallery-small img { + width: 150px; + height: 150px; + object-fit: cover; + border-radius: 10px; + border: 2px solid var(--secondary-background-color); +} + +.fur-meet-gallery-small img:hover { + transform: scale(1.05); + transition: transform 0.2s ease-in-out; + cursor: pointer; +} + +#fur-meets { + list-style: none; + padding: 0; + margin: 10px; + display: flex; + flex-direction: column; + gap: 10px; +} + @media screen and (max-width: 740px) { .flex-row { flex-direction: column; diff --git a/static/js/base.js b/static/js/base.js index 925c73e..0945281 100644 --- a/static/js/base.js +++ b/static/js/base.js @@ -118,7 +118,7 @@ if (document.getElementById('spotify')) { // load buttons function loadButtons() { - fetch('/static/content/buttons.txt').then(response => { + fetch('/static/content/other/buttons.txt').then(response => { return response.text(); }).then(data => { container = document.getElementById('button-collection'); diff --git a/templates/bases/base.html b/templates/bases/base.html index 54c4cb6..ff8689f 100644 --- a/templates/bases/base.html +++ b/templates/bases/base.html @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@ - + {% block head %} {% endblock %} @@ -62,12 +62,12 @@
      |\      _,,,---,,_
ZZZzz /,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_)
- haj + haj
- +

Alfie King

server backend survivor

diff --git a/templates/toaster.html b/templates/pages/toaster.html similarity index 66% rename from templates/toaster.html rename to templates/pages/toaster.html index b038dfd..b2fa1dc 100644 --- a/templates/toaster.html +++ b/templates/pages/toaster.html @@ -3,6 +3,12 @@ {% block title %}Toaster - Alfie's basement{% endblock %} {% block description %}furry corner{% endblock %} {% block og_image %}/static/content/Toaster_v1.0_Dark.png{% endblock %} +{% block keywords %} +Alfie King, Alfie, King, Alfieking, Alfieking.dev, dev, server, developer, backend, selfhost, homelab, furry, protogen, toaster, +fursona, fur, furmeet, fursuit, persona, character, protogen fursona, protogen character, protogen fursona design, +protogen character design, critters mk, critters cmk, paws n pistons, paws'n'pistons, paws n pistons furry meet, paws'n'pistons furry meet, +protogen v1.0, toaster v1.0 +{% endblock %} {% block head %} @@ -45,7 +51,7 @@
- toaster + toaster

NEW AND IMPROVED! Toaster v1.0 is here! @@ -70,4 +76,31 @@ If I end up making a fursuit, I will probably make a post about it on my site and maybe even make a video of it (but dont hold me to that).

+
+

Events

+

+ There are a few events that ive been to, however I plan on trying to go to more in the future. +
+

+
    +
  • + CrittersCMK - A furmeet in Milton Keynes. + +
  • +
  • + Paws'N'Pistons - A furry car meet around the UK. + +
  • +
+
{% endblock %} \ No newline at end of file