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