diff --git a/www/css/index.css b/www/css/index.css old mode 100644 new mode 100755 index e934c16..347d3cc --- a/www/css/index.css +++ b/www/css/index.css @@ -6,10 +6,235 @@ body { -webkit-touch-callout: none; /* prevent callout to copy image, etc when tap to hold */ -webkit-text-size-adjust: none; /* prevent webkit from resizing text to fit */ -webkit-user-select: none; /* prevent copy paste, to allow, change 'none' to 'text' */ - font-size:12px; + /*font-size:12px;*/ height:100%; - margin:0px; + /*margin:0px;*/ padding:0px; width:100%; } +html{ + background-color:#eee; + font-family: 'Quicksand', sans-serif; + font-size:16px; +} +body{ + /*width:100%;*/ + max-width:650px; + background-color:#fff; + margin:0 auto; + box-shadow:0 0 10px #000; + min-height: 100vh; +} + +.app nav{ + height:30px; + background-color:#00A29B; + font-size:22px; + padding-top:25px; + width:100%; + max-width:650px; + position: absolute; +} + +.app nav a{ + margin:10px; + top: -5px; + color:#fff; + text-decoration:none; + position:relative; + + +} + +.app nav a:last-child{ + float:right; + top:-8px; +} + +.app nav img{ + width:35px; +} + +.app section{ + display:none; + padding-top:100px; +} + +.app section:target{ + display:block; + +} + + +.app label{ + display:block; + margin-top: 25px; + clear:both; +} + +.app input{ + width:220px; + clear:both; +} +.app input[type='button'], .app input[type='submit']{ + width:80px; + margin-top: 35px; + float:right; + background-color: #ddd; + +} + +.app form{ + display:block; + margin:60px auto; + width:220px; + + +} + +.app form:last-child{ + padding-bottom:80px; +} + +.app form a{ + display:block; + float:right; + margin-bottom:20px; + +} + +.app form a:not(.nobutton){ + + width:105px; + padding:10px 0; + color:black; + background-color:#d3d3d3; + text-align: center; + text-decoration: none; + clear:both; + margin-top:25px; + + +} + +.app form select{ + width:100%; + font-size:14px; +} + + + +.app textarea{ +width:250px; +height:50px; +position:relative; +margin-left:-45px; + + +} + +.app img.support { + display: block; + margin: 0 auto; + width:250px; + position: relative; + margin-top:90px; + + +} + + + + +.app #choose a{ +width:30%; +display:inline-block; +color:white; +text-decoration:none; +font-size: 22px; +padding:80px 0; +margin-top:15px; +min-width:200px; + + + +} + +.app #choose a[href^="#get"]{ +background-color:#50C995; + +} +.app #choose a[href^="#give"]{ +background-color:#00BBBB; +} + +.app p{ +text-align:center; +margin: 50px 25px 0 25px; + + +} + +.app li img{ +width:40px; +position:relative; +margin-bottom:-10px; +} + +.app #giveSupport1 li img:last-child{ +width:20px; +margin-bottom:-5px; + +} + + + +.app ul{ +list-style-type: none; +margin-top: 100px; +} +.app li{ +margin-bottom: 20px; +} + +.app #getSupport2 textarea, .app #giveSupport2 textarea{ +margin-top: 400px; +width:100%; +margin-left:2px; +} + +.app #giveSupport2 li, .app #getSupport2 li { +margin-left: 30px; + + +} + +.app #giveSupport2 li:first-child, .app #getSupport2 li:first-child { +margin-left: 0; +position:relative; +margin-top: -100px +} + +.app #giveSupport1 { + +text-decoration: none; +} + +.app #getSupport2 li:first-child { +margin-left: 0; +position:relative; +margin-top: -100px +} + +.nobutton { +color:black; +font-size:18px; +} + +.app nav a[href='#back'] img { +width:30px; +} + + + diff --git a/www/img/get_support.svg b/www/img/get_support.svg new file mode 100755 index 0000000..779647a --- /dev/null +++ b/www/img/get_support.svg @@ -0,0 +1,16 @@ + + + + + + + +Get Support + diff --git a/www/img/give_support.svg b/www/img/give_support.svg new file mode 100755 index 0000000..d4fc17b --- /dev/null +++ b/www/img/give_support.svg @@ -0,0 +1,18 @@ + + + + + + + +Give Support + diff --git a/www/img/home.svg b/www/img/home.svg new file mode 100755 index 0000000..7681c98 --- /dev/null +++ b/www/img/home.svg @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/www/img/left-arrow.png b/www/img/left-arrow.png new file mode 100644 index 0000000..058c3d5 Binary files /dev/null and b/www/img/left-arrow.png differ diff --git a/www/img/logo.png b/www/img/logo.png deleted file mode 100644 index c62ab2f..0000000 Binary files a/www/img/logo.png and /dev/null differ diff --git a/www/img/male_icon.svg b/www/img/male_icon.svg new file mode 100644 index 0000000..cb3b0c2 --- /dev/null +++ b/www/img/male_icon.svg @@ -0,0 +1,14 @@ + + + + + + diff --git a/www/img/plus_icon.svg b/www/img/plus_icon.svg new file mode 100755 index 0000000..9665aa7 --- /dev/null +++ b/www/img/plus_icon.svg @@ -0,0 +1,11 @@ + + + + + + + diff --git a/www/img/sapport.gif b/www/img/sapport.gif new file mode 100755 index 0000000..d01c6a3 Binary files /dev/null and b/www/img/sapport.gif differ diff --git a/www/img/sapport.png b/www/img/sapport.png new file mode 100755 index 0000000..a206076 Binary files /dev/null and b/www/img/sapport.png differ diff --git a/www/img/sapport.svg b/www/img/sapport.svg new file mode 100755 index 0000000..fbf7a4d --- /dev/null +++ b/www/img/sapport.svg @@ -0,0 +1,22 @@ + + + + + + + + Sapp rt + + + diff --git a/www/img/web-house- (1).svg b/www/img/web-house- (1).svg new file mode 100755 index 0000000..c5e189e --- /dev/null +++ b/www/img/web-house- (1).svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/img/woman_icon.svg b/www/img/woman_icon.svg new file mode 100755 index 0000000..7d568b5 --- /dev/null +++ b/www/img/woman_icon.svg @@ -0,0 +1,15 @@ + + + + +wqewqeqwewqeqeqwe + + + diff --git a/www/index.html b/www/index.html old mode 100644 new mode 100755 index 6fb9238..686bd6f --- a/www/index.html +++ b/www/index.html @@ -27,7 +27,7 @@ - + + - Hello World + Sapport @@ -47,13 +48,136 @@ + + + + +
+ +
+ + + +
+
+ + + + + + + + + + +
+
+
+ +
+ Signup + + + + + + + +
+ +
+
+

+ Get Support + + Give Support + +

+ +
+ +
+

Welcome, ! we are here for you. Share with us what happened

+
+ +
+

Other? Share your story (150 characters max)

+
+ +

+ + Submit +
+
+ +
+

Hi , + Thank you for willing to give your support. There are a thousand people that you could make smile with just one quote!

+ + + + +
+ +
+ + + +

+ + +
+ +
+ +

+ +
+ + + + + + + + + + + + + + + - \ No newline at end of file + diff --git a/www/js/index.js b/www/js/index.js old mode 100644 new mode 100755 index 5329fa9..591b38e --- a/www/js/index.js +++ b/www/js/index.js @@ -6,18 +6,157 @@ var app = { // when debugging, make sure this prints to the console to ensure you don't have any js errors console.log("javascript works"); }, - + bindEvents: function() { document.addEventListener('deviceready', this.onDeviceReady, false); }, - + //put your old initialize code in here, will be executed when your app is ready //(kind of like document ready!) onDeviceReady: function() { - +//new + // config your skygear app + skygear.config({ + 'endPoint': 'https://sapport.skygeario.com/', // trailing slash is required + 'apiKey': 'c0ecade7127441c382b50fd349c025f3', + }).then(function() { + console.log('skygear container is now ready for making API calls.'); + }, function(error) { + console.log(error); + }); + + + // click listeners + $('.sign-up-button').click(function(e) { + e.preventDefault(); + app.signUpUser(); + + }); + + $('.sign-in-button').click(function(e) { + debugger; + e.preventDefault(); + app.signInUser(); + }); + + + + + //starts here old code + + document.querySelector("#firstname").addEventListener("keyup",function(e){ + + document.querySelector("#getSupport1 p span").textContent = e.target.value; + document.querySelector("#giveSupport1 p span").textContent = e.target.value; + + }); + + //document.addEventListener("DOMContentLoaded", function(){ + window.location.hash="home"; + //}); + + function updategetsuport(text){ + var support = text; + if (!text || text.trim() === ""){ + support = document.querySelector("#getSupport1 select :checked").textContent; + } + document.querySelector("#getSupport2 li span").textContent=support; + } + + function getsupportdropdown(){ + updategetsuport(); + } + + updategetsuport(); + document.querySelector("#getSupport1 select").addEventListener("change", getsupportdropdown); + + document.querySelector("#getSupport1 a[href='#getSupport2']").addEventListener("click", function(){ + var text = document.querySelector("#getSupport1 textarea").value; + updategetsuport(text); + }); + + var giveSupportButtons = document.querySelectorAll("#giveSupport1 a[href='#giveSupport2']"); + for (var i=0; i " + text + ""; + } + + document.querySelector("#giveSupport2 textarea").addEventListener("keyup", function(e){ + if (e.keyCode === 13) addSupport(); + }); + document.querySelector("#giveSupport2 textarea").addEventListener("blur", addSupport); + + function addSupport(){ + var textarea = document.querySelector("#giveSupport2 textarea"), + text = textarea.value, + ul = document.querySelector("#giveSupport2 ul"); + ul.innerHTML += "
  • " + text + "
  • "; + textarea.value = ""; + } + + document.querySelector("#getSupport2 textarea").addEventListener("keyup", function(e){ + if (e.keyCode === 13) Comment(); + }); + document.querySelector("#getSupport2 textarea").addEventListener("blur", Comment); + + function Comment(){ + var textarea = document.querySelector("#getSupport2 textarea"), + text = textarea.value, + ul = document.querySelector("#getSupport2 ul"); + ul.innerHTML += "
  • " + text + "
  • "; + textarea.value = ""; + } + + // $("body").on("swiperight", function(e){ + // window.history.back(); + // }); + + document.querySelector("a[href='#back']").addEventListener("click", function(e){ + e.preventDefault(); + // navigator.app.backHistory(); + window.history.back(); + }); + + + }, //end onDeviceReady + + +// //more new code +signUpUser: function() { + var email = $('#signup #email').val(); + var password = $('#signup #password').val(); + + skygear.signupWithEmail(email, password).then(function(user) { + console.log(user); // user object + //app.changePage('#page2'); + }, function (error) { + console.log(error); + //$('.errors').html(error.error.message); + }); + }, + + signInUser: function() { + var email = $('#login #email').val(); + var password = $('#login #password').val(); + + skygear.loginWithEmail(email, password).then(function (user) { + //app.changePage('#page2'); + //$('.hello .email').html('Hi ' + user.email ); + console.log(user); // user object + }, function (error) { + console.log(error); + //$('.errors').html(error.error.message); + }); + }, + - } - -} \ No newline at end of file + }; diff --git a/www/js/jquery-3.1.1.min.js b/www/js/jquery-3.1.1.min.js old mode 100644 new mode 100755 diff --git a/www/res/.pgbomit b/www/res/.pgbomit old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-land-hdpi-screen.png b/www/res/screen/android/drawable-land-hdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-land-ldpi-screen.png b/www/res/screen/android/drawable-land-ldpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-land-mdpi-screen.png b/www/res/screen/android/drawable-land-mdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-land-xhdpi-screen.png b/www/res/screen/android/drawable-land-xhdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-land-xxhdpi-screen.png b/www/res/screen/android/drawable-land-xxhdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-land-xxxhdpi-screen.png b/www/res/screen/android/drawable-land-xxxhdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-port-hdpi-screen.png b/www/res/screen/android/drawable-port-hdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-port-ldpi-screen.png b/www/res/screen/android/drawable-port-ldpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-port-mdpi-screen.png b/www/res/screen/android/drawable-port-mdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-port-xhdpi-screen.png b/www/res/screen/android/drawable-port-xhdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-port-xxhdpi-screen.png b/www/res/screen/android/drawable-port-xxhdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/android/drawable-port-xxxhdpi-screen.png b/www/res/screen/android/drawable-port-xxxhdpi-screen.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-568h@2x~iphone.png b/www/res/screen/ios/Default-568h@2x~iphone.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-667h.png b/www/res/screen/ios/Default-667h.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-736h.png b/www/res/screen/ios/Default-736h.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-Landscape-736h.png b/www/res/screen/ios/Default-Landscape-736h.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-Landscape@2x~ipad.png b/www/res/screen/ios/Default-Landscape@2x~ipad.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-Landscape~ipad.png b/www/res/screen/ios/Default-Landscape~ipad.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-Portrait@2x~ipad.png b/www/res/screen/ios/Default-Portrait@2x~ipad.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default-Portrait~ipad.png b/www/res/screen/ios/Default-Portrait~ipad.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default@2x~iphone.png b/www/res/screen/ios/Default@2x~iphone.png old mode 100644 new mode 100755 diff --git a/www/res/screen/ios/Default~iphone.png b/www/res/screen/ios/Default~iphone.png old mode 100644 new mode 100755 diff --git a/www/res/screen/windows/SplashScreen.scale-100.png b/www/res/screen/windows/SplashScreen.scale-100.png old mode 100644 new mode 100755 diff --git a/www/res/screen/windows/SplashScreenPhone.scale-240.png b/www/res/screen/windows/SplashScreenPhone.scale-240.png old mode 100644 new mode 100755 diff --git a/www/res/screen/wp8/screen-portrait.jpg b/www/res/screen/wp8/screen-portrait.jpg old mode 100644 new mode 100755 diff --git a/www/spec.html b/www/spec.html old mode 100644 new mode 100755 diff --git a/www/spec/helper.js b/www/spec/helper.js old mode 100644 new mode 100755 diff --git a/www/spec/index.js b/www/spec/index.js old mode 100644 new mode 100755 diff --git a/www/spec/lib/jasmine-1.2.0/MIT.LICENSE b/www/spec/lib/jasmine-1.2.0/MIT.LICENSE old mode 100644 new mode 100755 diff --git a/www/spec/lib/jasmine-1.2.0/jasmine-html.js b/www/spec/lib/jasmine-1.2.0/jasmine-html.js old mode 100644 new mode 100755 diff --git a/www/spec/lib/jasmine-1.2.0/jasmine.css b/www/spec/lib/jasmine-1.2.0/jasmine.css old mode 100644 new mode 100755 diff --git a/www/spec/lib/jasmine-1.2.0/jasmine.js b/www/spec/lib/jasmine-1.2.0/jasmine.js old mode 100644 new mode 100755