6 Commits

Author SHA1 Message Date
cb00252364 🎨 Format files, Added codeberg to links,lighter colour for linkcards
All checks were successful
Build and deploy website / build (push) Successful in 33s
2025-02-15 14:59:32 +01:00
04f279dab3 👽️ Updated legacy svelte components to runes
All checks were successful
Build and deploy website / build (push) Successful in 1m7s
2025-02-15 14:34:47 +01:00
7c5b228e59 📦️ Updated Tailwind to v4, updated hardware to uses 2025-02-15 13:29:01 +01:00
cfd11a98ec Fixed Type error
All checks were successful
Build and deploy website / build (push) Successful in 35s
2025-01-19 20:07:26 +01:00
89a349b4fd ⬆ Updated all packages to latest stable, changed hardware url to /uses
Some checks failed
Build and deploy website / build (push) Failing after 42s
2025-01-19 20:04:06 +01:00
2fc18f642d Updated keyboard in hardware config
All checks were successful
Build and deploy website / build (push) Successful in 1m1s
2025-01-04 17:50:25 +01:00
42 changed files with 1615 additions and 1587 deletions

View File

@ -1,7 +1,7 @@
// @ts-check // @ts-check
import { defineConfig, envField } from "astro/config" import { defineConfig, envField } from "astro/config"
import paraglide from "@inlang/paraglide-astro" import paraglide from "@inlang/paraglide-astro"
import tailwind from "@astrojs/tailwind" import tailwindcss from "@tailwindcss/vite"
import sitemap from "@astrojs/sitemap" import sitemap from "@astrojs/sitemap"
import svelte from "@astrojs/svelte" import svelte from "@astrojs/svelte"
import node from "@astrojs/node" import node from "@astrojs/node"
@ -20,10 +20,9 @@ export default defineConfig({
output: "server", output: "server",
i18n: { i18n: {
defaultLocale: "nb", defaultLocale: "nb",
locales: ["nb", "en"] locales: ["nb", "en"],
}, },
integrations: [ integrations: [
tailwind(),
sitemap(), sitemap(),
mdx(), mdx(),
svelte(), svelte(),
@ -31,18 +30,21 @@ export default defineConfig({
paraglide({ paraglide({
// recommended settings // recommended settings
project: "./project.inlang", project: "./project.inlang",
outdir: "./src/paraglide" //where your files should be outdir: "./src/paraglide", //where your files should be
}) }),
], ],
adapter: node({ adapter: node({
mode: "standalone" mode: "standalone",
}), }),
vite: {
plugins: [tailwindcss()],
},
env: { env: {
schema: { schema: {
DOMAIN: envField.string({ context: "client", access: "public" }), DOMAIN: envField.string({ context: "client", access: "public" }),
URL: envField.string({ context: "client", access: "public" }), URL: envField.string({ context: "client", access: "public" }),
GIT_URL: envField.string({ context: "client", access: "public" }), GIT_URL: envField.string({ context: "client", access: "public" }),
STATUS_URL: envField.string({ context: "client", access: "public" }) STATUS_URL: envField.string({ context: "client", access: "public" }),
} },
} },
}) })

View File

@ -7,11 +7,13 @@
"contactMe": "Contact me", "contactMe": "Contact me",
"myLinks": "My links", "myLinks": "My links",
"myProjects": "My projects", "myProjects": "My projects",
"uses": "Uses",
"hardware": "Hardware", "hardware": "Hardware",
"accessories": "Accessories", "accessories": "Accessories",
"sourceCode": "Source code", "sourceCode": "Source code",
"createdAt": "Created at", "createdAt": "Created at",
"updatedAt": "Updated at", "updatedAt": "Updated at",
"forMirrors": "For mirrors of Gitea",
"forPersonalProjects": "For personal projects", "forPersonalProjects": "For personal projects",
"status": "Status", "status": "Status",
"name": "Name", "name": "Name",

View File

