[update] 피쳐 분리,테마 적용

This commit is contained in:
kim98828 2024-07-12 13:32:00 +09:00
parent bd566285c0
commit 8c9ed90bd1
2 changed files with 87 additions and 34 deletions

View File

@ -1,44 +1,97 @@
import React from 'react'; import React from 'react';
import { Box, Button, Typography, Container, Grid, Paper, useTheme } from '@mui/material'; import { Typography, Container, Grid, Paper, useTheme } from '@mui/material';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { motion } from 'framer-motion';
const MainPage: React.FC = () => { const MainPage: React.FC = () => {
const theme = useTheme(); const theme = useTheme();
return ( return (
<Container maxWidth="md" style={{ textAlign: 'center', marginTop: '5vh' }}> <Container
<Typography variant="h2" gutterBottom color="textPrimary"> maxWidth="md"
Welcome to Soulx's Homepage style={{
</Typography> textAlign: 'center',
<Typography variant="h5" paragraph color="textPrimary"> marginTop: '10vh',
This is the main entry point of the application. Explore the features below! backgroundColor: theme.palette.background.paper, // Changed to paper for better visibility
</Typography> padding: '2rem',
<Button borderRadius: '16px',
variant="contained" boxShadow: theme.shadows[3],
color="primary" display: 'flex',
component={Link} flexDirection: 'column',
to="/dashboard" alignItems: 'center'
style={{ margin: '20px' }} }}
>
<motion.div
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.5 }}
> >
Go to Dashboard <Typography variant="h2" gutterBottom color="textPrimary">
</Button> Welcome to Soulx's AI
</Typography>
<Typography variant="h5" paragraph color="textPrimary">
This is the main entry point of the application. Explore the features below!
</Typography>
</motion.div>
<Grid container spacing={4}> <Grid container spacing={4}>
<Grid item xs={12} sm={6}> <Grid item xs={12} sm={6}>
<Paper elevation={3} style={{ padding: '20px', backgroundColor: theme.palette.background.paper }}> <motion.div
<Typography variant="h5" color="textPrimary">Feature 1</Typography> whileHover={{ scale: 1.05 }}
<Typography variant="body1" color="textPrimary"> transition={{ duration: 0.3 }}
Description of Feature 1 goes here. This feature is designed to enhance your experience. >
</Typography> <Paper
</Paper> elevation={3}
style={{
padding: '20px',
backgroundColor: theme.palette.primary.main,
color: 'white',
borderRadius: '16px',
textAlign: 'center',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
height: '100%',
boxShadow: theme.shadows[4],
}}
component={Link}
to="/dashboard"
>
<Typography variant="h5">이미지 생성 AI</Typography>
<Typography variant="body1">
이 기능을 사용하여 이미지 생성을 시작하세요. 다양한 옵션을 설정할 수 있습니다.
</Typography>
</Paper>
</motion.div>
</Grid> </Grid>
<Grid item xs={12} sm={6}> <Grid item xs={12} sm={6}>
<Paper elevation={3} style={{ padding: '20px', backgroundColor: theme.palette.background.paper }}> <motion.div
<Typography variant="h5" color="textPrimary">Feature 2</Typography> whileHover={{ scale: 1.05 }}
<Typography variant="body1" color="textPrimary"> transition={{ duration: 0.3 }}
Description of Feature 2 goes here. This feature is user-friendly and efficient. >
</Typography> <Paper
</Paper> elevation={3}
style={{
padding: '20px',
backgroundColor: theme.palette.secondary.main,
color: 'white',
borderRadius: '16px',
textAlign: 'center',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
height: '100%',
boxShadow: theme.shadows[4],
}}
>
<Typography variant="h5">누끼 따기 AI</Typography>
<Typography variant="body1">
이미지를 업로드하면 배경을 자동으로 제거하여 인물이나 사물만 남길 수 있습니다.
</Typography>
</Paper>
</motion.div>
</Grid> </Grid>
</Grid> </Grid>
</Container> </Container>

View File

@ -7,13 +7,13 @@ const lightThemeOptions: ThemeOptions = {
mode: 'light', mode: 'light',
background: { background: {
default: '#ffffff', default: '#ffffff',
paper: '#f5f5f5', paper: '#ffffff',
}, },
primary: { primary: {
main: '#1976d2', main: '#9453FF',
}, },
secondary: { secondary: {
main: '#dc004e', main: '#9453FF',
}, },
text: { text: {
primary: '#000000', primary: '#000000',
@ -78,10 +78,10 @@ const darkThemeOptions: ThemeOptions = {
paper: '#1e1e1e', paper: '#1e1e1e',
}, },
primary: { primary: {
main: '#BB86FC', main: '#007FE4',
}, },
secondary: { secondary: {
main: '#03DAC6', main: '#007FE4',
}, },
text: { text: {
primary: '#ffffff', primary: '#ffffff',