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 item.published --> | |
<button class="publish"> | |
<!-- else --> | |
<button class="unpublish"> | |
<!-- end --> | |
<!-- if item.published --> | |
<button class="publish"> |
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
<html> | |
<body> | |
<script> | |
// ... где-то в твоем общем скриптовом файле | |
// Эта функция проверяет, что юзер заходил более чем number раз, | |
// не чаще чем раз в interval секунд | |
function trackUserVisits(number, interval) { | |
// прочитать количество визитов из куки | |
var visits = document.cookie.match(/;?\s*total-visits-count=([^;]*)/); | |
// прочитать время последнего визита |
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
/ "&" filter:QuerySelectorAllParts* { | |
return grammar.selector().subquery("this", filter); | |
} | |
/ "::" pseudo:ReservedPseudos? filter:QuerySelectorPartChars* { | |
return grammar.selector().subquery(pseudo, null, filter); | |
} | |
/ "(" "&" filter:QuerySelectorPartChars+ query:QuerySubselector? ")" { | |
return grammar.selector().subquery("this", query, filter); | |
} | |
/ "(" "::" pseudo:ReservedPseudos? filter:QuerySubfilter? query:QuerySubselector? ")" { |
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
<section id="cont1" class="cont"> | |
<div id="a1" class="a"></div> | |
<div id="a2" class="a"></div> | |
</section> | |
<style type="text/gss"> | |
[baseline] == 50; | |
(#b1.b)[something] == [baseline] * 2; | |
(#b2.b)[something] == [baseline] * 3; |
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
'$id': (context,sel) => | |
return @bindQueryContext context, "getElementById", sel | |
'$class': (context, selector) => | |
return @bindQueryContext context, "getElementsByClassName", sel | |
'$all': (context, selector) => | |
return @bindQueryContext context, "querySelectorAll", selector | |
'$filter': (context, selector) => |
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 id="parent1" class="active"> | |
<section id="section1"> | |
</section> | |
<div id="div1"> | |
</div> | |
</div> | |
[width]: 100; | |
section { |
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
### | |
Root commands, if bound to a dom query, will spawn commands | |
to match live results of query. | |
### | |
require "./Registry.js" | |
# Commander |
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
type:'constraint', | |
cssText:'(header > h2.a ! body)[target-size] == 100', | |
commands: [ | |
["eq", | |
["get$", | |
"[target-size]", | |
['$combinator', '!', | |
['$combinator', '>' | |
['$tag', 'header'], | |
['$class', |
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 (div.something) { | |
display: block | |
} @else if 2 > 1 { | |
* ! :active { | |
display: flex | |
} | |
} | |
OlderNewer