Skip to content

Commit e2d8b33

Browse files
committed
docs: update core demo code
1 parent aec1710 commit e2d8b33

20 files changed

+95
-38
lines changed

packages/core/demo/index.html

Lines changed: 95 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@
5252
profiles: {
5353
maximillian: {
5454
author: 'Maximillian Osborn',
55-
avatar: `/demo/static/avaone.png`,
55+
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avaone.png',
5656
roleColor: '#f9d61b'
5757
},
5858
willard: {
5959
author: 'Willard Walton',
60-
avatar: `/demo/static/avatwo.png`,
60+
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avatwo.png',
6161
roleColor: '#ffb12f'
6262
},
6363
skyra: {
6464
author: 'Skyra',
65-
avatar: '/demo/static/skyra.png',
65+
avatar: 'https://github.com/NM-EEA-Y.png',
6666
roleColor: '#1e88e5',
6767
bot: true,
6868
verified: true
@@ -71,32 +71,28 @@
7171
author: 'Favna',
7272
avatar: 'https://github.com/favna.png',
7373
roleColor: '#a155ab',
74-
roleIcon: '/demo/static/booster.png',
74+
roleIcon: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/booster.png',
7575
roleName: 'Booster'
7676
},
7777
discordjs: {
7878
author: 'Discord.js Official #announcements',
79-
avatar: '/demo/static/discordjs.png',
79+
avatar: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/discordjs.png',
8080
roleColor: '#ffffff',
8181
server: true
8282
}
8383
},
8484
emojis: {
8585
diamond: {
8686
name: 'diamond',
87-
url: '/demo/static/diamond.png'
88-
},
89-
aichansmile: {
90-
name: 'aichansmile',
91-
url: '/demo/static/aichansmile.png'
87+
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/diamond.png'
9288
},
9389
dragonite: {
9490
name: 'dragonite',
95-
url: '/demo/static/dragonite.png'
91+
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/dragonite.png'
9692
},
9793
sapphire: {
9894
name: 'sapphire',
99-
url: '/demo/static/sapphire.png'
95+
url: 'https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png'
10096
}
10197
}
10298
};
@@ -108,15 +104,20 @@
108104
<body>
109105
<div>
110106
<div>
111-
<h1 class="logo">@skyra/discord-components-core</h1>
107+
<h1 class="logo">&#64;skyra/discord-components-core</h1>
112108
<span>[<a target="_blank" rel="noopener noreferrer" href="https://github.com/skyra-project/discord-components/">Github</a>]</span>
113109
</div>
114110

