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.

bera.html 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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. <!-- include bulma css -->
  9. <link rel="stylesheet" href="bulma/css/bulma.min.css">
  10. <title>SIBS 2024</title>
  11. <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
  12. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-abc123..." crossorigin="anonymous" />
  13. <link rel="stylesheet" href="../css/app.css">
  14. </head>
  15. <body>
  16. <section class="section" style="max-height: 100vh;">
  17. <div class=""
  18. style="z-index: 3;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;">Bera</h6>
  22. </div>
  23. <div class="text-center pt-5"
  24. style="z-index: 2;background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 100px;">
  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="background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 100px;">
  30. <div class="pt-5 position-relative" style="width: 600px;height: 100px;margin-top: -550px;">
  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="200 201 750 750"
  33. style="enable-background: new 0 0 1080 1080" xml:space="preserve">
  34. <g>
  35. <a href="#" data-area="bera">
  36. <path id="bera" class="pahang-barat" d="M671.1,911.5c-13.5-10.7-16-25.6-11-39.9c3.5-9.9,3.3-18.5,2.3-28.1c-0.4-3.6,1.4-7.4,2.1-11.1c0,0,0,0,0,0
  37. c0,0,0,0,0,0c0.4-1.2,0.6-2.4,1.2-3.5c6.1-10.4,13.1-20.5-1.6-30c-2.9-1.9-4.8-5.7-4.9-9.8c-5.1-8.2,2.4-18.2-3.8-26.6
  38. c-1.3-1.7,2.9-6.3,5.6-5.3c10.6,3.9,16.1-5.2,26.9-8.8c-19.9-13.4-34.9-29-49.3-45.4c0,0,0,0,0,0c-7.1-8.3,1.1-17-0.6-25.4
  39. c-9.3-4.9-17.2-11.7-24.6-19c-3.3-3.3-6-6.6-11.3-7c-4.1-0.2-7.5-2.6-6.7-7.3c1.6-9.6-5.2-14.4-10.6-20c0,0,0,0,0,0
  40. c-7.7-3.4-15.5-6-24.3-5.3c-9.7,0.7-14.8,9.7-14.3,14.9c2.4,24.5-8.5,29-34.4,27.1c-5.6-0.4-11.2-2.5-16.8-4.7
  41. c-9.8-3.9-20.4-5.5-29.2,3.3c0,0,0,0,0,0c-1,3-3.9,6-0.3,9.1c10.7,9.1,4.2,17.9-3,22.9c-11.4,7.9-10.2,18.9-11.1,29.7
  42. c-0.2,2.2,2.3,5.7,0,6.9c-14.3,7.3-3.1,12,1.6,17.1c6.2,6.6,5.2,11.7-2.6,15.9c3.9,4.8,9.8,4.8,15,5.2
  43. c22.6,1.7,39.6,11.4,51.4,31.4c5,8.5,10.2,17.6,18.8,23.5c25.9,17.5,51.8,35,77.7,52.3c3.1,2.1,6.7,4.7,10.1,4.7
  44. c9.9,0.1,13.8,6.2,14.9,14.1c1.7,12.4,8.8,18,20.5,19.7c5,0.7,9.8,2.4,14.7,3.7C672.9,914.3,672.4,912.5,671.1,911.5z" />
  45. </a>
  46. </g>
  47. </svg>
  48. <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: 469px;left: 208px;"></div>
  49. </div>
  50. </div>
  51. <div id="penternakan_plot" class="content-div">
  52. <div class="text-center pt-5"
  53. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px;margin-top: 250px;">
  54. <h6>Penternakan</h6><br>
  55. </div>
  56. <div class="text-center pt-2 text-nowrap flex-wrap"
  57. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px; margin-top: 0;gap: 10px;padding-right: 100px;">
  58. <a href="../details/detail_hsd10006.html" class="button-23 mb-2 mr-2"
  59. style="background-color: #1F9027; color: white; border: none;" role="button">HSD 10006</a>
  60. </div>
  61. </div>
  62. </section>
  63. <script>
  64. document.getElementById('pembangun_btn').addEventListener('click', function () {
  65. showDiv('pembangun_plot');
  66. });
  67. document.getElementById('penternakan_btn').addEventListener('click', function () {
  68. showDiv('penternakan_plot');
  69. });
  70. document.getElementById('pertanian_btn').addEventListener('click', function () {
  71. showDiv('pertanian_plot');
  72. });
  73. document.getElementById('industri_btn').addEventListener('click', function () {
  74. showDiv('industri_plot');
  75. });
  76. function showDiv(divId) {
  77. var divs = document.getElementsByClassName('content-div');
  78. for (var i = 0; i < divs.length; i++) {
  79. divs[i].classList.add('hidden');
  80. }
  81. document.getElementById(divId).classList.remove('hidden');
  82. }
  83. </script>
  84. <script>
  85. let bera = document.querySelector("#bera");
  86. addLabelText(bera, "Bera");
  87. function addLabelText(bgPath, labelText) {
  88. let bbox = bgPath.getBBox();
  89. let x = bbox.x + bbox.width / 2;
  90. let y = bbox.y + bbox.height / 2;
  91. // Create a <text> element
  92. let textElem = document.createElementNS(bgPath.namespaceURI, "text");
  93. // X axis
  94. if (labelText == "Bentong") {
  95. textElem.setAttribute("x", 286);
  96. } else if (labelText == "Pekan") {
  97. textElem.setAttribute("x", 870);
  98. } else if (labelText == "Cameron") {
  99. textElem.setAttribute("x", 75);
  100. } else {
  101. textElem.setAttribute("x", x);
  102. }
  103. // Y axis
  104. if (labelText == "Rompin") {
  105. textElem.setAttribute("y", 935);
  106. } else if (labelText == "Pekan") {
  107. textElem.setAttribute("y", 650);
  108. } else if (labelText == "Kuantan") {
  109. textElem.setAttribute("y", 440);
  110. } else if (labelText == "Cameron") {
  111. textElem.setAttribute("y", 130);
  112. } else if (labelText == "Highland") {
  113. textElem.setAttribute("y", 155);
  114. } else {
  115. textElem.setAttribute("y", y);
  116. }
  117. // Centre text horizontally at x,y
  118. textElem.setAttribute("text-anchor", "middle");
  119. // Give it a class that will determine the text size, colour, etc
  120. if (labelText == "Cameron" || labelText == "Highland") {
  121. textElem.classList.add("label-text-cameron");
  122. } else {
  123. textElem.classList.add("label-text");
  124. }
  125. // Set the text
  126. textElem.textContent = labelText;
  127. // Add this text element directly after the label background path
  128. bgPath.after(textElem);
  129. }
  130. </script>
  131. </body>
  132. </html>