Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 1ea2820

Browse files
doc: new SVG option of the component lazy-img
1 parent 21d31ad commit 1ea2820

File tree

6 files changed

+28
-4
lines changed

6 files changed

+28
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The [DeckDeckGo website](https://github.com/deckgo/deckdeckgo-website) is a full
2929

3030
| Project | Version | Online | Links |
3131
| ------- | ------- | ------- |:-----:|
32-
| **Documentation** | [![version](https://img.shields.io/static/v1.svg?label=production&message=v1.0.0-alpha.19&color=success)](https://docs.deckdeckgo.com) | [https://docs.deckdeckgo.com](https://docs.deckdeckgo.com) | [`README.md`](docs/README.md)
32+
| **Documentation** | [![version](https://img.shields.io/static/v1.svg?label=production&message=v1.0.0-alpha.21&color=success)](https://docs.deckdeckgo.com) | [https://docs.deckdeckgo.com](https://docs.deckdeckgo.com) | [`README.md`](docs/README.md)
3333
| **Remote control** | [![version](https://img.shields.io/static/v1.svg?label=production&message=v1.0.0-alpha.12&color=success)](https://deckdeckgo.app) | [https://deckdeckgo.app](https://deckdeckgo.app) | [`README.md`](remote/README.md)
3434
| **Studio** | ![version](https://img.shields.io/static/v1.svg?label=in%20development&message=v1.0.0-alpha.4&color=orange) | | [`README.md`](studio/README.md)
3535
| **Website** | [![version](https://img.shields.io/static/v1.svg?label=production&message=v1.0.0-beta.15&color=success)](https://deckdeckgo.com) | [https://deckdeckgo.com](https://deckdeckgo.com) | [`Repo`](https://github.com/deckgo/deckdeckgo-website/)

docs/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
<a name="1.0.0-alpha.21"></a>
2+
# 1.0.0-alpha.21 (2019-07-17)
3+
4+
### Features
5+
6+
* add new option `SVG` to component `lazy-img`
7+
18
<a name="1.0.0-alpha.20"></a>
29
# 1.0.0-alpha.20 (2019-07-13)
310

docs/docs/components/app-components-lazy-img/app-components-lazy-img.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ The "Lazy Image" component is a dead simple component to lazy load images.
44

55
It leverages the IntersectionObserver API to lazy load images and also allows you to trigger "manually" their loading.
66

7+
An `<img/>` tag is per default use to display the image but optionally it could parse `SVG` too.
8+
79
## Table of contents
810

911
- [Usage](#app-components-lazy-img-usage)
@@ -38,6 +40,8 @@ This component offers the following options which could be set using attributes:
3840
| img-error-src | string | | An optional image which could be displayed in case the main image would not be resolved |
3941
| img-sizes | string | | The set of media conditions to indicates what image size would be best to choose |
4042
| img-alt | string | | The image alternate text |
43+
| svg-src | string | | The SVG image source (= URI) to lazy load and to parse (no `<img/>` tag will be use to render the svg) |
44+
| aria-label | string | | If you are using the above SVG option, provide the accessibility information using this attribute |
4145
| observer-root-margin | string | 100px 0px | A string which specifies a set of offsets to add to the root's bounding_box when calculating intersections, effectively shrinking or growing the root for calculation purposes. [More info.](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver) |
4246
| observer-threshold | number or number[] | | Either a single number or an array of numbers between 0.0 and 1.0, specifying a ratio of intersection area to total bounding box area for the observed target. [More info.](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver/IntersectionObserver) |
4347

docs/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "deckdeckgo-docs",
3-
"version": "1.0.0-alpha.19",
3+
"version": "1.0.0-alpha.21",
44
"description": "The Progressive Web App alternative for simple presentations",
55
"license": "MIT",
66
"files": [
77
"dist/"
88
],
99
"scripts": {
1010
"docs": "tsc --p ./scripts && node ./.deckgo/markdown-to-html",
11-
"build": "npm run docs && stencil build --prerender",
11+
"build": "npm run docs && stencil build",
1212
"start": "npm run docs && stencil build --dev --watch --serve",
1313
"test": "npm run docs && stencil test --spec --e2e",
1414
"test.watch": "npm run docs && stencil test --spec --e2e --watch"

docs/src/app/pages/docs/components/app-components-lazy-img/app-components-lazy-img.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export class AppComponentsLazyImg {
3333
<main><h1 id="app-components-lazy-img-lazy-image">Lazy Image</h1>
3434
<p>The &quot;Lazy Image&quot; component is a dead simple component to lazy load images.</p>
3535
<p>It leverages the IntersectionObserver API to lazy load images and also allows you to trigger &quot;manually&quot; their loading.</p>
36+
<p>An <code>&lt;img/&gt;</code> tag is per default use to display the image but optionally it could parse <code>SVG</code> too.</p>
3637
<h2 id="app-components-lazy-img-table-of-contents">Table of contents</h2>
3738
<ul>
3839
<li><a href="#app-components-lazy-img-usage">Usage</a><ul>
@@ -93,6 +94,18 @@ export class AppComponentsLazyImg {
9394
<td>The image alternate text</td>
9495
</tr>
9596
<tr>
97+
<td>svg-src</td>
98+
<td>string</td>
99+
<td></td>
100+
<td>The SVG image source (= URI) to lazy load and to parse (no <code>&lt;img/&gt;</code> tag will be use to render the svg)</td>
101+
</tr>
102+
<tr>
103+
<td>aria-label</td>
104+
<td>string</td>
105+
<td></td>
106+
<td>If you are using the above SVG option, provide the accessibility information using this attribute</td>
107+
</tr>
108+
<tr>
96109
<td>observer-root-margin</td>
97110
<td>string</td>
98111
<td>100px 0px</td>

0 commit comments

Comments
 (0)