Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme.Park CSS Theming #1303

Open
deathbybandaid opened this issue Jan 6, 2022 · 9 comments
Open

Theme.Park CSS Theming #1303

deathbybandaid opened this issue Jan 6, 2022 · 9 comments

Comments

@deathbybandaid
Copy link

deathbybandaid commented Jan 6, 2022

If you're not aware of Theme.Park, It allows theming apps by utilizing a theme file + a "base" theme file.

I spent my morning making my selfoss instance look like plex utilizing the Plex theme.park theme

Below, you'll find the "base" theme I've created for selfoss. In theory, this "base" theme could be used with all of the Theme Options from theme.park. What I've done could possibly be improved and made into a PR for the theme.park repo. Doing so could also potentially make more selfhosters aware of Selfoss.

I run my instance of Selfoss via nginx, so applying the theme is as easy as Applying via the Subfilter method (also works with Apache and others):

            sub_filter
            '</head>'
            '<link rel="stylesheet" type="text/css" href="https://MYDOMAIN/path/selfoss-base.css">
            <link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/GilbN/theme.park/master/css/theme-options/plex.css">
            </head>';
            sub_filter_once on;

How it looks as plex:

image


/* base */

body {
    background: var(--main-bg-color);
    background-repeat: repeat, no-repeat;
    background-attachment: fixed, fixed;
    background-position: center center, center center;
    background-size: auto, cover;
    -webkit-background-size: auto, cover;
    -moz-background-size: auto, cover;
    -o-background-size: auto, cover;
    color: var(--text);
}

select,
input {
    border: solid 1px var(--link-color);
}


/* navigation */

#nav {
    background: var(--drop-down-menu-bg);
    border-right: 5px solid var(--accent-color);
}


#nav hr {
    border-bottom: 1px solid var(--accent-color);
}

#nav-mark {
    color: var(--button-text);
    background: var(--button-color);
}


#nav-mark[disabled],
#nav-mark[disabled]:hover {
    background: var(--button-color-hover);
    color: var(--button-text-hover);
}


#nav-mark:hover {
    background: var(--button-color-hover);
    color: var(--button-text-hover);
}

#nav-filter li a {
    color: var(--text);
}


#nav-filter li a.active {
    background: var(--modal-bg-color);
    color: var(--button-color-hover);
}


#nav-filter span {
    color: var(--text-muted);
}


.unread-count.unread {
    background-color: var(--accent-color-hover);
    color: var(--button-text) !important;
}

.unread-count.unread span {
    color: var(--button-text) !important;
}

.unread-count.unread.offline {
    background-color: var(--text);
}

span.offline-count {
    color: var(--accent-color-hover) !important;
}

.unread-count span.offline-count {
    color: var(--text) !important;
}

span.offline-count::after {
    color: var(--text) !important;
}

.unread-count span.offline-count::after {
    color: var(--text) !important;
}


.nav-section-toggle {
    color: var(--text-muted);
}

.nav-unavailable.offline {
    color: var(--text);
}

#nav-tags li a {
    color: var(--text-muted);
}


#nav-tags li a.active {
    background: var(--modal-bg-color);
    color: var(--link-color);
}

#nav-sources li a {
    color: var(--text-muted);
}

#nav-sources li a.active {
    background: var(--modal-bg-color);
    color: var(--text-hover);
}

#nav .unread {
    color: var(--link-color);
}


.nav-toolbar button,
.nav-toolbar a {
    background: var(--button-color);
    color: var(--button-text);
}

.nav-toolbar button.offline {
    border: solid var(--link-color) 1px;
}

.nav-ts-wrapper::-webkit-scrollbar-thumb {
    background: var(--button-color);
}

.nav-ts-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--button-color-hover);
}

.nav-ts-wrapper::-webkit-scrollbar-thumb:active {
    background: var(--accent-color-hover);
}

/* search */

