samirerty commited on
Commit
2cb2917
·
verified ·
1 Parent(s): 4dc56dd

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +959 -161
index.html CHANGED
@@ -1,171 +1,969 @@
1
  <!DOCTYPE html>
2
- <html lang="fa" dir="rtl">
3
  <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>View - فروشگاه دیجیتال</title>
7
- <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700;900&display=swap" rel="stylesheet">
8
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
9
- <style>
10
- :root { --primary: #6366f1; --secondary: #8b5cf6; --accent: #ec4899; --dark: #0f172a; --darker: #020617; --light: #f8fafc; --glass: rgba(255,255,255,0.05); --glass-border: rgba(255,255,255,0.1); --card-bg: rgba(255,255,255,0.03); }
11
- * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; }
12
- body { background: var(--darker); color: var(--light); min-height: 100vh; }
13
- .bg-gradient { position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 20% 20%, rgba(99,102,241,0.15), transparent 50%), radial-gradient(ellipse at 80% 80%, rgba(139,92,246,0.15), transparent 50%), linear-gradient(180deg, var(--darker), var(--dark)); }
14
- .floating-elements { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
15
- .floating-shape { position: absolute; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); opacity: 0.1; animation: float 20s infinite ease-in-out; }
16
- .floating-shape:nth-child(1) { width: 300px; height: 300px; top: 10%; left: -5%; }
17
- .floating-shape:nth-child(2) { width: 200px; height: 200px; top: 60%; right: -5%; animation-delay: -5s; }
18
- .floating-shape:nth-child(3) { width: 150px; height: 150px; bottom: 20%; left: 20%; animation-delay: -10s; }
19
- @keyframes float { 0%,100% { transform: translate(0,0) rotate(0deg); } 25% { transform: translate(30px,-30px) rotate(90deg); } 50% { transform: translate(-20px,20px) rotate(180deg); } 75% { transform: translate(20px,30px) rotate(270deg); } }
20
- header { position: fixed; top: 0; inset-x: 0; z-index: 1000; padding: 1rem 2rem; background: rgba(15,23,42,0.8); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); display: flex; justify-content: space-between; align-items: center; }
21
- .logo { font-size: 1.8rem; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
22
- .header-link { color: var(--light); text-decoration: none; font-weight: 500; transition: 0.3s; display: flex; align-items: center; gap: 0.5rem; }
23
- .header-link:hover { color: var(--primary); }
24
- main { padding-top: 80px; }
25
- .section-title { text-align: center; margin-bottom: 3rem; }
26
- .section-title h2 { font-size: 2.5rem; font-weight: 900; position: relative; display: inline-block; }
27
- .section-title h2::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary)); border-radius: 2px; box-shadow: 0 5px 20px rgba(99,102,241,0.5); }
28
- section { padding: 4rem 2rem; max-width: 1400px; margin: 0 auto; }
29
- .products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
30
- .product-card { background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 1.5rem; transition: all 0.5s cubic-bezier(0.175,0.885,0.32,1.275); }
31
- .product-card:hover { transform: translateY(-20px); box-shadow: 0 30px 60px rgba(0,0,0,0.4), 0 0 40px rgba(99,102,241,0.2); }
32
- .product-image { width: 100%; height: 200px; border-radius: 15px; overflow: hidden; margin-bottom: 1rem; }
33
- .product-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
34
- .product-card:hover .product-image img { transform: scale(1.1); }
35
- .product-info { text-align: center; }
36
- .product-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
37
- .product-price { font-size: 1.5rem; font-weight: 900; color: var(--accent); margin-bottom: 1rem; text-shadow: 0 0 20px rgba(236,72,153,0.5); }
38
- .btn-buy { background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none; padding: 0.8rem 2rem; border-radius: 50px; color: white; font-weight: 700; cursor: pointer; transition: 0.3s; }
39
- .btn-buy:hover { transform: scale(1.05); box-shadow: 0 10px 30px rgba(99,102,241,0.5); }
40
- .videos-section { background: var(--glass); border-radius: 30px; padding: 3rem; border: 1px solid var(--glass-border); }
41
- .videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
42
- .video-card { background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 20px; overflow: hidden; transition: all 0.5s; }
43
- .video-card:hover { transform: translateY(-10px); box-shadow: 0 30px 60px rgba(0,0,0,0.4); }
44
- .video-thumbnail { position: relative; height: 200px; overflow: hidden; }
45
- .video-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
46
- .video-card:hover .video-thumbnail img { transform: scale(1.1); }
47
- .play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 70px; height: 70px; background: linear-gradient(135deg, var(--accent), var(--primary)); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; box-shadow: 0 10px 30px rgba(236,72,153,0.5); }
48
- .play-btn::before { content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; z-index: -1; }
49
- .play-btn i { color: white; font-size: 1.5rem; margin-left: 5px; }
50
- .play-btn:hover { transform: translate(-50%, -50%) scale(1.1); }
51
- @keyframes pulse { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.5); opacity: 0; } }
52
- .video-views { position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,0.7); padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
53
- .video-info { padding: 1.5rem; }
54
- .video-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
55
- .video-desc { font-size: 0.9rem; opacity: 0.7; margin-bottom: 1rem; }
56
- .video-stats { display: flex; gap: 1.5rem; font-size: 0.9rem; }
57
- .stat-item { display: flex; align-items: center; gap: 0.5rem; }
58
- .stat-item.like:hover i { animation: heartBeat 0.5s ease; }
59
- @keyframes heartBeat { 0%,100% { transform: scale(1); } 25% { transform: scale(1.3); } 50% { transform: scale(0.9); } 75% { transform: scale(1.2); } }
60
- .faq-container { max-width: 800px; margin: 0 auto; }
61
- .faq-item { background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: 20px; margin-bottom: 1rem; overflow: hidden; transition: 0.3s; }
62
- .faq-item:hover { border-color: var(--primary); }
63
- .faq-question { padding: 1.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
64
- .faq-question i { transition: 0.3s; color: var(--primary); }
65
- .faq-item.active .faq-question i { transform: rotate(180deg); }
66
- .faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out; }
67
- .faq-item.active .faq-answer { max-height: 200px; }
68
- .faq-answer-content { padding: 0 1.5rem 1.5rem; line-height: 1.8; opacity: 0.8; }
69
- .contact-card { background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1), rgba(236,72,153,0.1)); border: 1px solid var(--glass-border); border-radius: 30px; padding: 3rem; }
70
- .contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
71
- .contact-item { text-align: center; padding: 2rem; background: var(--card-bg); border-radius: 20px; border: 1px solid var(--glass-border); transition: 0.3s; }
72
- .contact-item:hover { transform: translateY(-10px); }
73
- .contact-item i { font-size: 2.5rem; margin-bottom: 1rem; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
74
- .contact-item h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
75
- .contact-item p { opacity: 0.8; font-size: 0.9rem; }
76
- .phone-number { font-size: 1.3rem; font-weight: 700; color: var(--light); cursor: pointer; transition: 0.3s; display: inline-block; }
77
- .phone-number:hover { color: var(--accent); animation: shake 0.5s ease; }
78
- @keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
79
- .instagram-link { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 2rem; padding: 1rem 2rem; background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-radius: 50px; color: white; text-decoration: none; font-weight: 600; transition: 0.3s; }
80
- .instagram-link:hover { transform: rotate(360deg); box-shadow: 0 10px 30px rgba(225,48,108,0.5); }
81
- footer { background: var(--glass); border-top: 1px solid var(--glass-border); padding: 3rem 2rem; text-align: center; margin-top: 4rem; }
82
- .footer-separator { width: 100%; height: 3px; background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--secondary), transparent); margin-bottom: 2rem; box-shadow: 0 5px 20px rgba(99,102,241,0.5); }
83
- .social-icons { display: flex; justify-content: center; gap: 1.5rem; }
84
- .social-icon { width: 50px; height: 50px; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--light); text-decoration: none; transition: 0.3s; }
85
- .social-icon:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(99,102,241,0.3); }
86
- .social-icon:nth-child(1):hover { background: #1877f2; }
87
- .social-icon:nth-child(2):hover { background: #1da1f2; }
88
- .social-icon:nth-child(3):hover { background: #ea4c89; }
89
- .social-icon:nth-child(4):hover { background: #0a66c2; }
90
- .fade-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease-out; }
91
- .fade-in.visible { opacity: 1; transform: translateY(0); }
92
- @media (max-width: 768px) { .section-title h2 { font-size: 1.8rem; } section { padding: 2rem 1rem; } .videos-section { padding: 1.5rem; } .videos-grid { grid-template-columns: 1fr; } header { padding: 1rem; } .logo { font-size: 1.4rem; } }
93
- @media (max-width: 480px) { .products-grid { grid-template-columns: 1fr; } }
94
- </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  </head>
96
  <body>
97
- <div class="bg-gradient"></div>
98
- <div class="floating-elements">
99
- <div class="floating-shape"></div>
100
- <div class="floating-shape"></div>
101
- <div class="floating-shape"></div>
102
- </div>
103
- <header>
104
- <div class="logo">View <span>دیجیتال</span></div>
105
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="header-link"><i class="fas fa-code"></i> Built with anycoder</a>
106
- </header>
107
- <main>
108
- <section id="products">
109
- <div class="section-title fade-in"><h2>محصولات</h2></div>
110
- <div class="products-grid">
111
- <div class="product-card fade-in">
112
- <div class="product-image"><img src="https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=400" alt="هدفون"></div>
113
- <div class="product-info"><h3 class="product-name">هدفون بلوتوثی پرو</h3><div class="product-price">۲,۵۰۰,۰۰۰ تومان</div><button class="btn-buy">خرید</button></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  </div>
115
- <div class="product-card fade-in">
116
- <div class="product-image"><img src="https://images.unsplash.com/photo-1546868871-7041f2a55e12?w=400" alt="ساعت"></div>
117
- <div class="product-info"><h3 class="product-name">ساعت هوشمند اولترا</h3><div class="product-price">۳,۲۰۰,۰۰۰ تومان</div><button class="btn-buy">خرید</button></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  </div>
119
- </div>
120
- </section>
121
- <section id="videos">
122
- <div class="section-title fade-in"><h2>ویدیوها</h2></div>
123
- <div class="videos-section fade-in">
124
- <div class="videos-grid">
125
- <div class="video-card">
126
- <div class="video-thumbnail"><img src="https://images.unsplash.com/photo-1516321318423-f06f85e504b3?w=600" alt="ویدیو"><div class="play-btn"><i class="fas fa-play"></i></div><div class="video-views"><i class="fas fa-eye"></i> ۱۲۵,۴۳۰</div></div>
127
- <div class="video-info"><h3 class="video-title">بستن اپ‌های گوشی خوبه؟</h3><p class="video-desc">اپ‌های آفیون رو بندیم یا نه؟</p><div class="video-stats"><div class="stat-item like"><i class="fas fa-heart"></i> ۱۲,۳۴۵</div><div class="stat-item"><i class="fas fa-comment"></i> ۱۰۹</div></div></div>
128
- </div>
129
- <div class="video-card">
130
- <div class="video-thumbnail"><img src="https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=600" alt="ویدیو"><div class="play-btn"><i class="fas fa-play"></i></div><div class="video-views"><i class="fas fa-eye"></i> ۸۷,۲۱۰</div></div>
131
- <div class="video-info"><h3 class="video-title">امنیت دیجیتال</h3><p class="video-desc">چگونه از اطلاعات خود محافظت کنیم؟</p><div class="video-stats"><div class="stat-item like"><i class="fas fa-heart"></i> ۸,۷۶۵</div><div class="stat-item"><i class="fas fa-comment"></i> ۲۴۳</div></div></div>
132
- </div>
133
- </div>
134
- </div>
135
- </section>
136
- <section id="faq">
137
- <div class="section-title fade-in"><h2>سوالات متداول</h2></div>
138
- <div class="faq-container fade-in">
139
- <div class="faq-item"><div class="faq-question"><span>چطور خرید کنم؟</span><i class="fas fa-chevron-down"></i></div><div class="faq-answer"><div class="faq-answer-content">محصول مورد نظر را انتخاب کنید و روی دکمه خرید کلیک کنید.</div></div></div>
140
- <div class="faq-item"><div class="faq-question"><span>امکان همکاری هست؟</span><i class="fas fa-chevron-down"></i></div><div class="faq-answer"><div class="faq-answer-content">بله، از طریق بخش تماس درخواست خود را ارسال کنید.</div></div></div>
141
- </div>
142
- </section>
143
- <section id="contact">
144
- <div class="section-title fade-in"><h2>تماس با ما</h2></div>
145
- <div class="contact-card fade-in">
146
- <div class="contact-grid">
147
- <div class="contact-item"><i class="fas fa-phone"></i><h3>تماس تلفنی</h3><p class="phone-number">۰۲۱-۱۲۳۴۵۶۷۸</p></div>
148
- <div class="contact-item"><i class="fas fa-envelope"></i><h3>ایمیل</h3><p>info@view.ir</p></div>
149
- <div class="contact-item"><i class="fas fa-map-marker-alt"></i><h3>آدرس</h3><p>تهران، میدان آزادی</p></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  </div>
151
- <div style="text-align: center;"><a href="#" class="instagram-link"><i class="fab fa-instagram"></i> ما را در اینستاگرام دنبال کنید</a></div>
152
- </div>
153
- </section>
154
- </main>
155
- <footer>
156
- <div class="footer-separator"></div>
157
- <p class="footer-text">© ۱۴۰۳ - تمامی حقوق محفوظ است</p>
158
- <div class="social-icons">
159
- <a href="#" class="social-icon"><i class="fab fa-facebook-f"></i></a>
160
- <a href="#" class="social-icon"><i class="fab fa-twitter"></i></a>
161
- <a href="#" class="social-icon"><i class="fab fa-instagram"></i></a>
162
- <a href="#" class="social-icon"><i class="fab fa-linkedin-in"></i></a>
163
  </div>
164
- </footer>
165
- <script>
166
- document.querySelectorAll('.faq-question').forEach(q => q.addEventListener('click', () => q.parentElement.classList.toggle('active')));
167
- const observer = new IntersectionObserver(e => e.forEach(el => el.isIntersecting && el.target.classList.add('visible')), { threshold: 0.1 });
168
- document.querySelectorAll('.fade-in').forEach(el => observer.observe(el));
169
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  </body>
171
  </html>
 
1
  <!DOCTYPE html>
2
+ <html dir="rtl" lang="fa-IR">
3
  <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>پیشنمایش ویو، قالب آنلاین شاپ بلاگر اینستاگرام | راست چین</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
10
+ <script src="https://cdn.tailwindcss.com"></script>
11
+ <style>
12
+ :root {
13
+ --bg: #0a0a0f;
14
+ --bg-secondary: #12121a;
15
+ --fg: #f0f0f5;
16
+ --muted: #6b6b80;
17
+ --accent: #00d4aa;
18
+ --accent-glow: rgba(0, 212, 170, 0.3);
19
+ --card: #1a1a25;
20
+ --border: #2a2a3a;
21
+ --danger: #ff4757;
22
+ }
23
+
24
+ * {
25
+ margin: 0;
26
+ padding: 0;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ body {
31
+ font-family: 'Vazirmatn', system-ui, sans-serif;
32
+ background: var(--bg);
33
+ color: var(--fg);
34
+ min-height: 100vh;
35
+ overflow-x: hidden;
36
+ }
37
+
38
+ /* Background Pattern */
39
+ .bg-pattern {
40
+ position: fixed;
41
+ inset: 0;
42
+ background:
43
+ radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 170, 0.15), transparent),
44
+ radial-gradient(ellipse 60% 40% at 100% 100%, rgba(99, 102, 241, 0.1), transparent),
45
+ linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
46
+ z-index: -1;
47
+ }
48
+
49
+ .bg-grid {
50
+ position: fixed;
51
+ inset: 0;
52
+ background-image:
53
+ linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
54
+ linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
55
+ background-size: 60px 60px;
56
+ z-index: -1;
57
+ }
58
+
59
+ /* Top Bar */
60
+ .top-bar {
61
+ position: fixed;
62
+ top: 0;
63
+ right: 0;
64
+ left: 0;
65
+ z-index: 100;
66
+ background: rgba(10, 10, 15, 0.85);
67
+ backdrop-filter: blur(20px);
68
+ border-bottom: 1px solid var(--border);
69
+ transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
70
+ }
71
+
72
+ .top-bar.hidden {
73
+ transform: translateY(-100%);
74
+ }
75
+
76
+ .top-bar-inner {
77
+ display: grid;
78
+ grid-template-columns: auto 1fr auto auto auto;
79
+ align-items: center;
80
+ gap: 1.5rem;
81
+ padding: 0.75rem 1.5rem;
82
+ max-width: 1800px;
83
+ margin: 0 auto;
84
+ }
85
+
86
+ @media (max-width: 1024px) {
87
+ .top-bar-inner {
88
+ grid-template-columns: auto 1fr auto;
89
+ gap: 1rem;
90
+ }
91
+ }
92
+
93
+ @media (max-width: 640px) {
94
+ .top-bar-inner {
95
+ grid-template-columns: 1fr auto;
96
+ padding: 0.5rem 1rem;
97
+ }
98
+ }
99
+
100
+ /* Logo */
101
+ .logo-col {
102
+ display: flex;
103
+ align-items: center;
104
+ gap: 0.75rem;
105
+ }
106
+
107
+ .logo {
108
+ height: 36px;
109
+ width: auto;
110
+ transition: transform 0.3s ease;
111
+ }
112
+
113
+ .logo:hover {
114
+ transform: scale(1.05);
115
+ }
116
+
117
+ .logo-icon {
118
+ width: 40px;
119
+ height: 40px;
120
+ background: linear-gradient(135deg, var(--accent), #00a080);
121
+ border-radius: 10px;
122
+ display: flex;
123
+ align-items: center;
124
+ justify-content: center;
125
+ box-shadow: 0 4px 15px var(--accent-glow);
126
+ }
127
+
128
+ .logo-text {
129
+ font-size: 1.25rem;
130
+ font-weight: 700;
131
+ background: linear-gradient(135deg, var(--fg), var(--accent));
132
+ -webkit-background-clip: text;
133
+ -webkit-text-fill-color: transparent;
134
+ background-clip: text;
135
+ }
136
+
137
+ /* Title */
138
+ .title-col {
139
+ text-align: center;
140
+ }
141
+
142
+ @media (max-width: 640px) {
143
+ .title-col {
144
+ grid-column: 1 / -1;
145
+ order: 3;
146
+ }
147
+ }
148
+
149
+ .title {
150
+ font-size: clamp(0.85rem, 2vw, 1.1rem);
151
+ font-weight: 600;
152
+ color: var(--fg);
153
+ white-space: nowrap;
154
+ overflow: hidden;
155
+ text-overflow: ellipsis;
156
+ }
157
+
158
+ .title span {
159
+ color: var(--accent);
160
+ }
161
+
162
+ /* Devices */
163
+ .devices-col {
164
+ display: flex;
165
+ align-items: center;
166
+ }
167
+
168
+ @media (max-width: 1024px) {
169
+ .devices-col {
170
+ display: none;
171
+ }
172
+ }
173
+
174
+ .devices {
175
+ display: flex;
176
+ gap: 0.5rem;
177
+ background: var(--card);
178
+ padding: 0.35rem;
179
+ border-radius: 12px;
180
+ border: 1px solid var(--border);
181
+ }
182
+
183
+ .device-btn {
184
+ width: 40px;
185
+ height: 40px;
186
+ border: none;
187
+ background: transparent;
188
+ border-radius: 8px;
189
+ cursor: pointer;
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ color: var(--muted);
194
+ transition: all 0.25s ease;
195
+ }
196
+
197
+ .device-btn:hover {
198
+ background: rgba(255, 255, 255, 0.05);
199
+ color: var(--fg);
200
+ }
201
+
202
+ .device-btn.active {
203
+ background: var(--accent);
204
+ color: var(--bg);
205
+ box-shadow: 0 2px 10px var(--accent-glow);
206
+ }
207
+
208
+ .device-btn svg {
209
+ width: 20px;
210
+ height: 20px;
211
+ }
212
+
213
+ /* Buy Button */
214
+ .btn-col {
215
+ display: flex;
216
+ align-items: center;
217
+ }
218
+
219
+ .buy-btn {
220
+ display: flex;
221
+ align-items: center;
222
+ gap: 0.5rem;
223
+ padding: 0.6rem 1.25rem;
224
+ background: linear-gradient(135deg, var(--accent), #00a080);
225
+ color: var(--bg);
226
+ font-weight: 600;
227
+ font-size: 0.9rem;
228
+ border: none;
229
+ border-radius: 10px;
230
+ cursor: pointer;
231
+ text-decoration: none;
232
+ transition: all 0.3s ease;
233
+ box-shadow: 0 4px 20px var(--accent-glow);
234
+ }
235
+
236
+ .buy-btn:hover {
237
+ transform: translateY(-2px);
238
+ box-shadow: 0 6px 30px var(--accent-glow);
239
+ }
240
+
241
+ .buy-btn:active {
242
+ transform: translateY(0);
243
+ }
244
+
245
+ .buy-btn svg {
246
+ width: 18px;
247
+ height: 18px;
248
+ }
249
+
250
+ /* Close Button */
251
+ .close-col {
252
+ display: flex;
253
+ align-items: center;
254
+ }
255
+
256
+ .close-btn {
257
+ width: 40px;
258
+ height: 40px;
259
+ border: 1px solid var(--border);
260
+ background: var(--card);
261
+ border-radius: 10px;
262
+ cursor: pointer;
263
+ display: flex;
264
+ align-items: center;
265
+ justify-content: center;
266
+ color: var(--muted);
267
+ transition: all 0.25s ease;
268
+ text-decoration: none;
269
+ }
270
+
271
+ .close-btn:hover {
272
+ background: var(--danger);
273
+ border-color: var(--danger);
274
+ color: white;
275
+ }
276
+
277
+ .close-btn svg {
278
+ width: 20px;
279
+ height: 20px;
280
+ }
281
+
282
+ /* Show Top Bar Toggle */
283
+ .show-top-bar {
284
+ position: fixed;
285
+ top: 1rem;
286
+ left: 50%;
287
+ transform: translateX(-50%) translateY(-100px);
288
+ z-index: 99;
289
+ background: var(--card);
290
+ border: 1px solid var(--border);
291
+ border-radius: 50px;
292
+ padding: 0.5rem 1rem;
293
+ cursor: pointer;
294
+ display: flex;
295
+ align-items: center;
296
+ gap: 0.5rem;
297
+ color: var(--fg);
298
+ font-size: 0.85rem;
299
+ transition: all 0.3s ease;
300
+ opacity: 0;
301
+ }
302
+
303
+ .show-top-bar.visible {
304
+ transform: translateX(-50%) translateY(0);
305
+ opacity: 1;
306
+ }
307
+
308
+ .show-top-bar:hover {
309
+ background: var(--accent);
310
+ color: var(--bg);
311
+ }
312
+
313
+ .show-top-bar svg {
314
+ width: 16px;
315
+ height: 16px;
316
+ transition: transform 0.3s ease;
317
+ }
318
+
319
+ /* Preview Container */
320
+ .preview-container {
321
+ padding-top: 70px;
322
+ min-height: 100vh;
323
+ display: flex;
324
+ align-items: flex-start;
325
+ justify-content: center;
326
+ padding-bottom: 2rem;
327
+ }
328
+
329
+ .preview-wrapper {
330
+ width: 100%;
331
+ max-width: 1400px;
332
+ margin: 1rem;
333
+ border-radius: 20px;
334
+ overflow: hidden;
335
+ background: var(--card);
336
+ border: 1px solid var(--border);
337
+ box-shadow:
338
+ 0 25px 50px -12px rgba(0, 0, 0, 0.5),
339
+ 0 0 0 1px rgba(255, 255, 255, 0.05);
340
+ transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
341
+ position: relative;
342
+ }
343
+
344
+ .preview-wrapper::before {
345
+ content: '';
346
+ position: absolute;
347
+ inset: 0;
348
+ border-radius: 20px;
349
+ padding: 1px;
350
+ background: linear-gradient(135deg, rgba(0, 212, 170, 0.3), transparent, rgba(99, 102, 241, 0.2));
351
+ -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
352
+ mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
353
+ -webkit-mask-composite: xor;
354
+ mask-composite: exclude;
355
+ pointer-events: none;
356
+ }
357
+
358
+ /* Device Frames */
359
+ .preview-wrapper.mobile {
360
+ max-width: 375px;
361
+ border-radius: 40px;
362
+ padding: 12px;
363
+ background: linear-gradient(145deg, #2a2a3a, #1a1a25);
364
+ }
365
+
366
+ .preview-wrapper.mobile::before {
367
+ border-radius: 40px;
368
+ }
369
+
370
+ .preview-wrapper.mobile .preview-frame {
371
+ border-radius: 30px;
372
+ }
373
+
374
+ .preview-wrapper.tablet {
375
+ max-width: 768px;
376
+ border-radius: 30px;
377
+ padding: 10px;
378
+ }
379
+
380
+ .preview-wrapper.tablet::before {
381
+ border-radius: 30px;
382
+ }
383
+
384
+ .preview-wrapper.tablet .preview-frame {
385
+ border-radius: 22px;
386
+ }
387
+
388
+ .preview-wrapper.laptop {
389
+ max-width: 1200px;
390
+ border-radius: 20px;
391
+ padding: 8px;
392
+ }
393
+
394
+ .preview-wrapper.desktop {
395
+ max-width: 1400px;
396
+ }
397
+
398
+ /* Device Notch */
399
+ .device-notch {
400
+ display: none;
401
+ height: 28px;
402
+ background: var(--bg);
403
+ border-radius: 0 0 16px 16px;
404
+ margin: 0 auto;
405
+ width: 120px;
406
+ position: relative;
407
+ }
408
+
409
+ .device-notch::before {
410
+ content: '';
411
+ position: absolute;
412
+ top: 8px;
413
+ left: 50%;
414
+ transform: translateX(-50%);
415
+ width: 8px;
416
+ height: 8px;
417
+ background: var(--card);
418
+ border-radius: 50%;
419
+ }
420
+
421
+ .preview-wrapper.mobile .device-notch,
422
+ .preview-wrapper.tablet .device-notch {
423
+ display: block;
424
+ }
425
+
426
+ /* Preview Frame */
427
+ .preview-frame {
428
+ width: 100%;
429
+ height: 80vh;
430
+ min-height: 500px;
431
+ border: none;
432
+ background: white;
433
+ display: block;
434
+ }
435
+
436
+ /* Loading State */
437
+ .loading-overlay {
438
+ position: absolute;
439
+ inset: 0;
440
+ background: var(--card);
441
+ display: flex;
442
+ flex-direction: column;
443
+ align-items: center;
444
+ justify-content: center;
445
+ gap: 1.5rem;
446
+ z-index: 10;
447
+ transition: opacity 0.5s ease;
448
+ }
449
+
450
+ .loading-overlay.hidden {
451
+ opacity: 0;
452
+ pointer-events: none;
453
+ }
454
+
455
+ .loader {
456
+ width: 50px;
457
+ height: 50px;
458
+ border: 3px solid var(--border);
459
+ border-top-color: var(--accent);
460
+ border-radius: 50%;
461
+ animation: spin 1s linear infinite;
462
+ }
463
+
464
+ @keyframes spin {
465
+ to { transform: rotate(360deg); }
466
+ }
467
+
468
+ .loading-text {
469
+ color: var(--muted);
470
+ font-size: 0.9rem;
471
+ }
472
+
473
+ /* Floating Actions */
474
+ .floating-actions {
475
+ position: fixed;
476
+ bottom: 2rem;
477
+ left: 2rem;
478
+ display: flex;
479
+ flex-direction: column;
480
+ gap: 0.75rem;
481
+ z-index: 50;
482
+ }
483
+
484
+ @media (max-width: 640px) {
485
+ .floating-actions {
486
+ bottom: 1rem;
487
+ left: 1rem;
488
+ }
489
+ }
490
+
491
+ .fab {
492
+ width: 50px;
493
+ height: 50px;
494
+ border-radius: 14px;
495
+ border: 1px solid var(--border);
496
+ background: var(--card);
497
+ color: var(--fg);
498
+ cursor: pointer;
499
+ display: flex;
500
+ align-items: center;
501
+ justify-content: center;
502
+ transition: all 0.3s ease;
503
+ backdrop-filter: blur(10px);
504
+ }
505
+
506
+ .fab:hover {
507
+ background: var(--accent);
508
+ color: var(--bg);
509
+ border-color: var(--accent);
510
+ transform: scale(1.1);
511
+ }
512
+
513
+ .fab svg {
514
+ width: 22px;
515
+ height: 22px;
516
+ }
517
+
518
+ /* Device Switcher Mobile */
519
+ .mobile-device-switcher {
520
+ display: none;
521
+ position: fixed;
522
+ bottom: 2rem;
523
+ right: 2rem;
524
+ z-index: 50;
525
+ }
526
+
527
+ @media (max-width: 1024px) {
528
+ .mobile-device-switcher {
529
+ display: block;
530
+ }
531
+ }
532
+
533
+ @media (max-width: 640px) {
534
+ .mobile-device-switcher {
535
+ bottom: 1rem;
536
+ right: 1rem;
537
+ }
538
+ }
539
+
540
+ .device-menu {
541
+ position: absolute;
542
+ bottom: 60px;
543
+ left: 0;
544
+ background: var(--card);
545
+ border: 1px solid var(--border);
546
+ border-radius: 16px;
547
+ padding: 0.5rem;
548
+ display: flex;
549
+ flex-direction: column;
550
+ gap: 0.25rem;
551
+ opacity: 0;
552
+ transform: translateY(10px);
553
+ pointer-events: none;
554
+ transition: all 0.3s ease;
555
+ }
556
+
557
+ .device-menu.open {
558
+ opacity: 1;
559
+ transform: translateY(0);
560
+ pointer-events: auto;
561
+ }
562
+
563
+ .device-menu button {
564
+ padding: 0.75rem 1rem;
565
+ background: transparent;
566
+ border: none;
567
+ color: var(--muted);
568
+ font-family: inherit;
569
+ font-size: 0.85rem;
570
+ cursor: pointer;
571
+ border-radius: 10px;
572
+ display: flex;
573
+ align-items: center;
574
+ gap: 0.5rem;
575
+ white-space: nowrap;
576
+ transition: all 0.2s ease;
577
+ }
578
+
579
+ .device-menu button:hover {
580
+ background: rgba(255, 255, 255, 0.05);
581
+ color: var(--fg);
582
+ }
583
+
584
+ .device-menu button.active {
585
+ background: var(--accent);
586
+ color: var(--bg);
587
+ }
588
+
589
+ .device-menu button svg {
590
+ width: 18px;
591
+ height: 18px;
592
+ }
593
+
594
+ /* Built with link */
595
+ .built-with {
596
+ position: fixed;
597
+ bottom: 1rem;
598
+ right: 1rem;
599
+ font-size: 0.75rem;
600
+ color: var(--muted);
601
+ z-index: 50;
602
+ opacity: 0.6;
603
+ transition: opacity 0.3s ease;
604
+ }
605
+
606
+ .built-with:hover {
607
+ opacity: 1;
608
+ }
609
+
610
+ .built-with a {
611
+ color: var(--accent);
612
+ text-decoration: none;
613
+ }
614
+
615
+ /* Animations */
616
+ @keyframes fadeInUp {
617
+ from {
618
+ opacity: 0;
619
+ transform: translateY(20px);
620
+ }
621
+ to {
622
+ opacity: 1;
623
+ transform: translateY(0);
624
+ }
625
+ }
626
+
627
+ .animate-in {
628
+ animation: fadeInUp 0.6s ease forwards;
629
+ }
630
+
631
+ /* Reduced Motion */
632
+ @media (prefers-reduced-motion: reduce) {
633
+ *,
634
+ *::before,
635
+ *::after {
636
+ animation-duration: 0.01ms !important;
637
+ animation-iteration-count: 1 !important;
638
+ transition-duration: 0.01ms !important;
639
+ }
640
+ }
641
+
642
+ /* Scrollbar */
643
+ ::-webkit-scrollbar {
644
+ width: 8px;
645
+ height: 8px;
646
+ }
647
+
648
+ ::-webkit-scrollbar-track {
649
+ background: var(--bg);
650
+ }
651
+
652
+ ::-webkit-scrollbar-thumb {
653
+ background: var(--border);
654
+ border-radius: 4px;
655
+ }
656
+
657
+ ::-webkit-scrollbar-thumb:hover {
658
+ background: var(--muted);
659
+ }
660
+ </style>
661
  </head>
662
  <body>
663
+ <div class="bg-pattern"></div>
664
+ <div class="bg-grid"></div>
665
+
666
+ <!-- Top Bar -->
667
+ <header class="top-bar" id="topBar">
668
+ <div class="top-bar-inner">
669
+ <div class="logo-col">
670
+ <a href="https://www.rtl-theme.com" class="flex items-center gap-3">
671
+ <div class="logo-icon">
672
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" width="22" height="22">
673
+ <path d="M12 2L2 7l10 5 10-5-10-5z"/>
674
+ <path d="M2 17l10 5 10-5"/>
675
+ <path d="M2 12l10 5 10-5"/>
676
+ </svg>
677
+ </div>
678
+ <span class="logo-text">راست چین</span>
679
+ </a>
680
+ </div>
681
+
682
+ <div class="title-col">
683
+ <h1 class="title">پیش نمایش : <span>ویو</span>، قالب آنلاین شاپ بلاگر اینستاگرام</h1>
684
+ </div>
685
+
686
+ <div class="devices-col">
687
+ <div class="devices">
688
+ <button class="device-btn" data-device="mobile" title="موبایل">
689
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
690
+ <rect x="5" y="2" width="14" height="20" rx="2" ry="2"/>
691
+ <line x1="12" y1="18" x2="12" y2="18"/>
692
+ </svg>
693
+ </button>
694
+ <button class="device-btn" data-device="tablet" title="تبلت">
695
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
696
+ <rect x="4" y="2" width="16" height="20" rx="2" ry="2"/>
697
+ <line x1="12" y1="18" x2="12" y2="18"/>
698
+ </svg>
699
+ </button>
700
+ <button class="device-btn active" data-device="laptop" title="لپ‌تاپ">
701
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
702
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2"/>
703
+ <line x1="2" y1="20" x2="22" y2="20"/>
704
+ </svg>
705
+ </button>
706
+ <button class="device-btn" data-device="desktop" title="دسکتاپ">
707
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
708
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2"/>
709
+ <line x1="8" y1="21" x2="16" y2="21"/>
710
+ <line x1="12" y1="17" x2="12" y2="21"/>
711
+ </svg>
712
+ </button>
713
+ </div>
714
+ </div>
715
+
716
+ <div class="btn-col">
717
+ <a href="https://www.rtl-theme.com/view-wordpress-theme/" class="buy-btn">
718
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
719
+ <path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"/>
720
+ <line x1="3" y1="6" x2="21" y2="6"/>
721
+ <path d="M16 10a4 4 0 0 1-8 0"/>
722
+ </svg>
723
+ خرید و دانلود
724
+ </a>
725
+ </div>
726
+
727
+ <div class="close-col">
728
+ <a href="https://demo.code-snippet.ir/view" class="close-btn" title="بستن">
729
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
730
+ <line x1="18" y1="6" x2="6" y2="18"/>
731
+ <line x1="6" y1="6" x2="18" y2="18"/>
732
+ </svg>
733
+ </a>
734
+ </div>
735
  </div>
736
+ </header>
737
+
738
+ <!-- Show Top Bar Toggle -->
739
+ <button class="show-top-bar" id="showTopBar">
740
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
741
+ <polyline points="18 15 12 9 6 15"/>
742
+ </svg>
743
+ نمایش نوار بالا
744
+ </button>
745
+
746
+ <!-- Preview Container -->
747
+ <main class="preview-container">
748
+ <div class="preview-wrapper laptop" id="previewWrapper">
749
+ <div class="device-notch"></div>
750
+ <div class="loading-overlay" id="loadingOverlay">
751
+ <div class="loader"></div>
752
+ <p class="loading-text">در حال بارگذاری پیش‌نمایش...</p>
753
+ </div>
754
+ <iframe
755
+ src="https://demo.code-snippet.ir/view"
756
+ class="preview-frame"
757
+ id="previewFrame"
758
+ loading="lazy"
759
+ allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture"
760
+ ></iframe>
761
  </div>
762
+ </main>
763
+
764
+ <!-- Floating Actions -->
765
+ <div class="floating-actions">
766
+ <button class="fab" id="refreshBtn" title="بازنشانی">
767
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
768
+ <polyline points="23 4 23 10 17 10"/>
769
+ <path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/>
770
+ </svg>
771
+ </button>
772
+ <button class="fab" id="fullscreenBtn" title="تمام صفحه">
773
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
774
+ <polyline points="15 3 21 3 21 9"/>
775
+ <polyline points="9 21 3 21 3 15"/>
776
+ <line x1="21" y1="3" x2="14" y2="10"/>
777
+ <line x1="3" y1="21" x2="10" y2="14"/>
778
+ </svg>
779
+ </button>
780
+ </div>
781
+
782
+ <!-- Mobile Device Switcher -->
783
+ <div class="mobile-device-switcher">
784
+ <div class="device-menu" id="deviceMenu">
785
+ <button data-device="mobile">
786
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
787
+ <rect x="5" y="2" width="14" height="20" rx="2" ry="2"/>
788
+ </svg>
789
+ موبایل
790
+ </button>
791
+ <button data-device="tablet">
792
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
793
+ <rect x="4" y="2" width="16" height="20" rx="2" ry="2"/>
794
+ </svg>
795
+ تبلت
796
+ </button>
797
+ <button data-device="laptop" class="active">
798
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
799
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2"/>
800
+ <line x1="2" y1="20" x2="22" y2="20"/>
801
+ </svg>
802
+ لپ‌تاپ
803
+ </button>
804
+ <button data-device="desktop">
805
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
806
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2"/>
807
+ <line x1="8" y1="21" x2="16" y2="21"/>
808
+ <line x1="12" y1="17" x2="12" y2="21"/>
809
+ </svg>
810
+ دسکتاپ
811
+ </button>
812
  </div>
813
+ <button class="fab" id="deviceMenuBtn">
814
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
815
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2"/>
816
+ <line x1="8" y1="21" x2="16" y2="21"/>
817
+ <line x1="12" y1="17" x2="12" y2="21"/>
818
+ </svg>
819
+ </button>
820
+ </div>
821
+
822
+ <!-- Built with -->
823
+ <div class="built-with">
824
+ Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" rel="noopener">anycoder</a>
825
  </div>
826
+
827
+ <script>
828
+ // Initialize variables first
829
+ const topBar = document.getElementById('topBar');
830
+ const showTopBarBtn = document.getElementById('showTopBar');
831
+ const previewWrapper = document.getElementById('previewWrapper');
832
+ const previewFrame = document.getElementById('previewFrame');
833
+ const loadingOverlay = document.getElementById('loadingOverlay');
834
+ const deviceBtns = document.querySelectorAll('.device-btn');
835
+ const deviceMenuBtns = document.querySelectorAll('.device-menu button');
836
+ const deviceMenu = document.getElementById('deviceMenu');
837
+ const deviceMenuBtn = document.getElementById('deviceMenuBtn');
838
+ const refreshBtn = document.getElementById('refreshBtn');
839
+ const fullscreenBtn = document.getElementById('fullscreenBtn');
840
+
841
+ let lastScrollY = 0;
842
+ let isTopBarHidden = false;
843
+
844
+ // Hide loading when iframe loads
845
+ previewFrame.addEventListener('load', () => {
846
+ setTimeout(() => {
847
+ loadingOverlay.classList.add('hidden');
848
+ }, 500);
849
+ });
850
+
851
+ // Scroll behavior for top bar
852
+ window.addEventListener('scroll', () => {
853
+ const currentScrollY = window.scrollY;
854
+
855
+ if (currentScrollY > lastScrollY && currentScrollY > 100) {
856
+ if (!isTopBarHidden) {
857
+ topBar.classList.add('hidden');
858
+ showTopBarBtn.classList.add('visible');
859
+ isTopBarHidden = true;
860
+ }
861
+ } else if (currentScrollY < lastScrollY) {
862
+ if (isTopBarHidden) {
863
+ topBar.classList.remove('hidden');
864
+ showTopBarBtn.classList.remove('visible');
865
+ isTopBarHidden = false;
866
+ }
867
+ }
868
+
869
+ lastScrollY = currentScrollY;
870
+ });
871
+
872
+ // Show top bar button
873
+ showTopBarBtn.addEventListener('click', () => {
874
+ topBar.classList.remove('hidden');
875
+ showTopBarBtn.classList.remove('visible');
876
+ isTopBarHidden = false;
877
+ });
878
+
879
+ // Device switching
880
+ function setDevice(device) {
881
+ // Update preview wrapper
882
+ previewWrapper.className = 'preview-wrapper ' + device;
883
+
884
+ // Update desktop device buttons
885
+ deviceBtns.forEach(btn => {
886
+ btn.classList.toggle('active', btn.dataset.device === device);
887
+ });
888
+
889
+ // Update mobile device menu buttons
890
+ deviceMenuBtns.forEach(btn => {
891
+ btn.classList.toggle('active', btn.dataset.device === device);
892
+ });
893
+
894
+ // Close mobile menu
895
+ deviceMenu.classList.remove('open');
896
+ }
897
+
898
+ deviceBtns.forEach(btn => {
899
+ btn.addEventListener('click', () => {
900
+ setDevice(btn.dataset.device);
901
+ });
902
+ });
903
+
904
+ deviceMenuBtns.forEach(btn => {
905
+ btn.addEventListener('click', () => {
906
+ setDevice(btn.dataset.device);
907
+ });
908
+ });
909
+
910
+ // Mobile device menu toggle
911
+ deviceMenuBtn.addEventListener('click', () => {
912
+ deviceMenu.classList.toggle('open');
913
+ });
914
+
915
+ // Close menu when clicking outside
916
+ document.addEventListener('click', (e) => {
917
+ if (!e.target.closest('.mobile-device-switcher')) {
918
+ deviceMenu.classList.remove('open');
919
+ }
920
+ });
921
+
922
+ // Refresh iframe
923
+ refreshBtn.addEventListener('click', () => {
924
+ loadingOverlay.classList.remove('hidden');
925
+ previewFrame.src = previewFrame.src;
926
+ });
927
+
928
+ // Fullscreen
929
+ fullscreenBtn.addEventListener('click', () => {
930
+ if (document.fullscreenElement) {
931
+ document.exitFullscreen();
932
+ } else if (previewWrapper.requestFullscreen) {
933
+ previewWrapper.requestFullscreen();
934
+ }
935
+ });
936
+
937
+ // Keyboard shortcuts
938
+ document.addEventListener('keydown', (e) => {
939
+ // Escape to show top bar
940
+ if (e.key === 'Escape' && isTopBarHidden) {
941
+ topBar.classList.remove('hidden');
942
+ showTopBarBtn.classList.remove('visible');
943
+ isTopBarHidden = false;
944
+ }
945
+
946
+ // Number keys for device switching
947
+ if (e.key >= '1' && e.key <= '4') {
948
+ const devices = ['mobile', 'tablet', 'laptop', 'desktop'];
949
+ setDevice devices[parseInt(e.key) - 1]);
950
+ }
951
+
952
+ // R for refresh
953
+ if (e.key === 'r' && !e.ctrlKey && !e.metaKey) {
954
+ loadingOverlay.classList.remove('hidden');
955
+ previewFrame.src = previewFrame.src;
956
+ }
957
+ });
958
+
959
+ // Initial animation
960
+ document.addEventListener('DOMContentLoaded', () => {
961
+ document.body.style.opacity = '0';
962
+ requestAnimationFrame(() => {
963
+ document.body.style.transition = 'opacity 0.5s ease';
964
+ document.body.style.opacity = '1';
965
+ });
966
+ });
967
+ </script>
968
  </body>
969
  </html>