├── .bowerrc ├── .editorconfig ├── .gitignore ├── .jscsrc ├── .jshintrc ├── .travis.yml ├── 404.php ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── assets ├── fonts │ └── .gitkeep ├── images │ └── .gitkeep ├── manifest.json ├── scripts │ └── main.js └── styles │ ├── common │ ├── _global.scss │ └── _variables.scss │ ├── components │ ├── _buttons.scss │ ├── _comments.scss │ ├── _forms.scss │ ├── _grid.scss │ └── _wp-classes.scss │ ├── editor-style.scss │ ├── layouts │ ├── _footer.scss │ ├── _header.scss │ ├── _pages.scss │ ├── _posts.scss │ └── _sidebar.scss │ └── main.scss ├── base.php ├── bower.json ├── functions.php ├── gulpfile.js ├── index.php ├── lang └── sage.pot ├── lib ├── assets.php ├── conditional-tag-check.php ├── config.php ├── extras.php ├── init.php ├── titles.php ├── utils.php └── wrapper.php ├── package.json ├── page.php ├── ruleset.xml ├── screenshot.png ├── search.php ├── single.php ├── style.css ├── template-custom.php └── templates ├── comments.php ├── content-page.php ├── content-search.php ├── content-single.php ├── content.php ├── entry-meta.php ├── footer.php ├── head.php ├── header.php ├── page-header.php ├── searchform.php └── sidebar.php /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Include your project-specific ignores in this file 2 | # Read about how to use .gitignore: https://help.github.com/articles/ignoring-files 3 | dist 4 | bower_components 5 | node_modules 6 | npm-debug.log 7 | -------------------------------------------------------------------------------- /.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "requireCurlyBraces": [ 3 | "if", 4 | "else", 5 | "for", 6 | "while", 7 | "do", 8 | "try", 9 | "catch" 10 | ], 11 | "requireOperatorBeforeLineBreak": true, 12 | "requireCamelCaseOrUpperCaseIdentifiers": true, 13 | "maximumLineLength": { 14 | "value": 80, 15 | "allowComments": true, 16 | "allowRegex": true 17 | }, 18 | "validateIndentation": 2, 19 | "validateQuoteMarks": "'", 20 | "disallowMultipleLineStrings": true, 21 | "disallowMixedSpacesAndTabs": true, 22 | "disallowTrailingWhitespace": true, 23 | "disallowSpaceAfterPrefixUnaryOperators": true, 24 | "disallowMultipleVarDecl": true, 25 | "disallowKeywordsOnNewLine": [ 26 | "else" 27 | ], 28 | "requireSpaceAfterKeywords": [ 29 | "if", 30 | "else", 31 | "for", 32 | "while", 33 | "do", 34 | "switch", 35 | "return", 36 | "try", 37 | "catch" 38 | ], 39 | "requireSpaceBeforeBinaryOperators": [ 40 | "=", 41 | "+=", 42 | "-=", 43 | "*=", 44 | "/=", 45 | "%=", 46 | "<<=", 47 | ">>=", 48 | ">>>=", 49 | "&=", 50 | "|=", 51 | "^=", 52 | "+=", 53 | "+", 54 | "-", 55 | "*", 56 | "/", 57 | "%", 58 | "<<", 59 | ">>", 60 | ">>>", 61 | "&", 62 | "|", 63 | "^", 64 | "&&", 65 | "||", 66 | "===", 67 | "==", 68 | ">=", 69 | "<=", 70 | "<", 71 | ">", 72 | "!=", 73 | "!==" 74 | ], 75 | "requireSpaceAfterBinaryOperators": true, 76 | "requireSpacesInConditionalExpression": true, 77 | "requireSpaceBeforeBlockStatements": true, 78 | "requireSpacesInForStatement": true, 79 | "requireLineFeedAtFileEnd": true, 80 | "requireSpacesInFunctionExpression": { 81 | "beforeOpeningCurlyBrace": true 82 | }, 83 | "disallowSpacesInAnonymousFunctionExpression": { 84 | "beforeOpeningRoundBrace": true 85 | }, 86 | "disallowSpacesInsideObjectBrackets": "all", 87 | "disallowSpacesInsideArrayBrackets": "all", 88 | "disallowSpacesInsideParentheses": true, 89 | "validateJSDoc": { 90 | "checkParamNames": true, 91 | "requireParamTypes": true 92 | }, 93 | "disallowMultipleLineBreaks": true, 94 | "disallowNewlineBeforeBlockStatements": true 95 | } 96 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "bitwise": true, 3 | "browser": true, 4 | "curly": true, 5 | "eqeqeq": true, 6 | "eqnull": true, 7 | "esnext": true, 8 | "immed": true, 9 | "jquery": true, 10 | "latedef": true, 11 | "newcap": true, 12 | "noarg": true, 13 | "node": true, 14 | "strict": false 15 | } 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: php 3 | php: 4 | - nightly 5 | - 5.6 6 | - 5.5 7 | - 5.4 8 | - hhvm 9 | 10 | matrix: 11 | allow_failures: 12 | - php: nightly 13 | 14 | cache: 15 | directories: 16 | - bower_components 17 | - node_modules 18 | 19 | install: 20 | - npm install -g npm@latest 21 | - npm install -g bower gulp jscs 22 | - npm install 23 | - composer self-update && composer --version 24 | - export PATH="$HOME/.composer/vendor/bin:$PATH" 25 | - composer global require squizlabs/php_codesniffer 26 | 27 | script: 28 | - npm run build 29 | - npm run jshint 30 | - npm run jscs 31 | - phpcs --standard=ruleset.xml --extensions=php -n -s . 32 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |
6 | 7 | 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### HEAD 2 | * Add search templates ([#1459](https://github.com/roots/sage/issues/1459)) 3 | 4 | ### 8.2.1: May 7th, 2015 5 | * Update BrowserSync ([#1457](https://github.com/roots/sage/issues/1457)) 6 | * Bump dependencies ([#1448](https://github.com/roots/sage/issues/1448)) 7 | * Allow revved files to resolve in development if they exist ([#1456](https://github.com/roots/sage/issues/1456)) 8 | * Disable advanced minification features to fix incorrect file path in compiled CSS ([#1452](https://github.com/roots/sage/issues/1452)) 9 | * Fix Glyphicon font path ([#1455](https://github.com/roots/sage/issues/1455)) 10 | 11 | ### 8.2.0: April 29th, 2015 12 | * Use Sass Bootstrap by default ([#1437](https://github.com/roots/sage/issues/1437)) 13 | * Remove nav walker and Bootstrap navbar ([#1427](https://github.com/roots/sage/issues/1427)) 14 | * Remove Bootstrap gallery ([#1421](https://github.com/roots/sage/issues/1421)) 15 | * Remove hardcoded feed link ([#1426](https://github.com/roots/sage/issues/1426)) 16 | * Move jQuery CDN feature to Soil ([#1422](https://github.com/roots/sage/issues/1422)) 17 | * Bump `gulp-load-plugins` to 0.10.0 ([#1419](https://github.com/roots/sage/issues/1419)) 18 | * Switch from [yargs](https://github.com/bcoe/yargs) to [minimist](https://github.com/substack/minimist) ([#1418](https://github.com/roots/sage/issues/1418)) 19 | * Remove `$content_width` ([#1417](https://github.com/roots/sage/issues/1417)) 20 | * Lowercase `X-UA-Compatible` ([#1409](https://github.com/roots/sage/issues/1409)) 21 | * Remove mention of Google Analytics from the config ([#1384](https://github.com/roots/sage/issues/1384)) 22 | 23 | ### 8.1.1: March 31st, 2015 24 | * Remove pleeease dependency in favor of vanilla gulp-autoprefixer and gulp-minify-css ([#1402](https://github.com/roots/sage/issues/1402)) 25 | * Fix `gulp --production` race condition ([#1398](https://github.com/roots/sage/issues/1398)) 26 | * Update to Bootstrap 3.3.4 ([#1387](https://github.com/roots/sage/issues/1387)) 27 | 28 | ### 8.1.0: March 13th, 2015 29 | * Move HTML5 Boilerplate's Google Analytics snippet to Soil ([#1382](https://github.com/roots/sage/issues/1382)) 30 | * Run `gulp build` if `bower.json` is changed ([#1378](https://github.com/roots/sage/issues/1378)) 31 | * Remove namespace from base.php ([#1372](https://github.com/roots/sage/issues/1372)) 32 | * Allow build directory to be customized ([#1352](https://github.com/roots/sage/issues/1352), [#1366](https://github.com/roots/sage/issues/1366)) 33 | * Update ConditionalTagCheck and usage docs ([#1365](https://github.com/roots/sage/issues/1365)) 34 | * Change default gallery columns to 3 ([#1364](https://github.com/roots/sage/issues/1364)) 35 | * Apply `script_loader_src` filter to jQuery fallback ([#1363](https://github.com/roots/sage/issues/1363)) 36 | 37 | ### 8.0.1: February 26th, 2015 38 | * Update asset-builder version to fix Windows compatibility ([#1351](https://github.com/roots/sage/issues/1351)) 39 | * Fix broken wiredep imports with main.scss.example ([Discussion](https://discourse.roots.io/t/issue-with-sage-sass-version/2962)) 40 | 41 | ### 8.0.0: February 25th, 2015 42 | * Change theme name from Roots to Sage 43 | * Bump required PHP version to >=5.4 44 | * Add coding standards based on PSR-2 45 | * Add Travis CI 46 | * Add namespace 47 | * Use short array syntax 48 | * Use short echo syntax 49 | * Switch from Grunt to gulp, new front-end development workflow 50 | * Switch from Livereload to [BrowserSync](http://www.browsersync.io/) 51 | * Use wiredep for Sass and Less injection 52 | * Implement JSON file based asset pipeline with [asset-builder](https://github.com/austinpray/asset-builder) 53 | * Re-organize asset file structure 54 | * Re-organize stylesheet file structure 55 | * Add main.scss.example and instructions for using Sass 56 | * Use the primary theme stylesheet for the editor stylesheet 57 | * Remove theme activation, move to [wp-cli-theme-activation](https://github.com/roots/wp-cli-theme-activation) 58 | * Simplify 404 page 59 | * Convert Sidebar to ConditionalTagCheck 60 | * Update to jQuery 1.11.2 61 | * Use new core navigation template tag 62 | * Update sidebar to fix default template check 63 | * Update nav walker to correctly assign `active` classes for custom post types 64 | * Better support for CPT templates 65 | 66 | ### 7.0.3: December 18th, 2014 67 | * Use `get_the_archive_title` 68 | * Remove `wp_title`, add title-tag theme support 69 | * Remove `Roots_Nav_Walker` as default for all menus 70 | * Update to Bootstrap 3.3.1 71 | * Add some base comment styling 72 | * Make search term `required` in search form 73 | 74 | ### 7.0.2: October 24th, 2014 75 | * Simplify comments, use core comment form and list 76 | * Remove HTML5 shiv from Modernizr build 77 | * Move JavaScript to footer 78 | * Update hEntry schema to use `updated` instead of `published` 79 | * Move variables into `main.less` 80 | * Add `roots_body_class` function that checks for page slug in `body_class` 81 | * Move `wp_footer` from footer template into `base.php` 82 | 83 | ### 7.0.1: August 15th, 2014 84 | * Move `
` and `.sidebar` markup out of PHP and into LESS 85 | * Define `WP_ENV` if it is not already defined 86 | * Only load Google Analytics in production environment 87 | 88 | ### 7.0.0: July 3rd, 2014 89 | * Updated Grunt workflow 90 | * Use grunt-modernizr to make a lean Modernizr build 91 | * Use Bower for front-end package management 92 | * Update to Bootstrap 3.2.0 93 | * Update to Modernizr 2.8.2 94 | * Update to jQuery 1.11.1 95 | * Move clean up, relative URLs, and nice search to [Soil](https://github.com/roots/soil) 96 | * Update LESS organization 97 | * Move [community translations](https://github.com/roots/roots-translations) to separate repository 98 | 99 | ### 6.5.2: February 4th, 2014 100 | * Update to Bootstrap 3.1.0 101 | * Move DOM routing into an anonymous function to support jQuery noConflict 102 | * Update to jQuery 1.11.0 103 | * Add notice to theme activation, tidy activation table markup 104 | * Remove changing media folder from theme activation (use [Bedrock](https://github.com/roots/bedrock) for clean URLs out of the box) 105 | * Switch `div.main` to `main` element now that Modernizr uses the latest HTML5 Shiv 106 | * Update to Modernizr 2.7.0 107 | * Don't run JSHint on plugins (`assets/js/plugins/`) 108 | * Disable warnings about undefined variables (JSHint) 109 | * Merge in updates from HTML5 Boilerplate 110 | * Add JS source map (disabled by default) 111 | * Replace `grunt-recess` with `grunt-contrib-less`, add LESS source map support 112 | 113 | ### 6.5.1: November 5th, 2013 114 | * Move clean URLs to a [plugin](https://github.com/roots/roots-rewrites) 115 | * Update to Bootstrap 3.0.1 116 | 117 | ### 6.5.0: August 23rd, 2013 118 | * Reference new site, [http://roots.io/](http://roots.io/) 119 | * Remove bundled docs, reference [http://roots.io/docs/](http://roots.io/docs/) 120 | * Use Bootstrap variables for media queries 121 | * Update to Bootstrap 3.0.0 122 | * Update to jQuery 1.10.2 123 | * Change media directory from `/assets/` to `/media/` 124 | * Update to Google Universal Analytics 125 | * Show author display name for author archives 126 | * Add Serbian translation 127 | * Remove post tags from templates 128 | * Remove TinyMCE valid elements tweaks (no longer necessary) 129 | * Remove additional widget classes 130 | * Move `/assets/css/less/` to `/assets/less/` 131 | * Add wrapper templates filter 132 | * Fix relative external URLs issue 133 | 134 | ### 6.4.0: May 1st, 2013 135 | * Fix Theme Activation page issues 136 | * Fix issues with root relative URLs and rewrites on non-standard setups 137 | * Make sure rewrites are added to `.htaccess` immediately after activation 138 | * Move HTML5 Boilerplate's `.htaccess` to a [plugin](https://github.com/roots/wp-h5bp-htaccess) 139 | * Rename `page-custom.php` to `template-custom.php` 140 | * Don't warn about unwritable htaccess if that option is disabled 141 | * Add missing collapse class for top navbar 142 | * Add comment template 143 | * Update is_dropdown evaluation in nav walker 144 | * Re-organize archives template 145 | * Add missing comment ID 146 | * hNews consistency with entry-title class 147 | * Add `wp_title()` filter 148 | * Fix missing closing div in comments 149 | * Fix for navbar dropdowns 150 | * Add option for using jQuery on Google CDN 151 | * Correct logic in `roots_enable_root_relative_urls` 152 | * Add Greek translation, update Brazilian Portuguese translation 153 | * Update to Bootstrap 2.3.1 154 | * Simplify alerts 155 | * Remove disabled post nav links 156 | * Use Bootstrap media object for listing comments 157 | * Move Google Analytics to `lib/scripts.php` 158 | * Static top navbar instead of fixed 159 | 160 | ### 6.3.0: February 8th, 2013 161 | * Update to Bootstrap 2.3.0 162 | * Update to jQuery 1.9.1 163 | * Output author title with `get_the_author()` 164 | * Add EditorConfig 165 | * Update 404 template based on H5BP 166 | * Update H5BP's included .htaccess 167 | * Don't show comments on passworded posts 168 | * Add `do_action('get_header')` for WooSidebars compatibility 169 | * Simplify entry meta 170 | * Allow `get_search_form()` to be called more than once per request 171 | * Move plugins.js and main.js to footer 172 | * JavaScript clean up (everything is now enqueued) 173 | * Remove conditional feed 174 | * Introduce `add_theme_support('bootstrap-gallery')` 175 | * Rewrites organization (introduce `lib/rewrites.php`) 176 | * Fix `add_editor_style` path 177 | * Updated translations: French, Bulgarian, Turkish, Korean 178 | * Enable `add_theme_support` for Nice Search 179 | * Replace ID's with classes 180 | * Add support for dynamic sidebar templates 181 | * Fix PHP notice on search with no results 182 | * Update to jQuery 1.9.0 183 | 184 | ### 6.2.0: January 13th, 2013 185 | * Implement latest Nice Search 186 | * Update [gallery] shortcode 187 | * Add Simplified Chinese, Indonesian, Korean translations 188 | * Move template title to `lib/utils.php` 189 | * Update to Bootstrap 2.2.2 190 | * Update to jQuery 1.8.3 191 | * Use `entry-summary` class for excerpts per Readability's Article Publishing Guidelines 192 | * Cleanup/refactor `lib/activation.php` 193 | * Remove `lib/post-types.php` and `lib/metaboxes.php` 194 | * Make sure Primary Navigation menu always gets created and has the location set upon activation, update activation permalink method 195 | * Update to Bootstrap 2.2.1 196 | * Update conditional feed method 197 | * Update to Bootstrap 2.2.0 198 | * Return instead of echo class names in `roots_main_class` and `roots_sidebar_class` 199 | * Move nav customizations into `lib/nav.php` 200 | 201 | ### 6.1.0: October 2nd, 2012 202 | * Change roots_sidebar into a more explicit configuration array 203 | * Re-organize configuration/setup files 204 | * Update to jQuery 1.8.2 205 | * Refactor/simplify Roots vCard Widget 206 | * Move custom entry_meta code into template 207 | * Move Google Analytics code into footer template 208 | * Add CONTRIBUTING.md to assist with the new GitHub UI 209 | * Add nav walker support for CSS dividers and nav-header 210 | 211 | ### 6.0.0: September 16th, 2012 212 | * Simplify nav walker and support 3rd level dropdowns 213 | * Update to Bootstrap 2.1.1, jQuery 1.8.1, Modernizr 2.6.2 214 | * Add bundled docs 215 | * Update all templates to use [PHP Alternative Syntax](http://php.net/manual/en/control-structures.alternative-syntax.php) 216 | * Add MIT License 217 | * Implement scribu's [Theme Wrapper](http://scribu.net/wordpress/theme-wrappers.html) (see `base.php`) 218 | * Move `css/`, `img/`, and `js/` folders within a new `assets/` folder 219 | * Move templates, `comments.php`, and `searchform.php` to `templates/` folder 220 | * Rename `inc/` to `lib/` 221 | * Add placeholder `lib/post-types.php` and `lib/metaboxes.php` files 222 | * Rename `loop-` files to `content-` 223 | * Remove all hooks 224 | * Use `templates/page-header.php` for page titles 225 | * Use `head.php` for everything in `` 226 | 227 | ### 5.2.0: August 18th, 2012 228 | * Update to jQuery 1.8.0 and Modernizr 2.6.1 229 | * Fix duplicate active class in `wp_nav_menu` items 230 | * Merge `Roots_Navbar_Nav_Walker` into `Roots_Nav_Walker` 231 | * Add and update code documentation 232 | * Use `wp_get_theme()` to get the theme name on activation 233 | * Use `
` & `
` for captions 234 | * Wrap embedded media as suggested by Readability 235 | * Remove unnecessary `remove_action`'s on `wp_head` as of WordPress 3.2.1 236 | * Add updates from HTML5 Boilerplate 237 | * Remove well class from sidebar 238 | * Flush permalinks on activation to avoid 404s with clean URLs 239 | * Show proper classes on additional `wp_nav_menu()`'s 240 | * Clean up `inc/cleanup.php` 241 | * Remove old admin notice for tagline 242 | * Remove default tagline admin notice, hide from feed 243 | * Fix for duplicated classes in widget markup 244 | * Show title on custom post type archive template 245 | * Fix for theme preview in WordPress 3.3.2 246 | * Introduce `inc/config.php` with options for clean URLs, H5BP's `.htaccess`, root relative URLs, and Bootstrap features 247 | * Allow custom CSS classes in menus, walker cleanup 248 | * Remove WordPress version numbers from stylesheets 249 | * Don't include HTML5 Boilerplate's `style.css` by default 250 | * Allow `inc/htaccess.php` to work with Litespeed 251 | * Update to Bootstrap 2.0.4 252 | * Update Bulgarian translation 253 | * Don't use clean URLs with default permalink structure 254 | * Add translations for Catalan, Polish, Hungarian, Norwegian, Russian 255 | 256 | ### 5.1.0: April 14th, 2012 257 | * Various bugfixes for scripts, stylesheets, root relative URLs, clean URLs, and htaccess issues 258 | * Add a conditional feed link 259 | * Temporarily remove Gravity Forms customizations 260 | * Update to Bootstrap 2.0.2 261 | * Update `roots.pot` for translations 262 | * Add/update languages: Vietnamese, Swedish, Bulgarian, Turkish, Norwegian, Brazilian Portugese 263 | * Change widgets to use `
` instead of `
` 264 | * Add comment-reply.js 265 | * Remove optimized robots.txt 266 | * HTML5 Boilerplate, Modernizr, and jQuery updates 267 | 268 | ### 5.0.0: February 5th, 2012 269 | * Remove all frameworks except Bootstrap 270 | * Update to Bootstrap 2.0 271 | * Remove `roots-options.php` and replaced with a more simple `roots-config.php` 272 | * Now using Bootstrap markup on forms, page titles, image galleries, alerts and errors, post and comment navigation 273 | * Remove Roots styles from `style.css` and introduced `app.css` for site-specific CSS 274 | * Remove almost all previous default Roots styling 275 | * Latest updates from HTML5 Boilerplate 276 | 277 | ### 4.1.0: February 1st, 2012 278 | * Update translations 279 | * HTML5 Boilerplate updates 280 | * Fix for Server 500 errors 281 | * Add `roots-scripts.php`, now using `wp_enqueue_script` 282 | * Re-organize `roots-actions.php` 283 | * Allow `