commit:cbc6833cf03753910a97352884cbd825ee697044
author:Norris
committer:Norris
date:Fri Dec 4 12:50:49 2009 -0800
parents:151ce2106e1170d58b686ab19ca9ca70afd73c47
New home page for great success
diff --git a/index.fcgi b/index.fcgi
line changes: +22/-21
index 6a98f76..baab275
--- a/index.fcgi
+++ b/index.fcgi
@@ -82,13 +82,11 @@ sub page_setup {
 		$plink = $webroot;
 		$head = qq{<link rel="alternate" type="application/rss+xml" title="Channel List [RSS]" href="${webroot}rss">};
 
-		if ($login_id) {
-			if (param('Create or Join Channel')) {
-				my $channel = param('channel');
-				$channel =~ s/^#//;
-				print redirect($webroot . 'channel/' . url_encode($channel));
-				next REQUEST;
-			}
+		if (param('Join Channel')) {
+			my $channel = param('channel');
+			$channel =~ s/^#//;
+			print redirect($webroot . 'channel/' . url_encode($channel));
+			next REQUEST;
 		}
 	}
 
@@ -138,15 +136,19 @@ HEAD
 				print p, Vector::Notify::widget($login_id, $channel_id);
 			}
 
-			print p, $navigator;
+			if (@heads) {
+				print p, $navigator;
 
-			print '<ul class="posts">';
-			foreach my $h (@heads) {
-				$h->print(10);
-			}
-			print '</ul>';
+				print '<ul class="posts">';
+				foreach my $h (@heads) {
+					$h->print(10);
+				}
+				print '</ul>';
 
-			print p, $navigator;
+				print p, $navigator;
+			} else {
+				print p, "Channel is empty.";
+			}
 
 			if ($login_id) {
 				print h2('Start Thread');
@@ -168,14 +170,13 @@ HEAD
 		}
 	} else {
 		my %env;
-		if ($login_id) {
-			$env{GETSTARTED} = start_form .
-			      textfield('channel', '', 20) .
-			      submit('Create or Join Channel') .
-			      end_form;
-		} else {
-			$env{GETSTARTED} = "After you log in, you can create a channel";
+		unless ($login_id) {
+			$env{GETSTARTED} = "After you log in, you can create a channel by joining a nonexistent channel and then posting.";
 		}
+		$env{GETSTARTED} .= p . start_form .
+		      textfield('channel', '', 20) .
+		      submit('Join Channel') .
+		      end_form;
 		Vector::Template::process('home', \%env);
 	}
 

diff --git a/templates/home.frag b/templates/home.frag
line changes: +30/-0
index 0000000..e1b3ac1
--- /dev/null
+++ b/templates/home.frag
@@ -0,0 +1,30 @@
+<table width="100%" style="margin-top: 1.5em">
+<tr><td width="60%" valign="top">
+
+<h2>Hello Internet Visitor!</h2>
+
+<p>Welcome to Vector, the Dominion of Awesome's all-purpose forum for serious
+and happy fun time.  With fortuitous care, Vector will provide you with many
+trouble-less years of servitude.  We aim to be #1 forum emperors, and you will
+agree based on many gleaming features!
+
+<ul>
+<li>You can create channels for rousing public discussion.</li>
+<li>Discussions are organized into threads for logical convenience and proper attitude.</li>
+<li>Files can be speedily attached to any post, with thumbnails for pre-view convenience.</li>
+<li>With unique "watching" feature you will be updated on subjects that you desire via batch digest email.</li>
+<li>New! ReplyTag technology allows replying to the forum from email, as well.</li>
+</ul>
+
+<p>Please communicate fervently about the state-approved topics of your choice!
+
+<p>Note that email features may experience delay as they are not run immediately.
+
+</td><td valign="top">
+
+<h2>Get Started</h2>
+
+$GETSTARTED
+
+</td></tr>
+</table>