Skip to content

Commit 7a55053

Browse files
committed
build: Redesign home page
1 parent 0684b62 commit 7a55053

File tree

7 files changed

+151
-201
lines changed

7 files changed

+151
-201
lines changed

website/package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"@astrojs/tailwind": "^5.1.0",
1818
"@expressive-code/plugin-collapsible-sections": "^0.35.3",
1919
"@expressive-code/plugin-line-numbers": "^0.35.3",
20+
"@iconify-json/mdi": "^1.2.1",
2021
"@types/alpinejs": "^3.13.10",
2122
"alpinejs": "^3.13.10",
2223
"astro": "^4.7.1",
@@ -31,4 +32,4 @@
3132
"prettier-plugin-astro": "^0.13.0",
3233
"sass": "^1.76.0"
3334
}
34-
}
35+
}

website/src/components/Card.astro

Lines changed: 26 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { Icon } from "@astrojs/starlight/components";
2+
import { Icon } from "astro-icon/components";
33
44
interface Props {
55
icon?: string;
@@ -10,125 +10,33 @@ const { icon, title } = Astro.props;
1010
---
1111

1212
<article
13-
class="card sl-flex rounded-2xl drop-shadow-[0_0_1px_rgba(49,49,49,0.2)]"
13+
class="card group/card sl-flex relative flex flex-col overflow-hidden p-8 rounded-2xl border shadow-lg bg-gradient-to-tr border-accent-700/[.5] shadow-accent-900/[.5] from-accent-950/[.25] to-accent-900/[.25] hover:boder-accent-700 hover:shadow-accent-900 hover:from-950/[0.75] hover:to-accent-900/[0.75] ease-in-out duration-300"
1414
>
15+
<div class="sl-flex">
16+
{
17+
icon && (
18+
<div class="absolute -top-16 -right-16 z-0 p-8 rounded-full border border-accent-800/[.5] bg-accent-800/[.15] group-hover/card:border-accent-800 group-hover/card:bg-accent-800/[.5] ease-in-out duration-300">
19+
<div class="relative p-6 rounded-full border border-accent-700/[.5] bg-accent-700/[.15] group-hover/card:border-accent-700 group-hover/card:bg-accent-700/[.5] ease-in-out duration-300">
20+
<div class="icon relative flex items-center justify-center w-14 h-14 rounded-full border border-accent-600/[.5] bg-accent-600/[.15] group-hover/card:border-accent-600 group-hover/card:bg-accent-600/[.5] ease-in-out duration-300">
21+
<Icon
22+
name={icon as any}
23+
size={32}
24+
class="text-accent-300 group-hover/card:text-accent-200 ease-in-out duration-300"
25+
/>
26+
</div>
27+
</div>
28+
</div>
29+
)
30+
}
31+
<p
32+
class="text-xl font-semibold text-accent-300 group-hover/card:text-accent-200 !m-0 z-10 sm:text-2xl md:text-3xl md:mb-3 ease-in-out duration-300"
33+
set:html={title}
34+
/>
35+
</div>
36+
1537
<div
16-
class="card-inner flex flex-col relative w-full h-full overflow-hidden rounded-2xl transition duration-300"
38+
class="text-md text-gray-200 group-hover/card:text-gray-100 sm:text-lg z-10"
1739
>
18-
<p class="title sl-flex">
19-
{icon && <Icon name={icon as any} class="icon" size="1.333em" />}
20-
<span set:html={title} />
21-
</p>
22-
<div class="body"><slot /></div>
40+
<slot />
2341
</div>
2442
</article>
25-
26-
<style>
27-
.card {
28-
--sl-card-border: var(--sl-color-accent-high);
29-
--sl-card-bg: var(--sl-color-accent);
30-
position: relative;
31-
box-sizing: border-box;
32-
}
33-
/* .card:nth-child(4n + 1) {
34-
--sl-card-border: var(--sl-color-orange);
35-
--sl-card-bg: var(--sl-color-orange-low);
36-
}
37-
.card:nth-child(4n + 3) {
38-
--sl-card-border: var(--sl-color-green);
39-
--sl-card-bg: var(--sl-color-green-low);
40-
}
41-
.card:nth-child(4n + 4) {
42-
--sl-card-border: var(--sl-color-red);
43-
--sl-card-bg: var(--sl-color-red-low);
44-
}
45-
.card:nth-child(4n + 5) {
46-
--sl-card-border: var(--sl-color-blue);
47-
--sl-card-bg: var(--sl-color-blue-low);
48-
} */
49-
50-
.card .card-inner {
51-
position: relative;
52-
padding: clamp(1rem, calc(0.125rem + 3vw), 2.5rem);
53-
gap: clamp(0.5rem, calc(0.125rem + 1vw), 1rem);
54-
box-sizing: border-box;
55-
56-
--tw-gradient-from: hsl(from var(--sl-color-accent-low) h s l / 100%)
57-
var(--tw-gradient-from-position);
58-
--tw-gradient-to: transparent var(--tw-gradient-to-position);
59-
60-
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
61-
background-image: linear-gradient(to left bottom, var(--tw-gradient-stops)),
62-
linear-gradient(
63-
to left bottom,
64-
hsl(from var(--sl-color-accent-low) h s l / 100%),
65-
hsl(from var(--sl-color-accent-low) h s l / 15%)
66-
);
67-
}
68-
69-
.card:hover .card-inner {
70-
background-image: linear-gradient(to left bottom, var(--tw-gradient-stops));
71-
}
72-
73-
.card::before {
74-
z-index: -1;
75-
content: "";
76-
inset: -1px;
77-
opacity: 1;
78-
pointer-events: none;
79-
position: absolute;
80-
-webkit-user-select: none;
81-
-moz-user-select: none;
82-
user-select: none;
83-
border-radius: 1rem;
84-
85-
transition-property: background-color;
86-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
87-
transition-duration: 0.3s;
88-
animation-duration: 0.3s;
89-
90-
background-image: linear-gradient(
91-
45deg,
92-
hsl(from var(--sl-color-accent) h s l / 50%),
93-
hsl(from var(--sl-color-accent) h s l / 50%)
94-
);
95-
}
96-
97-
.card:hover::before {
98-
opacity: 1;
99-
100-
background-image: radial-gradient(
101-
400px circle at var(--mouse-x) var(--mouse-y),
102-
var(--sl-color-accent) 0%,
103-
transparent 100%
104-
),
105-
linear-gradient(
106-
45deg,
107-
hsl(from var(--sl-color-accent) h s l / 40%),
108-
hsl(from var(--sl-color-accent) h s l / 40%)
109-
);
110-
}
111-
112-
.title {
113-
font-weight: 600;
114-
font-size: var(--sl-text-h4);
115-
color: var(--sl-color-white);
116-
line-height: var(--sl-line-height-headings);
117-
gap: 1rem;
118-
align-items: center;
119-
}
120-
.card .icon {
121-
border: 1px solid var(--sl-card-border);
122-
background-color: var(--sl-card-bg);
123-
padding: 0.2em;
124-
border-radius: 0.25rem;
125-
}
126-
.card .body {
127-
margin: 0;
128-
font-size: clamp(
129-
var(--sl-text-sm),
130-
calc(0.5rem + 1vw),
131-
var(--sl-text-body)
132-
);
133-
}
134-
</style>

website/src/components/SiteTitle.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { Props } from "@astrojs/starlight/props";
66
const href = Astro.props.locale ?? "/";
77
---
88

9-
<a {href} class="site-title sl-flex">
9+
<a {href} class="site-title sl-flex gap-2">
1010
{
1111
config.logo && logos.dark && (
1212
<>
@@ -32,7 +32,7 @@ const href = Astro.props.locale ?? "/";
3232
}
3333
<span
3434
class:list={{
35-
"bg-gradient-to-b from-accent-400 to-accent-200 bg-clip-text text-transparent": true,
35+
"bg-gradient-to-b from-accent-500 to-accent-200 bg-clip-text text-transparent": true,
3636
"sr-only": config.logo?.replacesTitle,
3737
}}
3838
>

website/src/content/docs/index.mdx

Lines changed: 58 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
---
22
title: Reactter
3-
description: A light, powerful and quick Reactive State Management, Dependency Injection and Event handler.
3+
description: A light, powerful and quick Reactive State Management, Dependency Injection and Event Handler for Dart/Flutter.
44
template: splash
55
hero:
6-
title: <h1 class="text-5xl bg-gradient-to-b from-accent-400 to-accent-300 bg-clip-text text-transparent">Reactter</h1>
6+
title: <h1 class="text-5xl sm:text-6xl bg-gradient-to-b from-accent-600 to-accent-300 bg-clip-text text-transparent">Reactter</h1>
77
tagline:
8-
A
9-
<span class="text-lg font-bold bg-gradient-to-b from-slate-100 to-slate-400 bg-clip-text text-transparent">lightweight</span>,
10-
<span class="text-lg font-bold bg-gradient-to-b from-slate-100 to-slate-400 bg-clip-text text-transparent">powerful</span>, and
11-
<span class="text-lg font-bold bg-gradient-to-b from-slate-100 to-slate-400 bg-clip-text text-transparent">reactive</span>
12-
<br />
13-
<span class="text-xl font-bold bg-gradient-to-b from-accent-300 to-accent-200 bg-clip-text text-transparent">State Management</span>,
14-
<span class="text-xl font-bold bg-gradient-to-b from-accent-300 to-accent-200 bg-clip-text text-transparent">Dependency Injection</span>
15-
and
16-
<span class="text-xl font-bold bg-gradient-to-b from-accent-300 to-accent-200 bg-clip-text text-transparent">Event handler</span>.
8+
<p class="text-xl sm:text-2xl">
9+
A
10+
<span class="font-bold bg-gradient-to-b from-slate-100 to-slate-400 bg-clip-text text-transparent">lightweight</span>,
11+
<span class="font-bold bg-gradient-to-b from-slate-100 to-slate-400 bg-clip-text text-transparent">powerful</span>, and
12+
<span class="font-bold bg-gradient-to-b from-slate-100 to-slate-400 bg-clip-text text-transparent">reactive</span>
13+
</p>
14+
<p class="text-2xl sm:text-3xl">
15+
<span class="font-semibold bg-gradient-to-b from-accent-500 to-accent-200 bg-clip-text text-transparent">State Management</span>,
16+
<span class="font-semibold bg-gradient-to-b from-accent-500 to-accent-200 bg-clip-text text-transparent">Dependency Injection</span> and
17+
<span class="font-semibold bg-gradient-to-b from-accent-500 to-accent-200 bg-clip-text text-transparent">Event Handler</span> for Dart/Flutter.
18+
</p>
1719
image:
1820
html: <div id="hero_logo"></div>
1921
actions:
20-
- text: Get Started
22+
- text: <span class="text-lg sm:text-xl font-medium">Get Started</span>
2123
link: /reactter/getting_started/
22-
icon: right-arrow
24+
icon: rocket
2325
variant: primary
24-
- text: Explore on pub.dev
26+
- text: <span class="text-lg sm:text-xl">Explore on pub.dev</span>
2527
link: https://pub.dev/packages/reactter
2628
icon: external
2729
attrs:
@@ -30,50 +32,54 @@ hero:
3032

3133
import { CardGrid } from "@astrojs/starlight/components";
3234
import Card from "@/components/Card.astro";
33-
import ScriptIndex from "@/components/ScriptIndex.astro";
3435

3536
<div class="flex flex-col items-start justify-start">
3637
## Try it
37-
Experience the full potential of Reactter by trying it online on <a href="https://zapp.run/pub/flutter_reactter" target="_blank">Zapp</a>.
38+
<p class="text-lg sm:text-xl">Experience the full potential of Reactter by trying it online on <a href="https://zapp.run/pub/flutter_reactter" target="_blank">Zapp</a>.</p>
3839
<iframe
40+
class="!hidden sm:!block rounded-2xl w-full !h-[600px] border shadow-2xl border-accent-700/[0.5] shadow-accent-700/[.5] bg-accent-950/[.5] hover:boder-accent-700 hover:shadow-accent-700 hover:bg-accent-950 ease-in-out duration-300"
3941
src="https://zapp.run/edit/zn9806bin990?theme=dark&lazy=false&file=lib/examples/1_counter/counter_page.dart"
40-
class="w-full !h-[600px] border-0 overflow-hidden"
41-
></iframe>
42+
/>
43+
<iframe
44+
class="!block sm:!hidden rounded-2xl w-full !h-[600px] border shadow-2xl border-accent-700/[0.5] shadow-accent-700/[.5] bg-accent-950/[.5] hover:boder-accent-700 hover:shadow-accent-700 hover:bg-accent-950 ease-in-out duration-300"
45+
src="https://zapp.run/edit/zn9806bin990?theme=dark&lazy=true&file=lib/examples/1_counter/counter_page.dart"
46+
/>
4247
</div>
4348

4449
## Features
50+
<div>
51+
<CardGrid stagger>
52+
<Card title="Fine-grained reactivity" icon="mdi:creation">
53+
React to changes at the finest level of granularity, providing precise
54+
control and responsiveness in your app.
55+
Learn more about [Rendering control](/reactter/core_concepts/rendering_control).
56+
</Card>
57+
<Card title="Lightweight" icon="mdi:telegram">
58+
Reactter boasts a minimal footprint, ensuring efficient performance without
59+
relying on any external dependencies.
60+
</Card>
61+
<Card title="Highly reusable" icon="mdi:json">
62+
Share states and logic across your app using [Dependency
63+
Injection](/reactter/core_concepts/dependency_injection) and [Custom Hooks](/reactter/core_concepts/hooks/#custom-hook).
64+
</Card>
65+
<Card title="Easy to use" icon="mdi:star">
66+
Just a few lines of code to get started. Without code generation or complex
67+
configurations.
68+
</Card>
69+
<Card title="100% Dart" icon="dart">
70+
Supports Dart server, Dart JS (HTML), Flutter (Web, Mobile and Desktop),
71+
etc. Reactter can be used in any Dart project! Compatible with latest
72+
Dart/Flutter versions.
73+
</Card>
74+
<Card title="Fully testable" icon="mdi:code-tags-check">
75+
Test your states and logic easily. Reactter is 100% test coverage.
76+
<div class="flex">
77+
[![Codecov](https://img.shields.io/codecov/c/github/2devs-team/reactter?logo=codecov)](https://app.codecov.io/gh/2devs-team/reactter)
78+
</div>
79+
</Card>
80+
<Card title="No Boilerplate" icon="mdi:code-tags">
81+
Reduce code significantly and simplify your app.
82+
</Card>
83+
</CardGrid>
84+
</div>
4585

46-
<CardGrid stagger>
47-
<Card title="Fine-grained reactivity" icon="rocket">
48-
React to changes at the finest level of granularity, providing precise
49-
control and responsiveness in your app.
50-
Learn more about [Rendering control](/reactter/core_concepts/rendering_control).
51-
</Card>
52-
<Card title="Lightweight" icon="telegram">
53-
Reactter boasts a minimal footprint, ensuring efficient performance without
54-
relying on any external dependencies.
55-
</Card>
56-
<Card title="No Boilerplate" icon="seti:html">
57-
Reduce code significantly and simplify your app.
58-
</Card>
59-
<Card title="Easy to use" icon="star">
60-
Just a few lines of code to get started. Without code generation or complex
61-
configurations.
62-
</Card>
63-
<Card title="Highly reusable" icon="seti:json">
64-
Share states and logic across your app using [Dependency
65-
Injection](/reactter/core_concepts/dependency_injection) and [Custom Hooks](/reactter/core_concepts/hooks/#custom-hook).
66-
</Card>
67-
<Card title="100% Dart" icon="seti:dart">
68-
Supports Dart server, Dart JS (HTML), Flutter (Web, Mobile and Desktop),
69-
etc. Reactter can be used in any Dart project! Compatible with latest
70-
Dart/Flutter versions.
71-
</Card>
72-
<Card title="Fully testable" icon="approve-check">
73-
Test your states and logic easily. Reactter is 100% test coverage.
74-
75-
[![Codecov](https://img.shields.io/codecov/c/github/2devs-team/reactter?logo=codecov)](https://app.codecov.io/gh/2devs-team/reactter)
76-
</Card>
77-
</CardGrid>
78-
79-
<ScriptIndex />

0 commit comments

Comments
 (0)