Skip to content

Commit

Permalink
feat: Manage group view
Browse files Browse the repository at this point in the history
  • Loading branch information
KubloPL committed Oct 7, 2024
1 parent 4e209df commit 9eb8428
Show file tree
Hide file tree
Showing 11 changed files with 561 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ dist-ssr
*.ntvs*
*.njsproj
*.sln
*.sw?
*.sw?
7 changes: 7 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

html {
font-size: 62.5%;
font-family: 'Inter', sans-serif;
}
html{ accent-color: }
382 changes: 268 additions & 114 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/base": "^5.0.0-beta.40",
"@mui/material": "^5.4.0",
"@mui/icons-material": "^6.1.0",
"@mui/material": "^6.1.0",
"@mui/styled-engine": "^5.4.0",
"commitlint": "^19.5.0",
"react": "^18.3.1",
Expand Down
Binary file added public/group-avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
97 changes: 97 additions & 0 deletions public/univent-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 0 additions & 52 deletions public/univent_logo.svg

This file was deleted.

13 changes: 11 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
const App = () => {
return <h1>Univent Planner</h1>;
import React from 'react';
import { CssBaseline } from '@mui/material';
import ZarzdzajGrupami from './screens/ManageGroups/ManageGroups';

const App: React.FC = () => {
return (
<>
<CssBaseline />
<ZarzdzajGrupami />
</>
);
};

export default App;
97 changes: 97 additions & 0 deletions src/screens/ManageGroups/GroupManagementStyles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import { styled } from '@mui/material';
import { IconButton, Box } from '@mui/material';

export const styles = {
container: {
textAlign: 'center',
padding: '2rem',
},
header: {
display: 'flex',
justifyContent: 'space-between',
padding: '1rem 2rem',
borderBottom: '2px solid black',
},
icon: {
fontSize: '3rem',
},
univentLogo: {
width: '3rem',
height: '3rem',
},
headerIconsRight: {
display: 'flex',
gap: '1.5rem',
},
manageGroups: {
display: 'flex',
alignItems: 'center',
gap: '1.5rem',
margin: '1rem',
},
title: {
fontSize: '2 rem',
},
groupCard: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
backgroundColor: '#ffcccc',
padding: '1rem',
borderRadius: '1rem',
},
groupInfo: {
display: 'flex',
alignItems: 'center',
gap: '1rem',
},
groupAvatar: {
width: '6rem',
height: '6rem',
backgroundColor: '#ffcccc',
},
groupName: {
fontSize: '1rem',
},
groupMembers: {
color: '#777',
fontSize: '0.8rem',
},
manageButtons: {
display: 'flex',
flexDirection: 'column',
gap: '1.5rem',
margin: '2rem 0',
},
manageButton: {
padding: '1rem',
borderRadius: '1rem',
fontSize: '1.2rem',
backgroundColor: '#f13d42',
fontWeight: 'bold',
textTransform: 'none',
},
buttonColor: {
backgroundColor: '#f13d42',
},
};

export const BackButton = styled(IconButton)({
borderRadius: '50%',
border: '0.2rem solid #bbbbbb',
padding: '0.6rem',
backgroundColor: '#ffffff',
width: '2.5rem',
height: '2.5rem',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
color: '#000000',
});

export const BackButtonWrapper = styled(Box)({
display: 'flex',
alignItems: 'center',
gap: '1rem',
margin: '1rem',
});
73 changes: 73 additions & 0 deletions src/screens/ManageGroups/ManageGroups.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import React from 'react';
import { IconButton, Button, Box, Typography, Avatar } from '@mui/material';
import { Groups, Person, Edit } from '@mui/icons-material';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import { styles, BackButton, BackButtonWrapper } from './GroupManagementStyles';

const GroupManagement: React.FC = () => {
return (
<Box sx={styles.container}>
<Box sx={styles.header}>
<IconButton>
<img
src="./univent-icon.svg"
alt="Univent Logo"
style={styles.univentLogo}
/>
</IconButton>
<Box sx={styles.headerIconsRight}>
<IconButton>
<Groups sx={styles.icon} />
</IconButton>
<IconButton>
<Person sx={styles.icon} />
</IconButton>
</Box>
</Box>

<BackButtonWrapper>
<BackButton>
<ArrowBackIcon />
</BackButton>
</BackButtonWrapper>

<Box sx={styles.manageGroups}>
<Typography variant="h5" sx={styles.title}>
Zarządzaj grupami
</Typography>
</Box>

<Box sx={styles.groupCard}>
<Box sx={styles.groupInfo}>
<Avatar sx={styles.groupAvatar}>
<img
src="./group-avatar.png"
alt="Group Avatar"
style={styles.groupAvatar}
/>
</Avatar>
<Box>
<Typography sx={styles.groupName}>
Informatyka Stosowana 2023
</Typography>
<Typography sx={styles.groupMembers}>42 członków</Typography>
</Box>
</Box>
<IconButton>
<Edit />
</IconButton>
</Box>

<Box sx={styles.manageButtons}>
<Button variant="contained" sx={styles.manageButton}>
Zarządzaj ogłoszeniami
</Button>
<Button variant="contained" sx={styles.manageButton}>
Zarządzaj wydarzeniami
</Button>
</Box>
</Box>
);
};

export default GroupManagement;
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ export default defineConfig({
'@': '/src',
},
},
})


});

0 comments on commit 9eb8428

Please sign in to comment.