-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnavnav.html
147 lines (129 loc) · 4.26 KB
/
navnav.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html>
<head>
<style>
:root {
--background-color: #ffffff;
--text-color: #ffffff;
--header-background: rgba(255, 255, 255, 0.1);
--dropdown-background: rgba(0, 0, 0, 0.8);
--border-color: #ddd;
}
/* Base styles */
.nav {
display: flex;
align-items: center;
padding: 1rem;
background: var(--header-background);
backdrop-filter: blur(10px);
justify-content: center; /* Center the nav items */
flex-wrap: wrap; /* Allow wrapping of links on mobile */
}
.nav-link {
color: var(--text-color);
text-decoration: none;
padding: 0.5rem 1rem;
margin: 0 0.5rem;
font-weight: normal;
}
.dropdown {
position: relative;
display: inline-block;
font-weight: normal;
}
.dropbtn {
background: transparent;
border: none;
padding: 0.5rem 1rem;
cursor: pointer;
color: var(--text-color);
font-family: inherit;
font-size: inherit;
margin: 0 0.5rem;
font-weight: normal;
}
.dropdown-content {
display: none;
position: absolute;
background: var(--dropdown-background);
backdrop-filter: blur(10px);
min-width: 160px;
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
z-index: 1;
font-weight: normal;
}
.dropdown-content a {
color: var(--text-color);
padding: 12px 16px;
text-decoration: none;
display: block;
font-weight: normal;
}
.dropdown-content a:hover {
background: rgba(0, 0, 0, 0.5);
}
.dropdown:hover .dropdown-content {
display: block;
}
/* Mobile-specific styles */
@media screen and (max-width: 768px) {
.nav .nav-link:not(.sitemap), .nav .dropdown {
display: none; /* Hide all nav links except Sitemap and remove Explore dropdown */
}
/* Show only Sitemap link on mobile */
.nav .sitemap {
display: block;
}
.nav-link {
padding: 0.25rem 0.75rem;
margin: 0 0.25rem;
}
}
@media (min-width: 769px) {
.nav .sitemap {
display: none; /* Hide Sitemap link on desktop */
}
}
</style>
</head>
<body>
<!-- Single Navigation (Both Desktop and Mobile) -->
<nav class="nav">
<a href="https://interlinkcvhs.org" class="nav-link"><strong>Home</strong></a>
<div class="dropdown">
<button class="dropbtn"><strong>Explore</strong></button>
<div class="dropdown-content">
<a href="https://interlinkcvhs.org/requests"><strong>Request Form</strong></a>
<a href="https://interlinkcvhs.org/interlinkai"><strong>Interlink AI</strong></a>
<a href="https://interlinkcvhs-peer-tutoring.mn.co/"><strong>Peer Tutoring</strong></a>
<a href="https://interlinkcvhs.org/extra/deepdives"><strong>Podcasts</strong></a>
<a href="https://interlinkcvhs.org/qotd"><strong>QOTD</strong></a>
<a href="https://interlinkcvhs.org/extra/productivity"><strong>Productivity Tools</strong></a>
</div>
</div>
<a href="https://interlinkcvhs.org/subject-study" class="nav-link"><strong>Subject Study</strong></a>
<a href="https://interlinkcvhs.org/qbank" class="nav-link"><strong>QBank</strong></a>
<a href="https://interlinkcvhs.org/quizlets" class="nav-link"><strong>Quizlets</strong></a>
<!-- <a href="https://interlinkcvhs.org/credits" class="nav-link"><strong>Credits</strong></a> -->
<!-- Will be removed/added based on screen width -->
<a href="https://interlinkcvhs.org/sitemap" class="nav-link sitemap"><strong>Sitemap</strong></a>
</nav>
<!-- Script to ensure that the sitemap link is hidden on desktop -->
<script>
function adjustNavLinks() {
const sitemapLink = document.querySelector('.sitemap');
const exploreDropdown = document.querySelector('.dropdown');
if (window.innerWidth > 768) {
sitemapLink.style.display = 'none'; // Hide Sitemap on desktop
exploreDropdown.style.display = 'inline-block'; // Show the Explore dropdown on desktop
} else {
sitemapLink.style.display = 'block'; // Show Sitemap on mobile
exploreDropdown.style.display = 'none'; // Hide the Explore dropdown on mobile
}
}
// Run the function when the page loads and on window resize
window.addEventListener('load', adjustNavLinks);
window.addEventListener('resize', adjustNavLinks);
</script>
</body>
</html>