ux: Better responsive design (not great yet)
This commit is contained in:
parent
e32b4bfb82
commit
a2653c9e77
2 changed files with 83 additions and 28 deletions
|
|
@ -2,54 +2,109 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logo {
|
#login-screen {
|
||||||
display: block;
|
|
||||||
max-height: 5rem;
|
|
||||||
max-width: 5rem;
|
|
||||||
height: auto;
|
|
||||||
width: auto;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#center {
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
/* width: 100%; */
|
||||||
|
/* height: 100%; */
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: space-around;
|
align-items: space-around;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
max-width: 250px;
|
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#login-form {
|
#logo {
|
||||||
max-width: 200px;
|
display: block;
|
||||||
|
width: auto;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#login-line {
|
.login-line {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 2rem;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 2.5rem;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#login-line > img {
|
.login-line > input {
|
||||||
width: 1.75rem;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#login-line > input {
|
|
||||||
border-color: rgba(31, 41, 55, 0.2);
|
border-color: rgba(31, 41, 55, 0.2);
|
||||||
border-radius: 8px;
|
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1407px) {
|
||||||
|
#login-screen {
|
||||||
|
font-size: 24pt;
|
||||||
|
gap: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logo {
|
||||||
|
max-width: 25%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line {
|
||||||
|
height: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line > img {
|
||||||
|
height: 3rem;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line > input {
|
||||||
|
width: 40%;
|
||||||
|
height: 4rem;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line > input::placeholder {
|
||||||
|
font-size: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line-input {
|
||||||
|
/* Center the middle of the input relative to the logo. Is that a good idea? */
|
||||||
|
margin-right: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#submit-login {
|
||||||
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 1408px) {
|
||||||
|
#login-screen {
|
||||||
|
max-width: 250px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#logo {
|
||||||
|
max-height: 5rem;
|
||||||
|
max-width: 5rem;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line {
|
||||||
|
height: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line > img {
|
||||||
|
width: 1.75rem;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line > input {
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-line-input {
|
||||||
|
/* Center the middle of the input relative to the logo. Is that a good idea? */
|
||||||
|
margin-right: 1.75rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#submit-login {
|
#submit-login {
|
||||||
width: 100%;
|
|
||||||
background-color: rgb(87, 13, 248);
|
background-color: rgb(87, 13, 248);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<main id="center">
|
<main id="login-screen">
|
||||||
<img src="/assets/img/logo.png" id="logo">
|
<img src="/assets/img/logo.png" id="logo">
|
||||||
{% if login_error == "InvalidCredentials" %}
|
{% if login_error == "InvalidCredentials" %}
|
||||||
<div class="banner is-error">
|
<div class="banner is-error">
|
||||||
|
|
@ -12,15 +12,15 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form method="POST" action="{{ login_url }}">
|
<form method="POST" action="{{ login_url }}">
|
||||||
<div id="login-line">
|
<div class="login-line login-line-input">
|
||||||
<img src="/assets/img/user.svg">
|
<img src="/assets/img/user.svg">
|
||||||
<input type="text" name="username" id="username" placeholder="Username">
|
<input type="text" name="username" id="username" placeholder="Username">
|
||||||
</div>
|
</div>
|
||||||
<div id="login-line">
|
<div class="login-line login-line-input">
|
||||||
<img src="/assets/img/password.svg">
|
<img src="/assets/img/password.svg">
|
||||||
<input type="password" name="password" id="password" placeholder="Password">
|
<input type="password" name="password" id="password" placeholder="Password">
|
||||||
</div>
|
</div>
|
||||||
<div id="login-line">
|
<div class="login-line">
|
||||||
<input type="submit" id="submit-login" value="LOG IN">
|
<input type="submit" id="submit-login" value="LOG IN">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue