[style] default website

This commit is contained in:
Rushabh Mehta 2014-08-25 15:16:54 +05:30
parent 43653e2d40
commit 0d2d2af564
2 changed files with 24 additions and 13 deletions

View file

@ -7,29 +7,34 @@ import frappe
no_sitemap = 1
base_template_path = "templates/pages/style_settings.css"
default_properties = {
"background_color": "FFFFFF",
"top_bar_background": "FFFFFF",
"top_bar_foreground": "000000",
"page_text": "000000",
"page_header_background": "263248",
"page_header_text": "ffffff",
"font_size": "14px",
"google_web_font_for_heading": "Noto Sans",
"google_web_font_for_text": "Noto Sans"
}
def get_context(context):
"""returns web style"""
doc = frappe.get_doc("Style Settings", "Style Settings")
prepare(doc)
print doc.__dict__
return { "doc": doc }
def prepare(doc):
from frappe.utils import cint, cstr
# set default colours
default_colours = {
"background_color": "FFFFFF",
"top_bar_background": "FFFFFF",
"top_bar_foreground": "444444",
"page_text": "000000",
"page_header_background": "263248",
"page_header_text": "ffffff"
}
for d in default_colours:
for d in default_properties:
if not doc.get(d):
doc.set(d, default_colours[d])
doc.set(d, default_properties[d])
if not doc.font_size:
doc.font_size = "14px"

View file

@ -162,6 +162,8 @@ img {
box-shadow: none;
border-radius: 0px;
margin-bottom: 0px;
padding-top: 15px;
padding-bottom: 15px;
}
.navbar-brand {
@ -171,6 +173,10 @@ img {
height: auto;
}
.navbar a.active {
font-weight: bold;
}
@media (min-width: 768px) {
.navbar-brand {
max-width: 300px;
@ -220,7 +226,7 @@ fieldset {
.page-header {
margin: 0px;
margin-bottom: 20px;
padding: 15px 0px;
padding: 25px 0px;
}
.page-container {