summaryrefslogtreecommitdiff
path: root/data/tpl/main
diff options
context:
space:
mode:
Diffstat (limited to 'data/tpl/main')
-rw-r--r--data/tpl/main145
1 files changed, 140 insertions, 5 deletions
diff --git a/data/tpl/main b/data/tpl/main
index d52a576a..cbac2729 100644
--- a/data/tpl/main
+++ b/data/tpl/main
@@ -1,14 +1,149 @@
[[+ defs.pl ]]
+[[ %p = %{$X->{page}}; gettitle(); ]]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
--[[ if($X->{error}) { ]]
- [[+ error ]]
-[[ } if($X->{page}) { %p = %{$X->{page}}; gettitle(); ]]
- [[+ page ]]
+
+<head>
+ <title>[[: $p{PageTitle} ]]- :: VNDB</title>
+ <link href="[[: $p{st} ]]/files/style.css?[[= $VNDB::VERSION ]]" rel="stylesheet" type="text/css" media="screen" />
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+[[ if($p{redit} || $p{vnedit}) { ]]-
+ <script src="[[: $p{st} ]]/files/dyna.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script>
+[[ } ]]-
+ <script src="[[: $p{st} ]]/files/def.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script>
+[[ if($p{devshit}) { ]]-
+ <meta name="robots" content="noindex, nofollow" />
+[[ } elsif($p{userlist} || $p{userpage} || $p{myvotes} || $p{vnlist} || $p{hist} || ($p{vnpage} && $p{vnpage}{page} eq 'stats')
+ || grep { $p{$_} && $p{$_}{change} } qw|vnpage ppage rpage|) { ]]-
+ <meta name="robots" content="noindex, follow" />
+[[ }]]-
+
+[[if($p{hist}){ ]]
+ <link rel="alternate" type="application/rss+xml" title="Recent changes" href="
+ [[= (!$p{hist}{type}?'/hist':'/'.$p{hist}{type}.$p{hist}{id}.'/hist').'/rss'.(!$p{hist}{type}?'?t='.$p{hist}{selt}.';e='.$p{hist}{sele}:$p{hist}{type} eq 'v' && $p{hist}{seli} ? '?i=1':'') ]]" />
+[[ } ]]-
+</head>
+
+<body>
+<div id="header">
+ <form id="search" method="get" action="/v/search">
+ <fieldset>
+ <legend>Search</legend>
+ <input id="searchfield" type="text" name="q" value="[[: $p{searchquery} || 'search' ]]"[[= !$p{searchquery} ? ' style="color: #999"': '' ]]- />
+ <input id="searchsubmit" type="submit" value="Search" />
+ </fieldset>
+ </form>
+ <h1><a href="/">vndb.org</a> / #vndb @ irc.synirc.net <a href="http://vndb.org/">
+ [[ if($p{devshit}) { ]]<b style="color: red">The VNDB.org Testing Grounds</b>[[ } else { ]]<b>The Visual Novel Database</b>[[ } ]]</a></h1>
+</div>
+
+
+<div id="page">
+
+<div id="content">
+[[ # = noindex-tag (see above) ]]
+[[ if($p{home}) { %d = %{$p{home}}; ]] [[+ home ]][[ } ]]
+[[ if($p{userlogin}) { %d = %{$p{userlogin}}; ]] [[+ userlogin ]][[ } ]]
+[[ if($p{userreg}) { %d = %{$p{userreg}}; ]] [[+ userreg ]][[ } ]]
+[[ if($p{userpass}) { %d = %{$p{userpass}}; ]] [[+ userpass ]][[ } ]]
+[[ if($p{useredit}) { %d = %{$p{useredit}}; ]] [[+ useredit ]][[ } ]]
+[[ if($p{userlist}) { %d = %{$p{userlist}}; ]] [[+ userlist ]][[ }# ]]
+[[ if($p{userpage}) { %d = %{$p{userpage}}; ]] [[+ userpage ]][[ }# ]]
+[[ if($p{vnpage}) { %d = %{$p{vnpage}}; ]] [[+ vnpage ]][[ } ]]
+[[ if($p{vnedit}) { %d = %{$p{vnedit}}; ]] [[+ vnedit ]][[ } ]]
+[[ if($p{redit}) { %d = %{$p{redit}}; ]] [[+ redit ]][[ } ]]
+[[ if($p{vnbrowse}) { %d = %{$p{vnbrowse}}; ]] [[+ vnbrowse ]][[ } ]]
+[[ if($p{pbrowse}) { %d = %{$p{pbrowse}}; ]] [[+ pbrowse ]][[ } ]]
+[[ if($p{pedit}) { %d = %{$p{pedit}}; ]] [[+ pedit ]][[ } ]]
+[[ if($p{ppage}) { %d = %{$p{ppage}}; ]] [[+ ppage ]][[ } ]]
+[[ if($p{myvotes}) { %d = %{$p{myvotes}}; ]] [[+ myvotes ]][[ }# ]]
+[[ if($p{vnlist}) { %d = %{$p{vnlist}}; ]] [[+ vnlist ]][[ }# ]]
+[[ if($p{hist}) { %d = %{$p{hist}}; ]] [[+ hist ]][[ }# ]]
+[[ if($p{rpage}) { %d = %{$p{rpage}}; ]] [[+ rpage ]][[ } ]]
+[[ if($p{docs}) { %d = %{$p{docs}}; ]] [[+ docs ]][[ } ]]
+[[ if($p{error}) { %d = %{$p{error}}; ]] [[+ error ]][[ } ]]
+</div>
+
+
+<div id="side"><div><div>
+
+ <h2>Menu</h2>
+ <ul>
+ <li><a href="/">Home</a></li>
+ <li><a href="/v">Visual Novels</a></li>
+ <li><a href="/p">Producers</a></li>
+ <li><a href="/v/cat">Categories</a></li>
+ <li><a href="/u/list">Users</a></li>
+ <li><a href="/hist">Recent changes</a></li>
+ <li><a href="/d6">FAQ</a></li>
+ <li><a href="http://forum.vndb.org/">Forum</a></li>
+ </ul>
+
+-[[ if(!$p{AuthLoggedin}) { ]]-
+ <h2>Login</h2>
+ <form method="post" action="/nospam?/u/login" id="loginform">
+ <fieldset>
+ <legend>Login</legend>
+ <input type="text" id="usrname" name="username" />
+ <input type="password" id="usrpass" name="userpass" />
+ <input type="submit" value="Login" />
+ </fieldset>
+ </form>
+ <p>
+ <a href="/u/register">register</a> or <a href="/u/newpass">forgot password?</a>
+ </p>
+[[ } else { ]]-
+ <h2>User menu</h2>
+ <ul>
+ <li>[[: $p{AuthUsername} ]]- ([[: $p{AuthRankname} ]])</li>
+ <li><a href="/u[[= $p{AuthId} ]]/edit">My profile</a></li>
+ <li><a href="/u[[= $p{AuthId} ]]/votes">My votes</a></li>
+ <li><a href="/u[[= $p{AuthId} ]]/list">My visual novel list</a></li>
+ <li><a href="/u[[= $p{AuthId} ]]/hist">My recent changes</a></li>
+ [[ if($p{Authedit}) { ]]-
+ <li>&nbsp;</li>
+ <li><a href="/v/new">Add visual novel</a></li>
+ <li><a href="/p/add">Add producer</a></li>
+ [[ } ]]
+ <li>&nbsp;</li>
+ <li><a href="/u/logout">Logout</a></li>
+ </ul>
+[[ } ]]-
+
+-[[ #</div></div><div><div> ]]
+ <h2>Statistics</h2>
+ <ul>
+ <li><b>[[= $p{Statvn}||0 ]]</b> visual novels</li>
+ <li><b>[[= $p{Statproducers}||0 ]]</b> producers</li>
+ <li><b>[[= $p{Statreleases}||0 ]]</b> releases</li>
+ <li><b>[[= $p{Statvotes}||0 ]]</b> votes</li>
+ <li><b>[[= $p{Statusers}||0 ]]</b> users</li>
+ </ul>
+[[ if(0) { ]] <h2>Most popular</h2>
+ <ul>[[ for (@{$p{popular}}) { ]]-
+ <li><a href="/v[[: $_->{id} ]]" title="[[: $_->{title} ]]">[[: length($_->{title})>30 ? (substr($_->{title}, 0, 27).'...') : $_->{title} ]]</a></li>[[ } ]]-
+ <li class="more"><a href="/v/all?s=votes&amp;o=d">More...</a></li>
+ </ul>[[ } ]]-
+</div></div></div>
+
+</div>
+
+<div id="footer">
+ <p>
+ vndb v[[: $VNDB::VERSION ]]- |
+ <a href="mailto:contact@vndb.org">contact@vndb.org</a> |
+ designed by <a href="http://www.freecsstemplates.org/">free css templates</a>.
+ </p>
+</div>
+
+-[[ if(0 && $p{devshit}) { ]]-
+ <pre id="debug">SQL Queries used:<br />
+[[= $p{devshit} ]]
+</pre>
[[ } ]]-
+</body>
</html>