commit
8f1efcdba2
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -3,3 +3,4 @@
|
|||
/output_*/
|
||||
/source/dist/
|
||||
/vendor/
|
||||
/.phpunit.result.cache
|
||||
|
|
14
.php_cs.dist
Normal file
14
.php_cs.dist
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
use PhpCsFixer\Config;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
$finder = new Finder();
|
||||
$finder->files()->in('src')->in('src');
|
||||
|
||||
return Config::create()
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
])
|
||||
->setFinder($finder);
|
14
app/SculpinKernel.php
Normal file
14
app/SculpinKernel.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
use App\Speakers\SculpinSpeakersBundle;
|
||||
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
|
||||
|
||||
class SculpinKernel extends AbstractKernel
|
||||
{
|
||||
protected function getAdditionalSculpinBundles(): array
|
||||
{
|
||||
return [
|
||||
SculpinSpeakersBundle::class,
|
||||
];
|
||||
}
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
sculpin_content_types:
|
||||
sessions:
|
||||
permalink: /sessions/:basename/
|
||||
speakers:
|
||||
permalink: /speakers/:title/
|
||||
posts:
|
||||
enabled: false
|
||||
|
|
|
@ -10,12 +10,34 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"sculpin/sculpin": "^3"
|
||||
"sculpin/sculpin": "^3",
|
||||
"tightenco/collect": "^5.8",
|
||||
"josephlavin/tap": "^1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "composer run-script generate",
|
||||
"generate": "sculpin generate --clean --no-interaction",
|
||||
"lint": "php-cs-fixer fix",
|
||||
"prod": "composer run-script generate -- --env prod",
|
||||
"test": [
|
||||
"composer run test:unit",
|
||||
"composer run lint"
|
||||
],
|
||||
"test:unit": "phpunit",
|
||||
"watch": "composer run-script --timeout=0 generate -- --server --watch"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\Speakers\\": "src/Speakers/src"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"App\\Tests\\Speakers\\": "src/Speakers/tests"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.15",
|
||||
"phpunit/phpunit": "^8.1"
|
||||
}
|
||||
}
|
||||
|
|
2269
composer.lock
generated
2269
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,6 @@
|
|||
[build]
|
||||
command = """
|
||||
composer test
|
||||
composer prod
|
||||
yarn prod
|
||||
cp -R source/dist output_prod
|
||||
|
|
|
@ -13,11 +13,12 @@
|
|||
"cross-env": "^5.2.0",
|
||||
"laravel-mix": "^4.0.14",
|
||||
"laravel-mix-purgecss": "^4.1.0",
|
||||
"tailwindcss-list-reset": "^1.0.0"
|
||||
"tailwindcss-list-reset": "^1.0.0",
|
||||
"tailwindcss-transitions": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"postcss-nested": "^4.1.2",
|
||||
"tailwindcss": "^1.0.0-beta.3",
|
||||
"tailwindcss": "^1.0.1",
|
||||
"tailwindcss-interaction-variants": "^2.0.0-beta.1",
|
||||
"tailwindcss-spaced-items": "^0.1.0"
|
||||
}
|
||||
|
|
13
phpunit.xml.dist
Normal file
13
phpunit.xml.dist
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="./vendor/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
stopOnFailure="true">
|
||||
<testsuites>
|
||||
<testsuite name="Bundles">
|
||||
<directory suffix="Test.php">src/Speakers/tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
25
source/_includes/front-speakers.html.twig
Normal file
25
source/_includes/front-speakers.html.twig
Normal file
|
@ -0,0 +1,25 @@
|
|||
<section id="speakers">
|
||||
<h2 class="tw-text-3xl md:tw-text-4xl tw-font-bold tw-mb-10">Featuring Talks From</h2>
|
||||
|
||||
<div class="text-left tw-px-12">
|
||||
<ul class="tw-list-reset tw-flex tw-flex-wrap tw--mx-4 tw--mb-12">
|
||||
{% for speaker in speakers %}
|
||||
<li class="tw-w-full lg:tw-w-1/2 tw-text-left tw-mb-6">
|
||||
<a href="{{ speaker.url }}" class="group tw-px-4 tw-flex tw-flex-row-reverse tw-no-underline focus:tw-outline-none">
|
||||
<span class="tw-flex-1 tw-flex tw-flex-col tw-justify-center">
|
||||
<span class="tw-block tw-font-bold tw-text-xl tw-text-gray-900 group-hocus:tw-underline">{{ speaker.title }}</span>
|
||||
<span class="tw-block tw-text-gray-800">
|
||||
{% include 'speaker-role' with { speaker: speaker } %}
|
||||
</span>
|
||||
</span>
|
||||
<span class="tw-w-24 md:tw-w-32 tw-mr-6">
|
||||
<span class="tw-rounded-full tw-overflow-hidden tw-block tw-border-4 tw-border-solid tw-border-purple-500 group-hocus:tw-border-pink-500 tw-transition-border tw-transition-100">
|
||||
<img class="tw-block tw-w-full" src="/images/speakers/{{ speaker.image }}" alt="Photo of {{ speaker.name }}">
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
|
@ -11,6 +11,18 @@
|
|||
active: false,
|
||||
enabled: site['cfp']['open'],
|
||||
},
|
||||
{
|
||||
title: 'Speakers',
|
||||
href: '/#speakers',
|
||||
active: page.layout in ['session', 'speaker'],
|
||||
enabled: true,
|
||||
},
|
||||
{
|
||||
title: 'Schedule',
|
||||
href: '/schedule',
|
||||
active: page.url == '/schedule' or page.layout in ['session', 'speaker'],
|
||||
enabled: false,
|
||||
},
|
||||
{
|
||||
title: 'Sponsor us',
|
||||
href: '/sponsor-us',
|
||||
|
|
11
source/_includes/session-speakers.html.twig
Normal file
11
source/_includes/session-speakers.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
<h2>Speakers</h2>
|
||||
|
||||
<ul>
|
||||
{% for speaker in speakers %}
|
||||
<li>
|
||||
<a href="{{ speaker.url }}">
|
||||
{{ speaker.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
3
source/_includes/speaker-role.html.twig
Normal file
3
source/_includes/speaker-role.html.twig
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ speaker.role }}
|
||||
{%- if speaker.role and speaker.organisation %}, {% endif %}
|
||||
{{ speaker.organisation }}
|
9
source/_includes/speaker-session.html.twig
Normal file
9
source/_includes/speaker-session.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% for session in sessions %}
|
||||
{% if loop.first %}
|
||||
<h2 class="tw-mt-8">Session</h2>
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ session.url }}">
|
||||
{{ session.title }}
|
||||
</a>
|
||||
{% endfor %}
|
|
@ -12,13 +12,15 @@
|
|||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content_botton %}{% endblock %}
|
||||
|
||||
{% if page.update_text %}
|
||||
{% include 'update-text' %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% block content_bottom %}{% endblock %}
|
||||
{% block footer_top %}{% endblock %}
|
||||
{% include 'footer' %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% extends 'base' %}
|
||||
|
||||
{% block content_wrapper %}
|
||||
<main>
|
||||
<main class="tw-justify-start">
|
||||
<div class="tw-w-full tw-max-w-6xl tw-px-6 tw-mx-auto tw-my-10">
|
||||
<h1 class="tw-mt-0">
|
||||
{% block title %}{{ page.title }}{% endblock %}
|
||||
|
|
7
source/_layouts/session.html.twig
Normal file
7
source/_layouts/session.html.twig
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% extends 'page' %}
|
||||
|
||||
{% block content_bottom %}
|
||||
{% include 'session-speakers' with {
|
||||
speakers: sessionSpeakers(page, data.speakers),
|
||||
} %}
|
||||
{% endblock %}
|
53
source/_layouts/speaker.html.twig
Normal file
53
source/_layouts/speaker.html.twig
Normal file
|
@ -0,0 +1,53 @@
|
|||
{% extends 'page' %}
|
||||
|
||||
{% block title %}{{ page.name }}{% endblock %}
|
||||
|
||||
{% block content_wrapper_inner %}
|
||||
<div class="md:tw-flex tw--mx-4">
|
||||
{% if page.image or page.links %}
|
||||
<div class="tw-px-4 tw-flex-0 tw-w-32 md:tw-w-48 tw-mb-4">
|
||||
{% if page.image %}
|
||||
<div class="tw-rounded-full tw-overflow-hidden tw-border-4 tw-border-solid tw-border-purple-500 tw-mb-4">
|
||||
<img class="tw-max-w-full tw-block" src="/images/speakers/{{ page.image }}" alt="{{ page.name }}">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.links %}
|
||||
<div class="tw--mb-1">
|
||||
{% if page.links.drupalorg %}
|
||||
<div class="tw-pl-6 tw-mr-4 tw-bg-no-repeat tw-bg-left tw-mb-1" style="background-image: url(/themes/dcb2017/images/drop-1.png)">
|
||||
<a href="https://www.drupal.org/u/{{ page.links.drupalorg }}">{{ page.links.drupalorg }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if page.links.twitter %}
|
||||
<div class="tw-pl-6 tw-mr-4 tw-bg-no-repeat tw-bg-left tw-mb-1" style="background-image: url(/themes/dcb2017/images/twitter-1.png)">
|
||||
<a href="https://twitter.com/{{ page.links.twitter }}">{{ page.links.twitter }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="tw-px-4 tw-flex-1">
|
||||
<div class="markup">
|
||||
<div class="tw-font-bold tw-text-xl">
|
||||
{% include 'speaker-role' with { speaker: page } %}
|
||||
</div>
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<div class="tw-mt-8 tw-block">
|
||||
<a class="tw-text-purple-500 hocus:tw-text-pink-600 tw-no-underline hocus:tw-underline" href="/#speakers">View all speakers →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside>
|
||||
{% include 'speaker-session' with {
|
||||
sessions: speakerSessions(page, data.sessions),
|
||||
} %}
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -2,5 +2,6 @@
|
|||
permalink: /_redirects
|
||||
---
|
||||
/cfp {{site.cfp.url}}
|
||||
/speakers /#speakers
|
||||
/submit-session {{site.cfp.url}}
|
||||
/tickets {{site.tickets.url}}
|
||||
|
|
16
source/_sessions/automate-repetitive-tasks-ansible.md
Normal file
16
source/_sessions/automate-repetitive-tasks-ansible.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Automate to manage repetitive tasks with Ansible
|
||||
speakers: [Daniel Pickering]
|
||||
use: [speakers]
|
||||
---
|
||||
Many people now blog as a keep safe of knowledge and to share. With ansibles you can automate these processes and still share the files. You can build custom command libraries I like to think of as a CLI for your specific use case with a set of commands to save time and being more productive.
|
||||
|
||||
Ansible is designed to be a quick and effective tool to help remove repetitive tasks.
|
||||
|
||||
If you have to do the same task more than once a year I’d recommend you create a script for it.
|
||||
|
||||
I feel that Ansible is really undered used by the drupal community and many tasks can be aided in completion by adding a little ansibles where needed.
|
||||
|
||||
Why repeat when you can automate.
|
||||
|
||||
I will give an overview of the ways it can be used and if we have time demonstrate some functionality of ansibles and why more people should use it.
|
10
source/_sessions/doing-good-with-drupal.md
Normal file
10
source/_sessions/doing-good-with-drupal.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
title: Doing good with Drupal
|
||||
speakers:
|
||||
- Matt Haworth
|
||||
use:
|
||||
- speakers
|
||||
---
|
||||
More and more charities and campaigners are choosing Drupal to create websites that raise funds, find supporters and deliver content and services to those who need it most.
|
||||
|
||||
This session covers two real world case studies that make a difference with Drupal with a high profile fundraising campaign and national charity. We’ll look at what to think about if you’re creating a website that does good, and some tips and tricks for using Drupal to do it along the way.
|
12
source/_sessions/real-state-of-drupal.md
Normal file
12
source/_sessions/real-state-of-drupal.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
title: The Real State of Drupal
|
||||
speakers:
|
||||
- Dan McNamara
|
||||
use:
|
||||
- speakers
|
||||
---
|
||||
An honest account of the future of Drupal CMS.
|
||||
|
||||
The landscape in which Drupal operates is changing faster than ever: client expectations are changing; new technologies are emerging and new ways of working are being adopted. Drupal itself is adapting too.
|
||||
|
||||
I’ll be looking at the challenges ahead for Drupal and the community that supports it, but more excitingly, the opportunities that this new landscape will bring.
|
14
source/_speakers/1-dan-mcnamara.md
Normal file
14
source/_speakers/1-dan-mcnamara.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: Dan McNamara
|
||||
role: Managing Director
|
||||
organisation: Microserve
|
||||
image: dan-mcnamara.jpg
|
||||
links:
|
||||
drupalorg: danmcn
|
||||
twitter: DanMcN
|
||||
use:
|
||||
- sessions
|
||||
---
|
||||
Dan has worked in strategic client service roles for some of the biggest and best digital agencies in London and Bristol.
|
||||
|
||||
Outside of work Dan mostly spends his time trying to keep up with his two young daughters, with varying degrees of success. He enjoys playing cricket and golf, despite being decidedly average at both.
|
10
source/_speakers/2-matt-haworth.md
Normal file
10
source/_speakers/2-matt-haworth.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
title: Matt Haworth
|
||||
role: Co-Founder
|
||||
organisation: Reason Digital
|
||||
image: matt-haworth.jpg
|
||||
links:
|
||||
twitter: acrim
|
||||
use:
|
||||
- sessions
|
||||
---
|
11
source/_speakers/3-daniel-pickering.md
Normal file
11
source/_speakers/3-daniel-pickering.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: Daniel Pickering
|
||||
role: Full Stack Developer
|
||||
organisation: Annertech
|
||||
image: daniel-pickering.jpg
|
||||
links:
|
||||
drupalorg: ikit-claw
|
||||
twitter: dclpuk
|
||||
use: [sessions]
|
||||
draft: true
|
||||
---
|
BIN
source/images/speakers/dan-mcnamara.jpg
Normal file
BIN
source/images/speakers/dan-mcnamara.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
source/images/speakers/daniel-pickering.jpg
Normal file
BIN
source/images/speakers/daniel-pickering.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
source/images/speakers/matt-haworth.jpg
Normal file
BIN
source/images/speakers/matt-haworth.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
BIN
source/images/speakers/tom.jpg
Normal file
BIN
source/images/speakers/tom.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -3,9 +3,12 @@ layout: default
|
|||
twitter:
|
||||
url: https://twitter.com/drupalcampbris
|
||||
update_text: Early bird tickets are now available!
|
||||
use:
|
||||
- speakers
|
||||
---
|
||||
{% block content %}
|
||||
<main class="tw-bg-balloon tw-bg-center tw-bg-cover tw-flex tw-flex-col tw-flex-1">
|
||||
<div class="region tw-px-12">
|
||||
<div class="region tw-px-12 tw-py-24">
|
||||
<div id="block-homepagehero" class="tw-my-0 md:tw-py-18 lg:tw-py-24 block block-block-content block-block-content3760e7eb-29de-4f25-b7ee-76421679cf64">
|
||||
<div class="tw-mx-16">
|
||||
<img src="/themes/dcb2017/logo.svg" alt="Drupalcamp Bristol logo" />
|
||||
|
@ -35,3 +38,12 @@ update_text: Early bird tickets are now available!
|
|||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer_top %}
|
||||
<div class="tw-max-w-5xl tw-mx-auto tw-text-center tw-my-12 md:tw-my-24">
|
||||
{% include 'front-speakers' with {
|
||||
speakers: data.speakers,
|
||||
} %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
13
source/schedule.html.twig
Normal file
13
source/schedule.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: page
|
||||
title: Schedule
|
||||
use:
|
||||
- sessions
|
||||
---
|
||||
<ul>
|
||||
{% for session in data.sessions %}
|
||||
<li>
|
||||
<a href="{{ session.url }}">{{ session.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
BIN
source/themes/dcb2017/images/drop-1.png
Normal file
BIN
source/themes/dcb2017/images/drop-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 922 B |
BIN
source/themes/dcb2017/images/twitter-1.png
Normal file
BIN
source/themes/dcb2017/images/twitter-1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 858 B |
4
src/Speakers/services.yml
Normal file
4
src/Speakers/services.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
services:
|
||||
App\Speakers\TwigExtension\SpeakersExtension:
|
||||
tags:
|
||||
- { name: twig.extension }
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Speakers\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
|
||||
class SculpinSpeakersExtension extends Extension
|
||||
{
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../../'));
|
||||
$loader->load('services.yml');
|
||||
}
|
||||
}
|
9
src/Speakers/src/SculpinSpeakersBundle.php
Normal file
9
src/Speakers/src/SculpinSpeakersBundle.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace App\Speakers;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class SculpinSpeakersBundle extends Bundle
|
||||
{
|
||||
}
|
50
src/Speakers/src/TwigExtension/SpeakersExtension.php
Normal file
50
src/Speakers/src/TwigExtension/SpeakersExtension.php
Normal file
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
namespace App\Speakers\TwigExtension;
|
||||
|
||||
use Twig\Extension\AbstractExtension;
|
||||
use Twig\TwigFunction;
|
||||
|
||||
class SpeakersExtension extends AbstractExtension
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new TwigFunction('sessionSpeakers', [$this, 'getSessionSpeakers']),
|
||||
new TwigFunction('speakerSessions', [$this, 'getSpeakerSessions']),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the speakers for a session.
|
||||
*
|
||||
* @param array|object $session
|
||||
* @param array $speakers
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSessionSpeakers($session, array $speakers): array
|
||||
{
|
||||
return collect($speakers)->filter(function ($speaker) use ($session): bool {
|
||||
return collect($session['speakers'])->contains($speaker['title']);
|
||||
})->values()->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sessions for a speaker.
|
||||
*
|
||||
* @param array|object $speaker
|
||||
* @param array $sessions
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSpeakerSessions($speaker, array $sessions): array
|
||||
{
|
||||
return collect($sessions)->filter(function ($session) use ($speaker): bool {
|
||||
return collect($session['speakers'])->contains($speaker['title']);
|
||||
})->values()->toArray();
|
||||
}
|
||||
}
|
73
src/Speakers/tests/SpeakerTest.php
Normal file
73
src/Speakers/tests/SpeakerTest.php
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
namespace App\Tests\Speakers;
|
||||
|
||||
use App\Speakers\TwigExtension\SpeakersExtension;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class SpeakerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var \App\Speakers\TwigExtension\SpeakersExtension
|
||||
*/
|
||||
private $extension;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->extension = new SpeakersExtension();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function get_sessions_for_a_speaker()
|
||||
{
|
||||
$speaker = ['title' => 'Oliver Davies'];
|
||||
|
||||
$sessions = [
|
||||
['title' => 'Introduction to Views', 'speakers' => ['Tom Metcalfe']],
|
||||
['title' => 'Test Driven Drupal', 'speakers' => ['Oliver Davies']],
|
||||
];
|
||||
|
||||
$sessions = $this->extension->getSpeakerSessions($speaker, $sessions);
|
||||
|
||||
$this->assertCount(1, $sessions);
|
||||
$this->assertSame('Test Driven Drupal', $sessions[0]['title']);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function get_speakers_for_a_session()
|
||||
{
|
||||
$speakers = [
|
||||
['title' => 'Oliver Davies'],
|
||||
['title' => 'Phil Thomas'],
|
||||
['title' => 'Tom Metcalfe'],
|
||||
['title' => 'Ross Gratton'],
|
||||
['title' => 'Dan McNamara'],
|
||||
];
|
||||
|
||||
$session1 = [
|
||||
'title' => 'Drupal in a microservice savannah',
|
||||
'speakers' => [
|
||||
'Phil Thomas',
|
||||
'Ross Gratton',
|
||||
],
|
||||
];
|
||||
|
||||
$session2 = [
|
||||
'title' => 'The Real State of Drupal',
|
||||
'speakers' => ['Dan McNamara'],
|
||||
];
|
||||
|
||||
tap($this->extension->getSessionSpeakers($session1, $speakers), function (array $speakers) {
|
||||
$this->assertCount(2, $speakers);
|
||||
$this->assertSame('Phil Thomas', $speakers[0]['title']);
|
||||
$this->assertSame('Ross Gratton', $speakers[1]['title']);
|
||||
});
|
||||
|
||||
tap($this->extension->getSessionSpeakers($session2, $speakers), function (array $speakers) {
|
||||
$this->assertCount(1, $speakers);
|
||||
$this->assertSame('Dan McNamara', $speakers[0]['title']);
|
||||
});
|
||||
}
|
||||
}
|
|
@ -15,7 +15,9 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
variants: {
|
||||
borderColor: [...variants.textColor, 'hocus', 'group-hocus'],
|
||||
textColor: [...variants.textColor, 'hocus'],
|
||||
textDecoration: [...variants.textColor, 'hocus', 'group-hocus'],
|
||||
fontStyle: [...variants.fontStyle, 'hocus']
|
||||
},
|
||||
corePlugins: {
|
||||
|
@ -23,6 +25,7 @@ module.exports = {
|
|||
},
|
||||
plugins: [
|
||||
require('tailwindcss-interaction-variants')(),
|
||||
require('tailwindcss-transitions')(),
|
||||
require('tailwindcss-list-reset')(),
|
||||
require('tailwindcss-spaced-items')({ values: spacing }),
|
||||
],
|
||||
|
|
131
yarn.lock
131
yarn.lock
|
@ -1711,11 +1711,6 @@ commander@~2.19.0:
|
|||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
|
||||
integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==
|
||||
|
||||
comment-regex@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/comment-regex/-/comment-regex-1.0.1.tgz#e070d2c4db33231955d0979d27c918fcb6f93565"
|
||||
integrity sha512-IWlN//Yfby92tOIje7J18HkNmWRR7JESA/BK8W7wqY/akITpU5B0JQWnbTjCfdChSrDNb0DrdA9jfAxiiBXyiQ==
|
||||
|
||||
commondir@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
|
||||
|
@ -2254,11 +2249,6 @@ define-property@^2.0.2:
|
|||
is-descriptor "^1.0.2"
|
||||
isobject "^3.0.1"
|
||||
|
||||
defined@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
|
||||
integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=
|
||||
|
||||
del@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/del/-/del-4.1.0.tgz#049543b8290e1a9293e2bd150ab3a06f637322b8"
|
||||
|
@ -3017,6 +3007,15 @@ fs-extra@^7.0.1:
|
|||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fs-extra@^8.0.0:
|
||||
version "8.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.0.1.tgz#90294081f978b1f182f347a440a209154344285b"
|
||||
integrity sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A==
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fs-minipass@^1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d"
|
||||
|
@ -3052,11 +3051,6 @@ function-bind@^1.1.1:
|
|||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
|
||||
|
||||
gather-stream@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b"
|
||||
integrity sha1-szmUr0V6gRVwDUEPMXczy+egkEs=
|
||||
|
||||
gauge@~2.7.3:
|
||||
version "2.7.4"
|
||||
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
|
||||
|
@ -3231,11 +3225,6 @@ has-cors@1.1.0:
|
|||
resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39"
|
||||
integrity sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=
|
||||
|
||||
has-flag@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
|
||||
integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=
|
||||
|
||||
has-flag@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||
|
@ -3944,11 +3933,6 @@ isobject@^3.0.0, isobject@^3.0.1:
|
|||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
||||
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
|
||||
|
||||
js-base64@^2.1.9:
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.5.1.tgz#1efa39ef2c5f7980bb1784ade4a8af2de3291121"
|
||||
integrity sha512-M7kLczedRMYX4L8Mdh4MzyAMM9O5osx+4FcOQuTvr3A9F2D9S5JXheN0ewNbrvK2UatkTRhL5ejGmGSjNMiZuw==
|
||||
|
||||
js-levenshtein@^1.1.3:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"
|
||||
|
@ -5136,22 +5120,6 @@ pbkdf2@^3.0.3:
|
|||
safe-buffer "^5.0.1"
|
||||
sha.js "^2.4.8"
|
||||
|
||||
perfectionist@^2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/perfectionist/-/perfectionist-2.4.0.tgz#c147ad3714e126467f1764129ee72df861d47ea0"
|
||||
integrity sha1-wUetNxThJkZ/F2QSnuct+GHUfqA=
|
||||
dependencies:
|
||||
comment-regex "^1.0.0"
|
||||
defined "^1.0.0"
|
||||
minimist "^1.2.0"
|
||||
postcss "^5.0.8"
|
||||
postcss-scss "^0.3.0"
|
||||
postcss-value-parser "^3.3.0"
|
||||
read-file-stdin "^0.2.0"
|
||||
string.prototype.repeat "^0.2.0"
|
||||
vendors "^1.0.0"
|
||||
write-file-stdout "0.0.2"
|
||||
|
||||
pify@^2.0.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||
|
@ -5512,13 +5480,6 @@ postcss-reduce-transforms@^4.0.2:
|
|||
postcss "^7.0.0"
|
||||
postcss-value-parser "^3.0.0"
|
||||
|
||||
postcss-scss@^0.3.0:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-0.3.1.tgz#65c610d8e2a7ee0e62b1835b71b8870734816e4b"
|
||||
integrity sha1-ZcYQ2OKn7g5isYNbcbiHBzSBbks=
|
||||
dependencies:
|
||||
postcss "^5.2.4"
|
||||
|
||||
postcss-selector-parser@^3.0.0:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-3.1.1.tgz#4f875f4afb0c96573d5cf4d74011aee250a7e865"
|
||||
|
@ -5570,16 +5531,6 @@ postcss-value-parser@^3.0.0, postcss-value-parser@^3.3.0, postcss-value-parser@^
|
|||
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281"
|
||||
integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==
|
||||
|
||||
postcss@^5.0.8, postcss@^5.2.4:
|
||||
version "5.2.18"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5"
|
||||
integrity sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==
|
||||
dependencies:
|
||||
chalk "^1.1.3"
|
||||
js-base64 "^2.1.9"
|
||||
source-map "^0.5.6"
|
||||
supports-color "^3.2.3"
|
||||
|
||||
postcss@^6.0.1, postcss@^6.0.23, postcss@^6.0.9:
|
||||
version "6.0.23"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324"
|
||||
|
@ -5800,13 +5751,6 @@ rc@^1.2.7:
|
|||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
read-file-stdin@^0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/read-file-stdin/-/read-file-stdin-0.2.1.tgz#25eccff3a153b6809afacb23ee15387db9e0ee61"
|
||||
integrity sha1-JezP86FTtoCa+ssj7hU4fbng7mE=
|
||||
dependencies:
|
||||
gather-stream "^1.0.0"
|
||||
|
||||
read-pkg-up@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
|
||||
|
@ -6614,11 +6558,6 @@ string-width@^3.0.0:
|
|||
is-fullwidth-code-point "^2.0.0"
|
||||
strip-ansi "^5.1.0"
|
||||
|
||||
string.prototype.repeat@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/string.prototype.repeat/-/string.prototype.repeat-0.2.0.tgz#aba36de08dcee6a5a337d49b2ea1da1b28fc0ecf"
|
||||
integrity sha1-q6Nt4I3O5qWjN9SbLqHaGyj8Ds8=
|
||||
|
||||
string_decoder@^1.0.0, string_decoder@^1.1.1:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d"
|
||||
|
@ -6693,13 +6632,6 @@ supports-color@^2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
||||
integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
|
||||
|
||||
supports-color@^3.2.3:
|
||||
version "3.2.3"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
|
||||
integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=
|
||||
dependencies:
|
||||
has-flag "^1.0.0"
|
||||
|
||||
supports-color@^5.3.0, supports-color@^5.4.0, supports-color@^5.5.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||
|
@ -6760,25 +6692,12 @@ tailwindcss-spaced-items@^0.1.0:
|
|||
resolved "https://registry.yarnpkg.com/tailwindcss-spaced-items/-/tailwindcss-spaced-items-0.1.0.tgz#e7f381e5c780a034bcdbc38a6a2cfb31f828a020"
|
||||
integrity sha512-YiT1h89fp13r6I+EBM8wS1RWfsTwzHSi4BAnHoTXXQK1GQ53DUCPeFNmiksYSdx2aQLMdp/DTPvErqBVfTALiQ==
|
||||
|
||||
tailwindcss@^1.0.0-beta.3:
|
||||
version "1.0.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-1.0.0-beta.4.tgz#b69ab23c8ad6b937c12598310d44589f1d9f5d27"
|
||||
integrity sha512-He5eWVg3ZxHWBwabh+w8yBu1mTyat4fvPpIobteAXtxDxEk+gSY7U2DoxpWq42r7EKr/rxRVsJXw3L6cL87I4A==
|
||||
tailwindcss-transitions@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/tailwindcss-transitions/-/tailwindcss-transitions-2.0.0.tgz#e1861d7d6b67a9b6b854a6d6655cc9faf74ab949"
|
||||
integrity sha512-boqve4ur03UKMTyPuN1n6bZd3S+UoDVnb6zl8NBSmMghFimAfeWb+mgUaTs5tGVFFuEJllBBr28CrGG5DUSSfQ==
|
||||
dependencies:
|
||||
autoprefixer "^9.4.5"
|
||||
bytes "^3.0.0"
|
||||
chalk "^2.4.1"
|
||||
fs-extra "^7.0.1"
|
||||
lodash "^4.17.11"
|
||||
node-emoji "^1.8.1"
|
||||
normalize.css "^8.0.1"
|
||||
perfectionist "^2.4.0"
|
||||
postcss "^7.0.11"
|
||||
postcss-functions "^3.0.0"
|
||||
postcss-js "^2.0.0"
|
||||
postcss-nested "^4.1.1"
|
||||
postcss-selector-parser "^6.0.0"
|
||||
pretty-hrtime "^1.0.3"
|
||||
|
||||
tailwindcss@^1.0.0-beta.4:
|
||||
version "1.0.0-beta.8"
|
||||
|
@ -6799,6 +6718,25 @@ tailwindcss@^1.0.0-beta.4:
|
|||
postcss-selector-parser "^6.0.0"
|
||||
pretty-hrtime "^1.0.3"
|
||||
|
||||
tailwindcss@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-1.0.1.tgz#3116e989c64540f1c11214e8b4c08b6aea548be5"
|
||||
integrity sha512-tNyvmizhIY9ydXX8m84S/69851QROZzbH6RB/Q4w0K27OssupGcyXeD8zumzb9Yuzq6PifBH2A6ehjuBPklnYA==
|
||||
dependencies:
|
||||
autoprefixer "^9.4.5"
|
||||
bytes "^3.0.0"
|
||||
chalk "^2.4.1"
|
||||
fs-extra "^8.0.0"
|
||||
lodash "^4.17.11"
|
||||
node-emoji "^1.8.1"
|
||||
normalize.css "^8.0.1"
|
||||
postcss "^7.0.11"
|
||||
postcss-functions "^3.0.0"
|
||||
postcss-js "^2.0.0"
|
||||
postcss-nested "^4.1.1"
|
||||
postcss-selector-parser "^6.0.0"
|
||||
pretty-hrtime "^1.0.3"
|
||||
|
||||
tapable@^1.0.0, tapable@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.1.tgz#4d297923c5a72a42360de2ab52dadfaaec00018e"
|
||||
|
@ -7386,11 +7324,6 @@ wrappy@1:
|
|||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
|
||||
write-file-stdout@0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/write-file-stdout/-/write-file-stdout-0.0.2.tgz#c252d7c7c5b1b402897630e3453c7bfe690d9ca1"
|
||||
integrity sha1-wlLXx8WxtAKJdjDjRTx7/mkNnKE=
|
||||
|
||||
ws@~3.3.1:
|
||||
version "3.3.3"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
|
||||
|
|
Loading…
Reference in a new issue