Compare commits
13 Commits
b6a332a2fe
...
v1.0.0
Author | SHA1 | Date | |
---|---|---|---|
25a38d2f0e
|
|||
e1c3ae7d87
|
|||
22cdc634f9
|
|||
1b3c6c629e
|
|||
ff2f65bf59
|
|||
54db411930
|
|||
023c8b7c85
|
|||
cb00252364
|
|||
04f279dab3
|
|||
7c5b228e59
|
|||
cfd11a98ec
|
|||
89a349b4fd
|
|||
2fc18f642d
|
55
README.md
@ -1,54 +1,5 @@
|
|||||||
# Astro Starter Kit: Basics
|
# Homepage / portfolio
|
||||||
|
|
||||||
```sh
|
> This repository is mirrored on [Codeberg](https://codeberg.org/martials/martials.no)
|
||||||
npm create astro@latest -- --template basics
|
|
||||||
```
|
|
||||||
|
|
||||||
[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)
|
More to come!
|
||||||
[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/basics)
|
|
||||||
[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/basics/devcontainer.json)
|
|
||||||
|
|
||||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## 🚀 Project Structure
|
|
||||||
|
|
||||||
Inside of your Astro project, you'll see the following folders and files:
|
|
||||||
|
|
||||||
```text
|
|
||||||
/
|
|
||||||
├── public/
|
|
||||||
│ └── favicon.svg
|
|
||||||
├── src/
|
|
||||||
│ ├── components/
|
|
||||||
│ │ └── Card.astro
|
|
||||||
│ ├── layouts/
|
|
||||||
│ │ └── Layout.astro
|
|
||||||
│ └── pages/
|
|
||||||
│ └── index.astro
|
|
||||||
└── package.json
|
|
||||||
```
|
|
||||||
|
|
||||||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
|
|
||||||
|
|
||||||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
|
|
||||||
|
|
||||||
Any static assets, like images, can be placed in the `public/` directory.
|
|
||||||
|
|
||||||
## 🧞 Commands
|
|
||||||
|
|
||||||
All commands are run from the root of the project, from a terminal:
|
|
||||||
|
|
||||||
| Command | Action |
|
|
||||||
| :------------------------ | :----------------------------------------------- |
|
|
||||||
| `npm install` | Installs dependencies |
|
|
||||||
| `npm run dev` | Starts local dev server at `localhost:4321` |
|
|
||||||
| `npm run build` | Build your production site to `./dist/` |
|
|
||||||
| `npm run preview` | Preview your build locally, before deploying |
|
|
||||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
|
||||||
| `npm run astro -- --help` | Get help using the Astro CLI |
|
|
||||||
|
|
||||||
## 👀 Want to learn more?
|
|
||||||
|
|
||||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
|
||||||
|
52
TODO.md
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# TODO
|
||||||
|
|
||||||
|
## Code
|
||||||
|
- [ ] day.js for dates
|
||||||
|
- [ ] Nix Shell
|
||||||
|
|
||||||
|
## SSE
|
||||||
|
- [x] Correct Sitemap.xml
|
||||||
|
- [x] Correct robots.txt
|
||||||
|
- [x] Correct security.txt
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
- [x] Show current page
|
||||||
|
- [x] Correct bg colour on entire page
|
||||||
|
- [x] Hamburger menu on mobile
|
||||||
|
- [ ] Dark mode toggle
|
||||||
|
- [ ] Navigate using pathname / breadcrumbs
|
||||||
|
|
||||||
|
## Accessibility
|
||||||
|
- [x] Fix colours on buttons
|
||||||
|
- [x] Correct contrast
|
||||||
|
- [ ] All interactable elements have labels
|
||||||
|
- [x] Colour links, also in MDX posts
|
||||||
|
|
||||||
|
## ~/
|
||||||
|
- [ ] About me description
|
||||||
|
- [x] Latest projects
|
||||||
|
- [x] Non-cat image
|
||||||
|
|
||||||
|
## ~/about
|
||||||
|
- [ ] About me
|
||||||
|
|
||||||
|
## ~/links
|
||||||
|
- [ ] Add Bluesky link
|
||||||
|
- [ ] Add MusicBrainz link
|
||||||
|
- [ ] Add Archidekt link
|
||||||
|
|
||||||
|
## ~/slashes
|
||||||
|
- [ ] List of all slashes
|
||||||
|
|
||||||
|
## ~/uses
|
||||||
|
- [ ] Homelab uses
|
||||||
|
- [ ] Raspberry PI uses
|
||||||
|
- [ ] Hardware anchor
|
||||||
|
|
||||||
|
## ~/certifications
|
||||||
|
- [ ] Embed certifications
|
||||||
|
|
||||||
|
## ~/tools
|
||||||
|
|
||||||
|
### /simplify-truths
|
||||||
|
- [ ] Merge simplify truths implementation
|
@ -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"
|
||||||
@ -10,39 +10,40 @@ import icon from "astro-icon"
|
|||||||
|
|
||||||
import { loadEnv } from "vite"
|
import { loadEnv } from "vite"
|
||||||
|
|
||||||
const { url } = process.env.URL
|
const { URL } = process.env.NODE_ENV
|
||||||
? loadEnv(process.env.URL, process.cwd(), "")
|
? loadEnv(process.env.NODE_ENV, process.cwd(), "")
|
||||||
: { url: "http://localhost:3000" }
|
: { URL: "http://localhost:3000" }
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: url,
|
site: URL,
|
||||||
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(),
|
||||||
icon(),
|
icon(),
|
||||||
paraglide({
|
paraglide({
|
||||||
// recommended settings
|
|
||||||
project: "./project.inlang",
|
project: "./project.inlang",
|
||||||
outdir: "./src/paraglide" //where your files should be
|
outdir: "./src/paraglide",
|
||||||
})
|
}),
|
||||||
],
|
],
|
||||||
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" }),
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
})
|
})
|
@ -2,16 +2,18 @@
|
|||||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||||
"hiIm": "Hi, I'm",
|
"hiIm": "Hi, I'm",
|
||||||
"position": "Software Engineer",
|
"position": "Software Engineer",
|
||||||
"aboutMe": "Some bullshit about me",
|
"aboutMe": "Dedicated developer currently working at Capgemini Bergen.",
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"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",
|
||||||
|
@ -2,16 +2,18 @@
|
|||||||
"$schema": "https://inlang.com/schema/inlang-message-format",
|
"$schema": "https://inlang.com/schema/inlang-message-format",
|
||||||
"hiIm": "Hei, jeg er",
|
"hiIm": "Hei, jeg er",
|
||||||
"position": "Programvareutvikler",
|
"position": "Programvareutvikler",
|
||||||
"aboutMe": "Bunntekst",
|
"aboutMe": "Engasjert utvikler som for tiden jobber hos Capgemini Bergen.",
|
||||||
"home": "Hjem",
|
"home": "Hjem",
|
||||||
"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",
|
||||||
|
37
package.json
@ -1,41 +1,42 @@
|
|||||||
{
|
{
|
||||||
"name": "martials-no-v2",
|
"name": "martials-no-v2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "1.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"start": "astro dev",
|
"start": "astro dev",
|
||||||
"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
BIN
public/favicon.jpg
Normal file
After Width: | Height: | Size: 55 KiB |
@ -1,9 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
|
|
||||||
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
|
|
||||||
<style>
|
|
||||||
path { fill: #000; }
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
path { fill: #FFF; }
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 749 B |
@ -4,14 +4,28 @@ 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">
|
<div class="max-w-[500px] mx-auto">
|
||||||
<Input label={m.name()} type="text" name="name" required />
|
<form
|
||||||
<Input label={m.subject()} name="subject" required />
|
class="flex flex-col gap-2 w-full"
|
||||||
<Input label={m.email()} name="_replyto" />
|
method="post"
|
||||||
<input name="_gotcha" type="text" class={"hidden"} /> { /*Honeypot spam filter*/}
|
action="https://formspree.io/f/mknykgbn"
|
||||||
<label class="flex flex-col">
|
>
|
||||||
{m.message()}
|
<Input label={m.name()} type="text" name="name" required />
|
||||||
<textarea name="message" class="textarea textarea-bordered" required></textarea>
|
<Input label={m.subject()} name="subject" required />
|
||||||
</label>
|
<Input label={m.email()} name="_replyto" />
|
||||||
<button type="submit">{m.send()}</button>
|
{/*Honeypot spam filter*/}
|
||||||
</form>
|
<input name="_gotcha" type="text" class={"hidden"} />
|
||||||
|
<label class="flex flex-col">
|
||||||
|
{m.message()}
|
||||||
|
<textarea
|
||||||
|
name="message"
|
||||||
|
class="textarea textarea-bordered w-full bg-cat-base"
|
||||||
|
required></textarea>
|
||||||
|
</label>
|
||||||
|
</form>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="btn mt-2 bg-cat-base border-cat-surface0"
|
||||||
|
title={m.send()}>{m.send()}</button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
@ -9,12 +9,22 @@ 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 bg-inherit"></div>
|
||||||
<div class="py-5 flex flex-row gap-1 justify-around w-full items-center">
|
<div
|
||||||
|
class="max-w-[1000px] sm:min-w-[500px] mx-auto py-5 flex flex-row flex-wrap gap-5 justify-around items-center bg-inherit px-5"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<GiteaLink href={giteaLink} />
|
<GiteaLink href={giteaLink} class="!text-cat-text" />
|
||||||
<ExternalLink href={STATUS_URL} class="flex items-center" title="Status">
|
<ExternalLink
|
||||||
<PajamasIcon name="pajamas:status-health" class="w-6 h-6 mr-2" />
|
href={STATUS_URL}
|
||||||
|
class="flex items-center !text-cat-text"
|
||||||
|
title="Status"
|
||||||
|
>
|
||||||
|
<PajamasIcon
|
||||||
|
name="pajamas:status-health"
|
||||||
|
class="w-6 h-6 mr-2"
|
||||||
|
aria-label="Status health icon"
|
||||||
|
/>
|
||||||
{m.status()}
|
{m.status()}
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
</div>
|
</div>
|
||||||
|
@ -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>
|
|
@ -16,10 +16,10 @@ const {
|
|||||||
} = Astro.props
|
} = Astro.props
|
||||||
---
|
---
|
||||||
|
|
||||||
<label class="flex flex-col">
|
<label class="flex flex-col w-full">
|
||||||
{label}
|
{label}
|
||||||
<input
|
<input
|
||||||
class="input input-bordered"
|
class="input input-bordered w-full bg-cat-base"
|
||||||
type={type}
|
type={type}
|
||||||
name={name}
|
name={name}
|
||||||
required={required}
|
required={required}
|
||||||
|
@ -2,10 +2,26 @@
|
|||||||
import LocaleLink from "./links/LocaleLink.astro"
|
import LocaleLink from "./links/LocaleLink.astro"
|
||||||
import { type NavLink, resolvePathname } from "@/utils/linking"
|
import { type NavLink, resolvePathname } from "@/utils/linking"
|
||||||
|
|
||||||
const currentPath = resolvePathname(Astro.url.pathname)
|
const pathname = Astro.url.pathname
|
||||||
|
const currentPath = resolvePathname(pathname)
|
||||||
|
const isEnglish = pathname.startsWith("/en")
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="join">
|
<div class="join">
|
||||||
<LocaleLink to={currentPath as NavLink} lang="nb" class="btn join-item">Norsk</LocaleLink>
|
<LocaleLink
|
||||||
<LocaleLink to={currentPath as NavLink} lang="en" class="btn join-item">English</LocaleLink>
|
to={currentPath as NavLink}
|
||||||
|
lang="nb"
|
||||||
|
class:list={[
|
||||||
|
"btn join-item !text-cat-text border-cat-surface0",
|
||||||
|
!isEnglish ? "bg-cat-mantle" : "bg-cat-base",
|
||||||
|
]}>Norsk</LocaleLink
|
||||||
|
>
|
||||||
|
<LocaleLink
|
||||||
|
to={currentPath as NavLink}
|
||||||
|
lang="en"
|
||||||
|
class:list={[
|
||||||
|
"btn join-item !text-cat-text border-cat-surface0",
|
||||||
|
isEnglish ? "bg-cat-mantle" : "bg-cat-base",
|
||||||
|
]}>English</LocaleLink
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
---
|
|
||||||
import LocaleLink from "./links/LocaleLink.astro"
|
|
||||||
import Links from "@/links"
|
|
||||||
---
|
|
||||||
|
|
||||||
<div class="flex justify-end">
|
|
||||||
{
|
|
||||||
Links.map(({ to, label }) => (
|
|
||||||
<LocaleLink to={to} class="m-2 hover:underline">
|
|
||||||
{label()}
|
|
||||||
</LocaleLink>
|
|
||||||
))
|
|
||||||
}
|
|
||||||
</div>
|
|
@ -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>
|
||||||
|
30
src/components/UsesPage.astro
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
import * as m from "@/paraglide/messages"
|
||||||
|
import CollapseList from "@/components/collapse/CollapseList.svelte"
|
||||||
|
import type { CollectionEntry } from "astro:content"
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
uses: ReadonlyArray<CollectionEntry<"uses">>
|
||||||
|
}
|
||||||
|
|
||||||
|
const { uses } = Astro.props
|
||||||
|
// TODO set url anchor to selected hardware
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="px-2 max-w-[750px] sm:min-w-[750px] w-screen">
|
||||||
|
{
|
||||||
|
uses.map((hardware) => (
|
||||||
|
<div class="my-5">
|
||||||
|
<h3>{hardware.data.title}</h3>
|
||||||
|
<CollapseList items={hardware.data.hardware} title={m.hardware()} />
|
||||||
|
<div class="my-2" />
|
||||||
|
{hardware.data.accessories && (
|
||||||
|
<CollapseList
|
||||||
|
items={hardware.data.accessories}
|
||||||
|
title={m.accessories()}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
@ -5,4 +5,4 @@ interface Props {
|
|||||||
const { tag } = Astro.props
|
const { tag } = Astro.props
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="badge badge-outline">{tag}</div>
|
<div class="badge badge-outline !text-cat-lavender">{tag}</div>
|
||||||
|
@ -7,6 +7,6 @@ interface Props {
|
|||||||
const { tags } = Astro.props
|
const { tags } = Astro.props
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="flex flex-wrap gap-1">
|
<div class="flex flex-wrap gap-1 py-0.5">
|
||||||
{tags.map((tag) => <Badge tag={tag} />)}
|
{tags.map((tag) => <Badge tag={tag} />)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -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>
|
@ -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>
|
||||||
|
17
src/components/header/HamburgerMenuButton.astro
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
import PajamasIcon from "@/components/icons/PajamasIcon.astro"
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
id: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const { id } = Astro.props
|
||||||
|
---
|
||||||
|
|
||||||
|
<label for={id} aria-label="open sidebar" class="btn btn-square btn-ghost">
|
||||||
|
<PajamasIcon
|
||||||
|
name="pajamas:hamburger"
|
||||||
|
class="w-6 h-6"
|
||||||
|
aria-label="Hamburger menu"
|
||||||
|
/>
|
||||||
|
</label>
|
38
src/components/header/Header.astro
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
import Navbar from "./Navbar.astro"
|
||||||
|
import NavbarDrawer from "./NavbarDrawer.astro"
|
||||||
|
import HamburgerMenuButton from "./HamburgerMenuButton.astro"
|
||||||
|
import { resolvePathname } from "@/utils/linking"
|
||||||
|
|
||||||
|
const currentPath = `~${resolvePathname(Astro.originPathname)}`
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="sm:m-auto">
|
||||||
|
<div class="drawer drawer-end">
|
||||||
|
<input id="my-drawer-3" type="checkbox" class="drawer-toggle" />
|
||||||
|
<div class="drawer-content flex flex-col">
|
||||||
|
<!-- Navbar -->
|
||||||
|
<div class="navbar w-full justify-end">
|
||||||
|
<div class="flex justify-between items-center w-full h-full sm:hidden">
|
||||||
|
<h1 class="!text-2xl h-5">
|
||||||
|
{currentPath}
|
||||||
|
</h1>
|
||||||
|
<HamburgerMenuButton id="my-drawer-3" />
|
||||||
|
</div>
|
||||||
|
<div class="hidden flex-none sm:block">
|
||||||
|
<Navbar />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="drawer-side z-50">
|
||||||
|
<label for="my-drawer-3" aria-label="close sidebar" class="drawer-overlay"
|
||||||
|
></label>
|
||||||
|
<ul class="menu bg-cat-base min-h-full w-80 p-4">
|
||||||
|
<li class="text-xl font-bold my-5">
|
||||||
|
{currentPath}
|
||||||
|
</li>
|
||||||
|
<NavbarDrawer />
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
17
src/components/header/Navbar.astro
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
import LocaleLink from "@/components/links/LocaleLink.astro"
|
||||||
|
import Links from "@/links"
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="flex justify-end">
|
||||||
|
{
|
||||||
|
Links.map(({ to, label }) => (
|
||||||
|
<LocaleLink
|
||||||
|
to={to}
|
||||||
|
class={"m-2 not-hover:!text-cat-text font-bold font-mono"}
|
||||||
|
>
|
||||||
|
~/{label()}
|
||||||
|
</LocaleLink>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
12
src/components/header/NavbarDrawer.astro
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
import Links from "../../links"
|
||||||
|
import LocaleLink from "../links/LocaleLink.astro"
|
||||||
|
---
|
||||||
|
|
||||||
|
{
|
||||||
|
Links.map((link) => (
|
||||||
|
<li>
|
||||||
|
<LocaleLink to={link.to}>{link.label}</LocaleLink>
|
||||||
|
</li>
|
||||||
|
))
|
||||||
|
}
|
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
import PajamasIcon from "./PajamasIcon.astro"
|
|
||||||
interface Props {
|
|
||||||
class?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const { class: clazz } = Astro.props
|
|
||||||
---
|
|
||||||
|
|
||||||
<PajamasIcon name="pajamas:gitea" class={clazz}></PajamasIcon>
|
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
import { Image } from "astro:assets"
|
import { Image } from "astro:assets"
|
||||||
import me from "@/images/polite-cat.jpg"
|
import me from "@/images/me.jpg"
|
||||||
import * as m from "@/paraglide/messages.js"
|
import * as m from "@/paraglide/messages.js"
|
||||||
import "@/styles/global.css"
|
import "@/styles/global.css"
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="flex items-center justify-around flex-wrap">
|
<div class="flex items-center justify-around flex-wrap">
|
||||||
<div class="m-5">
|
<div class="m-5">
|
||||||
<h1 class="sm:text-7xl font-bold">
|
<h1>
|
||||||
{m.hiIm()}
|
{m.hiIm()}
|
||||||
<br />
|
<br />
|
||||||
Martin Berg Alstad
|
Martin Berg Alstad
|
||||||
@ -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 stand in front of a poster that says 'anbudsassistent'"
|
||||||
|
width="400"
|
||||||
|
height="400"
|
||||||
|
class="p-5 mx-auto rounded-full"
|
||||||
|
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>
|
7
src/components/landing/IndexPage.astro
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
import Greeting from "./Greeting.astro"
|
||||||
|
import LatestProjects from "./LatestProjects.astro"
|
||||||
|
---
|
||||||
|
|
||||||
|
<Greeting />
|
||||||
|
<LatestProjects />
|
10
src/components/landing/LatestProjects.astro
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
import { getCollection } from "astro:content"
|
||||||
|
import ProjectGrid from "@/components/projects/ProjectGrid.astro"
|
||||||
|
|
||||||
|
const projects = await getCollection("projects")
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
|
<ProjectGrid projects={projects} />
|
@ -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>
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
---
|
---
|
||||||
import ExternalLink from "./ExternalLink.astro"
|
import ExternalLink from "./ExternalLink.astro"
|
||||||
import * as m from "@/paraglide/messages"
|
import * as m from "@/paraglide/messages"
|
||||||
import Gitea from "../icons/Gitea.astro"
|
import PajamasIcon from "../icons/PajamasIcon.astro"
|
||||||
interface Props {
|
interface Props {
|
||||||
href: string
|
href: string
|
||||||
|
class?: string
|
||||||
}
|
}
|
||||||
const { href } = Astro.props
|
const { href, class: clazz } = Astro.props
|
||||||
---
|
---
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<ExternalLink href={href} class="flex items-center gap-1">
|
<ExternalLink
|
||||||
<Gitea class="w-6 h-6" />
|
href={href}
|
||||||
|
class:list={["flex items-center gap-1", clazz]}
|
||||||
|
title="Gitea"
|
||||||
|
>
|
||||||
|
<PajamasIcon name="pajamas:gitea" class="w-6 h-6" aria-label="Gitea icon" />
|
||||||
{m.sourceCode()}
|
{m.sourceCode()}
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,12 +8,27 @@ interface Props extends MyLink {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { title, message, url, icon, class: clazz } = Astro.props
|
const { title, message, url, icon, class: clazz } = Astro.props
|
||||||
|
const iconStyle = "w-6 h-6"
|
||||||
---
|
---
|
||||||
|
|
||||||
<ExternalLink href={url} noStyle>
|
<ExternalLink href={url} noStyle>
|
||||||
<div class:list={["card bg-neutral", clazz]}>
|
<div class:list={["card bg-cat-mantle text-cat-text", 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" />
|
{
|
||||||
|
icon ? (
|
||||||
|
<PajamasIcon
|
||||||
|
name={icon.src}
|
||||||
|
class={iconStyle}
|
||||||
|
aria-label={icon.alt}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<PajamasIcon
|
||||||
|
name={"pajamas:link"}
|
||||||
|
class={iconStyle}
|
||||||
|
aria-label="Link icon"
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
<div>
|
<div>
|
||||||
<h5 class="card-title">{title}</h5>
|
<h5 class="card-title">{title}</h5>
|
||||||
<p class="prose">{message}</p>
|
<p class="prose">{message}</p>
|
||||||
|
@ -2,10 +2,8 @@
|
|||||||
import links from "./myLinks"
|
import links from "./myLinks"
|
||||||
import LinkCard from "./LinkCard.astro"
|
import LinkCard from "./LinkCard.astro"
|
||||||
import "@/styles/global.css"
|
import "@/styles/global.css"
|
||||||
import * as m from "@/paraglide/messages"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<h1 class="text-center">{m.myLinks()}</h1>
|
|
||||||
<div class="flex flex-col mx-auto w-fit gap-5">
|
<div class="flex flex-col mx-auto w-fit gap-5">
|
||||||
{
|
{
|
||||||
links.map((link) => (
|
links.map((link) => (
|
||||||
|
@ -3,44 +3,68 @@ 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?: {
|
||||||
|
src: PajamasIcon
|
||||||
|
alt: string
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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: {
|
||||||
|
src: "pajamas:git",
|
||||||
|
alt: "Git icon",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Gitea",
|
title: "Gitea",
|
||||||
url: `${GIT_URL}/martials`,
|
url: `${GIT_URL}/martials`,
|
||||||
message: m.forPersonalProjects(),
|
message: m.forPersonalProjects(),
|
||||||
icon: "pajamas:gitea"
|
icon: {
|
||||||
|
src: "pajamas:gitea",
|
||||||
|
alt: "Gitea icon",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "GitHub",
|
||||||
|
url: "https://github.com/emberal",
|
||||||
|
icon: {
|
||||||
|
src: "pajamas:github",
|
||||||
|
alt: "GitHub icon",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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: {
|
||||||
|
src: "pajamas:linkedin",
|
||||||
|
alt: "LinkedIn icon",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Mastodon (Snabelen)",
|
title: "Mastodon (Snabelen.no)",
|
||||||
url: "https://snabelen.no/@Martials",
|
url: "https://snabelen.no/@Martials",
|
||||||
icon: "pajamas:mastodon"
|
icon: {
|
||||||
|
src: "pajamas:mastodon",
|
||||||
|
alt: "Mastodon icon",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
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[]
|
] satisfies MyLink[]
|
||||||
|
@ -1,37 +1,12 @@
|
|||||||
---
|
---
|
||||||
import ProjectCard from "./ProjectCard.astro"
|
import ProjectGrid from "./ProjectGrid.astro"
|
||||||
import * as m from "@/paraglide/messages"
|
|
||||||
import { type CollectionEntry } from "astro:content"
|
import { type CollectionEntry } from "astro:content"
|
||||||
import { type NavLink } from "@/utils/linking"
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
projects: CollectionEntry<"projects">[]
|
projects: CollectionEntry<"projects">[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const { projects } = Astro.props
|
const { projects } = Astro.props
|
||||||
|
|
||||||
const baseUrl: NavLink = "/projects"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<h1 class="text-4xl font-bold text-center sm:my-10 mt-2">{m.myProjects()}</h1>
|
<ProjectGrid projects={projects} />
|
||||||
<div class="flex flex-wrap justify-around">
|
|
||||||
{
|
|
||||||
projects.map(
|
|
||||||
({
|
|
||||||
data: { title, description, tags, heroImage, heroImageAlt },
|
|
||||||
id
|
|
||||||
}) => (
|
|
||||||
<div class="my-5 px-2">
|
|
||||||
<ProjectCard
|
|
||||||
title={title}
|
|
||||||
linkTo={`${baseUrl}/${id}`}
|
|
||||||
description={description}
|
|
||||||
tags={tags}
|
|
||||||
image={heroImage}
|
|
||||||
imageAlt={heroImageAlt}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
@ -19,12 +19,13 @@ const { title, description, tags, image, imageAlt, linkTo } = Astro.props
|
|||||||
|
|
||||||
<LocaleLink
|
<LocaleLink
|
||||||
to={linkTo}
|
to={linkTo}
|
||||||
class="card bg-base-100 max-w-96 shadow-xl hover:scale-105 transition"
|
class="card bg-cat-base max-w-96 shadow-xl hover:scale-105 transition border border-cat-surface0"
|
||||||
>
|
>
|
||||||
<figure>
|
<figure>
|
||||||
<Image src={image} alt={imageAlt} />
|
<Image src={image} alt={imageAlt} />
|
||||||
|
<figcaption class="sr-only">{imageAlt}</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
<div class="card-body">
|
<div class="card-body text-cat-text">
|
||||||
<h2 class="card-title">
|
<h2 class="card-title">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
|
32
src/components/projects/ProjectGrid.astro
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
import type { Project } from "@/types/types"
|
||||||
|
import type { NavLink } from "@/utils/linking"
|
||||||
|
import ProjectCard from "./ProjectCard.astro"
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
projects: ReadonlyArray<Project>
|
||||||
|
}
|
||||||
|
|
||||||
|
const { projects } = Astro.props
|
||||||
|
|
||||||
|
const baseUrl: NavLink = "/projects"
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="flex flex-wrap justify-around">
|
||||||
|
{
|
||||||
|
projects.map(
|
||||||
|
({ data: { title, description, tags, heroImage, heroImageAlt }, id }) => (
|
||||||
|
<div class="my-5 px-2">
|
||||||
|
<ProjectCard
|
||||||
|
title={title}
|
||||||
|
linkTo={`${baseUrl}/${id}`}
|
||||||
|
description={description}
|
||||||
|
tags={tags}
|
||||||
|
image={heroImage}
|
||||||
|
imageAlt={heroImageAlt}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</div>
|
@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
import Layout from "@/layouts/Layout.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
import { Image } from "astro:assets"
|
import BadgeList from "@/components/badge/BadgeList.astro"
|
||||||
import { getEntry, render } from "astro:content"
|
import GiteaLink from "@/components/links/GiteaLink.astro"
|
||||||
import BadgeList from "../badge/BadgeList.astro"
|
|
||||||
import * as m from "@/paraglide/messages"
|
|
||||||
import { languageTag } from "@/paraglide/runtime"
|
import { languageTag } from "@/paraglide/runtime"
|
||||||
import GiteaLink from "../links/GiteaLink.astro"
|
import { getEntry, render } from "astro:content"
|
||||||
|
import { Image } from "astro:assets"
|
||||||
|
import * as m from "@/paraglide/messages"
|
||||||
import "@/styles/global.css"
|
import "@/styles/global.css"
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -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,15 +24,15 @@ const {
|
|||||||
heroImageAlt,
|
heroImageAlt,
|
||||||
source,
|
source,
|
||||||
createdAt,
|
createdAt,
|
||||||
updatedAt
|
updatedAt,
|
||||||
} = entry!.data
|
} = entry!.data
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--TODO day.js for dates?-->
|
<!--TODO day.js / Temporal API for dates?-->
|
||||||
<Layout title={title} class="mx-auto max-w-[750px]">
|
<Layout title={title} class="mx-auto max-w-[750px]">
|
||||||
<div class="flex justify-between my-2">
|
<div class="flex justify-between my-2">
|
||||||
<div>
|
<div>
|
||||||
<h1>{title}</h1>
|
<h2>{title}</h2>
|
||||||
<BadgeList tags={tags} />
|
<BadgeList tags={tags} />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col items-end">
|
<div class="flex flex-col items-end">
|
||||||
@ -44,9 +44,9 @@ const {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Image src={heroImage} alt={heroImageAlt} />
|
<Image src={heroImage} alt={heroImageAlt} class="m-auto" />
|
||||||
|
|
||||||
<GiteaLink href={source} />
|
<GiteaLink href={source} class="my-2" />
|
||||||
|
|
||||||
<p class="my-2">{description}</p>
|
<p class="my-2">{description}</p>
|
||||||
<Content />
|
<Content />
|
||||||
|
@ -10,22 +10,22 @@ const projectCollection = defineCollection({
|
|||||||
heroImage: image(),
|
heroImage: image(),
|
||||||
heroImageAlt: z.string(),
|
heroImageAlt: z.string(),
|
||||||
tags: z.array(z.string()),
|
tags: z.array(z.string()),
|
||||||
source: z.string(),
|
source: z.string().url(),
|
||||||
createdAt: z.string(),
|
createdAt: z.string().date(),
|
||||||
updatedAt: z.string()
|
updatedAt: z.string().date(),
|
||||||
})
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
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,
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 59 KiB |
BIN
src/content/projects/assets/recursive-meme.png
Normal file
After Width: | Height: | Size: 27 KiB |
@ -1,14 +1,17 @@
|
|||||||
---
|
---
|
||||||
title: "Hjemmeside"
|
title: "Welcome"
|
||||||
description: "Hjemmesiden"
|
description: "Welcome to my homepage / portfolio"
|
||||||
heroImage: "./kevin-james.jpg"
|
heroImage: "assets/recursive-meme.png"
|
||||||
heroImageAlt: "The homepage of this site"
|
heroImageAlt: "A recursive meme that says: Self-reference, recursive meme is self-referential"
|
||||||
tags: [Astro, Svelte, TypeScript, I18n]
|
tags: [Astro, Svelte, TypeScript, I18n, TailwindCSS, Docker]
|
||||||
source: "https://example.com"
|
source: "https://git.martials.no/martials/martials.no"
|
||||||
createdAt: "2024-09-22"
|
createdAt: "2024-09-22"
|
||||||
updatedAt: "2024-09-22"
|
updatedAt: "2025-02-15"
|
||||||
---
|
---
|
||||||
|
|
||||||
This is a short meta post about the homepage of this site.
|
This is a short meta post about my homepage which you are looking at right now.
|
||||||
It is a simple landing page with a short introduction to the site and a list of the latest posts.
|
|
||||||
The site is not built with GatsbyJS and Contentful.
|
This page is going to be a simple site where I will share my projects, stuff i've accomplished and things about me.
|
||||||
|
It is still a work in progress, so it will be updated for the forseable future.
|
||||||
|
|
||||||
|
In the meantime, you can see what i'm working on at [Gitea](https://git.martials.no/martials?tab=activity).
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
title: "API for å forenkle TimeEdit iCalendar filer"
|
|
||||||
description: "Et API som forenkler tittler i ICS filer fra TimeEdit"
|
|
||||||
heroImage: "./Calendar before and after.png"
|
|
||||||
heroImageAlt: "En kalender før og etter APIet har blitt brukt. Venstre side er før, høyre etter."
|
|
||||||
tags: [API, Kotlin, Spring Boot, Tomcat, iCal4j, CI/CD]
|
|
||||||
source: "https://github.com/emberal/hvl_ics_simplifier"
|
|
||||||
createdAt: "2023-08-08"
|
|
||||||
updatedAt: "2024-10-20"
|
|
||||||
---
|
|
||||||
|
|
||||||
Ble lei av hvor vanskelig det var å lese iCalendar filer fra HVL sin kalender i TimeEdit, så jeg lagde et API som gjør det enklere.
|
|
||||||
Data for tittelen blir hentet fra den gamle tittelen.
|
|
||||||
For å finne hvilken type hendselse det er, sjekkes beskrivelsen og lokasjonen.
|
|
||||||
|
|
||||||
APIet er skrevet i Kotlin med Spring boot, og hosted på en selvhostet tomcat server.
|
|
Before Width: | Height: | Size: 364 KiB |
@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Forenkle sannhetsverdier og sannhetstabeller"
|
|
||||||
description: "Forenkle sannhetsuttrykk og opprette sannhetstabeller"
|
|
||||||
heroImage: "./Simplify-truths-website.png"
|
|
||||||
heroImageAlt: "Nettsiden med en sannhetstabell"
|
|
||||||
tags: [TypeScript, SolidJS, Tailwind css, Nettside, Java, API, Spring Boot, Raspberry Pi, Apache, Tomcat]
|
|
||||||
source: "https://github.com/h600878/martials.no"
|
|
||||||
createdAt: "2022-11-08"
|
|
||||||
updatedAt: "2024-10-20"
|
|
||||||
---
|
|
||||||
{/* TODO change to Rust */}
|
|
||||||
Noen sannhetsverdier kan bli ganske store, og kompliserte. Derfor har jeg laget dette programmet for å forenkle uttrykk mest mulig.
|
|
||||||
Programmet bruker flere kjente metoder for å skrive om uttrykkene. Hvilke uttrykk som er brukt og hvilke endringer de gjorde,
|
|
||||||
kan vises i menyen under søkefeltet.
|
|
||||||
<br />
|
|
||||||
I tillegg til å bare forenkle uttrykk, kan man også generere en sannhetstabell med alle mulige verdier i uttrykket.
|
|
||||||
Hvis man ikke ønsker å forenkle uttrykket, men bare generere tabellen, kan man enkelt skru av forenkling. I tillegg har
|
|
||||||
man muligheten til å filtrere resultat, enten ved å skjule sanne eller usanne verdier. Eller ved å sortere etter sanne
|
|
||||||
eller usanne først.
|
|
||||||
<br />
|
|
||||||
Nettsiden er laget med TypeScript, SolidJS og Tailwind CSS. API-et er laget med Java og Spring Boot.
|
|
||||||
Begge kjører på min egen raspberry pi 4, nettsiden er hostet på en apache2 tjener, mens API-et ligger på en tomcat tjener.
|
|
||||||
<a href={"https://martials.no/simplify-truths.html"}>Lenke til nettsiden.</a>
|
|
||||||
<br />
|
|
||||||
Spørringer kan gjøres mot API-et kan utføres med GET eller POST. API-et returnerer JSON.
|
|
||||||
[Lenke til API-docs](https://api.martials.no/simplify-truths)
|
|
@ -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
|
@ -1,3 +1,3 @@
|
|||||||
title: Home Server
|
title: Homelab
|
||||||
hardware:
|
hardware:
|
||||||
- b # Graphics cards, CPUs, etc.
|
- b # Graphics cards, CPUs, etc.
|
BIN
src/images/me.jpg
Normal file
After Width: | Height: | Size: 135 KiB |
@ -1,31 +1,39 @@
|
|||||||
---
|
---
|
||||||
import Navbar from "@/components/Navbar.astro"
|
|
||||||
import Footer from "@/components/Footer.astro"
|
import Footer from "@/components/Footer.astro"
|
||||||
|
import Header from "@/components/header/Header.astro"
|
||||||
import { languageTag } from "@/paraglide/runtime"
|
import { languageTag } from "@/paraglide/runtime"
|
||||||
|
import { resolvePathname } from "@/utils/linking"
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
title: string
|
title: string
|
||||||
class?: string
|
class?: string
|
||||||
}
|
}
|
||||||
const { title, class: clazz } = Astro.props
|
const { title, class: clazz } = Astro.props
|
||||||
|
const mainClass =
|
||||||
|
"grow max-w-[1000px] m-auto sm:min-w-[500px] not-sm:w-full px-5"
|
||||||
---
|
---
|
||||||
|
|
||||||
<!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/jpg" href="/favicon.jpg" />
|
||||||
<meta name="generator" content={Astro.generator} />
|
<meta name="generator" content={Astro.generator} />
|
||||||
<title>{title}</title>
|
<title>{title} | Martin Berg Alstad</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="flex flex-col h-screen">
|
<body class="flex flex-col min-h-screen bg-cat-base text-cat-text">
|
||||||
<Navbar />
|
<Header />
|
||||||
<main class:list={["grow", clazz]}>
|
<main class:list={[mainClass, clazz]}>
|
||||||
<slot />
|
<h1 class="text-center not-sm:hidden">
|
||||||
</main>
|
~{resolvePathname(Astro.originPathname)}
|
||||||
<Footer />
|
</h1>
|
||||||
</body>
|
<div class="my-5">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<Footer />
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
14
src/links.ts
@ -9,24 +9,20 @@ 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,
|
|
||||||
to: "/hardware"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: m.contactMe,
|
label: m.contactMe,
|
||||||
to: "/contact"
|
to: "/contact",
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
export default Links
|
export default Links
|
||||||
|
@ -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">
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
import OnePager from "../../components/Greeting.astro"
|
import IndexPage from "@/components/landing/IndexPage.astro"
|
||||||
import Layout from "../../layouts/Layout.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
|
import "@/styles/global.css"
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Welcome">
|
<Layout title="Welcome">
|
||||||
<OnePager />
|
<IndexPage />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -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>
|
@ -1,16 +1,13 @@
|
|||||||
---
|
---
|
||||||
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
|
||||||
|
|
||||||
export function getStaticPaths(): GetStaticPathsResult {
|
export function getStaticPaths(): GetStaticPathsResult {
|
||||||
return [
|
return [{ params: { project: "homepage" } }]
|
||||||
{ params: { project: "hvl-ics-simplifier" } },
|
|
||||||
{ params: { project: "homepage" } },
|
|
||||||
{ params: { project: "simplify-truths" } }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { project } = Astro.params
|
const { project } = Astro.params
|
||||||
|
@ -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")
|
||||||
---
|
---
|
||||||
|
@ -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.astro"
|
||||||
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 uses={uses} />
|
||||||
</Layout>
|
</Layout>
|
@ -1,8 +1,9 @@
|
|||||||
---
|
---
|
||||||
import Layout from "../layouts/Layout.astro"
|
import IndexPage from "@/components/landing/IndexPage.astro"
|
||||||
import Greeting from "../components/Greeting.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
|
import "@/styles/global.css"
|
||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Velkommen">
|
<Layout title="Velkommen">
|
||||||
<Greeting />
|
<IndexPage />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -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>
|
@ -1,16 +1,13 @@
|
|||||||
---
|
---
|
||||||
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
|
||||||
|
|
||||||
export function getStaticPaths(): GetStaticPathsResult {
|
export function getStaticPaths(): GetStaticPathsResult {
|
||||||
return [
|
return [{ params: { project: "homepage" } }]
|
||||||
{ params: { project: "hvl-ics-simplifier" } },
|
|
||||||
{ params: { project: "homepage" } },
|
|
||||||
{ params: { project: "simplify-truths" } }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { project } = Astro.params
|
const { project } = Astro.params
|
||||||
|
@ -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")
|
||||||
---
|
---
|
||||||
|
@ -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.astro"
|
||||||
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 uses={uses} />
|
||||||
</Layout>
|
</Layout>
|
@ -1,6 +1,28 @@
|
|||||||
@tailwind base;
|
@import "tailwindcss";
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
@plugin "@tailwindcss/typography";
|
||||||
|
@plugin "daisyui";
|
||||||
|
|
||||||
|
@theme {
|
||||||
|
--color-cat-rosewater: #f5e0dc;
|
||||||
|
--color-cat-flamingo: #f2cdcd;
|
||||||
|
--color-cat-pink: #f5c2e7;
|
||||||
|
--color-cat-mauve: #cba6f7;
|
||||||
|
--color-cat-red: #f38ba8;
|
||||||
|
--color-cat-maroon: #eba0ac;
|
||||||
|
--color-cat-peach: #fab387;
|
||||||
|
--color-cat-yellow: #f9e2af;
|
||||||
|
--color-cat-green: #a6e3a1;
|
||||||
|
--color-cat-teal: #94e2d5;
|
||||||
|
--color-cat-sky: #89dceb;
|
||||||
|
--color-cat-sapphire: #74c7ec;
|
||||||
|
--color-cat-blue: #89b4fa;
|
||||||
|
--color-cat-lavender: #b4befe;
|
||||||
|
--color-cat-text: #cdd6f4;
|
||||||
|
--color-cat-surface0: #313244;
|
||||||
|
--color-cat-base: #1e1e2e;
|
||||||
|
--color-cat-mantle: #181825;
|
||||||
|
}
|
||||||
|
|
||||||
@layer utilities {
|
@layer utilities {
|
||||||
.debug {
|
.debug {
|
||||||
@ -8,21 +30,24 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@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;
|
}
|
||||||
}
|
|
||||||
|
h3 {
|
||||||
/* TODO change default style*/
|
@apply text-2xl font-bold mb-2;
|
||||||
a {
|
}
|
||||||
@apply link
|
|
||||||
}
|
/* TODO change default style*/
|
||||||
|
a {
|
||||||
|
@apply link text-cat-mauve;
|
||||||
|
text-decoration-line: none;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
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"
|
||||||
|
| "hamburger"
|
||||||
|
|
||||||
export type PajamasIcon = `pajamas:${Icon}`
|
export type PajamasIcon = `pajamas:${Icon}`
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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]}`
|
||||||
|
@ -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")]
|
|
||||||
}
|
|