✨ Update general style
- Smaller width of page - Center navbar - Fonts - Catppuccin Mocha colours - TODO.md - Show all uses at the same time - and more...
This commit is contained in:
parent
cb00252364
commit
023c8b7c85
40
TODO.md
Normal file
40
TODO.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# TODO
|
||||||
|
|
||||||
|
## Code
|
||||||
|
- [ ] Temporal API or day.js for dates
|
||||||
|
|
||||||
|
## Layout
|
||||||
|
- [ ] Show current page in navbar
|
||||||
|
- [x] Correct bg colour on entire page
|
||||||
|
|
||||||
|
## Accessibility
|
||||||
|
- [ ] Fix colours on buttons
|
||||||
|
- [ ] Correct contrast
|
||||||
|
- [ ] All interactable elements have labels
|
||||||
|
|
||||||
|
## ~/
|
||||||
|
- [ ] About me description
|
||||||
|
- [ ] Non-cat image
|
||||||
|
|
||||||
|
## ~/about
|
||||||
|
- [ ] About me
|
||||||
|
|
||||||
|
## ~/links
|
||||||
|
- [ ] Add Bluesky link
|
||||||
|
- [ ] Add MusicBrainz link
|
||||||
|
|
||||||
|
## ~/slashes
|
||||||
|
- [ ] List of all slashes
|
||||||
|
|
||||||
|
## ~/uses
|
||||||
|
- [ ] Homelab uses
|
||||||
|
- [ ] Raspberry PI uses
|
||||||
|
- [ ] Hardware anchor
|
||||||
|
|
||||||
|
## ~/certifications
|
||||||
|
- [ ] Embed certifications
|
||||||
|
|
||||||
|
## ~/tools
|
||||||
|
|
||||||
|
### /simplify-truths
|
||||||
|
- [ ] Merge simplify truths implementation
|
@ -2,7 +2,7 @@
|
|||||||
"$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",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"$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",
|
||||||
|
@ -12,12 +12,12 @@ import * as m from "@/paraglide/messages.js"
|
|||||||
<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*/}
|
{/*Honeypot spam filter*/}
|
||||||
|
<input name="_gotcha" type="text" class={"hidden"} />
|
||||||
<label class="flex flex-col">
|
<label class="flex flex-col">
|
||||||
{m.message()}
|
{m.message()}
|
||||||
<textarea name="message" class="textarea textarea-bordered" required
|
<textarea name="message" class="textarea textarea-bordered w-full" required
|
||||||
></textarea>
|
></textarea>
|
||||||
</label>
|
</label>
|
||||||
<button type="submit">{m.send()}</button>
|
|
||||||
</form>
|
</form>
|
||||||
|
<button type="submit" class="btn mt-2" title={m.send()}>{m.send()}</button>
|
||||||
|
@ -9,8 +9,10 @@ import * as m from "@/paraglide/messages"
|
|||||||
const giteaLink = `${GIT_URL}/martials/martials.no`
|
const giteaLink = `${GIT_URL}/martials/martials.no`
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="divider"></div>
|
<div class="divider bg-inherit"></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 bg-inherit"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<GiteaLink href={giteaLink} />
|
<GiteaLink href={giteaLink} />
|
||||||
<ExternalLink href={STATUS_URL} class="flex items-center" title="Status">
|
<ExternalLink href={STATUS_URL} class="flex items-center" title="Status">
|
||||||
|
@ -7,7 +7,7 @@ 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
|
||||||
|
@ -19,7 +19,7 @@ const {
|
|||||||
<label class="flex flex-col">
|
<label class="flex flex-col">
|
||||||
{label}
|
{label}
|
||||||
<input
|
<input
|
||||||
class="input input-bordered"
|
class="input input-bordered w-full"
|
||||||
type={type}
|
type={type}
|
||||||
name={name}
|
name={name}
|
||||||
required={required}
|
required={required}
|
||||||
|
@ -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>
|
|
31
src/components/UsesPage.astro
Normal file
31
src/components/UsesPage.astro
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
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: 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>
|
@ -1,44 +0,0 @@
|
|||||||
<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>
|
|
7
src/components/header/Header.astro
Normal file
7
src/components/header/Header.astro
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
import Navbar from "./Navbar.astro"
|
||||||
|
---
|
||||||
|
|
||||||
|
<div class="m-auto">
|
||||||
|
<Navbar />
|
||||||
|
</div>
|
17
src/components/header/Navbar.astro
Normal file
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 hover:text-cat-mauve font-bold font-mono"}
|
||||||
|
>
|
||||||
|
~/{label()}
|
||||||
|
</LocaleLink>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
</div>
|
@ -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) => (
|
||||||
|
@ -13,7 +13,6 @@ const { projects } = Astro.props
|
|||||||
const baseUrl: NavLink = "/projects"
|
const baseUrl: NavLink = "/projects"
|
||||||
---
|
---
|
||||||
|
|
||||||
<h1 class="text-4xl font-bold text-center sm:my-10 mt-2">{m.myProjects()}</h1>
|
|
||||||
<div class="flex flex-wrap justify-around">
|
<div class="flex flex-wrap justify-around">
|
||||||
{
|
{
|
||||||
projects.map(
|
projects.map(
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
---
|
---
|
||||||
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] mt-5"
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
@ -19,11 +21,12 @@ const { title, class: clazz } = Astro.props
|
|||||||
<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} | 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]}>
|
||||||
|
<h1>~{resolvePathname(Astro.routePattern)}</h1>
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
@ -4,28 +4,34 @@ import type { NavLink } from "@/utils/linking.ts"
|
|||||||
interface Link {
|
interface Link {
|
||||||
label: () => string
|
label: () => string
|
||||||
to: NavLink
|
to: NavLink
|
||||||
|
color: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const Links: Link[] = [
|
const Links: Link[] = [
|
||||||
{
|
{
|
||||||
label: m.home,
|
label: m.home,
|
||||||
to: "/",
|
to: "/",
|
||||||
|
color: "text-cat-rosewater",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: m.myProjects,
|
label: m.myProjects,
|
||||||
to: "/projects",
|
to: "/projects",
|
||||||
|
color: "text-cat-flamingo",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: m.myLinks,
|
label: m.myLinks,
|
||||||
to: "/links",
|
to: "/links",
|
||||||
|
color: "text-cat-pink",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: m.uses,
|
label: m.uses,
|
||||||
to: "/uses",
|
to: "/uses",
|
||||||
|
color: "text-cat-mauve",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: m.contactMe,
|
label: m.contactMe,
|
||||||
to: "/contact",
|
to: "/contact",
|
||||||
|
color: "text-cat-red",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
import Layout from "@/layouts/Layout.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
import UsesPage from "@/components/UsesPage.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"
|
||||||
|
|
||||||
@ -8,5 +8,5 @@ const uses = await getCollection("uses")
|
|||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Hardware" class="mx-auto max-w-[750px]">
|
<Layout title="Hardware" class="mx-auto max-w-[750px]">
|
||||||
<UsesPage client:load uses={uses} />
|
<UsesPage uses={uses} />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
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/
|
// https://slashpages.net/
|
||||||
---
|
---
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
import Layout from "@/layouts/Layout.astro"
|
import Layout from "@/layouts/Layout.astro"
|
||||||
import UsesPage from "@/components/UsesPage.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"
|
||||||
|
|
||||||
@ -8,5 +8,5 @@ const uses = await getCollection("uses")
|
|||||||
---
|
---
|
||||||
|
|
||||||
<Layout title="Hardware" class="mx-auto max-w-[750px]">
|
<Layout title="Hardware" class="mx-auto max-w-[750px]">
|
||||||
<UsesPage client:load uses={uses} />
|
<UsesPage uses={uses} />
|
||||||
</Layout>
|
</Layout>
|
||||||
|
@ -1,14 +1,33 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
@plugin "@tailwindcss/typography";
|
@plugin "@tailwindcss/typography";
|
||||||
@plugin "daisyui";
|
@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-base: #1e1e2e;
|
||||||
|
}
|
||||||
|
|
||||||
@layer utilities {
|
@layer utilities {
|
||||||
.debug {
|
.debug {
|
||||||
@apply border border-red-500;
|
@apply border border-red-500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer base {
|
|
||||||
br {
|
br {
|
||||||
@apply my-0.5;
|
@apply my-0.5;
|
||||||
}
|
}
|
||||||
@ -21,8 +40,12 @@
|
|||||||
@apply text-3xl font-bold mb-2;
|
@apply text-3xl font-bold mb-2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
@apply text-2xl font-bold mb-2;
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO change default style*/
|
/* TODO change default style*/
|
||||||
a {
|
a {
|
||||||
@apply link;
|
@apply link;
|
||||||
}
|
text-decoration-line: none;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user