tangled
alpha
login
or
join now
flo-bit.dev
/
blento
your personal website on atproto - mirror
blento.app
20
fork
atom
overview
issues
pulls
pipelines
fix security
Florian
1 month ago
34b8191b
e81420fd
+34
-3
4 changed files
expand all
collapse all
unified
split
src
lib
cards
EmbedCard
EmbedCard.svelte
LivestreamCard
LivestreamEmbedCard.svelte
index.ts
todo.md
+1
-1
src/lib/cards/EmbedCard/EmbedCard.svelte
···
6
6
7
7
<iframe
8
8
src={item.cardData.href}
9
9
-
sandbox="allow-scripts allow-same-origin"
9
9
+
sandbox="allow-scripts"
10
10
referrerpolicy="no-referrer"
11
11
class="absolute inset-0 h-full w-full"
12
12
title=""
+25
src/lib/cards/LivestreamCard/LivestreamEmbedCard.svelte
···
1
1
+
<script lang="ts">
2
2
+
import type { ContentComponentProps } from '../types';
3
3
+
4
4
+
let {
5
5
+
item,
6
6
+
sandbox
7
7
+
}: ContentComponentProps & {
8
8
+
sandbox: string;
9
9
+
} = $props();
10
10
+
11
11
+
// svelte-ignore state_referenced_locally
12
12
+
let domain = new URL(item.cardData.href).hostname;
13
13
+
</script>
14
14
+
15
15
+
{#if domain === 'stream.place'}
16
16
+
<iframe
17
17
+
src={item.cardData.href}
18
18
+
sandbox="allow-scripts allow-same-origin"
19
19
+
referrerpolicy="no-referrer"
20
20
+
class="absolute inset-0 h-full w-full"
21
21
+
title=""
22
22
+
></iframe>
23
23
+
{:else}
24
24
+
<div class="p-4">Invalid domain</div>
25
25
+
{/if}
+2
-1
src/lib/cards/LivestreamCard/index.ts
···
4
4
import EmbedCard from '../EmbedCard/EmbedCard.svelte';
5
5
import type { CardDefinition } from '../types';
6
6
import LivestreamCard from './LivestreamCard.svelte';
7
7
+
import LivestreamEmbedCard from './LivestreamEmbedCard.svelte';
7
8
import SidebarItemEmbedLivestreamCard from './SidebarItemEmbedLivestreamCard.svelte';
8
9
import SidebarItemLivestreamCard from './SidebarItemLivestreamCard.svelte';
9
10
···
68
69
69
70
export const LivestreamEmbedCardDefitition = {
70
71
type: 'livestreamEmbed',
71
71
-
contentComponent: EmbedCard,
72
72
+
contentComponent: LivestreamEmbedCard,
72
73
sidebarComponent: SidebarItemEmbedLivestreamCard,
73
74
createNew: (card) => {
74
75
card.w = 2;
+6
-1
todo.md
···
14
14
- social accounts card (multiple)
15
15
- cartoons: aka https://www.opendoodles.com/
16
16
- excalidraw
17
17
-
- map
17
17
+
- [x] map
18
18
- [x] youtube video
19
19
- youtube channel
20
20
- guestbook
···
28
28
- smoke signal
29
29
- statusphere.xyz
30
30
- add some caching to user data
31
31
+
32
32
+
- other fun card ideas:
33
33
+
- svader
34
34
+
- zdog
35
35
+
- tixy
31
36
32
37
- image cards: different images for dark and light mode
33
38