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
| .ui-scroll | |
| ._bar | |
| ._drag | |
| ._container | |
| Lorem ipsum |
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
| export const declOfNum = (number: number, titles: string[]) => { | |
| const cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[number % 100 > 4 && number % 100 < 20 ? 2 : cases[number % 10 < 5 ? number % 10 : 5]]; | |
| }; |
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
| { | |
| "printWidth": 140, | |
| "tabWidth": 4, | |
| "useTabs": false, | |
| "semi": true, | |
| "singleQuote": true, | |
| "trailingComma": "all", | |
| "bracketSpacing": true, | |
| "jsxBracketSameLine": true, | |
| "arrowParens": "avoid", |
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
| // FAQ Collapse | |
| $('.js-collapse').click(function(e) { | |
| var faqItem = $(this); | |
| var allFaqItem = faqItem.closest('.faq-collapses').find('.faq-collapse'); | |
| var faqCollapse = faqItem.children('.faq-collapse__text'); | |
| var allHelpCollapse = faqItem | |
| .closest('.faq-collapses') | |
| .find('.faq-collapse__text'); | |
| if ( |
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
| // tabs toggle | |
| $('.tabs__link').click(function(e) { | |
| e.preventDefault(); | |
| let tabs = $(this).closest('.tabs'); | |
| let btns = tabs.find('.tabs__link'); | |
| let contents = tabs.find('.tab__content'); | |
| let tabID = $(this).attr('href'); | |
| // Toggle btn |
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
| // Renders | |
| const nextArrow = '<svg class="icon icon--next"><use xlink:href="img/svg-sprite.svg#next"></use></svg>'; | |
| $('#renders').owlCarousel({ | |
| loop: false, | |
| margin: 0, | |
| nav: true, | |
| items: 1, | |
| smartSpeed: 900, | |
| navSpeed: 900, |
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
| mixin pagination(pages) | |
| - var i = 2; | |
| .b-pagination | |
| ul._list | |
| li._item | |
| a(href="#")._link Prev | |
| li._item.-active | |
| span._link 1 | |
| while i < pages + 1 |
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
| $(window).scroll(function() { | |
| let nextID = $('.case-intro').attr('next-case-id'); | |
| let windowScrollTop = $(window).scrollTop(); | |
| let windowHeight = $(window).height(); | |
| let docHeight = $(document).height(); | |
| if (windowScrollTop >= docHeight - windowHeight) { | |
| nextCase(nextID); | |
| } | |
| }); |
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 tween(selector, from, to) { | |
| $({p: from}).animate({p: to}, { | |
| duration: 800, | |
| easing: 'linear', | |
| step: function (a) { | |
| selector.html(Math.ceil(a) + '%'); | |
| } | |
| }); | |
| } |
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 detectBrowser(){ | |
| let N = navigator.appName, ua= navigator.userAgent, tem; | |
| let M = ua.match(/(opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i); | |
| if(M && (tem= ua.match(/version\/([\.\d]+)/i))!= null) M[2]= tem[1]; | |
| M = M? [M[1], M[2]]: [N, navigator.appVersion,'-?']; | |
| return M; | |
| } |
NewerOlder