From 6e58e24517680f06548aed48879a8f6484af2000 Mon Sep 17 00:00:00 2001 From: sachinsh01 <89263668+sachinsh01@users.noreply.github.com> Date: Mon, 28 Mar 2022 03:22:56 +0530 Subject: [PATCH 1/4] Update displayCard.html --- displayCard.html | 87 +++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 35 deletions(-) diff --git a/displayCard.html b/displayCard.html index a8ee226..e073bf2 100644 --- a/displayCard.html +++ b/displayCard.html @@ -1,48 +1,65 @@ - - - - + + + + Document - - + +
-
Your Blog Posts
- +
Your Blog Posts
+
-
- -
- - - -
- +
+ + + +
+ -
+
- - -

Your Post

-
- - - - -
+ + +

Your Post

+
+ + + + +
- - - \ No newline at end of file + + + From 9abd6aece9893c52ae76890ddd5442bdc7c9faa4 Mon Sep 17 00:00:00 2001 From: sachinsh01 <89263668+sachinsh01@users.noreply.github.com> Date: Mon, 28 Mar 2022 03:23:14 +0530 Subject: [PATCH 2/4] Update script.js --- script.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/script.js b/script.js index e60691b..ea45b14 100644 --- a/script.js +++ b/script.js @@ -1 +1,41 @@ /* Fill your code*/ +class Blog{ + constuctor(title,detail){ + this.title=title; + this.detail=detail; + } + addTitle(){ + var title_card = document.createElement('h1'); + title_card.setAttribute("id","blog-title"); + console.log(title_card); + document.getElementById('card-text').appendChild(title_card); + title_card.innerHTML += this.title; + } +addDescription(){ + var description_card = document.createElement('p'); + description_card.setAttribute("id","blog-description"); + console.log(description_card); + document.getElementById('card-text').appendChild(description_card); + description_card.innerHTML += this.description; +} +} +var addpost=document.getElementById('popupContact'); +var blog=document.getElementById('addBlog'); +var closepost=document.getElementById('close'); +blog.addEventListener("click",function(){ + addpost.style.display="block"; + +}); +closepost.addEventListener("click",function(){ + addpost.style.display="none"; + +}); +document.getElementById("post").addEventListener("click",function(){ + document.getElementById("popupContact").style.display="none"; + var $img=document.createElement("img"); + $img.setAttribute("src","./assets/javascript.png"); + document.getElementById("card-text").appendChild($img); + var $title=document.getElementById("title").value; + var $detail=document.getElementById("detail").value; + var object1=new Blog($title,$detail); +}); From c136c1bbb6ae98497d602e8fdca1bc121fcb7b9b Mon Sep 17 00:00:00 2001 From: sachinsh01 <89263668+sachinsh01@users.noreply.github.com> Date: Thu, 7 Apr 2022 23:56:08 +0530 Subject: [PATCH 3/4] ProGrad ID : 8731 --- displayCard.html | 1 + 1 file changed, 1 insertion(+) diff --git a/displayCard.html b/displayCard.html index e073bf2..ca51783 100644 --- a/displayCard.html +++ b/displayCard.html @@ -63,3 +63,4 @@

Your Post

+ From d3645d09710b8b506168dbb1e452a7d9b012cc31 Mon Sep 17 00:00:00 2001 From: sachinsh01 <89263668+sachinsh01@users.noreply.github.com> Date: Thu, 7 Apr 2022 23:56:25 +0530 Subject: [PATCH 4/4] ProGrad ID : 8731 --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index ea45b14..f76549c 100644 --- a/script.js +++ b/script.js @@ -38,4 +38,4 @@ document.getElementById("post").addEventListener("click",function(){ var $title=document.getElementById("title").value; var $detail=document.getElementById("detail").value; var object1=new Blog($title,$detail); -}); +});