layout_mollio_generator 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/USAGE ADDED
@@ -0,0 +1,23 @@
1
+ layout_mollio places a copy of the Mollio CSS/HTML templates
2
+ (http://www.mollio.org/) in your application and generates the layout and
3
+ necessary partials for you. Your Rails application will look instantly
4
+ great with Mollio's good design.
5
+
6
+ To use the generator, simply supply the name of the controller, then the
7
+ type of the Mollio layout (current six types are available, from type-a to
8
+ type-f). Some Mollio layouts supply sidebar and utility areas. For those
9
+ layouts you need to supply another two names for the partials.
10
+
11
+ For example, if we want to genrate a type-f layout for our Store controller,
12
+ just type:
13
+
14
+ script/generate layout_mollio Store type-f sidebar utility
15
+
16
+ Then in your app/views/layouts/ you'll fine Store.rhtml generated for you
17
+ and two partials, _sidebar.rhtml and _utility.rhtml, residing in
18
+ app/views/store/
19
+
20
+ This generator is prepared by Lukhnos D. Liu (lukhnos{at}gmail.com). For
21
+ more information on Mollio (and the terms of using and distributing it)
22
+ and on the available layouts, please visit http://mollio.org
23
+
@@ -0,0 +1,87 @@
1
+ class LayoutMollioGenerator < Rails::Generator::NamedBase
2
+ MOLLIO = 'mollio_version1.1'
3
+
4
+ def initialize(*runtime_args)
5
+ # puts runtime_args.to_yaml
6
+ # x = runtime_args.shift
7
+ # puts x, "---->"
8
+ # puts inflect_names(x).to_yaml
9
+ super(*runtime_args)
10
+
11
+ @controller = singular_name
12
+ @type = args.shift || "type-a"
13
+ @partial_left = args.shift || "partial_first"
14
+ @partial_right = args.shift || "partial_second"
15
+ # puts [@type, @partial_1st, @partial_2nd].to_yaml
16
+ end
17
+
18
+ def banner
19
+ "Usage: #{$0} layout_mollio ControllerName [type] [1st_partial] [2nd_partial]"
20
+ end
21
+
22
+ private
23
+ def fjoin(array, fn=nil)
24
+ x = array.clone
25
+ File.join(fn ? x << fn : x)
26
+ end
27
+
28
+ def manifest
29
+
30
+
31
+ record do |m|
32
+ psm = ['public', 'stylesheets', 'mollio']
33
+ psmi = ['public', 'stylesheets', 'mollio', 'images']
34
+ pjm = ['public', 'javascripts', 'mollio']
35
+ avl = ['app', 'views', 'layouts']
36
+ avc = ['app', 'views', @controller]
37
+ css = [MOLLIO, 'css']
38
+ js = [MOLLIO, 'js']
39
+ img = [MOLLIO, 'css', 'images']
40
+
41
+ m.directory fjoin(psm)
42
+ m.directory fjoin(psmi)
43
+ m.directory fjoin(pjm)
44
+ m.directory fjoin(avl)
45
+ m.directory fjoin(avc)
46
+
47
+ m.file fjoin(css, 'main.css'), fjoin(psm, 'main.css')
48
+ m.file fjoin(css, 'print.css'), fjoin(psm, 'print.css')
49
+ m.file fjoin(css, 'ie6_or_less.css'), fjoin(psm, 'ie6_or_less.css')
50
+ m.file fjoin(js, 'common.js'), fjoin(pjm, 'common.js')
51
+
52
+ imgfiles = %w(2nd_nav_bg.gif body_bg.gif content_wrap_bg.gif content_wrap_e_bg.gif featurebox2_bg.gif featurebox_bg.gif header_bg.gif sprites.gif td_bg.gif)
53
+ imgfiles.each { |x| m.file fjoin(img, x), fjoin(psmi, x) }
54
+
55
+ case @type
56
+ when "type-b"
57
+ layout_params = { :type_left => "utility", :type_right => nil }
58
+ when "type-c"
59
+ layout_params = { :type_left => "utility", :type_right => "sidebar" }
60
+ when "type-d"
61
+ layout_params = { :type_left => nil, :type_right => "sidebar" }
62
+ @partial_right = @partial_left
63
+ when "type-e"
64
+ layout_params = { :type_left => nil, :type_right => "utility" }
65
+ @partial_right = @partial_left
66
+ when "type-f"
67
+ layout_params = { :type_left => "sidebar", :type_right => "utility" }
68
+ else # "type-a"
69
+ @type = "type-a"
70
+ layout_params = { :type_left => nil, :type_right => nil}
71
+ end
72
+
73
+ layout_params.merge! ({:type => @type, :partial_left => @partial_left, :partial_right => @partial_right })
74
+
75
+ m.template 'layout.rhtml', fjoin(avl, "#{@controller}.rhtml"), :assigns => layout_params
76
+
77
+ if layout_params[:type_left]
78
+ m.template 'partial.rhtml', fjoin(avc, "_#{@partial_left}.rhtml"), :assigns => {:name => @partial_left, :type=>layout_params[:type_left] }
79
+ end
80
+
81
+ if layout_params[:type_right]
82
+ m.template 'partial.rhtml', fjoin(avc, "_#{@partial_right}.rhtml"), :assigns => {:name => @partial_right, :type=>layout_params[:type_right] }
83
+ end
84
+
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,9 @@
1
+ module LayoutMollioGenerator #:nodoc:
2
+ module VERSION #:nodoc:
3
+ MAJOR = 0
4
+ MINOR = 9
5
+ TINY = 0
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ Dir[File.join(File.dirname(__FILE__), 'layout_mollio_generator/**/*.rb')].sort.each { |lib| require lib }
@@ -0,0 +1,48 @@
1
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2
+ <html lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5
+ <title><%%= controller.action_name %></title>
6
+ <%%= stylesheet_link_tag "mollio/main", :media => "screen" %>
7
+ <%%= stylesheet_link_tag "mollio/print", :media => "print" %>
8
+ <!--[if lte IE 6]>
9
+ <%%= stylesheet_link_tag "mollio/ie6_or_less" %>
10
+ <![endif]-->
11
+ <%%= javascript_include_tag :defaults %>
12
+ <%%= javascript_include_tag "mollio/common" %>
13
+ </head>
14
+ <body id="<%= type %>">
15
+ <div id="wrap">
16
+ <div id="header">
17
+ <div id="site-name"><!-- Site name --></div>
18
+ <div id="search">
19
+ <!-- search -->
20
+ </div>
21
+ <ul id="nav">
22
+ <!-- navigation menu -->
23
+ </ul>
24
+ </div>
25
+ <div id="content-wrap">
26
+ <%- if type_left -%>
27
+ <div id="<%= type_left %>">
28
+ <%%= render :partial => <%= "\"#{partial_left}\""%> %>
29
+ </div>
30
+ <%- end -%>
31
+ <div id="content">
32
+ <%%= yield %>
33
+ <div id="footer">
34
+ <!-- footer -->
35
+ </div>
36
+ <div id="poweredby">
37
+ <!-- powered by -->
38
+ </div>
39
+ </div>
40
+ <%- if type_right -%>
41
+ <div id="<%= type_right %>">
42
+ <%%= render :partial => <%= "\"#{partial_right}\""%> %>
43
+ </div>
44
+ <%- end -%>
45
+ </div>
46
+ </div>
47
+ </body>
48
+ </html>
@@ -0,0 +1,26 @@
1
+ /*
2
+ LEGAL
3
+ =====
4
+ Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au
5
+ Community: Mollio http://www.mollio.org $
6
+ License: Released Under the "Common Public License 1.0",
7
+ http://www.opensource.org/licenses/cpl.php
8
+ License: Released Under the "Creative Commons License",
9
+ http://creativecommons.org/licenses/by/2.5/
10
+ License: Released Under the "GNU Creative Commons License",
11
+ http://creativecommons.org/licenses/GPL/2.0/
12
+ */
13
+
14
+ #header {width:100%}
15
+
16
+ #nav-secondary a {width:143px}
17
+
18
+ #resultslist-wrap li dl {display:inline}
19
+
20
+
21
+ /*
22
+ I've added position:relative to these items below to fix the IE Peakaboo bug.
23
+ more about it here: http://www.positioniseverything.net/explorer/peekaboo.html
24
+ */
25
+ ol.code, .featurebox, #content ul, #sidebar ul {position:relative}
26
+
@@ -0,0 +1,288 @@
1
+ /*
2
+ LEGAL
3
+ =====
4
+ Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au
5
+ Community: Mollio http://www.mollio.org $
6
+ License: Released Under the "Common Public License 1.0",
7
+ http://www.opensource.org/licenses/cpl.php
8
+ License: Released Under the "Creative Commons License",
9
+ http://creativecommons.org/licenses/by/2.5/
10
+ License: Released Under the "GNU Creative Commons License",
11
+ http://creativecommons.org/licenses/GPL/2.0/
12
+ */
13
+
14
+ /* THE BIG GUYS */
15
+ * {margin:0;padding:0}
16
+ body {padding: 0 0 20px;background: #fff url("images/body_bg.gif") repeat-x 0 100%;color:#333;font:83%/1.5 arial,tahoma,verdana,sans-serif}
17
+
18
+ /* LINKS */
19
+ a,a:link,a:link,a:link,a:hover {background:transparent;text-decoration:underline;cursor:pointer}
20
+ a:link {color:#c00}
21
+ a:visited {color:#999}
22
+ a:hover,a:active {color:#069}
23
+
24
+ /* FORMS */
25
+ form {margin: 0 0 1.5em}
26
+ input {font-family: arial,tahoma,verdana,sans-serif;margin: 2px 0}
27
+ fieldset {border: none}
28
+ label {display:block;padding: 5px 0}
29
+ label br {clear:left}
30
+
31
+ /* FORMS - general classes */
32
+ input.f-submit {padding: 1px 3px;background:#666;color:#fff;font-weight:bold;font-size:96%}
33
+
34
+ /* FORMS - f-wrap-1 - simple form, headings on left, form elements on right */
35
+ form.f-wrap-1 {width:100%;padding: .5em 0;background: #f6f6f6 url("images/featurebox_bg.gif") no-repeat 100% 100%;border-top: 1px solid #d7d7d7;position:relative}
36
+ form.f-wrap-1 fieldset {width:auto;margin: 0 1em}
37
+ form.f-wrap-1 h3 {margin:0 0 .6em;font: bold 155% arial;color:#c00}
38
+ form.f-wrap-1 label {clear:left;float:left;width:100%;border-top: 1px solid #fff}
39
+
40
+ /* hide from IE mac \*/
41
+ form.f-wrap-1 label {float:none}
42
+ /* end hiding from IE5 mac */
43
+
44
+ form.f-wrap-1 label input, form.f-wrap-1 label textarea, form.f-wrap-1 label select {width:15em;float:left;margin-left:10px}
45
+
46
+ form.f-wrap-1 label b {float:left;width:8em;line-height: 1.7;display:block;position:relative}
47
+ form.f-wrap-1 label b .req {color:#c00;font-size:150%;font-weight:normal;position:absolute;top:-.1em;line-height:1;left:-.4em;width:.3em;height:.3em}
48
+ form.f-wrap-1 div.req {color:#666;font-size:96%;font-weight:normal;position:absolute;top:.4em;right:.4em;left:auto;width:13em;text-align:right}
49
+ form.f-wrap-1 div.req b {color:#c00;font-size:140%}
50
+ form.f-wrap-1 label select {width: 15.5em}
51
+ form.f-wrap-1 label textarea.f-comments {width: 20em}
52
+ form.f-wrap-1 div.f-submit-wrap {padding: 5px 0 5px 8em}
53
+ form.f-wrap-1 input.f-submit {margin: 0 0 0 10px}
54
+
55
+ form.f-wrap-1 fieldset.f-checkbox-wrap, form.f-wrap-1 fieldset.f-radio-wrap {clear:left;float:left;width:32em;border:none;margin:0;padding-bottom:.7em}
56
+ form.f-wrap-1 fieldset.f-checkbox-wrap b, form.f-wrap-1 fieldset.f-radio-wrap b {float:left;width:8em;line-height: 1.7;display:block;position:relative;padding-top:.3em}
57
+ form.f-wrap-1 fieldset.f-checkbox-wrap fieldset, form.f-wrap-1 fieldset.f-radio-wrap fieldset {float:left;width:13em;margin: 3px 0 0 10px}
58
+ form.f-wrap-1 fieldset.f-checkbox-wrap label, form.f-wrap-1 fieldset.f-radio-wrap label {float:left;width:13em;border:none;margin:0;padding:2px 0;margin-right:-3px}
59
+ form.f-wrap-1 label input.f-checkbox, form.f-wrap-1 label input.f-radio {width:auto;float:none;margin:0;padding:0}
60
+
61
+ form.f-wrap-1 label span.errormsg {position:absolute;top:0;right:-10em;left:auto;display:block;width:16em;background: transparent url(images/errormsg_bg.gif) no-repeat 0 0}
62
+ form.f-wrap-1 label span.errormsg b {padding: 10px 0;margin: 0 10px 0 30px;color:#B30800;font-weight:bold;display:block;width:auto;float:none;line-height:1.3}
63
+
64
+ /* TYPOGRAPHY */
65
+ p, ul, ol {margin: 0 0 1.5em}
66
+ h1, h2, h3, h4, h5, h6 {letter-spacing: -1px;font-family: arial,verdana,sans-serif;margin: 1.2em 0 .3em;color:#000;border-bottom: 1px solid #eee;padding-bottom: .1em}
67
+ h1 {font-size: 196%;margin-top:.6em}
68
+ h2 {font-size: 136%}
69
+ h3 {font-size: 126%}
70
+ h4 {font-size: 116%}
71
+ h5 {font-size: 106%}
72
+ h6 {font-size: 96%}
73
+ .highlight {color:#E17000}
74
+ .subdued {color:#999}
75
+ .error {color:#c00;font-weight:bold}
76
+ .success {color:#390;font-weight:bold}
77
+ .caption {color:#999;font-size:11px}
78
+ .date {font: bold 82% arial;color:#bbb;display:block;letter-spacing: 1px}
79
+ small {font-size:11px}
80
+
81
+ /* LISTS */
82
+ ul {margin: .3em 0 1.5em 0;list-style-type:none}
83
+ ul.related {margin-top: -1em}
84
+ ol {margin: .5em .5em 1.5em}
85
+ ol li {margin-left: 1.4em;padding-left: 0;background: none; list-style-type: decimal}
86
+ li {line-height: 1.4em;padding-left: 25px;background: transparent url("images/sprites.gif") no-repeat 0 0}
87
+ li.doc {background-position: 3px -500px}
88
+ ul.nomarker li {background:none;padding-left:0}
89
+
90
+ dl {margin: 0 0 1em 0}
91
+ dt {font-weight:bold;margin-top: 1.3em}
92
+ dl dl {margin: 0 0 1.5em 30px}
93
+
94
+ /* GENERAL */
95
+ img {border:none}
96
+ hr {margin: 1em 0;background:#f2f2f2;height:1px;color:#f2f2f2;border:none;clear:both}
97
+ .clear {clear:both;position:relative;font-size:0px;height:0px;line-height:0px}
98
+
99
+ /* LAYOUT - HEADER */
100
+ #header {background: #666 url("images/sprites.gif") repeat-x 0 100%;margin: 0 0 25px;padding: 0 0 8px}
101
+
102
+ #header #site-name {font: 265% arial;letter-spacing: -.05em;margin:0 0 0 40px;padding:3px 0;color:#ccc;border:none}
103
+
104
+ /* NAV - top horizontal nav */
105
+ #nav, #nav ul {padding: 0;margin: 0;list-style: none}
106
+ #nav {font-weight:bold;height:2.09em;font: bold 96% arial;margin: 0 105px 0 40px}
107
+ #nav li {position:relative;background: #999;float: left;width: 10em;display:block;margin: 0;border-bottom: 3px solid #666;border-right: 3px solid #252525;padding:0}
108
+ #nav a, #nav a:link, #nav a:visited, #nav a:hover, #nav a:active {text-decoration:none;cursor:pointer;color:#fff;display: block;padding: 4px 10px 2px}
109
+ #nav a:hover {color:#000}
110
+
111
+ #nav li ul {border-left: 1px solid #c00;background: #f6f6f6 url("images/featurebox_bg.gif") no-repeat 100% 100%;width:15.8em;font-size:90%;margin-top:3px;position: absolute;font-weight:normal;left: -999em}
112
+ #nav li:hover ul, #nav li.sfhover ul {left: 0;z-index:99999}
113
+
114
+ #nav li li {background:none;float:none;border:none;border: 1px solid #999;border-top:1px solid #fff;border-right:none;border-left:none;padding-left:0}
115
+ #nav li li.last {border-bottom:none}
116
+ #nav li li a, #nav li li a:link, #nav li li a:visited, #nav li li a:hover {color:#000;padding: 3px 10px 2px;width:14em}
117
+ #nav li li a:hover {color:#fff;background:#c00}
118
+
119
+ #nav li.active {background: #c00;border-bottom: 3px solid #c00}
120
+ #nav li.active ul {border:none;background: #c00 url("images/featurebox2_bg.gif") no-repeat 100% 100%}
121
+ #nav li.active a:link, #nav li.active a:visited, #nav li.active a:hover, #nav li.active a:active {}
122
+ #nav li.active a:hover {color:#000}
123
+
124
+ #nav li.active li {border:none;border-top: 1px solid #c15c5c;border-bottom: 1px solid #870000}
125
+ #nav li.active li.last {border-bottom: none}
126
+ #nav li.active li a:link, #nav li.active li a:visited, #nav li.active li a:hover, #nav li.active li a:active {color:#fff}
127
+ #nav li.active li a:hover {background: #666 url("images/sprites.gif") repeat-x 0 99%;color:#fff}
128
+
129
+ #nav li.active li.active a:link, #nav li.active li.active a:visited, #nav li.active li.active a:hover, #nav li.active li.active a:active {color:#fff;font-weight:bold;background: #666 url("images/sprites.gif") repeat-x 0 99%}
130
+
131
+ /* hide from IE mac \*/
132
+ #nav li {width:auto}
133
+ /* end hiding from IE5 mac */
134
+
135
+ /* SEARCH */
136
+ #search {color:#fff;font-weight:bold;position:absolute;top:10px;right:110px;left:auto;width:18em}
137
+ #search form {margin:0}
138
+ #search input {width:8em;margin: 0 0 -1px;height:1.2em}
139
+ #search label {padding:5px 0 0;display:inline}
140
+ #search input.f-submit {width:auto;font-size:81%;margin:0 0 -.15em;height:1.95em}
141
+
142
+ /* POWERED BY - mollio logo in this case */
143
+ #poweredby {width:96px;height:63px;position:absolute;top:-102px;right:0}
144
+
145
+ /* LAYOUT - main body of page */
146
+ #wrap {min-width:770px;max-width:1200px;margin: 0 auto;position:relative}
147
+ #content-wrap {position:relative;width:100%}
148
+ #utility {position:absolute;top:0;left:25px;width:165px;border-top: 5px solid #999;padding-bottom: 40px}
149
+ #sidebar {position:absolute;top:0;right:25px;width:20%;border-top: 5px solid #999;padding-top: 1px;padding-bottom: 40px}
150
+
151
+ #content {margin: 0 50px}
152
+ #content #breadcrumb {margin-top:-5px;font-size:93%;font-weight:bold}
153
+ #content #breadcrumb a:link, #content #breadcrumb a:visited {text-decoration:none}
154
+ #content #breadcrumb a:hover, #content #breadcrumb a:active {text-decoration:underline}
155
+
156
+ .featurebox {color:#333;padding: 15px 20px 20px;border-top: 1px solid #d7d7d7;margin: 0 0 1.5em;background: #f6f6f6 url("images/featurebox_bg.gif") no-repeat 100% 100%}
157
+ .featurebox p, .featurebox h1, .featurebox h2, .featurebox h3, .featurebox h4, .featurebox h5, .featurebox h6 {margin: 0 0 .3em;border-bottom: 1px solid #c00;color:#c00}
158
+ .featurebox p {border:none;margin: 0 0 1em;color:#444}
159
+ .featurebox a {font-weight:bold}
160
+
161
+ .thumbnail {margin: 0 0 0 10px;position:relative;z-index:9999;border: 1px solid #eee;float:right;width:100px;padding:5px;background:#fff}
162
+ .thumbnail img {border: 1px solid #000}
163
+
164
+ .pagination {background: #f2f2f2;color:#666;padding: 4px 2px 4px 7px;border: 1px solid #ddd;margin: 0 0 1.5em}
165
+ .pagination p {position:relative;text-align:right}
166
+ .pagination p a:link, .pagination p a:visited, .pagination p a:hover, .pagination p a:active {text-decoration:none;background:#fff;padding:2px 5px;border: 1px solid #ccc}
167
+ .pagination p a:hover {background:#c00;color:#fff}
168
+ .pagination p span {text-decoration:none;background:#fff;padding:2px 5px;border: 1px solid #ccc;color:#ccc}
169
+ .pagination * {margin:0}
170
+ .pagination h4 {margin-top:-1.45em;padding:0;border:none}
171
+
172
+ #resultslist-wrap {margin: 0 0 1.5em;font-size:92%}
173
+ #resultslist-wrap dt, #resultslist-wrap dl {margin: 0}
174
+ #resultslist-wrap dt {font: bold 85% arial;padding: 3px 0}
175
+ #resultslist-wrap li {padding: 0 0 1em;margin:0 0 0 1.2em;font: bold 145% arial}
176
+ #resultslist-wrap li dd {font: normal 73% arial}
177
+ #resultslist-wrap li dl {margin:0}
178
+ #resultslist-wrap dd {line-height:1.3}
179
+ #resultslist-wrap dd.filetype, #resultslist-wrap dd.date {color:#999;display:inline;padding-right:.5em}
180
+
181
+ /* TABLES */
182
+ .table1 {border: 2px solid #900;border-collapse:collapse;width:100%}
183
+ .table1 td {background: #fff url("images/sprites.gif") repeat-x 0 -1600px;padding:3px;border: 1px solid #fff}
184
+ .table1 th {text-align:left;border: 1px solid #fff}
185
+ .table1 thead th {color:#fff;font-size:145%;background: #900 url("images/sprites.gif") repeat-x 0 -1300px;padding: 10px 6px}
186
+ .table1 tbody th {color:#fff;font-size:115%;background: #88b8db url("images/sprites.gif") repeat-x 0 -1400px;padding: 6px}
187
+ .table1 tbody th.sub {font-size:100%;color:#000;background: #efefef url("images/sprites.gif") repeat-x 0 -1500px;padding: 6px}
188
+
189
+ /* TABLES - calendar */
190
+ .calendar {width:200px;font-size:92%}
191
+ .calendar td {text-align:center;border: 1px solid #ddd}
192
+ .calendar th {text-align:center}
193
+ .calendar thead th {padding: 3px 2px}
194
+ .calendar tbody th {padding: 2px}
195
+ .calendar tbody th.sub {padding: 2px}
196
+
197
+ /* 'MORE' LINK - provides an accessible alternative to just using 'more' as a link at the end of paragraphs */
198
+ a.morelink:link, a.morelink:visited, a.morelink:hover, a.morelink:active {background: transparent url("images/sprites.gif") no-repeat 5px -500px;padding-left:21px}
199
+ a.morelink:hover {background: transparent url("images/sprites.gif") 5px -400px}
200
+ .morelink span {position:absolute;left:-9999px;width:900px}
201
+
202
+ /* CODE - formatting for code inserted into body - more here: http://dizque.lacalabaza.net/temp/lipt/ */
203
+ ol.code {font-family: monospace;position:relative}
204
+ ol.code li {color: #666;margin-bottom: 1px}
205
+ ol.code code {color: #000;display: block}
206
+ ol.code .cmt {color: #4077d2}
207
+ li.tab0 code {padding-left: 4em}
208
+ li.tab1 code {padding-left: 8em}
209
+ li.tab2 code {padding-left: 12em}
210
+ li.tab3 code {padding-left: 16em}
211
+ li.tab4 code {padding-left: 20em}
212
+ li.tab5 code {padding-left: 24em}
213
+ ol.code li {background: #f3f3f3 url("images/td_bg.gif") no-repeat 100% 100%}
214
+ p.note {margin: 1em;border: 1px solid #ddd;background: #f0f0f0;padding: 1em}
215
+
216
+ /* LAYOUT TYPE B */
217
+ #type-b #content-wrap {background: transparent url("images/content_wrap_bg.gif") repeat-y 30px 0}
218
+ #type-b #content {margin: 0 23px 0 235px}
219
+
220
+ /* LAYOUT TYPE C */
221
+ #type-c #content-wrap {background: transparent url("images/content_wrap_bg.gif") repeat-y 30px 0}
222
+ #type-c #content {margin: 0 25% 0 235px}
223
+
224
+ /* LAYOUT TYPE D */
225
+ #type-d #content {margin: 0 25% 0 50px}
226
+
227
+ /* LAYOUT TYPE E */
228
+ #type-e #content-wrap {background: transparent url("images/content_wrap_e_bg.gif") repeat-y 100% 0}
229
+ #type-e #utility {position:absolute;top:0;left:auto;right:25px;width:165px;border-top: 5px solid #999}
230
+ #type-e #content {margin: 0 243px 0 50px}
231
+
232
+ /* LAYOUT TYPE F */
233
+ #type-f #content-wrap {background: transparent url("images/content_wrap_e_bg.gif") repeat-y 100% 0}
234
+ #type-f #content {margin: 0 235px 0 25%}
235
+ #type-f #utility {left:auto;right:25px}
236
+ #type-f #sidebar {right:auto;left:25px}
237
+
238
+ /* SECONDARY NAVIGATION - vertical navigation */
239
+ #nav-secondary, #nav-secondary ul {position:static}
240
+ #nav-secondary, #nav-secondary li {list-style: none;margin:0;padding:0;background:#fff}
241
+ #nav-secondary {padding-top:0;border-top: 1px solid #ccc;margin-top: 1px}
242
+ #nav-secondary a {line-height:1.8;padding: 5px 0 5px 23px;background: #fff url("images/sprites.gif") no-repeat 10px -695px;font: bold 86% arial;display:block}
243
+ #nav-secondary a, #nav-secondary a:link, #nav-secondary a:visited, #nav-secondary a:hover, #nav-secondary a:active {text-decoration:none;cursor:pointer}
244
+ #nav-secondary a:link {color:#000}
245
+ #nav-secondary a:visited {color:#000}
246
+ #nav-secondary a:hover {color:#c00;background: #fee url("images/sprites.gif") no-repeat 10px -695px}
247
+ #nav-secondary li.active a:link, #nav-secondary li.active a:visited, #nav-secondary li.active a:hover, #nav-secondary li.active a:active {color:#c00}
248
+ #nav-secondary li {border-top: 1px solid #fff;border-bottom: 1px solid #ccc}
249
+
250
+ /* SECONDARY NAVIGATION - 2nd TIER */
251
+ #nav-secondary ul {margin: 0 0 1em 23px;padding:0}
252
+ #nav-secondary li.active li a, #nav-secondary li.active li a:link, #nav-secondary li.active li a:visited {line-height:1.5;background: #fff url("images/sprites.gif") no-repeat 0 -798px;padding:0 0 0 12px;font-weight:normal;width:auto;color:#000;width:130px;display:block}
253
+ #nav-secondary li.active li a:hover, #nav-secondary li.active li a:active {color: #c00}
254
+ #nav-secondary li.active li {border: none;margin:0}
255
+
256
+ #nav-secondary li.active li.active a:link,
257
+ #nav-secondary li.active li.active a:visited,
258
+ #nav-secondary li.active li.active a:hover,
259
+ #nav-secondary li.active li.active a:active {font-weight:bold}
260
+
261
+ /* SECONDARY NAVIGATION - 3rd TIER */
262
+ #nav-secondary ul ul {margin: 0 0 1em 13px;padding:0}
263
+ #nav-secondary li.active li.active li a, #nav-secondary li.active li.active li a:link, #nav-secondary li.active li.active li a:visited {width:117px}
264
+ #nav-secondary li.active li.active li a:link,
265
+ #nav-secondary li.active li.active li a:visited,
266
+ #nav-secondary li.active li.active li a:hover,
267
+ #nav-secondary li.active li.active li a:active {font-weight:normal}
268
+ #nav-secondary li.active li.active li.active a:link,
269
+ #nav-secondary li.active li.active li.active a:visited,
270
+ #nav-secondary li.active li.active li.active a:hover,
271
+ #nav-secondary li.active li.active li.active a:active {font-weight:bold}
272
+
273
+ /* SECONDARY NAVIGATION - 4th TIER */
274
+ #nav-secondary ul ul ul {margin: 0 0 1em 13px;padding:0}
275
+ #nav-secondary li.active li.active li.active li a, #nav-secondary li.active li.active li.active li a:link, #nav-secondary li.active li.active li.active li a:visited {width:104px}
276
+ #nav-secondary li.active li.active li.active li a:link,
277
+ #nav-secondary li.active li.active li.active li a:visited,
278
+ #nav-secondary li.active li.active li.active li a:hover,
279
+ #nav-secondary li.active li.active li.active li a:active {font-weight:normal}
280
+ #nav-secondary li.active li.active li.active li.active a:link,
281
+ #nav-secondary li.active li.active li.active li.active a:visited,
282
+ #nav-secondary li.active li.active li.active li.active a:hover,
283
+ #nav-secondary li.active li.active li.active li.active a:active {font-weight:bold}
284
+
285
+ /* LAYOUT - FOOTER */
286
+ #footer {clear:both;border-top: 1px solid #E3E8EE;padding: 10px 0 30px;font-size:86%;color:#999}
287
+ #footer p {margin:0}
288
+ #footer a:link {color:#999}
@@ -0,0 +1,51 @@
1
+ /*
2
+ LEGAL
3
+ =====
4
+ Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au
5
+ Community: Mollio http://www.mollio.org $
6
+ License: Released Under the "Common Public License 1.0",
7
+ http://www.opensource.org/licenses/cpl.php
8
+ License: Released Under the "Creative Commons License",
9
+ http://creativecommons.org/licenses/by/2.5/
10
+ License: Released Under the "GNU Creative Commons License",
11
+ http://creativecommons.org/licenses/GPL/2.0/
12
+ */
13
+
14
+
15
+ body {font: 10pt arial,tahoma,verdana,sans-serif}
16
+ h1, h2, h3, h4, h5, h6 {margin: 1em 0 .2em;font-family: arial,tahoma,verdana,sans-serif}
17
+
18
+ * {float:none;position:static;width:auto;background:#fff}
19
+ p {margin: 0 0 1em}
20
+ img {border:none;display:block;margin: .5em 0}
21
+ dt {font-weight:bold}
22
+
23
+ #nav, #search, #nav-secondary, #breadcrumb, #poweredby {display:none}
24
+
25
+ /* =LINKS */
26
+ a {border:none}
27
+ a,a:link,a:link,a:link,a:hover {background:transparent;text-decoration:underline;cursor:pointer}
28
+ a:link {color:#5291c4}
29
+ a:visited {color:#666}
30
+ a:hover {color:#ff9900;border:none}
31
+ a:active {color:#0066cc}
32
+
33
+ .teaserBox {clear:both;margin: 0 0 1em}
34
+
35
+ .sponsors img {margin: .5em 0}
36
+
37
+ #footer {margin: 1em 0}
38
+
39
+ #header {border-bottom: 3px solid #c00}
40
+
41
+ /* TABLES */
42
+ table {font-size: 9pt;margin: 0 0 1em;border-collapse:collapse}
43
+ table th {border-bottom: 3px solid #000;vertical-align:top;padding: 1.5em 3px 3px;line-height:1.1;font: bold 145% arial;letter-spacing:0;text-align:left}
44
+ .table1 th.time {border-bottom: none;font: bold 89% verdana;color:#ff9c00;vertical-align:top;padding: 3px}
45
+ .table1 td {border: 1px solid #ddd;font-size: 9pt;padding: 3px;vertical-align:top}
46
+ .table1 td a {display:block;width:auto;font-weight:bold}
47
+ .table1 td a:link, .table1 td a:visited, .table1 td a:hover, .table1 td a:active {border:none;text-decoration:none}
48
+ .table1 th.sub {background: #aaa}
49
+ .table1 th.sub2 {background: #bbb;color:#000}
50
+ .table1 td ul li {background: #fff}
51
+
@@ -0,0 +1,21 @@
1
+ /*
2
+ son of suckerfish menu script from:
3
+ http://www.htmldog.com/articles/suckerfish/dropdowns/
4
+ */
5
+
6
+ sfHover = function() {
7
+ var sfEls = document.getElementById("nav").getElementsByTagName("LI");
8
+ for (var i=0; i<sfEls.length; i++) {
9
+ sfEls[i].onmouseover=function() {
10
+ this.className+=" sfhover";
11
+ this.style.zIndex=200; //this line added to force flyout to be above relatively positioned stuff in IE
12
+ }
13
+ sfEls[i].onmouseout=function() {
14
+ this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
15
+ }
16
+ }
17
+ }
18
+ if (window.attachEvent) window.attachEvent("onload", sfHover);
19
+
20
+
21
+
@@ -0,0 +1,6 @@
1
+ Put the content for partial template _<%= name %>.rhtml here
2
+ <%- if type=="utility" -%>
3
+ <div id="nav-secondary">
4
+ <!-- secondary navigation -->
5
+ </div>
6
+ <%- end -%>
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: layout_mollio_generator
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.9.0
7
+ date: 2006-12-16 00:00:00 -05:00
8
+ summary: description of gem
9
+ require_paths:
10
+ - lib
11
+ email: your contact email for bug fixes and info
12
+ homepage: http://layout_mollio_generator.rubyforge.org
13
+ rubyforge_project: layout_mollio_generator
14
+ description: description of gem
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - lukhnos
31
+ files:
32
+ - USAGE
33
+ - layout_mollio_generator.rb
34
+ - templates/layout.rhtml
35
+ - templates/partial.rhtml
36
+ - templates/mollio_version1.1/css/ie6_or_less.css
37
+ - templates/mollio_version1.1/css/main.css
38
+ - templates/mollio_version1.1/css/print.css
39
+ - templates/mollio_version1.1/css/images/2nd_nav_bg.gif
40
+ - templates/mollio_version1.1/css/images/body_bg.gif
41
+ - templates/mollio_version1.1/css/images/content_wrap_bg.gif
42
+ - templates/mollio_version1.1/css/images/content_wrap_e_bg.gif
43
+ - templates/mollio_version1.1/css/images/featurebox2_bg.gif
44
+ - templates/mollio_version1.1/css/images/featurebox_bg.gif
45
+ - templates/mollio_version1.1/css/images/header_bg.gif
46
+ - templates/mollio_version1.1/css/images/sprites.gif
47
+ - templates/mollio_version1.1/css/images/td_bg.gif
48
+ - templates/mollio_version1.1/js/common.js
49
+ - lib/layout_mollio_generator/version.rb
50
+ - lib/layout_mollio_generator.rb
51
+ test_files: []
52
+
53
+ rdoc_options: []
54
+
55
+ extra_rdoc_files: []
56
+
57
+ executables: []
58
+
59
+ extensions: []
60
+
61
+ requirements: []
62
+
63
+ dependencies:
64
+ - !ruby/object:Gem::Dependency
65
+ name: hoe
66
+ version_requirement:
67
+ version_requirements: !ruby/object:Gem::Version::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 1.1.6
72
+ version: