fixed website theme, load comments and login
This commit is contained in:
parent
7950239712
commit
7112acf3d4
3 changed files with 15 additions and 12 deletions
|
|
@ -120,7 +120,7 @@ def get_comments(dt, dn, limit=100):
|
|||
as_dict=True)
|
||||
|
||||
for c in communications:
|
||||
c.attachments = json.dumps([f.file_url for f in frappe.get_list("File Data",
|
||||
c.attachments = json.dumps([f.file_url for f in frappe.get_all("File Data",
|
||||
fields=["file_url"],
|
||||
filters={"attached_to_doctype": "Communication",
|
||||
"attached_to_name": c.name}
|
||||
|
|
|
|||
|
|
@ -58,20 +58,20 @@ a:active {
|
|||
{% include "frappe/templates/includes/website_theme/footer.css" %}
|
||||
|
||||
{# borders #}
|
||||
.page-content {
|
||||
border-right: 1px solid {{ border_color }};
|
||||
/*.page-content {
|
||||
border-right: 1px solid {{ theme.border_color }};
|
||||
}
|
||||
|
||||
.page-sidebar {
|
||||
border-left: 1px solid {{ border_color }};
|
||||
border-left: 1px solid {{ theme.border_color }};
|
||||
}
|
||||
|
||||
*/
|
||||
.page-footer {
|
||||
border-top: 1px solid {{ border_color }};
|
||||
border-top: 1px solid {{ theme.border_color }};
|
||||
}
|
||||
|
||||
.border-color {
|
||||
border-color: {{ border_color }};
|
||||
border-color: {{ theme.border_color }};
|
||||
}
|
||||
|
||||
{% if theme.css -%} {% include theme.css %} {%- endif %}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,11 @@ def prepare(theme):
|
|||
.format(font.replace(" ", "+")) for font in webfonts)
|
||||
|
||||
# move @import from css field to the top of the css file
|
||||
if theme.css and "@import url" in theme.css:
|
||||
webfont_import = list(set(re.findall("@import url\([^\(\)]*\);", theme.css)))
|
||||
theme.webfont_import += "\n" + "\n".join(webfont_import)
|
||||
for wfimport in webfont_import:
|
||||
theme.css = theme.css.replace(wfimport, "")
|
||||
if theme.css:
|
||||
if "@import url" in theme.css:
|
||||
webfont_import = list(set(re.findall("@import url\([^\(\)]*\);", theme.css)))
|
||||
theme.webfont_import += "\n" + "\n".join(webfont_import)
|
||||
for wfimport in webfont_import:
|
||||
theme.css = theme.css.replace(wfimport, "")
|
||||
|
||||
theme.css = frappe.get_jenv().from_string(theme.css)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue