layout_generators 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile ADDED
@@ -0,0 +1,24 @@
1
+ h2. LICENSE:
2
+
3
+ (The MIT License)
4
+
5
+ Copyright (c) 2008 FIX
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining
8
+ a copy of this software and associated documentation files (the
9
+ 'Software'), to deal in the Software without restriction, including
10
+ without limitation the rights to use, copy, modify, merge, publish,
11
+ distribute, sublicense, and/or sell copies of the Software, and to
12
+ permit persons to whom the Software is furnished to do so, subject to
13
+ the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,14 @@
1
+ begin
2
+ require 'jeweler'
3
+ Jeweler::Tasks.new do |gemspec|
4
+ gemspec.name = "layout_generators"
5
+ gemspec.summary = "A series of generators for various layouts"
6
+ gemspec.description = "Describe your gem"
7
+ gemspec.email = "christopher.roby@gmail.com"
8
+ gemspec.homepage = "http://github.com/croby/layout_generators"
9
+ gemspec.authors = ["Chris Roby"]
10
+ end
11
+ Jeweler::GemcutterTasks.new
12
+ rescue LoadError
13
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
14
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,2 @@
1
+ module LayoutGenerators
2
+ end
@@ -0,0 +1,10 @@
1
+ /** Begin Main Layout **/
2
+ html{height:100%;}
3
+ body{width:100%;height:100%;background-color:#fff;color:#000;min-width:960px;}
4
+ div#container{position:relative;min-height:100%;text-align:left;top:0px;left:0px;width:100%;min-width:960px;}
5
+ * html div#container{height:100%;}
6
+ div#content{position:relative;float:left;width:960px;min-width:960px;padding-bottom:340px;left:50%;margin-left:-480px;display:inline;clear:both;}
7
+ div#header{position:relative;width:100%;height:42px;padding-top:12px;margin-bottom:20px;}
8
+ div#main{position:relative;width:960px;left:50%;margin-left:-480px;}
9
+ div#footer_container{position:relative;float:left;width:100%;height:100px;margin-top:-100px;}
10
+ div#footer{position:relative;width:960px;height:100px;left:50%;margin-left:-480px;top:100px;}
@@ -0,0 +1,27 @@
1
+ <!DOCTYPE html
2
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <title><%= yield :title or ""%></title>
7
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
8
+ <%= stylesheet_link_tag "reset" %>
9
+ <%= javascript_include_tag :defaults %>
10
+ <%= yield :head %>
11
+ </head>
12
+ <body>
13
+ <div id="container">
14
+ <div id="content">
15
+ <div id="header">
16
+ </div>
17
+ <div id="main">
18
+ <%= yield :main or yield %>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <div id="footer_container">
23
+ <div id="footer">
24
+ </div>
25
+ </div>
26
+ </body>
27
+ </html>
@@ -0,0 +1,120 @@
1
+ /*
2
+ Copyright (c) 2009,Yahoo! Inc. All rights reserved.
3
+ Code licensed under the BSD License:http://developer.yahoo.net/yui/license.txt
4
+ version:2.8.0r4
5
+ */
6
+ /**
7
+ * YUI Reset
8
+ * @module reset
9
+ * @namespace
10
+ * @requires
11
+ */
12
+ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}
13
+ table{border-collapse:collapse;border-spacing:0;}
14
+ fieldset,img{border:0;}
15
+ address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
16
+ ol,ul{list-style:none;}
17
+ caption,th{text-align:left;}
18
+ h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
19
+ q:before,q:after{content:'';}
20
+ abbr,acronym{border:0;}
21
+ /*
22
+ Copyright (c) 2009,Yahoo! Inc. All rights reserved.
23
+ Code licensed under the BSD License:http://developer.yahoo.net/yui/license.txt
24
+ version:2.8.0r4
25
+ */
26
+ /**
27
+ * YUI Fonts
28
+ * @module fonts
29
+ * @namespace yui-
30
+ * @requires
31
+ */
32
+ /**
33
+ * Percents could work for IE,but for backCompat purposes,we are using keywords.
34
+ * x-small is for IE6/7 quirks mode.
35
+ */
36
+ body{font:13px/1.231 arial,helvetica,clean,sans-serif;/* for IE6/7 */
37
+ *font-size:small;/* for IE Quirks Mode */
38
+ *font:x-small;}
39
+ /**
40
+ * Nudge down to get to 13px equivalent for these form elements
41
+ */
42
+ select,
43
+ input,
44
+ button,
45
+ textarea,
46
+ button{font:99% arial,helvetica,clean,sans-serif;}
47
+ /**
48
+ * To help tables remember to inherit
49
+ */
50
+ table{font-size:inherit;font:100%;}
51
+ /**
52
+ * Bump up IE to get to 13px equivalent for these fixed-width elements
53
+ */
54
+ pre,
55
+ code,
56
+ kbd,
57
+ samp,
58
+ tt{font-family:monospace;*font-size:108%;line-height:100%;}
59
+ /*
60
+ Copyright (c) 2009,Yahoo! Inc. All rights reserved.
61
+ Code licensed under the BSD License:http://developer.yahoo.net/yui/license.txt
62
+ version:2.8.0r4
63
+ */
64
+ /**
65
+ * YUI Base
66
+ * @module base
67
+ * @namespace yui-
68
+ * @requires reset,fonts
69
+ */
70
+ body{/* For breathing room between content and viewport. */
71
+ margin:10px;}
72
+ h1{/* 18px via YUI Fonts CSS foundation. */
73
+ font-size:138.5%;}
74
+ h2{/* 16px via YUI Fonts CSS foundation. */
75
+ font-size:123.1%;}
76
+ h3{/* 14px via YUI Fonts CSS foundation. */
77
+ font-size:108%;}
78
+ h1,h2,h3{/* Top & bottom margin based on font size. */
79
+ margin:1em 0;}
80
+ h1,h2,h3,h4,h5,h6,strong,dt{/* Bringing boldness back to headers and the strong element. */
81
+ font-weight:bold;}
82
+ optgroup{font-weight:normal;}
83
+ abbr,acronym{/* Indicating to users that more info is available. */
84
+ border-bottom:1px dotted #000;cursor:help;}
85
+ em{/* Bringing italics back to the em element. */
86
+ font-style:italic;}
87
+ del{/* Striking deleted phrases. */
88
+ text-decoration:line-through;}
89
+ blockquote,ul,ol,dl{/* Giving blockquotes and lists room to breath. */
90
+ margin:1em;}
91
+ ol,ul,dl{/* Bringing lists on to the page with breathing room. */
92
+ margin-left:2em;}
93
+ ol li{/* Giving OL's LIs generated numbers. */
94
+ list-style:decimal outside;}
95
+ ul li{/* Giving UL's LIs generated disc markers. */
96
+ list-style:disc outside;}
97
+ dl dd{/* Giving UL's LIs generated numbers. */
98
+ margin-left:1em;}
99
+ th,td{/* Borders and padding to make the table readable. */
100
+ border:1px solid #000;padding:.5em;}
101
+ th{/* Distinguishing table headers from data cells. */
102
+ font-weight:bold;text-align:center;}
103
+ caption{/* Coordinated margin to match cell's padding. */
104
+ margin-bottom:.5em;/* Centered so it doesn't blend in to other content. */
105
+ text-align:center;}
106
+ sup{/* to preserve line-height and selector appearance */
107
+ vertical-align:super;}
108
+ sub{/* to preserve line-height and selector appearance */
109
+ vertical-align:sub;}
110
+ p,
111
+ fieldset,
112
+ table,
113
+ pre{/* So things don't run into each other. */
114
+ margin-bottom:1em;}
115
+ /* Opera requires 1px of passing to render with contemporary native chrome */
116
+ button,
117
+ input[type="checkbox"],
118
+ input[type="radio"],
119
+ input[type="reset"],
120
+ input[type="submit"]{padding:1px;}
@@ -0,0 +1,21 @@
1
+ class XhtmlStrictGenerator < Rails::Generator::Base
2
+ def initialize(runtime_args, runtime_options = {})
3
+ super
4
+ @name = @args.first || 'application'
5
+ end
6
+
7
+ def manifest
8
+ record do |m|
9
+ m.directory 'app/views/layouts'
10
+ m.directory 'public/stylesheets'
11
+
12
+ m.template "application.html.erb", "app/views/layouts/#{file_name}.html.erb"
13
+ m.file "application.css", "public/stylesheets/#{file_name}.css"
14
+ m.file "reset.css", "public/stylesheets/#{file_name}.css"
15
+ end
16
+ end
17
+
18
+ def file_name
19
+ @name.underscore
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: layout_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roby
@@ -13,23 +13,30 @@ date: 2009-11-05 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description:
16
+ description: Describe your gem
17
17
  email: christopher.roby@gmail.com
18
18
  executables: []
19
19
 
20
20
  extensions: []
21
21
 
22
- extra_rdoc_files: []
23
-
24
- files: []
25
-
22
+ extra_rdoc_files:
23
+ - README.textile
24
+ files:
25
+ - README.textile
26
+ - Rakefile
27
+ - VERSION
28
+ - lib/layout_generators.rb
29
+ - rails_generators/xhtml_strict/templates/application.css
30
+ - rails_generators/xhtml_strict/templates/application.html.erb
31
+ - rails_generators/xhtml_strict/templates/reset.css
32
+ - rails_generators/xhtml_strict/xhtml_strict_generator.rb
26
33
  has_rdoc: true
27
34
  homepage: http://github.com/croby/layout_generators
28
35
  licenses: []
29
36
 
30
37
  post_install_message:
31
- rdoc_options: []
32
-
38
+ rdoc_options:
39
+ - --charset=UTF-8
33
40
  require_paths:
34
41
  - lib
35
42
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -46,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
46
53
  version:
47
54
  requirements: []
48
55
 
49
- rubyforge_project: layout_generators
56
+ rubyforge_project:
50
57
  rubygems_version: 1.3.5
51
58
  signing_key:
52
59
  specification_version: 3