WIP
This commit is contained in:
parent
c2dbf995cc
commit
dbb48fbde6
29 changed files with 146 additions and 94 deletions
|
|
@ -1,14 +0,0 @@
|
|||
import { Header } from "../../model/portfolio";
|
||||
import { html } from "../../model/misc";
|
||||
import "./about.scss";
|
||||
|
||||
export const generate = (
|
||||
{ name, picture, about }: Header,
|
||||
aPictureOf: string
|
||||
): html => `
|
||||
<section id="about">
|
||||
<header>
|
||||
<img alt="${aPictureOf} ${name}" src="${picture}"/>
|
||||
<h1>${name}</h1>
|
||||
</header>
|
||||
</section>`;
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
@import "../../style/mixins";
|
||||
@import "../../style/vars";
|
||||
|
||||
#about {
|
||||
header {
|
||||
@include center-children();
|
||||
|
||||
h1,
|
||||
img {
|
||||
@include title-font();
|
||||
}
|
||||
|
||||
img {
|
||||
@include square(4ch);
|
||||
border-radius: 100%;
|
||||
margin-right: 1.5ex;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
import { PageContent } from "../content/content";
|
||||
import { Header } from "../../model/portfolio";
|
||||
import { PageElement } from "../../framework/page-element";
|
||||
import { createElement } from "../../framework/element-factory";
|
||||
|
||||
import { generate } from "./about.html";
|
||||
|
||||
export class PageHeader extends PageElement {
|
||||
public constructor(header: Header, aPictureOf: string) {
|
||||
const root = createElement(generate(header, aPictureOf));
|
||||
const content = new PageContent(header.about);
|
||||
|
||||
root.appendChild(content.getElement());
|
||||
super([content]);
|
||||
this.setElement(root);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue