-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
447 additions
and
101 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { useRoutes } from 'react-router-dom'; | ||
import layout from './components/layout'; | ||
import Layout from './components/Layout'; | ||
import router from './router'; | ||
|
||
function App() { | ||
const outlet = useRoutes(router); | ||
document.title = 'MoeHub'; | ||
|
||
return <div>{layout(outlet!)}</div>; | ||
return <Layout outlet={outlet!} />; | ||
} | ||
|
||
export default App; |
This file contains 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 { Flex, Layout as AntLayout } from 'antd'; | ||
import { Link } from 'react-router-dom'; | ||
import styles from './styles.module.css'; | ||
|
||
const { Header, Footer, Content } = AntLayout; | ||
|
||
const Layout: React.FC<{ outlet: React.ReactElement }> = ({ outlet }) => ( | ||
<> | ||
<div className={styles.background}></div> | ||
<Flex gap="middle" wrap> | ||
<AntLayout className={styles.layout}> | ||
<Header className={styles.header}> | ||
<h1> | ||
<Link className={styles.headerTitle} to="/"> | ||
Moe Hub | ||
</Link> | ||
</h1> | ||
</Header> | ||
<Content className={styles.content}>{outlet}</Content> | ||
<Footer className={styles.footer}> | ||
Made with ❤ By{' '} | ||
<a href="https://github.com/biyuehu" target="_blank"> | ||
Arimura Sena | ||
</a>{' '} | ||
In © 2024 | ||
</Footer> | ||
</AntLayout> | ||
</Flex> | ||
</> | ||
); | ||
|
||
export default Layout; |
This file contains 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 @@ | ||
.background { | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 110vh; | ||
position: fixed; | ||
z-index: -1; | ||
background-size: cover; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-image: url('https://himeno-sena.com/pic3.jpg'); | ||
} | ||
|
||
.header { | ||
color: #eee; | ||
background-color: #227d51; | ||
height: 64px; | ||
padding-inline: 48px; | ||
line-height: 64px; | ||
} | ||
|
||
.headerTitle { | ||
color: #eee; | ||
} | ||
|
||
.content { | ||
min-height: 120px; | ||
line-height: 120px; | ||
overflow: initial; | ||
} | ||
|
||
.footer { | ||
color: #eee; | ||
background-color: #333; | ||
} | ||
|
||
.layout { | ||
text-align: center; | ||
border-radius: 8px; | ||
min-height: 100vh; | ||
background-color: #ffffffc0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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,11 @@ | ||
import { Flex, Spin } from 'antd'; | ||
|
||
const Loading: React.FC = () => ( | ||
<Flex justify="center" align="center" style={{ width: '100%', height: '80vh' }}> | ||
<Spin tip="Loading" size="large"> | ||
<div></div> | ||
</Spin> | ||
</Flex> | ||
); | ||
|
||
export default Loading; |
This file contains 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,7 @@ | ||
import { Result } from 'antd'; | ||
|
||
const ErrorResult: React.FC = () => ( | ||
<Result status="error" title="获取数据失败" subTitle="请检查网络连接或接口地址是否配置正确" /> | ||
); | ||
|
||
export default ErrorResult; |
This file contains 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 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 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 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,22 @@ | ||
::selection { | ||
background-color: #227d51bb; | ||
} | ||
|
||
a { | ||
color: #227d51; | ||
} | ||
|
||
a:hover { | ||
background-color: #096148; | ||
} | ||
|
||
a::selection { | ||
color: #333; | ||
background-color: #096148; | ||
} | ||
|
||
.card { | ||
background: none; | ||
border: 1px solid #00000040; | ||
border-radius: 10px; | ||
} |
This file contains 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,5 @@ | ||
export const MAIN_COLOR = '#227D51'; | ||
|
||
export const MAIN_COLOR_DEEP = '#096148'; | ||
|
||
export const PRIMARY_COLOR = '#0077B6'; |
4 changes: 3 additions & 1 deletion
4
packages/client/src/views/About.tsx → packages/client/src/views/About/index.tsx
This file contains 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
export default () => ( | ||
const AboutView: React.FC = () => ( | ||
<div> | ||
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Iste quod culpa dolores esse quis beatae cupiditate | ||
commodi, id vitae tenetur, facilis dicta iusto atque, animi soluta consequatur! Officia, ab rerum! | ||
</div> | ||
); | ||
|
||
export default AboutView; |
Oops, something went wrong.