├── LICENSE.md
├── README.md
└── src
├── README.md
├── index.php
├── node
├── index.html
└── index.js
├── projects
├── console
│ ├── README.md
│ ├── app.js
│ ├── console.js
│ ├── index.html
│ └── style.css
├── inputs
│ ├── README.md
│ ├── index.html
│ ├── style.css
│ └── tag.html
├── multi
│ ├── README.md
│ ├── index.html
│ ├── script.js
│ ├── style.css
│ └── tag.js
├── paginator
│ ├── README.md
│ ├── index.html
│ ├── paginator.js
│ ├── paginator.tag
│ └── style.css
├── theme
│ ├── README.md
│ ├── index.html
│ ├── style.css
│ ├── style2.css
│ └── theme.js
└── todos
│ ├── README.md
│ ├── index.html
│ ├── script.js
│ ├── style.css
│ └── todos.html
├── style.css
└── tag.html
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Richard Bondi
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 all
13 | 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 THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Examples
2 | ========
3 |
4 | This is a project to display live online demos with source code, similar to embedding a fiddle but self hosted.
5 | See in action [here](http://richardbondi.net/riot/)
6 |
7 | Features
8 | --------
9 |
10 | * Display a live demo and view all the source files
11 | * Syntax highlighted source view
12 | * Examples can include multiple files, not limited to one of each type of file. You can have for example multiple css or js files
13 |
14 | Requirement
15 | ----------
16 |
17 | * PHP server or node
18 | * Examples that you wish to show off
19 |
20 | Usage
21 | -----
22 |
23 | Replace the files in the `projects` directory with your own set of examples, The root level README.md will be the page
24 | heading. README.md files in the project directories will be the heading for each example
25 |
26 | This project was inspired by [riot.js](https://github.com/muut/riotjs) which is an great minimal library for binding dom
27 | to data. Riot examples included.
28 |
29 |
--------------------------------------------------------------------------------
/src/README.md:
--------------------------------------------------------------------------------
1 | Riot Examples
2 | =============
3 |
4 | View code by selecting file in left column. Live demo in right column. Follow edit link to experiment in plunker
5 |
6 | This demo page was also created with riot, visit demo project [here.](https://github.com/rsbondi/examples)
7 |
--------------------------------------------------------------------------------
/src/index.php:
--------------------------------------------------------------------------------
1 | "README.md", "contents"=>file_get_contents("./README.md")));
5 |
6 | $json = array();
7 | foreach($dirs as $dir) {
8 | if(is_dir($dir)) continue;
9 | $json["projects/$dir"] = array();
10 | $files = scandir("projects/$dir");
11 | foreach($files as $f) {
12 | if(is_dir("projects/$dir/$f")) continue;
13 | $json["projects/$dir"][] = array("name"=>$f, "contents"=>file_get_contents("projects/$dir/$f"));
14 | }
15 | }
16 | ?>
17 |
18 |
19 |
8 |
9 |
57 |
58 |
--------------------------------------------------------------------------------
/src/projects/paginator/style.css:
--------------------------------------------------------------------------------
1 | /* Styles go here */
2 | paginator ul {
3 | list-style: none;
4 | }
5 |
6 | paginator ul li {
7 | display: inline-block;
8 | border: 1px solid grey;
9 | margin: 0 1px;
10 | height: 26px;
11 | width: 36px;
12 | text-align: center;
13 | padding-top: 8px;
14 | cursor: pointer;
15 | -webkit-touch-callout: none;
16 | -webkit-user-select: none;
17 | -khtml-user-select: none;
18 | -moz-user-select: none;
19 | -ms-user-select: none;
20 | user-select: none;
21 |
22 | }
23 |
24 | .active {
25 | background: #eeeeff;
26 | border: 2px solid darkblue;
27 |
28 | }
29 |
30 | .disabled {
31 | background: eeeeee;
32 | color: lightgrey;
33 | border-color: lightgrey;
34 | }
35 |
36 | .group {
37 | margin-left: 40px;
38 | height: 100px;
39 | border: 1px solid lightgrey;
40 | width: 368px;
41 | padding-top: 10px;
42 | text-align: center;
43 | }
44 |
45 | #filter {
46 | margin-left: 40px;
47 | padding: 0.6em 1.3em;
48 | cursor: pointer;
49 | }
50 |
51 | h3 {
52 | background: #f8f8ff;
53 | color: darkblue;
54 | padding: 0.3em;
55 | border: 1px solid darkblue;
56 | }
--------------------------------------------------------------------------------
/src/projects/theme/README.md:
--------------------------------------------------------------------------------
1 | Riot Theme Switcher
2 | ===================
3 |
4 | Observations
5 |
6 | * Plunker is very slow on the updates, runs fine in the real world
7 | * Riot does not play well with <head>
8 | * The official spec says can only go in the head, but it seems to work in body
9 | * Maybe to be legit, the themes could go in the tag and use if or show to expose
10 | * The default also needs to be hard coded in the head to work with ie on initial load
11 |
--------------------------------------------------------------------------------
/src/projects/theme/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Hello Riot!
12 |
13 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Confecta res esset.At enim hic etiam dolore. Magna laus. At modo dixeras nihil in istis rebus esse, quod interesset.
14 |
15 |
16 | Nos beatam vitam non depulsione mali, sed adeptione boni
17 | iudicemus, nec eam cessando, sive gaudentem, ut Aristippus,
18 | sive non dolentem, ut hic, sed agendo aliquid considerandove
19 | quaeramus.
20 |
21 | Et hi quidem ita non sola virtute finem bonorum contineri
22 | putant, ut rebus tamen omnibus virtutem anteponant;
23 |
24 |
25 |
26 |
Quid Zeno? Sapientem locupletat ipsa natura, cuius divitias Epicurus parabiles esse docuit.
27 |
28 |
29 |
Quod si ita se habeat, non possit beatam praestare vitam sapientia.
30 |
Atqui pugnantibus et contrariis studiis consiliisque semper utens nihil quieti videre, nihil tranquilli potest.
31 |
Ergo in gubernando nihil, in officio plurimum interest, quo in genere peccetur.
32 |
Nam et complectitur verbis, quod vult, et dicit plane, quod intellegam;
33 |
Cetera illa adhibebat, quibus demptis negat se Epicurus intellegere quid sit bonum.
34 |
Estne, quaeso, inquam, sitienti in bibendo voluptas?
35 |
36 |
37 |
38 |
Aperiendum est igitur, quid sit voluptas; Nonne videmus quanta perturbatio rerum omnium consequatur, quanta confusio? De vacuitate doloris eadem sententia erit. In his igitur partibus duabus nihil erat, quod Zeno commutare gestiret. Idemque diviserunt naturam hominis in animum et corpus. Pugnant Stoici cum Peripateticis. Varietates autem iniurasque fortunae facile veteres philosophorum praeceptis instituta vita superabat. Si longus, levis dictata sunt. Sed ille, ut dixi, vitiose. Summus dolor plures dies manere non potest?
39 |
40 |
Hanc ergo intuens debet institutum illud quasi signum absolvere. Quantum Aristoxeni ingenium consumptum videmus in musicis? Atque haec ita iustitiae propria sunt, ut sint virtutum reliquarum communia. Morbo gravissimo affectus, exul, orbus, egens, torqueatur eculeo: quem hunc appellas, Zeno? Nec tamen ullo modo summum pecudis bonum et hominis idem mihi videri potest. Rationis enim perfectio est virtus;
41 |
42 |
Ex ea difficultate illae fallaciloquae, ut ait Accius, malitiae natae sunt. Duo Reges: constructio interrete. Itaque hic ipse iam pridem est reiectus; Mene ergo et Triarium dignos existimas, apud quos turpiter loquare? Quod non faceret, si in voluptate summum bonum poneret. Cur tantas regiones barbarorum pedibus obiit, tot maria transmisit?