<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Админ Панель</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <style>
        body {
            background-color: #000;
            color: #00ff00;
            font-family: 'Arial', sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            height: 100vh;
            margin: 0;
            overflow-y: auto;
        }

        h1 {
            font-size: 2em;
            margin-bottom: 2em;
            background: linear-gradient(to right, #00ff00, #00ff7f, #00ff00);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: neonText 3s ease-in-out infinite alternate;
        }

        .data-container {
            width: 80%;
            max-width: 600px;
            margin-top: 2em;
        }

        .data-block {
            background-color: rgba(0, 0, 0, 0.8);
            border: 2px solid #00ff00;
            padding: 1em;
            margin: 1em 0;
            text-align: center;
            box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
            animation: neonBorder 1.5s ease-in-out infinite alternate;
        }

        .data-block p {
            font-size: 1.2em;
            margin: 0.5em 0;
        }

        /* Исправление для тега img */
        .data-block img {
            display: block;
            margin: 0.5em auto;
            max-width: 100%;
            height: auto;
        }

        @keyframes neonText {
            0% {
                text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #00ff00, 0 0 20px #00ff7f, 0 0 30px #00ff7f, 0 0 40px #00ff7f, 0 0 50px #00ff7f;
            }
            50% {
                text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00, 0 0 40px #00ff7f, 0 0 50px #00ff7f, 0 0 60px #00ff7f, 0 0 70px #00ff7f;
            }
            100% {
                text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #00ff00, 0 0 20px #00ff7f, 0 0 30px #00ff7f, 0 0 40px #00ff7f, 0 0 50px #00ff7f;
            }
        }

        @keyframes neonBorder {
            0% {
                box-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #00ff00, 0 0 20px #00ff7f, 0 0 30px #00ff7f, 0 0 40px #00ff7f, 0 0 50px #00ff7f;
            }
            50% {
                box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00, 0 0 40px #00ff7f, 0 0 50px #00ff7f, 0 0 60px #00ff7f, 0 0 70px #00ff7f;
            }
            100% {
                box-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #00ff00, 0 0 20px #00ff7f, 0 0 30px #00ff7f, 0 0 40px #00ff7f, 0 0 50px #00ff7f;
            }
        }

        .button-container {
            display: flex;
            gap: 1em;
            justify-content: center;
        }

        .button-link {
            background: linear-gradient(90deg, #00ff00, #00ff00); /* Изменение цвета градиента */
            border: none;
            color: #000;
            padding: 0.5em 1em;
            font-size: 1em;
            cursor: pointer;
            transition: background 0.3s, transform 0.3s;
            text-decoration: none;
            display: inline-block;
            margin: 0.5em 0;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
        }

        .button-link:hover {
            background: linear-gradient(90deg, #00bfff, #00ff00);
            transform: scale(1.05);
        }
    </style>
</head>
<body>

<h1>Все данные:</h1>
<div class="data-container">
    <div th:each="el : ${posts}" class="data-block">
        <p th:text="${el.name}">text</p>
        <img th:src="${el.put_img1}" alt="image" />
        <p th:text="${el.opisanie}">text</p>
        <p th:text="${el.cena}">text</p>
        <div class="button-container">
            <a th:href="@{/admin/token/dkjjsdkjfhsdkcDKHnfcsiuyHWydhjdfhsouUyqe/pertatki/{id}(id=${el.id})}" class="button-link" onclick="return confirmDelete();">Удалить</a>
        </div>
    </div>
</div>

<script>
    function confirmDelete() {
        return confirm('Удалить эту запись?');
    }
</script>

</body>
</html>
