Permalink
Browse files

Initial commit.

  • Loading branch information...
akshell
akshell committed Feb 23, 2011
0 parents commit 4d4441cc2ef73696e8d62ceeaa5f9a524e8dbb76
Showing with 64 additions and 0 deletions.
  1. +22 −0 main.js
  2. +5 −0 manifest.json
  3. +4 −0 static/base.css
  4. +15 −0 templates/base.html
  5. +9 −0 templates/failure.html
  6. +9 −0 templates/index.html
22 main.js
@@ -0,0 +1,22 @@
+// The main code file of your application
+
+// The setup of the basic Akshell library
+require('ak').setup();
+
+
+// The index page handler
+var IndexHandler = Handler.subclass(
+ {
+ get: function (request) {
+ return render(
+ 'index.html',
+ {
+ header: 'Hello World!'
+ });
+ }
+ });
+
+
+// The URL -> handler mapping
+exports.root = new URLMap(
+ IndexHandler, 'index');
@@ -0,0 +1,5 @@
+{
+ "libs": {
+ "ak": "akshell/ak:0.3"
+ }
+}
@@ -0,0 +1,4 @@
+/*
+ The base stylesheet of your application.
+ It should define rules common for all pages.
+*/
@@ -0,0 +1,15 @@
+{# The base HTML template of your application. #}
+{# It should define blocks to be filled out by child templates. #}
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <link rel="stylesheet" type="text/css" href="{% static 'base.css' %}">
+ <title>{% block title %}{% endblock %}</title>
+ </head>
+ <body>
+ {% block content %}
+ {% endblock %}
+ </body>
+</html>
@@ -0,0 +1,9 @@
+{# The template of the failure page #}
+
+{% extends 'base.html' %}
+
+{% block title %}Failure{% endblock %}
+
+{% block content %}
+ <h1>{{ failure.message }}</h1>
+{% endblock %}
@@ -0,0 +1,9 @@
+{# The template of the index page #}
+
+{% extends 'base.html' %}
+
+{% block title %}Home{% endblock %}
+
+{% block content %}
+ <h1>{{ header }}</h1>
+{% endblock %}

0 comments on commit 4d4441c

Please sign in to comment.