nodebb-theme-harmony 1.2.74 → 1.2.75
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
CHANGED
package/public/harmony.js
CHANGED
|
@@ -254,22 +254,17 @@ $(document).ready(function () {
|
|
|
254
254
|
return;
|
|
255
255
|
}
|
|
256
256
|
['notifications', 'chat'].forEach((type) => {
|
|
257
|
-
const countEl =
|
|
258
|
-
if (!countEl) {
|
|
257
|
+
const countEl = $(`nav.sidebar [component="${type}/count"]`).first();
|
|
258
|
+
if (!countEl.length) {
|
|
259
259
|
return;
|
|
260
260
|
}
|
|
261
|
-
const count = parseInt(countEl.
|
|
261
|
+
const count = parseInt(countEl.text(), 10);
|
|
262
262
|
if (count > 1) {
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
const cloneEl = placeholder.cloneNode(true);
|
|
269
|
-
listEl.insertBefore(cloneEl, placeholder);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
});
|
|
263
|
+
const placeholder = $(`nav.sidebar [component="${type}/list"]`).children().first();
|
|
264
|
+
for (let x = 0; x < count - 1; x++) {
|
|
265
|
+
const cloneEl = placeholder.clone(true);
|
|
266
|
+
cloneEl.insertAfter(placeholder);
|
|
267
|
+
}
|
|
273
268
|
}
|
|
274
269
|
});
|
|
275
270
|
}
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
{{{ each ./children }}}
|
|
21
21
|
{{{ if !./isSection }}}
|
|
22
22
|
<span class="category-children-item small">
|
|
23
|
-
<div class="d-flex
|
|
24
|
-
<i class="fa fa-fw fa-caret-right text-primary
|
|
23
|
+
<div class="d-flex gap-1">
|
|
24
|
+
<i class="fa fa-fw fa-caret-right text-primary" style="line-height: var(--bs-body-line-height);"></i>
|
|
25
25
|
<a href="{{{ if ./link }}}{./link}{{{ else }}}{config.relative_path}/category/{./slug}{{{ end }}}" class="text-reset fw-semibold">{./name}</a>
|
|
26
26
|
</div>
|
|
27
27
|
</span>
|