Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hoisting Page Form #13

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/components/HpForm/HpDetailsPage.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.formContainer {
background-color: #fff;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
.formContainer {
padding: 1rem;
}
}

32 changes: 32 additions & 0 deletions src/components/HpForm/HpDetailsPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import { TextInput, Textarea, Container, Grid } from '@mantine/core';
import styles from './HpDetailsPage.module.css';

const HpDetailsPage: React.FC = () => {
return (
<Container className={styles.formContainer}>
<Grid>
<Grid.Col span={12} >
<TextInput label="Tournament Name" placeholder="Enter tournament Name" required />
</Grid.Col>
<Grid.Col span={6} >
<TextInput label="Start Date" placeholder="DD/MM/YYYY" required />
</Grid.Col>
<Grid.Col span={6} >
<TextInput label="End Date" placeholder="DD/MM/YYYY" required />
</Grid.Col>
<Grid.Col span={12} >
<TextInput label="Venue Name" placeholder="Enter the venue name" required />
</Grid.Col>
<Grid.Col span={12} >
<TextInput label="City" placeholder="Enter City" required />
</Grid.Col>
<Grid.Col span={12}>
<Textarea label="Tournament Details" placeholder="Provide details of the tournament" required />
</Grid.Col>
</Grid>
</Container>
);
};

export default HpDetailsPage;
31 changes: 31 additions & 0 deletions src/components/HpFormNavbar/HpFormNavbar.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
background-color: #e0f7fa;
}

.logo {
font-size: 1.5rem;
font-weight: bold;
}

.links {
display: flex;
gap: 1rem;
}

.burger {
display: none;
}

@media (max-width: 768px) {
.links {
display: none;
}
.burger {
display: block;
}
}

38 changes: 38 additions & 0 deletions src/components/HpFormNavbar/HpFormNavbar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React, { useState } from 'react';
import { Burger, Drawer, Group, Button } from '@mantine/core';
import styles from './HpFormNavbar.module.css';

const HpFormNavbar: React.FC = () => {
const [opened, setOpened] = useState(false);

return (
<>
<div className={styles.navbar}>
<div className={styles.logo}>Sports Event</div>
<div className={styles.links}>
<Button variant="subtle">Details</Button>
<Button variant="subtle">Links</Button>
<Button variant="subtle">Prizes</Button>
<Button variant="subtle">Schedule</Button>
<Button variant="subtle">Submit</Button>
</div>
<Burger opened={opened} onClick={() => setOpened((o) => !o)} className={styles.burger} />
</div>
<Drawer
opened={opened}
onClose={() => setOpened(false)}
title="Menu"
padding="md"
size="sm"
>
<Button variant="subtle" fullWidth>Details</Button>
<Button variant="subtle" fullWidth>Links</Button>
<Button variant="subtle" fullWidth>Prizes</Button>
<Button variant="subtle" fullWidth>Schedule</Button>
<Button variant="subtle" fullWidth>Submit</Button>
</Drawer>
</>
);
};

export default HpFormNavbar;
8 changes: 6 additions & 2 deletions src/pages/HostingPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { HpBanner } from '@/components/HpBanner/HpBanner';
import HpDetailsPage from '@/components/HpForm/HpDetailsPage';
import HpFormNavbar from '@/components/HpFormNavbar/HpFormNavbar';
import { HpNav } from '@/components/HpNav/HpNav';
import { StatsCard } from '@/components/HpStatsCard/StatsCard';
import React from 'react';
Expand All @@ -8,8 +10,10 @@ const HostingPage: React.FC = () => {
return (
<>
<HpNav/>
<HpBanner/>
<StatsCard/>
<HpFormNavbar/>
<HpDetailsPage/>
{/* <HpBanner/>
<StatsCard/> */}
</>
);
};
Expand Down
Loading