📦️ Updated Tailwind to v4, updated hardware to uses
This commit is contained in:
parent
cfd11a98ec
commit
7c5b228e59
@ -1,7 +1,7 @@
|
||||
// @ts-check
|
||||
import { defineConfig, envField } from "astro/config"
|
||||
import paraglide from "@inlang/paraglide-astro"
|
||||
import tailwind from "@astrojs/tailwind"
|
||||
import tailwindcss from "@tailwindcss/vite"
|
||||
import sitemap from "@astrojs/sitemap"
|
||||
import svelte from "@astrojs/svelte"
|
||||
import node from "@astrojs/node"
|
||||
@ -20,10 +20,9 @@ export default defineConfig({
|
||||
output: "server",
|
||||
i18n: {
|
||||
defaultLocale: "nb",
|
||||
locales: ["nb", "en"]
|
||||
locales: ["nb", "en"],
|
||||
},
|
||||
integrations: [
|
||||
tailwind(),
|
||||
sitemap(),
|
||||
mdx(),
|
||||
svelte(),
|
||||
@ -31,18 +30,21 @@ export default defineConfig({
|
||||
paraglide({
|
||||
// recommended settings
|
||||
project: "./project.inlang",
|
||||
outdir: "./src/paraglide" //where your files should be
|
||||
})
|
||||
outdir: "./src/paraglide", //where your files should be
|
||||
}),
|
||||
],
|
||||
adapter: node({
|
||||
mode: "standalone"
|
||||
mode: "standalone",
|
||||
}),
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
env: {
|
||||
schema: {
|
||||
DOMAIN: envField.string({ context: "client", access: "public" }),
|
||||
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" }),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -7,7 +7,7 @@
|
||||
"contactMe": "Contact me",
|
||||
"myLinks": "My links",
|
||||
"myProjects": "My projects",
|
||||
"hardware": "Hardware",
|
||||
"uses": "Uses",
|
||||
"accessories": "Accessories",
|
||||
"sourceCode": "Source code",
|
||||
"createdAt": "Created at",
|
||||
|
@ -7,7 +7,7 @@
|
||||
"contactMe": "Kontakt meg",
|
||||
"myLinks": "Mine lenker",
|
||||
"myProjects": "Mine prosjekter",
|
||||
"hardware": "Maskinvare",
|
||||
"uses": "Uses",
|
||||
"accessories": "Tilbehør",
|
||||
"sourceCode": "Kildekode",
|
||||
"createdAt": "Opprettet",
|
||||
|
22
package.json
22
package.json
@ -14,28 +14,28 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@astrojs/mdx": "^4.0.6",
|
||||
"@astrojs/node": "9.0.1",
|
||||
"@astrojs/mdx": "^4.0.8",
|
||||
"@astrojs/node": "9.1.0",
|
||||
"@astrojs/sitemap": "^3.2.1",
|
||||
"@astrojs/svelte": "^7.0.3",
|
||||
"@astrojs/tailwind": "^5.1.4",
|
||||
"@iconify-json/pajamas": "^1.2.4",
|
||||
"@astrojs/svelte": "^7.0.4",
|
||||
"@iconify-json/pajamas": "^1.2.5",
|
||||
"@inlang/paraglide-astro": "^0.3.5",
|
||||
"@inlang/paraglide-js": "1.11.8",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"astro": "5.1.7",
|
||||
"@tailwindcss/vite": "^4.0.6",
|
||||
"astro": "5.3.0",
|
||||
"astro-icon": "^1.1.5",
|
||||
"sharp": "^0.33.5",
|
||||
"svelte": "^5.19.0",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"svelte": "^5.20.1",
|
||||
"tailwindcss": "^4.0.6",
|
||||
"typescript": "^5.7.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"daisyui": "^4.12.23",
|
||||
"prettier": "^3.4.2",
|
||||
"daisyui": "^5.0.0-beta.8",
|
||||
"prettier": "^3.5.1",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"prettier-plugin-svelte": "^3.3.3",
|
||||
"vite": "^6.0.7"
|
||||
"vite": "^6.1.0"
|
||||
},
|
||||
"prettier": {
|
||||
"semi": false,
|
||||
|
1370
pnpm-lock.yaml
generated
1370
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,30 +3,31 @@
|
||||
import * as m from "@/paraglide/messages"
|
||||
import CollapseList from "@/components/collapse/CollapseList.svelte"
|
||||
|
||||
export let hardware: any[] = []
|
||||
export let uses: any[] = []
|
||||
|
||||
const hardwareOptions = hardware.map((item) => ({
|
||||
const hardwareOptions = uses.map((item) => ({
|
||||
key: item.id,
|
||||
value: item.data.title
|
||||
}))
|
||||
|
||||
let selectedHardwareKey: string = hardware[0].id
|
||||
$: selectedHardware = hardware.find((item) => item.id === selectedHardwareKey)!
|
||||
let selectedHardwareKey: string = uses[0].id
|
||||
$: selectedHardware = uses.find((item) => item.id === selectedHardwareKey)!
|
||||
|
||||
// TODO bind to component
|
||||
// TODO onChange not called
|
||||
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>
|
||||
<h1 class="text-center">{m.uses()}</h1>
|
||||
<div>
|
||||
<Select options={hardwareOptions} on:change={onChange} class="mx-auto w-max" />
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<CollapseList items={selectedHardware.data.hardware} title={m.hardware()} />
|
||||
<CollapseList items={selectedHardware.data.hardware} title={m.uses()} />
|
||||
<div class="my-2"></div>
|
||||
{#if (selectedHardware.data.accessories)}
|
||||
<CollapseList items={selectedHardware.data.accessories} title={m.accessories()} />
|
@ -16,8 +16,8 @@ const projectCollection = defineCollection({
|
||||
})
|
||||
})
|
||||
|
||||
const hardwareCollection = defineCollection({
|
||||
loader: glob({ pattern: "**\/*.yaml", base: "./src/content/hardware" }),
|
||||
const usesCollection = defineCollection({
|
||||
loader: glob({ pattern: "**\/*.yaml", base: "./src/content/uses" }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
accessories: z.optional(z.array(z.string())),
|
||||
@ -27,5 +27,5 @@ const hardwareCollection = defineCollection({
|
||||
|
||||
export const collections = {
|
||||
projects: projectCollection,
|
||||
hardware: hardwareCollection
|
||||
uses: usesCollection
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ accessories:
|
||||
- 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
|
||||
- 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
|
||||
- Mouse | Logitech G502 HERO Gaming Mouse
|
||||
- Mousepad | Svive Styx ESGR Gaming Mousepad XXL # https://www.komplett.no/product/985884?noredirect=true
|
@ -1,3 +1,3 @@
|
||||
title: Home Server
|
||||
title: Homelab
|
||||
hardware:
|
||||
- b # Graphics cards, CPUs, etc.
|
@ -20,7 +20,7 @@ const Links: Link[] = [
|
||||
to: "/links"
|
||||
},
|
||||
{
|
||||
label: m.hardware,
|
||||
label: m.uses,
|
||||
to: "/uses"
|
||||
},
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro"
|
||||
import "@/styles/global.css"
|
||||
---
|
||||
|
||||
<Layout title="404">
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
import OnePager from "../../components/Greeting.astro"
|
||||
import Layout from "../../layouts/Layout.astro"
|
||||
import "@/styles/global.css"
|
||||
---
|
||||
|
||||
<Layout title="Welcome">
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import LinksPage from "@/components/myLinks/LinksPage.astro"
|
||||
import "@/styles/global.css"
|
||||
---
|
||||
<Layout title="My links">
|
||||
<LinksPage />
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
import ProjectPage from "@/components/projects/ProjectPage.astro"
|
||||
import { type GetStaticPathsResult } from "astro"
|
||||
import "@/styles/global.css"
|
||||
|
||||
// Prerender the page as static HTML during build
|
||||
export const prerender = true
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { getCollection } from "astro:content"
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
|
||||
import "@/styles/global.css"
|
||||
|
||||
const projects = await getCollection("projects")
|
||||
---
|
||||
|
@ -1,12 +1,12 @@
|
||||
---
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import HardwarePage from "@/components/HardwarePage.svelte"
|
||||
import UsesPage from "@/components/UsesPage.svelte"
|
||||
import "@/styles/global.css"
|
||||
import { getCollection } from "astro:content"
|
||||
|
||||
const hardware = await getCollection("hardware")
|
||||
const uses = await getCollection("uses")
|
||||
---
|
||||
|
||||
<Layout title="Hardware" class="mx-auto max-w-[750px]">
|
||||
<HardwarePage server:defer hardware={hardware} />
|
||||
<UsesPage server:defer uses={uses} />
|
||||
</Layout>
|
||||
|
@ -1,6 +1,9 @@
|
||||
---
|
||||
import Layout from "../layouts/Layout.astro"
|
||||
import Greeting from "../components/Greeting.astro"
|
||||
|
||||
// https://slashpages.net/
|
||||
|
||||
---
|
||||
|
||||
<Layout title="Velkommen">
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import LinksPage from "@/components/myLinks/LinksPage.astro"
|
||||
import "@/styles/global.css"
|
||||
---
|
||||
<Layout title="Mine lenker">
|
||||
<LinksPage />
|
||||
|
@ -1,6 +1,7 @@
|
||||
---
|
||||
import ProjectPage from "@/components/projects/ProjectPage.astro"
|
||||
import { type GetStaticPathsResult } from "astro"
|
||||
import "@/styles/global.css"
|
||||
|
||||
// Prerender the page as static HTML during build
|
||||
export const prerender = true
|
||||
|
@ -2,6 +2,7 @@
|
||||
import { getCollection } from "astro:content"
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import MyProjectsPage from "@/components/projects/MyProjectsPage.astro"
|
||||
import "@/styles/global.css"
|
||||
|
||||
const projects = await getCollection("projects")
|
||||
---
|
||||
|
@ -1,12 +1,12 @@
|
||||
---
|
||||
import Layout from "@/layouts/Layout.astro"
|
||||
import HardwarePage from "@/components/HardwarePage.svelte"
|
||||
import UsesPage from "@/components/UsesPage.svelte"
|
||||
import "@/styles/global.css"
|
||||
import { getCollection } from "astro:content"
|
||||
|
||||
const hardware = await getCollection("hardware")
|
||||
const uses = await getCollection("uses")
|
||||
---
|
||||
|
||||
<Layout title="Hardware" class="mx-auto max-w-[750px]">
|
||||
<HardwarePage server:defer hardware={hardware} />
|
||||
<UsesPage server:defer uses={uses} />
|
||||
</Layout>
|
||||
|
@ -1,6 +1,6 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import "tailwindcss";
|
||||
@plugin "@tailwindcss/typography";
|
||||
@plugin "daisyui";
|
||||
|
||||
@layer utilities {
|
||||
.debug {
|
||||
|
@ -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")]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user