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

How to add background image to one page? #32

Open
baragoon opened this issue Oct 14, 2024 · 3 comments
Open

How to add background image to one page? #32

baragoon opened this issue Oct 14, 2024 · 3 comments

Comments

@baragoon
Copy link
Contributor

Hi,
At first I would like to say Thank you for such nice theme!
But I'm trying to add a background image to one of static page, but without result.
Also, it will be very nice to have an option to set different background depending on the theme (dark/light).
Maybe you can point me to the right direction?
TIA.

@tomfran
Copy link
Owner

tomfran commented Oct 14, 2024

Thank you for the kind words :)
Please include what you've tried so far.

@baragoon
Copy link
Contributor Author

Okay, background for each theme can be changed with assets/css/colors/

:root {
    --content-primary: rgb(76, 79, 105);
    --content-secondary: rgb(108, 111, 133);
    --background: rgb(239, 241, 245);
    --code-background: rgb(230, 233, 239);
    --code-border: rgb(188, 192, 204);
}

.dark {
    --content-primary: rgb(198, 208, 245);
    --content-secondary: rgb(165, 173, 206);
    --background: rgb(48, 52, 70);
    --code-background: rgb(41, 44, 60);
    --code-border: rgb(81, 87, 109);
}

If I need custom background (image) I can add more themes with desired background(s) for dark and normal mode.
The main question is how to force a specific page, with layouts for example, to force a different theme?

@tomfran
Copy link
Owner

tomfran commented Oct 27, 2024

You can probably achieve something like this by introducing logic in single.html or base.html.

This is something that should be done in your fork if the theme tho, as it would be probably impossible to parametrize/really niche use case.

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

No branches or pull requests

2 participants