Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
default to lazy html5 style
  • Loading branch information
kraih committed Dec 14, 2010
1 parent b41d35f commit 9e0172c
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 113 deletions.
24 changes: 12 additions & 12 deletions lib/Mojo/HelloWorld.pm
Expand Up @@ -117,11 +117,11 @@ sub _diag {
<head><title>Mojo Diagnostics</title></head>
<body>
<a href="/diag/cookies">Cookies</a>
<a href="/diag/chunked_params">Chunked Request Parameters</a><br />
<a href="/diag/dump_env">Dump Environment Variables</a><br />
<a href="/diag/dump_params">Dump Request Parameters</a><br />
<a href="/diag/proxy">Proxy</a><br />
<a href="/diag/upload">Upload</a><br />
<a href="/diag/chunked_params">Chunked Request Parameters</a><br>
<a href="/diag/dump_env">Dump Environment Variables</a><br>
<a href="/diag/dump_params">Dump Request Parameters</a><br>
<a href="/diag/proxy">Proxy</a><br>
<a href="/diag/upload">Upload</a><br>
<a href="/diag/websocket">WebSocket</a>
</body>
</html>
Expand Down Expand Up @@ -207,14 +207,14 @@ sub _proxy {
<body>
Sync:
<form action="$url" method="GET">
<input type="text" name="url" value="http://"/>
<input type="submit" value="Fetch" />
<input type="text" name="url" value="http://">
<input type="submit" value="Fetch">
</form>
<br />
<br>
Async:
<form action="$url" method="GET">
<input type="text" name="async_url" value="http://"/>
<input type="submit" value="Fetch" />
<input type="text" name="async_url" value="http://">
<input type="submit" value="Fetch">
</form>
</body>
</html>
Expand Down Expand Up @@ -253,8 +253,8 @@ sub _upload {
<body>
File:
<form action="$url" method="POST" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" value="Upload" />
<input type="file" name="file">
<input type="submit" value="Upload">
</form>
</body>
</html>
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -796,8 +796,8 @@ __DATA__
<!doctype html><html>
<head>
<title>Mojolicious Exception</title>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
%= base_tag
%= javascript 'js/jquery.js'
%= stylesheet 'css/prettify.css'
Expand Down Expand Up @@ -1005,7 +1005,7 @@ __DATA__
</section>
<footer>
%= link_to 'http://mojolicio.us' => begin
<img src="/mojolicious-black.png" alt="Mojolicious logo" />
<img src="/mojolicious-black.png" alt="Mojolicious logo">
% end
</footer>
%= javascript begin
Expand Down
14 changes: 7 additions & 7 deletions lib/Mojolicious/Guides/Growing.pod
Expand Up @@ -439,21 +439,21 @@ like this.
% layout 'default';
<%= form_for index => begin %>
<% if (param 'user') { %>
<b>Wrong name or password, please try again.</b><br />
<b>Wrong name or password, please try again.</b><br>
<% } %>
Name:<br />
<%= text_field 'user' %><br />
Password:<br />
<%= password_field 'pass' %><br />
Name:<br>
<%= text_field 'user' %><br>
Password:<br>
<%= password_field 'pass' %><br>
<%= submit_button 'Login' %>
<% end %>

@@ protected.html.ep
% layout 'default';
<% if (my $message = flash 'message') { %>
<b><%= $message %></b><br />
<b><%= $message %></b><br>
<% } %>
Welcome <%= session 'user' %>!<br />
Welcome <%= session 'user' %>!<br>
<%= link_to Logout => 'logout' %>

More information about template helpers can be found in
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -458,7 +458,7 @@ stylesheets.

$self->write_chunk('<html><head><title>Example</title>');
$self->write_chunk('<link href="example.css" rel="stylesheet"');
$self->write_chunk(' type="text/css" /></head>', sub {
$self->write_chunk(' type="text/css"></head>', sub {
my $self = shift;
$self->write_chunk('<body>Example</body></html>');
$self->write_chunk('');
Expand All @@ -472,8 +472,8 @@ An empty chunk marks the end of the stream.
<html><head><title>Example</title>
29
<link href="example.css" rel="stylesheet"
19
type="text/css" /></head>
17
type="text/css"></head>
1C
<body>Example</body></html>
0
Expand Down
14 changes: 7 additions & 7 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -534,21 +534,21 @@ request), this is very useful in combination with C<redirect_to>.
% layout 'default';
<%= form_for login => begin %>
<% if (param 'name') { %>
<b>Wrong name or password, please try again.</b><br />
<b>Wrong name or password, please try again.</b><br>
<% } %>
Name:<br />
<%= text_field 'name' %><br />
Password:<br />
<%= password_field 'pass' %><br />
Name:<br>
<%= text_field 'name' %><br>
Password:<br>
<%= password_field 'pass' %><br>
<%= submit_button 'Login' %>
<% end %>
@@ index.html.ep
% layout 'default';
<% if (my $message = flash 'message' ) { %>
<b><%= $message %></b><br />
<b><%= $message %></b><br>
<% } %>
Welcome <%= session 'name' %>!<br />
Welcome <%= session 'name' %>!<br>
<%= link_to logout => begin %>
Logout
<% end %>
Expand Down
64 changes: 32 additions & 32 deletions lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -313,7 +313,7 @@ sub _tag {
}

# Empty element
else { $tag .= ' />' }
else { $tag .= '>' }

# Prevent escaping
return b($tag);
Expand Down Expand Up @@ -352,7 +352,7 @@ Note that this module is EXPERIMENTAL and might change without warning!
Generate C<base> tag refering to the current base URL.
<base href="http://localhost/cgi-bin/myapp.pl" />
<base href="http://localhost/cgi-bin/myapp.pl">
=item check_box
Expand All @@ -361,8 +361,8 @@ Generate C<base> tag refering to the current base URL.
Generate checkbox input element.
<input name="employed" type="checkbox" value="1" />
<input id="foo" name="employed" type="checkbox" value="1" />
<input name="employed" type="checkbox" value="1">
<input id="foo" name="employed" type="checkbox" value="1">
=item file_field
Expand All @@ -371,8 +371,8 @@ Generate checkbox input element.
Generate file input element.
<input name="avatar" type="file" />
<input id="foo" name="avatar" type="file" />
<input name="avatar" type="file">
<input id="foo" name="avatar" type="file">
=item form_for
Expand All @@ -396,20 +396,20 @@ Generate file input element.
Generate form for route, path or URL.
<form action="/path/to/login" method="post">
<input name="first_name" />
<input value="Ok" type="submit" />
<input name="first_name">
<input value="Ok" type="submit">
</form>
<form action="/path/to/login/bar" method="post">
<input name="first_name" />
<input value="Ok" type="submit" />
<input name="first_name">
<input value="Ok" type="submit">
</form>
<form action="/login" method="post">
<input name="first_name" />
<input value="Ok" type="submit" />
<input name="first_name">
<input value="Ok" type="submit">
</form>
<form action="http://kraih.com/login" method="post">
<input name="first_name" />
<input value="Ok" type="submit" />
<input name="first_name">
<input value="Ok" type="submit">
</form>
=item hidden_field
Expand All @@ -419,8 +419,8 @@ Generate form for route, path or URL.
Generate hidden input element.
<input name="foo" type="hidden" value="bar" />
<input id="bar" name="foo" type="hidden" value="bar" />
<input name="foo" type="hidden" value="bar">
<input id="bar" name="foo" type="hidden" value="bar">
=item input_tag
Expand All @@ -431,10 +431,10 @@ Generate hidden input element.
Generate form input element.
<input name="first_name" />
<input name="first_name" value="Default name" />
<input name="employed" type="checkbox" />
<input name="country" type="radio" value="germany" />
<input name="first_name">
<input name="first_name" value="Default name">
<input name="employed" type="checkbox">
<input name="country" type="radio" value="germany">
=item javascript
Expand All @@ -445,7 +445,7 @@ Generate form input element.
Generate script tag for C<Javascript> asset.
<script src="script.js" type="text/javascript" />
<script src="script.js" type="text/javascript">
<script type="text/javascript"><![CDATA[
var a = 'b';
]]></script>
Expand Down Expand Up @@ -478,8 +478,8 @@ will be used as content.
Generate password input element.
<input name="pass" type="password" />
<input id="foo" name="pass" type="password" />
<input name="pass" type="password">
<input id="foo" name="pass" type="password">
=item radio_button
Expand All @@ -488,8 +488,8 @@ Generate password input element.
Generate radio input element.
<input name="country" type="radio" value="germany" />
<input id="foo" name="country" type="radio" value="germany" />
<input name="country" type="radio" value="germany">
<input id="foo" name="country" type="radio" value="germany">
=item select_field
Expand Down Expand Up @@ -528,7 +528,7 @@ Generate select, option and optgroup elements.
Generate style or link tag for C<CSS> asset.
<link href="foo.css" media="screen" rel="stylesheet" type="text/css" />
<link href="foo.css" media="screen" rel="stylesheet" type="text/css">
<style type="text/css"><![CDATA[
body {color: #000}
]]></style>
Expand All @@ -540,8 +540,8 @@ Generate style or link tag for C<CSS> asset.
Generate submit input element.
<input type="submit" value="Ok" />
<input id="foo" type="submit" value="Ok!" />
<input type="submit" value="Ok">
<input id="foo" type="submit" value="Ok!">
=item tag
Expand All @@ -551,8 +551,8 @@ Generate submit input element.
HTML5 tag generator.
<div />
<div id="foo" />
<div>
<div id="foo">
<div>Content</div>
=item text_field
Expand All @@ -562,8 +562,8 @@ HTML5 tag generator.
Generate text input element.
<input name="first_name" />
<input name="first_name" value="Default name" />
<input name="first_name">
<input name="first_name" value="Default name">
=item text_area
Expand Down

0 comments on commit 9e0172c

Please sign in to comment.