Skip to content

Commit 3569eca

Browse files
authored
Merge pull request #81 from Satvika1825/glassy-style-update
Updated container style to glassy dark blue and changed dim text color IN DARK THEME
2 parents a58256b + 19a55e2 commit 3569eca

File tree

2 files changed

+90
-54
lines changed

2 files changed

+90
-54
lines changed

index.html

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h2><i class="fas fa-filter"></i> Filter Projects</h2>
8383
</section>
8484

8585
<section class="projects-section" id="projects">
86-
<div class="container">
86+
<div class="projects-container">
8787
<h2 class="section-title">Featured Projects</h2>
8888
<div class="loading" id="loading">
8989
<div class="spinner"></div>
@@ -385,31 +385,8 @@ <h3 class="review-name">Sara Ahmed</h3>
385385
icon.textContent = '🌙'; // Moon in light mode
386386
}
387387

388-
toggle.addEventListener('click', () => {
389-
body.classList.toggle('dark-theme');
390-
const theme = body.classList.contains('dark-theme') ? 'dark' : 'light';
391-
localStorage.setItem('theme', theme);
392-
393-
// Update icon
394-
icon.textContent = theme === 'dark' ? '☀️' : '🌙';
395-
</script>
396-
397-
398-
<script>
399-
const scrollToTopBtn = document.getElementById("scrollToTopBtn");
400388

401-
// Show button when user scrolls down
402-
window.addEventListener("scroll", () => {
403-
scrollToTopBtn.style.display = window.scrollY > 300 ? "block" : "none";
404-
});
405-
406-
// Scroll to top smoothly
407-
scrollToTopBtn.addEventListener("click", () => {
408-
window.scrollTo({
409-
top: 0,
410-
behavior: "smooth"
411-
});
412-
});
389+
<script src="script.js"></script>
390+
</body>
391+
</html>
413392

414-
</script>
415-
</body>

style.css

Lines changed: 86 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@
8484
transition: background 0.3s ease, color 0.3s ease;
8585
}
8686

87-
88-
.container {
89-
max-width: 1200px;
90-
margin: 0 auto;
91-
padding: 0 20px;
92-
}
87+
.container,
88+
.filter-container,
89+
.projects-container {
90+
max-width: 1200px;
91+
margin: 0 auto;
92+
padding: 0 20px;
93+
}
9394

9495
/* Header styles */
9596
.header {
@@ -1079,27 +1080,85 @@ body.dark-theme .fill-btn:hover {
10791080
width: 100%;
10801081
}
10811082
}
1082-
10831083
/* ------------------------------------------- */
1084-
#scrollToTopBtn {
1085-
position: fixed;
1086-
bottom: 2rem;
1087-
right: 2rem;
1088-
z-index: 999;
1089-
background-color: #667eea;
1090-
color: white;
1091-
border: none;
1092-
outline: none;
1093-
padding: 0.75rem 1rem;
1094-
border-radius: 50%;
1095-
font-size: 1.25rem;
1096-
cursor: pointer;
1097-
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
1098-
display: none;
1099-
transition: background 0.3s ease, transform 0.3s ease;
1084+
.dark-theme .filters {
1085+
1086+
background: rgba(18, 25, 60, 0.75); /* dark blue translucent */
1087+
backdrop-filter: blur(12px);
1088+
-webkit-backdrop-filter: blur(12px);
1089+
1090+
border-radius: 16px;
1091+
border: 1px solid rgba(255, 255, 255, 0.1);
1092+
1093+
box-shadow:
1094+
0 0 8px rgba(44, 66, 255, 0.4),
1095+
0 0 16px rgba(44, 66, 255, 0.3);
1096+
1097+
color: #f0f4ff;
1098+
transition: all 0.3s ease;
1099+
}
1100+
1101+
.dark-theme .project-card {
1102+
background: rgba(18, 25, 60, 0.75); /* dark blue translucent */
1103+
backdrop-filter: blur(12px);
1104+
-webkit-backdrop-filter: blur(12px);
1105+
1106+
border-radius: 16px;
1107+
border: 1px solid rgba(255, 255, 255, 0.1);
1108+
1109+
box-shadow:
1110+
0 0 8px rgba(44, 66, 255, 0.4),
1111+
0 0 16px rgba(44, 66, 255, 0.3);
1112+
1113+
color: #f0f4ff;
1114+
transition: all 0.3s ease;
1115+
}
1116+
1117+
/* Dark theme styles for cards*/
1118+
body.dark-theme button:hover {
1119+
background-color: rgba(102, 126, 234, 0.3);
1120+
cursor: pointer;
11001121
}
11011122

1102-
#scrollToTopBtn:hover {
1103-
background-color: #5a67d8;
1104-
transform: scale(1.1);
1105-
}
1123+
1124+
/* Dark theme text and border colors */
1125+
body.dark-theme h1,
1126+
body.dark-theme .filter-container h2,
1127+
body.dark-theme h3,
1128+
body.dark-theme h4,
1129+
body.dark-theme h5,
1130+
body.dark-theme h6,
1131+
body.dark-theme p,
1132+
body.dark-theme span,
1133+
body.dark-theme a,
1134+
body.dark-theme li,
1135+
body.dark-theme label,
1136+
body.dark-theme input,
1137+
body.dark-theme textarea,
1138+
body.dark-theme button,
1139+
body.dark-theme .projects-container,
1140+
body.dark-theme .filter-container {
1141+
color: #ffffff !important;
1142+
border-color: #ffffff;
1143+
}
1144+
1145+
/* Inputs & Textareas in dark theme */
1146+
body.dark-theme input,
1147+
body.dark-theme textarea {
1148+
background-color: #1f1f1f;
1149+
}
1150+
1151+
/* Dark mode buttons */
1152+
body.dark-theme button {
1153+
background-color: rgba(102, 126, 234, 0.3) ;
1154+
color: #ffffff !important;
1155+
border: 1px solid rgba(102, 126, 234, 0.3);
1156+
}
1157+
1158+
/* Button hover effect */
1159+
body.dark-theme button:hover {
1160+
background-color: rgba(102, 126, 234, 0.5);
1161+
cursor: pointer;
1162+
}
1163+
1164+

0 commit comments

Comments
 (0)