Add a talk partial

This commit is contained in:
Oliver Davies 2019-02-13 07:01:40 +00:00
parent b0623376ec
commit 57f47644eb
2 changed files with 24 additions and 35 deletions

View file

@ -0,0 +1,22 @@
<article>
<h3 class="text-lg text-black mb-1">
{% if talk.url %}
<a class="text-inherit" href="{{ talk.url }}">{{ talk.title }}</a>
{% else %}
{{ talk.title }}
{% endif %}
</h3>
<div class="text-sm text-grey-darkest">
<p>{{ talk.excerpt }}</p>
</div>
{% if talk.url %}
<footer class="mt-1">
<a href="{{ talk.url }}" class="text-grey-dark text-sm">
Find out more
<span class="visuallyhidden">about {{ talk.title }}</span>
</a>
</footer>
{% endif %}
</article>

View file

@ -39,19 +39,7 @@ talks:
<div class="spaced-y-12">
{% for talk in getUpcomingTalks(page.talks|merge(data.talks)) %}
<div>
<h3 class="text-lg text-black mb-1">
{% if talk.url %}
<a class="text-inherit" href="{{ talk.url }}">{{ talk.title }}</a>
{% else %}
{{ talk.title }}
{% endif %}
</h3>
<div class="text-sm text-grey-darkest">
<p>{{ talk.excerpt }}</p>
</div>
</div>
{% include 'talks/talk' %}
{% else %}
<p>sdf</p>
{% endfor %}
@ -63,28 +51,7 @@ talks:
<div class="spaced-y-12">
{% for talk in getPastTalks(page.talks|merge(data.talks))|reverse %}
<article>
<h3 class="text-lg text-black mb-1">
{% if talk.url %}
<a class="text-inherit" href="{{ talk.url }}">{{ talk.title }}</a>
{% else %}
{{ talk.title }}
{% endif %}
</h3>
<div class="text-sm text-grey-darkest">
<p>{{ talk.excerpt }}</p>
</div>
{% if talk.url %}
<footer class="mt-1">
<a href="{{ talk.url }}" class="text-grey-dark text-sm">
Find out more
<span class="visuallyhidden">about {{ talk.title }}</span>
</a>
</footer>
{% endif %}
</article>
{% include 'talks/talk' %}
{% endfor %}
</div>
</div>