nodebb-theme-persona 11.3.36 → 11.3.40
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/less/topic.less +0 -1
- package/package.json +1 -1
- package/public/persona.js +38 -31
- package/templates/partials/topic/navigator.tpl +8 -1
package/less/topic.less
CHANGED
package/package.json
CHANGED
package/public/persona.js
CHANGED
|
@@ -45,42 +45,49 @@ $(document).ready(function () {
|
|
|
45
45
|
if (!$.fn.autoHidingNavbar) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
var env = utils.findBootstrapEnvironment();
|
|
49
|
-
// if env didn't change don't destroy and recreate
|
|
50
|
-
if (env === lastBSEnv) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
lastBSEnv = env;
|
|
54
|
-
var navbarEl = $('.navbar-fixed-top');
|
|
55
|
-
navbarEl.autoHidingNavbar('destroy').removeData('plugin_autoHidingNavbar');
|
|
56
|
-
navbarEl.css('top', '');
|
|
57
|
-
|
|
58
|
-
if (env === 'xs' || env === 'sm') {
|
|
59
|
-
navbarEl.autoHidingNavbar({
|
|
60
|
-
showOnBottom: false,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
48
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (topicListHeader.length) {
|
|
70
|
-
topicListHeader.css({ top: topValue });
|
|
71
|
-
}
|
|
49
|
+
require(['hooks'], (hooks) => {
|
|
50
|
+
var env = utils.findBootstrapEnvironment();
|
|
51
|
+
// if env didn't change don't destroy and recreate
|
|
52
|
+
if (env === lastBSEnv) {
|
|
53
|
+
return;
|
|
72
54
|
}
|
|
73
|
-
|
|
55
|
+
lastBSEnv = env;
|
|
56
|
+
var navbarEl = $('.navbar-fixed-top');
|
|
57
|
+
navbarEl.autoHidingNavbar('destroy').removeData('plugin_autoHidingNavbar');
|
|
58
|
+
navbarEl.css('top', '');
|
|
59
|
+
|
|
60
|
+
hooks.fire('filter:persona.configureNavbarHiding', {
|
|
61
|
+
resizeEnvs: ['xs', 'sm'],
|
|
62
|
+
}).then(({ resizeEnvs }) => {
|
|
63
|
+
if (resizeEnvs.includes(env)) {
|
|
64
|
+
navbarEl.autoHidingNavbar({
|
|
65
|
+
showOnBottom: false,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
74
68
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
function fixTopCss(topValue) {
|
|
70
|
+
if (ajaxify.data.template.topic) {
|
|
71
|
+
$('.topic .topic-header').css({ top: topValue });
|
|
72
|
+
} else {
|
|
73
|
+
var topicListHeader = $('.topic-list-header');
|
|
74
|
+
if (topicListHeader.length) {
|
|
75
|
+
topicListHeader.css({ top: topValue });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
navbarEl.off('show.autoHidingNavbar')
|
|
81
|
+
.on('show.autoHidingNavbar', function () {
|
|
82
|
+
fixTopCss('');
|
|
83
|
+
});
|
|
79
84
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
navbarEl.off('hide.autoHidingNavbar')
|
|
86
|
+
.on('hide.autoHidingNavbar', function () {
|
|
87
|
+
fixTopCss('0px');
|
|
88
|
+
});
|
|
83
89
|
});
|
|
90
|
+
});
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
function setupNProgress() {
|
|
@@ -25,7 +25,14 @@
|
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
<
|
|
28
|
+
<div class="row">
|
|
29
|
+
<div class="col-xs-6">
|
|
30
|
+
<button id="myNextPostBtn" class="btn btn-default form-control" disabled>[[topic:go-to-my-next-post]]</button>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="col-xs-6">
|
|
33
|
+
<input type="number" class="form-control" id="indexInput" placeholder="[[global:pagination.enter_index]]">
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
29
36
|
</li>
|
|
30
37
|
</ul>
|
|
31
38
|
</div>
|