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
| watch: { | |
| $route () { | |
| if (this.$route.name !== 'home') { | |
| // document.getElementById('example').style.zIndex = '-999' | |
| } else { | |
| // document.getElementById('example').style.zIndex = '999' | |
| } | |
| } | |
| }, |
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
| // HTML (after form) | |
| <div class="process"> | |
| <div class="loader"> | |
| <div class="sk-fading-circle"> | |
| <div class="sk-circle1 sk-circle"></div> | |
| <div class="sk-circle2 sk-circle"></div> | |
| <div class="sk-circle3 sk-circle"></div> | |
| <div class="sk-circle4 sk-circle"></div> | |
| <div class="sk-circle5 sk-circle"></div> | |
| <div class="sk-circle6 sk-circle"></div> |
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
| // random sort arr | |
| arr.sort(function(){ | |
| return Math.random() > 0.5; | |
| }) | |
| // random number from ... to ... | |
| function mtRandom(min, max){ | |
| let diff = max-min; |
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 default function validateEmail (email) { | |
| const re = /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/ | |
| return re.test(email) | |
| } | |
| // name | |
| export function nameContainsAlpha (value) { |
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-family: | |
| -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; |
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
| //.scrollto - class for tag "a" | |
| // 1000 - time for slowly transition | |
| jQuery(document).ready(function() { | |
| jQuery("a.scrollto").click(function () { | |
| elementClick = jQuery(this).attr("href") | |
| destination = jQuery(elementClick).offset().top; | |
| jQuery("html:not(:animated),body:not(:animated)").animate({scrollTop: destination}, 1000); | |
| return false; | |
| }); | |
| }); |
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
| <!-- html code --> | |
| <div class="news-content">Lorem ipsum dolor sit amet, consectetur adipisicing elit. | |
| Facere nostrum neque quae aliquid magnam quibusdam nesciunt, | |
| totam sit, autem quas accusamus | |
| </div> | |
| // js code | |
| var size = 10, | |
| newsContent= $('.news-content'), | |
| newsText = newsContent.text(); |
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
| // resize - it's a name of @keyframes | |
| h1 | |
| font-size: 48px | |
| animation: resize 1s ease-in-out infinite | |
| // change 'resize' - from 48px to 58px and back to 48px | |
| @keyframes resize | |
| 0% | |
| font-size: 48px | |
| 50% | |
| font-size: 58px |