]> git.quilime.com - plog.git/commitdiff
mods
authorGabriel Dunne <gdunne@quilime.com>
Sun, 16 Oct 2011 09:44:33 +0000 (15:14 +0530)
committerGabriel Dunne <gdunne@quilime.com>
Sun, 16 Oct 2011 09:44:33 +0000 (15:14 +0530)
17 files changed:
TODO
content/config
content/journal/2011-08-22_arrive [deleted file]
content/journal/2011-10-01_update_for_mom [deleted file]
content/journal/2011-10-04_dreams [deleted file]
css/style.css
lib/data.php
lib/init.php
pages/about [deleted file]
scripts/content.sh [deleted file]
templates/404.html.tpl
templates/archive.html.tpl [deleted file]
templates/entry.html.tpl
templates/head-inc.html.tpl
templates/nav.html.tpl
templates/page.html.tpl
templates/single.html.tpl

diff --git a/TODO b/TODO
index 4ec8d0e191749d0cdeac5ea4290c2889e3c778d2..706a6cf5d50fc74c3de76055ab71b0faeba95b28 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,9 +1,9 @@
 TODO
 
-functional
-- prev/next links accessable from View object
-- generate publish cache
-
+- pagination (View)
+- prev/next (View)
+- static cache generation (wget? curl?) 
+- update content.sh to give back help if used incorrectly
 
 nice things
 - highlight categories from index
\ No newline at end of file
index b42e0b7019ee89900c96cddd2700979e73e73568..759fb8f79639db46b2b7b273c6e5bdb58e9a1185 100644 (file)
@@ -1,2 +1,2 @@
-template = archive
+template = index
 title = delhi 2011
