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

Commit c3f3a63

Browse files
doc: improve usage and fix unpkg url
1 parent 092a8e9 commit c3f3a63

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

docs/docs/deck/app-deck-size/app-deck-size.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ However, it is possible to include or use [DeckDeckGo] in any container, for tha
1717
</div>
1818
```
1919

20+
## Tips and tricks
21+
22+
To detect the size of the container, the `offsetParent` property is used which returns the nearest ancestor that has a position other than static. Therefore, if the size would not be detected, try to set the `position` of your container to `relative` or `fixed`.
23+
2024
[DeckDeckGo]: https://deckdeckgo.com

docs/docs/introduction/app-installation/app-installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ If you wish to do so, use it directly in your project from a CDN, using a simple
1717
It's recommended to use [unpkg](https://unpkg.com/) to use the [DeckDeckGo] from a CDN. To do so, add the following include script in the main HTML file of your project:
1818

1919
```
20-
<script type="module" src="https://unpkg.com/@deckdeckgo/core@latest/dist/deckdeckgo-core/deckdeckgo-core.esm.js"></script>
21-
<script nomodule="" src="https://unpkg.com/@deckdeckgo/core@latest/dist/deckdeckgo-core/deckdeckgo-core.js"></script>
20+
<script type="module" src="https://unpkg.com/@deckdeckgo/core@latest/dist/deckdeckgo/deckdeckgo.esm.js"></script>
21+
<script nomodule="" src="https://unpkg.com/@deckdeckgo/core@latest/dist/deckdeckgo/deckdeckgo.js"></script>
2222
```
2323

2424
## Install DeckDeckGo from NPM

docs/src/app/pages/docs/deck/app-deck-size/app-deck-size.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ export class AppDeckSize {
3535
<p>However, it is possible to include or use <a href="https://deckdeckgo.com">DeckDeckGo</a> in any container, for that purpose you would only need to set the attribute <code>embedded</code> to <code>true</code>.</p>
3636
<deckgo-highlight-code language="javascript">
3737
<code slot="code">&lt;div style=&quot;width: 500px; height: 400px;&quot;&gt;{'\n'} &lt;deckgo-deck embedded=&quot;true&quot;&gt;{'\n'} &lt;deckgo-slide-title&gt;{'\n'} &lt;h1 slot=&quot;title&quot;&gt;My presentation title&lt;&#47;h1&gt;{'\n'} &lt;p slot=&quot;content&quot;&gt;{'\n'} Hello World 🚀{'\n'} &lt;&#47;p&gt;{'\n'} &lt;&#47;deckgo-slide-title&gt;{'\n'} &lt;&#47;deckgo-deck&gt;{'\n'}&lt;&#47;div&gt;</code>
38-
</deckgo-highlight-code></main>
38+
</deckgo-highlight-code><h2 id="app-deck-size-tips-and-tricks">Tips and tricks</h2>
39+
<p>To detect the size of the container, the <code>offsetParent</code> property is used which returns the nearest ancestor that has a position other than static. Therefore, if the size would not be detected, try to set the <code>position</code> of your container to <code>relative</code> or <code>fixed</code>. </p>
40+
</main>
3941

4042
<app-footer></app-footer>
4143
</ion-content>

docs/src/app/pages/docs/introduction/app-installation/app-installation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class AppInstallation {
4444
<h2 id="app-installation-using-deckdeckgo-from-a-cdn">Using DeckDeckGo from a CDN</h2>
4545
<p>It&#39;s recommended to use <a href="https://unpkg.com/">unpkg</a> to use the <a href="https://deckdeckgo.com">DeckDeckGo</a> from a CDN. To do so, add the following include script in the main HTML file of your project:</p>
4646
<deckgo-highlight-code language="javascript">
47-
<code slot="code">&lt;script type=&quot;module&quot; src=&quot;https:&#47;&#47;unpkg.com&#47;@deckdeckgo&#47;core@latest&#47;dist&#47;deckdeckgo-core&#47;deckdeckgo-core.esm.js&quot;&gt;&lt;&#47;script&gt;{'\n'}&lt;script nomodule=&quot;&quot; src=&quot;https:&#47;&#47;unpkg.com&#47;@deckdeckgo&#47;core@latest&#47;dist&#47;deckdeckgo-core&#47;deckdeckgo-core.js&quot;&gt;&lt;&#47;script&gt;</code>
47+
<code slot="code">&lt;script type=&quot;module&quot; src=&quot;https:&#47;&#47;unpkg.com&#47;@deckdeckgo&#47;core@latest&#47;dist&#47;deckdeckgo&#47;deckdeckgo.esm.js&quot;&gt;&lt;&#47;script&gt;{'\n'}&lt;script nomodule=&quot;&quot; src=&quot;https:&#47;&#47;unpkg.com&#47;@deckdeckgo&#47;core@latest&#47;dist&#47;deckdeckgo&#47;deckdeckgo.js&quot;&gt;&lt;&#47;script&gt;</code>
4848
</deckgo-highlight-code><h2 id="app-installation-install-deckdeckgo-from-npm">Install DeckDeckGo from NPM</h2>
4949
<p>Install <a href="https://deckdeckgo.com">DeckDeckGo</a> in your project from <a href="https://www.npmjs.com/package/@deckdeckgo/core">npm</a> using the following command:</p>
5050
<deckgo-highlight-code language="bash">

0 commit comments

Comments
 (0)