├── README.md ├── includes └── highlight │ ├── CHANGES.md │ ├── LICENSE │ ├── README.md │ ├── README.ru.md │ ├── highlight.pack.js │ └── styles │ ├── arta.css │ ├── ascetic.css │ ├── atelier-dune.dark.css │ ├── atelier-dune.light.css │ ├── atelier-forest.dark.css │ ├── atelier-forest.light.css │ ├── atelier-heath.dark.css │ ├── atelier-heath.light.css │ ├── atelier-lakeside.dark.css │ ├── atelier-lakeside.light.css │ ├── atelier-seaside.dark.css │ ├── atelier-seaside.light.css │ ├── brown_paper.css │ ├── brown_papersq.png │ ├── dark.css │ ├── default.css │ ├── docco.css │ ├── far.css │ ├── foundation.css │ ├── github.css │ ├── googlecode.css │ ├── idea.css │ ├── ir_black.css │ ├── magula.css │ ├── mono-blue.css │ ├── monokai.css │ ├── monokai_sublime.css │ ├── obsidian.css │ ├── paraiso.dark.css │ ├── paraiso.light.css │ ├── pojoaque.css │ ├── pojoaque.jpg │ ├── railscasts.css │ ├── rainbow.css │ ├── school_book.css │ ├── school_book.png │ ├── solarized_dark.css │ ├── solarized_light.css │ ├── sunburst.css │ ├── tomorrow-night-blue.css │ ├── tomorrow-night-bright.css │ ├── tomorrow-night-eighties.css │ ├── tomorrow-night.css │ ├── tomorrow.css │ ├── vs.css │ ├── xcode.css │ └── zenburn.css ├── index.php ├── screenshot-media-library.png ├── screenshot.png ├── script.js ├── sections ├── Introduction │ └── index.php ├── Old Media Modal │ └── index.php ├── attachment_fields_to_edit │ └── index.php ├── wp.Backbone.View │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media() │ └── index.php ├── wp.media.controller.Region │ ├── examples │ │ ├── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ │ └── 2 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media.controller.State │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media.controller.StateMachine │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media.events │ └── index.php ├── wp.media.view.MediaFrame.Post │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media.view.MediaFrame.Select │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media.view.Modal │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media.view.PriorityList │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php ├── wp.media.view.UploaderWindow │ ├── examples │ │ └── 1 │ │ │ ├── index.php │ │ │ ├── script.js │ │ │ └── style.css │ └── index.php └── wp.media │ └── index.php ├── style.css └── templates ├── 404.php ├── menu.php ├── section.php └── template.php /README.md: -------------------------------------------------------------------------------- 1 | WordPress Media Javascript Guide 2 | ============================== 3 | 4 | Enabling this WordPress plugin will create a top-level admin page "Media Guide," where you'll find documentation on Javascript design patterns and reusable elements from the media experience. 5 | 6 | ![A screenshot of the plugin](/screenshot.png?raw=true "Example of documentation") -------------------------------------------------------------------------------- /includes/highlight/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /includes/highlight/README.md: -------------------------------------------------------------------------------- 1 | # Highlight.js 2 | 3 | Highlight.js highlights syntax in code examples on blogs, forums and, 4 | in fact, on any web page. It's very easy to use because it works 5 | automatically: finds blocks of code, detects a language, highlights it. 6 | 7 | Autodetection can be fine tuned when it fails by itself (see "Heuristics"). 8 | 9 | 10 | ## Basic usage 11 | 12 | Link the library and a stylesheet from your page and hook highlighting to 13 | the page load event: 14 | 15 | ```html 16 | 17 | 18 | 19 | ``` 20 | 21 | This will highlight all code on the page marked up as `
 .. 
`. 22 | If you use different markup or need to apply highlighting dynamically, read 23 | "Custom initialization" below. 24 | 25 | - You can download your own customized version of "highlight.pack.js" or 26 | use the hosted one as described on the download page: 27 | 28 | 29 | - Style themes are available in the download package or as hosted files. 30 | To create a custom style for your site see the class reference in the file 31 | [CSS classes reference][cr] from the downloaded package. 32 | 33 | [cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html 34 | 35 | 36 | ## node.js 37 | 38 | Highlight.js can be used under node.js. The package with all supported languages is 39 | installable from NPM: 40 | 41 | npm install highlight.js 42 | 43 | Alternatively, you can build it from the source with only languages you need: 44 | 45 | python3 tools/build.py -tnode lang1 lang2 .. 46 | 47 | Using the library: 48 | 49 | ```javascript 50 | var hljs = require('highlight.js'); 51 | 52 | // If you know the language 53 | hljs.highlight(lang, code).value; 54 | 55 | // Automatic language detection 56 | hljs.highlightAuto(code).value; 57 | ``` 58 | 59 | 60 | ## AMD 61 | 62 | Highlight.js can be used with an AMD loader. You will need to build it from 63 | source in order to do so: 64 | 65 | ```bash 66 | $ python3 tools/build.py -tamd lang1 lang2 .. 67 | ``` 68 | 69 | Which will generate a `build/highlight.pack.js` which will load as an AMD 70 | module with support for the built languages and can be used like so: 71 | 72 | ```javascript 73 | require(["highlight.js/build/highlight.pack"], function(hljs){ 74 | 75 | // If you know the language 76 | hljs.highlight(lang, code).value; 77 | 78 | // Automatic language detection 79 | hljs.highlightAuto(code).value; 80 | }); 81 | ``` 82 | 83 | 84 | ## Tab replacement 85 | 86 | You can replace TAB ('\x09') characters used for indentation in your code 87 | with some fixed number of spaces or with a `` to give them special 88 | styling: 89 | 90 | ```html 91 | 98 | ``` 99 | 100 | ## Custom initialization 101 | 102 | If you use different markup for code blocks you can initialize them manually 103 | with `highlightBlock(code)` function. It takes a DOM element containing the 104 | code to highlight and optionally a string with which to replace TAB 105 | characters. 106 | 107 | Initialization using, for example, jQuery might look like this: 108 | 109 | ```javascript 110 | $(document).ready(function() { 111 | $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); 112 | }); 113 | ``` 114 | 115 | You can use `highlightBlock` to highlight blocks dynamically inserted into 116 | the page. Just make sure you don't do it twice for already highlighted 117 | blocks. 118 | 119 | If your code container relies on `
` tags instead of line breaks (i.e. if 120 | it's not `
`) set the `useBR` option to `true`:
121 | 
122 | ```javascript
123 | hljs.configure({useBR: true});
124 | $('div.code').each(function(i, e) {hljs.highlightBlock(e)});
125 | ```
126 | 
127 | 
128 | ## Heuristics
129 | 
130 | Autodetection of a code's language is done using a simple heuristic:
131 | the program tries to highlight a fragment with all available languages and
132 | counts all syntactic structures that it finds along the way. The language
133 | with greatest count wins.
134 | 
135 | This means that in short fragments the probability of an error is high
136 | (and it really happens sometimes). In this cases you can set the fragment's
137 | language explicitly by assigning a class to the `` element:
138 | 
139 | ```html
140 | 
...
141 | ``` 142 | 143 | You can use class names recommended in HTML5: "language-html", 144 | "language-php". Classes also can be assigned to the `
` element.
145 | 
146 | To disable highlighting of a fragment altogether use "no-highlight" class:
147 | 
148 | ```html
149 | 
...
150 | ``` 151 | 152 | 153 | ## Export 154 | 155 | File export.html contains a little program that allows you to paste in a code 156 | snippet and then copy and paste the resulting HTML code generated by the 157 | highlighter. This is useful in situations when you can't use the script itself 158 | on a site. 159 | 160 | 161 | ## Meta 162 | 163 | - Version: 8.0 164 | - URL: http://highlightjs.org/ 165 | 166 | For the license terms see LICENSE files. 167 | For authors and contributors see AUTHORS.en.txt file. 168 | -------------------------------------------------------------------------------- /includes/highlight/README.ru.md: -------------------------------------------------------------------------------- 1 | # Highlight.js 2 | 3 | Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах, 4 | форумах и вообще на любых веб-страницах. Пользоваться им очень просто, 5 | потому что работает он автоматически: сам находит блоки кода, сам 6 | определяет язык, сам подсвечивает. 7 | 8 | Автоопределением языка можно управлять, когда оно не справляется само (см. 9 | дальше "Эвристика"). 10 | 11 | 12 | ## Простое использование 13 | 14 | Подключите библиотеку и стиль на страницу и повесть вызов подсветки на 15 | загрузку страницы: 16 | 17 | ```html 18 | 19 | 20 | 21 | ``` 22 | 23 | Весь код на странице, обрамлённый в теги `
 .. 
