RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
-#RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
body { margin:80px 100px 50px 40px; }
-html, body, table { font-family: times, helvetica, sans; font-size:15px; line-height:1.3em; color:#999; }
+html, body, table { font-family: monaco, monospace; font-size:12px; line-height:1.6em; color:#444; }
+
.nav { position:absolute; z-index:1; top:20px; left:20px; }
.nav ul { margin-left:1em; }
::selection {background: #08f !important; color:#fff;}
/*links*/
-a { color:#555; border:0; padding:0.2em 0.1em 0.1em 0em; font-weight:bold; text-decoration:none; }
+a { color:#555; border:0; padding:0.2em 0.1em 0 0; font-weight:bold; }
a img { border:0; }
-a.mute { }
-a:hover, a.mute:hover { color:#d15; border-bottom:2px solid #d15; text-decoration:none; }
+a.mute { text-decoration:none !important; }
+a:hover, a.mute:hover { color:#d15; }
/*headings*/
-h1, h2, h3, h4, h5, h6 { font-size:1.3em; }
+h1, h2, h3, h4, h5, h6 { font-size:1.2em; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { text-decoration:none; }
h1 { margin:0 0 3em 0; font-size:2em;}
h2 { margin:4em 0 0.5em 0; }
h3 { margin:0 0 0 0; }
+ol li { list-style-type:decimal; }
+
blockquote { font-family:times; background:#000; color:#aaa;
margin:0; font-size:15px; line-height:1.4em; padding:2em 4em; font-style:italic; line-height:1.45em; max-width:600px;}
ul.inline_content {}
ul.inline_content li .content { }
ul.inline_content li { margin:0 0 150px 0; }
- ul.inline_content li h3 { border-bottom:2px solid #ddd; }
+ ul.inline_content li h3 { margin-bottom:1em; border-bottom:1px solid #ddd; padding-bottom:4px; }
ul.inline_content ol li { margin:0; padding:0; border:0;}
ul.thumbnails { }
ul.thumbnails li { display:inline-block; margin: 0px 60px 60px 0px; }
ul.thumbnails .title { }
.date { color:#ccc;}
- .func { margin-bottom:2em; }
- .func a { background:#daa; padding:0.2em 1em 0.02em 1em; font-size:9px; text-transform:uppercase;}
+ .func { margin-bottom:2em; }
+ .func a { background:#daa; padding:0.2em 1em 0.02em 1em; font-size:9px; text-transform:uppercase;}
.text { font-family:serif; font-size:15px; line-height:2.2em; margin-top:80px;}
.indent { text-indent:3em; }
#footer { margin-top:120px; }
#footer .copy a { text-decoration:none; }
-
-
/* Pretty printing styles. Used with prettify.js. */
.str { color: #f26; }
-.kwd { color: #444; font-weight:bold; }
+.kwd { color: #99f; font-weight:bold; }
.com { color: #888; font-style:italic; }
-.typ { color: #606; }
-.lit { color: #066; }
-.pun { color: #660; }
-.pln { color: #444; }
+.typ { color: #f0f; }
+.lit { color: #099; }
+.pun { color: #66d; }
+.pln { color: #ffd; }
.tag { color: #008; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
-pre.prettyprint, code.prettyprint { font-family:monaco, "Lucida Console", monospace; font-size:11px; line-height:1.6em; padding:0.3em 0.5em; background:#e9e9e9;
--moz-border-radius: 4px;
--webkit-border-radius: 4px;
+pre.prettyprint, code.prettyprint { font-family:monaco, "Lucida Console", monospace; font-size:12px; line-height:2em; padding:0.4em 0.6em; background:#322323;
+-moz-border-radius: 8px;
+-webkit-border-radius: 8px;
}
-pre.prettyprint { padding:20px; }
+pre.prettyprint { padding:20px; line-height:1.4em; }
@media print {
.str { color: #060; }
$content = array();
$glob = glob( CONTENT_DIR . $path . '/*' );
+
foreach ($glob as $c) {
if (is_file($c . $config) || is_dir($c . $config)) {
$config_array = parse_config($c . $config);
if ($config_array['title'] && $config_array['hide'] != "true") {
$content[] = $config_array;
- }
+ }
}
- }
+ }
return array(array_reverse($content), count($content));
}
<?php
+
+ putenv("TZ=America/Los_Angeles");
- ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . LOCAL_ROOT . '/lib/');
-
+ ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(realpath(__FILE__)));
+
+ define ('SITE_TITLE', 'quilime');
+ define ('LOCAL_ROOT', '/home/quilime/quilime.com/');
+ define('WEB_ROOT', 'http://quilime.com/');
+ define ('CONTENT_DIR', 'content/');
+ define ('TEMPLATE_DIR', 'templates/');
+ define ('CONFIG_DELIMITER', '--');
+
require_once 'data.php';
- require_once 'output.php';
+ require_once 'output.php';
define_constants();
$format = empty($format) ? $default : $format;
return array($format, $types[$format]);
}
+
+
+ if( !function_exists('parse_ini_string') ) {
+ function parse_ini_string( $string ) {
+ $array = Array();
+ $lines = explode("\n", $string );
+ foreach( $lines as $line ) {
+ $statement = preg_match("/^(?!;)(?P<key>[\w+\.\-]+?)\s*=\s*(?P<value>.+?)\s*$/", $line, $match );
+ if( $statement ) {
+ $key = $match[ 'key' ];
+ $value = $match[ 'value' ];
+ # Remove quote
+ if( preg_match( "/^\".*\"$/", $value ) || preg_match( "/^'.*'$/", $value ) ) {
+ $value = mb_substr( $value, 1, mb_strlen( $value ) - 2 );
+ }
+ $array[ $key ] = $value;
+ }
+ }
+ return $array;
+ }
+ }
function get_url_parts()
--- /dev/null
+FILE=$(date +%Y"-"%m"-"%d_$1)
+echo -e "title = $1\ndate = `date +%Y"-"%m"-"%d`\nhide = true\n--\n\n" > $FILE
+emacs $FILE
\ No newline at end of file
--- /dev/null
+<?php
+
+ include 'init.php';
+
+ list($entries, $total_entries) = get_inline_entries(array('log', 'code'));
+
+ echo '<ol>';
+ foreach ($entries as $e)
+ {
+ echo '<li><a href="'.$e['url'].'">'.$e['title'].' - '.$e['date'].'</a></li>';
+ }
+ echo '</ol>';
+
+
+ # parse inline content
+ function get_inline_entries( $sources )
+ {
+ $result = array();
+ $result_total = 0;
+ foreach ($sources as $dir) {
+ $contents = glob(LOCAL_ROOT . CONTENT_DIR . $dir . '/*');
+ foreach ($contents as $f) {
+ if (!is_dir($f)) {
+ $file_contents = explode("\n", file_get_contents($f, FILE_USE_INCLUDE_PATH));
+ $cc = "";
+ $content = "";
+ $conf = true;
+ foreach ( $file_contents as $fc ) {
+ if ($fc == CONFIG_DELIMITER) {
+ $conf = false;
+ continue;
+ }
+ if ($conf) $cc .= $fc . "\n";
+ else $content .= $fc . "\n";
+ }
+ $config = parse_ini_string($cc);
+
+ $config['url'] = WEB_ROOT . $dir . DIRECTORY_SEPARATOR . basename($f);
+ $config['timestamp'] = mktime($config['date']);
+ $config['category'] = $dir;
+ $config['content'] = $content;
+ $config['tags'] = explode(' ', $config['tags']);
+
+ $result[] = $config;
+ $result_total++;
+ }
+ }
+ }
+
+ // order by date
+ foreach ($result as $key => $row) {
+ $time[$key] = $row['date'];
+ }
+ array_multisort($time, SORT_DESC, $result);
+
+ return array($result, $result_total);
+ }
+
+
+
+ $files = glob('../content/log/*');
+
+ $result = array();
+ $result['count'] = 0;
+ foreach ($files as $f)
+ {
+ if (!is_dir($f)) {
+
+ $config_settings = explode("\n", file_get_contents($f, FILE_USE_INCLUDE_PATH));
+
+ $cc = "";
+ $content = "";
+ $past_conf = false;
+ foreach ( $config_settings as $c ) {
+ if ($c == CONFIG_DELIMITER) {
+ $past_conf = true;
+ continue;
+ }
+ if ($past_conf) $content .= $c . "\n";
+ else $cc .= $c . "\n";
+ }
+ $config = parse_ini_string($cc);
+ $config['content'] = $content;
+
+ if ($config['hide'] == 'true')
+ continue;
+
+ $result['count'] += 1;
+ $result['entries'][] = $config;
+
+// print_r($cc);
+// echo "content: " . $content;
+
+// echo $config;
+// echo "\n";
+ }
+ }
+
+// echo json_encode($result);
+
+// print_r($entries);
+
+
+
+
+
+?>
\ No newline at end of file
<p>
- quilime is a continually growing codification of exploration, resource, and creativity.
+ quilime is a codification of exploration, resources, and creativity.
<br/>
<br/>
author: gabriel dunne (<a href="mailto:gdunne@quilime.com">email</a>, <a href="http://gabrieldunne.com">www</a>)
<? include_template('nav.html'); ?>
<div id="content">
- <--- navigation
-</div>
-
+<--- nav
</body>
</html>
function linklist($links)
{ ?>
<?php foreach($links as $l) : ?>
- <li><a href="<?php echo $l[0];?>"><?php echo $l[0];?></a></li>
+ <li><a href="http://<?php echo $l[0];?>"><?php echo $l[0];?></a></li>
<?php endforeach; ?>
<?php
}
-t<?php
+<?php
$single = false;
<?php if ($single) : ?>
<h1>
- <a title="<?php echo get_relative_time($log['timestamp']); ?>" href="<?php echo $log['href'];?>">
+ <a title="posted <?php echo get_relative_time($log['timestamp']); ?>" href="<?php echo $log['href'];?>">
<?php echo $log['title']; ?>
- </a><small>[<?=get_relative_time($log['timestamp']);?>]</small>
+ </a><small>[<?php echo date("Y M d", strtotime($log['date']));?>]</small>
</h1>
<ul class="nav">
<li><a href="/">home</a><br/><br/></li>
+ <li><a href="/about/">about</a></li>
<li><a href="/log/">log</a></li>
- <li><a href="/projects/">projects</a></li>
+ <li><a href="/agg/">aggregate</a></li>
<li><a href="/code/">code</a></li>
<li><a href="/links/">links</a></li>
- <li><a href="/agg/">aggregate</a></li>
- <li><a href="/about/">about</a></li>
</ul>