-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
38 lines (28 loc) · 882 Bytes
/
index.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
<?php
get_header();
if(have_posts()):
$IdCounter = 0;
while(have_posts()): the_post(); $IdCounter++;?>
<div class="block post_list" id="<?php echo $IdCounter; ?>">
<?php if(has_post_thumbnail()):?>
<div style="width:40%;min-width:40%;padding:20px;">
<img src="<?php the_post_thumbnail_url(); ?>">
</div>
<?php endif; ?>
<div style="padding:20px;">
<h2 class="post_title" onclick="change_zoom_css(<?php echo $IdCounter; ?>);"><a href="<?php the_permalink(); ?>"><?php the_title();?></a></h2>
<?php the_excerpt();?>
</div>
</div>
<script>
function change_zoom_css(id){
document.getElementById(id).classList.add("block_zoom");
}
</script>
<?php
endwhile;
else:
echo "No posts yet.";
endif;
get_footer();
?>