nodebb-theme-persona 15.1.7 → 15.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-persona",
3
- "version": "15.1.7",
3
+ "version": "15.1.9",
4
4
  "nbbpm": {
5
5
  "compatibility": "^4.14.0"
6
6
  },
@@ -35,8 +35,8 @@ define('persona/taskbar', [
35
35
  });
36
36
 
37
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');
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
40
  el.parent('[data-uuid]').attr('data-roomId', data.options.roomId);
41
41
 
42
42
  if (chatObj.users.length === 2) {
package/scss/account.scss CHANGED
@@ -1,8 +1,4 @@
1
1
  .account {
2
- .breadcrumb {
3
- margin-bottom: 3rem;
4
- }
5
-
6
2
  .edit-form {
7
3
  max-width: 300px;
8
4
  margin-left: auto;
@@ -37,10 +33,6 @@
37
33
  height: 300px;
38
34
  line-height: 300px;
39
35
  }
40
-
41
- .avatar-wrapper {
42
- top: 230px;
43
- }
44
36
  }
45
37
  }
46
38
 
package/scss/mobile.scss CHANGED
@@ -25,8 +25,6 @@
25
25
  }
26
26
 
27
27
  .account {
28
- margin-top: 256px;
29
-
30
28
  .cover .controls i {
31
29
  font-size: 3em;
32
30
  }
package/scss/skins.scss CHANGED
@@ -18,6 +18,10 @@
18
18
  background-color: transparent!important;
19
19
  backdrop-filter: blur(5px);
20
20
  }
21
+ .account .avatar-wrapper.bg-body {
22
+ background: linear-gradient(90deg, rgb(51.3, 182.7, 225.9), rgb(93.6, 98.1, 175.5), rgb(220.4, 47.5, 124.45));
23
+ background-attachment: fixed;
24
+ }
21
25
  }
22
26
 
23
27
  .skin-solar {
@@ -224,7 +224,7 @@
224
224
  </div>
225
225
 
226
226
  <div class="col-sm-6 mb-3">
227
- {{{ if isAdminOrGlobalModerator }}}
227
+ {{{ if isAdminOrGlobalModeratorOrModerator }}}
228
228
  <div class="card">
229
229
  <h5 class="card-header">
230
230
  {{tx("user:info.moderation-note")}}
@@ -236,10 +236,8 @@
236
236
  <br/>
237
237
  <div component="account/moderation-note/list">
238
238
  {{{ each moderationNotes }}}
239
- <hr/>
240
-
241
- <div data-id="{./id}">
242
- <div class="d-flex align-items-baseline gap-1 mb-1">
239
+ <div data-id="{./id}" class="border-bottom pb-3 mb-3">
240
+ <div class="d-flex align-items-baseline gap-2 mb-1">
243
241
  <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">{{buildAvatar(./user, "24px", true)}}</a>
244
242
 
245
243
  <a href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}" class="fw-bold" itemprop="author" data-username="{./user.username}" data-uid="{./user.uid}">{./user.username}</a>
@@ -252,7 +250,12 @@
252
250
  <div class="content text-secondary">
253
251
  {./note}
254
252
  </div>
255
- <button component="account/moderation-note/edit" class="btn btn-sm btn-link align-self-end">{{tx("topic:edit")}}</button>
253
+ {{{ if isAdmin }}}
254
+ <div class="d-flex gap-1 justify-content-end">
255
+ <button component="account/moderation-note/delete" class="btn btn-sm btn-link text-danger align-self-end">{{tx("topic:delete")}}</button>
256
+ <button component="account/moderation-note/edit" class="btn btn-sm btn-link align-self-end">{{tx("topic:edit")}}</button>
257
+ </div>
258
+ {{{ end }}}
256
259
  </div>
257
260
 
258
261
  <div component="account/moderation-note/edit-area" class="d-flex flex-column gap-2 hidden">
@@ -1,14 +1,22 @@
1
1
  <div class="account">
