ljr/local/htdocs/mobile/index.bml

43 lines
943 B
Plaintext

<html>
<head>
<title><?_code return $LJ::SITENAMESHORT; _code?> Mobile</title>
<meta name="viewport" content="width = 320" />
</head>
<body>
<h1><?_code return $LJ::SITENAMESHORT; _code?> Mobile</h1>
<p><?_code
{
my $u = LJ::get_remote();
my $ret = "";
$ret .= $u ? "Hello, <b>" . $u->display_name . "</b>!\n" : "";
$ret .= "<p>Welcome to the mobile version of $LJ::SITENAMESHORT.</p>"
unless $u;
$ret .= "<h2>Options:</h2><ul>";
unless ($u) {
$ret .= <<OPTS
<li><a href="login.bml">Log in</a> -- required</li>
OPTS
}
if ($u) {
$ret .= "<li><a href='login.bml'>Log in</a> -- you're currently logged in as ";
$ret .= $u->display_name . "</li>";
$ret .= '<li><a href="post.bml">Post to LiveJournal</a></li>'
unless $u->{'journaltype'} eq 'I';
$ret .= '<li><a href="friends.bml">Read friends page</a></li>';
}
return $ret;
}
_code?>
</ul>
</body>
</html>