From db26fd1e17f7985776198d463378ff323d1c87be Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Thu, 8 Jul 2010 22:08:57 -0700 Subject: [PATCH] small changes --- content/log/2010-07-01_icosi | 3 +-- lib/data.php | 21 +++------------------ lib/init.php | 3 +-- lib/output.php | 5 ++++- lib/template.php | 17 ++++++++++++++--- public/css/style.css | 4 ++-- public/index.php | 1 - public/js/prettify/prettify.css | 4 ++-- templates/default.html.tpl | 2 +- templates/nav.html.tpl | 4 ++-- 10 files changed, 30 insertions(+), 34 deletions(-) diff --git a/content/log/2010-07-01_icosi b/content/log/2010-07-01_icosi index 752d935..9774754 100644 --- a/content/log/2010-07-01_icosi +++ b/content/log/2010-07-01_icosi @@ -2,8 +2,7 @@ tags = fabrication, construction, icosi, installation, design title = icosi fabrication date = 2010-07-01 -- -Fabrication progress on the 'ICOSI' project: a projection sculpture for an upcoming audiovisual installation at the -[Biennial of the Americas](http://www.biennialoftheamericas.org/) in Denver at the end of this month. The finished form is a section of a squished icosidodecahedron (scaled on the z-axis by 0.5). The form will act as a projection surface for visual software, which is directly linked to the audio components. +Fabrication progress on an audiovisual installation. The finished form is a section of a squished icosidodecahedron (scaled on the z-axis by 0.5). The form will act as a projection surface for visual software, which is directly linked to the audio components. diff --git a/lib/data.php b/lib/data.php index 53d41c6..00d8bca 100644 --- a/lib/data.php +++ b/lib/data.php @@ -69,10 +69,10 @@ function parse_file($f) $res = $config; $res['url'] = WEB_ROOT . DIRECTORY_SEPARATOR . $pathparts[sizeof($pathparts)-1] . DIRECTORY_SEPARATOR . basename($f); - $res['timestamp'] = $config['date'] ? date('U', strtotime($config['date'])) : date('U', strtotime(filemtime($f))); + $res['timestamp'] = date('U', strtotime( $config['date'] ? $config['date'] : filemtime($f))); $res['cat'] = $pathparts[sizeof($pathparts)-1]; $res['content'] = Markdown($content); - $res['tags'] = explode(', ', $config['tags']); + $res['tags'] = explode(' ', $config['tags']); return $res; } @@ -175,19 +175,4 @@ function parse_config ($config_file) return $config; } - - - -function define_constants($constants = 'config') -{ - $config = explode("\n", file_get_contents( $constants , FILE_USE_INCLUDE_PATH )); - foreach($config as $c) { - $var = explode("=", $c); - define(trim($var[0]), trim($var[1])); - } -} - - - - -?> \ No newline at end of file +?> diff --git a/lib/init.php b/lib/init.php index 29a7dd8..53e5cef 100644 --- a/lib/init.php +++ b/lib/init.php @@ -7,6 +7,7 @@ define ('SITE_TITLE', 'quilime'); define ('LOCAL_ROOT', '/home/quilime/quilime-site/'); define ('WEB_ROOT', 'http://quilime.com'); + define ('CONTENT_DIR', 'content'); define ('TEMPLATE_DIR', 'templates'); define ('PAGE_DIR', 'pages'); @@ -17,6 +18,4 @@ require_once 'markdown.php'; require_once 'template.php'; - define_constants(); - ?> \ No newline at end of file diff --git a/lib/output.php b/lib/output.php index 605dfde..89ac4f6 100644 --- a/lib/output.php +++ b/lib/output.php @@ -4,7 +4,10 @@ function get_template_instance() { $t = new Template(); - $t->template_dir = join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), '..', 'templates')); + $t->template_dir = join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), '..', TEMPLATE_DIR)); + $t->template_cache_dir = join(DIRECTORY_SEPARATOR, array(dirname(__FILE__), '..', TEMPLATE_DIR, 'cache')); +// $t->caching = 0; + return $t; } diff --git a/lib/template.php b/lib/template.php index b66cd1d..abbb3b7 100644 --- a/lib/template.php +++ b/lib/template.php @@ -2,14 +2,17 @@ class Template { + var $template_dir = 'templates'; + var $template_cache_dir = 'cache'; + var $cachr_file = null; var $response_format = 'html'; + var $caching = 1; var $_tpl_vars = array(); function __construct() { - } @@ -37,11 +40,19 @@ class Template { extract( $this->_tpl_vars ); - if (is_file($this->template_dir . DIRECTORY_SEPARATOR . $template)) + + if (is_file( $this->template_dir . DIRECTORY_SEPARATOR . $template )) include( $this->template_dir . DIRECTORY_SEPARATOR . $template ); else - include( $this->template_dir . DIRECTORY_SEPARATOR . 'default.'.$this->response_format.'.tpl' ); + include( $this->template_dir . DIRECTORY_SEPARATOR . 'default.' . $this->response_format . '.tpl'); + + } + + + function ob_file_callback($buffer) + { +// fwrite($this->cache_file, $buffer); } diff --git a/public/css/style.css b/public/css/style.css index b50e998..9488175 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1,5 +1,5 @@ body { margin:80px 100px 50px 40px; } -html, body, table { font-family: monospace; font-size:12px; line-height:1.6em; color:#666; } +html, body, table { font-family: sans-serif; font-size:12px; line-height:1.4em; color:#44d ; } .nav { position:absolute; z-index:1; top:20px; left:30px; } .nav ul { margin-left:1em; } @@ -19,7 +19,7 @@ a:hover, a.mute:hover { color:#d15; text-decoration:none; } /*headings*/ h1, h2, h3, h4, h5, h6 { font-size:1em; } -h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { text-decoration:none; } +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { } h1 { margin:0 0 3em 0; } h2 { margin:0 0 0.5em 0; } h3 { margin:0 0 0 0; } diff --git a/public/index.php b/public/index.php index c3442e0..204b88c 100644 --- a/public/index.php +++ b/public/index.php @@ -9,7 +9,6 @@ $t = get_template_instance(); $t->response_format = $response_format; $t->assign('view', $_GET['v']); - $template = 'default.'.$response_format.'.tpl'; # content folder if (is_dir(LOCAL_ROOT . CONTENT_DIR . DIRECTORY_SEPARATOR . $url_parts['url']) && $url_parts['url'] != "/") { diff --git a/public/js/prettify/prettify.css b/public/js/prettify/prettify.css index 90200e1..b35d1f9 100755 --- a/public/js/prettify/prettify.css +++ b/public/js/prettify/prettify.css @@ -11,11 +11,11 @@ .atn { color: #606; } .atv { color: #080; } .dec { color: #606; } -pre.prettyprint, code.prettyprint { font-family:monaco, "Lucida Console", monospace; font-size:12px; line-height:2em; padding:0.4em 0.6em; background:#222333; +pre.prettyprint, code.prettyprint { font-family:monaco, "Lucida Console", monospace; font-size:14px; line-height:1.5em; padding:0.4em 0.6em; background:#222333; -moz-border-radius: 8px; -webkit-border-radius: 8px; } -pre.prettyprint { padding:20px; line-height:1.4em; } +pre.prettyprint { padding:20px; } @media print { .str { color: #060; } diff --git a/templates/default.html.tpl b/templates/default.html.tpl index 699de36..f41a3de 100644 --- a/templates/default.html.tpl +++ b/templates/default.html.tpl @@ -3,7 +3,7 @@ include_template('head-inc.html.tpl') ?> - <?=SITE_TITLE?><?=$this->title(); ?> + <?=SITE_TITLE?><?=$this->title();?> diff --git a/templates/nav.html.tpl b/templates/nav.html.tpl index aa86c46..73a85fe 100644 --- a/templates/nav.html.tpl +++ b/templates/nav.html.tpl @@ -1,10 +1,10 @@