Skip to content

Commit

Permalink
rebuild features and topBanner file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
1330Petrel committed Feb 18, 2025
1 parent 685e671 commit 5295ab8
Show file tree
Hide file tree
Showing 9 changed files with 196 additions and 203 deletions.
9 changes: 9 additions & 0 deletions i18n/en/code.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{
"homepage.title": {
"message": "Home"
},
"homepage.description": {
"message": "Association of Science and Technology of Automation, Tsinghua University"
},
"homepage.topBanner": {
"message": "Call for Papers, commence!"
},
"homepage.heroBanner.title": {
"message": "Association of Science & Technology of Automation"
},
"homepage.features.software.title": {
"message": "Software Department"
},
Expand Down
80 changes: 0 additions & 80 deletions src/components/HomepageFeatures/index.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions src/components/HomepageFeatures/styles.module.css

This file was deleted.

36 changes: 0 additions & 36 deletions src/components/TopBanner/TopBanner.module.css

This file was deleted.

27 changes: 0 additions & 27 deletions src/components/TopBanner/TopBanner.tsx

This file was deleted.

40 changes: 40 additions & 0 deletions src/data/features.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React, { type ReactNode } from 'react';
import Translate, { translate } from '@docusaurus/Translate';

export type FeatureItem = {
title: string;
Svg: string;
description: ReactNode;
};

const FeatureList: FeatureItem[] = [
{
title: translate({ "message": '软件部', "id": "homepage.features.software.title" }),
Svg: 'img/software.svg',
description: (
<Translate id="homepage.features.software.description">
软件部负责人工智能挑战赛,学生节游戏平台,电子设计大赛平台的搭建测试,网站维护等工作,我们注重代码质量和团队协作,欢迎你的加入!
</Translate>
),
},
{
title: translate({ "message": '硬件部', "id": "homepage.features.hardware.title" }),
Svg: 'img/hardware.svg',
description: (
<Translate id="homepage.features.hardware.description">
硬件部专注于硬件创新与开发,负责电子设计大赛,机器狗等比赛的开发,期待你的加入!
</Translate>
),
},
{
title: translate({ "message": '学创部', "id": "homepage.features.innovation.title" }),
Svg: 'img/innovation.svg',
description: (
<Translate id="homepage.features.innovation.description">
学创部负责对接学校的各类科研培养项目,如星火计划、挑战杯,与企业实验室对接,帮助同学们完成人生发展规划,欢迎你的加入!
</Translate>
),
},
];

export default FeatureList;
63 changes: 59 additions & 4 deletions src/pages/index.module.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,51 @@
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/
.section {
padding: 40px 0;
}

.topBanner {
font-size: 20px;
padding: 30px 20px;
max-width: 900px;
margin: 0 auto;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
}

.topBannerTitle {
font-size: 54px;
font-weight: bold;
margin-bottom: 0.4rem;
}

@media only screen and (max-width: 768px) {
.topBannerTitle {
font-size: 40px;
}
}

.topBannerTitleText {
background: linear-gradient(90deg,
rgb(131 58 180 / 100%) 0%,
rgb(253 29 29 / 100%) 50%,
rgb(252 176 69 / 100%) 100%);
background-clip: text;
-webkit-text-fill-color: transparent;
}

.topBannerTitleText:hover {
border-bottom: solid 2px;
border-color: rgb(152 0 255);
}

/* .heroBannerText {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 100%;
} */

.heroBanner {
display: flex;
Expand All @@ -14,6 +58,17 @@
color: var(--ifm-color-secondary-contrast-foreground);
}

.featureSvg {
height: 100px;
width: 100px;
fill: var(--text-color);
}

.featureHeading {
font-size: var(--ifm-h3-font-size);
padding-top: 1rem;
}

.buttons {
display: flex;
align-items: center;
Expand Down
Loading

0 comments on commit 5295ab8

Please sign in to comment.