nodebb-theme-harmony 1.0.0-beta.103 → 1.0.0-beta.105

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.
@@ -6,6 +6,7 @@
6
6
  "settings.title": "Theme settings",
7
7
  "settings.enableQuickReply": "Enable quick reply",
8
8
  "settings.centerHeaderElements": "Center header elements",
9
+ "settings.mobileTopicTeasers": "Show topic teasers on mobile",
9
10
  "settings.stickyToolbar": "Sticky toolbar",
10
11
  "settings.stickyToolbar.help": "The toolbar on topic and category pages will stick to the top of the page",
11
12
  "settings.autohideBottombar": "Auto hide bottom bar",
package/library.js CHANGED
@@ -11,6 +11,7 @@ const library = module.exports;
11
11
  const defaults = {
12
12
  enableQuickReply: 'on',
13
13
  centerHeaderElements: 'off',
14
+ mobileTopicTeasers: 'off',
14
15
  stickyToolbar: 'on',
15
16
  autohideBottombar: 'off',
16
17
  openSidebars: 'off',
@@ -112,6 +113,7 @@ async function loadThemeConfig(uid) {
112
113
  const config = { ...defaults, ...themeConfig, ...(_.pick(userConfig, Object.keys(defaults))) };
113
114
  config.enableQuickReply = config.enableQuickReply === 'on';
114
115
  config.centerHeaderElements = config.centerHeaderElements === 'on';
116
+ config.mobileTopicTeasers = config.mobileTopicTeasers === 'on';
115
117
  config.stickyToolbar = config.stickyToolbar === 'on';
116
118
  config.autohideBottombar = config.autohideBottombar === 'on';
117
119
  config.openSidebars = config.openSidebars === 'on';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "1.0.0-beta.103",
3
+ "version": "1.0.0-beta.105",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
@@ -17,6 +17,11 @@
17
17
  <label class="form-check-label" for="centerHeaderElements">[[harmony:settings.centerHeaderElements]]</label>
18
18
  </div>
19
19
 
20
+ <div class="form-check mb-3">
21
+ <input class="form-check-input" type="checkbox" id="mobileTopicTeasers" name="mobileTopicTeasers" {{{ if config.theme.mobileTopicTeasers }}}checked{{{ end }}}>
22
+ <label class="form-check-label" for="mobileTopicTeasers">[[harmony:settings.mobileTopicTeasers]]</label>
23
+ </div>
24
+
20
25
  <div class="form-check mb-3">
21
26
  <input class="form-check-input" type="checkbox" id="stickyToolbar" name="stickyToolbar" {{{ if config.theme.stickyToolbar }}}checked{{{ end }}}>
22
27
  <label class="form-check-label" for="stickyToolbar">
@@ -10,6 +10,10 @@
10
10
  <input type="checkbox" class="form-check-input" id="centerHeaderElements" name="centerHeaderElements" />
11
11
  <label for="centerHeaderElements" class="form-check-label">[[harmony:settings.centerHeaderElements]]</label>
12
12
  </div>
13
+ <div class="form-check form-switch">
14
+ <input type="checkbox" class="form-check-input" id="mobileTopicTeasers" name="mobileTopicTeasers" />
15
+ <label for="mobileTopicTeasers" class="form-check-label">[[harmony:settings.mobileTopicTeasers]]</label>
16
+ </div>
13
17
  <div class="form-check form-switch">
14
18
  <input type="checkbox" class="form-check-input" id="stickyToolbar" name="stickyToolbar" />
15
19
  <div for="stickyToolbar" class="form-check-label">
@@ -2,6 +2,5 @@
2
2
 
3
3
  <div class="d-flex flex-column gap-3">
4
4
  <!-- IMPORT partials/flags/filters.tpl -->
5
- <!-- IMPORT partials/flags/bulk-actions.tpl -->
6
5
  <!-- IMPORT partials/flags/results.tpl -->
7
6
  </div>
@@ -1,8 +1,8 @@
1
- <div class="btn-group float-end" component="flags/bulk-actions">
1
+ <div class="dropdown" component="flags/bulk-actions">
2
2
  <button class="filter-btn btn btn-light btn-sm border" data-bs-toggle="dropdown" autocomplete="off" aria-haspopup="true" aria-expanded="false" disabled="disabled">
3
3
  <span class="filter-label">[[flags:bulk-actions]]</span>
4
4
  </button>
5
- <ul class="dropdown-menu p-1 text-sm">
5
+ <ul class="dropdown-menu dropdown-menu-end p-1 text-sm">
6
6
  <li><a href="#" class="dropdown-item rounded-1" data-action="bulk-assign">[[flags:assign-to-me]]</a></li>
7
7
  <li><a href="#" class="dropdown-item rounded-1" data-action="bulk-mark-resolved">[[flags:bulk-resolve]]</a></li>
8
8
  </ul>
@@ -176,6 +176,8 @@
176
176
  </a>
177
177
  </div>
178
178
 
179
+ <!-- IMPORT partials/flags/bulk-actions.tpl -->
180
+
179
181
  <form role="form">
180
182
  <input type="hidden" name="sort" value="{./sort}" />
181
183
  <input type="hidden" name="state" value="{./filters.state}" />
@@ -87,7 +87,7 @@
87
87
  <i class="d-xl-none fa fa-fw text-xs text-muted opacity-75 fa-eye"></i>
88
88
  </div>
89
89
  </div>
90
- <div component="topic/teaser" class="meta teaser col-lg-6">
90
+ <div component="topic/teaser" class="meta teaser col-lg-6 {{{ if !config.theme.mobileTopicTeasers }}}d-none d-lg-block{{{ end }}}">
91
91
  <div class="lastpost background-link-container border-start border-2 lh-sm h-100" style="border-color: {./category.bgColor}!important;">
92
92
  <a class="background-link" href="{config.relative_path}/topic/{./slug}/{./teaser.index}"></a>
93
93
  {{{ if ./unreplied }}}