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
add umami
Florian
1 month ago
d9710eac
ed5d0781
+11
-6
4 changed files
expand all
collapse all
unified
split
src
app.html
lib
cards
ImageCard
index.ts
website
utils.ts
todo.md
+6
-1
src/app.html
···
4
4
<meta charset="utf-8" />
5
5
<meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
%sveltekit.head%
7
7
-
7
7
+
8
8
+
<script
9
9
+
defer
10
10
+
src="https://umami-wispy-dream-8048.fly.dev/script.js"
11
11
+
data-website-id="c55efa23-9abe-4a7e-b8fd-81b9fa7e8052"
12
12
+
></script>
8
13
</head>
9
14
<body data-sveltekit-preload-data="hover" class="bg-base-100 dark:bg-base-950">
10
15
<div style="display: contents">%sveltekit.body%</div>
+2
-2
src/lib/cards/ImageCard/index.ts
···
1
1
-
import { uploadImage } from '$lib/website/utils';
1
1
+
import { uploadBlob } from '$lib/website/utils';
2
2
import type { CardDefinition } from '../types';
3
3
import CreateImageCardModal from './CreateImageCardModal.svelte';
4
4
import EditingImageCard from './EditingImageCard.svelte';
···
20
20
creationModalComponent: CreateImageCardModal,
21
21
upload: async (item) => {
22
22
if (item.cardData.blob) {
23
23
-
item.cardData.image = await uploadImage(item.cardData.blob);
23
23
+
item.cardData.image = await uploadBlob(item.cardData.blob);
24
24
25
25
delete item.cardData.blob;
26
26
}
+2
-2
src/lib/website/utils.ts
···
85
85
return { did, data: JSON.parse(JSON.stringify(downloadedData)) as DownloadedData, recentRecords };
86
86
}
87
87
88
88
-
export async function uploadImage(image: Blob) {
88
88
+
export async function uploadBlob(blob: Blob) {
89
89
if (!client.profile) throw new Error('No profile');
90
90
91
91
// atcute version
···
95
95
params: {
96
96
repo: client.profile.did
97
97
},
98
98
-
data: image
98
98
+
data: blob
99
99
});
100
100
101
101
return blobResponse?.data.blob as {
+1
-1
todo.md
···
15
15
- cartoons: aka https://www.opendoodles.com/
16
16
- excalidraw
17
17
- map
18
18
-
- youtube video
18
18
+
- [x] youtube video
19
19
- youtube channel
20
20
- guestbook
21
21