From 1bccd7929e446df0f299fec14c019a081175bea6 Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Mon, 17 Jun 2013 17:44:28 -0700 Subject: [PATCH] Single page again. --- css/style.css | 2 +- lib/config.ini | 2 +- lib/data.php | 5 ++-- pages/bio | 2 +- pages/projects | 4 ---- templates/all.html.tpl | 5 +--- templates/entry.html.tpl | 2 +- templates/projects.html.tpl | 46 ++++++++++++++++++++++++------------- 8 files changed, 38 insertions(+), 30 deletions(-) delete mode 100644 pages/projects diff --git a/css/style.css b/css/style.css index 0bc36c0..4c65d3b 100644 --- a/css/style.css +++ b/css/style.css @@ -225,7 +225,7 @@ table, td, tr { .entries.projects li { /*display:inline-block;*/ float:left; - height:330px; + height:250px; width:200px; margin:0 2em 2em 0; } diff --git a/lib/config.ini b/lib/config.ini index 50af060..8479201 100644 --- a/lib/config.ini +++ b/lib/config.ini @@ -9,7 +9,7 @@ date_format = M d Y ; local locations web_root = / data = cache -content = _content +content = content comments = comments templates = templates pages = pages diff --git a/lib/data.php b/lib/data.php index 4a1f99f..605aa7d 100644 --- a/lib/data.php +++ b/lib/data.php @@ -293,8 +293,9 @@ function parse_entry($fileInfo, $page = false) if ($passed_more) $file['content_short'] = Markdown($content_short); - $file['comments_enabled'] = isset($f['config']['comments']) && $f['config']['comments']; - $file['comments'] = new Comments($fileInfo); + if (isset($f['config']['comments']) && $f['config']['comments']) { + $file['comments'] = new Comments($fileInfo); + } $cat = clean_slashes(str_replace(rtrim(LOCAL_ROOT . '/' . CONTENT_DIR, "/"), "", $fileInfo->getPath())); diff --git a/pages/bio b/pages/bio index 8a52122..ca95c62 100755 --- a/pages/bio +++ b/pages/bio @@ -1,7 +1,7 @@ template = page title = bio -- -
+
diff --git a/pages/projects b/pages/projects deleted file mode 100644 index db3c026..0000000 --- a/pages/projects +++ /dev/null @@ -1,4 +0,0 @@ -template = all -title = projects --- -projects diff --git a/templates/all.html.tpl b/templates/all.html.tpl index 162f1b1..4a19486 100644 --- a/templates/all.html.tpl +++ b/templates/all.html.tpl @@ -1,7 +1,7 @@ include_template('head-inc.html.tpl') ?> - <?=SITE_TITLE?> + <?=SITE_TITLE?><?=$this->page_title(TITLE_DELIMITER);?> @@ -14,7 +14,6 @@ $tag = ""; ?> -
    "> @@ -36,10 +35,8 @@
-
-
include_template('pagination.html.tpl') ?> diff --git a/templates/entry.html.tpl b/templates/entry.html.tpl index e830e75..4b3758d 100644 --- a/templates/entry.html.tpl +++ b/templates/entry.html.tpl @@ -41,7 +41,7 @@ is_single) && $entry->is_single && $entry->comments_enabled) +if (isset($entry->is_single) && $entry->is_single && isset($entry->comments)) $this->include_template('comments.html.tpl', array('entry' => $entry)); ?> diff --git a/templates/projects.html.tpl b/templates/projects.html.tpl index 7462997..d781ae8 100644 --- a/templates/projects.html.tpl +++ b/templates/projects.html.tpl @@ -1,10 +1,7 @@ - - + include_template('head-inc.html.tpl') ?> - <?=SITE_TITLE?><?=$this->page_title(TITLE_DELIMITER);?> - @@ -20,26 +17,43 @@
-
include_template('footer.html.tpl') ?> + + + + + -- 2.34.1