-
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.
- Loading branch information
1 parent
2b65b00
commit 0442d80
Showing
25 changed files
with
497 additions
and
125 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 |
---|---|---|
@@ -1,97 +1,26 @@ | ||
export const ConfigVariables = { | ||
"tenantLogo": "assets/school/GEMS.svg", | ||
"siteName": "Garhwal English Medium", | ||
"siteByLine": "Listen, Learn & Grow !!!", | ||
"splashImage": "assets/school/GEMS.jpeg", | ||
"headerFilters": [{ | ||
"defaultFilter": { | ||
"id": "All", | ||
"label": "All", | ||
"query": "", | ||
"filters": "All" | ||
}, | ||
"additionalFilters": [ | ||
{ | ||
"id": "Stories", | ||
"label": "Stories", | ||
"query": "Stories", | ||
"filters": "Stories" | ||
}, | ||
{ | ||
"id": "Activities", | ||
"label": "Activities", | ||
"query": "Activities", | ||
"filters": "Activities" | ||
}, | ||
{ | ||
"id": "Songs", | ||
"label": "Songs", | ||
"query": "Songs", | ||
"filters": "Songs" | ||
}, | ||
{ | ||
"id": "Audio Books", | ||
"label": "Audio Books", | ||
"query": "Audio Books", | ||
"filters": "Audio Books" | ||
}, | ||
{ | ||
"id": "Handbooks", | ||
"label": "Handbooks", | ||
"query": "Handbooks", | ||
"filters": "Handbooks" | ||
}, | ||
] | ||
}], | ||
"languages": [ | ||
{ | ||
"id": "en", | ||
"label": "English", | ||
"default": false | ||
}, | ||
{ | ||
"id": "hi", | ||
"label": "हिंदी", | ||
"default": true | ||
} | ||
], | ||
// "apiEndPoint": "/dsep/search", | ||
// "bookmark": "BookMark", | ||
// "rating": "Rating", | ||
// "share": "Share", | ||
// "pagination": "10", | ||
// "orderBy": "", | ||
// "filterBy": "default", | ||
"footerText": "Developed with ❤️ by Tekdi Technologies ", | ||
"headerColor": "brown", | ||
"headerFontSize": "16", | ||
"footerColor": "brown", | ||
"footerFontSize": "16", | ||
// "positionByLine": "false", | ||
// "positionLogo": "false", | ||
// "positionSiteName": "false", | ||
// "labelTitle": "शीर्षक", | ||
// "labelAuthor": "लेखक", | ||
// "labelDesc": "Desc", | ||
// "labelRating": "Rating", | ||
// "displayOrder": { | ||
// "title": "3", | ||
// "author": "1", | ||
// "description": "2", | ||
// "publisher": "4" | ||
// }, | ||
// "filters": { | ||
// "minAge": "", | ||
// "language": "", | ||
// "contentType": "" | ||
// }, | ||
// "searchFilters":{ | ||
// "age":["1","2","3","4","5","6","7","8","9","10"], | ||
// "language":["English","Hindi","Gujarati","Tamil","Kannada"], | ||
// "type":["Video","Audio","Read","Others"] | ||
// }, | ||
// "contentSource":{ | ||
// "source":["onest","SB"] | ||
// }, | ||
// "logo": "photo-1492144534655-ae79c964c9d71699539070789.avif" | ||
} | ||
// config.ts | ||
const urlObj = new URL(document.baseURI); | ||
const hostname = urlObj.hostname; // e.g., "subdomain.example.com" | ||
const domainParts = hostname.split('.'); | ||
console.log(domainParts); | ||
const jsonFilename = domainParts[0] + '.json'; | ||
const jsonUrl = `../assets/appConfig/${jsonFilename}`; | ||
// const jsonUrl = `../assets/appConfig/localhost.json`; | ||
|
||
console.log(`Fetching configuration from: ${jsonUrl}`); | ||
|
||
export const ConfigVariables = fetch(jsonUrl) | ||
.then(response => { | ||
console.log({ response }); | ||
if (!response.ok) { | ||
throw new Error('Network response was not ok'); | ||
} | ||
return response.json(); | ||
}) | ||
.then(data => { | ||
console.log('Fetched data:', data); | ||
return data; // Return the fetched data so that it can be used by other parts of the application | ||
}) | ||
.catch(error => { | ||
console.error('There was a problem with the fetch operation:', error); | ||
}); |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<ion-content [fullscreen]="true" class="splash-screen"> | ||
<div class="splash-screen_box"> | ||
<img [src]=(configVariables.splashImage) alt="Pitara box" class="pitara-box"> | ||
<img [src]=(configVariables?.splashImage) alt="Pitara box" class="pitara-box"> | ||
</div> | ||
<div class="footer-img"> | ||
<h3>{{configVariables.siteName}}</h3> | ||
<h3>{{configVariables?.siteName}}</h3> | ||
</div> | ||
</ion-content> | ||
</ion-content> |
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
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,63 @@ | ||
{ | ||
"tenantLogo": "assets/school/GEMS.svg", | ||
"siteName": "Garhwal English Medium", | ||
"siteByLine": "Listen, Learn & Grow !!!", | ||
"splashImage": "assets/school/GEMS.jpeg", | ||
"headerFilters": [{ | ||
"defaultFilter": { | ||
"id": "All", | ||
"label": "All", | ||
"query": "", | ||
"filters": "All" | ||
}, | ||
"additionalFilters": [ | ||
{ | ||
"id": "Stories", | ||
"label": "Stories", | ||
"query": "Stories", | ||
"filters": "Stories" | ||
}, | ||
{ | ||
"id": "Activities", | ||
"label": "Activities", | ||
"query": "Activities", | ||
"filters": "Activities" | ||
}, | ||
{ | ||
"id": "Songs", | ||
"label": "Songs", | ||
"query": "Songs", | ||
"filters": "Songs" | ||
}, | ||
{ | ||
"id": "Audio Books", | ||
"label": "Audio Books", | ||
"query": "Audio Books", | ||
"filters": "Audio Books" | ||
}, | ||
{ | ||
"id": "Handbooks", | ||
"label": "Handbooks", | ||
"query": "Handbooks", | ||
"filters": "Handbooks" | ||
} | ||
] | ||
}], | ||
"languages": [ | ||
{ | ||
"id": "en", | ||
"label": "English", | ||
"default": false | ||
}, | ||
{ | ||
"id": "hi", | ||
"label": "हिंदी", | ||
"default": true | ||
} | ||
], | ||
"footerText": "Developed with ❤️ by Tekdi Technologies ", | ||
"headerColor": "brown", | ||
"headerFontSize": "16", | ||
"footerColor": "brown", | ||
"footerFontSize": "16" | ||
} |
Oops, something went wrong.