/*!
- * bootswatch v3.3.2
+ * bootswatch v3.3.4
* Homepage: http://bootswatch.com
* Copyright 2012-2015 Thomas Park
* Licensed under MIT
overflow: visible;
clip: auto;
}
+[role="button"] {
+ cursor: pointer;
+}
h1,
h2,
h3,
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
- cursor: not-allowed;
background-color: #adafae;
opacity: 1;
}
+.form-control[disabled],
+fieldset[disabled] .form-control {
+ cursor: not-allowed;
+}
textarea.form-control {
height: auto;
}
}
.radio-inline,
.checkbox-inline {
+ position: relative;
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
padding-top: 9px;
padding-bottom: 9px;
margin-bottom: 0;
+ min-height: 34px;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
+ min-height: 32px;
}
.input-lg {
height: 54px;
padding: 14px 16px;
font-size: 18px;
line-height: 1.3333333;
+ min-height: 38px;
}
.has-feedback {
position: relative;
}
.collapse {
display: none;
- visibility: hidden;
}
.collapse.in {
display: block;
- visibility: visible;
}
tr.collapse.in {
display: table-row;
right: 0;
bottom: 0;
left: 0;
- z-index: 1040;
+ z-index: 1050;
-webkit-overflow-scrolling: touch;
outline: 0;
}
outline: 0;
}
.modal-backdrop {
- position: absolute;
+ position: fixed;
top: 0;
right: 0;
+ bottom: 0;
left: 0;
+ z-index: 1040;
background-color: #000000;
}
.modal-backdrop.fade {
}
.hidden {
display: none !important;
- visibility: hidden !important;
}
.affix {
position: fixed;
/*!
- * bootswatch v3.3.2
+ * bootswatch v3.3.4
* Homepage: http://bootswatch.com
* Copyright 2012-2015 Thomas Park
* Licensed under MIT
overflow: visible;
clip: auto;
}
+[role="button"] {
+ cursor: pointer;
+}
h1,
h2,
h3,
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
- cursor: not-allowed;
background-color: #eeeeee;
opacity: 1;
}
+.form-control[disabled],
+fieldset[disabled] .form-control {
+ cursor: not-allowed;
+}
textarea.form-control {
height: auto;
}
}
.radio-inline,
.checkbox-inline {
+ position: relative;
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
padding-top: 9px;
padding-bottom: 9px;
margin-bottom: 0;
+ min-height: 38px;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding: 5px 10px;
font-size: 14px;
line-height: 1.5;
+ min-height: 36px;
}
.input-lg {
height: 57px;
padding: 14px 16px;
font-size: 20px;
line-height: 1.3333333;
+ min-height: 42px;
}
.has-feedback {
position: relative;
}
.collapse {
display: none;
- visibility: hidden;
}
.collapse.in {
display: block;
- visibility: visible;
}
tr.collapse.in {
display: table-row;
right: 0;
bottom: 0;
left: 0;
- z-index: 1040;
+ z-index: 1050;
-webkit-overflow-scrolling: touch;
outline: 0;
}
outline: 0;
}
.modal-backdrop {
- position: absolute;
+ position: fixed;
top: 0;
right: 0;
+ bottom: 0;
left: 0;
+ z-index: 1040;
background-color: #000000;
}
.modal-backdrop.fade {
}
.hidden {
display: none !important;
- visibility: hidden !important;
}
.affix {
position: fixed;
/*!
- * bootswatch v3.3.2
+ * bootswatch v3.3.4
* Homepage: http://bootswatch.com
* Copyright 2012-2015 Thomas Park
* Licensed under MIT
overflow: visible;
clip: auto;
}
+[role="button"] {
+ cursor: pointer;
+}
h1,
h2,
h3,
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
- cursor: not-allowed;
background-color: #999999;
opacity: 1;
}
+.form-control[disabled],
+fieldset[disabled] .form-control {
+ cursor: not-allowed;
+}
textarea.form-control {
height: auto;
}
}
.radio-inline,
.checkbox-inline {
+ position: relative;
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
padding-top: 9px;
padding-bottom: 9px;
margin-bottom: 0;
+ min-height: 34px;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
+ min-height: 32px;
}
.input-lg {
height: 54px;
padding: 14px 16px;
font-size: 18px;
line-height: 1.3333333;
+ min-height: 38px;
}
.has-feedback {
position: relative;
}
.collapse {
display: none;
- visibility: hidden;
}
.collapse.in {
display: block;
- visibility: visible;
}
tr.collapse.in {
display: table-row;
right: 0;
bottom: 0;
left: 0;
- z-index: 1040;
+ z-index: 1050;
-webkit-overflow-scrolling: touch;
outline: 0;
}
outline: 0;
}
.modal-backdrop {
- position: absolute;
+ position: fixed;
top: 0;
right: 0;
+ bottom: 0;
left: 0;
+ z-index: 1040;
background-color: #000000;
}
.modal-backdrop.fade {
}
.hidden {
display: none !important;
- visibility: hidden !important;
}
.affix {
position: fixed;
sub job { db->job ($_{job}) }
sub user { db->user ($_{user}) }
-sub redirect { [301, ['X-Forever' => 1, 'Location' => $_[0]], []] }
+sub redirect { [301, ['X-Forever' => 1, 'Cache-Control' => 'public, max-age=86400', 'Location' => $_[0]], []] }
sub reply { [200, ['Content-Type' => 'text/plain; charset=utf-8'], \@_] }
sub response {
my ($template, $title, $params, $maxage) = @_;
}
$params->{time} = time;
$params->{args} = {%_};
- bless {template => $template, title => $title, params => $params, maxage => ($maxage // 1)}, __PACKAGE__.'::Response'
+ bless {template => $template, title => $title, params => $params, maxage => ($maxage // 3600)}, __PACKAGE__.'::Response'
}
sub forbid {
sub (/ed/:contest) {
forbid !contest->is_finished;
my $pblist = db->problem_list(contest => $_{contest}, solution => 1);
- response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial};
+ response ed => 'Editorial of ' . contest->name, {%$pblist, editorial => contest->editorial}, contest->is_finished(time - 86400) ? 60 : ();
},
sub (/login) {
sub (/ct/:contest/log/st) { redirect "/st/$_{contest}" },
sub (/us/) { response us => 'Users', {us => db->user_list} },
- sub (/ct/ + ?:owner~) { response ct => 'Contests', db->contest_list(%_) },
+ sub (/ct/ + ?:owner~) { response ct => 'Contests', db->contest_list(%_), 300 },
sub (/log/ + ?:contest~&:owner~&:page~&:problem~&:private~&:result~) {
forbid $_{private};
- response log => 'Job list', {%{db->job_list(%_)}, maybe contest => $_{contest},}
+ response log => 'Job list', db->job_list(%_), 5
},
sub (/pb/ + ?:owner~&:contest~&:private~) {
forbid $_{private};
},
sub (/us/:user) { response us_entry => user->name, db->user_entry($_{user}) },
- sub (/ct/:contest) { response ct_entry => contest->name, db->contest_entry($_{contest}) },
+ sub (/ct/:contest) { response ct_entry => contest->name, db->contest_entry($_{contest}), 60 },
sub (/log/:job) {
forbid job->private;
- response log_entry => "Job $_{job}", db->job_entry($_{job})
+ response log_entry => "Job $_{job}", db->job_entry($_{job}), 10
},
sub (/pb/:problem + ?contest~) {
my (undef, undef, $contest) = @_;
forbid !remote_user;
$privacy = 'private';
}
- response pb_entry => problem->name, {%{db->problem_entry($_{problem}, $_{contest}, remote_user && remote_user->id)}, maybe contest => $_{contest}};
+ response pb_entry => problem->name, db->problem_entry($_{problem}, $_{contest}, remote_user && remote_user->id), $_{contest} ? 10 : ();
},
sub (/sol/:problem) {
forbid problem->private;
sub (/) { redispatch_to '/index' },
sub (/favicon.ico) { redirect '/static/favicon.ico' },
- sub (/:article) { [200, ['Content-Type' => 'text/html; charset=utf-8', 'Cache-Control' => 'public, max-age=60', 'X-Forever' => 1], [render_article $_{article}, 'en']] }
+ sub (/:article) { [200, ['Content-Type' => 'text/html; charset=utf-8', 'Cache-Control' => 'public, max-age=3600', 'X-Forever' => 1], [render_article $_{article}, 'en']] }
},
sub (POST) {
$tree->fid('nosubmit')->detach;
$tree->look_down(name => 'problem')->attr(value => $args{id});
my $contest = $tree->look_down(name => 'contest');
- $contest->attr(value => $args{contest}) if $args{contest};
- $contest->detach unless $args{contest}
+ $contest->attr(value => $args{args}{contest}) if $args{args}{contest};
+ $contest->detach unless $args{args}{contest}
} else {
$tree->fid('nosubmit')->find('a')->edit_href(sub{s/id/$args{id}/});
$tree->fid('submit')->detach
my ($data, $tr) = @_;
$tr->fclass('id')->namedlink($data->{id});
$tr->fclass('problem')->namedlink($data->{problem}, $data->{problem_name});
- $tr->fclass('problem')->find('a')->edit_href(sub{$_ .= "?contest=$args{contest}"}) if $args{contest};
+ $tr->fclass('problem')->find('a')->edit_href(sub{$_ .= "?contest=$args{args}{contest}"}) if $args{args}{contest};
$tr->fclass('contest')->namedlink($data->{contest}, $data->{contest_name}) if $data->{contest};
$tr->fclass('contest')->replace_content('None') unless $data->{contest};
$tr->fclass('date')->replace_content(ftime $data->{date});