├── themes ├── demolicious │ ├── stylesheets │ │ ├── ie6.css │ │ ├── ie7.css │ │ ├── home.css │ │ ├── formatting.css │ │ └── application.css │ ├── views │ │ ├── pages │ │ │ ├── home.html.erb │ │ │ └── show.html.erb │ │ └── layouts │ │ │ └── application.html.erb │ ├── README │ ├── images │ │ ├── footer_background.png │ │ └── header_background.png │ └── LICENSE └── hemingway │ ├── stylesheets │ ├── home.css │ ├── formatting.css │ └── application.css │ ├── images │ ├── search.gif │ ├── spinner.gif │ ├── archives.gif │ ├── footer_black.gif │ ├── kyle-header.jpg │ ├── readon_black.gif │ └── trackback_pingback.gif │ ├── README │ ├── LICENSE │ └── views │ └── layouts │ └── application.html.erb ├── lib ├── generators │ └── refinery_theme │ │ ├── templates │ │ ├── javascripts │ │ │ ├── .gitkeep │ │ │ └── application.js │ │ ├── stylesheets │ │ │ ├── application.css │ │ │ ├── home.css │ │ │ └── formatting.css │ │ └── views │ │ │ ├── pages │ │ │ ├── home.html.erb │ │ │ └── show.html.erb │ │ │ └── layouts │ │ │ └── application.html.erb │ │ ├── USAGE │ │ ├── Rakefile │ │ ├── README │ │ └── refinery_theme_generator.rb ├── theming.rb ├── theme.rb ├── refinery │ └── theme_server.rb ├── gemspec.rb └── refinerycms-theming.rb ├── features ├── step_definitions │ └── theme_generator_steps.rb └── theme_generator.feature ├── license.md ├── refinerycms-theming.gemspec └── readme.md /themes/demolicious/stylesheets/ie6.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/demolicious/stylesheets/ie7.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/javascripts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /themes/hemingway/stylesheets/home.css: -------------------------------------------------------------------------------- 1 | @import url('/stylesheets/refinery/home.css'); -------------------------------------------------------------------------------- /lib/generators/refinery_theme/USAGE: -------------------------------------------------------------------------------- 1 | Usage: 2 | rails generate refinery_theme modern -------------------------------------------------------------------------------- /themes/demolicious/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 | <%= render :partial => "/shared/content_page" %> 2 | -------------------------------------------------------------------------------- /themes/demolicious/views/pages/show.html.erb: -------------------------------------------------------------------------------- 1 | <%= render :partial => "/shared/content_page" %> 2 | -------------------------------------------------------------------------------- /themes/hemingway/stylesheets/formatting.css: -------------------------------------------------------------------------------- 1 | @import url('/stylesheets/refinery/formatting.css'); -------------------------------------------------------------------------------- /themes/hemingway/images/search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/hemingway/images/search.gif -------------------------------------------------------------------------------- /themes/hemingway/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/hemingway/images/spinner.gif -------------------------------------------------------------------------------- /themes/hemingway/images/archives.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/hemingway/images/archives.gif -------------------------------------------------------------------------------- /themes/hemingway/images/footer_black.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/hemingway/images/footer_black.gif -------------------------------------------------------------------------------- /themes/hemingway/images/kyle-header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/hemingway/images/kyle-header.jpg -------------------------------------------------------------------------------- /themes/hemingway/images/readon_black.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/hemingway/images/readon_black.gif -------------------------------------------------------------------------------- /themes/demolicious/README: -------------------------------------------------------------------------------- 1 | Clean simple theme used and provided for free with Refinery. It's used in the demo Refinery site, http://demo.refinerycms.org -------------------------------------------------------------------------------- /themes/demolicious/images/footer_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/demolicious/images/footer_background.png -------------------------------------------------------------------------------- /themes/demolicious/images/header_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/demolicious/images/header_background.png -------------------------------------------------------------------------------- /themes/hemingway/images/trackback_pingback.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/resolve/refinerycms-theming/HEAD/themes/hemingway/images/trackback_pingback.gif -------------------------------------------------------------------------------- /lib/theming.rb: -------------------------------------------------------------------------------- 1 | # Before the application gets setup this will fail badly if there's no database. 2 | require File.expand_path('../refinery/theme_server', __FILE__) -------------------------------------------------------------------------------- /themes/hemingway/README: -------------------------------------------------------------------------------- 1 | Hemingway is a template for Wordpress that has been ported to Refinery. 2 | 3 | Please see http://warpspire.com/hemingway for more information. -------------------------------------------------------------------------------- /themes/demolicious/stylesheets/home.css: -------------------------------------------------------------------------------- 1 | @import url('/stylesheets/refinery/home.css'); 2 | /* 3 | Override default refinery homepage styles here. 4 | These only apply to the homepage of your site. 5 | */ -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/javascripts/application.js: -------------------------------------------------------------------------------- 1 | /* 2 | Place application specific javascripts into this file. 3 | Include this into your template using javascript_include_tag('application', :theme => true) 4 | */ -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | @import url('/stylesheets/refinery/application.css'); 2 | /* 3 | Override default refinery application CSS below. 4 | Formatting applies to all frontend. 5 | */ -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/stylesheets/home.css: -------------------------------------------------------------------------------- 1 | @import url('/stylesheets/refinery/home.css'); 2 | /* 3 | Override default refinery homepage styles here. 4 | These only apply to the homepage of your site. 5 | */ -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/views/pages/home.html.erb: -------------------------------------------------------------------------------- 1 | <%# For the best way to modify this page with your own markup read %> 2 | <%# http://github.com/resolve/refinerycms-theming/blob/master/readme.md %> 3 | 4 | <%= render :partial => "/shared/content_page" %> 5 | -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/views/pages/show.html.erb: -------------------------------------------------------------------------------- 1 | <%# For the best way to modify this page with your own markup read %> 2 | <%# http://github.com/resolve/refinerycms-theming/blob/master/readme.md %> 3 | 4 | <%= render :partial => "/shared/content_page" %> 5 | -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/stylesheets/formatting.css: -------------------------------------------------------------------------------- 1 | @import url('/stylesheets/refinery/formatting.css'); 2 | /* 3 | Override default refinery formatting below. 4 | Formatting applies to backend WYSIWYG editors and all frontend. 5 | This is the best place to put your heading and text related styles 6 | like colours, fonts and line-height. 7 | */ -------------------------------------------------------------------------------- /lib/generators/refinery_theme/Rakefile: -------------------------------------------------------------------------------- 1 | require 'rake' 2 | require 'rake/testtask' 3 | require 'rake/rdoctask' 4 | 5 | desc 'Generate documentation for the Refinery Theme Generator plugin.' 6 | Rake::RDocTask.new(:rdoc) do |rdoc| 7 | rdoc.rdoc_dir = 'rdoc' 8 | rdoc.title = 'Refinery Theme Generator' 9 | rdoc.options << '--line-numbers' << '--inline-source' 10 | rdoc.rdoc_files.include('README') 11 | end -------------------------------------------------------------------------------- /lib/generators/refinery_theme/README: -------------------------------------------------------------------------------- 1 | == Refinery Theme Generator 2 | 3 | == Description 4 | 5 | Generate a new barebones Refinery theme. 6 | 7 | If you want this new theme to be the current theme used, set the "theme" 8 | setting in the Refinery backend to the name of this theme. 9 | 10 | == Usage 11 | rails generate refinery_theme theme_name 12 | 13 | == Example 14 | rails generate refinery_theme modern 15 | 16 | Results in: 17 | create /themes/modern/... 18 | -------------------------------------------------------------------------------- /lib/theme.rb: -------------------------------------------------------------------------------- 1 | module Theme 2 | class << self 3 | def current_theme(env = nil) 4 | ::RefinerySetting[:theme] 5 | end 6 | 7 | def root 8 | Pathname.new( File.expand_path('../../', __FILE__) ) 9 | end 10 | 11 | def current_theme_dir 12 | theme = self.current_theme 13 | theme_dir = Rails.root.join("themes",theme) 14 | theme_dir = self.root.join('themes', theme) unless theme_dir.directory? 15 | theme_dir 16 | end 17 | end 18 | end -------------------------------------------------------------------------------- /features/step_definitions/theme_generator_steps.rb: -------------------------------------------------------------------------------- 1 | require File.expand_path('../../../lib/generators/refinery_theme/refinery_theme_generator', __FILE__) 2 | 3 | Before do 4 | @theme_generator_root = File.join(File.dirname(__FILE__), "/../../") 5 | @tmp_refinery_app_name = "tmp_refinery_app" 6 | require 'tmpdir' 7 | @tmp_refinery_app_root = File.join(Dir.tmpdir, @tmp_refinery_app_name) 8 | @app_root = @tmp_refinery_app_root 9 | end 10 | 11 | After do 12 | FileUtils.rm_rf(@tmp_refinery_app_root) 13 | end 14 | 15 | When /^I generate a theme with the name "([^\"]*)"$/ do |name| 16 | generator = RefineryThemeGenerator.new([name]) 17 | generator.destination_root = @app_root 18 | generator.options = {:quiet => true} 19 | generator.generate 20 | end 21 | -------------------------------------------------------------------------------- /lib/generators/refinery_theme/templates/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | <%= render :partial => "/shared/html_tag" %> 3 | <% site_bar = render(:partial => "/shared/site_bar", :locals => {:head => true}) -%> 4 | <%= render :partial => "/shared/head", :locals => {:theme => true} %> 5 |
6 | <%= site_bar -%> 7 | <%= render :partial => "/shared/ie6check" if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%> 8 |