„burgerIcon.js“ ändern

master_stand_10_05_23
Ahmed Bada 2023-05-17 14:57:35 +02:00
parent ec340299e1
commit d89f7e4f72
1 changed files with 62 additions and 14 deletions

View File

@ -6,10 +6,15 @@ function openNav() {
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
} }
#uberuns{ #uberuns{
pointer-events: auto; pointer-events: auto;
opacity: 1; opacity: 1;
} }
#abmelden{
pointer-events: auto;
opacity: 1;
}
#buecher{ #buecher{
pointer-events: auto; pointer-events: auto;
opacity: 1; opacity: 1;
@ -42,21 +47,59 @@ function openNav() {
right: 240px; right: 240px;
top: 0px; top: 0px;
} }
#uberuns{ #uberuns{
position: fixed; position: fixed;
left: 340px; left: 43%;
top: 43px; top: 96px;
width: 120px;
height: 35px;
background-color:#664220 ;
color:rgb(255, 255, 255);
}
#abmelden{
position: fixed;
left: 0px;
top: 150px;
width: 120px;
height: 35px;
background-color:#664220 ;
color:rgb(255, 255, 255);
} }
#buecher{ #buecher{
position: fixed; position: fixed;
left: 340px; left: 43%;
top: 96px; top: 43px;
width: 120px;
height: 35px;
background-color:#664220 ;
color:rgb(255, 255, 255);
padding-right:10px;
padding-left: 8px;
padding-top: 15px;
padding-bottom: 0px;
text-align: center;
text-decoration: none;
} }
#meinebuecher{ #meinebuecher{
position: fixed; position: fixed;
left: 340px; left: 43%;
top: 150px; top: 149px;
width: 120px;
height: 35px;
background-color:#664220 ;
color:rgb(255, 255, 255);
padding-right:10px;
padding-left: 8px;
padding-top: 15px;
padding-bottom: 0px;
text-align: center;
text-decoration: none;
} }
@ -65,6 +108,8 @@ function openNav() {
opacity: 1; opacity: 1;
pointer-events: auto; pointer-events: auto;
} }
`; `;
if (document.getElementById('nav-toggle').checked) { if (document.getElementById('nav-toggle').checked) {
var styleSheet = document.createElement("style") var styleSheet = document.createElement("style")
@ -78,7 +123,7 @@ function openNav() {
link.type = 'text/css'; link.type = 'text/css';
link.href = 'style.css'; link.href = 'probestyle.css';
// Get HTML head element to append // Get HTML head element to append
// link element to it // link element to it
@ -91,21 +136,24 @@ function openNav() {
function unset() function unset()
{ {
var link = document.createElement('link');
var link = document.createElement('link');
var head = document.getElementsByTagName('head')[0];
// set the attributes for link element // set the attributes for link element
link.rel = 'stylesheet'; link.rel = 'stylesheet';
link.type = 'text/css'; link.type = 'text/css';
link.href = 'style.css'; link.href = 'probestyle.css';
link.media = 'all';
// Get HTML head element to append // Get HTML head element to append
// link element to it // link element to it
document.getElementsByTagName('HEAD')[0].appendChild(link); //document.getElementsByTagName('head').appendChild(link);
head.appendChild(link);
var styleSheet = document.createElement("style") var styleSheet = document.createElement("style")
styleSheet.innerText = closeNav styleSheet.innerText = closeNav
document.head.appendChild(styleSheet) document.head.appendChild(styleSheet)
} }