Skip to content

Commit 4afea1f

Browse files
committed
Add version card
1 parent be528d5 commit 4afea1f

File tree

4 files changed

+93
-35
lines changed

4 files changed

+93
-35
lines changed

docs/index.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,4 @@ hero:
1515
image:
1616
src: /tuocan.png
1717
alt: Logo
18-
# features:
19-
# - title: AI-Native Architecture
20-
# details: |
21-
# - Prompt, embed, and agent are first-class language keywords
22-
23-
# - Built-in context and memory management
24-
25-
# - Agentic framework, inspired by OpenAI Swarm
26-
# icon: 🏃🏻‍♀️
27-
# - title: Modern Web Development Simplified
28-
# details: |
29-
# - Built-in web server, data validation, database query capabilities
30-
31-
# - No more boilerplate code
32-
33-
# - AI tool/agent registry: sharing tools and agents is as easy as publishing a library
34-
# icon: 📦
35-
# - title: Easy, elegant, and ergonomic
36-
# details: |
37-
# Think of it as a combination of Python's and Rust's strengths while avoiding their weaknesses
38-
39-
# Compile-time type checking to detect errors and bugs
40-
41-
# High performance without unnecessary complexity
42-
# icon: 🎨
4318
---
44-
45-
## AI-Native
46-
47-
Prompt is a first-class language keyword in AIScript.
48-
49-
```rs
50-
let answer = prompt "What's moon of Pluto?";
51-
print(answer);
52-
// The moon of Pluto is Charon.
53-
```

theme/components/Landingpage/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { BackgroundImage } from '../background-image';
22
import { Hero } from '../hero';
33
import FeatureGroup from '../feature-group';
4+
import VersionCard from '../version-card';
45
import styles from './index.module.scss';
56

67
import { useCallback } from 'react';
@@ -23,6 +24,7 @@ const LandingPage = () => {
2324
githubURL="https://github.com/aiscriptdev/aiscript"
2425
onClickGetStarted={onClickGetStarted}
2526
/>
27+
<VersionCard />
2628
{
2729
Object.entries(featureData).map(([key, features], index) => {
2830
const featureList = features.map((feature) => ({
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.versionCard {
2+
display: flex;
3+
justify-content: center;
4+
width: 100%;
5+
padding: 0 24px;
6+
margin-bottom: 48px;
7+
}
8+
9+
.content {
10+
display: flex;
11+
flex-direction: column;
12+
align-items: center;
13+
gap: 16px;
14+
padding: 24px;
15+
border-radius: 12px;
16+
background: var(--rs-hero-title-gradient, linear-gradient(279deg, #ff8b00 35.21%, #f93920 63.34%));
17+
color: white;
18+
max-width: 600px;
19+
width: 100%;
20+
}
21+
22+
.version {
23+
display: flex;
24+
flex-direction: column;
25+
align-items: center;
26+
gap: 8px;
27+
}
28+
29+
.label {
30+
font-size: 16px;
31+
font-weight: 500;
32+
}
33+
34+
.value {
35+
font-size: 32px;
36+
font-weight: 700;
37+
}
38+
39+
.command {
40+
background: rgba(255, 255, 255, 0.1);
41+
padding: 12px 24px;
42+
border-radius: 8px;
43+
width: 100%;
44+
text-align: center;
45+
}
46+
47+
.commandText {
48+
font-family: monospace;
49+
font-weight: bold;
50+
font-size: 14px;
51+
}
52+
53+
@media screen and (max-width: 600px) {
54+
.content {
55+
padding: 20px;
56+
}
57+
58+
.value {
59+
font-size: 28px;
60+
}
61+
62+
.command {
63+
padding: 10px 16px;
64+
}
65+
66+
.commandText {
67+
font-size: 12px;
68+
}
69+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { type FC } from 'react';
2+
import styles from './index.module.scss';
3+
4+
const VersionCard: FC = () => {
5+
return (
6+
<div className={styles.versionCard}>
7+
<div className={styles.content}>
8+
<div className={styles.version}>
9+
<span className={styles.label}>Latest Version</span>
10+
<span className={styles.value}>v0.1.0</span>
11+
</div>
12+
<div className={styles.command}>
13+
<code className={styles.commandText}>
14+
cargo install aiscript
15+
</code>
16+
</div>
17+
</div>
18+
</div>
19+
);
20+
};
21+
22+
export default VersionCard;

0 commit comments

Comments
 (0)