OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Workspace</title> |
| 5 <meta charset='utf-8' /> |
| 6 <link rel="stylesheet" href="/css/" type="text/css" media="screen"> |
| 7 </head> |
| 8 <body> |
| 9 {{template "titlebar.html"}} |
| 10 <section id=content> |
| 11 <h1>Create</h1> |
| 12 {{if .Name}} |
| 13 <pre><code>#include "SkCanvas.h" |
| 14 |
| 15 void draw(SkCanvas* canvas) { |
| 16 <textarea name='code' id='code' rows='15' cols='80'>{{.Code}}</textarea> |
| 17 } |
| 18 </code></pre> |
| 19 |
| 20 <input type='button' value='Run' id='run'> |
| 21 |
| 22 <p>Image appears here:</p> |
| 23 <img id='img' src=''/> |
| 24 |
| 25 <pre><code id='output'></code></pre> |
| 26 </section> |
| 27 <section id=tryHistory> |
| 28 {{range .Tries}} |
| 29 <div class=tries> |
| 30 <a href="/c/{{.Hash}}"> |
| 31 <img width=64 height=64 src="/i/{{.Hash}}.png"> |
| 32 </a> |
| 33 </div> |
| 34 {{end}} |
| 35 </section> |
| 36 |
| 37 <script type='text/javascript' charset='utf-8'> |
| 38 // Set the workspace name so run.js also updates the history. |
| 39 var workspaceName = "{{.Name}}"; |
| 40 </script> |
| 41 <script src="/js/run.js" type="text/javascript" charset="utf-8"></script> |
| 42 {{else}} |
| 43 Create a new workspace: |
| 44 <form action="." method="POST" accept-charset="utf-8"> |
| 45 <p><input type="submit" value="Create"></p> |
| 46 </form> |
| 47 {{end}} |
| 48 </section> |
| 49 </body> |
| 50 </html> |
OLD | NEW |