summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorbnewbold <bnewbold@manus.(none)>2007-07-11 05:35:39 -0400
committerbnewbold <bnewbold@manus.(none)>2007-07-11 05:35:39 -0400
commite152d2f2d1e257b1ec51adb3640e350207fda77d (patch)
tree0d459576de630394d810d10a48c30bebbf0ca336 /templates
downloadequator-e152d2f2d1e257b1ec51adb3640e350207fda77d.tar.gz
equator-e152d2f2d1e257b1ec51adb3640e350207fda77d.zip
skeletal start, basic recovery of lost progress
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html28
-rw-r--r--templates/flatpages/default.html6
-rw-r--r--templates/go.html90
3 files changed, 124 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000..c2e023b
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html><head>
+{% block style %}
+<link rel="stylesheet" type="text/css" href="/static/default.css">
+{% endblock %}
+{% block javascript %}
+{% endblock %}
+<title>The Equator</title>
+</head><body>
+<div class="main">
+<div style="width: 100%; text-align: center;">
+<h1>{% block title %}The Equator% endblock %}</h1>
+</div>
+{% block content %}
+no content?
+{% endblock %}
+<br>
+<hr>
+<span class="footer">
+<a href="/">home</a> -
+<a href="/go/">do it</a> -
+<a href="/equation/">equations</a> -
+<a href="/variable/">variables</a> -
+<a href="/symbol/">symbols</a>
+<br>Legalese? Copyright? Fuck no!
+<a href="mailto:webmaster@equator.memeschemes.com" style="text-decoration: line-through;">email the webmaster!</a> 2007!
+</span>
+</div></body></html>
diff --git a/templates/flatpages/default.html b/templates/flatpages/default.html
new file mode 100644
index 0000000..55baf71
--- /dev/null
+++ b/templates/flatpages/default.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+
+{% block title %}{{ flatpage.title }}{% endblock %}
+{% block content %}
+{{ flatpage.content }}
+{% endblock %}
diff --git a/templates/go.html b/templates/go.html
new file mode 100644
index 0000000..cb1e855
--- /dev/null
+++ b/templates/go.html
@@ -0,0 +1,90 @@
+{% extends "base.html" %}
+
+{% block javascript %}
+<script type="text/javascript" src="The%20Equator_files/prototype.js">
+</script>
+<script type="text/javascript">
+var variables = []
+var equations = []
+function get_variables() {
+ $('status_bin').innerHTML= "Fetching..."
+ var initialVariablesRequest = new Ajax.Request(
+ "/variable/json/all/",
+ { method: 'get',
+ onSuccess: handle_variables });
+}
+
+function handle_variables(transport) {
+ json = transport.responseText.evalJSON();
+ $('status_bin').innerHTML = "Recieved: \n" + json;
+ $('variables_bin').innerHTML = '';
+ for(i=0; i<json.length; i++) {
+ variables[i] = json[i].fields;
+ $('variables_bin').innerHTML += '<img src="/static/' +
+ variables[i].render +
+ '" style="padding:2px; border: 2px solid white; margin: 4px;" ' +
+ 'id="variable'+i+'" ' +
+ 'alt="'+variables[i].name+'" onClick="toggle_variable('+i+');">';
+ variables[i].isselected = false;
+ }
+
+}
+function toggle_variable(vnum) {
+ if(variables[vnum].isselected == false) {
+ variables[vnum].isselected = true;
+ $('variable'+vnum).style["border"] = "2px solid green"
+ } else {
+ variables[vnum].isselected = false;
+ $('variable'+vnum).style["border"] = "2px solid white"
+ }
+ var whichvars = ''
+ for(i=0; i<variables.length; i++){
+ if(variables[i].isselected == true){
+ whichvars += (i+1) + ","
+ }
+ }
+ var freshEquationsRequest = new Ajax.Request(
+ "/equation/json/byvariables/" + whichvars,
+ { method: 'get',
+ onSuccess: handle_equations});
+}
+function handle_equations(transport) {
+ json = transport.responseText.evalJSON();
+ $('status_bin').innerHTML = "Recieved: \n" + json;
+ $('equations_bin').innerHTML = '<br />';
+ for(i=0; i<json.length; i++) {
+ equations[json[i].pk-1] = json[i].fields;
+ $('equations_bin').innerHTML += '<a style="text-decoration:none;' +
+ 'border:none;" href="/equation/'+json[i].pk+'/">' +
+ '<img src="/static/' +
+ json[i].fields.render +
+ '" style="padding:2px; border: 2px solid white; margin: 4px;" ' +
+ 'id="variable'+i+'" ' +
+ 'alt="'+json[i].fields.name+'"></a>';
+ }
+
+}
+
+</script>
+{% endblock %}
+
+{% block title %}<span style="color: orange;">YAY!</span>{% endblock %}
+{% block content %}
+<b>Variables<!-- <span onClick="get_variables();">(fetch)</span>-->: </b>
+<div id="variables_bin" style="border: 2px solid black; width: 100%;">
+(none yet!)
+</div>
+<br />
+<b>Matching Equations: </b>
+<div id="equations_bin" style="border: 2px solid black; width: 100%;">
+(none yet, choose some variables!)
+</div>
+<span style="visibility: hidden;">
+<b>Status: </b>
+<div id="status_bin" style="border: 2px solid black; width: 100%;">
+(nothing...)</div>
+</span>
+<script type="text/javascript">
+window.onLoad = get_variables();
+</script>
+{% endblock %}