Better code style
This commit is contained in:
parent
1aa4b42c0c
commit
c1a7ede3bc
1 changed files with 32 additions and 13 deletions
37
index.php
37
index.php
|
@ -193,7 +193,9 @@ if ($config["design"]["drawer"] == "on") {
|
|||
if ($navblog != "main.md") { // excluding main blog
|
||||
// creating navigation item
|
||||
BlogListGenerator::listBlog(
|
||||
"./blogs/", $navblog, $config["blog"]["title"]
|
||||
"./blogs/",
|
||||
$navblog,
|
||||
$config["blog"]["title"]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
@ -202,7 +204,9 @@ if ($config["design"]["drawer"] == "on") {
|
|||
if ($getblog . ".md" != $navblog) {
|
||||
// creating navigation item
|
||||
BlogListGenerator::listBlog(
|
||||
"./blogs/", $navblog, $blogmaintitle
|
||||
"./blogs/",
|
||||
$navblog,
|
||||
$blogmaintitle
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +322,11 @@ if ($config["design"]["drawer"] == "on") {
|
|||
if (strlen($article) >= 3 && substr($article, -3) == ".md") {
|
||||
// generate the article
|
||||
ArticleGenerator::newArticle(
|
||||
$articlesdir, $article, $getblog, $config["design"]["excerpt"], $BLOGLANG["Read More"]
|
||||
$articlesdir,
|
||||
$article,
|
||||
$getblog,
|
||||
$config["design"]["excerpt"],
|
||||
$BLOGLANG["Read More"]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -336,12 +344,20 @@ if ($config["design"]["drawer"] == "on") {
|
|||
if ($config["design"]["pagination"]) {
|
||||
if ($posts_amount < $pag_max && $posts_amount >= $pag_min) {
|
||||
ArticleGenerator::newArticle(
|
||||
$articlesdir, $article, $getblog, $config["design"]["excerpt"], $BLOGLANG["Read More"]
|
||||
$articlesdir,
|
||||
$article,
|
||||
$getblog,
|
||||
$config["design"]["excerpt"],
|
||||
$BLOGLANG["Read More"]
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ArticleGenerator::newArticle(
|
||||
$articlesdir, $article, $getblog, $config["design"]["excerpt"], $BLOGLANG["Read More"]
|
||||
$articlesdir,
|
||||
$article,
|
||||
$getblog,
|
||||
$config["design"]["excerpt"],
|
||||
$BLOGLANG["Read More"]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -353,8 +369,11 @@ if ($config["design"]["drawer"] == "on") {
|
|||
} elseif (isset($getarticle)) { // ARTICLE VIEW
|
||||
// generate the requested article
|
||||
ArticleGenerator::newArticle(
|
||||
$articlesdir, $getarticle . ".md", $getblog,
|
||||
'off', ''
|
||||
$articlesdir,
|
||||
$getarticle . ".md",
|
||||
$getblog,
|
||||
'off',
|
||||
$BLOGLANG["Read More"]
|
||||
);
|
||||
include './res/php/Disqus.php'; // include disques
|
||||
} else { // SOMETHING STRANGE: THIS SHOULDN'T HAPPEN
|
||||
|
@ -417,14 +436,14 @@ if ($config["design"]["drawer"] == "on") {
|
|||
<script src="./res/js/app.js"></script> <!--include main javascript-->
|
||||
<!-- JS extension support -->
|
||||
<?php
|
||||
if(file_exists("./extensions")) {
|
||||
if (file_exists("./extensions")) {
|
||||
$extensions = scandir('./extensions');
|
||||
foreach ($extensions as $extension) {
|
||||
if (substr($extension, -3) == ".js") {
|
||||
echo "<script src='./extensions/$extension'></script>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
require './res/php/GoogleAnalytics.php'; // include google analytics
|
||||
|
|
Reference in a new issue