پرش به محتوا

لوکیشن/دماوند پلیمر - فراغیب

از فراغیب
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
خط ۱: خط ۱:
<html>


<div style="width: 100%; max-width: 1000px; font-family: Tahoma, sans-serif;">
<html lang="fa" dir="rtl">
  <!-- نقشه اصلی -->
<head>
   <div style="position: relative; border: 1px solid #ccc; border-radius: 12px; overflow: hidden;">
   <meta charset="UTF-8" />
    <div id="osm-map-container">
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <iframe id="dynamic-map" width="100%" height="250" style="border: none; display: block;" loading="lazy"></iframe>
  <meta name="description" content="نمایش موقعیت روی نقشه به همراه دکمه‌های مسیریابی، تماس و اشتراک‌گذاری با طراحی ریسپانسیو و افکت حرفه‌ای." />
</div>
  <meta name="robots" content="index,follow" />
  <title>نقشه موقعیت و راه‌های ارتباطی</title>


<script>
  <style>
     // --- تنظیمات ساده برای شما ---
     :root {
    const lat = 35.515761827084475; // عرض جغرافیایی
      --radius: 12px;
    const lon = 51.15124735976357; // طول جغرافیایی
      --radius-sm: 10px;
    const zoomLevel = 0.005;        // هرچه عدد کوچک‌تر باشد، زوم بیشتر است (مثلاً 0.002 برای زوم خیلی نزدیک)
      --transition: 0.35s ease;
      --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.08);
      --shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.14);
      --map-border: #d9d9d9;


    // --- محاسبه خودکار محدوده (bbox) ---
      --route-bg: #e3f2fd;
    const minLon = lon - zoomLevel;
      --route-text: #1976d2;
    const minLat = lat - zoomLevel;
      --route-border: #bbdefb;
    const maxLon = lon + zoomLevel;
    const maxLat = lat + zoomLevel;


    // --- ساخت آدرس نهایی ---
      --call-bg: #e8f5e9;
    const mapUrl = `https://www.openstreetmap.org/export/embed.html?bbox=${minLon},${minLat},${maxLon},${maxLat}&layer=mapnik&marker=${lat},${lon}`;
      --call-text: #388e3c;
   
      --call-border: #c8e6c9;
    // --- اعمال به iframe ---
    document.getElementById('dynamic-map').src = mapUrl;
</script>


  </div>
      --share-bg: #fff3e0;
      --share-text: #f57c00;
      --share-border: #ffe0b2;
    }


    * {
      box-sizing: border-box;
    }


<!--    35.515761827084475,51.15124735976357    --->
     html {
  <!-- دکمه‌های زیر نقشه -->
       scroll-behavior: smooth;
  <div style="display: flex; gap: 10px; margin-top: 15px;">
     }
     <a href="https://neshan.org/maps/places/35.515761827084475,51.15124735976357" target="_blank" style="flex: 1; padding: 12px; text-align: center; background: #e3f2fd; color: #1976d2; border-radius: 8px; text-decoration: none; font-weight: bold; border: 1px solid #bbdefb;">
       مسیریابی
    </a>
    <a href="tel:09123005025" style="flex: 1; padding: 12px; text-align: center; background: #e8f5e9; color: #388e3c; border-radius: 8px; text-decoration: none; font-weight: bold; border: 1px solid #c8e6c9;">
      تماس
     </a>
    <button onclick="navigator.clipboard.writeText(window.location.href); alert('لینک کپی شد!');" style="flex: 1; padding: 12px; text-align: center; background: #fff3e0; color: #f57c00; border-radius: 8px; text-decoration: none; font-weight: bold; border: 1px solid #ffe0b2; cursor: pointer;">
      اشتراک‌گذاری
    </button>
  </div>
</div>


    body {
      margin: 0;
      font-family: Tahoma, sans-serif;
      background: #ffffff;
      color: #222;
      line-height: 1.6;
    }
 
    .location-card {
      width: 100%;
      max-width: 1000px;
      margin: 0 auto;
      padding: 0 12px;
    }
 
    .map-frame {
      position: relative;
      overflow: hidden;
      border: 1px solid var(--map-border);
      border-radius: var(--radius);
      background: #f8f8f8;
    }
 
    .map-frame iframe {
      display: block;
      width: 100%;
      height: 250px;
      border: 0;
    }
 
    .action-buttons {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      margin-top: 15px;
    }
 
    .action-btn {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 50px;
      padding: 12px 16px;
      border-radius: var(--radius-sm);
      border: 1px solid transparent;
      text-decoration: none;
      font-weight: 700;
      font-size: 15px;
      text-align: center;
      cursor: pointer;
      overflow: hidden;
      isolation: isolate;
      transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition),
        background-color var(--transition),
        color var(--transition);
      will-change: transform;
      -webkit-tap-highlight-color: transparent;
    }
 
    .action-btn::before {
      content: "";
      position: absolute;
      right: -30%;
      bottom: -120%;
      width: 42%;
      height: 240%;
      transform: rotate(28deg);
      background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.18) 25%,
        rgba(255, 255, 255, 0.62) 50%,
        rgba(255, 255, 255, 0.18) 75%,
        rgba(255, 255, 255, 0) 100%
      );
      opacity: 0;
      pointer-events: none;
      z-index: 0;
    }
 
    .action-btn span {
      position: relative;
      z-index: 1;
      white-space: nowrap;
    }
 
    .action-btn:hover,
    .action-btn:focus-visible {
      transform: translateY(-4px);
      box-shadow: var(--shadow-hover);
    }
 
    .action-btn:hover::before,
    .action-btn:focus-visible::before {
      opacity: 1;
      animation: buttonShine 0.9s ease forwards;
    }
 
    .action-btn:focus-visible {
      outline: 2px solid rgba(25, 118, 210, 0.35);
      outline-offset: 3px;
    }
 
    .action-btn:active {
      transform: translateY(-1px);
      box-shadow: var(--shadow-soft);
    }
 
    .route-btn {
      background: var(--route-bg);
      color: var(--route-text);
      border-color: var(--route-border);
    }
 
    .call-btn {
      background: var(--call-bg);
      color: var(--call-text);
      border-color: var(--call-border);
    }
 
    .share-btn {
      background: var(--share-bg);
      color: var(--share-text);
      border-color: var(--share-border);
    }
 
    @keyframes buttonShine {
      0% {
        right: -30%;
        bottom: -120%;
        opacity: 0;
      }
      15% {
        opacity: 1;
      }
      100% {
        right: 78%;
        bottom: 105%;
        opacity: 0;
      }
    }
 
    @media (max-width: 768px) {
      .map-frame iframe {
        height: 220px;
      }
 
      .action-buttons {
        grid-template-columns: 1fr;
      }
 
      .action-btn {
        width: 100%;
        min-height: 48px;
        font-size: 14px;
      }
 
      .action-btn span {
        white-space: normal;
      }
    }
 
    @media (prefers-reduced-motion: reduce) {
      .action-btn,
      .action-btn::before {
        transition: none;
        animation: none !important;
      }
 
      .action-btn:hover,
      .action-btn:focus-visible,
      .action-btn:active {
        transform: none;
      }
 
      .action-btn:hover::before,
      .action-btn:focus-visible::before {
        opacity: 0;
      }
    }
  </style>
</head>
<body>
  <main class="location-card">
    <section aria-label="نقشه موقعیت">
      <div class="map-frame">
        <div id="osm-map-container">
          <iframe
            id="dynamic-map"
            loading="lazy"
            referrerpolicy="no-referrer-when-downgrade"
            title="نقشه موقعیت"
            aria-label="نقشه موقعیت مکانی"
          ></iframe>
        </div>
 
        <script>
          const lat = 35.515761827084475;
          const lon = 51.15124735976357;
          const zoomLevel = 0.005;
 
          const minLon = lon - zoomLevel;
          const minLat = lat - zoomLevel;
          const maxLon = lon + zoomLevel;
          const maxLat = lat + zoomLevel;
 
          const mapUrl = `https://www.openstreetmap.org/export/embed.html?bbox=${minLon},${minLat},${maxLon},${maxLat}&layer=mapnik&marker=${lat},${lon}`;
 
          document.getElementById("dynamic-map").src = mapUrl;
        </script>
      </div>
    </section>
 
    <nav class="action-buttons" aria-label="راه‌های ارتباطی و دسترسی">
      <a
        href="https://neshan.org/maps/places/35.515761827084475,51.15124735976357"
        target="_blank"
        rel="noopener noreferrer"
        class="action-btn route-btn"
        title="مشاهده مسیر روی نقشه"
        aria-label="مسیریابی به این موقعیت"
      >
        <span>مسیریابی</span>
      </a>
 
      <a
        href="tel:09123005025"
        class="action-btn call-btn"
        title="تماس با این شماره"
        aria-label="تماس با شماره ۰۹۱۲۳۰۰۵۰۲۵"
      >
        <span>تماس</span>
      </a>
 
      <button
        type="button"
        class="action-btn share-btn"
        title="اشتراک‌گذاری لینک این صفحه"
        aria-label="اشتراک‌گذاری لینک صفحه"
        onclick="sharePage()"
      >
        <span>اشتراک‌گذاری</span>
      </button>
    </nav>
  </main>
 
  <script>
    async function sharePage() {
      const pageUrl = window.location.href;
 
      try {
        if (navigator.share) {
          await navigator.share({
            title: document.title,
            url: pageUrl
          });
        } else if (navigator.clipboard) {
          await navigator.clipboard.writeText(pageUrl);
          alert("لینک کپی شد!");
        } else {
          alert("امکان اشتراک‌گذاری در این مرورگر در دسترس نیست.");
        }
      } catch (error) {
        console.error("Share failed:", error);
      }
    }
  </script>
</body>
</html>
</html>

نسخهٔ ‏۴ اوت ۲۰۲۶، ساعت ۰۶:۳۳

نقشه موقعیت و راه‌های ارتباطی