-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
184 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
title: Props | ||
description: '' | ||
position: 4 | ||
category: Guide | ||
--- | ||
|
||
# `src` | ||
|
||
Path to image file. `src` sould be in form of absolute path and starts with `/`. | ||
|
||
```vue | ||
<template> | ||
<nuxt-image :src="src" ... /> | ||
</template> | ||
``` | ||
|
||
## `sets` | ||
|
||
```vue | ||
<template> | ||
<!-- set prop of type array --> | ||
<nuxt-image :sets="sets" ... /> | ||
<!-- simple string type but same functionality --> | ||
<nuxt-image sets="300,300:600,600:900" ... /> | ||
<!-- | | | | | --> | ||
<!--------- width -^ | | | | --> | ||
<!-- | | | | --> | ||
<!------- breakpoint --^ | | | --> | ||
<!---------------- width --^ | | --> | ||
<!-- | | --> | ||
<!--------------- breakpoint --^ | --> | ||
<!------------------------ width --^ --> | ||
</template> | ||
<script> | ||
export default { | ||
data() { | ||
return { | ||
sets: [ | ||
{ | ||
width: 300 | ||
}, | ||
{ | ||
breakpoint: 300, | ||
width: 600 | ||
}, | ||
{ | ||
breakpoint: 600, | ||
width: 900 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
</script> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
.__nuxt-image { | ||
position: relative; | ||
overflow: hidden; | ||
background: rgba(0, 0, 0, 0.05); | ||
} | ||
|
||
.__nuxt-image img { | ||
position: absolute; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.__nuxt-image-rel { | ||
|
||
.__nuxt-image-blur { | ||
} | ||
.__nuxt-image-rel.full { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.__nuxt-image-rel.blur { | ||
filter: blur(25px); | ||
transform: scale(1.1); | ||
} | ||
|
||
.__nuxt-image-original { | ||
.__nuxt-image-abs { | ||
opacity: 0; | ||
transition: opacity 400ms ease 0ms; | ||
} | ||
.__nuxt-image-original.visible { | ||
.__nuxt-image-abs.visible { | ||
opacity: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters