Permalink
Browse files

finally getting rid of erb

  • Loading branch information...
1 parent 0962d81 commit 711bca34ef8b32030cc7d4f03ba822aa61cf5f38 Hampton Catlin committed Jan 12, 2009
View
53 app/views/layout/_common_layout.webkit.erb
@@ -1,53 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us">
- <head>
- <title>Wikipedia</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <%= css_include_tag :application, :bundle => true %>
- <meta name = "viewport" content = "width=device-width">
- <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
- </head>
-<% if @article %>
- <script type="text/javascript">
- var title = "<%= @article.title.gsub("_", " ") %>";
- var server = "<%= @article.server %>";
-
- document.addEventListener("DOMContentLoaded", function() {
- NodeList.prototype.forEach = Array.prototype.forEach;
-
- document.querySelectorAll("button.show").forEach(function(button) {
- button.addEventListener("click", function(e) {
- var section_id = button.getAttribute("section_id");
- document.getElementById("content_" + section_id).style.display = "";
- button.style.display = "none";
- document.querySelector("button.hide[section_id='" + section_id + "']").style.display = ""
- });
- });
-
- document.querySelectorAll("button.hide").forEach(function(button) {
- button.addEventListener("click", function(e) {
- var section_id = button.getAttribute("section_id");
- document.getElementById("content_" + section_id).style.display = "none";
- button.style.display = "none";
- document.querySelector("button.show[section_id='" + section_id + "']").style.display = ""
- });
- });
- });
-
- </script>
-<% elsif @name != "" %>
- <script type="text/javascript">
- var title = "<%= @name %>";
- </script>
-<% end %>
- <body>
- <div id="content_wrapper">
- <%= catch_content :for_search_bar %>
- <%= catch_content :for_layout %>
- </div>
- <div id="footer">
- All text is available under the terms of the GNU Free Documentation License.
- Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity.
- </div>
- </body>
-</html>
View
45 app/views/layout/_common_layout.webkit.haml
@@ -0,0 +1,45 @@
+!!!
+%html{:xmlns => "http://www.w3.org/1999/xhtml", 'xml:lang' => "en-us", :lang => "en-us"}
+ %head
+ %title Wikipedia
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ = css_include_tag :application, :bundle => true
+ <meta name = "viewport" content = "width=device-width">
+ <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
+ - if @article
+ :javascript
+ var title = "<%= @article.title.gsub("_", " ") %>";
+ var server = "<%= @article.server %>";
+
+ document.addEventListener("DOMContentLoaded", function() {
+ NodeList.prototype.forEach = Array.prototype.forEach;
+
+ document.querySelectorAll("button.show").forEach(function(button) {
+ button.addEventListener("click", function(e) {
+ var section_id = button.getAttribute("section_id");
+ document.getElementById("content_" + section_id).style.display = "";
+ button.style.display = "none";
+ document.querySelector("button.hide[section_id='" + section_id + "']").style.display = ""
+ });
+ });
+
+ document.querySelectorAll("button.hide").forEach(function(button) {
+ button.addEventListener("click", function(e) {
+ var section_id = button.getAttribute("section_id");
+ document.getElementById("content_" + section_id).style.display = "none";
+ button.style.display = "none";
+ document.querySelector("button.show[section_id='" + section_id + "']").style.display = ""
+ });
+ });
+ });
+
+ - elsif @name != ""
+ :javascript
+ var title = "<%= @name %>";
+ %body
+ #content_wrapper
+ = catch_content :for_search_bar
+ = catch_content :for_layout
+ #footer
+ All text is available under the terms of the GNU Free Documentation License.
+ Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity.
View
19 app/views/layout/application.html.erb
@@ -1,19 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= request.language_code %>" lang="<%= request.language_code %>">
- <head>
- <title>Wikipedia</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <%= css_include_tag :application, :bundle => true %>
- <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
- </head>
- <body>
- <div id="content_wrapper">
- <%= search_bar %>
- <%= catch_content :for_layout %>
- </div>
- <div id="footer">
- All text is available under the terms of the GNU Free Documentation License.
- Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity.
- </div>
- </body>
-</html>
View
14 app/views/layout/application.html.haml
@@ -0,0 +1,14 @@
+!!!
+%html{:xmlns => "http://www.w3.org/1999/xhtml", 'xml:lang' => "en-us", :lang => "en-us"}
+ %head
+ %title Wikipedia
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ = css_include_tag :application, :bundle => true
+ <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
+ %body
+ #content_wrapper
+ = catch_content :for_search_bar
+ = catch_content :for_layout
+ #footer
+ All text is available under the terms of the GNU Free Documentation License.
+ Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a U.S. registered 501(c)(3) tax-deductible nonprofit charity.
View
2 app/views/layout/application.webkit.erb
@@ -1,2 +0,0 @@
-<% throw_content :for_search_bar, search_bar %>
-<%= partial "layout/common_layout", :format => :webkit %>
View
2 app/views/layout/application.webkit.haml
@@ -0,0 +1,2 @@
+- throw_content :for_search_bar, search_bar
+= partial "layout/common_layout", :format => :webkit
View
1 app/views/layout/application.webkit_native.erb
@@ -1 +0,0 @@
-<%= partial "layout/common_layout", :format => :webkit %>
View
1 app/views/layout/application.webkit_native.haml
@@ -0,0 +1 @@
+= partial "layout/common_layout", :format => :webkit

0 comments on commit 711bca3

Please sign in to comment.