Compare commits
11 Commits
f58baba8c0
...
e18ed8f85a
|
@ -23,3 +23,4 @@ dist-ssr
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
yarn.lock
|
yarn.lock
|
||||||
|
package-lock.json
|
||||||
|
|
|
@ -3,14 +3,6 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="https://cdn.nofated.win/mc" />
|
<link rel="icon" type="image/svg+xml" href="https://cdn.nofated.win/mc" />
|
||||||
<!--link
|
|
||||||
rel="stylesheet"
|
|
||||||
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
|
|
||||||
/ -->
|
|
||||||
<link
|
|
||||||
rel="stylesheet"
|
|
||||||
href="https://fonts.sourcegcdn.com/css?family=Overpass+Mono&display=swap"
|
|
||||||
/>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Home · Nofated</title>
|
<title>Home · Nofated</title>
|
||||||
|
|
123
src/App.tsx
123
src/App.tsx
|
@ -4,43 +4,132 @@ import Typography from '@mui/material/Typography';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import Link from '@mui/material/Link';
|
import Link from '@mui/material/Link';
|
||||||
import Grid from '@mui/material/Unstable_Grid2';
|
import Grid from '@mui/material/Unstable_Grid2';
|
||||||
import Avatar from '@mui/material/Avatar';
|
import Tabs from '@mui/material/Tabs';
|
||||||
import Tabs from './Tabs';
|
import Tab from '@mui/material/Tab';
|
||||||
|
|
||||||
function Copyright() {
|
function Copyright() {
|
||||||
return (
|
return (
|
||||||
<Typography variant="body2" color="text.secondary" align="center">
|
<>
|
||||||
{'Copyright © '}
|
<Typography variant="body2" color="text.secondary" align="center">
|
||||||
<Link color="inherit" href="https://nof.moe">
|
{'Copyright © '}
|
||||||
Nofated
|
<Link color="inherit" href="#">
|
||||||
</Link>{' '}
|
Nofated095
|
||||||
{new Date().getFullYear()}.
|
</Link>{' '}
|
||||||
</Typography>
|
{new Date().getFullYear()}.
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="body2" color="text.secondary" align="center">
|
||||||
|
<Link color="inherit" href="https://icp.gov.moe/?keyword=20230721">
|
||||||
|
萌 ICP 备 20230721 号
|
||||||
|
</Link>
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface TabPanelProps {
|
||||||
|
children?: React.ReactNode;
|
||||||
|
index: number;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
function TabPanel(props: TabPanelProps) {
|
||||||
|
const { children, value, index, ...other } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
role="tabpanel"
|
||||||
|
hidden={value !== index}
|
||||||
|
id={`simple-tabpanel-${index}`}
|
||||||
|
aria-labelledby={`simple-tab-${index}`}
|
||||||
|
{...other}
|
||||||
|
>
|
||||||
|
{value === index && (
|
||||||
|
<Box sx={{ p: 3 }}>
|
||||||
|
<Typography>{children}</Typography>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function a11yProps(index: number) {
|
||||||
|
return {
|
||||||
|
id: `simple-tab-${index}`,
|
||||||
|
'aria-controls': `simple-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
|
|
||||||
|
const [value, setValue] = React.useState(0);
|
||||||
|
|
||||||
|
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
|
||||||
|
setValue(newValue);
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<Container maxWidth="sm">
|
<Container maxWidth="sm">
|
||||||
<Box sx={{ my: 4 }}>
|
<Box sx={{
|
||||||
|
my: 4,
|
||||||
|
pt: 8,
|
||||||
|
pb: 6,
|
||||||
|
}}>
|
||||||
<Grid container spacing={2}>
|
<Grid container spacing={2}>
|
||||||
<Grid xs={4}>
|
<Grid xs={"auto"}>
|
||||||
{/* <img
|
<img
|
||||||
src={`https://cdn.nofated.win/avatarsoss`}
|
src={`https://cdn.nofated.win/avatarsoss`}
|
||||||
srcSet={`https://cdn.nofated.win/avatarsoss`}
|
srcSet={`https://cdn.nofated.win/avatar/256`}
|
||||||
alt={'Avatar'}
|
alt={'Avatar'}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
width={128}
|
width={128}
|
||||||
/> */}
|
/>
|
||||||
<Avatar alt="Nofated" src="https://cdn.nofated.win/avatarsoss" sx={{ width: 128, height: 128 }} />
|
{/* <Avatar alt="Nofated" src="https://cdn.nofated.win/avatarsoss" sx={{ width: 128, height: 128 }} /> */}
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid xs={8}>
|
<Grid xs={8}>
|
||||||
<Typography variant="h4" component="h1" gutterBottom>
|
<Typography variant="h4" component="h1" gutterBottom sx={{ fontFamily: 'neonderthaw' }}>
|
||||||
Nofated
|
Nofated
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
||||||
|
<Tabs value={value} onChange={handleChange} aria-label="basic tabs example">
|
||||||
|
<Tab label="Home" {...a11yProps(0)} />
|
||||||
|
<Tab label="About" {...a11yProps(1)} />
|
||||||
|
<Tab label="Blog" href="https://blog.nofated.win" />
|
||||||
|
</Tabs>
|
||||||
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Box sx={{ width: '100%' }}>
|
||||||
|
<TabPanel value={value} index={0}>
|
||||||
|
<Box sx={{ my: 1 }}>
|
||||||
|
<Typography variant="h5" component="h2" gutterBottom>
|
||||||
|
Yoo!
|
||||||
|
</Typography>
|
||||||
|
I'm Nofated. I am a newbie in the coding world.<br />
|
||||||
|
Find me on GitHub, Twitter and Telegram.
|
||||||
|
</Box>
|
||||||
|
<Box sx={{ my: 1 }}>
|
||||||
|
<Typography variant="h5" component="h2" gutterBottom>
|
||||||
|
Misc
|
||||||
|
</Typography>
|
||||||
|
🏫 I am a student who lives in Beijing, China.<br />
|
||||||
|
📒️ I have a blog based on the Hexo.<br />
|
||||||
|
⌨️ Coding and open-source are great! Though I haven't learnt any languages...<br />
|
||||||
|
🏢 I am a member of LittleSkin Community Support. I help maintain the bot and manual.<br />
|
||||||
|
🚔 I am a fan of Yuzu Soft, Minecraft, Grand Theft Auto, and anime.<br />
|
||||||
|
</Box>
|
||||||
|
</TabPanel>
|
||||||
|
<TabPanel value={value} index={1}>
|
||||||
|
<Box sx={{ my: 1 }}>
|
||||||
|
<Typography variant="h5" component="h2" gutterBottom>
|
||||||
|
About
|
||||||
|
</Typography>
|
||||||
|
I am in senior high and I'm preparing for the Chinese College Entrance Examination, aka GaoKao.<br />
|
||||||
|
|
||||||
|
I do open-source works, you can check them on GitHub. But I didn't have a completely independent open-source project.😢<br />
|
||||||
|
|
||||||
|
I am happy to chat. Chinese is OK but I am very poor at English listening and speaking.😰<br />
|
||||||
|
</Box>
|
||||||
|
</TabPanel>
|
||||||
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Tabs />
|
|
||||||
<Copyright />
|
<Copyright />
|
||||||
</Box>
|
</Box>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
import * as React from 'react';
|
|
||||||
import Link from '@mui/material/Link';
|
|
||||||
import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon';
|
|
||||||
import Typography from '@mui/material/Typography';
|
|
||||||
|
|
||||||
function LightBulbIcon(props: SvgIconProps) {
|
|
||||||
return (
|
|
||||||
<SvgIcon {...props}>
|
|
||||||
<path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z" />
|
|
||||||
</SvgIcon>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function ProTip() {
|
|
||||||
return (
|
|
||||||
<Typography sx={{ mt: 6, mb: 3 }} color="text.secondary">
|
|
||||||
<LightBulbIcon sx={{ mr: 1, verticalAlign: 'middle' }} />
|
|
||||||
Pro tip: See more <Link href="https://mui.com/getting-started/templates/">templates</Link> in
|
|
||||||
the MUI documentation.
|
|
||||||
</Typography>
|
|
||||||
);
|
|
||||||
}
|
|
93
src/Tabs.tsx
93
src/Tabs.tsx
|
@ -1,93 +0,0 @@
|
||||||
import * as React from 'react';
|
|
||||||
import Tabs from '@mui/material/Tabs';
|
|
||||||
import Tab from '@mui/material/Tab';
|
|
||||||
import Typography from '@mui/material/Typography';
|
|
||||||
import Box from '@mui/material/Box';
|
|
||||||
import GitHubIcon from '@mui/icons-material/GitHub';
|
|
||||||
|
|
||||||
interface TabPanelProps {
|
|
||||||
children?: React.ReactNode;
|
|
||||||
index: number;
|
|
||||||
value: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
function TabPanel(props: TabPanelProps) {
|
|
||||||
const { children, value, index, ...other } = props;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
role="tabpanel"
|
|
||||||
hidden={value !== index}
|
|
||||||
id={`simple-tabpanel-${index}`}
|
|
||||||
aria-labelledby={`simple-tab-${index}`}
|
|
||||||
{...other}
|
|
||||||
>
|
|
||||||
{value === index && (
|
|
||||||
<Box sx={{ p: 3 }}>
|
|
||||||
<Typography>{children}</Typography>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function a11yProps(index: number) {
|
|
||||||
return {
|
|
||||||
id: `simple-tab-${index}`,
|
|
||||||
'aria-controls': `simple-tabpanel-${index}`,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function BasicTabs() {
|
|
||||||
const [value, setValue] = React.useState(0);
|
|
||||||
|
|
||||||
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
|
|
||||||
setValue(newValue);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Box sx={{ width: '100%' }}>
|
|
||||||
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
|
|
||||||
<Tabs value={value} onChange={handleChange} aria-label="basic tabs example">
|
|
||||||
<Tab label="Home" {...a11yProps(0)} />
|
|
||||||
<Tab label="About" {...a11yProps(1)} />
|
|
||||||
<Tab label="Blog" href="https://blog.nofated.win" />
|
|
||||||
</Tabs>
|
|
||||||
</Box>
|
|
||||||
<TabPanel value={value} index={0}>
|
|
||||||
<Box sx={{ my: 1 }}>
|
|
||||||
<Typography variant="h5" component="h2" gutterBottom>
|
|
||||||
Yoo!
|
|
||||||
</Typography>
|
|
||||||
I'm Nofated. I am a newbie in the coding world.<br />
|
|
||||||
Find me on <GitHubIcon>GitHub</GitHubIcon>;GitHub, Twitter and Telegram.
|
|
||||||
</Box>
|
|
||||||
<Box sx={{ my: 1 }}>
|
|
||||||
<Typography variant="h5" component="h2" gutterBottom>
|
|
||||||
Misc
|
|
||||||
</Typography>
|
|
||||||
🏫 I am a student who lives in Beijing, China.<br />
|
|
||||||
📒️ I have a blog based on the Hexo.<br />
|
|
||||||
⌨️ Coding and open-source are great! Though I haven't learnt any languages...<br />
|
|
||||||
🏢 I am a member of LittleSkin Community Support . I help maintain the bot and manual.<br />
|
|
||||||
🚔 I am a fan of Minecraft, Grand Theft Auto, and anime.<br />
|
|
||||||
</Box>
|
|
||||||
</TabPanel>
|
|
||||||
<TabPanel value={value} index={1}>
|
|
||||||
<Box sx={{ my: 1 }}>
|
|
||||||
<Typography variant="h5" component="h2" gutterBottom>
|
|
||||||
About
|
|
||||||
</Typography>
|
|
||||||
I am in senior high and I'm preparing for the Chinese College Entrance Examination, aka GaoKao.<br />
|
|
||||||
|
|
||||||
I do open-source works, you can check them on GitHub. But I didn't have a completely independent open-source project.😢<br />
|
|
||||||
|
|
||||||
I am happy to chat. Chinese is OK but I am very poor at English listening and speaking.😰<br />
|
|
||||||
</Box>
|
|
||||||
</TabPanel>
|
|
||||||
<TabPanel value={value} index={2}>
|
|
||||||
Redirecting...
|
|
||||||
</TabPanel>
|
|
||||||
</Box>
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -16,7 +16,7 @@ const theme = createTheme({
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
fontFamily: [
|
fontFamily: [
|
||||||
'Overpass Mono',
|
'Fira Mono',
|
||||||
'-apple-system',
|
'-apple-system',
|
||||||
'BlinkMacSystemFont',
|
'BlinkMacSystemFont',
|
||||||
'"Segoe UI"',
|
'"Segoe UI"',
|
||||||
|
@ -29,6 +29,13 @@ const theme = createTheme({
|
||||||
'"Segoe UI Symbol"',
|
'"Segoe UI Symbol"',
|
||||||
].join(','),
|
].join(','),
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
MuiCssBaseline: {
|
||||||
|
styleOverrides: `
|
||||||
|
@font-face{font-family:fira mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/firamono/v14/N0bX2SlFPv1weGeLZDtgK_7SodY.woff2)format('woff2');unicode-range:U+460-52F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:fira mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/firamono/v14/N0bX2SlFPv1weGeLZDtgIv7SodY.woff2)format('woff2');unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:fira mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/firamono/v14/N0bX2SlFPv1weGeLZDtgKv7SodY.woff2)format('woff2');unicode-range:U+1F??}@font-face{font-family:fira mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/firamono/v14/N0bX2SlFPv1weGeLZDtgJf7SodY.woff2)format('woff2');unicode-range:U+370-3FF}@font-face{font-family:fira mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/firamono/v14/N0bX2SlFPv1weGeLZDtgKP7SodY.woff2)format('woff2');unicode-range:U+100-2AF,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:fira mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/firamono/v14/N0bX2SlFPv1weGeLZDtgJv7S.woff2)format('woff2');unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+300-301,U+303-304,U+308-309,U+323,U+329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:neonderthaw;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/neonderthaw/v3/Iure6Yx5-oWVZI0r-17AeaZBrLRw4Q.woff2)format('woff2');unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:neonderthaw;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/neonderthaw/v3/Iure6Yx5-oWVZI0r-17AeaZArLRw4Q.woff2)format('woff2');unicode-range:U+100-2AF,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1E??,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:neonderthaw;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.cn/s/neonderthaw/v3/Iure6Yx5-oWVZI0r-17AeaZOrLQ.woff2)format('woff2');unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+300-301,U+303-304,U+308-309,U+323,U+329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default theme;
|
export default theme;
|
||||||
|
|
Loading…
Reference in New Issue