@ -0,0 +1 @@
|
||||
VITE_APP_URL=
|
@ -0,0 +1,13 @@
|
||||
/// <reference types="@sveltejs/kit" />
|
||||
|
||||
// See https://kit.svelte.dev/docs#typescript
|
||||
// for information about these interfaces
|
||||
declare namespace App {
|
||||
interface Locals {}
|
||||
|
||||
interface Platform {}
|
||||
|
||||
interface Session {}
|
||||
|
||||
interface Stuff {}
|
||||
}
|
@ -1,13 +1,21 @@
|
||||
<script>
|
||||
export let name;
|
||||
export let price;
|
||||
export let picture;
|
||||
export let picture = null;
|
||||
export let note = null;
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col justify-between items-center gap-2">
|
||||
<div class="flex flex-col items-center gap-2">
|
||||
<span class="w-full flex justify-between">
|
||||
<h3 class="text-xl font-bold">{name}</h3>
|
||||
<span class="bg-green-500 py-1 text-sm px-5 rounded-lg">{price}</span>
|
||||
<h3 class="text-xl font-bold break-words">{name}</h3>
|
||||
<span><span class="bg-green-500 py-1 text-sm px-5 rounded-lg">{price}</span></span>
|
||||
</span>
|
||||
<img src={picture} alt={name} class="w-full rounded-xl shadow" />
|
||||
{#if note}
|
||||
<p class="text-sm text-gray-200 w-full">{@html note}</p>
|
||||
{/if}
|
||||
{#if picture}
|
||||
<img src={picture} alt={name} class="w-full rounded-xl shadow" />
|
||||
{:else}
|
||||
<p class="p-2 italic text-gray-200 bg-gray-700 rounded-xl shadow w-full flex justify-center items-center text-center aspect-square">Example TBA</p>
|
||||
{/if}
|
||||
</div>
|
@ -0,0 +1,96 @@
|
||||
<script>
|
||||
import { variables } from "$lib/helpers/variables";
|
||||
|
||||
let email = "";
|
||||
let message = "";
|
||||
let notify;
|
||||
|
||||
function send() {
|
||||
email = "";
|
||||
message = "";
|
||||
notify = "Email sent!";
|
||||
}
|
||||
</script>
|
||||
|
||||
<main class="flex flex-col gap-5 w-2/3 mx-auto">
|
||||
<form
|
||||
class="flex flex-col gap-5"
|
||||
action="https://api.staticforms.xyz/submit"
|
||||
method="post"
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
name="accessKey"
|
||||
value="534c3443-4fa9-41bc-976b-684b3049bef3"
|
||||
/>
|
||||
<input type="text" name="honeypot" style="display: none;" />
|
||||
<input type="hidden" name="redirectTo" value={variables.appUrl} />
|
||||
|
||||
<div class="flex flex-col">
|
||||
<label for="email" value="E-Mail" class="text-lg font-bold"
|
||||
>E-Mail</label
|
||||
>
|
||||
<input
|
||||
id="email"
|
||||
name="email"
|
||||
type="text"
|
||||
class="text-lg py-1 px-2 rounded-lg shadow bg-gray-600"
|
||||
bind:value={email}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<label for="message" value="E-Mail" class="text-lg font-bold"
|
||||
>Message</label
|
||||
>
|
||||
<textarea
|
||||
id="message"
|
||||
name="message"
|
||||
class="text-lg py-1 px-2 rounded-lg shadow bg-gray-600"
|
||||
bind:value={message}
|
||||
rows="5"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col">
|
||||
{#if email != "" && message != ""}
|
||||
<button
|
||||
type="submit"
|
||||
on:click={send}
|
||||
class="bg-gradient-to-tr from-red-500 to-pink-500 py-2 px-3 rounded-lg font-bold shadow button"
|
||||
>Send</button
|
||||
>
|
||||
{:else}
|
||||
<button
|
||||
disabled
|
||||
type="none"
|
||||
on:click={send}
|
||||
title="Fill in the fields before submitting"
|
||||
class="bg-black bg-opacity-50 py-2 px-3 rounded-lg font-bold shadow text-gray-400"
|
||||
>
|
||||
Send
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if notify}
|
||||
<p class="text-green-500 font-bold text-lg">{notify}</p>
|
||||
{/if}
|
||||
</form>
|
||||
</main>
|
||||
|
||||
<style>
|
||||
.button {
|
||||
transition-duration: 0.3s;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
transition-duration: 0.3s;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.button:active {
|
||||
transition-duration: 0.3s;
|
||||
transform: translateY(5px);
|
||||
}
|
||||
</style>
|
@ -0,0 +1,3 @@
|
||||
export const variables = {
|
||||
appUrl: import.meta.env.VITE_APP_URL
|
||||
};
|
After Width: | Height: | Size: 598 KiB |
After Width: | Height: | Size: 142 KiB |
After Width: | Height: | Size: 164 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 9.3 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 9.1 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 133 KiB |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 191 KiB |
After Width: | Height: | Size: 40 KiB |