Remove anchor page element

This commit is contained in:
schmelczerandras 2020-11-23 13:58:09 +01:00
parent 4e8da9e7f4
commit 7b9ae36949
4 changed files with 2 additions and 31 deletions

View file

@ -1,12 +0,0 @@
import './anchor.scss';
import { html } from '../../../types/html';
import { url } from '../../../types/url';
export const generate = ({ href, text }: { href: url; text: string }): html => `
<a class="primitive-anchor"
href="${href}"
rel="noopener"
target="_blank"
>${text}</a>
<br/>
`;

View file

@ -1,3 +0,0 @@
.primitive-anchor {
margin-top: var(--line-height);
}

View file

@ -1,10 +0,0 @@
import { PageElement } from '../../page-element';
import { createElement } from '../../../helper/create-element';
import { generate } from './anchor.html';
import { url } from '../../../types/url';
export class Anchor extends PageElement {
public constructor(href: url, text: string) {
super(createElement(generate({ href, text })));
}
}

View file

@ -7,7 +7,7 @@ import { PageTimeline } from './page/timeline/timeline';
import { PageImageViewer } from './page/image-viewer/image-viewer';
import { last } from './helper/last';
import { PageBackground } from './page/background/background';
import { Anchor } from './page/basics/anchor/anchor';
import { Main } from './page/main/main';
import { ImageAnchorFactory } from './page/basics/image-anchor/image-anchor';
import { Preview } from './page/basics/preview/preview';
@ -207,16 +207,12 @@ export const create = () => {
new Text(
`A basic android app for creating and filtering notes written in markdown.`
),
new Anchor(
`https://github.com/schmelczerandras/my-notes`,
`MyNotes on GitHub`
),
new Text(
`It was my homework for BME's Android and web development course.
It was also my first experience with Android development.`
),
],
links: [],
links: [new GitHub('https://github.com/schmelczerandras/my-notes')],
},
{
date: `2018 October - November`,