From 98332d3d5032777e0b3ff5bec7dd4399dcd44ad1 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 18 Feb 2019 17:10:27 +0000 Subject: Made container hold entire unit --- Website/scripts/main.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Website/scripts/main.ts b/Website/scripts/main.ts index d9c84a4..9f8862b 100644 --- a/Website/scripts/main.ts +++ b/Website/scripts/main.ts @@ -1,8 +1,6 @@ class Article { Container: HTMLElement; Title: HTMLElement; - Description: string; - ArticleLink: string; Image: HTMLElement; constructor(title: string, description: string, article_link: string, image_link: string) { @@ -17,6 +15,11 @@ class Article { link.setAttribute('href', article_link); this.Image.setAttribute('src', image_link); this.Image.setAttribute('title', description); + + // make unit + this.Title.appendChild(link); + this.Container.appendChild(this.Title); + this.Container.appendChild(this.Image); } } -- cgit v1.2.3-13-gbd6f