fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

Collapse menu items based on config file #1217

Closed breadcat closed 4 years ago

breadcat commented 4 years ago

I rarely use the 'Filter' category in the sidebar (Newest, Unread, Starred) so would prefer it to be collapsed by default. With this collapsed, it gives more space for Tags, which makes sense on smaller vertical height screens.

I understand this is probably a niche option, so it would make sense to be a config file option instead of a default.

jtojnar commented 4 years ago

You can make it collapse after start by creating a user.js file in your selfoss directory and placing the following code inside:

if (!['hashpasswordbody', 'opmlbody'].includes(document.body.getAttribute('id'))) {
    document.getElementById('nav-filter-title').click()
}

If you never want to use the option, you can put the following into user.css in your selfoss directory:

#nav-filter-wrapper, #nav-filter-wrapper + .separator {
    display: none;
}

#nav-tags-title {
    margin-top: 20px;
}

These work for the latest build of selfoss, if you use 2.18, I can try to adapt the code.

breadcat commented 4 years ago

Thanks for your help, I am using 2.18 via Docker at the moment, but I know enough CSS to adapt the user.css snippet provided.

Thanks!