Skip to content

Commit

Permalink
Merge pull request #3 from azide0x37/featureLandingPage
Browse files Browse the repository at this point in the history
Feature landing page
  • Loading branch information
azide0x37 authored Apr 16, 2022
2 parents d41b724 + 17b6cef commit 744c745
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 80 deletions.
79 changes: 54 additions & 25 deletions components/HeroTitle/HeroTitle.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
import React from 'react';
import { createStyles, Container, Text, Button, Group, useMantineTheme } from '@mantine/core';
import { createStyles, Container, Text, Button, Group, useMantineTheme, Overlay } from '@mantine/core';

const BREAKPOINT = '@media (max-width: 755px)';

const useStyles = createStyles((theme) => ({
hero: {
position: 'relative',
backgroundImage:
'url(https://assets-prd.ignimgs.com/2020/01/11/img-20200109-134204-1578701390405.jpg)',
backgroundSize: 'cover',
backgroundPosition: 'center',
},

container: {
height: 700,
display: 'flex',
flexDirection: 'column',
justifyContent: 'flex-end',
alignItems: 'flex-start',
paddingBottom: theme.spacing.xl * 6,
zIndex: 1,
position: 'relative',

[theme.fn.smallerThan('sm')]: {
height: 500,
paddingBottom: theme.spacing.xl * 3,
},
},
wrapper: {
position: 'relative',
boxSizing: 'border-box',
Expand All @@ -12,7 +35,7 @@ const useStyles = createStyles((theme) => ({

inner: {
position: 'relative',
paddingTop: 200,
paddingTop: 100,
paddingBottom: 120,

[BREAKPOINT]: {
Expand All @@ -22,26 +45,29 @@ const useStyles = createStyles((theme) => ({
},

title: {
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
fontSize: 62,
color: theme.white,
fontSize: 60,
fontWeight: 900,
lineHeight: 1.1,
margin: 0,
padding: 0,
color: theme.colorScheme === 'dark' ? theme.white : theme.black,

[BREAKPOINT]: {
fontSize: 42,
[theme.fn.smallerThan('sm')]: {
fontSize: 40,
lineHeight: 1.2,
},

[theme.fn.smallerThan('xs')]: {
fontSize: 28,
lineHeight: 1.3,
},
},

description: {
marginTop: theme.spacing.xl,
fontSize: 24,
color: theme.white,
maxWidth: 600,

[BREAKPOINT]: {
fontSize: 18,
[theme.fn.smallerThan('sm')]: {
maxWidth: '100%',
fontSize: theme.fontSizes.sm,
},
},

Expand Down Expand Up @@ -72,9 +98,8 @@ const useStyles = createStyles((theme) => ({
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : 'transparent',

'&:hover': {
backgroundColor: `${
theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0]
} !important`,
backgroundColor: `${theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0]
} !important`,
},
},
}));
Expand All @@ -84,22 +109,26 @@ export function HeroTitle() {
const theme = useMantineTheme();

return (
<div className={classes.wrapper}>
<Container size={700} className={classes.inner}>
<div className={classes.hero}>
<Overlay
gradient="linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, .65) 40%)"
opacity={1}
zIndex={0}
/>
<Container size={700} className={classes.container}>
<h1 className={classes.title}>
A{' '}
<Text component="span" variant="gradient" gradient={{ from: 'blue', to: 'cyan' }} inherit>
fully featured
batteries included
</Text>{' '}
React components and hooks library
game night scheduler
</h1>

<Text className={classes.description} color="dimmed">
Build fully functional accessible web applications with ease – Mantine includes more than
100 customizable components and hooks to cover you in any situation
Organize and schedule your gaming sessions on your schedule. Thursday includes every feature you need for game nights to go off without a hitch!
</Text>

<Group className={classes.controls}>
<Group className={classes.controls} position='center'>
<Button
size="xl"
className={classes.control}
Expand All @@ -113,9 +142,9 @@ export function HeroTitle() {
component="a"
href="https://github.com/mantinedev/mantine"
size="xl"
variant="outline"
variant="gradient"
className={cx(classes.control, classes.githubControl)}
color={theme.colorScheme === 'dark' ? 'gray' : 'dark'}
gradient={{ from: 'orange', to: 'yellow' }}
>
GitHub
</Button>
Expand Down
215 changes: 161 additions & 54 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,75 +1,182 @@
import React from 'react';
import React, { useState } from 'react';
import Link from 'next/link'

import {
createStyles,
AppShell,
Header,
useMantineTheme,
Container,
Title,
Button
MediaQuery,
Group,
Burger,
Button,
Text,
Footer,
ActionIcon,
Anchor
} from '@mantine/core';

import { BrandTwitter, BrandYoutube, BrandInstagram } from 'tabler-icons-react';

import { FooterLinks } from '../components/FooterLinks/FooterLinks'
import { HeroTitle } from '../components/HeroTitle/HeroTitle'

const BREAKPOINT = '@media (max-width: 755px)';

let footer_links = {
"data": [
{
"title": "About",
"links": [
{ "label": "Features", "link": "#" },
{ "label": "Pricing", "link": "#" },
{ "label": "Support", "link": "#" },
{ "label": "Forums", "link": "#" }
]
const useStyles = createStyles((theme) => ({
footer: {
borderTop: `1px solid ${theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2]
}`,
},
wrapper: {
position: 'relative',
boxSizing: 'border-box',
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[8] : theme.white,
},

inner: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
padding: `${theme.spacing.md}px ${theme.spacing.md}px`,

[theme.fn.smallerThan('sm')]: {
flexDirection: 'column',
},
{
"title": "Project",
"links": [
{ "label": "Contribute", "link": "#" },
{ "label": "Media assets", "link": "#" },
{ "label": "Changelog", "link": "#" },
{ "label": "Releases", "link": "#" }
]
},

title: {
fontFamily: `Greycliff CF, ${theme.fontFamily}`,
fontSize: 24,
fontWeight: 900,
lineHeight: 1.1,
margin: 0,
padding: 0,
color: theme.colorScheme === 'dark' ? theme.white : theme.black,

[BREAKPOINT]: {
fontSize: 16,
lineHeight: 1.2,
},
{
"title": "Community",
"links": [
{ "label": "Join Discord", "link": "#" },
{ "label": "Follow on Twitter", "link": "#" },
{ "label": "Email newsletter", "link": "#" },
{ "label": "GitHub discussions", "link": "#" }
]
}
]
}
},

description: {
marginTop: theme.spacing.xl,
fontSize: 24,

[BREAKPOINT]: {
fontSize: 18,
},
},

controls: {
marginTop: theme.spacing.xl * 2,

[BREAKPOINT]: {
marginTop: theme.spacing.xl,
},
},

control: {
height: 54,
paddingLeft: 38,
paddingRight: 38,

[BREAKPOINT]: {
height: 54,
paddingLeft: 18,
paddingRight: 18,
flex: 1,
},
},

links: {
[theme.fn.smallerThan('sm')]: {
marginTop: theme.spacing.lg,
marginBottom: theme.spacing.sm,
},
},
githubControl: {
borderWidth: 2,
borderColor: theme.colorScheme === 'dark' ? 'transparent' : theme.colors.dark[9],
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : 'transparent',

'&:hover': {
backgroundColor: `${theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[0]
} !important`,
},
},
}));

export default function AppShellDemo() {
const { classes } = useStyles();
const theme = useMantineTheme();
const [opened, setOpened] = useState(false);

return (
<AppShell
fixed
padding={"md"}
styles={{
main: {
background: theme.colorScheme === 'dark' ? theme.colors.dark[8] : theme.colors.gray[0],
},
}}
header={
<Header fixed height={60} >
<Link href="/app"><Button>Login Now</Button></Link>
</Header>
}
footer={
<FooterLinks {...footer_links} />
}
let links = [
{ "link": "#", "label": "Contact" },
{ "link": "#", "label": "Privacy" },
{ "link": "#", "label": "Blog" },
{ "link": "#", "label": "Careers" }
]


const items = links.map((link) => (
<Anchor<'a'>
color="dimmed"
key={link.label}
href={link.link}
sx={{ lineHeight: 1 }}
onClick={(event) => event.preventDefault()}
size="sm"
>
<Container size="xl" px="xs" py="xs">
</Container>
</AppShell >
{link.label}
</Anchor>
));
return (
<>
<Header height={60} p="md">
<Group position="apart">
<MediaQuery largerThan="sm" styles={{ display: 'none' }}>
<Burger
opened={opened}
onClick={() => setOpened((o) => !o)}
size="sm"
color={theme.colors.gray[6]}
mr="xl"
/>
</MediaQuery>
<h1 className={classes.title}>
<Text component="span" variant="gradient" gradient={{ from: 'blue', to: 'cyan' }} inherit>Thursday Gaming</Text>
</h1>
<Link href="/app">
<Button
radius="lg"
variant="gradient"
gradient={{ from: 'blue', to: 'cyan' }}
>
Login
</Button>
</Link>
</Group>
</Header>
<HeroTitle />
<div className={classes.inner}>
<h1 className={classes.title}>
<Text component="span" variant="gradient" gradient={{ from: 'blue', to: 'cyan' }} >Thursday Gaming</Text>
</h1>
<Group className={classes.links}>{items}</Group>
<Group spacing={0} position="right" noWrap>
<ActionIcon size="lg">
<BrandTwitter size={18} />
</ActionIcon>
<ActionIcon size="lg">
<BrandYoutube size={18} />
</ActionIcon>
<ActionIcon size="lg">
<BrandInstagram size={18} />
</ActionIcon>
</Group>
</div>
</>
);
}
Loading

0 comments on commit 744c745

Please sign in to comment.