Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
html,
body {
margin: 0;
overflow-x: hidden;
}

Expand Down
5 changes: 0 additions & 5 deletions mainpage.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,3 @@
height: var(--image-height);
/* height: 100vh; */
}

.menuBar .menu {
margin: auto 1em;
cursor: pointer;
}
2 changes: 1 addition & 1 deletion menuchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $(function () {
var $nav = $(".menuBar");
$nav.toggleClass(
"scrolled",
$(this).scrollTop() > $(".main-imagex").height() - $nav.height() * 2 - 10
$(this).scrollTop() > $(".main-imagex").height() - $nav.height() * 2 - 30
);
});
});
15 changes: 15 additions & 0 deletions navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// window.addEventListener("load", );

document.addEventListener("DOMContentLoaded", function () {
const menubar = `<a class="menu" href="/">Home</a>|<a
class="menu"
href="/#members"
>Members</a
>|<a class="menu" href="/#projects">Projects</a>`;

const div = document.createElement("div");
div.className = "menuBar standalone";
div.innerHTML = menubar;

document.body.prepend(div);
});
39 changes: 32 additions & 7 deletions unbap.css
Original file line number Diff line number Diff line change
@@ -1,22 +1,47 @@
html,
body {
margin: 0;
}

.menuBar {
background-color: rgba(255, 255, 255, 0.2);
position: fixed;
width: 100%;
text-align: right;
top: 0;
right: 0;
font-family: "arial", sans-serif;
font-size: 1.01rem;
color: rgba(255, 255, 255, 0.8);
letter-spacing: 0.05rem;
padding-left: 100%;
padding-right: 2.5vh;
padding-top: 1.5vh;
padding-bottom: 1.5vh;
display: flex;
padding: 0.7em;
display: block;
z-index: 1;
transition: background-color 200ms linear;
}

.menuBar.scrolled {
.menuBar .menu:last-child {
margin-right: 3em;
}

.menuBar.scrolled,
.menuBar.standalone {
background-color: rgba(0, 0, 0) !important;
transition: background-color 200ms linear;
}

.menuBar.standalone {
top: 0;
position: sticky;
/* display: block; */
text-align: right;
margin: 0;
}
.menuBar.standalone a {
text-decoration: none;
color: rgba(255, 255, 255, 0.8);
}

.menuBar .menu {
margin: auto 1em;
cursor: pointer;
}