nodebb-theme-harmony 2.0.11 → 2.0.12

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/library.js CHANGED
@@ -15,6 +15,7 @@ const defaults = {
15
15
  centerHeaderElements: 'off',
16
16
  mobileTopicTeasers: 'off',
17
17
  stickyToolbar: 'on',
18
+ topicSidebarTools: 'off',
18
19
  autohideBottombar: 'on',
19
20
  openSidebars: 'off',
20
21
  chatModals: 'off',
@@ -147,6 +148,7 @@ library.loadThemeConfig = async function (uid) {
147
148
  config.centerHeaderElements = config.centerHeaderElements === 'on';
148
149
  config.mobileTopicTeasers = config.mobileTopicTeasers === 'on';
149
150
  config.stickyToolbar = config.stickyToolbar === 'on';
151
+ config.topicSidebarTools = config.topicSidebarTools === 'on';
150
152
  config.autohideBottombar = config.autohideBottombar === 'on';
151
153
  config.openSidebars = config.openSidebars === 'on';
152
154
  config.chatModals = config.chatModals === 'on';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.7.0"
6
6
  },
package/scss/mixins.scss CHANGED
@@ -35,24 +35,6 @@
35
35
  margin-left: 1.5rem;
36
36
  transition: border-color 1s ease-out;
37
37
 
38
- &:first-child {
39
- &:before {
40
- content: '';
41
- position: absolute;
42
- top: 0;
43
- height: 16px;
44
- width: 16px;
45
- background-color: $border-color;
46
- border-radius: 100%;
47
- transform: translate(calc(-50% - .5px), -100%);
48
- transition: background-color 1s ease-out;
49
- }
50
-
51
- &.highlight:before {
52
- background-color: $primary;
53
- }
54
- }
55
-
56
38
  &:last-child {
57
39
  padding-bottom: 2rem;
58
40
 
@@ -21,8 +21,8 @@ body.template-topic {
21
21
  min-width: 170px;
22
22
  }
23
23
  .scroller-container {
24
- left: 10px;
25
- height: 300px;
24
+ left: 16px;
25
+ height: 275px;
26
26
  border-left: 2px solid $border-color;
27
27
 
28
28
  .scroller-thumb {
@@ -37,6 +37,17 @@
37
37
  </label>
38
38
  </div>
39
39
 
40
+ <div class="form-check form-switch mb-3">
41
+ <input class="form-check-input" type="checkbox" role="switch" id="topicSidebarTools" name="topicSidebarTools" {{{ if theme.topicSidebarTools }}}checked{{{ end }}}>
42
+ <label class="form-check-label" for="topicSidebarTools">
43
+ [[themes/harmony:settings.topicSidebarTools]]
44
+ <p class="form-text mb-0">
45
+ [[themes/harmony:settings.topicSidebarTools.help]]
46
+ </p>
47
+ </label>
48
+ </div>
49
+
50
+
40
51
  <div class="form-check form-switch mb-3">
41
52
  <input class="form-check-input" type="checkbox" role="switch" id="autohideBottombar" name="autohideBottombar" {{{ if theme.autohideBottombar }}}checked{{{ end }}}>
42
53
  <label class="form-check-label" for="autohideBottombar">
@@ -30,6 +30,15 @@
30
30
  </p>
31
31
  </div>
32
32
  </div>
33
+ <div class="form-check form-switch">
34
+ <input type="checkbox" class="form-check-input" id="topicSidebarTools" name="topicSidebarTools" />
35
+ <div for="topicSidebarTools" class="form-check-label">
36
+ [[themes/harmony:settings.topicSidebarTools]]
37
+ <p class="form-text">
38
+ [[themes/harmony:settings.topicSidebarTools.help]]
39
+ </p>
40
+ </div>
41
+ </div>
33
42
  <div class="form-check form-switch">
34
43
  <input type="checkbox" class="form-check-input" id="autohideBottombar" name="autohideBottombar" />
35
44
  <div for="autohideBottombar" class="form-check-label">
@@ -1,14 +1,8 @@
1
- <div class="{{{ if config.theme.stickyToolbar }}}sticky-tools{{{ end }}}">
1
+ <div class="{{{ if config.theme.stickyToolbar }}}sticky-tools{{{ end }}} {{{ if config.theme.topicSidebarTools }}}d-block d-lg-none{{{ end }}}">
2
2
  <nav class="d-flex flex-nowrap my-2 p-0 border-0 rounded topic-main-buttons">
3
3
  <div class="d-flex flex-row p-2 text-bg-light border rounded w-100 align-items-center">
4
4
  <div class="d-flex me-auto mb-0 gap-2 align-items-center flex-wrap">
5
- {{{ if loggedIn }}}
6
- <button component="topic/mark-unread" class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center">
7
- <i class="fa fa-fw fa-inbox text-primary"></i>
8
- <span class="d-none d-md-inline fw-semibold">[[topic:mark-unread]]</span>
9
- </button>
10
- {{{ end }}}
11
-
5
+ <!-- IMPORT partials/topic/mark-unread.tpl -->
12
6
  <!-- IMPORT partials/topic/watch.tpl -->
13
7
  <!-- IMPORT partials/topic/sort.tpl -->
14
8
  <!-- IMPORT partials/topic/tools.tpl -->
@@ -16,10 +10,6 @@
16
10
  {{{ if (!feeds:disableRSS && rssFeedUrl) }}}
17
11
  <a class="btn btn-ghost btn-sm d-none d-lg-flex align-items-center align-self-stretch" target="_blank" href="{rssFeedUrl}" title="[[global:rss-feed]]"><i class="fa fa-rss text-primary"></i></a>
18
12
  {{{ end }}}
19
-
20
- {{{ if browsingUsers }}}
21
- <div class="hidden-xs"><!-- IMPORT partials/topic/browsing-users.tpl --></div>
22
- {{{ end }}}
23
13
  </div>
24
14
  <!-- IMPORT partials/topic/reply-button.tpl -->
25
15
  </div>
@@ -0,0 +1,6 @@
1
+ {{{ if loggedIn }}}
2
+ <button component="topic/mark-unread" class="btn btn-ghost btn-sm ff-secondary d-flex gap-2 align-items-center">
3
+ <i class="fa fa-fw fa-inbox text-primary"></i>
4
+ <span class="d-none d-md-inline fw-semibold">[[topic:mark-unread]]</span>
5
+ </button>
6
+ {{{ end }}}
@@ -1,26 +1,22 @@
1
- <div class="pagination-block d-none d-lg-block flex-grow-1 mb-4">
2
- <div class="d-flex justify-content-end sticky-top mt-4" style="top:6rem;z-index:1;">
3
- <div class="ps-1 ps-md-0 d-inline-block">
4
- <div class="scroller-content d-flex gap-2 flex-column align-items-start">
5
- <button class="pagetop btn btn-ghost btn-sm ff-secondary d-inline-flex border-0 align-items-center gap-2" style="padding: 4px;"><i class="fa fa-chevron-up"></i> <span class="timeago text-xs text-muted text-nowrap" title="{./timestampISO}"></span></button>
6
- <div class="scroller-container position-relative">
7
- <div class="scroller-thumb d-flex gap-2 text-nowrap position-relative" style="height: 40px;">
8
- <div class="scroller-thumb-icon bg-primary rounded d-inline-block" style="width:9px; height: 40px;"></div>
9
- <div>
10
- <p class="small thumb-text d-none d-md-inline-block ff-secondary fw-semibold user-select-none mb-0"></p>
11
- <p class="meta thumb-timestamp timeago text-xs text-muted ff-secondary fw-semibold mb-0 user-select-none"></p>
12
- </div>
13
- </div>
1
+ <div class="pagination-block d-none d-lg-block">
2
+ <div class="scroller-content d-flex gap-2 flex-column align-items-start">
3
+ <button class="pagetop btn btn-ghost btn-sm ff-secondary d-inline-flex border-0 align-items-center gap-2" style="padding: 4px 8px;"><i class="fa fa-fw fa-chevron-up"></i> <span class="timeago text-xs text-muted text-nowrap" title="{./timestampISO}"></span></button>
4
+ <div class="scroller-container position-relative">
5
+ <div class="scroller-thumb d-flex gap-2 text-nowrap position-relative" style="height: 40px;">
6
+ <div class="scroller-thumb-icon bg-primary rounded d-inline-block" style="width:9px; height: 40px;"></div>
7
+ <div>
8
+ <p class="small thumb-text d-none d-md-inline-block ff-secondary fw-semibold user-select-none mb-0"></p>
9
+ <p class="meta thumb-timestamp timeago text-xs text-muted ff-secondary fw-semibold mb-0 user-select-none"></p>
10
+ </div>
11
+ </div>
14
12
 
15
- <div class="unread d-inline-block position-absolute bottom-0">
16
- <div class="meta small position-absolute top-50 translate-middle-y text-nowrap fw-semibold ms-2">
17
- <a class="text-decoration-none" href="{url}" tabindex="-1" aria-disabled="true" aria-label="[[topic:unread-posts-link]]"></a>
18
- </div>
19
- </div>
13
+ <div class="unread d-inline-block position-absolute bottom-0">
14
+ <div class="meta small position-absolute top-50 translate-middle-y text-nowrap fw-semibold ms-2">
15
+ <a class="text-decoration-none" href="{url}" tabindex="-1" aria-disabled="true" aria-label="[[topic:unread-posts-link]]"></a>
20
16
  </div>
21
- <button class="pagebottom btn btn-ghost btn-sm ff-secondary d-inline-flex border-0 align-items-center gap-2" style="padding: 4px;"><i class="fa fa-chevron-down"></i> <span class="timeago text-xs text-muted text-nowrap" title="{./lastposttimeISO}"></span></button>
22
17
  </div>
23
18
  </div>
19
+ <button class="pagebottom btn btn-ghost btn-sm ff-secondary d-inline-flex border-0 align-items-center gap-2" style="padding: 4px 8px;"><i class="fa fa-fw fa-chevron-down"></i> <span class="timeago text-xs text-muted text-nowrap" title="{./lastposttimeISO}"></span></button>
24
20
  </div>
25
21
  </div>
26
22
 
@@ -1,7 +1,7 @@
1
1
  {{{ if privileges.topics:reply }}}
2
2
  <div component="topic/reply/container" class="btn-group">
3
- <a href="{config.relative_path}/compose?tid={tid}" class="d-flex align-items-center btn btn-sm btn-primary px-3 fw-semibold" component="topic/reply" data-ajaxify="false" role="button"><i class="fa fa-reply d-sm-block d-md-none"></i><span class="d-none d-md-block"> [[topic:reply]]</span></a>
4
- <button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="[[topic:reply-options]]">
3
+ <a href="{config.relative_path}/compose?tid={tid}" class="d-flex {{{ if !config.theme.topicSidebarTools}}}px-3{{{ end }}} gap-2 align-items-center btn btn-sm btn-primary fw-semibold" component="topic/reply" data-ajaxify="false" role="button"><i class="fa fa-fw fa-reply {{{ if !config.theme.topicSidebarTools}}} d-sm-block d-md-none {{{ end }}}"></i><span class="d-none d-md-block"> [[topic:reply]]</span></a>
4
+ <button type="button" class="btn btn-sm btn-primary dropdown-toggle flex-0" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="[[topic:reply-options]]">
5
5
  <span class="caret"></span>
6
6
  </button>
7
7
  <ul class="dropdown-menu dropdown-menu-end p-1 text-sm" role="menu">
@@ -67,9 +67,9 @@
67
67
 
68
68
  <div class="d-flex gap-0 gap-lg-5">
69
69
  <div class="posts-container" style="min-width: 0;">
70
- <ul component="topic" class="posts timeline list-unstyled mt-sm-2 p-0 py-3" style="min-width: 0;" data-tid="{tid}" data-cid="{cid}">
70
+ <ul component="topic" class="posts timeline list-unstyled p-0 py-3" style="min-width: 0;" data-tid="{tid}" data-cid="{cid}">
71
71
  {{{ each posts }}}
72
- <li component="post" class="pt-4 {{{ if posts.deleted }}}deleted{{{ end }}} {{{ if posts.selfPost }}}self-post{{{ end }}} {{{ if posts.topicOwnerPost }}}topic-owner-post{{{ end }}}" <!-- IMPORT partials/data/topic.tpl -->>
72
+ <li component="post" class="{{{ if (./index != 0) }}}pt-4{{{ end }}} {{{ if posts.deleted }}}deleted{{{ end }}} {{{ if posts.selfPost }}}self-post{{{ end }}} {{{ if posts.topicOwnerPost }}}topic-owner-post{{{ end }}}" <!-- IMPORT partials/data/topic.tpl -->>
73
73
  <a component="post/anchor" data-index="{./index}" id="{increment(./index, "1")}"></a>
74
74
  <meta itemprop="datePublished" content="{./timestampISO}">
75
75
  {{{ if ./editedISO }}}
@@ -93,8 +93,29 @@
93
93
  <!-- IMPORT partials/topic/quickreply.tpl -->
94
94
  {{{ end }}}
95
95
  </div>
96
-
97
- <!-- IMPORT partials/topic/navigator.tpl -->
96
+ <div class="d-flex d-none d-lg-block flex-grow-1 mt-2">
97
+ <div class="sticky-top" style="{{{ if config.theme.topicSidebarTools }}}top:2rem;{{{ else }}}top:6rem; {{{ end }}} z-index:1;">
98
+ <div class="d-flex flex-column gap-3 align-items-end">
99
+ {{{ if config.theme.topicSidebarTools }}}
100
+ <div class="d-flex flex-column gap-2" style="min-width: 170px;">
101
+ <!-- IMPORT partials/topic/reply-button.tpl -->
102
+ <!-- IMPORT partials/topic/mark-unread.tpl -->
103
+ <!-- IMPORT partials/topic/watch.tpl -->
104
+ <!-- IMPORT partials/topic/sort.tpl -->
105
+ <!-- IMPORT partials/topic/tools.tpl -->
106
+ </div>
107
+ {{{ end }}}
108
+ {{{ if config.theme.topicSidebarTools }}}<hr class="my-0" style="min-width: 170px;"/>{{{ end }}}
109
+ <!-- IMPORT partials/topic/navigator.tpl -->
110
+ {{{ if config.theme.topicSidebarTools }}}<hr class="my-0" style="min-width: 170px;" />{{{ end }}}
111
+ {{{ if browsingUsers }}}
112
+ <div class="d-flex flex-column ps-2 hidden-xs" style="min-width: 170px;">
113
+ <!-- IMPORT partials/topic/browsing-users.tpl -->
114
+ </div>
115
+ {{{ end }}}
116
+ </div>
117
+ </div>
118
+ </div>
98
119
  </div>
99
120
 
100
121
  {{{ if config.usePagination }}}