diff --git a/src/index.html b/src/index.html index e86622c..a99aca3 100644 --- a/src/index.html +++ b/src/index.html @@ -10,6 +10,7 @@ integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous" > + @@ -89,9 +90,10 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisee gravida sem sit amet molestie porttitor.

- +
  • -
    +
    +
    @@ -101,10 +103,12 @@ alt="Profile of Bradley Jones" title="Bradley Jones" /> - +
    +
  • + diff --git a/src/script.js b/src/script.js new file mode 100644 index 0000000..637ba4b --- /dev/null +++ b/src/script.js @@ -0,0 +1,41 @@ +function Additem(){ + let li= document.createElement('li'); +li.classList.add("comment"); +li.classList.add('author-comment'); + +var div = document.createElement('div'); +div.classList.add('info'); + +var span= document.createElement('span'); + +div.innerHTML='Jack Smith'; +div.appendChild(span); +li.appendChild(div); + +li.innerHTML ='Profile Avatar' +let para=document.createElement('p'); + +para.innerHTML = document.getElementsByTagName('textarea')[0].value; + +li.appendChild(para); + +var box = document.getElementsByClassName('write-new')[0]; +var ul = document.getElementsByTagName('ul')[0]; +ul.insertBefore(li,box); + + +function datetime(){ + start_date /=1000; + + var seconds= Math.round(start_date); + + var timeText; + + if(seconds <60){ + timeTt = seconds+"sec" +(seconds < 2 ? " ": "s")+"ago"; + + } + span.innerHTML= "10 minutes ago"; +} + +} \ No newline at end of file diff --git a/src/style.css b/src/style.css index 6f1a246..1112087 100644 --- a/src/style.css +++ b/src/style.css @@ -55,6 +55,9 @@ html { overflow: hidden; white-space: nowrap; padding: 10px 0 3px 0; + font-weight: bold; + color: black; + } .comment .info span { @@ -95,14 +98,18 @@ html { width: 50%; position: relative; word-wrap: break-word; + color: black; } .comment.user-comment p { background-color: #f3f3f3; + color: black; } .comment.author-comment p { /* change background color to light blue */ + background-color: lightblue; + order: 1; }