Warning Header (Closes #205) #394
|
@ -0,0 +1,7 @@
|
|||
.warning{
|
||||
background-color: var(--warning-background);
|
||||
padding: calc(5rem / 16);
|
||||
color: var(--primary-accent-light);
|
||||
font-size: calc(15rem / 16);
|
||||
text-align: center;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import { GetStaticProps } from "next";
|
||||
import { getCurrentWarning, Warning } from "pages/api/warnings";
|
||||
import React from "react";
|
||||
|
||||
import { getCurrentTerm } from "@/lib/events";
|
||||
|
||||
import styles from "./WarningHeader.module.css";
|
||||
|
||||
export function WarningHeader() {
|
||||
snedadah marked this conversation as resolved
|
||||
// We can't use getStaticProps since its a component, and we can't put it getStaticProps in its parents because nextjs doesnt support it in the _app.js
|
||||
return (
|
||||
<div className={styles.warning}>
|
||||
Warning: The computers will be down for a scheduled maintenance unitl Jan
|
||||
28, 2021.
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -22,6 +22,7 @@ body {
|
|||
--text: #000000;
|
||||
|
||||
--form-invalid: #9f616a;
|
||||
--warning-background: #dd0014;
|
||||
|
||||
snedadah marked this conversation as resolved
a3thakra
commented
Make sure to add these colors in our theme palette as well. That way it will show up in the themer and will be totally customizable! Themer: https://csclub.uwaterloo.ca/themer Adding a color to the palette should be as easy as adding a string to this array. If that doesn't work, let me know and we can figure something out. Make sure to add these colors in our theme palette as well. That way it will show up in the themer and will be totally customizable!
Themer: https://csclub.uwaterloo.ca/themer
Adding a color to the palette should be as easy as adding a string to [this array](https://git.csclub.uwaterloo.ca/www/www-new/src/branch/main/components/Theme.tsx#L18). If that doesn't work, let me know and we can figure something out.
|
||||
--input-background: #f0f0f0;
|
||||
--input-placeholder-text: #bbbbbb;
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
} from "@/components/ShapesBackground";
|
||||
import { Table } from "@/components/Table";
|
||||
import { ThemeProvider } from "@/components/Theme";
|
||||
import { WarningHeader } from "@/components/WarningHeader";
|
||||
|
||||
import styles from "./_app.module.css";
|
||||
|
||||
|
@ -44,6 +45,7 @@ export default function App({ Component, pageProps }: AppProps): JSX.Element {
|
|||
}}
|
||||
>
|
||||
<div className={styles.appContainer}>
|
||||
<WarningHeader />
|
||||
<Navbar />
|
||||
{/* Wrapping content with a div to allow for a display: block parent */}
|
||||
<div className={styles.contentContainer}>
|
||||
|
|
Loading…
Reference in New Issue
We should probably move these functions to utils in that case, and then make both events and this file import from there