From e1dba83b25828574895d8f7da2553479a310d05b Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Fri, 7 Sep 2012 22:25:39 -0700 Subject: [PATCH] Serious hacking. --- css/style.css | 94 ++++++++++++++++----------------- data/content/data.json | 2 +- data/content/log/data.json | 2 +- data/content/projects/data.json | 2 +- lib/config.ini | 20 +------ lib/data.php | 44 ++------------- lib/model.php | 5 +- lib/view.php | 2 + pages/about | 5 +- pages/contact | 9 ++-- pages/photo | 3 -- templates/default.html.tpl | 11 ++-- templates/edit.html.tpl | 11 ++-- templates/entry.html.tpl | 14 ++--- templates/page.html.tpl | 10 ++-- templates/single.html.tpl | 2 +- 16 files changed, 92 insertions(+), 144 deletions(-) delete mode 100755 pages/photo diff --git a/css/style.css b/css/style.css index 091d23c..603543b 100644 --- a/css/style.css +++ b/css/style.css @@ -89,25 +89,34 @@ table, td, tr { .edit { - margin-left: 160px; - padding:20px; box-sizing: border-box; - background:#ccf; + background:#005; + position:fixed; + width:100%; + bottom:0; + left:0; + padding:20px; } + .edit .ctrl { + margin-bottom:20px; + } .edit textarea { font-family: monaco, monospace; - padding:20px; + background:#005; + padding:5px; + border:0; width:100%; font-size:12px; - background:#005; color:#eee; - height:400px; + height:200px; } - .edit_button { - /*position:fixed; +.edit_button { + /* + position:fixed; top:5px; right:10px; - text-decoration:underline;*/ - } + text-decoration:underline; + */ +} #nav { @@ -141,57 +150,46 @@ table, td, tr { visibility:visible !important; } -.singlebg { +.singlebg { } -} .entry h1 { - margin-bottom:5px; - position:relative; -} -.entry h1 a { -} -.entry h1 a:hover { -} + margin-bottom:5px; + position:relative; } +.entry h1 a { } +.entry h1 a:hover { } .entry h2 { - margin-top:40px; -} + margin-top:40px; } .entry .metadata { - margin-bottom:30px; - color:#333; -} + font-style:italic; + font-size:12px; + line-height:16px; + margin-bottom:30px; } +.entry .metadata, .entry .metadata a { - color:#555; -} + font-weight:normal; + color:#ccc; } .entry .metadata a:hover { - color:#999; -} + color:#999; } .entry .metadata .tags li { - display:inline-block; - margin-right:0.3em; -} + display:inline-block; + margin-right:0.3em; } .entry p { - max-width:720px; -} + max-width:720px; } .archive li { - padding-bottom:5px; - margin-bottom:5px; - border-bottom:1px dotted #333; -} + padding-bottom:5px; + margin-bottom:5px; + border-bottom:1px dotted #333; } .project { - display:inline-block; - margin-right:10px; - margin-bottom:40px; - width:120px; - font-size:12px; -} -.thumb { - width:100px; - height:100px; - overflow:hidden; -} + display:inline-block; + margin-right:10px; + margin-bottom:40px; + width:120px; + font-size:12px; } +.projects li { + margin-bottom:2em; } diff --git a/data/content/data.json b/data/content/data.json index 783ffad..6f073b5 100644 --- a/data/content/data.json +++ b/data/content/data.json @@ -1 +1 @@ -{"entries":[{"config":{"date":"feb 20 2012","title":"temple","tags":"photo"},"title":"temple","filename":"temple","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/temple","fileInfo":{},"timestamp":"1329724800","tags":["photo"],"content":"

\n \n<\/a><\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/temple\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/temple\/","thumb":"media\/\/og\/temple\/thumb.png","url":"\/og\/temple"},{"config":{"title":"Water Is Life","date":"Oct 23 2011 06:04:38 PM","tags":"water photo"},"title":"Water Is Life","filename":"water_is_life","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life","fileInfo":{},"timestamp":"1319418278","tags":["water","photo"],"content":"

<\/a><\/p>\n\n

near Quotar Minar in Dadabari.<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/water_is_life\/","thumb":"media\/\/og\/water_is_life\/thumb.png","url":"\/og\/water_is_life"},{"config":{"title":"islands","date":"Oct 05 2011, 03:53:55 PM","tags":"writing quote"},"title":"islands","filename":"islands","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/islands","fileInfo":{},"timestamp":"1317855235","tags":["writing","quote"],"content":"

\n

Imagine that every man's mind is an island, surrounded by ocean. Each seems isolated, yet in reality all are linked by the bedrock from which they spring. If the ocean were to vanish, that would be the end of the islands. They would all be part of one continent, but their individuality would be gone.<\/p>\n \n

—\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.176<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/islands\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/islands\/","thumb":"media\/\/og\/islands\/thumb.png","url":"\/og\/islands"},{"config":{"title":"childhoods end","date":"Oct 05 2011, 03:17:57 PM","tags":"india quote"},"title":"childhoods end","filename":"overlords","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/overlords","fileInfo":{},"timestamp":"1317853077","tags":["india","quote"],"content":"

\n

The case of India is particularly instructive. The main difference between us and the British in India was that they had no real motives for going there\u2014no conscious objectives, that is, except such trivial and temporary ones as trade or hostility to other European powers. They found themselves possessors of an empire before they knew what to do with it, and were never really happy until they had got rid of it again.<\/p>\n \n

\u2014\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.161<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/overlords\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/overlords\/","thumb":"media\/\/og\/overlords\/thumb.png","url":"\/og\/overlords"},{"config":{"title":"prism","date":"2007-08-23","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","tags":"prism painting"},"title":"prism","filename":"prism","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/prism","fileInfo":{},"timestamp":"1187852400","tags":["prism","painting"],"content":"

<\/p>\n\n

oil on canvas. 4' x 3'<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/prism\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"rojects","url":"projects\/"},"media":"media\/\/rojects\/prism\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","url":"\/rojects\/prism"},{"config":{"title":"mask","date":"2007-07-02","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","tags":"mask painting"},"title":"mask","filename":"mask","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/mask","fileInfo":{},"timestamp":"1183359600","tags":["mask","painting"],"content":"

<\/p>\n\n

graphite on plywood. 12\" x 12\"<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/mask\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"rojects","url":"projects\/"},"media":"media\/\/rojects\/mask\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","url":"\/rojects\/mask"}]} \ No newline at end of file +{"entries":[{"config":{"date":"feb 20 2012","title":"temple","tags":"photo"},"title":"temple","filename":"temple","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/temple","fileInfo":{},"timestamp":"1329724800","tags":["photo"],"content":"

\n \n<\/a><\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/temple\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/temple\/","thumb":"media\/\/og\/temple\/thumb.png","url":"\/og\/temple","edit_url":"\/edit\/\/og\/temple"},{"config":{"title":"Water Is Life","date":"Oct 23 2011 06:04:38 PM","tags":"water photo"},"title":"Water Is Life","filename":"water_is_life","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life","fileInfo":{},"timestamp":"1319418278","tags":["water","photo"],"content":"

<\/a><\/p>\n\n

near Quotar Minar in Dadabari.<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/water_is_life\/","thumb":"media\/\/og\/water_is_life\/thumb.png","url":"\/og\/water_is_life","edit_url":"\/edit\/\/og\/water_is_life"},{"config":{"title":"islands","date":"Oct 05 2011, 03:53:55 PM","tags":"writing quote"},"title":"islands","filename":"islands","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/islands","fileInfo":{},"timestamp":"1317855235","tags":["writing","quote"],"content":"

\n

Imagine that every man's mind is an island, surrounded by ocean. Each seems isolated, yet in reality all are linked by the bedrock from which they spring. If the ocean were to vanish, that would be the end of the islands. They would all be part of one continent, but their individuality would be gone.<\/p>\n \n

—\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.176<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/islands\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/islands\/","thumb":"media\/\/og\/islands\/thumb.png","url":"\/og\/islands","edit_url":"\/edit\/\/og\/islands"},{"config":{"title":"childhoods end","date":"Oct 05 2011, 03:17:57 PM","tags":"india quote"},"title":"childhoods end","filename":"overlords","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/overlords","fileInfo":{},"timestamp":"1317853077","tags":["india","quote"],"content":"

\n

The case of India is particularly instructive. The main difference between us and the British in India was that they had no real motives for going there\u2014no conscious objectives, that is, except such trivial and temporary ones as trade or hostility to other European powers. They found themselves possessors of an empire before they knew what to do with it, and were never really happy until they had got rid of it again.<\/p>\n \n

\u2014\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.161<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/overlords\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"og","url":"log\/"},"media":"media\/\/og\/overlords\/","thumb":"media\/\/og\/overlords\/thumb.png","url":"\/og\/overlords","edit_url":"\/edit\/\/og\/overlords"},{"config":{"title":"prism","date":"2007-08-23","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","tags":"prism painting"},"title":"prism","filename":"prism","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/prism","fileInfo":{},"timestamp":"1187852400","tags":["prism","painting"],"content":"

<\/p>\n\n

oil on canvas. 4' x 3'<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/prism\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"rojects","url":"projects\/"},"media":"media\/\/rojects\/prism\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","url":"\/rojects\/prism","edit_url":"\/edit\/\/rojects\/prism"},{"config":{"title":"mask","date":"2007-07-02","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","tags":"mask painting"},"title":"mask","filename":"mask","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/mask","fileInfo":{},"timestamp":"1183359600","tags":["mask","painting"],"content":"

<\/p>\n\n

graphite on plywood. 12\" x 12\"<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/mask\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"rojects","url":"projects\/"},"media":"media\/\/rojects\/mask\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","url":"\/rojects\/mask","edit_url":"\/edit\/\/rojects\/mask"}]} \ No newline at end of file diff --git a/data/content/log/data.json b/data/content/log/data.json index 96ae72a..1690079 100644 --- a/data/content/log/data.json +++ b/data/content/log/data.json @@ -1 +1 @@ -{"entries":[{"config":{"date":"feb 20 2012","title":"temple","tags":"photo"},"title":"temple","filename":"temple","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/temple","fileInfo":{},"timestamp":"1329724800","tags":["photo"],"content":"

\n \n<\/a><\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/temple\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/temple\/","thumb":"media\/\/log\/temple\/thumb.png","url":"\/log\/temple"},{"config":{"title":"Water Is Life","date":"Oct 23 2011 06:04:38 PM","tags":"water photo"},"title":"Water Is Life","filename":"water_is_life","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life","fileInfo":{},"timestamp":"1319418278","tags":["water","photo"],"content":"

<\/a><\/p>\n\n

near Quotar Minar in Dadabari.<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/water_is_life\/","thumb":"media\/\/log\/water_is_life\/thumb.png","url":"\/log\/water_is_life"},{"config":{"title":"islands","date":"Oct 05 2011, 03:53:55 PM","tags":"writing quote"},"title":"islands","filename":"islands","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/islands","fileInfo":{},"timestamp":"1317855235","tags":["writing","quote"],"content":"

\n

Imagine that every man's mind is an island, surrounded by ocean. Each seems isolated, yet in reality all are linked by the bedrock from which they spring. If the ocean were to vanish, that would be the end of the islands. They would all be part of one continent, but their individuality would be gone.<\/p>\n \n

—\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.176<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/islands\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/islands\/","thumb":"media\/\/log\/islands\/thumb.png","url":"\/log\/islands"},{"config":{"title":"childhoods end","date":"Oct 05 2011, 03:17:57 PM","tags":"india quote"},"title":"childhoods end","filename":"overlords","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/overlords","fileInfo":{},"timestamp":"1317853077","tags":["india","quote"],"content":"

\n

The case of India is particularly instructive. The main difference between us and the British in India was that they had no real motives for going there\u2014no conscious objectives, that is, except such trivial and temporary ones as trade or hostility to other European powers. They found themselves possessors of an empire before they knew what to do with it, and were never really happy until they had got rid of it again.<\/p>\n \n

\u2014\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.161<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/overlords\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/overlords\/","thumb":"media\/\/log\/overlords\/thumb.png","url":"\/log\/overlords"}]} \ No newline at end of file +{"entries":[{"config":{"date":"feb 20 2012","title":"temple","tags":"photo"},"title":"temple","filename":"temple","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/temple","fileInfo":{},"timestamp":"1329724800","tags":["photo"],"content":"

\n \n<\/a><\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/temple\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/temple\/","thumb":"media\/\/log\/temple\/thumb.png","url":"\/log\/temple","edit_url":"\/edit\/\/log\/temple"},{"config":{"title":"Water Is Life","date":"Oct 23 2011 06:04:38 PM","tags":"water photo"},"title":"Water Is Life","filename":"water_is_life","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life","fileInfo":{},"timestamp":"1319418278","tags":["water","photo"],"content":"

<\/a><\/p>\n\n

near Quotar Minar in Dadabari.<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/water_is_life\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/water_is_life\/","thumb":"media\/\/log\/water_is_life\/thumb.png","url":"\/log\/water_is_life","edit_url":"\/edit\/\/log\/water_is_life"},{"config":{"title":"islands","date":"Oct 05 2011, 03:53:55 PM","tags":"writing quote"},"title":"islands","filename":"islands","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/islands","fileInfo":{},"timestamp":"1317855235","tags":["writing","quote"],"content":"

\n

Imagine that every man's mind is an island, surrounded by ocean. Each seems isolated, yet in reality all are linked by the bedrock from which they spring. If the ocean were to vanish, that would be the end of the islands. They would all be part of one continent, but their individuality would be gone.<\/p>\n \n

—\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.176<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/islands\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/islands\/","thumb":"media\/\/log\/islands\/thumb.png","url":"\/log\/islands","edit_url":"\/edit\/\/log\/islands"},{"config":{"title":"childhoods end","date":"Oct 05 2011, 03:17:57 PM","tags":"india quote"},"title":"childhoods end","filename":"overlords","path":"\/Users\/gdunne\/_code\/plog\/content\/log\/overlords","fileInfo":{},"timestamp":"1317853077","tags":["india","quote"],"content":"

\n

The case of India is particularly instructive. The main difference between us and the British in India was that they had no real motives for going there\u2014no conscious objectives, that is, except such trivial and temporary ones as trade or hostility to other European powers. They found themselves possessors of an empire before they knew what to do with it, and were never really happy until they had got rid of it again.<\/p>\n \n

\u2014\"The Inspector\" Overlord. Childhoods End<\/u>, Arthur C. Clark. p.161<\/p>\n<\/blockquote>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/log\/overlords\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"log","url":"\/log\/"},"media":"media\/\/log\/overlords\/","thumb":"media\/\/log\/overlords\/thumb.png","url":"\/log\/overlords","edit_url":"\/edit\/\/log\/overlords"}]} \ No newline at end of file diff --git a/data/content/projects/data.json b/data/content/projects/data.json index acde96c..b475989 100644 --- a/data/content/projects/data.json +++ b/data/content/projects/data.json @@ -1 +1 @@ -{"entries":[{"config":{"title":"prism","date":"2007-08-23","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","tags":"prism painting"},"title":"prism","filename":"prism","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/prism","fileInfo":{},"timestamp":"1187852400","tags":["prism","painting"],"content":"

<\/p>\n\n

oil on canvas. 4' x 3'<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/prism\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"projects","url":"\/projects\/"},"media":"media\/\/projects\/prism\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","url":"\/projects\/prism"},{"config":{"title":"mask","date":"2007-07-02","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","tags":"mask painting"},"title":"mask","filename":"mask","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/mask","fileInfo":{},"timestamp":"1183359600","tags":["mask","painting"],"content":"

<\/p>\n\n

graphite on plywood. 12\" x 12\"<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/mask\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"projects","url":"\/projects\/"},"media":"media\/\/projects\/mask\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","url":"\/projects\/mask"}]} \ No newline at end of file +{"entries":[{"config":{"title":"prism","date":"2007-08-23","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","tags":"prism painting"},"title":"prism","filename":"prism","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/prism","fileInfo":{},"timestamp":"1187852400","tags":["prism","painting"],"content":"

<\/p>\n\n

oil on canvas. 4' x 3'<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/prism\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"projects","url":"\/projects\/"},"media":"media\/\/projects\/prism\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/prism\/thumb.png","url":"\/projects\/prism","edit_url":"\/edit\/\/projects\/prism"},{"config":{"title":"mask","date":"2007-07-02","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","tags":"mask painting"},"title":"mask","filename":"mask","path":"\/Users\/gdunne\/_code\/plog\/content\/projects\/mask","fileInfo":{},"timestamp":"1183359600","tags":["mask","painting"],"content":"

<\/p>\n\n

graphite on plywood. 12\" x 12\"<\/p>\n","comments_enabled":false,"comments":{"comments":[],"comments_loc":"\/Users\/gdunne\/_code\/plogcomments\/\/Users\/gdunne\/_code\/plog\/content\/projects\/mask\/","fileInfo":{},"_recaptcha_resp":null,"_recaptcha_error":null,"_comment_error":null},"cat":{"name":"projects","url":"\/projects\/"},"media":"media\/\/projects\/mask\/","thumb":"http:\/\/portfolio.quilime.com\/2008\/mask\/thumb.png","url":"\/projects\/mask","edit_url":"\/edit\/\/projects\/mask"}]} \ No newline at end of file diff --git a/lib/config.ini b/lib/config.ini index fba828c..1faac9f 100644 --- a/lib/config.ini +++ b/lib/config.ini @@ -11,6 +11,7 @@ limit = 15 ; http://php.net/manual/en/function.date.php date_format = M d Y, h:i:s A T + [local] ; server locations and file names web_root = / @@ -27,33 +28,16 @@ data_file = data.json tags_file = tags.json - [delimiters] ; various delimiters config_delim = -- more_delim = "" title_delim = " — " + [ignores] ; file ignore patterns file_ignores[] = config file_ignores[] = .DS_Store - - -; define ('SITE_TITLE', 'quilime'); - -; define ('LOCAL_ROOT', '/home/quilime/quilime.com/'); -; define ('WEB_ROOT', '/'); -; define ('CONTENT_DIR', 'content/'); -; define ('COMMENTS_DIR', 'comments/'); -; define ('TEMPLATE_DIR', 'templates/'); -; define ('PAGE_DIR', 'pages/'); -; define ('CONFIG_DELIMITER', '--'); -; define ('CONFIG_FILE', 'config'); -; define ('MORE_DELIM', ''); -; define ('TITLE_DELIMITER', ' — '); -; define ('ENTRY_DATE_FORMAT', 'M d Y, h:i:s A T'); - -; $_FILE_IGNORES = array(CONFIG_FILE, '.DS_Store'); diff --git a/lib/data.php b/lib/data.php index 4d8a90d..24ec42f 100644 --- a/lib/data.php +++ b/lib/data.php @@ -249,48 +249,12 @@ function parse_entry($fileInfo, $page = false) $file['path'] = $fileInfo->getRealPath(); $file['media'] = MEDIA_DIR . '/' . ($page ? '' : substr($file['cat']['url'],1)) . $fileInfo->getFilename() . '/'; $file['thumb'] = isset($file['config']['thumb']) ? $file['config']['thumb'] : MEDIA_DIR . '/' . substr($file['cat']['url'],1) . $fileInfo->getFilename() . '/thumb.png'; - $file['url'] = WEB_ROOT . ($page ? '' : substr($file['cat']['url'],1)) . $fileInfo->getFilename(); - $file['cat'] = (object) $file['cat']; + $file['url'] = WEB_ROOT . ($page ? '' : substr($file['cat']['url'],1)) . $fileInfo->getFilename(); + $file['edit_url'] = WEB_ROOT . 'edit/' . $file['url']; + $file['cat'] = (object) $file['cat']; $file['config'] = (object) $file['config']; - return (object) $file; - - - /* - $f['title'] = isset($f['config']['title']) ? $f['config']['title'] : $fileInfo->getFilename() ; - $f['config']['date'] = isset($f['config']['date']) ? $f['config']['date'] : null; - $f['timestamp'] = $f['config']['date'] ? date('U', strtotime( $f['config']['date'])) : $fileInfo->getCTime(); - $f['tags'] = isset($f['config']['tags']) ? explode(" ", $f['config']['tags']) : null; - $f['content'] = Markdown($content); - - $f['comments_enabled'] = isset($f['config']['comments']) && $f['config']['comments']; - $f['comments'] = new Comments($fileInfo); - - if ($passed_more) - $f['content_short'] = Markdown($content_short); - - $cat = clean_slashes(str_replace(LOCAL_ROOT . CONTENT_DIR, "", $fileInfo->getPath())); - $clean_path = str_replace(LOCAL_ROOT . CONTENT_DIR, "", clean_slashes($fileInfo->getPath())); - - //$f['cat'] = $page ? null : array('name' => $clean_path, 'url' => $clean_path ); - $f['cat'] = clean_slashes(str_replace(LOCAL_ROOT . CONTENT_DIR, "", $fileInfo->getPath())); - - $f['path'] = $fileInfo->getRealPath(); - $f['url'] = ($page ? WEB_ROOT : WEB_ROOT . $f['cat']['url'] . '/' ) . $fileInfo->getFilename(); - - echo $f['url']; - echo '
'; - - if (!CLEAN_URLS) { - $f['cat']['url'] = WEB_ROOT . '?p=' . $f['cat']['url']; - $f['url'] = WEB_ROOT . '?p=' . $f['url']; - } - - $f['cat'] = (object) $f['cat']; - $f['config'] = (object) $f['config']; - - return (object) $f; - */ + return (object) $file; } function get_comments_location ( &$fileInfo ) { diff --git a/lib/model.php b/lib/model.php index d2ced5b..d952441 100644 --- a/lib/model.php +++ b/lib/model.php @@ -40,8 +40,6 @@ class Model function parse_request( $request ) { - - # if multiple (multiple files in CONTENT dir) if ($this->is_multiple()) { # check if config file exists in dir @@ -66,7 +64,6 @@ class Model if ($_SERVER['REQUEST_METHOD'] == 'POST') $this->process_post_request( $this->entry ); - // prev/next /* $entries = get_entries( $request['dirname'] ); @@ -93,7 +90,9 @@ class Model # not found else { + $this->template = '404.html.tpl'; + } } diff --git a/lib/view.php b/lib/view.php index 9de6c64..44361d7 100644 --- a/lib/view.php +++ b/lib/view.php @@ -44,8 +44,10 @@ class View public function render( $template, $response_format = 'html' ) { extract( $this->_tpl_vars ); + if (!is_file($this->template_dir.'/'.$template)) $template = $this->default_template.'.'.$response_format.'.tpl'; + include( $this->template_dir.'/'.$template ); } diff --git a/pages/about b/pages/about index bf03865..6a53e6c 100755 --- a/pages/about +++ b/pages/about @@ -1,3 +1,6 @@ title = about +ee = -- -Born, lives, and works in the San Francisco Bay Area \ No newline at end of file + +This website is a portfolio and archive of my work. + diff --git a/pages/contact b/pages/contact index 5b77e3c..3997433 100755 --- a/pages/contact +++ b/pages/contact @@ -1,9 +1,12 @@ -- - -1242 Market St, FL 2 +Gabriel Dunne +1242 Market St +Floor 2 San Francisco, CA USA 94102 -studio@gabrieldunne.com + +studio at gabrieldunne dot com + \+ 1 415 493 8496
diff --git a/pages/photo b/pages/photo deleted file mode 100755 index f1894c0..0000000 --- a/pages/photo +++ /dev/null @@ -1,3 +0,0 @@ -title = photo -template = photo --- diff --git a/templates/default.html.tpl b/templates/default.html.tpl index 516adaf..7281930 100644 --- a/templates/default.html.tpl +++ b/templates/default.html.tpl @@ -10,15 +10,17 @@ include_template('nav.html.tpl') ?> -include_template('edit.html.tpl'); ?> +include_template('edit.html.tpl'); ?>

