{% extends 'user_base.html' %} {% block title %} Mypost|COVID-19 Detector {% endblock %} {% block specific_info %}
{% for post in posts %}
{% if post.author.has_avatar %} 头像 {% else %}
{{ post.author.username[0] }}
{% endif %}
{%if post.author.role_id==2%}
{{ post.author.username }}
{%else%}
{{ post.author.name }}
{{ post.author.location }} {{post.author.department}}
{%endif%}

发布时间: {{ moment(post.timestamp).format('LLL') }}

{%set url=url_for('auth.pleaselogin')%} {%if current_user.is_authenticated %} {%set url=url_for('faqs.article',id=post.id)%} {%endif%}

{{ post.title }}

{{ post.content }}

{% for i in range(1,post.img_count+1) %}
{% endfor %}
{% for i in range(1,post.img_count+1) %} {% endfor %}
{% set has_collected = 0 %} {% if current_user.is_authenticated %} {% set has_collected = Collect.query.filter_by(user_id=current_user.id, post_id=post.id).first() %} {% else %} {% endif %}
{% if current_user.is_authenticated %}
{% else %}
{% endif %}
{% set has_liked = 0 %} {% if current_user.is_authenticated %} {% set has_liked= Like.query.filter_by(user_id=current_user.id, post_id=post.id).first() %} {% else %} {% endif %}
{% endfor %}
{% endblock %}