Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kemsguy7 committed Apr 5, 2024
1 parent 03ea981 commit f3f3fdb
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 68 deletions.
2 changes: 1 addition & 1 deletion prototype/Frontend/user_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
<div class="d-flex">
<!-- Add icon for back to home -->
<a href="user_dashboard.html" class="sidebar-link" data-text="Dashboard">
<i class="fas fa-home"></i>
<i class="fa-solid fa-gauge"></i>
<span class="sidebar-text">Dashboard</span>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion prototype/Frontend/user_notifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
<div class="d-flex">
<!-- Add icon for back to home -->
<a href="user_dashboard.html" class="sidebar-link" data-text="Dashboard">
<i class="fas fa-home"></i>
<i class="fa-solid fa-gauge"></i>
<span class="sidebar-text">Dashboard</span>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion prototype/Frontend/user_replies.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
<div class="d-flex">
<!-- Add icon for back to home -->
<a href="user_dashboard.html" class="sidebar-link" data-text="Dashboard">
<i class="fas fa-home"></i>
<i class="fa-solid fa-gauge"></i>
<span class="sidebar-text">Dashboard</span>
</a>
</div>
Expand Down
4 changes: 1 addition & 3 deletions prototype/Frontend/user_view_comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<link rel="stylesheet" href="/public/css/user_dashboard.css">
<link rel="stylesheet" href="/public/css/index.css">


<!-- Font Awesome CDN -->
<link
rel="stylesheet"
Expand Down Expand Up @@ -64,7 +63,6 @@
width: 6rem !important;
height: 2.2rem !important;
background-color: #2b83f3;

}

</style>
Expand Down Expand Up @@ -202,7 +200,7 @@
<div class="d-flex">
<!-- Add icon for back to home -->
<a href="user_dashboard.html" class="sidebar-link" data-text="Dashboard">
<i class="fas fa-home"></i>
<i class="fa-solid fa-gauge"></i>
<span class="sidebar-text">Dashboard</span>
</a>
</div>
Expand Down
33 changes: 16 additions & 17 deletions public/css/user_dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ body {
#header {
width: 100%;
z-index: 1000;
transition: all 0.5s;
padding: 15px 0;
}

.content-area {
Expand Down Expand Up @@ -195,11 +197,7 @@ body {
}
}

#header {
transition: all 0.5s;
z-index: 997;
padding: 15px 0;
}


.acme-regular {
font-family: "Acme", sans-serif;
Expand Down Expand Up @@ -373,14 +371,6 @@ body {
visibility: visible;
}

/* .btn-primary{
width: 0 !important;
background: var(--bg-blue);
border: 1px solid black;
color: #000;
} */


@media (max-width: 1366px) {
.navbar .dropdown .dropdown ul {
left: -90%;
Expand Down Expand Up @@ -521,13 +511,18 @@ body {
/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/

aside {
position: relative;
}


#sidebar {
top: 60px; /* Change this value as needed */
top: 60px;
left: 0;
width: 70px;
padding-top: 1rem;
min-width: 70px;
position: sticky; /* Change position to fixed */
position: fixed;
height: 100vh;
transition: all .25s ease-in-out;
background-color: #92e3a9;
Expand Down Expand Up @@ -687,6 +682,8 @@ a.sidebar-link:hover {
/* Main Area Starts Here */
.content {
background-color: whitesmoke;
position: relative;
margin-left: 4rem;
}

.fa-regular {
Expand Down Expand Up @@ -779,6 +776,8 @@ table.table {


#footer {
position: relative;
padding-left: 4.35rem;
font-size: 14px;
background:var(--girl);

Expand Down Expand Up @@ -908,6 +907,7 @@ table.table {
}

#footer .copyright {
margin-left: 2rem;
float: left;
}

Expand All @@ -921,7 +921,6 @@ table.table {
}

@media (max-width: 768px) {

#sidebar.expand {
width: 150px;
min-width: 260px;
Expand Down
45 changes: 0 additions & 45 deletions public/javascripts/user_dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,48 +99,3 @@ hamBurger.addEventListener("click", function () {
setDefaultMode();




// // Get the sidebar element
// const sidebar = document.getElementById('sidebar');

// // Add a scroll event listener to the window
// window.addEventListener('scroll', () => {
// // Calculate the distance from the top of the document to the bottom of the viewport
// const distanceToBottom = document.documentElement.scrollHeight - window.innerHeight - window.scrollY;

// // Define the margin for pushing the sidebar down
// const margin = '3rem';

// // If the distance to the bottom of the page is less than a threshold (e.g., 50 pixels)
// // add margin to the top of the sidebar to push it down
// if (distanceToBottom <= 50) {
// sidebar.style.marginTop = margin;
// } else {
// // Otherwise, remove the margin
// sidebar.style.marginTop = '0';
// }
// });


// Get the sidebar element
const sidebar = document.getElementById('sidebar');

// Add a scroll event listener to the window
window.addEventListener('scroll', () => {
// Calculate the distance from the top of the document to the bottom of the viewport
const distanceToBottom = document.documentElement.scrollHeight - window.innerHeight - window.scrollY;

// Define the margin for pushing the sidebar down
const margin = '3rem';

// If the distance to the bottom of the page is less than a threshold (e.g., 50 pixels)
// add margin to the top of the sidebar to push it down
if (distanceToBottom <= 50) {
sidebar.style.marginTop = margin;
} else {
// Otherwise, remove the margin
sidebar.style.marginTop = '0';
}
});

0 comments on commit f3f3fdb

Please sign in to comment.