Skip to content

Commit

Permalink
Merge pull request #535 from hlxsites/534-topics-page-h3-seen-as-h2
Browse files Browse the repository at this point in the history
Featured Image component in Topics - h3 seen as h2
  • Loading branch information
davenichols-DHLS authored Dec 4, 2023
2 parents 016fd9f + 8f07c53 commit db2a157
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/actions/convert/test/fixtures/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@

<div class="featureimage">

<feature-image textwidth="_self" title="Key Takeaway Text Example:" titlesize="xl" titleheading="h1" description="&lt;p>The most important thing to consider for your experiment is keeping your sample alive and healthy during sample preparation and imaging. Thus, it is critical to maintain the sample in an environment that resembles as closely as possible physiological conditions, i.e., temperature, pH, oxygen levels, and other important factors.&lt;/p>
<feature-image textwidth="_self" title="Key Takeaway Text Example:" titlesize="xl" titleheading="h2" description="&lt;p>The most important thing to consider for your experiment is keeping your sample alive and healthy during sample preparation and imaging. Thus, it is critical to maintain the sample in an environment that resembles as closely as possible physiological conditions, i.e., temperature, pH, oxygen levels, and other important factors.&lt;/p>
" descsize="tbase" btnnewtab="_self">
</feature-image>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tools/actions/convert/test/fixtures/blog6.html
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@

<div class="featureimage">

<feature-image textwidth="_self" title="Key Takeaway Text Example:" titlesize="xl" titleheading="h1" description="&lt;p>The most important thing to consider for your experiment is keeping your sample alive and healthy during sample preparation and imaging. Thus, it is critical to maintain the sample in an environment that resembles as closely as possible physiological conditions, i.e., temperature, pH, oxygen levels, and other important factors.&lt;/p>
<feature-image textwidth="_self" title="Key Takeaway Text Example:" titlesize="xl" titleheading="h2" description="&lt;p>The most important thing to consider for your experiment is keeping your sample alive and healthy during sample preparation and imaging. Thus, it is critical to maintain the sample in an environment that resembles as closely as possible physiological conditions, i.e., temperature, pH, oxygen levels, and other important factors.&lt;/p>
" descsize="tbase" btnnewtab="_self">
</feature-image>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tools/actions/convert/test/fixtures/product-topic.html
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@

<div class="featureimage">

<feature-image textwidth="_self" title="Key Takeaway Text Example:" titlesize="xl" titleheading="h1" description="&lt;p>The most important thing to consider for your experiment is keeping your sample alive and healthy during sample preparation and imaging. Thus, it is critical to maintain the sample in an environment that resembles as closely as possible physiological conditions, i.e., temperature, pH, oxygen levels, and other important factors.&lt;/p>
<feature-image textwidth="_self" title="Key Takeaway Text Example:" titlesize="xl" titleheading="h2" description="&lt;p>The most important thing to consider for your experiment is keeping your sample alive and healthy during sample preparation and imaging. Thus, it is critical to maintain the sample in an environment that resembles as closely as possible physiological conditions, i.e., temperature, pH, oxygen levels, and other important factors.&lt;/p>
" descsize="tbase" btnnewtab="_self">
</feature-image>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tools/actions/convert/test/fixtures/product1.html
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ <h1 class="text-gray-900 my-2 font-semibold text-xl pt-0 pb-0">PRODUCT SPOTLIGHT

<div class="featureimage">

<feature-image textwidth="_self" title="Intabio ZT System" titlesize="xxxl" titleheading="h1" description="&lt;p>Comprehensive charge variant analysis made simple. The Intabio ZT system couples icIEF separation and UV detection with high resolution mass spectrometry on the ZenoTOF 7600 system&lt;/p>
<feature-image textwidth="_self" title="Intabio ZT System" titlesize="xxxl" titleheading="h2" description="&lt;p>Comprehensive charge variant analysis made simple. The Intabio ZT system couples icIEF separation and UV detection with high resolution mass spectrometry on the ZenoTOF 7600 system&lt;/p>
" descsize="txl" btntext="Learn More" btnhref="https://stage.lifesciences.danaher.com/us/en/products/family/intabio-zt-systems.html" btnnewtab="_self">
</feature-image>
</div>
Expand Down
3 changes: 2 additions & 1 deletion tools/importer/transformers/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export const mapTable = (table, document) => {
export const featureimage = (featureImg, document) => {
const featureImageEL = featureImg?.querySelector('feature-image');
if (featureImageEL?.getAttribute('title')) {
const title = document.createElement('h2');
const headingTag = featureImageEL?.getAttribute('titleheading');
const title = headingTag ? document.createElement(headingTag) : document.createElement('h2');
title.textContent = featureImageEL.getAttribute('title');
featureImg.append(title);
}
Expand Down

0 comments on commit db2a157

Please sign in to comment.