Add route structure
This commit is contained in:
11
src/lib/Gallery.svelte
Normal file
11
src/lib/Gallery.svelte
Normal file
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<section class="gallery">
|
||||
<slot />
|
||||
</section>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
9
src/lib/Icon.svelte
Normal file
9
src/lib/Icon.svelte
Normal file
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
32
src/lib/Photo.svelte
Normal file
32
src/lib/Photo.svelte
Normal file
@ -0,0 +1,32 @@
|
||||
<script>
|
||||
/**
|
||||
* The source of the image.
|
||||
* @type {string}
|
||||
*/
|
||||
export let src;
|
||||
|
||||
/**
|
||||
* Alternative text for the image. Used for accessibility.
|
||||
* @type {string | undefined}
|
||||
*/
|
||||
export let alt = undefined;
|
||||
|
||||
/**
|
||||
* The click handler for the image.
|
||||
* @param {MouseEvent} event
|
||||
*/
|
||||
async function clickHandler(event) {
|
||||
event.preventDefault();
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<a href="{src}" on:click={clickHandler}>
|
||||
<figure class="photo">
|
||||
<img src="{src}" alt="{alt}" />
|
||||
</figure>
|
||||
</a>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
29
src/lib/albums.json
Normal file
29
src/lib/albums.json
Normal file
@ -0,0 +1,29 @@
|
||||
[
|
||||
{
|
||||
"slug": "sts",
|
||||
"title": "Testgalerie",
|
||||
"description": "Das ist eine Testgalerie",
|
||||
"timestamp": "2023-08-04T00:00:00.000Z",
|
||||
"place": "Berlin",
|
||||
"tags": [
|
||||
"Berlin",
|
||||
"Test"
|
||||
],
|
||||
"license": "CC BY-NC-ND 4.0",
|
||||
"items": "img.zip",
|
||||
"itemsMeta": [
|
||||
{
|
||||
"item": "cover.jpg",
|
||||
"title": "Cover",
|
||||
"description": "Das ist das Cover",
|
||||
"timestamp": "2023-08-04T00:00:00.000Z",
|
||||
"place": "Berlin",
|
||||
"tags": [
|
||||
"Berlin",
|
||||
"Cover"
|
||||
],
|
||||
"license": "CC BY-NC-ND 4.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -1 +0,0 @@
|
||||
// place files you want to import through the `$lib` alias in this folder.
|
||||
Reference in New Issue
Block a user