refactor: rename _partials
to _includes
This commit is contained in:
parent
0482badc95
commit
a445072048
17 changed files with 0 additions and 0 deletions
17
source/_includes/talk/events.html.twig
Normal file
17
source/_includes/talk/events.html.twig
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% if events is not empty %}
|
||||
<div class="markdown">
|
||||
<h2>Events</h2>
|
||||
|
||||
<ul>
|
||||
{% for event in events|sort((a, b) => a.date > b.date) %}
|
||||
{% include 'talk/events/event.html.twig' with {
|
||||
date: event.date,
|
||||
is_online: event.is_online ?? false,
|
||||
location: event.location,
|
||||
name: event.name,
|
||||
url: event.url,
|
||||
} only %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
10
source/_includes/talk/events/event.html.twig
Normal file
10
source/_includes/talk/events/event.html.twig
Normal file
|
@ -0,0 +1,10 @@
|
|||
<li>
|
||||
{% if url %}
|
||||
<a href="{{ url }}">{{ name }}</a>
|
||||
{% else %}
|
||||
{{ name }}
|
||||
{% endif %}
|
||||
{% if location %}in {{ location }}{% endif %}
|
||||
- {{ date|date('jS F Y') }}
|
||||
{{ is_online ? '(online)' }}
|
||||
</li>
|
9
source/_includes/talk/slides.html.twig
Normal file
9
source/_includes/talk/slides.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% if speakerdeck.id and speakerdeck.ratio %}
|
||||
<div>
|
||||
<h2 class="mb-2">Slides</h2>
|
||||
|
||||
{% include 'speakerdeck' with {
|
||||
data: speakerdeck,
|
||||
} only %}
|
||||
</div>
|
||||
{% endif %}
|
28
source/_includes/talk/video.html.twig
Normal file
28
source/_includes/talk/video.html.twig
Normal file
|
@ -0,0 +1,28 @@
|
|||
{% macro videoSrc(video) %}
|
||||
{% set srcUrls = {
|
||||
youtube: '//www.youtube.com/embed',
|
||||
videopress: 'https://videopress.com/embed',
|
||||
vimeo: 'https://player.vimeo.com/video',
|
||||
} %}
|
||||
|
||||
{{ srcUrls[video.type] ~ '/' ~ video.id }}
|
||||
{% endmacro %}
|
||||
|
||||
{% from _self import videoSrc %}
|
||||
|
||||
{% if video.id %}
|
||||
<div class="mt-4">
|
||||
<h2 class="mb-2">Video</h2>
|
||||
|
||||
<div class="video-full">
|
||||
<iframe
|
||||
width="678"
|
||||
height="408"
|
||||
src="{{ videoSrc(video) }}"
|
||||
frameborder="0"
|
||||
allowfullscreen
|
||||
>
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue