coyotte508 HF staff commited on
Commit
0146ab9
1 Parent(s): e88bf38

✨ Add some content to the main page

Browse files
.vscode/settings.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "editor.formatOnSave": true
3
+ }
package.json CHANGED
@@ -16,6 +16,7 @@
16
  "@sveltejs/kit": "next",
17
  "@typescript-eslint/eslint-plugin": "^5.27.0",
18
  "@typescript-eslint/parser": "^5.27.0",
 
19
  "eslint": "^8.16.0",
20
  "eslint-config-prettier": "^8.3.0",
21
  "eslint-plugin-svelte3": "^4.0.0",
 
16
  "@sveltejs/kit": "next",
17
  "@typescript-eslint/eslint-plugin": "^5.27.0",
18
  "@typescript-eslint/parser": "^5.27.0",
19
+ "@unocss/reset": "^0.46.3",
20
  "eslint": "^8.16.0",
21
  "eslint-config-prettier": "^8.3.0",
22
  "eslint-plugin-svelte3": "^4.0.0",
pnpm-lock.yaml CHANGED
@@ -5,6 +5,7 @@ specifiers:
5
  '@sveltejs/kit': next
6
  '@typescript-eslint/eslint-plugin': ^5.27.0
7
  '@typescript-eslint/parser': ^5.27.0
 
8
  eslint: ^8.16.0
9
  eslint-config-prettier: ^8.3.0
10
  eslint-plugin-svelte3: ^4.0.0
@@ -23,6 +24,7 @@ devDependencies:
23
24
  '@typescript-eslint/eslint-plugin': 5.42.0_6xw5wg2354iw4zujk2f3vyfrzu
25
  '@typescript-eslint/parser': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m
 
26
  eslint: 8.26.0
27
  eslint-config-prettier: [email protected]
28
  eslint-plugin-svelte3: 4.0.0_l6ppk7eerpslmlsqymzic46t24
 
5
  '@sveltejs/kit': next
6
  '@typescript-eslint/eslint-plugin': ^5.27.0
7
  '@typescript-eslint/parser': ^5.27.0
8
+ '@unocss/reset': ^0.46.3
9
  eslint: ^8.16.0
10
  eslint-config-prettier: ^8.3.0
11
  eslint-plugin-svelte3: ^4.0.0
 
24
25
  '@typescript-eslint/eslint-plugin': 5.42.0_6xw5wg2354iw4zujk2f3vyfrzu
26
  '@typescript-eslint/parser': 5.42.0_wyqvi574yv7oiwfeinomdzmc3m
27
+ '@unocss/reset': 0.46.3
28
  eslint: 8.26.0
29
  eslint-config-prettier: [email protected]
30
  eslint-plugin-svelte3: 4.0.0_l6ppk7eerpslmlsqymzic46t24
src/routes/+layout.svelte CHANGED
@@ -1,64 +1,291 @@
1
  <script lang="ts">
2
- import 'uno.css'
 
 
 
 
 
 
 
 
 
3
  </script>
4
 
5
- <h1 class="text-sunray">title</h1>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
- <slot></slot>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  <style global>
10
- body, html {
11
- margin: 0;
12
- padding: 0;
13
- height: 100%;
14
- font-family: "Gotham", sans-serif;
15
- scroll-behavior: smooth;
16
-
17
- --sunray: #d3a95a;
18
- }
19
 
20
- body {
21
- display: grid;
22
- grid-template-rows: min-content 1fr min-content;
23
- }
24
 
25
- a {
26
- color: unset;
27
- text-decoration: none;
28
- }
29
 
30
- h1, h2, h3{
31
- font-family: "RiotSquad", serif;
32
- margin: 0
33
- }
34
 
35
- nav {
36
- font-family: "Aileron", sans-serif;
37
- margin: 0
38
- }
 
 
39
 
40
- ol, ul {
41
- padding: 0;
42
- margin: 0;
43
- }
44
 
