nodebb-theme-harmony 1.0.0-beta.2 → 1.0.0-beta.4
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 +1 -1
- package/public/harmony.js +0 -20
- package/scss/chats.scss +7 -2
- package/scss/sidebar.scss +27 -2
- package/templates/chats.tpl +1 -1
- package/templates/partials/chats/message-window.tpl +3 -2
- package/templates/partials/chats/message.tpl +1 -1
- package/templates/partials/mobile-footer.tpl +8 -8
- package/templates/partials/sidebar/chats.tpl +4 -1
- package/templates/partials/sidebar/drafts.tpl +2 -2
- package/templates/partials/sidebar/notifications.tpl +1 -1
- package/templates/partials/sidebar/search-mobile.tpl +1 -1
- package/templates/partials/sidebar/user-menu.tpl +1 -1
- package/templates/partials/topics_list.tpl +1 -1
- package/templates/topic.tpl +1 -1
package/package.json
CHANGED
package/public/harmony.js
CHANGED
|
@@ -56,26 +56,6 @@ $(document).ready(function () {
|
|
|
56
56
|
$('[component="sidebar/search"]').on('shown.bs.dropdown', function () {
|
|
57
57
|
$(this).find('[component="search/fields"] input[name="query"]').trigger('focus');
|
|
58
58
|
});
|
|
59
|
-
|
|
60
|
-
function resizeResults(hookData) {
|
|
61
|
-
if (hookData && hookData.data && !hookData.data.posts.length) {
|
|
62
|
-
$('.bottombar .quick-search-results').css({ height: 'initial' });
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
const dropdown = $('.bottombar .search-dropdown');
|
|
66
|
-
const padY = dropdown.innerHeight() - dropdown.height();
|
|
67
|
-
const input = dropdown.find('.input-container').outerHeight(true);
|
|
68
|
-
const showMore = dropdown.find('.show-more-container').outerHeight(true);
|
|
69
|
-
const newHeight = Math.max(
|
|
70
|
-
150,
|
|
71
|
-
$(window).height() - (input + (showMore || 0) + (padY * 2) + 30)
|
|
72
|
-
);
|
|
73
|
-
$('.bottombar .quick-search-results').height(newHeight);
|
|
74
|
-
}
|
|
75
|
-
require(['hooks'], function (hooks) {
|
|
76
|
-
$(window).on('resize', resizeResults);
|
|
77
|
-
hooks.on('action:search.quick.complete', resizeResults);
|
|
78
|
-
});
|
|
79
59
|
}
|
|
80
60
|
|
|
81
61
|
function setupDrafts() {
|
package/scss/chats.scss
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
body.page-user-chats {
|
|
7
7
|
overflow: hidden;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
[component="chat/nav-wrapper"] {
|
|
10
|
+
width: 300px;
|
|
11
|
+
}
|
|
12
|
+
.expanded-chat {
|
|
11
13
|
// no taskbar so hide minimize button
|
|
12
14
|
[data-action="minimize"] {
|
|
13
15
|
display: none!important;
|
|
@@ -38,6 +40,9 @@ body.page-user-chats {
|
|
|
38
40
|
|
|
39
41
|
/* Mobile handling of chat page */
|
|
40
42
|
@include media-breakpoint-down(md) {
|
|
43
|
+
[component="chat/nav-wrapper"] {
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
41
46
|
.page-user-chats {
|
|
42
47
|
.chats-full {
|
|
43
48
|
padding-bottom: 8rem!important;
|
package/scss/sidebar.scss
CHANGED
|
@@ -113,7 +113,32 @@
|
|
|
113
113
|
font-size: 9px;
|
|
114
114
|
line-height: 12px;
|
|
115
115
|
}
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
|
|
117
|
+
.navigation-dropdown, .user-dropdown {
|
|
118
|
+
> li {
|
|
119
|
+
> a, .dropdown-item {
|
|
120
|
+
padding: 10px 20px!important;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
left: 0!important;
|
|
124
|
+
right: 0!important;
|
|
125
|
+
bottom: $spacer!important;
|
|
126
|
+
box-shadow: none!important;
|
|
127
|
+
max-height: 60vh!important;
|
|
128
|
+
overflow: auto!important;
|
|
129
|
+
}
|
|
130
|
+
.search-dropdown .quick-search-results {
|
|
131
|
+
max-height: 250px!important;
|
|
132
|
+
overflow-y: auto!important;
|
|
133
|
+
}
|
|
134
|
+
.search-dropdown, .chats-dropdown, .notifications-dropdown, .drafts-dropdown {
|
|
135
|
+
left: 0!important;
|
|
136
|
+
right: 0!important;
|
|
137
|
+
bottom: $spacer!important;
|
|
138
|
+
box-shadow: none!important;
|
|
139
|
+
ul {
|
|
140
|
+
max-height: 60vh!important;
|
|
141
|
+
overflow-y: auto!important;
|
|
142
|
+
}
|
|
118
143
|
}
|
|
119
144
|
}
|
package/templates/chats.tpl
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div class="chats-full d-flex gap-1 vh-100 py-3">
|
|
2
|
-
<div class="d-flex flex-column h-100"
|
|
2
|
+
<div class="d-flex flex-column h-100" component="chat/nav-wrapper" data-loaded="{{{ if roomId }}}1{{{ else }}}0{{{ end }}}">
|
|
3
3
|
<div class="chat-search dropdown mb-2">
|
|
4
4
|
<label class="text-xs text-muted">[[users:search-user-for-chat]]</label>
|
|
5
5
|
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
{{{ if roomId }}}
|
|
8
8
|
<div component="chat/messages" class="expanded-chat d-flex flex-column h-100" data-roomid="{roomId}">
|
|
9
|
-
<div component="chat/header" class="d-flex align-items-center px-3 gap-
|
|
10
|
-
<
|
|
9
|
+
<div component="chat/header" class="d-flex align-items-center px-3 gap-2">
|
|
10
|
+
<a href="#" data-action="close" role="button" class="d-flex d-md-none btn btn-outline align-text-top"><i class="fa fa-chevron-left"></i></a>
|
|
11
|
+
<h5 class="members flex-1 fw-semibold tracking-tight mb-0">
|
|
11
12
|
{./chatWithMessage}
|
|
12
13
|
</h5>
|
|
13
14
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{{{ end }}}
|
|
15
15
|
</div>
|
|
16
16
|
<div class="message-body-wrapper hover-parent">
|
|
17
|
-
<div component="chat/message/body" class="message-body ps-0 py-0 overflow-auto">
|
|
17
|
+
<div component="chat/message/body" class="message-body ps-0 py-0 overflow-auto text-break">
|
|
18
18
|
{messages.content}
|
|
19
19
|
</div>
|
|
20
20
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<div class="text-dark bg-light bottombar p-2 d-flex d-md-none justify-content-between fixed-bottom ff-secondary align-items-center">
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="">
|
|
3
3
|
<button class="btn" data-bs-toggle="dropdown">
|
|
4
4
|
<i class="fa fa-bars"></i>
|
|
5
5
|
</button>
|
|
6
|
-
<ul class="dropdown-menu">
|
|
6
|
+
<ul class="navigation-dropdown dropdown-menu">
|
|
7
7
|
{{{ each navigation }}}
|
|
8
8
|
<!-- IF function.displayMenuItem, @index -->
|
|
9
9
|
<li class="nav-item {./class}{{{ if ./dropdown }}} dropend{{{ end }}}" title="{./title}">
|
|
10
|
-
<a class="nav-link nav-btn navigation-link
|
|
10
|
+
<a class="nav-link nav-btn navigation-link px-3 py-2 {{{ if navigation.dropdown }}}dropdown-toggle{{{ end }}}"
|
|
11
11
|
{{{ if ./dropdown }}} href="#" role="button" data-bs-toggle="collapse" data-bs-target="#collapse-target-{@index}" onclick="event.stopPropagation();" {{{ else }}} href="{./route}"{{{ end }}} {{{ if ./id }}}id="{./id}"{{{ end }}}{{{ if ./targetBlank }}} target="_blank"{{{ end }}}>
|
|
12
12
|
<span class="d-inline-flex justify-content-between align-items-center w-100">
|
|
13
13
|
<span class="text-nowrap truncate-open">
|
|
@@ -38,26 +38,26 @@
|
|
|
38
38
|
{{{ if config.loggedIn }}}
|
|
39
39
|
<ul id="logged-in-menu" class="list-unstyled d-flex align-items-center w-100 gap-3 mb-0">
|
|
40
40
|
{{{ if config.searchEnabled }}}
|
|
41
|
-
<li component="sidebar/search" class="nav-item m-0 search
|
|
41
|
+
<li component="sidebar/search" class="nav-item m-0 search">
|
|
42
42
|
<!-- IMPORT partials/sidebar/search-mobile.tpl -->
|
|
43
43
|
</li>
|
|
44
44
|
{{{ end }}}
|
|
45
45
|
|
|
46
|
-
<li component="notifications" class="nav-item m-0 notifications
|
|
46
|
+
<li component="notifications" class="nav-item m-0 notifications">
|
|
47
47
|
<!-- IMPORT partials/sidebar/notifications.tpl -->
|
|
48
48
|
</li>
|
|
49
49
|
|
|
50
50
|
{{{ if canChat }}}
|
|
51
|
-
<li class="nav-item m-0 chats
|
|
51
|
+
<li class="nav-item m-0 chats">
|
|
52
52
|
<!-- IMPORT partials/sidebar/chats.tpl -->
|
|
53
53
|
</li>
|
|
54
54
|
{{{ end }}}
|
|
55
55
|
|
|
56
|
-
<li component="sidebar/drafts" class="nav-item m-0 drafts
|
|
56
|
+
<li component="sidebar/drafts" class="nav-item m-0 drafts">
|
|
57
57
|
<!-- IMPORT partials/sidebar/drafts.tpl -->
|
|
58
58
|
</li>
|
|
59
59
|
|
|
60
|
-
<li id="user_label" class="nav-item m-0 py-2
|
|
60
|
+
<li id="user_label" class="nav-item m-0 py-2 usermenu">
|
|
61
61
|
<!-- IMPORT partials/sidebar/user-menu.tpl -->
|
|
62
62
|
</li>
|
|
63
63
|
</ul>
|
|
@@ -47,7 +47,10 @@
|
|
|
47
47
|
<li class="notif-dropdown-link">
|
|
48
48
|
<div class="d-flex justify-content-center gap-1 flex-wrap">
|
|
49
49
|
<a component="chats/mark-all-read" role="button" href="#" class="btn btn-sm btn-light mark-all-read flex-fill text-nowrap text-truncate ff-secondary"><i class="fa fa-check-double"></i> [[modules:chat.mark_all_read]]</a>
|
|
50
|
-
|
|
50
|
+
<!-- on md and up see all chats button goes to last room -->
|
|
51
|
+
<a class="d-none d-md-inline btn btn-sm btn-primary flex-fill text-nowrap text-truncate ff-secondary" href="{relative_path}/user/{user.userslug}/chats{{{ if user.lastRoomId }}}/{user.lastRoomId}{{{ end }}}"><i class="fa fa-list"></i> [[modules:chat.see_all]]</a>
|
|
52
|
+
<!-- on xs&sm the see all chats button goes to the list of chats -->
|
|
53
|
+
<a class="d-inline d-md-none btn btn-sm btn-primary flex-fill text-nowrap text-truncate ff-secondary" href="{relative_path}/user/{user.userslug}/chats"><i class="fa fa-list"></i> [[modules:chat.see_all]]</a>
|
|
51
54
|
</div>
|
|
52
55
|
</li>
|
|
53
56
|
</ul>
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
<div class="dropdown-item rounded-1 p-2 d-flex flex-column gap-2 pointer" component="drafts/open" data-save-id="{./save_id}">
|
|
23
23
|
{{{ if (./action == "topics.post") }}}
|
|
24
24
|
{{{ if ./title}}}
|
|
25
|
-
<div class="text text-xs fw-semibold line-clamp-2">{./title}</div>
|
|
25
|
+
<div class="text text-xs fw-semibold line-clamp-2 text-break">{./title}</div>
|
|
26
26
|
{{{ end }}}
|
|
27
27
|
{{{ end }}}
|
|
28
28
|
|
|
29
29
|
{{{ if (./action == "posts.reply") }}}
|
|
30
|
-
<div class="text text-xs fw-semibold line-clamp-2">[[topic:composer.replying_to, "{./title}"]]</div>
|
|
30
|
+
<div class="text text-xs fw-semibold line-clamp-2 text-break">[[topic:composer.replying_to, "{./title}"]]</div>
|
|
31
31
|
{{{ end }}}
|
|
32
32
|
|
|
33
33
|
{{{ if (./action == "posts.edit") }}}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</span>
|
|
9
9
|
<span component="notifications/count" class="visible-open badge rounded-1 bg-primary {{{ if !unreadCount.notification }}}hidden{{{ end }}}">{unreadCount.notification}</span>
|
|
10
10
|
</a>
|
|
11
|
-
<ul class="notifications-dropdown dropdown-menu p-
|
|
11
|
+
<ul class="notifications-dropdown dropdown-menu p-1 shadow">
|
|
12
12
|
<li>
|
|
13
13
|
<ul component="notifications/list" class="notification-list list-unstyled">
|
|
14
14
|
<li class="mb-2 placeholder-wave">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<div class="quick-search-results-container"></div>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-
<div class="d-flex gap-1 input-container
|
|
18
|
+
<div class="d-flex gap-1 input-container">
|
|
19
19
|
<input autocomplete="off" type="text" class="form-control" placeholder="[[global:search]]" name="query" value="">
|
|
20
20
|
|
|
21
21
|
<div class="nav-btn d-flex justify-content-center align-items-center advanced-search-link">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{buildAvatar(user, "20px", true)}
|
|
3
3
|
<span id="user-header-name" class="nav-text small visible-open fw-semibold">{user.username}</span>
|
|
4
4
|
</label>
|
|
5
|
-
<ul id="user-control-list" component="header/usercontrol" class="dropdown-menu shadow p-1 text-sm" aria-labelledby="user_dropdown">
|
|
5
|
+
<ul id="user-control-list" component="header/usercontrol" class="user-dropdown dropdown-menu shadow p-1 text-sm" aria-labelledby="user_dropdown">
|
|
6
6
|
<li>
|
|
7
7
|
<a class="dropdown-item rounded-1 d-flex align-items-center gap-1" component="header/profilelink" href="{relative_path}/user/{user.userslug}">
|
|
8
8
|
<div class="text-center"><span component="user/status" class="badge border border-white border-2 rounded-circle status {user.status}"><span class="visually-hidden">[[global:{user.status}]]</span></span></div>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</div>
|
|
24
24
|
<div class="d-flex flex-column gap-1">
|
|
25
|
-
<h2 component="topic/header" class="title mb-1 {{{ if showSelect }}}me-4{{{ end }}} me-md-0 text-md fw-bold">
|
|
25
|
+
<h2 component="topic/header" class="text-break title mb-1 {{{ if showSelect }}}me-4{{{ end }}} me-md-0 text-md fw-bold">
|
|
26
26
|
{{{ if topics.noAnchor }}}
|
|
27
27
|
<span>{./title}</span>
|
|
28
28
|
{{{ else }}}
|
package/templates/topic.tpl
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
{{{ end }}}
|
|
8
8
|
|
|
9
|
-
<h2 component="post/header" class="fs-2 mb-0 {{{ if config.centerHeaderElements }}}text-center{{{ end }}}" itemprop="name">
|
|
9
|
+
<h2 component="post/header" class="fs-2 mb-0 text-break {{{ if config.centerHeaderElements }}}text-center{{{ end }}}" itemprop="name">
|
|
10
10
|
<span class="topic-title" component="topic/title">{title}</span>
|
|
11
11
|
</h2>
|
|
12
12
|
|