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"> <div class="spaced-y-12">
{% for talk in getUpcomingTalks(page.talks|merge(data.talks)) %} {% for talk in getUpcomingTalks(page.talks|merge(data.talks)) %}
<div> {% include 'talks/talk' %}
<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>
{% else %} {% else %}
<p>sdf</p> <p>sdf</p>
{% endfor %} {% endfor %}
@ -63,28 +51,7 @@ talks:
<div class="spaced-y-12"> <div class="spaced-y-12">
{% for talk in getPastTalks(page.talks|merge(data.talks))|reverse %} {% for talk in getPastTalks(page.talks|merge(data.talks))|reverse %}
<article> {% include 'talks/talk' %}
<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>
{% endfor %} {% endfor %}
</div> </div>
</div> </div>