Merge pull request #106 from maxdmyers/code-standards
Implement @mdo's code standards as per feature request You are great! Two thumb up 👍 👍 @maxdmyers
This commit is contained in:
commit
b8a5f0cc5a
10
404.php
10
404.php
|
@ -4,22 +4,24 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
<div class="wrapper" id="404-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="content-area">
|
||||
<div class="content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<section class="error-404 not-found">
|
||||
|
||||
<header class="page-header">
|
||||
|
||||
<h1 class="page-title"><?php _e( 'Oops! That page can’t be found.', 'understrap' ); ?></h1>
|
||||
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div class="page-content">
|
||||
|
|
|
@ -7,17 +7,18 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="archive-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
|
|
17
author.php
17
author.php
|
@ -6,17 +6,18 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="author-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<header class="page-header author-header">
|
||||
|
||||
|
@ -47,15 +48,15 @@ get_header(); ?>
|
|||
</header><!-- .page-header -->
|
||||
|
||||
<ul>
|
||||
<!-- The Loop -->
|
||||
|
||||
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
||||
<!-- The Loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
<li>
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
|
||||
<a rel="bookmark" href="<?php the_permalink() ?>" title="Permanent Link: <?php the_title(); ?>">
|
||||
<?php the_title(); ?></a>,
|
||||
<?php the_time('d M Y'); ?> in <?php the_category('&');?>
|
||||
</li>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php the_posts_navigation(); ?>
|
||||
|
|
14
comments.php
14
comments.php
|
@ -18,7 +18,7 @@ if ( post_password_required() ) {
|
|||
}
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area">
|
||||
<div class="comments-area" id="comments">
|
||||
|
||||
<?php // You can start editing here -- including this comment! ?>
|
||||
|
||||
|
@ -31,12 +31,11 @@ if ( post_password_required() ) {
|
|||
</h2>
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||
<nav id="comment-nav-above" class="comment-navigation" role="navigation">
|
||||
<nav class="comment-navigation" id="comment-nav-above" role="navigation">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||
<?php if ( get_previous_comments_link() ) { ?>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'understrap' ) ); ?></div>
|
||||
<?php }
|
||||
if ( get_next_comments_link() ) { ?>
|
||||
<?php } if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?></div>
|
||||
<?php } ?>
|
||||
</nav><!-- #comment-nav-above -->
|
||||
|
@ -52,12 +51,11 @@ if ( post_password_required() ) {
|
|||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
|
||||
<nav id="comment-nav-below" class="comment-navigation" role="navigation">
|
||||
<nav class="comment-navigation" id="comment-nav-below" role="navigation">
|
||||
<h1 class="screen-reader-text"><?php _e( 'Comment navigation', 'understrap' ); ?></h1>
|
||||
<?php if ( get_previous_comments_link() ) { ?>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'understrap' ) );?></div>
|
||||
<?php }
|
||||
if ( get_next_comments_link() ) { ?>
|
||||
<?php } if ( get_next_comments_link() ) { ?>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'understrap' ) ); ?></div>
|
||||
<?php } ?>
|
||||
</nav><!-- #comment-nav-below -->
|
||||
|
@ -69,7 +67,9 @@ if ( post_password_required() ) {
|
|||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
|
||||
<p class="no-comments"><?php _e( 'Comments are closed.', 'understrap' ); ?></p>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -4907,13 +4907,16 @@ a.text-gray-dark:focus, a.text-gray-dark:hover {
|
|||
#wrapper-hero {
|
||||
padding: 0px !important; }
|
||||
|
||||
.sticky, .gallery-caption, .bypostauthor {
|
||||
.sticky,
|
||||
.gallery-caption,
|
||||
.bypostauthor {
|
||||
font-size: inherit; }
|
||||
|
||||
.wrapper#wrapper-sticky {
|
||||
border-bottom: 1px solid #818a91; }
|
||||
|
||||
#wrapper-footer-full, #wrapper-static-hero {
|
||||
#wrapper-footer-full,
|
||||
#wrapper-static-hero {
|
||||
background-color: #eceeef; }
|
||||
|
||||
.wp-caption {
|
||||
|
@ -4939,13 +4942,17 @@ a.text-gray-dark:focus, a.text-gray-dark:hover {
|
|||
.entry-footer span {
|
||||
padding-right: 10px; }
|
||||
|
||||
img.wp-post-image, article img, figure, img, #secondary img {
|
||||
img.wp-post-image,
|
||||
article img,
|
||||
figure,
|
||||
img,
|
||||
#secondary img {
|
||||
max-width: 100%;
|
||||
height: auto; }
|
||||
|
||||
a.skip-link {
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
top: 0px;
|
||||
right: 0px; }
|
||||
|
||||
|
@ -4954,9 +4961,14 @@ a.skip-link {
|
|||
|
||||
.menu-item {
|
||||
float: left;
|
||||
width: auto;
|
||||
display: inline; }
|
||||
display: inline;
|
||||
width: auto; }
|
||||
|
||||
/* Navbar toggle
|
||||
* Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
* JavaScript plugin.
|
||||
* Navbar vertical align
|
||||
*/
|
||||
.navbar-toggle {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -4964,7 +4976,10 @@ a.skip-link {
|
|||
padding: 9px 10px;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border: 1px solid transparent; }
|
||||
border: 1px solid transparent;
|
||||
/*
|
||||
* We remove the `outline` here, but later compensate by attaching `:hover` styles to `:focus`.
|
||||
*/ }
|
||||
.navbar-toggle:focus {
|
||||
outline: 0; }
|
||||
.navbar-toggle .icon-bar {
|
||||
|
@ -4975,9 +4990,10 @@ a.skip-link {
|
|||
.navbar-toggle .icon-bar + .icon-bar {
|
||||
margin-top: 4px; }
|
||||
|
||||
.navbar .collapsing, .navbar .collapse.in {
|
||||
width: 100%;
|
||||
float: left; }
|
||||
.navbar .collapsing,
|
||||
.navbar .collapse.in {
|
||||
float: left;
|
||||
width: 100%; }
|
||||
|
||||
.navbar-dark .navbar-toggle {
|
||||
border: 1px solid #fff; }
|
||||
|
@ -5005,19 +5021,19 @@ a.skip-link {
|
|||
margin-left: 0rem; }
|
||||
|
||||
.nav-link {
|
||||
margin-left: .425rem;
|
||||
margin-right: .425rem; }
|
||||
margin-right: .425rem;
|
||||
margin-left: .425rem; }
|
||||
|
||||
.dropdown-menu .dropdown-menu {
|
||||
position: relative;
|
||||
display: block;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
width: 140px;
|
||||
margin-left: 10px;
|
||||
width: 140px; }
|
||||
border: none;
|
||||
box-shadow: none; }
|
||||
.dropdown-menu .dropdown-menu li {
|
||||
list-style: square;
|
||||
padding-left: 0px; }
|
||||
padding-left: 0px;
|
||||
list-style: square; }
|
||||
|
||||
.dropdown-menu .menu-item {
|
||||
width: 100%; }
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,7 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
|
||||
$the_theme = wp_get_theme();
|
||||
?>
|
||||
|
||||
|
@ -19,12 +20,12 @@
|
|||
|
||||
<div class="col-md-12">
|
||||
|
||||
<footer id="colophon" class="site-footer" role="contentinfo">
|
||||
<footer class="site-footer" id="colophon" role="contentinfo">
|
||||
|
||||
<div class="site-info">
|
||||
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'understrap' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'understrap' ), 'WordPress' ); ?></a>
|
||||
<span class="sep"> | </span>
|
||||
<?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a href="http://understrap.com/" rel="designer">understrap.com</a>' ); ?>
|
||||
<?php printf( __( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a rel="designer" href="http://understrap.com/">understrap.com</a>' ); ?>
|
||||
(<?php printf( __( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' ) ); ?>)
|
||||
</div><!-- .site-info -->
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ require get_template_directory() . '/inc/bootstrap-wp-navwalker.php';
|
|||
*/
|
||||
require get_template_directory() . '/inc/bootstrap-wp-gallery.php';
|
||||
|
||||
|
||||
/**
|
||||
* Load WooCommerce functions.
|
||||
*/
|
||||
|
|
20
header.php
20
header.php
|
@ -6,7 +6,8 @@
|
|||
*
|
||||
* @package understrap
|
||||
*/
|
||||
?><!DOCTYPE html>
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
|
@ -22,7 +23,7 @@
|
|||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<div id="page" class="hfeed site">
|
||||
<div class="hfeed site" id="page">
|
||||
|
||||
<!-- ******************* The Navbar Area ******************* -->
|
||||
<div class="wrapper-fluid wrapper-navbar" id="wrapper-navbar">
|
||||
|
@ -31,21 +32,16 @@
|
|||
|
||||
<nav class="navbar navbar-dark bg-inverse site-navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="navbar-header">
|
||||
|
||||
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
|
||||
|
||||
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target=".exCollapsingNavbar" aria-controls="exCollapsingNavbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
☰
|
||||
</button>
|
||||
<button class="navbar-toggler hidden-sm-up" data-toggle="collapse" data-target=".exCollapsingNavbar" type="button" aria-controls="exCollapsingNavbar" aria-expanded="false" aria-label="Toggle navigation">☰</button>
|
||||
|
||||
<!-- Your site title as branding in the menu -->
|
||||
<?php if (!has_custom_logo()) { ?>
|
||||
<a class="navbar-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
|
||||
<a class="navbar-brand" rel="home" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
|
||||
<?php bloginfo( 'name' ); ?>
|
||||
</a>
|
||||
<?php } else { the_custom_logo(); } ?><!-- end custom logo -->
|
||||
|
@ -69,9 +65,3 @@
|
|||
</nav><!-- .site-navigation -->
|
||||
|
||||
</div><!-- .wrapper-navbar end -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ function bootstrap_wp_gallery( $output, $attr ) {
|
|||
// Filter gallery CSS
|
||||
$output = apply_filters( 'gallery_style', "
|
||||
|
||||
<div id='$selector' class='gallery galleryid-{$id} row'>"
|
||||
<div class='gallery galleryid-{$id} row' id='$selector'>"
|
||||
);
|
||||
|
||||
// Iterate through the attachments in this gallery instance
|
||||
|
|
|
@ -27,7 +27,7 @@ class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
|||
*/
|
||||
public function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||
$indent = str_repeat( "\t", $depth );
|
||||
$output .= "\n$indent<ul role=\"menu\" class=\" dropdown-menu\">\n";
|
||||
$output .= "\n$indent<ul class=\" dropdown-menu\" role=\"menu\">\n";
|
||||
}
|
||||
/**
|
||||
* @see Walker::start_el()
|
||||
|
@ -50,13 +50,13 @@ class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
|||
* a 0 if the strings are equal.
|
||||
*/
|
||||
if ( strcasecmp( $item->attr_title, 'divider' ) == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
$output .= $indent . '<li class="divider" role="presentation">';
|
||||
} else if ( strcasecmp( $item->title, 'divider') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="divider">';
|
||||
$output .= $indent . '<li class="divider" role="presentation">';
|
||||
} else if ( strcasecmp( $item->attr_title, 'dropdown-header') == 0 && $depth === 1 ) {
|
||||
$output .= $indent . '<li role="presentation" class="dropdown-header">' . esc_attr( $item->title );
|
||||
$output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_attr( $item->title );
|
||||
} else if ( strcasecmp($item->attr_title, 'disabled' ) == 0 ) {
|
||||
$output .= $indent . '<li role="presentation" class="disabled"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
$output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_attr( $item->title ) . '</a>';
|
||||
} else {
|
||||
$class_names = $value = '';
|
||||
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||
|
@ -163,17 +163,17 @@ class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
|||
$fb_output = null;
|
||||
if ( $container ) {
|
||||
$fb_output = '<' . $container;
|
||||
if ( $container_id )
|
||||
$fb_output .= ' id="' . $container_id . '"';
|
||||
if ( $container_class )
|
||||
$fb_output .= ' class="' . $container_class . '"';
|
||||
if ( $container_id )
|
||||
$fb_output .= ' id="' . $container_id . '"';
|
||||
$fb_output .= '>';
|
||||
}
|
||||
$fb_output .= '<ul';
|
||||
if ( $menu_id )
|
||||
$fb_output .= ' id="' . $menu_id . '"';
|
||||
if ( $menu_class )
|
||||
$fb_output .= ' class="' . $menu_class . '"';
|
||||
if ( $menu_id )
|
||||
$fb_output .= ' id="' . $menu_id . '"';
|
||||
$fb_output .= '>';
|
||||
$fb_output .= '<li><a href="' . admin_url( 'nav-menus.php' ) . '">Add a menu</a></li>';
|
||||
$fb_output .= '</ul>';
|
||||
|
@ -183,4 +183,3 @@ class wp_bootstrap_navwalker extends Walker_Nav_Menu {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
$html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0;
|
||||
$fields = array(
|
||||
'author' => '<div class="form-group comment-form-author">' . '<label for="author">' . __( 'Name', 'understrap' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
|
||||
'<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></div>',
|
||||
'<input class="form-control" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . '></div>',
|
||||
'email' => '<div class="form-group comment-form-email"><label for="email">' . __( 'Email', 'understrap' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' .
|
||||
'<input class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></div>',
|
||||
'<input class="form-control" id="email" name="email" ' . ( $html5 ? 'type="email"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . '></div>',
|
||||
'url' => '<div class="form-group comment-form-url"><label for="url">' . __( 'Website', 'understrap' ) . '</label> ' .
|
||||
'<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></div>',
|
||||
'<input class="form-control" id="url" name="url" ' . ( $html5 ? 'type="url"' : 'type="text"' ) . ' value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30"></div>',
|
||||
);
|
||||
return $fields;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
|||
function bootstrap3_comment_form( $args ) {
|
||||
$args['comment_field'] = '<div class="form-group comment-form-comment">
|
||||
<label for="comment">' . _x( 'Comment', 'noun', 'understrap' ) . ( ' <span class="required">*</span>' ) . '</label>
|
||||
<textarea class="form-control" id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea>
|
||||
<textarea class="form-control" id="comment" name="comment" aria-required="true" cols="45" rows="8"></textarea>
|
||||
</div>';
|
||||
$args['class_submit'] = 'btn btn-secondary'; // since WP 4.1
|
||||
return $args;
|
||||
|
|
11
index.php
11
index.php
|
@ -11,15 +11,12 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
|
||||
<?php
|
||||
if ( is_front_page() && is_home() ) {
|
||||
|
||||
get_sidebar('hero');
|
||||
|
||||
get_sidebar('statichero');
|
||||
|
||||
} else {
|
||||
// Do nothing...or?
|
||||
}
|
||||
|
@ -27,13 +24,13 @@ get_header(); ?>
|
|||
|
||||
<div class="wrapper" id="wrapper-index">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@
|
|||
?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@
|
|||
?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
?>
|
||||
|
||||
<article id="post-0" class="post no-results not-found">
|
||||
<article class="post no-results not-found" id="post-0">
|
||||
|
||||
<header class="page-header">
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<?php global $post ?>
|
||||
|
||||
<article id="<?php echo strtolower( $post->post_title ); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="<?php echo strtolower( $post->post_title ); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
|
||||
|
||||
<header class="entry-header">
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* @package understrap
|
||||
*/
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
|
|
|
@ -7,15 +7,16 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="full-width-page-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div id="primary" class="col-md-12 content-area">
|
||||
<div class="col-md-12 content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<?php
|
||||
/*
|
||||
|
@ -23,16 +24,15 @@ $args = array(
|
|||
);
|
||||
|
||||
$qry = new WP_Query( $args );
|
||||
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="full-width-page-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div id="primary" class="col-md-12 content-area">
|
||||
<div class="col-md-12 content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ): while ( $qry->have_posts() ): $qry->the_post() ?>
|
||||
<div class="page">
|
||||
|
|
9
page.php
9
page.php
|
@ -10,17 +10,18 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="page-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
|
|
|
@ -1,40 +1,27 @@
|
|||
// Some basic padding for all wrappers
|
||||
.wrapper {
|
||||
padding:$grid-gutter-width-base 0;
|
||||
}
|
||||
.wrapper { padding: $grid-gutter-width-base 0; }
|
||||
|
||||
// Reset hero wrapper padding to 0
|
||||
#wrapper-hero {
|
||||
padding:0px!important;
|
||||
}
|
||||
#wrapper-hero { padding: 0px !important; }
|
||||
|
||||
// Adding basic Wordpress classes to pass the Wordpress.org tests
|
||||
.sticky, .gallery-caption, .bypostauthor {
|
||||
font-size:inherit;
|
||||
}
|
||||
.sticky,
|
||||
.gallery-caption,
|
||||
.bypostauthor { font-size: inherit; }
|
||||
|
||||
// Separate sticky wrapper from main content
|
||||
.wrapper#wrapper-sticky {
|
||||
border-bottom:1px solid $gray-light;
|
||||
}
|
||||
.wrapper#wrapper-sticky { border-bottom: 1px solid $gray-light; }
|
||||
|
||||
// Adding some contrast background color to footer full widget
|
||||
#wrapper-footer-full, #wrapper-static-hero{
|
||||
background-color: $gray-lighter;
|
||||
}
|
||||
#wrapper-footer-full,
|
||||
#wrapper-static-hero { background-color: $gray-lighter; }
|
||||
|
||||
// Necessary WP classes
|
||||
.wp-caption {
|
||||
font-size: inherit;
|
||||
}
|
||||
.wp-caption { font-size: inherit; }
|
||||
|
||||
.wp-caption-text {
|
||||
font-size: inherit;
|
||||
}
|
||||
.wp-caption-text { font-size: inherit; }
|
||||
|
||||
.screen-reader-text {
|
||||
font-size: inherit;
|
||||
}
|
||||
.screen-reader-text { font-size: inherit; }
|
||||
|
||||
.alignright {
|
||||
float: right;
|
||||
|
@ -46,48 +33,44 @@ font-size:inherit;
|
|||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.aligncenter {
|
||||
margin:0px auto;
|
||||
}
|
||||
.aligncenter { margin: 0px auto; }
|
||||
|
||||
// Post design
|
||||
.entry-footer span {
|
||||
padding-right:10px;
|
||||
}
|
||||
.entry-footer span { padding-right: 10px; }
|
||||
|
||||
// Limit featured image size to 100%
|
||||
img.wp-post-image, article img, figure, img, #secondary img {
|
||||
img.wp-post-image,
|
||||
article img,
|
||||
figure,
|
||||
img,
|
||||
#secondary img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// Skip to content link
|
||||
a.skip-link {
|
||||
z-index: 1000;
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
top: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
|
||||
// Reset Jumbotron default margin
|
||||
.jumbotron {
|
||||
margin-bottom:0px;
|
||||
}
|
||||
.jumbotron { margin-bottom: 0px; }
|
||||
|
||||
// Bootstrap3 to Bootstrap4 "translation"
|
||||
.menu-item {float:left; width:auto; display:inline;}
|
||||
//ul.nav.navbar-nav a {
|
||||
// display: block;
|
||||
// padding-top: .425rem;
|
||||
// padding-bottom: .425rem;
|
||||
//}
|
||||
|
||||
// Navbar toggle
|
||||
//
|
||||
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
// JavaScript plugin.
|
||||
// Navbar vertical align
|
||||
.menu-item {
|
||||
float: left;
|
||||
display: inline;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* Navbar toggle
|
||||
* Custom button for toggling the `.navbar-collapse`, powered by the collapse
|
||||
* JavaScript plugin.
|
||||
* Navbar vertical align
|
||||
*/
|
||||
.navbar-toggle {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -97,12 +80,10 @@ right: 0px;
|
|||
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
|
||||
border: 1px solid transparent;
|
||||
|
||||
|
||||
// We remove the `outline` here, but later compensate by attaching `:hover`
|
||||
// styles to `:focus`.
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
/*
|
||||
* We remove the `outline` here, but later compensate by attaching `:hover` styles to `:focus`.
|
||||
*/
|
||||
&:focus { outline: 0; }
|
||||
|
||||
// Bars
|
||||
.icon-bar {
|
||||
|
@ -111,76 +92,59 @@ right: 0px;
|
|||
height: 2px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.icon-bar + .icon-bar {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.icon-bar + .icon-bar { margin-top: 4px; }
|
||||
}
|
||||
|
||||
.navbar {
|
||||
.collapsing, .collapse.in {
|
||||
width:100%;
|
||||
.collapsing,
|
||||
.collapse.in {
|
||||
float: left;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-dark {
|
||||
.navbar-toggle {
|
||||
border:1px solid #fff;
|
||||
}
|
||||
.icon-bar {
|
||||
border-bottom:1px solid #fff;
|
||||
}
|
||||
.dropdown-menu {
|
||||
background-color: $gray-dark;
|
||||
}
|
||||
.navbar-toggle { border: 1px solid #fff; }
|
||||
.icon-bar { border-bottom: 1px solid #fff; }
|
||||
.dropdown-menu { background-color: $gray-dark; }
|
||||
}
|
||||
|
||||
.navbar #main-menu {
|
||||
float:left;
|
||||
}
|
||||
.navbar #main-menu { float:left; }
|
||||
|
||||
.navbar-nav {
|
||||
.nav-item {
|
||||
float: left;
|
||||
}
|
||||
.nav-item { float: left; }
|
||||
|
||||
.nav-link {
|
||||
display: block;
|
||||
padding-top: .425rem;
|
||||
padding-bottom: .425rem;
|
||||
|
||||
+ .nav-link {
|
||||
margin-left: 0rem;
|
||||
}
|
||||
+ .nav-link { margin-left: 0rem; }
|
||||
}
|
||||
|
||||
.nav-item + .nav-item {
|
||||
margin-left: 0rem;
|
||||
}
|
||||
.nav-item + .nav-item { margin-left: 0rem; }
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
margin-left:.425rem;
|
||||
margin-right: .425rem;
|
||||
margin-left: .425rem;
|
||||
}
|
||||
|
||||
// Fixing BS dropdown in a dropdown
|
||||
.dropdown-menu .dropdown-menu {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 140px;
|
||||
margin-left: 10px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
margin-left:10px;
|
||||
width:140px;
|
||||
li {
|
||||
list-style: square;
|
||||
padding-left: 0px;
|
||||
list-style: square;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu .menu-item {
|
||||
width: 100%;
|
||||
a:hover {
|
||||
background-color:$brand-primary;
|
||||
}
|
||||
a:hover { background-color: $brand-primary; }
|
||||
}
|
||||
|
|
|
@ -5,16 +5,17 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
<div class="wrapper search-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<section id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<section class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
* @package understrap
|
||||
*/
|
||||
?>
|
||||
|
||||
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
|
||||
<label for="s" class="assistive-text"><?php _e( 'Search', 'understrap' ); ?></label>
|
||||
<label class="assistive-text" for="s"><?php _e( 'Search', 'understrap' ); ?></label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="field form-control" name="s" id="s" placeholder="<?php esc_attr_e( 'Search …', 'understrap' ); ?>" />
|
||||
<input class="field form-control" id="s" name="s" type="text" placeholder="<?php esc_attr_e( 'Search …', 'understrap' ); ?>">
|
||||
<span class="input-group-btn">
|
||||
<input type="submit" class="submit btn btn-primary" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'understrap' ); ?>" />
|
||||
<input class="submit btn btn-primary" id="searchsubmit" name="submit" type="submit" value="<?php esc_attr_e( 'Search', 'understrap' ); ?>">
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -10,7 +10,7 @@ if ( ! is_active_sidebar( 'sidebar-1' ) ) {
|
|||
}
|
||||
?>
|
||||
|
||||
<div id="secondary" class="col-md-4 widget-area" role="complementary">
|
||||
<div class="col-md-4 widget-area" id="secondary" role="complementary">
|
||||
|
||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||
|
||||
|
|
|
@ -5,16 +5,17 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
<div class="wrapper" id="single-wrapper">
|
||||
|
||||
<div id="content" class="container">
|
||||
<div class="container" id="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
|
|
|
@ -10,15 +10,16 @@
|
|||
* @package understrap
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
get_header();
|
||||
?>
|
||||
|
||||
<div class="wrapper" id="woocommerce-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div id="primary" class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area">
|
||||
<div class="<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>col-md-8<?php else : ?>col-md-12<?php endif; ?> content-area" id="primary">
|
||||
|
||||
<main id="main" class="site-main" role="main">
|
||||
<main class="site-main" id="main" role="main">
|
||||
|
||||
<!-- The WooCommerce loop -->
|
||||
|
||||
|
|
Reference in New Issue