MDL-63988 core_my: always honour showshortname and summary heading
authorBas Brands <bas@moodle.com>
Wed, 28 Nov 2018 09:39:11 +0000 (10:39 +0100)
committerBas Brands <bas@moodle.com>
Wed, 28 Nov 2018 16:36:21 +0000 (17:36 +0100)
* make the summaryview heading semantically correct for boost where titles
are h5 and headings within the blocks should have h6
* style the heading to use h5
* add clean theme .h5 class for dashboard blocks

blocks/myoverview/templates/view-list.mustache
blocks/myoverview/templates/view-summary.mustache
theme/bootstrapbase/less/moodle/blocks.less
theme/bootstrapbase/style/moodle.css

index 1291301..0deb0b3 100644 (file)
         <div class="row-fluid">
             <div class="{{#hasprogress}}col-md-6 span6{{/hasprogress}}{{^hasprogress}}col-md-11 span11{{/hasprogress}} d-flex align-items-center">
                 <a href="{{viewurl}}" class="coursename">
-                    <span class="sr-only">
-                        {{#str}}aria:courseshortname, core_course{{/str}}
-                    </span>
-                    <div class="text-muted muted">
-                        {{{shortname}}}
-                    </div>
+                    {{#showshortname}}
+                        <span class="sr-only">
+                            {{#str}}aria:courseshortname, core_course{{/str}}
+                        </span>
+                        <div class="text-muted muted">
+                            {{{shortname}}}
+                        </div>
+                    {{/showshortname}}
                     {{> core_course/favouriteicon }}
                     <span class="sr-only">
                         {{#str}}aria:coursename, core_course{{/str}}
index b2b640c..1c95a2d 100644 (file)
             <div class="align-self-stretch d-flex flex-column w-100">
                 <div class="d-flex mb-1">
                     <a href="{{viewurl}}" class="coursename">
-                        <span class="sr-only">
-                            {{#str}}aria:courseshortname, core_course{{/str}}
-                        </span>
-                        <div class="h5 mb-0 text-muted muted">
-                            {{{shortname}}}
-                        </div>
+                        {{#showshortname}}
+                            <span class="sr-only">
+                                {{#str}}aria:courseshortname, core_course{{/str}}
+                            </span>
+                            <div class="text-muted muted mb-1">
+                                {{{shortname}}}
+                            </div>
+                        {{/showshortname}}
                         {{> core_course/favouriteicon }}
                         <span class="sr-only">
                             {{#str}}aria:coursename, core_course{{/str}}
                         </span>
-                        <h4 class="d-inline mb-2">{{{fullname}}}</h4>
+                        <h6 class="d-inline h5">{{{fullname}}}</h4>
                     </a>
                     {{> block_myoverview/course-action-menu }}
                 </div>
index c117749..a942d21 100644 (file)
     a.coursename {
         color: @textColor;
     }
+    .h5 {
+        font-size: round(@baseFontSize * 1.15); // ~16px
+    }
 }
 
 .dashboard-card-deck.one-row {
index 3e9c6ae..84cab09 100644 (file)
@@ -16391,6 +16391,9 @@ body {
 .block .block-cards a.coursename {
   color: #333;
 }
+.block .block-cards .h5 {
+  font-size: 16px;
+}
 .dashboard-card-deck.one-row {
   flex-flow: nowrap;
   overflow-x: scroll;