2015-02-21 21:04:03 +01:00
|
|
|
|
<!DOCTYPE HTML>
|
2015-03-27 07:04:23 +01:00
|
|
|
|
<!--
|
2015-07-05 18:02:19 +02:00
|
|
|
|
Rangitaki
|
|
|
|
|
GitHub: https://github.com/mmk2410/Rangitaki
|
|
|
|
|
Web: https://marcel-kapfer.de/rangitaki
|
|
|
|
|
Twitter: @Rangitaki
|
|
|
|
|
Google+: +Rangitaki
|
|
|
|
|
-->
|
|
|
|
|
<!--
|
|
|
|
|
COPYRIGHT (c) 2015 mmk2410
|
2015-03-27 07:04:23 +01:00
|
|
|
|
|
2015-07-05 18:02:19 +02:00
|
|
|
|
MIT License
|
2015-03-27 07:04:23 +01:00
|
|
|
|
|
2015-07-05 18:02:19 +02:00
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
|
a copy of this software and associated documentation files (the
|
|
|
|
|
"Software"), to deal in the Software without restriction, including
|
|
|
|
|
without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
|
permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
|
the following conditions:
|
2015-03-27 07:04:23 +01:00
|
|
|
|
|
2015-07-05 18:02:19 +02:00
|
|
|
|
The above copyright notice and this permission notice shall be
|
|
|
|
|
included in all copies or substantial portions of the Software.
|
2015-03-27 07:04:23 +01:00
|
|
|
|
|
2015-07-05 18:02:19 +02:00
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
|
|
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
|
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2015-03-27 07:04:23 +01:00
|
|
|
|
-->
|
2015-02-21 21:04:03 +01:00
|
|
|
|
<html>
|
2015-06-18 20:45:49 +02:00
|
|
|
|
<?php
|
2015-06-15 11:27:57 +02:00
|
|
|
|
include 'config.php';
|
2015-07-03 11:19:40 +02:00
|
|
|
|
include './lang/' . $language . ".php";
|
2015-06-15 11:27:57 +02:00
|
|
|
|
require_once 'res/php/Parsedown.php';
|
|
|
|
|
require_once 'res/php/ArticleGenerator.php';
|
|
|
|
|
require_once './res/php/BlogListGenerator.php';
|
2015-06-18 20:45:49 +02:00
|
|
|
|
$getblog = filter_input(INPUT_GET, "blog");
|
|
|
|
|
$getarticle = filter_input(INPUT_GET, "article");
|
|
|
|
|
$gettag = filter_input(INPUT_GET, "tag");
|
2015-07-03 10:59:54 +02:00
|
|
|
|
$url = "http://" . filter_input(INPUT_SERVER, "HTTP_HOST") . filter_input(INPUT_SERVER, "REQUEST_URI");
|
2015-06-18 20:45:49 +02:00
|
|
|
|
?>
|
2015-02-21 21:04:03 +01:00
|
|
|
|
|
2015-06-18 20:45:49 +02:00
|
|
|
|
<head>
|
|
|
|
|
<title><?php echo $blogtitle; ?></title>
|
|
|
|
|
<!--Metatags-->
|
|
|
|
|
<meta name="author" content="<?php echo $blogauthor; ?>" />
|
|
|
|
|
<meta name="description" content="<?php echo $blogdescription; ?>" />
|
|
|
|
|
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
|
2015-07-05 18:02:19 +02:00
|
|
|
|
<!-- OpenGraph meta tags -->
|
|
|
|
|
<meta property="og:title" content="<?php echo $blogtitle; ?>" />
|
|
|
|
|
<meta property="og:type" content="website" />
|
|
|
|
|
<meta property="og:url" content="<?php echo $url; ?>" />
|
|
|
|
|
<meta property="og:image" content="<?php echo $favicon; ?>" />
|
|
|
|
|
<meta property="og:description" content="<?php echo $blogdescription; ?>" />
|
|
|
|
|
<meta property="og:locale:alternate" content="<?php echo $lang; ?>" />
|
|
|
|
|
<!-- Twitter meta tags -->
|
|
|
|
|
<meta name="twitter:card" content="summary" />
|
|
|
|
|
<meta name="twitter:site" content="<?php echo $twitter; ?>" />
|
|
|
|
|
<meta name="twitter:title" content="<?php echo $blogtitle; ?>" />
|
|
|
|
|
<meta name="twitter:description" content="<?php echo $blogdescription; ?>" />
|
|
|
|
|
<meta name="twitter:image" content="<?php echo $favicon; ?>" />
|
|
|
|
|
<meta name="twitter:url" content="<?php echo $url; ?>" />
|
|
|
|
|
|
2015-06-18 20:45:49 +02:00
|
|
|
|
<!--CSS no change needed-->
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="res/css/rangitaki.css" />
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="themes/<?php echo $theme; ?>.css" />
|
2015-07-05 18:02:19 +02:00
|
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo $favicon; ?>" />
|
|
|
|
|
<link rel="apple-touch-icon-precomposed" href="<?php echo $favicon; ?>">
|
2015-06-15 11:27:57 +02:00
|
|
|
|
<?php
|
2015-06-18 20:45:49 +02:00
|
|
|
|
if ($nav_drawer == 'no') {
|
|
|
|
|
?>
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="res/css/no-nav.css" />
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
2015-07-03 10:31:04 +02:00
|
|
|
|
<link href='//fonts.googleapis.com/css?family=Roboto:400,500,700,300,400italic,100,100italic,900' rel='stylesheet' type='text/css'>
|
2015-06-18 20:45:49 +02:00
|
|
|
|
<link rel="stylesheet" href="./res/css/github-gist.css">
|
|
|
|
|
<script src="./res/js/highlight.pack.js"></script>
|
|
|
|
|
<script>hljs.initHighlightingOnLoad();</script>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
<?php if ($nav_drawer == "yes") { ?>
|
|
|
|
|
<div class="overlay"></div>
|
|
|
|
|
<div class="nav">
|
|
|
|
|
<div class="divider"></div>
|
|
|
|
|
<?php
|
|
|
|
|
if ($getarticle == "") {
|
|
|
|
|
echo "<section>";
|
2015-07-03 11:19:40 +02:00
|
|
|
|
echo "<div class='nav-item-static'>$LANG_Blogs_Of" . " " . "$blogtitle:</div>";
|
2015-06-18 20:45:49 +02:00
|
|
|
|
$blogs = scandir("./blogs/");
|
|
|
|
|
foreach ($blogs as $blog) {
|
|
|
|
|
if (strlen($blog) >= 3 && substr($blog, -3) == ".md") {
|
|
|
|
|
if ($getblog == "") {
|
|
|
|
|
if ($blog != "main.md") {
|
2015-07-03 10:59:54 +02:00
|
|
|
|
if (empty($blogmainname)) {
|
2015-07-03 10:21:20 +02:00
|
|
|
|
$blogmaintitle = $blogtitle;
|
|
|
|
|
} else {
|
|
|
|
|
$blogmaintitle = $blogmainname;
|
|
|
|
|
}
|
2015-06-18 20:45:49 +02:00
|
|
|
|
BlogListGenerator::listBlog("./blogs/", $blog, $blogtitle);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if ($getblog . ".md" != $blog) {
|
2015-07-03 10:59:54 +02:00
|
|
|
|
if (empty($blogmainname)) {
|
2015-07-03 10:21:20 +02:00
|
|
|
|
$blogmaintitle = $blogtitle;
|
|
|
|
|
} else {
|
|
|
|
|
$blogmaintitle = $blogmainname;
|
|
|
|
|
}
|
|
|
|
|
BlogListGenerator::listBlog("./blogs/", $blog, $blogmaintitle);
|
2015-06-18 20:45:49 +02:00
|
|
|
|
}
|
2015-06-15 11:27:57 +02:00
|
|
|
|
}
|
2015-06-11 17:32:58 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2015-06-18 20:45:49 +02:00
|
|
|
|
echo "</section>";
|
|
|
|
|
} else {
|
|
|
|
|
?>
|
|
|
|
|
<a class="nav-item" onclick="goBack()">Go back</a>
|
|
|
|
|
<?php
|
2015-06-11 17:32:58 +02:00
|
|
|
|
}
|
2015-06-15 11:27:57 +02:00
|
|
|
|
?>
|
2015-06-18 20:45:49 +02:00
|
|
|
|
<div class="divider"></div>
|
|
|
|
|
<a class="nav-item" href="<?php echo $bloghomeurl; ?>"><?php echo $bloghomename; ?></a>
|
|
|
|
|
</div>
|
|
|
|
|
<?php
|
2015-06-11 17:32:58 +02:00
|
|
|
|
}
|
2015-06-18 20:45:49 +02:00
|
|
|
|
|
|
|
|
|
if ($getblog == "") {
|
2015-06-11 17:32:58 +02:00
|
|
|
|
$blog = "main";
|
|
|
|
|
} else {
|
2015-06-18 20:45:49 +02:00
|
|
|
|
$blog = $getblog;
|
2015-06-11 17:32:58 +02:00
|
|
|
|
}
|
2015-06-18 20:45:49 +02:00
|
|
|
|
?>
|
|
|
|
|
<div class="main">
|
|
|
|
|
<div class="header">
|
|
|
|
|
<img src="./res/img/menu.svg" class="nav-img" />
|
2015-07-03 10:59:54 +02:00
|
|
|
|
<nobr><span class="title"><a href="./"><?php echo $blogtitle; ?>
|
|
|
|
|
<?php
|
|
|
|
|
if (empty($getblog)) {
|
|
|
|
|
if (!empty($blogmainname)) {
|
|
|
|
|
?>
|
|
|
|
|
› <?php
|
|
|
|
|
echo $blogmainname;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
?>
|
|
|
|
|
</a>
|
2015-07-03 14:37:32 +02:00
|
|
|
|
› <a href="<?php echo "./?blog=$getblog" ?>">
|
2015-07-03 10:59:54 +02:00
|
|
|
|
<?php
|
|
|
|
|
echo BlogListGenerator::getName("./blogs/$getblog.md");
|
|
|
|
|
}
|
|
|
|
|
?>
|
|
|
|
|
</a>
|
|
|
|
|
</span>
|
|
|
|
|
</nobr>
|
2015-07-03 14:37:32 +02:00
|
|
|
|
<div class="fadeout"></div>
|
2015-06-18 20:45:49 +02:00
|
|
|
|
</div>
|
|
|
|
|
<?php
|
|
|
|
|
if (file_exists("blogs/$blog.md") && $getarticle == "" && $blogintro == "yes" && $gettag == "") {
|
2015-06-15 11:27:57 +02:00
|
|
|
|
$file = file_get_contents("blogs/$blog.md");
|
|
|
|
|
$file = $file . "\n";
|
|
|
|
|
$file = substr($file, strpos($file, "\n"));
|
2015-06-18 20:45:49 +02:00
|
|
|
|
if ($file != "" && $file != "\n" && $file != " ") {
|
|
|
|
|
?>
|
|
|
|
|
<section class="card">
|
|
|
|
|
<div class="articletext">
|
|
|
|
|
<?php
|
|
|
|
|
$intro = Parsedown::instance()
|
|
|
|
|
->setBreaksEnabled(true)
|
|
|
|
|
->text($file);
|
|
|
|
|
echo $intro;
|
|
|
|
|
?>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<?php
|
2015-06-15 11:27:57 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$articlesdir = "./articles/$blog/";
|
2015-06-18 20:45:49 +02:00
|
|
|
|
if ($gettag != "") {
|
2015-06-15 11:27:57 +02:00
|
|
|
|
$articles = scandir($articlesdir, 1);
|
|
|
|
|
foreach ($articles as $article) {
|
|
|
|
|
$tags = ArticleGenerator::getTags($articlesdir, $article);
|
2015-06-18 20:45:49 +02:00
|
|
|
|
if (in_array($gettag, $tags)) {
|
|
|
|
|
if (strlen($article) >= 3 && substr($article, -3) == ".md") {
|
|
|
|
|
ArticleGenerator::newArticle($articlesdir, $article, $getblog);
|
2015-06-15 11:27:57 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-06-18 20:45:49 +02:00
|
|
|
|
} else if ($getarticle == "") {
|
2015-06-15 11:27:57 +02:00
|
|
|
|
$articles = scandir($articlesdir, 1);
|
|
|
|
|
foreach ($articles as $article) {
|
2015-06-18 20:45:49 +02:00
|
|
|
|
if (strlen($article) >= 3 && substr($article, -3) == ".md") {
|
|
|
|
|
ArticleGenerator::newArticle($articlesdir, $article, $getblog);
|
2015-06-12 10:31:28 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2015-06-15 11:27:57 +02:00
|
|
|
|
} else {
|
2015-06-18 20:45:49 +02:00
|
|
|
|
ArticleGenerator::newArticle($articlesdir, $getarticle . ".md", $getblog);
|
2015-06-15 11:27:57 +02:00
|
|
|
|
include './res/php/SocialBar.php';
|
|
|
|
|
include './res/php/Disqus.php';
|
2015-06-12 10:31:28 +02:00
|
|
|
|
}
|
2015-06-18 20:45:49 +02:00
|
|
|
|
?>
|
2015-06-15 11:27:57 +02:00
|
|
|
|
<div class="footer">
|
2015-06-10 18:41:51 +02:00
|
|
|
|
<?php echo $blogfooter; ?>
|
2015-06-15 11:27:57 +02:00
|
|
|
|
</div>
|
2015-07-03 14:37:32 +02:00
|
|
|
|
<?php
|
|
|
|
|
if ($sharefab == "yes") {
|
|
|
|
|
?>
|
|
|
|
|
<div class="fabmenu">
|
|
|
|
|
<div class="subfab">
|
|
|
|
|
<a href='mailto:?subject=<?php echo $blogtitle; ?>&body=<?php echo $LANG_Check_out_this_blog; ?>: <?php echo $url; ?>' target="blank">
|
|
|
|
|
<img src="./res/img/email.svg" class="subfab-img" />
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
2015-07-05 18:02:19 +02:00
|
|
|
|
<div class="subfab">
|
2015-07-03 14:37:32 +02:00
|
|
|
|
<a href='https://twitter.com/intent/tweet?text=<?php echo $LANG_Check_out; ?>: <?php echo $url; ?>&original_referer=' target="blank">
|
|
|
|
|
<img src="./res/img/twitter.svg" class="subfab-img" />
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="subfab">
|
|
|
|
|
<a href='https://plus.google.com/share?url=<?php echo $url; ?>&hl=en-US' target="blank">
|
|
|
|
|
<img src="./res/img/gplus.svg" class="subfab-img" />
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="subfab">
|
|
|
|
|
<a href='https://www.facebook.com/sharer/sharer.php?u=<?php echo $url; ?>&t=<?php echo "echo $blogtitle" ?>' target="blank">
|
|
|
|
|
<img src="./res/img/facebook.svg" class="subfab-img" />
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="fab">
|
|
|
|
|
<img src="./res/img/share.svg" class="fab-img" alt="Share" />
|
|
|
|
|
</div>
|
2015-06-15 11:27:57 +02:00
|
|
|
|
</div>
|
2015-07-03 14:37:32 +02:00
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
?>
|
2015-02-21 21:04:03 +01:00
|
|
|
|
</div>
|
2015-06-18 20:45:49 +02:00
|
|
|
|
<script src="./res/js/jquery-2.1.4.min.js"></script>
|
|
|
|
|
<script src="./res/js/app.js"></script>
|
|
|
|
|
<?php
|
2015-06-10 18:41:51 +02:00
|
|
|
|
include './res/php/GoogleAnalytics.php';
|
2015-06-18 20:45:49 +02:00
|
|
|
|
?>
|
2015-02-21 21:04:03 +01:00
|
|
|
|
</body>
|
|
|
|
|
</html>
|