-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript1.js
112 lines (82 loc) · 3.38 KB
/
script1.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;
for (i = 0; i < dropdown.length; i++) {
dropdown[i].addEventListener("click", function() {
this.classList.toggle("active");
var dropdownContent = this.nextElementSibling;
if (dropdownContent.style.display === "block") {
dropdownContent.style.display = "none";
} else {
dropdownContent.style.display = "block";
}
});
}
class Myheader extends HTMLElement{
connectedCallback(){
this.innerHTML =`
<header>
<div class="logo">
<div class="toggleBtn" onclick="openNav()" >
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
</div>
<h1><a href="index.html" class="logo">
Gemensamhetsskog <br> Billingen</a></h1>
</div >
<div id="myDIV">
<a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a>
<ul id="listan" class="nav_links">
<li>
<div class="dropdown" >
<a class="dropbtn" href="projektet.html" >Om Projektet</a>
<div class="dropdown-content">
<a href="aktuellt.html" >aktuellt</a>
<a href="iMedia.html" >i media</a>
<a href="">nästa steg</a>
<a href="QA.html" >Frågor & svar</a>
</div>
</div>
</li>
<li> <div id="dropdown" class="dropdown" >
<a class="dropbtn" href="Fakta.html " >Fakta</a>
<div class="dropdown-content">
<a href="FaktaStyrdokument.html">Styrdokument</a>
<a href="FaktaLknProjekt.html"> linkande projekt</a>
<a href="#">plantageskog</a>
<a href="kontinuitetsskog.html">kontinuitetsskog</a>
</div>
</div></li>
<li> <div class="dropdown">
<a href="OmOss.html" class="dropbtn" > Om Oss</a>
<div class="dropdown-content">
<a href="OmOss.html" target="iframe2">Vem är vi</a>
<a href="#">På sociala media</a>
</div>
</div></li>
<li>
<div class="dropdown">
<a href="index.html" class="dropbtn" >Hem</a>
</div> </li>
</ul>
</div>
<a class="cta" href="https://bit.ly/Billingen"> <button> till namninsamling</button></a>
</header>
`
}
}
customElements.define('my-header',Myheader)
/* GET A FOOTER*/
class Myfooter extends HTMLElement{
connectedCallback(){
this.innerHTML =`
<footer>
<div class="footer">
<p> © gemensamhetsskogen.se</p>
<p> [email protected]</p>
</div>
</footer>
`
}
}
customElements.define('my-footer',Myfooter)