Files
runnerspace/templates/pages/feed.html
Xevion 040e505561 Improve/add error messages to look better visually
- Have not tested everywhere, but should work okayish
2022-03-28 18:54:17 -05:00

32 lines
1.3 KiB
HTML

{% extends 'layouts/index.html' %}
{% block content %}
{% if current_user.is_authenticated %}
{% with messages = get_flashed_messages() %}
{% if messages or true %}
<span class="error-message center-message">
{{ messages[0] }}
</span>
{% endif %}
{% endwith %}
<form method="POST" action="{{ url_for('forms.new_post') }}" class="profile-form">
<label>
<textarea type="text" name="text" placeholder="Write a post between 15 and 1000 characters. Express yourself."></textarea>
</label>
<button class="button">Create Post</button>
</form>
{% endif %}
{% 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.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 %}