Rename guestbook message wrapper to thread

This commit is contained in:
Helen Chong 2024-05-19 20:09:49 +08:00
parent 28c06b22cb
commit 8ad5a5779d
3 changed files with 15 additions and 15 deletions

View File

@ -24,8 +24,7 @@ let messageObj = {
email: '',
website: '',
message: '',
timestamp: {},
replies: [],
timestamp: '',
};
// Form submission event
@ -90,12 +89,13 @@ const renderMessage = (item) => {
const itemID = item[0];
const itemValue = item[1];
const newMessageWrapperDiv = document.createElement('div');
newMessageWrapperDiv.classList.add('gb__message--wrapper');
newMessageWrapperDiv.id = `msg-${itemID}`;
const newThreadDiv = document.createElement('div');
newThreadDiv.classList.add('gb__thread');
newThreadDiv.id = `thread-${itemID}`;
const newMessageDiv = document.createElement('div');
newMessageDiv.classList.add('gb__message');
newMessageDiv.id = `msg-${itemID}`;
const newMessageName = document.createElement('p');
newMessageName.classList.add('gb__message--name');
@ -119,7 +119,7 @@ const renderMessage = (item) => {
messageReplyBtn.classList.add('gb__message--reply-btn');
messageReplyBtn.textContent = 'Reply';
messageListEl.append(newMessageWrapperDiv);
newMessageWrapperDiv.append(newMessageDiv);
messageListEl.append(newThreadDiv);
newThreadDiv.append(newMessageDiv);
newMessageDiv.append(newMessageName, newMessageMsg, newMessageTime, messageReplyBtn);
};

View File

@ -4,7 +4,7 @@
<subtitle>Leilukin&#39;s personal website.</subtitle>
<link href="https://leilukin.neocities.org/feed.xml" rel="self"/>
<link href="https://leilukin.neocities.org"/>
<updated>2024-05-19T11:24:03Z</updated>
<updated>2024-05-19T12:08:36Z</updated>
<id>https://leilukin.neocities.org</id>
<author>
<name>Leilukin</name>

View File

@ -24,8 +24,7 @@ let messageObj = {
email: '',
website: '',
message: '',
timestamp: {},
replies: [],
timestamp: '',
};
// Form submission event
@ -90,12 +89,13 @@ const renderMessage = (item) => {
const itemID = item[0];
const itemValue = item[1];
const newMessageWrapperDiv = document.createElement('div');
newMessageWrapperDiv.classList.add('gb__message--wrapper');
newMessageWrapperDiv.id = `msg-${itemID}`;
const newThreadDiv = document.createElement('div');
newThreadDiv.classList.add('gb__thread');
newThreadDiv.id = `thread-${itemID}`;
const newMessageDiv = document.createElement('div');
newMessageDiv.classList.add('gb__message');
newMessageDiv.id = `msg-${itemID}`;
const newMessageName = document.createElement('p');
newMessageName.classList.add('gb__message--name');
@ -119,7 +119,7 @@ const renderMessage = (item) => {
messageReplyBtn.classList.add('gb__message--reply-btn');
messageReplyBtn.textContent = 'Reply';
messageListEl.append(newMessageWrapperDiv);
newMessageWrapperDiv.append(newMessageDiv);
messageListEl.append(newThreadDiv);
newThreadDiv.append(newMessageDiv);
newMessageDiv.append(newMessageName, newMessageMsg, newMessageTime, messageReplyBtn);
};