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
small fixes
Florian
1 week ago
377846ee
45881e8c
+48
-34
3 changed files
expand all
collapse all
unified
split
src
lib
website
EditableProfile.svelte
EditableWebsite.svelte
Profile.svelte
+1
-3
src/lib/website/EditableProfile.svelte
···
151
151
152
152
<div
153
153
class={[
154
154
-
'flex flex-col gap-4 pt-16 pb-8',
154
154
+
'flex flex-col gap-4 pt-16 pb-4',
155
155
profilePosition === 'side' && '@5xl/wrapper:h-screen @5xl/wrapper:pt-24'
156
156
]}
157
157
>
···
232
232
/>
233
233
{/if}
234
234
</div>
235
235
-
236
236
-
<div class={['h-10.5 w-1', profilePosition === 'side' && '@5xl/wrapper:hidden']}></div>
237
235
238
236
{#if !hideBlento}
239
237
<MadeWithBlento class="hidden {profilePosition === 'side' && '@5xl/wrapper:block'}" />
+46
-30
src/lib/website/EditableWebsite.svelte
···
29
29
import BaseEditingCard from '../cards/BaseCard/BaseEditingCard.svelte';
30
30
import Context from './Context.svelte';
31
31
import Head from './Head.svelte';
32
32
-
import { compressImage } from '../helper';
33
32
import Account from './Account.svelte';
33
33
+
import { SelectThemePopover } from '$lib/components/select-theme';
34
34
import EditBar from './EditBar.svelte';
35
35
import SaveModal from './SaveModal.svelte';
36
36
import FloatingEditButton from './FloatingEditButton.svelte';
···
45
45
46
46
// Check if floating login button will be visible (to hide MadeWithBlento)
47
47
const showLoginOnEditPage = $derived(!user.isInitializing && !user.isLoggedIn);
48
48
+
49
49
+
let accentColor = $derived(data.publication?.preferences?.accentColor ?? 'pink');
50
50
+
let baseColor = $derived(data.publication?.preferences?.baseColor ?? 'stone');
51
51
+
52
52
+
function updateTheme(newAccent: string, newBase: string) {
53
53
+
data.publication.preferences ??= {};
54
54
+
data.publication.preferences.accentColor = newAccent;
55
55
+
data.publication.preferences.baseColor = newBase;
56
56
+
data = { ...data };
57
57
+
}
48
58
49
59
let imageDragOver = $state(false);
50
60
···
633
643
]}
634
644
>
635
645
{#if getHideProfileSection(data)}
636
636
-
<Button
637
637
-
size="icon"
638
638
-
variant="ghost"
639
639
-
onclick={() => {
640
640
-
data.publication.preferences ??= {};
641
641
-
data.publication.preferences.hideProfileSection = false;
642
642
-
data = { ...data };
643
643
-
}}
644
644
-
class="pointer-events-auto absolute top-2 left-2 z-20"
645
645
-
>
646
646
-
<svg
647
647
-
xmlns="http://www.w3.org/2000/svg"
648
648
-
fill="none"
649
649
-
viewBox="0 0 24 24"
650
650
-
stroke-width="1.5"
651
651
-
stroke="currentColor"
652
652
-
class="size-6"
646
646
+
<div class="pointer-events-auto absolute top-2 left-2 z-20 flex gap-2">
647
647
+
<Button
648
648
+
size="icon"
649
649
+
variant="ghost"
650
650
+
onclick={() => {
651
651
+
data.publication.preferences ??= {};
652
652
+
data.publication.preferences.hideProfileSection = false;
653
653
+
data = { ...data };
654
654
+
}}
653
655
>
654
654
-
<path
655
655
-
stroke-linecap="round"
656
656
-
stroke-linejoin="round"
657
657
-
d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
658
658
-
/>
659
659
-
<path
660
660
-
stroke-linecap="round"
661
661
-
stroke-linejoin="round"
662
662
-
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
663
663
-
/>
664
664
-
</svg>
665
665
-
</Button>
656
656
+
<svg
657
657
+
xmlns="http://www.w3.org/2000/svg"
658
658
+
fill="none"
659
659
+
viewBox="0 0 24 24"
660
660
+
stroke-width="1.5"
661
661
+
stroke="currentColor"
662
662
+
class="size-6"
663
663
+
>
664
664
+
<path
665
665
+
stroke-linecap="round"
666
666
+
stroke-linejoin="round"
667
667
+
d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"
668
668
+
/>
669
669
+
<path
670
670
+
stroke-linecap="round"
671
671
+
stroke-linejoin="round"
672
672
+
d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
673
673
+
/>
674
674
+
</svg>
675
675
+
</Button>
676
676
+
<SelectThemePopover
677
677
+
{accentColor}
678
678
+
{baseColor}
679
679
+
onchanged={(newAccent, newBase) => updateTheme(newAccent, newBase)}
680
680
+
/>
681
681
+
</div>
666
682
{/if}
667
683
<div class="pointer-events-none"></div>
668
684
<!-- svelte-ignore a11y_no_static_element_interactions -->
+1
-1
src/lib/website/Profile.svelte
···
34
34
>
35
35
<div
36
36
class={[
37
37
-
'flex flex-col gap-4 pt-16 pb-8',
37
37
+
'flex flex-col gap-4 pt-16 pb-4',
38
38
profilePosition === 'side' && '@5xl/wrapper:h-screen @5xl/wrapper:pt-24'
39
39
]}
40
40
>