👁️🗨️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // deploy assets to remote server | |
| gulp.task('deploy', () => { | |
| let sftp = require('gulp-sftp') | |
| return gulp.src(assets + '/**') | |
| .pipe(sftp({ | |
| host: '[remote server ip]', | |
| remotePath: '/www/app/', | |
| user: 'foo', | |
| pass: 'bar' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Lib : http://www.idangero.us/sliders/swiper/ | |
| ver:2.4.3 | |
| <script> | |
| // swiper Slider - Thumb Carousel - author: kien.hnaptech@gmail.com ========================================================== | |
| $(document).ready(function(){ | |
| if($(".swiper-slider-wrapper").length > 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Font Staks | |
| *http://sixrevisions.com/css/css-typography-01/ | |
| * | |
| * Wide sans serif: Verdana, Geneva | |
| Narrow sans serif: Tahoma, Arial, Helvetica | |
| Wide serif: Georgia, Utopia | |
| Narrow serif: Times, Times New Roman | |
| Monospace: Courier, Courier New, Lucida Console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| p – balanced for paragraphs or body copy | |
| t – balanced for headlines or titles | |
| Arial, “Helvetica Neue”, Helvetica, sans-serif - p, t | |
| Baskerville, “Times New Roman”, Times, serif - p Baskerville, Times, “Times New Roman”, serif - t | |
| Cambria, Georgia, Times, “Times New Roman”, serif - p, t | |
| “Century Gothic”, “Apple Gothic”, sans-serif - p, t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function declOfNum(number, titles) { | |
| cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
| } | |
| use: | |
| declOfNum(count, ['найдена', 'найдено', 'найдены']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.6); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .modal{ | |
| position: absolute; | |
| top: 0; | |
| bottom: 0; | |
| right: 0; | |
| left: 0; | |
| margin: auto; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cons(styles) { | |
| if (!cons.initial) cons.initial = console; | |
| var defaultStyles = 'font-family: Arial; font-size: 2em;'; | |
| styles = styles || defaultStyles; | |
| console = { | |
| log: function(str) { cons.initial.log('%c' + str, styles) } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function($){ | |
| var touch = {}, touchTimeout; | |
| function parentIfText(node){ | |
| return 'tagName' in node ? node : node.parentNode; | |
| } | |
| function swipeDirection(x1, x2, y1, y2){ | |
| var xDelta = Math.abs(x1 - x2), yDelta = Math.abs(y1 - y2); | |
| if (xDelta >= yDelta) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Adds the vendor prefixes for calc. | |
| // | |
| // Usage: | |
| // width: calc('30% - 10px'); | |
| // If variables are needed they need to be specified this way. | |
| // width: calc('40% \- %s' % (10px)); | |
| calc() { | |
| // vendors to be used by this function | |
| calc-vendors = webkit moz; |