Better code style
This commit is contained in:
parent
1aa4b42c0c
commit
c1a7ede3bc
1 changed files with 32 additions and 13 deletions
33
index.php
33
index.php
|
@ -193,7 +193,9 @@ if ($config["design"]["drawer"] == "on") {
|
||||||
if ($navblog != "main.md") { // excluding main blog
|
if ($navblog != "main.md") { // excluding main blog
|
||||||
// creating navigation item
|
// creating navigation item
|
||||||
BlogListGenerator::listBlog(
|
BlogListGenerator::listBlog(
|
||||||
"./blogs/", $navblog, $config["blog"]["title"]
|
"./blogs/",
|
||||||
|
$navblog,
|
||||||
|
$config["blog"]["title"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -202,7 +204,9 @@ if ($config["design"]["drawer"] == "on") {
|
||||||
if ($getblog . ".md" != $navblog) {
|
if ($getblog . ".md" != $navblog) {
|
||||||
// creating navigation item
|
// creating navigation item
|
||||||
BlogListGenerator::listBlog(
|
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") {
|
if (strlen($article) >= 3 && substr($article, -3) == ".md") {
|
||||||
// generate the article
|
// generate the article
|
||||||
ArticleGenerator::newArticle(
|
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 ($config["design"]["pagination"]) {
|
||||||
if ($posts_amount < $pag_max && $posts_amount >= $pag_min) {
|
if ($posts_amount < $pag_max && $posts_amount >= $pag_min) {
|
||||||
ArticleGenerator::newArticle(
|
ArticleGenerator::newArticle(
|
||||||
$articlesdir, $article, $getblog, $config["design"]["excerpt"], $BLOGLANG["Read More"]
|
$articlesdir,
|
||||||
|
$article,
|
||||||
|
$getblog,
|
||||||
|
$config["design"]["excerpt"],
|
||||||
|
$BLOGLANG["Read More"]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ArticleGenerator::newArticle(
|
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
|
} elseif (isset($getarticle)) { // ARTICLE VIEW
|
||||||
// generate the requested article
|
// generate the requested article
|
||||||
ArticleGenerator::newArticle(
|
ArticleGenerator::newArticle(
|
||||||
$articlesdir, $getarticle . ".md", $getblog,
|
$articlesdir,
|
||||||
'off', ''
|
$getarticle . ".md",
|
||||||
|
$getblog,
|
||||||
|
'off',
|
||||||
|
$BLOGLANG["Read More"]
|
||||||
);
|
);
|
||||||
include './res/php/Disqus.php'; // include disques
|
include './res/php/Disqus.php'; // include disques
|
||||||
} else { // SOMETHING STRANGE: THIS SHOULDN'T HAPPEN
|
} else { // SOMETHING STRANGE: THIS SHOULDN'T HAPPEN
|
||||||
|
|
Reference in a new issue