` 24 | будет автоматически подсвечен. Если вы используете другие теги или хотите 25 | подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже. 26 | 27 | - Вы можете скачать собственную версию "highlight.pack.js" или сослаться 28 | на захостенный файл, как описано на странице загрузки: 29 | 30 | 31 | - Стилевые темы можно найти в загруженном архиве или также использовать 32 | захостенные. Чтобы сделать собственный стиль для своего сайта, вам 33 | будет полезен [CSS classes reference][cr], который тоже есть в архиве. 34 | 35 | [cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html 36 | 37 | 38 | ## node.js 39 | 40 | Highlight.js можно использовать в node.js. Библиотеку со всеми возможными языками можно 41 | установить с NPM: 42 | 43 | npm install highlight.js 44 | 45 | Также её можно собрать из исходников с только теми языками, которые нужны: 46 | 47 | python3 tools/build.py -tnode lang1 lang2 .. 48 | 49 | Использование библиотеки: 50 | 51 | ```javascript 52 | var hljs = require('highlight.js'); 53 | 54 | // Если вы знаете язык 55 | hljs.highlight(lang, code).value; 56 | 57 | // Автоопределение языка 58 | hljs.highlightAuto(code).value; 59 | ``` 60 | 61 | 62 | ## AMD 63 | 64 | Highlight.js можно использовать с загрузчиком AMD-модулей. Для этого его 65 | нужно собрать из исходников следующей командой: 66 | 67 | ```bash 68 | $ python3 tools/build.py -tamd lang1 lang2 .. 69 | ``` 70 | 71 | Она создаст файл `build/highlight.pack.js`, который является загружаемым 72 | AMD-модулем и содержит все выбранные при сборке языки. Используется он так: 73 | 74 | ```javascript 75 | require(["highlight.js/build/highlight.pack"], function(hljs){ 76 | 77 | // Если вы знаете язык 78 | hljs.highlight(lang, code).value; 79 | 80 | // Автоопределение языка 81 | hljs.highlightAuto(code).value; 82 | }); 83 | ``` 84 | 85 | 86 | ## Замена TABов 87 | 88 | Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на 89 | фиксированное количество пробелов или на отдельный ``, чтобы задать ему 90 | какой-нибудь специальный стиль: 91 | 92 | ```html 93 | 100 | ``` 101 | 102 | 103 | ## Инициализация вручную 104 | 105 | Если вы используете другие теги для блоков кода, вы можете инициализировать их 106 | явно с помощью функции `highlightBlock(code)`. Она принимает DOM-элемент с 107 | текстом расцвечиваемого кода и опционально - строчку для замены символов TAB. 108 | 109 | Например с использованием jQuery код инициализации может выглядеть так: 110 | 111 | ```javascript 112 | $(document).ready(function() { 113 | $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); 114 | }); 115 | ``` 116 | 117 | `highlightBlock` можно также использовать, чтобы подсветить блоки кода, 118 | добавленные на страницу динамически. Только убедитесь, что вы не делаете этого 119 | повторно для уже раскрашенных блоков. 120 | 121 | Если ваш блок кода использует `
` вместо переводов строки (т.е. если это не 122 | `
`), включите опцию `useBR`:
123 | 
124 | ```javascript
125 | hljs.configure({useBR: true});
126 | $('div.code').each(function(i, e) {hljs.highlightBlock(e)});
127 | ```
128 | 
129 | 
130 | ## Эвристика
131 | 
132 | Определение языка, на котором написан фрагмент, делается с помощью
133 | довольно простой эвристики: программа пытается расцветить фрагмент всеми
134 | языками подряд, и для каждого языка считает количество подошедших
135 | синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
136 | тот и выбирается.
137 | 
138 | Это означает, что в коротких фрагментах высока вероятность ошибки, что
139 | периодически и случается. Чтобы указать язык фрагмента явно, надо написать
140 | его название в виде класса к элементу ``:
141 | 
142 | ```html
143 | 
...
144 | ``` 145 | 146 | Можно использовать рекомендованные в HTML5 названия классов: 147 | "language-html", "language-php". Также можно назначать классы на элемент 148 | `
`.
149 | 
150 | Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
151 | 
152 | ```html
153 | 
...
154 | ``` 155 | 156 | 157 | ## Экспорт 158 | 159 | В файле export.html находится небольшая программка, которая показывает и дает 160 | скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода. 161 | Это может понадобится например на сайте, на котором нельзя подключить сам скрипт 162 | highlight.js. 163 | 164 | 165 | ## Координаты 166 | 167 | - Версия: 8.0 168 | - URL: http://highlightjs.org/ 169 | 170 | Лицензионное соглашение читайте в файле LICENSE. 171 | Список авторов и соавторов читайте в файле AUTHORS.ru.txt 172 | -------------------------------------------------------------------------------- /includes/highlight/highlight.pack.js: -------------------------------------------------------------------------------- 1 | var hljs=new function(){function k(v){return v.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"}function E(G){F+=""}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";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+=""}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||"")+'"')}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+=""}}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,"
")}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("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("cs",function(b){var a="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{k:a,c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|"},{cN:"xmlDocTag",b:""}]},b.CLCM,b.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},b.ASM,b.QSM,b.CNM,{bK:"protected public private internal",e:/[{;=]/,k:a,c:[{bK:"class namespace interface",starts:{c:[b.TM]}},{b:b.IR+"\\s*\\(",rB:true,c:[b.TM]}]}]}});hljs.registerLanguage("ruby",function(e){var h="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor";var a={cN:"yardoctag",b:"@[A-Za-z]+"};var i={cN:"comment",v:[{b:"#",e:"$",c:[a]},{b:"^\\=begin",e:"^\\=end",c:[a],r:10},{b:"^__END__",e:"\\n$"}]};var c={cN:"subst",b:"#\\{",e:"}",k:g};var d={cN:"string",c:[e.BE,c],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">",r:10},{b:"%[qw]?/",e:"/",r:10},{b:"%[qw]?%",e:"%",r:10},{b:"%[qw]?-",e:"-",r:10},{b:"%[qw]?\\|",e:"\\|",r:10},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]};var b={cN:"params",b:"\\(",e:"\\)",k:g};var f=[d,i,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},i]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:h}),b,i]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[d,{b:h}],r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[i,{cN:"regexp",c:[e.BE,c],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];c.c=f;b.c=f;return{k:g,c:f}});hljs.registerLanguage("diff",function(a){return{c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});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:/;/,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("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",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:"",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true,}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});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("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("java",function(b){var a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},b.CLCM,b.CBLCLM,b.ASM,b.QSM,{bK:"protected public private",e:/[{;=]/,k:a,c:[{cN:"class",bK:"class interface",eW:true,i:/[:"<>]/,c:[{bK:"extends implements",r:10},b.UTM]},{b:b.UIR+"\\s*\\(",rB:true,c:[b.UTM]}]},b.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("php",function(b){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var a={cN:"preprocessor",b:/<\?(php)?|\?>/};var c={cN:"string",c:[b.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},b.inherit(b.ASM,{i:null}),b.inherit(b.QSM,{i:null})]};var d={v:[b.BNM,b.CNM]};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[b.CLCM,b.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},a]},{cN:"comment",b:"__halt_compiler.+?;",eW:true,k:"__halt_compiler",l:b.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[b.BE]},a,e,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[b.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e,b.CBLCLM,c,d]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},b.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[b.UTM]},{bK:"use",e:";",c:[b.UTM]},{b:"=>"},c,d]}});hljs.registerLanguage("python",function(a){var f={cN:"prompt",b:/^(>>>|\.\.\.) /};var b={cN:"string",c:[a.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[f],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[f],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/,},{b:/(b|br)"/,e:/"/,},a.ASM,a.QSM]};var d={cN:"number",r:0,v:[{b:a.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:a.CNR+"[lLjJ]?"}]};var e={cN:"params",b:/\(/,e:/\)/,c:["self",f,d,b]};var c={e:/:/,i:/[${=;\n]/,c:[a.UTM,e]};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[f,d,b,a.HCM,a.inherit(c,{cN:"function",bK:"def",r:10}),a.inherit(c,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("sql",function(a){return{cI:true,i:/[<>]/,c:[{cN:"operator",b:"\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("perl",function(c){var d="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var f={cN:"subst",b:"[$@]\\{",e:"\\}",k:d};var g={b:"->{",e:"}"};var a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@\*][^\s\w{]/,r:0}]};var e={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var h=[c.BE,f,a];var b=[a,c.HCM,e,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},g,{cN:"string",c:h,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[c.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[c.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+c.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[c.HCM,e,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[c.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];f.c=b;g.c=b;return{k:d,c:b}});hljs.registerLanguage("objectivec",function(a){var d={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};var c=/[a-zA-Z@][a-zA-Z0-9_]*/;var b="@interface @class @protocol @implementation";return{k:d,l:c,i:""}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"("+b.split(" ").join("|")+")\\b",e:"({|$)",k:b,l:c,c:[a.UTM]},{cN:"variable",b:"\\."+a.UIR,r:0}]}});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("nginx",function(c){var b={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+c.UIR}]};var a={eW:true,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[c.HCM,{cN:"string",c:[c.BE,b],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:true,eE:true},{cN:"regexp",c:[c.BE,b],v:[{b:"\\s\\^",e:"\\s|{|;",rE:true},{b:"~\\*?\\s+",e:"\\s|{|;",rE:true},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},b]};return{c:[c.HCM,{b:c.UIR+"\\s",e:";|{",rB:true,c:[c.inherit(c.UTM,{starts:a})],r:0}],i:"[^\\s\\}]"}});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:""},{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/}});hljs.registerLanguage("cpp",function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c"],k:b,i:"",i:"\\n"},a.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,r:10,c:["self"]}]}});hljs.registerLanguage("makefile",function(a){var b={cN:"variable",b:/\$\(/,e:/\)/,c:[a.BE]};return{c:[a.HCM,{b:/^\w+\s*\W*=/,rB:true,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:true,starts:{e:/$/,r:0,c:[b],}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[a.QSM,b]}]}}); -------------------------------------------------------------------------------- /includes/highlight/styles/arta.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 17.V.2011 3 | Author: pumbur 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 | } 161 | -------------------------------------------------------------------------------- /includes/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 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 | } 51 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-dune.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Dune Dark Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #999580; 10 | } 11 | 12 | /* Atelier Dune Dark Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #d73737; 26 | } 27 | 28 | /* Atelier Dune Dark Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #b65611; 37 | } 38 | 39 | /* Atelier Dune Dark Yellow */ 40 | .ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #cfb017; 43 | } 44 | 45 | /* Atelier Dune Dark Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #60ac39; 53 | } 54 | 55 | /* Atelier Dune Dark Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #1fad83; 58 | } 59 | 60 | /* Atelier Dune Dark Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #6684e1; 70 | } 71 | 72 | /* Atelier Dune Dark Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #b854d4; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #292824; 81 | color: #a6a28c; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-dune.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Dune Light Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #7d7a68; 10 | } 11 | 12 | /* Atelier Dune Light Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #d73737; 26 | } 27 | 28 | /* Atelier Dune Light Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #b65611; 37 | } 38 | 39 | /* Atelier Dune Light Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #cfb017; 43 | } 44 | 45 | /* Atelier Dune Light Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #60ac39; 53 | } 54 | 55 | /* Atelier Dune Light Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #1fad83; 58 | } 59 | 60 | /* Atelier Dune Light Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #6684e1; 70 | } 71 | 72 | /* Atelier Dune Light Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #b854d4; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #fefbec; 81 | color: #6e6b5e; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-forest.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Forest Dark Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #9c9491; 10 | } 11 | 12 | /* Atelier Forest Dark Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #f22c40; 26 | } 27 | 28 | /* Atelier Forest Dark Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #df5320; 37 | } 38 | 39 | /* Atelier Forest Dark Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #d5911a; 43 | } 44 | 45 | /* Atelier Forest Dark Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #5ab738; 53 | } 54 | 55 | /* Atelier Forest Dark Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #00ad9c; 58 | } 59 | 60 | /* Atelier Forest Dark Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #407ee7; 70 | } 71 | 72 | /* Atelier Forest Dark Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #6666ea; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #2c2421; 81 | color: #a8a19f; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-forest.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Forest Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Forest Light Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #766e6b; 10 | } 11 | 12 | /* Atelier Forest Light Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #f22c40; 26 | } 27 | 28 | /* Atelier Forest Light Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #df5320; 37 | } 38 | 39 | /* Atelier Forest Light Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #d5911a; 43 | } 44 | 45 | /* Atelier Forest Light Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #5ab738; 53 | } 54 | 55 | /* Atelier Forest Light Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #00ad9c; 58 | } 59 | 60 | /* Atelier Forest Light Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #407ee7; 70 | } 71 | 72 | /* Atelier Forest Light Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #6666ea; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #f1efee; 81 | color: #68615e; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-heath.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Heath Dark Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #9e8f9e; 10 | } 11 | 12 | /* Atelier Heath Dark Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #ca402b; 26 | } 27 | 28 | /* Atelier Heath Dark Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #a65926; 37 | } 38 | 39 | /* Atelier Heath Dark Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #bb8a35; 43 | } 44 | 45 | /* Atelier Heath Dark Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #379a37; 53 | } 54 | 55 | /* Atelier Heath Dark Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #159393; 58 | } 59 | 60 | /* Atelier Heath Dark Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #516aec; 70 | } 71 | 72 | /* Atelier Heath Dark Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #7b59c0; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #292329; 81 | color: #ab9bab; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-heath.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Heath Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Heath Light Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #776977; 10 | } 11 | 12 | /* Atelier Heath Light Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #ca402b; 26 | } 27 | 28 | /* Atelier Heath Light Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #a65926; 37 | } 38 | 39 | /* Atelier Heath Light Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #bb8a35; 43 | } 44 | 45 | /* Atelier Heath Light Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #379a37; 53 | } 54 | 55 | /* Atelier Heath Light Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #159393; 58 | } 59 | 60 | /* Atelier Heath Light Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #516aec; 70 | } 71 | 72 | /* Atelier Heath Light Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #7b59c0; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #f7f3f7; 81 | color: #695d69; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-lakeside.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Lakeside Dark Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #7195a8; 10 | } 11 | 12 | /* Atelier Lakeside Dark Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #d22d72; 26 | } 27 | 28 | /* Atelier Lakeside Dark Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #935c25; 37 | } 38 | 39 | /* Atelier Lakeside Dark Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #8a8a0f; 43 | } 44 | 45 | /* Atelier Lakeside Dark Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #568c3b; 53 | } 54 | 55 | /* Atelier Lakeside Dark Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #2d8f6f; 58 | } 59 | 60 | /* Atelier Lakeside Dark Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #257fad; 70 | } 71 | 72 | /* Atelier Lakeside Dark Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #5d5db1; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #1f292e; 81 | color: #7ea2b4; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-lakeside.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Lakeside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Lakeside Light Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #5a7b8c; 10 | } 11 | 12 | /* Atelier Lakeside Light Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #d22d72; 26 | } 27 | 28 | /* Atelier Lakeside Light Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #935c25; 37 | } 38 | 39 | /* Atelier Lakeside Light Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #8a8a0f; 43 | } 44 | 45 | /* Atelier Lakeside Light Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #568c3b; 53 | } 54 | 55 | /* Atelier Lakeside Light Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #2d8f6f; 58 | } 59 | 60 | /* Atelier Lakeside Light Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #257fad; 70 | } 71 | 72 | /* Atelier Lakeside Light Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #5d5db1; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #ebf8ff; 81 | color: #516d7b; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-seaside.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Seaside Dark Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #809980; 10 | } 11 | 12 | /* Atelier Seaside Dark Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #e6193c; 26 | } 27 | 28 | /* Atelier Seaside Dark Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #87711d; 37 | } 38 | 39 | /* Atelier Seaside Dark Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #c3c322; 43 | } 44 | 45 | /* Atelier Seaside Dark Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #29a329; 53 | } 54 | 55 | /* Atelier Seaside Dark Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #1999b3; 58 | } 59 | 60 | /* Atelier Seaside Dark Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #3d62f5; 70 | } 71 | 72 | /* Atelier Seaside Dark Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #ad2bee; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #242924; 81 | color: #8ca68c; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/atelier-seaside.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Seaside Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | /* https://github.com/jmblog/color-themes-for-highlightjs */ 5 | 6 | /* Atelier Seaside Light Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #687d68; 10 | } 11 | 12 | /* Atelier Seaside Light Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #e6193c; 26 | } 27 | 28 | /* Atelier Seaside Light Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #87711d; 37 | } 38 | 39 | /* Atelier Seaside Light Yellow */ 40 | .hljs-ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #c3c322; 43 | } 44 | 45 | /* Atelier Seaside Light Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #29a329; 53 | } 54 | 55 | /* Atelier Seaside Light Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #1999b3; 58 | } 59 | 60 | /* Atelier Seaside Light Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #3d62f5; 70 | } 71 | 72 | /* Atelier Seaside Light Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #ad2bee; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #f0fff0; 81 | color: #5e6e5e; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/brown_paper.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Brown Paper style from goldblog.com.ua (c) Zaripov Yura 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 | } 106 | -------------------------------------------------------------------------------- /includes/highlight/styles/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/includes/highlight/styles/brown_papersq.png -------------------------------------------------------------------------------- /includes/highlight/styles/dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Dark style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | background: #444; 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 | color: white; 22 | } 23 | 24 | .hljs, 25 | .hljs-subst { 26 | color: #DDD; 27 | } 28 | 29 | .hljs-string, 30 | .hljs-title, 31 | .haskell .hljs-type, 32 | .ini .hljs-title, 33 | .hljs-tag .hljs-value, 34 | .css .hljs-rules .hljs-value, 35 | .hljs-preprocessor, 36 | .hljs-pragma, 37 | .ruby .hljs-symbol, 38 | .ruby .hljs-symbol .hljs-string, 39 | .ruby .hljs-class .hljs-parent, 40 | .hljs-built_in, 41 | .sql .hljs-aggregate, 42 | .django .hljs-template_tag, 43 | .django .hljs-variable, 44 | .smalltalk .hljs-class, 45 | .hljs-javadoc, 46 | .ruby .hljs-string, 47 | .django .hljs-filter .hljs-argument, 48 | .smalltalk .hljs-localvars, 49 | .smalltalk .hljs-array, 50 | .hljs-attr_selector, 51 | .hljs-pseudo, 52 | .hljs-addition, 53 | .hljs-stream, 54 | .hljs-envvar, 55 | .apache .hljs-tag, 56 | .apache .hljs-cbracket, 57 | .tex .hljs-command, 58 | .hljs-prompt, 59 | .coffeescript .hljs-attribute { 60 | color: #D88; 61 | } 62 | 63 | .hljs-comment, 64 | .java .hljs-annotation, 65 | .python .hljs-decorator, 66 | .hljs-template_comment, 67 | .hljs-pi, 68 | .hljs-doctype, 69 | .hljs-deletion, 70 | .hljs-shebang, 71 | .apache .hljs-sqbracket, 72 | .tex .hljs-formula { 73 | color: #777; 74 | } 75 | 76 | .hljs-keyword, 77 | .hljs-literal, 78 | .hljs-title, 79 | .css .hljs-id, 80 | .hljs-phpdoc, 81 | .haskell .hljs-type, 82 | .vbscript .hljs-built_in, 83 | .sql .hljs-aggregate, 84 | .rsl .hljs-built_in, 85 | .smalltalk .hljs-class, 86 | .diff .hljs-header, 87 | .hljs-chunk, 88 | .hljs-winutils, 89 | .bash .hljs-variable, 90 | .apache .hljs-tag, 91 | .tex .hljs-special, 92 | .hljs-request, 93 | .hljs-status { 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.5; 105 | } 106 | -------------------------------------------------------------------------------- /includes/highlight/styles/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | background: #F0F0F0; 10 | } 11 | 12 | .hljs, 13 | .hljs-subst, 14 | .hljs-tag .hljs-title, 15 | .lisp .hljs-title, 16 | .clojure .hljs-built_in, 17 | .nginx .hljs-title { 18 | color: black; 19 | } 20 | 21 | .hljs-string, 22 | .hljs-title, 23 | .hljs-constant, 24 | .hljs-parent, 25 | .hljs-tag .hljs-value, 26 | .hljs-rules .hljs-value, 27 | .hljs-rules .hljs-value .hljs-number, 28 | .hljs-preprocessor, 29 | .hljs-pragma, 30 | .haml .hljs-symbol, 31 | .ruby .hljs-symbol, 32 | .ruby .hljs-symbol .hljs-string, 33 | .hljs-aggregate, 34 | .hljs-template_tag, 35 | .django .hljs-variable, 36 | .smalltalk .hljs-class, 37 | .hljs-addition, 38 | .hljs-flow, 39 | .hljs-stream, 40 | .bash .hljs-variable, 41 | .apache .hljs-tag, 42 | .apache .hljs-cbracket, 43 | .tex .hljs-command, 44 | .tex .hljs-special, 45 | .erlang_repl .hljs-function_or_atom, 46 | .asciidoc .hljs-header, 47 | .markdown .hljs-header, 48 | .coffeescript .hljs-attribute { 49 | color: #800; 50 | } 51 | 52 | .smartquote, 53 | .hljs-comment, 54 | .hljs-annotation, 55 | .hljs-template_comment, 56 | .diff .hljs-header, 57 | .hljs-chunk, 58 | .asciidoc .hljs-blockquote, 59 | .markdown .hljs-blockquote { 60 | color: #888; 61 | } 62 | 63 | .hljs-number, 64 | .hljs-date, 65 | .hljs-regexp, 66 | .hljs-literal, 67 | .hljs-hexcolor, 68 | .smalltalk .hljs-symbol, 69 | .smalltalk .hljs-char, 70 | .go .hljs-constant, 71 | .hljs-change, 72 | .lasso .hljs-variable, 73 | .makefile .hljs-variable, 74 | .asciidoc .hljs-bullet, 75 | .markdown .hljs-bullet, 76 | .asciidoc .hljs-link_url, 77 | .markdown .hljs-link_url { 78 | color: #080; 79 | } 80 | 81 | .hljs-label, 82 | .hljs-javadoc, 83 | .ruby .hljs-string, 84 | .hljs-decorator, 85 | .hljs-filter .hljs-argument, 86 | .hljs-localvars, 87 | .hljs-array, 88 | .hljs-attr_selector, 89 | .hljs-important, 90 | .hljs-pseudo, 91 | .hljs-pi, 92 | .haml .hljs-bullet, 93 | .hljs-doctype, 94 | .hljs-deletion, 95 | .hljs-envvar, 96 | .hljs-shebang, 97 | .apache .hljs-sqbracket, 98 | .nginx .hljs-built_in, 99 | .tex .hljs-formula, 100 | .erlang_repl .hljs-reserved, 101 | .hljs-prompt, 102 | .asciidoc .hljs-link_label, 103 | .markdown .hljs-link_label, 104 | .vhdl .hljs-attribute, 105 | .clojure .hljs-attribute, 106 | .asciidoc .hljs-attribute, 107 | .lasso .hljs-attribute, 108 | .coffeescript .hljs-property, 109 | .hljs-phony { 110 | color: #88F 111 | } 112 | 113 | .hljs-keyword, 114 | .hljs-id, 115 | .hljs-title, 116 | .hljs-built_in, 117 | .hljs-aggregate, 118 | .css .hljs-tag, 119 | .hljs-javadoctag, 120 | .hljs-phpdoc, 121 | .hljs-yardoctag, 122 | .smalltalk .hljs-class, 123 | .hljs-winutils, 124 | .bash .hljs-variable, 125 | .apache .hljs-tag, 126 | .go .hljs-typename, 127 | .tex .hljs-command, 128 | .asciidoc .hljs-strong, 129 | .markdown .hljs-strong, 130 | .hljs-request, 131 | .hljs-status { 132 | font-weight: bold; 133 | } 134 | 135 | .asciidoc .hljs-emphasis, 136 | .markdown .hljs-emphasis { 137 | font-style: italic; 138 | } 139 | 140 | .nginx .hljs-built_in { 141 | font-weight: normal; 142 | } 143 | 144 | .coffeescript .javascript, 145 | .javascript .xml, 146 | .lasso .markup, 147 | .tex .hljs-formula, 148 | .xml .javascript, 149 | .xml .vbscript, 150 | .xml .css, 151 | .xml .hljs-cdata { 152 | opacity: 0.5; 153 | } 154 | -------------------------------------------------------------------------------- /includes/highlight/styles/docco.css: -------------------------------------------------------------------------------- 1 | /* 2 | Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars) 3 | */ 4 | 5 | .hljs { 6 | display: block; padding: 0.5em; 7 | color: #000; 8 | background: #f8f8ff 9 | } 10 | 11 | .hljs-comment, 12 | .hljs-template_comment, 13 | .diff .hljs-header, 14 | .hljs-javadoc { 15 | color: #408080; 16 | font-style: italic 17 | } 18 | 19 | .hljs-keyword, 20 | .assignment, 21 | .hljs-literal, 22 | .css .rule .hljs-keyword, 23 | .hljs-winutils, 24 | .javascript .hljs-title, 25 | .lisp .hljs-title, 26 | .hljs-subst { 27 | color: #954121; 28 | } 29 | 30 | .hljs-number, 31 | .hljs-hexcolor { 32 | color: #40a070 33 | } 34 | 35 | .hljs-string, 36 | .hljs-tag .hljs-value, 37 | .hljs-phpdoc, 38 | .tex .hljs-formula { 39 | color: #219161; 40 | } 41 | 42 | .hljs-title, 43 | .hljs-id { 44 | color: #19469D; 45 | } 46 | .hljs-params { 47 | color: #00F; 48 | } 49 | 50 | .javascript .hljs-title, 51 | .lisp .hljs-title, 52 | .hljs-subst { 53 | font-weight: normal 54 | } 55 | 56 | .hljs-class .hljs-title, 57 | .haskell .hljs-label, 58 | .tex .hljs-command { 59 | color: #458; 60 | font-weight: bold 61 | } 62 | 63 | .hljs-tag, 64 | .hljs-tag .hljs-title, 65 | .hljs-rules .hljs-property, 66 | .django .hljs-tag .hljs-keyword { 67 | color: #000080; 68 | font-weight: normal 69 | } 70 | 71 | .hljs-attribute, 72 | .hljs-variable, 73 | .instancevar, 74 | .lisp .hljs-body { 75 | color: #008080 76 | } 77 | 78 | .hljs-regexp { 79 | color: #B68 80 | } 81 | 82 | .hljs-class { 83 | color: #458; 84 | font-weight: bold 85 | } 86 | 87 | .hljs-symbol, 88 | .ruby .hljs-symbol .hljs-string, 89 | .ruby .hljs-symbol .hljs-keyword, 90 | .ruby .hljs-symbol .keymethods, 91 | .lisp .hljs-keyword, 92 | .tex .hljs-special, 93 | .input_number { 94 | color: #990073 95 | } 96 | 97 | .builtin, 98 | .constructor, 99 | .hljs-built_in, 100 | .lisp .hljs-title { 101 | color: #0086b3 102 | } 103 | 104 | .hljs-preprocessor, 105 | .hljs-pragma, 106 | .hljs-pi, 107 | .hljs-doctype, 108 | .hljs-shebang, 109 | .hljs-cdata { 110 | color: #999; 111 | font-weight: bold 112 | } 113 | 114 | .hljs-deletion { 115 | background: #fdd 116 | } 117 | 118 | .hljs-addition { 119 | background: #dfd 120 | } 121 | 122 | .diff .hljs-change { 123 | background: #0086b3 124 | } 125 | 126 | .hljs-chunk { 127 | color: #aaa 128 | } 129 | 130 | .tex .hljs-formula { 131 | opacity: 0.5; 132 | } 133 | -------------------------------------------------------------------------------- /includes/highlight/styles/far.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | FAR Style (c) MajestiC 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | background: #000080; 10 | } 11 | 12 | .hljs, 13 | .hljs-subst { 14 | color: #0FF; 15 | } 16 | 17 | .hljs-string, 18 | .ruby .hljs-string, 19 | .haskell .hljs-type, 20 | .hljs-tag .hljs-value, 21 | .css .hljs-rules .hljs-value, 22 | .css .hljs-rules .hljs-value .hljs-number, 23 | .hljs-preprocessor, 24 | .hljs-pragma, 25 | .ruby .hljs-symbol, 26 | .ruby .hljs-symbol .hljs-string, 27 | .hljs-built_in, 28 | .sql .hljs-aggregate, 29 | .django .hljs-template_tag, 30 | .django .hljs-variable, 31 | .smalltalk .hljs-class, 32 | .hljs-addition, 33 | .apache .hljs-tag, 34 | .apache .hljs-cbracket, 35 | .tex .hljs-command, 36 | .clojure .hljs-title, 37 | .coffeescript .hljs-attribute { 38 | color: #FF0; 39 | } 40 | 41 | .hljs-keyword, 42 | .css .hljs-id, 43 | .hljs-title, 44 | .haskell .hljs-type, 45 | .vbscript .hljs-built_in, 46 | .sql .hljs-aggregate, 47 | .rsl .hljs-built_in, 48 | .smalltalk .hljs-class, 49 | .xml .hljs-tag .hljs-title, 50 | .hljs-winutils, 51 | .hljs-flow, 52 | .hljs-change, 53 | .hljs-envvar, 54 | .bash .hljs-variable, 55 | .tex .hljs-special, 56 | .clojure .hljs-built_in { 57 | color: #FFF; 58 | } 59 | 60 | .hljs-comment, 61 | .hljs-phpdoc, 62 | .hljs-javadoc, 63 | .java .hljs-annotation, 64 | .hljs-template_comment, 65 | .hljs-deletion, 66 | .apache .hljs-sqbracket, 67 | .tex .hljs-formula { 68 | color: #888; 69 | } 70 | 71 | .hljs-number, 72 | .hljs-date, 73 | .hljs-regexp, 74 | .hljs-literal, 75 | .smalltalk .hljs-symbol, 76 | .smalltalk .hljs-char, 77 | .clojure .hljs-attribute { 78 | color: #0F0; 79 | } 80 | 81 | .python .hljs-decorator, 82 | .django .hljs-filter .hljs-argument, 83 | .smalltalk .hljs-localvars, 84 | .smalltalk .hljs-array, 85 | .hljs-attr_selector, 86 | .hljs-pseudo, 87 | .xml .hljs-pi, 88 | .diff .hljs-header, 89 | .hljs-chunk, 90 | .hljs-shebang, 91 | .nginx .hljs-built_in, 92 | .hljs-prompt { 93 | color: #008080; 94 | } 95 | 96 | .hljs-keyword, 97 | .css .hljs-id, 98 | .hljs-title, 99 | .haskell .hljs-type, 100 | .vbscript .hljs-built_in, 101 | .sql .hljs-aggregate, 102 | .rsl .hljs-built_in, 103 | .smalltalk .hljs-class, 104 | .hljs-winutils, 105 | .hljs-flow, 106 | .apache .hljs-tag, 107 | .nginx .hljs-built_in, 108 | .tex .hljs-command, 109 | .tex .hljs-special, 110 | .hljs-request, 111 | .hljs-status { 112 | font-weight: bold; 113 | } 114 | -------------------------------------------------------------------------------- /includes/highlight/styles/foundation.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Foundation 4 docs style for highlight.js 3 | Author: Dan Allen 4 | Website: http://foundation.zurb.com/docs/ 5 | Version: 1.0 6 | Date: 2013-04-02 7 | */ 8 | 9 | .hljs { 10 | display: block; padding: 0.5em; 11 | background: #eee; 12 | } 13 | 14 | .hljs-header, 15 | .hljs-decorator, 16 | .hljs-annotation { 17 | color: #000077; 18 | } 19 | 20 | .hljs-horizontal_rule, 21 | .hljs-link_url, 22 | .hljs-emphasis, 23 | .hljs-attribute { 24 | color: #070; 25 | } 26 | 27 | .hljs-emphasis { 28 | font-style: italic; 29 | } 30 | 31 | .hljs-link_label, 32 | .hljs-strong, 33 | .hljs-value, 34 | .hljs-string, 35 | .scss .hljs-value .hljs-string { 36 | color: #d14; 37 | } 38 | 39 | .hljs-strong { 40 | font-weight: bold; 41 | } 42 | 43 | .hljs-blockquote, 44 | .hljs-comment { 45 | color: #998; 46 | font-style: italic; 47 | } 48 | 49 | .asciidoc .hljs-title, 50 | .hljs-function .hljs-title { 51 | color: #900; 52 | } 53 | 54 | .hljs-class { 55 | color: #458; 56 | } 57 | 58 | .hljs-id, 59 | .hljs-pseudo, 60 | .hljs-constant, 61 | .hljs-hexcolor { 62 | color: teal; 63 | } 64 | 65 | .hljs-variable { 66 | color: #336699; 67 | } 68 | 69 | .hljs-bullet, 70 | .hljs-javadoc { 71 | color: #997700; 72 | } 73 | 74 | .hljs-pi, 75 | .hljs-doctype { 76 | color: #3344bb; 77 | } 78 | 79 | .hljs-code, 80 | .hljs-number { 81 | color: #099; 82 | } 83 | 84 | .hljs-important { 85 | color: #f00; 86 | } 87 | 88 | .smartquote, 89 | .hljs-label { 90 | color: #970; 91 | } 92 | 93 | .hljs-preprocessor, 94 | .hljs-pragma { 95 | color: #579; 96 | } 97 | 98 | .hljs-reserved, 99 | .hljs-keyword, 100 | .scss .hljs-value { 101 | color: #000; 102 | } 103 | 104 | .hljs-regexp { 105 | background-color: #fff0ff; 106 | color: #880088; 107 | } 108 | 109 | .hljs-symbol { 110 | color: #990073; 111 | } 112 | 113 | .hljs-symbol .hljs-string { 114 | color: #a60; 115 | } 116 | 117 | .hljs-tag { 118 | color: #007700; 119 | } 120 | 121 | .hljs-at_rule, 122 | .hljs-at_rule .hljs-keyword { 123 | color: #088; 124 | } 125 | 126 | .hljs-at_rule .hljs-preprocessor { 127 | color: #808; 128 | } 129 | 130 | .scss .hljs-tag, 131 | .scss .hljs-attribute { 132 | color: #339; 133 | } 134 | -------------------------------------------------------------------------------- /includes/highlight/styles/github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | color: #333; 10 | background: #f8f8f8 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-template_comment, 15 | .diff .hljs-header, 16 | .hljs-javadoc { 17 | color: #998; 18 | font-style: italic 19 | } 20 | 21 | .hljs-keyword, 22 | .css .rule .hljs-keyword, 23 | .hljs-winutils, 24 | .javascript .hljs-title, 25 | .nginx .hljs-title, 26 | .hljs-subst, 27 | .hljs-request, 28 | .hljs-status { 29 | color: #333; 30 | font-weight: bold 31 | } 32 | 33 | .hljs-number, 34 | .hljs-hexcolor, 35 | .ruby .hljs-constant { 36 | color: #099; 37 | } 38 | 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-phpdoc, 42 | .tex .hljs-formula { 43 | color: #d14 44 | } 45 | 46 | .hljs-title, 47 | .hljs-id, 48 | .coffeescript .hljs-params, 49 | .scss .hljs-preprocessor { 50 | color: #900; 51 | font-weight: bold 52 | } 53 | 54 | .javascript .hljs-title, 55 | .lisp .hljs-title, 56 | .clojure .hljs-title, 57 | .hljs-subst { 58 | font-weight: normal 59 | } 60 | 61 | .hljs-class .hljs-title, 62 | .haskell .hljs-type, 63 | .vhdl .hljs-literal, 64 | .tex .hljs-command { 65 | color: #458; 66 | font-weight: bold 67 | } 68 | 69 | .hljs-tag, 70 | .hljs-tag .hljs-title, 71 | .hljs-rules .hljs-property, 72 | .django .hljs-tag .hljs-keyword { 73 | color: #000080; 74 | font-weight: normal 75 | } 76 | 77 | .hljs-attribute, 78 | .hljs-variable, 79 | .lisp .hljs-body { 80 | color: #008080 81 | } 82 | 83 | .hljs-regexp { 84 | color: #009926 85 | } 86 | 87 | .hljs-symbol, 88 | .ruby .hljs-symbol .hljs-string, 89 | .lisp .hljs-keyword, 90 | .tex .hljs-special, 91 | .hljs-prompt { 92 | color: #990073 93 | } 94 | 95 | .hljs-built_in, 96 | .lisp .hljs-title, 97 | .clojure .hljs-built_in { 98 | color: #0086b3 99 | } 100 | 101 | .hljs-preprocessor, 102 | .hljs-pragma, 103 | .hljs-pi, 104 | .hljs-doctype, 105 | .hljs-shebang, 106 | .hljs-cdata { 107 | color: #999; 108 | font-weight: bold 109 | } 110 | 111 | .hljs-deletion { 112 | background: #fdd 113 | } 114 | 115 | .hljs-addition { 116 | background: #dfd 117 | } 118 | 119 | .diff .hljs-change { 120 | background: #0086b3 121 | } 122 | 123 | .hljs-chunk { 124 | color: #aaa 125 | } 126 | -------------------------------------------------------------------------------- /includes/highlight/styles/googlecode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Google Code style (c) Aahan Krish 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | background: white; color: black; 10 | } 11 | 12 | .hljs-comment, 13 | .hljs-template_comment, 14 | .hljs-javadoc, 15 | .hljs-comment * { 16 | color: #800; 17 | } 18 | 19 | .hljs-keyword, 20 | .method, 21 | .hljs-list .hljs-title, 22 | .clojure .hljs-built_in, 23 | .nginx .hljs-title, 24 | .hljs-tag .hljs-title, 25 | .setting .hljs-value, 26 | .hljs-winutils, 27 | .tex .hljs-command, 28 | .http .hljs-title, 29 | .hljs-request, 30 | .hljs-status { 31 | color: #008; 32 | } 33 | 34 | .hljs-envvar, 35 | .tex .hljs-special { 36 | color: #660; 37 | } 38 | 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-cdata, 42 | .hljs-filter .hljs-argument, 43 | .hljs-attr_selector, 44 | .apache .hljs-cbracket, 45 | .hljs-date, 46 | .hljs-regexp, 47 | .coffeescript .hljs-attribute { 48 | color: #080; 49 | } 50 | 51 | .hljs-sub .hljs-identifier, 52 | .hljs-pi, 53 | .hljs-tag, 54 | .hljs-tag .hljs-keyword, 55 | .hljs-decorator, 56 | .ini .hljs-title, 57 | .hljs-shebang, 58 | .hljs-prompt, 59 | .hljs-hexcolor, 60 | .hljs-rules .hljs-value, 61 | .css .hljs-value .hljs-number, 62 | .hljs-literal, 63 | .hljs-symbol, 64 | .ruby .hljs-symbol .hljs-string, 65 | .hljs-number, 66 | .css .hljs-function, 67 | .clojure .hljs-attribute { 68 | color: #066; 69 | } 70 | 71 | .hljs-class .hljs-title, 72 | .haskell .hljs-type, 73 | .smalltalk .hljs-class, 74 | .hljs-javadoctag, 75 | .hljs-yardoctag, 76 | .hljs-phpdoc, 77 | .hljs-typename, 78 | .hljs-tag .hljs-attribute, 79 | .hljs-doctype, 80 | .hljs-class .hljs-id, 81 | .hljs-built_in, 82 | .setting, 83 | .hljs-params, 84 | .hljs-variable, 85 | .clojure .hljs-title { 86 | color: #606; 87 | } 88 | 89 | .css .hljs-tag, 90 | .hljs-rules .hljs-property, 91 | .hljs-pseudo, 92 | .hljs-subst { 93 | color: #000; 94 | } 95 | 96 | .css .hljs-class, 97 | .css .hljs-id { 98 | color: #9B703F; 99 | } 100 | 101 | .hljs-value .hljs-important { 102 | color: #ff7700; 103 | font-weight: bold; 104 | } 105 | 106 | .hljs-rules .hljs-keyword { 107 | color: #C5AF75; 108 | } 109 | 110 | .hljs-annotation, 111 | .apache .hljs-sqbracket, 112 | .nginx .hljs-built_in { 113 | color: #9B859D; 114 | } 115 | 116 | .hljs-preprocessor, 117 | .hljs-preprocessor *, 118 | .hljs-pragma { 119 | color: #444; 120 | } 121 | 122 | .tex .hljs-formula { 123 | background-color: #EEE; 124 | font-style: italic; 125 | } 126 | 127 | .diff .hljs-header, 128 | .hljs-chunk { 129 | color: #808080; 130 | font-weight: bold; 131 | } 132 | 133 | .diff .hljs-change { 134 | background-color: #BCCFF9; 135 | } 136 | 137 | .hljs-addition { 138 | background-color: #BAEEBA; 139 | } 140 | 141 | .hljs-deletion { 142 | background-color: #FFC8BD; 143 | } 144 | 145 | .hljs-comment .hljs-yardoctag { 146 | font-weight: bold; 147 | } 148 | -------------------------------------------------------------------------------- /includes/highlight/styles/idea.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Intellij Idea-like styling (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | color: #000; 10 | background: #fff; 11 | } 12 | 13 | .hljs-subst, 14 | .hljs-title { 15 | font-weight: normal; 16 | color: #000; 17 | } 18 | 19 | .hljs-comment, 20 | .hljs-template_comment, 21 | .hljs-javadoc, 22 | .diff .hljs-header { 23 | color: #808080; 24 | font-style: italic; 25 | } 26 | 27 | .hljs-annotation, 28 | .hljs-decorator, 29 | .hljs-preprocessor, 30 | .hljs-pragma, 31 | .hljs-doctype, 32 | .hljs-pi, 33 | .hljs-chunk, 34 | .hljs-shebang, 35 | .apache .hljs-cbracket, 36 | .hljs-prompt, 37 | .http .hljs-title { 38 | color: #808000; 39 | } 40 | 41 | .hljs-tag, 42 | .hljs-pi { 43 | background: #efefef; 44 | } 45 | 46 | .hljs-tag .hljs-title, 47 | .hljs-id, 48 | .hljs-attr_selector, 49 | .hljs-pseudo, 50 | .hljs-literal, 51 | .hljs-keyword, 52 | .hljs-hexcolor, 53 | .css .hljs-function, 54 | .ini .hljs-title, 55 | .css .hljs-class, 56 | .hljs-list .hljs-title, 57 | .clojure .hljs-title, 58 | .nginx .hljs-title, 59 | .tex .hljs-command, 60 | .hljs-request, 61 | .hljs-status { 62 | font-weight: bold; 63 | color: #000080; 64 | } 65 | 66 | .hljs-attribute, 67 | .hljs-rules .hljs-keyword, 68 | .hljs-number, 69 | .hljs-date, 70 | .hljs-regexp, 71 | .tex .hljs-special { 72 | font-weight: bold; 73 | color: #0000ff; 74 | } 75 | 76 | .hljs-number, 77 | .hljs-regexp { 78 | font-weight: normal; 79 | } 80 | 81 | .hljs-string, 82 | .hljs-value, 83 | .hljs-filter .hljs-argument, 84 | .css .hljs-function .hljs-params, 85 | .apache .hljs-tag { 86 | color: #008000; 87 | font-weight: bold; 88 | } 89 | 90 | .hljs-symbol, 91 | .ruby .hljs-symbol .hljs-string, 92 | .hljs-char, 93 | .tex .hljs-formula { 94 | color: #000; 95 | background: #d0eded; 96 | font-style: italic; 97 | } 98 | 99 | .hljs-phpdoc, 100 | .hljs-yardoctag, 101 | .hljs-javadoctag { 102 | text-decoration: underline; 103 | } 104 | 105 | .hljs-variable, 106 | .hljs-envvar, 107 | .apache .hljs-sqbracket, 108 | .nginx .hljs-built_in { 109 | color: #660e7a; 110 | } 111 | 112 | .hljs-addition { 113 | background: #baeeba; 114 | } 115 | 116 | .hljs-deletion { 117 | background: #ffc8bd; 118 | } 119 | 120 | .diff .hljs-change { 121 | background: #bccff9; 122 | } 123 | -------------------------------------------------------------------------------- /includes/highlight/styles/ir_black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; padding: 0.5em; 7 | background: #000; color: #f8f8f8; 8 | } 9 | 10 | .hljs-shebang, 11 | .hljs-comment, 12 | .hljs-template_comment, 13 | .hljs-javadoc { 14 | color: #7c7c7c; 15 | } 16 | 17 | .hljs-keyword, 18 | .hljs-tag, 19 | .tex .hljs-command, 20 | .hljs-request, 21 | .hljs-status, 22 | .clojure .hljs-attribute { 23 | color: #96CBFE; 24 | } 25 | 26 | .hljs-sub .hljs-keyword, 27 | .method, 28 | .hljs-list .hljs-title, 29 | .nginx .hljs-title { 30 | color: #FFFFB6; 31 | } 32 | 33 | .hljs-string, 34 | .hljs-tag .hljs-value, 35 | .hljs-cdata, 36 | .hljs-filter .hljs-argument, 37 | .hljs-attr_selector, 38 | .apache .hljs-cbracket, 39 | .hljs-date, 40 | .coffeescript .hljs-attribute { 41 | color: #A8FF60; 42 | } 43 | 44 | .hljs-subst { 45 | color: #DAEFA3; 46 | } 47 | 48 | .hljs-regexp { 49 | color: #E9C062; 50 | } 51 | 52 | .hljs-title, 53 | .hljs-sub .hljs-identifier, 54 | .hljs-pi, 55 | .hljs-decorator, 56 | .tex .hljs-special, 57 | .haskell .hljs-type, 58 | .hljs-constant, 59 | .smalltalk .hljs-class, 60 | .hljs-javadoctag, 61 | .hljs-yardoctag, 62 | .hljs-phpdoc, 63 | .nginx .hljs-built_in { 64 | color: #FFFFB6; 65 | } 66 | 67 | .hljs-symbol, 68 | .ruby .hljs-symbol .hljs-string, 69 | .hljs-number, 70 | .hljs-variable, 71 | .vbscript, 72 | .hljs-literal { 73 | color: #C6C5FE; 74 | } 75 | 76 | .css .hljs-tag { 77 | color: #96CBFE; 78 | } 79 | 80 | .css .hljs-rules .hljs-property, 81 | .css .hljs-id { 82 | color: #FFFFB6; 83 | } 84 | 85 | .css .hljs-class { 86 | color: #FFF; 87 | } 88 | 89 | .hljs-hexcolor { 90 | color: #C6C5FE; 91 | } 92 | 93 | .hljs-number { 94 | color:#FF73FD; 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.7; 105 | } 106 | -------------------------------------------------------------------------------- /includes/highlight/styles/magula.css: -------------------------------------------------------------------------------- 1 | /* 2 | Description: Magula style for highligh.js 3 | Author: Ruslan Keba 4 | Website: http://rukeba.com/ 5 | Version: 1.0 6 | Date: 2009-01-03 7 | Music: Aphex Twin / Xtal 8 | */ 9 | 10 | .hljs { 11 | display: block; padding: 0.5em; 12 | background-color: #f4f4f4; 13 | } 14 | 15 | .hljs, 16 | .hljs-subst, 17 | .lisp .hljs-title, 18 | .clojure .hljs-built_in { 19 | color: black; 20 | } 21 | 22 | .hljs-string, 23 | .hljs-title, 24 | .hljs-parent, 25 | .hljs-tag .hljs-value, 26 | .hljs-rules .hljs-value, 27 | .hljs-rules .hljs-value .hljs-number, 28 | .hljs-preprocessor, 29 | .hljs-pragma, 30 | .ruby .hljs-symbol, 31 | .ruby .hljs-symbol .hljs-string, 32 | .hljs-aggregate, 33 | .hljs-template_tag, 34 | .django .hljs-variable, 35 | .smalltalk .hljs-class, 36 | .hljs-addition, 37 | .hljs-flow, 38 | .hljs-stream, 39 | .bash .hljs-variable, 40 | .apache .hljs-cbracket, 41 | .coffeescript .hljs-attribute { 42 | color: #050; 43 | } 44 | 45 | .hljs-comment, 46 | .hljs-annotation, 47 | .hljs-template_comment, 48 | .diff .hljs-header, 49 | .hljs-chunk { 50 | color: #777; 51 | } 52 | 53 | .hljs-number, 54 | .hljs-date, 55 | .hljs-regexp, 56 | .hljs-literal, 57 | .smalltalk .hljs-symbol, 58 | .smalltalk .hljs-char, 59 | .hljs-change, 60 | .tex .hljs-special { 61 | color: #800; 62 | } 63 | 64 | .hljs-label, 65 | .hljs-javadoc, 66 | .ruby .hljs-string, 67 | .hljs-decorator, 68 | .hljs-filter .hljs-argument, 69 | .hljs-localvars, 70 | .hljs-array, 71 | .hljs-attr_selector, 72 | .hljs-pseudo, 73 | .hljs-pi, 74 | .hljs-doctype, 75 | .hljs-deletion, 76 | .hljs-envvar, 77 | .hljs-shebang, 78 | .apache .hljs-sqbracket, 79 | .nginx .hljs-built_in, 80 | .tex .hljs-formula, 81 | .hljs-prompt, 82 | .clojure .hljs-attribute { 83 | color: #00e; 84 | } 85 | 86 | .hljs-keyword, 87 | .hljs-id, 88 | .hljs-phpdoc, 89 | .hljs-title, 90 | .hljs-built_in, 91 | .hljs-aggregate, 92 | .smalltalk .hljs-class, 93 | .hljs-winutils, 94 | .bash .hljs-variable, 95 | .apache .hljs-tag, 96 | .xml .hljs-tag, 97 | .tex .hljs-command, 98 | .hljs-request, 99 | .hljs-status { 100 | font-weight: bold; 101 | color: navy; 102 | } 103 | 104 | .nginx .hljs-built_in { 105 | font-weight: normal; 106 | } 107 | 108 | .coffeescript .javascript, 109 | .javascript .xml, 110 | .tex .hljs-formula, 111 | .xml .javascript, 112 | .xml .vbscript, 113 | .xml .css, 114 | .xml .hljs-cdata { 115 | opacity: 0.5; 116 | } 117 | 118 | /* --- */ 119 | .apache .hljs-tag { 120 | font-weight: bold; 121 | color: blue; 122 | } 123 | 124 | -------------------------------------------------------------------------------- /includes/highlight/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; padding: 0.5em; 6 | background: #EAEEF3; color: #00193A; 7 | } 8 | 9 | .hljs-keyword, 10 | .hljs-title, 11 | .hljs-important, 12 | .hljs-request, 13 | .hljs-header, 14 | .hljs-javadoctag { 15 | font-weight: bold; 16 | } 17 | 18 | .hljs-comment, 19 | .hljs-chunk, 20 | .hljs-template_comment { 21 | color: #738191; 22 | } 23 | 24 | .hljs-string, 25 | .hljs-title, 26 | .hljs-parent, 27 | .hljs-built_in, 28 | .hljs-literal, 29 | .hljs-filename, 30 | .hljs-value, 31 | .hljs-addition, 32 | .hljs-tag, 33 | .hljs-argument, 34 | .hljs-link_label, 35 | .hljs-blockquote, 36 | .hljs-header { 37 | color: #0048AB; 38 | } 39 | 40 | .hljs-decorator, 41 | .hljs-prompt, 42 | .hljs-yardoctag, 43 | .hljs-subst, 44 | .hljs-symbol, 45 | .hljs-doctype, 46 | .hljs-regexp, 47 | .hljs-preprocessor, 48 | .hljs-pragma, 49 | .hljs-pi, 50 | .hljs-attribute, 51 | .hljs-attr_selector, 52 | .hljs-javadoc, 53 | .hljs-xmlDocTag, 54 | .hljs-deletion, 55 | .hljs-shebang, 56 | .hljs-string .hljs-variable, 57 | .hljs-link_url, 58 | .hljs-bullet, 59 | .hljs-sqbracket, 60 | .hljs-phony { 61 | color: #4C81C9; 62 | } 63 | -------------------------------------------------------------------------------- /includes/highlight/styles/monokai.css: -------------------------------------------------------------------------------- 1 | /* 2 | Monokai style - ported by Luigi Maselli - http://grigio.org 3 | */ 4 | 5 | .hljs { 6 | display: block; padding: 0.5em; 7 | background: #272822; 8 | } 9 | 10 | .hljs-tag, 11 | .hljs-tag .hljs-title, 12 | .hljs-keyword, 13 | .hljs-literal, 14 | .hljs-strong, 15 | .hljs-change, 16 | .hljs-winutils, 17 | .hljs-flow, 18 | .lisp .hljs-title, 19 | .clojure .hljs-built_in, 20 | .nginx .hljs-title, 21 | .tex .hljs-special { 22 | color: #F92672; 23 | } 24 | 25 | .hljs { 26 | color: #DDD; 27 | } 28 | 29 | .hljs .hljs-constant, 30 | .asciidoc .hljs-code { 31 | color: #66D9EF; 32 | } 33 | 34 | .hljs-code, 35 | .hljs-class .hljs-title, 36 | .hljs-header { 37 | color: white; 38 | } 39 | 40 | .hljs-link_label, 41 | .hljs-attribute, 42 | .hljs-symbol, 43 | .hljs-symbol .hljs-string, 44 | .hljs-value, 45 | .hljs-regexp { 46 | color: #BF79DB; 47 | } 48 | 49 | .hljs-link_url, 50 | .hljs-tag .hljs-value, 51 | .hljs-string, 52 | .hljs-bullet, 53 | .hljs-subst, 54 | .hljs-title, 55 | .hljs-emphasis, 56 | .haskell .hljs-type, 57 | .hljs-preprocessor, 58 | .hljs-pragma, 59 | .ruby .hljs-class .hljs-parent, 60 | .hljs-built_in, 61 | .sql .hljs-aggregate, 62 | .django .hljs-template_tag, 63 | .django .hljs-variable, 64 | .smalltalk .hljs-class, 65 | .hljs-javadoc, 66 | .django .hljs-filter .hljs-argument, 67 | .smalltalk .hljs-localvars, 68 | .smalltalk .hljs-array, 69 | .hljs-attr_selector, 70 | .hljs-pseudo, 71 | .hljs-addition, 72 | .hljs-stream, 73 | .hljs-envvar, 74 | .apache .hljs-tag, 75 | .apache .hljs-cbracket, 76 | .tex .hljs-command, 77 | .hljs-prompt { 78 | color: #A6E22E; 79 | } 80 | 81 | .hljs-comment, 82 | .java .hljs-annotation, 83 | .smartquote, 84 | .hljs-blockquote, 85 | .hljs-horizontal_rule, 86 | .python .hljs-decorator, 87 | .hljs-template_comment, 88 | .hljs-pi, 89 | .hljs-doctype, 90 | .hljs-deletion, 91 | .hljs-shebang, 92 | .apache .hljs-sqbracket, 93 | .tex .hljs-formula { 94 | color: #75715E; 95 | } 96 | 97 | .hljs-keyword, 98 | .hljs-literal, 99 | .css .hljs-id, 100 | .hljs-phpdoc, 101 | .hljs-title, 102 | .hljs-header, 103 | .haskell .hljs-type, 104 | .vbscript .hljs-built_in, 105 | .sql .hljs-aggregate, 106 | .rsl .hljs-built_in, 107 | .smalltalk .hljs-class, 108 | .diff .hljs-header, 109 | .hljs-chunk, 110 | .hljs-winutils, 111 | .bash .hljs-variable, 112 | .apache .hljs-tag, 113 | .tex .hljs-special, 114 | .hljs-request, 115 | .hljs-status { 116 | font-weight: bold; 117 | } 118 | 119 | .coffeescript .javascript, 120 | .javascript .xml, 121 | .tex .hljs-formula, 122 | .xml .javascript, 123 | .xml .vbscript, 124 | .xml .css, 125 | .xml .hljs-cdata { 126 | opacity: 0.5; 127 | } 128 | -------------------------------------------------------------------------------- /includes/highlight/styles/monokai_sublime.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/ 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | padding: 0.5em; 10 | background: #23241f; 11 | } 12 | 13 | .hljs, 14 | .hljs-tag, 15 | .css .hljs-rules, 16 | .css .hljs-value, 17 | .css .hljs-function 18 | .hljs-preprocessor, 19 | .hljs-pragma { 20 | color: #f8f8f2; 21 | } 22 | 23 | .hljs-strongemphasis, 24 | .hljs-strong, 25 | .hljs-emphasis { 26 | color: #a8a8a2; 27 | } 28 | 29 | .hljs-bullet, 30 | .hljs-blockquote, 31 | .hljs-horizontal_rule, 32 | .hljs-number, 33 | .hljs-regexp, 34 | .alias .hljs-keyword, 35 | .hljs-literal, 36 | .hljs-hexcolor { 37 | color: #ae81ff; 38 | } 39 | 40 | .hljs-tag .hljs-value, 41 | .hljs-code, 42 | .hljs-title, 43 | .css .hljs-class, 44 | .hljs-class .hljs-title:last-child { 45 | color: #a6e22e; 46 | } 47 | 48 | .hljs-link_url { 49 | font-size: 80%; 50 | } 51 | 52 | .hljs-strong, 53 | .hljs-strongemphasis { 54 | font-weight: bold; 55 | } 56 | 57 | .hljs-emphasis, 58 | .hljs-strongemphasis, 59 | .hljs-class .hljs-title:last-child { 60 | font-style: italic; 61 | } 62 | 63 | .hljs-keyword, 64 | .hljs-function, 65 | .hljs-change, 66 | .hljs-winutils, 67 | .hljs-flow, 68 | .lisp .hljs-title, 69 | .clojure .hljs-built_in, 70 | .nginx .hljs-title, 71 | .tex .hljs-special, 72 | .hljs-header, 73 | .hljs-attribute, 74 | .hljs-symbol, 75 | .hljs-symbol .hljs-string, 76 | .hljs-tag .hljs-title, 77 | .hljs-value, 78 | .alias .hljs-keyword:first-child, 79 | .css .hljs-tag, 80 | .css .unit, 81 | .css .hljs-important { 82 | color: #F92672; 83 | } 84 | 85 | .hljs-function .hljs-keyword, 86 | .hljs-class .hljs-keyword:first-child, 87 | .hljs-constant, 88 | .css .hljs-attribute { 89 | color: #66d9ef; 90 | } 91 | 92 | .hljs-variable, 93 | .hljs-params, 94 | .hljs-class .hljs-title { 95 | color: #f8f8f2; 96 | } 97 | 98 | .hljs-string, 99 | .css .hljs-id, 100 | .hljs-subst, 101 | .haskell .hljs-type, 102 | .ruby .hljs-class .hljs-parent, 103 | .hljs-built_in, 104 | .sql .hljs-aggregate, 105 | .django .hljs-template_tag, 106 | .django .hljs-variable, 107 | .smalltalk .hljs-class, 108 | .django .hljs-filter .hljs-argument, 109 | .smalltalk .hljs-localvars, 110 | .smalltalk .hljs-array, 111 | .hljs-attr_selector, 112 | .hljs-pseudo, 113 | .hljs-addition, 114 | .hljs-stream, 115 | .hljs-envvar, 116 | .apache .hljs-tag, 117 | .apache .hljs-cbracket, 118 | .tex .hljs-command, 119 | .hljs-prompt, 120 | .hljs-link_label, 121 | .hljs-link_url { 122 | color: #e6db74; 123 | } 124 | 125 | .hljs-comment, 126 | .hljs-javadoc, 127 | .java .hljs-annotation, 128 | .python .hljs-decorator, 129 | .hljs-template_comment, 130 | .hljs-pi, 131 | .hljs-doctype, 132 | .hljs-deletion, 133 | .hljs-shebang, 134 | .apache .hljs-sqbracket, 135 | .tex .hljs-formula { 136 | color: #75715e; 137 | } 138 | 139 | .coffeescript .javascript, 140 | .javascript .xml, 141 | .tex .hljs-formula, 142 | .xml .javascript, 143 | .xml .vbscript, 144 | .xml .css, 145 | .xml .hljs-cdata, 146 | .xml .php, 147 | .php .xml { 148 | opacity: 0.5; 149 | } 150 | -------------------------------------------------------------------------------- /includes/highlight/styles/obsidian.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Obsidian style 3 | * ported by Alexander Marenin (http://github.com/ioncreature) 4 | */ 5 | 6 | .hljs { 7 | display: block; padding: 0.5em; 8 | background: #282B2E; 9 | } 10 | 11 | .hljs-keyword, 12 | .hljs-literal, 13 | .hljs-change, 14 | .hljs-winutils, 15 | .hljs-flow, 16 | .lisp .hljs-title, 17 | .clojure .hljs-built_in, 18 | .nginx .hljs-title, 19 | .css .hljs-id, 20 | .tex .hljs-special { 21 | color: #93C763; 22 | } 23 | 24 | .hljs-number { 25 | color: #FFCD22; 26 | } 27 | 28 | .hljs { 29 | color: #E0E2E4; 30 | } 31 | 32 | .css .hljs-tag, 33 | .css .hljs-pseudo { 34 | color: #D0D2B5; 35 | } 36 | 37 | .hljs-attribute, 38 | .hljs .hljs-constant { 39 | color: #668BB0; 40 | } 41 | 42 | .xml .hljs-attribute { 43 | color: #B3B689; 44 | } 45 | 46 | .xml .hljs-tag .hljs-value { 47 | color: #E8E2B7; 48 | } 49 | 50 | .hljs-code, 51 | .hljs-class .hljs-title, 52 | .hljs-header { 53 | color: white; 54 | } 55 | 56 | .hljs-class, 57 | .hljs-hexcolor { 58 | color: #93C763; 59 | } 60 | 61 | .hljs-regexp { 62 | color: #D39745; 63 | } 64 | 65 | .hljs-at_rule, 66 | .hljs-at_rule .hljs-keyword { 67 | color: #A082BD; 68 | } 69 | 70 | .hljs-doctype { 71 | color: #557182; 72 | } 73 | 74 | .hljs-link_url, 75 | .hljs-tag, 76 | .hljs-tag .hljs-title, 77 | .hljs-bullet, 78 | .hljs-subst, 79 | .hljs-emphasis, 80 | .haskell .hljs-type, 81 | .hljs-preprocessor, 82 | .hljs-pragma, 83 | .ruby .hljs-class .hljs-parent, 84 | .hljs-built_in, 85 | .sql .hljs-aggregate, 86 | .django .hljs-template_tag, 87 | .django .hljs-variable, 88 | .smalltalk .hljs-class, 89 | .hljs-javadoc, 90 | .django .hljs-filter .hljs-argument, 91 | .smalltalk .hljs-localvars, 92 | .smalltalk .hljs-array, 93 | .hljs-attr_selector, 94 | .hljs-pseudo, 95 | .hljs-addition, 96 | .hljs-stream, 97 | .hljs-envvar, 98 | .apache .hljs-tag, 99 | .apache .hljs-cbracket, 100 | .tex .hljs-command, 101 | .hljs-prompt { 102 | color: #8CBBAD; 103 | } 104 | 105 | .hljs-string { 106 | color: #EC7600; 107 | } 108 | 109 | .hljs-comment, 110 | .java .hljs-annotation, 111 | .hljs-blockquote, 112 | .hljs-horizontal_rule, 113 | .python .hljs-decorator, 114 | .hljs-template_comment, 115 | .hljs-pi, 116 | .hljs-deletion, 117 | .hljs-shebang, 118 | .apache .hljs-sqbracket, 119 | .tex .hljs-formula { 120 | color: #818E96; 121 | } 122 | 123 | .hljs-keyword, 124 | .hljs-literal, 125 | .css .hljs-id, 126 | .hljs-phpdoc, 127 | .hljs-title, 128 | .hljs-header, 129 | .haskell .hljs-type, 130 | .vbscript .hljs-built_in, 131 | .sql .hljs-aggregate, 132 | .rsl .hljs-built_in, 133 | .smalltalk .hljs-class, 134 | .diff .hljs-header, 135 | .hljs-chunk, 136 | .hljs-winutils, 137 | .bash .hljs-variable, 138 | .apache .hljs-tag, 139 | .tex .hljs-special, 140 | .hljs-request, 141 | .hljs-at_rule .hljs-keyword, 142 | .hljs-status { 143 | font-weight: bold; 144 | } 145 | 146 | .coffeescript .javascript, 147 | .javascript .xml, 148 | .tex .hljs-formula, 149 | .xml .javascript, 150 | .xml .vbscript, 151 | .xml .css, 152 | .xml .hljs-cdata { 153 | opacity: 0.5; 154 | } 155 | -------------------------------------------------------------------------------- /includes/highlight/styles/paraiso.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (dark) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-title { 10 | color: #8d8687; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-attribute, 16 | .hljs-tag, 17 | .hljs-regexp, 18 | .ruby .hljs-constant, 19 | .xml .hljs-tag .hljs-title, 20 | .xml .hljs-pi, 21 | .xml .hljs-doctype, 22 | .html .hljs-doctype, 23 | .css .hljs-id, 24 | .css .hljs-class, 25 | .css .hljs-pseudo { 26 | color: #ef6155; 27 | } 28 | 29 | /* Paraíso Orange */ 30 | .hljs-number, 31 | .hljs-preprocessor, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #f99b15; 37 | } 38 | 39 | /* Paraíso Yellow */ 40 | .ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #fec418; 43 | } 44 | 45 | /* Paraíso Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #48b685; 53 | } 54 | 55 | /* Paraíso Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #5bc4bf; 58 | } 59 | 60 | /* Paraíso Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #06b6ef; 70 | } 71 | 72 | /* Paraíso Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #815ba4; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #2f1e2e; 81 | color: #a39e9b; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/paraiso.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (light) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-title { 10 | color: #776e71; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-attribute, 16 | .hljs-tag, 17 | .hljs-regexp, 18 | .ruby .hljs-constant, 19 | .xml .hljs-tag .hljs-title, 20 | .xml .hljs-pi, 21 | .xml .hljs-doctype, 22 | .html .hljs-doctype, 23 | .css .hljs-id, 24 | .css .hljs-class, 25 | .css .hljs-pseudo { 26 | color: #ef6155; 27 | } 28 | 29 | /* Paraíso Orange */ 30 | .hljs-number, 31 | .hljs-preprocessor, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #f99b15; 37 | } 38 | 39 | /* Paraíso Yellow */ 40 | .ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #fec418; 43 | } 44 | 45 | /* Paraíso Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #48b685; 53 | } 54 | 55 | /* Paraíso Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #5bc4bf; 58 | } 59 | 60 | /* Paraíso Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #06b6ef; 70 | } 71 | 72 | /* Paraíso Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #815ba4; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #e7e9db; 81 | color: #4f424c; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/pojoaque.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Pojoaque Style by Jason Tate 4 | http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html 5 | Based on Solarized Style from http://ethanschoonover.com/solarized 6 | 7 | */ 8 | 9 | .hljs { 10 | display: block; padding: 0.5em; 11 | color: #DCCF8F; 12 | background: url(./pojoaque.jpg) repeat scroll left top #181914; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-template_comment, 17 | .diff .hljs-header, 18 | .hljs-doctype, 19 | .lisp .hljs-string, 20 | .hljs-javadoc { 21 | color: #586e75; 22 | font-style: italic; 23 | } 24 | 25 | .hljs-keyword, 26 | .css .rule .hljs-keyword, 27 | .hljs-winutils, 28 | .javascript .hljs-title, 29 | .method, 30 | .hljs-addition, 31 | .css .hljs-tag, 32 | .clojure .hljs-title, 33 | .nginx .hljs-title { 34 | color: #B64926; 35 | } 36 | 37 | .hljs-number, 38 | .hljs-command, 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-phpdoc, 42 | .tex .hljs-formula, 43 | .hljs-regexp, 44 | .hljs-hexcolor { 45 | color: #468966; 46 | } 47 | 48 | .hljs-title, 49 | .hljs-localvars, 50 | .hljs-function .hljs-title, 51 | .hljs-chunk, 52 | .hljs-decorator, 53 | .hljs-built_in, 54 | .lisp .hljs-title, 55 | .clojure .hljs-built_in, 56 | .hljs-identifier, 57 | .hljs-id { 58 | color: #FFB03B; 59 | } 60 | 61 | .hljs-attribute, 62 | .hljs-variable, 63 | .lisp .hljs-body, 64 | .smalltalk .hljs-number, 65 | .hljs-constant, 66 | .hljs-class .hljs-title, 67 | .hljs-parent, 68 | .haskell .hljs-type { 69 | color: #b58900; 70 | } 71 | 72 | .css .hljs-attribute { 73 | color: #b89859; 74 | } 75 | 76 | .css .hljs-number, 77 | .css .hljs-hexcolor { 78 | color: #DCCF8F; 79 | } 80 | 81 | .css .hljs-class { 82 | color: #d3a60c; 83 | } 84 | 85 | .hljs-preprocessor, 86 | .hljs-pragma, 87 | .hljs-pi, 88 | .hljs-shebang, 89 | .hljs-symbol, 90 | .hljs-symbol .hljs-string, 91 | .diff .hljs-change, 92 | .hljs-special, 93 | .hljs-attr_selector, 94 | .hljs-important, 95 | .hljs-subst, 96 | .hljs-cdata { 97 | color: #cb4b16; 98 | } 99 | 100 | .hljs-deletion { 101 | color: #dc322f; 102 | } 103 | 104 | .tex .hljs-formula { 105 | background: #073642; 106 | } 107 | -------------------------------------------------------------------------------- /includes/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/includes/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /includes/highlight/styles/railscasts.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Railscasts-like style (c) Visoft, Inc. (Damien White) 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | padding: 0.5em; 10 | background: #232323; 11 | color: #E6E1DC; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-template_comment, 16 | .hljs-javadoc, 17 | .hljs-shebang { 18 | color: #BC9458; 19 | font-style: italic; 20 | } 21 | 22 | .hljs-keyword, 23 | .ruby .hljs-function .hljs-keyword, 24 | .hljs-request, 25 | .hljs-status, 26 | .nginx .hljs-title, 27 | .method, 28 | .hljs-list .hljs-title { 29 | color: #C26230; 30 | } 31 | 32 | .hljs-string, 33 | .hljs-number, 34 | .hljs-regexp, 35 | .hljs-tag .hljs-value, 36 | .hljs-cdata, 37 | .hljs-filter .hljs-argument, 38 | .hljs-attr_selector, 39 | .apache .hljs-cbracket, 40 | .hljs-date, 41 | .tex .hljs-command, 42 | .markdown .hljs-link_label { 43 | color: #A5C261; 44 | } 45 | 46 | .hljs-subst { 47 | color: #519F50; 48 | } 49 | 50 | .hljs-tag, 51 | .hljs-tag .hljs-keyword, 52 | .hljs-tag .hljs-title, 53 | .hljs-doctype, 54 | .hljs-sub .hljs-identifier, 55 | .hljs-pi, 56 | .input_number { 57 | color: #E8BF6A; 58 | } 59 | 60 | .hljs-identifier { 61 | color: #D0D0FF; 62 | } 63 | 64 | .hljs-class .hljs-title, 65 | .haskell .hljs-type, 66 | .smalltalk .hljs-class, 67 | .hljs-javadoctag, 68 | .hljs-yardoctag, 69 | .hljs-phpdoc { 70 | text-decoration: none; 71 | } 72 | 73 | .hljs-constant { 74 | color: #DA4939; 75 | } 76 | 77 | 78 | .hljs-symbol, 79 | .hljs-built_in, 80 | .ruby .hljs-symbol .hljs-string, 81 | .ruby .hljs-symbol .hljs-identifier, 82 | .markdown .hljs-link_url, 83 | .hljs-attribute { 84 | color: #6D9CBE; 85 | } 86 | 87 | .markdown .hljs-link_url { 88 | text-decoration: underline; 89 | } 90 | 91 | 92 | 93 | .hljs-params, 94 | .hljs-variable, 95 | .clojure .hljs-attribute { 96 | color: #D0D0FF; 97 | } 98 | 99 | .css .hljs-tag, 100 | .hljs-rules .hljs-property, 101 | .hljs-pseudo, 102 | .tex .hljs-special { 103 | color: #CDA869; 104 | } 105 | 106 | .css .hljs-class { 107 | color: #9B703F; 108 | } 109 | 110 | .hljs-rules .hljs-keyword { 111 | color: #C5AF75; 112 | } 113 | 114 | .hljs-rules .hljs-value { 115 | color: #CF6A4C; 116 | } 117 | 118 | .css .hljs-id { 119 | color: #8B98AB; 120 | } 121 | 122 | .hljs-annotation, 123 | .apache .hljs-sqbracket, 124 | .nginx .hljs-built_in { 125 | color: #9B859D; 126 | } 127 | 128 | .hljs-preprocessor, 129 | .hljs-preprocessor *, 130 | .hljs-pragma { 131 | color: #8996A8 !important; 132 | } 133 | 134 | .hljs-hexcolor, 135 | .css .hljs-value .hljs-number { 136 | color: #A5C261; 137 | } 138 | 139 | .hljs-title, 140 | .hljs-decorator, 141 | .css .hljs-function { 142 | color: #FFC66D; 143 | } 144 | 145 | .diff .hljs-header, 146 | .hljs-chunk { 147 | background-color: #2F33AB; 148 | color: #E6E1DC; 149 | display: inline-block; 150 | width: 100%; 151 | } 152 | 153 | .diff .hljs-change { 154 | background-color: #4A410D; 155 | color: #F8F8F8; 156 | display: inline-block; 157 | width: 100%; 158 | } 159 | 160 | .hljs-addition { 161 | background-color: #144212; 162 | color: #E6E1DC; 163 | display: inline-block; 164 | width: 100%; 165 | } 166 | 167 | .hljs-deletion { 168 | background-color: #600; 169 | color: #E6E1DC; 170 | display: inline-block; 171 | width: 100%; 172 | } 173 | 174 | .coffeescript .javascript, 175 | .javascript .xml, 176 | .tex .hljs-formula, 177 | .xml .javascript, 178 | .xml .vbscript, 179 | .xml .css, 180 | .xml .hljs-cdata { 181 | opacity: 0.7; 182 | } 183 | -------------------------------------------------------------------------------- /includes/highlight/styles/rainbow.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Style with support for rainbow parens 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | background: #474949; color: #D1D9E1; 10 | } 11 | 12 | 13 | .hljs-body, 14 | .hljs-collection { 15 | color: #D1D9E1; 16 | } 17 | 18 | .hljs-comment, 19 | .hljs-template_comment, 20 | .diff .hljs-header, 21 | .hljs-doctype, 22 | .lisp .hljs-string, 23 | .hljs-javadoc { 24 | color: #969896; 25 | font-style: italic; 26 | } 27 | 28 | .hljs-keyword, 29 | .clojure .hljs-attribute, 30 | .hljs-winutils, 31 | .javascript .hljs-title, 32 | .hljs-addition, 33 | .css .hljs-tag { 34 | color: #cc99cc; 35 | } 36 | 37 | .hljs-number { color: #f99157; } 38 | 39 | .hljs-command, 40 | .hljs-string, 41 | .hljs-tag .hljs-value, 42 | .hljs-phpdoc, 43 | .tex .hljs-formula, 44 | .hljs-regexp, 45 | .hljs-hexcolor { 46 | color: #8abeb7; 47 | } 48 | 49 | .hljs-title, 50 | .hljs-localvars, 51 | .hljs-function .hljs-title, 52 | .hljs-chunk, 53 | .hljs-decorator, 54 | .hljs-built_in, 55 | .lisp .hljs-title, 56 | .hljs-identifier 57 | { 58 | color: #b5bd68; 59 | } 60 | 61 | .hljs-class .hljs-keyword 62 | { 63 | color: #f2777a; 64 | } 65 | 66 | .hljs-variable, 67 | .lisp .hljs-body, 68 | .smalltalk .hljs-number, 69 | .hljs-constant, 70 | .hljs-class .hljs-title, 71 | .hljs-parent, 72 | .haskell .hljs-label, 73 | .hljs-id, 74 | .lisp .hljs-title, 75 | .clojure .hljs-title .hljs-built_in { 76 | color: #ffcc66; 77 | } 78 | 79 | .hljs-tag .hljs-title, 80 | .hljs-rules .hljs-property, 81 | .django .hljs-tag .hljs-keyword, 82 | .clojure .hljs-title .hljs-built_in { 83 | font-weight: bold; 84 | } 85 | 86 | .hljs-attribute, 87 | .clojure .hljs-title { 88 | color: #81a2be; 89 | } 90 | 91 | .hljs-preprocessor, 92 | .hljs-pragma, 93 | .hljs-pi, 94 | .hljs-shebang, 95 | .hljs-symbol, 96 | .hljs-symbol .hljs-string, 97 | .diff .hljs-change, 98 | .hljs-special, 99 | .hljs-attr_selector, 100 | .hljs-important, 101 | .hljs-subst, 102 | .hljs-cdata { 103 | color: #f99157; 104 | } 105 | 106 | .hljs-deletion { 107 | color: #dc322f; 108 | } 109 | 110 | .tex .hljs-formula { 111 | background: #eee8d5; 112 | } 113 | -------------------------------------------------------------------------------- /includes/highlight/styles/school_book.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | School Book style from goldblog.com.ua (c) Zaripov Yura 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 15px 0.5em 0.5em 30px; 9 | font-size: 11px !important; 10 | line-height:16px !important; 11 | } 12 | 13 | pre{ 14 | background:#f6f6ae url(./school_book.png); 15 | border-top: solid 2px #d2e8b9; 16 | border-bottom: solid 1px #d2e8b9; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-literal, 21 | .hljs-change, 22 | .hljs-winutils, 23 | .hljs-flow, 24 | .lisp .hljs-title, 25 | .clojure .hljs-built_in, 26 | .nginx .hljs-title, 27 | .tex .hljs-special { 28 | color:#005599; 29 | font-weight:bold; 30 | } 31 | 32 | .hljs, 33 | .hljs-subst, 34 | .hljs-tag .hljs-keyword { 35 | color: #3E5915; 36 | } 37 | 38 | .hljs-string, 39 | .hljs-title, 40 | .haskell .hljs-type, 41 | .hljs-tag .hljs-value, 42 | .css .hljs-rules .hljs-value, 43 | .hljs-preprocessor, 44 | .hljs-pragma, 45 | .ruby .hljs-symbol, 46 | .ruby .hljs-symbol .hljs-string, 47 | .ruby .hljs-class .hljs-parent, 48 | .hljs-built_in, 49 | .sql .hljs-aggregate, 50 | .django .hljs-template_tag, 51 | .django .hljs-variable, 52 | .smalltalk .hljs-class, 53 | .hljs-javadoc, 54 | .ruby .hljs-string, 55 | .django .hljs-filter .hljs-argument, 56 | .smalltalk .hljs-localvars, 57 | .smalltalk .hljs-array, 58 | .hljs-attr_selector, 59 | .hljs-pseudo, 60 | .hljs-addition, 61 | .hljs-stream, 62 | .hljs-envvar, 63 | .apache .hljs-tag, 64 | .apache .hljs-cbracket, 65 | .nginx .hljs-built_in, 66 | .tex .hljs-command, 67 | .coffeescript .hljs-attribute { 68 | color: #2C009F; 69 | } 70 | 71 | .hljs-comment, 72 | .java .hljs-annotation, 73 | .python .hljs-decorator, 74 | .hljs-template_comment, 75 | .hljs-pi, 76 | .hljs-doctype, 77 | .hljs-deletion, 78 | .hljs-shebang, 79 | .apache .hljs-sqbracket { 80 | color: #E60415; 81 | } 82 | 83 | .hljs-keyword, 84 | .hljs-literal, 85 | .css .hljs-id, 86 | .hljs-phpdoc, 87 | .hljs-title, 88 | .haskell .hljs-type, 89 | .vbscript .hljs-built_in, 90 | .sql .hljs-aggregate, 91 | .rsl .hljs-built_in, 92 | .smalltalk .hljs-class, 93 | .xml .hljs-tag .hljs-title, 94 | .diff .hljs-header, 95 | .hljs-chunk, 96 | .hljs-winutils, 97 | .bash .hljs-variable, 98 | .apache .hljs-tag, 99 | .tex .hljs-command, 100 | .hljs-request, 101 | .hljs-status { 102 | font-weight: bold; 103 | } 104 | 105 | .coffeescript .javascript, 106 | .javascript .xml, 107 | .tex .hljs-formula, 108 | .xml .javascript, 109 | .xml .vbscript, 110 | .xml .css, 111 | .xml .hljs-cdata { 112 | opacity: 0.5; 113 | } 114 | -------------------------------------------------------------------------------- /includes/highlight/styles/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/includes/highlight/styles/school_book.png -------------------------------------------------------------------------------- /includes/highlight/styles/solarized_dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | padding: 0.5em; 10 | background: #002b36; 11 | color: #839496; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-template_comment, 16 | .diff .hljs-header, 17 | .hljs-doctype, 18 | .hljs-pi, 19 | .lisp .hljs-string, 20 | .hljs-javadoc { 21 | color: #586e75; 22 | } 23 | 24 | /* Solarized Green */ 25 | .hljs-keyword, 26 | .hljs-winutils, 27 | .method, 28 | .hljs-addition, 29 | .css .hljs-tag, 30 | .hljs-request, 31 | .hljs-status, 32 | .nginx .hljs-title { 33 | color: #859900; 34 | } 35 | 36 | /* Solarized Cyan */ 37 | .hljs-number, 38 | .hljs-command, 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-rules .hljs-value, 42 | .hljs-phpdoc, 43 | .tex .hljs-formula, 44 | .hljs-regexp, 45 | .hljs-hexcolor, 46 | .hljs-link_url { 47 | color: #2aa198; 48 | } 49 | 50 | /* Solarized Blue */ 51 | .hljs-title, 52 | .hljs-localvars, 53 | .hljs-chunk, 54 | .hljs-decorator, 55 | .hljs-built_in, 56 | .hljs-identifier, 57 | .vhdl .hljs-literal, 58 | .hljs-id, 59 | .css .hljs-function { 60 | color: #268bd2; 61 | } 62 | 63 | /* Solarized Yellow */ 64 | .hljs-attribute, 65 | .hljs-variable, 66 | .lisp .hljs-body, 67 | .smalltalk .hljs-number, 68 | .hljs-constant, 69 | .hljs-class .hljs-title, 70 | .hljs-parent, 71 | .haskell .hljs-type, 72 | .hljs-link_reference { 73 | color: #b58900; 74 | } 75 | 76 | /* Solarized Orange */ 77 | .hljs-preprocessor, 78 | .hljs-preprocessor .hljs-keyword, 79 | .hljs-pragma, 80 | .hljs-shebang, 81 | .hljs-symbol, 82 | .hljs-symbol .hljs-string, 83 | .diff .hljs-change, 84 | .hljs-special, 85 | .hljs-attr_selector, 86 | .hljs-subst, 87 | .hljs-cdata, 88 | .clojure .hljs-title, 89 | .css .hljs-pseudo, 90 | .hljs-header { 91 | color: #cb4b16; 92 | } 93 | 94 | /* Solarized Red */ 95 | .hljs-deletion, 96 | .hljs-important { 97 | color: #dc322f; 98 | } 99 | 100 | /* Solarized Violet */ 101 | .hljs-link_label { 102 | color: #6c71c4; 103 | } 104 | 105 | .tex .hljs-formula { 106 | background: #073642; 107 | } 108 | -------------------------------------------------------------------------------- /includes/highlight/styles/solarized_light.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | padding: 0.5em; 10 | background: #fdf6e3; 11 | color: #657b83; 12 | } 13 | 14 | .hljs-comment, 15 | .hljs-template_comment, 16 | .diff .hljs-header, 17 | .hljs-doctype, 18 | .hljs-pi, 19 | .lisp .hljs-string, 20 | .hljs-javadoc { 21 | color: #93a1a1; 22 | } 23 | 24 | /* Solarized Green */ 25 | .hljs-keyword, 26 | .hljs-winutils, 27 | .method, 28 | .hljs-addition, 29 | .css .hljs-tag, 30 | .hljs-request, 31 | .hljs-status, 32 | .nginx .hljs-title { 33 | color: #859900; 34 | } 35 | 36 | /* Solarized Cyan */ 37 | .hljs-number, 38 | .hljs-command, 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-rules .hljs-value, 42 | .hljs-phpdoc, 43 | .tex .hljs-formula, 44 | .hljs-regexp, 45 | .hljs-hexcolor, 46 | .hljs-link_url { 47 | color: #2aa198; 48 | } 49 | 50 | /* Solarized Blue */ 51 | .hljs-title, 52 | .hljs-localvars, 53 | .hljs-chunk, 54 | .hljs-decorator, 55 | .hljs-built_in, 56 | .hljs-identifier, 57 | .vhdl .hljs-literal, 58 | .hljs-id, 59 | .css .hljs-function { 60 | color: #268bd2; 61 | } 62 | 63 | /* Solarized Yellow */ 64 | .hljs-attribute, 65 | .hljs-variable, 66 | .lisp .hljs-body, 67 | .smalltalk .hljs-number, 68 | .hljs-constant, 69 | .hljs-class .hljs-title, 70 | .hljs-parent, 71 | .haskell .hljs-type, 72 | .hljs-link_reference { 73 | color: #b58900; 74 | } 75 | 76 | /* Solarized Orange */ 77 | .hljs-preprocessor, 78 | .hljs-preprocessor .hljs-keyword, 79 | .hljs-pragma, 80 | .hljs-shebang, 81 | .hljs-symbol, 82 | .hljs-symbol .hljs-string, 83 | .diff .hljs-change, 84 | .hljs-special, 85 | .hljs-attr_selector, 86 | .hljs-subst, 87 | .hljs-cdata, 88 | .clojure .hljs-title, 89 | .css .hljs-pseudo, 90 | .hljs-header { 91 | color: #cb4b16; 92 | } 93 | 94 | /* Solarized Red */ 95 | .hljs-deletion, 96 | .hljs-important { 97 | color: #dc322f; 98 | } 99 | 100 | /* Solarized Violet */ 101 | .hljs-link_label { 102 | color: #6c71c4; 103 | } 104 | 105 | .tex .hljs-formula { 106 | background: #eee8d5; 107 | } 108 | -------------------------------------------------------------------------------- /includes/highlight/styles/sunburst.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Sunburst-like style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | background: #000; color: #f8f8f8; 10 | } 11 | 12 | .hljs-comment, 13 | .hljs-template_comment, 14 | .hljs-javadoc { 15 | color: #aeaeae; 16 | font-style: italic; 17 | } 18 | 19 | .hljs-keyword, 20 | .ruby .hljs-function .hljs-keyword, 21 | .hljs-request, 22 | .hljs-status, 23 | .nginx .hljs-title { 24 | color: #E28964; 25 | } 26 | 27 | .hljs-function .hljs-keyword, 28 | .hljs-sub .hljs-keyword, 29 | .method, 30 | .hljs-list .hljs-title { 31 | color: #99CF50; 32 | } 33 | 34 | .hljs-string, 35 | .hljs-tag .hljs-value, 36 | .hljs-cdata, 37 | .hljs-filter .hljs-argument, 38 | .hljs-attr_selector, 39 | .apache .hljs-cbracket, 40 | .hljs-date, 41 | .tex .hljs-command, 42 | .coffeescript .hljs-attribute { 43 | color: #65B042; 44 | } 45 | 46 | .hljs-subst { 47 | color: #DAEFA3; 48 | } 49 | 50 | .hljs-regexp { 51 | color: #E9C062; 52 | } 53 | 54 | .hljs-title, 55 | .hljs-sub .hljs-identifier, 56 | .hljs-pi, 57 | .hljs-tag, 58 | .hljs-tag .hljs-keyword, 59 | .hljs-decorator, 60 | .hljs-shebang, 61 | .hljs-prompt { 62 | color: #89BDFF; 63 | } 64 | 65 | .hljs-class .hljs-title, 66 | .haskell .hljs-type, 67 | .smalltalk .hljs-class, 68 | .hljs-javadoctag, 69 | .hljs-yardoctag, 70 | .hljs-phpdoc { 71 | text-decoration: underline; 72 | } 73 | 74 | .hljs-symbol, 75 | .ruby .hljs-symbol .hljs-string, 76 | .hljs-number { 77 | color: #3387CC; 78 | } 79 | 80 | .hljs-params, 81 | .hljs-variable, 82 | .clojure .hljs-attribute { 83 | color: #3E87E3; 84 | } 85 | 86 | .css .hljs-tag, 87 | .hljs-rules .hljs-property, 88 | .hljs-pseudo, 89 | .tex .hljs-special { 90 | color: #CDA869; 91 | } 92 | 93 | .css .hljs-class { 94 | color: #9B703F; 95 | } 96 | 97 | .hljs-rules .hljs-keyword { 98 | color: #C5AF75; 99 | } 100 | 101 | .hljs-rules .hljs-value { 102 | color: #CF6A4C; 103 | } 104 | 105 | .css .hljs-id { 106 | color: #8B98AB; 107 | } 108 | 109 | .hljs-annotation, 110 | .apache .hljs-sqbracket, 111 | .nginx .hljs-built_in { 112 | color: #9B859D; 113 | } 114 | 115 | .hljs-preprocessor, 116 | .hljs-pragma { 117 | color: #8996A8; 118 | } 119 | 120 | .hljs-hexcolor, 121 | .css .hljs-value .hljs-number { 122 | color: #DD7B3B; 123 | } 124 | 125 | .css .hljs-function { 126 | color: #DAD085; 127 | } 128 | 129 | .diff .hljs-header, 130 | .hljs-chunk, 131 | .tex .hljs-formula { 132 | background-color: #0E2231; 133 | color: #F8F8F8; 134 | font-style: italic; 135 | } 136 | 137 | .diff .hljs-change { 138 | background-color: #4A410D; 139 | color: #F8F8F8; 140 | } 141 | 142 | .hljs-addition { 143 | background-color: #253B22; 144 | color: #F8F8F8; 145 | } 146 | 147 | .hljs-deletion { 148 | background-color: #420E09; 149 | color: #F8F8F8; 150 | } 151 | 152 | .coffeescript .javascript, 153 | .javascript .xml, 154 | .tex .hljs-formula, 155 | .xml .javascript, 156 | .xml .vbscript, 157 | .xml .css, 158 | .xml .hljs-cdata { 159 | opacity: 0.5; 160 | } 161 | -------------------------------------------------------------------------------- /includes/highlight/styles/tomorrow-night-blue.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Blue Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #7285b7; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #ff9da4; 26 | } 27 | 28 | /* Tomorrow Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #ffc58f; 37 | } 38 | 39 | /* Tomorrow Yellow */ 40 | .ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #ffeead; 43 | } 44 | 45 | /* Tomorrow Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #d1f1a9; 53 | } 54 | 55 | /* Tomorrow Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #99ffff; 58 | } 59 | 60 | /* Tomorrow Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #bbdaff; 70 | } 71 | 72 | /* Tomorrow Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #ebbbff; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #002451; 81 | color: white; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Bright Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-title { 8 | color: #969896; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-attribute, 14 | .hljs-tag, 15 | .hljs-regexp, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #d54e53; 25 | } 26 | 27 | /* Tomorrow Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-pragma, 31 | .hljs-built_in, 32 | .hljs-literal, 33 | .hljs-params, 34 | .hljs-constant { 35 | color: #e78c45; 36 | } 37 | 38 | /* Tomorrow Yellow */ 39 | .ruby .hljs-class .hljs-title, 40 | .css .hljs-rules .hljs-attribute { 41 | color: #e7c547; 42 | } 43 | 44 | /* Tomorrow Green */ 45 | .hljs-string, 46 | .hljs-value, 47 | .hljs-inheritance, 48 | .hljs-header, 49 | .ruby .hljs-symbol, 50 | .xml .hljs-cdata { 51 | color: #b9ca4a; 52 | } 53 | 54 | /* Tomorrow Aqua */ 55 | .css .hljs-hexcolor { 56 | color: #70c0b1; 57 | } 58 | 59 | /* Tomorrow Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #7aa6da; 69 | } 70 | 71 | /* Tomorrow Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #c397d8; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | background: black; 80 | color: #eaeaea; 81 | padding: 0.5em; 82 | } 83 | 84 | .coffeescript .javascript, 85 | .javascript .xml, 86 | .tex .hljs-formula, 87 | .xml .javascript, 88 | .xml .vbscript, 89 | .xml .css, 90 | .xml .hljs-cdata { 91 | opacity: 0.5; 92 | } 93 | -------------------------------------------------------------------------------- /includes/highlight/styles/tomorrow-night-eighties.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Eighties Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment, 7 | .hljs-title { 8 | color: #999999; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-attribute, 14 | .hljs-tag, 15 | .hljs-regexp, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #f2777a; 25 | } 26 | 27 | /* Tomorrow Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-pragma, 31 | .hljs-built_in, 32 | .hljs-literal, 33 | .hljs-params, 34 | .hljs-constant { 35 | color: #f99157; 36 | } 37 | 38 | /* Tomorrow Yellow */ 39 | .ruby .hljs-class .hljs-title, 40 | .css .hljs-rules .hljs-attribute { 41 | color: #ffcc66; 42 | } 43 | 44 | /* Tomorrow Green */ 45 | .hljs-string, 46 | .hljs-value, 47 | .hljs-inheritance, 48 | .hljs-header, 49 | .ruby .hljs-symbol, 50 | .xml .hljs-cdata { 51 | color: #99cc99; 52 | } 53 | 54 | /* Tomorrow Aqua */ 55 | .css .hljs-hexcolor { 56 | color: #66cccc; 57 | } 58 | 59 | /* Tomorrow Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #6699cc; 69 | } 70 | 71 | /* Tomorrow Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #cc99cc; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | background: #2d2d2d; 80 | color: #cccccc; 81 | padding: 0.5em; 82 | } 83 | 84 | .coffeescript .javascript, 85 | .javascript .xml, 86 | .tex .hljs-formula, 87 | .xml .javascript, 88 | .xml .vbscript, 89 | .xml .css, 90 | .xml .hljs-cdata { 91 | opacity: 0.5; 92 | } 93 | -------------------------------------------------------------------------------- /includes/highlight/styles/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment, 8 | .hljs-title { 9 | color: #969896; 10 | } 11 | 12 | /* Tomorrow Red */ 13 | .hljs-variable, 14 | .hljs-attribute, 15 | .hljs-tag, 16 | .hljs-regexp, 17 | .ruby .hljs-constant, 18 | .xml .hljs-tag .hljs-title, 19 | .xml .hljs-pi, 20 | .xml .hljs-doctype, 21 | .html .hljs-doctype, 22 | .css .hljs-id, 23 | .css .hljs-class, 24 | .css .hljs-pseudo { 25 | color: #cc6666; 26 | } 27 | 28 | /* Tomorrow Orange */ 29 | .hljs-number, 30 | .hljs-preprocessor, 31 | .hljs-pragma, 32 | .hljs-built_in, 33 | .hljs-literal, 34 | .hljs-params, 35 | .hljs-constant { 36 | color: #de935f; 37 | } 38 | 39 | /* Tomorrow Yellow */ 40 | .ruby .hljs-class .hljs-title, 41 | .css .hljs-rules .hljs-attribute { 42 | color: #f0c674; 43 | } 44 | 45 | /* Tomorrow Green */ 46 | .hljs-string, 47 | .hljs-value, 48 | .hljs-inheritance, 49 | .hljs-header, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #b5bd68; 53 | } 54 | 55 | /* Tomorrow Aqua */ 56 | .css .hljs-hexcolor { 57 | color: #8abeb7; 58 | } 59 | 60 | /* Tomorrow Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #81a2be; 70 | } 71 | 72 | /* Tomorrow Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #b294bb; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | background: #1d1f21; 81 | color: #c5c8c6; 82 | padding: 0.5em; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /includes/highlight/styles/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment, 5 | .hljs-title { 6 | color: #8e908c; 7 | } 8 | 9 | /* Tomorrow Red */ 10 | .hljs-variable, 11 | .hljs-attribute, 12 | .hljs-tag, 13 | .hljs-regexp, 14 | .ruby .hljs-constant, 15 | .xml .hljs-tag .hljs-title, 16 | .xml .hljs-pi, 17 | .xml .hljs-doctype, 18 | .html .hljs-doctype, 19 | .css .hljs-id, 20 | .css .hljs-class, 21 | .css .hljs-pseudo { 22 | color: #c82829; 23 | } 24 | 25 | /* Tomorrow Orange */ 26 | .hljs-number, 27 | .hljs-preprocessor, 28 | .hljs-pragma, 29 | .hljs-built_in, 30 | .hljs-literal, 31 | .hljs-params, 32 | .hljs-constant { 33 | color: #f5871f; 34 | } 35 | 36 | /* Tomorrow Yellow */ 37 | .ruby .hljs-class .hljs-title, 38 | .css .hljs-rules .hljs-attribute { 39 | color: #eab700; 40 | } 41 | 42 | /* Tomorrow Green */ 43 | .hljs-string, 44 | .hljs-value, 45 | .hljs-inheritance, 46 | .hljs-header, 47 | .ruby .hljs-symbol, 48 | .xml .hljs-cdata { 49 | color: #718c00; 50 | } 51 | 52 | /* Tomorrow Aqua */ 53 | .css .hljs-hexcolor { 54 | color: #3e999f; 55 | } 56 | 57 | /* Tomorrow Blue */ 58 | .hljs-function, 59 | .python .hljs-decorator, 60 | .python .hljs-title, 61 | .ruby .hljs-function .hljs-title, 62 | .ruby .hljs-title .hljs-keyword, 63 | .perl .hljs-sub, 64 | .javascript .hljs-title, 65 | .coffeescript .hljs-title { 66 | color: #4271ae; 67 | } 68 | 69 | /* Tomorrow Purple */ 70 | .hljs-keyword, 71 | .javascript .hljs-function { 72 | color: #8959a8; 73 | } 74 | 75 | .hljs { 76 | display: block; 77 | background: white; 78 | color: #4d4d4c; 79 | padding: 0.5em; 80 | } 81 | 82 | .coffeescript .javascript, 83 | .javascript .xml, 84 | .tex .hljs-formula, 85 | .xml .javascript, 86 | .xml .vbscript, 87 | .xml .css, 88 | .xml .hljs-cdata { 89 | opacity: 0.5; 90 | } 91 | -------------------------------------------------------------------------------- /includes/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; padding: 0.5em; 8 | background: white; color: black; 9 | } 10 | 11 | .hljs-comment, 12 | .hljs-annotation, 13 | .hljs-template_comment, 14 | .diff .hljs-header, 15 | .hljs-chunk, 16 | .apache .hljs-cbracket { 17 | color: #008000; 18 | } 19 | 20 | .hljs-keyword, 21 | .hljs-id, 22 | .hljs-built_in, 23 | .smalltalk .hljs-class, 24 | .hljs-winutils, 25 | .bash .hljs-variable, 26 | .tex .hljs-command, 27 | .hljs-request, 28 | .hljs-status, 29 | .nginx .hljs-title, 30 | .xml .hljs-tag, 31 | .xml .hljs-tag .hljs-value { 32 | color: #00f; 33 | } 34 | 35 | .hljs-string, 36 | .hljs-title, 37 | .hljs-parent, 38 | .hljs-tag .hljs-value, 39 | .hljs-rules .hljs-value, 40 | .hljs-rules .hljs-value .hljs-number, 41 | .ruby .hljs-symbol, 42 | .ruby .hljs-symbol .hljs-string, 43 | .hljs-aggregate, 44 | .hljs-template_tag, 45 | .django .hljs-variable, 46 | .hljs-addition, 47 | .hljs-flow, 48 | .hljs-stream, 49 | .apache .hljs-tag, 50 | .hljs-date, 51 | .tex .hljs-formula, 52 | .coffeescript .hljs-attribute { 53 | color: #a31515; 54 | } 55 | 56 | .ruby .hljs-string, 57 | .hljs-decorator, 58 | .hljs-filter .hljs-argument, 59 | .hljs-localvars, 60 | .hljs-array, 61 | .hljs-attr_selector, 62 | .hljs-pseudo, 63 | .hljs-pi, 64 | .hljs-doctype, 65 | .hljs-deletion, 66 | .hljs-envvar, 67 | .hljs-shebang, 68 | .hljs-preprocessor, 69 | .hljs-pragma, 70 | .userType, 71 | .apache .hljs-sqbracket, 72 | .nginx .hljs-built_in, 73 | .tex .hljs-special, 74 | .hljs-prompt { 75 | color: #2b91af; 76 | } 77 | 78 | .hljs-phpdoc, 79 | .hljs-javadoc, 80 | .hljs-xmlDocTag { 81 | color: #808080; 82 | } 83 | 84 | .vhdl .hljs-typename { font-weight: bold; } 85 | .vhdl .hljs-string { color: #666666; } 86 | .vhdl .hljs-literal { color: #a31515; } 87 | .vhdl .hljs-attribute { color: #00B0E8; } 88 | 89 | .xml .hljs-attribute { color: #f00; } 90 | -------------------------------------------------------------------------------- /includes/highlight/styles/xcode.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | XCode style (c) Angel Garcia 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | background: #fff; color: black; 10 | } 11 | 12 | .hljs-comment, 13 | .hljs-template_comment, 14 | .hljs-javadoc, 15 | .hljs-comment * { 16 | color: #006a00; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-literal, 21 | .nginx .hljs-title { 22 | color: #aa0d91; 23 | } 24 | .method, 25 | .hljs-list .hljs-title, 26 | .hljs-tag .hljs-title, 27 | .setting .hljs-value, 28 | .hljs-winutils, 29 | .tex .hljs-command, 30 | .http .hljs-title, 31 | .hljs-request, 32 | .hljs-status { 33 | color: #008; 34 | } 35 | 36 | .hljs-envvar, 37 | .tex .hljs-special { 38 | color: #660; 39 | } 40 | 41 | .hljs-string { 42 | color: #c41a16; 43 | } 44 | .hljs-tag .hljs-value, 45 | .hljs-cdata, 46 | .hljs-filter .hljs-argument, 47 | .hljs-attr_selector, 48 | .apache .hljs-cbracket, 49 | .hljs-date, 50 | .hljs-regexp { 51 | color: #080; 52 | } 53 | 54 | .hljs-sub .hljs-identifier, 55 | .hljs-pi, 56 | .hljs-tag, 57 | .hljs-tag .hljs-keyword, 58 | .hljs-decorator, 59 | .ini .hljs-title, 60 | .hljs-shebang, 61 | .hljs-prompt, 62 | .hljs-hexcolor, 63 | .hljs-rules .hljs-value, 64 | .css .hljs-value .hljs-number, 65 | .hljs-symbol, 66 | .hljs-symbol .hljs-string, 67 | .hljs-number, 68 | .css .hljs-function, 69 | .clojure .hljs-title, 70 | .clojure .hljs-built_in, 71 | .hljs-function .hljs-title, 72 | .coffeescript .hljs-attribute { 73 | color: #1c00cf; 74 | } 75 | 76 | .hljs-class .hljs-title, 77 | .haskell .hljs-type, 78 | .smalltalk .hljs-class, 79 | .hljs-javadoctag, 80 | .hljs-yardoctag, 81 | .hljs-phpdoc, 82 | .hljs-typename, 83 | .hljs-tag .hljs-attribute, 84 | .hljs-doctype, 85 | .hljs-class .hljs-id, 86 | .hljs-built_in, 87 | .setting, 88 | .hljs-params, 89 | .clojure .hljs-attribute { 90 | color: #5c2699; 91 | } 92 | 93 | .hljs-variable { 94 | color: #3f6e74; 95 | } 96 | .css .hljs-tag, 97 | .hljs-rules .hljs-property, 98 | .hljs-pseudo, 99 | .hljs-subst { 100 | color: #000; 101 | } 102 | 103 | .css .hljs-class, 104 | .css .hljs-id { 105 | color: #9B703F; 106 | } 107 | 108 | .hljs-value .hljs-important { 109 | color: #ff7700; 110 | font-weight: bold; 111 | } 112 | 113 | .hljs-rules .hljs-keyword { 114 | color: #C5AF75; 115 | } 116 | 117 | .hljs-annotation, 118 | .apache .hljs-sqbracket, 119 | .nginx .hljs-built_in { 120 | color: #9B859D; 121 | } 122 | 123 | .hljs-preprocessor, 124 | .hljs-preprocessor *, 125 | .hljs-pragma { 126 | color: #643820; 127 | } 128 | 129 | .tex .hljs-formula { 130 | background-color: #EEE; 131 | font-style: italic; 132 | } 133 | 134 | .diff .hljs-header, 135 | .hljs-chunk { 136 | color: #808080; 137 | font-weight: bold; 138 | } 139 | 140 | .diff .hljs-change { 141 | background-color: #BCCFF9; 142 | } 143 | 144 | .hljs-addition { 145 | background-color: #BAEEBA; 146 | } 147 | 148 | .hljs-deletion { 149 | background-color: #FFC8BD; 150 | } 151 | 152 | .hljs-comment .hljs-yardoctag { 153 | font-weight: bold; 154 | } 155 | 156 | .method .hljs-id { 157 | color: #000; 158 | } 159 | -------------------------------------------------------------------------------- /includes/highlight/styles/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 4 | based on dark.css by Ivan Sagalaev 5 | 6 | */ 7 | 8 | .hljs { 9 | display: block; padding: 0.5em; 10 | background: #3F3F3F; 11 | color: #DCDCDC; 12 | } 13 | 14 | .hljs-keyword, 15 | .hljs-tag, 16 | .css .hljs-class, 17 | .css .hljs-id, 18 | .lisp .hljs-title, 19 | .nginx .hljs-title, 20 | .hljs-request, 21 | .hljs-status, 22 | .clojure .hljs-attribute { 23 | color: #E3CEAB; 24 | } 25 | 26 | .django .hljs-template_tag, 27 | .django .hljs-variable, 28 | .django .hljs-filter .hljs-argument { 29 | color: #DCDCDC; 30 | } 31 | 32 | .hljs-number, 33 | .hljs-date { 34 | color: #8CD0D3; 35 | } 36 | 37 | .dos .hljs-envvar, 38 | .dos .hljs-stream, 39 | .hljs-variable, 40 | .apache .hljs-sqbracket { 41 | color: #EFDCBC; 42 | } 43 | 44 | .dos .hljs-flow, 45 | .diff .hljs-change, 46 | .python .exception, 47 | .python .hljs-built_in, 48 | .hljs-literal, 49 | .tex .hljs-special { 50 | color: #EFEFAF; 51 | } 52 | 53 | .diff .hljs-chunk, 54 | .hljs-subst { 55 | color: #8F8F8F; 56 | } 57 | 58 | .dos .hljs-keyword, 59 | .python .hljs-decorator, 60 | .hljs-title, 61 | .haskell .hljs-type, 62 | .diff .hljs-header, 63 | .ruby .hljs-class .hljs-parent, 64 | .apache .hljs-tag, 65 | .nginx .hljs-built_in, 66 | .tex .hljs-command, 67 | .hljs-prompt { 68 | color: #efef8f; 69 | } 70 | 71 | .dos .hljs-winutils, 72 | .ruby .hljs-symbol, 73 | .ruby .hljs-symbol .hljs-string, 74 | .ruby .hljs-string { 75 | color: #DCA3A3; 76 | } 77 | 78 | .diff .hljs-deletion, 79 | .hljs-string, 80 | .hljs-tag .hljs-value, 81 | .hljs-preprocessor, 82 | .hljs-pragma, 83 | .hljs-built_in, 84 | .sql .hljs-aggregate, 85 | .hljs-javadoc, 86 | .smalltalk .hljs-class, 87 | .smalltalk .hljs-localvars, 88 | .smalltalk .hljs-array, 89 | .css .hljs-rules .hljs-value, 90 | .hljs-attr_selector, 91 | .hljs-pseudo, 92 | .apache .hljs-cbracket, 93 | .tex .hljs-formula, 94 | .coffeescript .hljs-attribute { 95 | color: #CC9393; 96 | } 97 | 98 | .hljs-shebang, 99 | .diff .hljs-addition, 100 | .hljs-comment, 101 | .java .hljs-annotation, 102 | .hljs-template_comment, 103 | .hljs-pi, 104 | .hljs-doctype { 105 | color: #7F9F7F; 106 | } 107 | 108 | .coffeescript .javascript, 109 | .javascript .xml, 110 | .tex .hljs-formula, 111 | .xml .javascript, 112 | .xml .vbscript, 113 | .xml .css, 114 | .xml .hljs-cdata { 115 | opacity: 0.5; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | maybe_bootstap_example_screen(); 37 | 38 | $this->directory = new stdClass(); 39 | $this->directory->plugin_root = plugin_dir_path( __FILE__ ); 40 | $this->directory->sections = plugin_dir_path( __FILE__ ) . 'sections/'; 41 | } 42 | 43 | public function admin_menu() { 44 | add_menu_page( 'Media Guide', 'Media Guide', 'manage_options', 'media-guide', array( $this, 'render_page' ) ); 45 | } 46 | 47 | /** 48 | * Enqueue scripts. 49 | */ 50 | public function admin_enqueue_scripts() { 51 | // Bail if we're not on the edit post screen. 52 | if ( get_current_screen()->base != 'toplevel_page_media-guide' ) 53 | return; 54 | 55 | wp_enqueue_media(); 56 | 57 | wp_enqueue_script( 'highlight-js', 58 | plugin_dir_url( __FILE__ ) . 'includes/highlight/highlight.pack.js' ); 59 | 60 | wp_enqueue_style( 'highlight-js', 61 | plugin_dir_url( __FILE__ ) . 'includes/highlight/styles/monokai_sublime.css' ); 62 | 63 | wp_enqueue_style( 'wp-media-backbone-tutorial', 64 | plugin_dir_url( __FILE__ ) . 'style.css' ); 65 | 66 | // Load the documentation javascript for a section page. 67 | if ( self::is_section_page() ) { 68 | wp_enqueue_script( 'wp-media-backbone-tutorial', 69 | plugin_dir_url( __FILE__ ) . 'script.js', 70 | array( 'media-views', 'media-models', 'highlight-js' ) ); 71 | } 72 | 73 | // Load the example javascript and stylesheet for an example page. 74 | if ( self::is_example_page() ) { 75 | $example_id = self::get_current_example(); 76 | 77 | $example_script_src = sprintf( plugin_dir_url( __FILE__ ) . 'sections/%s/examples/%s/script.js', 78 | WPMJG::get_current_section(), 79 | WPMJG::get_current_example() ); 80 | wp_enqueue_script( 'wp-media-backbone-tutorial-example-' . $example_id, 81 | $example_script_src, 82 | array( 'media-views', 'media-models' ) ); 83 | 84 | $example_style_src = sprintf( plugin_dir_url( __FILE__ ) . 'sections/%s/examples/%s/style.css', 85 | WPMJG::get_current_section(), 86 | WPMJG::get_current_example() ); 87 | 88 | wp_enqueue_style( 'wp-media-backbone-tutorial-example-' . $example_id, 89 | $example_style_src ); 90 | } 91 | } 92 | 93 | /** 94 | * Admin page render callback. 95 | * 96 | * If we're looking at an example page. 97 | */ 98 | public function render_page() { 99 | if ( self::is_example_page() ) { 100 | require( sprintf( 'sections/%s/examples/%s/index.php', 101 | self::get_current_section(), 102 | self::get_current_example() 103 | ) ); 104 | return; 105 | } 106 | require( plugin_dir_path( __FILE__ ) . 'templates/section.php' ); 107 | } 108 | 109 | /** 110 | * If we're on an example page, bootstrap a bit. 111 | */ 112 | public function maybe_bootstap_example_screen() { 113 | if ( ! self::is_example_page() ) 114 | return; 115 | define( 'IFRAME_REQUEST', true ); 116 | } 117 | 118 | public function admin_body_class( $classes ) { 119 | if ( self::is_example_page() ) { 120 | $classes .= ' WPMJG-example '; 121 | } 122 | return $classes; 123 | } 124 | 125 | /** 126 | * Get a url for a section. 127 | */ 128 | public static function get_section_url( $section_name = '' ) { 129 | $admin_url = get_admin_url( null, 'admin.php' ); 130 | $url = add_query_arg( array( 'page' => 'media-guide' ), $admin_url ); 131 | if ( ! empty( $section_name ) ) { 132 | $url = add_query_arg( array( 'section' => $section_name ), $url ); 133 | } 134 | return $url; 135 | } 136 | 137 | /** 138 | * Get a url for an example. 139 | */ 140 | public static function get_example_url( $section_name = '', $example_id = 1 ) { 141 | $url = self::get_section_url( $section_name ); 142 | $url = add_query_arg( array( 'example' => $example_id ), $url ); 143 | return $url; 144 | } 145 | 146 | /** 147 | * Get the current section. 148 | */ 149 | public static function get_current_section() { 150 | $section = ! empty( $_GET['section'] ) ? $_GET['section']: 'introduction'; 151 | return $section; 152 | } 153 | 154 | /** 155 | * Get the current example. 156 | */ 157 | public static function get_current_example() { 158 | $example = ! empty( $_GET['example'] ) ? $_GET['example']: ''; 159 | return $example; 160 | } 161 | 162 | /** 163 | * Whether the current page is an example page. 164 | * @return boolean 165 | */ 166 | public static function is_example_page() { 167 | return (bool) self::get_current_example(); 168 | } 169 | 170 | /** 171 | * Whether the current page is a section page. 172 | * 173 | * @return boolean 174 | */ 175 | public static function is_section_page() { 176 | $is_section_page = null; 177 | if ( (bool) self::get_current_section() && ! self::is_example_page() ) 178 | $is_section_page = true; 179 | else 180 | $is_section_page = false; 181 | return $is_section_page; 182 | } 183 | 184 | /** 185 | * Output a readable version of the markup for a section example. 186 | * 187 | * @param string $section_id 188 | * @param int $example_id 189 | */ 190 | public function the_section_example_markup( $section_id, $example_id ) { 191 | $file_path = sprintf( '%ssections/%s/examples/%s/index.php', 192 | plugin_dir_path( __FILE__ ), 193 | $section_id, 194 | $example_id ); 195 | $file_contents = file_get_contents( $file_path ); 196 | echo htmlentities( $file_contents ); 197 | } 198 | 199 | /** 200 | * Output a readable version of the javascript for a section example. 201 | * 202 | * @param string $section_id 203 | * @param int $example_id 204 | */ 205 | public function the_section_example_javascript( $section_id, $example_id ) { 206 | $file_path = sprintf( '%ssections/%s/examples/%s/script.js', 207 | plugin_dir_path( __FILE__ ), 208 | $section_id, 209 | $example_id ); 210 | $file_contents = file_get_contents( $file_path ); 211 | echo htmlentities( $file_contents ); 212 | } 213 | 214 | /** 215 | * Get a link to a section. 216 | * 217 | * @param string $section_id 218 | * @return string anchor link. 219 | */ 220 | public function get_section_link( $section_id ) { 221 | return sprintf( '%s', 222 | self::get_section_url( $section_id ), 223 | $section_id ); 224 | } 225 | 226 | /** 227 | * Output a link to a section. 228 | * 229 | * @param string $section_id 230 | */ 231 | public function the_section_link( $section_id ) { 232 | echo self::get_section_link( $section_id ); 233 | } 234 | 235 | /** 236 | * Output the "inherited from..." text. 237 | * 238 | * @param string $object 239 | */ 240 | public function inherited_from_text( $object ) { 241 | printf( 'inherited from %s', 242 | self::get_section_link( $object ) ); 243 | 244 | } 245 | 246 | } 247 | 248 | /** 249 | * Facade for singleton access. 250 | */ 251 | function WPMJG() { 252 | return WPMJG::get_instance(); 253 | } 254 | 255 | WPMJG(); -------------------------------------------------------------------------------- /screenshot-media-library.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/screenshot-media-library.png -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/screenshot.png -------------------------------------------------------------------------------- /script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( hljs.initHighlightingOnLoad ); 3 | 4 | $(document).ready( function() { 5 | $('.chapters-dropdown-trigger').on( 'click', function( event ) { 6 | event.preventDefault(); 7 | $('.chapter-index').toggleClass( 'active' ); 8 | }); 9 | }); 10 | 11 | 12 | $(document).ready( function() { 13 | $('iframe').on( 'load', function( event ) { 14 | var $iframe = $( event.currentTarget ); 15 | var innerHeight = $(event.currentTarget.contentWindow.document) 16 | .find('#wpwrap') 17 | .outerHeight() + 20 /* arbitrary border on iframe */; 18 | $iframe.css( 'height', innerHeight ); 19 | }); 20 | }); 21 | })(jQuery); 22 | 23 | -------------------------------------------------------------------------------- /sections/Introduction/index.php: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

The WordPress media library interfaces (the media modal) are a Javascript heavy 5 | feature written with Backbone. 6 | Backbone is a light, unopinionated framework that can be dropped into an existing 7 | web application without much investment, making it suitable for WordPress core, where 8 | new features need to play nicely with existing functionality and our commitment 9 | to backwards compatibility.

10 | 11 |

Javascript classes are documented in separate sections here.

12 | 13 |

FAQ

14 | 15 |

I'm writing a plugin/theme and need a user to select an attachment, and do something 16 | with that selection. Can I use the media modal to do this?

17 |

Yes! The Select workflow can do this for you.

18 | 19 |

I want to add extra fields to the edit attachment interface.

20 |

You can! Use the attachment_fields_to_edit filter to produce extra UI, and save this extra data on the edit_attachment action.

21 | 22 |

External Resources

23 | -------------------------------------------------------------------------------- /sections/Old Media Modal/index.php: -------------------------------------------------------------------------------- 1 |

Old Media Modal

2 |

As WordPress is fully backwards compatible, the previous media library is still available for use.

3 |
4 |

Enable 3.5- media modal in WP 3.5+

5 |
<?php
 6 | /**
 7 |  * Remove the new media button, add the old media button.
 8 |  */
 9 | function rejigger_media_button_actions() {
10 | 	remove_action( 'media_buttons', 'media_buttons' );
11 | 	add_action( 'media_buttons', 'old_media_buttons' );
12 | }
13 | add_action( 'admin_init', 'rejigger_media_button_actions' );
14 | 
15 | /**
16 |  * Create the HTML for the old media button.
17 |  */
18 | function old_media_buttons( $editor_id = 'content' ) {
19 | 	printf( '<a href="%s" class="thickbox add_media" id="%s-add_media" title="%s" onclick="return false;">%s</a>',
20 | 		esc_url( get_upload_iframe_src() ),
21 | 		esc_attr( $editor_id ),
22 | 		esc_attr__( 'Add Media' ),
23 | 		sprintf( 'Upload/Insert <img src="%s" width="15" height="15" />',
24 | 			esc_url( admin_url( 'images/media-button.png?ver=20111005' ) ) ) );
25 | }
26 |
-------------------------------------------------------------------------------- /sections/attachment_fields_to_edit/index.php: -------------------------------------------------------------------------------- 1 |

attachment_fields_to_edit

2 |

A filter that allows for developers to add custom UI elements to an attachment details view.

3 |

See the codex page.

-------------------------------------------------------------------------------- /sections/wp.Backbone.View/examples/1/index.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 7 | -------------------------------------------------------------------------------- /sections/wp.Backbone.View/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | // Create view and subview constructors. 4 | var ViewConstructor = wp.Backbone.View.extend({ 5 | // assign a compiled template function. 6 | template: wp.template( 'view-1' ) 7 | }); 8 | var SubviewConstructor = wp.Backbone.View.extend({ 9 | template: wp.template( 'view-2' ) 10 | }); 11 | 12 | // Create the views. 13 | var View = new ViewConstructor({ 14 | // specify an existing element in the document to bind the view to. 15 | el: '.view-1-container' 16 | }); 17 | var Subview = new SubviewConstructor(); 18 | 19 | // Set the subview on a selector inside the main view's template. 20 | View.views.set( '.subview-container', Subview ); 21 | 22 | $('.js--render-view-1').on( 'click', function() { 23 | // When a parent view is rendered, all subviews are rendered automagically. 24 | View.render(); 25 | }); 26 | }); 27 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.Backbone.View/examples/1/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/sections/wp.Backbone.View/examples/1/style.css -------------------------------------------------------------------------------- /sections/wp.Backbone.View/index.php: -------------------------------------------------------------------------------- 1 |

wp.Backbone.View

2 |

Extends Backbone.View.

3 |

Base view on top of which all views in WordPress are built on.

4 |

A Subview Manager is baked in via wp.Backbone.Subviews.

5 |
6 |

Example: Render a view with a subview

7 |

LIVE EXAMPLE open in a new window

8 | 9 |

MARKUP

10 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
11 |

An element goes in a view where a subview will be rendered (here .subview-container).

12 |

wp.template() will find templates where id="tmpl-{...}", so ID templates accordingly.

13 |

wp.template() expects Mustache-inspired templating tags (see #22344), so use them: 14 |

15 | {{{ interpolating }}},{{ 'escaping' }},<# execution #> 16 |
17 |

18 |

JAVASCRIPT

19 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
20 |
-------------------------------------------------------------------------------- /sections/wp.media()/index.php: -------------------------------------------------------------------------------- 1 |

wp.media( attributes )

2 |

Returns a media workflow.

3 |
// Returns a Select frame.
 4 | var selectFrame = wp.media({
 5 | 	// Accepts [ 'select', 'post', 'image', 'audio', 'video' ]
 6 | 	frame: 'select'
 7 | }); 
8 | See , 9 | , 10 | , 11 | , 12 | -------------------------------------------------------------------------------- /sections/wp.media.controller.Region/examples/1/index.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 | -------------------------------------------------------------------------------- /sections/wp.media.controller.Region/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | $('.js--render-region').click( function( event ) { 4 | event.preventDefault(); 5 | 6 | // A region requires a parent view to live inside. 7 | var RegionParentViewConstructor = wp.Backbone.View.extend({ 8 | // When the view is initialized, bind events to callbacks. 9 | initialize: function() { 10 | // Regions trigger events on their parent views, which 11 | // the parent view should bind callbacks for. 12 | 13 | // When the region is created: 14 | // Events triggered: {region-id}:create and {region-id}:create:{mode} 15 | this.on( 'region-1:create', this.onCreateRegion, this ); 16 | 17 | // When the region is rendered: 18 | // Events triggered: {region-id}:render and {region-id}:render:{mode} 19 | }, 20 | 21 | /** 22 | * On the "create" event, the region controller is passed as an 23 | * argument. 24 | * 25 | * This is the time to create a view on the region. 26 | */ 27 | onCreateRegion: function( region ) { 28 | // Create a basic view constructor that binds to a template. 29 | var RegionViewConstructor = wp.Backbone.View.extend({ 30 | // assign a compiled template function. 31 | template: wp.template( 'view-1' ) 32 | }); 33 | // Create the view for the region, which is automatically 34 | // rendered later. 35 | region.view = new RegionViewConstructor(); 36 | } 37 | }); 38 | // Create an instance of the RegionParentView. 39 | var RegionParentView = new RegionParentViewConstructor({ 40 | // Tie the view to an existing DOM element. 41 | el: '.region-parent-view' 42 | }); 43 | // Render the region parent view. 44 | RegionParentView.render(); 45 | 46 | // Create a new region 47 | var RegionOne = new wp.media.controller.Region({ 48 | // Unique identifier. 49 | id: 'region-1', 50 | // The region's parent view. 51 | view: RegionParentView, 52 | // The selector for the element in the parent view's markup 53 | // that represents the region. 54 | selector: '.region-1' 55 | }); 56 | // Render a mode on the region to trigger the {region}:create 57 | // event on the parent view. 58 | RegionOne.render( 'some-mode' ); 59 | }); 60 | }); 61 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.controller.Region/examples/1/style.css: -------------------------------------------------------------------------------- 1 | .region-1 { 2 | border: 1px dashed #ddd; 3 | margin-bottom: 1em; 4 | min-height: 100px; 5 | } -------------------------------------------------------------------------------- /sections/wp.media.controller.Region/examples/2/index.php: -------------------------------------------------------------------------------- 1 | 4 | 7 |
8 |
9 |
10 | 11 | -------------------------------------------------------------------------------- /sections/wp.media.controller.Region/examples/2/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | // A region requires a parent view to live inside. 4 | var RegionParentViewConstructor = wp.Backbone.View.extend({ 5 | // When the view is initialized, bind events to callbacks. 6 | initialize: function() { 7 | // Regions trigger events on their parent views, which 8 | // the parent view should bind callbacks for. 9 | 10 | // When the region is created: 11 | // Events triggered: {region-id}:create and {region-id}:create:{mode} 12 | this.on( 'region-1:create:a-mode', this.onCreateRegionInAMode, this ); 13 | this.on( 'region-1:create:b-mode', this.onCreateRegionInBMode, this ); 14 | 15 | // When the region is rendered: 16 | // Events triggered: {region-id}:render and {region-id}:render:{mode} 17 | }, 18 | 19 | /** 20 | * On the "region-1:create:a-mode" event, the region controller is passed as an 21 | * argument. 22 | * 23 | * This is the time to create a view on the region. 24 | * 25 | * Callback for rendering the region in "A mode". 26 | */ 27 | onCreateRegionInAMode: function( region ) { 28 | // Create a basic view constructor that binds to a template. 29 | var RegionViewConstructor = wp.Backbone.View.extend({ 30 | // assign a compiled template function. 31 | template: wp.template( 'view-1' ) 32 | }); 33 | // Create the view for the region, which is automatically 34 | // rendered later. 35 | region.view = new RegionViewConstructor(); 36 | }, 37 | 38 | /** 39 | * Callback for rendering the region in "B mode". 40 | */ 41 | onCreateRegionInBMode: function( region ) { 42 | // Create a basic view constructor that binds to a template. 43 | var RegionViewConstructor = wp.Backbone.View.extend({ 44 | // assign a compiled template function. 45 | template: wp.template( 'view-2' ) 46 | }); 47 | // Create the view for the region, which is automatically 48 | // rendered later. 49 | region.view = new RegionViewConstructor(); 50 | } 51 | }); 52 | // Create an instance of the RegionParentView. 53 | var RegionParentView = new RegionParentViewConstructor({ 54 | // Tie the view to an existing DOM element. 55 | el: '.region-parent-view' 56 | }); 57 | // Render the region parent view. 58 | RegionParentView.render(); 59 | 60 | // Create a new region 61 | var RegionOne = new wp.media.controller.Region({ 62 | // Unique identifier. 63 | id: 'region-1', 64 | // The region's parent view. 65 | view: RegionParentView, 66 | // The selector for the element in the parent view's markup 67 | // that represents the region. 68 | selector: '.region-1' 69 | }); 70 | $('.js--switch-region-to-a-mode').click( function( event ) { 71 | event.preventDefault(); 72 | // Trigger a mode change on the region, which will hit callbacks 73 | // on the RegionParentView ( RegionParentView.onCreateRegionInAMode() ). 74 | RegionOne.mode( 'a-mode' ); 75 | }); 76 | $('.js--switch-region-to-b-mode').click( function( event ) { 77 | event.preventDefault(); 78 | RegionOne.mode( 'b-mode' ); 79 | }); 80 | }); 81 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.controller.Region/examples/2/style.css: -------------------------------------------------------------------------------- 1 | .region-1 { 2 | border: 1px dashed #ddd; 3 | margin-bottom: 1em; 4 | min-height: 100px; 5 | } -------------------------------------------------------------------------------- /sections/wp.media.controller.Region/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.controller.region

2 |

A region is a persistent section of a layout, which can hold a view, and can be replaced by a different view as the application requires.

3 |

A region allows multiple views to be swapped in and out of a section of the page without them having to know about each other.

4 |

Regions are generally managed by the frame, using callbacks for region-specific events.

5 |

Regions are not a WordPress creation: Marionette has a region object, and Derick Bailey wrote about regions and region managers a while ago.

6 |

A mode applies a transformed state to a region.

7 |

Properties

8 |
9 |
id
10 |
Unique identifying slug for the region.
11 |
.selector
12 |
jQuery selector of the region's containing element within the frame.
13 |
_mode
14 |
The active mode of the region.
15 |
16 |

Methods

17 |
18 |
mode( mode )
19 |
Activate a mode on a region.
20 | Triggers events on the frame controller: 21 | {region-id}:deactivate:{previous-mode}, {region-id}:deactivate, {region-id}:activate:{new-mode}, and {region-id}:activate 22 |
23 |
render( mode )
24 |
Render a mode on a region. Activates the mode if it isn't already.
25 | Triggers events on the frame controller: 26 | {region-id}:create:{mode}, {region-id}:create, {region-id}:render:{new-mode}, and {region-id}:render 27 |
28 |
get()
29 |
Get the region's view.
30 |
set()
31 |
Set the region's view as a subview of the frame using the region's .selector.
32 | 33 |
trigger( event )
34 |
Trigger events on the region's frame: {region-id}:{event}:{mode} and {region-id}:{event}
35 |
36 |
37 |

Example: Render a view in a region

38 | 39 |

LIVE EXAMPLE open in a new window

40 | 41 |

Markup

42 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
43 |

Javascript

44 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
45 |
46 |
47 |

Example: Render a view in a region in two modes.

48 |

One region is created. A callback is bound to clicking either button, which triggers a mode switch on the region, filling in the region with a different view for each mode. 49 |

Live Example open in a new window

50 | 51 |

Markup

52 |
the_section_example_markup( WPMJG::get_current_section(), 2 ) ?>
53 |

Javascript

54 |
the_section_example_javascript( WPMJG::get_current_section(), 2 ) ?>
55 |
-------------------------------------------------------------------------------- /sections/wp.media.controller.State/examples/1/index.php: -------------------------------------------------------------------------------- 1 |
2 | 3 | 7 | -------------------------------------------------------------------------------- /sections/wp.media.controller.State/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | // Create view and subview constructors. 4 | var ViewConstructor = wp.Backbone.View.extend({ 5 | // assign a compiled template function. 6 | template: wp.template( 'view-1' ) 7 | }); 8 | var SubviewConstructor = wp.Backbone.View.extend({ 9 | template: wp.template( 'view-2' ) 10 | }); 11 | 12 | // Create the views. 13 | var View = new ViewConstructor({ 14 | // specify an existing element in the document to bind the view to. 15 | el: '.view-1-container' 16 | }); 17 | var Subview = new SubviewConstructor(); 18 | 19 | // Set the subview on a selector inside the main view's template. 20 | View.views.set( '.subview-container', Subview ); 21 | 22 | $('.js--render-view-1').on( 'click', function() { 23 | // When a parent view is rendered, all subviews are rendered automagically. 24 | View.render(); 25 | }); 26 | }); 27 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.controller.State/examples/1/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/sections/wp.media.controller.State/examples/1/style.css -------------------------------------------------------------------------------- /sections/wp.media.controller.State/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.controller.State

2 |

A state is a self-contained workflow step, e.g. selecting an image from the media library, or editing an image.

3 |

Extends directly from Backbone.Model. The default mode of each region is stored internally via model attributes.

4 |

Media frames, which are mixed-in with a wp.media.controller.StateMachine, include multiple states.

5 |

State boilerplate

6 |
var stateConstructor = media.controller.State.extend({
 7 | 	// autowired (see media.controller.State.constructor() ) to be called when a state
 8 | 	// is activated (see media.controller.StateMachine.setState() )
 9 | 	activate: function() {},
10 | 
11 | 	// autowired (see media.controller.State.constructor() ) to be called when a state
12 | 	// is deactivated (see media.controller.StateMachine.setState() )
13 | 	deactivate: function() {},
14 | 
15 | 	// autowired (see media.controller.State.constructor() ) to be called when a state
16 | 	// has the `reset` event triggered on it.
17 | 	reset: function() {}
18 | 
19 | 	// autowired (see media.controller.State.constructor() ) to be called when a state
20 | 	// has the `ready` event triggered on it.
21 | 	ready: function() {}
22 | 
23 | });
24 |
-------------------------------------------------------------------------------- /sections/wp.media.controller.StateMachine/examples/1/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sections/wp.media.controller.StateMachine/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | // Create a state machine. 4 | var StateMachine = new wp.media.controller.StateMachine(); 5 | 6 | // A basic state constructor we will use for both of the states. 7 | var BasicStateConstructor = wp.media.controller.State.extend({ 8 | // States expect a `frame` reference, so we'll fake it for this example. 9 | frame: { on: function() {}, off: function() {}, 10 | title: { render: function() {} }, 11 | $el: jQuery('
') 12 | }, 13 | 14 | /** 15 | * Activate callback. 16 | * 17 | * autowired (see media.controller.State.constructor() ) to be called when a state 18 | * is activated (see media.controller.StateMachine.setState() ) 19 | */ 20 | activate: function() { 21 | alert( 'The state is now ' + this.id ); 22 | } 23 | }); 24 | 25 | // Add an `on` and `off` state to the state machine. 26 | StateMachine.states.add( [ 27 | new BasicStateConstructor({ id: 'on' }), 28 | new BasicStateConstructor({ id: 'off' }) 29 | ] ); 30 | 31 | // Bind click handlers to update the current state depending on which button 32 | // is clicked. 33 | $('.js--switch-to-on-state').click( function() { 34 | StateMachine.setState( 'on' ); 35 | }); 36 | $('.js--switch-to-off-state').click( function() { 37 | StateMachine.setState( 'off' ); 38 | }); 39 | }); 40 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.controller.StateMachine/examples/1/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/sections/wp.media.controller.StateMachine/examples/1/style.css -------------------------------------------------------------------------------- /sections/wp.media.controller.StateMachine/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.controller.StateMachine

2 |

A finite-state machine is in one of a number of states at any given time.

3 |

All media frames (subclasses of media.view.Frame) are mixins that include a StateMachine.

4 |

Subclasses of wp.media.controller.State are added to a frame.

5 |

Methods

6 |
7 |
state( state )
8 |
Get a state object.
Defaults to the current state; if a state ID is supplied, returns that state.
9 |
setState( state )
10 |
Set the state.
11 | Triggers an `activate` event on the state, and a `deactivate` event on the previous state.
12 |
lastState()
13 |
Get the previously active state object.
14 |
15 |
16 |

Example: A simple state machine that toggles between two states.

17 |

Live Example open in a new window

18 | 19 |

Markup

20 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
21 |

Javascript

22 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
23 |
24 |

Further reading

25 | -------------------------------------------------------------------------------- /sections/wp.media.events/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.events

2 |

A shared event bus used to provide events into the media workflows that 3rd-party scripts can use to hook in. A clone of Backbone.Events.

3 |
4 |

Example: Tap into broadcast events.

5 |
<?php
 6 | // Hook and priority loads after tinymce.js and its plugins.
 7 | add_action( 'admin_print_footer_scripts', function() {
 8 | 	?><script>
 9 | 	(function($) {
10 | 		wp.media.events.on( 'editor:image-update', function( arguments ) {
11 | 			// arguments[0] = { Editor, image, metadata }
12 | 		});
13 | 
14 | 		wp.media.events.on( 'editor:image-edit', function( arguments ) {
15 | 			// arguments[0] = { Editor, image, metadata }
16 | 		});
17 | 
18 | 		wp.media.events.on( 'editor:frame-create', function( arguments ) {
19 | 			// arguments[0] = { frame }
20 | 		});
21 | 
22 | 	})(jQuery);
23 | 	</script>
24 | 	<?php
25 | }, 100 );
26 |
-------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Post/examples/1/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Post/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | $('.open-post-frame').on( 'click', function() { 4 | // Accepts an optional object hash to override default values. 5 | var frame = new wp.media.view.MediaFrame.Post({ 6 | // Enable/disable multiple select 7 | multiple: false, 8 | 9 | // Library WordPress query arguments. 10 | library: { 11 | order: 'ASC', 12 | 13 | // [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 14 | // 'id', 'post__in', 'menuOrder' ] 15 | orderby: 'title', 16 | 17 | // mime type. e.g. 'image', 'image/jpeg' 18 | type: 'image', 19 | 20 | // Searches the attachment title. 21 | search: null, 22 | 23 | // Attached to a specific post (ID). 24 | uploadedTo: null 25 | } 26 | }); 27 | 28 | // Fires after the frame markup has been built, but not appended to the DOM. 29 | // @see wp.media.view.Modal.attach() 30 | frame.on( 'ready', function() {} ); 31 | 32 | // Fires when the frame's $el is appended to its DOM container. 33 | // @see media.view.Modal.attach() 34 | frame.on( 'attach', function() {} ); 35 | 36 | // Fires when the modal opens (becomes visible). 37 | // @see media.view.Modal.open() 38 | frame.on( 'open', function() {} ); 39 | 40 | // Fires when the modal closes via the escape key. 41 | // @see media.view.Modal.close() 42 | frame.on( 'escape', function() {} ); 43 | 44 | // Fires when the modal closes. 45 | // @see media.view.Modal.close() 46 | frame.on( 'close', function() {} ); 47 | 48 | // Fires when a user has selected attachment(s) and clicked the insert button. 49 | // @see media.view.MediaFrame.Post.mainInsertToolbar() 50 | frame.on( 'insert', function() { 51 | var selectionCollection = frame.state().get('selection'); 52 | } ); 53 | 54 | // Fires when a state activates. 55 | frame.on( 'activate', function() {} ); 56 | 57 | // Fires when a mode is deactivated on a region. 58 | frame.on( '{region}:deactivate', function() {} ); 59 | // and a more specific event including the mode. 60 | frame.on( '{region}:deactivate:{mode}', function() {} ); 61 | 62 | // Fires when a region is ready for its view to be created. 63 | frame.on( '{region}:create', function() {} ); 64 | // and a more specific event including the mode. 65 | frame.on( '{region}:create:{mode}', function() {} ); 66 | 67 | // Fires when a region is ready for its view to be rendered. 68 | frame.on( '{region}:render', function() {} ); 69 | // and a more specific event including the mode. 70 | frame.on( '{region}:render:{mode}', function() {} ); 71 | 72 | // Fires when a new mode is activated (after it has been rendered) on a region. 73 | frame.on( '{region}:activate', function() {} ); 74 | // and a more specific event including the mode. 75 | frame.on( '{region}:activate:{mode}', function() {} ); 76 | 77 | // Get an object representing the current state. 78 | frame.state(); 79 | 80 | // Get an object representing the previous state. 81 | frame.lastState(); 82 | 83 | // Open the modal. 84 | frame.open(); 85 | }); 86 | }); 87 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Post/examples/1/style.css: -------------------------------------------------------------------------------- 1 | .open-post-frame { 2 | margin-bottom: 500px; 3 | } -------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Post/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.view.MediaFrame.Post

2 |

A workflow for choosing content in various forms (media, galleries, playlists) to insert into the content editor.

3 |

Properties

4 |
5 |
content
6 |
The content region controller object. See .
7 |
menu
8 |
The menu region controller object. See .
9 |
title
10 |
The title region controller object. See .
11 |
toolbar
12 |
The toolbar region controller object. See .
13 |
router
14 |
The router region controller object. See .
15 |
views
16 |
A subview manager. Instance of wp.Backbone.Subviews.
17 |
18 |

Methods

19 |
20 |
open()
21 |
Open the frame in a modal.
22 |
close()
23 |
Close the modal.
24 |
state( state )
25 |
Get a state object.
Defaults to the current state; if a state ID is supplied, returns that state.
26 |
setState( state )
27 |
Set the state.
28 | Triggers an `activate` event on the state, and a `deactivate` event on the previous state.
29 |
lastState()
30 |
Get the previously active state object.
31 |
32 |
33 |

Example: Open a post frame

34 |

LIVE EXAMPLE open in a new window

35 | 36 |

MARKUP

37 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
38 |

JAVASCRIPT

39 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
40 |
-------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Select/examples/1/index.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Select/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | $('.open-select-frame').on( 'click', function() { 4 | // Accepts an optional object hash to override default values. 5 | var frame = new wp.media.view.MediaFrame.Select({ 6 | // Modal title 7 | title: 'Select profile background', 8 | 9 | // Enable/disable multiple select 10 | multiple: true, 11 | 12 | // Library WordPress query arguments. 13 | library: { 14 | order: 'ASC', 15 | 16 | // [ 'name', 'author', 'date', 'title', 'modified', 'uploadedTo', 17 | // 'id', 'post__in', 'menuOrder' ] 18 | orderby: 'title', 19 | 20 | // mime type. e.g. 'image', 'image/jpeg' 21 | type: 'image', 22 | 23 | // Searches the attachment title. 24 | search: null, 25 | 26 | // Attached to a specific post (ID). 27 | uploadedTo: null 28 | }, 29 | 30 | button: { 31 | text: 'Set profile background' 32 | } 33 | }); 34 | 35 | // Fires after the frame markup has been built, but not appended to the DOM. 36 | // @see wp.media.view.Modal.attach() 37 | frame.on( 'ready', function() {} ); 38 | 39 | // Fires when the frame's $el is appended to its DOM container. 40 | // @see media.view.Modal.attach() 41 | frame.on( 'attach', function() {} ); 42 | 43 | // Fires when the modal opens (becomes visible). 44 | // @see media.view.Modal.open() 45 | frame.on( 'open', function() {} ); 46 | 47 | // Fires when the modal closes via the escape key. 48 | // @see media.view.Modal.close() 49 | frame.on( 'escape', function() {} ); 50 | 51 | // Fires when the modal closes. 52 | // @see media.view.Modal.close() 53 | frame.on( 'close', function() {} ); 54 | 55 | // Fires when a user has selected attachment(s) and clicked the select button. 56 | // @see media.view.MediaFrame.Post.mainInsertToolbar() 57 | frame.on( 'select', function() { 58 | var selectionCollection = frame.state().get('selection'); 59 | } ); 60 | 61 | // Fires when a state activates. 62 | frame.on( 'activate', function() {} ); 63 | 64 | // Fires when a mode is deactivated on a region. 65 | frame.on( '{region}:deactivate', function() {} ); 66 | // and a more specific event including the mode. 67 | frame.on( '{region}:deactivate:{mode}', function() {} ); 68 | 69 | // Fires when a region is ready for its view to be created. 70 | frame.on( '{region}:create', function() {} ); 71 | // and a more specific event including the mode. 72 | frame.on( '{region}:create:{mode}', function() {} ); 73 | 74 | // Fires when a region is ready for its view to be rendered. 75 | frame.on( '{region}:render', function() {} ); 76 | // and a more specific event including the mode. 77 | frame.on( '{region}:render:{mode}', function() {} ); 78 | 79 | // Fires when a new mode is activated (after it has been rendered) on a region. 80 | frame.on( '{region}:activate', function() {} ); 81 | // and a more specific event including the mode. 82 | frame.on( '{region}:activate:{mode}', function() {} ); 83 | 84 | // Get an object representing the current state. 85 | frame.state(); 86 | 87 | // Get an object representing the previous state. 88 | frame.lastState(); 89 | 90 | // Open the modal. 91 | frame.open(); 92 | }); 93 | }); 94 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Select/examples/1/style.css: -------------------------------------------------------------------------------- 1 | .open-select-frame { 2 | margin-bottom: 500px; 3 | } -------------------------------------------------------------------------------- /sections/wp.media.view.MediaFrame.Select/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.view.MediaFrame.Select

2 |

Extends Backbone.View, 3 | , 4 | , 5 | , 6 | . 7 | Mixes . 8 |

9 |

A workflow for choosing a single attachment from the media library.

10 |

Properties

11 |
12 |
content
13 |
The content region controller object. See .
14 |
menu
15 |
The menu region controller object. See .
16 |
title
17 |
The title region controller object. See .
18 |
toolbar
19 |
The toolbar region controller object. See .
20 |
router
21 |
The router region controller object. See .
22 |
views
23 |
A subview manager. Instance of wp.Backbone.Subviews.
24 |
25 |

Methods

26 |
27 |
open()
28 |
Open the frame in a modal.
29 |
close()
30 |
Close the modal.
31 |
state( state )
32 |
Get a state object.
Defaults to the current state; if a state ID is supplied, returns that state.
33 |
setState( state )
34 |
Set the state.
35 | Triggers an `activate` event on the state, and a `deactivate` event on the previous state.
36 |
lastState()
37 |
Get the previously active state object.
38 |
39 |
40 |

Example: Render a view with a subview

41 |

LIVE EXAMPLE open in a new window

42 | 43 |

MARKUP

44 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
45 |

JAVASCRIPT

46 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
47 |
-------------------------------------------------------------------------------- /sections/wp.media.view.Modal/examples/1/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sections/wp.media.view.Modal/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | // Create a modal view. 4 | var modal = new wp.media.view.Modal({ 5 | // A controller object is expected, but let's just pass 6 | // a fake one to illustrate this proof of concept without 7 | // getting console errors. 8 | controller: { trigger: function() {} } 9 | }); 10 | // Create a modal content view. 11 | var ModalContentView = wp.Backbone.View.extend({ 12 | template: wp.template( 'modal-content' ) 13 | }); 14 | 15 | // When the user clicks a button, open a modal. 16 | $('.js--open-media-modal').click( function( event ) { 17 | event.preventDefault(); 18 | // Assign the ModalContentView to the modal as the `content` subview. 19 | // Proxies to View.views.set( '.media-modal-content', content ); 20 | modal.content( new ModalContentView() ); 21 | // Out of the box, the modal is closed, so we need to open() it. 22 | modal.open(); 23 | }); 24 | }); 25 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.view.Modal/examples/1/style.css: -------------------------------------------------------------------------------- 1 | #wpbody { 2 | min-height: 500px; 3 | } -------------------------------------------------------------------------------- /sections/wp.media.view.Modal/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.View.Modal

2 |

A modal that can be filled with a view.

3 |

The modal can be closed and reopened without the markup changing (i.e. losing state).

4 |

The "Add Media" frames use it as a container.

5 |

Methods

6 |
7 |
open()
8 |
Open the modal.
9 |
close()
10 |
Close the modal.
11 |
12 |
13 |

Example: Open a modal

14 |

LIVE EXAMPLE open in a new window

15 | 16 |

Markup

17 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
18 |

Javascript

19 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
20 |
-------------------------------------------------------------------------------- /sections/wp.media.view.PriorityList/examples/1/index.php: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /sections/wp.media.view.PriorityList/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | var PriorityList = new wp.media.view.PriorityList(); 4 | 5 | PriorityList.set( 'fifty', new wp.Backbone.View({ 6 | el: '
fifty
', 7 | priority: 50 8 | })); 9 | 10 | PriorityList.set( 'seventy', new wp.Backbone.View({ 11 | el: '
seventy
', 12 | priority: 70 13 | })); 14 | 15 | PriorityList.set( 'thirty', new wp.Backbone.View({ 16 | el: '
thirty
', 17 | priority: 30 18 | })); 19 | 20 | PriorityList.set( 'forty', new wp.Backbone.View({ 21 | el: '
forty
', 22 | priority: 40 23 | })); 24 | 25 | PriorityList.set( 'twenty', new wp.Backbone.View({ 26 | el: '
twenty
', 27 | priority: 20 28 | })); 29 | 30 | PriorityList.render(); 31 | 32 | $('.priority-list-container').append( PriorityList.el ); 33 | }); 34 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.view.PriorityList/examples/1/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericandrewlewis/wp-media-javascript-guide/15084fdc6ef863de8cf729bc06f1c0dfbacc74be/sections/wp.media.view.PriorityList/examples/1/style.css -------------------------------------------------------------------------------- /sections/wp.media.view.PriorityList/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.view.PriorityList

2 |

Manages subviews, ordering by numerical order. Utilizes wp.Backbone.Subviews.

3 |
4 |

Example: Render multiple views in a priority list.

5 |

LIVE EXAMPLE open in a new window

6 | 7 |

MARKUP

8 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
9 |

JAVASCRIPT

10 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
11 |
-------------------------------------------------------------------------------- /sections/wp.media.view.UploaderWindow/examples/1/index.php: -------------------------------------------------------------------------------- 1 |
Drag files here...
-------------------------------------------------------------------------------- /sections/wp.media.view.UploaderWindow/examples/1/script.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready( function() { 3 | var uploaderWindow = new wp.media.view.UploaderWindow({ 4 | controller: { trigger: function() {}, on: function() {} }, 5 | uploader: { 6 | dropzone: $('.dragzone'), 7 | container: $('.dragzone') 8 | } 9 | }).render(); 10 | uploaderWindow.ready(); 11 | $('.dragzone').append( uploaderWindow.el ); 12 | }); 13 | })(jQuery); -------------------------------------------------------------------------------- /sections/wp.media.view.UploaderWindow/examples/1/style.css: -------------------------------------------------------------------------------- 1 | .dragzone { 2 | border: 1px dashed #bada55; 3 | margin-bottom: 1em; 4 | padding: 1em; 5 | min-height: 100px; 6 | } -------------------------------------------------------------------------------- /sections/wp.media.view.UploaderWindow/index.php: -------------------------------------------------------------------------------- 1 |

wp.media.view.UploaderWindow

2 |

Create a dropzone for drag-and-drop upload.

3 |
4 |

Example: Open a modal

5 |

LIVE EXAMPLE open in a new window

6 | 7 |

Markup

8 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
9 |

Javascript

10 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
11 |
-------------------------------------------------------------------------------- /sections/wp.media/index.php: -------------------------------------------------------------------------------- 1 |

wp.media

2 |

The WordPress Javascript namespace for all media elements.

3 |
4 |
media( attributes )
5 |
Creates and returns a media frame with the given attributes.
6 |
media.View
7 |
The base media view.
8 |
media.ajax()Alias of wp.ajax.send.
9 |
Send a POST request to WordPress.
10 |
media.attachment( id )
11 |
Returns an existing attachment (or creates one if it doesn't exist) in the wp.media.Attachments.all collection. Does not fetch() from the server surprisingly.
12 |
media.audio
13 |
Manages modeling of audio shortcodes in the TinyMCE editor
14 |
media.coerce()
15 |
A helper mixin function to avoid truthy and falsey values being passed as an input that expects booleans.
16 |
media.controller
17 |
Namespace for storing controllers.
18 | wp.media.controller.StateMachine wp.media.controller.State wp.media.controller.Library wp.media.controller.ImageDetails wp.media.controller.GalleryEdit wp.media.controller.GalleryAdd wp.media.controller.CollectionEdit wp.media.controller.CollectionAdd wp.media.controller.FeaturedImage wp.media.controller.ReplaceImage wp.media.controller.EditImage wp.media.controller.MediaLibrary wp.media.controller.Embed wp.media.controller.Cropper wp.media.controller.AudioDetails wp.media.controller.VideoDetails
19 |
media.editor
20 |
Manages frames that are related to TinyMCE instances(editors), including inserting content into the editor after selection.
21 |
media.events
22 |
A shared event bus used to provide events into the media workflows that 3rd-party devs can use to hook in. A clone of Backbone.Events.
23 |
media.featuredImage
24 |
Manages the frame for the Featured Image metabox.
25 |
media.fit()
26 |
Scales a set of dimensions to fit within bounding dimensions.
27 |
media.frame
28 |
A reference to the last media frame instantiated via wp.media().
29 |
media.frames
30 |
List of current media frames.
31 |
media.gallery
32 |
Manages modeling of gallery shortcodes in the TinyMCE editor
33 |
media.mixin
34 |
Mixin object that includes common functions for manipulating mediaelement.js players
35 |
media.model
36 |
Namespace containing media models.
37 |
media.playlist
38 |
Manages modeling of audio and video playlist shortcodes in the TinyMCE editor
39 |
media.postAlias of wp.ajax.post.
40 |
Send a POST request to WordPress.
41 |
media.query( props )
42 |
Return a new attachments collection(wp.media.model.Attachments) with the given query properties.
43 |
media.selectionSync
44 |
um
45 |
media.string
46 |
Helper functions to create strings. audio, image, link, props, video.
47 |
media.template( id )
48 |
Fetches and compiles a micro-template by id, proxying to _.template
49 | Expects a prefix of 'tmpl-'. e.g. template( 'attachment-details' ) equals a selector of '#tmpl-attachment-details'.
50 |
media.transition
51 |
um
52 |
media.truncate()
53 |
Truncates a string by injecting an ellipsis into the middle.
54 |
media.video
55 |
Manages modeling of video shortcodes in the TinyMCE editor
56 |
media.view
57 |
Namespace for storing all media Backbone views.
58 |
media.view.settings
59 |
Localization strings and user settings.
60 |
-------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | .chapter-index { 2 | background-color: #e1e1e1; 3 | padding: 8px 12px 6px 12px; 4 | position: relative; 5 | } 6 | .chapter-index .chapters-dropdown-trigger { 7 | border: solid 1px transparent; 8 | font-weight: 600; 9 | padding: 3px 3px 0; 10 | text-decoration: none; 11 | } 12 | 13 | .chapter-index.active .chapters-dropdown-trigger { 14 | background-color: white; 15 | -moz-border-radius-topleft: 3px; 16 | -webkit-border-top-left-radius: 3px; 17 | border-top-left-radius: 3px; 18 | -moz-border-radius-topright: 3px; 19 | -webkit-border-top-right-radius: 3px; 20 | border-top-right-radius: 3px; 21 | border: solid 1px #c6c4b8; 22 | border-bottom: none; 23 | position: relative; 24 | z-index: 10; 25 | } 26 | 27 | .chapters-dropdown-panel { 28 | display: none; 29 | position: absolute; 30 | border: solid 1px #e2e0d8; 31 | -webkit-border-radius: 5px; 32 | -moz-border-radius: 5px; 33 | -ms-border-radius: 5px; 34 | -o-border-radius: 5px; 35 | border-radius: 5px; 36 | -webkit-box-shadow: 0 1px 2px #ccc; 37 | -moz-box-shadow: 0 1px 2px #ccc; 38 | box-shadow: 0 1px 2px #ccc; 39 | top: 25px; 40 | z-index: 1; 41 | } 42 | .chapter-index.active .chapters-dropdown-panel { 43 | background-color: white; 44 | display: block; 45 | left: 0; 46 | right: 0; 47 | } 48 | .iframe-interactive-demo { 49 | border: 10px solid #222; 50 | box-sizing: border-box; 51 | width: 100%; 52 | } 53 | .WPMJG-example #wpwrap { 54 | background-color: #fff; 55 | box-sizing: border-box; 56 | padding: 10px; 57 | } 58 | .WPMJG-example #adminmenuback, 59 | .WPMJG-example #adminmenuwrap, 60 | .WPMJG-example #wpfooter { 61 | display: none; 62 | } 63 | .WPMJG-example #wpcontent { 64 | margin-left: 0; 65 | } 66 | 67 | .WPMJG-example #wpbody-content { 68 | padding-bottom: 0; 69 | } 70 | 71 | .example { 72 | margin: 0 auto; 73 | width: 80%; 74 | } 75 | .example h4 { 76 | text-transform: uppercase; 77 | } 78 | .add-new-h2 { 79 | text-transform: none; 80 | text-decoration: none; 81 | } 82 | 83 | .media-library-screenshot { 84 | width: 772px; 85 | height: 250px; 86 | width: 772px; 87 | height: 250px; 88 | background-image: url(screenshot-media-library.png); 89 | background-size: 772px 250px; 90 | position: relative; 91 | margin: 20px auto; 92 | } 93 | 94 | .vignette { 95 | position: absolute; 96 | left: 0; 97 | right: 0; 98 | bottom: 0; 99 | top: 0; 100 | padding: 20px 30px; 101 | background: rgba( 0, 0, 0, 0.6 ); 102 | background: transparent; 103 | -webkit-box-shadow: inset 0 0 50px 4px rgba( 0, 0, 0, 0.2 ), inset 0 -1px 0 rgba( 0, 0, 0, 0.1 ); 104 | -moz-box-shadow: inset 0 0 50px 4px rgba( 0, 0, 0, 0.2 ), inset 0 -1px 0 rgba( 0, 0, 0, 0.1 ); 105 | box-shadow: inset 0 0 50px 4px rgba( 0, 0, 0, 0.2 ), inset 0 -1px 0 rgba( 0, 0, 0, 0.1 ); 106 | } 107 | 108 | .entry-template { 109 | display: none; 110 | } 111 | .live-example { 112 | background: white; 113 | padding: 20px; 114 | } 115 | /* Hack to fix highlight.js being stupid */ 116 | .coffeescript .javascript, .javascript .xml, .tex .hljs-formula, .xml .javascript, .xml .vbscript, .xml .css, .xml .hljs-cdata, .xml .php, .php .xml { 117 | opacity: 1; 118 | } 119 | 120 | code { 121 | background-color: transparent; 122 | overflow: scroll; 123 | } 124 | 125 | dd { 126 | margin-left: 40px; 127 | } 128 | 129 | dl dt code, 130 | dl dd code, 131 | p code { 132 | font-weight: 700; 133 | padding: 0; 134 | } 135 | 136 | .add-new-h2 { 137 | vertical-align: middle; 138 | } 139 | 140 | figure { 141 | margin: 0 auto; 142 | max-width: 600px; 143 | text-align: center; 144 | } 145 | 146 | .inheritance-info { 147 | color: #777; 148 | font-style: italic; 149 | margin-left: 10px; 150 | } 151 | .inheritance-info code { 152 | font-style: normal; 153 | } 154 | .inheritance-info a { 155 | color: #777; 156 | } -------------------------------------------------------------------------------- /templates/404.php: -------------------------------------------------------------------------------- 1 | No documentation yet for this thing. -------------------------------------------------------------------------------- /templates/menu.php: -------------------------------------------------------------------------------- 1 |
2 | Sections ▾ 3 | 16 |
-------------------------------------------------------------------------------- /templates/section.php: -------------------------------------------------------------------------------- 1 |
2 |

WordPress Media Backbone Guide

3 | directory->sections . WPMJG::get_current_section() . '/index.php'; 6 | if ( file_exists( $section_index_path ) ) { 7 | require( $section_index_path ); 8 | } 9 | else { 10 | require( WPMJG::get_instance()->directory->plugin_root . '/templates/404.php' ); 11 | } ?> 12 |
-------------------------------------------------------------------------------- /templates/template.php: -------------------------------------------------------------------------------- 1 |
2 |

WordPress Media Backbone Guide

3 | 4 | 5 |
6 |

Title

7 |

Content

8 |
9 |

Example: title

10 |

Live Example open in a new window

11 | 12 |

Markup

13 |
the_section_example_markup( WPMJG::get_current_section(), 1 ) ?>
14 |

Javascript

15 |
the_section_example_javascript( WPMJG::get_current_section(), 1 ) ?>
16 |
17 |
18 |
--------------------------------------------------------------------------------