Browse Source

Improvements

Styling, performance tweak, and bugs fixes.
pull/189/head
Danang Probo Sayekti 10 years ago
parent
commit
db786347c6
17 changed files with 197 additions and 107 deletions
  1. +28
    -8
      system/admin/admin.php
  2. +2
    -2
      system/admin/views/add-post.html.php
  3. +2
    -2
      system/admin/views/edit-post.html.php
  4. +19
    -0
      system/admin/views/update.html.php
  5. +19
    -3
      system/htmly.php
  6. +5
    -16
      system/includes/functions.php
  7. +20
    -0
      themes/clean/css/style.css
  8. +10
    -12
      themes/clean/main.html.php
  9. +10
    -12
      themes/clean/post.html.php
  10. +20
    -0
      themes/default/css/style.css
  11. +1
    -1
      themes/default/layout.html.php
  12. +10
    -12
      themes/default/main.html.php
  13. +10
    -12
      themes/default/post.html.php
  14. +20
    -0
      themes/logs/css/style.css
  15. +1
    -3
      themes/logs/layout.html.php
  16. +10
    -12
      themes/logs/main.html.php
  17. +10
    -12
      themes/logs/post.html.php

+ 28
- 8
system/admin/admin.php View File

@ -86,7 +86,7 @@ function remove_accent($str)
} }
// Edit blog posts // Edit blog posts
function edit_post($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $fi, $vid)
function edit_post($title, $tag, $url, $content, $oldfile, $destination = null, $description = null, $date = null, $img, $vid)
{ {
$oldurl = explode('_', $oldfile); $oldurl = explode('_', $oldfile);
if ($date !== null) { if ($date !== null) {
@ -94,17 +94,27 @@ function edit_post($title, $tag, $url, $content, $oldfile, $destination = null,
} }
$post_title = $title; $post_title = $title;
$post_fi = $fi;
$post_img = $img;
$post_vid = str_replace(array("http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"), "", $vid); $post_vid = str_replace(array("http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"), "", $vid);
$post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag)); $post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag));
$post_tag = rtrim($post_tag, ',');
$post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url))); $post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url)));
if ($description !== null) { if ($description !== null) {
$post_description = "\n<!--d " . $description . " d-->"; $post_description = "\n<!--d " . $description . " d-->";
} else { } else {
$post_description = ""; $post_description = "";
} }
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . "\n\n" . $content;
$post_content = '<!--fi ' . $post_fi . ' fi-->' . "\n\n" . '<!--vid ' . $post_vid . ' vid-->' . "\n\n" . $post_content;
if ($img !== null) {
$post_img = "\n<!--img " . $post_img. " img-->";
} else {
$post_img = "";
}
if ($vid !== null) {
$post_vid = "\n<!--vid " . $post_vid. " vid-->";
} else {
$post_vid = "";
}
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_img . $post_vid ."\n\n" . $content;
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) { if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
if (get_magic_quotes_gpc()) { if (get_magic_quotes_gpc()) {
@ -182,22 +192,32 @@ function edit_page($title, $url, $content, $oldfile, $destination = null, $descr
} }
// Add blog post // Add blog post
function add_post($title, $tag, $url, $content, $user, $description = null, $fi, $vid)
function add_post($title, $tag, $url, $content, $user, $description = null, $img, $vid)
{ {
$post_date = date('Y-m-d-H-i-s'); $post_date = date('Y-m-d-H-i-s');
$post_title = $title; $post_title = $title;
$post_fi = $fi;
$post_img = $img;
$post_vid = str_replace(array("http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"), "", $vid); $post_vid = str_replace(array("http://", "https://", "www.", "youtube", ".com", "/watch?v=", "/embed/"), "", $vid);
$post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag)); $post_tag = preg_replace(array('/[^a-zA-Z0-9,.\-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($tag));
$post_tag = rtrim($post_tag, ',');
$post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url))); $post_url = strtolower(preg_replace(array('/[^a-zA-Z0-9 \-\p{L}]/u', '/[ -]+/', '/^-|-$/'), array('', '-', ''), remove_accent($url)));
if ($description !== null) { if ($description !== null) {
$post_description = "\n<!--d " . $description . " d-->"; $post_description = "\n<!--d " . $description . " d-->";
} else { } else {
$post_description = ""; $post_description = "";
} }
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . "\n\n" . $content;
$post_content = '<!--fi ' . $post_fi . ' fi-->' . "\n\n" . '<!--vid ' . $post_vid . ' vid-->' . "\n\n" . $post_content;
if ($img !== null) {
$post_img = "\n<!--img " . $post_img. " img-->";
} else {
$post_img = "";
}
if ($vid !== null) {
$post_vid = "\n<!--vid " . $post_vid. " vid-->";
} else {
$post_vid = "";
}
$post_content = '<!--t ' . $post_title . ' t-->' . $post_description . $post_img . $post_vid ."\n\n" . $content;
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) { if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
if (get_magic_quotes_gpc()) { if (get_magic_quotes_gpc()) {


+ 2
- 2
system/admin/views/add-post.html.php View File

@ -29,8 +29,8 @@
echo $p->description; echo $p->description;
} ?></textarea> } ?></textarea>
<br><br> <br><br>
Featured Image (optional)<br><input type="text" class="text" name="fi" value="<?php if (isset($postFi)) {
echo $postFi;
Featured Image (optional)<br><input type="text" class="text" name="img" value="<?php if (isset($postImg)) {
echo $postImg;
} ?>"/><br><br> } ?>"/><br><br>
Embed Youtube Video (optional)<br><input type="text" class="text" name="vid" value="<?php if (isset($postVid)) { Embed Youtube Video (optional)<br><input type="text" class="text" name="vid" value="<?php if (isset($postVid)) {
echo $postVid; echo $postVid;


+ 2
- 2
system/admin/views/edit-post.html.php View File

@ -7,7 +7,7 @@ if (isset($p->file)) {
$content = file_get_contents($url); $content = file_get_contents($url);
$oldtitle = get_content_tag('t', $content, 'Untitled'); $oldtitle = get_content_tag('t', $content, 'Untitled');
$oldfi = get_content_tag('fi', $content);
$oldimg = get_content_tag('img', $content);
$oldvid = get_content_tag('vid', $content); $oldvid = get_content_tag('vid', $content);
$oldcontent = remove_html_comments($content); $oldcontent = remove_html_comments($content);
@ -64,7 +64,7 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
echo $p->description; echo $p->description;
} ?></textarea> } ?></textarea>
<br><br> <br><br>
Featured Image (optional)<br><input type="text" class="text" name="fi" value="<?php echo $oldfi ?>"/><br><br>
Featured Image (optional)<br><input type="text" class="text" name="img" value="<?php echo $oldimg ?>"/><br><br>
Embed Youtube Video (optional)<br><input type="text" class="text" name="vid" value="<?php echo $oldvid ?>"/><br><br> Embed Youtube Video (optional)<br><input type="text" class="text" name="vid" value="<?php echo $oldvid ?>"/><br><br>
<div id="wmd-button-bar" class="wmd-button-bar"></div> <div id="wmd-button-bar" class="wmd-button-bar"></div>


