diff options
| -rw-r--r-- | .gitignore | 38 | ||||
| -rw-r--r-- | StoneIsland/www/css/index.css | 16 | ||||
| -rw-r--r-- | StoneIsland/www/index.html | 21 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/_router.js | 42 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/IntroView.js | 26 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/NavView.js | 62 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/router.js | 16 |
7 files changed, 201 insertions, 20 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..57a0c3a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +.DS_Store + +bower_components +node_modules + +.bundle +db/*.sqlite3 +log/*.log +tmp/ +.sass-cache +.#* +*~ +*.orig +*# +*.swp +*.mp4 +*.db + +config.json + +app.concat.js +app.min.js + +server/ + diff --git a/StoneIsland/www/css/index.css b/StoneIsland/www/css/index.css index a0b5f2b1..5ac5d15d 100644 --- a/StoneIsland/www/css/index.css +++ b/StoneIsland/www/css/index.css @@ -13,3 +13,19 @@ body { font-size: 12px; } + +#nav { + width: 300px; + -webkit-transform: translateZ(0) translateX(-300px); + -webkit-transition: -webkit-transform 0.3s; +} +#content { + -webkit-transform: translateZ(0) translateX(0px); + -webkit-transition: -webkit-transform 0.3s; +} +body.nav #nav { + -webkit-transform: translateZ(0) translateX(0); +} +body.nav #content { + -webkit-transform: translateZ(0) translateX(300px); +} diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index b042ee58..0be51d70 100644 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -312,5 +312,26 @@ <script src="js/vendor/view/view.js"></script> <script src="js/vendor/view/formview.js"></script> <script src="js/vendor/view/router.js"></script> + +<script src="js/lib/cart/CartView.js"></script> +<script src="js/lib/cart/CartBilling.js"></script> +<script src="js/lib/cart/CartShipping.js"></script> +<script src="js/lib/cart/CartSummary.js"></script> + +<script src="js/lib/nav/IntroView.js"></script> +<script src="js/lib/nav/HeaderView.js"></script> +<script src="js/lib/nav/FooterView.js"></script> +<script src="js/lib/nav/LoginView.js"></script> +<script src="js/lib/nav/NavView.js"></script> + +<script src="js/lib/products/CollectionView.js"></script> +<script src="js/lib/products/ProductView.js"></script> +<script src="js/lib/products/Selector.js"></script> + +<script src="js/lib/blogs/View.js"></script> +<script src="js/lib/blogs/View.js"></script> +<script src="js/lib/blogs/View.js"></script> + +<script src="js/lib/_router.js"></script> <script src="js/index.js"></script> </html> diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js new file mode 100644 index 00000000..0d0c3bd1 --- /dev/null +++ b/StoneIsland/www/js/lib/_router.js @@ -0,0 +1,42 @@ +var SiteRouter = Router.extend({ + + el: 'body', + + routes: { + '/': 'intro', + '/store': 'store', + '/hub': 'hub', + '/story': 'story', + '/archive': 'archive', + + '/faq': 'faq', + '/search': 'search', + }, + + initialize: function(){ + this.route() + }, + + go: function(url){ + if (app.view && app.view.hide) { + app.view.hide() + } + this.parseRoute(url) + }, + + intro: function(){ + }, + + store: function(){ + }, + + hub: function(){ + }, + + story: function(){ + }, + + archive: function(){ + }, + +}) diff --git a/StoneIsland/www/js/lib/nav/IntroView.js b/StoneIsland/www/js/lib/nav/IntroView.js index 6e04a39e..346c3aef 100644 --- a/StoneIsland/www/js/lib/nav/IntroView.js +++ b/StoneIsland/www/js/lib/nav/IntroView.js @@ -3,13 +3,28 @@ var IntroView = View.extend({ el: "#intro", events: { + "click .store": "store", + "click .hub": "hub", + "click .story": "story", + "click .archive": "archive", }, initialize: function(){ - this.logo = this.$("#logo").get(0) - window.addEventListener("deviceorientation", deviceorientation) + this.compass = this.$("#compass").get(0) + this.orient = this.deviceorientation.bind(this) }, + show: function(){ + this.$el.show() + window.addEventListener("deviceorientation", this.orient) + // get location.. + }, + + hide: function(){ + this.$el.hide() + window.removeEventListener("deviceorientation", this.orient) + }, + deviceorientation: function(e){ var heading if ('webkitCompassHeading' in e) { @@ -18,7 +33,12 @@ var IntroView = View.extend({ else { heading = e.alpha } - this.logo.css[transformProp] = "translateZ(0) rotate(" + heading + "deg)" + this.compass.css[transformProp] = "translateZ(0) rotate(" + heading + "deg)" }, + + store: function(){ app.router.go("store") }, + hub: function(){ app.router.go("hub") }, + story: function(){ app.router.go("story") }, + archive: function(){ app.router.go("archive") }, }) diff --git a/StoneIsland/www/js/lib/nav/NavView.js b/StoneIsland/www/js/lib/nav/NavView.js index 57eaf357..6e57ec32 100644 --- a/StoneIsland/www/js/lib/nav/NavView.js +++ b/StoneIsland/www/js/lib/nav/NavView.js @@ -3,9 +3,69 @@ var NavView = View.extend({ el: "#nav", events: { + "click .store": "store", + "click .hub": "hub", + "click .story": "story", + "click .archive": "archive", + "click .login": "login", + "click .faq": "faq", + "click .search": "search", + "click .fb": "fb", + "click .insta": "insta", + "click .tw": "tw", }, initialize: function(){ }, + + show: function(){ + $("body").addClass("nav") + }, + + hide: function(){ + $("body").removeClass("nav") + }, + + store: function(){ + this.hide() + app.router.go("store") + }, + hub: function(){ + this.hide() + app.router.go("hub") + }, + story: function(){ + this.hide() + app.router.go("story") + }, + archive: function(){ + this.hide() + app.router.go("archive") + }, + + login: function(){ + this.hide() + app.router.go("login") + }, + + search: function(){ + this.hide() + app.router.go("search") + }, + faq: function(){ + this.hide() + app.router.go("faq") + }, + + fb: function(){ + window.open("https://www.facebook.com/StoneIsland", '_system') + }, + insta: function(){ + window.open("https://instagram.com/stoneisland_official", '_system') + }, + tw: function(){ + window.open("https://twitter.com/stoneisland", '_system') + }, + -})
\ No newline at end of file +}) diff --git a/StoneIsland/www/js/lib/router.js b/StoneIsland/www/js/lib/router.js deleted file mode 100644 index 28793fe5..00000000 --- a/StoneIsland/www/js/lib/router.js +++ /dev/null @@ -1,16 +0,0 @@ -var SiteRouter = Router.extend({ - - el: "body", - - routes: { - "/": 'index', - }, - - initialize: function(){ - this.route() - }, - - index: function(){ - }, - -})
\ No newline at end of file |