#search {
    color: var(--button-text);
    background-color: var(--button-color);
}


#search-list li {
    color: var(--label-text-color);
    background-color: var(--button-color);
    border-right: 6px solid var(--button-color);
}

#search-list .regex-search-term {
    background-color: var(--button-color);
    border-right-color: var(--button-color);
}

/* content */

.entry,
.source {
    background: var(--modal-header-color);
}


.entry.selected {
    border: solid 1px var(--link-color);
}

.entry .found {
    color: var(--label-text-color);
    background: var(--modal-bg-color);
}

.entry-title {
    color: var(--text-muted);
}

.entry-title a {
    color: var(--text-muted);
}

.entry.unread .entry-title {
    color: var(--button-text);
}

.entry-content a {
    color: var(--text);
}

.entry-content blockquote {
    border-left: 2px solid var(--text);
}

.entry.selected.unread, .entry.unread {
    border-left: 3px solid var(--link-color);
}


.entry-author,
.entry-readtime,
.entry-source,
.entry-separator,
.entry-datetime {
    color: var(--text-muted);
}


.entry-toolbar {
    border-top: 1px solid var(--link-color);
    background: var(--modal-footer-color);
}

.stream-more,
.mark-these-read,
.stream-error {
    color: var(--text-muted);
}

.source-title {
    display: inline;
    color: var(--text-muted);
}


.source-edit-delete,
.source-days,
.source-action {
    color: var(--button-text);
}

.source-showparams,
.source-delete,
.source-save,
.source-cancel {
    color: var(--button-color);
}

.source-edit-form {
    color: var(--text-muted);
}

.source-edit-form .source-edit-form-help {
    color: var(--button-color);
}

.source-showparams.saved {
    color: var(--link-color);
}

.source-add {
    color: var(--button-color);
}

.refresh-source {
    color: var(--button-color);
}

.source-export,
.source-opml {
    color: var(--accent-color-hover);
}

/* opml import */
#opml .success {
    background-color: var(--button-color);
}

#opml input {
    margin-top: 30px;
    background: var(--button-color);
}

@jtojnar
Copy link
Member

jtojnar commented Jan 6, 2022

Interesting.

I want to use CSS variables in the stylesheet, which would make implementing a dark theme and custom themes like this simpler.

Also note that you can create user.css file in your selfoss directory and it will be loaded.

@deathbybandaid
Copy link
Author

I used the user.css with v2.18, but it didn't seem to work for me earlier today when I tried with 2.19, but maybe it was just a fluke.

@jtojnar
Copy link
Member

jtojnar commented Jan 6, 2022

I use if for the dark theme, maybe check the nginx config.

@deathbybandaid
Copy link
Author

Okay, so I'm going to kinda spam this thread, but I'm really impressed with the theme.park stuff

@deathbybandaid
Copy link
Author

deathbybandaid commented Jan 7, 2022

Here's what Selfoss looks like with the Officially supported Themes from Theme.Park

Aquamarine

image

image

image

Dark

image

image

image

Dracula

image

image

image

Hotline

image

image

image

Hotpink

image

image

image

Nord

image

image

image

Organizr

image

image

image

Overseerr

image

image

image

Plex

image

image

image

Space Gray

image

image

image

@deathbybandaid
Copy link
Author

I tested a few of the community-themes and they seem to work alright

@deathbybandaid
Copy link
Author

I'd also assume the contents of user.css (in the future) could be as simple as

@import url("https://raw.githubusercontent.com/GilbN/theme.park/master/css/themes/selfoss/selfoss-base.css");
@import url("https://raw.githubusercontent.com/GilbN/theme.park/master/css/theme-options/plex.css");

@deathbybandaid
Copy link
Author

Updated above base css with the webkit scrollbar stuff as per #1305 (comment)

@deathbybandaid
Copy link
Author

Scrollbar

image

Scrollbar Hover

image

Scrollbar Active

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants