Comparison

mod_invites_page/html/client.html @ 4094:dd00a2b9927c

mod_invites_page: New module to generate landing page for invites
author Matthew Wild <mwild1@gmail.com>
date Fri, 11 Sep 2020 13:52:32 +0100
child 4132:36795f773faf
comparison
equal deleted inserted replaced
4093:a2116f5a7c8f 4094:dd00a2b9927c
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Invite to {site_name}</title>
7 <link rel="stylesheet" href="/share/bootstrap4/css/bootstrap.min.css">
8 <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
9 <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
10 <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
11 <link rel="manifest" href="/site.webmanifest">
12 <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
13 <meta name="msapplication-TileColor" content="#fbd308">
14 <meta name="theme-color" content="#fbd308">
15 </head>
16 <body>
17 <div id="background" class="fixed-top overflow-hidden" aria-role="none presentation"></div>
18 <div id="form" class="container col-md-10 col-md-offset-1 col-sm-8 col-sm-offset-2 col-lg-10 col-lg-offset-1 mt-2 mt-md-5">
19 <div class="card rounded-lg shadow">
20 <h1 class="card-header rounded-lg rounded-lg">
21 Join {site_name} with {app.name}<br/>
22 </h1>
23 <div class="card-body">
24 <div id="qr-button-container" class="float-right w-25 border border-info p-3 d-none">
25 <strong>Tip:</strong> You can open this invite
26 on your mobile device by scanning a barcode with
27 your camera.
28 <a href="#qr-modal" class="mt-2 d-block" id="qr-modal-show">
29 <button class="btn btn-secondary" title="Send this invite to your device"
30 data-toggle="modal" data-target="#qr-modal">
31 <img src="{static}/qr-logo.png" class="align-middle h-50 mt-1" style="display:inline" >
32 Scan with mobile device
33 </button>
34 </a>
35 </div>
36
37 {inviter?<p>You have been invited to chat on {site_name} using XMPP,
38 a secure and decentralized messaging network.</p>}
39
40 {inviter&<p>You have been invited to chat with {inviter} on {site_name},
41 part of the XMPP secure and decentralized messaging network.</p>}
42
43 <p>You can start chatting right away with {app.name}. Let's get started!</p>
44
45 <div class="card m-3 client-card {app.platforms#app-platform-{item|lower|classname} } flex-wrap col-sm-12 col-md-8 col-lg-5">
46 <div class="row no-gutters h-100">
47 <div class="col-md-4">
48 <img src="{app.image|relurl}" class="p-2 img-fluid" alt="{app.imagetext?}">
49 </div>
50 <div class="col-md-8 h-100">
51 <div class="card-body d-flex flex-column h-100">
52 <h5 class="card-title text-nowrap mb-1">{app.name}</h5>
53 <div>
54 {app.platforms#<span class="badge badge-info client-platform-badge client-platform-badge-{item|lower|classname} mr-1 mb-3">{item}</span> }
55 </div>
56 <p class="card-text">{app.text}</p>
57 <!-- <a href="{app.link}" class="btn btn-primary mt-md-auto">Install</a> -->
58 </div>
59 </div>
60 </div>
61 </div>
62
63 <h3 style="clear:both">Step 1: Install {app.name}</h3>
64
65 <p>{app.download.text?Download·and·install·{app.name}·below:}</p>
66
67 <div class="ml-5">
68 {app.download.buttons#
69 {item.image&
70 <a href="{item.url}" {item.target&target="{item.target}"} rel="noopener">
71 <img src="{item.image}" {item.alttext&alt="{item.alttext}"}>
72 </a>
73 }
74 {item.text&
75 <a href="{item.url}" {item.target&target="{item.target}"} rel="noopener">
76 <button class="btn btn-primary">
77 {item.text}
78 </button>
79 </a>
80 }
81 }
82 </div>
83
84 <p class="mt-3">After successfully installing {app.name}, come back to this page and <strong>continue with Step 2</strong>.</p>
85
86 <h3>Step 2: Activate your account</h3>
87
88 <p>Installed ok? Great! <strong>Click or tap the button below</strong> to accept your invite and continue with your account setup:</p>
89
90 <div>
91 <a href="{uri}" id="uri-cta"><button class="btn btn-primary ml-5 mt-1 mb-3">Accept invite using {app.name}</button></a><br/>
92 </div>
93
94 <p>After clicking the button you will be taken to {app.name} to finish setting up your new {site_name} account.</p>
95 </div>
96 </div>
97 </div>
98
99 <div class="modal" tabindex="-1" role="dialog" id="qr-modal">
100 <div class="modal-dialog" role="document">
101 <div class="modal-content">
102 <div class="modal-header">
103 <h5 class="modal-title">Scan invite code</h5>
104 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
105 <span aria-hidden="true">&times;</span>
106 </button>
107 </div>
108 <div class="modal-body">
109 <p>You can transfer this invite to your mobile device by scanning a code with your camera.</p>
110 <div id="qr-info-url" class="tab-pane show active">
111 <p>Use a <em>QR code</em> scanner on your mobile device to scan the code below:</p>
112 <div id="qr-invite-page" class="w-50 p-1 mx-auto"></div>
113 </div>
114 <div class="modal-footer">
115 <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
116 </div>
117 </div>
118 </div>
119 </div>
120
121 <script src="/share/jquery/jquery.min.js"></script>
122 <script src="/share/bootstrap4/js/bootstrap.min.js"></script>
123 <script src="{static}/qrcode.min.js"></script>
124 <script type="text/javascript">
125 $(function () {
126 // If QR lib loaded ok, show QR button on desktop devices
127 if(window.QRCode) {
128 $('#qr-modal').one('show.bs.modal', function (e) {
129 new QRCode(document.getElementById("qr-invite-page"), document.location.href);
130 });
131 $('#qr-button-container').addClass("d-md-block");
132 }
133 });
134 </script>
135 </body>
136 </html>