Newer
Older
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
background-color: rgba(255, 228, 225, 0.95);
padding: 10px 0;
position: fixed;
width: 100%;
top: 0;
left: 0;
z-index: 1000;
height: 50px;
border-bottom: 2px solid #fa8072;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
display: flex;
justify-content: center;
transition: all 0.3s ease;
}
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
font-size: 30px;
cursor: pointer;
margin-left: 15px;
color: #333;
}
.my-navbar {
list-style-type: none;
padding: 0;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.my-navbar > li {
position: relative;
margin: 0 15px;
}
.my-navbar > li > a {
color: #333;
text-decoration: none;
padding: 10px 15px;
display: block;
border-radius: 20px;
transition: all 0.3s ease;
font-weight: 500;
letter-spacing: 0.5px;
}
.my-navbar > li > a:hover,
.my-navbar > li > a.active {
background-color: #fa8072;
color: white;
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(250, 128, 114, 0.3);
}
.son {
display: none;
position: absolute;
background-color: rgba(255, 255, 255, 0.95);
min-width: 200px;
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
z-index: 1;
opacity: 0;
transition: all 0.3s ease;
top: 100%;
border-radius: 10px;
overflow: hidden;
padding: 5px;
}
.son li {
margin: 5px 0;
}
.son li a {
color: #333;
padding: 12px 20px;
text-decoration: none;
display: block;
transition: all 0.3s ease;
white-space: nowrap;
border-radius: 20px;
}
.son li a:hover {
background-color: #fa8072;
color: white;
transform: translateY(-2px);
box-shadow: 0 4px 10px rgba(250, 128, 114, 0.3);
}
@media (max-width: 768px) {
.my-nav {
height: auto;
padding: 10px;
justify-content: flex-start;
}
.hamburger {
}
.my-navbar {
flex-direction: column;
align-items: flex-start;
.my-navbar > li {
width: 100%;
margin: 5px 0;
}
.my-navbar > li > a {
width: 100%;
padding: 10px 15px;
}
.my-navbar > li > ul.son {
position: static;
opacity: 1;
box-shadow: none;
background-color: transparent;
}
.son li a {
padding: 10px 15px;
border-radius: 0;
}
}
<ul class="my-navbar" id="my-navbar">
<li><a href="{{ url_for('home') }}">Home</a></li>
<li onmouseover="over(this)" onmouseleave="leave(this)">
<a href="#" style="cursor:default;">Project</a>
<ul class="son">
<li><a href="{{ url_for('pages', page='description') }}">Description</a></li>
<li><a href="{{ url_for('pages', page='engineering') }}">Engineering</a></li>
<li><a href="{{ url_for('pages', page='proof-of-concept') }}">Proof Of Concept</a></li>
<li><a href="{{ url_for('pages', page='safety') }}">Safety</a></li>
<li><a href="{{ url_for('pages', page='contribution') }}">Contribution</a></li>
</ul>
</li>
<li onmouseover="over(this)" onmouseleave="leave(this)">
<a href="#" style="cursor:default;">Wetlab</a>
<ul class="son">
<li><a href="{{ url_for('pages', page='therapy-system') }}">Therapy System</a></li>
<li><a href="{{ url_for('pages', page='colonization') }}">Colonization</a></li>
<li><a href="{{ url_for('pages', page='parts') }}">Parts</a></li>
</ul>
</li>
<li onmouseover="over(this)" onmouseleave="leave(this)">
<a href="#" style="cursor:default;">Drylab</a>
<ul class="son">
<li><a href="{{ url_for('pages', page='model') }}">Model</a></li>
<li><a href="{{ url_for('pages', page='hardware') }}">Hardware</a></li>
</ul>
</li>
<li onmouseover="over(this)" onmouseleave="leave(this)">
<a href="#" style="cursor:default;">Human Practices</a>
<ul class="son">
<li><a href="{{ url_for('pages', page='human-practices') }}">Communication</a></li>
<li><a href="{{ url_for('pages', page='education') }}">Education</a></li>
<li><a href="{{ url_for('pages', page='inclusivity') }}">Inclusivity</a></li>
</ul>
</li>
<li onmouseover="over(this)" onmouseleave="leave(this)">
<a href="#" style="cursor:default;">Team</a>
<ul class="son">
<li><a href="{{ url_for('pages', page='team') }}">Roster</a></li>
<li><a href="{{ url_for('pages', page='attributions') }}">Attributions</a></li>
<li><a href="{{ url_for('pages', page='tryhomepage') }}">Try</a></li>
<li><a href="{{ url_for('pages', page='random') }}">ran</a></li>
function over(el){
el.children[0].classList.add('active');
if (el.children.length > 1){
let son = el.children[1];
if (getComputedStyle(son,null)["display"]=="none"){
son.style.display = "block";
setTimeout(function(){
son.style.opacity = 1;
}, 10);
}
function leave(el){
el.children[0].classList.remove('active');
if (el.children.length > 1){
let son = el.children[1];
if (getComputedStyle(son,null)["display"]=="block"){
son.style.opacity = 0;
setTimeout(function(){
son.style.display = "none";
}, 300);
}
}
}
function toggleMenu(){
var navbar = document.getElementById('my-navbar');
var navItems = document.querySelectorAll('.my-navbar > li');
navItems.forEach(function(item){
this.classList.toggle('show');
}
});
});
window.addEventListener('resize', function() {
var navbar = document.getElementById('my-navbar');
if(window.innerWidth > 768){
navbar.classList.remove('show-menu');
navItems.forEach(function(item){
item.classList.remove('show');
});
}
});