diff --git a/apps/base/arcade.py b/apps/base/arcade.py index 7e8b0bc2d..4acb85237 100644 --- a/apps/base/arcade.py +++ b/apps/base/arcade.py @@ -2,17 +2,22 @@ Pages under /arcade - the arcade program. """ -from flask import render_template +from flask import render_template, redirect, url_for from . import base +from models import event_year from apps.common import render_markdown -@base.route("/arcade/") -def arcade_page(page_name: str): - return render_markdown(f"arcade/{page_name}", template="arcade/template.html", page_name=page_name) - @base.route("/arcade") -def arcade(): - return render_template("arcade/index.html") +def yearly_arcade_redirection(): + return redirect(url_for('.arcade', year=event_year())) + +@base.route("/arcade//") +def arcade_page(year: int, page_name: str): + return render_markdown(f"arcade/{year}/{page_name}", template=f"arcade/{year}/template.html", page_name=page_name) + +@base.route("/arcade/") +def arcade(year: int): + return render_template(f"arcade/{year}/main.html") diff --git a/templates/arcade/alba.md b/templates/arcade/2024/alba.md similarity index 100% rename from templates/arcade/alba.md rename to templates/arcade/2024/alba.md diff --git a/templates/arcade/animal-well.md b/templates/arcade/2024/animal-well.md similarity index 100% rename from templates/arcade/animal-well.md rename to templates/arcade/2024/animal-well.md diff --git a/templates/arcade/assemble-with-care.md b/templates/arcade/2024/assemble-with-care.md similarity index 100% rename from templates/arcade/assemble-with-care.md rename to templates/arcade/2024/assemble-with-care.md diff --git a/templates/arcade/climate-survivors.md b/templates/arcade/2024/climate-survivors.md similarity index 100% rename from templates/arcade/climate-survivors.md rename to templates/arcade/2024/climate-survivors.md diff --git a/templates/arcade/demo.md b/templates/arcade/2024/demo.md similarity index 100% rename from templates/arcade/demo.md rename to templates/arcade/2024/demo.md diff --git a/templates/arcade/dikdik.md b/templates/arcade/2024/dikdik.md similarity index 100% rename from templates/arcade/dikdik.md rename to templates/arcade/2024/dikdik.md diff --git a/templates/arcade/downpour.md b/templates/arcade/2024/downpour.md similarity index 100% rename from templates/arcade/downpour.md rename to templates/arcade/2024/downpour.md diff --git a/templates/arcade/game-jam.md b/templates/arcade/2024/game-jam.md similarity index 100% rename from templates/arcade/game-jam.md rename to templates/arcade/2024/game-jam.md diff --git a/templates/arcade/gameboys.md b/templates/arcade/2024/gameboys.md similarity index 100% rename from templates/arcade/gameboys.md rename to templates/arcade/2024/gameboys.md diff --git a/templates/arcade/gamestation.md b/templates/arcade/2024/gamestation.md similarity index 100% rename from templates/arcade/gamestation.md rename to templates/arcade/2024/gamestation.md diff --git a/templates/arcade/hades-ii.md b/templates/arcade/2024/hades-ii.md similarity index 100% rename from templates/arcade/hades-ii.md rename to templates/arcade/2024/hades-ii.md diff --git a/templates/arcade/heatwav.md b/templates/arcade/2024/heatwav.md similarity index 100% rename from templates/arcade/heatwav.md rename to templates/arcade/2024/heatwav.md diff --git a/templates/arcade/hyperrogue.md b/templates/arcade/2024/hyperrogue.md similarity index 100% rename from templates/arcade/hyperrogue.md rename to templates/arcade/2024/hyperrogue.md diff --git a/templates/arcade/last-call-bbs.md b/templates/arcade/2024/last-call-bbs.md similarity index 100% rename from templates/arcade/last-call-bbs.md rename to templates/arcade/2024/last-call-bbs.md diff --git a/templates/arcade/lunar-lander.md b/templates/arcade/2024/lunar-lander.md similarity index 100% rename from templates/arcade/lunar-lander.md rename to templates/arcade/2024/lunar-lander.md diff --git a/templates/arcade/index.html b/templates/arcade/2024/main.html similarity index 94% rename from templates/arcade/index.html rename to templates/arcade/2024/main.html index 2e33f37a5..e4a764ac1 100644 --- a/templates/arcade/index.html +++ b/templates/arcade/2024/main.html @@ -1,8 +1,8 @@ -{% extends "arcade/template.html" %} -{% block title %}About{% endblock %} +{% extends "arcade/2024/template.html" %} +{% block title %}Electromagnetic Field Arcade - 2024{% endblock %} {% block body %}
-

Electromagnetic Field Arcade

+

Electromagnetic Field Arcade - 2024

Welcome to the Electromagnetic Field Arcade!

Thanks to the incredible variety of cool creative people that attend and surround EMF, this year we’ve created a homemade arcade to showcase some of their fantastic work. We’re extremely grateful to the developers, publishers, and engineers who have allowed us to feature their creations for our entertainment this weekend.

diff --git a/templates/arcade/marathon.md b/templates/arcade/2024/marathon.md similarity index 100% rename from templates/arcade/marathon.md rename to templates/arcade/2024/marathon.md diff --git a/templates/arcade/mathsteroids.md b/templates/arcade/2024/mathsteroids.md similarity index 100% rename from templates/arcade/mathsteroids.md rename to templates/arcade/2024/mathsteroids.md diff --git a/templates/arcade/monument-valley-2.md b/templates/arcade/2024/monument-valley-2.md similarity index 100% rename from templates/arcade/monument-valley-2.md rename to templates/arcade/2024/monument-valley-2.md diff --git a/templates/arcade/moon-hunters.md b/templates/arcade/2024/moon-hunters.md similarity index 100% rename from templates/arcade/moon-hunters.md rename to templates/arcade/2024/moon-hunters.md diff --git a/templates/arcade/mutazione.md b/templates/arcade/2024/mutazione.md similarity index 100% rename from templates/arcade/mutazione.md rename to templates/arcade/2024/mutazione.md diff --git a/templates/arcade/other-games.md b/templates/arcade/2024/other-games.md similarity index 100% rename from templates/arcade/other-games.md rename to templates/arcade/2024/other-games.md diff --git a/templates/arcade/out-and-about.md b/templates/arcade/2024/out-and-about.md similarity index 100% rename from templates/arcade/out-and-about.md rename to templates/arcade/2024/out-and-about.md diff --git a/templates/arcade/pip-pepper.md b/templates/arcade/2024/pip-pepper.md similarity index 100% rename from templates/arcade/pip-pepper.md rename to templates/arcade/2024/pip-pepper.md diff --git a/templates/arcade/polybius.md b/templates/arcade/2024/polybius.md similarity index 100% rename from templates/arcade/polybius.md rename to templates/arcade/2024/polybius.md diff --git a/templates/arcade/pupperazzi.md b/templates/arcade/2024/pupperazzi.md similarity index 100% rename from templates/arcade/pupperazzi.md rename to templates/arcade/2024/pupperazzi.md diff --git a/templates/arcade/revolution.md b/templates/arcade/2024/revolution.md similarity index 100% rename from templates/arcade/revolution.md rename to templates/arcade/2024/revolution.md diff --git a/templates/arcade/roundguard.md b/templates/arcade/2024/roundguard.md similarity index 100% rename from templates/arcade/roundguard.md rename to templates/arcade/2024/roundguard.md diff --git a/templates/arcade/saltsea-chronicles.md b/templates/arcade/2024/saltsea-chronicles.md similarity index 100% rename from templates/arcade/saltsea-chronicles.md rename to templates/arcade/2024/saltsea-chronicles.md diff --git a/templates/arcade/shrouded-isle.md b/templates/arcade/2024/shrouded-isle.md similarity index 100% rename from templates/arcade/shrouded-isle.md rename to templates/arcade/2024/shrouded-isle.md diff --git a/templates/arcade/teletype.md b/templates/arcade/2024/teletype.md similarity index 100% rename from templates/arcade/teletype.md rename to templates/arcade/2024/teletype.md diff --git a/templates/arcade/template.html b/templates/arcade/2024/template.html similarity index 96% rename from templates/arcade/template.html rename to templates/arcade/2024/template.html index a5c6cb034..c7e5d073b 100644 --- a/templates/arcade/template.html +++ b/templates/arcade/2024/template.html @@ -1,11 +1,11 @@ {% macro view(title, view_name) -%}
  • - {{title}} + {{title}}
  • {%- endmacro %} {% macro page(title, target_page) -%}
  • - {{title}} + {{title}}
  • {%- endmacro %} {% extends "base.html" %} diff --git a/templates/arcade/the-book-ritual.md b/templates/arcade/2024/the-book-ritual.md similarity index 100% rename from templates/arcade/the-book-ritual.md rename to templates/arcade/2024/the-book-ritual.md diff --git a/templates/arcade/towerfall.md b/templates/arcade/2024/towerfall.md similarity index 100% rename from templates/arcade/towerfall.md rename to templates/arcade/2024/towerfall.md diff --git a/templates/arcade/tune-it-up.md b/templates/arcade/2024/tune-it-up.md similarity index 100% rename from templates/arcade/tune-it-up.md rename to templates/arcade/2024/tune-it-up.md diff --git a/templates/arcade/was-it.md b/templates/arcade/2024/was-it.md similarity index 100% rename from templates/arcade/was-it.md rename to templates/arcade/2024/was-it.md diff --git a/templates/arcade/weasel-words.md b/templates/arcade/2024/weasel-words.md similarity index 100% rename from templates/arcade/weasel-words.md rename to templates/arcade/2024/weasel-words.md