diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-11-01 19:02:50 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-11-01 19:02:50 +0100 |
| commit | 1becc513c36e30ffe7cc967613485fa39d05f203 (patch) | |
| tree | a47c359b44df36f822553cd66ddd8f0ebc88cb34 | |
| parent | c75e4f0b5fc83548e337af6c533036baec8c85c9 (diff) | |
v1.2.5
| -rwxr-xr-x | StoneIsland/config.xml | 2 | ||||
| -rwxr-xr-x | StoneIsland/www/css/account.css | 8 | ||||
| -rwxr-xr-x | StoneIsland/www/css/blogs.css | 36 | ||||
| -rwxr-xr-x | StoneIsland/www/css/index.css | 13 | ||||
| -rwxr-xr-x | StoneIsland/www/css/nav.css | 80 | ||||
| -rw-r--r-- | StoneIsland/www/css/vendor/imageviewer.css | 4 | ||||
| -rwxr-xr-x | StoneIsland/www/index.html | 24 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/auth/SignupView.js | 24 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/blogs/StoryView.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/etc/accessibility.js | 4 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/nav/CurtainView.js | 2 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/nav/NavView.js | 8 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/view/Serializable.js | 9 | ||||
| -rw-r--r-- | StoneIsland/www/js/vendor/imageviewer.js | 11 |
14 files changed, 176 insertions, 51 deletions
diff --git a/StoneIsland/config.xml b/StoneIsland/config.xml index 44a36a16..62109f06 100755 --- a/StoneIsland/config.xml +++ b/StoneIsland/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-versionCode="6124" id="us.okfoc.stoneisland" version="1.2.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-versionCode="6125" id="us.okfoc.stoneisland" version="1.2.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Stone Island</name> <description> Stone Island diff --git a/StoneIsland/www/css/account.css b/StoneIsland/www/css/account.css index 12adb2d9..998b6eac 100755 --- a/StoneIsland/www/css/account.css +++ b/StoneIsland/www/css/account.css @@ -557,16 +557,20 @@ input.switch:checked + label:after { } .container-row .half-input input { -margin-top:0px + margin-top:0px; } .newuser { display:inline-block; padding:18px; text-decoration:underline + border: 1px solid black; + margin: 0 8px 0 0; } .forgotpassword { padding:18px; text-decoration:underline -}
\ No newline at end of file + border: 1px solid black; + margin: 0 0 0 8px; +} diff --git a/StoneIsland/www/css/blogs.css b/StoneIsland/www/css/blogs.css index c4b74c19..ee54a31f 100755 --- a/StoneIsland/www/css/blogs.css +++ b/StoneIsland/www/css/blogs.css @@ -6,20 +6,23 @@ margin: 15px 0 0; text-align: center; text-transform:uppercase; - display:flex; + display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; } #story .links li { + display: block; + list-style-type: none; + font-size: 1rem; +} +#story .links li div { display: flex; justify-content: center; align-items: center; height: 48px; padding: 0 15px; - list-style-type: none; - font-size: 1rem; } .accessible #story .links { flex-wrap: wrap; @@ -166,6 +169,10 @@ position:absolute; display:block; } +.accessible .gallery-left, +.accessible .gallery-right { + width: 48px; +} @-webkit-keyframes gallery-fade { 0%{opacity:0} @@ -259,14 +266,25 @@ ul.links { width: 100%; pointer-events: none; } -#archive .menu .items, -#archive .row .image, -#archive .row .text { +#archive .menu .items { position: absolute; top: 50%; left: 50%; transform-origin: 50% 50%; transform: translateZ(0) translateX(-50%) translateY(-50%); } +#archive .row .image { + position: absolute; + top: 10%; left: 50%; + transform-origin: 50% 50%; + transform: translateZ(0) translateX(-50%) translateY(0%); +} +#archive .row .text { + display: flex; + justify-content: center; + align-items: center; + min-height: 80vh; + padding: 16px 0; +} #archive .menu { position: fixed; display: none; @@ -278,7 +296,8 @@ ul.links { .accessible #archive .row .image, .accessible #archive .row .text { position: relative; - top: auto; left: auto; + top: auto; + left: auto; transform: translateZ(0); } @@ -338,6 +357,7 @@ ul.links { } #archive .row .image { width: 100%; height: 100%; + max-height: 80vh; background-repeat: no-repeat; background-size: contain; background-position: center center; @@ -348,7 +368,7 @@ ul.links { background-position: center center; background-image: url('../img/spinner.gif') !important; } -#archive .row .text { +#archive .row .text > div { width: 80%; } .accessible #archive .row .image { diff --git a/StoneIsland/www/css/index.css b/StoneIsland/www/css/index.css index 83b3353a..2130c675 100755 --- a/StoneIsland/www/css/index.css +++ b/StoneIsland/www/css/index.css @@ -102,6 +102,19 @@ html.vscroll { .error_hilite ~ span.err { display: flex; } +.err_heading { + display: none; +} +.err_heading.error_visible { + display: flex; + text-align: center; + justify-content: center; + align-items: center; + font-size: 0.875rem; + height: 64px; + padding: 12px; + color: red !important; +} span.err { display: none; text-align: center; diff --git a/StoneIsland/www/css/nav.css b/StoneIsland/www/css/nav.css index f555ce99..705c0824 100755 --- a/StoneIsland/www/css/nav.css +++ b/StoneIsland/www/css/nav.css @@ -2,7 +2,7 @@ /* NAV BAR */ #nav { - position: absolute; + position: fixed; top: 0; left: 0; width: 249px; -webkit-transform: translateZ(0) translateX(-249px); @@ -10,7 +10,7 @@ background: #fff; } #content { - position: absolute; + position: fixed; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; @@ -23,6 +23,10 @@ .nav #content { -webkit-transform: translateZ(0) translateX(249px); } +.accessible #nav, +.accessible #content { + position: absolute; +} #nav .logo { background-image: url(../img/small-logo.png); background-repeat: no-repeat; @@ -85,19 +89,62 @@ #nav .social { position: absolute; - bottom: 0; + top: calc(100vh - 48px); left: 0; border-top: 1px solid #ddd; + display: flex; + flex-direction: row; } #nav .social span { display: block; - float: left; width: 61px; border-left: 1px solid #ddd; color: #666; font-size: 1.125rem; - padding: 5px 0; + height: 48px; text-align: center; + justify-content: center; + align-items: center; + display: flex; +} + +#nav .close { + position: absolute; + top: 0; + right: 0; + width: 48px; + height: 48px; + cursor: pointer; + text-align: center; + overflow: hidden; + -webkit-transition: all ease 200ms; + -moz-transition: all ease 200ms; + -o-transition: all ease 200ms; + transition: all ease 200ms; +} +#nav .close:after, +#nav .close:before { + content: ""; + height: 1px; + width: 24px; + background: #888; + position: absolute; + left: 25%; + top: 50%; +} +#nav .close:before { + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} +#nav .close:after { + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); } #nav-container { @@ -198,7 +245,8 @@ padding-bottom:0px; /* HEADER AND FOOTER ON MOST PAGES */ #header { - display: block; + display: flex; + justify-content: space-between; position: absolute; top: 0; left: 0; width: 100%; height: 48px; @@ -216,9 +264,15 @@ padding-bottom:0px; top:0px; } #header .burger { - display: inline-block; + display: flex; font-size: 24px; - padding: 12px 13px 7px; + width: 48px; + height: 48px; + padding-top: 4px; + box-sizing: border-box; + align-items: center; + flex-direction: row; + justify-content: center; } #header .cart_rapper { @@ -268,7 +322,7 @@ padding-bottom:0px; #footer { display: block; - position: absolute; + position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; border-top: 1px solid #ddd; @@ -296,13 +350,16 @@ padding-bottom:0px; #footer .ok.disabled { color: #666; } +.accessible #footer { + position: absolute; +} /* CURTAIN FOR LOGIN AND SELECTOR VIEWS */ #curtain { pointer-events: none; - position: absolute; + position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.8); @@ -312,6 +369,9 @@ padding-bottom:0px; -webkit-transform: translateZ(0) translateX(0); transform: translateZ(0) translateX(0); } +.accessible #curtain { + position: absolute; +} #curtain.visible { pointer-events: auto; opacity: 1; diff --git a/StoneIsland/www/css/vendor/imageviewer.css b/StoneIsland/www/css/vendor/imageviewer.css index af346f08..739c37a1 100644 --- a/StoneIsland/www/css/vendor/imageviewer.css +++ b/StoneIsland/www/css/vendor/imageviewer.css @@ -22,8 +22,8 @@ } .iv-close { - width: 32px; - height: 32px; + width: 48px; + height: 48px; position: fixed; right: 20px; top: 20px; diff --git a/StoneIsland/www/index.html b/StoneIsland/www/index.html index a422832c..568161e5 100755 --- a/StoneIsland/www/index.html +++ b/StoneIsland/www/index.html @@ -16,6 +16,7 @@ <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"> + <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="css/fonts/fonts.css"> <link rel="stylesheet" type="text/css" href="css/fonts/ionicons.css"> <link rel="stylesheet" type="text/css" href="css/vendor/flickity.css"> @@ -37,6 +38,7 @@ <span role="menu" class="menu"> <div class="logo" aria-label="Stone Island"></div> + <div class="close" role="button" aria-label="Close menu"></div> <div role="menu" aria-label="Main Menu" class="main_menu"> <span role="menuitem" class="store">STORE</span> <span role="menuitem" class="hub">HUB</span> @@ -169,12 +171,14 @@ <script type="text/html" class="template"> <div class="image" aria-label="{{label}}" style="background-image:url({{image}})"></div> <div class="text"> - <h2> - <b>{{code}}</b><br> - {{label}} - </h2> - <div class="body"> - {{caption}} + <div> + <h2> + <b>{{code}}</b><br> + {{label}} + </h2> + <div class="body"> + {{caption}} + </div> </div> </div> @@ -288,7 +292,7 @@ <div class="loader"></div> <div class="content"> <script type="text/html" class="template"> - <div role="link" class="item" data-code="{{code8}}"> + <div role="link" class="item" data-code="{{code8}}" aria-label="{{title}}"> <img src="{{image}}" alt="{{title}}"> </div> </script> @@ -377,6 +381,7 @@ <div class="form"> <div class="container"> <div class="container-row"> + <span class='err_heading'>There was a problem submitting the form. Please correct the form below and try again.</span> <label for="login_email_address">Email Address</label> <input type="email" id="login_email_address" name="Email" aria-placeholder="EMAIL ADDRESS" required tabindex="1"> <span class='err'></span> @@ -419,6 +424,7 @@ <div class="form"> <div class="container"> <div class="container-row"> + <span class='err_heading'>There was a problem submitting the form. Please correct the form below and try again.</span> <label for="signup_name">First Name</label> <input type="text" id="signup_name" name="Name" aria-placeholder="FIRST NAME" required tabindex="1"> <span class='err'></span> @@ -502,6 +508,7 @@ <div class="form"> <div class="container"> <div class="container-row"> + <span class='err_heading'>There was a problem submitting the form. Please correct the form below and try again.</span> <label for="profile_name">First Name</label> <input type="text" id="profile_name" name="Name" aria-placeholder="FIRST NAME" required tabindex="1"> <span class='err'></span> @@ -575,6 +582,7 @@ <div class="form"> <div class="container"> <div class="container-row"> + <span class='err_heading'>There was a problem submitting the form. Please correct the form below and try again.</span> <div class="address"></div> </div> <div class="container-fill"> @@ -599,6 +607,7 @@ <div class="form"> <div class="container"> <div class="container-row"> + <span class='err_heading'>There was a problem submitting the form. Please correct the form below and try again.</span> <div class="cc"></div> <div class="address"></div> </div> @@ -875,6 +884,7 @@ <div class="billing-container container"> <div class="container-row"> + <span class='err_heading'>There was a problem submitting the form. Please correct the form below and try again.</span> <div class="checkbox-container"> <div class="checkbox-row"> diff --git a/StoneIsland/www/js/lib/auth/SignupView.js b/StoneIsland/www/js/lib/auth/SignupView.js index 66d8f239..b16ff887 100755 --- a/StoneIsland/www/js/lib/auth/SignupView.js +++ b/StoneIsland/www/js/lib/auth/SignupView.js @@ -114,19 +114,19 @@ var SignupView = FormView.extend({ }, error: function(data){ - try { - data = JSON.parse(data.responseText) - app.signup.show_errors([[ 'Name', data['Error']['Description'] ]]) - } - catch (e) { - switch (data.status) { - case 409: - app.signup.show_errors([[ 'Email', "Email is already in use." ]]) - break - default: + switch (data.status) { + case 409: + app.signup.show_errors([[ 'Email', "Email is already in use." ]]) + break + default: + try { + data = JSON.parse(data.responseText) + app.signup.show_errors([[ 'Name', data['Error']['Description'] ]]) + } + catch (e) { app.signup.show_errors([[ 'Name', "There was an unknown error." ]]) - break - } + } + break } }, diff --git a/StoneIsland/www/js/lib/blogs/StoryView.js b/StoneIsland/www/js/lib/blogs/StoryView.js index 0b3b17d7..71f1cc0c 100755 --- a/StoneIsland/www/js/lib/blogs/StoryView.js +++ b/StoneIsland/www/js/lib/blogs/StoryView.js @@ -40,7 +40,7 @@ var StoryView = ScrollableView.extend({ .replace(/{{body}}/, row.body.replace(/\n/g, "<br>")) var li = document.createElement("li") li.dataset.id = row.id - li.innerHTML = row.title + li.innerHTML = "<div>" + row.title + "</div>" li.setAttribute('role', "link") this.sections[row.id] = row this.$links.append(li) diff --git a/StoneIsland/www/js/lib/etc/accessibility.js b/StoneIsland/www/js/lib/etc/accessibility.js index 31ddaf23..c66143cc 100644 --- a/StoneIsland/www/js/lib/etc/accessibility.js +++ b/StoneIsland/www/js/lib/etc/accessibility.js @@ -30,8 +30,8 @@ var accessibility = (function() { MobileAccessibility.getTextZoom(function getTextZoomCallback(textZoom) { console.log('WebView text should be scaled to the preferred value ' + textZoom + '%') if (textZoom > 100) { - app.accessible = true - $("html").addClass('accessible') + // app.accessible = true + // $("html").addClass('accessible') } }); MobileAccessibility.isVoiceOverRunning(function(state){ diff --git a/StoneIsland/www/js/lib/nav/CurtainView.js b/StoneIsland/www/js/lib/nav/CurtainView.js index ddb6bc19..d444fd60 100755 --- a/StoneIsland/www/js/lib/nav/CurtainView.js +++ b/StoneIsland/www/js/lib/nav/CurtainView.js @@ -28,7 +28,7 @@ var CurtainView = View.extend({ }, click: function(){ - if (document.body.classList.contains("nav") && !app.accessible) { + if (document.body.classList.contains("nav")) { app.nav.hide() } if (app.selector.visible) { diff --git a/StoneIsland/www/js/lib/nav/NavView.js b/StoneIsland/www/js/lib/nav/NavView.js index 1655b7f8..a9a1938e 100755 --- a/StoneIsland/www/js/lib/nav/NavView.js +++ b/StoneIsland/www/js/lib/nav/NavView.js @@ -37,6 +37,8 @@ var NavView = View.extend({ "click .insta": "insta", "click .tw": "tw", "click .yt": "yt", + + "click .close": "close", }, initialize: function(){ @@ -161,7 +163,7 @@ var NavView = View.extend({ fb: function(){ - window.open(is_ios ? "facebook://profile/231623463406" : "https://www.facebook.com/StoneIsland", '_system') + window.open("https://www.facebook.com/StoneIsland", '_system') }, insta: function(){ window.open("https://instagram.com/stoneisland_official", '_system') @@ -173,4 +175,8 @@ var NavView = View.extend({ window.open("https://www.youtube.com/user/StoneIslandOfficial", '_system') }, + close: function(){ + this.hide() + }, + }) diff --git a/StoneIsland/www/js/lib/view/Serializable.js b/StoneIsland/www/js/lib/view/Serializable.js index 3181fddd..08802fa9 100755 --- a/StoneIsland/www/js/lib/view/Serializable.js +++ b/StoneIsland/www/js/lib/view/Serializable.js @@ -104,6 +104,7 @@ var SerializableView = View.extend({ console.log("showing errors") console.log(errors) var msgs = [] + this.$('.err_heading').addClass('error_visible') this.$('.error_hilite').removeClass('error_hilite') this.$('.err').html('') errors.forEach(function(e, i){ @@ -114,6 +115,9 @@ var SerializableView = View.extend({ if (el && el.nodeName === 'SELECT') { $el.parent().addClass('error_hilite') $el.parent().next('.err').html(e[1]) + } else if (el && el.type === 'date') { + $el.parent().addClass('error_hilite') + $el.parent().next('.err').html(e[1]) } else { $el.addClass('error_hilite') $el.next('.err').html(e[1]) @@ -123,6 +127,9 @@ var SerializableView = View.extend({ }.bind(this)) // this.$msg.html(msgs.join("<br>")) this.$msg.addClass('alert-notice') + if (app.view.scroller) { + app.view.scroller.scrollTo(0, 0) + } }, hide_errors: function(){ @@ -137,6 +144,8 @@ var SerializableView = View.extend({ save: function(e){ e && e.preventDefault() + this.$('.err_heading').removeClass('error_visible') + var valid = this.validate() if (valid.errors.length) { this.show_errors(valid.errors) diff --git a/StoneIsland/www/js/vendor/imageviewer.js b/StoneIsland/www/js/vendor/imageviewer.js index 847c6070..d80ae7ed 100644 --- a/StoneIsland/www/js/vendor/imageviewer.js +++ b/StoneIsland/www/js/vendor/imageviewer.js @@ -85,7 +85,7 @@ //add a full screen view $(function () { if(!$body.length) $body = $('body'); - $body.append('<div id="iv-container">' + imageViewHtml + '<div class="iv-close"></div><div>'); + $body.append('<div id="iv-container">' + imageViewHtml + '<div class="iv-close" role="button" aria-label="Close this image."></div><div>'); imageViewHtml = null }); @@ -674,10 +674,10 @@ height: handleHeight + '%' }); }, - show: function (image, hiResImg) { + show: function (image, hiResImg, message) { if (this._fullPage) { this.container.show(); - if (image) this.load(image, hiResImg); + if (image) this.load(image, hiResImg, message); } }, hide: function () { @@ -701,9 +701,10 @@ $window.off(eventSuffix); return null; }, - load: function (image, hiResImgSrc) { + load: function (image, hiResImgSrc, message) { var self = this, container = this.container; + message = message || 'Viewing high-resolution image. Pinch to zoom or tap to close.' container.find('.iv-snap-image,.iv-large-image').remove(); var snapImageWrap = this.container.find('.iv-snap-image-wrap'); @@ -711,9 +712,11 @@ var snapImage = new Image snapImage.className = 'iv-snap-image' snapImage.src = image + snapImage.setAttribute('aria-label', message) var largeImage = new Image largeImage.className = 'iv-large-image' + largeImage.setAttribute('aria-label', message) var hiResImg; |
