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.

maran.html 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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"
  13. integrity="sha512-abc123..." crossorigin="anonymous" />
  14. <link rel="stylesheet" href="../css/app.css">
  15. </head>
  16. <body>
  17. <section class="section" style="max-height: 100vh;">
  18. <div class=""
  19. style="z-index: 3;background-color: #1F3F6D; min-height: 50px; display: flex; align-items: center;padding-left: 100px;">
  20. <h6 style="color: white;margin-right: 1em;" class=""><a style="color: white;" href="../index.html"><i
  21. class="fas fa-chevron-left"></i></a></h6>
  22. <h6 style="color: white;">Maran</h6>
  23. </div>
  24. <div class="text-center pt-5"
  25. style="background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 100px; z-index: 2; position: relative;">
  26. <button id="penternakan_btn" type="button" class="p-1"
  27. 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>
  28. </div>
  29. <div class="text-center pt-1"
  30. style="background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 0px; z-index: 1; position: relative;">
  31. <div class="pt-5 position-relative" style="width: 600px;height: 100px;margin-top: -300px;">
  32. <svg class="map-svg" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
  33. xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="300 200 650 650"
  34. style="enable-background: new 0 0 1080 1080" xml:space="preserve">
  35. <g>
  36. <a href="#" data-area="jerantut">
  37. <path id="maran" class="pahang-tengah"
  38. d="M690,649.3l0.1,0.1c-0.8,3.2-4.3,2.9-6.1,4.7c0,0,0,0,0,0c-5.5-0.8-10.9-1.6-16.4-2.5
  39. c-7.2-4.7-11.8-3-13.8,5.5c-0.5,2-1.6,3.9-2.4,5.8c-6.2,13.7-6.2,12.9-18.7,5.4c-10.8-6.4-15.7-20.3-29.5-22.6
  40. c-1-0.2-2.1-3.6-2.1-5.4v-0.2c0-9.2-5.8-14.2-13-18.4c-5.1-3.8-10.7-6.3-16.9-7.5c-4-0.8-8.2,0-12.3,0c-3.2,0-6.4-0.5-9.4-2.7
  41. c0.5-10.4-10.9-17.3-8.5-28c5.2-23-2.2-45.5-2.2-68.2c0-8-3.6-16-6-24c0.2-0.5,0.4-1,0.5-1.6c-0.6-5.2-5.2-6.1-8.9-7.8
  42. c-4.8-2.1-4.9-4.7-2.1-8.7c9.7-13.6,21.4-26.5,17-45.7c8.1,12.1,8.7,12.4,18.8,8.2c8.8,2.4,17.6,7.2,25.9-1.3c0-0.1,0-0.2,0-0.3
  43. c7.3,1.3,14.6,3.1,21.7-0.7c1.5,3.7,4.9,5.3,8.3,5.8c14.1,2,24.6,9.1,33.2,20.3c3.3,4.3,6.9,8.4,8.9,13.5c1.7,4.5,4.8,9.3,9.7,8.7
  44. c10.7-1.3,19.7,3.4,29.2,6.1c0.6,5.6-1.6,11.6,2.7,16.6c0.8,1.1,1.7,1.5,2.5,1.5c0.9,0,1.8-0.4,2.7-1.2c4.7-1.7,5.1-6.8,7.9-10
  45. c1.4,0.1,2.7,0.1,4.1,0.2c5,5.1,9.6,10.9,15.2,15.2c10,7.7,13.3,17.7,10,29.1c-4.6,15.7-5.6,33.5-22.1,43.5
  46. c-2.4,1.5-3.6,5.6-4.6,8.8c-1.4,4.7-3.5,8.8-6.7,12.1l0,0c-0.8,0.9-1.7,1.7-2.7,2.5l-2.1,1.6h0c-6.7,0.6-12,6.4-18.9,6.4
  47. c-1,0-2-0.1-3-0.4c-8,2.6-9.1,8.4-5.4,14.7C678.7,636.1,682.7,644,690,649.3z" />
  48. <text x="50" y="30" font-family="Poppins" font-size="17px" fill="black">Cameron Highlands</text>
  49. </a>
  50. </g>
  51. </svg>
  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:335px;left:355px"></div>
  53. </div>
  54. </div>
  55. <div id="penternakan_plot" class="content-div">
  56. <div class="text-center pt-5"
  57. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px;margin-top: 250px;">
  58. <h6>Penternakan</h6><br>
  59. </div>
  60. <div class="text-center pt-2 text-nowrap flex-wrap"
  61. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px; margin-top: 0;gap: 10px;padding-right: 100px;">
  62. <a href="../details/detail_hsd2384.html" style="" class="button-23 mb-2"
  63. role="button">HSD 2384</a>
  64. </div>
  65. </div>
  66. </section>
  67. <script>
  68. document.getElementById('pembangun_btn').addEventListener('click', function () {
  69. showDiv('pembangun_plot');
  70. });
  71. document.getElementById('penternakan_btn').addEventListener('click', function () {
  72. showDiv('penternakan_plot');
  73. });
  74. document.getElementById('pertanian_btn').addEventListener('click', function () {
  75. showDiv('pertanian_plot');
  76. });
  77. document.getElementById('industri_btn').addEventListener('click', function () {
  78. showDiv('industri_plot');
  79. });
  80. function showDiv(divId) {
  81. var divs = document.getElementsByClassName('content-div');
  82. for (var i = 0; i < divs.length; i++) {
  83. divs[i].classList.add('hidden');
  84. }
  85. document.getElementById(divId).classList.remove('hidden');
  86. }
  87. </script>
  88. <script>
  89. let maran = document.querySelector("#maran");
  90. addLabelText(maran, "Maran");
  91. function addLabelText(bgPath, labelText) {
  92. let bbox = bgPath.getBBox();
  93. let x = bbox.x + bbox.width / 2;
  94. let y = bbox.y + bbox.height / 2;
  95. // Create a <text> element
  96. let textElem = document.createElementNS(bgPath.namespaceURI, "text");
  97. // X axis
  98. if (labelText == "Bentong") {
  99. textElem.setAttribute("x", 286);
  100. } else if (labelText == "Pekan") {
  101. textElem.setAttribute("x", 870);
  102. } else if (labelText == "Cameron") {
  103. textElem.setAttribute("x", 75);
  104. } else {
  105. textElem.setAttribute("x", x);
  106. }
  107. // Y axis
  108. if (labelText == "Rompin") {
  109. textElem.setAttribute("y", 935);
  110. } else if (labelText == "Pekan") {
  111. textElem.setAttribute("y", 650);
  112. } else if (labelText == "Kuantan") {
  113. textElem.setAttribute("y", 440);
  114. } else if (labelText == "Cameron") {
  115. textElem.setAttribute("y", 130);
  116. } else if (labelText == "Highland") {
  117. textElem.setAttribute("y", 155);
  118. } else {
  119. textElem.setAttribute("y", y);
  120. }
  121. // Centre text horizontally at x,y
  122. textElem.setAttribute("text-anchor", "middle");
  123. // Give it a class that will determine the text size, colour, etc
  124. if (labelText == "Cameron" || labelText == "Highland") {
  125. textElem.classList.add("label-text-cameron");
  126. } else {
  127. textElem.classList.add("label-text");
  128. }
  129. // Set the text
  130. textElem.textContent = labelText;
  131. // Add this text element directly after the label background path
  132. bgPath.after(textElem);
  133. }
  134. </script>
  135. </body>
  136. </html>