diff --git a/20150514-promo-vivo/.tmtworkflowrc b/20150514-promo-vivo/.tmtworkflowrc new file mode 100644 index 0000000..f39e02c --- /dev/null +++ b/20150514-promo-vivo/.tmtworkflowrc @@ -0,0 +1,15 @@ +{ + "livereload": { + "available": true, + "port": 8080, + "startPath": "html/index.html" + }, + + "plugins": { + "build_dev_after": ["reference"], + "build_dist_after": ["replace"], + "zip_after": [] + }, + + "support_webp": false +} diff --git a/project/gulpfile.js b/20150514-promo-vivo/gulpfile.js similarity index 97% rename from project/gulpfile.js rename to 20150514-promo-vivo/gulpfile.js index e554a47..f8d0edb 100644 --- a/project/gulpfile.js +++ b/20150514-promo-vivo/gulpfile.js @@ -2,7 +2,6 @@ var gulp = require('gulp'); var fs = require('fs'); var path = require('path'); -//注册 var deep = 3; run_tasks('tasks'); diff --git a/20150514-promo-vivo/src/css/lib-animation.less b/20150514-promo-vivo/src/css/lib-animation.less new file mode 100644 index 0000000..69f4048 --- /dev/null +++ b/20150514-promo-vivo/src/css/lib-animation.less @@ -0,0 +1,324 @@ +@-webkit-keyframes anim-bg { + 0% { + opacity: 0; + } + 33.3% { + opacity: 1; + } + 66.6% { + opacity: 1; + } + 100% { + opacity: 0.1; + } +} + +@keyframes anim-bg { + 0% { + opacity: 0; + } + 33.3% { + opacity: 1; + } + 66.6% { + opacity: 1; + } + 100% { + opacity: 0.1; + } +} + +@-webkit-keyframes anim-txt { + 0% { + opacity: 0; + -webkit-transform: translateY(20px) + } + 100% { + opacity: 1; + -webkit-transform: translateY(0) + } +} + + +@keyframes anim-txt { + 0% { + opacity: 0; + transform: translateY(20px) + } + 33.3% { + opacity: 1; + transform: translateY(0) + } + 66.6% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@-webkit-keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@-webkit-keyframes fade-out { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px) + } + 100% { + opacity: 1; + -webkit-transform: translateY(0) + } +} + +@keyframes fadeInUp { + 0% { + opacity: 0; + transform: translateY(20px) + } + 100% { + opacity: 1; + transform: translateY(0) + } +} + +// 从左边移入 +@-webkit-keyframes leftToRightMove { + 0% { + -webkit-transform: translate3d(-100px, 55px, 0); + } + 20% { + opacity: 1; + } + 100% { + opacity: 1; + -webkit-transform: none; + } +} + +@keyframes leftToRightMove { + 0% { + transform: translate3d(-100px, 55px, 0); + } + 20% { + opacity: 1; + } + 100% { + opacity: 1; + transform: none; + } +} + +// 从右边移入 +@-webkit-keyframes rightToLeftMove { + 0% { + -webkit-transform: translate3d(100px, -55px, 0); + } + 20% { + opacity: 1; + } + 100% { + opacity: 1; + -webkit-transform: none; + } +} + +@keyframes rightToLeftMove { + 0% { + transform: translate3d(100px, -55px, 0); + } + 20% { + opacity: 1; + } + 100% { + opacity: 1; + transform: none; + } +} + +@-webkit-keyframes downToTopMove { + 0% { + -webkit-transform: translate3d(0px, 55px, 0); + } + 20% { + opacity: 1; + } + 100% { + opacity: 1; + -webkit-transform: none; + } +} + +@keyframes downToTopMove { + 0% { + transform: translate3d(0px, 55px, 0); + } + 20% { + opacity: 1; + } + 100% { + opacity: 1; + transform: none; + } +} + +@-webkit-keyframes topToDownMove_1 { + 0% { + opacity: 1; + -webkit-transform: translate3d(0px, 0px, 0); + } + 80% { + opacity: 0.5; + -webkit-transform: translate3d(0px, 25px, 0); + } + 100% { + opacity: 0; + -webkit-transform: translate3d(0px, 25px, 0); + } +} + +@-webkit-keyframes topToDownMove_2 { + 0% { + opacity: 1; + -webkit-transform: translate3d(0px, 0px, 0); + } + 80% { + opacity: 0.5; + -webkit-transform: translate3d(0px, 60px, 0); + } + 100% { + opacity: 0; + -webkit-transform: translate3d(0px, 60px, 0); + } +} + +@-webkit-keyframes topToDownMove_3 { + 0% { + opacity: 1; + -webkit-transform: translate3d(0px, 0px, 0); + } + 80% { + opacity: 0.5; + -webkit-transform: translate3d(0px, 80px, 0); + } + 100% { + opacity: 0; + -webkit-transform: translate3d(0px, 80px, 0); + } +} + +@-webkit-keyframes circleMove3 { + 0% { + -webkit-transform: translate3d(0, 0, 0); + } + 100% { + -webkit-transform: translate3d(10px, -5px, 0); + opacity: 1; + } +} + +@-webkit-keyframes circleMove4 { + 0% { + -webkit-transform: translate3d(0, 0, 0); + } + 100% { + -webkit-transform: translate3d(30px, -15px, 0); + opacity: 1; + } +} + +@-webkit-keyframes circleMove5 { + 0% { + -webkit-transform: translate3d(0, 0, 0); + } + 100% { + -webkit-transform: translate3d(50px, -30px, 0); + opacity: 1; + } +} + +@-webkit-keyframes circleMove6 { + 0% { + -webkit-transform: translate3d(0, 0, 0); + } + 100% { + -webkit-transform: translate3d(70px, -45px, 0); + opacity: 1; + } +} + +@-webkit-keyframes circleMove7 { + 0% { + -webkit-transform: translate3d(0, 0, 0); + } + 100% { + -webkit-transform: translate3d(90px, -55px, 0); + opacity: 1; + } +} + +@-webkit-keyframes circleMove8 { + 0% { + -webkit-transform: translate3d(0, 0, 0); + } + 100% { + -webkit-transform: translate3d(110px, -70px, 0); + opacity: 1; + } +} + +// 左滑提示 +@-webkit-keyframes swipeMove { + 0% { + opacity: 0; + -webkit-transform: translate3d(0, 10px, 0); + } + 70% { + opacity: 1; + -webkit-transform: translate3d(0, 0, 0); + } + 100% { + opacity: 0; + -webkit-transform: translate3d(0, -10px, 0); + } +} + +@keyframes swipeMove { + 0% { + opacity: 0; + transform: translate3d(0, 10px, 0); + } + 70% { + opacity: 1; + transform: translate3d(0, 0, 0); + } + 100% { + opacity: 0; + transform: translate3d(0, -10px, 0); + } +} + diff --git a/20150514-promo-vivo/src/css/lib-mixins-mobile.less b/20150514-promo-vivo/src/css/lib-mixins-mobile.less new file mode 100644 index 0000000..44ef1c7 --- /dev/null +++ b/20150514-promo-vivo/src/css/lib-mixins-mobile.less @@ -0,0 +1,293 @@ +//---------------------------- +// +// mixins.less v0.1.5 +// http://mixinsless.com/ +// Reuse snippets & Cross-browser private properties snippets. +//---------------------------- + +// Border radius with the same argument +// ------------------------- +.rounded(@radius: 3px) { + -webkit-border-radius:@radius; + border-radius:@radius; + -webkit-background-clip:padding-box; + background-clip:padding-box; +} + +// Border radius with different arguments +// ------------------------- +.border-radius(@topleft: 0, @topright: 0, @bottomright: 0, @bottomleft: 0) { + -webkit-border-top-left-radius:@topleft; + -webkit-border-top-right-radius:@topright; + -webkit-border-bottom-right-radius:@bottomright; + -webkit-border-bottom-left-radius:@bottomleft; + border-top-left-radius:@topleft; + border-top-right-radius:@topright; + border-bottom-right-radius:@bottomright; + border-bottom-left-radius:@bottomleft; + -webkit-background-clip:padding-box; + background-clip:padding-box; +} + +// Background size +// ------------------------- +.background-size(@size) { + -webkit-background-size:@size; + background-size:@size; +} + +// Opacity +// ------------------------- +.opacity(@opacity) { + opacity:@opacity; +} + +// Appearance +// ------------------------- +.appearance(@appearance:none) { + -webkit-appearance:@appearance; + appearance:@appearance; +} + +// Gradient +// ------------------------- +.gradient(@start: #000000, @stop: #FFFFFF) { + background:(@start + @stop)/2; + background:-webkit-gradient(linear, left top, left bottom, color-stop(0, @start), color-stop(1, @stop)); +} + +// Box shadow +// ------------------------- +.drop-shadow(@horizontal: 0, @vertical: 1px, @blur: 2px, @alpha: 0.1) { + -webkit-box-shadow:@horizontal @vertical @blur rgba(0, 0, 0, @alpha); + box-shadow:@horizontal @vertical @blur rgba(0, 0, 0, @alpha); +} + +// Box shadow inset +// ------------------------- +.inner-shadow(@horizontal: 0, @vertical: 1px, @blur: 2px, @alpha: 0.4) { + -webkit-box-shadow:inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha); + box-shadow:inset @horizontal @vertical @blur rgba(0, 0, 0, @alpha); +} + +// Box inner border +// ------------------------- +.inner-border(@width: 1px, @color: #000) { + -webkit-box-shadow:inset 0 0 0 @width @color; + box-shadow:inset 0 0 0 @width @color; +} + +// Box shadow default +// ------------------------- +.box-shadow(@arguments) { + -webkit-box-shadow:@arguments; + box-shadow:@arguments; +} + +// Animation +// ------------------------- +.animation(@animation) { + -webkit-animation:@animation; + animation:@animation; +} + +.transition(@transition) { + -webkit-transition:@transition; + transition:@transition; +} +.transition-delay(@transition-delay) { + -webkit-transition-delay:@transition-delay; + transition-delay:@transition-delay; +} +.transition-duration(@transition-duration) { + -webkit-transition-duration:@transition-duration; + transition-duration:@transition-duration; +} + +// Transform +// ------------------------- +.transform(@arguments) { + -webkit-transform:@arguments; + transform:@arguments; +} + +// Transform rotation +// ------------------------- +.rotation(@deg:5deg) { + -webkit-transform:rotate(@deg); + transform:rotate(@deg); +} + +// Transform scale +// ------------------------- +.scale(@ratio:1.5) { + -webkit-transform:scale(@ratio); + transform:scale(@ratio); +} + +// Translate +// ------------------------- +.translate(@x:0, @y:0) { + -webkit-transform:translate(@x, @y); + transform:translate(@x, @y); +} + +// Translate3d +// ------------------------- +.translate3d(@x, @y, @z) { + -webkit-transform:translate3d(@x, @y, @z); + transform:translate3d(@x, @y, @z); +} + +// Background clipping +// ------------------------- +.background-clip(@clip) { + -webkit-background-clip:@clip; + background-clip:@clip; +} + +// CSS columns +// ------------------------- +.columns(@colwidth: 250px, @colcount: 0, @colgap: 50px, @columnRuleColor: #EEEEEE, @columnRuleStyle: solid, @columnRuleWidth: 1px) { + -webkit-column-width:@colwidth; + -webkit-column-count:@colcount; + -webkit-column-gap:@colgap; + -webkit-column-rule-color:@columnRuleColor; + -webkit-column-rule-style:@columnRuleStyle; + -webkit-column-rule-width:@columnRuleWidth; + column-width:@colwidth; + column-count:@colcount; + column-gap:@colgap; + column-rule-color:@columnRuleColor; + column-rule-style:@columnRuleStyle; + column-rule-width:@columnRuleWidth; +} + +// Import font +// ------------------------- +.font-face(@fontFamily, @fileName, @style, @weight) { + @font-face{ + font-family:@fontFamily; + font-style:@style; + font-weight:@weight; + src:url('@{fileName}.eot'); + src:local('@fontFamily'), url('@{fileName}.eot?#iefix') format('embedded-opentype'), url('@{fileName}.woff') format('woff'), url('@{fileName}.ttf') format('truetype'), url('@{fileName}.svg#@{fontFamily}') format('svg'), url("@{fileName}.otf") format('opentype'); + } +} + +// Clearfix +// ------------------------- +.clearfix() { + zoom:1; + &:before{ + content:''; + display:block; + } + &:after{ + content:''; + display:table; + clear:both; + } +} + +// CSS image replacement +// ------------------------- +// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 +.hide-text() { + font:0/0 a; + color:transparent; + text-shadow:none; + background-color:transparent; + border:0; +} + +// Force line breaks +// ------------------------- +.word-break() { + word-break:break-all; + word-wrap:break-word; + white-space: normal; +} + +// No wrap +// ------------------------- +.no-wrap() { + word-break: normal; + word-wrap: normal; + white-space: nowrap; +} + +// Text overflow with(...) +// ------------------------- +// Requires inline-block or block for proper styling +.text-overflow() { + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap; + max-width:100%; +} + +.line-overflow(@line) { + overflow:hidden; + text-overflow:ellipsis; + display:-webkit-box; + -webkit-line-clamp:@line; /* number of lines to show */ + -webkit-box-orient:vertical; +} + +// Creates a wrapper for a series of columns +// ------------------------- +.lay-row() { + // Negative margin the row out to align the content of columns + margin-left: (@grid-gutter-width / -2); + margin-right: (@grid-gutter-width / -2); + // Then clear the floated columns + .clearfix(); +} + +// Generate the columns +// ------------------------- +.lay-column(@columns) { + @media (min-width: @grid-float-breakpoint) { + float: left; + // Calculate width based on number of columns available + width: percentage(@columns / @grid-columns); + } + // Prevent columns from collapsing when empty + min-height: 1px; + // Set inner padding as gutters instead of margin + padding-left: (@grid-gutter-width / 2); + padding-right: (@grid-gutter-width / 2); +} + +// Generate the column offsets +// ------------------------- +.lay-column-offset(@columns) { + @media (min-width: @grid-float-breakpoint) { + margin-left: percentage((@columns / @grid-columns)); + } +} + +// Alpha background +// ------------------------- +.alpha-background(@rgb:#000,@alpha:.5){ + @rgba-color:fade(@rgb,@alpha*100); + @argb-color:argb(@rgba-color); + background-color:@rgba-color; + zoom:1; +} + +// Controls the selection model of an element. +// ------------------------- +.user-select(@arguments:none){ + -webkit-user-select: @arguments; + user-select: @arguments; +} + +// Flexbox display +// ------------------------- +// flex or inline-flex +.flex-display(@display: flex) { + display: ~"-webkit-@{display}"; + display: @display; +} \ No newline at end of file diff --git a/20150514-promo-vivo/src/css/lib-reset-mobile.less b/20150514-promo-vivo/src/css/lib-reset-mobile.less new file mode 100644 index 0000000..1ec2f46 --- /dev/null +++ b/20150514-promo-vivo/src/css/lib-reset-mobile.less @@ -0,0 +1,431 @@ +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8+, and Opera + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} +ul{ + list-style: none; +} +ul,li{ + margin: 0; + padding: 0; +} \ No newline at end of file diff --git a/20150514-promo-vivo/src/css/style-promo.less b/20150514-promo-vivo/src/css/style-promo.less new file mode 100644 index 0000000..74495ea --- /dev/null +++ b/20150514-promo-vivo/src/css/style-promo.less @@ -0,0 +1,656 @@ +@import 'lib-reset-mobile'; +@import 'lib-mixins-mobile'; +@import 'lib-animation'; + +html, body { + height: 100%; + -webkit-box-sizing: border-box; + box-sizing: border-box; + overflow: hidden; + background-color: #070709; +} + +.wrap { + width: 100%; + height: 100%; + overflow: hidden; + background-color: #070709; +} + +.screen { + width: 100%; + height: 100%; + overflow: hidden; + position: relative; +} + +.screen__inner { + position: absolute; + width: 320px; + height: 504px; + top: 50%; + left: 50%; + margin: -252px 0 0 -160px; + -webkit-perspective: 1000; + perspective: 1000; + overflow: hidden; +} + +.screen-arrow{ + position: absolute; + left: 50%; + bottom: 20px/2; + width: 66px/2; + height: 36px/2; + margin-left: -66px/4; + background: url(../img/screen_arrow.png) no-repeat; + .background-size(66px/2); + opacity: 0; +} + +.screen__bg{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + opacity: 0; +} + +.screen1__bg{ + background: url(../img/screen1_bg.jpg) no-repeat center top; + .background-size(contain); +} + +.screen2__bg { + background: url(../img/screen2_bg.jpg) no-repeat center top; + .background-size(contain); +} + +.screen3__bg { + background: url(../img/screen3_bg.jpg) no-repeat center top; + .background-size(contain); +} + +.screen4__bg { + background: url(../img/screen4_bg.jpg) no-repeat center top; + .background-size(contain); +} + +.screen__txt{ + position: absolute; + left: 50%; + opacity: 0; +} + +.screen1__txt1{ + bottom: 190px/2; + width: 110px/2; + height: 26px/2; + margin-left: -110px/4; + background: url(../img/screen1_txt1.png) no-repeat; + .background-size(110px/2); +} + +.screen2__txt1{ + bottom: 190px/2; + width: 110px/2; + height: 28px/2; + margin-left: -110px/4; + background: url(../img/screen2_txt1.png) no-repeat; + .background-size(110px/2); +} + +.screen3__txt1{ + bottom: 190px/2; + width: 110px/2; + height: 26px/2; + margin-left: -110px/4; + background: url(../img/screen3_txt1.png) no-repeat; + .background-size(110px/2); +} + +.screen4__txt1{ + bottom: 190px/2; + width: 110px/2; + height: 28px/2; + margin-left: -110px/4; + background: url(../img/screen4_txt1.png) no-repeat; + .background-size(110px/2); +} + +.screen1__txt2 { + bottom: 138px/2; + width: 362px/2; + height: 28px/2; + margin-left: -362px/4; + background: url(../img/screen1_txt2.png) no-repeat; + .background-size(362px/2); +} + +.screen2__txt2 { + bottom: 138px/2; + width: 334px/2; + height: 26px/2; + margin-left: -334px/4; + background: url(../img/screen2_txt2.png) no-repeat; + .background-size(334px/2); +} + +.screen3__txt2 { + bottom: 138px/2; + width: 362px/2; + height: 28px/2; + margin-left: -362px/4; + background: url(../img/screen3_txt2.png) no-repeat; + .background-size(362px/2); +} + +.screen4__txt2 { + bottom: 138px/2; + width: 278px/2; + height: 26px/2; + margin-left: -278px/4; + background: url(../img/screen4_txt2.png) no-repeat; + .background-size(278px/2); +} + +.screen__icon{ + position: absolute; + left: 50%; + top: 68px/2; + width: 100px/2; + height: 100px/2; + margin-left: -100px/4; + opacity: 0; +} + +.screen1__icon{ + background: url(../img/screen1_icon.png) no-repeat; + .background-size(100px/2); +} + +.screen2__icon{ + background: url(../img/screen2_icon.png) no-repeat; + .background-size(100px/2); +} + +.screen3__icon{ + background: url(../img/screen3_icon.png) no-repeat; + .background-size(100px/2); +} + +.screen4__icon{ + background: url(../img/screen4_icon.png) no-repeat; + .background-size(100px/2); +} + +.screen1__txt3{ + top: 210px/2; + width: 336px/2; + height: 34px/2; + margin-left: -336px/4; + background: url(../img/screen1_txt3.png) no-repeat; + .background-size(336px/2); +} + +.screen2__txt3{ + top: 210px/2; + width: 374px/2; + height: 34px/2; + margin-left: -374px/4; + background: url(../img/screen2_txt3.png) no-repeat; + .background-size(374px/2); +} + +.screen3__txt3{ + top: 210px/2; + width: 314px/2; + height: 34px/2; + margin-left: -314px/4; + background: url(../img/screen3_txt3.png) no-repeat; + .background-size(314px/2); +} + +.screen4__txt3{ + top: 210px/2; + width: 300px/2; + height: 34px/2; + margin-left: -300px/4; + background: url(../img/screen4_txt3.png) no-repeat; + .background-size(300px/2); +} + +.screen1__txt4{ + top: 266px/2; + width: 336px/2; + height: 22px/2; + margin-left: -336px/4; + background: url(../img/screen1_txt4.png) no-repeat; + .background-size(336px/2); +} + +.screen2__txt4{ + top: 266px/2; + width: 318px/2; + height: 22px/2; + margin-left: -318px/4; + background: url(../img/screen2_txt4.png) no-repeat; + .background-size(318px/2); +} + +.screen3__txt4{ + top: 266px/2; + width: 218px/2; + height: 20px/2; + margin-left: -218px/4; + background: url(../img/screen3_txt4.png) no-repeat; + .background-size(218px/2); +} + +.screen4__txt4{ + top: 266px/2; + width: 174px/2; + height: 22px/2; + margin-left: -174px/4; + background: url(../img/screen4_txt4.png) no-repeat; + .background-size(174px/2); +} + +.screen1__pic1{ + position: absolute; + left: 0; + top: 318px/2; + width: 370px/2; + height: 474px/2; + background: url(../img/screen1_pic1.png) no-repeat; + .background-size(370px/2); + opacity: 0; +} + +.screen1__pic2{ + position: absolute; + right: 0; + top: 496px/2; + width: 372px/2; + height: 494px/2; + background: url(../img/screen1_pic2.png) no-repeat; + .background-size(372px/2); + opacity: 0; +} + +.screen2__pic1{ + position: absolute; + left: 0; + bottom: 130px/2; + width: 640px/2; + height: 514px/2; + background: url(../img/screen2_pic1.png) no-repeat; + .background-size(640px/2); + opacity: 0; +} + +.scree2__mo{ + opacity: 0; +} + +.screen2__pic2{ + position: absolute; + left: 0; + bottom: 246px/2; + width: 640px/2; + height: 516px/2; + background: url(../img/screen2_pic2.png) no-repeat; + .background-size(640px/2); +} + +.screen2__pic3{ + position: absolute; + left: 0; + bottom: 302px/2; + width: 640px/2; + height: 452px/2; + background: url(../img/screen2_pic3.png) no-repeat; + .background-size(640px/2); +} + +.screen2__pic4{ + position: absolute; + left: 0; + bottom: 360px/2; + width: 640px/2; + height: 396px/2; + background: url(../img/screen2_pic4.png) no-repeat; + .background-size(640px/2); +} + +.screen2__pic5{ + position: absolute; + left: 0; + bottom: 130px/2; + width: 640px/2; + height: 624px/2; + background: url(../img/screen2_pic5.png) no-repeat; + .background-size(640px/2); + opacity: 0; +} + +.screen3__pic1{ + position: absolute; + left: -115px; + bottom: 122px/2; + width: 874px/2; + height: 540px/2; + background: url(../img/screen3_pic1.png) no-repeat; + .background-size(874px/2); + opacity: 0; +} + +.screen__pic-wrap{ + position: absolute; + right: 0; + bottom: 0; + width: 572px/2; + height: 526px/2; + opacity: 0; +} + +.screen4__pic-circle{ + opacity: 0; +} + +.screen4__pic1{ + position: absolute; + right: 0; + bottom: 0; + width: 572px/2; + height: 526px/2; + background: url(../img/screen4_pic1.png) no-repeat; + .background-size(572px/2); +} + +.screen4__pic2{ + position: absolute; + left: 66px; + top: 18px; + width: 118px/2; + height: 136px/2; + background: url(../img/screen4_pic2.png) no-repeat; + .background-size(118px/2); +} + +.screen4__pic3{ + position: absolute; + left: 78px; + top: 10px; + width: 98px/2; + height: 122px/2; + background: url(../img/screen4_pic3.png) no-repeat; + .background-size(98px/2); + opacity: 0; +} + +.screen4__pic4{ + position: absolute; + left: 78px; + top: 10px; + width: 78px/2; + height: 104px/2; + background: url(../img/screen4_pic4.png) no-repeat; + .background-size(78px/2); + opacity: 0; +} + +.screen4__pic5{ + position: absolute; + left: 78px; + top: 10px; + width: 96px/2; + height: 112px/2; + background: url(../img/screen4_pic5.png) no-repeat; + .background-size(96px/2); + opacity: 0; +} + +.screen4__pic6{ + position: absolute; + left: 78px; + top: 10px; + width: 84px/2; + height: 114px/2; + background: url(../img/screen4_pic6.png) no-repeat; + .background-size(84px/2); + opacity: 0; +} + +.screen4__pic7{ + position: absolute; + left: 78px; + top: 10px; + width: 82px/2; + height: 110px/2; + background: url(../img/screen4_pic7.png) no-repeat; + .background-size(82px/2); + opacity: 0; +} + +.screen4__pic8{ + position: absolute; + left: 78px; + top: 10px; + width: 78px/2; + height: 116px/2; + background: url(../img/screen4_pic8.png) no-repeat; + .background-size(78px/2); + opacity: 0; +} + +.logo{ + position: absolute; + left: 50%; + bottom: 86px/2; + width: 292px/2; + height: 26px/2; + margin-left: -292px/4; + background: url(../img/logo.png) no-repeat; + .background-size(292px/2); + opacity: 0; +} + +.screen5__txt1{ + position: absolute; + left: 50%; + top: 104px/2; + width: 140px/2; + height: 34px/2; + margin-left: -140px/4; + background: url(../img/screen5_txt1.png) no-repeat; + .background-size(140px/2); + opacity: 0; +} + +.screen5__txt2{ + position: absolute; + left: 50%; + top: 174px/2; + width: 160px/2; + height: 24px/2; + margin-left: -160px/4; + background: url(../img/screen5_txt2.png) no-repeat; + .background-size(160px/2); + opacity: 0; +} + +.screen5__txt3{ + position: absolute; + left: 50%; + top: 236px/2; + width: 118px/2; + height: 32px/2; + margin-left: -118px/4; + background: url(../img/screen5_txt3.png) no-repeat; + .background-size(118px/2); + opacity: 0; +} + +.screen5__pic1{ + position: absolute; + left: 50%; + top: 364px/2; + width: 616px/2; + height: 320px/2; + margin-left: -616px/4; + background: url(../img/screen5_pic1.png) no-repeat; + .background-size(616px/2); + opacity: 0; +} + +.screen5__txt4{ + position: absolute; + left: 50%; + bottom: 178px/2; + width: 262px/2; + height: 42px/2; + margin-left: -262px/4; + background: url(../img/screen5_txt4.png) no-repeat; + .background-size(262px/2); + opacity: 0; +} + +.screen__btn{ + position: absolute; + left: 50%; + bottom: 86px/2; + width: 396px/2; + height: 70px/2; + margin-left: -396px/4; + background: url(../img/screen_btn.png) no-repeat; + .background-size(396px/2); + opacity: 0; + a{ + display: inline-block; + width: 100%; + height: 100%; + } +} + +.current { + .screen-arrow{ + .animation(swipeMove 1.5s 6s ease infinite); + } + .screen1__bg, + .screen2__bg, + .screen3__bg, + .screen4__bg{ + .animation(anim-bg 5s ease both); + } + .screen1__txt1, + .screen2__txt1, + .screen3__txt1, + .screen4__txt1{ + .animation(anim-txt 0.8s 1s ease both); + } + .screen1__txt2, + .screen2__txt2, + .screen3__txt2, + .screen4__txt2{ + .animation(anim-txt 0.8s 1.3s ease both); + } + .screen__txt-wrap{ + .animation(fade-out 1.5s 3s ease both); + } + .screen1__pic1{ + .animation(leftToRightMove 1.5s 3.5s ease both); + } + .screen1__pic2{ + .animation(rightToLeftMove 1.5s 3.5s ease both); + } + .screen2__pic1, + .scree2__mo{ + .animation(fade-in 1.5s 4s ease both); + } + .screen2__pic2{ + .animation(topToDownMove_1 1.5s 5s ease both); + } + .screen2__pic3{ + .animation(topToDownMove_2 1.5s 5.3s ease both); + } + .screen2__pic4{ + .animation(topToDownMove_3 1.5s 5.4s ease both); + } + .screen2__pic5{ + .animation(fade-in 1.5s 6.5s ease both); + } + .screen3__pic1{ + .animation(rightToLeftMove 1.5s 4s ease both); + } + .screen__pic-wrap{ + .animation(downToTopMove 1.3s 4s ease both); + } + .screen4__pic-circle{ + .animation(fade-in 0.5s 5.3s ease both); + } + .screen4__pic3{ + .animation(circleMove3 1s 5.3s cubic-bezier(.71, -0.01, .43, 1) both); + } + .screen4__pic4{ + .animation(circleMove4 1s 5.3s cubic-bezier(.71, -0.01, .43, 1) both); + } + .screen4__pic5{ + .animation(circleMove5 1s 5.3s cubic-bezier(.71, -0.01, .43, 1) both); + } + .screen4__pic6{ + .animation(circleMove6 1s 5.3s cubic-bezier(.71, -0.01, .43, 1) both); + } + .screen4__pic7{ + .animation(circleMove7 1s 5.3s cubic-bezier(.71, -0.01, .43, 1) both); + } + .screen4__pic8{ + .animation(circleMove8 1s 5.3s cubic-bezier(.71, -0.01, .43, 1) both); + } + .logo{ + .animation(fade-in 1.3s 5s ease both); + } + .screen1__icon, + .screen2__icon, + .screen3__icon, + .screen4__icon{ + .animation(fadeInUp 1.3s 3.8s ease both); + } + .screen1__txt3, + .screen2__txt3, + .screen3__txt3, + .screen4__txt3{ + .animation(fadeInUp 1.3s 4s ease both); + } + .screen1__txt4, + .screen2__txt4, + .screen3__txt4, + .screen4__txt4{ + .animation(fadeInUp 1.3s 4.2s ease both); + } + .screen5__txt1{ + .animation(fadeInUp 1.5s 0.5s ease both); + } + .screen5__txt2{ + .animation(fadeInUp 1.5s 0.8s ease both); + } + .screen5__txt3{ + .animation(fadeInUp 1.5s 1.1s ease both); + } + .screen5__pic1{ + .animation(fadeInUp 1.5s 1.4s ease both); + } + .screen5__txt4{ + .animation(fadeInUp 1.5s 1.7s ease both); + } + .screen__btn{ + .animation(fadeInUp 1.5s 2s ease both); + } + .screen-arrow1{ + .animation(swipeMove 1.5s 5s ease infinite); + } + .screen-arrow2{ + .animation(swipeMove 1.5s 7.2s ease infinite); + } +} diff --git a/20150514-promo-vivo/src/html/index.html b/20150514-promo-vivo/src/html/index.html new file mode 100644 index 0000000..baa17a3 --- /dev/null +++ b/20150514-promo-vivo/src/html/index.html @@ -0,0 +1,159 @@ + + + + + + + + 手品之美vivo X5Pro + + + + +
+
+
+
0%
+
+
+ + + + + + + + + + diff --git a/20150514-promo-vivo/src/img/loading.png b/20150514-promo-vivo/src/img/loading.png new file mode 100644 index 0000000..d59a67d Binary files /dev/null and b/20150514-promo-vivo/src/img/loading.png differ diff --git a/20150514-promo-vivo/src/img/logo.png b/20150514-promo-vivo/src/img/logo.png new file mode 100644 index 0000000..dbda237 Binary files /dev/null and b/20150514-promo-vivo/src/img/logo.png differ diff --git a/20150514-promo-vivo/src/img/screen1_bg.jpg b/20150514-promo-vivo/src/img/screen1_bg.jpg new file mode 100644 index 0000000..92c7cac Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_bg.jpg differ diff --git a/20150514-promo-vivo/src/img/screen1_bg.png b/20150514-promo-vivo/src/img/screen1_bg.png new file mode 100644 index 0000000..b3b9d41 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_bg.png differ diff --git a/20150514-promo-vivo/src/img/screen1_icon.png b/20150514-promo-vivo/src/img/screen1_icon.png new file mode 100644 index 0000000..8466e37 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_icon.png differ diff --git a/20150514-promo-vivo/src/img/screen1_pic1.png b/20150514-promo-vivo/src/img/screen1_pic1.png new file mode 100644 index 0000000..013b867 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_pic1.png differ diff --git a/20150514-promo-vivo/src/img/screen1_pic2.png b/20150514-promo-vivo/src/img/screen1_pic2.png new file mode 100644 index 0000000..26ac754 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_pic2.png differ diff --git a/20150514-promo-vivo/src/img/screen1_txt1.png b/20150514-promo-vivo/src/img/screen1_txt1.png new file mode 100644 index 0000000..1bc95d4 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_txt1.png differ diff --git a/20150514-promo-vivo/src/img/screen1_txt2.png b/20150514-promo-vivo/src/img/screen1_txt2.png new file mode 100644 index 0000000..a154bd1 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_txt2.png differ diff --git a/20150514-promo-vivo/src/img/screen1_txt3.png b/20150514-promo-vivo/src/img/screen1_txt3.png new file mode 100644 index 0000000..fbe64b0 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_txt3.png differ diff --git a/20150514-promo-vivo/src/img/screen1_txt4.png b/20150514-promo-vivo/src/img/screen1_txt4.png new file mode 100644 index 0000000..5c24053 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen1_txt4.png differ diff --git a/20150514-promo-vivo/src/img/screen2_bg.jpg b/20150514-promo-vivo/src/img/screen2_bg.jpg new file mode 100644 index 0000000..052bcdd Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_bg.jpg differ diff --git a/20150514-promo-vivo/src/img/screen2_bg.png b/20150514-promo-vivo/src/img/screen2_bg.png new file mode 100644 index 0000000..9f0d51c Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_bg.png differ diff --git a/20150514-promo-vivo/src/img/screen2_icon.png b/20150514-promo-vivo/src/img/screen2_icon.png new file mode 100644 index 0000000..9cd5082 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_icon.png differ diff --git a/20150514-promo-vivo/src/img/screen2_pic1.png b/20150514-promo-vivo/src/img/screen2_pic1.png new file mode 100644 index 0000000..ffd35a7 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_pic1.png differ diff --git a/20150514-promo-vivo/src/img/screen2_pic2.png b/20150514-promo-vivo/src/img/screen2_pic2.png new file mode 100644 index 0000000..c58778e Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_pic2.png differ diff --git a/20150514-promo-vivo/src/img/screen2_pic3.png b/20150514-promo-vivo/src/img/screen2_pic3.png new file mode 100644 index 0000000..8c0c0f4 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_pic3.png differ diff --git a/20150514-promo-vivo/src/img/screen2_pic4.png b/20150514-promo-vivo/src/img/screen2_pic4.png new file mode 100644 index 0000000..0beb863 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_pic4.png differ diff --git a/20150514-promo-vivo/src/img/screen2_pic5.png b/20150514-promo-vivo/src/img/screen2_pic5.png new file mode 100644 index 0000000..d9c1b22 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_pic5.png differ diff --git a/20150514-promo-vivo/src/img/screen2_txt1.png b/20150514-promo-vivo/src/img/screen2_txt1.png new file mode 100644 index 0000000..d30eebe Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_txt1.png differ diff --git a/20150514-promo-vivo/src/img/screen2_txt2.png b/20150514-promo-vivo/src/img/screen2_txt2.png new file mode 100644 index 0000000..5ff3c99 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_txt2.png differ diff --git a/20150514-promo-vivo/src/img/screen2_txt3.png b/20150514-promo-vivo/src/img/screen2_txt3.png new file mode 100644 index 0000000..5b05734 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_txt3.png differ diff --git a/20150514-promo-vivo/src/img/screen2_txt4.png b/20150514-promo-vivo/src/img/screen2_txt4.png new file mode 100644 index 0000000..e50648a Binary files /dev/null and b/20150514-promo-vivo/src/img/screen2_txt4.png differ diff --git a/20150514-promo-vivo/src/img/screen3_bg.jpg b/20150514-promo-vivo/src/img/screen3_bg.jpg new file mode 100644 index 0000000..886b8f4 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_bg.jpg differ diff --git a/20150514-promo-vivo/src/img/screen3_bg.png b/20150514-promo-vivo/src/img/screen3_bg.png new file mode 100644 index 0000000..f2f5e7c Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_bg.png differ diff --git a/20150514-promo-vivo/src/img/screen3_icon.png b/20150514-promo-vivo/src/img/screen3_icon.png new file mode 100644 index 0000000..a828c76 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_icon.png differ diff --git a/20150514-promo-vivo/src/img/screen3_pic1.png b/20150514-promo-vivo/src/img/screen3_pic1.png new file mode 100644 index 0000000..1525685 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_pic1.png differ diff --git a/20150514-promo-vivo/src/img/screen3_txt1.png b/20150514-promo-vivo/src/img/screen3_txt1.png new file mode 100644 index 0000000..03db67f Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_txt1.png differ diff --git a/20150514-promo-vivo/src/img/screen3_txt2.png b/20150514-promo-vivo/src/img/screen3_txt2.png new file mode 100644 index 0000000..f952d57 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_txt2.png differ diff --git a/20150514-promo-vivo/src/img/screen3_txt3.png b/20150514-promo-vivo/src/img/screen3_txt3.png new file mode 100644 index 0000000..9b908ff Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_txt3.png differ diff --git a/20150514-promo-vivo/src/img/screen3_txt4.png b/20150514-promo-vivo/src/img/screen3_txt4.png new file mode 100644 index 0000000..7908287 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen3_txt4.png differ diff --git a/20150514-promo-vivo/src/img/screen4_bg.jpg b/20150514-promo-vivo/src/img/screen4_bg.jpg new file mode 100644 index 0000000..124a687 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_bg.jpg differ diff --git a/20150514-promo-vivo/src/img/screen4_bg.png b/20150514-promo-vivo/src/img/screen4_bg.png new file mode 100644 index 0000000..46cc946 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_bg.png differ diff --git a/20150514-promo-vivo/src/img/screen4_icon.png b/20150514-promo-vivo/src/img/screen4_icon.png new file mode 100644 index 0000000..c9c4614 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_icon.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic1.png b/20150514-promo-vivo/src/img/screen4_pic1.png new file mode 100644 index 0000000..8195ca2 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic1.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic2.png b/20150514-promo-vivo/src/img/screen4_pic2.png new file mode 100644 index 0000000..eb9d79d Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic2.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic3.png b/20150514-promo-vivo/src/img/screen4_pic3.png new file mode 100644 index 0000000..0e121ce Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic3.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic4.png b/20150514-promo-vivo/src/img/screen4_pic4.png new file mode 100644 index 0000000..119ac1e Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic4.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic5.png b/20150514-promo-vivo/src/img/screen4_pic5.png new file mode 100644 index 0000000..2051bfd Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic5.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic6.png b/20150514-promo-vivo/src/img/screen4_pic6.png new file mode 100644 index 0000000..841a86e Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic6.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic7.png b/20150514-promo-vivo/src/img/screen4_pic7.png new file mode 100644 index 0000000..ec71607 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic7.png differ diff --git a/20150514-promo-vivo/src/img/screen4_pic8.png b/20150514-promo-vivo/src/img/screen4_pic8.png new file mode 100644 index 0000000..0d32b87 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_pic8.png differ diff --git a/20150514-promo-vivo/src/img/screen4_txt1.png b/20150514-promo-vivo/src/img/screen4_txt1.png new file mode 100644 index 0000000..5756b49 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_txt1.png differ diff --git a/20150514-promo-vivo/src/img/screen4_txt2.png b/20150514-promo-vivo/src/img/screen4_txt2.png new file mode 100644 index 0000000..a76383e Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_txt2.png differ diff --git a/20150514-promo-vivo/src/img/screen4_txt3.png b/20150514-promo-vivo/src/img/screen4_txt3.png new file mode 100644 index 0000000..c87a79d Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_txt3.png differ diff --git a/20150514-promo-vivo/src/img/screen4_txt4.png b/20150514-promo-vivo/src/img/screen4_txt4.png new file mode 100644 index 0000000..8570129 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen4_txt4.png differ diff --git a/20150514-promo-vivo/src/img/screen5_pic1.png b/20150514-promo-vivo/src/img/screen5_pic1.png new file mode 100644 index 0000000..c08bf8b Binary files /dev/null and b/20150514-promo-vivo/src/img/screen5_pic1.png differ diff --git a/20150514-promo-vivo/src/img/screen5_txt1.png b/20150514-promo-vivo/src/img/screen5_txt1.png new file mode 100644 index 0000000..bfad1e1 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen5_txt1.png differ diff --git a/20150514-promo-vivo/src/img/screen5_txt2.png b/20150514-promo-vivo/src/img/screen5_txt2.png new file mode 100644 index 0000000..8466ad5 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen5_txt2.png differ diff --git a/20150514-promo-vivo/src/img/screen5_txt3.png b/20150514-promo-vivo/src/img/screen5_txt3.png new file mode 100644 index 0000000..63f0a4d Binary files /dev/null and b/20150514-promo-vivo/src/img/screen5_txt3.png differ diff --git a/20150514-promo-vivo/src/img/screen5_txt4.png b/20150514-promo-vivo/src/img/screen5_txt4.png new file mode 100644 index 0000000..47bc186 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen5_txt4.png differ diff --git a/20150514-promo-vivo/src/img/screen_arrow.png b/20150514-promo-vivo/src/img/screen_arrow.png new file mode 100644 index 0000000..59949ec Binary files /dev/null and b/20150514-promo-vivo/src/img/screen_arrow.png differ diff --git a/20150514-promo-vivo/src/img/screen_btn.png b/20150514-promo-vivo/src/img/screen_btn.png new file mode 100644 index 0000000..3668ae1 Binary files /dev/null and b/20150514-promo-vivo/src/img/screen_btn.png differ diff --git a/20150514-promo-vivo/src/img/thumb.jpg b/20150514-promo-vivo/src/img/thumb.jpg new file mode 100644 index 0000000..dbd9d78 Binary files /dev/null and b/20150514-promo-vivo/src/img/thumb.jpg differ diff --git a/20150514-promo-vivo/src/js/main.js b/20150514-promo-vivo/src/js/main.js new file mode 100644 index 0000000..7d56aec --- /dev/null +++ b/20150514-promo-vivo/src/js/main.js @@ -0,0 +1,129 @@ +var basePath = 'http://wximg.gtimg.com/tmt/_events/20150514-promo-vivo/dist/'; + +if (!(typeof webpsupport == 'function')) { + var webpsupport = function (cb) { + cb(); + } +} + +webpsupport(function (webpa) { + var loader = new WxMoment.Loader(), + fileList = [ + 'img/logo.png', + 'img/screen1_bg.jpg', + 'img/screen1_icon.png', + 'img/screen1_pic1.png', + 'img/screen1_pic2.png', + 'img/screen1_txt1.png', + 'img/screen1_txt2.png', + 'img/screen1_txt3.png', + 'img/screen1_txt4.png', + 'img/screen2_bg.jpg', + 'img/screen2_icon.png', + 'img/screen2_pic1.png', + 'img/screen2_pic2.png', + 'img/screen2_pic3.png', + 'img/screen2_pic4.png', + 'img/screen2_pic5.png', + 'img/screen2_txt1.png', + 'img/screen2_txt2.png', + 'img/screen2_txt3.png', + 'img/screen2_txt4.png', + 'img/screen3_bg.jpg', + 'img/screen3_icon.png', + 'img/screen3_pic1.png', + 'img/screen3_txt2.png', + 'img/screen3_txt3.png', + 'img/screen3_txt4.png', + 'img/screen4_bg.jpg', + 'img/screen4_icon.png', + 'img/screen4_pic1.png', + 'img/screen4_pic2.png', + 'img/screen4_pic3.png', + 'img/screen4_pic4.png', + 'img/screen4_pic5.png', + 'img/screen4_pic6.png', + 'img/screen4_pic7.png', + 'img/screen4_pic8.png', + 'img/screen4_txt1.png', + 'img/screen4_txt2.png', + 'img/screen4_txt3.png', + 'img/screen4_txt4.png', + 'img/screen5_pic1.png', + 'img/screen5_txt1.png', + 'img/screen5_txt2.png', + 'img/screen5_txt3.png', + 'img/screen5_txt4.png', + 'img/screen_arrow.png', + 'img/screen_btn.png', + 'img/thumb.jpg' + ]; + + for (var i = 0; i < fileList.length; i++) { + var basename = fileList[i].substring(fileList[i].lastIndexOf('/') + 1); + + if (webpa && img_map && (basename in img_map) && img_map[basename]) { //if webp + var path = fileList[i].replace(/\.\w+/, '.webp'); + } else { + var path = fileList[i]; + } + + loader.addImage(basePath + path); + } + + loader.addCompletionListener(function () { + $('.loading').remove(); + $('.screen').eq(0).addClass('current'); + $('.wrap').show(); + }); + + //loading 进度监听 + loader.addProgressListener(function (e) { + var percentUp = Math.round((e.completedCount / e.totalCount) * 100), //正序, 1-100 + progressDown = 100 - percentUp; //倒序, 100-1 + + + $('.loading-num').text(percentUp + '%'); + }); + + //启动 + loader.start(); +}); + + +//旋屏提示 +new WxMoment.OrientationTip(); + +//切换 +new WxMoment.PageSlider({ + pages: document.querySelectorAll('.screen') +}); + +//分享 +new WxMoment.Share({ + //分享到朋友圈 + 'moment': { + 'title': '回归,是创造手品之美的起点', + 'desc': "回归美的原点,vivo创造手品之美,X5Pro心动上市" + }, + //分享给好友 + 'friend': { + 'title': "回归,是创造手品之美的起点", + 'desc': "回归美的原点,vivo创造手品之美,X5Pro心动上市" + }, + 'global': { + 'img_url': basePath + "img/thumb.jpg", + 'link': window.location.href.split("?")[0].replace(/([&|\?]{1})ticket=[\w\-]+(&?)/, '$1').replace(/\?$/, '') + } +}); + +var wa = new WxMoment.Analytics({ + //projectName 请与微信商务团队确认 + projectName: "20150514VIVO" +}); + +//可以统计到按钮的点击事件 +$('#J-btn').click(function () { + //两个必填参数,分别为: 事件分类、事件名称 + wa.sendEvent('click', 'yuyue'); +}); diff --git a/20150514-promo-vivo/src/js/other.js b/20150514-promo-vivo/src/js/other.js new file mode 100644 index 0000000..6fe3eb1 --- /dev/null +++ b/20150514-promo-vivo/src/js/other.js @@ -0,0 +1,19 @@ +$(document).ready(function(){ + // 放大元素,按照320x504定位,按比例scale + function scaleEle(selector,position){ + var pageScale; + var currentScale=screenWidth/screenHeight; + var originScale=320/504; + if(currentScale>originScale){ + pageScale=screenHeight/504; + }else{ + pageScale=screenWidth/320; + } + $(selector).css({"-webkit-transform-origin":position,"transform-origin":position,"-webkit-transform":"scale("+pageScale+");","transform":"scale("+pageScale+");"}); + } + + var screenHeight = document.documentElement.clientHeight, + screenWidth = document.documentElement.clientWidth; + + scaleEle(".screen__inner","center"); +}); \ No newline at end of file diff --git "a/20150514-promo-vivo/\344\270\212\347\272\277.bat" "b/20150514-promo-vivo/\344\270\212\347\272\277.bat" new file mode 100644 index 0000000..822344a --- /dev/null +++ "b/20150514-promo-vivo/\344\270\212\347\272\277.bat" @@ -0,0 +1,2 @@ +cd %~dp0 +gulp build_dist \ No newline at end of file diff --git "a/project/\345\274\200\345\217\221.bat" "b/20150514-promo-vivo/\345\274\200\345\217\221.bat" similarity index 100% rename from "project/\345\274\200\345\217\221.bat" rename to "20150514-promo-vivo/\345\274\200\345\217\221.bat" diff --git "a/20150514-promo-vivo/\346\211\223\345\214\205.bat" "b/20150514-promo-vivo/\346\211\223\345\214\205.bat" new file mode 100644 index 0000000..f16966a --- /dev/null +++ "b/20150514-promo-vivo/\346\211\223\345\214\205.bat" @@ -0,0 +1,2 @@ +cd %~dp0 +gulp zip \ No newline at end of file diff --git a/package.json b/package.json index 96dbb0a..d38bac6 100644 --- a/package.json +++ b/package.json @@ -8,24 +8,28 @@ "gulp": "^3.8.10", "gulp-copy": "0.0.2", "gulp-ejs": "^1.1.0", + "gulp-filter": "^2.0.2", "gulp-if": "^1.2.5", "gulp-imagemin": "^2.2.1", "gulp-less": "^3.0.1", + "gulp-migcdn": "0.0.6", "gulp-minify-css": "^1.1.0", "gulp-rename": "^1.2.2", "gulp-replace": "^0.5.3", - "gulp-tmtsprite": "0.0.8", + "gulp-tmtsprite": "0.0.12", "gulp-uglify": "^1.2.0", "gulp-usemin2": "^0.2.4", "gulp-watch": "^4.2.4", "gulp-webp": "^2.2.0", "gulp-zip": "^3.0.0", + "imagemin-pngquant": "^4.1.0", "lodash": "^3.5.0", + "open": "0.0.5", "rc": "^1.0.1", - "tmt-ejs-helper": "^0.0.1" - }, - "dependencies": { - "gulp-util": "^3.0.4", - "rd": "0.0.2" + "rd": "0.0.2", + "through2": "^0.6.5", + "tmt-ejs-helper": "^0.0.1", + "vinyl": "^0.4.6", + "gulp-util": "^3.0.4" } } diff --git a/tasks/task_build_dev.js b/tasks/task_build_dev.js index 4753867..f365eee 100644 --- a/tasks/task_build_dev.js +++ b/tasks/task_build_dev.js @@ -7,6 +7,8 @@ var watch = require('gulp-watch'); var ejshelper = require('tmt-ejs-helper'); var util = require('./lib/util'); var bs = require('browser-sync').create(); +var fs = require('fs'); +var path = require('path'); module.exports = function (gulp, config) { gulp.task('build_dev', function () { @@ -40,7 +42,7 @@ module.exports = function (gulp, config) { task_server(); } }); - + } }); }); @@ -52,28 +54,44 @@ module.exports = function (gulp, config) { return cb; } + function file_process(vinyl){ + var file = vinyl.history[0]; + var event = vinyl.event; + var fileBase = file.slice(file.indexOf('src')+4); + file = path.join('./', file.slice(file.indexOf('src'))); + + if(event == "unlink"){ + var remote = path.join('./', 'dev/', fileBase); + fs.unlink(remote); + } + return file; + } var task_img = function (cb) { + var file = (typeof cb == 'string')?cb:['./src/img/**/*']; cb = check_cb(cb); util.task_log('task_img'); - gulp.src('./src/img/**/*').pipe(copy('./dev/', {prefix: 1})).on('end', cb); + gulp.src(file).pipe(copy('./dev/', {prefix: 1})).on('end', cb); }; var task_slice = function (cb) { + var file = (typeof cb == 'string')?cb:['./src/slice/**/*']; cb = check_cb(cb); util.task_log('task_slice'); - gulp.src('./src/slice/**/*').pipe(copy('./dev/', {prefix: 1})).on('end', cb); + gulp.src(file).pipe(copy('./dev/', {prefix: 1})).on('end', cb); }; var task_js = function (cb) { + var file = (typeof cb == 'string')?cb:['./src/js/**/*']; cb = check_cb(cb); util.task_log('task_js'); - gulp.src('./src/js/**/*').pipe(copy('./dev/', {prefix: 1})).on('end', cb); + gulp.src(file).pipe(copy('./dev/', {prefix: 1})).on('end', cb); }; var task_media = function (cb) { + var file = (typeof cb == 'string')?cb:['./src/media/**/*']; cb = check_cb(cb); util.task_log('task_media'); - gulp.src('./src/media/**/*').pipe(copy('./dev/', {prefix: 1})).on('end', cb); + gulp.src(file).pipe(copy('./dev/', {prefix: 1})).on('end', cb); }; var task_less = function (cb) { @@ -88,9 +106,10 @@ module.exports = function (gulp, config) { }; var task_html = function (cb) { + var file = (typeof cb == 'string')?cb:['./src/html/**/*.*', '!./src/html/_*/**.html']; cb = check_cb(cb); util.task_log('task_html'); - gulp.src(['./src/html/**/*.html', '!./src/html/_*/**.html']) + gulp.src(file,{base:"./src/html/"}) .pipe(ejs(ejshelper()).on('error', function (error) { util.log(util.colors.red(error.message)); })) @@ -110,20 +129,31 @@ module.exports = function (gulp, config) { var task_watch = function () { - watch('./src/img/**/*', {verbose: true}, function () { - task_img(); + watch('./src/img/**/*', {verbose: true}, function (vinyl) { + var file = file_process(vinyl); + task_img(file); + config.livereload && bs.reload(); + }); - watch('./src/slice/**/*', {verbose: true}, function () { - task_slice(); + watch('./src/slice/**/*', {verbose: true}, function (vinyl) { + var file = file_process(vinyl); + task_slice(file); + config.livereload && bs.reload(); }); - watch('./src/js/**/*', {verbose: true}, function () { - task_js(); + watch('./src/js/**/*', {verbose: true}, function (vinyl) { + var file = file_process(vinyl); + task_js(file); + config.livereload && bs.reload(); + }); - watch('./src/media/**/*', {verbose: true}, function () { - task_media(); + watch('./src/media/**/*', {verbose: true}, function (vinyl) { + var file = file_process(vinyl); + task_media(file); + config.livereload && bs.reload(); + }); watch('./src/css/**/*', {verbose: true}, function () { @@ -131,8 +161,9 @@ module.exports = function (gulp, config) { config.livereload && bs.reload(); }); - watch('./src/html/**/*.html', {verbose: true}, function () { - task_html(); + watch('./src/html/**/*.html', {verbose: true}, function (vinyl) { + var file = file_process(vinyl); + task_html(file); config.livereload && bs.reload(); }); diff --git a/tasks/task_build_dist.js b/tasks/task_build_dist.js index 8bee59c..cd2037c 100644 --- a/tasks/task_build_dist.js +++ b/tasks/task_build_dist.js @@ -8,6 +8,7 @@ var minifyCSS = require('gulp-minify-css'); var tmtsprite = require('gulp-tmtsprite'); var gulpif = require('gulp-if'); var imagemin = require('gulp-imagemin'); +var pngquant = require('imagemin-pngquant'); var usemin = require('gulp-usemin2'); var uglify = require('gulp-uglify'); var del = require('del'); @@ -48,7 +49,9 @@ module.exports = function (gulp, config) { }, function (cb) { gulp.src('./src/img/**/*') - .pipe(imagemin()) + .pipe(imagemin({ + use: [pngquant()] + })) .pipe(gulp.dest('./dist/img')) .on('end', function () { util.task_log('task_imagemin'); @@ -58,7 +61,9 @@ module.exports = function (gulp, config) { function (cb) { gulp.src('./dist/sprite/**/*') - .pipe(imagemin()) + .pipe(imagemin({ + use: [pngquant()] + })) .pipe(gulp.dest('./dist/sprite')) .on('end', function () { util.task_log('task_spritemin'); diff --git a/tasks/task_zip.js b/tasks/task_zip.js index 2e822a2..2fb21bf 100644 --- a/tasks/task_zip.js +++ b/tasks/task_zip.js @@ -4,8 +4,8 @@ var util = require('./lib/util'); module.exports = function (gulp, config) { gulp.task('zip', ['build_dist'], function (cb) { - gulp.src('./dist/**/*') - .pipe(zip('dist.zip')) + gulp.src('./src/**/*') + .pipe(zip(config.projectName + '.zip')) .pipe(gulp.dest('./')) .on('end', function () { util.load_plugin('zip');