Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TU-Delft
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2024 Competition
TU-Delft
Commits
4cf3e206
Commit
4cf3e206
authored
7 months ago
by
Shraddha Raghuram
Browse files
Options
Downloads
Patches
Plain Diff
Update 2 files
- /static/navbar.css - /wiki/menu.html
parent
27e9efd2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#406890
passed
7 months ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
static/navbar.css
+5
-0
5 additions, 0 deletions
static/navbar.css
wiki/menu.html
+86
-41
86 additions, 41 deletions
wiki/menu.html
with
91 additions
and
41 deletions
static/navbar.css
+
5
−
0
View file @
4cf3e206
...
...
@@ -103,6 +103,11 @@ body{
opacity
:
0
;
/* Start with invisible dropdown */
transition
:
opacity
0.3s
ease-out
,
visibility
0.3s
ease-out
;
/* Smooth transition */
}
/* .my-navbar > li:hover .son,
.my-navbar > li.active .son {
visibility: visible;
opacity: 1;
} */
/* Adjust for smaller screens */
@media
screen
and
(
max-width
:
1130px
)
{
...
...
This diff is collapsed.
Click to expand it.
wiki/menu.html
+
86
−
41
View file @
4cf3e206
...
...
@@ -132,48 +132,93 @@
</ul>
</nav>
<script>
// var navbox = document.getElementById("navbox");
// let navbar = document.getElementById("my-navbar");
// let items = navbar.children;
// function over(el){
// for (i = 0; i
<
4
;
i
++
){
// items[i].children[0].style.color = "#185A4F";
// }
// el.children[0].style.color = "#62D881";
// if (el.children.length > 1){
// let son = el.children[1];
// if (getComputedStyle(son,null)["display"]=="none"){
// setTimeout(function(){
// son.style.opacity = 1;
// }, 1);
// son.style.display = "block";
// }
// if (document.documentElement.clientWidth > 1400){
// navbox.style.height = "320px";
// }
// else if (document.documentElement.clientHeight
<
1120
){
// navbox.style.height = "245px";
// }
// else{
// navbox.style.height = "280px";
// }
// }
// }
// function leave(el){
// for (i = 0; i
<
4
;
i
++
){
// items[i].children[0].style.color = "#185A4F";
// }
// 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";
// }, 350);
// }
// navbox.style.height = "78px";
// }
// }
var
navbox
=
document
.
getElementById
(
"
navbox
"
);
let
navbar
=
document
.
getElementById
(
"
my-navbar
"
);
let
items
=
navbar
.
children
;
function
over
(
el
){
for
(
i
=
0
;
i
<
4
;
i
++
){
items
[
i
].
children
[
0
].
style
.
color
=
"
#185A4F
"
;
}
el
.
children
[
0
].
style
.
color
=
"
#62D881
"
;
if
(
el
.
children
.
length
>
1
){
let
son
=
el
.
children
[
1
];
if
(
getComputedStyle
(
son
,
null
)[
"
display
"
]
==
"
none
"
){
setTimeout
(
function
(){
son
.
style
.
opacity
=
1
;
},
1
);
son
.
style
.
display
=
"
block
"
;
}
if
(
document
.
documentElement
.
clientWidth
>
1400
){
navbox
.
style
.
height
=
"
320px
"
;
}
else
if
(
document
.
documentElement
.
clientHeight
<
1120
){
navbox
.
style
.
height
=
"
245px
"
;
}
else
{
navbox
.
style
.
height
=
"
280px
"
;
}
}
}
function
leave
(
el
){
for
(
i
=
0
;
i
<
4
;
i
++
){
items
[
i
].
children
[
0
].
style
.
color
=
"
#185A4F
"
;
}
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
"
;
},
350
);
}
navbox
.
style
.
height
=
"
78px
"
;
}
}
let
navbar
=
document
.
getElementById
(
"
my-navbar
"
);
let
items
=
navbar
.
children
;
function
over
(
el
)
{
resetColors
();
el
.
children
[
0
].
style
.
color
=
"
#62D881
"
;
// Show the current dropdown
let
son
=
el
.
children
[
1
];
if
(
son
)
{
son
.
style
.
visibility
=
"
visible
"
;
son
.
style
.
opacity
=
1
;
el
.
classList
.
add
(
'
active
'
);
adjustNavHeight
();
}
}
function
leave
(
el
)
{
// Close the current dropdown
let
son
=
el
.
children
[
1
];
if
(
son
)
{
son
.
style
.
opacity
=
0
;
setTimeout
(()
=>
{
son
.
style
.
visibility
=
"
hidden
"
;
el
.
classList
.
remove
(
'
active
'
);
navbox
.
style
.
height
=
"
78px
"
;
// Reset the height
},
300
);
// Match this delay with the CSS transition time
}
}
function
resetColors
()
{
for
(
let
i
=
0
;
i
<
items
.
length
;
i
++
)
{
items
[
i
].
children
[
0
].
style
.
color
=
"
#185A4F
"
;
}
}
function
adjustNavHeight
()
{
if
(
document
.
documentElement
.
clientWidth
>
1400
)
{
navbox
.
style
.
height
=
"
320px
"
;
}
else
if
(
document
.
documentElement
.
clientHeight
<
1120
)
{
navbox
.
style
.
height
=
"
245px
"
;
}
else
{
navbox
.
style
.
height
=
"
280px
"
;
}
}
</script>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment