Skip to content

Commit

Permalink
Fix 5
Browse files Browse the repository at this point in the history
  • Loading branch information
CMTV committed Sep 24, 2023
1 parent e29ac0c commit b0b6fdc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/view/pages/Page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CONFIG } from "src/build/BuildConfig";
import { SITEMAP } from "src/build/process/site/Sitemap";
import { OgPaint } from "src/util/OgPaint";
import { Preprocessor } from "src/util/Preprocessor";
import { Location, LocationPart } from "../partials/location";

Expand Down Expand Up @@ -38,6 +39,26 @@ export class PageSEO
}
}

export class PageOgImg
{
static id = 0;

name: string;
title: string;

constructor(title: string)
{
this.title = title;
PageOgImg.id++;
}

getId()
{
return `${PageOgImg.id}-${this.name}`;
}
}


export abstract class Page
{
//
Expand All @@ -47,6 +68,7 @@ export abstract class Page
config = CONFIG;
location: Location;
seo: PageSEO;
ogImg: PageOgImg;

canonical = () => (CONFIG.getUrl() + '/' + this.dest()).replace('/index.html', '');
bodyClass = () => this.pageName;
Expand Down Expand Up @@ -82,4 +104,8 @@ export abstract class Page
if (this.hasStyle)
Preprocessor.buildStyle(`pages/${this.pageName}.scss`, `${this.pageName}.css`);
}

private paintOgImg()
{
}
}

0 comments on commit b0b6fdc

Please sign in to comment.