Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync costco figo changes to stage - update eligibility rule #293

Merged
merged 42 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
aaec9fa
24PW: New Template - Paid Blog (#219)
hero-dokane Oct 3, 2024
b65b41b
24PW: Pawpack Page - EDS Build (#215)
hero-dokane Oct 3, 2024
68d13c8
Merge remote-tracking branch 'origin/stage' into develop
BaDos Oct 3, 2024
643de65
Added Shipping of Tag to the summary page (#221)
BaDos Oct 4, 2024
e00a58f
24PW: Pawpack Page - EDS Build - QA Feedback (#222)
hero-dokane Oct 7, 2024
07d5622
Merge branch stage into develop
hero-dokane Oct 7, 2024
31f4da7
WIP on bugfix/mobile-nav-redirect-visibility (#224)
hero-dokane Oct 7, 2024
2392032
24PW: Pet Insurance - Aggregator Widget (#225)
pgilmore-phi Oct 8, 2024
ba35c4d
Revert decorateButtons function, apply callout cta styling (#226)
hero-dokane Oct 8, 2024
66e50df
Adding thank you page dataLayer object (#230)
pgilmore-phi Oct 11, 2024
47026d2
Back sync develop with main (#234)
pgilmore-phi Oct 15, 2024
d2a50c3
Merge feature pm 568 abandon cart changes into develop for testing (#…
pgilmore-phi Oct 15, 2024
95e36b9
Feature pm 568 abandon cart: update species ID ternary condition (#237)
pgilmore-phi Oct 15, 2024
eafd2e3
Salesforce Abandoned Cart: refactored payload (#239)
pgilmore-phi Oct 16, 2024
4bceb66
Salesforce Abandoned Cart: Add upsert on thank you page (#241)
pgilmore-phi Oct 17, 2024
00210f0
Added condition to load paid blog header fragment based on paid blog …
pgilmore-phi Oct 17, 2024
08b8290
wrap tracking data inside ecommerce object (#242)
pgilmore-phi Oct 17, 2024
0117118
dataLayer updates: add currency to purchase event (#243)
pgilmore-phi Oct 18, 2024
07bddf7
Update header logo svg file and sizes in CSS (#245)
Mao8a Oct 22, 2024
50f61d7
Sync to Dev: Feature/pm 563 dl add to cart (#251)
hero-dokane Oct 23, 2024
2d02414
Sync to DEV: Updating purchase event DL with new requirements (#252)
pgilmore-phi Oct 23, 2024
4ef1344
Sync to DEV: Ensuring shipping value is returned as a number type in …
pgilmore-phi Oct 23, 2024
6dfb171
GitHub pull request template update (#259)
hero-dokane Oct 24, 2024
67c43e1
Sync to DEV: PM -564 Cart Summary DL events (#262)
pgilmore-phi Oct 25, 2024
b9f0286
Sync to Dev: Feature/pm 563 dl add to cart (#263)
hero-dokane Oct 25, 2024
4f0ea78
Feature/pm 573 logo size on header-only-logo (#254)
Mao8a Oct 28, 2024
bb9d1e3
Sync to Dev: Feature/pm 563 dl add to cart - step 2 (#265)
hero-dokane Oct 28, 2024
a06757f
Remove pet tags cookie on thank you page (#266)
hero-dokane Oct 28, 2024
e26de26
Merge branch 'stage' into develop
pgilmore-phi Oct 28, 2024
79fc474
Merge remote-tracking branch 'origin/main' into develop
pgilmore-phi Oct 29, 2024
7aaa492
PM-639 Update 'add to cart' DL product type values (#269) (#270)
pgilmore-phi Oct 30, 2024
6d933e8
Release/sprint 22 fast follow (#272)
pgilmore-phi Oct 30, 2024
a869cec
Merge remote-tracking branch 'origin/main' into develop
pgilmore-phi Oct 31, 2024
cef3bf6
WIP on bugfix/PM-637-ca-pet-tags (#275)
hero-dokane Nov 5, 2024
6b9a875
Sync Release/Sprint 23 to Develop (#279)
hero-dokane Nov 13, 2024
774b2ad
Merge remote-tracking branch 'origin/main' into develop
pgilmore-phi Nov 15, 2024
76a4238
PM-375: Costco Figo Promotion (#283)
pgilmore-phi Nov 21, 2024
32894e1
PM-375: Costco Figo Promotion (#283) (#285)
pgilmore-phi Nov 21, 2024
9233d74
PM-367: Update to SUBID value for COSTCO FIGO (#288)
pgilmore-phi Nov 25, 2024
3ff0fb5
Merge branch 'develop' into release/costco-figo-promotion
pgilmore-phi Nov 25, 2024
9b7ef71
Merge branch 'stage' into release/costco-figo-promotion
pgilmore-phi Nov 25, 2024
352746a
PM-375: Costco Figo Promotion - update eligibility rules (#291)
pgilmore-phi Nov 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert decorateButtons function, apply callout cta styling (#226)
  • Loading branch information
hero-dokane authored Oct 8, 2024
commit ba35c4d11177cc6d512ccdd44c65bf66389f95b8
22 changes: 1 addition & 21 deletions scripts/lib-franklin.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,25 +619,11 @@ export function decorateButtons(element) {
a.title = a.title || a.textContent;
if (a.href !== a.textContent) {
const up = a.parentElement;
const down = a.firstElementChild;
const twoup = a.parentElement.parentElement;
if (!a.querySelector('img')) {
if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV') && twoup.parentElement.className !== 'mega-nav' && twoup.parentElement.parentElement.className !== 'login') {
a.className = 'button'; // default
up.classList.add('button-container');
if (a.childElementCount === 1 && down.tagName === 'STRONG') {
a.classList.add('cta');
a.innerHTML = down.innerHTML;
} else if (a.childElementCount === 1 && down.tagName === 'EM') {
a.classList.add('secondary');
a.innerHTML = down.innerHTML;
} else {
a.classList.add('primary');
}
}
if (up.childNodes.length === 1 && up.tagName === 'STRONG'
&& twoup.childNodes.length === 1 && twoup.tagName === 'P') {
a.className = 'button cta';
a.className = 'button primary';
twoup.classList.add('button-container');
}
if (up.childNodes.length === 1 && up.tagName === 'EM'
Expand All @@ -648,12 +634,6 @@ export function decorateButtons(element) {
}
}
});
// If we have several primary buttons after one other
// then just add them to the same container
document.querySelectorAll('.button-container + .button-container').forEach((c) => {
c.previousElementSibling.append(c.firstElementChild);
c.remove();
});
}

/**
Expand Down
30 changes: 25 additions & 5 deletions templates/paid-blog-page/paid-blog-page.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,30 @@
line-height: 1.5;
color: #333;
}

h2 + p {
margin: 0;
}

a {
font-family: var(--body-font-family);
display: block;
box-sizing: border-box;
text-decoration: none;
border: 2px solid transparent;
padding: .875rem 1.625rem;
text-align: center;
font-style: normal;
font-weight: 600;
cursor: pointer;
color: var(--background-color);
background-color: var(--button-primary-color);
margin: 16px 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border-radius: .625rem;
}
}

@media (min-width: 768px) {
Expand Down Expand Up @@ -156,12 +180,8 @@
text-align: left;
}

.button-container {
a {
margin: 0 0 0 auto;
}

a.button {
margin: 0;
width: auto;
}
}
Expand Down
Loading