Skip to content

Commit 9094c3f

Browse files
committed
first commit
0 parents  commit 9094c3f

9 files changed

+1303
-0
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT LICENSE
2+
3+
Copyright (c) 2016 JEZ DEAN
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
13+
all 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
21+
THE SOFTWARE.

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Code Highlighter for Microbit Python
2+
![Minion](http://octodex.github.com/images/minion.png)
3+
![Minion](http://octodex.github.com/images/minion.png)
4+
![Minion](http://octodex.github.com/images/minion.png)
5+
![Minion](http://octodex.github.com/images/minion.png)
6+
7+
### Examples
8+
9+
Is in use at [microbit playground](https://microbit-playground.co.uk).

prism-atom-dark.css

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/**
2+
* atom-dark theme for `prism.js`
3+
* Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax
4+
* @author Joe Gibson (@gibsjose)
5+
* @jezdean for the microbit version
6+
*/
7+
8+
code[class*="language-"], pre[class*="language-"] {
9+
color: #c5c8c6;
10+
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
11+
font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
12+
direction: ltr;
13+
text-align: left;
14+
white-space: pre;
15+
word-spacing: normal;
16+
word-break: normal;
17+
line-height: 1.5;
18+
-moz-tab-size: 4;
19+
-o-tab-size: 4;
20+
tab-size: 4;
21+
-webkit-hyphens: none;
22+
-moz-hyphens: none;
23+
-ms-hyphens: none;
24+
hyphens: none;
25+
}
26+
27+
/* Code blocks */
28+
29+
pre[class*="language-"] {
30+
padding: 1em;
31+
margin: .5em 0;
32+
overflow: auto;
33+
border-radius: 0.3em;
34+
}
35+
:not(pre) > code[class*="language-"], pre[class*="language-"] {
36+
background: #1d1f21;
37+
}
38+
39+
/* Inline code */
40+
41+
:not(pre) > code[class*="language-"] {
42+
padding: .1em;
43+
border-radius: .3em;
44+
}
45+
.token.comment, .token.prolog, .token.doctype, .token.cdata {
46+
color: #7C7C7C;
47+
}
48+
.token.punctuation {
49+
color: #c5c8c6;
50+
}
51+
.namespace {
52+
opacity: .7;
53+
}
54+
.token.property, .token.keyword, .token.tag {
55+
color: #96CBFE;
56+
}
57+
.token.class-name {
58+
color: #FFFFB6;
59+
text-decoration: underline;
60+
}
61+
.token.boolean, .token.constant {
62+
color: #99CC99;
63+
}
64+
.token.symbol, .token.deleted {
65+
color: #f92672;
66+
}
67+
.token.number {
68+
color: #FF73FD;
69+
}
70+
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted {
71+
color: #A8FF60;
72+
}
73+
.token.variable {
74+
color: #C6C5FE;
75+
}
76+
.token.operator {
77+
color: #EDEDED;
78+
}
79+
.token.entity {
80+
color: #FFFFB6;
81+
/* text-decoration: underline; */
82+
}
83+
.token.url {
84+
color: #96CBFE;
85+
}
86+
.language-css .token.string, .style .token.string {
87+
color: #87C38A;
88+
}
89+
.token.atrule, .token.attr-value {
90+
color: #F9EE98;
91+
}
92+
.token.function {
93+
color: #DAD085;
94+
}
95+
.token.regex {
96+
color: #E9C062;
97+
}
98+
.token.important {
99+
color: #fd971f;
100+
}
101+
.token.important, .token.bold {
102+
font-weight: bold;
103+
}
104+
.token.italic {
105+
font-style: italic;
106+
}
107+
.token.entity {
108+
cursor: help;
109+
}

prism-coy.css

+192
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
/**
2+
* Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics);
3+
* @author Tim Shedor
4+
* @jezdean for the microbit version
5+
*/
6+
7+
code[class*="language-"], pre[class*="language-"] {
8+
color: black;
9+
background: none;
10+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
11+
text-align: left;
12+
white-space: pre;
13+
word-spacing: normal;
14+
word-break: normal;
15+
word-wrap: normal;
16+
line-height: 1.5;
17+
-moz-tab-size: 4;
18+
-o-tab-size: 4;
19+
tab-size: 4;
20+
-webkit-hyphens: none;
21+
-moz-hyphens: none;
22+
-ms-hyphens: none;
23+
hyphens: none;
24+
}
25+
26+
/* Code blocks */
27+
28+
pre[class*="language-"] {
29+
position: relative;
30+
margin: .5em 0;
31+
-webkit-box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
32+
-moz-box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
33+
box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
34+
border-left: 10px solid #358ccb;
35+
background-color: #fdfdfd;
36+
background-image: -webkit-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
37+
background-image: -moz-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
38+
background-image: -ms-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
39+
background-image: -o-linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
40+
background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
41+
background-size: 3em 3em;
42+
background-origin: content-box;
43+
overflow: visible;
44+
padding: 0;
45+
}
46+
code[class*="language"] {
47+
max-height: inherit;
48+
height: 100%;
49+
padding: 0 1em;
50+
display: block;
51+
overflow: auto;
52+
}
53+
54+
/* Margin bottom to accomodate shadow */
55+
56+
:not(pre) > code[class*="language-"], pre[class*="language-"] {
57+
background-color: #fdfdfd;
58+
-webkit-box-sizing: border-box;
59+
-moz-box-sizing: border-box;
60+
box-sizing: border-box;
61+
margin-bottom: 1em;
62+
}
63+
64+
/* Inline code */
65+
66+
:not(pre) > code[class*="language-"] {
67+
position: relative;
68+
padding: .2em;
69+
-webkit-border-radius: 0.3em;
70+
-moz-border-radius: 0.3em;
71+
-ms-border-radius: 0.3em;
72+
-o-border-radius: 0.3em;
73+
border-radius: 0.3em;
74+
color: #c92c2c;
75+
border: 1px solid rgba(0, 0, 0, 0.1);
76+
display: inline;
77+
white-space: normal;
78+
}
79+
pre[class*="language-"]:before, pre[class*="language-"]:after {
80+
content: '';
81+
z-index: -2;
82+
display: block;
83+
position: absolute;
84+
bottom: 0.75em;
85+
left: 0.18em;
86+
width: 40%;
87+
height: 20%;
88+
max-height: 13em;
89+
-webkit-box-shadow: 0px 13px 8px #979797;
90+
-moz-box-shadow: 0px 13px 8px #979797;
91+
box-shadow: 0px 13px 8px #979797;
92+
-webkit-transform: rotate(-2deg);
93+
-moz-transform: rotate(-2deg);
94+
-ms-transform: rotate(-2deg);
95+
-o-transform: rotate(-2deg);
96+
transform: rotate(-2deg);
97+
}
98+
:not(pre) > code[class*="language-"]:after, pre[class*="language-"]:after {
99+
right: 0.75em;
100+
left: auto;
101+
-webkit-transform: rotate(2deg);
102+
-moz-transform: rotate(2deg);
103+
-ms-transform: rotate(2deg);
104+
-o-transform: rotate(2deg);
105+
transform: rotate(2deg);
106+
}
107+
.token.comment, .token.block-comment, .token.prolog, .token.doctype, .token.cdata {
108+
color: #7D8B99;
109+
s
110+
}
111+
.token.punctuation {
112+
color: #5F6364;
113+
}
114+
.token.number {
115+
color: slateblue;
116+
}
117+
.token.property, .token.tag, .token.boolean, .token.function-name, .token.constant, .token.symbol, .token.deleted {
118+
color: #c92c2c;
119+
}
120+
.token.selector, .token.attr-name, .token.string, .token.char, .token.function, .token.builtin, .token.inserted {
121+
color: #2f9c0a;
122+
}
123+
.token.operator, .token.entity, .token.url, .token.variable {
124+
color: darkcyan;
125+
}
126+
.token.atrule, .token.attr-value, .token.keyword, .token.class-name {
127+
color: deeppink;
128+
font-weight: bold;
129+
}
130+
.token.regex, .token.important {
131+
color: #e90;
132+
}
133+
.language-css .token.string, .style .token.string {
134+
color: #a67f59;
135+
background: rgba(255, 255, 255, 0.5);
136+
}
137+
.token.important {
138+
font-weight: normal;
139+
}
140+
.token.bold {
141+
font-weight: bold;
142+
}
143+
.token.italic {
144+
font-style: italic;
145+
}
146+
.token.entity {
147+
cursor: help;
148+
}
149+
.namespace {
150+
opacity: .7;
151+
}
152+
@media screen and (max-width: 767px) {
153+
pre[class*="language-"]:before, pre[class*="language-"]:after {
154+
bottom: 14px;
155+
-webkit-box-shadow: none;
156+
-moz-box-shadow: none;
157+
box-shadow: none;
158+
}
159+
}
160+
161+
/* Plugin styles */
162+
163+
.token.tab:not(:empty):before, .token.cr:before, .token.lf:before {
164+
color: #e0d7d1;
165+
}
166+
167+
/* Plugin styles: Line Numbers */
168+
169+
pre[class*="language-"].line-numbers {
170+
padding-left: 0;
171+
}
172+
pre[class*="language-"].line-numbers code {
173+
padding-left: 3.8em;
174+
}
175+
pre[class*="language-"].line-numbers .line-numbers-rows {
176+
left: 0;
177+
}
178+
179+
/* Plugin styles: Line Highlight */
180+
181+
pre[class*="language-"][data-line] {
182+
padding-top: 0;
183+
padding-bottom: 0;
184+
padding-left: 0;
185+
}
186+
pre[data-line] code {
187+
position: relative;
188+
padding-left: 4em;
189+
}
190+
pre .line-highlight {
191+
margin-top: 0;
192+
}

0 commit comments

Comments
 (0)