Improved navbar

add-license-1
Guuq 5 years ago
parent 4b2e7a476d
commit 98c07cb170

@ -76,12 +76,13 @@ footer {
background-color: black; background-color: black;
width: 100%; width: 100%;
position: relative; position: relative;
display: flex!important; float: left;
font-family: 'Open Sans', sans-serif; font-family: 'Open Sans', sans-serif;
} }
footer div { footer div {
margin: 5rem 0 3rem 8rem; margin: 5rem 0 3rem 8rem;
display: inline-block; display: inline-block;
vertical-align: top;
} }
footer h4 { footer h4 {
color: gray; color: gray;

@ -1,4 +1,3 @@
<<<<<<< HEAD
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -113,6 +112,7 @@
<li><a href="https://w3schools.com">W3schools</a></li> <li><a href="https://w3schools.com">W3schools</a></li>
<li><a href="https://stackoverflow.com/">Stack overflow</a></li> <li><a href="https://stackoverflow.com/">Stack overflow</a></li>
<li><a href="https://cloudflare.com">Cloudflare</a></li> <li><a href="https://cloudflare.com">Cloudflare</a></li>
<li><a href="https://github.com">Github</a></li>
</ul> </ul>
</div> </div>
@ -141,6 +141,3 @@
</body> </body>
</html> </html>
=======
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Website gemaakt door Guus van Meerveld"><meta name="author" content="Guus van Meerveld"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Home</title><link rel="stylesheet" href="/resources/css/shortcuts.css"><link rel="stylesheet" href="/css.css"><link rel="stylesheet" href="/resources/css/cssall.css"><link rel="stylesheet" href="/resources/css/navbar.css"><script src="https://kit.fontawesome.com/340f4d917c.js" crossorigin="anonymous"></script><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script></head><body><section class="box"><div id="timeBox"><p id="hours" class="time">uren</p><p id="mins" class="time">:minuten</p><p id="secs" class="time">:seconden</p><br><p id="date">datum</p></div><br><span class="shortcuts" id="shortcuts"><button onclick="window.open('https://www.youtube.com/')"><img src="/resources/img/youtube.png" alt="">Youtube</button><button onclick="window.open('https://pantarijn.magister.net')"><img src="/resources/img/magister.png" alt="">Magister</button><button onclick="window.open('https://onedrive.live.com/about/en-us/signin/')"><img src="/resources/img/onedrive.png" alt="">Onedrive</button><button onclick="window.open('https://codepanta.nl/login/index.php')"><img src="/resources/img/codepanta.png" alt="">Codepanta</button><button onclick="window.open('https://reddit.com')"><img src="/resources/img/reddit.png" alt="">Reddit</button><button onclick="window.open('https://open.spotify.com/browse/featured')"><img src="/resources/img/spotify.png" alt="">Spotify</button><button onclick="window.open('https://w3schools.com')"><img src="/resources/img/w3schools.png" alt="">W3Schools</button><button onclick="window.open('https://maps.google.com')"><img src="/resources/img/googlemaps.png" alt="">Maps</button><button onclick="window.open('https://translate.google.com')"><img src="/resources/img/googletranslate.png" alt="">Translate</button></span><span class="shortcuts"><button onclick="openMenu()" title="Voeg je eigen shortcut toe"><img src="/resources/img/cross.png" alt="">Voeg toe</button></span></section><svg><polygon points="0,5 0,2000 300,5"/></svg><div id="feedbackContent"><div id="feedbackOne" class="feedback"><div class="user"><img src="/resources/img/user.png" alt="" class="userImg"><h3>Peer Droog</h3> </div><h2 class="userFeedback">"Een goede en overzichtelijk website met een handige klok, wel mist er de mogelijkheid om je eigen plaatjes toe te voegen aan de shortcuts."</h2></div><div class="feedback"><div class="user"><img src="/resources/img/user.png" alt="" class="userImg"><h3>User</h3></div><h2 class="userFeedback">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a risus eu ex sagittis interdum ac ac odio. Proin eleifend turpis a aliquam.</h2></div></div><footer><div><h4>LINKS</h4><ul><li><a href="https://samtaen.ml">Sam Taen</a></li><li><a href="http://jonathanbos.nl">Jonathan Bos</a></li></ul></div><div><h4>SOCIAL</h4><ul><li><a href="https://www.youtube.com/channel/UCYuqpoMay5SezCBrA_HKVWQ?view_as=subscriber">Youtube</a></li><li><a href="https://twitter.com/GuusvanMeerveld">Twitter</a></li><li><a href="https://www.reddit.com/user/Marho_">Reddit</a></li><li><a href="https://instagram.com/gerda.6">Instagram</a></li></ul> </div><div><h4>TOOLS</h4><ul><li><a href="https://w3schools.com">W3schools</a></li><li><a href="https://stackoverflow.com/">Stack overflow</a></li><li><a href="https://cloudflare.com">Cloudflare</a></li></ul></div><p id="copyright">&#169; 2019 Guus van Meerveld</p></footer><div id="addShortcutMenu" class="box menu hidden lowerIndex"><h1 id='menuTitle'>Maak je eigen shortcut</h1><h4>Bedenk een naam voor je shortcut</h4><br><input type='text' class='input inputMenu' id='shortcutName'><br><h4>Geef de link van je shortcut</h4><br><input type='text' class='input inputMenu' id='shortcutLink'><button class='button' onclick="createShortcut()" id='shortcutCreateButton'>Voeg toe</button><button class="cancelButton" onclick="closeMenu()" id="shortcutCancelButton">Cancel</button></div><script src="/resources/js/navbar.json.js"></script><script src="/resources/js/insertNavbar.js"></script><script src="/js.js"></script><script src="/resources/js/shortcuts.js"></script><script src="/resources/js/javall.js"></script></body></html>
>>>>>>> f3747cf0f10d544e2a27606d8adddc3b21a8992a

@ -3,46 +3,54 @@
top: 0px; top: 0px;
height: 55px; height: 55px;
width: 100%; width: 100%;
background-color: #101012; background-color: #212126;
z-index: 3; z-index: 3;
} }
.navigation button { .navigation .fas {
padding: .5rem; margin-left: .5rem;
height: 100%; transition: .5s transform;
transition: color .5s;
border: 0;
background-color: transparent;
color: white;
display: inline;
} }
.navigation button:focus { .navigation a {
outline: 0; white-space: nowrap;
cursor: pointer;
transition: all 0.2s ease-in-out;
} }
.navbarList { .navbarList {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
padding-top: 14px;
height: 100%;
} }
.navList { .navList {
float: left; float: left;
margin-left: 25px;
} }
.navigation i { .navImg {
margin: 10px 15px 10px 10px; height: 2rem;
width: 2rem;
margin-top: -4px;
} }
.dropdownList { .dropdownList {
background-color: #101012; background-color: #303037;
margin: 0; border-radius: 4px;
padding: 0; margin-top: 5px;
border: #1d1d1d 1px solid;
font-family: 'Open Sans';
padding: 10px 20px 10px 20px;
list-style: none; list-style: none;
} }
.dropdownButton { .dropdownLi {
padding: 5px 2px 2px 2px;
}
.dropdownLink {
width: 100%; width: 100%;
} }
.navList:hover .dropdownList { .navList:hover .dropdownList {
display: block!important; display: block!important;
} }
.navigation button:hover { .navList:hover .fas {
color: gray!important; transform: rotate(-180deg);
} }
.lowerIndex { .lowerIndex {
z-index: -1!important; z-index: -1!important;

@ -10,10 +10,11 @@ navbarList.className = "navbarList"
navigation.appendChild(navbarList) navigation.appendChild(navbarList)
document.body.appendChild(navigation) document.body.appendChild(navigation)
// Opacity
var opacity = c("div") // // Opacity
opacity.className = "opacityMenu lowerIndex menu" // var opacity = c("div")
document.body.appendChild(opacity) // opacity.className = "opacityMenu lowerIndex menu"
// document.body.appendChild(opacity)
// Hamburger Menu // Hamburger Menu
var hamburger = c("i") var hamburger = c("i")
@ -50,42 +51,44 @@ function searchEnter(key) {
Navbar.forEach(i=>{ Navbar.forEach(i=>{
var navList = c("li") var navList = c("li")
navList.className = "navList" navList.className = "navList"
var navButton = c("button");
navButton.className = "navbarbutton"
navButton.innerHTML = "<i class='" + i.icon + " fa-lg'></i>" + i.name
if (i.link) {
var navLink = c("a"); var navLink = c("a");
navList.appendChild(navLink);
if (i.link) {
navLink.href = i.link navLink.href = i.link
navLink.appendChild(navButton); }
navButton = navLink if (i.name) {
navLink.innerHTML = i.name
} }
if (i.desc) { if (i.desc) {
navButton.title = i.desc navLink.title = i.desc
}
if (i.icon) {
var navImg = c("img")
navImg.src = i.icon
navImg.className = "navImg"
navImg.alt = "img"
navLink.appendChild(navImg)
} }
navList.appendChild(navButton)
var dropdownList = c("ul") var dropdownList = c("ul")
dropdownList.className = "dropdownList" dropdownList.className = "dropdownList"
dropdownList.style = "display: none;" dropdownList.style = "display: none;"
if (typeof i.dropdown == "object") { if (typeof i.dropdown == "object") {
i.dropdown.forEach(d=>{ i.dropdown.forEach(d=>{
if (d.link) {
var dropdownListItem = c("li"); var dropdownListItem = c("li");
// Dropdown button dropdownListItem.className = "dropdownLi"
var dropdownButton = c("button"); var dropdownLink = c("a");
dropdownButton.innerHTML = "<i class='" + d.icon + " fa-lg'></i>" + d.name dropdownLink.href = d.link
dropdownButton.className = "dropdownButton" dropdownLink.innerHTML = d.name
if (d.desc) { if (d.desc) {
dropdownButton.title = d.desc dropdownLink.title = d.desc
} }
if (d.link) { dropdownListItem.appendChild(dropdownLink);
var link = c("a");
link.href = d.link
link.appendChild(dropdownButton);
dropdownButton = link
}
dropdownListItem.appendChild(dropdownButton);
dropdownList.appendChild(dropdownListItem); dropdownList.appendChild(dropdownListItem);
})
} }
navList.appendChild(dropdownList) navList.appendChild(dropdownList)
})
navLink.innerHTML = navLink.innerHTML + "<i class='fas fa-caret-down'></i>"
}
navbarList.appendChild(navList); navbarList.appendChild(navList);
}) })

@ -1,30 +1,25 @@
Navbar = [ Navbar = [
{ {
name: "Home", icon: "/resources/img/favicon.ico",
desc: "Ga naar de homepagina", desc: "Ga naar de homepagina",
link: "/", link: "/"
icon: "fas fa-home"
}, },
{ {
name: "Playground", name: "Playground",
desc: "Test je html live!", desc: "Test je html live!",
link: "/playground", link: "/playground"
icon: "fas fa-code"
}, },
{ {
name: "Contact", name: "Contact",
desc: "Neem contact met mij op", desc: "Neem contact met mij op",
link: "/contact", link: "/contact"
icon: "fas fa-phone"
}, },
{ {
name: "Games", name: "Games",
desc: "Hier kan je spelletjes spelen", desc: "Hier kan je spelletjes spelen",
icon: "fas fa-gamepad",
dropdown: [ dropdown: [
{ {
name: "Vuurjongen en Watermeisje 4", name: "Vuurjongen en Watermeisje 4",
icon: "fas fa-fire",
link: "/vuurjongen-en-watermeisje-4" link: "/vuurjongen-en-watermeisje-4"
} }
] ]