Skip to content

Commit

Permalink
add images and create first view
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBlaa committed Aug 29, 2023
1 parent 8088100 commit 9b8ed69
Show file tree
Hide file tree
Showing 32 changed files with 177 additions and 1,195 deletions.
43 changes: 43 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"svelte-preprocess-import-assets": "^1.0.1",
"tailwindcss": "^3.3.2",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover" data-theme="skeleton">
<body data-sveltekit-preload-data="hover" data-theme="rocket">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
14 changes: 14 additions & 0 deletions src/lib/components/InstrumentCard.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script lang="ts">
export let id: number;
export let name: string;
export let image: string ;
export let audio: string;
let url='/images/'+image;
</script>

<div class="card cursor-pointer shadow-xl hover:shadow-md p-40">
<img src={url} alt="{name}" class="w-[80%]"/>
</div>
58 changes: 58 additions & 0 deletions src/lib/data/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import type { instrumentCardType } from "$lib/types/types";

export const instruments:instrumentCardType[] = [
{
id: 1,
name: 'Schlagzeug',
audio:'',
image:'001-schlagzeug.png'
},
{
id: 2,
name: 'Gitarre',
audio:'',
image:'002-spanische-gitarre.png'
},
{
id: 3,
name: 'Bass',
audio:'',
image:'003-elektrische-gitarre.png'
},
{
id: 4,
name: 'Synthesizer',
audio:'',
image:'004-elektrisches-klavier.png'
},
{
id: 5,
name: 'Piano',
audio:'',
image:'005-tastatur.png'
},
{
id: 6,
name: 'Trompete',
audio:'',
image:'006-trompete.png'
},
{
id: 7,
name: 'Violine',
audio:'',
image:'007-violine.png'
},
{
id: 8,
name: 'Saxophone',
audio:'',
image:'008-saxophon.png'
},
{
id: 9,
name: 'Mikrophone',
audio:'',
image:'009-karaoke.png'
}
]
6 changes: 6 additions & 0 deletions src/lib/types/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface instrumentCardType {
id: number;
name: string;
image: string;
audio: string;
}
24 changes: 23 additions & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
<script>
import { AppShell } from '@skeletonlabs/skeleton';
import { AppBar } from '@skeletonlabs/skeleton';
import Logo from "$lib/assets/logo.png"
import '../app.postcss';
</script>

<slot />
<AppShell>
<svelte:fragment slot="header">
<AppBar gridColumns="grid-cols-3" slotDefault="place-self-center" slotTrail="place-content-end">
<svelte:fragment slot="lead">
<img src={Logo} alt="download icon" class="w-24"/>
</svelte:fragment>

<h1 class="h1">Instrumenten Spiel </h1>
</AppBar>
</svelte:fragment>

<!-- <svelte:fragment slot="sidebarLeft">Sidebar Left</svelte:fragment> -->
<!-- (sidebarRight) -->
<!-- (pageHeader) -->
<!-- Router Slot -->
<slot />
<!-- ---- / ---- -->
<!-- <svelte:fragment slot="pageFooter">Page Footer</svelte:fragment> -->
<!-- (footer) -->
</AppShell>
19 changes: 16 additions & 3 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
<div class="card">
<h1 class="h1">Welcome to SvelteKit</h1>
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
<script>
import InstrumentCard from "$lib/components/InstrumentCard.svelte";
import { instruments } from "$lib/data/data"
</script>


<div class="grid grid-cols-5 self-center gap-14 p-5 my-5">

{#each instruments as instrument}
<InstrumentCard {...instrument}/>
{/each}

</div>


Binary file added static/images/001-schlagzeug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/002-spanische-gitarre.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/003-elektrische-gitarre.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/004-elektrisches-klavier.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/005-tastatur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/006-trompete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/007-violine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/008-saxophon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/009-karaoke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion static/images/instruments/backup.txt

This file was deleted.

Loading

0 comments on commit 9b8ed69

Please sign in to comment.