import logo from "./logo.webp"; import lightDark from "./light-dark.webp"; import { Outlet, Link, Outlet } from "react-router-dom"; import "./Header.css"; import Ender from "../Footer/Ender"; /** * @param {null} null - Takes in nothing * @returns {JSX.Element} JSX - HTML tags and JS functionality * @description The top header part of the page includes the naviagtion * @author Brock * @todo final css add baja but eon (baja leads chat) */ const Header = () => { /** * @param {null} null - Takes in nothing * @returns {CSSStyleRule} CSS - changes page to darkmode * @description inverts all of the colors of body without touching the pictures * @author Brock */ const switchDarkMode = () => { const body = document.getElementById("root"); const logoCss = document.getElementById("logo"); body.classList.toggle("darkmode"); logoCss.classList.toggle("logoAfterDark"); }; /** * @param {null} null - Takes in nothing * @returns {CSSStyleRule} CSS - makes it compliant with bowser preferances * @description checks for what the browser prefers * @author Brock */ document.addEventListener("DOMContentLoaded", () => { const prefersDarkMode = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches; if (prefersDarkMode) { switchDarkMode(); } }); return ( <>

Schulich Offroad

); }; export default Header;