nodebb-theme-harmony 1.0.0-beta.35 → 1.0.0-beta.37
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
|
@@ -77,11 +77,11 @@ $(document).ready(function () {
|
|
|
77
77
|
|
|
78
78
|
async function renderDraftList() {
|
|
79
79
|
const draftListEl = $('[component="drafts/list"]');
|
|
80
|
-
draftListEl.children(':not(.no-drafts)').remove();
|
|
81
|
-
|
|
82
80
|
const draftItems = drafts.listAvailable();
|
|
83
81
|
if (!draftItems.length) {
|
|
84
82
|
draftListEl.find('.no-drafts').removeClass('hidden');
|
|
83
|
+
draftListEl.find('.placeholder-wave').addClass('hidden');
|
|
84
|
+
draftListEl.find('.draft-item-container').html('');
|
|
85
85
|
return;
|
|
86
86
|
}
|
|
87
87
|
draftItems.reverse().forEach((draft) => {
|
|
@@ -94,7 +94,8 @@ $(document).ready(function () {
|
|
|
94
94
|
|
|
95
95
|
const html = await app.parseAndTranslate('partials/sidebar/drafts', 'drafts', { drafts: draftItems });
|
|
96
96
|
draftListEl.find('.no-drafts').addClass('hidden');
|
|
97
|
-
draftListEl.
|
|
97
|
+
draftListEl.find('.placeholder-wave').addClass('hidden');
|
|
98
|
+
draftListEl.find('.draft-item-container').html(html).find('.timeago').timeago();
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
|
package/scss/overrides.scss
CHANGED
|
@@ -55,7 +55,7 @@ $link-hover-decoration: underline;
|
|
|
55
55
|
|
|
56
56
|
// Custom fonts
|
|
57
57
|
$font-family-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
58
|
-
$font-family-secondary: "Poppins" !default;
|
|
58
|
+
$font-family-secondary: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
|
|
59
59
|
$font-weight-semibold: 500 !default;
|
|
60
60
|
|
|
61
61
|
$breadcrumb-divider: quote("→");
|
|
@@ -10,43 +10,51 @@
|
|
|
10
10
|
</a>
|
|
11
11
|
<ul class="drafts-dropdown dropdown-menu p-1 shadow">
|
|
12
12
|
<li>
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
<div component="drafts/list" class="draft-list list-unstyled d-flex flex-column overscroll-behavior-contain gap-1 pe-1">
|
|
14
|
+
<div class="dropdown-item rounded-1 p-2 d-flex gap-2 placeholder-wave">
|
|
15
|
+
<div class="d-flex flex-grow-1 flex-column w-100">
|
|
16
|
+
<div class="text-xs placeholder col-3"> </div>
|
|
17
|
+
<div class="text-sm placeholder col-11"> </div>
|
|
18
|
+
<div class="text-xs placeholder col-4"> </div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="hidden no-drafts text-center p-2">[[modules:composer.no-drafts]]</div>
|
|
22
|
+
<div class="draft-item-container">
|
|
23
|
+
{{{ each drafts }}}
|
|
24
|
+
{{{ if !@first}}}
|
|
25
|
+
<hr class="my-1"/>
|
|
26
|
+
{{{ end }}}
|
|
27
|
+
<div data-save-id="{./save_id}">
|
|
28
|
+
<div class="d-flex gap-1 justify-content-between ff-base">
|
|
29
|
+
<div class="dropdown-item rounded-1 p-2 d-flex flex-column gap-2 pointer" component="drafts/open" data-save-id="{./save_id}">
|
|
30
|
+
{{{ if (./action == "topics.post") }}}
|
|
31
|
+
{{{ if ./title}}}
|
|
32
|
+
<div class="text text-xs fw-semibold line-clamp-2 text-break">{./title}</div>
|
|
33
|
+
{{{ end }}}
|
|
34
|
+
{{{ end }}}
|
|
28
35
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
{{{ if (./action == "posts.reply") }}}
|
|
37
|
+
<div class="text text-xs fw-semibold line-clamp-2 text-break">[[topic:composer.replying_to, "{./title}"]]</div>
|
|
38
|
+
{{{ end }}}
|
|
32
39
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
{{{ if (./action == "posts.edit") }}}
|
|
41
|
+
<div class="text text-xs fw-semibold line-clamp-2">[[topic:composer.editing]]</div>
|
|
42
|
+
{{{ end }}}
|
|
36
43
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
{{{ if ./text }}}
|
|
45
|
+
<div class="text text-sm line-clamp-3 text-break">{./text}</div>
|
|
46
|
+
{{{ end }}}
|
|
47
|
+
<div class="timeago text-xs text-muted" title="{./timestampISO}"></div>
|
|
48
|
+
</div>
|
|
49
|
+
<div>
|
|
50
|
+
<button component="drafts/delete" data-save-id="{./save_id}" class="btn btn-light btn-sm">
|
|
51
|
+
<i class="unread fa fa-xs fa-trash text-secondary"></i>
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
46
54
|
</div>
|
|
47
55
|
</div>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</
|
|
56
|
+
{{{ end }}}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
51
59
|
</li>
|
|
52
60
|
</ul>
|