-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from pyscript/pe-linked-files
Show the code for examples
- Loading branch information
Showing
13 changed files
with
301 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: xkcd Antigravity | ||
subtitle: We can fly! | ||
linked_files: | ||
- antigravity.py | ||
--- | ||
Based on the [xkcd antigravity](https://xkcd.com/353/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
h1 { | ||
font-weight: normal; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
--- | ||
title: Hello World | ||
subtitle: The classic hello world, but in Python -- in a browser! | ||
linked_files: | ||
- hello_world.css | ||
- hello_world.js | ||
--- | ||
The *body* description. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
--- | ||
title: Hello World Python | ||
subtitle: The hello world example, but in a .py file. | ||
linked_files: | ||
- hello_world.py | ||
- hello_world.css | ||
- hello_world.js | ||
--- | ||
The *body* description. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,160 @@ | ||
/* PrismJS 1.29.0 | ||
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+python&plugins=custom-class+toolbar+copy-to-clipboard+download-button */ | ||
code[class*=language-], pre[class*=language-] { | ||
color: #000; | ||
background: 0 0; | ||
text-shadow: 0 1px #fff; | ||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; | ||
font-size: 1em; | ||
text-align: left; | ||
white-space: pre; | ||
word-spacing: normal; | ||
word-break: normal; | ||
word-wrap: normal; | ||
line-height: 1.5; | ||
-moz-tab-size: 4; | ||
-o-tab-size: 4; | ||
tab-size: 4; | ||
-webkit-hyphens: none; | ||
-moz-hyphens: none; | ||
-ms-hyphens: none; | ||
hyphens: none | ||
} | ||
|
||
code[class*=language-] ::-moz-selection, code[class*=language-]::-moz-selection, pre[class*=language-] ::-moz-selection, pre[class*=language-]::-moz-selection { | ||
text-shadow: none; | ||
background: #b3d4fc | ||
} | ||
|
||
code[class*=language-] ::selection, code[class*=language-]::selection, pre[class*=language-] ::selection, pre[class*=language-]::selection { | ||
text-shadow: none; | ||
background: #b3d4fc | ||
} | ||
|
||
@media print { | ||
code[class*=language-], pre[class*=language-] { | ||
text-shadow: none | ||
} | ||
} | ||
|
||
pre[class*=language-] { | ||
padding: 1em; | ||
margin: .5em 0; | ||
overflow: auto | ||
} | ||
|
||
:not(pre) > code[class*=language-], pre[class*=language-] { | ||
background: #f5f2f0 | ||
} | ||
|
||
:not(pre) > code[class*=language-] { | ||
padding: .1em; | ||
border-radius: .3em; | ||
white-space: normal | ||
} | ||
|
||
.prism--token.prism--cdata, .prism--token.prism--comment, .prism--token.prism--doctype, .prism--token.prism--prolog { | ||
color: #708090 | ||
} | ||
|
||
.prism--token.prism--punctuation { | ||
color: #999 | ||
} | ||
|
||
.prism--token.prism--namespace { | ||
opacity: .7 | ||
} | ||
|
||
.prism--token.prism--boolean, .prism--token.prism--constant, .prism--token.prism--deleted, .prism--token.prism--number, .prism--token.prism--property, .prism--token.prism--symbol, .prism--token.prism--tag { | ||
color: #905 | ||
} | ||
|
||
.prism--token.prism--attr-name, .prism--token.prism--builtin, .prism--token.prism--char, .prism--token.prism--inserted, .prism--token.prism--selector, .prism--token.prism--string { | ||
color: #690 | ||
} | ||
|
||
.language-css .prism--token.prism--string, .style .prism--token.prism--string, .prism--token.prism--entity, .prism--token.prism--operator, .prism--token.prism--url { | ||
color: #9a6e3a; | ||
background: hsla(0, 0%, 100%, .5) | ||
} | ||
|
||
.prism--token.prism--atrule, .prism--token.prism--attr-value, .prism--token.prism--keyword { | ||
color: #07a | ||
} | ||
|
||
.prism--token.prism--class-name, .prism--token.prism--function { | ||
color: #dd4a68 | ||
} | ||
|
||
.prism--token.prism--important, .prism--token.prism--regex, .prism--token.prism--variable { | ||
color: #e90 | ||
} | ||
|
||
.prism--token.prism--bold, .prism--token.prism--important { | ||
font-weight: 700 | ||
} | ||
|
||
.prism--token.prism--italic { | ||
font-style: italic | ||
} | ||
|
||
.prism--token.prism--entity { | ||
cursor: help | ||
} | ||
|
||
div.code-toolbar { | ||
position: relative | ||
} | ||
|
||
div.code-toolbar > .toolbar { | ||
position: absolute; | ||
z-index: 10; | ||
top: .3em; | ||
right: .2em; | ||
transition: opacity .3s ease-in-out; | ||
opacity: 0 | ||
} | ||
|
||
div.code-toolbar:hover > .toolbar { | ||
opacity: 1 | ||
} | ||
|
||
div.code-toolbar:focus-within > .toolbar { | ||
opacity: 1 | ||
} | ||
|
||
div.code-toolbar > .toolbar > .toolbar-item { | ||
display: inline-block | ||
} | ||
|
||
div.code-toolbar > .toolbar > .toolbar-item > a { | ||
cursor: pointer | ||
} | ||
|
||
div.code-toolbar > .toolbar > .toolbar-item > button { | ||
background: 0 0; | ||
border: 0; | ||
color: inherit; | ||
font: inherit; | ||
line-height: normal; | ||
overflow: visible; | ||
padding: 0; | ||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none | ||
} | ||
|
||
div.code-toolbar > .toolbar > .toolbar-item > a, div.code-toolbar > .toolbar > .toolbar-item > button, div.code-toolbar > .toolbar > .toolbar-item > span { | ||
color: #bbb; | ||
font-size: .8em; | ||
padding: 0 .5em; | ||
background: #f5f2f0; | ||
background: rgba(224, 224, 224, .2); | ||
box-shadow: 0 2px 0 0 rgba(0, 0, 0, .2); | ||
border-radius: .5em | ||
} | ||
|
||
div.code-toolbar > .toolbar > .toolbar-item > a:focus, div.code-toolbar > .toolbar > .toolbar-item > a:hover, div.code-toolbar > .toolbar > .toolbar-item > button:focus, div.code-toolbar > .toolbar > .toolbar-item > button:hover, div.code-toolbar > .toolbar > .toolbar-item > span:focus, div.code-toolbar > .toolbar > .toolbar-item > span:hover { | ||
color: inherit; | ||
text-decoration: none | ||
} |
Oops, something went wrong.