Skip to content

Commit 3d271d0

Browse files
committed
nav & Flow Chart
1 parent cac0b8c commit 3d271d0

File tree

7 files changed

+84
-59
lines changed

7 files changed

+84
-59
lines changed

src/lib/cpplogo.svg

Lines changed: 25 additions & 0 deletions
Loading

src/lib/home/Navbar.svelte

Lines changed: 36 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<script>
2-
import { fly, scale, slide } from 'svelte/transition';
2+
import { fly, slide } from 'svelte/transition';
33
import ThemeMode from './ThemeMode.svelte';
4-
import { Pi } from 'lucide-svelte';
4+
import { Flame, GitPullRequest, GoalIcon, Menu, Pi, X } from 'lucide-svelte';
5+
import SvelteLogo from '$lib/sveltelogo.svg';
6+
import CppLogo from '$lib/cpplogo.svg';
7+
console.clear();
58
69
let isFlyoutOpen = false;
710
let isMobileFlyoutOpen = true;
@@ -12,12 +15,14 @@
1215
{
1316
name: 'Svelte',
1417
desc: 'Get a better understanding of Svelte',
18+
mobileIcon: SvelteLogo,
1519
icon: `<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.1566,22.8189c-10.4-14.8851-30.94-19.2971-45.7914-9.8348L22.2825,29.6078A29.9234,29.9234,0,0,0,8.7639,49.6506a31.5136,31.5136,0,0,0,3.1076,20.2318A30.0061,30.0061,0,0,0,7.3953,81.0653a31.8886,31.8886,0,0,0,5.4473,24.1157c10.4022,14.8865,30.9423,19.2966,45.7914,9.8348L84.7167,98.3921A29.9177,29.9177,0,0,0,98.2353,78.3493,31.5263,31.5263,0,0,0,95.13,58.117a30,30,0,0,0,4.4743-11.1824,31.88,31.88,0,0,0-5.4473-24.1157" style="fill:#ff3e00"/><path d="M45.8171,106.5815A20.7182,20.7182,0,0,1,23.58,98.3389a19.1739,19.1739,0,0,1-3.2766-14.5025,18.1886,18.1886,0,0,1,.6233-2.4357l.4912-1.4978,1.3363.9815a33.6443,33.6443,0,0,0,10.203,5.0978l.9694.2941-.0893.9675a5.8474,5.8474,0,0,0,1.052,3.8781,6.2389,6.2389,0,0,0,6.6952,2.485,5.7449,5.7449,0,0,0,1.6021-.7041L69.27,76.281a5.4306,5.4306,0,0,0,2.4506-3.631,5.7948,5.7948,0,0,0-.9875-4.3712,6.2436,6.2436,0,0,0-6.6978-2.4864,5.7427,5.7427,0,0,0-1.6.7036l-9.9532,6.3449a19.0329,19.0329,0,0,1-5.2965,2.3259,20.7181,20.7181,0,0,1-22.2368-8.2427,19.1725,19.1725,0,0,1-3.2766-14.5024,17.9885,17.9885,0,0,1,8.13-12.0513L55.8833,23.7472a19.0038,19.0038,0,0,1,5.3-2.3287A20.7182,20.7182,0,0,1,83.42,29.6611a19.1739,19.1739,0,0,1,3.2766,14.5025,18.4,18.4,0,0,1-.6233,2.4357l-.4912,1.4978-1.3356-.98a33.6175,33.6175,0,0,0-10.2037-5.1l-.9694-.2942.0893-.9675a5.8588,5.8588,0,0,0-1.052-3.878,6.2389,6.2389,0,0,0-6.6952-2.485,5.7449,5.7449,0,0,0-1.6021.7041L37.73,51.719a5.4218,5.4218,0,0,0-2.4487,3.63,5.7862,5.7862,0,0,0,.9856,4.3717,6.2437,6.2437,0,0,0,6.6978,2.4864,5.7652,5.7652,0,0,0,1.602-.7041l9.9519-6.3425a18.978,18.978,0,0,1,5.2959-2.3278,20.7181,20.7181,0,0,1,22.2368,8.2427,19.1725,19.1725,0,0,1,3.2766,14.5024,17.9977,17.9977,0,0,1-8.13,12.0532L51.1167,104.2528a19.0038,19.0038,0,0,1-5.3,2.3287" style="fill:#fff"/></svg>`,
1620
link: '/roadmap/svelte'
1721
},
1822
{
1923
name: 'Competitive Programming',
2024
desc: 'Simple Roadmap for Progress',
25+
mobileIcon: CppLogo,
2126
icon: `<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
2227
width="306px" height="344.35px" viewBox="0 0 306 344.35" enable-background="new 0 0 306 344.35" xml:space="preserve">
2328
<path fill="#00599C" d="M302.107,258.262c2.401-4.159,3.893-8.845,3.893-13.053V99.14c0-4.208-1.49-8.893-3.892-13.052L153,172.175
@@ -46,16 +51,17 @@
4651
navs: [
4752
{
4853
name: 'Practice',
49-
link: '/practice'
50-
},
51-
{
52-
name: 'Marketplace',
53-
link: '/about'
54-
},
55-
{
56-
name: 'Company',
57-
link: '/about'
54+
link: '/practice',
55+
icon: Flame
5856
}
57+
// {
58+
// name: 'Marketplace',
59+
// link: '/'
60+
// },
61+
// {
62+
// name: 'Company',
63+
// link: '/'
64+
// }
5965
]
6066
};
6167
</script>
@@ -88,24 +94,11 @@
8894
<div class="flex lg:hidden">
8995
<button
9096
type="button"
91-
class="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700"
97+
class="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700 dark:text-gray-300"
9298
on:click={() => (isMenuBarOpen = !isMenuBarOpen)}
9399
>
94100
<span class="sr-only">Open main menu</span>
95-
<svg
96-
class="h-6 w-6"
97-
fill="none"
98-
viewBox="0 0 24 24"
99-
stroke-width="1.5"
100-
stroke="currentColor"
101-
aria-hidden="true"
102-
>
103-
<path
104-
stroke-linecap="round"
105-
stroke-linejoin="round"
106-
d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"
107-
/>
108-
</svg>
101+
<Menu />
109102
</button>
110103
</div>
111104
<div class="hidden lg:flex lg:gap-x-12">
@@ -191,20 +184,11 @@
191184
</a>
192185
<button
193186
type="button"
194-
class="-m-2.5 rounded-md p-2.5 text-gray-700"
187+
class="-m-2.5 rounded-md p-2.5 text-gray-700 dark:text-gray-200"
195188
on:click={() => (isMenuBarOpen = false)}
196189
>
197190
<span class="sr-only">Close menu</span>
198-
<svg
199-
class="h-6 w-6"
200-
fill="none"
201-
viewBox="0 0 24 24"
202-
stroke-width="1.5"
203-
stroke="currentColor"
204-
aria-hidden="true"
205-
>
206-
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
207-
</svg>
191+
<X />
208192
</button>
209193
</div>
210194
{#key isMenuBarOpen}
@@ -219,12 +203,11 @@
219203
aria-expanded="false"
220204
on:click={() => (isMobileFlyoutOpen = !isMobileFlyoutOpen)}
221205
>
222-
Product
223-
<!--
224-
Expand/collapse icon, toggle classes based on menu open state.
225-
226-
Open: "rotate-180", Closed: ""
227-
-->
206+
<div class="flex items-center gap-2">
207+
<GitPullRequest size="20" strokeWidth="1.3" />
208+
Roadmap
209+
</div>
210+
228211
<svg
229212
class=" {isMobileFlyoutOpen
230213
? 'rotate-180 transition-all duration-300'
@@ -249,19 +232,25 @@
249232
>
250233
{#each navData.products as item}
251234
<a
235+
on:click={() => (isMenuBarOpen = false)}
252236
href={item.link}
253-
class="block rounded-lg py-2 pl-6 pr-3 text-sm font-semibold leading-7 text-gray-900 hover:bg-gray-50 dark:text-white hover:dark:bg-gray-800"
254-
>{item.name}</a
237+
class="flex justify-start items-center gap-2 rounded-lg py-2 pl-5 bg-gray-800 pr-3 text-sm font-semibold leading-7 text-gray-900 hover:bg-gray-50 dark:text-white hover:dark:bg-gray-800"
238+
>
239+
<img src={item.mobileIcon} class="h-6" alt="" />
240+
{item.name}</a
255241
>
256242
{/each}
257243
</div>
258244
{/key}
259245
</div>
260246
{#each navData.navs as item}
261247
<a
248+
on:click={() => (isMenuBarOpen = false)}
262249
href={item.link}
263-
class="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50 dark:text-white hover:dark:bg-gray-800"
264-
>{item.name}</a
250+
class="-mx-3 flex items-center gap-2 rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50 dark:text-white hover:dark:bg-gray-800"
251+
>
252+
<svelte:component this={item.icon} size="20" strokeWidth="1.3" />
253+
{item.name}</a
265254
>
266255
{/each}
267256
</div>

src/lib/index.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ export let webdata = writable(
12491249
title: 'Math & Geometry',
12501250
problems: [
12511251
{
1252-
id: 100,
1252+
id: 132,
12531253
status: false,
12541254
problem: 'Happy Number',
12551255
link: 'https://leetcode.com/problems/happy-number/',
@@ -1259,7 +1259,7 @@ export let webdata = writable(
12591259
tags: 'hash table,math,two pointers'
12601260
},
12611261
{
1262-
id: 100,
1262+
id: 133,
12631263
status: false,
12641264
problem: 'Plus One',
12651265
link: 'https://leetcode.com/problems/plus-one/',
@@ -1269,7 +1269,7 @@ export let webdata = writable(
12691269
tags: 'array,math'
12701270
},
12711271
{
1272-
id: 100,
1272+
id: 134,
12731273
status: false,
12741274
problem: 'Rotate Image',
12751275
link: 'https://leetcode.com/problems/rotate-image/',
@@ -1279,7 +1279,7 @@ export let webdata = writable(
12791279
tags: 'array,math,matrix'
12801280
},
12811281
{
1282-
id: 100,
1282+
id: 135,
12831283
status: false,
12841284
problem: 'spiral matrix',
12851285
link: 'https://leetcode.com/problems/spiral-matrix/',
@@ -1289,7 +1289,7 @@ export let webdata = writable(
12891289
tags: 'array,matrix,simulation'
12901290
},
12911291
{
1292-
id: 100,
1292+
id: 136,
12931293
status: false,
12941294
problem: 'set matrix zeros',
12951295
link: 'https://leetcode.com/problems/set-matrix-zeroes/',
@@ -1299,7 +1299,7 @@ export let webdata = writable(
12991299
tags: 'array,hash table,matrix'
13001300
},
13011301
{
1302-
id: 100,
1302+
id: 137,
13031303
status: false,
13041304
problem: 'pow (x,n)',
13051305
link: 'https://leetcode.com/problems/powx-n/',
@@ -1309,7 +1309,7 @@ export let webdata = writable(
13091309
tags: 'math,recursion'
13101310
},
13111311
{
1312-
id: 100,
1312+
id: 138,
13131313
status: false,
13141314
problem: 'Multiply strings',
13151315
link: 'https://leetcode.com/problems/multiply-strings/',
@@ -1319,7 +1319,7 @@ export let webdata = writable(
13191319
tags: 'string,math,simulation'
13201320
},
13211321
{
1322-
id: 100,
1322+
id: 139,
13231323
status: false,
13241324
problem: 'detect square',
13251325
link: 'https://leetcode.com/problems/detect-squares/',

src/lib/sveltelogo.svg

Lines changed: 1 addition & 0 deletions
Loading

src/routes/+page.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
import Hero from '$lib/home/Hero.svelte';
33
import AllFeature from '$lib/home/allFeature.svelte';
44
import FeatureCode from '$lib/home/featureCode.svelte';
5+
import { onMount } from 'svelte';
6+
onMount(() => {
7+
console.clear();
8+
});
59
</script>
610

711
<main>

src/routes/practice/+page.svelte

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
<script>
22
import QueTable from '$lib/practice/queTable.svelte';
3-
import TagsSidebar from '$lib/practice/tagsSidebar.svelte';
4-
import * as Card from '$ui/card';
5-
import { Bell, EyeNone, Person } from 'radix-icons-svelte';
3+
import TagsSidebar from '$lib/practice/tagsSidebar.svelte';
4+
import { onMount } from 'svelte';
5+
onMount(() => {
6+
console.clear();
7+
});
68
</script>
79

810
<main class="flex flex-col md:flex-row gap-6 m-3 my-6 md:m-8">
911
<div class="w-full md:w-96">
1012
<TagsSidebar />
1113
</div>
1214
<div class="w-full">
13-
<QueTable/>
15+
<QueTable />
1416
</div>
1517
</main>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<script>
22
import FlowCode from '$lib/diagrams/sv/FlowCods.svelte';
3+
import { onMount } from 'svelte';
4+
onMount(() => {
5+
console.clear();
6+
});
37
</script>
48

59
<FlowCode />

0 commit comments

Comments
 (0)