Skip to content

Commit

Permalink
amp-bind: Improve e-commerce example (ampproject#8924)
Browse files Browse the repository at this point in the history
* first pass on prettifying ecommerce sample

* more progress on ecommerce sample

* add more sizes

* inline material design lite css

* fix initial value issues

* kevin's comments

* elaborate comment
  • Loading branch information
William Chou authored and Eric Kenney committed May 3, 2017
1 parent ef19e59 commit 3996ceb
Show file tree
Hide file tree
Showing 23 changed files with 294 additions and 54 deletions.
48 changes: 37 additions & 11 deletions build-system/app.js
Expand Up @@ -638,32 +638,58 @@ app.use('/bind/ecommerce/sizes', function(req, res, next) {
setTimeout(() => {
var prices = {
"0": {
"sizes": ["XS"]
"sizes": {
"XS": 8.99,
"S": 9.99,
},
},
"1": {
"sizes": ["S", "M", "L"]
"sizes": {
"S": 10.99,
"M": 12.99,
"L": 14.99,
},
},
"2": {
"sizes": ["XL"]
"sizes": {
"L": 11.99,
"XL": 13.99,
},
},
"3": {
"sizes": ["M", "XL"]
"sizes": {
"M": 7.99,
"L": 9.99,
"XL": 11.99,
},
},
"4": {
"sizes": ["S", "L"]
"sizes": {
"XS": 8.99,
"S": 10.99,
"L": 15.99,
},
},
"5": {
"sizes": ["S", "XL"]
"sizes": {
"S": 8.99,
"L": 14.99,
"XL": 11.99,
},
},
"6": {
"sizes": ["XS", "M"]
"sizes": {
"XS": 8.99,
"S": 9.99,
"M": 12.99,
},
},
"7": {
"sizes": ["M", "L", "XL"]
"sizes": {
"M": 10.99,
"L": 11.99,
},
},
"8": {
"sizes": ["XS", "M", "XL"]
}
};
const object = {};
object[req.query.shirt] = prices[req.query.shirt];
Expand Down
300 changes: 257 additions & 43 deletions examples/bind/ecommerce.amp.html

Large diffs are not rendered by default.

Binary file added examples/bind/img/ic_menu_white_24dp_1x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/img/ic_menu_white_24dp_2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/img/ic_search_white_24dp_1x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/img/ic_search_white_24dp_2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/bind/shirts/black.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/bind/shirts/blue.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/bind/shirts/brown.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/bind/shirts/dark-green.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/bind/shirts/gray.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/bind/shirts/light-gray.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/bind/shirts/navy.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/black.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/blue.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/brown.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/dark-green.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/gray.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/light-gray.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/navy.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/bind/shirts/swatch/wine.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed examples/bind/shirts/white.jpg
Binary file not shown.
Binary file modified examples/bind/shirts/wine.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3996ceb

Please sign in to comment.