design-clone 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +14 -0
- package/LICENSE +21 -0
- package/README.md +166 -0
- package/SKILL.md +239 -0
- package/bin/cli.js +45 -0
- package/bin/commands/help.js +29 -0
- package/bin/commands/init.js +126 -0
- package/bin/commands/verify.js +99 -0
- package/bin/utils/copy.js +65 -0
- package/bin/utils/validate.js +122 -0
- package/docs/basic-clone.md +63 -0
- package/docs/cli-reference.md +94 -0
- package/docs/design-clone-architecture.md +247 -0
- package/docs/pixel-perfect.md +86 -0
- package/docs/troubleshooting.md +97 -0
- package/package.json +57 -0
- package/requirements.txt +5 -0
- package/src/ai/analyze-structure.py +305 -0
- package/src/ai/extract-design-tokens.py +439 -0
- package/src/ai/prompts/__init__.py +2 -0
- package/src/ai/prompts/design_tokens.py +183 -0
- package/src/ai/prompts/structure_analysis.py +273 -0
- package/src/core/cookie-handler.js +76 -0
- package/src/core/css-extractor.js +107 -0
- package/src/core/dimension-extractor.js +366 -0
- package/src/core/dimension-output.js +208 -0
- package/src/core/extract-assets.js +468 -0
- package/src/core/filter-css.js +499 -0
- package/src/core/html-extractor.js +102 -0
- package/src/core/lazy-loader.js +188 -0
- package/src/core/page-readiness.js +161 -0
- package/src/core/screenshot.js +380 -0
- package/src/post-process/enhance-assets.js +157 -0
- package/src/post-process/fetch-images.js +398 -0
- package/src/post-process/inject-icons.js +311 -0
- package/src/utils/__init__.py +16 -0
- package/src/utils/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/utils/__pycache__/env.cpython-313.pyc +0 -0
- package/src/utils/browser.js +103 -0
- package/src/utils/env.js +153 -0
- package/src/utils/env.py +134 -0
- package/src/utils/helpers.js +71 -0
- package/src/utils/puppeteer.js +281 -0
- package/src/verification/verify-layout.js +424 -0
- package/src/verification/verify-menu.js +422 -0
- package/templates/base.css +705 -0
- package/templates/base.html +293 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<meta name="description" content="Generated design clone">
|
|
8
|
+
<title>Cloned Design</title>
|
|
9
|
+
|
|
10
|
+
<!-- Google Fonts - Replace with detected fonts -->
|
|
11
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
12
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
13
|
+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
14
|
+
|
|
15
|
+
<!-- Font Awesome 6 CDN -->
|
|
16
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
|
17
|
+
|
|
18
|
+
<!-- Styles -->
|
|
19
|
+
<link rel="stylesheet" href="tokens.css">
|
|
20
|
+
<link rel="stylesheet" href="styles.css">
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body>
|
|
24
|
+
<!-- Header -->
|
|
25
|
+
<header class="header">
|
|
26
|
+
<div class="header__container">
|
|
27
|
+
<a href="/" class="header__logo">
|
|
28
|
+
<i class="fa-solid fa-feather-pointed header__logo-icon"></i>
|
|
29
|
+
<span>Logo</span>
|
|
30
|
+
</a>
|
|
31
|
+
|
|
32
|
+
<nav class="header__nav">
|
|
33
|
+
<ul class="nav__list">
|
|
34
|
+
<li class="nav__item"><a href="#" class="nav__link">Home</a></li>
|
|
35
|
+
<li class="nav__item"><a href="#features" class="nav__link">Features</a></li>
|
|
36
|
+
<li class="nav__item"><a href="#about" class="nav__link">About</a></li>
|
|
37
|
+
<li class="nav__item"><a href="#contact" class="nav__link">Contact</a></li>
|
|
38
|
+
</ul>
|
|
39
|
+
</nav>
|
|
40
|
+
|
|
41
|
+
<a href="#" class="header__cta btn btn--primary">
|
|
42
|
+
<i class="fa-solid fa-paper-plane"></i>
|
|
43
|
+
Get Started
|
|
44
|
+
</a>
|
|
45
|
+
|
|
46
|
+
<button class="header__menu-toggle" aria-label="Toggle menu" aria-expanded="false">
|
|
47
|
+
<i class="fa-solid fa-bars"></i>
|
|
48
|
+
</button>
|
|
49
|
+
</div>
|
|
50
|
+
</header>
|
|
51
|
+
|
|
52
|
+
<!-- Mobile Navigation -->
|
|
53
|
+
<div class="mobile-nav" aria-hidden="true">
|
|
54
|
+
<nav class="mobile-nav__inner">
|
|
55
|
+
<ul class="mobile-nav__list">
|
|
56
|
+
<li><a href="#" class="mobile-nav__link">Home</a></li>
|
|
57
|
+
<li><a href="#features" class="mobile-nav__link">Features</a></li>
|
|
58
|
+
<li><a href="#about" class="mobile-nav__link">About</a></li>
|
|
59
|
+
<li><a href="#contact" class="mobile-nav__link">Contact</a></li>
|
|
60
|
+
</ul>
|
|
61
|
+
<a href="#" class="mobile-nav__cta btn btn--primary">
|
|
62
|
+
<i class="fa-solid fa-paper-plane"></i>
|
|
63
|
+
Get Started
|
|
64
|
+
</a>
|
|
65
|
+
</nav>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- Main Content -->
|
|
69
|
+
<main class="main">
|
|
70
|
+
<!-- Hero Section -->
|
|
71
|
+
<section class="hero">
|
|
72
|
+
<div class="hero__container">
|
|
73
|
+
<div class="hero__content">
|
|
74
|
+
<h1 class="hero__title">Welcome to Our Platform</h1>
|
|
75
|
+
<p class="hero__subtitle">
|
|
76
|
+
A brief description of what this website offers and why visitors should stay.
|
|
77
|
+
</p>
|
|
78
|
+
<div class="hero__actions">
|
|
79
|
+
<a href="#" class="hero__cta btn btn--primary btn--lg">
|
|
80
|
+
<i class="fa-solid fa-rocket"></i>
|
|
81
|
+
Primary Action
|
|
82
|
+
</a>
|
|
83
|
+
<a href="#" class="hero__cta btn btn--secondary btn--lg">
|
|
84
|
+
<i class="fa-solid fa-circle-info"></i>
|
|
85
|
+
Learn More
|
|
86
|
+
</a>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="hero__image">
|
|
90
|
+
<!-- Direct Unsplash URL - no API needed -->
|
|
91
|
+
<img src="https://images.unsplash.com/photo-1522202176988-66273c2fd55f?w=800&h=600&fit=crop&q=80"
|
|
92
|
+
alt="Hero image"
|
|
93
|
+
loading="eager">
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</section>
|
|
97
|
+
|
|
98
|
+
<!-- Features Section -->
|
|
99
|
+
<section id="features" class="features">
|
|
100
|
+
<div class="features__container">
|
|
101
|
+
<h2 class="features__title">Our Features</h2>
|
|
102
|
+
<p class="features__subtitle">Discover what makes us different</p>
|
|
103
|
+
|
|
104
|
+
<div class="features__grid">
|
|
105
|
+
<article class="feature-card">
|
|
106
|
+
<div class="feature-card__icon">
|
|
107
|
+
<i class="fa-solid fa-clock"></i>
|
|
108
|
+
</div>
|
|
109
|
+
<h3 class="feature-card__title">Feature One</h3>
|
|
110
|
+
<p class="feature-card__description">
|
|
111
|
+
Brief description of this feature and its benefits.
|
|
112
|
+
</p>
|
|
113
|
+
</article>
|
|
114
|
+
|
|
115
|
+
<article class="feature-card">
|
|
116
|
+
<div class="feature-card__icon">
|
|
117
|
+
<i class="fa-solid fa-layer-group"></i>
|
|
118
|
+
</div>
|
|
119
|
+
<h3 class="feature-card__title">Feature Two</h3>
|
|
120
|
+
<p class="feature-card__description">
|
|
121
|
+
Brief description of this feature and its benefits.
|
|
122
|
+
</p>
|
|
123
|
+
</article>
|
|
124
|
+
|
|
125
|
+
<article class="feature-card">
|
|
126
|
+
<div class="feature-card__icon">
|
|
127
|
+
<i class="fa-solid fa-circle-check"></i>
|
|
128
|
+
</div>
|
|
129
|
+
<h3 class="feature-card__title">Feature Three</h3>
|
|
130
|
+
<p class="feature-card__description">
|
|
131
|
+
Brief description of this feature and its benefits.
|
|
132
|
+
</p>
|
|
133
|
+
</article>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</section>
|
|
137
|
+
|
|
138
|
+
<!-- About Section -->
|
|
139
|
+
<section id="about" class="about">
|
|
140
|
+
<div class="about__container">
|
|
141
|
+
<div class="about__content">
|
|
142
|
+
<h2 class="about__title">About Us</h2>
|
|
143
|
+
<p class="about__text">
|
|
144
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod
|
|
145
|
+
tempor incididunt ut labore et dolore magna aliqua.
|
|
146
|
+
</p>
|
|
147
|
+
<a href="#" class="about__cta btn btn--primary">
|
|
148
|
+
<i class="fa-solid fa-arrow-right"></i>
|
|
149
|
+
Learn More
|
|
150
|
+
</a>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="about__image">
|
|
153
|
+
<!-- Direct Unsplash URL - no API needed -->
|
|
154
|
+
<img src="https://images.unsplash.com/photo-1552664730-d307ca884978?w=600&h=450&fit=crop&q=80"
|
|
155
|
+
alt="About us"
|
|
156
|
+
loading="lazy">
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</section>
|
|
160
|
+
|
|
161
|
+
<!-- CTA Section -->
|
|
162
|
+
<section class="cta-section">
|
|
163
|
+
<div class="cta-section__container">
|
|
164
|
+
<h2 class="cta-section__title">Ready to Get Started?</h2>
|
|
165
|
+
<p class="cta-section__subtitle">Join thousands of satisfied customers today.</p>
|
|
166
|
+
<a href="#" class="cta-section__button btn btn--primary btn--lg">
|
|
167
|
+
<i class="fa-solid fa-bolt"></i>
|
|
168
|
+
Start Free Trial
|
|
169
|
+
</a>
|
|
170
|
+
</div>
|
|
171
|
+
</section>
|
|
172
|
+
</main>
|
|
173
|
+
|
|
174
|
+
<!-- Footer -->
|
|
175
|
+
<footer class="footer">
|
|
176
|
+
<div class="footer__container">
|
|
177
|
+
<div class="footer__grid">
|
|
178
|
+
<!-- Brand Column -->
|
|
179
|
+
<div class="footer__column footer__column--brand">
|
|
180
|
+
<a href="/" class="footer__logo">
|
|
181
|
+
<i class="fa-solid fa-feather-pointed"></i>
|
|
182
|
+
<span>Logo</span>
|
|
183
|
+
</a>
|
|
184
|
+
<p class="footer__tagline">
|
|
185
|
+
Brief company description or tagline goes here.
|
|
186
|
+
</p>
|
|
187
|
+
<div class="footer__social">
|
|
188
|
+
<a href="#" class="footer__social-link" aria-label="Twitter">
|
|
189
|
+
<i class="fa-brands fa-x-twitter"></i>
|
|
190
|
+
</a>
|
|
191
|
+
<a href="#" class="footer__social-link" aria-label="LinkedIn">
|
|
192
|
+
<i class="fa-brands fa-linkedin-in"></i>
|
|
193
|
+
</a>
|
|
194
|
+
<a href="#" class="footer__social-link" aria-label="GitHub">
|
|
195
|
+
<i class="fa-brands fa-github"></i>
|
|
196
|
+
</a>
|
|
197
|
+
<a href="#" class="footer__social-link" aria-label="Instagram">
|
|
198
|
+
<i class="fa-brands fa-instagram"></i>
|
|
199
|
+
</a>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<!-- Links Columns -->
|
|
204
|
+
<div class="footer__column">
|
|
205
|
+
<h4 class="footer__heading">Product</h4>
|
|
206
|
+
<ul class="footer__links">
|
|
207
|
+
<li><a href="#" class="footer__link">Features</a></li>
|
|
208
|
+
<li><a href="#" class="footer__link">Pricing</a></li>
|
|
209
|
+
<li><a href="#" class="footer__link">Documentation</a></li>
|
|
210
|
+
<li><a href="#" class="footer__link">Changelog</a></li>
|
|
211
|
+
</ul>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<div class="footer__column">
|
|
215
|
+
<h4 class="footer__heading">Company</h4>
|
|
216
|
+
<ul class="footer__links">
|
|
217
|
+
<li><a href="#" class="footer__link">About</a></li>
|
|
218
|
+
<li><a href="#" class="footer__link">Blog</a></li>
|
|
219
|
+
<li><a href="#" class="footer__link">Careers</a></li>
|
|
220
|
+
<li><a href="#" class="footer__link">Contact</a></li>
|
|
221
|
+
</ul>
|
|
222
|
+
</div>
|
|
223
|
+
|
|
224
|
+
<div class="footer__column">
|
|
225
|
+
<h4 class="footer__heading">Legal</h4>
|
|
226
|
+
<ul class="footer__links">
|
|
227
|
+
<li><a href="#" class="footer__link">Privacy</a></li>
|
|
228
|
+
<li><a href="#" class="footer__link">Terms</a></li>
|
|
229
|
+
<li><a href="#" class="footer__link">Cookie Policy</a></li>
|
|
230
|
+
</ul>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div class="footer__bottom">
|
|
235
|
+
<p class="footer__copyright">
|
|
236
|
+
© 2026 Company Name. All rights reserved.
|
|
237
|
+
</p>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</footer>
|
|
241
|
+
|
|
242
|
+
<script>
|
|
243
|
+
// Mobile menu toggle
|
|
244
|
+
const toggle = document.querySelector('.header__menu-toggle');
|
|
245
|
+
const mobileNav = document.querySelector('.mobile-nav');
|
|
246
|
+
const mobileLinks = document.querySelectorAll('.mobile-nav__link, .mobile-nav__cta');
|
|
247
|
+
|
|
248
|
+
toggle?.addEventListener('click', () => {
|
|
249
|
+
const isExpanded = toggle.getAttribute('aria-expanded') === 'true';
|
|
250
|
+
toggle.setAttribute('aria-expanded', !isExpanded);
|
|
251
|
+
toggle.classList.toggle('is-active');
|
|
252
|
+
mobileNav.classList.toggle('is-active');
|
|
253
|
+
mobileNav.setAttribute('aria-hidden', isExpanded);
|
|
254
|
+
document.body.classList.toggle('no-scroll');
|
|
255
|
+
|
|
256
|
+
// Toggle icon
|
|
257
|
+
const icon = toggle.querySelector('i');
|
|
258
|
+
icon.classList.toggle('fa-bars');
|
|
259
|
+
icon.classList.toggle('fa-xmark');
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// Close mobile menu on link click
|
|
263
|
+
mobileLinks.forEach(link => {
|
|
264
|
+
link.addEventListener('click', () => {
|
|
265
|
+
toggle.setAttribute('aria-expanded', 'false');
|
|
266
|
+
toggle.classList.remove('is-active');
|
|
267
|
+
mobileNav.classList.remove('is-active');
|
|
268
|
+
mobileNav.setAttribute('aria-hidden', 'true');
|
|
269
|
+
document.body.classList.remove('no-scroll');
|
|
270
|
+
|
|
271
|
+
const icon = toggle.querySelector('i');
|
|
272
|
+
icon.classList.add('fa-bars');
|
|
273
|
+
icon.classList.remove('fa-xmark');
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
// Smooth scroll for anchor links
|
|
278
|
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
|
279
|
+
anchor.addEventListener('click', function (e) {
|
|
280
|
+
const href = this.getAttribute('href');
|
|
281
|
+
if (href === '#') return;
|
|
282
|
+
|
|
283
|
+
const target = document.querySelector(href);
|
|
284
|
+
if (target) {
|
|
285
|
+
e.preventDefault();
|
|
286
|
+
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
</script>
|
|
291
|
+
</body>
|
|
292
|
+
|
|
293
|
+
</html>
|