{{post.title}}
4 |{{ post.excerpt }}
5 | {% if post.thumbnail %} 6 |├── www ├── mu-plugins │ ├── .gitkeep │ ├── bedrock-autoloader.php │ ├── ecocide.php │ └── bedrock-site-health-tests.php ├── plugins │ └── .gitkeep ├── uploads │ └── .gitkeep ├── themes │ └── boilerplate-theme │ │ ├── assets │ │ └── .gitkeep │ │ ├── static │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── no-timber.html │ │ └── site.webmanifest │ │ ├── views │ │ ├── partial │ │ │ ├── footer.twig │ │ │ ├── header.twig │ │ │ ├── menu.twig │ │ │ └── pagination.twig │ │ ├── front-page.twig │ │ ├── 404.twig │ │ ├── page-plugin.twig │ │ ├── author.twig │ │ ├── archive.twig │ │ ├── tease-post.twig │ │ ├── tease.twig │ │ ├── layout │ │ │ ├── site-header.twig │ │ │ └── base.twig │ │ ├── page.twig │ │ ├── single-password.twig │ │ ├── search.twig │ │ ├── comment.twig │ │ ├── index.twig │ │ ├── single.twig │ │ ├── comment-form.twig │ │ └── snippet │ │ │ ├── button.twig │ │ │ └── image.twig │ │ ├── theme │ │ ├── screenshot.png │ │ ├── style.css │ │ ├── front-page.php │ │ ├── 404.php │ │ ├── search.php │ │ ├── header.php │ │ ├── author.php │ │ ├── single.php │ │ ├── functions.php │ │ ├── index.php │ │ ├── footer.php │ │ ├── page.php │ │ └── archive.php │ │ ├── includes │ │ ├── Transformer │ │ │ ├── AbstractTransformer.php │ │ │ └── Content │ │ │ │ └── ContentBlock.php │ │ ├── Template │ │ │ ├── Template.php │ │ │ └── AbstractTemplate.php │ │ ├── Traits │ │ │ └── HasContentBlocksTrait.php │ │ ├── Support │ │ │ └── Path.php │ │ └── Site.php │ │ └── phpcs.xml.dist ├── index.php ├── wp-config.php └── wp-ajax.php ├── CHANGELOG.md ├── wp-cli.example.yml ├── wp-cli.yml ├── tools └── patches │ ├── composer.patches.json │ └── timber │ └── timber │ └── 2.0 │ ├── 2733-fix-theme-location-compatibility-with-wpml.patch │ └── 2725-fix-theme-path-parsing-for-image-generation.patch ├── config ├── environments │ ├── staging.php │ └── development.php └── application.php ├── CONTRIBUTING.md ├── .gitignore ├── bin └── fix-wp-stubs.sh ├── .env.example ├── composer.json └── README.md /www/mu-plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/uploads/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/static/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/views/partial/footer.twig: -------------------------------------------------------------------------------- 1 | {# Footer #} -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/views/partial/header.twig: -------------------------------------------------------------------------------- 1 | {# Navigation & Logo #} -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## Unreleased 4 | 5 | ## 1.0.0 — TBD 6 | 7 | - Initial release 8 | -------------------------------------------------------------------------------- /wp-cli.example.yml: -------------------------------------------------------------------------------- 1 | url: https://localhost/ 2 | 3 | apache_modules: 4 | - mod_rewrite 5 | 6 | _: 7 | merge: true 8 | inherit: wp-cli.yml 9 | -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/views/front-page.twig: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.twig" %} 2 | 3 | {% block content %} 4 |
Timber not activated
9 | 10 | 11 | -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/views/author.twig: -------------------------------------------------------------------------------- 1 | {% extends "layout/base.twig" %} 2 | 3 | {% block content %} 4 | {% for post in posts %} 5 | {% include ["tease-"~post.post_type~".twig", "tease.twig"] %} 6 | {% endfor %} 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/theme/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Theme Name: Boilerplate (2023) 3 | * Description: A bespoke theme for Locomotive Boilerplate. 4 | * Author: Locomotive Inc. 5 | * Author URI: https://locomotive.ca 6 | */ -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/views/archive.twig: -------------------------------------------------------------------------------- 1 | {# This file demonstrates using most of the index.twig template and modifying 2 | just a small part. See `search.twig` for an example of another approach #} 3 | 4 | {% extends "index.twig" %} 5 | 6 | {% block content %} 7 |{{ post.excerpt({ words:5, read_more: "Keep reading" }) }}
6 | {% if post.thumbnail.src %} 7 |{{ post.excerpt }}
5 | {% if post.thumbnail %} 6 |{{ qux }}
6 | {% for post in posts %} 7 | {% include ['tease-'~post.post_type~'.twig', 'tease.twig'] %} 8 | {% endfor %} 9 | 10 |Lorem ipsum dolor sit amet consectetur adipisicing elit. Nisi reiciendis alias aspernatur mollitia commodi. Soluta, sint corrupti quaerat cum aspernatur nostrum tempore ad, eveniet animi voluptatibus fugiat qui laboriosam debitis.
14 |comments for this post are closed
32 | {% else %} 33 | 34 | {% include "comment-form.twig" %} 35 | {% endif %} 36 |%s
', 74 | __( 'This site is under version control. Updates are managed by Composer.' ) 75 | ); 76 | 77 | if ( 78 | isset( $result['description'] ) && 79 | is_string( $result['description'] ) 80 | ) { 81 | $description .= sprintf( 82 | '%s', 83 | $result['description'] 84 | ); 85 | } 86 | 87 | return array_replace( $result, [ 88 | 'label' => __( 'Background updates are disabled by Bedrock' ), 89 | 'status' => 'good', 90 | 'description' => $description, 91 | ] ); 92 | } 93 | -------------------------------------------------------------------------------- /www/themes/boilerplate-theme/views/snippet/image.twig: -------------------------------------------------------------------------------- 1 | {# 2 | Image snippet 3 | 4 | The `img` parameter was made to receive formatted data from a CMS. 5 | The use case would be to output an image without overriding is dimensions or other properties. 6 | 7 | It needs to be an object with the following keys : 8 | -src: String, 9 | -width: Int, 10 | -height: Int, 11 | -alt?: String, 12 | -caption?: String 13 | 14 | ```twig 15 | {% include 'image' with 16 | img: project.featured_image 17 | %} 18 | ``` 19 | #} 20 | 21 | {# Defaults #} 22 | {% set _width = img.width | default(1) %} 23 | {% set _height = img.height | default(1) %} 24 | {% set _src = img.src | default(null) %} 25 | {% set _alt = img.alt | default(null) %} 26 | {% set _caption = img.caption | default(null) %} 27 | 28 | {# Override properties #} 29 | {% set _width = width | default(_width) %} 30 | {% set _height = height | default(_height) %} 31 | {% set _src = src | default(_src) %} 32 | {% set _alt = alt | default(_alt) %} 33 | {% set _caption = caption | default(_caption) %} 34 | 35 | {# Misc. #} 36 | {% set _is_figure = is_figure | default(false) %} 37 | {% set _is_lazy_load = is_lazy_load | default(null) %} 38 | {% set _has_border_radius = has_border_radius | default(null) %} 39 | {% set _tag = _is_figure ? 'figure' : 'div' %} 40 | 41 | {# Classes & modifiers #} 42 | {% set _classes = classes | default(null) %} 43 | {% set _modifiers = modifiers | default(null) %} 44 | 45 | {% if _is_lazy_load %} 46 | {% set _modifiers = _modifiers ~ ' -lazy-load' %} 47 | {% endif %} 48 | 49 | {% if _has_border_radius %} 50 | {% set _modifiers = _modifiers ~ ' -border-radius' %} 51 | {% endif %} 52 | 53 | {% if _classes != null %} 54 | {% set _classes = ' ' ~ _classes %} 55 | {% endif %} 56 | 57 | {% if _modifiers != null %} 58 | {% set _classes = ' ' ~ _modifiers ~ ' ' ~ _classes %} 59 | {% endif %} 60 | 61 | {# ---------------------------------------- #} 62 | 63 | <{{_tag}} class="c-image{{ _classes }}"> 64 |