diff --git a/src/snek/static/generic-form.js b/src/snek/static/generic-form.js index 319d7d3..be4b327 100644 --- a/src/snek/static/generic-form.js +++ b/src/snek/static/generic-form.js @@ -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); \ No newline at end of file +customElements.define('generic-form', GenericForm); diff --git a/src/snek/static/style.css b/src/snek/static/style.css index 0661225..f10f780 100644 --- a/src/snek/static/style.css +++ b/src/snek/static/style.css @@ -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; -} \ No newline at end of file +} diff --git a/src/snek/templates/index.html b/src/snek/templates/index.html index ffbd5bc..a1e8894 100644 --- a/src/snek/templates/index.html +++ b/src/snek/templates/index.html @@ -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> diff --git a/src/snek/view/login.py b/src/snek/view/login.py index be79328..fe8cf4d 100644 --- a/src/snek/view/login.py +++ b/src/snek/view/login.py @@ -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") diff --git a/src/snek/view/register.py b/src/snek/view/register.py index 7fbce9d..96eed8a 100644 --- a/src/snek/view/register.py +++ b/src/snek/view/register.py @@ -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")