Material design for blog on large screens
This commit is contained in:
parent
83b4d26752
commit
96cc249f9d
19 changed files with 1327 additions and 898 deletions
169
index.php
169
index.php
|
@ -25,7 +25,12 @@ THE SOFTWARE.
|
|||
-->
|
||||
<html>
|
||||
|
||||
<?php include 'config.php'; ?>
|
||||
<?php
|
||||
include 'config.php';
|
||||
require_once 'res/php/Parsedown.php';
|
||||
require_once 'res/php/ArticleGenerator.php';
|
||||
require_once './res/php/BlogListGenerator.php';
|
||||
?>
|
||||
|
||||
<head>
|
||||
<title><?php echo $blogtitle; ?></title>
|
||||
|
@ -36,7 +41,7 @@ THE SOFTWARE.
|
|||
<meta http-equiv="CACHE-CONTROL" content="no-cache" />
|
||||
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
|
||||
<!--CSS no change needed-->
|
||||
<link rel="stylesheet" type="text/css" href="res/css/blog.css" />
|
||||
<link rel="stylesheet" type="text/css" href="res/css/rangitaki.css" />
|
||||
<link href='http://fonts.googleapis.com/css?family=Roboto:400,500,700,300,400italic,100,100italic,900' rel='stylesheet' type='text/css'>
|
||||
<link rel="shortcut icon" href="res/favicon.png">
|
||||
<link rel="stylesheet" href="./res/css/github-gist.css">
|
||||
|
@ -45,86 +50,126 @@ THE SOFTWARE.
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<div class="header">
|
||||
<nobr><a href="./" class="title"><?php echo $blogtitle; ?></a></nobr>
|
||||
<?php if($_GET['article'] == '' && $bloghome == 'yes'){ ?>
|
||||
<a href="<?php echo $bloghomeurl; ?>" class="home"><?php echo $bloghomename; ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
if($_GET['article'] == ""){
|
||||
echo "<section>";
|
||||
echo "<h4>Blogs of $blogtitle:</h4>";
|
||||
require_once './res/php/BlogListGenerator.php';
|
||||
$blogs = scandir("./blogs/");
|
||||
foreach ($blogs as $blog){
|
||||
if(strlen($blog) >= 3 && substr($blog, -3) == ".md"){
|
||||
if($_GET['blog'] == ""){
|
||||
if($blog != "main.md"){
|
||||
BlogListGenerator::listBlog("./blogs/", $blog, $blogtitle);
|
||||
}
|
||||
} else {
|
||||
if($_GET['blog'] . ".md" != $blog){
|
||||
BlogListGenerator::listBlog("./blogs/", $blog, $blogtitle);
|
||||
<?php if($nav_drawer == "yes"){ ?>
|
||||
<div class="nav">
|
||||
<div class="divider"></div>
|
||||
<?php
|
||||
if($_GET['article'] == ""){
|
||||
echo "<section>";
|
||||
echo "<div class='nav-item-static'>Blogs of $blogtitle:</div>";
|
||||
$blogs = scandir("./blogs/");
|
||||
foreach ($blogs as $blog){
|
||||
if(strlen($blog) >= 3 && substr($blog, -3) == ".md"){
|
||||
if($_GET['blog'] == ""){
|
||||
if($blog != "main.md"){
|
||||
BlogListGenerator::listBlog("./blogs/", $blog, $blogtitle);
|
||||
}
|
||||
} else {
|
||||
if($_GET['blog'] . ".md" != $blog){
|
||||
BlogListGenerator::listBlog("./blogs/", $blog, $blogtitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "</section>";
|
||||
} else {
|
||||
?>
|
||||
<a class="nav-item" onclick="goBack()">Go back</a>
|
||||
<?php
|
||||
}
|
||||
echo "</section>";
|
||||
?>
|
||||
<div class="divider"></div>
|
||||
<a class="nav-item" href="<?php echo $bloghomeurl; ?>"><?php echo $bloghomename; ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
if($_GET['blog'] == ""){
|
||||
$blog = "main";
|
||||
} else {
|
||||
$blog = $_GET['blog'];
|
||||
}
|
||||
?>
|
||||
<section>
|
||||
<span class="text">
|
||||
<div class="main">
|
||||
<div class="header">
|
||||
<img src="./res/img/menu.svg" class="nav-img" />
|
||||
<nobr><a href="./" class="title"><?php echo $blogtitle; ?></a></nobr>
|
||||
</div>
|
||||
<?php
|
||||
if(file_exists("blogs/$blog.md") && $_GET['article'] == "" && $blogintro == "yes" && $_GET['tag'] == ""){
|
||||
$file = file_get_contents("blogs/$blog.md");
|
||||
$file = $file . "\n";
|
||||
$file = substr($file, strpos($file, "\n"));
|
||||
if($file != "" && $file != "\n" && $file != " "){
|
||||
?>
|
||||
<section class="card">
|
||||
<div class="articletext">
|
||||
<?php
|
||||
require_once 'res/php/Parsedown.php';
|
||||
require_once 'res/php/ArticleGenerator.php';
|
||||
if(file_exists("blogs/$blog.md") && $_GET['article'] == "" && $blogintro == "yes" && $_GET['tag'] == ""){
|
||||
$file = file_get_contents("blogs/$blog.md");
|
||||
$file = $file . "\n";
|
||||
$file = substr($file, strpos($file, "\n"));
|
||||
$intro = Parsedown::instance()
|
||||
->setBreaksEnabled(true)
|
||||
->text($file);
|
||||
echo $intro;
|
||||
}
|
||||
$intro = Parsedown::instance()
|
||||
->setBreaksEnabled(true)
|
||||
->text($file);
|
||||
echo $intro;
|
||||
?>
|
||||
</span>
|
||||
</section>
|
||||
<?php
|
||||
$articlesdir = "./articles/$blog/";
|
||||
if($_GET['tag'] != ""){
|
||||
$articles = scandir($articlesdir, 1);
|
||||
foreach ($articles as $article) {
|
||||
$tags = ArticleGenerator::getTags($articlesdir, $article);
|
||||
if(in_array($_GET['tag'], $tags)){
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
$articlesdir = "./articles/$blog/";
|
||||
if($_GET['tag'] != ""){
|
||||
$articles = scandir($articlesdir, 1);
|
||||
foreach ($articles as $article) {
|
||||
$tags = ArticleGenerator::getTags($articlesdir, $article);
|
||||
if(in_array($_GET['tag'], $tags)){
|
||||
if(strlen($article) >= 3 && substr($article, -3) == ".md"){
|
||||
ArticleGenerator::newArticle($articlesdir, $article, $_GET['blog']);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if($_GET['article'] == ""){
|
||||
$articles = scandir($articlesdir, 1);
|
||||
foreach ($articles as $article) {
|
||||
if(strlen($article) >= 3 && substr($article, -3) == ".md"){
|
||||
ArticleGenerator::newArticle($articlesdir, $article, $_GET['blog']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ArticleGenerator::newArticle($articlesdir, $_GET['article'] . ".md", $_GET['blog']);
|
||||
include './res/php/SocialBar.php';
|
||||
include './res/php/Disqus.php';
|
||||
}
|
||||
} else if($_GET['article'] == ""){
|
||||
$articles = scandir($articlesdir, 1);
|
||||
foreach ($articles as $article) {
|
||||
if(strlen($article) >= 3 && substr($article, -3) == ".md"){
|
||||
ArticleGenerator::newArticle($articlesdir, $article, $_GET['blog']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ArticleGenerator::newArticle($articlesdir, $_GET['article'] . ".md", $_GET['blog']);
|
||||
include './res/php/SocialBar.php';
|
||||
include './res/php/Disqus.php';
|
||||
}
|
||||
?>
|
||||
<div class="box_container">
|
||||
<p class="cc">
|
||||
?>
|
||||
<div class="footer">
|
||||
<?php echo $blogfooter; ?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="fabmenu">
|
||||
<div class="subfab">
|
||||
<a href='mailto:?subject=<?php echo $blogtitle; ?>&body=Check out this blog: <?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>' target="blank">
|
||||
<img src="./res/img/email.svg" class="subfab-img" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="subfab">
|
||||
<a href='https://twitter.com/intent/tweet?text=Check out: <?php echo "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>&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 "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>&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 "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>&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>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./res/js/jquery-2.1.4.min.js"></script>
|
||||
<script src="./res/js/app.js"></script>
|
||||
<?php
|
||||
include './res/php/GoogleAnalytics.php';
|
||||
?>
|
||||
|
|
Reference in a new issue