This file contains 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
$name-class: ".block1"; | |
#{$name-class} { | |
font-size: 100px; | |
&__inner { | |
font-size: 10px; | |
&:before { content: ""; } | |
@at-root #{$name-class}:hover &:before { | |
color: red; |
This file contains 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
<div ng-class="condition ? 'class-if-true' : 'class-if-false'"> |
This file contains 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
<svg shape-rendering="crispEdges" | |
width="100%" height="100%" viewBox="0 0 30 30" version="1.1" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve"> | |
<use xlink:href="#name-icon"></use> | |
</svg> | |
<svg class="icon" width="100%" height="100%" viewBox="0 0 30 30" version="1.1" xmlns="http://www.w3.org/2000/svg" shape-rendering="crispEdges"> |
This file contains 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
<!-- Add class ng-modal --> | |
<input type="text" ng-model="styleOne"> | |
<input type="text" ng-model="styleTwo"> | |
<div ng-class="[styleOne, styleTwo]">Look! I'm Words!</div> | |
<!-- Add the class 'text-success' if the variable 'awesome' is true --> | |
<input type="checkbox" ng-model="awesome"> Are You Awesome? | |
<input type="checkbox" ng-model="giant"> Are You a Giant? | |
<div ng-class="{ 'text-success': awesome, 'text-large': giant }"> | |
This file contains 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
@mobile: ~'@media (max-width: 400px) '; | |
@tablet: ~'@media (max-width: 800px) '; | |
.bp(@rules) { | |
@media @mobile { | |
& .mobile { @rules(); } | |
} | |
} | |
.bp2(@point,@rules) { |
This file contains 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
/* | |
* @param {DOM Element Object} o | |
* @param {String} c name class | |
*/ | |
function addClass(o, c) { | |
var re = new RegExp("(^|\\s)" + c + "(\\s|$)", "g"); | |
if (re.test(o.className)) return | |
o.className = (o.className + " " + c).replace(/\s+/g, " ").replace(/(^ | $)/g, ""); | |
} |
This file contains 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
{ | |
"user": "Ученик", | |
"courses": [ | |
{ | |
"name": "HTML, CSS", | |
"passed": "true" | |
}, | |
{ | |
"name": "JavaScript Essential", | |
"passed": "true" |
This file contains 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
_startTimer(){ | |
this._stopTimer(); | |
let timeSeconds = 1; | |
this._timerInterval = this.$interval(() => { | |
timeSeconds += 1; | |
this.onlineTimeText = this._formatTime(timeSeconds); | |
}, 1000); | |
this.onlineTimeText = this._formatTime(timeSeconds) | |
} | |
_stopTimer(){ |
This file contains 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
if (speciality.id in DescriptionSpeciality) | |
return DescriptionSpeciality[speciality.id]; |
This file contains 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
let a = [1,2,3,4,5,6,3,4,6,6,3,7,8,8,8,4,5,7,4,6]; | |
let object = a.reduce( (current, item) => { | |
current[item] = (current[item] || 0) + 1; | |
return current; | |
}, {}) | |
let arrayValue = Object.keys(object).reduce( (current, item) => { | |
current.push( object[item] ); | |
return current |