diff --git a/app/main/views.py b/app/main/views.py index bd5c694..b805a32 100644 --- a/app/main/views.py +++ b/app/main/views.py @@ -82,3 +82,9 @@ def edit_profile_admin(id): form.location.data = user.location form.about_me.data = user.about_me return render_template('edit_profile.html', form=form, user=user) + + +@main.route('/post/') +def post(id): + post = Post.query.get_or_404(id) + return render_template('post.html', posts=[post]) diff --git a/app/static/styles.css b/app/static/styles.css index 86f4b5e..32fd714 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -31,6 +31,9 @@ div.post-content { margin-left: 48px; min-height: 48px; } +div.post-footer { + text-align: right; +} div.pagination { width: 100%; text-align: center; @@ -60,4 +63,3 @@ div.flask-pagedown-preview { .post-body h3 { font-size: 120%; } - \ No newline at end of file diff --git a/app/templates/_posts.html b/app/templates/_posts.html index 0f7deec..f6c149d 100644 --- a/app/templates/_posts.html +++ b/app/templates/_posts.html @@ -16,6 +16,11 @@ {{ post.body }} {% endif %} +
+ + Permalink + +
{% endfor %} diff --git a/app/templates/post.html b/app/templates/post.html new file mode 100644 index 0000000..e4cb256 --- /dev/null +++ b/app/templates/post.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% import "_macros.html" as macros %} + +{% block title %}Flasky{% endblock %} + +{% block page_content %} +{% include '_posts.html' %} +{% endblock %}