{% include 'header.twig' %}

{% if user['auth'] %}

<div class="app-content">
   <!-- page-content -->
   <div class="container-fluid">
      <div class="row mt-4">
         <div class="col-lg-12">
            <section class="blog-side">
               <div class="row">
                  <div class="container">
                     <div class="row">
                        <div class="col-md-12">
                           {% for post in blogList %}
                           <div class="d-card dc-dblue mb-3">
                              <div class="d-card-body" id="dc-body">
                                 <h4>{{ post['blog_title'] }}</h4>
                                 {% if post['blog_image'] %}
                                 <p><img src="{{ post['blog_image'] }}" alt="{{ post['blog_title'] }}" class="img-fluid" style="width:320px;height:180px;">
                                 </p>
                                 {% endif %}
                                 <a href="{{ site['url'] }}/blog/{{ post['url'] }}" class="btn btn-primary">{{ lang['blog.read'] }}</a>
                              </div>
                           </div>
                           {% endfor %}
                        </div>
                     </div>
                  </div>
               </div>

         </section>
      </div>
   </div>
</div>


{% else %}

    <div class="home-head outside">
        <div class="home-head-bg"></div>
	
        <div class="home-head-content">
            <div class="container" style="position: relative;">
                <div class="row">
                </div>
            </div>
        </div>
    </div>
	
    <div class="hs-area mb-5">
      <div class="container">
            <section class="blog-side">
               <div class="row">
                  <div class="container">
                     <div class="row">
                        <div class="col-md-12">
                           {% for post in blogList %}
                           <div class="d-card dc-dblue mb-3">
                              <div class="d-card-body" id="dc-body">
                                 <h4>{{ post['blog_title'] }}</h4>
                                 {% if post['blog_image'] %}
                                 <p><img src="{{ post['blog_image'] }}" alt="{{ post['blog_title'] }}" class="img-fluid" style="max-width:350px!important">
                                 </p>
                                 {% endif %}
                                 <a href="{{ site['url'] }}/blog/{{ post['url'] }}" class="btn btn-primary">{{ lang['blog.read'] }}</a>
                              </div>
                           </div>
                           {% endfor %}
                        </div>
                     </div>
                  </div>
               </div>

         </section>
      
        </div>
	 </div> 
	
{% endif %}
 
      
      

{% include 'footer.twig' %}