-
Notifications
You must be signed in to change notification settings - Fork 42
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
Change color and logo #79
Comments
This is the most basic consideration for a theme. It may not do much else, but a theme is by its definition something that should be adaptable. It would be appropriate to make it simple to upload a logo and change the search text. |
Same here... At this point I'm considering at attempt at creating a theme from scratch. Adapting existing themes seems nearly as tedious as WordPress :( |
This is not platform specific stuff guys. You are asking about basic web development skills. HTML, CSS, image editing etc. Grav is not trying to replace the web developer, it's just making the job of building sites easier. This also goes for themes, it makes building the frontend stuff easier, it enables and empowers web developers to get stuff done quicker, but you still have to have the basic understanding. I strongly suggest that if you don't know where to start, take a free course to give you the basics of HTML and CSS:
This knowledge will save you time in the long run. Combine this HTML/CSS skill with some basics about Grav (https://learn.getgrav.org) and you would quickly be able to find the relevant file in Learn2 https://github.com/getgrav/grav-theme-learn2/blob/develop/templates/partials/base.html.twig#L48 Then you can replace this with some text, like: The color can be set via CSS in a custom css file which you can create here: Then you can set the color using this CSS:
Where that color is a hex value for an orange/red. NOTE: Updated to reference Learn2 rather than Quark as I originally linked. |
Now hang on a second... that's quite pedantic. No one is saying they don't understand HTML. But just consider how many things the Learn2 theme does for you, but it doesn't variable-ise the logo and the colour. Fortunately, someone else felt it was annoying and difficult, and did the Learn2-git-sync (Hibbitts). It at least changes the logo to the title, and adds a few colour options. The reason that's important isn't because it's HTML-impossible. The reason is that each time you update the theme, you'd have to re-construct the changes you've hardcoded, or eschew the theme update. Each time Grav rolls another version, each theme has to consider updating. You know this. That's why it's incredibly surprising that you are throwing out Code Academy. I came on here to ask that the Grav team Learn2 version of the theme should offer those basic options specifically because it's better when you can make those changes and not then have to choose in 3-6 months whether to repeat those steps with a new version of the theme (assuming they're also the same), or to decline the new theme update and stay out of date and more subject to the foibles of old code. If you want to treat your free themes as second-class, that's your choice. But at least don't treat those of us who were digging into Grav and trying to figure out where this sits, as if we're incompetent. Truly a shame, given how much you know. |
Thank you for editing your original comment. |
Hello everyone, This is a follow-on to Andy's instructions, with the appropriate corrections. To change the "logo" GRAV image in the Learn2 theme, you need to do the following steps:
a#logo h1 {
color: #ff0000;
}
#header {
background: #000000;
} !! Please note that the prior instructions weren't using a css Class ID. Use the
|
I don't work with Grav every day and by the time I need to come back it to i've forgotten how this all works again and have to figure it out all over again. Why can't the theme incorporate some setting somewhere with settings for this stuff? Surely this would take care of questions like this? |
That is precisely what I was thinking originally. |
Hi, I'm just getting to know Grav too and it seems to be pretty great! Anyway, here's what I did to change the logo of this theme to an image file:
I hope this helps someone. |
Just adding my voice to the comments above, that it would be very helpful to users if there was a simple file upload feature for the logo and text box to change the text version. Maybe pushing the boat out to ask for a colour field to change the primary/secondary brand colours as well. It's a pretty common feature in most templates I have come across and makes the entry point for users much easier. It's pretty much the very first thing you do with an off the shelf theme. I know how to make the changes in the code now as well, so thanks for the guidance above which is also very helpful! |
I just started yesterday to play around with this theme in Grav and I am running in a logo sizing issue related to the original question.
This all works fine, but I am running into a sizing issue.
But as the ratio of my logo is different, I would like to use a logo configuration width of 12rem and height of 6em. |
I updated grav and my customised logo, which I edited in Maybe if there was a LOGO SETTINGthis would not be a problem. |
Thanks. It works |
Just wasted 30 minutes of my life to figure how to change that logo. Thanks for the help above. |
Has anyone found how to change the content background color? Using |
Nevermind, |
If anyone is interested, here you can find a theme based on learn2 which lets you change the logo, favicon... If you install learn2 and this one as well, you just need to create in your page a file named I would be willing to make some code proposals to include such functionalities in learn2 itself, so it's accessible by everyone by default. I didn't do it yet because seeing that most PRs are not merged I don't want to take time to do something that might not be used. But if some maintainer of this repo confirms that they may be interested in the improvements (at least to consider having a look at them, I'm not saying you'd have to include them if you don't like the way it's done), I'd be more than willing to propose those codes adjustments. Cheers, and thanks still for creating this theme. |
Hello, I'm new to Grav, and feeling a bit lost.
What would be the simple way to customize the theme main color and the logo image?
Thanks a lot.
The text was updated successfully, but these errors were encountered: