54 lines
1.5 KiB
Smarty
54 lines
1.5 KiB
Smarty
<div id="results" class="search-results col-md-12" data-search-query="{search_query}">
|
|
{{{ if matchCount }}}
|
|
<div class="alert alert-info">[[search:results-matching, {matchCount}, {search_query}, {time}]] </div>
|
|
{{{ else }}}
|
|
{{{ if search_query }}}
|
|
<div class="alert alert-warning">[[search:no-matches]]</div>
|
|
{{{ end }}}
|
|
{{{ end }}}
|
|
|
|
{{{each posts}}}
|
|
<div class="topic-row card clearfix mb-3">
|
|
<div class="card-body">
|
|
<div class="mb-2">
|
|
<a href="/user/{./user.remoteId}">{buildAvatar(./user, "24px", true)}</a>
|
|
<a class="topic-title fw-semibold fs-5" href="{config.relative_path}/post/{encodeURIComponent(posts.pid)}">{./topic.title}</a>
|
|
</div>
|
|
|
|
{{{ if showAsPosts }}}
|
|
<div component="post/content" class="content">
|
|
{./content}
|
|
</div>
|
|
{{{ end }}}
|
|
|
|
<small class="post-info">
|
|
<a href="{config.relative_path}/category/{./category.slug}">
|
|
<div class="category-item d-inline-block">
|
|
{buildCategoryIcon(./category, "24px", "rounded-circle")}
|
|
{./category.name}
|
|
</div>
|
|
</a> •
|
|
<span class="timeago" title="{./timestampISO}"></span>
|
|
</small>
|
|
</div>
|
|
</div>
|
|
{{{end}}}
|
|
|
|
{{{ if users.length }}}
|
|
<!-- IMPORT partials/users_list.tpl -->
|
|
{{{ end }}}
|
|
|
|
{{{ if tags.length }}}
|
|
<!-- IMPORT partials/tags_list.tpl -->
|
|
{{{ end }}}
|
|
|
|
{{{ if categories.length }}}
|
|
<ul class="categories">
|
|
{{{each categories}}}
|
|
<!-- IMPORT partials/categories/item.tpl -->
|
|
{{{end}}}
|
|
</ul>
|
|
{{{ end }}}
|
|
|
|
<!-- IMPORT partials/paginator.tpl -->
|
|
</div> |