Skip to content

Commit 333f769

Browse files
committed
index: updated colors
1 parent dadcdaf commit 333f769

File tree

6 files changed

+33
-33
lines changed

6 files changed

+33
-33
lines changed

src/lib/Button.svelte

+11-24
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
export let disabled = false;
33
export let href: string | undefined = undefined;
4-
export let color: 'blue' | 'black' | 'lime' | 'violet' = 'blue';
4+
export let color: 'blue' | 'black' | 'lime' | 'violet' | 'orange' = 'blue';
55
66
const calcBg = (disabled: boolean) => {
77
if (color === 'blue') {
@@ -10,51 +10,38 @@
1010
}
1111
return 'bg-blue-500 hover:bg-blue-600';
1212
}
13+
if (color === 'orange') {
14+
if (disabled) {
15+
return 'bg-orange-300';
16+
}
17+
return 'bg-orange-500 hover:bg-orange-600';
18+
}
1319
if (color === 'lime') {
1420
if (disabled) {
1521
return 'bg-lime-200';
1622
}
17-
return 'bg-lime-500 hover:bg-lime-400';
23+
return 'bg-lime-500 hover:bg-lime-600';
1824
}
1925
if (color === 'violet') {
2026
if (disabled) {
2127
return 'bg-violet-200';
2228
}
23-
return 'bg-violet-500 hover:bg-violet-400';
29+
return 'bg-violet-500 hover:bg-violet-600';
2430
}
2531
if (color === 'black') {
2632
return 'bg-black hover:bg-gray-800';
2733
}
2834
};
2935
3036
const calcText = (disabled: boolean) => {
31-
if (color === 'blue') {
32-
return 'text-white';
33-
}
34-
if (color === 'lime') {
35-
return 'text-white';
36-
}
37-
if (color === 'violet') {
38-
return 'text-white';
39-
}
40-
if (color === 'black') {
41-
return 'text-white';
42-
}
37+
return 'text-white';
4338
};
4439
4540
const calcBorder = (disabled: boolean) => {
46-
if (color === 'blue') {
47-
return 'border-transparent';
48-
}
49-
if (color === 'lime') {
50-
return 'border-transparent';
51-
}
52-
if (color === 'violet') {
53-
return 'border-transparent';
54-
}
5541
if (color === 'black') {
5642
return 'border-white';
5743
}
44+
return 'border-transparent';
5845
};
5946
6047
$: bg = calcBg(disabled);

src/lib/Footer.svelte

+10-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@
1212
{ href: 'https://discord.gg/fQcH9QAVpX', title: 'Discord' },
1313
{ href: 'mailto:[email protected]', title: 'Email us' }
1414
];
15+
16+
const madeWiths = [
17+
{ emoji: '🥕', color: 'text-orange-500' },
18+
{ emoji: '🥑', color: 'text-emerald-500' },
19+
{ emoji: '🍓', color: 'text-rose-600' },
20+
{ emoji: '🍉', color: 'text-rose-500' }
21+
];
22+
23+
const madeWith = madeWiths[Math.floor(Math.random() * madeWiths.length)];
1524
</script>
1625

1726
<div class="p-4 md:mx-auto md:max-w-7xl">
1827
<footer class="py-4">
1928
<div class="flex flex-col items-center justify-around gap-2 md:flex-row md:gap-8">
20-
<div class="text-lg text-emerald-500">Made with 🥑 in Stockholm</div>
29+
<div class="text-lg {madeWith.color}">Made with {madeWith.emoji} in Stockholm</div>
2130
<div class="md:flex-1" />
2231
{#each footer as { href, title }}
2332
<a

src/lib/components/index/FeatureBox.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</script>
66

77
<div
8-
class="flex items-start gap-4 rounded-xl bg-violet-100 p-4 md:items-center lg:mx-0 lg:w-full lg:gap-16"
8+
class="flex items-start gap-4 rounded-xl bg-violet-100 p-4 md:items-center md:gap-8 md:p-8 lg:mx-0 lg:w-full lg:gap-16"
99
>
1010
<img src={img} class="h-20 flex-shrink-0 md:h-40 " />
1111

src/routes/__layout-wide.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
</a>
8080
{/if}
8181

82-
<main class="min-h-screen w-full bg-lime-50">
82+
<main class="min-h-screen w-full bg-orange-50">
8383
<Header {login} />
8484

8585
<slot />

src/routes/__layout.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
<slot />
8989
</div>
9090

91-
<div class="w-full bg-lime-50">
91+
<div class="w-full bg-orange-50">
9292
<Footer />
9393
</div>
9494
</main>

src/routes/[email protected]

+9-5
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@
4949
</ul>
5050

5151
<div class="space-x-2">
52-
<Button color="violet" href="https://github.com/sturdy-dev/codeball-action">
52+
<Button color="orange" href="https://github.com/sturdy-dev/codeball-action">
5353
Get started
5454
</Button>
55-
<Button color="lime" href="/approver">Try the demo</Button>
55+
<Button color="violet" href="/approver">Try the demo</Button>
5656
</div>
5757
</slot>
5858
<slot slot="right">
@@ -61,7 +61,7 @@
6161
</slot>
6262
</Hero>
6363

64-
<div class="flex w-full flex-col items-center overflow-hidden bg-lime-50 pt-16">
64+
<div class="flex w-full flex-col items-center overflow-hidden bg-orange-50 pt-16">
6565
<div class="flex w-full justify-around px-8">
6666
<div class="w-full max-w-7xl space-y-4 text-lg">
6767
<h1 class="text-5xl font-bold text-gray-800">
@@ -143,8 +143,12 @@
143143
</div>
144144
</FeatureBox>
145145

146-
<div class="flex w-full flex-col items-center gap-4 p-8 py-16 font-mono">
147-
<p>Test Codeball for yourself, with the Codeball web demo</p>
146+
<div class="flex w-full flex-col items-center gap-4 py-16 font-mono">
147+
<p class="items-center gap-4 md:inline-flex">
148+
Test Codeball for yourself, with the online demo <span class="hidden text-2xl md:inline-block"
149+
>⤵️</span
150+
>
151+
</p>
148152
<div class="w-full lg:w-1/2">
149153
<AnalyzeForm />
150154
</div>

0 commit comments

Comments
 (0)