From 6305147e28659bb726f5e0c809173bbe85a5d901 Mon Sep 17 00:00:00 2001 From: Martin Leblanc <m26lebla@uwaterloo.ca> Date: Thu, 13 Mar 2025 15:19:42 -0400 Subject: [PATCH] ISTWCMS-5650: Add logic to hide nav when number is only 1 and 1 --- .../04-components/facts-and-figures/_facts-and-figures.scss | 6 ++++++ .../04-components/facts-and-figures/facts-and-figures.twig | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss b/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss index cbae0113..73eb58ad 100644 --- a/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss +++ b/src/patterns/04-components/facts-and-figures/_facts-and-figures.scss @@ -875,6 +875,9 @@ are the same height. */ visibility: hidden; } } + .uw-hide-ff-nav-all & { + visibility: hidden; + } bottom: -3.125rem; .dot { @@ -916,6 +919,9 @@ are the same height. */ visibility: hidden; } } + .uw-hide-ff-nav-all & { + visibility: hidden; + } button { background: var(--gray-2); color: var(--uw-black); diff --git a/src/patterns/04-components/facts-and-figures/facts-and-figures.twig b/src/patterns/04-components/facts-and-figures/facts-and-figures.twig index bd8434a0..1ae3a1fb 100644 --- a/src/patterns/04-components/facts-and-figures/facts-and-figures.twig +++ b/src/patterns/04-components/facts-and-figures/facts-and-figures.twig @@ -1,4 +1,4 @@ -<div id="uw-ff-{{ ffs.id }}" class="uw-ff {% if ffs.show %}uw-ff--with-bubbles uw-ff--with-bubbles__{{ ffs.bg_colour}}{% else%}uw-ff__{{ ffs.bg_colour}}{% endif %} {% if ffs.num_per_carousel == ffs.details|length %} uw-hide-ff-nav{% endif %} " data-carousel="{{ ffs.num_per_carousel ? 'yes' :'no' }}" data-num-per-carousel="{{ ffs.num_per_carousel }}" data-id="{{ ffs.id }}"> +<div id="uw-ff-{{ ffs.id }}" class="uw-ff {% if ffs.show %}uw-ff--with-bubbles uw-ff--with-bubbles__{{ ffs.bg_colour}}{% else%}uw-ff__{{ ffs.bg_colour}}{% endif %} {% if ffs.num_per_carousel == ffs.details|length %} uw-hide-ff-nav{% endif %} {% if ffs.num_per_carousel == '1' and ffs.details|length == '1'%} uw-hide-ff-nav-all {% endif %}" data-carousel="{{ ffs.num_per_carousel ? 'yes' :'no' }}" data-num-per-carousel="{{ ffs.num_per_carousel }}" data-id="{{ ffs.id }}"> <div class="uw-ff--wrapper uw-ff--wrapper__text-{{ ffs.text_align }} {{ ffs.num_per_carousel ? 'uw-ff--carousel' : 'uw-ff--no-carousel' }} {{ ffs.theme }}"> {% if ffs.num_per_carousel >= 1%} {% embed '@layouts/carousel/carousel.twig' %} -- GitLab