Pārlūkot izejas kodu

Set up the age gate and an index page

master
Fen Dweller pirms 6 gadiem
vecāks
revīzija
871dd6ac44
4 mainītis faili ar 109 papildinājumiem un 7 dzēšanām
  1. +24
    -2
      app.py
  2. +41
    -3
      static/sexy.css
  3. +22
    -2
      templates/age-gate.html
  4. +22
    -0
      templates/index.html

+ 24
- 2
app.py Parādīt failu

@@ -1,4 +1,6 @@
from flask import Flask, render_template
from flask import Flask, render_template, redirect, request
from time import time
from urllib.parse import urlparse

app = Flask(
__name__,
@@ -6,9 +8,29 @@ app = Flask(
static_folder='static/',
template_folder='templates/'
)

@app.route('/')
def index():
return render_template("age-gate.html")
return render_template("index.html")

@app.route('/agegate')
def agegate():
url = request.args.get("to", default="/")
return render_template("age-gate.html", url=url)

@app.route('/accept')
def accept():
url = request.args.get("url", default=None)

if urlparse(url).netloc and urlparse(url).netloc[:-9] != "crux.sexy":
url = "/"

if not url:
url = "/"

res = redirect(url, 307)
res.set_cookie("agegate", "true", time() + 60*60*24*365)
return res

if __name__ == "__main__":
app.run(debug=True, host='0.0.0.0', port=5001)

+ 41
- 3
static/sexy.css Parādīt failu

@@ -56,9 +56,18 @@ body {
background-color: #100d1e;
}

.best {
font-size: 100px;
.box {
margin: 5vw;
flex-wrap: center;
}

.heading {
font-size: 100px;
color: #7991cd;
}

.body {
font-size: 40px;
color: #7991cd;
}

@@ -69,9 +78,38 @@ body {
}

a {
color: #3e3852;
font-size: 40px;
color: #b6acd8;
}

a:hover {
color: #726899;
}

.goodyeet {
color: #7991cd;
background-color: #344b85;
border-width: 3px;
}

.badyeet {
color: #cd7984;
background-color: #752020;
border-width: 3px;
}

@media (min-aspect-ratio: 1/1) {
.button {
width: 15vw;
height: 8vw;
font-size: 3vw;
}
}

@media (max-aspect-ratio: 1/1) {
.button {
width: 50vw;
height: 20vw;
font-size: 10vw;
}
}

+ 22
- 2
templates/age-gate.html Parādīt failu

@@ -2,9 +2,29 @@
<html>
<head>
<title>Age Gate</title>
<link rel="stylesheet" type="text/css" href="best.css">
<link rel="stylesheet" type="text/css" href="sexy.css">
</head>
<body>
<p class="best">OI</p>
<div class="box">
<h1 class="heading">Hold up!</h1>
<br>
<br>
<p class="body">
<div class="body">The material on this site is suitable for adults only, including vore and explicit sexual content</div>
<br>
<div class="body">By entering, you acknowledge that you are:</div>
<br>
<div class="body">...willing to view this content</div>
<div class="body">...aged 18 or older</div>
<br>
</p>
<form action="/accept">
<button class="button goodyeet">Proceed</button>
<input type="hidden" name="url" value="{{url}}">
</form>
<form action="/reject">
<button class="button badyeet">Exit</button>
</form>
</div>
</body>
</html>

+ 22
- 0
templates/index.html Parādīt failu

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title>crux.sexy</title>
<link rel="stylesheet" type="text/css" href="sexy.css">
</head>
<body>
<div class="box">
<h1 class="heading">nothing here yet lol</h1>
<div class="body">Try these games I guess</div>
<br>
<a href="https://stroll.crux.sexy">Stroll</a>
<br>
<a href="https://feast.crux.sexy">Feast</a>
<br>
<a href="https://gorge.crux.sexy">Gorge</a>
<br>
<a href="https://satiate.crux.sexy">Satiate</a>
</div>
</body>
</html>

Notiek ielāde…
Atcelt
Saglabāt