From ec2696fc1fc6f60d85e5492fdeae3d91129fd950 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Wed, 24 Apr 2024 17:43:08 +0100 Subject: [PATCH] Add MenuItem page Add some information to Contact page --- front/src/components/DropDown.svelte | 8 +- front/src/pages/PageContact.svelte | 97 +++++++++++++++++++++++- front/src/pages/PageIndex.svelte | 9 +-- front/src/pages/PageItem.svelte | 106 +++++++++++++++++++++++++++ front/src/pages/PageMenu.svelte | 13 +--- front/src/routes.js | 6 ++ front/src/styles/vars.scss | 4 +- 7 files changed, 221 insertions(+), 22 deletions(-) create mode 100644 front/src/pages/PageItem.svelte diff --git a/front/src/components/DropDown.svelte b/front/src/components/DropDown.svelte index 64d329d..4cb677d 100644 --- a/front/src/components/DropDown.svelte +++ b/front/src/components/DropDown.svelte @@ -12,9 +12,11 @@ - + {#if open } + + {/if} \ No newline at end of file diff --git a/front/src/pages/PageIndex.svelte b/front/src/pages/PageIndex.svelte index e464b67..9e7d459 100644 --- a/front/src/pages/PageIndex.svelte +++ b/front/src/pages/PageIndex.svelte @@ -5,20 +5,19 @@ import AnnouncementBanner from "%/pages/elements/AnnouncementBanner.svelte"; import MenuList from "%/pages/elements/MenuList.svelte"; import Items from '%/testData.js'; - import L from 'leaflet'; + import { map, tileLayer} from 'leaflet'; let items = Items; - let map; onMount(() => { - map = L.map('map').setView([51.505, -0.09], 13); - L.tileLayer( + let Map = map('map').setView([51.505, -0.09], 13); + tileLayer( 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19, attribution: '© OpenStreetMap' } - ).addTo(map); + ).addTo(Map); }) diff --git a/front/src/pages/PageItem.svelte b/front/src/pages/PageItem.svelte new file mode 100644 index 0000000..40cc406 --- /dev/null +++ b/front/src/pages/PageItem.svelte @@ -0,0 +1,106 @@ + + +
+
+
+ +
+
    +
  • +
  • +
  • +
  • +
  • +
+
+
+

{params.name}

+
+
+ +
+
+

Popular

+ +
+ +
+
+

Popular

+ +
+ + \ No newline at end of file diff --git a/front/src/pages/PageMenu.svelte b/front/src/pages/PageMenu.svelte index 91663c0..34fa67f 100644 --- a/front/src/pages/PageMenu.svelte +++ b/front/src/pages/PageMenu.svelte @@ -181,8 +181,6 @@ } .menu-filter { - padding: $spacing-normal; - width: 100%; max-width: calc(300px - $spacing-normal); @@ -202,8 +200,6 @@ } hr { - margin-left: -$spacing-normal; - margin-right: -$spacing-normal; height: 1px; border: 0 transparent; background-color: rgba($color-dark, 0.1); @@ -232,7 +228,7 @@ } .menu-filter-header { - padding-bottom: $spacing-normal; + padding: $spacing-normal; display: flex; flex-direction: row; justify-content: space-between; @@ -240,12 +236,7 @@ } .menu-filter-section { - padding-bottom: $spacing-small; - padding-top: $spacing-small; - - &:last-of-type { - margin-bottom: -$spacing-normal; - } + padding: $spacing-normal; } } diff --git a/front/src/routes.js b/front/src/routes.js index f5d756c..71fb028 100644 --- a/front/src/routes.js +++ b/front/src/routes.js @@ -15,6 +15,12 @@ const routes = { conditions: [], userData: { showNavBar: true, fullWidth: true, }, }), + "/item/:name": wrap({ + asyncComponent: () => import("%/pages/PageItem.svelte"), + loadingComponent: PageLoading, + conditions: [], + userData: { showNavBar: true, fullWidth: true, }, + }), "/contact": wrap({ asyncComponent: () => import("%/pages/PageContact.svelte"), loadingComponent: PageLoading, diff --git a/front/src/styles/vars.scss b/front/src/styles/vars.scss index 3a6cf8c..cdbe1a6 100644 --- a/front/src/styles/vars.scss +++ b/front/src/styles/vars.scss @@ -3,7 +3,7 @@ $color-background: #e8e1ce; // #ccc2ae; $color-on-background: #33251a; $color-dark: #443023; $color-on-dark: #e1dcd3; -$color-light: #fffbf4; +$color-light: #fff8eb; $color-on-light: #33251a; $color-primary: #6A9343; $color-on-primary: #fffbf4; @@ -25,7 +25,7 @@ $sizing-full-width: 1200px; $sizing-navigation-height: 55px; // PADDING/MARGIN -$spacing-small: 14px; +$spacing-small: 10px; $spacing-normal: 16px; $spacing-large: 32px;