Use Mix and sass, simplify image directories and remove duplicates
This commit is contained in:
parent
ad3bc4b0a2
commit
ff29fdeb71
216 changed files with 2921 additions and 1096 deletions
source
_includes
_posts
2014-05-21-git-format-patch.md2015-04-03-minimum-core-version.md2015-06-18-updating-forked-github-repos.md2015-07-21-automating-sculpin-with-jenkins.md2016-02-15-announcing-the-drupal-vm-generator.md2017-01-31-nginx-redirects-with-query-string-arguments.md2017-05-05-updating-override-node-options-tests.md2017-05-15-drupalcamp-bristol-tickets-sessions-sponsors.md2017-05-20-turning-your-custom-drupal-module-into-a-feature.md2017-06-09-introducing-the-drupal-meetups-twitterbot.md2017-07-13-publishing-sculpin-sites-with-github-pages.md2017-11-07-tdd-test-driven-drupal.md2018-01-30-drupalcamp-bristol-2018.md2018-02-05-using-tailwind-css-in-your-drupal-theme.md2018-02-27-queuing-private-messages-in-drupal-8.md2018-03-10-splitting-a-new-contrib-module-from-a-project-repo.md2018-05-06-creating-custom-docksal-commands.md
experience.html.twigtestimonials.html.twig
|
@ -1,26 +1,26 @@
|
|||
<div class="flex items-center md:block text-center">
|
||||
<div class="widget w-1/2 md:w-full">
|
||||
<a href="https://assoc.drupal.org/membership" title="I’m a Drupal Association member." class="block mb-4 px-4 md:px-0 lg:w-3/4 lg:mx-auto">
|
||||
<img src="{{ site.images_url }}/build/static/images/badges/da-individual-member.png" alt="Drupal Association Individual Member"/>
|
||||
<img src="{{ site.images_url }}/build/images/badges/da-individual-member.png" alt="Drupal Association Individual Member"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="widget w-1/2 md:w-full">
|
||||
<div class="mb-4 flex flex-wrap">
|
||||
<div class="w-full lg:w-1/2 leading-none px-4 md:px-0">
|
||||
<img src="{{ site.images_url }}/build/static/images/badges/acquia-d8-grand-master.png" alt="Acquia Certified Grand Master - Drupal 8 Exam Badge" />
|
||||
<img src="{{ site.images_url }}/build/images/badges/acquia-d8-grand-master.png" alt="Acquia Certified Grand Master - Drupal 8 Exam Badge" />
|
||||
</div>
|
||||
|
||||
<div class="w-full lg:w-1/2 leading-none px-4 md:px-0 hidden lg:block">
|
||||
<img src="{{ site.images_url }}/build/static/images/badges/acquia-d8-developer.png" alt="Acquia Certified Developer - Drupal 8 Exam Badge" />
|
||||
<img src="{{ site.images_url }}/build/images/badges/acquia-d8-developer.png" alt="Acquia Certified Developer - Drupal 8 Exam Badge" />
|
||||
</div>
|
||||
|
||||
<div class="w-full lg:w-1/2 leading-none px-4 md:px-0 hidden lg:block">
|
||||
<img src="{{ site.images_url }}/build/static/images/badges/acquia-d8-back-end.png" alt="Acquia Certified Back End Specialist - Drupal 8 Exam Badge" />
|
||||
<img src="{{ site.images_url }}/build/images/badges/acquia-d8-back-end.png" alt="Acquia Certified Back End Specialist - Drupal 8 Exam Badge" />
|
||||
</div>
|
||||
|
||||
<div class="w-full lg:w-1/2 leading-none px-4 md:px-0 hidden lg:block">
|
||||
<img src="{{ site.images_url }}/build/static/images/badges/acquia-d8-front-end.png" alt="Acquia Certified Front End Specialist - Drupal 8 Exam Badge" />
|
||||
<img src="{{ site.images_url }}/build/images/badges/acquia-d8-front-end.png" alt="Acquia Certified Front End Specialist - Drupal 8 Exam Badge" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{% for meetup in site.meetups %}
|
||||
<li>
|
||||
<a href="{{ meetup.url }}" title="{{ meetup.name }}" class="dib mr-4">
|
||||
<img src="{{ site.images_url }}/build/static/images/meetups/{{ meetup.logo }}" alt="{{ meetup.name }} logo" class="h-16">
|
||||
<img src="{{ site.images_url }}/build/images/meetups/{{ meetup.logo }}" alt="{{ meetup.name }} logo" class="h-16">
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
<div class="clearfix mt-4">
|
||||
<h2>About the Author</h2>
|
||||
|
||||
<img src="{{ site.images_url }}{{ site.avatar.url }}" alt="Picture of Oliver" class="about-author">
|
||||
<div class="flex items-center">
|
||||
<div class="mr-4 flex-none leading-none">
|
||||
<img
|
||||
src="{{ site.images_url }}{{ site.avatar.url }}"
|
||||
alt="Picture of Oliver"
|
||||
class="rounded-full w-16"
|
||||
>
|
||||
</div>
|
||||
|
||||
<p>Oliver Davies is a full-stack Web Developer and System Administrator based in the UK. He is a {{ site.work.role }} at <a href="{{ site.companies[site.work.company].url }}?utm_source={{ site.short_url }}&utm_medium=about-author">{{ site.companies[site.work.company].name }}</a> and a part-time freelancer specialising in Drupal, Symfony and Laravel development and Linux systems administration.</p>
|
||||
<p class="mb-0">Oliver Davies is a full-stack Web Developer and System Administrator based in the UK. He is a {{ site.work.role }} at <a href="{{ site.companies[site.work.company].url }}?utm_source={{ site.short_url }}&utm_medium=about-author">{{ site.companies[site.work.company].name }}</a> and a part-time freelancer specialising in Drupal, Symfony and Laravel development and Linux systems administration.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -31,7 +31,7 @@ This differs slightly different for each Drupal user, and the code can be found
|
|||
|
||||
If this is added to the end of the commit message, the resulting commit will show that it was committed by the maintainer but authored by a different user. This will then display on Drupal.org that you’ve made a commit to that project.
|
||||
|
||||

