{% extends "layout-right.html" %} {% macro sentence_case(text) %} {{ text[0]|upper}}{{text[1:] }} {% endmacro %} {% block header %} {% endblock header %} {% block content %}
PROJECTS
RECEIVED
GIVEN
Project posted by {% if current_user.id == user.id %} you {% else %} {{ user.username }} {% endif %}:
{% if user_projects|length < 1 %}
{% if current_user.id == user.id %} You have {% else %} {{ user.username }} has {% endif %} not posted any projects yet
{% else %} {% for project in user_projects %}

{{ sentence_case(project.title) }}

{{ project.poster.username }} on {{ project.date_posted.strftime('%A - %d %b %Y') }}
{{ project.star_count }}
{{ project.comment_count }}
{% endfor %}{% endif%}
Projects {% if current_user.id == user.id %} you have {% else %} {{ user.username }} has {% endif %} contributed to:
{% if contributed_projects|length < 1 %}
{% if current_user.id == user.id %} You have {% else %} {{ user.username }} has {% endif %} not contributed to any pojects yet
{% else %} {% for project in contributed_projects %}

{{ sentence_case(project.title) }}

{{ project.poster.username }} on {{ project.date_posted.strftime('%A - %d %b %Y') }}
{{ project.star_count }}
{{ project.comment_count }}
{% endfor %}{% endif %} {% endblock content %} {% block sidebar %} {% endblock sidebar %}