Skip to content

Commit

Permalink
Improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Sep 7, 2024
1 parent d21c8c3 commit 97d972d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 30 deletions.
8 changes: 8 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,18 @@
width: 210px;
}

.format-grid .thegrid .grid-section.card {
border-width: 2px;
}

.format-grid .thegrid .grid-section.currentgridsection {
border: 2px solid var(--primary);
}

.format-grid .thegrid .grid-section-inner .card-body {
min-height: 0;
}

.format-grid .thegrid .grid-image-container {
height: 140px;
min-height: 140px;
Expand Down
60 changes: 30 additions & 30 deletions templates/grid.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -98,39 +98,39 @@
{{/hasbadge}}{{/sectionbadgeingridbox}}
</div>
{{/sectiontitleingridbox}}
<div class="grid-image-container">
{{#imageuri}}
<div class="grid-image text-center">
<img class="card-img-bottom{{^sectiontitleingridbox}} card-img-top{{/sectiontitleingridbox}}" src="{{imageuri}}" alt="{{imagealttext}}" loading="lazy">
{{^sectiontitleingridbox}}{{#sectionbadgeingridbox}}{{#hasbadge}}
<div data-region="sectionbadges" class="sectionbadges d-flex {{^sectioncompletionmarkup}}justify-content-center{{/sectioncompletionmarkup}}{{#sectioncompletionmarkup}}ml-2{{/sectioncompletionmarkup}} align-items-end grid-badge-bottom">
{{$ core_courseformat/local/content/section/badges }}
{{> core_courseformat/local/content/section/badges }}
{{/ core_courseformat/local/content/section/badges }}
</div>
{{/hasbadge}}{{/sectionbadgeingridbox}}{{/sectiontitleingridbox}}
{{#sectioncompletionmarkup}}{{{sectioncompletionmarkup}}}{{/sectioncompletionmarkup}}
</div>
{{/imageuri}}
{{#generatedimageuri}}
<div class="grid-generatedimage card-img-bottom{{^sectiontitleingridbox}} card-img-top{{/sectiontitleingridbox}} text-center" style="background-image: url('{{generatedimageuri}}');">
{{^sectiontitleingridbox}}{{#sectionbadgeingridbox}}{{#hasbadge}}
<div data-region="sectionbadges" class="sectionbadges d-flex justify-content-center align-items-center h-100">
{{$ core_courseformat/local/content/section/badges }}
{{> core_courseformat/local/content/section/badges }}
{{/ core_courseformat/local/content/section/badges }}
</div>
{{/hasbadge}}{{/sectionbadgeingridbox}}{{/sectiontitleingridbox}}
{{#sectioncompletionmarkup}}{{{sectioncompletionmarkup}}}{{/sectioncompletionmarkup}}
</div>
<div class="grid-image-container">
{{#imageuri}}
<div class="grid-image text-center">
<img class="card-img-bottom{{^sectiontitleingridbox}} card-img-top{{/sectiontitleingridbox}}" src="{{imageuri}}" alt="{{imagealttext}}" loading="lazy">
{{^sectiontitleingridbox}}{{#sectionbadgeingridbox}}{{#hasbadge}}
<div data-region="sectionbadges" class="sectionbadges d-flex {{^sectioncompletionmarkup}}justify-content-center{{/sectioncompletionmarkup}}{{#sectioncompletionmarkup}}ml-2{{/sectioncompletionmarkup}} align-items-end grid-badge-bottom">
{{$ core_courseformat/local/content/section/badges }}
{{> core_courseformat/local/content/section/badges }}
{{/ core_courseformat/local/content/section/badges }}
</div>
{{/generatedimageuri}}
{{#imageerror}}
<div class="grid-image-error card-img-bottom{{^sectiontitleingridbox}} card-img-top{{/sectiontitleingridbox}} text-center">
<p><small>{{imageerror}}</small></p>
{{#sectioncompletionmarkup}}{{{sectioncompletionmarkup}}}{{/sectioncompletionmarkup}}
{{/hasbadge}}{{/sectionbadgeingridbox}}{{/sectiontitleingridbox}}
{{#sectioncompletionmarkup}}{{{sectioncompletionmarkup}}}{{/sectioncompletionmarkup}}
</div>
{{/imageuri}}
{{#generatedimageuri}}
<div class="grid-generatedimage card-img-bottom{{^sectiontitleingridbox}} card-img-top{{/sectiontitleingridbox}} text-center" style="background-image: url('{{generatedimageuri}}');">
{{^sectiontitleingridbox}}{{#sectionbadgeingridbox}}{{#hasbadge}}
<div data-region="sectionbadges" class="sectionbadges d-flex justify-content-center align-items-center h-100">
{{$ core_courseformat/local/content/section/badges }}
{{> core_courseformat/local/content/section/badges }}
{{/ core_courseformat/local/content/section/badges }}
</div>
{{/imageerror}}
{{/hasbadge}}{{/sectionbadgeingridbox}}{{/sectiontitleingridbox}}
{{#sectioncompletionmarkup}}{{{sectioncompletionmarkup}}}{{/sectioncompletionmarkup}}
</div>
{{/generatedimageuri}}
{{#imageerror}}
<div class="grid-image-error card-img-bottom{{^sectiontitleingridbox}} card-img-top{{/sectiontitleingridbox}} text-center">
<p><small>{{imageerror}}</small></p>
{{#sectioncompletionmarkup}}{{{sectioncompletionmarkup}}}{{/sectioncompletionmarkup}}
</div>
{{/imageerror}}
</div>
{{^popup}}
{{#notavailable}}</div>{{/notavailable}}
Expand Down

0 comments on commit 97d972d

Please sign in to comment.