privacy.astro raw
1 ---
2 export const prerender = false;
3 import Base from '../layouts/Base.astro';
4 ---
5 <Base title="Поверителност" titleEn="Privacy">
6 <main class="terms-page">
7 <section class="about-hero">
8 <div class="about-hero-bg" id="privacy-hero-bg" style="background-image: url('/images/shop-hero.jpg')"></div>
9 <div class="container about-hero-content">
10 <h1 class="about-hero-title" style="color:var(--white)" data-i18n="privacyTitle">Политика за поверителност</h1>
11 </div>
12 </section>
13 <section class="section">
14 <div class="container">
15 <div class="terms-content md-content" id="privacy-content"></div>
16 </div>
17 </section>
18 </main>
19 </Base>
20
21 <script>
22 import { currentLang } from '../lib/i18n';
23 import { renderMarkdown } from '../lib/markdown';
24
25 async function load() {
26 const lang = currentLang();
27 const key = lang === 'en' ? 'privacy_en' : 'privacy_bg';
28 try {
29 const r = await fetch('/api/terms');
30 const d = await r.json();
31 const md = d[key] || '';
32 document.getElementById('privacy-content')!.innerHTML = md ? renderMarkdown(md) : '';
33 } catch {}
34 }
35 load();
36 window.addEventListener('lang-changed', load);
37 </script>
38
39 <script>
40 const bg = document.getElementById('privacy-hero-bg');
41 if (bg) {
42 const factor = 0.5;
43 function parallax() {
44 bg.style.transform = `translateY(${window.scrollY * factor}px)`;
45 }
46 window.addEventListener('scroll', parallax, { passive: true });
47 parallax();
48 }
49 </script>
50
51 <style>
52 .terms-content {
53 color: var(--text);
54 line-height: 1.8;
55 text-align: justify;
56 max-width: 800px;
57 }
58 .terms-content h2, .terms-content h3 { color: var(--text); }
59 .terms-content p { color: var(--text-light); }
60 .terms-content li { color: var(--text-light); }
61 .terms-content a { color: var(--primary); }
62 </style>
63