{% 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="col-lg-12 col-12 mb-5 mb-lg-0">
                     <div class="container">
                        <div class="row">
                           <div class="col-lg-12">
						   {% for post in blogList %}
                              <div class="d-card dc-dblue">
                                 <div class="d-card-body" id="dc-body">
                                    {% if post['blog_image'] %}
                                    <p><img src="{{ post['blog_image'] }}" alt="{{ post['blog_title'] }}" class="img-responsive"></p>
                                    {% endif %}
                                    <h1>{{ post['blog_title'] }}</h1>
                                    <div>{{ post['blog_content'] }}</div>
                                 </div>
                              </div>
                              <div class="row">
                                 <div class="col-md-12">
                                    <a href="{{ site['url'] }}/blog" class="btn btn-primary">{{ lang['blog.back'] }}</a>
                                 </div>
                              </div>
							{% endfor %}
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </section>
         </div>
      </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="col-lg-12 col-12 mb-5 mb-lg-0">
                     <div class="container">
                        <div class="row">
                           <div class="col-lg-12">
						   {% for post in blogList %}
                              <div class="d-card dc-dblue">
                                 <div class="d-card-body" id="dc-body">
                                    {% if post['blog_image'] %}
                                    <p><img src="{{ post['blog_image'] }}" alt="{{ post['blog_title'] }}" style="width:300px;height:180px;"></p>
                                    {% endif %}
                                    <h1>{{ post['blog_title'] }}</h1>
                                    <div>{{ post['blog_content'] }}</div>
                                 </div>
                              </div>
                              <div class="row">
                                 <div class="col-md-12">
                                    <a href="{{ site['url'] }}/blog" class="btn btn-primary">{{ lang['blog.back'] }}</a>
                                 </div>
                              </div>
							{% endfor %}
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </section>
        
        </div>
	 </div> 
	
{% endif %}
        

{% include 'footer.twig' %}