I'm looking to create a unique weekly plan layout that features three days of the week: today in the middle, yesterday on the left, and tomorrow on the right. I want this layout to update as the days progress so that clicking on the next day will display a new set of 3 days (with 3 panels always showing).
For example, if today is Friday:
Three columns are shown by default
Left: Thursday
Middle: Today = Friday
Right: Saturday
When the user clicks "previous":
Left: Wednesday
Middle: Thursday
Right: Friday
Link to Image
Implemented using Bootstrap...
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Justified Nav Template for Bootstrap</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/weekplan.css" rel="stylesheet">
</head>
<body>
<div class="container">
WEEK PLAN
<!-- ROW -->
<div id="weekplan" class="row">
<!-- Day 1 -->
<div class="col-md-4 eh hidden">
<div class="panel panel-default">
<div class="panel-heading">
<h3>Day 1 - Sunday</h3>
</div>
<div class="panel-body">
<p>Content here...</p>
<p><a class="btn btn-primary" href="#" role="button">View details »</a></p>
</div>
</div>
</div>
// Additional days follow...
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
CSS
body {
padding-top: 50px;
}
.footer {
padding-top: 40px;
padding-bottom: 40px;
margin-top: 40px;
border-top: 1px solid #eee;
}
.col-md-4{
border:1px solid #e0e0e0;
}
#weekplan {
display: table;
white-space: nowrap;
}
#weekplan .eh {
float: none;
display: table-cell;
vertical-align: top;
display: inline-block;
}
.panel-heading h3{
text-align: center;
}