Skip to content

Commit

Permalink
2.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
JayChase committed Mar 2, 2020
1 parent 3f2e56c commit 9b31b07
Show file tree
Hide file tree
Showing 10 changed files with 17,441 additions and 18,273 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# 2.0.9

- Added classes to picture and imag elements to make more stylable

# 2.0.8

## Improvements

- set native lazy loading true on img by default (ready for browser support)
- Set native lazy loading true on img by default (ready for browser support)

# 2.0.0

Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ The data context for the template is:
## Example of rendered element

```html
<picture>
<picture class="ngx-picture__picture">
<source
srcset="assets/images/banner-300.webp"
media="(max-width: 599.99px)"
Expand Down Expand Up @@ -246,10 +246,30 @@ The data context for the template is:
media="(min-width: 1920px)"
type="image/jpeg"
/>
<img src="assets/images/banner.jpg" alt="test" loading="lazy" />
<img
class="ngx-picture__picture__img"
src="assets/images/banner.jpg"
alt="test"
loading="lazy"
/>
</picture>
```

## Styling

The **picture** element in the component has the class **ngx-picture\_\_picture** and the img element has the class **ngx-picture**picture**img**.

```scss
.your-picture-class {
.ngx-picture__picture {
width: 100%;
.ngx-picture__picture__img {
width: 100%;
}
}
}
```

## More

To clone this repo and run it locally.
Expand Down
19 changes: 14 additions & 5 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@
"projects/demo/tsconfig.app.json",
"projects/demo/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
Expand Down Expand Up @@ -164,7 +166,9 @@
"options": {
"browserTarget": "demo:build:production",
"serverTarget": "demo:server:production",
"routes": ["/"]
"routes": [
"/"
]
},
"configurations": {
"production": {}
Expand Down Expand Up @@ -205,11 +209,16 @@
"projects/ngx-picture/tsconfig.lib.json",
"projects/ngx-picture/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "demo"
}
"defaultProject": "demo",
"cli": {
"analytics": false
}
}
Loading

0 comments on commit 9b31b07

Please sign in to comment.