Now your blog can have a description + changed things
This commit is contained in:
parent
b5e182f037
commit
3455b93b6f
11
index.php
11
index.php
|
@ -1,15 +1,15 @@
|
|||
<?php include "blog_config.php";
|
||||
if($custom_css!=False){if(file_exists($custom_css)){$custom_css="<link rel='stylesheet' href='$custom_css'>";}else{$custom_css="";}}else{$custom_css="";}
|
||||
$style="body{text-align:center;font-family:monospace;}p{font-size:large;}a#logo{color:black;text-decoration:none;}.notlogo{margin:5px 0 0 0;}#article{text-align:left;margin:1px 30%;font-size:large;}@media screen and (max-width: 600px){#article{margin:1px 10%;}}footer{margin:1em 0 0 0;}";
|
||||
$style="body{text-align:center;font-family:monospace;}p{font-size:large;}a#logo{color:black;text-decoration:none;}.notlogo{margin:25px 0px;}#article{text-align:left;margin:1px 30%;font-size:large;}@media screen and (max-width: 600px){#article{margin:1px 10%;}}footer{margin:1em 0 0 0;}";
|
||||
$footer="</div><footer>pwd by <a href='https://tildegit.org/lucas/tildeweblogs'>~weblogs</a></footer></body></html>";
|
||||
if(isset($_GET["p"])){
|
||||
function notfound($errno, $errstr){die("Error!\nPost not found");}
|
||||
set_error_handler("notfound");
|
||||
header("Content-type: text/html");
|
||||
$post=$_GET["p"]-1;
|
||||
echo "<!DOCTYPE html><html><head><!--~weblogs v1.1--><meta name='viewport' content='width=device-width,initial-scale=1'><title>".$posts[$post][1]." | $title</title><style>$style</style>$custom_css</head><body><a id='logo' href='?'><h1>$title</h1></a><div class='notlogo'>";
|
||||
echo "<!DOCTYPE html><html><head><!--~weblogs v1.1--><title>".$posts[$post][1]." | $title</title><style>$style</style>$custom_css</head><body><a id='logo' href='?'><h1>$title</h1></a><div class='notlogo'>";
|
||||
if(strpos($posts[$post][1],"\n")){$html_log=str_replace("\n","<br>",$posts[$post][2]);}else{$html_log=$posts[$post][1];}
|
||||
echo "<h2>".$posts[$post][1]."</h2>Published on ".$posts[$post][0]."<br><br><div id='article'>$html_log</div>";
|
||||
echo "<h1>".$posts[$post][1]."</h1>".$posts[$post][0]."<br><br><div id='article'>$html_log</div>";
|
||||
if($utterances!=False){echo "<br>$utterances";}
|
||||
echo $footer;
|
||||
}elseif(isset($_GET["rss"])){
|
||||
|
@ -32,8 +32,9 @@ while($ao < count($posts)){
|
|||
</rss>
|
||||
<?php }else{
|
||||
header("Content-type: text/html");
|
||||
if($website!=False){$website="<p><a href='$website'>Website</a></p>";}else{$website="";}
|
||||
echo "<!DOCTYPE html><html><head><meta name='viewport' content='width=device-width,initial-scale=1'><title>$title</title><style>$style</style>$custom_css</head><body><a id='logo' href='?'><h1>$title</h1></a>$website<div class='notlogo'>";
|
||||
if($website!=False){$website="<a href='$website'>Website</a><br>";}else{$website="";}
|
||||
if($description!=False){$description="<p>$description</p>";}
|
||||
echo "<!DOCTYPE html><html><head><title>$title</title><style>$style</style>$custom_css</head><body><a id='logo' href='?'><h1>$title</h1></a>$description$website<div class='notlogo'>";
|
||||
$a=count($posts)-1;$ao=0;$next=$a+1;
|
||||
while($ao < count($posts)){
|
||||
echo "<p><b><a href='?p=$next'>".$posts[$a][1]."</a></b> ".$posts[$a][0]."</p>";
|
||||
|
|
Loading…
Reference in New Issue