Skip to content

Commit

Permalink
Merge pull request #14 from msqtt/main
Browse files Browse the repository at this point in the history
backup
  • Loading branch information
msqtt authored Mar 8, 2024
2 parents a00edb4 + 1b74d2e commit b46feff
Show file tree
Hide file tree
Showing 23 changed files with 810 additions and 562 deletions.
34 changes: 21 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
<!DOCTYPE html>
<html lang="zh-cn">

<head>
<head>
<meta charset="utf-8" />
<link rel="icon" href="https://hellokexie.obs.cn-north-4.myhuaweicloud.com/favicon.ico" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<link rel="icon" href="/favicon.ico" />
<meta
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
name="viewport"
/>
<meta name="theme-color" content="#000000" />
<meta name="description" content="桂林电子科技大学计算机与信息安全学院大学生科技协会网站" />
<meta name="keywords" content="桂林电子科技大学,桂电,计算机与信息安全学院,大学生,科技协会,科协,三院,计算机,计院,三院科协" />
<link rel="apple-touch-icon" href="https://hellokexie.obs.cn-north-4.myhuaweicloud.com/logo192.png" />
<meta
name="description"
content="桂林电子科技大学计算机与信息安全学院大学生科技协会网站"
/>
<meta
name="keywords"
content="桂林电子科技大学,桂电,计算机与信息安全学院,大学生,科技协会,科协,三院,计算机,计院,三院科协"
/>
<link rel="apple-touch-icon" href="/logo192.png" />
<title>桂电三院科协</title>
</head>
</head>

<body>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="https://pv.sohu.com/cityjson?ie=utf-8"></script>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script src="https://hellokexie.obs.cn-north-4.myhuaweicloud.com/js/three.min.js"></script>
<script src="https://hellokexie.obs.cn-north-4.myhuaweicloud.com/js/vanta.halo.min.js"></script>
</body>
<script src="/js/three.min.js"></script>
<script src="/js/vanta.halo.min.js"></script>
</body>
</html>

</html>
1 change: 1 addition & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
2 changes: 2 additions & 0 deletions public/js/three.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/js/vanta.halo.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import Welcome from "./pages/Welcome";
import Footer from "./component/Footer";
import Article from "./pages/Article/Article";
import GameCollection from './pages/GameCollection';

