Skip to content

Commit f574af6

Browse files
committed
feat(docs): add version selector and legacy v0.3 documentation
1 parent 29e9627 commit f574af6

22 files changed

Lines changed: 279 additions & 88 deletions

File tree

src/components/Header.astro

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
const pathname = Astro.url.pathname;
3+
const isLegacy = pathname.startsWith('/legacy/v0.3');
4+
---
5+
6+
<header class="header">
7+
<nav class="header__wrapper | wrapper">
8+
<div class="header__branding">
9+
<img class="header__logo" src="/images/icon.png" alt="react native fluffle logo" />
10+
11+
<div class="header__title-wrapper">
12+
<h1>Fluffle</h1>
13+
<h2>Built to compose</h2>
14+
</div>
15+
</div>
16+
17+
<div class="header__options">
18+
<select class="header__versions" onchange="window.location.href=this.value">
19+
<option value="/" selected={!isLegacy}> v0.4 </option>
20+
21+
<option value="/legacy/v0.3/features/rem" selected={isLegacy}> v0.3 </option>
22+
</select>
23+
24+
<a class="header__github" href="https://github.com/bibliolabsofficial/react-native-fluffle">
25+
<i class="fa-brands fa-github" aria-hidden="true"></i>
26+
</a>
27+
28+
<a class="header__sponsor" href="https://github.com/sponsors/filipe-2">
29+
<i class="fa-regular fa-heart" aria-hidden="true"></i>
30+
</a>
31+
</div>
32+
</nav>
33+
</header>;

src/components/Header.tsx

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

