Skip to content

Commit 879eb09

Browse files
authored
Merge pull request #1355 from all-rit/1339-defect-remake-invalid-page-screen
Remake Invalid Page
2 parents 9a5a8b3 + 3bcbb82 commit 879eb09

5 files changed

Lines changed: 68 additions & 120 deletions

File tree

client/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ const App = () => {
180180
<Profile path="/Profile" user={state.main.user} />
181181
<LabsPage path={"/Labs"} user={state.main.user} actions={actions} />
182182
<EducatorResources path={"/EducatorResources"} user={state.main.user} />
183-
<Error actions={actions} default />
183+
<Error default />
184184

185185
<Imagine2023
186186
path={"/Imagine2023/*"}

client/src/assets/stylesheets/components/App.css

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -412,38 +412,6 @@ li {
412412
}
413413
}
414414

415-
.errorpage h1 {
416-
font-size: 50px;
417-
font-weight: 700;
418-
line-height: 50px;
419-
margin-bottom: 25px;
420-
font-family:
421-
Montserrat,
422-
-apple-system,
423-
BlinkMacSystemFont,
424-
"Segoe UI",
425-
Roboto,
426-
"Helvetica Neue",
427-
Arial,
428-
sans-serif,
429-
"Apple Color Emoji",
430-
"Segoe UI Emoji",
431-
"Segoe UI Symbol",
432-
"Noto Color Emoji";
433-
}
434-
435-
.errorpage p {
436-
font-style: italic;
437-
font-size: 25px;
438-
line-height: 50px;
439-
margin-bottom: 25px;
440-
padding: 75px;
441-
}
442-
443-
.errorpage div {
444-
padding: 40px;
445-
}
446-
447415
header.masthead {
448416
margin-top: -120px;
449417
text-align: center;

client/src/assets/stylesheets/components/App.scss

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -608,44 +608,6 @@ li {
608608
// }
609609
}
610610

611-
.errorpage {
612-
h1 {
613-
//font-style: Bold;
614-
font-size: 50px;
615-
font-weight: 700;
616-
line-height: 50px;
617-
margin-bottom: 25px;
618-
//padding-top: 40px;
619-
font-family:
620-
Poppins,
621-
-apple-system,
622-
BlinkMacSystemFont,
623-
"Segoe UI",
624-
Roboto,
625-
"Helvetica Neue",
626-
Arial,
627-
sans-serif,
628-
"Apple Color Emoji",
629-
"Segoe UI Emoji",
630-
"Segoe UI Symbol",
631-
"Noto Color Emoji";
632-
}
633-
634-
p {
635-
font-style: italic;
636-
font-size: 25px;
637-
line-height: 50px;
638-
margin-bottom: 25px;
639-
padding: 75px;
640-
// padding-top: 75px;
641-
// padding-bottom: 75px;
642-
}
643-
644-
div {
645-
padding: 40px;
646-
}
647-
}
648-
649611
header.masthead {
650612
margin-top: -120px;
651613
text-align: center;

client/src/assets/stylesheets/main.css

Lines changed: 0 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/pages/landingpage/error.js

Lines changed: 67 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,74 @@
1-
/* eslint-disable react/prop-types */
21
import React from "react";
3-
import Redirect from "../../helpers/Redirect";
2+
import useScroll from "src/use-hooks/useScroll";
3+
import { navigate } from "@reach/router";
4+
import ALLButton from "src/components/all-components/ALLButton";
5+
6+
const Error = () => {
7+
useScroll();
48

5-
const Error = (props) => {
6-
const { actions } = props;
79
return (
8-
<div className="errorpage tw-w-full">
9-
<div>
10-
<h1>Invalid Page</h1>
11-
<hr className="horiz" />
12-
<p>Please click the button to navigate home</p>
13-
<hr className="horiz" />
14-
<button
15-
className="btn btn-second btn-xl text-uppercase"
16-
onClick={() => Redirect(actions, 99, 0)}
17-
>
18-
Return Home
19-
</button>
10+
<section
11+
className={
12+
"tw-w-screen tw-flex tw-flex-col tw-items-end tw-bg-primary-blue tw-py-20"
13+
}
14+
>
15+
<div
16+
className={
17+
"tw-flex tw-flex tw-flex-col md:tw-flex-row tw-justify-between tw-w-[90%] tw-gap-[5rem]"
18+
}
19+
>
20+
{/* Left Side */}
21+
<div className={"tw-relative tw-flex"}>
22+
<div
23+
className={
24+
"tw-z-1 tw-min-w-full tw-bg-white tw-rounded-l-md tw-min-h-[12rem]"
25+
}
26+
>
27+
<div
28+
className={
29+
"tw-h-full tw-flex tw-flex-col tw-px-6 tw-justify-center tw-items-center"
30+
}
31+
>
32+
<h1 className={"tw-title tw-text-[6rem]"}>404</h1>
33+
</div>
34+
</div>
35+
<div
36+
className={
37+
"tw-absolute -tw-bottom-4 -tw-left-4 tw-right-0 tw-h-[12rem] tw-min-w-full tw-bg-primary-yellow tw-rounded-bl-lg"
38+
}
39+
/>
40+
</div>
41+
42+
{/* Right Side */}
43+
<div className={"tw-relative tw-flex tw-grow md:tw-ml-[10%]"}>
44+
<div className={"tw-z-1 tw-min-w-full tw-bg-white tw-rounded-l-md"}>
45+
<div
46+
className={
47+
"tw-flex tw-flex-col tw-gap-y-6 tw-py-12 tw-px-6 tw-text-left"
48+
}
49+
>
50+
<h2 className={"tw-title xs:tw-text-xl md:tw-text-[2rem]"}>
51+
Invalid Page
52+
</h2>
53+
<p className={"tw-body-text md:tw-w-1/2"}>
54+
The URL you entered either does not exist or is not accessible!
55+
Please click the button to navigate home.
56+
</p>
57+
<div
58+
className={"xs:tw-w-full md:tw-w-1/2 tw-flex tw-justify-end"}
59+
>
60+
<ALLButton label="Return Home" onClick={() => navigate("/")} />
61+
</div>
62+
</div>
63+
</div>
64+
<div
65+
className={
66+
"tw-absolute -tw-bottom-4 -tw-left-4 tw-right-0 tw-h-[12rem] tw-min-w-full tw-bg-primary-yellow tw-rounded-bl-lg"
67+
}
68+
/>
69+
</div>
2070
</div>
21-
</div>
71+
</section>
2272
);
2373
};
2474

0 commit comments

Comments
 (0)