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

feat(web): Theme customizer #14298

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TimVanOnckelen
Copy link
Contributor

@TimVanOnckelen TimVanOnckelen commented Nov 22, 2024

This PR provides a feature for server administrators with the ability to customize the styles for both the light and dark themes of the web interface using color pickers. This is still a wip

image

Copy link
Contributor

github-actions bot commented Nov 22, 2024

Label error. Requires exactly 1 of: changelog:.*. Found: 🖥️web, 🗄️server

@alextran1502
Copy link
Contributor

Thanks for the PR. Are you planning to have this to be set with the existing config file?

@TimVanOnckelen
Copy link
Contributor Author

Thanks for the PR. Are you planning to have this to be set with the existing config file?

The idea is to update the existing css variables on pageload, and storing the customized values in the db.

@IsString()
primary!: string;
@IsString()
bg!: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's spell out the property name here as foreground, background

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be confusing as the css variables use bg and fg in favor of background and foreground.

@layer base {
  :root {
    /* light */
    --immich-primary: 66 80 175;
    --immich-bg: 255 255 255;
    --immich-fg: 0 0 0;
    --immich-gray: 246 246 244;
    --immich-error: 229 115 115;
    --immich-success: 129 199 132;
    --immich-warning: 255 183 77;

    /* dark */
    --immich-dark-primary: 172 203 250;
    --immich-dark-bg: 0 0 0;
    --immich-dark-fg: 229 231 235;
    --immich-dark-gray: 33 33 33;
    --immich-dark-error: 211 47 47;
    --immich-dark-success: 56 142 60;
    --immich-dark-warning: 245 124 0;
  }
}

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

Successfully merging this pull request may close these issues.

2 participants