nodebb-theme-harmony 1.0.0-beta.22 → 1.0.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scss/harmony.scss +1 -0
- package/scss/search.scss +8 -0
- package/templates/account/profile.tpl +2 -2
- package/templates/partials/category/filter-dropdown-content.tpl +4 -2
- package/templates/partials/groups/sidebar-left.tpl +1 -1
- package/templates/partials/posts_list_item.tpl +4 -4
- package/templates/partials/search-filters.tpl +184 -0
- package/templates/partials/search-results.tpl +28 -32
- package/templates/search.tpl +39 -177
package/package.json
CHANGED
package/scss/harmony.scss
CHANGED
package/scss/search.scss
ADDED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<div class="d-flex flex-column flex-md-row">
|
|
5
5
|
<!-- IMPORT partials/account/sidebar-left.tpl -->
|
|
6
6
|
|
|
7
|
-
<div class="flex-1 ps-md-2 ps-lg-5">
|
|
7
|
+
<div class="flex-1 ps-md-2 ps-lg-5" style="min-width: 0;">
|
|
8
8
|
{{{ if aboutme }}}
|
|
9
|
-
<div component="aboutme" class="text-sm">
|
|
9
|
+
<div component="aboutme" class="text-sm text-break">
|
|
10
10
|
{aboutmeParsed}
|
|
11
11
|
</div>
|
|
12
12
|
{{{ end }}}
|
|
@@ -12,15 +12,17 @@
|
|
|
12
12
|
<input type="text" class="form-control form-control-sm" autocomplete="off">
|
|
13
13
|
</div>
|
|
14
14
|
<ul component="category/list" class="dropdown-menu category-dropdown-menu" role="menu">
|
|
15
|
-
<li role="presentation" class="category" data-
|
|
16
|
-
<a class="dropdown-item" role="menu-item" href="{config.relative_path}/{allCategoriesUrl}"><i component="category/select/icon" class="fa fa-fw fa-check {{{if selectedCategory}}}invisible{{{end}}}"></i> [[unread:all_categories]]</a>
|
|
15
|
+
<li role="presentation" class="category" data-cid="all">
|
|
16
|
+
<a class="dropdown-item" role="menu-item" href="{{{ if allCategoriesUrl }}}{config.relative_path}/{allCategoriesUrl}{{{ else }}}#{{{ end }}}"><i component="category/select/icon" class="fa fa-fw fa-check {{{if selectedCategory}}}invisible{{{end}}}"></i> [[unread:all_categories]]</a>
|
|
17
17
|
</li>
|
|
18
18
|
{{{each categoryItems}}}
|
|
19
19
|
<li role="presentation" class="category {{{ if ../disabledClass }}}disabled{{{ end }}}" data-cid="{../cid}" data-parent-cid="{../parentCid}" data-name="{../name}">
|
|
20
20
|
<a class="dropdown-item" role="menu-item" href="#">{../level}<i component="category/select/icon" class="fa fa-fw fa-check {{{ if !../selected }}}invisible{{{ end }}}"></i>
|
|
21
21
|
<span component="category-markup" style="{{{ if ../match }}}font-weight: bold;{{{end}}}">
|
|
22
22
|
<div class="category-item d-inline-block">
|
|
23
|
+
{{{ if ./icon }}}
|
|
23
24
|
{buildCategoryIcon(@value, "24px", "rounded-circle")}
|
|
25
|
+
{{{ end }}}
|
|
24
26
|
{./name}
|
|
25
27
|
</div>
|
|
26
28
|
</span>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="flex-0 pe-2 border-end-md text-sm mb-3 flex-basis-md-200">
|
|
2
|
-
<div class="nav sticky-top d-flex flex-row flex-md-column flex-wrap gap-1" style="z-index: 1;">
|
|
2
|
+
<div class="nav sticky-md-top d-flex flex-row flex-md-column flex-wrap gap-1" style="top: 1rem; z-index: 1;">
|
|
3
3
|
<button data-bs-toggle="tab" data-bs-target="#groups-posts" class="btn-ghost fw-semibold {{{ if template.groups/details }}}active{{{ end }}}">
|
|
4
4
|
<div class="flex-1">[[global:posts]]</div>
|
|
5
5
|
</button>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<hr/>
|
|
2
|
-
<a class="topic-title fw-semibold fs-5 text-reset text-break" href="{config.relative_path}/post/{./pid}">
|
|
2
|
+
<a class="d-inline-block topic-title fw-semibold fs-5 mb-3 text-reset text-break" href="{config.relative_path}/post/{./pid}">
|
|
3
3
|
{{{ if !./isMainPost }}}RE: {{{ end }}}{./topic.title}
|
|
4
4
|
</a>
|
|
5
5
|
<li component="post" class="posts-list-item {{{ if ./deleted }}} deleted{{{ else }}}{{{ if ./topic.deleted }}} deleted{{{ end }}}{{{ end }}}{{{ if ./topic.scheduled }}} scheduled{{{ end }}}" data-pid="{./pid}" data-uid="{./uid}">
|
|
6
6
|
<div class="post-body d-flex flex-column gap-1">
|
|
7
7
|
<div class="d-flex gap-3 post-info">
|
|
8
8
|
<div class="post-author d-flex gap-1">
|
|
9
|
-
<a class="lh-1" href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "16px", true, "not-responsive")}</a>
|
|
9
|
+
<a class="lh-1 text-decoration-none" href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "16px", true, "not-responsive")}</a>
|
|
10
10
|
<a class="fw-semibold text-sm" href="{config.relative_path}/user/{./user.userslug}">{../user.displayname}</a>
|
|
11
11
|
</div>
|
|
12
|
-
<span class="timeago text-sm text-muted" title="{
|
|
12
|
+
<span class="timeago text-sm text-muted" title="{./timestampISO}"></span>
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<div component="post/content" class="content text-sm text-break">
|
|
16
|
-
{
|
|
16
|
+
{./content}
|
|
17
17
|
</div>
|
|
18
18
|
</div>
|
|
19
19
|
</li>
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<div class="d-flex flex-wrap gap-2 align-items-center" component="search/filters">
|
|
2
|
+
<!-- category filter -->
|
|
3
|
+
<div class="post-search-item">
|
|
4
|
+
<div component="category/filter" class="dropdown" data-filter-name="category">
|
|
5
|
+
<a component="category/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.categories.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
|
|
6
|
+
<span class="filter-label">{{{ if filters.categories.active }}}{filters.categories.label}{{{ else }}}[[search:categories]]{{{ end }}}</span>
|
|
7
|
+
<span class="caret"></span>
|
|
8
|
+
</a>
|
|
9
|
+
|
|
10
|
+
<ul class="dropdown-menu">
|
|
11
|
+
<li class="px-3 py-1 mb-2 d-flex flex-column gap-2">
|
|
12
|
+
<div component="category-selector-search">
|
|
13
|
+
<input type="text" class="form-control" component="category/filter/search" placeholder="[[search:type-a-category]]">
|
|
14
|
+
</div>
|
|
15
|
+
</li>
|
|
16
|
+
<div component="category/list" class="overflow-auto" style="max-height: 350px;"></div>
|
|
17
|
+
<div class="px-3 py-1">
|
|
18
|
+
<div class="form-check">
|
|
19
|
+
<input id="search-children" class="form-check-input" type="checkbox"/>
|
|
20
|
+
<label class="form-check-label" for="search-children">[[search:search-child-categories]]</label>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<!-- tag filter -->
|
|
29
|
+
<div class="post-search-item">
|
|
30
|
+
<div component="tag/filter" class="dropdown" data-filter-name="tag">
|
|
31
|
+
<a component="tag/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.tags.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
|
|
32
|
+
<span class="filter-label">{{{ if filters.tags.active }}}{filters.tags.label}{{{ else }}}[[search:tags]]{{{ end }}}</span>
|
|
33
|
+
<span class="caret"></span>
|
|
34
|
+
</a>
|
|
35
|
+
|
|
36
|
+
<ul class="dropdown-menu" style="width: 350px;">
|
|
37
|
+
<li class="px-3 py-1 d-flex flex-column gap-2">
|
|
38
|
+
<input type="text" class="form-control" component="tag/filter/search" placeholder="[[search:type-a-tag]]">
|
|
39
|
+
<div component="tag/filter/selected" class="d-flex flex-wrap gap-2">
|
|
40
|
+
{{{ each tagFilterSelected }}}
|
|
41
|
+
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
|
|
42
|
+
<div>{./valueEscaped}</div>
|
|
43
|
+
<button component="tag/filter/delete" data-tag="{./valueEscaped}" class="btn btn-primary btn-sm py-0"><i class="fa fa-times fa-xs"></i></button>
|
|
44
|
+
</div>
|
|
45
|
+
{{{ end }}}
|
|
46
|
+
</div>
|
|
47
|
+
<hr/>
|
|
48
|
+
<div component="tag/filter/results" class="d-flex flex-wrap gap-2">
|
|
49
|
+
{{{ each tagFilterResults }}}
|
|
50
|
+
<button class="btn btn-light btn-sm border" data-tag="{./valueEscaped}">{./valueEscaped}</button>
|
|
51
|
+
{{{ end }}}
|
|
52
|
+
</div>
|
|
53
|
+
</li>
|
|
54
|
+
</ul>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<!-- user name filter -->
|
|
59
|
+
<div class="post-search-item">
|
|
60
|
+
<div component="user/filter" class="dropdown" data-filter-name="user">
|
|
61
|
+
<a component="user/filter/button" class="filter-btn btn btn-light btn-sm border {{{ if filters.users.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
|
|
62
|
+
<span class="filter-label">{{{ if filters.users.active }}}{filters.users.label}{{{ else }}}[[search:posted-by]]{{{ end }}}</span>
|
|
63
|
+
<span class="caret"></span>
|
|
64
|
+
</a>
|
|
65
|
+
|
|
66
|
+
<ul class="dropdown-menu" style="width: 350px;">
|
|
67
|
+
<li class="px-3 py-1 d-flex flex-column gap-2">
|
|
68
|
+
<input type="text" class="form-control" component="user/filter/search" placeholder="[[search:type-a-username]]">
|
|
69
|
+
<div component="user/filter/selected" class="d-flex flex-wrap gap-2">
|
|
70
|
+
{{{ each userFilterSelected }}}
|
|
71
|
+
<div class="d-flex px-2 py-1 rounded-1 text-bg-primary gap-2 align-items-center text-sm">
|
|
72
|
+
{buildAvatar(@value, "16px", true)} {./username}
|
|
73
|
+
<button component="user/filter/delete" data-uid="{./uid}" class="btn btn-primary btn-sm py-0"><i class="fa fa-times fa-xs"></i></button>
|
|
74
|
+
</div>
|
|
75
|
+
{{{ end }}}
|
|
76
|
+
</div>
|
|
77
|
+
<hr/>
|
|
78
|
+
<div component="user/filter/results" class="d-flex flex-wrap gap-2">
|
|
79
|
+
{{{ each userFilterResults }}}
|
|
80
|
+
<button class="btn btn-light btn-sm border" data-uid="{./uid}" data-username="{./username}">{buildAvatar(@value, "16px", true)} {./username}</button>
|
|
81
|
+
{{{ end }}}
|
|
82
|
+
</div>
|
|
83
|
+
</li>
|
|
84
|
+
</ul>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<!-- reply count filter -->
|
|
90
|
+
<div class="post-search-item">
|
|
91
|
+
<div class="dropdown" data-filter-name="replies">
|
|
92
|
+
<a id="reply-count-button" class="filter-btn btn btn-light btn-sm border {{{ if filters.replies.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
93
|
+
<span class="filter-label">{{{ if filters.replies.active }}}{filters.replies.label}{{{ else }}}[[search:replies]]{{{ end }}}</span>
|
|
94
|
+
<span class="caret"></span>
|
|
95
|
+
</a>
|
|
96
|
+
|
|
97
|
+
<ul class="dropdown-menu" style="width: 300px;">
|
|
98
|
+
<li class="px-3 py-1 d-flex flex-nowrap gap-2">
|
|
99
|
+
<select id="reply-count-filter" class="form-select py-2 ps-2 pe-3">
|
|
100
|
+
<option value="atleast">[[search:at-least]]</option>
|
|
101
|
+
<option value="atmost">[[search:at-most]]</option>
|
|
102
|
+
</select>
|
|
103
|
+
<input id="reply-count" type="number" min="0" class="form-control py-2 ps-2 pe-3" />
|
|
104
|
+
</li>
|
|
105
|
+
</ul>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<!-- time filter -->
|
|
110
|
+
<div class="post-search-item">
|
|
111
|
+
<div class="dropdown" data-filter-name="time">
|
|
112
|
+
<a id="post-time-button" class="filter-btn btn btn-light btn-sm border {{{ if filters.time.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
113
|
+
<span class="filter-label">{{{ if filters.time.active }}}{filters.time.label}{{{ else }}}[[search:time]]{{{ end }}}</span>
|
|
114
|
+
<span class="caret"></span>
|
|
115
|
+
</a>
|
|
116
|
+
|
|
117
|
+
<ul class="dropdown-menu" style="width: 350px;">
|
|
118
|
+
<li class="px-3 py-1 d-flex flex-nowrap gap-2">
|
|
119
|
+
<select id="post-time-filter" class="form-select py-2 ps-2 pe-3">
|
|
120
|
+
<option value="newer">[[search:newer-than]]</option>
|
|
121
|
+
<option value="older">[[search:older-than]]</option>
|
|
122
|
+
</select>
|
|
123
|
+
<select id="post-time-range" class="form-select py-2 ps-2 pe-3">
|
|
124
|
+
<option value="">[[search:any-date]]</option>
|
|
125
|
+
<option value="86400">[[search:yesterday]]</option>
|
|
126
|
+
<option value="604800">[[search:one-week]]</option>
|
|
127
|
+
<option value="1209600">[[search:two-weeks]]</option>
|
|
128
|
+
<option value="2592000">[[search:one-month]]</option>
|
|
129
|
+
<option value="7776000">[[search:three-months]]</option>
|
|
130
|
+
<option value="15552000">[[search:six-months]]</option>
|
|
131
|
+
<option value="31104000">[[search:one-year]]</option>
|
|
132
|
+
</select>
|
|
133
|
+
</li>
|
|
134
|
+
</ul>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<!-- sort filter -->
|
|
139
|
+
<div class="post-search-item">
|
|
140
|
+
<div class="dropdown" data-filter-name="sort">
|
|
141
|
+
<a id="sort-by-button" class="filter-btn btn btn-light btn-sm border {{{ if filters.sort.active }}}active-filter{{{ end }}} dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
142
|
+
<span class="filter-label">{{{ if filters.sort.active }}}{filters.sort.label}{{{ else }}}[[search:sort]]{{{ end }}}</span>
|
|
143
|
+
<span class="caret"></span>
|
|
144
|
+
</a>
|
|
145
|
+
|
|
146
|
+
<ul class="dropdown-menu" style="width: 250px;">
|
|
147
|
+
<li class="px-3 py-1 d-flex flex-column gap-2">
|
|
148
|
+
<select id="post-sort-by" class="form-select py-2 ps-2 pe-3">
|
|
149
|
+
<option value="relevance">[[search:relevance]]</option>
|
|
150
|
+
<option value="timestamp">[[search:post-time]]</option>
|
|
151
|
+
<option value="votes">[[search:votes]]</option>
|
|
152
|
+
<option value="topic.lastposttime">[[search:last-reply-time]]</option>
|
|
153
|
+
<option value="topic.title">[[search:topic-title]]</option>
|
|
154
|
+
<option value="topic.postcount">[[search:number-of-replies]]</option>
|
|
155
|
+
<option value="topic.viewcount">[[search:number-of-views]]</option>
|
|
156
|
+
<option value="topic.votes">[[search:topic-votes]]</option>
|
|
157
|
+
<option value="topic.timestamp">[[search:topic-start-date]]</option>
|
|
158
|
+
<option value="user.username">[[search:username]]</option>
|
|
159
|
+
<option value="category.name">[[search:category]]</option>
|
|
160
|
+
</select>
|
|
161
|
+
<select id="post-sort-direction" class="form-select py-2 ps-2 pe-3">
|
|
162
|
+
<option value="desc">[[search:descending]]</option>
|
|
163
|
+
<option value="asc">[[search:ascending]]</option>
|
|
164
|
+
</select>
|
|
165
|
+
</li>
|
|
166
|
+
</ul>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<!-- save & reset preferences -->
|
|
171
|
+
<div class="post-search-item">
|
|
172
|
+
<div class="dropdown">
|
|
173
|
+
<a class="btn btn-light btn-sm border border-gray-300 dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">[[search:save]] <span class="caret"></span>
|
|
174
|
+
</a>
|
|
175
|
+
|
|
176
|
+
<ul class="dropdown-menu" style="width: 300px;">
|
|
177
|
+
<li class="px-3 py-1 d-flex flex-column gap-2">
|
|
178
|
+
<button id="save-preferences" class="btn btn-primary">[[search:save-preferences]]</button>
|
|
179
|
+
<button id="clear-preferences" class="btn-outline border">[[search:clear-preferences]]</button>
|
|
180
|
+
</li>
|
|
181
|
+
</ul>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
{{{ if matchCount }}}
|
|
2
|
+
<div class="card card-header text-xs px-2 py-1 fw-semibold border-0 align-self-start">[[search:results_matching, {matchCount}, {search_query}, {time}]] </div>
|
|
3
|
+
{{{ else }}}
|
|
4
|
+
{{{ if search_query }}}
|
|
5
|
+
<div class="badge text-bg-warning align-self-start">[[search:no-matches]]</div>
|
|
6
|
+
{{{ end }}}
|
|
7
|
+
{{{ end }}}
|
|
8
|
+
|
|
9
|
+
<div id="results" class="search-results" data-search-query="{search_query}">
|
|
10
|
+
{{{ if showAsPosts }}}
|
|
11
|
+
{{{ if posts.length }}}
|
|
12
|
+
<!-- IMPORT partials/posts_list.tpl -->
|
|
9
13
|
{{{ end }}}
|
|
10
14
|
{{{ end }}}
|
|
11
15
|
|
|
12
|
-
{{{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
{{{ if showAsTopics }}}
|
|
17
|
+
{{{ each posts }}}
|
|
18
|
+
<hr/>
|
|
19
|
+
<div class="topic-row mb-3">
|
|
20
|
+
<a class="topic-title fw-semibold fs-5 text-reset text-break" href="{config.relative_path}/post/{./pid}">
|
|
21
|
+
{{{ if !./isMainPost }}}RE: {{{ end }}}{./topic.title}
|
|
22
|
+
</a>
|
|
23
|
+
<div class="post-body d-flex flex-column gap-1">
|
|
24
|
+
<div class="d-flex gap-3 post-info">
|
|
25
|
+
<div class="post-author d-flex gap-1">
|
|
26
|
+
<a class="lh-1 text-decoration-none" href="{config.relative_path}/user/{./user.userslug}">{buildAvatar(./user, "16px", true, "not-responsive")}</a>
|
|
27
|
+
<a class="fw-semibold text-sm" href="{config.relative_path}/user/{./user.userslug}">{../user.displayname}</a>
|
|
28
|
+
</div>
|
|
29
|
+
<span class="timeago text-sm text-muted" title="{./timestampISO}"></span>
|
|
24
30
|
</div>
|
|
25
|
-
{{{ end }}}
|
|
26
|
-
|
|
27
|
-
<small class="post-info float-end">
|
|
28
|
-
<a href="{config.relative_path}/category/{./category.slug}">
|
|
29
|
-
<div class="category-item d-inline-block">
|
|
30
|
-
{buildCategoryIcon(./category, "24px", "rounded-circle")}
|
|
31
|
-
{./category.name}
|
|
32
|
-
</div>
|
|
33
|
-
</a> •
|
|
34
|
-
<span class="timeago" title="{./timestampISO}"></span>
|
|
35
|
-
</small>
|
|
36
31
|
</div>
|
|
37
32
|
</div>
|
|
38
|
-
{{{end}}}
|
|
33
|
+
{{{ end }}}
|
|
34
|
+
{{{ end }}}
|
|
39
35
|
|
|
40
36
|
{{{ if users.length }}}
|
|
41
37
|
<!-- IMPORT partials/users_list.tpl -->
|
package/templates/search.tpl
CHANGED
|
@@ -1,183 +1,45 @@
|
|
|
1
|
-
<!-- THIS FILE IS STILL PERSONA -->
|
|
2
|
-
|
|
3
1
|
<div class="search">
|
|
4
|
-
<div class="row">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<label class="form-label"> </label>
|
|
37
|
-
<button type="submit" class="btn btn-primary form-control">[[global:search]]</button>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<div class="card">
|
|
43
|
-
<h5 class="card-header pointer" data-bs-toggle="collapse" data-bs-target=".search-options">
|
|
44
|
-
<i class="fa fa-sort"></i> [[search:advanced-search]]
|
|
45
|
-
</h5>
|
|
46
|
-
<div class="collapse search-options {{{ if expandSearch }}}show{{{ end }}}">
|
|
47
|
-
<div class="card-body">
|
|
48
|
-
<div class="mb-2 post-search-item">
|
|
49
|
-
<div class="row">
|
|
50
|
-
<div class="col-md-6">
|
|
51
|
-
<label class="form-label">[[search:in-categories]]</label>
|
|
52
|
-
<select multiple class="form-select" id="posted-in-categories" size="{allCategoriesCount}">
|
|
53
|
-
{{{each allCategories}}}
|
|
54
|
-
<option value="{allCategories.value}">{allCategories.text}</option>
|
|
55
|
-
{{{end}}}
|
|
56
|
-
</select>
|
|
57
|
-
<div class="form-check">
|
|
58
|
-
<input id="search-children" class="form-check-input" type="checkbox"/>
|
|
59
|
-
<label class="form-check-label" for="search-children">[[search:search-child-categories]]</label>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="col-md-6">
|
|
63
|
-
<div class="mb-2 post-search-item">
|
|
64
|
-
<div class="row">
|
|
65
|
-
<div class="col-md-6">
|
|
66
|
-
<label class="form-label">[[search:posted-by]]</label>
|
|
67
|
-
<div>
|
|
68
|
-
<input type="text" class="form-control" id="posted-by-user">
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
<div class="col-md-6">
|
|
72
|
-
<label class="form-label">[[search:has-tags]]</label>
|
|
73
|
-
<div>
|
|
74
|
-
<input type="text" class="form-control" id="has-tags">
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
<div class="mb-2 post-search-item">
|
|
81
|
-
<label class="form-label">[[search:reply-count]]</label>
|
|
82
|
-
<div class="row">
|
|
83
|
-
<div class="col-md-6">
|
|
84
|
-
<select id="reply-count-filter" class="form-select">
|
|
85
|
-
<option value="atleast">[[search:at-least]]</option>
|
|
86
|
-
<option value="atmost">[[search:at-most]]</option>
|
|
87
|
-
</select>
|
|
88
|
-
</div>
|
|
89
|
-
<div class="col-md-6">
|
|
90
|
-
<input type="text" class="form-control" id="reply-count">
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
<div class="mb-2 post-search-item">
|
|
96
|
-
<label class="form-label">[[search:post-time]]</label>
|
|
97
|
-
<div class="row">
|
|
98
|
-
<div class="col-md-6">
|
|
99
|
-
<select id="post-time-filter" class="form-select">
|
|
100
|
-
<option value="newer">[[search:newer-than]]</option>
|
|
101
|
-
<option value="older">[[search:older-than]]</option>
|
|
102
|
-
</select>
|
|
103
|
-
</div>
|
|
104
|
-
<div class="col-md-6">
|
|
105
|
-
<select id="post-time-range" class="form-select">
|
|
106
|
-
<option value="">[[search:any-date]]</option>
|
|
107
|
-
<option value="86400">[[search:yesterday]]</option>
|
|
108
|
-
<option value="604800">[[search:one-week]]</option>
|
|
109
|
-
<option value="1209600">[[search:two-weeks]]</option>
|
|
110
|
-
<option value="2592000">[[search:one-month]]</option>
|
|
111
|
-
<option value="7776000">[[search:three-months]]</option>
|
|
112
|
-
<option value="15552000">[[search:six-months]]</option>
|
|
113
|
-
<option value="31104000">[[search:one-year]]</option>
|
|
114
|
-
</select>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<div class="mb-2 post-search-item">
|
|
120
|
-
<label class="form-label">[[search:sort-by]]</label>
|
|
121
|
-
<div class="row">
|
|
122
|
-
<div class="col-md-6">
|
|
123
|
-
<select id="post-sort-by" class="form-select">
|
|
124
|
-
<option value="relevance">[[search:relevance]]</option>
|
|
125
|
-
<option value="timestamp">[[search:post-time]]</option>
|
|
126
|
-
<option value="votes">[[search:votes]]</option>
|
|
127
|
-
<option value="topic.lastposttime">[[search:last-reply-time]]</option>
|
|
128
|
-
<option value="topic.title">[[search:topic-title]]</option>
|
|
129
|
-
<option value="topic.postcount">[[search:number-of-replies]]</option>
|
|
130
|
-
<option value="topic.viewcount">[[search:number-of-views]]</option>
|
|
131
|
-
<option value="topic.votes">[[search:topic-votes]]</option>
|
|
132
|
-
<option value="topic.timestamp">[[search:topic-start-date]]</option>
|
|
133
|
-
<option value="user.username">[[search:username]]</option>
|
|
134
|
-
<option value="category.name">[[search:category]]</option>
|
|
135
|
-
</select>
|
|
136
|
-
</div>
|
|
137
|
-
<div class="col-md-6">
|
|
138
|
-
<select id="post-sort-direction" class="form-select">
|
|
139
|
-
<option value="desc">[[search:descending]]</option>
|
|
140
|
-
<option value="asc">[[search:ascending]]</option>
|
|
141
|
-
</select>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
|
|
146
|
-
<div class="mb-2 post-search-item">
|
|
147
|
-
<label class="form-label">[[search:show-results-as]]</label>
|
|
148
|
-
<div class="radio">
|
|
149
|
-
<label>
|
|
150
|
-
<input type="radio" name="options" id="show-as-posts" checked>
|
|
151
|
-
[[global:posts]]
|
|
152
|
-
</label>
|
|
153
|
-
</div>
|
|
154
|
-
<div class="radio">
|
|
155
|
-
<label>
|
|
156
|
-
<input type="radio" name="options" id="show-as-topics">
|
|
157
|
-
[[global:topics]]
|
|
158
|
-
</label>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
</div>
|
|
164
|
-
|
|
165
|
-
<div class="btn-group">
|
|
166
|
-
<button type="submit" class="btn btn-primary">[[global:search]]</button>
|
|
167
|
-
<a class="btn btn-outline-secondary" id="save-preferences" href="#">[[search:save-preferences]]</a>
|
|
168
|
-
<a class="btn btn-outline-secondary" id="clear-preferences" href="#">[[search:clear-preferences]]</a>
|
|
169
|
-
</div>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
2
|
+
<div id="advanced-search" class="d-flex flex-column flex-md-row">
|
|
3
|
+
<!-- sidebar -->
|
|
4
|
+
<div class="flex-0 pe-2 border-end-md text-sm mb-3" style="flex-basis: 240px!important;">
|
|
5
|
+
<form action="{config.relative_path}/search" method="get" class="nav sticky-md-top d-flex flex-row flex-md-column flex-wrap gap-3 pe-md-3" style="top: 1rem; z-index: 1;">
|
|
6
|
+
<h2 class="fw-semibold tracking-tight mb-0">[[global:search]]</h2>
|
|
7
|
+
|
|
8
|
+
<input id="search-input" name="term" type="text" class="form-control fw-semibold py-2 ps-2 pe-3" id="search-input" placeholder="[[search:type-to-search]]">
|
|
9
|
+
|
|
10
|
+
<select id="search-in" name="in" class="form-select text-sm py-2 ps-2 pe-3">
|
|
11
|
+
<option value="titlesposts">[[search:in-titles-posts]]</option>
|
|
12
|
+
<option value="titles">[[search:in-titles]]</option>
|
|
13
|
+
<option value="posts">[[search:in-posts]]</option>
|
|
14
|
+
<option value="categories">[[search:in-categories]]</option>
|
|
15
|
+
{{{if privileges.search:users}}}
|
|
16
|
+
<option value="users">[[search:in-users]]</option>
|
|
17
|
+
{{{end}}}
|
|
18
|
+
{{{if privileges.search:tags}}}
|
|
19
|
+
<option value="tags">[[search:in-tags]]</option>
|
|
20
|
+
{{{end}}}
|
|
21
|
+
</select>
|
|
22
|
+
|
|
23
|
+
<select id="match-words-filter" name="matchWords" class="post-search-item form-select text-sm py-2 ps-2 pe-3">
|
|
24
|
+
<option value="all">[[search:match-all-words]]</option>
|
|
25
|
+
<option value="any">[[search:match-any-word]]</option>
|
|
26
|
+
</select>
|
|
27
|
+
|
|
28
|
+
<select id="show-results-as" name="showAs" class="post-search-item form-select text-sm py-2 ps-2 pe-3">
|
|
29
|
+
<option value="posts" selected>[[search:show-results-as-posts]]</option>
|
|
30
|
+
<option value="topics">[[search:show-results-as-topics]]</option>
|
|
31
|
+
</select>
|
|
32
|
+
|
|
33
|
+
<button type="submit" class="btn btn-primary fw-semibold form-control py-2 px-3">[[global:search]]</button>
|
|
173
34
|
</form>
|
|
174
|
-
|
|
175
|
-
<!-- IMPORT partials/search-results.tpl -->
|
|
176
35
|
</div>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
36
|
+
|
|
37
|
+
<!-- filters and search results -->
|
|
38
|
+
<div class="flex-1 ps-md-2 ps-lg-5" style="min-width:0;">
|
|
39
|
+
<div class="d-flex flex-column gap-3">
|
|
40
|
+
<!-- IMPORT partials/search-filters.tpl -->
|
|
41
|
+
<!-- IMPORT partials/search-results.tpl -->
|
|
42
|
+
</div>
|
|
181
43
|
</div>
|
|
182
44
|
</div>
|
|
183
45
|
</div>
|