[code, files] added background.png files for login background, added lots of styling for login page, also added new code for login.html for these changes.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
BIN
assets/images/background.png
Normal file
BIN
assets/images/background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 MiB |
151
css/styles.css
151
css/styles.css
@@ -1,4 +1,8 @@
|
||||
/* General styling for project */
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'Roboto';
|
||||
color: black;
|
||||
background-color: white;
|
||||
@@ -20,7 +24,150 @@ h3 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
input[type=text], input[type=submit] {
|
||||
font-family: 'Roboto';
|
||||
/* Styling for login.html */
|
||||
|
||||
.loginContainer {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.loginImage {
|
||||
flex: 8;
|
||||
min-width: 0;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.loginPane {
|
||||
flex: 2;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
justify-content: flex-start;
|
||||
background-color: #ffffff;
|
||||
padding: 40px;
|
||||
padding-top: 40px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.loginHeader, .loginForm {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.loginLogo {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.formGroup {
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.formGroup label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 12px 14px;
|
||||
font-family: 'Roboto';
|
||||
font-size: 1rem;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus {
|
||||
outline: none;
|
||||
border-color: #4285f4;
|
||||
box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
|
||||
}
|
||||
|
||||
input[type="text"]::placeholder,
|
||||
input[type="password"]::placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 100%;
|
||||
padding: 12px 14px;
|
||||
font-family: 'Roboto';
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
color: white;
|
||||
background-color: #4285f4;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s, box-shadow 0.2s;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.submitBtn:hover {
|
||||
background-color: #3367d6;
|
||||
}
|
||||
|
||||
.submitBtn:active {
|
||||
background-color: #2c5aa0;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.submitBtn:focus {
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3);
|
||||
}
|
||||
|
||||
/* Media Queries for project */
|
||||
|
||||
/* Tablet and below */
|
||||
@media (max-width: 768px) {
|
||||
.loginContainer {
|
||||
flex-direction: column;
|
||||
}
|
||||
.loginImage {
|
||||
display: none;
|
||||
}
|
||||
.loginPane {
|
||||
flex: 1;
|
||||
padding: 30px 20px;
|
||||
}
|
||||
.loginHeader {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile devices */
|
||||
@media (max-width: 480px) {
|
||||
.loginPane {
|
||||
padding: 20px 16px;
|
||||
justify-content: flex-start;
|
||||
padding-top: 60px;
|
||||
}
|
||||
.loginHeader h2 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
.loginHeader h3 {
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.loginForm {
|
||||
width: 100%;
|
||||
}
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
.submitBtn {
|
||||
font-size: 16px; /* Prevents zoom on iOS */
|
||||
}
|
||||
}
|
||||
@@ -14,19 +14,34 @@
|
||||
<script src="/app.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="loginPane">
|
||||
<div class="loginHeader">
|
||||
<h2>Login</h2>
|
||||
<h3>Please enter your login credentials below</h3>
|
||||
<div class="loginContainer">
|
||||
<div class="loginImage">
|
||||
<img src="/assets/images/background.png" alt="Oriam Background">
|
||||
</div>
|
||||
<div class="loginForm">
|
||||
<form>
|
||||
<label for="username">Username</label><br>
|
||||
<input type="text" id="username" name="username" placeholder="Enter your username"><br>
|
||||
<label for="password">Password</label><br>
|
||||
<input type="text" id="Password" name="password" placeholder="Enter your password"><br><br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
<div class="loginPane">
|
||||
<div class="loginLogo">
|
||||
<img src="/assets/images/favicon-192x192.png" alt="Kube Logo">
|
||||
<p>Kube is a progressive web application (PWA)
|
||||
coded in HTML, CSS & JS which is used for
|
||||
tracking and optimising club transport.</p>
|
||||
</div>
|
||||
<div class="loginHeader">
|
||||
<h2>Login</h2>
|
||||
<h3>Please enter your login credentials below</h3>
|
||||
</div>
|
||||
<div class="loginForm">
|
||||
<form id="loginForm">
|
||||
<div class="formGroup">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" placeholder="Enter your username" required aria-label="Username input">
|
||||
</div>
|
||||
<div class="formGroup">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" placeholder="Enter your password" required aria-label="Password input">
|
||||
</div>
|
||||
<button type="submit" class="submitBtn">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user