diff options
author | yorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b> | 2008-07-08 09:24:59 +0000 |
---|---|---|
committer | yorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b> | 2008-07-08 09:24:59 +0000 |
commit | deb02936b7bd39259d019bbc46893af583ff856e (patch) | |
tree | f44d8d5c561222a21b80c3b2a548049d2adf96cd /data | |
parent | 079e594bb5a43f948fed01b5140e01f3fd127ff9 (diff) |
Added recent posts, upcoming releases and just released lists to the homepage, and removed the vote count
git-svn-id: svn://vndb.org/vndb@56 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'data')
-rw-r--r-- | data/tpl/defs.pl | 3 | ||||
-rw-r--r-- | data/tpl/home | 21 | ||||
-rw-r--r-- | data/tpl/main | 1 |
3 files changed, 23 insertions, 2 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl index 46269347..47364193 100644 --- a/data/tpl/defs.pl +++ b/data/tpl/defs.pl @@ -28,7 +28,8 @@ sub datestr { return 'unknown' if $d[0] == 0; my $r = sprintf $d[1] == 99 ? '%04d' : $d[2] == 99 ? '%04d-%02d' : '%04d-%02d-%02d', @d; $r = 'TBA' if $d[0] == 9999; - return ($b?'<b class="future">':'').$r.($b?'</b>':''); + $r =~ s/^[0-9]{4}-// if $_[1]; + return ($b&&!$_[1]?'<b class="future">':'').$r.($b?'</b>':''); } sub mediastr { return join(', ', map { diff --git a/data/tpl/home b/data/tpl/home index b07e6e11..eb73a1d9 100644 --- a/data/tpl/home +++ b/data/tpl/home @@ -29,6 +29,20 @@ </ul> <ul class="home"> + <li><b>Recent posts</b></li> + [[ for (@{$d{recentposts}}) { ]]- + <li><a href="/t[[= $_->{id}.'.'.$_->{count} ]]" title="[[: $_->{title} ]]">[[: shorten $_->{title}, 25 ]]</a> <i>[[: $_->{lusername} ]]</i></li> + [[ } ]]- +</ul> + +<ul class="home"> + <li><b>Upcoming releases</b></li> + [[ for (@{$d{upcomingrel}}) { ]]- + <li>[[= datestr $_->{released}, 1 ]]- <a href="/r[[= $_->{id} ]]" title="[[: $_->{title} ]]">[[: shorten $_->{title}, 25 ]]</a></i></li> + [[ } ]]- +</ul> + +<ul class="home break"> <li><b>Recently added visual novels</b></li> [[ for (@{$d{recentvns}}) { ]]- <li><a href="/v[[= $_->{iid} ]]" title="[[: $_->{ititle} ]]">[[: shorten $_->{ititle}, 30 ]]</a></li> @@ -41,3 +55,10 @@ <li><a href="/p[[= $_->{iid} ]]" title="[[: $_->{ititle} ]]">[[: shorten $_->{ititle}, 30 ]]</a></li> [[ } ]]- </ul> + +<ul class="home"> + <li><b>Just released</b></li> + [[ for (@{$d{justrel}}) { ]]- + <li>[[= datestr $_->{released}, 1 ]]- <a href="/r[[= $_->{id} ]]" title="[[: $_->{title} ]]">[[: shorten $_->{title}, 25 ]]</a></i></li> + [[ } ]]- +</ul> diff --git a/data/tpl/main b/data/tpl/main index 7d5fc6e5..799a1ee8 100644 --- a/data/tpl/main +++ b/data/tpl/main @@ -125,7 +125,6 @@ <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> |