<!-- INCLUDE overall_header.html -->

<!-- EVENT search_results_header_before -->

<h2 class="searchresults-title"><!-- IF SEARCH_TITLE -->{SEARCH_TITLE}<!-- ELSE -->{SEARCH_MATCHES}<!-- ENDIF --><!-- IF SEARCH_WORDS -->{L_COLON} <a href="{U_SEARCH_WORDS}">{SEARCH_WORDS}</a><!-- ENDIF --></h2>
<!-- IF SEARCHED_QUERY --> <p>{L_SEARCHED_QUERY}{L_COLON} <strong>{SEARCHED_QUERY}</strong></p><!-- ENDIF -->
<!-- IF IGNORED_WORDS --> <p>{L_IGNORED_TERMS}{L_COLON} <strong>{IGNORED_WORDS}</strong></p><!-- ENDIF -->
<!-- IF PHRASE_SEARCH_DISABLED --> <p><strong>{L_PHRASE_SEARCH_DISABLED}</strong></p><!-- ENDIF -->

<!-- IF SEARCH_TOPIC -->
	<p class="return-link">
		<a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH_TOPIC}">
			{{ Icon('font', 'angle-' ~ S_CONTENT_FLOW_BEGIN, lang('RETURN_TO_TOPIC'), false, 'fas c-return-arrow-icon') }}
		</a>
	</p>
<!-- ELSE -->
	<p class="advanced-search-link">
		<a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">
			{{ Icon('font', 'angle-' ~ S_CONTENT_FLOW_BEGIN, lang('GO_TO_SEARCH_ADV'), false, 'fas c-return-arrow-icon') }}
		</a>
	</p>
<!-- ENDIF -->

<!-- EVENT search_results_header_after -->

<!-- IF .pagination or SEARCH_MATCHES or TOTAL_MATCHES or PAGE_NUMBER -->
	<div class="action-bar bar-top">

	<!-- IF TOTAL_MATCHES > 0 -->
		<div class="search-box" role="search">
			<form method="post" action="{S_SEARCH_ACTION}">
			<fieldset>
				<input class="inputbox search tiny" type="search" name="add_keywords" id="add_keywords" value="" placeholder="{L_SEARCH_IN_RESULTS}" />
				<button class="button button-search" type="submit" title="{L_SEARCH}">
					{{ Icon('font', 'search', lang('SEARCH'), true, 'fas c-button-icon') }}
				</button>
				<a href="{U_SEARCH}" class="button button-search-end" title="{L_SEARCH_ADV}">
					{{ Icon('font', 'gear', lang('SEARCH_ADV'), true, 'fas c-button-icon') }}
				</a>
			</fieldset>
			</form>
		</div>
	<!-- ENDIF -->

		<!-- EVENT search_results_searchbox_after -->

		<div class="pagination">
			<!-- IF U_MARK_ALL_READ --><a href="{U_MARK_ALL_READ}" class="mark-read" accesskey="m">{L_MARK_ALL_READ}</a> &bull;<!-- ENDIF -->
			{SEARCH_MATCHES}
			<!-- IF .pagination -->
				<!-- INCLUDE pagination.html -->
			<!-- ELSE -->
				 &bull; {PAGE_NUMBER}
			<!-- ENDIF -->
		</div>
	</div>
<!-- ENDIF -->

