Compare commits
5 Commits
6c0e427d0e
...
45a02b84f2
| Author | SHA1 | Date | |
|---|---|---|---|
| 45a02b84f2 | |||
| 7face12353 | |||
| 59dc667c15 | |||
| 0347ead200 | |||
| 9dbb0d6b4d |
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -69,6 +69,5 @@ jobs:
|
|||||||
cd monitor-im-flur
|
cd monitor-im-flur
|
||||||
echo "Deploying Docker container..."
|
echo "Deploying Docker container..."
|
||||||
docker-compose pull
|
docker-compose pull
|
||||||
docker-compose stop || true
|
docker-compose down
|
||||||
docker-compose rm || true
|
docker-compose up -d
|
||||||
docker-compose up -d
|
|
||||||
|
|||||||
@@ -1,11 +1,26 @@
|
|||||||
|
import CardHeader from "@/components/CardHeader/CardHeader";
|
||||||
|
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
export default function Card({
|
export default function Card({
|
||||||
active,
|
icon,
|
||||||
|
name,
|
||||||
children,
|
children,
|
||||||
|
active = false,
|
||||||
|
header = true,
|
||||||
}: {
|
}: {
|
||||||
|
icon: string;
|
||||||
|
name: string;
|
||||||
active?: boolean;
|
active?: boolean;
|
||||||
|
header?: boolean;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return <div className={style.card}>{children}</div>;
|
return (
|
||||||
|
<div className={style.card}>
|
||||||
|
{header && (
|
||||||
|
<CardHeader icon={icon} content={name} isActive={active} />
|
||||||
|
)}
|
||||||
|
<div className={style.cardContent}>{children}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
.card {
|
.card {
|
||||||
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
background-color: #c0c0c0;
|
background-color: #c0c0c0;
|
||||||
@@ -10,5 +11,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cardContent {
|
.cardContent {
|
||||||
padding: 1px 100px 30px 100px;
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
9
src/components/CardContainers/CardContainers.tsx
Normal file
9
src/components/CardContainers/CardContainers.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import style from "./style.module.css";
|
||||||
|
|
||||||
|
export function CardRow({ children }) {
|
||||||
|
return <div className={style.cardRow}>{children}</div>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function CardColumn({ children }) {
|
||||||
|
return <div className={style.cardColumn}>{children}</div>;
|
||||||
|
}
|
||||||
17
src/components/CardContainers/style.module.css
Normal file
17
src/components/CardContainers/style.module.css
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
.cardColumn {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 30px;
|
||||||
|
margin: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardRow {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 30px;
|
||||||
|
}
|
||||||
@@ -1,12 +1,17 @@
|
|||||||
|
import classNames from "classnames/bind";
|
||||||
|
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
export default function CardHeader({ icon, content, active = false }) {
|
const styles = {
|
||||||
let containerClass = style.container;
|
container: style.container,
|
||||||
if (active) {
|
active: style.active,
|
||||||
containerClass += ` ${style.active}`;
|
};
|
||||||
}
|
|
||||||
|
const cx = classNames.bind(styles);
|
||||||
|
|
||||||
|
export default function CardHeader({ icon, content, isActive = false }) {
|
||||||
return (
|
return (
|
||||||
<div className={containerClass}>
|
<div className={cx("container", { active: isActive })}>
|
||||||
<div className={style.title}>
|
<div className={style.title}>
|
||||||
<div className={style.icon}>{icon}</div>
|
<div className={style.icon}>{icon}</div>
|
||||||
<div className={style.content}>{content}</div>
|
<div className={style.content}>{content}</div>
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
import Card from "@/components/Card/Card";
|
import Card from "@/components/Card/Card";
|
||||||
import CardHeader from "@/components/CardHeader/CardHeader";
|
import {
|
||||||
|
CardColumn,
|
||||||
|
CardRow,
|
||||||
|
} from "@/components/CardContainers/CardContainers";
|
||||||
import Datetime from "@/components/Datetime/Datetime";
|
import Datetime from "@/components/Datetime/Datetime";
|
||||||
import Flatastic from "@/components/Flatastic/Flatastic";
|
import Flatastic from "@/components/Flatastic/Flatastic";
|
||||||
import Footer from "@/components/Footer/Footer";
|
import Footer from "@/components/Footer/Footer";
|
||||||
import Terminal from "@/components/Terminal/Terminal";
|
import Terminal from "@/components/Terminal/Terminal";
|
||||||
import Timetable from "@/components/Timetable/Timetable";
|
import Timetable from "@/components/Timetable/Timetable";
|
||||||
import Weather from "../Weather/Weather";
|
import Weather from "@/components/Weather/Weather";
|
||||||
|
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
@@ -38,36 +42,31 @@ export default function Dashboard() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${style.dashboard} ${scheme}`}>
|
<div className={`${style.dashboard} ${scheme}`}>
|
||||||
<div className={style.cardWrapper}>
|
<CardColumn>
|
||||||
<Card>
|
<Card icon="🚊" name="Timetable">
|
||||||
<CardHeader icon="🚊" content="Timetable" />
|
|
||||||
<Timetable />
|
<Timetable />
|
||||||
</Card>
|
</Card>
|
||||||
<div className={style.clockAndWeather}>
|
|
||||||
<div className={style.small}>
|
<CardRow>
|
||||||
<Card>
|
<Card icon="🕐" name="Clock">
|
||||||
<CardHeader icon="🕐" content="Clock" />
|
<Datetime />
|
||||||
<Datetime />
|
</Card>
|
||||||
</Card>
|
|
||||||
</div>
|
<Card icon="🌤" name="Weather">
|
||||||
<Card>
|
|
||||||
<CardHeader icon="🌤️" content="Weather" />
|
|
||||||
<Weather />
|
<Weather />
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</CardRow>
|
||||||
<Card>
|
|
||||||
<CardHeader icon="🔔" content="Terminal" active={true} />
|
<Card icon="🔔" name="Terminal" active={true}>
|
||||||
<Terminal />
|
<Terminal />
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Card>
|
<Card icon="🧹" name="Flatastic">
|
||||||
<CardHeader icon="🧹" content="Flatastic" />
|
|
||||||
<Flatastic />
|
<Flatastic />
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</CardColumn>
|
||||||
<div className={style.footer}>
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,29 +19,3 @@
|
|||||||
.night {
|
.night {
|
||||||
background-color: #2a3f55;
|
background-color: #2a3f55;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clockAndWeather {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cardWrapper {
|
|
||||||
margin: 30px;
|
|
||||||
height: 100%;
|
|
||||||
gap: 30px;
|
|
||||||
flex-direction: column;
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.small {
|
|
||||||
width: 45%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.terminal {
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
background-color: #c0c0c0;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
import weedImage from "/img/weed.png"
|
import weedImage from "/img/weed.png";
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.container}>
|
<div className={style.container}>
|
||||||
<div className={style.taskbar}>
|
<div className={style.taskbar}>
|
||||||
@@ -29,6 +27,9 @@ export default function Footer() {
|
|||||||
<span className={style.window}>
|
<span className={style.window}>
|
||||||
<span className={style.windowIcon}>🧹</span>Flatastic
|
<span className={style.windowIcon}>🧹</span>Flatastic
|
||||||
</span>
|
</span>
|
||||||
|
<span className={style.window}>
|
||||||
|
<span className={style.windowIcon}>⛅</span>Weather
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
.container {
|
.container {
|
||||||
|
background-color: #c0c0c0;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.taskbar {
|
.taskbar {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
.container {
|
.container {
|
||||||
padding: 1px 100px 30px 100px;
|
padding: 1px 100px 30px 100px;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user