feat: Add logos for site info and addresses
All checks were successful
Build Docker / Build SLDs Image (push) Successful in 19s
Build Docker / Build Main Image (push) Successful in 21s

This commit is contained in:
Nathan Woodburn 2023-11-15 22:08:49 +11:00
parent ffc0a2ba9a
commit 5be0abeccd
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
9 changed files with 37 additions and 23 deletions

View File

@ -29,20 +29,32 @@ def render(data,db_object):
hns = db_object['HNS'] hns = db_object['HNS']
btc = db_object['BTC'] btc = db_object['BTC']
eth = db_object['ETH'] eth = db_object['ETH']
if hns != "":
hns = "HNS: " + hns
if btc != "":
btc = "BTC: " + btc
if eth != "":
eth = "ETH: " + eth
bg_colour = db_object['bg_colour'] bg_colour = db_object['bg_colour']
fg_colour = db_object['fg_colour'] fg_colour = db_object['fg_colour']
text_colour = db_object['text_colour'] text_colour = db_object['text_colour']
if (rgb_to_hex(generate_foreground_color(fg_colour)) == ""): if (rgb_to_hex(generate_foreground_color(text_colour)) == "#000000"):
hns_icon = "assets/img/HNSW.png" hns_icon = "assets/img/HNSW.png"
btc_icon = "assets/img/BTCW.png"
eth_icon = "assets/img/ETHW.png"
location_icon = "assets/img/mapw.png"
else: else:
hns_icon = "assets/img/HNS.png" hns_icon = "assets/img/HNS.png"
btc_icon = "assets/img/BTC.png"
eth_icon = "assets/img/ETH.png"
location_icon = "assets/img/map.png"
if hns != "":
hns = "<img src='" + hns_icon + "' width='20px' height='20px' style='margin-right: 5px;'>" + hns
if btc != "":
btc = "<img src='" + btc_icon + "' width='20px' height='25px' style='margin-right: 5px;'>" + btc
if eth != "":
eth = "<img src='" + eth_icon + "' width='20px' height='30px' style='margin-right: 5px;'>" + eth
if hnschat != "":
hnschat = "<img src='"+hns_icon+"' width='20px' height='20px' style='margin-right: 5px;'>" + hnschat
if location != "":
location = "<img src='"+location_icon+"' width='20px' height='30px' style='margin-right: 5px;'>" + location
except Exception as e: except Exception as e:
return "<h1>Invalid data</h1><br><h2>Please contact support</h2><br><p>This can often be fixed by saving your site again in the editor</p><br>" + "<script>console.log('" + str(e).replace('\'','') + "');</script>" return "<h1>Invalid data</h1><br><h2>Please contact support</h2><br><p>This can often be fixed by saving your site again in the editor</p><br>" + "<script>console.log('" + str(e).replace('\'','') + "');</script>"

1
templates/assets/css/city.min.css vendored Normal file
View File

