From db87712c6342e9eeb8edc8afbc92b6abcc19d4b5 Mon Sep 17 00:00:00 2001 From: Hansolo1103 <87228155+Hansolo1103@users.noreply.github.com> Date: Wed, 28 Feb 2024 16:47:59 +0530 Subject: [PATCH 1/3] Updated grid.hbs issue #608 The grid.hbs file needed some tweaking for optimizing the grid system. --- components/layout/grid/grid.hbs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/components/layout/grid/grid.hbs b/components/layout/grid/grid.hbs index e785baec..bbf713ef 100644 --- a/components/layout/grid/grid.hbs +++ b/components/layout/grid/grid.hbs @@ -1,36 +1,36 @@
-
12 Columns
+
12 Columns
-
1: 9 Columns
-
2: 3 Columns
+
1: 9 Columns
+
2: 3 Columns
-
1: 8 Columns
-
2: 4 Columns
+
1: 8 Columns
+
2: 4 Columns
-
1: 7 Columns
-
2: 5 Columns
+
1: 7 Columns
+
2: 5 Columns
-
1: 6 Columns
-
2: 6 Columns
+
1: 6 Columns
+
2: 6 Columns
-
1: 4 Columns
-
2: 4 Columns
-
3: 4 Columns
+
1: 4 Columns
+
2: 4 Columns
+
3: 4 Columns
-
1: 3 Columns
-
2: 3 Columns
-
3: 3 Columns
-
4: 3 Columns
+
1: 3 Columns
+
2: 3 Columns
+
3: 3 Columns
+
4: 3 Columns
From 4026c5b5e68e7f9fe0e33231c0800ec045f14392 Mon Sep 17 00:00:00 2001 From: Hansolo1103 <87228155+Hansolo1103@users.noreply.github.com> Date: Sat, 2 Mar 2024 20:08:24 +0530 Subject: [PATCH 2/3] Update news-landing-page.hbs The {{new.title}} within the

tag will now be limited to 3 lines with an ellipsis. The department name {{new.position}} is now placed below the title within the

