<div class="container px-4 px-lg-5">
	<div class="row gx-4 gx-lg-5 justify-content-center">
		<div class="col-md-10 col-lg-8 col-xl-7">
			<form id="searchForm" class="row g-3" action="/search" method="POST">
				<div>
					<label for="searchInput" class="form-label">Searchbox at your service:</label>
					<input
						id="searchInput"
						name="query"
						type="search"
						class="form-control"
						placeholder="Type your search's keyword(s) here..."
					/>
				</div>
				<button type="submit" class="btn btn-info">CLICK TO LAUNCH YOUR SEARCH!</button>
			</form>
		</div>
	</div>
</div>

<div id="searchResult" class="text-center mt-3">
	{{#not build}}
	<script src="/static/admin/scripts/node-app-search.js"></script>
	{{#if resultLength > 0 && resultLength == 1 }}
	<p>Your search returned 1 post</p>
	{{#elseif resultLength > 1}}
	<p>Your search returned {{resultLength}} posts</p>
	{{/if}}
	<!--Dynamic Markup Separator-->
	{{/not}}
</div>

{{#if results}}
<!--Include the index template-->
{{include("themes/clean-blog/layouts/index.html")}}
<!--Dynamic Markup Separator-->
{{#elseif noResults}}
<p class="text-center">
	Sorry, your search didn't return any result.
	<br />
	Please try some other keyword(s) or,
	<br />
	browse the posts in the
	<a class="archive-link" href="/posts">archive</a>
	📦
</p>
{{/if}}
