Skip to content

Commit

Permalink
Adjust section titles in grid and move 'title' attribute to cover who…
Browse files Browse the repository at this point in the history
…le grid box.
  • Loading branch information
gjb2048 committed Aug 19, 2024
1 parent bc5cb69 commit 4386040
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Version 404.1.1 - TBR
----------------------------
1. Use section anchors in links when editing.
2. Add badges to grid - #215.
3. Adjust section titles in grid and move 'title' attribute to cover whole grid box.

Version 404.1.0 - 11/04/2024
----------------------------
Expand Down
11 changes: 7 additions & 4 deletions templates/grid.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,24 @@
{{/sectionbreakheading}}
<div class="thegrid d-flex flex-wrap grid-justify-{{gridjustification}}">
{{/sectionbreak}}
<div id="section-{{number}}" class="grid-section card{{#iscurrent}} currentgridsection{{/iscurrent}}">
<div id="section-{{number}}" class="grid-section card{{#iscurrent}} currentgridsection{{/iscurrent}}" title="{{sectionname}}">
{{^popup}}
{{#hasbadge}}<div class="grid-section-inner">{{/hasbadge}}
{{^hasbadge}}<a class="grid-section-inner" href="{{sectionurl}}">{{/hasbadge}}
{{/popup}}
{{#popup}}
<div class="grid-modal grid-section-inner d-flex flex-column h-100 justify-content-between" data-toggle="modal" data-target="#gridPopup" data-section="{{number}}" tabindex="0">
{{/popup}}
<div class="card-header text-truncate h-100" title="{{sectionname}}">{{{sectionname}}}{{#hasbadge}}
<div class="card-header text-truncate h-100">
<h3 class="h4">{{{sectionname}}}</h3>
{{#hasbadge}}
<div data-region="sectionbadges" class="sectionbadges d-flex">
{{$ core_courseformat/local/content/section/badges }}
{{> core_courseformat/local/content/section/badges }}
{{/ core_courseformat/local/content/section/badges }}
</div>
{{/hasbadge}}</div>
{{/hasbadge}}
</div>
{{#imageuri}}
<div class="grid-image card-img-bottom text-center">
<img src="{{imageuri}}" alt="{{imagealttext}}" loading="lazy">
Expand Down Expand Up @@ -121,7 +124,7 @@
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="gridPopupLabel">Section X</h5>
<h2 class="modal-title h4" id="gridPopupLabel">Section X</h2>
<button type="button" class="close" data-dismiss="modal" aria-label="{{#str}}close, form{{/str}}">
<span class="fa fa-times" aria-hidden="true"></span>
</button>
Expand Down

0 comments on commit 4386040

Please sign in to comment.