Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moving gem's css to web-app-theme sub directory

  • Loading branch information...
commit 906b381ce21a309c849c8dbee16f7682c09af525 1 parent 8cd999b
@tscolari tscolari authored
Showing with 62 additions and 31 deletions.
  1. 0  app/assets/stylesheets/{ → web-app-theme}/base.css
  2. 0  app/assets/stylesheets/{ → web-app-theme}/override.css
  3. 0  app/assets/stylesheets/{ → web-app-theme}/themes/activo/images/arrow.png
  4. 0  app/assets/stylesheets/{ → web-app-theme}/themes/activo/images/boxbar-background.png
  5. 0  app/assets/stylesheets/{ → web-app-theme}/themes/activo/images/button-background-active.png
  6. 0  app/assets/stylesheets/{ → web-app-theme}/themes/activo/images/button-background.png
  7. 0  app/assets/stylesheets/{ → web-app-theme}/themes/activo/images/menubar-background.png
  8. 0  app/assets/stylesheets/{ → web-app-theme}/themes/activo/style.css
  9. 0  app/assets/stylesheets/{ → web-app-theme}/themes/amro/style.css
  10. 0  app/assets/stylesheets/{ → web-app-theme}/themes/bec-green/style.css
  11. 0  app/assets/stylesheets/{ → web-app-theme}/themes/bec/style.css
  12. 0  app/assets/stylesheets/{ → web-app-theme}/themes/blue/style.css
  13. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museo700-regular-webfont.eot
  14. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museo700-regular-webfont.svg
  15. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museo700-regular-webfont.ttf
  16. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museo700-regular-webfont.woff
  17. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500-webfont.eot
  18. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500-webfont.svg
  19. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500-webfont.ttf
  20. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500-webfont.woff
  21. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.eot
  22. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.svg
  23. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.ttf
  24. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/fonts/museosans_500_italic-webfont.woff
  25. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/arrow.png
  26. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/bgd.jpg
  27. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/boxbar-background.png
  28. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/button-background-active.png
  29. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/button-background.png
  30. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/messages/error.png
  31. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/messages/notice.png
  32. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/images/messages/warning.png
  33. 0  app/assets/stylesheets/{ → web-app-theme}/themes/default/style.css
  34. 0  app/assets/stylesheets/{ → web-app-theme}/themes/djime-cerulean/style.css
  35. 0  app/assets/stylesheets/{ → web-app-theme}/themes/drastic-dark/style.css
  36. 0  app/assets/stylesheets/{ → web-app-theme}/themes/kathleene/style.css
  37. 0  app/assets/stylesheets/{ → web-app-theme}/themes/olive/style.css
  38. 0  app/assets/stylesheets/{ → web-app-theme}/themes/orange/style.css
  39. 0  app/assets/stylesheets/{ → web-app-theme}/themes/red/style.css
  40. 0  app/assets/stylesheets/{ → web-app-theme}/themes/reidb-greenish/style.css
  41. 0  app/assets/stylesheets/{ → web-app-theme}/themes/warehouse/style.css
  42. +1 −1  lib/generators/web_app_theme/theme/templates/layout_admin.html.erb
  43. +1 −1  lib/generators/web_app_theme/theme/templates/layout_sign.html.erb
  44. +8 −0 lib/generators/web_app_theme/theme/templates/web_app_theme.css.erb
  45. +2 −19 lib/generators/web_app_theme/theme/theme_generator.rb
  46. +8 −0 spec/dummy/app/assets/stylesheets/web_app_theme.css
  47. +39 −7 spec/dummy/app/views/layouts/application.html.erb
  48. +3 −3 spec/dummy/public/index.html
View
0  app/assets/stylesheets/base.css → app/assets/stylesheets/web-app-theme/base.css
File renamed without changes
View
0  app/assets/stylesheets/override.css → app/assets/stylesheets/web-app-theme/override.css
File renamed without changes
View
0  ...assets/stylesheets/themes/activo/images/arrow.png → ...eets/web-app-theme/themes/activo/images/arrow.png
File renamed without changes
View
0  ...sheets/themes/activo/images/boxbar-background.png → ...-theme/themes/activo/images/boxbar-background.png
File renamed without changes
View
0  ...themes/activo/images/button-background-active.png → ...themes/activo/images/button-background-active.png
File renamed without changes
View
0  ...sheets/themes/activo/images/button-background.png → ...-theme/themes/activo/images/button-background.png
File renamed without changes
View
0  ...heets/themes/activo/images/menubar-background.png → ...theme/themes/activo/images/menubar-background.png
File renamed without changes
View
0  app/assets/stylesheets/themes/activo/style.css → ...stylesheets/web-app-theme/themes/activo/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/amro/style.css → ...s/stylesheets/web-app-theme/themes/amro/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/bec-green/style.css → ...lesheets/web-app-theme/themes/bec-green/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/bec/style.css → ...ts/stylesheets/web-app-theme/themes/bec/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/blue/style.css → ...s/stylesheets/web-app-theme/themes/blue/style.css
File renamed without changes
View
0  ...themes/default/fonts/museo700-regular-webfont.eot → ...themes/default/fonts/museo700-regular-webfont.eot
File renamed without changes
View
0  ...themes/default/fonts/museo700-regular-webfont.svg → ...themes/default/fonts/museo700-regular-webfont.svg
File renamed without changes
View
0  ...themes/default/fonts/museo700-regular-webfont.ttf → ...themes/default/fonts/museo700-regular-webfont.ttf
File renamed without changes
View
0  ...hemes/default/fonts/museo700-regular-webfont.woff → ...hemes/default/fonts/museo700-regular-webfont.woff
File renamed without changes
View
0  ...ts/themes/default/fonts/museosans_500-webfont.eot → ...me/themes/default/fonts/museosans_500-webfont.eot
File renamed without changes
View
0  ...ts/themes/default/fonts/museosans_500-webfont.svg → ...me/themes/default/fonts/museosans_500-webfont.svg
File renamed without changes
View
0  ...ts/themes/default/fonts/museosans_500-webfont.ttf → ...me/themes/default/fonts/museosans_500-webfont.ttf
File renamed without changes
View
0  ...s/themes/default/fonts/museosans_500-webfont.woff → ...e/themes/default/fonts/museosans_500-webfont.woff
File renamed without changes
View
0  ...es/default/fonts/museosans_500_italic-webfont.eot → ...es/default/fonts/museosans_500_italic-webfont.eot
File renamed without changes
View
0  ...es/default/fonts/museosans_500_italic-webfont.svg → ...es/default/fonts/museosans_500_italic-webfont.svg
File renamed without changes
View
0  ...es/default/fonts/museosans_500_italic-webfont.ttf → ...es/default/fonts/museosans_500_italic-webfont.ttf
File renamed without changes
View
0  ...s/default/fonts/museosans_500_italic-webfont.woff → ...s/default/fonts/museosans_500_italic-webfont.woff
File renamed without changes
View
0  ...ssets/stylesheets/themes/default/images/arrow.png → ...ets/web-app-theme/themes/default/images/arrow.png
File renamed without changes
View
0  app/assets/stylesheets/themes/default/images/bgd.jpg → ...heets/web-app-theme/themes/default/images/bgd.jpg
File renamed without changes
View
0  ...heets/themes/default/images/boxbar-background.png → ...theme/themes/default/images/boxbar-background.png
File renamed without changes
View
0  ...hemes/default/images/button-background-active.png → ...hemes/default/images/button-background-active.png
File renamed without changes
View
0  ...heets/themes/default/images/button-background.png → ...theme/themes/default/images/button-background.png
File renamed without changes
View
0  ...lesheets/themes/default/images/messages/error.png → ...pp-theme/themes/default/images/messages/error.png
File renamed without changes
View
0  ...esheets/themes/default/images/messages/notice.png → ...p-theme/themes/default/images/messages/notice.png
File renamed without changes
View
0  ...sheets/themes/default/images/messages/warning.png → ...-theme/themes/default/images/messages/warning.png
File renamed without changes
View
0  app/assets/stylesheets/themes/default/style.css → ...tylesheets/web-app-theme/themes/default/style.css
File renamed without changes
View
0  ...ssets/stylesheets/themes/djime-cerulean/style.css → ...ets/web-app-theme/themes/djime-cerulean/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/drastic-dark/style.css → ...heets/web-app-theme/themes/drastic-dark/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/kathleene/style.css → ...lesheets/web-app-theme/themes/kathleene/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/olive/style.css → .../stylesheets/web-app-theme/themes/olive/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/orange/style.css → ...stylesheets/web-app-theme/themes/orange/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/red/style.css → ...ts/stylesheets/web-app-theme/themes/red/style.css
File renamed without changes
View
0  ...ssets/stylesheets/themes/reidb-greenish/style.css → ...ets/web-app-theme/themes/reidb-greenish/style.css
File renamed without changes
View
0  app/assets/stylesheets/themes/warehouse/style.css → ...lesheets/web-app-theme/themes/warehouse/style.css
File renamed without changes
View
2  lib/generators/web_app_theme/theme/templates/layout_admin.html.erb
@@ -2,7 +2,7 @@
<html>
<head>
<title><%= options.app_name %></title>
- <%%= stylesheet_link_tag "web-app-theme/base", "web-app-theme/themes/<%= options.theme %>/style", "web-app-theme/override", :cache => true %>
+ <%%= stylesheet_link_tag 'web_app_theme' %>
<%%= javascript_include_tag :defaults, :cache => true %>
<%%= csrf_meta_tag %>
</head>
View
2  lib/generators/web_app_theme/theme/templates/layout_sign.html.erb
@@ -2,7 +2,7 @@
<html>
<head>
<title><%= options.app_name %></title>
- <%%= stylesheet_link_tag "web-app-theme/base", "web-app-theme/themes/<%= options.theme %>/style", "web-app-theme/override", :cache => true %>
+ <%%= stylesheet_link_tag "web_app_theme" %>
<%%= csrf_meta_tag %>
</head>
<body>
View
8 lib/generators/web_app_theme/theme/templates/web_app_theme.css.erb
@@ -0,0 +1,8 @@
+/*
+ * This css will include all web-app-theme css you need
+ *
+ *= require ./web-app-theme/override
+ *= require ./web-app-theme/base
+ *= require ./web-app-theme/themes/<%= options.theme %>/style.css
+ *
+ */
View
21 lib/generators/web_app_theme/theme/theme_generator.rb
@@ -20,30 +20,13 @@ def copy_layout
generate_haml_layout(admin_layout_name)
end
end
-
- def copy_base_stylesheets
- copy_file "#{stylesheets_path}/base.css", "public/stylesheets/web-app-theme/base.css"
- copy_file "#{stylesheets_path}/override.css", "public/stylesheets/web-app-theme/override.css"
- end
-
- def copy_theme_stylesheets
- directory "#{stylesheets_path}/themes/#{options.theme}", "public/stylesheets/web-app-theme/themes/#{options.theme}"
- end
- def copy_images
- directory "#{images_path}", "public/images/web-app-theme"
+ def copy_theme_stylesheet
+ template "web_app_theme.css.erb", "app/assets/stylesheets/web_app_theme.css"
end
protected
- def stylesheets_path
- "../../../../../stylesheets"
- end
-
- def images_path
- "../../../../../images"
- end
-
def generate_haml_layout(admin_layout_name)
require 'haml'
Dir.mktmpdir('web-app-theme-haml') do |haml_root|
View
8 spec/dummy/app/assets/stylesheets/web_app_theme.css
@@ -0,0 +1,8 @@
+/*
+ * This css will include all web-app-theme css you need
+ *
+ *= require web-app-theme/override
+ *= require web-app-theme/base
+ *= require web-app-theme/themes/default/style.css
+ *
+ */
View
46 spec/dummy/app/views/layouts/application.html.erb
@@ -1,14 +1,46 @@
<!DOCTYPE html>
<html>
<head>
- <title>Dummy</title>
- <%= stylesheet_link_tag "application" %>
- <%= javascript_include_tag "application" %>
- <%= csrf_meta_tags %>
+ <title>Web App</title>
+ <%= stylesheet_link_tag 'web_app_theme' %>
+ <%= javascript_include_tag :defaults, :cache => true %>
+ <%= csrf_meta_tag %>
</head>
<body>
-
-<%= yield %>
-
+ <div id="container">
+ <div id="header">
+ <h1><a href="/">Web App</a></h1>
+ <div id="user-navigation">
+ <ul class="wat-cf">
+ <li><a href="#"><%= t("web-app-theme.profile", :default => "Profile") %></a></li>
+ <li><a href="#"><%= t("web-app-theme.settings", :default => "Settings") %></a></li>
+ <li><a href="/logout" class="logout"><%= t("web-app-theme.logout", :default => "Logout") %></a></li>
+ </ul>
+ </div>
+ <div id="main-navigation">
+ <ul class="wat-cf"></ul>
+ </div>
+ </div>
+ <div id="wrapper" class="wat-cf">
+ <div class="flash">
+ <% flash.each do |type, message| -%>
+ <div class="message <%= type %>">
+ <p><%= message %></p>
+ </div>
+ <% end -%>
+ </div>
+ <div id="main">
+ <%= yield %>
+ <div id="footer">
+ <div class="block">
+ <p>Copyright &copy; <%= Time.now.year %> Web App.</p>
+ </div>
+ </div>
+ </div>
+ <div id="sidebar">
+ <%= yield :sidebar %>
+ </div>
+ </div>
+ </div>
</body>
</html>
View
6 spec/dummy/public/index.html
@@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Web App Theme</title>
- <link rel="stylesheet" href="assets/base.css" type="text/css" media="screen" />
- <link rel="stylesheet" id="current-theme" href="assets/themes/default/style.css" type="text/css" media="screen" />
+ <link rel="stylesheet" href="assets/web-app-theme/base.css" type="text/css" media="screen" />
+ <link rel="stylesheet" id="current-theme" href="assets/web-app-theme/themes/default/style.css" type="text/css" media="screen" />
<script type="text/javascript" charset="utf-8" src="javascripts/jquery-1.3.min.js"></script>
<script type="text/javascript" charset="utf-8" src="javascripts/jquery.scrollTo.js"></script>
<script type="text/javascript" charset="utf-8" src="javascripts/jquery.localscroll.js"></script>
@@ -21,7 +21,7 @@
if (hash.length > 0) {
matches = hash.match(/^#themes\/([a-z0-9\-_]+)$/);
if (matches && matches.length > 1) {
- $('#current-theme').attr('href', 'assets/themes/' + matches[1] + '/style.css');
+ $('#current-theme').attr('href', 'assets/web-app-theme/themes/' + matches[1] + '/style.css');
} else {
alert('theme not valid');
}
Please sign in to comment.
Something went wrong with that request. Please try again.