Completed contact form and improved styling on cards
This commit is contained in:
parent
7bd03be127
commit
cbdc81c4ce
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ node_modules
|
||||
!.env.example
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
.vscode
|
||||
|
15
.vscode/settings.json
vendored
15
.vscode/settings.json
vendored
@ -1,15 +0,0 @@
|
||||
{
|
||||
"spellright.language": [
|
||||
"en"
|
||||
],
|
||||
"spellright.documentTypes": [
|
||||
"markdown",
|
||||
"latex",
|
||||
"plaintext"
|
||||
],
|
||||
"spellright.parserByClass": {
|
||||
"svelte": {
|
||||
"parser": "plain"
|
||||
}
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
flex: 2 1 20%;
|
||||
min-width: 10em;
|
||||
min-width: 8em;
|
||||
padding: .5em 2.5em 2em 2.5em;
|
||||
background: var(--bg-grad);
|
||||
border-radius: .5em;
|
||||
@ -44,7 +44,8 @@
|
||||
.card .card-footer :global(div){
|
||||
margin-bottom: 1em;
|
||||
display: flex;
|
||||
gap: 1.5em;
|
||||
gap: 1em;
|
||||
max-width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
|
@ -78,7 +78,6 @@
|
||||
/* Skills Cards CSS */
|
||||
.skills-container {
|
||||
max-width: 90%;
|
||||
padding: 0em 2em;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
@ -88,7 +87,6 @@
|
||||
flex-direction: row;
|
||||
gap: 3em 3em;
|
||||
padding: 3em 1em 2em 0em;
|
||||
list-style: none;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
|
@ -1,25 +1,38 @@
|
||||
<script lang="ts">
|
||||
import Card from '../../Card.svelte';
|
||||
import { Toast, ToastType } from "$lib/toast";
|
||||
import { addToast } from "$lib/store";
|
||||
|
||||
import { page } from '$app/stores';
|
||||
const sent = $page.url.searchParams.get('sent');
|
||||
|
||||
if (sent == "true") {
|
||||
addToast(new Toast("Thank you! Your E-Mail has been sent. I will reply as soon as possible!", ToastType.Success, true, 5000));
|
||||
}
|
||||
if (sent == "false") {
|
||||
addToast(new Toast("Sorry, your E-Mail could not be sent... Please try again later!", ToastType.Error, true, 5000));
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
form {
|
||||
display: flex;
|
||||
flex: 2 1 20%;
|
||||
flex-wrap: wrap;
|
||||
flex: 2 1;
|
||||
align-items: center;
|
||||
margin: 1em;
|
||||
gap: 1em 3em;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
padding: 1em;
|
||||
padding: 1em 0em 1em 1em;
|
||||
background-color: var(--bg-grad);
|
||||
border: 0;
|
||||
outline: 0;
|
||||
border-radius: 8px;
|
||||
resize: none;
|
||||
min-width: 100%;
|
||||
transition: all 0.2s;
|
||||
transition: all 0.15s;
|
||||
|
||||
&:focus, &:hover{
|
||||
box-shadow: .2em .2em .2em var(--red);
|
||||
@ -32,10 +45,20 @@
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex: 2 1 5rem;
|
||||
flex-direction: column;
|
||||
gap: 1em 1em;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.button {
|
||||
color: var(--fg);
|
||||
background-color: var(--bg-2);
|
||||
box-shadow: .1em .1em .1em var(--purple);
|
||||
}
|
||||
.button:hover {
|
||||
box-shadow: .3em .3em .3em var(--green);
|
||||
}
|
||||
</style>
|
||||
|
||||
<Card>
|
||||
@ -43,15 +66,20 @@
|
||||
<h2>Contact</h2>
|
||||
</div>
|
||||
<div slot="content">
|
||||
<form>
|
||||
<form action="https://api.staticforms.xyz/submit" method="post">
|
||||
<div class="container">
|
||||
<input type="text" id="input-name" placeholder="Name">
|
||||
<input type="email" id="input-email" placeholder="Email address">
|
||||
<input type="text" id="input-subject" placeholder="Subject">
|
||||
<input type="hidden" name="accessKey" value="fbb5ec04-506b-448a-a445-a2e47579a966">
|
||||
<input type="text" name="name" placeholder="Name" required>
|
||||
<input type="text" name="email" placeholder="Email address" required>
|
||||
<input type="hidden" name="replyTo" value="@">
|
||||
<input type="text" name="subject" placeholder="Subject" required>
|
||||
<input type="text" name="honeypot" style="display: none;">
|
||||
</div>
|
||||
<div class="container">
|
||||
<textarea name="message" id="input-message" placeholder="Message"></textarea>
|
||||
<textarea name="message" id="message" placeholder="Message" required></textarea>
|
||||
</div>
|
||||
<input class="button" type="submit" value="Send" />
|
||||
<input type="hidden" name="redirectTo" value="https://luke-else.co.uk/contact?sent=true">
|
||||
</form>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
|
Loading…
Reference in New Issue
Block a user