Skip to content

Commit fc6d67b

Browse files
committed
Polish: accessibility, layout, and consistency fixes
- Remove duplicate theme-color meta in BaseLayout - Fix Navigation aria-current: remove attr instead of setting to 'false' - Make 404 heading responsive (text-4xl on mobile) - Remove redundant min-h-screen from 404 layout - Use CSS custom properties for blog prose colors instead of hardcoded hex - Add focus-visible ring to FAQ summary elements - Add Services and Now links to Footer - Sort projects by featured flag
1 parent 08fb496 commit fc6d67b

8 files changed

Lines changed: 22 additions & 14 deletions

File tree

public/James King CV.pdf

55.2 KB
Binary file not shown.

src/components/Footer.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ const currentYear = new Date().getFullYear();
1212
</div>
1313

1414
<div class="flex items-center gap-4">
15+
<a href="/services" class="text-tokyo-muted hover:text-tokyo-fg transition-colors">Services</a>
16+
<span class="text-tokyo-border">|</span>
17+
<a href="/now" class="text-tokyo-muted hover:text-tokyo-fg transition-colors">Now</a>
18+
<span class="text-tokyo-border">|</span>
1519
<a href="/humans.txt" class="text-tokyo-muted hover:text-tokyo-fg transition-colors">humans.txt</a>
1620
<span class="text-tokyo-border">|</span>
1721
<a href="https://github.com/Jamesking56?utm_source=jamesking.dev&utm_medium=referral" target="_blank" rel="noopener external" class="text-tokyo-accent underline hover:text-tokyo-accent-hover" aria-label="GitHub (opens in new tab)">GitHub<span class="text-xs text-tokyo-muted">↗</span></a>

src/components/Navigation.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ const currentPath = Astro.url.pathname;
8181
link.classList.toggle('text-tokyo-fg', !isActive);
8282
link.classList.toggle('hover:text-tokyo-fg-bright', !isActive);
8383
link.classList.toggle('hover:bg-tokyo-border/50', !isActive);
84-
link.setAttribute('aria-current', isActive ? 'page' : 'false');
84+
if (isActive) {
85+
link.setAttribute('aria-current', 'page');
86+
} else {
87+
link.removeAttribute('aria-current');
88+
}
8589
});
8690
}
8791

src/layouts/BaseLayout.astro

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site);
2929
<meta charset="UTF-8" />
3030
<meta name="viewport" content="width=device-width, initial-scale=1" />
3131
<meta name="generator" content={Astro.generator} />
32-
<meta name="theme-color" content="#1a1b26" />
3332
<ClientRouter fallback="swap" />
3433

3534
<!-- Primary Meta Tags -->

src/pages/404.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const selectedJoke = jokes[Math.floor(Math.random() * jokes.length)];
2626
---
2727

2828
<Layout title="404 - Page Not Found">
29-
<div class="min-h-screen grid grid-rows-[auto_1fr_auto]">
29+
<div class="grid grid-rows-[auto_1fr_auto]">
3030
<div class="max-w-4xl mx-auto px-4 py-12 flex-1 flex items-center justify-center">
3131
<div class="text-center">
3232
<div class="bg-tokyo-bg-alt border border-tokyo-border rounded-lg overflow-hidden mb-8">
@@ -38,7 +38,7 @@ const selectedJoke = jokes[Math.floor(Math.random() * jokes.length)];
3838
</div>
3939
<div class="p-8">
4040
<p class="text-tokyo-muted mb-2">$ echo $?</p>
41-
<h1 class="text-6xl font-bold text-tokyo-fg-bright mb-4">404</h1>
41+
<h1 class="text-4xl sm:text-6xl font-bold text-tokyo-fg-bright mb-4">404</h1>
4242
<p class="text-xl text-tokyo-fg mb-6">Page not found</p>
4343
<div class="bg-tokyo-bg border border-tokyo-border rounded p-4 mb-4 text-left font-mono text-sm">
4444
<span class="text-tokyo-success">$</span> <span class="text-tokyo-cyan">{selectedJoke.code}</span>

src/pages/blog/[slug].astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ const typeColors: Record<string, string> = {
7979

8080
<style>
8181
.prose h2 {
82-
border-left: 3px solid #7aa2f7;
82+
border-left: 3px solid var(--color-tokyo-accent);
8383
padding-left: 1rem;
84-
background-color: #24283b;
84+
background-color: var(--color-tokyo-bg-alt);
8585
padding-top: 0.75rem;
8686
padding-bottom: 0.75rem;
8787
border-radius: 0 0.25rem 0.25rem 0;
88-
color: #c0caf5;
88+
color: var(--color-tokyo-fg-bright);
8989
margin-top: 2rem;
9090
margin-bottom: 1rem;
9191
}
@@ -98,7 +98,7 @@ const typeColors: Record<string, string> = {
9898
.prose figure figcaption {
9999
margin-top: 0;
100100
font-size: 0.875rem;
101-
color: #565f89;
101+
color: var(--color-tokyo-muted);
102102
}
103103
</style>
104104

src/pages/faq.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const faqs = [
5555
<div class="space-y-4">
5656
{faqs.map(faq => (
5757
<details class="bg-tokyo-bg-alt border border-tokyo-border rounded group">
58-
<summary class="p-4 cursor-pointer text-tokyo-fg-bright font-semibold flex items-center justify-between">
58+
<summary class="p-4 cursor-pointer text-tokyo-fg-bright font-semibold flex items-center justify-between focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-tokyo-accent/50 focus-visible:rounded">
5959
{faq.question}
6060
<span class="text-tokyo-muted group-open:rotate-90 transition-transform">&#9658;</span>
6161
</summary>

src/pages/projects/index.astro

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import Layout from '../../layouts/Layout.astro';
33
import { getCollection } from 'astro:content';
44
55
const allProjects = await getCollection('projects');
6-
const vsCore = allProjects.find(p => p.id === 'vs-core');
7-
const others = allProjects.filter(p => p.id !== 'vs-core' && p.id !== 'jamesking-dev');
8-
const jameskingDev = allProjects.find(p => p.id === 'jamesking-dev');
9-
const projects = [vsCore, ...others, jameskingDev];
6+
const sorted = allProjects.sort((a, b) => {
7+
if (a.data.featured && !b.data.featured) return -1;
8+
if (!a.data.featured && b.data.featured) return 1;
9+
return 0;
10+
});
1011
---
1112

1213
<Layout title="Projects" description="Side projects and SaaS products built by James King. Includes Varsuite Core (multi-tenant SaaS), cloudfleet-cli-aur, dotfiles, and coding standards.">
@@ -17,7 +18,7 @@ const projects = [vsCore, ...others, jameskingDev];
1718
</p>
1819

1920
<div class="grid md:grid-cols-2 gap-4">
20-
{projects.map(project => (
21+
{sorted.map(project => (
2122
<a href={`/projects/${project.id}`} class="bg-tokyo-bg-alt border border-tokyo-border rounded p-4 hover:border-tokyo-accent transition-colors group">
2223
<h3 class="text-lg font-semibold text-tokyo-fg-bright group-hover:text-tokyo-accent transition-colors">
2324
{project.data.title}

0 commit comments

Comments
 (0)