2
- <!-- IMPORT partials/breadcrumbs.tpl -->
2
+ <div class="cover position-absolute start-0 top-0" component="account/cover" style="background-image: url({cover:url}); background-position: {cover:position};">
3
+ <div class="container">
4
+ {{{ if (allowCoverPicture && canEdit) }}}
5
+ <div class="controls text-center">
6
+ <span class="upload p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-upload"></i></span>
7
+ <span class="resize p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-arrows"></i></span>
8
+ <span class="remove p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-times"></i></span>
9
+ </div>
10
+ <a href="#" class="save btn btn-primary">{{tx("groups:cover-save")}} <i class="fa fa-fw fa-floppy-o"></i></a>
11
+ <div class="indicator text-bg-primary">{{tx("groups:cover-saving")}} <i class="fa fa-fw fa-refresh fa-spin"></i></div>
12
+ {{{ end }}}
3
13
 
4
- <div data-widget-area="header">
5
- {{{each widgets.header}}}
6
- {{widgets.header.html}}
7
- {{{end}}}
14
+ <!-- IMPORT partials/account/menu.tpl -->
15
+ </div>
8
16
  </div>
9
17
 
10
- <div class="cover position-absolute start-0 top-0" component="account/cover" style="background-image: url({cover:url}); background-position: {cover:position};">
11
- <div class="avatar-wrapper bg-body rounded-circle position-absolute start-50 top-100 translate-middle hover-parent" data-uid="{uid}" style="padding: 4px;">
18
+ <div class="d-flex gap-2 w-100 pb-4 justify-content-center">
19
+ <div class="avatar-wrapper bg-body rounded-circle position-relative hover-parent" data-uid="{uid}" style="margin-top: -80px; padding: 4px;">
12
20
  {{buildAvatar(@value, "128px", true)}}
13
21
  {{{ if (allowProfilePicture && isSelfOrAdminOrGlobalModerator)}}}
14
22
  <a href="#" component="profile/change/picture" class="d-none d-md-block pointer p-2 rounded-1 text-bg-light position-absolute top-50 start-50 translate-middle hover-opacity-75">
@@ -28,18 +36,12 @@
28
36
  </button>
29
37
  {{{ end }}}
30
38
  </div>
39
+ </div>
31
40
 
32
- <div class="container">
33
- {{{ if (allowCoverPicture && canEdit) }}}
34
- <div class="controls text-center">
35
- <span class="upload p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-upload"></i></span>
36
- <span class="resize p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-arrows"></i></span>
37
- <span class="remove p-2 m-2 rounded-1 text-bg-light opacity-75"><i class="fa fa-fw fa-times"></i></span>
38
- </div>
39
- <a href="#" class="save btn btn-primary">{{tx("groups:cover-save")}} <i class="fa fa-fw fa-floppy-o"></i></a>
40
- <div class="indicator text-bg-primary">{{tx("groups:cover-saving")}} <i class="fa fa-fw fa-refresh fa-spin"></i></div>
41
- {{{ end }}}
41
+ <!-- IMPORT partials/breadcrumbs.tpl -->
42
42
 
43
- <!-- IMPORT partials/account/menu.tpl -->
44
- </div>
43
+ <div data-widget-area="header">
44
+ {{{each widgets.header}}}
45
+ {{widgets.header.html}}
46
+ {{{end}}}
45
47
  </div>
@@ -3,7 +3,7 @@
3
3
  {{{ if @first }}}
4
4
  <div component="category/posts" class="ps-2 text-xs d-flex flex-column h-100 gap-1">
5
5
  <div class="text-nowrap text-truncate">
6
- <a class="text-decoration-none avatar-tooltip" title="{./user.displayname}" href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(posts.user, "18px", true)}}</a>
6
+ <a class="text-decoration-none avatar-tooltip" title="{{txDisplayname(./user)}}" href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(posts.user, "18px", true)}}</a>
7
7
  <a class="permalink text-muted timeago text-xs" href="{config.relative_path}/topic/{./topic.slug}{{{ if ./index }}}/{./index}{{{ end }}}" title="{./timestampISO}" aria-label="{{tx("global:lastpost")}}"></a>