<!-- IF S_SHOW_TOPICS -->

	<!-- IF .searchresults -->
	<div class="forumbg">

		<div class="inner">
		<ul class="topiclist">
			<li class="header">
				<dl class="row-item">
					<dt><div class="list-inner">{L_TOPICS}</div></dt>
					<dd class="posts">{L_REPLIES}</dd>
					<dd class="views">{L_VIEWS}</dd>
					<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
					{% EVENT search_results_topic_header_lastpost_after %}
				</dl>
			</li>
		</ul>
		<ul class="topiclist topics">

		<!-- BEGIN searchresults -->
			<!-- EVENT search_results_topic_before -->
			<li class="row<!-- IF searchresults.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
				<dl class="row-item">
					<dt>
						{% if searchresults.U_NEWEST_POST and searchresults.S_UNREAD_TOPIC and not S_IS_BOT %}
							{% set U_ITEM_LINK = searchresults.U_NEWEST_POST %}
						{% elseif searchresults.U_VIEW_TOPIC %}
							{% set U_ITEM_LINK = searchresults.U_VIEW_TOPIC %}
						{% endif %}
						{% if U_ITEM_LINK is defined %}
							<a class="row-item-link{% if searchresults.S_UNREAD_TOPIC %} unread{% else %} read{% endif %}" href="{{ U_ITEM_LINK }}" title="{searchresults.TOPIC_FOLDER_IMG_ALT}">
								{{ Icon('svg', {
									'globe' : searchresults.S_POST_GLOBAL,
									'bullhorn' : searchresults.S_POST_ANNOUNCE,
									'thumbtack' : searchresults.S_POST_STICKY,
									'lock' : searchresults.S_TOPIC_LOCKED,
									'arrow-right-bold' : searchresults.S_TOPIC_MOVED,
									'fire' : searchresults.S_TOPIC_HOT,
									'file-document-outline' : true,
								}, '', true, 'c-forum-row-icon') }}
							</a>
						{% else %}
							<span class="row-item-link{% if searchresults.S_UNREAD_TOPIC %} unread{% else %} read{% endif %}" title="{searchresults.TOPIC_FOLDER_IMG_ALT}">
								{{ Icon('svg', {
								'globe' : searchresults.S_POST_GLOBAL,
								'bullhorn' : searchresults.S_POST_ANNOUNCE,
								'thumbtack' : searchresults.S_POST_STICKY,
								'lock' : searchresults.S_TOPIC_LOCKED,
								'arrow-right-bold' : searchresults.S_TOPIC_MOVED,
								'fire' : searchresults.S_TOPIC_HOT,
								'file-document-outline' : true,
								}, '', true, 'c-forum-row-icon') }}
							</span>
						{% endif %}
						{% if lang(searchresults.TOPIC_AUTHOR) == S_USERNAME %}
							<span class="row-item-link-mine"></span>
						{% endif%}
						{% if searchresults.TOPIC_ICON_IMG and S_TOPIC_ICONS %}
							<img class="row-item-sub" src="{T_ICONS_PATH}{searchresults.TOPIC_ICON_IMG}" alt="">
						{% endif %}
						<div class="list-inner">
							<!-- EVENT topiclist_row_prepend -->
							{% if searchresults.U_NEWEST_POST and searchresults.S_UNREAD_TOPIC and not S_IS_BOT %}
								<a href="{{ searchresults.U_NEWEST_POST }}" class="topictitle unread">{{ searchresults.TOPIC_TITLE }}</a>
							{% elseif searchresults.U_VIEW_TOPIC %}
								<a href="{{ searchresults.U_VIEW_TOPIC }}" class="topictitle">{{ searchresults.TOPIC_TITLE }}</a>
							{% else %}
								<span class="topictitle">{{ searchresults.TOPIC_TITLE }}</span>
							{% endif %}
							<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED -->
								<a href="{searchresults.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
									{{ Icon('font', 'circle-question', lang('TOPIC_UNAPPROVED'), true, 'fas c-unapproved-icon') }}
								</a>
							<!-- ENDIF -->
							<!-- IF searchresults.S_TOPIC_DELETED -->
								<a href="{searchresults.U_MCP_QUEUE}" title="{L_TOPIC_DELETED}">
									{{ Icon('font', 'recycle', lang('TOPIC_DELETED'), true, 'fas c-topic-deleted-icon') }}
								</a>
							<!-- ENDIF -->
							<!-- IF searchresults.S_TOPIC_REPORTED -->
								<a href="{searchresults.U_MCP_REPORT}" title="{L_TOPIC_REPORTED}">
									{{ Icon('font', 'triangle-exclamation', lang('TOPIC_REPORTED'), true, 'fas c-topic-reported-icon') }}
								</a>
							<!-- ENDIF -->
							<br />
							<!-- EVENT topiclist_row_topic_title_after -->

							<!-- IF not S_IS_BOT -->
								<div class="responsive-show" style="display: none;">
									{L_LAST_POST} {L_POST_BY_AUTHOR} <!-- EVENT search_results_last_post_author_username_prepend -->{searchresults.LAST_POST_AUTHOR_FULL}<!-- EVENT search_results_last_post_author_username_append --> &laquo; <a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}"><time datetime="{searchresults.LAST_POST_TIME_RFC3339}">{searchresults.LAST_POST_TIME}</time></a>
									<br />{L_POSTED} {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
								</div>
							<!-- IF searchresults.TOPIC_REPLIES --><span class="responsive-show left-box" style="display: none;">{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></span><!-- ENDIF -->
							<!-- ENDIF -->

							<div class="responsive-hide left-box">
								<!-- IF searchresults.S_HAS_POLL -->{{ Icon('font', 'chart-bar', '', true) }}<!-- ENDIF -->
								<!-- IF searchresults.ATTACH_ICON_IMG -->{{ Icon('font', 'paperclip', '', true) }}<!-- ENDIF -->
								{% EVENT topiclist_row_topic_by_author_before %}
								{L_POST_BY_AUTHOR} <!-- EVENT search_results_topic_author_username_prepend -->{searchresults.TOPIC_AUTHOR_FULL}<!-- EVENT search_results_topic_author_username_append --> &raquo; <time datetime="{searchresults.FIRST_POST_TIME_RFC3339}">{searchresults.FIRST_POST_TIME}</time> &raquo; {L_IN} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a>
								{% EVENT topiclist_row_topic_by_author_after %}
							</div>

							<!-- IF .searchresults.pagination -->
							<div class="pagination">
								<span>{{ Icon('font', 'clone', '', true, 'far') }}</span>
								<ul>
								<!-- BEGIN pagination -->
									<!-- IF searchresults.pagination.S_IS_PREV -->
									<!-- ELSEIF searchresults.pagination.S_IS_CURRENT --><li class="active"><span>{searchresults.pagination.PAGE_NUMBER}</span></li>
									<!-- ELSEIF searchresults.pagination.S_IS_ELLIPSIS --><li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
									<!-- ELSEIF searchresults.pagination.S_IS_NEXT -->
									<!-- ELSE --><li><a class="button" href="{searchresults.pagination.PAGE_URL}">{searchresults.pagination.PAGE_NUMBER}</a></li>
									<!-- ENDIF -->
								<!-- END pagination -->
								</ul>
							</div>
							<!-- ENDIF -->

							<!-- EVENT topiclist_row_append -->
						</div>
					</dt>
					<dd class="posts">{searchresults.TOPIC_REPLIES} <dfn>{L_REPLIES}</dfn></dd>
					<dd class="views">{searchresults.TOPIC_VIEWS} <dfn>{L_VIEWS}</dfn></dd>
					<dd class="lastpost">
						<span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} <!-- EVENT search_results_last_post_author_username_prepend -->{searchresults.LAST_POST_AUTHOR_FULL}<!-- EVENT search_results_last_post_author_username_append -->
							{% if not S_IS_BOT and searchresults.U_LAST_POST %}
								<a href="{searchresults.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
									{{ Icon('font', 'arrow-up-right-from-square', VIEW_LATEST_POST, true, 'fas c-last-post-icon') }}
								</a>
							{% endif %}
							<br /><time datetime="{searchresults.LAST_POST_TIME_RFC3339}">{searchresults.LAST_POST_TIME}</time>
						</span>
					</dd>
					{% EVENT search_results_topic_row_lastpost_after %}
				</dl>
			</li>
			<!-- EVENT search_results_topic_after -->
		<!-- END searchresults -->
		</ul>

		</div>
	</div>
	<!-- ELSE -->
		<div class="panel">
			<div class="inner">
			<strong>{L_NO_SEARCH_RESULTS}</strong>
			</div>
		</div>
	<!-- ENDIF -->

<!-- ELSE -->

	<!-- BEGIN searchresults -->
		<!-- EVENT search_results_post_before -->
		<div class="search post <!-- IF searchresults.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF searchresults.S_POST_REPORTED --> reported<!-- ENDIF -->">
			<div class="inner">

	<!-- IF searchresults.S_IGNORE_POST -->
		<div class="postbody">
			{searchresults.L_IGNORE_POST}
		</div>
	<!-- ELSE -->
		<dl class="postprofile">
			<!-- EVENT search_results_postprofile_before -->
			<dt class="author">{L_POST_BY_AUTHOR} <!-- EVENT search_results_post_author_username_prepend -->{searchresults.POST_AUTHOR_FULL}<!-- EVENT search_results_post_author_username_append --></dt>
			<dd class="search-result-date">{searchresults.POST_DATE}</dd>
			<dd>{L_FORUM}{L_COLON} <a href="{searchresults.U_VIEW_FORUM}">{searchresults.FORUM_TITLE}</a></dd>
			<dd>{L_TOPIC}{L_COLON} <a href="{searchresults.U_VIEW_TOPIC}">{searchresults.TOPIC_TITLE}</a></dd>
			<!-- EVENT search_results_topic_title_after -->
			<dd>{L_REPLIES}{L_COLON} <strong>{searchresults.TOPIC_REPLIES}</strong></dd>
			<dd>{L_VIEWS}{L_COLON} <strong>{searchresults.TOPIC_VIEWS}</strong></dd>
			<!-- EVENT search_results_postprofile_after -->
		</dl>

		<div class="postbody">
			{% EVENT search_results_post_subject_before %}
			<h3><a href="{searchresults.U_VIEW_POST}">{searchresults.POST_SUBJECT}</a></h3>
			<div class="content">{searchresults.MESSAGE}</div>
			<!-- EVENT search_results_content_after -->
		</div>
	<!-- ENDIF -->

	<!-- IF not searchresults.S_IGNORE_POST -->
		<ul class="searchresults">
			<li>
				<a href="{searchresults.U_VIEW_POST}" class="arrow-{S_CONTENT_FLOW_END}">
					{{ Icon('font', 'angle-' ~ S_CONTENT_FLOW_END, lang('JUMP_TO_POST'), false, 'fas c-return-arrow-icon') }}
				</a>
			</li>
		</ul>
	<!-- ENDIF -->

			</div>
		</div>
		<!-- EVENT search_results_post_after -->
	<!-- BEGINELSE -->
		<div class="panel">
			<div class="inner">
			<strong>{L_NO_SEARCH_RESULTS}</strong>
			</div>
		</div>
	<!-- END searchresults -->
<!-- ENDIF -->

<div class="action-bar bottom">
	<!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->
	<form method="post" action="{S_SEARCH_ACTION}">
		<!-- INCLUDE display_options.html -->
	</form>
		<!-- ENDIF -->

	<div class="pagination">
		{SEARCH_MATCHES}
		<!-- IF .pagination -->
			<!-- INCLUDE pagination.html -->
		<!-- ELSE -->
			 &bull; {PAGE_NUMBER}
		<!-- ENDIF -->
	</div>
</div>
{% EVENT search_results_jumpbox_before %}
<!-- INCLUDE jumpbox.html -->

<!-- INCLUDE overall_footer.html -->