\ No newline at end of file
diff --git a/content/journal/2011-08-22_arrive b/content/journal/2011-08-22_arrive
deleted file mode 100644 (file)
index e4dcf0b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-date = Sept 22 2011, 22:50
---
-                                        Bkng                          Meals/ Seat/
-       Day Date       Flight     Status Class       City        Time  Other  Cabin
-       --- ----- --------------- ------ ----- ---------------- ------ ------ -------
-       Thu 22SEP KLM ROYAL         OK     T   LV SAN FRANCISCO 200P     M     **
-                 DUTCH AIRLINES 606           AR AMSTERDAM     915A#         
-
-       Fri 23SEP KLM ROYAL         OK     T   LV AMSTERDAM     1120A    M     **
-                 DUTCH AIRLINES 871           AR DELHI         1050P         
diff --git a/content/journal/2011-10-01_update_for_mom b/content/journal/2011-10-01_update_for_mom
deleted file mode 100644 (file)
index 8305978..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-date = oct 1 2011
---
-
-Hi Mom.
-
-The surreality of being here is something else. Even tho I am somewhat
-adjusted time-wise, it's so surreal that it feels like a waking dream
-state.  Life takes so many forms here -- it's complete and utter
-chaos, but on the other hand, it's elegant and fluid. For example,
-just walking through the streets, I'll come across a pack of feral
-dogs that include me in their pack for blocks, growling and barking at
-anyone who comes close to us. Then, they'll move on to somewhere else.
-There's pigs that eat trash on the side of the road with their little
-piglets. Cows seriously don't have any concern for anything. They walk
-through the streets, through highway traffic (50 mph traffic), not
-giving a care, and the cars swerve around them. I haven't seen an
-accident yet. People drive CRAZY. Shit. Lanes are painted on the
-street, but they might as well be decoration. Motorcyclists drive with
-their lady-friends on the back, sometimes holding one or two small
-children. And monkeys.
-
-There's so much trash. Smells like shit most of the time. Piled up on
-the side of the roads. You'll see cows and pigs just laying in it.
-Dogs everywhere -- sleeping under cars, wherever there's a cool spot.
-
-The beggar kids are ruthless. They'll come up to you in their
-scraggly-ass clothes and tug on my bracelets, but their grubby hands
-in my pockets, and try to get something - anything - to bring back to
-their parents. Historically, the worker class just sends their kids
-out to collect anything they can. They are so dirty it's astonishing.
-One thing I noticed is that there aren't that many homeless kids in
-SF. They're every age here. Granted, they are super cute, but very
-pushy.
-
-Been reading about certain cities where any destruction of any from of
-life, including insects, is not acceptable, and everyone is
-vegetarian. They drink tons of milk and cheese, tho. It's yummy. Gift
-from the cows. Really interesting history about how some of the first
-animal hospitals of the world started in India and enforced the first
-city-wide laws against animal cruelty. It's ancient practice. The laws
-say the greatest thing we can do is protect all living things. The
-concept is if you're cruel to animals, you are cruel to all life,
-since animals are powerless it shows you true nature -- ie, they can't
-do anything back to you and since you don't have to be worried about
-that, you are showing your true self. I just find it amazing that
-these concepts are pre-history (300 BC) and embedded in the culture.
-Ancient text make these teachings not only the core of personal
-morality, but of politics, including preservation of ecology. The
-troubles of the city in the form of poverty, pollution, corruption,
-are considered to pass. "All things must past, even Buddhism itself".
-
-Most of these rules became embedded in politics by [Ashoka](http://en.wikipedia.org/wiki/Ashoka). The guy was rutheless. 
-After The Kalinga War where he killed 100,000's of non-violent people, 
-he was moved by all the death
-that he completely embraced Bhuddism and completely did a 180. He
-become adevotee of ahimsa (nonviolence), love, truth, tolerance and
-vegetarianism. The Ashoka Chakra, "the wheel of Righteousness" is the
-wheel that's on the India flag and was considered one of the most
-peaceful rulers in history and introduced a secular state ethic of
-non-violence. It's such a vibrant history.
-
-I really want to travel to the south of India -- when Steph gets here,
-I'm planning a 12-day train trip down to the southern tip.
-
-I'm still figuring out the best place to upload pictures. Vishal and I
-are planning to create a book of the entire collaboration, so I might
-send you snapshots here and there, but at the end, I'll have a proper
-documentation.
-
-I've been sending individual people updates as they come -- Stephanie
-and I have been chatting, and Dad's been sending me little emails too.
-I heard there was some worry about Daniel arriving in Geneva, but
-hopefully that's all good. I know it's sometimes hard to find
-internet, and it's so exhausting to travel. It took me about 5 days to
-really adjust. 
-
-Life in the house is good. Very low key compared to the outside world
-which is hot, dusty, and sticky. The entire family eats meals together
-which is nice. It's been hard to cook for myself, as the house staff
-and the mom takes that very seriously as their job. They're all
-vegetarian so it hasn't been an adjustment to the food, it's been
-pretty basic and good. Daal, rice, bread, etc. Most of my time is
-spent in Vishal's studio at this point, working on our project. It's
-coming together.
\ No newline at end of file
diff --git a/content/journal/2011-10-04_dreams b/content/journal/2011-10-04_dreams
deleted file mode 100644 (file)
index 62e1f08..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-title = dreams
-date = Tue, Oct 4 2011, 12:46:34; IST 
---
-My dreams have been incredibly vivid. probably due to the heat. sleeping at odd hours. been working in the studio most of the day at Vishal's house, so I haven't been going out as much as I would like. It's also incredibly hot outside, averaging about 36 degrees C, which is about 95 F.
\ No newline at end of file
index 797e21130bd25fd30a64adde2e29deb2ae485e74..e843e7b4502bcd563d9bd0bfb0148867adaaaeaa 100644 (file)
@@ -1,5 +1,6 @@
 body { 
-    padding:50px;
+    padding:0;
+    margin:0;
     font-size: 0.8em;
     font-family: sans-serif;
     line-height:1.5em;
@@ -35,14 +36,23 @@ ol li {
     list-style-type:decimal; 
 }
 blockquote { 
+    font-family:serif;
     font-style:italic;
+    font-size:1.2em;  
+    line-height:1.3em;
+    margin:0;
+    padding:0;
 }
 pre {
     line-height:1.3em;
 }
 
-#content { 
-    margin-top:30px;
+#content {
+    padding:50px;
+}
+#nav {
+    padding:30px 50px;
+    border-top:1px dotted #aaa;
 }
 
 .archive li {
index ab58c6876338e010cf7357fec82bfc60e9ffeecd..5fceeb1a93e6dece81e80ca138efa3cdc89b8214 100644 (file)
@@ -24,7 +24,15 @@ function get_entries( $path = "", $args = array())
        }
        $entries = array();
        foreach ($dir_iterator as $file => $info) {
-               if ( !$info->isDir() && !in_array( $info->getFilename(), $_FILE_IGNORES )) {
+
+               // $finfo = finfo_open(FILEINFO_MIME_TYPE);
+               // $ftype = finfo_file($finfo, join(array($info->getPath(), $info->getFilename()), DIRECTORY_SEPARATOR));
+               // finfo_close($finfo);         
+
+               if ( 
+//                     $ftype == 'text/plain' && 
+                       !$info->isDir() && 
+                       !in_array( $info->getFilename(), $_FILE_IGNORES )) {
                        $entries[] = parse_entry( $info );
                }
        }
index cb121216f9c11cedd299550dae9629e267258d52..c2e9436923f6124c7dc21b8fac530ad95e55713a 100644 (file)
@@ -34,7 +34,7 @@ define ('TITLE_DELIMITER',     ' &mdash; ');
 define ('ENTRY_DATE_FORMAT', 'M d Y, h:i:s A T');
 
 $_FILE_IGNORES = array(CONFIG_FILE, '.DS_Store');
+
 # includes
 require_once 'data.php';
 require_once 'output.php';
diff --git a/pages/about b/pages/about
deleted file mode 100644 (file)
index 8b695ee..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-title = about
---
-
-
-ABOUT
------
-
-`plog` is a CMS written to codify process and resources, written in PHP 
-by **gabriel dunne** ([www](http://gabrieldunne.com), [email](&#x6d;&#x61;&#x69;&#108;&#x74;&#111;&#x3a;&#x67;&#x64;&#x75;&#x6e;&#110;&#x65;&#x40;&#x71;&#117;&#105;&#x6c;&#x69;&#x6d;&#101;&#x2e;&#x63;&#111;&#x6d;)) for [quilime.com](quilime.com)
-
-find me on:
-[github](http://github.com/quilime/),
-[twitter](http://twitter.com/quilime/)  
-site source code: <a href="http://git.quilime.com/?p=plog.git;a=summary">plog</a>  
-
-
-INSTALL
--------
-extract plog to the subdirectory of your choice, and modify `lib/init.php`
diff --git a/scripts/content.sh b/scripts/content.sh
deleted file mode 100755 (executable)
index 7eca2ef..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-DATE=$(date +%Y"-"%m"-"%d) # 2011-10-04
-VDATE=$(date +%a", "%b" "%d" "%Y", "%r"; "%Z) # Tue, Oct 4 2011, 12:46:34; IST 
-CONTENT='content'
-FOLDER=$1
-TITLE=$2
-FILE=''
-
-# create filename
-read -p "prepend filename with current date? (y/n) "
-if [ "$REPLY" == "y" ]; then
-       FILE=${DATE}_$2
-else
-       FILE=$2
-fi
-
-# does file exist?
-if [ -e "$CONTENT/$FOLDER/$FILE" ]; then
-       echo "file exists"
-       exit
-fi
-
-# create folder if doesn't exist
-if [ ! -d "$CONTENT/$FOLDER" ]; then
-       mkdir "$CONTENT/$FOLDER"        
-fi
-
-# populate initial variables
-cat > "$CONTENT/$FOLDER/$FILE" << XXX
-title = $TITLE
-date = $VDATE
-draft = true
---
-XXX
-
-echo "$CONTENT/$FOLDER/$FILE"
index a0ed8af6204d142771072cfa877a82a532addddc..3cdbab2d21e6654e18115dcd15be6394de969e76 100644 (file)
@@ -8,15 +8,15 @@
 </head>
 <body>
     
-    <? $this->include_template('nav.html.tpl') ?>
-    
 <div id="content">
 
-       oops <br /><br />
        404
        
 </div>
 
+    <? $this->include_template('nav.html.tpl') ?>
+
+
        <? $this->include_template('footer.html.tpl') ?>
 
 </body>
diff --git a/templates/archive.html.tpl b/templates/archive.html.tpl
deleted file mode 100644 (file)
index 7a67251..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
-<head>
-    
-    <? $this->include_template('head-inc.html.tpl') ?>
-    
-    <title><?=SITE_TITLE?><?=$this->page_title(TITLE_DELIMITER);?></title>
-    
-</head>
-<body>
-    
-    <? $this->include_template('nav.html.tpl') ?>
-    
-<div id="content">
-
-       <ul class="archive"> 
-       <? foreach($entries as $entry): ?>
-       <li>
-       <a href="<?=$entry['url']?>" title="<?=date("m d Y", $entry['timestamp'])?>"><?=$entry['title']?></a>
-       </li>
-       <? endforeach; ?>       
-       </ul>
-       
-</div>
-
-       <? $this->include_template('footer.html.tpl') ?>
-
-</body>
-</html>
index 0d967401bdd472d0f5c0582170519569a05e63ce..c972d74854b7925ca422830ad63f29801eb41c54 100644 (file)
@@ -1,14 +1,11 @@
 <div class="entry">
 
-       <h2>
-               <a href="<?=$entry['url']?>"><?=$entry['title']?></a>
-       </h2>
-
        <div class="content">
                <?=$entry['content']?>
        </div>
 
        <div class="metadata">
+               "<a href="<?=$entry['url']?>"><?=$entry['title']?></a>", 
                <span title="<?=get_relative_time($entry['timestamp']);?>"><?=date(ENTRY_DATE_FORMAT, $entry['timestamp'])?></span> 
                <? if (!empty($entry['cat']['name'])): ?>
                in <a href="<?=$entry['cat']['url'];?>"><?=$entry['cat']['name'];?></a>
index fc6f1a7b2f9491105977ac8dff88cd9f341ee49d..5f3b193b5052e6673465a1374f3e51b93b50119b 100644 (file)
@@ -1,31 +1,5 @@
 
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
-<link rel="alternate" type="application/rss+xml" title="RSS" href="<?= get_base_dir(); ?>/.rss" />
-
-<link rel="stylesheet" href="<?= get_base_dir(); ?>/css/style.css" type="text/css">
-
-<link href="<?= get_base_dir(); ?>/js/prettify/prettify.css" type="text/css" rel="stylesheet" />
-<script type="text/javascript" src="<?= get_base_dir(); ?>/js/jquery-1.3.2.min.js"></script>
-<script type="text/javascript" src="<?= get_base_dir(); ?>/js/prettify/prettify.js"></script>
-<script>
-
-$(document).ready(function() {
-       prettyPrint();
-});
-
-</script>
-
-<script type="text/javascript">
-
-  var _gaq = _gaq || [];
-  _gaq.push(['_setAccount', 'UA-351774-1']);
-  _gaq.push(['_trackPageview']);
-
-  (function() {
-    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-  })();
-
-</script>
\ No newline at end of file
+<link rel="alternate" type="application/rss+xml" title="RSS" href="<?=get_base_dir();?>/.rss" />
+<link rel="stylesheet" href="<?=get_base_dir();?>/css/style.css" type="text/css">
index 83115def2f6d87e346f2f88bbf3ca9ff36729f87..0f36208d7aea6e096fd2e4390c020c354e7e8b54 100644 (file)
@@ -1,6 +1,15 @@
-<div class="nav">         
+<div id="nav">    
 
-       <h1 style="margin:0;"><a href="<?=WEB_ROOT?>">INDIA 2011</a></h1>
-       Gabriel Dunne
+       <ul class="archive">
+       <? foreach(get_entries() as $entry): ?>
+       <li>
+       <a href="<?=$entry['url']?>" title="<?=date("m d Y", $entry['timestamp'])?>"><?=$entry['title']?></a>
+       </li>
+       <? endforeach; ?>       
+       </ul>
+       
+       <br />  
+
+       <a href="<?=WEB_ROOT?>?p=info">info</a>
 
 </div>
index 137700ca23c87367634deb6818b0616196df6a5b..8d6d1ab8c3359b194e5a5107c894f4935f5667fb 100644 (file)
@@ -8,7 +8,7 @@
 </head>
 <body>
     
-    <? $this->include_template('nav.html.tpl') ?>
+    
     
 <div id="content">
 
@@ -16,6 +16,8 @@
        
 </div>
 
+       <? $this->include_template('nav.html.tpl') ?>
+
        <? $this->include_template('footer.html.tpl') ?>
 
 </body>
index a2fea66ccc8a8d3a175734f10faac2a7532c7aa9..b2348d06a1d5e4f8c330bf941408ec89c35fb237 100644 (file)
@@ -3,17 +3,18 @@
     
     <? $this->include_template('head-inc.html.tpl') ?>
     
-    <title><?=SITE_TITLE?><?=TITLE_DELIMITER?> <?=$entry['title'];?></title>
+    <title><?=$entry['title'];?></title>
     
 </head>
 <body>
     
-    <? $this->include_template('nav.html.tpl') ?>
     
        <div id="content">
                <? $this->include_template('entry.html.tpl'); ?>        
        </div>
 
+       <? $this->include_template('nav.html.tpl') ?>   
+
        <? $this->include_template('footer.html.tpl') ?>
 
 </body>