api/templates/base.html.twig
2026-03-17 12:30:28 +00:00

717 lines
No EOL
31 KiB
Twig

<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Primary Meta Tags -->
<title>{% block title %}Memaps.ir - سرویس نقشه رستری ایرانی با کیفیت بالا{% endblock %}</title>
<meta name="title" content="{% block meta_title %}Memaps.ir - سرویس نقشه رستری ایرانی با کیفیت بالا{% endblock %}">
<meta name="description" content="{% block description %}سرویس نقشه می‌مپس - ارائه نقشه‌های رستری با کیفیت بالا، سرورهای ایرانی، بدون نیاز به API، به‌روزرسانی روزانه از OpenStreetMap{% endblock %}">
<meta name="keywords" content="{% block keywords %}نقشه, رستری, تایل سرور, می‌مپس, نقشه ایران, OpenStreetMap, Leaflet, OpenLayers, نقشه آنلاین, سرویس نقشه ایرانی{% endblock %}">
<meta name="author" content="Memaps.ir">
<meta name="robots" content="index, follow">
<meta name="language" content="Persian">
<meta name="revisit-after" content="7 days">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://memaps.ir{{ app.request.requestUri }}">
<meta property="og:title" content="{% block og_title %}Memaps.ir - سرویس نقشه رستری ایرانی{% endblock %}">
<meta property="og:description" content="{% block og_description %}سرویس نقشه می‌مپس - ارائه نقشه‌های رستری با کیفیت بالا، سرورهای ایرانی، بدون نیاز به API{% endblock %}">
<meta property="og:image" content="{% block og_image %}https://memaps.ir/assets/images/og-image.jpg{% endblock %}">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:site_name" content="Memaps.ir">
<meta property="og:locale" content="fa_IR">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://memaps.ir{{ app.request.requestUri }}">
<meta property="twitter:title" content="{% block twitter_title %}Memaps.ir - سرویس نقشه رستری ایرانی{% endblock %}">
<meta property="twitter:description" content="{% block twitter_description %}سرویس نقشه می‌مپس - ارائه نقشه‌های رستری با کیفیت بالا، سرورهای ایرانی{% endblock %}">
<meta property="twitter:image" content="{% block twitter_image %}https://memaps.ir/assets/images/twitter-image.jpg{% endblock %}">
<!-- Additional SEO Meta Tags -->
<meta name="geo.region" content="IR">
<meta name="geo.placename" content="Iran">
<meta name="geo.position" content="32.4279;53.6880">
<meta name="ICBM" content="32.4279, 53.6880">
<meta name="DC.title" content="Memaps.ir - سرویس نقشه رستری">
<meta name="DC.description" content="سرویس نقشه می‌مپس - ارائه نقشه‌های رستری با کیفیت بالا">
<meta name="DC.language" content="fa">
<meta name="DC.coverage" content="World">
<meta name="DC.subject" content="Maps, GIS, OpenStreetMap">
<!-- Canonical URL -->
<link rel="canonical" href="https://memaps.ir{{ app.request.requestUri }}">
<!-- Alternate Languages (فقط نسخه فارسی؛ لینک en حذف شده تا به 404 نرود) -->
<link rel="alternate" hreflang="fa" href="https://memaps.ir{{ app.request.requestUri }}">
<link rel="alternate" hreflang="x-default" href="https://memaps.ir{{ app.request.requestUri }}">
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="{{ asset('favicon.svg') }}">
<link rel="shortcut icon" href="{{ asset('favicon.svg') }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('assets/images/apple-touch-icon.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('assets/images/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('assets/images/favicon-16x16.png') }}">
<link rel="manifest" href="{{ asset('site.webmanifest') }}">
<meta name="theme-color" content="#667eea">
<!-- Preconnect to external domains -->
<link rel="preconnect" href="https://cdn.jsdelivr.net">
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
<!-- Bootstrap RTL CSS -->
<link rel="stylesheet" href="{{ asset('assets/bootstrap/bootstrap.rtl.min.css') }}">
<!-- Leaflet CSS -->
{% block leaflet_css %}
<link rel="stylesheet" href="{{ asset('assets/leaflet/leaflet.css') }}">
{% endblock %}
<!-- Structured Data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "Memaps.ir",
"alternateName": "می‌مپس",
"url": "https://memaps.ir",
"description": "سرویس نقشه می‌مپس - ارائه نقشه‌های رستری با کیفیت بالا، سرورهای ایرانی، بدون نیاز به API"
}
</script>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Memaps.ir",
"alternateName": "می‌مپس",
"url": "https://memaps.ir",
"description": "سرویس نقشه می‌مپس - ارائه نقشه‌های رستری با کیفیت بالا، سرورهای ایرانی، بدون نیاز به API",
"email": "info@memaps.ir"
}
</script>
<!-- Custom Styles -->
<style>
@font-face {
font-family: 'Vazirmatn';
src: url('{{ asset('assets/fonts/Vazirmatn-Regular.ttf') }}') format('truetype');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Vazirmatn';
src: url('{{ asset('assets/fonts/Vazirmatn-Bold.ttf') }}') format('truetype');
font-weight: 700;
font-style: normal;
font-display: swap;
}
body {
font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}
.navbar-brand {
font-weight: 700;
font-size: 1.5rem;
}
.hero-section {
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
min-height: 100vh;
display: flex;
align-items: center;
position: relative;
overflow: hidden;
}
.hero-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
opacity: 0.3;
}
/* Hero buttons styling */
.hero-section .btn-light {
background: rgba(255, 255, 255, 0.95);
border: none;
color: #667eea;
font-weight: 600;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
}
.hero-section .btn-light:hover {
background: rgba(255, 255, 255, 1);
color: #667eea;
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}
.hero-section .btn-outline-light {
border: 2px solid rgba(255, 255, 255, 0.8);
color: white;
background: transparent;
font-weight: 600;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
}
.hero-section .btn-outline-light:hover {
background: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 1);
color: white;
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}
.feature-card {
transition: all 0.3s ease;
border: none;
border-radius: 1rem;
position: relative;
overflow: hidden;
}
.feature-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
.feature-card:nth-child(2)::before {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
.feature-card:nth-child(3)::before {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a9e 100%);
}
.feature-card:hover {
transform: translateY(-8px);
box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.feature-icon {
width: 70px;
height: 70px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.8rem;
margin: 0 auto 1rem;
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
color: white;
box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
transition: all 0.3s ease;
}
.feature-card:nth-child(2) .feature-icon {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
box-shadow: 0 8px 20px rgba(67, 233, 123, 0.3);
}
.feature-card:nth-child(3) .feature-icon {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a9e 100%);
box-shadow: 0 8px 20px rgba(240, 147, 251, 0.3);
}
.feature-card:nth-child(4) .feature-icon {
background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
box-shadow: 0 8px 20px rgba(255, 154, 158, 0.3);
}
.feature-card:nth-child(5) .feature-icon {
background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
box-shadow: 0 8px 20px rgba(168, 237, 234, 0.3);
}
.feature-card:nth-child(6) .feature-icon {
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
box-shadow: 0 8px 20px rgba(255, 236, 210, 0.3);
}
.feature-card:hover .feature-icon {
transform: scale(1.1);
box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}
.feature-card:nth-child(2):hover .feature-icon {
box-shadow: 0 12px 30px rgba(67, 233, 123, 0.4);
}
.feature-card:nth-child(3):hover .feature-icon {
box-shadow: 0 12px 30px rgba(240, 147, 251, 0.4);
}
.feature-card:nth-child(4):hover .feature-icon {
box-shadow: 0 12px 30px rgba(255, 154, 158, 0.4);
}
.feature-card:nth-child(5):hover .feature-icon {
box-shadow: 0 12px 30px rgba(168, 237, 234, 0.4);
}
.feature-card:nth-child(6):hover .feature-icon {
box-shadow: 0 12px 30px rgba(255, 236, 210, 0.4);
}
.btn-gradient {
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
border: none;
color: white;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn-gradient::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s;
}
.btn-gradient:hover::before {
left: 100%;
}
.btn-gradient:hover {
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
color: white;
}
.btn-outline-gradient {
border: 2px solid #667eea;
color: #667eea;
background: transparent;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.btn-outline-gradient::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
transition: left 0.5s;
z-index: -1;
}
.btn-outline-gradient:hover::before {
left: 0;
}
.btn-outline-gradient:hover {
border-color: transparent;
color: white;
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}
.section-gradient {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a9e 100%);
color: white;
position: relative;
overflow: hidden;
}
.section-gradient::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain2" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain2)"/></svg>');
opacity: 0.2;
pointer-events: none;
}
.section-gradient .container {
position: relative;
z-index: 1;
}
pre {
direction: ltr !important;
text-align: left !important;
font-family: 'Courier New', Courier, monospace !important;
font-size: 0.875rem !important;
line-height: 1.5 !important;
white-space: pre-wrap !important;
word-wrap: break-word !important;
}
pre code {
font-family: inherit !important;
background: none !important;
padding: 0 !important;
color: inherit !important;
}
.code-block {
direction: ltr !important;
text-align: left !important;
}
.text-gradient {
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.text-gradient-accent {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #ff9a9e 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.text-gradient-success {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.card {
border: none;
border-radius: 1rem;
box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}
.navbar {
backdrop-filter: blur(20px);
background: rgba(255, 255, 255, 0.95) !important;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.navbar-nav .nav-link {
position: relative;
transition: all 0.3s ease;
}
.navbar-nav .nav-link::after {
content: '';
position: absolute;
bottom: -5px;
left: 50%;
width: 0;
height: 2px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
transition: all 0.3s ease;
transform: translateX(-50%);
}
.navbar-nav .nav-link:hover::after {
width: 80%;
}
.footer {
background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
position: relative;
overflow: hidden;
}
.footer::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain3" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="%23ffffff" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain3)"/></svg>');
opacity: 0.3;
}
/* Footer logo styling */
.footer img {
transition: all 0.3s ease;
opacity: 0.8;
}
.footer img:hover {
opacity: 1;
transform: scale(1.05);
}
.footer .text-light {
position: relative;
z-index: 1;
}
/* Code blocks styling */
pre {
direction: ltr;
text-align: left;
font-family: 'Courier New', Courier, monospace;
font-size: 0.875rem;
line-height: 1.5;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
font-family: inherit;
background: none;
padding: 0;
color: inherit;
}
.code-block {
direction: ltr;
text-align: left;
}
</style>
{% block stylesheets %}{% endblock %}
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top">
<div class="container">
<a class="navbar-brand text-gradient" href="{{ path('app_main_index') }}">
🗺️ می‌مپس
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link" href="{{ path('app_main_map') }}">نقشه</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
راهنمای استفاده
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ path('app_main_usage') }}">استفاده از کاشی‌های نقشه</a></li>
<li><a class="dropdown-item" href="{{ path('app_main_search_api_guide') }}">API جستجوی مکان</a></li>
<li><a class="dropdown-item" href="{{ path('app_main_vector_api_guide') }}">API نقشه وکتوری (MVT)</a></li>
<li><a class="dropdown-item" href="{{ path('app_main_matrix_api_guide') }}">API مسیریابی ماتریسی</a></li>
<li><a class="dropdown-item" href="{{ path('app_main_google_earth_api_guide') }}">API تایل‌های Google Earth</a></li>
<li><a class="dropdown-item" href="{{ path('app_main_bing_api_guide') }}">API تایل‌های Bing</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ path('app_main_edit_map') }}">ویرایش نقشه</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ path('app_main_enterprise') }}">پشتیبانی سازمانی</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ path('app_main_about') }}">درباره ما</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ path('app_main_contact') }}">تماس با ما</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://t.me/osmUsersGroup" target="_blank" rel="noopener noreferrer">
📱 کانال تلگرام
</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Main Content -->
<main style="margin-top: 76px;">
{% block body %}{% endblock %}
</main>
<!-- Footer -->
<footer class="footer text-white py-5 mt-5">
<div class="container">
<div class="row">
<div class="col-lg-3 mb-4">
<h5 class="mb-3">درباره می‌مپس</h5>
<p class="text-light">
سرویس نقشه می‌مپس ارائه‌دهنده نقشه‌های رستری با کیفیت بالا برای استفاده در پروژه‌های مختلف
</p>
</div>
<div class="col-lg-3 mb-4">
<h5 class="mb-3">لینک‌های مفید</h5>
<ul class="list-unstyled">
<li><a href="{{ path('app_main_index') }}" class="text-light text-decoration-none">صفحه اصلی</a></li>
<li><a href="{{ path('app_main_about') }}" class="text-light text-decoration-none">درباره ما</a></li>
<li><a href="{{ path('app_main_usage') }}" class="text-light text-decoration-none">راهنمای استفاده از کاشی‌ها</a></li>
<li><a href="{{ path('app_main_search_api_guide') }}" class="text-light text-decoration-none">API جستجوی مکان</a></li>
<li><a href="{{ path('app_main_matrix_api_guide') }}" class="text-light text-decoration-none">API مسیریابی ماتریسی</a></li>
</ul>
</div>
<div class="col-lg-3 mb-4">
<h5 class="mb-3">تماس با ما</h5>
<p class="text-light">
برای سوالات و پیشنهادات با ما در تماس باشید
</p>
<div class="mb-2">
<a href="tel:02191550290" class="text-light text-decoration-none">
<i class="fas fa-phone me-2"></i>
02191550290
</a>
</div>
<div class="mb-2">
<a href="mailto:info@memaps.ir" class="text-light text-decoration-none">
<i class="fas fa-envelope me-2"></i>
info@memaps.ir
</a>
</div>
<div class="mb-2">
<a href="https://wa.me/989183282405" target="_blank" rel="noopener noreferrer" class="text-light text-decoration-none">
<i class="fab fa-whatsapp me-2"></i>
09183282405
</a>
</div>
</div>
<div class="col-lg-3 mb-4">
<h5 class="mb-3">میزبانی امن</h5>
<p class="text-light mb-3">
با خاطری آسوده استوار بر روی راهکارهای ابری پارس‌پک
</p>
<div class="d-flex align-items-center">
<a href="https://parspack.com" target="_blank" rel="noopener noreferrer" class="text-decoration-none">
<img src="{{ asset('assets/images/logo_side_white.png') }}" alt="ParsPack" class="img-fluid" style="max-height: 40px; filter: brightness(0) invert(1);">
</a>
</div>
</div>
</div>
<hr class="my-4">
<div class="row align-items-center">
<div class="col-md-6 text-center text-md-start">
<p class="mb-0 text-light">
<small>
<a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener noreferrer" class="text-light text-decoration-none">
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" class="me-1 d-inline">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/>
</svg>
CC BY-SA 4.0
</a>
- محتوای آزاد برای استفاده و اشتراک‌گذاری
</small>
</p>
</div>
<div class="col-md-6 text-center text-md-end">
<p class="mb-0 text-light">
<small>میزبانی شده توسط <a href="https://parspack.com" target="_blank" rel="noopener noreferrer" class="text-light text-decoration-none"><strong>پارس‌پک</strong></a></small>
</p>
</div>
</div>
</div>
</footer>
<!-- Bootstrap JS -->
<script src="{{ asset('assets/bootstrap/bootstrap.bundle.min.js') }}"></script>
<!-- Custom JavaScript -->
<script>
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
// Add structured data for breadcrumbs (simplified)
try {
const breadcrumbData = {
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "صفحه اصلی",
"item": "https://memaps.ir"
}
]
};
// Add current page to breadcrumbs
const currentPath = window.location.pathname;
if (currentPath !== '/') {
const pathSegments = currentPath.split('/').filter(segment => segment);
pathSegments.forEach((segment, index) => {
const name = segment === 'map' ? 'نقشه آنلاین' :
segment === 'usage' ? 'راهنمای استفاده از کاشی‌ها' :
segment === 'search-api-guide' ? 'API جستجوی مکان' :
segment === 'vector-api-guide' ? 'API نقشه وکتوری (MVT)' :
segment === 'matrix-api-guide' ? 'API مسیریابی ماتریسی' :
segment === 'contact' ? 'تماس با ما' :
segment === 'about' ? 'درباره ما' : segment;
breadcrumbData.itemListElement.push({
"@type": "ListItem",
"position": index + 2,
"name": name,
"item": `https://memaps.ir${currentPath}`
});
});
}
// Add breadcrumb structured data to page
const breadcrumbScript = document.createElement('script');
breadcrumbScript.type = 'application/ld+json';
breadcrumbScript.textContent = JSON.stringify(breadcrumbData);
document.head.appendChild(breadcrumbScript);
} catch (error) {
console.log('Breadcrumb structured data error:', error);
}
// Register service worker for PWA (temporarily disabled for debugging)
/*
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js')
.then(function(registration) {
console.log('ServiceWorker registration successful');
})
.catch(function(err) {
console.log('ServiceWorker registration failed');
});
});
}
*/
</script>
{% block leaflet_js %}{% endblock %}
{% block javascripts %}{% endblock %}
</body>
</html>