Compare commits

..

No commits in common. "a0e3de1200b38a8a685b8eda2fe72e6eb66af52d" and "b4c852a3c1e43185346df4ee61b5ea198a1f68ff" have entirely different histories.

4 changed files with 37 additions and 47 deletions

View File

@ -6,11 +6,9 @@
//If it is not then it is a menu page.
if (file_exists('byline.md')){
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/md_read.php');
echo read_md('byline.md');
}
if (file_exists('author.md')){
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/md_read.php');
echo read_md('author.md');
}
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
?>

View File

@ -1,35 +0,0 @@
<?php
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/md_read.php');
echo "<article id=\"article\">\n" . /* Adds the option to change the font size of the article text. */
"<div id=\"font_btns\">
Text Size:
<button id=\"btn_sml\" type=\"button\" onclick=\"font_set('small')\">a</button>
<button id=\"btn_mid\" type=\"button\" onclick=\"font_set('medium')\">A</button>
<button id=\"btn_lrg\" type=\"button\" onclick=\"font_set('25px')\">A</button>
</div><!--End of font_btns-->
<input type=\"button\" onclick=\"printDiv('print-content')\" title=\"Print this article\" value=\"Print\"/>
<div id=\"print-content\">\n
<nav class=\"jmenu\">
<label for=\"menu-btn\" class=\"jm-menu-btn\">Download</label>
<input type=\"checkbox\" id=\"menu-btn\" class=\"jm-menu-btn\"/>
<ul class=\"jm-collapse\">
</ul>
<li><a>PDF</a></li>
<li><a href=\"article.md\" title=\"Download \">MD</a></li>
</nav>
".
read_md("article.md") . "\n</article>";
echo "\n</div><!--End of print-content div-->\n";
echo("<nav class=\"jmenu\"><div class=\"pmenu\"><ul id=\"back_btn\"><li><a href='..'>Back</a></li></ul></div></nav>\n");
if ($tag_data != NULL){
$page_tags = str_getcsv($tag_data);
natcasesort($page_tags);
echo "<div id=\"tags\"><h2>Tags</h2>\n<ul>\n";
foreach ($page_tags as $tag){
echo "<li><a href=\"/blog/by_tag/#" . $tag . "\">" . $tag . "</a></li>\n";
}
echo "</ul>\n</div>\n";
}
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/modal.php');
?>

View File

@ -5,7 +5,7 @@
//Looks for an article.md to see if the current directory is an article or not
//If it is not then it is a menu page.
if (file_exists('article.md')){
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/article.php');
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/md_read.php');
} else {
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/h1_month.php');
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/page_menu.php');

View File

@ -1,14 +1,41 @@
<?php
#Markdown parser dependancy
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
function read_md($MD_Path){
#Markdown parseing code.
echo $md_path;
$MD_Parser = new ParsedownExtra();
#$MD_Path = $md_path;
$MD_File = fopen($MD_Path, "r") or die("File not found.");
$MD_Text = fread($MD_File, filesize($MD_Path));
return $MD_Parser->text($MD_Text);
fclose($MD_File);
#Markdown parseing code.
$MD_Parser = new ParsedownExtra();
$MD_Path = "article.md";
$MD_File = fopen($MD_Path, "r") or die("File not found.");
$MD_Text = fread($MD_File, filesize($MD_Path));
echo "<article id=\"article\">\n" . /* Adds the option to change the font size of the article text. */
"<div id=\"font_btns\">
Text Size:
<button id=\"btn_sml\" type=\"button\" onclick=\"font_set('small')\">a</button>
<button id=\"btn_mid\" type=\"button\" onclick=\"font_set('medium')\">A</button>
<button id=\"btn_lrg\" type=\"button\" onclick=\"font_set('25px')\">A</button>
</div><!--End of font_btns-->
<input type=\"button\" onclick=\"printDiv('print-content')\" title=\"Print this article\" value=\"Print\"/>
<div id=\"print-content\">\n
<nav class=\"jmenu\">
<label for=\"menu-btn\" class=\"jm-menu-btn\">Download</label>
<input type=\"checkbox\" id=\"menu-btn\" class=\"jm-menu-btn\"/>
<ul class=\"jm-collapse\">
</ul>
<li><a>PDF</a></li>
<li><a href=\"article.md\" title=\"Download \">MD</a></li>
</nav>
".
$MD_Parser->text($MD_Text) . "\n</article>";
fclose($MD_File);
echo "\n</div><!--End of print-content div-->\n";
echo("<nav class=\"jmenu\"><div class=\"pmenu\"><ul id=\"back_btn\"><li><a href='..'>Back</a></li></ul></div></nav>\n");
if ($tag_data != NULL){
$page_tags = str_getcsv($tag_data);
natcasesort($page_tags);
echo "<div id=\"tags\"><h2>Tags</h2>\n<ul>\n";
foreach ($page_tags as $tag){
echo "<li><a href=\"/blog/by_tag/#" . $tag . "\">" . $tag . "</a></li>\n";
}
echo "</ul>\n</div>\n";
}
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/modal.php');
?>