diff --git a/src/addons/mod/glossary/pages/entry/entry.html b/src/addons/mod/glossary/pages/entry/entry.html index 02d6f6278..2f4a80db0 100644 --- a/src/addons/mod/glossary/pages/entry/entry.html +++ b/src/addons/mod/glossary/pages/entry/entry.html @@ -8,6 +8,7 @@ + @@ -23,72 +24,77 @@ {{ 'core.hasdatatosync' | translate: { $a: 'addon.mod_glossary.entry' | translate } }} - - - - - - - {{ onlineEntry.userfullname }} - - {{ onlineEntry.timemodified | coreDateDayOrTime }} - - - - - - - - {{ onlineEntry.timemodified | coreDateDayOrTime }} - - - - - - - - - - - - - - - - 0"> - - {{ 'core.tag.tags' | translate }}: - - - - - - - - - - - + + + + + + + + {{ onlineEntry.userfullname }} + + {{ onlineEntry.timemodified | coreDateDayOrTime }} + + + + + + + + {{ onlineEntry.timemodified | coreDateDayOrTime }} + + + + + + + + - - - - {{ 'addon.mod_glossary.entrypendingapproval' | translate }} - - - 0 && commentsEnabled" - contextLevel="module" [instanceId]="glossary.coursemodule" component="mod_glossary" [itemId]="onlineEntry.id" - area="glossary_entry" [courseId]="glossary.course" [showItem]="true" /> - - + + + + + + + 0"> + + {{ 'core.tag.tags' | translate }}: + + + + + + + + + + + + + + + + {{ 'addon.mod_glossary.entrypendingapproval' | translate }} + + + 0 && commentsEnabled" + contextLevel="module" [instanceId]="glossary.coursemodule" component="mod_glossary" [itemId]="onlineEntry.id" + area="glossary_entry" [courseId]="glossary.course" [showItem]="true" /> + + + diff --git a/src/core/directives/reading-mode.ts b/src/core/directives/reading-mode.ts index 5c5085d3f..7949eea64 100644 --- a/src/core/directives/reading-mode.ts +++ b/src/core/directives/reading-mode.ts @@ -28,6 +28,7 @@ import { CoreModals } from '@services/modals'; import { CoreViewer } from '@features/viewer/services/viewer'; import { CoreDirectivesRegistry } from '@singletons/directives-registry'; import { CoreCollapsibleHeaderDirective } from './collapsible-header'; +import { CoreLogger } from '@singletons/logger'; /** * Directive to add the reading mode to the selected html tag. @@ -48,6 +49,7 @@ export class CoreReadingModeDirective implements AfterViewInit, OnDestroy { protected enabled = false; protected contentEl?: HTMLIonContentElement; protected header?: CoreCollapsibleHeaderDirective; + protected logger = CoreLogger.getInstance('CoreReadingModeDirective'); constructor( element: ElementRef, @@ -72,9 +74,14 @@ export class CoreReadingModeDirective implements AfterViewInit, OnDestroy { const page = CoreDom.closest(this.element, '.ion-page'); this.contentEl = page?.querySelector('ion-content') ?? undefined; - const toolbar = page?.querySelector('ion-header ion-toolbar ion-buttons[slot="end"]'); + const buttonsContainer = page?.querySelector('ion-header ion-toolbar ion-buttons[slot="end"]'); - if (!toolbar || toolbar.querySelector('.core-text-viewer-button')) { + if (!buttonsContainer) { + this.logger.warn('The header was not found, or it didn\'t have any ion-buttons on slot end.'); + + return; + } + if (buttonsContainer.querySelector('.core-text-viewer-button')) { return; } @@ -96,7 +103,7 @@ export class CoreReadingModeDirective implements AfterViewInit, OnDestroy { const src = CoreIcons.getIconSrc('font-awesome', 'solid', iconName); // Add an ion-icon item to apply the right styles, but the ion-icon component won't be executed. button.innerHTML = ``; - toolbar.appendChild(button); + buttonsContainer.appendChild(button); button.addEventListener('click', (e: Event) => { if (!this.element.innerHTML) { diff --git a/src/theme/components/reading-mode.scss b/src/theme/components/reading-mode.scss index ed4ef820e..97aa4b5ef 100644 --- a/src/theme/components/reading-mode.scss +++ b/src/theme/components/reading-mode.scss @@ -44,8 +44,10 @@ body.core-reading-mode-enabled { [core-reading-mode] { zoom: var(--reading-mode-zoom, 1); &> * { + --ion-item-background: var(--reading-mode-background, --ion-background-color); --text-color: var(--reading-mode-text-color, --text-color); --color: var(--reading-mode-text-color, --text-color); + --subdued-text-color: var(--text-color); color: var(--text-color); } }
{{ onlineEntry.userfullname }}
- -
+ +
{{ 'addon.mod_glossary.entrypendingapproval' | translate }}