Extract includes from the talk layout
This commit is contained in:
parent
de2a1dcee3
commit
aad6d0315e
25
source/_includes/talk/events.html.twig
Normal file
25
source/_includes/talk/events.html.twig
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% if events %}
|
||||
<section>
|
||||
<h2>Events</h2>
|
||||
|
||||
<ul>
|
||||
{% for event in events|reverse %}
|
||||
<li>
|
||||
{% if event.url %}
|
||||
<a href="{{ event.url }}">{{ event.name }}</a>
|
||||
{% else %}
|
||||
{{ event.name }}
|
||||
{% endif %}
|
||||
|
||||
{% if event.location %}
|
||||
in {{ event.location }}
|
||||
{% endif %}
|
||||
|
||||
- {{ event.date|date('F jS, Y') }}
|
||||
|
||||
{{ event.online ? '(online)' }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
15
source/_includes/talk/slides.html.twig
Normal file
15
source/_includes/talk/slides.html.twig
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% if speakerdeck.id %}
|
||||
<section>
|
||||
<h2>Slides</h2>
|
||||
|
||||
<div>
|
||||
<noscript>**Please enable JavaScript to view slides.**</noscript>
|
||||
<script
|
||||
class="speakerdeck-embed"
|
||||
data-id="{{ speakerdeck.id }}"
|
||||
data-ratio="{{ speakerdeck.ratio ?? '1.29456384323641' }}"
|
||||
src="//speakerdeck.com/assets/embed.js"
|
||||
></script>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
7
source/_includes/talk/video.html.twig
Normal file
7
source/_includes/talk/video.html.twig
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% if video.type == 'youtube' and video.id %}
|
||||
<section>
|
||||
<h2>Video</h2>
|
||||
|
||||
{% include 'youtube-video.html.twig' with { id: video.id } %}
|
||||
</section>
|
||||
{% endif %}
|
|
@ -3,53 +3,15 @@
|
|||
{% block content_wrapper %}
|
||||
{{ parent() }}
|
||||
|
||||
{% if page.speakerdeck.id %}
|
||||
<section>
|
||||
<h2>Slides</h2>
|
||||
{% include 'talk/slides' with {
|
||||
speakerdeck: page.speakerdeck,
|
||||
} %}
|
||||
|
||||
<div>
|
||||
<noscript>**Please enable JavaScript to view slides.**</noscript>
|
||||
<script
|
||||
class="speakerdeck-embed"
|
||||
data-id="{{ page.speakerdeck.id }}"
|
||||
data-ratio="{{ page.speakerdeck.ratio ?? '1.29456384323641' }}"
|
||||
src="//speakerdeck.com/assets/embed.js"
|
||||
></script>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% include 'talk/video' with {
|
||||
video: page.video,
|
||||
} %}
|
||||
|
||||
{% if page.video.type == 'youtube' and page.video.id %}
|
||||
<section>
|
||||
<h2>Video</h2>
|
||||
|
||||
{% include 'youtube-video.html.twig' with { id: page.video.id } %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if page.events %}
|
||||
<section>
|
||||
<h2>Events</h2>
|
||||
|
||||
<ul>
|
||||
{% for event in page.events|reverse %}
|
||||
<li>
|
||||
{% if event.url %}
|
||||
<a href="{{ event.url }}">{{ event.name }}</a>
|
||||
{% else %}
|
||||
{{ event.name }}
|
||||
{% endif %}
|
||||
|
||||
{% if event.location %}
|
||||
in {{ event.location }}
|
||||
{% endif %}
|
||||
|
||||
- {{ event.date|date('F jS, Y') }}
|
||||
|
||||
{{ event.online ? '(online)' }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% include 'talk/events' with {
|
||||
events: page.events,
|
||||
} %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue