shii.moe

Source for `shii.moe' website.
git clone git://git.knutsen.co/shii.moe
Log | Files | Refs

commit 44213dff4857b672c1426bc89bf99f3dd9c30ac4
Author: Shiimoe <SameulFrost@tuta.io>
Date:   Sun, 13 Sep 2020 18:14:42 +0100

init

Diffstat:
A.gitignore | 3+++
AUntitled.png | 0
Abackground.jpg | 0
Abooks.html | 32++++++++++++++++++++++++++++++++
Aclassical.jpg | 0
Acomments.json | 18++++++++++++++++++
Aemo7.png | 0
Agita.jpg | 0
Aimage.js | 3+++
Aindex.html | 42++++++++++++++++++++++++++++++++++++++++++
Amascots/1.png | 0
Amascots/2.png | 0
Amascots/3.png | 0
Amascots/4.png | 0
Amascots/5.png | 0
Amascots/6.png | 0
Amascots/7.png | 0
Amascots/7_1.png | 0
Amascots/8.png | 0
Amascots/9.png | 0
Amaths.pdf | 0
Amusic.html | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Amy favourite things_8.jpg | 0
Anorsk.html | 35+++++++++++++++++++++++++++++++++++
Anorsk.png | 0
Ario.mp3 | 0
Aschool.html | 32++++++++++++++++++++++++++++++++
Aserver.py | 50++++++++++++++++++++++++++++++++++++++++++++++++++
Astart.sh | 7+++++++
Astop.sh | 7+++++++
Astyle.css | 142+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atemplates/guestbook.html | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ayui.png | 0
33 files changed, 499 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,3 @@ +__pycache__/ +*.pyc +desktop.ini diff --git a/Untitled.png b/Untitled.png Binary files differ. diff --git a/background.jpg b/background.jpg Binary files differ. diff --git a/books.html b/books.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <title>Shimo!!</title> + <link rel='stylesheet' type='text/css' href="style.css"/> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> + <div id="content"> + + <a href="/"><h1>Bøker!!</h1></a> + + <div class="titleBar"> + <div class="titleButton"><a href="/music">Musik</a></div> + <div class="titleButton"><a href="/school">Skole</a></div> + <div class="titleButton"><a href="/norsk">Norsk</a></div> + <div class="titleButton"><a href="/">Hjem</a></div> + </div> + + <p><em>The Trial?</em> more like <em>The Smile</em>, because it makes me happy + when I read it (✿◡‿◡)</p> + <p>Har du lest <em>Stoner</em>? Du har ikke? Slutt å les dette og begynn å lese det i stedet for!</p> + + </div> + + <img src="mascots/1.png" id="mascot"></img> + <script src="image.js"></script> +</body> +</html>+ \ No newline at end of file diff --git a/classical.jpg b/classical.jpg Binary files differ. diff --git a/comments.json b/comments.json @@ -0,0 +1,17 @@ +[ + { + "name": "samuel", + "comment": "I love you <3", + "date": "2020-09-13 14:22" + }, + { + "name": "big chungus", + "comment": "I hate niggers", + "date": "1970-01-01 00:01" + }, + { + "name": "shimo", + "comment": "am I null?", + "date": "2020-09-13 03:31" + } +]+ \ No newline at end of file diff --git a/emo7.png b/emo7.png Binary files differ. diff --git a/gita.jpg b/gita.jpg Binary files differ. diff --git a/image.js b/image.js @@ -0,0 +1,2 @@ +const mascot = document.getElementById("mascot"); +mascot.setAttribute("src", "/mascots/" + Math.floor(1 + Math.random()*9) + ".png");+ \ No newline at end of file diff --git a/index.html b/index.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <title>Shimo!!</title> + <link rel='stylesheet' type='text/css' href="style.css"/> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> + <div id="content"> + + <h1>Shimo!!</h1> + + <div class="titleBar"> + <div class="titleButton"><a href="/music">Musik</a></div> + <div class="titleButton"><a href="/school">Skole</a></div> + <div class="titleButton"><a href="/norsk">Norsk</a></div> + <div class="titleButton"><a href="/books">Bøker</a></div> + </div> + + <p>Hei, jeg heter Shimo, jeg studerer fysikk og kjemi på universitet. + Jeg liker å lese (favoritten min er Kafka) og spile gitar. + Waifuen min er Yui, selvfølgelig. + </p> + + <h2>Sign the <a href="/guestbook"><u>guestbook!!</u></a></h2> + + <h3>Reasons why women should sleep with me</h3> + <ol> + <li>I'm 6'</li> + <li>I'm white</li> + <li>My Mum says I'm cool</li> + <li>I'll give you kisses</li> + </ol> + </div> + + <img src="mascots/1.png" id="mascot"></img> + <script src="image.js"></script> +</body> +</html>+ \ No newline at end of file diff --git a/mascots/1.png b/mascots/1.png Binary files differ. diff --git a/mascots/2.png b/mascots/2.png Binary files differ. diff --git a/mascots/3.png b/mascots/3.png Binary files differ. diff --git a/mascots/4.png b/mascots/4.png Binary files differ. diff --git a/mascots/5.png b/mascots/5.png Binary files differ. diff --git a/mascots/6.png b/mascots/6.png Binary files differ. diff --git a/mascots/7.png b/mascots/7.png Binary files differ. diff --git a/mascots/7_1.png b/mascots/7_1.png Binary files differ. diff --git a/mascots/8.png b/mascots/8.png Binary files differ. diff --git a/mascots/9.png b/mascots/9.png Binary files differ. diff --git a/maths.pdf b/maths.pdf Binary files differ. diff --git a/music.html b/music.html @@ -0,0 +1,56 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <title>Musik!!</title> + <link rel='stylesheet' type='text/css' href="style.css"/> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> + <div id="content"> + <a href="/"><h1>Musik!!</h1></a> + + <div class="titleBar"> + <div class="titleButton"><a href="/">Hjem</a></div> + <div class="titleButton"><a href="/school">Skole</a></div> + <div class="titleButton"><a href="/norsk">Norsk</a></div> + <div class="titleButton"><a href="/books">Bøker</a></div> + </div> + + <div class="guitarAudio"> + <audio controls s> + <source src="https://0x0.st/iiEl.mp3" type="audio/mpeg"> + </audio> + </div> + + + <div class = "guitarCentre"> + <img src="gita.jpg" class="guitarPicture"> + <p class="guitarText">A recording of Lemon Meringue Tie by Dance Gavin Dance played on my Epiphone Les Paul, coming + through an Orange Crush 20 with a Boss DS-1 for distortion. + </p> + <p class="guitarText">Et opptak av <em>Lemon Merginue Tie</em> av <em>Dance Gavin Dance</em> spillet + på <em>Epiphone Les Paul</em>en min, gjennom en <em>Orange Crush 20</em> med en <em>Boss DS-1</em> + for forvrengning.</p> + </div> + + <div class ="guitarAudio"> + <audio controls s class="audio"> + <source src="rio.mp3" type="audio/mpeg"> + </audio> + </div> + + <div class = "guitarCentre"> + <img src="classical.jpg" class="guitarPicture"> + <p class="guitarText">Dette musikkstykket heter <em>Rio by Night</em> av <em>Vincent Lindsey-Clark</em>, det er veldig + enkel, men det er gøy å spille.</p> + </div> + + + </div> + + <img src="mascots/1.png" id="mascot"></img> + <script src="image.js"></script> +</body> +</html>+ \ No newline at end of file diff --git a/my favourite things_8.jpg b/my favourite things_8.jpg Binary files differ. diff --git a/norsk.html b/norsk.html @@ -0,0 +1,34 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <title>Shimo!!</title> + <link rel='stylesheet' type='text/css' href="style.css"/> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> + <div id="content"> + + <a href="/"><h1>Norsk!!</h1></a> + + <div class="titleBar"> + <div class="titleButton"><a href="/music">Musik</a></div> + <div class="titleButton"><a href="/school">Skole</a></div> + <div class="titleButton"><a href="/">Hjem</a></div> + <div class="titleButton"><a href="/books">Bøker</a></div> + </div> + + <p>Hei, kjæresten min er Norsk, han prøver å lære meg Norsk, men det går ikke veldigt bra. + Jeg laget dette i GIMP mange år siden. + </p> + + <img src="norsk.png" style="width: 100%; padding-top: 2em;"> + + </div> + + <img src="mascots/1.png" id="mascot"></img> + <script src="image.js"></script> + +</body> +</html>+ \ No newline at end of file diff --git a/norsk.png b/norsk.png Binary files differ. diff --git a/rio.mp3 b/rio.mp3 Binary files differ. diff --git a/school.html b/school.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <title>Shimo!!</title> + <link rel='stylesheet' type='text/css' href="style.css"/> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> + <div id="content"> + + <a href="/"><h1>Skole!!</h1></a> + + <div class="titleBar"> + <div class="titleButton"><a href="/music">Musik</a></div> + <div class="titleButton"><a href="/">Hjem</a></div> + <div class="titleButton"><a href="/norsk">Norsk</a></div> + <div class="titleButton"><a href="/books">Bøker</a></div> + </div> + + <h3 style="text-align: center;">Maths</h3> + + <iframe src="maths.pdf" width="100%" height="900pt"></iframe> + + </div> + + <img src="mascots/1.png" id="mascot"></img> + <script src="image.js"></script> +</body> +</html>+ \ No newline at end of file diff --git a/server.py b/server.py @@ -0,0 +1,49 @@ +from flask import Flask, render_template, send_from_directory, request, redirect +from datetime import datetime +from os import path +app = Flask(__name__, static_url_path="", static_folder="./") + +import json + +COMMENT_FILE = "comments.json" +DATE_FORMAT = "%Y-%m-%d %H:%M" + +@app.route('/') +def home(): + return send_from_directory('./', 'index.html') + +@app.route('/guestbook') +def guestbook(): + comments = None + with open(COMMENT_FILE, 'r') as f: + comments = json.load(f) + return render_template('guestbook.html', comments=reversed(comments)) + +@app.route('/postcomment', methods=['POST']) +def postcomment(): + name = request.form['name'] + comment = request.form['comment'] + date = datetime.now() + + comments = None + with open(COMMENT_FILE, 'r') as f: + comments = json.load(f) + + comments.append({ + 'name': name, + 'comment': comment, + 'date': datetime.strftime(date, DATE_FORMAT) + }) + + with open(COMMENT_FILE, 'w') as f: + json.dump(comments, f, indent=4, separators=(",", ": ")) + + return redirect('/guestbook', code=302) + + +@app.route('/<p>') +def serve_static(p): + print("testets") + if path.exists(p + '.html'): + return send_from_directory('./', p + '.html') + return send_from_directory('./', p)+ \ No newline at end of file diff --git a/start.sh b/start.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +FLASK_APP=server.py flask run +echo "$!" > ./.pid + +echo "Shii.moe is online!"+ \ No newline at end of file diff --git a/stop.sh b/stop.sh @@ -0,0 +1,6 @@ +[ ! -f ./.pid ] && { echo "pid does not exist."; exit 1; } + +PID="$(cat ./.pid)" +kill "$PID" + +echo "Shii.moe is offline."+ \ No newline at end of file diff --git a/style.css b/style.css @@ -0,0 +1,141 @@ +@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400;1,600&display=swap'); + +::selection { + background: pink; /* WebKit/Blink Browsers */ + color: white; + } + ::-moz-selection { + background: pink; /* Gecko Browsers */ + color: white; + } + + +html, body { + padding: 0; + margin: 0; + min-height: 100%; +} + +body { + color: black; + background: black; + background-image: url('Untitled.png'); + background-repeat: repeat; + font-family: 'Lora', serif; + + max-width: 800px; + margin-left: auto; + margin-right: auto; +} + +.titleBar { + background-color: #e999e947; + border-radius: 5pt; + box-shadow: 0 4pt 22pt #0000003b; + border: 1pt solid violet; + margin-left: 5em; + margin-right: 5em; + margin-bottom: 2em; + text-align: center; + padding-top: 0.75em; + padding-bottom: 0.90em; + display: block; +} + +.titleButton { + background-color: lightpink; + display: inline-block; + margin: 0.3em 0.3em; + padding: 0.12em 0.3em; + box-shadow: 0.3em 0.3em 0 #00000030; + transition: 0.3s; + font-size: 20pt; + width: 12.5% +} +.titleButton:hover { + box-shadow: 0.4em 0.4em 3pt #00000030; +} + +#content { + /* background-color: #f7d4ff80; */ + padding: 1em; + min-height: calc(100vh - 2em); + padding-bottom: 20em; +} + +.guitarCentre { + overflow: auto; +} + +.guitarAudio { + display: block; + text-align: center; + padding-bottom: 2em; +} + +.guitarPicture { + width:30em; + float: right; + padding-left: 2em; +} + +.audio { + padding-top: 2em; +} + +#mascot { + height: 20em; + position: fixed; + bottom:0em; + right:0; + opacity: .85; +} + + +@media only screen and (max-width: 724px) { + .guitarText { + font-family: 'Lora', serif; + padding-right: 1em; + padding-left: 1em; + } + + .guitarPicture { + display: block; + margin-left: auto; + margin-right: auto; + padding-left: 0em; + float: none; + max-width: 100%; + } + + .titleButton { + width: 50% + } + + .comment-input { + width: 80%; + height: 5em; + } + + #mascot { + height: 10em; + } + + #content { + padding-bottom: 10em; + } +} + +h1 { + color: black; + text-align: center; +} + +li { + font-size: large; +} + +a { + text-decoration: none; + color: inherit; +}+ \ No newline at end of file diff --git a/templates/guestbook.html b/templates/guestbook.html @@ -0,0 +1,71 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <title>Shimo!!</title> + <link rel='stylesheet' type='text/css' href="style.css"/> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> +</head> +<body> + <div id="content"> + + <a href="/"><h1>Shimo!!</h1></a> + + <div class="titleBar"> + <div class="titleButton"><a href="/music">Musik</a></div> + <div class="titleButton"><a href="/school">Skole</a></div> + <div class="titleButton"><a href="/norsk">Norsk</a></div> + <div class="titleButton"><a href="/books">Bøker</a></div> + </div> + + <form action="/postcomment" method="POST"> + <input class="name-input" name="name" placeholder="Your name" required> + <br> + <textarea class="comment-input" name="comment" placeholder="Your comment" required></textarea> + <br> + <input type="submit" value="Submit"> + </form> + <!-- add gender radio boxes (femboy) --> + + {% if comments %} + <div class="comments"> + {% for comment in comments %} + <div class="comment"> + <span class="name">{{ comment['name'] }}</span><span class="date">{{ comment['date'] }}</span> + <br> + <p class="comment-text" style="font-size: 120%;">{{ comment['comment'] }}</p> + </div> + <hr> + {% endfor %} + </div> + {% else %} + <p>No comments to display :(</p> + {% endif %} + + <img src="mascots/1.png" id="mascot"></img> + <script src="image.js"></script> + <style> + .name { + float: left; + } + .date { + float: right; + } + .comment-text { + clear: left; + } + .comments { + margin-top: 3em; + } + .comment-input { + width: 30%; + height: 8em; + font-family: 'Lora', serif; + } + .name-input { + font-family: 'Lora', serif; + } + </style> +</body> +</html> diff --git a/yui.png b/yui.png Binary files differ.