diff --git a/front/src/lib/types.ts b/front/src/lib/types.ts index b21d496..4a18b17 100644 --- a/front/src/lib/types.ts +++ b/front/src/lib/types.ts @@ -29,13 +29,14 @@ export type Checkout = { email: string; phone?: number; }; + message: string; + delivery: boolean; address: { line1: string; line2?: string; town: string; postcode: string; }; - message: string; }; export type JSONResponse = { diff --git a/front/src/pages/Checkout.svelte b/front/src/pages/Checkout.svelte index 39d556c..3aca1e3 100644 --- a/front/src/pages/Checkout.svelte +++ b/front/src/pages/Checkout.svelte @@ -1,6 +1,8 @@  Cancel @@ -116,52 +128,76 @@
-

Address

+

Delivery or Pick Up

Where would you want your food to be delivered?

+
-
- - - Line 1 required -
+ + +
-
- - - -
-
-
- - - Town name required -
-
-
- - - Postcode required -
+ + {#if CheckoutData.delivery} +
+ + + Line 1 required +
+
+
+ + + +
+
+
+ + + Town name required +
+
+
+ + + Postcode required +
+ {:else} +

You'll receive an email and text reminding you of your order, once it's ready to be picked up!

+
+ {/if} + +

@@ -248,28 +284,75 @@ } } - #checkoutError { - margin-left: auto; - margin-right: auto; + #delivery-option { + padding: 0; - max-width: $sizing-default-width; - height: 400px; + width: max-content; display: flex; - flex-direction: column; - justify-content: center; - align-items: center; + flex-direction: row; - > h1 { - display: flex; - justify-content: center; - align-items: center; + > li { + list-style: none; - font-size: $font-size-very-fucking-big; - text-align: center; + border-radius: 0; + border: 1px solid rgba($color-dark, 0.1); + background-color: $color-light; + color: $color-on-light; + + overflow: hidden; + + button { + padding: 0 $spacing-large; + + width: 100%; + height: 35px; + + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: center; + + font-size: $font-size-p; + text-decoration: none; + + border: 0 solid transparent; + background-color: transparent; + color: inherit; + } + + &.checked { + background-color: $color-dark; + color: $color-on-dark; + } + + &:first-of-type { + border-top-left-radius: $border-radius-normal; + border-bottom-left-radius: $border-radius-normal; + } + &:last-of-type { + border-top-right-radius: $border-radius-normal; + border-bottom-right-radius: $border-radius-normal; + } + &:hover { + background-color: $color-primary; + color: $color-on-primary; + } } - > p { - text-align: center; + } + + #map { + width: 100%; + max-width: 550px; + height: 400px; + + display: none; + + border-radius: $border-radius-normal; + box-shadow: 0 1px 0.5px rgba(#000, 0.3); + + &.show-map { + display: block; } }