Refactor portfolio and fix grammar

This commit is contained in:
schmelczerandras 2020-11-26 17:15:57 +01:00
parent 86ddc3d0d8
commit 59a0afbac7
37 changed files with 546 additions and 451 deletions

View file

@ -1,8 +1,8 @@
import { Footer } from '../../types/portfolio';
import './footer.scss';
import cvIcon from '../../static/icons/cv.svg';
import emailIcon from '../../static/icons/email.svg';
import { html } from '../../types/html';
import { FooterParameters } from './footer';
export const generate = ({
title,
@ -10,7 +10,7 @@ export const generate = ({
curriculaVitae,
lastEditText,
lastEdit,
}: Footer): html => `
}: FooterParameters): html => `
<footer id="footer">
<h2>${title}</h2>
<ul>

View file

@ -1,11 +1,21 @@
import { Footer } from '../../types/portfolio';
import { PageElement } from '../page-element';
import { generate } from './footer.html';
import { createElement } from '../../helper/create-element';
import { url } from '../../types/url';
export interface FooterParameters {
title: string;
email: string;
curriculaVitae: Array<{
name: string;
url: url;
}>;
lastEditText: string;
lastEdit: Date;
}
export class PageFooter extends PageElement {
constructor(footer: Footer) {
constructor(footer: FooterParameters) {
super(createElement(generate(footer)));
}
}