Optimizations
This commit is contained in:
parent
10015a4ebe
commit
3febd3fca8
24 changed files with 215 additions and 99 deletions
|
|
@ -1,13 +1,12 @@
|
|||
import { Header } from "../../model/portfolio";
|
||||
import { html } from "../../model/misc";
|
||||
import { PageContent } from "../content/content";
|
||||
|
||||
import "./about.scss";
|
||||
|
||||
export const generate = (
|
||||
{ name, picture, about }: Header,
|
||||
aPictureOf: string
|
||||
): html => `
|
||||
export const generate = ({ name, picture }: Header): html => `
|
||||
<section id="about">
|
||||
<img alt="${aPictureOf} ${name}" src="${picture}"/>
|
||||
${PageContent.parseTypedContent(picture, true)}
|
||||
<div class="placeholder"></div>
|
||||
<h1>${name}</h1>
|
||||
</section>`;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import { generate } from "./about.html";
|
|||
import { createElement } from "../../framework/helper";
|
||||
|
||||
export class PageHeader extends PageElement {
|
||||
public constructor(header: Header, aPictureOf: string) {
|
||||
const root = createElement(generate(header, aPictureOf));
|
||||
public constructor(header: Header) {
|
||||
const root = createElement(generate(header));
|
||||
const content = new PageContent(header.about);
|
||||
|
||||
super([content]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue