Permalink
Browse files

Switch scaffolding templates to HTML 5 doctype

  • Loading branch information...
1 parent d60d7ed commit 01d92021e69f54def1ec8103b2b99f907dd88ec4 @josh josh committed Jul 10, 2009
View
@@ -1,23 +1,20 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
+<!DOCTYPE html>
+<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>The page you were looking for doesn't exist (404)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
</head>
<body>
@@ -27,4 +24,4 @@
<p>You may have mistyped the address or the page may have moved.</p>
</div>
</body>
-</html>
+</html>
View
@@ -1,23 +1,20 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
+<!DOCTYPE html>
+<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>The change you wanted was rejected (422)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
</head>
<body>
@@ -27,4 +24,4 @@
<p>Maybe you tried to change something you didn't have access to.</p>
</div>
</body>
-</html>
+</html>
View
@@ -1,23 +1,20 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
+<!DOCTYPE html>
+<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>We're sorry, but something went wrong (500)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
</head>
<body>
View
@@ -1,5 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
@@ -14,28 +13,28 @@
font-size: 13px;
color: #333;
}
-
+
h1 {
font-size: 28px;
color: #000;
}
-
+
a {color: #03c}
a:hover {
background-color: #03c;
color: white;
text-decoration: none;
}
-
-
+
+
#page {
background-color: #f0f0f0;
width: 750px;
margin: 0;
margin-left: auto;
margin-right: auto;
}
-
+
#content {
float: left;
background-color: white;
@@ -44,7 +43,7 @@
padding: 25px;
width: 500px;
}
-
+
#sidebar {
float: right;
width: 175px;
@@ -53,7 +52,7 @@
#footer {
clear: both;
}
-
+
#header, #about, #getting-started {
padding-left: 75px;
@@ -73,14 +72,14 @@
font-weight: normal;
font-size: 16px;
}
-
-
+
+
#about h3 {
margin: 0;
margin-bottom: 10px;
font-size: 14px;
}
-
+
#about-content {
background-color: #ffd;
border: 1px solid #fc0;
@@ -113,8 +112,8 @@
margin: 0;
padding: 10px;
}
-
-
+
+
#getting-started {
border-top: 1px solid #ccc;
margin-top: 25px;
@@ -150,8 +149,8 @@
color: #555;
font-size: 13px;
}
-
-
+
+
#search {
margin: 0;
padding-top: 10px;
@@ -163,8 +162,8 @@
margin: 2px;
}
#search-text {width: 170px}
-
-
+
+
#sidebar ul {
margin-left: 0;
padding-left: 0;
@@ -181,7 +180,7 @@
#sidebar ul.links li {
margin-bottom: 5px;
}
-
+
</style>
<script type="text/javascript" src="javascripts/prototype.js"></script>
<script type="text/javascript" src="javascripts/effects.js"></script>
@@ -194,11 +193,11 @@
onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
});
} else {
- new Effect[Element.visible('about-content') ?
+ new Effect[Element.visible('about-content') ?
'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
}
}
-
+
window.onload = function() {
$('search-text').value = '';
$('search').onsubmit = function() {
@@ -218,7 +217,7 @@
<input type="submit" value="Search" /> the Rails site
</form>
</li>
-
+
<li>
<h3>Join the community</h3>
<ul class="links">
@@ -227,7 +226,7 @@
<li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
</ul>
</li>
-
+
<li>
<h3>Browse the documentation</h3>
<ul class="links">
@@ -250,31 +249,31 @@
<h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
<div id="about-content" style="display: none"></div>
</div>
-
+
<div id="getting-started">
<h1>Getting started</h1>
<h2>Here&rsquo;s how to get rolling:</h2>
-
- <ol>
+
+ <ol>
<li>
- <h2>Use <tt>script/generate</tt> to create your models and controllers</h2>
+ <h2>Use <code>script/generate</code> to create your models and controllers</h2>
<p>To see all available options, run it without parameters.</p>
</li>
-
+
<li>
<h2>Set up a default route and remove or rename this file</h2>
<p>Routes are set up in config/routes.rb.</p>
</li>
<li>
<h2>Create your database</h2>
- <p>Run <tt>rake db:migrate</tt> to create your database. If you're not using SQLite (the default), edit <tt>config/database.yml</tt> with your username and password.</p>
+ <p>Run <code>rake db:migrate</code> to create your database. If you're not using SQLite (the default), edit <code>config/database.yml</code> with your username and password.</p>
</li>
</ol>
</div>
</div>
-
+
<div id="footer">&nbsp;</div>
</div>
</body>
-</html>
+</html>
@@ -1,9 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!DOCTYPE html>
+<html>
<head>
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title><%= controller_class_name %>: <%%= controller.action_name %></title>
<%%= stylesheet_link_tag 'scaffold' %>
</head>
@@ -5,6 +5,9 @@
<% for attribute in attributes -%>
<th><%= attribute.column.human_name %></th>
<% end -%>
+ <th></th>
+ <th></th>
+ <th></th>
</tr>
<%% @<%= plural_name %>.each do |<%= singular_name %>| %>

20 comments on commit 01d9202

Contributor

eric1234 replied Jul 10, 2009

I assume this is because of the recent video_tag and audio_tag helpers but I would guess it also opens the "data" attributes for usage in the helpers which will help us work towards being JavaScript library agnostic.

Wow, nice to see the very rapid adoption of HTML5! :)

Contributor

ncr replied Jul 11, 2009

I like the "let's push things forward" attitude too :)

Holy crap!

Contributor

windock replied Jul 12, 2009

josh, you're cool!

cs replied Jul 14, 2009

nice to see!

Member

mislav replied Jul 15, 2009

mm, opinionated!

Thumbs up.

Contributor

tarcieri replied Feb 18, 2010

As much as I appreciate HTML5 and the "this is awesome" circle jerk, isn't anyone even a little bit skeptical about the potential drawbacks of this change?

Contributor

adrianpacala replied Feb 18, 2010

Even more important: are you guys aware that this commit is seven months old?

dnch replied Feb 18, 2010

the potential drawbacks of this change?

such as?

This has been a long time coming.
Rails' preference of XHTML over HTML4 was a huge mistake.

@benschwarz

In your opinion.

There are a lot of solid reasons to have never used XHTML over HTML4, maybe you should do some research.

Moving forward, it makes sense to support HTML5. I'd argue that Rails supporting XHTML back in the beginning was also moving forward.

At the time, supporting XHTML sent a message that said, "We as web developers are making a conscious effort to improve the standards of the web as a whole." Whether XHTML was truly the better standard is a matter of debate that I'd care not to argue for. But that wasn't the point. It was philosophical. It sent a clear message.

Rails' choice to adopt of the standard of choice amongst web developers doesn't deserve to be labelled as a "huge mistake".

Anyway, that's my piece. I have nothing else to say on the matter.

Love to see Rails core setting directions in the right way! =)

@benschwarz: From the bottom of my geeky technology heart: XHTML doctype made vast majority of web developers start using the semantics part of the brain to start with. With that said complaining about history is so lame when moving forward. xP

@Aupajo, supporting XHTML rather than HTML 4.01 sent a clear message of "we don't know any better". Either do you. Discussion over.

Contributor

laserlemon replied Feb 19, 2010

Yikes.

Contributor

whistlerbrk replied Feb 19, 2010

y'all should run for congress

Member

josh replied Feb 19, 2010

This is just the scaffolding template. Why don't you complain about the choice of green in the stylesheet generated along with it. Just change it if you don't like it.

I can't disable comments or notifications on this commit. Please take your discussion elsewhere.

Please sign in to comment.