nodebb-theme-harmony 1.0.0-beta.9 → 1.0.0-beta.91
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/README.md +12 -1
- package/languages/en-GB/harmony.json +5 -1
- package/library.js +25 -25
- package/package.json +1 -1
- package/plugin.json +0 -1
- package/public/harmony.js +148 -9
- package/public/settings.js +1 -0
- package/screenshots/categories.png +0 -0
- package/screenshots/recent.png +0 -0
- package/screenshots/topic.png +0 -0
- package/scss/account.scss +1 -1
- package/scss/chats.scss +53 -25
- package/scss/common.scss +78 -9
- package/scss/flags.scss +5 -0
- package/scss/groups.scss +2 -2
- package/scss/harmony.scss +3 -0
- package/scss/mixins.scss +7 -3
- package/scss/modals.scss +6 -1
- package/scss/modules/bottom-sheet.scss +1 -1
- package/scss/modules/composer.scss +0 -4
- package/scss/modules/cover.scss +1 -11
- package/scss/modules/filters.scss +8 -0
- package/scss/modules/paginator.scss +24 -0
- package/scss/modules/topic-navigator.scss +16 -42
- package/scss/modules/topics-list.scss +172 -16
- package/scss/modules/user-menu.scss +6 -0
- package/scss/overrides.scss +4 -1
- package/scss/sidebar.scss +39 -11
- package/scss/topic.scss +30 -13
- package/templates/account/blocks.tpl +35 -40
- package/templates/account/categories.tpl +47 -29
- package/templates/account/consent.tpl +66 -10
- package/templates/account/edit/password.tpl +25 -30
- package/templates/account/edit/username.tpl +21 -26
- package/templates/account/edit.tpl +105 -116
- package/templates/account/followers.tpl +12 -19
- package/templates/account/following.tpl +12 -18
- package/templates/account/groups.tpl +12 -17
- package/templates/account/info.tpl +178 -206
- package/templates/account/posts.tpl +31 -36
- package/templates/account/profile.tpl +66 -73
- package/templates/account/sessions.tpl +8 -30
- package/templates/account/settings.tpl +222 -203
- package/templates/account/theme.tpl +35 -26
- package/templates/account/topics.tpl +36 -38
- package/templates/account/uploads.tpl +33 -40
- package/templates/admin/plugins/harmony.tpl +17 -3
- package/templates/categories.tpl +2 -2
- package/templates/category.tpl +13 -14
- package/templates/chats.tpl +7 -8
- package/templates/flags/detail.tpl +160 -193
- package/templates/flags/list.tpl +4 -70
- package/templates/footer.tpl +2 -2
- package/templates/groups/details.tpl +21 -18
- package/templates/groups/list.tpl +1 -1
- package/templates/groups/members.tpl +0 -2
- package/templates/header.tpl +2 -2
- package/templates/login.tpl +2 -2
- package/templates/notifications.tpl +1 -1
- package/templates/partials/account/admin-menu.tpl +9 -9
- package/templates/partials/account/category-item.tpl +14 -17
- package/templates/partials/account/footer.tpl +3 -0
- package/templates/partials/account/header.tpl +78 -81
- package/templates/partials/account/session-list.tpl +18 -0
- package/templates/partials/account/sidebar-left.tpl +6 -0
- package/templates/partials/breadcrumbs.tpl +6 -6
- package/templates/partials/buttons/newTopic.tpl +1 -1
- package/templates/partials/categories/item.tpl +30 -23
- package/templates/partials/categories/lastpost.tpl +2 -2
- package/templates/partials/category/filter-dropdown-content.tpl +37 -0
- package/templates/partials/{category-selector-content.tpl → category/selector-dropdown-content.tpl} +7 -7
- package/templates/partials/category/sort.tpl +7 -7
- package/templates/partials/category/subcategory.tpl +1 -1
- package/templates/partials/category/tags.tpl +0 -2
- package/templates/partials/category/tools.tpl +28 -25
- package/templates/partials/category/watch.tpl +30 -6
- package/templates/partials/chats/dropdown.tpl +4 -1
- package/templates/partials/chats/message-window.tpl +8 -7
- package/templates/partials/chats/message.tpl +4 -6
- package/templates/partials/chats/options.tpl +14 -6
- package/templates/partials/chats/recent_room.tpl +41 -32
- package/templates/partials/cookie-consent.tpl +5 -5
- package/templates/partials/flags/bulk-actions.tpl +9 -0
- package/templates/partials/flags/filters.tpl +163 -78
- package/templates/partials/flags/results.tpl +38 -0
- package/templates/partials/groups/admin.tpl +4 -4
- package/templates/partials/groups/badge.tpl +1 -1
- package/templates/partials/groups/memberlist.tpl +1 -1
- package/templates/partials/groups/sidebar-left.tpl +1 -1
- package/templates/partials/header/brand.tpl +9 -2
- package/templates/partials/mobile-footer.tpl +69 -64
- package/templates/partials/notifications_list.tpl +11 -8
- package/templates/partials/paginator.tpl +11 -9
- package/templates/partials/post_bar.tpl +26 -24
- package/templates/partials/posts_list_item.tpl +5 -5
- package/templates/partials/quick-search-results.tpl +3 -3
- package/templates/partials/search-filters.tpl +184 -0
- package/templates/partials/search-results.tpl +28 -32
- package/templates/partials/sidebar/chats.tpl +22 -33
- package/templates/partials/sidebar/drafts.tpl +45 -34
- package/templates/partials/sidebar/logged-in-menu.tpl +5 -5
- package/templates/partials/sidebar/logged-out-menu.tpl +1 -1
- package/templates/partials/sidebar/notifications.tpl +29 -8
- package/templates/partials/sidebar/search.tpl +1 -1
- package/templates/partials/sidebar/user-menu.tpl +38 -29
- package/templates/partials/sidebar-left.tpl +11 -11
- package/templates/partials/sidebar-right.tpl +1 -3
- package/templates/partials/skin-switcher.tpl +3 -3
- package/templates/partials/tags/filter-dropdown-content.tpl +31 -0
- package/templates/partials/tags_list.tpl +4 -4
- package/templates/partials/topic/browsing-users.tpl +0 -2
- package/templates/partials/topic/event.tpl +1 -1
- package/templates/partials/topic/navigation-post.tpl +5 -9
- package/templates/partials/topic/navigator-mobile.tpl +62 -0
- package/templates/partials/topic/navigator.tpl +21 -17
- package/templates/partials/topic/post-editor.tpl +0 -2
- package/templates/partials/topic/post-menu-list.tpl +60 -62
- package/templates/partials/topic/post-menu.tpl +16 -11
- package/templates/partials/topic/post.tpl +43 -25
- package/templates/partials/topic/quickreply.tpl +5 -5
- package/templates/partials/topic/reply-button.tpl +3 -3
- package/templates/partials/topic/sort.tpl +17 -5
- package/templates/partials/topic/tools.tpl +2 -2
- package/templates/partials/topic/topic-menu-list.tpl +22 -24
- package/templates/partials/topic/watch.tpl +30 -6
- package/templates/partials/topic-filters.tpl +6 -3
- package/templates/partials/topic-list-bar.tpl +50 -46
- package/templates/partials/topic-terms.tpl +6 -3
- package/templates/partials/topics_list.tpl +53 -60
- package/templates/partials/userFilter-placeholders.tpl +5 -0
- package/templates/partials/users/filter-dropdown-content.tpl +23 -0
- package/templates/partials/users/item.tpl +25 -27
- package/templates/partials/users_list.tpl +1 -1
- package/templates/popular.tpl +3 -1
- package/templates/post-queue.tpl +166 -0
- package/templates/recent.tpl +3 -2
- package/templates/register.tpl +2 -2
- package/templates/search.tpl +39 -177
- package/templates/tags.tpl +3 -3
- package/templates/top.tpl +3 -1
- package/templates/topic.tpl +74 -68
- package/templates/unread.tpl +3 -1
- package/templates/users.tpl +7 -3
- package/templates/modules/usercard.tpl +0 -39
- package/templates/partials/acceptTos.tpl +0 -11
- package/templates/partials/category-filter-content.tpl +0 -30
- package/templates/partials/category-filter-right.tpl +0 -5
- package/templates/partials/category-filter.tpl +0 -3
- package/templates/partials/category-selector-right.tpl +0 -5
- package/templates/partials/category-selector.tpl +0 -3
- package/templates/partials/slideout-menu.tpl +0 -6
package/README.md
CHANGED
|
@@ -5,4 +5,15 @@ The Harmony theme is the default theme for NodeBB for versions spanning v3.0.0 o
|
|
|
5
5
|
|
|
6
6
|
## Issues
|
|
7
7
|
|
|
8
|
-
Issues are tracked in [the main project issue tracker](https://github.com/NodeBB/NodeBB/issues?q=is%3Aopen+is%3Aissue+label%3Athemes).
|
|
8
|
+
Issues are tracked in [the main project issue tracker](https://github.com/NodeBB/NodeBB/issues?q=is%3Aopen+is%3Aissue+label%3Athemes).
|
|
9
|
+
|
|
10
|
+
## Screenshots
|
|
11
|
+
|
|
12
|
+
### Categories
|
|
13
|
+
<img height="450" src="screenshots/categories.png">
|
|
14
|
+
|
|
15
|
+
### Recent
|
|
16
|
+
<img height="450" src="screenshots/recent.png">
|
|
17
|
+
|
|
18
|
+
### Topic
|
|
19
|
+
<img height="450" src="screenshots/topic.png">
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"skins": "Skins",
|
|
3
3
|
"collapse": "Collapse",
|
|
4
|
+
"expand": "Expand",
|
|
4
5
|
"login-register-to-search": "Login or register to search.",
|
|
5
6
|
"settings.title": "Theme settings",
|
|
6
7
|
"settings.enableQuickReply": "Enable quick reply",
|
|
7
8
|
"settings.centerHeaderElements": "Center header elements",
|
|
8
|
-
"settings.stickyToolbar": "Sticky toolbar"
|
|
9
|
+
"settings.stickyToolbar": "Sticky toolbar",
|
|
10
|
+
"settings.stickyToolbar.help": "The toolbar on topic and category pages will stick to the top of the page",
|
|
11
|
+
"settings.autohideBottombar": "Auto hide bottom bar",
|
|
12
|
+
"settings.autohideBottombar.help": "The bottom bar on mobile view will be hidden when the page is scrolled down"
|
|
9
13
|
}
|
package/library.js
CHANGED
|
@@ -12,6 +12,7 @@ const defaults = {
|
|
|
12
12
|
enableQuickReply: 'on',
|
|
13
13
|
centerHeaderElements: 'off',
|
|
14
14
|
stickyToolbar: 'on',
|
|
15
|
+
autohideBottombar: 'off',
|
|
15
16
|
openSidebars: 'off',
|
|
16
17
|
};
|
|
17
18
|
|
|
@@ -77,11 +78,26 @@ library.defineWidgetAreas = async function (areas) {
|
|
|
77
78
|
});
|
|
78
79
|
|
|
79
80
|
areas = areas.concat([
|
|
81
|
+
{
|
|
82
|
+
name: 'Main post header',
|
|
83
|
+
template: 'topic.tpl',
|
|
84
|
+
location: 'mainpost-header',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: 'Main post footer',
|
|
88
|
+
template: 'topic.tpl',
|
|
89
|
+
location: 'mainpost-footer',
|
|
90
|
+
},
|
|
80
91
|
{
|
|
81
92
|
name: 'Sidebar Footer',
|
|
82
93
|
template: 'global',
|
|
83
94
|
location: 'sidebar-footer',
|
|
84
95
|
},
|
|
96
|
+
{
|
|
97
|
+
name: 'Brand Header',
|
|
98
|
+
template: 'global',
|
|
99
|
+
location: 'brand-header',
|
|
100
|
+
},
|
|
85
101
|
]);
|
|
86
102
|
|
|
87
103
|
return areas;
|
|
@@ -92,15 +108,18 @@ async function loadThemeConfig(uid) {
|
|
|
92
108
|
meta.settings.get('harmony'),
|
|
93
109
|
user.getSettings(uid),
|
|
94
110
|
]);
|
|
95
|
-
|
|
111
|
+
|
|
112
|
+
const config = { ...defaults, ...themeConfig, ...(_.pick(userConfig, Object.keys(defaults))) };
|
|
113
|
+
config.enableQuickReply = config.enableQuickReply === 'on';
|
|
114
|
+
config.centerHeaderElements = config.centerHeaderElements === 'on';
|
|
115
|
+
config.stickyToolbar = config.stickyToolbar === 'on';
|
|
116
|
+
config.autohideBottombar = config.autohideBottombar === 'on';
|
|
117
|
+
config.openSidebars = config.openSidebars === 'on';
|
|
118
|
+
return config;
|
|
96
119
|
}
|
|
97
120
|
|
|
98
121
|
library.getThemeConfig = async function (config) {
|
|
99
|
-
|
|
100
|
-
config.enableQuickReply = themeConfig.enableQuickReply === 'on';
|
|
101
|
-
config.centerHeaderElements = themeConfig.centerHeaderElements === 'on';
|
|
102
|
-
config.stickyToolbar = themeConfig.stickyToolbar === 'on';
|
|
103
|
-
config.openSidebars = themeConfig.openSidebars === 'on';
|
|
122
|
+
config.theme = await loadThemeConfig(config.uid);;
|
|
104
123
|
config.openDraftsOnPageLoad = false;
|
|
105
124
|
return config;
|
|
106
125
|
};
|
|
@@ -124,25 +143,6 @@ library.saveUserSettings = async function (hookData) {
|
|
|
124
143
|
return hookData;
|
|
125
144
|
};
|
|
126
145
|
|
|
127
|
-
library.addUserToTopic = async function (hookData) {
|
|
128
|
-
const { enableQuickReply } = await loadThemeConfig(hookData.req.uid);
|
|
129
|
-
if (enableQuickReply === 'on') {
|
|
130
|
-
if (hookData.req.user) {
|
|
131
|
-
const userData = await user.getUserData(hookData.req.uid);
|
|
132
|
-
hookData.templateData.loggedInUser = userData;
|
|
133
|
-
} else {
|
|
134
|
-
hookData.templateData.loggedInUser = {
|
|
135
|
-
uid: 0,
|
|
136
|
-
username: '[[global:guest]]',
|
|
137
|
-
picture: user.getDefaultAvatar(),
|
|
138
|
-
'icon:text': '?',
|
|
139
|
-
'icon:bgColor': '#aaa',
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return hookData;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
146
|
library.filterMiddlewareRenderHeader = async function (hookData) {
|
|
147
147
|
const userSettings = await user.getSettings(hookData.req.uid);
|
|
148
148
|
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
{ "hook": "filter:settings.get", "method": "getAdminSettings"},
|
|
9
9
|
{ "hook": "filter:user.saveSettings", "method": "saveUserSettings" },
|
|
10
10
|
{ "hook": "filter:user.profileMenu", "method": "addProfileItem" },
|
|
11
|
-
{ "hook": "filter:topic.build", "method": "addUserToTopic" },
|
|
12
11
|
{ "hook": "filter:middleware.renderHeader", "method": "filterMiddlewareRenderHeader" },
|
|
13
12
|
{ "hook": "filter:middleware.render", "method": "removeFinalBreadcrumb" }
|
|
14
13
|
],
|
package/public/harmony.js
CHANGED
|
@@ -5,6 +5,9 @@ $(document).ready(function () {
|
|
|
5
5
|
setupMobileMenu();
|
|
6
6
|
setupSearch();
|
|
7
7
|
setupDrafts();
|
|
8
|
+
handleMobileNavigator();
|
|
9
|
+
setupNavTooltips();
|
|
10
|
+
fixPlaceholders();
|
|
8
11
|
|
|
9
12
|
$('[component="skinSwitcher"]').on('click', '.dropdown-item', function () {
|
|
10
13
|
const skin = $(this).attr('data-value');
|
|
@@ -36,7 +39,7 @@ $(document).ready(function () {
|
|
|
36
39
|
});
|
|
37
40
|
|
|
38
41
|
function setupMobileMenu() {
|
|
39
|
-
require(['api'], function (api) {
|
|
42
|
+
require(['hooks', 'api', 'navigator'], function (hooks, api, navigator) {
|
|
40
43
|
$('[component="sidebar/toggle"]').on('click', async function () {
|
|
41
44
|
const sidebarEl = $('.sidebar');
|
|
42
45
|
sidebarEl.toggleClass('open');
|
|
@@ -48,6 +51,70 @@ $(document).ready(function () {
|
|
|
48
51
|
});
|
|
49
52
|
}
|
|
50
53
|
$(window).trigger('action:sidebar.toggle');
|
|
54
|
+
if (ajaxify.data.template.topic) {
|
|
55
|
+
hooks.fire('action:navigator.update', { newIndex: navigator.getIndex() });
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const bottomBar = $('[component="bottombar"]');
|
|
60
|
+
const $body = $('body');
|
|
61
|
+
const $window = $(window);
|
|
62
|
+
$body.on('shown.bs.dropdown', '.sticky-tools', function () {
|
|
63
|
+
bottomBar.addClass('hidden');
|
|
64
|
+
});
|
|
65
|
+
$body.on('hidden.bs.dropdown', '.sticky-tools', function () {
|
|
66
|
+
bottomBar.removeClass('hidden');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
let lastScrollTop = 0;
|
|
70
|
+
let newPostsLoaded = false;
|
|
71
|
+
|
|
72
|
+
function onWindowScroll() {
|
|
73
|
+
const st = $window.scrollTop();
|
|
74
|
+
if (newPostsLoaded) {
|
|
75
|
+
newPostsLoaded = false;
|
|
76
|
+
lastScrollTop = st;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (st !== lastScrollTop && !navigator.scrollActive) {
|
|
80
|
+
const diff = Math.abs(st - lastScrollTop);
|
|
81
|
+
const scrolledDown = st > lastScrollTop;
|
|
82
|
+
const scrolledUp = st < lastScrollTop;
|
|
83
|
+
if (diff > 5) {
|
|
84
|
+
bottomBar.css({
|
|
85
|
+
bottom: !scrolledUp && scrolledDown ?
|
|
86
|
+
-bottomBar.find('.bottombar-nav').outerHeight(true) :
|
|
87
|
+
0,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
lastScrollTop = st;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const delayedScroll = utils.throttle(onWindowScroll, 250);
|
|
95
|
+
function enableAutohide() {
|
|
96
|
+
$window.off('scroll', delayedScroll);
|
|
97
|
+
if (config.theme.autohideBottombar) {
|
|
98
|
+
lastScrollTop = $window.scrollTop();
|
|
99
|
+
$window.on('scroll', delayedScroll);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
hooks.on('action:posts.loading', function () {
|
|
104
|
+
$window.off('scroll', delayedScroll);
|
|
105
|
+
});
|
|
106
|
+
hooks.on('action:posts.loaded', function () {
|
|
107
|
+
newPostsLoaded = true;
|
|
108
|
+
setTimeout(enableAutohide, 250);
|
|
109
|
+
});
|
|
110
|
+
hooks.on('action:ajaxify.end', function () {
|
|
111
|
+
$window.off('scroll', delayedScroll);
|
|
112
|
+
$body.removeClass('chat-loaded');
|
|
113
|
+
bottomBar.css({ bottom: 0 });
|
|
114
|
+
setTimeout(enableAutohide, 250);
|
|
115
|
+
});
|
|
116
|
+
hooks.on('action:chat.loaded', function () {
|
|
117
|
+
$body.toggleClass('chat-loaded', !!(ajaxify.data.template.chats && ajaxify.data.roomId));
|
|
51
118
|
});
|
|
52
119
|
});
|
|
53
120
|
}
|
|
@@ -59,33 +126,41 @@ $(document).ready(function () {
|
|
|
59
126
|
}
|
|
60
127
|
|
|
61
128
|
function setupDrafts() {
|
|
62
|
-
require(['composer/drafts'], function (drafts) {
|
|
129
|
+
require(['composer/drafts', 'bootbox'], function (drafts, bootbox) {
|
|
130
|
+
const draftsEl = $('[component="sidebar/drafts"]');
|
|
131
|
+
|
|
63
132
|
function updateBadgeCount() {
|
|
64
133
|
const count = drafts.getAvailableCount();
|
|
134
|
+
if (count > 0) {
|
|
135
|
+
draftsEl.removeClass('hidden');
|
|
136
|
+
}
|
|
65
137
|
$('[component="drafts/count"]').toggleClass('hidden', count <= 0).text(count);
|
|
66
138
|
}
|
|
67
139
|
|
|
68
140
|
async function renderDraftList() {
|
|
69
141
|
const draftListEl = $('[component="drafts/list"]');
|
|
70
|
-
draftListEl.children(':not(.no-drafts)').remove();
|
|
71
|
-
|
|
72
142
|
const draftItems = drafts.listAvailable();
|
|
73
143
|
if (!draftItems.length) {
|
|
74
144
|
draftListEl.find('.no-drafts').removeClass('hidden');
|
|
145
|
+
draftListEl.find('.placeholder-wave').addClass('hidden');
|
|
146
|
+
draftListEl.find('.draft-item-container').html('');
|
|
75
147
|
return;
|
|
76
148
|
}
|
|
77
149
|
draftItems.reverse().forEach((draft) => {
|
|
78
150
|
if (draft) {
|
|
79
|
-
draft.text =
|
|
151
|
+
draft.text = utils.escapeHTML(
|
|
152
|
+
draft.text
|
|
153
|
+
).replace(/(?:\r\n|\r|\n)/g, '<br>');
|
|
80
154
|
}
|
|
81
155
|
});
|
|
82
156
|
|
|
83
157
|
const html = await app.parseAndTranslate('partials/sidebar/drafts', 'drafts', { drafts: draftItems });
|
|
84
158
|
draftListEl.find('.no-drafts').addClass('hidden');
|
|
85
|
-
draftListEl.
|
|
159
|
+
draftListEl.find('.placeholder-wave').addClass('hidden');
|
|
160
|
+
draftListEl.find('.draft-item-container').html(html).find('.timeago').timeago();
|
|
86
161
|
}
|
|
87
162
|
|
|
88
|
-
|
|
163
|
+
|
|
89
164
|
draftsEl.on('shown.bs.dropdown', renderDraftList);
|
|
90
165
|
|
|
91
166
|
draftsEl.on('click', '[component="drafts/open"]', function () {
|
|
@@ -93,8 +168,13 @@ $(document).ready(function () {
|
|
|
93
168
|
});
|
|
94
169
|
|
|
95
170
|
draftsEl.on('click', '[component="drafts/delete"]', function () {
|
|
96
|
-
|
|
97
|
-
|
|
171
|
+
const save_id = $(this).attr('data-save-id');
|
|
172
|
+
bootbox.confirm('[[modules:composer.discard-draft-confirm]]', function (ok) {
|
|
173
|
+
if (ok) {
|
|
174
|
+
drafts.removeDraft(save_id);
|
|
175
|
+
renderDraftList();
|
|
176
|
+
}
|
|
177
|
+
});
|
|
98
178
|
return false;
|
|
99
179
|
});
|
|
100
180
|
|
|
@@ -103,6 +183,7 @@ $(document).ready(function () {
|
|
|
103
183
|
updateBadgeCount();
|
|
104
184
|
});
|
|
105
185
|
}
|
|
186
|
+
|
|
106
187
|
function setupNProgress() {
|
|
107
188
|
require(['nprogress'], function (NProgress) {
|
|
108
189
|
window.nprogress = NProgress;
|
|
@@ -117,4 +198,62 @@ $(document).ready(function () {
|
|
|
117
198
|
}
|
|
118
199
|
});
|
|
119
200
|
}
|
|
201
|
+
|
|
202
|
+
function handleMobileNavigator() {
|
|
203
|
+
const paginationBlockEl = $('.pagination-block');
|
|
204
|
+
require(['hooks'], function (hooks) {
|
|
205
|
+
hooks.on('action:ajaxify.end', function () {
|
|
206
|
+
paginationBlockEl.find('.dropdown-menu.show').removeClass('show');
|
|
207
|
+
});
|
|
208
|
+
hooks.on('filter:navigator.scroll', function (hookData) {
|
|
209
|
+
paginationBlockEl.find('.dropdown-menu.show').removeClass('show');
|
|
210
|
+
return hookData;
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
function setupNavTooltips() {
|
|
216
|
+
// remove title from user icon in sidebar to prevent double tooltip
|
|
217
|
+
$('.sidebar [component="header/avatar"] .avatar').removeAttr('title');
|
|
218
|
+
const tooltipEls = $('.sidebar [title]');
|
|
219
|
+
tooltipEls.tooltip({
|
|
220
|
+
trigger: 'manual',
|
|
221
|
+
animation: false,
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
tooltipEls.on('mouseenter', function (ev) {
|
|
225
|
+
const target = $(ev.target);
|
|
226
|
+
const isDropdown = target.hasClass('dropdown-menu') || !!target.parents('.dropdown-menu').length;
|
|
227
|
+
if (!$('.sidebar').hasClass('open') && !isDropdown) {
|
|
228
|
+
$(this).tooltip('show');
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
tooltipEls.on('click mouseleave', function () {
|
|
232
|
+
$(this).tooltip('hide');
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function fixPlaceholders() {
|
|
237
|
+
if (!config.loggedIn) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
['notifications', 'chat'].forEach((type) => {
|
|
241
|
+
const countEl = document.querySelector(`[component="${type}/count"]`);
|
|
242
|
+
if (!countEl) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
const count = parseInt(countEl.innerText, 10);
|
|
246
|
+
if (count > 1) {
|
|
247
|
+
const listEls = document.querySelectorAll(`[component="${type}/list"]`);
|
|
248
|
+
listEls.forEach((listEl) => {
|
|
249
|
+
const placeholder = listEl.querySelector('li');
|
|
250
|
+
|
|
251
|
+
for (let x = 0; x < count - 1; x++) {
|
|
252
|
+
const cloneEl = placeholder.cloneNode(true);
|
|
253
|
+
listEl.insertBefore(cloneEl, placeholder);
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
120
259
|
});
|
package/public/settings.js
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/scss/account.scss
CHANGED
package/scss/chats.scss
CHANGED
|
@@ -3,37 +3,64 @@
|
|
|
3
3
|
.page-user-chats #content {
|
|
4
4
|
max-width: 100%;
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
body.page-user-chats {
|
|
7
8
|
overflow: hidden;
|
|
9
|
+
[data-widget-area="footer"] {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
height: 100%;
|
|
13
|
+
> .layout-container {
|
|
14
|
+
height: 100%;
|
|
15
|
+
> #panel {
|
|
16
|
+
height: 100%;
|
|
17
|
+
> .container {
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[component="chat/recent"] {
|
|
25
|
+
.active {
|
|
26
|
+
background-color: $btn-ghost-hover-color;
|
|
27
|
+
}
|
|
8
28
|
}
|
|
29
|
+
|
|
9
30
|
[component="chat/nav-wrapper"] {
|
|
10
31
|
width: 300px;
|
|
11
32
|
}
|
|
33
|
+
|
|
12
34
|
.expanded-chat {
|
|
13
35
|
// no taskbar so hide minimize button
|
|
14
36
|
[data-action="minimize"] {
|
|
15
37
|
display: none!important;
|
|
16
38
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
39
|
+
|
|
40
|
+
.chat-content {
|
|
41
|
+
@include fix-lists;
|
|
42
|
+
|
|
43
|
+
.chat-message {
|
|
44
|
+
.message-body-wrapper .controls {
|
|
45
|
+
[data-action="restore"] {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
21
48
|
}
|
|
22
49
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
50
|
+
.chat-message.deleted {
|
|
51
|
+
.message-body-wrapper .controls {
|
|
52
|
+
[data-action] {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
29
55
|
|
|
30
|
-
|
|
31
|
-
|
|
56
|
+
[data-action="restore"] {
|
|
57
|
+
display: inline;
|
|
58
|
+
}
|
|
32
59
|
}
|
|
33
|
-
}
|
|
34
60
|
|
|
35
|
-
|
|
36
|
-
|
|
61
|
+
.message-body {
|
|
62
|
+
opacity: 0.3;
|
|
63
|
+
}
|
|
37
64
|
}
|
|
38
65
|
}
|
|
39
66
|
}
|
|
@@ -43,17 +70,18 @@ body.page-user-chats {
|
|
|
43
70
|
[component="chat/nav-wrapper"] {
|
|
44
71
|
width: 100%;
|
|
45
72
|
}
|
|
46
|
-
.page-user-chats {
|
|
47
|
-
.chats-full {
|
|
48
|
-
padding-bottom: 8rem!important;
|
|
49
|
-
}
|
|
50
73
|
|
|
51
|
-
[component="chat/nav-wrapper"][data-loaded="1"] {
|
|
52
|
-
display: none!important;
|
|
53
|
-
}
|
|
54
74
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
75
|
+
.page-user-chats.chat-loaded .bottombar {
|
|
76
|
+
display: none!important;
|
|
58
77
|
}
|
|
78
|
+
|
|
79
|
+
[component="chat/nav-wrapper"][data-loaded="1"] {
|
|
80
|
+
display: none!important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[component="chat/nav-wrapper"][data-loaded="0"] + [component="chat/main-wrapper"] {
|
|
84
|
+
display: none!important;
|
|
85
|
+
}
|
|
86
|
+
|
|
59
87
|
}
|
package/scss/common.scss
CHANGED
|
@@ -1,27 +1,83 @@
|
|
|
1
1
|
|
|
2
2
|
body {
|
|
3
3
|
overflow-y: scroll;
|
|
4
|
+
-webkit-font-smoothing: antialiased;
|
|
5
|
+
-moz-osx-font-smoothing: grayscale;
|
|
6
|
+
text-rendering: optimizeLegibility;
|
|
4
7
|
}
|
|
8
|
+
|
|
9
|
+
// fixes chrome font boosting :/ https://stackoverflow.com/questions/13430897/how-to-override-font-boosting-in-mobile-chrome
|
|
10
|
+
body * {
|
|
11
|
+
max-height:1000000px;
|
|
12
|
+
text-size-adjust: none;
|
|
13
|
+
-webkit-text-size-adjust: none;
|
|
14
|
+
-moz-text-size-adjust: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
5
17
|
.ff-base {
|
|
6
|
-
font-family: $font-family-base;
|
|
18
|
+
font-family: $font-family-base !important;
|
|
19
|
+
}
|
|
20
|
+
.ff-sans {
|
|
21
|
+
font-family: $font-family-sans-serif !important;
|
|
7
22
|
}
|
|
8
23
|
.ff-secondary {
|
|
9
24
|
font-family: $font-family-secondary;
|
|
10
25
|
}
|
|
11
26
|
.tracking-tight { letter-spacing: -0.025em; }
|
|
12
27
|
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
.caret {
|
|
29
|
+
&::after {
|
|
30
|
+
border: none;
|
|
31
|
+
font-family: "FontAwesome";
|
|
32
|
+
content: "\f078";
|
|
33
|
+
color: tint-color($primary, 40%);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.placeholder-wave {
|
|
38
|
+
opacity: 0.5;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.bg-card-cap {
|
|
42
|
+
--bs-bg-opacity: 1;
|
|
43
|
+
background-color: $card-cap-bg!important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
blockquote {
|
|
47
|
+
background-color: $light;
|
|
48
|
+
font-style: normal;
|
|
49
|
+
border-left: 2px solid $border-color;
|
|
50
|
+
padding: 1rem;
|
|
51
|
+
p:last-child {
|
|
52
|
+
margin-bottom: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
16
55
|
|
|
17
|
-
.
|
|
18
|
-
|
|
56
|
+
body:not(.page-user) {
|
|
57
|
+
#content {
|
|
58
|
+
transition: opacity 150ms linear;
|
|
59
|
+
&.ajaxifying {
|
|
60
|
+
-moz-opacity: 0;
|
|
61
|
+
opacity: 0;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
.page-user {
|
|
66
|
+
#content {
|
|
67
|
+
transition: opacity 150ms linear;
|
|
68
|
+
&.ajaxifying .account-content {
|
|
69
|
+
transition: opacity 150ms linear;
|
|
70
|
+
-moz-opacity: 0;
|
|
71
|
+
opacity: 0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
19
74
|
}
|
|
20
75
|
|
|
21
76
|
.sticky-tools {
|
|
22
77
|
position: sticky;
|
|
23
78
|
z-index: 3;
|
|
24
|
-
top:
|
|
79
|
+
top: 0;
|
|
80
|
+
padding: 0.25rem 0;
|
|
25
81
|
background-color: $body-bg;
|
|
26
82
|
}
|
|
27
83
|
// quartz doesn't need body-bg for tool background
|
|
@@ -35,6 +91,13 @@ body {
|
|
|
35
91
|
}
|
|
36
92
|
}
|
|
37
93
|
|
|
94
|
+
.btn-link {
|
|
95
|
+
&:hover, &.active {
|
|
96
|
+
background-color: $btn-ghost-hover-color;
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
38
101
|
@mixin btn-ghost-base {
|
|
39
102
|
display: flex;
|
|
40
103
|
align-items: center;
|
|
@@ -48,10 +111,10 @@ body {
|
|
|
48
111
|
text-align: left;
|
|
49
112
|
--bs-text-opacity: 1;
|
|
50
113
|
color: inherit !important;
|
|
51
|
-
|
|
114
|
+
font-family: $font-family-secondary;
|
|
52
115
|
cursor: pointer;
|
|
53
116
|
&:hover, &.active {
|
|
54
|
-
background-color: $hover-color;
|
|
117
|
+
background-color: $btn-ghost-hover-color;
|
|
55
118
|
text-decoration: none;
|
|
56
119
|
}
|
|
57
120
|
}
|
|
@@ -59,12 +122,18 @@ body {
|
|
|
59
122
|
.btn-ghost {
|
|
60
123
|
@include btn-ghost-base();
|
|
61
124
|
line-height: 1.5rem;
|
|
125
|
+
> i {
|
|
126
|
+
line-height: 1.5rem;
|
|
127
|
+
}
|
|
62
128
|
}
|
|
63
129
|
|
|
64
130
|
.btn-ghost-sm {
|
|
65
131
|
@include btn-ghost-base();
|
|
66
132
|
font-size: 0.875rem;
|
|
67
133
|
line-height: 1.25rem;
|
|
134
|
+
> i {
|
|
135
|
+
line-height: 1.25rem;
|
|
136
|
+
}
|
|
68
137
|
}
|
|
69
138
|
|
|
70
139
|
.btn-outline {
|
package/scss/flags.scss
ADDED
package/scss/groups.scss
CHANGED
package/scss/harmony.scss
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
@import "status";
|
|
10
10
|
@import "account";
|
|
11
11
|
@import "groups";
|
|
12
|
+
@import "flags";
|
|
12
13
|
@import "modals";
|
|
13
14
|
|
|
14
15
|
@import "modules/breadcrumbs";
|
|
@@ -20,5 +21,7 @@
|
|
|
20
21
|
@import "modules/topics-list";
|
|
21
22
|
@import "modules/cover";
|
|
22
23
|
@import "modules/nprogress";
|
|
24
|
+
@import "modules/paginator";
|
|
25
|
+
@import "modules/filters";
|
|
23
26
|
|
|
24
27
|
@import "skins";
|
package/scss/mixins.scss
CHANGED
|
@@ -124,9 +124,13 @@
|
|
|
124
124
|
display: none;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
|
|
128
|
+
[component="topic/event"], [component="topic/necro-post"] {
|
|
129
|
+
&.timeline-event {
|
|
130
|
+
.timeline-text {
|
|
131
|
+
line-height: 16px;
|
|
132
|
+
font-size: 0.75rem;
|
|
133
|
+
}
|
|
130
134
|
}
|
|
131
135
|
}
|
|
132
136
|
}
|