{% extends "base.html.twig" %}
{% block body %}
{% embed "1-col-sidebar.html.twig" %}
{% block column %}
{% if total %}
<div class="paging float-right">
<div class="input-group">
<div class="input-group-prepend px-3">
<span>
Showing:
{{ (page-1) * limit + 1 }} -
{% if ((page-1) * limit + limit <= total) %}
{{ (page-1) * limit + limit }}
{% else %}
{{ total }}
{% endif %}
of
{{ total }}
</span>
</div>
<div class="button-group input-group-append">
{% if ((page-1)) %}
<a
class="btn btn-secondary paging"
type="submit"
href="/search/{{ page-1 }}?s={{ search }}"
><i class="fa fa-angle-left"></i></a>
{% endif %}
{% if (page-1) * limit + limit < total %}
<a
class="btn btn-secondary paging"
type="submit"
href="/search/{{ page+1 }}?s={{ search }}"
><i class="fa fa-angle-right"></i></a>
{% endif %}
</div>
</div>
</div>
{% endif %}
<h1 class="mb-3">Search Results</h1>
<hr />
{% if total == 0 %}
<h6>No results found</h6>
{% endif %}
{% for result in results %}
<div class="row mb-3">
{% if result.getFeaturedImageTag() %}
<div class="col-md-4">
{{ result.getFeaturedImageTag("","")|raw }}
</div>
<div class="col-md-8">
{% else %}
<div class="col-md-12">
{% endif %}
<h3 class="">
<a href="{{ result.getUrl() }}">
{{ result.getTypeText() }}: {{ result.getTitle() }}
</a>
</h3>
<p class="post-byline"><strong>
{{ result.getPublishedAt() | date | rcsDateFormat }}
</strong></p>
{% if result.getIntroText() %}
<div class="intro">
{{ result.getIntroText()|raw }}
<strong><a href="{{ result.getUrl() }}">Read More {#<i class="fa fa-angle-double-right"></i>#}</a></strong>
</div>
{% endif %}
</div>
</div>
<hr />
{% endfor %}
<div class="row">
<div class="col-md-12 mt-3">
{% if total %}
<div class="paging float-right">
<div class="input-group">
<div class="input-group-prepend px-3">
<span>
Showing:
{{ (page-1) * limit + 1 }} -
{% if ((page-1) * limit + limit <= total) %}
{{ (page-1) * limit + limit }}
{% else %}
{{ total }}
{% endif %}
of
{{ total }}
</span>
</div>
<div class="button-group input-group-append">
{% if ((page-1)) %}
<a
class="btn btn-secondary paging"
type="submit"
href="/search/{{ page-1 }}?s={{ search }}"
><i class="fa fa-angle-left"></i></a>
{% endif %}
{% if (page-1) * limit + limit < total %}
<a
class="btn btn-secondary paging"
type="submit"
href="/search/{{ page+1 }}?s={{ search }}"
><i class="fa fa-angle-right"></i></a>
{% endif %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% block sidebar %}
{% include "includes/sidebar.html.twig" %}
{% endblock %}
{% endembed %}
{% endblock %}