This repository has been archived by the owner on May 11, 2023. It is now read-only.
forked from simgia/infocongo
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathloop.php
73 lines (65 loc) · 2.18 KB
/
loop.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
61
62
63
64
65
66
67
68
69
70
71
72
73
<ul class="list-posts row">
<?php while(have_posts()) : the_post(); ?>
<li id="post-<?php the_ID(); ?>" <?php post_class('post-item four columns'); ?>>
<article class="loop-item">
<header class="post-header">
<div class="loop-list-thumb">
<?php
if(has_post_thumbnail()) {
echo '<a href="' . get_permalink() .'" title="' . get_the_title() . '">' . get_the_post_thumbnail($post->ID, 'loop-list') . '</a>';
} else {
echo ' <div class="nothumb loop-list"></div>';
}
?>
</div>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"></a>
<h2 class="loop-post-title"><a href="<?php the_permalink(); ?>"><?php echo title(10); ?></a></h2>
</header>
<div class="post-content">
<?php echo excerpt(20); ?>
</div>
<footer class="post-actions">
<div class="buttons">
<a class="button" href="<?php the_permalink(); ?>"><?php _e('Read more', 'infoamazonia'); ?></a>
<a class="button" href="<?php echo jeo_get_share_url(array('p' => $post->ID)); ?>"><?php _e('Share', 'infoamazonia'); ?></a>
</div>
</footer>
</article>
</li>
<?php endwhile; ?>
</ul>
<div class="twelve columns">
<?php if(function_exists('wp_paginate')) wp_paginate(); ?>
</div>
<script type="text/javascript">
(function($) {
$(document).ready(function() {
$('.list-posts').imagesLoaded(function() {
var $media = $('.list-posts .media-limit img');
$media.each(function() {
var containerHeight = $(this).parents('.media-limit').height();
var imageHeight = $(this).height();
var topOffset = (containerHeight - imageHeight) / 2;
if(topOffset < 0) {
$(this).css({
'margin-top': topOffset
});
}
});
});
});
jeo.mapReady(function(map) {
$('.list-posts li').click(function() {
var markerID = $(this).attr('id');
$('html,body').animate({
scrollTop: $('#stage').offset().top
}, 400);
map.markers.openMarker(markerID, false);
return false;
});
$('.list-posts li .button').click(function() {
window.location = $(this).attr('href');
});
});
})(jQuery);
</script>