Merge pull request 'Update to upstream master' (#2) from 20xd6/simple_blog:master into master
Reviewed-on: manfromhuh/simple_blog#2
This commit is contained in:
commit
1da2fe8358
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
||||
|
||||
echo "<article><h1 id=\"page_title\">Posts by Tag</h1></article>";
|
||||
echo "<div id=\"search_inputs\"><input type=\"text\" id=\"tag_sort\" onkeyup=\"tag_search()\" placeholder=\"Search Tags...\" title=\"Type a tage to search\"><input id=\"search_toggle\" type=\"button\" value=\"Search Titles\" onclick=\"search_toggle()\"></div><!--End Div Search Inputs-->";
|
||||
@ -64,5 +64,5 @@
|
||||
$coloum_number++;
|
||||
}
|
||||
echo "</ul>\n";
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
||||
?>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
||||
?>
|
||||
<h1 align="center">Error 403</h1>
|
||||
<p align="center">
|
||||
@ -11,4 +11,4 @@ include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
<br/>
|
||||
You're not allowed here. Stop that.<br/>
|
||||
</p>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/footer.php');?>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
||||
?>
|
||||
<h1 align="center">Error 404</h1>
|
||||
<p align="center">
|
||||
@ -21,4 +21,4 @@ include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/footer.php');?>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/menu.php');
|
||||
?>
|
||||
<h1 align="center">Error 500</h1>
|
||||
<p align="center">
|
||||
<br/>
|
||||
We done made a boo boo...<br/>
|
||||
</p>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'common/php/footer.php');?>
|
||||
|
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
//The common file used to render pages on the blog.
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
//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/md_read.php');
|
||||
} else {
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/h1_month.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/page_menu.php');
|
||||
}
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||
?>
|
@ -10,9 +10,9 @@ function format_page(){//Set the title of the page based on the main header, <h1
|
||||
var script = document.createElement('script');
|
||||
var style_sheet = document.createElement('link');
|
||||
script.type = 'text/javascript';
|
||||
script.src = '/common/prisim/prism.js';
|
||||
script.src = '/common/prism/prism.js';
|
||||
style_sheet.type = 'text/css';
|
||||
style_sheet.href = '/common/prisim/prism.css';
|
||||
style_sheet.href = '/common/prism/prism.css';
|
||||
style_sheet.rel = 'stylesheet';
|
||||
document.head.appendChild(script);
|
||||
document.head.appendChild(style_sheet);
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
//Sets the proper level 1 heading for the folder.
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/get_month_name.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/get_month_name.php');
|
||||
$current_dir = basename(getcwd());
|
||||
$named_month = get_month_name($current_dir);
|
||||
if ( $named_month == "blog") {
|
@ -28,7 +28,8 @@
|
||||
?>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||
<?php//If a tags file is present parse it and add any tags found to the renderd page's metadata.
|
||||
<?php
|
||||
//If a tags file is present parse it and add any tags found to the renderd page's metadata.
|
||||
if(file_exists('tags')){
|
||||
$tag_data_raw = fopen('tags',"r");
|
||||
$tag_data = fread($tag_data_raw, filesize('tags'));
|
||||
@ -39,10 +40,10 @@
|
||||
?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title><?php $title = Title(); echo $title;?></title>
|
||||
<link href="/common/styles.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
||||
<link href="/common/jmenu.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
||||
<link href="/common/print.css?v=<?php echo date('his'); ?>" type="text/css" media="print" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="/common/page_format.js?v=<?php echo date('his'); ?>"></script>
|
||||
<link href="/common/css/styles.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
||||
<link href="/common/css/jmenu.css?v=<?php echo date('his'); ?>" type="text/css" rel="stylesheet"/>
|
||||
<link href="/common/css/print.css?v=<?php echo date('his'); ?>" type="text/css" media="print" rel="stylesheet"/>
|
||||
<script type="text/javascript" src="/common/js/page_format.js?v=<?php echo date('his'); ?>"></script>
|
||||
</head>
|
||||
<body lang="en-US">
|
||||
<div class="body" id="body">
|
14
common/php/index.php
Normal file
14
common/php/index.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
//The common file used to render pages on the blog.
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
||||
//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/md_read.php');
|
||||
} else {
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/h1_month.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/page_menu.php');
|
||||
}
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
||||
?>
|
@ -37,5 +37,5 @@
|
||||
}
|
||||
echo "</ul>\n</div>\n";
|
||||
}
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/modal.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/modal.php');
|
||||
?>
|
@ -2,7 +2,7 @@
|
||||
<div class="pmenu">
|
||||
<ul><li><a href=/>Home</a></li></ul>
|
||||
<?php
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/get_month_name.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/get_month_name.php');
|
||||
|
||||
//Removes the number used to keep articles in post order from the displayed title.
|
||||
function remove_sorting_number($link_title){
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
||||
?>
|
||||
<article>
|
||||
<h1 title="Homepage for <?php $site = $_SERVER['SERVER_NAME'];echo"$site";?>">Homepage</h1>
|
||||
@ -11,5 +11,5 @@ include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
</div>
|
||||
</article>
|
||||
<?php
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
||||
?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
||||
#Markdown parseing code.
|
||||
$MD_Parser = new Parsedown();
|
||||
$MD_Path = "gplv2.md";
|
||||
@ -10,5 +10,5 @@
|
||||
echo "<article>".$MD_Parser->text($MD_Text);
|
||||
fclose($MD_File);
|
||||
echo "<p>A text version of this document can be found <a href=\"/GPLv2.txt\">here</a>.</p>\n</article>";
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
||||
?>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
require ($_SERVER['DOCUMENT_ROOT'].'/common/vendor/autoload.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
||||
echo "<article>";
|
||||
?>
|
||||
<p>The MIT License (MIT)</p>
|
||||
@ -15,5 +15,5 @@
|
||||
<p>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.</p>
|
||||
<?php
|
||||
echo "<p>A text version of this document can be found <a href=\"/license/MIT.txt\">here</a>.</p>\n</article>";
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');
|
||||
include ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');
|
||||
?>
|
||||
|
@ -3,8 +3,8 @@ function display_file($license_file){
|
||||
$out = file_get_contents($license_file);
|
||||
echo "<pre><code>".$out."</code></pre>";
|
||||
}
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/menu.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/header.php');
|
||||
include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/menu.php');
|
||||
?>
|
||||
<article>
|
||||
<p>A summery of all licenses that apply to this website.</p>
|
||||
@ -57,4 +57,4 @@ You can learn more on <a href="https://prismjs.com/">prismjs.com</a>.</p></block
|
||||
Prism is <a href="/license/MIT.php">MIT Licensed</a>.</p>
|
||||
<?php display_file("MIT_License.txt"); ?>
|
||||
</article>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/footer.php');?>
|
||||
<?php include_once ($_SERVER['DOCUMENT_ROOT'].'/common/php/footer.php');?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user