Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
javierarce committed Oct 1, 2023
1 parent 3686c14 commit e92e70d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scripts/rss.reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class RSS extends HTMLElement {
this.title = this.getAttribute("data-title")
this.author = this.getAttribute("data-author")

const title = document.createElement('span')
const title = document.createElement('div')
const blog = document.createElement('a')

blog.textContent = this.title
Expand Down Expand Up @@ -56,19 +56,13 @@ class RSS extends HTMLElement {
render (data) {
const lastEntry = data.entries[0]

const entry = document.createElement('span')
entry.part = 'post'

const entryDate = document.createElement('span')
const ago = this.distance(Date.parse(lastEntry.published))
entryDate.textContent = ago ? ` ${ago} ago` : ''
entryDate.part = 'date'

const titleElement = this.shadow.querySelector('span');
titleElement.appendChild(entryDate)

//entry.appendChild(entryDate)
//this.shadow.appendChild(entry)
this.classList.add('is-loaded')
}

Expand Down

0 comments on commit e92e70d

Please sign in to comment.