123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <!DOCTYPE html>
- <html>
-
- <head>
- <meta charset="UTF-8">
- <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
- <!-- CSP is a PITA ;). Disabled, don't try this at home!-->
- <meta http-equiv="Content-Security-Policy" content="">
- <!-- include bulma css -->
- <link rel="stylesheet" href="bulma/css/bulma.min.css">
- <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-abc123..." crossorigin="anonymous" />
- <link rel="stylesheet" href="../css/app.css">
- <link rel="stylesheet" href="../css/animate.css">
- </head>
-
- <body>
- <section class="section" style="max-height: 100vh;">
-
- <div class=""
- style="z-index: 3;background-color: #1F3F6D; min-height: 50px; display: flex; align-items: center;padding-left: 100px;">
- <h6 style="color: white;margin-right: 1em;" class=""><a style="color: white;" href="../index.html"><i
- class="fas fa-chevron-left"></i></a></h6>
- <h6 style="color: white;">Raub</h6>
- </div>
-
- <div class="text-center pt-5"
- style=" z-index: 2; position: relative;background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 100px;">
- <button id="pembangun_btn" type="button" class="p-1"
- style="font-weight: 500; border-top: 4px solid #BF3030; border-right: none; border-bottom: none; border-left: none; margin: 0; background-color: transparent;">  Pembangunan  </button>
- <button id="pertanian_btn" type="button" class="p-1"
- style="font-weight: 500; border-top: 4px solid #E2E236; border-right: none; border-bottom: none; border-left: none; margin: 0; background-color: transparent;">  Pertanian  </button>
- </div>
-
- <div class="text-center pt-1"
- style="background-color: white; min-height: 50px; display: flex; justify-content: center; align-items: center; padding-left: 400px;">
- <div class="pt-5 position-relative" style="width: 600px;height: 100px;margin-top: -200px;">
- <svg class="map-svg" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="100 170 600 600"
- style="enable-background: new 0 0 1080 1080" xml:space="preserve">
- <g>
- <a href="#" data-area="jerantut">
- <path id="raub" class="pahang-barat"
- d="M353.9,410.6c-3.2,7.6-9.2,19.1-4.7,22.8c8.4,7,4,13.7,5,20.6c2.6,16.3-7.4,32.1-16.7,37.8
- c-13.2,8.1-9.9,13.7-6.7,23.2c1,3,0.4,6.6,0.5,9.9c-9.6,6.5-16.9,13.6-9.6,26.4c1.1,1.9-0.8,5.5-1.2,8.3c-1.3,1.6-2.3,4.3-3.8,4.6
- c-15,3.1-27.4-6.8-28.5-22.9c-0.4-5.5,0.3-11-4.9-14.7c0,0,0,0,0,0c-0.9-4.7-4.1-7.8-8.6-7.9c-7.1-0.1-11.7-3.5-15.5-9
- c-2.1-3.1-4.8-6.8-9.2-4.6c-5.5,2.8-2.9,7.4-0.7,10.8c5.1,8.1,0.3,11.2-6.4,11.4c-9.4,0.3-14.3,6-18.9,12.7
- c-4.9-1.5-8.4-4.5-9.1-9.6c-1.9-13.1-10.6-21.7-19.5-30.2c-3.1-3-6.7-5.9-11.1-5.2c-19.1,2.7-31.5-6.8-40.7-21.8
- c-8.2-13.6-29.8-22.3-16.1-44.4c2-3.3,0.3-10.9-4.2-13.8c-9.1-5.9-8.5-14.5-8.8-23.4c-0.3-13,4.4-27-7.6-38
- c-3.1-2.9,0-7.3,2.2-10.4c3.4-4.8,7.1-9.4,10.6-14.1c13.4-4,26.3-3.6,40.2-0.6c12.2,2.6,27,4,35.2-11.1c0.5,0,0.9-0.1,1.4,0
- c4.3,6.5,9.4,11.3,17.5,11.4c4.9,0.1,6.7,3,5.9,7.6c-2,12.2,3.8,16.3,14.2,15.6h5.9c0.1,0,0.3,0,0.4,0c3.3,0,5.6-1.3,6.2-4.9
- c2.3-13.1,18.5-13.1,23.6-24.1c0.7-1.5,10.7-0.1,15.4,2.1c5,2.4,0.3,6.8-0.8,9.8c-3.6,9.1,0,16.8,4.8,23.8
- c5.5,7.9,3.1,12.4-4.8,15.4c-4.9,1.8-9.2,4.8-7.3,10c2.8,7.5,9.6,13.1,16.5,15.9c5.8,2.3,12.1-2.1,16-7.7c1.7-2.4,3-5.1,4.7-7.5
- c3.4-4.6,5.9-11.9,12.6-11c6.3,0.9,13,3.9,12.1,13.2c-0.2,2,4.9,4.2,5.1,6.6C345.4,400.8,358.4,400.9,353.9,410.6z" />
- </a>
- </g>
- </svg>
-
- <div class="plot animate__animated animate__bounceIn pembangunan-point position-absolute" style="background-color: #BF3030; width: 0.8rem; height: 0.8rem;border: 2px solid white;border-radius: 600px;top:340px;left:160px"></div>
- <div class="plot animate__animated animate__bounceIn pertanian-point position-absolute hidden" style="background-color: #E2E236; width: 0.8rem; height: 0.8rem;border: 2px solid white;border-radius: 600px;top:355px;left:145px"></div>
-
- </div>
- </div>
-
-
- <div id="pembangun_plot" class="content-div">
- <div class="text-center pt-5"
- style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px;margin-top: 250px;">
- <h6>Pembangunan</h6><br>
-
- </div>
- <div class="text-center pt-2 text-nowrap flex-wrap"
- style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px; margin-top: 0;gap: 10px;padding-right: 100px;">
-
- <a href="../details/detail_hsd11863.html" class="button-23 mb-2 mr-2"
- style="background-color: #1F9027; color: white; border: none;" role="button">HSD 11863</a>
-
- </div>
- </div>
-
- <div id="pertanian_plot" class="hidden content-div">
- <div class="text-center pt-5"
- style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px;margin-top: 250px;">
- <h6>Pertanian</h6><br>
-
- </div>
- <div class="text-center pt-2 text-nowrap flex-wrap"
- style="background-color: white; display: flex; justify-content: left; align-items: left; padding-left: 100px; margin-top: 0;gap: 10px;padding-right: 100px;">
-
- <a href="../details/detail_hsd11991.html" class="button-23 mb-2 mr-2"
- style="background-color: #1F9027; color: white; border: none;" role="button">HSD 11991</a>
-
- </div>
- </div>
-
- </section>
-
- <script>
-
- document.getElementById('pembangun_btn').addEventListener('click', function () {
- showDiv('pembangun_plot');
- showPoint('pembangunan-point');
- });
-
-
-
- document.getElementById('pertanian_btn').addEventListener('click', function () {
- showDiv('pertanian_plot');
- showPoint('pertanian-point');
- });
-
-
-
- function showDiv(divId) {
- var divs = document.getElementsByClassName('content-div');
- for (var i = 0; i < divs.length; i++) {
- divs[i].classList.add('hidden');
- }
- document.getElementById(divId).classList.remove('hidden');
- }
-
- function showPoint(plotClass) {
- var divs = document.getElementsByClassName('plot');
- for (var i = 0; i < divs.length; i++) {
- divs[i].classList.add('hidden');
- }
- var plots = document.getElementsByClassName(plotClass);
- for (var i = 0; i < divs.length; i++) {
- plots[i].classList.remove('hidden');
- }
- }
-
- </script>
- <script>
- let raub = document.querySelector("#raub");
-
- addLabelText(raub, "Raub");
-
- function addLabelText(bgPath, labelText) {
- let bbox = bgPath.getBBox();
- let x = bbox.x + bbox.width / 2;
- let y = bbox.y + bbox.height / 2;
-
- // Create a <text> element
- let textElem = document.createElementNS(bgPath.namespaceURI, "text");
- // X axis
- if (labelText == "Bentong") {
- textElem.setAttribute("x", 286);
- } else if (labelText == "Pekan") {
- textElem.setAttribute("x", 870);
- } else if (labelText == "Cameron") {
- textElem.setAttribute("x", 75);
- } else {
- textElem.setAttribute("x", x);
- }
- // Y axis
- if (labelText == "Rompin") {
- textElem.setAttribute("y", 935);
- } else if (labelText == "Pekan") {
- textElem.setAttribute("y", 650);
- } else if (labelText == "Kuantan") {
- textElem.setAttribute("y", 440);
- } else if (labelText == "Cameron") {
- textElem.setAttribute("y", 130);
- } else if (labelText == "Highland") {
- textElem.setAttribute("y", 155);
- } else {
- textElem.setAttribute("y", y);
- }
- // Centre text horizontally at x,y
- textElem.setAttribute("text-anchor", "middle");
- // Give it a class that will determine the text size, colour, etc
- if (labelText == "Cameron" || labelText == "Highland") {
- textElem.classList.add("label-text-cameron");
- } else {
- textElem.classList.add("label-text");
- }
- // Set the text
- textElem.textContent = labelText;
- // Add this text element directly after the label background path
- bgPath.after(textElem);
- }
- </script>
-
- <script defer src="/ruta relativa a mi archivo .js"></script>
-
- </body>
-
- </html>
|