-
Notifications
You must be signed in to change notification settings - Fork 18
[feat]: New homepage #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dethan3
wants to merge
5
commits into
main
Choose a base branch
from
homepage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
89e1063
feat(home): add "view all" buttons for events, blogs, and partners
dethan3 391f1b0
Merge branch 'main' into homepage
dethan3 de0fe92
refactor: convert About page to use Bootstrap utility classes and add…
dethan3 9a14c87
refactor: convert About page to use Bootstrap utility classes and add…
dethan3 0471d09
feat: Improve website design and layout
dethan3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Card, Col, Container, Row } from 'react-bootstrap'; | ||
|
||
export const CommunityStats = () => ( | ||
<div className="py-5 bg-white"> | ||
<Container className="text-center"> | ||
<h2 className="mb-4 text-dark">社区数据</h2> | ||
<div className="d-flex justify-content-center mb-4"> | ||
<div | ||
className="border-bottom border-warning" | ||
style={{ width: '60px', borderBottomWidth: '3px !important' }} | ||
/> | ||
</div> | ||
<Row className="justify-content-center"> | ||
{[ | ||
{ number: '1000+', label: '社区成员' }, | ||
{ number: '50+', label: '举办活动' }, | ||
{ number: '200+', label: '技术文章' }, | ||
{ number: '30+', label: '开源项目' }, | ||
].map(({ number, label }) => ( | ||
<Col key={label} xs={12} sm={6} md={3} className="mb-3"> | ||
<Card className="border-0 shadow-sm p-3"> | ||
<Card.Body> | ||
<h3 className="fw-bold text-dark">{number}</h3> | ||
<p className="mb-0 text-dark">{label}</p> | ||
dethan3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Card.Body> | ||
</Card> | ||
</Col> | ||
))} | ||
</Row> | ||
</Container> | ||
</div> | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import Link from 'next/link'; | ||
import { FC } from 'react'; | ||
import { Button, Card, Col, Container, Row } from 'react-bootstrap'; | ||
|
||
import { ArticleMeta } from '../../pages/api/core'; | ||
|
||
interface LatestBlogsProps { | ||
articles: ArticleMeta[]; | ||
} | ||
|
||
export const LatestBlogs: FC<LatestBlogsProps> = ({ articles }) => ( | ||
<div className="py-5"> | ||
<Container> | ||
<h2 className="text-center mb-4 text-dark">最新博客文章</h2> | ||
<div className="d-flex justify-content-center mb-4"> | ||
<div | ||
className="border-bottom border-warning" | ||
style={{ width: '60px', borderBottomWidth: '3px !important' }} | ||
/> | ||
</div> | ||
<Row className="g-4" xs={1} sm={2} md={3}> | ||
{articles.map(({ name, meta, path }) => ( | ||
<Col key={name}> | ||
<Card> | ||
<Card.Body> | ||
<Card.Title className="text-dark">{name}</Card.Title> | ||
<Card.Text className="text-dark"> | ||
发布日期: {meta?.date || '未知日期'} | ||
</Card.Text> | ||
<Link href={path || '#'} className="btn btn-secondary"> | ||
阅读文章 | ||
</Link> | ||
dethan3 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Card.Body> | ||
</Card> | ||
</Col> | ||
))} | ||
</Row> | ||
|
||
<div className="text-center mt-4"> | ||
<Button variant="outline-primary" size="lg" href="/article"> | ||
查看全部文章 → | ||
</Button> | ||
</div> | ||
</Container> | ||
</div> | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { FC } from 'react'; | ||
import { Button, Card, Col, Container, Row } from 'react-bootstrap'; | ||
|
||
import { ArticleMeta } from '../../pages/api/core'; | ||
|
||
interface SponsorsProps { | ||
sponsors: ArticleMeta[]; | ||
} | ||
|
||
export const Sponsors: FC<SponsorsProps> = ({ sponsors }) => ( | ||
<div className="py-5"> | ||
<Container> | ||
<h2 className="text-center mb-4 text-dark">赞助商与合作伙伴</h2> | ||
<div className="d-flex justify-content-center mb-4"> | ||
<div | ||
className="border-bottom border-warning" | ||
style={{ width: '60px', borderBottomWidth: '3px !important' }} | ||
/> | ||
</div> | ||
<Row className="g-4" xs={1} sm={2} md={3}> | ||
{sponsors.map(({ name, meta }) => ( | ||
<Col key={name}> | ||
<Card> | ||
<Card.Body> | ||
<Card.Title className="text-dark">{name}</Card.Title> | ||
<Card.Text className="text-dark"> | ||
{meta?.description || '暂无描述'} | ||
</Card.Text> | ||
</Card.Body> | ||
</Card> | ||
</Col> | ||
))} | ||
</Row> | ||
|
||
<div className="text-center mt-4"> | ||
<Button variant="outline-primary" size="lg" href="/article/Partner"> | ||
成为赞助商 → | ||
</Button> | ||
</div> | ||
</Container> | ||
</div> | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import Link from 'next/link'; | ||
import { FC } from 'react'; | ||
import { Button, Card, Col, Container, Row } from 'react-bootstrap'; | ||
|
||
import { ArticleMeta } from '../../pages/api/core'; | ||
|
||
interface UpcomingEventsProps { | ||
events: ArticleMeta[]; | ||
} | ||
|
||
export const UpcomingEvents: FC<UpcomingEventsProps> = ({ events }) => ( | ||
<div className="py-5 bg-white"> | ||
<Container> | ||
<h2 className="text-center mb-4 text-dark">近期活动</h2> | ||
<div className="d-flex justify-content-center mb-4"> | ||
<div | ||
className="border-bottom border-warning" | ||
style={{ width: '60px', borderBottomWidth: '3px !important' }} | ||
/> | ||
</div> | ||
<Row className="g-4" xs={1} sm={2} md={3}> | ||
{events.map(({ name, meta, path }) => ( | ||
<Col key={name}> | ||
<Card> | ||
<Card.Body> | ||
<Card.Title className="text-dark">{name}</Card.Title> | ||
<Card.Text className="text-dark"> | ||
时间: {meta?.start || 'void 0'} | ||
</Card.Text> | ||
<Card.Text className="text-dark"> | ||
地点: {meta?.address || 'void 0'} | ||
</Card.Text> | ||
|
||
<Link href={path || '#'} className="btn btn-primary"> | ||
查看详情 | ||
</Link> | ||
</Card.Body> | ||
</Card> | ||
</Col> | ||
))} | ||
</Row> | ||
|
||
<div className="text-center mt-4"> | ||
<Button variant="outline-primary" size="lg" href="/article/Activity"> | ||
查看全部活动 → | ||
</Button> | ||
</div> | ||
</Container> | ||
</div> | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.