Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Main Menu is a block by default in Drupal 8 and thus the theme isn't styling it as it does the Drupal 7 version of this theme.
The styling of edit tabs above nodes could also be improved.
Comment | File | Size | Author |
---|---|---|---|
#2 | writer-fix-style-main-menu-2509284-2-8.x-2.x.patch | 4.36 KB | DavidPetit |
#1 | writer-fix-style-main-menu-2509284-8.x-2.x.patch | 4.73 KB | DavidPetit |
Comments
Comment #1
DavidPetit CreditAttribution: DavidPetit commentedHi! I worked to bring back a styled main menu as well as keep the responsive style working:
=> I replaced all the old nav selectors based on id or class with a more general selector: "header nav" so that it works as long as there is nav menu tag in the header in CSS and JS.
=> I updated the js file so that we remove the "visibility_hidden" class on the h2 for small resolutions
=> I updated the libraries to add a dependencie on modernizr as well as updating the writer.theme to add a "no-js" class in the html attributes so that we automatically get the "js" class when js is enabled. We could do it without modernizr but I believe because modernizr is in Drupal8 core, it is a good idea to use it.
Comment #2
DavidPetit CreditAttribution: DavidPetit commentedI just created a new patch to also fix the active links in the menu (the css class changed in Drupal 8 and the .head-wrap element is useless now si I removed it from the selectors).
You can ignore the first patch, this one replaces it.
Comment #4
bryanbraun CreditAttribution: bryanbraun commentedThanks! The second patch was great. I agree, bringing in Modernizer is a good idea.
I followed up your patch with a second commit. It adds in block regions for the main menu and footer menu (since there are no primary/secondary assigned menus in D8). Placing any menus in those regions will position them right where the assigned menus in D7 would have gone.
Both commits were pushed to 8.x-2.x and released in 8.x-2.2-beta4. Closing this issue.