@ -7,11 +7,13 @@
"contactMe": "Kontakt meg", "contactMe": "Kontakt meg",
"myLinks": "Mine lenker", "myLinks": "Mine lenker",
"myProjects": "Mine prosjekter", "myProjects": "Mine prosjekter",
"uses": "Uses",
"hardware": "Maskinvare", "hardware": "Maskinvare",
"accessories": "Tilbehør", "accessories": "Tilbehør",
"sourceCode": "Kildekode", "sourceCode": "Kildekode",
"createdAt": "Opprettet", "createdAt": "Opprettet",
"updatedAt": "Oppdatert", "updatedAt": "Oppdatert",
"forMirrors": "For mirrors av Gitea",
"forPersonalProjects": "For personlige prosjekter", "forPersonalProjects": "For personlige prosjekter",
"status": "Status", "status": "Status",
"name": "Navn", "name": "Navn",

View File

@ -8,34 +8,35 @@
"build": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide && astro check && astro build", "build": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide && astro check && astro build",
"preview": "astro preview", "preview": "astro preview",
"astro": "astro", "astro": "astro",
"type-check": "astro check",
"postinstall": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide", "postinstall": "paraglide-js compile --project ./project.inlang --outdir ./src/paraglide",
"format": "prettier --write \"./src/**/*.{js,mjs,ts,astro,svelte,css,md,json}\"", "format": "prettier --write \"./src/**/*.{js,mjs,ts,astro,svelte,css,md,json}\"",
"watch-messages": "paraglide-js compile --watch --project ./project.inlang --outdir ./src/paraglide" "watch-messages": "paraglide-js compile --watch --project ./project.inlang --outdir ./src/paraglide"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",
"@astrojs/mdx": "4.0.0-beta.2", "@astrojs/mdx": "^4.0.8",
"@astrojs/node": "9.0.0-beta.2", "@astrojs/node": "9.1.0",
"@astrojs/sitemap": "^3.2.1", "@astrojs/sitemap": "^3.2.1",
"@astrojs/svelte": "6.0.0-beta.1", "@astrojs/svelte": "^7.0.4",
"@astrojs/tailwind": "^5.1.2", "@iconify-json/pajamas": "^1.2.5",
"@iconify-json/pajamas": "^1.2.3", "@inlang/paraglide-astro": "^0.3.5",
"@inlang/paraglide-astro": "^0.2.2", "@inlang/paraglide-js": "1.11.8",
"@inlang/paraglide-js": "1.11.2", "@tailwindcss/typography": "^0.5.16",
"@tailwindcss/typography": "^0.5.15", "@tailwindcss/vite": "^4.0.6",
"astro": "5.0.0-beta.5", "astro": "5.3.0",
"astro-icon": "^1.1.1", "astro-icon": "^1.1.5",
"sharp": "^0.33.5", "sharp": "^0.33.5",
"svelte": "^4.2.19", "svelte": "^5.20.1",
"tailwindcss": "^3.4.13", "tailwindcss": "^4.0.6",
"typescript": "^5.6.3" "typescript": "^5.7.3"
}, },
"devDependencies": { "devDependencies": {
"daisyui": "^4.12.13", "daisyui": "^5.0.0-beta.8",
"prettier": "^3.3.3", "prettier": "^3.5.1",
"prettier-plugin-astro": "^0.14.1", "prettier-plugin-astro": "^0.14.1",
"prettier-plugin-svelte": "^3.2.7", "prettier-plugin-svelte": "^3.3.3",
"vite": "^5.4.8" "vite": "^6.1.0"
}, },
"prettier": { "prettier": {
"semi": false, "semi": false,

2751
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -4,14 +4,20 @@ import * as m from "@/paraglide/messages.js"
// TODO self-host email server // TODO self-host email server
--- ---
<form class="flex flex-col gap-2 max-w-[500px] mx-auto" method="post" action="https://formspree.io/f/mknykgbn"> <form
class="flex flex-col gap-2 max-w-[500px] mx-auto"
method="post"
action="https://formspree.io/f/mknykgbn"
>
<Input label={m.name()} type="text" name="name" required /> <Input label={m.name()} type="text" name="name" required />
<Input label={m.subject()} name="subject" required /> <Input label={m.subject()} name="subject" required />
<Input label={m.email()} name="_replyto" /> <Input label={m.email()} name="_replyto" />
<input name="_gotcha" type="text" class={"hidden"} /> { /*Honeypot spam filter*/} <input name="_gotcha" type="text" class={"hidden"} />
{/*Honeypot spam filter*/}
<label class="flex flex-col"> <label class="flex flex-col">
{m.message()} {m.message()}
<textarea name="message" class="textarea textarea-bordered" required></textarea> <textarea name="message" class="textarea textarea-bordered" required
></textarea>
</label> </label>
<button type="submit">{m.send()}</button> <button type="submit">{m.send()}</button>
</form> </form>

View File

@ -9,7 +9,7 @@ import * as m from "@/paraglide/messages"
const giteaLink = `${GIT_URL}/martials/martials.no` const giteaLink = `${GIT_URL}/martials/martials.no`
--- ---
<div class="divider" /> <div class="divider"></div>
<div class="py-5 flex flex-row gap-1 justify-around w-full items-center"> <div class="py-5 flex flex-row gap-1 justify-around w-full items-center">
<div> <div>
<GiteaLink href={giteaLink} /> <GiteaLink href={giteaLink} />

View File

@ -16,7 +16,14 @@ import "@/styles/global.css"
</h1> </h1>
<p class="mx-1 sm:my-10">{m.aboutMe()}</p> <p class="mx-1 sm:my-10">{m.aboutMe()}</p>
</div> </div>
<Image src={me} alt="Me on a hike" width="400" height="400" class="p-5 mx-auto" loading={"eager"} /> <Image
src={me}
alt="Me on a hike"
width="400"
height="400"
class="p-5 mx-auto"
loading={"eager"}
/>
</div> </div>
<!-- Mastodon verification --> <!-- Mastodon verification -->
<a rel="me" href="https://snabelen.no/@Martials" class="hidden">Mastodon</a> <a rel="me" href="https://snabelen.no/@Martials" class="hidden">Mastodon</a>

View File

@ -1,34 +0,0 @@
<script lang="ts">
import Select from "./Select.svelte"
import * as m from "@/paraglide/messages"
import CollapseList from "@/components/collapse/CollapseList.svelte"
export let hardware: any[] = []
const hardwareOptions = hardware.map((item) => ({
key: item.id,
value: item.data.title
}))
let selectedHardwareKey: string = hardware[0].id
$: selectedHardware = hardware.find((item) => item.id === selectedHardwareKey)!
// TODO bind to component
function onChange({ detail }: CustomEvent<string>) {
selectedHardwareKey = detail
}
</script>
<div class="px-2 max-w-[750px] sm:min-w-[750px] w-screen">
<h1 class="text-center">{m.hardware()}</h1>
<div>
<Select options={hardwareOptions} on:change={onChange} class="mx-auto w-max" />
</div>
<br />
<CollapseList items={selectedHardware.data.hardware} title={m.hardware()} />
<div class="my-2" />
{#if (selectedHardware.data.accessories)}
<CollapseList items={selectedHardware.data.accessories} title={m.accessories()} />
{/if}
</div>

View File

@ -6,6 +6,10 @@ const currentPath = resolvePathname(Astro.url.pathname)
--- ---
<div class="join"> <div class="join">
<LocaleLink to={currentPath as NavLink} lang="nb" class="btn join-item">Norsk</LocaleLink> <LocaleLink to={currentPath as NavLink} lang="nb" class="btn join-item"
<LocaleLink to={currentPath as NavLink} lang="en" class="btn join-item">English</LocaleLink> >Norsk</LocaleLink
>
<LocaleLink to={currentPath as NavLink} lang="en" class="btn join-item"
>English</LocaleLink
>
</div> </div>

View File

@ -1,20 +1,22 @@
<script lang="ts"> <script lang="ts">
import { createEventDispatcher } from "svelte"
// TODO move to types? // TODO move to types?
interface Option { interface Option<Key> {
key: string key: Key
value: string value: string
} }
export let options: Option[] = [] interface Props<Key = string> {
// TODO bind data instead of dispatching events selected: Key
const dispatch = createEventDispatcher<{ change: string }>() options?: Option<Key>[]
class?: string
}
let { selected = $bindable(), options = [], class: clazz }: Props = $props()
</script> </script>
<select <select
class="select select-bordered w-full max-w-xs ${$$restProps.class}" bind:value={selected}
on:change={(value) => dispatch("change", value.currentTarget.value)} class="select select-bordered w-full max-w-xs ${clazz}"
> >
{#each options as { key, value }} {#each options as { key, value }}
<option value={key}>{value}</option> <option value={key}>{value}</option>

View File

@ -0,0 +1,44 @@
<script lang="ts">
import Select from "./Select.svelte"
import * as m from "@/paraglide/messages"
import CollapseList from "@/components/collapse/CollapseList.svelte"
import type { CollectionEntry } from "astro:content"
interface Props {
uses: CollectionEntry<"uses">[]
}
const { uses }: Props = $props()
const hardwareOptions = uses.map((item) => ({
key: item.id,
value: item.data.title,
}))
let selectedHardwareKey = $state(uses[0].id)
let selectedHardware = $derived(
uses.find((item) => item.id === selectedHardwareKey)!,
)
// TODO set url query param to selected hardware
</script>
<div class="px-2 max-w-[750px] sm:min-w-[750px] w-screen">
<h1 class="text-center">{m.uses()}</h1>
<div>
<Select
options={hardwareOptions}
bind:selected={selectedHardwareKey}
class="mx-auto w-max"
/>
</div>
<br />
<CollapseList items={selectedHardware.data.hardware} title={m.hardware()} />
<div class="my-2"></div>
{#if selectedHardware.data.accessories}
<CollapseList
items={selectedHardware.data.accessories}
title={m.accessories()}
/>
{/if}
</div>

View File

@ -1,10 +1,17 @@
<script lang="ts"> <script lang="ts">
export let title: string = "" import type { Snippet } from "svelte"
interface Props {
title?: string
children: Snippet
}
const { title = "", children }: Props = $props()
</script> </script>
<details class="collapse collapse-arrow bg-base-200"> <details class="collapse collapse-arrow bg-base-200">
<summary class="collapse-title text-xl font-medium">{title}</summary> <summary class="collapse-title text-xl font-medium">{title}</summary>
<div class="collapse-content"> <div class="collapse-content">
<slot /> {@render children()}
</div> </div>
</details> </details>

View File

@ -1,12 +1,15 @@
<script lang="ts"> <script lang="ts">
import Collapse from "@/components/collapse/Collapse.svelte" import Collapse from "@/components/collapse/Collapse.svelte"
export let items: string[] = [] interface Props {
export let title: string = "" items?: string[]
title?: string
}
const { items = [], title = "" }: Props = $props()
</script> </script>
<Collapse title={title}> <Collapse {title}>
<ul> <ul>
{#each items as item} {#each items as item}
<li class="list-disc ml-5">{item}</li> <li class="list-disc ml-5">{item}</li>

View File

@ -7,4 +7,4 @@ interface Props {
const { class: clazz } = Astro.props const { class: clazz } = Astro.props
--- ---
<PajamasIcon name="pajamas:gitea" class={clazz}></PajamasIcon> <PajamasIcon name="pajamas:gitea" class={clazz} />

View File

@ -7,6 +7,12 @@ interface Props extends LinkProps {
const { href, noStyle = false, class: clazz, ...props } = Astro.props const { href, noStyle = false, class: clazz, ...props } = Astro.props
--- ---
<a href={href} target="_blank" rel="noopener" class:list={[noStyle ? "" : "link", clazz]} {...props}> <a
href={href}
target="_blank"
rel="noopener"
class:list={[noStyle ? "" : "link", clazz]}
{...props}
>
<slot /> <slot />
</a> </a>

View File

@ -11,7 +11,7 @@ const { title, message, url, icon, class: clazz } = Astro.props
--- ---
<ExternalLink href={url} noStyle> <ExternalLink href={url} noStyle>
<div class:list={["card bg-neutral", clazz]}> <div class:list={["card bg-base-300", clazz]}>
<div class="card-body p-5 flex flex-row items-center"> <div class="card-body p-5 flex flex-row items-center">
<PajamasIcon name={icon ?? "pajamas:link"} class="w-6 h-6" /> <PajamasIcon name={icon ?? "pajamas:link"} class="w-6 h-6" />
<div> <div>

View File

@ -3,44 +3,50 @@ import { GIT_URL } from "astro:env/client"
import * as m from "@/paraglide/messages" import * as m from "@/paraglide/messages"
export interface MyLink { export interface MyLink {
title: string; title: string
url: string; url: string
message?: string; message?: string
icon?: PajamasIcon icon?: PajamasIcon
} }
export default [ export default [
{ {
title: "GitHub", title: "Codeberg",
url: "https://github.com/emberal", url: "https://codeberg.org/martials",
icon: "pajamas:github" message: m.forMirrors(),
icon: "pajamas:git",
}, },
{ {
title: "Gitea", title: "Gitea",
url: `${GIT_URL}/martials`, url: `${GIT_URL}/martials`,
message: m.forPersonalProjects(), message: m.forPersonalProjects(),
icon: "pajamas:gitea" icon: "pajamas:gitea",
},
{
title: "GitHub",
url: "https://github.com/emberal",
icon: "pajamas:github",
}, },
{ {
title: "LinkedIn", title: "LinkedIn",
url: "https://www.linkedin.com/in/martin-b-2a69391a3/", url: "https://www.linkedin.com/in/martin-b-2a69391a3/",
icon: "pajamas:linkedin" icon: "pajamas:linkedin",
}, },
{ {
title: "Mastodon (Snabelen)", title: "Mastodon (Snabelen.no)",
url: "https://snabelen.no/@Martials", url: "https://snabelen.no/@Martials",
icon: "pajamas:mastodon" icon: "pajamas:mastodon",
}, },
{ {
title: "Pixelfed", title: "Pixelfed",
url: "https://pixelfed.social/i/web/profile/261454857934868480" url: "https://pixelfed.social/i/web/profile/261454857934868480",
}, },
{ {
title: "Steam", title: "Steam",
url: "https://steamcommunity.com/id/martials/" url: "https://steamcommunity.com/id/martials/",
}, },
{ {
title: "Trakt.tv", title: "Trakt.tv",
url: "https://trakt.tv/users/martials" url: "https://trakt.tv/users/martials",
} },
] satisfies MyLink[] ] as MyLink[]

View File

@ -17,10 +17,7 @@ const baseUrl: NavLink = "/projects"
<div class="flex flex-wrap justify-around"> <div class="flex flex-wrap justify-around">
{ {
projects.map( projects.map(
({ ({ data: { title, description, tags, heroImage, heroImageAlt }, id }) => (
data: { title, description, tags, heroImage, heroImageAlt },
id
}) => (
<div class="my-5 px-2"> <div class="my-5 px-2">
<ProjectCard <ProjectCard
title={title} title={title}
@ -31,7 +28,7 @@ const baseUrl: NavLink = "/projects"
imageAlt={heroImageAlt} imageAlt={heroImageAlt}
/> />
</div> </div>
) ),
) )
} }
</div> </div>

View File

@ -15,7 +15,7 @@ interface Props {
const { project } = Astro.props const { project } = Astro.props
const entry = await getEntry("projects", project) const entry = await getEntry("projects", project)
const { Content } = await render(entry) const { Content } = await render(entry!)
const { const {
title, title,
description, description,
@ -24,7 +24,7 @@ const {
heroImageAlt, heroImageAlt,
source, source,
createdAt, createdAt,
updatedAt updatedAt,
} = entry!.data } = entry!.data
--- ---

View File

@ -12,20 +12,20 @@ const projectCollection = defineCollection({
tags: z.array(z.string()), tags: z.array(z.string()),
source: z.string(), source: z.string(),
createdAt: z.string(), createdAt: z.string(),
updatedAt: z.string() updatedAt: z.string(),
}) }),
}) })
const hardwareCollection = defineCollection({ const usesCollection = defineCollection({
loader: glob({ pattern: "**\/*.yaml", base: "./src/content/hardware" }), loader: glob({ pattern: "**\/*.yaml", base: "./src/content/uses" }),
schema: z.object({ schema: z.object({
title: z.string(), title: z.string(),
accessories: z.optional(z.array(z.string())), accessories: z.optional(z.array(z.string())),
hardware: z.array(z.string()) hardware: z.array(z.string()),
}) }),
}) })
export const collections = { export const collections = {
projects: projectCollection, projects: projectCollection,
hardware: hardwareCollection uses: usesCollection,
} }

View File

@ -2,8 +2,8 @@ title: Desktop
accessories: accessories:
- Gaming chair | Arozzi Mezzo V2 Gaming chair Fabric Black/Red # https://www.komplett.no/product/1079732?noredirect=true - Gaming chair | Arozzi Mezzo V2 Gaming chair Fabric Black/Red # https://www.komplett.no/product/1079732?noredirect=true
- Headset | Logitech PRO X LIGHTSPEED Wireless Gaming Headset # https://www.komplett.no/product/1162749?noredirect=true - Headset | Logitech PRO X LIGHTSPEED Wireless Gaming Headset # https://www.komplett.no/product/1162749?noredirect=true
- Keyboard | Logitech G710 - Keyboard | Keychron K8 Pro QMK/VIA RGB Gateron Red # https://www.komplett.no/product/1303473/gaming/gaming-utstyr/gamingtastatur/keychron-k8-pro-qmkvia-rgb-gateron-red-traadloest-gamingtastatur-sort
- Monitor 1 | AOC 27" LED FreeSync G2790PX # https://www.komplett.no/product/975642?noredirect=true - Monitor 1 | Philips 34" 34M2C6500/00 # https://www.komplett.no/product/1307753/gaming/gaming-utstyr/gamingskjermer/philips-34-gamingskjerm-34m2c650000
- Monitor 2 | Asus 28" 4K LED PB287Q # https://www.komplett.no/product/815114?noredirect=true - Monitor 2 | Asus 28" 4K LED PB287Q # https://www.komplett.no/product/815114?noredirect=true
- Mouse | Logitech G502 HERO Gaming Mouse - Mouse | Logitech G502 HERO Gaming Mouse
- Mousepad | Svive Styx ESGR Gaming Mousepad XXL # https://www.komplett.no/product/985884?noredirect=true - Mousepad | Svive Styx ESGR Gaming Mousepad XXL # https://www.komplett.no/product/985884?noredirect=true

View File

@ -1,3 +1,3 @@
title: Home Server title: Homelab
hardware: hardware:
- b # Graphics cards, CPUs, etc. - b # Graphics cards, CPUs, etc.

View File

@ -12,20 +12,20 @@ const { title, class: clazz } = Astro.props
<!doctype html> <!doctype html>
<html lang={languageTag()} dir={"ltr"}> <html lang={languageTag()} dir={"ltr"}>
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="description" content="Astro description" /> <meta name="description" content="Astro description" />
<meta name="viewport" content="width=device-width" /> <meta name="viewport" content="width=device-width" />
<link rel="sitemap" href="/sitemap-index.xml" /> <link rel="sitemap" href="/sitemap-index.xml" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} /> <meta name="generator" content={Astro.generator} />
<title>{title}</title> <title>{title}</title>
</head> </head>
<body class="flex flex-col h-screen"> <body class="flex flex-col h-screen">
<Navbar /> <Navbar />
<main class:list={["grow", clazz]}> <main class:list={["grow", clazz]}>
<slot /> <slot />
</main> </main>
<Footer /> <Footer />
</body> </body>
</html> </html>

View File

@ -9,24 +9,24 @@ interface Link {
const Links: Link[] = [ const Links: Link[] = [
{ {
label: m.home, label: m.home,
to: "/" to: "/",
}, },
{ {
label: m.myProjects, label: m.myProjects,
to: "/projects" to: "/projects",
}, },
{ {
label: m.myLinks, label: m.myLinks,
to: "/links" to: "/links",
}, },
{ {
label: m.hardware, label: m.uses,
to: "/hardware" to: "/uses",
}, },
{ {
label: m.contactMe, label: m.contactMe,
to: "/contact" to: "/contact",
} },
] ]
export default Links export default Links

View File

@ -1,5 +1,6 @@
--- ---
import Layout from "../layouts/Layout.astro" import Layout from "../layouts/Layout.astro"
import "@/styles/global.css"
--- ---
<Layout title="404"> <Layout title="404">

View File

@ -1,6 +1,7 @@
--- ---
import OnePager from "../../components/Greeting.astro" import OnePager from "../../components/Greeting.astro"
import Layout from "../../layouts/Layout.astro" import Layout from "../../layouts/Layout.astro"
import "@/styles/global.css"
--- ---
<Layout title="Welcome"> <Layout title="Welcome">

View File

@ -1,7 +1,9 @@
--- ---
import Layout from "@/layouts/Layout.astro" import Layout from "@/layouts/Layout.astro"
import LinksPage from "@/components/myLinks/LinksPage.astro" import LinksPage from "@/components/myLinks/LinksPage.astro"
import "@/styles/global.css"
--- ---
<Layout title="My links"> <Layout title="My links">
<LinksPage /> <LinksPage />
</Layout> </Layout>

View File

@ -1,6 +1,7 @@
--- ---
import ProjectPage from "@/components/projects/ProjectPage.astro" import ProjectPage from "@/components/projects/ProjectPage.astro"
import { type GetStaticPathsResult } from "astro" import { type GetStaticPathsResult } from "astro"
import "@/styles/global.css"
// Prerender the page as static HTML during build // Prerender the page as static HTML during build
export const prerender = true export const prerender = true
@ -9,7 +10,7 @@ export function getStaticPaths(): GetStaticPathsResult {
return [ return [
{ params: { project: "hvl-ics-simplifier" } }, { params: { project: "hvl-ics-simplifier" } },
{ params: { project: "homepage" } }, { params: { project: "homepage" } },
{ params: { project: "simplify-truths" } } { params: { project: "simplify-truths" } },
] ]
} }

View File

@ -2,6 +2,7 @@
import { getCollection } from "astro:content" import { getCollection } from "astro:content"
import Layout from "@/layouts/Layout.astro" import Layout from "@/layouts/Layout.astro"
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro" import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
import "@/styles/global.css"
const projects = await getCollection("projects") const projects = await getCollection("projects")
--- ---

View File

@ -1,12 +1,12 @@
--- ---
import Layout from "@/layouts/Layout.astro" import Layout from "@/layouts/Layout.astro"
import HardwarePage from "@/components/HardwarePage.svelte" import UsesPage from "@/components/UsesPage.svelte"
import "@/styles/global.css" import "@/styles/global.css"
import { getCollection } from "astro:content" import { getCollection } from "astro:content"
const hardware = await getCollection("hardware") const uses = await getCollection("uses")
--- ---
<Layout title="Hardware" class="mx-auto max-w-[750px]"> <Layout title="Hardware" class="mx-auto max-w-[750px]">
<HardwarePage server:defer hardware={hardware} /> <UsesPage client:load uses={uses} />
</Layout> </Layout>

View File

@ -1,6 +1,8 @@
--- ---
import Layout from "../layouts/Layout.astro" import Layout from "../layouts/Layout.astro"
import Greeting from "../components/Greeting.astro" import Greeting from "../components/Greeting.astro"
// https://slashpages.net/
--- ---
<Layout title="Velkommen"> <Layout title="Velkommen">

View File

@ -1,7 +1,9 @@
--- ---
import Layout from "@/layouts/Layout.astro" import Layout from "@/layouts/Layout.astro"
import LinksPage from "@/components/myLinks/LinksPage.astro" import LinksPage from "@/components/myLinks/LinksPage.astro"
import "@/styles/global.css"
--- ---
<Layout title="Mine lenker"> <Layout title="Mine lenker">
<LinksPage /> <LinksPage />
</Layout> </Layout>

View File

@ -1,6 +1,7 @@
--- ---
import ProjectPage from "@/components/projects/ProjectPage.astro" import ProjectPage from "@/components/projects/ProjectPage.astro"
import { type GetStaticPathsResult } from "astro" import { type GetStaticPathsResult } from "astro"
import "@/styles/global.css"
// Prerender the page as static HTML during build // Prerender the page as static HTML during build
export const prerender = true export const prerender = true
@ -9,7 +10,7 @@ export function getStaticPaths(): GetStaticPathsResult {
return [ return [
{ params: { project: "hvl-ics-simplifier" } }, { params: { project: "hvl-ics-simplifier" } },
{ params: { project: "homepage" } }, { params: { project: "homepage" } },
{ params: { project: "simplify-truths" } } { params: { project: "simplify-truths" } },
] ]
} }

View File

@ -2,6 +2,7 @@
import { getCollection } from "astro:content" import { getCollection } from "astro:content"
import Layout from "@/layouts/Layout.astro" import Layout from "@/layouts/Layout.astro"
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro" import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
import "@/styles/global.css"
const projects = await getCollection("projects") const projects = await getCollection("projects")
--- ---

View File

@ -1,12 +1,12 @@
--- ---
import Layout from "@/layouts/Layout.astro" import Layout from "@/layouts/Layout.astro"
import HardwarePage from "@/components/HardwarePage.svelte" import UsesPage from "@/components/UsesPage.svelte"
import "@/styles/global.css" import "@/styles/global.css"
import { getCollection } from "astro:content" import { getCollection } from "astro:content"
const hardware = await getCollection("hardware") const uses = await getCollection("uses")
--- ---
<Layout title="Hardware" class="mx-auto max-w-[750px]"> <Layout title="Hardware" class="mx-auto max-w-[750px]">
<HardwarePage server:defer hardware={hardware} /> <UsesPage client:load uses={uses} />
</Layout> </Layout>

View File

@ -1,28 +1,28 @@
@tailwind base; @import "tailwindcss";
@tailwind components; @plugin "@tailwindcss/typography";
@tailwind utilities; @plugin "daisyui";
@layer utilities { @layer utilities {
.debug { .debug {
@apply border border-red-500; @apply border border-red-500;
} }
} }
@layer base { @layer base {
br { br {
@apply my-0.5; @apply my-0.5;
} }
h1 { h1 {
@apply text-4xl font-bold mb-2; @apply text-4xl font-bold mb-2;
} }
h2 { h2 {
@apply text-3xl font-bold mb-2; @apply text-3xl font-bold mb-2;
} }
/* TODO change default style*/ /* TODO change default style*/
a { a {
@apply link @apply link;
} }
} }

View File

@ -1,3 +1,13 @@
export type Icon = "gitea" | "github" | "mastodon" | "linkedin" | "link" | "status-health" /**
* @see https://icon-sets.iconify.design/pajamas/
*/
export type Icon =
| "git"
| "gitea"
| "github"
| "mastodon"
| "linkedin"
| "link"
| "status-health"
export type PajamasIcon = `pajamas:${Icon}` export type PajamasIcon = `pajamas:${Icon}`

View File

@ -1,8 +1,8 @@
export interface ComponentProps { export interface ComponentProps {
class?: string; class?: string
title?: string; title?: string
} }
export interface LinkProps extends ComponentProps { export interface LinkProps extends ComponentProps {
href: string; href: string
} }

View File

@ -7,19 +7,19 @@ interface TranslatedPathnames {
} }
export type NavLink = export type NavLink =
"/" | "/"
| "/contact" | "/contact"
| "/projects" | "/projects"
| `/projects/${Project["id"]}` | `/projects/${Project["id"]}`
| "/links" | "/links"
| "/hardware" | "/uses"
const paths: Set<NavLink> = new Set([ const paths: Set<NavLink> = new Set([
"/", "/",
"/contact", "/contact",
"/projects", "/projects",
"/links", "/links",
"/hardware" "/uses",
]) ])
/** /**
@ -33,13 +33,13 @@ const pathnames: Record<AbsolutePathname, TranslatedPathnames> = {}
for (const path of paths) { for (const path of paths) {
pathnames[path] = { pathnames[path] = {
nb: path, nb: path,
en: `/en${path}` en: `/en${path}`,
} }
} }
export function localizePathname( export function localizePathname(
pathname: NavLink, pathname: NavLink,
locale: AvailableLanguageTag locale: AvailableLanguageTag,
): string { ): string {
const pathnameParts = pathname.split("/") const pathnameParts = pathname.split("/")
const firstSegment: AbsolutePathname = `/${pathnameParts[1]}` const firstSegment: AbsolutePathname = `/${pathnameParts[1]}`

View File

@ -1,8 +0,0 @@
/** @type {import("tailwindcss").Config} */
export default {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
theme: {
extend: {}
},
plugins: [require("@tailwindcss/typography"), require("daisyui")]
}