<!DOCTYPE html>
<html>
<head>
    <%- include('../partials/head'); %>
    <title>Edit</title>
    <!--ESTILOS-->
    <link rel="stylesheet" href='../styles/css/postimg/add.css'>
    <!--SCRIPT-->
</head>
    <body class="body">
        <%- include('../partials/header'); %>
        <main>
            <div class="container p-4">
                <div class="row">
                    <div class="col-md-4 mx-auto">
                        <div class="card bg-dark">
                            <div class="card-body">
                                <h1 class="text-light mb-3 h4">Editar Imagen</h1>
                                <form action="/profile/edit/<%= aid %>" method="POST">
                                    <div class="form-group">
                                        <img src="<%= imgs.imageURL%> " class="card-img-top">
                                        <input type="text" value="<%= imgs.title %>" name="title" class="form-control bg-dark text-light" placeholder="Titulo" autofocus>
                                    </div>
                                    <div class="form-group">
                                        <textarea name="descripcion"  rows="2" class="form-control bg-dark text-light" placeholder="Descripcion"><%= imgs.descripcion %></textarea>
                                    </div>
                                    <div class="form-group">
                                        <button class="btn btn-success btn-block">
                                            Guardar
                                        </button>
                                    </div>
                                </form>
                                <a href="/profile/delete/<%= imgs.id %>" class="btn btn-danger">
                                    Eliminar
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        <%- include('../partials/footer'); %>
    </body>
</html>

