Skip to content

Commit 42abac9

Browse files
committed
search, filter, categorize all examples
1 parent 87e30c6 commit 42abac9

20 files changed

+61383
-20
lines changed

source/_static/css/codemirror.css

Lines changed: 353 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,353 @@
1+
/* BASICS */
2+
3+
.CodeMirror {
4+
/* Set height, width, borders, and global font properties here */
5+
font-family: monospace;
6+
height: 300px;
7+
color: black;
8+
direction: ltr;
9+
flex: 1;
10+
/* background-color: #EFEFEF;
11+
height: 31.25rem;
12+
overflow-y: auto;
13+
min-width: 300px; */
14+
font-size: 0.8rem;
15+
z-index: 0;
16+
}
17+
18+
/* PADDING */
19+
20+
.CodeMirror-lines {
21+
padding: 4px 0; /* Vertical padding around content */
22+
}
23+
.CodeMirror pre {
24+
padding: 0 4px; /* Horizontal padding of content */
25+
}
26+
27+
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
28+
background-color: white; /* The little square between H and V scrollbars */
29+
}
30+
31+
/* GUTTER */
32+
33+
.CodeMirror-gutters {
34+
border-right: 1px solid #ddd;
35+
background-color: #f7f7f7;
36+
white-space: nowrap;
37+
}
38+
.CodeMirror-linenumbers {}
39+
.CodeMirror-linenumber {
40+
padding: 0 3px 0 5px;
41+
min-width: 20px;
42+
text-align: right;
43+
color: #999;
44+
white-space: nowrap;
45+
}
46+
47+
.CodeMirror-guttermarker { color: black; }
48+
.CodeMirror-guttermarker-subtle { color: #999; }
49+
50+
/* CURSOR */
51+
52+
.CodeMirror-cursor {
53+
border-left: 1px solid black;
54+
border-right: none;
55+
width: 0;
56+
}
57+
/* Shown when moving in bi-directional text */
58+
.CodeMirror div.CodeMirror-secondarycursor {
59+
border-left: 1px solid silver;
60+
}
61+
.cm-fat-cursor .CodeMirror-cursor {
62+
width: auto;
63+
border: 0 !important;
64+
background: #7e7;
65+
}
66+
.cm-fat-cursor div.CodeMirror-cursors {
67+
z-index: 1;
68+
}
69+
.cm-fat-cursor-mark {
70+
background-color: rgba(20, 255, 20, 0.5);
71+
-webkit-animation: blink 1.06s steps(1) infinite;
72+
-moz-animation: blink 1.06s steps(1) infinite;
73+
animation: blink 1.06s steps(1) infinite;
74+
}
75+
.cm-animate-fat-cursor {
76+
width: auto;
77+
border: 0;
78+
-webkit-animation: blink 1.06s steps(1) infinite;
79+
-moz-animation: blink 1.06s steps(1) infinite;
80+
animation: blink 1.06s steps(1) infinite;
81+
background-color: #7e7;
82+
}
83+
@-moz-keyframes blink {
84+
0% {}
85+
50% { background-color: transparent; }
86+
100% {}
87+
}
88+
@-webkit-keyframes blink {
89+
0% {}
90+
50% { background-color: transparent; }
91+
100% {}
92+
}
93+
@keyframes blink {
94+
0% {}
95+
50% { background-color: transparent; }
96+
100% {}
97+
}
98+
99+
/* Can style cursor different in overwrite (non-insert) mode */
100+
.CodeMirror-overwrite .CodeMirror-cursor {}
101+
102+
.cm-tab { display: inline-block; text-decoration: inherit; }
103+
104+
.CodeMirror-rulers {
105+
position: absolute;
106+
left: 0; right: 0; top: -50px; bottom: -20px;
107+
overflow: hidden;
108+
}
109+
.CodeMirror-ruler {
110+
border-left: 1px solid #ccc;
111+
top: 0; bottom: 0;
112+
position: absolute;
113+
}
114+
115+
/* DEFAULT THEME */
116+
117+
.cm-s-default .cm-header {color: blue;}
118+
.cm-s-default .cm-quote {color: #090;}
119+
.cm-negative {color: #d44;}
120+
.cm-positive {color: #292;}
121+
.cm-header, .cm-strong {font-weight: bold;}
122+
.cm-em {font-style: italic;}
123+
.cm-link {text-decoration: underline;}
124+
.cm-strikethrough {text-decoration: line-through;}
125+
126+
.cm-s-default .cm-keyword {color: #708;}
127+
.cm-s-default .cm-atom {color: #219;}
128+
.cm-s-default .cm-number {color: #164;}
129+
.cm-s-default .cm-def {color: #00f;}
130+
.cm-s-default .cm-variable,
131+
.cm-s-default .cm-punctuation,
132+
.cm-s-default .cm-property,
133+
.cm-s-default .cm-operator {}
134+
.cm-s-default .cm-variable-2 {color: #05a;}
135+
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
136+
.cm-s-default .cm-comment {color: #a50;}
137+
.cm-s-default .cm-string {color: #a11;}
138+
.cm-s-default .cm-string-2 {color: #f50;}
139+
.cm-s-default .cm-meta {color: #555;}
140+
.cm-s-default .cm-qualifier {color: #555;}
141+
.cm-s-default .cm-builtin {color: #30a;}
142+
.cm-s-default .cm-bracket {color: #997;}
143+
.cm-s-default .cm-tag {color: #170;}
144+
.cm-s-default .cm-attribute {color: #00c;}
145+
.cm-s-default .cm-hr {color: #999;}
146+
.cm-s-default .cm-link {color: #00c;}
147+
148+
.cm-s-default .cm-error {color: #f00;}
149+
.cm-invalidchar {color: #f00;}
150+
151+
.CodeMirror-composing { border-bottom: 2px solid; }
152+
153+
/* Default styles for common addons */
154+
155+
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
156+
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
157+
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
158+
.CodeMirror-activeline-background {background: #e8f2ff;}
159+
160+
/* STOP */
161+
162+
/* The rest of this file contains styles related to the mechanics of
163+
the editor. You probably shouldn't touch them. */
164+
165+
.CodeMirror {
166+
position: relative;
167+
overflow: hidden;
168+
background: white;
169+
}
170+
171+
.CodeMirror-scroll {
172+
overflow: scroll !important; /* Things will break if this is overridden */
173+
/* 30px is the magic margin used to hide the element's real scrollbars */
174+
/* See overflow: hidden in .CodeMirror */
175+
margin-bottom: -30px; margin-right: -30px;
176+
padding-bottom: 30px;
177+
height: 100%;
178+
outline: none; /* Prevent dragging from highlighting the element */
179+
position: relative;
180+
}
181+
.CodeMirror-sizer {
182+
position: relative;
183+
border-right: 30px solid transparent;
184+
}
185+
186+
/* The fake, visible scrollbars. Used to force redraw during scrolling
187+
before actual scrolling happens, thus preventing shaking and
188+
flickering artifacts. */
189+
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
190+
position: absolute;
191+
z-index: 6;
192+
display: none;
193+
}
194+
.CodeMirror-vscrollbar {
195+
right: 0; top: 0;
196+
overflow-x: hidden;
197+
overflow-y: scroll;
198+
}
199+
.CodeMirror-hscrollbar {
200+
bottom: 0; left: 0;
201+
overflow-y: hidden;
202+
overflow-x: scroll;
203+
}
204+
.CodeMirror-scrollbar-filler {
205+
right: 0; bottom: 0;
206+
}
207+
.CodeMirror-gutter-filler {
208+
left: 0; bottom: 0;
209+
}
210+
211+
.CodeMirror-gutters {
212+
position: absolute; left: 0; top: 0;
213+
min-height: 100%;
214+
z-index: 3;
215+
}
216+
.CodeMirror-gutter {
217+
white-space: normal;
218+
height: 100%;
219+
display: inline-block;
220+
vertical-align: top;
221+
margin-bottom: -30px;
222+
}
223+
.CodeMirror-gutter-wrapper {
224+
position: absolute;
225+
z-index: 4;
226+
background: none !important;
227+
border: none !important;
228+
}
229+
.CodeMirror-gutter-background {
230+
position: absolute;
231+
top: 0; bottom: 0;
232+
z-index: 4;
233+
}
234+
.CodeMirror-gutter-elt {
235+
position: absolute;
236+
cursor: default;
237+
z-index: 4;
238+
}
239+
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
240+
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
241+
242+
.CodeMirror-lines {
243+
cursor: text;
244+
min-height: 1px; /* prevents collapsing before first draw */
245+
}
246+
.CodeMirror pre {
247+
/* Reset some styles that the rest of the page might have set */
248+
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
249+
border-width: 0;
250+
background: transparent;
251+
font-family: inherit;
252+
font-size: inherit;
253+
margin: 0;
254+
white-space: pre;
255+
word-wrap: normal;
256+
line-height: inherit;
257+
color: inherit;
258+
z-index: 2;
259+
position: relative;
260+
overflow: visible;
261+
-webkit-tap-highlight-color: transparent;
262+
-webkit-font-variant-ligatures: contextual;
263+
font-variant-ligatures: contextual;
264+
}
265+
.CodeMirror-wrap pre {
266+
word-wrap: break-word;
267+
white-space: pre-wrap;
268+
word-break: normal;
269+
}
270+
271+
.CodeMirror-linebackground {
272+
position: absolute;
273+
left: 0; right: 0; top: 0; bottom: 0;
274+
z-index: 0;
275+
}
276+
277+
.CodeMirror-linewidget {
278+
position: relative;
279+
z-index: 2;
280+
padding: 0.1px; /* Force widget margins to stay inside of the container */
281+
}
282+
283+
.CodeMirror-widget {}
284+
285+
.CodeMirror-rtl pre { direction: rtl; }
286+
287+
.CodeMirror-code {
288+
outline: none;
289+
}
290+
291+
/* Force content-box sizing for the elements where we expect it */
292+
.CodeMirror-scroll,
293+
.CodeMirror-sizer,
294+
.CodeMirror-gutter,
295+
.CodeMirror-gutters,
296+
.CodeMirror-linenumber {
297+
-moz-box-sizing: content-box;
298+
box-sizing: content-box;
299+
}
300+
301+
.CodeMirror-measure {
302+
position: absolute;
303+
width: 100%;
304+
height: 0;
305+
overflow: hidden;
306+
visibility: hidden;
307+
}
308+
309+
.CodeMirror-cursor {
310+
position: absolute;
311+
pointer-events: none;
312+
}
313+
.CodeMirror-measure pre { position: static; }
314+
315+
div.CodeMirror-cursors {
316+
visibility: hidden;
317+
position: relative;
318+
z-index: 3;
319+
}
320+
div.CodeMirror-dragcursors {
321+
visibility: visible;
322+
}
323+
324+
.CodeMirror-focused div.CodeMirror-cursors {
325+
visibility: visible;
326+
}
327+
328+
.CodeMirror-selected { background: #d9d9d9; }
329+
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
330+
.CodeMirror-crosshair { cursor: crosshair; }
331+
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
332+
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
333+
334+
.cm-searching {
335+
background-color: #ffa;
336+
background-color: rgba(255, 255, 0, .4);
337+
}
338+
339+
/* Used to force a border model for a node */
340+
.cm-force-border { padding-right: .1px; }
341+
342+
@media print {
343+
/* Hide the cursor when printing */
344+
.CodeMirror div.CodeMirror-cursors {
345+
visibility: hidden;
346+
}
347+
}
348+
349+
/* See issue #2901 */
350+
.cm-tab-wrap-hack:after { content: ''; }
351+
352+
/* Help users use markselection to safely style text background */
353+
span.CodeMirror-selectedtext { background: none; }

source/_static/css/examples.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.treejs {
2+
margin-left: -20px;
3+
}
4+
5+
#linksContainer > h3 {
6+
margin-top: 1em;
7+
margin-bottom: 0.2em;
8+
}
9+
10+
.highlight-keyword {
11+
background-color: yellow;
12+
}
13+
14+
#exampleCode {
15+
background-color: #efefef;
16+
/* height: 31.25rem; */
17+
overflow-y: auto;
18+
min-width: 350px;
19+
font-size: 0.75rem;
20+
display: flex;
21+
flex-direction: column;
22+
}
23+
24+
#exampleCode h2 {
25+
margin-left: 1rem;
26+
}
27+
28+
#code {
29+
background-color: #efefef;
30+
/* height: 31.25rem; */
31+
overflow-y: auto;
32+
min-width: 350px;
33+
font-size: 0.75rem;
34+
}
35+
36+
#code pre {
37+
margin: 0.625rem;
38+
}

0 commit comments

Comments
 (0)