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.

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