Skip to content

Commit

Permalink
Version: 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Endzevich committed Mar 11, 2024
0 parents commit f5163fc
Show file tree
Hide file tree
Showing 137 changed files with 27,434 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/.idea/
*.map
30 changes: 30 additions & 0 deletions 404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* The template for displaying 404 pages (not found)
*
* @link https://codex.wordpress.org/Creating_an_Error_404_Page
*
* @package Bro_Barbershop
*/

get_header();
?>

<main id="primary" class="site-main">

<section class="error-404 not-found">
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'bro-barbershop' ); ?></h1>
<?php bro_barbershop_header_image(); ?>
</header><!-- .page-header -->

<div class="page-content">
<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'bro-barbershop' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .page-content -->
</section><!-- .error-404 -->

</main><!-- #main -->

<?php
get_footer();
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Available CLI commands
Bro Barbershop comes packed with CLI commands tailored for WordPress theme development :

- `npm run build` : compiles SASS files to css and compresses them.
- `npm run watch` : watches all SASS files and recompiles them to css when they change.
68 changes: 68 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Bro_Barbershop
*/

get_header();
$blog_style = get_theme_mod('bro_barbershop_blog_layout', '');
?>

<main id="primary" class="site-main">

<header class="page-header">
<div class="page-header-info">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="archive-description">', '</div>' );
?>
</div>

<?php bro_barbershop_header_image(); ?>
</header><!-- .page-header -->

<div class="posts-wrapper">

<?php if ($blog_style == 'grid') { ?>
<div class="grid-posts">
<?php } ?>

<?php if ( have_posts() ) : ?>

<?php
/* Start the Loop */
while ( have_posts() ) :
the_post();

/*
* Include the Post-Type-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Type name) and that will be used instead.
*/
get_template_part( 'template-parts/content-loop', $blog_style . '-' . get_post_type() );

endwhile;
?>

<?php if ($blog_style == 'grid') { ?>
</div>
<?php } ?>

<?php

bro_barbershop_posts_pagination();

else :

get_template_part( 'template-parts/content', 'none' );

endif;
?>
</div>
</main><!-- #main -->

<?php
get_footer();
78 changes: 78 additions & 0 deletions comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php
/**
* The template for displaying comments
*
* This is the template that displays the area of the page that contains both the current comments
* and the comment form.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Bro_Barbershop
*/

/*
* If the current post is protected by a password and
* the visitor has not yet entered the password we will
* return early without loading the comments.
*/
if ( post_password_required() ) {
return;
}
?>

<div id="comments" class="comments-area">

<?php
// You can start editing here -- including this comment!
if ( have_comments() ) :
?>
<h2 class="comments-title">
<?php
$barbershop_comment_count = get_comments_number();
if ( '1' === $barbershop_comment_count ) {
printf(
/* translators: 1: title. */
esc_html__( 'One thought on &ldquo;%1$s&rdquo;', 'bro-barbershop' ),
'<span>' . wp_kses_post( get_the_title() ) . '</span>'
);
} else {
printf(
/* translators: 1: comment count number, 2: title. */
esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $barbershop_comment_count, 'comments title', 'bro-barbershop' ) ),
number_format_i18n( $barbershop_comment_count ), // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'<span>' . wp_kses_post( get_the_title() ) . '</span>'
);
}
?>
</h2><!-- .comments-title -->

<?php the_comments_navigation(); ?>

<ol class="comment-list">
<?php
wp_list_comments(
array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 66
)
);
?>
</ol><!-- .comment-list -->

<?php
the_comments_navigation();

// If comments are closed and there are comments, let's leave a little note, shall we?
if ( ! comments_open() ) :
?>
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'bro-barbershop' ); ?></p>
<?php
endif;

endif; // Check for have_comments().

comment_form();
?>

</div><!-- #comments -->
Loading

0 comments on commit f5163fc

Please sign in to comment.