+ 19
- 0
system/admin/views/update.html.php View File

@ -0,0 +1,19 @@
<?php
use \Kanti\HubUpdater;
$CSRF = get_csrf();
$updater = new HubUpdater(array(
'name' => 'danpros/htmly',
'prerelease' => !!config("prerelease"),
));
if ($updater->able()) {
$info = $updater->getNewestInfo();
echo '<h3>Update Available</h3>';
echo '<p><a href="' . $base . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . '</a></p>';
} else {
echo '<h3>No Available Update</h3>';
echo '<p>You are using the latest HTMLy version.</p>';
}

+ 19
- 3
system/htmly.php View File

@ -333,7 +333,7 @@ post('/:year/:month/:name/edit', function () {
$proper = is_csrf_proper(from($_REQUEST, 'csrf_token')); $proper = is_csrf_proper(from($_REQUEST, 'csrf_token'));
$title = from($_REQUEST, 'title'); $title = from($_REQUEST, 'title');
$fi = from($_REQUEST, 'fi');
$img = from($_REQUEST, 'img');
$vid = from($_REQUEST, 'vid'); $vid = from($_REQUEST, 'vid');
$tag = from($_REQUEST, 'tag'); $tag = from($_REQUEST, 'tag');
$url = from($_REQUEST, 'url'); $url = from($_REQUEST, 'url');
@ -352,7 +352,7 @@ post('/:year/:month/:name/edit', function () {
if (empty($url)) { if (empty($url)) {
$url = $title; $url = $title;
} }
edit_post($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $fi, $vid);
edit_post($title, $tag, $url, $content, $oldfile, $destination, $description, $dateTime, $img, $vid);
} else { } else {
$message['error'] = ''; $message['error'] = '';
if (empty($title)) { if (empty($title)) {
@ -374,7 +374,7 @@ post('/:year/:month/:name/edit', function () {
'error' => '<ul>' . $message['error'] . '</ul>', 'error' => '<ul>' . $message['error'] . '</ul>',
'oldfile' => $oldfile, 'oldfile' => $oldfile,
'postTitle' => $title, 'postTitle' => $title,
'postFi' => $fi,
'postImg' => $img,
'postVid' => $vid, 'postVid' => $vid,
'postTag' => $tag, 'postTag' => $tag,
'postUrl' => $url, 'postUrl' => $url,
@ -1292,6 +1292,22 @@ get('/feed/opml', function () {
echo generate_opml(); echo generate_opml();
}); });
// Update page
get('/admin/update', function () {
if (login()) {
config('views.root', 'system/admin/views');
render('update', array(
'head_contents' => head_contents('Check for Update - ' . blog_title(), blog_description(), site_url()),
'bodyclass' => 'updatepage',
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; Update HTMLy'
));
} else {
$login = site_url() . 'login';
header("location: $login");
}
die;
});
get('/admin/update/now/:csrf', function ($CSRF) { get('/admin/update/now/:csrf', function ($CSRF) {
$proper = is_csrf_proper($CSRF); $proper = is_csrf_proper($CSRF);


+ 5
- 16
system/includes/functions.php View File

@ -4,7 +4,6 @@ use \Michelf\MarkdownExtra;
use \Suin\RSSWriter\Feed; use \Suin\RSSWriter\Feed;
use \Suin\RSSWriter\Channel; use \Suin\RSSWriter\Channel;
use \Suin\RSSWriter\Item; use \Suin\RSSWriter\Item;
use \Kanti\HubUpdater;
// Get blog post path. Unsorted. Mostly used on widget. // Get blog post path. Unsorted. Mostly used on widget.
function get_post_unsorted() function get_post_unsorted()
@ -223,7 +222,7 @@ function get_posts($posts, $page = 1, $perpage = 0)
$url = array(); $url = array();
$bc = array(); $bc = array();
$t = explode(',', $arr[1]);
$t = explode(',', rtrim($arr[1], ','));
foreach ($t as $tt) { foreach ($t as $tt) {
$tag[] = array($tt, site_url() . 'tag/' . $tt); $tag[] = array($tt, site_url() . 'tag/' . $tt);
} }
@ -243,7 +242,7 @@ function get_posts($posts, $page = 1, $perpage = 0)
// Extract the title and body // Extract the title and body
$post->title = get_content_tag('t', $content, 'Untitled: ' . date('l jS \of F Y', $post->date)); $post->title = get_content_tag('t', $content, 'Untitled: ' . date('l jS \of F Y', $post->date));
$post->feature = get_content_tag('fi', $content);
$post->image = get_content_tag('img', $content);
$post->video = get_content_tag('vid', $content); $post->video = get_content_tag('vid', $content);
// Get the contents and convert it to HTML // Get the contents and convert it to HTML
@ -319,7 +318,7 @@ function get_tag($tag, $page, $perpage, $random)
foreach ($posts as $index => $v) { foreach ($posts as $index => $v) {
$url = $v['filename']; $url = $v['filename'];
$str = explode('_', $url); $str = explode('_', $url);
$mtag = explode(',', $str[1]);
$mtag = explode(',', rtrim($str[1], ','));
$etag = explode(',', $tag); $etag = explode(',', $tag);
foreach ($mtag as $t) { foreach ($mtag as $t) {
foreach ($etag as $e) { foreach ($etag as $e) {
@ -727,7 +726,7 @@ function tag_cloud()
$arr = explode('_', $v); $arr = explode('_', $v);
$data = $arr[1];
$data = rtrim($arr[1], ',');
$mtag = explode(',', $data); $mtag = explode(',', $data);
foreach ($mtag as $etag) { foreach ($mtag as $etag) {
$tags[] = $etag; $tags[] = $etag;
@ -1646,13 +1645,6 @@ function toolbar()
$role = user('role', $user); $role = user('role', $user);
$base = site_url(); $base = site_url();
$CSRF = get_csrf();
$updater = new HubUpdater(array(
'name' => 'danpros/htmly',
'prerelease' => !!config("prerelease"),
));
echo <<<EOF echo <<<EOF
<link href="{$base}themes/default/css/toolbar.css" rel="stylesheet" /> <link href="{$base}themes/default/css/toolbar.css" rel="stylesheet" />
EOF; EOF;
@ -1669,10 +1661,7 @@ EOF;
echo '<li><a href="' . $base . 'admin/backup">Backup</a></li>'; echo '<li><a href="' . $base . 'admin/backup">Backup</a></li>';
echo '<li><a href="' . $base . 'admin/config">Config</a></li>'; echo '<li><a href="' . $base . 'admin/config">Config</a></li>';
echo '<li><a href="' . $base . 'admin/clear-cache">Clear cache</a></li>'; echo '<li><a href="' . $base . 'admin/clear-cache">Clear cache</a></li>';
if ($updater->able()) {
$info = $updater->getNewestInfo();
echo '<li><a href="' . $base . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . '</a></li>';
}
echo '<li><a href="' . $base . 'admin/update">Update</a></li>';
echo '<li><a href="' . $base . 'logout">Logout</a></li>'; echo '<li><a href="' . $base . 'logout">Logout</a></li>';
echo '</ul></div>'; echo '</ul></div>';


+ 20
- 0
themes/clean/css/style.css View File

@ -866,6 +866,26 @@ aside .copyright p {
} }
@media all and (max-width: 560px) {
.featured-video {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}
.featured-video iframe, .featured-video object, .featured-video embed {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
}
/*---------------------------- /*----------------------------
Archive Archive
-----------------------------*/ -----------------------------*/


+ 10
- 12
themes/clean/main.html.php View File

@ -19,18 +19,6 @@ $len = count($posts); ?>
<h2 class="title-index" itemprop="name"><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></h2> <h2 class="title-index" itemprop="name"><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></h2>
<div class="date"> <div class="date">
<?php if (!empty($p->feature)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->feature; ?>"
alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315"
frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<span itemprop="datePublished"><?php echo date('d F Y', $p->date) ?></span> - Posted in <span itemprop="datePublished"><?php echo date('d F Y', $p->date) ?></span> - Posted in
<span itemprop="articleSection"><?php echo $p->tag ?></span> by <span itemprop="articleSection"><?php echo $p->tag ?></span> by
<span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> <span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span>
@ -41,6 +29,16 @@ $len = count($posts); ?>
href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a> href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a>
<?php } ?> <?php } ?>
</div> </div>
<?php if (!empty($p->image)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<div class="teaser-body" itemprop="articleBody"> <div class="teaser-body" itemprop="articleBody">
<?php echo get_thumbnail($p->body) ?> <?php echo get_thumbnail($p->body) ?>
<?php echo get_teaser($p->body, $p->url) ?> <?php echo get_teaser($p->body, $p->url) ?>


+ 10
- 12
themes/clean/post.html.php View File

@ -10,18 +10,6 @@
<h1 class="title-post" itemprop="name"><?php echo $p->title ?></h1> <h1 class="title-post" itemprop="name"><?php echo $p->title ?></h1>
<div class="date"> <div class="date">
<?php if (!empty($p->feature)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->feature; ?>"
alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315"
frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<span itemprop="datePublished"><a href="<?php echo $p->archive ?>" <span itemprop="datePublished"><a href="<?php echo $p->archive ?>"
title="Show all posts made on this day"><?php echo date('d F Y', $p->date) ?></a></span> title="Show all posts made on this day"><?php echo date('d F Y', $p->date) ?></a></span>
- Posted in - Posted in
@ -29,6 +17,16 @@
<span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> - <span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> -
<span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span> <span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span>
</div> </div>
<?php if (!empty($p->image)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<div class="post-body" itemprop="articleBody"> <div class="post-body" itemprop="articleBody">
<?php echo $p->body; ?> <?php echo $p->body; ?>
</div> </div>


+ 20
- 0
themes/default/css/style.css View File

@ -953,6 +953,26 @@ h1.title-post a:hover, h2.title-index a:hover {
} }
@media all and (max-width: 560px) {
.featured-video {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}
.featured-video iframe, .featured-video object, .featured-video embed {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
}
/*---------------------------- /*----------------------------
Archive Archive
-----------------------------*/ -----------------------------*/


+ 1
- 1
themes/default/layout.html.php View File

@ -3,7 +3,7 @@
<head> <head>
<?php echo $head_contents ?> <?php echo $head_contents ?>
<link href="<?php echo site_url() ?>themes/default/css/style.css" rel="stylesheet"/> <link href="<?php echo site_url() ?>themes/default/css/style.css" rel="stylesheet"/>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet" type="text/css">
<?php if (publisher()): ?> <?php if (publisher()): ?>
<link href="<?php echo publisher() ?>" rel="publisher" /><?php endif; ?> <link href="<?php echo publisher() ?>" rel="publisher" /><?php endif; ?>
<!--[if lt IE 9]> <!--[if lt IE 9]>


+ 10
- 12
themes/default/main.html.php View File

@ -19,18 +19,6 @@ $len = count($posts); ?>
<h2 class="title-index" itemprop="name"><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></h2> <h2 class="title-index" itemprop="name"><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></h2>
<div class="date"> <div class="date">
<?php if (!empty($p->feature)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->feature; ?>"
alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315"
frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<span itemprop="datePublished"><?php echo date('d F Y', $p->date) ?></span> - Posted in <span itemprop="datePublished"><?php echo date('d F Y', $p->date) ?></span> - Posted in
<span itemprop="articleSection"><?php echo $p->tag ?></span> by <span itemprop="articleSection"><?php echo $p->tag ?></span> by
<span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> <span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span>
@ -41,6 +29,16 @@ $len = count($posts); ?>
href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a> href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a>
<?php } ?> <?php } ?>
</div> </div>
<?php if (!empty($p->image)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<div class="teaser-body" itemprop="articleBody"> <div class="teaser-body" itemprop="articleBody">
<?php echo get_thumbnail($p->body) ?> <?php echo get_thumbnail($p->body) ?>
<?php echo get_teaser($p->body, $p->url) ?> <?php echo get_teaser($p->body, $p->url) ?>


+ 10
- 12
themes/default/post.html.php View File

@ -10,18 +10,6 @@
<h1 class="title-post" itemprop="name"><?php echo $p->title ?></h1> <h1 class="title-post" itemprop="name"><?php echo $p->title ?></h1>
<div class="date"> <div class="date">
<?php if (!empty($p->feature)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->feature; ?>"
alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315"
frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<span itemprop="datePublished"><a href="<?php echo $p->archive ?>" <span itemprop="datePublished"><a href="<?php echo $p->archive ?>"
title="Show all posts made on this day"><?php echo date('d F Y', $p->date) ?></a></span> title="Show all posts made on this day"><?php echo date('d F Y', $p->date) ?></a></span>
- Posted in - Posted in
@ -29,6 +17,16 @@
<span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> - <span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> -
<span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span> <span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span>
</div> </div>
<?php if (!empty($p->image)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<div class="post-body" itemprop="articleBody"> <div class="post-body" itemprop="articleBody">
<?php echo $p->body; ?> <?php echo $p->body; ?>
</div> </div>


+ 20
- 0
themes/logs/css/style.css View File

@ -883,6 +883,26 @@ table.post-list td a {
} }
@media all and (max-width: 560px) {
.featured-video {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}
.featured-video iframe, .featured-video object, .featured-video embed {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
}
/*---------------------------- /*----------------------------
Archive Archive
-----------------------------*/ -----------------------------*/


+ 1
- 3
themes/logs/layout.html.php View File

@ -3,9 +3,7 @@
<head> <head>
<?php echo $head_contents ?> <?php echo $head_contents ?>
<link href="<?php echo site_url() ?>themes/logs/css/style.css" rel="stylesheet"/> <link href="<?php echo site_url() ?>themes/logs/css/style.css" rel="stylesheet"/>
<link
href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'
rel='stylesheet' type='text/css'>
<link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic" rel="stylesheet" type="text/css">
<?php if (publisher()): ?> <?php if (publisher()): ?>
<link href="<?php echo publisher() ?>" rel="publisher" /><?php endif; ?> <link href="<?php echo publisher() ?>" rel="publisher" /><?php endif; ?>
<!--[if lt IE 9]> <!--[if lt IE 9]>


+ 10
- 12
themes/logs/main.html.php View File

@ -19,18 +19,6 @@ $len = count($posts); ?>
<h2 class="title-index" itemprop="name"><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></h2> <h2 class="title-index" itemprop="name"><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></h2>
<div class="date"> <div class="date">
<?php if (!empty($p->feature)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->feature; ?>"
alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315"
frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<span itemprop="datePublished"><?php echo date('d F Y', $p->date) ?></span> - Posted in <span itemprop="datePublished"><?php echo date('d F Y', $p->date) ?></span> - Posted in
<span itemprop="articleSection"><?php echo $p->tag ?></span> by <span itemprop="articleSection"><?php echo $p->tag ?></span> by
<span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> <span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span>
@ -41,6 +29,16 @@ $len = count($posts); ?>
href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a> href=<?php echo $p->url ?>></fb:comments-count> Comments</span></a>
<?php } ?> <?php } ?>
</div> </div>
<?php if (!empty($p->image)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<div class="teaser-body" itemprop="articleBody"> <div class="teaser-body" itemprop="articleBody">
<?php echo get_thumbnail($p->body) ?> <?php echo get_thumbnail($p->body) ?>
<?php echo get_teaser($p->body, $p->url) ?> <?php echo get_teaser($p->body, $p->url) ?>


+ 10
- 12
themes/logs/post.html.php View File

@ -10,18 +10,6 @@
<h1 class="title-post" itemprop="name"><?php echo $p->title ?></h1> <h1 class="title-post" itemprop="name"><?php echo $p->title ?></h1>
<div class="date"> <div class="date">
<?php if (!empty($p->feature)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->feature; ?>"
alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315"
frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<span itemprop="datePublished"><a href="<?php echo $p->archive ?>" <span itemprop="datePublished"><a href="<?php echo $p->archive ?>"
title="Show all posts made on this day"><?php echo date('d F Y', $p->date) ?></a></span> title="Show all posts made on this day"><?php echo date('d F Y', $p->date) ?></a></span>
- Posted in - Posted in
@ -29,6 +17,16 @@
<span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> - <span itemprop="author"><a href="<?php echo $p->authorurl ?>"><?php echo $p->author ?></a></span> -
<span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span> <span><a href="<?php echo $p->url ?>" rel="permalink">Permalink</a></span>
</div> </div>
<?php if (!empty($p->image)) { ?>
<div class="featured-image">
<a href="<?php echo $p->url ?>"><img src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
</div>
<?php } ?>
<?php if (!empty($p->video)) { ?>
<div class="featured-video">
<iframe src="https://www.youtube.com/embed/<?php echo $p->video; ?>" width="560" height="315" frameborder="0" allowfullscreen></iframe>
</div>
<?php } ?>
<div class="post-body" itemprop="articleBody"> <div class="post-body" itemprop="articleBody">
<?php echo $p->body; ?> <?php echo $p->body; ?>
</div> </div>


Loading…
Cancel
Save