tag with the .news_position class. --- .../news-landing-page/news-landing-page.hbs | 130 +++++++++--------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/components/base/news/news-landing-page/news-landing-page.hbs b/components/base/news/news-landing-page/news-landing-page.hbs index 34d6acfa..60c9f2de 100644 --- a/components/base/news/news-landing-page/news-landing-page.hbs +++ b/components/base/news/news-landing-page/news-landing-page.hbs @@ -1,82 +1,82 @@
-
- {{> @section_header }} -
- {{#each news as |new|}} -
-
-
-
-
- - {{new.date}} - - +
+ {{> @section_header }} +
+ {{#each news as |new|}} +
+
+
+
+
+ + {{new.date}} + + -

- {{new.date}} -

+

+ {{new.date}} +

-
-
- {{new.title}} -
+
+
+ {{new.title}}
+
-
-

- {{new.title}} - {{new.position}} -

-
+
+

+ {{new.title}} + {{new.position}} +

+
-
-
-
-
-

{{new.description}}

-
+
+
+
+
+

{{new.description}}

+
-
-
-
- - Innovation and Technology - -
+
+
+
-
- {{/each}} -
-
+
+
+ {{/each}} +
+
From 47b1050a058ce663377fea41a4e55b73191b27b8 Mon Sep 17 00:00:00 2001 From: Hansolo1103 <87228155+Hansolo1103@users.noreply.github.com> Date: Sat, 2 Mar 2024 20:19:47 +0530 Subject: [PATCH 3/3] Update _news_card.styl Added .news_position span style for the department name to display below the title. Updated h3.title style to include: display: -webkit-box for multi-line ellipsis support. -webkit-line-clamp: 3 to limit the title to 3 lines. -webkit-box-orient: vertical to make the ellipsis appear vertically. overflow: hidden and text-overflow: ellipsis for handling overflow. --- stylesheets/components/news/_news_card.styl | 243 +++++++++++++++++++- 1 file changed, 239 insertions(+), 4 deletions(-) diff --git a/stylesheets/components/news/_news_card.styl b/stylesheets/components/news/_news_card.styl index 889e0330..37593df6 100644 --- a/stylesheets/components/news/_news_card.styl +++ b/stylesheets/components/news/_news_card.styl @@ -11,7 +11,7 @@ */ .news-card - position relative + position: relative background-color: $white max-height: 190px @@ -34,7 +34,7 @@ display: block h3.title - font-size: responsive 16px 26px + font-size: responsive 16px 26px font-style: italic font-family: "Lora", serif color: $optimistic-blue-dark @@ -45,23 +45,258 @@ font-weight: 400 overflow: hidden text-align: left + display: -webkit-box + -webkit-line-clamp: 3 + -webkit-box-orient: vertical + text-overflow: ellipsis @media $media-xlarge-max - font-size: responsive 18px 24px + font-size: responsive 18px 24px a display: inline-block text-transform: none - span + span.news_position display: block color: $body-text padding-top: 20px text-transform: uppercase + margin-top: 8px @media $media-xlarge display: none + &--thumb-wrapper + display: flex + + @media $media-xlarge-max + display: block + + img + min-width: 190px + + @media $media-xlarge-max + min-width: 100% + max-height: 230px + height: 230px + width: 100% + object-fit: cover + vertical-align: top + object-position: center + + .news-column + padding-top: 0px + + @media $media-xlarge-max + width: 100% + max-width: 100% + + .thumb-and-title + display: flex + justify-content: normal + + @media $media-xlarge-max + width: 100% + max-width: 100% + display: block + + .thumb-and-flag + //margin-right: 10px + + @media $media-small-max + flex-direction: column + + &--left + border: 0 + padding-left: 20px + padding-bottom: 20px + + @media $media-xlarge-max + height: 100% + min-height: 230px + padding-right: 20px + + &--right + display: inline-flex + padding-left: 1.5em + border-top: 0 + border-right: 0 + border-bottom: 0 + border-left: 1px + border-style: dashed + border-color: $grey-100 + + @media $media-large + display: block + + @media $media-xlarge-max + display: none + + &--left, &--right + padding-top: 20px + @media $media-small-max + padding: 10px 15px + + .optional-news-layout + display: flex + flex-direction: row + margin-right: 0 + + .icon-wrapper + display: inline-flex + min-width: 56px + margin-right: 0 + + @media $media-xlarge-max + display: block + + .di + margin: 0 + display: inline-flex + + .intro-text + color: $body-text + font-size: 16px + font-style: normal + font-family: "Lora", serif + line-height: 26px + margin: 0 10px 0 0 + overflow: hidden + + @media $media-xxlarge-max + max-height: 160px + line-height: 22px; + + p + margin: 0 +.news-card.g--12:nth-child(1n) + margin-right: 1rem + +.featured-news + height: 335px + max-height: 335px + overflow: hidden + + @media $media-xlarge-max + width: 100% + max-width: 100% + max-height: 100% + height: 100% + display: block + + h3.title + font-size: 28px + line-height: 35px + margin-bottom: 30px + + h3.title span + padding-top: 40px + + .news-column--right + padding-top: 2.5rem + padding-left: 2.5rem + border: none + + p + border-top: 1px dashed #e0e0e0 + padding-top: 30px + padding-bottom: 30px + width: 112% + font-size: 18px + line-height: 30px + + @media $media-xlarge-max + padding: 2rem + + .g--6 + margin-right: 0 + margin-left: 0 + max-height: inherit + + @media $media-xlarge-max + width: 100% + max-width: 100% + display: block + + .news-card--thumb-wrapper, .thumb-and-title + max-height: inherit + + img + min-width: 100% + object-fit: cover + @media $media-xlarge-max + max-height: 400px + height: inherit + display: block +/* + + NEWS + + Base: + news-card + + Modifier: + sm = small + +*/ + +.news-card + position: relative + background-color: $white + max-height: 190px + + @media $media-xlarge-max + max-height: 650px + width: 47% + max-width: 47% + margin-right: 1rem + + .g + display: block + + @media $media-medium-max + width: 100% + max-width: 100% + display: inline-block + height: 100% + + .g + display: block + + h3.title + font-size: responsive 16px 26px + font-style: italic + font-family: "Lora", serif + color: $optimistic-blue-dark + text-transform: none + letter-spacing: .4px + margin: 0 + line-height: 30px + font-weight: 400 + overflow: hidden + text-align: left + display: -webkit-box + -webkit-line-clamp: 3 + -webkit-box-orient: vertical + text-overflow: ellipsis + + @media $media-xlarge-max + font-size: responsive 18px 24px + + a + display: inline-block + text-transform: none + + span.news_position + display: block + color: $body-text + padding-top: 20px + text-transform: uppercase + margin-top: 8px + + @media $media-xlarge + display: none &--thumb-wrapper display: flex