Add MenuItem page

Add some information to Contact page
This commit is contained in:
Michał 2024-04-24 17:43:08 +01:00
parent f61fb472e2
commit ec2696fc1f
7 changed files with 221 additions and 22 deletions

View file

@ -12,9 +12,11 @@
<CaretDown /> <CaretDown />
</button> </button>
</div> </div>
{#if open }
<div class="dropdown-content"> <div class="dropdown-content">
<slot></slot> <slot></slot>
</div> </div>
{/if}
</div> </div>
<style lang="scss"> <style lang="scss">

View file

@ -1,2 +1,97 @@
<script>
import { ArrowClockwise } from "phosphor-svelte";
import DropDown from "%/components/DropDown.svelte";
</script>
<h1>Contact us</h1> <h1>Contact us</h1>
<p>Nuh uh</p>
<div class="menu-filter">
<div class="menu-filter-header">
<h2>Commonly Asked Questions</h2>
</div>
<hr>
<div class="menu-filter-section">
<DropDown name="Can I refund my order?">
<p>If you ordered online, if we haven't started making your food yet, a refund is possible.</p>
<p>If you reserved a table, you can refund upto 1 hour before your time.</p>
</DropDown>
</div>
<hr>
<div class="menu-filter-section">
<DropDown name="Deez nuts">
<p>Gotten</p>
</DropDown>
</div>
</div>
<div class="spacer"></div>
<h2>Contact From</h2>
<style lang="scss">
@import "%/styles/vars";
h1, h2 {
margin-bottom: $spacing-small;
}
.spacer {
height: $spacing-large;
}
.menu-filter {
border-radius: $border-radius-normal;
background-image: url('/BackgroundTextureAlt.svg');
background-repeat: no-repeat;
background-size: 200px 250px;
background-position: 5px -43px;
background-color: $color-light;
color: $color-on-light;
h2 {
margin-bottom: 0;
}
hr {
height: 1px;
border: 0 transparent;
background-color: rgba($color-dark, 0.1);
}
button {
height: 32px;
width: 32px;
display: flex;
justify-content: center;
align-items: center;
text-decoration: none;
font-size: $font-size-p;
border-radius: $border-radius-circle;
border: 0 solid transparent;
background-color: $color-dark;
color: $color-on-dark;
&:hover {
background-color: $color-primary;
color: $color-on-primary;
}
}
.menu-filter-header {
padding: $spacing-normal;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.menu-filter-section {
padding: $spacing-normal;
}
}
</style>

View file

@ -5,20 +5,19 @@
import AnnouncementBanner from "%/pages/elements/AnnouncementBanner.svelte"; import AnnouncementBanner from "%/pages/elements/AnnouncementBanner.svelte";
import MenuList from "%/pages/elements/MenuList.svelte"; import MenuList from "%/pages/elements/MenuList.svelte";
import Items from '%/testData.js'; import Items from '%/testData.js';
import L from 'leaflet'; import { map, tileLayer} from 'leaflet';
let items = Items; let items = Items;
let map;
onMount(() => { onMount(() => {
map = L.map('map').setView([51.505, -0.09], 13); let Map = map('map').setView([51.505, -0.09], 13);
L.tileLayer( tileLayer(
'https://tile.openstreetmap.org/{z}/{x}/{y}.png', 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
{ {
maxZoom: 19, maxZoom: 19,
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
} }
).addTo(map); ).addTo(Map);
}) })
</script> </script>

View file

@ -0,0 +1,106 @@
<script>
import MenuList from "%/pages/elements/MenuList.svelte";
import LoadingImage from "/MenuItemLoading.svg";
import Items from '%/testData.js';
let items = Items;
export let params = {};
</script>
<div class="main">
<div class="images">
<div>
<img src={LoadingImage} alt="">
</div>
<ul>
<li><img src={LoadingImage} alt=""></li>
<li><img src={LoadingImage} alt=""></li>
<li><img src={LoadingImage} alt=""></li>
<li><img src={LoadingImage} alt=""></li>
<li><img src={LoadingImage} alt=""></li>
</ul>
</div>
<div class="info">
<h2>{params.name}</h2>
</div>
</div>
<div class="spacer"></div>
<div class="other">
<h2>Popular</h2>
<MenuList items={items} />
</div>
<div class="spacer"></div>
<div class="other">
<h2>Popular</h2>
<MenuList items={items} />
</div>
<style lang="scss">
@import "%/styles/vars";
h2 {
margin-bottom: $spacing-small;
}
.spacer {
height: $spacing-large;
}
.main {
display: flex;
flex-direction: row;
.images {
display: flex;
flex-direction: column;
> div {
margin-bottom: $spacing-small;
width: 650px;
height: 500px;
display: flex;
justify-content: center;
align-items: center;
//border-radius: $border-radius-large;
//background-color: $color-light;
overflow: hidden;
> img {
max-width: 650px;
max-height: 500px;
border-radius: $border-radius-normal;
}
}
> ul {
margin: 0;
padding: 0;
display: flex;
flex-direction: row;
> li {
list-style: none;
> img {
margin-right: $spacing-small;
width: 100px;
border-radius: $border-radius-normal;
}
}
}
}
}
.other {
margin: 0 auto;
max-width: $sizing-default-width;
}
</style>

View file

@ -181,8 +181,6 @@
} }
.menu-filter { .menu-filter {
padding: $spacing-normal;
width: 100%; width: 100%;
max-width: calc(300px - $spacing-normal); max-width: calc(300px - $spacing-normal);
@ -202,8 +200,6 @@
} }
hr { hr {
margin-left: -$spacing-normal;
margin-right: -$spacing-normal;
height: 1px; height: 1px;
border: 0 transparent; border: 0 transparent;
background-color: rgba($color-dark, 0.1); background-color: rgba($color-dark, 0.1);
@ -232,7 +228,7 @@
} }
.menu-filter-header { .menu-filter-header {
padding-bottom: $spacing-normal; padding: $spacing-normal;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
@ -240,12 +236,7 @@
} }
.menu-filter-section { .menu-filter-section {
padding-bottom: $spacing-small; padding: $spacing-normal;
padding-top: $spacing-small;
&:last-of-type {
margin-bottom: -$spacing-normal;
}
} }
} }

