Files
runnerspace/templates/pages/feed.html
Xevion f41b83a15f Apply new form validation features to New Post form
- Use TextAreaField instead of StringField on forms.NewPostForm
- Fixed incorrect remember_me field and redirect in login
- Added placeholder usage to field rendering macro
2022-03-29 15:13:00 -05:00

25 lines
952 B
HTML

{% extends 'layouts/index.html' %}
{% from 'macros.html' import render_field %}
{% block content %}
{% if current_user.is_authenticated %}
<form method="POST" class="form post-form">
{{ render_field(form.text, show_label=False) }}
<input type=submit value="Create Post">
</form>
{% endif %}
<hr style="margin: 2em 0">
{% for post, author in posts_and_authors %}
<div class="post-box">
{{ post.text }}
<div class="post-author no-border">
<em>Posted by <a href="{{ url_for('main.view_user', username=author.username) }}">{{ author.name }}</a></em> <span
title="{{ post.date_posted }}">{{ post.get_time_ago() }} ago</span>. |
<a href="{{ url_for('main.view_post', post_id=post.id) }}"><span>{{ post.comments|length }} comments</span></a>
</div>
</div>
{% endfor %}
{% endblock content %}