summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--StoneIsland/www/css/nav.css8
-rw-r--r--StoneIsland/www/css/products.css18
-rw-r--r--StoneIsland/www/index.html11
-rw-r--r--StoneIsland/www/js/index.js9
-rw-r--r--StoneIsland/www/js/lib/_router.js4
-rw-r--r--StoneIsland/www/js/lib/account/OrdersView.js1
-rw-r--r--StoneIsland/www/js/lib/blogs/BlogView.js3
-rw-r--r--StoneIsland/www/js/lib/products/ClosedStoreView.js45
8 files changed, 91 insertions, 8 deletions
diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css
index 66b1b20f..8bc131d1 100644
--- a/StoneIsland/www/css/nav.css
+++ b/StoneIsland/www/css/nav.css
@@ -299,10 +299,10 @@ padding-bottom:0px;
/* CONTENT */
#story, #hub, #archive, .page,
-#collection, #product, #search,
-#login, #logout,
+#collection, #product, #search, #closed,
+#login, #logout, #signup,
#cart,
-#signup, #shipping, #payment, #profile, #settings {
+#profile, #shipping, #payment, #settings, #orders {
position: absolute;
top: 43px;
height: -webkit-calc(100% - 43px - 39px);
@@ -310,7 +310,7 @@ padding-bottom:0px;
width: 100%;
overflow: hidden;
}
-#story, #hub, #archive, .page {
+#story, #hub, #archive, .page, #closed {
/* these things do not have a footer */
height: -webkit-calc(100% - 43px);
height: calc(100% - 43px);
diff --git a/StoneIsland/www/css/products.css b/StoneIsland/www/css/products.css
index 2553cd9b..4dace6ea 100644
--- a/StoneIsland/www/css/products.css
+++ b/StoneIsland/www/css/products.css
@@ -46,3 +46,21 @@
#search {
display: none;
}
+
+.closed #closed { display: block }
+#closed {
+ display: none;
+ background-size: cover;
+ background-position: center;
+ background-repeat: no-repeat;
+ transition: background 0.5s ease-in;
+}
+#closed .closed_store_msg {
+ position: absolute;
+ bottom: 20vh;
+ background: rgba(255,255,255,0.9);
+ padding-top: 20px;
+ padding-bottom: 10px;
+ text-align: center;
+ width: 100%;
+} \ No newline at end of file
diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html
index 7eb0e318..c94970e7 100644
--- a/StoneIsland/www/index.html
+++ b/StoneIsland/www/index.html
@@ -242,6 +242,16 @@
</div>
</div>
</div>
+
+ <div id="closed">
+ <div class="closed_store_msg">
+ <h3>THIS STORE IS CURRENTLY CLOSED</h3>
+ <div class="website_link">
+ visit<br>
+ <b>www.stoneisland.com</b>
+ </div>
+ </div>
+ </div>
<!-- ACCOUNT ================================================ -->
@@ -712,6 +722,7 @@
<script src="js/lib/products/CollectionView.js"></script>
<script src="js/lib/products/filters/CategoryFilter.js"></script>
+<script src="js/lib/products/ClosedStoreView.js"></script>
<script src="js/lib/products/ProductView.js"></script>
<script src="js/lib/products/GalleryView.js"></script>
<script src="js/lib/products/Selector.js"></script>
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index 07819ca4..dec2d0cd 100644
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -33,6 +33,7 @@ var app = (function(){
app.cart = new CartView ()
+ app.intro = new IntroView ()
app.header = new HeaderView ()
app.footer = new FooterView ()
app.curtain = new CurtainView ()
@@ -48,16 +49,16 @@ var app = (function(){
app.settings = new SettingsView ()
app.orders = new OrdersView ()
- app.intro = new IntroView ()
app.terms = new PageView ({ page: "terms" })
app.privacy = new PageView ({ page: "privacy" })
app.returns = new PageView ({ page: "returns" })
app.care = new PageView ({ page: "care" })
- app.search = new SearchView ()
- app.product = new ProductView ()
app.collection = new CollectionView ()
-
+ app.product = new ProductView ()
+ app.closed = new ClosedStoreView ()
+ app.search = new SearchView ()
+
app.selector = new Selector ()
}
diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js
index 80ea9c39..712d3db2 100644
--- a/StoneIsland/www/js/lib/_router.js
+++ b/StoneIsland/www/js/lib/_router.js
@@ -11,6 +11,7 @@ var SiteRouter = Router.extend({
'/archive': 'archive',
'/store': 'collection',
+ '/store/closed': 'closed',
'/store/:code': 'product',
'/account/login': 'login',
@@ -58,6 +59,9 @@ var SiteRouter = Router.extend({
default_view: function(name){
var fn = function(){
console.log(name)
+ if (app.view && app.view.hide) {
+ app.view.hide()
+ }
if (name.match(/\./)) {
var n = name.split(".")
console.log(name, n)
diff --git a/StoneIsland/www/js/lib/account/OrdersView.js b/StoneIsland/www/js/lib/account/OrdersView.js
index 78a67e43..f9a2a35c 100644
--- a/StoneIsland/www/js/lib/account/OrdersView.js
+++ b/StoneIsland/www/js/lib/account/OrdersView.js
@@ -13,6 +13,7 @@ var OrdersView = View.extend({
},
show: function(){
+ app.footer.hide()
document.body.className = "orders"
this.el.className = "list"
},
diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js
index 85ff8a35..50313aa8 100644
--- a/StoneIsland/www/js/lib/blogs/BlogView.js
+++ b/StoneIsland/www/js/lib/blogs/BlogView.js
@@ -31,6 +31,9 @@ var BlogView = View.extend({
data.page.forEach(function(page){
app[page.tag].populate(page)
})
+ if (data.store[0].StoreIsOpen !== "True") {
+ app.closed.populate(data.store[0].ClosedStoreImages)
+ }
},
}) \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/products/ClosedStoreView.js b/StoneIsland/www/js/lib/products/ClosedStoreView.js
new file mode 100644
index 00000000..c4e929b3
--- /dev/null
+++ b/StoneIsland/www/js/lib/products/ClosedStoreView.js
@@ -0,0 +1,45 @@
+var ClosedStoreView = View.extend({
+
+ el: "#closed",
+
+ events: {
+ "click .website_link": "website_link",
+ },
+
+ delay: 8000,
+
+ timeout: -1,
+ images: null,
+
+ initialize: function(){
+ this.loader = new Loader ()
+ },
+
+ show: function(){
+ document.body.className = "closed"
+ this.animate()
+ app.footer.hide()
+ },
+
+ hide: function(){
+ clearTimeout(this.timeout)
+ },
+
+ animate: function(){
+ this.timeout = setTimeout(this.animate.bind(this), this.delay)
+ if (! this.images) return
+ var url = choice(this.images)
+ this.loader.preloadImage(url, function(img){
+ this.el.style.backgroundImage = 'url(' + img.src + ')'
+ }.bind(this))
+ },
+
+ populate: function(data){
+ this.images = data.map(function(img){ return img.uri })
+ },
+
+ website_link: function(){
+ window.open("http://www.stoneisland.com/", '_system')
+ },
+
+}) \ No newline at end of file