Browse Source

Improve theme

pull/255/head
Danang Probo Sayekti 10 years ago
parent
commit
38faebe6d6
11 changed files with 94 additions and 29 deletions
  1. +1
    -1
      cache/installedVersion.json
  2. +8
    -5
      config/config.ini.example
  3. +0
    -9
      system/admin/views/update.html.php
  4. +7
    -1
      system/htmly.php
  5. +15
    -13
      themes/blog/main.html.php
  6. +11
    -0
      themes/clean/css/style.css
  7. +10
    -0
      themes/clean/main.html.php
  8. +11
    -0
      themes/default/css/style.css
  9. +10
    -0
      themes/default/main.html.php
  10. +11
    -0
      themes/logs/css/style.css
  11. +10
    -0
      themes/logs/main.html.php

+ 1
- 1
cache/installedVersion.json View File

@ -1,4 +1,4 @@
{
"id": 782014,
"tag_name": "v2.6.1"
"tag_name": "v2.6.2"
}

+ 8
- 5
config/config.ini.example View File

@ -53,7 +53,7 @@ google.analytics.id = ""
; Google reCaptcha
; https://www.google.com/recaptcha/admin. Options "false" and "true"
google.reCaptcha = false
google.reCaptcha = "false"
google.reCaptcha.public = ""
google.reCaptcha.private = ""
@ -66,6 +66,9 @@ search.perpage = "10"
profile.perpage = "10"
json.count = "10"
; Category info
category.info = "true"
; Related posts
related.count = "3"
@ -111,16 +114,16 @@ sitemap.priority.archiveYear = "0.5"
sitemap.priority.author = "0.5"
; Also install pre-release
prerelease = false
prerelease = "false"
; Switch on and off the file cache for development purposes. Options "false" and "true"
cache.off = false
cache.off = "false"
; Switch on and off the page generation time. Options "false" and "true"
generation.time = false
generation.time = "false"
; Switch on and off the cache timestamp. Options "false" and "true"
cache.timestamp = false
cache.timestamp = "false"
; Set the theme here
views.root = "themes/blog"


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

@ -30,13 +30,4 @@ if ($updater->able()) {
echo \Michelf\MarkdownExtra::defaultTransform($info['body']);
echo '</div>';
echo '<p>Read on <a target="_blank" href="' . $info['html_url'] . '">Github</a>.</p>';
}
$files = array();
$draft = array();
$files = glob('content/*/blog/*.md', GLOB_NOSORT);
$draft = glob('content/*/draft/*.md', GLOB_NOSORT);
if (!empty($files) || !empty($draft)) {
migrate_old_content();
}

+ 7
- 1
system/htmly.php View File

@ -1251,13 +1251,19 @@ get('/admin/update', function () {
// Show the update now link
get('/admin/update/now/:csrf', function ($CSRF) {
$files = array();
$draft = array();
$files = glob('content/*/blog/*.md', GLOB_NOSORT);
$draft = glob('content/*/draft/*.md', GLOB_NOSORT);
$proper = is_csrf_proper($CSRF);
$updater = new \Kanti\HubUpdater(array(
'name' => 'danpros/htmly',
'prerelease' => !!config("prerelease"),
));
if (login() && $proper && $updater->able()) {
if (!empty($files) || !empty($draft)) {
migrate_old_content();
}
$updater->update();
config('views.root', 'system/admin/views');
render('updated-to', array(


+ 15
- 13
themes/blog/main.html.php View File

@ -1,19 +1,21 @@
<?php if (!empty($breadcrumb)): ?>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
<?php if (!empty($category)): ?>
<div class="section">
<div class="section-inner">
<div class="content">
<div class="item">
<h2 class="title"><?php echo $category->title;?></h2>
<div class="text-left">
<?php echo $category->body; ?>
</div><!--//desc-->
</div><!--//item-->
</div><!--//content-->
</div>
</div>
<?php if (config('category.info')):?>
<?php if (!empty($category)): ?>
<div class="section">
<div class="section-inner">
<div class="content">
<div class="item">
<h2 class="title"><?php echo $category->title;?></h2>
<div class="text-left">
<?php echo $category->body; ?>
</div><!--//desc-->
</div><!--//item-->
</div><!--//content-->
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php $i = 0; $len = count($posts); ?>
<?php foreach ($posts as $p): ?>


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

@ -337,6 +337,17 @@ blockquote p {
padding: 10px 0;
}
.category {
background-color: #f9f9f9;
border: 1px solid #ccc;
border-radius: 4px;
color: #333;
display: block;
font-size: 13px;
margin: 20px 0;
padding: 0 1em;
}
/*-------------------------
Table
--------------------------*/


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

@ -1,6 +1,16 @@
<?php if (!empty($breadcrumb)): ?>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
<?php if (config('category.info')):?>
<?php if (!empty($category)): ?>
<div class="category">
<h2 class="category-title"><?php echo $category->title;?></h2>
<div class="category-content">
<?php echo $category->body; ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php $i = 0; $len = count($posts); ?>
<?php foreach ($posts as $p): ?>
<?php if ($i == 0) {


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

@ -302,6 +302,17 @@ span.help {
font-style: italic;
}
.category {
background-color: #f9f9f9;
border: 1px solid #ccc;
border-radius: 4px;
color: #333;
display: block;
font-size: 13px;
margin: 20px 0;
padding: 0 1em;
}
/*-------------------------
Table
--------------------------*/


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

@ -1,6 +1,16 @@
<?php if (!empty($breadcrumb)): ?>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
<?php if (config('category.info')):?>
<?php if (!empty($category)): ?>
<div class="category">
<h2 class="category-title"><?php echo $category->title;?></h2>
<div class="category-content">
<?php echo $category->body; ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php $i = 0; $len = count($posts); ?>
<?php foreach ($posts as $p): ?>
<?php if ($i == 0) {


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

@ -242,6 +242,17 @@ ul li, ol li {
margin: 0.25em 0;
}
.category {
background-color: #f9f9f9;
border: 1px solid #ccc;
border-radius: 4px;
color: #333;
display: block;
font-size: 13px;
margin: 20px 0;
padding: 0 1em;
}
/*-------------------------
Header
--------------------------*/


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

@ -1,6 +1,16 @@
<?php if (!empty($breadcrumb)): ?>
<div class="breadcrumb"><?php echo $breadcrumb ?></div>
<?php endif; ?>
<?php if (config('category.info')):?>
<?php if (!empty($category)): ?>
<div class="category">
<h2 class="category-title"><?php echo $category->title;?></h2>
<div class="category-content">
<?php echo $category->body; ?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php $i = 0; $len = count($posts); ?>
<?php foreach ($posts as $p): ?>
<?php if ($i == 0) {


Loading…
Cancel
Save