MDL-63830 block_myoverview: text colour course names
authorBas Brands <bas@moodle.com>
Mon, 5 Nov 2018 15:03:54 +0000 (16:03 +0100)
committerBas Brands <bas@moodle.com>
Wed, 7 Nov 2018 10:23:26 +0000 (11:23 +0100)
Using same card HTMl for recently accessed courses

blocks/myoverview/templates/view-list.mustache
blocks/recentlyaccessedcourses/templates/view-cards.mustache
theme/boost/scss/moodle/blocks.scss
theme/boost/style/moodle.css
theme/bootstrapbase/less/moodle/blocks.less
theme/bootstrapbase/style/moodle.css

index 41b17a7..6661455 100644 (file)
@@ -43,7 +43,7 @@
             <div class="{{#hasprogress}}col-md-6 span6{{/hasprogress}}{{^hasprogress}}col-md-11 span11{{/hasprogress}} d-flex align-items-center">
                 <div class="d-block">
                     {{> core_course/favouriteicon }}
-                    <a href="{{viewurl}}">
+                    <a href="{{viewurl}}" class="coursename">
                         <span class="sr-only">{{#str}}aria:coursename, core_course{{/str}}</span>
                         {{{fullname}}}
                     </a>
index 9e223da..31a6bc0 100644 (file)
 <div class="card-deck dashboard-card-deck" role="list">
     {{#courses}}
         <div class="card dashboard-card" role="listitem">
-            <a href="{{viewurl}}" title="{{fullname}}">
-                <div class="card-img-top dashboard-card-img" style='background-image: url("{{{courseimage}}}");'>
+            <a href="{{viewurl}}" tabindex="-1">
+                <div class="card-img dashboard-card-img" style='background-image: url("{{{courseimage}}}");'>
                     <span class="sr-only">{{#str}}aria:courseimage, core_course{{/str}}</span>
                 </div>
-                <div class="card-body pr-1 course-info-container">
-                    <div class="d-flex">
-                        <div class="card-title d-inline-block text-truncate">
-                            {{> core_course/favouriteicon }}
-                            {{{fullname}}}
-                        </div>
+            </a>
+            <div class="card-body pr-1 course-info-container" id="course-info-container-{{id}}-{{uniqid}}">
+                <div class="d-flex align-items-start">
+                    <div class="card-title mb-0 mr-2">
+                        {{> core_course/favouriteicon }}
+                        <a href="{{viewurl}}" class="coursename">
+                            <span class="sr-only">{{#str}}aria:coursename, core_course{{/str}}</span>
+                            {{#shortentext}}40, {{{fullname}}} {{/shortentext}}
+                        </a>
                     </div>
                 </div>
-            </a>
+            </div>
         </div>
     {{/courses}}
 </div>
\ No newline at end of file
index fd93275..50adc9a 100644 (file)
@@ -104,7 +104,7 @@ $card-gutter : $card-deck-margin * 2;
     .card .coursemenubtn {
         margin-top: -0.5rem;
     }
-    a,
+    a.coursename,
     .btn-link {
         color: inherit;
     }
index 1493841..f5408d2 100644 (file)
@@ -11165,7 +11165,9 @@ div.editor_atto_toolbar button .icon {
 .block_recentlyaccessedcourses .icon {
   margin-right: 0; }
   .block_myoverview .icon.fa-star,
-  .block_starredcourses .icon.fa-star {
+  .block_starredcourses .icon.fa-star,
+  .block_recentlyaccesseditems .icon.fa-star,
+  .block_recentlyaccessedcourses .icon.fa-star {
     color: #1177d1; }
 
 .block_myoverview .card .coursemenubtn, .block_myoverview #page-enrol-users #filterform .coursemenubtn, #page-enrol-users .block_myoverview #filterform .coursemenubtn, .block_myoverview .que .history .coursemenubtn, .que .block_myoverview .history .coursemenubtn, .block_myoverview .userprofile .profile_tree section .coursemenubtn, .userprofile .profile_tree .block_myoverview section .coursemenubtn, .block_myoverview .groupinfobox .coursemenubtn, .block_myoverview .well .coursemenubtn,
@@ -11177,16 +11179,34 @@ div.editor_atto_toolbar button .icon {
 .block_starredcourses .userprofile .profile_tree section .coursemenubtn,
 .userprofile .profile_tree .block_starredcourses section .coursemenubtn,
 .block_starredcourses .groupinfobox .coursemenubtn,
-.block_starredcourses .well .coursemenubtn {
+.block_starredcourses .well .coursemenubtn,
+.block_recentlyaccesseditems .card .coursemenubtn,
+.block_recentlyaccesseditems #page-enrol-users #filterform .coursemenubtn,
+#page-enrol-users .block_recentlyaccesseditems #filterform .coursemenubtn,
+.block_recentlyaccesseditems .que .history .coursemenubtn,
+.que .block_recentlyaccesseditems .history .coursemenubtn,
+.block_recentlyaccesseditems .userprofile .profile_tree section .coursemenubtn,
+.userprofile .profile_tree .block_recentlyaccesseditems section .coursemenubtn,
+.block_recentlyaccesseditems .groupinfobox .coursemenubtn,
+.block_recentlyaccesseditems .well .coursemenubtn,
+.block_recentlyaccessedcourses .card .coursemenubtn,
+.block_recentlyaccessedcourses #page-enrol-users #filterform .coursemenubtn,
+#page-enrol-users .block_recentlyaccessedcourses #filterform .coursemenubtn,
+.block_recentlyaccessedcourses .que .history .coursemenubtn,
+.que .block_recentlyaccessedcourses .history .coursemenubtn,
+.block_recentlyaccessedcourses .userprofile .profile_tree section .coursemenubtn,
+.userprofile .profile_tree .block_recentlyaccessedcourses section .coursemenubtn,
+.block_recentlyaccessedcourses .groupinfobox .coursemenubtn,
+.block_recentlyaccessedcourses .well .coursemenubtn {
   margin-top: -0.5rem; }
 
-.block_myoverview a,
+.block_myoverview a.coursename,
 .block_myoverview .btn-link,
-.block_starredcourses a,
+.block_starredcourses a.coursename,
 .block_starredcourses .btn-link,
-.block_recentlyaccesseditems a,
+.block_recentlyaccesseditems a.coursename,
 .block_recentlyaccesseditems .btn-link,
-.block_recentlyaccessedcourses a,
+.block_recentlyaccessedcourses a.coursename,
 .block_recentlyaccessedcourses .btn-link {
   color: inherit; }
 
index 0873155..13cd0d0 100644 (file)
     .card .coursemenubtn {
         margin-top: -0.5rem;
     }
+    a.coursename {
+        color: @textColor;
+    }
 
     @media (max-width: 576px) {
         .summaryimage {
index d02b542..ec08a50 100644 (file)
@@ -16250,13 +16250,23 @@ body {
   max-width: 100%;
 }
 .block_starredcourses img.icon,
+.block_recentlyaccesseditems img.icon,
+.block_recentlyaccessedcourses img.icon,
 .block_myoverview img.icon {
   padding: 0;
 }
 .block_starredcourses .card .coursemenubtn,
+.block_recentlyaccesseditems .card .coursemenubtn,
+.block_recentlyaccessedcourses .card .coursemenubtn,
 .block_myoverview .card .coursemenubtn {
   margin-top: -0.5rem;
 }
+.block_starredcourses a.coursename,
+.block_recentlyaccesseditems a.coursename,
+.block_recentlyaccessedcourses a.coursename,
+.block_myoverview a.coursename {
+  color: #333;
+}
 @media (max-width: 576px) {
   .block_starredcourses .summaryimage,
   .block_recentlyaccesseditems .summaryimage,