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}}
-
+
- @if (section.hero_section && section.hero_section.image) {
-
+ @if (page.hero_section && page.hero_section.image) {
+
} @else {
}
- @if (data(unit[page.slug])) {
+ @if (data(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) {