Merge branch 'live' into dev
[dylansserver.git] / index.php
index c2fb078..de27473 100644 (file)
--- a/index.php
+++ b/index.php
@@ -86,7 +86,7 @@ abstract class cms {
   <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
 
   <title>$this->title</title>
-  <link rel="icon" href="favicon.ico" type="image/png">
+  <link rel="icon" href="/favicon.ico" type="image/png">
   $stylesheets
   $scripts
 </head>
@@ -133,7 +133,7 @@ END_OF_CLOSE;
 class index extends cms {
 
   public function display() {
-    $this->scripts = "<script type='text/javascript' src='/includes/all.js'></script>"; 
+    $this->scripts = "<script type='text/javascript' src='/includes/index.js'></script>"; 
     $this->display_head();
     $this->display_exhibits();
     echo "<ul id='portfolio' style='text-align:right'>";
@@ -276,10 +276,15 @@ class page extends cms {
       $month_posted = $date_posted[1];
       $datetime_posted = explode(' ', $date_posted[2]);
       $day_posted = $datetime_posted[0];
-      echo "<div class='note'>";
-      echo "<h2><span style='color:grey;'>$year_posted/$month_posted/$day_posted/</span><a href='$url'>$title</a></h2>";
-      echo $entry['text'];
-      echo "</div>";
+      $text = $entry['text'];
+      echo <<<END_NOTE
+      <div class='note'>
+      <h1>
+        <span class='date'>$year_posted/$month_posted/$day_posted/</span><a rel="canonical" href='$url'>$title</a>
+      </h1>
+      $text
+      </div>
+END_NOTE;
     }
     echo "</div>";
     $this->write_navigation();
@@ -288,7 +293,7 @@ class page extends cms {
 
   private function write_navigation() {
     echo "<div id='navigation'>";
-    echo "<h2>";
+    echo "<h1>";
     if($this->page > 1){
       $previous_page = $this->page - 1;
       echo "<a href='/notes/page/$previous_page'>prev</a>";
@@ -297,7 +302,7 @@ class page extends cms {
     $forward_page = $this->page + 1;
     echo " <a href='/notes/page/$forward_page'>next</a>";
     }
-    echo "</h2>";
+    echo "</h1>";
     echo "</div>";
   }
 
@@ -401,7 +406,7 @@ class note extends cms {
   private function display_note() {
     echo <<<END_OF_NOTE
     <div id='note'>
-    <h2><span style='color:grey;'>$this->year_posted/$this->month_posted/$this->day_posted/</span>$this->title</h2>
+    <h1><span class='date'>$this->year_posted/$this->month_posted/$this->day_posted/</span>$this->title</h1>
     $this->text
     </div>
 END_OF_NOTE;
@@ -411,14 +416,14 @@ END_OF_NOTE;
     echo <<<END_OF_NAVIGATION
     <br>
     <div id='navigation'>
-    <h2>
+    <h1>
 END_OF_NAVIGATION;
     if (!$this->comments_enabled) {
       $this->display_comment_link();
     }
     echo <<<END_OF_NAVIGATION
     <a href="/notes/">back to notes</a>/
-    </h2>
+    </h1>
     </div>
 END_OF_NAVIGATION;
   }
@@ -588,9 +593,9 @@ class archive extends cms {
         $datetime_posted = explode(' ', $date_posted[2]);
         $day_posted = $datetime_posted[0];
         echo "<div class='note'>";
-        echo "<h2><span style='color:grey;'>";
+        echo "<h1><span class='date'>";
         echo "$year_posted/$month_posted/$day_posted/";
-        echo "</span><a href='$url'>$title</a></h2>";
+        echo "</span><a href='$url'>$title</a></h1>";
         echo $entry['text'];
         echo "</div>";
       }
@@ -598,7 +603,7 @@ class archive extends cms {
       $this->write_navigation();
     } else {
       echo "<br>";
-      echo "<h2 style='font-family:sans-serif;'>sorry, nothing here</h2>";
+      echo "<h1>sorry, nothing here</h2>";
       echo "<pre>Empty set (0.00 sec)</pre>";
     }
     $this->display_close();
@@ -607,9 +612,7 @@ class archive extends cms {
   private function write_navigation() {
     echo "<br>";
     echo "<div id='navigation'>";
-    echo "<h2>";
     // fill me in!
-    echo "</h2>";
     echo "</div>";
   }