Skip to content

Commit

Permalink
fixed CSS of built-in exception template
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 21, 2011
1 parent abee750 commit 8a9fc5f
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 19 deletions.
4 changes: 3 additions & 1 deletion Changes
Expand Up @@ -10,6 +10,8 @@ This file documents the revision history for Perl extension Mojolicious.
- Added EXPERIMENTAL binary support to Mojo::Transaction::WebSocket.
- Updated WebSocket implementation to ietf-15.
- Improved documentation.
- Improved CSS of some built-in templates.
- Fixed CSS of built-in exception template.
- Fixed small redirect_to bug. (judofyr, sri)
- Fixed small attribute selector bug in Mojo::DOM::CSS.
- Fixed a few small route bugs.
Expand All @@ -22,7 +24,7 @@ This file documents the revision history for Perl extension Mojolicious.
- Added EXPERIMENTAL mojo_lib_dir and slurp_rel_file methods to
Mojo::Home.
- Improved host condition to work in more environments.
- Improved CSS of all built in templates.
- Improved CSS of all built-in templates.
- Improved documentation. (rhaen, sri)
- Improved test command to run tests in alphabetical order.
(viliampucik)
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Cookbook.pod
Expand Up @@ -388,7 +388,7 @@ useful, because you can keep many parallel connections active at the same
time.

# FIFO queue
my @urls = qw/google.com/;
my @urls = ('google.com');

# User agent following up to 5 redirects
my $ua = Mojo::UserAgent->new(max_redirects => 5);
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -231,7 +231,7 @@ Data can be passed to templates through the C<stash> in any of the native
Perl data types.

$self->stash(author => 'Sebastian');
$self->stash(frameworks => [qw/Catalyst Mojolicious/]);
$self->stash(frameworks => ['Catalyst', 'Mojolicious']);
$self->stash(examples => {tweetylicious => 'a microblogging app'});

%= $author
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -308,7 +308,7 @@ just make a list of possible values.
# /bender -> {controller => 'foo', action => 'bar', name => 'bender'}
# /leela -> {controller => 'foo', action => 'bar', name => 'leela'}
# /fry -> undef
$r->route('/:name', name => [qw/bender leela/])
$r->route('/:name', name => ['bender', 'leela'])
->to(controller => 'foo', action => 'bar');

You can also adjust the regular expressions behind placeholders to better
Expand Down Expand Up @@ -357,7 +357,7 @@ Restrictive placeholders can also be used for format detection.
# /foo.rss -> {controller => 'foo', action => 'feed', format => 'rss'}
# /foo.xml -> {controller => 'foo', action => 'feed', format => 'xml'}
# /foo.txt -> undef
$r->route('/foo', format => [qw/rss xml/])
$r->route('/foo', format => ['rss', 'xml'])
->to(controller => 'foo', action => 'feed');

Or you can just disable format detection.
Expand Down Expand Up @@ -440,7 +440,7 @@ pass.
# GET /bye -> {controller => 'foo', action => 'bye'}
# POST /bye -> {controller => 'foo', action => 'bye'}
# DELETE /bye -> undef
$r->route('/bye')->via(qw/get post/)
$r->route('/bye')->via('get', 'post')
->to(controller => 'foo', action => 'bye');

=head2 Nested Routes
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -393,7 +393,7 @@ Routes can be restricted to specific request methods.
};
# GET|POST|DELETE /bye
any [qw/get post delete/] => '/bye' => sub {
any ['get', 'post', 'delete'] => '/bye' => sub {
my $self = shift;
$self->render(text => 'Bye!');
};
Expand Down Expand Up @@ -428,7 +428,7 @@ just make a list of possible values.
# /test
# /123
any '/:foo' => [foo => [qw/test 123/]] => sub {
any '/:foo' => [foo => ['test', 123]] => sub {
my $self = shift;
my $foo = $self->param('foo');
$self->render(text => "Our :foo placeholder matched $foo");
Expand Down Expand Up @@ -475,7 +475,7 @@ Restrictive placeholders can also be used for format detection.
# /hello.json
# /hello.txt
get '/hello' => [format => [qw/json txt/]] => sub {
get '/hello' => [format => ['json', 'txt']] => sub {
my $self = shift;
return $self->render_json({hello => 'world!'})
if $self->stash('format') eq 'json';
Expand Down Expand Up @@ -827,7 +827,7 @@ L<Mojolicious::Lite> implements the following functions.
=head2 C<any>
my $route = any '/:foo' => sub {...};
my $route = any [qw/get post/] => '/:foo' => sub {...};
my $route = any ['get', 'post'] => '/:foo' => sub {...};
Generate route matching any of the listed HTTP request methods or all.
See also the tutorial above for more argument variations.
Expand Down
9 changes: 3 additions & 6 deletions lib/Mojolicious/templates/exception.development.html.ep
Expand Up @@ -84,7 +84,7 @@
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
#showcase pre {
#showcase > pre {
font: 1.5em 'Helvetica Neue', 'Helvetica', sans-serif;
font-weight: 300;
margin: 0;
Expand All @@ -106,15 +106,12 @@
% end
</head>
<body onload="prettyPrint()">
% my $code = begin
<code class="prettyprint"><%= shift %></code>
% end
% my $cv = begin
% my ($key, $value, $i) = @_;
%= tag 'tr', $i ? (class => 'important') : undef, begin
<td class="key"><%= $key %>.</td>
<td class="value">
%= $code->($value)
<pre class="prettyprint"><%= $value %></pre>
</td>
% end
% end
Expand Down Expand Up @@ -180,7 +177,7 @@
<div class="file"><%= $frame->[1] %></div>
<div class="code preview">
%= "$frame->[2]."
%= $code->($line)
<code class="prettyprint"><%= $line %></code>
</div>
% }
% }
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojolicious/templates/not_found.development.html.ep
Expand Up @@ -52,8 +52,7 @@
background: url(<%= url_for '/mojolicious-pinstripe.gif' %>);
-moz-border-radius: 5px;
border-radius: 5px;
font-family: 'Menlo', 'Monaco', Courier, monospace !important;
font-size: 1.5em;
font: 1.5em 'Menlo', 'Monaco', Courier, monospace;
margin: 0;
margin-left: auto;
margin-right: auto;
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/templates/perldoc.html.ep
Expand Up @@ -28,7 +28,7 @@
-moz-border-radius: 5px;
border-radius: 5px;
color: #eee;
font-family: 'Menlo', 'Monaco', Courier, monospace !important;
font: 0.8em 'Menlo', 'Monaco', Courier, monospace;
text-align: left;
text-shadow: #333 0 1px 0;
padding-bottom: 1.5em;
Expand Down

0 comments on commit 8a9fc5f

Please sign in to comment.