stylin 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/Rakefile +21 -0
- data/app/assets/javascripts/stylin/application.js +4 -0
- data/app/assets/javascripts/stylin/highlight.pack.js +1 -0
- data/app/assets/javascripts/stylin/kss.js +54 -0
- data/app/assets/javascripts/stylin/styleguides.js +2 -0
- data/app/assets/stylesheets/stylin/_header.scss +12 -0
- data/app/assets/stylesheets/stylin/_navigation.css.scss +12 -0
- data/app/assets/stylesheets/stylin/application.css.scss +5 -0
- data/app/assets/stylesheets/stylin/highlight/arta.css +160 -0
- data/app/assets/stylesheets/stylin/highlight/ascetic.css +50 -0
- data/app/assets/stylesheets/stylin/highlight/brown_paper.css +105 -0
- data/app/assets/stylesheets/stylin/highlight/dark.css +105 -0
- data/app/assets/stylesheets/stylin/highlight/default.css +153 -0
- data/app/assets/stylesheets/stylin/highlight/docco.css +132 -0
- data/app/assets/stylesheets/stylin/highlight/far.css +113 -0
- data/app/assets/stylesheets/stylin/highlight/foundation.css +133 -0
- data/app/assets/stylesheets/stylin/highlight/github.css +125 -0
- data/app/assets/stylesheets/stylin/highlight/googlecode.css +147 -0
- data/app/assets/stylesheets/stylin/highlight/idea.css +122 -0
- data/app/assets/stylesheets/stylin/highlight/ir_black.css +105 -0
- data/app/assets/stylesheets/stylin/highlight/magula.css +123 -0
- data/app/assets/stylesheets/stylin/highlight/mono-blue.css +62 -0
- data/app/assets/stylesheets/stylin/highlight/monokai.css +127 -0
- data/app/assets/stylesheets/stylin/highlight/monokai_sublime.css +149 -0
- data/app/assets/stylesheets/stylin/highlight/obsidian.css +154 -0
- data/app/assets/stylesheets/stylin/highlight/pojoaque.css +106 -0
- data/app/assets/stylesheets/stylin/highlight/railscasts.css +182 -0
- data/app/assets/stylesheets/stylin/highlight/rainbow.css +112 -0
- data/app/assets/stylesheets/stylin/highlight/school_book.css +113 -0
- data/app/assets/stylesheets/stylin/highlight/solarized_dark.css +107 -0
- data/app/assets/stylesheets/stylin/highlight/solarized_light.css +107 -0
- data/app/assets/stylesheets/stylin/highlight/sunburst.css +160 -0
- data/app/assets/stylesheets/stylin/highlight/tomorrow-night-blue.css +93 -0
- data/app/assets/stylesheets/stylin/highlight/tomorrow-night-bright.css +92 -0
- data/app/assets/stylesheets/stylin/highlight/tomorrow-night-eighties.css +92 -0
- data/app/assets/stylesheets/stylin/highlight/tomorrow-night.css +93 -0
- data/app/assets/stylesheets/stylin/highlight/tomorrow.css +90 -0
- data/app/assets/stylesheets/stylin/highlight/vs.css +89 -0
- data/app/assets/stylesheets/stylin/highlight/xcode.css +158 -0
- data/app/assets/stylesheets/stylin/highlight/zenburn.css +117 -0
- data/app/assets/stylesheets/stylin/styleguides.css.scss +106 -0
- data/app/controllers/stylin/application_controller.rb +11 -0
- data/app/controllers/stylin/styleguides_controller.rb +13 -0
- data/app/helpers/stylin/application_helper.rb +4 -0
- data/app/helpers/stylin/navigation_helper.rb +50 -0
- data/app/helpers/stylin/styleguides_helper.rb +29 -0
- data/app/models/styleguide.rb +69 -0
- data/app/views/layouts/stylin/_navigation.html.erb +3 -0
- data/app/views/layouts/stylin/application.html.erb +26 -0
- data/app/views/stylin/styleguides/_section.html.erb +31 -0
- data/app/views/stylin/styleguides/index.html.erb +5 -0
- data/app/views/stylin/styleguides/show.html.erb +3 -0
- data/config/routes.rb +5 -0
- data/lib/generators/stylin/install_generator.rb +12 -0
- data/lib/generators/stylin/views_generator.rb +10 -0
- data/lib/generators/templates/stylin.yml +7 -0
- data/lib/generators/templates/views/layouts/stylin/_navigation.html.erb +3 -0
- data/lib/generators/templates/views/layouts/stylin/application.html.erb +23 -0
- data/lib/generators/templates/views/stylin/styleguides/_section.html.erb +30 -0
- data/lib/generators/templates/views/stylin/styleguides/index.html.erb +5 -0
- data/lib/generators/templates/views/stylin/styleguides/show.html.erb +3 -0
- data/lib/stylin.rb +8 -0
- data/lib/stylin/engine.rb +37 -0
- data/lib/stylin/version.rb +3 -0
- data/lib/tasks/stylin_tasks.rake +12 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css.scss +1 -0
- data/spec/dummy/app/assets/stylesheets/buttons.css +51 -0
- data/spec/dummy/app/assets/stylesheets/forms.css +51 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/styleguides/buttons.html +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +23 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/stylin.yml +3 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/production.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +16 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +4143 -0
- data/spec/dummy/log/production.log +4 -0
- data/spec/dummy/log/test.log +380 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/models/styleguide_spec.rb +55 -0
- data/spec/spec_helper.rb +22 -0
- metadata +327 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 CriticalJuncture
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
8
|
+
|
9
|
+
load 'rails/tasks/engine.rake'
|
10
|
+
|
11
|
+
Bundler::GemHelper.install_tasks
|
12
|
+
Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each {|f| load f }
|
13
|
+
|
14
|
+
require 'rspec/core'
|
15
|
+
require 'rspec/core/rake_task'
|
16
|
+
|
17
|
+
desc "Run all specs in spec directory (excluding plugin specs)"
|
18
|
+
|
19
|
+
RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
|
20
|
+
|
21
|
+
task :default => :spec
|
@@ -0,0 +1 @@
|
|
1
|
+
var hljs=new function(){function k(v){return v.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+k(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T<V.c.length;T++){if(i(V.c[T].bR,U)){return V.c[T]}}}function z(U,T){if(i(U.eR,T)){return U}if(U.eW){return z(U.parent,T)}}function A(T,U){return !J&&i(U.iR,T)}function E(V,T){var U=M.cI?T[0].toLowerCase():T[0];return V.k.hasOwnProperty(U)&&V.k[U]}function w(Z,X,W,V){var T=V?"":b.classPrefix,U='<span class="'+T,Y=W?"":"</span>";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:k(L)}}else{throw O}}}function g(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:k(y)};var w=v;x.forEach(function(z){if(!j(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function h(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(z){var y=d(z);var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):g(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=h(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function e(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function j(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=g;this.fixMarkup=h;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=e;this.getLanguage=j;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/</,r:0,c:[d,{cN:"attribute",b:c,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("coffeescript",function(c){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"};var a="[A-Za-z$_][0-9A-Za-z$_]*";var f=c.inherit(c.TM,{b:a});var e={cN:"subst",b:/#\{/,e:/}/,k:b};var d=[c.BNM,c.inherit(c.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[c.BE]},{b:/'/,e:/'/,c:[c.BE]},{b:/"""/,e:/"""/,c:[c.BE,e]},{b:/"/,e:/"/,c:[c.BE,e]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[e,c.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+a},{b:"`",e:"`",eB:true,eE:true,sL:"javascript"}];e.c=d;return{k:b,c:d.concat([{cN:"comment",b:"###",e:"###"},c.HCM,{cN:"function",b:"("+a+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:true,c:[f,{cN:"params",b:"\\(",rB:true,c:[{b:/\(/,e:/\)/,k:b,c:["self"].concat(d)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:true,i:/[:="\[\]]/,c:[f]},f]},{cN:"attribute",b:a+":",e:":",rB:true,eE:true,r:0}])}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}});hljs.registerLanguage("apache",function(a){var b={cN:"number",b:"[\\$%]\\d+"};return{cI:true,c:[a.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",b]},b,a.QSM]}}],i:/\S/}});
|
@@ -0,0 +1,54 @@
|
|
1
|
+
// Generated by CoffeeScript 1.6.3
|
2
|
+
(function() {
|
3
|
+
var KssStateGenerator;
|
4
|
+
|
5
|
+
KssStateGenerator = (function() {
|
6
|
+
var psuedo_selectors;
|
7
|
+
|
8
|
+
psuedo_selectors = ['hover', 'enabled', 'disabled', 'active', 'visited', 'focus', 'target', 'checked', 'empty', 'first-of-type', 'last-of-type', 'first-child', 'last-child'];
|
9
|
+
|
10
|
+
function KssStateGenerator() {
|
11
|
+
var idx, idxs, pseudos, replaceRule, rule, stylesheet, _i, _j, _len, _len1, _ref, _ref1;
|
12
|
+
pseudos = new RegExp("(\\:" + (psuedo_selectors.join('|\\:')) + ")", "g");
|
13
|
+
try {
|
14
|
+
_ref = document.styleSheets;
|
15
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
16
|
+
stylesheet = _ref[_i];
|
17
|
+
if (stylesheet.href && stylesheet.href.indexOf(document.domain) >= 0) {
|
18
|
+
idxs = [];
|
19
|
+
_ref1 = stylesheet.cssRules;
|
20
|
+
for (idx = _j = 0, _len1 = _ref1.length; _j < _len1; idx = ++_j) {
|
21
|
+
rule = _ref1[idx];
|
22
|
+
if ((rule.type === CSSRule.STYLE_RULE) && pseudos.test(rule.selectorText)) {
|
23
|
+
replaceRule = function(matched, stuff) {
|
24
|
+
return matched.replace(/\:/g, '.pseudo-class-');
|
25
|
+
};
|
26
|
+
this.insertRule(rule.cssText.replace(pseudos, replaceRule));
|
27
|
+
}
|
28
|
+
pseudos.lastIndex = 0;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
} catch (_error) {}
|
33
|
+
}
|
34
|
+
|
35
|
+
KssStateGenerator.prototype.insertRule = function(rule) {
|
36
|
+
var headEl, styleEl;
|
37
|
+
headEl = document.getElementsByTagName('head')[0];
|
38
|
+
styleEl = document.createElement('style');
|
39
|
+
styleEl.type = 'text/css';
|
40
|
+
if (styleEl.styleSheet) {
|
41
|
+
styleEl.styleSheet.cssText = rule;
|
42
|
+
} else {
|
43
|
+
styleEl.appendChild(document.createTextNode(rule));
|
44
|
+
}
|
45
|
+
return headEl.appendChild(styleEl);
|
46
|
+
};
|
47
|
+
|
48
|
+
return KssStateGenerator;
|
49
|
+
|
50
|
+
})();
|
51
|
+
|
52
|
+
new KssStateGenerator;
|
53
|
+
|
54
|
+
}).call(this);
|
@@ -0,0 +1,160 @@
|
|
1
|
+
/*
|
2
|
+
Date: 17.V.2011
|
3
|
+
Author: pumbur <pumbur@pumbur.net>
|
4
|
+
*/
|
5
|
+
|
6
|
+
.hljs
|
7
|
+
{
|
8
|
+
display: block; padding: 0.5em;
|
9
|
+
background: #222;
|
10
|
+
}
|
11
|
+
|
12
|
+
.profile .hljs-header *,
|
13
|
+
.ini .hljs-title,
|
14
|
+
.nginx .hljs-title
|
15
|
+
{
|
16
|
+
color: #fff;
|
17
|
+
}
|
18
|
+
|
19
|
+
.hljs-comment,
|
20
|
+
.hljs-javadoc,
|
21
|
+
.hljs-preprocessor,
|
22
|
+
.hljs-preprocessor .hljs-title,
|
23
|
+
.hljs-pragma,
|
24
|
+
.hljs-shebang,
|
25
|
+
.profile .hljs-summary,
|
26
|
+
.diff,
|
27
|
+
.hljs-pi,
|
28
|
+
.hljs-doctype,
|
29
|
+
.hljs-tag,
|
30
|
+
.hljs-template_comment,
|
31
|
+
.css .hljs-rules,
|
32
|
+
.tex .hljs-special
|
33
|
+
{
|
34
|
+
color: #444;
|
35
|
+
}
|
36
|
+
|
37
|
+
.hljs-string,
|
38
|
+
.hljs-symbol,
|
39
|
+
.diff .hljs-change,
|
40
|
+
.hljs-regexp,
|
41
|
+
.xml .hljs-attribute,
|
42
|
+
.smalltalk .hljs-char,
|
43
|
+
.xml .hljs-value,
|
44
|
+
.ini .hljs-value,
|
45
|
+
.clojure .hljs-attribute,
|
46
|
+
.coffeescript .hljs-attribute
|
47
|
+
{
|
48
|
+
color: #ffcc33;
|
49
|
+
}
|
50
|
+
|
51
|
+
.hljs-number,
|
52
|
+
.hljs-addition
|
53
|
+
{
|
54
|
+
color: #00cc66;
|
55
|
+
}
|
56
|
+
|
57
|
+
.hljs-built_in,
|
58
|
+
.hljs-literal,
|
59
|
+
.vhdl .hljs-typename,
|
60
|
+
.go .hljs-constant,
|
61
|
+
.go .hljs-typename,
|
62
|
+
.ini .hljs-keyword,
|
63
|
+
.lua .hljs-title,
|
64
|
+
.perl .hljs-variable,
|
65
|
+
.php .hljs-variable,
|
66
|
+
.mel .hljs-variable,
|
67
|
+
.django .hljs-variable,
|
68
|
+
.css .funtion,
|
69
|
+
.smalltalk .method,
|
70
|
+
.hljs-hexcolor,
|
71
|
+
.hljs-important,
|
72
|
+
.hljs-flow,
|
73
|
+
.hljs-inheritance,
|
74
|
+
.parser3 .hljs-variable
|
75
|
+
{
|
76
|
+
color: #32AAEE;
|
77
|
+
}
|
78
|
+
|
79
|
+
.hljs-keyword,
|
80
|
+
.hljs-tag .hljs-title,
|
81
|
+
.css .hljs-tag,
|
82
|
+
.css .hljs-class,
|
83
|
+
.css .hljs-id,
|
84
|
+
.css .hljs-pseudo,
|
85
|
+
.css .hljs-attr_selector,
|
86
|
+
.lisp .hljs-title,
|
87
|
+
.clojure .hljs-built_in,
|
88
|
+
.hljs-winutils,
|
89
|
+
.tex .hljs-command,
|
90
|
+
.hljs-request,
|
91
|
+
.hljs-status
|
92
|
+
{
|
93
|
+
color: #6644aa;
|
94
|
+
}
|
95
|
+
|
96
|
+
.hljs-title,
|
97
|
+
.ruby .hljs-constant,
|
98
|
+
.vala .hljs-constant,
|
99
|
+
.hljs-parent,
|
100
|
+
.hljs-deletion,
|
101
|
+
.hljs-template_tag,
|
102
|
+
.css .hljs-keyword,
|
103
|
+
.objectivec .hljs-class .hljs-id,
|
104
|
+
.smalltalk .hljs-class,
|
105
|
+
.lisp .hljs-keyword,
|
106
|
+
.apache .hljs-tag,
|
107
|
+
.nginx .hljs-variable,
|
108
|
+
.hljs-envvar,
|
109
|
+
.bash .hljs-variable,
|
110
|
+
.go .hljs-built_in,
|
111
|
+
.vbscript .hljs-built_in,
|
112
|
+
.lua .hljs-built_in,
|
113
|
+
.rsl .hljs-built_in,
|
114
|
+
.tail,
|
115
|
+
.avrasm .hljs-label,
|
116
|
+
.tex .hljs-formula,
|
117
|
+
.tex .hljs-formula *
|
118
|
+
{
|
119
|
+
color: #bb1166;
|
120
|
+
}
|
121
|
+
|
122
|
+
.hljs-yardoctag,
|
123
|
+
.hljs-phpdoc,
|
124
|
+
.profile .hljs-header,
|
125
|
+
.ini .hljs-title,
|
126
|
+
.apache .hljs-tag,
|
127
|
+
.parser3 .hljs-title
|
128
|
+
{
|
129
|
+
font-weight: bold;
|
130
|
+
}
|
131
|
+
|
132
|
+
.coffeescript .javascript,
|
133
|
+
.javascript .xml,
|
134
|
+
.tex .hljs-formula,
|
135
|
+
.xml .javascript,
|
136
|
+
.xml .vbscript,
|
137
|
+
.xml .css,
|
138
|
+
.xml .hljs-cdata
|
139
|
+
{
|
140
|
+
opacity: 0.6;
|
141
|
+
}
|
142
|
+
|
143
|
+
.hljs,
|
144
|
+
.javascript,
|
145
|
+
.css,
|
146
|
+
.xml,
|
147
|
+
.hljs-subst,
|
148
|
+
.diff .hljs-chunk,
|
149
|
+
.css .hljs-value,
|
150
|
+
.css .hljs-attribute,
|
151
|
+
.lisp .hljs-string,
|
152
|
+
.lisp .hljs-number,
|
153
|
+
.tail .hljs-params,
|
154
|
+
.hljs-container,
|
155
|
+
.haskell *,
|
156
|
+
.erlang *,
|
157
|
+
.erlang_repl *
|
158
|
+
{
|
159
|
+
color: #aaa;
|
160
|
+
}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
|
4
|
+
|
5
|
+
*/
|
6
|
+
|
7
|
+
.hljs {
|
8
|
+
display: block; padding: 0.5em;
|
9
|
+
background: white; color: black;
|
10
|
+
}
|
11
|
+
|
12
|
+
.hljs-string,
|
13
|
+
.hljs-tag .hljs-value,
|
14
|
+
.hljs-filter .hljs-argument,
|
15
|
+
.hljs-addition,
|
16
|
+
.hljs-change,
|
17
|
+
.apache .hljs-tag,
|
18
|
+
.apache .hljs-cbracket,
|
19
|
+
.nginx .hljs-built_in,
|
20
|
+
.tex .hljs-formula {
|
21
|
+
color: #888;
|
22
|
+
}
|
23
|
+
|
24
|
+
.hljs-comment,
|
25
|
+
.hljs-template_comment,
|
26
|
+
.hljs-shebang,
|
27
|
+
.hljs-doctype,
|
28
|
+
.hljs-pi,
|
29
|
+
.hljs-javadoc,
|
30
|
+
.hljs-deletion,
|
31
|
+
.apache .hljs-sqbracket {
|
32
|
+
color: #CCC;
|
33
|
+
}
|
34
|
+
|
35
|
+
.hljs-keyword,
|
36
|
+
.hljs-tag .hljs-title,
|
37
|
+
.ini .hljs-title,
|
38
|
+
.lisp .hljs-title,
|
39
|
+
.clojure .hljs-title,
|
40
|
+
.http .hljs-title,
|
41
|
+
.nginx .hljs-title,
|
42
|
+
.css .hljs-tag,
|
43
|
+
.hljs-winutils,
|
44
|
+
.hljs-flow,
|
45
|
+
.apache .hljs-tag,
|
46
|
+
.tex .hljs-command,
|
47
|
+
.hljs-request,
|
48
|
+
.hljs-status {
|
49
|
+
font-weight: bold;
|
50
|
+
}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
|
4
|
+
|
5
|
+
*/
|
6
|
+
|
7
|
+
.hljs {
|
8
|
+
display: block; padding: 0.5em;
|
9
|
+
background:#b7a68e url(./brown_papersq.png);
|
10
|
+
}
|
11
|
+
|
12
|
+
.hljs-keyword,
|
13
|
+
.hljs-literal,
|
14
|
+
.hljs-change,
|
15
|
+
.hljs-winutils,
|
16
|
+
.hljs-flow,
|
17
|
+
.lisp .hljs-title,
|
18
|
+
.clojure .hljs-built_in,
|
19
|
+
.nginx .hljs-title,
|
20
|
+
.tex .hljs-special,
|
21
|
+
.hljs-request,
|
22
|
+
.hljs-status {
|
23
|
+
color:#005599;
|
24
|
+
font-weight:bold;
|
25
|
+
}
|
26
|
+
|
27
|
+
.hljs,
|
28
|
+
.hljs-subst,
|
29
|
+
.hljs-tag .hljs-keyword {
|
30
|
+
color: #363C69;
|
31
|
+
}
|
32
|
+
|
33
|
+
.hljs-string,
|
34
|
+
.hljs-title,
|
35
|
+
.haskell .hljs-type,
|
36
|
+
.hljs-tag .hljs-value,
|
37
|
+
.css .hljs-rules .hljs-value,
|
38
|
+
.hljs-preprocessor,
|
39
|
+
.hljs-pragma,
|
40
|
+
.ruby .hljs-symbol,
|
41
|
+
.ruby .hljs-symbol .hljs-string,
|
42
|
+
.ruby .hljs-class .hljs-parent,
|
43
|
+
.hljs-built_in,
|
44
|
+
.sql .hljs-aggregate,
|
45
|
+
.django .hljs-template_tag,
|
46
|
+
.django .hljs-variable,
|
47
|
+
.smalltalk .hljs-class,
|
48
|
+
.hljs-javadoc,
|
49
|
+
.ruby .hljs-string,
|
50
|
+
.django .hljs-filter .hljs-argument,
|
51
|
+
.smalltalk .hljs-localvars,
|
52
|
+
.smalltalk .hljs-array,
|
53
|
+
.hljs-attr_selector,
|
54
|
+
.hljs-pseudo,
|
55
|
+
.hljs-addition,
|
56
|
+
.hljs-stream,
|
57
|
+
.hljs-envvar,
|
58
|
+
.apache .hljs-tag,
|
59
|
+
.apache .hljs-cbracket,
|
60
|
+
.tex .hljs-number {
|
61
|
+
color: #2C009F;
|
62
|
+
}
|
63
|
+
|
64
|
+
.hljs-comment,
|
65
|
+
.java .hljs-annotation,
|
66
|
+
.python .hljs-decorator,
|
67
|
+
.hljs-template_comment,
|
68
|
+
.hljs-pi,
|
69
|
+
.hljs-doctype,
|
70
|
+
.hljs-deletion,
|
71
|
+
.hljs-shebang,
|
72
|
+
.apache .hljs-sqbracket,
|
73
|
+
.nginx .hljs-built_in,
|
74
|
+
.tex .hljs-formula {
|
75
|
+
color: #802022;
|
76
|
+
}
|
77
|
+
|
78
|
+
.hljs-keyword,
|
79
|
+
.hljs-literal,
|
80
|
+
.css .hljs-id,
|
81
|
+
.hljs-phpdoc,
|
82
|
+
.hljs-title,
|
83
|
+
.haskell .hljs-type,
|
84
|
+
.vbscript .hljs-built_in,
|
85
|
+
.sql .hljs-aggregate,
|
86
|
+
.rsl .hljs-built_in,
|
87
|
+
.smalltalk .hljs-class,
|
88
|
+
.diff .hljs-header,
|
89
|
+
.hljs-chunk,
|
90
|
+
.hljs-winutils,
|
91
|
+
.bash .hljs-variable,
|
92
|
+
.apache .hljs-tag,
|
93
|
+
.tex .hljs-command {
|
94
|
+
font-weight: bold;
|
95
|
+
}
|
96
|
+
|
97
|
+
.coffeescript .javascript,
|
98
|
+
.javascript .xml,
|
99
|
+
.tex .hljs-formula,
|
100
|
+
.xml .javascript,
|
101
|
+
.xml .vbscript,
|
102
|
+
.xml .css,
|
103
|
+
.xml .hljs-cdata {
|
104
|
+
opacity: 0.8;
|
105
|
+
}
|