Skip to content

Commit

Permalink
LandingPage : adding link on accordian
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel-Joseph-George committed Sep 25, 2023
1 parent c012ea8 commit 71de791
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 12 deletions.
8 changes: 4 additions & 4 deletions app/static/css/hugo-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11483,13 +11483,13 @@ textarea.form-control-lg {
}
}

@font-face {
/* @font-face {
font-family: 'SF Pro Display';
src: url("http://localhost:1313//fonts/SF-Pro-Display-Regular.otf") format("opentype");
font-weight: normal
}
} */

@font-face {
/* @font-face {
font-family: 'SF Pro Display';
src: url("http://localhost:1313//fonts/SF-Pro-Display-Semibold.otf") format("opentype");
font-weight: 600
Expand All @@ -11499,7 +11499,7 @@ textarea.form-control-lg {
font-family: 'SF Pro Display';
src: url("http://localhost:1313//fonts/SF-Pro-Display-Bold.otf") format("opentype");
font-weight: bold
}
} */

.fw-semibold {
font-weight: 600
Expand Down
34 changes: 31 additions & 3 deletions app/static/data/services.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
{
"cms": {
"title":"Content Management",
"content":"Effective content management is crucial for VachanOnline.com and the VachanGo app, the leading Scripture Engagement platform in Indian Languages. With a streamlined content management system, administrators can organize and distribute diverse resources, including commentaries, videos, audio bibles, and reading plans. This system facilitates seamless integration of new content and ensures a wide range of offerings in multiple Indian languages. It also enables efficient management of user-generated content, fostering an interactive community of users. Content management plays a pivotal role in maintaining a dynamic and enriching Scripture Engagement experience for users."
"content":"Effective content management is crucial for VachanOnline.com and the VachanGo app, the leading Scripture Engagement platform in Indian Languages. With a streamlined content management system, administrators can organize and distribute diverse resources, including commentaries, videos, audio bibles, and reading plans. This system facilitates seamless integration of new content and ensures a wide range of offerings in multiple Indian languages. It also enables efficient management of user-generated content, fostering an interactive community of users. Content management plays a pivotal role in maintaining a dynamic and enriching Scripture Engagement experience for users.",
"links":[
{
"link1":"https://vachanonline.com/",
"linkname1":"Vachan Online",
"button":"false"
},

{
"link2":"https://play.google.com/store/apps/details?id=com.bridgeconn.vachango&pli=1",
"linkname2":"Vachan Go",
"button":"false"
}
]
},
"translation": {
"title":"Translation APIs",
"content":"Translation APIs are primarily designed for text translation but are now also being experimented with for sign language translation. These APIs typically rely on vocabulary-based translation techniques and token replacement methods. They excel in handling very low-resource languages and languages that are closely related. Additionally, these APIs offer translation memory and context-aware suggestion capabilities, enhancing the quality and accuracy of translations. Whether it's cloud-based projects or local projects, these translation APIs can seamlessly integrate and support various implementation scenarios. Their versatility and capabilities make them valuable tools for enabling effective language translation in a wide range of applications."
"content":"Translation APIs are primarily designed for text translation but are now also being experimented with for sign language translation. These APIs typically rely on vocabulary-based translation techniques and token replacement methods. They excel in handling very low-resource languages and languages that are closely related. Additionally, these APIs offer translation memory and context-aware suggestion capabilities, enhancing the quality and accuracy of translations. Whether it's cloud-based projects or local projects, these translation APIs can seamlessly integrate and support various implementation scenarios. Their versatility and capabilities make them valuable tools for enabling effective language translation in a wide range of applications.",
"links":[
{
"link1":"https://isl.bridgeconn.com/",
"linkname1":"IntelliSign",
"button":false

}
]
},
"ai": {
"title":"AI APIs",
Expand All @@ -21,6 +42,13 @@
},
"microservices": {
"title":"Micro Services",
"content":"Vachan Engine microservices architecture is broken down into a set ofi ndependently functioning services, each serving a specific business capability. These services communicate with each other through well-defined APIs, typically using lightweight protocols such as HTTP or messaging systems."
"content":"Vachan Engine microservices architecture is broken down into a set of independently functioning services, each serving a specific business capability. These services communicate with each other through well-defined APIs, typically using lightweight protocols such as HTTP or messaging systems.",
"links":[
{
"link1":"https://miro.com/app/board/uXjVPGg6dwk=/%20",
"linkname1":"Microservices",
"button":"false"
}
]
}
}
49 changes: 45 additions & 4 deletions app/static/scripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,59 @@ window.onload = loadSeriveData();
const delay = ms => new Promise(res => setTimeout(res, ms));


// async function setServiceContent(serviceName) {
// await loadSeriveData();
// const currentData = serviceContent[serviceName]
// if (currentData){
// serviceHeader.innerText = currentData.title;
// serviceBody.innerText = currentData.content;
// } else{
// // failed to get data
// serviceBody.innerText = 'something went wrong! Failed to load data';
// }
// }

async function setServiceContent(serviceName) {
await loadSeriveData();
const currentData = serviceContent[serviceName]
if (currentData){
const currentData = serviceContent[serviceName];
if (currentData) {
serviceHeader.innerText = currentData.title;
serviceBody.innerText = currentData.content;
} else{

// Check if links exist in the JSON data
if (currentData.links && currentData.links.length > 0) {
const linkContainer = document.createElement('div');
linkContainer.classList.add('service-link-container');

// Iterate through the links and create anchor elements
currentData.links.forEach((linkData, index) => {
const linkElement = document.createElement('a');
linkElement.href = linkData[`link${index + 1}`]; // Access link1, link2, etc.
linkElement.target = "_blank"; // Opens link in a new tab
linkElement.innerText = linkData[`linkname${index + 1}`] || 'Learn More'; // Use linkname or default text
linkContainer.appendChild(linkElement);


if (index < currentData.links.length - 1) {
const separator = document.createElement('span');
separator.innerText = ' | ';
linkContainer.appendChild(separator);
}
});

linkContainer.style.marginTop = '10px'; // Adjust the value as needed


// Append the link container to the service card's body
serviceBody.appendChild(linkContainer);
}
} else {
// failed to get data
serviceBody.innerText = 'something went wrong! Failed to load data';
serviceBody.innerText = 'Something went wrong! Failed to load data.';
}
}


let lastClickedSection;

async function handleServiceClicked(serviceName) {
Expand Down
1 change: 0 additions & 1 deletion app/templates/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@


<link rel="mask-icon" href="http://localhost:1313/favicon.svg" color="">
<link rel="manifest" href="http://localhost:1313/site.webmanifest">



Expand Down

0 comments on commit 71de791

Please sign in to comment.