Add attributes for demonstation purposes
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
<script>
|
||||
import { getFileName } from '$lib/util/links';
|
||||
import { strf } from '$lib/data/language.js';
|
||||
|
||||
function sortItems() {
|
||||
@ -22,10 +23,12 @@
|
||||
<li>
|
||||
<h3>{item.item}</h3>
|
||||
<p>
|
||||
<b>Title:</b> {$strf(item.title)}<br />
|
||||
<b>Description:</b> {#if item.description}{$strf(item.description)}{:else}<i>no description</i>{/if}
|
||||
<b>Title:</b> {#if item.title}{$strf(item.title)}{:else}<i>no title</i>{/if}<br />
|
||||
<b>Description:</b> {#if item.description}{$strf(item.description)}{:else}<i>no description</i>{/if}<br />
|
||||
<b>Links:</b> <a href={`${base}${item.item}`}>Open</a> • <a href={`${base}${item.item}/download`}>Download</a><br />
|
||||
<b>Thumbnails:</b> <a href={`${base}${item.item}/t/s`}>Small</a> • <a href={`${base}${item.item}/t/m`}>Medium</a> • <a href={`${base}${item.item}/t/l`}>Large</a> • <a href={`${base}${item.item}/t/full`}>Full</a>
|
||||
</p>
|
||||
<img src={`${base}${item.item}/t`} alt={$strf(item.title) || item.item} />
|
||||
<img src={`${base}${item.item}/t`} alt={(item.title ? $strf(item.title) : null) || (item.description ? $strf(item.description) : null) || getFileName(item.item)} />
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
|
||||
3
src/lib/types.d.ts
vendored
3
src/lib/types.d.ts
vendored
@ -12,7 +12,6 @@ type License = {
|
||||
}
|
||||
|
||||
type Metadata = {
|
||||
title: Translation | string;
|
||||
description?: Translation | string;
|
||||
authors?: string[] | string;
|
||||
place?: string;
|
||||
@ -21,11 +20,13 @@ type Metadata = {
|
||||
}
|
||||
|
||||
type AlbumMetadata = Metadata & {
|
||||
title: Translation | string;
|
||||
date: string; // ISO 8601, e.g. 2020-12-24, used for sorting
|
||||
cover?: string;
|
||||
};
|
||||
|
||||
type ItemMetadata = Metadata & {
|
||||
title?: Translation | string;
|
||||
item: string;
|
||||
timestamp?: string; // ISO 8601, e.g. 2020-12-24T12:00:00Z
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user