nodebb-theme-harmony 1.0.0-beta.20 → 1.0.0-beta.22

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-harmony",
3
- "version": "1.0.0-beta.20",
3
+ "version": "1.0.0-beta.22",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/public/harmony.js CHANGED
@@ -37,7 +37,7 @@ $(document).ready(function () {
37
37
  });
38
38
 
39
39
  function setupMobileMenu() {
40
- require(['api'], function (api) {
40
+ require(['hooks', 'api', 'navigator'], function (hooks, api, navigator) {
41
41
  $('[component="sidebar/toggle"]').on('click', async function () {
42
42
  const sidebarEl = $('.sidebar');
43
43
  sidebarEl.toggleClass('open');
@@ -49,6 +49,9 @@ $(document).ready(function () {
49
49
  });
50
50
  }
51
51
  $(window).trigger('action:sidebar.toggle');
52
+ if (ajaxify.data.template.topic) {
53
+ hooks.fire('action:navigator.update', { newIndex: navigator.getIndex() });
54
+ }
52
55
  });
53
56
  });
54
57
  }
@@ -2,10 +2,10 @@
2
2
  <div class="cover position-absolute start-0 top-0" component="groups/cover" style="background-image: url({group.cover:url}); background-position: {group.cover:position};">
3
3
  <div class="container">
4
4
  {{{ if group.isOwner }}}
5
- <div class="controls">
6
- <span class="upload"><i class="fa fa-fw fa-2x fa-upload"></i></span>
7
- <span class="resize"><i class="fa fa-fw fa-2x fa-arrows"></i></span>
8
- <span class="remove"><i class="fa fa-fw fa-2x fa-times"></i></span>
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
9
  </div>
10
10
  <div class="save text-bg-primary">[[groups:cover-save]] <i class="fa fa-fw fa-floppy-o"></i></div>
11
11
  <div class="indicator text-bg-primary">[[groups:cover-saving]] <i class="fa fa-fw fa-refresh fa-spin"></i></div>
@@ -13,24 +13,27 @@
13
13
  </div>
14
14
  </div>
15
15
 
16
- <div class="d-flex flex-column pb-4 mb-4 mt-2 border-bottom">
17
- <div class="d-flex justify-content-between mt-1 align-items-center">
16
+ <div class="d-flex flex-column flex-md-row justify-content-md-between pb-4 mb-4 mt-2 border-bottom">
17
+ <div class="d-flex flex-column mt-1">
18
18
  <div class="d-flex align-items-center gap-2">
19
19
  <h2 class="mb-0">{group.displayName}</h2>
20
- {{{ if group.private }}}<span class="badge text-bg-light border border-1">[[groups:details.private]]</span>{{{ end }}}
21
- {{{ if group.hidden }}}<span class="badge text-bg-light border border-1">[[groups:details.hidden]]</span>{{{ end }}}
22
20
  </div>
23
-
24
- <div>
25
- {{{ if loggedIn }}}
26
- {function.membershipBtn, group}
27
- {{{ end }}}
28
- {{{ if isAdmin }}}
29
- <a href="{config.relative_path}/admin/manage/groups/{group.nameEncoded}" target="_blank" class="btn btn-light"><i class="fa fa-gear"></i> [[user:edit]]</a>
30
- {{{ end }}}
21
+ <div class="d-flex gap-2">
22
+ {group.descriptionParsed}
23
+ <div>
24
+ {{{ if group.private }}}<span class="badge text-bg-light border border-1">[[groups:details.private]]</span>{{{ end }}}
25
+ {{{ if group.hidden }}}<span class="badge text-bg-light border border-1">[[groups:details.hidden]]</span>{{{ end }}}
26
+ </div>
31
27
  </div>
32
28
  </div>
33
- {group.descriptionParsed}
29
+ <div>
30
+ {{{ if loggedIn }}}
31
+ {function.membershipBtn, group}
32
+ {{{ end }}}
33
+ {{{ if isAdmin }}}
34
+ <a href="{config.relative_path}/admin/manage/groups/{group.nameEncoded}" target="_blank" class="btn btn-light"><i class="fa fa-gear"></i> [[user:edit]]</a>
35
+ {{{ end }}}
36
+ </div>
34
37
  </div>
35
38
 
36
39
  <div class="d-flex flex-column flex-md-row">
@@ -1 +1 @@
1
- <a href="{config.relative_path}/groups/{./slug}" class="badge rounded-1 text-uppercase text-truncate text-decoration-none" style="max-width: 150px;color:{./textColor};background-color: {./labelColor};"><i class="fa {{{ if ./icon }}}{./icon}{{{ if ./userTitle}}} me-1{{{ end }}}{{{else}}}hidden{{{ end }}}"></i><span class="badge-text">{{{ if ./userTitle }}}{./userTitle}{{{ end }}}</span></a>
1
+ <a href="{config.relative_path}/groups/{./slug}" class="badge rounded-1 text-uppercase text-truncate text-decoration-none" style="max-width: 150px;color:{./textColor};background-color: {./labelColor};"><i class="fa {{{ if ./icon }}}{./icon}{{{ if ./userTitle}}} me-1{{{ end }}}{{{else}}}hidden{{{ end }}}"></i><span class="badge-text align-text-bottom">{{{ if ./userTitle }}}{./userTitle}{{{ end }}}</span></a>