Drupal is awesome for complex websites but doesn't get much traction for simple, quick'n'dirty microsites and blogs.
One import reason, maybe even the most important reason, is that even for basic theming, a number of overrides or creation of a subtheme is necessary which is just out of scope for simple out-of-the-box sites.
Whenever I'm setting up a blog on WordPress, I just start with a fullsize JPG header background rather than just a logo.
On Drupal, I'm uploading the header image as a logo, it obviously doesn't get displayed in the background but with lots of spacing all around.
If I'm overriding the background in the theme, the position is fine but the header doesn't adapt to the background's height. Then I'm giving the header a fixed, manual height, but now the primary menu doesn't adapt. So in the end I need a whole couple of additional CSS overrides.
But then, I'm still not flexible in adhoc replacing the background image, and most technically untrained (and uninterested) admins of such microsites or blogs won't be able to replace it at all.
What I'd be expecting is a possibility just to upload a header image and be ready, just as it is possible with logo and favicon. So I think we really need something like the Noggin module in core to be more. IMHO, this is a killer feature bringing us much closer to being an alternative for Wordpress for such kind of sites.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | image_header_2267011-12.patch | 9.92 KB | kaushashah |
| #6 | image_headers.2267011-3.patch | 12.64 KB | Weilinggu |
| #2 | image_headers.2267011-2.patch | 10.78 KB | pancho |
| #2 | interdiff.txt | 3.37 KB | pancho |
| #1 | image_headers.2267011-1.patch | 10.53 KB | pancho |
Comments
Comment #1
panchoHere's a patch with the basic functionality, no frills.
Doesn't automatically adapt to the image header's height, but that would probably be what we want as default behaviour.
We also might want to save the CSS rule to the filesystem so it can get aggregated.
You'll have to refresh the cached theme info before the new settings appear on Bartik's settings.
Comment #2
panchoSecond step: Automatically adapt header to image height. Primary navigation buttons don't yet get pushed down.
Comment #5
joelpittetThis is a good idea, and something that we could add to bartik so I'm moving it there. It won't help much on an admin theme so we can just put it in bartik theme component.
Looks like head has moved so this needs a re-roll but maybe a good opportunity to move that to bartik.
Moving the priority to normal and let the maintainer of that section to adjust the priority accordingly.
Comment #6
Weilinggu commentedThe patch is rerolled. However, _drupal_add_css() function is removed in drupal 8 and Dynamic inline JS/CSS is no longer available. See this issue Dynamic inline JS/CSS with #attached is longer possible. Before this issue is resolved, the url and height of the image will be put in a js file added via libraries.yml(as mentioned in the patch).
Need rework after related issue is resolved.
Thanks to the help of piyuesh.
Comment #7
Weilinggu commentedComment #8
Bojhan commentedComment #10
Weilinggu commentedThere is no test for image_header. Test need to be written for image_header.
Comment #11
kaushashah commentedComment #12
kaushashah commentedPatch Rerolled.
Comment #14
emma.mariaComment #29
pameeela commentedMoving this to Olivero since the intent was to have this feature in Drupal core, and Bartik is now in contrib. Not saying it should be added to Olivero but I think that is the only logical place to put the request?
Comment #32
quietone commentedThe Olivero theme was approved for removal in #3590816: [policy, no patch] Deprecate Olivero and move to contrib.
This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
The deprecation work is in #3595082: [meta] Tasks to deprecate the Olivero theme and the removal work in #3595085: [meta] Tasks to remove the Olivero theme.