Add footer with credits and website source

trivernis 1 year ago
parent 50456aaf29
commit 67d0e1f6d0
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

43
package-lock.json generated

@ -8,7 +8,9 @@
"name": "no-chromium",
"version": "0.0.1",
"dependencies": {
"@sveltejs/adapter-node": "^1.3.1"
"@sveltejs/adapter-node": "^1.3.1",
"detect-browser": "^5.3.0",
"sass": "^1.64.1"
},
"devDependencies": {
"@sveltejs/kit": "^1.20.4",
@ -1095,7 +1097,6 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"dev": true,
"dependencies": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
@ -1183,7 +1184,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true,
"engines": {
"node": ">=8"
}
@ -1202,7 +1202,6 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"dependencies": {
"fill-range": "^7.0.1"
},
@ -1331,7 +1330,6 @@
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"dev": true,
"funding": [
{
"type": "individual",
@ -1358,7 +1356,6 @@
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"dependencies": {
"is-glob": "^4.0.1"
},
@ -1500,6 +1497,11 @@
"node": ">=6"
}
},
"node_modules/detect-browser": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.3.0.tgz",
"integrity": "sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w=="
},
"node_modules/detect-indent": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz",
@ -1930,7 +1932,6 @@
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
},
@ -2117,6 +2118,11 @@
"node": ">= 4"
}
},
"node_modules/immutable": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.1.tgz",
"integrity": "sha512-lj9cnmB/kVS0QHsJnYKD1uo3o39nrbKxszjnqS9Fr6NB7bZzW45U6WSGBPKXDL/CvDKqDNPA4r3DoDQ8GTxo2A=="
},
"node_modules/import-fresh": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
@ -2160,7 +2166,6 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"dependencies": {
"binary-extensions": "^2.0.0"
},
@ -2197,7 +2202,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -2206,7 +2210,6 @@
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"dependencies": {
"is-extglob": "^2.1.1"
},
@ -2223,7 +2226,6 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"engines": {
"node": ">=0.12.0"
}
@ -2526,7 +2528,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@ -2954,7 +2955,6 @@
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"dependencies": {
"picomatch": "^2.2.1"
},
@ -3085,6 +3085,22 @@
"rimraf": "bin.js"
}
},
"node_modules/sass": {
"version": "1.64.1",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.64.1.tgz",
"integrity": "sha512-16rRACSOFEE8VN7SCgBu1MpYCyN7urj9At898tyzdXFhC+a+yOX5dXwAR7L8/IdPJ1NB8OYoXmD55DM30B2kEQ==",
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0",
"source-map-js": ">=0.6.2 <2.0.0"
},
"bin": {
"sass": "sass.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
@ -3568,7 +3584,6 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"dependencies": {
"is-number": "^7.0.0"
},

@ -31,6 +31,8 @@
},
"type": "module",
"dependencies": {
"@sveltejs/adapter-node": "^1.3.1"
"@sveltejs/adapter-node": "^1.3.1",
"detect-browser": "^5.3.0",
"sass": "^1.64.1"
}
}

@ -0,0 +1,18 @@
import {detect} from "detect-browser";
const browser = detect();
export function getBrowserName(): string {
return `${ browser.name[0].toUpperCase() }${ browser.name.substring(1) }`;
}
export function isChromium(): boolean {
switch (browser.name) {
case "chrome":
case "opera":
case "edge":
return true;
default:
return false;
}
}

@ -1,5 +1,14 @@
<script>
import "../app.css";
import Footer from "./footer.svelte";
</script>
<style lang="scss">
.main {
margin-bottom: 2.6em;
}
</style>
<slot/>
<div class="main">
<slot/>
</div>
<Footer/>

@ -1,3 +1,7 @@
<script>
import Footer from "./footer.svelte";
</script>
<header class="banner">
<h1>No Chromium</h1>
<h2>Do not use Chromium</h2>
@ -7,8 +11,8 @@
<h2>What is Chromium?</h2>
<p>
Chromium is a web browser developed by Google. Many modern web browsers
use its codebase and extend upon it, for example:
Chromium is a web browser developed by Google. Many modern web browsers
use its codebase and extend upon it, for example:
</p>
<ul>
<li>Google Chrome</li>
@ -16,7 +20,7 @@
<li>Microsoft Edge</li>
<li>Brave Browser</li>
</ul>
<a href="https://en.wikipedia.org/wiki/Chromium_(web_browser)">
<a href="https://en.wikipedia.org/wiki/Chromium_(web_browser)" aria-label="Link to the Chromium Wikipedia page.">
More Information
</a>
@ -27,7 +31,7 @@
that build on it. As Chromium based browsers are the majority, websites
have to adapt. This also forces non chromium browsers like Firefox to
implement these changes. This gives Google the power to steer the web in
a direction they benefit from the most.
a direction they benefit from the most.
</p>
<h2>Examples</h2>
@ -40,7 +44,13 @@
<h2>What can I do</h2>
<p>
You should use alternative browsers like
<a href="https://www.mozilla.org/en-US/firefox/">Firefox</a> or, even
better, <a href="https://librewolf.net/">LibreWolf</a>
<a href="https://www.mozilla.org/en-US/firefox/" aria-label="Link to the Firefox download page.">
Firefox
</a>
or, even
better,
<a href="https://librewolf.net/" aria-label="Link to the LibreWolf website.">
LibreWolf
</a>.
</p>
</main>

@ -0,0 +1,20 @@
<header class="banner">
<a href="/">Back</a>
<h1>Credits</h1>
</header>
<main class="content">
<h2><a href="https://tech.lgbt/@sara">Sara</a></h2>
<ul>
<li>Icons</li>
</ul>
<h2><a href="https://tech.lgbt/@punishedbernadetta">Punished Bernadetta</a></h2>
<ul>
<li>Style Improvements</li>
</ul>
<h2><a href="https://social.funkyfish.cool/@trivernis">Trivernis</a></h2>
<ul>
<li>Repository Owner</li>
</ul>
</main>

@ -0,0 +1,35 @@
<style lang="scss">
.footer {
height: 2.5em;
width: 100%;
position: fixed;
bottom: 0;
background-color: #FDF;
.footer-content {
display: block;
position: relative;
margin: 0.5em 1em;
width: calc(100% - 2em);
height: calc(100% - 1em);
* {
position: relative;
margin: auto;
}
.left {
float: left;
}
.right {
float: right;
}
}
}
</style>
<footer class="footer">
<div class="footer-content">
<a class="left" href="/credits">Credits</a>
<a class="right" href="https://git.trivernis.net/Trivernis/no-chromium">Source</a>
</div>
</footer>

@ -1,10 +1,42 @@
<script>
import { getBrowserName, isChromium } from "$lib/browser";
// import { browser } from "$app/environment";
import { onMount } from "svelte";
export let browserName;
export let chromium = true;
onMount(() => {
browserName = getBrowserName();
chromium = isChromium();
});
</script>
<style lang="scss">
.container {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
height: 100vh;
height: 100dvh;
}
</style>
<div class="container">
<div class="banner">
{#if browserName }
<center>
<h1>No Chromium</h1>
<h2>This website does not accept chromium based browsers</h2>
<h3>Use a different web browser</h3>
<h4><a href="/">Why?</a></h4>
{#if chromium}
<h1>{browserName} is not supported by this Website</h1>
<h2>Use a different web browser</h2>
<h4><a href="/">Why?</a></h4>
{:else }
<h1>Congrats, you're not using Chromium</h1>
<h2>So why are you here?</h2>
<h4><a href="/">More Info</a></h4>
{/if }
</center>
{/if }
</div>
</div>

Loading…
Cancel
Save