Browse Source

Styling the blog theme

pull/189/head
Danang Probo Sayekti 10 years ago
parent
commit
14df75d6e4
6 changed files with 58 additions and 57 deletions
  1. +3
    -2
      system/includes/functions.php
  2. +9
    -18
      themes/blog/css/styles.css
  3. +41
    -32
      themes/blog/layout.html.php
  4. +3
    -3
      themes/blog/post.html.php
  5. +1
    -1
      themes/blog/profile.html.php
  6. +1
    -1
      themes/blog/static.html.php

+ 3
- 2
system/includes/functions.php View File

@ -824,7 +824,6 @@ function popular_posts($custom = null, $count = null)
if(empty($custom)) { if(empty($custom)) {
echo '<ul><li>No popular posts found</li></ul>'; echo '<ul><li>No popular posts found</li></ul>';
} else { } else {
echo '<ul><li>No popular posts found</li></ul>';
return $tmp; return $tmp;
} }
} }
@ -1952,7 +1951,9 @@ EOF;
echo '<li><a href="' . $base . 'admin">Admin</a></li>'; echo '<li><a href="' . $base . 'admin">Admin</a></li>';
if ($role === 'admin') { if ($role === 'admin') {
echo '<li><a href="' . $base . 'admin/posts">Posts</a></li>'; echo '<li><a href="' . $base . 'admin/posts">Posts</a></li>';
echo '<li><a href="' . $base . 'admin/popular">Popular</a></li>';
if (config('views.counter') == 'true') {
echo '<li><a href="' . $base . 'admin/popular">Popular</a></li>';
}
} }
echo '<li><a href="' . $base . 'admin/mine">Mine</a></li>'; echo '<li><a href="' . $base . 'admin/mine">Mine</a></li>';
echo '<li><a href="' . $base . 'admin/draft">Draft</a></li>'; echo '<li><a href="' . $base . 'admin/draft">Draft</a></li>';


+ 9
- 18
themes/blog/css/styles.css View File

@ -325,6 +325,12 @@ iframe {
.section { .section {
margin-bottom: 30px; margin-bottom: 30px;
} }
.inpost.section, .inpage.section, .inprofile.section, .comment-wrapper.section, .tags.section, .section.last {
margin-bottom: 0px;
}
.comment-wrapper.section {
margin-top:30px;
}
.section .section-inner { .section .section-inner {
background: #fff; background: #fff;
padding: 30px; padding: 30px;
@ -421,6 +427,9 @@ iframe {
.tab { .tab {
margin-bottom: 20px; margin-bottom: 20px;
} }
.pager {
margin-top:30px;
}
/* share section */ /* share section */
.share{ .share{
@ -456,24 +465,6 @@ iframe {
margin-bottom: 0; margin-bottom: 0;
} }
/* popular-posts Section */
.popular-posts .item {
margin-bottom: 20px;
}
.popular-posts .item .title {
font-size: 16px;
line-height: 1.3;
}
.popular-posts .item .title a {
color: #778492;
}
.popular-posts .item .title a:hover {
color: #5f6b77;
}
.popular-posts .item:last-child {
margin-bottom: 0;
}
/* archive Section */ /* archive Section */
ul.archivegroup { ul.archivegroup {
margin: 0; margin: 0;


+ 41
- 32
themes/blog/layout.html.php View File

@ -100,40 +100,50 @@
</aside><!--//section--> </aside><!--//section-->
<aside class="recent-posts aside section"> <aside class="recent-posts aside section">
<div class="section-inner"> <div class="section-inner">
<h2 class="heading">Latest Blog Posts</h2>
<?php $lists = recent_posts(true);?>
<?php $char = 60;?>
<?php foreach ($lists as $l):?>
<?php if (strlen(strip_tags($l->title)) > $char) { $recentTitle = shorten($l->title, $char) . '...';} else {$recentTitle = $l->title;}?>
<div class="item">
<h3 class="title"><a href="<?php echo $l->url;?>"><?php echo $recentTitle;?></a></h3>
<div class="content">
<p><?php echo shorten($l->body, 75); ?>...</p>
<a class="more-link" href="<?php echo $l->url;?>"><i class="fa fa-link"></i> Read more</a>
</div><!--//content-->
</div>
<?php endforeach;?>
</div><!--//section-inner-->
</aside><!--//section-->
<?php if (config('views.counter') === 'true') :?>
<aside class="popular-posts aside section">
<div class="section-inner">
<h2 class="heading">Popular Blog Posts</h2>
<?php $lists = popular_posts(true);?>
<?php $char = 60;?>
<?php foreach ($lists as $l):?>
<?php if (strlen(strip_tags($l->title)) > $char) { $recentTitle = shorten($l->title, $char) . '...';} else {$recentTitle = $l->title;}?>
<div class="item">
<h3 class="title"><a href="<?php echo $l->url;?>"><?php echo $recentTitle;?></a></h3>
<div class="content">
<p><?php echo shorten($l->body, 75); ?>...</p>
<a class="more-link" href="<?php echo $l->url;?>"><i class="fa fa-link"></i> Read more</a>
</div><!--//content-->
<!-- Tab nav -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#recent-posts" aria-controls="recent-posts" role="tab" data-toggle="tab">Recent Posts</a></li>
<?php if (config('views.counter') === 'true') :?>
<li role="presentation"><a href="#popular-posts" aria-controls="popular-posts" role="tab" data-toggle="tab">Popular Posts</a></li>
<?php endif;?>
</ul>
<!-- Tab content -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="recent-posts">
<h2 class="hide">Recent Posts</h2>
<?php $lists = recent_posts(true);?>
<?php $char = 60;?>
<?php foreach ($lists as $l):?>
<?php if (strlen(strip_tags($l->title)) > $char) { $recentTitle = shorten($l->title, $char) . '...';} else {$recentTitle = $l->title;}?>
<div class="item">
<h3 class="title"><a href="<?php echo $l->url;?>"><?php echo $recentTitle;?></a></h3>
<div class="content">
<p><?php echo shorten($l->body, 75); ?>...</p>
<a class="more-link" href="<?php echo $l->url;?>"><i class="fa fa-link"></i> Read more</a>
</div><!--//content-->
</div>
<?php endforeach;?>
</div>
<?php if (config('views.counter') === 'true') :?>
<div role="tabpanel" class="tab-pane" id="popular-posts">
<h2 class="hide">Popular Posts</h2>
<?php $lists = popular_posts(true);?>
<?php $char = 60;?>
<?php foreach ($lists as $l):?>
<?php if (strlen(strip_tags($l->title)) > $char) { $recentTitle = shorten($l->title, $char) . '...';} else {$recentTitle = $l->title;}?>
<div class="item">
<h3 class="title"><a href="<?php echo $l->url;?>"><?php echo $recentTitle;?></a></h3>
<div class="content">
<p><?php echo shorten($l->body, 75); ?>...</p>
<a class="more-link" href="<?php echo $l->url;?>"><i class="fa fa-link"></i> Read more</a>
</div><!--//content-->
</div>
<?php endforeach;?>
</div>
<?php endif;?>
</div> </div>
<?php endforeach;?>
</div><!--//section-inner--> </div><!--//section-inner-->
</aside><!--//section--> </aside><!--//section-->
<?php endif;?>
<?php if (disqus()): ?> <?php if (disqus()): ?>
<aside class="comments aside section"> <aside class="comments aside section">
<div class="section-inner"> <div class="section-inner">
@ -153,7 +163,6 @@
</div><!--//content--> </div><!--//content-->
</div><!--//section-inner--> </div><!--//section-inner-->
</aside><!--//section--> </aside><!--//section-->
<aside class="tags aside section"> <aside class="tags aside section">
<div class="section-inner"> <div class="section-inner">
<h2 class="heading">Tags</h2> <h2 class="heading">Tags</h2>


+ 3
- 3
themes/blog/post.html.php View File

@ -1,7 +1,7 @@
<?php if (!empty($breadcrumb)): ?> <?php if (!empty($breadcrumb)): ?>
<div class="breadcrumb"><?php echo $breadcrumb ?></div> <div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?> <?php endif; ?>
<section class="post section" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
<section class="inpost post section" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
<div class="section-inner"> <div class="section-inner">
<div class="content"> <div class="content">
<?php if (login()) { echo tab($p); } ?> <?php if (login()) { echo tab($p); } ?>
@ -94,7 +94,7 @@
</div><!--//section-inner--> </div><!--//section-inner-->
</section><!--//section--> </section><!--//section-->
<?php if (facebook() || disqus()): ?> <?php if (facebook() || disqus()): ?>
<section class="post section">
<section class="comment-wrapper post section">
<div class="section-inner"> <div class="section-inner">
<div class="content"> <div class="content">
<div id="comments"> <div id="comments">
@ -109,4 +109,4 @@
</div><!--//content--> </div><!--//content-->
</div><!--//section-inner--> </div><!--//section-inner-->
</section><!--//section--> </section><!--//section-->
<?php endif; ?>
<?php endif; ?>

+ 1
- 1
themes/blog/profile.html.php View File

@ -1,7 +1,7 @@
<?php if (!empty($breadcrumb)): ?> <?php if (!empty($breadcrumb)): ?>
<div class="breadcrumb"><?php echo $breadcrumb ?></div> <div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?> <?php endif; ?>
<section class="post section">
<section class="inprofile post section">
<div class="section-inner"> <div class="section-inner">
<div class="content"> <div class="content">
<div class="item" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="Person"> <div class="item" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="Person">


+ 1
- 1
themes/blog/static.html.php View File

@ -1,7 +1,7 @@
<?php if (!empty($breadcrumb)): ?> <?php if (!empty($breadcrumb)): ?>
<div class="breadcrumb"><?php echo $breadcrumb ?></div> <div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?> <?php endif; ?>
<section class="post section" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
<section class="inpage post section" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
<div class="section-inner"> <div class="section-inner">
<div class="content"> <div class="content">
<?php if (login()) { echo tab($p); } ?> <?php if (login()) { echo tab($p); } ?>


Loading…
Cancel
Save