Move Pazisme Mod page to a standalone HTML (#86)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Co-authored-by: Renovate Bot <renovate-bot@valverde.cloud> Reviewed-on: #86
This commit was merged in pull request #86.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@website/webapp",
|
||||
"packageManager": "bun@1.2.22",
|
||||
"packageManager": "bun@1.3.14",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"module": "./stub.ts",
|
||||
@@ -14,39 +14,39 @@
|
||||
"clean:modules": "rm -rf node_modules"
|
||||
},
|
||||
"dependencies": {
|
||||
"@effect/platform": "^0.93.0",
|
||||
"@effect/platform-browser": "^0.73.0",
|
||||
"@effect/rpc": "^0.72.0",
|
||||
"@effect/platform": "^0.96.1",
|
||||
"@effect/platform-browser": "^0.76.0",
|
||||
"@effect/rpc": "^0.75.1",
|
||||
"@fontsource/work-sans": "^5.2.8",
|
||||
"@radix-ui/react-slot": "^1.2.3",
|
||||
"@radix-ui/react-slot": "^1.2.4",
|
||||
"@radix-ui/react-tooltip": "^1.2.8",
|
||||
"@tanstack/react-router": "^1.131.48",
|
||||
"@tanstack/react-router": "^1.170.4",
|
||||
"@website/common": "workspace:*",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"effect": "^3.17.13",
|
||||
"effect-fc": "^0.2.0",
|
||||
"i18next": "^25.6.0",
|
||||
"i18next-browser-languagedetector": "^8.2.0",
|
||||
"lucide-react": "^0.556.0",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"react-i18next": "^16.0.1",
|
||||
"react-icons": "^5.5.0",
|
||||
"effect": "^3.21.2",
|
||||
"effect-fc": "^0.2.6",
|
||||
"i18next": "^26.2.0",
|
||||
"i18next-browser-languagedetector": "^8.2.1",
|
||||
"lucide-react": "^1.16.0",
|
||||
"react": "^19.2.6",
|
||||
"react-dom": "^19.2.6",
|
||||
"react-i18next": "^17.0.8",
|
||||
"react-icons": "^5.6.0",
|
||||
"react-shadow": "^20.6.0",
|
||||
"tailwind-merge": "^3.3.1",
|
||||
"tailwindcss": "^4.1.13"
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"tailwindcss": "^4.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.1.13",
|
||||
"@tanstack/react-router-devtools": "^1.131.48",
|
||||
"@tanstack/router-plugin": "^1.131.48",
|
||||
"@types/react": "^19.1.13",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"@vitejs/plugin-react": "^5.0.2",
|
||||
"globals": "^16.4.0",
|
||||
"tw-animate-css": "^1.3.8",
|
||||
"typescript-eslint": "^8.44.0",
|
||||
"vite": "^7.1.5"
|
||||
"@tailwindcss/vite": "^4.3.0",
|
||||
"@tanstack/react-router-devtools": "^1.167.0",
|
||||
"@tanstack/router-plugin": "^1.168.6",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^6.0.2",
|
||||
"globals": "^17.6.0",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"typescript-eslint": "^8.59.4",
|
||||
"vite": "^8.0.13"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>pazisme mod</title>
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Coolvetica";
|
||||
src: url("./coolvetica_rg.otf") format("opentype");
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #000;
|
||||
}
|
||||
|
||||
body {
|
||||
position: relative;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.splash-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.title {
|
||||
position: absolute;
|
||||
left: 24px;
|
||||
bottom: 48px;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
font-family: "Coolvetica", sans-serif;
|
||||
font-size: clamp(48px, 8vw, 92px);
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<audio id="theme" src="./we_are_charlie_kirk.mp3" preload="auto" autoplay hidden></audio>
|
||||
<img class="splash-image" src="./screen1.png" alt="Pazismemod screenshot">
|
||||
<h1 class="title">pazisme mod</h1>
|
||||
<script>
|
||||
(function() {
|
||||
var SONG_START_TIME = 46;
|
||||
var audio = document.getElementById("theme");
|
||||
|
||||
if (!audio) {
|
||||
return;
|
||||
}
|
||||
|
||||
function syncStartTime() {
|
||||
if (isFinite(audio.duration) && audio.duration > SONG_START_TIME) {
|
||||
audio.currentTime = SONG_START_TIME;
|
||||
}
|
||||
}
|
||||
|
||||
function playFromOffset() {
|
||||
syncStartTime();
|
||||
var result = audio.play();
|
||||
if (result && typeof result.catch === "function") {
|
||||
result.catch(function() {
|
||||
// Ignore autoplay failures in embedded browsers that require interaction.
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
window.GameDetails = function(
|
||||
_servername,
|
||||
_serverurl,
|
||||
_mapname,
|
||||
_maxplayers,
|
||||
_steamid,
|
||||
_gamemode,
|
||||
volume
|
||||
) {
|
||||
var parsedVolume = Number(volume);
|
||||
|
||||
if (!isNaN(parsedVolume) && isFinite(parsedVolume)) {
|
||||
audio.volume = Math.min(1, Math.max(0, parsedVolume));
|
||||
}
|
||||
};
|
||||
|
||||
audio.addEventListener("loadedmetadata", syncStartTime);
|
||||
audio.addEventListener("ended", playFromOffset);
|
||||
playFromOffset();
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
@@ -10,24 +10,12 @@
|
||||
|
||||
import { Route as rootRouteImport } from './routes/__root'
|
||||
import { Route as MainRouteImport } from './routes/_main'
|
||||
import { Route as PazismemodRouteRouteImport } from './routes/pazismemod/route'
|
||||
import { Route as PazismemodIndexRouteImport } from './routes/pazismemod/index'
|
||||
import { Route as MainIndexRouteImport } from './routes/_main.index'
|
||||
|
||||
const MainRoute = MainRouteImport.update({
|
||||
id: '/_main',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const PazismemodRouteRoute = PazismemodRouteRouteImport.update({
|
||||
id: '/pazismemod',
|
||||
path: '/pazismemod',
|
||||
getParentRoute: () => rootRouteImport,
|
||||
} as any)
|
||||
const PazismemodIndexRoute = PazismemodIndexRouteImport.update({
|
||||
id: '/',
|
||||
path: '/',
|
||||
getParentRoute: () => PazismemodRouteRoute,
|
||||
} as any)
|
||||
const MainIndexRoute = MainIndexRouteImport.update({
|
||||
id: '/',
|
||||
path: '/',
|
||||
@@ -35,31 +23,25 @@ const MainIndexRoute = MainIndexRouteImport.update({
|
||||
} as any)
|
||||
|
||||
export interface FileRoutesByFullPath {
|
||||
'/pazismemod': typeof PazismemodRouteRouteWithChildren
|
||||
'/': typeof MainIndexRoute
|
||||
'/pazismemod/': typeof PazismemodIndexRoute
|
||||
}
|
||||
export interface FileRoutesByTo {
|
||||
'/': typeof MainIndexRoute
|
||||
'/pazismemod': typeof PazismemodIndexRoute
|
||||
}
|
||||
export interface FileRoutesById {
|
||||
__root__: typeof rootRouteImport
|
||||
'/pazismemod': typeof PazismemodRouteRouteWithChildren
|
||||
'/_main': typeof MainRouteWithChildren
|
||||
'/_main/': typeof MainIndexRoute
|
||||
'/pazismemod/': typeof PazismemodIndexRoute
|
||||
}
|
||||
export interface FileRouteTypes {
|
||||
fileRoutesByFullPath: FileRoutesByFullPath
|
||||
fullPaths: '/pazismemod' | '/' | '/pazismemod/'
|
||||
fullPaths: '/'
|
||||
fileRoutesByTo: FileRoutesByTo
|
||||
to: '/' | '/pazismemod'
|
||||
id: '__root__' | '/pazismemod' | '/_main' | '/_main/' | '/pazismemod/'
|
||||
to: '/'
|
||||
id: '__root__' | '/_main' | '/_main/'
|
||||
fileRoutesById: FileRoutesById
|
||||
}
|
||||
export interface RootRouteChildren {
|
||||
PazismemodRouteRoute: typeof PazismemodRouteRouteWithChildren
|
||||
MainRoute: typeof MainRouteWithChildren
|
||||
}
|
||||
|
||||
@@ -72,20 +54,6 @@ declare module '@tanstack/react-router' {
|
||||
preLoaderRoute: typeof MainRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/pazismemod': {
|
||||
id: '/pazismemod'
|
||||
path: '/pazismemod'
|
||||
fullPath: '/pazismemod'
|
||||
preLoaderRoute: typeof PazismemodRouteRouteImport
|
||||
parentRoute: typeof rootRouteImport
|
||||
}
|
||||
'/pazismemod/': {
|
||||
id: '/pazismemod/'
|
||||
path: '/'
|
||||
fullPath: '/pazismemod/'
|
||||
preLoaderRoute: typeof PazismemodIndexRouteImport
|
||||
parentRoute: typeof PazismemodRouteRoute
|
||||
}
|
||||
'/_main/': {
|
||||
id: '/_main/'
|
||||
path: '/'
|
||||
@@ -96,18 +64,6 @@ declare module '@tanstack/react-router' {
|
||||
}
|
||||
}
|
||||
|
||||
interface PazismemodRouteRouteChildren {
|
||||
PazismemodIndexRoute: typeof PazismemodIndexRoute
|
||||
}
|
||||
|
||||
const PazismemodRouteRouteChildren: PazismemodRouteRouteChildren = {
|
||||
PazismemodIndexRoute: PazismemodIndexRoute,
|
||||
}
|
||||
|
||||
const PazismemodRouteRouteWithChildren = PazismemodRouteRoute._addFileChildren(
|
||||
PazismemodRouteRouteChildren,
|
||||
)
|
||||
|
||||
interface MainRouteChildren {
|
||||
MainIndexRoute: typeof MainIndexRoute
|
||||
}
|
||||
@@ -119,7 +75,6 @@ const MainRouteChildren: MainRouteChildren = {
|
||||
const MainRouteWithChildren = MainRoute._addFileChildren(MainRouteChildren)
|
||||
|
||||
const rootRouteChildren: RootRouteChildren = {
|
||||
PazismemodRouteRoute: PazismemodRouteRouteWithChildren,
|
||||
MainRoute: MainRouteWithChildren,
|
||||
}
|
||||
export const routeTree = rootRouteImport
|
||||
|
||||
@@ -24,7 +24,7 @@ function WIPLayout() {
|
||||
)
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
// @ts-expect-error
|
||||
function SharedLayout() {
|
||||
const { t, i18n } = useTranslation()
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
@font-face {
|
||||
font-family: "Coolvetica";
|
||||
src: url("/fonts/coolvetica_rg.otf") format("opentype");
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { useEffect, useRef } from "react"
|
||||
import "./index.css"
|
||||
import screen1 from "./screen1.png"
|
||||
import song from "./we_are_charlie_kirk.mp3"
|
||||
|
||||
|
||||
export const Route = createFileRoute("/pazismemod/")({
|
||||
component: RouteComponent,
|
||||
})
|
||||
|
||||
const SONG_START_TIME = 46
|
||||
|
||||
function RouteComponent() {
|
||||
const audioRef = useRef<HTMLAudioElement>(null)
|
||||
|
||||
useEffect(() => {
|
||||
const audio = audioRef.current
|
||||
|
||||
if (!audio) {
|
||||
return
|
||||
}
|
||||
|
||||
const syncStartTime = () => {
|
||||
if (Number.isFinite(audio.duration) && audio.duration > SONG_START_TIME) {
|
||||
audio.currentTime = SONG_START_TIME
|
||||
}
|
||||
}
|
||||
|
||||
const loopFromOffset = async () => {
|
||||
syncStartTime()
|
||||
|
||||
try {
|
||||
await audio.play()
|
||||
}
|
||||
catch {
|
||||
// Ignore autoplay failures. Some embedded browsers require user interaction.
|
||||
}
|
||||
}
|
||||
|
||||
const tryAutoplay = async () => {
|
||||
syncStartTime()
|
||||
|
||||
try {
|
||||
await audio.play()
|
||||
}
|
||||
catch {
|
||||
// Ignore autoplay failures. Some embedded browsers require user interaction.
|
||||
}
|
||||
}
|
||||
|
||||
const gameDetails = (
|
||||
_servername: string,
|
||||
_serverurl: string,
|
||||
_mapname: string,
|
||||
_maxplayers: string,
|
||||
_steamid: string,
|
||||
_gamemode: string,
|
||||
volume: number | string,
|
||||
) => {
|
||||
const parsedVolume = Number(volume)
|
||||
|
||||
if (Number.isFinite(parsedVolume)) {
|
||||
audio.volume = Math.min(1, Math.max(0, parsedVolume))
|
||||
}
|
||||
}
|
||||
|
||||
audio.addEventListener("loadedmetadata", syncStartTime)
|
||||
audio.addEventListener("ended", loopFromOffset)
|
||||
void tryAutoplay()
|
||||
;(window as Window & { GameDetails?: typeof gameDetails }).GameDetails = gameDetails
|
||||
|
||||
return () => {
|
||||
audio.removeEventListener("loadedmetadata", syncStartTime)
|
||||
audio.removeEventListener("ended", loopFromOffset)
|
||||
|
||||
if ((window as Window & { GameDetails?: typeof gameDetails }).GameDetails === gameDetails) {
|
||||
delete (window as Window & { GameDetails?: typeof gameDetails }).GameDetails
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="relative h-screen w-screen overflow-hidden bg-black">
|
||||
<audio ref={audioRef} src={song} preload="auto" hidden />
|
||||
|
||||
<img
|
||||
src={screen1}
|
||||
alt="Pazismemod screenshot"
|
||||
className="h-full w-full object-contain"
|
||||
/>
|
||||
|
||||
<h1
|
||||
className="absolute bottom-12 left-6 leading-none text-white"
|
||||
style={{
|
||||
fontFamily: "\"Coolvetica\", sans-serif",
|
||||
fontSize: "92px",
|
||||
}}
|
||||
>
|
||||
pazisme mod
|
||||
</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import { createFileRoute, Outlet } from "@tanstack/react-router"
|
||||
|
||||
|
||||
export const Route = createFileRoute("/pazismemod")({
|
||||
component: PazismemodLayout,
|
||||
})
|
||||
|
||||
function PazismemodLayout() {
|
||||
return <Outlet />
|
||||
}
|
||||
Reference in New Issue
Block a user