15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
35 |
36 |
37 |
38 |
39 |
40 |
7a570084fcf17dfd19f27128300c8648
41 |
42 |
43 |
44 |
45 |
46 |
b69a1e4a33a526ed9af2af493cfb4cb1
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/css/kit.jade:
--------------------------------------------------------------------------------
1 | !!!5
2 | html
3 | head
4 | meta(charset='UTF-8')
5 | title Social stats UI kit
6 | link(rel="stylesheet", type="text/css", href="main.css")
7 | link(rel="stylesheet", type="text/css", href="assets/kit.css")
8 | link(rel="stylesheet", href="css-assets/font/stylesheet.css", type="text/css", charset="utf-8")
9 | body
10 | include icons.svg
11 | .main-kl
12 | .section-kl
13 | .header-ke Colors
14 | .cf
15 | .color-sample-ke.c-grey1-bg-g
16 | .color-sample-ke.c-grey2-bg-g
17 | .color-sample-ke.c-grey3-bg-g
18 | .color-sample-ke.c-grey4-bg-g
19 | .color-sample-ke.c-grey5-bg-g
20 | .color-sample-ke.c-grey6-bg-g
21 | .color-sample-ke.c-grey7-bg-g
22 | .color-sample-ke.c-grey8-bg-g
23 | .color-sample-ke.c-grey9-bg-g
24 | .color-sample-ke.c-grey10-bg-g
25 |
26 | .cf
27 | .color-sample-ke.c-red-bg-g
28 | .color-sample-ke.c-orange1-bg-g
29 | .color-sample-ke.c-orange2-bg-g
30 | .color-sample-ke.c-bg-bg-g
31 |
32 | - var data = {}
33 |
34 | .section-kl
35 | .header-ke Icons
36 | .cf
37 | .icon-sample-kl
38 | .hash-e 7a570084fcf17dfd19f27128300c8648
39 | //- - var data = { path: 'old-pen-icon' }
40 | //- include partials/icon
41 |
42 | .section-kl
43 | .header-ke Elements
44 | .hash-e b69a1e4a33a526ed9af2af493cfb4cb1
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/css/main.css:
--------------------------------------------------------------------------------
1 | .el {
2 | width: 1.25em;
3 | height: 7.5em;
4 | background: #aaa;
5 | position: absolute;
6 | left: 0;
7 | }
8 | html,
9 | body {
10 | height: 1000px;
11 | }
12 | .sprite {
13 | position: absolute;
14 | left: 100px;
15 | top: 50px;
16 | }
17 | .sprite__frame {
18 | position: absolute;
19 | top: 0;
20 | left: 0;
21 | -webkit-transform: translateZ(0);
22 | -ms-transform: translateZ(0);
23 | transform: translateZ(0);
24 | display: block;
25 | width: 100px;
26 | height: 100px;
27 | }
28 | .sprite__ellipse {
29 | stroke: #ff1493;
30 | fill: none;
31 | }
32 | .svg {
33 | position: absolute;
34 | top: 400px;
35 | left: 0;
36 | }
37 | .svg-path {
38 | position: absolute;
39 | top: 160px;
40 | }
41 | html,
42 | body {
43 | padding: 0;
44 | margin: 0;
45 | background: #333;
46 | }
47 | .page {
48 | background: #ff1493;
49 | width: 100%;
50 | height: 1888px;
51 | position: absolute;
52 | overflow: hidden;
53 | }
54 | .page__inner {
55 | overflow: hidden;
56 | position: absolute;
57 | width: 4px;
58 | height: 4px;
59 | left: 1000px;
60 | top: 40px;
61 | background: #ffa500;
62 | -webkit-backface-visibility: hidden;
63 | -ms-backface-visibility: hidden;
64 | backface-visibility: hidden;
65 | -webkit-perspective: 1280px;
66 | -ms-perspective: 1280px;
67 | perspective: 1280px;
68 | }
69 | .page__inner.is-normal {
70 | width: 100%;
71 | height: auto;
72 | -webkit-transition: none;
73 | transition: none;
74 | overflow: visible;
75 | position: static;
76 | }
77 | .page__inner.is-normal .page__inner__inner {
78 | width: 100%;
79 | -webkit-transition: none;
80 | transition: none;
81 | -webkit-transform: none;
82 | -ms-transform: none;
83 | transform: none;
84 | position: static;
85 | }
86 | .page__inner.is-scaled {
87 | -webkit-transform: scale(1280);
88 | -ms-transform: scale(1280);
89 | transform: scale(1280);
90 | -webkit-transition: -webkit-transform 7s cubic-bezier(0.19, 1, 0.22, 1);
91 | transition: transform 7s cubic-bezier(0.19, 1, 0.22, 1);
92 | }
93 | .page__inner.is-scaled .page__inner__inner {
94 | -webkit-transform: translateZ(-1638400px);
95 | -ms-transform: translateZ(-1638400px);
96 | transform: translateZ(-1638400px);
97 | -webkit-transition: -webkit-transform 7s cubic-bezier(0.19, 1, 0.22, 1);
98 | transition: transform 7s cubic-bezier(0.19, 1, 0.22, 1);
99 | }
100 | .page__inner__inner {
101 | width: 1280px;
102 | left: -1000px;
103 | top: -40px;
104 | position: absolute;
105 | -webkit-backface-visibility: hidden;
106 | -ms-backface-visibility: hidden;
107 | backface-visibility: hidden;
108 | background: #ffa500;
109 | }
110 | .elem {
111 | width: 50px;
112 | height: 50px;
113 | margin-left: 200px;
114 | background: #ff1493;
115 | border-radius: 50%;
116 | }
117 |
--------------------------------------------------------------------------------
/css/main.styl:
--------------------------------------------------------------------------------
1 | @import 'assets/imports.styl'
2 | // @import 'css-assets/normalize.styl'
3 |
4 | // @import 'css-assets/general'
5 | // @import 'css-assets/blocks'
6 | // @import 'css-assets/layouts'
7 | // @import 'css-assets/effects'
8 | // @import 'css-assets/icons'
9 |
10 | // use('assets/nesting-tree-traversal.js')
11 |
12 | .el
13 | width 20*PX
14 | height 120*PX
15 | background #aaa
16 | position absolute
17 | left 0
18 | // transform-origin center bottom
19 |
20 |
21 | html, body
22 | height 1000px
23 |
24 | // .el
25 | // width 800px
26 | // height 800px
27 | // // background #111
28 | // background magenta
29 | // transform translateZ(0)
30 |
31 | .sprite
32 | position absolute
33 | left 100px
34 | top 50px
35 | &__frame
36 | position absolute
37 | top 0
38 | left 0
39 | transform translateZ(0)
40 | display block
41 | width 100px
42 | height 100px
43 | &__ellipse
44 | stroke deeppink
45 | fill none
46 |
47 | // .el
48 | // width 50px
49 | // height 50px
50 | // border-radius 50%
51 | // background deeppink
52 | // position absolute
53 | // top 20%
54 | // left 10%
55 | // margin-left 500px
56 | // nw 50%
57 |
58 | // svg
59 | // hl deeppink
60 |
61 | .svg
62 | position absolute
63 | top 50*gs
64 | left 0
65 |
66 | .svg-path
67 | position absolute
68 | top 20*gs
69 |
70 | html, body
71 | padding 0
72 | margin 0
73 | background #333
74 | gap = 100px
75 | originX = 1000px
76 | originY = 40px
77 | windowSize = 1280
78 | .page
79 | background deeppink
80 | width 100%
81 | height 1888px
82 | position absolute
83 | overflow hidden
84 | startSize = 4px
85 | // z-index 0
86 | &__inner
87 | overflow hidden
88 | position absolute
89 | width startSize
90 | height startSize
91 | left originX
92 | top originY
93 | background orange
94 | backface-visibility hidden
95 | perspective (windowSize)px
96 | &.is-normal
97 | width 100%
98 | height auto
99 | transition none
100 | overflow visible
101 | position static
102 | .page__inner__inner
103 | width 100%
104 | transition none
105 | transform none
106 | position static
107 | &.is-scaled
108 | transform scale(1*windowSize)
109 | transition transform 7s cubic-bezier(0.19, 1, 0.22, 1)
110 | .page__inner__inner
111 | transform translateZ(-(windowSize*windowSize)px)
112 | transition transform 7s cubic-bezier(0.19, 1, 0.22, 1)
113 | &__inner
114 | width (windowSize)px
115 | left - originX
116 | top - originY
117 | position absolute
118 | backface-visibility hidden
119 | background orange
120 | // .content
121 | // position absolute
122 | // nw 0
123 | // se 0
124 | // padding-left 4*gs
125 | // // min-width 1280px
126 | // // min-height 900px
127 | // background purple
128 | // // margin-left -640px
129 | // // margin-top -450px
130 | // position absolute
131 |
132 | // // chrome:
133 | // position absolute
134 | // overflow hidden
135 | // rect 140px
136 |
137 | // // safari:
138 | // overflow hidden
139 | // rect 140px
140 |
141 | // .div-wrapper
142 | // position absolute
143 | // overflow hidden
144 | // rect 140px
145 | // .div
146 | // position absolute
147 | // svg
148 | // hl hotpink
149 | // body
150 | // height 600px
151 |
152 | // iframe
153 | // display none !important
154 | // canvas
155 | // hl orange
156 |
157 | // .container
158 | // width 800px
159 | // height 800px
160 | // border 1px solid hotpink
161 | // position relative
162 |
163 | // .el
164 | // // border 1px solid deeppink
165 | // background hotpink
166 | // border-radius 50%
167 | // size = 5*gs
168 | // rect size
169 | // margin-left -(size/2)
170 | // position absolute
171 | // nw 0
172 | // // backface-visibility hidden
173 | // // transform translateZ(0)
174 |
175 |
176 | .elem {
177 | width: 50px;
178 | height: 50px;
179 | margin-left: 200px;
180 | background: deeppink;
181 | border-radius: 50%;
182 | // -webkit-mask-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC');
183 | // -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, black 100%);
184 | // -webkit-filter: url(#filter-1);
185 | // -moz-filter: url(#filter-1);
186 | // filter: url(#filter-1);
187 | }
--------------------------------------------------------------------------------
/css/partials/icon.jade:
--------------------------------------------------------------------------------
1 | div(class="icon #{ data.className || '' }", id="#{ data.idAttribute || '' }", title="#{ data.title || '' }")
2 | svg(viewBox="#{data.viewBox || '0 0 32 32'}")
3 | use(xlink:href="##{data.path || '' }")
--------------------------------------------------------------------------------
/gulpfile.js:
--------------------------------------------------------------------------------
1 | var gulp = require('gulp');
2 | var fs = require('fs');
3 | var stylus = require('gulp-stylus');
4 | var autoprefixer = require('gulp-autoprefixer');
5 | var notify = require('gulp-notify');
6 | var livereload = require('gulp-livereload');
7 | var coffee = require('gulp-coffee');
8 | var changed = require('gulp-changed');
9 | // var jade = require('gulp-jade');
10 | var watch = require('gulp-jade');
11 | var coffeelint = require('gulp-coffeelint');
12 | var plumber = require('gulp-plumber');
13 | var concat = require('gulp-concat');
14 | var csslint = require('gulp-csslint');
15 | var browserify = require('gulp-browserify');
16 | var rename = require('gulp-rename');
17 | var uglify = require('gulp-uglify');
18 | var sequence = require('run-sequence');
19 | // var coffeeify = require('gulp-coffeeify');
20 | var insert = require('gulp-insert');
21 | var jeditor = require("gulp-json-editor");
22 | var shell = require("gulp-shell");
23 | var grock = require("grock");
24 | // var babel = require("gulp-babel");
25 |
26 | var devFolder = '', distFolder = '', currentVersion = 0;
27 | var distMoFile = devFolder + 'build/mo.js';
28 |
29 | var paths = {
30 | src: {
31 | js: devFolder + 'js/**/*.coffee',
32 | babel: devFolder + 'js/**/*.babel.js',
33 | index: devFolder + 'index.jade',
34 | css: devFolder + 'css/**/*.styl',
35 | tests: distFolder + 'spec/**/*.coffee'
36 | },
37 | dist:{
38 | js: distFolder + 'js/',
39 | index: distFolder,
40 | css: distFolder + 'css/',
41 | tests: distFolder + 'spec/'
42 | }
43 | }
44 |
45 | gulp.task('coffee:tests', function(e){
46 | return gulp.src(paths.src.tests)
47 | .pipe(plumber())
48 | .pipe(changed(paths.dist.tests, { extension: '.js'}))
49 | .pipe(coffeelint())
50 | .pipe(coffeelint.reporter())
51 | .pipe(coffee())
52 | .pipe(gulp.dest(paths.dist.tests))
53 | });
54 |
55 | gulp.task('stylus', function(){
56 | return gulp.src(devFolder + 'css/main.styl')
57 | .pipe(plumber())
58 | .pipe(stylus())
59 | .pipe(autoprefixer('last 4 version'))
60 | .pipe(gulp.dest(paths.dist.css))
61 | .pipe(livereload())
62 | });
63 |
64 | var credits = ''
65 |
66 | gulp.task('lib', function(e){
67 | return gulp.src(paths.src.js)
68 | .pipe(plumber())
69 | .pipe(coffee())
70 | .pipe(gulp.dest('lib/'))
71 | });
72 |
73 | gulp.task('babel-lib', function(e){
74 | return gulp.src(paths.src.babel)
75 | .pipe(plumber())
76 | .pipe(babel())
77 | .pipe(rename(function (path) {
78 | return path.basename = path.basename.replace('.babel', '');
79 | })
80 | ).pipe(gulp.dest('lib/'))
81 | });
82 |
83 | gulp.task('minify-mo', function() {
84 | return gulp.src(distMoFile)
85 | .pipe(plumber())
86 | .pipe(uglify())
87 | .pipe(insert.transform(function(contents) {
88 | return credits + contents;
89 | }))
90 | .pipe(rename('mo.min.js'))
91 | .pipe(gulp.dest('./build'))
92 | });
93 |
94 | gulp.task('update-version', function() {
95 | sequence('get-current-version', 'update-bower-version', 'update-main-file-version');
96 | });
97 |
98 | gulp.task('get-current-version', function(e){
99 | return gulp.src('package.json')
100 | .pipe(plumber())
101 | .pipe(jeditor(function (json) {
102 | currentVersion = json.version;
103 | credits = '/*! \n\t:: mo · js :: motion graphics toolbelt for the web\n\tOleg Solomka @LegoMushroom 2015 MIT\n\t' + currentVersion + ' \n*/\n\n'
104 | return json;
105 | }))
106 | });
107 |
108 | gulp.task('update-bower-version', function(e){
109 | return gulp.src('bower.json')
110 | .pipe(plumber())
111 | .pipe(jeditor(function (json) {
112 | json.version = currentVersion;
113 | return json;
114 | }))
115 | .pipe(gulp.dest(''))
116 | });
117 |
118 | gulp.task('update-main-file-version', function(e){
119 | return gulp.src('js/mojs.babel.js')
120 | .pipe(plumber())
121 | .pipe(insert.transform(function(contents) {
122 | var newString = 'revision: \''+currentVersion+'\'';
123 | return contents
124 | .replace(/revision\:\s+?(\'|\")\d+\.\d+\.+\d+(\'|\")/i, newString);
125 | }))
126 | .pipe(gulp.dest('js/'))
127 | });
128 |
129 | gulp.task('default', function(){
130 | var server = livereload();
131 | gulp.run('get-current-version');
132 | gulp.watch(paths.src.tests,['coffee:tests']);
133 | gulp.watch(paths.src.css, ['stylus']);
134 | // gulp.watch(paths.src.js, ['coffeeify', 'coffee-lint', 'docs', 'lib']);
135 | // gulp.watch(paths.src.js, [ 'lib', 'babel-lib' ]);
136 | // gulp.watch(paths.src.babel, [ 'lib', 'babel-lib' ]);
137 | gulp.watch(distMoFile, [ 'minify-mo' ]);
138 | // gulp.watch(paths.src.index,['index:jade']);
139 | gulp.watch('package.json', ['update-version']);
140 | });
141 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |