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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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: 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;">Maran</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="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: -300px;">
  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="300 200 650 650"
  33. style="enable-background: new 0 0 1080 1080" xml:space="preserve">
  34. <g>
  35. <a href="#" data-area="jerantut">
  36. <path id="maran" class="pahang-tengah"
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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" />
  47. <text x="50" y="30" font-family="Poppins" font-size="17px" fill="black">Cameron Highlands</text>
  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:335px;left:355px"></div>
  52. </div>
  53. </div>
  54. <div id="penternakan_plot" class="content-div">
  55. <div class="text-center pt-5"
  56. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px;margin-top: 250px;">
  57. <h6>Penternakan</h6><br>
  58. </div>
  59. <div class="text-center pt-2 text-nowrap flex-wrap"
  60. style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px; margin-top: 0;gap: 10px;padding-right: 100px;">
  61. <a href="../details/detail_hsd2384.html" style="" class="button-23 mb-2"
  62. role="button">HSD 2384</a>
  63. </div>
  64. </div>
  65. </section>
  66. <script>
  67. document.getElementById('pembangun_btn').addEventListener('click', function () {
  68. showDiv('pembangun_plot');
  69. });
  70. document.getElementById('penternakan_btn').addEventListener('click', function () {
  71. showDiv('penternakan_plot');
  72. });
  73. document.getElementById('pertanian_btn').addEventListener('click', function () {
  74. showDiv('pertanian_plot');
  75. });
  76. document.getElementById('industri_btn').addEventListener('click', function () {
  77. showDiv('industri_plot');
  78. });
  79. function showDiv(divId) {
  80. var divs = document.getElementsByClassName('content-div');
  81. for (var i = 0; i < divs.length; i++) {
  82. divs[i].classList.add('hidden');
  83. }
  84. document.getElementById(divId).classList.remove('hidden');
  85. }
  86. </script>
  87. <script>
  88. let maran = document.querySelector("#maran");
  89. addLabelText(maran, "Maran");
  90. function addLabelText(bgPath, labelText) {
  91. let bbox = bgPath.getBBox();
  92. let x = bbox.x + bbox.width / 2;
  93. let y = bbox.y + bbox.height / 2;
  94. // Create a <text> element
  95. let textElem = document.createElementNS(bgPath.namespaceURI, "text");
  96. // X axis
  97. if (labelText == "Bentong") {
  98. textElem.setAttribute("x", 286);
  99. } else if (labelText == "Pekan") {
  100. textElem.setAttribute("x", 870);
  101. } else if (labelText == "Cameron") {
  102. textElem.setAttribute("x", 75);
  103. } else {
  104. textElem.setAttribute("x", x);
  105. }
  106. // Y axis
  107. if (labelText == "Rompin") {
  108. textElem.setAttribute("y", 935);
  109. } else if (labelText == "Pekan") {
  110. textElem.setAttribute("y", 650);
  111. } else if (labelText == "Kuantan") {
  112. textElem.setAttribute("y", 440);
  113. } else if (labelText == "Cameron") {
  114. textElem.setAttribute("y", 130);
  115. } else if (labelText == "Highland") {
  116. textElem.setAttribute("y", 155);
  117. } else {
  118. textElem.setAttribute("y", y);
  119. }
  120. // Centre text horizontally at x,y
  121. textElem.setAttribute("text-anchor", "middle");
  122. // Give it a class that will determine the text size, colour, etc
  123. if (labelText == "Cameron" || labelText == "Highland") {
  124. textElem.classList.add("label-text-cameron");
  125. } else {
  126. textElem.classList.add("label-text");
  127. }
  128. // Set the text
  129. textElem.textContent = labelText;
  130. // Add this text element directly after the label background path
  131. bgPath.after(textElem);
  132. }
  133. </script>
  134. </body>
  135. </html>