-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-gallery.php
60 lines (43 loc) · 2.27 KB
/
page-gallery.php
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/*
Template Name: Gallery
*/
get_header(); ?>
<div id="content">
<div class="row">
<?php //get_sidebar(); ?>
<!-- Main Blog Content -->
<div class="twelve columns" role="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
<section class="entry-content clearfix" itemprop="articleBody">
<?php the_content(); ?>
</section> <!-- end article section -->
<footer class="article-footer">
<?php the_tags('<p class="tags"><span class="tags-title">Tags:</span> ', ', ', '</p>'); ?>
</footer> <!-- end article footer -->
<?php comments_template(); ?>
</article> <!-- end article -->
<?php endwhile; ?>
<?php endif; ?>
</div> <!-- end #main -->
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<?php get_footer(); ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
var $container = $('#sf_gallery'), $imgs = $container.find('img').show(), totalImgs = $imgs.length, cnt = 0;
$imgs.each(function(i) {
var $img = $(this);
jQuery('<img/>').load(function() {++cnt;
if (cnt === totalImgs) {
$imgs.show();
$container.montage({
maxh : 320,
margin : 0
});
}
}).attr('src', $img.attr('src'));
});
});
</script>