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 generate = function(sChapters, sPrefix, nFrom) { | |
var output1 = '', output2 = ''; | |
var prefix = sPrefix || ''; | |
var from = parseInt(nFrom) || 1; | |
var temp; | |
for (var i = 0; i < sChapters.length; i++) { | |
temp = prefix + (nFrom + i) + '. ' + sChapters[i]; | |
output1 += temp + '\n'; | |
output2 += '/\u002A---------- ' + temp + ' ----------\u002A/' + '\n'; |
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
.toggle-btn | |
$time = .2s | |
$sz_item = 4px | |
$ofs = 10px | |
$gut_ver = 4px | |
// $sz_hor = 26px | |
$sz_hor = 50px | |
$sz_ver = $sz_item * 3 + 2 * $ofs + 2 * $gut_ver | |
$color = #f00 |
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
// copied from https://gist.github.com/davidmerrique/4066808 | |
var inFolder = Folder.selectDialog("Please select folder to process"); | |
var defaults = { | |
type: "w", | |
quality: 50, | |
sizes: [1680, 1000, 640] | |
}; |
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
.zero-centered { | |
/* get sure that width and height declared */ | |
/* this is useful for images */ | |
max-width: 100%; | |
max-height: 100%; | |
width: auto; | |
height: auto; | |
/* main part */ |
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
// @2x Images (Pixel Ratio of 1.25+) | |
$retina2x = "only screen and (-o-min-device-pixel-ratio: 5/4), only screen and (-webkit-min-device-pixel-ratio: 1.25), only screen and (min-device-pixel-ratio: 1.25), only screen and (min-resolution: 1.25dppx)" | |
// @3x Images (Pixel Ratio of 2.25+) | |
$retina3x = "only screen and (-o-min-device-pixel-ratio: 9/4), only screen and (-webkit-min-device-pixel-ratio: 2.25), only screen and (min-device-pixel-ratio: 2.25), only screen and (min-resolution: 2.25dppx)" |
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
$breakpoint = { | |
tablet : 640px, | |
laptop : 1000px, | |
desk : 1260px, | |
large : 1600px | |
} | |
$media = { | |
mobile : "(max-width: "+unit(($breakpoint.tablet - 1), 'px')+")", | |
tablet : "(min-width: "+unit($breakpoint.tablet, 'px')+") and (max-width: "+unit(($breakpoint.laptop - 1), 'px')+")", |
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
/** | |
* http://habrahabr.ru/post/105428/ | |
* Функция возвращает окончание для множественного числа слова на основании числа и массива окончаний | |
* @param iNumber Integer Число на основе которого нужно сформировать окончание | |
* @param aEndings Array Массив слов или окончаний для чисел (1, 4, 5), | |
* например ['яблоко', 'яблока', 'яблок'] | |
* @return String | |
*/ | |
function getNumEnding(iNumber, aEndings) | |
{ |
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
<!--The idea is to load base64-encoded 1px transparent gif for some media queries--> | |
<picture> | |
<source media="(max-width: 759px)" srcset="data:image/gifbase64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="> | |
<img src="image.png" srcset="[email protected] 2x, [email protected] 3x" height="100" width="100" alt="image"> | |
</picture> | |
<picture> | |
<source srcset="{{img}}" media="(min-width: 768px)" /> | |
<img srcset="data:image/gifbase64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="{{title}}" width="110" height="110" /> | |
</picture> |
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
<h1>Heading</h1> | |
<h1>This is a longer heading</h1> |