import './App.css'
import BallRoom from './component/BallRoom';
Expand All @@ -21,6 +22,7 @@ function App() {
<BallRoom />
<Switch>
<Route path="/introduction/:target" component={Article} />
<Route path="/game" component={GameCollection} />
<Route path="/github-auth" component={GithubAuth} />
<Route path="/" component={Welcome} />
</Switch>
Expand Down
243 changes: 120 additions & 123 deletions src/component/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,136 +1,133 @@
import React from 'react';
import { Typography, Popover } from 'antd';
import style from './index.module.scss';
import { QRCode } from '../../static/cos'
import React from "react";
import { Typography, Popover } from "antd";
import style from "./index.module.scss";
import { QRCode } from "../../static/cos";

function Footer() {
return (
<footer className={style.container}>
<div className={style.blank} />
<div className={style.itemsContainer}>
{data.map((self: Table) => {
return List(self)
})}
</div>
</footer>
);
return (
<footer className={style.container}>
<div className={style.blank} />
<div className={style.itemsContainer}>
{data.map((self: Table) => {
return List(self);
})}
</div>
</footer>
);
}

function List(item: Table) {
return (
<div key={item.title}>
<Typography.Title
level={3}
className={style.title}>
{item.title}
</Typography.Title>
<ul className={style.items}>
{item.list.map((self: Item) => {
if (self.content) {
return (<Popover
content={<img src={QRCode.WeChatOfficialAccount} alt="" />}
trigger="hover"
style={{ padding: "0 !important" }}
key={self.name}>
<span>
<Item
name={self.name}
url={self.url}
/>
</span>
</Popover>);
} else {
return (<Item
key={self.name}
name={self.name}
url={self.url}
target="_blank"
/>);
}
})}
</ul>
</div>
);
return (
<div key={item.title}>
<Typography.Title level={3} className={style.title}>
{item.title}
</Typography.Title>
<ul className={style.items}>
{item.list.map((self: Item) => {
if (self.content) {
return (
<Popover
content={<img src={QRCode.WeChatOfficialAccount} alt="" />}
trigger="hover"
style={{ padding: "0 !important" }}
key={self.name}
>
<span>
<Item name={self.name} url={self.url} />
</span>
</Popover>
);
} else {
return (
<Item
key={self.name}
name={self.name}
url={self.url}
target="_blank"
/>
);
}
})}
</ul>
</div>
);
}

function Item({ name, url, target = "_self" }: Item) {
return (
<a
target={target}
key={name}
href={url}
>
<li className={style.item}>{name}</li>
</a>
);
return (
<a target={target} key={name} href={url}>
<li className={style.item}>{name}</li>
</a>
);
}

export default Footer;

const data: Array<Table> = [
{
title: '学习文档',
list: [
{
name: '工具箱的深度學習記事簿',
url: 'https://ml.akasaki.space'
},
{
name: 'CottonPaper',
url: 'https://cp.therainisme.com',
},
]
},
{
title: '与我相聚',
list: [
{
name: '招新QQ群',
url:'https://jq.qq.com/?_wv=1027&k=tDyBXUv0'
// url: 'https://jq.qq.com/?_wv=1027&k=n7WP5LTH'
}, {
name: '招新报名表',
url: 'https://docs.qq.com/form/page/DSWtLU0tMbGJ6UnRn'
}
]
},
{
title: '科协相关',
list: [
{
name: 'GitHub',
url: 'https://github.com/sanyuankexie',
},
{
name: 'OnlineJudge',
url: 'https://oj.kexie.space',
},
{
name: '微信公众号',
url: '#',
content: <img src={QRCode.WeChatOfficialAccount} alt="" />,
},
{
name: "科协官方bilibili账号",
url: "https://space.bilibili.com/673693349",
}
]
},
{
title: '友情链接',
list: [
{
name: '七院创新基地',
url: 'https://七院创新基地.cn/',
},
{
name: '校基地软件部',
url: 'https://csd.moe/',
},
{
name: '信安小组靶场',
url: 'http://121.40.203.219:8000/',
}
]
},
]
{
title: "学习文档",
list: [
{
name: "工具箱的深度學習記事簿",
url: "https://ml.akasaki.space",
},
{
name: "CottonPaper",
url: "https://cp.therainisme.com",
},
],
},
{
title: "与我相聚",
list: [
{
name: "招新QQ群",
url: "http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=TLksMcIoe1uqTh-tQTK1tU5Ff1OLYflL",
// url: 'https://jq.qq.com/?_wv=1027&k=n7WP5LTH'
},
{
name: "招新报名表",
url: "https://docs.qq.com/form/page/DSllqZXlzemlhb3pW",
},
],
},
{
title: "科协相关",
list: [
{
name: "GitHub",
url: "https://github.com/sanyuankexie",
},
{
name: "OnlineJudge",
url: "https://oj.kexie.space",
},
{
name: "微信公众号",
url: "#",
content: <img src={QRCode.WeChatOfficialAccount} alt="" />,
},
{
name: "科协官方bilibili账号",
url: "https://space.bilibili.com/673693349",
},
],
},
{
title: "友情链接",
list: [
{
name: "七院创新基地",
url: "https://七院创新基地.cn/",
},
{
name: "校基地软件部",
url: "https://csd.moe/",
},
{
name: "信安小组靶场",
url: "http://121.40.203.219:8000/",
},
],
},
];
62 changes: 40 additions & 22 deletions src/component/Section/index.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,48 @@
import React, { CSSProperties } from 'react';
import { Typography } from 'antd';
import section from './index.module.scss'
import React, { CSSProperties } from "react";
import { Typography } from "antd";
import section from "./index.module.scss";

const { Title } = Typography;

export interface IProps {
title: string;
description?: string;
url?:string;
children: JSX.Element | string;
bannerStyle?: CSSProperties;
bannerClassName?: string
title: string;
description?: string;
url_title?: string;
url?: string;
children: JSX.Element | string;
bannerStyle?: CSSProperties;
bannerClassName?: string;
}

function Section({ title, description,url, children, bannerStyle, bannerClassName }: IProps) {
return (
<section className={section.container}>
<div className={section.blank} />
<Title level={1}>{title}</Title>
<p className={section.description}>{description} <a className={section.url} href="http://game.kexie.space/">{url}</a></p>

<div className={`${section.banner} ${bannerClassName}`} style={bannerStyle}>
{children}
</div>
</section>
);
function Section({
title,
description,
url,
url_title,
children,
bannerStyle,
bannerClassName,
}: IProps) {
return (
<section className={section.container}>
<div className={section.blank} />
<Title level={1}>{title}</Title>
<p className={section.description}>
{description}{" "}
<a className={section.url} href={url}>
{url_title}
</a>
</p>

<div
className={`${section.banner} ${bannerClassName}`}
style={bannerStyle}
>
{children}
</div>
</section>
);
}

export default Section;
export default Section;

Loading

0 comments on commit b46feff

Please sign in to comment.