Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clock in SpecialReportAlt card #25992

Closed
wants to merge 9 commits into from
33 changes: 24 additions & 9 deletions common/app/views/fragments/items/facia_cards/meta.scala.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
@import model.pressed.SpecialReportAlt
@(item: layout.ContentCard)(implicit request: RequestHeader)

@import views.support.GuDateFormatLegacy



<div class="fc-item__meta js-item__meta">
@for(publishedAt <- item.webPublicationDate; timeStampDisplay <- item.timeStampDisplay) {
<time class="fc-item__timestamp@if(timeStampDisplay.javaScriptUpdate){ js-item__timestamp}"
datetime="@publishedAt.toString("yyyy-MM-dd'T'HH:mm:ssZ")"
data-timestamp="@publishedAt.getMillis"
data-relativeformat="short">
@fragments.inlineSvg("clock", "icon")
<span class="fc-timestamp__text">
<span class="u-h">Published: </span>@GuDateFormatLegacy(publishedAt, timeStampDisplay.formatString)
</span>
</time>
@if(item.cardStyle == SpecialReportAlt) {
<time class="fc-item__timestamp_dark@if(timeStampDisplay.javaScriptUpdate) { js-item__timestamp}"
datetime="@publishedAt.toString("yyyy-MM-dd'T'HH:mm:ssZ")"
data-timestamp="@publishedAt.getMillis"
data-relativeformat="short">
@fragments.inlineSvg("clock", "icon")
<span class="fc-timestamp__text">
<span class="u-h">Published: </span>@GuDateFormatLegacy(publishedAt, timeStampDisplay.formatString)
</span>
</time>
} else {
<time class="fc-item__timestamp@if(timeStampDisplay.javaScriptUpdate) { js-item__timestamp}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to do else here?

datetime="@publishedAt.toString("yyyy-MM-dd'T'HH:mm:ssZ")"
data-timestamp="@publishedAt.getMillis"
data-relativeformat="short">
@fragments.inlineSvg("clock", "icon")
<span class="fc-timestamp__text">
<span class="u-h">Published: </span>@GuDateFormatLegacy(publishedAt, timeStampDisplay.formatString)
</span>
</time>
}
}
</div>
13 changes: 13 additions & 0 deletions static/src/stylesheets/module/facia-garnett/_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,19 @@ $block-height: 58px;
svg {
height: 11px;
width: 11px;

}
}

.fc-item__timestamp_dark .inline-icon {
height: 11px;
width: 11px;
margin-top: 1px;

svg {
height: 11px;
width: 11px;
fill: $special-report-alt-dark;
}
}

Expand Down
10 changes: 3 additions & 7 deletions static/src/stylesheets/module/facia-garnett/_pillars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,14 @@ $pillars: (
}
}

background-color: $special-report-alt-faded !important;
background-color: $special-report-alt-faded;

.fc-item__container.u-faux-block-link--hover {
background-color: $special-report-alt-faded !important;
background-color: darken($special-report-alt-faded, 2%);

.fc-item__timestamp,
.fc-trail__count--commentcount {
background-color: $special-report-alt-dark !important;
background-color: transparent;
}
}

Expand Down Expand Up @@ -483,10 +483,6 @@ $pillars: (
}
}

.fc-item__container.u-faux-block-link--hover {
background-color: darken($special-report-alt-faded, 2%);
}

.fc-sublink__kicker {
color: $special-report-alt-dark;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@
}

.fc-item__headline {
color: #ffffff;
@if $pillar == special-report-alt {
color: $color2;
} @else {
color: #ffffff;
}
}

.fc-item__standfirst {
color: #ffffff;
@if $pillar == special-report-alt {
color: $color2;
} @else {
color: #ffffff;
}
}

.fc-item__meta {
Expand All @@ -39,7 +47,11 @@
}

.fc-sublink__link {
color: #ffffff;
@if $pillar == special-report-alt {
color: $color2;
} @else {
color: #ffffff;
}
}

.fc-sublink__kicker {
Expand All @@ -48,9 +60,15 @@

// darken on hover
.u-faux-block-link--hover {
background-color: darken($color1, 5%);
@if $pillar == special-report-alt {
background-color: darken($color1, 2%);
} @else {
background-color: darken($color1, 5%);
}

.fc-item__kicker::before {
@if $pillar == special-report-alt {
background-color: darken($color1, 2%);
} @else {
background-color: darken($color1, 5%);
}
}
Expand Down Expand Up @@ -82,3 +100,4 @@
@include overide-live-blog-colours(sport, $sport-dark, $sport-pastel);
@include overide-live-blog-colours(arts, $culture-dark, $culture-pastel);
@include overide-live-blog-colours(lifestyle, $lifestyle-dark, $lifestyle-pastel);
@include overide-live-blog-colours(special-report-alt, $special-report-alt-faded, $special-report-alt-dark);
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
color: $special-report-alt-dark;
}

&:hover,
.u-faux-block-link--hover {
background-color: darken($special-report-alt-faded, 2%);
}

.fc-sublink__link {
color: $special-report-alt-dark;
}
Expand Down