sushifish 0.9.0 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +21 -0
- data/lib/generators/sushi/sushi_generator.rb +34 -34
- data/lib/generators/sushi/templates/admin.css.scss +280 -0
- data/lib/generators/sushi/templates/application.css +7 -0
- data/lib/generators/sushi/templates/application.html.haml +0 -1
- data/lib/generators/sushi/templates/layout.css.scss +27 -0
- data/lib/generators/sushi/templates/page.html.haml +1 -1
- data/lib/generators/sushi/templates/page.rb +0 -9
- data/lib/generators/sushi/templates/pages.rb +41 -0
- data/lib/generators/sushi/templates/reset.css.scss +21 -0
- data/lib/generators/sushi/templates/style.css.scss +58 -3
- data/lib/generators/sushi/templates/style.css.scss_OLD +3 -0
- data/lib/generators/sushi/templates/superfish.css +92 -0
- data/lib/generators/sushi/templates/superfish.css.scss +80 -0
- data/lib/generators/sushi/templates/superfish.sass +4 -4
- data/lib/sushifish/version.rb +1 -1
- metadata +13 -4
data/README.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Sushi Fish
|
2
|
+
|
3
|
+
Sushi Fish is a generator. It is made to be run on a new rails app to give you some cool starting points. It uses ActiveAdmin and Ancestry. It is a fairly raw, developer focused time saver.
|
4
|
+
|
5
|
+
|
6
|
+
## Setup
|
7
|
+
|
8
|
+
Add the gem to your Gemfile and run the `bundle` command to install it.
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'sushifish'
|
12
|
+
```
|
13
|
+
|
14
|
+
Run the generator to create the initial files.
|
15
|
+
|
16
|
+
```
|
17
|
+
rails g sushi
|
18
|
+
```
|
19
|
+
|
20
|
+
Now go build something awesome.
|
21
|
+
|
@@ -6,27 +6,18 @@ class SushiGenerator < Rails::Generators::Base
|
|
6
6
|
source_root File.expand_path('../templates', __FILE__)
|
7
7
|
argument :app_name, :type => :string, :default => "website"
|
8
8
|
|
9
|
-
# http://stackoverflow.com/questions/6199301/global-access-to-rake-dsl-methods-is-deprecated
|
10
|
-
# https://github.com/rails/rails/commit/83f257fc4862642af29056cb5b7dfef6e1303754
|
11
|
-
# Fixed in Rails 3.1?
|
12
|
-
# def rake_dsl_fix
|
13
|
-
# gsub_file "Rakefile", "require File.expand_path('../config/application', __FILE__)", "require File.expand_path('../config/application', __FILE__)\nrequire 'rake/dsl_definition'"
|
14
|
-
#
|
15
|
-
# gsub_file "Rakefile", "require 'rake'", "require 'rake'\ninclude Rake::DSL"
|
16
|
-
# end
|
17
|
-
|
18
9
|
def create_models
|
19
10
|
generate :model, 'page name:string content:text page_title:string meta_keywords:text meta_description:text sidebar_html:text ancestry:string short_nav:string order_by:integer show_in_nav:boolean'
|
20
11
|
generate :model, 'stylesheet body:text'
|
21
12
|
rake 'db:migrate'
|
22
|
-
remove_file '
|
13
|
+
remove_file 'app/models/page.rb'
|
23
14
|
copy_file 'page.rb', 'app/models/page.rb'
|
24
15
|
end
|
25
16
|
|
26
17
|
def indexes_and_defaults
|
27
18
|
migration_template 'indexes_and_defaults.rb', 'db/migrate/indexes_and_defaults.rb'
|
28
19
|
rake 'db:migrate'
|
29
|
-
end
|
20
|
+
end
|
30
21
|
|
31
22
|
def remove_files
|
32
23
|
remove_file 'public/index.html' if File.exists?('public/index.html')
|
@@ -39,26 +30,29 @@ class SushiGenerator < Rails::Generators::Base
|
|
39
30
|
route "match ':section(/:page)' => 'page#show#:page', :as => :link"
|
40
31
|
route "resources :pages, :module => 'admin'"
|
41
32
|
route "resources :messages, :module => 'admin'"
|
42
|
-
route "resource :stylesheet"
|
43
|
-
route "get 'stylesheets/open'"
|
33
|
+
# route "resource :stylesheet"
|
34
|
+
# route "get 'stylesheets/open'"
|
44
35
|
end
|
45
36
|
|
46
37
|
def copy_files
|
47
|
-
copy_file 'admin_pages_controller.rb', 'app/controllers/admin/pages_controller.rb'
|
48
|
-
|
49
|
-
copy_file '
|
50
|
-
copy_file '
|
38
|
+
# copy_file 'admin_pages_controller.rb', 'app/controllers/admin/pages_controller.rb'
|
39
|
+
# remove_file 'app/controllers/application_controller.rb'
|
40
|
+
# copy_file 'application_controller.rb', 'app/controllers/application_controller.rb'
|
41
|
+
# copy_file 'dashboard_controller.rb', 'app/controllers/dashboard_controller.rb'
|
42
|
+
# copy_file 'stylesheets_controller.rb', 'app/controllers/stylesheets_controller.rb'
|
51
43
|
copy_file 'page_controller.rb', 'app/controllers/page_controller.rb'
|
52
44
|
copy_file 'page_helper.rb', 'app/helpers/page_helper.rb'
|
53
45
|
copy_file 'index.html.haml', 'app/views/page/index.html.haml'
|
54
46
|
copy_file 'page.html.haml', 'app/views/layouts/page.html.haml'
|
55
47
|
template 'application.html.haml', 'app/views/layouts/application.html.haml'
|
56
48
|
# copy_file 'style.sass', 'public/stylesheets/sass/style.sass'
|
57
|
-
|
49
|
+
copy_file 'reset.css.scss', 'app/assets/stylesheets/reset.css.scss'
|
58
50
|
# copy_file 'admin.sass', 'public/stylesheets/sass/admin.sass'
|
59
|
-
|
60
|
-
|
51
|
+
copy_file 'layout.css.scss', 'app/assets/stylesheets/layout.css.scss'
|
52
|
+
copy_file 'superfish.css.scss', 'app/assets/stylesheets/superfish.css.scss'
|
61
53
|
copy_file 'style.css.scss', 'app/assets/stylesheets/style.css.scss'
|
54
|
+
remove_file 'app/assets/stylesheets/application.css'
|
55
|
+
copy_file 'application.css', 'app/assets/stylesheets/application.css'
|
62
56
|
copy_file 'show.html.haml', 'app/views/page/show.html.haml'
|
63
57
|
copy_file '_header.html.haml', 'app/views/page/_header.html.haml'
|
64
58
|
copy_file '_navigation.html.haml', 'app/views/page/_navigation.html.haml'
|
@@ -80,21 +74,27 @@ class SushiGenerator < Rails::Generators::Base
|
|
80
74
|
run "gc -m 'inital commit'"
|
81
75
|
end
|
82
76
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
# run 'bundle'
|
92
|
-
# end
|
93
|
-
|
94
|
-
# def jquery_setup
|
95
|
-
# generate 'jquery:install --ui'
|
96
|
-
# end
|
77
|
+
def gems
|
78
|
+
gem 'haml'
|
79
|
+
gem 'ancestry'
|
80
|
+
gem 'activeadmin'
|
81
|
+
gem "meta_search", '>= 1.1.0.pre'
|
82
|
+
|
83
|
+
run 'bundle'
|
84
|
+
end
|
97
85
|
|
86
|
+
def activeadmin
|
87
|
+
generate "active_admin:install"
|
88
|
+
generate "active_admin:resource Page"
|
89
|
+
|
90
|
+
remove_file 'app/admin/pages.rb'
|
91
|
+
copy_file 'pages.rb', 'app/admin/pages.rb'
|
92
|
+
|
93
|
+
# app/admin/pages
|
94
|
+
|
95
|
+
rake 'db:migrate'
|
96
|
+
end
|
97
|
+
|
98
98
|
def seed_data
|
99
99
|
append_file 'db/seeds.rb', "Stylesheet.create! :body => '/* inject style here. */'\n"
|
100
100
|
append_file 'db/seeds.rb', "Page.create! :name => 'index', :content => 'i am index. i have no data.'"
|
@@ -0,0 +1,280 @@
|
|
1
|
+
html {
|
2
|
+
color: #222222;
|
3
|
+
font-size: 13px;
|
4
|
+
font-family: "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; }
|
5
|
+
|
6
|
+
body {
|
7
|
+
background-color: #cccccc;
|
8
|
+
#container {
|
9
|
+
width: 1024px;
|
10
|
+
margin: 0 auto;
|
11
|
+
padding: 0;
|
12
|
+
#header {
|
13
|
+
background-color: #09275e;
|
14
|
+
color: white;
|
15
|
+
padding: 10px 25px;
|
16
|
+
height: 20px;
|
17
|
+
.user_nav {
|
18
|
+
float: right;
|
19
|
+
font-size: 15px; } }
|
20
|
+
#navigation {
|
21
|
+
background-color: #666666;
|
22
|
+
padding: 0 0 0 10px;
|
23
|
+
margin: 0;
|
24
|
+
height: 30px;
|
25
|
+
font-size: 110%;
|
26
|
+
ul {
|
27
|
+
margin: 0 0 0 0px;
|
28
|
+
li {
|
29
|
+
padding: 6px 0;
|
30
|
+
float: left;
|
31
|
+
margin: 0 15px 0 0;
|
32
|
+
a, a:visited {
|
33
|
+
color: white;
|
34
|
+
text-decoration: none;
|
35
|
+
padding: 7px 15px; }
|
36
|
+
a:hover {
|
37
|
+
background: #999999;
|
38
|
+
color: #333333;
|
39
|
+
padding: 7px 15px; } } } }
|
40
|
+
#flash {
|
41
|
+
background-color: black; }
|
42
|
+
#content {
|
43
|
+
background-color: white;
|
44
|
+
padding: 10px 20px 25px 20px;
|
45
|
+
margin: 0;
|
46
|
+
a, a:visited {
|
47
|
+
color: #09275e;
|
48
|
+
text-decoration: none;
|
49
|
+
font-weight: bold; }
|
50
|
+
ol.main {
|
51
|
+
float: left;
|
52
|
+
width: 620px; }
|
53
|
+
ul {
|
54
|
+
li {
|
55
|
+
line-height: 17px;
|
56
|
+
letter-spacing: 0.2px; } } }
|
57
|
+
.sidebar {
|
58
|
+
border-left: 1px solid #c8c8c8;
|
59
|
+
width: 290px;
|
60
|
+
margin: 0 0 0 10px;
|
61
|
+
padding: 0 0 0 10px;
|
62
|
+
float: right; }
|
63
|
+
#footer {
|
64
|
+
background-color: #09275e;
|
65
|
+
color: white;
|
66
|
+
padding: 10px 20px; } } }
|
67
|
+
|
68
|
+
h1 {
|
69
|
+
font-size: 140%;
|
70
|
+
margin: 15px 0; }
|
71
|
+
|
72
|
+
table {
|
73
|
+
margin-bottom: 2em;
|
74
|
+
width: 100%; }
|
75
|
+
|
76
|
+
th {
|
77
|
+
border-bottom: 2px solid #cccccc;
|
78
|
+
font-weight: bold;
|
79
|
+
text-align: left; }
|
80
|
+
|
81
|
+
td {
|
82
|
+
border-bottom: 1px solid #dddddd; }
|
83
|
+
|
84
|
+
caption, th, td {
|
85
|
+
padding: 4px 10px 4px 0; }
|
86
|
+
|
87
|
+
caption {
|
88
|
+
background: #f1f1f1;
|
89
|
+
padding: 10px 0;
|
90
|
+
margin-bottom: 1em; }
|
91
|
+
|
92
|
+
tr, td, th {
|
93
|
+
vertical-align: middle; }
|
94
|
+
|
95
|
+
/* Forms */
|
96
|
+
|
97
|
+
input[type="submit"]::-moz-focus-inner {
|
98
|
+
border: none; }
|
99
|
+
|
100
|
+
/*removes dotted outline on submit buttons when clicking in firefox */
|
101
|
+
|
102
|
+
form ol.main {
|
103
|
+
list-style: none;
|
104
|
+
margin: 0 0 1em 0;
|
105
|
+
ol {
|
106
|
+
margin-left: 0; }
|
107
|
+
li {
|
108
|
+
margin: 0 0 1em 0;
|
109
|
+
list-style-position: outside; }
|
110
|
+
ol li {
|
111
|
+
margin: 0 0 0.25em 0;
|
112
|
+
list-style-position: outside; }
|
113
|
+
li.error input {
|
114
|
+
background: #fbe3e4; } }
|
115
|
+
|
116
|
+
form ol {
|
117
|
+
list-style: none;
|
118
|
+
margin: 0 0 1em 0;
|
119
|
+
ol {
|
120
|
+
margin-left: 0; }
|
121
|
+
li {
|
122
|
+
margin: 0 0 1em 0;
|
123
|
+
list-style-position: outside; }
|
124
|
+
ol li {
|
125
|
+
margin: 0 0 0.25em 0;
|
126
|
+
list-style-position: outside; }
|
127
|
+
li.error input {
|
128
|
+
background: #fbe3e4; } }
|
129
|
+
|
130
|
+
/*list-style-position fixes IE label margin bug */
|
131
|
+
|
132
|
+
p.inline-errors {
|
133
|
+
color: #d12f19; }
|
134
|
+
|
135
|
+
form {
|
136
|
+
ol li.file {
|
137
|
+
background: #e1e1e1;
|
138
|
+
border: 1px solid #c8c8c8;
|
139
|
+
padding: 10px; }
|
140
|
+
abbr {
|
141
|
+
border-bottom: 0; } }
|
142
|
+
|
143
|
+
label {
|
144
|
+
display: block; }
|
145
|
+
|
146
|
+
.required label {
|
147
|
+
font-weight: bold; }
|
148
|
+
|
149
|
+
.checkbox_field label, .radio_field label {
|
150
|
+
font-weight: normal; }
|
151
|
+
|
152
|
+
a.cancel {
|
153
|
+
color: #7d0d0d; }
|
154
|
+
|
155
|
+
.inline-hints {
|
156
|
+
font-size: 0.8em;
|
157
|
+
color: #666666;
|
158
|
+
margin-bottom: 0.25em; }
|
159
|
+
|
160
|
+
/* Fieldsets */
|
161
|
+
|
162
|
+
fieldset {
|
163
|
+
margin: 0 0 1.5em 0;
|
164
|
+
background: #f1f1f1;
|
165
|
+
padding: 1.5em 1.5em 1em 1.5em;
|
166
|
+
border: 1px solid #e3e3e3;
|
167
|
+
fieldset {
|
168
|
+
padding: 0;
|
169
|
+
border: 0;
|
170
|
+
fieldset {
|
171
|
+
padding: 0;
|
172
|
+
border: 0; } } }
|
173
|
+
|
174
|
+
legend {
|
175
|
+
font-weight: bold; }
|
176
|
+
|
177
|
+
fieldset.buttons {
|
178
|
+
background: inherit;
|
179
|
+
border: 0;
|
180
|
+
padding: 0;
|
181
|
+
li {
|
182
|
+
display: inline; } }
|
183
|
+
|
184
|
+
.radio fieldset {
|
185
|
+
padding: 0;
|
186
|
+
margin: 0; }
|
187
|
+
|
188
|
+
/* Text fields */
|
189
|
+
|
190
|
+
input {
|
191
|
+
&[type="text"], &[type="password"] {
|
192
|
+
width: 300px;
|
193
|
+
padding: 3px 2px;
|
194
|
+
font-size: inherit; }
|
195
|
+
&[disabled='disabled'] {
|
196
|
+
background-color: #fcfcfc;
|
197
|
+
cursor: default; }
|
198
|
+
&[type="checkbox"], &[type="radio"] {
|
199
|
+
margin: 0 3px 0 0;
|
200
|
+
vertical-align: middle;
|
201
|
+
position: relative;
|
202
|
+
top: -2px; } }
|
203
|
+
|
204
|
+
.check_boxes {
|
205
|
+
label {
|
206
|
+
vertical-align: middle;
|
207
|
+
padding: 0;
|
208
|
+
display: inline;
|
209
|
+
font-weight: bold; }
|
210
|
+
margin: 0;
|
211
|
+
padding: 0;
|
212
|
+
li {
|
213
|
+
list-style: none; } }
|
214
|
+
|
215
|
+
.check {
|
216
|
+
input {
|
217
|
+
vertical-align: top; } }
|
218
|
+
|
219
|
+
.radio label {
|
220
|
+
padding: 0; }
|
221
|
+
|
222
|
+
/* Textareas */
|
223
|
+
|
224
|
+
textarea {
|
225
|
+
width: 90%;
|
226
|
+
height: 200px;
|
227
|
+
margin: 0 0.5em 0.5em 0;
|
228
|
+
padding: 5px;
|
229
|
+
font-size: inherit; }
|
230
|
+
|
231
|
+
textarea.wide {
|
232
|
+
width: 840px;
|
233
|
+
height: 200px;
|
234
|
+
margin: 0 0.5em 0.5em 0;
|
235
|
+
padding: 5px;
|
236
|
+
font-size: inherit; }
|
237
|
+
|
238
|
+
textarea.stylesheet {
|
239
|
+
width: 100%;
|
240
|
+
height: 450px;
|
241
|
+
margin: 0 0.5em 0.5em 0;
|
242
|
+
padding: 5px;
|
243
|
+
font-size: 120%; }
|
244
|
+
|
245
|
+
/* Select fields */
|
246
|
+
|
247
|
+
fieldset .select select {
|
248
|
+
width: 200px;
|
249
|
+
font-size: 0.9em; }
|
250
|
+
|
251
|
+
optgroup {
|
252
|
+
margin: 0 0 0.5em 0; }
|
253
|
+
|
254
|
+
/* Date & Time */
|
255
|
+
|
256
|
+
form ol li {
|
257
|
+
&.date ol li, &.time ol li {
|
258
|
+
display: inline; }
|
259
|
+
&.datetime {
|
260
|
+
ol li {
|
261
|
+
display: inline-block; }
|
262
|
+
select {
|
263
|
+
display: inline;
|
264
|
+
width: auto; } }
|
265
|
+
&.date select, &.time select {
|
266
|
+
display: inline;
|
267
|
+
width: auto; }
|
268
|
+
&.date label, &.time label {
|
269
|
+
display: none; } }
|
270
|
+
|
271
|
+
#flash {
|
272
|
+
margin: 0px 0 10px 0;
|
273
|
+
width: 620px;
|
274
|
+
color: #0f0f0f;
|
275
|
+
font-size: 16px; }
|
276
|
+
|
277
|
+
.alert, .notice {
|
278
|
+
background-color: #f5df94;
|
279
|
+
border: solid 5px #f5d671;
|
280
|
+
padding: 7px; }
|
@@ -0,0 +1,7 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll automatically include all the stylesheets available in this directory
|
3
|
+
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
|
4
|
+
* the top of the compiled file, but it's generally better to create a new file per style scope.
|
5
|
+
*= require_self
|
6
|
+
*= require style
|
7
|
+
*/
|
@@ -0,0 +1,27 @@
|
|
1
|
+
$minimum_height: 140px;
|
2
|
+
|
3
|
+
html body {}
|
4
|
+
|
5
|
+
#container {
|
6
|
+
margin: 0 auto;
|
7
|
+
width: 980px; }
|
8
|
+
|
9
|
+
#header {}
|
10
|
+
|
11
|
+
#navigation {
|
12
|
+
width: 100%;
|
13
|
+
height: 35px; }
|
14
|
+
|
15
|
+
#flash {}
|
16
|
+
|
17
|
+
#content {
|
18
|
+
min-height: $minimum_height;
|
19
|
+
}
|
20
|
+
|
21
|
+
#sidebar {
|
22
|
+
float: left;
|
23
|
+
min-height: $minimum_height;
|
24
|
+
}
|
25
|
+
|
26
|
+
#footer {
|
27
|
+
clear: both; }
|
@@ -6,7 +6,7 @@
|
|
6
6
|
%meta{:name => 'description', :content => "#{yield(:meta_desc)}"}
|
7
7
|
%meta{:name => "keywords", :content => "#{yield(:meta_keywords)}"}
|
8
8
|
|
9
|
-
= stylesheet_link_tag
|
9
|
+
= stylesheet_link_tag :application
|
10
10
|
= javascript_include_tag :defaults
|
11
11
|
= csrf_meta_tag
|
12
12
|
|
@@ -23,15 +23,6 @@ class Page < ActiveRecord::Base
|
|
23
23
|
|
24
24
|
def nav_path
|
25
25
|
name
|
26
|
-
# if nominal
|
27
|
-
# if children.count > 0
|
28
|
-
# children.first.name
|
29
|
-
# else
|
30
|
-
# ""
|
31
|
-
# end
|
32
|
-
# else
|
33
|
-
# name
|
34
|
-
# end
|
35
26
|
end
|
36
27
|
|
37
28
|
scope :visible, where("visible = ?", true).order('id')
|
@@ -0,0 +1,41 @@
|
|
1
|
+
ActiveAdmin.register Page do
|
2
|
+
menu :priority => 3
|
3
|
+
|
4
|
+
# filter :location
|
5
|
+
filter :name
|
6
|
+
|
7
|
+
form do |f|
|
8
|
+
f.inputs "Details" do
|
9
|
+
f.input :name
|
10
|
+
# f.input :location
|
11
|
+
f.input :short_nav
|
12
|
+
f.input :parent_id, :as => :select, :collection => Page.where(:ancestry => nil)
|
13
|
+
# f.input :is_root
|
14
|
+
end
|
15
|
+
f.inputs "Content" do
|
16
|
+
f.input :content, :input_html => { :rows => 50 }
|
17
|
+
end
|
18
|
+
f.inputs "Search Engine" do
|
19
|
+
# f.input :title_tag, :label => 'Title'
|
20
|
+
f.input :meta_keywords, :input_html => { :rows => 3 }
|
21
|
+
f.input :meta_description, :input_html => { :rows => 5 }
|
22
|
+
end
|
23
|
+
|
24
|
+
f.buttons
|
25
|
+
end
|
26
|
+
|
27
|
+
index do
|
28
|
+
column :name
|
29
|
+
# column :location
|
30
|
+
column "Section", :sortable => :ancestry do |page|
|
31
|
+
link_to page.root.name, edit_admin_page_path(page.root)
|
32
|
+
end
|
33
|
+
# column :order_by
|
34
|
+
column :created_at
|
35
|
+
column :updated_at
|
36
|
+
|
37
|
+
default_actions
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
|
2
|
+
margin: 0;
|
3
|
+
padding: 0;
|
4
|
+
font-size: 100%;
|
5
|
+
vertical-align: baseline;
|
6
|
+
border: 0;
|
7
|
+
outline: 0;
|
8
|
+
background: transparent; }
|
9
|
+
|
10
|
+
ol, ul {
|
11
|
+
list-style: none; }
|
12
|
+
|
13
|
+
blockquote, q {
|
14
|
+
quotes: none; }
|
15
|
+
|
16
|
+
:focus {
|
17
|
+
outline: 0; }
|
18
|
+
|
19
|
+
table {
|
20
|
+
border-collapse: collapse;
|
21
|
+
border-spacing: 0; }
|
@@ -1,3 +1,58 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
@import "reset.css";
|
2
|
+
@import "layout.css";
|
3
|
+
@import "superfish.css";
|
4
|
+
|
5
|
+
html {
|
6
|
+
font: 13px / 1.5em "Lucida Grande", calibri, Tahoma, Arial; }
|
7
|
+
|
8
|
+
body {
|
9
|
+
#container {
|
10
|
+
font-size: 1em;
|
11
|
+
#header {
|
12
|
+
color: white; }
|
13
|
+
#navigation {
|
14
|
+
ul {}
|
15
|
+
float: left; }
|
16
|
+
#content {
|
17
|
+
float: left;
|
18
|
+
padding: 10px;
|
19
|
+
h1, h2 {
|
20
|
+
margin: 10px 0 15px; }
|
21
|
+
p {
|
22
|
+
margin: 10px 0 15px 0; } }
|
23
|
+
#sidebar {
|
24
|
+
color: #aaaaaa;
|
25
|
+
float: left; }
|
26
|
+
#footer {
|
27
|
+
color: #aaaaaa;
|
28
|
+
clear: both; } } }
|
29
|
+
|
30
|
+
a,a:visited {
|
31
|
+
color: #003399;
|
32
|
+
text-decoration: none; }
|
33
|
+
|
34
|
+
h1, h2, h3, h4, h5, h6 {
|
35
|
+
font-family: helvetica, arial, verdana, sans-serif;
|
36
|
+
font-weight: normal; }
|
37
|
+
|
38
|
+
h1 {
|
39
|
+
font-size: 208%; }
|
40
|
+
|
41
|
+
h2 {
|
42
|
+
font-size: 164%; }
|
43
|
+
|
44
|
+
h3 {
|
45
|
+
font-size: 145%; }
|
46
|
+
|
47
|
+
h4 {
|
48
|
+
font-size: 118%; }
|
49
|
+
|
50
|
+
// #flash
|
51
|
+
// margin: 10px 0
|
52
|
+
// width: 720px
|
53
|
+
// color: #0f0f0f
|
54
|
+
// font-size: 16px
|
55
|
+
// .alert, .notice
|
56
|
+
// background-color: #F5DF94
|
57
|
+
// border: solid 5px #F5D671
|
58
|
+
// padding: 7px
|
@@ -0,0 +1,92 @@
|
|
1
|
+
/*** adding the class sf-navbar in addition to sf-menu creates an all-horizontal nav-bar menu ***/
|
2
|
+
.sf-navbar {
|
3
|
+
background: #BDD2FF;
|
4
|
+
height: 2.5em;
|
5
|
+
padding-bottom: 2.5em;
|
6
|
+
position: relative;
|
7
|
+
}
|
8
|
+
.sf-navbar li {
|
9
|
+
background: #AABDE6;
|
10
|
+
position: static;
|
11
|
+
}
|
12
|
+
.sf-navbar a {
|
13
|
+
border-top: none;
|
14
|
+
}
|
15
|
+
.sf-navbar li ul {
|
16
|
+
width: 44em; /*IE6 soils itself without this*/
|
17
|
+
}
|
18
|
+
.sf-navbar li li {
|
19
|
+
background: #BDD2FF;
|
20
|
+
position: relative;
|
21
|
+
}
|
22
|
+
.sf-navbar li li ul {
|
23
|
+
width: 13em;
|
24
|
+
}
|
25
|
+
.sf-navbar li li li {
|
26
|
+
width: 100%;
|
27
|
+
}
|
28
|
+
.sf-navbar ul li {
|
29
|
+
width: auto;
|
30
|
+
float: left;
|
31
|
+
}
|
32
|
+
.sf-navbar a, .sf-navbar a:visited {
|
33
|
+
border: none;
|
34
|
+
}
|
35
|
+
.sf-navbar li.current {
|
36
|
+
background: #BDD2FF;
|
37
|
+
}
|
38
|
+
.sf-navbar li:hover,
|
39
|
+
.sf-navbar li.sfHover,
|
40
|
+
.sf-navbar li li.current,
|
41
|
+
.sf-navbar a:focus, .sf-navbar a:hover, .sf-navbar a:active {
|
42
|
+
background: #BDD2FF;
|
43
|
+
}
|
44
|
+
.sf-navbar ul li:hover,
|
45
|
+
.sf-navbar ul li.sfHover,
|
46
|
+
ul.sf-navbar ul li:hover li,
|
47
|
+
ul.sf-navbar ul li.sfHover li,
|
48
|
+
.sf-navbar ul a:focus, .sf-navbar ul a:hover, .sf-navbar ul a:active {
|
49
|
+
background: #D1DFFF;
|
50
|
+
}
|
51
|
+
ul.sf-navbar li li li:hover,
|
52
|
+
ul.sf-navbar li li li.sfHover,
|
53
|
+
.sf-navbar li li.current li.current,
|
54
|
+
.sf-navbar ul li li a:focus, .sf-navbar ul li li a:hover, .sf-navbar ul li li a:active {
|
55
|
+
background: #E6EEFF;
|
56
|
+
}
|
57
|
+
ul.sf-navbar .current ul,
|
58
|
+
ul.sf-navbar ul li:hover ul,
|
59
|
+
ul.sf-navbar ul li.sfHover ul {
|
60
|
+
left: 0;
|
61
|
+
top: 2.5em; /* match top ul list item height */
|
62
|
+
}
|
63
|
+
ul.sf-navbar .current ul ul {
|
64
|
+
top: -999em;
|
65
|
+
}
|
66
|
+
|
67
|
+
.sf-navbar li li.current > a {
|
68
|
+
font-weight: bold;
|
69
|
+
}
|
70
|
+
|
71
|
+
/*** point all arrows down ***/
|
72
|
+
/* point right for anchors in subs */
|
73
|
+
.sf-navbar ul .sf-sub-indicator { background-position: -10px -100px; }
|
74
|
+
.sf-navbar ul a > .sf-sub-indicator { background-position: 0 -100px; }
|
75
|
+
/* apply hovers to modern browsers */
|
76
|
+
.sf-navbar ul a:focus > .sf-sub-indicator,
|
77
|
+
.sf-navbar ul a:hover > .sf-sub-indicator,
|
78
|
+
.sf-navbar ul a:active > .sf-sub-indicator,
|
79
|
+
.sf-navbar ul li:hover > a > .sf-sub-indicator,
|
80
|
+
.sf-navbar ul li.sfHover > a > .sf-sub-indicator {
|
81
|
+
background-position: -10px -100px; /* arrow hovers for modern browsers*/
|
82
|
+
}
|
83
|
+
|
84
|
+
/*** remove shadow on first submenu ***/
|
85
|
+
.sf-navbar > li > ul {
|
86
|
+
background: transparent;
|
87
|
+
padding: 0;
|
88
|
+
-moz-border-radius-bottomleft: 0;
|
89
|
+
-moz-border-radius-topright: 0;
|
90
|
+
-webkit-border-top-right-radius: 0;
|
91
|
+
-webkit-border-bottom-left-radius: 0;
|
92
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
$ul_width: 16em;
|
2
|
+
|
3
|
+
.sf-menu {
|
4
|
+
margin: 0;
|
5
|
+
padding: 0;
|
6
|
+
list-style: none;
|
7
|
+
* {
|
8
|
+
margin: 0;
|
9
|
+
padding: 0;
|
10
|
+
list-style: none; }
|
11
|
+
line-height: 1em;
|
12
|
+
ul {
|
13
|
+
position: absolute;
|
14
|
+
top: -999em;
|
15
|
+
width: $ul_width;
|
16
|
+
/* left offset of submenus need to match (see below) */
|
17
|
+
li {
|
18
|
+
width: 100%; } }
|
19
|
+
li {
|
20
|
+
&:hover {
|
21
|
+
visibility: inherit;
|
22
|
+
/* fixes IE7 'sticky bug' */ }
|
23
|
+
float: left;
|
24
|
+
position: relative; }
|
25
|
+
a {
|
26
|
+
display: block;
|
27
|
+
position: relative; }
|
28
|
+
li {
|
29
|
+
&:hover ul, &.sfHover ul {
|
30
|
+
left: 0;
|
31
|
+
top: 2.5em;
|
32
|
+
/* match top ul list item height */
|
33
|
+
z-index: 99; } } }
|
34
|
+
|
35
|
+
ul.sf-menu li {
|
36
|
+
&:hover li ul, &.sfHover li ul {
|
37
|
+
top: -999em; }
|
38
|
+
li {
|
39
|
+
&:hover ul, &.sfHover ul {
|
40
|
+
width: $ul_width;
|
41
|
+
/* match ul width */
|
42
|
+
top: 0; }
|
43
|
+
&:hover li ul, &.sfHover li ul {
|
44
|
+
top: -999em; }
|
45
|
+
li {
|
46
|
+
&:hover ul, &.sfHover ul {
|
47
|
+
width: $ul_width;
|
48
|
+
/* match ul width */
|
49
|
+
top: 0; } } } }
|
50
|
+
|
51
|
+
/** Styling ** */
|
52
|
+
|
53
|
+
.sf-menu {
|
54
|
+
float: left;
|
55
|
+
margin-bottom: 1em;
|
56
|
+
a {
|
57
|
+
padding: 0.4em 0.85em;
|
58
|
+
text-decoration: none;
|
59
|
+
/* visited pseudo selector so IE6 applies text colour */
|
60
|
+
color: white;
|
61
|
+
&:visited {
|
62
|
+
/* visited pseudo selector so IE6 applies text colour */
|
63
|
+
color: white; } }
|
64
|
+
li {
|
65
|
+
background: black;
|
66
|
+
padding: 0.4em 0;
|
67
|
+
margin: 0;
|
68
|
+
li {
|
69
|
+
background: black;
|
70
|
+
padding: 0.4em 0;
|
71
|
+
margin: 0;
|
72
|
+
li {
|
73
|
+
background: black; } }
|
74
|
+
&:hover, &.sfHover {
|
75
|
+
background: #666666;
|
76
|
+
outline: 0; } }
|
77
|
+
a {
|
78
|
+
&:focus, &:hover, &:active {
|
79
|
+
background: #666666;
|
80
|
+
outline: 0; } } }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*** ESSENTIAL STYLES **
|
2
|
-
!ul_width = 16em
|
2
|
+
// !ul_width = 16em
|
3
3
|
|
4
4
|
.sf-menu
|
5
5
|
margin: 0
|
@@ -13,7 +13,7 @@
|
|
13
13
|
ul
|
14
14
|
position: absolute
|
15
15
|
top: -999em
|
16
|
-
width: !ul_width
|
16
|
+
// width: !ul_width
|
17
17
|
/* left offset of submenus need to match (see below)
|
18
18
|
li
|
19
19
|
width: 100%
|
@@ -38,14 +38,14 @@ ul.sf-menu li
|
|
38
38
|
top: -999em
|
39
39
|
li
|
40
40
|
&:hover ul, &.sfHover ul
|
41
|
-
left: !ul_width
|
41
|
+
// left: !ul_width
|
42
42
|
/* match ul width
|
43
43
|
top: 0
|
44
44
|
&:hover li ul, &.sfHover li ul
|
45
45
|
top: -999em
|
46
46
|
li
|
47
47
|
&:hover ul, &.sfHover ul
|
48
|
-
left: !ul_width
|
48
|
+
// left: !ul_width
|
49
49
|
/* match ul width
|
50
50
|
top: 0
|
51
51
|
|
data/lib/sushifish/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sushifish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 6
|
10
|
+
version: 0.9.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Travis
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-02-
|
18
|
+
date: 2012-02-14 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -31,6 +31,7 @@ extra_rdoc_files: []
|
|
31
31
|
files:
|
32
32
|
- .gitignore
|
33
33
|
- Gemfile
|
34
|
+
- README.md
|
34
35
|
- Rakefile
|
35
36
|
- lib/generators/USAGE
|
36
37
|
- lib/generators/sushi/sushi_generator.rb
|
@@ -41,8 +42,10 @@ files:
|
|
41
42
|
- lib/generators/sushi/templates/_navigation.html.haml
|
42
43
|
- lib/generators/sushi/templates/_page.html.haml
|
43
44
|
- lib/generators/sushi/templates/_sidebar.html.haml
|
45
|
+
- lib/generators/sushi/templates/admin.css.scss
|
44
46
|
- lib/generators/sushi/templates/admin.sass
|
45
47
|
- lib/generators/sushi/templates/admin_pages_controller.rb
|
48
|
+
- lib/generators/sushi/templates/application.css
|
46
49
|
- lib/generators/sushi/templates/application.html.haml
|
47
50
|
- lib/generators/sushi/templates/application_controller.rb
|
48
51
|
- lib/generators/sushi/templates/dashboard_controller.rb
|
@@ -50,6 +53,7 @@ files:
|
|
50
53
|
- lib/generators/sushi/templates/edit.html.haml
|
51
54
|
- lib/generators/sushi/templates/index.html.haml
|
52
55
|
- lib/generators/sushi/templates/indexes_and_defaults.rb
|
56
|
+
- lib/generators/sushi/templates/layout.css.scss
|
53
57
|
- lib/generators/sushi/templates/layout.sass
|
54
58
|
- lib/generators/sushi/templates/migrations/ancestry_migration.rb
|
55
59
|
- lib/generators/sushi/templates/new.html.erb
|
@@ -58,13 +62,18 @@ files:
|
|
58
62
|
- lib/generators/sushi/templates/page.rb
|
59
63
|
- lib/generators/sushi/templates/page_controller.rb
|
60
64
|
- lib/generators/sushi/templates/page_helper.rb
|
65
|
+
- lib/generators/sushi/templates/pages.rb
|
61
66
|
- lib/generators/sushi/templates/pages_index.html.haml
|
67
|
+
- lib/generators/sushi/templates/reset.css.scss
|
62
68
|
- lib/generators/sushi/templates/reset.sass
|
63
69
|
- lib/generators/sushi/templates/show.html.erb
|
64
70
|
- lib/generators/sushi/templates/show.html.haml
|
65
71
|
- lib/generators/sushi/templates/style.css.scss
|
72
|
+
- lib/generators/sushi/templates/style.css.scss_OLD
|
66
73
|
- lib/generators/sushi/templates/style.sass
|
67
74
|
- lib/generators/sushi/templates/stylesheets_controller.rb
|
75
|
+
- lib/generators/sushi/templates/superfish.css
|
76
|
+
- lib/generators/sushi/templates/superfish.css.scss
|
68
77
|
- lib/generators/sushi/templates/superfish.sass
|
69
78
|
- lib/sushifish.rb
|
70
79
|
- lib/sushifish/version.rb
|