diff --git a/soundboard.py b/soundboard.py index 81465de..aa8704a 100644 --- a/soundboard.py +++ b/soundboard.py @@ -55,3 +55,11 @@ def index(sound=None, text=None, video=None): edit = False return render_template("index.html", sounds=sounds, edit=edit) + +@app.route("/edit/", methods=["GET", "POST"]) +def edit(sound): + if request.method == "POST": + # TODO: Store changes + return redirect("/edit") + + return render_template("edit.html") diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..b7914d8 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,56 @@ + + + + + + WIAI Soundboard + + + + {% block navigation %} + + {% endblock %} + + {% block content %} +
+
+ {% for sound in sounds %} + + {% endfor %} +
+
+
+ + + +
+
+ + +
+
+
+
+ + + + + + + +
+
+ {% endblock %} +
+ + + diff --git a/templates/edit.html b/templates/edit.html new file mode 100644 index 0000000..040b78a --- /dev/null +++ b/templates/edit.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% block navigation %} +{% endblock %} +{% block content %} +
+ + +
+{% endblock %} diff --git a/templates/index.html b/templates/index.html index 5aa2897..4484fd0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,23 +1,5 @@ - - - - - - WIAI Soundboard - - - - - +{% extends "base.html" %} +{% block content %}
{% for sound in sounds %} @@ -46,7 +28,4 @@
-
- - - +{% endblock %}