streamline index.html

This commit is contained in:
holger krekel
2023-12-02 00:41:36 +01:00
parent 2d5eb86776
commit 7b3c1d5ab9
2 changed files with 12 additions and 20 deletions

View File

@@ -17,13 +17,6 @@ def gen_qr_png_data(maildomain):
def gen_qr(maildomain, url):
info = f"{maildomain} invite code"
steps = (
"1. Install https://get.delta.chat\n"
"2. On setup screen scan above invite QR code\n"
"3. Choose nickname & avatar\n"
"+ chat with any e-mail address ...\n"
)
# load QR code
qr = qrcode.QRCode(
version=1,
@@ -47,11 +40,10 @@ def gen_qr(maildomain, url):
font_size = 16
font = ImageFont.truetype(font=ttf_path, size=font_size)
num_lines = (info + steps).count("\n") + 3
num_lines = (info).count("\n") + 1
size = width = 384
qr_padding = 6
text_margin_right = 12
text_height = font_size * num_lines
height = size + text_height + qr_padding * 2
@@ -70,13 +62,6 @@ def gen_qr(maildomain, url):
draw.multiline_text(
(info_pos, size - qr_padding // 2), info, font=font, fill="black", align="right"
)
draw.multiline_text(
(text_margin_right, height - text_height + font_size * 1.0),
steps,
font=font,
fill="black",
align="left",
)
# paste QR code
image.paste(

View File

@@ -4,17 +4,24 @@
<head>
<meta charset="utf-8" />
<title>chatmail instance</title>
</style>
</head>
<body>
<h1>Welcome to {{ config.mail_domain }}!</h1>
<h2>Tap or Scan this invite code to setup an account for Delta Chat app</h2>
<h2>Getting started</h2>
<ol>
<li>Install <a href="https://get.delta.chat">https://get.delta.chat</a></li>
<li>Scan or Tap on the invite QR code</li>
<li>Choose Nickname and Avatar</li>
<li>Use QR code invites and scans to setup end-to-end encrypted communication
with any e-mail address</li>
</ol>
<a href="DCACCOUNT:https://{{ config.mail_domain }}/cgi-bin/newemail.py">
<img class="section" src="qrcode.png" />
</a>
<h2>Properties / Constraints</h2>
<h2>Constraints</h2>
<ul>
<li>Un-encrypted mails can not leave the chat-mail domain.</li>
<li>You can not send un-encrypted mails to anyone outside {{config.mail_domain }} </li>
<li>Use <a href="https://delta.chat/en/help#howtoe2ee">
guaranteed end-to-end encryption via QR code scans</a>
to setup contact with users outside of the chat-mail instance.