Skip to content

Commit

Permalink
Merge pull request #7 from hlxsites/main-stage
Browse files Browse the repository at this point in the history
Merge "Main" from stage
  • Loading branch information
mhaack authored Dec 4, 2023
2 parents 610b1b1 + d726ef9 commit ec069a3
Show file tree
Hide file tree
Showing 91 changed files with 18,460 additions and 34,376 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/deploy-actions.yaml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/deploy-converter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy Converter

on:
pull_request:
paths:
- .github/workflows/deploy-converter.yaml
- tools/actions/**
- tools/importer/**
- tools/importer/transformers/**
- paths.yaml
- converter.yaml
- package-lock.json
push:
paths:
- .github/workflows/deploy-converter.yaml
- tools/actions/**
- tools/importer/**
- tools/importer/transformers/**
- paths.yaml
- converter.yaml
- package-lock.json
branches:
- main

jobs:
# undeploy action in the "convert" package with the name of the current branch
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npm run converter:build:prod
- run: npm run converter:deploy -- convert/${ACTION_NAME}
env:
ACTION_NAME: ${{ github.head_ref || github.ref_name }}
WSK_AUTH: ${{ secrets.WSK_AUTH }}
WSK_NAMESPACE: ${{ secrets.WSK_NAMESPACE }}
4 changes: 0 additions & 4 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ jobs:
with:
node-version: '18' #required for npm 8 or later.
- run: npm ci
- run: npm ci
working-directory: tools/actions/convert
- run: npm run lint
env:
CI: true
- run: npm run test
working-directory: tools/actions/convert
39 changes: 39 additions & 0 deletions .github/workflows/undeploy-converter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Undeploy Converter Branches

on:
schedule:
# every day at 00:00
- cron: '0 0 * * *'
push:
branches:
- main

jobs:
# undeploy any action in the "convert" package that is older then 5 days
undeploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npm run converter:undeploy -- convert github:open_pull_request
env:
WSK_AUTH: ${{ secrets.WSK_AUTH }}
WSK_NAMESPACE: ${{ secrets.WSK_NAMESPACE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion blocks/call-to-action/call-to-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { decorateModals } from '../../scripts/scripts.js';
export default function decorate(block) {
block.classList.add(...'ctasection mx-auto max-w-7xl pt-6 lg:py-8'.split(' '));
block.querySelector(':scope div > div').classList.add(...'md:flex space-y-8 md:space-y-0 md:flex-row w-full py-8 md:py-16 md:px-12 px-6 items-center md:justify-between bg-danaherpurple-800'.split(' '));
block.querySelector('h2')?.classList.add(...'text-2xl p-0 m-0 tracking-tight sm:text-3xl text-white font-normal tracking-wide'.split(' '));
block.querySelector('h2')?.classList.add(...'text-2xl p-0 m-0 tracking-tight sm:text-3xl text-white font-normal tracking-wide max-w-sm lg:max-w-2xl'.split(' '));
block.querySelectorAll('p > a').forEach((a) => {
a.classList.add(...'btn-outline-trending-brand text-lg rounded-full px-6 py-3 !no-underline'.split(' '));
if (a.href.includes('#request-quote')) {
Expand Down
9 changes: 5 additions & 4 deletions blocks/cards/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ import { makePublicUrl } from '../../scripts/scripts.js';

export default function decorate(block) {
/* change to ul, li */
const ulElement = ul({ class: 'list-none m-0 p-0 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6' });
const ulElement = ul({ class: 'list-none m-0 p-0 grid grid-cols-1 sm:grid-cols-2 gap-6' });
if (block.classList.contains('cols-4')) ulElement.classList.add('lg:grid-cols-4');
else ulElement.classList.add('lg:grid-cols-3');

