<!-- blog_post.html -->
{% extends "base.html" %} {% block content %}
<article>
  <h1>{{ post.title }}</h1>
  <p>{{ post.subtitle }}</p>
  <p>By {{ post.author }} on {{ post.created_at.strftime('%B %d, %Y') }}</p>

  {% if post.slider_image1 and post.slider_image2 and post.slider_image3 %}
  <div id="blogCarousel" class="carousel slide" data-ride="carousel">
    <div class="carousel-inner">
      <div class="carousel-item active">
        <img
          src="{{ url_for('static', filename='uploads/' + post.slider_image1) }}"
          class="d-block w-100"
          alt="Slider Image 1"
        />
      </div>
      <div class="carousel-item">
        <img
          src="{{ url_for('static', filename='uploads/' + post.slider_image2) }}"
          class="d-block w-100"
          alt="Slider Image 2"
        />
      </div>
      <div class="carousel-item">
        <img
          src="{{ url_for('static', filename='uploads/' + post.slider_image3) }}"
          class="d-block w-100"
          alt="Slider Image 3"
        />
      </div>
    </div>
    <a
      class="carousel-control-prev"
      href="#blogCarousel"
      role="button"
      data-slide="prev"
    >
      <span class="carousel-control-prev-icon" aria-hidden="true"></span>
      <span class="sr-only">Previous</span>
    </a>
    <a
      class="carousel-control-next"
      href="#blogCarousel"
      role="button"
      data-slide="next"
    >
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
  {% elif post.featured_image %}
  <img
    src="{{ url_for('static', filename='uploads/' + post.featured_image) }}"
    alt="{{ post.title }}"
  />
  {% endif %}

  <div>{{ post.content | safe }}</div>
</article>
{% endblock %} {% block head %} {{ super() }}
<meta name="description" content="{{ post.meta_description }}" />
<meta name="keywords" content="{{ post.meta_keywords }}" />
{% endblock %}
