summaryrefslogtreecommitdiff
path: root/StoneIsland
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-30 22:08:25 -0500
committerJules Laplace <jules@okfoc.us>2015-11-30 22:08:25 -0500
commitb3d98498a562e5ce6dccc333562ed079bcac736d (patch)
tree752aac0d9c091e1c914f17b0bedee5986a18c93c /StoneIsland
parent8c269d14565f8e56883af0d684de0aefb2f2def1 (diff)
gallery divs
Diffstat (limited to 'StoneIsland')
-rw-r--r--StoneIsland/www/css/blogs.css4
-rw-r--r--StoneIsland/www/index.html6
-rw-r--r--StoneIsland/www/js/lib/products/CollectionView.js1
-rw-r--r--StoneIsland/www/js/lib/products/GalleryView.js8
4 files changed, 16 insertions, 3 deletions
diff --git a/StoneIsland/www/css/blogs.css b/StoneIsland/www/css/blogs.css
index ad8cef2f..19e3f8fd 100644
--- a/StoneIsland/www/css/blogs.css
+++ b/StoneIsland/www/css/blogs.css
@@ -66,6 +66,10 @@
margin:10px auto 100px;
}
+.hub_item {
+ position: relative;
+}
+
.content-header {
width:calc(100vw - 40px);
box-sizing:border-box;
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html
index 977b77cb..5491d98a 100644
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -138,8 +138,10 @@
<h1>HUB</h1>
<div class="content">
<script type="text/html" class="template">
- <div>
+ <div class="hub_item">
<div class="gallery gallery-{{id}}"></div>
+ <div class="gallery-left"></div>
+ <div class="gallery-right"></div>
<div class="content-header">
<div class="content-share">
SHARE +
@@ -252,6 +254,8 @@
<div class="item" style="background-image:url({{image}})"></div>
</script>
</div>
+ <div class="gallery-left"></div>
+ <div class="gallery-right"></div>
<div class="content">
<div class="product-header">
<span class="num"></span>
diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js
index e0d5bf82..056f2a52 100644
--- a/StoneIsland/www/js/lib/products/CollectionView.js
+++ b/StoneIsland/www/js/lib/products/CollectionView.js
@@ -65,6 +65,7 @@ var CollectionView = ScrollableView.extend({
this.deferScrollToTop()
}
this.afterFetchCallback && this.afterFetchCallback()
+ app.collection.deferRefresh()
},
append: function(item){
diff --git a/StoneIsland/www/js/lib/products/GalleryView.js b/StoneIsland/www/js/lib/products/GalleryView.js
index ea4637eb..b36c5df2 100644
--- a/StoneIsland/www/js/lib/products/GalleryView.js
+++ b/StoneIsland/www/js/lib/products/GalleryView.js
@@ -31,7 +31,7 @@ var GalleryView = View.extend({
valid_styles[style] = size
}
})
- Object.keys(valid_styles).forEach(function(style){
+ Object.keys(valid_styles).sort(sort_image_styles).forEach(function(style){
var id = valid_styles[style] + "_" + style
var t = this.template.replace(/{{image}}/, sdk.image(code, id))
this.$el.append(t)
@@ -62,4 +62,8 @@ var GalleryView = View.extend({
touchend: function(e){
},
-}) \ No newline at end of file
+})
+
+var YOOX_IMAGE_STYLE_ORDER = "ZZZ d f".split(" ")
+
+function sort_image_styles (b,a){ return (YOOX_IMAGE_STYLE_ORDER.indexOf(a)) - (YOOX_IMAGE_STYLE_ORDER.indexOf(b)) } \ No newline at end of file