Skip to content

Commit a8d4968

Browse files
Harshitsoni2000dhslove
authored andcommitted
Added JS Script to pick Favicon, Title from config file (apache#7418)
1 parent ef2df64 commit a8d4968

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

ui/public/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"logo": "assets/ablestack-logo.png",
1616
"minilogo": "assets/mini-ablestack-logo.png",
1717
"banner": "assets/ablestack-logo.png",
18+
"loginPageTitle": "ABLESTACK",
19+
"loginPageFavicon": "assets/ablestack-logo.png",
1820
"error": {
1921
"403": "assets/403.png",
2022
"404": "assets/404.png",

ui/public/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<meta http-equiv="X-UA-Compatible" content="IE=edge">
2424
<meta name="viewport" content="width=device-width,initial-scale=1.0">
2525
<link id="favicon" rel="icon" href="<%= BASE_URL %>ablestack.png">
26-
<title>Mold-ABLESTACK</title>
26+
<title id="title" >Mold-ABLESTACK</title>
2727
<style>
2828
.loader {
2929
border: 16px solid #F3F3F3;
@@ -54,4 +54,12 @@
5454
<div class="loader"></div>
5555
</div>
5656
</body>
57+
<script type="text/javascript">
58+
fetch('./config.json')
59+
.then(response => response.json())
60+
.then(data => {
61+
document.getElementById("favicon").setAttribute("href", data.loginPageFavicon);
62+
document.getElementById("title").innerHTML = data.loginPageTitle;
63+
}).catch((err) => {});
64+
</script>
5765
</html>

0 commit comments

Comments
 (0)