JSFiddle - React, Tailwind, and code Playground

by dirtyd77

HTML

<div id="wrapper">
    <div id="logo">
        <p id="contactTitle">Contact</p>
    </div>
    <div id="content">
        <div id="seperator"></div>
        <div id="contentWrapper">
            <form id="contactForm">
                <div class="formLine">
                    <label for="nameField">Name:</label>
                    <input id="nameField" type="text" />
                </div>
                <div class="formLine">
                    <label for="emailField">Email:</label>
                    <input id="emailField" type="text" />
                </div>
                <div class="formLine">
                    <label id="noteLabel" for="noteField">Note:</label>
                    <textarea id="noteField" rows="3"></textarea>
                </div>
                <div class="formLine">
                    <button>Send</button>
                </div>
            </form>
        </div>
    </div>
</div>

CSS

::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}
html, body {
    margin: 0px;
    padding: 0px;
    height: 100%;
    width:100%;
    overflow:hidden;
}
body {
    background: #e4e4e4 url('http://willhousemedia.com/wp-content/uploads/2013/09/Gray-Tile.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: top center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}
p, label {
    font-variant: small-caps;
    font-size:0.85em;
    font-weight:bold;
}
#wrapper {
    height:100%;
    width:100%;
}
#logo {
    position:relative;
    min-width:290px;
    background-image:url('http://willhousemedia.com/wp-content/uploads/2013/09/WHM-Logo_Shadow1.png');
    background-size: 290px 93px;
    background-position: center center;
    background-repeat: no-repeat;
    min-height:150px;
    width:100%;
    height:100%;
}
#content {
    position: relative;
    margin: 0 auto;
    width: 100%;
    height: 53%;
    padding-bottom: 1em;
}
#contentWrapper{
    height: 85%;
    width: 50%;
    padding: 0.5em;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x:hidden;
}

#contactTitle {
    min-width:120px;
    position:absolute;
    left:50%;
    bottom:5%;
    margin:0 0 0 -60px;
    padding:0;
    text-align:center;
}
#contactTitle:hover {
    cursor:pointer;
}
#contactForm {
    display:none;
    padding-top:0.4em;
}
#seperator {
    width: 0%;
    height: 1px;
    background: black;
    border-top: 1px ridge gray;
    margin: 0.4em auto;
}
.formLine {
    width:100%;
    display: table;
    margin-bottom: 1em;
}
#contactDiv {
    height:90%;
    overflow-x:hidden;
    overflow-y:auto;
    width:100%;
}
.formLine label, .formLine...

JavaScript

$(function () {
    var _bool = false;

    $('#contactTitle').click(function () {

        $('#logo').stop(true, false).animate({
            height: !_bool ? '40%' : '100%'
        }, 575, "swing");

        //  $('#content').stop(true, false).animate({
        //      height: !_bool ? '60%' : '0%'
        //  }, 575, "swing");

        $('#contactTitle').stop(true, false).animate({
            bottom: !_bool ? '0%' : '5%'
        }, 575, "swing");

        $('#seperator').stop(true, false).animate({
            width: !_bool ? '50%' : '0%'
        }, 575, "swing");

        !_bool ? $('#contactForm').stop(true, false).fadeIn(600) : $('#contactForm').stop(true, false).fadeOut(600);

        _bool = !_bool;
    });
});