nodebb-theme-persona 13.1.2 → 13.1.4

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": "13.1.2",
3
+ "version": "13.1.4",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
@@ -13,7 +13,12 @@ define('persona/mobile-menu', [
13
13
  }
14
14
 
15
15
  // initialization
16
-
16
+ const panelEl = document.getElementById('panel');
17
+ const menuEl = document.getElementById('menu');
18
+ const chatsMenuEl = document.getElementById('chats-menu');
19
+ if (!menuEl || !chatsMenuEl) {
20
+ return;
21
+ }
17
22
  const chatMenuVisible = app.user && parseInt(app.user.uid, 10);
18
23
  let swapped = !!Storage.getItem('persona:menus:legacy-layout');
19
24
  const margin = window.innerWidth;
@@ -28,8 +33,8 @@ define('persona/mobile-menu', [
28
33
  }
29
34
 
30
35
  const navSlideout = Pulling.create({
31
- panel: document.getElementById('panel'),
32
- menu: document.getElementById('menu'),
36
+ panel: panelEl,
37
+ menu: menuEl,
33
38
  width: 256,
34
39
  margin: margin,
35
40
  side: swapped ? 'right' : 'left',
@@ -39,8 +44,8 @@ define('persona/mobile-menu', [
39
44
  let chatsSlideout;
40
45
  if (chatMenuVisible) {
41
46
  chatsSlideout = Pulling.create({
42
- panel: document.getElementById('panel'),
43
- menu: document.getElementById('chats-menu'),
47
+ panel: panelEl,
48
+ menu: chatsMenuEl,
44
49
  width: 256,
45
50
  margin: margin,
46
51
  side: swapped ? 'left' : 'right',
@@ -57,10 +57,12 @@
57
57
  <div class="row">
58
58
  <div class="col-lg-10 offset-lg-2">
59
59
  {{{ if allowRegistration }}}
60
- <span>[[login:dont_have_account]] <a href="{config.relative_path}/register">[[register:register]]</a></span>
60
+ <div>[[login:dont_have_account]] <a href="{config.relative_path}/register">[[register:register]]</a></div>
61
61
  {{{ end }}}
62
62
  {{{ if allowPasswordReset }}}
63
- <a id="reset-link" href="{config.relative_path}/reset">[[login:forgot_password]]</a>
63
+ <div>
64
+ <a id="reset-link" href="{config.relative_path}/reset">[[login:forgot_password]]</a>
65
+ </div>
64
66
  {{{ end }}}
65
67
  </div>
66
68
  </div>
@@ -0,0 +1,18 @@
1
+ <a class="nav-link" data-bs-toggle="dropdown" href="{relative_path}/user/{user.userslug}/chats" id="chat_dropdown" component="chat/dropdown" data-ajaxify="false" role="button">
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
+ </a>
4
+ <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="chat_dropdown">
5
+ <li>
6
+ <ul component="chat/list" class="chat-list chats-list">
7
+ <li class="loading-text">
8
+ <a href="#"><i class="fa fa-refresh fa-spin"></i> [[global:chats.loading]]</a>
9
+ </li>
10
+ </ul>
11
+ </li>
12
+ <li class="notif-dropdown-link">
13
+ <div class="btn-group d-flex justify-content-center">
14
+ <a class="btn btn-light mark-all-read" href="#" component="chats/mark-all-read"><i class="fa fa-check-double"></i> [[modules:chat.mark_all_read]]</a>
15
+ <a class="btn btn-light" href="{relative_path}/user/{user.userslug}/chats"><i class="fa fa-comments"></i> [[modules:chat.see_all]]</a>
16
+ </div>
17
+ </li>
18
+ </ul>
@@ -0,0 +1,18 @@
1
+ <a href="{relative_path}/notifications" class="nav-link" data-bs-toggle="dropdown" id="notif_dropdown" data-ajaxify="false" role="button">
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>
3
+ </a>
4
+ <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="notif_dropdown">
5
+ <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>
11
+ </li>
12
+ <li class="notif-dropdown-link">
13
+ <div class="btn-group d-flex justify-content-center">
14
+ <a role="button" href="#" class="btn btn-light mark-all-read"><i class="fa fa-check-double"></i> [[notifications:mark_all_read]]</a>
15
+ <a class="btn btn-light" href="{relative_path}/notifications"><i class="fa fa-list"></i> [[notifications:see_all]]</a>
16
+ </div>
17
+ </li>
18
+ </ul>
@@ -0,0 +1,24 @@
1
+ <form component="search/form" id="search-form" class="d-flex justify-content-end align-items-center" role="search" method="GET">
2
+ <div component="search/fields" class="hidden" id="search-fields">
3
+ <div class="input-group flex-nowrap">
4
+ <input autocomplete="off" type="text" class="form-control" placeholder="[[global:search]]" name="query" value="">
5
+
6
+ <button href="#" class="btn btn-outline-secondary">
7
+ <i class="fa fa-gears fa-fw advanced-search-link"></i>
8
+ </button>
9
+ </div>
10
+
11
+ <div id="quick-search-container" class="quick-search-container dropdown-menu d-block mt-2 hidden">
12
+ <div class="form-check filter-category mb-2 ms-4">
13
+ <input class="form-check-input" type="checkbox" checked>
14
+ <label class="form-check-label name"></label>
15
+ </div>
16
+
17
+ <div class="text-center loading-indicator"><i class="fa fa-spinner fa-spin"></i></div>
18
+ <div class="quick-search-results-container"></div>
19
+ </div>
20
+ <button type="submit" class="btn btn-outline-secondary hide">[[global:search]]</button>
21
+ </div>
22
+
23
+ <div id="" class="nav-item"><a component="search/button" id="search-button" href="#" class="nav-link"><i class="fa fa-search fa-fw" title="Search"></i></a></div>
24
+ </form>
@@ -56,6 +56,13 @@
56
56
  <i class="fa fa-fw fa-list-alt"></i> <span>[[pages:post-queue]]</span>
57
57
  </a>
58
58
  </li>
59
+ {{{ if registrationQueueEnabled }}}
60
+ <li>
61
+ <a class="dropdown-item" href="{relative_path}/registration-queue">
62
+ <i class="fa fa-fw fa-list-alt"></i> <span>[[pages:registration-queue]]</span>
63
+ </a>
64
+ </li>
65
+ {{{ end }}}
59
66
  <li>
60
67
  <a class="dropdown-item" href="{relative_path}/ip-blacklist">
61
68
  <i class="fa fa-fw fa-ban"></i> <span>[[pages:ip-blacklist]]</span>
@@ -78,31 +78,7 @@
78
78
  </ul>
79
79
  {{{ if config.searchEnabled }}}
80
80
  <div class="navbar-nav mb-2 mb-lg-0 position-relative">
81
- <form component="search/form" id="search-form" class="d-flex justify-content-end align-items-center" role="search" method="GET">
82
- <div component="search/fields" class="hidden" id="search-fields">
83
- <div class="input-group flex-nowrap">
84
- <input autocomplete="off" type="text" class="form-control" placeholder="[[global:search]]" name="query" value="">
85
-
86
- <button href="#" class="btn btn-outline-secondary">
87
- <i class="fa fa-gears fa-fw advanced-search-link"></i>
88
- </button>
89
- </div>
90
-
91
- <div id="quick-search-container" class="quick-search-container dropdown-menu d-block mt-2 hidden">
92
- <div class="form-check filter-category mb-2 ms-4">
93
- <input class="form-check-input" type="checkbox" checked>
94
- <label class="form-check-label name"></label>
95
- </div>
96
-
97
- <div class="text-center loading-indicator"><i class="fa fa-spinner fa-spin"></i></div>
98
- <div class="quick-search-results-container"></div>
99
- </div>
100
- <button type="submit" class="btn btn-outline-secondary hide">[[global:search]]</button>
101
- </div>
102
-
103
- <li id="" class="nav-item"><a component="search/button" id="search-button" href="#" class="nav-link"><i class="fa fa-search fa-fw" title="Search"></i></a></li>
104
- </form>
105
-
81
+ <!-- IMPORT partials/header/search.tpl -->
106
82
  </div>
107
83
  {{{ end }}}
108
84
 
@@ -110,48 +86,14 @@
110
86
  {{{ if config.loggedIn }}}
111
87
  <ul id="logged-in-menu" class="navbar-nav me-0 mb-2 mb-lg-0 align-items-center">
112
88
  <li class="nav-item notifications dropdown d-none d-sm-block" component="notifications" title="[[global:header.notifications]]">
113
- <a href="{relative_path}/notifications" class="nav-link" data-bs-toggle="dropdown" id="notif_dropdown" data-ajaxify="false" role="button">
114
- <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>
115
- </a>
116
- <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="notif_dropdown">
117
- <li>
118
- <ul component="notifications/list" class="notification-list">
119
- <li class="loading-text">
120
- <a href="#"><i class="fa fa-refresh fa-spin"></i> [[global:notifications.loading]]</a>
121
- </li>
122
- </ul>
123
- </li>
124
- <li class="notif-dropdown-link">
125
- <div class="btn-group d-flex justify-content-center">
126
- <a role="button" href="#" class="btn btn-light mark-all-read"><i class="fa fa-check-double"></i> [[notifications:mark_all_read]]</a>
127
- <a class="btn btn-light" href="{relative_path}/notifications"><i class="fa fa-list"></i> [[notifications:see_all]]</a>
128
- </div>
129
- </li>
130
- </ul>
89
+ <!-- IMPORT partials/header/notifications.tpl -->
131
90
  </li>
132
91
 
133
- <!-- IF canChat -->
92
+ {{{ if canChat }}}
134
93
  <li class="nav-item chats dropdown" title="[[global:header.chats]]">
135
- <a class="nav-link" data-bs-toggle="dropdown" href="{relative_path}/user/{user.userslug}/chats" id="chat_dropdown" component="chat/dropdown" data-ajaxify="false" role="button">
136
- <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>
137
- </a>
138
- <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="chat_dropdown">
139
- <li>
140
- <ul component="chat/list" class="chat-list chats-list">
141
- <li class="loading-text">
142
- <a href="#"><i class="fa fa-refresh fa-spin"></i> [[global:chats.loading]]</a>
143
- </li>
144
- </ul>
145
- </li>
146
- <li class="notif-dropdown-link">
147
- <div class="btn-group d-flex justify-content-center">
148
- <a class="btn btn-light mark-all-read" href="#" component="chats/mark-all-read"><i class="fa fa-check-double"></i> [[modules:chat.mark_all_read]]</a>
149
- <a class="btn btn-light" href="{relative_path}/user/{user.userslug}/chats"><i class="fa fa-comments"></i> [[modules:chat.see_all]]</a>
150
- </div>
151
- </li>
152
- </ul>
94
+ <!-- IMPORT partials/header/chats.tpl -->
153
95
  </li>
154
- <!-- ENDIF canChat -->
96
+ {{{ end }}}
155
97
 
156
98
  <!-- IMPORT partials/header/user-menu.tpl -->
157
99
  </ul>