Merge pull request #17006 from gavindsouza/splash-image-website-settings

feat(website-settings): Configurable Splash Image
This commit is contained in:
gavin 2022-05-30 20:30:23 +05:30 committed by GitHub
commit 6031339f89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -21,6 +21,7 @@
"website_theme_image_link",
"brand",
"banner_image",
"splash_image",
"brand_html",
"set_banner_from_image",
"favicon",
@ -413,6 +414,11 @@
"fieldname": "footer_powered",
"fieldtype": "Small Text",
"label": "Footer \"Powered By\""
},
{
"fieldname": "splash_image",
"fieldtype": "Attach Image",
"label": "Splash Image"
}
],
"icon": "fa fa-cog",
@ -420,7 +426,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
"modified": "2022-03-09 01:47:31.094462",
"modified": "2022-05-27 12:33:29.019998",
"modified_by": "Administrator",
"module": "Website",
"name": "Website Settings",
@ -445,4 +451,4 @@
"sort_order": "ASC",
"states": [],
"track_changes": 1
}
}

View file

@ -136,7 +136,7 @@ def get_website_settings(context=None):
}
)
settings = frappe.get_single("Website Settings")
settings: "WebsiteSettings" = frappe.get_single("Website Settings")
for k in [
"banner_html",
"banner_image",
@ -203,6 +203,9 @@ def get_website_settings(context=None):
context["hide_login"] = settings.hide_login
if splash_image := settings.splash_image or context.get("splash_image"):
context["splash_image"] = splash_image
return context