nodebb-theme-persona 14.0.13 → 14.0.14

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 (52) hide show
  1. package/.eslintrc +2 -2
  2. package/README.md +20 -20
  3. package/lib/controllers.js +24 -24
  4. package/package.json +1 -1
  5. package/plugin.json +20 -20
  6. package/public/.eslintrc +2 -2
  7. package/public/admin.js +15 -15
  8. package/public/modules/autohidingnavbar.js +220 -220
  9. package/public/modules/taskbar.js +65 -65
  10. package/public/settings.js +53 -53
  11. package/scss/footer.scss +16 -16
  12. package/scss/keyframes.scss +152 -152
  13. package/scss/modules/composer.scss +20 -20
  14. package/scss/modules/cookie-consent.scss +12 -12
  15. package/scss/modules/fab.scss +32 -32
  16. package/scss/modules/morph.scss +268 -268
  17. package/scss/modules/necro-post.scss +8 -8
  18. package/scss/modules/nprogress.scss +80 -80
  19. package/scss/modules/taskbar.scss +160 -160
  20. package/scss/modules/user-menu.scss +7 -7
  21. package/scss/modules/usercard.scss +64 -64
  22. package/scss/noscript.scss +80 -80
  23. package/scss/overrides.scss +39 -39
  24. package/scss/posts_list.scss +127 -127
  25. package/scss/tags.scss +10 -10
  26. package/scss/topics_list.scss +16 -16
  27. package/scss/variables.scss +6 -6
  28. package/templates/account/info.tpl +291 -291
  29. package/templates/account/sessions.tpl +31 -31
  30. package/templates/account/theme.tpl +25 -25
  31. package/templates/admin/plugins/persona.tpl +24 -24
  32. package/templates/footer.tpl +11 -11
  33. package/templates/groups/members.tpl +5 -5
  34. package/templates/modules/taskbar.tpl +2 -2
  35. package/templates/modules/usercard.tpl +36 -36
  36. package/templates/partials/breadcrumbs.tpl +18 -18
  37. package/templates/partials/categories/link.tpl +10 -10
  38. package/templates/partials/category/tags.tpl +3 -3
  39. package/templates/partials/cookie-consent.tpl +4 -4
  40. package/templates/partials/groups/memberlist.tpl +42 -42
  41. package/templates/partials/header/search.tpl +24 -24
  42. package/templates/partials/paginator.tpl +44 -44
  43. package/templates/partials/posts_list.tpl +7 -7
  44. package/templates/partials/toast.tpl +19 -19
  45. package/templates/partials/topic/event.tpl +12 -12
  46. package/templates/partials/topic/navigation-post.tpl +11 -11
  47. package/templates/partials/topic/necro-post.tpl +2 -2
  48. package/templates/partials/topic/post.tpl +3 -3
  49. package/templates/partials/topic/reply-button.tpl +26 -26
  50. package/templates/partials/topic/selection-tooltip.tpl +2 -2
  51. package/templates/partials/users_list.tpl +14 -14
  52. package/templates/search.tpl +47 -47
