Updated git url.
All checks were successful
Build and deploy website / build (push) Successful in 1m20s
Build and deploy website / deploy (push) Successful in 2s

Added various icons.

Started adding hardwarePage content

Signed-off-by: Martin Berg Alstad <git@martials.no>
This commit is contained in:
2024-09-28 15:33:31 +02:00
parent 2bead91a32
commit 93c6c852af
16 changed files with 133 additions and 50 deletions

View File

@ -1,11 +1,23 @@
<script lang="ts">
import Select from "./Select.svelte"
import { getCollection } from "astro:content"
getCollection("hardware")
.then((collection) => {
console.log(collection)
})
// TODO fetch selected hardware from content collection
let selectedHardware: string = "CPU"
function onChange({ detail }: CustomEvent<string>) {
console.log(detail)
selectedHardware = detail
}
// TODO show the selected hardware
</script>
<Select options={["CPU", "GPU", "RAM"]} on:change={onChange} />
<div>
<h2>{selectedHardware}</h2>
<Select options={["CPU", "GPU", "RAM"]} on:change={onChange} />
</div>

View File

@ -26,7 +26,7 @@ const {
heroImageAlt,
source,
createdAt,
updatedAt
updatedAt,
} = entry!.data
---

View File

@ -5,9 +5,11 @@
const dispatch = createEventDispatcher<{ change: string }>()
</script>
<select class="select select-bordered w-full max-w-xs"
on:change={(value) => dispatch("change", value.currentTarget.value)}>
<select
class="select select-bordered w-full max-w-xs"
on:change={(value) => dispatch("change", value.currentTarget.value)}
>
{#each options as option}
<option value={option}>{option}</option>
{/each}
</select>
</select>