Merge branch 'master' into master
This commit is contained in:
@@ -32,7 +32,7 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-console": process.env.NODE_ENV === 'production' ? 2 : 0,
|
"no-console": 0,
|
||||||
"comma-dangle": [
|
"comma-dangle": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ sudo: false
|
|||||||
dist: trusty
|
dist: trusty
|
||||||
php:
|
php:
|
||||||
- 7.1
|
- 7.1
|
||||||
- 7.0
|
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|||||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,4 +1,12 @@
|
|||||||
### HEAD
|
### 9.0.1: April 30th, 2018
|
||||||
|
* Update to Bootstrap 4.1.1 ([#2065](https://github.com/roots/sage/pull/2065))
|
||||||
|
* Auto-detect `proxyUrl` scheme ([#2062](https://github.com/roots/sage/pull/2062))
|
||||||
|
* Bump to Laravel 5.6 ([#2061](https://github.com/roots/sage/pull/2061))
|
||||||
|
* Update to Bootstrap 4.1.0 ([#2056](https://github.com/roots/sage/pull/2056))
|
||||||
|
* Change inline `@php` directive to full form ([#2042](https://github.com/roots/sage/pull/2042))
|
||||||
|
* PHP 7.1.3+ is now required ([#2037](https://github.com/roots/sage/pull/2037))
|
||||||
|
|
||||||
|
### 9.0.0: February 7th, 2018
|
||||||
* Update to Bootstrap 4 ([#2015](https://github.com/roots/sage/pull/2015))
|
* Update to Bootstrap 4 ([#2015](https://github.com/roots/sage/pull/2015))
|
||||||
* Allow `no-console` development ([#2008](https://github.com/roots/sage/pull/2008))
|
* Allow `no-console` development ([#2008](https://github.com/roots/sage/pull/2008))
|
||||||
* Move variables and Bootstrap lines to autoload ([#1993](https://github.com/roots/sage/pull/1993))
|
* Move variables and Bootstrap lines to autoload ([#1993](https://github.com/roots/sage/pull/1993))
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -5,18 +5,15 @@
|
|||||||
|
|
||||||
Sage is a WordPress starter theme with a modern development workflow.
|
Sage is a WordPress starter theme with a modern development workflow.
|
||||||
|
|
||||||
**Sage 9 is in active development and is currently in beta. The `master` branch tracks Sage 9 development. If you want a stable version, use the [latest Sage 8 release](https://github.com/roots/sage/releases/latest).**
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Sass for stylesheets
|
* Sass for stylesheets
|
||||||
* Modern JavaScript
|
* Modern JavaScript
|
||||||
* [Webpack](https://webpack.github.io/) for compiling assets, optimizing images, and concatenating and minifying files
|
* [Webpack](https://webpack.github.io/) for compiling assets, optimizing images, and concatenating and minifying files
|
||||||
* [Browsersync](http://www.browsersync.io/) for synchronized browser testing
|
* [Browsersync](http://www.browsersync.io/) for synchronized browser testing
|
||||||
* [Laravel Blade](https://laravel.com/docs/5.3/blade) as a templating engine
|
* [Blade](https://laravel.com/docs/5.5/blade) as a templating engine
|
||||||
* [Controller](https://github.com/soberwp/controller) for passing data to Blade templates
|
* [Controller](https://github.com/soberwp/controller) for passing data to Blade templates
|
||||||
* CSS framework (optional): [Bootstrap 4](https://getbootstrap.com/), [Bulma](https://bulma.io/), [Foundation](https://foundation.zurb.com/), [Tachyons](http://tachyons.io/)
|
* CSS framework (optional): [Bootstrap 4](https://getbootstrap.com/), [Bulma](https://bulma.io/), [Foundation](https://foundation.zurb.com/), [Tachyons](http://tachyons.io/)
|
||||||
* Font Awesome (optional)
|
|
||||||
|
|
||||||
See a working example at [roots-example-project.com](https://roots-example-project.com/).
|
See a working example at [roots-example-project.com](https://roots-example-project.com/).
|
||||||
|
|
||||||
@@ -25,7 +22,7 @@ See a working example at [roots-example-project.com](https://roots-example-proje
|
|||||||
Make sure all dependencies have been installed before moving on:
|
Make sure all dependencies have been installed before moving on:
|
||||||
|
|
||||||
* [WordPress](https://wordpress.org/) >= 4.7
|
* [WordPress](https://wordpress.org/) >= 4.7
|
||||||
* [PHP](https://secure.php.net/manual/en/install.php) >= 7.0 (with [`php-mbstring`](https://secure.php.net/manual/en/book.mbstring.php) enabled)
|
* [PHP](https://secure.php.net/manual/en/install.php) >= 7.1.3 (with [`php-mbstring`](https://secure.php.net/manual/en/book.mbstring.php) enabled)
|
||||||
* [Composer](https://getcomposer.org/download/)
|
* [Composer](https://getcomposer.org/download/)
|
||||||
* [Node.js](http://nodejs.org/) >= 6.9.x
|
* [Node.js](http://nodejs.org/) >= 6.9.x
|
||||||
* [Yarn](https://yarnpkg.com/en/docs/install)
|
* [Yarn](https://yarnpkg.com/en/docs/install)
|
||||||
@@ -36,10 +33,16 @@ Install Sage using Composer from your WordPress themes directory (replace `your-
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# @ app/themes/ or wp-content/themes/
|
# @ app/themes/ or wp-content/themes/
|
||||||
|
$ composer create-project roots/sage your-theme-name
|
||||||
|
```
|
||||||
|
|
||||||
|
To install the latest development version of Sage, add `dev-master` to the end of the command:
|
||||||
|
|
||||||
|
```shell
|
||||||
$ composer create-project roots/sage your-theme-name dev-master
|
$ composer create-project roots/sage your-theme-name dev-master
|
||||||
```
|
```
|
||||||
|
|
||||||
During theme installation you will have options to update `style.css` theme headers, select a CSS framework, add Font Awesome, and configure Browsersync.
|
During theme installation you will have options to update `style.css` theme headers, select a CSS framework, and configure Browsersync.
|
||||||
|
|
||||||
## Theme structure
|
## Theme structure
|
||||||
|
|
||||||
@@ -87,20 +90,25 @@ Edit `app/setup.php` to enable or disable theme features, setup navigation menus
|
|||||||
|
|
||||||
### Build commands
|
### Build commands
|
||||||
|
|
||||||
* `yarn run start` — Compile assets when file changes are made, start Browsersync session
|
* `yarn start` — Compile assets when file changes are made, start Browsersync session
|
||||||
* `yarn run build` — Compile and optimize the files in your assets directory
|
* `yarn build` — Compile and optimize the files in your assets directory
|
||||||
* `yarn run build:production` — Compile assets for production
|
* `yarn build:production` — Compile assets for production
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
* [Sage 8 documentation](https://roots.io/sage/docs/) (stable version of Sage 8, _not_ this repo)
|
* [Sage documentation](https://roots.io/sage/docs/)
|
||||||
* [Sage 9 documentation](https://github.com/roots/docs/tree/sage-9/sage) (in progress)
|
|
||||||
* [Controller documentation](https://github.com/soberwp/controller#usage)
|
* [Controller documentation](https://github.com/soberwp/controller#usage)
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributions are welcome from everyone. We have [contributing guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started.
|
Contributions are welcome from everyone. We have [contributing guidelines](https://github.com/roots/guidelines/blob/master/CONTRIBUTING.md) to help you get started.
|
||||||
|
|
||||||
|
## Gold sponsors
|
||||||
|
|
||||||
|
Help support our open-source development efforts by [contributing to Sage on OpenCollective](https://opencollective.com/sage).
|
||||||
|
|
||||||
|
<a href="https://kinsta.com/?kaid=OFDHAJIXUDIV"><img src="https://roots.io/app/uploads/kinsta.svg" alt="Kinsta" width="200" height="150"></a> <a href="https://k-m.com/"><img src="https://roots.io/app/uploads/km-digital.svg" alt="KM Digital" width="200" height="150"></a>
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
||||||
Keep track of development and community news.
|
Keep track of development and community news.
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ add_filter('body_class', function (array $classes) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Add a global class to everything.
|
||||||
|
* We want it to come first, so stuff its filter does can be overridden.
|
||||||
|
*/
|
||||||
|
array_unshift($classes, 'app');
|
||||||
|
|
||||||
/** Add class if sidebar is active */
|
/** Add class if sidebar is active */
|
||||||
if (display_sidebar()) {
|
if (display_sidebar()) {
|
||||||
$classes[] = 'sidebar-primary';
|
$classes[] = 'sidebar-primary';
|
||||||
@@ -67,4 +72,24 @@ add_filter('comments_template', function ($comments_template) {
|
|||||||
$comments_template
|
$comments_template
|
||||||
);
|
);
|
||||||
return template_path(locate_template(["views/{$comments_template}", $comments_template]) ?: $comments_template);
|
return template_path(locate_template(["views/{$comments_template}", $comments_template]) ?: $comments_template);
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render WordPress searchform using Blade
|
||||||
|
*/
|
||||||
|
add_filter('get_search_form', function () {
|
||||||
|
return template('partials.searchform');
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Collect data for searchform.
|
||||||
|
*/
|
||||||
|
add_filter('sage/template/app/data', function ($data) {
|
||||||
|
return $data + [
|
||||||
|
'sf_action' => esc_url(home_url('/')),
|
||||||
|
'sf_screen_reader_text' => _x('Search for:', 'label', 'sage'),
|
||||||
|
'sf_placeholder' => esc_attr_x('Search …', 'placeholder', 'sage'),
|
||||||
|
'sf_current_query' => get_search_query(),
|
||||||
|
'sf_submit_text' => esc_attr_x('Search', 'submit button', 'sage'),
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function config($key = null, $default = null)
|
|||||||
*/
|
*/
|
||||||
function template($file, $data = [])
|
function template($file, $data = [])
|
||||||
{
|
{
|
||||||
if (remove_action('wp_head', 'wp_enqueue_scripts', 1)) {
|
if (!is_admin() && remove_action('wp_head', 'wp_enqueue_scripts', 1)) {
|
||||||
wp_enqueue_scripts();
|
wp_enqueue_scripts();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,10 +109,12 @@ function filter_templates($templates)
|
|||||||
return [
|
return [
|
||||||
"{$path}/{$template}.blade.php",
|
"{$path}/{$template}.blade.php",
|
||||||
"{$path}/{$template}.php",
|
"{$path}/{$template}.php",
|
||||||
"{$template}.blade.php",
|
|
||||||
"{$template}.php",
|
|
||||||
];
|
];
|
||||||
});
|
})
|
||||||
|
->concat([
|
||||||
|
"{$template}.blade.php",
|
||||||
|
"{$template}.php",
|
||||||
|
]);
|
||||||
})
|
})
|
||||||
->filter()
|
->filter()
|
||||||
->unique()
|
->unique()
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ use Roots\Sage\Template\BladeProvider;
|
|||||||
add_action('wp_enqueue_scripts', function () {
|
add_action('wp_enqueue_scripts', function () {
|
||||||
wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), false, null);
|
wp_enqueue_style('sage/main.css', asset_path('styles/main.css'), false, null);
|
||||||
wp_enqueue_script('sage/main.js', asset_path('scripts/main.js'), ['jquery'], null, true);
|
wp_enqueue_script('sage/main.js', asset_path('scripts/main.js'), ['jquery'], null, true);
|
||||||
|
|
||||||
|
if (is_single() && comments_open() && get_option('thread_comments')) {
|
||||||
|
wp_enqueue_script('comment-reply');
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -32,10 +32,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7",
|
"php": ">=7.1",
|
||||||
"composer/installers": "~1.0",
|
"composer/installers": "~1.0",
|
||||||
"illuminate/support": "~5.4",
|
"illuminate/support": "~5.6",
|
||||||
"roots/sage-lib": "~9.0.0-beta.4",
|
"roots/sage-lib": "~9.0.1",
|
||||||
"soberwp/controller": "~2.1.0"
|
"soberwp/controller": "~2.1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
|||||||
803
composer.lock
generated
803
composer.lock
generated
File diff suppressed because it is too large
Load Diff
9937
package-lock.json
generated
9937
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
25
package.json
25
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sage",
|
"name": "sage",
|
||||||
"version": "9.0.0-beta.4",
|
"version": "9.0.1",
|
||||||
"author": "Roots <team@roots.io>",
|
"author": "Roots <team@roots.io>",
|
||||||
"homepage": "https://roots.io/sage/",
|
"homepage": "https://roots.io/sage/",
|
||||||
"private": true,
|
"private": true,
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack --progress --config resources/assets/build/webpack.config.js",
|
"build": "webpack --progress --config resources/assets/build/webpack.config.js",
|
||||||
"build:production": "webpack --progress -p --config resources/assets/build/webpack.config.js",
|
"build:production": "webpack --env.production --progress --config resources/assets/build/webpack.config.js",
|
||||||
"build:profile": "webpack --progress --profile --json --config resources/assets/build/webpack.config.js",
|
"build:profile": "webpack --progress --profile --json --config resources/assets/build/webpack.config.js",
|
||||||
"start": "webpack --hide-modules --watch --config resources/assets/build/webpack.config.js",
|
"start": "webpack --hide-modules --watch --config resources/assets/build/webpack.config.js",
|
||||||
"rmdist": "rimraf dist",
|
"rmdist": "rimraf dist",
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
"node": ">= 6.9.4"
|
"node": ">= 6.9.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "~7.2.5",
|
"autoprefixer": "~8.2.0",
|
||||||
"browser-sync": "~2.23.6",
|
"browser-sync": "~2.23.6",
|
||||||
"browsersync-webpack-plugin": "^0.6.0",
|
"browsersync-webpack-plugin": "^0.6.0",
|
||||||
"bs-html-injector": "~3.0",
|
"bs-html-injector": "~3.0",
|
||||||
@@ -75,36 +75,37 @@
|
|||||||
"copy-globs-webpack-plugin": "^0.2.0",
|
"copy-globs-webpack-plugin": "^0.2.0",
|
||||||
"css-loader": "^0.28.9",
|
"css-loader": "^0.28.9",
|
||||||
"cssnano": "~v4.0.0-rc.2",
|
"cssnano": "~v4.0.0-rc.2",
|
||||||
"eslint": "~4.17.0",
|
"eslint": "~4.19.1",
|
||||||
"eslint-loader": "~1.9",
|
"eslint-loader": "~1.9",
|
||||||
"eslint-plugin-import": "~2.8.0",
|
"eslint-plugin-import": "~2.11.0",
|
||||||
"extract-text-webpack-plugin": "~3.0.2",
|
"extract-text-webpack-plugin": "~3.0.2",
|
||||||
"file-loader": "^1.1.6",
|
"file-loader": "^1.1.6",
|
||||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||||
"imagemin-mozjpeg": "~7.0.0",
|
"imagemin-mozjpeg": "~7.0.0",
|
||||||
"imagemin-webpack-plugin": "~2.0.0",
|
"imagemin-webpack-plugin": "~2.1.1",
|
||||||
"import-glob": "~1.5",
|
"import-glob": "~1.5",
|
||||||
"node-sass": "~4.7.2",
|
"node-sass": "~4.8.3",
|
||||||
"postcss-loader": "~2.1.0",
|
"postcss-loader": "~2.1.0",
|
||||||
"postcss-safe-parser": "~3.0",
|
"postcss-safe-parser": "~3.0",
|
||||||
"resolve-url-loader": "~2.2.1",
|
"resolve-url-loader": "~2.3.0",
|
||||||
"rimraf": "~2.6",
|
"rimraf": "~2.6",
|
||||||
"sass-loader": "~6.0",
|
"sass-loader": "~6.0",
|
||||||
"style-loader": "^0.20.1",
|
"style-loader": "^0.20.1",
|
||||||
"stylelint": "^8.4.0",
|
"stylelint": "^8.4.0",
|
||||||
"stylelint-config-standard": "~18.0.0",
|
"stylelint-config-standard": "~18.2.0",
|
||||||
"stylelint-webpack-plugin": "^0.10.1",
|
"stylelint-webpack-plugin": "^0.10.1",
|
||||||
|
"uglifyjs-webpack-plugin": "^1.2.5",
|
||||||
"url-loader": "^0.6.2",
|
"url-loader": "^0.6.2",
|
||||||
"webpack": "~3.10.0",
|
"webpack": "~3.10.0",
|
||||||
"webpack-assets-manifest": "^1.0.0",
|
"webpack-assets-manifest": "^1.0.0",
|
||||||
"webpack-dev-middleware": "~2.0.4",
|
"webpack-dev-middleware": "~2.0.4",
|
||||||
"webpack-hot-middleware": "~2.21.0",
|
"webpack-hot-middleware": "~2.22.0",
|
||||||
"webpack-merge": "~4.1.1",
|
"webpack-merge": "~4.1.1",
|
||||||
"yargs": "~11.0.0"
|
"yargs": "~11.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bootstrap": "v4.0.0",
|
"bootstrap": "v4.1.3",
|
||||||
"jquery": "^3.3.1",
|
"jquery": "^3.3.1",
|
||||||
"popper.js": "^1.12.9"
|
"popper.js": "^1.14.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ module.exports = ({ file, options }) => {
|
|||||||
return {
|
return {
|
||||||
parser: options.enabled.optimize ? 'postcss-safe-parser' : undefined,
|
parser: options.enabled.optimize ? 'postcss-safe-parser' : undefined,
|
||||||
plugins: {
|
plugins: {
|
||||||
cssnano: options.enabled.optimize ? cssnanoConfig : false,
|
|
||||||
autoprefixer: true,
|
autoprefixer: true,
|
||||||
|
cssnano: options.enabled.optimize ? cssnanoConfig : false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|||||||
const CopyGlobsPlugin = require('copy-globs-webpack-plugin');
|
const CopyGlobsPlugin = require('copy-globs-webpack-plugin');
|
||||||
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
|
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin');
|
||||||
|
|
||||||
|
const desire = require('./util/desire');
|
||||||
const config = require('./config');
|
const config = require('./config');
|
||||||
|
|
||||||
const assetsFilenames = (config.enabled.cacheBusting) ? config.cacheBusting : '[name]';
|
const assetsFilenames = (config.enabled.cacheBusting) ? config.cacheBusting : '[name]';
|
||||||
@@ -89,12 +90,17 @@ let webpackConfig = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ loader: 'resolve-url', options: { sourceMap: config.enabled.sourceMaps } },
|
{ loader: 'resolve-url', options: { sourceMap: config.enabled.sourceMaps } },
|
||||||
{ loader: 'sass', options: { sourceMap: config.enabled.sourceMaps } },
|
{
|
||||||
|
loader: 'sass', options: {
|
||||||
|
sourceMap: config.enabled.sourceMaps,
|
||||||
|
sourceComments: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(ttf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
|
test: /\.(ttf|otf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
|
||||||
include: config.paths.assets,
|
include: config.paths.assets,
|
||||||
loader: 'url',
|
loader: 'url',
|
||||||
options: {
|
options: {
|
||||||
@@ -103,7 +109,7 @@ let webpackConfig = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(ttf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
|
test: /\.(ttf|otf|eot|woff2?|png|jpe?g|gif|svg|ico)$/,
|
||||||
include: /node_modules/,
|
include: /node_modules/,
|
||||||
loader: 'url',
|
loader: 'url',
|
||||||
options: {
|
options: {
|
||||||
@@ -208,4 +214,6 @@ if (config.enabled.watcher) {
|
|||||||
webpackConfig = merge(webpackConfig, require('./webpack.config.watch'));
|
webpackConfig = merge(webpackConfig, require('./webpack.config.watch'));
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = webpackConfig;
|
module.exports = merge.smartStrategy({
|
||||||
|
'module.loaders': 'replace',
|
||||||
|
})(webpackConfig, desire(`${__dirname}/webpack.config.preset`));
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
|
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
|
||||||
const imageminMozjpeg = require('imagemin-mozjpeg');
|
const imageminMozjpeg = require('imagemin-mozjpeg');
|
||||||
|
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
|
||||||
|
|
||||||
const config = require('./config');
|
const config = require('./config');
|
||||||
|
|
||||||
@@ -11,9 +12,24 @@ module.exports = {
|
|||||||
optipng: { optimizationLevel: 7 },
|
optipng: { optimizationLevel: 7 },
|
||||||
gifsicle: { optimizationLevel: 3 },
|
gifsicle: { optimizationLevel: 3 },
|
||||||
pngquant: { quality: '65-90', speed: 4 },
|
pngquant: { quality: '65-90', speed: 4 },
|
||||||
svgo: { removeUnknownsAndDefaults: false, cleanupIDs: false },
|
svgo: {
|
||||||
|
plugins: [
|
||||||
|
{ removeUnknownsAndDefaults: false },
|
||||||
|
{ cleanupIDs: false },
|
||||||
|
{ removeViewBox: false },
|
||||||
|
],
|
||||||
|
},
|
||||||
plugins: [imageminMozjpeg({ quality: 75 })],
|
plugins: [imageminMozjpeg({ quality: 75 })],
|
||||||
disable: (config.enabled.watcher),
|
disable: (config.enabled.watcher),
|
||||||
}),
|
}),
|
||||||
|
new UglifyJsPlugin({
|
||||||
|
uglifyOptions: {
|
||||||
|
ecma: 5,
|
||||||
|
compress: {
|
||||||
|
warnings: true,
|
||||||
|
drop_console: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ const target = process.env.DEVURL || config.devUrl;
|
|||||||
*/
|
*/
|
||||||
if (url.parse(target).protocol === 'https:') {
|
if (url.parse(target).protocol === 'https:') {
|
||||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
|
process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0;
|
||||||
|
|
||||||
|
config.proxyUrl = config.proxyUrl.replace('http:', 'https:');
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
@import "~bootstrap/scss/functions";
|
@import "~bootstrap/scss/functions";
|
||||||
|
|
||||||
$theme-colors: (
|
$theme-colors: (
|
||||||
primary: #27ae60
|
primary: #525ddc
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ $sage_error = function ($message, $subtitle = '', $title = '') {
|
|||||||
/**
|
/**
|
||||||
* Ensure compatible version of PHP is used
|
* Ensure compatible version of PHP is used
|
||||||
*/
|
*/
|
||||||
if (version_compare('7', phpversion(), '>=')) {
|
if (version_compare('7.1', phpversion(), '>=')) {
|
||||||
$sage_error(__('You must be using PHP 7 or greater.', 'sage'), __('Invalid PHP version', 'sage'));
|
$sage_error(__('You must be using PHP 7.1 or greater.', 'sage'), __('Invalid PHP version', 'sage'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Theme Name: Sage Starter Theme
|
Theme Name: Sage Starter Theme
|
||||||
Theme URI: https://roots.io/sage/
|
Theme URI: https://roots.io/sage/
|
||||||
Description: Sage is a WordPress starter theme.
|
Description: Sage is a WordPress starter theme.
|
||||||
Version: 9.0.0-beta.4
|
Version: 9.0.1
|
||||||
Author: Roots
|
Author: Roots
|
||||||
Author URI: https://roots.io/
|
Author URI: https://roots.io/
|
||||||
Text Domain: sage
|
Text Domain: sage
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
{!! get_search_form(false) !!}
|
{!! get_search_form(false) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@while (have_posts()) @php(the_post())
|
@while (have_posts()) @php the_post() @endphp
|
||||||
@include('partials.content-'.get_post_type())
|
@include('partials.content-'.get_post_type())
|
||||||
@endwhile
|
@endwhile
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html @php(language_attributes())>
|
<html {{ get_language_attributes() }}>
|
||||||
@include('partials.head')
|
@include('partials.head')
|
||||||
<body @php(body_class())>
|
<body @php body_class() @endphp>
|
||||||
@php(do_action('get_header'))
|
@php do_action('get_header') @endphp
|
||||||
@include('partials.header')
|
@include('partials.header')
|
||||||
<div class="wrap container" role="document">
|
<div class="wrap container" role="document">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@php(do_action('get_footer'))
|
@php do_action('get_footer') @endphp
|
||||||
@include('partials.footer')
|
@include('partials.footer')
|
||||||
@php(wp_footer())
|
@php wp_footer() @endphp
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@while(have_posts()) @php(the_post())
|
@while(have_posts()) @php the_post() @endphp
|
||||||
@include('partials.page-header')
|
@include('partials.page-header')
|
||||||
@include('partials.content-page')
|
@include('partials.content-page')
|
||||||
@endwhile
|
@endwhile
|
||||||
|
|||||||
@@ -18,10 +18,10 @@ if (post_password_required()) {
|
|||||||
<nav>
|
<nav>
|
||||||
<ul class="pager">
|
<ul class="pager">
|
||||||
@if (get_previous_comments_link())
|
@if (get_previous_comments_link())
|
||||||
<li class="previous">@php(previous_comments_link(__('← Older comments', 'sage')))</li>
|
<li class="previous">@php previous_comments_link(__('← Older comments', 'sage')) @endphp</li>
|
||||||
@endif
|
@endif
|
||||||
@if (get_next_comments_link())
|
@if (get_next_comments_link())
|
||||||
<li class="next">@php(next_comments_link(__('Newer comments →', 'sage')))</li>
|
<li class="next">@php next_comments_link(__('Newer comments →', 'sage')) @endphp</li>
|
||||||
@endif
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -34,5 +34,5 @@ if (post_password_required()) {
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@php(comment_form())
|
@php comment_form() @endphp
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
@php(the_content())
|
@php the_content() @endphp
|
||||||
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<article @php(post_class())>
|
<article @php post_class() @endphp>
|
||||||
<header>
|
<header>
|
||||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
||||||
@if (get_post_type() === 'post')
|
@if (get_post_type() === 'post')
|
||||||
@@ -6,6 +6,6 @@
|
|||||||
@endif
|
@endif
|
||||||
</header>
|
</header>
|
||||||
<div class="entry-summary">
|
<div class="entry-summary">
|
||||||
@php(the_excerpt())
|
@php the_excerpt() @endphp
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<article @php(post_class())>
|
<article @php post_class() @endphp>
|
||||||
<header>
|
<header>
|
||||||
<h1 class="entry-title">{{ get_the_title() }}</h1>
|
<h1 class="entry-title">{{ get_the_title() }}</h1>
|
||||||
@include('partials/entry-meta')
|
@include('partials/entry-meta')
|
||||||
</header>
|
</header>
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
@php(the_content())
|
@php the_content() @endphp
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
{!! wp_link_pages(['echo' => 0, 'before' => '<nav class="page-nav"><p>' . __('Pages:', 'sage'), 'after' => '</p></nav>']) !!}
|
||||||
</footer>
|
</footer>
|
||||||
@php(comments_template('/partials/comments.blade.php'))
|
@php comments_template('/partials/comments.blade.php') @endphp
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<article @php(post_class())>
|
<article @php post_class() @endphp>
|
||||||
<header>
|
<header>
|
||||||
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
<h2 class="entry-title"><a href="{{ get_permalink() }}">{{ get_the_title() }}</a></h2>
|
||||||
@include('partials/entry-meta')
|
@include('partials/entry-meta')
|
||||||
</header>
|
</header>
|
||||||
<div class="entry-summary">
|
<div class="entry-summary">
|
||||||
@php(the_excerpt())
|
@php the_excerpt() @endphp
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<footer class="content-info">
|
<footer class="content-info">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@php(dynamic_sidebar('sidebar-footer'))
|
@php dynamic_sidebar('sidebar-footer') @endphp
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
@php(wp_head())
|
@php wp_head() @endphp
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
7
resources/views/partials/searchform.blade.php
Normal file
7
resources/views/partials/searchform.blade.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<form role="search" method="get" class="search-form" action="{{ $sf_action }}">
|
||||||
|
<label>
|
||||||
|
<span class="screen-reader-text">{{ $sf_screen_reader_text }}</span>
|
||||||
|
<input type="search" class="search-field" placeholder="{!! $sf_placeholder !!}" value="{{ $sf_current_query }}" name="s">
|
||||||
|
</label>
|
||||||
|
<input type="submit" class="search-submit" value="{{ $sf_submit_text }}">
|
||||||
|
</form>
|
||||||
@@ -1 +1 @@
|
|||||||
@php(dynamic_sidebar('sidebar-primary'))
|
@php dynamic_sidebar('sidebar-primary') @endphp
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
@if (!have_posts())
|
@if (!have_posts())
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
{{ __('Sorry, no results were found.', 'sage') }}
|
{{ __('Sorry, no results were found.', 'sage') }}
|
||||||
</div>
|
</div>
|
||||||
{!! get_search_form(false) !!}
|
{!! get_search_form(false) !!}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@while(have_posts()) @php(the_post())
|
@while(have_posts()) @php the_post() @endphp
|
||||||
@include('partials.content-search')
|
@include('partials.content-search')
|
||||||
@endwhile
|
@endwhile
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@while(have_posts()) @php(the_post())
|
@while(have_posts()) @php the_post() @endphp
|
||||||
@include('partials.content-single-'.get_post_type())
|
@include('partials.content-single-'.get_post_type())
|
||||||
@endwhile
|
@endwhile
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@while(have_posts()) @php(the_post())
|
@while(have_posts()) @php the_post() @endphp
|
||||||
@include('partials.page-header')
|
@include('partials.page-header')
|
||||||
@include('partials.content-page')
|
@include('partials.content-page')
|
||||||
@endwhile
|
@endwhile
|
||||||
|
|||||||
Reference in New Issue
Block a user