├── .gitignore ├── 404.twig ├── CHANGELOG.md ├── RoboFile.php ├── comments.twig ├── composer.json ├── composer.lock ├── functions.php ├── index.php ├── index.twig ├── php ├── class-breadcrumb.php ├── class-comments.php ├── class-core.php ├── class-gallery.php ├── class-loop-pagination.php ├── class-nav-list-menu-widget.php ├── class-navbar.php ├── class-post-pagination.php ├── class-theme.php ├── class-walker-navbar-menu.php └── template-tags.php ├── single-post.twig ├── single.twig ├── style.css ├── style.less └── twig └── navbar.twig /.gitignore: -------------------------------------------------------------------------------- 1 | vendor -------------------------------------------------------------------------------- /404.twig: -------------------------------------------------------------------------------- 1 | {% extends 'index.twig' %} 2 | 3 | {% block loop %} 4 |
5 | 6 |
7 |

{{ _e( 'Nothing found', 'hybrid-wing' )}}

8 |
9 | 10 |
11 | {{ wpautop( __( 'Apologies, but no entries were found.', 'hybrid-wing' ) )}} 12 |
13 | 14 |
15 | {% endblock %} -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 6 | 7 | ## 0.1 - 2017-05-30 8 | 9 | ### Added 10 | - last Hybrid Core v3, Bootstrap v3 state. -------------------------------------------------------------------------------- /RoboFile.php: -------------------------------------------------------------------------------- 1 | taskWatch()->monitor( 'style.less', function() { 16 | $this->less(); 17 | } )->run(); 18 | } 19 | 20 | /** 21 | * Compiles stylesheet from less into css. 22 | */ 23 | public function less() { 24 | 25 | $this->taskExec('lessc style.less style.css')->run(); 26 | } 27 | } -------------------------------------------------------------------------------- /comments.twig: -------------------------------------------------------------------------------- 1 | {% if not post_password_required() and ( have_comments() or comments_open() or pings_open() ) %} 2 | 3 | {% block comments_template %} 4 |
5 | {% if have_comments() %} 6 |

{{ comments_number() }}

7 | 8 | {% block comment_list %} 9 | 33 | {% endblock %} 34 | 35 | {% block comment_navigation %} 36 |
37 | {{ hw_paginate_comments_links() }} 38 |
39 | {% endblock %} 40 | {% endif %} 41 | 42 | {% block comments_closed %} 43 | {% if not comments_open() %} 44 |

45 | {{ _e( 'Comments are closed.', 'hybrid-wing' ) }} 46 |

47 | {% endif %} 48 | {% endblock %} 49 | 50 | {% block comment_form %} 51 | {{ comment_form() }} 52 | {% endblock %} 53 | 54 |
55 | {% endblock %} 56 | 57 | {% endif %} -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "rarst/hybrid-wing", 3 | "description": "Toolkit theme for WordPress, based on Hybrid Core and Twitter Bootstrap.", 4 | "keywords" : ["wordpress", "bootstrap", "hybrid"], 5 | "type" : "wordpress-theme", 6 | "homepage" : "https://github.com/Rarst/hybrid-wing", 7 | "license" : "GPL-3.0-or-later", 8 | "authors" : [ 9 | { 10 | "name" : "Andrey Savchenko", 11 | "homepage": "https://www.Rarst.net/" 12 | } 13 | ], 14 | "support" : { 15 | "issues": "https://github.com/Rarst/hybrid-wing/issues" 16 | }, 17 | "require" : { 18 | "php" : ">=5.3", 19 | "composer/installers" : "~1.0", 20 | "justintadlock/hybrid-core": "^3.0", 21 | "rarst/locate-vendor" : "~1.0", 22 | "twbs/bootstrap" : "~3.0", 23 | "pimple/pimple" : "~3.0", 24 | "rarst/meadow" : "^0.2" 25 | }, 26 | "autoload" : { 27 | "classmap": ["php/"], 28 | "files" : ["php/template-tags.php"] 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "f87bd1dd4a77fa9b659399168eb68c02", 8 | "packages": [ 9 | { 10 | "name": "composer/installers", 11 | "version": "v1.3.0", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/composer/installers.git", 15 | "reference": "79ad876c7498c0bbfe7eed065b8651c93bfd6045" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/composer/installers/zipball/79ad876c7498c0bbfe7eed065b8651c93bfd6045", 20 | "reference": "79ad876c7498c0bbfe7eed065b8651c93bfd6045", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "composer-plugin-api": "^1.0" 25 | }, 26 | "replace": { 27 | "roundcube/plugin-installer": "*", 28 | "shama/baton": "*" 29 | }, 30 | "require-dev": { 31 | "composer/composer": "1.0.*@dev", 32 | "phpunit/phpunit": "4.1.*" 33 | }, 34 | "type": "composer-plugin", 35 | "extra": { 36 | "class": "Composer\\Installers\\Plugin", 37 | "branch-alias": { 38 | "dev-master": "1.0-dev" 39 | } 40 | }, 41 | "autoload": { 42 | "psr-4": { 43 | "Composer\\Installers\\": "src/Composer/Installers" 44 | } 45 | }, 46 | "notification-url": "https://packagist.org/downloads/", 47 | "license": [ 48 | "MIT" 49 | ], 50 | "authors": [ 51 | { 52 | "name": "Kyle Robinson Young", 53 | "email": "kyle@dontkry.com", 54 | "homepage": "https://github.com/shama" 55 | } 56 | ], 57 | "description": "A multi-framework Composer library installer", 58 | "homepage": "https://composer.github.io/installers/", 59 | "keywords": [ 60 | "Craft", 61 | "Dolibarr", 62 | "Eliasis", 63 | "Hurad", 64 | "ImageCMS", 65 | "Kanboard", 66 | "MODX Evo", 67 | "Mautic", 68 | "Maya", 69 | "OXID", 70 | "Plentymarkets", 71 | "Porto", 72 | "RadPHP", 73 | "SMF", 74 | "Thelia", 75 | "WolfCMS", 76 | "agl", 77 | "aimeos", 78 | "annotatecms", 79 | "attogram", 80 | "bitrix", 81 | "cakephp", 82 | "chef", 83 | "cockpit", 84 | "codeigniter", 85 | "concrete5", 86 | "croogo", 87 | "dokuwiki", 88 | "drupal", 89 | "elgg", 90 | "expressionengine", 91 | "fuelphp", 92 | "grav", 93 | "installer", 94 | "itop", 95 | "joomla", 96 | "kohana", 97 | "laravel", 98 | "lavalite", 99 | "lithium", 100 | "magento", 101 | "mako", 102 | "mediawiki", 103 | "modulework", 104 | "moodle", 105 | "phpbb", 106 | "piwik", 107 | "ppi", 108 | "puppet", 109 | "reindex", 110 | "roundcube", 111 | "shopware", 112 | "silverstripe", 113 | "sydes", 114 | "symfony", 115 | "typo3", 116 | "wordpress", 117 | "yawik", 118 | "zend", 119 | "zikula" 120 | ], 121 | "time": "2017-04-24T06:37:16+00:00" 122 | }, 123 | { 124 | "name": "justintadlock/hybrid-core", 125 | "version": "3.0.0", 126 | "source": { 127 | "type": "git", 128 | "url": "https://github.com/justintadlock/hybrid-core.git", 129 | "reference": "80bd6ee4e1b38239dac17be9dfb2efa0a3071daf" 130 | }, 131 | "dist": { 132 | "type": "zip", 133 | "url": "https://api.github.com/repos/justintadlock/hybrid-core/zipball/80bd6ee4e1b38239dac17be9dfb2efa0a3071daf", 134 | "reference": "80bd6ee4e1b38239dac17be9dfb2efa0a3071daf", 135 | "shasum": "" 136 | }, 137 | "type": "library", 138 | "autoload": { 139 | "classmap": [ 140 | "hybrid.php" 141 | ] 142 | }, 143 | "notification-url": "https://packagist.org/downloads/", 144 | "license": [ 145 | "GPL-2.0+" 146 | ], 147 | "authors": [ 148 | { 149 | "name": "Justin Tadlock", 150 | "email": "justin@justintadlock.com", 151 | "homepage": "http://justintadlock.com" 152 | } 153 | ], 154 | "description": "Hybrid Core WordPress theme framework", 155 | "homepage": "http://themehybrid.com/hybrid-core", 156 | "keywords": [ 157 | "wordpress" 158 | ], 159 | "time": "2015-08-17T21:31:12+00:00" 160 | }, 161 | { 162 | "name": "pimple/pimple", 163 | "version": "v3.0.2", 164 | "source": { 165 | "type": "git", 166 | "url": "https://github.com/silexphp/Pimple.git", 167 | "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a" 168 | }, 169 | "dist": { 170 | "type": "zip", 171 | "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a30f7d6e57565a2e1a316e1baf2a483f788b258a", 172 | "reference": "a30f7d6e57565a2e1a316e1baf2a483f788b258a", 173 | "shasum": "" 174 | }, 175 | "require": { 176 | "php": ">=5.3.0" 177 | }, 178 | "type": "library", 179 | "extra": { 180 | "branch-alias": { 181 | "dev-master": "3.0.x-dev" 182 | } 183 | }, 184 | "autoload": { 185 | "psr-0": { 186 | "Pimple": "src/" 187 | } 188 | }, 189 | "notification-url": "https://packagist.org/downloads/", 190 | "license": [ 191 | "MIT" 192 | ], 193 | "authors": [ 194 | { 195 | "name": "Fabien Potencier", 196 | "email": "fabien@symfony.com" 197 | } 198 | ], 199 | "description": "Pimple, a simple Dependency Injection Container", 200 | "homepage": "http://pimple.sensiolabs.org", 201 | "keywords": [ 202 | "container", 203 | "dependency injection" 204 | ], 205 | "time": "2015-09-11T15:10:35+00:00" 206 | }, 207 | { 208 | "name": "rarst/locate-vendor", 209 | "version": "1.0.1", 210 | "source": { 211 | "type": "git", 212 | "url": "https://github.com/Rarst/locate-vendor.git", 213 | "reference": "dad288d667c21d5b6269b5ab1bd225cc37ac0f59" 214 | }, 215 | "dist": { 216 | "type": "zip", 217 | "url": "https://api.github.com/repos/Rarst/locate-vendor/zipball/dad288d667c21d5b6269b5ab1bd225cc37ac0f59", 218 | "reference": "dad288d667c21d5b6269b5ab1bd225cc37ac0f59", 219 | "shasum": "" 220 | }, 221 | "require": { 222 | "php": ">=5.3" 223 | }, 224 | "type": "library", 225 | "autoload": { 226 | "classmap": [ 227 | "class-locate-vendor.php" 228 | ] 229 | }, 230 | "notification-url": "https://packagist.org/downloads/", 231 | "license": [ 232 | "MIT" 233 | ], 234 | "authors": [ 235 | { 236 | "name": "Andrey Savchenko", 237 | "email": "contact@rarst.net", 238 | "homepage": "http://www.Rarst.net/" 239 | } 240 | ], 241 | "description": "Experimental helper for vendor directory location in Composer", 242 | "homepage": "https://bitbucket.org/Rarst/locate-vendor", 243 | "keywords": [ 244 | "composer" 245 | ], 246 | "time": "2013-07-19T13:14:59+00:00" 247 | }, 248 | { 249 | "name": "rarst/meadow", 250 | "version": "0.2", 251 | "source": { 252 | "type": "git", 253 | "url": "https://github.com/Rarst/meadow.git", 254 | "reference": "9148b5add079858901a6ccb03b0e92e8d6952844" 255 | }, 256 | "dist": { 257 | "type": "zip", 258 | "url": "https://api.github.com/repos/Rarst/meadow/zipball/9148b5add079858901a6ccb03b0e92e8d6952844", 259 | "reference": "9148b5add079858901a6ccb03b0e92e8d6952844", 260 | "shasum": "" 261 | }, 262 | "require": { 263 | "php": ">=5.4", 264 | "pimple/pimple": "~3.0", 265 | "twig/twig": "^1.28.2" 266 | }, 267 | "type": "library", 268 | "autoload": { 269 | "classmap": [ 270 | "php/" 271 | ] 272 | }, 273 | "notification-url": "https://packagist.org/downloads/", 274 | "license": [ 275 | "MIT" 276 | ], 277 | "authors": [ 278 | { 279 | "name": "Andrey Savchenko", 280 | "email": "contact@rarst.net", 281 | "homepage": "http://www.Rarst.net/" 282 | } 283 | ], 284 | "description": "WordPress templating DSL", 285 | "homepage": "https://github.com/Rarst/meadow", 286 | "keywords": [ 287 | "twig", 288 | "wordpress" 289 | ], 290 | "time": "2016-12-10T21:11:05+00:00" 291 | }, 292 | { 293 | "name": "twbs/bootstrap", 294 | "version": "v3.3.7", 295 | "source": { 296 | "type": "git", 297 | "url": "https://github.com/twbs/bootstrap.git", 298 | "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" 299 | }, 300 | "dist": { 301 | "type": "zip", 302 | "url": "https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86", 303 | "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86", 304 | "shasum": "" 305 | }, 306 | "replace": { 307 | "twitter/bootstrap": "self.version" 308 | }, 309 | "type": "library", 310 | "extra": { 311 | "branch-alias": { 312 | "dev-master": "3.3.x-dev" 313 | } 314 | }, 315 | "notification-url": "https://packagist.org/downloads/", 316 | "license": [ 317 | "MIT" 318 | ], 319 | "authors": [ 320 | { 321 | "name": "Jacob Thornton", 322 | "email": "jacobthornton@gmail.com" 323 | }, 324 | { 325 | "name": "Mark Otto", 326 | "email": "markdotto@gmail.com" 327 | } 328 | ], 329 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 330 | "homepage": "http://getbootstrap.com", 331 | "keywords": [ 332 | "JS", 333 | "css", 334 | "framework", 335 | "front-end", 336 | "less", 337 | "mobile-first", 338 | "responsive", 339 | "web" 340 | ], 341 | "time": "2016-07-25T15:51:55+00:00" 342 | }, 343 | { 344 | "name": "twig/twig", 345 | "version": "v1.33.2", 346 | "source": { 347 | "type": "git", 348 | "url": "https://github.com/twigphp/Twig.git", 349 | "reference": "dd6ca96227917e1e85b41c7c3cc6507b411e0927" 350 | }, 351 | "dist": { 352 | "type": "zip", 353 | "url": "https://api.github.com/repos/twigphp/Twig/zipball/dd6ca96227917e1e85b41c7c3cc6507b411e0927", 354 | "reference": "dd6ca96227917e1e85b41c7c3cc6507b411e0927", 355 | "shasum": "" 356 | }, 357 | "require": { 358 | "php": ">=5.2.7" 359 | }, 360 | "require-dev": { 361 | "psr/container": "^1.0", 362 | "symfony/debug": "~2.7", 363 | "symfony/phpunit-bridge": "~3.3@dev" 364 | }, 365 | "type": "library", 366 | "extra": { 367 | "branch-alias": { 368 | "dev-master": "1.33-dev" 369 | } 370 | }, 371 | "autoload": { 372 | "psr-0": { 373 | "Twig_": "lib/" 374 | } 375 | }, 376 | "notification-url": "https://packagist.org/downloads/", 377 | "license": [ 378 | "BSD-3-Clause" 379 | ], 380 | "authors": [ 381 | { 382 | "name": "Fabien Potencier", 383 | "email": "fabien@symfony.com", 384 | "homepage": "http://fabien.potencier.org", 385 | "role": "Lead Developer" 386 | }, 387 | { 388 | "name": "Armin Ronacher", 389 | "email": "armin.ronacher@active-4.com", 390 | "role": "Project Founder" 391 | }, 392 | { 393 | "name": "Twig Team", 394 | "homepage": "http://twig.sensiolabs.org/contributors", 395 | "role": "Contributors" 396 | } 397 | ], 398 | "description": "Twig, the flexible, fast, and secure template language for PHP", 399 | "homepage": "http://twig.sensiolabs.org", 400 | "keywords": [ 401 | "templating" 402 | ], 403 | "time": "2017-04-20T17:39:48+00:00" 404 | } 405 | ], 406 | "packages-dev": [], 407 | "aliases": [], 408 | "minimum-stability": "stable", 409 | "stability-flags": [], 410 | "prefer-stable": false, 411 | "prefer-lowest": false, 412 | "platform": { 413 | "php": ">=5.3" 414 | }, 415 | "platform-dev": [] 416 | } 417 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | load(); -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% block head %} 5 | 6 | 7 | 8 | 9 | 10 | 11 | {{ wp_head() }} 12 | {% endblock %} 13 | 14 | 15 | 16 | 17 | {% block container %} 18 |
19 | 20 | {% block header %} 21 | 25 | {% endblock %} 26 | 27 | {% block main %} 28 |
29 | 30 | {% block breadcrumb %} 31 |
32 | {{ breadcrumb_trail() }} 33 |
34 | {% endblock %} 35 | 36 | {% block content %} 37 |
38 | 39 | {% block loop %} 40 | {% loop %} 41 |
42 | 43 | {% block entry_header %} 44 |
45 | {% if is_singular() %} 46 |

{{ single_post_title() }}

47 | {% else %} 48 |

49 | {% endif %} 50 |
51 | {% endblock %} 52 | 53 | {% block entry_content %} 54 |
55 | {{ the_content( sprintf( __( 'Continue reading %1$s', 'hybrid-wing' ), the_title( ' "', '"', false ) ) ) }} 56 | {{ wp_link_pages() }} 57 |
58 | {% endblock %} 59 | 60 |
61 | 62 | {# TODO else {{ get_template_part( 'loop-error' ) }} #} 63 | {% endloop %} 64 | {% endblock loop %} 65 | 66 | {% if is_singular() %} 67 | {{ comments_template() }} 68 | {% endif %} 69 | 70 | {% block loop_nav hw_posts_pagination() %} 71 |
72 | {% endblock content %} 73 | 74 | {% block sidebar %} 75 | {% if ( is_active_sidebar( 'primary' ) ) %} 76 | 79 | {% endif %} 80 | {% endblock %} 81 | 82 |
83 | {% endblock main %} 84 | 85 | {% block footer %} 86 | 89 | {% endblock %} 90 |
91 | {% endblock container %} 92 | 93 | {{ wp_footer() }} 94 | 95 | -------------------------------------------------------------------------------- /php/class-breadcrumb.php: -------------------------------------------------------------------------------- 1 | $item ) { 41 | $items[$key] = '
  • ' . $item . '
  • '; 42 | } 43 | 44 | $items[] = '
  • ' . $last . '
  • '; 45 | 46 | return $items; 47 | } 48 | 49 | public function breadcrumb_trail( $breadcrumb ) { 50 | 51 | $breadcrumb = strtr( 52 | $breadcrumb, 53 | array( 54 | 'class="breadcrumb-trail ' => 'class="breadcrumb-trail breadcrumb ', 55 | '/' => '', 56 | '' => '', 57 | '' => '', 58 | '' => '', 59 | ) 60 | ); 61 | 62 | return $breadcrumb; 63 | } 64 | } -------------------------------------------------------------------------------- /php/class-comments.php: -------------------------------------------------------------------------------- 1 | $field ) { 64 | $defaults['fields'][$key] = $this->make_comment_field_horizontal( $field ); 65 | } 66 | 67 | $defaults['comment_field'] = $this->make_comment_field_horizontal( $defaults['comment_field'] ); 68 | $defaults['logged_in_as'] = $this->make_comment_notes_help_block( $defaults['logged_in_as'] ); 69 | $defaults['comment_notes_before'] = $this->make_comment_notes_help_block( $defaults['comment_notes_before'] ); 70 | $defaults['comment_notes_after'] = $this->make_comment_notes_help_block( $defaults['comment_notes_after'] ); 71 | 72 | return $defaults; 73 | } 74 | 75 | /** 76 | * Rewrite markup to strip paragraph and wrap in horizontal form block markup. 77 | * 78 | * @param string $field 79 | * 80 | * @return string 81 | */ 82 | function make_comment_field_horizontal( $field ) { 83 | 84 | $field = preg_replace( '|

    |', '

    ', $field ); 85 | 86 | $field = strtr( 87 | $field, 88 | array( 89 | ' '