diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-07 13:06:14 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-07 13:06:14 +0100 |
| commit | 7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 (patch) | |
| tree | f7453d7dd5cbaaab246e23810b02d3edf1e451be /srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header | |
| parent | c59bdcf77c50cbe89b4a93782cdd6d9e7532080e (diff) | |
| download | ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.gz ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.bz2 ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.zip | |
Added wordpress
Diffstat (limited to 'srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header')
2 files changed, 58 insertions, 0 deletions
diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php new file mode 100644 index 0000000..390debc --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/header-image.php @@ -0,0 +1,20 @@ +<?php +/** + * Displays header media + * + * @package WordPress + * @subpackage Twenty_Seventeen + * @since 1.0 + * @version 1.0 + */ + +?> +<div class="custom-header"> + + <div class="custom-header-media"> + <?php the_custom_header_markup(); ?> + </div> + + <?php get_template_part( 'template-parts/header/site', 'branding' ); ?> + +</div><!-- .custom-header --> diff --git a/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php new file mode 100644 index 0000000..02017d5 --- /dev/null +++ b/srcs/wordpress/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php @@ -0,0 +1,38 @@ +<?php +/** + * Displays header site branding + * + * @package WordPress + * @subpackage Twenty_Seventeen + * @since 1.0 + * @version 1.0 + */ + +?> +<div class="site-branding"> + <div class="wrap"> + + <?php the_custom_logo(); ?> + + <div class="site-branding-text"> + <?php if ( is_front_page() ) : ?> + <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> + <?php else : ?> + <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p> + <?php endif; ?> + + <?php + $description = get_bloginfo( 'description', 'display' ); + + if ( $description || is_customize_preview() ) : + ?> + <p class="site-description"><?php echo $description; ?></p> + <?php endif; ?> + </div><!-- .site-branding-text --> + + <?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && ! has_nav_menu( 'top' ) ) : ?> + <a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a> + <?php endif; ?> + + </div><!-- .wrap --> +</div><!-- .site-branding --> |
