9 Commits

Author SHA1 Message Date
manfromhuh a06e7dabeb Merge pull request 'issue#5' (#8) from 20xd6/simple_blog:issue#5 into issue#5
Reviewed-on: manfromhuh/simple_blog#8
2022-12-20 16:16:58 -05:00
manfromhuh e624e7c287 Merge pull request 'master' (#7) from 20xd6/simple_blog:master into master
Reviewed-on: manfromhuh/simple_blog#7
2022-12-20 16:15:20 -05:00
20xd6 b4ffc0b9f8 Merge branch 'master' into issue#5 2022-12-20 16:13:44 -05:00
20xd6 b40b877a3f Update Readme.md 2022-12-20 15:54:03 -05:00
20xd6 7734de9fa4 Merge pull request 'Fix issues #25 and #26' (#27) from issue#26 into master
Reviewed-on: #27
2022-08-09 14:15:37 -04:00
20xd6 470773721a Stop parsing if the author isn't found 2022-08-09 14:10:44 -04:00
20xd6 5d7b4cc121 Add a size check before attempting to parse the author
The author file is now checked to insure it's non-zero before attempting
to parse it for the author who's byline will be displayed at the bottom
of the post.
2022-08-09 14:07:40 -04:00
20xd6 efe61157e8 Merge pull request 'Cleanup header.php' (#22) from issue#10 into master
Reviewed-on: #22
2022-07-31 17:12:49 -04:00
manfromhuh 8da50f2841 Merge pull request 'Merge upstream master' (#5) from 20xd6/simple_blog:master into master
Reviewed-on: manfromhuh/simple_blog#5
2022-07-27 20:19:37 -04:00
2 changed files with 24 additions and 30 deletions
+13 -16
View File
@@ -49,14 +49,14 @@ Contains the blog articles. The articles are placed in subdirectories of `by_yea
```
├── by_year
│   ├── 2021
│   │   ├── 12
│   │   └── index.php -> /path/to/common/index.php
│   ├── 2022
│   │   ├── 01
│   │   ├── 02
│   │   └── index.php -> /path/to/common/index.php
│   └── index.php
│ ├── 2021
│ │ ├── 12
│ │ └── index.php -> /path/to/common/index.php
│ ├── 2022
│ │ ├── 01
│ │ ├── 02
│ │ └── index.php -> /path/to/common/index.php
│ └── index.php
└── index.php -> /path/to/common/index.php
```
@@ -71,16 +71,13 @@ This directory contains the files and libraries used to render the site's pages.
#### CSS
* [styles.css](/git/20xd6/simple_blog/src/branch/master/common/styles.css) - The main site CSS.
* [jmenu.css]() - Used to render the responsive menus.
* [print.css]() - Used to style printed pages.
* [gallery.css]() - Styles the floating
* [styles.css](/git/20xd6/simple_blog/src/branch/master/common/css/styles.css) - The main site CSS.
* [jmenu.css](/git/20xd6/simple_blog/src/branch/master/common/css/jmenu.css) - Used to render the responsive menus.
* [print.css](/git/20xd6/simple_blog/src/branch/master/common/css/print.css) - Used to style printed pages.
#### JS
#### [JS](/git/20xd6/simple_blog/src/branch/master/common/js)
* font_size.js
* [page_format.js]() - The main JS file used for formatting and adding extra functions to pages.
* gallery.js
* [page_format.js](/git/20xd6/simple_blog/src/branch/master/common/js/page_format.js) - The main JS file used for formatting and adding extra functions to pages.
#### PHP
+11 -14
View File
@@ -22,20 +22,17 @@
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 (file_exists('author')){
$author_name_raw = fopen('author', 'r');
$author_name = fread($author_name_raw, filesize('author'));
$author_name = str_replace("\n", "", $author_name);
$byline_path = $_SERVER['DOCUMENT_ROOT'].'blog/authors/'.$author_name.'/byline.md';
if (file_exists($byline_path)){
echo "<div class =\"byline\">\n"
. read_md($byline_path)
."</div><!--End byline div-->\n";
} else {
echo "<h2>No byline</h2>";
echo "<p>$byline_path</p>";
}
fclose($author_name_raw);
if (file_exists('author') && (filesize('author') != 0)){
$author_name_raw = fopen('author', 'r');
$author_name = fread($author_name_raw, filesize('author'));
$author_name = str_replace("\n", "", $author_name);
$byline_path = $_SERVER['DOCUMENT_ROOT'].'blog/authors/'.$author_name.'/byline.md';
if (file_exists($byline_path)){
echo "<div class =\"byline\">\n"
. read_md($byline_path)
."</div><!--End byline div-->\n";
}
fclose($author_name_raw);
}
if ($tag_data != NULL){
$page_tags = str_getcsv($tag_data);