docs: Add external icons in demos

This commit is contained in:
Sidharth Vinod
2024-09-02 14:00:03 +05:30
parent 2d8342261b
commit 7056c20cca

View File

@@ -226,27 +226,23 @@
</pre> </pre>
<hr /> <hr />
<!-- <h2>AWS Icon Demo</h2> <h2>External Icons Demo</h2>
<pre class="mermaid"> <pre class="mermaid">
architecture-beta architecture-beta
service s3(aws:s3)[Cloud Store] service s3(logos:aws-s3)[Cloud Store]
service ec2(aws:ec2)[Server] service ec2(logos:aws-ec2)[Server]
service wave(aws:wavelength)[Wave] service api(logos:aws-api-gateway)[Api Gateway]
service droplet(do:droplet)[Droplet] </pre>
service repo(gh:github)[Repository]
</pre> -->
<script type="module"> <script type="module">
import mermaid from './mermaid.esm.mjs'; import mermaid from './mermaid.esm.mjs';
mermaid.initialize({ mermaid.initialize({
theme: 'base', startOnLoad: false,
startOnLoad: true,
logLevel: 0, logLevel: 0,
architecture: {
iconSize: 80,
},
// iconLibraries: ['aws:common', 'aws:full', 'github', 'digital-ocean'],
}); });
const logos = await fetch('https://unpkg.com/@iconify-json/logos/icons.json');
mermaid.registerIconPacks(await logos.json());
mermaid.init();
</script> </script>
</body> </body>
</html> </html>