mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Allow the first post to be hidden
This commit is contained in:
parent
d78bd82b65
commit
d5970ee4a0
|
@ -81,6 +81,14 @@ app.initializers.replace('boot', () => {
|
|||
mapRoutes(app.routes, basePath)
|
||||
);
|
||||
|
||||
if (m.route.param('hideFirstPost')) {
|
||||
extend(PostStream.prototype, 'view', vdom => {
|
||||
if (vdom.children[0].attrs['data-number'] === 1) {
|
||||
vdom.children.splice(0, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize FastClick, which makes links and buttons much more responsive on
|
||||
// touch devices.
|
||||
$(() => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user