nodebb-theme-harmony 1.0.52 → 1.0.54

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
@@ -177,38 +177,7 @@ library.saveUserSettings = async function (hookData) {
177
177
  };
178
178
 
179
179
  library.filterMiddlewareRenderHeader = async function (hookData) {
180
- const userSettings = await user.getSettings(hookData.req.uid);
181
-
182
- const defaultSkin = _.capitalize(meta.config.bootswatchSkin) || '[[user:no-skin]]';
183
- const defaultSkins = [
184
- { name: `[[user:default, ${defaultSkin}]]`, value: '', selected: userSettings.bootswatchSkin === '' },
185
- { name: '[[user:no-skin]]', value: 'noskin', selected: userSettings.bootswatchSkin === 'noskin' },
186
- ];
187
- const lightSkins = [
188
- 'cerulean', 'cosmo', 'flatly', 'journal', 'litera',
189
- 'lumen', 'lux', 'materia', 'minty', 'morph', 'pulse', 'sandstone',
190
- 'simplex', 'sketchy', 'spacelab', 'united', 'yeti', 'zephyr',
191
- ];
192
- const darkSkins = [
193
- 'cyborg', 'darkly', 'quartz', 'slate', 'solar', 'superhero', 'vapor',
194
- ];
195
- function parseSkins(skins) {
196
- skins = skins.map(skin => ({
197
- name: _.capitalize(skin),
198
- value: skin,
199
- }));
200
- skins.forEach((skin) => {
201
- skin.selected = skin.value === userSettings.bootswatchSkin;
202
- });
203
- return skins;
204
- }
205
-
206
- hookData.templateData.bootswatchSkinOptions = {
207
- default: defaultSkins,
208
- light: parseSkins(lightSkins),
209
- dark: parseSkins(darkSkins),
210
- };
211
- hookData.templateData.currentBSSkin = _.capitalize(hookData.templateData.bootswatchSkin);
180
+ hookData.templateData.bootswatchSkinOptions = await meta.css.getSkinSwitcherOptions(hookData.req.uid);
212
181
  return hookData;
213
182
  };
214
183
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "1.0.52",
3
+ "version": "1.0.54",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/scss/topic.scss CHANGED
@@ -35,6 +35,10 @@
35
35
  }
36
36
  }
37
37
 
38
+ > [component="post"] > [component="post/footer"] {
39
+ margin-left: calc($spacer * 2.5);
40
+ }
41
+
38
42
  [component="post"] {
39
43
  &.selected .post-container {
40
44
  background-color: mix($body-bg, $body-color, 90%);
@@ -69,10 +73,6 @@
69
73
  }
70
74
  }
71
75
  }
72
-
73
- > [component="post/footer"] {
74
- margin-left: calc($spacer * 2.5);
75
- }
76
76
  }
77
77
 
78
78
  [component="post/reply-count"] {
@@ -120,8 +120,9 @@
120
120
 
121
121
  [component="post"] {
122
122
  padding-top: 0 !important;
123
-
123
+ padding-bottom: $spacer;
124
124
  &:last-of-type {
125
+ padding-bottom: 0;
125
126
  .post-footer {
126
127
  border-bottom: none !important;
127
128
  }
@@ -95,7 +95,7 @@
95
95
  <label class="form-label text-sm fw-semibold">[[user:sso.title]]</label>
96
96
  <div class="list-group">
97
97
  {{{ each sso }}}
98
- <div class="list-group-item d-flex justify-content-between">
98
+ <div class="list-group-item d-flex align-items-center justify-content-between">
99
99
  <a class="text-sm text-reset text-decoration-none" data-component="{./component}" href="{./url}" target="{{{ if ./associated }}}_blank{{{ else }}}_top{{{ end }}}">
100
100
  {{{ if ./icon }}}<i class="fa {./icon}"></i>{{{ end }}}
101
101
  {{{ if ./associated }}}[[user:sso.associated]]{{{ else }}}[[user:sso.not-associated]]{{{ end }}}
@@ -40,6 +40,11 @@
40
40
  <a href="#" class="dropdown-item rounded-1" data-value="{./value}">{./name} <i class="fa fa-fw fa-check {{{ if !./selected }}} invisible {{{ end }}}"></i></a>
41
41
  </li>
42
42
  {{{ end }}}
43
+ {{{ each bootswatchSkinOptions.custom }}}
44
+ <li>
45
+ <a href="#" class="dropdown-item rounded-1" data-value="{./value}">{./name} <i class="fa fa-fw fa-check {{{ if !./selected }}} invisible {{{ end }}}"></i></a>
46
+ </li>
47
+ {{{ end }}}
43
48
  </div>
44
49
  </ul>
45
50
  </div>