115111
<main id="demo">
116112
<h3 class="title">A normal conversation</h3>
117113
<discord-messages>
118114
<discord-message author="Alyx Vargas"> Hey guys, I'm new here! Glad to be able to join you all! </discord-message>
119-
<discord-message author="Fenton Smart" avatar="/demo/static/avafive.png"> Hi, I'm new here too! </discord-message>
115+
<discord-message
116+
author="Fenton Smart"
117+
avatar="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avafive.png"
118+
>
119+
Hi, I'm new here too!
120+
</discord-message>
120121
<discord-message profile="maximillian">
121122
Hey, <discord-mention>Alyx Vargas</discord-mention> and <discord-mention>Dawn</discord-mention>. Welcome to our server!<br />Be
122123
sure to read through the <discord-mention type="channel">rules</discord-mention>. You can ping
@@ -128,7 +129,10 @@ <h3 class="title">A normal conversation</h3>
128129
Thank you
129130
<discord-mention highlight>Maximillian Osborn</discord-mention>!
130131
</discord-message>
131-
<discord-message author="Kayla Feeney" avatar="/demo/static/avafour.png">
132+
<discord-message
133+
author="Kayla Feeney"
134+
avatar="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/avafour.png"
135+
>
132136
I'm doing well, <discord-mention>Willard Walton</discord-mention>. What about yourself?
133137
</discord-message>
134138
<discord-message profile="willard"> s!8ball How am I doing today? </discord-message>
@@ -220,7 +224,7 @@ <h3 class="title">Markdown Styling</h3>
220224
<discord-code>I am inline-code text!</discord-code>
221225
</discord-message>
222226
<discord-message profile="favna">
223-
<discord-code multiline>I am multi-line code</discord-code>
227+
<discord-code multiline>I am multi-<br />line code</discord-code>
224228
</discord-message>
225229
<discord-message profile="favna">
226230
<discord-spoiler>I am spoiler text!</discord-spoiler>
@@ -257,12 +261,22 @@ <h3 class="title">Custom Discord Emojis</h3>
257261
<discord-messages>
258262
<discord-message profile="favna">
259263
Hey these are some custom emojis:
260-
<discord-custom-emoji name="blobparty" url="/demo/static/blobparty.gif"></discord-custom-emoji>
261-
<discord-custom-emoji name="skyra" url="/demo/static/skyra.png"></discord-custom-emoji>
264+
<discord-custom-emoji
265+
name="blobparty"
266+
url="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/blobparty.gif"
267+
></discord-custom-emoji>
268+
<discord-custom-emoji
269+
name="skyra"
270+
url="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/skyra.png"
271+
></discord-custom-emoji>
262272
<discord-embed slot="embeds" color="#0F52BA" embed-title="diamond Emojis in the embed title">
263273
<discord-embed-description slot="description">
264274
Custom emojis in the embed description:
265-
<discord-custom-emoji name="pikawow" url="/demo/static/pikawow.png" embed-emoji></discord-custom-emoji>
275+
<discord-custom-emoji
276+
name="pikawow"
277+
url="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/pikawow.png"
278+
embed-emoji
279+
></discord-custom-emoji>
266280
</discord-embed-description>
267281
<discord-embed-fields slot="fields">
268282
<discord-embed-field field-title="dragonite Custom emojis in the field title">
@@ -281,15 +295,15 @@ <h3 class="title">Server Invites</h3>
281295
<discord-attachments slot="attachments">
282296
<discord-invite
283297
name="discord.js - Imagine a bot"
284-
icon="/demo/static/discordjs.png"
298+
icon="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/discordjs.png"
285299
url="https://discord.gg/djs"
286300
online="16417"
287301
members="87147"
288302
verified="true"
289303
></discord-invite>
290304
<discord-invite
291305
name="The Coding Den"
292-
icon="/demo/static/tcd.png"
306+
icon="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/tcd.png"
293307
url="https://discord.gg/code"
294308
online="18456"
295309
members="73548"
@@ -298,7 +312,7 @@ <h3 class="title">Server Invites</h3>
298312
<discord-invite
299313
name="Skyra Lounge"
300314
url="https://join.skyra.pw"
301-
icon="/demo/static/skyralounge.gif"
315+
icon="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/skyralounge.gif"
302316
online="176"
303317
members="738"
304318
></discord-invite>
@@ -309,23 +323,40 @@ <h3 class="title">Image Attachments with small images</h3>
309323
<discord-messages>
310324
<discord-message profile="Alyx Vargas">
311325
That's a very small logo image!
312-
<discord-image-attachment slot="attachments" url="/demo/static/lit.png" height="100" width="100" alt="lit-logo" />
326+
<discord-image-attachment
327+
slot="attachments"
328+
url="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/lit.png"
329+
height="100"
330+
width="100"
331+
alt="lit-logo"
332+
/>
313333
</discord-message>
314334
</discord-messages>
315335
<h3 class="title">Image Attachments with custom image components (you can see this in the code only)</h3>
316336
<discord-messages>
317337
<discord-message profile="favna">
318338
This has a custom image component!
319339
<discord-image-attachment slot="attachments" custom-image-element>
320-
<img src="/demo/static/lit.png" height="100" width="100" alt="lit-logo" />
340+
<img
341+
src="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/lit.png"
342+
height="100"
343+
width="100"
344+
alt="lit-logo"
345+
/>
321346
</discord-image-attachment>
322347
</discord-message>
323348
</discord-messages>
324349
<h3 class="title">Image Attachments with large images</h3>
325350
<discord-messages>
326351
<discord-message profile="favna">
327352
Hey guys, check out this awesome, cute, and totally amazing dragon!
328-
<discord-image-attachment slot="attachments" url="/demo/static/dragonite.png" height="512" width="512" alt="dragonite" />
353+
<discord-image-attachment
354+
slot="attachments"
355+
url="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/dragonite.png"
356+
height="512"
357+
width="512"
358+
alt="dragonite"
359+
/>
329360
</discord-message>
330361
</discord-messages>
331362
<h3 class="title">File Attachments</h3>
@@ -371,7 +402,10 @@ <h3 class="title">System Messages</h3>
371402
<discord-system-message type="join">
372403
Welcome, <i style="color: #a155ab">Snazzah</i>. We hope you brought pizza.
373404
<discord-reactions slot="reactions">
374-
<discord-reaction name="👀" emoji="/demo/static/eyes.svg"></discord-reaction>
405+
<discord-reaction
406+
name="👀"
407+
emoji="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/eyes.svg"
408+
></discord-reaction>
375409
</discord-reactions>
376410
</discord-system-message>
377411
<discord-system-message type="join">
@@ -416,12 +450,21 @@ <h3 class="title">Reactions</h3>
416450
<discord-message profile="favna">
417451
React to this message!
418452
<discord-reactions slot="reactions">
419-
<discord-reaction name="👍" emoji="/demo/static/thumbsup.svg" count="1"></discord-reaction>
420-
<discord-reaction name="👀" emoji="/demo/static/eyes.svg" count="2" reacted></discord-reaction>
453+
<discord-reaction
454+
name="👍"
455+
emoji="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/thumbsup.svg"
456+
count="1"
457+
></discord-reaction>
458+
<discord-reaction
459+
name="👀"
460+
emoji="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/eyes.svg"
461+
count="2"
462+
reacted
463+
></discord-reaction>
421464
<discord-reaction
422465
interactive="true"
423466
name="dragonite"
424-
emoji="/demo/static/dragonite.png"
467+
emoji="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/dragonite.png"
425468
count="10"
426469
reacted
427470
></discord-reaction>
@@ -489,14 +532,23 @@ <h3 class="title">Components</h3>
489532
<discord-button type="secondary">Secondary Button</discord-button>
490533
<discord-button type="success">Green Button</discord-button>
491534
<discord-button type="destructive">Red Button</discord-button>
492-
<discord-button url="https://join.skyra.pw" emoji="/demo/static/eyes.svg" emoji-name="👀">Link</discord-button>
535+
<discord-button
536+
url="https://join.skyra.pw"
537+
emoji="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/eyes.svg"
538+
emoji-name="👀"
539+
>Link</discord-button
540+
>
493541
</discord-action-row>
494542
<discord-action-row>
495543
<discord-button type="primary" disabled>Primary Button</discord-button>
496544
<discord-button type="secondary" disabled>Secondary Button</discord-button>
497545
<discord-button type="success" disabled>Green Button</discord-button>
498546
<discord-button type="destructive" disabled>Red Button</discord-button>
499-
<discord-button url="https://join.skyra.pw" disabled emoji="/demo/static/eyes.svg" emoji-name="👀"
547+
<discord-button
548+
url="https://join.skyra.pw"
549+
disabled
550+
emoji="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/eyes.svg"
551+
emoji-name="👀"
500552
>Link</discord-button
501553
>
502554
</discord-action-row>
@@ -512,13 +564,13 @@ <h3 class="title">Full embed example</h3>
512564
<discord-message profile="skyra">
513565
<discord-embed
514566
slot="embeds"
515-
author-image="/demo/static/sapphire.png"
567+
author-image="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png"
516568
author-name="Sapphire Developers"
517569
author-url="https://sapphirejs.dev"
518570
color="#0F52BA"
519571
embed-title="Sapphire"
520-
image="/demo/static/sapphire.png"
521-
thumbnail="/demo/static/sapphire.png"
572+
image="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png"
573+
thumbnail="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png"
522574
url="https://sapphirejs.dev"
523575
>
524576
<discord-embed-description slot="description">
@@ -567,7 +619,11 @@ <h3 class="title">Full embed example</h3>
567619
</ul>
568620
</discord-embed-field>
569621
</discord-embed-fields>
570-
<discord-embed-footer slot="footer" footer-image="/demo/static/sapphire.png" timestamp="28/01/2024">
622+
<discord-embed-footer
623+
slot="footer"
624+
footer-image="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png"
625+
timestamp="28/01/2024"
626+
>
571627
Open source libraries to aid in the creation of Discord bots
572628
</discord-embed-footer>
573629
</discord-embed>
@@ -650,7 +706,10 @@ <h3 class="title">Inline fields</h3>
650706
<h3 class="title">Inline fields with a thumbnail</h3>
651707
<discord-messages>
652708
<discord-message profile="skyra">
653-
<discord-embed slot="embeds" thumbnail="/demo/static/sapphire.png">
709+
<discord-embed
710+
slot="embeds"
711+
thumbnail="https://raw.githubusercontent.com/skyra-project/discord-components-implementations/main/shared/public/sapphire.png"
712+
>
654713
<discord-embed-fields slot="fields">
655714
<discord-embed-field field-title="Inline field title" inline inline-index="1"> Some value here </discord-embed-field>
656715
<discord-embed-field field-title="Inline field title" inline inline-index="2"> Some value here </discord-embed-field>
-17.2 KB
Binary file not shown.

packages/core/demo/static/avafive.png

-59.4 KB
Binary file not shown.

packages/core/demo/static/avafour.png

-42.8 KB
Binary file not shown.

packages/core/demo/static/avaone.png

-44 KB
Binary file not shown.
-41.2 KB
Binary file not shown.

packages/core/demo/static/avatwo.png

-45.6 KB
Binary file not shown.
-15.5 KB
Binary file not shown.

packages/core/demo/static/booster.png

-935 Bytes
Binary file not shown.

packages/core/demo/static/diamond.png

-9.62 KB
Binary file not shown.

0 commit comments

Comments
 (0)