-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b850018
commit afc1959
Showing
60 changed files
with
875 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
save-exact = true | ||
package-lock = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Frontend Mentor Product List Cart | ||
|
||
Here is the implementation in [Bau.js](https://github.com/grucloud/bau) of the [Frontend Mentor Product List Cart code challenge](https://www.frontendmentor.io/challenges/product-list-with-cart-5MmqLVAp_d) | ||
|
||
## Workflow | ||
|
||
Install the dependencies: | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
Start a development server: | ||
|
||
```sh | ||
npm run dev | ||
``` | ||
|
||
Build a production version: | ||
|
||
```sh | ||
npm run build | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
href="./assets/images/favicon-32x32.png" | ||
/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta | ||
name="description" | ||
content="FrontendMentor 'Product List Cart' code challenge implemented with Bau.js" | ||
/> | ||
<title>Product List Cart | FrontendMentor</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "frontendmentor-product-list-cart", | ||
"private": true, | ||
"version": "0.85.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"preview": "vite preview" | ||
}, | ||
"devDependencies": { | ||
"typescript": "^5.0.2", | ||
"vite": "^5.2.11" | ||
}, | ||
"dependencies": { | ||
"@grucloud/bau": "^0.85.0", | ||
"@grucloud/bau-css": "^0.85.0", | ||
"@grucloud/bau-ui": "^0.85.0", | ||
"bignumber.js": "9.1.2" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/product-list-cart/public/assets/images/icon-add-to-cart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/product-list-cart/public/assets/images/icon-carbon-neutral.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/product-list-cart/public/assets/images/icon-decrement-quantity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/product-list-cart/public/assets/images/icon-increment-quantity.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions
4
examples/product-list-cart/public/assets/images/icon-order-confirmed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/product-list-cart/public/assets/images/icon-remove-item.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/product-list-cart/public/assets/images/illustration-article.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
examples/product-list-cart/public/assets/images/illustration-empty-cart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added
BIN
+31.1 KB
examples/product-list-cart/public/assets/images/image-baklava-desktop.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+35.2 KB
examples/product-list-cart/public/assets/images/image-baklava-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.8 KB
examples/product-list-cart/public/assets/images/image-baklava-tablet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.42 KB
examples/product-list-cart/public/assets/images/image-baklava-thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.9 KB
examples/product-list-cart/public/assets/images/image-brownie-desktop.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.2 KB
examples/product-list-cart/public/assets/images/image-brownie-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.7 KB
examples/product-list-cart/public/assets/images/image-brownie-tablet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.07 KB
examples/product-list-cart/public/assets/images/image-brownie-thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.3 KB
examples/product-list-cart/public/assets/images/image-cake-desktop.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+43.6 KB
examples/product-list-cart/public/assets/images/image-cake-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.8 KB
examples/product-list-cart/public/assets/images/image-cake-tablet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.04 KB
examples/product-list-cart/public/assets/images/image-cake-thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.2 KB
examples/product-list-cart/public/assets/images/image-creme-brulee-desktop.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.1 KB
examples/product-list-cart/public/assets/images/image-creme-brulee-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+26.9 KB
examples/product-list-cart/public/assets/images/image-creme-brulee-tablet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.25 KB
examples/product-list-cart/public/assets/images/image-creme-brulee-thumbnail.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.4 KB
examples/product-list-cart/public/assets/images/image-macaron-desktop.jpg
Oops, something went wrong.
Binary file added
BIN
+16.5 KB
examples/product-list-cart/public/assets/images/image-macaron-mobile.jpg
Oops, something went wrong.
Binary file added
BIN
+8.73 KB
examples/product-list-cart/public/assets/images/image-macaron-tablet.jpg
Oops, something went wrong.
Binary file added
BIN
+1.4 KB
examples/product-list-cart/public/assets/images/image-macaron-thumbnail.jpg
Oops, something went wrong.
Binary file added
BIN
+35.8 KB
examples/product-list-cart/public/assets/images/image-meringue-desktop.jpg
Oops, something went wrong.
Binary file added
BIN
+37 KB
examples/product-list-cart/public/assets/images/image-meringue-mobile.jpg
Oops, something went wrong.
Binary file added
BIN
+28.5 KB
examples/product-list-cart/public/assets/images/image-meringue-tablet.jpg
Oops, something went wrong.
Binary file added
BIN
+3.39 KB
examples/product-list-cart/public/assets/images/image-meringue-thumbnail.jpg
Oops, something went wrong.
Binary file added
BIN
+10.6 KB
examples/product-list-cart/public/assets/images/image-panna-cotta-desktop.jpg
Oops, something went wrong.
Binary file added
BIN
+13 KB
examples/product-list-cart/public/assets/images/image-panna-cotta-mobile.jpg
Oops, something went wrong.
Binary file added
BIN
+8.62 KB
examples/product-list-cart/public/assets/images/image-panna-cotta-tablet.jpg
Oops, something went wrong.
Binary file added
BIN
+1.47 KB
examples/product-list-cart/public/assets/images/image-panna-cotta-thumbnail.jpg
Oops, something went wrong.
Binary file added
BIN
+39.8 KB
examples/product-list-cart/public/assets/images/image-tiramisu-desktop.jpg
Oops, something went wrong.
Binary file added
BIN
+44.9 KB
examples/product-list-cart/public/assets/images/image-tiramisu-mobile.jpg
Oops, something went wrong.
Binary file added
BIN
+31.6 KB
examples/product-list-cart/public/assets/images/image-tiramisu-tablet.jpg
Oops, something went wrong.
Binary file added
BIN
+3.91 KB
examples/product-list-cart/public/assets/images/image-tiramisu-thumbnail.jpg
Oops, something went wrong.
Binary file added
BIN
+36.7 KB
examples/product-list-cart/public/assets/images/image-waffle-desktop.jpg
Oops, something went wrong.
Binary file added
BIN
+43.7 KB
examples/product-list-cart/public/assets/images/image-waffle-mobile.jpg
Oops, something went wrong.
Binary file added
BIN
+28.9 KB
examples/product-list-cart/public/assets/images/image-waffle-tablet.jpg
Oops, something went wrong.
Binary file added
BIN
+3.71 KB
examples/product-list-cart/public/assets/images/image-waffle-thumbnail.jpg
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
[ | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-waffle-thumbnail.jpg", | ||
"mobile": "./assets/images/image-waffle-mobile.jpg", | ||
"tablet": "./assets/images/image-waffle-tablet.jpg", | ||
"desktop": "./assets/images/image-waffle-desktop.jpg" | ||
}, | ||
"name": "Waffle with Berries", | ||
"category": "Waffle", | ||
"price": 6.50 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-creme-brulee-thumbnail.jpg", | ||
"mobile": "./assets/images/image-creme-brulee-mobile.jpg", | ||
"tablet": "./assets/images/image-creme-brulee-tablet.jpg", | ||
"desktop": "./assets/images/image-creme-brulee-desktop.jpg" | ||
}, | ||
"name": "Vanilla Bean Crème Brûlée", | ||
"category": "Crème Brûlée", | ||
"price": 7.00 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-macaron-thumbnail.jpg", | ||
"mobile": "./assets/images/image-macaron-mobile.jpg", | ||
"tablet": "./assets/images/image-macaron-tablet.jpg", | ||
"desktop": "./assets/images/image-macaron-desktop.jpg" | ||
}, | ||
"name": "Macaron Mix of Five", | ||
"category": "Macaron", | ||
"price": 8.00 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-tiramisu-thumbnail.jpg", | ||
"mobile": "./assets/images/image-tiramisu-mobile.jpg", | ||
"tablet": "./assets/images/image-tiramisu-tablet.jpg", | ||
"desktop": "./assets/images/image-tiramisu-desktop.jpg" | ||
}, | ||
"name": "Classic Tiramisu", | ||
"category": "Tiramisu", | ||
"price": 5.50 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-baklava-thumbnail.jpg", | ||
"mobile": "./assets/images/image-baklava-mobile.jpg", | ||
"tablet": "./assets/images/image-baklava-tablet.jpg", | ||
"desktop": "./assets/images/image-baklava-desktop.jpg" | ||
}, | ||
"name": "Pistachio Baklava", | ||
"category": "Baklava", | ||
"price": 4.00 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-meringue-thumbnail.jpg", | ||
"mobile": "./assets/images/image-meringue-mobile.jpg", | ||
"tablet": "./assets/images/image-meringue-tablet.jpg", | ||
"desktop": "./assets/images/image-meringue-desktop.jpg" | ||
}, | ||
"name": "Lemon Meringue Pie", | ||
"category": "Pie", | ||
"price": 5.00 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-cake-thumbnail.jpg", | ||
"mobile": "./assets/images/image-cake-mobile.jpg", | ||
"tablet": "./assets/images/image-cake-tablet.jpg", | ||
"desktop": "./assets/images/image-cake-desktop.jpg" | ||
}, | ||
"name": "Red Velvet Cake", | ||
"category": "Cake", | ||
"price": 4.50 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-brownie-thumbnail.jpg", | ||
"mobile": "./assets/images/image-brownie-mobile.jpg", | ||
"tablet": "./assets/images/image-brownie-tablet.jpg", | ||
"desktop": "./assets/images/image-brownie-desktop.jpg" | ||
}, | ||
"name": "Salted Caramel Brownie", | ||
"category": "Brownie", | ||
"price": 4.50 | ||
}, | ||
{ | ||
"image": { | ||
"thumbnail": "./assets/images/image-panna-cotta-thumbnail.jpg", | ||
"mobile": "./assets/images/image-panna-cotta-mobile.jpg", | ||
"tablet": "./assets/images/image-panna-cotta-tablet.jpg", | ||
"desktop": "./assets/images/image-panna-cotta-desktop.jpg" | ||
}, | ||
"name": "Vanilla Panna Cotta", | ||
"category": "Panna Cotta", | ||
"price": 6.50 | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { createContext, type Context } from "@grucloud/bau-ui/context"; | ||
import productListCart from "./productListCart"; | ||
|
||
import "./style.css"; | ||
|
||
const context = createContext(); | ||
|
||
const app = (context: Context) => { | ||
const { bau } = context; | ||
const { main } = bau.tags; | ||
|
||
const ProductListCart = productListCart(context); | ||
|
||
return function () { | ||
return main(ProductListCart()); | ||
}; | ||
}; | ||
|
||
const App = app(context); | ||
document.getElementById("app")?.replaceChildren(App()); |
Oops, something went wrong.