create-velocity-astro 1.0.4 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-velocity-astro",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Create Velocity - A CLI to scaffold production-ready Astro 6 + Tailwind v4 projects",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,86 @@
1
+ ---
2
+ import Button from '@/components/ui/Button.astro';
3
+ import Icon from '@/components/ui/Icon.astro';
4
+ import { type Locale, defaultLocale } from '@/i18n/config';
5
+ import { useTranslations } from '@/i18n/index';
6
+
7
+ interface Props {
8
+ locale?: Locale;
9
+ }
10
+
11
+ const { locale = defaultLocale } = Astro.props;
12
+ const t = useTranslations(locale);
13
+ ---
14
+
15
+ <section id="cta" class="py-32 bg-background text-center">
16
+ <div class="mx-auto max-w-3xl px-6">
17
+ <h2 class="font-display text-4xl font-bold text-foreground md:text-5xl mb-6">
18
+ {t('cta.title')} <span class="text-brand-500">{t('cta.titleHighlight')}</span>
19
+ </h2>
20
+ <p class="text-xl text-foreground-muted mb-10">
21
+ {t('cta.description')}
22
+ </p>
23
+ <div class="flex flex-col sm:flex-row items-center justify-center gap-4">
24
+ <button
25
+ type="button"
26
+ id="copy-npm-command"
27
+ class="inline-flex items-center justify-center gap-2 h-10 px-5 text-sm font-medium rounded-md bg-foreground text-background hover:bg-foreground/90 active:scale-[0.98] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
28
+ data-command={t('cta.command')}
29
+ data-copied={t('common.copied')}
30
+ >
31
+ <Icon name="terminal" size="md" />
32
+ <span id="npm-command-text">{t('cta.command')}</span>
33
+ <span id="copy-icon" class="ml-1 text-foreground-muted">
34
+ <Icon name="copy" size="sm" />
35
+ </span>
36
+ <span id="check-icon" class="hidden ml-1 text-success">
37
+ <Icon name="check" size="sm" />
38
+ </span>
39
+ </button>
40
+ <Button
41
+ variant="outline"
42
+ size="lg"
43
+ href="https://github.com/southwell-media/velocity"
44
+ target="_blank"
45
+ >
46
+ <Icon name="book" size="md" />
47
+ {t('cta.docs')}
48
+ </Button>
49
+ </div>
50
+ </div>
51
+ </section>
52
+
53
+ <script>
54
+ function initCopyButton() {
55
+ const button = document.getElementById('copy-npm-command');
56
+ const copyIcon = document.getElementById('copy-icon');
57
+ const checkIcon = document.getElementById('check-icon');
58
+ const commandText = document.getElementById('npm-command-text');
59
+
60
+ if (!button || !copyIcon || !checkIcon || !commandText) return;
61
+
62
+ const command = button.dataset.command || 'npm create velocity@latest';
63
+ const copiedText = button.dataset.copied || 'Copied!';
64
+
65
+ button.addEventListener('click', async () => {
66
+ try {
67
+ await navigator.clipboard.writeText(command);
68
+
69
+ copyIcon.classList.add('hidden');
70
+ checkIcon.classList.remove('hidden');
71
+ commandText.textContent = copiedText;
72
+
73
+ setTimeout(() => {
74
+ copyIcon.classList.remove('hidden');
75
+ checkIcon.classList.add('hidden');
76
+ commandText.textContent = command;
77
+ }, 2000);
78
+ } catch (err) {
79
+ console.error('Failed to copy:', err);
80
+ }
81
+ });
82
+ }
83
+
84
+ initCopyButton();
85
+ document.addEventListener('astro:page-load', initCopyButton);
86
+ </script>
@@ -0,0 +1,192 @@
1
+ ---
2
+ import Icon from '@/components/ui/Icon.astro';
3
+ import { type Locale, defaultLocale } from '@/i18n/config';
4
+ import { useTranslations, getTranslations } from '@/i18n/index';
5
+
6
+ interface Props {
7
+ locale?: Locale;
8
+ }
9
+
10
+ const { locale = defaultLocale } = Astro.props;
11
+ const t = useTranslations(locale);
12
+ const translations = getTranslations(locale);
13
+
14
+ // Get the checklist items array directly from translations
15
+ const checklistItems = translations.credibility.standard.items;
16
+ ---
17
+
18
+ <section id="architecture" class="bg-surface-invert py-24 text-on-invert">
19
+ <div class="mx-auto max-w-6xl px-6 grid grid-cols-1 md:grid-cols-2 gap-16 items-center">
20
+ <!-- Left Column -->
21
+ <div>
22
+ <div class="flex items-center gap-2 text-brand-500 font-bold tracking-wide uppercase text-sm mb-4">
23
+ <Icon name="shield" size="sm" />
24
+ <span>{t('credibility.badge')}</span>
25
+ </div>
26
+
27
+ <h2 class="font-display text-3xl md:text-4xl font-bold mb-6 text-balance">
28
+ {t('credibility.title')} <span class="text-brand-500">{t('credibility.titleHighlight')}</span>.
29
+ </h2>
30
+
31
+ <div class="space-y-6 text-on-invert-secondary text-lg leading-relaxed">
32
+ <p>
33
+ {t('credibility.paragraph1')}
34
+ </p>
35
+ <p>
36
+ {t('credibility.paragraph2')}
37
+ </p>
38
+ </div>
39
+
40
+ <!-- Stats -->
41
+ <div class="mt-10 grid grid-cols-2 gap-8 border-t border-border-invert pt-8">
42
+ <!-- Lighthouse Score - Radial Progress -->
43
+ <div class="flex items-center gap-4">
44
+ <div class="relative w-16 h-16 shrink-0">
45
+ <!-- Background circle -->
46
+ <svg class="w-16 h-16 -rotate-90" viewBox="0 0 64 64">
47
+ <circle
48
+ cx="32"
49
+ cy="32"
50
+ r="28"
51
+ stroke="currentColor"
52
+ stroke-width="6"
53
+ fill="none"
54
+ class="text-green-900/50"
55
+ />
56
+ <!-- Animated progress circle -->
57
+ <circle
58
+ cx="32"
59
+ cy="32"
60
+ r="28"
61
+ stroke="url(#lighthouse-gradient)"
62
+ stroke-width="6"
63
+ fill="none"
64
+ stroke-linecap="round"
65
+ stroke-dasharray="175.93"
66
+ stroke-dashoffset="175.93"
67
+ class="lighthouse-progress"
68
+ />
69
+ <defs>
70
+ <linearGradient id="lighthouse-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
71
+ <stop offset="0%" stop-color="#22c55e" />
72
+ <stop offset="100%" stop-color="#4ade80" />
73
+ </linearGradient>
74
+ </defs>
75
+ </svg>
76
+ <!-- Center score -->
77
+ <div class="absolute inset-0 flex items-center justify-center">
78
+ <span class="text-lg font-display font-bold text-green-400">100</span>
79
+ </div>
80
+ </div>
81
+ <div>
82
+ <div class="text-xl font-display font-bold text-on-invert">{t('credibility.stats.lighthouse.score')}</div>
83
+ <div class="text-sm text-on-invert-muted">{t('credibility.stats.lighthouse.label')}</div>
84
+ </div>
85
+ </div>
86
+
87
+ <!-- Delivery Time - Calendar/Sprint Visual -->
88
+ <div class="flex items-center gap-4">
89
+ <div class="relative w-16 h-16 shrink-0 overflow-visible">
90
+ <!-- Calendar container -->
91
+ <div class="w-16 h-16 rounded-md bg-surface-invert-tertiary border border-border-invert-strong overflow-visible flex flex-col">
92
+ <!-- Calendar header -->
93
+ <div class="h-4 bg-brand-500 flex items-center justify-center rounded-t-md">
94
+ <div class="flex gap-0.5">
95
+ <span class="w-1 h-1 rounded-full bg-white/60"></span>
96
+ <span class="w-1 h-1 rounded-full bg-white/60"></span>
97
+ <span class="w-1 h-1 rounded-full bg-white/60"></span>
98
+ </div>
99
+ </div>
100
+ <!-- Calendar body -->
101
+ <div class="flex-1 flex items-center justify-center relative overflow-visible">
102
+ <span class="text-2xl font-display font-bold text-on-invert">14</span>
103
+ <!-- Animated checkmark -->
104
+ <svg class="absolute -bottom-1 -right-1 w-5 h-5 text-green-400 delivery-check" viewBox="0 0 24 24" fill="none">
105
+ <circle cx="12" cy="12" r="10" fill="currentColor" class="text-green-500"/>
106
+ <path d="M8 12l2.5 2.5L16 9" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="delivery-check-mark"/>
107
+ </svg>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <div>
112
+ <div class="text-xl font-display font-bold text-on-invert">{t('credibility.stats.delivery.days')}</div>
113
+ <div class="text-sm text-on-invert-muted">{t('credibility.stats.delivery.label')}</div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+
118
+ <style>
119
+ /* Lighthouse radial progress animation */
120
+ .lighthouse-progress {
121
+ animation: lighthouse-fill 1.5s ease-out 0.5s forwards;
122
+ }
123
+
124
+ @keyframes lighthouse-fill {
125
+ to {
126
+ stroke-dashoffset: 0;
127
+ }
128
+ }
129
+
130
+ /* Delivery checkmark animation */
131
+ .delivery-check {
132
+ opacity: 0;
133
+ transform: scale(0);
134
+ animation: check-pop 0.4s ease-out 1.2s forwards;
135
+ }
136
+
137
+ @keyframes check-pop {
138
+ 0% {
139
+ opacity: 0;
140
+ transform: scale(0);
141
+ }
142
+ 70% {
143
+ transform: scale(1.2);
144
+ }
145
+ 100% {
146
+ opacity: 1;
147
+ transform: scale(1);
148
+ }
149
+ }
150
+
151
+ .delivery-check-mark {
152
+ stroke-dasharray: 20;
153
+ stroke-dashoffset: 20;
154
+ animation: check-draw 0.3s ease-out 1.4s forwards;
155
+ }
156
+
157
+ @keyframes check-draw {
158
+ to {
159
+ stroke-dashoffset: 0;
160
+ }
161
+ }
162
+ </style>
163
+ </div>
164
+
165
+ <!-- Right Column - Card -->
166
+ <div class="relative">
167
+ <div class="bg-surface-invert-secondary rounded-lg p-8 border border-border-invert relative overflow-hidden">
168
+ <!-- Decorative glow -->
169
+ <div class="absolute top-0 right-0 p-32 bg-brand-500/10 rounded-full blur-3xl"></div>
170
+
171
+ <h3 class="font-display text-xl font-bold mb-6 relative z-10 text-on-invert">{t('credibility.standard.title')}</h3>
172
+
173
+ <ul class="space-y-4 relative z-10">
174
+ {checklistItems.map((item) => (
175
+ <li class="flex items-center gap-3">
176
+ <span class="text-brand-500 shrink-0">
177
+ <Icon name="check-circle" size="md" />
178
+ </span>
179
+ <span class="text-on-invert-secondary">{item}</span>
180
+ </li>
181
+ ))}
182
+ </ul>
183
+
184
+ <!-- Testimonial -->
185
+ <div class="mt-8 pt-6 border-t border-border-invert relative z-10">
186
+ <p class="text-sm text-on-invert-muted italic">{t('credibility.testimonial.quote')}</p>
187
+ <p class="text-xs text-on-invert-muted/70 mt-2 font-bold uppercase tracking-wider">{t('credibility.testimonial.author')}</p>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ </div>
192
+ </section>