Skip to content

Commit

Permalink
(#4464) Adding Analytics
Browse files Browse the repository at this point in the history
Closes #4464
  • Loading branch information
dev-rana-publicis authored and dlescarbeau committed Oct 23, 2024
1 parent 56b33c4 commit ac0e642
Show file tree
Hide file tree
Showing 7 changed files with 555 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,37 @@
langcode: en
status: 1
moderation_state:
value: 'published'
value: "published"
title: "Key Initiatives"
title__ES:
value: "Spanish Key Initiatives"
field_page_description:
value: "Learn about major research initiatives NCI has developed to address specific issues of high priority for the cancer research community."
field_page_description__ES:
value: "(Spanish translation) Learn about major research initiatives NCI has developed to address specific issues of high priority for the cancer research community."
field_browser_title:
value: "Key Initiatives"
field_browser_title__ES:
value: "Spanish Key Initiatives"
field_site_section:
- '#process':
callback: 'reference'
- "#process":
callback: "reference"
args:
- 'taxonomy_term'
- vid: 'cgov_site_sections'
computed_path: '/research/key-initiatives'
- "taxonomy_term"
- vid: "cgov_site_sections"
computed_path: "/research/key-initiatives"
field_site_section__ES:
- "#process":
callback: "reference"
args:
- "taxonomy_term"
- vid: "cgov_site_sections"
computed_path: "/spanish/research/key-initiatives"
field_mlp_page_style:
value: "ncids_default"
### English Contents
field_landing_contents:
######## Begin Feature Row ###########
######## Begin Feature Row ###########
- entity: "paragraph"
type: "ncids_page_title_block"
- entity: "paragraph"
Expand All @@ -38,19 +51,19 @@
value: |
<p>NCI is supporting foundational research undertaken through the Cancer Moonshot and launching new initiatives to build on those successes with the aim of achieving bold new goals.</p>
field_image_guide_card:
- '#process':
callback: 'file'
- "#process":
callback: "file"
args:
- 'image'
- type: 'module'
filename: 'wide-guide-card-image.png'
- "image"
- type: "module"
filename: "wide-guide-card-image.png"
field_three_link_buttons:
- entity: 'paragraph'
type: "ncids_link_button_external"
field_external_link:
- uri: 'https://www.cancer.gov/research/key-initiatives/moonshot-cancer-initiative/funding'
field_button_text:
- value: "See Funding Opportunities"
- entity: "paragraph"
type: "ncids_link_button_external"
field_external_link:
- uri: "https://www.cancer.gov/research/key-initiatives/moonshot-cancer-initiative/funding"
field_button_text:
- value: "See Funding Opportunities"
- entity: "paragraph"
type: "ncids_imageless_card_group"
field_container_heading:
Expand Down Expand Up @@ -98,32 +111,112 @@
- "node"
- type: "cgov_mini_landing"
title: "The RAS Initiative"
### Spanish Contents
field_landing_contents__ES:
######## Begin Feature Row ###########
- entity: "paragraph"
type: "ncids_page_title_block"
- entity: "paragraph"
type: "ncids_content_block"
field_html_content:
- format: "ncids_streamlined"
value: |
<p>(Spanish) NCI has worked to leverage its role as the leader of the National Cancer Program to expand our understanding of cancer and to translate new knowledge into better cancer prevention and treatment. Although the majority of NCI's funding supports investigator-initiated science, the institute also invests in major research initiatives to facilitate and support research on specific issues of importance to the cancer research enterprise.</p>
- entity: "paragraph"
type: "ncids_wide_guide_card"
field_container_heading:
- value: "Cancer Moonshot"
field_html_content:
- format: "simple"
value: |
<p>(Spanish) NCI is supporting foundational research undertaken through the Cancer Moonshot and launching new initiatives to build on those successes with the aim of achieving bold new goals.</p>
field_image_guide_card:
- "#process":
callback: "file"
args:
- "image"
- type: "module"
filename: "wide-guide-card-image.png"
field_three_link_buttons:
- entity: "paragraph"
type: "ncids_link_button_external"
field_external_link:
- uri: "https://www.cancer.gov/research/key-initiatives/moonshot-cancer-initiative/funding"
field_button_text:
- value: "(Spanish) See Funding Opportunities"
- entity: "paragraph"
type: "ncids_imageless_card_group"
field_container_heading:
- value: "(Spanish) The Optional Imageless Card Group Heading"
field_heading_visibility:
value: sr-only
field_card_layout_display:
- value: cgdp-imageless-card-group--two-card
field_row_cards_unlimited:
- entity: "paragraph"
type: "ncids_imageless_card_external"
field_override_card_title:
- value: "(Spanish) NCI Equity and Inclusion Program"
field_override_card_description:
- value: "(Spanish) Learn how NCI will help end structural racism in biomedical research and why the program was launched."
field_featured_url:
- uri: "https://www.cancer.gov/research/key-initiatives/nci-equity-inclusion-program"
- entity: "paragraph"
type: "ncids_imageless_card_external"
field_override_card_title:
- value: "(Spanish) NCI COVID-19 Research Initiatives"
field_override_card_description:
- value: "(Spanish) NCI is mobilizing its experts and resources to study COVID-19."
field_featured_url:
- uri: "https://www.cancer.gov/research/key-initiatives/covid-19"
- entity: "paragraph"
type: "ncids_imageless_card_external"
field_override_card_title:
- value: "(Spanish) Childhood Cancer Data Initiative (CCDI)"
field_override_card_description:
- value: "(Spanish) CCDI addresses the critical need to collect, analyze, and share childhood cancer data."
field_featured_url:
- uri: "https://www.cancer.gov/research/areas/childhood/childhood-cancer-data-initiative"
- entity: "paragraph"
type: "ncids_imageless_card_internal"
field_override_card_title:
- value: "(Spanish) The RAS Initiative"
field_override_card_description:
- value: "(Spanish) NCI's RAS Initiative explores innovative approaches for attacking the proteins encoded by mutant forms of the KRAS gene. "
field_featured_item:
- target_type: "node"
"#process":
callback: "reference"
args:
- "node"
- type: "cgov_mini_landing"
title: "The RAS Initiative"

- entity: "node"
type: "cgov_mini_landing"
langcode: en
status: 1
moderation_state:
value: 'published'
value: "published"
title: "NCIDS Imageless Card Test Page"
field_page_description:
value: "NCIDS Imageless Card Test Page - Page Description"
field_browser_title:
value: "NCIDS Imageless Card Test Page"
field_site_section:
- '#process':
callback: 'reference'
- "#process":
callback: "reference"
args:
- 'taxonomy_term'
- vid: 'cgov_site_sections'
computed_path: '/test'
- "taxonomy_term"
- vid: "cgov_site_sections"
computed_path: "/test"
field_pretty_url:
value: "ncids-imageless-card-test"
field_mlp_page_style:
value: "ncids_default"
### English Contents
field_landing_contents:
######## Begin Feature Row ###########
######## Begin Feature Row ###########
- entity: "paragraph"
type: "ncids_content_block"
field_html_content:
Expand Down Expand Up @@ -228,36 +321,36 @@
field_heading_visibility:
value: sr-only
field_row_cards:
- entity: 'paragraph'
- entity: "paragraph"
type: "ncids_feature_card_internal"
field_featured_item:
- target_type: "node"
"#process":
callback: "reference"
args:
- 'node'
- type: 'cgov_home_landing'
title: 'Cancer Research'
- entity: 'paragraph'
- "node"
- type: "cgov_home_landing"
title: "Cancer Research"
- entity: "paragraph"
type: "ncids_feature_card_internal"
field_featured_item:
- target_type: "node"
"#process":
callback: "reference"
args:
- 'node'
- type: 'cgov_home_landing'
title: 'Grants & Training'
- entity: 'paragraph'
- "node"
- type: "cgov_home_landing"
title: "Grants & Training"
- entity: "paragraph"
type: "ncids_feature_card_internal"
field_featured_item:
- target_type: "node"
"#process":
callback: "reference"
args:
- 'node'
- type: 'cgov_home_landing'
title: 'News & Events'
- "node"
- type: "cgov_home_landing"
title: "News & Events"
- entity: "paragraph"
type: "ncids_imageless_card_group"
field_container_heading:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import cgdpListInit from '../../lib/components/cgdp-list';
import cgdpSummaryBox from '../../lib/components/cgdp-summary-box';
import cgdpFlagCardGroupInit from '../../lib/components/cgdp-flag-card-group';
import cgdpWideGuideCard from '../../lib/components/cgdp-wide-guide-card';
import cgdpImagelessCardRow from '../../lib/components/cgdp-imageless-card-group';

const onDOMContentLoaded = () => {
// Init feature cards
Expand All @@ -32,6 +33,8 @@ const onDOMContentLoaded = () => {
cgdpFlagCardGroupInit();
// Init the wide guide card
cgdpWideGuideCard();
// Init the imageless card row
cgdpImagelessCardRow();
};

window.addEventListener('DOMContentLoaded', onDOMContentLoaded);
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export const cgdpImagelessCardRowBadDom = () => {
const div = document.createElement('div');

// language=HTML
div.innerHTML = `
<div class="usa-section cgdp-imageless-card-group" data-eddl-bad-landing-row="">
<div class="cgdp-imageless-card-group--two-card">
<h2 class="cgdp-imageless-card-group__heading usa-sr-only"></h2>
<ul>
<li class="nci-card">
<a href="https://www.google.com" aria-labelledby="paragraph-1525" data-eddl-landing-item="imageless_card" data-eddl-landing-item-link-type="External">
<div class="nci-card__body">
<span class="nci-card__title" id="paragraph-1525">Second Test of External Card with Longer Title</span>
<p class="nci-card__description">This is the second external card in the 2-Imageless Card layout.</p>
</div>
</a>
</li>
<li class="nci-card">
<a href="/about-cancer" aria-labelledby="paragraph-1527" data-eddl-landing-item="imageless_card" data-eddl-landing-item-link-type="Internal">
<div class="nci-card__body">
<span class="nci-card__title" id="paragraph-1527">This is an Override Title for About Cancer</span>
<p class="nci-card__description">This is a test of the internal card in the 2-Imageless Card layout.</p>
</div>
</a>
</li>
<li class="nci-card">
<a href="/about-nci/organization/nci-at-a-glance" aria-labelledby="paragraph-1526" data-eddl-landing-item="imageless_card" data-eddl-landing-item-link-type="">
<div class="nci-card__body">
<span class="nci-card__title" id="paragraph-1526">Test Multimedia Card</span>
<p class="nci-card__description">This is a test of the multimedia card in the 2-Imageless Card layout.</p>
</div>
</a>
</li>
</ul>
</div>
</div>
`;

return div;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
export const cgdpImagelessCardRowDom = () => {
const div = document.createElement('div');

// language=HTML
div.innerHTML = `
<div class="usa-section cgdp-imageless-card-group" data-eddl-landing-row="">
<div class="cgdp-imageless-card-group--two-card">
<h2 class="cgdp-imageless-card-group__heading usa-sr-only">The Optional Imageless Card Group Heading - two Card</h2>
<ul>
<li class="nci-card">
<a href="https://www.google.com" aria-labelledby="paragraph-1525" data-eddl-landing-item="imageless_card" data-eddl-landing-item-link-type="External">
<div class="nci-card__body">
<span class="nci-card__title--bad" id="paragraph-1525">Second Test of External Card with Longer Title</span>
<p class="nci-card__description--bad">This is the second external card in the 2-Imageless Card layout.</p>
</div>
</a>
</li>
<li class="nci-card">
<a href="/about-cancer" aria-labelledby="paragraph-1527" data-eddl-landing-item="imageless_card" data-eddl-landing-item-link-type="Internal">
<div class="nci-card__body">
<span class="nci-card__title--bad" id="paragraph-1527">This is an Override Title for About Cancer</span>
<p class="nci-card__description--bad">This is a test of the internal card in the 2-Imageless Card layout.</p>
</div>
</a>
</li>
<li class="nci-card">
<a href="/about-nci/organization/nci-at-a-glance" aria-labelledby="paragraph-1526" data-eddl-landing-item="imageless_card" data-eddl-landing-item-link-type="Media">
<div class="nci-card__body">
<span class="nci-card__title--bad" id="paragraph-1526">Test Multimedia Card</span>
<p class="nci-card__description--bad">This is a test of the multimedia card in the 2-Imageless Card layout.</p>
</div>
</a>
</li>
</ul>
</div>
</div>
`;

return div;
};
Loading

0 comments on commit ac0e642

Please sign in to comment.