@ -0,0 +1 @@
a{color:inherit}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -14,6 +14,7 @@
<link rel="icon" type="image/png" sizes="670x700" href="assets/img/HNS.png"> <link rel="icon" type="image/png" sizes="670x700" href="assets/img/HNS.png">
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/styles.min.css"> <link rel="stylesheet" href="assets/css/styles.min.css">
<link rel="stylesheet" href="assets/css/city.min.css">
</head> </head>
<body style="height: 99vh;width: 100vw;color: #1fffff;background: #000000;overflow-x: hidden;"> <body style="height: 99vh;width: 100vw;color: #1fffff;background: #000000;overflow-x: hidden;">
@ -21,23 +22,23 @@
<div class="d-xl-flex align-items-xl-center" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-right: 2%;padding-bottom: 2%;width: 40%;display: inline-flex;height: 15em;margin-top: 1%;margin-left: 1%;"><img src="{{avatar}}" width="200vw" height="200vw" style="border-radius: 50%;"> <div class="d-xl-flex align-items-xl-center" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-right: 2%;padding-bottom: 2%;width: 40%;display: inline-flex;height: 15em;margin-top: 1%;margin-left: 1%;"><img src="{{avatar}}" width="200vw" height="200vw" style="border-radius: 50%;">
<div style="margin-left: 40px;"> <div style="margin-left: 40px;">
<div> <div>
<p style="font-size: 24px;">{{hnschat}}</p> <p style="font-size: 24px;"><a href="https://hns.chat/#message:{{hnschat}}" target="_blank">{{hnschat|safe}}</a></p>
</div> </div>
<div> <div>
<p style="font-size: 24px;">{{location}}</p> <p style="font-size: 24px;">{{location|safe}}</p>
</div> </div>
</div> </div>
</div> </div>
<div class="d-xl-flex align-items-xl-center right-align top-align" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-bottom: 2%;width: 50%;position: absolute;padding-right: 2%;display: inline-flex;height: 15em;"> <div class="d-xl-flex align-items-xl-center right-align top-align" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-bottom: 2%;width: 50%;position: absolute;padding-right: 2%;display: inline-flex;height: 15em;">
<div style="display: inline-block;"> <div style="display: inline-block;">
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{hns}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/HNS" target="_blank">{{hns|safe}}</a></p>
</div> </div>
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{btc}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/BTC" target="_blank">{{btc|safe}}</a></p>
</div> </div>
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{eth}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/ETH" target="_blank">{{eth|safe}}</a></p>
</div> </div>
</div> </div>
</div> </div>
@ -47,23 +48,23 @@
<div style="width: 20vw;height: 20vw;max-height: 200px;max-width: 200px;margin: auto;"><img src="{{avatar}}" width="100%" height="100%" style="border-radius: 50%;"></div> <div style="width: 20vw;height: 20vw;max-height: 200px;max-width: 200px;margin: auto;"><img src="{{avatar}}" width="100%" height="100%" style="border-radius: 50%;"></div>
<div class="text-center"> <div class="text-center">
<div> <div>
<p style="font-size: 24px;">{{hnschat}}</p> <p style="font-size: 24px;">{{hnschat|safe}}</p>
</div> </div>
<div> <div>
<p style="font-size: 24px;">{{location}}</p> <p style="font-size: 24px;">{{location|safe}}</p>
</div> </div>
</div> </div>
</div> </div>
<div class="d-xl-flex align-items-xl-center right-align top-align" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-bottom: 2%;width: 50%;position: absolute;padding-right: 2%;display: inline-flex;height: 15em;"> <div class="d-xl-flex align-items-xl-center right-align top-align" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-bottom: 2%;width: 50%;position: absolute;padding-right: 2%;display: inline-flex;height: 15em;">
<div style="display: inline-block;"> <div style="display: inline-block;">
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{hns}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/HNS" target="_blank">{{hns|safe}}</a></p>
</div> </div>
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{btc}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/BTC" target="_blank">{{btc|safe}}</a></p>
</div> </div>
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{eth}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/ETH">{{eth|safe}}</a></p>
</div> </div>
</div> </div>
</div> </div>
@ -73,23 +74,23 @@
<div style="width: 20vw;height: 20vw;display: inline-block;"><img src="{{avatar}}" width="100%" height="100%" style="border-radius: 50%;"></div> <div style="width: 20vw;height: 20vw;display: inline-block;"><img src="{{avatar}}" width="100%" height="100%" style="border-radius: 50%;"></div>
<div style="display: inline-block;margin-left: 40px;"> <div style="display: inline-block;margin-left: 40px;">
<div> <div>
<p style="font-size: 24px;">{{hnschat}}</p> <p style="font-size: 24px;">{{hnschat|safe}}</p>
</div> </div>
<div> <div>
<p style="font-size: 24px;">{{location}}</p> <p style="font-size: 24px;">{{location|safe}}</p>
</div> </div>
</div> </div>
</div> </div>
<div class="d-xl-flex align-items-xl-center" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-bottom: 2%;padding-right: 2%;display: inline-flex;margin: 1%;width: 98%;"> <div class="d-xl-flex align-items-xl-center" style="background: #f1ffff;border-radius: 10px;padding-top: 2%;padding-left: 2%;padding-bottom: 2%;padding-right: 2%;display: inline-flex;margin: 1%;width: 98%;">
<div style="display: inline-block;"> <div style="display: inline-block;">
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{hns}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/HNS" target="_blank">{{hns|safe}}</a></p>
</div> </div>
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{btc}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/BTC" target="_blank">{{btc|safe}}</a></p>
</div> </div>
<div> <div>
<p style="font-size: 24px;margin-bottom: 0px;">{{eth}}</p> <p style="font-size: 24px;margin-bottom: 0px;"><a href="/.well-known/wallets/ETH" target="_blank">{{eth|safe}}</a></p>
</div> </div>
</div> </div>
</div> </div>