cms now powered by jinja2
diff --git a/erpnext/website/templates/404.html b/erpnext/website/templates/404.html
new file mode 100644
index 0000000..8a30892
--- /dev/null
+++ b/erpnext/website/templates/404.html
@@ -0,0 +1,12 @@
+{% extends "outer.html" %}
+
+{% block content %}
+<div class="content">
+ <div class="layout-wrapper layout-main">
+ <h3>Page missing or moved</h3>
+ <br>
+ <p>We are very sorry for this, but the page you are looking for is missing
+ (this could be because of a typo in the address) or moved.</p>
+ </div>
+</div>
+{% endblock %}
\ No newline at end of file
diff --git a/erpnext/website/templates/__init__.py b/erpnext/website/templates/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/website/templates/__init__.py
diff --git a/erpnext/website/templates/base.html b/erpnext/website/templates/base.html
new file mode 100644
index 0000000..cd64139
--- /dev/null
+++ b/erpnext/website/templates/base.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<head>
+ <meta charset="utf-8">
+ <title>{% block title %}{% endblock %}</title>
+ <meta name="generator" content="wnframework">
+ <link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
+ <link rel="icon" href="images/favicon.ico" type="image/x-icon">
+ <script type="text/javascript" src="js/lib/jquery/jquery.min.js"></script>
+ <script type="text/javascript" src="js/all-web.js"></script>
+ <script type="text/javascript" src="js/wn-web.js"></script>
+ <link type="text/css" rel="stylesheet" href="css/all-web.css">
+ <link type="text/css" rel="stylesheet" href="css/wn-web.css">
+
+ {% block header %}
+ {% endblock %}
+</head>
+<body>
+ {% block body %}
+ {% endblock %}
+</body>
\ No newline at end of file
diff --git a/erpnext/website/templates/blog.html b/erpnext/website/templates/blog.html
new file mode 100644
index 0000000..30dbd3b
--- /dev/null
+++ b/erpnext/website/templates/blog.html
@@ -0,0 +1,53 @@
+{% extends "index.html" %}
+
+{% block content %}
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="web-content" id="content-blog">
+ <div class="layout-main-section">
+ <h1>Blog</h1>
+ <br>
+ <div id="blog-list">
+ <!-- blog list will be generated dynamically -->
+ </div>
+ </div>
+ <div class="layout-side-section">
+ <!-- for later
+ <h4>Get Updates</h4>
+ <p>
+ <input name="blog-subscribe">
+ <button class="btn" id="blog-subscribe">Subscribe</button>
+ </p>-->
+ <h4>Subscribe</h4>
+ <p>
+ <img src="images/feed.png" style="margin-right: 4px; margin-bottom: -4px">
+ <a href="rss.xml" target="_blank">RSS Feed</a>
+ </p>
+ </div>
+ <div style="clear: both"></div>
+ </div>
+</div>
+
+<script>
+wrapper.blog_list = new wn.ui.Listing({
+ parent: $(wrapper).find('#blog-list').get(0),
+ query: 'select tabBlog.name, title, left(content, 1000) as content, tabBlog.creation, \
+ ifnull(first_name, "") as first_name, ifnull(last_name, "") as last_name \
+ from tabProfile, tabBlog\
+ where ifnull(published,0)=1 and tabBlog.owner = tabProfile.name \
+ order by tabBlog.creation desc',
+ hide_refresh: true,
+ no_toolbar: true,
+ render_row: function(parent, data) {
+ if(data.content && data.content.length==1000) data.content += '... (read on)';
+ data.content = wn.markdown(data.content);
+ if(data.last_name) data.last_name = ' ' + data.last_name;
+ data.date = prettyDate(data.creation);
+ parent.innerHTML = repl('<h2>%(title)s</h2>\
+ <p><div class="help">By %(first_name)s%(last_name)s, %(date)s</div></p>\
+ <p>%(content)s</p>\
+ <a href="%(name)s.html">Read Full Text</a><br>', data);
+ },
+ page_length: 10
+});
+wrapper.blog_list.run();
+</script>
\ No newline at end of file
diff --git a/erpnext/website/templates/outer.html b/erpnext/website/templates/outer.html
new file mode 100644
index 0000000..4b8c04d
--- /dev/null
+++ b/erpnext/website/templates/outer.html
@@ -0,0 +1,57 @@
+{#
+ requires, brand, top_bar_items, footer_items, copyright, content
+#}
+
+{% extends "base.html" %}
+
+{% block body %}
+
+ <header>
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="brand" href="index.html">{{ brand }}</a>
+ <ul class="nav">
+ {% for page in top_bar_items %}
+ {% if not page.parent_label %}
+ <li data-label="{{ page.label }}">
+ <a href="{{ page.url }}" {{ page.target }}>
+ {{ page.label }}
+ {% if page.child_items %}
+ <ul class="dropdown-menu">
+ {% for child in page.child_items %}
+ <li data-label="{{ child.label }}">
+ <a href="{{ child.url }}" {{ child.target }}>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ </a></li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ <img src="images/lib/ui/spinner.gif" id="spinner"/>
+ <ul class="nav pull-right">
+ <li id="login-topbar-item"><a href="login-page.html">Login</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </header>
+ <div id="body_div">
+ <div class="content" id="page-{{ name }}" style="display: block;">
+ {% block content %}
+ {% endblock %}
+ </div>
+ </div>
+ <footer><div class="web-footer">
+ <div class="web-footer-menu"><ul>
+ {% for item in footer_items %}
+ <li><a href="{{ item.url }}" {{ item.target }}
+ data-label="{{ item.label }}">{{ item.label }}</a></li>
+ {% endfor %}
+ </ul></div>
+ <div class="web-footer-copyright">© {{ copyright }}
+ </div>
+ </footer>
+
+{% endblock %}
\ No newline at end of file
diff --git a/erpnext/website/templates/page.html b/erpnext/website/templates/page.html
new file mode 100644
index 0000000..0eccd87
--- /dev/null
+++ b/erpnext/website/templates/page.html
@@ -0,0 +1,32 @@
+{% extends "outer.html" %}
+
+{% block title %}{{ title }}{% endblock %}
+
+{% block header %}
+ {{ super() }}
+ {% if script %}
+ <script>
+ window.page_name = "{{ name }}";
+
+ $(document).bind('app_ready', function() {
+ var _page = new wn.views.Page(window.page_name);
+
+ // page script
+ {{ script }}
+
+ // trigger onload
+ _page.trigger('onload');
+
+ // activate page
+ wn.container.change_to(window.page_name);
+ });
+ </script>
+ {% endif %}
+ {% if style %}
+ <style>{{ style }}</style>
+ {% endif %}
+{% endblock %}
+
+{% block content %}
+ {{ content }}
+{% endblock %}
\ No newline at end of file