<!doctype html>
<html class="no-js" lang="en" dir="ltr">
<head>
    {% include "theme::partials/metadata" %}
    {{ asset_add("searchResult.css", "theme::css/scroll.css") }}
    {{ asset_style("searchResult.css", ["min"]) }}

    <link rel="stylesheet" media="screen and (min-device-width: 320px) and (max-device-width: 860px)"
          href="{{ asset_url("theme::css/hamburgers.css") }}">
    <style>
        .btnSearch {
            display: none !important;
        }
    </style>
</head>
<body>

{% include "theme::partials/navigation" %}

<section class="grid-container full columns">
    <section class="cell no-padding columns">
        <section class="grid-x" style="background: #959ba1;">
            <div class="searchBanner nopaci heightMid columns small-12 cell">
                <span class="searchTitle">{{ trans('theme::search.your_results') }}</span>
                <div class="searchBar searchShow">
                    <form action="{{ url('search') }}">
                        <input type="search" id="searchBar" name="keyword" value="{{ request_get('keyword') }}" placeholder="Keyword here..">
                        <button><i class="fa fa-search" aria-hidden="true"></i></button>
                    </form>
                </div>
            </div><!-- END  -->
        </section>
    </section>
    <section class="grid-x searchResult">

        {#{% set results = entries('posts').search(request_get('keyword')).get() %}#}

        <section class="cell sizeCenterElm">
            <div class="grid-x">
                <div class="small-12 medium-12 cell">
                    <ul>
                        {% for result in results %}

                            <li>
                                <h2>{{ result.category.slug }}</h2>
                                <h2>{{ result.title }}</h2>
                                <p>{{ str_truncate(result.content, 250)|striptags }}</p>
                                <a href="{{ result.url }}">Source</a>
                            </li>

                        {% endfor %}

                    </ul>

                    {{ results.appends(request_only('keyword')).links("theme::pagination.fuji_basic")|raw }}

                </div>

            </div>
        </section><!-- END homeNewsEvent -->

    </section>
</section>

{% include "theme::partials/footer" %}
{% include "theme::partials/scripts" %}

<script type="text/javascript">
    global();

</script>

</body>
</html>