src/config/sidebar.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ export const sidebar = [
2020
{
2121
title: 'Examples',
2222
href: '/examples/interactive-card-demo',
23-
items: [
24-
{ title: 'Interactive card demo', href: '/examples/interactive-card-demo' },
25-
],
23+
items: [{ title: 'Interactive card demo', href: '/examples/interactive-card-demo' }],
2624
},
2725
{
2826
title: 'Roadmap',
@@ -32,7 +30,7 @@ export const sidebar = [
3230
{ title: 'Mixins', href: '/roadmap/mixins' },
3331
],
3432
},
35-
{
33+
{
3634
title: 'Contributing',
3735
href: '/contributing/issues',
3836
items: [
@@ -41,4 +39,12 @@ export const sidebar = [
4139
{ title: 'Donate', href: '/contributing/donate' },
4240
],
4341
},
42+
{
43+
title: 'Versions',
44+
href: '/migration/v0.5',
45+
items: [
46+
{ title: 'Migration to v0.4', href: '/migration/v0.4' },
47+
{ title: 'Legacy docs (v0.3)', href: '/legacy/v0.3/features/rem' },
48+
],
49+
},
4450
];

src/layouts/Layout.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface Props {
55
66
const { title } = Astro.props;
77
8-
import "../styles/main.scss";
8+
import '../styles/main.scss';
99
---
1010

1111
<!doctype html>
@@ -14,8 +14,8 @@ import "../styles/main.scss";
1414
<meta charset="UTF-8" />
1515
<meta name="description" content="React Native Fluffle documentation website." />
1616
<meta name="viewport" content="width=device-width" />
17-
<link rel="icon" type="image/svg+xml" href="../../images/icon.png" />
18-
<link rel="stylesheet" href="../../misc/font-awesome/css/all.css" />
17+
<link rel="icon" type="image/svg+xml" href="/images/icon.png" />
18+
<link rel="stylesheet" href="/misc/font-awesome/css/all.css" />
1919
<meta name="generator" content={Astro.generator} />
2020
<title>{title}</title>
2121
</head>

src/pages/404.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Layout from "../layouts/Layout.astro";
3-
import Header from "../components/Header";
3+
import Header from "../components/Header.astro";
44
import MainWrapper from "../layouts/MainWrapper.astro";
55
import Aside from "../components/Aside.astro";
66
import Content from "../layouts/Content.astro";

src/pages/contributing/donate.astro

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
2-
import Layout from "../../layouts/Layout.astro";
3-
import Header from "../../components/Header";
4-
import MainWrapper from "../../layouts/MainWrapper.astro";
5-
import Aside from "../../components/Aside.astro";
6-
import Content from "../../layouts/Content.astro";
2+
import Layout from '../../layouts/Layout.astro';
3+
import Header from '../../components/Header.astro';
4+
import MainWrapper from '../../layouts/MainWrapper.astro';
5+
import Aside from '../../components/Aside.astro';
6+
import Content from '../../layouts/Content.astro';
77
import NavButton from '../../components/NavButton.astro';
8-
import Footer from "../../components/Footer";
8+
import Footer from '../../components/Footer';
99
---
1010

11-
<Layout title="Contributing: Issues and Bugs | Fluffle">
11+
<Layout title="Contributing: Support the project | Fluffle">
1212
<Header />
1313

1414
<MainWrapper>
@@ -17,25 +17,31 @@ import Footer from "../../components/Footer";
1717
<main>
1818
<Content title="Support the project">
1919
<p>
20-
Fluffle is an open-source project and is maintained in free time.
21-
If you find it useful, you can support its development below.
20+
Fluffle is an open-source project and is maintained in free time. If you find it useful,
21+
you can support its development below.
2222
</p>
2323

2424
<h3>Ways to support</h3>
2525

2626
<ul>
2727
<li>
28-
⭐ Star the repository on <a href="https://github.com/bibliolabsofficial/react-native-fluffle" target="_blank" rel="noopener noreferrer">GitHub</a>
28+
⭐ Star the repository on <a
29+
href="https://github.com/bibliolabsofficial/react-native-fluffle"
30+
target="_blank"
31+
rel="noopener noreferrer">GitHub</a
32+
>
2933
</li>
3034

3135
<li>
32-
💖 Sponsor on <a href='https://github.com/sponsors/filipe-2' target="_blank" rel="noopener noreferrer">GitHub Sponsors</a>
36+
💖 Sponsor on <a
37+
href="https://github.com/sponsors/filipe-2"
38+
target="_blank"
39+
rel="noopener noreferrer">GitHub Sponsors</a
40+
>
3341
</li>
3442
</ul>
3543

36-
<p>
37-
Every contribution helps keep the project maintained and improving.
38-
</p>
44+
<p>Every contribution helps keep the project maintained and improving.</p>
3945

4046
<NavButton
4147
prev={{ title: 'Contributing | Pull requests', href: '/contributing/pull-requests' }}

src/pages/contributing/issues.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Layout from "../../layouts/Layout.astro";
3-
import Header from "../../components/Header";
3+
import Header from "../../components/Header.astro";
44
import MainWrapper from "../../layouts/MainWrapper.astro";
55
import Aside from "../../components/Aside.astro";
66
import Content from "../../layouts/Content.astro";

src/pages/contributing/pull-requests.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Layout from "../../layouts/Layout.astro";
3-
import Header from "../../components/Header";
3+
import Header from "../../components/Header.astro";
44
import MainWrapper from "../../layouts/MainWrapper.astro";
55
import Aside from "../../components/Aside.astro";
66
import Content from "../../layouts/Content.astro";

src/pages/examples/interactive-card-demo.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Layout from "../../layouts/Layout.astro";
3-
import Header from "../../components/Header";
3+
import Header from "../../components/Header.astro";
44
import MainWrapper from "../../layouts/MainWrapper.astro";
55
import Aside from "../../components/Aside.astro";
66
import Content from "../../layouts/Content.astro";

src/pages/features/nesting.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
import Layout from "../../layouts/Layout.astro";
3-
import Header from "../../components/Header";
3+
import Header from "../../components/Header.astro";
44
import MainWrapper from "../../layouts/MainWrapper.astro";
55
import Aside from "../../components/Aside.astro";
66
import Content from "../../layouts/Content.astro";

0 commit comments

Comments
 (0)