diff --git a/app/app.py b/app/app.py index 35a7275..1c29259 100644 --- a/app/app.py +++ b/app/app.py @@ -13,12 +13,8 @@ import waitress import markdown from post import Post -import comment -import user app = flask.Flask(__name__, static_url_path='', static_folder='static') -app.register_blueprint(comment.comments) -app.register_blueprint(user.user) # CONFIG CONFIG_PATH = "./config.ini" @@ -127,20 +123,12 @@ def index(): # Get posts posts = get_posts() - if 'username' in flask.session: - user = flask.session['username'] - else: - user = 'Anon' - # Get status status = get_status() - # Setup Comment Form - form = comment.CommentForm() - img = get_header_image() - return flask.render_template('index.html', posts=posts, status=status, form=form, user=user, title='0x01fe.net', header_background_image=img) + return flask.render_template('index.html', posts=posts, status=status, title='0x01fe.net', header_background_image=img) # Posts @app.route('/post/') @@ -149,15 +137,7 @@ def post(post_name: str): for post in get_posts(): if post['title'] == post_name: - if 'username' in flask.session: - user = flask.session['username'] - else: - user = 'Anon' - - # Setup Comment Form - form = comment.CommentForm() - - return flask.render_template('index.html', posts=[post], status=get_status(), form=form, user=user, title='0x01fe.net') + return flask.render_template('index.html', posts=[post], status=get_status(), title='0x01fe.net') flask.abort(404) @@ -168,18 +148,10 @@ def category_filter(category: str): # Get posts posts = get_posts(category_filter=category) - if 'username' in flask.session: - user = flask.session['username'] - else: - user = 'Anon' - # Get status status = get_status() - # Setup Comment Form - form = comment.CommentForm() - - return flask.render_template('index.html', posts=posts, status=status, form=form, user=user, title=category.replace('-', ' ')) + return flask.render_template('index.html', posts=posts, status=status, title=category.replace('-', ' ')) # Music Page @app.route('/music/') @@ -188,11 +160,6 @@ def music(): # Get posts posts = get_posts(category_filter="music") - if 'username' in flask.session: - user = flask.session['username'] - else: - user = 'Anon' - # Get status status = get_status() @@ -214,10 +181,8 @@ def music(): top_albums[album_index]['listen_time'] = hours - # Setup Comment Form - form = comment.CommentForm() - return flask.render_template('music.html', posts=posts, status=status, top_albums=top_albums, form=form, user=user) + return flask.render_template('music.html', posts=posts, status=status, top_albums=top_albums) # Programming Page @app.route('/programming/') @@ -226,18 +191,10 @@ def programming(): # Get posts posts_and_comments = get_posts(category_filter="programming") - if 'username' in flask.session: - user = flask.session['username'] - else: - user = 'Anon' - # Get status status = get_status() - # Setup Comment Form - form = comment.CommentForm() - - return flask.render_template('programming.html', posts=posts_and_comments, form=form, user=user, status=status) + return flask.render_template('programming.html', posts=posts_and_comments, status=status) # About Page @app.route('/about/') diff --git a/app/static/game_screenshots/hypothermia_wastes_bridge.gif b/app/static/game_screenshots/hypothermia_wastes_bridge.gif new file mode 100644 index 0000000..835eacf Binary files /dev/null and b/app/static/game_screenshots/hypothermia_wastes_bridge.gif differ diff --git a/app/static/game_screenshots/whirlpool.jpg b/app/static/game_screenshots/whirlpool.jpg new file mode 100644 index 0000000..c00e774 Binary files /dev/null and b/app/static/game_screenshots/whirlpool.jpg differ diff --git a/app/static/game_screenshots/ymirs_shadow.jpg b/app/static/game_screenshots/ymirs_shadow.jpg new file mode 100644 index 0000000..c0243a6 Binary files /dev/null and b/app/static/game_screenshots/ymirs_shadow.jpg differ diff --git a/app/templates/index.html b/app/templates/index.html index cb8d38c..f1dc5b1 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -31,24 +31,6 @@ {{ post.date_str }} {{ post.body|safe }} -
-

Comments

- {% for comment in post.comments %} -
-

{{ comment.username }}

-

{{ comment.content }}

-
- {% endfor %} - {% if user %} -
-

{{ user }}

-
- {{ form.hidden_tag() }} - {{ form.textbox }} - -
-
- {% endif %}
{% endfor %} diff --git a/app/templates/music.html b/app/templates/music.html index 73169f4..98cf1ee 100644 --- a/app/templates/music.html +++ b/app/templates/music.html @@ -31,25 +31,6 @@ {{ post.date_str }} {{ post.body|safe }} -
-

Comments

- {% for comment in post.comments %} -
-

{{ comment.username }}

-

{{ comment.content }}

-
- {% endfor %} - {% if user %} -
-

{{ user }}

-
- {{ form.hidden_tag() }} - {{ form.textbox }} - -
-
- {% endif %} -
{% endfor %} diff --git a/app/templates/programming.html b/app/templates/programming.html index 2cf1e35..ca88ef6 100644 --- a/app/templates/programming.html +++ b/app/templates/programming.html @@ -31,25 +31,6 @@ {{ post.date_str }} {{ post.body|safe }} -
-

Comments

- {% for comment in post.comments %} -
-

{{ comment.username }}

-

{{ comment.content }}

-
- {% endfor %} - {% if user %} -
-

{{ user }}

-
- {{ form.hidden_tag() }} - {{ form.textbox }} - -
-
- {% endif %} -
{% endfor %}