Skip to content

Commit

Permalink
move arcade things to a year folder
Browse files Browse the repository at this point in the history
  • Loading branch information
SamLR authored and marksteward committed May 31, 2024
1 parent 6e02c86 commit 75e9ac6
Show file tree
Hide file tree
Showing 38 changed files with 17 additions and 12 deletions.
19 changes: 12 additions & 7 deletions apps/base/arcade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/<page_name>")
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/<int:year>/<page_name>")
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/<int:year>")
def arcade(year: int):
return render_template(f"arcade/{year}/main.html")

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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 %}
<div id="arcade-page">
<h1>Electromagnetic Field Arcade</h1>
<h1>Electromagnetic Field Arcade - 2024</h1>
<p>Welcome to the Electromagnetic Field Arcade!</p>
<p>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.</p>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{% macro view(title, view_name) -%}
<li class="{{ 'active' if request.endpoint == view_name }}">
<a href="{{url_for(view_name)}}">{{title}}</a>
<a href="{{url_for(view_name, year=2024)}}">{{title}}</a>
</li>
{%- endmacro %}
{% macro page(title, target_page) -%}
<li class="{{ 'active' if request.endpoint == 'base.arcade_page' and page_name==target_page }}">
<a href="{{url_for('base.arcade_page', page_name=target_page)}}">{{title}}</a>
<a href="{{url_for('base.arcade_page', page_name=target_page, year=2024)}}">{{title}}</a>
</li>
{%- endmacro %}
{% extends "base.html" %}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 75e9ac6

Please sign in to comment.