|
||||

|
||||
|
||||
The problem is that some project maintainers either don’t know about this option or occasionally forget to add it. [Dreditor](http://dreditor.org) can suggest a commit message and assign an author, but it is optional and, of course, not all maintainers use Dreditor (although they probably should).
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ dependencies[] = system (>=7.36)
|
|||
|
||||
Because we need to check for Drupal's core version, we're using the system module as the dependency and specifying that it needs to be either equal to or greater than 7.36. If this dependency is not met, e.g. Drupal 7.35 is being used, then the module cannot be enabled rather than showing a function not found error for `user_has_role()` when it is called.
|
||||
|
||||

|
||||

|
||||
|
||||
## External Links
|
||||
|
||||
|
|
|
@ -55,12 +55,12 @@ $ git push origin master
|
|||
This seems to have worked OK - the commits are still authored by the correct people and at the correct date and time - and I went ahead and created a new feature branch and pull request based on that master branch.
|
||||
|
||||
<figure>
|
||||
<img src="/build/static/images/blog/forked-github-repo-commits.png" alt="The commits on my master branch after rebasing">
|
||||
<img src="/build/images/blog/forked-github-repo-commits.png" alt="The commits on my master branch after rebasing">
|
||||
<figcaption>The commits on my forked master branch after rebasing and pushing. All good!</figcaption>
|
||||
</figure>
|
||||
|
||||
<figure>
|
||||
<img src="/build/static/images/blog/my-commit-to-the-rebased-branch.png" alt="The new feature branch with my additional commit.">
|
||||
<img src="/build/images/blog/my-commit-to-the-rebased-branch.png" alt="The new feature branch with my additional commit.">
|
||||
<figcaption>The new feature branch with the new commit.</figcaption>
|
||||
</figure>
|
||||
|
||||
|
@ -76,7 +76,7 @@ I believe that it will use an existing "upstream" remote if it exists, otherwise
|
|||
|
||||
Once you’ve completed the rebase, you can then push your updated branch either from the terminal, or using the *Push* command from the same menu.
|
||||
|
||||

|
||||

|
||||
|
||||
It would be great to see something similar added to [hub](https://hub.github.com) too (I’ve created [an issue](https://github.com/github/hub/issues/1047))!
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ As we don’t need any write access back to the repo, using the HTTP URL rather
|
|||
|
||||
Also, as I knew that I’d be working a lot with feature branches, I entered `*/master` as the only branch to build. This meant that pushing changes or making edits on any other branches would not trigger a build.
|
||||
|
||||

|
||||

|
||||
|
||||
I also checked the **Poll SCM** option so that Jenkins would be routinely checking for updated code. This essentially uses the same syntax as cron, specifying minutes, hours etc. I entered `* * * * *` so that Jenkins would poll each minute, knowing that I could make this less frequent if needed.
|
||||
|
||||
|
@ -92,7 +92,7 @@ After originally thinking that I'd have to split the build steps into a separate
|
|||
|
||||
I set this to `@daily` (the same `H H * * *` - `H` is a Jenkins thing), so that the build would be triggered automatically each day without a commit, and deploy any updates to the site.
|
||||
|
||||

|
||||

|
||||
|
||||
## Next Steps
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ For the past few weeks I’ve been working on a personal side project, based on
|
|||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||

|
||||

|
||||
|
||||
## What is Drupal VM?
|
||||
|
||||
|
@ -37,7 +37,7 @@ Based on the options passed to it and/or answers that you provide, it generates
|
|||
|
||||
Here’s an example of it in action:
|
||||
|
||||

|
||||

|
||||
|
||||
You can also define options when calling the command and skip any or all questions. Running the following would bypass all of the questions and create a new file with no interaction or additional steps.
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ return 301 https://www.example.com$uri$is_args$args;
|
|||
|
||||
Here is an demo of it working on this website:
|
||||
|
||||

|
||||

|
||||
|
||||
## Resources
|
||||
|
||||
|
|
|
@ -192,7 +192,7 @@ Override node options 213 passes, 0 fails, 0 exceptions, and 60 debug messages
|
|||
Test run duration: 25 sec
|
||||
```
|
||||
|
||||
<img src="/build/static/images/blog/override-node-options-refactor-tests-new-passing.png" alt="">
|
||||
<img src="/build/images/blog/override-node-options-refactor-tests-new-passing.png" alt="">
|
||||
|
||||
[Here][3] are my full changes from the previous patch, where I added the new tests as well as some small refactors.
|
||||
{% endblock %}
|
||||
|
|
|
@ -16,7 +16,7 @@ meta:
|
|||
slug: drupalcamp-bristol-early-bird-tickets-sessions-sponsors
|
||||
---
|
||||
{% block excerpt %}
|
||||
<p class="text-center" markdown="1"></p>
|
||||
<p class="text-center" markdown="1"></p>
|
||||
|
||||
In less than two months time, [DrupalCamp Bristol][0] will be back for our third year! (July seems to come around quicker each year). This is this year’s schedule and venues:
|
||||
{% endblock %}
|
||||
|
|
|
@ -25,7 +25,7 @@ features[features_api][] = api:2
|
|||
|
||||
After clearing the cache, the module is now visible in the Features list - and ready to have the appropriate configuration added to it.
|
||||
|
||||

|
||||

|
||||
{% endblock %}
|
||||
|
||||
[0]: https://www.drupal.org/project/features
|
||||
|
|
|
@ -5,7 +5,7 @@ tags:
|
|||
- php
|
||||
---
|
||||
{% block excerpt %}
|
||||
<p class="text-center" markdown="1"></p>
|
||||
<p class="text-center" markdown="1"></p>
|
||||
|
||||
The [Drupal Meetups Twitterbot][0] is a small project that I worked on a few months ago, but hadn't got around to promoting yet. It’s intention is to provide [one Twitter account][1] where people can get the up to date news from various Drupal meetups.
|
||||
{% endblock %}
|
||||
|
|
|
@ -5,13 +5,13 @@ meta:
|
|||
description: 'How I moved my Sculpin site to GitHub Pages.'
|
||||
og:
|
||||
image:
|
||||
url: '/build/static/images/blog/jackson-octocat.png'
|
||||
url: '/build/images/blog/jackson-octocat.png'
|
||||
type: 'image/png'
|
||||
height: 200
|
||||
width: 451
|
||||
---
|
||||
{% block excerpt %}
|
||||
<p class="text-center" markdown="1"></p>
|
||||
<p class="text-center" markdown="1"></p>
|
||||
|
||||
Earlier this week I moved this site from my personal Linode server to [GitHub Pages][0].
|
||||
|
||||
|
@ -24,7 +24,7 @@ I’ve seen different implementations of this, mostly where the Sculpin code is
|
|||
This has been made simpler and tidier now that we can use a `docs` directory within the repository to serve content.
|
||||
|
||||
<img
|
||||
src="/build/static/images/blog/github-pages.png"
|
||||
src="/build/images/blog/github-pages.png"
|
||||
alt=""
|
||||
class="is-centered"
|
||||
style="margin-top: 20px; margin-bottom: 20px"
|
||||
|
|
|
@ -9,13 +9,13 @@ meta:
|
|||
description: "How to write tests and follow TDD for Drupal applications."
|
||||
type: website
|
||||
image:
|
||||
url: /build/static/images/talks/test-driven-drupal-development.png
|
||||
url: /build/images/talks/test-driven-drupal-development.png
|
||||
width: 2560
|
||||
height: 1440
|
||||
type: image/png
|
||||
---
|
||||
{% block excerpt %}
|
||||
<p class="text-center" markdown="1"></p>
|
||||
<p class="text-center" markdown="1"></p>
|
||||
|
||||
I recently gave a [talk on automated testing in Drupal][0] talk at [DrupalCamp Dublin][1] and as a lunch and learn session for my colleagues at Microserve. As part of the talk, I gave an example of how to build a Drupal 8 module using a test driven approach. I’ve released the [module code on GitHub][2], and this post outlines the steps of the process.
|
||||
{% endblock %}
|
||||
|
@ -118,11 +118,11 @@ Now we can make it pass by adding the page. For this, I will use the Views modul
|
|||
|
||||
To begin with, I will create a view showing all types of content with a default sort order of newest first. We will use further tests to ensure that only the correct content is returned and that it is ordered correctly.
|
||||
|
||||
 { .with-border }
|
||||
 { .with-border }
|
||||
|
||||
The only addition I will make to the view is to add a path at `pages`, as per the acceptance criteria.
|
||||
|
||||
 { .with-border }
|
||||
 { .with-border }
|
||||
|
||||
### Exporting the View
|
||||
|
||||
|
@ -457,7 +457,7 @@ Tests: 1, Assertions: 3, Failures: 1.
|
|||
|
||||
We can fix this by adding another condition to the view, to only show content based on the node type - i.e. only return page nodes.
|
||||
|
||||
 { .with-border }
|
||||
 { .with-border }
|
||||
|
||||
Once the view is updated and the configuration is updated within the module, the test should then pass - and it does.
|
||||
|
||||
|
@ -546,7 +546,7 @@ Tests: 1, Assertions: 2, Failures: 1.
|
|||
|
||||
This can be fixed by removing the default sort criteria and adding a new one based on "Content: Title".
|
||||
|
||||
 { .with-border }
|
||||
 { .with-border }
|
||||
|
||||
Again, once the view has been updated and exported, the test should pass - and it does.
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ meta:
|
|||
description: 'It’s with heavy hearts that we are announcing there won’t be a DrupalCamp Bristol 2018.'
|
||||
type: website
|
||||
image:
|
||||
url: /build/static/images/blog/drupalcamp-bristol-17-logo.jpg
|
||||
url: /build/images/blog/drupalcamp-bristol-17-logo.jpg
|
||||
width: 228
|
||||
height: 448
|
||||
type: image/img
|
||||
|
|
|
@ -58,11 +58,11 @@ By adding a prefix like `tw-`, we can ensure that the Tailwind classes don’t c
|
|||
|
||||
No prefix:
|
||||
|
||||
{.with-border}
|
||||
{.with-border}
|
||||
|
||||
With prefix:
|
||||
|
||||
{.with-border}
|
||||
{.with-border}
|
||||
|
||||
### Important
|
||||
|
||||
|
@ -78,11 +78,11 @@ For example: if I had this core markup then the left margin added by `tw-ml-4` w
|
|||
</div>
|
||||
```
|
||||
|
||||
{.with-border}
|
||||
{.with-border}
|
||||
|
||||
With the `!important` rule enabled though, the Tailwind’s class takes precedence and is applied.
|
||||
|
||||
{.with-border}
|
||||
{.with-border}
|
||||
|
||||
## Example
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ $queuer->queue($recipients, $message, $owner);
|
|||
|
||||
These three pieces of data are then saved as part of the queued item. You can see these by checking the "queue" table in the database or by running `drush queue-list`.
|
||||
|
||||

|
||||

|
||||
|
||||
```
|
||||
$ drush queue-list
|
||||
|
|
|
@ -112,7 +112,7 @@ In this case, the new branch will be `8.x-1.x`.
|
|||
|
||||
Here is a screenshot of example module that I’ve split and pushed to GitLab. Notice that there are multiple commits in the history, and each still attributed to it’s original author.
|
||||
|
||||

|
||||

|
||||
|
||||
Also, as this is standard Git functionality, you can follow the same process to extract PHP libraries, Symfony bundles, WordPress plugins or anything else.
|
||||
{% endblock %}
|
||||
|
|
|
@ -58,7 +58,7 @@ touch .docksal/commands/phpunit
|
|||
|
||||
This will create a new, empty `.docksal/commands/phpunit` file, and now the `phpunit` command is now listed under "Custom commands" when we run `fin`.
|
||||
|
||||

|
||||

|
||||
|
||||
You can write commands with any interpreter. I’m going to use bash, so I’ll add the shebang to the top of the file.
|
||||
|
||||
|
@ -83,7 +83,7 @@ fin interprets lines starting with `##` as documentation - the first of which it
|
|||
|
||||
Now when I run it, I see the new description.
|
||||
|
||||

|
||||

|
||||
|
||||
Any additional lines are used as help text with running `fin help phpunit`. Here I’ll add an example command to demonstrate how to run it as well as some more in-depth text about what the command will do.
|
||||
|
||||
|
@ -100,7 +100,7 @@ Any additional lines are used as help text with running `fin help phpunit`. Here
|
|||
|
||||
Now when I run `fin help phpunit`, I see the new help text.
|
||||
|
||||

|
||||

|
||||
|
||||
## Adding some content
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ experiences:
|
|||
<div class="mb-8">
|
||||
{% if company.logo %}
|
||||
<div class="float-right mt-2 mb-4 ml-4 w-16 sm:w-24 lg:w-32">
|
||||
<img src="{{ site.images_url }}/build/static/images/experience/{{ company.logo }}" alt="{{ company.name }} logo">
|
||||
<img src="{{ site.images_url }}/build/images/experience/{{ company.logo }}" alt="{{ company.name }} logo">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -72,9 +72,11 @@ testimonials:
|
|||
<article class="listing-item">
|
||||
{% if testimonial.image %}
|
||||
<div class="float-right mb-4 ml-4">
|
||||
<img src="{{ site.url }}/build/static/images/testimonials/{{ testimonial.image }}"
|
||||
alt="{{ testimonial.name }}"
|
||||
class="testimonial-image">
|
||||
<img
|
||||
src="{{ site.url }}/build/images/testimonials/{{ testimonial.image }}"
|
||||
alt="{{ testimonial.name }}"
|
||||
class="rounded-full w-24 h-24"
|
||||
>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue