Skip to content

Commit

Permalink
Merge pull request #407 from Netcentric/NCBIZ001-webperformance-impro…
Browse files Browse the repository at this point in the history
…vements

Ncbiz001 webperformance improvements
  • Loading branch information
nc-andreashaller authored Aug 6, 2024
2 parents bfffa3a + 0e4d006 commit ef76713
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
8 changes: 0 additions & 8 deletions blocks/cards/cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -276,14 +276,6 @@
grid-template-columns: 1fr 1fr;
}

.cards.teaser.background > ul > li > div:nth-last-child(2) {
width: 45%;
}

.cards.teaser.background > ul > li > div:last-child {
width: 45%;
}

.cards.teaser > ul > li {
display: grid;
grid-gap: 30px;
Expand Down
4 changes: 4 additions & 0 deletions blocks/cards/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function decorate(block) {
/* change to ul, li */
const ul = document.createElement('ul');
[...block.children].forEach((row) => {
const linkName = row.querySelector('h5 a')?.getAttribute('title');
const li = document.createElement('li');
li.innerHTML = row.innerHTML;
[...li.children].forEach((div) => {
Expand All @@ -35,6 +36,9 @@ export default function decorate(block) {
li.classList.add(`cards-card-bg-${div.textContent}`);
} else if (div.children.length === 1 && div.querySelector('picture')) {
div.className = 'cards-card-image';
if (linkName) {
div.querySelector('a')?.setAttribute('title', linkName);
}
} else {
div.className = 'cards-card-body';
}
Expand Down
1 change: 1 addition & 0 deletions blocks/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export default async function decorate(block) {
searchButton.type = 'submit';
searchButton.className = 'search-submit';
searchButton.appendChild(searchIcon);
searchButton.setAttribute('aria-label', window.placeholders?.default?.search || 'Search');
searchForm.appendChild(searchButton);
searchForm.addEventListener('submit', (e) => {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions blocks/leader-profiles/leader-profiles.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
.leader-profiles .leader-profile-image img {
display: block;
height: 100%;
object-fit: cover;
}

.leader-profiles .leader-profile-heading {
Expand Down
9 changes: 5 additions & 4 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,17 @@
--c-mid-blue: #6aa2dc;
--c-mid-plum: #7373d8;
--c-mid-gray: #97999b;
--c-mid-darkblue: #2f78c4;
--c-midnight-blue: #000048; /* cognizant color */
--c-mid-teal: #26efe9;
--c-red: #b81f2d;
--c-yellow: #e9c71d;
--c-white: #fff;

/* social colors */
--twitter: #1d9bf0;
--facebook: #3b5998;
--linked-in: #007bb5;
--twitter: #2f78c4;
--facebook: #2e308e;
--linked-in: #000048;
--git: #24292e;
--rss: #f26522;
--youtube: #c4302b;
Expand Down Expand Up @@ -520,7 +521,7 @@ main .section.light-blue h5 {
}

main .section.mid-blue {
background-color: var(--c-mid-blue);
background-color: var(--c-mid-darkblue);
color: var(--bg-text-mid-blue);
}

Expand Down

0 comments on commit ef76713

Please sign in to comment.