fix: Page without image
This commit is contained in:
parent
986f14f8e8
commit
c7888d790f
@ -92,11 +92,14 @@ def site(data, injectSSL = False):
|
|||||||
ssl = ''
|
ssl = ''
|
||||||
if injectSSL:
|
if injectSSL:
|
||||||
ssl = '<script src="https://nathan.woodburn/https.js" async=""></script>'
|
ssl = '<script src="https://nathan.woodburn/https.js" async=""></script>'
|
||||||
|
page = "page.html"
|
||||||
html = render_template('page.html', title=title, links=links, image=image,
|
if data['image'] == "":
|
||||||
|
page = "page_no_image.html"
|
||||||
|
html = render_template(page, title=title, links=links, image=image,
|
||||||
bg_0=data['bg_0'], bg_1=data['bg_1'], fg_0=data['fg_0'],
|
bg_0=data['bg_0'], bg_1=data['bg_1'], fg_0=data['fg_0'],
|
||||||
btn_bg=data['btn_bg'], btn_fg=data['btn_fg'],
|
btn_bg=data['btn_bg'], btn_fg=data['btn_fg'],
|
||||||
socials=socials, addresses=addresses + ssl)
|
socials=socials, addresses=addresses + ssl)
|
||||||
|
if data['image'] != "":
|
||||||
html = html.replace('/assets/img/favicon.png',f'/avatar/{data["image"]}')
|
html = html.replace('/assets/img/favicon.png',f'/avatar/{data["image"]}')
|
||||||
return html
|
return html
|
||||||
|
|
||||||
|
57
templates/page_no_image.html
Normal file
57
templates/page_no_image.html
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html data-bs-theme="light" lang="en" style="text-align: center;">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
|
||||||
|
<title>{{title}}</title>
|
||||||
|
<meta name="twitter:title" content="{{title}}">
|
||||||
|
<meta property="og:title" content="{{title}}">
|
||||||
|
<meta name="description" content="{{title}}">
|
||||||
|
<meta property="og:description" content="{{title}}">
|
||||||
|
<meta name="twitter:description" content="{{title}}">
|
||||||
|
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
|
||||||
|
<link rel="icon" type="image/png" sizes="600x627" href="/assets/img/favicon.png">
|
||||||
|
<link rel="stylesheet" href="/assets/bootstrap/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&display=swap">
|
||||||
|
<link rel="stylesheet" href="/assets/css/styles.min.css">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body style="background: transparent;">
|
||||||
|
<div style="border-radius: 20px;">
|
||||||
|
<h1 style="margin-top: 125px;">{{title}}</h1> <div class="addresses">
|
||||||
|
{{addresses|safe}}
|
||||||
|
</div>
|
||||||
|
<!-- <div style="height:25px;"></div> --> <div class="social-div">
|
||||||
|
<ul class="list-unstyled social-list">
|
||||||
|
{{socials|safe}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div style="height:25px;"></div><style>
|
||||||
|
.custom-button:hover {
|
||||||
|
background-color: {{btn_fg}} !important;
|
||||||
|
color: {{btn_bg}} !important;
|
||||||
|
}
|
||||||
|
html {
|
||||||
|
background: linear-gradient({{bg_0}} 0%, {{bg_1}} 100%); color:{{fg_0}};"
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{{links|safe}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="/assets/js/jquery.min.js"></script>
|
||||||
|
<script src="/assets/bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
<script src="https://auth.varo.domains/v1"></script>
|
||||||
|
<script src="/assets/js/script.min.js"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -118,6 +118,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<p>You need to add these records to your domain after publishing your site</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<footer class="bg-dark">
|
<footer class="bg-dark">
|
||||||
|
Loading…
Reference in New Issue
Block a user