Skip to content
OhHelloAna.blog
Jottings from Ana Rodrigues
Main menu
Posts
Pixels
Bookmarks
Guestbook
About me
Guestbook
The guestbook entries are requested using Javascript which is either unavailable or disabled in your browser.
`; newEntry.appendChild(entryAuthor); // add date const entryDate = document.createElement("div"); entryDate.classList.add("guestbook__date"); if (currentEntry.published) { var guestbookEntryDate = new Date(currentEntry.published).toDateString(); } else { var guestbookEntryDate = new Date(currentEntry['wm-received']).toDateString(); } entryDate.innerHTML = `${guestbookEntryDate}`; newEntry.appendChild(entryDate); // add entry const guestbookEntry = document.createElement("div"); guestbookEntry.classList.add("guestbook__entry"); if (currentEntry.content.html) { guestbookEntry.innerHTML = `${currentEntry.content.html}`; newEntry.appendChild(guestbookEntry); } else if (currentEntry.content.text) { guestbookEntry.innerHTML = `${currentEntry.content.text}`; newEntry.appendChild(guestbookEntry); } //add decoration const topTape = document.createElement("div"); topTape.classList.add("tape--guestbook-left-top"); const middleTape = document.createElement("div"); middleTape.classList.add("tape--guestbook-middle-top"); const bottomTape = document.createElement("div"); bottomTape.classList.add("tape--guestbook-right-bottom"); if(i % 2 == 0) { newEntry.appendChild(middleTape); } else { newEntry.appendChild(topTape); newEntry.appendChild(bottomTape); } } } } }};