cannabinieri website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

238 lines
5.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. // show mobile menu onclick
  2. document.getElementById("icon").addEventListener("click", function menu() {
  3. var x = document.getElementById("md");
  4. if (x.style.display === "none") {
  5. x.style.display = "flex";}
  6. else {
  7. x.style.display ="none";
  8. }
  9. }
  10. )
  11. // show hemp submenu
  12. document.getElementById("chevron_1").addEventListener("click", function menu() {
  13. var x= document.getElementById("down_1");
  14. if (x.style.display === "none") {
  15. x.style.display = "flex";}
  16. else {
  17. x.style.display ="none";
  18. }
  19. }
  20. )
  21. // spider submenu
  22. document.getElementById("chevron_2").addEventListener("click", function menu() {
  23. var x= document.getElementById("down_2");
  24. if (x.style.display === "none") {
  25. x.style.display = "flex";}
  26. else {
  27. x.style.display ="none";
  28. }
  29. }
  30. )
  31. // offgrid submenu
  32. document.getElementById("chevron_3").addEventListener("click", function menu() {
  33. var x= document.getElementById("down_3");
  34. if (x.style.display === "none") {
  35. x.style.display = "flex";}
  36. else {
  37. x.style.display ="none";
  38. }
  39. }
  40. )
  41. // index
  42. // button 1
  43. let btn_1 = document.getElementById("b_1");
  44. var p_1= document.getElementById("c_1");
  45. let hemp = document.getElementById("hemp");
  46. p_1.style.display = "none";
  47. btn_1.addEventListener("click", () => {
  48. if (p_1.style.display === "none") {
  49. p_1.style.display = "flex";
  50. hemp.style.zIndex = "9";
  51. }
  52. else {
  53. p_1.style.display ="none";
  54. hemp.style.zIndex = "0";
  55. }
  56. }
  57. );
  58. // button 2
  59. let btn_2 = document.querySelector("#b_2");
  60. let p_2= document.getElementById("c_2");
  61. let permapp = document.getElementById("permapp");
  62. p_2.style.display = "none";
  63. btn_2.addEventListener("click", () => {
  64. if (p_2.style.display === "none") {
  65. p_2.style.display = "flex";
  66. permapp.style.zIndex = "9";
  67. }
  68. else {
  69. p_2.style.display ="none";
  70. permapp.style.zIndex = "0";
  71. }
  72. }
  73. );
  74. // button 3
  75. let btn_3 = document.querySelector("#b_3");
  76. let p_3= document.getElementById("c_3");
  77. let spider = document.getElementById("spider");
  78. p_3.style.display = "none";
  79. btn_3.addEventListener("click", () => {
  80. if (p_3.style.display === "none") {
  81. p_3.style.display = "flex";
  82. spider.style.zIndex = "9";
  83. }
  84. else {
  85. p_3.style.display ="none";
  86. spider.style.zIndex = "0";
  87. }
  88. }
  89. );
  90. // button 4
  91. let btn_4 = document.querySelector("#b_4");
  92. let p_4= document.getElementById("c_4");
  93. let cube = document.getElementById("cube");
  94. p_4.style.display = "none";
  95. btn_4.addEventListener("click", () => {
  96. if (p_4.style.display === "none") {
  97. p_4.style.display = "flex";
  98. cube.style.zIndex = "9";
  99. }
  100. else {
  101. p_4.style.display ="none";
  102. cube.style.zIndex = "0";
  103. }
  104. }
  105. );
  106. // button 5
  107. let btn_5 = document.querySelector("#b_5");
  108. let p_5= document.getElementById("c_5");
  109. let offgrid = document.getElementById("offgrid");
  110. p_5.style.display = "none";
  111. btn_5.addEventListener("click", () => {
  112. if (p_5.style.display === "none") {
  113. p_5.style.display = "flex";
  114. offgrid.style.zIndex = "9";
  115. }
  116. else {
  117. p_5.style.display ="none";
  118. offgrid.style.zIndex = "0";
  119. }
  120. }
  121. );
  122. // button 6
  123. let btn_6 = document.querySelector("#b_6");
  124. let p_6= document.getElementById("c_6");
  125. let cyber = document.getElementById("cyber");
  126. p_6.style.display = "none";
  127. btn_6.addEventListener("click", () => {
  128. if (p_6.style.display === "none") {
  129. p_6.style.display = "flex";
  130. cyber.style.zIndex = "9";
  131. }
  132. else {
  133. p_6.style.display ="none";
  134. cyber.style.zIndex = "0";
  135. }
  136. }
  137. );
  138. // button 7
  139. let btn_7 = document.querySelector("#b_7");
  140. let p_7= document.getElementById("c_7");
  141. let machina = document.getElementById("machina");
  142. p_7.style.display = "none";
  143. btn_7.addEventListener("click", () => {
  144. if (p_7.style.display === "none") {
  145. p_7.style.display = "flex";
  146. machina.style.zIndex = "9";
  147. }
  148. else {
  149. p_7.style.display ="none";
  150. machina.style.zIndex = "0";
  151. }
  152. }
  153. );
  154. // button 8
  155. let btn_8 = document.querySelector("#b_8");
  156. let p_8= document.getElementById("c_8");
  157. let miner = document.getElementById("miner");
  158. p_8.style.display = "none";
  159. btn_8.addEventListener("click", () => {
  160. if (p_8.style.display === "none") {
  161. p_8.style.display = "flex";
  162. miner.style.zIndex = "9";
  163. }
  164. else {
  165. p_8.style.display ="none";
  166. miner.style.zIndex = "0";
  167. }
  168. }
  169. );
  170. // this function shows an element by id
  171. function show() {
  172. var x= document.getElementById("information");
  173. if (x.style.display === "none") {
  174. x.style.display = "flex"; }
  175. else {
  176. x.style.display ="none";
  177. }
  178. }
  179. //this function shows element2 by id -to be generalized
  180. function display() {
  181. var x= document.getElementById("footer-links");
  182. if (x.style.display === "none") {
  183. x.style.display = "flex";}
  184. else {
  185. x.style.display ="none";
  186. }
  187. }