Fix page switching for tags/feeds
[blerg.git] / www / index.html
index 5bd89da..06be484 100644 (file)
@@ -1,9 +1,13 @@
 <!DOCTYPE html>
+<!-- Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a
+     BSD-style license.  Please see the COPYING file for details.
+  --> 
 <html>
 <head>
 <title>Blërg!</title>
 <link rel="stylesheet" href="css/blerg.css">
 <script type="text/javascript" src="js/prototype.js"></script>
+<script type="text/javascript" src="js/Bytex64.FX.js"></script>
 <script type="text/javascript" src="js/blerg.js"></script>
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
 <meta name="viewport" content="width=device-width, user-scalable=no, maximum-scale=1.0"/>
     <img src="/images/blerglogo.png" class="logo" width="125" height="122">
     <h1><a href="/">Blërg!</a></h1>
     <h2><span name="section">Welcome</span></h2>
+    <div id="usercontrols" style="display:none">
+      <a href="#" name="user.reflink" onclick="return qlink()">[chatter]</a>
+      <a href="#" name="user.subscribelink" onclick="subscribe(); return false" style="display: none">[stalk]</a>
+      <a href="#" name="user.unsubscribelink" onclick="unsubscribe(); return false" style="display: none">[stop stalking]</a>
+    </div>
   </div>
   <div id="controls">
     <form style="font-size: small" id="login" onsubmit="loginStatus.login($('login.username').value, $('login.password').value); return false">
       <p style="font-size: large"><a href="#" onclick="$('welcome').hide(); $('items').hide(); $('post').hide(); $('signup').show(); return false;">I want to blërg!</a></p>
     </form>
     <div id="logout" style="display: none">
-      Hello, <a href="#" id="userlink"></a>. <a href="#" onclick="loginStatus.logout(); return false">logout</a><br>
+      Hello, <a href="#" id="userlink" onclick="return qlink()"></a>. <a href="#" onclick="loginStatus.logout(); return false">logout</a><br>
       <a href="#" onclick="postPopup(); return false">Write new entry</a><br>
-      <a href="#" id="reflink">Chatter about me</a>
+      <a href="#" id="reflink" onclick="return qlink()">Chatter about me</a><br>
+      <a href="/#/feed" onclick="return qlink()">Stalk your victims</a>
     </div>
     <div id="rss" style="display:none"><a id="rsslink" href=""><img src="/images/rss.png" width="16" height="16"> RSS</a></div>
   </div>
   </div>
 
   <div id="welcome">
+
+  <div id="latest">
+    <h2>Latest posts</h2>
+    <div id="latest-posts"></div>
+    <h2>Latest tags</h2>
+    <div id="latest-tags"></div>
+  </div>
+
   <h2>I am 12 and what is this</h2>
 
-  <p>Blërg is a miniblogging platform.  It's less limited than
-  microblogging platforms like <a
-  href="http://twitter.com/">Twitter</a>, but much simpler than
-  full-blown blogging platforms like <a
-  href="http://wordpress.com/">Wordpress</a> or <a
-  href="http://livejournal.com/">Livejournal</a>.  Blërg is also an open
-  source tagged text database engine written in C that does the back-end
-  work.</p>
+  <p>Blërg is a microblogging platform.  Or maybe a miniblogging
+  platform.  Blërg is not sure.  Blërg is a lot like <a
+  href="http://twitter.com/">Twitter</a>, but aims to fix some of its
+  idiosyncracies.  Blërg does not want to be a full blogging platform
+  like <a href="http://wordpress.com/">Wordpress</a> or <a
+  href="http://livejournal.com/">Livejournal</a>.  Blërg is also an <a
+  href="/doc/">open source tagged text database engine</a> written in C
+  that does the back-end work. Blërg's author finds it entertaining to
+  anthropomorphize Blërg in the third person.</p>
 
   <h2>But what's wrong with Twitter?</h2>
 
-  <p>I'M GLAD YOU ASKED. While I don't believe the basic social premise
-  of Twitter is broken, there are two facets of it that are IMNSHO just
-  wrong:</p>
+  <p>I'M GLAD YOU ASKED. There are two aspects of Twitter that just bug
+  me as an engineer:</p>
   
   <ol>
   <li><strong>Ruby on Rails</strong> - Using rails to prototype a system is
-  fine &mdash; scaling up to a million hits a day with it is just poor
-  engineering. As the service grew, I'm sure it cost them a lot more
-  time than it saved.</li>
+  fine &mdash; scaling up to a million hits a day with it is just a bad
+  idea. As the service grew, I'm sure it cost them a lot more time than
+  it saved.</li>
   <li><strong>140 characters is not enough</strong> - I routinely write
-  sentences longer than 140 characters, so I can't imagine even beginning to
-  make a point in such a small space.  This textual confinement has led to the
-  rise of URL shorteners, which are <a
+  sentences longer than 140 characters, so I can't even begin to imagine
+  making a point in such a small space.  This textual confinement has
+  led to the rise of URL shorteners, which are <a
   href="http://bytex64.net/blog/e2256">breaking the internet</a>.
   </ol>
 
   fully functional service created in a fit of hubris to poke fun at Twitter's
   engineering.  It's just for fun, but no one is going to keep you from using
   it seriously. :]</p>
+
+  <h2>Tell me more about this database engine.</h2>
+
+  <p>Here, take a look at the <a href="/doc/#design">design docs</a>.</p>
+
+  <h2>I'm a social media whore and I want to share links!</h2>
+
+  <p>I've created a bookmarklet just for you: <a href="javascript:location.href='http://blerg.dominionofawesome.com/?post/'+encodeURIComponent(document.title)+'/'+encodeURIComponent(location.href)">Blërg it!</a></p>
+
   </div>
 
   <div id="navigation">
-    <a id="newer_link" href="#" onclick="newer_page(); return false" style="display:none">&lt;&lt; newer</a>
-    <a id="older_link" href="#" onclick="older_page(); return false" style="display:none">older &gt;&gt;</a>
+    <a id="newer_link" href="#" onclick="return qlink()" style="display:none">&lt;&lt; newer</a>
+    <a id="older_link" href="#" onclick="return qlink()" style="display:none">older &gt;&gt;</a>
   </div>
 
   <div id="signup" style="display:none">