When rebuilding a website with Grav and the standard Quark theme, I was faced with the task of creating a window-width separator element that contained an image and could be inserted between modular pages. I was not successful with the modular template “Hero”, it always slid upwards. However, this changed when I created a copy of the template (and the corresponding blueprint file). I called it heroidna.html.twig (and the blueprint file heroidna.yaml). And lo and behold, now the window-width images stayed where they were intended. In addition, all the setting options as with the “Hero” are available in the admin area. Is my solution a case of shooting at a sparrow with a cannon? I am happy with it.
@idna, No, that’s not shooting with a canon… It’s one of two ways to fix your issue.
Have a look at template /user/themes/quark/templates/modular.html.twig lines 48-60. All modules with template modular/hero
are drawn at the top of all other module templates.
Because you’ve created a new module template with a different name, it will be drawn together with the non-hero modules.
If you don’t need to preserve the existing modular
template for any other page with a hero fixed at the top, you could also edit file /user/themes/quark/templates/modular.html.twig and remove lines 48-53 and remove if module.template != 'modular/hero'
from line 56.
Thank you for your explanation. Since I also need a hero image, I’ll stick with my solution. Maybe it is also useful for other Grav users.