{% if css_file %} {% endif %}
{% if story %}

{{ story.title }}

{% if show_comments %} {% else %}
Source: {{ url }}
{% endif %}
{{ story.score }} points by {{ story.author }} ​ {{ story.date | fromnow }} ​ on {{ story.source }} | ​ {{ story.num_comments }} comment{{ 's' if story.num_comments != 1 }}
{% if not show_comments and story.text %}
{{ story.text | safe }}
{% elif show_comments %} {% macro render_comment(comment, level) %}

{% if comment.author == story.author %}[OP] {% endif %}{{ comment.author or '[Deleted]' }} | {{ comment.date | fromnow }}

{{ (comment.text | safe) if comment.text else '

[Empty / deleted comment]

' }}
{% for reply in comment.comments %} {{ render_comment(reply, level + 1) }} {% endfor %}
{% endmacro %}
{% for comment in story.comments %}{{ render_comment(comment, 0) }}{% endfor %}
{% endif %}
{% elif stories %}
{% for story in stories %} {% endfor %}
{% endif %}