wip: 2026-02-28T17:32:10+0100 (1772296330)

This commit is contained in:
Victor Westerlund 2026-02-28 17:32:10 +01:00
commit d466914cfb
Signed by: vlw
GPG key ID: 5DAF14C317AA7719
13 changed files with 115 additions and 0 deletions

4
.env.example.ini Normal file
View file

@ -0,0 +1,4 @@
[camera]
host=""
user=""
pass=""

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.env.ini
vendor

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "vegvisir"]
path = vegvisir
url = https://codeberg.org/vegvisir/vegvisir

View file

@ -0,0 +1,14 @@
div#camera {
display: grid;
align-items: center;
justify-items: center;
grid-template-rows: repeat(2, 1fr);
button {
font-size: 2em;
&:not(.active) {
display: none;
}
}
}

View file

@ -0,0 +1,8 @@
vv-shell {
display: grid;
grid-template-columns: repeat(2, 1fr);
> div {
display: contents;
}
}

23
assets/css/style.css Normal file
View file

@ -0,0 +1,23 @@
* {
color: inherit;
margin: 0;
font-family: sans-serif;
}
body {
color: white;
overflow: hidden;
background-color: black;
}
button {
cursor: pointer;
border: solid 1px white;
padding: 1em;
background-color: transparent;
&.solid {
color: black;
background-color: white;
}
}

18
assets/js/pages/camera.js Normal file
View file

@ -0,0 +1,18 @@
const buttons = document.body.querySelectorAll("div#camera button");
const imgElement = document.body.querySelector("div#camera img");
const enableCameraFeed = () => {
};
const disableCameraFeed = () => {
};
buttons.forEach(element => {
element.addEventListener("click", event => {
buttons.forEach(element => element.classList.toggle("active"));
element.classList.contains("enable") ? enableCameraFeed() : disableCameraFeed();
});
})

0
assets/js/script.js Normal file
View file

11
public/camera.php Normal file
View file

@ -0,0 +1,11 @@
<?= VV::css("assets/css/pages/camera") ?>
<div id="camera">
<div class="">
<img src="._template.jpg"/>
</div>
<div>
<button class="enable active">Enable camera feed</button>
<button class="disable solid">Disable camera feed</button>
</div>
</div>
<?= VV::js("assets/js/pages/camera") ?>

4
public/index.php Normal file
View file

@ -0,0 +1,4 @@
<?= VV::css("assets/css/pages/index") ?>
<div><?= VV::include("public/camera") ?></div>
<div><?= VV::include("public/minecraft") ?></div>

1
public/minecraft.php Normal file
View file

@ -0,0 +1 @@
<h1>Hello</h1>

25
public/shell.php Normal file
View file

@ -0,0 +1,25 @@
<?php
$config = parse_ini_file(
filename: dirname(__DIR__, 1) . "/.env.ini",
scanner_mode: INI_SCANNER_TYPED,
process_sections: true
);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
<?= VV::css("assets/css/style") ?>
</head>
<body>
<?= VV::shell() ?>
<script>globalThis._ENV = <?= json_encode($config) ?></script>
<?= VV::init() ?>
<?= VV::js("assets/js/script") ?>
</body>
</html>

1
vegvisir Submodule

@ -0,0 +1 @@
Subproject commit a2b1aa86e7b3eac0372419a9daf521e5ca15eb72