[...block.children].forEach((row) => {
const heading = row.querySelector('h2');
heading.className = 'card-title text-gray-900 my-2 font-extrabold text-3xl py-2';
if (heading) heading.className = 'card-title text-gray-900 my-2 font-extrabold text-3xl py-2';
let readMoreLink = row.querySelector('a');
const cardWrapper = readMoreLink
? a({ href: makePublicUrl(readMoreLink.href), title: readMoreLink.title })
: div();
cardWrapper.className = 'card-wrapper flex flex-col col-span-1 mx-auto justify-center max-w-xl cursor-pointer relative transform transition duration-500 border hover:scale-105 shadow-lg rounded-lg overflow-hidden';
const card = li(heading, cardWrapper);
const card = li((heading) || '', cardWrapper);
cardWrapper.innerHTML = row.innerHTML;

[...cardWrapper.children].forEach((e) => {
Expand All @@ -30,7 +32,6 @@ export default function decorate(block) {
readMoreLink.className = 'card-link inline-flex w-full pt-5 text-base text-danaherblue-600 font-semibold';
card.querySelector('div.cards-card-body').append(readMoreLink);
}

ulElement.append(card);
});
ulElement.querySelectorAll('img').forEach((img) => {
Expand Down
7 changes: 5 additions & 2 deletions blocks/hero/hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ const buildVideoModal = async (href) => {
};

export default function decorate(block) {
block.parentElement.parentElement.classList.add('!p-0');
block.parentElement.classList.add('!max-w-[unset]');
const parent = block.parentElement;
parent.parentElement.classList.add('!p-0');
parent.parentElement.querySelector('h1')?.classList.add('hidden');
parent.classList.add('!max-w-[unset]');

const picture = block.querySelector('picture');
const pictureWrapper = picture.parentElement;
const content = block.querySelector('div > div > div:nth-child(2)');
Expand Down
20 changes: 20 additions & 0 deletions blocks/mini-teasers/mini-teasers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { decorateModals } from '../../scripts/scripts.js';

export default function decorate(block) {
block.parentNode.prepend(document.createElement('hr'));
block.classList.add(...'grid max-w-7xl w-full mx-auto gap-6 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 px-4 sm:px-0 my-16'.split(' '));
[...block.children].forEach((element) => {
element.classList.add(...'items-start mr-20 lg:mr-40'.split(' '));
element.querySelector('img')?.classList.add('py-1');
element.querySelector('h3')?.classList.add(...'text-lg p-0 my-1 sm:text-lg font-medium'.split(' '));
const link = element.querySelector('a');
if (link) {
link.innerHTML += ' ->';
link.classList.add(...'text-sm font-medium text-danaherpurple-500'.split(' '));
if (link.href.endsWith('#RequestAQuote')) link.classList.add('show-modal-btn');
}
});
block.parentNode.append(document.createElement('hr'));
block.parentNode.classList.add('py-6');
decorateModals(block);
}
12 changes: 12 additions & 0 deletions converter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# the origin to fetch content from
origin: https://author-p93411-e849552.adobeaemcloud.com/
suffix: ".html?wcmmode=disabled"
# the live urls of the content
# this is used to make absolute links to the urls domain reliatve
# it may be an array, if there are mutliple urls possible like
# - https://stage.example.com
# - https://www.example.com
# - https://example.com
liveUrls:
- https://stage.lifesciences.danaher.com
- https://lifesciences.danaher.com
2 changes: 1 addition & 1 deletion fragments/wesee.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2>We partner deep</h2>
expertise from Danaher Life Sciences’ entire ecosystem of engineering, science, and
technology innovators.
</p>
<a class="cta h-full" href="/us/en/expert.htm">Talk to an Expert</a>
<a class="cta h-full" href="/us/en/expert.html">Talk to an Expert</a>
</div>
<div class="img-rap rellax" data-rellax-speed="1" data-scroll data-animation="fadeInUp">
<picture>
Expand Down
3 changes: 3 additions & 0 deletions helix-query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ indices:
image:
select: head > meta[property="og:image"]
value: match(attribute(el, "content"), "^(https?:\/\/.*?(danaher.com))+(.*)|^(.*)")
brand:
select: head > meta[name="brand"]
value: attribute(el, "content")
type:
select: head > meta[name="template"]
value: attribute(el, "content")
Expand Down
Loading

0 comments on commit ec069a3

Please sign in to comment.