diff --git a/sites/website.py b/sites/website.py index 8d5104d..02a3f88 100644 --- a/sites/website.py +++ b/sites/website.py @@ -56,21 +56,35 @@ def render(data,db_object): hns_icon = "assets/img/HNSW.png" btc_icon = "assets/img/BTCW.png" eth_icon = "assets/img/ETHW.png" + hns_icon_invert = "assets/img/HNS.png" + btc_icon_invert = "assets/img/BTC.png" + eth_icon_invert = "assets/img/ETH.png" location_icon = "assets/img/mapw.png" email_icon = "assets/img/emailw.png" else: hns_icon = "assets/img/HNS.png" btc_icon = "assets/img/BTC.png" eth_icon = "assets/img/ETH.png" + hns_icon_invert = "assets/img/HNSW.png" + btc_icon_invert = "assets/img/BTCW.png" + eth_icon_invert = "assets/img/ETHW.png" location_icon = "assets/img/map.png" email_icon = "assets/img/email.png" - + hns_address = hns + btc_address = btc + eth_address = eth if hns != "": hns = "" + hns if btc != "": btc = "" + btc if eth != "": eth = "" + eth + if hns != "": + hns_invert = "" + hns_address + if btc != "": + btc_invert = "" + btc_address + if eth != "": + eth_invert = "" + eth_address hide_addresses = False if hns == "" and btc == "" and eth == "": @@ -95,17 +109,14 @@ def render(data,db_object): template = db_object['template'] footer = render_template_string(FOOTER,main_domain=main_domain,fg_colour=fg_colour,hns_icon=hns_icon) - if hide_addresses: - return render_template_string(get_template(template,True),bg_colour=bg_colour,text_colour=text_colour, - fg_colour=fg_colour, avatar=avatar,main_domain=main_domain, - hnschat=hnschat,email=email,location=location, hns_icon=hns_icon, - hns=hns,btc=btc,eth=eth, data=html,footer=footer) - else: - return render_template_string(get_template(template),bg_colour=bg_colour,text_colour=text_colour, - fg_colour=fg_colour, avatar=avatar,main_domain=main_domain, - hnschat=hnschat,email=email,location=location, hns_icon=hns_icon, - hns=hns,btc=btc,eth=eth, data=html,footer=footer) - + return render_template_string(get_template(template,hide_addresses),bg_colour=bg_colour,text_colour=text_colour, + fg_colour=fg_colour, avatar=avatar,main_domain=main_domain, + hnschat=hnschat,email=email,location=location, hns_icon=hns_icon, + hns=hns,btc=btc,eth=eth,hns_invert=hns_invert,btc_invert=btc_invert, + eth_invert=eth_invert,hns_address=hns_address,btc_address=btc_address,eth_address=eth_address, + hns_icon_invert=hns_icon_invert,btc_icon=btc_icon,btc_icon_invert=btc_icon_invert, + eth_icon=eth_icon,eth_icon_invert=eth_icon_invert, + data=html,footer=footer) except Exception as e: return redirect("https://" + main_domain + '/empty_site?error='+str(e)) diff --git a/template.py b/template.py index 788542b..bccf8a0 100644 --- a/template.py +++ b/template.py @@ -12,9 +12,9 @@ db_object = { 'hnschat':"nathan.woodburn", 'location': "Australia", 'email': "test@email", - 'HNS': "hs1...", - 'BTC': "bc1...", - 'ETH' : "0x...", + 'HNS': "hs1qh7c98nexsrzwrmnh2avved6awe59jzpr3xx2xf", + 'BTC': "bc1qhs94zzcw64qnwq4hvk056rwxwvgrkd7tq7d4xw", + 'ETH' : "0x6cB4B39bEc23a921C9a20D061Bf17d4640B0d39e", 'bg_colour': "#000000", 'fg_colour': "#ffffff", 'text_colour': "#152D45", @@ -46,6 +46,12 @@ def send_assets(path): return send_from_directory('templates/assets', path) +@app.route('/.well-known/wallets/') +def send_wallets(path): + if path in db_object: + return db_object[path] + else: + return "Not found" if __name__ == "__main__": # Get second arg