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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/webtry/templates/template.cpp ('k') | experimental/webtry/webtry.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/webtry/templates/workspace.html
diff --git a/experimental/webtry/templates/workspace.html b/experimental/webtry/templates/workspace.html
index a802ea719ebb79e05f4bc94e226cc6db7e8713d0..18b858f7e859b46eb6acce8aec5fc5aec057f4af 100644
--- a/experimental/webtry/templates/workspace.html
+++ b/experimental/webtry/templates/workspace.html
@@ -12,41 +12,28 @@
</div>
</template>
{{template "titlebar.html"}}
- <section id=content>
{{if .Name}}
- <pre><code>#include "SkCanvas.h"
-
-void draw(SkCanvas* canvas) {
- <textarea spellcheck=false name='code' id='code' rows='15' cols='80'>{{.Code}}</textarea>
-}
-</code></pre>
-
- <input type='button' value='Run' id='run'>
- <a href='{{if .Hash}}/c/{{.Hash}}{{end}}' target=_blank id=permalink>Share</a>
+ {{template "content.html" .}}
- <p>Image appears here:</p>
- <img id='img' src='{{if .Hash}}/i/{{.Hash}}.png{{end}}'/>
-
- <pre><code id='output'></code></pre>
+ <section id=tryHistory>
</section>
+
<script type="text/javascript" charset="utf-8">
var history = {{.Tries}};
</script>
- <section id=tryHistory>
- </section>
-
<script type='text/javascript' charset='utf-8'>
// Set the workspace name so run.js also updates the history.
var workspaceName = "{{.Name}}";
</script>
<script src="/js/" type="text/javascript" charset="utf-8"></script>
{{else}}
- <h1>Create</h1>
- Create a new workspace:
- <form action="." method="POST" accept-charset="utf-8">
- <p><input type="submit" value="Create"></p>
- </form>
-{{end}}
+ <section id=content>
+ <h1>Create</h1>
+ Create a new workspace:
+ <form action="." method="POST" accept-charset="utf-8">
+ <p><input type="submit" value="Create"></p>
+ </form>
</section>
+{{end}}
</body>
</html>
« 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