generated from chingu-voyages/voyage-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from chingu-voyages/css/views
CSS: Views (Except Dashboard)
- Loading branch information
Showing
19 changed files
with
264 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
import { getServerSession } from "next-auth"; | ||
import { authOptions } from "@/auth"; | ||
import Form from "@/components/form/Form"; | ||
import { Box, Stack, Typography } from "@mui/material"; | ||
|
||
export default async function FormView() { | ||
const session = await getServerSession(authOptions); | ||
if (!session) { | ||
return <p>You must be signed in to make an appointment</p>; | ||
} | ||
return ( | ||
<div> | ||
<h1>Form View</h1> | ||
<Form email={session.user.email} /> | ||
</div> | ||
<Box | ||
sx={{ | ||
width: { xs: 1, sm: 4 / 5, md: 3 / 4, lg: 3 / 5 }, | ||
marginY: { xs: 2, lg: 4 }, | ||
marginX: "auto", | ||
}} | ||
> | ||
<Stack direction="column"> | ||
<Stack gap={2}> | ||
<Typography | ||
component="h1" | ||
variant="h1" | ||
sx={{ fontSize: { xs: "2rem", sm: "2.5rem", md: "3rem" } }} | ||
> | ||
Request Service | ||
</Typography> | ||
</Stack> | ||
<Form email={session.user.email} /> | ||
</Stack> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,25 @@ | ||
"use client" | ||
|
||
import { Stack, Typography } from "@mui/material/"; | ||
import AutoFixHighRoundedIcon from "@mui/icons-material/AutoFixHighRounded"; | ||
import ConstructionRoundedIcon from "@mui/icons-material/ConstructionRounded"; | ||
import ThumbUpAltRoundedIcon from "@mui/icons-material/ThumbUpAltRounded"; | ||
|
||
//left side page content | ||
const items = [ | ||
{ | ||
icon: <ConstructionRoundedIcon sx={{ color: "#1565c0" }} />, | ||
title: "Premium Quality Craftsmanship", | ||
description: "Experience unmatched durability and a long lasting product.", | ||
}, | ||
{ | ||
icon: <ThumbUpAltRoundedIcon sx={{ color: "#1565c0" }} />, | ||
title: "Save Energy and Money", | ||
description: | ||
"Lower your carbon footprint and electric bill by harnessing the power of the sun!", | ||
}, | ||
{ | ||
icon: <AutoFixHighRoundedIcon sx={{ color: "#1565c0" }} />, | ||
title: "Have Independence", | ||
description: "Keep the lights on even when the grid goes dark.", | ||
}, | ||
]; | ||
import { Button, Stack, Typography } from "@mui/material"; | ||
import SiteInfo from "@/components/landing/SiteInfo"; | ||
import NewAppointment from "@/components/appointment/NewAppointment"; | ||
|
||
export default function LandingView() { | ||
return ( | ||
<div> | ||
<Stack | ||
direction="column" | ||
component="main" | ||
sx={[ | ||
{ | ||
height: "calc((1 - var(--template-frame-height, 0)) * 100%)", | ||
marginTop: "max(40px - var(--template-frame-height, 0px), 0px)", | ||
minHeight: "100%", | ||
}, | ||
]} | ||
> | ||
<Stack | ||
direction={{ xs: "column-reverse", md: "row" }} | ||
sx={{ | ||
justifyContent: "center", | ||
gap: { xs: 6, sm: 12 }, | ||
p: { xs: 2, sm: 5 }, | ||
}} | ||
> | ||
<Stack | ||
sx={{ | ||
flexDirection: "column", | ||
alignSelf: "center", | ||
gap: 4, | ||
}} | ||
> | ||
<Typography variant="h1"> | ||
<Typography variant="h1" component="span" color={theme => theme.palette.branding} >Ray</Typography>Volution | ||
</Typography> | ||
{items.map((item, index) => ( | ||
<Stack key={index} direction="row" sx={{ gap: 1 }}> | ||
{item.icon} | ||
<div> | ||
<Typography gutterBottom sx={{ fontWeight: "medium" }}> | ||
{item.title} | ||
</Typography> | ||
<Typography variant="body2" sx={{ color: "text.secondary" }}> | ||
{item.description} | ||
</Typography> | ||
</div> | ||
</Stack> | ||
))} | ||
</Stack> | ||
</Stack> | ||
<Stack | ||
gap={4} | ||
sx={{ | ||
width: { xs: 19 / 20, md: 3 / 4 }, | ||
marginY: { xs: 4, lg: 8 }, | ||
marginX: { xs: "auto", lg: 4, xl: 0 }, | ||
}} | ||
> | ||
<SiteInfo /> | ||
<Stack> | ||
<Typography> | ||
<span className="text-branding">Ready to make an appointment?</span>{" "} | ||
Please click the button below. | ||
</Typography> | ||
<NewAppointment /> | ||
</Stack> | ||
</div> | ||
</Stack> | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
import SignInCard from "@/components/signInCard"; | ||
import { Stack } from "@mui/material"; | ||
import SiteInfo from "@/components/landing/SiteInfo"; | ||
import Auth from "@/components/landing/Auth"; | ||
|
||
export default function signIn() { | ||
return ( | ||
<SignInCard /> | ||
); | ||
} | ||
return ( | ||
<Stack | ||
gap={4} | ||
sx={{ | ||
width: { xs: 19 / 20, md: 3 / 4 }, | ||
marginY: { xs: 4, lg: 8 }, | ||
marginX: { xs: "auto", lg: 4, xl: 0 }, | ||
}} | ||
> | ||
<SiteInfo /> | ||
<Auth /> | ||
</Stack> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Box, CircularProgress } from "@mui/material"; | ||
|
||
export default function Spinner() { | ||
return ( | ||
<Box sx={{ marginTop: 12, marginX: "auto" }}> | ||
<CircularProgress sx={{ color: "var(--branding)" }} /> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Stack, Typography } from "@mui/material"; | ||
import SignIn from "./SignIn"; | ||
|
||
export default function () { | ||
return ( | ||
<Stack gap={4} sx={{ marginY: 4 }}> | ||
<Typography> | ||
<span className="text-branding">Ready to learn more?</span> Please sign | ||
in with your Google account to get started. | ||
</Typography> | ||
<SignIn /> | ||
</Stack> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"use client"; | ||
|
||
import { Button } from "@mui/material/"; | ||
import GoogleIcon from "@mui/icons-material/Google"; | ||
import { signIn } from "next-auth/react"; | ||
|
||
export default function SignIn() { | ||
const handleSubmit = () => { | ||
signIn("google"); | ||
}; | ||
|
||
return ( | ||
<Button | ||
size="large" | ||
variant="outlined" | ||
startIcon={<GoogleIcon sx={{ color: "var(--branding)" }} />} | ||
sx={{ | ||
color: "var(--accent)", | ||
borderColor: "var(--accent)", | ||
borderRadius: 2, | ||
width: { xs: 1, lg: 300 }, | ||
}} | ||
onClick={handleSubmit} | ||
> | ||
Sign in with Google | ||
</Button> | ||
); | ||
} |
Oops, something went wrong.