-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: maintenance mode * feat: schedule page in maintenance mode * fix: made maintenance image responsive * update: added petr maintenance image removed imports fix: removed coming soon image * fix: extract embedded text, vertical align center * fix: removed unused asset * Move Maintenance graphic/text to dedicated view - Extract graphic and text to new `Maintenance` component * Simplify maintenance image layout & use next/image * Configure maintenance mode from environment - Show Maintenance view instead of page content when environment variable is set for Schedule and Resources page * Reenable navigation bar --------- Co-authored-by: Sam Der <sder@uci.edu> Co-authored-by: Taesung Hwang <taesungh@uci.edu>
- Loading branch information
1 parent
34c79a3
commit d1e4446
Showing
8 changed files
with
56 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
import { Resources } from "@/views"; | ||
import { Maintenance } from "@/views"; | ||
|
||
export const revalidate = 60; | ||
|
||
export { Resources as default } from "@/views"; | ||
// When set to any value | ||
const Component = process.env.MAINTENANCE_MODE_RESOURCES | ||
? Maintenance | ||
: Resources; | ||
|
||
export default Component; |
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,3 +1,11 @@ | ||
import { Schedule } from "@/views"; | ||
import { Maintenance } from "@/views"; | ||
|
||
export const revalidate = 60; | ||
|
||
// When set to any value | ||
const Component = process.env.MAINTENANCE_MODE_SCHEDULE | ||
? Maintenance | ||
: Schedule; | ||
|
||
export { Schedule as default } from "@/views"; | ||
export default Component; |
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
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,11 @@ | ||
@use "bootstrap-utils" as bootstrap; | ||
|
||
.maintenanceContainer { | ||
text-align: center; | ||
|
||
.imageContainer { | ||
margin: auto; | ||
min-height: 60vh; | ||
position: relative; | ||
} | ||
} |
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,23 @@ | ||
import Image from "next/image"; | ||
import maintenancePetr from "@/assets/images/UnderMaintenenceLight.png"; | ||
|
||
import styles from "./Maintenance.module.scss"; | ||
|
||
function Maintenance() { | ||
return ( | ||
<section className={"container " + styles.maintenanceContainer}> | ||
<div className={styles.imageContainer}> | ||
<Image | ||
src={maintenancePetr.src} | ||
alt="Anteaters working at a construction site." | ||
fill | ||
style={{ objectFit: "contain" }} | ||
/> | ||
</div> | ||
<h1 className="fs-2">Page Under Maintenance</h1> | ||
<p>Check back soon!</p> | ||
</section> | ||
); | ||
} | ||
|
||
export default Maintenance; |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { default as Home } from "./Home/Home"; | ||
export { default as Maintenance } from "./Maintenance/Maintenance"; | ||
export { default as Resources } from "./Resources/Resources"; | ||
export { default as Schedule } from "./Schedule/Schedule"; |