markup-preview-command 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) mori_dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the 'Software'), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ Markup Previw Command
2
+ =======================
3
+
4
+ We use this library on Github when rendering your README or any other
5
+ rich text file, *When We are editing by Emacs or other editor*.
6
+
7
+ Markups
8
+ -------
9
+
10
+ The following markups are supported. Because We use github-markup gem.
11
+
12
+ * [.markdown](http://daringfireball.net/projects/markdown/)
13
+ * [.textile](http://www.textism.com/tools/textile/)
14
+ * [.rdoc](http://rdoc.sourceforge.net/)
15
+ * [.org](http://orgmode.org/)
16
+ * [.creole](http://wikicreole.org/)
17
+ * [.mediawiki](http://www.mediawiki.org/wiki/Help:Formatting)
18
+ * [.rst](http://docutils.sourceforge.net/rst.html) -- `pip docutils`
19
+ * [.asciidoc](http://www.methods.co.nz/asciidoc/) -- `brew install asciidoc, sudo apt-get install asciidoc`
20
+ * [.pod](http://search.cpan.org/dist/perl/pod/perlpod.pod) -- `Pod::Simple::HTML`
21
+ comes with Perl >= 5.10. Lower versions should install Pod::Simple from CPAN.
22
+
23
+
24
+ Installation
25
+ --------------
26
+
27
+ gem install markup-preview-command
28
+
29
+ Usage
30
+ -----
31
+
32
+ markup-preview --filepath foo --markup markdown --output browser
33
+ markup-preview --filepath foo.md --output browser
34
+ markup-preview --f foo.md -o browser
35
+ cat bar.md | markup-preview -m markdown
36
+
37
+ Or, more realistically:
38
+
39
+ Put markup-preview.el in your load-path.
40
+ cp path/to/markup-preview-command/etc/markup-preview.el ${HOME}/.emacs.d/elisp/markup-preview.el
41
+
42
+ Add following code.
43
+ (require 'markup-preview)
44
+ (global-set-key (kbd "M--") 'markup-preview) ; key bind example
45
+
46
+ Contributing
47
+ ------------
48
+
49
+ Fork, fix, then send me a pull request.
50
+
51
+ Copyright
52
+ ------------
53
+
54
+ Copyright (c) mori_dev. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
4
+
5
+ require 'rubygems' unless defined? Gem
6
+ require 'markup-preview-command'
7
+ require 'slop'
8
+
9
+ def main
10
+
11
+ help = <<-EOF
12
+ useage:
13
+ markup-preview -f path/to/foo.md -o browser
14
+ or,
15
+ cat foo.md | markup-preview -m markdown -o browser
16
+ EOF
17
+
18
+ opts = Slop.parse do
19
+ on :h, :help, help, :tail => true do
20
+ puts help
21
+ exit
22
+ end
23
+ on :m, :markup=, 'markup'
24
+ on :f, :filepath=, 'filepath'
25
+ on :o, :output=, 'set "-o browser" if see result by browser'
26
+ end
27
+
28
+ Markup::Preview::Command::Render.execute(opts)
29
+
30
+ end
31
+
32
+ main
@@ -0,0 +1,86 @@
1
+ ;;; markup-preview.el --- Emacs Interface for markup-preview-command
2
+
3
+ ;; Copyright (C) 2012 mori_dev
4
+
5
+ ;; Author: mori_dev <mori.dev.asdf@gmail.com>
6
+ ;; Version: 1.0
7
+ ;; Keywords: markup, convenience
8
+ ;; Prefix: mp:
9
+
10
+ ;; This program is free software; you can redistribute it and/or modify
11
+ ;; it under the terms of the GNU General Public License as published by
12
+ ;; the Free Software Foundation, either version 3 of the License, or
13
+ ;; (at your option) any later version.
14
+
15
+ ;; This program is distributed in the hope that it will be useful,
16
+ ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ ;; GNU General Public License for more details.
19
+
20
+ ;; You should have received a copy of the GNU General Public License
21
+ ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
22
+
23
+ ;;; Installation:
24
+
25
+ ;; This program is dependent on followings:
26
+ ;; - markup-preview-command (https://github.com/wakaran/markup-preview-command)
27
+
28
+ ;; Put markup-preview.el in your load-path, and add following code.
29
+
30
+ ;; (require 'markup-preview)
31
+ ;;
32
+ ;; M-x markup-preview
33
+ ;; Or,
34
+ ;; (global-set-key (kbd "M--") 'markup-preview) ; key bind example
35
+
36
+ ;;; History:
37
+
38
+ ;; Revision 1.0 2012/01/08 mori_dev
39
+ ;; Initial revision
40
+
41
+
42
+ (defvar mp:preferred-format nil)
43
+
44
+ (defvar mp:extension-markup-alist
45
+ '(("md" . "Markdown")
46
+ ("mkd" . "Markdown")
47
+ ("mkdn" . "Markdown")
48
+ ("mdown" . "Markdown")
49
+ ("markdown" . "Markdown")
50
+ ("rst" . "rest")
51
+ ("rest" . "rest")
52
+ ("org" . "Org")
53
+ ("textile" . "Textile")
54
+ ("pod" . "Pod")
55
+ ("creole" . "creole")
56
+ ("rdoc" . "rdoc")
57
+ ("mediawiki" . "MediaWiki")))
58
+
59
+ (defun mp:get-markup (extension)
60
+ (if mp:preferred-format
61
+ mp:preferred-format
62
+ (cdr (assoc extension mp:extension-markup-alist))))
63
+
64
+ (defun mp:get-target-string ()
65
+ (if (region-active-p)
66
+ (buffer-substring-no-properties (region-beginning) (region-end))
67
+ (buffer-substring-no-properties (point-min) (point-max))))
68
+
69
+ (defun mp:call-markup-preview-command (temp-file markup)
70
+ (unless (executable-find "markup-preview")
71
+ (error "markup-preview not found"))
72
+ (call-process-shell-command
73
+ (concat "markup-preview " "--filepath " temp-file " --markup " markup " --output browser"))
74
+ (delete-file temp-file))
75
+
76
+ (defun markup-preview ()
77
+ (interactive)
78
+ (let ((str (mp:get-target-string))
79
+ (temp-file (make-temp-file "markup-preview-region-"))
80
+ (markup (mp:get-markup (file-name-extension (buffer-file-name)))))
81
+ (unless temp-file (error "fail to get temp-file"))
82
+ (unless markup (error "fail to get markup"))
83
+ (with-temp-file temp-file (insert str))
84
+ (mp:call-markup-preview-command temp-file markup)))
85
+
86
+ (provide 'markup-preview)
@@ -0,0 +1,81 @@
1
+ require 'rubygems' unless defined? Gem
2
+ require 'markup-preview-command/version'
3
+ require 'markup-preview-command/util/util'
4
+
5
+ module Markup::Preview::Command
6
+ class Render
7
+
8
+ require 'github/markup'
9
+ require 'fileutils'
10
+ require 'tmpdir'
11
+
12
+ include Util
13
+
14
+ TMPDIR = File.join(Dir.tmpdir, 'markup-preview')
15
+ TMPFILE = File.join(TMPDIR, $$.to_s)
16
+ FileUtils.mkdir_p(TMPDIR) unless FileTest.directory? TMPDIR
17
+
18
+ def initialize(opts)
19
+ @content = nil
20
+ @format = nil
21
+ @browser = false
22
+ parse_options(opts)
23
+ end
24
+
25
+ def self.execute(opts)
26
+ new(opts).execute
27
+ end
28
+
29
+ def execute
30
+ create_html
31
+ if @browser
32
+ open_browser
33
+ exit($?.exitstatus || 0)
34
+ else
35
+ puts File.read(TMPFILE)
36
+ exit 0
37
+ end
38
+ end
39
+
40
+
41
+ private
42
+
43
+ def create_html
44
+ render_result = GitHub::Markup.render("dummy.#{@format}", @content)
45
+ template_css = File.read(File.join(File.dirname(__FILE__), 'markup-preview-command', 'css', 'template.css'))
46
+ gollum_css = File.read(File.join(File.dirname(__FILE__), 'markup-preview-command', 'css', 'gollum.css'))
47
+ html = ERB.new(File.read(File.join(File.dirname(__FILE__), 'markup-preview-command', 'view', 'template.erb')))
48
+ File.open(TMPFILE, 'w') do |f|
49
+ f.puts html.result(binding)
50
+ end
51
+ end
52
+
53
+ def open_browser
54
+ system "#{browser_command} #{TMPFILE}"
55
+ end
56
+
57
+ def parse_options(opts)
58
+
59
+ extensions = ['md','mkd','mkdn','mkdn','mdown','markdown','org','pod',
60
+ 'creole','rst','rest','textile','rdoc','mediawiki']
61
+
62
+
63
+ @format = opts[:markup].downcase if opts.markup?
64
+
65
+ if opts.output? && (opts[:output] === 'browser')
66
+ @browser = true
67
+ end
68
+
69
+ if opts.filepath? && (File::extname(opts[:filepath]) != "")
70
+ @format = File::extname(opts[:filepath])[1..-1]
71
+ unless extensions.include? @format
72
+ warn "invalid extension. \nvalid extensions: #{extensions.join(', ')}"
73
+ exit 1
74
+ end
75
+ end
76
+
77
+ @content = opts.filepath? ? File.read(opts[:filepath]) : $stdin.read
78
+
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,666 @@
1
+ /* This css base on gollum's gollum.css */
2
+ /* https://github.com/github/gollum */
3
+ /* The MIT License */
4
+
5
+ body, html {
6
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
7
+ font-size: 10px; /* -> 1em */
8
+ margin: 0;
9
+ padding: 0;
10
+ }
11
+
12
+ #wiki-wrapper {
13
+ margin: 15px auto;
14
+ overflow: visible;
15
+ width: 80%;
16
+ background-color: #F8F8F8;
17
+ border: 1px solid #E9E9E9;
18
+ padding: 15px 15px;
19
+ }
20
+
21
+
22
+ a:link {
23
+ color: #4183c4;
24
+ text-decoration: none;
25
+ }
26
+
27
+ a:hover, a:visited {
28
+ color: #4183c4;
29
+ text-decoration: underline;
30
+ }
31
+
32
+
33
+ /* @section head */
34
+ #head {
35
+ border-bottom: 1px solid #ccc;
36
+ margin: 4.5em 0 0.5em;
37
+ padding: 0.5em 0;
38
+ overflow: hidden;
39
+ }
40
+
41
+ #head h1 {
42
+ font-size: 3.3em;
43
+ float: left;
44
+ line-height: normal;
45
+ margin: 0;
46
+ padding: 0.08em 0 0 0;
47
+ }
48
+
49
+ #head ul.actions {
50
+ float: right;
51
+ }
52
+
53
+ /* @section content */
54
+ #wiki-content {
55
+ height: 1%;
56
+ overflow: visible;
57
+ }
58
+
59
+ #wiki-content .wrap {
60
+ height: 1%;
61
+ overflow: auto;
62
+ }
63
+
64
+ /* @section comments */
65
+ #wiki-body #inline-comment {
66
+ display: none; /* todo */
67
+ }
68
+
69
+ /* @section body */
70
+ #wiki-body {
71
+ display: block;
72
+ float: left;
73
+ margin-right: 3%;
74
+ width: 100%;
75
+ }
76
+
77
+ .has-rightbar #wiki-body {
78
+ width: 68%;
79
+ }
80
+
81
+ /* @section rightbar */
82
+ #wiki-rightbar {
83
+ background-color: #f7f7f7;
84
+ border: 1px solid #ddd;
85
+ font-size: 13px;
86
+ float: right;
87
+ padding: 7px;
88
+ width: 25%;
89
+
90
+ border-radius: 0.5em;
91
+ -moz-border-radius: 0.5em;
92
+ -webkit-border-radius: 0.5em;
93
+ }
94
+
95
+ #wiki-rightbar p {
96
+ margin: 13px 0 0;
97
+ }
98
+
99
+ #wiki-rightbar > p:first-child {
100
+ margin-top: 0;
101
+ }
102
+
103
+ #wiki-rightbar p.parent {
104
+ border-bottom: 1px solid #bbb;
105
+ font-weight: bold;
106
+ margin: 0 0 0.5em 0;
107
+ padding: 0 0 0.5em 0;
108
+ text-shadow: 0 1px 0 #fff;
109
+ }
110
+
111
+ /* Back arrow */
112
+ #wiki-rightbar p.parent:before {
113
+ color: #666;
114
+ content: "← ";
115
+ }
116
+
117
+ #wiki-rightbar h3 {
118
+ font-size: 1.2em;
119
+ color: #333;
120
+ margin: 1.2em 0 0;
121
+ padding: 0;
122
+ text-shadow: 0 1px 0 #fff;
123
+ }
124
+
125
+ #wiki-rightbar ul {
126
+ margin: 0.5em 0 1em;
127
+ padding: 0;
128
+ }
129
+
130
+ #wiki-rightbar ul li {
131
+ color: #bbb;
132
+ margin: 0 0 0 1em;
133
+ padding: 0;
134
+ line-height: 1.75em;
135
+ list-style-position: inside;
136
+ list-style-type: round;
137
+ }
138
+
139
+ #wiki-rightbar #nav ul li a {
140
+ font-weight: bold;
141
+ text-shadow: 0 1px 0 #fff;
142
+ }
143
+
144
+ /* @section footer */
145
+ #wiki-footer {
146
+ clear: both;
147
+ margin: 2em 0 5em;
148
+ }
149
+
150
+ .has-rightbar #wiki-footer {
151
+ width: 70%;
152
+ }
153
+
154
+ #wiki-footer #footer-content {
155
+ background-color: #f7f7f7;
156
+ border: 1px solid #ddd;
157
+ font-size: 1.2em;
158
+ line-height: 1.5em;
159
+ margin-top: 1.5em;
160
+ padding: 1em;
161
+
162
+ border-radius: 0.5em;
163
+ -moz-border-radius: 0.5em;
164
+ -webkit-border-radius: 0.5em;
165
+ }
166
+
167
+ #wiki-footer #footer-content h3 {
168
+ font-size: 1.2em;
169
+ color: #333;
170
+ margin: 0;
171
+ padding: 0 0 0.2em;
172
+ text-shadow: 0 1px 0 #fff;
173
+ }
174
+
175
+ #wiki-footer #footer-content p {
176
+ margin: 0.5em 0 0;
177
+ padding: 0;
178
+ }
179
+
180
+ #wiki-footer #footer-content ul.links {
181
+ margin: 0.5em 0 0;
182
+ overflow: hidden;
183
+ padding: 0;
184
+ }
185
+
186
+ #wiki-footer #footer-content ul.links li {
187
+ color: #999;
188
+ float: left;
189
+ list-style-position: inside;
190
+ list-style-type: square;
191
+ padding: 0;
192
+ margin-left: 0.75em;
193
+ }
194
+
195
+ #wiki-footer #footer-content ul.links li a {
196
+ font-weight: bold;
197
+ text-shadow: 0 1px 0 #fff;
198
+ }
199
+
200
+ #wiki-footer #footer-content ul.links li:first-child {
201
+ list-style-type: none;
202
+ margin: 0;
203
+ }
204
+
205
+ .ff #wiki-footer #footer-content ul.links li:first-child {
206
+ margin: 0 -0.75em 0 0;
207
+ }
208
+
209
+ /* @section page-footer */
210
+ .page #footer {
211
+ border-top: 1px solid #ccc;
212
+ margin: 1em 0 7em;
213
+ }
214
+
215
+ #footer p#last-edit {
216
+ font-size: 1.2em;
217
+ line-height: 1.6em;
218
+ color: #999;
219
+ margin: 0.9em 0;
220
+ }
221
+
222
+ #footer p#last-edit span.username {
223
+ font-weight: bold;
224
+ }
225
+
226
+
227
+ /* @section history */
228
+ .history h1 {
229
+ color: #999;
230
+ font-weight: normal;
231
+ }
232
+
233
+ .history h1 strong {
234
+ color: #000;
235
+ font-weight: bold;
236
+ }
237
+
238
+ #wiki-history {
239
+ margin-top: 3em;
240
+ }
241
+
242
+ #wiki-history fieldset {
243
+ border: 0;
244
+ margin: 2em 0;
245
+ padding: 0;
246
+ }
247
+
248
+ #wiki-history table, #wiki-history tbody {
249
+ border-collapse: collapse;
250
+ padding: 0;
251
+ margin: 0;
252
+ width: 100%;
253
+ }
254
+
255
+ #wiki-history table tr {
256
+ padding: 0;
257
+ margin: 0;
258
+ }
259
+
260
+ #wiki-history table tr {
261
+ background-color: #ebf2f6;
262
+ }
263
+
264
+ #wiki-history table tr td {
265
+ border: 1px solid #c0dce9;
266
+ font-size: 1.2em;
267
+ line-height: 1.6em;
268
+ margin: 0;
269
+ padding: 0.3em 0.7em;
270
+ }
271
+
272
+ #wiki-history table tr td.checkbox {
273
+ min-width: 2em;
274
+ padding: 0.3em;
275
+ }
276
+
277
+ #wiki-history table tr td.checkbox input {
278
+ cursor: pointer;
279
+ display: block;
280
+ padding-right: 0;
281
+ padding-top: 0.4em;
282
+ margin-right: -0.2em;
283
+ }
284
+
285
+ #wiki-history table tr:nth-child(2n),
286
+ #wiki-history table tr.alt-row {
287
+ background-color: #f3f7fa;
288
+ }
289
+
290
+ #wiki-history table tr.selected {
291
+ background-color: #ffffea !important;
292
+ z-index: 100;
293
+ }
294
+
295
+ #wiki-history table tr td.commit-name {
296
+ border-left: 0;
297
+ }
298
+
299
+ #wiki-history table tr td.commit-name span.time-elapsed {
300
+ color: #999;
301
+ }
302
+
303
+ #wiki-history table tr td.author {
304
+ width: 20%;
305
+ }
306
+
307
+ #wiki-history table tr td.author a {
308
+ color: #000;
309
+ font-weight: bold;
310
+ }
311
+
312
+ #wiki-history table tr td.author a span.username {
313
+ display: block;
314
+ padding-top: 3px;
315
+ }
316
+
317
+ #wiki-history table tr td img {
318
+ background-color: #fff;
319
+ border: 1px solid #999;
320
+ display: block;
321
+ float: left;
322
+ height: 18px;
323
+ overflow: hidden;
324
+ margin: 0 0.5em 0 0;
325
+ width: 18px;
326
+ padding: 2px;
327
+ }
328
+
329
+ #wiki-history table tr td.commit-name a {
330
+ font-size: 0.9em;
331
+ font-family: 'Monaco', 'Andale Mono', Consolas, 'Courier New', monospace;
332
+ padding: 0 0.2em;
333
+ }
334
+
335
+ .history #wiki-history ul.actions li,
336
+ .history #footer ul.actions li {
337
+ margin: 0 0.6em 0 0;
338
+ }
339
+
340
+
341
+ /* @section edit */
342
+ .edit h1 {
343
+ color: #999;
344
+ font-weight: normal;
345
+ }
346
+
347
+ .edit h1 strong {
348
+ color: #000;
349
+ font-weight: bold;
350
+ }
351
+
352
+
353
+ /* @section search */
354
+ .results h1 {
355
+ color: #999;
356
+ font-weight: normal;
357
+ }
358
+
359
+ .results h1 strong {
360
+ color: #000;
361
+ font-weight: bold;
362
+ }
363
+
364
+ .results #results {
365
+ border-bottom: 1px solid #ccc;
366
+ margin-bottom: 2em;
367
+ padding-bottom: 2em;
368
+ }
369
+
370
+ .results #results ul {
371
+ margin: 2em 0 0 0;
372
+ padding: 0;
373
+ }
374
+
375
+ .results #results ul li {
376
+ font-size: 1.2em;
377
+ line-height: 1.6em;
378
+ list-style-position: outside;
379
+ padding: 0.2em 0;
380
+ }
381
+
382
+ .results #results ul li span.count {
383
+ color: #999;
384
+ }
385
+
386
+ .results p#no-results {
387
+ font-size: 1.2em;
388
+ line-height: 1.6em;
389
+ margin-top: 2em;
390
+ }
391
+
392
+ .results #footer ul.actions li {
393
+ margin: 0 1em 0 0;
394
+ }
395
+
396
+
397
+ /* @section compare */
398
+ .compare h1 {
399
+ color: #999;
400
+ font-weight: normal;
401
+ }
402
+
403
+ .compare h1 strong {
404
+ color: #000;
405
+ font-weight: bold;
406
+ }
407
+
408
+ .compare #compare-content {
409
+ margin-top: 3em;
410
+ }
411
+
412
+ .compare .data {
413
+ border: 1px solid #ddd;
414
+ margin-top: 1em;
415
+ overflow: auto;
416
+ }
417
+
418
+ .compare .data pre {
419
+ margin: 0;
420
+ padding: 0;
421
+ }
422
+
423
+ .compare .data pre div {
424
+ padding: 0 0 0 1em;
425
+ }
426
+
427
+ .compare .data tr td {
428
+ font-family: "Consolas", "Monaco", "Andale Mono", "Courier New", monospace;
429
+ font-size: 1.2em;
430
+ line-height: 1.8em;
431
+ margin: 0;
432
+ padding: 0;
433
+ }
434
+
435
+ .compare .data td.line_numbers {
436
+ background: #f7f7f7;
437
+ border-right: 1px solid #999;
438
+ color: #999;
439
+ padding: 0 0 0 0.5em;
440
+ }
441
+
442
+ .compare #compare-content ul.actions li,
443
+ .compare #footer ul.actions li {
444
+ margin-left: 0;
445
+ margin-right: 0.6em;
446
+ }
447
+
448
+
449
+
450
+ /* @control syntax */
451
+ .highlight { background: #ffffff; }
452
+ .highlight .c { color: #999988; font-style: italic }
453
+ .highlight .err { color: #a61717; background-color: #e3d2d2 }
454
+ .highlight .k { font-weight: bold }
455
+ .highlight .o { font-weight: bold }
456
+ .highlight .cm { color: #999988; font-style: italic }
457
+ .highlight .cp { color: #999999; font-weight: bold }
458
+ .highlight .c1 { color: #999988; font-style: italic }
459
+ .highlight .cs { color: #999999; font-weight: bold; font-style: italic }
460
+ .highlight .gd { color: #000000; background-color: #ffdddd }
461
+ .highlight .gd .x { color: #000000; background-color: #ffaaaa }
462
+ .highlight .ge { font-style: italic }
463
+ .highlight .gr { color: #aa0000 }
464
+ .highlight .gh { color: #999999 }
465
+ .highlight .gi { color: #000000; background-color: #ddffdd }
466
+ .highlight .gi .x { color: #000000; background-color: #aaffaa }
467
+ .highlight .gc { color: #999; background-color: #EAF2F5 }
468
+ .highlight .go { color: #888888 }
469
+ .highlight .gp { color: #555555 }
470
+ .highlight .gs { font-weight: bold }
471
+ .highlight .gu { color: #aaaaaa }
472
+ .highlight .gt { color: #aa0000 }
473
+
474
+
475
+ /* @control minibutton */
476
+ ul.actions {
477
+ display: block;
478
+ list-style-type: none;
479
+ overflow: hidden;
480
+ padding: 0;
481
+ }
482
+
483
+ ul.actions li {
484
+ float: left;
485
+ font-size: 1.2em;
486
+ margin-left: 0.6em;
487
+ }
488
+
489
+ .minibutton a {
490
+ background-color: #f7f7f7;
491
+ border: 1px solid #d4d4d4;
492
+ color: #333;
493
+ display: block;
494
+ font-weight: bold;
495
+ margin: 0;
496
+ padding: 0.4em 1em;
497
+ height: 1.4em;
498
+
499
+ text-shadow: 0 1px 0 #fff;
500
+
501
+ filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
502
+ background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
503
+ background: -moz-linear-gradient(top, #f4f4f4, #ececec);
504
+
505
+ border-radius: 3px;
506
+ -moz-border-radius: 3px;
507
+ -webkit-border-radius: 3px;
508
+ }
509
+
510
+ #search-submit {
511
+ background-color: #f7f7f7;
512
+ border: 1px solid #d4d4d4;
513
+ color: #333;
514
+ display: block;
515
+ font-weight: bold;
516
+ margin: 0;
517
+ padding: 0.4em 1em;
518
+
519
+ text-shadow: 0 1px 0 #fff;
520
+
521
+ filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f4f4f4', endColorstr='#ececec');
522
+ background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4), to(#ececec));
523
+ background: -moz-linear-gradient(top, #f4f4f4, #ececec);
524
+
525
+ border-radius: 3px;
526
+ -moz-border-radius: 3px;
527
+ -webkit-border-radius: 3px;
528
+ }
529
+
530
+ .minibutton a:hover,
531
+ #search-submit:hover {
532
+ background: #3072b3;
533
+ border-color: #518cc6 #518cc6 #2a65a0;
534
+ color: #fff;
535
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
536
+ text-decoration: none;
537
+
538
+ filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#599bdc', endColorstr='#3072b3');
539
+ background: -webkit-gradient(linear, left top, left bottom, from(#599bdc), to(#3072b3));
540
+ background: -moz-linear-gradient(top, #599bdc, #3072b3);
541
+ }
542
+
543
+ .minibutton a:visited {
544
+ text-decoration: none;
545
+ }
546
+
547
+
548
+ /* @special error */
549
+ #wiki-wrapper.error {
550
+ height: 1px;
551
+ position: absolute;
552
+ overflow: visible;
553
+ top: 50%;
554
+ width: 100%;
555
+ }
556
+
557
+ #error {
558
+ background-color: #f9f9f9;
559
+ border: 1px solid #e4e4e4;
560
+ left: 50%;
561
+ overflow: hidden;
562
+ padding: 2%;
563
+ margin: -10% 0 0 -35%;
564
+ position: absolute;
565
+ width: 70%;
566
+
567
+ border-radius: 0.5em;
568
+ -moz-border-radius: 0.5em;
569
+ -webkit-border-radius: 0.5em;
570
+ }
571
+
572
+ #error h1 {
573
+ font-size: 3em;
574
+ line-height: normal;
575
+ margin: 0;
576
+ padding: 0;
577
+ }
578
+
579
+ #error p {
580
+ font-size: 1.2em;
581
+ line-height: 1.6em;
582
+ margin: 1em 0 0.5em;
583
+ padding: 0;
584
+ }
585
+
586
+
587
+ /* @control searchbar */
588
+ #head #searchbar {
589
+ float: right;
590
+ margin: 1em 0 0 0;
591
+ padding: 0;
592
+ overflow: hidden;
593
+ }
594
+
595
+ #head #searchbar #searchbar-fauxtext {
596
+ background: #fff;
597
+ border: 1px solid #d4d4d4;
598
+ overflow: hidden;
599
+
600
+ border-radius: 0.3em;
601
+ -moz-border-radius: 0.3em;
602
+ -webkit-border-radius: 0.3em;
603
+ }
604
+
605
+ #head #searchbar #searchbar-fauxtext input#search-query {
606
+ border: none;
607
+ color: #000;
608
+ float: left;
609
+ font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
610
+ font-size: 1.2em;
611
+ height: 1.8em;
612
+
613
+ -webkit-focus-ring: none;
614
+ }
615
+
616
+ .ff #head #searchbar #searchbar-fauxtext input#search-query {
617
+ padding: 0.2em 0 0.2em 0.5em;
618
+ }
619
+
620
+ .ie #head #searchbar #searchbar-fauxtext input#search-query {
621
+ padding: 0.4em 0 0 0.5em;
622
+ }
623
+
624
+ #head #searchbar #searchbar-fauxtext input#search-query.ph {
625
+ color: #999;
626
+ }
627
+
628
+ #head #searchbar #searchbar-fauxtext #search-submit {
629
+ border: 0;
630
+ border-left: 1px solid #d4d4d4;
631
+ cursor: pointer;
632
+ margin: 0 !important;
633
+ padding: 0;
634
+ float: right;
635
+ font-size: 1.2em;
636
+
637
+ border-radius: 0 3px 3px 0;
638
+ -moz-border-radius: 0 3px 3px 0;
639
+ -webkit-border-radius: 0 3px 3px 0;
640
+ }
641
+
642
+ #head #searchbar #searchbar-fauxtext #search-submit span {
643
+ background-image: url(/images/icon-sprite.png);
644
+ background-position: -431px -1px;
645
+ background-repeat: no-repeat;
646
+ display: block;
647
+ height: 2em;
648
+ overflow: hidden;
649
+ text-indent: -5000px;
650
+ width: 28px;
651
+ }
652
+
653
+ .ff #head #searchbar #searchbar-fauxtext #search-submit span,
654
+ .ie #head #searchbar #searchbar-fauxtext #search-submit span {
655
+ height: 2.2em;
656
+ }
657
+
658
+ #head #searchbar #searchbar-fauxtext #search-submit:hover span {
659
+ background-position: -431px -28px;
660
+ padding: 0;
661
+ }
662
+
663
+
664
+ #MathJax_Message {
665
+ display: none;
666
+ }