View file

@ -15,6 +15,12 @@ const routes = {
conditions: [], conditions: [],
userData: { showNavBar: true, fullWidth: true, }, userData: { showNavBar: true, fullWidth: true, },
}), }),
"/item/:name": wrap({
asyncComponent: () => import("%/pages/PageItem.svelte"),
loadingComponent: PageLoading,
conditions: [],
userData: { showNavBar: true, fullWidth: true, },
}),
"/contact": wrap({ "/contact": wrap({
asyncComponent: () => import("%/pages/PageContact.svelte"), asyncComponent: () => import("%/pages/PageContact.svelte"),
loadingComponent: PageLoading, loadingComponent: PageLoading,

View file

@ -3,7 +3,7 @@ $color-background: #e8e1ce; // #ccc2ae;
$color-on-background: #33251a; $color-on-background: #33251a;
$color-dark: #443023; $color-dark: #443023;
$color-on-dark: #e1dcd3; $color-on-dark: #e1dcd3;
$color-light: #fffbf4; $color-light: #fff8eb;
$color-on-light: #33251a; $color-on-light: #33251a;
$color-primary: #6A9343; $color-primary: #6A9343;
$color-on-primary: #fffbf4; $color-on-primary: #fffbf4;
@ -25,7 +25,7 @@ $sizing-full-width: 1200px;
$sizing-navigation-height: 55px; $sizing-navigation-height: 55px;
// PADDING/MARGIN // PADDING/MARGIN
$spacing-small: 14px; $spacing-small: 10px;
$spacing-normal: 16px; $spacing-normal: 16px;
$spacing-large: 32px; $spacing-large: 32px;