diff --git a/src/app/models/page.model.ts b/src/app/models/page.model.ts index d503935..737d46b 100644 --- a/src/app/models/page.model.ts +++ b/src/app/models/page.model.ts @@ -3,23 +3,12 @@ import { IFrameContent, MarkdownContent, SectionContent, SliderContent, FormCont export interface Page { id: string; title: string; - slug: string; hero_section: HeroSection, content: PageContent[]; - sidebar?: { - title: string; - content: string; - }, - seo_metadata?: { - meta_title: string; - meta_description: string; - focus_keywords: string; - }, - footer_override: string; + min_read_time: number; publish_date: Date; last_updated: Date; - status: 'published' | 'beta' | 'draft'; - min_read_time: number; + status: 'published' | 'draft'; } export interface HeroSection { diff --git a/src/app/pages/page/page.component.ts b/src/app/pages/page/page.component.ts index aa01cb6..d9eb395 100644 --- a/src/app/pages/page/page.component.ts +++ b/src/app/pages/page/page.component.ts @@ -64,14 +64,14 @@ export class PageComponent { const next = pageIndex + 1 < pages.length ? pageIndex + 1 : undefined; return { ...page, - data: unitData[page.slug] ?? {}, + data: unitData[page.id] ?? {}, unitIndex, prevIndex: prev, nextIndex: next, nextDisabled: () => this._step !== page.content.length }; }), - tap(page => this.continue = this.initBreakpoints(page.content, page.unitIndex, page.slug)), + tap(page => this.continue = this.initBreakpoints(page.content, page.unitIndex, page.id)), tap(page => document.title = page.title + " | Why App"), tap(page => { this._startTime = Date.now(); diff --git a/src/app/pages/start/start.component.html b/src/app/pages/start/start.component.html index ea42425..3f7ef67 100644 --- a/src/app/pages/start/start.component.html +++ b/src/app/pages/start/start.component.html @@ -31,39 +31,39 @@

{{unit.title}}

- +

- {{section.title}} + {{page.title}}

- @if (section.hero_section) { + @if (page.hero_section) { - {{section.hero_section.subhead}} + {{page.hero_section.subhead}} }
- - {{pageProgressPercent($index, section.slug)}}% + + {{pageProgressPercent($index, page.id)}}%

- @if (section.hero_section && section.hero_section.image) { - + @if (page.hero_section && page.hero_section.image) { + } @else { }

- @if (pageProgressPercent($index, section.slug) > 99) { + @if (pageProgressPercent($index, page.id) > 99) { Erledigt } @else { Offen diff --git a/src/app/pages/summary/summary.component.html b/src/app/pages/summary/summary.component.html index 6be0062..3a0f5a9 100644 --- a/src/app/pages/summary/summary.component.html +++ b/src/app/pages/summary/summary.component.html @@ -11,16 +11,16 @@

- @if (data(unit[page.slug])) { + @if (data(unit[page.id])) { {{page.title}} - {{percent(unit[page.slug])}}% + {{percent(unit[page.id])}}%
- @for (item of data(unit[page.slug]) | keyvalue: doneAtLast; track $index) { + @for (item of data(unit[page.id]) | keyvalue: doneAtLast; track $index) { @if (item.key === doneKey) {