Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<div class="container">
	<div class="row">
		<h1>Calendar of Events</h1>
	</div>
	<div class="row col-2">
		<aside class="eventKey">
			<h2>Event Key</h2>
			<div class="tradeShow">Trade Show</div>
			<div class="holiday">Holiday</div>
			<div class="meeting">Meeting</div>
			<div class="birthday">Birthday</div>
		</aside>
		<article>
      <h3 class="monthYear"><span>,</span> July 2014 </h3>
		  <ul class="days">
		    <li>Sun</li>
		    <li>Mon</li>
		    <li>Tues</li>
		    <li>Wed</li>
		    <li>Thurs</li>
		    <li>Fri</li>
		    <li>Sat</li>
		  </ul>
			<ul class="dates">
        <li class="fade"><span class="date">29</span></li>
        <li class="fade"><span class="date">30</span></li>
				<li><span class="date">1</span></li>
				<li>
          <section class="dateWrapper">
					<span class="date">2</span>
					<div class="multidayHolder"><a href="#" class="multidayEvent tradeShow length-2">Independence Tade Show <span>2 - 3</span></a></div>
          </section>
				</li>
				<li class="current today">
            <section class="dateWrapper">
              <span class="date">3</span>
              <div class="multidayHolder"><a href="#" class="multidayEvent tradeShow secondaryDay">Independence Trade Show <span>2 - 3</span></a></div>
              <a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a>
              <a href="#" class="meeting"><b>4:30 PM</b> Trade Show Wrap Meeting</a>
              <a href="#" class="expand"><span> + </span></a>
             </section>
		    	</li>
				<li><span class="date">4</span>
          <a href="#" class="holiday">U.S. Independence Day <span>4th of July</span></a>
		        </li>
				<li><span class="date">5</span></li>
				<li><span class="date">6</span></li>
				<li><span class="date">7</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">8</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">9</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">10</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">11</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">12</span></li>
				<li><span class="date">13</span></li>
				<li><span class="date">14</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">15</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li>
					<span class="date">16</span>
					<div class="multidayHolder"><a href="#" class="multidayEvent tradeShow length-3">Trade Show <span>16 - 18</span></a></div> <a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a>
				</li>
				<li>
					<span class="date">17</span>
					<div class="multidayHolder"><a href="#" class="multidayEvent tradeShow secondaryDay">Trade Show <span>16 - 18</span></a></div> <a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a>
				</li>
				<li>
					<span class="date">18</span>
					<div class="multidayHolder"><a href="#" class="multidayEvent tradeShow secondaryDay">Trade Show <span>16 - 18</span></a></div> <a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a>
				</li>
				<li>
					<span class="date">19</span>
					<a href="http://amzn.com/w/HOLLMHU0B93L" target="_blank" class="birthday"><b>Jacob's Birthday</b> Buy him a gift!</a>
				</li>
				<li><span class="date">20</span></li>
				<li><span class="date">21</span> <a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">22</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">23</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">24</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">25</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">26</span></li>
				<li><span class="date">27</span></li>
				<li><span class="date">28</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">29</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li><span class="date">30</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
		     	<li><span class="date">31</span><a href="#" class="meeting"><b>8:30 AM</b> Daily Stand Up</a></li>
				<li class="fade"><span class="date">1</span></li>
				<li class="fade"><span class="date">2</span></li>
			</ul>
      <div class="calendarNav">
      	<a href="#prevDay" class="prevDay">Previous Day</a> 
      	<a href="#today" class="today">Current Day</a>
      	<a href="#" class="nextDay">Next Day</a>
      </div>
		</article>
	</div>
</div>
              
            
!

CSS

              
                body {
  background:#ebebeb;
  text-align:center;
  font-family: Helvetica,Arial,sans-serif;
}
h1 {
  font-size:32px;
  font-weight:100;
  margin-bottom:16px;
  margin:20px 0 40px;
}
h2 {
  font-size:14px;
  font-weight:100;
  margin-bottom:8px;
  margin-top:5px;
}
h3 { font-size:21px; }
.container { 
  max-width:900px;
  margin:0 auto;
  text-align:left;
  padding:0 20px;
}
.row { clear:both; }
.row:after {
  conttent:' ';
  display:block;
  clear:both;
}
.col-2 aside {
  width:20%;
  float:left;
}
.col-2 article {
  width:80%;
  float:left;
}

.eventKey div {
  display:inline-block;
  padding:4px;
  margin:4px 4px 4px 0;
  float:left;
  clear:both;
}
.monthYear { margin:0px 0 10px 0; padding:0 0 0 8px;}
.monthYear span { display:none; }
.days li {
  color:#333;
  border-bottom:1px solid #ccc;
  padding:4px 4px 4px 8px;
  text-transform:uppercase;
  font-size:13px;
}
.days li, .dates li {
  float:left;
  width:14.28%;
  position:relative;
  box-sizing:border-box;
}
.dates {
  border-right:1px solid #ccc;
}
.dates:after, .days:after {
  content:'';
  display:block;
  clear:both;
}
.dates li {
  border:1px solid #ccc;
  border-width:0 0 1px 1px;
  height:90px;
  margin:0;
  background:#fff;
}
.dateWrapper {
  max-height:90px;
  position:absolute;
  top:0;
  left:0;
  width:100%;
  transition: max-height 1s;
}
.dateWrapper.open {
  max-height:600px;
  z-index:10;
  padding-bottom:25px;
  background:#fff;
  border-bottom:1px solid #ccc;
  box-shadow:0 0 10px #333;
}
.dates li.fade {
  color:#ccc;
  opacity:0.6;
}
.date, .dates li a {
  display:block;
  padding:4px;
  text-align:right;
  font-size:13px;
}
.dates li a, .eventKey div {
  text-align:left;
  text-decoration:none;
  font-size: 12px;
  color:#fff;
  border-radius:2px;
}
.dates li a, .dates li div {
  margin:4px 2px 0;
}
.dates li a.expand {
  display:block;
  background:linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0) 26%,rgba(0,0,0,0.50) 100%);
  position:absolute;
  bottom:0px;
  left:0;
  width:100%;
  text-align:left;
  padding:4px 0 0 0;
  margin:0;
  border-radius:0;
}
.dates li a.expand.open {
  
}
.dates li a.expand span {
  display:inline-block;
  float:right;
  padding:4px 8px;
  transition: transform 1s ease-in-out;
  
}
.dates li a.expand.open span {
	transform: rotate(45deg);
  color:#333;
}

.dates li a b {
  font-weight:bold;
}
.multidayHolder {
  position:relative;
  height:20px;
  padding:0;
  margin:4px 0 0 0;
}
.dates li a.multidayEvent {
  position: absolute; 
  top:0;
  left:0;
  z-index:100;
  display:none;
  margin:0;
}
.multidayEvent span, .holiday span  { display:none;}
.dates li a.length-2 {width:196%; display:block; }
.dates li a.length-3 {width:301%; display:block;}
.tradeShow, .tradeShow:before { background:#e86542; color:#fff;}
.meeting, .meeting:before { background:#0359a6; color:#fff;}
.holiday, .holiday:before { background:#5fa8aa; color:#fff;}
.birthday, .birthday:before { background:#f8a805; color:#fff;}
.calendarNav {
  display:none;
}
@media (max-width: 744px) { 
  body {
    background:#fff;
  }
	.col-2 aside, .col-2 article {
    width:100%;
    float:none;
    clear:both;
  }
	.eventKey div {
    clear:none;
  }
  .monthYear { 
    padding:20px 0 20px 23px; 
    margin:0;
    border-bottom:1px solid #ccc;
  }
	.monthYear span { display:inline; }
	.days, .dates li, .dates li a.expand { display:none; }
  .dates li.current, .dates li a.multidayEvent, .calendarNav {
   display:block;
   position:static;
   width:auto;
  }
  .multidayHolder {
    height:auto;
  }
  .dates {border:none;}
  .dates li.current {
    width:100%;
    height:auto;
    border:none;
    position: relative;
    display:block;
  }
  .dateWrapper { width:100%; height:auto; position:static; max-height:1000px;}
  .date {
    text-align:left;
    position:absolute;
    top:-46px;
    left:0px;
    font-size:21px;
  }
  .multidayEvent span, .holiday span  {
    position:static;
    margin-top:4px;
    color:#999;
   display:block;
   text-align:left;
  }
  .dates li a {
    background:none;
    color:#333;
    position:relative;
    font-size:14px;
    padding:25px 0 25px 35px;
    margin:5px 0;
    border-bottom:1px solid #ccc;
    min-height:45px;
  }
  .dates li a:before {
    content: '';
    display: block;
    width: 17px;
    height: 17px;
    border-radius: 17px;
    position: absolute;
    top: 30%;
    left: 0;
  }
  .dates li a:after  {
    content: '';
    display:block;
    position: absolute;
    top:42%;
    right:20px;
    border:1px solid #ccc;
    border-width:1px 1px 0 0;
    width:15px;
    height:15px;
    transform: rotate(45deg);
  }
  .dates li a b { display:block; margin-bottom:4px; }
  .calendarNav {
    padding:20px 0;
    text-align:center;
  }
  .calendarNav a {
  	clear:both;
    display:inline-block;
    color:#333;
    text-decoration:none;
    padding:6px 10px;
    border-radius:4px;
    background:#d6d6d6;
    border:1px solid #999;
    border-width:0 1px 1px 0;
    margin-right:6px;
    font-size:14px;
  }
  
}
              
            
!

JS

              
                $('a.nextDay').click(function() { 
  $('li.current').next().addClass('current').prev().removeClass('current');
});
  $('a.prevDay').click(function() { 
  $('li.current').prev().addClass('current').next().removeClass('current');
});
$('a.today').click(function(){
  $('li.current').removeClass('current');
  $('li.today').addClass('current');
});
$('a.expand').click(function(){
  $(this).parent().toggleClass('open');
  $(this).toggleClass('open');
});
              
            
!
999px

Console