<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Sticky Notes</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f2f2f2;
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
        }

        h1 {
            text-align: center;
        }

        .note-input {
            width: 70%;
            padding: 10px;
            margin-right: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        .add-button {
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }

        .note-list {
            list-style-type: none;
            padding: 0;
        }

        .note-item {
            background-color: #ffffcc;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #ccc;
            border-radius: 5px;
            display: flex;
            flex-direction: column; /* Display content vertically */
        }

        .note-text {
            margin-bottom: 10px; /* Add spacing between text and meta info */
        }

        .note-meta {
            font-size: 12px;
            color: #666;
        }

        .delete-link {
            color: #ff0000;
            text-decoration: none;
            cursor: pointer;
        }

        .delete-link:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>Ops-center Notes</h1>
        <form action="/add_note" method="POST">
            <input type="text" name="note" placeholder="Add a new note" class="note-input">
            <button type="submit" class="add-button">Add</button>
        </form>
        <ul class="note-list">
            {% for note in notes %}
                <li class="note-item">
                    <span class="note-text">{{ note.content }}</span>
                    <span class="note-meta">
                        Date: {{ note.date }}, Time: {{ note.time }}, Author: {{ note.author }}
                    </span>
                    <a href="/delete_note/{{ note._id }}" class="delete-link">Delete</a>
                </li>
            {% endfor %}
        </ul>
    </div>
</body>
</html>
