Compare commits

..

No commits in common. "e1c3ae7d8757d9f62ef36372df191876aba60a4c" and "1b3c6c629eb3464f5e026a995e61a888da7aee99" have entirely different histories.

20 changed files with 69 additions and 127 deletions

10
TODO.md
View File

@ -1,7 +1,7 @@
# TODO # TODO
## Code ## Code
- [ ] day.js for dates - [ ] Temporal API or day.js for dates
## SSE ## SSE
- [x] Correct Sitemap.xml - [x] Correct Sitemap.xml
@ -12,18 +12,15 @@
- [x] Show current page - [x] Show current page
- [x] Correct bg colour on entire page - [x] Correct bg colour on entire page
- [x] Hamburger menu on mobile - [x] Hamburger menu on mobile
- [ ] Dark mode toggle
- [ ] Navigate using pathname / breadcrumbs
## Accessibility ## Accessibility
- [x] Fix colours on buttons - [ ] Fix colours on buttons
- [x] Correct contrast - [x] Correct contrast
- [ ] All interactable elements have labels - [ ] All interactable elements have labels
- [x] Colour links, also in MDX posts - [ ] Colour links, also in MDX posts
## ~/ ## ~/
- [ ] About me description - [ ] About me description
- [ ] Latest projects
- [ ] Non-cat image - [ ] Non-cat image
## ~/about ## ~/about
@ -32,7 +29,6 @@
## ~/links ## ~/links
- [ ] Add Bluesky link - [ ] Add Bluesky link
- [ ] Add MusicBrainz link - [ ] Add MusicBrainz link
- [ ] Add Archidekt link
## ~/slashes ## ~/slashes
- [ ] List of all slashes - [ ] List of all slashes

View File

@ -4,12 +4,11 @@ import * as m from "@/paraglide/messages.js"
// TODO self-host email server // TODO self-host email server
--- ---
<div class="max-w-[500px] mx-auto"> <form
<form class="flex flex-col gap-2 max-w-[500px] mx-auto"
class="flex flex-col gap-2 w-full"
method="post" method="post"
action="https://formspree.io/f/mknykgbn" 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" />
@ -17,15 +16,8 @@ import * as m from "@/paraglide/messages.js"
<input name="_gotcha" type="text" class={"hidden"} /> <input name="_gotcha" type="text" class={"hidden"} />
<label class="flex flex-col"> <label class="flex flex-col">
{m.message()} {m.message()}
<textarea <textarea name="message" class="textarea textarea-bordered w-full" required
name="message" ></textarea>
class="textarea textarea-bordered w-full bg-cat-base"
required></textarea>
</label> </label>
</form> </form>
<button <button type="submit" class="btn mt-2" title={m.send()}>{m.send()}</button>
type="submit"
class="btn mt-2 bg-cat-base border-cat-surface0"
title={m.send()}>{m.send()}</button
>
</div>

View File

@ -11,15 +11,11 @@ const giteaLink = `${GIT_URL}/martials/martials.no`
<div class="divider bg-inherit"></div> <div class="divider bg-inherit"></div>
<div <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" class="py-5 flex flex-row gap-1 justify-around w-full items-center bg-inherit"
> >
<div> <div>
<GiteaLink href={giteaLink} class="!text-cat-text" /> <GiteaLink href={giteaLink} />
<ExternalLink <ExternalLink href={STATUS_URL} class="flex items-center" title="Status">
href={STATUS_URL}
class="flex items-center !text-cat-text"
title="Status"
>
<PajamasIcon <PajamasIcon
name="pajamas:status-health" name="pajamas:status-health"
class="w-6 h-6 mr-2" class="w-6 h-6 mr-2"

View File

@ -16,10 +16,10 @@ const {
} = Astro.props } = Astro.props
--- ---
<label class="flex flex-col w-full"> <label class="flex flex-col">
{label} {label}
<input <input
class="input input-bordered w-full bg-cat-base" class="input input-bordered w-full"
type={type} type={type}
name={name} name={name}
required={required} required={required}

View File

@ -2,26 +2,14 @@
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 pathname = Astro.url.pathname const currentPath = resolvePathname(Astro.url.pathname)
const currentPath = resolvePathname(pathname)
const isEnglish = pathname.startsWith("/en")
--- ---
<div class="join"> <div class="join">
<LocaleLink <LocaleLink to={currentPath as NavLink} lang="nb" class="btn join-item"
to={currentPath as NavLink} >Norsk</LocaleLink
lang="nb"
class:list={[
"btn join-item !text-cat-text border-cat-surface0",
!isEnglish ? "bg-cat-mantle" : "bg-cat-base",
]}>Norsk</LocaleLink
> >
<LocaleLink <LocaleLink to={currentPath as NavLink} lang="en" class="btn join-item"
to={currentPath as NavLink} >English</LocaleLink
lang="en"
class:list={[
"btn join-item !text-cat-text border-cat-surface0",
isEnglish ? "bg-cat-mantle" : "bg-cat-base",
]}>English</LocaleLink
> >
</div> </div>

View File

@ -7,6 +7,6 @@ interface Props {
const { tags } = Astro.props const { tags } = Astro.props
--- ---
<div class="flex flex-wrap gap-1 py-0.5"> <div class="flex flex-wrap gap-1">
{tags.map((tag) => <Badge tag={tag} />)} {tags.map((tag) => <Badge tag={tag} />)}
</div> </div>

View File

@ -8,7 +8,7 @@ import Links from "@/links"
Links.map(({ to, label }) => ( Links.map(({ to, label }) => (
<LocaleLink <LocaleLink
to={to} to={to}
class={"m-2 not-hover:!text-cat-text font-bold font-mono"} class={"m-2 hover:text-cat-mauve font-bold font-mono"}
> >
~/{label()} ~/{label()}
</LocaleLink> </LocaleLink>

View File

@ -1,7 +0,0 @@
---
import Greeting from "./Greeting.astro"
import LatestProjects from "./LatestProjects.astro"
---
<Greeting />
<LatestProjects />

View File

@ -1,10 +0,0 @@
---
import { getCollection } from "astro:content"
import ProjectGrid from "@/components/projects/ProjectGrid.astro"
const projects = await getCollection("projects")
---
<div class="divider"></div>
<ProjectGrid projects={projects} />

View File

@ -12,7 +12,7 @@ const iconStyle = "w-6 h-6"
--- ---
<ExternalLink href={url} noStyle> <ExternalLink href={url} noStyle>
<div class:list={["card bg-cat-mantle text-cat-text", 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">
{ {
icon ? ( icon ? (

View File

@ -1,12 +1,32 @@
--- ---
import ProjectGrid from "./ProjectGrid.astro" import ProjectCard from "./ProjectCard.astro"
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"
--- ---
<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>

View File

@ -19,13 +19,12 @@ const { title, description, tags, image, imageAlt, linkTo } = Astro.props
<LocaleLink <LocaleLink
to={linkTo} to={linkTo}
class="card bg-cat-base max-w-96 shadow-xl hover:scale-105 transition border border-cat-surface0" class="card bg-cat-base max-w-96 shadow-xl hover:scale-105 transition"
> >
<figure> <figure>
<Image src={image} alt={imageAlt} /> <Image src={image} alt={imageAlt} />
<figcaption class="sr-only">{imageAlt}</figcaption>
</figure> </figure>
<div class="card-body text-cat-text"> <div class="card-body">
<h2 class="card-title"> <h2 class="card-title">
{title} {title}
</h2> </h2>

View File

@ -1,32 +0,0 @@
---
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>

View File

@ -29,7 +29,7 @@ const {
--- ---
<!--TODO day.js / Temporal API 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] px-3">
<div class="flex justify-between my-2"> <div class="flex justify-between my-2">
<div> <div>
<h2>{title}</h2> <h2>{title}</h2>
@ -46,7 +46,7 @@ const {
</div> </div>
<Image src={heroImage} alt={heroImageAlt} class="m-auto" /> <Image src={heroImage} alt={heroImageAlt} class="m-auto" />
<GiteaLink href={source} class="my-2" /> <GiteaLink href={source} class="text-cat-mauve my-2" />
<p class="my-2">{description}</p> <p class="my-2">{description}</p>
<Content /> <Content />

View File

@ -1,5 +1,5 @@
--- ---
title: "Welcome" title: "Hjemmeside"
description: "Welcome to my homepage / portfolio" description: "Welcome to my homepage / portfolio"
heroImage: "assets/recursive-meme.png" heroImage: "assets/recursive-meme.png"
heroImageAlt: "A recursive meme that says: Self-reference, recursive meme is self-referential" heroImageAlt: "A recursive meme that says: Self-reference, recursive meme is self-referential"

View File

@ -9,8 +9,7 @@ interface Props {
class?: string class?: string
} }
const { title, class: clazz } = Astro.props const { title, class: clazz } = Astro.props
const mainClass = const mainClass = "grow max-w-[1000px] m-auto sm:min-w-[500px]"
"grow max-w-[1000px] m-auto sm:min-w-[500px] not-sm:w-full px-5"
--- ---
<!doctype html> <!doctype html>

View File

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

View File

@ -1,9 +1,10 @@
--- ---
import IndexPage from "@/components/landing/IndexPage.astro"
import Layout from "@/layouts/Layout.astro" import Layout from "@/layouts/Layout.astro"
import "@/styles/global.css" import Greeting from "@/components/Greeting.astro"
// https://slashpages.net/
--- ---
<Layout title="Velkommen"> <Layout title="Velkommen">
<IndexPage /> <Greeting />
</Layout> </Layout>

View File

@ -48,6 +48,6 @@ h3 {
/* TODO change default style*/ /* TODO change default style*/
a { a {
@apply link text-cat-mauve; @apply link;
text-decoration-line: none; text-decoration-line: none;
} }