Skip to content

Commit

Permalink
h
Browse files Browse the repository at this point in the history
  • Loading branch information
Notplayingallday383 committed Apr 22, 2024
1 parent e64d4be commit c09ebda
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 28 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link id="favicon" rel="icon" type="image/png" href="favicon.ico">
</head>
<body>
<script type="module" src="/src/main.tsx"></script>
<script type="module" src="/src/routes.tsx"></script>
<div class="app"></div>
</body>
</html>
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@mercuryworkshop/epoxy-transport": "^1.1.0",
"@mercuryworkshop/libcurl-transport": "^1.3.1",
"@nebula-services/dynamic": "0.7.2-patch.2",
"@ruffle-rs/ruffle": "0.1.0-nightly.2024.4.22",
"@titaniumnetwork-dev/ultraviolet": "^3.0.2",
"@tomphttp/bare-server-node": "^2.0.3",
"@typescript-eslint/eslint-plugin": "^7.7.0",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

64 changes: 64 additions & 0 deletions public/assets/css/frames.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
iframe {
position: fixed;
top: 40px;
left: 0;
width: 100%;
height: calc(100% - 6.5%);
border: none;
display: none;
}

.show-iframe iframe {
display: block;
}

#loading-overlay {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: -999;
}

.loading-content {
text-align: center;
color: #fff;
}

.loading-title {
font-size: 24px;
margin-bottom: 10px;
}

.loading-message {
font-size: 18px;
}

.info-menu {
display: block;
}

.info-menu-item {
font-size: 12px;
}

#container {
position: absolute;
top: 50px;
bottom: 50px;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
}

#container object {
width: 100%;
height: 100%;
}
File renamed without changes.
16 changes: 16 additions & 0 deletions src/appframe.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// @ts-expect-error stfu
import Nav from "@components/nav.tsx"
// @ts-expect-error stfu
import Footer from "@components/footer"
// @ts-expect-error stfu
import { regSW } from "@components/modules/sw"
//import "/public/assets/css/frames.css"
export default function Appframe() {
return (
<div>
<Nav />

<Footer />
</div>
)
}
28 changes: 1 addition & 27 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ import loadSettings from "@components/modules/settings"
// @ts-expect-error stfu
import { regSW } from "@components/modules/sw"
import "../public/assets/css/home.css"
import { Route } from "dreamland-router";
import Notfound from "./404";
import Settings from "./settings";
import Apps from "./apps";
import NoSW from "./proxy-invalid";
import WispBG from "./wisp";
import CreditsPage from "./credits";
import About from "./about";
import Games from "./games"
export default function Home() {
loadSettings()
regSW()
Expand All @@ -34,7 +25,7 @@ export default function Home() {
<li>Fix slow load times</li>
<li>More Minor Changes & Bug Fixes view <a style="color:white;" href="https://github.com/z1g-project/sodium">here</a></li>
</ul>
<p>Version 2.0.0 - The 2024 Refresh</p>
<p>Version 2.4.0 - The AliceJS Reboot</p>
<button class="ok-button">OK</button>
</div>
</div>
Expand Down Expand Up @@ -70,20 +61,3 @@ export default function Home() {
</div>
)
}

export const router = (
<Route path="/">
<Route path="" show={<Home />} />
<Route path="apps" show={<Apps />} />
<Route path="sw" show={<NoSW />} />
<Route path="service" show={<NoSW />} />
<Route path="wisp" show={<WispBG />} />
<Route path="games" show={<Games />} />
<Route path="settings" show={<Settings />} />
<Route path="credits" show={<CreditsPage />} />
<Route path="about" show={<About />} />
<Route regex path=".*" show={<Notfound />} />
</Route>
).$

router.render(document.querySelector('.app'));
29 changes: 29 additions & 0 deletions src/routes.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Route } from "dreamland-router";
import Notfound from "./404";
import Settings from "./settings";
import Apps from "./apps";
import NoSW from "./proxy-invalid";
import WispBG from "./wisp";
import CreditsPage from "./credits";
import About from "./about";
import Games from "./games"
import Home from "./main"
import Appframe from "./appframe";

export const router = (
<Route path="/">
<Route path="" show={<Home />} />
<Route path="apps" show={<Apps />} />
<Route path="sw" show={<NoSW />} />
<Route path="service" show={<NoSW />} />
<Route path="wisp" show={<WispBG />} />
<Route path="games" show={<Games />} />
<Route path="settings" show={<Settings />} />
<Route path="credits" show={<CreditsPage />} />
<Route path="about" show={<About />} />
<Route path="appframe" show={<Appframe />} />
<Route regex path=".*" show={<Notfound />} />
</Route>
).$

router.render(document.querySelector('.app'));
32 changes: 32 additions & 0 deletions src/ruffleframe.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// @ts-expect-error stfu
import Nav from "@components/nav.tsx"
// @ts-expect-error stfu
import Footer from "@components/footer"
// @ts-expect-error stfu
import { regSW } from "@components/modules/sw"
import "/public/assets/css/frames.css"
export default function RuffleFrame() {
// @ts-expect-error stfu
window.RufflePlayer = new ruffle || {};
// @ts-ignore
window.addEventListener("load", (event: event) => {
// @ts-expect-error stfu
const ruffle = window.RufflePlayer.newest();
const player = ruffle.createPlayer();
player.style.width = "100%"; player.style.height = "100%";
// @ts-expect-error stfu
const container: HTMLDivElement = document.getElementById("container");
container.appendChild(player);
const flashgame = sessionStorage.getItem('flashswf')
player.load({
url: flashgame,
});
});
return (
<div>
<Nav />
<div id="container"></div>
<Footer />
</div>
)
}

0 comments on commit c09ebda

Please sign in to comment.