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

CSS easy to customize #4

Closed
appieschot opened this issue Aug 22, 2020 · 6 comments
Closed

CSS easy to customize #4

appieschot opened this issue Aug 22, 2020 · 6 comments
Assignees
Milestone

Comments

@appieschot
Copy link

appieschot commented Aug 22, 2020

First off compliments on the template! I love it! However I would love to apply my own branding (colours) so it would be awesome to support CSS overrides. I am more than happy to submit a PR that implements a CSS override option if you are open to that!

I could imagine using the head.html to add an override.css in case the parameter is specified. We could even use the asset bundling option Hugo provides to combine CSS files. Feel free to assign to me and let me know if you want me to pick it up.

janraasch added a commit that referenced this issue Aug 25, 2020
This came up quite a lot :-)

* #4
* #2
* #1
@janraasch
Copy link
Collaborator

Hi @appieschot, thank you for getting in touch & thank you for the kind words 😊.

However, I would love to apply my branding (colors), so it would be awesome to support CSS overrides.

This question comes up quite a lot, see #2 (comment) & #1 (comment). I have not documented the process on README.md, but will do so now 😇.

Here's what you can do to add your own CSS:

  • Add a custom_head.html to your layouts/partials-directory. If you started from the exampleSite on this repo, you should already have such a file.

  • In there you can add a <style>-tag to overwrite the colors or

  • you can add a <link>-tag referencing your own override.css (in case you prefer to have a separate .css-file).

I hope that helps. Let me know if this is what you had in mind.

Kind regards 👋 ,
Jan

PS:

I updated the README with the instructions mentioned above. Check out https://github.com/janraasch/hugo-scroll#adding-your-branding--colors--css.

@janraasch janraasch added documentation Improve docs A question about how to use the theme labels Aug 25, 2020
@appieschot
Copy link
Author

Thanks for the clarification! Definitely got it working, however I only wanted to add CSS so I could apply asset bundling for optimal speed.

@janraasch
Copy link
Collaborator

Thanks for the clarification!

Sure 👍.

[...] optimal speed [...]

That sounds like something one should have 😛 😇 😊.

In that case, you would (for the time being 😊) have to overwrite layouts/partials/head.html with a local copy including your asset bundling solution.

That should fix the issue for you then 😊.


If you have some time, I would also like to see how we could integrate this into the theme.

In a dream world scenario, I would love to have the .css parsed by Hugo Pipes with a variables.css which has variables for the different colors. So it is basically plug-and-play to add custom branding. I should open an idea-issue for this.

Anyway, if your up for it, feel free to open a pr (for asset bundling and/or the dream world scenario 😉). Then we can carry on the conversation with some real source code to get a better feel for this feature.

@janraasch janraasch added the enhancement New feature or request label Aug 25, 2020
@appieschot
Copy link
Author

Sure, just created a fork where I added a _customvars.scss. Basics works, so I will go through the CSS file and properly construct the theme. It does require the extended version of Hugo but so far things look good ;-). Will use the weekend to update and create a PR 😎

@stale stale bot added the wontfix This will not be worked on - potentilly falsely applied by stalebot, use invalid label instead label Oct 25, 2020
@stale stale bot closed this as completed Nov 1, 2020
@zjedi zjedi removed enhancement New feature or request wontfix This will not be worked on - potentilly falsely applied by stalebot, use invalid label instead labels Mar 11, 2023
@zjedi zjedi reopened this Mar 11, 2023
@zjedi zjedi changed the title Feature Request - CSS Overrides CSS easy to customize Mar 12, 2023
@zjedi
Copy link
Owner

zjedi commented Mar 12, 2023

#98 goes towards this goal

@zjedi zjedi added priority-high effort-L4-hard and removed Improve docs A question about how to use the theme labels Mar 20, 2023
@zjedi zjedi self-assigned this Mar 26, 2023
@zjedi zjedi added this to the v2.0 milestone Apr 2, 2023
Repository owner deleted a comment from stale bot Apr 2, 2023
@zjedi
Copy link
Owner

zjedi commented Apr 4, 2023

@appieschot We finally implemented CSS variables for overriding. It's the first version that may still evolve a bit throughout 2.0 release planned for this year

@zjedi zjedi closed this as completed Apr 4, 2023
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

3 participants