Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab9dfff33f | ||
|
|
2cb39f0c55 | ||
|
|
c1345eaca7 | ||
|
|
d0c7916386 | ||
|
|
9de9ce7f43 | ||
|
|
9d3180287a | ||
|
|
3f2c51eb1f | ||
|
|
0786fbac8b | ||
|
|
ab588fd27b | ||
|
|
fb801e3752 | ||
|
|
414967441a | ||
|
|
0b5d248c4e | ||
|
|
b6e57ba551 |
No files matched your search
@@ -11,6 +11,8 @@ node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
data/*.sqlite
|
||||
data/*.sqlite-*
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
|
||||
@@ -26,4 +26,14 @@ export default defineConfig([
|
||||
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['server/**/*.js'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
globals: globals.node,
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
},
|
||||
},
|
||||
},
|
||||
])
|
||||
@@ -3,6 +3,12 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Questrial&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>parfum-shop</title>
|
||||
</head>
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
"integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.29.0",
|
||||
"@babel/generator": "^7.29.0",
|
||||
@@ -270,21 +269,21 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/core": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.0.tgz",
|
||||
"integrity": "sha512-0DQ98G9ZQZOxfUcQn1waV2yS8aWdZ6kJMbYCJB3oUBecjWYO1fqJ+a1DRfPF3O5JEkwqwP1A9QEN/9mYm2Yd0w==",
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz",
|
||||
"integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.2.0",
|
||||
"@emnapi/wasi-threads": "1.2.1",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.0.tgz",
|
||||
"integrity": "sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==",
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz",
|
||||
"integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
@@ -293,9 +292,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz",
|
||||
"integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
|
||||
"integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
@@ -563,26 +562,28 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/wasm-runtime": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.1.tgz",
|
||||
"integrity": "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==",
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.3.tgz",
|
||||
"integrity": "sha512-xK9sGVbJWYb08+mTJt3/YV24WxvxpXcXtP6B172paPZ+Ts69Re9dAr7lKwJoeIx8OoeuimEiRZ7umkiUVClmmQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/core": "^1.7.1",
|
||||
"@emnapi/runtime": "^1.7.1",
|
||||
"@tybys/wasm-util": "^0.10.1"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/Brooooooklyn"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emnapi/core": "^1.7.1",
|
||||
"@emnapi/runtime": "^1.7.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@oxc-project/types": {
|
||||
"version": "0.120.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.120.0.tgz",
|
||||
"integrity": "sha512-k1YNu55DuvAip/MGE1FTsIuU3FUCn6v/ujG9V7Nq5Df/kX2CWb13hhwD0lmJGMGqE+bE1MXvv9SZVnMzEXlWcg==",
|
||||
"version": "0.124.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.124.0.tgz",
|
||||
"integrity": "sha512-VBFWMTBvHxS11Z5Lvlr3IWgrwhMTXV+Md+EQF0Xf60+wAdsGFTBx7X7K/hP4pi8N7dcm1RvcHwDxZ16Qx8keUg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
@@ -590,9 +591,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm64": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-jOHxwXhxmFKuXztiu1ORieJeTbx5vrTkcOkkkn2d35726+iwhrY1w/+nYY/AGgF12thg33qC3R1LMBF5tHTZHg==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-YYe6aWruPZDtHNpwu7+qAHEMbQ/yRl6atqb/AhznLTnD3UY99Q1jE7ihLSahNWkF4EqRPVC4SiR4O0UkLK02tA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -607,9 +608,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-arm64": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-gED05Teg/vtTZbIJBc4VNMAxAFDUPkuO/rAIyyxZjTj1a1/s6z5TII/5yMGZ0uLRCifEtwUQn8OlYzuYc0m70w==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-oArR/ig8wNTPYsXL+Mzhs0oxhxfuHRfG7Ikw7jXsw8mYOtk71W0OkF2VEVh699pdmzjPQsTjlD1JIOoHkLP1Fg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -624,9 +625,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-x64": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-rI15NcM1mA48lqrIxVkHfAqcyFLcQwyXWThy+BQ5+mkKKPvSO26ir+ZDp36AgYoYVkqvMcdS8zOE6SeBsR9e8A==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-YzeVqOqjPYvUbJSWJ4EDL8ahbmsIXQpgL3JVipmN+MX0XnXMeWomLN3Fb+nwCmP/jfyqte5I3XRSm7OfQrbyxw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -641,9 +642,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-freebsd-x64": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-XZRXHdTa+4ME1MuDVp021+doQ+z6Ei4CCFmNc5/sKbqb8YmkiJdj8QKlV3rCI0AJtAeSB5n0WGPuJWNL9p/L2w==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-9Erhx956jeQ0nNTyif1+QWAXDRD38ZNjr//bSHrt6wDwB+QkAfl2q6Mn1k6OBPerznjRmbM10lgRb1Pli4xZPw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -658,9 +659,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm-gnueabihf": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-R0SQMRluISSLzFE20sPWYHVmJdDQnRyc/FzSCN72BqQmh2SOZUFG+N3/vBZpR4C6WpEUVYJLrYUXaj43sJsNLA==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-cVwk0w8QbZJGTnP/AHQBs5yNwmpgGYStL88t4UIaqcvYJWBfS0s3oqVLZPwsPU6M0zlW4GqjP0Zq5MnAGwFeGA==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -675,9 +676,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-gnu": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-Y1reMrV/o+cwpduYhJuOE3OMKx32RMYCidf14y+HssARRmhDuWXJ4yVguDg2R/8SyyGNo+auzz64LnPK9Hq6jg==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-eBZ/u8iAK9SoHGanqe/jrPnY0JvBN6iXbVOsbO38mbz+ZJsaobExAm1Iu+rxa4S1l2FjG0qEZn4Rc6X8n+9M+w==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -692,9 +693,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-musl": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-vELN+HNb2IzuzSBUOD4NHmP9yrGwl1DVM29wlQvx1OLSclL0NgVWnVDKl/8tEks79EFek/kebQKnNJkIAA4W2g==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-ZvRYMGrAklV9PEkgt4LQM6MjQX2P58HPAuecwYObY2DhS2t35R0I810bKi0wmaYORt6m/2Sm+Z+nFgb0WhXNcQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -709,9 +710,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-ppc64-gnu": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-ZqrufYTgzxbHwpqOjzSsb0UV/aV2TFIY5rP8HdsiPTv/CuAgCRjM6s9cYFwQ4CNH+hf9Y4erHW1GjZuZ7WoI7w==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-VDpgGBzgfg5hLg+uBpCLoFG5kVvEyafmfxGUV0UHLcL5irxAK7PKNeC2MwClgk6ZAiNhmo9FLhRYgvMmedLtnQ==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -726,9 +727,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-s390x-gnu": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-gSlmVS1FZJSRicA6IyjoRoKAFK7IIHBs7xJuHRSmjImqk3mPPWbR7RhbnfH2G6bcmMEllCt2vQ/7u9e6bBnByg==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-y1uXY3qQWCzcPgRJATPSOUP4tCemh4uBdY7e3EZbVwCJTY3gLJWnQABgeUetvED+bt1FQ01OeZwvhLS2bpNrAQ==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -743,9 +744,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-gnu": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-eOCKUpluKgfObT2pHjztnaWEIbUabWzk3qPZ5PuacuPmr4+JtQG4k2vGTY0H15edaTnicgU428XW/IH6AimcQw==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-023bTPBod7J3Y/4fzAN6QtpkSABR0rigtrwaP+qSEabUh5zf6ELr9Nc7GujaROuPY3uwdSIXWrvhn1KxOvurWA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -760,9 +761,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-musl": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-Xdf2jQbfQowJnLcgYfD/m0Uu0Qj5OdxKallD78/IPPfzaiaI4KRAwZzHcKQ4ig1gtg1SuzC7jovNiM2TzQsBXA==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-witB2O0/hU4CgfOOKUoeFgQ4GktPi1eEbAhaLAIpgD6+ZnhcPkUtPsoKKHRzmOoWPZue46IThdSgdo4XneOLYw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -777,9 +778,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-openharmony-arm64": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-o1hYe8hLi1EY6jgPFyxQgQ1wcycX+qz8eEbVmot2hFkgUzPxy9+kF0u0NIQBeDq+Mko47AkaFFaChcvZa9UX9Q==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-UCL68NJ0Ud5zRipXZE9dF5PmirzJE4E4BCIOOssEnM7wLDsxjc6Qb0sGDxTNRTP53I6MZpygyCpY8Aa8sPfKPg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -794,9 +795,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-wasm32-wasi": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-Ugv9o7qYJudqQO5Y5y2N2SOo6S4WiqiNOpuQyoPInnhVzCY+wi/GHltcLHypG9DEUYMB0iTB/huJrpadiAcNcA==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-ApLruZq/ig+nhaE7OJm4lDjayUnOHVUa77zGeqnqZ9pn0ovdVbbNPerVibLXDmWeUZXjIYIT8V3xkT58Rm9u5Q==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
@@ -804,16 +805,18 @@
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@napi-rs/wasm-runtime": "^1.1.1"
|
||||
"@emnapi/core": "1.9.2",
|
||||
"@emnapi/runtime": "1.9.2",
|
||||
"@napi-rs/wasm-runtime": "^1.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-arm64-msvc": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-7UODQb4fQUNT/vmgDZBl3XOBAIOutP5R3O/rkxg0aLfEGQ4opbCgU5vOw/scPe4xOqBwL9fw7/RP1vAMZ6QlAQ==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-KmoUoU7HnN+Si5YWJigfTws1jz1bKBYDQKdbLspz0UaqjjFkddHsqorgiW1mxcAj88lYUE6NC/zJNwT+SloqtA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -828,9 +831,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-x64-msvc": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-PYxKHMVHOb5NJuDL53vBUl1VwUjymDcYI6rzpIni0C9+9mTiJedvUxSk7/RPp7OOAm3v+EjgMu9bIy3N6b408w==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-3P2A8L+x75qavWLe/Dll3EYBJLQmtkJN8rfh+U/eR3MqMgL/h98PhYI+JFfXuDPgPeCB7iZAKiqii5vqOvnA0g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -850,7 +853,6 @@
|
||||
"integrity": "sha512-q9pE8+47bQNHb5eWVcE6oXppA+JTSwvnrhH53m0ZuHuK5MLvwsLoWrWzBTFQqQ06BVxz1gp0HblLsch8o6pvZw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"picomatch": "^4.0.3"
|
||||
},
|
||||
@@ -914,7 +916,6 @@
|
||||
"integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"csstype": "^3.2.2"
|
||||
}
|
||||
@@ -961,7 +962,6 @@
|
||||
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
@@ -1025,7 +1025,6 @@
|
||||
"integrity": "sha512-Ixm8tFfoKKIPYdCCKYTsqv+Fd4IJ0DQqMyEimo+pxUOMUR9cVPlwTrFt9Avu+3cb6Zp3mAzl+t1MrG2fxxKsxw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.26.0"
|
||||
}
|
||||
@@ -1081,7 +1080,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.9.0",
|
||||
"caniuse-lite": "^1.0.30001759",
|
||||
@@ -1284,7 +1282,6 @@
|
||||
"integrity": "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.1",
|
||||
@@ -2299,7 +2296,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz",
|
||||
"integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -2309,7 +2305,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz",
|
||||
"integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"scheduler": "^0.27.0"
|
||||
},
|
||||
@@ -2350,15 +2345,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rolldown": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-q7j6vvarRFmKpgJUT8HCAUljkgzEp4LAhPlJUvQhA5LA1SUL36s5QCysMutErzL3EbNOZOkoziSx9iZC4FddKA==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-Ff31guA5zT6WjnGp0SXw76X6hzGRk/OQq2hE+1lcDe+lJdHSgnSX6nK3erbONHyCbpSj9a9E+uX/OvytZoWp2g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@oxc-project/types": "=0.120.0",
|
||||
"@rolldown/pluginutils": "1.0.0-rc.10"
|
||||
"@oxc-project/types": "=0.124.0",
|
||||
"@rolldown/pluginutils": "1.0.0-rc.15"
|
||||
},
|
||||
"bin": {
|
||||
"rolldown": "bin/cli.mjs"
|
||||
@@ -2367,27 +2361,27 @@
|
||||
"node": "^20.19.0 || >=22.12.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rolldown/binding-android-arm64": "1.0.0-rc.10",
|
||||
"@rolldown/binding-darwin-arm64": "1.0.0-rc.10",
|
||||
"@rolldown/binding-darwin-x64": "1.0.0-rc.10",
|
||||
"@rolldown/binding-freebsd-x64": "1.0.0-rc.10",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.10",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.10",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.0.0-rc.10",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.10",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.10",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.0.0-rc.10",
|
||||
"@rolldown/binding-linux-x64-musl": "1.0.0-rc.10",
|
||||
"@rolldown/binding-openharmony-arm64": "1.0.0-rc.10",
|
||||
"@rolldown/binding-wasm32-wasi": "1.0.0-rc.10",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.10",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.0.0-rc.10"
|
||||
"@rolldown/binding-android-arm64": "1.0.0-rc.15",
|
||||
"@rolldown/binding-darwin-arm64": "1.0.0-rc.15",
|
||||
"@rolldown/binding-darwin-x64": "1.0.0-rc.15",
|
||||
"@rolldown/binding-freebsd-x64": "1.0.0-rc.15",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.15",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.15",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.0.0-rc.15",
|
||||
"@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.15",
|
||||
"@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.15",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.0.0-rc.15",
|
||||
"@rolldown/binding-linux-x64-musl": "1.0.0-rc.15",
|
||||
"@rolldown/binding-openharmony-arm64": "1.0.0-rc.15",
|
||||
"@rolldown/binding-wasm32-wasi": "1.0.0-rc.15",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.15",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.0.0-rc.15"
|
||||
}
|
||||
},
|
||||
"node_modules/rolldown/node_modules/@rolldown/pluginutils": {
|
||||
"version": "1.0.0-rc.10",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.10.tgz",
|
||||
"integrity": "sha512-UkVDEFk1w3mveXeKgaTuYfKWtPbvgck1dT8TUG3bnccrH0XtLTuAyfCoks4Q/M5ZGToSVJTIQYCzy2g/atAOeg==",
|
||||
"version": "1.0.0-rc.15",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.15.tgz",
|
||||
"integrity": "sha512-UromN0peaE53IaBRe9W7CjrZgXl90fqGpK+mIZbA3qSTeYqg3pqpROBdIPvOG3F5ereDHNwoHBI2e50n1BDr1g==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -2552,17 +2546,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.0.1.tgz",
|
||||
"integrity": "sha512-wt+Z2qIhfFt85uiyRt5LPU4oVEJBXj8hZNWKeqFG4gRG/0RaRGJ7njQCwzFVjO+v4+Ipmf5CY7VdmZRAYYBPHw==",
|
||||
"version": "8.0.8",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.0.8.tgz",
|
||||
"integrity": "sha512-dbU7/iLVa8KZALJyLOBOQ88nOXtNG8vxKuOT4I2mD+Ya70KPceF4IAmDsmU0h1Qsn5bPrvsY9HJstCRh3hG6Uw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"lightningcss": "^1.32.0",
|
||||
"picomatch": "^4.0.3",
|
||||
"picomatch": "^4.0.4",
|
||||
"postcss": "^8.5.8",
|
||||
"rolldown": "1.0.0-rc.10",
|
||||
"rolldown": "1.0.0-rc.15",
|
||||
"tinyglobby": "^0.2.15"
|
||||
},
|
||||
"bin": {
|
||||
@@ -2580,7 +2573,7 @@
|
||||
"peerDependencies": {
|
||||
"@types/node": "^20.19.0 || >=22.12.0",
|
||||
"@vitejs/devtools": "^0.1.0",
|
||||
"esbuild": "^0.27.0",
|
||||
"esbuild": "^0.27.0 || ^0.28.0",
|
||||
"jiti": ">=1.21.0",
|
||||
"less": "^4.0.0",
|
||||
"sass": "^1.70.0",
|
||||
@@ -2682,7 +2675,6 @@
|
||||
"integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"dev": "node server/dev.js",
|
||||
"dev:frontend": "vite",
|
||||
"dev:api": "node server/index.js",
|
||||
"build": "vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
|
||||
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46.43 9.21">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #262626;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g>
|
||||
<path class="cls-1" d="M4.05,8.93c-.82,0-1.53-.19-2.14-.58-.61-.39-1.08-.91-1.42-1.57-.34-.66-.5-1.38-.5-2.18s.17-1.53.5-2.19c.33-.65.81-1.17,1.42-1.56.61-.39,1.32-.58,2.14-.58.69,0,1.29.13,1.78.4s.9.63,1.21,1.09V.42h1.26v8.37h-1.26v-1.34c-.31.45-.72.8-1.21,1.07-.5.27-1.09.4-1.78.4ZM4.22,7.79c.62,0,1.15-.14,1.58-.44.43-.29.76-.68.98-1.16.22-.49.33-1.01.33-1.58s-.11-1.11-.33-1.59c-.22-.48-.55-.86-.98-1.16s-.96-.44-1.58-.44-1.14.15-1.59.44-.79.68-1.02,1.16c-.23.48-.35,1.01-.35,1.59s.12,1.1.35,1.58c.23.49.58.87,1.02,1.16.45.29.98.44,1.59.44Z"/>
|
||||
<path class="cls-1" d="M43.01,8.93c-.77,0-1.42-.13-1.95-.39-.53-.26-.94-.59-1.21-1.01-.28-.42-.43-.87-.47-1.37h1.31c.03.28.13.55.29.81s.41.47.75.64c.33.16.77.24,1.31.24.17,0,.37-.02.62-.05s.48-.09.71-.18.42-.22.58-.4.23-.41.23-.69c0-.35-.13-.61-.4-.8-.27-.19-.61-.34-1.04-.44-.43-.11-.88-.21-1.35-.31-.47-.1-.92-.23-1.35-.39-.43-.16-.77-.39-1.04-.69s-.4-.7-.4-1.21c0-.76.28-1.35.83-1.77.55-.42,1.37-.63,2.45-.63.74,0,1.34.12,1.8.34.46.23.82.52,1.05.88.24.36.38.74.43,1.16h-1.27c-.04-.36-.22-.66-.53-.92-.31-.26-.81-.39-1.52-.39-1.33,0-1.99.4-1.99,1.21,0,.33.13.59.4.77.27.18.61.32,1.04.43.42.11.87.21,1.35.3.47.1.92.23,1.35.39s.77.4,1.04.71c.27.31.4.72.4,1.25,0,.82-.31,1.44-.93,1.87-.62.43-1.45.65-2.49.65Z"/>
|
||||
</g>
|
||||
<circle class="cls-1" cx="13.97" cy="4.6" r="4.6"/>
|
||||
<circle class="cls-1" cx="24.01" cy="4.6" r="4.6"/>
|
||||
<circle class="cls-1" cx="33.99" cy="4.6" r="4.6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Ebene_1" data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 46.43 9.21">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #eaeaea;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g>
|
||||
<path class="cls-1" d="M4.05,8.93c-.82,0-1.53-.19-2.14-.58-.61-.39-1.08-.91-1.42-1.57-.34-.66-.5-1.38-.5-2.18s.17-1.53.5-2.19c.33-.65.81-1.17,1.42-1.56.61-.39,1.32-.58,2.14-.58.69,0,1.29.13,1.78.4s.9.63,1.21,1.09V.42h1.26v8.37h-1.26v-1.34c-.31.45-.72.8-1.21,1.07-.5.27-1.09.4-1.78.4ZM4.22,7.79c.62,0,1.15-.14,1.58-.44.43-.29.76-.68.98-1.16.22-.49.33-1.01.33-1.58s-.11-1.11-.33-1.59c-.22-.48-.55-.86-.98-1.16s-.96-.44-1.58-.44-1.14.15-1.59.44-.79.68-1.02,1.16c-.23.48-.35,1.01-.35,1.59s.12,1.1.35,1.58c.23.49.58.87,1.02,1.16.45.29.98.44,1.59.44Z"/>
|
||||
<path class="cls-1" d="M43.01,8.93c-.77,0-1.42-.13-1.95-.39-.53-.26-.94-.59-1.21-1.01-.28-.42-.43-.87-.47-1.37h1.31c.03.28.13.55.29.81s.41.47.75.64c.33.16.77.24,1.31.24.17,0,.37-.02.62-.05s.48-.09.71-.18.42-.22.58-.4.23-.41.23-.69c0-.35-.13-.61-.4-.8-.27-.19-.61-.34-1.04-.44-.43-.11-.88-.21-1.35-.31-.47-.1-.92-.23-1.35-.39-.43-.16-.77-.39-1.04-.69s-.4-.7-.4-1.21c0-.76.28-1.35.83-1.77.55-.42,1.37-.63,2.45-.63.74,0,1.34.12,1.8.34.46.23.82.52,1.05.88.24.36.38.74.43,1.16h-1.27c-.04-.36-.22-.66-.53-.92-.31-.26-.81-.39-1.52-.39-1.33,0-1.99.4-1.99,1.21,0,.33.13.59.4.77.27.18.61.32,1.04.43.42.11.87.21,1.35.3.47.1.92.23,1.35.39s.77.4,1.04.71c.27.31.4.72.4,1.25,0,.82-.31,1.44-.93,1.87-.62.43-1.45.65-2.49.65Z"/>
|
||||
</g>
|
||||
<circle class="cls-1" cx="13.97" cy="4.6" r="4.6"/>
|
||||
<circle class="cls-1" cx="24.01" cy="4.6" r="4.6"/>
|
||||
<circle class="cls-1" cx="33.99" cy="4.6" r="4.6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 952 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 957 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 952 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 933 KiB |
|
After Width: | Height: | Size: 154 KiB |
|
After Width: | Height: | Size: 951 KiB |
|
After Width: | Height: | Size: 138 KiB |
|
After Width: | Height: | Size: 933 KiB |
|
After Width: | Height: | Size: 175 KiB |
@@ -0,0 +1,38 @@
|
||||
import perfumes from "../src/data/perfumes.js";
|
||||
|
||||
const parsePriceCents = (price) => {
|
||||
const match = String(price).match(/(\d+)/);
|
||||
return match ? Number(match[1]) * 100 : 0;
|
||||
};
|
||||
|
||||
export const catalogProducts = [
|
||||
{
|
||||
id: "discovery-set",
|
||||
slug: "discovery-set",
|
||||
name: "Discovery Set",
|
||||
kind: "discovery_set",
|
||||
size_label: "6 x 2ml",
|
||||
price_cents: 4800,
|
||||
discovery_credit_cents: 4800,
|
||||
},
|
||||
...perfumes.flatMap((perfume) => [
|
||||
{
|
||||
id: `${perfume.slug}-sample`,
|
||||
slug: perfume.slug,
|
||||
name: `${perfume.name} Sample`,
|
||||
kind: "sample",
|
||||
size_label: "2ml",
|
||||
price_cents: parsePriceCents(perfume.prices.sample),
|
||||
discovery_credit_cents: 0,
|
||||
},
|
||||
{
|
||||
id: `${perfume.slug}-full`,
|
||||
slug: perfume.slug,
|
||||
name: `${perfume.name} Full Size`,
|
||||
kind: "full_size",
|
||||
size_label: "50ml",
|
||||
price_cents: parsePriceCents(perfume.prices.full),
|
||||
discovery_credit_cents: 0,
|
||||
},
|
||||
]),
|
||||
];
|
||||
@@ -0,0 +1,169 @@
|
||||
import { mkdirSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { DatabaseSync } from "node:sqlite";
|
||||
import { catalogProducts } from "./catalog.js";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
export const dbPath = join(__dirname, "../data/shop.sqlite");
|
||||
|
||||
mkdirSync(dirname(dbPath), { recursive: true });
|
||||
|
||||
export const db = new DatabaseSync(dbPath);
|
||||
|
||||
db.exec(`
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
email TEXT NOT NULL UNIQUE,
|
||||
password_hash TEXT NOT NULL,
|
||||
password_salt TEXT NOT NULL,
|
||||
name TEXT,
|
||||
first_name TEXT NOT NULL,
|
||||
surname TEXT NOT NULL,
|
||||
address TEXT,
|
||||
street_name TEXT,
|
||||
house_number TEXT,
|
||||
zip_code TEXT,
|
||||
city TEXT,
|
||||
birthdate TEXT,
|
||||
created_at TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sessions (
|
||||
token TEXT PRIMARY KEY,
|
||||
user_id INTEGER NOT NULL,
|
||||
created_at TEXT NOT NULL,
|
||||
expires_at TEXT NOT NULL,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS products (
|
||||
id TEXT PRIMARY KEY,
|
||||
slug TEXT NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
kind TEXT NOT NULL,
|
||||
size_label TEXT NOT NULL,
|
||||
price_cents INTEGER NOT NULL,
|
||||
discovery_credit_cents INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS cart_items (
|
||||
user_id INTEGER NOT NULL,
|
||||
product_id TEXT NOT NULL,
|
||||
quantity INTEGER NOT NULL,
|
||||
created_at TEXT NOT NULL,
|
||||
updated_at TEXT NOT NULL,
|
||||
PRIMARY KEY (user_id, product_id),
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (product_id) REFERENCES products(id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS orders (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL,
|
||||
subtotal_cents INTEGER NOT NULL,
|
||||
discount_cents INTEGER NOT NULL,
|
||||
total_cents INTEGER NOT NULL,
|
||||
shipping_address TEXT NOT NULL,
|
||||
payment_method TEXT NOT NULL,
|
||||
created_at TEXT NOT NULL,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS order_items (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
order_id INTEGER NOT NULL,
|
||||
product_id TEXT NOT NULL,
|
||||
quantity INTEGER NOT NULL,
|
||||
unit_price_cents INTEGER NOT NULL,
|
||||
line_total_cents INTEGER NOT NULL,
|
||||
FOREIGN KEY (order_id) REFERENCES orders(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (product_id) REFERENCES products(id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS discovery_credits (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL,
|
||||
order_id INTEGER NOT NULL,
|
||||
amount_cents INTEGER NOT NULL,
|
||||
redeemed_order_id INTEGER,
|
||||
created_at TEXT NOT NULL,
|
||||
redeemed_at TEXT,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (order_id) REFERENCES orders(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (redeemed_order_id) REFERENCES orders(id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sample_credits (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL,
|
||||
slug TEXT NOT NULL,
|
||||
order_id INTEGER NOT NULL,
|
||||
amount_cents INTEGER NOT NULL,
|
||||
redeemed_order_id INTEGER,
|
||||
created_at TEXT NOT NULL,
|
||||
redeemed_at TEXT,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (order_id) REFERENCES orders(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (redeemed_order_id) REFERENCES orders(id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS notification_preferences (
|
||||
user_id INTEGER PRIMARY KEY,
|
||||
drops_enabled INTEGER NOT NULL DEFAULT 0,
|
||||
restocks_enabled INTEGER NOT NULL DEFAULT 0,
|
||||
small_batch_enabled INTEGER NOT NULL DEFAULT 0,
|
||||
discovery_enabled INTEGER NOT NULL DEFAULT 0,
|
||||
updated_at TEXT NOT NULL,
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS product_subscriptions (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id INTEGER NOT NULL,
|
||||
product_id TEXT NOT NULL,
|
||||
type TEXT NOT NULL,
|
||||
created_at TEXT NOT NULL,
|
||||
UNIQUE (user_id, product_id, type),
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (product_id) REFERENCES products(id)
|
||||
);
|
||||
`);
|
||||
|
||||
const seedProduct = db.prepare(`
|
||||
INSERT INTO products (
|
||||
id, slug, name, kind, size_label, price_cents, discovery_credit_cents
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?)
|
||||
ON CONFLICT(id) DO UPDATE SET
|
||||
slug = excluded.slug,
|
||||
name = excluded.name,
|
||||
kind = excluded.kind,
|
||||
size_label = excluded.size_label,
|
||||
price_cents = excluded.price_cents,
|
||||
discovery_credit_cents = excluded.discovery_credit_cents
|
||||
`);
|
||||
|
||||
for (const product of catalogProducts) {
|
||||
seedProduct.run(
|
||||
product.id,
|
||||
product.slug,
|
||||
product.name,
|
||||
product.kind,
|
||||
product.size_label,
|
||||
product.price_cents,
|
||||
product.discovery_credit_cents
|
||||
);
|
||||
}
|
||||
|
||||
db.exec(`
|
||||
DELETE FROM discovery_credits
|
||||
WHERE id NOT IN (
|
||||
SELECT MIN(id)
|
||||
FROM discovery_credits
|
||||
GROUP BY user_id
|
||||
);
|
||||
`);
|
||||
|
||||
console.log(`SQLite shop database ready at ${dbPath}`);
|
||||
@@ -0,0 +1,33 @@
|
||||
import { spawn } from "node:child_process";
|
||||
|
||||
const run = (name, command, args, env = {}) => {
|
||||
const child = spawn(command, args, {
|
||||
stdio: "inherit",
|
||||
shell: process.platform === "win32",
|
||||
env: { ...process.env, ...env },
|
||||
});
|
||||
|
||||
child.on("exit", (code, signal) => {
|
||||
if (signal) {
|
||||
console.log(`${name} stopped with ${signal}`);
|
||||
return;
|
||||
}
|
||||
if (code !== 0) {
|
||||
console.log(`${name} exited with code ${code}`);
|
||||
process.exitCode = code;
|
||||
}
|
||||
});
|
||||
|
||||
return child;
|
||||
};
|
||||
|
||||
const api = run("api", "node", ["server/index.js"], { API_PORT: "4174" });
|
||||
const vite = run("vite", "node_modules/.bin/vite", []);
|
||||
|
||||
const stop = () => {
|
||||
api.kill("SIGTERM");
|
||||
vite.kill("SIGTERM");
|
||||
};
|
||||
|
||||
process.on("SIGINT", stop);
|
||||
process.on("SIGTERM", stop);
|
||||
@@ -0,0 +1,732 @@
|
||||
import { pbkdf2Sync, randomBytes, timingSafeEqual } from "node:crypto";
|
||||
import { createServer } from "node:http";
|
||||
import { db } from "./db.js";
|
||||
|
||||
const PORT = Number(process.env.API_PORT || 4174);
|
||||
const SESSION_DAYS = 30;
|
||||
const now = () => new Date().toISOString();
|
||||
const addDays = (days) => new Date(Date.now() + days * 86400000).toISOString();
|
||||
|
||||
const moneyId = (value) => value;
|
||||
|
||||
const json = (res, status, payload) => {
|
||||
res.writeHead(status, {
|
||||
"Content-Type": "application/json",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
"Access-Control-Allow-Methods": "GET,POST,PATCH,DELETE,OPTIONS",
|
||||
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
||||
});
|
||||
res.end(JSON.stringify(payload));
|
||||
};
|
||||
|
||||
const readBody = async (req) =>
|
||||
new Promise((resolve, reject) => {
|
||||
let raw = "";
|
||||
req.on("data", (chunk) => {
|
||||
raw += chunk;
|
||||
if (raw.length > 1_000_000) {
|
||||
reject(new Error("Request body too large"));
|
||||
req.destroy();
|
||||
}
|
||||
});
|
||||
req.on("end", () => {
|
||||
if (!raw) {
|
||||
resolve({});
|
||||
return;
|
||||
}
|
||||
try {
|
||||
resolve(JSON.parse(raw));
|
||||
} catch {
|
||||
reject(new Error("Invalid JSON"));
|
||||
}
|
||||
});
|
||||
req.on("error", reject);
|
||||
});
|
||||
|
||||
const hashPassword = (password, salt = randomBytes(16).toString("hex")) => ({
|
||||
salt,
|
||||
hash: pbkdf2Sync(password, salt, 120000, 64, "sha512").toString("hex"),
|
||||
});
|
||||
|
||||
const verifyPassword = (password, salt, expectedHash) => {
|
||||
const { hash } = hashPassword(password, salt);
|
||||
const actual = Buffer.from(hash, "hex");
|
||||
const expected = Buffer.from(expectedHash, "hex");
|
||||
return actual.length === expected.length && timingSafeEqual(actual, expected);
|
||||
};
|
||||
|
||||
const getBearerToken = (req) => {
|
||||
const auth = req.headers.authorization || "";
|
||||
const match = auth.match(/^Bearer\s+(.+)$/i);
|
||||
return match ? match[1] : null;
|
||||
};
|
||||
|
||||
const composeAddress = ({ street_name, house_number, zip_code, city }) =>
|
||||
[street_name, house_number].filter(Boolean).join(" ").trim() +
|
||||
(zip_code || city ? `, ${[zip_code, city].filter(Boolean).join(" ")}` : "");
|
||||
|
||||
const normalizeEmail = (email) => String(email || "").trim().toLowerCase();
|
||||
|
||||
const notificationForUser = (userId) => {
|
||||
const existing = db
|
||||
.prepare("SELECT * FROM notification_preferences WHERE user_id = ?")
|
||||
.get(userId);
|
||||
if (existing) return existing;
|
||||
|
||||
db.prepare(
|
||||
`INSERT INTO notification_preferences (
|
||||
user_id, drops_enabled, restocks_enabled, small_batch_enabled, discovery_enabled, updated_at
|
||||
) VALUES (?, 0, 0, 0, 0, ?)`
|
||||
).run(userId, now());
|
||||
return db.prepare("SELECT * FROM notification_preferences WHERE user_id = ?").get(userId);
|
||||
};
|
||||
|
||||
const rowToUser = (row) => {
|
||||
if (!row) return null;
|
||||
return {
|
||||
id: row.id,
|
||||
email: row.email,
|
||||
name: row.name,
|
||||
first_name: row.first_name,
|
||||
surname: row.surname,
|
||||
address: row.address,
|
||||
street_name: row.street_name || "",
|
||||
house_number: row.house_number || "",
|
||||
zip_code: row.zip_code || "",
|
||||
city: row.city || "",
|
||||
birthdate: row.birthdate || "",
|
||||
created_at: row.created_at,
|
||||
notifications: prefsToJson(notificationForUser(row.id)),
|
||||
productSubscriptions: getProductSubscriptions(row.id),
|
||||
discoveryStatus: getDiscoveryStatus(row.id),
|
||||
sampleCredits: getSampleCreditStatus(row.id),
|
||||
loyaltyStatus: getLoyaltyStatus(row.id),
|
||||
};
|
||||
};
|
||||
|
||||
const prefsToJson = (prefs) => ({
|
||||
drops_enabled: Boolean(prefs.drops_enabled),
|
||||
restocks_enabled: Boolean(prefs.restocks_enabled),
|
||||
small_batch_enabled: Boolean(prefs.small_batch_enabled),
|
||||
discovery_enabled: Boolean(prefs.discovery_enabled),
|
||||
updated_at: prefs.updated_at,
|
||||
});
|
||||
|
||||
const authenticate = (req) => {
|
||||
const token = getBearerToken(req);
|
||||
if (!token) return null;
|
||||
const session = db
|
||||
.prepare("SELECT * FROM sessions WHERE token = ?")
|
||||
.get(token);
|
||||
if (!session) return null;
|
||||
if (new Date(session.expires_at).getTime() <= Date.now()) {
|
||||
db.prepare("DELETE FROM sessions WHERE token = ?").run(token);
|
||||
return null;
|
||||
}
|
||||
const user = db.prepare("SELECT * FROM users WHERE id = ?").get(session.user_id);
|
||||
return user ? { token, user } : null;
|
||||
};
|
||||
|
||||
const requireAuth = (req, res) => {
|
||||
const auth = authenticate(req);
|
||||
if (!auth) {
|
||||
json(res, 401, { error: "Please log in to continue." });
|
||||
return null;
|
||||
}
|
||||
return auth;
|
||||
};
|
||||
|
||||
const createSession = (userId) => {
|
||||
const token = randomBytes(32).toString("hex");
|
||||
db.prepare(
|
||||
"INSERT INTO sessions (token, user_id, created_at, expires_at) VALUES (?, ?, ?, ?)"
|
||||
).run(token, userId, now(), addDays(SESSION_DAYS));
|
||||
return token;
|
||||
};
|
||||
|
||||
const getCartRows = (userId) =>
|
||||
db.prepare(
|
||||
`SELECT c.product_id, c.quantity, p.slug, p.name, p.kind, p.size_label,
|
||||
p.price_cents, p.discovery_credit_cents
|
||||
FROM cart_items c
|
||||
JOIN products p ON p.id = c.product_id
|
||||
WHERE c.user_id = ?
|
||||
ORDER BY c.created_at ASC`
|
||||
).all(userId);
|
||||
|
||||
const getAvailableDiscounts = (userId, rows) => {
|
||||
const discounts = [];
|
||||
const fullRows = rows.filter((row) => row.kind === "full_size");
|
||||
const fullTotal = fullRows.reduce(
|
||||
(sum, row) => sum + row.price_cents * row.quantity,
|
||||
0
|
||||
);
|
||||
|
||||
if (fullTotal > 0) {
|
||||
const discovery = db
|
||||
.prepare(
|
||||
`SELECT * FROM discovery_credits
|
||||
WHERE user_id = ? AND redeemed_order_id IS NULL
|
||||
ORDER BY id ASC LIMIT 1`
|
||||
)
|
||||
.get(userId);
|
||||
if (discovery) {
|
||||
discounts.push({
|
||||
type: "discovery",
|
||||
creditId: discovery.id,
|
||||
amount_cents: Math.min(discovery.amount_cents, fullTotal),
|
||||
label: "Discovery Set credit",
|
||||
});
|
||||
}
|
||||
|
||||
for (const row of fullRows) {
|
||||
const sample = db
|
||||
.prepare(
|
||||
`SELECT * FROM sample_credits
|
||||
WHERE user_id = ? AND slug = ? AND redeemed_order_id IS NULL
|
||||
ORDER BY id ASC LIMIT 1`
|
||||
)
|
||||
.get(userId, row.slug);
|
||||
if (sample) {
|
||||
discounts.push({
|
||||
type: "sample",
|
||||
creditId: sample.id,
|
||||
slug: row.slug,
|
||||
product_id: row.product_id,
|
||||
amount_cents: Math.min(sample.amount_cents, row.price_cents * row.quantity),
|
||||
label: `${row.name.replace(" Full Size", "")} sample credit`,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return discounts.filter((discount) => discount.amount_cents > 0);
|
||||
};
|
||||
|
||||
const getCart = (userId) => {
|
||||
const rows = getCartRows(userId);
|
||||
const items = rows.map((row) => ({
|
||||
product_id: row.product_id,
|
||||
quantity: row.quantity,
|
||||
line_total_cents: row.price_cents * row.quantity,
|
||||
product: {
|
||||
id: row.product_id,
|
||||
slug: row.slug,
|
||||
name: row.name,
|
||||
kind: row.kind,
|
||||
size_label: row.size_label,
|
||||
price_cents: row.price_cents,
|
||||
discovery_credit_cents: row.discovery_credit_cents,
|
||||
},
|
||||
}));
|
||||
const subtotal_cents = items.reduce((sum, item) => sum + item.line_total_cents, 0);
|
||||
const discounts = getAvailableDiscounts(userId, rows);
|
||||
const discount_cents = discounts.reduce((sum, item) => sum + item.amount_cents, 0);
|
||||
return {
|
||||
items,
|
||||
subtotal_cents,
|
||||
discount_cents,
|
||||
total_cents: Math.max(0, subtotal_cents - discount_cents),
|
||||
total_quantity: items.reduce((sum, item) => sum + item.quantity, 0),
|
||||
discounts,
|
||||
};
|
||||
};
|
||||
|
||||
const getOrders = (userId) => {
|
||||
const orders = db
|
||||
.prepare("SELECT * FROM orders WHERE user_id = ? ORDER BY created_at DESC")
|
||||
.all(userId);
|
||||
const itemStmt = db.prepare(
|
||||
`SELECT oi.*, p.name, p.slug, p.kind, p.size_label
|
||||
FROM order_items oi
|
||||
JOIN products p ON p.id = oi.product_id
|
||||
WHERE oi.order_id = ?
|
||||
ORDER BY oi.id ASC`
|
||||
);
|
||||
return orders.map((order) => ({
|
||||
...order,
|
||||
items: itemStmt.all(order.id).map((item) => ({
|
||||
id: item.id,
|
||||
product_id: item.product_id,
|
||||
quantity: item.quantity,
|
||||
unit_price_cents: item.unit_price_cents,
|
||||
line_total_cents: item.line_total_cents,
|
||||
product: {
|
||||
id: item.product_id,
|
||||
name: item.name,
|
||||
slug: item.slug,
|
||||
kind: item.kind,
|
||||
size_label: item.size_label,
|
||||
},
|
||||
})),
|
||||
}));
|
||||
};
|
||||
|
||||
function getDiscoveryStatus(userId) {
|
||||
const credit = db
|
||||
.prepare("SELECT * FROM discovery_credits WHERE user_id = ? ORDER BY id ASC LIMIT 1")
|
||||
.get(userId);
|
||||
if (!credit) return "No Discount atm";
|
||||
return credit.redeemed_order_id ? "Discount already used" : "Discount available";
|
||||
}
|
||||
|
||||
function getSampleCreditStatus(userId) {
|
||||
return db
|
||||
.prepare(
|
||||
`SELECT slug, amount_cents, redeemed_order_id, created_at, redeemed_at
|
||||
FROM sample_credits
|
||||
WHERE user_id = ?
|
||||
ORDER BY created_at DESC`
|
||||
)
|
||||
.all(userId)
|
||||
.map((credit) => ({
|
||||
...credit,
|
||||
status: credit.redeemed_order_id ? "used" : "available",
|
||||
}));
|
||||
}
|
||||
|
||||
function getProductSubscriptions(userId) {
|
||||
return db
|
||||
.prepare(
|
||||
`SELECT ps.id, ps.product_id, ps.type, ps.created_at,
|
||||
p.slug, p.name, p.kind, p.size_label
|
||||
FROM product_subscriptions ps
|
||||
JOIN products p ON p.id = ps.product_id
|
||||
WHERE ps.user_id = ?
|
||||
ORDER BY ps.created_at DESC, ps.id DESC`
|
||||
)
|
||||
.all(userId);
|
||||
}
|
||||
|
||||
function getLoyaltyStatus(userId) {
|
||||
const orderStats = db
|
||||
.prepare(
|
||||
`SELECT COUNT(*) AS purchases, COALESCE(SUM(total_cents), 0) AS spent_cents
|
||||
FROM orders
|
||||
WHERE user_id = ?`
|
||||
)
|
||||
.get(userId);
|
||||
const discovery = db
|
||||
.prepare(
|
||||
`SELECT 1
|
||||
FROM order_items oi
|
||||
JOIN orders o ON o.id = oi.order_id
|
||||
WHERE o.user_id = ? AND oi.product_id = 'discovery-set'
|
||||
LIMIT 1`
|
||||
)
|
||||
.get(userId);
|
||||
const full = db
|
||||
.prepare(
|
||||
`SELECT 1
|
||||
FROM order_items oi
|
||||
JOIN orders o ON o.id = oi.order_id
|
||||
JOIN products p ON p.id = oi.product_id
|
||||
WHERE o.user_id = ? AND p.kind = 'full_size'
|
||||
LIMIT 1`
|
||||
)
|
||||
.get(userId);
|
||||
|
||||
const status = {
|
||||
hasDiscoverySet: Boolean(discovery),
|
||||
hasFullSize: Boolean(full),
|
||||
purchases: Number(orderStats.purchases || 0),
|
||||
spent_cents: Number(orderStats.spent_cents || 0),
|
||||
};
|
||||
status.unlocked =
|
||||
status.hasDiscoverySet &&
|
||||
status.hasFullSize &&
|
||||
status.purchases >= 3 &&
|
||||
status.spent_cents > 50000;
|
||||
return status;
|
||||
}
|
||||
|
||||
const stateForUser = (userRow, token) => ({
|
||||
token,
|
||||
user: rowToUser(userRow),
|
||||
cart: getCart(userRow.id),
|
||||
orders: getOrders(userRow.id),
|
||||
});
|
||||
|
||||
const register = async (req, res) => {
|
||||
const body = await readBody(req);
|
||||
const email = normalizeEmail(body.email);
|
||||
const password = String(body.password || "");
|
||||
const firstName = String(body.first_name || body.firstName || "").trim();
|
||||
const surname = String(body.surname || "").trim();
|
||||
|
||||
if (!firstName || !surname || !email || !password) {
|
||||
json(res, 400, { error: "First name, surname, email, and password are required." });
|
||||
return;
|
||||
}
|
||||
|
||||
const existing = db.prepare("SELECT id FROM users WHERE email = ?").get(email);
|
||||
if (existing) {
|
||||
json(res, 409, { error: "An account with this email already exists." });
|
||||
return;
|
||||
}
|
||||
|
||||
const { salt, hash } = hashPassword(password);
|
||||
const fullName = `${firstName} ${surname}`.trim();
|
||||
const created = now();
|
||||
const result = db
|
||||
.prepare(
|
||||
`INSERT INTO users (
|
||||
email, password_hash, password_salt, name, first_name, surname,
|
||||
address, street_name, house_number, zip_code, city, birthdate, created_at
|
||||
) VALUES (?, ?, ?, ?, ?, ?, '', '', '', '', '', '', ?)`
|
||||
)
|
||||
.run(email, hash, salt, fullName, firstName, surname, created);
|
||||
|
||||
notificationForUser(result.lastInsertRowid);
|
||||
const user = db.prepare("SELECT * FROM users WHERE id = ?").get(result.lastInsertRowid);
|
||||
json(res, 201, stateForUser(user, createSession(user.id)));
|
||||
};
|
||||
|
||||
const login = async (req, res) => {
|
||||
const body = await readBody(req);
|
||||
const email = normalizeEmail(body.email);
|
||||
const password = String(body.password || "");
|
||||
const user = db.prepare("SELECT * FROM users WHERE email = ?").get(email);
|
||||
|
||||
if (!user || !verifyPassword(password, user.password_salt, user.password_hash)) {
|
||||
json(res, 401, { error: "Invalid email or password." });
|
||||
return;
|
||||
}
|
||||
|
||||
json(res, 200, stateForUser(user, createSession(user.id)));
|
||||
};
|
||||
|
||||
const patchProfile = async (req, res, user) => {
|
||||
const body = await readBody(req);
|
||||
const current = db.prepare("SELECT * FROM users WHERE id = ?").get(user.id);
|
||||
const firstName = String(body.first_name ?? current.first_name ?? "").trim();
|
||||
const surname = String(body.surname ?? current.surname ?? "").trim();
|
||||
const streetName = String(body.street_name ?? current.street_name ?? "").trim();
|
||||
const houseNumber = String(body.house_number ?? current.house_number ?? "").trim();
|
||||
const zipCode = String(body.zip_code ?? current.zip_code ?? "").trim();
|
||||
const city = String(body.city ?? current.city ?? "").trim();
|
||||
const birthdate = String(body.birthdate ?? current.birthdate ?? "").trim();
|
||||
const name = `${firstName} ${surname}`.trim();
|
||||
const address = composeAddress({
|
||||
street_name: streetName,
|
||||
house_number: houseNumber,
|
||||
zip_code: zipCode,
|
||||
city,
|
||||
});
|
||||
|
||||
if (!firstName || !surname) {
|
||||
json(res, 400, { error: "First name and surname are required." });
|
||||
return;
|
||||
}
|
||||
|
||||
db.prepare(
|
||||
`UPDATE users
|
||||
SET name = ?, first_name = ?, surname = ?, address = ?, street_name = ?,
|
||||
house_number = ?, zip_code = ?, city = ?, birthdate = ?
|
||||
WHERE id = ?`
|
||||
).run(name, firstName, surname, address, streetName, houseNumber, zipCode, city, birthdate, user.id);
|
||||
|
||||
const updated = db.prepare("SELECT * FROM users WHERE id = ?").get(user.id);
|
||||
json(res, 200, { user: rowToUser(updated) });
|
||||
};
|
||||
|
||||
const patchNotifications = async (req, res, user) => {
|
||||
const body = await readBody(req);
|
||||
db.prepare(
|
||||
`INSERT INTO notification_preferences (
|
||||
user_id, drops_enabled, restocks_enabled, small_batch_enabled, discovery_enabled, updated_at
|
||||
) VALUES (?, ?, ?, ?, ?, ?)
|
||||
ON CONFLICT(user_id) DO UPDATE SET
|
||||
drops_enabled = excluded.drops_enabled,
|
||||
restocks_enabled = excluded.restocks_enabled,
|
||||
small_batch_enabled = excluded.small_batch_enabled,
|
||||
discovery_enabled = excluded.discovery_enabled,
|
||||
updated_at = excluded.updated_at`
|
||||
).run(
|
||||
user.id,
|
||||
body.drops_enabled ? 1 : 0,
|
||||
body.restocks_enabled ? 1 : 0,
|
||||
body.small_batch_enabled ? 1 : 0,
|
||||
body.discovery_enabled ? 1 : 0,
|
||||
now()
|
||||
);
|
||||
json(res, 200, { notifications: prefsToJson(notificationForUser(user.id)) });
|
||||
};
|
||||
|
||||
const addCartItem = async (req, res, user) => {
|
||||
const body = await readBody(req);
|
||||
const productId = moneyId(String(body.productId || body.product_id || ""));
|
||||
const quantity = Math.max(1, Number(body.quantity || 1));
|
||||
const product = db.prepare("SELECT * FROM products WHERE id = ?").get(productId);
|
||||
if (!product) {
|
||||
json(res, 404, { error: "Product not found." });
|
||||
return;
|
||||
}
|
||||
const timestamp = now();
|
||||
db.prepare(
|
||||
`INSERT INTO cart_items (user_id, product_id, quantity, created_at, updated_at)
|
||||
VALUES (?, ?, ?, ?, ?)
|
||||
ON CONFLICT(user_id, product_id) DO UPDATE SET
|
||||
quantity = cart_items.quantity + excluded.quantity,
|
||||
updated_at = excluded.updated_at`
|
||||
).run(user.id, productId, quantity, timestamp, timestamp);
|
||||
json(res, 200, {
|
||||
cart: getCart(user.id),
|
||||
message: `${quantity} x ${product.name} added.`,
|
||||
});
|
||||
};
|
||||
|
||||
const patchCartItem = async (req, res, user, productId) => {
|
||||
const body = await readBody(req);
|
||||
const quantity = Number(body.quantity);
|
||||
if (!Number.isFinite(quantity)) {
|
||||
json(res, 400, { error: "Quantity is required." });
|
||||
return;
|
||||
}
|
||||
if (quantity <= 0) {
|
||||
db.prepare("DELETE FROM cart_items WHERE user_id = ? AND product_id = ?").run(user.id, productId);
|
||||
} else {
|
||||
db.prepare(
|
||||
"UPDATE cart_items SET quantity = ?, updated_at = ? WHERE user_id = ? AND product_id = ?"
|
||||
).run(Math.floor(quantity), now(), user.id, productId);
|
||||
}
|
||||
json(res, 200, { cart: getCart(user.id) });
|
||||
};
|
||||
|
||||
const deleteCartItem = (res, user, productId) => {
|
||||
db.prepare("DELETE FROM cart_items WHERE user_id = ? AND product_id = ?").run(user.id, productId);
|
||||
json(res, 200, { cart: getCart(user.id) });
|
||||
};
|
||||
|
||||
const checkout = async (req, res, user) => {
|
||||
const body = await readBody(req);
|
||||
const rows = getCartRows(user.id);
|
||||
if (rows.length === 0) {
|
||||
json(res, 400, { error: "Your cart is empty." });
|
||||
return;
|
||||
}
|
||||
|
||||
const addressFields = {
|
||||
street_name: String(body.street_name || "").trim(),
|
||||
house_number: String(body.house_number || "").trim(),
|
||||
zip_code: String(body.zip_code || "").trim(),
|
||||
city: String(body.city || "").trim(),
|
||||
};
|
||||
const paymentMethod = String(body.payment_method || body.paymentMethod || "").trim();
|
||||
if (!addressFields.street_name || !addressFields.house_number || !addressFields.zip_code || !addressFields.city) {
|
||||
json(res, 400, { error: "Street name, house number, ZIP code, and city are required." });
|
||||
return;
|
||||
}
|
||||
if (!["Bill", "Card", "Twint", "PayPal"].includes(paymentMethod)) {
|
||||
json(res, 400, { error: "Choose a payment method." });
|
||||
return;
|
||||
}
|
||||
|
||||
const subtotal = rows.reduce((sum, row) => sum + row.price_cents * row.quantity, 0);
|
||||
const discounts = getAvailableDiscounts(user.id, rows);
|
||||
const discountTotal = discounts.reduce((sum, discount) => sum + discount.amount_cents, 0);
|
||||
const total = Math.max(0, subtotal - discountTotal);
|
||||
const shippingAddress = composeAddress(addressFields);
|
||||
const timestamp = now();
|
||||
|
||||
try {
|
||||
db.exec("BEGIN");
|
||||
const orderResult = db
|
||||
.prepare(
|
||||
`INSERT INTO orders (
|
||||
user_id, subtotal_cents, discount_cents, total_cents,
|
||||
shipping_address, payment_method, created_at
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?)`
|
||||
)
|
||||
.run(user.id, subtotal, discountTotal, total, shippingAddress, paymentMethod, timestamp);
|
||||
const orderId = orderResult.lastInsertRowid;
|
||||
|
||||
const insertItem = db.prepare(
|
||||
`INSERT INTO order_items (
|
||||
order_id, product_id, quantity, unit_price_cents, line_total_cents
|
||||
) VALUES (?, ?, ?, ?, ?)`
|
||||
);
|
||||
for (const row of rows) {
|
||||
insertItem.run(orderId, row.product_id, row.quantity, row.price_cents, row.price_cents * row.quantity);
|
||||
}
|
||||
|
||||
for (const discount of discounts) {
|
||||
if (discount.type === "discovery") {
|
||||
db.prepare(
|
||||
"UPDATE discovery_credits SET redeemed_order_id = ?, redeemed_at = ? WHERE id = ?"
|
||||
).run(orderId, timestamp, discount.creditId);
|
||||
}
|
||||
if (discount.type === "sample") {
|
||||
db.prepare(
|
||||
"UPDATE sample_credits SET redeemed_order_id = ?, redeemed_at = ? WHERE id = ?"
|
||||
).run(orderId, timestamp, discount.creditId);
|
||||
}
|
||||
}
|
||||
|
||||
const hasDiscoverySet = rows.some((row) => row.product_id === "discovery-set");
|
||||
const hadDiscoveryCredit = db
|
||||
.prepare("SELECT id FROM discovery_credits WHERE user_id = ? LIMIT 1")
|
||||
.get(user.id);
|
||||
if (hasDiscoverySet && !hadDiscoveryCredit) {
|
||||
db.prepare(
|
||||
`INSERT INTO discovery_credits (
|
||||
user_id, order_id, amount_cents, redeemed_order_id, created_at, redeemed_at
|
||||
) VALUES (?, ?, 4800, NULL, ?, NULL)`
|
||||
).run(user.id, orderId, timestamp);
|
||||
}
|
||||
|
||||
const sampleRows = rows.filter((row) => row.kind === "sample");
|
||||
for (const row of sampleRows) {
|
||||
const existing = db
|
||||
.prepare("SELECT id FROM sample_credits WHERE user_id = ? AND slug = ? LIMIT 1")
|
||||
.get(user.id, row.slug);
|
||||
if (!existing) {
|
||||
db.prepare(
|
||||
`INSERT INTO sample_credits (
|
||||
user_id, slug, order_id, amount_cents, redeemed_order_id, created_at, redeemed_at
|
||||
) VALUES (?, ?, ?, ?, NULL, ?, NULL)`
|
||||
).run(user.id, row.slug, orderId, row.price_cents, timestamp);
|
||||
}
|
||||
}
|
||||
|
||||
db.prepare("DELETE FROM cart_items WHERE user_id = ?").run(user.id);
|
||||
db.exec("COMMIT");
|
||||
|
||||
const updatedUser = db.prepare("SELECT * FROM users WHERE id = ?").get(user.id);
|
||||
json(res, 200, {
|
||||
order: getOrders(user.id).find((order) => order.id === orderId),
|
||||
cart: getCart(user.id),
|
||||
orders: getOrders(user.id),
|
||||
user: rowToUser(updatedUser),
|
||||
});
|
||||
} catch (error) {
|
||||
db.exec("ROLLBACK");
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
const subscribeProduct = async (req, res, user) => {
|
||||
const body = await readBody(req);
|
||||
const productId = String(body.product_id || body.productId || "").trim();
|
||||
const type = String(body.type || "restock").trim();
|
||||
const product = db.prepare("SELECT * FROM products WHERE id = ?").get(productId);
|
||||
if (!product) {
|
||||
json(res, 404, { error: "Product not found." });
|
||||
return;
|
||||
}
|
||||
db.prepare(
|
||||
`INSERT OR IGNORE INTO product_subscriptions (user_id, product_id, type, created_at)
|
||||
VALUES (?, ?, ?, ?)`
|
||||
).run(user.id, productId, type, now());
|
||||
json(res, 200, {
|
||||
ok: true,
|
||||
message: `${product.name} ${type} subscription saved.`,
|
||||
subscriptions: getProductSubscriptions(user.id),
|
||||
});
|
||||
};
|
||||
|
||||
const deleteProductSubscription = (res, user, id) => {
|
||||
db.prepare("DELETE FROM product_subscriptions WHERE id = ? AND user_id = ?").run(
|
||||
id,
|
||||
user.id
|
||||
);
|
||||
json(res, 200, {
|
||||
ok: true,
|
||||
subscriptions: getProductSubscriptions(user.id),
|
||||
});
|
||||
};
|
||||
|
||||
const smallBatch = (res, user) => {
|
||||
const loyaltyStatus = getLoyaltyStatus(user.id);
|
||||
const releases = loyaltyStatus.unlocked
|
||||
? [
|
||||
{
|
||||
type: "Archive Batch",
|
||||
name: "KALTER BETON Archive Batch 01",
|
||||
note: "A colder iris-heavy return from the first concrete accord trials.",
|
||||
},
|
||||
{
|
||||
type: "Prototype",
|
||||
name: "NASSER MARMOR Fog Prototype",
|
||||
note: "A misted marble study with softened aldehydes and mineral musk.",
|
||||
},
|
||||
{
|
||||
type: "Small Batch",
|
||||
name: "SCHWARZES BENZIN Night Run",
|
||||
note: "Low-light petrol, birch smoke, and leather in a numbered run.",
|
||||
},
|
||||
]
|
||||
: [];
|
||||
json(res, 200, { loyaltyStatus, releases });
|
||||
};
|
||||
|
||||
const route = async (req, res) => {
|
||||
if (req.method === "OPTIONS") {
|
||||
json(res, 204, {});
|
||||
return;
|
||||
}
|
||||
|
||||
const url = new URL(req.url, `http://${req.headers.host}`);
|
||||
const path = url.pathname;
|
||||
|
||||
if (req.method === "GET" && path === "/api/catalog") {
|
||||
json(res, 200, { products: db.prepare("SELECT * FROM products ORDER BY id ASC").all() });
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.method === "POST" && path === "/api/auth/register") return register(req, res);
|
||||
if (req.method === "POST" && path === "/api/auth/login") return login(req, res);
|
||||
|
||||
if (req.method === "POST" && path === "/api/auth/logout") {
|
||||
const token = getBearerToken(req);
|
||||
if (token) db.prepare("DELETE FROM sessions WHERE token = ?").run(token);
|
||||
json(res, 200, { ok: true });
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.method === "GET" && path === "/api/auth/session") {
|
||||
const auth = requireAuth(req, res);
|
||||
if (!auth) return;
|
||||
json(res, 200, stateForUser(auth.user, auth.token));
|
||||
return;
|
||||
}
|
||||
|
||||
const auth = requireAuth(req, res);
|
||||
if (!auth) return;
|
||||
const { user } = auth;
|
||||
|
||||
if (req.method === "PATCH" && path === "/api/profile") return patchProfile(req, res, user);
|
||||
if (req.method === "PATCH" && path === "/api/notifications") return patchNotifications(req, res, user);
|
||||
if (req.method === "GET" && path === "/api/cart") {
|
||||
json(res, 200, { cart: getCart(user.id) });
|
||||
return;
|
||||
}
|
||||
if (req.method === "POST" && path === "/api/cart/items") return addCartItem(req, res, user);
|
||||
if (req.method === "POST" && path === "/api/cart/checkout") return checkout(req, res, user);
|
||||
if (req.method === "POST" && path === "/api/product-subscriptions") return subscribeProduct(req, res, user);
|
||||
if (req.method === "GET" && path === "/api/small-batch") return smallBatch(res, user);
|
||||
|
||||
const subscriptionMatch = path.match(/^\/api\/product-subscriptions\/(\d+)$/);
|
||||
if (subscriptionMatch && req.method === "DELETE") {
|
||||
return deleteProductSubscription(res, user, Number(subscriptionMatch[1]));
|
||||
}
|
||||
|
||||
const itemMatch = path.match(/^\/api\/cart\/items\/([^/]+)$/);
|
||||
if (itemMatch && req.method === "PATCH") {
|
||||
return patchCartItem(req, res, user, decodeURIComponent(itemMatch[1]));
|
||||
}
|
||||
if (itemMatch && req.method === "DELETE") {
|
||||
return deleteCartItem(res, user, decodeURIComponent(itemMatch[1]));
|
||||
}
|
||||
|
||||
json(res, 404, { error: "Route not found." });
|
||||
};
|
||||
|
||||
createServer((req, res) => {
|
||||
route(req, res).catch((error) => {
|
||||
console.error(error);
|
||||
json(res, 500, { error: "Server error." });
|
||||
});
|
||||
}).listen(PORT, () => {
|
||||
console.log(`Shop API listening on http://localhost:${PORT}`);
|
||||
});
|
||||
@@ -7,9 +7,55 @@ body,
|
||||
#root {
|
||||
margin: 0;
|
||||
min-height: 100%;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-family: "Questrial", Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#root {
|
||||
background: var(--theme-bg);
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
body {
|
||||
background: #efefef;
|
||||
}
|
||||
background: var(--theme-bg);
|
||||
}
|
||||
|
||||
.navbar--light .nav-pill,
|
||||
.navbar--light .nav-link,
|
||||
[class*="-page"],
|
||||
[class*="-shell"],
|
||||
[class*="-card"],
|
||||
[class*="-panel"],
|
||||
[class*="-box"],
|
||||
button,
|
||||
input,
|
||||
textarea {
|
||||
transition: background-color 0.24s ease, border-color 0.24s ease, color 0.24s ease;
|
||||
}
|
||||
|
||||
body.theme-dark .navbar--light .nav-pill {
|
||||
background: rgba(38, 38, 38, 0.88);
|
||||
border-color: rgba(234, 234, 234, 0.26);
|
||||
}
|
||||
|
||||
body.theme-dark .navbar--light .nav-link {
|
||||
color: var(--theme-white);
|
||||
}
|
||||
|
||||
body.theme-dark .navbar--light .nav-link:hover,
|
||||
body.theme-dark .navbar--light .nav-link.active {
|
||||
background: rgba(234, 234, 234, 0.15);
|
||||
}
|
||||
|
||||
body.theme-dark .navbar--light .nav-theme-switch__track {
|
||||
border-color: rgba(234, 234, 234, 0.3);
|
||||
background: rgba(234, 234, 234, 0.14);
|
||||
}
|
||||
|
||||
body.theme-dark .navbar--light .nav-brand-logo {
|
||||
filter: invert(1) brightness(1.08);
|
||||
}
|
||||
|
||||
body.theme-light .navbar--light .nav-link:hover,
|
||||
body.theme-light .navbar--light .nav-link.active {
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Routes, Route } from "react-router";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Routes, Route, useLocation } from "react-router";
|
||||
import LandingPage from "./pages/LandingPage";
|
||||
import ProductDetailPage from "./components/ProductDetailPage";
|
||||
import AboutPage from "./pages/AboutPage";
|
||||
@@ -6,29 +7,74 @@ import ImpressumPage from "./pages/ImpressumPage";
|
||||
import DatenschutzPage from "./pages/DatenschutzPage";
|
||||
import SupportPage from "./pages/SupportPage";
|
||||
import DiscoverySetPage from "./pages/DiscoverySetPage";
|
||||
import SmallBatchPage from "./pages/SmallBatchPage";
|
||||
import Footer from "./components/Footer";
|
||||
import SupportChatbot from "./components/SupportChatbot";
|
||||
import ScrollToTop from "./components/ScrollToTop";
|
||||
import ShopDrawer from "./components/ShopDrawer";
|
||||
import CartToast from "./components/CartToast";
|
||||
import useScrollTextReveal from "./hooks/useScrollTextReveal";
|
||||
import { ThemeProvider } from "./theme/ThemeContext";
|
||||
import "./style/textReveal.css";
|
||||
|
||||
const THEME_STORAGE_KEY = "atmos-theme";
|
||||
|
||||
function App() {
|
||||
const location = useLocation();
|
||||
const routeContentRef = useRef(null);
|
||||
const [theme, setTheme] = useState(() => {
|
||||
if (typeof window === "undefined") return "dark";
|
||||
const storedTheme = window.localStorage.getItem(THEME_STORAGE_KEY);
|
||||
return storedTheme === "light" ? "light" : "dark";
|
||||
});
|
||||
const shouldFlushFooter =
|
||||
location.pathname === "/" || location.pathname.startsWith("/duft/");
|
||||
|
||||
useScrollTextReveal(routeContentRef, [location.pathname]);
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof document === "undefined") return;
|
||||
|
||||
document.body.classList.remove("theme-dark", "theme-light");
|
||||
document.body.classList.add(theme === "light" ? "theme-light" : "theme-dark");
|
||||
document.documentElement.style.colorScheme = theme === "light" ? "light" : "dark";
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
window.localStorage.setItem(THEME_STORAGE_KEY, theme);
|
||||
}
|
||||
}, [theme]);
|
||||
|
||||
const toggleTheme = () => {
|
||||
setTheme((currentTheme) => (currentTheme === "dark" ? "light" : "dark"));
|
||||
};
|
||||
|
||||
const isLight = theme === "light";
|
||||
|
||||
return (
|
||||
<>
|
||||
<ScrollToTop />
|
||||
<ThemeProvider value={{ theme, isLight, toggleTheme }}>
|
||||
<>
|
||||
<ScrollToTop />
|
||||
|
||||
<Routes>
|
||||
<Route path="/" element={<LandingPage />} />
|
||||
<Route path="/duft/:perfumeSlug" element={<ProductDetailPage />} />
|
||||
<Route path="/about" element={<AboutPage />} />
|
||||
<Route path="/impressum" element={<ImpressumPage />} />
|
||||
<Route path="/datenschutz" element={<DatenschutzPage />} />
|
||||
<Route path="/support" element={<SupportPage />} />
|
||||
<Route path="/discovery-set" element={<DiscoverySetPage />} />
|
||||
</Routes>
|
||||
<div ref={routeContentRef}>
|
||||
<Routes>
|
||||
<Route path="/" element={<LandingPage />} />
|
||||
<Route path="/duft/:perfumeSlug" element={<ProductDetailPage />} />
|
||||
<Route path="/about" element={<AboutPage />} />
|
||||
<Route path="/impressum" element={<ImpressumPage />} />
|
||||
<Route path="/datenschutz" element={<DatenschutzPage />} />
|
||||
<Route path="/support" element={<SupportPage />} />
|
||||
<Route path="/discovery-set" element={<DiscoverySetPage />} />
|
||||
<Route path="/small-batch" element={<SmallBatchPage />} />
|
||||
</Routes>
|
||||
</div>
|
||||
|
||||
<Footer />
|
||||
<SupportChatbot />
|
||||
</>
|
||||
<ShopDrawer />
|
||||
<CartToast />
|
||||
<Footer flushTop={shouldFlushFooter} />
|
||||
<SupportChatbot />
|
||||
</>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default App;
|
||||
@@ -0,0 +1,40 @@
|
||||
import { useShop } from "../shop/useShop";
|
||||
import "./ShopDrawer.css";
|
||||
|
||||
function CartToast() {
|
||||
const {
|
||||
cartToast,
|
||||
dismissToast,
|
||||
openCart,
|
||||
openProfile,
|
||||
} = useShop();
|
||||
|
||||
if (!cartToast) return null;
|
||||
|
||||
const runAction = () => {
|
||||
dismissToast();
|
||||
if (cartToast.actionPanel === "cart") {
|
||||
openCart();
|
||||
}
|
||||
if (cartToast.actionPanel === "profile") {
|
||||
openProfile();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="cart-toast">
|
||||
<button className="cart-toast-close" type="button" onClick={dismissToast}>
|
||||
x
|
||||
</button>
|
||||
<strong>{cartToast.title}</strong>
|
||||
<p>{cartToast.message}</p>
|
||||
{cartToast.actionLabel && (
|
||||
<button type="button" onClick={runAction}>
|
||||
{cartToast.actionLabel}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default CartToast;
|
||||
@@ -5,6 +5,10 @@
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.site-footer--flush {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.site-footer__inner {
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
@@ -77,4 +81,4 @@
|
||||
grid-template-columns: 1fr;
|
||||
padding: 24px 16px 28px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Link } from "react-router";
|
||||
import "./Footer.css";
|
||||
|
||||
function Footer() {
|
||||
function Footer({ flushTop = false }) {
|
||||
return (
|
||||
<footer className="site-footer">
|
||||
<footer className={`site-footer${flushTop ? " site-footer--flush" : ""}`}>
|
||||
<div className="site-footer__inner">
|
||||
<div className="site-footer__brand">
|
||||
<Link to="/" className="site-footer__logo">
|
||||
@@ -37,4 +37,4 @@ function Footer() {
|
||||
);
|
||||
}
|
||||
|
||||
export default Footer;
|
||||
export default Footer;
|
||||
@@ -2,18 +2,21 @@
|
||||
|
||||
.detail-page {
|
||||
min-height: 100vh;
|
||||
color: #1f1f1f;
|
||||
padding: 26px 38px 38px;
|
||||
color: var(--theme-text);
|
||||
padding: 26px 38px 0;
|
||||
background:
|
||||
linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1)),
|
||||
linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45));
|
||||
}
|
||||
|
||||
.detail-shell {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 0px;
|
||||
padding: 0 38px 38px;
|
||||
width: 100%;
|
||||
max-width: 1680px;
|
||||
margin: 0 auto;
|
||||
padding: 0 38px 0;
|
||||
}
|
||||
|
||||
/* --- Product Detail Page Wrapper End --- */
|
||||
@@ -27,7 +30,7 @@
|
||||
gap: 20px;
|
||||
min-height: 72px;
|
||||
padding: 18px 0;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
@@ -40,15 +43,15 @@
|
||||
}
|
||||
|
||||
.detail-topbar-label {
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #777;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.detail-topbar-name {
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.16em;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
/* --- Topbar End --- */
|
||||
@@ -62,9 +65,9 @@
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
letter-spacing: 0.01em;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
@@ -86,8 +89,8 @@
|
||||
|
||||
.detail-layout {
|
||||
display: grid;
|
||||
grid-template-columns: 1.02fr 1fr;
|
||||
gap: 28px;
|
||||
grid-template-columns: minmax(420px, 760px) minmax(0, 1fr);
|
||||
gap: 34px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
@@ -98,6 +101,9 @@
|
||||
.detail-gallery {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: 760px;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
.detail-main-image {
|
||||
@@ -126,7 +132,7 @@
|
||||
height: 92px;
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
background: #fff;
|
||||
background: var(--theme-paper);
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
@@ -165,19 +171,19 @@
|
||||
|
||||
.detail-meta-grid > div {
|
||||
padding: 14px 0 0;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.detail-meta-grid span {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.detail-meta-grid p {
|
||||
font-size: 14px;
|
||||
font-size: 15px;
|
||||
line-height: 1.55;
|
||||
margin: 0;
|
||||
}
|
||||
@@ -199,16 +205,16 @@
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
padding: 22px;
|
||||
background: #f1f1f1;
|
||||
border: 1px solid #dddddd;
|
||||
background: var(--theme-surface-soft);
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.detail-structure h3 {
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.24em;
|
||||
font-weight: 500;
|
||||
margin: 0;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.structure-block {
|
||||
@@ -218,7 +224,7 @@
|
||||
gap: 10px;
|
||||
padding: 14px 14px 14px 16px;
|
||||
background: rgba(255, 255, 255, 0.42);
|
||||
border: 1px solid #e1e1e1;
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.structure-block::before {
|
||||
@@ -231,11 +237,11 @@
|
||||
}
|
||||
|
||||
.structure-block:nth-of-type(1)::before {
|
||||
background: rgba(255, 106, 0, 0.22);
|
||||
background: #ffdecc;
|
||||
}
|
||||
|
||||
.structure-block:nth-of-type(2)::before {
|
||||
background: rgba(255, 106, 0, 0.45);
|
||||
background: #ffad80;
|
||||
}
|
||||
|
||||
.structure-block:nth-of-type(3)::before {
|
||||
@@ -245,9 +251,9 @@
|
||||
.structure-phase {
|
||||
display: block;
|
||||
margin-bottom: 0;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.18em;
|
||||
color: #555;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.structure-block:nth-of-type(1) .structure-phase {
|
||||
@@ -277,29 +283,32 @@
|
||||
min-width: 0;
|
||||
min-height: 42px;
|
||||
padding: 10px 12px;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
line-height: 1.25;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
border: 1px solid #d6d6d6;
|
||||
background: #f8f8f8;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.structure-block:nth-of-type(1) .structure-tag {
|
||||
background: rgba(255, 106, 0, 0.05);
|
||||
border-color: rgba(255, 106, 0, 0.16);
|
||||
background: var(--theme-paper);
|
||||
border-color: #f0e6df;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.structure-block:nth-of-type(2) .structure-tag {
|
||||
background: rgba(255, 106, 0, 0.08);
|
||||
border-color: rgba(255, 106, 0, 0.24);
|
||||
background: #fff5ed;
|
||||
border-color: #ffdecc;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.structure-block:nth-of-type(3) .structure-tag {
|
||||
background: rgba(255, 106, 0, 0.12);
|
||||
border-color: rgba(255, 106, 0, 0.32);
|
||||
background: #ffece0;
|
||||
border-color: #ffad80;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
/* --- Duftstruktur End --- */
|
||||
@@ -311,25 +320,21 @@
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
padding: 22px;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(255, 106, 0, 0.06),
|
||||
rgba(255, 106, 0, 0.02)
|
||||
);
|
||||
background: #fff8f5;
|
||||
border: 1px solid rgba(255, 106, 0, 0.18);
|
||||
}
|
||||
|
||||
.structure-info-label {
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.24em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.structure-info-box p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-size: 15px;
|
||||
line-height: 1.7;
|
||||
color: #3f3f3f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.structure-info-legend {
|
||||
@@ -344,9 +349,9 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.08em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.structure-info-dot {
|
||||
@@ -356,11 +361,11 @@
|
||||
}
|
||||
|
||||
.structure-info-dot--light {
|
||||
background: rgba(255, 106, 0, 0.25);
|
||||
background: #ffdecc;
|
||||
}
|
||||
|
||||
.structure-info-dot--mid {
|
||||
background: rgba(255, 106, 0, 0.5);
|
||||
background: #ffad80;
|
||||
}
|
||||
|
||||
.structure-info-dot--strong {
|
||||
@@ -381,20 +386,93 @@
|
||||
.mood-label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.2em;
|
||||
color: #555;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.mood-box p {
|
||||
font-size: 16px;
|
||||
line-height: 1.65;
|
||||
margin: 0;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
/* --- Mood Box End --- */
|
||||
|
||||
/* --- Accordion / Dropdown Components Start --- */
|
||||
|
||||
.accordion-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
margin-top: 26px;
|
||||
}
|
||||
|
||||
.accordion-item {
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
border-left: 3px solid #d9d9d9; /* Subtiler Rahmen im Normalzustand */
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
}
|
||||
|
||||
.accordion-item.is-open {
|
||||
border-left-color: #ff6a00; /* Farbabgleich: Orange, wenn offen */
|
||||
background: #fcfcfc;
|
||||
}
|
||||
|
||||
.accordion-toggle {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 18px 20px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.24em;
|
||||
font-weight: 500;
|
||||
color: var(--theme-text);
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.accordion-toggle:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.accordion-icon {
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
color: #ff6a00;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.accordion-content {
|
||||
padding: 0 20px 22px 20px;
|
||||
}
|
||||
|
||||
/* Bereinigung der alten Strukturen für die Dropdowns */
|
||||
.detail-structure-layout {
|
||||
margin-top: 6px; /* Angepasst für das Innere des Dropdowns */
|
||||
}
|
||||
|
||||
.detail-structure {
|
||||
background: transparent; /* Hintergrund wird jetzt vom Akkordeon gesteuert */
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.mood-box-content p {
|
||||
font-size: 16px;
|
||||
line-height: 1.65;
|
||||
margin: 0;
|
||||
color: var(--theme-text);
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
/* --- Accordion / Dropdown Components End --- */
|
||||
|
||||
/* --- Right Column Start --- */
|
||||
|
||||
.detail-info {
|
||||
@@ -402,6 +480,7 @@
|
||||
flex-direction: column;
|
||||
gap: 28px;
|
||||
padding-top: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.detail-heading {
|
||||
@@ -409,7 +488,7 @@
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid #e2e2e2;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.detail-heading-copy {
|
||||
@@ -420,9 +499,9 @@
|
||||
|
||||
.detail-kicker {
|
||||
display: inline-block;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.24em;
|
||||
color: #777;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.detail-heading h1 {
|
||||
@@ -431,14 +510,14 @@
|
||||
line-height: 0.92;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.045em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.detail-heading p {
|
||||
max-width: 520px;
|
||||
max-width: 640px;
|
||||
font-size: 18px;
|
||||
line-height: 1.45;
|
||||
color: #5f5f5f;
|
||||
color: var(--theme-text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@@ -451,9 +530,9 @@
|
||||
.label-title {
|
||||
display: block;
|
||||
margin-bottom: 0;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.24em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
/* --- Description Section Start --- */
|
||||
@@ -474,23 +553,23 @@
|
||||
|
||||
.detail-copy-block {
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.detail-copy-label {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.24em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.detail-copy-block p {
|
||||
white-space: pre-line;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
color: #1f1f1f;
|
||||
font-size: 16px;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
/* --- Description Section End --- */
|
||||
@@ -500,8 +579,8 @@
|
||||
.delivery-box {
|
||||
margin-top: 4px;
|
||||
padding: 20px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #efefef;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-bg);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
@@ -523,7 +602,7 @@
|
||||
padding: 0 10px;
|
||||
border: 1px solid #ff6a00;
|
||||
color: #ff6a00;
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.16em;
|
||||
}
|
||||
|
||||
@@ -542,20 +621,20 @@
|
||||
.delivery-item--full {
|
||||
grid-column: 1 / -1;
|
||||
padding-top: 4px;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.delivery-item-label {
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.2em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.delivery-item p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-size: 16px;
|
||||
line-height: 1.45;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
/* --- Delivery Box End --- */
|
||||
@@ -601,7 +680,7 @@
|
||||
}
|
||||
|
||||
.comment-card {
|
||||
border: 1px solid #d9d9d9;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: #ff6a0023;
|
||||
padding: 18px;
|
||||
display: flex;
|
||||
@@ -611,23 +690,23 @@
|
||||
}
|
||||
|
||||
.comment-card-title {
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.18em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.comment-card p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-size: 16px;
|
||||
line-height: 1.55;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.comment-card-author {
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.08em;
|
||||
color: #777;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
/* --- Comment Spotlight End --- */
|
||||
@@ -656,9 +735,9 @@
|
||||
|
||||
.review-section-text {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
font-size: 16px;
|
||||
line-height: 1.55;
|
||||
color: #5f5f5f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.review-section-main {
|
||||
@@ -673,7 +752,7 @@
|
||||
line-height: 1;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.review-summary-copy {
|
||||
@@ -684,15 +763,15 @@
|
||||
}
|
||||
|
||||
.review-stars {
|
||||
font-size: 14px;
|
||||
font-size: 15px;
|
||||
letter-spacing: 0.18em;
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.review-count {
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.08em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.review-panel {
|
||||
@@ -713,23 +792,23 @@
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
width: 100%;
|
||||
border: 1px solid #d9d9d9;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: transparent;
|
||||
padding: 12px 14px;
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.08em;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
cursor: pointer;
|
||||
transition: border-color 0.2s ease, background 0.2s ease;
|
||||
}
|
||||
|
||||
.review-toggle:hover {
|
||||
border-color: #bcbcbc;
|
||||
border-color: var(--theme-border);
|
||||
background: rgba(255, 255, 255, 0.45);
|
||||
}
|
||||
|
||||
.review-panel.is-open .review-toggle {
|
||||
border-color: #c8c8c8;
|
||||
border-color: var(--theme-border);
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
@@ -758,9 +837,9 @@
|
||||
right: 28px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #efefef;
|
||||
border-left: 1px solid #d9d9d9;
|
||||
border-top: 1px solid #d9d9d9;
|
||||
background: var(--theme-bg);
|
||||
border-left: 1px solid var(--theme-border);
|
||||
border-top: 1px solid var(--theme-border);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
@@ -769,8 +848,8 @@
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
padding: 16px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #efefef;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-bg);
|
||||
box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
@@ -782,9 +861,9 @@
|
||||
}
|
||||
|
||||
.review-detail-label {
|
||||
font-size: 10px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.18em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.review-detail-bar {
|
||||
@@ -802,16 +881,16 @@
|
||||
}
|
||||
|
||||
.review-detail-value {
|
||||
font-size: 12px;
|
||||
color: #1f1f1f;
|
||||
font-size: 13px;
|
||||
color: var(--theme-text);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.review-write-button {
|
||||
margin-top: 4px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #fff;
|
||||
color: #999;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-paper);
|
||||
color: var(--theme-text-muted);
|
||||
padding: 11px 14px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.08em;
|
||||
@@ -835,10 +914,10 @@
|
||||
align-items: center;
|
||||
min-height: 36px;
|
||||
padding: 8px 14px;
|
||||
border: 1px solid #d2d2d2;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 0px;
|
||||
background: transparent;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@@ -853,9 +932,9 @@
|
||||
}
|
||||
|
||||
.size-card {
|
||||
border: 1px solid #d0d0d0;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 0px;
|
||||
background: #fff;
|
||||
background: var(--theme-paper);
|
||||
padding: 20px 18px 18px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
@@ -864,7 +943,7 @@
|
||||
|
||||
.size-card:hover {
|
||||
transform: translateY(-1px);
|
||||
border-color: #bdbdbd;
|
||||
border-color: var(--theme-border);
|
||||
}
|
||||
|
||||
.size-card.active {
|
||||
@@ -874,9 +953,9 @@
|
||||
.size-title {
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.02em;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.size-card strong {
|
||||
@@ -888,8 +967,8 @@
|
||||
}
|
||||
|
||||
.size-card small {
|
||||
font-size: 11px;
|
||||
color: #6a6a6a;
|
||||
font-size: 12px;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
/* --- Size Selection End --- */
|
||||
@@ -910,16 +989,21 @@
|
||||
.discovery-note-text strong {
|
||||
display: block;
|
||||
margin-bottom: 6px;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.discovery-note-text p {
|
||||
font-size: 11px;
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
color: #d0d0d0;
|
||||
color: var(--theme-text-muted);
|
||||
margin: 0;
|
||||
max-width: 420px;
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.discovery-note-text .discount-preview {
|
||||
margin-top: 8px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.discovery-note-btn {
|
||||
@@ -972,6 +1056,23 @@
|
||||
background: rgba(255, 106, 0, 0.8);
|
||||
}
|
||||
|
||||
.restock-button {
|
||||
width: 100%;
|
||||
min-height: 48px;
|
||||
margin-top: 10px;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 0;
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.13em;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.restock-button:hover {
|
||||
outline: 1px solid #ff6a00;
|
||||
}
|
||||
|
||||
/* --- Discovery Hinweis + Kaufen Button End --- */
|
||||
|
||||
/* --- Bottom CTA Start --- */
|
||||
@@ -994,7 +1095,7 @@
|
||||
|
||||
.detail-bottom-cta p {
|
||||
margin-top: 18px;
|
||||
font-size: 15px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1012,7 +1113,7 @@
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease, opacity 0.2s ease;
|
||||
background: #fff;
|
||||
background: var(--theme-paper);
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
@@ -1034,6 +1135,15 @@
|
||||
.detail-structure-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.detail-layout {
|
||||
grid-template-columns: minmax(380px, 680px) minmax(0, 1fr);
|
||||
gap: 28px;
|
||||
}
|
||||
|
||||
.detail-gallery {
|
||||
max-width: 680px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
@@ -1041,6 +1151,10 @@
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.detail-gallery {
|
||||
width: min(100%, 720px);
|
||||
}
|
||||
|
||||
.detail-info {
|
||||
gap: 24px;
|
||||
}
|
||||
@@ -1055,6 +1169,18 @@
|
||||
}
|
||||
|
||||
@media (max-width: 700px) {
|
||||
.detail-page {
|
||||
padding: 18px 14px 0;
|
||||
}
|
||||
|
||||
.detail-shell {
|
||||
padding: 0 16px 0;
|
||||
}
|
||||
|
||||
.detail-layout {
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.detail-columns,
|
||||
.detail-meta-grid,
|
||||
.size-grid,
|
||||
@@ -1103,6 +1229,18 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.detail-bottom-cta {
|
||||
padding: 32px 20px;
|
||||
}
|
||||
|
||||
.detail-bottom-cta h2 {
|
||||
font-size: 34px;
|
||||
}
|
||||
|
||||
.detail-bottom-cta p {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.discovery-note {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
@@ -1144,9 +1282,23 @@
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.detail-page {
|
||||
padding: 12px 10px 0;
|
||||
}
|
||||
|
||||
.detail-shell {
|
||||
padding: 0 12px 0;
|
||||
}
|
||||
|
||||
.structure-tags-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.detail-bottom-cta {
|
||||
padding: 28px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* --- Responsive End --- */
|
||||
/* --- Responsive End --- */
|
||||
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { Link, useNavigate, useParams } from "react-router";
|
||||
import perfumes from "../data/perfumes";
|
||||
import "../style/navbar.css";
|
||||
import SharedNavbar from "./SharedNavbar";
|
||||
import { formatChf } from "../shop/money";
|
||||
import { useShop } from "../shop/useShop";
|
||||
import "./ProductDetailPage.css";
|
||||
|
||||
const priceToCents = (price) => {
|
||||
const match = String(price).match(/(\d+)/);
|
||||
return match ? Number(match[1]) * 100 : 0;
|
||||
};
|
||||
|
||||
function ProductDetailContent({ perfumeSlug }) {
|
||||
const navigate = useNavigate();
|
||||
const { addToCart, subscribeToProduct, user } = useShop();
|
||||
|
||||
const perfume = useMemo(
|
||||
() => perfumes.find((item) => item.slug === perfumeSlug) || perfumes[0],
|
||||
@@ -18,6 +26,22 @@ function ProductDetailContent({ perfumeSlug }) {
|
||||
const [selectedSize, setSelectedSize] = useState("sample");
|
||||
const [showReviewDetails, setShowReviewDetails] = useState(false);
|
||||
const [commentPage, setCommentPage] = useState(0);
|
||||
const [isStructureOpen, setIsStructureOpen] = useState(false);
|
||||
const [isMoodOpen, setIsMoodOpen] = useState(false);
|
||||
const selectedProductId = `${perfume.slug}-${selectedSize === "sample" ? "sample" : "full"}`;
|
||||
const selectedProductLabel = selectedSize === "sample" ? "Sample" : "Full Size";
|
||||
const selectedPriceCents = priceToCents(perfume.prices[selectedSize]);
|
||||
const sampleCredit = user?.sampleCredits?.find(
|
||||
(credit) => credit.slug === perfume.slug && credit.status === "available"
|
||||
);
|
||||
const discountPreviewCents =
|
||||
selectedSize === "full"
|
||||
? Math.min(
|
||||
selectedPriceCents,
|
||||
(user?.discoveryStatus === "Discount available" ? 4800 : 0) +
|
||||
(sampleCredit?.amount_cents || 0)
|
||||
)
|
||||
: 0;
|
||||
|
||||
const sizeOptions = [
|
||||
{
|
||||
@@ -71,22 +95,7 @@ function ProductDetailContent({ perfumeSlug }) {
|
||||
|
||||
return (
|
||||
<div className="detail-page">
|
||||
<nav className="navbar navbar--light">
|
||||
<div className="nav-pill">
|
||||
<Link to="/" className="nav-link">
|
||||
atmos
|
||||
</Link>
|
||||
<Link to="/#dufte" className="nav-link active">
|
||||
Düfte
|
||||
</Link>
|
||||
<Link to="/discovery-set" className="nav-link">
|
||||
Testen
|
||||
</Link>
|
||||
<a href="#cart" className="nav-link">
|
||||
Cart
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<SharedNavbar variant="light" />
|
||||
|
||||
<main className="detail-shell">
|
||||
<div className="detail-topbar">
|
||||
@@ -139,81 +148,112 @@ function ProductDetailContent({ perfumeSlug }) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="detail-structure-layout">
|
||||
<div className="detail-structure">
|
||||
<h3>DUFTSTRUKTUR</h3>
|
||||
{/* --- Accordion Group Start --- */}
|
||||
<div className="accordion-group">
|
||||
|
||||
{/* Dropdown: Duftstruktur */}
|
||||
<div className={`accordion-item ${isStructureOpen ? "is-open" : ""}`}>
|
||||
<button
|
||||
type="button"
|
||||
className="accordion-toggle"
|
||||
onClick={() => setIsStructureOpen(!isStructureOpen)}
|
||||
>
|
||||
<span>DUFTSTRUKTUR</span>
|
||||
<span className="accordion-icon">{isStructureOpen ? "−" : "+"}</span>
|
||||
</button>
|
||||
|
||||
{isStructureOpen && (
|
||||
<div className="accordion-content">
|
||||
<div className="detail-structure-layout">
|
||||
<div className="detail-structure">
|
||||
<div className="structure-block">
|
||||
<span className="structure-phase">PHASE 1: TOP NOTES (0–1 H)</span>
|
||||
<div className="structure-tags-grid">
|
||||
{perfume.phases.top.map((note) => (
|
||||
<span key={note} className="structure-tag">{note}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="structure-block">
|
||||
<span className="structure-phase">PHASE 1: TOP NOTES (0–1 H)</span>
|
||||
<div className="structure-tags-grid">
|
||||
{perfume.phases.top.map((note) => (
|
||||
<span key={note} className="structure-tag">
|
||||
{note}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="structure-block">
|
||||
<span className="structure-phase">PHASE 2: HEART NOTES (1–4 H)</span>
|
||||
<div className="structure-tags-grid">
|
||||
{perfume.phases.heart.map((note) => (
|
||||
<span key={note} className="structure-tag">{note}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="structure-block">
|
||||
<span className="structure-phase">PHASE 2: HEART NOTES (1–4 H)</span>
|
||||
<div className="structure-tags-grid">
|
||||
{perfume.phases.heart.map((note) => (
|
||||
<span key={note} className="structure-tag">
|
||||
{note}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="structure-block">
|
||||
<span className="structure-phase">PHASE 3: BASE NOTES (4 H+)</span>
|
||||
<div className="structure-tags-grid">
|
||||
{perfume.phases.base.map((note) => (
|
||||
<span key={note} className="structure-tag">{note}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="structure-block">
|
||||
<span className="structure-phase">PHASE 3: BASE NOTES (4 H+)</span>
|
||||
<div className="structure-tags-grid">
|
||||
{perfume.phases.base.map((note) => (
|
||||
<span key={note} className="structure-tag">
|
||||
{note}
|
||||
</span>
|
||||
))}
|
||||
<aside className="structure-info-box">
|
||||
<span className="structure-info-label">ZUR EINORDNUNG</span>
|
||||
<p>
|
||||
Die Duftstruktur zeigt, wie sich der Duft über die Zeit entfaltet:
|
||||
der erste Eindruck im Auftakt, die eigentliche Signatur im Herzen
|
||||
und die Spur, die lange auf Haut und Kleidung bleibt.
|
||||
</p>
|
||||
|
||||
<div className="structure-info-legend">
|
||||
<div>
|
||||
<span className="structure-info-dot structure-info-dot--light" />
|
||||
<span>Auftakt</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="structure-info-dot structure-info-dot--mid" />
|
||||
<span>Herz</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="structure-info-dot structure-info-dot--strong" />
|
||||
<span>Basis</span>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<aside className="structure-info-box">
|
||||
<span className="structure-info-label">ZUR EINORDNUNG</span>
|
||||
<p>
|
||||
Die Duftstruktur zeigt, wie sich der Duft über die Zeit entfaltet:
|
||||
der erste Eindruck im Auftakt, die eigentliche Signatur im Herzen
|
||||
und die Spur, die lange auf Haut und Kleidung bleibt.
|
||||
</p>
|
||||
|
||||
<div className="structure-info-legend">
|
||||
<div>
|
||||
<span className="structure-info-dot structure-info-dot--light" />
|
||||
<span>Auftakt</span>
|
||||
{/* Dropdown: Moodsetting */}
|
||||
<div className={`accordion-item ${isMoodOpen ? "is-open" : ""}`}>
|
||||
<button
|
||||
type="button"
|
||||
className="accordion-toggle"
|
||||
onClick={() => setIsMoodOpen(!isMoodOpen)}
|
||||
>
|
||||
<span>MOODSETTING</span>
|
||||
<span className="accordion-icon">{isMoodOpen ? "−" : "+"}</span>
|
||||
</button>
|
||||
|
||||
{isMoodOpen && (
|
||||
<div className="accordion-content">
|
||||
<div className="mood-box-content">
|
||||
<p>{perfume.mood}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<span className="structure-info-dot structure-info-dot--mid" />
|
||||
<span>Herz</span>
|
||||
</div>
|
||||
<div>
|
||||
<span className="structure-info-dot structure-info-dot--strong" />
|
||||
<span>Basis</span>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<div className="mood-box">
|
||||
<span className="mood-label">MOODSETTING</span>
|
||||
<p>{perfume.mood}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/* --- Accordion Group End --- */}
|
||||
</div>
|
||||
|
||||
<div className="detail-info">
|
||||
<div className="detail-heading">
|
||||
<div className="detail-heading" data-reveal-group>
|
||||
<div className="detail-heading-copy">
|
||||
<span className="detail-kicker">Edition 04</span>
|
||||
<h1>{perfume.name}</h1>
|
||||
<p>{perfume.shortText}</p>
|
||||
<span className="detail-kicker" data-reveal="fade">
|
||||
Edition 04
|
||||
</span>
|
||||
<h1 data-reveal="fade">{perfume.name}</h1>
|
||||
<p data-reveal="fade">{perfume.shortText}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -244,24 +284,48 @@ function ProductDetailContent({ perfumeSlug }) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="discovery-note">
|
||||
<div className="discovery-note-text">
|
||||
<strong>Discovery Set wird angerechnet</strong>
|
||||
<div className="discovery-note" data-reveal-group data-reveal-start="top 88%">
|
||||
<div className="discovery-note-text" data-reveal="fade">
|
||||
<strong>Discovery Set wird einmalig angerechnet</strong>
|
||||
<p>
|
||||
Hast du das Discovery Set gekauft, wird der volle Preis beim Kauf
|
||||
automatisch abgezogen.
|
||||
Nur das erste Discovery Set erzeugt CHF 48 Guthaben. Es wird
|
||||
einmal bei einem späteren Full-Size-Kauf automatisch abgezogen.
|
||||
</p>
|
||||
{discountPreviewCents > 0 && (
|
||||
<p className="discount-preview">
|
||||
Erwarteter Preis mit Rabatt:{" "}
|
||||
<strong>{formatChf(selectedPriceCents - discountPreviewCents)}</strong>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<Link to="/discovery-set" className="discovery-note-btn">
|
||||
<Link to="/discovery-set" className="discovery-note-btn" data-reveal="fade">
|
||||
Zum Set
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<button className="buy-button" type="button">
|
||||
<button
|
||||
className="buy-button"
|
||||
type="button"
|
||||
onClick={() =>
|
||||
addToCart(
|
||||
selectedProductId,
|
||||
1,
|
||||
`${perfume.name} ${selectedProductLabel} added.`
|
||||
).catch(() => {})
|
||||
}
|
||||
>
|
||||
KAUFEN
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="restock-button"
|
||||
type="button"
|
||||
onClick={() => subscribeToProduct(selectedProductId, "restock").catch(() => {})}
|
||||
>
|
||||
RESTOCK UPDATE ABONNIEREN
|
||||
</button>
|
||||
|
||||
<div className="detail-description-section">
|
||||
<span className="label-title">BESCHREIBUNG</span>
|
||||
|
||||
@@ -406,17 +470,29 @@ function ProductDetailContent({ perfumeSlug }) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="detail-bottom-cta">
|
||||
<h2>Lieber erst testen?</h2>
|
||||
<p>
|
||||
<section className="detail-bottom-cta" data-reveal-group>
|
||||
<h2 data-reveal="fade">Lieber erst testen?</h2>
|
||||
<p data-reveal="fade">
|
||||
Bestelle ein 2ml Sample für CHF 12 oder das komplette Discovery Set
|
||||
mit allen 6 Düften für CHF 48. Beide werden beim späteren Full-Size-Kauf
|
||||
vollständig angerechnet.
|
||||
</p>
|
||||
|
||||
<div className="detail-bottom-actions">
|
||||
<button type="button">SAMPLE BESTELLEN – CHF 12</button>
|
||||
<button type="button">DISCOVERY SET – CHF 48</button>
|
||||
<div className="detail-bottom-actions" data-reveal="fade">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() =>
|
||||
addToCart(`${perfume.slug}-sample`, 1, `${perfume.name} Sample added.`).catch(() => {})
|
||||
}
|
||||
>
|
||||
SAMPLE BESTELLEN – {perfume.prices.sample}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => addToCart("discovery-set", 1, "Discovery Set added.").catch(() => {})}
|
||||
>
|
||||
DISCOVERY SET – CHF 48
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@@ -430,4 +506,4 @@ function ProductDetailPage() {
|
||||
return <ProductDetailContent key={perfumeSlug} perfumeSlug={perfumeSlug} />;
|
||||
}
|
||||
|
||||
export default ProductDetailPage;
|
||||
export default ProductDetailPage;
|
||||
@@ -0,0 +1,52 @@
|
||||
import { Link } from "react-router";
|
||||
import { useShop } from "../shop/useShop";
|
||||
import { useTheme } from "../theme/ThemeContext";
|
||||
import "../style/navbar.css";
|
||||
|
||||
function SharedNavbar({ variant = "light", active = "" }) {
|
||||
const { cart, openCart, openProfile, user } = useShop();
|
||||
const { isLight, toggleTheme } = useTheme();
|
||||
const cartLabel =
|
||||
cart.total_quantity > 0 ? `Cart ${cart.total_quantity}` : "Cart";
|
||||
const logoSrc =
|
||||
variant === "hero" ? "/atmos-logo-light.svg" : "/atmos-logo-dark.svg";
|
||||
|
||||
return (
|
||||
<nav className={`navbar navbar--${variant}`} aria-label="Hauptnavigation">
|
||||
<div className="nav-pill">
|
||||
<Link
|
||||
to="/"
|
||||
className={`nav-link nav-link--brand ${active === "atmos" ? "active" : ""}`}
|
||||
aria-label="Atmos Startseite"
|
||||
>
|
||||
<img src={logoSrc} alt="" className="nav-brand-logo" />
|
||||
</Link>
|
||||
<Link
|
||||
to="/discovery-set"
|
||||
className={`nav-link ${active === "testen" ? "active" : ""}`}
|
||||
>
|
||||
Testen
|
||||
</Link>
|
||||
<button type="button" className="nav-link nav-button" onClick={openCart}>
|
||||
{cartLabel}
|
||||
</button>
|
||||
<button type="button" className="nav-link nav-button" onClick={openProfile}>
|
||||
{user ? "Profile" : "Profile"}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`nav-link nav-button nav-theme-switch ${isLight ? "is-light" : ""}`}
|
||||
onClick={toggleTheme}
|
||||
aria-label={isLight ? "Switch to dark mode" : "Switch to light mode"}
|
||||
aria-pressed={isLight}
|
||||
>
|
||||
<span className="nav-theme-switch__track" aria-hidden="true">
|
||||
<span className="nav-theme-switch__thumb" />
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
export default SharedNavbar;
|
||||
@@ -0,0 +1,497 @@
|
||||
.drawer-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 80;
|
||||
background: rgba(0, 0, 0, 0.58);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.22s ease;
|
||||
}
|
||||
|
||||
.drawer-backdrop.open {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.shop-drawer {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 90;
|
||||
width: min(560px, 100%);
|
||||
height: 100vh;
|
||||
padding: 22px;
|
||||
overflow-y: auto;
|
||||
background: var(--theme-surface);
|
||||
border-left: 1px solid var(--theme-border);
|
||||
color: var(--theme-text);
|
||||
transform: translateX(100%);
|
||||
transition: transform 0.24s ease;
|
||||
}
|
||||
|
||||
.shop-drawer.open {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
.drawer-top,
|
||||
.profile-section-header,
|
||||
.drawer-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.drawer-top {
|
||||
padding-bottom: 18px;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
margin-bottom: 18px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.24em;
|
||||
}
|
||||
|
||||
.drawer-top button,
|
||||
.cart-toast-close {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.drawer-stack,
|
||||
.auth-panel,
|
||||
.cart-items,
|
||||
.order-list,
|
||||
.requirements,
|
||||
.sample-credit-list,
|
||||
.subscription-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.drawer-section {
|
||||
padding: 18px;
|
||||
background: var(--theme-surface-soft);
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.drawer-section h2,
|
||||
.drawer-section h3,
|
||||
.drawer-section p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.drawer-kicker {
|
||||
display: block;
|
||||
margin-bottom: 12px;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.drawer-grid {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.drawer-grid--two,
|
||||
.profile-read-grid,
|
||||
.toggle-grid,
|
||||
.payment-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.shop-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 7px;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.shop-field input {
|
||||
width: 100%;
|
||||
min-height: 42px;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 0;
|
||||
background: var(--theme-surface-soft);
|
||||
padding: 10px 11px;
|
||||
color: var(--theme-text);
|
||||
font: inherit;
|
||||
letter-spacing: 0;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.drawer-primary,
|
||||
.drawer-secondary,
|
||||
.cart-remove,
|
||||
.pref-toggle,
|
||||
.payment-card,
|
||||
.cart-controls button,
|
||||
.cart-toast button {
|
||||
border-radius: 0;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.drawer-primary {
|
||||
width: 100%;
|
||||
min-height: 46px;
|
||||
border: 1px solid #1f1f1f;
|
||||
background: #1f1f1f;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.12em;
|
||||
}
|
||||
|
||||
.drawer-primary:disabled {
|
||||
opacity: 0.45;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.drawer-secondary {
|
||||
min-height: 38px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
padding: 0 13px;
|
||||
}
|
||||
|
||||
.drawer-link-primary {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.cart-item,
|
||||
.order-card,
|
||||
.read-block,
|
||||
.status-box,
|
||||
.requirement-row {
|
||||
background: var(--theme-surface-soft);
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.cart-item {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.cart-item h3 {
|
||||
margin-bottom: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.cart-item p,
|
||||
.drawer-muted,
|
||||
.order-card p {
|
||||
margin: 0;
|
||||
color: var(--theme-text-muted);
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.cart-controls {
|
||||
display: grid;
|
||||
grid-template-columns: 32px 32px 32px;
|
||||
align-items: center;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.cart-controls button {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.cart-controls span {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cart-remove {
|
||||
min-height: 34px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.payment-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-height: 60px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.payment-card span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 44px;
|
||||
height: 28px;
|
||||
background: #1f1f1f;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.payment-card.active {
|
||||
border-color: #ff6a00;
|
||||
background: rgba(255, 106, 0, 0.12);
|
||||
}
|
||||
|
||||
.totals-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.totals-box > div,
|
||||
.requirement-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.totals-box .discount-explainer {
|
||||
display: block;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.discount-explainer span {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.discount-explainer p {
|
||||
margin: 0;
|
||||
color: var(--theme-text);
|
||||
font-size: 13px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.discount-explainer p + p {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.total-row {
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.drawer-error {
|
||||
margin: 0;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.drawer-error {
|
||||
border-color: #ff6a00;
|
||||
}
|
||||
|
||||
.profile-head {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.profile-head h2 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.profile-read-grid {
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.read-block {
|
||||
padding: 13px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 7px;
|
||||
}
|
||||
|
||||
.read-block span,
|
||||
.requirement-row span,
|
||||
.totals-box span {
|
||||
color: var(--theme-text-muted);
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.status-box {
|
||||
padding: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sample-credit-list {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.sample-credit-list span {
|
||||
padding: 10px;
|
||||
background: var(--theme-surface-soft);
|
||||
border: 1px solid var(--theme-border);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.pref-toggle {
|
||||
min-height: 58px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.pref-toggle.active {
|
||||
border-color: #ff6a00;
|
||||
background: rgba(255, 106, 0, 0.12);
|
||||
}
|
||||
|
||||
.subscription-list {
|
||||
margin-top: 16px;
|
||||
padding-top: 16px;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.subscription-list-title {
|
||||
color: var(--theme-text-muted);
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.18em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.subscription-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.subscription-row div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.subscription-row span {
|
||||
color: var(--theme-text-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.subscription-row button {
|
||||
min-height: 34px;
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 0;
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
padding: 0 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.subscription-row button:hover {
|
||||
border-color: #ff6a00;
|
||||
}
|
||||
|
||||
.requirement-row {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.requirement-row strong.met {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.order-card {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.order-card div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.cart-toast {
|
||||
position: fixed;
|
||||
right: 22px;
|
||||
bottom: 22px;
|
||||
z-index: 100;
|
||||
width: min(360px, calc(100vw - 44px));
|
||||
padding: 18px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface);
|
||||
color: var(--theme-text);
|
||||
box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
|
||||
}
|
||||
|
||||
.cart-toast p {
|
||||
margin: 8px 38px 14px 0;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.cart-toast > button:last-child {
|
||||
min-height: 40px;
|
||||
width: 100%;
|
||||
border: 1px solid #1f1f1f;
|
||||
background: #1f1f1f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cart-toast > button.cart-toast-close:last-child {
|
||||
width: 34px;
|
||||
min-height: 34px;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.cart-toast-close {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.shop-drawer {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.drawer-grid--two,
|
||||
.profile-read-grid,
|
||||
.toggle-grid,
|
||||
.payment-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.cart-item {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,476 @@
|
||||
import { useState } from "react";
|
||||
import { Link } from "react-router";
|
||||
import { formatChf } from "../shop/money";
|
||||
import { useShop } from "../shop/useShop";
|
||||
import "./ShopDrawer.css";
|
||||
|
||||
const paymentMethods = [
|
||||
{ key: "Bill", badge: "BILL", label: "Bill" },
|
||||
{ key: "Card", badge: "CARD", label: "Card" },
|
||||
{ key: "Twint", badge: "TW", label: "Twint" },
|
||||
{ key: "PayPal", badge: "PP", label: "PayPal" },
|
||||
];
|
||||
|
||||
const notificationLabels = [
|
||||
["drops_enabled", "New Drops"],
|
||||
["restocks_enabled", "Restocks"],
|
||||
["small_batch_enabled", "Small Batch Releases"],
|
||||
["discovery_enabled", "Discovery Set Updates"],
|
||||
];
|
||||
|
||||
function Field({ label, value, onChange, type = "text", readOnly = false }) {
|
||||
return (
|
||||
<label className="shop-field">
|
||||
<span>{label}</span>
|
||||
<input
|
||||
type={type}
|
||||
value={value}
|
||||
readOnly={readOnly}
|
||||
onChange={(event) => onChange?.(event.target.value)}
|
||||
/>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
function AuthPanel() {
|
||||
const { busy, error, login, register } = useShop();
|
||||
const [mode, setMode] = useState("login");
|
||||
const [form, setForm] = useState({
|
||||
first_name: "",
|
||||
surname: "",
|
||||
email: "",
|
||||
password: "",
|
||||
});
|
||||
|
||||
const update = (key, value) => setForm((current) => ({ ...current, [key]: value }));
|
||||
|
||||
const submit = (event) => {
|
||||
event.preventDefault();
|
||||
if (mode === "login") {
|
||||
login({ email: form.email, password: form.password }).catch(() => {});
|
||||
return;
|
||||
}
|
||||
register(form).catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
<form className="drawer-section auth-panel" onSubmit={submit}>
|
||||
<span className="drawer-kicker">{mode === "login" ? "LOGIN" : "REGISTER"}</span>
|
||||
<h2>{mode === "login" ? "Welcome back." : "Create your atmos account."}</h2>
|
||||
|
||||
{mode === "register" && (
|
||||
<div className="drawer-grid drawer-grid--two">
|
||||
<Field label="Name" value={form.first_name} onChange={(value) => update("first_name", value)} />
|
||||
<Field label="Surname" value={form.surname} onChange={(value) => update("surname", value)} />
|
||||
</div>
|
||||
)}
|
||||
|
||||
<Field label="Email address" value={form.email} onChange={(value) => update("email", value)} />
|
||||
<Field
|
||||
label="Password"
|
||||
type="password"
|
||||
value={form.password}
|
||||
onChange={(value) => update("password", value)}
|
||||
/>
|
||||
|
||||
{error && <p className="drawer-error">{error}</p>}
|
||||
|
||||
<button className="drawer-primary" type="submit" disabled={busy}>
|
||||
{mode === "login" ? "Login" : "Register"}
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="drawer-secondary"
|
||||
type="button"
|
||||
onClick={() => setMode((current) => (current === "login" ? "register" : "login"))}
|
||||
>
|
||||
{mode === "login" ? "Create account" : "Use existing account"}
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
function CartPanel() {
|
||||
const {
|
||||
cart,
|
||||
checkout,
|
||||
removeCartItem,
|
||||
updateCartQuantity,
|
||||
busy,
|
||||
error,
|
||||
user,
|
||||
} = useShop();
|
||||
const [address, setAddress] = useState(() => ({
|
||||
street_name: user?.street_name || "",
|
||||
house_number: user?.house_number || "",
|
||||
zip_code: user?.zip_code || "",
|
||||
city: user?.city || "",
|
||||
}));
|
||||
const [paymentMethod, setPaymentMethod] = useState("Bill");
|
||||
|
||||
const updateAddress = (key, value) =>
|
||||
setAddress((current) => ({ ...current, [key]: value }));
|
||||
|
||||
const submit = (event) => {
|
||||
event.preventDefault();
|
||||
checkout({ ...address, payment_method: paymentMethod }).catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
<form className="drawer-stack" onSubmit={submit}>
|
||||
<section className="drawer-section">
|
||||
<span className="drawer-kicker">CART</span>
|
||||
{cart.items.length === 0 ? (
|
||||
<p className="drawer-muted">Your cart is empty.</p>
|
||||
) : (
|
||||
<div className="cart-items">
|
||||
{cart.items.map((item) => (
|
||||
<article className="cart-item" key={item.product_id}>
|
||||
<div>
|
||||
<h3>{item.product.name}</h3>
|
||||
<p>
|
||||
{item.product.size_label} · {formatChf(item.product.price_cents)}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="cart-controls">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => updateCartQuantity(item.product_id, item.quantity - 1)}
|
||||
>
|
||||
-
|
||||
</button>
|
||||
<span>{item.quantity}</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => updateCartQuantity(item.product_id, item.quantity + 1)}
|
||||
>
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button
|
||||
className="cart-remove"
|
||||
type="button"
|
||||
onClick={() => removeCartItem(item.product_id)}
|
||||
>
|
||||
Remove
|
||||
</button>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<section className="drawer-section">
|
||||
<span className="drawer-kicker">SHIPPING</span>
|
||||
<div className="drawer-grid drawer-grid--two">
|
||||
<Field label="Street Name" value={address.street_name} onChange={(value) => updateAddress("street_name", value)} />
|
||||
<Field label="House Number" value={address.house_number} onChange={(value) => updateAddress("house_number", value)} />
|
||||
<Field label="ZIP Code" value={address.zip_code} onChange={(value) => updateAddress("zip_code", value)} />
|
||||
<Field label="City" value={address.city} onChange={(value) => updateAddress("city", value)} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="drawer-section">
|
||||
<span className="drawer-kicker">PAYMENT</span>
|
||||
<div className="payment-grid">
|
||||
{paymentMethods.map((method) => (
|
||||
<button
|
||||
type="button"
|
||||
className={`payment-card ${paymentMethod === method.key ? "active" : ""}`}
|
||||
key={method.key}
|
||||
onClick={() => setPaymentMethod(method.key)}
|
||||
>
|
||||
<span>{method.badge}</span>
|
||||
<strong>{method.label}</strong>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="drawer-section totals-box">
|
||||
<div>
|
||||
<span>Subtotal</span>
|
||||
<strong>{formatChf(cart.subtotal_cents)}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>Rabatte</span>
|
||||
<strong>-{formatChf(cart.discount_cents)}</strong>
|
||||
</div>
|
||||
{cart.discounts?.length > 0 && (
|
||||
<div className="discount-explainer">
|
||||
<span>Applied automatically</span>
|
||||
{cart.discounts.map((discount) => (
|
||||
<p key={`${discount.type}-${discount.creditId}`}>
|
||||
<strong>{formatChf(discount.amount_cents)}</strong>
|
||||
{" - "}
|
||||
{discount.type === "discovery"
|
||||
? "Discovery Set credit for a full-size bottle"
|
||||
: `Sample credit for ${discount.slug}`}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<div className="total-row">
|
||||
<span>Total</span>
|
||||
<strong>{formatChf(cart.total_cents)}</strong>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{error && <p className="drawer-error">{error}</p>}
|
||||
|
||||
<button className="drawer-primary" type="submit" disabled={busy || cart.items.length === 0}>
|
||||
Checkout
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
function RequirementRow({ label, met, children }) {
|
||||
return (
|
||||
<div className="requirement-row">
|
||||
<span>{label}</span>
|
||||
<strong className={met ? "met" : ""}>{children || (met ? "met" : "open")}</strong>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ProfilePanel() {
|
||||
const {
|
||||
busy,
|
||||
error,
|
||||
logout,
|
||||
orders,
|
||||
removeProductSubscription,
|
||||
updateNotifications,
|
||||
updateProfile,
|
||||
user,
|
||||
closePanel,
|
||||
} = useShop();
|
||||
const [editing, setEditing] = useState(false);
|
||||
const [form, setForm] = useState(user || {});
|
||||
|
||||
const update = (key, value) => setForm((current) => ({ ...current, [key]: value }));
|
||||
const notifications = user?.notifications || {};
|
||||
const restockSubscriptions = (user?.productSubscriptions || []).filter(
|
||||
(subscription) => subscription.type === "restock"
|
||||
);
|
||||
const loyalty = user?.loyaltyStatus || {
|
||||
hasDiscoverySet: false,
|
||||
hasFullSize: false,
|
||||
purchases: 0,
|
||||
spent_cents: 0,
|
||||
unlocked: false,
|
||||
};
|
||||
|
||||
const save = () => {
|
||||
updateProfile({
|
||||
first_name: form.first_name,
|
||||
surname: form.surname,
|
||||
street_name: form.street_name,
|
||||
house_number: form.house_number,
|
||||
zip_code: form.zip_code,
|
||||
city: form.city,
|
||||
birthdate: form.birthdate,
|
||||
})
|
||||
.then(() => setEditing(false))
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
const togglePreference = (key) => {
|
||||
updateNotifications({ ...notifications, [key]: !notifications[key] }).catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="drawer-stack">
|
||||
<section className="drawer-section profile-head">
|
||||
<span className="drawer-kicker">PROFILE</span>
|
||||
<h2>Hi, {user.first_name}</h2>
|
||||
<button className="drawer-secondary" type="button" onClick={logout}>
|
||||
Logout
|
||||
</button>
|
||||
</section>
|
||||
|
||||
<section className="drawer-section">
|
||||
<div className="profile-section-header">
|
||||
<span className="drawer-kicker">PROFILE INFORMATION</span>
|
||||
{!editing && (
|
||||
<button className="drawer-secondary" type="button" onClick={() => setEditing(true)}>
|
||||
Profil bearbeiten
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{editing ? (
|
||||
<>
|
||||
<div className="drawer-grid drawer-grid--two">
|
||||
<Field label="Name" value={form.first_name || ""} onChange={(value) => update("first_name", value)} />
|
||||
<Field label="Surname" value={form.surname || ""} onChange={(value) => update("surname", value)} />
|
||||
<Field label="Street Name" value={form.street_name || ""} onChange={(value) => update("street_name", value)} />
|
||||
<Field label="House Number" value={form.house_number || ""} onChange={(value) => update("house_number", value)} />
|
||||
<Field label="ZIP Code" value={form.zip_code || ""} onChange={(value) => update("zip_code", value)} />
|
||||
<Field label="City" value={form.city || ""} onChange={(value) => update("city", value)} />
|
||||
<Field label="Birthdate" type="date" value={form.birthdate || ""} onChange={(value) => update("birthdate", value)} />
|
||||
</div>
|
||||
<div className="drawer-actions">
|
||||
<button className="drawer-primary" type="button" disabled={busy} onClick={save}>
|
||||
Save profile
|
||||
</button>
|
||||
<button
|
||||
className="drawer-secondary"
|
||||
type="button"
|
||||
onClick={() => {
|
||||
setForm(user);
|
||||
setEditing(false);
|
||||
}}
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<div className="profile-read-grid">
|
||||
<ReadBlock label="Name" value={user.first_name} />
|
||||
<ReadBlock label="Surname" value={user.surname} />
|
||||
<ReadBlock label="Street Name" value={user.street_name || "-"} />
|
||||
<ReadBlock label="House Number" value={user.house_number || "-"} />
|
||||
<ReadBlock label="ZIP Code" value={user.zip_code || "-"} />
|
||||
<ReadBlock label="City" value={user.city || "-"} />
|
||||
<ReadBlock label="Birthdate" value={user.birthdate || "-"} />
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<section className="drawer-section">
|
||||
<span className="drawer-kicker">DISCOUNT STATUS</span>
|
||||
<div className="status-box">{user.discoveryStatus}</div>
|
||||
{user.sampleCredits?.length > 0 && (
|
||||
<div className="sample-credit-list">
|
||||
{user.sampleCredits.map((credit) => (
|
||||
<span key={`${credit.slug}-${credit.created_at}`}>
|
||||
{credit.slug}: {credit.status}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<section className="drawer-section">
|
||||
<span className="drawer-kicker">DROP / RESTOCK PREFERENCES</span>
|
||||
<div className="toggle-grid">
|
||||
{notificationLabels.map(([key, label]) => (
|
||||
<button
|
||||
key={key}
|
||||
type="button"
|
||||
className={`pref-toggle ${notifications[key] ? "active" : ""}`}
|
||||
onClick={() => togglePreference(key)}
|
||||
>
|
||||
<span>{label}</span>
|
||||
<strong>{notifications[key] ? "Active" : "Inactive"}</strong>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="subscription-list">
|
||||
<span className="subscription-list-title">Subscribed Restocks</span>
|
||||
{restockSubscriptions.length === 0 ? (
|
||||
<p className="drawer-muted">No product-specific restock updates yet.</p>
|
||||
) : (
|
||||
restockSubscriptions.map((subscription) => (
|
||||
<article className="subscription-row" key={subscription.id}>
|
||||
<div>
|
||||
<strong>{subscription.name}</strong>
|
||||
<span>{subscription.size_label}</span>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => removeProductSubscription(subscription.id).catch(() => {})}
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</article>
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="drawer-section">
|
||||
<span className="drawer-kicker">SMALL BATCH ACCESS</span>
|
||||
<div className="status-box">{loyalty.unlocked ? "Unlocked" : "Locked"}</div>
|
||||
<div className="requirements">
|
||||
<RequirementRow label="Discovery Set" met={loyalty.hasDiscoverySet} />
|
||||
<RequirementRow label="Full Size" met={loyalty.hasFullSize} />
|
||||
<RequirementRow label="Purchases" met={loyalty.purchases >= 3}>
|
||||
{loyalty.purchases}/3 Purchases
|
||||
</RequirementRow>
|
||||
<RequirementRow label="Spend" met={loyalty.spent_cents > 50000}>
|
||||
{formatChf(loyalty.spent_cents)} / CHF 500+
|
||||
</RequirementRow>
|
||||
</div>
|
||||
<Link
|
||||
className="drawer-primary drawer-link-primary"
|
||||
to="/small-batch"
|
||||
onClick={closePanel}
|
||||
>
|
||||
Small Batch ansehen
|
||||
</Link>
|
||||
</section>
|
||||
|
||||
<section className="drawer-section">
|
||||
<span className="drawer-kicker">PURCHASES</span>
|
||||
{orders.length === 0 ? (
|
||||
<p className="drawer-muted">No orders yet.</p>
|
||||
) : (
|
||||
<div className="order-list">
|
||||
{orders.map((order) => (
|
||||
<article className="order-card" key={order.id}>
|
||||
<div>
|
||||
<strong>Order #{order.id}</strong>
|
||||
<span>{new Date(order.created_at).toLocaleDateString("de-CH")}</span>
|
||||
</div>
|
||||
<p>{order.items.map((item) => `${item.quantity} x ${item.product.name}`).join(", ")}</p>
|
||||
<strong>{formatChf(order.total_cents)}</strong>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
{error && <p className="drawer-error">{error}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ReadBlock({ label, value }) {
|
||||
return (
|
||||
<div className="read-block">
|
||||
<span>{label}</span>
|
||||
<strong>{value}</strong>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function ShopDrawer() {
|
||||
const { closePanel, panelOpen, panelType, user } = useShop();
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={`drawer-backdrop ${panelOpen ? "open" : ""}`}
|
||||
onClick={closePanel}
|
||||
/>
|
||||
<aside className={`shop-drawer ${panelOpen ? "open" : ""}`} aria-hidden={!panelOpen}>
|
||||
<div className="drawer-top">
|
||||
<span>{!user ? "ACCOUNT" : panelType === "cart" ? "CART" : "PROFILE"}</span>
|
||||
<button type="button" onClick={closePanel} aria-label="Close panel">
|
||||
x
|
||||
</button>
|
||||
</div>
|
||||
{!user ? <AuthPanel /> : panelType === "cart" ? <CartPanel /> : <ProfilePanel />}
|
||||
</aside>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default ShopDrawer;
|
||||
@@ -34,8 +34,8 @@
|
||||
z-index: 1199;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -46,7 +46,7 @@
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 18px 18px 16px;
|
||||
border-bottom: 1px solid #dcdcdc;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
background: #1f1f1f;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
background: #f5f5f5;
|
||||
background: var(--theme-surface);
|
||||
}
|
||||
|
||||
.chatbot-message {
|
||||
@@ -100,9 +100,9 @@
|
||||
|
||||
.chatbot-message--bot {
|
||||
align-self: flex-start;
|
||||
background: #ececec;
|
||||
color: #1f1f1f;
|
||||
border: 1px solid #dddddd;
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.chatbot-message--user {
|
||||
@@ -112,22 +112,22 @@
|
||||
}
|
||||
|
||||
.chatbot-message--typing {
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.chatbot-quick-actions {
|
||||
padding: 14px 18px 16px;
|
||||
border-top: 1px solid #dcdcdc;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
background: #fafafa;
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.chatbot-chip {
|
||||
border: 1px solid #d6d6d6;
|
||||
background: #fff;
|
||||
color: #1f1f1f;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-paper);
|
||||
color: var(--theme-text);
|
||||
padding: 9px 12px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
@@ -136,13 +136,13 @@
|
||||
|
||||
.chatbot-chip:hover {
|
||||
transform: translateY(-1px);
|
||||
border-color: #bcbcbc;
|
||||
border-color: var(--theme-border);
|
||||
}
|
||||
|
||||
.chatbot-footer {
|
||||
padding: 14px 18px 18px;
|
||||
border-top: 1px solid #dcdcdc;
|
||||
background: #fff;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
background: var(--theme-paper);
|
||||
}
|
||||
|
||||
.chatbot-form {
|
||||
@@ -153,8 +153,8 @@
|
||||
|
||||
.chatbot-input {
|
||||
width: 100%;
|
||||
border: 1px solid #d3d3d3;
|
||||
background: #fff;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-paper);
|
||||
padding: 12px 14px;
|
||||
font-size: 14px;
|
||||
outline: none;
|
||||
@@ -191,13 +191,13 @@
|
||||
}
|
||||
|
||||
.chatbot-link--muted {
|
||||
color: #777;
|
||||
color: var(--theme-text-muted);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.chatbot-action-area {
|
||||
border-top: 1px solid #dcdcdc;
|
||||
background: #fafafa;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.chatbot-section {
|
||||
@@ -205,7 +205,7 @@
|
||||
}
|
||||
|
||||
.chatbot-section + .chatbot-section {
|
||||
border-top: 1px solid #e2e2e2;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.chatbot-section-label {
|
||||
@@ -213,7 +213,7 @@
|
||||
margin-bottom: 10px;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.chatbot-feedback-actions {
|
||||
@@ -223,9 +223,9 @@
|
||||
}
|
||||
|
||||
.chatbot-feedback-btn {
|
||||
border: 1px solid #d6d6d6;
|
||||
background: #fff;
|
||||
color: #1f1f1f;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-paper);
|
||||
color: var(--theme-text);
|
||||
padding: 10px 14px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
@@ -234,7 +234,7 @@
|
||||
|
||||
.chatbot-feedback-btn:hover {
|
||||
transform: translateY(-1px);
|
||||
border-color: #bcbcbc;
|
||||
border-color: var(--theme-border);
|
||||
}
|
||||
|
||||
.chatbot-feedback-btn--primary {
|
||||
@@ -272,4 +272,5 @@
|
||||
.chatbot-header-copy h3 {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import { Link } from "react-router";
|
||||
import IntroOverlay from "./IntroOverlay";
|
||||
import SharedNavbar from "../SharedNavbar";
|
||||
|
||||
function HeroSection({
|
||||
heroImageWrapRef,
|
||||
heroImageRef,
|
||||
setHeadlinePrimaryRef,
|
||||
setHeadlineSecondaryRef,
|
||||
setDescriptionRef,
|
||||
setActionsRef,
|
||||
overlayRef,
|
||||
overlayTextRef,
|
||||
}) {
|
||||
return (
|
||||
<header className="hero" id="home">
|
||||
<div className="hero-media" ref={heroImageWrapRef}>
|
||||
<img
|
||||
src="/atmos-hero-image.png"
|
||||
alt="Atmos Hero"
|
||||
className="hero-media__image"
|
||||
ref={heroImageRef}
|
||||
loading="eager"
|
||||
fetchPriority="high"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<SharedNavbar variant="hero" active="atmos" />
|
||||
|
||||
<div className="hero-content">
|
||||
<h1 className="hero-title">
|
||||
<span className="hero-title-line">
|
||||
<span className="reveal-line" ref={setHeadlinePrimaryRef}>
|
||||
{"D\u00DCFTE ALS"}
|
||||
</span>
|
||||
</span>
|
||||
<span className="hero-title-line">
|
||||
<span className="reveal-line" ref={setHeadlineSecondaryRef}>
|
||||
AUSDRUCK
|
||||
</span>
|
||||
</span>
|
||||
</h1>
|
||||
|
||||
<p className="hero-text" ref={setDescriptionRef}>
|
||||
{
|
||||
"Konzeptionelle D\u00FCfte zwischen Materialit\u00E4t, Raum und Charakter."
|
||||
}
|
||||
</p>
|
||||
|
||||
<div className="hero-actions" ref={setActionsRef}>
|
||||
<a href="#dufte" className="btn btn-primary">
|
||||
{"Aktuelle D\u00FCfte"}
|
||||
</a>
|
||||
<Link to="/discovery-set" className="btn btn-secondary">
|
||||
Discovery Set
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<IntroOverlay
|
||||
overlayRef={overlayRef}
|
||||
overlayTextRef={overlayTextRef}
|
||||
logoSrc="/atmos-logo-dark.svg"
|
||||
/>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
export default HeroSection;
|
||||
@@ -0,0 +1,15 @@
|
||||
function IntroOverlay({ overlayRef, overlayTextRef, logoSrc }) {
|
||||
return (
|
||||
<div className="intro-overlay" ref={overlayRef} aria-hidden="true">
|
||||
<div className="intro-overlay__inner">
|
||||
<div className="intro-overlay__text-mask">
|
||||
<div className="intro-overlay__logo" ref={overlayTextRef}>
|
||||
<img src={logoSrc} alt="atmos" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default IntroOverlay;
|
||||
@@ -3,7 +3,7 @@ const perfumes = [
|
||||
id: "01",
|
||||
slug: "kalter-beton",
|
||||
name: "KALTER BETON",
|
||||
image: "/kalter-beton-product.png",
|
||||
image: "/kalter-beton-product-image.png",
|
||||
fillImage: "/platzhalter.png",
|
||||
fillVideo: "/kalter-beton-hover.webm",
|
||||
text: "Mineralisch. Roh. Unberührt.",
|
||||
@@ -26,9 +26,9 @@ const perfumes = [
|
||||
concentration: "Eau de Parfum (18%)",
|
||||
edition: "Batch 04/24",
|
||||
gallery: [
|
||||
"/kalter-beton-product.png",
|
||||
"/kalter-beton-product.png",
|
||||
"/kalter-beton-product.png",
|
||||
"/kalter-beton-product-image.png",
|
||||
"/kalter-beton-product-sample-image.png",
|
||||
"/kalter-beton-product-image.png",
|
||||
],
|
||||
reviews: {
|
||||
score: 4.8,
|
||||
@@ -83,7 +83,7 @@ const perfumes = [
|
||||
id: "02",
|
||||
slug: "nasser-marmor",
|
||||
name: "NASSER MARMOR",
|
||||
image: "/NASSER MARMOR.png",
|
||||
image: "/nasser-marmor-product-image.png",
|
||||
fillImage: "/platzhalter.png",
|
||||
fillVideo: "/nasser-marmor-hover.webm",
|
||||
text: "Kühl. Glatt. Sinnlich.",
|
||||
@@ -106,9 +106,9 @@ const perfumes = [
|
||||
concentration: "Eau de Parfum (17%)",
|
||||
edition: "Batch 02/24",
|
||||
gallery: [
|
||||
"/NASSER MARMOR.png",
|
||||
"/NASSER MARMOR.png",
|
||||
"/NASSER MARMOR.png",
|
||||
"/nasser-marmor-product-image.png",
|
||||
"/nasser-marmor-product-sample-image.png",
|
||||
"/nasser-marmor-product-image.png",
|
||||
],
|
||||
reviews: {
|
||||
score: 4.7,
|
||||
@@ -163,7 +163,7 @@ const perfumes = [
|
||||
id: "03",
|
||||
slug: "blasse-seide",
|
||||
name: "BLASSE SEIDE",
|
||||
image: "/BLASSE SEIDE.png",
|
||||
image: "/blasse-seide-product-image.png",
|
||||
fillImage: "/platzhalter.png",
|
||||
fillVideo: "/blasse-seide-hover.webm",
|
||||
text: "Blass. Sanft. Kostbar.",
|
||||
@@ -186,9 +186,9 @@ const perfumes = [
|
||||
concentration: "Eau de Parfum (16%)",
|
||||
edition: "Batch 03/24",
|
||||
gallery: [
|
||||
"/BLASSE SEIDE.png",
|
||||
"/BLASSE SEIDE.png",
|
||||
"/BLASSE SEIDE.png",
|
||||
"/blasse-seide-product-image.png",
|
||||
"/blasse-seide-product-sample-image.png",
|
||||
"/blasse-seide-product-image.png",
|
||||
],
|
||||
reviews: {
|
||||
score: 4.6,
|
||||
@@ -243,7 +243,7 @@ const perfumes = [
|
||||
id: "04",
|
||||
slug: "weisse-asche",
|
||||
name: "WEISSE ASCHE",
|
||||
image: "/WEISSE ASCHE.png",
|
||||
image: "/weisse-asche-product-image.png",
|
||||
fillImage: "/platzhalter.png",
|
||||
fillVideo: "/weisse-asche-hover.webm",
|
||||
text: "Still. Staubig. Erhaben.",
|
||||
@@ -266,9 +266,9 @@ const perfumes = [
|
||||
concentration: "Eau de Parfum (19%)",
|
||||
edition: "Batch 01/24",
|
||||
gallery: [
|
||||
"/WEISSE ASCHE.png",
|
||||
"/WEISSE ASCHE.png",
|
||||
"/WEISSE ASCHE.png",
|
||||
"/weisse-asche-product-image.png",
|
||||
"/weisse-asche-product-sample-image.png",
|
||||
"/weisse-asche-product-image.png",
|
||||
],
|
||||
reviews: {
|
||||
score: 4.7,
|
||||
@@ -323,7 +323,7 @@ const perfumes = [
|
||||
id: "05",
|
||||
slug: "verbranntes-chrom",
|
||||
name: "VERBRANNTES CHROM",
|
||||
image: "/VERBRANNTES CHROM.png",
|
||||
image: "/verbranntes-chrom-product-image.png",
|
||||
fillImage: "/platzhalter.png",
|
||||
fillVideo: "/verbranntes-chrom-hover.webm",
|
||||
text: "Metallisch. Verzehrt. Edel.",
|
||||
@@ -346,9 +346,9 @@ const perfumes = [
|
||||
concentration: "Extrait de Parfum (24%)",
|
||||
edition: "Batch 05/24",
|
||||
gallery: [
|
||||
"/VERBRANNTES CHROM.png",
|
||||
"/VERBRANNTES CHROM.png",
|
||||
"/VERBRANNTES CHROM.png",
|
||||
"/verbranntes-chrom-product-image.png",
|
||||
"/verbranntes-chrom-product-sample-image.png",
|
||||
"/verbranntes-chrom-product-image.png",
|
||||
],
|
||||
reviews: {
|
||||
score: 4.9,
|
||||
@@ -403,7 +403,7 @@ const perfumes = [
|
||||
id: "06",
|
||||
slug: "schwarzes-benzin",
|
||||
name: "SCHWARZES BENZIN",
|
||||
image: "/SCHWARZES BENZIN.png",
|
||||
image: "/schwarzes-benzin-product-image.png",
|
||||
fillImage: "/platzhalter.png",
|
||||
fillVideo: "/schwarzes-benzin-hover.webm",
|
||||
text: "Dunkel. Glänzend. Verboten.",
|
||||
@@ -426,9 +426,9 @@ const perfumes = [
|
||||
concentration: "Eau de Parfum (20%)",
|
||||
edition: "Batch 06/24",
|
||||
gallery: [
|
||||
"/SCHWARZES BENZIN.png",
|
||||
"/SCHWARZES BENZIN.png",
|
||||
"/SCHWARZES BENZIN.png",
|
||||
"/schwarzes-benzin-product-image.png",
|
||||
"/schwarzes-benzin-product-sample-image.png",
|
||||
"/schwarzes-benzin-product-image.png",
|
||||
],
|
||||
reviews: {
|
||||
score: 4.8,
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
import { useLayoutEffect } from "react";
|
||||
import { gsap } from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
|
||||
let pluginsRegistered = false;
|
||||
|
||||
const registerGsap = () => {
|
||||
if (!pluginsRegistered) {
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
pluginsRegistered = true;
|
||||
}
|
||||
};
|
||||
|
||||
const createRevealLines = (element) => {
|
||||
if (!element) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (element.dataset.revealPrepared === "true") {
|
||||
return Array.from(element.querySelectorAll(".reveal-line"));
|
||||
}
|
||||
|
||||
const originalHtml = element.innerHTML;
|
||||
const segments = originalHtml
|
||||
.split(/<br\s*\/?>/i)
|
||||
.map((segment) => segment.trim())
|
||||
.filter(Boolean);
|
||||
|
||||
if (segments.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
element.dataset.revealPrepared = "true";
|
||||
element.dataset.revealOriginalHtml = originalHtml;
|
||||
element.innerHTML = segments
|
||||
.map(
|
||||
(segment) =>
|
||||
`<span class="reveal-line-mask"><span class="reveal-line">${segment}</span></span>`
|
||||
)
|
||||
.join("");
|
||||
|
||||
return Array.from(element.querySelectorAll(".reveal-line"));
|
||||
};
|
||||
|
||||
const restoreRevealLines = (element) => {
|
||||
if (!element || element.dataset.revealPrepared !== "true") {
|
||||
return;
|
||||
}
|
||||
|
||||
const originalHtml = element.dataset.revealOriginalHtml;
|
||||
|
||||
if (originalHtml) {
|
||||
element.innerHTML = originalHtml;
|
||||
}
|
||||
|
||||
delete element.dataset.revealPrepared;
|
||||
delete element.dataset.revealOriginalHtml;
|
||||
};
|
||||
|
||||
function useScrollTextReveal(scopeRef, deps = []) {
|
||||
useLayoutEffect(() => {
|
||||
const scope = scopeRef.current;
|
||||
|
||||
if (!scope || typeof window === "undefined") {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
registerGsap();
|
||||
|
||||
const preparedElements = [];
|
||||
const ctx = gsap.context(() => {
|
||||
const groups = gsap.utils.toArray("[data-reveal-group]");
|
||||
|
||||
groups.forEach((group) => {
|
||||
const items = Array.from(group.querySelectorAll("[data-reveal]")).filter(
|
||||
(item) => item.closest("[data-reveal-group]") === group
|
||||
);
|
||||
|
||||
if (items.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
items.forEach((item) => {
|
||||
if (item.dataset.reveal === "lines") {
|
||||
gsap.set(item, { autoAlpha: 0 });
|
||||
return;
|
||||
}
|
||||
|
||||
gsap.set(item, {
|
||||
y: 36,
|
||||
autoAlpha: 0,
|
||||
force3D: true,
|
||||
});
|
||||
});
|
||||
|
||||
ScrollTrigger.create({
|
||||
trigger: group,
|
||||
start: group.dataset.revealStart || "top 86%",
|
||||
once: true,
|
||||
onEnter: () => {
|
||||
const timeline = gsap.timeline();
|
||||
|
||||
items.forEach((item, index) => {
|
||||
const position = index === 0 ? 0 : "<0.16";
|
||||
|
||||
if (item.dataset.reveal === "lines") {
|
||||
const lines = createRevealLines(item);
|
||||
|
||||
if (lines.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
preparedElements.push(item);
|
||||
gsap.set(item, { autoAlpha: 1 });
|
||||
gsap.set(lines, {
|
||||
yPercent: 115,
|
||||
rotate: 2.2,
|
||||
transformOrigin: "0% 100%",
|
||||
force3D: true,
|
||||
});
|
||||
|
||||
timeline.to(
|
||||
lines,
|
||||
{
|
||||
yPercent: 0,
|
||||
rotate: 0,
|
||||
duration: 1.18,
|
||||
stagger: 0.1,
|
||||
ease: "power4.out",
|
||||
clearProps: "transform",
|
||||
},
|
||||
position
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
timeline.to(
|
||||
item,
|
||||
{
|
||||
y: 0,
|
||||
autoAlpha: 1,
|
||||
duration: 1.02,
|
||||
ease: "power4.out",
|
||||
clearProps: "transform,opacity,visibility",
|
||||
},
|
||||
position
|
||||
);
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
ScrollTrigger.refresh();
|
||||
}, scope);
|
||||
|
||||
return () => {
|
||||
ctx.revert();
|
||||
preparedElements.forEach((element) => restoreRevealLines(element));
|
||||
};
|
||||
}, [scopeRef, ...deps]);
|
||||
}
|
||||
|
||||
export default useScrollTextReveal;
|
||||
@@ -1,7 +1,18 @@
|
||||
:root {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #1f1f1f;
|
||||
background: #efefef;
|
||||
font-family: "Questrial", Arial, Helvetica, sans-serif;
|
||||
--theme-black: #262626;
|
||||
--theme-white: #eaeaea;
|
||||
--theme-accent: #ff6a00;
|
||||
--theme-bg: #262626;
|
||||
--theme-surface: #2f2f2f;
|
||||
--theme-surface-soft: #363636;
|
||||
--theme-paper: #404040;
|
||||
--theme-text: #eaeaea;
|
||||
--theme-text-muted: #c8c8c8;
|
||||
--theme-border: #4a4a4a;
|
||||
|
||||
color: var(--theme-text);
|
||||
background: var(--theme-bg);
|
||||
line-height: 1.5;
|
||||
font-weight: 400;
|
||||
|
||||
@@ -21,7 +32,20 @@ html {
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #efefef;
|
||||
background: var(--theme-bg);
|
||||
color: var(--theme-text);
|
||||
font-family: inherit;
|
||||
transition: background-color 0.25s ease, color 0.25s ease;
|
||||
}
|
||||
|
||||
body.theme-light {
|
||||
--theme-bg: #eaeaea;
|
||||
--theme-surface: #f5f5f5;
|
||||
--theme-surface-soft: #f0f0f0;
|
||||
--theme-paper: #ffffff;
|
||||
--theme-text: #262626;
|
||||
--theme-text-muted: #5f5f5f;
|
||||
--theme-border: #d6d6d6;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -30,4 +54,5 @@ a {
|
||||
|
||||
button {
|
||||
font: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,16 @@ import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { BrowserRouter } from "react-router";
|
||||
import App from "./App";
|
||||
import { ShopProvider } from "./shop/ShopContext";
|
||||
import "./index.css";
|
||||
import "./App.css";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||
<React.StrictMode>
|
||||
<BrowserRouter>
|
||||
<App />
|
||||
<ShopProvider>
|
||||
<App />
|
||||
</ShopProvider>
|
||||
</BrowserRouter>
|
||||
</React.StrictMode>
|
||||
);
|
||||
);
|
||||
@@ -1,6 +1,6 @@
|
||||
.about-page {
|
||||
min-height: 100vh;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
padding: 26px 38px 38px;
|
||||
background:
|
||||
linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1)),
|
||||
@@ -8,8 +8,8 @@
|
||||
}
|
||||
|
||||
.about-shell {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 38px;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-hero {
|
||||
@@ -30,7 +30,7 @@
|
||||
gap: 28px;
|
||||
align-items: end;
|
||||
padding-bottom: 36px;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.about-hero-copy h1 {
|
||||
@@ -39,7 +39,7 @@
|
||||
line-height: 0.92;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.05em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-intro {
|
||||
@@ -47,7 +47,7 @@
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-hero-panel {
|
||||
@@ -64,7 +64,7 @@
|
||||
margin: 10px 0 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.6;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-panel-meta {
|
||||
@@ -81,7 +81,7 @@
|
||||
margin: 8px 0 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.55;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-section {
|
||||
@@ -103,7 +103,7 @@
|
||||
line-height: 0.98;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-section-copy {
|
||||
@@ -118,7 +118,7 @@
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-quote-block {
|
||||
@@ -147,8 +147,8 @@
|
||||
|
||||
.about-card {
|
||||
padding: 24px;
|
||||
background: #efefef;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-bg);
|
||||
border: 1px solid var(--theme-border);
|
||||
min-height: 260px;
|
||||
}
|
||||
|
||||
@@ -157,14 +157,14 @@
|
||||
font-size: 24px;
|
||||
line-height: 1.05;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-card p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-origin-section {
|
||||
@@ -173,21 +173,21 @@
|
||||
gap: 28px;
|
||||
margin-top: 38px;
|
||||
padding-top: 38px;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.about-origin-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
background: #efefef;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-bg);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.about-origin-box > div {
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.about-origin-box > div:last-child {
|
||||
@@ -242,7 +242,7 @@
|
||||
}
|
||||
|
||||
.about-btn--primary {
|
||||
background: #fff;
|
||||
background: var(--theme-paper);
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
@@ -261,21 +261,21 @@
|
||||
|
||||
.about-proof-item {
|
||||
padding: 18px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #fafafa;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.about-proof-item p {
|
||||
margin: 10px 0 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.55;
|
||||
color: #3f3f3f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-process-section {
|
||||
margin-top: 38px;
|
||||
padding-top: 38px;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.about-credentials-grid {
|
||||
@@ -301,14 +301,14 @@
|
||||
font-size: 24px;
|
||||
line-height: 1.08;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-credential-card p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-method-section {
|
||||
@@ -317,8 +317,8 @@
|
||||
gap: 28px;
|
||||
margin-top: 38px;
|
||||
padding: 28px;
|
||||
background: #efefef;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-bg);
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.about-method-copy h2 {
|
||||
@@ -327,14 +327,14 @@
|
||||
line-height: 0.98;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-method-copy p {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-method-points {
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
.about-method-points > div {
|
||||
padding-bottom: 14px;
|
||||
border-bottom: 1px solid #d6d6d6;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.about-method-points > div:last-child {
|
||||
@@ -357,14 +357,14 @@
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.about-method-points p {
|
||||
margin: 8px 0 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.55;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.about-trust-note {
|
||||
@@ -382,7 +382,7 @@
|
||||
margin: 10px 0 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
@@ -452,4 +452,5 @@
|
||||
.about-bottom-cta {
|
||||
padding: 26px 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,19 @@
|
||||
import { Link } from "react-router";
|
||||
import "../style/navbar.css";
|
||||
import SharedNavbar from "../components/SharedNavbar";
|
||||
import "./AboutPage.css";
|
||||
|
||||
function AboutPage() {
|
||||
return (
|
||||
<div className="about-page">
|
||||
<nav className="navbar navbar--light">
|
||||
<div className="nav-pill">
|
||||
<Link to="/" className="nav-link">
|
||||
atmos
|
||||
</Link>
|
||||
<Link to="/#dufte" className="nav-link">
|
||||
Düfte
|
||||
</Link>
|
||||
<Link to="/discovery-set" className="nav-link">
|
||||
Testen
|
||||
</Link>
|
||||
<a href="#cart" className="nav-link">
|
||||
Cart
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<SharedNavbar variant="light" />
|
||||
|
||||
<main className="about-shell">
|
||||
<section className="about-hero">
|
||||
<section className="about-hero" data-reveal-group>
|
||||
<div className="about-hero-copy">
|
||||
<span className="about-kicker">ABOUT atmos</span>
|
||||
<h1>
|
||||
<span className="about-kicker" data-reveal="fade">
|
||||
ABOUT atmos
|
||||
</span>
|
||||
<h1 data-reveal="lines">
|
||||
WIR DEKODIEREN
|
||||
<br />
|
||||
ATMOSPHÄREN
|
||||
@@ -35,7 +22,7 @@ function AboutPage() {
|
||||
<br />
|
||||
SIE IN DÜFTE
|
||||
</h1>
|
||||
<p className="about-intro">
|
||||
<p className="about-intro" data-reveal="fade">
|
||||
atmos entwickelt Nischendüfte, die nicht bloss gut riechen sollen,
|
||||
sondern eine Atmosphäre präzise übersetzen: Material, Raum, Kälte,
|
||||
Licht, Oberfläche, Spannung. Jeder Duft ist eine verdichtete
|
||||
@@ -43,7 +30,7 @@ function AboutPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="about-hero-panel">
|
||||
<div className="about-hero-panel" data-reveal="fade">
|
||||
<span className="about-panel-label">POSITIONIERUNG</span>
|
||||
<p>
|
||||
Nischig. Hochwertig. Edel. Luxuriös. Reduziert in der Form,
|
||||
@@ -67,13 +54,15 @@ function AboutPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="about-section about-section--split">
|
||||
<section className="about-section about-section--split" data-reveal-group>
|
||||
<div className="about-section-heading">
|
||||
<span className="about-label">UNSER VERSTÄNDNIS</span>
|
||||
<h2>NICHT DEKORATION. SONDERN HALTUNG.</h2>
|
||||
<span className="about-label" data-reveal="fade">
|
||||
UNSER VERSTÄNDNIS
|
||||
</span>
|
||||
<h2 data-reveal="lines">NICHT DEKORATION. SONDERN HALTUNG.</h2>
|
||||
</div>
|
||||
|
||||
<div className="about-section-copy">
|
||||
<div className="about-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
atmos versteht Parfum nicht als beiläufiges Accessoire, sondern als
|
||||
Form von Ausdruck. Unsere Düfte entstehen nicht aus Trends, sondern
|
||||
@@ -91,34 +80,34 @@ function AboutPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="about-proof-strip">
|
||||
<div className="about-proof-item">
|
||||
<section className="about-proof-strip" data-reveal-group data-reveal-start="top 90%">
|
||||
<div className="about-proof-item" data-reveal="fade">
|
||||
<span className="about-label">ATELIER</span>
|
||||
<p>Entwicklung aus einem kuratierten Duft- und Materialkontext</p>
|
||||
</div>
|
||||
<div className="about-proof-item">
|
||||
<div className="about-proof-item" data-reveal="fade">
|
||||
<span className="about-label">KLEINSERIEN</span>
|
||||
<p>Chargenbasiert gedacht statt massenmarktfähig optimiert</p>
|
||||
</div>
|
||||
<div className="about-proof-item">
|
||||
<div className="about-proof-item" data-reveal="fade">
|
||||
<span className="about-label">KOMPOSITION</span>
|
||||
<p>Materiallogik vor Trendformel und Lautstärke</p>
|
||||
</div>
|
||||
<div className="about-proof-item">
|
||||
<div className="about-proof-item" data-reveal="fade">
|
||||
<span className="about-label">HERKUNFT</span>
|
||||
<p>Creative Direction und Qualitätsanspruch aus der Schweiz</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="about-quote-block">
|
||||
<p>
|
||||
<section className="about-quote-block" data-reveal-group>
|
||||
<p data-reveal="fade">
|
||||
„Jeder Duft beginnt bei uns nicht mit einer Note, sondern mit einem
|
||||
Raumgefühl.“
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className="about-grid-section">
|
||||
<div className="about-card">
|
||||
<section className="about-grid-section" data-reveal-group data-reveal-start="top 84%">
|
||||
<div className="about-card" data-reveal="fade">
|
||||
<span className="about-label">01 / DEKODIEREN</span>
|
||||
<h3>Atmosphäre lesen</h3>
|
||||
<p>
|
||||
@@ -128,7 +117,7 @@ function AboutPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="about-card">
|
||||
<div className="about-card" data-reveal="fade">
|
||||
<span className="about-label">02 / VERDICHTEN</span>
|
||||
<h3>In Duft übersetzen</h3>
|
||||
<p>
|
||||
@@ -138,7 +127,7 @@ function AboutPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="about-card">
|
||||
<div className="about-card" data-reveal="fade">
|
||||
<span className="about-label">03 / REDUZIEREN</span>
|
||||
<h3>Wirkung schärfen</h3>
|
||||
<p>
|
||||
@@ -149,13 +138,20 @@ function AboutPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="about-section about-section--split about-process-section">
|
||||
<section
|
||||
className="about-section about-section--split about-process-section"
|
||||
data-reveal-group
|
||||
>
|
||||
<div className="about-section-heading">
|
||||
<span className="about-label">PROZESS & KOMPETENZ</span>
|
||||
<h2>WIE AUS EINER IDEE EINE BELASTBARE KOMPOSITION WIRD.</h2>
|
||||
<span className="about-label" data-reveal="fade">
|
||||
PROZESS & KOMPETENZ
|
||||
</span>
|
||||
<h2 data-reveal="lines">
|
||||
WIE AUS EINER IDEE EINE BELASTBARE KOMPOSITION WIRD.
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div className="about-section-copy">
|
||||
<div className="about-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
atmos arbeitet nicht mit einem losgelösten Storytelling, das im
|
||||
Nachhinein auf einen Duft gelegt wird. Jede Komposition beginnt mit
|
||||
@@ -172,8 +168,12 @@ function AboutPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="about-credentials-grid">
|
||||
<article className="about-credential-card">
|
||||
<section
|
||||
className="about-credentials-grid"
|
||||
data-reveal-group
|
||||
data-reveal-start="top 84%"
|
||||
>
|
||||
<article className="about-credential-card" data-reveal="fade">
|
||||
<span className="about-label">ATELIER / ENTWICKLUNG</span>
|
||||
<h3>Komposition aus einem klaren Duftverständnis</h3>
|
||||
<p>
|
||||
@@ -183,7 +183,7 @@ function AboutPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="about-credential-card">
|
||||
<article className="about-credential-card" data-reveal="fade">
|
||||
<span className="about-label">MATERIALLOGIK</span>
|
||||
<h3>Noten folgen einer Idee, nicht bloss einer Wirkung</h3>
|
||||
<p>
|
||||
@@ -193,7 +193,7 @@ function AboutPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="about-credential-card">
|
||||
<article className="about-credential-card" data-reveal="fade">
|
||||
<span className="about-label">CHARGENPRINZIP</span>
|
||||
<h3>Kleinserie statt gesichtsloser Massenästhetik</h3>
|
||||
<p>
|
||||
@@ -203,7 +203,7 @@ function AboutPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="about-credential-card">
|
||||
<article className="about-credential-card" data-reveal="fade">
|
||||
<span className="about-label">QUALITÄTSPRÜFUNG</span>
|
||||
<h3>Komposition, Haltbarkeit und Verlauf werden bewusst geprüft</h3>
|
||||
<p>
|
||||
@@ -214,11 +214,15 @@ function AboutPage() {
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section className="about-method-section">
|
||||
<section className="about-method-section" data-reveal-group>
|
||||
<div className="about-method-copy">
|
||||
<span className="about-label">NACHWEISBARE DUFTLOGIK</span>
|
||||
<h2>FÜR MENSCHEN, DIE HYPE ERKENNEN UND SUBSTANZ SUCHEN.</h2>
|
||||
<p>
|
||||
<span className="about-label" data-reveal="fade">
|
||||
NACHWEISBARE DUFTLOGIK
|
||||
</span>
|
||||
<h2 data-reveal="lines">
|
||||
FÜR MENSCHEN, DIE HYPE ERKENNEN UND SUBSTANZ SUCHEN.
|
||||
</h2>
|
||||
<p data-reveal="fade">
|
||||
Wer in der Szene unterwegs ist, erkennt schnell, wenn ein Duft vor
|
||||
allem über Bildsprache verkauft wird. Genau deshalb machen wir unsere
|
||||
Denkweise sichtbar: über Struktur, Materialbezug, Edition, Trageverlauf
|
||||
@@ -226,7 +230,7 @@ function AboutPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="about-method-points">
|
||||
<div className="about-method-points" data-reveal="fade">
|
||||
<div>
|
||||
<span>DUFTSTRUKTUR</span>
|
||||
<p>Top, Heart und Base werden als Verlauf und nicht nur als Liste gedacht.</p>
|
||||
@@ -246,23 +250,25 @@ function AboutPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="about-section about-origin-section">
|
||||
<section className="about-section about-origin-section" data-reveal-group>
|
||||
<div className="about-origin-copy">
|
||||
<span className="about-label">MADE IN SWITZERLAND</span>
|
||||
<h2>PRÄZISION IN FORM, DUFT UND AUFTRITT.</h2>
|
||||
<p>
|
||||
<span className="about-label" data-reveal="fade">
|
||||
MADE IN SWITZERLAND
|
||||
</span>
|
||||
<h2 data-reveal="lines">PRÄZISION IN FORM, DUFT UND AUFTRITT.</h2>
|
||||
<p data-reveal="fade">
|
||||
atmos ist in der Schweiz verankert. Dieser Ursprung zeigt sich nicht
|
||||
nur in der Herstellung, sondern auch in unserer Haltung zur Qualität:
|
||||
kontrolliert, bewusst, präzise und kompromisslos in der Ausarbeitung.
|
||||
</p>
|
||||
<p>
|
||||
<p data-reveal="fade">
|
||||
Unsere Düfte bewegen sich zwischen Luxus und Konzept. Sie sollen
|
||||
hochwertig wirken, ohne laut zu werden. Edel, ohne klassisch zu sein.
|
||||
Und luxuriös, ohne sich über Überfluss zu definieren.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="about-origin-box">
|
||||
<div className="about-origin-box" data-reveal="fade">
|
||||
<div>
|
||||
<span>QUALITÄTSVERSPRECHEN</span>
|
||||
<p>Kuratiert, präzise und mit Fokus auf charakterstarke Kompositionen.</p>
|
||||
@@ -278,29 +284,35 @@ function AboutPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="about-trust-note">
|
||||
<span className="about-label">QUALITÄTSVERSTÄNDNIS</span>
|
||||
<p>
|
||||
Bei atmos steht nicht die schnelle Aufmerksamkeit im Vordergrund, sondern die
|
||||
Qualität der Komposition. Unsere Düfte entstehen aus klaren Materialideen,
|
||||
kontrollierter Entwicklung und einem kuratierten Anspruch an Verlauf,
|
||||
Balance, Haltbarkeit und Charakter. Jede Edition soll nicht nur auffallen,
|
||||
sondern bestehen – durch Präzision, Eigenständigkeit und eine spürbare
|
||||
kompositorische Disziplin.
|
||||
</p>
|
||||
</section>
|
||||
<section className="about-trust-note" data-reveal-group>
|
||||
<span className="about-label" data-reveal="fade">
|
||||
QUALITÄTSVERSTÄNDNIS
|
||||
</span>
|
||||
<p data-reveal="fade">
|
||||
Bei atmos steht nicht die schnelle Aufmerksamkeit im Vordergrund, sondern die
|
||||
Qualität der Komposition. Unsere Düfte entstehen aus klaren Materialideen,
|
||||
kontrollierter Entwicklung und einem kuratierten Anspruch an Verlauf,
|
||||
Balance, Haltbarkeit und Charakter. Jede Edition soll nicht nur auffallen,
|
||||
sondern bestehen – durch Präzision, Eigenständigkeit und eine spürbare
|
||||
kompositorische Disziplin.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className="about-bottom-cta">
|
||||
<section className="about-bottom-cta" data-reveal-group>
|
||||
<div className="about-bottom-copy">
|
||||
<span className="about-label">atmos</span>
|
||||
<h2>FÜR MENSCHEN, DIE NICHT NUR EINEN DUFT SUCHEN, SONDERN EINE HALTUNG.</h2>
|
||||
<p>
|
||||
<span className="about-label" data-reveal="fade">
|
||||
atmos
|
||||
</span>
|
||||
<h2 data-reveal="lines">
|
||||
FÜR MENSCHEN, DIE NICHT NUR EINEN DUFT SUCHEN, SONDERN EINE HALTUNG.
|
||||
</h2>
|
||||
<p data-reveal="fade">
|
||||
Entdecke Düfte, die Atmosphäre nicht illustrieren, sondern in eine
|
||||
tragbare Form übersetzen.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="about-bottom-actions">
|
||||
<div className="about-bottom-actions" data-reveal="fade">
|
||||
<Link to="/" className="about-btn about-btn--primary">
|
||||
Zur Startseite
|
||||
</Link>
|
||||
@@ -314,4 +326,4 @@ function AboutPage() {
|
||||
);
|
||||
}
|
||||
|
||||
export default AboutPage;
|
||||
export default AboutPage;
|
||||
@@ -1,6 +1,6 @@
|
||||
.datenschutz-page {
|
||||
min-height: 100vh;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
padding: 26px 38px 38px;
|
||||
background:
|
||||
linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1)),
|
||||
@@ -8,8 +8,8 @@
|
||||
}
|
||||
|
||||
.datenschutz-shell {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 38px;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.datenschutz-hero {
|
||||
padding-bottom: 32px;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.datenschutz-hero h1 {
|
||||
@@ -32,7 +32,7 @@
|
||||
line-height: 0.92;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.05em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.datenschutz-intro {
|
||||
@@ -40,7 +40,7 @@
|
||||
margin: 0;
|
||||
font-size: 17px;
|
||||
line-height: 1.7;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.datenschutz-section {
|
||||
@@ -50,7 +50,7 @@
|
||||
align-items: start;
|
||||
margin-top: 38px;
|
||||
padding-top: 38px;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.datenschutz-section-heading h2 {
|
||||
@@ -59,14 +59,14 @@
|
||||
line-height: 0.98;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.datenschutz-section-copy p {
|
||||
margin: 0 0 16px;
|
||||
font-size: 16px;
|
||||
line-height: 1.75;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.datenschutz-list {
|
||||
@@ -79,7 +79,7 @@
|
||||
.datenschutz-list li {
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.datenschutz-note-box {
|
||||
@@ -96,7 +96,7 @@
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
@@ -131,4 +131,5 @@
|
||||
.datenschutz-list li {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,16 @@
|
||||
import { Link } from "react-router";
|
||||
import "../style/navbar.css";
|
||||
import SharedNavbar from "../components/SharedNavbar";
|
||||
import "./DatenschutzPage.css";
|
||||
|
||||
function DatenschutzPage() {
|
||||
return (
|
||||
<div className="datenschutz-page">
|
||||
<nav className="navbar navbar--light">
|
||||
<div className="nav-pill">
|
||||
<Link to="/" className="nav-link">
|
||||
atmos
|
||||
</Link>
|
||||
<Link to="/#dufte" className="nav-link">
|
||||
Düfte
|
||||
</Link>
|
||||
<Link to="/discovery-set" className="nav-link">
|
||||
Testen
|
||||
</Link>
|
||||
<a href="#cart" className="nav-link">
|
||||
Cart
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<SharedNavbar variant="light" />
|
||||
|
||||
<main className="datenschutz-shell">
|
||||
<section className="datenschutz-hero">
|
||||
<span className="datenschutz-kicker">RECHTLICHE ANGABEN</span>
|
||||
<h1>DATENSCHUTZ</h1>
|
||||
<p className="datenschutz-intro">
|
||||
<section className="datenschutz-hero" data-reveal-group>
|
||||
<span className="datenschutz-kicker" data-reveal="fade">RECHTLICHE ANGABEN</span>
|
||||
<h1 data-reveal="lines">DATENSCHUTZ</h1>
|
||||
<p className="datenschutz-intro" data-reveal="fade">
|
||||
Der Schutz persönlicher Daten hat für atmos einen hohen Stellenwert.
|
||||
Nachfolgend informieren wir darüber, welche personenbezogenen Daten bei
|
||||
der Nutzung dieser Website erhoben, verarbeitet und gespeichert werden,
|
||||
@@ -35,13 +19,13 @@ function DatenschutzPage() {
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">VERANTWORTLICHE STELLE</span>
|
||||
<h2>WER FÜR DIE DATENVERARBEITUNG VERANTWORTLICH IST</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">VERANTWORTLICHE STELLE</span>
|
||||
<h2 data-reveal="lines">WER FÜR DIE DATENVERARBEITUNG VERANTWORTLICH IST</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Verantwortlich für die Datenverarbeitung im Zusammenhang mit dieser
|
||||
Website ist:
|
||||
@@ -63,13 +47,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">ALLGEMEINES</span>
|
||||
<h2>WELCHE DATEN ERHOBEN WERDEN</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">ALLGEMEINES</span>
|
||||
<h2 data-reveal="lines">WELCHE DATEN ERHOBEN WERDEN</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Beim Besuch dieser Website können automatisch technische Daten
|
||||
erfasst werden. Dazu gehören insbesondere IP-Adresse, Datum und
|
||||
@@ -86,13 +70,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">ZWECK</span>
|
||||
<h2>WOFÜR DIE DATEN VERWENDET WERDEN</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">ZWECK</span>
|
||||
<h2 data-reveal="lines">WOFÜR DIE DATEN VERWENDET WERDEN</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>Die Verarbeitung personenbezogener Daten erfolgt insbesondere:</p>
|
||||
<ul className="datenschutz-list">
|
||||
<li>zur Bereitstellung und technischen Optimierung der Website,</li>
|
||||
@@ -105,13 +89,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">COOKIES & TRACKING</span>
|
||||
<h2>COOKIES UND ÄHNLICHE TECHNOLOGIEN</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">COOKIES & TRACKING</span>
|
||||
<h2 data-reveal="lines">COOKIES UND ÄHNLICHE TECHNOLOGIEN</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Diese Website kann Cookies oder ähnliche Technologien verwenden, um
|
||||
Funktionen bereitzustellen, die Nutzung zu analysieren und das
|
||||
@@ -128,13 +112,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">WEITERGABE</span>
|
||||
<h2>WEITERGABE AN DRITTE</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">WEITERGABE</span>
|
||||
<h2 data-reveal="lines">WEITERGABE AN DRITTE</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Eine Weitergabe personenbezogener Daten an Dritte erfolgt nur, soweit
|
||||
dies zur Vertragserfüllung notwendig ist, eine gesetzliche
|
||||
@@ -150,13 +134,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">SPEICHERDAUER</span>
|
||||
<h2>WIE LANGE DATEN GESPEICHERT WERDEN</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">SPEICHERDAUER</span>
|
||||
<h2 data-reveal="lines">WIE LANGE DATEN GESPEICHERT WERDEN</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Personenbezogene Daten werden nur so lange gespeichert, wie dies für
|
||||
die jeweiligen Zwecke erforderlich ist oder gesetzliche
|
||||
@@ -167,13 +151,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">RECHTE</span>
|
||||
<h2>RECHTE DER BETROFFENEN PERSONEN</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">RECHTE</span>
|
||||
<h2 data-reveal="lines">RECHTE DER BETROFFENEN PERSONEN</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Betroffene Personen haben im Rahmen des anwendbaren Datenschutzrechts
|
||||
insbesondere das Recht auf Auskunft, Berichtigung, Löschung,
|
||||
@@ -187,13 +171,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">SICHERHEIT</span>
|
||||
<h2>TECHNISCHE UND ORGANISATORISCHE MASSNAHMEN</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">SICHERHEIT</span>
|
||||
<h2 data-reveal="lines">TECHNISCHE UND ORGANISATORISCHE MASSNAHMEN</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-section-copy">
|
||||
<div className="datenschutz-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Wir treffen angemessene technische und organisatorische
|
||||
Sicherheitsmassnahmen, um personenbezogene Daten vor unbefugtem
|
||||
@@ -206,13 +190,13 @@ function DatenschutzPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="datenschutz-section">
|
||||
<section className="datenschutz-section" data-reveal-group>
|
||||
<div className="datenschutz-section-heading">
|
||||
<span className="datenschutz-label">AKTUALISIERUNG</span>
|
||||
<h2>ÄNDERUNGEN DIESER DATENSCHUTZERKLÄRUNG</h2>
|
||||
<span className="datenschutz-label" data-reveal="fade">AKTUALISIERUNG</span>
|
||||
<h2 data-reveal="lines">ÄNDERUNGEN DIESER DATENSCHUTZERKLÄRUNG</h2>
|
||||
</div>
|
||||
|
||||
<div className="datenschutz-note-box">
|
||||
<div className="datenschutz-note-box" data-reveal="fade">
|
||||
<p>
|
||||
atmos behält sich vor, diese Datenschutzerklärung bei Bedarf
|
||||
anzupassen, insbesondere wenn sich rechtliche Vorgaben, technische
|
||||
@@ -227,4 +211,4 @@ function DatenschutzPage() {
|
||||
);
|
||||
}
|
||||
|
||||
export default DatenschutzPage;
|
||||
export default DatenschutzPage;
|
||||
@@ -1,6 +1,6 @@
|
||||
.discovery-page {
|
||||
min-height: 100vh;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
padding: 26px 38px 38px;
|
||||
background:
|
||||
linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1)),
|
||||
@@ -8,8 +8,8 @@
|
||||
}
|
||||
|
||||
.discovery-shell {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 0 38px 38px;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
letter-spacing: 0.01em;
|
||||
transition: opacity 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
@@ -47,7 +47,7 @@
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.discovery-hero {
|
||||
@@ -64,7 +64,7 @@
|
||||
line-height: 0.94;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.05em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.discovery-intro {
|
||||
@@ -72,7 +72,7 @@
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
line-height: 1.55;
|
||||
color: #3f3f3f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.discovery-benefits {
|
||||
@@ -92,7 +92,7 @@
|
||||
.discovery-benefit-icon {
|
||||
font-size: 24px;
|
||||
line-height: 1;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.discovery-benefit strong {
|
||||
@@ -100,14 +100,14 @@
|
||||
margin-bottom: 4px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.discovery-benefit p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.55;
|
||||
color: #5a5a5a;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.discovery-hero-actions {
|
||||
@@ -137,7 +137,7 @@
|
||||
margin: 12px 0 0;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #555;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.discovery-mood-grid {
|
||||
@@ -149,7 +149,7 @@
|
||||
.discovery-mood-tile {
|
||||
aspect-ratio: 1 / 1;
|
||||
overflow: hidden;
|
||||
background: #eaeaea;
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.discovery-mood-tile img {
|
||||
@@ -175,7 +175,7 @@
|
||||
line-height: 0.98;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.discovery-section-heading p {
|
||||
@@ -183,7 +183,7 @@
|
||||
margin: 18px 0 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.discovery-section-heading--center {
|
||||
@@ -211,7 +211,7 @@
|
||||
.discovery-product-image {
|
||||
aspect-ratio: 1 / 1;
|
||||
overflow: hidden;
|
||||
background: #ececec;
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.discovery-product-image img {
|
||||
@@ -225,14 +225,14 @@
|
||||
margin: 0 0 6px;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.discovery-product-copy p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.discovery-product-tags {
|
||||
@@ -247,9 +247,9 @@
|
||||
align-items: center;
|
||||
min-height: 32px;
|
||||
padding: 7px 12px;
|
||||
background: #e4e4e4;
|
||||
background: var(--theme-surface-soft);
|
||||
font-size: 12px;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
/* Steps */
|
||||
@@ -290,8 +290,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #f1f1f1;
|
||||
color: #111;
|
||||
background: var(--theme-surface-soft);
|
||||
color: var(--theme-text);
|
||||
font-size: 24px;
|
||||
font-weight: 300;
|
||||
}
|
||||
@@ -320,8 +320,8 @@
|
||||
|
||||
.discovery-comparison-card {
|
||||
padding: 28px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #efefef;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-bg);
|
||||
}
|
||||
|
||||
.discovery-comparison-card--highlight {
|
||||
@@ -343,21 +343,21 @@
|
||||
.discovery-comparison-icon {
|
||||
font-size: 28px;
|
||||
line-height: 1;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.discovery-comparison-head h3 {
|
||||
margin: 0;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.discovery-comparison-card p {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.discovery-bottom-cta {
|
||||
@@ -446,4 +446,5 @@
|
||||
.discovery-comparison-head h3 {
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Link, useNavigate } from "react-router";
|
||||
import { useNavigate } from "react-router";
|
||||
import perfumes from "../data/perfumes";
|
||||
import "../style/navbar.css";
|
||||
import SharedNavbar from "../components/SharedNavbar";
|
||||
import { useShop } from "../shop/useShop";
|
||||
import "./DiscoverySetPage.css";
|
||||
|
||||
const moodImages = [
|
||||
@@ -14,25 +15,13 @@ const moodImages = [
|
||||
|
||||
function DiscoverySetPage() {
|
||||
const navigate = useNavigate();
|
||||
const { addToCart } = useShop();
|
||||
const buyDiscoverySet = () =>
|
||||
addToCart("discovery-set", 1, "Discovery Set added.").catch(() => {});
|
||||
|
||||
return (
|
||||
<div className="discovery-page">
|
||||
<nav className="navbar navbar--light">
|
||||
<div className="nav-pill">
|
||||
<Link to="/" className="nav-link">
|
||||
atmos
|
||||
</Link>
|
||||
<Link to="/#dufte" className="nav-link">
|
||||
Düfte
|
||||
</Link>
|
||||
<Link to="/discovery-set" className="nav-link active">
|
||||
Testen
|
||||
</Link>
|
||||
<a href="#cart" className="nav-link">
|
||||
Cart
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<SharedNavbar variant="light" active="testen" />
|
||||
|
||||
<main className="discovery-shell">
|
||||
<div className="discovery-topbar">
|
||||
@@ -42,10 +31,12 @@ function DiscoverySetPage() {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<section className="discovery-hero">
|
||||
<section className="discovery-hero" data-reveal-group>
|
||||
<div className="discovery-hero-copy">
|
||||
<span className="discovery-kicker">DISCOVERY SET</span>
|
||||
<h1>
|
||||
<span className="discovery-kicker" data-reveal="fade">
|
||||
DISCOVERY SET
|
||||
</span>
|
||||
<h1 data-reveal="lines">
|
||||
DER SICHERSTE EINSTIEG
|
||||
<br />
|
||||
IN DIE WELT DER NISCHEN-
|
||||
@@ -53,12 +44,12 @@ function DiscoverySetPage() {
|
||||
DÜFTE
|
||||
</h1>
|
||||
|
||||
<p className="discovery-intro">
|
||||
<p className="discovery-intro" data-reveal="fade">
|
||||
6 Düfte × 2ml. Jeden Duft eine Woche tragen. Verstehen, was
|
||||
wirklich funktioniert. Ohne Risiko.
|
||||
</p>
|
||||
|
||||
<div className="discovery-benefits">
|
||||
<div className="discovery-benefits" data-reveal="fade">
|
||||
<div className="discovery-benefit">
|
||||
<span className="discovery-benefit-icon">✓</span>
|
||||
<div>
|
||||
@@ -75,8 +66,8 @@ function DiscoverySetPage() {
|
||||
<div>
|
||||
<strong>CHF 48 Gutschein automatisch im Set</strong>
|
||||
<p>
|
||||
Wird beim späteren Full-Size-Kauf angerechnet – kein manuelles
|
||||
Einlösen nötig.
|
||||
Nur das erste Discovery Set erstellt den einmaligen Rabatt.
|
||||
Er wird bei einem späteren Full-Size-Kauf automatisch angerechnet.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,11 +95,11 @@ function DiscoverySetPage() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="discovery-hero-actions">
|
||||
<button type="button" className="discovery-primary-btn">
|
||||
<div className="discovery-hero-actions" data-reveal="fade">
|
||||
<button type="button" className="discovery-primary-btn" onClick={buyDiscoverySet}>
|
||||
DISCOVERY SET BESTELLEN – CHF 48.–
|
||||
</button>
|
||||
<p>Wird bei jedem Full-Size-Kauf angerechnet</p>
|
||||
<p>Nur das erste Set erstellt einen einmaligen CHF 48 Full-Size-Rabatt</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -121,10 +112,12 @@ function DiscoverySetPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="discovery-included">
|
||||
<section className="discovery-included" data-reveal-group>
|
||||
<div className="discovery-section-heading">
|
||||
<span className="discovery-label">IM SET ENTHALTEN</span>
|
||||
<h2>ALLE 6 SIGNATURE-DÜFTE ZUM TESTEN.</h2>
|
||||
<span className="discovery-label" data-reveal="fade">
|
||||
IM SET ENTHALTEN
|
||||
</span>
|
||||
<h2 data-reveal="lines">ALLE 6 SIGNATURE-DÜFTE ZUM TESTEN.</h2>
|
||||
</div>
|
||||
|
||||
<div className="discovery-products-grid">
|
||||
@@ -150,20 +143,20 @@ function DiscoverySetPage() {
|
||||
</section>
|
||||
|
||||
<section className="discovery-steps-section">
|
||||
<div className="discovery-steps-shell">
|
||||
<h2>So funktioniert's</h2>
|
||||
<div className="discovery-steps-shell" data-reveal-group>
|
||||
<h2 data-reveal="lines">So funktioniert's</h2>
|
||||
|
||||
<div className="discovery-steps-grid">
|
||||
<article className="discovery-step-card">
|
||||
<article className="discovery-step-card" data-reveal="fade">
|
||||
<div className="discovery-step-number">1</div>
|
||||
<h3>Bestellen</h3>
|
||||
<p>
|
||||
Discovery Set für CHF 48 bestellen. Der Gutschein-Code ist
|
||||
automatisch im Set enthalten.
|
||||
Discovery Set für CHF 48 bestellen. Nur dein erstes Set erzeugt
|
||||
automatisch einen einmaligen Rabatt.
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="discovery-step-card">
|
||||
<article className="discovery-step-card" data-reveal="fade">
|
||||
<div className="discovery-step-number">2</div>
|
||||
<h3>Testen</h3>
|
||||
<p>
|
||||
@@ -172,23 +165,25 @@ function DiscoverySetPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="discovery-step-card">
|
||||
<article className="discovery-step-card" data-reveal="fade">
|
||||
<div className="discovery-step-number">3</div>
|
||||
<h3>Entscheiden</h3>
|
||||
<p>
|
||||
Full-Size bestellen. CHF 48 werden automatisch angerechnet.
|
||||
Kein Risiko, kein Verlust.
|
||||
Full-Size bestellen. CHF 48 werden automatisch angerechnet,
|
||||
sofern der Rabatt noch nicht genutzt wurde.
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="discovery-comparison-section">
|
||||
<section className="discovery-comparison-section" data-reveal-group>
|
||||
<div className="discovery-section-heading discovery-section-heading--center">
|
||||
<span className="discovery-label">WARUM DISCOVERY SET</span>
|
||||
<h2>DER KLÜGERE EINSTIEG IN NISCHENDÜFTE.</h2>
|
||||
<p>
|
||||
<span className="discovery-label" data-reveal="fade">
|
||||
WARUM DISCOVERY SET
|
||||
</span>
|
||||
<h2 data-reveal="lines">DER KLÜGERE EINSTIEG IN NISCHENDÜFTE.</h2>
|
||||
<p data-reveal="fade">
|
||||
Nischen-Parfums sind keine Impulskäufe. Sie brauchen Zeit, um zu
|
||||
verstehen, wie sie auf deiner Haut funktionieren, wie sie sich im
|
||||
Alltag entwickeln und ob sie wirklich zu dir passen.
|
||||
@@ -196,7 +191,7 @@ function DiscoverySetPage() {
|
||||
</div>
|
||||
|
||||
<div className="discovery-comparison-grid">
|
||||
<div className="discovery-comparison-card">
|
||||
<div className="discovery-comparison-card" data-reveal="fade">
|
||||
<div className="discovery-comparison-head">
|
||||
<span className="discovery-comparison-icon">×</span>
|
||||
<h3>Traditioneller Weg</h3>
|
||||
@@ -208,24 +203,27 @@ function DiscoverySetPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="discovery-comparison-card discovery-comparison-card--highlight">
|
||||
<div
|
||||
className="discovery-comparison-card discovery-comparison-card--highlight"
|
||||
data-reveal="fade"
|
||||
>
|
||||
<div className="discovery-comparison-head">
|
||||
<span className="discovery-comparison-icon">✓</span>
|
||||
<h3>Discovery Set Weg</h3>
|
||||
</div>
|
||||
<p>
|
||||
CHF 48 investieren, alle Düfte testen, bewusst entscheiden. Die
|
||||
Investition wird vollständig angerechnet – der Einstieg bleibt
|
||||
kontrolliert und nachvollziehbar.
|
||||
erste Investition wird einmalig angerechnet – der Einstieg bleibt
|
||||
kontrolliert, nachvollziehbar und fair.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="discovery-bottom-cta">
|
||||
<button type="button" className="discovery-primary-btn">
|
||||
<div className="discovery-bottom-cta" data-reveal="fade">
|
||||
<button type="button" className="discovery-primary-btn" onClick={buyDiscoverySet}>
|
||||
DISCOVERY SET BESTELLEN – CHF 48.–
|
||||
</button>
|
||||
<p>Kostenloser Versand · 2–3 Werktage · Volle Anrechnung bei Full-Size</p>
|
||||
<p>Kostenloser Versand · 2–3 Werktage · Einmalige Anrechnung bei Full-Size</p>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@@ -233,4 +231,4 @@ function DiscoverySetPage() {
|
||||
);
|
||||
}
|
||||
|
||||
export default DiscoverySetPage;
|
||||
export default DiscoverySetPage;
|
||||
@@ -1,6 +1,6 @@
|
||||
.impressum-page {
|
||||
min-height: 100vh;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
padding: 26px 38px 38px;
|
||||
background:
|
||||
linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1)),
|
||||
@@ -8,8 +8,8 @@
|
||||
}
|
||||
|
||||
.impressum-shell {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 38px;
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.impressum-hero {
|
||||
padding-bottom: 32px;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.impressum-hero h1 {
|
||||
@@ -32,7 +32,7 @@
|
||||
line-height: 0.92;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.05em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.impressum-intro {
|
||||
@@ -40,7 +40,7 @@
|
||||
margin: 0;
|
||||
font-size: 17px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.impressum-grid {
|
||||
@@ -52,8 +52,8 @@
|
||||
|
||||
.impressum-card {
|
||||
padding: 24px;
|
||||
background: #efefef;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-bg);
|
||||
border: 1px solid var(--theme-border);
|
||||
min-height: 210px;
|
||||
}
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
font-size: 26px;
|
||||
line-height: 1.05;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.impressum-card p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.7;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.impressum-section {
|
||||
@@ -79,7 +79,7 @@
|
||||
align-items: start;
|
||||
margin-top: 38px;
|
||||
padding-top: 38px;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.impressum-section-heading h2 {
|
||||
@@ -88,14 +88,14 @@
|
||||
line-height: 0.98;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.impressum-section-copy p {
|
||||
margin: 0 0 16px;
|
||||
font-size: 16px;
|
||||
line-height: 1.75;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.impressum-note-box {
|
||||
@@ -112,7 +112,7 @@
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
@@ -148,4 +148,5 @@
|
||||
.impressum-section-copy p {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,40 +1,26 @@
|
||||
import { Link } from "react-router";
|
||||
import "../style/navbar.css";
|
||||
import SharedNavbar from "../components/SharedNavbar";
|
||||
import "./ImpressumPage.css";
|
||||
|
||||
function ImpressumPage() {
|
||||
return (
|
||||
<div className="impressum-page">
|
||||
<nav className="navbar navbar--light">
|
||||
<div className="nav-pill">
|
||||
<Link to="/" className="nav-link">
|
||||
atmos
|
||||
</Link>
|
||||
<Link to="/#dufte" className="nav-link">
|
||||
Düfte
|
||||
</Link>
|
||||
<Link to="/discovery-set" className="nav-link">
|
||||
Testen
|
||||
</Link>
|
||||
<a href="#cart" className="nav-link">
|
||||
Cart
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<SharedNavbar variant="light" />
|
||||
|
||||
<main className="impressum-shell">
|
||||
<section className="impressum-hero">
|
||||
<span className="impressum-kicker">RECHTLICHE ANGABEN</span>
|
||||
<h1>IMPRESSUM</h1>
|
||||
<p className="impressum-intro">
|
||||
<section className="impressum-hero" data-reveal-group>
|
||||
<span className="impressum-kicker" data-reveal="fade">
|
||||
RECHTLICHE ANGABEN
|
||||
</span>
|
||||
<h1 data-reveal="lines">IMPRESSUM</h1>
|
||||
<p className="impressum-intro" data-reveal="fade">
|
||||
Dieses Impressum enthält die rechtlichen Angaben zu atmos sowie
|
||||
Informationen zur Verantwortlichkeit, Erreichbarkeit und zu den
|
||||
veröffentlichten Inhalten dieser Website.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className="impressum-grid">
|
||||
<article className="impressum-card">
|
||||
<section className="impressum-grid" data-reveal-group data-reveal-start="top 90%">
|
||||
<article className="impressum-card" data-reveal="fade">
|
||||
<span className="impressum-label">ANBIETER</span>
|
||||
<h2>Unternehmen</h2>
|
||||
<p>
|
||||
@@ -48,7 +34,7 @@ function ImpressumPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="impressum-card">
|
||||
<article className="impressum-card" data-reveal="fade">
|
||||
<span className="impressum-label">KONTAKT</span>
|
||||
<h2>Erreichbarkeit</h2>
|
||||
<p>
|
||||
@@ -58,7 +44,7 @@ function ImpressumPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="impressum-card">
|
||||
<article className="impressum-card" data-reveal="fade">
|
||||
<span className="impressum-label">VERTRETUNGSBERECHTIGT</span>
|
||||
<h2>Geschäftsführung</h2>
|
||||
<p>
|
||||
@@ -68,7 +54,7 @@ function ImpressumPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="impressum-card">
|
||||
<article className="impressum-card" data-reveal="fade">
|
||||
<span className="impressum-label">HANDELSREGISTER</span>
|
||||
<h2>Registereintrag</h2>
|
||||
<p>
|
||||
@@ -79,13 +65,15 @@ function ImpressumPage() {
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section className="impressum-section">
|
||||
<section className="impressum-section" data-reveal-group>
|
||||
<div className="impressum-section-heading">
|
||||
<span className="impressum-label">INHALTLICHE VERANTWORTUNG</span>
|
||||
<h2>VERANTWORTLICH FÜR DEN INHALT</h2>
|
||||
<span className="impressum-label" data-reveal="fade">
|
||||
INHALTLICHE VERANTWORTUNG
|
||||
</span>
|
||||
<h2 data-reveal="lines">VERANTWORTLICH FÜR DEN INHALT</h2>
|
||||
</div>
|
||||
|
||||
<div className="impressum-section-copy">
|
||||
<div className="impressum-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Verantwortlich für diese Website und die publizierten Inhalte:
|
||||
</p>
|
||||
@@ -101,13 +89,15 @@ function ImpressumPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="impressum-section">
|
||||
<section className="impressum-section" data-reveal-group>
|
||||
<div className="impressum-section-heading">
|
||||
<span className="impressum-label">HAFTUNG</span>
|
||||
<h2>HAFTUNGSAUSSCHLUSS</h2>
|
||||
<span className="impressum-label" data-reveal="fade">
|
||||
HAFTUNG
|
||||
</span>
|
||||
<h2 data-reveal="lines">HAFTUNGSAUSSCHLUSS</h2>
|
||||
</div>
|
||||
|
||||
<div className="impressum-section-copy">
|
||||
<div className="impressum-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Trotz sorgfältiger inhaltlicher Kontrolle übernimmt atmos keine
|
||||
Gewähr für die Aktualität, Richtigkeit, Vollständigkeit oder
|
||||
@@ -121,13 +111,15 @@ function ImpressumPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="impressum-section">
|
||||
<section className="impressum-section" data-reveal-group>
|
||||
<div className="impressum-section-heading">
|
||||
<span className="impressum-label">URHEBERRECHT</span>
|
||||
<h2>URHEBER- UND MARKENRECHTE</h2>
|
||||
<span className="impressum-label" data-reveal="fade">
|
||||
URHEBERRECHT
|
||||
</span>
|
||||
<h2 data-reveal="lines">URHEBER- UND MARKENRECHTE</h2>
|
||||
</div>
|
||||
|
||||
<div className="impressum-section-copy">
|
||||
<div className="impressum-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Sämtliche Inhalte dieser Website, einschliesslich Texte, Bilder,
|
||||
Gestaltungselemente, Logos und Marken, sind urheberrechtlich
|
||||
@@ -139,13 +131,15 @@ function ImpressumPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="impressum-section">
|
||||
<section className="impressum-section" data-reveal-group>
|
||||
<div className="impressum-section-heading">
|
||||
<span className="impressum-label">TRANSPARENZ</span>
|
||||
<h2>KLARE ANGABEN UND ERREICHBARKEIT</h2>
|
||||
<span className="impressum-label" data-reveal="fade">
|
||||
TRANSPARENZ
|
||||
</span>
|
||||
<h2 data-reveal="lines">KLARE ANGABEN UND ERREICHBARKEIT</h2>
|
||||
</div>
|
||||
|
||||
<div className="impressum-note-box">
|
||||
<div className="impressum-note-box" data-reveal="fade">
|
||||
<p>
|
||||
atmos legt Wert auf eine klare, transparente und nachvollziehbare
|
||||
Kommunikation. Dieses Impressum dient der eindeutigen
|
||||
@@ -160,4 +154,4 @@ function ImpressumPage() {
|
||||
);
|
||||
}
|
||||
|
||||
export default ImpressumPage;
|
||||
export default ImpressumPage;
|
||||
@@ -1,81 +1,130 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background: #efefef;
|
||||
color: #1f1f1f;
|
||||
background: var(--theme-bg);
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* HERO */
|
||||
.hero {
|
||||
position: relative;
|
||||
min-height: 720px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
margin-top: 0px;
|
||||
border-radius: 0;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
min-height: 100svh;
|
||||
min-height: 100dvh;
|
||||
overflow: hidden;
|
||||
background-image: url("/HERO.jpeg");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
isolation: isolate;
|
||||
background: #111;
|
||||
}
|
||||
|
||||
.hero-overlay {
|
||||
.hero-media {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background:
|
||||
linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1)),
|
||||
linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45));
|
||||
z-index: 1;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.hero-media__image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.hero .navbar--hero {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 12;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
max-width: 460px;
|
||||
padding: 120px 0 0 38px;
|
||||
color: white;
|
||||
z-index: 6;
|
||||
width: min(760px, 100%);
|
||||
padding: clamp(6rem, 11vh, 9rem) clamp(1.2rem, 3.4vw, 3rem)
|
||||
clamp(2.6rem, 7vh, 4rem);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
margin-bottom: 16px;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.18em;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
margin: 0 0 18px;
|
||||
font-size: 62px;
|
||||
line-height: 0.95;
|
||||
.hero-title {
|
||||
margin: 0;
|
||||
font-size: clamp(2.8rem, 8.5vw, 6.4rem);
|
||||
line-height: 0.88;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: white;
|
||||
letter-spacing: -0.045em;
|
||||
text-transform: uppercase;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hero-title-line {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding-bottom: 0.08em;
|
||||
margin-bottom: -0.08em;
|
||||
}
|
||||
|
||||
.hero-title-line .reveal-line {
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.hero-title-line + .hero-title-line {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
.hero-text {
|
||||
max-width: 320px;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
margin-top: 1.25rem;
|
||||
max-width: 29rem;
|
||||
font-size: 0.99rem;
|
||||
line-height: 1.58;
|
||||
color: rgba(255, 255, 255, 0.86);
|
||||
will-change: transform, opacity;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
margin-top: 28px;
|
||||
margin-top: 1.9rem;
|
||||
will-change: transform, opacity;
|
||||
}
|
||||
|
||||
.btn {
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
padding: 12px 18px;
|
||||
font-size: 14px;
|
||||
padding: 12px 20px;
|
||||
font-size: 0.9rem;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease, opacity 0.2s ease;
|
||||
transition: transform 0.24s ease, opacity 0.24s ease;
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.hero .btn {
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
@@ -86,14 +135,51 @@
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
background: rgba(255, 255, 255, 0.16);
|
||||
color: #fff;
|
||||
border: 1px solid rgba(255, 255, 255, 0.22);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.intro-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 26;
|
||||
background: var(--theme-paper);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.intro-overlay__inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: clamp(1rem, 4vw, 2.2rem);
|
||||
}
|
||||
|
||||
.intro-overlay__text-mask {
|
||||
width: min(96vw, 1200px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.intro-overlay__logo {
|
||||
width: clamp(100px, 20vw, 340px);
|
||||
max-width: 92vw;
|
||||
}
|
||||
|
||||
.intro-overlay__logo img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* SECTIONS */
|
||||
.section {
|
||||
padding: 28px 20px 10px;
|
||||
padding: 42px 20px 10px;
|
||||
}
|
||||
|
||||
.section-heading {
|
||||
@@ -107,7 +193,7 @@
|
||||
line-height: 0.95;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
/* GRID */
|
||||
@@ -121,9 +207,9 @@
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
overflow: hidden;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 0px;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
border-radius: 0;
|
||||
padding: 18px;
|
||||
min-height: 360px;
|
||||
display: flex;
|
||||
@@ -194,7 +280,7 @@
|
||||
|
||||
.product-id {
|
||||
font-size: 18px;
|
||||
color: #5f5f5f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.product-top h3 {
|
||||
@@ -224,7 +310,7 @@
|
||||
max-width: 600px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
border-radius: 0px;
|
||||
border-radius: 0;
|
||||
transition: transform 0.4s ease;
|
||||
}
|
||||
|
||||
@@ -246,7 +332,7 @@
|
||||
max-width: 170px;
|
||||
font-size: 15px;
|
||||
line-height: 1.35;
|
||||
color: #5f5f5f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
@@ -291,9 +377,9 @@
|
||||
gap: 28px;
|
||||
align-items: center;
|
||||
background: #ff6a00;
|
||||
margin: 20px;
|
||||
border-radius: 0px;
|
||||
padding: 40px 38px;
|
||||
margin: 5vw 0px 0;
|
||||
border-radius: 0;
|
||||
padding: 00px 0px 0px 40px;
|
||||
}
|
||||
|
||||
.discovery-copy h2 {
|
||||
@@ -319,7 +405,7 @@
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: transform 0.2s ease, opacity 0.2s ease;
|
||||
background: #fff;
|
||||
background: var(--theme-paper);
|
||||
color: #ff6a00;
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
@@ -341,9 +427,10 @@
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 1300px;
|
||||
height: 340px;
|
||||
border-radius: 20px;
|
||||
height: 50vh;
|
||||
border-radius: 0;
|
||||
overflow: hidden;
|
||||
justify-self: end;
|
||||
}
|
||||
|
||||
.discovery-banner img {
|
||||
@@ -351,22 +438,24 @@
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
/* RESPONSIVE */
|
||||
@media (max-width: 900px) {
|
||||
.hero {
|
||||
min-height: 620px;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
padding: 90px 24px 40px;
|
||||
width: min(640px, 100%);
|
||||
padding-top: 7rem;
|
||||
}
|
||||
|
||||
.hero h1,
|
||||
.hero-title,
|
||||
.section-heading h2,
|
||||
.discovery-copy h2 {
|
||||
font-size: 42px;
|
||||
font-size: clamp(2.45rem, 9vw, 3.2rem);
|
||||
}
|
||||
|
||||
.hero-text {
|
||||
font-size: 0.94rem;
|
||||
}
|
||||
|
||||
.product-grid {
|
||||
@@ -379,20 +468,32 @@
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.hero {
|
||||
margin: 12px;
|
||||
min-height: 540px;
|
||||
.hero .navbar--hero {
|
||||
top: 14px;
|
||||
}
|
||||
|
||||
.hero h1,
|
||||
.hero-content {
|
||||
padding: 6.2rem 1rem 2.3rem;
|
||||
}
|
||||
|
||||
.hero-title,
|
||||
.section-heading h2,
|
||||
.discovery-copy h2 {
|
||||
font-size: 34px;
|
||||
font-size: clamp(2.05rem, 13vw, 2.7rem);
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
width: min(300px, 100%);
|
||||
}
|
||||
|
||||
.hero-actions .btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.section {
|
||||
padding: 34px 12px 10px;
|
||||
}
|
||||
|
||||
.product-grid {
|
||||
@@ -402,4 +503,22 @@
|
||||
.product-card {
|
||||
min-height: 320px;
|
||||
}
|
||||
}
|
||||
|
||||
.discovery-section {
|
||||
margin: 12px 12px 0;
|
||||
padding: 28px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.hero-media,
|
||||
.hero-title-line,
|
||||
.hero-text,
|
||||
.hero-actions,
|
||||
.hero-brand,
|
||||
.intro-overlay {
|
||||
transition: none !important;
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,237 @@
|
||||
import { useEffect, useRef } from "react";
|
||||
import {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { Link } from "react-router";
|
||||
import { gsap } from "gsap";
|
||||
import { ScrollTrigger } from "gsap/ScrollTrigger";
|
||||
import HeroSection from "../components/landing/HeroSection";
|
||||
import perfumes from "../data/perfumes";
|
||||
import "../pages/LandingPage.css";
|
||||
import "../style/navbar.css";
|
||||
|
||||
const INTRO_SESSION_KEY = "atmos-landing-intro-played";
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger);
|
||||
|
||||
function LandingPage() {
|
||||
const pageRef = useRef(null);
|
||||
const overlayRef = useRef(null);
|
||||
const overlayTextRef = useRef(null);
|
||||
const heroImageWrapRef = useRef(null);
|
||||
const heroImageRef = useRef(null);
|
||||
const discoveryImageRef = useRef(null);
|
||||
const headlineLineRefs = useRef([]);
|
||||
const heroMetaRefs = useRef([]);
|
||||
const cardRefs = useRef([]);
|
||||
|
||||
const [introSettings] = useState(() => {
|
||||
if (typeof window === "undefined") {
|
||||
return { shouldPlayIntro: true };
|
||||
}
|
||||
|
||||
const prefersReducedMotion = window.matchMedia(
|
||||
"(prefers-reduced-motion: reduce)"
|
||||
).matches;
|
||||
const introAlreadyPlayed =
|
||||
window.sessionStorage.getItem(INTRO_SESSION_KEY) === "true";
|
||||
|
||||
return {
|
||||
shouldPlayIntro: !prefersReducedMotion && !introAlreadyPlayed,
|
||||
};
|
||||
});
|
||||
const { shouldPlayIntro } = introSettings;
|
||||
|
||||
const setHeadlinePrimaryRef = useCallback((element) => {
|
||||
headlineLineRefs.current[0] = element;
|
||||
}, []);
|
||||
|
||||
const setHeadlineSecondaryRef = useCallback((element) => {
|
||||
headlineLineRefs.current[1] = element;
|
||||
}, []);
|
||||
|
||||
const setDescriptionRef = useCallback((element) => {
|
||||
heroMetaRefs.current[0] = element;
|
||||
}, []);
|
||||
|
||||
const setActionsRef = useCallback((element) => {
|
||||
heroMetaRefs.current[1] = element;
|
||||
}, []);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const overlay = overlayRef.current;
|
||||
const overlayText = overlayTextRef.current;
|
||||
const heroImageWrap = heroImageWrapRef.current;
|
||||
const headlineLines = headlineLineRefs.current.filter(Boolean);
|
||||
const heroMeta = heroMetaRefs.current.filter(Boolean);
|
||||
|
||||
if (!overlay || !overlayText || !heroImageWrap || headlineLines.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const ctx = gsap.context(() => {
|
||||
gsap.set(heroImageWrap, {
|
||||
scale: 1.22,
|
||||
transformOrigin: "center center",
|
||||
});
|
||||
|
||||
gsap.set(headlineLines, {
|
||||
yPercent: 115,
|
||||
rotate: 2.2,
|
||||
transformOrigin: "0% 100%",
|
||||
force3D: true,
|
||||
});
|
||||
|
||||
gsap.set(heroMeta, {
|
||||
y: 36,
|
||||
autoAlpha: 0,
|
||||
});
|
||||
|
||||
if (!shouldPlayIntro) {
|
||||
gsap.set(heroImageWrap, { scale: 1 });
|
||||
gsap.set(headlineLines, { yPercent: 0, rotate: 0 });
|
||||
gsap.set(heroMeta, { y: 0, autoAlpha: 1 });
|
||||
gsap.set(overlay, {
|
||||
yPercent: -100,
|
||||
autoAlpha: 0,
|
||||
display: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
gsap.set(overlay, { yPercent: 0, autoAlpha: 1, display: "block" });
|
||||
gsap.set(overlayText, { xPercent: 28, yPercent: 140, autoAlpha: 0 });
|
||||
|
||||
const introTimeline = gsap.timeline({
|
||||
defaults: { ease: "power3.out" },
|
||||
onComplete: () => {
|
||||
window.sessionStorage.setItem(INTRO_SESSION_KEY, "true");
|
||||
},
|
||||
});
|
||||
|
||||
introTimeline
|
||||
.to(overlayText, {
|
||||
xPercent: 0,
|
||||
yPercent: 0,
|
||||
autoAlpha: 1,
|
||||
duration: 1.28,
|
||||
ease: "expo.out",
|
||||
})
|
||||
.to({}, { duration: 0.34 })
|
||||
.to(
|
||||
overlay,
|
||||
{
|
||||
yPercent: -100,
|
||||
duration: 1.46,
|
||||
ease: "power4.out",
|
||||
},
|
||||
">"
|
||||
)
|
||||
.to(
|
||||
heroImageWrap,
|
||||
{
|
||||
scale: 1,
|
||||
duration: 1.6,
|
||||
ease: "power2.out",
|
||||
},
|
||||
"<0.03"
|
||||
)
|
||||
.to(
|
||||
headlineLines,
|
||||
{
|
||||
yPercent: 0,
|
||||
rotate: 0,
|
||||
duration: 1.18,
|
||||
stagger: 0.1,
|
||||
ease: "power4.out",
|
||||
},
|
||||
"<0.27"
|
||||
)
|
||||
.to(
|
||||
heroMeta,
|
||||
{
|
||||
y: 0,
|
||||
autoAlpha: 1,
|
||||
duration: 1.02,
|
||||
stagger: 0.12,
|
||||
ease: "power4.out",
|
||||
},
|
||||
"<0.16"
|
||||
)
|
||||
.set(overlay, { display: "none" });
|
||||
}, pageRef);
|
||||
|
||||
return () => {
|
||||
ctx.revert();
|
||||
};
|
||||
}, [shouldPlayIntro]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
const heroImageWrap = heroImageWrapRef.current;
|
||||
const heroImage = heroImageRef.current;
|
||||
const discoveryImage = discoveryImageRef.current;
|
||||
|
||||
if (!heroImageWrap || !heroImage || !discoveryImage || typeof window === "undefined") {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const heroSection = heroImageWrap.closest(".hero");
|
||||
const discoveryBanner = discoveryImage.closest(".discovery-banner");
|
||||
|
||||
if (!heroSection || !discoveryBanner) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const ctx = gsap.context(() => {
|
||||
gsap.set(heroImage, {
|
||||
scale: 1.14,
|
||||
yPercent: -4,
|
||||
transformOrigin: "center center",
|
||||
force3D: true,
|
||||
});
|
||||
|
||||
gsap.to(heroImage, {
|
||||
yPercent: 8,
|
||||
ease: "none",
|
||||
scrollTrigger: {
|
||||
trigger: heroSection,
|
||||
start: "top top",
|
||||
end: "bottom top",
|
||||
scrub: 1.15,
|
||||
},
|
||||
});
|
||||
|
||||
gsap.set(discoveryImage, {
|
||||
scale: 1.16,
|
||||
yPercent: -8,
|
||||
transformOrigin: "center center",
|
||||
force3D: true,
|
||||
});
|
||||
|
||||
gsap.to(discoveryImage, {
|
||||
yPercent: 10,
|
||||
ease: "none",
|
||||
scrollTrigger: {
|
||||
trigger: discoveryBanner,
|
||||
start: "top bottom",
|
||||
end: "bottom top",
|
||||
scrub: 1.2,
|
||||
},
|
||||
});
|
||||
}, pageRef);
|
||||
|
||||
return () => {
|
||||
ctx.revert();
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const cards = cardRefs.current.filter(Boolean);
|
||||
const cardStates = cards
|
||||
@@ -35,7 +259,7 @@ function LandingPage() {
|
||||
try {
|
||||
video.currentTime = 0;
|
||||
} catch {
|
||||
// Ignore errors when setting currentTime
|
||||
// Ignore errors when setting currentTime.
|
||||
}
|
||||
};
|
||||
|
||||
@@ -45,12 +269,12 @@ function LandingPage() {
|
||||
try {
|
||||
video.currentTime = 0;
|
||||
} catch {
|
||||
// Ignore errors when setting currentTime
|
||||
// Ignore errors when setting currentTime.
|
||||
}
|
||||
|
||||
const playAttempt = video.play();
|
||||
if (playAttempt && typeof playAttempt.catch === "function") {
|
||||
playAttempt.catch(() => { });
|
||||
playAttempt.catch(() => {});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -150,56 +374,25 @@ function LandingPage() {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="page">
|
||||
<header className="hero">
|
||||
<nav className="navbar navbar--hero">
|
||||
<div className="nav-pill">
|
||||
<a href="#home" className="nav-link active">
|
||||
atmos
|
||||
</a>
|
||||
<a href="#dufte" className="nav-link">
|
||||
Düfte
|
||||
</a>
|
||||
<a href="discovery-set" className="nav-link">
|
||||
Testen
|
||||
</a>
|
||||
<a href="#cart" className="nav-link">
|
||||
Cart
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div className="hero-overlay" />
|
||||
|
||||
<div className="hero-content">
|
||||
<p className="eyebrow">NISCHENDÜFTE</p>
|
||||
<h1>
|
||||
DÜFTE ALS
|
||||
<br />
|
||||
AUSDRUCK
|
||||
<br />
|
||||
VON KONZEPT
|
||||
</h1>
|
||||
<p className="hero-text">
|
||||
Konzeptuelle Düfte zwischen Materialität, Raum und Charakter.
|
||||
</p>
|
||||
|
||||
<div className="hero-actions">
|
||||
<button className="btn btn-primary">Aktuelle Düfte</button>
|
||||
<Link to="/discovery-set" className="btn btn-secondary">
|
||||
Discovery Set
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div className="page" ref={pageRef}>
|
||||
<HeroSection
|
||||
heroImageWrapRef={heroImageWrapRef}
|
||||
heroImageRef={heroImageRef}
|
||||
setHeadlinePrimaryRef={setHeadlinePrimaryRef}
|
||||
setHeadlineSecondaryRef={setHeadlineSecondaryRef}
|
||||
setDescriptionRef={setDescriptionRef}
|
||||
setActionsRef={setActionsRef}
|
||||
overlayRef={overlayRef}
|
||||
overlayTextRef={overlayTextRef}
|
||||
/>
|
||||
|
||||
<main>
|
||||
<section className="section" id="dufte">
|
||||
<section className="section" id="dufte" data-reveal-group>
|
||||
<div className="section-heading">
|
||||
<h2>
|
||||
WÄHLE EINE
|
||||
<h2 data-reveal="lines">
|
||||
{"W\u00C4HLE EINE"}
|
||||
<br />
|
||||
ATMOSPHÄRE
|
||||
{"ATMOSPH\u00C4RE"}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
@@ -209,8 +402,8 @@ function LandingPage() {
|
||||
to={`/duft/${item.slug}`}
|
||||
className="product-card"
|
||||
key={item.id}
|
||||
ref={(el) => {
|
||||
cardRefs.current[index] = el;
|
||||
ref={(element) => {
|
||||
cardRefs.current[index] = element;
|
||||
}}
|
||||
>
|
||||
<div className="product-hover-fill" aria-hidden="true">
|
||||
@@ -244,34 +437,44 @@ function LandingPage() {
|
||||
|
||||
<div className="product-bottom">
|
||||
<p>{item.text}</p>
|
||||
<span className="arrow">→</span>
|
||||
<span className="arrow">→</span>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="discovery-section" id="testen">
|
||||
<section
|
||||
className="discovery-section"
|
||||
id="testen"
|
||||
data-reveal-group
|
||||
data-reveal-start="top 82%"
|
||||
>
|
||||
<div className="discovery-copy">
|
||||
<h2>
|
||||
<h2 data-reveal="lines">
|
||||
DER SICHERE EINSTIEG
|
||||
<br />
|
||||
DISCOVERY SET
|
||||
</h2>
|
||||
<p>
|
||||
Alle 6 Düfte als 2ml Samples 2ml.
|
||||
<p data-reveal="fade">
|
||||
{"Alle 6 D\u00FCfte als 2ml Samples."}
|
||||
<br />
|
||||
Jeden Duft eine Woche tragen.
|
||||
<br />
|
||||
Verstehen, was funktioniert.
|
||||
</p>
|
||||
<Link to="/discovery-set" className="discovery-btn">
|
||||
<Link to="/discovery-set" className="discovery-btn" data-reveal="fade">
|
||||
Discovery Set bestellen
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<div className="discovery-banner">
|
||||
<img src="/DISCOVERYSET.png" alt="Discovery Set" />
|
||||
<img
|
||||
src="/atmos-discovery-set-thumbnail.png"
|
||||
alt="Discovery Set"
|
||||
loading="lazy"
|
||||
ref={discoveryImageRef}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
@@ -279,4 +482,4 @@ function LandingPage() {
|
||||
);
|
||||
}
|
||||
|
||||
export default LandingPage;
|
||||
export default LandingPage;
|
||||
@@ -0,0 +1,127 @@
|
||||
.small-page {
|
||||
min-height: 100vh;
|
||||
padding: 26px 38px 38px;
|
||||
background: var(--theme-bg);
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.small-shell {
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 38px;
|
||||
}
|
||||
|
||||
.small-hero {
|
||||
max-width: 780px;
|
||||
padding-bottom: 34px;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.small-kicker {
|
||||
display: block;
|
||||
margin-bottom: 12px;
|
||||
color: var(--theme-text-muted);
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
}
|
||||
|
||||
.small-hero h1,
|
||||
.small-panel h2 {
|
||||
margin: 0 0 14px;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
.small-hero h1 {
|
||||
font-size: clamp(42px, 8vw, 92px);
|
||||
line-height: 0.92;
|
||||
}
|
||||
|
||||
.small-hero p,
|
||||
.small-panel p,
|
||||
.release-card p {
|
||||
margin: 0;
|
||||
color: var(--theme-text-muted);
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.small-panel,
|
||||
.release-card,
|
||||
.small-error {
|
||||
background: var(--theme-surface-soft);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.small-panel button,
|
||||
.release-card button {
|
||||
min-height: 44px;
|
||||
margin-top: 18px;
|
||||
border: 1px solid #1f1f1f;
|
||||
border-radius: 0;
|
||||
background: #1f1f1f;
|
||||
color: #fff;
|
||||
padding: 0 18px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.small-requirements {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.small-requirement {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 14px;
|
||||
background: var(--theme-surface-soft);
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.small-requirement span,
|
||||
.release-card span {
|
||||
color: var(--theme-text-muted);
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.18em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.small-requirement strong.met {
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
.release-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 16px;
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.release-card h3 {
|
||||
margin: 10px 0 12px;
|
||||
}
|
||||
|
||||
.small-error {
|
||||
margin: 16px 0 0;
|
||||
border-color: #ff6a00;
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.small-page {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.small-shell {
|
||||
padding: 24px 18px;
|
||||
}
|
||||
|
||||
.small-requirements,
|
||||
.release-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import SharedNavbar from "../components/SharedNavbar";
|
||||
import { formatChf } from "../shop/money";
|
||||
import { useShop } from "../shop/useShop";
|
||||
import "./SmallBatchPage.css";
|
||||
|
||||
function Requirement({ label, met, children }) {
|
||||
return (
|
||||
<div className="small-requirement">
|
||||
<span>{label}</span>
|
||||
<strong className={met ? "met" : ""}>{children || (met ? "met" : "open")}</strong>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function SmallBatchPage() {
|
||||
const { openProfile, token, user } = useShop();
|
||||
const [state, setState] = useState({
|
||||
loading: false,
|
||||
error: "",
|
||||
loyaltyStatus: user?.loyaltyStatus || null,
|
||||
releases: [],
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!token) return;
|
||||
|
||||
fetch("/api/small-batch", {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
})
|
||||
.then(async (response) => {
|
||||
const data = await response.json().catch(() => ({}));
|
||||
if (!response.ok) throw new Error(data.error || "Small Batch request failed.");
|
||||
setState({
|
||||
loading: false,
|
||||
error: "",
|
||||
loyaltyStatus: data.loyaltyStatus,
|
||||
releases: data.releases || [],
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
setState((current) => ({
|
||||
...current,
|
||||
loading: false,
|
||||
error:
|
||||
error instanceof Error
|
||||
? error.message
|
||||
: "Shop API unreachable. Start it with npm run dev and try again.",
|
||||
}));
|
||||
});
|
||||
}, [token, user?.loyaltyStatus]);
|
||||
|
||||
const loyalty = state.loyaltyStatus || {
|
||||
hasDiscoverySet: false,
|
||||
hasFullSize: false,
|
||||
purchases: 0,
|
||||
spent_cents: 0,
|
||||
unlocked: false,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="small-page">
|
||||
<SharedNavbar variant="light" />
|
||||
|
||||
<main className="small-shell">
|
||||
<section className="small-hero" data-reveal-group>
|
||||
<span className="small-kicker" data-reveal="fade">
|
||||
SMALL BATCH / ARCHIVE / PROTOTYPE
|
||||
</span>
|
||||
<h1 data-reveal="fade">EARLY ACCESS</h1>
|
||||
<p data-reveal="fade">
|
||||
Limited releases are reserved for customers with enough purchase
|
||||
history to understand the atmos material language.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
{!user ? (
|
||||
<section className="small-panel" data-reveal-group>
|
||||
<span className="small-kicker" data-reveal="fade">
|
||||
LOGIN REQUIRED
|
||||
</span>
|
||||
<h2 data-reveal="fade">Sign in to check access.</h2>
|
||||
<p data-reveal="fade">Small Batch access is calculated from your completed orders.</p>
|
||||
<button type="button" onClick={openProfile}>
|
||||
Login / Register
|
||||
</button>
|
||||
</section>
|
||||
) : (
|
||||
<>
|
||||
<section className="small-panel" data-reveal-group>
|
||||
<span className="small-kicker" data-reveal="fade">
|
||||
ACCESS STATUS
|
||||
</span>
|
||||
<h2 data-reveal="fade">{loyalty.unlocked ? "Unlocked" : "Locked"}</h2>
|
||||
<div className="small-requirements" data-reveal="fade">
|
||||
<Requirement label="Discovery Set" met={loyalty.hasDiscoverySet} />
|
||||
<Requirement label="Full Size" met={loyalty.hasFullSize} />
|
||||
<Requirement label="Purchases" met={loyalty.purchases >= 3}>
|
||||
{loyalty.purchases}/3 Purchases
|
||||
</Requirement>
|
||||
<Requirement label="Spend" met={loyalty.spent_cents > 50000}>
|
||||
{formatChf(loyalty.spent_cents)} / CHF 500+
|
||||
</Requirement>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{state.error && <p className="small-error">{state.error}</p>}
|
||||
{state.loading && <p className="small-error">Loading access...</p>}
|
||||
|
||||
{loyalty.unlocked && (
|
||||
<section className="release-grid" data-reveal-group data-reveal-start="top 88%">
|
||||
{state.releases.map((release) => (
|
||||
<article className="release-card" key={release.name} data-reveal="fade">
|
||||
<span>{release.type}</span>
|
||||
<h3>{release.name}</h3>
|
||||
<p>{release.note}</p>
|
||||
<button type="button">Request Allocation</button>
|
||||
</article>
|
||||
))}
|
||||
</section>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SmallBatchPage;
|
||||
@@ -1,6 +1,6 @@
|
||||
.support-page {
|
||||
min-height: 100vh;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
padding: 26px 38px 38px;
|
||||
background:
|
||||
linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1)),
|
||||
@@ -8,8 +8,8 @@
|
||||
}
|
||||
|
||||
.support-shell {
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-surface);
|
||||
border: 1px solid var(--theme-border);
|
||||
padding: 38px;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
display: block;
|
||||
font-size: 10px;
|
||||
letter-spacing: 0.22em;
|
||||
color: #666;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.support-hero {
|
||||
@@ -29,7 +29,7 @@
|
||||
gap: 28px;
|
||||
align-items: end;
|
||||
padding-bottom: 36px;
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
border-bottom: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.support-hero-copy h1 {
|
||||
@@ -38,7 +38,7 @@
|
||||
line-height: 0.92;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.05em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-intro {
|
||||
@@ -46,7 +46,7 @@
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.support-hero-panel {
|
||||
@@ -63,7 +63,7 @@
|
||||
margin: 10px 0 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.6;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-panel-meta {
|
||||
@@ -79,7 +79,7 @@
|
||||
margin: 8px 0 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.55;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-quick-grid {
|
||||
@@ -91,8 +91,8 @@
|
||||
|
||||
.support-quick-card {
|
||||
padding: 24px;
|
||||
background: #efefef;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: var(--theme-bg);
|
||||
border: 1px solid var(--theme-border);
|
||||
min-height: 240px;
|
||||
}
|
||||
|
||||
@@ -101,14 +101,14 @@
|
||||
font-size: 24px;
|
||||
line-height: 1.08;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-quick-card p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.support-section {
|
||||
@@ -129,7 +129,7 @@
|
||||
line-height: 0.98;
|
||||
font-weight: 300;
|
||||
letter-spacing: -0.04em;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-section-copy {
|
||||
@@ -143,7 +143,7 @@
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
line-height: 1.7;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.support-info-grid {
|
||||
@@ -155,8 +155,8 @@
|
||||
|
||||
.support-info-box {
|
||||
padding: 24px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #fafafa;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
.support-info-box h3 {
|
||||
@@ -171,12 +171,12 @@
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.support-info-box--dark {
|
||||
background: #1f1f1f;
|
||||
border-color: #1f1f1f;
|
||||
border-color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-info-box--dark .support-label,
|
||||
@@ -194,7 +194,7 @@
|
||||
.support-list li {
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
color: #1f1f1f;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-mail-btn {
|
||||
@@ -218,7 +218,7 @@
|
||||
.support-faq-section {
|
||||
margin-top: 38px;
|
||||
padding-top: 38px;
|
||||
border-top: 1px solid #dfdfdf;
|
||||
border-top: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.support-faq-grid {
|
||||
@@ -230,8 +230,8 @@
|
||||
|
||||
.support-faq-card {
|
||||
padding: 24px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #efefef;
|
||||
border: 1px solid var(--theme-border);
|
||||
background: var(--theme-bg);
|
||||
min-height: 210px;
|
||||
}
|
||||
|
||||
@@ -240,14 +240,14 @@
|
||||
font-size: 22px;
|
||||
line-height: 1.08;
|
||||
font-weight: 400;
|
||||
color: #131313;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.support-faq-card p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
line-height: 1.65;
|
||||
color: #4f4f4f;
|
||||
color: var(--theme-text-muted);
|
||||
}
|
||||
|
||||
.support-bottom-cta {
|
||||
@@ -297,7 +297,7 @@
|
||||
}
|
||||
|
||||
.support-btn--primary {
|
||||
background: #fff;
|
||||
background: var(--theme-paper);
|
||||
color: #ff6a00;
|
||||
}
|
||||
|
||||
@@ -354,4 +354,5 @@
|
||||
.support-bottom-cta {
|
||||
padding: 26px 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,19 @@
|
||||
import { Link } from "react-router";
|
||||
import "../style/navbar.css";
|
||||
import SharedNavbar from "../components/SharedNavbar";
|
||||
import "./SupportPage.css";
|
||||
|
||||
function SupportPage() {
|
||||
return (
|
||||
<div className="support-page">
|
||||
<nav className="navbar navbar--light">
|
||||
<div className="nav-pill">
|
||||
<Link to="/" className="nav-link">
|
||||
atmos
|
||||
</Link>
|
||||
<Link to="/#dufte" className="nav-link">
|
||||
Düfte
|
||||
</Link>
|
||||
<Link to="/discovery-set" className="nav-link">
|
||||
Testen
|
||||
</Link>
|
||||
<a href="#cart" className="nav-link">
|
||||
Cart
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
<SharedNavbar variant="light" />
|
||||
|
||||
<main className="support-shell">
|
||||
<section className="support-hero">
|
||||
<section className="support-hero" data-reveal-group>
|
||||
<div className="support-hero-copy">
|
||||
<span className="support-kicker">SUPPORT</span>
|
||||
<h1>
|
||||
<span className="support-kicker" data-reveal="fade">
|
||||
SUPPORT
|
||||
</span>
|
||||
<h1 data-reveal="lines">
|
||||
WIR HELFEN
|
||||
<br />
|
||||
KLAR, DIREKT
|
||||
@@ -35,7 +22,7 @@ function SupportPage() {
|
||||
<br />
|
||||
UMWEGE
|
||||
</h1>
|
||||
<p className="support-intro">
|
||||
<p className="support-intro" data-reveal="fade">
|
||||
Wenn du Fragen zu Bestellung, Versand, Discovery Set, Produkten oder
|
||||
deiner Auswahl hast, ist das Support-Team von atmos für dich da.
|
||||
Präzise, persönlich und mit dem Anspruch, jedes Anliegen sorgfältig
|
||||
@@ -43,7 +30,7 @@ function SupportPage() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="support-hero-panel">
|
||||
<div className="support-hero-panel" data-reveal="fade">
|
||||
<span className="support-panel-label">KONTAKT</span>
|
||||
<p>
|
||||
Für Anliegen rund um Bestellung, Produkte, Versand und allgemeine
|
||||
@@ -67,8 +54,8 @@ function SupportPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="support-quick-grid">
|
||||
<article className="support-quick-card">
|
||||
<section className="support-quick-grid" data-reveal-group data-reveal-start="top 90%">
|
||||
<article className="support-quick-card" data-reveal="fade">
|
||||
<span className="support-label">BESTELLUNG</span>
|
||||
<h3>Fragen zu einer laufenden Bestellung</h3>
|
||||
<p>
|
||||
@@ -77,7 +64,7 @@ function SupportPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="support-quick-card">
|
||||
<article className="support-quick-card" data-reveal="fade">
|
||||
<span className="support-label">VERSAND</span>
|
||||
<h3>Lieferung und Zustellung</h3>
|
||||
<p>
|
||||
@@ -86,7 +73,7 @@ function SupportPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="support-quick-card">
|
||||
<article className="support-quick-card" data-reveal="fade">
|
||||
<span className="support-label">PRODUKTE</span>
|
||||
<h3>Beratung zu Duft, Sample oder Discovery Set</h3>
|
||||
<p>
|
||||
@@ -96,13 +83,15 @@ function SupportPage() {
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section className="support-section support-section--split">
|
||||
<section className="support-section support-section--split" data-reveal-group>
|
||||
<div className="support-section-heading">
|
||||
<span className="support-label">SO ERREICHST DU UNS</span>
|
||||
<h2>EIN GUTER SUPPORT BEGINNT MIT EINER KLAREN ANFRAGE.</h2>
|
||||
<span className="support-label" data-reveal="fade">
|
||||
SO ERREICHST DU UNS
|
||||
</span>
|
||||
<h2 data-reveal="lines">EIN GUTER SUPPORT BEGINNT MIT EINER KLAREN ANFRAGE.</h2>
|
||||
</div>
|
||||
|
||||
<div className="support-section-copy">
|
||||
<div className="support-section-copy" data-reveal="fade">
|
||||
<p>
|
||||
Damit wir dein Anliegen möglichst schnell bearbeiten können, hilft es,
|
||||
wenn du uns in deiner Nachricht die wichtigsten Informationen direkt
|
||||
@@ -118,8 +107,8 @@ function SupportPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="support-info-grid">
|
||||
<div className="support-info-box">
|
||||
<section className="support-info-grid" data-reveal-group>
|
||||
<div className="support-info-box" data-reveal="fade">
|
||||
<span className="support-label">AM BESTEN MITGEBEN</span>
|
||||
<ul className="support-list">
|
||||
<li>Bestellnummer, falls bereits bestellt wurde</li>
|
||||
@@ -129,7 +118,7 @@ function SupportPage() {
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div className="support-info-box support-info-box--dark">
|
||||
<div className="support-info-box support-info-box--dark" data-reveal="fade">
|
||||
<span className="support-label">KONTAKT</span>
|
||||
<h3>support@atmos.ch</h3>
|
||||
<p>
|
||||
@@ -142,14 +131,16 @@ function SupportPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="support-faq-section">
|
||||
<section className="support-faq-section" data-reveal-group>
|
||||
<div className="support-section-heading">
|
||||
<span className="support-label">HÄUFIGE FRAGEN</span>
|
||||
<h2>DIE WICHTIGSTEN THEMEN AUF EINEN BLICK.</h2>
|
||||
<span className="support-label" data-reveal="fade">
|
||||
HÄUFIGE FRAGEN
|
||||
</span>
|
||||
<h2 data-reveal="lines">DIE WICHTIGSTEN THEMEN AUF EINEN BLICK.</h2>
|
||||
</div>
|
||||
|
||||
<div className="support-faq-grid">
|
||||
<article className="support-faq-card">
|
||||
<article className="support-faq-card" data-reveal="fade">
|
||||
<h3>Wie lange dauert der Versand?</h3>
|
||||
<p>
|
||||
Bestellungen werden in der Regel innerhalb von 1–2 Werktagen
|
||||
@@ -158,7 +149,7 @@ function SupportPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="support-faq-card">
|
||||
<article className="support-faq-card" data-reveal="fade">
|
||||
<h3>Kann ich zuerst testen?</h3>
|
||||
<p>
|
||||
Ja. Dafür ist das Discovery Set oder ein einzelnes Sample gedacht.
|
||||
@@ -167,7 +158,7 @@ function SupportPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="support-faq-card">
|
||||
<article className="support-faq-card" data-reveal="fade">
|
||||
<h3>Ich bin unsicher, welcher Duft zu mir passt.</h3>
|
||||
<p>
|
||||
Schreib uns kurz, welche Duftcharaktere, Materialien oder Stimmungen
|
||||
@@ -175,7 +166,7 @@ function SupportPage() {
|
||||
</p>
|
||||
</article>
|
||||
|
||||
<article className="support-faq-card">
|
||||
<article className="support-faq-card" data-reveal="fade">
|
||||
<h3>Was tun bei einem Problem mit der Bestellung?</h3>
|
||||
<p>
|
||||
Kontaktiere uns direkt mit deiner Bestellnummer und einer kurzen
|
||||
@@ -186,17 +177,21 @@ function SupportPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="support-bottom-cta">
|
||||
<section className="support-bottom-cta" data-reveal-group>
|
||||
<div className="support-bottom-copy">
|
||||
<span className="support-label">atmos SUPPORT</span>
|
||||
<h2>NICHT AUTOMATISIERT AUF DISTANZ. SONDERN PERSÖNLICH UND PRÄZISE.</h2>
|
||||
<p>
|
||||
<span className="support-label" data-reveal="fade">
|
||||
atmos SUPPORT
|
||||
</span>
|
||||
<h2 data-reveal="lines">
|
||||
NICHT AUTOMATISIERT AUF DISTANZ. SONDERN PERSÖNLICH UND PRÄZISE.
|
||||
</h2>
|
||||
<p data-reveal="fade">
|
||||
Wir möchten, dass sich auch der Service so anfühlt wie die Marke
|
||||
selbst: klar, hochwertig und sorgfältig.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="support-bottom-actions">
|
||||
<div className="support-bottom-actions" data-reveal="fade">
|
||||
<a href="mailto:support@atmos.ch" className="support-btn support-btn--primary">
|
||||
E-Mail senden
|
||||
</a>
|
||||
@@ -210,4 +205,4 @@ function SupportPage() {
|
||||
);
|
||||
}
|
||||
|
||||
export default SupportPage;
|
||||
export default SupportPage;
|
||||
@@ -0,0 +1,408 @@
|
||||
import {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
useState,
|
||||
} from "react";
|
||||
import { ShopContext } from "./ShopContextBase";
|
||||
|
||||
const TOKEN_KEY = "atmos-shop-token";
|
||||
|
||||
const request = async (path, options = {}, token) => {
|
||||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
...(options.headers || {}),
|
||||
};
|
||||
|
||||
if (token) {
|
||||
headers.Authorization = `Bearer ${token}`;
|
||||
}
|
||||
|
||||
let response;
|
||||
try {
|
||||
response = await fetch(path, { ...options, headers });
|
||||
} catch {
|
||||
throw new Error("Shop API unreachable. Start it with npm run dev and try again.");
|
||||
}
|
||||
|
||||
const data = await response.json().catch(() => ({}));
|
||||
if (!response.ok) {
|
||||
throw new Error(data.error || "Shop request failed.");
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
export function ShopProvider({ children }) {
|
||||
const [token, setToken] = useState(() => localStorage.getItem(TOKEN_KEY));
|
||||
const [user, setUser] = useState(null);
|
||||
const [cart, setCart] = useState({
|
||||
items: [],
|
||||
subtotal_cents: 0,
|
||||
discount_cents: 0,
|
||||
total_cents: 0,
|
||||
total_quantity: 0,
|
||||
discounts: [],
|
||||
});
|
||||
const [orders, setOrders] = useState([]);
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [error, setError] = useState("");
|
||||
const [panelOpen, setPanelOpen] = useState(false);
|
||||
const [panelType, setPanelType] = useState("profile");
|
||||
const [cartToast, setCartToast] = useState(null);
|
||||
|
||||
const applyState = useCallback((payload) => {
|
||||
if (payload.user) setUser(payload.user);
|
||||
if (payload.cart) setCart(payload.cart);
|
||||
if (payload.orders) setOrders(payload.orders);
|
||||
if (payload.token) {
|
||||
setToken(payload.token);
|
||||
localStorage.setItem(TOKEN_KEY, payload.token);
|
||||
}
|
||||
}, []);
|
||||
|
||||
const run = useCallback(
|
||||
async (task) => {
|
||||
setBusy(true);
|
||||
setError("");
|
||||
try {
|
||||
return await task();
|
||||
} catch (err) {
|
||||
const message = err instanceof Error ? err.message : "Something went wrong.";
|
||||
setError(message);
|
||||
throw err;
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
const showToast = useCallback((toast) => {
|
||||
setCartToast(toast);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!token) return;
|
||||
request("/api/auth/session", {}, token)
|
||||
.then(applyState)
|
||||
.catch(() => {
|
||||
localStorage.removeItem(TOKEN_KEY);
|
||||
setToken(null);
|
||||
setUser(null);
|
||||
});
|
||||
}, [applyState, token]);
|
||||
|
||||
const register = useCallback(
|
||||
(payload) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
"/api/auth/register",
|
||||
{ method: "POST", body: JSON.stringify(payload) },
|
||||
null
|
||||
);
|
||||
applyState(data);
|
||||
setPanelType("profile");
|
||||
showToast({
|
||||
title: "Account created",
|
||||
message: "Your profile is ready.",
|
||||
actionLabel: "Profile",
|
||||
actionPanel: "profile",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[applyState, run, showToast]
|
||||
);
|
||||
|
||||
const login = useCallback(
|
||||
(payload) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
"/api/auth/login",
|
||||
{ method: "POST", body: JSON.stringify(payload) },
|
||||
null
|
||||
);
|
||||
applyState(data);
|
||||
setPanelType("profile");
|
||||
showToast({
|
||||
title: "Logged in",
|
||||
message: "Welcome back to atmos.",
|
||||
actionLabel: "Profile",
|
||||
actionPanel: "profile",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[applyState, run, showToast]
|
||||
);
|
||||
|
||||
const logout = useCallback(
|
||||
() =>
|
||||
run(async () => {
|
||||
if (token) {
|
||||
await request("/api/auth/logout", { method: "POST" }, token);
|
||||
}
|
||||
localStorage.removeItem(TOKEN_KEY);
|
||||
setToken(null);
|
||||
setUser(null);
|
||||
setOrders([]);
|
||||
setCart({
|
||||
items: [],
|
||||
subtotal_cents: 0,
|
||||
discount_cents: 0,
|
||||
total_cents: 0,
|
||||
total_quantity: 0,
|
||||
discounts: [],
|
||||
});
|
||||
showToast({
|
||||
title: "Logged out",
|
||||
message: "Your session has ended.",
|
||||
});
|
||||
}),
|
||||
[run, showToast, token]
|
||||
);
|
||||
|
||||
const openCart = useCallback(() => {
|
||||
setPanelType("cart");
|
||||
setPanelOpen(true);
|
||||
}, []);
|
||||
|
||||
const openProfile = useCallback(() => {
|
||||
setPanelType("profile");
|
||||
setPanelOpen(true);
|
||||
}, []);
|
||||
|
||||
const closePanel = useCallback(() => setPanelOpen(false), []);
|
||||
const dismissToast = useCallback(() => setCartToast(null), []);
|
||||
|
||||
const addToCart = useCallback(
|
||||
(productId, quantity = 1, itemMessage) =>
|
||||
run(async () => {
|
||||
if (!token || !user) {
|
||||
setPanelType("profile");
|
||||
setPanelOpen(true);
|
||||
throw new Error("Please log in before adding products to the cart.");
|
||||
}
|
||||
const data = await request(
|
||||
"/api/cart/items",
|
||||
{ method: "POST", body: JSON.stringify({ productId, quantity }) },
|
||||
token
|
||||
);
|
||||
setCart(data.cart);
|
||||
showToast({
|
||||
title: "Added to cart",
|
||||
message: itemMessage || data.message,
|
||||
actionLabel: "To the cart",
|
||||
actionPanel: "cart",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[run, showToast, token, user]
|
||||
);
|
||||
|
||||
const updateCartQuantity = useCallback(
|
||||
(productId, quantity) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
`/api/cart/items/${encodeURIComponent(productId)}`,
|
||||
{ method: "PATCH", body: JSON.stringify({ quantity }) },
|
||||
token
|
||||
);
|
||||
setCart(data.cart);
|
||||
return data;
|
||||
}),
|
||||
[run, token]
|
||||
);
|
||||
|
||||
const removeCartItem = useCallback(
|
||||
(productId) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
`/api/cart/items/${encodeURIComponent(productId)}`,
|
||||
{ method: "DELETE" },
|
||||
token
|
||||
);
|
||||
setCart(data.cart);
|
||||
return data;
|
||||
}),
|
||||
[run, token]
|
||||
);
|
||||
|
||||
const checkout = useCallback(
|
||||
(payload) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
"/api/cart/checkout",
|
||||
{ method: "POST", body: JSON.stringify(payload) },
|
||||
token
|
||||
);
|
||||
applyState(data);
|
||||
showToast({
|
||||
title: "Checkout complete",
|
||||
message: "Your order was placed and your purchase history was updated.",
|
||||
actionLabel: "Profile",
|
||||
actionPanel: "profile",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[applyState, run, showToast, token]
|
||||
);
|
||||
|
||||
const updateProfile = useCallback(
|
||||
(payload) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
"/api/profile",
|
||||
{ method: "PATCH", body: JSON.stringify(payload) },
|
||||
token
|
||||
);
|
||||
setUser(data.user);
|
||||
showToast({
|
||||
title: "Profile saved",
|
||||
message: "Your profile details were updated.",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[run, showToast, token]
|
||||
);
|
||||
|
||||
const updateNotifications = useCallback(
|
||||
(payload) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
"/api/notifications",
|
||||
{ method: "PATCH", body: JSON.stringify(payload) },
|
||||
token
|
||||
);
|
||||
setUser((current) =>
|
||||
current ? { ...current, notifications: data.notifications } : current
|
||||
);
|
||||
showToast({
|
||||
title: "Preferences saved",
|
||||
message: "Your drop and restock settings were updated.",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[run, showToast, token]
|
||||
);
|
||||
|
||||
const subscribeToProduct = useCallback(
|
||||
(productId, type = "restock") =>
|
||||
run(async () => {
|
||||
if (!token || !user) {
|
||||
setPanelType("profile");
|
||||
setPanelOpen(true);
|
||||
throw new Error("Please log in to subscribe to restock updates.");
|
||||
}
|
||||
const data = await request(
|
||||
"/api/product-subscriptions",
|
||||
{ method: "POST", body: JSON.stringify({ product_id: productId, type }) },
|
||||
token
|
||||
);
|
||||
setUser((current) =>
|
||||
current ? { ...current, productSubscriptions: data.subscriptions } : current
|
||||
);
|
||||
showToast({
|
||||
title: "Subscription saved",
|
||||
message: "You will receive updates for this product.",
|
||||
actionLabel: "Profile",
|
||||
actionPanel: "profile",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[run, showToast, token, user]
|
||||
);
|
||||
|
||||
const removeProductSubscription = useCallback(
|
||||
(subscriptionId) =>
|
||||
run(async () => {
|
||||
const data = await request(
|
||||
`/api/product-subscriptions/${encodeURIComponent(subscriptionId)}`,
|
||||
{ method: "DELETE" },
|
||||
token
|
||||
);
|
||||
setUser((current) =>
|
||||
current ? { ...current, productSubscriptions: data.subscriptions } : current
|
||||
);
|
||||
showToast({
|
||||
title: "Subscription removed",
|
||||
message: "That restock update was deleted.",
|
||||
});
|
||||
return data;
|
||||
}),
|
||||
[run, showToast, token]
|
||||
);
|
||||
|
||||
const refreshSession = useCallback(
|
||||
() =>
|
||||
token
|
||||
? request("/api/auth/session", {}, token).then((data) => {
|
||||
applyState(data);
|
||||
return data;
|
||||
})
|
||||
: Promise.resolve(null),
|
||||
[applyState, token]
|
||||
);
|
||||
|
||||
const value = useMemo(
|
||||
() => ({
|
||||
token,
|
||||
user,
|
||||
cart,
|
||||
orders,
|
||||
busy,
|
||||
error,
|
||||
panelOpen,
|
||||
panelType,
|
||||
cartToast,
|
||||
register,
|
||||
login,
|
||||
logout,
|
||||
updateProfile,
|
||||
updateNotifications,
|
||||
addToCart,
|
||||
updateCartQuantity,
|
||||
removeCartItem,
|
||||
checkout,
|
||||
subscribeToProduct,
|
||||
removeProductSubscription,
|
||||
refreshSession,
|
||||
openCart,
|
||||
openProfile,
|
||||
closePanel,
|
||||
dismissToast,
|
||||
showToast,
|
||||
setPanelType,
|
||||
setPanelOpen,
|
||||
setError,
|
||||
}),
|
||||
[
|
||||
token,
|
||||
user,
|
||||
cart,
|
||||
orders,
|
||||
busy,
|
||||
error,
|
||||
panelOpen,
|
||||
panelType,
|
||||
cartToast,
|
||||
register,
|
||||
login,
|
||||
logout,
|
||||
updateProfile,
|
||||
updateNotifications,
|
||||
addToCart,
|
||||
updateCartQuantity,
|
||||
removeCartItem,
|
||||
checkout,
|
||||
subscribeToProduct,
|
||||
removeProductSubscription,
|
||||
refreshSession,
|
||||
openCart,
|
||||
openProfile,
|
||||
closePanel,
|
||||
dismissToast,
|
||||
showToast,
|
||||
]
|
||||
);
|
||||
|
||||
return <ShopContext.Provider value={value}>{children}</ShopContext.Provider>;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { createContext } from "react";
|
||||
|
||||
export const ShopContext = createContext(null);
|
||||
@@ -0,0 +1,5 @@
|
||||
export const formatChf = (cents = 0) =>
|
||||
new Intl.NumberFormat("de-CH", {
|
||||
style: "currency",
|
||||
currency: "CHF",
|
||||
}).format(cents / 100);
|
||||
@@ -0,0 +1,10 @@
|
||||
import { useContext } from "react";
|
||||
import { ShopContext } from "./ShopContextBase";
|
||||
|
||||
export const useShop = () => {
|
||||
const value = useContext(ShopContext);
|
||||
if (!value) {
|
||||
throw new Error("useShop must be used inside ShopProvider.");
|
||||
}
|
||||
return value;
|
||||
};
|
||||
@@ -17,6 +17,9 @@
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
padding: 8px 14px;
|
||||
@@ -24,6 +27,51 @@
|
||||
transition: 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-link--brand {
|
||||
padding: 8px 12px;
|
||||
}
|
||||
|
||||
.nav-brand-logo {
|
||||
display: block;
|
||||
width: clamp(56px, 5.4vw, 78px);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.nav-button {
|
||||
border: none;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nav-theme-switch {
|
||||
min-width: auto;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.nav-theme-switch__track {
|
||||
position: relative;
|
||||
width: 38px;
|
||||
height: 20px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 2px;
|
||||
transition: background-color 0.2s ease, border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-theme-switch__thumb {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 50%;
|
||||
transform: translateX(0);
|
||||
transition: transform 0.2s ease, background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.nav-theme-switch.is-light .nav-theme-switch__thumb {
|
||||
transform: translateX(18px);
|
||||
}
|
||||
|
||||
/* Hero variant */
|
||||
.navbar--hero {
|
||||
padding-top: 22px;
|
||||
@@ -37,6 +85,19 @@
|
||||
color: rgba(255, 255, 255, 0.88);
|
||||
}
|
||||
|
||||
.navbar--hero .nav-button {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.navbar--hero .nav-theme-switch__track {
|
||||
border-color: rgba(255, 255, 255, 0.34);
|
||||
background: rgba(255, 255, 255, 0.14);
|
||||
}
|
||||
|
||||
.navbar--hero .nav-theme-switch__thumb {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.navbar--hero .nav-link:hover,
|
||||
.navbar--hero .nav-link.active {
|
||||
background: rgba(255, 255, 255, 0.22);
|
||||
@@ -49,16 +110,29 @@
|
||||
|
||||
.navbar--light .nav-pill {
|
||||
background: rgba(255, 255, 255, 0.88);
|
||||
border: 1px solid #d6d6d6;
|
||||
border: 1px solid var(--theme-border);
|
||||
}
|
||||
|
||||
.navbar--light .nav-link {
|
||||
color: #1d1d1d;
|
||||
color: var(--theme-text);
|
||||
}
|
||||
|
||||
.navbar--light .nav-button {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.navbar--light .nav-theme-switch__track {
|
||||
border-color: rgba(38, 38, 38, 0.24);
|
||||
background: rgba(38, 38, 38, 0.08);
|
||||
}
|
||||
|
||||
.navbar--light .nav-theme-switch__thumb {
|
||||
background: var(--theme-text);
|
||||
}
|
||||
|
||||
.navbar--light .nav-link:hover,
|
||||
.navbar--light .nav-link.active {
|
||||
background: #ebebeb;
|
||||
background: var(--theme-surface-soft);
|
||||
}
|
||||
|
||||
/* --- Shared Navbar End --- */
|
||||
@@ -73,4 +147,18 @@
|
||||
padding: 8px 10px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-link--brand {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.nav-brand-logo {
|
||||
width: 54px;
|
||||
}
|
||||
|
||||
.nav-theme-switch {
|
||||
min-width: auto;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.reveal-line-mask {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
padding-bottom: 0.08em;
|
||||
margin-bottom: -0.08em;
|
||||
}
|
||||
|
||||
.reveal-line {
|
||||
display: block;
|
||||
will-change: transform;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
[data-reveal="fade"] {
|
||||
will-change: transform, opacity;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import { createContext, useContext } from "react";
|
||||
|
||||
const ThemeContext = createContext(null);
|
||||
|
||||
function ThemeProvider({ value, children }) {
|
||||
return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>;
|
||||
}
|
||||
|
||||
function useTheme() {
|
||||
const context = useContext(ThemeContext);
|
||||
if (!context) {
|
||||
throw new Error("useTheme must be used within ThemeProvider.");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
export { ThemeProvider, useTheme };
|
||||
@@ -8,4 +8,9 @@ export default defineConfig({
|
||||
react(),
|
||||
babel({ presets: [reactCompilerPreset()] })
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": "http://localhost:4174",
|
||||
},
|
||||
},
|
||||
})
|
||||