{% extends "base.html" %}
{% block content %}

<div class="container-fluid">
    <div class="row">
        <div class="col" style="margin-left:20px; max-width:250px; text-align:center;">
            <button class="btn btn-primary btn-lg" style="margin:25px; justify-self:center;">Compose</button>
            <div class="list-group" style="border-top: solid 1px;">
                <button type="button" class="btn btn-outline-dark" style="border:none;">Inbox</button>
                <button type="button" class="btn btn-outline-dark" style="border:none;">Sent</button>
                <button type="button" class="btn btn-outline-dark" style="border:none;">Drafts</button>
                <button type="button" class="btn btn-outline-dark" style="border:none;">Trash</button>
                <button type="button" class="btn btn-outline-dark" style="border:none;">Important</button>
                <button type="button" class="btn btn-outline-dark" style="border:none;">Spam</button>
                <button type="button" class="btn btn-outline-dark" style="border:none;">Starred</button>
            </div>
        </div>
        <div class="col" style="overflow-y: scroll; max-height:600px; max-width:350px;">
            <div class="list-group">
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
                <button type="button" class="list-group-item list-group-item-action listbutton"><img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;"><div style="overflow:hidden"><b>imagine this is a header</b></div><div style="overflow:hidden"><small>Some text that is very smol</small></div></button>
            </div>
        </div>
        <div class="col">
            <h3>imagine this is a header</h3>
            <div style="border-bottom: solid 1px; padding:5px;">
                <img src="https://i.stack.imgur.com/YQu5k.png" style="height:60px; width:60px; margin-right: 10px; float:left;">
                <div class="row" style="left:-15px;position:relative;"><div class="col"><b>This Guy</b></div><div class="col offset-md-9"><small> Jan 04, 1989</small></div></div>
                <div style="margin-top:10px;">to <b>me</b></div>
            </div>
            <div id="Email Body">
                <p>Ya'll like lorem ipsum?</p>

                <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p> 
                
                <p style="margin-bottom:30px;">The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p>
                
                <button class="btn" id="BeginReply" style="border: none; background-color:transparent; margin-left:90%; margin-bottom:20px;" onclick="CreateBox(); this.onclick=CloseBox;"><i class="fas fa-reply"></i> Reply </button>
            </div>
        </div>
    </div>
</div>

<script>

    function CreateBox() {

        var x = document.createElement("textarea");
       
        x.setAttribute("style", "border-radius:5px; width:100%; height:400px; overflow-y: scroll;");
        x.id = "ReplyBox";
        document.getElementById("Email Body").appendChild(x);

        var y = document.createElement("button");

        y.setAttribute("class", "btn btn-primary btn-lg");
        y.setAttribute("style", "margin-left:90%; margin-top:20px;");
        y.id = "ReplyButton";
        y.textContent = "Reply";


        y.addEventListener('click', function () {
            DoReply(x);

        });

        document.getElementById("Email Body").appendChild(y);

    }

    function DoReply(x) {

        var y = document.createElement("p");
        y.textContent = x.textContent;
        document.getElementById("ReplyBox").remove();
        document.getElementById("ReplyButton").remove();

        document.getElementById("Email Body").appendChild(y);


        document.getElementById("BeginReply").onclick = CreateBox;


    }

    function CloseBox() {

        document.getElementById("ReplyBox").remove();
        document.getElementById("ReplyButton").remove();
        document.getElementById("BeginReply").onclick = CreateBox;

    }

</script>

{% endblock %}