nodebb-theme-harmony 1.0.0-beta.27 → 1.0.0-beta.29

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.
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "skins": "Skins",
3
3
  "collapse": "Collapse",
4
+ "toggle-sidebars": "Toggle sidebars",
4
5
  "login-register-to-search": "Login or register to search.",
5
6
  "settings.title": "Theme settings",
6
7
  "settings.enableQuickReply": "Enable quick reply",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "1.0.0-beta.27",
3
+ "version": "1.0.0-beta.29",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/public/harmony.js CHANGED
@@ -6,6 +6,7 @@ $(document).ready(function () {
6
6
  setupSearch();
7
7
  setupDrafts();
8
8
  handleMobileNavigator();
9
+ setupNavTooltips();
9
10
 
10
11
  $('[component="skinSwitcher"]').on('click', '.dropdown-item', function () {
11
12
  const skin = $(this).attr('data-value');
@@ -142,4 +143,25 @@ $(document).ready(function () {
142
143
  });
143
144
  });
144
145
  }
146
+
147
+ function setupNavTooltips() {
148
+ // remove title from user icon in sidebar to prevent double tooltip
149
+ $('.sidebar [component="header/avatar"] .avatar').removeAttr('title');
150
+ const tooltipEls = $('.sidebar [title]');
151
+ tooltipEls.tooltip({
152
+ trigger: 'manual',
153
+ animation: false,
154
+ });
155
+
156
+ tooltipEls.on('mouseenter', function (ev) {
157
+ const target = $(ev.target);
158
+ const isDropdown = target.hasClass('dropdown-menu') || !!target.parents('.dropdown-menu').length;
159
+ if (!$('.sidebar').hasClass('open') && !isDropdown) {
160
+ $(this).tooltip('show');
161
+ }
162
+ });
163
+ tooltipEls.on('click mouseleave', function () {
164
+ $(this).tooltip('hide');
165
+ });
166
+ }
145
167
  });
package/scss/harmony.scss CHANGED
@@ -21,5 +21,6 @@
21
21
  @import "modules/topics-list";
22
22
  @import "modules/cover";
23
23
  @import "modules/nprogress";
24
+ @import "modules/paginator";
24
25
 
25
26
  @import "skins";
@@ -0,0 +1,24 @@
1
+ .skin-noskin [component="pagination"] {
2
+ .page-item.active:not(.disabled) .page-link {
3
+ color: $body-color;
4
+ background-color: $gray-300;
5
+ border-color: $gray-300;
6
+ }
7
+
8
+ .page-item:not(.disabled):hover .page-link {
9
+ color: $body-color;
10
+ }
11
+ }
12
+
13
+ [component="pagination"] {
14
+ .page-item.active:not(.disabled) .page-link {
15
+ color: $pagination-active-color;
16
+ }
17
+ .page-item:not(.disabled):hover .page-link {
18
+ color: $pagination-hover-color;
19
+ background-color: $pagination-hover-bg;
20
+ }
21
+ .page-item:not(.disabled) .page-link {
22
+ color: $body-color;
23
+ }
24
+ }
@@ -1,13 +1,4 @@
1
1
  <!-- IMPORT partials/breadcrumbs.tpl -->
2
-
3
- {{{ if widgets.header.length }}}
4
- <div data-widget-area="header">
5
- {{{ each widgets.header }}}
6
- {{widgets.header.html}}
7
- {{{ end }}}
8
- </div>
9
- {{{ end }}}
10
-
11
2
  <div class="d-flex flex-column gap-2">
12
3
  <div class="d-flex gap-2 align-items-center mb-1 {{{ if config.centerHeaderElements }}}justify-content-center{{{ end }}}">
13
4
  {buildCategoryIcon(@value, "40px", "rounded-1 flex-shrink-0")}
@@ -25,6 +16,15 @@
25
16
  </div>
26
17
  </div>
27
18
 
19
+ {{{ if widgets.header.length }}}
20
+ <div data-widget-area="header">
21
+ {{{ each widgets.header }}}
22
+ {{widgets.header.html}}
23
+ {{{ end }}}
24
+ </div>
25
+ {{{ end }}}
26
+
27
+
28
28
  <div class="row mt-3">
29
29
  <div class="category d-flex flex-column {{{if widgets.sidebar.length }}}col-lg-9 col-sm-12{{{ else }}}col-lg-12{{{ end }}}">
30
30
  <!-- IMPORT partials/category/subcategory.tpl -->
@@ -1,5 +1,3 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
1
  <!-- IMPORT partials/breadcrumbs.tpl -->
4
2
  <div class="users">
5
3
  <!-- IMPORT partials/users_list.tpl -->
@@ -1,5 +1,3 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
1
  {{{ each tags }}}
4
2
  <a href="{config.relative_path}/tags/{topics.tags.value}"><span class="tag-item" data-tag="{topics.tags.value}">{topics.tags.value}</span><span class="tag-topic-count human-readable-number" title="{topics.tags.score}">{topics.tags.score}</span></a>
5
3
  {{{ end }}}
@@ -1,6 +1,6 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
- <div class="cookie-consent">
4
- <button class="float-end btn btn-primary">{dismiss}</button>
5
- {message} <a target="_blank" rel="noopener" href="{link_url}">{link}</a>
1
+ <div class="d-flex justify-content-center position-fixed start-0 bottom-0 w-100 mb-5 mb-md-0">
2
+ <div class="cookie-consent text-bg-info w-50 p-3 rounded d-flex gap-2 mb-5 mb-md-3 justify-content-between align-items-center">
3
+ <span>{message} <a class="fw-bold" target="_blank" rel="noopener" href="{link_url}">{link}</a></span>
4
+ <button class="btn btn-primary text-nowrap">{dismiss}</button>
5
+ </div>
6
6
  </div>
@@ -1,45 +1,45 @@
1
1
  <div component="pagination" class="pagination-container mt-3{{{ if !pagination.pages.length }}} hidden{{{ end }}}">
2
2
  <ul class="pagination pagination-sm gap-1 hidden-xs hidden-sm justify-content-center">
3
3
  <li class="page-item previous float-start{{{ if !pagination.prev.active }}} disabled{{{ end }}}">
4
- <a class="page-link rounded fw-secondary text-reset px-3" href="?{pagination.prev.qs}" data-page="{pagination.prev.page}"><i class="fa fa-chevron-left"></i> </a>
4
+ <a class="page-link rounded fw-secondary px-3" href="?{pagination.prev.qs}" data-page="{pagination.prev.page}"><i class="fa fa-chevron-left"></i> </a>
5
5
  </li>
6
6
 
7
7
  {{{each pagination.pages}}}
8
8
  {{{ if pagination.pages.separator }}}
9
9
  <li component="pagination/select-page" class="page-item page select-page">
10
- <a class="page-link rounded fw-secondary text-reset px-3" href="#"><i class="fa fa-ellipsis-h"></i></a>
10
+ <a class="page-link rounded fw-secondary px-3" href="#"><i class="fa fa-ellipsis-h"></i></a>
11
11
  </li>
12
12
  {{{ else }}}
13
13
  <li class="page-item page{{{ if pagination.pages.active }}} active{{{ end }}}" >
14
- <a class="page-link rounded fw-secondary text-reset px-3" href="?{pagination.pages.qs}" data-page="{pagination.pages.page}">{pagination.pages.page}</a>
14
+ <a class="page-link rounded fw-secondary px-3" href="?{pagination.pages.qs}" data-page="{pagination.pages.page}">{pagination.pages.page}</a>
15
15
  </li>
16
16
  {{{ end }}}
17
17
  {{{end}}}
18
18
 
19
19
  <li class="page-item next float-end {{{ if !pagination.next.active }}} disabled{{{ end }}}">
20
- <a class="page-link rounded fw-secondary text-reset px-3" href="?{pagination.next.qs}" data-page="{pagination.next.page}"> <i class="fa fa-chevron-right"></i></a>
20
+ <a class="page-link rounded fw-secondary px-3" href="?{pagination.next.qs}" data-page="{pagination.next.page}"> <i class="fa fa-chevron-right"></i></a>
21
21
  </li>
22
22
  </ul>
23
23
 
24
24
  <ul class="pagination pagination-sm hidden-md hidden-lg justify-content-center">
25
25
  <li class="page-item first{{{ if !pagination.prev.active }}} disabled{{{ end }}}">
26
- <a class="page-link fw-secondary text-reset" href="?{pagination.first.qs}" data-page="1"><i class="fa fa-fast-backward"></i> </a>
26
+ <a class="page-link fw-secondary href="?{pagination.first.qs}" data-page="1"><i class="fa fa-fast-backward"></i> </a>
27
27
  </li>
28
28
 
29
29
  <li class="page-item previous{{{ if !pagination.prev.active }}} disabled{{{ end }}}">
30
- <a class="page-link fw-secondary text-reset" href="?{pagination.prev.qs}" data-page="{pagination.prev.page}"><i class="fa fa-chevron-left"></i> </a>
30
+ <a class="page-link fw-secondary href="?{pagination.prev.qs}" data-page="{pagination.prev.page}"><i class="fa fa-chevron-left"></i> </a>
31
31
  </li>
32
32
 
33
33
  <li component="pagination/select-page" class="page-item page select-page">
34
- <a class="page-link fw-secondary text-reset" href="#">{pagination.currentPage} / {pagination.pageCount}</a>
34
+ <a class="page-link fw-secondary href="#">{pagination.currentPage} / {pagination.pageCount}</a>
35
35
  </li>
36
36
 
37
37
  <li class="page-item next{{{ if !pagination.next.active }}} disabled{{{ end }}}">
38
- <a class="page-link fw-secondary text-reset" href="?{pagination.next.qs}" data-page="{pagination.next.page}"> <i class="fa fa-chevron-right"></i></a>
38
+ <a class="page-link fw-secondary href="?{pagination.next.qs}" data-page="{pagination.next.page}"> <i class="fa fa-chevron-right"></i></a>
39
39
  </li>
40
40
 
41
41
  <li class="page-item last{{{ if !pagination.next.active }}} disabled{{{ end }}}">
42
- <a class="page-link fw-secondary text-reset" href="?{pagination.last.qs}" data-page="{pagination.pageCount}"><i class="fa fa-fast-forward"></i> </a>
42
+ <a class="page-link fw-secondary href="?{pagination.last.qs}" data-page="{pagination.pageCount}"><i class="fa fa-fast-forward"></i> </a>
43
43
  </li>
44
44
  </ul>
45
45
  </div>
@@ -1,4 +1,4 @@
1
- <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn d-flex gap-2 justify-content-between align-items-center position-relative" title="[[global:header.chats]]" component="chat/dropdown">
1
+ <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn d-flex gap-2 justify-content-between align-items-center position-relative" component="chat/dropdown">
2
2
  <span class="d-flex gap-2 align-items-center text-nowrap truncate-open">
3
3
  <span class="position-relative">
4
4
  <i component="chat/icon" class="fa fa-fw {{{ if unreadCount.chat}}}fa-comment{{{ else }}}fa-comment-o{{{ end }}} unread-count" data-content="{unreadCount.chat}"></i>
@@ -1,4 +1,4 @@
1
- <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn d-flex gap-2 justify-content-between align-items-center position-relative" title="[[global:header.drafts]]">
1
+ <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn d-flex gap-2 justify-content-between align-items-center position-relative">
2
2
  <span class="d-flex gap-2 align-items-center text-nowrap truncate-open">
3
3
  <span class="position-relative">
4
4
  <i component="drafts/icon" class="fa fa-fw fa-pen-to-square unread-count"></i>
@@ -1,23 +1,23 @@
1
- <li id="user_label" class="nav-item mx-2 dropstart usermenu" title="[[global:header.profile]]">
1
+ <li id="user_label" class="nav-item mx-2 dropstart usermenu" title="{user.username}">
2
2
  <!-- IMPORT partials/sidebar/user-menu.tpl -->
3
3
  </li>
4
4
 
5
5
  {{{ if config.searchEnabled }}}
6
- <li component="sidebar/search" class="nav-item mx-2 search dropstart position-relative">
6
+ <li component="sidebar/search" class="nav-item mx-2 search dropstart position-relative" title="[[global:header.search]]">
7
7
  <!-- IMPORT partials/sidebar/search.tpl -->
8
8
  </li>
9
9
  {{{ end }}}
10
10
 
11
- <li component="notifications" class="nav-item mx-2 notifications dropstart">
11
+ <li component="notifications" class="nav-item mx-2 notifications dropstart" title="[[global:header.notifications]]">
12
12
  <!-- IMPORT partials/sidebar/notifications.tpl -->
13
13
  </li>
14
14
 
15
15
  {{{ if canChat }}}
16
- <li class="nav-item mx-2 chats dropstart">
16
+ <li class="nav-item mx-2 chats dropstart" title="[[global:header.chats]]">
17
17
  <!-- IMPORT partials/sidebar/chats.tpl -->
18
18
  </li>
19
19
  {{{ end }}}
20
20
 
21
- <li component="sidebar/drafts" class="nav-item mx-2 drafts dropstart">
21
+ <li component="sidebar/drafts" class="nav-item mx-2 drafts dropstart" title="[[global:header.drafts]]">
22
22
  <!-- IMPORT partials/sidebar/drafts.tpl -->
23
23
  </li>
@@ -1,4 +1,4 @@
1
- <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn d-flex gap-2 justify-content-between align-items-center position-relative" title="[[global:header.notifications]]">
1
+ <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn d-flex gap-2 justify-content-between align-items-center position-relative">
2
2
  <span class="d-flex gap-2 align-items-center text-nowrap truncate-open">
3
3
  <span class="position-relative">
4
4
  <i component="notifications/icon" class="fa fa-fw {{{ if unreadCount.notification}}}fa-bell{{{ else }}}fa-bell-o{{{ end }}} unread-count" data-content="{unreadCount.notification}"></i>
@@ -1,4 +1,4 @@
1
- <a component="search/button" id="search-button" href="#" role="button" class="nav-link nav-btn d-flex gap-2 align-items-center text-truncate" data-bs-toggle="dropdown" title="[[global:header.search]]">
1
+ <a component="search/button" id="search-button" href="#" role="button" class="nav-link nav-btn d-flex gap-2 align-items-center text-truncate" data-bs-toggle="dropdown">
2
2
  <span>
3
3
  <i class="fa fa-search fa-fw"></i>
4
4
  </span>
@@ -33,7 +33,7 @@
33
33
  {{{ end }}}
34
34
 
35
35
  <div class="sidebar-toggle m-2 d-none d-lg-block">
36
- <a href="#" role="button" component="sidebar/toggle" class="nav-btn d-flex gap-2 align-items-center p-2 pointer nav-link w-100 text-nowrap">
36
+ <a href="#" role="button" component="sidebar/toggle" class="nav-btn d-flex gap-2 align-items-center p-2 pointer nav-link w-100 text-nowrap" title="[[harmony:toggle-sidebars]]">
37
37
  <i class="fa fa-fw fa-angles-right"></i>
38
38
  <i class="fa fa-fw fa-angles-left"></i>
39
39
  <span class="nav-text visible-open fw-semibold small lh-1">[[harmony:collapse]]</span>
@@ -1,5 +1,5 @@
1
- <div class="dropend m-2" component="skinSwitcher">
2
- <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn position-relative" title="[[harmony:skins]]">
1
+ <div class="dropend m-2" component="skinSwitcher" title="[[harmony:skins]]">
2
+ <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link nav-btn position-relative">
3
3
  <span class="justify-content-between w-100">