45
- li {
46
- list-style-type: none;
47
- }
48
-
49
- @font-face {
50
- font-family: "Aileron";
51
- src: url(/Ailerons-Typeface.otf) format("opentype");
52
- }
53
 
54
- @font-face {
55
- font-family: "RiotSquad";
56
- src: url("/RIOTSQUA.ttf") format("truetype");
57
- font-weight: normal;
58
- font-style: normal;
59
- }
 
 
 
 
 
 
 
 
 
60
 
61
- /*
62
  @font-face {
63
  font-family: "Raleway";
64
  src: url(/Raleway-VariableFont_wght.ttf) format("truetype");
@@ -71,49 +298,49 @@ li {
71
  }
72
  */
73
 
74
- @font-face {
75
- font-family: "Gotham";
76
- font-weight: 400;
77
- src: url(/GothamBook.ttf) format("truetype");
78
- }
79
 
80
- @font-face {
81
- font-family: "Gotham";
82
- font-weight: 700;
83
- src: url(/GothamBold.ttf) format("truetype");
84
- }
85
 
86
- .drop-white {
87
- filter: drop-shadow(2px 2px 2px white)
88
- }
89
 
90
- .marked ul li {
91
- margin-left: 1.5rem;
92
- list-style-type: disc;
93
- }
94
 
95
- .h-full-without-banner {
96
- height: calc(100vh - 1rem - (14rem / 4))
97
- }
98
 
99
- @media (min-width: 640px) {
100
- .h-full-without-banner {
101
- height: calc(100vh - 1rem - (18rem / 4))
102
- }
103
- }
104
- @media (min-width: 768px) {
105
- .h-full-without-banner {
106
- height: calc(100vh - 1rem - (24rem / 4))
107
- }
108
- }
109
- @media (min-width: 1024px) {
110
- .h-full-without-banner {
111
- height: calc(100vh - 1rem - (32rem / 4))
112
- }
113
- }
114
 
115
- /*
116
  @media (min-width: 1280px) { ... }
117
  @media (min-width: 1536px) { ... }
118
  */
119
- </style>
 
1
  <script lang="ts">
2
+ import { page } from '$app/stores';
3
+ import { slide } from 'svelte/transition';
4
+ import '@unocss/reset/normalize.css';
5
+ import 'uno.css';
6
+
7
+ $: path = $page.route.id ?? '';
8
+
9
+ let user: null = null;
10
+ let menuOpen = false;
11
+ let date = new Date();
12
  </script>
13
 
14
+ <svelte:head>
15
+ <meta property="og:site_name" content="Bergère Enchantée" />
16
+ {#if $page.data.title}
17
+ <title>{$page.data.title}</title>
18
+ <meta property="og:title" content={$page.data.title} />
19
+ <meta property="twitter:title" content={$page.data.title} />
20
+ {/if}
21
+ {#if $page.data.description}
22
+ <meta name="description" content={$page.data.description} />
23
+ <meta property="og:description" content={$page.data.description} />
24
+ <meta property="twitter:description" content={$page.data.description} />
25
+ {/if}
26
+ <meta property="og:type" content={$page.data.type || 'website'} />
27
+ <!-- {#if pictures.length > 0}
28
+ <meta
29
+ property="og:image"
30
+ content="{origin}/photos/raw/{shownPicture.storage.slice(-2)[0]._id}"
31
+ />
32
+ <meta name="twitter:image" content="{origin}/photos/raw/{shownPicture.storage[0]._id}" />
33
+ <meta name="twitter:card" content="summary_large_image" />
34
+ {/if} -->
35
+ <!-- <meta property="og:url" content="{origin}{path}" /> -->
36
+ {#if $page.data.price}
37
+ <meta property="product:price:amount" content={$page.data.price} />
38
+ <meta property="product:price:currency" content="€" />
39
+ {/if}
40
+ </svelte:head>
41
+
42
+ <header class="bg-oxford py-2 flex items-center" style="font-family: Aileron">
43
+ <nav
44
+ class="bg-oxford text-xl font-bold flex grow px-2 sm:px-0 sm:text-center items-center text-white"
45
+ >
46
+ <a href="/" style="line-height: 0;" class="grow"
47
+ ><img
48
+ src="/logo.svg"
49
+ alt="Logo"
50
+ title="Accueil"
51
+ class="h-14 w-14 sm:h-18 sm:w-18 md:h-24 md:w-24 lg:h-32 lg:w-32"
52
+ /></a
53
+ >
54
+ <a
55
+ href="/atelier"
56
+ class:text-sunray={path === '/atelier'}
57
+ class="hidden sm:inline py-4 grow hover:text-sunray">L'atelier</a
58
+ >
59
+ <a
60
+ href="/realisations"
61
+ class:text-sunray={path === '/realisations'}
62
+ class="hidden sm:inline py-4 grow hover:text-sunray">Réalisations</a
63
+ >
64
+ <a
65
+ href="/vente"
66
+ class:text-sunray={path === '/vente'}
67
+ class="hidden sm:inline py-4 grow hover:text-sunray">e-shop</a
68
+ >
69
+ <a
70
+ href="/tissus-et-finitions"
71
+ class:text-sunray={path === '/tissus-et-finitions'}
72
+ class="hidden py-4 sm:inline grow hover:text-sunray">Tissus / Finitions</a
73
+ >
74
+ <a
75
+ href="/contact"
76
+ class:text-sunray={path === '/contact'}
77
+ class="hidden sm:inline py-4 grow hover:text-sunray">Contact</a
78
+ >
79
+ {#if user}
80
+ <a href="/compte" title="Espace client" class="hidden sm:inline grow text-sunray text-3xl">
81
+ <div class="inline-block i-ant-design-user-outlined" />
82
+ </a>
83
+ {:else}
84
+ <a
85
+ href="/connexion"
86
+ title="Connexion"
87
+ class="hidden sm:inline grow text-sunray text-3xl inline-block"
88
+ >
89
+ <div class="inline-block i-ant-design-login-outlined" />
90
+ </a>
91
+ {/if}
92
+ <button
93
+ class="inline-flex flex-col justify-center sm:hidden cursor-pointer text-4xl transition"
94
+ class:text-white={!menuOpen}
95
+ class:text-sunray={menuOpen}
96
+ class:rotate-90={menuOpen}
97
+ on:click={() => (menuOpen = !menuOpen)}
98
+ >
99
+ <div class="inline-block i-ant-design-holder-outlined" />
100
+ </button>
101
+ </nav>
102
+ </header>
103
+
104
+ <main>
105
+ {#if menuOpen}
106
+ <nav
107
+ transition:slide
108
+ class="bg-oxford flex flex-col sm:hidden text-xl border-x-0 border-b-0 border-opacity-25 border-t-1 border-white font-bold items-center text-white"
109
+ >
110
+ <a href="/" class:text-sunray={path === '/'} class="my-2 hover:text-sunray">Accueil</a>
111
+ <a href="/atelier" class:text-sunray={path === '/atelier'} class="my-2 hover:text-sunray"
112
+ >L'atelier</a
113
+ >
114
+ <a
115
+ href="/realisations"
116
+ class:text-sunray={path === '/realisations'}
117
+ class="my-2 hover:text-sunray">Réalisations</a
118
+ >
119
+ <a href="/vente" class:text-sunray={path === '/vente'} class="my-2 hover:text-sunray"
120
+ >e-shop</a
121
+ >
122
+ <a
123
+ href="/tissus-et-finitions"
124
+ class:text-sunray={path === '/tissus'}
125
+ class="my-2 hover:text-sunray">Tissus / Finitions</a
126
+ >
127
+ <a href="/contact" class:text-sunray={path === '/contact'} class="my-2 hover:text-sunray"
128
+ >Contact</a
129
+ >
130
+ {#if user}
131
+ <a
132
+ href="/compte"
133
+ title="Espace client"
134
+ class="my-2 hover:text-sunray flex items-center justify-center"
135
+ >
136
+ <div class="inline-block mr-2 i-ant-design-user-outlined" />
137
+ Espace client
138
+ </a>
139
+ {:else}
140
+ <a
141
+ href="/connexion"
142
+ title="Connexion"
143
+ class="my-2 hover:text-sunray flex items-center justify-center"
144
+ >
145
+ <div class="inline-block mr-2 i-ant-design-login-outlined" />
146
+ Connexion
147
+ </a>
148
+ {/if}
149
+ </nav>
150
+ {/if}
151
 
152
+ <slot />
153
+ </main>
154
+
155
+ {#if !path.startsWith('/admin/')}
156
+ <footer class="bg-oxford w-full h-sm relative overflow-x-hidden flex items-center justify-center">
157
+ <img
158
+ src="/logo-no-chair.svg"
159
+ alt="Logo sans fauteuil"
160
+ class="pointer-events-none absolute select-none opacity-50 md:opacity-100 left-0 top-0 bottom-0"
161
+ style="transform: translate(-50%, 0);"
162
+ />
163
+ <img
164
+ src="/logo-no-chair.svg"
165
+ alt="Logo sans fauteuil"
166
+ class="pointer-events-none absolute select-none opacity-50 md:opacity-100 top-0 bottom-0 right-0"
167
+ style="transform: translate(50%, 0);"
168
+ />
169
+
170
+ <div class="text-white z-1 inline-block">
171
+ <div class="flex justify-center">
172
+ <a
173
+ rel="external"
174
+ href="https://facebook.com/bergereenchantee"
175
+ class="opacity-80 hover:opacity-100 bg-sunray rounded-full box-border inline-block mx-10"
176
+ style="width: 2rem; height: 2rem; padding: 0.35rem; padding-bottom: 0.25rem; padding-right: 0.3rem"
177
+ >
178
+ <div class="i-il-facebook inline-block text-oxford w-full h-full">bergereenchantee</div>
179
+ </a>
180
+ <a
181
+ rel="external"
182
+ href="https://instagram.com/bergereenchantee"
183
+ class="opacity-80 hover:opacity-100 bg-sunray rounded-full inline-block box-border mx-10"
184
+ style="width: 2rem; height: 2rem; padding: 0.35rem; padding-bottom: 0.25rem; padding-right: 0.3rem"
185
+ >
186
+ <div class="i-il-instagram inline-block text-oxford w-full h-full">bergereenchantee</div>
187
+ </a>
188
+ <a
189
+ rel="external"
190
+ href="mailto:[email protected]"
191
+ class="opacity-80 hover:opacity-100 bg-sunray rounded-full inline-block box-border mx-10"
192
+ style="width: 2rem; height: 2rem; padding: 0.35rem; padding-right: 0.3rem"
193
+ >
194
+ <div class="i-ant-design-mail-outlined inline-block text-oxford w-full h-full" />
195
+ </a>
196
+ </div>
197
+ <div class="my-14">
198
+ <a href="/" class:text-sunray={path === '/'} class="hover:text-sunray">Accueil</a> |
199
+ <a href="/atelier" class:text-sunray={path === '/atelier'} class="hover:text-sunray"
200
+ >L'atelier</a
201
+ >
202
+ |
203
+ <a
204
+ href="/realisations"
205
+ class:text-sunray={path === '/realisations'}
206
+ class="hover:text-sunray">Réalisations</a
207
+ >
208
+ |
209
+ <a href="/vente" class:text-sunray={path === '/vente'} class="hover:text-sunray">E-shop</a>
210
+ |
211
+ <a
212
+ href="/tissus-et-finitions"
213
+ class:text-sunray={path === '/tissus-et-finitions'}
214
+ class="hover:text-sunray">Tissus / Finitions</a
215
+ >
216
+ |
217
+ <a href="/contact" class:text-sunray={path === '/contact'} class="hover:text-sunray"
218
+ >Contact</a
219
+ >
220
+ </div>
221
+ <div class="text-center">
222
+ <a rel="external" href="https://www.sentinellesduweb.com" class="hover:underline"
223
+ >Les Sentinelles du Web</a
224
+ >
225
+ / <a rel="external" href="https://coyo.dev" class="hover:underline">Coyotech</a> © {date.getFullYear()}
226
+ - Tous droits réservés
227
+ </div>
228
+ </div>
229
+ </footer>
230
+ {/if}
231
 
232
  <style global>
233
+ body,
234
+ html {
235
+ margin: 0;
236
+ padding: 0;
237
+ height: 100%;
238
+ font-family: 'Gotham', sans-serif;
239
+ scroll-behavior: smooth;
 
 
240
 
241
+ --sunray: #d3a95a;
242
+ }
 
 
243
 
244
+ body {
245
+ display: grid;
246
+ grid-template-rows: min-content 1fr min-content;
247
+ }
248
 
249
+ a {
250
+ color: unset;
251
+ text-decoration: none;
252
+ }
253
 
254
+ h1,
255
+ h2,
256
+ h3 {
257
+ font-family: 'RiotSquad', serif;
258
+ margin: 0;
259
+ }
260
 
261
+ nav {
262
+ font-family: 'Aileron', sans-serif;
263
+ margin: 0;
264
+ }
265
 
266
+ ol,
267
+ ul {
268
+ padding: 0;
269
+ margin: 0;
270
+ }
 
 
 
271
 
272
+ li {
273
+ list-style-type: none;
274
+ }
275
+
276
+ @font-face {
277
+ font-family: 'Aileron';
278
+ src: url(/Ailerons-Typeface.otf) format('opentype');
279
+ }
280
+
281
+ @font-face {
282
+ font-family: 'RiotSquad';
283
+ src: url('/RIOTSQUA.ttf') format('truetype');
284
+ font-weight: normal;
285
+ font-style: normal;
286
+ }
287
 
288
+ /*
289
  @font-face {
290
  font-family: "Raleway";
291
  src: url(/Raleway-VariableFont_wght.ttf) format("truetype");
 
298
  }
299
  */
300
 
301
+ @font-face {
302
+ font-family: 'Gotham';
303
+ font-weight: 400;
304
+ src: url(/GothamBook.ttf) format('truetype');
305
+ }
306
 
307
+ @font-face {
308
+ font-family: 'Gotham';
309
+ font-weight: 700;
310
+ src: url(/GothamBold.ttf) format('truetype');
311
+ }
312
 
313
+ .drop-white {
314
+ filter: drop-shadow(2px 2px 2px white);
315
+ }
316
 
317
+ .marked ul li {
318
+ margin-left: 1.5rem;
319
+ list-style-type: disc;
320
+ }
321
 
322
+ .h-full-without-banner {
323
+ height: calc(100vh - 1rem - (14rem / 4));
324
+ }
325
 
326
+ @media (min-width: 640px) {
327
+ .h-full-without-banner {
328
+ height: calc(100vh - 1rem - (18rem / 4));
329
+ }
330
+ }
331
+ @media (min-width: 768px) {
332
+ .h-full-without-banner {
333
+ height: calc(100vh - 1rem - (24rem / 4));
334
+ }
335
+ }
336
+ @media (min-width: 1024px) {
337
+ .h-full-without-banner {
338
+ height: calc(100vh - 1rem - (32rem / 4));
339
+ }
340
+ }
341
 
342
+ /*
343
  @media (min-width: 1280px) { ... }
344
  @media (min-width: 1536px) { ... }
345
  */
346
+ </style>