Skip to content

Commit b91d1ac

Browse files
committed
feat(docs): add interactive demo page
1 parent 1072691 commit b91d1ac

5 files changed

Lines changed: 67 additions & 3 deletions

File tree

‎src/config/sidebar.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ export const sidebar = [
1717
{ title: 'rem units', href: '/features/rem' },
1818
],
1919
},
20+
{
21+
title: 'Examples',
22+
href: '/examples/interactive-card-demo',
23+
items: [
24+
{ title: 'Interactive card demo', href: '/examples/interactive-card-demo' },
25+
],
26+
},
2027
{
2128
title: 'Roadmap',
2229
href: '/roadmap',

‎src/pages/contributing/pull-requests.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import Footer from "../../components/Footer";
6666
</p>
6767

6868
<NavButton
69-
prev={{ title: 'Contributing | Issues and Bugs', href: '/contributing/issues' }}
69+
prev={{ title: 'Contributing | Issues and bugs', href: '/contributing/issues' }}
7070
next={{ title: 'Contributing | Support the project', href: '/contributing/donate' }}
7171
/>
7272
</Content>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
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";
7+
import Footer from "../../components/Footer";
8+
import NavButton from '../../components/NavButton.astro';
9+
---
10+
11+
<Layout title="Interactive card demo | Fluffle">
12+
<Header />
13+
14+
<MainWrapper>
15+
<Aside />
16+
17+
<main>
18+
<Content title="Interactive card demo">
19+
<p>
20+
Try the features in action with this interactive example. Edit the code and see the results in real-time.
21+
</p>
22+
23+
<br>
24+
25+
<p>
26+
This demo showcases a real app with an interactive playground containing a card component built with nested styles and <code>rem</code> units, demonstrating how to structure complex layouts in a clean and maintainable way.
27+
</p>
28+
29+
<iframe
30+
src="https://snack.expo.dev/@bibliolabs_official/react-native-fluffle---interactive-card-demo?platform=ios&theme=dark"
31+
width="100%"
32+
height="600"
33+
style="border: 1px solid hsl(330, 50%, 70%); border-radius: 1rem; margin-top: 1rem;"
34+
allow="clipboard-write"
35+
loading="lazy"
36+
title="React Native Fluffle Demo"
37+
/>
38+
39+
<h3>What to try</h3>
40+
<ul>
41+
<li>Use the buttons to interact with the card component in the playground tab</li>
42+
<li>Modify the padding and margin values in the style definitions to see how spacing affects the layout</li>
43+
<li>Change colors in the style definitions to customize the card appearance</li>
44+
<li>Adjust font sizes to see how <code>rem</code> units scale proportionally</li>
45+
<li>Explore the nested style structure to understand how hierarchy improves organization</li>
46+
</ul>
47+
48+
<NavButton
49+
prev={{ title: 'Features | rem units', href: '/features/rem' }}
50+
next={{ title: 'Roadmap | Shorthands', href: '/roadmap/shorthands' }}
51+
/>
52+
</Content>
53+
</main>
54+
</MainWrapper>
55+
56+
<Footer />
57+
</Layout>

‎src/pages/features/rem.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ StyleSheet.configRem.setRootFontSize(16);
7171

7272
<NavButton
7373
prev={{ title: 'Features | Nesting', href: '/features/nesting' }}
74-
next={{ title: 'Roadmap | Shorthands', href: '/roadmap/shorthands' }}
74+
next={{ title: 'Examples | Interactive card demo', href: '/examples/interactive-card-demo' }}
7575
/>
7676
</Content>
7777
</main>

‎src/pages/roadmap/shorthands.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const styles = StyleSheet.create({
8585
</p>
8686

8787
<NavButton
88-
prev={{ title: 'Features | rem units', href: '/features/rem' }}
88+
prev={{ title: 'Examples | Interactive Demo', href: '/examples/interactive-demo' }}
8989
next={{ title: 'Roadmap | Mixins', href: '/roadmap/mixins' }}
9090
/>
9191
</Content>

0 commit comments

Comments
 (0)