feat: Finish adding v2 layout
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 20s
Build Docker / Build Main Image (push) Successful in 22s

This commit is contained in:
Nathan Woodburn 2023-11-15 16:24:56 +11:00
parent 3ed4f24e7e
commit eaa4075a39
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
6 changed files with 63 additions and 20 deletions

20
main.py
View File

@ -100,6 +100,10 @@ def edit():
hns = "" hns = ""
btc = "" btc = ""
eth = "" eth = ""
hnschat = ""
location = ""
avatar = ""
bg_colour = ""
if 'data' in data: if 'data' in data:
html = data['data'].encode('utf-8').decode('unicode-escape') html = data['data'].encode('utf-8').decode('unicode-escape')
@ -109,8 +113,18 @@ def edit():
btc = data['BTC'] btc = data['BTC']
if 'ETH' in data: if 'ETH' in data:
eth = data['ETH'] eth = data['ETH']
if 'hnschat' in data:
hnschat = data['hnschat']
if 'location' in data:
location = data['location']
if 'avatar' in data:
avatar = data['avatar']
if 'bg_colour' in data:
bg_colour = data['bg_colour']
return render_template('edit.html',account=user['email'],account_link="account",account_link_name="Account",data=html,hns=hns,btc=btc,eth=eth) return render_template('edit.html',account=user['email'],account_link="account",account_link_name="Account",data=html,
hns=hns,btc=btc,eth=eth,hnschat=hnschat,location=location,avatar=avatar,
bg_colour=bg_colour,CITY_DOMAIN=CITY_DOMAIN,domain=user['domain'])
@app.route('/edit', methods=['POST']) @app.route('/edit', methods=['POST'])
@ -132,6 +146,10 @@ def send_edit():
data['HNS'] = request.form['hns'] data['HNS'] = request.form['hns']
data['BTC'] = request.form['btc'] data['BTC'] = request.form['btc']
data['ETH'] = request.form['eth'] data['ETH'] = request.form['eth']
data['hnschat'] = request.form['hnschat']
data['location'] = request.form['location']
data['avatar'] = request.form['avatar']
data['bg_colour'] = request.form['bg_colour']
# Convert to json # Convert to json
data = json.dumps(data) data = json.dumps(data)

View File

@ -27,6 +27,11 @@
<p>Congratulations your site is ready for use.<br><br></p> <p>Congratulations your site is ready for use.<br><br></p>
<div style="max-width: 10em;margin: auto;"><a class="btn btn-primary" role="button" href="https://{{site}}" style="display: block;margin: 10px;">Visit your site</a><a class="btn btn-primary" role="button" href="/edit" style="display: block;margin: 10px;">Edit your site</a><a class="btn btn-primary" role="button" href="/logout" style="display: block;margin: 10px;">Logout</a></div> <div style="max-width: 10em;margin: auto;"><a class="btn btn-primary" role="button" href="https://{{site}}" style="display: block;margin: 10px;">Visit your site</a><a class="btn btn-primary" role="button" href="/edit" style="display: block;margin: 10px;">Edit your site</a><a class="btn btn-primary" role="button" href="/logout" style="display: block;margin: 10px;">Logout</a></div>
</section> </section>
<section style="margin: 20px;height: 40px;text-align: center;margin-top: 40px;">
<div>
<p style="color: #ffffff;">Copyright © ShakeCities 2023</p>
</div>
</section>
<script src="assets/bootstrap/js/bootstrap.min.js"></script> <script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/script.min.js"></script> <script src="assets/js/script.min.js"></script>
</body> </body>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html data-bs-theme="light" lang="en"> <html data-bs-theme="light" lang="en" style="background: #000000;">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
@ -9,27 +9,32 @@
<link rel="stylesheet" href="assets/css/styles.min.css"> <link rel="stylesheet" href="assets/css/styles.min.css">
</head> </head>
<body> <body style="background: #000000;color: #ffffff;">
<nav class="navbar navbar-expand-md bg-dark py-3" data-bs-theme="dark"> <section>
<div class="container"><a class="navbar-brand d-flex align-items-center" href="/"><span class="bs-icon-sm bs-icon-rounded bs-icon-primary d-flex justify-content-center align-items-center me-2 bs-icon"><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 16 16" class="bi bi-bezier"> <section style="height: 15vh;background: url(&quot;assets/img/alexander-slattery-LI748t0BK8w-unsplash.webp&quot;) bottom / cover no-repeat;min-height: 130px;"></section>
<path fill-rule="evenodd" d="M0 10.5A1.5 1.5 0 0 1 1.5 9h1A1.5 1.5 0 0 1 4 10.5v1A1.5 1.5 0 0 1 2.5 13h-1A1.5 1.5 0 0 1 0 11.5v-1zm1.5-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1zm10.5.5A1.5 1.5 0 0 1 13.5 9h1a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5h-1a1.5 1.5 0 0 1-1.5-1.5v-1zm1.5-.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1zM6 4.5A1.5 1.5 0 0 1 7.5 3h1A1.5 1.5 0 0 1 10 4.5v1A1.5 1.5 0 0 1 8.5 7h-1A1.5 1.5 0 0 1 6 5.5v-1zM7.5 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5h-1z"></path> <section class="d-print-none d-lg-none d-xl-none d-xxl-none" style="width: 30vw;border-radius: 50%;background: #000000;padding: 20px;height: 30vw;margin: auto;margin-top: -15vw;display: flex;"><img class="img-fluid" src="assets/img/HNSW.png" width="100%"></section>
<path d="M6 4.5H1.866a1 1 0 1 0 0 1h2.668A6.517 6.517 0 0 0 1.814 9H2.5c.123 0 .244.015.358.043a5.517 5.517 0 0 1 3.185-3.185A1.503 1.503 0 0 1 6 5.5v-1zm3.957 1.358A1.5 1.5 0 0 0 10 5.5v-1h4.134a1 1 0 1 1 0 1h-2.668a6.517 6.517 0 0 1 2.72 3.5H13.5c-.123 0-.243.015-.358.043a5.517 5.517 0 0 0-3.185-3.185z"></path> <section class="d-print-none d-lg-none d-xl-none d-xxl-none" style="display: block;width: 100%;text-align: center;margin-top: 10px;">
</svg></span><span>Brand</span></a><button data-bs-toggle="collapse" class="navbar-toggler" data-bs-target="#navcol-6"><span class="visually-hidden">Toggle navigation</span><span class="navbar-toggler-icon"></span></button> <div style="display: inline-block;margin: auto;"><a class="btn btn-primary" role="button" style="margin: 10px;" href="/signup">Create your page</a><a class="btn btn-primary" role="button" style="margin: 10px;" href="/{{account_link}}">{{account}}</a></div>
<div class="collapse navbar-collapse flex-grow-0 order-md-first" id="navcol-6"> </section>
<ul class="navbar-nav me-auto"> <section class="d-none d-print-block d-lg-block d-xl-block d-xxl-block" style="display: block;">
<li class="nav-item"><a class="nav-link active" href="/signup">Create your page</a></li> <div style="width: 100%;text-align: right;margin-top: -4em;"><a class="btn btn-primary" role="button" style="margin: 10px;" href="/signup">Create a new page</a><a class="btn btn-primary" role="button" style="margin: 10px;" href="/{{account_link}}">{{account_link_name}}</a></div>
<li class="nav-item"><a class="nav-link" href="/edit">Edit your page</a></li> </section>
</ul> <section class="d-none d-print-block d-lg-block d-xl-block d-xxl-block" style="width: 15vw;border-radius: 50%;background: #000000;padding: 20px;height: 15vw;margin: auto;display: flex;margin-top: -6vw;"><img class="img-fluid" src="assets/img/HNSW.png" width="100%"></section>
<div class="d-md-none my-2"><button class="btn btn-light me-2" type="button">Button</button><button class="btn btn-primary" type="button">Button</button></div> <section class="d-none d-print-block d-lg-block d-xl-block d-xxl-block" style="height: 3em;"></section>
</div> </section>
<div class="d-none d-md-block"><a class="btn btn-primary" role="button" href="/account">{{account}}</a></div>
</div>
</nav>
<section style="margin-top: 50px;"> <section style="margin-top: 50px;">
<h1 style="text-align: center;">Edit your page</h1> <h1 style="text-align: center;margin-bottom: 30px;">Edit your page</h1>
</section> </section>
<section style="width: 80%;margin: auto;"> <section style="width: 80%;margin: auto;">
<form method="post"><textarea class="form-control form-control-lg" rows="25" name="data" placeholder="Website data">{{data}}</textarea><input class="form-control" type="text" style="margin-top: 10px;" placeholder="HNS Address" name="hns" value="{{hns}}"><input class="form-control" type="text" style="margin-top: 10px;" name="btc" placeholder="BTC Address" value="{{btc}}"><input class="form-control" type="text" style="margin-top: 10px;" placeholder="ETH Address" name="eth" value="{{eth}}"><input class="btn btn-primary" type="submit" style="margin-top: 10px;"></form> <form method="post"><input class="form-control" type="text" style="margin-top: 10px;" name="avatar" value="{{avatar}}" placeholder="Avatar URL"><input class="form-control" type="text" style="margin-top: 10px;" name="location" value="{{location}}" placeholder="Location"><input class="form-control" type="text" style="margin-top: 10px;" name="hnschat" placeholder="HNSChat" value="{{hnschat}}">
<div class="d-xl-flex justify-content-xl-center align-items-xl-center" style="margin-bottom: 10px;margin-top: 10px;"><label class="form-label" style="display: inline-block;margin-right: 15px;">Background colour&nbsp;</label><input class="form-control form-control-color" type="color" style="display: inline-block;border-radius: 50%;width: 50px;height: 50px;" name="bg_colour" value="{{bg_colour}}"></div><textarea class="form-control form-control-lg" rows="15" name="data" placeholder="HTML Content">{{data}}</textarea><input class="form-control" type="text" style="margin-top: 10px;" placeholder="HNS Address" name="hns" value="{{hns}}"><input class="form-control" type="text" style="margin-top: 10px;" name="btc" placeholder="BTC Address" value="{{btc}}"><input class="form-control" type="text" style="margin-top: 10px;" placeholder="ETH Address" name="eth" value="{{eth}}">
<div style="text-align: center;"><input class="btn btn-primary" type="submit" style="margin-top: 10px;"></div>
</form>
</section>
<section style="margin: 20px;height: 40px;text-align: center;margin-top: 40px;">
<div>
<p style="color: #ffffff;">Copyright © ShakeCities 2023</p>
</div>
</section> </section>
<script src="assets/bootstrap/js/bootstrap.min.js"></script> <script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/script.min.js"></script> <script src="assets/js/script.min.js"></script>

