aboutsummaryrefslogtreecommitdiff
path: root/srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-01-07 13:06:14 +0100
committerCharles <sircharlesaze@gmail.com>2020-01-07 13:06:14 +0100
commit7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8 (patch)
treef7453d7dd5cbaaab246e23810b02d3edf1e451be /srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header
parentc59bdcf77c50cbe89b4a93782cdd6d9e7532080e (diff)
downloadft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.gz
ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.tar.bz2
ft_server-7086111ad4dd997e12a3220e1ee60c9b9bcf0bb8.zip
Added wordpress
Diffstat (limited to 'srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header')
-rw-r--r--srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/entry-header.php46
-rw-r--r--srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/site-branding.php60
2 files changed, 106 insertions, 0 deletions
diff --git a/srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/entry-header.php b/srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/entry-header.php
new file mode 100644
index 0000000..16f84ea
--- /dev/null
+++ b/srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/entry-header.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Displays the post header
+ *
+ * @package WordPress
+ * @subpackage Twenty_Nineteen
+ * @since 1.0.0
+ */
+
+$discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null; ?>
+
+<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
+
+<?php if ( ! is_page() ) : ?>
+<div class="entry-meta">
+ <?php twentynineteen_posted_by(); ?>
+ <?php twentynineteen_posted_on(); ?>
+ <span class="comment-count">
+ <?php
+ if ( ! empty( $discussion ) ) {
+ twentynineteen_discussion_avatars_list( $discussion->authors );
+ }
+ ?>
+ <?php twentynineteen_comment_count(); ?>
+ </span>
+ <?php
+ // Edit post link.
+ edit_post_link(
+ sprintf(
+ wp_kses(
+ /* translators: %s: Post title. Only visible to screen readers. */
+ __( 'Edit <span class="screen-reader-text">%s</span>', 'twentynineteen' ),
+ array(
+ 'span' => array(
+ 'class' => array(),
+ ),
+ )
+ ),
+ get_the_title()
+ ),
+ '<span class="edit-link">' . twentynineteen_get_icon_svg( 'edit', 16 ),
+ '</span>'
+ );
+ ?>
+</div><!-- .entry-meta -->
+<?php endif; ?>
diff --git a/srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/site-branding.php b/srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/site-branding.php
new file mode 100644
index 0000000..03bc53b
--- /dev/null
+++ b/srcs/wordpress/wp-content/themes/twentynineteen/template-parts/header/site-branding.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Displays header site branding
+ *
+ * @package WordPress
+ * @subpackage Twenty_Nineteen
+ * @since 1.0.0
+ */
+?>
+<div class="site-branding">
+
+ <?php if ( has_custom_logo() ) : ?>
+ <div class="site-logo"><?php the_custom_logo(); ?></div>
+ <?php endif; ?>
+ <?php $blog_info = get_bloginfo( 'name' ); ?>
+ <?php if ( ! empty( $blog_info ) ) : ?>
+ <?php if ( is_front_page() && is_home() ) : ?>
+ <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 endif; ?>
+
+ <?php
+ $description = get_bloginfo( 'description', 'display' );
+ if ( $description || is_customize_preview() ) :
+ ?>
+ <p class="site-description">
+ <?php echo $description; ?>
+ </p>
+ <?php endif; ?>
+ <?php if ( has_nav_menu( 'menu-1' ) ) : ?>
+ <nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Top Menu', 'twentynineteen' ); ?>">
+ <?php
+ wp_nav_menu(
+ array(
+ 'theme_location' => 'menu-1',
+ 'menu_class' => 'main-menu',
+ 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
+ )
+ );
+ ?>
+ </nav><!-- #site-navigation -->
+ <?php endif; ?>
+ <?php if ( has_nav_menu( 'social' ) ) : ?>
+ <nav class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'twentynineteen' ); ?>">
+ <?php
+ wp_nav_menu(
+ array(
+ 'theme_location' => 'social',
+ 'menu_class' => 'social-links-menu',
+ 'link_before' => '<span class="screen-reader-text">',
+ 'link_after' => '</span>' . twentynineteen_get_icon_svg( 'link' ),
+ 'depth' => 1,
+ )
+ );
+ ?>
+ </nav><!-- .social-navigation -->
+ <?php endif; ?>
+</div><!-- .site-branding -->