Add search button to mobile header menu

This commit is contained in:
Alexander Agnarson 2020-12-05 12:31:16 +01:00
parent 7beeddf43b
commit beb3ff551d
2 changed files with 15 additions and 14 deletions

View file

@ -85,8 +85,6 @@
<?php if ( has_nav_menu('header') ): ?> <?php if ( has_nav_menu('header') ): ?>
<div id="wrap-nav-header" class="wrap-nav"> <div id="wrap-nav-header" class="wrap-nav">
<?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'header','menu_id' => 'nav-header','fallback_cb'=> false)); ?> <?php \AlxMedia\Nav::nav_menu(array('theme_location'=>'header','menu_id' => 'nav-header','fallback_cb'=> false)); ?>
</div>
<?php endif; ?>
<?php if ( get_theme_mod( 'header-search', 'on' ) == 'on' ): ?> <?php if ( get_theme_mod( 'header-search', 'on' ) == 'on' ): ?>
<button class="toggle-search"> <button class="toggle-search">
@ -100,6 +98,9 @@
</div> </div>
<?php endif; ?> <?php endif; ?>
</div>
<?php endif; ?>
</div><!--/.pad--> </div><!--/.pad-->
</div><!--/.container--> </div><!--/.container-->

View file

@ -160,8 +160,8 @@
#header .pad { padding: 0; } #header .pad { padding: 0; }
.site-title { width: 100%; float: none; } .site-title { width: 100%; float: none; }
.site-title a { text-align: center; } .site-title a { text-align: center; }
.header-menu .toggle-search { display: none; } .header-menu .toggle-search { left: 15px; top: 2px; right: auto; }
.search-expand { width: 100%; margin-right: -30px; top: -1px; } .search-expand { width: auto; top: 2px; left: 80px; right: 70px; }
#header-middle .social-links { float: none; position: static; padding: 0 0 20px; margin: 0; text-align: center; width: 100%; } #header-middle .social-links { float: none; position: static; padding: 0 0 20px; margin: 0; text-align: center; width: 100%; }
#header-middle .social-links li { margin: 0 4px; } #header-middle .social-links li { margin: 0 4px; }
#header-middle .social-links .social-tooltip { font-size: 18px; } #header-middle .social-links .social-tooltip { font-size: 18px; }