Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Darkmode lightmode rewrite #66

Merged
merged 12 commits into from
Sep 26, 2024
6 changes: 3 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ FROM node:lts-alpine
COPY . /app

workdir /app
run yarn install
run npm install


run yarn build
run npm run build
expose 3000
cmd ["yarn", "start"]
cmd ["npm", "run", "start"]
71 changes: 0 additions & 71 deletions frontend/components/elements/DarkModeSwitch.module.scss

This file was deleted.

19 changes: 0 additions & 19 deletions frontend/components/elements/DarkModeSwitch.tsx

This file was deleted.

25 changes: 5 additions & 20 deletions frontend/components/elements/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
import Image from "next/image";

import { Category } from "../../data/category";
import NavBar from "../views/NavBar";

import DarkModeSwitch from "./DarkModeSwitch";
import styles from "./Header.module.scss";

export interface HeaderProps {
categories: Category[];
show: boolean;
setShow: any;
darkMode: boolean;
setDarkMode: any;
}
const Header = ({
categories,
show,
setShow,
darkMode,
setDarkMode
}: HeaderProps) => (
const Header = ({ categories, show, setShow }: HeaderProps) => (
<nav className={`${styles.headerStyle}`}>
<NavBar
categories={categories}
show={show}
setShow={setShow}
darkMode={darkMode}
setDarkMode={setDarkMode}
/>
<NavBar categories={categories} show={show} setShow={setShow} />
<h1 className={`${styles.titleStyle}`}>findIT</h1>
<div className={styles.catList}>
{categories.map((category) => (
Expand All @@ -37,10 +24,8 @@ const Header = ({
</a>
))}
</div>
<div className={styles.darkModeSwitchInHeaderStyle}>
<DarkModeSwitch darkMode={darkMode} setDarkMode={setDarkMode} />
</div>
<img
alt="show navigation"
className={styles.showNav}
src="images/Hamburger_icon.png"
onClick={() => {
Expand Down
3 changes: 2 additions & 1 deletion frontend/components/views/NavBar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@
display: flex;
flex-direction: column;
height: $space-giant;
border: 1px solid black;
border-bottom: 1px solid black;
text-align: center;
align-items: center;
justify-content: center;

&:hover {
background-color: var(--highlight1);
color: var(--text);
Expand Down
12 changes: 1 addition & 11 deletions frontend/components/views/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
import { Category } from "../../data/category";
import DarkModeSwitch from "../elements/DarkModeSwitch";

import styles from "./NavBar.module.scss";

export interface NavBarProps {
categories: Category[];
show: boolean;
setShow: any;
darkMode: boolean;
setDarkMode: any;
}
function NavBar({
categories,
show,
setShow,
darkMode,
setDarkMode
}: NavBarProps) {
function NavBar({ categories, show, setShow }: NavBarProps) {
return (
<div
className={`${styles.navStyle} ${show ? styles.shown : styles.hidden}`}>
Expand All @@ -30,7 +21,6 @@ function NavBar({
</a>
</p>
))}
<DarkModeSwitch darkMode={darkMode} setDarkMode={setDarkMode} />
</div>
);
}
Expand Down
6 changes: 1 addition & 5 deletions frontend/components/views/ServiceCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
:hover{
cursor:pointer;
}

}

.aClass{
position:absolute;
color: var(--text);
Expand Down Expand Up @@ -36,10 +36,6 @@
font-size: $font-size-large;
color: var(--text);
}
/*.darkCard {
background-color: var(--background);
color: var(--text);
}*/
.cardClass {
background-color: var(--background);
color: var(--text);
Expand Down
Loading
Loading