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

Commit 00061d0

Browse files
merge: stock photos, images and more cool stuffs
2 parents b90f8fd + c2f57bd commit 00061d0

File tree

113 files changed

+6698
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+6698
-408
lines changed

docs/docs/components/app-components-inline-editor/app-components-inline-editor.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ The "WYSIWYG inline editor" component is an extra component which will be use in
44

55
## Table of contents
66

7-
- [Showcase](#app-components-qrcode-showcase)
8-
- [Getting started](#app-components-qrcode-getting-started)
7+
- [Showcase](#app-components-inline-editor-showcase)
8+
- [Getting started](#app-components-inline-editor-getting-started)
99
- [Using from a CDN](#app-components-from-a-cdn)
1010
- [Install from NPM](#app-components-from-npm)
11-
- [Framework integration](#app-components-qrcode-framework-integration)
12-
- [Usage](#app-components-qrcode-usage)
13-
- [Properties](#app-components-qrcode-properties)
14-
- [Styling](#app-components-qrcode-styling)
15-
- [Examples](#app-components-qrcode-examples)
11+
- [Framework integration](#app-components-inline-editor-framework-integration)
12+
- [Usage](#app-components-inline-editor-usage)
13+
- [Properties](#app-components-inline-editor-properties)
14+
- [Styling](#app-components-inline-editor-styling)
15+
- [Events](#app-components-inline-editor-events)
16+
- [Examples](#app-components-inline-editor-examples)
1617

1718
## Showcase
1819

@@ -22,9 +23,12 @@ The "WYSIWYG inline editor" component is an extra component which will be use in
2223
<h2 style={{color: '#3880ff'}} contenteditable slot="title">The Progressive Web App alternative for simple presentations 🚀 (editable subtitle)</h2>
2324

2425
<p style={{color: '#3880ff'}} contenteditable slot="content">Edit anywhere, display everywhere (editable paragraph)</p>
26+
27+
<p style={{width: '200px'}} contenteditable><img style={{'max-width': '100%'}} src="https://pixabay.com/get/ea34b50f2cfd033ed1584d05fb1d4794e070e2d71eb80c4090f5c679a2edb4b0d8_1280.jpg"/></p>
28+
2529
</div>
2630

27-
<deckgo-inline-editor sticky-desktop="true" sticky-mobile="true"></deckgo-inline-editor>
31+
<deckgo-inline-editor sticky-desktop="true" sticky-mobile="true" containers="h1,h2,h3,h4,h5,h6,p"></deckgo-inline-editor>
2832

2933
## Getting started
3034

@@ -108,6 +112,14 @@ Furthermore, the following variables are also available but only have an effects
108112

109113
** like above but for mobile
110114

115+
### Events
116+
117+
The event `input` will be automatically triggered when the content will be modified using the `<deckgo-inline-editor/>`. However, when manipulating image, this event won't be triggered. Therefore a custom event will be instead triggered:
118+
119+
| Event | Description | Type |
120+
| -------------- | ----------- | -------------------------- |
121+
| `imgDidChange` | Triggered when an image is manipulated. Note: the event won't provide directly the image but rather its container element. | `CustomEvent<HTMLElement>` |
122+
111123
### Examples
112124

113125
```
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Lazy Image
2+
3+
The "Lazy Image" component is a dead simple component to lazy load images.
4+
5+
It leverages the IntersectionObserver API to lazy load images and also allows you to trigger "manually" their loading.
6+
7+
## Table of contents
8+
9+
- [Usage](#app-components-lazy-img-usage)
10+
- [Slots](#app-components-lazy-img-slots)
11+
- [Attributes](#app-components-lazy-img-attributes)
12+
- [Theming](#app-components-lazy-img-theming)
13+
- [Methods](#app-components-lazy-img-methods)
14+
15+
## Usage
16+
17+
The "Lazy Image" Web Component could be integrated using the tag `<deckgo-lazy-img/>`.
18+
19+
```
20+
<deckgo-lazy-img img-src="/assets/twitter.svg">
21+
</deckgo-lazy-img>
22+
```
23+
24+
### Slots
25+
26+
No slots are available for this component.
27+
28+
### Attributes
29+
30+
This component offers the following options which could be set using attributes:
31+
32+
| Attribute | Type | Default | Description |
33+
| -------------------------- |-----------------|-----------------|-----------------|
34+
| img-src | string | | The image source (= URI) to lazy load |
35+
| img-alt | string | | The image alternate text |
36+
| 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) |
37+
| 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) |
38+
39+
### Theming
40+
41+
The following theming options will affect this component if set on its host or parent.
42+
43+
| CSS4 variable | Default | Note |
44+
| -------------------------- |-----------------|-----------------|
45+
| --deckgo-lazy-img-max-width | 100% | Image max width |
46+
| --deckgo-lazy-img-min-width | | Image min width |
47+
| --deckgo-lazy-img-pointer-events | none | Image pointer events |
48+
| --deckgo-lazy-img-height | | Image height |
49+
| --deckgo-lazy-img-width | | Image width |
50+
| --deckgo-lazy-img-float | | Image float |
51+
| --deckgo-lazy-img-padding | | Image padding |
52+
53+
### Methods
54+
55+
This component also expost an async method `lazyLoad()` in case you would like to trigger "manually" the loading of the image.
56+
57+
```
58+
const element = document.querySelector('deckgo-lazy-img');
59+
await element.lazyLoad();
60+
```
61+
62+
[DeckDeckGo]: https://deckdeckgo.com

docs/docs/components/app-components-social/app-components-social.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ The "Social" component allows you to easily add a social link to your presentati
44

55
## Table of contents
66

7-
- [Showcase](#showcase)
8-
- [Usage](#usage)
9-
- [Slots](#slots)
10-
- [Attributes](#attributes)
11-
- [Examples](#examples)
7+
- [Showcase](#app-components-social-showcase)
8+
- [Usage](#app-components-social-usage)
9+
- [Slots](#app-components-social-slots)
10+
- [Attributes](#app-components-social-attributes)
11+
- [Examples](#app-components-social-examples)
1212

1313
## Showcase
1414

@@ -22,7 +22,7 @@ The "Social" component allows you to easily add a social link to your presentati
2222

2323
## Usage
2424

25-
The "Social" slide's Web Component could be integrated using the tag `<deckgo-social/>`.
25+
The "Social" Web Component could be integrated using the tag `<deckgo-social/>`.
2626

2727
```
2828
<deckgo-social twitter="daviddalbusco">

docs/docs/deck/app-deck-extra-features/app-deck-extra-features.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The [DeckDeckGo] deck exposes a couple of extra features which could be added to
88
- [Print the presentation](#app-deck-extra-features-print-the-presentation)
99
- [Mobile](#app-deck-extra-features-mobile)
1010
- [initSlideSize](#app-deck-extra-features-init-slide-size)
11+
- [loadBackground](#app-deck-extra-features-load-background)
1112

1213
## Toggle on/off the full screen mode
1314

@@ -37,4 +38,12 @@ In case you would like to recalculate the slides' size (width and height)
3738
await deck.initSlideSize();
3839
```
3940

41+
## Load background
42+
43+
If you would dynamically change the deck background element you could forward that changes to also slides using the following method:
44+
45+
```
46+
await deck.loadBackground();
47+
```
48+
4049
[DeckDeckGo]: https://deckdeckgo.com

docs/docs/edit/app-edit-lazy-loading/app-edit-lazy-loading.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,22 @@
22

33
[DeckDeckGo] is build for performance and try to lazy load as much as possible the components of your presentation, have a look to the Lighthouse score of the [DeckDeckGo] website for reference.
44

5-
Therefore, in order to lazy load the images of your presentation, please provide their url using the attribute `data-src` instead of `src`. [DeckDeckGo] will then take care of loading them only when needed.
5+
In order to lazy load the images of your presentation, your could either use our dead simple component or tweak your images's attributes like following.
6+
7+
[DeckDeckGo] handles the lazy loading of images provided in both forms.
8+
9+
## Lazy Image component
10+
11+
Here's an example of usage of our component:
12+
13+
```
14+
<deckgo-lazy-img img-src="https://deckdeckgo.com/assets/img/deckdeckgo.png">
15+
</deckgo-lazy-img>
16+
```
17+
18+
## Tweak Image Tag
19+
20+
Instead of providing the url of your images as `src`, which would trigger an instant loading of their content, in case you would not like to use our above component, please provide their url using the attribute `data-src` instead of `src`.
621

722
```
823
<img data-src="https://deckdeckgo.com/assets/img/deckdeckgo.png"/>

docs/docs/slides/app-slide-author/app-slide-author.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ This component offers the following options which could be set using attributes:
7171
| -------------------------- |-----------------|-----------------|-----------------|
7272
| img-src | string | | An image URI, for example a picture of the author. Note: this image will be displayed as a circle. |
7373
| img-alt | string | | An optional accessibility alt for the image. |
74+
| custom-background | boolean | false | If you would provide a background for the all deck and a specific one for this slide, set this option to `true` |
75+
| custom-actions | boolean | false | If you would provide actions for the all deck and a specific one for this slide, set this option to `true` |
7476

7577
### Example
7678

docs/docs/slides/app-slide-chart/app-slide-chart.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ This component offers the following options which could be set using attributes:
6868
| Attribute | Type | Default | Description |
6969
| -------------------------- |-----------------|-----------------|-----------------|
7070
| type | string | pie | The type of the chart, `pie`, `line` or `bar` |
71+
| custom-background | boolean | false | If you would provide a background for the all deck and a specific one for this slide, set this option to `true` |
72+
| custom-actions | boolean | false | If you would provide actions for the all deck and a specific one for this slide, set this option to `true` |
7173

7274
Furthermore, this slide component offers the same attributes as the [DeckDeckGo] charts Web Component, see its [documentation](https://github.com/deckgo/deckdeckgo-charts) for the details.
7375

docs/docs/slides/app-slide-code/app-slide-code.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ The [DeckDeckGo] - Hightlight code component is provided in separate extra libra
7979

8080
## Attributes
8181

82-
At least `src` or the `slot` code should be provided in order to render code in this template. It offers the same attributes as the [DeckDeckGo] code Web Component, see its [documentation](https://github.com/deckgo/deckdeckgo-highlight-code) for the details.
82+
At least `src` or the `slot` code should be provided in order to render code in this template. It offers the same attributes as the [DeckDeckGo] code Web Component, see its [documentation](https://github.com/deckgo/deckdeckgo-highlight-code) for the details and the following other attributes:
83+
84+
| Attribute | Type | Default | Description |
85+
| -------------------------- |-----------------|-----------------|-----------------|
86+
| custom-background | boolean | false | If you would provide a background for the all deck and a specific one for this slide, set this option to `true` |
87+
| custom-actions | boolean | false | If you would provide actions for the all deck and a specific one for this slide, set this option to `true` |
8388

8489
### Example with file URI
8590

docs/docs/slides/app-slide-content/app-slide-content.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ This component offers the following options which could be set using attributes:
6060
| -------------------------- |-----------------|-----------------|-----------------|
6161
| reveal | boolean | false | Hide the slotted elements `li`, `p` an `img` and display them when navigating using `slideNext()` or `slidePrev()` (see [documention](/doc/features/navigation.md)) |
6262
| reveal-show-first | boolean | false | Show the first elements which would be hidden if `reveal` is set to `true` |
63+
| custom-background | boolean | false | If you would provide a background for the all deck and a specific one for this slide, set this option to `true` |
64+
| custom-actions | boolean | false | If you would provide actions for the all deck and a specific one for this slide, set this option to `true` |
6365

6466
### Example
6567

docs/docs/slides/app-slide-gif/app-slide-gif.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ This component offers the following options which could be set using attributes:
6464
| src | string | | The source url, the src, of the Gif. Could be an embeddable external url or a local one. |
6565
| alt | string | | And alt information could be provided for accessibility reason. |
6666
| fullscreen | number | true | If set to true, the gif width and height will be related to the slide width and height respectively will be fullscreen. |
67+
| custom-background | boolean | false | If you would provide a background for the all deck and a specific one for this slide, set this option to `true` |
68+
| custom-actions | boolean | false | If you would provide actions for the all deck and a specific one for this slide, set this option to `true` |
6769

6870
## Theming
6971

0 commit comments

Comments
 (0)