-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(feat) U4X-732: Change login page image and logo to be configurable. (#…
…24)
- Loading branch information
Showing
7 changed files
with
170 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from "react"; | ||
import styles from "./login.scss"; | ||
import { useConfig } from "@openmrs/esm-framework"; | ||
const BackgroundWrapper = ({ children }) => { | ||
const config = useConfig(); | ||
|
||
return config?.loginBackgroundImage ? ( | ||
<> | ||
<img | ||
src={config?.loginBackgroundImage?.src} | ||
alt={config?.loginBackgroundImage?.alt || "Background Image"} | ||
className={styles.backgroundImage} | ||
/> | ||
<div className={styles.backgroundContainer}> | ||
<div className={styles.contentOverlay}>{children}</div> | ||
</div> | ||
</> | ||
) : ( | ||
<> | ||
<img | ||
src="/openmrs/spa/background.png" | ||
alt="Fallback Background" | ||
className={styles.backgroundImage} | ||
/> | ||
<div className={styles.backgroundContainer}> | ||
<div className={styles.contentOverlay}>{children}</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default BackgroundWrapper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.