Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f29ff1a3f9 | |||
| 95c2b8a60c | |||
| 373d655bae | |||
| 535d6e0737 | |||
| 2fb193bac2 | |||
| 286ffda457 | |||
| 79372d6b2e | |||
| 2784c0f2c6 | |||
| bef2da62d4 | |||
| b01a2fee0a | |||
| 52d30233fc | |||
| 6b4a600b7f | |||
| 4ca9ee39e7 | |||
| 8c3a6699db | |||
| a75bd6ee5f | |||
| 693d87954c | |||
| c586ce8b9d | |||
| e25e2a1d05 | |||
| 4113f06da3 | |||
| 6f8f4f65ba | |||
| 11f007066d | |||
| 6c62b1034e | |||
| 9b61ac8633 | |||
| 8904a7cf90 | |||
| c4d922b903 | |||
| d88761032a | |||
| fca329024a | |||
| c04a6b0335 | |||
| 5bea7b14dd | |||
| 4ee49a70fd | |||
| 1da3a53ee5 | |||
| c6cf3c39ed | |||
| ae6f31f982 | |||
| f99c8d11ab | |||
| c5b4aca426 | |||
| a83e97f075 | |||
| e796b2eb41 | |||
| c6f33b142b | |||
| e3c6cfe5f5 | |||
| 482d7559d8 | |||
| 6605455ce5 | |||
| 1eee428e71 | |||
| 44d9fe834c | |||
| 7eb7321680 | |||
| b66c54ff57 | |||
| c70bc7c4e2 | |||
| 39c5e58af4 | |||
| 7a4f3dd62e | |||
| d27f7e7d53 | |||
| a71bc18c91 | |||
| c9c0608898 | |||
| 60f056b8ec | |||
| 34907bbdb5 | |||
| c3636b0166 | |||
| 40e5db6551 | |||
| c4985aae6d | |||
| 6fbf988c38 | |||
| c5ef5d49c0 | |||
| e2a1fb9151 | |||
| 353087e458 | |||
| 4ca52e361a | |||
| 99d727c0a0 | |||
| e19015a697 | |||
| 9165fb8776 | |||
| 17522dcd65 | |||
| 3d05147188 | |||
| 21acc115b8 | |||
| 8714f3a73d | |||
| 36f04bc18a | |||
| 3d92eca334 | |||
| a3362019ac | |||
| a254503516 | |||
| 950b3ba8f6 | |||
| ce66f54192 | |||
| 263afe76b3 | |||
| 15ab8a999d | |||
| 009f796c0f | |||
| f31e8081a5 | |||
| 3b743d07ce |
2
.idea/Webshop.iml
generated
2
.idea/Webshop.iml
generated
@ -5,7 +5,7 @@
|
|||||||
<content url="file://$MODULE_DIR$" />
|
<content url="file://$MODULE_DIR$" />
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="font-awesome" level="application" />
|
<orderEntry type="library" name="boxicons" level="application" />
|
||||||
<orderEntry type="library" name="boxicons" level="application" />
|
<orderEntry type="library" name="boxicons" level="application" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
2
.idea/jsLibraryMappings.xml
generated
2
.idea/jsLibraryMappings.xml
generated
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="JavaScriptLibraryMappings">
|
<component name="JavaScriptLibraryMappings">
|
||||||
<file url="file://$PROJECT_DIR$" libraries="{HTML, HTTP Pre-Request and Response Handler}" />
|
<file url="file://$PROJECT_DIR$" libraries="{HTML, HTTP Pre-Request and Response Handler, boxicons}" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@ -2,15 +2,15 @@ USE webshop;
|
|||||||
|
|
||||||
-- Product Categories
|
-- Product Categories
|
||||||
INSERT INTO product_category (id, name)
|
INSERT INTO product_category (id, name)
|
||||||
VALUES (1, 'Electronics');
|
VALUES (1, 'Motorräder');
|
||||||
INSERT INTO product_category (id, name)
|
INSERT INTO product_category (id, name)
|
||||||
VALUES (2, 'Home Appliances');
|
VALUES (2, 'Oldtimer');
|
||||||
INSERT INTO product_category (id, name)
|
INSERT INTO product_category (id, name)
|
||||||
VALUES (3, 'Clothing');
|
VALUES (3, 'Sportwägen');
|
||||||
INSERT INTO product_category (id, name)
|
INSERT INTO product_category (id, name)
|
||||||
VALUES (4, 'Sports');
|
VALUES (4, 'LKWs');
|
||||||
INSERT INTO product_category (id, name)
|
INSERT INTO product_category (id, name)
|
||||||
VALUES (5, 'Books');
|
VALUES (5, 'Kleinwägen');
|
||||||
|
|
||||||
-- Discounts
|
-- Discounts
|
||||||
INSERT INTO discount (id, name, description, discount_percent, active)
|
INSERT INTO discount (id, name, description, discount_percent, active)
|
||||||
@ -26,45 +26,45 @@ VALUES (5, 'Holiday Deal', 'Description for Holiday Deal', 20, TRUE);
|
|||||||
|
|
||||||
-- Users
|
-- Users
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (1, 'User1', LOWER('User1'), 'user1@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (1, 'User1', LOWER('User1'), 'user1@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (2, 'User2', LOWER('User2'), 'user2@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (2, 'User2', LOWER('User2'), 'user2@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (3, 'User3', LOWER('User3'), 'user3@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (3, 'User3', LOWER('User3'), 'user3@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (4, 'User4', LOWER('User4'), 'user4@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (4, 'User4', LOWER('User4'), 'user4@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (5, 'User5', LOWER('User5'), 'user5@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (5, 'User5', LOWER('User5'), 'user5@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (6, 'User6', LOWER('User6'), 'user6@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (6, 'User6', LOWER('User6'), 'user6@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (7, 'User7', LOWER('User7'), 'user7@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (7, 'User7', LOWER('User7'), 'user7@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (8, 'User8', LOWER('User8'), 'user8@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (8, 'User8', LOWER('User8'), 'user8@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (9, 'User9', LOWER('User9'), 'user9@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (9, 'User9', LOWER('User9'), 'user9@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (10, 'User10', LOWER('User10'), 'user10@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (10, 'User10', LOWER('User10'), 'user10@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (11, 'User11', LOWER('User11'), 'user11@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (11, 'User11', LOWER('User11'), 'user11@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (12, 'User12', LOWER('User12'), 'user12@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (12, 'User12', LOWER('User12'), 'user12@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (13, 'User13', LOWER('User13'), 'user13@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (13, 'User13', LOWER('User13'), 'user13@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (14, 'User14', LOWER('User14'), 'user14@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (14, 'User14', LOWER('User14'), 'user14@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (15, 'User15', LOWER('User15'), 'user15@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (15, 'User15', LOWER('User15'), 'user15@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (16, 'User16', LOWER('User16'), 'user16@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (16, 'User16', LOWER('User16'), 'user16@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (17, 'User17', LOWER('User17'), 'user17@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (17, 'User17', LOWER('User17'), 'user17@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (18, 'User18', LOWER('User18'), 'user18@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (18, 'User18', LOWER('User18'), 'user18@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (19, 'User19', LOWER('User19'), 'user19@example.com', 'password123', 'bcrypt',FALSE);
|
VALUES (19, 'User19', LOWER('User19'), 'user19@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt',FALSE);
|
||||||
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
INSERT INTO user (id, name, lower_name, email, passwd, passwd_hash_algo, is_admin)
|
||||||
VALUES (20, 'User20', LOWER('User20'), 'user20@example.com', 'password123', 'bcrypt', FALSE);
|
VALUES (20, 'User20', LOWER('User20'), 'user20@example.com', '$2b$10$EUsWCS278AwwfZ9K7G4fkellUSPGAOs0hhXkIDbakVGJYE72mNMAC', 'bcrypt', FALSE);
|
||||||
|
|
||||||
-- User Addresses
|
-- User Addresses
|
||||||
INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone)
|
INSERT INTO user_address (user_id, address_line1, address_line2, city, postal_code, country, telephone)
|
||||||
|
|||||||
646
package-lock.json
generated
646
package-lock.json
generated
@ -1,23 +1,52 @@
|
|||||||
{
|
{
|
||||||
"name": "sniper",
|
"name": "webshop",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sniper",
|
"name": "webshop",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"app-root-path": "^3.1.0",
|
"app-root-path": "^3.1.0",
|
||||||
|
"bcrypt": "^5.1.1",
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"express-session": "^1.18.1",
|
"express-session": "^1.18.1",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"mysql2": "^3.12.0",
|
"mysql2": "^3.12.0",
|
||||||
"path": "^0.12.7"
|
"node": "^22.15.0",
|
||||||
|
"path": "^0.12.7",
|
||||||
|
"server.js": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@mapbox/node-pre-gyp": {
|
||||||
|
"version": "1.0.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
|
||||||
|
"integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",
|
||||||
|
"license": "BSD-3-Clause",
|
||||||
|
"dependencies": {
|
||||||
|
"detect-libc": "^2.0.0",
|
||||||
|
"https-proxy-agent": "^5.0.0",
|
||||||
|
"make-dir": "^3.1.0",
|
||||||
|
"node-fetch": "^2.6.7",
|
||||||
|
"nopt": "^5.0.0",
|
||||||
|
"npmlog": "^5.0.1",
|
||||||
|
"rimraf": "^3.0.2",
|
||||||
|
"semver": "^7.3.5",
|
||||||
|
"tar": "^6.1.11"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"node-pre-gyp": "bin/node-pre-gyp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/abbrev": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/accepts": {
|
"node_modules/accepts": {
|
||||||
"version": "1.3.8",
|
"version": "1.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
||||||
@ -30,6 +59,50 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/agent-base": {
|
||||||
|
"version": "6.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||||
|
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/agent-base/node_modules/debug": {
|
||||||
|
"version": "4.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||||
|
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "^2.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"supports-color": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/agent-base/node_modules/ms": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/ansi-regex": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/app-root-path": {
|
"node_modules/app-root-path": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz",
|
||||||
@ -39,6 +112,40 @@
|
|||||||
"node": ">= 6.0.0"
|
"node": ">= 6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/aproba": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/are-we-there-yet": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
|
||||||
|
"deprecated": "This package is no longer supported.",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"delegates": "^1.0.0",
|
||||||
|
"readable-stream": "^3.6.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/are-we-there-yet/node_modules/readable-stream": {
|
||||||
|
"version": "3.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||||
|
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"inherits": "^2.0.3",
|
||||||
|
"string_decoder": "^1.1.1",
|
||||||
|
"util-deprecate": "^1.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/array-flatten": {
|
"node_modules/array-flatten": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||||
@ -53,6 +160,26 @@
|
|||||||
"node": ">= 6.0.0"
|
"node": ">= 6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/balanced-match": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/bcrypt": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@mapbox/node-pre-gyp": "^1.0.11",
|
||||||
|
"node-addon-api": "^5.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/bignumber.js": {
|
"node_modules/bignumber.js": {
|
||||||
"version": "9.0.0",
|
"version": "9.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz",
|
||||||
@ -84,6 +211,16 @@
|
|||||||
"npm": "1.2.8000 || >= 1.4.16"
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/brace-expansion": {
|
||||||
|
"version": "1.1.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"balanced-match": "^1.0.0",
|
||||||
|
"concat-map": "0.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/bytes": {
|
"node_modules/bytes": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
||||||
@ -110,6 +247,36 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/chownr": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/color-support": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
|
||||||
|
"license": "ISC",
|
||||||
|
"bin": {
|
||||||
|
"color-support": "bin.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/concat-map": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
|
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/console-control-strings": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/content-disposition": {
|
"node_modules/content-disposition": {
|
||||||
"version": "0.5.4",
|
"version": "0.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
||||||
@ -171,6 +338,12 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/delegates": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/denque": {
|
"node_modules/denque": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
||||||
@ -197,6 +370,15 @@
|
|||||||
"npm": "1.2.8000 || >= 1.4.16"
|
"npm": "1.2.8000 || >= 1.4.16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/detect-libc": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/dotenv": {
|
"node_modules/dotenv": {
|
||||||
"version": "16.4.7",
|
"version": "16.4.7",
|
||||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz",
|
||||||
@ -214,6 +396,12 @@
|
|||||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||||
},
|
},
|
||||||
|
"node_modules/emoji-regex": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/encodeurl": {
|
"node_modules/encodeurl": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
||||||
@ -364,6 +552,36 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/fs-minipass": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"minipass": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fs-minipass/node_modules/minipass": {
|
||||||
|
"version": "3.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
|
||||||
|
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fs.realpath": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/function-bind": {
|
"node_modules/function-bind": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||||
@ -372,6 +590,27 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/gauge": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
|
||||||
|
"deprecated": "This package is no longer supported.",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"aproba": "^1.0.3 || ^2.0.0",
|
||||||
|
"color-support": "^1.1.2",
|
||||||
|
"console-control-strings": "^1.0.0",
|
||||||
|
"has-unicode": "^2.0.1",
|
||||||
|
"object-assign": "^4.1.1",
|
||||||
|
"signal-exit": "^3.0.0",
|
||||||
|
"string-width": "^4.2.3",
|
||||||
|
"strip-ansi": "^6.0.1",
|
||||||
|
"wide-align": "^1.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/generate-function": {
|
"node_modules/generate-function": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
||||||
@ -399,6 +638,27 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/glob": {
|
||||||
|
"version": "7.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||||
|
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||||
|
"deprecated": "Glob versions prior to v9 are no longer supported",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"fs.realpath": "^1.0.0",
|
||||||
|
"inflight": "^1.0.4",
|
||||||
|
"inherits": "2",
|
||||||
|
"minimatch": "^3.1.1",
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"path-is-absolute": "^1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/gopd": {
|
"node_modules/gopd": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||||
@ -443,6 +703,12 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/has-unicode": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/hasown": {
|
"node_modules/hasown": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||||
@ -469,6 +735,42 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/https-proxy-agent": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"agent-base": "6",
|
||||||
|
"debug": "4"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/https-proxy-agent/node_modules/debug": {
|
||||||
|
"version": "4.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
||||||
|
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ms": "^2.1.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"supports-color": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/https-proxy-agent/node_modules/ms": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/iconv-lite": {
|
"node_modules/iconv-lite": {
|
||||||
"version": "0.4.24",
|
"version": "0.4.24",
|
||||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||||
@ -480,6 +782,17 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/inflight": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
|
||||||
|
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"once": "^1.3.0",
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/inherits": {
|
"node_modules/inherits": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||||
@ -493,6 +806,15 @@
|
|||||||
"node": ">= 0.10"
|
"node": ">= 0.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/is-fullwidth-code-point": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/is-property": {
|
"node_modules/is-property": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
||||||
@ -534,6 +856,30 @@
|
|||||||
"url": "https://github.com/sponsors/wellwelwel"
|
"url": "https://github.com/sponsors/wellwelwel"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/make-dir": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"semver": "^6.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/make-dir/node_modules/semver": {
|
||||||
|
"version": "6.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||||
|
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/media-typer": {
|
"node_modules/media-typer": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||||
@ -588,6 +934,64 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/minimatch": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"brace-expansion": "^1.1.7"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/minipass": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
|
||||||
|
"license": "ISC",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/minizlib": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"minipass": "^3.0.0",
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/minizlib/node_modules/minipass": {
|
||||||
|
"version": "3.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
|
||||||
|
"integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mkdirp": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"bin": {
|
||||||
|
"mkdirp": "bin/cmd.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
@ -597,6 +1001,7 @@
|
|||||||
"version": "2.18.1",
|
"version": "2.18.1",
|
||||||
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
|
"resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz",
|
||||||
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
|
"integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bignumber.js": "9.0.0",
|
"bignumber.js": "9.0.0",
|
||||||
"readable-stream": "2.3.7",
|
"readable-stream": "2.3.7",
|
||||||
@ -673,6 +1078,91 @@
|
|||||||
"node": ">= 0.6"
|
"node": ">= 0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/node": {
|
||||||
|
"version": "22.15.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/node/-/node-22.15.0.tgz",
|
||||||
|
"integrity": "sha512-qrOEL83lNt+Jbh9pekl5xQrZK+QRJz51m2IGGCu2NENgbG6Go0D1QUBvjbejP8jB2eokQpX1AorDLbKQ/FxuYA==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"node-bin-setup": "^1.0.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"node": "bin/node"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"npm": ">=5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/node-addon-api": {
|
||||||
|
"version": "5.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
|
||||||
|
"integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
|
"node_modules/node-bin-setup": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/node-fetch": {
|
||||||
|
"version": "2.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||||
|
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"whatwg-url": "^5.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "4.x || >=6.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"encoding": "^0.1.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"encoding": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/nopt": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"abbrev": "1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"nopt": "bin/nopt.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/npmlog": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
|
||||||
|
"deprecated": "This package is no longer supported.",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"are-we-there-yet": "^2.0.0",
|
||||||
|
"console-control-strings": "^1.1.0",
|
||||||
|
"gauge": "^3.0.0",
|
||||||
|
"set-blocking": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/object-assign": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||||
|
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/object-inspect": {
|
"node_modules/object-inspect": {
|
||||||
"version": "1.13.2",
|
"version": "1.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz",
|
||||||
@ -703,6 +1193,15 @@
|
|||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/once": {
|
||||||
|
"version": "1.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
|
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"wrappy": "1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/parseurl": {
|
"node_modules/parseurl": {
|
||||||
"version": "1.3.3",
|
"version": "1.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
@ -720,6 +1219,15 @@
|
|||||||
"util": "^0.10.3"
|
"util": "^0.10.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/path-is-absolute": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/path-to-regexp": {
|
"node_modules/path-to-regexp": {
|
||||||
"version": "0.1.12",
|
"version": "0.1.12",
|
||||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
||||||
@ -814,6 +1322,22 @@
|
|||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
},
|
},
|
||||||
|
"node_modules/rimraf": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
||||||
|
"deprecated": "Rimraf versions prior to v4 are no longer supported",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"glob": "^7.1.3"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"rimraf": "bin.js"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/safe-buffer": {
|
"node_modules/safe-buffer": {
|
||||||
"version": "5.2.1",
|
"version": "5.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||||
@ -838,6 +1362,18 @@
|
|||||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/semver": {
|
||||||
|
"version": "7.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz",
|
||||||
|
"integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==",
|
||||||
|
"license": "ISC",
|
||||||
|
"bin": {
|
||||||
|
"semver": "bin/semver.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/send": {
|
"node_modules/send": {
|
||||||
"version": "0.19.0",
|
"version": "0.19.0",
|
||||||
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
||||||
@ -893,6 +1429,18 @@
|
|||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/server.js": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/server.js/-/server.js-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-fO4IvzkZ09bBB++XU/gWGuzxJs0OpghSd/34mlW8coMoakLzj/+W5d1pHX+I+7H52GkBKu96UQU0K5vptNjaqg==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/set-blocking": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/set-function-length": {
|
"node_modules/set-function-length": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||||
@ -931,6 +1479,12 @@
|
|||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/signal-exit": {
|
||||||
|
"version": "3.0.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||||
|
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
"node_modules/sqlstring": {
|
"node_modules/sqlstring": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz",
|
||||||
@ -960,6 +1514,49 @@
|
|||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
},
|
},
|
||||||
|
"node_modules/string-width": {
|
||||||
|
"version": "4.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||||
|
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"emoji-regex": "^8.0.0",
|
||||||
|
"is-fullwidth-code-point": "^3.0.0",
|
||||||
|
"strip-ansi": "^6.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/strip-ansi": {
|
||||||
|
"version": "6.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||||
|
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": "^5.0.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tar": {
|
||||||
|
"version": "6.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz",
|
||||||
|
"integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"chownr": "^2.0.0",
|
||||||
|
"fs-minipass": "^2.0.0",
|
||||||
|
"minipass": "^5.0.0",
|
||||||
|
"minizlib": "^2.1.1",
|
||||||
|
"mkdirp": "^1.0.3",
|
||||||
|
"yallist": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/toidentifier": {
|
"node_modules/toidentifier": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
||||||
@ -968,6 +1565,12 @@
|
|||||||
"node": ">=0.6"
|
"node": ">=0.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/tr46": {
|
||||||
|
"version": "0.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||||
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/type-is": {
|
"node_modules/type-is": {
|
||||||
"version": "1.6.18",
|
"version": "1.6.18",
|
||||||
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||||
@ -1032,6 +1635,43 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.8"
|
"node": ">= 0.8"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/webidl-conversions": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
||||||
|
"license": "BSD-2-Clause"
|
||||||
|
},
|
||||||
|
"node_modules/whatwg-url": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"tr46": "~0.0.3",
|
||||||
|
"webidl-conversions": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/wide-align": {
|
||||||
|
"version": "1.1.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
|
||||||
|
"integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"string-width": "^1.0.2 || 2 || 3 || 4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/wrappy": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||||
|
"license": "ISC"
|
||||||
|
},
|
||||||
|
"node_modules/yallist": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||||
|
"license": "ISC"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
package.json
11
package.json
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "sniper",
|
"name": "webshop",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"start": "node server.js"
|
"start": "npm install && node server.js"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
@ -12,13 +12,14 @@
|
|||||||
"description": "Webshop Autohändler",
|
"description": "Webshop Autohändler",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"app-root-path": "^3.1.0",
|
"app-root-path": "^3.1.0",
|
||||||
"dotenv": "^16.4.5",
|
"bcrypt": "^5.1.1",
|
||||||
"express": "^4.21.1",
|
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"express": "^4.21.2",
|
"express": "^4.21.2",
|
||||||
"express-session": "^1.18.1",
|
"express-session": "^1.18.1",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"mysql2": "^3.12.0",
|
"mysql2": "^3.12.0",
|
||||||
"path": "^0.12.7"
|
"node": "^22.15.0",
|
||||||
|
"path": "^0.12.7",
|
||||||
|
"server.js": "^1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
38
public/404.html
Normal file
38
public/404.html
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<!--
|
||||||
|
Eine Seite für die Seiten die nicht vorhanden sind.
|
||||||
|
Fehler 404 - Seite nicht gefunden
|
||||||
|
Zeigt eine Meldung und hat einen Link der zurück zur Startseite führt
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Seite nicht gefunden</title>
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="/Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<!-- Hauptinhalt: Fehlermeldung -->
|
||||||
|
<main class="content" style="text-align: center; padding: 80px;">
|
||||||
|
<h1>🚧 Seite nicht gefunden 🚧</h1>
|
||||||
|
<p>Diese Seite existiert nicht oder befindet sich noch in Arbeit.</p>
|
||||||
|
<!-- Button zurück zur Startseite -->
|
||||||
|
<a href="/" class="btn" style="width: auto; display: inline-block; margin-top: 20px;">Zur Startseite</a>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Fußzeiele -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -3,31 +3,119 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Warenkorb</title>
|
<title>Warenkorb</title>
|
||||||
<link rel="stylesheet" href="/Styles/Warenkorb/warenkorb.css">
|
<link rel="stylesheet" href="./Styles/styles-main.css">
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<script src="/header_footer"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="warenkorb">
|
<div class="wrapper">
|
||||||
<h2>🛒 Dein Warenkorb</h2>
|
<!-- Header wird hier dynamisch geladen -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
<div class="item">
|
<main>
|
||||||
<div class="info">
|
<section style="padding: 40px 20px;">
|
||||||
<span class="name">Produkt 1</span>
|
<h1>Dein Warenkorb</h1>
|
||||||
|
<div id="warenkorb"></div>
|
||||||
|
<div id="gesamtpreis-container" style="margin-top: 20px;"></div>
|
||||||
|
<button id="zurKasseGehen" class="btn" style="margin-top: 30px;">Zur Kasse gehen</button>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
</div>
|
<!-- Footer wird dynamisch geladen -->
|
||||||
<button class="remove">Entfernen</button>
|
<div id="footer"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="item">
|
<script>
|
||||||
<div class="info">
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
<span class="name">Produkt 2</span>
|
ladeWarenkorb();
|
||||||
</div>
|
|
||||||
<button class="remove">Entfernen</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="summary">
|
document.getElementById('zurKasseGehen').addEventListener('click', function () {
|
||||||
</div>
|
window.location.href = '/bestellformular'; // Deine Bestellformular-Seite
|
||||||
<button class="zurKasse">Zur Kasse gehen</button>
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</div>
|
function ladeWarenkorb() {
|
||||||
|
const warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
const container = document.getElementById('warenkorb');
|
||||||
|
const gesamtContainer = document.getElementById('gesamtpreis-container');
|
||||||
|
|
||||||
|
container.innerHTML = '';
|
||||||
|
gesamtContainer.innerHTML = '';
|
||||||
|
|
||||||
|
if (warenkorb.length === 0) {
|
||||||
|
container.innerHTML = '<p>Dein Warenkorb ist leer.</p>';
|
||||||
|
document.getElementById('zurKasseGehen').style.display = 'none';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let gesamtpreis = 0;
|
||||||
|
|
||||||
|
const table = document.createElement('table');
|
||||||
|
table.className = 'warenkorb-tabelle';
|
||||||
|
table.innerHTML = `
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Produkt</th>
|
||||||
|
<th>Preis (Stück)</th>
|
||||||
|
<th>Anzahl</th>
|
||||||
|
<th>Zwischensumme</th>
|
||||||
|
<th>Aktion</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const tbody = table.querySelector('tbody');
|
||||||
|
|
||||||
|
warenkorb.forEach((produkt, index) => {
|
||||||
|
const zwischensumme = produkt.price * produkt.quantity;
|
||||||
|
gesamtpreis += zwischensumme;
|
||||||
|
|
||||||
|
const row = document.createElement('tr');
|
||||||
|
row.innerHTML = `
|
||||||
|
<td>${produkt.product_name}</td>
|
||||||
|
<td>${produkt.price.toFixed(2)} €</td>
|
||||||
|
<td>
|
||||||
|
<button class="menge-button" onclick="aendereMenge(${index}, -1)">-</button>
|
||||||
|
<span class="produkt-anzahl">${produkt.quantity}</span>
|
||||||
|
<button class="menge-button" onclick="aendereMenge(${index}, 1)">+</button>
|
||||||
|
</td>
|
||||||
|
<td>${zwischensumme.toFixed(2)} €</td>
|
||||||
|
<td><button onclick="entferneAusWarenkorb(${index})" class="loeschen-button">Entfernen</button></td>
|
||||||
|
`;
|
||||||
|
tbody.appendChild(row);
|
||||||
|
});
|
||||||
|
|
||||||
|
container.appendChild(table);
|
||||||
|
|
||||||
|
gesamtContainer.innerHTML = `<h3>Gesamtsumme: ${gesamtpreis.toFixed(2)} €</h3>`;
|
||||||
|
|
||||||
|
if (window.zeigeWarenkorbAnzahl) {
|
||||||
|
window.zeigeWarenkorbAnzahl();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function entferneAusWarenkorb(index) {
|
||||||
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
warenkorb.splice(index, 1);
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
|
||||||
|
ladeWarenkorb();
|
||||||
|
}
|
||||||
|
|
||||||
|
function aendereMenge(index, aenderung) {
|
||||||
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
warenkorb[index].quantity += aenderung;
|
||||||
|
|
||||||
|
if (warenkorb[index].quantity <= 0) {
|
||||||
|
warenkorb.splice(index, 1); // Produkt löschen, wenn Menge 0 oder kleiner
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
ladeWarenkorb();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
197
public/bestellformular/bestellformular.html
Normal file
197
public/bestellformular/bestellformular.html
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Bestellformular</title>
|
||||||
|
<link rel="stylesheet" href="./Styles/styles-main.css">
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Header wird hier dynamisch geladen -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<div class="form-container">
|
||||||
|
<form method="post" id="bestellform">
|
||||||
|
<h2>Bestellformular</h2>
|
||||||
|
|
||||||
|
<label for="vorname">Vorname:</label>
|
||||||
|
<input type="text" id="Vorname" name="Vorname" required placeholder="Vorname">
|
||||||
|
|
||||||
|
<label for="nachname">Nachname:</label>
|
||||||
|
<input type="text" id="Nachname" name="Nachname" required placeholder="Nachname">
|
||||||
|
|
||||||
|
<label for="kundenNr">Kunden-Nr.:</label>
|
||||||
|
<input type="text" id="KundenNr" name="KundenNr" required placeholder="Kunden Nr.">
|
||||||
|
|
||||||
|
<label for="strasse">Straße:</label>
|
||||||
|
<input type="text" id="strasse" name="strasse" required placeholder="Strasse">
|
||||||
|
|
||||||
|
<label for="hausnummer">Hausnummer:</label>
|
||||||
|
<input type="text" id="hausnummer" name="hausnummer" required placeholder="Hausnummer">
|
||||||
|
|
||||||
|
<label for="ort">Ort:</label>
|
||||||
|
<input type="text" id="ort" name="ort" required placeholder="Ort">
|
||||||
|
|
||||||
|
<label>Artikel-Nr. / Stückzahl:</label>
|
||||||
|
|
||||||
|
<a class="button-submit" id="sendOrder">Bestellung absenden</a>
|
||||||
|
|
||||||
|
<div class="link-text-formular">
|
||||||
|
<br>
|
||||||
|
<p>Zurück zum <a href="/Warenkorb">Warenkorb</a></p>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
const user_id = sessionStorage.getItem('user_id');
|
||||||
|
const email = sessionStorage.getItem('email');
|
||||||
|
const vorname = sessionStorage.getItem('vorname');
|
||||||
|
const nachname = sessionStorage.getItem('nachname');
|
||||||
|
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const kundenNrInput = document.getElementById('KundenNr');
|
||||||
|
const VornameInput = document.getElementById('Vorname');
|
||||||
|
const NachnameInput = document.getElementById('Nachname');
|
||||||
|
|
||||||
|
const isLoggedIn = user_id && vorname && nachname;
|
||||||
|
|
||||||
|
if (isLoggedIn) {
|
||||||
|
kundenNrInput.value = user_id;
|
||||||
|
VornameInput.value = vorname;
|
||||||
|
NachnameInput.value = nachname;
|
||||||
|
|
||||||
|
// Felder sperren, damit sie nicht bearbeitet werden können
|
||||||
|
kundenNrInput.readOnly = true;
|
||||||
|
VornameInput.readOnly = true;
|
||||||
|
NachnameInput.readOnly = true;
|
||||||
|
} else {
|
||||||
|
// Felder leer lassen & bearbeitbar
|
||||||
|
kundenNrInput.readOnly = false;
|
||||||
|
VornameInput.readOnly = false;
|
||||||
|
NachnameInput.readOnly = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("User ID from sessionStorage:", user_id);
|
||||||
|
console.log("E-Mail from sessionStorage:", email);
|
||||||
|
console.log("Vorname from sessionStorage:", vorname);
|
||||||
|
console.log("Nachname from sessionStorage:", nachname);
|
||||||
|
|
||||||
|
|
||||||
|
const sendButton = document.getElementById('sendOrder');
|
||||||
|
ladeWarenkorb();
|
||||||
|
|
||||||
|
// Bestellung absenden
|
||||||
|
sendButton.addEventListener('click', async function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const form = document.getElementById('bestellform');
|
||||||
|
|
||||||
|
// Kundendaten einsammeln
|
||||||
|
const userData = {
|
||||||
|
vorname: form.Vorname.value.trim(),
|
||||||
|
nachname: form.Nachname.value.trim(),
|
||||||
|
kundenNr: form.KundenNr.value.trim(),
|
||||||
|
strasse: form.strasse.value.trim(),
|
||||||
|
hausnummer: form.hausnummer.value.trim(),
|
||||||
|
ort: form.ort.value.trim()
|
||||||
|
};
|
||||||
|
|
||||||
|
// Artikel einsammeln
|
||||||
|
const artikelInputs = document.querySelectorAll('.Artikel');
|
||||||
|
const produkte = [];
|
||||||
|
|
||||||
|
artikelInputs.forEach(artikel => {
|
||||||
|
const artikelNrInput = artikel.querySelector('.ArtikelNrText');
|
||||||
|
const stueckzahlInput = artikel.querySelector('.StueckzahlText');
|
||||||
|
|
||||||
|
if (artikelNrInput && artikelNrInput.value.trim() !== '') {
|
||||||
|
produkte.push({
|
||||||
|
product_id: parseInt(artikelNrInput.value.trim(), 10),
|
||||||
|
quantity: parseInt(stueckzahlInput.value.trim(), 10) || 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (produkte.length === 0) {
|
||||||
|
alert('Bitte mindestens ein Produkt angeben!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
user_id: parseInt(userData.kundenNr, 10),
|
||||||
|
produkte: produkte
|
||||||
|
};
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch('/api/bestellung', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(payload)
|
||||||
|
});
|
||||||
|
|
||||||
|
const result = await response.json();
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
|
// Bestellung erfolgreich → Weiterleitung
|
||||||
|
warenkorbLeeren();
|
||||||
|
window.location.href = "/bestellung";
|
||||||
|
} else {
|
||||||
|
alert('Fehler: ' + result.message);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Fehler beim Abschicken der Bestellung:', error);
|
||||||
|
alert('Serverfehler beim Abschicken der Bestellung.');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function ladeWarenkorb() {
|
||||||
|
// RICHTIG lesen: aus localStorage (nicht sessionStorage!)
|
||||||
|
const warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
const formular = document.getElementById('bestellform');
|
||||||
|
const sendButton = document.getElementById('sendOrder');
|
||||||
|
|
||||||
|
if (warenkorb.length === 0) {
|
||||||
|
console.log('Kein Warenkorb gefunden oder Warenkorb ist leer.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
warenkorb.forEach(produkt => {
|
||||||
|
const artikelDiv = document.createElement('div');
|
||||||
|
artikelDiv.className = 'Artikel';
|
||||||
|
artikelDiv.innerHTML = `
|
||||||
|
<input type="text" class="ArtikelNrText" name="ArtikelNr" value="${produkt.product_id}" required readonly ="Artikel Nr.">
|
||||||
|
<input type="text" class="StueckzahlText" name="Stueckzahl" value="${produkt.quantity}" required readonly ="Anzahl">
|
||||||
|
<div class="verfuegbarkeit"></div>
|
||||||
|
`;
|
||||||
|
|
||||||
|
formular.insertBefore(artikelDiv, sendButton);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.warenkorbLeeren = function () {
|
||||||
|
localStorage.removeItem('warenkorb'); // Oder: localStorage.setItem('warenkorb', '[]');
|
||||||
|
ladeWarenkorb(); // Aktualisiert die Ansicht
|
||||||
|
if (window.zeigeWarenkorbAnzahl) zeigeWarenkorbAnzahl(); // Warenkorb-Zähler im Header aktualisieren
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Footer wird dynamisch geladen -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
105
public/bestellung/bestellung.html
Normal file
105
public/bestellung/bestellung.html
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Ihre Bestellung</title>
|
||||||
|
<link rel="stylesheet" href="/Styles/styles-main.css">
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Header wird hier dynamisch geladen -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h2>Ihre Bestellung:</h2>
|
||||||
|
<div id="bestellung">
|
||||||
|
<!-- Platzhalter für die Bestellinformationen -->
|
||||||
|
<div class="bestell-info-card">
|
||||||
|
<p><strong>Kundennummer:</strong> <span id="kundenNr"></span></p>
|
||||||
|
<p><strong>Produkt-ID:</strong> <span id="produktId"></span></p>
|
||||||
|
<p><strong>Produktname:</strong> <span id="produktName"></span></p>
|
||||||
|
<p><strong>Preis:</strong> <span id="preis"></span></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
async function ladeBestellung() {
|
||||||
|
const user_id = sessionStorage.getItem('user_id');
|
||||||
|
if (!user_id) {
|
||||||
|
alert('Sie sind nicht eingeloggt! Bitte loggen Sie sich ein.');
|
||||||
|
window.location.href = '/login';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch('/api/bestellung/daten', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({user_id: user_id})
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
|
const daten = await response.json();
|
||||||
|
const bestellungContainer = document.getElementById('bestellung');
|
||||||
|
bestellungContainer.innerHTML = '';
|
||||||
|
|
||||||
|
const bestellungen = {};
|
||||||
|
|
||||||
|
daten.forEach(item => {
|
||||||
|
if (!bestellungen[item.order_id]) {
|
||||||
|
bestellungen[item.order_id] = {
|
||||||
|
total: item.order_total,
|
||||||
|
produkte: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
bestellungen[item.order_id].produkte.push({
|
||||||
|
name: item.product_name,
|
||||||
|
preis: item.product_price,
|
||||||
|
quantity: item.quantity
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
for (const orderId in bestellungen) {
|
||||||
|
const bestellung = bestellungen[orderId];
|
||||||
|
const bestellCard = document.createElement('div');
|
||||||
|
bestellCard.className = 'bestell-info-card';
|
||||||
|
|
||||||
|
let produkteHTML = '';
|
||||||
|
bestellung.produkte.forEach(produkt => {
|
||||||
|
produkteHTML += `
|
||||||
|
<p>• ${produkt.name} — ${produkt.quantity} Stück — Preis: ${produkt.preis.toFixed(2)} €</p>
|
||||||
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
|
bestellCard.innerHTML = `
|
||||||
|
<h3>Bestellnummer: ${orderId}</h3>
|
||||||
|
${produkteHTML}
|
||||||
|
</br>
|
||||||
|
<p><strong>Gesamtsumme:</strong> ${bestellung.total.toFixed(2)} €</p>
|
||||||
|
`;
|
||||||
|
|
||||||
|
bestellungContainer.appendChild(bestellCard);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (response.status === 404) {
|
||||||
|
document.getElementById('bestellung').innerHTML = '<p>Keine Bestellungen gefunden.</p>';
|
||||||
|
} else {
|
||||||
|
console.error('Fehler beim Laden der Bestellungen.');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Fehler: ', error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('DOMContentLoaded', ladeBestellung);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Footer wird dynamisch geladen -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
14
public/header_footer/footer.html
Normal file
14
public/header_footer/footer.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!--
|
||||||
|
Fußzeile des Webshops
|
||||||
|
Zeigt einen Copyright-Hinweis, die Links zum Impressum und Datenschutz sind verlinkt (keine Funktion)
|
||||||
|
-->
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<!-- Copyright-Hinweis -->
|
||||||
|
<p>© 2025 Autohändler Webshop – Alle Rechte vorbehalten</p>
|
||||||
|
<!-- Links zu Impressum und Datenschutz (keine Funktion) -->
|
||||||
|
<p>
|
||||||
|
<a href="/impressum">Impressum</a> |
|
||||||
|
<a href="/datenschutz">Datenschutz</a>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
59
public/header_footer/header.html
Normal file
59
public/header_footer/header.html
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<!--
|
||||||
|
Header-Bereich Einbindung
|
||||||
|
zeigt Logo, Link zur Startseite, Warenkorb (beispielhaft, keine Funktion) und Menüleiste an
|
||||||
|
-->
|
||||||
|
<header>
|
||||||
|
<!-- Logo und Shop-Titel -->
|
||||||
|
<a href="/" class="logo-link">
|
||||||
|
<div class="logo-container">
|
||||||
|
<img src="/images/Logo.png" alt="Modellauto-Shop Logo" class="logo-img">
|
||||||
|
<h1>Modellauto - Shop</h1>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Auf der rechten Seite des Headers befindet sich der Login-Button und der Warenkorb -->
|
||||||
|
<div class="header-right">
|
||||||
|
<!-- Login-Button -->
|
||||||
|
<a href="/login" class="login-btn">
|
||||||
|
<i class='bx bx-user'></i> Login
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Warenkorb-Button mit Icon und Anzeige der Artikelanzahl -->
|
||||||
|
<a href="/warenkorb" class="cart">
|
||||||
|
<i class='bx bx-cart'></i>
|
||||||
|
<span class="cart-count" id="cart-count">0</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Navigationsmenü -->
|
||||||
|
<nav class="menu">
|
||||||
|
<ul class="menu-list">
|
||||||
|
<!-- Startseite Link -->
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="/"><i class='bx bx-home'></i> Startseite</a>
|
||||||
|
</li>
|
||||||
|
<!-- Shop Link mit Dropdown-Menü für die verschiedene Unterkategorien -->
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="/shop"><i class='bx bx-store'></i> Shop</a>
|
||||||
|
<ul class="submenu">
|
||||||
|
<li><a href="/shop/motorrad"> Motorräder</a></li>
|
||||||
|
<li><a href="/shop/oldtimer"> Oldtimer</a></li>
|
||||||
|
<li><a href="/shop/sportwagen"> Sportwagen</a></li>
|
||||||
|
<li><a href="/shop/lkw"> LKWs</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<!-- Link zu über uns-->
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="/ueberuns"><i class='bx bx-group'></i> Über uns</a>
|
||||||
|
</li>
|
||||||
|
<!-- Link zur Kontaktseite-->
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="/kontaktformular"><i class='bx bx-envelope'></i> Kontakt</a>
|
||||||
|
</li>
|
||||||
|
<!-- Link zum Bestellformular-->
|
||||||
|
<li class="menu-item">
|
||||||
|
<a href="/bestellung"><i class='bx bx-notepad'></i> Bestellungen</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
58
public/kontaktformular/kontaktformular.html
Normal file
58
public/kontaktformular/kontaktformular.html
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Kontaktformular</title>
|
||||||
|
<link rel="stylesheet" href="./Styles/styles-main.css">
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<section style="padding: 40px 20px; max-width: 700px; margin: 0 auto;">
|
||||||
|
<h1>Kontaktieren Sie uns</h1>
|
||||||
|
<p style="margin-bottom: 30px;">Sie haben Fragen oder Anregungen? Schreiben Sie uns – wir melden uns
|
||||||
|
schnellstmöglich!</p>
|
||||||
|
|
||||||
|
<form id="contact-form">
|
||||||
|
<div class="input-box">
|
||||||
|
<input type="text" name="name" placeholder="Ihr Name" required>
|
||||||
|
<i class='bx bx-user'></i>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<input type="email" name="email" placeholder="Ihre E-Mail-Adresse" required>
|
||||||
|
<i class='bx bx-envelope'></i>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<input type="text" name="betreff" placeholder="Betreff" required>
|
||||||
|
<i class='bx bx-edit-alt'></i>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<textarea name="nachricht" placeholder="Ihre Nachricht" rows="6"
|
||||||
|
style="width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 5px; font-size: 16px;"
|
||||||
|
required></textarea>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn">Nachricht senden</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.getElementById('contact-form').addEventListener('submit', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
alert('Vielen Dank für Ihre Nachricht! Wir melden uns bald bei Ihnen.');
|
||||||
|
this.reset(); // Formular leeren
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -1,33 +1,93 @@
|
|||||||
|
<!--
|
||||||
|
Login-Seite für den Webshop.
|
||||||
|
Die Benutzer können sich mit ihrem Benutzernamen und Passwort anmelden oder sich registreren.
|
||||||
|
-->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Login</title>
|
||||||
|
<!-- Login-CSS-Datei -->
|
||||||
<link rel="stylesheet" href="./Styles/login/login.css">
|
<link rel="stylesheet" href="./Styles/login/login.css">
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="./Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
<title>Login</title>
|
<title>Login</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<!-- Header -->
|
||||||
<form action="login.php" method="POST">
|
<div id="header"></div>
|
||||||
<h1>Login</h1>
|
|
||||||
<div class="input-box">
|
<main class="main-content">
|
||||||
<input type="text" name="username" placeholder="Username" required>
|
<div class="login-container">
|
||||||
<i class='bx bxs-user'></i>
|
<h2 class="title">Login</h2>
|
||||||
</div>
|
|
||||||
<div class="input-box">
|
<!-- Login-Formular -->
|
||||||
<input type="password" id="password" name="password" placeholder="Passwort" required>
|
<form class="login-form">
|
||||||
<i class='bx bxs-lock-alt' id="togglePassword" onclick="togglePassword()"></i>
|
|
||||||
|
<!-- Eingabefeld für Benutzername -->
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="email" type="email" placeholder="E-Mail" required/>
|
||||||
|
<i class="icon fas fa-user"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn">Login</button>
|
<!-- Eingabefeld für Passwort -->
|
||||||
|
<div class="input-group">
|
||||||
<div class="register-link">
|
<input id="password" type="password" placeholder="Passwort" required/>
|
||||||
<br>
|
<i class="icon fas fa-lock"></i>
|
||||||
<p>Noch keinen Account? <a href="/registrieren">Registrieren</a></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Login-Button -->
|
||||||
|
<button type="submit" class="login-btn" id="submit">Login</button>
|
||||||
|
|
||||||
|
<!-- Link zur Registrierungsseite -->
|
||||||
|
<p class="register-text">
|
||||||
|
Noch keinen Account? <a href="/registrieren">Registrieren</a>
|
||||||
|
</p>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script src="./script.js"></script>
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelector('form').addEventListener('submit', async (event) => {
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
|
const email = document.getElementById('email').value
|
||||||
|
const password = document.getElementById('password').value
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch('/api/user/login', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({email, password})
|
||||||
|
})
|
||||||
|
if (response.ok) {
|
||||||
|
const data = await response.json();
|
||||||
|
sessionStorage.setItem("user_id", data.id)
|
||||||
|
sessionStorage.setItem("vorname", data.name)
|
||||||
|
sessionStorage.setItem("nachname", data.lower_name)
|
||||||
|
alert('Login erfolgreich!');
|
||||||
|
window.location.href = '/'; // Redirect to home page after login
|
||||||
|
} else {
|
||||||
|
const errorData = await response.json()
|
||||||
|
alert('Login fehlgeschlagen: ' + (errorData.message || 'Unbekannter Fehler'))
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Fehler beim Login: ', error)
|
||||||
|
alert('Fehler beim Senden des Logins.')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Fußzeile -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,45 +0,0 @@
|
|||||||
// Funktion, um die Stärke des Passworts zu bewerten
|
|
||||||
function checkPasswordStrength(password) {
|
|
||||||
const strengthBar = document.getElementById('passwordStrengthBar');
|
|
||||||
const passwordStrength = evaluatePasswordStrength(password);
|
|
||||||
|
|
||||||
// Aktualisiere den Sicherheitsbalken basierend auf der Stärke
|
|
||||||
if (passwordStrength === 'weak') {
|
|
||||||
strengthBar.classList.remove('medium', 'strong');
|
|
||||||
strengthBar.classList.add('weak');
|
|
||||||
} else if (passwordStrength === 'medium') {
|
|
||||||
strengthBar.classList.remove('weak', 'strong');
|
|
||||||
strengthBar.classList.add('medium');
|
|
||||||
} else {
|
|
||||||
strengthBar.classList.remove('weak', 'medium');
|
|
||||||
strengthBar.classList.add('strong');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Funktion zur Beurteilung der Passwortstärke
|
|
||||||
function evaluatePasswordStrength(password) {
|
|
||||||
if (password.length >= 8 && /[A-Z]/.test(password) && /[0-9]/.test(password)) {
|
|
||||||
return 'strong';
|
|
||||||
} else if (password.length >= 6) {
|
|
||||||
return 'medium';
|
|
||||||
} else {
|
|
||||||
return 'weak';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Event Listener für das Passwortfeld
|
|
||||||
document.getElementById('regPassword').addEventListener('input', function() {
|
|
||||||
checkPasswordStrength(this.value);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Event Listener für das Bestätigungs-Passwortfeld
|
|
||||||
document.getElementById('confirmPassword').addEventListener('input', function() {
|
|
||||||
const password = document.getElementById('regPassword').value;
|
|
||||||
const confirmPassword = this.value;
|
|
||||||
|
|
||||||
if (password !== confirmPassword) {
|
|
||||||
this.setCustomValidity("Die Passwörter stimmen nicht überein.");
|
|
||||||
} else {
|
|
||||||
this.setCustomValidity("");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@ -1,27 +1,47 @@
|
|||||||
|
<!--
|
||||||
|
Diese Seite beinhaltet ein Registrierungsformular für neue Benutzer.
|
||||||
|
Der Benutzer kann Vorname, Nachname, E-Mail-Adresse und ein Passwort eingeben.
|
||||||
|
Header und Footer werden dynamisch geladen.
|
||||||
|
-->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<!-- Registrieren-CSS-Datei -->
|
||||||
<link rel="stylesheet" href="./Styles/registrieren/registrieren.css">
|
<link rel="stylesheet" href="./Styles/registrieren/registrieren.css">
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="./Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
<title>Registrieren</title>
|
<title>Registrieren</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="page-container">
|
||||||
|
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<!-- Registrierungsformular -->
|
||||||
|
<main class="content-wrapper">
|
||||||
|
<!-- Formular für Registrierung -->
|
||||||
|
<div class="register-wrapper">
|
||||||
<form action="register.php" method="POST">
|
<form action="register.php" method="POST">
|
||||||
<h1>Registrieren</h1>
|
<h2 class="title">Registrieren</h2>
|
||||||
|
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
<input type="text" name="name" placeholder="Voller Name" required>
|
<input type="text" name="vorname" placeholder="Vorname" required id="vorname">
|
||||||
<i class='bx bxs-user'></i>
|
<i class='bx bxs-user'></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
<input type="text" name="username" placeholder="Username" required>
|
<input type="text" name="nachname" placeholder="Nachname" required id="nachname">
|
||||||
<i class='bx bxs-user'></i>
|
<i class='bx bxs-user'></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
<input type="email" name="email" placeholder="E-Mail" required>
|
<input type="email" name="email" placeholder="E-Mail" required id="email">
|
||||||
<i class='bx bxs-envelope'></i>
|
<i class='bx bxs-envelope'></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
@ -29,23 +49,75 @@
|
|||||||
<i class='bx bxs-lock-alt'></i>
|
<i class='bx bxs-lock-alt'></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Eingabe: Passwort bestätigen -->
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
<input type="password" id="confirmPassword" name="confirmPassword" placeholder="Passwort bestätigen" required>
|
<input type="password" id="confirmPassword" name="confirmPassword" placeholder="Passwort bestätigen"
|
||||||
|
required>
|
||||||
<i class='bx bxs-lock-alt'></i>
|
<i class='bx bxs-lock-alt'></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Sicherheitsbalken -->
|
<button type="submit" class="btn" id="register">Registrieren</button>
|
||||||
<div id="passwordStrengthBar" class="password-strength-bar"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" class="btn">Registrieren</button>
|
|
||||||
|
|
||||||
|
<!-- Link zum Login für bestehende Nutzer -->
|
||||||
<div class="register-link">
|
<div class="register-link">
|
||||||
<br>
|
<br>
|
||||||
<p>Bereits ein Konto? <a href="/login">Login</a></p>
|
<p>Bereits ein Konto? <a href="/login">Login</a></p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<script src="./passwordValidation.js"></script>
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelector('form').addEventListener('submit', async (event) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const passwordEl = document.getElementById('regPassword')
|
||||||
|
const password = passwordEl.value
|
||||||
|
const confirmPasswordEl = document.getElementById('confirmPassword')
|
||||||
|
const confirmPassword = confirmPasswordEl.value
|
||||||
|
|
||||||
|
if (password !== confirmPassword) {
|
||||||
|
passwordEl.value = ''
|
||||||
|
confirmPasswordEl.value = ''
|
||||||
|
alert('Die Passwörter stimmen nicht überein.')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData = {
|
||||||
|
name: document.getElementById('vorname').value,
|
||||||
|
lower_name: document.getElementById('nachname').value,
|
||||||
|
email: document.getElementById('email').value,
|
||||||
|
passwd: document.getElementById('regPassword').value,
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch('/api/user/registration', {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(formData)
|
||||||
|
})
|
||||||
|
if (response.ok) {
|
||||||
|
const data = await response.json();
|
||||||
|
sessionStorage.setItem("user_id", data.id)
|
||||||
|
sessionStorage.setItem("vorname", data.name)
|
||||||
|
sessionStorage.setItem("nachname", data.lower_name)
|
||||||
|
alert('Nutzer erfolgreich hinzugefügt! Ihre Kundennummer: ' + data.id)
|
||||||
|
window.location.href = '/'
|
||||||
|
} else {
|
||||||
|
alert('Fehler bei der Registrierung.')
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Fehler: ', error)
|
||||||
|
alert('Fehler beim Senden des Formulars.')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<!-- Fußzeiele -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
110
public/shop/shop.html
Normal file
110
public/shop/shop.html
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<!--
|
||||||
|
Diese Seite zeigt alle Produkte des Webshops an.
|
||||||
|
Produkte werden dynamisch von der API geladen.
|
||||||
|
Bei einem Fehler wird eine passende Fehlermeldung angezeigt.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Shop</title>
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="/Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<!-- Hauptinhalt -->
|
||||||
|
<section style="padding: 0px 30px; text-align: left;">
|
||||||
|
<h1>Willkommen im Webshop</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<!-- "Container" für die dynamisch geladenen Produktkarten -->
|
||||||
|
<section class="card-grid" id="products">
|
||||||
|
<!-- Produkte werden hier eingefügt -->
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Fußzeile -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Funktion zum Hinzufügen zum Warenkorb
|
||||||
|
function zumWarenkorbHinzufuegen(product) {
|
||||||
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
const existingProduct = warenkorb.find(p => p.product_id === product.id);
|
||||||
|
|
||||||
|
if (existingProduct) {
|
||||||
|
existingProduct.quantity += 1; // Wenn schon vorhanden, Anzahl erhöhen
|
||||||
|
} else {
|
||||||
|
warenkorb.push({
|
||||||
|
product_id: product.id,
|
||||||
|
product_name: product.name,
|
||||||
|
price: product.price,
|
||||||
|
quantity: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
alert(`${product.name} wurde zum Warenkorb hinzugefügt!`);
|
||||||
|
zeigeWarenkorbAnzahl();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Produkte laden
|
||||||
|
// Daten von der API abrufen
|
||||||
|
fetch('/api/products')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(products => {
|
||||||
|
const container = document.getElementById('products');
|
||||||
|
container.innerHTML = '';
|
||||||
|
|
||||||
|
// Für jedes Produkt eine eigene Karte erstellen und einfügen
|
||||||
|
products.forEach(product => {
|
||||||
|
// Neues div-Element für die Produktkarte
|
||||||
|
const card = document.createElement('div');
|
||||||
|
// CSS-Styling hinzufügen
|
||||||
|
card.classList.add('card');
|
||||||
|
// HTML-Struktur der Produktkarte
|
||||||
|
card.innerHTML = `
|
||||||
|
<img src="${product.image_url}" alt="${product.name}">
|
||||||
|
<h3>${product.name}</h3>
|
||||||
|
<p>Preis: ${product.price.toFixed(2)} €</p>
|
||||||
|
<p>${product.description}</p>
|
||||||
|
<p>Artikel Nr: ${product.id}</p>
|
||||||
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const addToCartButton = card.querySelector('.add-to-cart');
|
||||||
|
addToCartButton.addEventListener('click', () => {
|
||||||
|
zumWarenkorbHinzufuegen(product);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Karte in den Container einfügen
|
||||||
|
container.appendChild(card);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// Fehlermeldung
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Fehler beim Laden der Produkte:', err);
|
||||||
|
|
||||||
|
// Fehlermeldung auf der Seite anzeigen
|
||||||
|
const container = document.getElementById('products');
|
||||||
|
container.innerHTML = `
|
||||||
|
<div class="error-message">
|
||||||
|
<h3>Fehler beim Laden der Produkte</h3>
|
||||||
|
<p>Es gab ein Problem beim Abrufen der Produktdaten.<br>
|
||||||
|
Wir arbeiten bereits daran – bitte versuchen Sie es später erneut.</p>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
108
public/shop/shop_lkw.html
Normal file
108
public/shop/shop_lkw.html
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<!--
|
||||||
|
Diese Seite zeigt alle LKW-Produkte des Webshops an.
|
||||||
|
Die Produkte werden dynamisch von der API geladen.
|
||||||
|
Bei einem Fehler wird eine passende Fehlermeldung angezeigt.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Shop - LKW's</title>
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="/Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<!-- Hauptinhalt -->
|
||||||
|
<main>
|
||||||
|
<section style="padding: 0px 30px; text-align: left;">
|
||||||
|
<h1>Unsere LKW Produkte</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card-grid" id="products_lkw">
|
||||||
|
<!-- Dynamische Produkte (filtern nach Motorrad) -->
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Fußzeile -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// API-Abfrage, um Lkw-Produkte zu laden
|
||||||
|
// Funktion zum Hinzufügen zum Warenkorb
|
||||||
|
function zumWarenkorbHinzufuegen(product) {
|
||||||
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
const existingProduct = warenkorb.find(p => p.product_id === product.id);
|
||||||
|
|
||||||
|
if (existingProduct) {
|
||||||
|
existingProduct.quantity += 1; // Wenn schon vorhanden, Anzahl erhöhen
|
||||||
|
} else {
|
||||||
|
warenkorb.push({
|
||||||
|
product_id: product.id,
|
||||||
|
product_name: product.name,
|
||||||
|
price: product.price,
|
||||||
|
quantity: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
alert(`${product.name} wurde zum Warenkorb hinzugefügt!`);
|
||||||
|
zeigeWarenkorbAnzahl();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Produkte laden
|
||||||
|
fetch('/api/products/lkw')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(products => {
|
||||||
|
const container = document.getElementById('products_lkw');
|
||||||
|
container.innerHTML = '';
|
||||||
|
|
||||||
|
// Für jedes Produkt eine Karte erstellen
|
||||||
|
products.forEach(product => {
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.classList.add('card');
|
||||||
|
card.innerHTML = `
|
||||||
|
<img src="${product.image_url}" alt="${product.name}">
|
||||||
|
<h3>${product.name}</h3>
|
||||||
|
<p>Preis: ${product.price.toFixed(2)} €</p>
|
||||||
|
<p>${product.description}</p>
|
||||||
|
<p>Artikel Nr: ${product.id}</p>
|
||||||
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const addToCartButton = card.querySelector('.add-to-cart');
|
||||||
|
addToCartButton.addEventListener('click', () => {
|
||||||
|
zumWarenkorbHinzufuegen(product);
|
||||||
|
});
|
||||||
|
|
||||||
|
container.appendChild(card);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// Fehlerbehandlung
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Fehler beim Laden der Produkte:', err);
|
||||||
|
|
||||||
|
// Anzeige einer Fehlermeldung auf der Webseite
|
||||||
|
const container = document.getElementById('products_lkw');
|
||||||
|
container.innerHTML = `
|
||||||
|
<div class="error-message">
|
||||||
|
<h3>Fehler beim Laden der Produkte</h3>
|
||||||
|
<p>Es gab ein Problem beim Abrufen der Produktdaten.<br>
|
||||||
|
Wir arbeiten bereits daran – bitte versuchen Sie es später erneut.</p>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
105
public/shop/shop_motorrad.html
Normal file
105
public/shop/shop_motorrad.html
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<!--
|
||||||
|
Diese Seite zeigt alle Motorrad-Produkte des Webshops an.
|
||||||
|
Produkte werden dynamisch von der API geladen.
|
||||||
|
Bei einem Fehler wird eine passende Fehlermeldung angezeigt.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Shop - Motorräder</title>
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="/Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<!-- Hauptinhalt -->
|
||||||
|
<main class="main-content">
|
||||||
|
<section style="padding: 0px 30px; text-align: left;">
|
||||||
|
<h1>Unsere Motorrad Produkte</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card-grid" id="products_motorrad">
|
||||||
|
<!-- Produkte -->
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Fußzeile -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Funktion zum Hinzufügen zum Warenkorb
|
||||||
|
function zumWarenkorbHinzufuegen(product) {
|
||||||
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
const existingProduct = warenkorb.find(p => p.product_id === product.id);
|
||||||
|
|
||||||
|
if (existingProduct) {
|
||||||
|
existingProduct.quantity += 1; // Wenn schon vorhanden, Anzahl erhöhen
|
||||||
|
} else {
|
||||||
|
warenkorb.push({
|
||||||
|
product_id: product.id,
|
||||||
|
product_name: product.name,
|
||||||
|
price: product.price,
|
||||||
|
quantity: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
alert(`${product.name} wurde zum Warenkorb hinzugefügt!`);
|
||||||
|
zeigeWarenkorbAnzahl();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Produkte laden
|
||||||
|
fetch('/api/products/motorrad')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(products => {
|
||||||
|
const container = document.getElementById('products_motorrad');
|
||||||
|
container.innerHTML = '';
|
||||||
|
|
||||||
|
// Für jedes Produkt eine Karte erstellen
|
||||||
|
products.forEach(product => {
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.classList.add('card');
|
||||||
|
card.innerHTML = `
|
||||||
|
<img src="${product.image_url}" alt="${product.name}">
|
||||||
|
<h3>${product.name}</h3>
|
||||||
|
<p>Preis: ${product.price.toFixed(2)} €</p>
|
||||||
|
<p>${product.description}</p>
|
||||||
|
<p>Artikel Nr: ${product.id}</p>
|
||||||
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const addToCartButton = card.querySelector('.add-to-cart');
|
||||||
|
addToCartButton.addEventListener('click', () => {
|
||||||
|
zumWarenkorbHinzufuegen(product);
|
||||||
|
});
|
||||||
|
|
||||||
|
container.appendChild(card);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// Fehlermeldung
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Fehler beim Laden der Produkte:', err);
|
||||||
|
|
||||||
|
const container = document.getElementById('products_motorrad');
|
||||||
|
container.innerHTML = `
|
||||||
|
<div class="error-message">
|
||||||
|
<h3>Fehler beim Laden der Produkte</h3>
|
||||||
|
<p>Es gab ein Problem beim Abrufen der Produktdaten.<br>
|
||||||
|
Wir arbeiten bereits daran – bitte versuchen Sie es später erneut.</p>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
110
public/shop/shop_oldtimer.html
Normal file
110
public/shop/shop_oldtimer.html
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<!--
|
||||||
|
Diese Seite zeigt alle Oldtimer-Produkte des Webshops an.
|
||||||
|
Produkte werden dynamisch von der API geladen.
|
||||||
|
Bei einem Fehler wird eine passende Fehlermeldung angezeigt.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Shop - Oldtimer</title>
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="/Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<!-- Hauptinhalt -->
|
||||||
|
<main class="main-content">
|
||||||
|
<section style="padding: 0px 30px; text-align: left;">
|
||||||
|
<h1>Unsere Oldtimer Produkte</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card-grid" id="products_oldtimer">
|
||||||
|
<!-- Produkte -->
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Fußzeile -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Funktion zum Hinzufügen zum Warenkorb
|
||||||
|
function zumWarenkorbHinzufuegen(product) {
|
||||||
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
const existingProduct = warenkorb.find(p => p.product_id === product.id);
|
||||||
|
|
||||||
|
if (existingProduct) {
|
||||||
|
existingProduct.quantity += 1; // Wenn schon vorhanden, Anzahl erhöhen
|
||||||
|
} else {
|
||||||
|
warenkorb.push({
|
||||||
|
product_id: product.id,
|
||||||
|
product_name: product.name,
|
||||||
|
price: product.price,
|
||||||
|
quantity: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
alert(`${product.name} wurde zum Warenkorb hinzugefügt!`);
|
||||||
|
zeigeWarenkorbAnzahl();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Produkte laden
|
||||||
|
fetch('/api/products/oldtimer')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(products => {
|
||||||
|
const container = document.getElementById('products_oldtimer');
|
||||||
|
container.innerHTML = ''; // sicherheitshalber leeren
|
||||||
|
|
||||||
|
// Für jedes Produkt eine Karte erstellen
|
||||||
|
products.forEach(product => {
|
||||||
|
// Neues div für eine Produktkarte
|
||||||
|
const card = document.createElement('div');
|
||||||
|
// CSS-Styling hinzufügen
|
||||||
|
card.classList.add('card');
|
||||||
|
// Die Karte mit Produktdaten füllen
|
||||||
|
card.innerHTML = `
|
||||||
|
<img src="${product.image_url}" alt="${product.name}">
|
||||||
|
<h3>${product.name}</h3>
|
||||||
|
<p>Preis: ${product.price.toFixed(2)} €</p>
|
||||||
|
<p>${product.description}</p>
|
||||||
|
<p>Artikel Nr: ${product.id}</p>
|
||||||
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const addToCartButton = card.querySelector('.add-to-cart');
|
||||||
|
addToCartButton.addEventListener('click', () => {
|
||||||
|
zumWarenkorbHinzufuegen(product);
|
||||||
|
});
|
||||||
|
|
||||||
|
container.appendChild(card);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// Fehlerbehandlung
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Fehler beim Laden der Produkte:', err);
|
||||||
|
|
||||||
|
// Anzeige einer Fehlermeldung auf der Webseite
|
||||||
|
|
||||||
|
const container = document.getElementById('products_oldtimer');
|
||||||
|
container.innerHTML = `
|
||||||
|
<div class="error-message">
|
||||||
|
<h3>Fehler beim Laden der Produkte</h3>
|
||||||
|
<p>Es gab ein Problem beim Abrufen der Produktdaten.<br>
|
||||||
|
Wir arbeiten bereits daran – bitte versuchen Sie es später erneut.</p>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
107
public/shop/shop_sportwagen.html
Normal file
107
public/shop/shop_sportwagen.html
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<!--
|
||||||
|
Diese Seite zeigt alle Sportwagen-Produkte des Webshops an.
|
||||||
|
Die Produkte werden dynamisch von der API geladen.
|
||||||
|
Bei einem Fehler wird eine passende Fehlermeldung angezeigt.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Shop - Sportwagen</title>
|
||||||
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="/Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Header -->
|
||||||
|
<div id="header"></div>
|
||||||
|
|
||||||
|
<!-- Hauptinhalt -->
|
||||||
|
<main>
|
||||||
|
<section style="padding: 0px 30px; text-align: left;">
|
||||||
|
<h1>Unsere Sportwagen Produkte</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card-grid" id="products_sportwagen">
|
||||||
|
<!-- Einbindung Dynamische Produkte -->
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Funktion zum Hinzufügen zum Warenkorb
|
||||||
|
function zumWarenkorbHinzufuegen(product) {
|
||||||
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
|
||||||
|
const existingProduct = warenkorb.find(p => p.product_id === product.id);
|
||||||
|
|
||||||
|
if (existingProduct) {
|
||||||
|
existingProduct.quantity += 1; // Wenn schon vorhanden, Anzahl erhöhen
|
||||||
|
} else {
|
||||||
|
warenkorb.push({
|
||||||
|
product_id: product.id,
|
||||||
|
product_name: product.name,
|
||||||
|
price: product.price,
|
||||||
|
quantity: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
alert(`${product.name} wurde zum Warenkorb hinzugefügt!`);
|
||||||
|
zeigeWarenkorbAnzahl();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Produkte laden
|
||||||
|
fetch('/api/products/sportwagen')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(products => {
|
||||||
|
const container = document.getElementById('products_sportwagen');
|
||||||
|
container.innerHTML = '';
|
||||||
|
|
||||||
|
// Für jedes Produkt eine Karte erstellen
|
||||||
|
products.forEach(product => {
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.classList.add('card');
|
||||||
|
card.innerHTML = `
|
||||||
|
<img src="${product.image_url}" alt="${product.name}">
|
||||||
|
<h3>${product.name}</h3>
|
||||||
|
<p>Preis: ${product.price.toFixed(2)} €</p>
|
||||||
|
<p>${product.description}</p>
|
||||||
|
<p>Artikel Nr: ${product.id}</p>
|
||||||
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const addToCartButton = card.querySelector('.add-to-cart');
|
||||||
|
addToCartButton.addEventListener('click', () => {
|
||||||
|
zumWarenkorbHinzufuegen(product);
|
||||||
|
});
|
||||||
|
|
||||||
|
container.appendChild(card);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
// Fehlermeldung
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Fehler beim Laden der Produkte:', err);
|
||||||
|
|
||||||
|
// Fehlermeldung auf der Seite anzeigen
|
||||||
|
const container = document.getElementById('products_sportwagen');
|
||||||
|
container.innerHTML = `
|
||||||
|
<div class="error-message">
|
||||||
|
<h3>Fehler beim Laden der Produkte</h3>
|
||||||
|
<p>Es gab ein Problem beim Abrufen der Produktdaten.<br>
|
||||||
|
Wir arbeiten bereits daran – bitte versuchen Sie es später erneut.</p>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@ -1,86 +1,134 @@
|
|||||||
|
<!--
|
||||||
|
Startseite des Modellauto-Webshops
|
||||||
|
Zeigt ein Infobereich, die neuesten Produkte (per API geladen) und die Vorteile bei uns zu bestellen
|
||||||
|
-->
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="de">
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Autohändler Webshop</title>
|
<title>Modellauto - Startseite</title>
|
||||||
<link rel="stylesheet" href="./Styles/startseite/startseite.css">
|
<!-- Haupt-CSS-Datei -->
|
||||||
|
<link rel="stylesheet" href="./Styles/styles-main.css">
|
||||||
|
<!-- Icons -->
|
||||||
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
<link href="https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css" rel="stylesheet">
|
||||||
|
<!-- Script zum Laden von Header/Footer -->
|
||||||
|
<script src="/header_footer"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Wrapper für die gesamte Seite -->
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- Header -->
|
<!-- Header -->
|
||||||
<header>
|
<div id="header"></div>
|
||||||
<h1>Autohändler Webshop</h1>
|
|
||||||
<div class="header-right">
|
|
||||||
<a href="/login" class="login-btn">Login</a>
|
|
||||||
<a href="/warenkorb" class="cart">
|
|
||||||
<i class='bx bx-cart'></i>
|
|
||||||
<span class="cart-count">0</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<!-- Navigationsleiste -->
|
<main>
|
||||||
<nav class="menu">
|
<!-- Infobereich -->
|
||||||
<ul class="menu-list">
|
<section style="padding: 40px 20px; text-align: center; background: #fff;">
|
||||||
<li class="menu-item">
|
<h2>Willkommen beim Modellauto-Shop</h2>
|
||||||
<a href="#">Startseite</a>
|
<p>Bei uns finden Sie hochwertige Modellautos – ob Oldtimer, Sportwagen, Lkw's oder Motorräder.
|
||||||
</li>
|
Perfekt für Sammler, Bastler und Fans.
|
||||||
<li class="menu-item">
|
</p>
|
||||||
<a href="#">Neuwagen</a>
|
</section>
|
||||||
</li>
|
|
||||||
<li class="menu-item">
|
|
||||||
<a href="#">Gebrauchtwagen</a>
|
|
||||||
</li>
|
|
||||||
<li class="menu-item">
|
|
||||||
<a href="#">Angebote</a>
|
|
||||||
</li>
|
|
||||||
<li class="menu-item">
|
|
||||||
<a href="#">Kontakt</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<!-- Hauptinhalt -->
|
<!-- Hauptinhalt -->
|
||||||
<main>
|
<h1>Unsere neusten Produkte: </h1>
|
||||||
<div class="search-bar">
|
<section class="card-grid" id="latest-products">
|
||||||
<input type="text" placeholder="Marke oder Modell eingeben">
|
<!-- Dynamische Produkte (5 neuesten Produkte) -->
|
||||||
<select>
|
</section>
|
||||||
<option>Fahrzeugtyp</option>
|
|
||||||
<option>SUV</option>
|
|
||||||
<option>Limousine</option>
|
|
||||||
<option>Kombi</option>
|
|
||||||
</select>
|
|
||||||
<select>
|
|
||||||
<option>Preisspanne</option>
|
|
||||||
<option>Bis 10.000€</option>
|
|
||||||
<option>Bis 20.000€</option>
|
|
||||||
<option>Bis 50.000€</option>
|
|
||||||
</select>
|
|
||||||
<button>Suchen</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<section class="card-grid">
|
<!-- JavaScript zum Abrufen und Anzeigen der neuesten Produkte -->
|
||||||
<div class="card">
|
<script>
|
||||||
<img src="https://via.placeholder.com/150" alt="Auto">
|
// Funktion zum Hinzufügen zum Warenkorb
|
||||||
<h3>BMW 3er Limousine</h3>
|
function zumWarenkorbHinzufuegen(product) {
|
||||||
<p>Preis: 35.000€</p>
|
let warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
<p>Baujahr: 2020 | Kilometerstand: 20.000 km</p>
|
|
||||||
|
const existingProduct = warenkorb.find(p => p.product_id === product.id);
|
||||||
|
|
||||||
|
if (existingProduct) {
|
||||||
|
existingProduct.quantity += 1; // Wenn schon vorhanden, Anzahl erhöhen
|
||||||
|
} else {
|
||||||
|
warenkorb.push({
|
||||||
|
product_id: product.id,
|
||||||
|
product_name: product.name,
|
||||||
|
price: product.price,
|
||||||
|
quantity: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem('warenkorb', JSON.stringify(warenkorb));
|
||||||
|
alert(`${product.name} wurde zum Warenkorb hinzugefügt!`);
|
||||||
|
zeigeWarenkorbAnzahl();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Produkte laden
|
||||||
|
fetch('/api/products/new')
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(products => {
|
||||||
|
const container = document.getElementById('latest-products');
|
||||||
|
container.innerHTML = '';
|
||||||
|
|
||||||
|
products.forEach(product => {
|
||||||
|
const card = document.createElement('div');
|
||||||
|
card.classList.add('card');
|
||||||
|
card.innerHTML = `
|
||||||
|
<img src="${product.image_url}" alt="${product.name}">
|
||||||
|
<h3>${product.name}</h3>
|
||||||
|
<p>Preis: ${product.price.toFixed(2)} €</p>
|
||||||
|
<p>${product.description}</p>
|
||||||
|
<p>Artikel Nr: ${product.id}</p>
|
||||||
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
||||||
|
`;
|
||||||
|
|
||||||
|
const addToCartButton = card.querySelector('.add-to-cart');
|
||||||
|
addToCartButton.addEventListener('click', () => {
|
||||||
|
zumWarenkorbHinzufuegen(product);
|
||||||
|
});
|
||||||
|
|
||||||
|
container.appendChild(card);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('Fehler beim Laden der Produkte:', err);
|
||||||
|
|
||||||
|
const container = document.getElementById('latest-products');
|
||||||
|
container.innerHTML = `
|
||||||
|
<div class="error-message">
|
||||||
|
<h3>Fehler beim Laden der Produkte</h3>
|
||||||
|
<p>Es gab ein Problem beim Abrufen der Produktdaten.<br>
|
||||||
|
Wir arbeiten bereits daran – bitte versuchen Sie es später erneut.</p>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Infobereich mit den Vorteilen -->
|
||||||
|
<section class="info-cards-section">
|
||||||
|
<div class="info-card">
|
||||||
|
<i class='bx bx-package'></i>
|
||||||
|
<h3>Versandkostenfrei ab 50€</h3>
|
||||||
|
<p>Schneller & sicherer Versand mit Sendungsverfolgung.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="info-card">
|
||||||
<img src="https://via.placeholder.com/150" alt="Auto">
|
<i class='bx bx-credit-card'></i>
|
||||||
<h3>Audi Q5</h3>
|
<h3>Flexible Zahlungsmethoden</h3>
|
||||||
<p>Preis: 50.000€</p>
|
<p>PayPal, Kreditkarte, Klarna, Vorkasse – Sie haben die Wahl.</p>
|
||||||
<p>Baujahr: 2022 | Kilometerstand: 10.000 km</p>
|
</div>
|
||||||
<button class="add-to-cart">Zum Warenkorb hinzufügen</button>
|
<div class="info-card">
|
||||||
|
<i class='bx bx-undo'></i>
|
||||||
|
<h3>14 Tage Rückgaberecht</h3>
|
||||||
|
<p>Unzufrieden? Kein Problem – Rückgabe einfach & unkompliziert.</p>
|
||||||
|
</div>
|
||||||
|
<div class="info-card">
|
||||||
|
<i class='bx bx-star'></i>
|
||||||
|
<h3>Top-Bewertungen</h3>
|
||||||
|
<p>Unsere Kunden lieben uns – überzeugen Sie sich selbst!</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<!-- Fußzeiele -->
|
||||||
|
<div id="footer"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Scripts -->
|
|
||||||
<script src="startseite.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
100
scripts/einfügenHeaderFooter.js
Normal file
100
scripts/einfügenHeaderFooter.js
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
/**
|
||||||
|
* Dieser Code lädt beim Start der Seite (DOMContentLoaded) Header und Footer dynamisch vom Server
|
||||||
|
* (über /header und /footer) und fügt sie in die vorgesehenen Elemente ein.
|
||||||
|
* Tritt ein Fehler auf (z.B. Datei nicht vorhanden oder Serverproblem),
|
||||||
|
* wird eine Fehlermeldung direkt auf der Webseite angezeigt.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Warten bis das gesamte DOM geladen ist
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
// Header laden
|
||||||
|
const headerTarget = document.getElementById("header");
|
||||||
|
if (headerTarget) {
|
||||||
|
// Header-Inhalt vom Server anfordern
|
||||||
|
fetch("/header")
|
||||||
|
.then(response => {
|
||||||
|
// Prüfen, ob die Antwort erfolgreich war
|
||||||
|
if (!response.ok) throw new Error("Header nicht gefunden");
|
||||||
|
return response.text();
|
||||||
|
})
|
||||||
|
.then(data => {
|
||||||
|
// Header-Inhalt in die Seite einfügen
|
||||||
|
headerTarget.innerHTML = data;
|
||||||
|
|
||||||
|
// WICHTIG: Jetzt den Warenkorb zählen, nachdem der Header geladen ist!
|
||||||
|
zeigeWarenkorbAnzahl();
|
||||||
|
|
||||||
|
// Login Status im UI anzeigen
|
||||||
|
zeigeLoginStatus();
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
// Fehlerbehandlung: Fehlermeldung im Header-Bereich anzeigen
|
||||||
|
headerTarget.innerHTML = `
|
||||||
|
<div style="background: #ffdede; color: #a00; padding: 10px; text-align: center;">
|
||||||
|
Fehler beim Laden des Headers.
|
||||||
|
</div>`;
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Footer laden
|
||||||
|
const footerTarget = document.getElementById("footer");
|
||||||
|
if (footerTarget) {
|
||||||
|
// Footer-Inhalt vom Server anfordern
|
||||||
|
fetch("/footer")
|
||||||
|
.then(response => {
|
||||||
|
// Prüfen, ob die Antwort erfolgreich war
|
||||||
|
if (!response.ok) throw new Error("Footer nicht gefunden");
|
||||||
|
return response.text();
|
||||||
|
})
|
||||||
|
.then(data => {
|
||||||
|
// Footer-Inhalt in die Seite einfügen
|
||||||
|
footerTarget.innerHTML = data;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
// Fehlerbehandlung: Die Fehlermeldung im Footer-Bereich anzeigen
|
||||||
|
footerTarget.innerHTML = `
|
||||||
|
<div style="background: #ffdede; color: #a00; padding: 10px; text-align: center;">
|
||||||
|
Fehler beim Laden der Fußzeile.
|
||||||
|
</div>`;
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
window.zeigeWarenkorbAnzahl = function () {
|
||||||
|
const warenkorb = JSON.parse(localStorage.getItem('warenkorb')) || [];
|
||||||
|
let anzahl = 0;
|
||||||
|
|
||||||
|
warenkorb.forEach(produkt => {
|
||||||
|
anzahl += produkt.quantity;
|
||||||
|
});
|
||||||
|
|
||||||
|
const anzahlElement = document.getElementById('cart-count');
|
||||||
|
if (anzahlElement) {
|
||||||
|
anzahlElement.textContent = anzahl;
|
||||||
|
}
|
||||||
|
console.log('Warenkorb-Anzahl:', anzahl);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.zeigeLoginStatus = function () {
|
||||||
|
const userId = sessionStorage.getItem('user_id')
|
||||||
|
const loginBtn = document.querySelector('.login-btn')
|
||||||
|
|
||||||
|
if (!loginBtn) return
|
||||||
|
|
||||||
|
if (userId) {
|
||||||
|
loginBtn.textContent = 'Logout'
|
||||||
|
loginBtn.href = '/'
|
||||||
|
loginBtn.addEventListener('click', (e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
sessionStorage.clear()
|
||||||
|
localStorage.clear()
|
||||||
|
alert('Sie wurden ausgeloggt.')
|
||||||
|
location.reload()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
loginBtn.textContent = 'Login'
|
||||||
|
loginBtn.href = '/login'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -1,23 +0,0 @@
|
|||||||
let sidebarEl = document.getElementById("mySidebar")
|
|
||||||
let mainEl = document.getElementById("main")
|
|
||||||
|
|
||||||
/* Set the width of the sidebar to 250px and the left margin of the page content to 250px */
|
|
||||||
function openNav() {
|
|
||||||
sidebarEl.style.width = "250px";
|
|
||||||
mainEl.style.marginLeft = "250px";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the width of the sidebar to 0 and the left margin of the page content to 0 */
|
|
||||||
function closeNav() {
|
|
||||||
sidebarEl.style.width = "0";
|
|
||||||
mainEl.style.marginLeft = "0";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Toggle the sidebar */
|
|
||||||
function toggleNav() {
|
|
||||||
if (sidebarEl.offsetWidth > 0) {
|
|
||||||
closeNav()
|
|
||||||
} else {
|
|
||||||
openNav()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
let nameEl = document.getElementById("loginMail");
|
|
||||||
let passwordEl = document.getElementById("loginPassword");
|
|
||||||
|
|
||||||
function login() {
|
|
||||||
console.log(nameEl.value)
|
|
||||||
console.log(passwordEl.value)
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
const mysql = require('mysql2');
|
|
||||||
require('dotenv').config({path: 'C:/Daten/Webshop/process.env'});
|
|
||||||
//to-do: '.env' Dateien aus anderen Directories aufrufen ohne absoluten Pfad
|
|
||||||
// require("dotenv").config({path:'C:/Daten/Webshop/process.env'})
|
|
||||||
|
|
||||||
const connection = mysql.createConnection({
|
|
||||||
host : process.env.DB_HOST,
|
|
||||||
user : process.env.DB_USER,
|
|
||||||
password : process.env.DB_PASSWORD,
|
|
||||||
database : process.env.DB_DATABASE
|
|
||||||
});
|
|
||||||
|
|
||||||
connection.connect(function(err) {
|
|
||||||
if (err) throw err;
|
|
||||||
});
|
|
||||||
|
|
||||||
module.exports = connection;
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
require('mysql2')
|
|
||||||
|
|
||||||
let userInput = "test1"
|
|
||||||
|
|
||||||
let appRoot = require('app-root-path')
|
|
||||||
let dbConnect = require(appRoot + '/scripts/modules/db-connect.js')
|
|
||||||
|
|
||||||
dbConnect.query("SELECT * FROM webshop.user WHERE email = " + "'" + userInput + "'", function (err, result) {
|
|
||||||
if (err) throw err
|
|
||||||
console.log(result)
|
|
||||||
})
|
|
||||||
dbConnect.end()
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
const mysql = require('mysql');
|
|
||||||
|
|
||||||
const connection = mysql.createConnection({
|
|
||||||
host: "localhost",
|
|
||||||
user: "root",
|
|
||||||
password: "",
|
|
||||||
database: "webshop"
|
|
||||||
})
|
|
||||||
|
|
||||||
connection.connect(function (err) {
|
|
||||||
if (err) throw err
|
|
||||||
console.log("Connected to database")
|
|
||||||
connection.query("SELECT * FROM webshop.product LIMIT 10", function (err, result) {
|
|
||||||
if (err) throw err
|
|
||||||
console.log(result)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
const mysql = require('mysql');
|
|
||||||
|
|
||||||
const connection = mysql.createConnection({
|
|
||||||
host: "localhost",
|
|
||||||
user: "root",
|
|
||||||
password: "",
|
|
||||||
database: "webshop"
|
|
||||||
})
|
|
||||||
|
|
||||||
connection.connect(function (err) {
|
|
||||||
if (err) throw err
|
|
||||||
console.log("Connected to database")
|
|
||||||
connection.query("SELECT * FROM webshop.user WHERE ID = 15", function (err, result) {
|
|
||||||
if (err) throw err
|
|
||||||
console.log(result)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
@ -1,27 +1,79 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const router = require('express').Router();
|
const router = require('express').Router();
|
||||||
|
|
||||||
|
// Route - Startseite
|
||||||
router.get('/', (req, res) => {
|
router.get('/', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, '../../../public/startseite/startseite.html'));
|
res.sendFile(path.join(__dirname, '../../../public/startseite/startseite.html'));
|
||||||
})
|
})
|
||||||
|
|
||||||
router.get('/example', (req, res) => {
|
// Route - Login
|
||||||
res.sendFile(path.join(__dirname, '../../../public/example/index.html'));
|
|
||||||
})
|
|
||||||
|
|
||||||
router.get('/login', (req, res) => {
|
router.get('/login', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, '../../../public/login/login.html'));
|
res.sendFile(path.join(__dirname, '../../../public/login/login.html'));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Route - Registrieren
|
||||||
router.get('/registrieren', (req, res) => {
|
router.get('/registrieren', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, '../../../public/registrieren/registrieren.html'));
|
res.sendFile(path.join(__dirname, '../../../public/registrieren/registrieren.html'));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Route - HeaderFooter Skript
|
||||||
|
router.get('/header_footer', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../scripts/einfügenHeaderFooter.js'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Kopfzeile
|
||||||
|
router.get('/header', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/header_footer/header.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Fußzeile
|
||||||
|
router.get('/footer', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/header_footer/footer.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Shop (Alle Produkte)
|
||||||
|
router.get('/shop', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/shop/shop.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Shop_Motorrad (Filtern nach Motorrad Produkten)
|
||||||
|
router.get('/shop/motorrad', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/shop/shop_motorrad.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Shop_Oldtimer (Filtern nach Oldtimer Produkten)
|
||||||
|
router.get('/shop/oldtimer', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/shop/shop_oldtimer.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Shop_Sportwagen (Filtern nach Sportwagen Produkten)
|
||||||
|
router.get('/shop/sportwagen', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/shop/shop_sportwagen.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Shop_LKW (Filtern nach LKW Produkten)
|
||||||
|
router.get('/shop/lkw', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/shop/shop_lkw.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Warenkorb
|
||||||
router.get('/Warenkorb', (req, res) => {
|
router.get('/Warenkorb', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, '../../../public/warenkorb/warenkorb.html'));
|
res.sendFile(path.join(__dirname, '../../../public/warenkorb/warenkorb.html'));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Route - Bestellformualar
|
||||||
router.get('/bestellformular', (req, res) => {
|
router.get('/bestellformular', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, '../../../public/bestellformular/bestellformular.html'));
|
res.sendFile(path.join(__dirname, '../../../public/bestellformular/bestellformular.html'));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Route - Bestellungen
|
||||||
|
router.get('/bestellung', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/bestellung/bestellung.html'));
|
||||||
|
})
|
||||||
|
|
||||||
|
// Route - Kontaktformular
|
||||||
|
router.get('/kontaktformular', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, '../../../public/kontaktformular/kontaktformular.html'));
|
||||||
|
})
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
301
server.js
301
server.js
@ -1,16 +1,28 @@
|
|||||||
const express = require('express');
|
const express = require('express');
|
||||||
const session = require('express-session');
|
const session = require('express-session');
|
||||||
const router = require('express').Router();
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const bcrypt = require('bcrypt')
|
||||||
|
const mysql = require('mysql');
|
||||||
|
const app = express();
|
||||||
|
|
||||||
require('dotenv').config({path: 'process.env'});
|
require('dotenv').config({path: 'process.env'});
|
||||||
|
|
||||||
const app = express();
|
// Datenbankverbindung
|
||||||
|
const db = mysql.createConnection({
|
||||||
|
host: 'localhost', user: 'root', password: '', database: 'webshop'
|
||||||
|
});
|
||||||
|
|
||||||
|
// Verbindung zur MySQL-Datenbank herstellen
|
||||||
|
db.connect(err => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Verbinden zur Datenbank:', err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('Mit der Datenbank verbunden');
|
||||||
|
});
|
||||||
|
|
||||||
app.use(session({
|
app.use(session({
|
||||||
secret: 'secret',
|
secret: 'secret', resave: true, saveUninitialized: true
|
||||||
resave: true,
|
|
||||||
saveUninitialized: true
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
@ -18,10 +30,287 @@ app.use(express.urlencoded({ extended: true }));
|
|||||||
app.use(express.static(path.join(__dirname, '/scripts')));
|
app.use(express.static(path.join(__dirname, '/scripts')));
|
||||||
app.use(express.static(path.join(__dirname, '/static')));
|
app.use(express.static(path.join(__dirname, '/static')));
|
||||||
|
|
||||||
const getIndexRoute = require('./scripts/routes/other/route-index');
|
// API-Route für Produkte
|
||||||
|
app.get('/api/products', (req, res) => {
|
||||||
|
// SQL-Abfrage für Produktdaten
|
||||||
|
const sql = 'SELECT * FROM webshop.product';
|
||||||
|
|
||||||
|
// Abfrage ausführen
|
||||||
|
db.query(sql, (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Produkte:', err);
|
||||||
|
res.status(500).send('Fehler beim Abrufen der Produkte');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.json(results); // Rückgabe der Produktdaten als JSON
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// API-Route für die 5 neuen Produkte
|
||||||
|
app.get('/api/products/new', async (req, res) => {
|
||||||
|
// SQL-Abfrage für Produktdaten
|
||||||
|
const sql = 'SELECT * FROM webshop.product ORDER BY created_at DESC LIMIT 4';
|
||||||
|
|
||||||
|
// Abfrage ausführen
|
||||||
|
db.query(sql, (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Produkte:', err);
|
||||||
|
res.status(500).send('Fehler beim Abrufen der Produkte');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.json(results); // Rückgabe der Produktdaten als JSON
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// API-Route für die Motorrad-Produkte
|
||||||
|
app.get('/api/products/motorrad', async (req, res) => {
|
||||||
|
// SQL-Abfrage für Produktdaten
|
||||||
|
const sql = 'SELECT * FROM webshop.product WHERE category_id = 4';
|
||||||
|
|
||||||
|
// Abfrage ausführen
|
||||||
|
db.query(sql, (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Produkte:', err);
|
||||||
|
res.status(500).send('Fehler beim Abrufen der Produkte');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.json(results); // Rückgabe der Produktdaten als JSON
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// API-Route für die Oldtimer-Produkte
|
||||||
|
app.get('/api/products/oldtimer', async (req, res) => {
|
||||||
|
// SQL-Abfrage für Produktdaten
|
||||||
|
const sql = 'SELECT * FROM webshop.product WHERE category_id = 2';
|
||||||
|
|
||||||
|
// Abfrage ausführen
|
||||||
|
db.query(sql, (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Produkte:', err);
|
||||||
|
res.status(500).send('Fehler beim Abrufen der Produkte');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.json(results); // Rückgabe der Produktdaten als JSON
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// API-Route für die Lkw-Produkte
|
||||||
|
app.get('/api/products/lkw', async (req, res) => {
|
||||||
|
// SQL-Abfrage für Produktdaten
|
||||||
|
const sql = 'SELECT * FROM webshop.product WHERE category_id = 3';
|
||||||
|
|
||||||
|
// Abfrage ausführen
|
||||||
|
db.query(sql, (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Produkte:', err);
|
||||||
|
res.status(500).send('Fehler beim Abrufen der Produkte');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.json(results); // Rückgabe der Produktdaten als JSON
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// API-Route für die Sportwagen-Produkte
|
||||||
|
app.get('/api/products/sportwagen', async (req, res) => {
|
||||||
|
// SQL-Abfrage für Produktdaten
|
||||||
|
const sql = 'SELECT * FROM webshop.product WHERE category_id = 1';
|
||||||
|
|
||||||
|
// Abfrage ausführen
|
||||||
|
db.query(sql, (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Produkte:', err);
|
||||||
|
res.status(500).send('Fehler beim Abrufen der Produkte');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.json(results); // Rückgabe der Produktdaten als JSON
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
app.post('/api/user/registration', async (req, res) => {
|
||||||
|
// SQL-Query für Nutzerregistration
|
||||||
|
const {name, lower_name, email, passwd} = req.body;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const hashedPassword = await bcrypt.hash(passwd, 10)
|
||||||
|
|
||||||
|
const sql = "INSERT INTO webshop.user (name, lower_name, email, passwd, passwd_hash_algo) VALUES (?, ?, ?, ?, 'bcrypt')"
|
||||||
|
|
||||||
|
// Query abschicken
|
||||||
|
db.query(sql, [name, lower_name, email, hashedPassword], (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
if (err.code === 'ER_DUP_ENTRY') {
|
||||||
|
res.status(409).json({message: 'Diese E-Mail Adresse ist bereits registriert.'})
|
||||||
|
}
|
||||||
|
console.error('Fehler beim Schreiben in die Datenbank: ', err);
|
||||||
|
res.status(500).send('Fehler beim Schreiben in die Datenbank');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
res.status(201).json({message: 'Nutzer erfolgreich hinzugefügt', id: results.insertId})
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Hashing-Fehler: ', error)
|
||||||
|
res.status(500).json({message: 'Fehler bei der Verarbeitung'})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
app.post('/api/user/login', (req, res) => {
|
||||||
|
const {email, password} = req.body
|
||||||
|
const sql = 'SELECT id, email, name, lower_name, passwd FROM webshop.user WHERE email = ?'
|
||||||
|
|
||||||
|
db.query(sql, [email], async (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen des Nutzers: ', err)
|
||||||
|
return res.status(500).json({message: 'Serverfehler'})
|
||||||
|
}
|
||||||
|
if (results.length === 0) {
|
||||||
|
return res.status(401).json({message: 'E-Mail oder Passwort ist ungültig.'})
|
||||||
|
}
|
||||||
|
|
||||||
|
const user = results[0]
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Vergleiche gegebenes Passwort mit gespeichertem verschlüsseltem Passwort
|
||||||
|
const passwordMatch = await bcrypt.compare(password, user.passwd)
|
||||||
|
|
||||||
|
if (!passwordMatch) {
|
||||||
|
return res.status(401).json({message: 'E-Mail oder Passwort ist ungültig.'})
|
||||||
|
}
|
||||||
|
|
||||||
|
req.session.userId = user.id;
|
||||||
|
req.session.email = user.email;
|
||||||
|
req.session.vorname = user.name;
|
||||||
|
req.session.nachname = user.lower_name;
|
||||||
|
|
||||||
|
// bei erfolgreichem Login Daten ans Frontend geben
|
||||||
|
res.json({message: 'Login erfolgreich', id: user.id, name: user.name, lower_name: user.lower_name})
|
||||||
|
|
||||||
|
} catch (compareError) {
|
||||||
|
console.error('Fehler beim Verarbeiten der Anfrage: ', compareError)
|
||||||
|
return res.status(500).json({message: 'Serverfehler bei der Anmeldung'})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
app.post('/api/bestellung', (req, res) => {
|
||||||
|
const {user_id, produkte} = req.body;
|
||||||
|
// produkte erwartet als Array: [{product_id: 1, quantity: 2}, {product_id: 5, quantity: 1}, ...]
|
||||||
|
|
||||||
|
if (!user_id || !Array.isArray(produkte) || produkte.length === 0) {
|
||||||
|
return res.status(400).json({message: 'Ungültige Anfrage: user_id oder Produkte fehlen.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Preise der Produkte abrufen
|
||||||
|
const productIds = produkte.map(p => p.product_id);
|
||||||
|
|
||||||
|
const priceQuery = 'SELECT id, price FROM webshop.product WHERE id IN (?)';
|
||||||
|
db.query(priceQuery, [productIds], (err, priceResults) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Produktpreise:', err);
|
||||||
|
return res.status(500).json({message: 'Serverfehler beim Abrufen der Produktpreise.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priceResults.length !== productIds.length) {
|
||||||
|
return res.status(400).json({message: 'Eines oder mehrere Produkte existieren nicht.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Total berechnen
|
||||||
|
let total = 0;
|
||||||
|
produkte.forEach(p => {
|
||||||
|
const dbProduct = priceResults.find(pr => pr.id === p.product_id);
|
||||||
|
if (dbProduct) {
|
||||||
|
total += dbProduct.price * p.quantity;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const payment_id = 1; // Zahlungssystem-ID (z.B. 1 = Rechnung, 2 = PayPal, ...)
|
||||||
|
|
||||||
|
const sqlOrder = 'INSERT INTO webshop.order_details (user_id, payment_id, total) VALUES (?, ?, ?)';
|
||||||
|
db.query(sqlOrder, [user_id, payment_id, total], (err1, result1) => {
|
||||||
|
if (err1) {
|
||||||
|
console.error('Fehler beim Erstellen der Bestellung:', err1);
|
||||||
|
return res.status(500).json({message: 'Fehler beim Erstellen der Bestellung.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
const orderId = result1.insertId;
|
||||||
|
|
||||||
|
const values = produkte.map(p => [user_id, p.product_id, p.quantity, orderId]);
|
||||||
|
const sqlItems = 'INSERT INTO webshop.order_items (user_id, product_id, quantity, order_id) VALUES ?';
|
||||||
|
|
||||||
|
db.query(sqlItems, [values], (err2) => {
|
||||||
|
if (err2) {
|
||||||
|
console.error('Fehler beim Einfügen der Order-Items:', err2);
|
||||||
|
return res.status(500).json({message: 'Fehler beim Hinzufügen der Produkte zur Bestellung.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
res.status(201).json({message: 'Bestellung erfolgreich!', order_id: orderId, total: total.toFixed(2)});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
app.post('/api/bestellung/daten', (req, res) => {
|
||||||
|
const {user_id} = req.body;
|
||||||
|
|
||||||
|
const sql = `
|
||||||
|
SELECT od.id AS order_id,
|
||||||
|
od.total AS order_total,
|
||||||
|
oi.product_id,
|
||||||
|
oi.quantity,
|
||||||
|
p.name AS product_name,
|
||||||
|
p.price AS product_price
|
||||||
|
FROM webshop.order_details od
|
||||||
|
INNER JOIN
|
||||||
|
webshop.order_items oi ON od.id = oi.order_id
|
||||||
|
INNER JOIN
|
||||||
|
webshop.product p ON oi.product_id = p.id
|
||||||
|
WHERE od.user_id = ?
|
||||||
|
ORDER BY od.id DESC
|
||||||
|
`;
|
||||||
|
|
||||||
|
db.query(sql, [user_id], (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler beim Abrufen der Bestellungen: ', err);
|
||||||
|
return res.status(500).json({message: 'Fehler beim Abrufen der Bestellungen'});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (results.length === 0) {
|
||||||
|
return res.status(404).json({message: 'Keine Bestellungen gefunden.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
res.json(results);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/api/pruefe-artikel', (req, res) => {
|
||||||
|
const artikelnummer = req.query.nummer;
|
||||||
|
|
||||||
|
if (!artikelnummer) {
|
||||||
|
return res.status(400).json({error: 'Keine Artikelnummer angegeben.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
const query = 'SELECT id FROM webshop.product WHERE id = ?';
|
||||||
|
|
||||||
|
db.query(query, [artikelnummer], (err, results) => {
|
||||||
|
if (err) {
|
||||||
|
console.error('Fehler bei der Artikelsuche:', err);
|
||||||
|
return res.status(500).json({error: 'Serverfehler bei der Artikelsuche.'});
|
||||||
|
}
|
||||||
|
|
||||||
|
const verfuegbar = results.length > 0;
|
||||||
|
res.json({verfuegbar});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const getIndexRoute = require('./scripts/routes/other/route-index');
|
||||||
app.use('/', getIndexRoute);
|
app.use('/', getIndexRoute);
|
||||||
|
|
||||||
|
// Hier werden alle anderen Seiten abgefangen, die keine definierten Routen haben (404 Fehler) und gibt die 404.html aus
|
||||||
|
app.use((req, res) => {
|
||||||
|
// Setzt den Statuscode auf 404 und sendet die '404.html'-Datei
|
||||||
|
res.status(404).sendFile(path.join(__dirname, 'public', '404.html'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sever starten
|
||||||
app.listen(process.env.APP_PORT, () => {
|
app.listen(process.env.APP_PORT, () => {
|
||||||
console.log("\x1b[32m");
|
console.log("\x1b[32m");
|
||||||
console.log(`Server is running on http://localhost:${process.env.APP_PORT}`);
|
console.log(`Server is running on http://localhost:${process.env.APP_PORT}`);
|
||||||
|
|||||||
@ -1,164 +0,0 @@
|
|||||||
body {
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
background-color: #f3f3f3;
|
|
||||||
margin: 0;
|
|
||||||
padding: 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.warenkorb {
|
|
||||||
max-width: 500px;
|
|
||||||
margin: 0 auto;
|
|
||||||
background: white;
|
|
||||||
padding: 120px;
|
|
||||||
border-radius: 12px;
|
|
||||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.warenkorb h2 {
|
|
||||||
font-size: 30px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
padding: 10px 0;
|
|
||||||
margin-bottom: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item .info {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item .name {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item .price {
|
|
||||||
color: #555;
|
|
||||||
}
|
|
||||||
|
|
||||||
.remove {
|
|
||||||
background-color: #ff6600;
|
|
||||||
border: none;
|
|
||||||
color: white;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 6px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.remove:hover {
|
|
||||||
background-color: #ff6600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary {
|
|
||||||
text-align: right;
|
|
||||||
font-size: 1.1em;
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkout {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
padding: 12px;
|
|
||||||
background-color: #ff6600;
|
|
||||||
border: none;
|
|
||||||
color: white;
|
|
||||||
font-size: 16px;
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
margin-top: 90px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkout:hover {
|
|
||||||
background-color: #ff6600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkout {
|
|
||||||
display: inline-block;
|
|
||||||
background-color: #ff6600;
|
|
||||||
color: white;
|
|
||||||
padding: 10px 20px;
|
|
||||||
margin-top: 20px;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: 16px;
|
|
||||||
border-radius: 5px;
|
|
||||||
transition: background-color 0.3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: Arial, sans-serif;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-container {
|
|
||||||
max-width: 600px;
|
|
||||||
margin: auto;
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 25px;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
form h2 {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
label {
|
|
||||||
display: block;
|
|
||||||
margin-top: 15px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"],
|
|
||||||
input[type="tel"],
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
margin-top: 5px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
border-radius: 4px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="submit"] {
|
|
||||||
margin-top: 20px;
|
|
||||||
background-color: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 5px;
|
|
||||||
font-size: 16px;
|
|
||||||
cursor: pointer;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="submit"]:hover {
|
|
||||||
background-color: #ff6600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.zurKasse {
|
|
||||||
display: block;
|
|
||||||
margin: 20px auto;
|
|
||||||
background-color: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 12px 24px;
|
|
||||||
font-size: 16px;
|
|
||||||
border-radius: 8px;
|
|
||||||
cursor: pointer;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.zurKasse:hover {
|
|
||||||
background-color: #ff6600;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,234 +0,0 @@
|
|||||||
/* Allgemeine Einstellungen */
|
|
||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: #333;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header */
|
|
||||||
header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 15px 20px;
|
|
||||||
width: 100%;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
header h1 {
|
|
||||||
font-size: 28px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn {
|
|
||||||
font-size: 14px;
|
|
||||||
text-decoration: none;
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
font-size: 24px;
|
|
||||||
color: #ff6600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart-count {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
right: -10px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
font-size: 12px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Navigation */
|
|
||||||
.menu {
|
|
||||||
background: #ffffff;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-list {
|
|
||||||
list-style: none;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
padding: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #333;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a:hover {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Submenu */
|
|
||||||
.submenu {
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
display: none;
|
|
||||||
list-style: none;
|
|
||||||
min-width: 200px;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a:hover {
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item:hover .submenu {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Suchleiste */
|
|
||||||
.search-bar {
|
|
||||||
display: flex;
|
|
||||||
gap: 15px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 65px;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar input,
|
|
||||||
.search-bar select {
|
|
||||||
padding: 12px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button {
|
|
||||||
padding: 12px 20px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Karten */
|
|
||||||
.card-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
||||||
gap: 20px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #333;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card p {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 12px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
margin-top: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
@ -1,109 +1,61 @@
|
|||||||
/* Allgemeine Einstellungen */
|
.login-container {
|
||||||
* {
|
background-color: #fff;
|
||||||
margin: 0;
|
padding: 40px 30px;
|
||||||
padding: 0;
|
border-radius: 16px;
|
||||||
box-sizing: border-box;
|
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: #333;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wrapper */
|
|
||||||
.wrapper {
|
|
||||||
background: #ffffff;
|
|
||||||
padding: 40px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
max-width: 400px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
max-width: 400px;
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 24px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #333;
|
margin: 50px auto; /* Zentriert das Formular */
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Input-Box */
|
.login-form .input-group {
|
||||||
.input-box {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-box input {
|
.login-form input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 40px 12px 15px;
|
padding: 12px 15px 12px 15px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
border-radius: 5px;
|
border-radius: 8px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #333;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Styling für das Schloss-Icon */
|
.login-form .icon {
|
||||||
.input-box i {
|
display: none;
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
right: 15px;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
color: #888;
|
|
||||||
font-size: 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remember and Forgot */
|
.login-btn {
|
||||||
.remember-forgot {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.remember-forgot a {
|
|
||||||
color: #ff6600;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.remember-forgot a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Button */
|
|
||||||
.btn {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 20px;
|
padding: 12px;
|
||||||
background: #ff6600;
|
background: #ff6600;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 5px;
|
border-radius: 25px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.3s ease;
|
transition: background 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
.login-btn:hover {
|
||||||
background: #e95b00;
|
background: #e95b00;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Register-Link */
|
.register-text {
|
||||||
.register-link {
|
margin-top: 20px;
|
||||||
text-align: center;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
color: #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-link a {
|
.register-text a {
|
||||||
color: #ff6600;
|
color: #ff6600;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.register-link a:hover {
|
.register-text a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
@ -1,103 +1,72 @@
|
|||||||
/* Allgemeine Einstellungen */
|
.page-container {
|
||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: #333;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wrapper für das Formular */
|
.register-wrapper {
|
||||||
.wrapper {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
margin: 50px auto;
|
width: 100%;
|
||||||
padding: 20px;
|
padding: 30px;
|
||||||
background: #fff;
|
background-color: #ffffff;
|
||||||
border-radius: 10px;
|
border: 1px solid #ddd;
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.content-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 40px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.registration-container {
|
||||||
|
max-width: 400px;
|
||||||
|
margin: 60px auto;
|
||||||
|
padding: 30px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.registration-container h2 {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
color: #333;
|
font-size: 1.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Eingabefelder */
|
.registration-container input[type="text"],
|
||||||
.input-box {
|
.registration-container input[type="email"],
|
||||||
position: relative;
|
.registration-container input[type="password"] {
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Textfelder */
|
|
||||||
.input-box input {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 15px;
|
padding: 10px 12px;
|
||||||
font-size: 16px;
|
margin-bottom: 15px;
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ccc;
|
||||||
border-radius: 5px;
|
border-radius: 8px;
|
||||||
outline: none;
|
font-size: 1em;
|
||||||
padding-left: 40px; /* Platz für das Icon */
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Positionierung der Icons */
|
.register-link {
|
||||||
.input-box i {
|
text-align: center;
|
||||||
position: absolute;
|
font-size: 14px;
|
||||||
top: 50%;
|
margin-top: 5px;
|
||||||
left: 10px;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
font-size: 18px;
|
|
||||||
color: #888;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Passwortfeld */
|
.register-link a {
|
||||||
.input-box input[type="password"] {
|
color: #ff6600;
|
||||||
padding-right: 40px; /* Platz für das Passwort-Symbol rechts */
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Positionierung des Passwort-Symbols */
|
.register-link a:hover {
|
||||||
#toggleRegPassword {
|
text-decoration: underline;
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
right: 10px;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
font-size: 18px;
|
|
||||||
color: #888;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Passwort Sicherheitsbalken */
|
.register-btn {
|
||||||
.password-strength-bar {
|
|
||||||
width: 100%;
|
|
||||||
height: 5px;
|
|
||||||
background-color: #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sicherheitsstufen */
|
|
||||||
.password-strength-bar.weak {
|
|
||||||
background-color: #f44336; /* Rot für schwach */
|
|
||||||
}
|
|
||||||
|
|
||||||
.password-strength-bar.medium {
|
|
||||||
background-color: #ff9800; /* Orange für mittel */
|
|
||||||
}
|
|
||||||
|
|
||||||
.password-strength-bar.strong {
|
|
||||||
background-color: #4caf50; /* Grün für stark */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Button */
|
|
||||||
.btn {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
background: #ff6600;
|
background: #ff6600;
|
||||||
@ -105,25 +74,8 @@ h1 {
|
|||||||
border: none;
|
border: none;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.3s ease;
|
transition: background 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Registrierung-Link */
|
|
||||||
.register-link {
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.register-link a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #ff6600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.register-link a:hover {
|
|
||||||
color: #e95b00;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,234 +0,0 @@
|
|||||||
/* Allgemeine Einstellungen */
|
|
||||||
* {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: "Poppins", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background: #f8f9fa;
|
|
||||||
color: #333;
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Header */
|
|
||||||
header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 15px 20px;
|
|
||||||
width: 100%;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
header h1 {
|
|
||||||
font-size: 28px;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn {
|
|
||||||
font-size: 14px;
|
|
||||||
text-decoration: none;
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
padding: 10px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .login-btn:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
font-size: 24px;
|
|
||||||
color: #ff6600;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cart-count {
|
|
||||||
position: absolute;
|
|
||||||
top: -5px;
|
|
||||||
right: -10px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
font-size: 12px;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Navigation */
|
|
||||||
.menu {
|
|
||||||
background: #ffffff;
|
|
||||||
width: 100%;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-list {
|
|
||||||
list-style: none;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
padding: 15px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #333;
|
|
||||||
font-size: 18px;
|
|
||||||
padding: 10px 20px;
|
|
||||||
transition: background 0.3s ease, color 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item a:hover {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Submenu */
|
|
||||||
.submenu {
|
|
||||||
position: absolute;
|
|
||||||
top: 100%;
|
|
||||||
left: 0;
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
display: none;
|
|
||||||
list-style: none;
|
|
||||||
min-width: 200px;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submenu li a:hover {
|
|
||||||
color: white;
|
|
||||||
background: #ff6600;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-item:hover .submenu {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Suchleiste */
|
|
||||||
.search-bar {
|
|
||||||
display: flex;
|
|
||||||
gap: 15px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
position: sticky;
|
|
||||||
top: 65px;
|
|
||||||
z-index: 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar input,
|
|
||||||
.search-bar select {
|
|
||||||
padding: 12px;
|
|
||||||
font-size: 16px;
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
border-radius: 5px;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button {
|
|
||||||
padding: 12px 20px;
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 5px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar button:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Karten */
|
|
||||||
.card-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
||||||
gap: 20px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: #ffffff;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
text-align: center;
|
|
||||||
padding: 20px;
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card img {
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
border-radius: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
color: #333;
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card p {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #666;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart {
|
|
||||||
background: #ff6600;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 12px 20px;
|
|
||||||
border-radius: 25px;
|
|
||||||
margin-top: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.add-to-cart:hover {
|
|
||||||
background: #e95b00;
|
|
||||||
}
|
|
||||||
@ -1,26 +1,753 @@
|
|||||||
|
/* ========== Allgemeine Einstellungen ========== */
|
||||||
/*
|
* {
|
||||||
===============
|
margin: 0;
|
||||||
Fonts
|
padding: 0;
|
||||||
===============
|
box-sizing: border-box;
|
||||||
*/
|
font-family: "Poppins", sans-serif;
|
||||||
@import url("https://fonts.googleapis.com/css?family=Open+Sans|Roboto:400,700&display=swap");
|
|
||||||
|
|
||||||
/*
|
|
||||||
===============
|
|
||||||
Variables
|
|
||||||
===============
|
|
||||||
*/
|
|
||||||
:root {
|
|
||||||
--demo-clr: #ff0000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
html, body {
|
||||||
===============
|
height: 100%;
|
||||||
Global Styles
|
}
|
||||||
===============
|
|
||||||
*/
|
body {
|
||||||
|
background: #f8f9fa;
|
||||||
|
color: #333;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Header ========== */
|
||||||
|
header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0px 20px;
|
||||||
|
width: 100%;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-container h1 {
|
||||||
|
margin-left: 10px;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-img {
|
||||||
|
height: 70px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-link {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size: 30px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
|
font-size: 14px;
|
||||||
|
text-decoration: none;
|
||||||
|
color: white;
|
||||||
|
background: #ff6600;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 25px;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn:hover {
|
||||||
|
background: #e95b00;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Warenkorb Icon ========== */
|
||||||
|
.cart {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #ff6600;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cart-count {
|
||||||
|
position: absolute;
|
||||||
|
top: -5px;
|
||||||
|
right: -10px;
|
||||||
|
background: #ff6600;
|
||||||
|
color: white;
|
||||||
|
font-size: 12px;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Navigation ========== */
|
||||||
|
.menu {
|
||||||
|
background: #ffffff;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-list {
|
||||||
|
list-style: none;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #333;
|
||||||
|
font-size: 18px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
transition: background 0.3s ease, color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item a:hover {
|
||||||
|
background: #ff6600;
|
||||||
|
color: white;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submenu {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
display: none;
|
||||||
|
list-style: none;
|
||||||
|
min-width: 200px;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submenu li {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submenu li a {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submenu li a:hover {
|
||||||
|
color: white;
|
||||||
|
background: #ff6600;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-item:hover .submenu {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Suchleiste ========== */
|
||||||
|
.search-bar {
|
||||||
|
display: flex;
|
||||||
|
gap: 15px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20px;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
position: sticky;
|
||||||
|
top: 65px;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar input,
|
||||||
|
.search-bar select {
|
||||||
|
padding: 12px;
|
||||||
|
font-size: 16px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 5px;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar button {
|
||||||
|
padding: 12px 20px;
|
||||||
|
background: #ff6600;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar button:hover {
|
||||||
|
background: #e95b00;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Karten ========== */
|
||||||
|
.card-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||||
|
gap: 20px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 10px;
|
||||||
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card img {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card h3 {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333;
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card p {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #666;
|
||||||
|
margin: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-to-cart {
|
||||||
|
background: #ff6600;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 12px 20px;
|
||||||
|
border-radius: 25px;
|
||||||
|
margin-top: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-to-cart:hover {
|
||||||
|
background: #e95b00;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Footer ========== */
|
||||||
|
.footer {
|
||||||
|
background: #222;
|
||||||
|
color: #fff;
|
||||||
|
padding: 30px 20px;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer a {
|
||||||
|
color: #ff6600;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Bestellinformationen ========== */
|
||||||
|
#bestellung {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 20px;
|
||||||
|
padding: 30px 20px;
|
||||||
|
max-width: 800px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bestell-info-card {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 15px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||||
|
padding: 25px;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bestell-info-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bestell-info-card h3 {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bestell-info-card p {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #555;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bestell-info-card strong {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warenkorb {
|
||||||
|
max-width: 1000px;
|
||||||
|
margin: 40px auto;
|
||||||
|
padding: 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 16px;
|
||||||
|
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
main > h2 {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 2rem;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warenkorb-tabelle {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warenkorb-tabelle th, .warenkorb-tabelle td {
|
||||||
|
padding: 12px 15px;
|
||||||
|
text-align: center;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warenkorb-tabelle th {
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warenkorb-tabelle tr:nth-child(even) {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menge-button, .loeschen-button {
|
||||||
|
background-color: #4a90e2;
|
||||||
|
border: none;
|
||||||
|
color: white;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menge-button:hover, .loeschen-button:hover {
|
||||||
|
background-color: #357ab8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loeschen-button {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loeschen-button:hover {
|
||||||
|
background-color: #c0392b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.produkt-anzahl {
|
||||||
|
margin: 0 8px;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 24px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#gesamtpreis-container {
|
||||||
|
margin-top: 20px;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zurKasseGehen {
|
||||||
|
margin-top: 30px;
|
||||||
|
background-color: #e95b00;
|
||||||
|
color: white;
|
||||||
|
padding: 12px 25px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 18px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s ease;
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#zurKasseGehen:hover {
|
||||||
|
background-color: #219150;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Bestellformular Styling ========== */
|
||||||
|
.form-container {
|
||||||
|
background: #fff;
|
||||||
|
max-width: 700px;
|
||||||
|
margin: 40px auto;
|
||||||
|
padding: 30px;
|
||||||
|
border-radius: 20px;
|
||||||
|
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#bestellform {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bestellform h2 {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 26px;
|
||||||
|
color: #ff6600;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bestellform label {
|
||||||
|
font-weight: 500;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bestellform input[type="text"] {
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
font-size: 16px;
|
||||||
|
transition: border-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bestellform input[type="text"]:focus {
|
||||||
|
border-color: #ff6600;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 24px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
text-align: center;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #555;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"], input[type="number"] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px;
|
||||||
|
font-size: 16px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
transition: border 0.3s ease, box-shadow 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="text"]:focus, input[type="number"]:focus {
|
||||||
|
border-color: #ff6600;
|
||||||
|
box-shadow: 0 0 8px rgba(255, 102, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.Artikel {
|
||||||
|
display: flex;
|
||||||
|
gap: 5px;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Artikel input {
|
||||||
|
flex: 1 1 120px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Artikel .verfuegbarkeit {
|
||||||
|
font-size: 14px;
|
||||||
|
flex-basis: 100%;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ArtikelNrText, .StueckzahlText {
|
||||||
|
width: calc(50% - 5px);
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ArtikelNrText:focus, .StueckzahlText:focus {
|
||||||
|
border-color: #ff6600;
|
||||||
|
box-shadow: 0 0 8px rgba(255, 102, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.loeschen-button {
|
||||||
|
background-color: #e74c3c;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 8px 16px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loeschen-button:hover {
|
||||||
|
background-color: #c0392b;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-submit {
|
||||||
|
margin-top: 20px;
|
||||||
|
padding: 14px;
|
||||||
|
background: #ff6600;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 25px;
|
||||||
|
text-align: center;
|
||||||
|
display: inline-block;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-submit:hover {
|
||||||
|
background: #e95b00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.verfuegbarkeit {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #888;
|
||||||
|
flex-grow: 1;
|
||||||
|
text-align: right;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sendOrder {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px;
|
||||||
|
background-color: #ff6600;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 18px;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s ease;
|
||||||
|
margin-top: 20px;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sendOrder:hover {
|
||||||
|
background-color: #e95b00;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.ArtikelNrText, .StueckzahlText {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-text-formular {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 17px;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-text-formular a {
|
||||||
|
color: #ff6600;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-text-formular a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[readonly] {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
color: #666;
|
||||||
|
border: 1px dashed #999;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:not([readonly]) {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #000;
|
||||||
|
border: 1px solid #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Formulare und Buttons allgemein ========== */
|
||||||
|
.input-box {
|
||||||
|
position: relative;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 25px;
|
||||||
|
color: #333;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-box input {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 40px 12px 15px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 5px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-box i {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: 15px;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
color: #888;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px 20px;
|
||||||
|
background: #ff6600;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
background: #e95b00;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
color: var(--demo-clr);
|
font-size: 24px;
|
||||||
|
color: #333;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-cards-section {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 30px;
|
||||||
|
padding: 50px 20px;
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-card {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 15px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||||||
|
padding: 30px 25px;
|
||||||
|
width: 320px;
|
||||||
|
min-height: 50px;
|
||||||
|
text-align: center;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-card i {
|
||||||
|
font-size: 50px;
|
||||||
|
color: #ff6600;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-card h3 {
|
||||||
|
font-size: 22px;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-card p {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========== Error Nachricht (Header und Footer) ========== */
|
||||||
|
.error-message {
|
||||||
|
max-width: 600px;
|
||||||
|
margin: 40px auto;
|
||||||
|
padding: 30px;
|
||||||
|
background-color: #fff5f5;
|
||||||
|
color: #b00020;
|
||||||
|
border: 1px solid #ffcccc;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||||
|
text-align: center;
|
||||||
|
font-family: inherit;
|
||||||
|
animation: fadeIn 0.6s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message h3 {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message p {
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* weiche Animation beim Einblenden */
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(20px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 534 KiB |
BIN
static/images/Logo.png
Normal file
BIN
static/images/Logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Loading…
x
Reference in New Issue
Block a user