Compare commits
3 Commits
better-dep
...
46d9b8df94
| Author | SHA1 | Date | |
|---|---|---|---|
| 46d9b8df94 | |||
| 7912f59fb8 | |||
| 90771b85e9 |
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -17,9 +17,9 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bun install
|
run: bun install
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bun run build
|
run: |
|
||||||
- name: Write Git-Hash into html
|
bun run build
|
||||||
run: ./pipeline/create-git-hash-html.sh
|
echo "export const GITHUB_SHA = '$GITHUB_SHA';" > dist/git-hash.js
|
||||||
- name: Create Build Artifact
|
- name: Create Build Artifact
|
||||||
uses: christopherhx/gitea-upload-artifact@v4
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
run: biome ci .
|
run: biome ci .
|
||||||
|
|
||||||
create-and-publish-docker-image:
|
create-and-publish-docker-image:
|
||||||
needs: [lint]
|
needs: [build]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -60,6 +60,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,6 +70,8 @@ jobs:
|
|||||||
password: ${{ secrets.GARRISON_DOCKER_PASSWORD }}
|
password: ${{ secrets.GARRISON_DOCKER_PASSWORD }}
|
||||||
script: |
|
script: |
|
||||||
cd monitor-im-flur
|
cd monitor-im-flur
|
||||||
|
echo "Deploying Docker container..."
|
||||||
|
$HYPRLAND_INSTANCE_SIGNATURE
|
||||||
hyprctl dispatch exec 'pkill firefox'
|
hyprctl dispatch exec 'pkill firefox'
|
||||||
hyprctl dispatch exec 'firefox -kiosk localhost:9123'
|
hyprctl dispatch exec 'firefox -kiosk localhost:9123'
|
||||||
git clean -dfx
|
git clean -dfx
|
||||||
|
|||||||
@@ -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
|
|
||||||
1
pipeline/build-image.sh
Executable file
1
pipeline/build-image.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
#!/bin/bash
|
||||||
@@ -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: 5.9 MiB |
@@ -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))}</>;
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
.container {
|
|
||||||
z-index: 100;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
import FourTwenty from "@components/FourTwenty/FourTwenty";
|
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 amogus from "/img/amogus.png";
|
||||||
import style from "./style.module.css";
|
import style from "./style.module.css";
|
||||||
|
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
@@ -44,7 +42,9 @@ export default function Dashboard() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${style.dashboard} ${scheme}`}>
|
<div className={`${style.dashboard} ${scheme}`}>
|
||||||
<Amogus />
|
<div className={style.amogus}>
|
||||||
|
<img src={amogus} alt="Amogus" />
|
||||||
|
</div>
|
||||||
<div className={style.body}>
|
<div className={style.body}>
|
||||||
<CardColumn>
|
<CardColumn>
|
||||||
<Card icon="🚊" name="Timetable">
|
<Card icon="🚊" name="Timetable">
|
||||||
@@ -59,17 +59,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}>
|
||||||
|
|||||||
Reference in New Issue
Block a user