Files
yuzu-child/header.php
2020-04-21 13:42:20 +02:00

123 lines
3.7 KiB
PHP

<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Yuzu
*/
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="https://gmpg.org/xfn/11">
<?php wp_head(); ?>
<script type="text/javascript">
var $ =jQuery.noConflict();
$(document).ready(function(){
$( "button#togle" ).click(function() {
$( ".comments-section" ).toggle();
var $sp = $(this).text().trim().split(" ");
if($sp[0] == '<?php _e("Display", "yuzu-child" ); ?>' ){
var e = $("#togle").text(function(index, text) {
return text.replace("<?php _e('Display', 'yuzu-child' ); ?>", "<?php _e('Hide', 'yuzu-child' ); ?>");
});
}
if($sp[0] == '<?php _e("Hide", "yuzu-child" ); ?>' ){
var e = $("#togle").text(function(index, text) {
return text.replace("<?php _e('Hide', 'yuzu-child' ); ?>", "<?php _e('Display', 'yuzu-child' ); ?>");
});
}
//$el.text($el.text() == "<?php _e('Display comments', 'CreatorThemeRes-child' ); ?>" ? "<?php _e('Hide comments', 'CreatorThemeRes-child' ); ?>" : "<?php _e('Display comments', 'CreatorThemeRes-child' ); ?>");
});
});
</script>
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'yuzu' ); ?></a>
<div class="top-search-bar-container">
<div class="super-large-container">
<form role="search" method="get" class="searchform group"
action="<?php echo home_url('/'); ?>">
<input name="s" type="text" placeholder="<?php _e('What are you looking for ... ?', 'yuzu'); ?>">
<div class="submit-top-bar-search">
<label>
<input type="submit" style="display: none;" class="hidden-submit"/>
<?php get_template_part('assets/icons/inline', 'search.svg'); ?>
</label>
</div>
</form>
</div>
</div>
<header id="masthead" class="site-header">
<div class="top-bar-content super-large-container">
<div class="site-branding">
<?php
if ( has_custom_logo() ) {
?>
<div class="site-logo">
<a href="<?= get_home_url(); ?>">
<?= get_custom_logo(); ?>
</a>
</div>
<?php
} else {
?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php } ?>
</div>
<nav class="site-navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'menu_id' => 'primary-menu',
) );
?>
<?php if(get_theme_mod('enable_search_in_top_bar', true)) { ?>
<div class="open-top-bar-search">
<?php get_template_part('assets/icons/inline', 'search.svg'); ?>
</div>
<div class="close-top-bar-search" style="display: none">
<?php get_template_part('assets/icons/inline', 'close.svg'); ?>
</div>
<?php } ?>
</nav>
</div>
</header><!-- #masthead -->
<div class="mobile-navigation">
<nav class="site-navigation">
<?php
wp_nav_menu( array(
'theme_location' => 'menu-1',
'menu_id' => 'mobile-primary-menu',
) );
?>
</nav>
<div class="mobile-navigation-toggle">
<div class="open-icon"><?php get_template_part('assets/icons/inline', 'hamburger.svg'); ?></div>
<div class="close-icon"><?php get_template_part('assets/icons/inline', 'close.svg'); ?></div>
</div>
</div>
<div id="content" class="site-content">