Can you fix this php script so that there aren't two line breaks in the comments? <?php…
- User
Can you fix this php script so that there aren't two line breaks in the comments?
.container { max-width: 800px; margin: 50px auto; padding: 20px; } h1, h2 { color: #f39c12; } form { background: #1e1e2f; padding: 20px; border-radius: 8px; margin-bottom: 20px; } input[type="text"], textarea { width: 90%; padding: 10px; margin: 10px 0; border: none; background: #333; color: #fff; border-radius: 5px; font-size: 16px; } input[type="text"]:focus, textarea:focus { outline: none; background: #444; } textarea { height: 100px; resize: none; } .btn { background-color: #f39c12; color: #fff; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; text-transform: uppercase; font-weight: bold; } .btn:hover { background-color: #d87a0b; } .tour-list { list-style: none; padding: 0; } .tour-item { background-color: #1e1e2f; margin-bottom: 20px; padding: 20px; border-radius: 8px; text-align: left; } .tour-item .date { font-size: 18px; font-weight: bold; color: #f39c12; } .tour-item .location { font-size: 16px; color: #4CAF50; } .tour-item .comments { font-size: 18px; color: #ddd; white-space: pre-wrap; margin-top: 10px; line-height: 1.6; /* Adjust this value to change spacing between lines */ } .tour-item .actions button { margin-top: 10px; display: inline-block; margin-right: 10px; } .edit-form { display: none; } .editing .display { display: none; } .editing .edit-form { display: block; } </style> <script> function toggleEditForm(itemId) { const item = document.getElementById(itemId); item.classList.toggle('editing'); } function confirmDelete(file) { if (confirm("Are you sure you want to delete this entry?")) { const form = document.createElement('form'); form.method = 'POST'; form.innerHTML = ` <input type="hidden" name="action" value="delete"> <input type="hidden" name="file" value="${file}"> `; document.body.appendChild(form); form.submit(); } } </script><h2>Current Tour Dates</h2> <ul class="tour-list"> <?php foreach ($tourDates as $tour): ?> <li class="tour-item" id="item-<?php echo htmlspecialchars($tour['file']); ?>"> <div class="display"> <div class="date"><?php echo htmlspecialchars($tour['date']); ?></div> <div class="location"><?php echo htmlspecialchars($tour['location']); ?></div> <div class="comments"><?php echo autoLink($tour['comments']); ?></div> <div class="actions"> <button class="btn" onclick="toggleEditForm('item-<?php echo htmlspecialchars($tour['file']); ?>')">Edit</button> <button class="btn" onclick="confirmDelete('<?php echo htmlspecialchars($tour['file']); ?>')">Delete</button> </div> </div> <form class="edit-form" method="POST"> <input type="hidden" name="action" value="edit"> <input type="hidden" name="file" value="<?php echo htmlspecialchars($tour['file']); ?>"> <input type="text" name="date" value="<?php echo htmlspecialchars($tour['date']); ?>" required> <input type="text" name="location" value="<?php echo htmlspecialchars($tour['location']); ?>" required> <textarea name="comments"><?php echo htmlspecialchars($tour['comments']); ?></textarea> <button class="btn" type="submit">Save</button> <button class="btn" type="button" onclick="toggleEditForm('item-<?php echo htmlspecialchars($tour['file']); ?>')">Cancel</button> </form> </li> <?php endforeach; ?> </ul> </div> - Assistant
- User
Can you give the CSS a different dark theme so it's easier on the eyes?
- Assistant
- User
Give it a black night mode theme like android has
- Assistant