Skip to content

Commit 5107d47

Browse files
committed
chore: update example
1 parent cfd284f commit 5107d47

9 files changed

Lines changed: 2326 additions & 6152 deletions

File tree

docs/components/content/HomeHero.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
</nuxt-link>
7878

7979
<a
80-
href="https://githubbox.com/nuxt/image/tree/main/example"
80+
href="https://githubbox.com/nuxt/image/tree/v1/example"
8181
target="_blank"
8282
rel="noopener"
8383
class="

example/.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
.nuxt
2-
dist
31
node_modules
42
*.log*
3+
.nuxt
4+
.nitro
5+
.cache
56
.output
7+
.env
8+
dist
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
2-
<main>
3-
<!-- https://image.nuxtjs.org/components/nuxt-picture -->
4-
<!-- https://image.nuxtjs.org/components/nuxt-img -->
2+
<NuxtLayout>
3+
<!-- https://v1.image.nuxtjs.org/components/nuxt-picture -->
4+
<!-- https://v1.image.nuxtjs.org/components/nuxt-img -->
55
<figure>
66
<nuxt-picture
77
src="/images/mountains.jpg"
@@ -13,7 +13,7 @@
1313
Photo by <a href="https://unsplash.com/@kydroon" target="_blank" class="underline">Kurt Cotoaga</a> on <a href="https://unsplash.com/s/photos/mountain" target="_blank" class="underline">Unsplash</a>
1414
</figcaption>
1515
</figure>
16-
</main>
16+
</NuxtLayout>
1717
</template>
1818

1919
<script>

example/layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Feel free to check out the full <a href="https://image.nuxtjs.org" target="_blank" class="text-green-500 hover:underline">documentation</a> to see everything you can do.<br>
1515
</p>
1616
<div class="block my-4 border-b" />
17-
<nuxt />
17+
<slot />
1818
<div class="block my-4 border-b" />
1919
<p class="mt-3 text-gray-600">
2020
You can edit the props or the <a href="https://image.nuxtjs.org/components/nuxt-picture" target="_blank" class="text-green-500 hover:underline">&lt;nuxt-picture&gt;</a> component in sandbox to see what you can do. Have fun!

example/nuxt.config.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
export default {
2-
components: true,
32
head: {
4-
title: 'Nuxt Image Example',
5-
htmlAttrs: {
6-
lang: 'en'
7-
},
8-
meta: [
9-
{ charset: 'utf-8' },
10-
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
11-
{ hid: 'description', name: 'description', content: '' }
12-
]
3+
title: 'Nuxt Image Example'
134
},
145
modules: [
15-
'@nuxt/image'
6+
'@nuxt/image-edge'
167
],
178
image: {
18-
domains: ['https://images.unsplash.com', 'https://source.unsplash.com']
9+
domains: [
10+
'https://images.unsplash.com',
11+
'https://source.unsplash.com'
12+
]
1913
}
2014
}

example/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"private": true,
33
"scripts": {
4-
"dev": "nuxt",
54
"build": "nuxt build",
5+
"dev": "nuxt dev",
66
"generate": "nuxt generate",
7-
"start": "nuxt start"
7+
"preview": "nuxt preview"
88
},
99
"devDependencies": {
10-
"@nuxt/image": "^0.7.1",
11-
"nuxt": "^2.15.8"
10+
"@nuxt/image-edge": "1.0.0-testing",
11+
"nuxt": "^3.0.0-rc.4"
1212
}
1313
}

example/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./.nuxt/tsconfig.json"
3+
}

example/yarn.lock

Lines changed: 2302 additions & 6128 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)