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
e9d01dc8
Commit
e9d01dc8
authored
7 months ago
by
Shraddha Raghuram
Browse files
Options
Downloads
Patches
Plain Diff
use previous js
parent
a554ac41
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#406847
passed
7 months ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wiki/menu.html
+77
-77
77 additions, 77 deletions
wiki/menu.html
with
77 additions
and
77 deletions
wiki/menu.html
+
77
−
77
View file @
e9d01dc8
...
...
@@ -135,84 +135,84 @@
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";
// }
// }
function
over
(
el
)
{
resetColors
();
el
.
children
[
0
].
style
.
color
=
"
#62D881
"
;
if
(
el
.
children
.
length
>
1
)
{
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
];
son
.
style
.
display
=
"
block
"
;
setTimeout
(()
=>
{
son
.
style
.
opacity
=
1
;
navbox
.
style
.
height
=
getNavboxHeight
();
},
0
);
// No delay for smoother operation
}
}
function
leave
(
el
)
{
resetColors
();
if
(
el
.
children
.
length
>
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
];
son
.
style
.
opacity
=
0
;
setTimeout
(()
=>
{
son
.
style
.
display
=
"
none
"
;
navbox
.
style
.
height
=
"
78px
"
;
},
300
);
// Delay matches the CSS transition
}
}
function
resetColors
()
{
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
items
[
i
].
children
[
0
].
style
.
color
=
"
#185A4F
"
;
}
}
function
getNavboxHeight
()
{
if
(
document
.
documentElement
.
clientWidth
>
1400
)
{
return
"
320px
"
;
}
else
if
(
document
.
documentElement
.
clientHeight
<
1120
)
{
return
"
245px
"
;
}
else
{
return
"
280px
"
;
}
}
if
(
getComputedStyle
(
son
,
null
)[
"
display
"
]
==
"
block
"
){
son
.
style
.
opacity
=
0
;
setTimeout
(
function
(){
son
.
style
.
display
=
"
none
"
;
},
350
);
}
navbox
.
style
.
height
=
"
78px
"
;
}
}
// function over(el) {
// resetColors();
// el.children[0].style.color = "#62D881";
// if (el.children.length > 1) {
// let son = el.children[1];
// son.style.display = "block";
// setTimeout(() => {
// son.style.opacity = 1;
// navbox.style.height = getNavboxHeight();
// }, 0); // No delay for smoother operation
// }
// }
// function leave(el) {
// resetColors();
// if (el.children.length > 1) {
// let son = el.children[1];
// son.style.opacity = 0;
// setTimeout(() => {
// son.style.display = "none";
// navbox.style.height = "78px";
// }, 300); // Delay matches the CSS transition
// }
// }
// function resetColors() {
// for (let i = 0; i
<
4
;
i
++
)
{
// items[i].children[0].style.color = "#185A4F";
// }
// }
// function getNavboxHeight() {
// if (document.documentElement.clientWidth > 1400) {
// return "320px";
// } else if (document.documentElement.clientHeight
<
1120
)
{
// return "245px";
// } else {
// return "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