From 2b7c256f4a8841a6c07a7c87bec33ec64033660f Mon Sep 17 00:00:00 2001 From: Yuri Tatishchev Date: Mon, 16 Jun 2025 22:31:33 -0700 Subject: [PATCH] vibe styling pt. 2 --- settings.json | 6 ++++-- src/index.js | 7 ++++++- src/main.css | 22 ++++++++++++---------- src/main.html | 16 +++++++--------- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/settings.json b/settings.json index dc5cc32..3eeb08a 100644 --- a/settings.json +++ b/settings.json @@ -1,6 +1,8 @@ { "server_ip": "0.0.0.0", - "server_port": 3000, - "video_path": "videos/Orb-22.mp4", + "server_port": 8080, + "video_path": "videos/Orb-21.mp4", + "subtitles_path": "videos/Orb-21.vtt", + "bg_path": "videos/bg-20.png", "password": "password" } diff --git a/src/index.js b/src/index.js index a4cfa9f..8dd0581 100644 --- a/src/index.js +++ b/src/index.js @@ -145,6 +145,7 @@ app.get("/video", function (req, res) { "Accept-Ranges": "bytes", "Content-Length": contentLength, "Content-Type": "video/mp4", + "Cache-Control": "no-cache, no-store, must-revalidate", }; // HTTP Status 206 for Partial Content @@ -163,7 +164,11 @@ app.get("/video", function (req, res) { // subtitles track app.get("/subtitles", function (req, res) { console.log("hello)"); - res.sendFile(__dirname + "/subs/Orb-22.vtt"); + res.sendFile(fs.realpathSync(settings.subtitles_path)); +}); + +app.get("/background", function (req, res) { + res.sendFile(fs.realpathSync(settings.bg_path)) }); diff --git a/src/main.css b/src/main.css index acebd00..e0b15b0 100644 --- a/src/main.css +++ b/src/main.css @@ -8,15 +8,23 @@ } body { - height: 100vh; + color: aliceblue; + min-height: 100vh; margin: 0; padding: 2rem; - background-color: gray; + background-color: #161616; font-family: "Roboto", sans-serif; } +body[data-background] { + background-image: url('/background'); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + background-blend-mode: darken; +} + .container { - max-height: 100vh; display: flex; flex-direction: column; align-items: center; @@ -25,13 +33,7 @@ body { header { text-align: center; font-size: 2rem; -} - -.video-wrapper { - /*position: relative;*/ - /*width: 100%;*/ - /*padding-bottom: 56.25%;*/ - /* 16:9 aspect ratio for responsive video */ + text-shadow: aliceblue 0 0 0.25rem; } video { diff --git a/src/main.html b/src/main.html index 3400b90..4ee24fb 100644 --- a/src/main.html +++ b/src/main.html @@ -7,19 +7,17 @@ Client - +
-

Watch-Together

+

Welcome to the Orboverse

-
-
+ +

Your browser does not support the video tag.

+