Permalink
Browse files

Syncing up the latest template changes.

  • Loading branch information...
jeresig committed Mar 23, 2012
1 parent 3bfa149 commit c93c2406ec6b0cf1c54ba75d677a33b6bbc34f77
Showing with 76 additions and 396 deletions.
  1. +0 −91 exercise.html
  2. +0 −123 play.html
  3. +0 −61 record.html
  4. +7 −5 templates/cs.html
  5. +5 −13 templates/editor.html
  6. +64 −103 templates/exercise.html
View
@@ -1,91 +0,0 @@
-<!DOCTYPE html>
-<html id="exercise-page">
-<head>
- <title>Exercise Editor</title>
- <link rel="stylesheet" href="css/style.css" />
- <link rel="stylesheet" href="css/jquery-ui.css" />
- <script src="js/jquery.js"></script>
- <script src="js/jquery-ui.js"></script>
- <script src="js/require.js"></script>
- <script src="js/editor.js"></script>
- <script src="js/utils.js"></script>
- <script src="js/exercise-ui.js"></script>
-</head>
-<body>
- <div class="toolbar ui-widget-header ui-corner-all">
- <a href="" id="new" class="ui-button">
- <span class="ui-icon-document"></span>
- <span class="ui-button-text">New</span>
- </a>
- <a href="" id="open" class="ui-button">
- <span class="ui-icon-folder-open"></span>
- <span class="ui-button-text">Open</span>
- </a>
- <a href="" id="save" class="ui-button ui-state-disabled">
- <span class="ui-icon-disk"></span>
- <span class="ui-button-text">Save</span>
- </a>
- <a href="" id="add-problem" class="ui-button ui-state-disabled">
- <span class="ui-icon-plusthick"></span>
- <span class="ui-button-text">Add Problem</span>
- </a>
- <a href="" id="reorder-problems" class="ui-button ui-state-disabled">
- <span class="ui-icon-shuffle"></span>
- <span class="ui-button-text">Re-order Problems</span>
- </a>
- </div>
- <div id="exercise-editor">
- <form action="" method="POST" class="editor-form">
- <div id="code-tabs">
- <ul>
- <li><a href="#start-code-tab">Starting Code</a></li>
- <li><a href="#finish-code-tab">Solution</a></li>
- <li><a href="#validate-code-tab">Validation</a></li>
- <li><a href="#hints-tab">Hints</a></li>
- <!--<li><a href="#options-tab">Options</a></li>-->
- </ul>
- <div id="start-code-tab" class="ui-tabs-hide"><div id="start-code" class="editor"></div></div>
- <div id="finish-code-tab" class="ui-tabs-hide"><div id="finish-code" class="editor"></div></div>
- <div id="validate-code-tab" class="ui-tabs-hide"><div id="validate-code" class="editor"></div></div>
- <div id="hints-tab" class="ui-tabs-hide">
- <a href="" class="add-hint ui-button">
- <span class="ui-icon-plusthick"></span>
- <span class="ui-button-text">Add Hint</span>
- </a>
- <div id="hints"></div>
- </div>
- <!--<div id="options-tab">
- <p>Module: <input type="text" id="module" placeholder="Module Name" /></p>
- </div>-->
- <div id="overlay"></div>
- </div>
- </form>
- <div id="tests"></div>
- </div>
- <script type="text/html" id="form-tmpl">
- <h3><a href='#' class='name'>Exercise</a></h3>
- <div>
- <form action="" method="POST">
- <input type="text" placeholder="Title" name="title" /><br/>
- <textarea name="desc" placeholder="Description"></textarea>
- <a href="" class="ui-button delete-problem">
- <span class="ui-icon-closethick"></span>
- <span class="ui-button-text">Remove</span>
- </a>
- <a href="" class="ui-button set-cursor">
- <span class="ui-icon-arrowthick-1-nw"></span>
- <span class="ui-button-text">Set Cursor</span>
- </a>
- </form>
- </div>
- </script>
- <script type="text/html" id="hint-tmpl">
- <div class="hint ui-state-default">
- <span class="ui-icon ui-icon-grip-dotted-horizontal grip"></span>
- <input type="text" class="hint-text" />
- <a href="" class="remove-hint ui-button">
- <span class="ui-icon-closethick"></span>
- </a></li>
- </script>
-</body>
-</html>
View
123 play.html
@@ -1,123 +0,0 @@
-<!DOCTYPE html>
-<html id="play-page">
-<head>
- <title>Exercise Viewer</title>
- <link rel="stylesheet" href="css/style.css" />
- <link rel="stylesheet" href="css/jquery-ui.css" />
- <script src="js/jquery.js"></script>
- <script src="js/jquery-ui.js"></script>
- <script src="js/jquery.simulate.js"></script>
- <script src="js/require.js"></script>
- <script src="js/record.js"></script>
- <script src="js/editor.js"></script>
- <script src="js/canvas.js"></script>
- <script src="js/utils.js"></script>
- <script src="js/play-ui.js"></script>
-</head>
-<body>
- <h1></h1>
- <div id="exercise-tabs">
- <ul class="ui-tabs-nav"></ul>
- <div id="code">
- <div class="top-toolbar toolbar ui-widget-header ui-corner-bottom">
- <div id="playbar">
- <a href="" id="play" class="ui-button">
- <span class="ui-icon-play"></span>
- </a>
- <div id="progress"></div>
- <span id="timeleft"></span>
- </div>
- </div>
- <div id="canvas-editor">
- <div class="editor-box ui-widget-content ui-corner-all">
- <div id="editor"></div>
- <canvas id="canvas" width="640" height="360"></canvas>
- <div id="hint" class="tipbar">
- <a href="" class="close"><span class="ui-icon ui-icon-circle-close"></span></a>
- <div class="nav">
- <a href="" class="prev"><span class="ui-icon ui-icon-circle-triangle-w"></span> Prev</a>
- <a href="" class="next">Next <span class="ui-icon ui-icon-circle-triangle-e"></span></a>
- </div>
- <div class="text-wrap"><strong>Hint:</strong> <span class="text"></span></div>
- </div>
- <div id="error" class="tipbar">
- <a href="" class="close"><span class="ui-icon ui-icon-circle-close"></span></a>
- <div class="nav">
- <a href="" class="prev"><span class="ui-icon ui-icon-circle-triangle-w"></span> Prev</a>
- <a href="" class="next">Next <span class="ui-icon ui-icon-circle-triangle-e"></span></a>
- </div>
- <div class="text-wrap"><strong><span class="ui-icon ui-icon-alert"></span> Error:</strong> <span class="text"></span></div>
- </div>
- <div class="toolbar ui-widget-header ui-corner-bottom">
- <a href="" id="view-tests" class="ui-button ui-state-disabled">
- <span class="ui-icon-circle-check"></span>
- <span class="ui-button-text">Tests</span>
- </a>
-
- <a href="" id="get-hint" class="ui-button ui-state-disabled">
- <span class="ui-icon-info"></span>
- <span class="ui-button-text">Hints</span>
- </a>
-
- <a href="" id="run-code" class="ui-button right">
- <span class="ui-icon-script"></span>
- <span class="ui-button-text">Run Code</span>
- </a>
-
- <a href="" id="show-errors" class="ui-button ui-state-disabled right">
- <span class="ui-icon-alert"></span>
- <span class="ui-button-text">Errors</span>
- </a>
- </div>
- </div>
-
- <div id="tests">
- <div id="problem">
- <h3 class="title ui-helper-reset ui-corner-top"></h3>
- <div class="ui-widget-content ui-corner-bottom">
- <div class="desc">
- <div class="text"></div>
- <div id="next-problem-desc">
- <p><span class="ui-icon ui-icon-circle-check"></span> You've gotten this problem correct!</p>
- <a href="" id="next-problem" class="ui-button">
- <span class="ui-icon-triangle-1-e"></span>
- <span class="ui-button-text">Next Problem</span>
- </a>
- </div>
- </div>
- </div>
- </div>
- <div id="results">
- <h3 class="ui-helper-reset ui-corner-top">Test Results</h3>
- <div class="ui-widget-content ui-corner-bottom">
- <div class="desc">
- <ul></ul>
-
- <a href="" id="view-tests-2" class="ui-button">
- <span class="ui-icon-carat-1-w"></span>
- <span class="ui-button-text">Back to Your Code</span>
- </a>
- </div>
- </div>
- </div>
- </div>
- <div id="player"></div>
- <div id="play-overlay"></div>
- </div>
- </div>
- </div>
- <script type="text/html" id="tab-tmpl">
- <li>
- <a href='#code'><span class='ui-icon-pencil ui-icon'></span></a>
- </li>
- </script>
- <script type="text/html" id="form-tmpl">
- <div>
- <h3 class="title ui-helper-reset ui-corner-top">Exercise</h3>
- <div class="ui-widget-content ui-corner-bottom">
- <p class="desc">Exercise description.</p>
- </div>
- </div>
- </script>
-</body>
-</html>
View
@@ -1,61 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Record Canvas Editor</title>
- <link rel="stylesheet" href="css/style.css" />
- <link rel="stylesheet" href="css/jquery-ui.css" />
-
- <script src="/canvas-editor/js/ace.js"></script>
- <script src="/canvas-editor/js/ace-mode-javascript.js"></script>
- <script src="/canvas-editor/js/ace-theme-textmate.js"></script>
-
- <script src="js/jquery.js"></script>
- <script src="js/jquery-ui.js"></script>
- <script src="js/jquery.simulate.js"></script>
- <script src="js/require.js"></script>
- <script src="js/record.js"></script>
- <script src="js/editor.js"></script>
- <script src="js/canvas.js"></script>
- <script src="js/utils.js"></script>
- <script src="js/record-ui.js"></script>
-</head>
-<body>
- <div class="toolbar ui-widget-header ui-corner-all">
- <a href="" id="record" class="ui-button">
- <span class="ui-icon-video"></span>
- <span class="ui-button-text">Record</span>
- </a>
- <a href="" id="save" class="ui-button ui-state-disabled">
- <span class="ui-icon-disk"></span>
- <span class="ui-button-text">Save</span>
- </a>
- </div>
- <div class="toolbar ui-widget-header ui-corner-all">
- <a href="" id="draw" class="ui-button">
- <span class="ui-icon-pencil"></span>
- </a>
- <a href="" id="clear" class="ui-button">
- <span class="ui-icon-cancel"></span>
- </a>
- <div class="space"></div>
- <a href="" class="ui-button color" id="black"><span></span></a>
- <a href="" class="ui-button color" id="red"><span></span></a>
- <a href="" class="ui-button color" id="orange"><span></span></a>
- <a href="" class="ui-button color" id="green"><span></span></a>
- <a href="" class="ui-button color" id="blue"><span></span></a>
- <a href="" class="ui-button color" id="lightblue"><span></span></a>
- <a href="" class="ui-button color" id="violet"><span></span></a>
- </div>
- <div id="canvas-editor">
- <div id="editor"></div>
- <canvas id="canvas" width="640" height="360"></canvas>
- <div id="tests"></div>
- </div>
- <script type="text/html" id="form-tmpl">
- <h3><a href='#' class='title'>Exercise</a></h3>
- <div>
- <p class="desc">Exercise description.</p>
- </div>
- </script>
-</body>
-</html>
View
@@ -1,10 +1,12 @@
{% extends "labs/template.html" %}
-{% block pagescript %}
-<link rel="stylesheet" href="/canvas-editor/css/style.css" />
-<script src="/canvas-editor/js/utils.js"></script>
-<script src="/canvas-editor/js/main-ui.js"></script>
-{% endblock pagescript %}
+{% block pagecss %}
+ {{ js_css_packages.css_package("canvas-editor") }}
+{% endblock pagecss %}
+
+{% block bottompagescript %}
+ {{ js_css_packages.js_package("canvas-editor-cs") }}
+{% endblock bottompagescript %}
{% block pagecontent %}
<h1>Computer Science Exercises</h1>
View
@@ -1,19 +1,11 @@
{% extends "labs/template.html" %}
-{% block pagescript %}
-
-<link rel="stylesheet" href="/canvas-editor/css/style.css" />
-<link rel="stylesheet" href="/canvas-editor/css/jquery-ui.css" />
-
-<script src="/canvas-editor/js/ace.js"></script>
-<script src="/canvas-editor/js/ace-mode-javascript.js"></script>
-<script src="/canvas-editor/js/ace-theme-textmate.js"></script>
-
-<script src="/canvas-editor/js/jquery-ui.js"></script>
-<script src="/canvas-editor/js/editor.js"></script>
-<script src="/canvas-editor/js/utils.js"></script>
-<script src="/canvas-editor/js/exercise-ui.js"></script>
+{% block pagecss %}
+ {{ js_css_packages.css_package("canvas-editor") }}
+{% endblock pagecss %}
+{% block pagescript %}
+{{ js_css_packages.js_package("canvas-editor") }}
{% endblock pagescript %}
{% block pagecontent %}
Oops, something went wrong.

0 comments on commit c93c240

Please sign in to comment.