feat: Add alternative tlds to account page
This commit is contained in:
parent
3c6829826f
commit
5a8d185837
6
main.py
6
main.py
@ -602,6 +602,7 @@ def catch_all(path):
|
||||
account_link = "login"
|
||||
account_link_name = "Login"
|
||||
site = "Null"
|
||||
sld = ""
|
||||
domain = ""
|
||||
tribe_title = "Join a tribe"
|
||||
tribe_link = "tribe"
|
||||
@ -621,6 +622,7 @@ def catch_all(path):
|
||||
account_link = "account"
|
||||
account_link_name = "Account"
|
||||
site = user['domain'] + "." + CITY_DOMAIN
|
||||
sld = user['domain']
|
||||
# Check if user owns tribe
|
||||
tribeData = db.get_user_owned_tribe(user['domain'])
|
||||
if len(tribeData) > 0:
|
||||
@ -638,14 +640,14 @@ def catch_all(path):
|
||||
if os.path.isfile('templates/' + path):
|
||||
return render_template(path,account=account,account_link=account_link,
|
||||
account_link_name=account_link_name,site=site,
|
||||
CITY_DOMAIN=CITY_DOMAIN,domain=domain,
|
||||
CITY_DOMAIN=CITY_DOMAIN,domain=domain,sld=sld,
|
||||
tribe_title=tribe_title,tribe_link=tribe_link)
|
||||
|
||||
# Try with .html
|
||||
if os.path.isfile('templates/' + path + '.html'):
|
||||
return render_template(path + '.html',account=account,account_link=account_link,
|
||||
account_link_name=account_link_name,site=site,
|
||||
CITY_DOMAIN=CITY_DOMAIN,domain=domain,
|
||||
CITY_DOMAIN=CITY_DOMAIN,domain=domain,sld=sld,
|
||||
tribe_title=tribe_title,tribe_link=tribe_link)
|
||||
return redirect('/') # 404 catch all
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
</section>
|
||||
<section style="margin-top: 50px;text-align: center;">
|
||||
<h1>Welcome to ShakeCities</h1>
|
||||
<p>Congratulations your site is ready for use.<br><br></p>
|
||||
<p>Congratulations your site is ready for use.<br>Your site is available at {{sld}}.shakecities/ {{sld}}.shakec/ & {{sld}}.onsc/<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;" target="_blank">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="/{{tribe_link}}" style="display: block;margin: 10px;">{{tribe_title}}</a><a class="btn btn-primary" role="button" href="/hnschat" style="display: block;margin: 10px;">Link HNSChat</a><a class="btn btn-primary" role="button" href="/logout" style="display: block;margin: 10px;">Logout</a></div>
|
||||
</section>
|
||||
<section style="margin: 20px;height: 40px;text-align: center;margin-top: 40px;">
|
||||
|
Loading…
Reference in New Issue
Block a user