View File

@ -71,6 +71,11 @@
</div> </div>
</section> </section>
</section> </section>
<section style="margin: 20px;height: 40px;text-align: center;margin-top: 40px;">
<div>
<p style="color: #ffffff;">Copyright © ShakeCities 2023</p>
</div>
</section>
<script src="assets/bootstrap/js/bootstrap.min.js"></script> <script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/script.min.js"></script> <script src="assets/js/script.min.js"></script>
</body> </body>

View File

@ -30,6 +30,11 @@
<form style="width: 80%;margin: auto;text-align: right;margin-top: 20px;" method="post"><input class="form-control" type="email" style="margin: auto;width: 100%;margin-top: 10px;" placeholder="email" name="email" required=""><input class="form-control" type="password" style="margin: auto;width: 100%;margin-top: 10px;" name="password" placeholder="Password" required="" minlength="6"><input class="btn btn-primary" type="submit" style="margin-top: 10px;"></form> <form style="width: 80%;margin: auto;text-align: right;margin-top: 20px;" method="post"><input class="form-control" type="email" style="margin: auto;width: 100%;margin-top: 10px;" placeholder="email" name="email" required=""><input class="form-control" type="password" style="margin: auto;width: 100%;margin-top: 10px;" name="password" placeholder="Password" required="" minlength="6"><input class="btn btn-primary" type="submit" style="margin-top: 10px;"></form>
</div> </div>
</section> </section>
<section style="margin: 20px;height: 40px;text-align: center;margin-top: 40px;">
<div>
<p style="color: #ffffff;">Copyright © ShakeCities 2023</p>
</div>
</section>
<script src="assets/bootstrap/js/bootstrap.min.js"></script> <script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/script.min.js"></script> <script src="assets/js/script.min.js"></script>
</body> </body>

View File

@ -32,6 +32,11 @@
</form> </form>
</div> </div>
</section> </section>
<section style="margin: 20px;height: 40px;text-align: center;margin-top: 40px;">
<div>
<p style="color: #ffffff;">Copyright © ShakeCities 2023</p>
</div>
</section>
<script src="assets/bootstrap/js/bootstrap.min.js"></script> <script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/script.min.js"></script> <script src="assets/js/script.min.js"></script>
</body> </body>