@@ -150,6 +150,24 @@ const benchmarks = {
150
150
si: 3900 ,
151
151
},
152
152
},
153
+ intercom: {
154
+ logo: registry .find (s => s .import ?.name === ' useScriptIntercom' ).logo ,
155
+ label: ' Intercom' ,
156
+ nuxt: {
157
+ link: ' https://scripts-phi.vercel.app/third-parties/intercom/nuxt-scripts' ,
158
+ fcp: 1400 ,
159
+ tbt: 220 ,
160
+ lcp: 1400 ,
161
+ si: 1900 ,
162
+ },
163
+ iframe: {
164
+ link: ' https://scripts-phi.vercel.app/third-parties/intercom/default' ,
165
+ fcp: 1400 ,
166
+ tbt: 850 ,
167
+ lcp: 1400 ,
168
+ si: 2800 ,
169
+ },
170
+ },
153
171
}
154
172
155
173
const webVital = ref (' tbt' )
@@ -166,6 +184,8 @@ function timesFaster(nuxt: number, iframe: number) {
166
184
// should display as 2.5 for 2500%
167
185
return (iframe / nuxt ).toFixed (1 )
168
186
}
187
+ const { data } = await useAsyncData (' code-example' , () => queryContent (' /_magic-api' ).findOne ())
188
+ const { data : data2 } = await useAsyncData (' code-example2' , () => queryContent (' /_cookie-api' ).findOne ())
169
189
170
190
const contributors = useRuntimeConfig ().public .contributors
171
191
</script >
@@ -208,23 +228,39 @@ const contributors = useRuntimeConfig().public.contributors
208
228
</div>
209
229
</ULandingHero>
210
230
211
- <ULandingSection :ui="{ wrapper: 'py-6 sm:py-12 ' }">
231
+ <ULandingSection :ui="{ wrapper: 'pt-0 py-6 sm:py-14 ' }">
212
232
<ul class="grid grid-cols-1 gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-4 lg:gap-x-8 lg:gap-y-16">
213
- <li v-for="feature in features" :key="feature.name" class="flex flex-col gap-y-2">
214
- <UIcon :name="feature.icon" class="h-8 w-8 shrink-0 text-primary" />
215
- <div class="flex flex-col gap-y-1">
216
- <h5 class="font-medium text-gray-900 dark:text-white">
217
- {{ feature.name }}
218
- </h5>
219
- <p class="text-gray-500 dark:text-gray-400">
220
- {{ feature.description }}
221
- </p>
222
- </div>
223
- </li>
233
+ <ShowcaseCard v-for="feature in features" :key="feature.name" :label="feature.name" :description="feature.description">
234
+ <UIcon :name="feature.icon" class="h-20 w-20 shrink-0 text-primary" />
235
+ </ShowcaseCard>
224
236
</ul>
225
237
</ULandingSection>
226
238
227
- <UContainer class="py-6 sm:py-20 gap-8 lg:gap-20 mb-12 flex flex-col xl:flex-row ">
239
+ <ULandingSection :ui="{ wrapper: 'pt-0 py-6 sm:py-14' }">
240
+ <div class="xl:flex items-center justify-between gap-12">
241
+ <div class="max-w-lg">
242
+ <UIcon name="i-ph-magic-wand-duotone" class="h-[100px] w-[100px] text-primary" />
243
+ <h2 class="text-xl xl:text-4xl font-bold mb-4">
244
+ A powerful API with <span class="italic">just enough</span> magic
245
+ </h2>
246
+ <p class="text-gray-500 dark:text-gray-400 mb-3">
247
+ Nuxt Scripts provides an abstraction layer on top of third-party scripts, providing SSR support and type-safety and
248
+ while still giving you full low-level control over how a script is loaded.
249
+ </p>
250
+ </div>
251
+ <UCard>
252
+ <div class="padded-code xl:col-span-7 hidden sm:block">
253
+ <div class="flex justify-center xl:justify-end">
254
+ <div class="flex relative items-center bg-gradient-to-br to-green-200/50 from-blue-100/50 dark:from-green-500/10 dark:to-blue-500/20 rounded">
255
+ <ContentRenderer :value="data" class="xl:col-span-6 max-w-full" />
256
+ </div>
257
+ </div>
258
+ </div>
259
+ </UCard>
260
+ </div>
261
+ </ULandingSection>
262
+
263
+ <UContainer class="py-6 sm:py-20 gap-8 lg:gap-20 flex flex-col xl:flex-row ">
228
264
<div class="max-w-lg">
229
265
<UIcon name="i-ph-speedometer-duotone" class="h-[100px] w-[100px] text-primary" />
230
266
<h2 class="text-xl xl:text-4xl font-bold flex items-center gap-4 mb-4">
@@ -245,7 +281,7 @@ const contributors = useRuntimeConfig().public.contributors
245
281
<div class="flex flex-col lg:grid grid-cols-2 mb-8 gap-8">
246
282
<div v-for="(benchmark, key) in benchmarks" :key="key">
247
283
<h3 class="md:text-xl font-bold flex items-center gap-3 mb-5">
248
- <div class="logo h-auto w-7" v-html="benchmark.logo" />
284
+ <div class="logo h-auto w-7 max-h-7 " v-html="benchmark.logo" />
249
285
{{ benchmark.label }}
250
286
</h3>
251
287
<div class="mb-3">
@@ -293,33 +329,66 @@ const contributors = useRuntimeConfig().public.contributors
293
329
</p>
294
330
</div>
295
331
</UContainer>
296
- <ULandingSection :ui="{ wrapper: 'py-6 sm:py-12' }">
297
- <div class="xl:flex items-center gap-12 mx-auto">
332
+
333
+ <ULandingSection :ui="{ wrapper: 'pt-0 py-6 sm:py-14' }">
334
+ <div class="xl:flex items-center justify-between gap-12">
298
335
<div class="max-w-lg">
299
- <h2 class="text-xl xl:text-4xl font-bold flex items-center gap-4 mb-4" >
300
- <UIcon name="i-ph-handshake-duotone" class="h-12 w-12 shrink-0 text-primary" / >
301
- <span>A collaboration in making the web faster</span>
336
+ <UIcon name="i-ph-cookie-duotone" class="h-[100px] w-[100px] text-primary" / >
337
+ <h2 class="text-xl xl:text-4xl font-bold mb-4" >
338
+ Cookie consent that's good enough to eat
302
339
</h2>
303
- <p class="text-gray-500 dark:text-gray-400 mb-1">
304
- Nuxt Scripts was designed and built by the Nuxt core team in collaboration with the <a href="https://developer.chrome.com/aurora" target="_blank" class="underline">Chrome Aurora</a> team at Google.
340
+ <p class="text-gray-500 dark:text-gray-400 mb-3">
341
+ Nuxt Scripts aims to improve end-user privacy by providing a <NuxtLink to="/docs/guide/consent" class="underline">
342
+ simple API for managing cookie consent
343
+ </NuxtLink>.
305
344
</p>
306
- <p class="text-gray-500 dark:text-gray-400 mb-1 ">
307
- It's being actively maintained by the Nuxt core team and amazing community contributors .
345
+ <p class="text-gray-500 dark:text-gray-400 mb-3 ">
346
+ All scripts can be loaded conditionally based on user consent, set it up however you need .
308
347
</p>
309
348
</div>
349
+ <UCard>
350
+ <div class="padded-code xl:col-span-7 hidden sm:block">
351
+ <div class="flex justify-center xl:justify-end">
352
+ <div class="flex relative items-center bg-gradient-to-br to-green-200/50 from-blue-100/50 dark:from-green-500/10 dark:to-blue-500/20 rounded">
353
+ <ContentRenderer :value="data2" class="xl:col-span-6 max-w-full" />
354
+ </div>
355
+ </div>
356
+ </div>
357
+ </UCard>
358
+ </div>
359
+ </ULandingSection>
360
+
361
+ <ULandingSection :ui="{ wrapper: 'py-6 sm:py-12' }">
362
+ <div class="xl:flex items-center gap-12">
310
363
<div>
311
- <div class="xl:flex justify-center items-center gap-3 mb-8">
312
- <div class="font-light text-6xl mb-2">
313
- <Icon name="carbon:user-favorite-alt" />
314
- {{ contributors.length }}
364
+ <div class="max-w-lg">
365
+ <UIcon name="i-ph-handshake-duotone" class="h-[100px] w-[100px] text-primary" />
366
+ <h2 class="text-xl xl:text-4xl font-bold flex items-center gap-4 mb-4">
367
+ <span>A faster web collaboration</span>
368
+ </h2>
369
+ <p class="text-gray-500 dark:text-gray-400 mb-4">
370
+ Nuxt Scripts was designed and built by the Nuxt core team in collaboration with the <a href="https://developer.chrome.com/aurora" target="_blank" class="underline">Chrome Aurora</a> team at Google.
371
+ </p>
372
+ <p class="text-gray-500 dark:text-gray-400 mb-1">
373
+ Nuxt Scripts is being actively maintained by the Nuxt core team and amazing community contributors, we welcome all contributions.
374
+ </p>
375
+ </div>
376
+ </div>
377
+ <div class="flex-grow">
378
+ <div class="max-w-lg flex flex-col items-center">
379
+ <div class="xl:flex justify-center items-center gap-3 mb-8">
380
+ <div class="font-light text-6xl mb-2">
381
+ <Icon name="carbon:user-favorite-alt" />
382
+ {{ contributors.length }}
383
+ </div>
384
+ <div class="text-sm opacity-80">
385
+ Contributors
386
+ </div>
315
387
</div>
316
- <div class="text-sm opacity-80 ">
317
- Contributors
388
+ <div class="mb-7 gap-2 mx-auto text-center grid grid-cols-4 sm:grid-cols-7 ">
389
+ <UAvatar v-for="(c, index) in contributors" :key="index" :alt="`GitHub User ${c}`" size="xl" height="45" width="45" loading="lazy" :src="`https://avatars.githubusercontent.com/u/${c}?s=80&v=4`" />
318
390
</div>
319
391
</div>
320
- <div class="mb-7 gap-2 mx-auto text-center grid grid-cols-4 sm:grid-cols-7">
321
- <UAvatar v-for="(c, index) in contributors" :key="index" :alt="`GitHub User ${c}`" size="xl" height="45" width="45" loading="lazy" :src="`https://avatars.githubusercontent.com/u/${c}?s=80&v=4`" />
322
- </div>
323
392
</div>
324
393
</div>
325
394
</ULandingSection>
@@ -432,4 +501,7 @@ const contributors = useRuntimeConfig().public.contributors
432
501
filter: drop-shadow(0px 1px 4px rgba(56,239,125, 0.5));
433
502
}
434
503
}
504
+ .padded-code pre {
505
+ padding: 0.75em 1em;
506
+ }
435
507
</style>
0 commit comments