diff --git a/frappe/model/utils/__init__.py b/frappe/model/utils/__init__.py index 5c04c515c1..2b09a2f2e5 100644 --- a/frappe/model/utils/__init__.py +++ b/frappe/model/utils/__init__.py @@ -36,17 +36,24 @@ def render_include(content): '''render {% include "app/path/filename" in js file %}''' content = cstr(content) - if "{% include" in content: - paths = re.findall(r'''{% include\s['"](.*)['"]\s%}''', content) - if not paths: - frappe.throw('Invalid include path') - - for path in paths: - app, app_path = path.split('/', 1) - with open(frappe.get_app_path(app, app_path), 'r') as f: - include = unicode(f.read(), 'utf-8') - if path.endswith('.html'): - include = html_to_js_template(path, include) - content = re.sub(r'''{{% include\s['"]{0}['"]\s%}}'''.format(path), include, content) + + # try 5 levels of includes + for i in xrange(5): + if "{% include" in content: + paths = re.findall(r'''{% include\s['"](.*)['"]\s%}''', content) + if not paths: + frappe.throw('Invalid include path') + + for path in paths: + app, app_path = path.split('/', 1) + with open(frappe.get_app_path(app, app_path), 'r') as f: + include = unicode(f.read(), 'utf-8') + if path.endswith('.html'): + include = html_to_js_template(path, include) + + content = re.sub(r'''{{% include\s['"]{0}['"]\s%}}'''.format(path), include, content) + + else: + break return content diff --git a/frappe/public/css/avatar.css b/frappe/public/css/avatar.css index 0ced8d015e..725bef2f9a 100644 --- a/frappe/public/css/avatar.css +++ b/frappe/public/css/avatar.css @@ -4,6 +4,16 @@ width: 50px; height: 50px; } +.avatar-frame { + display: inline-block; + width: 100%; + height: 0; + padding: 50% 0px; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; + border-radius: 4px; +} .avatar img { max-width: 100%; max-height: 100%; @@ -21,6 +31,9 @@ .avatar-small .standard-image { font-size: 14px; } +.avatar-small .avatar-frame { + border-radius: 3px; +} .avatar-medium { margin-right: 5px; width: 36px; @@ -54,16 +67,6 @@ height: 0; padding-bottom: 100%; } -.avatar-frame { - display: inline-block; - width: 100%; - height: 0; - padding: 50% 0px; - background-size: cover; - background-repeat: no-repeat; - background-position: center center; - border-radius: 4px; -} .standard-image { width: 100%; height: 0; diff --git a/frappe/public/css/website.css b/frappe/public/css/website.css index f844cd2d1c..6714c6657f 100644 --- a/frappe/public/css/website.css +++ b/frappe/public/css/website.css @@ -226,6 +226,16 @@ a.no-decoration:active { width: 50px; height: 50px; } +.avatar-frame { + display: inline-block; + width: 100%; + height: 0; + padding: 50% 0px; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; + border-radius: 4px; +} .avatar img { max-width: 100%; max-height: 100%; @@ -243,6 +253,9 @@ a.no-decoration:active { .avatar-small .standard-image { font-size: 14px; } +.avatar-small .avatar-frame { + border-radius: 3px; +} .avatar-medium { margin-right: 5px; width: 36px; @@ -276,16 +289,6 @@ a.no-decoration:active { height: 0; padding-bottom: 100%; } -.avatar-frame { - display: inline-block; - width: 100%; - height: 0; - padding: 50% 0px; - background-size: cover; - background-repeat: no-repeat; - background-position: center center; - border-radius: 4px; -} .standard-image { width: 100%; height: 0; @@ -361,6 +364,23 @@ a.no-decoration:active { html, body { font-family: "Open Sans", "Helvetica Neue", Serif; + color: #6c7680; +} +a { + color: #6c7680; +} +a:hover, +a:focus, +a:active { + color: #36414C; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 300; } .navbar-brand { max-width: none; @@ -467,6 +487,10 @@ body { .panel-body { padding-left: 15px; } +.page-head h1, +.page-head h2 { + margin-top: 0px; +} .page-header-actions-block { text-align: right; } @@ -915,10 +939,16 @@ li .social-child-item { padding-top: 30px; padding-bottom: 20px; } -#item-search { +.item-search { + border-bottom: 1px solid #d1d8dd; +} +.item-search .item-search-input { position: relative; outline: none; border: none; + margin-right: 5px; + padding: 7px; + padding-left: 0px; } .vert-line { overflow: hidden; diff --git a/frappe/public/less/avatar.less b/frappe/public/less/avatar.less index 35f59f3ab1..363fd52767 100644 --- a/frappe/public/less/avatar.less +++ b/frappe/public/less/avatar.less @@ -7,6 +7,17 @@ height: 50px; } +.avatar-frame { + display: inline-block; + width: 100%; + height: 0; + padding: 50% 0px; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; + border-radius: 4px; +} + .avatar img { max-width: 100%; max-height: 100%; @@ -26,6 +37,10 @@ .standard-image { font-size: 14px; } + + .avatar-frame { + border-radius: 3px; + } } .avatar-medium { @@ -68,17 +83,6 @@ padding-bottom: 100%; } -.avatar-frame { - display: inline-block; - width: 100%; - height: 0; - padding: 50% 0px; - background-size: cover; - background-repeat: no-repeat; - background-position: center center; - border-radius: 4px; -} - .standard-image { width: 100%; height: 0; @@ -93,4 +97,4 @@ border: 1px solid @border-color; font-weight: normal; margin-top: -1px; -} \ No newline at end of file +} diff --git a/frappe/public/less/variables.less b/frappe/public/less/variables.less index 8a54d58044..bf5b85282b 100644 --- a/frappe/public/less/variables.less +++ b/frappe/public/less/variables.less @@ -3,6 +3,7 @@ @border-color: #d1d8dd; @light-border-color: #EBEFF2; @text-color: #36414C; +@text-light: #6c7680; @text-muted: #8D99A6; @btn-bg: #F0F4F7; @panel-bg: #F7FAFC; diff --git a/frappe/public/less/website.less b/frappe/public/less/website.less index 82cd756338..4ce0a29b61 100644 --- a/frappe/public/less/website.less +++ b/frappe/public/less/website.less @@ -5,6 +5,21 @@ html, body { font-family: "Open Sans", "Helvetica Neue", Serif; + color: @text-light; +} + +a& { + color: @text-light; + + &:hover, + &:focus, + &:active { + color: @text-color; + } +} + +h1, h2, h3, h4, h5, h6 { + font-weight: 300; } .navbar-brand { @@ -133,6 +148,12 @@ html, body { padding-left: 15px; } +.page-head { + h1, h2 { + margin-top: 0px; + } +} + .page-header-actions-block { text-align: right; } @@ -523,13 +544,21 @@ li .social-child-item { padding-bottom:20px; } -#item-search { - position: relative; - outline:none; - border:none; +.item-search { + border-bottom: 1px solid @border-color; + + .item-search-input { + position: relative; + outline: none; + border: none; + margin-right: 5px; + padding: 7px; + padding-left: 0px; + } } .vert-line {overflow:hidden;} .vert-line>div+div{border-left:1px solid @light-border-color;} .vert-line>div{ padding-bottom:2000px; margin-bottom:-2000px;} + diff --git a/frappe/templates/includes/footer/footer.html b/frappe/templates/includes/footer/footer.html index 2001f54fe9..93aeaf5690 100644 --- a/frappe/templates/includes/footer/footer.html +++ b/frappe/templates/includes/footer/footer.html @@ -27,7 +27,7 @@ {% endif %} {% if footer_items -%} -