]> git.quilime.com - plog_bk.git/commitdiff
news
authorGabriel Dunne <quilime@monkey.dreamhost.com>
Mon, 16 Nov 2009 04:15:23 +0000 (20:15 -0800)
committerGabriel Dunne <quilime@monkey.dreamhost.com>
Mon, 16 Nov 2009 04:15:23 +0000 (20:15 -0800)
templates/news.html [new file with mode: 0644]

diff --git a/templates/news.html b/templates/news.html
new file mode 100644 (file)
index 0000000..51b02d4
--- /dev/null
@@ -0,0 +1,69 @@
+<?php
+
+    $single = false;
+    
+    if (is_dir(CONTENT_DIR . $url_string) && !is_file(CONTENT_DIR . $url_string . '/config') ) {
+        list($log_list, $total) = get_content(basename($url_string), "type=flat");
+    }
+    else {
+        $config = parse_config(CONTENT_DIR . $url_string);
+        $log = $config;
+        $base_dir = $log['base_dir'];        
+        $single = true;        
+    }
+    
+    $list = isset($_GET['list']) ? $_GET['list'] : false;
+    
+?>
+<html>
+
+<head>
+
+    <?php include_template('header-src.html'); ?>
+        
+    <title>
+        <?php echo SITE_TITLE; ?><?php if ($single) : ?> - news: <?echo strtolower($log['title']); ?> [<?php echo date("Y M d", strtotime($log['date']));?>]<? else: ?> - news<? endif; ?></title>
+
+    <script src="/js/jquery-1.3.2.min.js"></script>
+
+</head>
+
+<body>
+    
+    <?php include_template('nav.html'); ?>
+
+    <div id="content">
+
+        <?php if ($single) : ?>
+
+               <h1><a href="/log/">log</a> / <?php echo $log['title']; ?> <small class="date"><?php echo date("M d Y", $log['timestamp']); ?></small></h1>    
+            
+            <div class="content">
+            <?php echo $log['inline_content']; ?>
+            </div>
+            
+        <?php else: ?>
+
+            <h1>news</h1>
+            
+            <ul class="inline_content log">
+            <?php foreach($log_list as $log): ?>
+                   <li>
+                       <h3>
+                   <?php echo date("M d Y", $log['timestamp']); ?>
+                   <a title="<?php echo get_relative_time($log['timestamp']); ?>" href="<?php echo $log['href'];?>">
+                       <?php echo $log['title']; ?></a> 
+                       </h3>
+                       
+                    <?php echo $log['inline_content']; ?>
+                </li>
+            <? endforeach; ?>
+            </ul>
+            
+        <?php endif; ?>
+                
+    </div>
+    
+</body>
+
+</html>
\ No newline at end of file