Show More
@@ -0,0 +1,157 b'' | |||||
|
1 | /* | |||
|
2 | ||||
|
3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> | |||
|
4 | Adapted from GitHub theme | |||
|
5 | ||||
|
6 | */ | |||
|
7 | ||||
|
8 | pre code { | |||
|
9 | display: block; | |||
|
10 | padding: 0.5em; | |||
|
11 | } | |||
|
12 | ||||
|
13 | .highlight-base, | |||
|
14 | pre code, | |||
|
15 | pre .subst, | |||
|
16 | pre .tag .title, | |||
|
17 | pre .lisp .title, | |||
|
18 | pre .clojure .built_in, | |||
|
19 | pre .nginx .title { | |||
|
20 | color: black; | |||
|
21 | } | |||
|
22 | ||||
|
23 | .highlight-string, | |||
|
24 | pre .string, | |||
|
25 | pre .constant, | |||
|
26 | pre .parent, | |||
|
27 | pre .tag .value, | |||
|
28 | pre .rules .value, | |||
|
29 | pre .rules .value .number, | |||
|
30 | pre .preprocessor, | |||
|
31 | pre .ruby .symbol, | |||
|
32 | pre .ruby .symbol .string, | |||
|
33 | pre .aggregate, | |||
|
34 | pre .template_tag, | |||
|
35 | pre .django .variable, | |||
|
36 | pre .smalltalk .class, | |||
|
37 | pre .addition, | |||
|
38 | pre .flow, | |||
|
39 | pre .stream, | |||
|
40 | pre .bash .variable, | |||
|
41 | pre .apache .tag, | |||
|
42 | pre .apache .cbracket, | |||
|
43 | pre .tex .command, | |||
|
44 | pre .tex .special, | |||
|
45 | pre .erlang_repl .function_or_atom, | |||
|
46 | pre .markdown .header { | |||
|
47 | color: #BA2121; | |||
|
48 | } | |||
|
49 | ||||
|
50 | .highlight-comment, | |||
|
51 | pre .comment, | |||
|
52 | pre .annotation, | |||
|
53 | pre .template_comment, | |||
|
54 | pre .diff .header, | |||
|
55 | pre .chunk, | |||
|
56 | pre .markdown .blockquote { | |||
|
57 | color: #408080; | |||
|
58 | font-style: italic; | |||
|
59 | } | |||
|
60 | ||||
|
61 | .highlight-number, | |||
|
62 | pre .number, | |||
|
63 | pre .date, | |||
|
64 | pre .regexp, | |||
|
65 | pre .literal, | |||
|
66 | pre .smalltalk .symbol, | |||
|
67 | pre .smalltalk .char, | |||
|
68 | pre .go .constant, | |||
|
69 | pre .change, | |||
|
70 | pre .markdown .bullet, | |||
|
71 | pre .markdown .link_url { | |||
|
72 | color: #080; | |||
|
73 | } | |||
|
74 | ||||
|
75 | pre .label, | |||
|
76 | pre .javadoc, | |||
|
77 | pre .ruby .string, | |||
|
78 | pre .decorator, | |||
|
79 | pre .filter .argument, | |||
|
80 | pre .localvars, | |||
|
81 | pre .array, | |||
|
82 | pre .attr_selector, | |||
|
83 | pre .important, | |||
|
84 | pre .pseudo, | |||
|
85 | pre .pi, | |||
|
86 | pre .doctype, | |||
|
87 | pre .deletion, | |||
|
88 | pre .envvar, | |||
|
89 | pre .shebang, | |||
|
90 | pre .apache .sqbracket, | |||
|
91 | pre .nginx .built_in, | |||
|
92 | pre .tex .formula, | |||
|
93 | pre .erlang_repl .reserved, | |||
|
94 | pre .prompt, | |||
|
95 | pre .markdown .link_label, | |||
|
96 | pre .vhdl .attribute, | |||
|
97 | pre .clojure .attribute, | |||
|
98 | pre .coffeescript .property { | |||
|
99 | color: #88F | |||
|
100 | } | |||
|
101 | ||||
|
102 | .highlight-keyword, | |||
|
103 | pre .keyword, | |||
|
104 | pre .id, | |||
|
105 | pre .phpdoc, | |||
|
106 | pre .aggregate, | |||
|
107 | pre .css .tag, | |||
|
108 | pre .javadoctag, | |||
|
109 | pre .phpdoc, | |||
|
110 | pre .yardoctag, | |||
|
111 | pre .smalltalk .class, | |||
|
112 | pre .winutils, | |||
|
113 | pre .bash .variable, | |||
|
114 | pre .apache .tag, | |||
|
115 | pre .go .typename, | |||
|
116 | pre .tex .command, | |||
|
117 | pre .markdown .strong, | |||
|
118 | pre .request, | |||
|
119 | pre .status { | |||
|
120 | color: #008000; | |||
|
121 | font-weight: bold; | |||
|
122 | } | |||
|
123 | ||||
|
124 | .highlight-builtin, | |||
|
125 | pre .built_in { | |||
|
126 | color: #008000; | |||
|
127 | } | |||
|
128 | ||||
|
129 | pre .markdown .emphasis { | |||
|
130 | font-style: italic; | |||
|
131 | } | |||
|
132 | ||||
|
133 | pre .nginx .built_in { | |||
|
134 | font-weight: normal; | |||
|
135 | } | |||
|
136 | ||||
|
137 | pre .coffeescript .javascript, | |||
|
138 | pre .javascript .xml, | |||
|
139 | pre .tex .formula, | |||
|
140 | pre .xml .javascript, | |||
|
141 | pre .xml .vbscript, | |||
|
142 | pre .xml .css, | |||
|
143 | pre .xml .cdata { | |||
|
144 | opacity: 0.5; | |||
|
145 | } | |||
|
146 | ||||
|
147 | /* apply the same style to codemirror */ | |||
|
148 | ||||
|
149 | .cm-s-ipython span.cm-variable { .highlight-base()} | |||
|
150 | .cm-s-ipython span.cm-keyword { .highlight-keyword() } | |||
|
151 | .cm-s-ipython span.cm-number { .highlight-number() } | |||
|
152 | .cm-s-ipython span.cm-comment { .highlight-comment() } | |||
|
153 | .cm-s-ipython span.cm-string { .highlight-string()} | |||
|
154 | .cm-s-ipython span.cm-builtin { .highlight-builtin() } | |||
|
155 | .cm-s-ipython span.cm-error { color: #f00; } | |||
|
156 | .cm-s-ipython span.cm-operator {color: #AA22FF; font-weight: bold;} | |||
|
157 | .cm-s-ipython span.cm-meta {color: #AA22FF;} |
@@ -1,1 +1,1 b'' | |||||
1 | Subproject commit f7467391a9f9d4868f0bbf0d088fd572625862a4 |
|
1 | Subproject commit 945dfca396a1a7ca66d36ee758c7d8dca2b11287 |
@@ -866,6 +866,26 b' a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decor' | |||||
866 | .end{-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;} |
|
866 | .end{-webkit-box-pack:end;-moz-box-pack:end;box-pack:end;} | |
867 | .center{-webkit-box-pack:center;-moz-box-pack:center;box-pack:center;} |
|
867 | .center{-webkit-box-pack:center;-moz-box-pack:center;box-pack:center;} | |
868 | .corner-all{border-radius:4px;} |
|
868 | .corner-all{border-radius:4px;} | |
|
869 | pre code{display:block;padding:0.5em;} | |||
|
870 | .highlight-base,pre code,pre .subst,pre .tag .title,pre .lisp .title,pre .clojure .built_in,pre .nginx .title{color:black;} | |||
|
871 | .highlight-string,pre .string,pre .constant,pre .parent,pre .tag .value,pre .rules .value,pre .rules .value .number,pre .preprocessor,pre .ruby .symbol,pre .ruby .symbol .string,pre .aggregate,pre .template_tag,pre .django .variable,pre .smalltalk .class,pre .addition,pre .flow,pre .stream,pre .bash .variable,pre .apache .tag,pre .apache .cbracket,pre .tex .command,pre .tex .special,pre .erlang_repl .function_or_atom,pre .markdown .header{color:#BA2121;} | |||
|
872 | .highlight-comment,pre .comment,pre .annotation,pre .template_comment,pre .diff .header,pre .chunk,pre .markdown .blockquote{color:#408080;font-style:italic;} | |||
|
873 | .highlight-number,pre .number,pre .date,pre .regexp,pre .literal,pre .smalltalk .symbol,pre .smalltalk .char,pre .go .constant,pre .change,pre .markdown .bullet,pre .markdown .link_url{color:#080;} | |||
|
874 | pre .label,pre .javadoc,pre .ruby .string,pre .decorator,pre .filter .argument,pre .localvars,pre .array,pre .attr_selector,pre .important,pre .pseudo,pre .pi,pre .doctype,pre .deletion,pre .envvar,pre .shebang,pre .apache .sqbracket,pre .nginx .built_in,pre .tex .formula,pre .erlang_repl .reserved,pre .prompt,pre .markdown .link_label,pre .vhdl .attribute,pre .clojure .attribute,pre .coffeescript .property{color:#8888ff;} | |||
|
875 | .highlight-keyword,pre .keyword,pre .id,pre .phpdoc,pre .aggregate,pre .css .tag,pre .javadoctag,pre .phpdoc,pre .yardoctag,pre .smalltalk .class,pre .winutils,pre .bash .variable,pre .apache .tag,pre .go .typename,pre .tex .command,pre .markdown .strong,pre .request,pre .status{color:#008000;font-weight:bold;} | |||
|
876 | .highlight-builtin,pre .built_in{color:#008000;} | |||
|
877 | pre .markdown .emphasis{font-style:italic;} | |||
|
878 | pre .nginx .built_in{font-weight:normal;} | |||
|
879 | pre .coffeescript .javascript,pre .javascript .xml,pre .tex .formula,pre .xml .javascript,pre .xml .vbscript,pre .xml .css,pre .xml .cdata{opacity:0.5;} | |||
|
880 | .cm-s-ipython span.cm-variable{color:black;} | |||
|
881 | .cm-s-ipython span.cm-keyword{color:#008000;font-weight:bold;} | |||
|
882 | .cm-s-ipython span.cm-number{color:#080;} | |||
|
883 | .cm-s-ipython span.cm-comment{color:#408080;font-style:italic;} | |||
|
884 | .cm-s-ipython span.cm-string{color:#BA2121;} | |||
|
885 | .cm-s-ipython span.cm-builtin{color:#008000;} | |||
|
886 | .cm-s-ipython span.cm-error{color:#f00;} | |||
|
887 | .cm-s-ipython span.cm-operator{color:#AA22FF;font-weight:bold;} | |||
|
888 | .cm-s-ipython span.cm-meta{color:#AA22FF;} | |||
869 | body{background-color:#ffffff;} |
|
889 | body{background-color:#ffffff;} | |
870 | body.notebook_app{overflow:hidden;} |
|
890 | body.notebook_app{overflow:hidden;} | |
871 | blockquote{border-left:4px solid #DDD;padding:0 15px;color:#777;} |
|
891 | blockquote{border-left:4px solid #DDD;padding:0 15px;color:#777;} |
@@ -42,7 +42,6 b' $(document).ready(function () {' | |||||
42 | var baseProjectUrl = $('body').data('baseProjectUrl') |
|
42 | var baseProjectUrl = $('body').data('baseProjectUrl') | |
43 |
|
43 | |||
44 | IPython.page = new IPython.Page(); |
|
44 | IPython.page = new IPython.Page(); | |
45 | IPython.markdown_converter = new Markdown.Converter(); |
|
|||
46 | IPython.layout_manager = new IPython.LayoutManager(); |
|
45 | IPython.layout_manager = new IPython.LayoutManager(); | |
47 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); |
|
46 | IPython.pager = new IPython.Pager('div#pager', 'div#pager_splitter'); | |
48 | IPython.quick_help = new IPython.QuickHelp('span#quick_help_area'); |
|
47 | IPython.quick_help = new IPython.QuickHelp('span#quick_help_area'); | |
@@ -94,6 +93,23 b' $(document).ready(function () {' | |||||
94 |
|
93 | |||
95 | $([IPython.events]).on('notebook_loaded.Notebook', first_load); |
|
94 | $([IPython.events]).on('notebook_loaded.Notebook', first_load); | |
96 | IPython.notebook.load_notebook($('body').data('notebookId')); |
|
95 | IPython.notebook.load_notebook($('body').data('notebookId')); | |
|
96 | ||||
|
97 | if (marked) { | |||
|
98 | marked.setOptions({ | |||
|
99 | gfm : true, | |||
|
100 | tables: true, | |||
|
101 | langPrefix: "language-", | |||
|
102 | highlight: function(code, lang) { | |||
|
103 | var highlighted; | |||
|
104 | if (lang) { | |||
|
105 | highlighted = hljs.highlight(lang, code, false); | |||
|
106 | } else { | |||
|
107 | highlighted = hljs.highlightAuto(code); | |||
|
108 | } | |||
|
109 | return highlighted.value; | |||
|
110 | } | |||
|
111 | }) | |||
|
112 | } | |||
97 |
|
113 | |||
98 | }); |
|
114 | }); | |
99 |
|
115 |
@@ -298,7 +298,7 b' var IPython = (function (IPython) {' | |||||
298 |
|
298 | |||
299 | MarkdownCell.options_default = { |
|
299 | MarkdownCell.options_default = { | |
300 | cm_config: { |
|
300 | cm_config: { | |
301 |
mode: 'm |
|
301 | mode: 'gfm' | |
302 | }, |
|
302 | }, | |
303 | placeholder: "Type *Markdown* and LaTeX: $\\alpha^2$" |
|
303 | placeholder: "Type *Markdown* and LaTeX: $\\alpha^2$" | |
304 | } |
|
304 | } | |
@@ -315,9 +315,9 b' var IPython = (function (IPython) {' | |||||
315 | if (this.rendered === false) { |
|
315 | if (this.rendered === false) { | |
316 | var text = this.get_text(); |
|
316 | var text = this.get_text(); | |
317 | if (text === "") { text = this.placeholder; } |
|
317 | if (text === "") { text = this.placeholder; } | |
318 | text = IPython.mathjaxutils.remove_math(text) |
|
318 | text = IPython.mathjaxutils.remove_math(text); | |
319 |
var html = |
|
319 | var html = marked.parser(marked.lexer(text)); | |
320 | html = IPython.mathjaxutils.replace_math(html) |
|
320 | html = IPython.mathjaxutils.replace_math(html); | |
321 | try { |
|
321 | try { | |
322 | this.set_rendered(html); |
|
322 | this.set_rendered(html); | |
323 | } catch (e) { |
|
323 | } catch (e) { | |
@@ -329,18 +329,6 b' var IPython = (function (IPython) {' | |||||
329 | } |
|
329 | } | |
330 | this.element.find('div.text_cell_input').hide(); |
|
330 | this.element.find('div.text_cell_input').hide(); | |
331 | this.element.find("div.text_cell_render").show(); |
|
331 | this.element.find("div.text_cell_render").show(); | |
332 | var code_snippets = this.element.find("pre > code"); |
|
|||
333 | code_snippets.replaceWith(function () { |
|
|||
334 | var code = $(this).html(); |
|
|||
335 | /* Substitute br for newlines and for spaces |
|
|||
336 | before highlighting, since prettify doesn't |
|
|||
337 | preserve those on all browsers */ |
|
|||
338 | code = code.replace(/(\r\n|\n|\r)/gm, "<br/>"); |
|
|||
339 | code = code.replace(/ /gm, ' '); |
|
|||
340 | code = prettyPrintOne(code); |
|
|||
341 |
|
||||
342 | return '<code class="prettyprint">' + code + '</code>'; |
|
|||
343 | }); |
|
|||
344 | this.typeset() |
|
332 | this.typeset() | |
345 | this.rendered = true; |
|
333 | this.rendered = true; | |
346 | } |
|
334 | } |
@@ -5,7 +5,7 b'' | |||||
5 | */ |
|
5 | */ | |
6 |
|
6 | |||
7 | @import "variables.less"; |
|
7 | @import "variables.less"; | |
8 |
|
8 | @import "highlight.less"; | ||
9 |
|
9 | |||
10 | body { |
|
10 | body { | |
11 | background-color:@notebook_background; |
|
11 | background-color:@notebook_background; |
@@ -12,9 +12,6 b' window.mathjax_url = "{{mathjax_url}}";' | |||||
12 | </script> |
|
12 | </script> | |
13 |
|
13 | |||
14 | <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}"> |
|
14 | <link rel="stylesheet" href="{{ static_url("components/codemirror/lib/codemirror.css") }}"> | |
15 | <link rel="stylesheet" href="{{ static_url("css/codemirror-ipython.css") }}"> |
|
|||
16 |
|
||||
17 | <link rel="stylesheet" href="{{ static_url("prettify/prettify.css") }}"/> |
|
|||
18 |
|
15 | |||
19 | <link rel="stylesheet" href="{{ static_url("css/celltoolbar.css") }}" type="text/css" /> |
|
16 | <link rel="stylesheet" href="{{ static_url("css/celltoolbar.css") }}" type="text/css" /> | |
20 |
|
17 | |||
@@ -198,6 +195,7 b' class="notebook_app"' | |||||
198 | <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script> |
|
195 | <script src="{{ static_url("components/codemirror/lib/codemirror.js") }}" charset="utf-8"></script> | |
199 | <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script> |
|
196 | <script src="{{ static_url("components/codemirror/addon/mode/loadmode.js") }}" charset="utf-8"></script> | |
200 | <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script> |
|
197 | <script src="{{ static_url("components/codemirror/addon/mode/multiplex.js") }}" charset="utf-8"></script> | |
|
198 | <script src="{{ static_url("components/codemirror/addon/mode/overlay.js") }}" charset="utf-8"></script> | |||
201 | <script src="{{ static_url("js/codemirror-ipython.js") }}" charset="utf-8"></script> |
|
199 | <script src="{{ static_url("js/codemirror-ipython.js") }}" charset="utf-8"></script> | |
202 | <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script> |
|
200 | <script src="{{ static_url("components/codemirror/mode/htmlmixed/htmlmixed.js") }}" charset="utf-8"></script> | |
203 | <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script> |
|
201 | <script src="{{ static_url("components/codemirror/mode/xml/xml.js") }}" charset="utf-8"></script> | |
@@ -205,10 +203,11 b' class="notebook_app"' | |||||
205 | <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script> |
|
203 | <script src="{{ static_url("components/codemirror/mode/css/css.js") }}" charset="utf-8"></script> | |
206 | <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script> |
|
204 | <script src="{{ static_url("components/codemirror/mode/rst/rst.js") }}" charset="utf-8"></script> | |
207 | <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script> |
|
205 | <script src="{{ static_url("components/codemirror/mode/markdown/markdown.js") }}" charset="utf-8"></script> | |
|
206 | <script src="{{ static_url("components/codemirror/mode/gfm/gfm.js") }}" charset="utf-8"></script> | |||
208 |
|
207 | |||
209 |
<script src="{{ static_url("p |
|
208 | <script src="{{ static_url("components/marked/lib/marked.js") }}" charset="utf-8"></script> | |
|
209 | <script src="{{ static_url("components/highlight.js/build/highlight.pack.js") }}" charset="utf-8"></script> | |||
210 |
|
210 | |||
211 | <script src="{{ static_url("prettify/prettify.js") }}" charset="utf-8"></script> |
|
|||
212 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> |
|
211 | <script src="{{ static_url("dateformat/date.format.js") }}" charset="utf-8"></script> | |
213 |
|
212 | |||
214 | <script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script> |
|
213 | <script src="{{ static_url("js/events.js") }}" type="text/javascript" charset="utf-8"></script> |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed | ||
This diff has been collapsed as it changes many lines, (1319 lines changed) Show them Hide them |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now