Rework API calls and each loops

This commit is contained in:
2020-03-16 12:57:53 +01:00
parent ba5d1de780
commit 9965c9dec3
6 changed files with 36 additions and 17 deletions

View File

@@ -50,25 +50,27 @@
<p>{$site.credits_text}</p>
</div>
{#if $site.credits_list}
<div class="page__list page__part">
{#each $site.credits_list as category}
{#each $site.credits_list as { title, credits }}
<div class="page__category">
<h2 class="title-category">{category.name}</h2>
{#each category.credits as person}
<h2 class="title-category">{title}</h2>
{#each credits as { name, role, website }, i}
<dl>
<dt class="style-location">
{#if person.url}
<LinkTranslate href={person.url} text={person.name} target="_blank" rel="noopener" />
{#if website}
<LinkTranslate href={website} text={name} target="_blank" rel="noopener" />
{:else}
{person.name}
{name}
{/if}
</dt>
<dd class="style-caps style-caps style-caps--transparent">{person.role}</dd>
<dd class="style-caps style-caps style-caps--transparent">{role}</dd>
</dl>
{/each}
</div>
{/each}
</div>
{/if}
<InteractiveGlobe type="part" />
</div>