nodebb-theme-harmony 2.0.1 → 2.0.3

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.
Files changed (144) hide show
  1. package/.eslintrc +3 -3
  2. package/README.md +22 -22
  3. package/lib/controllers.js +29 -29
  4. package/library.js +183 -183
  5. package/package.json +48 -48
  6. package/plugin.json +24 -24
  7. package/public/.eslintrc +3 -3
  8. package/public/admin.js +15 -15
  9. package/public/harmony.js +287 -287
  10. package/public/settings.js +31 -31
  11. package/renovate.json +6 -6
  12. package/scss/account.scss +27 -27
  13. package/scss/category.scss +3 -3
  14. package/scss/chats.scss +11 -11
  15. package/scss/common.scss +122 -122
  16. package/scss/fonts.scss +19 -19
  17. package/scss/groups.scss +22 -22
  18. package/scss/harmony.scss +24 -24
  19. package/scss/header.scss +15 -15
  20. package/scss/mixins.scss +183 -183
  21. package/scss/modals.scss +6 -6
  22. package/scss/modules/breadcrumbs.scss +15 -15
  23. package/scss/modules/cover.scss +102 -102
  24. package/scss/modules/filters.scss +7 -7
  25. package/scss/modules/nprogress.scss +80 -80
  26. package/scss/modules/paginator.scss +23 -23
  27. package/scss/modules/tags.scss +5 -5
  28. package/scss/modules/topic-navigator.scss +52 -52
  29. package/scss/modules/topics-list.scss +40 -40
  30. package/scss/modules/user-menu.scss +10 -10
  31. package/scss/overrides.scss +65 -65
  32. package/scss/sidebar.scss +188 -188
  33. package/scss/skins.scss +58 -58
  34. package/scss/status.scss +24 -24
  35. package/scss/topic.scss +130 -130
  36. package/templates/account/blocks.tpl +51 -51
  37. package/templates/account/categories.tpl +63 -63
  38. package/templates/account/consent.tpl +73 -73
  39. package/templates/account/edit/password.tpl +34 -34
  40. package/templates/account/edit/username.tpl +29 -29
  41. package/templates/account/edit.tpl +137 -137
  42. package/templates/account/followers.tpl +14 -14
  43. package/templates/account/following.tpl +15 -15
  44. package/templates/account/groups.tpl +15 -15
  45. package/templates/account/info.tpl +270 -270
  46. package/templates/account/posts.tpl +35 -35
  47. package/templates/account/profile.tpl +92 -92
  48. package/templates/account/sessions.tpl +8 -8
  49. package/templates/account/settings.tpl +236 -236
  50. package/templates/account/shares.tpl +19 -19
  51. package/templates/account/tags.tpl +12 -12
  52. package/templates/account/theme.tpl +63 -63
  53. package/templates/account/topics.tpl +44 -44
  54. package/templates/account/uploads.tpl +37 -37
  55. package/templates/admin/plugins/harmony.tpl +57 -57
  56. package/templates/categories.tpl +29 -29
  57. package/templates/category.tpl +72 -72
  58. package/templates/footer.tpl +17 -17
  59. package/templates/groups/details.tpl +86 -86
  60. package/templates/groups/list.tpl +58 -58
  61. package/templates/groups/members.tpl +9 -9
  62. package/templates/header.tpl +45 -45
  63. package/templates/notifications.tpl +32 -32
  64. package/templates/partials/account/admin-menu.tpl +36 -36
  65. package/templates/partials/account/category-item.tpl +22 -22
  66. package/templates/partials/account/footer.tpl +2 -2
  67. package/templates/partials/account/header.tpl +98 -98
  68. package/templates/partials/account/session-list.tpl +18 -18
  69. package/templates/partials/account/sidebar-left.tpl +116 -116
  70. package/templates/partials/breadcrumbs-json-ld.tpl +15 -15
  71. package/templates/partials/breadcrumbs.tpl +12 -12
  72. package/templates/partials/buttons/newTopic.tpl +22 -22
  73. package/templates/partials/categories/item.tpl +56 -56
  74. package/templates/partials/categories/lastpost.tpl +24 -24
  75. package/templates/partials/categories/link.tpl +4 -4
  76. package/templates/partials/category/subcategory.tpl +18 -18
  77. package/templates/partials/category/tags.tpl +3 -3
  78. package/templates/partials/cookie-consent.tpl +6 -6
  79. package/templates/partials/groups/admin.tpl +95 -95
  80. package/templates/partials/groups/invited.tpl +32 -32
  81. package/templates/partials/groups/list.tpl +15 -15
  82. package/templates/partials/groups/memberlist.tpl +46 -46
  83. package/templates/partials/groups/pending.tpl +29 -29
  84. package/templates/partials/groups/sidebar-left.tpl +27 -27
  85. package/templates/partials/header/brand.tpl +27 -27
  86. package/templates/partials/mobile-footer.tpl +95 -95
  87. package/templates/partials/notifications_list.tpl +44 -44
  88. package/templates/partials/paginator.tpl +46 -46
  89. package/templates/partials/post_bar.tpl +27 -27
  90. package/templates/partials/posts_list.tpl +7 -7
  91. package/templates/partials/posts_list_item.tpl +19 -19
  92. package/templates/partials/quick-search-results.tpl +46 -46
  93. package/templates/partials/search-filters.tpl +183 -183
  94. package/templates/partials/search-results.tpl +54 -54
  95. package/templates/partials/sidebar/chats.tpl +45 -45
  96. package/templates/partials/sidebar/drafts.tpl +63 -63
  97. package/templates/partials/sidebar/logged-in-menu.tpl +22 -22
  98. package/templates/partials/sidebar/logged-out-menu.tpl +44 -44
  99. package/templates/partials/sidebar/notifications.tpl +49 -49
  100. package/templates/partials/sidebar/search-mobile.tpl +28 -28
  101. package/templates/partials/sidebar/search.tpl +30 -30
  102. package/templates/partials/sidebar/user-menu.tpl +103 -103
  103. package/templates/partials/sidebar-left.tpl +39 -39
  104. package/templates/partials/sidebar-right.tpl +16 -16
  105. package/templates/partials/skin-switcher.tpl +50 -50
  106. package/templates/partials/tags_list.tpl +7 -7
  107. package/templates/partials/toast.tpl +19 -19
  108. package/templates/partials/topic/event.tpl +12 -12
  109. package/templates/partials/topic/navigation-post.tpl +9 -9
  110. package/templates/partials/topic/navigator-mobile.tpl +61 -61
  111. package/templates/partials/topic/navigator.tpl +26 -26
  112. package/templates/partials/topic/necro-post.tpl +5 -5
  113. package/templates/partials/topic/post-menu-list.tpl +156 -156
  114. package/templates/partials/topic/post-menu.tpl +4 -4
  115. package/templates/partials/topic/post-placeholder.tpl +14 -14
  116. package/templates/partials/topic/post.tpl +146 -146
  117. package/templates/partials/topic/quickreply.tpl +28 -28
  118. package/templates/partials/topic/reply-button.tpl +26 -26
  119. package/templates/partials/topic/selection-tooltip.tpl +2 -2
  120. package/templates/partials/topic/sort.tpl +27 -27
  121. package/templates/partials/topic/stats.tpl +14 -14
  122. package/templates/partials/topic/thumbs.tpl +4 -4
  123. package/templates/partials/topic/tools.tpl +8 -8
  124. package/templates/partials/topic/topic-menu-list.tpl +73 -73
  125. package/templates/partials/topic/watch.tpl +59 -59
  126. package/templates/partials/topic-filters.tpl +15 -15
  127. package/templates/partials/topic-list-bar.tpl +54 -54
  128. package/templates/partials/topic-terms.tpl +15 -15
  129. package/templates/partials/topics_list.tpl +131 -131
  130. package/templates/partials/users/item.tpl +39 -39
  131. package/templates/partials/users_list.tpl +4 -4
  132. package/templates/partials/users_list_menu.tpl +14 -14
  133. package/templates/popular.tpl +34 -34
  134. package/templates/post-queue.tpl +211 -211
  135. package/templates/recent.tpl +42 -42
  136. package/templates/search.tpl +46 -46
  137. package/templates/tag.tpl +34 -34
  138. package/templates/tags.tpl +49 -49
  139. package/templates/top.tpl +34 -34
  140. package/templates/topic.tpl +123 -123
  141. package/templates/unread.tpl +31 -31
  142. package/templates/users.tpl +39 -39
  143. package/templates/world.tpl +66 -66
  144. package/theme.json +6 -6
package/scss/account.scss CHANGED
@@ -1,27 +1,27 @@
1
- .page-user.page-status-200 #panel {
2
- margin-top: 0px!important;
3
- }
4
- .account {
5
- margin-top: 200px;
6
-
7
- @include media-breakpoint-up(md) {
8
- margin-top: 300px;
9
- }
10
-
11
- .categories {
12
- [component="categories/category"] {
13
- $category-pad: 50;
14
- @for $i from 1 through 6 {
15
- .depth-#{$i} {
16
- padding-left: #{$category-pad * $i}px;
17
- }
18
- }
19
- }
20
- }
21
- }
22
-
23
- [component="group/badge/item"]:first-child [component="group/order/up"],
24
- [component="group/badge/item"]:last-child [component="group/order/down"] {
25
- opacity: 0.65;
26
- pointer-events: none;
27
- }
1
+ .page-user.page-status-200 #panel {
2
+ margin-top: 0px!important;
3
+ }
4
+ .account {
5
+ margin-top: 200px;
6
+
7
+ @include media-breakpoint-up(md) {
8
+ margin-top: 300px;
9
+ }
10
+
11
+ .categories {
12
+ [component="categories/category"] {
13
+ $category-pad: 50;
14
+ @for $i from 1 through 6 {
15
+ .depth-#{$i} {
16
+ padding-left: #{$category-pad * $i}px;
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+ [component="group/badge/item"]:first-child [component="group/order/up"],
24
+ [component="group/badge/item"]:last-child [component="group/order/down"] {
25
+ opacity: 0.65;
26
+ pointer-events: none;
27
+ }
@@ -1,4 +1,4 @@
1
- .category-header .description p { margin: 0; }
2
- .page-category .breadcrumb .breadcrumb-item:last-child {
3
- display: none;
1
+ .category-header .description p { margin: 0; }
2
+ .page-category .breadcrumb .breadcrumb-item:last-child {
3
+ display: none;
4
4
  }
package/scss/chats.scss CHANGED
@@ -1,12 +1,12 @@
1
- // themes have a different layout so each one needs this block to set height to 100%
2
- body.page-user-chats {
3
- > .layout-container {
4
- height: 100%;
5
- > #panel {
6
- height: 100%;
7
- > .container {
8
- height: 100%;
9
- }
10
- }
11
- }
1
+ // themes have a different layout so each one needs this block to set height to 100%
2
+ body.page-user-chats {
3
+ > .layout-container {
4
+ height: 100%;
5
+ > #panel {
6
+ height: 100%;
7
+ > .container {
8
+ height: 100%;
9
+ }
10
+ }
11
+ }
12
12
  }
package/scss/common.scss CHANGED
@@ -1,123 +1,123 @@
1
-
2
- html {
3
- height: 100%;
4
- }
5
-
6
- body {
7
- overflow-y: scroll;
8
- -webkit-font-smoothing: antialiased;
9
- -moz-osx-font-smoothing: grayscale;
10
- text-rendering: optimizeLegibility;
11
- }
12
-
13
- // fixes chrome font boosting :/ https://stackoverflow.com/questions/13430897/how-to-override-font-boosting-in-mobile-chrome
14
- body * {
15
- max-height:1000000px;
16
- text-size-adjust: none;
17
- -webkit-text-size-adjust: none;
18
- -moz-text-size-adjust: none;
19
- }
20
-
21
- hr {
22
- border-top-color: var(--bs-border-color);
23
- opacity: 1;
24
- }
25
-
26
- .ff-base { font-family: $font-family-base !important; }
27
- .ff-sans { font-family: $font-family-sans-serif !important; }
28
- .ff-secondary { font-family: $font-family-secondary; }
29
- .tracking-tight { letter-spacing: -0.02em; }
30
-
31
- .caret {
32
- &::after {
33
- border: none;
34
- font-family: "FontAwesome";
35
- content: "\f078";
36
- }
37
- }
38
-
39
- .placeholder-wave {
40
- opacity: 0.5;
41
- }
42
-
43
- .bg-card-cap {
44
- --bs-bg-opacity: 1;
45
- background-color: $card-cap-bg!important;
46
- }
47
-
48
- blockquote {
49
- $bq-border-color: mix($light, $dark, 75%);
50
- @extend .text-bg-light;
51
- font-style: normal;
52
- border-left: 2px solid $bq-border-color;
53
- padding: 1rem;
54
- p:last-child {
55
- margin-bottom: 0;
56
- }
57
- .toggle {
58
- border-color: $bq-border-color!important;
59
- }
60
- }
61
-
62
- body:not(.page-user) {
63
- #content {
64
- transition: opacity 150ms linear;
65
- &.ajaxifying {
66
- -moz-opacity: 0;
67
- opacity: 0;
68
- }
69
- }
70
- }
71
- .page-user {
72
- #content {
73
- transition: opacity 150ms linear;
74
- &.ajaxifying .account-content {
75
- transition: opacity 150ms linear;
76
- -moz-opacity: 0;
77
- opacity: 0;
78
- }
79
- }
80
- }
81
-
82
- .sticky-tools {
83
- position: sticky;
84
- z-index: 3;
85
- top: 0;
86
- padding: 0.25rem 0;
87
- }
88
- // quartz doesn't need body-bg for tool background
89
- .skin-quartz .sticky-tools {
90
- background-color: initial;
91
- }
92
-
93
- .flex-basis-md-200 {
94
- @include media-breakpoint-up(md) {
95
- flex-basis: 200px!important;
96
- }
97
- }
98
-
99
- .markdown-highlight {
100
- @extend .shadow-sm;
101
- @extend .border;
102
- }
103
-
104
- [component="chat/message/body"], [component="post/content"] {
105
- .img-fluid {
106
- @extend .shadow-sm;
107
- padding: $spacer * 0.5;
108
- margin: $spacer * 0.5 0;
109
- border: 1px solid $border-color;
110
- background-color: $light;
111
- border-radius: $border-radius-sm;
112
- max-height: 500px;
113
- width: auto;
114
- }
115
- }
116
-
117
- [component="chat/message/body"],
118
- [component="post/content"],
119
- [component="topic/teaser"] .post-content,
120
- [component="category/posts"] .post-content,
121
- .post-queue.posts-list .post-content {
122
- a { text-decoration: underline;}
1
+
2
+ html {
3
+ height: 100%;
4
+ }
5
+
6
+ body {
7
+ overflow-y: scroll;
8
+ -webkit-font-smoothing: antialiased;
9
+ -moz-osx-font-smoothing: grayscale;
10
+ text-rendering: optimizeLegibility;
11
+ }
12
+
13
+ // fixes chrome font boosting :/ https://stackoverflow.com/questions/13430897/how-to-override-font-boosting-in-mobile-chrome
14
+ body * {
15
+ max-height:1000000px;
16
+ text-size-adjust: none;
17
+ -webkit-text-size-adjust: none;
18
+ -moz-text-size-adjust: none;
19
+ }
20
+
21
+ hr {
22
+ border-top-color: var(--bs-border-color);
23
+ opacity: 1;
24
+ }
25
+
26
+ .ff-base { font-family: $font-family-base !important; }
27
+ .ff-sans { font-family: $font-family-sans-serif !important; }
28
+ .ff-secondary { font-family: $font-family-secondary; }
29
+ .tracking-tight { letter-spacing: -0.02em; }
30
+
31
+ .caret {
32
+ &::after {
33
+ border: none;
34
+ font-family: "FontAwesome";
35
+ content: "\f078";
36
+ }
37
+ }
38
+
39
+ .placeholder-wave {
40
+ opacity: 0.5;
41
+ }
42
+
43
+ .bg-card-cap {
44
+ --bs-bg-opacity: 1;
45
+ background-color: $card-cap-bg!important;
46
+ }
47
+
48
+ blockquote {
49
+ $bq-border-color: mix($light, $dark, 75%);
50
+ @extend .text-bg-light;
51
+ font-style: normal;
52
+ border-left: 2px solid $bq-border-color;
53
+ padding: 1rem;
54
+ p:last-child {
55
+ margin-bottom: 0;
56
+ }
57
+ .toggle {
58
+ border-color: $bq-border-color!important;
59
+ }
60
+ }
61
+
62
+ body:not(.page-user) {
63
+ #content {
64
+ transition: opacity 150ms linear;
65
+ &.ajaxifying {
66
+ -moz-opacity: 0;
67
+ opacity: 0;
68
+ }
69
+ }
70
+ }
71
+ .page-user {
72
+ #content {
73
+ transition: opacity 150ms linear;
74
+ &.ajaxifying .account-content {
75
+ transition: opacity 150ms linear;
76
+ -moz-opacity: 0;
77
+ opacity: 0;
78
+ }
79
+ }
80
+ }
81
+
82
+ .sticky-tools {
83
+ position: sticky;
84
+ z-index: 3;
85
+ top: 0;
86
+ padding: 0.25rem 0;
87
+ }
88
+ // quartz doesn't need body-bg for tool background
89
+ .skin-quartz .sticky-tools {
90
+ background-color: initial;
91
+ }
92
+
93
+ .flex-basis-md-200 {
94
+ @include media-breakpoint-up(md) {
95
+ flex-basis: 200px!important;
96
+ }
97
+ }
98
+
99
+ .markdown-highlight {
100
+ @extend .shadow-sm;
101
+ @extend .border;
102
+ }
103
+
104
+ [component="chat/message/body"], [component="post/content"] {
105
+ .img-fluid {
106
+ @extend .shadow-sm;
107
+ padding: $spacer * 0.5;
108
+ margin: $spacer * 0.5 0;
109
+ border: 1px solid $border-color;
110
+ background-color: $light;
111
+ border-radius: $border-radius-sm;
112
+ max-height: 500px;
113
+ width: auto;
114
+ }
115
+ }
116
+
117
+ [component="chat/message/body"],
118
+ [component="post/content"],
119
+ [component="topic/teaser"] .post-content,
120
+ [component="category/posts"] .post-content,
121
+ .post-queue.posts-list .post-content {
122
+ a { text-decoration: underline;}
123
123
  }
package/scss/fonts.scss CHANGED
@@ -1,19 +1,19 @@
1
- @use "@fontsource/inter/scss/mixins" as Inter;
2
- @use "@fontsource/poppins/scss/mixins" as Poppins;
3
-
4
- $weights: $font-weight-light, $font-weight-normal, $font-weight-semibold, $font-weight-bold;
5
- $subsets: (latin, latin-ext);
6
- $font-path: "./plugins/nodebb-theme-harmony" !default;
7
-
8
- @include Inter.faces(
9
- $weights: $weights,
10
- $subsets: $subsets,
11
- $display: fallback,
12
- $directory: "#{$font-path}/inter"
13
- );
14
- @include Poppins.faces(
15
- $weights: $weights,
16
- $subsets: $subsets,
17
- $display: fallback,
18
- $directory: "#{$font-path}/poppins"
19
- );
1
+ @use "@fontsource/inter/scss/mixins" as Inter;
2
+ @use "@fontsource/poppins/scss/mixins" as Poppins;
3
+
4
+ $weights: $font-weight-light, $font-weight-normal, $font-weight-semibold, $font-weight-bold;
5
+ $subsets: (latin, latin-ext);
6
+ $font-path: "./plugins/nodebb-theme-harmony" !default;
7
+
8
+ @include Inter.faces(
9
+ $weights: $weights,
10
+ $subsets: $subsets,
11
+ $display: fallback,
12
+ $directory: "#{$font-path}/inter"
13
+ );
14
+ @include Poppins.faces(
15
+ $weights: $weights,
16
+ $subsets: $subsets,
17
+ $display: fallback,
18
+ $directory: "#{$font-path}/poppins"
19
+ );
package/scss/groups.scss CHANGED
@@ -1,22 +1,22 @@
1
- .template-groups-details #panel {
2
- margin-top: 0px!important;
3
- }
4
-
5
- .group-hover-bg {
6
- $hover-color: mix($light, $dark, 97%);
7
- $border-color: mix($light, $dark, 90%);
8
- .card-body {
9
- border-color: $border-color!important;
10
- }
11
- &:hover {
12
- background-color: $hover-color;
13
- }
14
- }
15
-
16
- .groups.details {
17
- margin-top: 200px;
18
-
19
- @include media-breakpoint-up(md) {
20
- margin-top: 300px;
21
- }
22
- }
1
+ .template-groups-details #panel {
2
+ margin-top: 0px!important;
3
+ }
4
+
5
+ .group-hover-bg {
6
+ $hover-color: mix($light, $dark, 97%);
7
+ $border-color: mix($light, $dark, 90%);
8
+ .card-body {
9
+ border-color: $border-color!important;
10
+ }
11
+ &:hover {
12
+ background-color: $hover-color;
13
+ }
14
+ }
15
+
16
+ .groups.details {
17
+ margin-top: 200px;
18
+
19
+ @include media-breakpoint-up(md) {
20
+ margin-top: 300px;
21
+ }
22
+ }
package/scss/harmony.scss CHANGED
@@ -1,25 +1,25 @@
1
- @import "fonts";
2
- @import "mixins";
3
- @import "common";
4
-
5
- @import "header";
6
- @import "topic";
7
- @import "category";
8
- @import "chats";
9
- @import "sidebar";
10
- @import "status";
11
- @import "account";
12
- @import "groups";
13
- @import "modals";
14
-
15
- @import "modules/breadcrumbs";
16
- @import "modules/tags";
17
- @import "modules/user-menu";
18
- @import "modules/topic-navigator";
19
- @import "modules/topics-list";
20
- @import "modules/cover";
21
- @import "modules/nprogress";
22
- @import "modules/paginator";
23
- @import "modules/filters";
24
-
1
+ @import "fonts";
2
+ @import "mixins";
3
+ @import "common";
4
+
5
+ @import "header";
6
+ @import "topic";
7
+ @import "category";
8
+ @import "chats";
9
+ @import "sidebar";
10
+ @import "status";
11
+ @import "account";
12
+ @import "groups";
13
+ @import "modals";
14
+
15
+ @import "modules/breadcrumbs";
16
+ @import "modules/tags";
17
+ @import "modules/user-menu";
18
+ @import "modules/topic-navigator";
19
+ @import "modules/topics-list";
20
+ @import "modules/cover";
21
+ @import "modules/nprogress";
22
+ @import "modules/paginator";
23
+ @import "modules/filters";
24
+
25
25
  @import "skins";
package/scss/header.scss CHANGED
@@ -1,16 +1,16 @@
1
- // hide brand/title on user and group details pages so it doesnt break covers
2
- body[class*="template-account-"], .template-chats, .template-groups-details {
3
- .brand-container {
4
- display: none;
5
- }
6
- }
7
- [component="brand/wrapper"] {
8
- &:hover {
9
- background-color: $card-cap-bg;
10
- }
11
- }
12
-
13
- [component="brand/logo"] {
14
- max-height: 48px;
15
- width: auto;
1
+ // hide brand/title on user and group details pages so it doesnt break covers
2
+ body[class*="template-account-"], .template-chats, .template-groups-details {
3
+ .brand-container {
4
+ display: none;
5
+ }
6
+ }
7
+ [component="brand/wrapper"] {
8
+ &:hover {
9
+ background-color: $card-cap-bg;
10
+ }
11
+ }
12
+
13
+ [component="brand/logo"] {
14
+ max-height: 48px;
15
+ width: auto;
16
16
  }