Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Sm1pleScr1pt committed Oct 8, 2024
2 parents e4a396a + 3eec819 commit 5c96623
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 32 deletions.
37 changes: 25 additions & 12 deletions blocks/carousel/carousel.css
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@
right: 0;
}

.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .short-description>h1,
.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .short-description>p {
display: none
}
Expand Down Expand Up @@ -455,6 +454,20 @@
background-repeat: no-repeat;
}

.section.banner-carousel-wrapper .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .long-description>h1,
.section.banner-carousel-wrapper .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .long-description>h1>strong {
color: var(--black);
font-family: "Nunito-Extrabold", sans-serif;
font-size: 3rem;
font-weight: 800;
line-height: 60px;
margin-bottom: 16px;
}

.section.banner-carousel-wrapper .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .long-description>h1>strong {
display: block;
}

@media (min-width:1024px) and (max-width:1366px) {
.section.banner-carousel-wrapper .carousel-wrapper .panel-container .teaser.block>.background .front-picture img {
width: 312px;
Expand Down Expand Up @@ -694,6 +707,13 @@
.section.banner-carousel-wrapper .carousel-wrapper .carousel .panel-container .teaser.carousel-item.slide-background-light-blue {
background-image: url("/images/banner2-background-image-mobile.png");
}

.section.banner-carousel-wrapper .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .long-description>h1,
.section.banner-carousel-wrapper .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .long-description>h1>strong {
font-size: 1.5rem;
line-height: 32px;
margin-bottom: unset;
}
}

@media screen and (max-width:767px) {
Expand Down Expand Up @@ -732,19 +752,10 @@
.section.banner-carousel-wrapper.self-employed-banner .carousel-wrapper .panel-container .teaser.block>.background .front-picture {
right: 10px;
}
.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .short-description>h1,
.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .short-description>p {
display: block;
}

.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .short-description>h1 {
color: var(--black);
font-family: "Nunito-Extrabold", sans-serif;
font-size: 1.5rem;
font-weight: 800;
line-height: 32px;
margin: unset;
}
.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .short-description>p {
color: var(--gradient-gray);
font-family: "Nunito-Regular", sans-serif;
Expand All @@ -753,8 +764,6 @@
line-height: 20px;
margin-top: 12px;
}
.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block>.background .foreground .text .title>h1,
.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block>.background .foreground .text .eyebrow,
.section.banner-carousel-wrapper.business-loan-mob-text-banner .carousel-wrapper .panel-container .teaser.block.teaser-block-six>.background .foreground .text .long-description>p {
display: none;
}
Expand All @@ -779,6 +788,10 @@
.section.banner-carousel-wrapper.breadcrumb-container.breadcrumb-handle-scroll .carousel-wrapper .panel-container .teaser.block>.background .foreground .text {
padding-top: 40px;
}

.section.banner-carousel-wrapper .carousel-wrapper .panel-container .teaser.block.carousel-heading-inline-mob>.background .foreground .text .long-description>h1>strong {
display: inline;
}
}

@media (min-width: 768px) and (max-width: 1024px) {
Expand Down
1 change: 1 addition & 0 deletions blocks/footer/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ footer.footer-wrapper .footer {
.footer-section-second ul > li > ul > li>a,
.footer-section-second ul > li > ul > li>a>sub{
font-size: 1rem;
line-height: 1.5rem;
color: #fff;
margin-top: 0.5rem;
font-family: "Nunito-Regular";
Expand Down
3 changes: 2 additions & 1 deletion blocks/keyfeatures/keyfeatures.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
padding-left: 16px;
}

.section.home-loans-products-wrapper .homeloanteaser .keyfeature-container .keyfeatures .feature .feature-details div p:first-child{
.section.home-loans-products-wrapper .homeloanteaser .keyfeature-container .keyfeatures .feature .feature-details div p:first-child,
.section.home-loans-products-wrapper .homeloanteaser .keyfeature-container .keyfeatures .feature .feature-details div p {
color: #666;
font-family: Nunito-Regular, sans-serif;
font-size: 0.875rem;
Expand Down
Empty file.
30 changes: 30 additions & 0 deletions blocks/schema-tag/schema-tag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export default function decorate(block) {
// document.head += (block.textContent);

// const schema = {
// "@context": "https://schema.org",
// "@type": "Organization",
// "name": "Apply for a Home loan online with Piramal Finance 1 ",
// "url": "https://www.piramalfinance.com/",
// "logo": "/",
// "contactPoint": {
// "@type": "ContactPoint",
// "telephone": "1800-266-9777",
// "contactType": "customer service",
// "areaServed": "IN",
// "availableLanguage": "en"
// },
// "sameAs": [
// "https://www.facebook.com/pf",
// "https://twitter.com/pf",
// "https://www.instagram.com/pf/",
// "https://www.youtube.com/pfInsurance",
// "https://www.linkedin.com/company/pf"
// ]
// }
const script = document.createElement('script')
script.type = "application/ld+json";
script.innerHTML = block.textContent;
block.innerHTML = '';
document.head.append(script)
}
12 changes: 6 additions & 6 deletions blocks/teaser/teaser.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ export function generateTeaserDOM(props, classes) {
teaserDOM?.querySelectorAll("a").forEach(function (el, index) {
el.addEventListener("click", function (e) {
try {
if(!e.target.closest(".calc-desktop-carousel-wrapper")){
if (index || e.target.closest(".cta")) {
bannerClick(e.target.innerText, targetObject.pageName);
if (!e.target.closest(".calc-desktop-carousel-wrapper")) {
if (index || e.target.closest(".cta")) {
bannerClick(e.target.innerText, targetObject.pageName);
}
} else if (this.closest('.carousel-articles-wrapper')) {
readMoreAnalytics(e);
Expand All @@ -136,13 +136,13 @@ export function generateTeaserDOM(props, classes) {
data.click_text = e.target.closest('.long-description').querySelector('p').textContent.trim();
data.cta_position = e.target.closest('.section').querySelector('.tab-name-wrapper .carousel-inner .active').textContent.trim();
ctaClickInteraction(data);
} else if(e.target.closest(".calc-desktop-carousel-wrapper")){
} else if (e.target.closest(".calc-desktop-carousel-wrapper")) {
let data = {};
data.click_text =e.target.closest(".text").querySelector(".long-description p").textContent.trim();
data.click_text = e.target.closest(".text").querySelector(".long-description p").textContent.trim();
data.cta_position = e.target.closest('.section').querySelector('.default-content-wrapper').textContent.trim();
ctaClickInteraction(data);
}
else {
else {
applyLoanNow(
eyebrow.textContent.trim() + " " + title.textContent.trim(),
targetObject.pageName,
Expand Down
15 changes: 15 additions & 0 deletions component-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,21 @@
}
}
}
},
{
"title": "Schema Tag",
"id": "schema-tag",
"plugins": {
"xwalk": {
"page": {
"resourceType": "core/franklin/components/block/v1/block",
"template": {
"name": "Schema Tag",
"model": "schema-tag"
}
}
}
}
}
]
}
Expand Down
1 change: 1 addition & 0 deletions component-filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"testimonial",
"financialreports",
"faq",
"schema-tag",
"offer-documents",
"carousel",
"teaser",
Expand Down
17 changes: 16 additions & 1 deletion component-models.json
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,10 @@
{
"name": "video-component-carousel",
"value": "video-component-carousel"
},
{
"name": "carousel-heading-inline-mob",
"value": "carousel-heading-inline-mob"
}
]
},
Expand Down Expand Up @@ -2746,5 +2750,16 @@
"label": "URL Text"
}
]
},
{
"id": "schema-tag",
"fields": [
{
"component": "text",
"valueType": "string",
"name": "schema-tag",
"label": "Schema Tag"
}
]
}
]
]
24 changes: 12 additions & 12 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ function decorateImageIcons(element, prefix = '') {
let { href } = anchor;
let imageName = '';

if(href.includes('/play.google.com-s/')){
if (href.includes('/play.google.com-s/')) {
anchor.href = href.replace('play.google.com-s', "play.google.com");
}else if(href.includes('/apps.apple.com-s/')){
} else if (href.includes('/apps.apple.com-s/')) {
anchor.href = href.replace('apps.apple.com-s', "apps.apple.com");
}else if (href.includes('play.google.com')) {
} else if (href.includes('play.google.com')) {
imageName = 'playstore';
} else if (href.includes('apps.apple.com')) {
imageName = 'appstore';
Expand Down Expand Up @@ -855,7 +855,7 @@ export function showingStateCity(searchInputAll) {
eachLi.classList.remove("dp-none");
});
});
}
}

setTimeout(() => {
try {
Expand Down Expand Up @@ -907,7 +907,7 @@ function renderSchema() {
const schema = {
"@context": "https://schema.org",
"@type": "Organization",
"name": "Apply for a Home loan online with Piramal Finance ",
"name": "Apply for a Home loan online with Piramal Finance 1 ",
"url": "https://www.piramalfinance.com/",
"logo": "/",
"contactPoint": {
Expand All @@ -932,26 +932,26 @@ function renderSchema() {
}
renderSchema();

export function getDay(){
export function getDay() {
const date = new Date();
const daysOfWeek = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const currentDayOfWeek = daysOfWeek[date.getDay()];
return currentDayOfWeek
}


export function branchURLStr(location = "", city = "", state = "", urlstrhand, locationcode = ""){
export function branchURLStr(location = "", city = "", state = "", urlstrhand, locationcode = "") {
let locationAdd = location?.replace(/\s+/g, "-").replace(/[()/]/g, "").trim().toLowerCase();
let cityStr = city?.replace(/\s+/g, "-").replace(/[()/]/g, "").trim().toLowerCase();
let stateStr = state?.replace(/\s+/g, "-").replace(/[()/]/g, "").trim().toLowerCase();
if(urlstrhand == "shorthand"){
if (urlstrhand == "shorthand") {
return `/branch-locator/${stateStr}/${cityStr}`;
}else if(urlstrhand == "shorthandstate"){
} else if (urlstrhand == "shorthandstate") {
return `/branch-locator/${stateStr}`;
}else if(urlstrhand == "loans"){
if(locationAdd == cityStr){
} else if (urlstrhand == "loans") {
if (locationAdd == cityStr) {
return `/branch-locator/loans-in-${cityStr}-${stateStr}-${locationcode}`;
}else{
} else {
return `/branch-locator/loans-in-${locationAdd}-${cityStr}-${stateStr}-${locationcode}`;
}
}
Expand Down

0 comments on commit 5c96623

Please sign in to comment.