JSFiddle - React, Tailwind, and code Playground

by tjerabek

HTML

<div id="presentation">
    <h2>Presentation</h2>
    <p>Open items on <strong>bottom</strong>.</p>
</div>
<div id="main-control" class="control">
    <a href="#" class="handle">Items</a>
    <div class="content item-list">
        <div class="item">
            <h3>First item</h3>
            <a href="#" class="btn btn-primary">Save</a>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam egestas scelerisque sapien</p>
            
        </div>
        <div class="item">
            <h3>Second item</h3>
            <a href="#" class="btn btn-primary">Save</a>
            <p>Sed rutrum scelerisque ultrices. Nam sed sapien massa, vitae adipiscing augue.</p>
            
        </div>
        <div class="item">
            <h3>Last item</h3>
            <a href="#" class="btn btn-primary">Save</a>
            <p>Donec suscipit justo id quam vehicula feugiat.</p>
            
        </div>
    </div>
</div>
<div class="overall"></div>

CSS

* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: all 0.5s ease;
  -moz-transition:    all 0.5s ease;
  -ms-transition:     all 0.5s ease;
  -o-transition:      all 0.5s ease;
}
body{
  font-family: Arial;
  font-size: 85%;
}
strong{
  font-weight: bold;
}
#presentation{
  padding: 20px;
}
#presentation h2{
  font-size: 130%;
}
#presentation p{
  line-height: 25px;
}
.handle{
  display: block;    
}
.overall{
  z-index: -250;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: gray;
  opacity: 0;
}
#main-control{
  position: fixed;
  background: #0A0A0A;
  bottom: -100%;
  width: 100%;
  height: 100%;
  color: white;
  z-index: 500;
}
#main-control .handle{    
  height: 90px;
  width: 90px;   
  margin: 0 auto;    
  margin-top: -50px;
  background: #9DD4DB; 
  text-align: center;    
  -webkit-border-radius: 70px;
  -moz-border-radius: 70px;
  border-radius: 70px;
  padding-top: 20px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  font-style: italic;
  text-shadow: 0px 1px 0px #90c8ce;
  filter: dropshadow(color=#68969b, offx=0, offy=1);
  border: 5px solid white;
  font-size: 120%;
    
}
#main-control .handle:hover{
  background: #92cad1;
  margin-top: -60px;
}
.btn{
  display: block;
  font-size: 82%;
  padding: 7px 14px;
  font-weight: bold;
  text-decoration: none;
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
}
.btn-primary{
  background: #49af00;
  color: white;
  border: 1px solid #29691D;
  text-shadow: 0px 1px 0px #1a3f00;
  filter: dropshadow(color=#1a3f00, offx=0, offy=1);
}
.btn-primary:hover{
  background: #3B8F00;
}
.item-list{
  margin-left: 10%;
  margin-right: 10%;
  margin-top: 20px;
}
.item-list .item{
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #262626;
}
.item-list .item::after{
  clear: both;
  content: '';
  display: block;
}
.item-list...

JavaScript

$(document).ready(function() {

    $('#main-control .handle').click(function() {
        
        $this = $(this);
        $('.overall').css('z-index', '250');
        $('.overall').css('opacity', '0.3');

        $this.parent().css('bottom', '-10%');
        $this.css('margin-top', '20px');
        $this.css('padding-top', '31px');
        event.preventDefault();
    });
    $('.overall').click(function(){
        $(this).css('z-index', '-250');
        $(this).css('opacity', '0');
        
        $('#main-control').css('bottom', '-100%');
        $this.css('margin-top', '-50px');
        $this.css('padding-top', '20px');
    });
});