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