add colored background setting functionality

This commit is contained in:
Fulmine 2022-03-19 10:43:31 +01:00
parent 6eed689db2
commit 4a398b4e00
3 changed files with 12 additions and 6 deletions

View File

@ -61,7 +61,7 @@
</script> </script>
<CardBody style="border-left: 4px solid #{member.color}; margin: -1rem -1.25rem"> <CardBody style="border-left: 4px solid #{settings.appearance.color_background ? isPage ? "" : member.color : member.color }; margin: -1rem -1.25rem">
{#if !editMode && !groupMode} {#if !editMode && !groupMode}
<Row> <Row>
{#if member.id} {#if member.id}

View File

@ -66,6 +66,9 @@
{#if settings && settings.appearance.color_background} {#if settings && settings.appearance.color_background}
<div class="background" style="background-color: {member && `#${member.color}`}"></div> <div class="background" style="background-color: {member && `#${member.color}`}"></div>
{/if} {/if}
{#if member && member.banner && ((settings && settings.appearance.banner_top) || !settings)}
<div class="banner" style="background-image: url({member.banner})" />
{/if}
<Container> <Container>
<Row> <Row>
<Col class="mx-auto" xs={12} lg={11} xl={10}> <Col class="mx-auto" xs={12} lg={11} xl={10}>
@ -74,7 +77,7 @@
{:else if loading} {:else if loading}
<Spinner/> <Spinner/>
{:else if member && member.id} {:else if member && member.id}
<Card> <Card class="mb-3">
<CardHeader> <CardHeader>
<CardsHeader bind:item={member}> <CardsHeader bind:item={member}>
<FaAddressCard slot="icon" /> <FaAddressCard slot="icon" />
@ -100,9 +103,12 @@
<style> <style>
.background { .background {
position: absolute; position: fixed;
width: 100vw; top: 0;
height: 100vh; left: 0;
width: 100%;
flex: 1;
min-height: 100%;
z-index: -30; z-index: -30;
} }
</style> </style>

View File

@ -48,7 +48,7 @@ code {
} }
.banner { .banner {
z-index: -200; z-index: -20;
width: 100%; width: 100%;
height: 40vh; height: 40vh;
position: absolute; position: absolute;