diff --git a/Tweeder.py b/Tweeder.py index 9e248f5..95aa2e8 100644 --- a/Tweeder.py +++ b/Tweeder.py @@ -95,7 +95,7 @@ def timeline_view(): @app.route('/global', methods=['GET']) def global_timeline(): logged_in = True if 'username' in session.keys() else False - return render_template('timeline.html', logged_in=logged_in, posts=timeline.global_timeline()) + return render_template('global.html', logged_in=logged_in, posts=timeline.global_timeline()) @app.route('/settings', methods=['GET', 'POST']) diff --git a/templates/global.html b/templates/global.html new file mode 100644 index 0000000..c688d2d --- /dev/null +++ b/templates/global.html @@ -0,0 +1,17 @@ +{% extends 'layout.html' %} +{% block nav_global %} active {% endblock %} + +{% block content %} +
+
+ {% for post in posts if not post.hidden %} +
+
{{ post.poster }} at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if logged_in == post.poster %} {% endif %}
+
+ {{ post.content }} +
+
+ {% endfor %} +
+
+{% endblock %} diff --git a/templates/timeline.html b/templates/timeline.html index c2fc050..2ca2884 100644 --- a/templates/timeline.html +++ b/templates/timeline.html @@ -1,5 +1,6 @@ {% extends 'layout.html' %} {% block nav_timeline %} active {% endblock %} + {% block content %}
@@ -13,4 +14,4 @@ {% endfor %}
-{% endblock %} \ No newline at end of file +{% endblock %}