├── wrap-fix.css ├── README.md ├── line-number-wrap-fix.js ├── themes ├── prism-hopscotch.css ├── prism-okaidia.css ├── prism-atom-dark.css ├── prism-ghcolors.css ├── prism-default.css ├── prism-base16-ateliersulphurpool.light.css ├── prism-cb.css ├── prism-xonokai.css ├── prism-pojoaque.css └── prism-coy.css ├── Plugin.php └── prism.js /wrap-fix.css: -------------------------------------------------------------------------------- 1 | pre[class*="language-"] code 2 | { 3 | white-space: pre-wrap; 4 | word-wrap: break-word; 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 注意 ## 2 | 插件文件夹名称必须是Prismjs,否则不能生效。 3 | 4 | ## 用法 ## 5 | 使用方法很簡單,只要在\`\`\`或者\`之後輸入相應的語言即可,例如: 6 |
7 | ```c#
8 | Console.Write("Hello World!");
9 | ```
10 |
11 | 或者行內代碼:
12 |
13 | `js console.log("Hi!");`
14 |
15 |
16 | ## 效果 ##
17 | ![block.png][1]
18 | ![inline.png][2]
19 |
20 | ## 後台參數 ##
21 | 後台可以修改的參數如下:
22 |
23 | ![settings.png][3]
24 |
25 | [1]: http://i.imgur.com/UslS8xP.png
26 | [2]: http://i.imgur.com/X7NDEHh.png
27 | [3]: http://i.imgur.com/4Tnrm9v.png
28 |
--------------------------------------------------------------------------------
/line-number-wrap-fix.js:
--------------------------------------------------------------------------------
1 | function sizeLinebox(codebox)
2 | {
3 | var lines = codebox.innerHTML.split('\n');
4 | codebox.innerHTML = codebox.innerHTML + '';
5 | var lnbox = codebox.getElementsByClassName('line-numbers-rows')[0];
6 | var lnboxList = lnbox.children;
7 | var lnfix = document.getElementById('lnfix');
8 | for (var j = 0; j < lines.length - 1; j++)
9 | {
10 | lnfix.innerHTML = lines[j];
11 | if (lnfix.innerText == '')
12 | lnfix.innerHTML = ' ';
13 | var lnheight = lnfix.clientHeight;
14 | lnboxList[j].style.height = lnheight + 'px';
15 | };
16 | var node = document.getElementById('lnfix');
17 | node.parentNode.removeChild(node);
18 | }
19 |
20 | function resizeBox()
21 | {
22 | var pres = document.getElementsByTagName('pre');
23 | for (var i = 0; i < pres.length; i++)
24 | {
25 | if (pres[i].className.indexOf('language-') > -1)
26 | {
27 | var codes = pres[i].getElementsByTagName('code');
28 | for (var j = 0; j < codes.length; j++)
29 | {
30 | sizeLinebox(codes[j]);
31 | };
32 | }
33 | };
34 | }
35 |
36 | window.addEventListener('resize', function()
37 | {
38 | resizeBox();
39 | });
40 |
41 | Prism.hooks.add('complete', function (env)
42 | {
43 | if (env.code.split('\n').length > 1)
44 | {
45 | for (var i = 0; i < Prism.hooks.all.complete.length - 1; i++)
46 | Prism.hooks.all.complete[i](env);
47 | sizeLinebox(env.element);
48 | }
49 | });
50 |
--------------------------------------------------------------------------------
/themes/prism-hopscotch.css:
--------------------------------------------------------------------------------
1 | @import url(http://fonts.googleapis.com/css?family=Fira+Mono);
2 | /*
3 | * Hopscotch
4 | * by Jan T. Sott
5 | * https://github.com/idleberg/Hopscotch
6 | *
7 | * This work is licensed under the Creative Commons CC0 1.0 Universal License
8 | */
9 |
10 | code[class*="language-"],
11 | pre[class*="language-"] {
12 | color: #ffffff;
13 | font-family: "Fira Mono", Menlo, Monaco, "Lucida Console","Courier New", Courier, monospace;
14 | font-size: 16px;
15 | line-height: 1.375;
16 | direction: ltr;
17 | text-align: left;
18 | word-spacing: normal;
19 |
20 | -moz-tab-size: 4;
21 | -o-tab-size: 4;
22 | tab-size: 4;
23 |
24 | -webkit-hyphens: none;
25 | -moz-hyphens: none;
26 | -ms-hyphens: none;
27 | hyphens: none;
28 | white-space: pre;
29 | white-space: pre-wrap;
30 | word-break: break-all;
31 | word-wrap: break-word;
32 | background: #322931;
33 | color: #b9b5b8;
34 | }
35 |
36 | /* Code blocks */
37 | pre[class*="language-"] {
38 | padding: 1em;
39 | margin: .5em 0;
40 | overflow: auto;
41 | }
42 |
43 | /* Inline code */
44 | :not(pre) > code[class*="language-"] {
45 | padding: .1em;
46 | border-radius: .3em;
47 | }
48 |
49 | .token.comment,
50 | .token.prolog,
51 | .token.doctype,
52 | .token.cdata {
53 | color: #797379;
54 | }
55 |
56 | .token.punctuation {
57 | color: #b9b5b8;
58 | }
59 |
60 | .namespace {
61 | opacity: .7;
62 | }
63 |
64 | .token.null,
65 | .token.operator,
66 | .token.boolean,
67 | .token.number {
68 | color: #fd8b19;
69 | }
70 | .token.property {
71 | color: #fdcc59;
72 | }
73 | .token.tag {
74 | color: #1290bf;
75 | }
76 | .token.string {
77 | color: #149b93;
78 | }
79 | .token.selector {
80 | color: #c85e7c;
81 | }
82 | .token.attr-name {
83 | color: #fd8b19;
84 | }
85 | .token.entity,
86 | .token.url,
87 | .language-css .token.string,
88 | .style .token.string {
89 | color: #149b93;
90 | }
91 |
92 | .token.attr-value,
93 | .token.keyword,
94 | .token.control,
95 | .token.directive,
96 | .token.unit {
97 | color: #8fc13e;
98 | }
99 |
100 | .token.statement,
101 | .token.regex,
102 | .token.atrule {
103 | color: #149b93;
104 | }
105 |
106 | .token.placeholder,
107 | .token.variable {
108 | color: #1290bf;
109 | }
110 |
111 | .token.important {
112 | color: #dd464c;
113 | font-weight: bold;
114 | }
115 |
116 | .token.entity {
117 | cursor: help;
118 | }
119 |
120 | pre > code.highlight {
121 | outline: .4em solid red;
122 | outline-offset: .4em;
123 | }
124 |
125 | pre.line-numbers {
126 | position: relative;
127 | padding-left: 3.8em;
128 | counter-reset: linenumber;
129 | }
130 |
131 | pre.line-numbers > code {
132 | position: relative;
133 | }
134 |
135 | .line-numbers .line-numbers-rows {
136 | position: absolute;
137 | pointer-events: none;
138 | top: 0;
139 | font-size: 100%;
140 | left: -3.8em;
141 | width: 3em; /* works for line-numbers below 1000 lines */
142 | letter-spacing: -1px;
143 | border-right: 1px solid #999;
144 |
145 | -webkit-user-select: none;
146 | -moz-user-select: none;
147 | -ms-user-select: none;
148 | user-select: none;
149 |
150 | }
151 |
152 | .line-numbers-rows > span {
153 | pointer-events: none;
154 | display: block;
155 | counter-increment: linenumber;
156 | }
157 |
158 | .line-numbers-rows > span:before {
159 | content: counter(linenumber);
160 | color: #999;
161 | display: block;
162 | padding-right: 0.8em;
163 | text-align: right;
164 | }
165 |
166 | div.prism-show-language {
167 | position: relative;
168 | }
169 |
170 | div.prism-show-language > div.prism-show-language-label[data-language] {
171 | color: black;
172 | background-color: #CFCFCF;
173 | display: inline-block;
174 | position: absolute;
175 | bottom: auto;
176 | left: auto;
177 | top: 0;
178 | right: 0;
179 | width: auto;
180 | height: auto;
181 | font-size: 0.9em;
182 | border-radius: 0 0 0 5px;
183 | padding: 0 0.5em;
184 | text-shadow: none;
185 | z-index: 1;
186 | -webkit-box-shadow: none;
187 | -moz-box-shadow: none;
188 | box-shadow: none;
189 | -webkit-transform: none;
190 | -moz-transform: none;
191 | -ms-transform: none;
192 | -o-transform: none;
193 | transform: none;
194 | }
195 |
196 |
--------------------------------------------------------------------------------
/themes/prism-okaidia.css:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */
2 | /**
3 | * okaidia theme for JavaScript, CSS and HTML
4 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/
5 | * @author ocodia
6 | */
7 |
8 | code[class*="language-"],
9 | pre[class*="language-"] {
10 | color: #f8f8f2;
11 | text-shadow: 0 1px rgba(0, 0, 0, 0.3);
12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13 | direction: ltr;
14 | text-align: left;
15 | white-space: pre;
16 | word-spacing: normal;
17 | word-break: normal;
18 | word-wrap: normal;
19 | line-height: 1.5;
20 |
21 | -moz-tab-size: 4;
22 | -o-tab-size: 4;
23 | tab-size: 4;
24 |
25 | -webkit-hyphens: none;
26 | -moz-hyphens: none;
27 | -ms-hyphens: none;
28 | hyphens: none;
29 | }
30 |
31 | /* Code blocks */
32 | pre[class*="language-"] {
33 | padding: 1em;
34 | margin: .5em 0;
35 | overflow: auto;
36 | border-radius: 0.3em;
37 | }
38 |
39 | :not(pre) > code[class*="language-"],
40 | pre[class*="language-"] {
41 | background: #272822;
42 | }
43 |
44 | /* Inline code */
45 | :not(pre) > code[class*="language-"] {
46 | padding: .1em;
47 | border-radius: .3em;
48 | white-space: normal;
49 | }
50 |
51 | .token.comment,
52 | .token.prolog,
53 | .token.doctype,
54 | .token.cdata {
55 | color: slategray;
56 | }
57 |
58 | .token.punctuation {
59 | color: #f8f8f2;
60 | }
61 |
62 | .namespace {
63 | opacity: .7;
64 | }
65 |
66 | .token.property,
67 | .token.tag,
68 | .token.constant,
69 | .token.symbol,
70 | .token.deleted {
71 | color: #f92672;
72 | }
73 |
74 | .token.boolean,
75 | .token.number {
76 | color: #ae81ff;
77 | }
78 |
79 | .token.selector,
80 | .token.attr-name,
81 | .token.string,
82 | .token.char,
83 | .token.builtin,
84 | .token.inserted {
85 | color: #a6e22e;
86 | }
87 |
88 | .token.operator,
89 | .token.entity,
90 | .token.url,
91 | .language-css .token.string,
92 | .style .token.string,
93 | .token.variable {
94 | color: #f8f8f2;
95 | }
96 |
97 | .token.atrule,
98 | .token.attr-value,
99 | .token.function {
100 | color: #e6db74;
101 | }
102 |
103 | .token.keyword {
104 | color: #66d9ef;
105 | }
106 |
107 | .token.regex,
108 | .token.important {
109 | color: #fd971f;
110 | }
111 |
112 | .token.important,
113 | .token.bold {
114 | font-weight: bold;
115 | }
116 | .token.italic {
117 | font-style: italic;
118 | }
119 |
120 | .token.entity {
121 | cursor: help;
122 | }
123 |
124 | pre.line-numbers {
125 | position: relative;
126 | padding-left: 3.8em;
127 | counter-reset: linenumber;
128 | }
129 |
130 | pre.line-numbers > code {
131 | position: relative;
132 | }
133 |
134 | .line-numbers .line-numbers-rows {
135 | position: absolute;
136 | pointer-events: none;
137 | top: 0;
138 | font-size: 100%;
139 | left: -3.8em;
140 | width: 3em; /* works for line-numbers below 1000 lines */
141 | letter-spacing: -1px;
142 | border-right: 1px solid #999;
143 |
144 | -webkit-user-select: none;
145 | -moz-user-select: none;
146 | -ms-user-select: none;
147 | user-select: none;
148 |
149 | }
150 |
151 | .line-numbers-rows > span {
152 | pointer-events: none;
153 | display: block;
154 | counter-increment: linenumber;
155 | }
156 |
157 | .line-numbers-rows > span:before {
158 | content: counter(linenumber);
159 | color: #999;
160 | display: block;
161 | padding-right: 0.8em;
162 | text-align: right;
163 | }
164 |
165 | div.prism-show-language {
166 | position: relative;
167 | }
168 |
169 | div.prism-show-language > div.prism-show-language-label[data-language] {
170 | color: black;
171 | background-color: #CFCFCF;
172 | display: inline-block;
173 | position: absolute;
174 | bottom: auto;
175 | left: auto;
176 | top: 0;
177 | right: 0;
178 | width: auto;
179 | height: auto;
180 | font-size: 0.9em;
181 | border-radius: 0 0 0 5px;
182 | padding: 0 0.5em;
183 | text-shadow: none;
184 | z-index: 1;
185 | -webkit-box-shadow: none;
186 | -moz-box-shadow: none;
187 | box-shadow: none;
188 | -webkit-transform: none;
189 | -moz-transform: none;
190 | -ms-transform: none;
191 | -o-transform: none;
192 | transform: none;
193 | }
194 |
195 |
--------------------------------------------------------------------------------
/themes/prism-atom-dark.css:
--------------------------------------------------------------------------------
1 | /**
2 | * atom-dark theme for `prism.js`
3 | * Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax
4 | * @author Joe Gibson (@gibsjose)
5 | */
6 |
7 | code[class*="language-"],
8 | pre[class*="language-"] {
9 | color: #c5c8c6;
10 | text-shadow: 0 1px rgba(0, 0, 0, 0.3);
11 | font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
12 | direction: ltr;
13 | text-align: left;
14 | white-space: pre;
15 | word-spacing: normal;
16 | word-break: normal;
17 | line-height: 1.5;
18 |
19 | -moz-tab-size: 4;
20 | -o-tab-size: 4;
21 | tab-size: 4;
22 |
23 | -webkit-hyphens: none;
24 | -moz-hyphens: none;
25 | -ms-hyphens: none;
26 | hyphens: none;
27 | }
28 |
29 | /* Code blocks */
30 | pre[class*="language-"] {
31 | padding: 1em;
32 | margin: .5em 0;
33 | overflow: auto;
34 | border-radius: 0.3em;
35 | }
36 |
37 | :not(pre) > code[class*="language-"],
38 | pre[class*="language-"] {
39 | background: #1d1f21;
40 | }
41 |
42 | /* Inline code */
43 | :not(pre) > code[class*="language-"] {
44 | padding: .1em;
45 | border-radius: .3em;
46 | }
47 |
48 | .token.comment,
49 | .token.prolog,
50 | .token.doctype,
51 | .token.cdata {
52 | color: #7C7C7C;
53 | }
54 |
55 | .token.punctuation {
56 | color: #c5c8c6;
57 | }
58 |
59 | .namespace {
60 | opacity: .7;
61 | }
62 |
63 | .token.property,
64 | .token.keyword,
65 | .token.tag {
66 | color: #96CBFE;
67 | }
68 |
69 | .token.class-name {
70 | color: #FFFFB6;
71 | text-decoration: underline;
72 | }
73 |
74 | .token.boolean,
75 | .token.constant {
76 | color: #99CC99;
77 | }
78 |
79 | .token.symbol,
80 | .token.deleted {
81 | color: #f92672;
82 | }
83 |
84 | .token.number {
85 | color: #FF73FD;
86 | }
87 |
88 | .token.selector,
89 | .token.attr-name,
90 | .token.string,
91 | .token.char,
92 | .token.builtin,
93 | .token.inserted {
94 | color: #A8FF60;
95 | }
96 |
97 | .token.variable {
98 | color: #C6C5FE;
99 | }
100 |
101 | .token.operator {
102 | color: #EDEDED;
103 | }
104 |
105 | .token.entity {
106 | color: #FFFFB6;
107 | /* text-decoration: underline; */
108 | }
109 |
110 | .token.url {
111 | color: #96CBFE;
112 | }
113 |
114 | .language-css .token.string,
115 | .style .token.string {
116 | color: #87C38A;
117 | }
118 |
119 | .token.atrule,
120 | .token.attr-value {
121 | color: #F9EE98;
122 | }
123 |
124 | .token.function {
125 | color: #DAD085;
126 | }
127 |
128 | .token.regex {
129 | color: #E9C062;
130 | }
131 |
132 | .token.important {
133 | color: #fd971f;
134 | }
135 |
136 | .token.important,
137 | .token.bold {
138 | font-weight: bold;
139 | }
140 | .token.italic {
141 | font-style: italic;
142 | }
143 |
144 | .token.entity {
145 | cursor: help;
146 | }
147 |
148 | pre.line-numbers {
149 | position: relative;
150 | padding-left: 3.8em;
151 | counter-reset: linenumber;
152 | }
153 |
154 | pre.line-numbers > code {
155 | position: relative;
156 | }
157 |
158 | .line-numbers .line-numbers-rows {
159 | position: absolute;
160 | pointer-events: none;
161 | top: 0;
162 | font-size: 100%;
163 | left: -3.8em;
164 | width: 3em; /* works for line-numbers below 1000 lines */
165 | letter-spacing: -1px;
166 | border-right: 1px solid #999;
167 |
168 | -webkit-user-select: none;
169 | -moz-user-select: none;
170 | -ms-user-select: none;
171 | user-select: none;
172 |
173 | }
174 |
175 | .line-numbers-rows > span {
176 | pointer-events: none;
177 | display: block;
178 | counter-increment: linenumber;
179 | }
180 |
181 | .line-numbers-rows > span:before {
182 | content: counter(linenumber);
183 | color: #999;
184 | display: block;
185 | padding-right: 0.8em;
186 | text-align: right;
187 | }
188 |
189 | div.prism-show-language {
190 | position: relative;
191 | }
192 |
193 | div.prism-show-language > div.prism-show-language-label[data-language] {
194 | color: black;
195 | background-color: #CFCFCF;
196 | display: inline-block;
197 | position: absolute;
198 | bottom: auto;
199 | left: auto;
200 | top: 0;
201 | right: 0;
202 | width: auto;
203 | height: auto;
204 | font-size: 0.9em;
205 | border-radius: 0 0 0 5px;
206 | padding: 0 0.5em;
207 | text-shadow: none;
208 | z-index: 1;
209 | -webkit-box-shadow: none;
210 | -moz-box-shadow: none;
211 | box-shadow: none;
212 | -webkit-transform: none;
213 | -moz-transform: none;
214 | -ms-transform: none;
215 | -o-transform: none;
216 | transform: none;
217 | }
218 |
--------------------------------------------------------------------------------
/themes/prism-ghcolors.css:
--------------------------------------------------------------------------------
1 | /**
2 | * GHColors theme by Avi Aryan (http://aviaryan.in)
3 | * Inspired by Github syntax coloring
4 | */
5 |
6 | code[class*="language-"],
7 | pre[class*="language-"] {
8 | color: #393A34;
9 | font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
10 | direction: ltr;
11 | text-align: left;
12 | white-space: pre;
13 | word-spacing: normal;
14 | word-break: normal;
15 | font-size: 0.95em;
16 | line-height: 1.2em;
17 |
18 | -moz-tab-size: 4;
19 | -o-tab-size: 4;
20 | tab-size: 4;
21 |
22 | -webkit-hyphens: none;
23 | -moz-hyphens: none;
24 | -ms-hyphens: none;
25 | hyphens: none;
26 | }
27 |
28 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
29 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
30 | background: #b3d4fc;
31 | }
32 |
33 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
34 | code[class*="language-"]::selection, code[class*="language-"] ::selection {
35 | background: #b3d4fc;
36 | }
37 |
38 | /* Code blocks */
39 | pre[class*="language-"] {
40 | padding: 1em;
41 | margin: .5em 0;
42 | overflow: auto;
43 | border: 1px solid #dddddd;
44 | background-color: white;
45 | }
46 |
47 | :not(pre) > code[class*="language-"],
48 | pre[class*="language-"] {
49 | }
50 |
51 | /* Inline code */
52 | :not(pre) > code[class*="language-"] {
53 | padding: .2em;
54 | padding-top: 1px; padding-bottom: 1px;
55 | background: #f8f8f8;
56 | border: 1px solid #dddddd;
57 | }
58 |
59 | .token.comment,
60 | .token.prolog,
61 | .token.doctype,
62 | .token.cdata {
63 | color: #999988; font-style: italic;
64 | }
65 |
66 | .token.namespace {
67 | opacity: .7;
68 | }
69 |
70 | .token.string,
71 | .token.attr-value {
72 | color: #e3116c;
73 | }
74 | .token.punctuation,
75 | .token.operator {
76 | color: #393A34; /* no highlight */
77 | }
78 |
79 | .token.entity,
80 | .token.url,
81 | .token.symbol,
82 | .token.number,
83 | .token.boolean,
84 | .token.variable,
85 | .token.constant,
86 | .token.property,
87 | .token.regex,
88 | .token.inserted {
89 | color: #36acaa;
90 | }
91 |
92 | .token.atrule,
93 | .token.keyword,
94 | .token.attr-name,
95 | .language-autohotkey .token.selector {
96 | color: #00a4db;
97 | }
98 |
99 | .token.function,
100 | .token.deleted,
101 | .language-autohotkey .token.tag {
102 | color: #9a050f;
103 | }
104 |
105 | .token.tag,
106 | .token.selector,
107 | .language-autohotkey .token.keyword {
108 | color: #00009f;
109 | }
110 |
111 | .token.important,
112 | .token.function,
113 | .token.bold {
114 | font-weight: bold;
115 | }
116 |
117 | .token.italic {
118 | font-style: italic;
119 | }
120 |
121 | pre.line-numbers {
122 | position: relative;
123 | padding-left: 3.8em;
124 | counter-reset: linenumber;
125 | }
126 |
127 | pre.line-numbers > code {
128 | position: relative;
129 | }
130 |
131 | .line-numbers .line-numbers-rows {
132 | position: absolute;
133 | pointer-events: none;
134 | top: 0;
135 | font-size: 100%;
136 | left: -3.8em;
137 | width: 3em; /* works for line-numbers below 1000 lines */
138 | letter-spacing: -1px;
139 | border-right: 1px solid #999;
140 |
141 | -webkit-user-select: none;
142 | -moz-user-select: none;
143 | -ms-user-select: none;
144 | user-select: none;
145 |
146 | }
147 |
148 | .line-numbers-rows > span {
149 | pointer-events: none;
150 | display: block;
151 | counter-increment: linenumber;
152 | }
153 |
154 | .line-numbers-rows > span:before {
155 | content: counter(linenumber);
156 | color: #999;
157 | display: block;
158 | padding-right: 0.8em;
159 | text-align: right;
160 | }
161 |
162 | div.prism-show-language {
163 | position: relative;
164 | }
165 |
166 | div.prism-show-language > div.prism-show-language-label[data-language] {
167 | color: black;
168 | background-color: #CFCFCF;
169 | display: inline-block;
170 | position: absolute;
171 | bottom: auto;
172 | left: auto;
173 | top: 0;
174 | right: 0;
175 | width: auto;
176 | height: auto;
177 | font-size: 0.9em;
178 | border-radius: 0 0 0 5px;
179 | padding: 0 0.5em;
180 | text-shadow: none;
181 | z-index: 1;
182 | -webkit-box-shadow: none;
183 | -moz-box-shadow: none;
184 | box-shadow: none;
185 | -webkit-transform: none;
186 | -moz-transform: none;
187 | -ms-transform: none;
188 | -o-transform: none;
189 | transform: none;
190 | }
--------------------------------------------------------------------------------
/Plugin.php:
--------------------------------------------------------------------------------
1 | contentEx = array('Prismjs_Plugin', 'parse');
15 | Typecho_Plugin::factory('Widget_Abstract_Comments')->contentEx = array('Prismjs_Plugin', 'parse');
16 | Typecho_Plugin::factory('Widget_Archive')->header = array('Prismjs_Plugin', 'header');
17 | Typecho_Plugin::factory('Widget_Archive')->footer = array('Prismjs_Plugin', 'footer');
18 | }
19 |
20 | public static function deactivate() {}
21 | public static function personalConfig(Typecho_Widget_Helper_Form $form) {}
22 |
23 | public static function config(Typecho_Widget_Helper_Form $form)
24 | {
25 | $help = new Typecho_Widget_Helper_Layout('div', array('style' => 'color: #999; background-color: #eee; border-radius: 10px; padding: 10px;'));
26 | $help->html("使用方法```c#\nConsole.Write(\"Hello World!\");\n```\n或行内代码\n`js console.log(\"Hi!\");`"); 27 | $form->addItem($help); 28 | 29 | $themes = array_map('basename', glob(dirname(__FILE__) . '/themes/*.css')); 30 | $themes = array_combine($themes, $themes); 31 | $theme = new Typecho_Widget_Helper_Form_Element_Select('theme', $themes, 'prism-coy.css', _t('代码样式')); 32 | $form->addInput($theme->addRule('enum', _t('必须选择样式'), $themes)); 33 | 34 | $showLineNumber = new Typecho_Widget_Helper_Form_Element_Checkbox('showln', array('showln' => _t('显示行号')), array('showln'), _t('是否在大段代码左侧显示行号')); 35 | $form->addInput($showLineNumber); 36 | 37 | $forceWrap = new Typecho_Widget_Helper_Form_Element_Checkbox('forceWrap', array('forceWrap' => _t('强制换行')), array('forceWrap'), _t('是否强制换行')); 38 | $form->addInput($forceWrap); 39 | 40 | $showLang = new Typecho_Widget_Helper_Form_Element_Checkbox('showlang', array('showlang' => _t('显示语言标签')), array('showlang'), _t('是否在大段代码右上角显示语言')); 41 | $form->addInput($showLang); 42 | } 43 | 44 | public static function header() 45 | { 46 | $themeUrl = Helper::options()->pluginUrl . '/Prismjs/themes/' . Helper::options()->plugin('Prismjs')->theme; 47 | echo ''; 48 | if (!Helper::options()->plugin('Prismjs')->showlang) 49 | echo ""; 50 | if (Helper::options()->plugin('Prismjs')->forceWrap) 51 | echo ''; 52 | } 53 | 54 | public static function footer() 55 | { 56 | if (Helper::options()->plugin('Prismjs')->showln) 57 | echo ""; 62 | $jsUrl = Helper::options()->pluginUrl . '/Prismjs/prism.js'; 63 | echo ''; 64 | if (Helper::options()->plugin('Prismjs')->forceWrap && Helper::options()->plugin('Prismjs')->showln) 65 | echo ''; 66 | } 67 | 68 | public static function parse($text, $widget, $lastResult) 69 | { 70 | $text = empty($lastResult) ? $text : $lastResult; 71 | 72 | $text = preg_replace('/
(c#|py|yml|c\+\+|bat|as|js|markup|css|clike|javascript|actionscript|applescript|aspnet|bash|basic|batch|cpp|csharp|c|coffeescript|ruby|css-extras|go|groovy|java|latex|lua|markdown|objectivec|php|php-extras|powershell|python|sass|scss|sql|swift|yaml)\s/i', '', $text);
73 | $text = preg_replace_callback('//i', function($m) { return ''; }, $text);
74 | $text = str_replace('language-c#', 'language-csharp', $text);
75 | $text = str_replace('language-yml', 'language-yaml', $text);
76 | $text = str_replace('language-bat"', 'language-batch"', $text);
77 | $text = str_replace('language-c++', 'language-cpp', $text);
78 | $text = str_replace('language-as"', 'language-actionscript"', $text);
79 | $text = str_replace('language-js', 'language-javascript', $text);
80 | $text = str_replace('language-py"', 'language-python"', $text);
81 | $text = str_replace('', '', $text);
82 |
83 | return $text;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/themes/prism-default.css:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */
2 | /**
3 | * prism.js default theme for JavaScript, CSS and HTML
4 | * Based on dabblet (http://dabblet.com)
5 | * @author Lea Verou
6 | */
7 |
8 | code[class*="language-"],
9 | pre[class*="language-"] {
10 | color: black;
11 | text-shadow: 0 1px white;
12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
13 | direction: ltr;
14 | text-align: left;
15 | white-space: pre;
16 | word-spacing: normal;
17 | word-break: normal;
18 | word-wrap: normal;
19 | line-height: 1.5;
20 |
21 | -moz-tab-size: 4;
22 | -o-tab-size: 4;
23 | tab-size: 4;
24 |
25 | -webkit-hyphens: none;
26 | -moz-hyphens: none;
27 | -ms-hyphens: none;
28 | hyphens: none;
29 | }
30 |
31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
33 | text-shadow: none;
34 | background: #b3d4fc;
35 | }
36 |
37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
38 | code[class*="language-"]::selection, code[class*="language-"] ::selection {
39 | text-shadow: none;
40 | background: #b3d4fc;
41 | }
42 |
43 | @media print {
44 | code[class*="language-"],
45 | pre[class*="language-"] {
46 | text-shadow: none;
47 | }
48 | }
49 |
50 | /* Code blocks */
51 | pre[class*="language-"] {
52 | padding: 1em;
53 | margin: .5em 0;
54 | overflow: auto;
55 | }
56 |
57 | :not(pre) > code[class*="language-"],
58 | pre[class*="language-"] {
59 | background: #f5f2f0;
60 | }
61 |
62 | /* Inline code */
63 | :not(pre) > code[class*="language-"] {
64 | padding: .1em;
65 | border-radius: .3em;
66 | white-space: normal;
67 | }
68 |
69 | .token.comment,
70 | .token.prolog,
71 | .token.doctype,
72 | .token.cdata {
73 | color: slategray;
74 | }
75 |
76 | .token.punctuation {
77 | color: #999;
78 | }
79 |
80 | .namespace {
81 | opacity: .7;
82 | }
83 |
84 | .token.property,
85 | .token.tag,
86 | .token.boolean,
87 | .token.number,
88 | .token.constant,
89 | .token.symbol,
90 | .token.deleted {
91 | color: #905;
92 | }
93 |
94 | .token.selector,
95 | .token.attr-name,
96 | .token.string,
97 | .token.char,
98 | .token.builtin,
99 | .token.inserted {
100 | color: #690;
101 | }
102 |
103 | .token.operator,
104 | .token.entity,
105 | .token.url,
106 | .language-css .token.string,
107 | .style .token.string {
108 | color: #a67f59;
109 | background: hsla(0, 0%, 100%, .5);
110 | }
111 |
112 | .token.atrule,
113 | .token.attr-value,
114 | .token.keyword {
115 | color: #07a;
116 | }
117 |
118 | .token.function {
119 | color: #DD4A68;
120 | }
121 |
122 | .token.regex,
123 | .token.important,
124 | .token.variable {
125 | color: #e90;
126 | }
127 |
128 | .token.important,
129 | .token.bold {
130 | font-weight: bold;
131 | }
132 | .token.italic {
133 | font-style: italic;
134 | }
135 |
136 | .token.entity {
137 | cursor: help;
138 | }
139 |
140 | pre.line-numbers {
141 | position: relative;
142 | padding-left: 3.8em;
143 | counter-reset: linenumber;
144 | }
145 |
146 | pre.line-numbers > code {
147 | position: relative;
148 | }
149 |
150 | .line-numbers .line-numbers-rows {
151 | position: absolute;
152 | pointer-events: none;
153 | top: 0;
154 | font-size: 100%;
155 | left: -3.8em;
156 | width: 3em; /* works for line-numbers below 1000 lines */
157 | letter-spacing: -1px;
158 | border-right: 1px solid #999;
159 |
160 | -webkit-user-select: none;
161 | -moz-user-select: none;
162 | -ms-user-select: none;
163 | user-select: none;
164 |
165 | }
166 |
167 | .line-numbers-rows > span {
168 | pointer-events: none;
169 | display: block;
170 | counter-increment: linenumber;
171 | }
172 |
173 | .line-numbers-rows > span:before {
174 | content: counter(linenumber);
175 | color: #999;
176 | display: block;
177 | padding-right: 0.8em;
178 | text-align: right;
179 | }
180 | div.prism-show-language {
181 | position: relative;
182 | }
183 |
184 | div.prism-show-language > div.prism-show-language-label[data-language] {
185 | color: black;
186 | background-color: #CFCFCF;
187 | display: inline-block;
188 | position: absolute;
189 | bottom: auto;
190 | left: auto;
191 | top: 0;
192 | right: 0;
193 | width: auto;
194 | height: auto;
195 | font-size: 0.9em;
196 | border-radius: 0 0 0 5px;
197 | padding: 0 0.5em;
198 | text-shadow: none;
199 | z-index: 1;
200 | -webkit-box-shadow: none;
201 | -moz-box-shadow: none;
202 | box-shadow: none;
203 | -webkit-transform: none;
204 | -moz-transform: none;
205 | -ms-transform: none;
206 | -o-transform: none;
207 | transform: none;
208 | }
209 |
210 |
--------------------------------------------------------------------------------
/themes/prism-base16-ateliersulphurpool.light.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Name: Base16 Atelier Sulphurpool Light
4 | Author: Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool)
5 |
6 | Prism template by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/prism/)
7 | Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
8 |
9 | */
10 | code[class*="language-"],
11 | pre[class*="language-"] {
12 | font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
13 | font-size: 14px;
14 | line-height: 1.375;
15 | direction: ltr;
16 | text-align: left;
17 | white-space: pre;
18 | word-spacing: normal;
19 | word-break: normal;
20 | -moz-tab-size: 4;
21 | -o-tab-size: 4;
22 | tab-size: 4;
23 | -webkit-hyphens: none;
24 | -moz-hyphens: none;
25 | -ms-hyphens: none;
26 | hyphens: none;
27 | background: #f5f7ff;
28 | color: #5e6687;
29 | }
30 |
31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
33 | text-shadow: none;
34 | background: #dfe2f1;
35 | }
36 |
37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
38 | code[class*="language-"]::selection, code[class*="language-"] ::selection {
39 | text-shadow: none;
40 | background: #dfe2f1;
41 | }
42 |
43 | /* Code blocks */
44 | pre[class*="language-"] {
45 | padding: 1em;
46 | margin: .5em 0;
47 | overflow: auto;
48 | }
49 |
50 | /* Inline code */
51 | :not(pre) > code[class*="language-"] {
52 | padding: .1em;
53 | border-radius: .3em;
54 | }
55 |
56 | .token.comment,
57 | .token.prolog,
58 | .token.doctype,
59 | .token.cdata {
60 | color: #898ea4;
61 | }
62 |
63 | .token.punctuation {
64 | color: #5e6687;
65 | }
66 |
67 | .token.namespace {
68 | opacity: .7;
69 | }
70 |
71 | .token.operator,
72 | .token.boolean,
73 | .token.number {
74 | color: #c76b29;
75 | }
76 |
77 | .token.property {
78 | color: #c08b30;
79 | }
80 |
81 | .token.tag {
82 | color: #3d8fd1;
83 | }
84 |
85 | .token.string {
86 | color: #22a2c9;
87 | }
88 |
89 | .token.selector {
90 | color: #6679cc;
91 | }
92 |
93 | .token.attr-name {
94 | color: #c76b29;
95 | }
96 |
97 | .token.entity,
98 | .token.url,
99 | .language-css .token.string,
100 | .style .token.string {
101 | color: #22a2c9;
102 | }
103 |
104 | .token.attr-value,
105 | .token.keyword,
106 | .token.control,
107 | .token.directive,
108 | .token.unit {
109 | color: #ac9739;
110 | }
111 |
112 | .token.statement,
113 | .token.regex,
114 | .token.atrule {
115 | color: #22a2c9;
116 | }
117 |
118 | .token.placeholder,
119 | .token.variable {
120 | color: #3d8fd1;
121 | }
122 |
123 | .token.deleted {
124 | text-decoration: line-through;
125 | }
126 |
127 | .token.inserted {
128 | border-bottom: 1px dotted #202746;
129 | text-decoration: none;
130 | }
131 |
132 | .token.italic {
133 | font-style: italic;
134 | }
135 |
136 | .token.important,
137 | .token.bold {
138 | font-weight: bold;
139 | }
140 |
141 | .token.important {
142 | color: #c94922;
143 | }
144 |
145 | .token.entity {
146 | cursor: help;
147 | }
148 |
149 | pre > code.highlight {
150 | outline: 0.4em solid #c94922;
151 | outline-offset: .4em;
152 | }
153 |
154 | pre.line-numbers {
155 | position: relative;
156 | padding-left: 3.8em;
157 | counter-reset: linenumber;
158 | }
159 |
160 | pre.line-numbers > code {
161 | position: relative;
162 | }
163 |
164 | .line-numbers .line-numbers-rows {
165 | position: absolute;
166 | pointer-events: none;
167 | top: 0;
168 | font-size: 100%;
169 | left: -3.8em;
170 | width: 3em; /* works for line-numbers below 1000 lines */
171 | letter-spacing: -1px;
172 | border-right: 1px solid #999;
173 |
174 | -webkit-user-select: none;
175 | -moz-user-select: none;
176 | -ms-user-select: none;
177 | user-select: none;
178 |
179 | }
180 |
181 | .line-numbers-rows > span {
182 | pointer-events: none;
183 | display: block;
184 | counter-increment: linenumber;
185 | }
186 |
187 | .line-numbers-rows > span:before {
188 | content: counter(linenumber);
189 | color: #999;
190 | display: block;
191 | padding-right: 0.8em;
192 | text-align: right;
193 | }
194 |
195 | div.prism-show-language {
196 | position: relative;
197 | }
198 |
199 | div.prism-show-language > div.prism-show-language-label[data-language] {
200 | color: black;
201 | background-color: #CFCFCF;
202 | display: inline-block;
203 | position: absolute;
204 | bottom: auto;
205 | left: auto;
206 | top: 0;
207 | right: 0;
208 | width: auto;
209 | height: auto;
210 | font-size: 0.9em;
211 | border-radius: 0 0 0 5px;
212 | padding: 0 0.5em;
213 | text-shadow: none;
214 | z-index: 1;
215 | -webkit-box-shadow: none;
216 | -moz-box-shadow: none;
217 | box-shadow: none;
218 | -webkit-transform: none;
219 | -moz-transform: none;
220 | -ms-transform: none;
221 | -o-transform: none;
222 | transform: none;
223 | }
224 |
--------------------------------------------------------------------------------
/themes/prism-cb.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Based on Plugin: Syntax Highlighter CB
3 | * Plugin URI: http://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js
4 | * Description: Highlight your code snippets with an easy to use shortcode based on Lea Verou's Prism.js.
5 | * Version: 1.0.0
6 | * Author: c.bavota
7 | * Author URI: http://bavotasan.comhttp://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js/ */
8 | /* http://cbavota.bitbucket.org/syntax-highlighter/ */
9 |
10 | /* ===== ===== */
11 | code[class*="language-"],
12 | pre[class*="language-"] {
13 | color: #fff;
14 | text-shadow: 0 1px 1px #000;
15 | font-family: Menlo, Monaco, "Courier New", monospace;
16 | direction: ltr;
17 | text-align: left;
18 | word-spacing: normal;
19 | white-space: pre;
20 | word-wrap: normal;
21 | line-height: 1.4;
22 | background: none;
23 | border: 0;
24 |
25 | -moz-tab-size: 4;
26 | -o-tab-size: 4;
27 | tab-size: 4;
28 |
29 | -webkit-hyphens: none;
30 | -moz-hyphens: none;
31 | -ms-hyphens: none;
32 | hyphens: none;
33 | }
34 |
35 | pre[class*="language-"] code {
36 | float: left;
37 | padding: 0 15px 0 0;
38 | }
39 |
40 | pre[class*="language-"],
41 | :not(pre) > code[class*="language-"] {
42 | background: #222;
43 | }
44 |
45 | /* Code blocks */
46 | pre[class*="language-"] {
47 | padding: 15px;
48 | margin: 1em 0;
49 | overflow: auto;
50 | -moz-border-radius: 8px;
51 | -webkit-border-radius: 8px;
52 | border-radius: 8px;
53 | }
54 |
55 | /* Inline code */
56 | :not(pre) > code[class*="language-"] {
57 | padding: 5px 10px;
58 | line-height: 1;
59 | -moz-border-radius: 3px;
60 | -webkit-border-radius: 3px;
61 | border-radius: 3px;
62 | }
63 |
64 | .token.comment,
65 | .token.prolog,
66 | .token.doctype,
67 | .token.cdata {
68 | color: #797979;
69 | }
70 |
71 | .token.selector,
72 | .token.operator,
73 | .token.punctuation {
74 | color: #fff;
75 | }
76 |
77 | .token.namespace {
78 | opacity: .7;
79 | }
80 |
81 | .token.tag,
82 | .token.boolean {
83 | color: #ffd893;
84 | }
85 |
86 | .token.atrule,
87 | .token.attr-value,
88 | .token.hex,
89 | .token.string {
90 | color: #B0C975;
91 | }
92 |
93 | .token.property,
94 | .token.entity,
95 | .token.url,
96 | .token.attr-name,
97 | .token.keyword {
98 | color: #c27628;
99 | }
100 |
101 | .token.regex {
102 | color: #9B71C6;
103 | }
104 |
105 | .token.entity {
106 | cursor: help;
107 | }
108 |
109 | .token.function,
110 | .token.constant {
111 | color: #e5a638;
112 | }
113 |
114 | .token.variable {
115 | color: #fdfba8;
116 | }
117 |
118 | .token.number {
119 | color: #8799B0;
120 | }
121 |
122 | .token.important,
123 | .token.deliminator {
124 | color: #E45734;
125 | }
126 |
127 | /* Line highlight plugin */
128 | pre[data-line] {
129 | position: relative;
130 | padding: 1em 0 1em 3em;
131 | }
132 |
133 | .line-highlight {
134 | position: absolute;
135 | left: 0;
136 | right: 0;
137 | margin-top: 1em; /* Same as .prism's padding-top */
138 | background: rgba(255,255,255,.2);
139 | pointer-events: none;
140 | line-height: inherit;
141 | white-space: pre;
142 | }
143 |
144 | .line-highlight:before,
145 | .line-highlight[data-end]:after {
146 | content: attr(data-start);
147 | position: absolute;
148 | top: .3em;
149 | left: .6em;
150 | min-width: 1em;
151 | padding: 0 .5em;
152 | background-color: rgba(255,255,255,.3);
153 | color: #fff;
154 | font: bold 65%/1.5 sans-serif;
155 | text-align: center;
156 | -moz-border-radius: 8px;
157 | -webkit-border-radius: 8px;
158 | border-radius: 8px;
159 | text-shadow: none;
160 | }
161 |
162 | .line-highlight[data-end]:after {
163 | content: attr(data-end);
164 | top: auto;
165 | bottom: .4em;
166 | }
167 |
168 | /* for line numbers */
169 | .line-numbers-rows {
170 | margin: 0;
171 | }
172 |
173 | .line-numbers-rows span {
174 | padding-right: 10px;
175 | border-right: 3px #d9d336 solid;
176 | }
177 |
178 | pre.line-numbers {
179 | position: relative;
180 | padding-left: 3.8em;
181 | counter-reset: linenumber;
182 | }
183 |
184 | pre.line-numbers > code {
185 | position: relative;
186 | }
187 |
188 | .line-numbers .line-numbers-rows {
189 | position: absolute;
190 | pointer-events: none;
191 | top: 0;
192 | font-size: 100%;
193 | left: -3.8em;
194 | width: 3em; /* works for line-numbers below 1000 lines */
195 | letter-spacing: -1px;
196 | border-right: 1px solid #999;
197 |
198 | -webkit-user-select: none;
199 | -moz-user-select: none;
200 | -ms-user-select: none;
201 | user-select: none;
202 |
203 | }
204 |
205 | .line-numbers-rows > span {
206 | pointer-events: none;
207 | display: block;
208 | counter-increment: linenumber;
209 | }
210 |
211 | .line-numbers-rows > span:before {
212 | content: counter(linenumber);
213 | color: #999;
214 | display: block;
215 | padding-right: 0.8em;
216 | text-align: right;
217 | }
218 |
219 | div.prism-show-language {
220 | position: relative;
221 | }
222 |
223 | div.prism-show-language > div.prism-show-language-label[data-language] {
224 | color: black;
225 | background-color: #CFCFCF;
226 | display: inline-block;
227 | position: absolute;
228 | bottom: auto;
229 | left: auto;
230 | top: 0;
231 | right: 0;
232 | width: auto;
233 | height: auto;
234 | font-size: 0.9em;
235 | border-radius: 0 0 0 5px;
236 | padding: 0 0.5em;
237 | text-shadow: none;
238 | z-index: 1;
239 | -webkit-box-shadow: none;
240 | -moz-box-shadow: none;
241 | box-shadow: none;
242 | -webkit-transform: none;
243 | -moz-transform: none;
244 | -ms-transform: none;
245 | -o-transform: none;
246 | transform: none;
247 | }
248 |
--------------------------------------------------------------------------------
/themes/prism-xonokai.css:
--------------------------------------------------------------------------------
1 | /**
2 | * xonokai theme for JavaScript, CSS and HTML
3 | * based on: https://github.com/MoOx/sass-prism-theme-base by Maxime Thirouin ~ MoOx --> http://moox.fr/ , which is Loosely based on Monokai textmate theme by http://www.monokai.nl/
4 | * license: MIT; http://moox.mit-license.org/
5 | */
6 | code[class*="language-"],
7 | pre[class*="language-"] {
8 | -moz-tab-size: 2;
9 | -o-tab-size: 2;
10 | tab-size: 2;
11 | -webkit-hyphens: none;
12 | -moz-hyphens: none;
13 | -ms-hyphens: none;
14 | hyphens: none;
15 | white-space: pre;
16 | white-space: pre-wrap;
17 | word-wrap: normal;
18 | font-family: Menlo, Monaco, "Courier New", monospace;
19 | font-size: 14px;
20 | color: #76d9e6;
21 | text-shadow: none;
22 | }
23 | pre[class*="language-"],
24 | :not(pre)>code[class*="language-"] {
25 | background: #2a2a2a;
26 | }
27 | pre[class*="language-"] {
28 | padding: 15px;
29 | border-radius: 4px;
30 | border: 1px solid #e1e1e8;
31 | overflow: auto;
32 | }
33 |
34 | pre[class*="language-"] {
35 | position: relative;
36 | }
37 | pre[class*="language-"] code {
38 | white-space: pre;
39 | display: block;
40 | }
41 |
42 | :not(pre)>code[class*="language-"] {
43 | padding: 0.15em 0.2em 0.05em;
44 | border-radius: .3em;
45 | border: 0.13em solid #7a6652;
46 | box-shadow: 1px 1px 0.3em -0.1em #000 inset;
47 | }
48 | .token.namespace {
49 | opacity: .7;
50 | }
51 | .token.comment,
52 | .token.prolog,
53 | .token.doctype,
54 | .token.cdata {
55 | color: #6f705e;
56 | }
57 | .token.operator,
58 | .token.boolean,
59 | .token.number {
60 | color: #a77afe;
61 | }
62 | .token.attr-name,
63 | .token.string {
64 | color: #e6d06c;
65 | }
66 | .token.entity,
67 | .token.url,
68 | .language-css .token.string,
69 | .style .token.string {
70 | color: #e6d06c;
71 | }
72 | .token.selector,
73 | .token.inserted {
74 | color: #a6e22d;
75 | }
76 | .token.atrule,
77 | .token.attr-value,
78 | .token.keyword,
79 | .token.important,
80 | .token.deleted {
81 | color: #ef3b7d;
82 | }
83 | .token.regex,
84 | .token.statement {
85 | color: #76d9e6;
86 | }
87 | .token.placeholder,
88 | .token.variable {
89 | color: #fff;
90 | }
91 | .token.important,
92 | .token.statement,
93 | .token.bold {
94 | font-weight: bold;
95 | }
96 | .token.punctuation {
97 | color: #bebec5;
98 | }
99 | .token.entity {
100 | cursor: help;
101 | }
102 | .token.italic {
103 | font-style: italic;
104 | }
105 |
106 | code.language-markup {
107 | color: #f9f9f9;
108 | }
109 | code.language-markup .token.tag {
110 | color: #ef3b7d;
111 | }
112 | code.language-markup .token.attr-name {
113 | color: #a6e22d;
114 | }
115 | code.language-markup .token.attr-value {
116 | color: #e6d06c;
117 | }
118 | code.language-markup .token.style,
119 | code.language-markup .token.script {
120 | color: #76d9e6;
121 | }
122 | code.language-markup .token.script .token.keyword {
123 | color: #76d9e6;
124 | }
125 |
126 | /* Line highlight plugin */
127 | pre[class*="language-"][data-line] {
128 | position: relative;
129 | padding: 1em 0 1em 3em;
130 | }
131 | pre[data-line] .line-highlight {
132 | position: absolute;
133 | left: 0;
134 | right: 0;
135 | padding: 0;
136 | margin-top: 1em;
137 | background: rgba(255, 255, 255, 0.08);
138 | pointer-events: none;
139 | line-height: inherit;
140 | white-space: pre;
141 | }
142 | pre[data-line] .line-highlight:before,
143 | pre[data-line] .line-highlight[data-end]:after {
144 | content: attr(data-start);
145 | position: absolute;
146 | top: .4em;
147 | left: .6em;
148 | min-width: 1em;
149 | padding: 0.2em 0.5em;
150 | background-color: rgba(255, 255, 255, 0.4);
151 | color: black;
152 | font: bold 65%/1 sans-serif;
153 | height: 1em;
154 | line-height: 1em;
155 | text-align: center;
156 | border-radius: 999px;
157 | text-shadow: none;
158 | box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
159 | }
160 | pre[data-line] .line-highlight[data-end]:after {
161 | content: attr(data-end);
162 | top: auto;
163 | bottom: .4em;
164 | }
165 |
166 | pre.line-numbers {
167 | position: relative;
168 | padding-left: 3.8em;
169 | counter-reset: linenumber;
170 | }
171 |
172 | pre.line-numbers > code {
173 | position: relative;
174 | }
175 |
176 | .line-numbers .line-numbers-rows {
177 | position: absolute;
178 | pointer-events: none;
179 | top: 0;
180 | font-size: 100%;
181 | left: -3.8em;
182 | width: 3em; /* works for line-numbers below 1000 lines */
183 | letter-spacing: -1px;
184 | border-right: 1px solid #999;
185 |
186 | -webkit-user-select: none;
187 | -moz-user-select: none;
188 | -ms-user-select: none;
189 | user-select: none;
190 |
191 | }
192 |
193 | .line-numbers-rows > span {
194 | pointer-events: none;
195 | display: block;
196 | counter-increment: linenumber;
197 | }
198 |
199 | .line-numbers-rows > span:before {
200 | content: counter(linenumber);
201 | color: #999;
202 | display: block;
203 | padding-right: 0.8em;
204 | text-align: right;
205 | }
206 |
207 | div.prism-show-language {
208 | position: relative;
209 | }
210 |
211 | div.prism-show-language > div.prism-show-language-label[data-language] {
212 | color: black;
213 | background-color: #CFCFCF;
214 | display: inline-block;
215 | position: absolute;
216 | bottom: auto;
217 | left: auto;
218 | top: 0;
219 | right: 0;
220 | width: auto;
221 | height: auto;
222 | font-size: 0.9em;
223 | border-radius: 0 0 0 5px;
224 | padding: 0 0.5em;
225 | text-shadow: none;
226 | z-index: 1;
227 | -webkit-box-shadow: none;
228 | -moz-box-shadow: none;
229 | box-shadow: none;
230 | -webkit-transform: none;
231 | -moz-transform: none;
232 | -ms-transform: none;
233 | -o-transform: none;
234 | transform: none;
235 | }
--------------------------------------------------------------------------------
/themes/prism-pojoaque.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Pojoaque Style by Jason Tate
3 | * http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
4 | * Based on Solarized Style from http://ethanschoonover.com/solarized
5 | * http://softwaremaniacs.org/media/soft/highlight/test.html
6 | */
7 |
8 | code[class*="language-"],
9 | pre[class*="language-"] {
10 | -moz-tab-size: 4;
11 | -o-tab-size: 4;
12 | tab-size: 4;
13 | -webkit-hyphens: none;
14 | -moz-hyphens: none;
15 | -ms-hyphens: none;
16 | hyphens: none;
17 | white-space: pre;
18 | white-space: pre-wrap;
19 | word-break: break-all;
20 | word-wrap: break-word;
21 | font-family: Menlo, Monaco, "Courier New", monospace;
22 | font-size: 15px;
23 | line-height: 1.5;
24 | color: #dccf8f;
25 | text-shadow: 0;
26 | }
27 |
28 | pre[class*="language-"],
29 | :not(pre) > code[class*="language-"] {
30 | border-radius: 5px;
31 | border: 1px solid #000;
32 | color: #DCCF8F;
33 | background: #181914 url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAMAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQACQYGBgcGCQcHCQ0IBwgNDwsJCQsPEQ4ODw4OERENDg4ODg0RERQUFhQUERoaHBwaGiYmJiYmKysrKysrKysrKwEJCAgJCgkMCgoMDwwODA8TDg4ODhMVDg4PDg4VGhMRERERExoXGhYWFhoXHR0aGh0dJCQjJCQrKysrKysrKysr/8AAEQgAjACMAwEiAAIRAQMRAf/EAF4AAQEBAAAAAAAAAAAAAAAAAAABBwEBAQAAAAAAAAAAAAAAAAAAAAIQAAEDAwIHAQEAAAAAAAAAAADwAREhYaExkUFRcYGxwdHh8REBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AyGFEjHaBS2fDDs2zkhKmBKktb7km+ZwwCnXPkLVmCTMItj6AXFxRS465/BTnkAJvkLkJe+7AKKoi2AtRS2zuAWsCb5GOlBN8gKfmuGHZ8MFqIth3ALmFoFwbwKWyAlTAp17uKqBvgBD8sM4fTjhvAhkzhaRkBMKBrfs7jGPIpzy7gFrAqnC0C0gB0EWwBDW2cBVQwm+QtPpa3wBO3sVvszCnLAhkzgL5/RLf13cLQd8/AGlu0Cb5HTx9KuAEieGJEdcehS3eRTp2ATdt3CpIm+QtZwAhROXFeb7swp/ahaM3kBE/jSIUBc/AWrgBN8uNFAl+b7sAXFxFn2YLUU5Ns7gFX8C4ib+hN8gFWXwK3bZglxEJm+gKdciLPsFV/TClsgJUwKJ5FVA7tvIFrfZhVfGJDcsCKaYgAqv6YRbE+RWOWBtu7+AL3yRalXLyKqAIIfk+zARbDgFyEsncYwJvlgFRW+GEWntIi2P0BooyFxcNr8Ep3+ANLbMO+QyhvbiqdgC0kVvgUUiLYgBS2QtPbiVI1/sgOmG9uO+Y8DW+7jS2zAOnj6O2BndwuIAUtkdRN8gFoK3wwXMQyZwHVbClsuNLd4E3yAUR6FVDBR+BafQGt93LVMxJTv8ABts4CVLhcfYWsCb5kC9/BHdU8CLYFY5bMAd+eX9MGthhpbA1vu4B7+RKkaW2Yq4AQtVBBFsAJU/AuIXBhN8gGWnstefhiZyWvLAEnbYS1uzSFP6Jvn4Baxx70JKkQojLib5AVTey1jjgkKJGO0AKWyOm7N7cSpgSpAdPH0Tfd/gp1z5C1ZgKqN9J2wFxcUUuAFLZAm+QC0Fb4YUVRFsAOvj4KW2dwtYE3yAWk/wS/PLMKfmuGHZ8MAXF/Ja32Yi5haAKWz4Ydm2cSpgU693Atb7km+Zwwh+WGcPpxw3gAkzCLY+iYUDW/Z3Adc/gpzyFrAqnALkJe+7DoItgAtRS2zuKqGE3yAx0oJvkdvYrfZmALURbDuL5/RLf13cAuDeBS2RpbtAm+QFVA3wR+3fUtFHoBDJnC0jIXH0HWsgMY8inPLuOkd9chp4z20ALQLSA8cI9jYAIa2zjzjBd8gRafS1vgiUho/kAKcsCGTOGWvoOpkAtB3z8Hm8x2Ff5ADp4+lXAlIvcmwH/2Q==') repeat left top;
34 | }
35 |
36 | pre[class*="language-"] {
37 | padding: 12px;
38 | overflow: auto;
39 | }
40 |
41 | :not(pre) > code[class*="language-"] {
42 | padding: 2px 6px;
43 | }
44 |
45 | .token.namespace {
46 | opacity: .7;
47 | }
48 | .token.comment,
49 | .token.prolog,
50 | .token.doctype,
51 | .token.cdata {
52 | color: #586e75;
53 | font-style: italic;
54 | }
55 | .token.number,
56 | .token.string,
57 | .token.char,
58 | .token.builtin,
59 | .token.inserted {
60 | color: #468966;
61 | }
62 |
63 | .token.attr-name {
64 | color: #b89859;
65 | }
66 | .token.operator,
67 | .token.entity,
68 | .token.url,
69 | .language-css .token.string,
70 | .style .token.string {
71 | color: #dccf8f;
72 | }
73 | .token.selector,
74 | .token.regex {
75 | color: #859900;
76 | }
77 | .token.atrule,
78 | .token.keyword {
79 | color: #cb4b16;
80 | }
81 |
82 | .token.attr-value {
83 | color: #468966;
84 | }
85 | .token.function,
86 | .token.variable,
87 | .token.placeholder {
88 | color: #b58900;
89 | }
90 | .token.property,
91 | .token.tag,
92 | .token.boolean,
93 | .token.number,
94 | .token.constant,
95 | .token.symbol {
96 | color: #b89859;
97 | }
98 | .token.tag {
99 | color: #ffb03b;
100 | }
101 | .token.important,
102 | .token.statement,
103 | .token.deleted {
104 | color: #dc322f;
105 | }
106 | .token.punctuation {
107 | color: #dccf8f;
108 | }
109 | .token.entity {
110 | cursor: help;
111 | }
112 | .token.bold {
113 | font-weight: bold;
114 | }
115 | .token.italic {
116 | font-style: italic;
117 | }
118 |
119 | /*
120 | .pojoaque-colors {
121 | color: #586e75;
122 | color: #b64926;
123 | color: #468966;
124 | color: #ffb03b;
125 | color: #b58900;
126 | color: #b89859;
127 | color: #dccf8f;
128 | color: #d3a60c;
129 | color: #cb4b16;
130 | color: #dc322f;
131 | color: #073642;
132 | color: #181914;
133 | }
134 | */
135 |
136 | pre.line-numbers {
137 | position: relative;
138 | padding-left: 3.8em;
139 | counter-reset: linenumber;
140 | }
141 |
142 | pre.line-numbers > code {
143 | position: relative;
144 | }
145 |
146 | .line-numbers .line-numbers-rows {
147 | position: absolute;
148 | pointer-events: none;
149 | top: 0;
150 | font-size: 100%;
151 | left: -3.8em;
152 | width: 3em; /* works for line-numbers below 1000 lines */
153 | letter-spacing: -1px;
154 | border-right: 1px solid #999;
155 |
156 | -webkit-user-select: none;
157 | -moz-user-select: none;
158 | -ms-user-select: none;
159 | user-select: none;
160 |
161 | }
162 |
163 | .line-numbers-rows > span {
164 | pointer-events: none;
165 | display: block;
166 | counter-increment: linenumber;
167 | }
168 |
169 | .line-numbers-rows > span:before {
170 | content: counter(linenumber);
171 | color: #999;
172 | display: block;
173 | padding-right: 0.8em;
174 | text-align: right;
175 | }
176 |
177 | div.prism-show-language {
178 | position: relative;
179 | }
180 |
181 | div.prism-show-language > div.prism-show-language-label[data-language] {
182 | color: black;
183 | background-color: #CFCFCF;
184 | display: inline-block;
185 | position: absolute;
186 | bottom: auto;
187 | left: auto;
188 | top: 0;
189 | right: 0;
190 | width: auto;
191 | height: auto;
192 | font-size: 0.9em;
193 | border-radius: 0 0 0 5px;
194 | padding: 0 0.5em;
195 | text-shadow: none;
196 | z-index: 1;
197 | -webkit-box-shadow: none;
198 | -moz-box-shadow: none;
199 | box-shadow: none;
200 | -webkit-transform: none;
201 | -moz-transform: none;
202 | -ms-transform: none;
203 | -o-transform: none;
204 | transform: none;
205 | }
206 |
--------------------------------------------------------------------------------
/themes/prism-coy.css:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism-coy&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */
2 | /**
3 | * prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML
4 | * Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics);
5 | * @author Tim Shedor
6 | */
7 |
8 | code[class*="language-"],
9 | pre[class*="language-"] {
10 | color: black;
11 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
12 | direction: ltr;
13 | text-align: left;
14 | white-space: pre;
15 | word-spacing: normal;
16 | word-break: normal;
17 | word-wrap: normal;
18 | line-height: 1.5;
19 |
20 | -moz-tab-size: 4;
21 | -o-tab-size: 4;
22 | tab-size: 4;
23 |
24 | -webkit-hyphens: none;
25 | -moz-hyphens: none;
26 | -ms-hyphens: none;
27 | hyphens: none;
28 | }
29 |
30 | /* Code blocks */
31 | pre[class*="language-"] {
32 | position: relative;
33 | margin: .5em 0;
34 | /* 358ccb */
35 | -webkit-box-shadow: -1px 0px 0px 0px #AAA, 0px 0px 0px 1px #dfdfdf;
36 | -moz-box-shadow: -1px 0px 0px 0px #AAA, 0px 0px 0px 1px #dfdfdf;
37 | box-shadow: -1px 0px 0px 0px #AAA, 0px 0px 0px 1px #dfdfdf;
38 | border-left: 10px solid #AAA;
39 | overflow: visible;
40 | max-height: 30em;
41 | padding: 0;
42 | }
43 |
44 | pre[class*="language-"] code {
45 | background-color: #fdfdfd;
46 | background-image: -webkit-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em);
47 | background-image: -moz-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em);
48 | background-image: -ms-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em);
49 | background-image: -o-repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em);
50 | background-image: repeating-linear-gradient(180deg, transparent, transparent 1.5em, rgba(69, 142, 209, 0.04) 1.5em, rgba(69, 142, 209, 0.04) 3em);
51 | background-origin: content-box;
52 | background-attachment: local;
53 | }
54 |
55 | code[class*="language"] {
56 | max-height: inherit;
57 | height: 100%;
58 | padding: 0 1em;
59 | display: block;
60 | overflow: auto;
61 | }
62 |
63 | /* Margin bottom to accomodate shadow */
64 | :not(pre) > code[class*="language-"],
65 | pre[class*="language-"] {
66 | background-color: #fdfdfd;
67 | -webkit-box-sizing: border-box;
68 | -moz-box-sizing: border-box;
69 | box-sizing: border-box;
70 | margin-bottom: 1em;
71 | }
72 |
73 | /* Inline code */
74 | :not(pre) > code[class*="language-"] {
75 | position: relative;
76 | padding: 0 .2em;
77 | margin: 0 0.1em;
78 | -webkit-border-radius: 0.3em;
79 | -moz-border-radius: 0.3em;
80 | -ms-border-radius: 0.3em;
81 | -o-border-radius: 0.3em;
82 | border-radius: 0.3em;
83 | /* color: #c92c2c; */
84 | border: 1px solid rgba(0, 0, 0, 0.1);
85 | display: inline;
86 | white-space: normal;
87 | word-break: break-all;
88 | word-wrap: break-word;
89 | }
90 |
91 | /*
92 | pre[class*="language-"]:before,
93 | pre[class*="language-"]:after {
94 | content: '';
95 | z-index: -2;
96 | display: block;
97 | position: absolute;
98 | bottom: 0.75em;
99 | left: 0.18em;
100 | width: 40%;
101 | height: 20%;
102 | -webkit-box-shadow: 0px 13px 8px #979797;
103 | -moz-box-shadow: 0px 13px 8px #979797;
104 | box-shadow: 0px 13px 8px #979797;
105 | -webkit-transform: rotate(-2deg);
106 | -moz-transform: rotate(-2deg);
107 | -ms-transform: rotate(-2deg);
108 | -o-transform: rotate(-2deg);
109 | transform: rotate(-2deg);
110 | }
111 | */
112 |
113 | :not(pre) > code[class*="language-"]:after,
114 | pre[class*="language-"]:after {
115 | right: 0.75em;
116 | left: auto;
117 | -webkit-transform: rotate(2deg);
118 | -moz-transform: rotate(2deg);
119 | -ms-transform: rotate(2deg);
120 | -o-transform: rotate(2deg);
121 | transform: rotate(2deg);
122 | }
123 |
124 | .token.comment,
125 | .token.block-comment,
126 | .token.prolog,
127 | .token.doctype,
128 | .token.cdata {
129 | color: #7D8B99;
130 | }
131 |
132 | .token.punctuation {
133 | color: #5F6364;
134 | }
135 |
136 | .token.property,
137 | .token.tag,
138 | .token.boolean,
139 | .token.number,
140 | .token.function-name,
141 | .token.constant,
142 | .token.symbol,
143 | .token.deleted {
144 | color: #c92c2c;
145 | }
146 |
147 | .token.selector,
148 | .token.attr-name,
149 | .token.function,
150 | .token.builtin,
151 | .token.inserted {
152 | color: #2f9c0a;
153 | }
154 |
155 | .token.string,
156 | .token.char {
157 | color: #9c2f0a;
158 | }
159 |
160 | .token.entity,
161 | .token.url,
162 | .token.variable {
163 | color: #a67f59;
164 | background: rgba(255, 255, 255, 0.5);
165 | }
166 |
167 | .token.operator {
168 | color: #a67f59;
169 | }
170 |
171 | .token.atrule,
172 | .token.attr-value,
173 | .token.keyword {
174 | color: #1990b8;
175 | }
176 |
177 | .token.class-name {
178 | color: #666;
179 | text-decoration: underline;
180 | }
181 |
182 | .token.regex,
183 | .token.important {
184 | color: #e90;
185 | }
186 |
187 | .language-css .token.string,
188 | .style .token.string {
189 | color: #a67f59;
190 | background: rgba(255, 255, 255, 0.5);
191 | }
192 |
193 | .token.important {
194 | font-weight: normal;
195 | }
196 |
197 | .token.bold {
198 | font-weight: bold;
199 | }
200 | .token.italic {
201 | font-style: italic;
202 | }
203 |
204 | .token.entity {
205 | cursor: help;
206 | }
207 |
208 | .namespace {
209 | opacity: .7;
210 | }
211 |
212 | @media screen and (max-width: 767px) {
213 | pre[class*="language-"]:before,
214 | pre[class*="language-"]:after {
215 | bottom: 14px;
216 | -webkit-box-shadow: none;
217 | -moz-box-shadow: none;
218 | box-shadow: none;
219 | }
220 |
221 | }
222 |
223 | /* Plugin styles */
224 | .token.tab:not(:empty):before,
225 | .token.cr:before,
226 | .token.lf:before {
227 | color: #e0d7d1;
228 | }
229 |
230 | /* Plugin styles: Line Numbers */
231 | pre[class*="language-"].line-numbers {
232 | padding-left: 0;
233 | }
234 |
235 | pre[class*="language-"].line-numbers code {
236 | padding-left: 3.8em;
237 | }
238 |
239 | pre[class*="language-"].line-numbers .line-numbers-rows {
240 | left: 0;
241 | }
242 |
243 | /* Plugin styles: Line Highlight */
244 | pre[class*="language-"][data-line] {
245 | padding-top: 0;
246 | padding-bottom: 0;
247 | padding-left: 0;
248 | }
249 | pre[data-line] code {
250 | position: relative;
251 | padding-left: 4em;
252 | }
253 | pre .line-highlight {
254 | margin-top: 0;
255 | }
256 |
257 | pre.line-numbers {
258 | position: relative;
259 | padding-left: 3.8em;
260 | counter-reset: linenumber;
261 | }
262 |
263 | pre.line-numbers > code {
264 | position: relative;
265 | }
266 |
267 | .line-numbers .line-numbers-rows {
268 | position: absolute;
269 | pointer-events: none;
270 | top: 0;
271 | font-size: 100%;
272 | left: -3.8em;
273 | width: 3em; /* works for line-numbers below 1000 lines */
274 | letter-spacing: -1px;
275 | border-right: 1px solid #999;
276 |
277 | -webkit-user-select: none;
278 | -moz-user-select: none;
279 | -ms-user-select: none;
280 | user-select: none;
281 |
282 | }
283 |
284 | .line-numbers-rows > span {
285 | pointer-events: none;
286 | display: block;
287 | counter-increment: linenumber;
288 | }
289 |
290 | .line-numbers-rows > span:before {
291 | content: counter(linenumber);
292 | color: #999;
293 | display: block;
294 | padding-right: 0.8em;
295 | text-align: right;
296 | }
297 | div.prism-show-language {
298 | position: relative;
299 | }
300 |
301 | div.prism-show-language > div.prism-show-language-label[data-language] {
302 | color: black;
303 | background-color: #CFCFCF;
304 | display: inline-block;
305 | position: absolute;
306 | bottom: auto;
307 | left: auto;
308 | top: 0;
309 | right: 0;
310 | width: auto;
311 | height: auto;
312 | font-size: 0.9em;
313 | border-radius: 0 0 0 5px;
314 | padding: 0 0.5em;
315 | text-shadow: none;
316 | z-index: 1;
317 | -webkit-box-shadow: none;
318 | -moz-box-shadow: none;
319 | box-shadow: none;
320 | -webkit-transform: none;
321 | -moz-transform: none;
322 | -ms-transform: none;
323 | -o-transform: none;
324 | transform: none;
325 | }
326 |
327 |
--------------------------------------------------------------------------------
/prism.js:
--------------------------------------------------------------------------------
1 | /* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+actionscript+applescript+aspnet+bash+basic+batch+c+csharp+cpp+coffeescript+ruby+css-extras+go+groovy+java+latex+lua+markdown+objectivec+php+php-extras+powershell+python+sass+scss+sql+swift+yaml&plugins=line-numbers+show-language */
2 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=_self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/e.length)break e;if(!(d instanceof a)){u.lastIndex=0;var m=u.exec(d);if(m){c&&(f=m[1].length);var y=m.index-1+f,m=m[0].slice(f),v=m.length,k=y+v,b=d.slice(0,y+1),w=d.slice(k+1),P=[p,1];b&&P.push(b);var A=new a(i,g?t.tokenize(m,g):m,h);P.push(A),w&&P.push(w),Array.prototype.splice.apply(r,P)}}}}}return r},hooks:{all:{},add:function(e,n){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(n)},run:function(e,n){var a=t.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,a,r){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return n.stringify(t,a,e)}).join("");var l={type:e.type,content:n.stringify(e.content,a,r),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:r};if("comment"==l.type&&(l.attributes.spellcheck="true"),e.alias){var i="Array"===t.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}t.hooks.run("wrap",l);var o="";for(var s in l.attributes)o+=(o?" ":"")+s+'="'+(l.attributes[s]||"")+'"';return"<"+l.tag+' class="'+l.classes.join(" ")+'" '+o+">"+l.content+""+l.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var n=JSON.parse(e.data),a=n.language,r=n.code,l=n.immediateClose;_self.postMessage(t.highlight(r,t.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.getElementsByTagName("script");return a=a[a.length-1],a&&(t.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",t.highlightAll)),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
3 | Prism.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup;
4 | Prism.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/(