Additional code clean up and login page stylizations
This commit is contained in:
@@ -5,9 +5,27 @@
|
||||
top: 150px; /* Adjust this value as needed */
|
||||
right: 20px; /* Adjust this value as needed */
|
||||
z-index: 10;
|
||||
background-color: white;
|
||||
background: linear-gradient(to bottom, white, rgb(245, 245, 245), rgb(227, 227, 227)); /* Gradient from white to gray */
|
||||
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
|
||||
border: 1px solid gray;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#login-submit {
|
||||
padding: 5px 10px;
|
||||
background-color: red;
|
||||
border-color: red;
|
||||
|
||||
border: 1px solid red;
|
||||
border-radius: 8px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#login-submit:hover {
|
||||
background-color: darkred;
|
||||
border-color: darkred;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,6 +31,16 @@
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
#user {
|
||||
width: 25px;
|
||||
transition: width 0.3s ease; /* Adding transition for smooth effect */
|
||||
}
|
||||
|
||||
#user:hover {
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
|
||||
#line {
|
||||
height: 100%; /* spans the entire height of the navigation bar */
|
||||
width: 10px;
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
// Function to render login.hbs when #user is clicked
|
||||
function renderLogin() {
|
||||
// Assuming you're using jQuery
|
||||
$('#user').on('click', function() {
|
||||
// Load the login.hbs template content using AJAX
|
||||
res.render('/login');
|
||||
});
|
||||
}
|
||||
|
||||
// Call the function to enable rendering login.hbs
|
||||
renderLogin();
|
||||
$(document).ready(function() {
|
||||
// When #user is clicked
|
||||
$('#user').click(function() {
|
||||
// Toggle the visibility of the login container
|
||||
$('#login-container').toggle();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
<button type="submit" id="login-submit">Submit</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div id="user" class="d-sm-flex">
|
||||
<img src="img/navigation-bar/user.png" alt="Your Image" class="img-fluid" style="width: 30px;">
|
||||
<img src="img/navigation-bar/user.png" alt="Your Image" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -51,15 +51,5 @@
|
||||
{{> navigation-bar/login}}
|
||||
</div>
|
||||
|
||||
<!-- JavaScript to handle click event -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// When #user is clicked
|
||||
$('#user').click(function() {
|
||||
// Toggle the visibility of the login container
|
||||
$('#login-container').toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user