init
This commit is contained in:
6
Dockerfile
Normal file
6
Dockerfile
Normal file
@@ -0,0 +1,6 @@
|
||||
FROM python:3.8
|
||||
WORKDIR /app
|
||||
COPY requirements.txt requirements.txt
|
||||
RUN pip3 install -r requirements.txt && rm requirements.txt
|
||||
COPY app/ .
|
||||
CMD ["python3", "main.py"]
|
||||
13
app/acc.json
Normal file
13
app/acc.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "service_account",
|
||||
"project_id": "ethereal-jigsaw-348308",
|
||||
"private_key_id": "3cd92d9f24b9e13aba07f99f2fcd354db920b148",
|
||||
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCw/UkWWkjXO8dv\ndjyZV91EpuP4IL34X+HjAosDAGVFGRmkg9fXGZ7ELNOb0cWTlMridHPP9Db7ezz6\nhilIwEVFFyPe+QL6YxIJSaP+SoKFSAnZ43WfPHnFRQrBGgvelZU/CW7MkmXiPcy5\nogOhjIM/I1yWqG2S84Wx6QsE/iaDRaPXomXzDqX2rv7fMd2I+jSG72vEDTlHhvvR\nRSmrn5ufOgGAxxAVZ9jrVp3dPJ0Z6+pvsDbrnBwFhP3G7WTolQAkdq8p1oDHYz+g\nIkpTPVBUXyXRaY5tq5eLidU1Mvmkh320m8W1Jv/3U2j2P2zNWJnQB2kBHWyDgSti\ncQqtqMlJAgMBAAECggEAA/CGStlyWlsMDOWpBMjpU5NwnhDKpGI9LvdsF08t6Vq6\n+VsdyxuL2clILsvB6jGugTeSTDq4nWKaf03/yZWJf9nD+b0GVvqCSeaRjzc8XT6D\nnq/xR6up57BugAQvtC7RDbv7pmruEdXBt/8kHCZYXjSDMlGQs+NN1+XHFi52tmTP\nz8CoS19/PpNsx6RaGp1xKRNKVxNWJRptsn6MnljGjYpOtE8l0Nmfdmf0DrE61Ke7\nty6nn9RDpSLav/5l8qCx54RNCySS4DktrCO9K8y2rg6nV6jLi7Z124CaOnXWKZwR\nqbp/p0+lDoyVUn7MFgphk7W6BY2Cj42/n9CRHJ2n4wKBgQD4xlKbWlDDlISz63kt\nTaksC2CNgjSEQR6gWB0gbxq+cvgfANHbkGEdYxl1hzta3CJj+TOqjgMxiDtNk7uY\n9W2ZrKcfhNLb6gza5RiSCWC9R840rYf+9VkGP5yvl4dKnfdy5WysvpROh++LA4lg\ncWDSRpO8j5Kivbau6FwY8gh2vwKBgQC2ITpxh58GLTadONd2Hu5+WdHhKKZv6OmN\nsdfqnSypkeoVtIIXLw7s/fkLWTx3HQ2Fdba16zVpUoPWLe1cFmWKr+6JTTsSh31V\n6oGXALtCFrEjgnJK5ghLHljFHr6Of8TAszSuZ0v+V5GoU+Z7K03gwaqvNUvlUb/A\nBJwhvo6J9wKBgQDm7wteBV/1vpfVgSBy6qXBKiqOEjF4GA87H7CiHCFCa+1islsd\nLBDKu+S1UjzKIpGWJo5MpBnY0DLk1+AMpMACKODXBHDNDp6yUHsXjbcM3mxQQEp/\nZfgnMcPcyJghrzQ2pzzTuvJnWA8JB9Zt/bG4YSXho5Gmmt/LzA06ZutudwKBgQCD\n4oHwrhWgomL27K9RUMrA4gfSNN55ET72pT7GHLS3wfqxZvoBEcmMIckSx7a6RmaB\nKyF4kG8n6mGfWbiUw38aM5XXBP7uxwAik+LtVtFC5S22mgJrbDG7O6lqbH3usGTo\naZyPYiusbPsD2mV+8Xe+dl9D6qMf1te0k2IAKX4MNwKBgQCPxW2oeJsbylvx/gEn\n8d4B3s+exAxk4V9o7uqX2+5NV6hi9d3qat1UPW+cWqMdoCLaz81qZYeHbZjjQaVP\nxzUyhaMHEmrSxDqy3F6cl0EUrcDITaz4LubiQbQgQTrBY200ngVKLCOXDkAirbM+\nSU5uqKTbcXXRKsXLg0tEBdroqA==\n-----END PRIVATE KEY-----\n",
|
||||
"client_email": "211687439568-compute@developer.gserviceaccount.com",
|
||||
"client_id": "117238780902837398107",
|
||||
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
||||
"token_uri": "https://oauth2.googleapis.com/token",
|
||||
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
||||
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/211687439568-compute%40developer.gserviceaccount.com",
|
||||
"universe_domain": "googleapis.com"
|
||||
}
|
||||
57
app/main.py
Normal file
57
app/main.py
Normal file
@@ -0,0 +1,57 @@
|
||||
from flask import Flask, render_template, current_app as this, Response
|
||||
from google.cloud import storage
|
||||
from flask_minify import Minify
|
||||
|
||||
|
||||
app = Flask(__name__.split('.')[0])
|
||||
app.jinja_env.trim_blocks = True
|
||||
app.jinja_env.lstrip_blocks = True
|
||||
Minify(app=app, html=True, js=True, cssless=True)
|
||||
|
||||
def humanSize(size: int) -> str:
|
||||
prefix = [" ", " K", " M", " G", " T"]
|
||||
i = 0
|
||||
while size > 1024:
|
||||
size /= 1024
|
||||
i += 1
|
||||
|
||||
|
||||
size = str(round(size,3-len(str(int(size)))))
|
||||
if size.endswith(".0"): size = size.replace(".0","")
|
||||
|
||||
return size+prefix[i]+"B"
|
||||
|
||||
def getDownloads(bucket_name: str) -> list:
|
||||
""" takes the name of a google storage bucket and returns a list of objects on it """
|
||||
storage_client = storage.Client.from_service_account_json(json_credentials_path="acc.json")
|
||||
blobs = []
|
||||
for blob in storage_client.list_blobs(bucket_name, prefix='dload'):
|
||||
if blob.size == 0: continue
|
||||
blobs.append({"name": blob.name.replace("dload/",""), "size": humanSize(blob.size), "url": blob.public_url})
|
||||
storage_client.close()
|
||||
return blobs
|
||||
|
||||
@app.route('/')
|
||||
def main():
|
||||
return render_template("index.html")
|
||||
|
||||
@app.route('/codecalc')
|
||||
def calc():
|
||||
return render_template("code-calc.html")
|
||||
|
||||
@app.route('/secret')
|
||||
def secret():
|
||||
imgUrl = "/static/images/kroniicopter.webp"
|
||||
return render_template("secret.html", imgUrl = imgUrl)
|
||||
|
||||
@app.route('/tests')
|
||||
def test():
|
||||
return render_template("test.html")
|
||||
|
||||
@app.route('/downloads')
|
||||
def dload():
|
||||
return render_template("downloads.htm", users = getDownloads("drath-public"))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=8080, debug=True)
|
||||
BIN
app/static/fonts/Cantarell-VF.otf
Normal file
BIN
app/static/fonts/Cantarell-VF.otf
Normal file
Binary file not shown.
BIN
app/static/fonts/Cantarell-VF.woff2
Normal file
BIN
app/static/fonts/Cantarell-VF.woff2
Normal file
Binary file not shown.
BIN
app/static/fonts/DejaVuSerif-Bold-webfont.woff
Normal file
BIN
app/static/fonts/DejaVuSerif-Bold-webfont.woff
Normal file
Binary file not shown.
BIN
app/static/fonts/DejaVuSerif-webfont.woff
Normal file
BIN
app/static/fonts/DejaVuSerif-webfont.woff
Normal file
Binary file not shown.
BIN
app/static/images/kroniicopter.webp
Normal file
BIN
app/static/images/kroniicopter.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
app/static/images/stocking.png
Normal file
BIN
app/static/images/stocking.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.7 KiB |
21
app/static/manifest.json
Normal file
21
app/static/manifest.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "Drath's website",
|
||||
"short_name" : "Drath's website",
|
||||
"start_url": "index.htm",
|
||||
"scope" : "./",
|
||||
"icons": [
|
||||
{
|
||||
"src": "./images/stocking.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "./images/stocking.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#f6f5f4",
|
||||
"background_color": "#f6f5f4",
|
||||
"display": "standalone"
|
||||
}
|
||||
40
app/static/scripts/downloadsTable.js
Normal file
40
app/static/scripts/downloadsTable.js
Normal file
@@ -0,0 +1,40 @@
|
||||
function addItem(url) {
|
||||
getFileSize(url, insertRow);
|
||||
}
|
||||
|
||||
async function getFileSize(url, myCallback) {
|
||||
// needs proper cors config
|
||||
var http = new XMLHttpRequest();
|
||||
http.open('HEAD', url, true); // true = Asynchronous
|
||||
http.onreadystatechange = function() {
|
||||
if (this.readyState == this.DONE) {
|
||||
if (this.status === 200) {
|
||||
myCallback(url,parseInt(this.getResponseHeader('content-length')));
|
||||
}
|
||||
}
|
||||
};
|
||||
http.send();
|
||||
}
|
||||
|
||||
function insertRow(url, size) {
|
||||
let table = document.getElementById("table");
|
||||
var newRow = table.insertRow(table.length);
|
||||
|
||||
let suffixes = ["B", "KB", "MB", "GB", "TB"];
|
||||
var sindex = 0;
|
||||
while(size > 1024) {
|
||||
sindex+=1;
|
||||
size/=1024;
|
||||
}
|
||||
|
||||
newRow.insertCell(0).innerHTML = "<a href="+url+" download>"+url.split("/").pop()+"</a>";
|
||||
newRow.insertCell(1).innerHTML = pRound(size) + " " + suffixes[sindex];
|
||||
}
|
||||
|
||||
function pRound(num) {
|
||||
// pretty round
|
||||
mult = Math.ceil(Math.pow(10,3-String(num).split(".",1)[0].length));
|
||||
return Math.round(num*mult)/mult;
|
||||
}
|
||||
|
||||
// thoughts and prayers for everyone working in javascript
|
||||
31
app/static/scripts/randImage.js
Normal file
31
app/static/scripts/randImage.js
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
function randImg() {
|
||||
var arrayImg = new Array();
|
||||
|
||||
arrayImg.push("1605617441753.png");
|
||||
arrayImg.push("1613916651677.png");
|
||||
arrayImg.push("1624171748298.png");
|
||||
arrayImg.push("1628050647008.webp");
|
||||
arrayImg.push("20220301_152225.jpg");
|
||||
arrayImg.push("20220308_211848.jpg");
|
||||
arrayImg.push("20220404_132144.jpg");
|
||||
arrayImg.push("20220404_132233.jpg");
|
||||
arrayImg.push("20220430_093257.jpg");
|
||||
arrayImg.push("20220502_103812.jpg");
|
||||
arrayImg.push("20220509_142239.jpg");
|
||||
arrayImg.push("EuyVfk9XYAEGA-x.jpg");
|
||||
arrayImg.push("FECoZcOWQAQmwd9.jpeg");
|
||||
arrayImg.push("FH5XkuZVkAI8VnL.jpg");
|
||||
arrayImg.push("FHIyMT7X0AowdpZ.png");
|
||||
arrayImg.push("FIQqCbOVcAIjZjY.jpg");
|
||||
arrayImg.push("FSkGFVKacAA8Opl.jpg");
|
||||
arrayImg.push("__kiryu_coco_and_bagpipe_hololive_and_1_more_drawn_by_chain_s__sample-a6b80c5333561d788a328239d51066dc.jpg");
|
||||
arrayImg.push("ahp3YdbjFcPQgwPDiqu4Cg.png");
|
||||
|
||||
var img = arrayImg[ Math.floor( Math.random() * arrayImg.length ) ];
|
||||
document.getElementById('randomImageGoesHere').src = "https://storage.googleapis.com/drath-public/rand/"+img;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
16
app/static/scripts/renault-calculator.js
Normal file
16
app/static/scripts/renault-calculator.js
Normal file
@@ -0,0 +1,16 @@
|
||||
document.getElementById("precode").addEventListener("keyup",code);
|
||||
|
||||
function code() {
|
||||
// lovingly stolen from https://github.com/kpym/autoradio-renault
|
||||
var precode = document.getElementById("precode").value.toUpperCase();
|
||||
|
||||
if (!/^[A-Z]\d{3}$/.test(precode) || precode.startsWith("A0")) { return ''; }
|
||||
|
||||
x = precode.charCodeAt(1) + precode.charCodeAt(0) * 10 - 698;
|
||||
y = precode.charCodeAt(3) + precode.charCodeAt(2) * 10 + x - 528;
|
||||
z = (y*7) % 100;
|
||||
code = Math.floor(z / 10) + (z % 10) * 10 + ((259 % x) % 100) * 100;
|
||||
|
||||
document.getElementById("code").value = code.toString().padStart(4,'0');
|
||||
// document.getElementById('code').innerHTML = code.toString().padStart(4,'0');
|
||||
}
|
||||
25
app/static/scripts/service-worker.js
Normal file
25
app/static/scripts/service-worker.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// we're **progressive** now
|
||||
|
||||
const ASSETS = [
|
||||
"/resources/",
|
||||
"/index.htm",
|
||||
"/secrets/",
|
||||
"/"
|
||||
];
|
||||
|
||||
let cache_name = "SimiCart"; // The string used to identify our cache
|
||||
self.addEventListener("install", event => {
|
||||
console.log("installing...");
|
||||
event.waitUntil(
|
||||
caches
|
||||
.open(cache_name)
|
||||
.then(cache => {
|
||||
return cache.addAll(assets);
|
||||
})
|
||||
.catch(err => console.log(err))
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener("fetch", event => {
|
||||
console.log("You fetched " + event.url);
|
||||
});
|
||||
15
app/static/styles/downloads.css
Normal file
15
app/static/styles/downloads.css
Normal file
@@ -0,0 +1,15 @@
|
||||
body {
|
||||
max-width: 60rem !important;
|
||||
}
|
||||
|
||||
a {
|
||||
font-variation-settings: 'wght' 400 !important;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
font-size: 1.05rem;
|
||||
line-height: 160%;
|
||||
padding: 0.6rem 1.2rem;
|
||||
}
|
||||
20
app/static/styles/fonts.css
Normal file
20
app/static/styles/fonts.css
Normal file
@@ -0,0 +1,20 @@
|
||||
@font-face {
|
||||
font-family: 'dejavu_serifbold';
|
||||
src: url('DejaVuSerif-Bold-webfont.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'dejavu_serif';
|
||||
src: url('DejaVuSerif-webfont.woff') format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Cantarell vf';
|
||||
font-weight: 100 900;
|
||||
font-display: swap;
|
||||
font-style: normal;
|
||||
font-named-instance: 'Regular';
|
||||
src: url('/static/fonts/Cantarell-VF.woff2') format('woff2'),
|
||||
url('/static/fonts/Cantarell-VF.otf') format('opentype');
|
||||
|
||||
}
|
||||
51
app/static/styles/gnomecolors.css
Normal file
51
app/static/styles/gnomecolors.css
Normal file
@@ -0,0 +1,51 @@
|
||||
:root {
|
||||
--rounded-corner: 12px;
|
||||
--gnomeblue: #1c71d8;
|
||||
--blue1: rgb(153,193,241);
|
||||
--blue2: rgb(98,160,234);
|
||||
--blue3: rgb(53,132,228);
|
||||
--blue4: rgb(28,113,216);
|
||||
--blue5: rgb(26,95,180);
|
||||
--green1: rgb(143,240,164);
|
||||
--green2: rgb(87,227,137);
|
||||
--green3: rgb(51,209,122);
|
||||
--green4: rgb(46,194,126);
|
||||
--green5: rgb(38,162,105);
|
||||
--yellow1: rgb(249,240,107);
|
||||
--yellow2: rgb(248,228,92);
|
||||
--yellow3: rgb(246,211,45);
|
||||
--yellow4: rgb(245,194,17);
|
||||
--yellow5: rgb(229,165,10);
|
||||
--orange1: rgb(255,190,111);
|
||||
--orange2: rgb(255,163,72);
|
||||
--orange3: rgb(255,120,0);
|
||||
--orange4: rgb(230,97,0);
|
||||
--orange5: rgb(198,70,0);
|
||||
--red1: rgb(246,97,81);
|
||||
--red2: rgb(237,51,59);
|
||||
--red3: rgb(224,27,36);
|
||||
--red4: rgb(192,28,40);
|
||||
--red5: rgb(165,29,45);
|
||||
--purple1: rgb(220,138,221);
|
||||
--purple2: rgb(192,97,203);
|
||||
--purple3: rgb(145,65,172);
|
||||
--purple4: rgb(129,61,156);
|
||||
--purple5: rgb(97,53,131);
|
||||
--brown1: rgb(205,171,143);
|
||||
--brown2: rgb(181,131,90);
|
||||
--brown3: rgb(152,106,68);
|
||||
--brown4: rgb(134,94,60);
|
||||
--brown5: rgb(99,69,44);
|
||||
--light1: rgb(255,255,255);
|
||||
--light2: rgb(246,245,244);
|
||||
--light3: rgb(222,221,218);
|
||||
--light4: rgb(192,191,188);
|
||||
--light5: rgb(154,153,150);
|
||||
--dark1: rgb(119,118,123);
|
||||
--dark2: rgb(94,92,100);
|
||||
--dark3: rgb(61,56,70);
|
||||
--dark4: rgb(36,31,49);
|
||||
--dark5: rgb(0,0,0);
|
||||
--text: #f6f5f4;
|
||||
--maxwidth: 56rem;
|
||||
}
|
||||
102
app/static/styles/style.css
Normal file
102
app/static/styles/style.css
Normal file
@@ -0,0 +1,102 @@
|
||||
:root {
|
||||
--rounded-corner: 12px;
|
||||
--shade: 220;
|
||||
}
|
||||
|
||||
body {
|
||||
color: hsl(var(--root-hue),80%,20%);
|
||||
background-color: hsl(var(--root-hue),15%,90%);
|
||||
font-size: 18px;
|
||||
max-width: 40rem;
|
||||
font: 1.2rem/1.6 'Cantarell vf', 'Cantarell', sans-serif;
|
||||
padding: 1.5rem 1.1rem;
|
||||
margin: 1rem auto;
|
||||
}
|
||||
|
||||
header {
|
||||
color: hsl(var(--root-hue),100%,20%);
|
||||
}
|
||||
|
||||
a {
|
||||
color: hsl(var(--root-hue),50%,35%);
|
||||
text-decoration: none;
|
||||
font-variation-settings: 'wght' 400;
|
||||
transition: font-variation-settings 200ms, color 150ms;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: hsl(var(--root-hue),75%,50%);
|
||||
text-decoration: underline;
|
||||
font-variation-settings: 'wght' 650;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body {
|
||||
color: hsl(var(--root-hue),40%,85%);
|
||||
background-color: hsl(var(--root-hue),8%,15%);
|
||||
}
|
||||
|
||||
header {
|
||||
color: hsl(var(--root-hue),90%,90%);
|
||||
}
|
||||
|
||||
a {
|
||||
color: hsl(var(--root-hue),30%,60%) !important;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: hsl(var(--root-hue),70%,80%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-variation-settings: 'wght' 900;
|
||||
font-size: 2rem;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
section, aside, footer {
|
||||
margin: 1.5rem auto;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 1.5rem auto;
|
||||
}
|
||||
|
||||
@keyframes annoyingAnimation {
|
||||
/* 0% { font-variation-settings: 'wght' 400; } */
|
||||
50% {
|
||||
font-variation-settings: 'wght' 650;
|
||||
color: hsl(var(--root-hue),75%,50%);
|
||||
|
||||
}
|
||||
100% {
|
||||
font-variation-settings: 'wght' 400;
|
||||
color: hsl(var(--root-hue),70%,35%);
|
||||
}
|
||||
}
|
||||
|
||||
.animate {
|
||||
font-size: 1.4rem;
|
||||
font-variation-settings: 'wght' 400;
|
||||
animation: annoyingAnimation 1s linear infinite;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.rounded {
|
||||
border-radius: var(--rounded-corner);
|
||||
}
|
||||
|
||||
.largeShadow {
|
||||
--xTrans: 0px;
|
||||
--yTrans: 7px;
|
||||
--radius: 20px;
|
||||
--spread: 3px;
|
||||
--alpha: 0.3;
|
||||
-webkit-box-shadow: var(--xTrans) var(--yTrans) var(--radius) var(--spread) hsla(var(--root-hue),35%,30%,var(--alpha));
|
||||
-moz-box-shadow: var(--xTrans) var(--yTrans) var(--radius) var(--spread) hsla(var(--root-hue),35%,30%,var(--alpha));
|
||||
box-shadow: var(--xTrans) var(--yTrans) var(--radius) var(--spread) hsla(var(--root-hue),35%,30%,var(--alpha));
|
||||
}
|
||||
47
app/static/styles/test.css
Normal file
47
app/static/styles/test.css
Normal file
@@ -0,0 +1,47 @@
|
||||
@import url("../resources/gnomecolors.css");
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
padding: 10px 20px;
|
||||
font-size: 1.5rem;
|
||||
font-variation-settings: 'wght' 420; /* heheh */
|
||||
color: rgba(0,0,0,0.75);
|
||||
border-radius: var(--rounded-corner);
|
||||
background-color: rgba(255, 255, 255, 0.4);
|
||||
border: solid rgba(0, 0, 0, 0.75);
|
||||
border-width: 2px;
|
||||
-webkit-backdrop-filter: blur(15px) saturate(1.4) contrast(1.3);
|
||||
backdrop-filter: blur(15px) saturate(1.4) contrast(1.3);
|
||||
|
||||
-webkit-box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.4);
|
||||
box-shadow: 0px 5px 15px 2px rgba(0,0,0,0.4);
|
||||
|
||||
transition: font-variation-settings 150ms, border-width 150ms;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.button {
|
||||
color: rgba(255,255,255,0.75);
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
border: solid rgba(255, 255, 255, 0.75);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.button:hover {
|
||||
border-width: 4px;
|
||||
font-variation-settings: 'wght' 700;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.contCenter {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
40
app/templates/base.htm
Normal file
40
app/templates/base.htm
Normal file
@@ -0,0 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<link rel="icon" type="image/png" href="/static/images/stocking.png" />
|
||||
<link rel="stylesheet" href="/static/styles/style.css" />
|
||||
<link rel="stylesheet" href="/static/styles/fonts.css" />
|
||||
<link rel="manifest" href="/static/manifest.json">
|
||||
<!-- its faster to just inline the stylesheet but its fine -->
|
||||
<script>document.querySelector(':root').style.setProperty('--root-hue', Math.floor(Math.random() * 365));</script>
|
||||
{% block extraHead %}
|
||||
{% endblock %}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<script>
|
||||
if ("serviceWorker" in navigator) {
|
||||
navigator.serviceWorker
|
||||
.register("/static/scripts/service-worker.js")
|
||||
.then(() => console.log("registered service worker!"));
|
||||
}
|
||||
</script>
|
||||
|
||||
<header>
|
||||
<h1>{% block header %}{% endblock %}</h1>
|
||||
</header>
|
||||
|
||||
<div class="center">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
27
app/templates/code-calc.html
Normal file
27
app/templates/code-calc.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.htm" %}
|
||||
|
||||
{% block header %}Renault code calculator{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p>Well, not strictly just Renault. Should work for Citroen and Peugeot as well, probably some models of Dacia too.</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>Security code:</td>
|
||||
<td><input id="precode" type="text" class="form-control"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unlock code:</td>
|
||||
<td><input id="code" type="text" class="form-control" readonly></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>Security code is 4 characters long; one letter followed by three numbers, i.e. A123. It can be found on the label or
|
||||
by pressing 1+6 on an unlocked radio. To enter unlock code, use buttons 1 through 4 on the radio.</p>
|
||||
|
||||
<aside>This calculator won't work if the security code starts with A0. If that's the case for you, godspeed.</aside>
|
||||
|
||||
<script src="/static/scripts/renault-calculator.js"></script>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
27
app/templates/downloads.htm
Normal file
27
app/templates/downloads.htm
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends "base.htm" %}
|
||||
|
||||
{% block header %}Downloads{% endblock %}
|
||||
|
||||
{% block extraHead %}
|
||||
<link rel="stylesheet" href="/static/styles/downloads.css" />
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<table id="data" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Filename</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td><a href="{{ user.url }}">{{ user.name }}</a></td>
|
||||
<td>{{ user.size }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
30
app/templates/index.html
Normal file
30
app/templates/index.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends "base.htm" %}
|
||||
|
||||
{% block header %}drath{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>Now it's a different hue each time you refresh :)</p>
|
||||
|
||||
<img class="rounded largeShadow" src="/static/images/kroniicopter.webp" width=100% alt="GWAK" />
|
||||
|
||||
<div class="center">
|
||||
<a href="https://manga.drath.cc"">manga</a><br>
|
||||
<a href=" https://movies.drath.cc">movies</a><br>
|
||||
<a href="https://cloud.drath.cc">cloud</a><br>
|
||||
<a href="https://grafana.drath.cc">graphs</a><br>
|
||||
<a href="https://storage.googleapis.com/drath-public/clio/ENG/HTM/ENTREE.HTM">clio 3 service manual</a><br>
|
||||
<a href="/codecalc">renault radio unlock codes</a><br>
|
||||
<a href="https://www.youtube.com/user/PewDiePie?sub_confirmation=1">subscribe to pewdiepie</a><br>
|
||||
<div class="animate"><a href="/downloads">>>> FREE DOWNLOADS <<<< /a>
|
||||
</div>
|
||||
<!-- <a href="https://storage.googleapis.com/drath-public/dload/ThinkPad%20W530%20(B156HW01%20V4)%20-%20Digital%20Applications%20(Native%20Gamut)%20-%20Luminance%20120%20-%20Native%20Contrast%20-%20D65.icm">color profile for ur laptop</a><br>
|
||||
<a href="https://storage.googleapis.com/drath-public/dload/ThinkPad%20W530%20(B156HW01%20V4)%20-%20Digital%20Applications%20(sRGB)%20-%20Luminance%20120%20-%20Native%20Contrast%20-%20D65.icm">another color profile</a><br> -->
|
||||
|
||||
<footer>
|
||||
<a href="/secret"><img src="/static/images/stocking.png" width=40px /></a>
|
||||
<p>Also running minecraft at <b>mc.drath.fr</b> (whitelisted) (modded) (real) (pregnant)</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
24
app/templates/secret.html
Normal file
24
app/templates/secret.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "base.htm" %}
|
||||
|
||||
{% block header %}You're not really supposed to be here tbh.{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<a href="../">back to main page</a><br>
|
||||
<a href="/porn/"><img class="rounded largeShadow" width=100% src="{{ imgUrl }}" /></a>
|
||||
<script>randImg()</script>
|
||||
|
||||
<p>
|
||||
It's just like a hub of useful links for me
|
||||
</p>
|
||||
|
||||
<div class="center">
|
||||
<a href="/tests">tests</a><br>
|
||||
<a href="/downloads">downloads</a><br>
|
||||
<a href="intent://com.google.android.googlequicksearchbox/#Intent;scheme=android-app;end">google app</a><br>
|
||||
<a href="intent://com.android.settings/#Intent;scheme=android-app;end">android settings</a><br>
|
||||
<a href="https://console.cloud.google.com/">google cloud console</a><br>
|
||||
<a href="https://domains.google.com/">google domains</a>
|
||||
<a href="https://github.com/elektroencefalografista/drath.fr" alt="heheh">source code for this bs</a>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
30
app/templates/test.html
Normal file
30
app/templates/test.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends "base.htm" %}
|
||||
|
||||
{% block header %}Drath's testing grounds{% endblock %}
|
||||
|
||||
{% block extraHead %}
|
||||
<link rel="stylesheet" href="/static/styles/test.css" />
|
||||
<script src="/static/scripts/randImage.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container">
|
||||
<img class="rounded largeShadow" width=100% id="randomImageGoesHere">
|
||||
<a onclick="randImg()">
|
||||
<div class="button contCenter">click me</div>
|
||||
</a>
|
||||
<script>randImg()</script>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Hover effect looks a lil wobbly if the screen isn't hi-dpi enough.
|
||||
<del>The button is supposed to have a blurred background, doesn't work on Firefox.</del><br>
|
||||
IT WORKS ON FIREFOX<br>
|
||||
Firefox supports FINALLY <i>backdrop-filter</i> since version 103.
|
||||
</p>
|
||||
<a href="/secrets">secrets</a>
|
||||
<a href="/">main page</a>
|
||||
|
||||
{% endblock %}
|
||||
5
requirements.txt
Normal file
5
requirements.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
Flask
|
||||
waitress
|
||||
python-dateutil
|
||||
google-cloud-storage
|
||||
Flask-Minify
|
||||
Reference in New Issue
Block a user