8 Commits

Author SHA1 Message Date
83512887aa fix code style issues
All checks were successful
CI / build (push) Successful in 12s
CI / lint (push) Successful in 9s
CI / build-and-push-docker (push) Successful in 18s
2025-08-31 15:56:36 +02:00
4ef2bdb772 add small 420 widget
Some checks failed
CI / build (push) Successful in 13s
CI / lint (push) Failing after 9s
CI / build-and-push-docker (push) Successful in 18s
2025-08-31 15:55:32 +02:00
6559a06acc fix code style
All checks were successful
CI / build (push) Successful in 14s
CI / lint (push) Successful in 8s
CI / build-and-push-docker (push) Successful in 17s
2025-08-30 23:49:17 +02:00
449096b8c4 add token for biome
Some checks failed
CI / build (push) Successful in 13s
CI / lint (push) Failing after 9s
CI / build-and-push-docker (push) Successful in 17s
2025-08-30 23:47:11 +02:00
9abd91b2ed use biome giithub action
Some checks failed
CI / build (push) Successful in 12s
CI / lint (push) Failing after 6s
CI / build-and-push-docker (push) Successful in 16s
2025-08-30 23:39:03 +02:00
8c7fb8d9a5 use bunx to run biome
All checks were successful
CI / build (push) Successful in 13s
CI / lint (push) Successful in 9s
CI / build-and-push-docker (push) Successful in 17s
2025-08-30 23:37:04 +02:00
29548029a1 run bun install before lint
Some checks failed
CI / build (push) Successful in 15s
CI / lint (push) Successful in 13s
CI / build-and-push-docker (push) Has been cancelled
2025-08-30 23:36:03 +02:00
b0471a3a2f run multiple lint commands in one sub step
All checks were successful
CI / build (push) Successful in 12s
CI / lint (push) Successful in 7s
CI / build-and-push-docker (push) Successful in 17s
2025-08-30 23:34:53 +02:00
14 changed files with 31 additions and 185 deletions

View File

@@ -18,8 +18,6 @@ jobs:
run: bun install run: bun install
- name: Build - name: Build
run: bun run build run: bun run build
- name: Write Git-Hash into html
run: ./pipeline/create-git-hash-html.sh
- name: Create Build Artifact - name: Create Build Artifact
uses: christopherhx/gitea-upload-artifact@v4 uses: christopherhx/gitea-upload-artifact@v4
with: with:
@@ -41,8 +39,8 @@ jobs:
- name: Run Biome - name: Run Biome
run: biome ci . run: biome ci .
create-and-publish-docker-image: build-and-push-docker:
needs: [lint] needs: [build]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -60,6 +58,7 @@ jobs:
run: docker build -t git.rivercry.com/wg/monitor-im-flur . run: docker build -t git.rivercry.com/wg/monitor-im-flur .
- name: Push Docker image - name: Push Docker image
run: docker push git.rivercry.com/wg/monitor-im-flur run: docker push git.rivercry.com/wg/monitor-im-flur
- name: Deploy via SSH - name: Deploy via SSH
uses: appleboy/ssh-action@v0.1.10 uses: appleboy/ssh-action@v0.1.10
with: with:
@@ -69,8 +68,7 @@ jobs:
password: ${{ secrets.GARRISON_DOCKER_PASSWORD }} password: ${{ secrets.GARRISON_DOCKER_PASSWORD }}
script: | script: |
cd monitor-im-flur cd monitor-im-flur
hyprctl dispatch exec 'pkill firefox' echo "Deploying Docker container..."
hyprctl dispatch exec 'firefox -kiosk localhost:9123'
git clean -dfx git clean -dfx
git reset --hard HEAD git reset --hard HEAD
git pull git pull

View File

@@ -1,5 +1,11 @@
FROM oven/bun as builder
WORKDIR /app
COPY . .
RUN bun install
RUN bun run build
FROM nginx:alpine FROM nginx:alpine
COPY ./dist /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,12 +0,0 @@
#!/bin/sh
echo "Running pre-commit hooks..."
biome check --write
biome lint --write
if git diff --quiet; then
exit 0
else
git add -u
fi

View File