- + content)): ?> ' . $entry->content); ?> - - edit + + + edit_button;?> + @@ -28,6 +30,7 @@ $entry->content = $entry->content_short . '
more →

'; $this->include_template('entry.html.tpl', array('entry' => $entry)); + ?>
diff --git a/templates/edit.html.tpl b/templates/edit.html.tpl index 0a53e14..751ccde 100644 --- a/templates/edit.html.tpl +++ b/templates/edit.html.tpl @@ -1,10 +1,9 @@
- - fileInfo); ?>
- - - +
+ + +
+
-
diff --git a/templates/entry.html.tpl b/templates/entry.html.tpl index 2e7323e..d21b210 100644 --- a/templates/entry.html.tpl +++ b/templates/entry.html.tpl @@ -11,21 +11,19 @@ - # @@ -34,7 +32,7 @@ /' . implode(', ', $entry['tags']); ?> */ - ?> +?>
@@ -56,4 +54,6 @@ if (isset($entry->is_single) && $entry->is_single && $entry->comments_enabled) edit +
+ diff --git a/templates/page.html.tpl b/templates/page.html.tpl index 3c75579..58ce24d 100644 --- a/templates/page.html.tpl +++ b/templates/page.html.tpl @@ -8,21 +8,17 @@ - include_template('nav.html.tpl') ?> +include_template('nav.html.tpl') ?> -include_template('edit.html.tpl'); ?> +include_template('edit.html.tpl'); ?>
' . $entry->content); ?> - - edit - -
- include_template('footer.html.tpl') ?> +include_template('footer.html.tpl') ?> diff --git a/templates/single.html.tpl b/templates/single.html.tpl index e8f9dd8..67308e8 100644 --- a/templates/single.html.tpl +++ b/templates/single.html.tpl @@ -10,7 +10,7 @@ include_template('nav.html.tpl') ?> - include_template('edit.html.tpl'); ?> + include_template('edit.html.tpl'); ?>
-- 2.34.1