[website] [minor] moving to framework

This commit is contained in:
Rushabh Mehta
2013-09-09 12:32:35 +05:30
parent c59c4e0699
commit e865de01ee
28 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
<footer class="container">
<div class="web-footer row">
<div class="col-md-12">
{% if facebook_share or google_plus_one or twitter_share or linked_in_share %}
<div class="social-icons" style="">
<span style="font-size: 11px;">{{ share_text or "Share this page on: "}}</span>
{% if google_plus_one %}
<a href="https://plus.google.com/share?url={{ url }}"
target="_blank"><i class="icon-google-plus"></i></a>
{% endif %}
{% if twitter_share %}
<a href="https://twitter.com/intent/tweet?url={{ url }}&text={{ encoded_title }}"
target="_blank" ><i class="icon-twitter"></i></a>
{% endif %}
{% if facebook_share %}
<a href="https://www.facebook.com/sharer.php?u={{ url }}&t={{ encoded_title }}&via={{ twitter_share_via }}"
target="_blank"><i class="icon-facebook"></i></a>
{% endif %}
{% if linked_in_share %}
<a href="http://www.linkedin.com/shareArticle?mini=true&url={{ url }}&title={{ encoded_title }}"
target="_blank"><i class="icon-linkedin"></i></a>
{% endif %}
</div>
{% endif %}
<p style="float: right; clear: right;">
<a style="font-size: 90%; color: #888;" href="http://erpnext.org">ERPNext Powered</a>
</p>
<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>
{% if copyright %}
<div class="web-footer-copyright">&copy; {{ copyright }}</div>
{% endif %}
{% if address %}
{{ address }}
{% endif %}
<br>
<div class="input-group col-md-6 col-md-offset-3">
<input class="form-control" type="text" id="footer-subscribe-email" placeholder="Your email address...">
<span class="input-group-btn">
<button class="btn btn-default" type="button" id="footer-subscribe-button">Stay Updated</button>
</span>
</div>
<br>
<script>
$("#footer-subscribe-button").click(function() {
$("#footer-subscribe-email").attr('disabled', true);
$("#footer-subscribe-button").html("Sending...")
.attr("disabled", true);
if($("#footer-subscribe-email").val()) {
erpnext.send_message({
subject:"Subscribe me",
sender: $("#footer-subscribe-email").val(),
message: "Subscribe to newsletter (via website footer).",
callback: function(r) {
if(!r.exc) {
$("#footer-subscribe-button").html("Thank You :)")
.addClass("btn-success").attr("disabled", true);
} else {
$("#footer-subscribe-button").html("Error :( Not a valid id?")
.addClass("btn-danger").attr("disabled", false);
$("#footer-subscribe-email").val("").attr('disabled', false);
}
}
});
}
});
</script>
</div>
</div>
</div>
</footer>

View File

@@ -0,0 +1,39 @@
<div class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse"
data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index">{{ brand_html or "<i class='icon-home'></i>"}}</a>
</div>
<div class="collapse navbar-collapse navbar-responsive-collapse">
<ul class="nav navbar-nav">
{%- for page in top_bar_items -%}
{% if not page.parent_label -%}
<li data-label="{{ page.label }}" {% if page.child_items %} class="dropdown"{% endif %}>
<a href="{{ page.url or '#' }}" {% if page.child_items %} class="dropdown-toggle" onclick="return false;" data-toggle="dropdown"{% endif %} {{ page.target or ''}}>
{{ page.label }}
{%- if page.child_items -%}
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
{%- for child in page.child_items -%}
<li data-label="{{ child.label }}">
<a {% if child.indent %} style="padding-left: {{(int(child.indent)+1)*15 }}px"{% endif %} href="{{ child.url }}" {{ child.target or '' }}>{{ child.label }}</a>
</li>
{%- endfor -%}
</ul>
{%- else -%}
</a>
{%- endif -%}
</li>
{%- endif -%}
{%- endfor %}
</ul>
</div>
</div>
</div>
<script>$('.dropdown-toggle').dropdown()</script>

View File

@@ -0,0 +1,34 @@
{% extends "lib/templates/base.html" %}
{% block body %}
{% include "app/website/templates/html/navbar.html" %}
<div class="container">
<div class="pull-right" style="margin:4px;" id="user-tools">
{% if shopping_cart_enabled -%}
<a href="cart" title="Shopping Cart"><i class="icon-shopping-cart"></i>
<span class="cart-count"></span></a> |
{%- endif %}
<a id="login-link" href="login">Login</a>
</div>
<div class="pull-right hide" style="margin:4px;" id="user-tools-post-login">
<a href="account" title="My Account" id="user-full-name"></a> |
{% if shopping_cart_enabled -%}
<a href="cart" title="Shopping Cart"><i class="icon-shopping-cart"></i>
<span class="cart-count"></span></a> |
{%- endif %}
<a href="server.py?cmd=web_logout" title="Sign Out"><i class="icon-signout"></i></a>
</div>
<div class="clearfix"></div>
{% if banner_html %}<div class="row banner">
<div class="col-md-12">{{ banner_html }}</div>
</div>{% endif %}
<div class="outer">
<div class="content row" id="page-{{ name }}" style="display: block;">
{%- block content -%}
{%- endblock -%}
</div>
</div>
</div>
{% include "app/website/templates/html/footer.html" %}
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% extends "app/website/templates/html/outer.html" %}
{% block title -%}{{ title }}{%- endblock %}
{% block header -%}
{{ super() }}
<script>
{% block javascript -%}
{%- endblock %}
</script>
{% block css -%}
{% if insert_style -%}
<style>{{ css }}</style>
{%- endif %}
{%- endblock %}
{%- endblock -%}
{%- block content -%}
{{ content }}
{%- endblock %}