"Blog Layout"
Bootstrap 3.1.0 Snippet by cyberwani

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="background"></div>
<a id="fullscreen" href="http://bootsnipp.com/iframe/846vX">Looks Best In Fullscreen (Click Here)</a>
<div id="posts" class="col-xs-11 col-sm-4 col-md-3">
<a href="#post-1001">
<img class="col-xs-4" src="http://d.gr-assets.com/books/1358275334l/2767052.jpg" alt="The Hunger Games">
The Hunger Games
<div class="clearfix"></div>
</a>
<a href="#post-1002">
<img class="col-xs-4" src="http://d.gr-assets.com/books/1387141547l/2.jpg" alt="Harry Potter and the Order of the Phoenix">
Harry Potter and the Order of the Phoenix
<div class="clearfix"></div>
</a>
<a href="#post-1003">
<img class="col-xs-4" src="http://d.gr-assets.com/books/1361482611l/6.jpg" alt="Harry Potter and the Order of the Phoenix">
Harry Potter and the Goblet of Fire
<div class="clearfix"></div>
</a>
<a href="#post-1004">
<img class="col-xs-4" src="http://d.gr-assets.com/books/1362278317l/5.jpg" alt="Harry Potter and the Prisoner of Azkaban">
Harry Potter and the Prisoner of Azkaban
<div class="clearfix"></div>
</a>
<a href="#post-1005">
<img class="col-xs-4" src="http://d.gr-assets.com/books/1361039443l/41865.jpg" alt="Twilight">
Twilight
<div class="clearfix"></div>
</a>
<a href="#post-1006">
<img class="col-xs-4" src="http://d.gr-assets.com/books/1361039191l/1.jpg" alt="Harry Potter and the Half-Blood Prince">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
body {
min-height: 420px;
}
#fullscreen {
position: absolute;
top: 10px;
left: 50%;
margin-left: -248px;
color: rgb(255, 255, 255);
text-shadow: 0px 0px 5px rgba(51, 51, 51, 0.8);
font-size: 1.7em;
font-weight: bold;
}
.background {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-image: url(https://s3.amazonaws.com/ooomf-com-files/ikZyw45kT4m16vHkHe7u_9647713235_29ce0305d2_o.jpg);
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
#posts {
position: fixed;
top: 0px;
left: 0px;
height: 100%;
background-color: rgba(255, 255, 255, 0.7);
overflow: auto;
-webkit-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-ms-transition: all 0.5s ease-in-out;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$(function () {
if (window.location == window.parent.location) {
$('#fullscreen').text('Go back to Blog Layout Snippet on Bootsnipp (Click Here)');
$('#fullscreen').attr('href', 'http://bootsnipp.com/mouse0270/snippets/846vX');
$('#fullscreen').css('margin-left','-391.5px')
}
$('#fullscreen').on('click', function(event) {
event.preventDefault();
window.parent.location = $('#fullscreen').attr('href');
});
$('#toggle_posts').on('click', function(event) {
event.preventDefault();
$('#posts').toggleClass('open');
});
$('a[href^="#post-"]').on('click', function(event) {
event.preventDefault();
$('article.active').removeClass('active');
$('#comments').removeClass('active');
var percentage = parseInt($(window).width()) - parseInt($(this).css('width'));
percentage = percentage / parseInt($(window).width());
percentage = percentage * 100;
if (percentage <= 20) {
$('#posts').removeClass('open');
}
// THIS IS WHERE AJAX CODE WOULD GO TO LOAD ARTICLES DYNAMICALLY
$($(this).attr('href')).addClass('active');
});
$('a[href^="#comments-"]').on('click', function(event) {
event.preventDefault();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: