Merge pull request #1 from holger1411/master

Bringing fork up to date.
This commit is contained in:
Jason King 2017-06-27 15:00:14 +09:30 committed by GitHub
commit 2a68f6d847
33 changed files with 130 additions and 90 deletions

2
.gitignore vendored
View File

@ -11,3 +11,5 @@ dist
dist-product dist-product
npm-debug.log npm-debug.log
/vendor/

13
404.php
View File

@ -6,16 +6,21 @@
*/ */
get_header(); get_header();
$container = get_theme_mod( 'understrap_container_type' );
$sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
?> ?>
<div class="wrapper" id="404-wrapper"> <div class="wrapper" id="404-wrapper">
<div class="container" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">
<div class="content-area" id="primary"> <div class="col-md-12 content-area" id="primary">
<main class="site-main" id="main" role="main"> <main class="site-main" id="main">
<section class="error-404 not-found"> <section class="error-404 not-found">
@ -74,7 +79,7 @@ get_header();
</div><!-- #primary --> </div><!-- #primary -->
</div> <!-- .row --> </div><!-- .row -->
</div><!-- Container end --> </div><!-- Container end -->

View File

@ -1,4 +1,19 @@
- ** Release 0.6.1 May 18th 2017 **
- Replacing some older BS3 markup - Thx @typeplus and @Kostas Vrouvas
- Add basic error handling for `gulp-plumber` - thx @L422Y
- Correcting woo commerce customer login markup
- Replacing cssnano with minify-css
- Fix deprecated product accessor for WooCommerce 3.0 - Thx @willgorham
- Declare woocommerce support - Thx @typeplus
- Adding norwegian translation files - Thx @joakimhellum
- Adding info for GitHub updater plugin
- Fixing imagemin task
- Specify correct post templates for jetpack infinite scroll - Thx @typeplus
- Streamline 404.php and aligning with other page templates
- Adding gulp-sequence
- ** Release 0.6.0 (skipping 0.5.8 and 0.5.9 ) Apr. 21th 2017 ** - ** Release 0.6.0 (skipping 0.5.8 and 0.5.9 ) Apr. 21th 2017 **
- Adding WooCommerce 3.0.0 support - Big thx @typeplus - Adding WooCommerce 3.0.0 support - Big thx @typeplus
- Add npm-debug.log to .gitignore file - thx @OussamaElgoumri - Add npm-debug.log to .gitignore file - thx @OussamaElgoumri

View File

@ -17,7 +17,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="archive-wrapper"> <div class="wrapper" id="archive-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -15,7 +15,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="author-wrapper"> <div class="wrapper" id="author-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">
@ -41,7 +41,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<?php if ( ! empty( $curauth->user_url ) ) : ?> <?php if ( ! empty( $curauth->user_url ) ) : ?>
<dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt> <dt><?php esc_html_e( 'Website', 'understrap' ); ?></dt>
<dd> <dd>
<a href="<?php echo esc_html( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a> <a href="<?php echo esc_url( $curauth->user_url ); ?>"><?php echo esc_html( $curauth->user_url ); ?></a>
</dd> </dd>
<?php endif; ?> <?php endif; ?>

View File

