Problem/Motivation
I have copied the custom-style.css file to the themes folder, set the path to the ../../custom-style.css and I am overriding the header image rotator, but for some reason it still uses the ephemeral images instead of my own.
Steps to reproduce
Copy custom-style.css to the main themes folder, set the path to the custom-style.css file (../../custom-style.css) and override in custom-style.css:
/***********************/
/* CHANGE HEADER IMAGE */
/***********************/
/* Deactivate the image rotator in theme's settings, put your new image in
the _custom folder and uncomment the lines below */
.himg #headimg {background: #fff url({{ base_path ~ directory }}/_custom/headerimg/header_{{ random(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p']) }}.jpg) no-repeat 100% 100%;}
I sure am doing something wrong here or am not understanding something.
Also, can I use composer to auto update the theme now, or will my header images in /_custom/headerimg be deleted if I use composer? Should I put those in off the main themes folder as well?
Comments
Comment #2
mverhagen commentedPS. I did clear caches, but it's still using the ephemeral images.
If I change the path in templates/layout/html.html.twig, then it all works perfectly fine after clearing the cache.
Comment #3
florian commentedYes, you did something wrong :) The instructions in the example.custom-style.css are referring to a single image only.
The easiest way to achieve what you want is to change all the images in the zeropoint/_custom/headerimg and keep the image names as they are now. See https://www.mlnar.ro/ that runs the same images but in grey.
You should keep a copy of your _custom/headerimg images to change them back after using composer. Sorry about that!
Maybe I will add an option to change this on the theme settings.
Comment #4
mverhagen commentedThat would be a great improvement! I don't think there are many folks using your theme that keep the same images, and being able to use composer without losing images and/or other custom css settings/overrides would make updating so much easier. Right now, I always have to manually merge the new update and can't use composer...
Thanks for your support!