nodebb-theme-persona 14.0.0-pre.1 → 14.0.0-pre.2

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 (42) hide show
  1. package/package.json +1 -1
  2. package/scss/header.scss +4 -136
  3. package/scss/mobile.scss +6 -115
  4. package/scss/persona.scss +0 -1
  5. package/scss/style.scss +0 -14
  6. package/scss/topic.scss +0 -39
  7. package/templates/account/edit.tpl +4 -4
  8. package/templates/category.tpl +1 -1
  9. package/templates/partials/categories/link.tpl +10 -10
  10. package/templates/partials/chats-menu.tpl +10 -9
  11. package/templates/partials/header/chats.tpl +4 -4
  12. package/templates/partials/header/notifications.tpl +41 -11
  13. package/templates/partials/header/user-menu.tpl +1 -1
  14. package/templates/partials/notifications_list.tpl +40 -26
  15. package/templates/partials/post_bar.tpl +4 -5
  16. package/templates/partials/slideout-menu.tpl +1 -1
  17. package/templates/partials/topic/post-menu-list.tpl +20 -20
  18. package/templates/partials/topic/post-menu.tpl +2 -2
  19. package/templates/partials/topic/post.tpl +5 -5
  20. package/templates/partials/topic/quickreply.tpl +3 -3
  21. package/templates/partials/topic/sort.tpl +21 -6
  22. package/templates/partials/topic/tools.tpl +3 -3
  23. package/templates/partials/topic/watch.tpl +28 -20
  24. package/templates/partials/topic-filters.tpl +8 -4
  25. package/templates/popular.tpl +1 -1
  26. package/templates/recent.tpl +2 -1
  27. package/templates/tag.tpl +1 -1
  28. package/templates/top.tpl +1 -1
  29. package/templates/unread.tpl +1 -1
  30. package/theme.json +6 -6
  31. package/scss/register.scss +0 -71
  32. package/templates/login.tpl +0 -98
  33. package/templates/partials/category/filter-dropdown-content.tpl +0 -32
  34. package/templates/partials/category/selector-dropdown-content.tpl +0 -33
  35. package/templates/partials/category/sort.tpl +0 -15
  36. package/templates/partials/category/tools.tpl +0 -87
  37. package/templates/partials/category/watch.tpl +0 -56
  38. package/templates/partials/groups/filter-dropdown-content.tpl +0 -25
  39. package/templates/partials/tags/filter-dropdown-content.tpl +0 -34
  40. package/templates/partials/tags/watch.tpl +0 -36
  41. package/templates/partials/users/filter-dropdown-content.tpl +0 -20
  42. package/templates/register.tpl +0 -85
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-persona",
3
- "version": "14.0.0-pre.1",
3
+ "version": "14.0.0-pre.2",
4
4
  "nbbpm": {
5
5
  "compatibility": "^4.0.0"
6
6
  },
package/scss/header.scss CHANGED
@@ -1,143 +1,11 @@
1
- .header, .slideout-menu {
2
- .notifications.dropdown, .chats.dropdown {
3
- .dropdown-menu {
4
- padding: 0;
5
- }
6
- }
7
-
8
- @mixin notification-list() {
1
+ .header {
2
+ .notification-list, .chat-list {
9
3
  overflow-x: hidden;
10
4
  overflow-y: auto;
11
5
  max-height: 250px;
12
6
  padding: 0;
13
-
14
- li {
15
- display: flex;
16
- gap: 1rem;
17
- width: 400px;
18
- text-align: left;
19
- list-style-type: none;
20
- padding: .75em 0.5em;
21
-
22
- &.loading-text, &.no-notifs {
23
- justify-content: center;
24
-
25
- a {
26
- color: inherit;
27
- }
28
- }
29
-
30
- .notification-chat-content {
31
- flex: 1;
32
-
33
- a {
34
- white-space: normal;
35
- margin: 0;
36
- text-overflow: ellipsis;
37
-
38
- .text {
39
- margin-left: 40px;
40
- margin-right: 60px;
41
- display: block;
42
- min-height: 32px;
43
- }
44
- }
45
- }
46
-
47
- .notification-chat-controls {
48
- display: flex;
49
- flex-direction: column;
50
- align-items: center;
51
- gap: .5rem;
52
-
53
- .relTime {
54
- font-size: 10px;
55
- }
56
- }
57
-
58
- .mark-read {
59
- color: $secondary;
60
- .read {
61
- display: block;
62
- }
63
- .unread {
64
- display: none;
65
- }
66
- &:hover {
67
- color: darken($secondary, 10%);
68
- @include pointer;
69
- }
70
- }
71
-
72
- &.unread {
73
- background-color: $warning;
74
-
75
- &:hover {
76
- background-color: darken($warning, 5%);
77
- }
78
-
79
- .mark-read {
80
- .read {
81
- display: none;
82
- }
83
- .unread {
84
- display: block;
85
- }
86
- }
87
- }
88
- }
89
- }
90
-
91
- .notification-list {
92
- @include notification-list;
93
- }
94
-
95
- .chat-list {
96
- @include notification-list;
97
-
98
- > li {
99
- @include pointer;
100
- width: 500px;
101
- padding: 0;
102
- margin: 0;
103
- gap: 0;
104
- overflow-y: hidden;
105
-
106
- .notification-chat-content {
107
- padding: 0.5rem;
108
- overflow: hidden;
109
- text-overflow: ellipsis;
110
- }
111
-
112
- .teaser-content {
113
- white-space: nowrap;
114
- max-height: 19px;
115
- }
116
-
117
- &:not(:last-child) {
118
- border-bottom: 1px solid $dropdown-border-color;
119
- }
120
-
121
- &.no_active a {
122
- text-align: center;
123
- white-space: normal;
124
- }
125
-
126
- a {
127
- line-height: 24px;
128
- }
129
-
130
- .members {
131
- padding-left: 1rem;
132
-
133
- li {
134
- display: inline-block;
135
- width: 16px;
136
- padding: 0;
137
- margin: 0;
138
- }
139
- }
140
- }
7
+ width: 300px;
8
+ min-width: 300px;
141
9
  }
142
10
  }
143
11
 
package/scss/mobile.scss CHANGED
@@ -76,6 +76,9 @@
76
76
  }
77
77
  #menu .menu-section {
78
78
  padding-top: 20px;
79
+ .nav-item {
80
+ padding: 0.5rem 1rem;
81
+ }
79
82
  }
80
83
  #chats-menu {
81
84
  .nav-pills {
@@ -101,6 +104,9 @@
101
104
  }
102
105
  }
103
106
  }
107
+ .menu-section-list .text-muted {
108
+ color: #fff!important;
109
+ }
104
110
  }
105
111
 
106
112
  .slideout-menu {
@@ -121,95 +127,6 @@
121
127
  }
122
128
  .chat-list {
123
129
  max-height: 100%;
124
-
125
- li {
126
- width: auto;
127
- border: none;
128
- color: #fff;
129
- position: relative;
130
- height: 60px;
131
-
132
- &:hover {
133
- background: none;
134
- }
135
-
136
- &:not(:last-child) {
137
- border-bottom: none;
138
- }
139
-
140
- .main-avatar {
141
- position: absolute;
142
- top: 0;
143
- left: 0;
144
-
145
- .avatar {
146
- $size: 40px;
147
- @include user-icon-style($size, calc($size * 0.6), 0);
148
- }
149
- }
150
-
151
- .members {
152
- display: none;
153
- }
154
-
155
- .room-name {
156
- display: block;
157
- overflow: hidden;
158
- white-space: nowrap;
159
- text-overflow: ellipsis;
160
- padding-left: 60px;
161
- }
162
-
163
- .teaser-content {
164
- padding-left: 60px;
165
- display: block;
166
- font-size: 13px;
167
- opacity: .8;
168
- overflow: hidden;
169
- white-space: nowrap;
170
- text-overflow: ellipsis;
171
- }
172
- .teaser-timestamp {
173
- font-size: 10px;
174
- margin-right: 0.5rem;
175
- margin-top: 0.5rem;
176
- }
177
- }
178
- }
179
-
180
- .menu-section {
181
- .notification-list-mobile li .text {
182
- display: block;
183
- }
184
- .chat-list, .notification-list-mobile {
185
- .user-link {
186
- display: inline;
187
- }
188
- .unread {
189
- background-color: inherit;
190
- }
191
-
192
- .notification-chat-content {
193
- padding-top: 10px;
194
- padding-right: 20px;
195
- }
196
-
197
- .notification-chat-controls {
198
- display: none;
199
- }
200
- }
201
- .chat-list .unread .room-name::after,
202
- .notification-list-mobile .unread a::after {
203
- content: "new";
204
- text-transform: uppercase;
205
- color: #FFF;
206
- margin-left: 5px;
207
- font-size: 10px;
208
- background: #C91106;
209
- border: 1px solid #890405;
210
- padding: 2px 3px;
211
- border-radius: 5px;
212
- }
213
130
  }
214
131
 
215
132
  .counter {
@@ -244,28 +161,6 @@
244
161
  margin:0;
245
162
  }
246
163
 
247
- .menu-section-list {
248
- padding: 0;
249
- margin: 0;
250
- list-style: none;
251
-
252
- a, button {
253
- display: block;
254
- padding: 10px 20px;
255
- text-align: left;
256
- width: 100%;
257
-
258
- &:hover {
259
- background-color: rgba(255, 255, 255, 0.1);
260
- text-decoration: none;
261
- }
262
- }
263
-
264
- .user-status {
265
- padding-left: 40px;
266
- }
267
- }
268
-
269
164
  .slideout-open,
270
165
  .slideout-open body,
271
166
  .slideout-open .slideout-panel {
@@ -324,8 +219,4 @@
324
219
  top: 28px;
325
220
  }
326
221
  }
327
-
328
- [data-section="notifications"] ul li a:first-child {
329
- display: none;
330
- }
331
222
  }
package/scss/persona.scss CHANGED
@@ -16,7 +16,6 @@
16
16
  @import "topics_list";
17
17
  @import "footer";
18
18
  @import "posts_list";
19
- @import "register";
20
19
  @import "flags";
21
20
 
22
21
  @import "mobile";
package/scss/style.scss CHANGED
@@ -26,20 +26,6 @@ a:hover, .btn-link:hover, .btn-link:active, .btn-link:focus {
26
26
  text-decoration:none;
27
27
  }
28
28
 
29
- .alt-logins {
30
- margin: 0 0 0 1em;
31
- padding: 0;
32
- list-style-type: none;
33
-
34
- li {
35
- vertical-align: middle;
36
- background: transparent;
37
- margin: 0.25em;
38
- @include pointer;
39
- @include inline-block;
40
- }
41
- }
42
-
43
29
  #content {
44
30
  padding-bottom: 20px;
45
31
  -webkit-transition: opacity 150ms linear;
package/scss/topic.scss CHANGED
@@ -93,16 +93,6 @@
93
93
  top: -$post-padding;
94
94
  }
95
95
 
96
- [component="post/upvote"], [component="post/downvote"] {
97
- display: inline-block;
98
- padding: 1rem;
99
- color: $text-muted;
100
-
101
- &:focus {
102
- text-decoration: none;
103
- }
104
- }
105
-
106
96
  [component="post/upvote"].upvoted i {
107
97
  @include fa-icon-solid($fa-var-circle-chevron-up);
108
98
  color: $primary;
@@ -113,11 +103,6 @@
113
103
  color: $primary;
114
104
  }
115
105
 
116
- [component="post/vote-count"] {
117
- display: inline-block;
118
- padding: 1rem 0.5rem;
119
- }
120
-
121
106
  [component="post/parent"] {
122
107
  border: 0;
123
108
  font-size: 10px;
@@ -194,30 +179,6 @@
194
179
  min-height: 60px;
195
180
  }
196
181
 
197
- .post-tools {
198
- a {
199
- padding: 1rem 10px;
200
- @include pointer;
201
- }
202
- }
203
-
204
- [component="post/tools"] {
205
- font-size: 14px;
206
-
207
- > a {
208
- padding: 1rem;
209
- }
210
-
211
- // temporary until we build component toggling
212
- .favourite.btn-warning, .follow.btn-success {
213
- background: white !important;
214
- color: #333;
215
- &:hover {
216
- background: $primary !important;
217
- }
218
- }
219
- }
220
-
221
182
  h1 {
222
183
  .btn-group, .btn {
223
184
  margin-left: 15px;
@@ -78,11 +78,11 @@
78
78
  <div component="group/badge/item" class="d-flex gap-2 justify-content-between align-items-center" data-value="{./displayName}" data-selected="{./selected}">
79
79
  <!-- IMPORT partials/groups/badge.tpl -->
80
80
  <div class="d-flex gap-1">
81
- <button component="group/toggle/hide" type="button" class="btn-ghost-sm {{{ if !./selected }}}hidden{{{ end }}}" title="[[user:hide-group-title]]"><i class="fa fa-fw fa-eye"></i></button>
82
- <button component="group/toggle/show" type="button" class="btn-ghost-sm {{{ if ./selected }}}hidden{{{ end }}}" title="[[user:show-group-title]]"><i class="fa fa-fw fa-eye-slash"></i></button>
81
+ <button component="group/toggle/hide" type="button" class="btn btn-ghost btn-sm {{{ if !./selected }}}hidden{{{ end }}}" title="[[user:hide-group-title]]"><i class="fa fa-fw fa-eye"></i></button>
82
+ <button component="group/toggle/show" type="button" class="btn btn-ghost btn-sm {{{ if ./selected }}}hidden{{{ end }}}" title="[[user:show-group-title]]"><i class="fa fa-fw fa-eye-slash"></i></button>
83
83
  {{{ if allowMultipleBadges }}}
84
- <button component="group/order/up" type="button" class="btn-ghost-sm" title="[[user:order-group-up]]"><i class="fa fa-fw fa-chevron-up"></i></button>
85
- <button component="group/order/down" type="button" class="btn-ghost-sm" title="[[user:order-group-down]]"><i class="fa fa-fw fa-chevron-down"></i></button>
84
+ <button component="group/order/up" type="button" class="btn btn-ghost btn-sm" title="[[user:order-group-up]]"><i class="fa fa-fw fa-chevron-up"></i></button>
85
+ <button component="group/order/down" type="button" class="btn btn-ghost btn-sm" title="[[user:order-group-down]]"><i class="fa fa-fw fa-chevron-down"></i></button>
86
86
  {{{ end }}}
87
87
  </div>
88
88
  </div>
@@ -26,7 +26,7 @@
26
26
  <div component="category/controls" class="d-flex gap-1 align-items-stretch">
27
27
  <!-- IMPORT partials/category/watch.tpl -->
28
28
  <!-- IMPORT partials/category/sort.tpl -->
29
- <!-- IMPORT partials/category/tools.tpl -->
29
+ <!-- IMPORT partials/category/tools-dropdown-right.tpl -->
30
30
  </div>
31
31
  </div>
32
32
  {{{ end }}}
@@ -1,11 +1,11 @@
1
- <!-- IF ../isSection -->
2
- {../name}
3
- <!-- ELSE -->
4
- <!-- IF ../link -->
5
- <a href="{../link}" itemprop="url">
6
- <!-- ELSE -->
7
- <a href="{config.relative_path}/category/{../slug}" itemprop="url">
8
- <!-- ENDIF ../link -->
9
- {../name}
10
- </a>
1
+ <!-- IF ../isSection -->
2
+ {../name}
3
+ <!-- ELSE -->
4
+ <!-- IF ../link -->
5
+ <a href="{../link}" itemprop="url">
6
+ <!-- ELSE -->
7
+ <a href="{config.relative_path}/category/{../slug}" itemprop="url">
8
+ <!-- ENDIF ../link -->
9
+ {../name}
10
+ </a>
11
11
  <!-- ENDIF ../isSection -->
@@ -1,15 +1,15 @@
1
1
  {{{ if config.loggedIn }}}
2
2
  <ul class="nav nav-pills">
3
3
  <li class="nav-item">
4
- <a class="nav-link" href="#" data-bs-target="#notifications" data-bs-toggle="tab"><span class="counter unread-count" component="notifications/icon" data-content="{unreadCount.notification}"></span> <i class="fa fa-fw fa-bell"></i></a>
4
+ <a class="nav-link text-decoration-none" href="#" data-bs-target="#notifications" data-bs-toggle="tab"><span class="counter unread-count" component="notifications/icon" data-content="{unreadCount.notification}"></span> <i class="fa fa-fw fa-bell"></i></a>
5
5
  </li>
6
6
  {{{ if !config.disableChat }}}
7
7
  <li class="nav-item">
8
- <a class="nav-link" href="#" data-bs-target="#chats" data-bs-toggle="tab"><i class="counter unread-count" component="chat/icon" data-content="{unreadCount.chat}"></i> <i class="fa fa-fw fa-comment"></i></a>
8
+ <a class="nav-link text-decoration-none" href="#" data-bs-target="#chats" data-bs-toggle="tab"><i class="counter unread-count" component="chat/icon" data-content="{unreadCount.chat}"></i> <i class="fa fa-fw fa-comment"></i></a>
9
9
  </li>
10
10
  {{{ end }}}
11
11
  <li class="nav-item">
12
- <a class="nav-link active" href="#" data-bs-target="#profile" data-bs-toggle="tab">
12
+ <a class="nav-link active text-decoration-none" href="#" data-bs-target="#profile" data-bs-toggle="tab">
13
13
  {buildAvatar(user, "24px", true, "user-icon")}
14
14
  <i component="user/status" class="fa fa-fw fa-circle status {user.status}"></i>
15
15
  </a>
@@ -23,17 +23,18 @@
23
23
  </section>
24
24
  </div>
25
25
  <div class="tab-pane fade" id="notifications">
26
- <section class="menu-section text-bg-dark" data-section="notifications">
27
- <ul class="menu-section-list notification-list-mobile" component="notifications/list"></ul>
28
- <p class="menu-section-list"><a href="{relative_path}/notifications">[[notifications:see-all]]</a></p>
26
+ <section class="menu-section text-bg-dark px-1" data-section="notifications">
27
+ <ul class="menu-section-list notification-list-mobile list-unstyled" component="notifications/list"></ul>
28
+ <div class="menu-section-list text-center p-3"><a href="{relative_path}/notifications">[[notifications:see-all]]</a></div>
29
29
  </section>
30
30
  </div>
31
31
  {{{ if !config.disableChat }}}
32
32
  <div class="tab-pane fade" id="chats">
33
- <section class="menu-section text-bg-dark" data-section="chats">
34
- <ul class="menu-section-list chat-list" component="chat/list">
35
- <a class="navigation-link" href="{relative_path}/user/{user.userslug}/chats">[[modules:chat.see-all]]</a>
33
+ <section class="menu-section text-bg-dark px-1" data-section="chats">
34
+ <ul class="menu-section-list chat-list list-unstyled" component="chat/list">
35
+
36
36
  </ul>
37
+ <div class="menu-section-list text-center p-3"><a class="navigation-link" href="{relative_path}/user/{user.userslug}/chats">[[modules:chat.see-all]]</a></div>
37
38
  </section>
38
39
  </div>
39
40
  {{{ end }}}
@@ -1,9 +1,9 @@
1
1
  <a class="nav-link" data-bs-toggle="dropdown" href="{relative_path}/user/{user.userslug}/chats" data-ajaxify="false" id="chat_dropdown" component="chat/dropdown" role="button" aria-haspopup="true" aria-expanded="false">
2
2
  <i component="chat/icon" class="fa {{{ if unreadCount.chat}}}fa-comment{{{ else }}}fa-comment-o{{{ end }}} fa-fw unread-count" data-content="{unreadCount.chat}"></i> <span class="d-inline d-sm-none">[[global:header.chats]]</span>
3
3
  </a>
4
- <ul class="dropdown-menu dropdown-menu-end p-1" aria-labelledby="chat_dropdown" style="min-width: 300px; width: 300px;" role="menu">
4
+ <ul class="dropdown-menu dropdown-menu-end p-1" aria-labelledby="chat_dropdown" role="menu">
5
5
  <li>
6
- <ul component="chat/list" class="chat-list chats-list">
6
+ <ul component="chat/list" class="chat-list chats-list ghost-scrollbar pe-1">
7
7
  <li class="loading-text">
8
8
  <a href="#"><i class="fa fa-refresh fa-spin"></i> [[global:chats.loading]]</a>
9
9
  </li>
@@ -12,8 +12,8 @@
12
12
  <li class="dropdown-divider"></li>
13
13
  <li>
14
14
  <div class="d-flex justify-content-center gap-1 flex-wrap">
15
- <a class="btn btn-light mark-all-read flex-fill text-nowrap" href="#" component="chats/mark-all-read"><i class="fa fa-check-double"></i> [[modules:chat.mark-all-read]]</a>
16
- <a class="btn btn-primary flex-fill text-nowrap" href="{relative_path}/user/{user.userslug}/chats"><i class="fa fa-comments"></i> [[modules:chat.see-all]]</a>
15
+ <a class="btn btn-light btn-sm mark-all-read flex-fill text-nowrap" href="#" component="chats/mark-all-read"><i class="fa fa-check-double"></i> [[modules:chat.mark-all-read]]</a>
16
+ <a class="btn btn-primary btn-sm flex-fill text-nowrap" href="{relative_path}/user/{user.userslug}/chats"><i class="fa fa-comments"></i> [[modules:chat.see-all]]</a>
17
17
  </div>
18
18
  </li>
19
19
  </ul>
@@ -1,19 +1,49 @@
1
- <a href="{relative_path}/notifications" class="nav-link" data-bs-toggle="dropdown" id="notif_dropdown" data-ajaxify="false" role="button" aria-haspopup="true" aria-expanded="false">
2
- <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
+ <a data-bs-toggle="dropdown" href="#" role="button" class="nav-link d-flex gap-2 justify-content-between align-items-center position-relative" aria-haspopup="true" aria-expanded="false" aria-label="[[global:header.notifications]]">
2
+ <span class="d-flex gap-2 align-items-center text-nowrap truncate-open">
3
+ <span class="position-relative">
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>
5
+ <span component="notifications/count" class="visible-closed position-absolute top-0 start-100 translate-middle badge rounded-1 bg-primary {{{ if !unreadCount.notification }}}hidden{{{ end }}}">{unreadCount.notification}</span>
6
+ </span>
7
+ </span>
8
+ <span component="notifications/count" class="visible-open badge rounded-1 bg-primary {{{ if !unreadCount.notification }}}hidden{{{ end }}}">{unreadCount.notification}</span>
3
9
  </a>
4
- <ul class="dropdown-menu dropdown-menu-end p-1" aria-labelledby="notif_dropdown" role="menu">
10
+
11
+ <ul class="notifications-dropdown dropdown-menu dropdown-menu-end p-1 shadow" role="menu">
5
12
  <li>
6
- <ul component="notifications/list" class="notification-list">
7
- <li class="loading-text">
8
- <a href="#"><i class="fa fa-refresh fa-spin"></i> [[global:notifications.loading]]</a>
9
- </li>
10
- </ul>
13
+ <div component="notifications/list" class="list-container notification-list overscroll-behavior-contain pe-1 ff-base ghost-scrollbar">
14
+ <div class="mb-2 p-1">
15
+ <div class="d-flex gap-1 justify-content-between">
16
+ <div class="d-flex gap-2 flex-grow-1 placeholder-wave">
17
+ <div class="placeholder" style="width: 32px; height: 32px;"></div>
18
+ <div class="flex-grow-1">
19
+ <div class="d-flex flex-column">
20
+ <div class="text-sm">
21
+ <span class="placeholder placeholder-sm col-4"></span>
22
+ <span class="placeholder placeholder-sm col-6"></span>
23
+ <span class="placeholder placeholder-sm col-7"></span>
24
+ <span class="placeholder placeholder-sm col-2"></span>
25
+ <span class="placeholder placeholder-sm col-5"></span>
26
+ </div>
27
+ <div class="text-xs">
28
+ <div class="placeholder placeholder-xs col-6"></div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ <div>
34
+ <button class="mark-read btn-ghost-sm" style="width: 1.5rem; height: 1.5rem;">
35
+ <i class="unread fa fa-2xs fa-circle text-primary"></i>
36
+ </button>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
11
41
  </li>
12
42
  <li class="dropdown-divider"></li>
13
43
  <li>
14
44
  <div class="d-flex justify-content-center gap-1 flex-wrap">
15
- <a role="button" href="#" class="btn btn-light mark-all-read flex-fill text-nowrap"><i class="fa fa-check-double"></i> [[notifications:mark-all-read]]</a>
16
- <a class="btn btn-primary flex-fill text-nowrap" href="{relative_path}/notifications"><i class="fa fa-list"></i> [[notifications:see-all]]</a>
45
+ <a 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> [[notifications:mark-all-read]]</a>
46
+ <a class="btn btn-sm btn-primary flex-fill text-nowrap text-truncate ff-secondary" href="{relative_path}/notifications"><i class="fa fa-list"></i> [[notifications:see-all]]</a>
17
47
  </div>
18
48
  </li>
19
- </ul>
49
+ </ul>
@@ -4,7 +4,7 @@
4
4
  <span id="user-header-name" class="d-block d-sm-none">{user.username}</span>
5
5
  </a>
6
6
  <input type="checkbox" class="hidden" id="user-control-list-check" aria-hidden="true">
7
- <ul id="user-control-list" component="header/usercontrol" class="dropdown-menu dropdown-menu-end" aria-labelledby="user_dropdown" role="menu">
7
+ <ul id="user-control-list" component="header/usercontrol" class="dropdown-menu dropdown-menu-end p-1" aria-labelledby="user_dropdown" role="menu">
8
8
  <li>
9
9
  <a class="dropdown-item" component="header/profilelink" href="{relative_path}/user/{user.userslug}" role="menuitem">
10
10
  <i component="user/status" class="fa fa-fw fa-circle status {user.status}"></i> <span component="header/username">{user.username}</span>
@@ -1,30 +1,44 @@
1
+ {{{ if !notifications.length }}}
2
+ <div class="no-notifs text-center p-4 d-flex flex-column">
3
+ <div class="p-4"><i class="fa-solid fa-wind fs-2 text-muted"></i></div>
4
+ <div class="text-xs fw-semibold text-muted">[[notifications:no-notifs]]</div>
5
+ </div>
6
+ {{{ end }}}
1
7
 
2
- <!-- IF !notifications.length -->
3
- <li class="no-notifs"><a href="#">[[notifications:no-notifs]]</a></li>
4
- <!-- ENDIF !notifications.length -->
8
+ {{{ each notifications }}}
9
+ <div class="{./readClass}" data-nid="{./nid}" data-path="{./path}" {{{ if ./pid }}}data-pid="{./pid}"{{{ end }}}{{{ if ./tid }}}data-tid="{./tid}"{{{ end }}}>
10
+ <div class="d-flex gap-1 justify-content-between">
11
+ <div class="btn btn-ghost btn-sm d-flex gap-2 flex-grow-1 align-items-start text-start">
12
+ <a class="flex-grow-0 flex-shrink-0" href="{{{ if ./user.userslug}}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
13
+ {{{ if (./image && ./from) }}}
14
+ <img class="avatar avatar-rounded" style="--avatar-size: 32px;" src="{./image}" />
15
+ {{{ else }}}
16
+ {{{ if ./icon }}}
17
+ <div class="avatar avatar-rounded" style="--avatar-size: 32px;"><i class="text-secondary fa {./icon}"></i></div>
18
+ {{{ else }}}
19
+ <div class="avatar avatar-rounded" style="--avatar-size: 32px; background-color: {./user.icon:bgColor};">{./user.icon:text}</div>
20
+ {{{ end }}}
21
+ {{{ end }}}
22
+ </a>
5
23
 
6
- {{{each notifications}}}
7
- <li class="{notifications.readClass}" data-nid="{notifications.nid}" data-path="{notifications.path}" <!-- IF notifications.pid --> data-pid="{notifications.pid}"<!-- ENDIF notifications.pid --><!-- IF notifications.tid --> data-tid="{notifications.tid}"<!-- ENDIF notifications.tid -->>
8
- <!-- IF notifications.image -->
9
- <!-- IF notifications.from -->
10
- <a href="{config.relative_path}/user/{notifications.user.userslug}"><img class="float-start user-img avatar avatar-rounded" style="--avatar-size: 32px;" src="{notifications.image}" /></a>
11
- <!-- ENDIF notifications.from -->
12
- <!-- ELSE -->
13
- <a href="{config.relative_path}/user/{notifications.user.userslug}"><div class="float-start avatar avatar-rounded" style="--avatar-size: 32px; background-color: {notifications.user.icon:bgColor};">{notifications.user.icon:text}</div></a>
14
- <!-- ENDIF notifications.image -->
15
-
16
- <a href="{notifications.path}" class="notification-chat-content deco-none">
17
- <span class="text">{notifications.bodyShort}</span>
18
- </a>
19
-
20
- <div class="notification-chat-controls">
21
- {{{ if ./nid }}}
22
- <div class="mark-read" aria-label="Mark Read">
23
- <i class="unread fa fa-circle"></i>
24
- <i class="read fa fa-circle-o"></i>
24
+ <div class="d-flex flex-grow-1 flex-column align-items-start position-relative">
25
+ <a href="{./path}" class="text-decoration-none d-inline-block text-reset text-break text-sm ff-sans stretched-link" component="notifications/item/link">
26
+ {./bodyShort}
27
+ </a>
28
+ <div class="text-xs text-muted">{{{ if ./timeagoLong }}}{./timeagoLong}{{{ else }}}<span class="timeago" title="{./datetimeISO}"></span>{{{ end }}}</div>
29
+ </div>
30
+ </div>
31
+ <div>
32
+ {{{ if ./nid }}}
33
+ <button class="mark-read btn btn-ghost btn-sm flex-grow-0 flex-shrink-0 p-1" style="width: 1.5rem; height: 1.5rem;">
34
+ <i class="unread fa fa-2xs fa-circle text-primary {{{ if ./read }}}hidden{{{ end }}}" aria-label="[[unread:mark-as-read]]"></i>
35
+ <i class="read fa fa-2xs fa-circle-o text-secondary {{{ if !./read }}}hidden{{{ end }}}" aria-label="[[unread:mark-as-unread]]"></i>
36
+ </button>
37
+ {{{ end }}}
25
38
  </div>
26
- {{{ end }}}
27
- <span class="relTime">{notifications.timeago}</span>
28
39
  </div>
29
- </li>
30
- {{{end}}}
40
+ </div>
41
+ {{{ if !@last }}}
42
+ <hr class="my-1" />
43
+ {{{ end }}}
44
+ {{{ end }}}