Skip to content

Commit 8751b21

Browse files
jan-buresCopilot
andcommitted
refactor: remove old roadmap documentation and implement new roadmap data structure
Co-authored-by: Copilot <copilot@github.com>
1 parent 7f8f09e commit 8751b21

9 files changed

Lines changed: 1172 additions & 362 deletions

File tree

src/components/Footer.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const socialLinks = [
2222
2323
const quickLinks = [
2424
{ href: '/', label: 'Home' },
25+
{ href: '/roadmap', label: 'Roadmap' },
2526
{ href: '/guides', label: 'Documentation' },
2627
{ href: '/blog', label: 'Blog' },
2728
// { href: '/gallery', label: 'Gallery' },

src/components/Header.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const { pathname } = Astro.url;
44
55
const navItems = [
66
{ href: '/', label: 'Home' },
7+
{ href: '/roadmap', label: 'Roadmap' },
78
{ href: '/guides', label: 'Documentation' },
89
{ href: '/blog', label: 'Blog' },
910
// { href: '/gallery', label: 'Gallery' },

src/components/ProgressBar.astro

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
interface Props {
3+
min: number;
4+
max: number;
5+
value: number;
6+
animated?: boolean;
7+
class?: string;
8+
ariaLabel?: string;
9+
}
10+
11+
const {
12+
min,
13+
max,
14+
value,
15+
animated = true,
16+
class: className = '',
17+
ariaLabel = 'Progress',
18+
} = Astro.props;
19+
20+
const range = Math.max(max - min, 1);
21+
const clampedValue = Math.min(Math.max(value, min), max);
22+
const percent = ((clampedValue - min) / range) * 100;
23+
---
24+
25+
<div
26+
class:list={['progress-bar', className]}
27+
data-progress-bar
28+
data-animated={animated ? 'true' : 'false'}
29+
data-target={percent.toString()}
30+
role="progressbar"
31+
aria-label={ariaLabel}
32+
aria-valuemin={min}
33+
aria-valuemax={max}
34+
aria-valuenow={clampedValue}
35+
>
36+
<div class="progress-bar__track">
37+
<div class="progress-bar__fill"></div>
38+
</div>
39+
</div>
40+
41+
<script is:inline>
42+
document.querySelectorAll('[data-progress-bar]').forEach((element) => {
43+
if (!(element instanceof HTMLElement) || element.dataset.ready === 'true') {
44+
return;
45+
}
46+
47+
const fill = element.querySelector('.progress-bar__fill');
48+
49+
if (!(fill instanceof HTMLElement)) {
50+
return;
51+
}
52+
53+
const target = element.dataset.target ?? '0';
54+
const animate = element.dataset.animated !== 'false';
55+
const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
56+
57+
element.dataset.ready = 'true';
58+
59+
if (!animate || reducedMotion) {
60+
fill.style.width = `${target}%`;
61+
return;
62+
}
63+
64+
requestAnimationFrame(() => {
65+
fill.style.width = `${target}%`;
66+
});
67+
});
68+
</script>
69+
70+
<style>
71+
.progress-bar__track {
72+
height: 0.38rem;
73+
border-radius: 999px;
74+
background: rgba(255, 255, 255, 0.12);
75+
overflow: hidden;
76+
}
77+
78+
.progress-bar__fill {
79+
width: 0;
80+
height: 100%;
81+
border-radius: inherit;
82+
background: linear-gradient(90deg, #5faef5 0%, #df1601 100%);
83+
transition: width 1.1s cubic-bezier(0.2, 0.9, 0.25, 1);
84+
}
85+
86+
@media (prefers-reduced-motion: reduce) {
87+
.progress-bar__fill {
88+
transition: none;
89+
}
90+
}
91+
</style>

src/content/docs/blog/roadmap.mdx

Lines changed: 0 additions & 175 deletions
This file was deleted.

src/content/docs/guides/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hero:
88
link: /guides/installation/
99
icon: right-arrow
1010
- text: View Roadmap
11-
link: /guides/roadmap/
11+
link: /roadmap/
1212
icon: rocket
1313
---
1414

@@ -23,7 +23,7 @@ Explore comprehensive guides, development updates, and reference documentation f
2323
Step-by-step instructions for installing KSP2 Redux on Steam, Epic Games Store, or Portable versions. [Get started →](/guides/installation/)
2424
</Card>
2525
<Card title="Roadmap" icon="star">
26-
Explore our complete development roadmap from Foundation to Multiplayer. [View roadmap →](/guides/roadmap/)
26+
Explore our complete development roadmap from Foundation to Multiplayer. [View roadmap →](/roadmap/)
2727
</Card>
2828
<Card title="Mod Compatibility" icon="puzzle">
2929
Learn about using mods with Redux and the new modding SDK. [Learn more →](/guides/mod-compatibility/)
@@ -39,7 +39,7 @@ New to KSP2 Redux? Here's your quick start path:
3939

4040
1. **[Read the Installation Guide](/guides/installation/)** - Get Redux installed on your system
4141
2. **[Check the FAQ](/faq/)** - Find answers to common questions
42-
3. **[View the Roadmap](/guides/roadmap/)** - See what's coming next
42+
3. **[View the Roadmap](/roadmap/)** - See what's coming next
4343
4. **[Join the Community](#community)** - Connect with other players and developers
4444

4545
## Development Blog

0 commit comments

Comments
 (0)