Skip to content

Commit

Permalink
fixed incentive stuff. hopefully didn't break too many things
Browse files Browse the repository at this point in the history
  • Loading branch information
jiisloth committed Apr 24, 2024
1 parent 6ec2b04 commit a190359
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/DonationPills.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
color: hsl(
${Math.trunc(t * 5 * 360)},
${Math.min(100, 1000 - 1000 * t)}%,
${Math.min(25, 500 - 500 * t)}%
${Math.min(35, 500 - 500 * t)}%
);`
}
};
Expand Down
7 changes: 7 additions & 0 deletions src/lib/components/IncentiveBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,21 @@
<span class="incentive">{title} {getGame(incentive?.game_id)?.game ?? ''} - {incentive?.title}</span>
{#each statusSorted() as status}
{#if status.type === 'milestone'}
<div class="pillholder">
<Pill>{incentive?.total_amount} / {status.milestone_goal}€</Pill>
</div>
{:else}
<div class="pillholder">
<Pill>{status.option}: {status.amount}€</Pill>
</div>
{/if}
{/each}
{/key}

<style>
.pillholder{
margin-top: -5px;
}
.incentive {
font-size: var(--donation-bar-info-font-size);
margin-right: .75em;
Expand Down
16 changes: 10 additions & 6 deletions src/lib/components/Incentives.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@
Ei vielä ehdotuksia!
{/if}
</div>
<div class="icon">
<GameIcon
img_filename="{game(incentive?.game_id)?.img_filename}"
></GameIcon>
<div class="iconwrapper">
<div class="icon">
<GameIcon
img_filename="{game(incentive?.game_id)?.img_filename}"
></GameIcon>
</div>
</div>

</div>
{/key}

Expand All @@ -101,7 +104,6 @@
}
.incentive-wrapper {
height: 320px;
overflow: hidden;
}
.options {
display: flex;
Expand All @@ -112,7 +114,9 @@
font-size: var(--font-size-lg);
}
.icon {
margin: -20px;
scale: var(--setup-time-game-icon-scale, 1);
margin-left: -100px;
margin-top: 10px;
}
.title {
font-size: var(--font-size-md);
Expand Down
6 changes: 4 additions & 2 deletions src/lib/themes/vj2024.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ const vj2024base: LayoutTheme = {
--stopped-timer-color: var(--darkgreen);
--screen-overlay-item-stroke-color: #edf0ea;
--counter-font-size: var(--timer-font-size);
--pill-background-1: #fdc5d6;
--pill-background-1: var(--naturalwhite);
--pill-font-color-1: var(--font-color);
--pill-background-2: #ffce8d;
--pill-background-2: var(--naturalwhite);
--pill-font-color-2: #var(--font-color);
--pill-fancy-background-1: conic-gradient(blue, turquoise, green, yellow, red, purple);
--pill-fancy-background-2: conic-gradient(red, orange, yellow, violet, purple);
Expand Down Expand Up @@ -228,6 +228,8 @@ const vj2024dark: LayoutTheme = {
--background-2: var(--background-color-2) url('/images/2024/nightbg.png') repeat fixed top left;
--stopped-screen-timer-color: var(--yellow);
--stopped-timer-color: var(--yellow);
--pill-background-1: var(--red);
--pill-background-2: var(--greyblue);
`
}

Expand Down

0 comments on commit a190359

Please sign in to comment.