<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <link rel="stylesheet" href="/css/newpost.css">
    <link rel="stylesheet" href="/css/style.css">
    <link rel="stylesheet" href="/css/loader.css">


    <!-- stylesheet for fontawesome icons -->
    <link  rel="stylesheet" href="/css/all.min.css">
    <link rel="stylesheet" href="/css/fontawesome.min.css">

    <title>AUCTION</title>
</head>
<body>

    <%-include('./includes/header')%>

    <section>
        <form action="/createpost" method="POST" enctype="multipart/form-data">

            <div class="post">
                <div class="auctionpicture">
                    <label for="profilepic" class="changeprofilepicture">
                        <img src="/assets/placeholder-image.png" class="profilepicture">
                        <div class="image-label">Browse</div>
                    </label>
                    <input type="file" name="postpicture" accept="image/*" id="profilepic" hidden>
                    <div class="info">
                        <div class="label">CAPTION</div>
                        <textarea  maxlength="250" class="description" name="caption" placeholder="Type your caption here..."></textarea>
                    </div>
                </div>

                <div class="auction-details">

                    <div class="tag">
                        <div class="label">HASH TAGS</div>
                        <div class="auction-tags">
                            <div class="tag-input">
                                <span class="hash">#</span>
                                <input class="tag" type="text" placeholder="Type Tag Here"> <button type="button" class="addtag">add tag</button>
                            </div>

                            <div class="msg" hidden>You can't have a hashtag twice.</div>
                            <div class="alltags"></div>
                            <textarea class="alltags" name="hashtags" hidden></textarea>
                        </div>
                    </div>

                    <div class="starting-price">
                        <div class="label">STARTING PRICE</div>
                        <div class="price-input">
                            <span class="hash">$</span>
                            <input class="startingprice" name="startingprice" type="number" placeholder="Enter Starting Price">
                        </div>
                    </div>

                    <button type="submit" class="createauction" disabled>Create Auction</button>
                </div>
            </div>

            </div>
        </form>
    </section>


    <footer>
        <div><a href="/home"><i class="fa fa-home"></i></a></div>
        <div><a href="/search"><i class="fa fa-search"></i></a></div>
        <div class="current-nav"><a href="/newpost"><i class="fa fa-camera"></i></a></div>
        <!-- <div><a href="/notifications"><i class="fa fa-bell"></i></a></div> -->
        <div class="user-profile">
            <a href="/user/<%=userSession.username%>">
                <button class="with-image">
                    <% if(userSession.image) { %>
                        <Img src="/assets/profilepictures/<%=userSession.image%>">
                    <% } else { %>
                        <Img src="/assets/userpicture.png">
                    <% } %>
                    <div class="username"><%=userSession.username %></div>
                    <i class="fa fa-caret-down options-indicator"></i>
                </button>
            </a>
        </div>
    </footer>

    <div class="loader-wrapper">
        <div class="loadingio-spinner-rolling-r42hcymfq0f">
            <div class="ldio-jay0zj72el">
                <div></div>
            </div>
        </div>
    </div>


    <script src="/js/jquery-3.5.1.js"></script>
    <script src="/js/newpost.js"></script>
    <script src="/js/search.js"></script>
</body>
</html>