aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/launch
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/launch')
-rw-r--r--src/routes/launch/+page.svelte42
-rw-r--r--src/routes/launch/purchase/+page.svelte79
2 files changed, 121 insertions, 0 deletions
diff --git a/src/routes/launch/+page.svelte b/src/routes/launch/+page.svelte
new file mode 100644
index 00000000..98d9dba6
--- /dev/null
+++ b/src/routes/launch/+page.svelte
@@ -0,0 +1,42 @@
+<script>
+ import { redirect } from "$lib/store";
+
+ export let data;
+ let { user } = data;
+ $: link = user ? '/launch/purchase' : '/register';
+ $redirect = '/launch/purchase';
+</script>
+<div class="mx-auto h-screen flex items-center justify-center px-8">
+ <div class="flex flex-col w-full bg-white rounded shadow-lg sm:w-3/4 md:w-1/2 lg:w-3/5">
+ <img src="/images/ticket.webp" />
+ <div class="flex flex-col w-full md:flex-row">
+ <div
+ class="flex flex-row justify-around p-4 font-bold leading-none text-gray-800 uppercase bg-gray-400 rounded md:flex-col md:items-center md:justify-center md:w-1/4"
+ >
+ <div class="md:text-3xl">Oct</div>
+ <div class="md:text-6xl">5</div>
+ <div class="md:text-xl">6 pm</div>
+ </div>
+ <div class="p-4 font-normal text-gray-800 md:w-3/4">
+ <h1 class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800">
+ Coinos Launch Party Ticket
+ </h1>
+ <p class="leading-normal mb-2">
+ Come join us at our launch party celebrating 10 years in business! We'll be introducing
+ our newly designed payments interface and afterwards we'll network and enjoy tasty food
+ and drinks from <a href="https://loftondenman.com/" class="underline">The Loft</a>!
+ </p>
+
+ <div class="flex w-full my-8">
+ <a href={link}>
+ <button
+ class="bg-white text-black border rounded-full px-8 py-4 font-bold hover:opacity-80 mx-auto text-2xl"
+ >
+ Purchase with Bitcoin {user.username}
+ </button>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
diff --git a/src/routes/launch/purchase/+page.svelte b/src/routes/launch/purchase/+page.svelte
new file mode 100644
index 00000000..c6777349
--- /dev/null
+++ b/src/routes/launch/purchase/+page.svelte
@@ -0,0 +1,79 @@
+<script>
+ import { selectedRate } from '$lib/store';
+ import { post } from '$lib/utils';
+ export let data;
+
+ let amount = 35000;
+ let {
+ account: { address, balance },
+ address,
+ username
+ } = data.user;
+
+ let invoice;
+ let get = async (network) => {
+ invoice = await post('/invoice', {
+ amount,
+ address,
+ rate: $selectedRate,
+ network,
+ username
+ });
+ };
+
+ let lightning = () => get('lightning');
+ let bitcoin = () => get('bitcoin');
+
+ // if (balance < amount) throw redirect(307, `/${username}/fund/${amount - balance}`);
+</script>
+
+<div class="mx-auto h-screen flex items-center justify-center px-8">
+ <div class="flex w-full bg-white rounded shadow-lg">
+ <div class="p-4 font-normal text-gray-800 mx-auto mb-8">
+ {#if balance > amount}
+ <h1 class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800 text-center">
+ Buy Your Launch Party Ticket?
+ </h1>
+
+ <div class="text-center text-4xl mb-12">{amount} sats</div>
+
+ <div class="w-full flex">
+ <button
+ class="bg-black text-white border rounded-full px-8 py-4 font-bold hover:opacity-80 mx-auto text-2xl"
+ >
+ Count me in
+ </button>
+ </div>
+ {:else}
+ <h1 class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800 text-center">
+ Ticket Price
+ </h1>
+ <div class="text-center text-4xl mb-12">{amount} sats</div>
+
+ <h1 class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800 text-center">
+ Your Balance
+ </h1>
+
+ <div class="text-center text-4xl mb-12">{balance} sats</div>
+
+ <h1 class="mb-4 text-4xl font-bold leading-none tracking-tight text-gray-800 text-center">
+ Funding Options
+ </h1>
+
+ <button
+ class="bg-black text-white border rounded-full px-8 py-4 font-bold hover:opacity-80 mx-auto text-2xl"
+ on:click={lightning}
+ >
+ Lightning
+ </button>
+
+ <button
+ class="bg-black text-white border rounded-full px-8 py-4 font-bold hover:opacity-80 mx-auto text-2xl"
+ on:click={bitcoin}
+ >
+ Bitcoin
+ </button>
+ {/if}
+ </div>
+ </div>
+</div>