Upated for phone.

This commit is contained in:
retoor 2025-04-01 21:06:07 +02:00
parent fbd4fa4e66
commit d24627b35f
5 changed files with 21 additions and 7 deletions

View File

@ -266,7 +266,6 @@ class GenericForm extends HTMLElement {
}
div {
background-color: #0f0f0f;
border-radius: 10px;
padding: 30px;
width: 400px;
@ -429,4 +428,4 @@ class GenericForm extends HTMLElement {
}
}
customElements.define('generic-form', GenericForm);
customElements.define('generic-form', GenericForm);

View File

@ -4,13 +4,16 @@
box-sizing: border-box;
}
body {
background-color: #000;
}
.dialog {
background-color: #0f0f0f;
border-radius: 10px;
padding: 30px;
width: 800px;
width: 600px;
margin: 30px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}
@ -40,7 +43,6 @@ h2 {
}
body {
font-family: Arial, sans-serif;
background-color: #1a1a1a;
color: #e6e6e6;
line-height: 1.5;
display: flex;
@ -53,4 +55,4 @@ body {
div {
text-align: left;
}
}

View File

@ -5,7 +5,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Snek chat by Molodetz</title>
<link rel="stylesheet" href="generic-form.css">
<link rel="stylesheet" href="register__.css">
<link rel="stylesheet" href="base.css">
<style>
.registration-container {
max-width: 300px;
margin: 20px auto;
padding: 20px;
}
</style>
<script src="/fancy-button.js"></script>
<script defer src="https://umami.molodetz.nl/script.js" data-website-id="d127c3e4-dc70-4041-a1c8-bcc32c2492ea"></script>
</head>
@ -14,9 +21,11 @@
<h1>Snek</h1>
<p style="padding-bottom:20px">Rocket Chat got bloated, too commercialized,
So Snek came through, lean and optimized.</p>
<div style="text-align: center;">
<fancy-button url="/login.html" text="Login"></fancy-button>
<span style="padding:10px;">OR</span>
<fancy-button url="/register.html" text="Register"></fancy-button>
</div>
</div>
</body>
</html>

View File

@ -15,6 +15,8 @@ from snek.system.view import BaseFormView
class LoginView(BaseFormView):
form = LoginForm
login_required = False
async def get(self):
if self.session.get("logged_in"):
return web.HTTPFound("/web.html")

View File

@ -15,6 +15,8 @@ from snek.system.view import BaseFormView
class RegisterView(BaseFormView):
form = RegisterForm
login_required = False
async def get(self):
if self.session.get("logged_in"):
return web.HTTPFound("/web.html")