├── 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 |
9 |
10 | <%= render :partial => "/shared/header" -%> 11 |
12 |
13 | <%= yield %> 14 |
15 | 18 |
19 | <%= render :partial => "/shared/javascripts" %> 20 | 21 | 22 | -------------------------------------------------------------------------------- /features/theme_generator.feature: -------------------------------------------------------------------------------- 1 | @theming 2 | Feature: Theme generation 3 | In order to create my own theme 4 | As a refinery user 5 | I want to generate a basic theme directory structure 6 | 7 | @theming-generate 8 | Scenario: Generating a theme with a name 9 | Given I have a refinery application 10 | When I generate a theme with the name "modern" 11 | Then I should have a directory "themes/modern" 12 | And I should have a file "themes/modern/stylesheets/application.css" 13 | And I should have a file "themes/modern/stylesheets/home.css" 14 | And I should have a file "themes/modern/stylesheets/formatting.css" 15 | And I should have a file "themes/modern/views/layouts/application.html.erb" 16 | And I should have a file "themes/modern/views/pages/home.html.erb" 17 | And I should have a file "themes/modern/views/pages/show.html.erb" 18 | And I should have a directory "themes/modern/javascripts" 19 | -------------------------------------------------------------------------------- /themes/demolicious/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%= render :partial => "/shared/head", :locals => {:theme => true} %> 4 | 5 | <%= render :partial => "/shared/site_bar", 6 | :locals => { 7 | :exclude_css => false, 8 | :exclude_cornering_library => false, 9 | :exclude_site_bar_javascript => false, 10 | :exclude_jquery => false 11 | } %> 12 |
13 |
14 | <%= render :partial => "/shared/ie6check" if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%> 15 | 18 |
19 | <%= yield %> 20 |
21 | 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/refinery/theme_server.rb: -------------------------------------------------------------------------------- 1 | # Serves theme files from the theme directory without touching Rails. 2 | module Refinery 3 | class ThemeServer 4 | 5 | def initialize(app) 6 | @app = app 7 | end 8 | 9 | def call(env) 10 | if env["PATH_INFO"] =~ /^\/theme\/(stylesheets|javascripts|images)/ and (theme = Theme.current_theme(env)).present? 11 | env["PATH_INFO"].gsub!(/^\/theme\//, '') 12 | if (file_path = (dir = Theme.current_theme_dir).join(env["PATH_INFO"])).exist? 13 | etag = Digest::MD5.hexdigest("#{file_path.to_s}#{file_path.mtime}") 14 | unless (etag == env["HTTP_IF_NONE_MATCH"]) 15 | status, headers, body = Rack::File.new(dir).call(env) 16 | [status, headers.update({"ETag" => etag}), body] 17 | else 18 | [304, {"ETag" => etag}, []] 19 | end 20 | else 21 | [404, {}, []] 22 | end 23 | else 24 | @app.call(env) 25 | end 26 | end 27 | 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /themes/demolicious/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 | */ 6 | body, input, textarea, select, p, li, blockquote { 7 | font-family: Verdana; 8 | font-size: 12px; 9 | } 10 | #body_content_left *, #body_content_right *, .page_part_body, .page_part_side_body { 11 | line-height: 22px; 12 | color: #585858; 13 | } 14 | h1, #body_content h1, h1#body_content_page_title { 15 | color: #eb1313; 16 | font-size: 25px; 17 | font-weight: normal; 18 | font-family: "Trebuchet MS", Trebuchet; 19 | } 20 | #body_content_left p, #body_content_right p, .page_part_body p, .page_part_side_body p { 21 | margin-bottom: 12px; 22 | } 23 | h2, h3 { 24 | color: #8f8f8f; 25 | font-weight: normal; 26 | } 27 | h2 { 28 | font-size: 18px; 29 | } 30 | h3 { 31 | font-size: 16px; 32 | } 33 | #footer_content * { 34 | color: #c7c7c7; 35 | font-size: 11px; 36 | } -------------------------------------------------------------------------------- /themes/hemingway/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006 Kyle Neath 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /themes/demolicious/LICENSE: -------------------------------------------------------------------------------- 1 | == MIT License 2 | 3 | Copyright (c) 2005-2009 Resolve Digital Ltd. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2005-2010 [Resolve Digital Ltd.](http://www.resolvedigital.co.nz) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /lib/gemspec.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | version = '1.0.1' 3 | raise "Could not get version so gemspec can not be built" if version.nil? 4 | files = Dir[%q{**/*}].flatten.reject{|f| f =~ /\.gem$/} 5 | 6 | gemspec = <= 0.9.9.15') 27 | end 28 | EOF 29 | 30 | File.open(File.expand_path("../../refinerycms-theming.gemspec", __FILE__), 'w').puts(gemspec) 31 | -------------------------------------------------------------------------------- /lib/generators/refinery_theme/refinery_theme_generator.rb: -------------------------------------------------------------------------------- 1 | class RefineryThemeGenerator < Rails::Generators::Base 2 | source_root File.expand_path('../templates', __FILE__) 3 | argument :theme_name, :type => :string 4 | 5 | def generate 6 | copy_file "stylesheets/application.css", "themes/#{theme_name}/stylesheets/application.css" 7 | copy_file "stylesheets/formatting.css", "themes/#{theme_name}/stylesheets/formatting.css" 8 | copy_file "stylesheets/home.css", "themes/#{theme_name}/stylesheets/home.css" 9 | 10 | copy_file "views/layouts/application.html.erb", "themes/#{theme_name}/views/layouts/application.html.erb" 11 | 12 | copy_file "views/pages/show.html.erb", "themes/#{theme_name}/views/pages/show.html.erb" 13 | copy_file "views/pages/home.html.erb", "themes/#{theme_name}/views/pages/home.html.erb" 14 | 15 | copy_file "javascripts/application.js", "themes/#{theme_name}/javascripts/application.js" 16 | 17 | if RefinerySetting.get(:theme).nil? 18 | RefinerySetting.set(:theme, theme_name) 19 | puts "NOTE: \"theme\" setting created and set to #{theme_name}" 20 | else 21 | puts 'NOTE: If you want this new theme to be the current theme used, set the "theme" setting in the Refinery backend to the name of this theme.' unless RAILS_ENV == "test" 22 | end 23 | end 24 | 25 | end 26 | -------------------------------------------------------------------------------- /themes/hemingway/views/layouts/application.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%= render :partial => "/shared/head", :locals => {:theme => true} %> 4 | 5 | <%= render :partial => "/shared/site_bar" %> 6 | 16 |
17 |
18 | <%= yield %> 19 |
20 |
21 |
22 |
23 |
24 | 25 |
26 |
27 |

28 | Pages 29 |

30 | <%= render :partial => 'shared/menu' %> 31 |
32 |
33 |
34 |
35 | 43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /themes/demolicious/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 | */ 6 | body { 7 | margin: 0px; 8 | padding: 0px; 9 | } 10 | #body_content { 11 | margin-top: 36px; 12 | } 13 | #body_content_left { 14 | width: 574px; 15 | } 16 | #body_content_right { 17 | width: 396px; 18 | } 19 | #body_content_right img { 20 | border: 3px solid #c7c7c7; 21 | } 22 | #page { 23 | width: 100%; 24 | padding: 0px; 25 | margin: 0px; 26 | } 27 | #body, #header_content, #footer_content, #site_bar_content { 28 | width: 990px; 29 | margin: 0px auto; 30 | } 31 | #header { 32 | background: url('/theme/images/header_background.png') repeat-x; 33 | } 34 | #header_content { 35 | position: relative; 36 | height: 132px; 37 | } 38 | #header_content h1, #header_content h1 a { 39 | color: #feffff; 40 | font-size: 24px; 41 | font-weight: normal; 42 | left: 0px; 43 | text-decoration: none; 44 | } 45 | #header_content h1, #header_content #menu { 46 | position: absolute; 47 | bottom: 30px; 48 | margin: 0px; 49 | } 50 | #header_content #menu { 51 | right: 0px; 52 | padding: 0px; 53 | } 54 | #language_switcher { 55 | float:right; 56 | padding-top:15px; 57 | } 58 | #menu li, #menu > a, #menu div { 59 | float: left; 60 | list-style: none; 61 | position: relative; 62 | } 63 | #menu a, #menu li:hover ul li a, #menu a:hover nav a { 64 | color: #969792; 65 | display: block; 66 | padding: 10px 18px; 67 | text-decoration: none; 68 | cursor: pointer; 69 | } 70 | #menu li.selected a, #menu li:hover a, #menu li a:hover, #menu li ul li a:hover, #menu div.selected a, #menu a.selected, #menu a:hover, #menu div:hover > a { 71 | color: #32322b; 72 | background: white; 73 | } 74 | #menu li ul, #menu nav { 75 | position: absolute; 76 | left: -99999px; 77 | padding: 0px; 78 | margin: 0px; 79 | min-width: 140px; 80 | max-width: 300px; 81 | background: white; 82 | } 83 | #menu li ul li, #menu nav a { 84 | float: left; 85 | } 86 | #menu li:hover ul, #menu div:hover nav { 87 | left: auto; 88 | } 89 | #footer { 90 | margin-top: 120px; 91 | background: url('/theme/images/footer_background.png') repeat-x; 92 | } 93 | #footer_content { 94 | height: 103px; 95 | padding-top: 94px; 96 | background: url('/images/refinery/logo.png') 0px 80px no-repeat; 97 | text-align: right; 98 | } 99 | .inquiries .field input, .inquiries textarea { 100 | border: 1px solid #75766f; 101 | margin-left: 0px; 102 | } 103 | .inquiries textarea { 104 | width: 375px; 105 | } 106 | -------------------------------------------------------------------------------- /refinerycms-theming.gemspec: -------------------------------------------------------------------------------- 1 | Gem::Specification.new do |s| 2 | s.name = %q{refinerycms-theming} 3 | s.version = %q{1.0.1} 4 | s.description = %q{Theming functionality for the Refinery CMS project, extracted from Refinery CMS core.} 5 | s.date = %q{2011-04-05} 6 | s.summary = %q{Theming functionality for the Refinery CMS project.} 7 | s.email = %q{info@refinerycms.com} 8 | s.homepage = %q{http://refinerycms.com} 9 | s.authors = %w(Resolve\ Digital) 10 | s.license = %q{MIT} 11 | s.require_paths = %w(lib) 12 | 13 | s.files = [ 14 | 'features', 15 | 'features/step_definitions', 16 | 'features/step_definitions/theme_generator_steps.rb', 17 | 'features/theme_generator.feature', 18 | 'lib', 19 | 'lib/gemspec.rb', 20 | 'lib/generators', 21 | 'lib/generators/refinery_theme', 22 | 'lib/generators/refinery_theme/Rakefile', 23 | 'lib/generators/refinery_theme/README', 24 | 'lib/generators/refinery_theme/refinery_theme_generator.rb', 25 | 'lib/generators/refinery_theme/templates', 26 | 'lib/generators/refinery_theme/templates/javascripts', 27 | 'lib/generators/refinery_theme/templates/javascripts/application.js', 28 | 'lib/generators/refinery_theme/templates/stylesheets', 29 | 'lib/generators/refinery_theme/templates/stylesheets/application.css', 30 | 'lib/generators/refinery_theme/templates/stylesheets/formatting.css', 31 | 'lib/generators/refinery_theme/templates/stylesheets/home.css', 32 | 'lib/generators/refinery_theme/templates/views', 33 | 'lib/generators/refinery_theme/templates/views/layouts', 34 | 'lib/generators/refinery_theme/templates/views/layouts/application.html.erb', 35 | 'lib/generators/refinery_theme/templates/views/pages', 36 | 'lib/generators/refinery_theme/templates/views/pages/home.html.erb', 37 | 'lib/generators/refinery_theme/templates/views/pages/show.html.erb', 38 | 'lib/generators/refinery_theme/USAGE', 39 | 'lib/refinery', 40 | 'lib/refinery/theme_server.rb', 41 | 'lib/refinerycms-theming.rb', 42 | 'lib/theme.rb', 43 | 'lib/theming.rb', 44 | 'license.md', 45 | 'readme.md', 46 | 'refinerycms-theming.gemspec', 47 | 'themes', 48 | 'themes/demolicious', 49 | 'themes/demolicious/images', 50 | 'themes/demolicious/images/footer_background.png', 51 | 'themes/demolicious/images/header_background.png', 52 | 'themes/demolicious/LICENSE', 53 | 'themes/demolicious/README', 54 | 'themes/demolicious/stylesheets', 55 | 'themes/demolicious/stylesheets/application.css', 56 | 'themes/demolicious/stylesheets/formatting.css', 57 | 'themes/demolicious/stylesheets/home.css', 58 | 'themes/demolicious/stylesheets/ie6.css', 59 | 'themes/demolicious/stylesheets/ie7.css', 60 | 'themes/demolicious/views', 61 | 'themes/demolicious/views/layouts', 62 | 'themes/demolicious/views/layouts/application.html.erb', 63 | 'themes/demolicious/views/pages', 64 | 'themes/demolicious/views/pages/home.html.erb', 65 | 'themes/demolicious/views/pages/show.html.erb', 66 | 'themes/hemingway', 67 | 'themes/hemingway/images', 68 | 'themes/hemingway/images/archives.gif', 69 | 'themes/hemingway/images/footer_black.gif', 70 | 'themes/hemingway/images/kyle-header.jpg', 71 | 'themes/hemingway/images/readon_black.gif', 72 | 'themes/hemingway/images/search.gif', 73 | 'themes/hemingway/images/spinner.gif', 74 | 'themes/hemingway/images/trackback_pingback.gif', 75 | 'themes/hemingway/LICENSE', 76 | 'themes/hemingway/README', 77 | 'themes/hemingway/stylesheets', 78 | 'themes/hemingway/stylesheets/application.css', 79 | 'themes/hemingway/stylesheets/formatting.css', 80 | 'themes/hemingway/stylesheets/home.css', 81 | 'themes/hemingway/views', 82 | 'themes/hemingway/views/layouts', 83 | 'themes/hemingway/views/layouts/application.html.erb' 84 | ] 85 | 86 | 87 | s.add_dependency('refinerycms-core', '>= 0.9.9.15') 88 | end 89 | -------------------------------------------------------------------------------- /lib/refinerycms-theming.rb: -------------------------------------------------------------------------------- 1 | require 'refinerycms-core' 2 | 3 | require File.expand_path('../theming', __FILE__) 4 | require File.expand_path('../theme', __FILE__) 5 | 6 | module Refinery 7 | class ThemingEngine < ::Rails::Engine 8 | 9 | config.to_prepare do 10 | [::ApplicationController, ::Admin::BaseController].each do |controller| 11 | controller.module_eval do 12 | 13 | # Add or remove theme paths to/from Refinery application 14 | prepend_before_filter :attach_theme_to_refinery 15 | 16 | def attach_theme_to_refinery 17 | # remove any paths relating to any theme. 18 | view_paths.reject! { |v| v.to_s =~ %r{^themes/} } 19 | 20 | # add back theme paths if there is a theme present. 21 | if (theme = ::Theme.current_theme(request.env)).present? 22 | # Set up view path again for the current theme. 23 | view_paths.unshift ::Theme.current_theme_dir.join("views").to_s 24 | 25 | # Ensure that routes within the application are top priority. 26 | # Here we grab all the routes that are under the application's view folder 27 | # and promote them ahead of any other path. 28 | view_paths.select{|p| p.to_s =~ %r{^#{Rails.root.join('app', 'views')}}}.each do |app_path| 29 | view_paths.unshift app_path 30 | end 31 | end 32 | 33 | # Set up menu caching for this theme or lack thereof 34 | if RefinerySetting.table_exists? and 35 | RefinerySetting.get(:refinery_menu_cache_action_suffix) != (suffix = "#{"#{theme}_" if theme.present?}site_menu") 36 | RefinerySetting.set(:refinery_menu_cache_action_suffix, suffix) 37 | end 38 | end 39 | protected :attach_theme_to_refinery 40 | end 41 | 42 | end 43 | 44 | ::ApplicationHelper.module_eval do 45 | def image_tag(source, options={}) 46 | theme = (options.delete(:theme) == true) 47 | tag = super 48 | # inject /theme/ into the image tag src if this is themed. 49 | tag.gsub!(/src=[\"|\']/) { |m| "#{m}/theme/" }.gsub!("//", "/") if theme 50 | tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc. 51 | end 52 | 53 | def javascript_include_tag(*sources) 54 | theme = (arguments = sources.dup).extract_options![:theme] == true # don't ruin the current sources object 55 | tag = super 56 | # inject /theme/ into the javascript include tag src if this is themed. 57 | tag.gsub!(/\/javascripts\//, "/theme/javascripts/") if theme 58 | tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc. 59 | end 60 | 61 | def stylesheet_link_tag(*sources) 62 | theme = (arguments = sources.dup).extract_options![:theme] == true # don't ruin the current sources object 63 | tag = super 64 | # inject /theme/ into the stylesheet link tag href if this is themed. 65 | tag.gsub!(/\/stylesheets\//, "/theme/stylesheets/") if theme 66 | tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc. 67 | end 68 | 69 | def image_submit_tag(source, options = {}) 70 | theme = (options.delete(:theme) == true) 71 | 72 | tag = super 73 | # inject /theme/ into the image tag src if this is themed. 74 | tag.gsub!(/src=[\"|\']/) { |m| "#{m}/theme/" }.gsub!("//", "/") if theme 75 | tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc. 76 | end 77 | end 78 | end 79 | 80 | config.after_initialize do 81 | ::Refinery::Plugin.register do |plugin| 82 | plugin.name = "refinerycms_theming_plugin" 83 | plugin.version = '1.0.0' 84 | plugin.hide_from_menu = true 85 | end 86 | end 87 | 88 | initializer 'themes.middleware' do |app| 89 | app.config.middleware.insert_after ::Rack::Lock, ::Refinery::ThemeServer 90 | end 91 | 92 | end 93 | end 94 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # USE OF THE REFINERYCMS-THEMING GEM IS NO LONGER RECOMMENDED. 2 | 3 | ## Why? 4 | 5 | Theming performs some strange code hacks in order to get it to work. Therefore, it makes it difficult to keep it compatible with other engines. Also, many people have reported over 15 second load times with theming, whereas regularly you would get 3 second load times. Finally, Resolve Digital no longer uses nor supports this method. 6 | 7 | ## What should I use instead? 8 | 9 | Use app/views for your views and public/ for stylesheets and javascripts, just like a normal Rails app. 10 | 11 | *** 12 | 13 | # Themes 14 | 15 | ## Introduction 16 | 17 | __Themes allow you to wrap up the design of your Refinery site into a single folder that is portable.__ 18 | 19 | Refinery doesn't force you to learn a special templating language, but rather just uses the regular 20 | ERB views you're used to in Rails. This means creating a theme from your existing site is extremely easy. 21 | 22 | Think of a theme as your ``app/views`` directory with a few extra things like images, css and javascript. 23 | 24 | It's worth noting you don't need to use a theme if you don't want to. Placing files in the ``app/views`` directory like any other Rails app will work just fine. It's only if you want to wrap your design up into a single location that you would use a theme or allow your client to easily change between designs. 25 | 26 | ## How do I make my own Theme? 27 | 28 | __Uncomment the gem 'refinerycms-theming' in your project's Gemfile & run ``bundle install``__ 29 | 30 | Then, simply use the Theme generator to make the basic structure of a new theme. 31 | 32 | rails generate refinery_theme name_of_theme 33 | 34 | Don't forget to "activate" this new theme by setting the theme setting to the name of this new theme. The __first__ time you create a theme, this setting will be created and set for you. If you already have a theme from an earlier project but no setting, you can create it manually in the __refinery admin / settings__ section. __The setting name is ``theme``__. 35 | 36 | 37 | ## The Structure of a Theme 38 | 39 | Themes sit in your Rails app like this 40 | 41 | app/ 42 | config/ 43 | db/ 44 | lib/ 45 | public/ 46 | themes/ 47 | |- mytheme/ 48 | |- othertheme/ 49 | plugins/ 50 | tests/ 51 | 52 | Let's take the ``mytheme`` example theme shown above. This is how the theme is structured: 53 | 54 | mytheme/ 55 | |- images 56 | | |- whatever.png 57 | | |- foo.jpg 58 | |- javascripts 59 | | |- whatever.js 60 | |- LICENSE 61 | |- README 62 | |- stylesheets/ 63 | | |- application.css 64 | | |- whatever.css 65 | |- views 66 | |- pages 67 | | |- show.html.erb 68 | | |- index.html.erb 69 | |- layouts 70 | |- application.html.erb 71 | 72 | 73 | ### Images 74 | 75 | Usually this would be just what you have in ``public/images`` except we move that to the theme instead. 76 | 77 | ### Javascripts 78 | 79 | Same with javascripts, just what you normally have in ``public/javascripts`` but in this theme directory instead. 80 | 81 | ### Readme 82 | 83 | The ``README`` file is just a description of your theme. 84 | 85 | ### Partials && /shared Content 86 | 87 | In the default views, you will notice lines such as: 88 | 89 | <%= render :partial => '/shared/header' %> 90 | 91 | These are built-in partials for RefineryCMS. To __override__ these partials, run the command: 92 | 93 | rake refinery:override view=shared/* theme=theme-name 94 | 95 | __theme=theme-name is optional__ but is convenient for keeping things together. 96 | 97 | 98 | ### content_for :body\_content\_title, :body\_content\_left, etc. 99 | 100 | These are the default sections built up in __/shared/\_content\_page.html.erb__ 101 | You can add your own sections or rename these as you'd like. Say you wanted to add a left side bar, you could modify the __/shared/\_content\_page partial__ like so: 102 | 103 | sections = [ 104 | {:yield => :body_content_title, :fallback => page_title, :id => 'body_content_page_title', :title => true}, 105 | {:yield => :body_content_sidebar, :fallback => nil}, 106 | {:yield => :body_content_left, :fallback => (@page.present? ? @page[Page.default_parts.first.to_sym] : nil)}, 107 | {:yield => :body_content_right, :fallback => (@page.present? ? @page[Page.default_parts.second.to_sym] : nil)}.reject {|section| hide_sections.include?(section[:yield]) } 108 | 109 | Where you'll see I added "body_content_sidebar". And of course you could set the fallback to whatever you like. 110 | 111 | Including the partial /shared/content_page is what causes all your content_for blocks to work. So you would use 112 | 113 | <% content_for :body_content_sidebar do -%> 114 | blah 115 | <% end -%> 116 | 117 | in this instance. 118 | 119 | ### Views 120 | 121 | This is exactly the same as how you lay your views out in ``app/views/`` just instead of putting them in ``app/views/`` you put them into ``themes/mytheme/views/`` 122 | 123 | ## How do I select which Theme Refinery should use? 124 | 125 | In the admin area of Refinery go to the "Settings" area, locate the setting called "theme" and edit it. 126 | 127 | Set the value of that setting to the name of your themes folder. For example, if your theme is sitting in: 128 | 129 | themes/my_theme 130 | 131 | set it to ``my_theme`` and hit save. 132 | 133 | ## How do I install someone else's Theme? 134 | 135 | Just copy their theme directory into your themes folder and Refinery will see it. 136 | 137 | ## How can I Convert my Current Views into a Theme? 138 | 139 | This should be fairly straightforward, just follow the directory structure outlined in 'The structure of a Theme'. 140 | 141 | But there is one important difference that need to be addressed to convert your current site into a theme. 142 | 143 | If you have some CSS which refers to an image or URL: 144 | 145 | #footer { 146 | background: url('/images/footer_background.png') repeat-x; 147 | } 148 | 149 | You need to update the URL so it requests ``/theme/images/`` instead of just ``/images``. This tells Refinery we need to actually load this image from the theme and not just the public directory. 150 | 151 | So the result is simply: 152 | 153 | #footer { 154 | background: url('/theme/images/footer_background.png') repeat-x; 155 | } 156 | 157 | This is the same with linking to Javascript and Stylesheets in your view. Say our ``application.html.erb`` layout had something like this: 158 | 159 | <%= stylesheet_link_tag 'application' %> 160 | 161 | You just need to change that to: 162 | 163 | <%= stylesheet_link_tag 'application', :theme => true %> 164 | 165 | ## I'm Stuck, is there an Example Theme? 166 | 167 | Yep, there is an example theme called "demolicious" that comes with Refinery located in ``/themes/demolicious``. If you find yourself getting stuck, just check out that theme and get a feel for how it works. -------------------------------------------------------------------------------- /themes/hemingway/stylesheets/application.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* 4 | Theme Name: Hemingway 5 | Theme URI: http://warpspire.com/hemingway 6 | Description: Description: Hemingway is a simple weblog theme by Kyle Neath aimed at giving bloggers a great platform on which to customize. If you'd like to learn more about Hemingway, head on over to Warpspire or ask a question in the official support forums.
This theme requires WordPress 2.0+. 7 | Version: 0.20 8 | Author: Kyle Neath 9 | Author URI: http://warpspire.com 10 | */ 11 | 12 | 13 | 14 | /*----------------------------------------------------------------------------------------------- 15 | Global Styles 16 | -----------------------------------------------------------------------------------------------*/ 17 | 18 | * { 19 | padding:0; 20 | margin:0; 21 | } 22 | h1, h2, h3, h4, h5, h6, p, pre, blockquote, label, ul, ol, dl, fieldset, address { margin:1em 0; } 23 | li, dd { margin-left:5%; } 24 | fieldset { padding: .5em; } 25 | select option{ padding:0 5px; } 26 | select, option { color:black; } 27 | .hide, .print-logo, .close-button{ display:none; } 28 | .left{ float:left; } 29 | .right{ float:right; } 30 | .clear{ clear:both; height:1px; font-size:1px; line-height:1px; } 31 | a img{ border:none; } 32 | 33 | /*----------------------------------------------------------------------------------------------- 34 | Layout / Base Page Styling 35 | -----------------------------------------------------------------------------------------------*/ 36 | 37 | body{ 38 | background:#272727; 39 | color:#BFBFBF; 40 | font-size:11px; 41 | font-family:"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Arial, sans-serif; 42 | } 43 | 44 | /* This class sets the width and position for all rows */ 45 | .inside, #site_bar_content { 46 | width:80%; 47 | min-width:65em; 48 | max-width:85em; 49 | margin:0 auto; 50 | } 51 | 52 | a{ 53 | color:#FFF; 54 | } 55 | 56 | h1{ 57 | color:#CCC; 58 | font-size:1.5em; 59 | font-weight:normal; 60 | margin:1.5em 0; 61 | } 62 | 63 | h2, h3{ 64 | font-size:1.15em; 65 | color:#FFF; 66 | font-weight:normal; 67 | } 68 | #primary h2{ 69 | color:#CCC; 70 | } 71 | 72 | p{ 73 | line-height:1.75em; 74 | } 75 | 76 | #primary ul li{ 77 | list-style-type:square; 78 | margin:0.5em 0 0.5em 2em; 79 | } 80 | 81 | blockquote{ 82 | margin-left:1em; 83 | padding-left:1em; 84 | border-left:2px solid #CCC; 85 | color:#CCC; 86 | } 87 | 88 | pre{ 89 | width:100%; 90 | padding:1em 0; 91 | overflow:auto; 92 | border-top:1px dotted #333; 93 | border-bottom:1px dotted #333; 94 | } 95 | 96 | table{ 97 | width:100%; 98 | border-spacing:2px; 99 | margin:1.5em 0; 100 | } 101 | table th, table td{ padding:0.3em 0.75em } 102 | table th{ 103 | background:#CCC; 104 | color:#000; 105 | text-align:left; 106 | } 107 | table td{ 108 | background:#333; 109 | color:#FFF; 110 | } 111 | table caption{ 112 | text-align:left; 113 | color:#FFF; 114 | margin-bottom:-1em; 115 | margin-top:1em; 116 | } 117 | 118 | .rule{ 119 | border-top:1px solid #CCC; 120 | height:1px; 121 | font-size:1px; 122 | line-height:1px; 123 | margin:1.5em 0; 124 | } 125 | 126 | /*----------------------------------------------------------------------------------------------- 127 | Header 128 | -----------------------------------------------------------------------------------------------*/ 129 | #header{ 130 | background:#000; 131 | } 132 | #header .inside{ 133 | padding:3em 0; 134 | } 135 | 136 | #header h2{ 137 | font-size:2.25em; 138 | margin:0 0.5em 0 0; 139 | padding:0 0.5em 0.25em 0; 140 | border-right:1px solid #808080; 141 | float:left; 142 | } 143 | #header h2 a{ text-decoration:none; } 144 | 145 | #header p{ 146 | padding:1em 0; 147 | margin:0; 148 | line-height:1em; 149 | } 150 | 151 | /*----------------------------------------------------------------------------------------------- 152 | Primary Items 153 | -----------------------------------------------------------------------------------------------*/ 154 | 155 | #primary{ 156 | background:#000; 157 | padding:1px 0 2em 0; 158 | color:#808080; 159 | } 160 | 161 | #primary.onecol-stories .primary{ 162 | float:left; 163 | width:50%; 164 | } 165 | #primary.onecol-stories .secondary{ 166 | float:right; 167 | width:40%; 168 | margin:0 0 0 10%; 169 | } 170 | 171 | #primary.twocol-stories .story{ 172 | float:left; 173 | width:48%; 174 | margin:0 0 0 4%; 175 | display:inline; 176 | } 177 | * html #primary.twocol-stories .story{ 178 | margin-left:2%; 179 | } 180 | #primary.twocol-stories .first, * html #primary.twocol-stories .first{ 181 | margin:0 0 0 0; 182 | } 183 | 184 | .story h3{ 185 | font-size:1.15em; 186 | margin:0 0 1.5em 0; 187 | font-weight:normal; 188 | color:#CCC; 189 | } 190 | .story h3 a{ 191 | color:#CCC; 192 | text-decoration:none; 193 | border-bottom:1px dotted #666; 194 | } 195 | 196 | .story .details{ 197 | margin:1em 0; 198 | text-align:right; 199 | border-top:1px solid #333; 200 | padding:0.5em 0; 201 | font-size:0.95em; 202 | color:#4D4D4D; 203 | } 204 | .story .details .read-on{ 205 | background:url(/theme/images/readon_black.gif) 100% 60% no-repeat; 206 | padding-right:20px; 207 | } 208 | .story .details a{ 209 | color:#4D4D4D; 210 | text-decoration:none; 211 | } 212 | .story .details a:hover{ color:#FFF; } 213 | 214 | /* Single Post Styles */ 215 | 216 | #primary .primary{ 217 | float:right; 218 | width:65%; 219 | } 220 | #primary .secondary{ 221 | float:right; 222 | width:30%; 223 | margin-right:5%; 224 | padding-top:0.65em; 225 | display:inline; 226 | } 227 | * html #primary .secondary{ margin-right:4%; } 228 | 229 | .secondary .featured p{ 230 | border-bottom:1px solid #333333; 231 | border-top: 1px solid #333333; 232 | padding:0.5em 0 0.6em 0; 233 | line-height:1.5em; 234 | margin:1em 0 0 0; 235 | } 236 | .secondary .featured dl{ 237 | margin:0 0; 238 | border-bottom:1px solid #333333; 239 | padding:0.5em 0 0.6em 0; 240 | } 241 | .secondary dt{ 242 | display:inline; 243 | margin:0; 244 | padding:0; 245 | color:#AAA; 246 | } 247 | .secondary dd{ 248 | display:inline; 249 | margin:0; 250 | padding:0; 251 | } 252 | .secondary dd a{ color:#808080; } 253 | .secondary dd a:hover{ color:#FFF; } 254 | 255 | .single-post h1, .single-post h2{ margin-top:0; } 256 | 257 | /*----------------------------------------------------------------------------------------------- 258 | Secondary Items 259 | -----------------------------------------------------------------------------------------------*/ 260 | 261 | #secondary{ 262 | background:#0C0C0C; 263 | padding:1px 2em; 264 | border-top:1px solid #1C1C1C; 265 | } 266 | 267 | .comment-head{ 268 | border-bottom:1px solid #1C1C1C; 269 | padding:0.8em 2em 1.0em 2em; 270 | } 271 | .comment-head h2{ 272 | font-size:1.5em; 273 | margin:0; 274 | } 275 | .comment-head a{ 276 | text-decoration:none; 277 | color:#868686; 278 | } 279 | .comment-head .details{ 280 | font-size:0.95em; 281 | } 282 | 283 | ol#comments{ 284 | list-style-type:none; 285 | margin:2em 0; 286 | } 287 | ol#comments li{ 288 | list-style-type:none; 289 | margin:2em 0; 290 | } 291 | 292 | ol#comments li .avatar { 293 | border: 1px solid #222; 294 | padding: 2px; 295 | } 296 | 297 | #comments cite{ 298 | float:left; 299 | width:31%; 300 | font-style:normal; 301 | text-align:right; 302 | } 303 | * html #comments cite{ width:30.6%; } 304 | #comments cite span{ 305 | display:block; 306 | } 307 | #comments cite span.avatarspan{ float: left; } 308 | #comments cite .author{ font-size:1.2em; } 309 | #comments cite .author a{ 310 | text-decoration:none; 311 | } 312 | #comments cite .admin-tools{ 313 | margin:5px 0; 314 | } 315 | #comments cite .admin-tools a{ 316 | float:right; 317 | margin:0 5px; 318 | padding:0px 3px 3px; 319 | background:#666; 320 | border:1px solid #999; 321 | text-decoration:none; 322 | } 323 | #primary .secondary .admin-tools{ margin:1em 0; } 324 | 325 | #preview{ 326 | margin:1em 0; 327 | padding:0.5em; 328 | border:1px solid #333; 329 | } 330 | #preview p{ margin:1em 0 0 0; } 331 | #errors{ color:#FF0000; font-weight:bold; } 332 | 333 | #comments .pingback cite .author{ 334 | display:block; 335 | padding-top:68px; 336 | background:url(/theme/images/trackback_pingback.gif) 100% 0 no-repeat; 337 | } 338 | 339 | #comments .content{ 340 | float:left; 341 | width:60%; 342 | margin-left:1.9%; 343 | border-left:1px solid #868686; 344 | padding: 0 0 0 2%; 345 | } 346 | #comments .content p{ 347 | margin:0 0 1em 0; 348 | } 349 | #comments .content h3{ 350 | margin:0; 351 | font-size:1em; 352 | } 353 | 354 | #comment-form{ 355 | margin:5em 0 5em 35.4%; 356 | width:36em; 357 | } 358 | input.textfield{ 359 | width: 15em; 360 | margin:5px 0; 361 | } 362 | textarea.commentbox{ 363 | width:28em; 364 | height:10em; 365 | padding:0.25em; 366 | margin:5px 0; 367 | font-size:1.25em; 368 | font-family:Arial, Helvetica, sans-serif; 369 | } 370 | 371 | label.text{ 372 | position:relative; 373 | left:0.5em; 374 | top:-0.5em; 375 | } 376 | .formactions input.submit{ 377 | float:right; 378 | margin:-1em 0 0 0; 379 | padding:0 0.5em; 380 | } 381 | .formactions .spinner{ 382 | float:right; 383 | margin:-8px -20px 0 0; 384 | } 385 | 386 | /*----------------------------------------------------------------------------------------------- 387 | Ancillary Items 388 | -----------------------------------------------------------------------------------------------*/ 389 | 390 | #ancillary{ 391 | padding:2em 0 0 0; 392 | } 393 | #ancillary .block{ 394 | float:left; 395 | width: 46%; 396 | margin:0 0 0 5%; 397 | } 398 | #ancillary .twice-length{ width:65%; } 399 | #ancillary .thrice-length{ width:100%; } 400 | * html #ancillary .block{ 401 | margin:0 0 0 4%; 402 | } 403 | #ancillary .first, * html #ancillary .first{ 404 | clear:both; 405 | margin:0; 406 | } 407 | #ancillary .block-separator{ 408 | clear:both; 409 | height:2.5em; 410 | } 411 | 412 | #ancillary .block h2, #ancillary .block h3{ 413 | margin:0 0 2em 0; 414 | } 415 | 416 | ul.dates, ul.counts, ul.blogroll ul, ul.pages{ 417 | list-style-type:none; 418 | margin:1.5em 0 2em 0; 419 | border-top:1px solid #3D3D3D; 420 | } 421 | ul.dates li, ul.counts li, ul.blogroll ul li, ul.pages li{ 422 | list-style-type:none; 423 | margin:0; 424 | padding:0.5em 0; 425 | border-bottom:1px solid #3D3D3D; 426 | } 427 | ul.dates .date{ 428 | color:#858585; 429 | padding:0 1.5em 0 0; 430 | } 431 | 432 | ul.counts .count{ 433 | float:right; 434 | color:#858585; 435 | } 436 | 437 | ul.dates a, ul.counts a, ul.blogroll a, ul.pages a{ 438 | color:#BFBFBF; 439 | text-decoration:none; 440 | } 441 | ul.dates a:hover, ul.dates a:hover .date, ul.counts a:hover, ul.counts a:hover .count, ul.blogroll a:hover, ul.pages a:hover{ 442 | color:#FFF; 443 | } 444 | 445 | ul.blogroll{ margin-top:0; } 446 | ul.blogroll li{ 447 | list-style-type:none; 448 | margin:0; 449 | } 450 | 451 | ul.pages ul{ 452 | margin:0; 453 | } 454 | 455 | #ancillary .pages ul { 456 | margin-left: 15px; 457 | } 458 | 459 | ul.pages ul li{ 460 | border:none; 461 | margin-left:2em; 462 | list-style-type:square; 463 | } 464 | /*----------------------------------------------------------------------------------------------- 465 | Foooter 466 | -----------------------------------------------------------------------------------------------*/ 467 | 468 | #footer{ 469 | clear:both; 470 | color:#939393; 471 | margin:2em 0 3em 0; 472 | } 473 | #footer .inside{ 474 | background:url(/theme/images/footer_black.gif) 50% 0 repeat-x; 475 | padding:1em 0; 476 | } 477 | #footer p{ 478 | margin:0; 479 | font-size:0.95em; 480 | } 481 | #footer p.copyright{ float:left; } 482 | #footer p.attributes{ float:right; } 483 | #footer p.attributes a{ 484 | padding:0 0 0 1em; 485 | text-decoration:none; 486 | color:#525252; 487 | } 488 | #footer p.attributes a:hover{ 489 | color:#FFF; 490 | } 491 | 492 | /*----------------------------------------------------------------------------------------------- 493 | Search 494 | -----------------------------------------------------------------------------------------------*/ 495 | 496 | #search{ 497 | float:right; 498 | width:200px; 499 | margin:1em 0 0 0; 500 | -moz-opacity:0.4; 501 | text-align:right; 502 | } 503 | #search:hover{ 504 | -moz-opacity:1.0; 505 | } 506 | #search .searchimg{ 507 | float:left; 508 | width:14px; 509 | height:13px; 510 | background:url(/theme/images/search.gif) 0 0 no-repeat; 511 | position:relative; 512 | top:4px; 513 | } 514 | #search input{ 515 | width:175px; 516 | font-size: 0.85em; 517 | background:#CCC; 518 | margin-top:2px; 519 | } 520 | #search input:focus{ 521 | background:#FFF; 522 | } 523 | 524 | #searchform{ 525 | margin:1em 0; 526 | } 527 | 528 | #searchform #s{ 529 | background:#222; 530 | border:none; 531 | border-bottom:1px solid #333; 532 | width:30em; 533 | color:#666666; 534 | padding:0.25em; 535 | } 536 | 537 | #searchform #searchsubmit{ 538 | background:#000; 539 | color:#666; 540 | border:none; 541 | font-size:0.9em; 542 | text-transform:uppercase; 543 | letter-spacing:0.25em; 544 | } 545 | 546 | /* Legacy Typo CSS */ 547 | 548 | #search-results{ 549 | width:30%; 550 | background:#333; 551 | padding:0 0 0 0; 552 | float:right; 553 | -moz-opacity:0.9; 554 | border-top:1em solid #000; 555 | } 556 | #search-results h3{ 557 | font-weight:bold; 558 | text-align:left; 559 | margin:0; 560 | padding:0 0 1em 0; 561 | background:#000; 562 | 563 | } 564 | #search-results small{ 565 | display:block; 566 | text-align:left; 567 | font-size:0.9em; 568 | padding:0.5em 1em 0.7em 1em; 569 | border-top:1px solid #666; 570 | border-bottom:1px solid #555; 571 | } 572 | #search-results small a{ 573 | color:#CCC; 574 | } 575 | #search-results ul li{ 576 | list-style-type:none; 577 | padding:0 1em 0.5em 1em; 578 | margin:0.5em 0; 579 | } 580 | #search-results ul li:hover{ 581 | background:#202020; 582 | } 583 | #search-result ul{ margin:0; } 584 | #search-results ul li a{ 585 | text-decoration:none; 586 | border-bottom:1px dotted #CCC; 587 | } 588 | 589 | #search img.archives-icon{ 590 | margin:0 7px 0 0; 591 | top:1px; 592 | } 593 | 594 | img.centered, img.aligncenter { 595 | display: block; 596 | margin-left: auto; 597 | margin-right: auto; 598 | } 599 | 600 | img.alignright { 601 | padding: 4px; 602 | margin: 0 0 2px 7px; 603 | display: inline; 604 | } 605 | 606 | img.alignleft { 607 | padding: 4px; 608 | margin: 0 7px 2px 0; 609 | display: inline; 610 | } 611 | 612 | .alignright { 613 | float: right; 614 | } 615 | 616 | .alignleft { 617 | float: left; 618 | } 619 | .aligncenter, div.aligncenter { 620 | display: block; 621 | margin-left: auto; 622 | margin-right: auto; 623 | } 624 | 625 | .wp-caption { 626 | border: 1px solid #ddd; 627 | text-align: center; 628 | background-color: #f3f3f3; 629 | padding-top: 4px; 630 | margin: 10px; 631 | -moz-border-radius: 3px; 632 | -khtml-border-radius: 3px; 633 | -webkit-border-radius: 3px; 634 | border-radius: 3px; 635 | } 636 | 637 | .wp-caption img { 638 | margin: 0; 639 | padding: 0; 640 | border: 0 none; 641 | } 642 | 643 | .wp-caption p.wp-caption-text { 644 | font-size: 11px; 645 | color: #000; 646 | line-height: 17px; 647 | padding: 0 4px 5px; 648 | margin: 0; 649 | } 650 | 651 | #body_content_right { 652 | float: left; 653 | width: 49%; 654 | } 655 | 656 | #body_content_left { 657 | float: right; 658 | width: 49% 659 | } 660 | 661 | 662 | /* 663 | Firefox Dotted Line Fix 664 | - http://sonspring.com/journal/removing-dotted-links 665 | */ 666 | a:focus { 667 | outline: none; 668 | } 669 | 670 | /* 671 | Clearfix docs 672 | - Main docs: http://positioniseverything.net/easyclearing.html 673 | - IE7 change: http://www.456bereastreet.com/archive/200603/new_clearing_method_needed_for_ie7/ 674 | */ 675 | .clearfix:after { 676 | content: "."; 677 | display: block; 678 | height: 0; 679 | clear: both; 680 | visibility: hidden; 681 | } 682 | .clearfix { 683 | display: inline-block; 684 | } 685 | 686 | /* Hide from IE Mac \*/ 687 | .clearfix { 688 | display:block; 689 | } 690 | /* End hide from IE Mac */ 691 | 692 | 693 | .inquiries form label { 694 | display: block; 695 | 696 | } 697 | 698 | .inquiries .field { 699 | margin: 12px 0px; 700 | } 701 | 702 | .inquiries form { 703 | padding-top: 12px; 704 | } 705 | 706 | .page_not_live { 707 | border: 1px solid #A00027; 708 | color: #A00027; 709 | background: #FFB1B1; 710 | padding:3px 9px; 711 | font-weight:bold; 712 | width:auto; 713 | } 714 | --------------------------------------------------------------------------------