@@ -100,24 +100,32 @@ function renderContacts(cachedContacts) {
100100 else card . className = "contact-card read" ;
101101
102102 card . innerHTML = `
103- <h3>${ c . name } </h3>
104- <p>${ c . email } </p>
105- <p>${ c . message } </p>
103+ <h3 class="admin subtitle"><strong>Name: </strong >${ c . name } </h3>
104+ <p class="admin text"><strong>Email: </strong >${ c . email } </p>
105+ <p class="admin text"><strong>Message: </strong >${ c . message } </p>
106106 `
107107 const deleteButton = document . createElement ( "button" ) ;
108- deleteButton . classList . add ( "delete-btn" ) ;
108+ const delSpan = document . createElement ( "span" ) ;
109+ delSpan . className = "button_top" ;
110+ delSpan . textContent = "Delete Contact"
111+
109112 deleteButton . type = "button" ;
110- deleteButton . textContent = "Delete" ;
113+
114+ deleteButton . appendChild ( delSpan ) ;
111115
112116 deleteButton . addEventListener ( "click" , ( ) => {
113117 deleteContact ( c . id ) ;
114118 } ) ;
115119
116120 if ( c . is_read == 0 ) {
117121 const markReadButton = document . createElement ( "button" ) ;
118- markReadButton . classList . add ( "mark-read-btn" ) ;
119122 markReadButton . type = "button" ;
120- markReadButton . textContent = "Mark as read"
123+
124+ const markSpan = document . createElement ( "span" ) ;
125+ markSpan . className = "button_top" ;
126+ markSpan . textContent = "Mark as read" ;
127+
128+ markReadButton . appendChild ( markSpan ) ;
121129
122130 markReadButton . addEventListener ( "click" , ( ) => {
123131 markAsRead ( c . id ) ;
@@ -127,9 +135,14 @@ function renderContacts(cachedContacts) {
127135 }
128136
129137 const responseButton = document . createElement ( "button" ) ;
130- responseButton . classList . add ( "response-btn" ) ;
131138 responseButton . type = "button" ;
132- responseButton . textContent = "Respond to message" ;
139+
140+ const respSpan = document . createElement ( "span" ) ;
141+ respSpan . className = "button_top" ;
142+ respSpan . textContent = "Respond to contact" ;
143+
144+ responseButton . appendChild ( respSpan ) ;
145+
133146
134147 responseButton . addEventListener ( "click" , ( ) => {
135148 window . location . href = `../pages/reply.html?contact_id=${ c . id } ` ;
@@ -294,24 +307,32 @@ function renderPosts(posts){
294307 const safeHTML = DOMPurify . sanitize ( marked . parse ( rawContent ) ) ;
295308
296309 card . innerHTML = `
297- <h3><strong>Title: </strong>${ p . title } </h3>
298- <div class="post-content">${ safeHTML } </div>
299- <p><strong>Date: </strong>${ date . toLocaleDateString ( ) } </p>
300- <p><strong>Is published? : </strong>${ p . published } </p>
310+ <h3 class="admin subtitle" ><strong>Title: </strong>${ p . title } </h3>
311+ <div class="post-content admin text ">${ safeHTML } </div>
312+ <p class="admin text" ><strong>Date: </strong>${ date . toLocaleDateString ( ) } </p>
313+ <p class="admin text" ><strong>Published : </strong>${ p . published } </p>
301314 `
302315 const deleteButton = document . createElement ( "button" ) ;
303- deleteButton . classList . add ( "delete-btn" ) ;
304316 deleteButton . type = "button" ;
305- deleteButton . textContent = "Delete Post" ;
317+
318+ const delSpan = document . createElement ( "span" ) ;
319+ delSpan . className = "button_top" ;
320+ delSpan . textContent = "Delete Post" ;
321+
322+ deleteButton . appendChild ( delSpan ) ;
306323
307324 deleteButton . addEventListener ( "click" , ( ) => {
308325 deletePost ( p . id ) ;
309326 } ) ;
310327
311328 const editButton = document . createElement ( "button" ) ;
312- editButton . classList . add ( "edit-btn" ) ;
313329 editButton . type = "button" ;
314- editButton . textContent = "Edit Post" ;
330+
331+ const editSpan = document . createElement ( "span" ) ;
332+ editSpan . className = "button_top" ;
333+ editSpan . textContent = "Edit Post" ;
334+
335+ editButton . appendChild ( editSpan ) ;
315336
316337 editButton . addEventListener ( "click" , ( ) => {
317338 window . location . href = `../pages/edit-post.html?post_id=${ p . id } ` ;
0 commit comments