<section class="content">
  <div class="container">
    <div class="row">
      <div class="col-12">
      <% if @page.type_of != 2 %>
        <section>
          <header>
            <h2><%= @page.title %></h2>
          </header>
            <%= raw @page.full_text %>
        </section>
      <% elsif @page.type_of == 2 && @page.article && !@page.article.published_page_articles.blank? %>
        <section>
          <h1><%= @page.title %></h1>
          <% for pas in @page.article.published_page_articles %>
            <div class="post-preview">
              <a href="/site/<%= pas.friendly_id %>">
                <h2 class="post-title">
                  <%= pas.title %>
                </h2>
                <h3 class="post-subtitle">
                  <%= raw pas.small_text %>
                </h3>
              </a>
              <p class="post-meta">Opublikowany <%= pas.created_date %> przez
                <a href="#"><%= pas.created_name %></a></p>
            </div>
            <hr>
          <% end %>
        </section>
      <% end %>
      </div>
    </div>
  </div>
</section>
