Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: experimental/webtry/templates/workspace.html

Issue 246823004: Factor out common template code. Send stdout back to web page. (Closed) Base URL: https://skia.googlesource.com/skia.git@clickhistory
Patch Set: rebase Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « experimental/webtry/templates/template.cpp ('k') | experimental/webtry/webtry.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <template id=tryTemplate> 9 <template id=tryTemplate>
10 <div class=tries data-try=""> 10 <div class=tries data-try="">
11 <img width=64 height=64 src=""> 11 <img width=64 height=64 src="">
12 </div> 12 </div>
13 </template> 13 </template>
14 {{template "titlebar.html"}} 14 {{template "titlebar.html"}}
15 <section id=content>
16 {{if .Name}} 15 {{if .Name}}
17 <pre><code>#include "SkCanvas.h" 16 {{template "content.html" .}}
18 17
19 void draw(SkCanvas* canvas) { 18 <section id=tryHistory>
20 <textarea spellcheck=false name='code' id='code' rows='15' cols='80'>{{.Code}} </textarea> 19 </section>
21 }
22 </code></pre>
23 20
24 <input type='button' value='Run' id='run'>
25 <a href='{{if .Hash}}/c/{{.Hash}}{{end}}' target=_blank id=permalink>Share</a>
26
27 <p>Image appears here:</p>
28 <img id='img' src='{{if .Hash}}/i/{{.Hash}}.png{{end}}'/>
29
30 <pre><code id='output'></code></pre>
31 </section>
32 <script type="text/javascript" charset="utf-8"> 21 <script type="text/javascript" charset="utf-8">
33 var history = {{.Tries}}; 22 var history = {{.Tries}};
34 </script> 23 </script>
35 <section id=tryHistory>
36 </section>
37
38 <script type='text/javascript' charset='utf-8'> 24 <script type='text/javascript' charset='utf-8'>
39 // Set the workspace name so run.js also updates the history. 25 // Set the workspace name so run.js also updates the history.
40 var workspaceName = "{{.Name}}"; 26 var workspaceName = "{{.Name}}";
41 </script> 27 </script>
42 <script src="/js/" type="text/javascript" charset="utf-8"></script> 28 <script src="/js/" type="text/javascript" charset="utf-8"></script>
43 {{else}} 29 {{else}}
44 <h1>Create</h1> 30 <section id=content>
45 Create a new workspace: 31 <h1>Create</h1>
46 <form action="." method="POST" accept-charset="utf-8"> 32 Create a new workspace:
47 <p><input type="submit" value="Create"></p> 33 <form action="." method="POST" accept-charset="utf-8">
48 </form> 34 <p><input type="submit" value="Create"></p>
35 </form>
36 </section>
49 {{end}} 37 {{end}}
50 </section>
51 </body> 38 </body>
52 </html> 39 </html>
OLDNEW
« no previous file with comments | « experimental/webtry/templates/template.cpp ('k') | experimental/webtry/webtry.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698