feat: add a little gradient to the top of the frontpage

This commit is contained in:
Xylight committed 2024-05-06 17:39:35 -07:00
1 parent af1e4c8b70
commit 9f6af2a2fb
4 files changed
+30 -3

No files matched your search

+3 -2
View File
@@ -72,18 +72,19 @@
<slot <slot
name="sidebar" name="sidebar"
class="hidden md:flex sticky top-0 left-0 w-full max-w-full h-max bg-slate-50 dark:bg-zinc-950 class="hidden md:flex sticky top-0 left-0 w-full max-w-full h-max bg-slate-50 dark:bg-zinc-950
z-40
{sidePadding}" {sidePadding}"
style="grid-area: sidebar; width: 100% !important;" style="grid-area: sidebar; width: 100% !important;"
/> />
<slot <slot
name="main" name="main"
class="w-full bg-slate-25 dark:bg-zinc-925 justify-self-center shadow-sm class="w-full bg-slate-25 dark:bg-zinc-925 justify-self-center shadow-sm z-0
{contentPadding}" {contentPadding}"
style="grid-area: main" style="grid-area: main"
/> />
<slot <slot
name="suffix" name="suffix"
class="max-xl:hidden w-full sticky top-0 left-0 h-max bg-slate-50 dark:bg-zinc-950 {sidePadding}" class="max-xl:hidden w-full sticky top-0 left-0 h-max bg-slate-50 dark:bg-zinc-950 z-40 {sidePadding}"
style="grid-area: suffix;" style="grid-area: suffix;"
/> />
</div> </div>
+5 -1
View File
@@ -1,4 +1,4 @@
<script> <script lang="ts">
import { profile } from '$lib/auth' import { profile } from '$lib/auth'
import { import {
@@ -7,6 +7,7 @@
Menu, Menu,
MenuButton, MenuButton,
MenuDivider, MenuDivider,
Modal,
Select, Select,
toast, toast,
} from 'mono-svelte' } from 'mono-svelte'
@@ -23,6 +24,7 @@
Inbox, Inbox,
InformationCircle, InformationCircle,
Moon, Moon,
ServerStack,
Sun, Sun,
Swatch, Swatch,
UserCircle, UserCircle,
@@ -31,6 +33,8 @@
import { legacyTheme } from '$lib/ui/colors' import { legacyTheme } from '$lib/ui/colors'
import { userSettings } from '$lib/settings' import { userSettings } from '$lib/settings'
import { goto } from '$app/navigation' import { goto } from '$app/navigation'
import SiteCard from '$lib/components/lemmy/SiteCard.svelte'
import { site } from '$lib/lemmy'
</script> </script>
<Menu {...$$restProps}> <Menu {...$$restProps}>
+1
View File
@@ -4,6 +4,7 @@ import { error } from '@sveltejs/kit'
import { instance } from '$lib/instance.js' import { instance } from '$lib/instance.js'
import { instanceToURL } from '$lib/util.js' import { instanceToURL } from '$lib/util.js'
import { profile } from '$lib/auth.js' import { profile } from '$lib/auth.js'
import { toast } from 'mono-svelte'
export const site = writable<GetSiteResponse | undefined>(undefined) export const site = writable<GetSiteResponse | undefined>(undefined)
+21
View File
@@ -37,6 +37,10 @@
</div> </div>
</Modal> </Modal>
<div
class="background-gradient w-full h-64 absolute top-0 left-0 -z-10 object-cover"
></div>
<div class="flex flex-col gap-4 max-w-full w-full min-w-0"> <div class="flex flex-col gap-4 max-w-full w-full min-w-0">
<header> <header>
<Header>Frontpage</Header> <Header>Frontpage</Header>
@@ -69,3 +73,20 @@
</Pageination> </Pageination>
</div> </div>
</div> </div>
<style>
.background-gradient {
background-image: radial-gradient(
circle at left,
rgba(162, 1, 114, 0.1) 0%,
rgba(255, 0, 43, 0) 100%
),
radial-gradient(
circle at 60% 80%,
rgba(162, 33, 1, 0.2) 0%,
rgba(255, 0, 174, 0) 100%
);
background-repeat: no-repeat;
mask-image: linear-gradient(to bottom, rgba(0 0 0 / 100%), transparent);
}
</style>