From 360a3f82c02fdbe2c2d317e01f01fc69adbf4ab5 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Fri, 28 Oct 2016 00:07:12 -0700 Subject: webface front page --- notes/webface.txt | 1 + src/bin/modelthing-webface.rs | 12 +++++++----- webface/templates/base.html | 7 +++++++ webface/templates/home.html | 40 +++++++++++++++++++++++++++++++++++++++- webface/templates/raw.html | 6 ++++++ 5 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 webface/templates/raw.html diff --git a/notes/webface.txt b/notes/webface.txt index 0011b41..9f8f915 100644 --- a/notes/webface.txt +++ b/notes/webface.txt @@ -8,6 +8,7 @@ editing markdown etc: - https://github.com/benweet/stackedit: markdown, very fancy - https://ace.c9.io: simple code-oriented - http://dillinger.io/ +- https://github.com/benweet/stackedit - vue.js ### Dynamic Essay diff --git a/src/bin/modelthing-webface.rs b/src/bin/modelthing-webface.rs index 5dc98f8..0940ea0 100644 --- a/src/bin/modelthing-webface.rs +++ b/src/bin/modelthing-webface.rs @@ -13,10 +13,11 @@ fn home(r: &mut Request) -> PencilResult { return r.app.render_template("home.html", &context); } -fn about(_: &mut Request) -> PencilResult { - let mut response = Response::from(include_str!("../../README.txt")); - response.set_content_type("text/plain"); - Ok(response) +fn readme(r: &mut Request) -> PencilResult { + let mut context = BTreeMap::new(); + let raw_text = include_str!("../../README.txt"); + context.insert("raw_text".to_string(), raw_text.to_string()); + return r.app.render_template("raw.html", &context); } fn model_list(_: &mut Request) -> PencilResult { @@ -57,8 +58,9 @@ fn main() { app.register_template("base.html"); app.register_template("home.html"); + app.register_template("raw.html"); app.get("/", "home", home); - app.get("/about/", "about", about); + app.get("/readme/", "readme", readme); app.get("/model_list/", "model_list", model_list); app.register_template("model_view.html"); app.get("/model/", "model", model_view); diff --git a/webface/templates/base.html b/webface/templates/base.html index 59060ed..db49004 100644 --- a/webface/templates/base.html +++ b/webface/templates/base.html @@ -3,10 +3,17 @@ {{#block title}}modelthing{{/block}} + +
{{~#block content}}{{/block~}} +
diff --git a/webface/templates/home.html b/webface/templates/home.html index 6068c99..0860e77 100644 --- a/webface/templates/home.html +++ b/webface/templates/home.html @@ -1,6 +1,44 @@ {{# partial content}} +
+                           _      _ _   _     _             _
+       _ __ ___   ___   __| | ___| | |_| |__ (_)_ __   __ _| |
+      | '_ ` _ \ / _ \ / _` |/ _ \ | __| '_ \| | '_ \ / _` | |
+      | | | | | | (_) | (_| |  __/ | |_| | | | | | | | (_| |_|
+      |_| |_| |_|\___/ \__,_|\___|_|\__|_| |_|_|_| |_|\__, (_)
+                                                      |___/
 
-about
+                  an experimental systems-modeling-wiki-thing
+


+ +

modelthing is a set of software tools for collaboratively editing +symbolic models of real world systems. + +

What kind of real world systems? any system that can be described by +algebraic differential equations. Examples: a double pendulum, population +dynamics in ecology, Moore's Law of increasing transistor density, the light +emited by an LED as a factor of current and voltage, real estate prices as a +factor of rent control, etc. + +

What kind of symbolic models? models which both hold semantic meaning +and can be computed. machines should be able to translate the models between +different symbolic, graphical, and interactive mediums, and both humans and +machines should be able reason with and judge the appropriateness of the +models. + +

What kind of collaborative editing? aspirationally, rational discourse +between strangers on the internet who come to progressively more accurate +consensus. The models should be re-usable by hierarchal reference, with +automated tooling to cross-check for compatibility. + +

Does it work? there's no "here" here, yet, just some sketches and +experiments. + +

+

+full readme - +source code +
+
{{/partial}} {{> base.html}} diff --git a/webface/templates/raw.html b/webface/templates/raw.html new file mode 100644 index 0000000..5e10ff4 --- /dev/null +++ b/webface/templates/raw.html @@ -0,0 +1,6 @@ +{{# partial content}} +
+{{ raw_text }}
+
+{{/partial}} +{{> base.html}} -- cgit v1.2.3