Rename guestbook message wrapper to thread
This commit is contained in:
parent
28c06b22cb
commit
8ad5a5779d
|
@ -24,8 +24,7 @@ let messageObj = {
|
||||||
email: '',
|
email: '',
|
||||||
website: '',
|
website: '',
|
||||||
message: '',
|
message: '',
|
||||||
timestamp: {},
|
timestamp: '',
|
||||||
replies: [],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Form submission event
|
// Form submission event
|
||||||
|
@ -90,12 +89,13 @@ const renderMessage = (item) => {
|
||||||
const itemID = item[0];
|
const itemID = item[0];
|
||||||
const itemValue = item[1];
|
const itemValue = item[1];
|
||||||
|
|
||||||
const newMessageWrapperDiv = document.createElement('div');
|
const newThreadDiv = document.createElement('div');
|
||||||
newMessageWrapperDiv.classList.add('gb__message--wrapper');
|
newThreadDiv.classList.add('gb__thread');
|
||||||
newMessageWrapperDiv.id = `msg-${itemID}`;
|
newThreadDiv.id = `thread-${itemID}`;
|
||||||
|
|
||||||
const newMessageDiv = document.createElement('div');
|
const newMessageDiv = document.createElement('div');
|
||||||
newMessageDiv.classList.add('gb__message');
|
newMessageDiv.classList.add('gb__message');
|
||||||
|
newMessageDiv.id = `msg-${itemID}`;
|
||||||
|
|
||||||
const newMessageName = document.createElement('p');
|
const newMessageName = document.createElement('p');
|
||||||
newMessageName.classList.add('gb__message--name');
|
newMessageName.classList.add('gb__message--name');
|
||||||
|
@ -119,7 +119,7 @@ const renderMessage = (item) => {
|
||||||
messageReplyBtn.classList.add('gb__message--reply-btn');
|
messageReplyBtn.classList.add('gb__message--reply-btn');
|
||||||
messageReplyBtn.textContent = 'Reply';
|
messageReplyBtn.textContent = 'Reply';
|
||||||
|
|
||||||
messageListEl.append(newMessageWrapperDiv);
|
messageListEl.append(newThreadDiv);
|
||||||
newMessageWrapperDiv.append(newMessageDiv);
|
newThreadDiv.append(newMessageDiv);
|
||||||
newMessageDiv.append(newMessageName, newMessageMsg, newMessageTime, messageReplyBtn);
|
newMessageDiv.append(newMessageName, newMessageMsg, newMessageTime, messageReplyBtn);
|
||||||
};
|
};
|
|
@ -4,7 +4,7 @@
|
||||||
<subtitle>Leilukin's personal website.</subtitle>
|
<subtitle>Leilukin's personal website.</subtitle>
|
||||||
<link href="https://leilukin.neocities.org/feed.xml" rel="self"/>
|
<link href="https://leilukin.neocities.org/feed.xml" rel="self"/>
|
||||||
<link href="https://leilukin.neocities.org"/>
|
<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>
|
<id>https://leilukin.neocities.org</id>
|
||||||
<author>
|
<author>
|
||||||
<name>Leilukin</name>
|
<name>Leilukin</name>
|
||||||
|
|
|
@ -24,8 +24,7 @@ let messageObj = {
|
||||||
email: '',
|
email: '',
|
||||||
website: '',
|
website: '',
|
||||||
message: '',
|
message: '',
|
||||||
timestamp: {},
|
timestamp: '',
|
||||||
replies: [],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Form submission event
|
// Form submission event
|
||||||
|
@ -90,12 +89,13 @@ const renderMessage = (item) => {
|
||||||
const itemID = item[0];
|
const itemID = item[0];
|
||||||
const itemValue = item[1];
|
const itemValue = item[1];
|
||||||
|
|
||||||
const newMessageWrapperDiv = document.createElement('div');
|
const newThreadDiv = document.createElement('div');
|
||||||
newMessageWrapperDiv.classList.add('gb__message--wrapper');
|
newThreadDiv.classList.add('gb__thread');
|
||||||
newMessageWrapperDiv.id = `msg-${itemID}`;
|
newThreadDiv.id = `thread-${itemID}`;
|
||||||
|
|
||||||
const newMessageDiv = document.createElement('div');
|
const newMessageDiv = document.createElement('div');
|
||||||
newMessageDiv.classList.add('gb__message');
|
newMessageDiv.classList.add('gb__message');
|
||||||
|
newMessageDiv.id = `msg-${itemID}`;
|
||||||
|
|
||||||
const newMessageName = document.createElement('p');
|
const newMessageName = document.createElement('p');
|
||||||
newMessageName.classList.add('gb__message--name');
|
newMessageName.classList.add('gb__message--name');
|
||||||
|
@ -119,7 +119,7 @@ const renderMessage = (item) => {
|
||||||
messageReplyBtn.classList.add('gb__message--reply-btn');
|
messageReplyBtn.classList.add('gb__message--reply-btn');
|
||||||
messageReplyBtn.textContent = 'Reply';
|
messageReplyBtn.textContent = 'Reply';
|
||||||
|
|
||||||
messageListEl.append(newMessageWrapperDiv);
|
messageListEl.append(newThreadDiv);
|
||||||
newMessageWrapperDiv.append(newMessageDiv);
|
newThreadDiv.append(newMessageDiv);
|
||||||
newMessageDiv.append(newMessageName, newMessageMsg, newMessageTime, messageReplyBtn);
|
newMessageDiv.append(newMessageName, newMessageMsg, newMessageTime, messageReplyBtn);
|
||||||
};
|
};
|
Loading…
Reference in New Issue