updates to website footer
This commit is contained in:
parent
833b0f12d5
commit
f2b17d91a1
@ -12,6 +12,7 @@ div#body_div {
|
||||
}
|
||||
|
||||
footer {
|
||||
text-align: left;
|
||||
width: 720px;
|
||||
margin: auto;
|
||||
}
|
||||
@ -39,7 +40,9 @@ p, li {
|
||||
}
|
||||
|
||||
.social-icons {
|
||||
font-size: 120%
|
||||
font-size: 120%;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.social-icons a:hover {
|
||||
text-decoration: none;
|
||||
@ -47,11 +50,11 @@ p, li {
|
||||
.social-icons a i:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.web-footer-menu {
|
||||
margin-bottom: 7px;
|
||||
.social-icons i {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
.web-footer-menu ul {
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
@ -60,16 +63,8 @@ p, li {
|
||||
|
||||
.web-footer-menu ul li {
|
||||
display: inline;
|
||||
padding: 2px 15px;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
.web-footer-menu ul li:first-child {
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.web-footer-menu ul li:last-child {
|
||||
border-right: 0px solid #777 !important;
|
||||
padding: 2px 14px 2px 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.two-column {
|
||||
|
@ -2,7 +2,7 @@
|
||||
{
|
||||
"creation": "2013-01-25 11:35:10",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-02-20 14:31:02",
|
||||
"modified": "2013-02-21 10:05:09",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
@ -167,6 +167,13 @@
|
||||
"fieldtype": "Check",
|
||||
"label": "Twitter Share"
|
||||
},
|
||||
{
|
||||
"description": "Tweet will be shared via your user account (if specified)",
|
||||
"doctype": "DocField",
|
||||
"fieldname": "twitter_share_via",
|
||||
"fieldtype": "Data",
|
||||
"label": "Twitter Share via"
|
||||
},
|
||||
{
|
||||
"doctype": "DocField",
|
||||
"fieldname": "misc_section",
|
||||
|
107
website/templates/html/outer.html
Normal file
107
website/templates/html/outer.html
Normal file
@ -0,0 +1,107 @@
|
||||
{#
|
||||
requires, brand_html, top_bar_items, footer_items, copyright, content, address
|
||||
#}
|
||||
|
||||
{% extends "html/base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<header>
|
||||
</header>
|
||||
<div id="body_div">
|
||||
<div class="navbar-wrapper">
|
||||
<div class="navbar{% if top_bar_background=="Black" %} navbar-inverse{% endif %}"
|
||||
style="margin-bottom: 0px;">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand" href="/">{{ brand_html }}</a>
|
||||
<ul class="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>
|
||||
<img src="lib/images/ui/spinner.gif" id="spinner"/>
|
||||
<ul class="nav pull-right">
|
||||
<li id="login-topbar-item"><a href="login">Login</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>$('.dropdown-toggle').dropdown()</script>
|
||||
<div class="content" id="page-{{ name }}" style="display: block;">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<footer><div class="web-footer">
|
||||
{% 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%;" href="attributions">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">© {{ copyright }}</div>
|
||||
{% endif %}
|
||||
{% if address %}
|
||||
{{ address }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
{% endblock %}
|
@ -1,5 +1,7 @@
|
||||
{% extends "html/outer.html" %}
|
||||
|
||||
{% set title="Not Found" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">
|
||||
<div class="layout-wrapper layout-main">
|
||||
|
@ -1,8 +1,6 @@
|
||||
{% extends "html/page.html" %}
|
||||
|
||||
{% block title %}
|
||||
About Us
|
||||
{% endblock %}
|
||||
{% set title="About Us" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="layout-wrapper">
|
||||
|
@ -8,9 +8,7 @@
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
ERPNext - Web Based, Open Source ERP
|
||||
{% endblock %}
|
||||
{% set title="ERPNext - Web Based, Open Source ERP" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="layout-attributions">
|
||||
|
@ -8,7 +8,7 @@
|
||||
{% include "css/blog.css" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}Blog{% endblock %}
|
||||
{% set title="Blog" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="layout-wrapper layout-wrapper-background">
|
||||
|
@ -4,9 +4,7 @@
|
||||
{% include "js/contact.js" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
Contact Us
|
||||
{% endblock %}
|
||||
{% set title="Contact Us" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="layout-wrapper">
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% extends "html/outer.html" %}
|
||||
|
||||
{% set title="Error" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">
|
||||
<div class="layout-wrapper layout-main">
|
||||
|
@ -7,9 +7,7 @@
|
||||
{% include "css/login.css" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block title %}
|
||||
Login Page
|
||||
{% endblock %}
|
||||
{% set title="Login" %}
|
||||
|
||||
{% block body %}
|
||||
<div id='login_wrapper'>
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends "html/page.html" %}
|
||||
|
||||
{% block title %}Product Search{% endblock %}
|
||||
{% set title="Product Search" %}
|
||||
|
||||
{% block javascript %}
|
||||
{% include "js/product_list.js" %}
|
||||
|
@ -1,5 +1,7 @@
|
||||
{% extends "html/outer.html" %}
|
||||
|
||||
{% set title="Unsubscribed" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content">
|
||||
<div class="layout-wrapper layout-main">
|
||||
|
@ -162,7 +162,7 @@ def prepare_args(page_name):
|
||||
if not args:
|
||||
return False
|
||||
|
||||
args.update(get_outer_env(page_name))
|
||||
get_outer_env(page_name, args)
|
||||
|
||||
return args
|
||||
|
||||
@ -203,7 +203,7 @@ def get_source_doc(page_name):
|
||||
|
||||
return None, None
|
||||
|
||||
def get_outer_env(page_name):
|
||||
def get_outer_env(page_name, args):
|
||||
from webnotes.utils import get_request_site_address
|
||||
from urllib import quote
|
||||
|
||||
@ -245,20 +245,23 @@ def get_outer_env(page_name):
|
||||
'int':int
|
||||
})
|
||||
|
||||
args.update(ret)
|
||||
|
||||
settings = webnotes.doc("Website Settings", "Website Settings")
|
||||
for k in ["brand_html", "copyright", "address", "top_bar_background", "favicon",
|
||||
"facebook_share", "google_plus_one", "twitter_share", "linked_in_share"]:
|
||||
"facebook_share", "google_plus_one", "twitter_share", "linked_in_share", "twitter_share_via"]:
|
||||
if k in settings.fields:
|
||||
ret[k] = settings.fields.get(k)
|
||||
args[k] = settings.fields.get(k)
|
||||
|
||||
if not ret.brand_html:
|
||||
ret.brand_html = "ERPNext"
|
||||
if not ret.top_bar_background:
|
||||
ret.top_bar_background = "Black"
|
||||
if not args.brand_html:
|
||||
args.brand_html = "ERPNext"
|
||||
if not args.top_bar_background:
|
||||
args.top_bar_background = "Black"
|
||||
|
||||
ret.url = quote(get_request_site_address(full_address=True), "")
|
||||
args.url = quote(get_request_site_address(full_address=True), "")
|
||||
args.encoded_title = quote(args.title or "", "")
|
||||
|
||||
return ret
|
||||
return args
|
||||
|
||||
def get_home_page():
|
||||
doc_name = webnotes.conn.get_value('Website Settings', None, 'home_page')
|
||||
|
Loading…
Reference in New Issue
Block a user