JustCarmen / webtrees-theme-justlight

JustLight theme for webtrees
http://justcarmen.nl
GNU General Public License v3.0
31 stars 7 forks source link

disable search in top menu #139

Closed LarsRabe closed 1 year ago

LarsRabe commented 1 year ago

To disable the search header I added the following code to the ccs and js module:

<style> .wt-header-search { display: none; } </style>

This works with the standard webtrees theme but not with your justLight or justBlack theme (see sreenshots). Is this a bug or intentional? Can this be changed? zoeken_1 zoeken_2

JustCarmen commented 1 year ago

This is the result the navbar-collapse class on the same element which is necessary for small screens.

Use display: none !important to achieve what you want.

LarsRabe commented 1 year ago

I changed it to <style> .wt-header-search { display: none !important; } </style> as you suggested.

Sadly that doesn't work either. Any other suggestion?

JustCarmen commented 1 year ago

I've made some changes to the code. Now it should work with your original custom css (<style> .wt-header-search { display: none; } </style>)

LarsRabe commented 1 year ago

I just found time to test. Sadly these changes don't work either.

But I achieved what I wanted by .wt-header-search-form { display: none; } This works on all themes including yours.

So somewhere in your code the .wt-header-search still seems to behave different from the original themes (I've tested all the standard themes).

JustCarmen commented 1 year ago

So somewhere in your code the .wt-header-search still seems to behave different from the original themes

Yes, that's because the Justlight theme is optimized for mobile use and the default themes are not. I use a special mobile menu with the bootstrap navbar-collapse class. This conflicts with your custom changes because they both require the css display function on the same element.

But '' works in my local test system, so I will leave the changes as they are.

LarsRabe commented 1 year ago

But '' works in my local test system, so I will leave the changes as they are.

I've tried it again. I made sure not to have any typo, deleted your theme and reinstalled with all of your development patches. Even disabled all other custom modules. Tried another computer and tablet. But, no luck at all. So it seems my server behaves different from your local test system. I can only get it to work by the -formclass.

Could it be possible it's PHP version related? I'm PHP 8.2.1 EDIT: with 8.0 and 8.1 no difference or with PHP boost disabled also no difference.

Anyway, thanks for your efforts! I'll stick to my work around then.

LarsRabe commented 1 year ago

As we Dutch say: "nou breekt mijn klomp" ;-)

After re-installing webtrees from the scratch, it does work now as intended! Sorry for the fuzz.

JustCarmen commented 1 year ago

Haha, kan gebeuren. Blij dat het is oplost :)