|
| 1 | +<!-- |
| 2 | + Examples for guilds, users, events and presentations |
| 3 | + Guilds: |
| 4 | + https://beta.guild.host/embeds/guild/svelte-society-london/card |
| 5 | + https://beta.guild.host/embeds/guild/svelte-society-london/events/latest |
| 6 | + https://beta.guild.host/embeds/guild/svelte-society-london/events/upcoming |
| 7 | + https://beta.guild.host/embeds/guild/svelte-society-london/events/past |
| 8 | + https://beta.guild.host/embeds/guild/svelte-society-london/presentations/latest |
| 9 | + https://beta.guild.host/embeds/guild/svelte-society-london/presentations/upcoming |
| 10 | + https://beta.guild.host/embeds/guild/svelte-society-london/presentations/other |
| 11 | + Users: |
| 12 | + https://beta.guild.host/embeds/user/spences10/card |
| 13 | + https://beta.guild.host/embeds/user/spences10/events/latest |
| 14 | + https://beta.guild.host/embeds/user/spences10/events/upcoming |
| 15 | + https://beta.guild.host/embeds/user/spences10/events/past |
| 16 | + https://beta.guild.host/embeds/user/spences10/presentations/latest |
| 17 | + https://beta.guild.host/embeds/user/spences10/presentations/upcoming |
| 18 | + https://beta.guild.host/embeds/user/spences10/presentations/other |
| 19 | + Events: |
| 20 | + https://beta.guild.host/embeds/event/svelte-london-february-h0ghig/card |
| 21 | + https://beta.guild.host/embeds/event/svelte-london-february-h0ghig/item |
| 22 | + Presentations: |
| 23 | + https://beta.guild.host/embeds/presentation/microfrontends-with-e6mtnf/card |
| 24 | + https://beta.guild.host/embeds/presentation/microfrontends-with-e6mtnf/item |
| 25 | +--> |
| 26 | +<script lang="ts"> |
| 27 | + import GeneralObserver from './general-observer.svelte' |
| 28 | +
|
| 29 | + export let height: string = '350' |
| 30 | + export let width: string = '100' |
| 31 | + export let card_id: string |
| 32 | + export let type: 'guild' | 'user' | 'event' | 'presentation' = |
| 33 | + 'guild' |
| 34 | + export let display_type: |
| 35 | + | 'card' |
| 36 | + | 'item' |
| 37 | + | 'events/latest' |
| 38 | + | 'events/upcoming' |
| 39 | + | 'events/past' |
| 40 | + | 'presentations/latest' |
| 41 | + | 'presentations/upcoming' |
| 42 | + | 'presentations/other' = 'card' |
| 43 | +</script> |
| 44 | + |
| 45 | +<GeneralObserver> |
| 46 | + <div |
| 47 | + class="guild-card" |
| 48 | + style={` |
| 49 | + position: relative; |
| 50 | + height: ${height}px; |
| 51 | + width: ${width}%; |
| 52 | + `} |
| 53 | + > |
| 54 | + <iframe |
| 55 | + data-testid="guild-card" |
| 56 | + title={`guild-card-${card_id}`} |
| 57 | + src={`https://beta.guild.host/embeds/${type}/${card_id}/${display_type}`} |
| 58 | + {height} |
| 59 | + {width} |
| 60 | + frameborder="0" |
| 61 | + scrolling="no" |
| 62 | + style={` |
| 63 | + position: absolute; |
| 64 | + top: 0; |
| 65 | + left: 0; |
| 66 | + width: 100%; |
| 67 | + height: 100%; |
| 68 | + border-radius: 0.5rem; |
| 69 | + `} |
| 70 | + /> |
| 71 | + </div> |
| 72 | +</GeneralObserver> |
0 commit comments