From 6ba6121988dae019d4c4c0a3b8592b443f094065 Mon Sep 17 00:00:00 2001 From: retoor Date: Fri, 24 Jan 2025 15:20:35 +0100 Subject: [PATCH] CSS. --- src/snek/form/login.py | 1 + src/snek/static/html-frame.js | 4 +--- src/snek/static/style.css | 29 ++++++++++++++++++----------- src/snek/templates/about.html | 5 ++++- src/snek/templates/login.html | 2 +- src/snek/templates/register.html | 2 ++ 6 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/snek/form/login.py b/src/snek/form/login.py index a87f7d3..910cd73 100644 --- a/src/snek/form/login.py +++ b/src/snek/form/login.py @@ -21,4 +21,5 @@ class LoginForm(Form): text="Login", type="button" ) + diff --git a/src/snek/static/html-frame.js b/src/snek/static/html-frame.js index 0d5d4c9..75f800e 100644 --- a/src/snek/static/html-frame.js +++ b/src/snek/static/html-frame.js @@ -30,9 +30,7 @@ class HTMLFrame extends HTMLElement { const parent = this const markdownElement = document.createElement('div') markdownElement.innerHTML = html - document.body.appendChild(markdownElement) - //parent.parentElement.appendChild(markdownElement) - + this.outerHTML = html }else{ this.container.innerHTML = html; } diff --git a/src/snek/static/style.css b/src/snek/static/style.css index 008a3ee..d2cda8c 100644 --- a/src/snek/static/style.css +++ b/src/snek/static/style.css @@ -1,18 +1,18 @@ * { - margin: 0; - padding: 0; + box-sizing: border-box; } -.center { + .dialog { + + background-color: #0f0f0f; + border-radius: 10px; padding: 30px; - - text-align: center; - margin: auto auto; - left: 25%; - position: absolute; - } + width: 800px; + margin: 30px; + box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); +} @media screen and (max-width: 500px) { .center { @@ -34,8 +34,15 @@ h2 { margin-bottom: 20px; } body { - background-color: #000; - color: #efefef; + font-family: Arial, sans-serif; + background-color: #1a1a1a; + color: #e6e6e6; + line-height: 1.5; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + min-height: 100vh; } div { diff --git a/src/snek/templates/about.html b/src/snek/templates/about.html index debba2a..b68396e 100644 --- a/src/snek/templates/about.html +++ b/src/snek/templates/about.html @@ -1,7 +1,10 @@ {% extends "base.html" %} {% block main %} +
+ - + +
{% endblock %} \ No newline at end of file diff --git a/src/snek/templates/login.html b/src/snek/templates/login.html index 2fe1a73..3e72928 100644 --- a/src/snek/templates/login.html +++ b/src/snek/templates/login.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block main %} - + {% endblock %} diff --git a/src/snek/templates/register.html b/src/snek/templates/register.html index 3668f13..b1540ea 100644 --- a/src/snek/templates/register.html +++ b/src/snek/templates/register.html @@ -1,5 +1,7 @@ {% extends "base.html" %} {% block main %} + + {% endblock %} \ No newline at end of file