Skip to content

Commit 99d9ee6

Browse files
authored
Update Dashboard (#443)
1 parent f66589a commit 99d9ee6

6 files changed

Lines changed: 111 additions & 17 deletions

File tree

apps/codingcatdev/src/content/podcast/2-36-Building-in-CodeSandbox-with-Adewale-"Ace"-Abati.md renamed to apps/codingcatdev/src/content/podcast/2-36-Building-in-CodeSandbox-with-Adewale-Ace-Abati.md

File renamed without changes.

‎apps/codingcatdev/src/routes/(protected)/ProButton.svelte‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,34 @@
2929
</script>
3030

3131
<button
32-
class="bcu-card variant-filled-primary w-full max-w-sm p-8 relative hover:shadow-2xl hover:scale-105 hover:cursor-pointer ease-in-out duration-300"
32+
class="bcu-card variant-filled-primary w-full md:max-w-sm p-8 relative hover:shadow-2xl hover:scale-105 hover:cursor-pointer ease-in-out duration-300 flex flex-col justify-center items-center"
3333
aria-label="open-pro-modal"
3434
on:click={showPro}
3535
>
36-
<div class="absolute top-0 right-0 mt-2 mr-2 md:mt-8 md:mr-8">
37-
<div class="bcu-button variant-filled-surface capitalize">Go Pro</div>
36+
<div
37+
class="absolute bottom-4 -right-8 -rotate-45 px-8"
38+
style="background-color: rgb(var(--color-surface-500));"
39+
>
40+
<div>Go Pro</div>
3841
</div>
39-
<h2>Pro</h2>
40-
<ul class="text-left text-md md:text-lg">
42+
<h2 class="py-4 font-bold leading-loose">Go Pro!</h2>
43+
<ul
44+
class="text-left w-7/8 justify-self-center font-semibold text-md md:text-lg flex flex-col gap-1 pb-4"
45+
>
4146
<li class="my-2 flex flex-row gap-1 items-center">
42-
<Icon src={RocketLaunch} theme="solid" class="w-8" />
47+
<Icon src={RocketLaunch} theme="solid" class="w-6" />
4348
Watch all PRO courses
4449
</li>
4550
<li class="my-2 flex flex-row gap-1 items-center">
46-
<Icon src={RocketLaunch} theme="solid" class="w-8" />
51+
<Icon src={RocketLaunch} theme="solid" class="w-6" />
4752
Join PRO office hours
4853
</li>
4954
<li class="my-2 flex flex-row gap-1 items-center">
50-
<Icon src={RocketLaunch} theme="solid" class="w-8" />
55+
<Icon src={RocketLaunch} theme="solid" class="w-6" />
5156
Read all PRO tutorials
5257
</li>
5358
<li class="my-2 flex flex-row gap-1 items-center">
54-
<Icon src={RocketLaunch} theme="solid" class="w-8" />
59+
<Icon src={RocketLaunch} theme="solid" class="w-6" />
5560
Get PRO source code from GitHub
5661
</li>
5762
</ul>
Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
<script lang="ts">
22
import ProButton from '../ProButton.svelte';
33
import type { PageData } from './$types';
4+
import DashboardWelcome from './DashboardWelcome.svelte';
5+
import DashboardCTA from './DashboardCTA.svelte';
6+
47
export let data: PageData;
58
</script>
69

7-
<div class="flex flex-col gap-4 p-2">
8-
<div class="p-4 sm:p-10">
10+
<div class="flex justify-center p-4">
11+
<div class="xl:max-w-7xl mt-10 flex-1">
912
<section class="flex flex-col gap-2 md:gap-8">
1013
<div class="flex justify-between">
1114
<h1>Dashboard</h1>
12-
<a class="bcu-button variant-filled" href="/account">Account & Settings</a>
15+
<a class="bcu-button variant-filled" href="/account">Account</a>
1316
</div>
14-
<div class="flex flex-col md:flex-row gap-2">
15-
<div class="flex flex-col w-full gap-2">
16-
<div class="bcu-card variant-filled">Welcome Message</div>
17-
<div class="bcu-card variant-filled">Join Discord for LBT</div>
18-
</div>
17+
<div class="flex flex-col items-center md:items-stretch md:flex-row gap-4">
18+
<DashboardWelcome {data} />
1919
{#if !data?.user?.stripeRole}
2020
<ProButton products={data.products} uid={data.user?.uid} />
2121
{/if}
2222
</div>
23+
<DashboardCTA />
24+
<div>
25+
<h3>✨ New and Featured</h3>
26+
<div class="p-4">
27+
<p>Coming soon.</p>
28+
</div>
29+
</div>
30+
<div>
31+
<h3>📅 Coming Soon</h3>
32+
<div class="p-4">
33+
<p>Coming soon.</p>
34+
</div>
35+
</div>
2336
</section>
2437
</div>
2538
</div>
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<script lang="ts">
2+
import { Icon } from '@steeze-ui/svelte-icon';
3+
4+
import { Discord, Github, Twitter, Youtube } from '@steeze-ui/simple-icons';
5+
6+
const anchorClasses = 'bcu-card bcu-card-hover p-8 min-h-96';
7+
const sectionClasses = 'flex flex-col relative gap-4 justify-start items-start h-52 py-14';
8+
const logoClasses = 'absolute top-0';
9+
const titleClasses = 'tracking-wide';
10+
const descriptionClasses = 'text-md font-normal';
11+
</script>
12+
13+
<!-- TODO hover effects -->
14+
<div class="w-full py-4 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4">
15+
<a class={anchorClasses} target="_blank" href="https://discord.com/invite/vM2bagU">
16+
<div class={sectionClasses}>
17+
<div class={logoClasses}>
18+
<Icon src={Discord} class="w-8" theme="solid" />
19+
</div>
20+
<h5 class={titleClasses}>Join the Discord!</h5>
21+
<p class={descriptionClasses}>
22+
We are part of the Teach, Learn, Grow community. A place to learn then give back. Join us!
23+
</p>
24+
</div>
25+
</a>
26+
<a class={anchorClasses} target="_blank" href="https://twitter.com/CodingCatDev">
27+
<div class={sectionClasses}>
28+
<div class={logoClasses}>
29+
<Icon src={Twitter} class="w-8" theme="solid" />
30+
</div>
31+
<h5 class={titleClasses}>Follow Us on Twitter!</h5>
32+
<p class={descriptionClasses}>See the latest and start a conversation.</p>
33+
</div>
34+
</a>
35+
<!-- I got the fill value from Discord.svelte, we should talk about color so I can put a style guide together-->
36+
<!--make a few more ctas and make them a responsive grid-->
37+
<a class={anchorClasses} target="_blank" href="https://www.youtube.com/c/codingcatdev">
38+
<div class={sectionClasses}>
39+
<div class={logoClasses}>
40+
<Icon src={Youtube} class="w-8" theme="solid" />
41+
</div>
42+
<h5 class={titleClasses}>Subscribe to our Youtube</h5>
43+
<p class={descriptionClasses}>See the latest and start a conversation.</p>
44+
</div>
45+
</a>
46+
<!-- last anchor has different classes for responsiveness-->
47+
<a
48+
class="bcu-card bcu-card-hover p-8 md:col-span-3 md:max-w-full lg:col-span-1 lg:max-w-xs"
49+
target="_blank"
50+
href="https://github.com/sponsors/CodingCatDev"
51+
>
52+
<div class={sectionClasses}>
53+
<div class={logoClasses}>
54+
<Icon src={Github} class="w-8" theme="solid" />
55+
</div>
56+
<h5 class={titleClasses}>Sponsor our GitHub</h5>
57+
<p class={descriptionClasses}>
58+
Star the repo, look at the issues, and sponsor us to help us keep the lights on.
59+
</p>
60+
</div>
61+
</a>
62+
</div>

‎apps/codingcatdev/src/routes/(protected)/dashboard/DashboardSuggested.svelte‎

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script lang="ts">
2+
import type { PageData } from './$types';
3+
export let data: PageData;
4+
</script>
5+
6+
<div
7+
class="bcu-card variant-filled min-h-full flex flex-col w-full justify-center items-start gap-4 p-8"
8+
>
9+
<div class="flex items-center gap-4">
10+
<img src={data.user ? data.user.picture : '/images/avatar.png'} alt="User's avatar" />
11+
<h2 class="text-md">Welcome, {data.user?.email}!</h2>
12+
</div>
13+
<p class="p-2">Now that you're here, get involved!</p>
14+
</div>

0 commit comments

Comments
 (0)