Compare commits
4 Commits
62ba198b40
...
667dd7d662
Author | SHA1 | Date | |
---|---|---|---|
667dd7d662 | |||
9bf6389376 | |||
3f7e0edf38 | |||
d6effa3838 |
15
Dockerfile
15
Dockerfile
@ -1,7 +1,16 @@
|
||||
FROM oven/bun AS build
|
||||
FROM oven/bun AS builder
|
||||
|
||||
COPY package.json astro.config.mjs /tmp/
|
||||
COPY src public /tmp/
|
||||
WORKDIR /rhpidfyre.io
|
||||
|
||||
COPY src package.json vite.config.js tsconfig.json ./
|
||||
|
||||
RUN bun run install
|
||||
RUN bun run build
|
||||
|
||||
FROM joseluisq/static-web-server
|
||||
|
||||
COPY --from=builder /rhpidfyre.io/dist .
|
||||
|
||||
EXPOSE 8787/tcp
|
||||
|
||||
ENTRYPOINT [ "static-web-server", "-p", "8787", "-d", "dist/", "-g", "trace" ]
|
@ -3,13 +3,6 @@ import { get_working_dir_name } from "../shell/fs/fn"
|
||||
|
||||
import create from "./create"
|
||||
|
||||
const userAgent = navigator.userAgent
|
||||
const browser_name_fallible = userAgent.match(/Firefox.\d+[\d.\d]+|Chrome.\d+[\d.\d]+/gm)?.map(f => f.split("/")[0])
|
||||
let browser_name = "unknown"
|
||||
if (browser_name_fallible) {
|
||||
browser_name = browser_name_fallible[0] === "Firefox" ? "gecko" : "chromium"
|
||||
}
|
||||
|
||||
interface Ps1Prompt {
|
||||
readonly body: HTMLDivElement,
|
||||
readonly input: HTMLInputElement
|
||||
@ -23,6 +16,24 @@ let inputs: Inputs = {
|
||||
new: undefined
|
||||
}
|
||||
|
||||
function browser_name_via_useragent(): string {
|
||||
const userAgent = navigator.userAgent
|
||||
const browser_name_fallible = userAgent.match(/Firefox.\d+[\d.\d]+|Chrome.\d+[\d.\d]+/gm)?.map(f => f.split("/")[0])
|
||||
|
||||
if (browser_name_fallible) {
|
||||
const useragent_name = browser_name_fallible[0]
|
||||
if (useragent_name === "Firefox") {
|
||||
return "gecko"
|
||||
} else if (useragent_name === "Chrome") {
|
||||
return "chromium"
|
||||
}/* else if (useragent_name === "AppleWebKit") {
|
||||
return "safari"
|
||||
} */
|
||||
}
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
const browser_name = browser_name_via_useragent()
|
||||
function ps1_element(user: HTMLSpanElement, dir: HTMLSpanElement) {
|
||||
const display = create("p")
|
||||
display.appendChild(user)
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Entry, EntryType, fs, type FsEntrySignature } from "./fs"
|
||||
import { EntryType, fs, type FsEntrySignature } from "./fs"
|
||||
|
||||
let working_dir = ["/", "home", "user"]
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
height: 100%;
|
||||
padding: 0 20px 0 20px;
|
||||
|
||||
&:hover { background-color: var(--hf-button-hover-color) }
|
||||
&:hover { background-color: rgb(255,255,255) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,25 +5,18 @@
|
||||
@use "./elements/main.scss";
|
||||
@use "./elements/footer.scss";
|
||||
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
|
||||
--body-background-color: rgb(0,0,0);
|
||||
--hf-button-hover-color: rgb(255,255,255);
|
||||
}
|
||||
:root { color-scheme: dark; }
|
||||
::selection {
|
||||
background-color: rgb(255,255,255);
|
||||
color: rgb(0,0,0);
|
||||
}
|
||||
::spelling-error {
|
||||
text-decoration: none
|
||||
}
|
||||
::spelling-error { text-decoration: none; }
|
||||
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
background-color: var(--body-background-color);
|
||||
background-color: rgb(0,0,0);
|
||||
}
|
||||
button {
|
||||
background-color: transparent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user