Updated git url.
Added various icons. Started adding hardwarePage content Signed-off-by: Martin Berg Alstad <git@martials.no>
This commit is contained in:
@ -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>
|
||||
|
@ -26,7 +26,7 @@ const {
|
||||
heroImageAlt,
|
||||
source,
|
||||
createdAt,
|
||||
updatedAt
|
||||
updatedAt,
|
||||
} = entry!.data
|
||||
---
|
||||
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user