-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a34d91
commit 22c1dda
Showing
87 changed files
with
269 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lighthouse CI | ||
on: | ||
push: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "pnpm" | ||
- name: Install dependencies | ||
run: pnpm install && pnpm install -g @lhci/[email protected] tsx | ||
- name: Run build | ||
run: pnpm run build | ||
- name: Run Lighthouse CI | ||
run: lhci autorun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export default function () { | ||
return ( | ||
<div> | ||
<div id="footer" class="fullwidth"> | ||
<div class="footerflex"> | ||
<div class="footerbrand"> | ||
<h3><a href="/">Sodium</a></h3> | ||
<p>Evading Internet Censorship for over 6 Months!</p> | ||
</div> | ||
<div class="footerlist"> | ||
<p style="margin-top: 58px;">Sodium © z1g Project 2024</p> | ||
</div> | ||
</div> | ||
<div class="footersocials"> | ||
<img src="assets/img/z1g.png" alt="z1g Project" title="The z1g Project GitHub organization" height="30" width="30" on:click="location.href='/github/z1g-project/'"></img> | ||
<img src="assets/img/discord.jpg" alt="Discord" title="The z1g Project Discord" height="30" width="30" on:click="location.href='/discord/'"></img> | ||
<img src="assets/img/github.png" alt="GitHub" title="The official deployment repository for Sodium" height="30" width="30" on:click="location.href='/github/'"></img> | ||
<img src="assets/img/license.svg" alt="Credits" title="License information" height="30" width="30" on:click="location.href='/credits/'"></img> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export default function Nav() { | ||
return ( | ||
<div> | ||
<div class="second-bar"> | ||
<a href="/" title="Home" class="second-bar-link home-link"></a> | ||
<a href="/games/" title="Games" class="second-bar-link games-link"></a> | ||
<a href="/apps/" title="Apps" class="second-bar-link apps-link"></a> | ||
<a href="/settings/" title="Settings" class="second-bar-link settings-link"></a> | ||
<div class="info-menu" id="info-menu" style="margin-left: auto"> | ||
<div class="info-menu-item" id="transferRate"></div> | ||
<div class="info-menu-item" id="latency"></div> | ||
<div class="info-menu-item" id="fps"></div> | ||
</div> | ||
<div class="top-bar-item" id="time"></div> | ||
<div class="top-bar-item"> | ||
<div class="battery-icon-container"> | ||
<div id="battery" class="battery-icon"></div> | ||
<div class="battery-fill"></div> | ||
<p class="battery-text"></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="description" content="Sodium is a site used for evading internet censorship." /> | ||
<meta property="og:image" content="/sodium.png"> | ||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#27639f"/> | ||
<meta name="googlebot" content="noindex, nofollow, nosnippet" /> | ||
<link rel="shortcut icon" content="favicon.ico" /> | ||
<link rel="stylesheet" href="assets/css/ui.css" id="custom-css"/> | ||
<link rel="stylesheet" href="assets/css/montserrat.css"/> | ||
<script src="assets/js/settings.js" defer></script> | ||
<script src="assets/js/fade.js" defer></script> | ||
<link rel="manifest" href="manifest.webmanifest"/> | ||
<link id="favicon" rel="icon" type="image/png" href="favicon.ico"> | ||
<script src="regcache.js" defer></script> | ||
</head> | ||
<body> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#apploader { | ||
display: none; | ||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
z-index: 999; | ||
} | ||
|
||
.show-iframe #apploader { | ||
display: block; | ||
} | ||
|
||
#loading-overlay { | ||
display: none; | ||
justify-content: center; | ||
align-items: center; | ||
position: fixed; | ||
top: 40px; | ||
left: 0; | ||
width: 100%; | ||
height: calc(100% - 6.5%); | ||
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; | ||
} | ||
|
||
.close { | ||
position: absolute; | ||
top: 10px; | ||
right: 15px; | ||
font-size: 24px; | ||
cursor: pointer; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import Nav from "../components/Nav" | ||
import Footer from "../components/Footer" | ||
export default function notfound() { | ||
async function regSW() { | ||
console.log('Waiting on SW Cache to Register...'); | ||
const stockSW = "/sw.js"; | ||
const dynSW = "/dyn.sw.js" | ||
const swAllowedHostnames = ["localhost", "127.0.0.1"]; | ||
|
||
if ( | ||
location.protocol !== "https:" && | ||
!swAllowedHostnames.includes(location.hostname) | ||
) | ||
throw new Error("Service workers cannot be registered without https."); | ||
|
||
if (!navigator.serviceWorker) | ||
throw new Error("Your browser doesn't support service workers."); | ||
|
||
await navigator.serviceWorker.register(stockSW, { | ||
scope: "/sw/", | ||
}); | ||
|
||
await navigator.serviceWorker.register(dynSW, { | ||
scope: "/service/", | ||
}); | ||
|
||
window.location.reload() | ||
} | ||
return ( | ||
<div> | ||
<Nav /> | ||
<div class="box-error text-center"> | ||
<h1>404 Error</h1> | ||
<p style="text-align: center;">The requested file was not found on this server!</p> | ||
<div style="text-align: center;"> | ||
<button id="uv-register-sw" on:click="regsw()" value="Register service worker">Register Serviceworkers</button> | ||
</div> | ||
</div> | ||
<Footer /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import Nav from "../components/Nav" | ||
import Footer from "../components/Footer" | ||
import "../public/assets/css/home.css" | ||
export default function home() { | ||
return ( | ||
<div> | ||
<Nav /> | ||
<div id="changelogModal" class="modal"> | ||
<div class="modal-content"> | ||
<span class="close">×</span> | ||
<h2 style="font-weight: 700;">What's New</h2> | ||
<p class="release-date">Release Date: Feburary 4th, 2023</p> | ||
<ul class="changes-list"> | ||
<li>Add Bare switching to UV</li> | ||
<li>Refresh some older UI Elements</li> | ||
<li>Fix weird radius color issue</li> | ||
<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> | ||
<button class="ok-button">OK</button> | ||
</div> | ||
</div> | ||
|
||
<div title="Sodium Logo" class="flex-center logo-wrapper header-center"> | ||
<img class="logo" src="assets/img/logo.svg" alt="Sodium" /> | ||
<h1>Sodium</h1> | ||
</div> | ||
<div class="flex-center desc"> | ||
<p>Sodium is a site used for evading internet censorship</p> | ||
</div> | ||
<form id="uv-form" class="flex-center"> | ||
<input id="uv-search-engine" value="https://www.google.com/search?q=%s" type="hidden" /> | ||
<input id="uv-address" type="text" placeholder="Search the web freely" /> | ||
</form> | ||
|
||
<div class="desc left-margin"> | ||
<p id="uv-error"></p> | ||
<pre id="uv-error-code"></pre> | ||
</div> | ||
|
||
<div id="loading-overlay"> | ||
<div class="loading-content"> | ||
<img src="sodium.png" alt="Logo" width="125" height="125"></img> | ||
<h1 class="loading-title">Sodium is loading your content!</h1> | ||
<img src="assets/img/loader.svg" alt="Loading Animation" width="50" height="50"></img> | ||
<p class="loading-message">Please wait...</p> | ||
</div> | ||
</div> | ||
|
||
<iframe id="apploader"></iframe> | ||
<Footer /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="vite/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { defineConfig } from "vite"; | ||
import path from "path"; | ||
const __dirname = path.resolve(); | ||
export default defineConfig({ | ||
esbuild: { | ||
jsxInject: `import "@mercuryworkshop/alicejs";`, | ||
}, | ||
resolve: { | ||
alias: { | ||
"@": path.resolve(__dirname, "./src"), | ||
}, | ||
}, | ||
}); |