nodebb-theme-harmony 1.2.74 → 1.2.76
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,20 +254,18 @@ $(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 listEls =
|
|
264
|
-
listEls.
|
|
265
|
-
const placeholder =
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
listEl.insertBefore(cloneEl, placeholder);
|
|
270
|
-
}
|
|
263
|
+
const listEls = $(`.dropdown-menu [component="${type}/list"]`);
|
|
264
|
+
listEls.each((index, el) => {
|
|
265
|
+
const placeholder = $(el).children().first();
|
|
266
|
+
for (let x = 0; x < count - 1; x++) {
|
|
267
|
+
const cloneEl = placeholder.clone(true);
|
|
268
|
+
cloneEl.insertAfter(placeholder);
|
|
271
269
|
}
|
|
272
270
|
});
|
|
273
271
|
}
|
|
@@ -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>
|