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.

pekan.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
  6. <!-- CSP is a PITA ;). Disabled, don't try this at home!-->
  7. <meta http-equiv="Content-Security-Policy" content="">
  8. <title>SIBS 2024</title>
  9. <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
  10. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
  11. integrity="sha512-abc123..." crossorigin="anonymous" />
  12. <link rel="stylesheet" href="../css/app.css">
  13. <link rel="stylesheet" href="../css/animate.css">
  14. </head>
  15. <body>
  16. <section class="section animate__animated animate__fadeIn" style="max-height: 100vh;">
  17. <div class=""
  18. style="z-index: 9999;background-color: #1F3F6D; min-height: 50px; display: flex; align-items: center;padding-left: 100px;">
  19. <h6 style="color: white;margin-right: 1em;" class=""><a style="color: white;" href="../index.html"><i
  20. class="fas fa-chevron-left"></i></a></h6>
  21. <h6 style="color: white;">Pekan</h6>
  22. </div>
  23. <div class="text-center pt-5"
  24. style="background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 100px; z-index: 2; position: relative;">
  25. <button id="penternakan_btn" type="button" class="p-1"
  26. style="font-weight: 500; border-top: 4px solid #3B47E0; border-right: none; border-bottom: none; border-left: none; margin: 0; background-color: transparent;">&emsp;&emsp;Penternakan&emsp;&emsp;</button>
  27. </div>
  28. <div class="text-center pt-1"
  29. style="margin-left: -150px;background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 0px; z-index: 1; position: relative;">
  30. <div class="pt-5 position-relative" style="width: 600px;height: 100px;margin-top: -400px;margin-left: -70px;">
  31. <svg class="map-svg" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
  32. xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-30 -30 1150 1150"
  33. style="enable-background: new 0 0 1080 1080" xml:space="preserve">
  34. <g>
  35. <a href="#" data-area="jerantut">
  36. <path id="pekan" class="pahang-timur" d="M999.1,601.2c-19.6,20.7-24.3,47.5-19.7,73.2c5.8,32.6,7.8,65.2,10.7,97.9c0.7,7.9-4.5,13.3-5.4,20.4
  37. c-1.9,14.3-1.8,28.6-2,43c-0.1,5.6,1,12.3-7.1,14.2h0c-3.9-1.5-7.8-4.4-11.7-4.3c-31,0.9-62-5.8-92.9,0.3
  38. c-4.4,0.9-8.9,3.4-13.1-0.6c0.8-5.1-2-8.1-6.3-9.7c-8.1-2.9-11.6-10.4-17.2-15.6c-9.7-8.8-9-23.1-20.1-31c-5.7-4-0.1-8.8,5.1-10.9
  39. c4.3-1.6,11.3-1.8,11.5-6.5c0.3-10.4,8.1-17.9,9-27.9c0.3-3.9,1-7.6-1.2-11c-9.5-15-20.5-29.3-24-47.3c-4-4.6-8.2-5.2-12.9-0.8
  40. c-3.4,3.2-7.1,6-10.7,9c-7.5,6.1-23.6,6.9-26.2,0.7c-2.6-6.4-5.6-10.4-12.9-8.8c-8.1,1.8-8.7,8.2-8.5,14.9
  41. c-6.8,5.4-11.3-1-14.7-4.3c-5-4.9-10.3-9.6-15.3-14.7c-4.9-5.1-9.5-10.4-13.1-16.6c-0.1-3.3-0.2-6.7-0.3-10
  42. c-0.5-1.9-1.5-3.3-2.8-4.5c-1.3-1.2-2.8-2.2-4.1-3.5c-1.5-2-3.2-3.9-4.5-6c-3.7-6-11.2-11.4-9.7-18.4c1.6-7.7,11.8-0.3,16.2-5.6
  43. c2.1-2.3,4.2-4.6,6.3-6.9l8.1-1.6l0,0c4.3-0.5,5.1-6.6,7.3-9.9c2.8-4.4,2.4-10.6,8.2-13.5c6.8-3.5,9-10.5,12.3-16.9
  44. c7-13.6,6.7-28.9,11.4-43c5.7,1.1,11.4,2.1,17.1,3.2c6.3,1.5,12.4,5,18.8,4.5l15.8,3.8l0,0c1.3,0.4,2.5,0.7,3.7,0.7h0l12.1,2.1
  45. c0.9,1.6,4,1.2,6.1,1.1c2.3,0.2,4.6,0.4,6.8,0.6v0c11.7,3.4,23.7,2,35.5,2.4c5.9,2.8,12.2,1.9,18.4,1.8c0,0,0,0,0,0h0
  46. c6.6,0.3,13.2,0.5,19.8,0.8c5,2.8,10.5,1.9,15.8,1.8v0c12.7,0.2,25.5,0.4,38.2,0.6c22.2,3.3,28.7,25.1,43.4,37.3
  47. C1004,588.3,1004.5,595.5,999.1,601.2z" />
  48. </a>
  49. </g>
  50. </svg>
  51. <div class="plot animate__animated animate__bounceIn pembangunan-point position-absolute" style="background-color: #3B47E0; width: 0.8rem; height: 0.8rem;border: 2px solid white;border-radius: 600px;top:351px;left:497px"></div>
  52. <div class="plot animate__animated animate__bounceIn pembangunan-point position-absolute" style="background-color: #3B47E0; width: 0.8rem; height: 0.8rem;border: 2px solid white;border-radius: 600px;top:374px;left:516px"></div>
  53. <div class="plot animate__animated animate__bounceIn pembangunan-point position-absolute" style="background-color: #3B47E0; width: 0.8rem; height: 0.8rem;border: 2px solid white;border-radius: 760px;;top:488px;left:511px"></div>
  54. </div>
  55. </div>
  56. <div id="pertanian_plot" class="content-div">
  57. <div class="text-center pt-5"
  58. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px;margin-top: 250px;">
  59. <h6>Pertanian</h6><br>
  60. </div>
  61. <div class="text-center pt-2 text-nowrap flex-wrap"
  62. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px; margin-top: 0;gap: 10px;padding-right: 100px;z-index: 2; position: relative;">
  63. <a href="../details/detail_hsd5621.html" class="button-23 mb-2 mr-2"
  64. style="background-color: #1F9027; color: white; border: none;" role="button">HSD 5621</a>
  65. <a href="../details/detail_hsd5627.html" class="button-23 mb-2 mr-2"
  66. style="background-color: #1F9027; color: white; border: none;" role="button">HSD 5627</a>
  67. <a href="../details/detail_hsd5625.html" class="button-23 mb-2 mr-2"
  68. style="background-color: #1F9027; color: white; border: none;" role="button">HSD 5625</a>
  69. </div>
  70. </div>
  71. </section>
  72. <script>
  73. document.getElementById('pembangun_btn').addEventListener('click', function () {
  74. showDiv('pembangun_plot');
  75. });
  76. document.getElementById('penternakan_btn').addEventListener('click', function () {
  77. showDiv('penternakan_plot');
  78. });
  79. document.getElementById('pertanian_btn').addEventListener('click', function () {
  80. showDiv('pertanian_plot');
  81. });
  82. document.getElementById('industri_btn').addEventListener('click', function () {
  83. showDiv('industri_plot');
  84. });
  85. function showDiv(divId) {
  86. var divs = document.getElementsByClassName('content-div');
  87. for (var i = 0; i < divs.length; i++) {
  88. divs[i].classList.add('hidden');
  89. }
  90. document.getElementById(divId).classList.remove('hidden');
  91. }
  92. </script>
  93. <script>
  94. let bentong = document.querySelector("#bentong");
  95. addLabelText(bentong, "Bentong");
  96. function addLabelText(bgPath, labelText) {
  97. let bbox = bgPath.getBBox();
  98. let x = bbox.x + bbox.width / 2;
  99. let y = bbox.y + bbox.height / 2;
  100. // Create a <text> element
  101. let textElem = document.createElementNS(bgPath.namespaceURI, "text");
  102. // X axis
  103. if (labelText == "Bentong") {
  104. textElem.setAttribute("x", 286);
  105. } else if (labelText == "Pekan") {
  106. textElem.setAttribute("x", 870);
  107. } else if (labelText == "Cameron") {
  108. textElem.setAttribute("x", 75);
  109. } else {
  110. textElem.setAttribute("x", x);
  111. }
  112. // Y axis
  113. if (labelText == "Rompin") {
  114. textElem.setAttribute("y", 935);
  115. } else if (labelText == "Pekan") {
  116. textElem.setAttribute("y", 650);
  117. } else if (labelText == "Kuantan") {
  118. textElem.setAttribute("y", 440);
  119. } else if (labelText == "Cameron") {
  120. textElem.setAttribute("y", 130);
  121. } else if (labelText == "Highland") {
  122. textElem.setAttribute("y", 155);
  123. } else {
  124. textElem.setAttribute("y", y);
  125. }
  126. // Centre text horizontally at x,y
  127. textElem.setAttribute("text-anchor", "middle");
  128. // Give it a class that will determine the text size, colour, etc
  129. if (labelText == "Cameron" || labelText == "Highland") {
  130. textElem.classList.add("label-text-cameron");
  131. } else {
  132. textElem.classList.add("label-text");
  133. }
  134. // Set the text
  135. textElem.textContent = labelText;
  136. // Add this text element directly after the label background path
  137. bgPath.after(textElem);
  138. }
  139. </script>
  140. <script>
  141. let pekan = document.querySelector("#pekan");
  142. addLabelText(pekan, "Pekan");
  143. function addLabelText(bgPath, labelText) {
  144. let bbox = bgPath.getBBox();
  145. let x = bbox.x + bbox.width / 2;
  146. let y = bbox.y + bbox.height / 2;
  147. // Create a <text> element
  148. let textElem = document.createElementNS(bgPath.namespaceURI, "text");
  149. // X axis
  150. if (labelText == "Bentong") {
  151. textElem.setAttribute("x", 286);
  152. } else if (labelText == "Pekan") {
  153. textElem.setAttribute("x", 870);
  154. } else if (labelText == "Cameron") {
  155. textElem.setAttribute("x", 75);
  156. } else {
  157. textElem.setAttribute("x", x);
  158. }
  159. // Y axis
  160. if (labelText == "Rompin") {
  161. textElem.setAttribute("y", 935);
  162. } else if (labelText == "Pekan") {
  163. textElem.setAttribute("y", 650);
  164. } else if (labelText == "Kuantan") {
  165. textElem.setAttribute("y", 440);
  166. } else if (labelText == "Cameron") {
  167. textElem.setAttribute("y", 130);
  168. } else if (labelText == "Highland") {
  169. textElem.setAttribute("y", 155);
  170. } else {
  171. textElem.setAttribute("y", y);
  172. }
  173. // Centre text horizontally at x,y
  174. textElem.setAttribute("text-anchor", "middle");
  175. // Give it a class that will determine the text size, colour, etc
  176. if (labelText == "Cameron" || labelText == "Highland") {
  177. textElem.classList.add("label-text-cameron");
  178. } else {
  179. textElem.classList.add("label-text");
  180. }
  181. // Set the text
  182. textElem.textContent = labelText;
  183. // Add this text element directly after the label background path
  184. bgPath.after(textElem);
  185. }
  186. </script>
  187. </body>
  188. </html>