8
8
  </div>
9
9
  <div class="post-content text-xs text-break line-clamp-sm-2 lh-sm position-relative flex-fill">
@@ -26,7 +26,7 @@
26
26
  <a href="{config.relative_path}/user/{./user.userslug}">{{buildAvatar(./user, "28px", true, "user-img not-responsive")}}</a>
27
27
 
28
28
  <div class="post-author text-secondary text-uppercase">
29
- <a class="text-reset" href="{config.relative_path}/user/{./user.userslug}">{./user.displayname}</a><br />
29
+ <a class="text-reset" href="{config.relative_path}/user/{./user.userslug}">{{txDisplayname(./user)}}</a><br />
30
30
  <span class="timeago" title="{./timestampISO}"></span>
31
31
  </div>
32
32
  </div>
@@ -26,7 +26,7 @@
26
26
  <strong class="text-nowrap" itemprop="author" itemscope itemtype="https://schema.org/Person">
27
27
  <meta itemprop="name" content="{./user.username}">
28
28
  {{{ if ./user.userslug }}}<meta itemprop="url" content="{config.relative_path}/user/{./user.userslug}">{{{ end }}}
29
- <a href="<!-- IF posts.user.userslug -->{config.relative_path}/user/{posts.user.userslug}<!-- ELSE -->#<!-- ENDIF posts.user.userslug -->" data-username="{posts.user.username}" data-uid="{posts.user.uid}">{posts.user.displayname}</a>
29
+ <a href="<!-- IF posts.user.userslug -->{config.relative_path}/user/{posts.user.userslug}<!-- ELSE -->#<!-- ENDIF posts.user.userslug -->" data-username="{posts.user.username}" data-uid="{posts.user.uid}">{{txDisplayname(posts.user)}}</a>
30
30
  </strong>
31
31
 
32
32
  {{{ each posts.user.selectedGroups }}}
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div class="d-flex p-0 col-12 col-lg-7 gap-2 gap-lg-3 pe-1 align-items-start {{{ if config.theme.mobileTopicTeasers }}}mb-2 mb-lg-0{{{ end }}}">
12
12
  <div class="flex-shrink-0 position-relative">
13
- <a class="d-inline-block text-decoration-none avatar-tooltip" title="{./user.displayname}" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
13
+ <a class="d-inline-block text-decoration-none avatar-tooltip" title="{{txDisplayname(./user)}}" href="{{{ if ./user.userslug }}}{config.relative_path}/user/{./user.userslug}{{{ else }}}#{{{ end }}}">
14
14
  {{buildAvatar(./user, "40px", true)}}
15
15
  </a>
16
16
  {{{ if showSelect }}}
@@ -116,7 +116,7 @@
116
116
  {{{ else }}}
117
117
  {{{ if ./teaser.pid }}}
118
118
  <div class="ps-2">
119
- <a href="{{{ if ./teaser.user.userslug }}}{config.relative_path}/user/{./teaser.user.userslug}{{{ else }}}#{{{ end }}}" class="text-decoration-none avatar-tooltip" title="{./teaser.user.displayname}">{{buildAvatar(./teaser.user, "18px", true)}}</a>
119
+ <a href="{{{ if ./teaser.user.userslug }}}{config.relative_path}/user/{./teaser.user.userslug}{{{ else }}}#{{{ end }}}" class="text-decoration-none avatar-tooltip" title="{{txDisplayname(./teaser.user)}}">{{buildAvatar(./teaser.user, "18px", true)}}</a>
120
120
  <a class="permalink text-muted timeago text-xs" href="{config.relative_path}/topic/{./slug}/{./teaser.index}" title="{./teaser.timestampISO}" aria-label="{{tx("global:lastpost")}}"></a>
121
121
  </div>
122
122
  <div class="post-content text-xs ps-2 line-clamp-sm-2 lh-sm text-break position-relative flex-fill">