-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Welcome & Not Found page (#311)
* Adapt HighlightText to receive arrays on highlight and color props * Change double brackets on slug file so "/" route has own page * Create welcome page * Add layout to welcome page & make it responsive * Add another tip on ShowSectionsLayer * Create Not Found page * Adapt icon Menu on mobile for all pages * Change text tips on welcome page --------- Co-authored-by: Simon B. Støvring <[email protected]>
- Loading branch information
Showing
15 changed files
with
366 additions
and
20 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,21 @@ | ||
import SecondarySplitHeader from "@/features/sidebar/view/SecondarySplitHeader" | ||
import { Box } from "@mui/material" | ||
|
||
export default function Page({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<> | ||
<Box width={1} display={{ xs: "flex", sm: "flex", md: "none"}}> | ||
<SecondarySplitHeader showDivider={false} /> | ||
</Box> | ||
<Box | ||
display="flex" | ||
alignItems="center" | ||
justifyContent="center" | ||
padding={{ xs: 4 }} | ||
height={1} | ||
> | ||
{children} | ||
</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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import WelcomePage from "@/features/welcome" | ||
import { Box } from "@mui/material" | ||
|
||
const Page = () => { | ||
|
||
return ( | ||
<Box | ||
display="flex" | ||
alignItems="center" | ||
justifyContent="center" | ||
flexDirection="column" | ||
height={1} | ||
width={1} | ||
gap={10} | ||
> | ||
<WelcomePage /> | ||
</Box> | ||
) | ||
} | ||
|
||
export default Page | ||
|
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
File renamed without changes.
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 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,50 @@ | ||
import Link from 'next/link' | ||
import { BASE_COLORS } from "@/common/theme/theme" | ||
import { Box, Typography, Button } from "@mui/material" | ||
import HighlightText from "@/common/ui/HighlightText" | ||
|
||
export default function NotFound() { | ||
return ( | ||
<Box | ||
display="flex" | ||
alignItems="center" | ||
justifyContent="center" | ||
flexDirection="column" | ||
textAlign="center" | ||
height={1} | ||
width={1} | ||
gap={8} | ||
padding={{ xs: 4, md: 0}} | ||
> | ||
<HighlightText | ||
content="Oops! Page Not Found" | ||
highlight={["Page Not Found"]} | ||
color={[BASE_COLORS[2]]} | ||
variant="h3" | ||
opacity={7} | ||
sx={{ textAlign: "center" }} | ||
/> | ||
<Typography | ||
sx={{ | ||
display: { md: "flex" }, | ||
fontSize: 20, | ||
}} | ||
> | ||
We couldn't find the project or page you're looking for. | ||
It might have been moved or doesn't exist. | ||
</Typography> | ||
<Button | ||
id="create-repository" | ||
type="button" | ||
component={Link} | ||
href="/" | ||
variant="contained" | ||
color="primary" | ||
size="large" | ||
sx={{ height: 56, width: 300 }} | ||
> | ||
Return to Home | ||
</Button> | ||
</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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { grey } from "@mui/material/colors" | ||
import MessageLinkFooter from "@/common/ui/MessageLinkFooter" | ||
import ShowSectionsLayer from "@/features/welcome/view/ShowSectionsLayer" | ||
import WelcomeContent from "@/features/welcome/view/WelcomeContent" | ||
import { env } from "@/common" | ||
import { Box } from "@mui/material" | ||
|
||
const HELP_URL = env.get("NEXT_PUBLIC_SHAPE_DOCS_HELP_URL") | ||
|
||
const WelcomePage = () => { | ||
return ( | ||
<> | ||
<ShowSectionsLayer /> | ||
<WelcomeContent /> | ||
|
||
{HELP_URL && | ||
<Box | ||
position="absolute" | ||
sx={{ color: grey[500] }} | ||
bottom={30} | ||
marginLeft="auto" | ||
> | ||
<MessageLinkFooter | ||
url={`${HELP_URL}/Browsing-Documentation`} | ||
content="Lost? Read more about it in our wiki documentation" | ||
/> | ||
</Box> | ||
} | ||
</> | ||
) | ||
} | ||
|
||
export default WelcomePage |
Oops, something went wrong.