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.

bentong.html 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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;">Bentong</h6>
  22. </div>
  23. <div class="text-center pt-5"
  24. style="z-index: 3;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: 325px;">
  30. <div class="pt-5 position-relative" style="width: 600px;height: 100px;margin-top: -450px;">
  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 250 650 650"
  33. style="enable-background: new 0 0 1080 1080" xml:space="preserve">
  34. <g>
  35. <a href="#" data-area="bentong">
  36. <path id="bentong" class="pahang-barat" d="M442.5,743.9c-7.8-2.7-7.4-11.3-4.9-12.5c14.5-7.3,7-22,11.8-32.4c2.1-4.5,1.4-8.7,7.8-10.3
  37. c5.5-1.4,9.2-6.8,7.6-12.6c-1.3-4.6-5.4-5.9-10-2.5c-0.8,0.6-4-0.2-4.3-1.1c-5.3-13.5-22.2-9.5-29.6-19.6c-1.8-2.5-3.7-1.4-5.4-0.1
  38. c-10.7,7.6-23.6,8.6-35.6,12.2c0,0,0,0,0,0c-12.3,7.4-15.5-1-18-10.4c-9.7-10.7-3.6-22.8-1.8-33.8c1.8-10.7-1.8-15.4-11.1-17.1
  39. c-8.3-1.5-12.3-5.1-12.4-14.2c-0.1-12.6-7.7-18.9-20.4-19c0,0,0,0,0,0c-0.8-0.3-1.6-0.6-2.4-0.8c-5.7-1-10.3-2-14-3.3
  40. c0.4,0.2,0.8,0.4,1.3,0.6c-1.5-0.2-2.9-0.8-4.2-1.7c-9.3-4.3-11.8-11.8-14.1-29.2c-0.3-2-1.4-4-2.1-5.9c0,0,0,0,0,0
  41. c-3.5-8.3-11.4-6.4-17.9-7.7c0,0,0,0,0,0c0,0,0,0,0,0c-1,0.1-2,0.1-3,0.2c-1.2,8.2-9,9.4-14.1,9.6c-8.8,0.3-13.6,5.3-18.8,10.5
  42. c0,0,0,0,0,0c0.1,1.7,0.5,3.5,0.1,5.1c-2.9,10.8,1.6,24-13.7,30.8c-9.7,4.3-10.3,17.9-5.6,28c4.6,9.8,12.9,22,4.5,30.7
  43. c-10.8,11.1-9.7,18.2-0.4,27.9c3.5,3.6,6.3,8,8.6,12.5c5.8,11.3,16.2,17.2,26.7,22.5c8.6,4.3,18.9,5.9,27.4,1.8
  44. c13.6-6.6,23-4.5,29.3,9.7c2.5,5.8,6.4,9.3,12.6,8.6c15-1.9,21.6,4.7,23.2,19.4c0.8,7.7,4.4,12.6,13,4.3
  45. c11.7-11.4,22.6-11,34.6-0.8c3.4,2.9,7.3,4.2,11.4,5.4c12.6,3.8,25.2,7.3,37.7,11.3c4.3,1.4,8.2,2,12-0.9
  46. C454.9,750.5,448.9,746.1,442.5,743.9z" />
  47. </a>
  48. </g>
  49. </svg>
  50. <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:478px;left:165px"></div>
  51. </div>
  52. </div>
  53. <div id="penternakan_plot" class="content-div">
  54. <div class="text-center pt-5"
  55. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px;margin-top: 250px;">
  56. <h6>Penternakan</h6><br>
  57. </div>
  58. <div class="text-center pt-2 text-nowrap flex-wrap"
  59. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px; margin-top: 0;gap: 10px;padding-right: 100px;">
  60. <a href="../details/detail_hsd19372.html" class="button-23 mb-2 mr-2"
  61. style="background-color: #1F9027; color: white; border: none;" role="button">HSD 19372</a>
  62. </div>
  63. </div>
  64. </section>
  65. <script>
  66. document.getElementById('pembangun_btn').addEventListener('click', function () {
  67. showDiv('pembangun_plot');
  68. });
  69. document.getElementById('penternakan_btn').addEventListener('click', function () {
  70. showDiv('penternakan_plot');
  71. });
  72. document.getElementById('pertanian_btn').addEventListener('click', function () {
  73. showDiv('pertanian_plot');
  74. });
  75. document.getElementById('industri_btn').addEventListener('click', function () {
  76. showDiv('industri_plot');
  77. });
  78. function showDiv(divId) {
  79. var divs = document.getElementsByClassName('content-div');
  80. for (var i = 0; i < divs.length; i++) {
  81. divs[i].classList.add('hidden');
  82. }
  83. document.getElementById(divId).classList.remove('hidden');
  84. }
  85. </script>
  86. <script>
  87. let bentong = document.querySelector("#bentong");
  88. addLabelText(bentong, "Bentong");
  89. function addLabelText(bgPath, labelText) {
  90. let bbox = bgPath.getBBox();
  91. let x = bbox.x + bbox.width / 2;
  92. let y = bbox.y + bbox.height / 2;
  93. // Create a <text> element
  94. let textElem = document.createElementNS(bgPath.namespaceURI, "text");
  95. // X axis
  96. if (labelText == "Bentong") {
  97. textElem.setAttribute("x", 286);
  98. } else if (labelText == "Pekan") {
  99. textElem.setAttribute("x", 870);
  100. } else if (labelText == "Cameron") {
  101. textElem.setAttribute("x", 75);
  102. } else {
  103. textElem.setAttribute("x", x);
  104. }
  105. // Y axis
  106. if (labelText == "Rompin") {
  107. textElem.setAttribute("y", 935);
  108. } else if (labelText == "Pekan") {
  109. textElem.setAttribute("y", 650);
  110. } else if (labelText == "Kuantan") {
  111. textElem.setAttribute("y", 440);
  112. } else if (labelText == "Cameron") {
  113. textElem.setAttribute("y", 130);
  114. } else if (labelText == "Highland") {
  115. textElem.setAttribute("y", 155);
  116. } else {
  117. textElem.setAttribute("y", y);
  118. }
  119. // Centre text horizontally at x,y
  120. textElem.setAttribute("text-anchor", "middle");
  121. // Give it a class that will determine the text size, colour, etc
  122. if (labelText == "Cameron" || labelText == "Highland") {
  123. textElem.classList.add("label-text-cameron");
  124. } else {
  125. textElem.classList.add("label-text");
  126. }
  127. // Set the text
  128. textElem.textContent = labelText;
  129. // Add this text element directly after the label background path
  130. bgPath.after(textElem);
  131. }
  132. </script>
  133. </body>
  134. </html>