{% extends "./base.html" %}
{% load i18n %}
{% load static %}

{% load wagtailcore_tags %}
{% load wagtailimages_tags %}

{% if page.comments_enabled %}
  {% load comments %}
{% endif %}

{% block css %}
  {{ block.super }}
  {% if page.comments_are_enabled %}
    <link rel="stylesheet" type="text/css" href="{% static 'fluent_comments/css/ajaxcomments.css' %}" />
  {% endif %}
{% endblock css %}

{% block robots %}
  {% if blog.noindex %}
    <meta name="robots" content="noindex, nofollow">
  {% else %}
    <meta name="robots" content="index, follow">
  {% endif %}
{% endblock robots %}

{% block title %}{{ page.title }}{% endblock title %}

{% block main %}
  {% include "./post_body.html" with render_detail=True %}

  {% if page.comments_are_enabled %}
    {% render_comment_list for page %}
    {% render_comment_form for page %}
  {% endif %}

  <p><a href="{{ page.get_parent.url }}">Return to blog</a></p>

{% endblock %}