@ -1,6 +1,6 @@
{ {
"name": "understrap", "name": "understrap",
"version": "0.6.0", "version": "0.6.2",
"homepage": "http://understrap.com", "homepage": "http://understrap.com",
"authors": [ "authors": [
"Holger Koenemann <office@holgerkoenemann.de>" "Holger Koenemann <office@holgerkoenemann.de>"
@ -26,6 +26,6 @@
"dependencies": { "dependencies": {
}, },
"_source": "https://github.com/holger1411/understrap.git", "_source": "https://github.com/holger1411/understrap.git",
"_target": "~0.6.0", "_target": "~0.6.2",
"_originalSource": "understrap" "_originalSource": "understrap"
} }

10
composer.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "holger1411/understrap",
"description": "Combines Automattic´s Underscores Starter Theme and Bootstrap 4",
"type": "library",
"license": "GPL-2.0",
"minimum-stability": "stable",
"require": {},
"keywords": ["wordpress","theme","bootstrap"],
"homepage": "https://github.com/holger1411/understrap"
}

View File

@ -6780,13 +6780,15 @@ a.text-gray-dark:focus, a.text-gray-dark:hover {
.screen-reader-text { .screen-reader-text {
font-size: inherit; } font-size: inherit; }
.alignright {
float: right;
padding-left: 10px; }
.alignleft { .alignleft {
display: inline;
float: left; float: left;
padding-right: 10px; } margin-right: 1.5em; }
.alignright {
display: inline;
float: right;
margin-left: 1.5em; }
.aligncenter { .aligncenter {
margin: 0px auto; } margin: 0px auto; }

5
css/theme.min.css vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="wrapper-footer"> <div class="wrapper" id="wrapper-footer">
<div class="<?php echo esc_html( $container ); ?>"> <div class="<?php echo esc_attr( $container ); ?>">
<div class="row"> <div class="row">

View File

@ -42,6 +42,7 @@ var sourcemaps = require('gulp-sourcemaps');
var browserSync = require('browser-sync').create(); var browserSync = require('browser-sync').create();
var del = require('del'); var del = require('del');
var cleanCSS = require('gulp-clean-css'); var cleanCSS = require('gulp-clean-css');
var gulpSequence = require('gulp-sequence');
// Run: // Run:
@ -98,7 +99,7 @@ gulp.task('watch-scss', ['browser-sync'], function () {
// Run: // Run:
// gulp sass // gulp sass
// Compiles SCSS files in CSS // Compiles SCSS files in CSS
gulp.task('sass', ['minify-css'], function () { gulp.task('sass', function () {
var stream = gulp.src('./sass/*.scss') var stream = gulp.src('./sass/*.scss')
.pipe(plumber({ .pipe(plumber({
errorHandler: function (err) { errorHandler: function (err) {
@ -117,8 +118,7 @@ gulp.task('sass', ['minify-css'], function () {
// gulp watch // gulp watch
// Starts watcher. Watcher runs gulp sass task on changes // Starts watcher. Watcher runs gulp sass task on changes
gulp.task('watch', function () { gulp.task('watch', function () {
gulp.watch('./sass/**/*.scss', ['sass']); gulp.watch('./sass/**/*.scss', ['styles']);
gulp.watch('./css/theme.css', ['minify-css']);
gulp.watch([basePaths.dev + 'js/**/*.js','js/**/*.js','!js/theme.js','!js/theme.min.js'], ['scripts']); gulp.watch([basePaths.dev + 'js/**/*.js','js/**/*.js','!js/theme.js','!js/theme.min.js'], ['scripts']);
//Inside the watch task. //Inside the watch task.
@ -155,7 +155,8 @@ gulp.task('cssnano', function(){
gulp.task('minify-css', function() { gulp.task('minify-css', function() {
return gulp.src('./css/theme.css') return gulp.src('./css/theme.css')
.pipe(cleanCSS({compatibility: 'ie8'})) .pipe(sourcemaps.init({loadMaps: true}))
.pipe(cleanCSS({compatibility: '*'}))
.pipe(plumber({ .pipe(plumber({
errorHandler: function (err) { errorHandler: function (err) {
console.log(err); console.log(err);
@ -163,6 +164,7 @@ gulp.task('minify-css', function() {
} }
})) }))
.pipe(rename({suffix: '.min'})) .pipe(rename({suffix: '.min'}))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('./css/')); .pipe(gulp.dest('./css/'));
}); });
@ -172,6 +174,8 @@ gulp.task('cleancss', function() {
.pipe(rimraf()); .pipe(rimraf());
}); });
gulp.task('styles', function(callback){ gulpSequence('sass', 'minify-css')(callback) });
// Run: // Run:
// gulp browser-sync // gulp browser-sync
@ -184,7 +188,7 @@ gulp.task('browser-sync', function() {
// Run: // Run:
// gulp watch-bs // gulp watch-bs
// Starts watcher with browser-sync. Browser-sync reloads page automatically on your browser // Starts watcher with browser-sync. Browser-sync reloads page automatically on your browser
gulp.task('watch-bs', ['browser-sync', 'watch', 'minify-css', 'scripts'], function () { }); gulp.task('watch-bs', ['browser-sync', 'watch', 'scripts'], function () { });
// Run: // Run:

View File

@ -64,9 +64,9 @@ class WP_Bootstrap_Navwalker extends Walker_Nav_Menu {
} else if ( strcasecmp( $item->title, 'divider' ) == 0 && $depth === 1 ) { } else if ( strcasecmp( $item->title, 'divider' ) == 0 && $depth === 1 ) {
$output .= $indent . '<li class="divider" role="presentation">'; $output .= $indent . '<li class="divider" role="presentation">';
} else if ( strcasecmp( $item->attr_title, 'dropdown-header' ) == 0 && $depth === 1 ) { } else if ( strcasecmp( $item->attr_title, 'dropdown-header' ) == 0 && $depth === 1 ) {
$output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_attr( $item->title ); $output .= $indent . '<li class="dropdown-header" role="presentation">' . esc_html( $item->title );
} else if ( strcasecmp( $item->attr_title, 'disabled' ) == 0 ) { } else if ( strcasecmp( $item->attr_title, 'disabled' ) == 0 ) {
$output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_attr( $item->title ) . '</a>'; $output .= $indent . '<li class="disabled" role="presentation"><a href="#">' . esc_html( $item->title ) . '</a>';
} else { } else {
$class_names = $value = ''; $class_names = $value = '';
$classes = empty( $item->classes ) ? array() : (array) $item->classes; $classes = empty( $item->classes ) ? array() : (array) $item->classes;

View File

@ -53,7 +53,7 @@ function understrap_pagination() {
/** Previous Post Link */ /** Previous Post Link */
if ( get_previous_posts_link() ) { if ( get_previous_posts_link() ) {
printf( '<li class="page-item"><span class="page-link">%1$s</span></li> ' . "\n", printf( '<li class="page-item page-item-direction page-item-prev"><span class="page-link">%1$s</span></li> ' . "\n",
get_previous_posts_link( '<span aria-hidden="true">&laquo;</span><span class="sr-only">Previous page</span>' ) ); get_previous_posts_link( '<span aria-hidden="true">&laquo;</span><span class="sr-only">Previous page</span>' ) );
} }
@ -72,7 +72,7 @@ function understrap_pagination() {
// Next Post Link. // Next Post Link.
if ( get_next_posts_link() ) { if ( get_next_posts_link() ) {
printf( '<li class="page-item"><span class="page-link">%s</span></li>' . "\n", printf( '<li class="page-item page-item-direction page-item-next"><span class="page-link">%s</span></li>' . "\n",
get_next_posts_link( '<span aria-hidden="true">&raquo;</span><span class="sr-only">Next page</span>' ) ); get_next_posts_link( '<span aria-hidden="true">&raquo;</span><span class="sr-only">Next page</span>' ) );
} }

View File

@ -9,7 +9,8 @@
* Count number of widgets in a sidebar * Count number of widgets in a sidebar
* Used to add classes to widget areas so widgets can be displayed one, two, three or four per row * Used to add classes to widget areas so widgets can be displayed one, two, three or four per row
*/ */
function slbd_count_widgets( $sidebar_id ) { if ( ! function_exists( 'slbd_count_widgets' ) ) {
function slbd_count_widgets( $sidebar_id ) {
// If loading from front page, consult $_wp_sidebars_widgets rather than options // If loading from front page, consult $_wp_sidebars_widgets rather than options
// to see if wp_convert_widget_settings() has made manipulations in memory. // to see if wp_convert_widget_settings() has made manipulations in memory.
global $_wp_sidebars_widgets; global $_wp_sidebars_widgets;
@ -40,9 +41,9 @@ function slbd_count_widgets( $sidebar_id ) {
endif; endif;
return $widget_classes; return $widget_classes;
endif; endif;
}
} }
if ( ! function_exists( 'understrap_widgets_init' ) ) { if ( ! function_exists( 'understrap_widgets_init' ) ) {
/** /**
* Initializes themes widgets. * Initializes themes widgets.

View File

@ -23,7 +23,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="wrapper-index"> <div class="wrapper" id="wrapper-index">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

6
js/theme.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "understrap", "name": "understrap",
"version": "0.6.0", "version": "0.6.2",
"description": "Wordpress Theme framework", "description": "Wordpress Theme framework",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
@ -28,10 +28,11 @@
"homepage": "https://understrap.com", "homepage": "https://understrap.com",
"dependencies": { "dependencies": {
"bootstrap": "^4.0.0-alpha.6", "bootstrap": "^4.0.0-alpha.6",
"browser-sync": "^2.18.8", "browser-sync": "^2.18.11",
"del": "^2.2.2", "del": "^2.2.2",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"gulp-clean-css": "^3.3.1",
"gulp-clone": "^1.0.0", "gulp-clone": "^1.0.0",
"gulp-concat": "^2.6.1", "gulp-concat": "^2.6.1",
"gulp-cssnano": "^2.1.2", "gulp-cssnano": "^2.1.2",
@ -42,14 +43,12 @@
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-rimraf": "^0.2.1", "gulp-rimraf": "^0.2.1",
"gulp-sass": "^3.1.0", "gulp-sass": "^3.1.0",
"gulp-sourcemaps": "2.4.1", "gulp-sourcemaps": "2.6.0",
"gulp-uglify": "^2.1.2", "gulp-uglify": "^2.1.2",
"gulp-watch": "^4.3.11", "gulp-watch": "^4.3.11",
"merge2": "^1.0.3", "merge2": "^1.0.3",
"run-sequence": "^1.2.2", "run-sequence": "^1.2.2",
"gulp-clean-css": "^3.0.4", "gulp-sequence": "^0.4.6",
"undescores-for-npm": "^1.0.0" "undescores-for-npm": "^1.0.0"
},
"devDependencies": {
} }
} }

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="full-width-page-wrapper"> <div class="wrapper" id="full-width-page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -13,7 +13,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content"> <div class="<?php echo esc_attr( $container ); ?>" id="content">
<div class="row"> <div class="row">

View File

@ -19,7 +19,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="page-wrapper"> <div class="wrapper" id="page-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -6,7 +6,6 @@
@import "assets/font-awesome"; // <------- Font Awesome Icon font @import "assets/font-awesome"; // <------- Font Awesome Icon font
@import "assets/underscores"; // <------- Underscores media styles @import "assets/underscores"; // <------- Underscores media styles
// Any additional imported files // // Any additional imported files //
@import "theme/theme"; // <--------- Thats where you can add your own design. Thats your part! @import "theme/theme"; // <--------- Thats where you can add your own design. Thats your part!
@import "theme/contact-form7"; // contact form 7 - Bootatrap 4 support @import "theme/contact-form7"; // contact form 7 - Bootatrap 4 support

View File

@ -26,14 +26,16 @@
.screen-reader-text { font-size: inherit; } .screen-reader-text { font-size: inherit; }
.alignright { .alignleft {
float: right; display: inline;
padding-left: 10px; float: left;
margin-right: 1.5em;
} }
.alignleft { .alignright {
float: left; display: inline;
padding-right: 10px; float: right;
margin-left: 1.5em;
} }
.aligncenter { margin: 0px auto; } .aligncenter { margin: 0px auto; }

View File

@ -13,7 +13,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="search-wrapper"> <div class="wrapper" id="search-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="wrapper-footer-full"> <div class="wrapper" id="wrapper-footer-full">
<div class="<?php echo esc_html( $container ); ?>" id="footer-full-content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="footer-full-content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -15,7 +15,7 @@ $container = get_theme_mod( 'understrap_container_type' );
<div class="wrapper" id="wrapper-static-hero"> <div class="wrapper" id="wrapper-static-hero">
<div class="<?php echo esc_html( $container ); ?>" id="wrapper-static-content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="wrapper-static-content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -12,7 +12,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="single-wrapper"> <div class="wrapper" id="single-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -8,7 +8,7 @@ Description: Combination of Automattic´s _s theme and Bootstrap 4. Made as a so
That downloads everything and moves it in place so that you can recompile your CSS and JS files; That downloads everything and moves it in place so that you can recompile your CSS and JS files;
A developer version (with Gulp/node and Sass sources) is available on gitHub: https://github.com/holger1411/understrap A developer version (with Gulp/node and Sass sources) is available on gitHub: https://github.com/holger1411/understrap
A child theme is available on Github, too: https://github.com/holger1411/understrap-child; A child theme is available on Github, too: https://github.com/holger1411/understrap-child;
Version: 0.6.0 Version: 0.6.2
License: GNU General Public License v2 or later License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: understrap Text Domain: understrap

View File

@ -19,7 +19,7 @@ $sidebar_pos = get_theme_mod( 'understrap_sidebar_position' );
<div class="wrapper" id="woocommerce-wrapper"> <div class="wrapper" id="woocommerce-wrapper">
<div class="<?php echo esc_html( $container ); ?>" id="content" tabindex="-1"> <div class="<?php echo esc_attr( $container ); ?>" id="content" tabindex="-1">
<div class="row"> <div class="row">

View File

@ -56,7 +56,7 @@ do_action( 'woocommerce_before_cart' ); ?>
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>', '<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
__( 'Remove this item', 'understrap' ), esc_attr__( 'Remove this item', 'understrap' ),
esc_attr( $product_id ), esc_attr( $product_id ),
esc_attr( $_product->get_sku() ) esc_attr( $_product->get_sku() )
), $cart_item_key ); ), $cart_item_key );

View File

@ -46,7 +46,7 @@ if ( ! defined( 'ABSPATH' ) ) {
echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(
'<a href="%s" class="remove" title="%s" data-product_id="%s" data-product_sku="%s">&times;</a>', '<a href="%s" class="remove" title="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',
esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),
__( 'Remove this item', 'understrap' ), esc_attr__( 'Remove this item', 'understrap' ),
esc_attr( $product_id ), esc_attr( $product_id ),
esc_attr( $_product->get_sku() ) esc_attr( $_product->get_sku() )
), $cart_item_key ); ), $cart_item_key );