diff --git a/src/core/features/course/pages/index/index.html b/src/core/features/course/pages/index/index.html index dec61a652..350992231 100644 --- a/src/core/features/course/pages/index/index.html +++ b/src/core/features/course/pages/index/index.html @@ -1,4 +1,4 @@ - + diff --git a/src/core/features/course/pages/index/index.ts b/src/core/features/course/pages/index/index.ts index fe34bd923..a2f663711 100644 --- a/src/core/features/course/pages/index/index.ts +++ b/src/core/features/course/pages/index/index.ts @@ -49,8 +49,10 @@ export class CoreCourseIndexPage implements OnInit, OnDestroy { tabs: CourseTab[] = []; loaded = false; progress?: number; + fullScreenEnabled = false; protected currentPagePath = ''; + protected fullScreenObserver: CoreEventObserver; protected selectTabObserver: CoreEventObserver; protected completionObserver: CoreEventObserver; protected sections: CoreCourseWSSection[] = []; // List of course sections. @@ -114,6 +116,10 @@ export class CoreCourseIndexPage implements OnInit, OnDestroy { this.updateProgress(); }); + + this.fullScreenObserver = CoreEvents.on(CoreEvents.FULL_SCREEN_CHANGED, (event: { enabled: boolean }) => { + this.fullScreenEnabled = event.enabled; + }); } /** @@ -267,6 +273,7 @@ export class CoreCourseIndexPage implements OnInit, OnDestroy { CoreNavigator.decreaseRouteDepth(path.replace(/(\/deep)+/, '')); this.selectTabObserver?.off(); this.completionObserver?.off(); + this.fullScreenObserver?.off(); } /** diff --git a/src/core/singletons/events.ts b/src/core/singletons/events.ts index 6dfdf5ea0..2409a5dd3 100644 --- a/src/core/singletons/events.ts +++ b/src/core/singletons/events.ts @@ -122,6 +122,7 @@ export class CoreEvents { static readonly COURSE_MODULE_VIEWED = 'course_module_viewed'; static readonly COMPLETE_REQUIRED_PROFILE_DATA_FINISHED = 'complete_required_profile_data_finished'; static readonly MAIN_HOME_LOADED = 'main_home_loaded'; + static readonly FULL_SCREEN_CHANGED = 'full_screen_changed'; protected static logger = CoreLogger.getInstance('CoreEvents'); protected static observables: { [eventName: string]: Subject } = {}; diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 1d3272385..7a3fb0dea 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -595,6 +595,11 @@ core-split-view.menu-and-content { // Using router outlet to avoid changing styles on modals. body.core-iframe-fullscreen ion-router-outlet { + .core-course-header, + ion-tab-bar { + display: none !important; + } + ion-tab-bar.mainmenu-tabs { display: none; @@ -630,7 +635,7 @@ body.core-iframe-fullscreen ion-router-outlet { .ion-page { flex-direction: row-reverse; ion-header { - width: calc(var(--core-header-toolbar-height), var(--ion-safe-area-right)); + width: calc(var(--core-header-toolbar-height) + var(--ion-safe-area-right)); @include safe-area-padding-horizontal(null, 0px); background: var(--core-header-toolbar-background); @@ -646,6 +651,10 @@ body.core-iframe-fullscreen ion-router-outlet { } } } + + core-tabs-outlet { + width: 100%; + } } }