4
4
  <span class="d-flex gap-2 align-items-center text-nowrap truncate-open">
5
5
  <span>
@@ -1,3 +1 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
1
  <!-- This partial intentionally left blank; overwritten by nodebb-plugin-browsing-users -->
@@ -1,3 +1 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
1
  <small data-editor="{editor.userslug}" component="post/editor" class="hidden">[[global:last_edited_by, {editor.username}]] <span class="timeago" title="{editedISO}"></span></small>
@@ -1,5 +1,3 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
1
  <!-- IF posts.display_moderator_tools -->
4
2
  <li>
5
3
  <a class="dropdown-item" component="post/edit" role="menuitem" tabindex="-1" href="#">
@@ -1,5 +1,3 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
1
  {{{ if privileges.editable }}}
4
2
  <li <!-- IF locked -->hidden<!-- ENDIF locked -->><a component="topic/lock" href="#" class="dropdown-item <!-- IF locked -->hidden<!-- ENDIF locked -->"><i class="fa fa-fw fa-lock"></i> [[topic:thread_tools.lock]]</a></li>
5
3
  <li <!-- IF !locked -->hidden<!-- ENDIF !locked -->><a component="topic/unlock" href="#" class="dropdown-item <!-- IF !locked -->hidden<!-- ENDIF !locked -->"><i class="fa fa-fw fa-unlock"></i> [[topic:thread_tools.unlock]]</a></li>
@@ -1,39 +0,0 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
- <div class="persona-usercard">
4
- <a href="{config.relative_path}/user/{userslug}">
5
- <!-- IF picture -->
6
- <div class="usercard-picture" style="background-image:url({picture})"></div>
7
- <!-- ELSE -->
8
- <div class="usercard-picture" style="background-color: {icon:bgColor};">{icon:text}</div>
9
- <!-- ENDIF picture -->
10
- </a>
11
- <div class="usercard-body">
12
- <a href="{config.relative_path}/user/{userslug}">
13
- <span class="usercard-name"><!-- IF fullname -->{fullname}<!-- ELSE -->{username}<!-- ENDIF fullname --></span><br />
14
- <span class="usercard-username"><!-- IF !banned -->@{username}<!-- ELSE -->[[user:banned]]<!-- ENDIF !banned --></span>
15
- <!-- IF !banned -->
16
- <i component="user/status" class="fa fa-circle status {status}" title="[[global:{status}]]"></i>
17
- <!-- ENDIF !banned -->
18
- </a>
19
-
20
- <div class="row usercard-info">
21
- <div class="col-4">
22
- <small>[[global:posts]]</small>
23
- <span class="human-readable-number">{postcount}</span>
24
- </div>
25
- <div class="col-4">
26
- <small>[[global:reputation]]</small>
27
- <span class="human-readable-number">{reputation}</span>
28
- </div>
29
-
30
- <button class="btn-morph persona-fab <!-- IF banned --> hide<!-- ENDIF banned -->">
31
- <span>
32
- <span class="s1"></span>
33
- <span class="s2"></span>
34
- <span class="s3"></span>
35
- </span>
36
- </button>
37
- </div>
38
- </div>
39
- </div>
@@ -1,11 +0,0 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
- <div class="form-group">
4
- <label for="agree-terms">[[register:terms_of_use]]</label>
5
- <div class="tos">{termsOfUse}</div>
6
- <div class="checkbox">
7
- <label>
8
- <input type="checkbox" name="agree-terms" id="agree-terms"> [[register:agree_to_terms_of_use]]
9
- </label>
10
- </div>
11
- </div>
@@ -1,6 +0,0 @@
1
- <!-- THIS FILE IS STILL PERSONA -->
2
-
3
- <section class="menu-section" data-section="navigation">
4
- <ul class="menu-section-list text-bg-dark"></ul>
5
- </section>
6
-