{#
 # Work entry template
 # -------------------
 #
 # This template gets loaded whenever a Work entry’s URL is requested, because
 # the Work section’s Template setting is set to "work/_entry".
 #
 # An `entry` variable will be automatically passed to this template, which will
 # be set to the requested News entry.
-#}

{% extends "_layout/main" %}

{% set title = entry.title %}

{% block main %}
  <div class="container" data-aos="fade" data-aos-delay="0" >
    <div class="row">
      <div class="col-md-8 offset-md-2">
        <h1 data-aos="fade" data-aos-delay="0" style="text-align: left; font-size: 50px; margin-top: 80px; margin-bottom: 20px;">{{ entry.headline }}</h1>
        
        <div class="post-details">
          {# <div class="post-categories">
               <div class="post-categories">
                    {% for category in entry.postKategorie %}
                      {{ relatedCategories.title }}
                    {% endfor %}
                </div>    
          </div> #}
          <div class="post-date">
             gepostet am: {{ entry.postDate | date("d. M, Y") }}
          </div>
          </div>
          
      </div> 
    </div>
  </div>

{# Create a category query with the 'group' parameter #}
 {# {% set myCategoryQuery = craft.categories().group('kategorie') %} #}
 
 {# Fetch the categories #}
 {# {% set categories = myCategoryQuery.all() %}
 
 {% for postEntry in craft.entries.section('newsPosts').all() %} 
 {% set relatedCategories = postEntry.postKategorie %} #}



  <article>
    {% include "_includes/portfolio_body" %}
  </article>




{% endblock %}
