nodebb-theme-harmony 1.0.0-beta.104 → 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.104",
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">
@@ -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 }}}