Skip to content

Commit 0013534

Browse files
committedJun 4, 2015
fix #1782 -- detect and apply ipython css
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent c3d5a4e commit 0013534

File tree

8 files changed

+358
-0
lines changed

8 files changed

+358
-0
lines changed
 

‎nikola/data/themes/base-jinja/templates/base_helper.tmpl

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ lang="{{ lang }}">
7979
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
8080
{% endif %}
8181
{% endif %}
82+
{% if needs_ipython_css %}
83+
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
84+
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
85+
{% endif %}
8286
{% endmacro %}
8387

8488
{% macro html_feedlinks() %}

‎nikola/data/themes/base/assets/css/ipython.min.css

+199
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
body {
2+
position: static;
3+
}
4+
5+
pre {
6+
padding: 0.4em;
7+
margin: 0px;
8+
font-family: monospace, sans-serif;
9+
border: none;
10+
}
11+
12+
div.prompt {
13+
padding: 0.6em;
14+
font-size: 13px;
15+
background-color: #E9E9E9;
16+
margin-right: 1em;
17+
-webkit-border-radius: 3px;
18+
-moz-border-radius: 3px;
19+
border-radius: 3px;
20+
}
21+
22+
div.input_prompt {
23+
24+
}
25+
26+
div.output_prompt {
27+
/* 5px right shift to account for margin in parent container */
28+
margin: 0 5px 0 0px;
29+
}
30+
31+
div.output_area pre {
32+
font-size: 13px;
33+
}
34+
35+
div.text_cell_render {
36+
padding: 0px;
37+
color: #333333;
38+
}
39+
40+
.rendered_html p {
41+
text-align: left;
42+
}
43+
44+
.rendered_html ul {
45+
margin: 0 0 12px 25px;
46+
}
47+
48+
.rendered_html :visited {
49+
text-decoration: none;
50+
}
51+
52+
.rendered_html :link {
53+
text-decoration: none;
54+
}
55+
56+
.rendered_html pre, .rendered_html code {
57+
background-color: #DDDDDD;
58+
padding-left: 0.5em;
59+
padding-right: 0.5em;
60+
padding-top: 0.05em;
61+
padding-bottom: 0.05em;
62+
margin: 1em 0em;
63+
font-size: 14px;
64+
}
65+
66+
.page-content > .content p {
67+
margin: 0 0 0px;
68+
}
69+
70+
h1, h2, h3, .metadata p {
71+
margin-left: 15px;
72+
}
73+
74+
.highlight .hll { background-color: #ffffcc }
75+
.highlight { background: #f8f8f8; }
76+
.highlight .c { color: #408080; font-style: italic } /* Comment */
77+
.highlight .err { border: 1px solid #FF0000 } /* Error */
78+
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
79+
.highlight .o { color: #666666 } /* Operator */
80+
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
81+
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
82+
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
83+
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
84+
.highlight .gd { color: #A00000 } /* Generic.Deleted */
85+
.highlight .ge { font-style: italic } /* Generic.Emph */
86+
.highlight .gr { color: #FF0000 } /* Generic.Error */
87+
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
88+
.highlight .gi { color: #00A000 } /* Generic.Inserted */
89+
.highlight .go { color: #888888 } /* Generic.Output */
90+
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
91+
.highlight .gs { font-weight: bold } /* Generic.Strong */
92+
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
93+
.highlight .gt { color: #0044DD } /* Generic.Traceback */
94+
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
95+
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
96+
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
97+
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
98+
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
99+
.highlight .kt { color: #B00040 } /* Keyword.Type */
100+
.highlight .m { color: #666666 } /* Literal.Number */
101+
.highlight .s { color: #BA2121 } /* Literal.String */
102+
.highlight .na { color: #7D9029 } /* Name.Attribute */
103+
.highlight .nb { color: #008000 } /* Name.Builtin */
104+
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
105+
.highlight .no { color: #880000 } /* Name.Constant */
106+
.highlight .nd { color: #AA22FF } /* Name.Decorator */
107+
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
108+
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
109+
.highlight .nf { color: #0000FF } /* Name.Function */
110+
.highlight .nl { color: #A0A000 } /* Name.Label */
111+
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
112+
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
113+
.highlight .nv { color: #19177C } /* Name.Variable */
114+
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
115+
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
116+
.highlight .mf { color: #666666 } /* Literal.Number.Float */
117+
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
118+
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
119+
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
120+
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
121+
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
122+
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
123+
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
124+
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
125+
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
126+
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
127+
.highlight .sx { color: #008000 } /* Literal.String.Other */
128+
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
129+
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
130+
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
131+
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
132+
.highlight .vc { color: #19177C } /* Name.Variable.Class */
133+
.highlight .vg { color: #19177C } /* Name.Variable.Global */
134+
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
135+
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */

‎nikola/data/themes/base/templates/base_helper.tmpl

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ lang="${lang}">
7979
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
8080
%endif
8181
%endif
82+
% if needs_ipython_css:
83+
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
84+
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
85+
% endif
8286
</%def>
8387

8488
<%def name="html_feedlinks()">

‎nikola/data/themes/bootstrap-jinja/templates/base_helper.tmpl

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ lang="{{ lang }}">
117117
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
118118
{% endif %}
119119
{% endif %}
120+
{% if needs_ipython_css %}
121+
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
122+
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
123+
{% endif %}
120124
{% if annotations and post and not post.meta('noannotations') %}
121125
{{ notes.css() }}
122126
{% elif not annotations and post and post.meta('annotations') %}

‎nikola/data/themes/bootstrap/templates/base_helper.tmpl

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ lang="${lang}">
117117
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
118118
%endif
119119
%endif
120+
% if needs_ipython_css:
121+
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
122+
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
123+
% endif
120124
% if annotations and post and not post.meta('noannotations'):
121125
${notes.css()}
122126
% elif not annotations and post and post.meta('annotations'):

‎nikola/data/themes/bootstrap3-jinja/templates/base_helper.tmpl

+4
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ lang="{{ lang }}">
115115
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
116116
{% endif %}
117117
{% endif %}
118+
{% if needs_ipython_css %}
119+
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
120+
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
121+
{% endif %}
118122
{% if annotations and post and not post.meta('noannotations') %}
119123
{{ notes.css() }}
120124
{% elif not annotations and post and post.meta('annotations') %}

‎nikola/data/themes/bootstrap3/templates/base_helper.tmpl

+4
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ lang="${lang}">
115115
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
116116
%endif
117117
%endif
118+
% if needs_ipython_css:
119+
<link href="/assets/css/ipython.min.css" rel="stylesheet" type="text/css">
120+
<link href="/assets/css/nikola_ipython.css" rel="stylesheet" type="text/css">
121+
% endif
118122
% if annotations and post and not post.meta('noannotations'):
119123
${notes.css()}
120124
% elif not annotations and post and post.meta('annotations'):

0 commit comments

Comments
 (0)
Failed to load comments.