This commit is contained in:
maaa 2024-06-25 22:03:50 +02:00
parent 653ac0a64d
commit 752f240a93
6 changed files with 46 additions and 11 deletions

View File

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>Signup - Burgernotes</title> <title>Homeserver - Burgernotes</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@ -14,12 +14,13 @@
<body> <body>
<img src="/static/img/background.jpg" class="background" alt=""> <img src="/static/img/background.jpg" class="background" alt="">
<div class="inoutdiv"> <div class="inoutdiv">
<h2>Homeserver</h2> <h2>Alternative servers</h2>
<p>Change your Burgernotes homeserver</p> <p>Enter your custom homeserver URL <a href="/">What does this mean?</a></p>
<p id="statusBox">Loading...</p>
<input type="text" value="https://" id="homeserverBox"><br> <span id="inputNameBox" style="margin-right: 5px;color: var(--text-color);">Server URL:</span><input type="text" placeholder="https://example.org" id="homeserverBox"><br>
<button id="changeButton">Change</button><br><br> <button id="changeButton">Change</button><button class="nonimportant" id="backButton">Cancel</button><br><br>
<p id="statusBox">Loading...</p>
<p>Please put in the URL in standard format; https://, http://, etc.</p> <p>Please put in the URL in standard format; https://, http://, etc.</p>
</div> </div>

View File

@ -31,9 +31,9 @@
<button id="signupButton">Next</button> <button id="signupButton">Next</button>
<button id="backButton" class="hidden nonimportant">Back</button> <button id="backButton" class="hidden nonimportant">Back</button>
<button id="opButton" class="nonimportant">Create account</button> <button id="opButton" class="nonimportant">Create account</button>
<br><br><br><br> <br><br>
<div style="display: flex;"><p class="hidden" id="homeserver">Your homeserver is loading... </p><div style="display: flex;flex-direction: column;justify-content: center;"><a class="hidden" href="/homeserver">Change</a></div></div> <div style="display: flex;"><p class="hidden" id="homeserver">Your homeserver is loading... </p><div style="display: flex;flex-direction: column;justify-content: center;"><a class="hidden" href="/homeserver">Change</a></div></div>
<a href="/homeserver/">Change homeserver</a><br><br> <a class="iconbutton" href="/homeserver/"><img src="/static/svg/server.svg"></a><br><br>
<a href="/privacy/">Privacy &amp; Terms</a> <a href="/privacy/">Privacy &amp; Terms</a>
</div> </div>

View File

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>Signup - Burgernotes</title> <title>Create account - Burgernotes</title>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@ -23,7 +23,7 @@
<input id="passwordBox" type="password" placeholder="Password"><br> <input id="passwordBox" type="password" placeholder="Password"><br>
<button id="signupButton">Create account</button><button id="opButton" class="nonimportant">Already have an account</button><br><br> <button id="signupButton">Create account</button><button id="opButton" class="nonimportant">Already have an account</button><br><br>
<div style="display: flex;"><p class="hidden" id="homeserver">Your homeserver is loading... </p><div style="display: flex;flex-direction: column;justify-content: center;"><a class="hidden" href="/homeserver">Change</a></div></div> <div style="display: flex;"><p class="hidden" id="homeserver">Your homeserver is loading... </p><div style="display: flex;flex-direction: column;justify-content: center;"><a class="hidden" href="/homeserver">Change</a></div></div>
<a href="/homeserver/">Change homeserver</a><br><br> <a class="iconbutton" href="/homeserver/"><img src="/static/svg/server.svg"></a>
<a href="/privacy/">Privacy &amp; Terms</a> <a href="/privacy/">Privacy &amp; Terms</a>
</div> </div>
<script type="text/javascript" src="/static/js/signup.js"></script> <script type="text/javascript" src="/static/js/signup.js"></script>

View File

@ -707,6 +707,26 @@ iframe#markdown {
text-align: center; text-align: center;
} }
.inoutdiv .iconbutton {
position: absolute;
right: 15px;
bottom: 15px;
width: 41px;
height: 41px;
border: none;
border-radius: 99px;
transition: 0.125s;
}
.inoutdiv .iconbutton img {
height: 20px;
transform: translateY(10px);
}
.inoutdiv .iconbutton:hover {
background-color: var(--hover-nonimportant-theme-color);
}
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
.inoutdiv { .inoutdiv {
position: absolute; position: absolute;

View File

@ -3,6 +3,7 @@
let homeserverBox = document.getElementById("homeserverBox") let homeserverBox = document.getElementById("homeserverBox")
let statusBox = document.getElementById("statusBox") let statusBox = document.getElementById("statusBox")
let changeButton = document.getElementById("changeButton") let changeButton = document.getElementById("changeButton")
let backButton = document.getElementById("backButton")
let remote = localStorage.getItem("homeserverURL") let remote = localStorage.getItem("homeserverURL")
if (remote == null) { if (remote == null) {
@ -10,7 +11,6 @@ if (remote == null) {
remote = "https://notes.hectabit.org" remote = "https://notes.hectabit.org"
} }
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
statusBox.innerText = "You are currently connected to: " + remote + ". " statusBox.innerText = "You are currently connected to: " + remote + ". "
}); });
@ -66,4 +66,8 @@ changeButton.addEventListener("click", (event) => {
doStuff() doStuff()
}); });
backButton.addEventListener("click", (event) => {
history.back()
});
// @license-end // @license-end

10
static/svg/server.svg Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 7.996094 12 c -0.703125 0 -1.355469 0.371094 -1.714844 0.972656 h -3.285156 c -0.554688 0 -1 0.449219 -1 1 c 0 0.550782 0.445312 1 1 1 h 3.246094 c 0.351562 0.640625 1.023437 1.035156 1.753906 1.039063 c 0.726562 -0.003907 1.398437 -0.398438 1.75 -1.039063 h 3.261718 c 0.550782 0 1 -0.449218 1 -1 c 0 -0.550781 -0.449218 -1 -1 -1 h -3.292968 c -0.363282 -0.601562 -1.015625 -0.972656 -1.71875 -0.972656 z m 0 1 c 0.554687 0 1.003906 0.449219 1.003906 1.007812 c 0 0.554688 -0.449219 1.003907 -1.003906 1.003907 c -0.558594 0 -1.007813 -0.449219 -1.007813 -1.003907 c 0 -0.558593 0.449219 -1.007812 1.007813 -1.007812 z m 0 0"/>
<path d="m 6.992188 10 h 2.007812 v 3 h -2.007812 z m 0 0"/>
<path d="m 11.992188 2 c 1.113281 0 2.007812 0.894531 2.007812 2.007812 v 2.972657 c 0 1.109375 -0.894531 2.003906 -2.007812 2.003906 h -7.984376 c -1.113281 0 -2.007812 -0.894531 -2.007812 -2.003906 v -2.972657 c 0 -1.113281 0.894531 -2.007812 2.007812 -2.007812 z m -11.992188 2.007812 v 2.972657 c 0 2.21875 1.789062 4.003906 4.007812 4.003906 h 7.984376 c 2.21875 0 4.007812 -1.785156 4.007812 -4.003906 v -2.972657 c 0 -2.21875 -1.789062 -4.007812 -4.007812 -4.007812 h -7.984376 c -2.21875 0 -4.007812 1.789062 -4.007812 4.007812 z m 0 0"/>
<path d="m 5 4 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 s -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/>
<path d="m 8 4 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 s -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB