nodebb-theme-persona 13.0.40 → 13.0.42

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/library.js CHANGED
@@ -69,6 +69,16 @@ library.defineWidgetAreas = async function (areas) {
69
69
  });
70
70
 
71
71
  areas = areas.concat([
72
+ {
73
+ name: 'Main post header',
74
+ template: 'topic.tpl',
75
+ location: 'mainpost-header',
76
+ },
77
+ {
78
+ name: 'Main post footer',
79
+ template: 'topic.tpl',
80
+ location: 'mainpost-footer',
81
+ },
72
82
  {
73
83
  name: 'Account Header',
74
84
  template: 'account/profile.tpl',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-persona",
3
- "version": "13.0.40",
3
+ "version": "13.0.42",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/scss/search.scss CHANGED
@@ -1,3 +1,12 @@
1
+ [component="search/filters"] {
2
+ .filter-btn {
3
+ border-color: $gray-300!important;
4
+ &.active-filter {
5
+ border-color: $primary!important;
6
+ }
7
+ }
8
+ }
9
+
1
10
  .search-result-title {
2
11
  font-weight: 600;
3
12
  }
@@ -1,9 +1,9 @@
1
- <div class="form-group">
2
- <label for="agree-terms">[[register:terms_of_use]]</label>
3
- <div class="tos">{termsOfUse}</div>
4
- <div class="checkbox">
5
- <label>
6
- <input type="checkbox" name="agree-terms" id="agree-terms"> [[register:agree_to_terms_of_use]]
7
- </label>
8
- </div>
1
+ <div class="form-group">
2
+ <label for="agree-terms">[[register:terms_of_use]]</label>
3
+ <div class="tos">{termsOfUse}</div>
4
+ <div class="checkbox">
5
+ <label>
6
+ <input type="checkbox" name="agree-terms" id="agree-terms"> [[register:agree_to_terms_of_use]]
7
+ </label>
8
+ </div>
9
9
  </div>
@@ -1,11 +1,11 @@
1
- <!-- IF ../isSection -->
2
- {../name}
3
- <!-- ELSE -->
4
- <!-- IF ../link -->
5
- <a href="{../link}" itemprop="url">
6
- <!-- ELSE -->
7
- <a href="{config.relative_path}/category/{../slug}" itemprop="url">
8
- <!-- ENDIF ../link -->
9
- {../name}
10
- </a>
1
+ <!-- IF ../isSection -->
2
+ {../name}
3
+ <!-- ELSE -->
4
+ <!-- IF ../link -->
5
+ <a href="{../link}" itemprop="url">
6
+ <!-- ELSE -->
7
+ <a href="{config.relative_path}/category/{../slug}" itemprop="url">
8
+ <!-- ENDIF ../link -->
9
+ {../name}
10
+ </a>
11
11
  <!-- ENDIF ../isSection -->
@@ -1,3 +1,11 @@
1
+ {{{ if (!./index && widgets.mainpost-header.length) }}}
2
+ <div data-widget-area="mainpost-header">
3
+ {{{ each widgets.mainpost-header }}}
4
+ {widgets.mainpost-header.html}
5
+ {{{ end }}}
6
+ </div>
7
+ {{{ end }}}
8
+
1
9
  <div class="clearfix post-header">
2
10
  <div class="icon float-start">
3
11
  <a href="<!-- IF posts.user.userslug -->{config.relative_path}/user/{posts.user.userslug}<!-- ELSE -->#<!-- ENDIF posts.user.userslug -->">
@@ -111,4 +119,11 @@
111
119
  </small>
112
120
  </div>
113
121
  <div component="post/replies/container"></div>
114
- </div>
122
+ </div>
123
+ {{{ if (!./index && widgets.mainpost-footer.length) }}}
124
+ <div data-widget-area="mainpost-footer">
125
+ {{{ each widgets.mainpost-footer }}}
126
+ {widgets.mainpost-footer.html}
127
+ {{{ end }}}
128
+ </div>
129
+ {{{ end }}}
@@ -1,183 +1,46 @@
1
1
  <!-- IMPORT partials/breadcrumbs.tpl -->
2
-
3
2
  <div class="search">
4
- <div class="row">
5
- <div class="{{{ if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
6
- <form id="advanced-search" class="mb-3">
7
- <div class="mb-3">
8
- <div class="row">
9
- <div class="col-md-5">
10
- <label class="form-label">[[global:search]]</label>
11
- <input type="text" class="form-control" id="search-input" placeholder="[[global:search]]">
12
- </div>
13
- <div class="col-md-3">
14
- <label class="form-label">[[search:in]]</label>
15
- <select id="search-in" class="form-select">
16
- <option value="titlesposts">[[search:titles-posts]]</option>
17
- <option value="titles">[[search:titles]]</option>
18
- <option value="posts">[[global:posts]]</option>
19
- <option value="categories">[[global:header.categories]]</option>
20
- {{{if privileges.search:users}}}
21
- <option value="users">[[global:users]]</option>
22
- {{{end}}}
23
- {{{if privileges.search:tags}}}
24
- <option value="tags">[[tags:tags]]</option>
25
- {{{end}}}
26
- </select>
27
- </div>
28
- <div class="col-md-2">
29
- <label class="form-label">[[search:match-words]]</label>
30
- <select id="match-words-filter" class="form-select">
31
- <option value="all">[[search:all]]</option>
32
- <option value="any">[[search:any]]</option>
33
- </select>
34
- </div>
35
- <div class="col-md-2">
36
- <label class="form-label">&nbsp;</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>
3
+ <div id="advanced-search" class="d-flex flex-column flex-md-row">
4
+ <!-- sidebar -->
5
+ <div class="flex-0 pe-2 border-end-md text-sm mb-3" style="flex-basis: 240px!important;">
6
+ <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;">
7
+ <h2 class="fw-semibold tracking-tight mb-0">[[global:search]]</h2>
8
+
9
+ <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]]">
10
+
11
+ <select id="search-in" name="in" class="form-select text-sm py-2 ps-2 pe-3">
12
+ <option value="titlesposts">[[search:in-titles-posts]]</option>
13
+ <option value="titles">[[search:in-titles]]</option>
14
+ <option value="posts">[[search:in-posts]]</option>
15
+ <option value="categories">[[search:in-categories]]</option>
16
+ {{{if privileges.search:users}}}
17
+ <option value="users">[[search:in-users]]</option>
18
+ {{{end}}}
19
+ {{{if privileges.search:tags}}}
20
+ <option value="tags">[[search:in-tags]]</option>
21
+ {{{end}}}
22
+ </select>
23
+
24
+ <select id="match-words-filter" name="matchWords" class="post-search-item form-select text-sm py-2 ps-2 pe-3">
25
+ <option value="all">[[search:match-all-words]]</option>
26
+ <option value="any">[[search:match-any-word]]</option>
27
+ </select>
28
+
29
+ <select id="show-results-as" name="showAs" class="post-search-item form-select text-sm py-2 ps-2 pe-3">
30
+ <option value="posts" selected>[[search:show-results-as-posts]]</option>
31
+ <option value="topics">[[search:show-results-as-topics]]</option>
32
+ </select>
33
+
34
+ <button type="submit" class="btn btn-primary fw-semibold form-control py-2 px-3">[[global:search]]</button>
173
35
  </form>
174
-
175
- <!-- IMPORT partials/search-results.tpl -->
176
36
  </div>
177
- <div data-widget-area="sidebar" class="col-lg-3 col-sm-12 {{{ if !widgets.sidebar.length }}}hidden{{{ end }}}">
178
- {{{each widgets.sidebar}}}
179
- {{widgets.sidebar.html}}
180
- {{{end}}}
37
+
38
+ <!-- filters and search results -->
39
+ <div class="flex-1 ps-md-2 ps-lg-5" style="min-width:0;">
40
+ <div class="d-flex flex-column gap-3">
41
+ <!-- IMPORT partials/search-filters.tpl -->
42
+ <!-- IMPORT partials/search-results.tpl -->
43
+ </div>
181
44
  </div>
182
45
  </div>
183
46
  </div>
package/theme.json CHANGED
@@ -1,7 +1,7 @@
1
- {
2
- "id": "nodebb-theme-persona",
3
- "name": "Persona",
4
- "description": "The default theme for NodeBB. Uses a standard approach to forum design.",
5
- "url": "https://github.com/psychobunny/nodebb-theme-persona",
6
- "screenshot": "screenshot.png"
1
+ {
2
+ "id": "nodebb-theme-persona",
3
+ "name": "Persona",
4
+ "description": "The default theme for NodeBB. Uses a standard approach to forum design.",
5
+ "url": "https://github.com/psychobunny/nodebb-theme-persona",
6
+ "screenshot": "screenshot.png"
7
7
  }