$r->get('/submissions')->to('timeline#submissions');
$r->get('/polls')->to('timeline#polls');
- $r->get('/recent2')->to('timeline#recent', use_tl2 => 1);
- $r->get('/popular2')->to('timeline#popular', use_tl2 => 1);
- $r->get('/comments2')->to('timeline#comments', use_tl2 => 1);
- $r->get('/journals2')->to('timeline#journals', use_tl2 => 1);
- $r->get('/submissions2')->to('timeline#submissions', use_tl2 => 1);
-
# RSS
$r->get('/:rss_type' => [format => ['rss', 'xml']])->to('rss#stories');
$r->get('/journals/rss')->to('rss#journals');
# Banned page
- $r->get('/banned')->to('index#banned', noindex => 1);
+ $r->get('/banned')->to('index#banned', noindex => 1, no_ad => 1);
# Login / Logout
- $r->get('/my/login')->to('login#login');
+ $r->get('/my/login')->to('login#login', no_ad => 1);
$r->post('/my/login')->to('login#login');
$r->get('/my/logout')->to('login#logout');
$r->get('/login' => sub {my $c = shift; $c->res->code(301); $c->redirect_to('/my/login');});
# journal page
# also see user page settings for /~username/journal/
- $r->get('/journal/new')->to('journal#create', seclev => 1);
+ $r->get('/journal/new')->to('journal#create', seclev => 1, no_ad => 1);
$r->get('/journal/:id/')->to('journal#single');
# submission page
- $r->get('/submission/new')->to('submission#create');
+ $r->get('/submission/new')->to('submission#create', no_ad => 1);
$r->get('/submission/:id/')->to('submission#single');
#$r->post('/submission')->to('submission#create');
$r->get('/my/')->to('user#home', seclev => 1);
# User Register
- $r->get('/my/newuser')->to('login#newuser');
+ $r->get('/my/newuser')->to('login#newuser', no_ad => 1);
$r->post('/my/newuser')->to('login#newuser', captcha_check => 1);
- $r->get('/my/activation')->to('login#activation');
- $r->get('/my/resetpassword')->to('login#reset_password');
+ $r->get('/my/activation')->to('login#activation', no_ad => 1);
+ $r->get('/my/resetpassword')->to('login#reset_password', no_ad => 1);
$r->post('/my/resetpassword')->to('login#reset_password', captcha_check => 1);
# Change Email
- $r->get('/my/change_email')->to('my#change_email', seclev => 1);
+ $r->get('/my/change_email')->to('my#change_email', seclev => 1, captcha_check => 1);
# search page
$r->get('/search')->to('search#search');
# Admin
# pages under /admin needs seclev equal or greater than 10000;
- my $admin = $r->under('/admin' => sub { my $c = shift; $c->stash(seclev => 10000); return 1; });
+ my $admin = $r->under('/admin' => sub { my $c = shift; $c->stash(seclev => 10000); return 1; })->detour(no_ad => 1);
$admin->get('/firehose/:id/')->to('admin-firehose#single');
$admin->get('/submissions')->to('admin-submissions#index');
<div class="sidebar">
- [%- IF page.type == "timeline" || page.type == "archive" || page.type == "tag" || helpers.page_type() == "my" -%]
+ [%- IF !no_ad %]
[%- helpers.ad_code("sidebar-top") -%]
+ [%- END %]
+
+ [%- IF page.type == "timeline" || page.type == "archive" || page.type == "tag" || page.type == "user" || helpers.page_type() == "my" -%]
[%- FOREACH box IN helpers.boxes() -%]
<div class="sidebar-item [% box.type %] [% box.name %]">
[%- box.contents -%]
[%- END -%]
[%- ELSIF page.content_type == "story" -%]
- [%- helpers.ad_code("sidebar-top") %]
<div class="sidebar-item related">
<h2>関連リンク</h2>
<ul class="list-unstyled">
[%- END -%]
</ul>
</div>
-
<div class="sidebar-item history">
<h2>編集履歴</h2>
[%- FOREACH item IN histories -%]
[%- END -%]
</div>
- [%- ELSIF page.content_type == "comment" -%]
- [%- helpers.ad_code("sidebar-top") -%]
-
[%- ELSIF page.content_type == "poll" -%]
- [%- helpers.ad_code("sidebar-top") -%]
<div class="sidebar-item related">
<h2>最近の国民投票</h2>
<ul class="list-unstyled">
[% INCLUDE common/user %]
</div>
- [%- ELSE -%]
- [%- helpers.ad_code("sidebar-top") -%]
-
[%- END -%]
</div>