-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost.html.php
More file actions
88 lines (79 loc) · 3.67 KB
/
post.html.php
File metadata and controls
88 lines (79 loc) · 3.67 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php if (!defined('HTMLY')) die('HTMLy'); ?>
<article class="post post--text <?php if (!empty($p->link)): ?>post--link<?php endif;?> <?php if (!empty($p->quote)): ?>post--quote<?php endif;?>">
<header class="post__header">
<h1 class="post__title">
<?php if (!empty($p->link)) { ?>
<a href="<?php echo $p->link;?>" target="_blank"><?php echo $p->title;?></a>
<?php } elseif (!empty($p->quote)) {?>
<?php echo $p->quote;?>
<?php } else {?>
<?php echo $p->title;?>
<?php }?>
</h1><!-- /.post__title -->
<span class="post__date"><?php echo i18n("Posted_on");?> <a href="<?php echo $p->url;?>"><time class="entry-date published updated"><?php echo format_date($p->date) ?></time></a> <?php echo i18n("by");?>
<a href="<?php echo $p->authorUrl;?>"><?php echo $p->authorName;?></a> -
<?php echo $p->category;?>
<?php if (authorized($p)) { echo '<span class="sep"> |</span> <span><a href="'. $p->url .'/edit?destination=post">Edit</a></span>'; } ?>
</span>
</header><!-- /.post__header -->
<?php if (!empty($p->image)):?>
<div class="featured-wrapper">
<img style="width:100%;" title="<?php echo $p->title; ?>" alt="<?php echo $p->title; ?>" class="attachment-post-thumbnail" src="<?php echo $p->image; ?>">
</div>
<?php endif; ?>
<?php if (!empty($p->audio)):?>
<div class="featured-wrapper">
<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 endif; ?>
<?php if (!empty($p->video)):?>
<div class="featured-wrapper">
<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 endif; ?>
<div class="post__content">
<?php echo $p->body; ?>
</div><!-- /.post__content -->
<footer class="post__footer">
<div class="tags"><?php echo $p->tag;?></div>
<ul class="post__options">
<li class="post__options-item">
<a href="https://www.facebook.com/sharer.php?u=<?php echo $p->url ?>&t=<?php echo $p->title ?>" class="post__option">
<i class="icon-facebook"></i>
</a><!-- /.post__option -->
</li><!-- /.post__options-item -->
<li class="post__options-item">
<a href="https://twitter.com/share?url=<?php echo $p->url ?>&text=<?php echo $p->title ?>" class="post__option">
<i class="icon-twitter"></i>
</a><!-- /.post__option -->
</li><!-- /.post__options-item -->
</ul><!-- /.post__options -->
</footer><!-- /.post__footer -->
</article><!-- /.post -->
<?php if (disqus()): ?>
<?php echo disqus($p->title, $p->url) ?>
<?php endif; ?>
<?php if (facebook() || disqus()): ?>
<div class="comments-area" id="comments">
<?php if (facebook()): ?>
<div class="fb-comments" data-href="<?php echo $p->url ?>" data-numposts="<?php echo config('fb.num') ?>" data-colorscheme="<?php echo config('fb.color') ?>"></div>
<?php endif; ?>
<?php if (disqus()): ?>
<div id="disqus_thread"></div>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="related entry-content">
<h3><strong><?php echo i18n('Related_posts');?></strong></h3>
<?php echo get_related($p->related);?>
</div>
<?php if (!empty($next) || !empty($prev)): ?>
<nav class="pagination">
<?php if (!empty($next)): ?>
<a href="<?php echo($next['url']); ?>" class="pagination__item pagination__item--previous"><?php echo i18n("Next_post");?></a>
<?php endif; ?>
<?php if (!empty($prev)): ?>
<a href="<?php echo($prev['url']); ?>" class="pagination__item pagination__item--next"><?php echo i18n("Prev_post");?></a>
<?php endif; ?>
</nav>
<?php endif; ?>