@extends('partials.master')

@section('title')
    {{ Contest::title() }}
@stop

@section('open-graph')
    <meta name="twitter:card" content="summary">

    @if ($status === 'teaser')
    <meta name="description" content="{{ trans('frontend.og-description-teaser') }}">
    <meta property="og:description" content="{{ trans('frontend.og-description-teaser') }}" />
  @else
    <meta name="description" content="{{ trans('frontend.og-description') }}">
    <meta property="og:description" content="{{ trans('frontend.og-description') }}" />
  @endif
    <meta property="og:title" content="{{ Contest::title() }}" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="{{ route('home') }}" />
    @if ($status === 'teaser')
            <meta property="og:image" content="{{ url('/assets/img/fb-share-teaser-'.$edition.'.jpg?v=2020') }}" />
          @else
            <meta property="og:image" content="{{ url('/assets/img/fb-share-'.$edition.'.jpg?v=2020') }}" />
          @endif
 
    
@stop

@section('after-head')
    @parent
    @if ($edition === 'pt-BR')
        <div id="live-transmission-modal" class="reveal-modal">
            <p class="title">Final ao vivo</p>
            @if (Carbon\Carbon::parse('2030-05-06 19:30:00', 'America/Sao_Paulo')->isPast())
                <iframe src="http://nlb01.encripta.com.br/bifilmes/embed.php"
width="640px" height="360px" frameborder="0" scrolling="no" allowfullscreen></iframe>            @else
                <p style="text-align: center; margin-top:20px;">A transmissão ao vivo da final do concurso terá início às 19h30 (horário de Brasília). Por favor tente novamente mais tarde.</p>
            @endif
            <a class="close-reveal-modal">x</a>
        </div>
    @endif
@stop

@section('master')
<section id="home">

    <div class="destaque">
        <div class="box"></div>
    </div>
    @if (!Contest::hasBegun())

        <div class="inscrevete">
            <article>
                <p class="title">@lang('frontend.before-start-heading')</p>
                <p class="txt"><br>@lang('frontend.before-start-text', ['time' => Contest::displayDateStart('%k:%M'), 'date' => Contest::displayDateStart()])</p>
            </article>
        </div>

    @elseif ($status === 'participate')

        <div class="inscrevete">
            <article>
                <p class="title">@lang('frontend.participate-heading')</p>
                <p class="txt"><br>@lang('frontend.participate-text', ['date' => Contest::displayDateEndParticipate()])</p>
                <a href="{{ route('participate') }}" class="btn btn_inscrever">@lang('frontend.participate-cta')</a>
            </article>
        </div>

        @if (count($latest_bands))
            <div class="home_ultimas_bandas">

                    <div class="main">
                        <p class="title">@lang('frontend.latest-bands')</p>
                        <div class="bandas_inscritas">
                            <span id="slider-prev"></span>
                            <span id="slider-next"></span>
                            <ul class="bxslider_inscricao clearfix">
                                @foreach ($latest_bands as $latest_band)
                                <li>
                                    @include('partials.band', array('lazy' => false, 'band' => $latest_band))
                                </li>
                                @endforeach
                            </ul>
                        </div>
                    </div>

            </div>
        @endif

    @elseif ($status === 'vote')

        <div class="inscrevete">
            <article>
                <p class="title">@lang('frontend.vote-heading', ['link' => route('vote')])</p>
                <p class="txt"><br>@lang('frontend.vote-text', ['link' => route('vote')])</p>
            </article>
        </div>

    @elseif ($status === 'semi-final-limbo')

    <div class="inscrevete">
        <article>
            @if ($has_shortlist)
                <p class="title">@lang('frontend.limbo-heading-with-shortlist', ['date' => Contest::displayDateSemiFinal()])</p>
            @else
                <p class="title">@lang('frontend.limbo-heading', ['date' => Contest::displayDateSemiFinal()])</p>
                <p class="txt">@lang('frontend.limbo-heading-with-shortlist', ['date' => Contest::displayDateSemiFinal()])</p>
            @endif
            <p class="txt"><br>@lang('frontend.limbo-text')</p>

            @if ($has_shortlist)
              <a href="{{ route('vote') }}" class="btn_inscrever">@lang('frontend.semi-final-cta')</a>
            @else
              <a href="{{ route('vote') }}" class="btn_inscrever">@lang('frontend.vote-cta')</a>
            @endif

        </article>
    </div>

    @elseif ($status === 'semi-final')

        <div class="inscrevete">
            <article>
                <p class="title">@lang('frontend.semi-final-heading')</p>
                <p class="txt"><br>@lang('frontend.semi-final-text', ['date' => Contest::displayDateEndSemiFinal()])</p>
                <a href="{{ route('vote') }}" class="btn_inscrever">@lang('frontend.semi-final-cta')</a>
            </article>
        </div>

    @else

        <div class="inscrevete">
            <article>
            @if (!$winner && !$has_finalists)
                <p class="title">@lang('frontend.end-heading', ['date' => Contest::displayDateShowFinalists()])</p>
                <p class="txt"><br>@lang('frontend.end-text')</p>
                <a href="{{ route('vote') }}" class="btn_inscrever">@lang('frontend.vote-cta')</a>

            @elseif (!$winner && $has_finalists)

                <p class="title small">@lang('frontend.final-heading')</p>
                <p class="txt"><br>@lang('frontend.final-text')</p>

                @include("editions.{$edition}.final-program")
                <br>
                <a href="{{ route('vote') }}" class="btn_inscrever">VER BANDAS FINALISTAS</a>


            @else

                <p class="title">@lang('frontend.winner-heading', ['winner' => $winner->name])</p>
                <p class="txt"><br>@lang('frontend.winner-text')</p>
                <br>
                <a href="{{ $winner->permalink }}" class="btn_inscrever">@lang('frontend.winner-cta')</a>
                @if ($edition === 'pt-BR')
                     <!--<br><br><a href="/banda/bibiana-petek" class="btn_inscrever">@lang('frontend.winner-honor-cta')</a>-->
                @endif


            @endif
            </article>
        </div>

    @endif

    @include('partials.top-bands', array('bands' => $top_bands, 'class' => 'detalhe'))

    @include("editions.{$edition}.partners", array('class' => 'home'))

</section>
@stop
