##// END OF EJS Templates
use jquery-ui classes
Matthias BUSSONNIER -
Show More
@@ -1,411 +1,399 b''
1 1 /**
2 2 * Primary styles
3 3 *
4 4 * Author: IPython Development Team
5 5 */
6 6
7 7
8 8 body {
9 9 overflow: hidden;
10 10 }
11 11
12 12 span#save_widget {
13 13 padding: 5px;
14 14 margin: 0px 0px 0px 300px;
15 15 display:inline-block;
16 16 }
17 17
18 18 span#notebook_name {
19 19 height: 1em;
20 20 line-height: 1em;
21 21 padding: 3px;
22 22 border: none;
23 23 font-size: 146.5%;
24 24 }
25 25
26 26 .ui-menubar-item .ui-button .ui-button-text {
27 27 padding: 0.4em 1.0em;
28 28 font-size: 100%;
29 29 }
30 30
31 31 .ui-menu {
32 32 -moz-box-shadow: 0px 6px 10px -1px #adadad;
33 33 -webkit-box-shadow: 0px 6px 10px -1px #adadad;
34 34 box-shadow: 0px 6px 10px -1px #adadad;
35 35 }
36 36
37 37 .ui-menu .ui-menu-item a {
38 38 border: 1px solid transparent;
39 39 padding: 2px 1.6em;
40 40 }
41 41
42 42 .ui-menu .ui-menu-item a.ui-state-focus {
43 43 margin: 0;
44 44 }
45 45
46 46 .ui-menu hr {
47 47 margin: 0.3em 0;
48 48 }
49 49
50 50 #menubar_container {
51 51 position: relative;
52 52 }
53 53
54 54 #notification_area {
55 55 position: absolute;
56 56 right: 0px;
57 57 top: 0px;
58 58 height: 25px;
59 59 padding: 3px 6px;
60 60 z-index: 10;
61 61 }
62 62
63 63 .notification{
64 64 float : right;
65 65 right: 3px;
66 66 top: 3px;
67 67 height: 25px;
68 68 padding: 3px 6px;
69 69 z-index: 10;
70 70 }
71 71
72 .notification.info
73 {color : darkblue;}
74
75 .notification.safe
76 {color : darkgreen;}
77
78 .notification.warning
79 {color : darkorange;}
80
81 .notification.danger
82 { color : darkred }
83
84 72 #toolbar {
85 73 padding: 3px 15px;
86 74 }
87 75
88 76 #cell_type {
89 77 font-size: 85%;
90 78 }
91 79
92 80
93 81 div#main_app {
94 82 width: 100%;
95 83 position: relative;
96 84 }
97 85
98 86 span#quick_help_area {
99 87 position: static;
100 88 padding: 5px 0px;
101 89 margin: 0px 0px 0px 0px;
102 90 }
103 91
104 92 .help_string {
105 93 float: right;
106 94 width: 170px;
107 95 padding: 0px 5px;
108 96 text-align: left;
109 97 font-size: 85%;
110 98 }
111 99
112 100 .help_string_label {
113 101 float: right;
114 102 font-size: 85%;
115 103 }
116 104
117 105 div#notebook_panel {
118 106 margin: 0px 0px 0px 0px;
119 107 padding: 0px;
120 108 }
121 109
122 110 div#notebook {
123 111 overflow-y: scroll;
124 112 overflow-x: auto;
125 113 width: 100%;
126 114 /* This spaces the cell away from the edge of the notebook area */
127 115 padding: 5px 5px 15px 5px;
128 116 margin: 0px;
129 117 background-color: white;
130 118 }
131 119
132 120 div#pager_splitter {
133 121 height: 8px;
134 122 }
135 123
136 124 div#pager {
137 125 padding: 15px;
138 126 overflow: auto;
139 127 display: none;
140 128 }
141 129
142 130 div.ui-widget-content {
143 131 border: 1px solid #aaa;
144 132 outline: none;
145 133 }
146 134
147 135 .cell {
148 136 border: 1px solid transparent;
149 137 }
150 138
151 139 div.cell {
152 140 width: 100%;
153 141 padding: 5px 5px 5px 0px;
154 142 /* This acts as a spacer between cells, that is outside the border */
155 143 margin: 2px 0px 2px 0px;
156 144 }
157 145
158 146 div.code_cell {
159 147 background-color: white;
160 148 }
161 149
162 150 /* any special styling for code cells that are currently running goes here */
163 151 div.code_cell.running {
164 152 }
165 153
166 154 div.prompt {
167 155 /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
168 156 width: 11ex;
169 157 /* This 0.4em is tuned to match the padding on the CodeMirror editor. */
170 158 padding: 0.4em;
171 159 margin: 0px;
172 160 font-family: monospace;
173 161 text-align:right;
174 162 }
175 163
176 164 div.input {
177 165 page-break-inside: avoid;
178 166 }
179 167
180 168 /* input_area and input_prompt must match in top border and margin for alignment */
181 169 div.input_area {
182 170 color: black;
183 171 border: 1px solid #ddd;
184 172 border-radius: 3px;
185 173 background: #f7f7f7;
186 174 }
187 175
188 176 div.input_prompt {
189 177 color: navy;
190 178 border-top: 1px solid transparent;
191 179 }
192 180
193 181 div.output_wrapper {
194 182 /* This is a spacer between the input and output of each cell */
195 183 margin-top: 5px;
196 184 margin-left: 5px;
197 185 /* FF needs explicit width to stretch */
198 186 width: 100%;
199 187 /* this position must be relative to enable descendents to be absolute within it */
200 188 position: relative;
201 189 }
202 190
203 191 /* class for the output area when it should be height-limited */
204 192 div.output_scroll {
205 193 /* ideally, this would be max-height, but FF barfs all over that */
206 194 height: 24em;
207 195 /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
208 196 width: 100%;
209 197
210 198 overflow: auto;
211 199 border-radius: 3px;
212 200 box-shadow: inset 0 2px 8px rgba(0, 0, 0, .8);
213 201 }
214 202
215 203 /* output div while it is collapsed */
216 204 div.output_collapsed {
217 205 margin-right: 5px;
218 206 }
219 207
220 208 div.out_prompt_overlay {
221 209 height: 100%;
222 210 padding: 0px;
223 211 position: absolute;
224 212 border-radius: 3px;
225 213 }
226 214
227 215 div.out_prompt_overlay:hover {
228 216 /* use inner shadow to get border that is computed the same on WebKit/FF */
229 217 box-shadow: inset 0 0 1px #000;
230 218 background: rgba(240, 240, 240, 0.5);
231 219 }
232 220
233 221 div.output_prompt {
234 222 color: darkred;
235 223 /* 5px right shift to account for margin in parent container */
236 224 margin: 0 5px 0 -5px;
237 225 }
238 226
239 227 /* This class is the outer container of all output sections. */
240 228 div.output_area {
241 229 padding: 0px;
242 230 page-break-inside: avoid;
243 231 }
244 232
245 233 /* This class is for the output subarea inside the output_area and after
246 234 the prompt div. */
247 235 div.output_subarea {
248 236 padding: 0.4em 0.4em 0.4em 0.4em;
249 237 }
250 238
251 239 /* The rest of the output_* classes are for special styling of the different
252 240 output types */
253 241
254 242 /* all text output has this class: */
255 243 div.output_text {
256 244 text-align: left;
257 245 color: black;
258 246 font-family: monospace;
259 247 }
260 248
261 249 /* stdout/stderr are 'text' as well as 'stream', but pyout/pyerr are *not* streams */
262 250 div.output_stream {
263 251 padding-top: 0.0em;
264 252 padding-bottom: 0.0em;
265 253 }
266 254 div.output_stdout {
267 255 }
268 256 div.output_stderr {
269 257 background: #fdd; /* very light red background for stderr */
270 258 }
271 259
272 260 div.output_latex {
273 261 text-align: left;
274 262 color: black;
275 263 }
276 264
277 265 div.output_html {
278 266 }
279 267
280 268 div.output_png {
281 269 }
282 270
283 271 div.output_jpeg {
284 272 }
285 273
286 274 div.text_cell {
287 275 background-color: white;
288 276 padding: 5px 5px 5px 5px;
289 277 }
290 278
291 279 div.text_cell_input {
292 280 color: black;
293 281 border: 1px solid #ddd;
294 282 border-radius: 3px;
295 283 background: #f7f7f7;
296 284 }
297 285
298 286 div.text_cell_render {
299 287 font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
300 288 outline: none;
301 289 resize: none;
302 290 width: inherit;
303 291 border-style: none;
304 292 padding: 5px;
305 293 color: black;
306 294 }
307 295
308 296 /* The following gets added to the <head> if it is detected that the user has a
309 297 * monospace font with inconsistent normal/bold/italic height. See
310 298 * notebookmain.js. Such fonts will have keywords vertically offset with
311 299 * respect to the rest of the text. The user should select a better font.
312 300 * See: https://github.com/ipython/ipython/issues/1503
313 301 *
314 302 * .CodeMirror span {
315 303 * vertical-align: bottom;
316 304 * }
317 305 */
318 306
319 307 .CodeMirror {
320 308 line-height: 1.231; /* Changed from 1em to our global default */
321 309 }
322 310
323 311 .CodeMirror-scroll {
324 312 height: auto; /* Changed to auto to autogrow */
325 313 /* The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
326 314 /* We have found that if it is visible, vertical scrollbars appear with font size changes.*/
327 315 overflow-y: hidden;
328 316 overflow-x: auto; /* Changed from auto to remove scrollbar */
329 317 }
330 318
331 319 /* CSS font colors for translated ANSI colors. */
332 320
333 321
334 322 .ansiblack {color: black;}
335 323 .ansired {color: darkred;}
336 324 .ansigreen {color: darkgreen;}
337 325 .ansiyellow {color: brown;}
338 326 .ansiblue {color: darkblue;}
339 327 .ansipurple {color: darkviolet;}
340 328 .ansicyan {color: steelblue;}
341 329 .ansigrey {color: grey;}
342 330 .ansibold {font-weight: bold;}
343 331
344 332 .completions {
345 333 position: absolute;
346 334 z-index: 10;
347 335 overflow: hidden;
348 336 border: 1px solid grey;
349 337 }
350 338
351 339 .completions select {
352 340 background: white;
353 341 outline: none;
354 342 border: none;
355 343 padding: 0px;
356 344 margin: 0px;
357 345 overflow: auto;
358 346 font-family: monospace;
359 347 }
360 348
361 349 option.context {
362 350 background-color: #DEF7FF;
363 351 }
364 352 option.introspection {
365 353 background-color: #EBF4EB;
366 354 }
367 355
368 356 /*fixed part of the completion*/
369 357 .completions p b {
370 358 font-weight:bold;
371 359 }
372 360
373 361 .completions p {
374 362 background: #DDF;
375 363 /*outline: none;
376 364 padding: 0px;*/
377 365 border-bottom: black solid 1px;
378 366 padding: 1px;
379 367 font-family: monospace;
380 368 }
381 369
382 370 pre.dialog {
383 371 background-color: #f7f7f7;
384 372 border: 1px solid #ddd;
385 373 border-radius: 3px;
386 374 padding: 0.4em;
387 375 padding-left: 2em;
388 376 }
389 377
390 378 p.dialog {
391 379 padding : 0.2em;
392 380 }
393 381
394 382 .shortcut_key {
395 383 display: inline-block;
396 384 width: 15ex;
397 385 text-align: right;
398 386 font-family: monospace;
399 387 }
400 388
401 389 .shortcut_descr {
402 390 }
403 391
404 392 /* Word-wrap output correctly. This is the CSS3 spelling, though Firefox seems
405 393 to not honor it correctly. Webkit browsers (Chrome, rekonq, Safari) do.
406 394 */
407 395 pre, code, kbd, samp { white-space: pre-wrap; }
408 396
409 397 #fonttest {
410 398 font-family: monospace;
411 399 }
@@ -1,48 +1,50 b''
1 1 //----------------------------------------------------------------------------
2 2 // Copyright (C) 2012 The IPython Development Team
3 3 //
4 4 // Distributed under the terms of the BSD License. The full license is in
5 5 // the file COPYING, distributed as part of this software.
6 6 //----------------------------------------------------------------------------
7 7
8 8 //============================================================================
9 9 // Notification widget
10 10 //============================================================================
11 11
12 12 var IPython = (function (IPython) {
13 13 "use strict";
14 14 var utils = IPython.utils;
15 15
16 16
17 17 var NotificationArea = function (selector) {
18 18 this.selector = selector;
19 19 if (this.selector !== undefined) {
20 20 this.element = $(selector);
21 21 }
22 22 };
23 23
24 24 NotificationArea.prototype.temp_message = function (msg, timeout, css_class) {
25 25 var uuid = utils.uuid();
26 if( css_class == 'danger'){css_class = 'ui-state-error'}
27 if( css_class == 'warning'){css_class = 'ui-state-highlight'}
26 28 var tdiv = $('<div>')
27 29 .attr('id',uuid)
28 30 .addClass('notification ui-widget ui-widget-content ui-corner-all')
29 31 .addClass('border-box-sizing')
30 32 .addClass(css_class)
31 33 .hide()
32 34 .text(msg);
33 35
34 36 $(this.selector).append(tdiv);
35 37 var tmout = Math.max(1500,(timeout||1500));
36 38 tdiv.fadeIn(100);
37 39
38 40 setTimeout(function () {
39 41 tdiv.fadeOut(100, function () {tdiv.remove();});
40 42 }, tmout)
41 43 };
42 44
43 45 IPython.NotificationArea = NotificationArea;
44 46
45 47 return IPython;
46 48
47 49 }(IPython));
48 50
General Comments 0
You need to be logged in to leave comments. Login now