@@ -16,7 +16,7 @@ http {
index index.html; index index.html;
location / { location / {
try_files $uri $uri/ /index.html /git-hash.js; try_files $uri $uri/ /index.html;
} }
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {

1
pipeline/build-image.sh Executable file
View File

@@ -0,0 +1 @@
#!/bin/bash

View File

@@ -1,11 +0,0 @@
#!/bin/sh
echo "<!DOCTYPE html>
<html>
<head>
<title>Git Hash</title>
</head>
<body>
<pre>GITHUB_SHA = '$GITHUB_SHA';</pre>
</body>
</html>" > dist/git-hash.html

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 MiB

View File

@@ -1,3 +0,0 @@
#!/bin/sh
git config --local core.hooksPath githooks

View File

@@ -1,91 +0,0 @@
import { useEffect, useState } from "react";
import amogus from "/img/amogus.png";
import imposter from "/img/imposter.png";
import style from "./style.module.css";
type Amogus = {
isImposter: boolean;
posX: number;
posY: number;
speedX: number;
speedY: number;
};
const getImage = (sus: Amogus) => (sus.isImposter ? imposter : amogus);
const initialCrewmates: Amogus[] = [
{ key: "a", isImposter: true, posX: 10, posY: 20, speedX: 10, speedY: 30 },
{
key: "b",
isImposter: false,
posX: 400,
posY: 200,
speedX: 10,
speedY: -20,
},
{
key: "c",
isImposter: false,
posX: 900,
posY: 200,
speedX: -20,
speedY: 10,
},
];
const makeCrewmate = (crewmate: Amogus) => {
const image = getImage(crewmate);
return (
<div
key={crewmate.key}
className={style.container}
style={{ top: crewmate.posY, left: crewmate.posX }}
>
<img src={image} alt="Amogus" />
</div>
);
};
const stepCrewmates = (list: Amogus[]) => {
const { innerWidth: width, innerHeight: height } = window;
const newCrewmates = list.slice();
for (const c of newCrewmates) {
let newX = c.posX + c.speedX;
let newY = c.posY + c.speedY;
if (newX > width - 90) {
newX = width - 90;
c.speedX *= -1;
}
if (newX < 0) {
newX = 0;
c.speedX *= -1;
}
if (newY > height - 120) {
newY = height - 120;
c.speedY *= -1;
}
if (newY < 0) {
newY = 0;
c.speedY *= -1;
}
c.posX = newX;
c.posY = newY;
}
return newCrewmates;
};
export default function Amogus() {
const [crewmates, setCrewmates] = useState(initialCrewmates);
useEffect(() => {
const timer = setInterval(() => {
const c = crewmates;
setCrewmates(stepCrewmates(c));
}, 100);
return () => {
clearInterval(timer);
};
}, [crewmates]);
return <>{crewmates.map((c) => makeCrewmate(c))}</>;
}

View File

@@ -1,4 +0,0 @@
.container {
z-index: 100;
position: absolute;
}

View File

@@ -1,7 +1,5 @@
import FourTwenty from "@components/FourTwenty/FourTwenty";
import classNames from "classnames";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import Amogus from "@/components/Amogus/Amogus";
import Card from "@/components/Card/Card"; import Card from "@/components/Card/Card";
import { import {
CardColumn, CardColumn,
@@ -13,7 +11,7 @@ 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 "@/components/Weather/Weather"; import Weather from "@/components/Weather/Weather";
import FourTwenty from "../FourTwenty/FourTwenty";
import style from "./style.module.css"; import style from "./style.module.css";
export default function Dashboard() { export default function Dashboard() {
@@ -44,7 +42,6 @@ export default function Dashboard() {
return ( return (
<div className={`${style.dashboard} ${scheme}`}> <div className={`${style.dashboard} ${scheme}`}>
<Amogus />
<div className={style.body}> <div className={style.body}>
<CardColumn> <CardColumn>
<Card icon="🚊" name="Timetable"> <Card icon="🚊" name="Timetable">
@@ -59,17 +56,9 @@ export default function Dashboard() {
<Card icon="🌤" name="Weather"> <Card icon="🌤" name="Weather">
<Weather /> <Weather />
</Card> </Card>
<div
className={classNames(
style.bouncingWindow,
style.hidden,
)}
>
<Card icon="🍁" name="420"> <Card icon="🍁" name="420">
<FourTwenty /> <FourTwenty />
</Card> </Card>
</div>
</CardRow> </CardRow>
<Card icon="🔔" name="Terminal" active={true}> <Card icon="🔔" name="Terminal" active={true}>

View File

@@ -7,7 +7,7 @@
.body { .body {
height: 100%; height: 100%;
padding: 30px; margin: 30px;
overflow: scroll; overflow: scroll;
} }
@@ -25,30 +25,3 @@
.night { .night {
background-color: #2a3f55; background-color: #2a3f55;
} }
.amogus {
z-index: 100;
position: absolute;
scale: 60%;
animation:
x 10s linear infinite alternate,
y 7s linear infinite alternate;
}
@keyframes x {
from {
left: 0;
}
to {
left: calc(100vw - 70px);
}
}
@keyframes y {
from {
top: 0;
}
to {
top: calc(100vh - 90px);
}
}

View File

@@ -1,4 +1,4 @@
import style from "./style.module.css"; // import style from "./style.module.css";
// function Timer({ hours, minutes }: { hours: number; minutes: number }) { // function Timer({ hours, minutes }: { hours: number; minutes: number }) {
// const x = hours > 0 ? `${hours}h ` : ""; // const x = hours > 0 ? `${hours}h ` : "";
@@ -16,17 +16,17 @@ import style from "./style.module.css";
// function FourTwentyLoading() {} // function FourTwentyLoading() {}
function FourTwentySmoking() { // function FourTwentySmoking() {
return ( // return (
<div className={style.container}> // <div className={style.container}>
<img // <img
className={style.image} // className={style.image}
src="https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExMjFlYnhzYzJnc3ZzejBnOGZzcHFpNGpxOHNrN2dwcnZ3NmZ2eWJ0dyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/5xaOcLRnsWIB0CkfE3u/giphy.gif" // src="https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExMjFlYnhzYzJnc3ZzejBnOGZzcHFpNGpxOHNrN2dwcnZ3NmZ2eWJ0dyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/5xaOcLRnsWIB0CkfE3u/giphy.gif"
alt="Smoking" // alt="Smoking"
/> // />
</div> // </div>
); // );
} // }
export default function FourTwenty() { export default function FourTwenty() {
return ( return (