forked from starburst1977/readium
-
Notifications
You must be signed in to change notification settings - Fork 2
/
single.php
151 lines (125 loc) · 8.11 KB
/
single.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
get_header();
if(have_posts()) : while(have_posts()) : the_post();
if(has_post_thumbnail()) {
$featured_image = w_get_thumbnail_url('large');
}
else {
$featured_image = false;
}
if(ot_get_option('site_coverphoto')) {
$cover = ot_get_option('site_coverphoto');
}
else {
$cover = get_stylesheet_directory_uri() . '/assets/img/santiagum-cover.jpg';
}
?>
<!-- content -->
<main class="content" role="main">
<article class="post<?php if($featured_image) : ?> tag-articleimage<?php endif; ?>">
<?php if($featured_image) : ?>
<!-- article image -->
<div class="article-image">
<div class="post-image-image" style="background-image: url(<?php echo $featured_image; ?>);"></div>
<div class="post-meta">
<h1 class="post-title"><?php the_title(); ?></h1>
<div class="cf post-meta-text">
<div class="author-image" style="background-image: url(<?php echo w_get_avatar_url(get_the_author_meta('ID'), 30); ?>);"></div>
<h4 class="author-name"><?php the_author(); ?></h4> on
<time datetime="<?php the_time('Y-m-d'); ?>"><?php the_time('F j, Y'); ?></time> on <?php the_category(', ') ?>
</div>
<center><a href="#topofpage" class="topofpage doscroll"><i class="fa fa-angle-down"></i></a></center>
</div>
</div>
<!-- /article image -->
<?php else : ?>
<div class="noarticleimage">
<div class="post-meta">
<h1 class="post-title"><?php the_title(); ?></h1>
<div class="cf post-meta-text">
<div class="author-image" style="background-image: url(<?php echo w_get_avatar_url(get_the_author_meta('ID'), 30); ?>);"></div>
<h4 class="author-name"><?php the_author(); ?></h4> on
<time datetime="<?php the_time('Y-m-d'); ?>"><?php the_time('F j, Y'); ?></time> on <?php the_category(', ') ?>
</div>
</div>
</div>
<br>
<br>
<br>
<?php endif; ?>
<!-- post content -->
<section class="post-content">
<div class="post-reading">
<span class="post-reading-time"></span> read
</div>
<div id="topofpage"></div>
<?php the_content(); ?>
</section>
<!-- /post content -->
<!-- post footer -->
<footer class="post-footer cf">
<section class="tags">
Tags: <?php the_tags('', ', '); ?>
</section>
<section class="share">
Share this post on
<?php
if(ot_get_option('site_tw_url')) {
$twitter_username = parse_url(ot_get_option('site_tw_url'));
$twitter_username = $twitter_username['path'];
}
else {
$twitter_username = false;
}
if($twitter_username) :
?>
<a href="http://twitter.com/intent/tweet?url=<?php echo urldecode(get_permalink($post->ID)); ?>&text=<?php echo urldecode(get_the_title($post->ID)); ?>&hashtags=&via=<?php echo $twitter_username; ?>" onclick="window.open(this.href, 'twitter-share', 'width=550,height=290'); return false;"><i class="fa fa-twitter"></i><span class="hidden">Twitter</span></a>
<?php else : ?>
<a href="http://twitter.com/intent/tweet?url=<?php echo urldecode(get_permalink($post->ID)); ?>&text=<?php echo urldecode(get_the_title($post->ID)); ?>" onclick="window.open(this.href, 'twitter-share', 'width=550,height=290'); return false;"><i class="fa fa-twitter"></i><span class="hidden">Twitter</span></a>
<?php endif; ?>
<a href="https://www.facebook.com/sharer/sharer.php?u=<?php get_permalink($post->ID); ?>" onclick="window.open(this.href, 'facebook-share','width=550,height=290'); return false;"><i class="fa fa-facebook"></i><span class="hidden">Facebook</span></a>
</section>
</footer>
<!-- /post footer -->
<!-- bottom teaser -->
<div class="bottom-teaser cf">
<div class="isLeft">
<h5 class="index-headline featured"><span>Written by</span></h5>
<section class="author">
<div class="author-image" style="background-image: url(<?php echo w_get_avatar_url(get_the_author_meta('ID'), 80); ?>);"></div>
<h4><?php the_author(); ?></h4>
<p class="bio"><?php the_author_meta('description'); ?></p>
<hr>
<p class="published">Published on <time datetime="<?php the_time('Y-m-d'); ?>"><?php the_time('F j, Y'); ?></time></p>
</section>
</div>
<div class="isRight">
<h5 class="index-headline featured"><span>Supported by</span></h5>
<footer class="site-footer">
<section class="poweredby">Proudly powered by <a href="http://wordpress.org/" rel="external"> WordPress</a> & <a href="http://juanpablob.com/santiagum/" rel="external">Santiagum Theme</a></section>
<a class="subscribe" href="<?php bloginfo('rss2_url'); ?>"><span class="tooltip">Subscribe to my RSS feed.</span></a>
<div class="inner">
<section class="copyright">All content copyright <a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a> © <?php echo date('Y'); ?><br>Some rights reserved.</section>
</div>
</footer>
</div>
</div>
<!-- /bottom teaser -->
</article>
<?php comments_template(); ?>
</main>
<!-- /content -->
<?php endwhile; endif; ?>
<!-- bottom closer -->
<div class="bottom-closer">
<div class="background-closer-image" style="background-image: url(<?php echo $cover; ?>);"></div>
<div class="inner">
<h1 class="blog-title"><?php bloginfo('name'); ?></h1>
<h2 class="blog-description"><?php bloginfo('description'); ?></h2>
<a href="<?php bloginfo('url'); ?>" class="btn">Back to Home</a>
</div>
</div>
<!-- /bottom closer -->
</div>
<!-- /wrapper -->
<?php get_footer();?>