@@ -1,65 +1,65 @@
1
- 'use strict';
2
-
3
- define('persona/taskbar', [
4
- 'hooks',
5
- ], function (
6
- hooks
7
- ) {
8
- const Taskbar = {};
9
-
10
- Taskbar.init = function () {
11
- hooks.on('filter:taskbar.push', (data) => {
12
- data.options.className = 'taskbar-' + data.module;
13
- if (data.module === 'composer') {
14
- data.options.icon = 'fa-commenting-o';
15
- } else if (data.module === 'chat') {
16
- if (data.element.length && !data.element.hasClass('active')) {
17
- increaseChatCount(data.element);
18
- }
19
- }
20
- });
21
- hooks.on('action:taskbar.pushed', (data) => {
22
- if (data.module === 'chat') {
23
- createChatIcon(data);
24
- const elData = data.element.data();
25
- if (elData && elData.options && !elData.options.isSelf) {
26
- increaseChatCount(data.element);
27
- }
28
- }
29
- });
30
-
31
- socket.on('event:chats.markedAsRead', function (data) {
32
- $('#taskbar [data-roomid="' + data.roomId + '"]')
33
- .removeClass('new')
34
- .attr('data-content', 0);
35
- });
36
-
37
- function createChatIcon(data) {
38
- $.getJSON(config.relative_path + '/api/user/' + app.user.userslug + '/chats/' + data.options.roomId, function (chatObj) {
39
- const el = $('#taskbar [data-uuid="' + data.uuid + '"] a');
40
- el.parent('[data-uuid]').attr('data-roomId', data.options.roomId);
41
-
42
- if (chatObj.users.length === 1) {
43
- const user = chatObj.users[0];
44
- el.find('i').remove();
45
-
46
- if (user.picture) {
47
- el.css('background-image', 'url(' + user.picture + ')');
48
- el.css('background-size', 'cover');
49
- } else {
50
- el.css('background-color', user['icon:bgColor'])
51
- .text(user['icon:text'])
52
- .addClass('avatar');
53
- }
54
- }
55
- });
56
- }
57
-
58
- function increaseChatCount(el) {
59
- const count = (parseInt($(el).attr('data-content'), 10) || 0) + 1;
60
- $(el).attr('data-content', count);
61
- }
62
- };
63
-
64
- return Taskbar;
65
- });
1
+ 'use strict';
2
+
3
+ define('persona/taskbar', [
4
+ 'hooks',
5
+ ], function (
6
+ hooks
7
+ ) {
8
+ const Taskbar = {};
9
+
10
+ Taskbar.init = function () {
11
+ hooks.on('filter:taskbar.push', (data) => {
12
+ data.options.className = 'taskbar-' + data.module;
13
+ if (data.module === 'composer') {
14
+ data.options.icon = 'fa-commenting-o';
15
+ } else if (data.module === 'chat') {
16
+ if (data.element.length && !data.element.hasClass('active')) {
17
+ increaseChatCount(data.element);
18
+ }
19
+ }
20
+ });
21
+ hooks.on('action:taskbar.pushed', (data) => {
22
+ if (data.module === 'chat') {
23
+ createChatIcon(data);
24
+ const elData = data.element.data();
25
+ if (elData && elData.options && !elData.options.isSelf) {
26
+ increaseChatCount(data.element);
27
+ }
28
+ }
29
+ });
30
+
31
+ socket.on('event:chats.markedAsRead', function (data) {
32
+ $('#taskbar [data-roomid="' + data.roomId + '"]')
33
+ .removeClass('new')
34
+ .attr('data-content', 0);
35
+ });
36
+
37
+ function createChatIcon(data) {
38
+ $.getJSON(config.relative_path + '/api/user/' + app.user.userslug + '/chats/' + data.options.roomId, function (chatObj) {
39
+ const el = $('#taskbar [data-uuid="' + data.uuid + '"] a');
40
+ el.parent('[data-uuid]').attr('data-roomId', data.options.roomId);
41
+
42
+ if (chatObj.users.length === 1) {
43
+ const user = chatObj.users[0];
44
+ el.find('i').remove();
45
+
46
+ if (user.picture) {
47
+ el.css('background-image', 'url(' + user.picture + ')');
48
+ el.css('background-size', 'cover');
49
+ } else {
50
+ el.css('background-color', user['icon:bgColor'])
51
+ .text(user['icon:text'])
52
+ .addClass('avatar');
53
+ }
54
+ }
55
+ });
56
+ }
57
+
58
+ function increaseChatCount(el) {
59
+ const count = (parseInt($(el).attr('data-content'), 10) || 0) + 1;
60
+ $(el).attr('data-content', count);
61
+ }
62
+ };
63
+
64
+ return Taskbar;
65
+ });
@@ -1,53 +1,53 @@
1
- 'use strict';
2
-
3
- define('forum/account/theme', ['forum/account/header', 'storage', 'settings', 'alerts'], function (header, Storage, settings, alerts) {
4
- const Theme = {};
5
-
6
- Theme.init = () => {
7
- header.init();
8
- Theme.setupForm();
9
- };
10
-
11
- Theme.setupForm = () => {
12
- const saveEl = document.getElementById('save');
13
- const formEl = document.getElementById('theme-settings');
14
- const [sidebarSwapped, autohideNavbarEnvs] = [
15
- !!Storage.getItem('persona:menus:legacy-layout'),
16
- Storage.getItem('persona:navbar:autohide'),
17
- ];
18
-
19
- document.getElementById('persona:menus:legacy-layout').checked = sidebarSwapped;
20
- try {
21
- const parsed = JSON.parse(autohideNavbarEnvs) || ['xs', 'sm'];
22
- parsed.forEach((env) => {
23
- const optionEl = document.getElementById('persona:navbar:autohide').querySelector(`option[value="${env}"]`);
24
- optionEl.selected = true;
25
- });
26
- } catch (e) {
27
- console.warn(e);
28
- }
29
-
30
- if (saveEl) {
31
- saveEl.addEventListener('click', () => {
32
- const themeSettings = settings.helper.serializeForm($(formEl));
33
- Object.keys(themeSettings).forEach((key) => {
34
- if (key === 'persona:menus:legacy-layout') {
35
- if (themeSettings[key] === 'on') {
36
- Storage.setItem('persona:menus:legacy-layout', 'true');
37
- } else {
38
- Storage.removeItem('persona:menus:legacy-layout');
39
- }
40
-
41
- return;
42
- }
43
-
44
- Storage.setItem(key, themeSettings[key]);
45
- });
46
-
47
- alerts.success('[[success:settings-saved]]');
48
- });
49
- }
50
- };
51
-
52
- return Theme;
53
- });
1
+ 'use strict';
2
+
3
+ define('forum/account/theme', ['forum/account/header', 'storage', 'settings', 'alerts'], function (header, Storage, settings, alerts) {
4
+ const Theme = {};
5
+
6
+ Theme.init = () => {
7
+ header.init();
8
+ Theme.setupForm();
9
+ };
10
+
11
+ Theme.setupForm = () => {
12
+ const saveEl = document.getElementById('save');
13
+ const formEl = document.getElementById('theme-settings');
14
+ const [sidebarSwapped, autohideNavbarEnvs] = [
15
+ !!Storage.getItem('persona:menus:legacy-layout'),
16
+ Storage.getItem('persona:navbar:autohide'),
17
+ ];
18
+
19
+ document.getElementById('persona:menus:legacy-layout').checked = sidebarSwapped;
20
+ try {
21
+ const parsed = JSON.parse(autohideNavbarEnvs) || ['xs', 'sm'];
22
+ parsed.forEach((env) => {
23
+ const optionEl = document.getElementById('persona:navbar:autohide').querySelector(`option[value="${env}"]`);
24
+ optionEl.selected = true;
25
+ });
26
+ } catch (e) {
27
+ console.warn(e);
28
+ }
29
+
30
+ if (saveEl) {
31
+ saveEl.addEventListener('click', () => {
32
+ const themeSettings = settings.helper.serializeForm($(formEl));
33
+ Object.keys(themeSettings).forEach((key) => {
34
+ if (key === 'persona:menus:legacy-layout') {
35
+ if (themeSettings[key] === 'on') {
36
+ Storage.setItem('persona:menus:legacy-layout', 'true');
37
+ } else {
38
+ Storage.removeItem('persona:menus:legacy-layout');
39
+ }
40
+
41
+ return;
42
+ }
43
+
44
+ Storage.setItem(key, themeSettings[key]);
45
+ });
46
+
47
+ alerts.success('[[success:settings-saved]]');
48
+ });
49
+ }
50
+ };
51
+
52
+ return Theme;
53
+ });
package/scss/footer.scss CHANGED
@@ -1,17 +1,17 @@
1
- .footer {
2
- text-align: center;
3
- -webkit-transition: opacity 200ms linear;
4
- -moz-transition: opacity 200ms linear;
5
- -ms-transition: opacity 200ms linear;
6
- -o-transition: opacity 200ms linear;
7
- transition: opacity 200ms linear;
8
-
9
- .copyright {
10
- padding-bottom: 10px;
11
- }
12
-
13
- &.ajaxifying {
14
- -moz-opacity: 0.00;
15
- opacity: 0.00;
16
- }
1
+ .footer {
2
+ text-align: center;
3
+ -webkit-transition: opacity 200ms linear;
4
+ -moz-transition: opacity 200ms linear;
5
+ -ms-transition: opacity 200ms linear;
6
+ -o-transition: opacity 200ms linear;
7
+ transition: opacity 200ms linear;
8
+
9
+ .copyright {
10
+ padding-bottom: 10px;
11
+ }
12
+
13
+ &.ajaxifying {
14
+ -moz-opacity: 0.00;
15
+ opacity: 0.00;
16
+ }
17
17
  }
@@ -1,152 +1,152 @@
1
- @-webkit-keyframes taskbar-active {
2
- 0% {
3
- background: #e7e7e7;
4
- color: #333;
5
- }
6
- 50% {
7
- background: #558;
8
- color: #fff;
9
- }
10
- 100% {
11
- background: #e7e7e7;
12
- color: #333;
13
- }
14
- }
15
-
16
- @-moz-keyframes taskbar-active {
17
- 0% {
18
- background: #e7e7e7;
19
- color: #333;
20
- }
21
- 50% {
22
- background: #558;
23
- color: #fff;
24
- }
25
- 100% {
26
- background: #e7e7e7;
27
- color: #333;
28
- }
29
- }
30
-
31
- @-o-keyframes taskbar-active {
32
- 0% {
33
- background: #e7e7e7;
34
- color: #333;
35
- }
36
- 50% {
37
- background: #558;
38
- color: #fff;
39
- }
40
- 100% {
41
- background: #e7e7e7;
42
- color: #333;
43
- }
44
- }
45
-
46
- @keyframes taskbar-active {
47
- 0% {
48
- background: #e7e7e7;
49
- color: #333;
50
- }
51
- 50% {
52
- background: #558;
53
- color: #fff;
54
- }
55
- 100% {
56
- background: #e7e7e7;
57
- color: #333;
58
- }
59
- }
60
-
61
- @-webkit-keyframes topic-reply-pulse {
62
- 0%, 100% { opacity: 1; }
63
- 50% { opacity: 0.3; }
64
- }
65
-
66
- @keyframes topic-reply-pulse {
67
- 0%, 100% { opacity: 1; }
68
- 50% { opacity: 0.3; }
69
- }
70
-
71
-
72
-
73
- // originally from http://daneden.github.io/animate.css/
74
- @-webkit-keyframes bounceIn {
75
- 0%, 20%, 40%, 60%, 80%, 100% {
76
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
77
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
78
- }
79
-
80
- 0% {
81
- opacity: 0;
82
- -webkit-transform: scale3d(.3, .3, .3);
83
- transform: scale3d(.3, .3, .3);
84
- }
85
-
86
- 20% {
87
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
88
- transform: scale3d(1.1, 1.1, 1.1);
89
- }
90
-
91
- 40% {
92
- -webkit-transform: scale3d(.9, .9, .9);
93
- transform: scale3d(.9, .9, .9);
94
- }
95
-
96
- 60% {
97
- opacity: 1;
98
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
99
- transform: scale3d(1.03, 1.03, 1.03);
100
- }
101
-
102
- 80% {
103
- -webkit-transform: scale3d(.97, .97, .97);
104
- transform: scale3d(.97, .97, .97);
105
- }
106
-
107
- 100% {
108
- opacity: 1;
109
- -webkit-transform: scale3d(1, 1, 1);
110
- transform: scale3d(1, 1, 1);
111
- }
112
- }
113
-
114
- @keyframes bounceIn {
115
- 0%, 20%, 40%, 60%, 80%, 100% {
116
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
117
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
118
- }
119
-
120
- 0% {
121
- opacity: 0;
122
- -webkit-transform: scale3d(.3, .3, .3);
123
- transform: scale3d(.3, .3, .3);
124
- }
125
-
126
- 20% {
127
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
128
- transform: scale3d(1.1, 1.1, 1.1);
129
- }
130
-
131
- 40% {
132
- -webkit-transform: scale3d(.9, .9, .9);
133
- transform: scale3d(.9, .9, .9);
134
- }
135
-
136
- 60% {
137
- opacity: 1;
138
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
139
- transform: scale3d(1.03, 1.03, 1.03);
140
- }
141
-
142
- 80% {
143
- -webkit-transform: scale3d(.97, .97, .97);
144
- transform: scale3d(.97, .97, .97);
145
- }
146
-
147
- 100% {
148
- opacity: 1;
149
- -webkit-transform: scale3d(1, 1, 1);
150
- transform: scale3d(1, 1, 1);
151
- }
152
- }
1
+ @-webkit-keyframes taskbar-active {
2
+ 0% {
3
+ background: #e7e7e7;
4
+ color: #333;
5
+ }
6
+ 50% {
7
+ background: #558;
8
+ color: #fff;
9
+ }
10
+ 100% {
11
+ background: #e7e7e7;
12
+ color: #333;
13
+ }
14
+ }
15
+
16
+ @-moz-keyframes taskbar-active {
17
+ 0% {
18
+ background: #e7e7e7;
19
+ color: #333;
20
+ }
21
+ 50% {
22
+ background: #558;
23
+ color: #fff;
24
+ }
25
+ 100% {
26
+ background: #e7e7e7;
27
+ color: #333;
28
+ }
29
+ }
30
+
31
+ @-o-keyframes taskbar-active {
32
+ 0% {
33
+ background: #e7e7e7;
34
+ color: #333;
35
+ }
36
+ 50% {
37
+ background: #558;
38
+ color: #fff;
39
+ }
40
+ 100% {
41
+ background: #e7e7e7;
42
+ color: #333;
43
+ }
44
+ }
45
+
46
+ @keyframes taskbar-active {
47
+ 0% {
48
+ background: #e7e7e7;
49
+ color: #333;
50
+ }
51
+ 50% {
52
+ background: #558;
53
+ color: #fff;
54
+ }
55
+ 100% {
56
+ background: #e7e7e7;
57
+ color: #333;
58
+ }
59
+ }
60
+
61
+ @-webkit-keyframes topic-reply-pulse {
62
+ 0%, 100% { opacity: 1; }
63
+ 50% { opacity: 0.3; }
64
+ }
65
+
66
+ @keyframes topic-reply-pulse {
67
+ 0%, 100% { opacity: 1; }
68
+ 50% { opacity: 0.3; }
69
+ }
70
+
71
+
72
+
73
+ // originally from http://daneden.github.io/animate.css/
74
+ @-webkit-keyframes bounceIn {
75
+ 0%, 20%, 40%, 60%, 80%, 100% {
76
+ -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
77
+ transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
78
+ }
79
+
80
+ 0% {
81
+ opacity: 0;
82
+ -webkit-transform: scale3d(.3, .3, .3);
83
+ transform: scale3d(.3, .3, .3);
84
+ }
85
+
86
+ 20% {
87
+ -webkit-transform: scale3d(1.1, 1.1, 1.1);
88
+ transform: scale3d(1.1, 1.1, 1.1);
89
+ }
90
+
91
+ 40% {
92
+ -webkit-transform: scale3d(.9, .9, .9);
93
+ transform: scale3d(.9, .9, .9);
94
+ }
95
+
96
+ 60% {
97
+ opacity: 1;
98
+ -webkit-transform: scale3d(1.03, 1.03, 1.03);
99
+ transform: scale3d(1.03, 1.03, 1.03);
100
+ }
101
+
102
+ 80% {
103
+ -webkit-transform: scale3d(.97, .97, .97);
104
+ transform: scale3d(.97, .97, .97);
105
+ }
106
+
107
+ 100% {
108
+ opacity: 1;
109
+ -webkit-transform: scale3d(1, 1, 1);
110
+ transform: scale3d(1, 1, 1);
111
+ }
112
+ }
113
+
114
+ @keyframes bounceIn {
115
+ 0%, 20%, 40%, 60%, 80%, 100% {
116
+ -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
117
+ transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
118
+ }
119
+
120
+ 0% {
121
+ opacity: 0;
122
+ -webkit-transform: scale3d(.3, .3, .3);
123
+ transform: scale3d(.3, .3, .3);
124
+ }
125
+
126
+ 20% {
127
+ -webkit-transform: scale3d(1.1, 1.1, 1.1);
128
+ transform: scale3d(1.1, 1.1, 1.1);
129
+ }
130
+
131
+ 40% {
132
+ -webkit-transform: scale3d(.9, .9, .9);
133
+ transform: scale3d(.9, .9, .9);
134
+ }
135
+
136
+ 60% {
137
+ opacity: 1;
138
+ -webkit-transform: scale3d(1.03, 1.03, 1.03);
139
+ transform: scale3d(1.03, 1.03, 1.03);
140
+ }
141
+
142
+ 80% {
143
+ -webkit-transform: scale3d(.97, .97, .97);
144
+ transform: scale3d(.97, .97, .97);
145
+ }
146
+
147
+ 100% {
148
+ opacity: 1;
149
+ -webkit-transform: scale3d(1, 1, 1);
150
+ transform: scale3d(1, 1, 1);
151
+ }
152
+ }
@@ -1,21 +1,21 @@
1
- body.page-compose,
2
- .page-compose #content,
3
- .page-compose #panel {
4
- height: calc(100vh - var(--panel-offset));
5
- }
6
-
7
- .page-compose .composer .composer-container {
8
- border: 0;
9
- }
10
-
11
- .composer {
12
- .composer-container {
13
- border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
14
- border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
15
- border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
16
- }
17
-
18
- .resizer {
19
- border: 0 !important;
20
- }
1
+ body.page-compose,
2
+ .page-compose #content,
3
+ .page-compose #panel {
4
+ height: calc(100vh - var(--panel-offset));
5
+ }
6
+
7
+ .page-compose .composer .composer-container {
8
+ border: 0;
9
+ }
10
+
11
+ .composer {
12
+ .composer-container {
13
+ border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
14
+ border-left: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
15
+ border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);
16
+ }
17
+
18
+ .resizer {
19
+ border: 0 !important;
20
+ }
21
21
  }
@@ -1,13 +1,13 @@
1
- .cookie-consent {
2
- position: fixed;
3
- bottom: 0;
4
- left: 0;
5
- line-height: 3em;
6
- padding-left: 1rem;
7
- width: 100%;
8
- background: rgba(240,240,240,.8);
9
- z-index: $zindex-popover;
10
- a {
11
- font-weight: bold;
12
- }
1
+ .cookie-consent {
2
+ position: fixed;
3
+ bottom: 0;
4
+ left: 0;
5
+ line-height: 3em;
6
+ padding-left: 1rem;
7
+ width: 100%;
8
+ background: rgba(240,240,240,.8);
9
+ z-index: $zindex-popover;
10
+ a {
11
+ font-weight: bold;
12
+ }
13
13
  }