{{!--
This template is used for the index page.
It can be used also as the home page or the default page.
--}}

{{!-- The tag below means: insert everything in this file
into the {body} of the default.hbs template --}}
{{!< default}}

<div class="main-wrap">
  {{!-- Special header.hbs partial to generate the <header> tag --}}
  {{> header background=@site.cover_image}}
  </section>
  <main id="main-content">
    <div class="l-content is-homepage">
      <div class="l-wrapper" data-aos="fade-up" data-aos-delay="300">
        <div class="l-grid centered">
          {{#get "posts" filter="featured:true" include="authors,tags" limit="5" as |featured|}}
          {{#if featured}}
          <div class="m-featured-slider">
            <div class="m-featured-slider__list js-featured-articles">
              {{#foreach featured}}
              <div class="m-featured-slider__list__item">
                {{#if feature_image}}
                <article class="m-featured-article">
                  {{else}}
                  <article class="m-featured-article no-picture">
                    {{/if}}
                    <div class="m-featured-article__picture">
                      {{#if feature_image}}
                      <div class="lozad no-fade-animation" data-background-image="{{img_url feature_image size="l"}}"></div>
                      {{/if}}
                    </div>
                    <div class="m-featured-article__meta">
                      <a href="{{primary_author.url}}" class="m-featured-article__author js-tooltip" aria-label="Authors" data-tippy-content="{{t "Posted by"}} {{primary_author.name}} {{authors autolink="false" from="2" prefix=(t "Among with") separator=" , "}}">
                        {{#if primary_author.profile_image}}
                        <div style="background-image: url({{img_url primary_author.profile_image size="xs"}});"></div>
                        {{else}}
                        <div style="background-image: url({{asset "images/default-avatar-square-small.jpg"}});"></div>
                        {{/if}}
                      </a>
                      {{#if primary_tag}}
                      <a href="{{primary_tag.url}}" class="m-featured-article__tag">{{primary_tag.name}}</a>
                      {{/if}}
                    </div>
                    <div class="m-featured-article__ribbon">
                      <span class="icon-star"></span>
                      <span>{{t "Featured"}}</span>
                    </div>
                    <a href="{{url}}" class="m-featured-article__content">
                      <h1 class="m-featured-article__title js-featured-article-title" title="{{title}}">
                        {{title}}
                      </h1>
                      <div class="m-featured-article__timestamp">
                        <span>{{date published_at}}</span>
                        <span>&bull;</span>
                        <span>{{reading_time minute=(t "1 min read") minutes=(t "% min read")}}</span>
                      </div>
                    </a>
                  </article>
              </div>
              {{/foreach}}
            </div>
          </div>
          {{/if}}
          {{/get}}
          {{!-- The tag below iterates over all the posts --}}
          {{> "loop"}}
        </div>
      </div>
      {{!-- Links to Previous/Next posts --}}
      {{pagination}}
    </div>
  </main>
</div>
<section class="m-hero is-bottom bg-zhuzh">
  <div class="l-wrapper align-center">
    <h2 class="m-hero-title">Start localization testing today</h2>
    <div class="m-hero__content m-hero__meta">
    {{#if @site.description}}
      <p class="m-hero-description bigger">{{@site.description}}</p>
    {{/if}}
    </div>
    <a class="m-button primary" href="/signup">Explore Plans</a>
  </div>
</section>


{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
  <script defer src="{{asset "js/home.js"}}"></script>
{{/contentFor}}