-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.html.php
More file actions
50 lines (50 loc) · 2.68 KB
/
Copy pathmain.html.php
File metadata and controls
50 lines (50 loc) · 2.68 KB
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
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
<?php foreach ($posts as $p): ?>
<article class="preview">
<header>
<?php if (!empty($p->link)) { ?>
<div class="featured featured-link">
<h2 class="post-title"><a target="_blank" href="<?php echo $p->link ?>"><?php echo $p->title ?> <i class="fa fa-external-link"></i></a></h2>
</div>
<?php } else { ?>
<h2 class="post-title"><a href="<?php echo $p->url; ?>"><?php echo $p->title; ?></a></h2>
<?php } ?>
<div class="post-meta"><time><?php echo format_date($p->date); ?></time></div>
</header>
<?php if (!empty($p->image)) { ?>
<div class="featured featured-image">
<a href="<?php echo $p->url; ?>"><img itemprop="image" width="100%" src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured featured-video">
<iframe width="100%" height="315px;" class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo get_video_id($p->video); ?>" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<?php if (!empty($p->audio)) { ?>
<div class="featured featured-audio">
<iframe width="100%" height="200px;" class="embed-responsive-item" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&auto_play=false&visual=true"></iframe>
</div>
<?php } ?>
<?php if (!empty($p->quote)) { ?>
<div class="featured featured-quote">
<blockquote class="quote"><p><i class="fa fa-quote-left"></i> <?php echo $p->quote ?> <i class="fa fa-quote-right"></i></p></blockquote>
</div>
<?php } ?>
<section class="post-excerpt">
<?php echo get_teaser($p->body, $p->url); ?>
<?php if (config('teaser.type') === 'trimmed'):?><p class="readmore"><a href="<?php echo $p->url; ?>"><?php echo config('read.more'); ?> <i class="fa fa-chevron-circle-right"></i></a></p><?php endif;?>
</section>
</article>
<?php endforeach;?>
<?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
<nav class="pagination" role="pagination">
<?php if (!empty($pagination['prev'])): ?>
<a class="newer-posts" href="?page=<?php echo $page - 1 ?>"><i class="fa fa-chevron-circle-left"></i> <?php echo i18n('Newer');?></a>
<?php endif; ?>
<?php echo $pagination['pagenum'];?>
<?php if (!empty($pagination['next'])): ?>
<a class="older-posts" href="?page=<?php echo $page + 1 ?>"><?php echo i18n('Older');?> <i class="fa fa-chevron-circle-right"></i></a>
<?php endif; ?>
</nav>
<?php endif; ?>