The Navigation Bar Is Not Responding Properly. It
The Navigation Bar Is Not Responding Properly. It
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Glassmorphism Links Manager</title>
<style>
body {
font-family: 'Segoe UI', Arial, sans-serif;
margin: 0 0 0 200px;
padding: 20px;
min-height: 100vh;
background: linear-gradient(45deg, #ff9a9e, #fad0c4, #ffecd2);
}
.navbar {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: 180px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
padding: 20px 15px;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: column;
gap: 15px;
z-index: 1000;
}
.nav-button {
background: rgba(255, 255, 255, 0.2);
border: none;
padding: 12px 20px;
border-radius: 8px;
color: white;
cursor: pointer;
transition: all 0.3s ease;
text-align: left;
}
.nav-button:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateX(5px);
}
.container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 25px;
max-width: 1300px;
margin: 0 auto;
}
.card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(12px);
border-radius: 15px;
padding: 25px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
transition: transform 0.3s ease;
min-height: 300px;
position: relative;
overflow: hidden;
}
.time-block {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 50%;
background: linear-gradient(135deg, rgba(255,154,158,0.3), rgba(250,208,196,0.3));
padding: 15px;
color: white;
font-size: 1.2em;
}
.card-content {
position: relative;
z-index: 1;
margin-top: 60%;
}
.card h2 {
margin: 0 0 15px 0;
color: #fff;
font-size: 1.5em;
}
.card ul {
list-style-type: none;
padding: 0;
margin: 0;
}
.card li {
margin-bottom: 12px;
padding: 8px;
border-radius: 5px;
transition: background 0.3s ease;
}
.card li:hover {
background: rgba(255, 255, 255, 0.15);
}
.card a {
color: #fff;
text-decoration: none;
display: block;
font-size: 1.1em;
}
.delete-btn {
float: right;
color: #ff6b6b;
cursor: pointer;
font-weight: bold;
margin-left: 10px;
}
</style>
</head>
<body>
<nav class="navbar">
<button class="nav-button" onclick="addNewCard()">+ New Category</button>
<button class="nav-button" onclick="addNewLink()">+ Add Link</button>
<button class="nav-button" onclick="deleteLink()">🗑 Delete Link</button>
</nav>
<div></div>
<script>
let links = [/* Initial data remains same */];
// Time block
const timeBlock = document.createElement('div');
timeBlock.className = 'time-block';
card.appendChild(timeBlock);
// Content container
const content = document.createElement('div');
content.className = 'card-content';
item.appendChild(link);
item.appendChild(deleteSpan);
list.appendChild(item);
});
content.appendChild(list);
card.appendChild(content);
return card;
}
Key Improvements:
3. Card Enhancements:
4. Interaction Fixes:
To Use:
The code now includes proper element positioning and z-index management to handle
the layered time block and content. The navigation bar interactions should work smoothly
with the new layout.
⁂
1. https://www.tutorialspoint.com/how-to-create-a-navigation-bar-with-left-aligned-and-right-aligned-
links-with-css
2. https://dev.to/msnmongare/displaying-real-time-day-date-and-time-in-a-custom-format-using-
javascript-5did
3. https://stackoverflow.com/questions/70320295/i-am-trying-to-create-nav-bar-which-dynamically-
updated-with-adding-a-sections-t