]> git.quilime.com - plog_bk.git/commitdiff
updated templates, working on entries.html.tpl
authorGabriel Dunne <gdunne@quilime.com>
Wed, 7 Jul 2010 02:58:20 +0000 (19:58 -0700)
committerGabriel Dunne <gdunne@quilime.com>
Wed, 7 Jul 2010 02:58:20 +0000 (19:58 -0700)
lib/data.php
templates/about.html.tpl
templates/entries.html.tpl [new file with mode: 0644]
templates/nav.html

index bd8d3d3b8431d249657df49fd7f8f28178668194..629f48816e81ac40a85b63fa5e77c66587c2253e 100644 (file)
@@ -44,7 +44,7 @@ function get_data( $sources = array(),  $params  = array())
                                        continue;
                                
                                $config['url'] = WEB_ROOT . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR . basename($f);
-                               $config['timestamp'] = $config['date'] ? mktime($config['date']) : mktime(filemtime($f));
+                               $config['timestamp'] = $config['date'] ? date('U', strtotime($config['date'])) : date('U', strtotime(filemtime($f)));
                                $config['category'] = $dir;
                                $config['content'] = $content;
                                $config['tags'] = explode(' ', $config['tags']);
index 341913c487c235e25265f2e5013f59f2de885f2f..c212426035ccd778be544196982af7463f3da10e 100644 (file)
        
         <p>
                
-                       quilime is a codification of exploration, resources, and creativity.
+                       &lsquo;quilime&rsquo; is a codification of exploration, resources, and creativity.
                        <br/>
                        <br/>
-                       author: gabriel dunne (<a href="&#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;">email</a>, <a href="http://gabrieldunne.com">www</a>)
+                       <strong>author</strong>: gabriel dunne (<a href="&#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;">email</a>, <a href="http://gabrieldunne.com">www</a>)
                                        <br/>   
-                       elsewhere:
+                       <strong>elsewhere</strong>:
        <a href="http://flickr.com/photos/quilime/">flickr</a>, 
        <a href="http://delicious.com/quilime/">delicious</a>,
        <a href="http://vimeo.com/quilime/">vimeo</a>,  
diff --git a/templates/entries.html.tpl b/templates/entries.html.tpl
new file mode 100644 (file)
index 0000000..02ebf5f
--- /dev/null
@@ -0,0 +1,103 @@
+<html>
+
+<head>
+
+    <? $this->include_template('head-inc.html.tpl') ?>
+        
+    <title>
+        <?=SITE_TITLE; ?>
+        <? if ($single): ?> 
+                       - log: <?= $data['title']; ?> 
+                       [<?=date("Y M d", strtotime($data['date']));?>]
+               <? else: ?>
+                       - log
+               <? endif; ?>
+       </title>
+
+</head>
+
+<body>
+    
+    <?php $this->include_template('nav.html'); ?>
+
+    <div id="content">
+
+        <?php if ($single) : ?>
+       
+                       <? //$this->include_template('entry.html.tpl', array('entry' => $item)); ?>             
+
+               <h2>
+                   <a title="posted <?php echo get_relative_time($data['timestamp']); ?>" href="<?php echo $data['url'];?>">
+                       <?php echo $data['title']; ?>
+                               </a><small>[<?php echo date("Y M d", strtotime($data['date']));?>]</small>
+               </h2>           
+       
+            <div class="content">
+            <?=$data['inline_content'];?>
+            </div>                     
+
+        <?php elseif ($view == 'archive'): ?>
+        
+           <table class="archive" cellspacing="0" cellpadding="0">
+                <tr>
+                <td style="text-align:right; padding-right:1em;">
+             
+                </td>
+                <td>
+                </td>
+                <?php 
+                    $c = 1; 
+                    foreach($data as $log): 
+                ?>
+                <tr>
+                <td style="text-align:right; padding-right:1em;">
+                <span class="date"><?php echo date("m/d/Y", $log['timestamp']); ?></span>
+                </td>
+                <td>
+                    <strong>
+                                   <a onmouseout="$('.c_pop').hide();" onmouseover="$('.c_pop').hide(); $('#c_<?php echo $c; ?>').show();" href="<?php echo $log['url']?>"><?php echo $log['title']; ?></a>
+                               </strong>
+                    <div id="c_<?php echo $c; ?>" class="c_pop">
+                    <?=$log['content']; ?>
+                    </div>
+                </td>
+                </tr>
+            <?  $c++;  endforeach; ?>
+            </table> 
+            
+            <br/>
+            
+                <a class="func" href="/log/">view inline</a>
+          
+            
+
+
+            
+        <?php else: ?>
+       
+            <ul class="inline_content log">
+            <?php foreach($data as $log): ?>
+                   <li>
+                       <h3>
+                               
+                           <a title="<?php echo get_relative_time($log['timestamp']); ?>" href="<?php echo $log['url'];?>">
+                               <?php echo $log['title']; ?></a>   
+                       </h3>      
+                    <div class="content">              
+                    <?php echo $log['content']; ?>
+                    </div>
+                </li>
+            <? endforeach; ?>
+            </ul>
+            
+            <br/>            
+            <a class="func" href="/log/?v=archive">view archive</a>
+           
+            
+        <?php endif; ?>
+                
+    </div>
+    
+</body>
+
+</html>
\ No newline at end of file
index 3bb026a1b99f924ee611edd50005d7ab7af72563..aa86c465d8c78889971ca3ae06c2c996d4262096 100644 (file)
@@ -1,10 +1,13 @@
 <ul class="nav">          
+
        <li><a href="/">home</a><br/><br/></li>
        <li><a href="/log/">log</a></li>                
-       <li><a href="/code/">code</a><br/><br/></li>
+       <li><a href="/code/">code</a></li>
        
+       <br/>
        
     <li><a href="/agg/">aggregate</a></li>
     <li><a href="/links/">links</a></li>
     <li><a href="/about/">about</a></li>
+
 </ul>