Skip to content

Commit 678fbc5

Browse files
testing: added 'minify: true' under build for vite.config.js
1 parent 82ebb12 commit 678fbc5

File tree

9 files changed

+40
-35
lines changed

9 files changed

+40
-35
lines changed

.svelte-kit/ambient.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ declare module '$env/static/private' {
123123
export const npm_node_execpath: string;
124124
export const npm_config_prefix: string;
125125
export const COLORTERM: string;
126+
export const NODE_ENV: string;
126127
}
127128

128129
/**
@@ -256,6 +257,7 @@ declare module '$env/dynamic/private' {
256257
npm_node_execpath: string;
257258
npm_config_prefix: string;
258259
COLORTERM: string;
260+
NODE_ENV: string;
259261
[key: `PUBLIC_${string}`]: undefined;
260262
[key: string]: string | undefined;
261263
}

src/.DS_Store

2 KB
Binary file not shown.

src/lib/Navbar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
>
7575
{#key resetLogoClick}
7676
<button
77-
class="md:translate-y-[0.1rem] md:translate-x-3 hidden md:block text-xl font-Poppins
77+
class=" p-2 md:translate-y-[0.1rem] md:translate-x-3 hidden md:block text-xl font-Poppins
7878
md:text-[min(5.5vw,40px)] active:text-red-600 hover:scale-110 transition-transform selection:bg-transparent"
7979
in:scale={{ duration: 1200, easing: elasticOut }}
8080
on:click={clickLogo}

src/lib/Plans/PlansCard.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script>
22
import { preloadCode } from "$app/navigation";
33
import { isDarkMode, elementColor } from "$lib/store";
4+
45
import { scale } from "svelte/transition";
56
import { elasticOut } from "svelte/easing";
67

src/lib/Plans/PlansComponent.svelte

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@
22
import PlansCard from "$lib/Plans/PlansCard.svelte";
33
import InView from "$lib/InView.svelte";
44
import { elasticOut } from "svelte/easing";
5+
import { scaleYN } from "$lib/utils";
6+
// import { fade, fly, scale, slide } from "svelte/transition";
57
import { plansCardArray } from "$lib/Plans/plansCardArray";
68
import { onMount, createEventDispatcher } from "svelte";
7-
import { cssToHead, jsToHead, scaleYN } from "$lib/utils";
9+
import { cssToHead, jsToHead } from "$lib/utils";
810
let dispatch = createEventDispatcher();
911
1012
export let plansCards = plansCardArray;
11-
// When the importing component has 'zeroTransition = true' this component produces no transition animation for both navbar AND direct navigation
1213
1314
export let noTransition = false; // when user does include noTransition as a prop then this is rewritten to 'true'
1415
1516
let ready = noTransition;
1617
onMount(() => (ready = true));
1718
// the 'ready' variable logic allows the in:scale div to animate (svelte transition) when going directly to this plans route ..otherwise only works when navigating from another route
18-
</script>
19-
20-
<InView
21-
once
22-
margin={"200px"}
23-
onview={() => {
19+
function addCalendlyCSSandJS() {
2420
console.log("📅");
2521
jsToHead(
2622
"calendlyJS",
@@ -30,39 +26,38 @@
3026
"calendlyCSS",
3127
"https://assets.calendly.com/assets/external/widget.css"
3228
);
33-
}}
34-
>
35-
<!-- Can also do 'use:boop' where boop() is a function containing the dispatch logic. -->
29+
}
30+
31+
// This 'boop-function' dispatches a 'boop-event' when called; below, it's called as soon as the element is created with 'use:boop'. An alternative to 'use:boop' logic is 'use={ dispatch("boop", OBJECT) }' ... but I think the former is more html-readable
32+
function boop() {
33+
dispatch("boop", { plansCardArray, message: "n i boop" });
34+
}
35+
</script>
36+
37+
<InView once margin={"200px"} onview={addCalendlyCSSandJS}>
3638
<plans-section
37-
use={dispatch("boop", { plansCardArray, message: "n i boop" })}
39+
use:boop
3840
class="grid grid-cols-1 sm:grid-cols-dynamic sm:px-4 px-[7%] md:m-7"
3941
>
4042
<!-- class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 sm:px-4 px-10 md:m-7" -->
41-
{#each plansCards as item, i}
42-
{#if ready}
43+
{#if ready}
44+
{#each plansCards as { card, payNowUrl, payLaterUrl, cardTitle, cardText }, i}
4345
<div
4446
in:scaleYN={{
45-
noTransition: noTransition,
47+
delay: 100 * i,
4648
duration: 1000,
4749
easing: elasticOut,
48-
delay: 100 * i,
50+
noTransition,
4951
}}
5052
>
51-
<PlansCard
52-
card={item.card}
53-
payNowUrl={item.payNowUrl}
54-
payLaterUrl={item.payLaterUrl}
55-
>
56-
<!-- <span slot="buttonText"> {item.buttonText} </span> -->
57-
<span slot="cardTitle"> {item.cardTitle} </span>
58-
59-
<span slot="cardText">
60-
{item.cardText}
61-
</span>
53+
<PlansCard {card} {payNowUrl} {payLaterUrl}>
54+
<!-- <span slot="buttonText"> {buttonText} </span> -->
55+
<span slot="cardTitle"> {cardTitle} </span>
56+
<span slot="cardText"> {cardText} </span>
6257
</PlansCard>
6358
</div>
64-
{/if}
65-
{/each}
59+
{/each}
60+
{/if}
6661
</plans-section>
6762
</InView>
6863

src/routes/+layout.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script>
2+
import { isDarkMode } from "./../lib/store.js";
23
import "../app.css";
34
import { scale, fly, slide, fade, blur } from "svelte/transition";
45
import { elasticOut, quintOut } from "svelte/easing";
@@ -104,17 +105,19 @@
104105

105106
<!-- bgTint={"text-white bg-gradient-to-br from-[#6c79f4] to-rose-400"} -->
106107
<main>
107-
<Modal showModal={contactLinkClicked} bgTint={"backdrop-blur-xl "}>
108+
<Modal showModal={contactLinkClicked} bgTint={"backdrop-blur-3xl "}>
108109
{#key !contactLinkClicked}
109110
<ul
110111
in:scale={{
111112
duration: 1500,
112113
easing: elasticOut,
113114
}}
114-
class="text-center flex flex-col gap-y-2 font-Poppins sm:text-5xl text-3xl text-transparent bg-clip-text bg-gradient-to-r from-teal-500 via-rose-600 to-pink-600 "
115+
class="text-center flex flex-col gap-y-2 font-Poppins sm:text-5xl text-3xl text-transparent bg-clip-text bg-gradient-to-r {$isDarkMode
116+
? 'from-teal-200 via-rose-300 to-pink-200 '
117+
: 'from-teal-700 via-rose-700 to-pink-700 '}"
115118
>
116119
<li>Email:</li>
117-
120+
<li class="p-5">[email protected]</li>
118121
</ul>
119122
{/key}
120123
</Modal>

src/routes/+page.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
}}
102102
plansCards={classicoAndMock}
103103
/>
104+
104105
<!-- TODO: 'boop' is a custom svelte event sent from within planscomponent.svelte, containing 'plansCardArray'; here I decide to modify a copy of this data and name it 'classicoAndMock' ... upside of this is not having to import 'plansCardArray' from a js file ...downside is while waiting for this boop event the change in content flashes on the home route (when refreshing the page at the plans section)-->
105106
</div>
106107

src/routes/faq/+page.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- Update dec, 12 2022: first time using css has selector; doesnt yet work in firefox -->
22
<script>
33
import { fly, fade, slide } from "svelte/transition";
4+
import { quintOut } from "svelte/easing";
45
import { showHomeworkModal, showLoginModal } from "$lib/store";
56
let faqContainer;
67
let selectedTd;
@@ -38,7 +39,7 @@
3839

3940
<!-- in:slide={{ duration: 800 }} -->
4041
<div
41-
in:fly={{ y: 50, duration: 500 }}
42+
in:fly={{ y: 50, duration: 800, easing: quintOut }}
4243
class="grid place-content-center py-16"
4344
on:dblclick={() => {
4445
faqContainer.querySelectorAll("DETAILS").forEach((el) => (el.open = false));
@@ -51,7 +52,8 @@
5152
</span>
5253
</div>
5354
<!-- TODO: some weird reason I have to add 'class="highlight"' ot at least one summary element before the css/js logic can work -->
54-
<div class="faqContainer">
55+
56+
<div in:fly={{ y: -50, duration: 500 }} class="faqContainer">
5557
<details>
5658
<summary class="highlight"> How are we screen-sharing? Zoom? </summary>
5759

vite.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { sveltekit } from "@sveltejs/kit/vite";
44
const config = {
55
plugins: [sveltekit()],
66
build: {
7+
minify: true,
78
rollupOptions: {
89
external: [
910
"/Users/brightowl/Documents/GitHub/sveltekit/node_modules/dropzone/dist/dropzone.css",

0 commit comments

Comments
 (0)