Merge branch 'MDL-80397-main' of https://github.com/roland04/moodle

This commit is contained in:
Andrew Nicols 2024-04-03 12:53:03 +08:00
commit 14ca464910
No known key found for this signature in database
GPG key ID: 6D1E3157C8CFBF14
27 changed files with 267 additions and 438 deletions

View file

@ -1,3 +1,7 @@
/**
Blocks
*/
.blockmovetarget .accesshide {
position: relative;
left: initial;
@ -98,8 +102,6 @@ $blocks-plus-gutter: $blocks-column-width + ( $grid-gutter-width * 0.5 );
}
}
$card-gutter : $card-deck-margin * 2;
.block .empty-placeholder-image-lg {
height: 5rem;
}
@ -112,6 +114,10 @@ $card-gutter : $card-deck-margin * 2;
}
}
//
// Cards.
//
.block .block-cards {
.course-info-container {
padding: 0.8rem;
@ -146,81 +152,40 @@ $card-gutter : $card-deck-margin * 2;
border-radius: 50%;
}
}
.dashboard-card-deck.one-row {
flex-flow: nowrap;
overflow-x: scroll;
.card-grid {
display: flex;
.card {
flex: 1;
}
.drawercontent & .col,
.blockcolumn & .col {
flex: 0 0 auto;
max-width: 100%;
}
}
.summaryimage {
height: 5rem;
width: 5rem;
background-position: center;
background-size: cover;
.card-carousel {
display: flex;
.card {
flex: 1;
@include media-breakpoint-up(sm) {
flex: 0 1 auto;
width: 240px;
max-width: 100%;
}
}
}
.dashboard-list-img {
height: 5rem;
width: 20rem;
background-position: center;
background-size: cover;
@include media-breakpoint-down(lg) {
width: 100%;
.course-card,
.theme-card {
.card-img-top {
height: 7rem;
background-position: center;
background-size: cover;
}
}
.dashboard-card-deck {
.dashboard-card {
margin-bottom: $card-gutter;
flex-basis: auto;
width: 100%;
flex-grow: 0;
flex-shrink: 0;
.dashboard-card-img {
height: 7rem;
background-position: center;
background-size: cover;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.dashboard-card-footer {
padding: 0.8rem;
}
}
@include media-breakpoint-up(sm) {
&.fixed-width-cards {
.dashboard-card {
width: 300px;
max-width: 100%;
}
}
}
}
.dashboard-card-deck:not(.fixed-width-cards) {
@media (min-width: 576px) {
.dashboard-card {
width: calc(50% - #{$card-gutter});
}
}
@media (min-width: 840px) {
.dashboard-card {
width: calc(33.33% - #{$card-gutter});
}
}
}
#block-region-side-pre {
.dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0;
.dashboard-card {
width: calc(100% - #{$card-gutter}) !important;
@include media-breakpoint-down(xs) {
width: 100% !important;
}
}
}
}
//
// Block block_recentlyaccessedcourses
//
.block_recentlyaccessedcourses {
.paging-bar-container {
@ -228,14 +193,12 @@ $card-gutter : $card-deck-margin * 2;
padding-right: 0.5rem;
justify-content: flex-end;
}
@include media-breakpoint-down(xs) {
.paging-bar-container {
margin-top: 0;
}
}
}
#block-region-side-pre {
.block_recentlyaccessedcourses {
.paging-bar-container {
@ -244,26 +207,22 @@ $card-gutter : $card-deck-margin * 2;
}
}
//
// Block block_recentlyaccesseditems
//
.block_recentlyaccesseditems {
.activityiconcontainer {
width: 40px;
height: 40px;
}
aside[id^="block-region-side-"] & .dashboard-card-deck.one-row {
flex-flow: wrap;
overflow-x: hidden;
}
aside[id^="block-region-side-"] & .dashboard-card-deck .card:nth-of-type(n+4) {
aside[id^="block-region-side-"] & .card:nth-of-type(n+4) {
display: none;
}
#block-region-content & [data-region="more-items-button-container"] {
display: none;
}
a.dashboard-card {
a.card {
&:hover,
&:focus {
text-decoration: none;
@ -277,6 +236,10 @@ $card-gutter : $card-deck-margin * 2;
}
}
//
// Block block_myoverview
//
.block_myoverview {
.content {
min-height: 19.35rem;
@ -284,20 +247,42 @@ $card-gutter : $card-deck-margin * 2;
.paged-content-page-container {
min-height: 13rem;
}
.summary-image {
height: 5rem;
width: 5rem;
background-position: center;
background-size: cover;
}
.list-image {
height: 5rem;
width: 20rem;
background-position: center;
background-size: cover;
@include media-breakpoint-down(lg) {
width: 100%;
}
}
}
//
// Block block_timeline
//
.block_timeline {
.paged-content-page-container {
background-color: $list-group-bg;
}
}
.block_timeline {
.event-action {
padding-left: 5.55em;
}
}
//
// Blocks block_settings and block_navigation
//
// Show expand collapse with font-awesome.
.block_settings .block_tree [aria-expanded="true"],
.block_settings .block_tree [aria-expanded="true"].emptybranch,
@ -354,6 +339,10 @@ $card-gutter : $card-deck-margin * 2;
margin: 4px 0;
}
//
// Fake blocks
//
.pagelayout-embedded {
.has-fake-blocks {
padding: 1rem;

View file

@ -26961,6 +26961,9 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
background-color: #d7e4d6;
}
/**
Blocks
*/
.blockmovetarget .accesshide {
position: relative;
left: initial;
@ -27090,76 +27093,36 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
border-radius: 50%;
}
.dashboard-card-deck.one-row {
flex-flow: nowrap;
overflow-x: scroll;
.card-grid {
display: flex;
}
.card-grid .card {
flex: 1;
}
.drawercontent .card-grid .col, .blockcolumn .card-grid .col {
flex: 0 0 auto;
max-width: 100%;
}
.summaryimage {
height: 5rem;
width: 5rem;
background-position: center;
background-size: cover;
.card-carousel {
display: flex;
}
.dashboard-list-img {
height: 5rem;
width: 20rem;
background-position: center;
background-size: cover;
}
@media (max-width: 1199.98px) {
.dashboard-list-img {
width: 100%;
}
}
.dashboard-card-deck .dashboard-card {
margin-bottom: 0.5rem;
flex-basis: auto;
width: 100%;
flex-grow: 0;
flex-shrink: 0;
}
.dashboard-card-deck .dashboard-card .dashboard-card-img {
height: 7rem;
background-position: center;
background-size: cover;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.dashboard-card-deck .dashboard-card .dashboard-card-footer {
padding: 0.8rem;
.card-carousel .card {
flex: 1;
}
@media (min-width: 576px) {
.dashboard-card-deck.fixed-width-cards .dashboard-card {
width: 300px;
.card-carousel .card {
flex: 0 1 auto;
width: 240px;
max-width: 100%;
}
}
@media (min-width: 576px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(50% - 0.5rem);
}
}
@media (min-width: 840px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(33.33% - 0.5rem);
}
}
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0;
}
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(100% - 0.5rem) !important;
}
@media (max-width: 575.98px) {
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: 100% !important;
}
.course-card .card-img-top,
.theme-card .card-img-top {
height: 7rem;
background-position: center;
background-size: cover;
}
.block_recentlyaccessedcourses .paging-bar-container {
@ -27181,23 +27144,19 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
width: 40px;
height: 40px;
}
aside[id^=block-region-side-] .block_recentlyaccesseditems .dashboard-card-deck.one-row {
flex-flow: wrap;
overflow-x: hidden;
}
aside[id^=block-region-side-] .block_recentlyaccesseditems .dashboard-card-deck .card:nth-of-type(n+4) {
aside[id^=block-region-side-] .block_recentlyaccesseditems .card:nth-of-type(n+4) {
display: none;
}
#block-region-content .block_recentlyaccesseditems [data-region=more-items-button-container] {
display: none;
}
.block_recentlyaccesseditems a.dashboard-card:hover, .block_recentlyaccesseditems a.dashboard-card:focus {
.block_recentlyaccesseditems a.card:hover, .block_recentlyaccesseditems a.card:focus {
text-decoration: none;
}
.block_recentlyaccesseditems a.dashboard-card:hover h6, .block_recentlyaccesseditems a.dashboard-card:focus h6 {
.block_recentlyaccesseditems a.card:hover h6, .block_recentlyaccesseditems a.card:focus h6 {
text-decoration: underline;
}
.block_recentlyaccesseditems a.dashboard-card small {
.block_recentlyaccesseditems a.card small {
color: #1d2125;
}
@ -27207,6 +27166,23 @@ aside[id^=block-region-side-] .block_recentlyaccesseditems .dashboard-card-deck
.block_myoverview .paged-content-page-container {
min-height: 13rem;
}
.block_myoverview .summary-image {
height: 5rem;
width: 5rem;
background-position: center;
background-size: cover;
}
.block_myoverview .list-image {
height: 5rem;
width: 20rem;
background-position: center;
background-size: cover;
}
@media (max-width: 1199.98px) {
.block_myoverview .list-image {
width: 100%;
}
}
.block_timeline .paged-content-page-container {
background-color: #fff;

View file

@ -19,6 +19,8 @@ information provided here is intended especially for theme designers.
- g-variant and bg-gradient-variant
* Bootstrap `.form-group` helper class is no longer used, use margin utilities instead (´mb-3´, ...).
* Bootstrap `.form-inline` helper class is no longer used, use display utilities instead (`.d-flex.flex-wrap.align-items-center`).
* The `.dashboard-card` class has been removed in favour of `.course-card` and `theme-card`.
* Bootstrap `.card-deck` helper class is no longer used, use grid utility classes (row, row-cols, ...) instead.
=== 4.3 ===
* The $activity-iconcontainer-height and $activity-iconcontainer-width variables have been changed from 50px to 52px.

View file

@ -151,79 +151,13 @@
}
@media print {
#page-content .region-main, {
#page-content .region-main {
max-width: 100% !important; /* stylelint-disable-line declaration-no-important */
flex: 0 0 100% !important; /* stylelint-disable-line declaration-no-important */
padding: 0 1rem 0 !important; /* stylelint-disable-line declaration-no-important */
}
}
@include media-breakpoint-up(sm) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(50% - #{$card-gutter});
}
}
@include media-breakpoint-up(md) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(50% - #{$card-gutter});
}
.blocks-post,
.blocks-pre {
.dashboard-card-deck .dashboard-card {
width: calc(100% - #{$card-gutter});
}
}
}
@include media-breakpoint-up(lg) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(33.33% - #{$card-gutter});
}
.blocks-post,
.blocks-pre {
.dashboard-card-deck .dashboard-card {
width: calc(50% - #{$card-gutter});
}
}
}
@include media-breakpoint-up(xl) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(25% - #{$card-gutter});
}
.blocks-post,
.blocks-pre {
.dashboard-card-deck .dashboard-card {
width: calc(33.33% - #{$card-gutter});
}
}
}
@media (min-width: 1360px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(20% - #{$card-gutter});
}
.blocks-post,
.blocks-pre {
.dashboard-card-deck .dashboard-card {
width: calc(25% - #{$card-gutter});
}
}
}
@include media-breakpoint-up(md) {
.blockcolumn {
.dashboard-card-deck {
margin-left: 0;
margin-right: 0;
.dashboard-card {
width: calc(100% - #{$card-gutter}) !important; /* stylelint-disable-line declaration-no-important */
}
}
}
}
// Settings and Navigation blocks don't render well from default boost.
.block_navigation,
.block_settings {

View file

@ -26961,6 +26961,9 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
background-color: #d7e4d6;
}
/**
Blocks
*/
.blockmovetarget .accesshide {
position: relative;
left: initial;
@ -27090,76 +27093,36 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
border-radius: 50%;
}
.dashboard-card-deck.one-row {
flex-flow: nowrap;
overflow-x: scroll;
.card-grid {
display: flex;
}
.card-grid .card {
flex: 1;
}
.drawercontent .card-grid .col, .blockcolumn .card-grid .col {
flex: 0 0 auto;
max-width: 100%;
}
.summaryimage {
height: 5rem;
width: 5rem;
background-position: center;
background-size: cover;
.card-carousel {
display: flex;
}
.dashboard-list-img {
height: 5rem;
width: 20rem;
background-position: center;
background-size: cover;
}
@media (max-width: 1199.98px) {
.dashboard-list-img {
width: 100%;
}
}
.dashboard-card-deck .dashboard-card {
margin-bottom: 0.5rem;
flex-basis: auto;
width: 100%;
flex-grow: 0;
flex-shrink: 0;
}
.dashboard-card-deck .dashboard-card .dashboard-card-img {
height: 7rem;
background-position: center;
background-size: cover;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.dashboard-card-deck .dashboard-card .dashboard-card-footer {
padding: 0.8rem;
.card-carousel .card {
flex: 1;
}
@media (min-width: 576px) {
.dashboard-card-deck.fixed-width-cards .dashboard-card {
width: 300px;
.card-carousel .card {
flex: 0 1 auto;
width: 240px;
max-width: 100%;
}
}
@media (min-width: 576px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(50% - 0.5rem);
}
}
@media (min-width: 840px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(33.33% - 0.5rem);
}
}
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0;
}
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(100% - 0.5rem) !important;
}
@media (max-width: 575.98px) {
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: 100% !important;
}
.course-card .card-img-top,
.theme-card .card-img-top {
height: 7rem;
background-position: center;
background-size: cover;
}
.block_recentlyaccessedcourses .paging-bar-container {
@ -27181,23 +27144,19 @@ body.behat-site .action-menu .dropdown-subpanel-content.show {
width: 40px;
height: 40px;
}
aside[id^=block-region-side-] .block_recentlyaccesseditems .dashboard-card-deck.one-row {
flex-flow: wrap;
overflow-x: hidden;
}
aside[id^=block-region-side-] .block_recentlyaccesseditems .dashboard-card-deck .card:nth-of-type(n+4) {
aside[id^=block-region-side-] .block_recentlyaccesseditems .card:nth-of-type(n+4) {
display: none;
}
#block-region-content .block_recentlyaccesseditems [data-region=more-items-button-container] {
display: none;
}
.block_recentlyaccesseditems a.dashboard-card:hover, .block_recentlyaccesseditems a.dashboard-card:focus {
.block_recentlyaccesseditems a.card:hover, .block_recentlyaccesseditems a.card:focus {
text-decoration: none;
}
.block_recentlyaccesseditems a.dashboard-card:hover h6, .block_recentlyaccesseditems a.dashboard-card:focus h6 {
.block_recentlyaccesseditems a.card:hover h6, .block_recentlyaccesseditems a.card:focus h6 {
text-decoration: underline;
}
.block_recentlyaccesseditems a.dashboard-card small {
.block_recentlyaccesseditems a.card small {
color: #1d2125;
}
@ -27207,6 +27166,23 @@ aside[id^=block-region-side-] .block_recentlyaccesseditems .dashboard-card-deck
.block_myoverview .paged-content-page-container {
min-height: 13rem;
}
.block_myoverview .summary-image {
height: 5rem;
width: 5rem;
background-position: center;
background-size: cover;
}
.block_myoverview .list-image {
height: 5rem;
width: 20rem;
background-position: center;
background-size: cover;
}
@media (max-width: 1199.98px) {
.block_myoverview .list-image {
width: 100%;
}
}
.block_timeline .paged-content-page-container {
background-color: #fff;
@ -39099,56 +39075,6 @@ body {
padding: 0 1rem 0 !important; /* stylelint-disable-line declaration-no-important */
}
}
@media (min-width: 576px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(50% - 0.5rem);
}
}
@media (min-width: 768px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(50% - 0.5rem);
}
.blocks-post .dashboard-card-deck .dashboard-card,
.blocks-pre .dashboard-card-deck .dashboard-card {
width: calc(100% - 0.5rem);
}
}
@media (min-width: 992px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(33.33% - 0.5rem);
}
.blocks-post .dashboard-card-deck .dashboard-card,
.blocks-pre .dashboard-card-deck .dashboard-card {
width: calc(50% - 0.5rem);
}
}
@media (min-width: 1200px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(25% - 0.5rem);
}
.blocks-post .dashboard-card-deck .dashboard-card,
.blocks-pre .dashboard-card-deck .dashboard-card {
width: calc(33.33% - 0.5rem);
}
}
@media (min-width: 1360px) {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(20% - 0.5rem);
}
.blocks-post .dashboard-card-deck .dashboard-card,
.blocks-pre .dashboard-card-deck .dashboard-card {
width: calc(25% - 0.5rem);
}
}
@media (min-width: 768px) {
.blockcolumn .dashboard-card-deck {
margin-left: 0;
margin-right: 0;
}
.blockcolumn .dashboard-card-deck .dashboard-card {
width: calc(100% - 0.5rem) !important; /* stylelint-disable-line declaration-no-important */
}
}
.block_navigation .block_tree.list > li > ul,
.block_settings .block_tree.list > li > ul {
padding-left: 0;