-
-
+
+
+ {{ 'core.courses.aria:coursename' | translate }}
+
+ {{ 'core.courses.aria:coursecategory' | translate }}
+
+
+
+
+
diff --git a/src/core/features/course/pages/index/index.html b/src/core/features/course/pages/index/index.html
index 0187dc8e4..2a234b5d5 100644
--- a/src/core/features/course/pages/index/index.html
+++ b/src/core/features/course/pages/index/index.html
@@ -21,10 +21,6 @@
-
-
-
-
{{ title }}
diff --git a/src/core/features/course/pages/index/index.ts b/src/core/features/course/pages/index/index.ts
index 56e10b136..c6b24df14 100644
--- a/src/core/features/course/pages/index/index.ts
+++ b/src/core/features/course/pages/index/index.ts
@@ -238,7 +238,6 @@ export class CoreCourseIndexPage implements OnInit, OnDestroy {
// Get the title to display initially.
this.title = CoreCourseFormatDelegate.getCourseTitle(this.course);
- this.category = 'categoryname' in this.course ? this.course.categoryname : '';
if ('overviewfiles' in this.course) {
this.imageThumb = this.course.overviewfiles?.[0]?.fileurl;
diff --git a/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html b/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html
index 39bf2b5e2..fd2a803bc 100644
--- a/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html
+++ b/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html
@@ -70,7 +70,8 @@
class="core-course-category core-course-additional-info ion-text-nowrap">
{{ 'core.courses.aria:coursecategory' | translate }}
-
+
+
From 6ecb08246bbae89f4dd355d0eac264680b4bca2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Wed, 23 Feb 2022 14:42:11 +0100
Subject: [PATCH 09/13] MOBILE-3833 course: Move course downloads to course
page
---
.../services/handlers/course-menu.ts | 62 -------------------
.../storagemanager/storagemanager.module.ts | 3 -
src/core/components/iframe/core-iframe.html | 2 +-
.../module-summary/module-summary.html | 4 +-
.../course/pages/contents/contents.html | 5 +-
.../course/pages/contents/contents.ts | 12 +++-
6 files changed, 16 insertions(+), 72 deletions(-)
delete mode 100644 src/addons/storagemanager/services/handlers/course-menu.ts
diff --git a/src/addons/storagemanager/services/handlers/course-menu.ts b/src/addons/storagemanager/services/handlers/course-menu.ts
deleted file mode 100644
index 74dc8f409..000000000
--- a/src/addons/storagemanager/services/handlers/course-menu.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-// (C) Copyright 2015 Moodle Pty Ltd.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-import { Injectable } from '@angular/core';
-import { CoreCourseOptionsMenuHandler, CoreCourseOptionsMenuHandlerData } from '@features/course/services/course-options-delegate';
-import { CoreCourseAnyCourseDataWithOptions } from '@features/courses/services/courses';
-import { makeSingleton } from '@singletons';
-
-/**
- * Handler to inject an option into course menu so that user can get to the manage storage page.
- */
-@Injectable( { providedIn: 'root' })
-export class AddonStorageManagerCourseMenuHandlerService implements CoreCourseOptionsMenuHandler {
-
- name = 'AddonStorageManager';
- priority = 500;
- isMenuHandler = true;
-
- /**
- * @inheritdoc
- */
- async isEnabledForCourse(): Promise {
- return true;
- }
-
- /**
- * @inheritdoc
- */
- async isEnabled(): Promise {
- return true;
- }
-
- /**
- * @inheritdoc
- */
- getMenuDisplayData(
- course: CoreCourseAnyCourseDataWithOptions,
- ): CoreCourseOptionsMenuHandlerData {
- return {
- icon: 'fas-cloud-download-alt',
- title: 'addon.storagemanager.coursedownloads',
- page: 'storage/' + course.id,
- pageParams: {
- title: course.displayname ?? course.fullname,
- },
- class: 'addon-storagemanager-coursemenu-handler',
- };
- }
-
-}
-export const AddonStorageManagerCourseMenuHandler = makeSingleton(AddonStorageManagerCourseMenuHandlerService);
diff --git a/src/addons/storagemanager/storagemanager.module.ts b/src/addons/storagemanager/storagemanager.module.ts
index 187d66cdd..fbf97bdaf 100644
--- a/src/addons/storagemanager/storagemanager.module.ts
+++ b/src/addons/storagemanager/storagemanager.module.ts
@@ -14,12 +14,10 @@
import { NgModule, APP_INITIALIZER } from '@angular/core';
import { Routes } from '@angular/router';
-import { CoreCourseOptionsDelegate } from '@features/course/services/course-options-delegate';
import { CoreMainMenuRoutingModule } from '@features/mainmenu/mainmenu-routing.module';
import { CoreMainMenuTabRoutingModule } from '@features/mainmenu/mainmenu-tab-routing.module';
import { CoreSitePreferencesRoutingModule } from '@features/settings/pages/site/site-routing';
import { CoreSettingsDelegate } from '@features/settings/services/settings-delegate';
-import { AddonStorageManagerCourseMenuHandler } from './services/handlers/course-menu';
import { AddonStorageManagerSettingsHandler } from './services/handlers/settings';
const routes: Routes = [
@@ -41,7 +39,6 @@ const routes: Routes = [
provide: APP_INITIALIZER,
multi: true,
useValue: () => {
- CoreCourseOptionsDelegate.registerHandler(AddonStorageManagerCourseMenuHandler.instance);
CoreSettingsDelegate.registerHandler(AddonStorageManagerSettingsHandler.instance);
},
},
diff --git a/src/core/components/iframe/core-iframe.html b/src/core/components/iframe/core-iframe.html
index 776cfbbee..78c405420 100644
--- a/src/core/components/iframe/core-iframe.html
+++ b/src/core/components/iframe/core-iframe.html
@@ -1,6 +1,6 @@
-
+
diff --git a/src/core/features/course/components/module-summary/module-summary.html b/src/core/features/course/components/module-summary/module-summary.html
index 52dc0f284..09a0e3354 100644
--- a/src/core/features/course/components/module-summary/module-summary.html
+++ b/src/core/features/course/components/module-summary/module-summary.html
@@ -58,7 +58,7 @@
-
+
{{ 'addon.storagemanager.downloads' | translate }}
@@ -81,7 +81,7 @@
-
+
{{ 'core.download' | translate }}
diff --git a/src/core/features/course/pages/contents/contents.html b/src/core/features/course/pages/contents/contents.html
index 64ff48a05..bc3f404f8 100644
--- a/src/core/features/course/pages/contents/contents.html
+++ b/src/core/features/course/pages/contents/contents.html
@@ -1,4 +1,7 @@
-
+
+
+
+
diff --git a/src/core/features/course/pages/contents/contents.ts b/src/core/features/course/pages/contents/contents.ts
index 85d7bfce1..81953a209 100644
--- a/src/core/features/course/pages/contents/contents.ts
+++ b/src/core/features/course/pages/contents/contents.ts
@@ -29,7 +29,6 @@ import {
} from '@features/course/services/course-helper';
import { CoreCourseFormatDelegate } from '@features/course/services/format-delegate';
import { CoreCourseModulePrefetchDelegate } from '@features/course/services/module-prefetch-delegate';
-import { CoreCourseOptionsMenuHandlerToDisplay } from '@features/course/services/course-options-delegate';
import { CoreCourseSync, CoreCourseSyncProvider } from '@features/course/services/sync';
import { CoreCourseFormatComponent } from '../../components/course-format/course-format';
import {
@@ -54,7 +53,6 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy {
sections?: CoreCourseSection[];
sectionId?: number;
sectionNumber?: number;
- courseMenuHandlers: CoreCourseOptionsMenuHandlerToDisplay[] = [];
dataLoaded = false;
downloadCourseEnabled = false;
moduleId?: number;
@@ -368,8 +366,16 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy {
}
}
+ gotoCourseDownloads(): void {
+ CoreNavigator.navigateToSitePath(
+ `storage/${this.course.id}`,
+ { params: { title: this.course.fullname } },
+ );
+
+ }
+
/**
- * Page destroyed.
+ * @inheritdoc
*/
ngOnDestroy(): void {
this.isDestroyed = true;
From 2fd8a72f39758e0cc753f9624f1b77072994d7f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Wed, 23 Feb 2022 15:24:04 +0100
Subject: [PATCH 10/13] MOBILE-3833 style: Use same card margin on ios and md
---
src/core/features/course/components/module/module.scss | 4 ++--
src/core/features/login/login.scss | 4 ++++
src/theme/theme.base.scss | 5 +++++
src/theme/theme.light.scss | 2 ++
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/core/features/course/components/module/module.scss b/src/core/features/course/components/module/module.scss
index 614464d9e..4c06e9ca0 100644
--- a/src/core/features/course/components/module/module.scss
+++ b/src/core/features/course/components/module/module.scss
@@ -2,10 +2,10 @@
:host {
--horizontal-margin: 10px;
+ --vertical-margin: 10px;
ion-card {
- margin-left: var(--horizontal-margin);
- margin-right: var(--horizontal-margin);
+ margin: var(--vertical-margin) var(--horizontal-margin);
}
ion-item {
diff --git a/src/core/features/login/login.scss b/src/core/features/login/login.scss
index 6aeb84b40..165ba96e3 100644
--- a/src/core/features/login/login.scss
+++ b/src/core/features/login/login.scss
@@ -34,6 +34,10 @@
margin-bottom: 16px;
}
+ form .core-username.ios {
+ --inner-border-width: 0 0 1px 0;
+ }
+
form .item,
form .item ion-label {
--background: var(--core-login-input-background);
diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss
index 7d39abe82..10175cb7e 100644
--- a/src/theme/theme.base.scss
+++ b/src/theme/theme.base.scss
@@ -813,6 +813,7 @@ ion-card {
border-color: var(--border-color);
box-shadow: var(--box-shadow);
border-radius: var(--border-radius);
+ margin: var(--ion-card-vertical-margin) var(--ion-card-horizontal-margin);
ion-item:only-child {
--inner-border-width: 0px;
@@ -1151,6 +1152,10 @@ ion-item.item-lines-inset {
--border-width: 0px;
}
+ion-item.item-input.ios {
+ --inner-border-width: 0 0 1px 0;
+}
+
// Fake item.
div.fake-ion-item {
position: relative;
diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss
index edcdad2f9..448d88505 100644
--- a/src/theme/theme.light.scss
+++ b/src/theme/theme.light.scss
@@ -88,6 +88,8 @@
--subdued-text-color: var(--gray-700);
--ion-card-color: var(--text-color);
+ --ion-card-vertical-margin: 10px;
+ --ion-card-horizontal-margin: 10px;
ion-card {
--border-width: 1px;
--border-style: solid;
From daf4090ac6d1a6601bb86af4eef945b4db3000b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Wed, 23 Feb 2022 15:29:11 +0100
Subject: [PATCH 11/13] MOBILE-3833 style: Remove back text from back button on
iOS
---
src/theme/theme.base.scss | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss
index 10175cb7e..0ac775748 100644
--- a/src/theme/theme.base.scss
+++ b/src/theme/theme.base.scss
@@ -164,6 +164,9 @@ ion-header {
--ion-toolbar-color: var(--core-header-toolbar-color);
--border-radius: var(--huge-radius);
}
+ ion-back-button::part(text) {
+ display: none;
+ }
.button.button-clear,
.button.button-solid {
From 15dbfa514a59d6f4ba50859d8eca1cce9f228d1d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Wed, 23 Feb 2022 15:57:10 +0100
Subject: [PATCH 12/13] MOBILE-3833 format-text: Change toggle style
---
.../pages/course-storage/course-storage.scss | 5 +-
src/core/directives/collapsible-item.ts | 14 ++--
src/core/directives/format-text.ts | 26 ++++---
src/theme/components/format-text.scss | 74 ++----------------
src/theme/globals.mixins.scss | 77 ++++++++++++++++++-
src/theme/theme.base.scss | 72 +----------------
src/theme/theme.dark.scss | 4 +
src/theme/theme.light.scss | 6 ++
8 files changed, 118 insertions(+), 160 deletions(-)
diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.scss b/src/addons/storagemanager/pages/course-storage/course-storage.scss
index 29bc1c7d8..87de86c13 100644
--- a/src/addons/storagemanager/pages/course-storage/course-storage.scss
+++ b/src/addons/storagemanager/pages/course-storage/course-storage.scss
@@ -1,7 +1,6 @@
@import "~theme/globals";
:host {
- --core-format-text-background-gradient-rgb: var(--background-rgb, #{$ion-item-background-rgb});
--course-storage-max-activity-height: 120px;
ion-card.section ion-card-header {
@@ -23,8 +22,8 @@
min-height: var(--course-storage-max-activity-height);
position: absolute;
@include position(0, 0, null, 0);
- background: -webkit-linear-gradient(top, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 20px));
- background: linear-gradient(to bottom, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 20px));
+ background: -webkit-linear-gradient(top, rgba(var(--background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--background-gradient-rgb), 1) calc(100% - 20px));
+ background: linear-gradient(to bottom, rgba(var(--background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--background-gradient-rgb), 1) calc(100% - 20px));
z-index: 6;
pointer-events: none;
}
diff --git a/src/core/directives/collapsible-item.ts b/src/core/directives/collapsible-item.ts
index c7f069354..d572a0586 100644
--- a/src/core/directives/collapsible-item.ts
+++ b/src/core/directives/collapsible-item.ts
@@ -64,8 +64,8 @@ export class CoreCollapsibleItemDirective implements OnInit {
}
this.maxHeight = this.maxHeight < defaultMaxHeight ? defaultMaxHeight : this.maxHeight;
- if (!this.maxHeight || (window.innerWidth > 576 && window.innerHeight > 576)) {
- // Do not collapse on big screens.
+ if (!this.maxHeight) {
+ // Do not collapse.
return;
}
@@ -91,9 +91,6 @@ export class CoreCollapsibleItemDirective implements OnInit {
*/
protected calculateHeight(): void {
// @todo: Work on calculate this height better.
- if (!this.maxHeight) {
- return;
- }
// Remove max-height (if any) to calculate the real height.
const initialMaxHeight = this.element.style.maxHeight;
@@ -117,7 +114,11 @@ export class CoreCollapsibleItemDirective implements OnInit {
this.toggleExpandEnabled = enable;
this.element.classList.toggle('collapsible-enabled', enable);
- if (!enable || this.element.querySelector('ion-button.collapsible-toggle')) {
+ if (!enable || this.element.querySelector('ion-button.collapsible-toggle')) {
+ this.element.style.maxHeight = !enable || this.expanded
+ ? ''
+ : this.maxHeight + 'px';
+
return;
}
@@ -128,6 +129,7 @@ export class CoreCollapsibleItemDirective implements OnInit {
const toggleText = document.createElement('span');
toggleText.classList.add('collapsible-toggle-text');
+ toggleText.classList.add('sr-only');
toggleButton.appendChild(toggleText);
const expandArrow = document.createElement('span');
diff --git a/src/core/directives/format-text.ts b/src/core/directives/format-text.ts
index b87e1fbe0..cf080adea 100644
--- a/src/core/directives/format-text.ts
+++ b/src/core/directives/format-text.ts
@@ -279,23 +279,28 @@ export class CoreFormatTextDirective implements OnChanges {
*/
protected setExpandButtonEnabled(enable: boolean): void {
this.toggleExpandEnabled = enable;
- this.element.classList.toggle('core-text-formatted', enable);
+ this.element.classList.toggle('collapsible-enabled', enable);
+
+ if (!enable || this.element.querySelector('ion-button.collapsible-toggle')) {
+ this.element.style.maxHeight = !enable || this.expanded
+ ? ''
+ : this.maxHeight + 'px';
- if (!enable || this.element.querySelector('ion-button.core-format-text-toggle')) {
return;
}
// Add expand/collapse buttons
const toggleButton = document.createElement('ion-button');
- toggleButton.classList.add('core-format-text-toggle');
+ toggleButton.classList.add('collapsible-toggle');
toggleButton.setAttribute('fill', 'clear');
const toggleText = document.createElement('span');
- toggleText.classList.add('core-format-text-toggle-text');
+ toggleText.classList.add('collapsible-toggle-text');
+ toggleText.classList.add('sr-only');
toggleButton.appendChild(toggleText);
const expandArrow = document.createElement('span');
- expandArrow.classList.add('core-format-text-arrow');
+ expandArrow.classList.add('collapsible-toggle-arrow');
toggleButton.appendChild(expandArrow);
this.element.appendChild(toggleButton);
@@ -313,12 +318,12 @@ export class CoreFormatTextDirective implements OnChanges {
expand = !this.expanded;
}
this.expanded = expand;
- this.element.classList.toggle('core-text-format-expanded', expand);
- this.element.classList.toggle('core-text-format-collapsed', !expand);
+ this.element.classList.toggle('collapsible-expanded', expand);
+ this.element.classList.toggle('collapsible-collapsed', !expand);
this.element.style.maxHeight = expand ? '' : this.maxHeight + 'px';
- const toggleButton = this.element.querySelector('ion-button.core-format-text-toggle');
- const toggleText = toggleButton?.querySelector('.core-format-text-toggle-text');
+ const toggleButton = this.element.querySelector('ion-button.collapsible-toggle');
+ const toggleText = toggleButton?.querySelector('.collapsible-toggle-text');
if (!toggleButton || !toggleText) {
return;
}
@@ -396,8 +401,7 @@ export class CoreFormatTextDirective implements OnChanges {
this.element.classList.add('core-disable-media-adapt');
this.contentSpan.innerHTML = ''; // Remove current contents.
- if (this.maxHeight && result.div.innerHTML != '' &&
- (window.innerWidth < 576 || window.innerHeight < 576)) { // Don't collapse in big screens.
+ if (this.maxHeight && result.div.innerHTML != '') {
// Move the children to the current element to be able to calculate the height.
CoreDomUtils.moveChildren(result.div, this.contentSpan);
diff --git a/src/theme/components/format-text.scss b/src/theme/components/format-text.scss
index 1aa0b8c1e..02581a519 100644
--- a/src/theme/components/format-text.scss
+++ b/src/theme/components/format-text.scss
@@ -4,13 +4,11 @@
core-format-text {
--core-format-text-background: var(--background, var(--ion-item-background));
- --core-format-text-background-gradient-rgb: var(--background-rgb, #{$ion-item-background-rgb});
--core-format-text-viewer-icon-background: rgba(255, 255, 255, .5);
--core-format-text-loader-shine: 251,251,251;
}
body.dark core-format-text {
- --core-format-text-background-gradient-rgb: var(--background-rgb, #{$ion-item-background-dark-rgb});
--core-format-text-viewer-icon-background: rgba(0, 0, 0, .5);
--core-format-text-loader-shine: 90,90,90;
}
@@ -51,12 +49,12 @@ core-format-text {
display: inline;
}
- .core-format-text-toggle {
+ .collapsible-toggle {
display: none !important;
}
}
- .core-format-text-toggle {
+ .collapsible-toggle {
display: none;
}
@@ -84,81 +82,21 @@ core-format-text {
}
// This is to allow clicks in radio/checkbox content.
- &.core-text-formatted {
+ &.collapsible-enabled {
cursor: pointer;
pointer-events: auto;
- .core-format-text-toggle {
- display: block;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- text-align: center;
- z-index: 7;
- text-transform: none;
- text-align: end;
- font-size: 14px;
- background-color: var(--core-format-text-background);
- color: var(--text-color);
- margin: 0;
-
-
- .core-format-text-arrow {
- width: var(--a11y-min-target-size);
- height: var(--a11y-min-target-size);
-
- background-position: center;
- background-repeat: no-repeat;
- background-size: 14px 14px;
- @include core-transition(transform, 500ms);
-
- @include push-arrow-color(626262, true);
-
- @include darkmode() {
- @include push-arrow-color(ffffff, true);
- }
- }
- }
-
- &.core-text-format-collapsed {
- overflow: hidden;
- min-height: 50px;
-
- .core-format-text-arrow {
- transform: rotate(90deg);
- }
-
- &:before {
- content: '';
- height: 100%;
- position: absolute;
- @include position(null, 0, 0, 0);
- background: -webkit-linear-gradient(top, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 60px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 40px));
- background: linear-gradient(to bottom, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 60px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 40px));
- z-index: 6;
- }
- }
-
- &.core-text-format-expanded {
- max-height: none !important;
-
- padding-bottom: 50px; // So the Show less button can fit.
-
- .core-format-text-arrow {
- transform: rotate(-90deg);
- }
- }
+ @include collapsible-item();
}
}
@if ($core-format-text-never-shorten) {
&[maxHeight],
&[ng-reflect-max-height] {
- &.core-text-formatted.core-text-format-expanded {
+ &.collapsible-enabled.collapsible-expanded {
max-height: none !important;
- .core-format-text-toggle {
+ .collapsible-toggle {
display: none !important;
}
diff --git a/src/theme/globals.mixins.scss b/src/theme/globals.mixins.scss
index 0082bb1e5..f9529da61 100644
--- a/src/theme/globals.mixins.scss
+++ b/src/theme/globals.mixins.scss
@@ -219,9 +219,84 @@
--horizontal-margin: 6px;
}
}
-
}
+@mixin collapsible-item() {
+ --display-toggle: none;
+ .collapsible-toggle {
+ display: var(--display-toggle);
+ }
+
+ @include media-breakpoint-down(sm) {
+ &.collapsible-enabled {
+ position:relative;
+ --display-toggle: block;
+
+ .collapsible-toggle {
+ position: absolute;
+ @include position (null, 0, 0, null);
+ text-align: center;
+ z-index: 7;
+ text-transform: none;
+ font-size: 14px;
+ font-weight: normal;
+ background-color: var(--collapsible-toggle-background);
+ color: var(--collapsible-toggle-text);
+ min-height: var(--a11y-min-target-size);
+ min-width: var(--a11y-min-target-size);
+ --border-radius: var(--huge-radius);
+ border-radius: var(--border-radius);
+ --padding-start: 0px;
+ --padding-end: 0px;
+ margin: 0px;
+
+ .collapsible-toggle-arrow {
+ width: var(--a11y-min-target-size);
+ height: var(--a11y-min-target-size);
+
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: 14px 14px;
+ @include core-transition(transform, 500ms);
+
+ @include push-arrow-color(626262, true);
+
+ @include darkmode() {
+ @include push-arrow-color(ffffff, true);
+ }
+ }
+ }
+
+ &.collapsible-collapsed {
+ overflow: hidden;
+ min-height: calc(var(--collapsible-min-button-height) + 12px);
+
+ .collapsible-toggle-arrow {
+ transform: rotate(90deg);
+ }
+
+ &:before {
+ content: '';
+ height: 100%;
+ position: absolute;
+ @include position(null, 0, 0, 0);
+ background: -webkit-linear-gradient(top, rgba(var(--background-gradient-rgb), 0) calc(100% - 56px), rgba(var(--background-gradient-rgb), 1) calc(100% - 5px));
+ background: linear-gradient(to bottom, rgba(var(--background-gradient-rgb), 0) calc(100% - 56px), rgba(var(--background-gradient-rgb), 1) calc(100% - 5px));
+ z-index: 6;
+ }
+ }
+
+ &.collapsible-expanded {
+ max-height: none !important;
+ padding-bottom: var(--collapsible-min-button-height); // So the Show less button can fit.
+
+ .collapsible-toggle-arrow {
+ transform: rotate(-90deg);
+ }
+ }
+ }
+ }
+}
// Color mixins.
@function get_brightness($color) {
diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss
index 0ac775748..461393019 100644
--- a/src/theme/theme.base.scss
+++ b/src/theme/theme.base.scss
@@ -1439,77 +1439,7 @@ ion-grid.core-no-grid > ion-row {
}
[collapsible-item] {
- --collapsible-display-toggle: none;
- --collapsible-toggle-background: var(--ion-item-background);
- --collapsible-min-button-height: 44px;
-
- .collapsible-toggle {
- display: var(--collapsible-display-toggle);
- }
-
- &.collapsible-enabled {
- --collapsible-display-toggle: block;
-
- .collapsible-toggle {
- display: var(--collapsible-display-toggle);
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- text-align: center;
- z-index: 7;
- text-transform: none;
- text-align: end;
- font-size: 14px;
- background-color: var(--collapsible-toggle-background);
- color: var(--text-color);
- margin: 0;
-
- .collapsible-toggle-arrow {
- width: var(--a11y-min-target-size);
- height: var(--a11y-min-target-size);
-
- background-position: center;
- background-repeat: no-repeat;
- background-size: 14px 14px;
- @include core-transition(transform, 500ms);
-
- @include push-arrow-color(626262, true);
-
- @include darkmode() {
- @include push-arrow-color(ffffff, true);
- }
- }
- }
-
- &.collapsible-collapsed {
- overflow: hidden;
- min-height: calc(var(--collapsible-min-button-height) + 12);
-
- .collapsible-toggle-arrow {
- transform: rotate(90deg);
- }
-
- &:before {
- content: '';
- height: 100%;
- position: absolute;
- @include position(null, 0, 0, 0);
- background: -webkit-linear-gradient(top, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 60px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 40px));
- background: linear-gradient(to bottom, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 60px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 40px));
- z-index: 6;
- }
- }
-
- &.collapsible-expanded {
- max-height: none !important;
- padding-bottom: var(--collapsible-min-button-height); // So the Show less button can fit.
-
- .collapsible-toggle-arrow {
- transform: rotate(-90deg);
- }
- }
- }
+ @include collapsible-item();
}
ion-header.no-title {
diff --git a/src/theme/theme.dark.scss b/src/theme/theme.dark.scss
index 206f6e2d4..6f0743f7c 100644
--- a/src/theme/theme.dark.scss
+++ b/src/theme/theme.dark.scss
@@ -97,6 +97,10 @@
--core-combobox-color: var(--text-color);
--core-combobox-border-color: var(--core-input-stroke);
+ --collapsible-toggle-background: var(--light);
+
+ --background-gradient-rgb: #{$ion-item-background-dark-rgb};
+
--core-login-background: var(--gray-900);
--core-login-text-color: var(--white);
--core-login-input-background: var(--core-login-background);
diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss
index 448d88505..32b099920 100644
--- a/src/theme/theme.light.scss
+++ b/src/theme/theme.light.scss
@@ -288,6 +288,12 @@
--selected-item-color: var(--primary);
--selected-item-border-width: 5px;
+ --collapsible-toggle-background: var(--light);
+ --collapsible-min-button-height: 44px;
+ --collapsible-toggle-text: var(--text-color);
+
+ --background-gradient-rgb: #{$ion-item-background-rgb};
+
--core-login-background: var(--white);
--core-login-text-color: var(--gray-900);
--core-login-input-background: var(--white);
From 766dc70a1bf6d6058e906c8e4d34679ef0a1ca70 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Thu, 24 Feb 2022 08:54:29 +0100
Subject: [PATCH 13/13] MOBILE-3833 h5p: Align first column to start on reports
---
.../h5pactivity/pages/attempt-results/attempt-results.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.html b/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.html
index 00a903743..718811590 100644
--- a/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.html
+++ b/src/addons/mod/h5pactivity/pages/attempt-results/attempt-results.html
@@ -109,7 +109,7 @@