|
|
@@ -123,7 +123,7 @@ our %routes = (
|
|
|
data => { xml => 1, compressed => 1, map => 'static' },
|
|
|
},
|
|
|
'/sitemap/(.*).xml' => {
|
|
|
- method => 'GET',
|
|
|
+ method => 'GET',
|
|
|
callback => \&Trog::Routes::HTML::sitemap,
|
|
|
data => { xml => 1 },
|
|
|
captures => ['map'],
|
|
|
@@ -135,14 +135,19 @@ our %routes = (
|
|
|
captures => ['map'],
|
|
|
},
|
|
|
'/robots.txt' => {
|
|
|
- method => 'GET',
|
|
|
- callback => \&Trog::Routes::HTML::robots,
|
|
|
+ method => 'GET',
|
|
|
+ callback => \&Trog::Routes::HTML::robots,
|
|
|
},
|
|
|
'/humans.txt' => {
|
|
|
- method => 'GET',
|
|
|
+ method => 'GET',
|
|
|
callback => \&Trog::Routes::HTML::posts,
|
|
|
data => { tag => ['about'] },
|
|
|
},
|
|
|
+ '/styles/avatars.css' => {
|
|
|
+ method => 'GET',
|
|
|
+ callback => \&Trog::Routes::HTML::avatars,
|
|
|
+ data => { tag => ['about'] },
|
|
|
+ },
|
|
|
);
|
|
|
|
|
|
# Build aliases for /posts and /post with extra data
|
|
|
@@ -522,6 +527,22 @@ sub series ($query, $render_cb) {
|
|
|
return posts($query,$render_cb);
|
|
|
}
|
|
|
|
|
|
+sub avatars ($query, $render_cb) {
|
|
|
+ #XXX if you have more than 1000 editors you should stop
|
|
|
+ my $tags = _coerce_array($query->{tag});
|
|
|
+ $query->{limit} = 1000;
|
|
|
+ my $processor = Text::Xslate->new(
|
|
|
+ path => $template_dir,
|
|
|
+ );
|
|
|
+ my ($pages,$posts) = _post_helper($query, $tags, $query->{acls});
|
|
|
+
|
|
|
+ my $content = $processor->render('avatars.tx', {
|
|
|
+ users => $posts,
|
|
|
+ });
|
|
|
+
|
|
|
+ return [200,["Content-type: text/css\n"],[$content]];
|
|
|
+}
|
|
|
+
|
|
|
=head2 posts
|
|
|
|
|
|
Display multi or single posts, supports RSS and pagination.
|