MDL-72790 block_timeline: Ensure overdue badge visible at all widths

This ensures on narrower screens, the activity title still truncates
but the overdue pill always remains visible where present. There is no
visual change where an item is not overdue, or on wider screens where
there is room to display the full content.
This commit is contained in:
Michael Hawkins
2021-11-24 14:09:57 +08:00
parent 1a75b75b52
commit 873262bbaa
@@ -56,13 +56,15 @@
{{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
</div>
<div class="event-name-container flex-grow-1 line-height-3 nowrap text-truncate">
<h6 class="event-name mb-0 pb-1 text-truncate">
<a href="{{url}}"
title="{{name}}"
aria-label='{{#cleanstr}} ariaeventlistitem, block_timeline, { "name": {{#quote}}{{{activityname}}}{{/quote}}, "course": {{#quote}}{{{course.fullnamedisplay}}}{{/quote}}, "date": "{{#userdate}} {{timesort}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}" } {{/cleanstr}}'>
{{{activityname}}}</a>
{{#overdue}}<span class="badge badge-pill badge-danger ml-1">{{#str}} overdue, block_timeline {{/str}}</span>{{/overdue}}
</h6>
<div class="d-flex">
<h6 class="event-name mb-0 pb-1 text-truncate">
{{#overdue}}<span class="badge badge-pill badge-danger ml-1 float-right">{{#str}} overdue, block_timeline {{/str}}</span>{{/overdue}}
<a href="{{url}}"
title="{{name}}"
aria-label='{{#cleanstr}} ariaeventlistitem, block_timeline, { "name": {{#quote}}{{{activityname}}}{{/quote}}, "course": {{#quote}}{{{course.fullnamedisplay}}}{{/quote}}, "date": "{{#userdate}} {{timesort}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}" } {{/cleanstr}}'>
{{{activityname}}}</a>
</h6>
</div>
<small class="mb-0">
{{#courseview}}
{{activitystr}}