diff --git a/website/css/website.css b/website/css/website.css index fb671a1f03..0b2dce44cb 100644 --- a/website/css/website.css +++ b/website/css/website.css @@ -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 { diff --git a/website/doctype/website_settings/website_settings.txt b/website/doctype/website_settings/website_settings.txt index 80d721a977..6af0575a36 100644 --- a/website/doctype/website_settings/website_settings.txt +++ b/website/doctype/website_settings/website_settings.txt @@ -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", diff --git a/website/templates/html/outer.html b/website/templates/html/outer.html new file mode 100644 index 0000000000..ebb49239da --- /dev/null +++ b/website/templates/html/outer.html @@ -0,0 +1,107 @@ +{# + requires, brand_html, top_bar_items, footer_items, copyright, content, address +#} + +{% extends "html/base.html" %} + +{% block body %} +
+
+
+ + +
+ {% block content %} + {% endblock %} +
+
+ + +{% endblock %} \ No newline at end of file diff --git a/website/templates/pages/404.html b/website/templates/pages/404.html index 04584d9a72..8a676ce524 100644 --- a/website/templates/pages/404.html +++ b/website/templates/pages/404.html @@ -1,5 +1,7 @@ {% extends "html/outer.html" %} +{% set title="Not Found" %} + {% block content %}
diff --git a/website/templates/pages/about.html b/website/templates/pages/about.html index 7ccfa77769..1a60b33c2d 100644 --- a/website/templates/pages/about.html +++ b/website/templates/pages/about.html @@ -1,8 +1,6 @@ {% extends "html/page.html" %} -{% block title %} -About Us -{% endblock %} +{% set title="About Us" %} {% block content %}
diff --git a/website/templates/pages/attributions.html b/website/templates/pages/attributions.html index bc9d368921..e587484377 100644 --- a/website/templates/pages/attributions.html +++ b/website/templates/pages/attributions.html @@ -8,9 +8,7 @@ {% endblock %} -{% block title %} - ERPNext - Web Based, Open Source ERP -{% endblock %} +{% set title="ERPNext - Web Based, Open Source ERP" %} {% block content %}
diff --git a/website/templates/pages/blog.html b/website/templates/pages/blog.html index f31af42222..3ad9e0af56 100644 --- a/website/templates/pages/blog.html +++ b/website/templates/pages/blog.html @@ -8,7 +8,7 @@ {% include "css/blog.css" %} {% endblock %} -{% block title %}Blog{% endblock %} +{% set title="Blog" %} {% block content %}
diff --git a/website/templates/pages/contact.html b/website/templates/pages/contact.html index 005d36a681..f876da1d6a 100644 --- a/website/templates/pages/contact.html +++ b/website/templates/pages/contact.html @@ -4,9 +4,7 @@ {% include "js/contact.js" %} {% endblock %} -{% block title %} -Contact Us -{% endblock %} +{% set title="Contact Us" %} {% block content %}
diff --git a/website/templates/pages/error.html b/website/templates/pages/error.html index 4fe394f66b..2be810d40a 100644 --- a/website/templates/pages/error.html +++ b/website/templates/pages/error.html @@ -1,5 +1,7 @@ {% extends "html/outer.html" %} +{% set title="Error" %} + {% block content %}
diff --git a/website/templates/pages/login.html b/website/templates/pages/login.html index 9dcff269e8..ef9b7bbce4 100644 --- a/website/templates/pages/login.html +++ b/website/templates/pages/login.html @@ -7,9 +7,7 @@ {% include "css/login.css" %} {% endblock %} -{% block title %} - Login Page -{% endblock %} +{% set title="Login" %} {% block body %}
diff --git a/website/templates/pages/product_search.html b/website/templates/pages/product_search.html index e573f7eb81..90c248949c 100644 --- a/website/templates/pages/product_search.html +++ b/website/templates/pages/product_search.html @@ -1,6 +1,6 @@ {% extends "html/page.html" %} -{% block title %}Product Search{% endblock %} +{% set title="Product Search" %} {% block javascript %} {% include "js/product_list.js" %} diff --git a/website/templates/pages/unsubscribed.html b/website/templates/pages/unsubscribed.html index 3dc7df9e43..42441fe771 100644 --- a/website/templates/pages/unsubscribed.html +++ b/website/templates/pages/unsubscribed.html @@ -1,5 +1,7 @@ {% extends "html/outer.html" %} +{% set title="Unsubscribed" %} + {% block content %}
diff --git a/website/utils.py b/website/utils.py index 84e11cec3b..2ef65a16fc 100644 --- a/website/utils.py +++ b/website/utils.py @@ -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')