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

289 Adding link to Danaher Unified Search #290

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions blocks/header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ function createHeadingElement(input) {
return heading;
}

function createUnifiedElement(input) {
const unified = document.createElement('span');
unified.innerHTML = `Want to Search across all Life Sciences Companies of Danaher? <a href="https://lifesciences.danaher.com/us/en/danahersearch.html#q=${input}" target="_blank">Explore Danaher Unified Search</a>`;
unified.classList.add('search-unified');
return unified;
}

function createCountElement(resultsLength, total) {
const count = document.createElement('p');
count.className = 'search-info';
Expand Down Expand Up @@ -164,6 +171,9 @@ function createSearchResultsBlock(results, input, total) {
// Create GCSE box container
const gcseBox = createGcseBox();

// Create Unified Search element
const unified = createUnifiedElement(input);

// Create heading element
const heading = createHeadingElement(input);

Expand All @@ -173,6 +183,7 @@ function createSearchResultsBlock(results, input, total) {
// Append elements to the searchResultsBlock
const outer = gcseBox.querySelector('.mmg-gcse-outer');
outer.appendChild(heading);
outer.appendChild(unified);
outer.appendChild(count);

// Create individual result elements
Expand Down
12 changes: 12 additions & 0 deletions styles/gcse.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,18 @@ body.mmg-search-active {
padding: 40px 0
}

#mmg-gcse .search-unified {
display: block;
padding: 0 0 15px;
font-size: 16px;
color: white
}

#mmg-gcse .search-unified a {
font-size: 16px;
color: yellow
}

#mmg-gcse .search-title {
padding: 0 0 5px;
font-size: 32px;
Expand Down