Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b27b06

Browse files
committed
feat: features card mvp
1 parent6992beb commit2b27b06

File tree

4 files changed

+60
-26
lines changed

4 files changed

+60
-26
lines changed

‎components/Landing/FeatureCard.tsx‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import{useTheme}from'@geist-ui/react';
2+
importReactfrom'react';
3+
4+
interfaceProps{}
5+
6+
constFeatureCard:React.FC<Props>=({})=>{
7+
const{ palette}=useTheme();
8+
return(
9+
<divclassName="card">
10+
<h2>Internationalization</h2>
11+
<p>Built-in Domain&SubdomainRoutingandAutomaticLanguagedetection.</p>
12+
<stylejsx>{`
13+
.card {
14+
border: 1px solid${palette.accents_2};
15+
padding: 16pt;
16+
border-radius: 5px;
17+
text-align: left;
18+
flex: 1 1;
19+
display: flex;
20+
flex-direction: column;
21+
}
22+
.card h2 {
23+
font-size: 20px;
24+
}
25+
`}</style>
26+
</div>
27+
);
28+
};
29+
30+
exportdefaultFeatureCard;
File renamed without changes.

‎pages/index.tsx‎

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
importReactfrom'react';
22
importMainLayoutfrom'@/layouts/MainLayout';
3-
import{Card,Link,Row,Spacer}from'@geist-ui/react';
4-
importLandingWorldMapfrom'@/components/LandingWorldMap';
3+
import{Spacer}from'@geist-ui/react';
4+
importLandingWorldMapfrom'@/components/Landing/LandingWorldMap';
5+
importFeatureCardfrom'@/components/Landing/FeatureCard';
56

67
exportconstmapDt=[
78
{
@@ -41,7 +42,16 @@ const Home: React.FC = () => (
4142
<divclassName="flex flex-col">
4243
<LandingWorldMap/>
4344
<Spacery={1}/>
44-
<Rowstyle={{flexWrap:'wrap'}}justify="space-between">
45+
<divclassName="cards-container">
46+
<FeatureCard/>
47+
<FeatureCard/>
48+
<FeatureCard/>
49+
<FeatureCard/>
50+
<FeatureCard/>
51+
<FeatureCard/>
52+
</div>
53+
54+
{/* <Row style={{ flexWrap: 'wrap' }} justify="space-between">
4555
{mapDt.map((el) => (
4656
<Card key={el.name} width="320px" style={{ marginBottom: '20px' }}>
4757
<h2>{el.name.toUpperCase()}</h2>
@@ -53,8 +63,24 @@ const Home: React.FC = () => (
5363
</Card.Footer>
5464
</Card>
5565
))}
56-
</Row>
66+
</Row> */}
5767
</div>
68+
<stylejsx>{`
69+
.cards-container {
70+
display: grid;
71+
grid-gap: 16pt;
72+
gap: 16pt;
73+
}
74+
@media screen and (min-width: 960px) {
75+
.cards-container {
76+
grid-template-columns: repeat(3, minmax(0, 1fr));
77+
}
78+
}
79+
@media screen and (max-width: 960px) and (min-width: 640px) {
80+
.cards-container {
81+
grid-template-columns: repeat(2, minmax(0, 1fr));
82+
}
83+
`}</style>
5884
</MainLayout>
5985
);
6086
exportdefaultHome;

‎pages/landing.tsx‎

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp