From 609c59bb96f1ef75f6a3d3af1b159adceaefe3df Mon Sep 17 00:00:00 2001 From: G14 Date: Fri, 24 Jun 2016 02:23:03 +0500 Subject: [PATCH 1/2] add mailchimp integration --- src/css/main.css | 1 + src/index.html | 41 +++- src/js/common.js | 14 +- src/js/libs.min.js | 0 src/libs/mailchimp/classic-10_7.css | 46 ++++ src/libs/mailchimp/mc-validate.js | 368 ++++++++++++++++++++++++++++ src/sass/index.scss | 1 + 7 files changed, 460 insertions(+), 11 deletions(-) mode change 100644 => 100755 src/js/libs.min.js create mode 100644 src/libs/mailchimp/classic-10_7.css create mode 100644 src/libs/mailchimp/mc-validate.js diff --git a/src/css/main.css b/src/css/main.css index 1cee733..e580506 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -214,6 +214,7 @@ input[type=email] { display: block; width: 34px; height: 34px; + border: none; -webkit-border-radius: 50%; border-radius: 50%; background-color: rgba(182, 116, 241, 0.2); diff --git a/src/index.html b/src/index.html index abefc6e..49aab18 100755 --- a/src/index.html +++ b/src/index.html @@ -68,8 +68,22 @@
@@ -88,6 +102,7 @@ + + + @@ -590,6 +619,10 @@ + + + + diff --git a/src/js/common.js b/src/js/common.js index 5279605..56ef0ac 100755 --- a/src/js/common.js +++ b/src/js/common.js @@ -105,13 +105,13 @@ $(function() { crossFade: true } }); -var swiper2 = new Swiper('.swiper2', { - loop: true, - autoplay: 2000, - effect: 'slide', - nextButton: '.swiper-button-next', - prevButton: '.swiper-button-prev', -}); + var swiper2 = new Swiper('.swiper2', { + loop: true, + autoplay: 2000, + effect: 'slide', + nextButton: '.swiper-button-next', + prevButton: '.swiper-button-prev', + }); }); diff --git a/src/js/libs.min.js b/src/js/libs.min.js old mode 100644 new mode 100755 diff --git a/src/libs/mailchimp/classic-10_7.css b/src/libs/mailchimp/classic-10_7.css new file mode 100644 index 0000000..1bd787d --- /dev/null +++ b/src/libs/mailchimp/classic-10_7.css @@ -0,0 +1,46 @@ +/* MailChimp Form Embed Code - Classic - 12/17/2015 v10.7 */ +#mc_embed_signup form {display:block; position:relative; text-align:left; padding:10px 0 10px 3%} +#mc_embed_signup h2 {font-weight:bold; padding:0; margin:15px 0; font-size:1.4em;} +#mc_embed_signup input {border: 1px solid #ABB0B2; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;} +#mc_embed_signup input[type=checkbox]{-webkit-appearance:checkbox;} +#mc_embed_signup input[type=radio]{-webkit-appearance:radio;} +#mc_embed_signup input:focus {border-color:#333;} +#mc_embed_signup .button {clear:both; background-color: #aaa; border: 0 none; border-radius:4px; transition: all 0.23s ease-in-out 0s; color: #FFFFFF; cursor: pointer; display: inline-block; font-size:15px; font-weight: normal; height: 32px; line-height: 32px; margin: 0 5px 10px 0; padding: 0 22px; text-align: center; text-decoration: none; vertical-align: top; white-space: nowrap; width: auto;} +#mc_embed_signup .button:hover {background-color:#777;} +#mc_embed_signup .small-meta {font-size: 11px;} +#mc_embed_signup .nowrap {white-space:nowrap;} + +#mc_embed_signup .mc-field-group {clear:left; position:relative; width:96%; padding-bottom:3%; min-height:50px;} +#mc_embed_signup .size1of2 {clear:none; float:left; display:inline-block; width:46%; margin-right:4%;} +* html #mc_embed_signup .size1of2 {margin-right:2%; /* Fix for IE6 double margins. */} +#mc_embed_signup .mc-field-group label {display:block; margin-bottom:3px;} +#mc_embed_signup .mc-field-group input {display:block; width:100%; padding:8px 0; text-indent:2%;} +#mc_embed_signup .mc-field-group select {display:inline-block; width:99%; padding:5px 0; margin-bottom:2px;} + +#mc_embed_signup .datefield, #mc_embed_signup .phonefield-us{padding:5px 0;} +#mc_embed_signup .datefield input, #mc_embed_signup .phonefield-us input{display:inline; width:60px; margin:0 2px; letter-spacing:1px; text-align:center; padding:5px 0 2px 0;} +#mc_embed_signup .phonefield-us .phonearea input, #mc_embed_signup .phonefield-us .phonedetail1 input{width:40px;} +#mc_embed_signup .datefield .monthfield input, #mc_embed_signup .datefield .dayfield input{width:30px;} +#mc_embed_signup .datefield label, #mc_embed_signup .phonefield-us label{display:none;} + +#mc_embed_signup .indicates-required {text-align:right; font-size:11px; margin-right:4%;} +#mc_embed_signup .asterisk {color:#e85c41; font-size:150%; font-weight:normal; position:relative; top:5px;} +#mc_embed_signup .clear {clear:both;} + +#mc_embed_signup .mc-field-group.input-group ul {margin:0; padding:5px 0; list-style:none;} +#mc_embed_signup .mc-field-group.input-group ul li {display:block; padding:3px 0; margin:0;} +#mc_embed_signup .mc-field-group.input-group label {display:inline;} +#mc_embed_signup .mc-field-group.input-group input {display:inline; width:auto; border:none;} + +#mc_embed_signup div#mce-responses {float:left; top:-1.4em; padding:0em .5em 0em .5em; overflow:hidden; width:90%; margin: 0 5%; clear: both;} +#mc_embed_signup div.response {margin:1em 0; padding:1em .5em .5em 0; font-weight:bold; float:left; top:-1.5em; z-index:1; width:80%;} +#mc_embed_signup #mce-error-response {display:none;} +#mc_embed_signup #mce-success-response {color:#529214; display:none;} +#mc_embed_signup label.error {display:block; float:none; width:auto; margin-left:1.05em; text-align:left; padding:.5em 0;} + +#mc-embedded-subscribe {clear:both; width:auto; display:block; margin:1em 0 1em 5%;} +#mc_embed_signup #num-subscribers {font-size:1.1em;} +#mc_embed_signup #num-subscribers span {padding:.5em; border:1px solid #ccc; margin-right:.5em; font-weight:bold;} + +#mc_embed_signup #mc-embedded-subscribe-form div.mce_inline_error {display:inline-block; margin:2px 0 1em 0; padding:5px 10px; background-color:rgba(255,255,255,0.85); -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; font-size:14px; font-weight:normal; z-index:1; color:#e85c41;} +#mc_embed_signup #mc-embedded-subscribe-form input.mce_inline_error {border:2px solid #e85c41;} \ No newline at end of file diff --git a/src/libs/mailchimp/mc-validate.js b/src/libs/mailchimp/mc-validate.js new file mode 100644 index 0000000..4d0129d --- /dev/null +++ b/src/libs/mailchimp/mc-validate.js @@ -0,0 +1,368 @@ +/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("