colors and titles
This commit is contained in:
parent
ae238c90f8
commit
b56167a703
5 changed files with 53 additions and 8 deletions
|
|
@ -3,7 +3,8 @@ function renderItemInfo(data) {
|
|||
div = document.createElement('div')
|
||||
div.className = "content"
|
||||
div.innerHTML = `
|
||||
<div class="title">${data.title}</div>
|
||||
<h1 class="item-title">${item.title}</h1>
|
||||
<h2 class="title">${data.title}</h2>
|
||||
<div class="byline">${data.byline}</div>
|
||||
<figure>
|
||||
<img src="${data.icon}">
|
||||
|
|
@ -12,6 +13,9 @@ function renderItemInfo(data) {
|
|||
<a href="${data.link}">Open on ${data.site}</a>
|
||||
</div>
|
||||
`
|
||||
if (!item.title) {
|
||||
div.querySelector('item-title').remove()
|
||||
}
|
||||
document.querySelector(".content").replaceWith(div)
|
||||
}
|
||||
|
||||
|
|
@ -25,7 +29,8 @@ function renderItem(data) {
|
|||
div = document.createElement('div')
|
||||
div.className = "content"
|
||||
div.innerHTML = `
|
||||
<div class="title">${data.title}</div>
|
||||
<h1 class="item-title">${item.title}</h1>
|
||||
<h2 class="title">${data.title}</h2>
|
||||
<div class="byline">${data.byline}</div>
|
||||
<div class="player">
|
||||
<div class="video"></div>
|
||||
|
|
@ -38,6 +43,9 @@ function renderItem(data) {
|
|||
<a href="${data.link}">Open on ${data.site}</a>
|
||||
</div>
|
||||
`
|
||||
if (!item.title) {
|
||||
div.querySelector('item-title').remove()
|
||||
}
|
||||
|
||||
if (window.renderComments) {
|
||||
renderComments(div.querySelector('.comments'), data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue