From adffe54f5de36708e5d2710a25b01d177236a5db Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Sun, 16 Oct 2011 15:14:33 +0530 Subject: [PATCH] mods --- TODO | 8 +-- content/config | 2 +- content/journal/2011-08-22_arrive | 10 --- content/journal/2011-10-01_update_for_mom | 84 ----------------------- content/journal/2011-10-04_dreams | 4 -- css/style.css | 16 ++++- lib/data.php | 10 ++- lib/init.php | 2 +- pages/about | 19 ----- scripts/content.sh | 35 ---------- templates/404.html.tpl | 6 +- templates/archive.html.tpl | 28 -------- templates/entry.html.tpl | 5 +- templates/head-inc.html.tpl | 30 +------- templates/nav.html.tpl | 15 +++- templates/page.html.tpl | 4 +- templates/single.html.tpl | 5 +- 17 files changed, 52 insertions(+), 231 deletions(-) delete mode 100644 content/journal/2011-08-22_arrive delete mode 100644 content/journal/2011-10-01_update_for_mom delete mode 100644 content/journal/2011-10-04_dreams delete mode 100644 pages/about delete mode 100755 scripts/content.sh delete mode 100644 templates/archive.html.tpl diff --git a/TODO b/TODO index 4ec8d0e..706a6cf 100644 --- 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 diff --git a/content/config b/content/config index b42e0b7..759fb8f 100644 --- a/content/config +++ b/content/config @@ -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 index e4dcf0b..0000000 --- a/content/journal/2011-08-22_arrive +++ /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 index 8305978..0000000 --- a/content/journal/2011-10-01_update_for_mom +++ /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 index 62e1f08..0000000 --- a/content/journal/2011-10-04_dreams +++ /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 diff --git a/css/style.css b/css/style.css index 797e211..e843e7b 100644 --- a/css/style.css +++ b/css/style.css @@ -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 { diff --git a/lib/data.php b/lib/data.php index ab58c68..5fceeb1 100644 --- a/lib/data.php +++ b/lib/data.php @@ -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 ); } } diff --git a/lib/init.php b/lib/init.php index cb12121..c2e9436 100644 --- a/lib/init.php +++ b/lib/init.php @@ -34,7 +34,7 @@ define ('TITLE_DELIMITER', ' — '); 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 index 8b695ee..0000000 --- a/pages/about +++ /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](mailto:gdunne@quilime.com)) for [quilime.com](quilime.com) - -find me on: -[github](http://github.com/quilime/), -[twitter](http://twitter.com/quilime/) -site source code: plog - - -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 index 7eca2ef..0000000 --- a/scripts/content.sh +++ /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" diff --git a/templates/404.html.tpl b/templates/404.html.tpl index a0ed8af..3cdbab2 100644 --- a/templates/404.html.tpl +++ b/templates/404.html.tpl @@ -8,15 +8,15 @@ - include_template('nav.html.tpl') ?> -
- oops

404
+ include_template('nav.html.tpl') ?> + + include_template('footer.html.tpl') ?> diff --git a/templates/archive.html.tpl b/templates/archive.html.tpl deleted file mode 100644 index 7a67251..0000000 --- a/templates/archive.html.tpl +++ /dev/null @@ -1,28 +0,0 @@ - - - - include_template('head-inc.html.tpl') ?> - - <?=SITE_TITLE?><?=$this->page_title(TITLE_DELIMITER);?> - - - - - include_template('nav.html.tpl') ?> - -
- - - -
- - include_template('footer.html.tpl') ?> - - - diff --git a/templates/entry.html.tpl b/templates/entry.html.tpl index 0d96740..c972d74 100644 --- a/templates/entry.html.tpl +++ b/templates/entry.html.tpl @@ -1,14 +1,11 @@
-

- -

-