aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/webtry/templates/workspace.html
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-19 13:55:50 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-19 13:55:50 +0000
commitd04e1dd9e1dbe7e458932a60801fb31a72b49267 (patch)
treef5bc3fdb8fa7ab65081c9884582900f20b28a2dc /experimental/webtry/templates/workspace.html
parent8a777a5e6ad081f54ec169dcf714343c38517161 (diff)
First pass at workspaces.
Ability to create new workspaces. Run tries in a workspace, each try is added to a history of a workspace. BUG=skia: R=mtklein@google.com Author: jcgregorio@google.com Review URL: https://codereview.chromium.org/240773003 git-svn-id: http://skia.googlecode.com/svn/trunk@14265 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/webtry/templates/workspace.html')
-rw-r--r--experimental/webtry/templates/workspace.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/experimental/webtry/templates/workspace.html b/experimental/webtry/templates/workspace.html
new file mode 100644
index 0000000000..3d7003512f
--- /dev/null
+++ b/experimental/webtry/templates/workspace.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Workspace</title>
+ <meta charset='utf-8' />
+ <link rel="stylesheet" href="/css/" type="text/css" media="screen">
+</head>
+<body>
+ {{template "titlebar.html"}}
+ <section id=content>
+ <h1>Create</h1>
+{{if .Name}}
+ <pre><code>#include "SkCanvas.h"
+
+void draw(SkCanvas* canvas) {
+ <textarea name='code' id='code' rows='15' cols='80'>{{.Code}}</textarea>
+}
+</code></pre>
+
+ <input type='button' value='Run' id='run'>
+
+ <p>Image appears here:</p>
+ <img id='img' src=''/>
+
+ <pre><code id='output'></code></pre>
+ </section>
+ <section id=tryHistory>
+ {{range .Tries}}
+ <div class=tries>
+ <a href="/c/{{.Hash}}">
+ <img width=64 height=64 src="/i/{{.Hash}}.png">
+ </a>
+ </div>
+ {{end}}
+ </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/run.js" type="text/javascript" charset="utf-8"></script>
+{{else}}
+ Create a new workspace:
+ <form action="." method="POST" accept-charset="utf-8">
+ <p><input type="submit" value="Create"></p>
+ </form>
+{{end}}
+ </section>
+</body>
+</html>