milk 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/Rakefile +12 -0
  2. data/bin/milk +22 -0
  3. data/lib/milk.rb +4 -2
  4. data/lib/milk/application.rb +4 -4
  5. data/lib/milk/component.rb +1 -1
  6. data/lib/milk/fields/xhtml.haml +1 -1
  7. data/milk-0.0.5.gem +0 -0
  8. data/milk.gemspec +2 -2
  9. data/{lib/milk/templates/rakefile → site_template/Rakefile} +0 -0
  10. data/{lib/milk/templates/rackup → site_template/config.ru} +0 -0
  11. data/site_template/config/config.yaml +31 -0
  12. data/site_template/config/foot.yaml +5 -0
  13. data/site_template/config/head.yaml +27 -0
  14. data/site_template/config/users.yaml +18 -0
  15. data/site_template/design/960.sass +305 -0
  16. data/site_template/design/body.haml +3 -0
  17. data/site_template/design/body.rb +4 -0
  18. data/site_template/design/button.haml +2 -0
  19. data/site_template/design/button.rb +17 -0
  20. data/site_template/design/foot.haml +3 -0
  21. data/site_template/design/foot.rb +4 -0
  22. data/site_template/design/foot.sass +4 -0
  23. data/site_template/design/head.haml +6 -0
  24. data/site_template/design/head.rb +4 -0
  25. data/site_template/design/head.sass +25 -0
  26. data/site_template/design/page.haml +3 -0
  27. data/site_template/design/page.sass +7 -0
  28. data/site_template/design/reset.sass +170 -0
  29. data/site_template/design/sprites.sass +0 -0
  30. data/site_template/design/text.sass +65 -0
  31. data/site_template/design/xhtml.haml +15 -0
  32. data/site_template/pages/About.yaml +15 -0
  33. data/site_template/pages/Home.yaml +15 -0
  34. data/site_template/pages/News.yaml +15 -0
  35. data/site_template/pages/NotFound.yaml +15 -0
  36. data/site_template/pages/Products.yaml +15 -0
  37. data/site_template/public/favicon.ico +0 -0
  38. data/site_template/public/images/README.txt +2 -0
  39. data/site_template/public/robots.txt +0 -0
  40. data/site_template/public/style/style.css +155 -0
  41. data/{lib/milk/templates/restart → site_template/tmp/restart.txt} +0 -0
  42. metadata +49 -9
  43. data/lib/milk/templates/bzrignore +0 -3
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ desc "Build gem"
2
+ task :gem do
3
+ exec "gem build milk.gemspec"
4
+ end
5
+
6
+
7
+ desc "Run Sample site to test framework"
8
+ task :sample_test do
9
+ exec "thin -R site_template/config.ru start"
10
+ end
11
+
12
+
data/bin/milk ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'fileutils'
4
+
5
+ if ARGV.length != 1
6
+ puts "\nMilk site generator\n"
7
+ puts "\nUsage:\n\tmilk [target project]\n\n"
8
+ exit 1
9
+ end
10
+
11
+ target_path = File.absolute_path(ARGV[0])
12
+ if File.directory?(target_path)
13
+ puts "\nERROR: there already exists a folder #{target_path}\n"
14
+ exit 1
15
+ end
16
+
17
+ puts "\nCreating milk site at #{target_path}\n"
18
+ FileUtils.mkdir_p(target_path, :verbose => true)
19
+ MILK_ROOT = target_path
20
+ require 'milk'
21
+ FileUtils.cp_r(Milk::TEMPLATE_DIR+"/.", target_path, :verbose => true)
22
+ puts "\nDone!\n\n"
data/lib/milk.rb CHANGED
@@ -11,18 +11,20 @@ module Milk
11
11
 
12
12
  LIB_DIR = File.dirname(__FILE__)
13
13
  BIN_DIR ||= File.absolute_path(File.dirname(__FILE__)+"/../../local/bin")
14
+ TEMPLATE_DIR = File.absolute_path(LIB_DIR+"/../site_template")
14
15
  def self.get_milk_root
15
16
  c = caller(1).collect { |line| line.split(':').first }
16
17
  c = c.select { |line| line !~ /\/gems\// }
17
18
  File.absolute_path(File.dirname(c.first))
18
19
  end
19
- MILK_ROOT = get_milk_root
20
+ MILK_ROOT ||= get_milk_root
20
21
  CONFIG_DIR = MILK_ROOT + "/config"
21
22
 
22
23
  # Load overrides from config file
24
+ config_file = CONFIG_DIR+"/config.yaml"
23
25
  YAML.load(open(CONFIG_DIR+"/config.yaml")).each_pair do |key, value|
24
26
  eval("#{key} = #{value.inspect}")
25
- end
27
+ end if File.file?(config_file)
26
28
 
27
29
  # Set defaults otherwise
28
30
  COMPONENTS_DIR ||= MILK_ROOT + "/design"
@@ -34,12 +34,11 @@ module Milk
34
34
  :delete
35
35
  end
36
36
  when @req.post?
37
- if path =~ PAGE_PATH_REGEX
38
- regex = PAGE_PATH_REGEX
39
- :preview
40
- end
41
37
  if path == '/login'
42
38
  :login
39
+ elsif path =~ PAGE_PATH_REGEX
40
+ regex = PAGE_PATH_REGEX
41
+ :preview
43
42
  end
44
43
  when @req.put?
45
44
  if path =~ PAGE_PATH_REGEX
@@ -146,6 +145,7 @@ module Milk
146
145
  @resp["Content-Type"] =
147
146
  if env['HTTP_ACCEPT'].include? "application/xhtml+xml"
148
147
  "application/xhtml+xml"
148
+ "text/html"
149
149
  else
150
150
  "text/html"
151
151
  end
@@ -86,7 +86,7 @@ module Milk
86
86
  obj = YAML.load_file(yaml_file)
87
87
  obj.instance_variable_set(:@parent, @parent)
88
88
  obj.instance_variables.each do |key|
89
- self.instance_variable_set(key, obj.instance_variable_get(key))
89
+ self.instance_variable_set(key, obj.instance_variable_get(key)) unless self.instance_variable_get(key)
90
90
  end
91
91
  end
92
92
  end
@@ -131,7 +131,7 @@
131
131
  %span{:class=>'ui-icon ui-icon-cancel'}
132
132
  Cancel
133
133
  %button#logout_button.toolitem{:title=>'Cancel changes and logout and go to live page.'}
134
- %span{:class=>'ui-icon ui-icon-circle-close'}
134
+ %span{:class=>'ui-icon ui-icon-locked'}
135
135
  Logout
136
136
  #preview
137
137
  = preview
data/milk-0.0.5.gem ADDED
Binary file
data/milk.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  tastes great with and without cookies. The public facing aspect is static html
7
7
  files, and the admin side is super easy to use."
8
8
  s.requirements << 'none'
9
- s.version = "0.0.5"
9
+ s.version = "0.0.6"
10
10
  s.author = "Tim Caswell"
11
11
  s.email = "tim@creationix.com"
12
12
  s.homepage = "http://milk.rubyforge.org"
@@ -16,7 +16,7 @@ files, and the admin side is super easy to use."
16
16
  s.add_dependency('rack', '>= 1.0.0')
17
17
  s.add_dependency('maruku', '>= 0.6.0')
18
18
  s.add_dependency('haml', '>= 2.0.9')
19
- s.test_files = Dir["test/test*.rb"]
20
19
  s.has_rdoc = true
20
+ s.executables = ['milk']
21
21
  end
22
22
 
@@ -0,0 +1,31 @@
1
+ # This file contains global settings for the milk site
2
+ ---
3
+
4
+ # SECRET is the site specific key used to encrypt the cookies sent for authentication.
5
+ #
6
+ # It is very important that this key be both long and unique to each site you build.
7
+ #
8
+ # My method is to pick two secret passphrases and concatenating the md5 of them together
9
+ #
10
+ # >> require 'digest/md5'
11
+ # => true
12
+ # >> Digest::MD5.hexdigest("Milk") + Digest::MD5.hexdigest("Rocks")
13
+ # => "e89b2cbb7d11825a67459af2249064de5cdfbc0ea6e85d2cc3dd5ddec72ffe1a"
14
+ SECRET: "098f6bcd4621d373cade4e832627b4f6ad0234829205b9033196ba818f7a872b"
15
+
16
+ # USE_CACHE is an advanced option for sites that need super high performance. When
17
+ # this option is set to true, then every time a page is saved, a static html file is
18
+ # created and saved to [MILK_ROOT]/public/cache/[pagename]/index.html
19
+ #
20
+ # In order to use these cache files your apache or nginx server needs to have a rewrite
21
+ # rule that looks here first and uses the static files if they exist.
22
+ #
23
+ # As an example, here is the relevent part of my nginx config:
24
+ #
25
+ # # Enable loading page cache files directly
26
+ # rewrite ^/$ /cache/Home/index.html;
27
+ # rewrite ^((/[A-Z][A-Za-z]*)+)$ /cache/$1/index.html;
28
+ USE_CACHE: false
29
+
30
+ # This is used in some views to show the site name
31
+ SITE_NAME: "Sample Site"
@@ -0,0 +1,5 @@
1
+ --- !ruby/object:Foot
2
+ markdown: |-
3
+ © 2009 Your company name here. - Hosted on the [Milk] framework.
4
+
5
+ [Milk]: http://milk.rubyforge.org/
@@ -0,0 +1,27 @@
1
+ --- &id001 !ruby/object:Head
2
+ buttons:
3
+ - !ruby/object:Button
4
+ href: /Home
5
+ icon: home
6
+ title: Home
7
+ description: Description of home page
8
+ parent: *id001
9
+ - !ruby/object:Button
10
+ href: /News
11
+ icon: news
12
+ title: News
13
+ description: Description of news page
14
+ parent: *id001
15
+ - !ruby/object:Button
16
+ href: /Products
17
+ icon: products
18
+ title: Products
19
+ description: Description of products page
20
+ parent: *id001
21
+ - !ruby/object:Button
22
+ href: /About
23
+ icon: about
24
+ title: About Us
25
+ description: Description of about page
26
+ parent: *id001
27
+
@@ -0,0 +1,18 @@
1
+ ---
2
+ # This file contains the emails, names and hashed passwords for
3
+ # all users of the site.
4
+ #
5
+ # Hash is a simple md5 of the password for now, future versions of
6
+ # Milk may use something more secure.
7
+ #
8
+ # To create the md5 hash in irb do the following:
9
+ #
10
+ # >> require 'digest/md5'
11
+ # => true
12
+ # >> Digest::MD5.hexdigest("test")
13
+ # => "098f6bcd4621d373cade4e832627b4f6"
14
+ #
15
+ # Note the default login is admin@example.com/test
16
+ admin@example.com:
17
+ name: Sample Admin
18
+ hash: 098f6bcd4621d373cade4e832627b4f6
@@ -0,0 +1,305 @@
1
+ // This file is generated using css2sass on 960.css from http://960.gs/
2
+ // Then I factored out the widths to make it easier to edit based on sass variables
3
+ // This defines the columns of the content.
4
+
5
+ // Configure parameters here
6
+ !full_width = 960
7
+ !gutter_width = 20
8
+
9
+ // Calculated variables
10
+ !full_column_width_12 = !full_width / 12
11
+ !full_column_width_16 = !full_width / 16
12
+
13
+ .container_12
14
+ :margin-left auto
15
+ :margin-right auto
16
+ :width = !full_width + "px"
17
+
18
+ .grid_3
19
+ :width = (!full_column_width_12 * 3 - !gutter_width) + "px"
20
+
21
+ .grid_6
22
+ :width = (!full_column_width_12 * 6 - !gutter_width) + "px"
23
+
24
+ .grid_9
25
+ :width = (!full_column_width_12 * 9 - !gutter_width) + "px"
26
+
27
+ .grid_12
28
+ :width = (!full_column_width_12 * 12 - !gutter_width) + "px"
29
+
30
+ .grid_1
31
+ :width = (!full_column_width_12 - !gutter_width) + "px"
32
+
33
+ .grid_2
34
+ :width = (!full_column_width_12 * 2 - !gutter_width) + "px"
35
+
36
+ .grid_4
37
+ :width = (!full_column_width_12 * 4 - !gutter_width) + "px"
38
+
39
+ .grid_5
40
+ :width = (!full_column_width_12 * 5 - !gutter_width) + "px"
41
+
42
+ .grid_7
43
+ :width = (!full_column_width_12 * 7 - !gutter_width) + "px"
44
+
45
+ .grid_8
46
+ :width = (!full_column_width_12 * 8 - !gutter_width) + "px"
47
+
48
+ .grid_10
49
+ :width = (!full_column_width_12 * 10 - !gutter_width) + "px"
50
+
51
+ .grid_11
52
+ :width = (!full_column_width_12 * 11 - !gutter_width) + "px"
53
+
54
+ .prefix_3
55
+ :padding-left = (!full_column_width_12 * 3) + "px"
56
+
57
+ .prefix_6
58
+ :padding-left = (!full_column_width_12 * 6) + "px"
59
+
60
+ .prefix_9
61
+ :padding-left = (!full_column_width_12 * 9) + "px"
62
+
63
+ .prefix_1
64
+ :padding-left = !full_column_width_12 + "px"
65
+
66
+ .prefix_2
67
+ :padding-left = (!full_column_width_12 * 2) + "px"
68
+
69
+ .prefix_4
70
+ :padding-left = (!full_column_width_12 * 4) + "px"
71
+
72
+ .prefix_5
73
+ :padding-left = (!full_column_width_12 * 5) + "px"
74
+
75
+ .prefix_7
76
+ :padding-left = (!full_column_width_12 * 7) + "px"
77
+
78
+ .prefix_8
79
+ :padding-left = (!full_column_width_12 * 8) + "px"
80
+
81
+ .prefix_10
82
+ :padding-left = (!full_column_width_12 * 10) + "px"
83
+
84
+ .prefix_11
85
+ :padding-left = (!full_column_width_12 * 11) + "px"
86
+
87
+ .suffix_3
88
+ :padding-right = (!full_column_width_12 * 3) + "px"
89
+
90
+ .suffix_6
91
+ :padding-right = (!full_column_width_12 * 6) + "px"
92
+
93
+ .suffix_9
94
+ :padding-right = (!full_column_width_12 * 9) + "px"
95
+
96
+ .suffix_1
97
+ :padding-right = !full_column_width_12 + "px"
98
+
99
+ .suffix_2
100
+ :padding-right = (!full_column_width_12 * 2) + "px"
101
+
102
+ .suffix_4
103
+ :padding-right = (!full_column_width_12 * 4) + "px"
104
+
105
+ .suffix_5
106
+ :padding-right = (!full_column_width_12 * 5) + "px"
107
+
108
+ .suffix_7
109
+ :padding-right = (!full_column_width_12 * 7) + "px"
110
+
111
+ .suffix_8
112
+ :padding-right = (!full_column_width_12 * 8) + "px"
113
+
114
+ .suffix_10
115
+ :padding-right = (!full_column_width_12 * 10) + "px"
116
+
117
+ .suffix_11
118
+ :padding-right = (!full_column_width_12 * 11) + "px"
119
+
120
+
121
+ .container_16
122
+ :margin-left auto
123
+ :margin-right auto
124
+ :width = !full_width + "px"
125
+
126
+ .grid_4
127
+ :width = (!full_column_width_16 * 4 - !gutter_width) + "px"
128
+
129
+ .grid_8
130
+ :width = (!full_column_width_16 * 8 - !gutter_width) + "px"
131
+
132
+ .grid_12
133
+ :width = (!full_column_width_16 * 12 - !gutter_width) + "px"
134
+
135
+ .grid_16
136
+ :width = (!full_column_width_16 * 16 - !gutter_width) + "px"
137
+
138
+ .grid_1
139
+ :width = (!full_column_width_16 - !gutter_width) + "px"
140
+
141
+ .grid_2
142
+ :width = (!full_column_width_16 * 2 - !gutter_width) + "px"
143
+
144
+ .grid_3
145
+ :width = (!full_column_width_16 * 3 - !gutter_width) + "px"
146
+
147
+ .grid_5
148
+ :width = (!full_column_width_16 * 5 - !gutter_width) + "px"
149
+
150
+ .grid_6
151
+ :width = (!full_column_width_16 * 6 - !gutter_width) + "px"
152
+
153
+ .grid_7
154
+ :width = (!full_column_width_16 * 7 - !gutter_width) + "px"
155
+
156
+ .grid_9
157
+ :width = (!full_column_width_16 * 9 - !gutter_width) + "px"
158
+
159
+ .grid_10
160
+ :width = (!full_column_width_16 * 10 - !gutter_width) + "px"
161
+
162
+ .grid_11
163
+ :width = (!full_column_width_16 * 11 - !gutter_width) + "px"
164
+
165
+ .grid_13
166
+ :width = (!full_column_width_16 * 13 - !gutter_width) + "px"
167
+
168
+ .grid_14
169
+ :width = (!full_column_width_16 * 14 - !gutter_width) + "px"
170
+
171
+ .grid_15
172
+ :width = (!full_column_width_16 * 15 - !gutter_width) + "px"
173
+
174
+ .prefix_4
175
+ :padding-left = (!full_column_width_16 * 4) + "px"
176
+
177
+ .prefix_8
178
+ :padding-left = (!full_column_width_16 * 8) + "px"
179
+
180
+ .prefix_12
181
+ :padding-left = (!full_column_width_16 * 12) + "px"
182
+
183
+ .prefix_1
184
+ :padding-left = !full_column_width_16 + "px"
185
+
186
+ .prefix_2
187
+ :padding-left = (!full_column_width_16 * 2) + "px"
188
+
189
+ .prefix_3
190
+ :padding-left = (!full_column_width_16 * 3) + "px"
191
+
192
+ .prefix_5
193
+ :padding-left = (!full_column_width_16 * 5) + "px"
194
+
195
+ .prefix_6
196
+ :padding-left = (!full_column_width_16 * 6) + "px"
197
+
198
+ .prefix_7
199
+ :padding-left = (!full_column_width_16 * 7) + "px"
200
+
201
+ .prefix_9
202
+ :padding-left = (!full_column_width_16 * 9) + "px"
203
+
204
+ .prefix_10
205
+ :padding-left = (!full_column_width_16 * 10) + "px"
206
+
207
+ .prefix_11
208
+ :padding-left = (!full_column_width_16 * 11) + "px"
209
+
210
+ .prefix_13
211
+ :padding-left = (!full_column_width_16 * 13) + "px"
212
+
213
+ .prefix_14
214
+ :padding-left = (!full_column_width_16 * 14) + "px"
215
+
216
+ .prefix_15
217
+ :padding-left = (!full_column_width_16 * 15) + "px"
218
+
219
+ .suffix_4
220
+ :padding-right = (!full_column_width_16 * 4) + "px"
221
+
222
+ .suffix_8
223
+ :padding-right = (!full_column_width_16 * 8) + "px"
224
+
225
+ .suffix_12
226
+ :padding-right = (!full_column_width_16 * 12) + "px"
227
+
228
+ .suffix_1
229
+ :padding-right = !full_column_width_16 + "px"
230
+
231
+ .suffix_2
232
+ :padding-right = (!full_column_width_16 * 2) + "px"
233
+
234
+ .suffix_3
235
+ :padding-right = (!full_column_width_16 * 3) + "px"
236
+
237
+ .suffix_5
238
+ :padding-right = (!full_column_width_16 * 5) + "px"
239
+
240
+ .suffix_6
241
+ :padding-right = (!full_column_width_16 * 6) + "px"
242
+
243
+ .suffix_7
244
+ :padding-right = (!full_column_width_16 * 7) + "px"
245
+
246
+ .suffix_9
247
+ :padding-right = (!full_column_width_16 * 9) + "px"
248
+
249
+ .suffix_10
250
+ :padding-right = (!full_column_width_16 * 10) + "px"
251
+
252
+ .suffix_11
253
+ :padding-right = (!full_column_width_16 * 11) + "px"
254
+
255
+ .suffix_13
256
+ :padding-right = (!full_column_width_16 * 13) + "px"
257
+
258
+ .suffix_14
259
+ :padding-right = (!full_column_width_16 * 14) + "px"
260
+
261
+ .suffix_15
262
+ :padding-right = (!full_column_width_16 * 15) + "px"
263
+
264
+
265
+ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16
266
+ :display inline
267
+ :float left
268
+ :margin-left = (!gutter_width / 2) + "px"
269
+ :margin-right = (!gutter_width / 2) + "px"
270
+
271
+
272
+ .alpha
273
+ :margin-left 0
274
+
275
+
276
+ .omega
277
+ :margin-right 0
278
+
279
+
280
+ .clear
281
+ :clear both
282
+ :display block
283
+ :overflow hidden
284
+ :visibility hidden
285
+ :width 0
286
+ :height 0
287
+
288
+
289
+ .clearfix
290
+ :display inline-block
291
+ :display block
292
+
293
+ &:after
294
+ :clear both
295
+ :content ' '
296
+ :display block
297
+ :font-size 0
298
+ :line-height 0
299
+ :visibility hidden
300
+ :width 0
301
+ :height 0
302
+
303
+
304
+ * html .clearfix
305
+ :height 1%
@@ -0,0 +1,3 @@
1
+ .body
2
+ = ::Maruku.new(@markdown).to_html
3
+ %br{:style => "clear:both"}
@@ -0,0 +1,4 @@
1
+ class Body < Milk::Component
2
+ local_properties :markdown
3
+ markdown_field :markdown, "Content"
4
+ end
@@ -0,0 +1,2 @@
1
+ %a.button{:class=>css_class, :href=>@href, :title=>@description}
2
+ &= @title
@@ -0,0 +1,17 @@
1
+ class Button < Milk::Component
2
+ local_properties :href, :icon, :title, :description
3
+
4
+ def name
5
+ @title + " button"
6
+ end
7
+
8
+ # highlight if current page shares base folder with target of link
9
+ def css_class
10
+ (page.link_to.split('/')[1] == @href.split('/')[1] || page.link_to?(@href)) && "active"
11
+ end
12
+
13
+ page_chooser :href, "Link target"
14
+ sprite_chooser :icon, "Icon", :main_class => "icon", :icon_classes => /\.(icon-([a-z]+))/
15
+ text_field :title, "Label text"
16
+ text_field :description, "Tooltip"
17
+ end
@@ -0,0 +1,3 @@
1
+ #foot
2
+ = ::Maruku.new(@markdown).to_html
3
+
@@ -0,0 +1,4 @@
1
+ class Foot < Milk::Component
2
+ global_properties :markdown
3
+ markdown_field :markdown, "Footer Text"
4
+ end
@@ -0,0 +1,4 @@
1
+ #foot
2
+ :text-align center
3
+ :font-size 90%
4
+ :color #888
@@ -0,0 +1,6 @@
1
+ #head
2
+ %ul
3
+ - @buttons.each do |button|
4
+ %li.grid_2= button.view
5
+ %br.clear
6
+
@@ -0,0 +1,4 @@
1
+ class Head < Milk::Component
2
+ global_properties :buttons
3
+ component_array :buttons, "Navigation buttons", :com_class => "Button"
4
+ end
@@ -0,0 +1,25 @@
1
+ #head
2
+ li a
3
+ :display block
4
+ &, &:visited, &:active, &:link
5
+ :color inherit
6
+ :text-decoration none
7
+ :border 1px solid #999
8
+ :text-align center
9
+ :font
10
+ :size 80%
11
+ :weight bold
12
+ :background-color #222
13
+ :color #08f
14
+ :padding
15
+ :top 5px
16
+ :bottom 5px
17
+ &:hover
18
+ :background-color #8af
19
+ :color #000
20
+ &.active
21
+ :background-color #8fa
22
+ :color #000
23
+ :padding
24
+ :top 20px
25
+ :bottom 20px
@@ -0,0 +1,3 @@
1
+ .container_12
2
+ = yield
3
+
@@ -0,0 +1,7 @@
1
+ #admin
2
+ :color #999
3
+ :text-align right
4
+ a
5
+ &, &:visited, &:active, &:link
6
+ :color #08f
7
+
@@ -0,0 +1,170 @@
1
+ // This file is generated using css2sass on reset.css from http://960.gs/
2
+ // This unifies the differences in the default styles of different browsers.
3
+ html
4
+ :margin 0
5
+ :padding 0
6
+ :border 0
7
+ :outline 0
8
+ :font-size 100%
9
+ :vertical-align baseline
10
+ :background transparent
11
+
12
+
13
+ body
14
+ :margin 0
15
+ :padding 0
16
+ :border 0
17
+ :outline 0
18
+ :font-size 100%
19
+ :vertical-align baseline
20
+ :background transparent
21
+ :line-height 1
22
+
23
+
24
+ div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p
25
+ :margin 0
26
+ :padding 0
27
+ :border 0
28
+ :outline 0
29
+ :font-size 100%
30
+ :vertical-align baseline
31
+ :background transparent
32
+
33
+
34
+ blockquote
35
+ :margin 0
36
+ :padding 0
37
+ :border 0
38
+ :outline 0
39
+ :font-size 100%
40
+ :vertical-align baseline
41
+ :background transparent
42
+ :quotes none
43
+
44
+ &:before, &:after
45
+ :content ''
46
+ :content none
47
+
48
+
49
+ pre, a, abbr, acronym, address, big, cite, code
50
+ :margin 0
51
+ :padding 0
52
+ :border 0
53
+ :outline 0
54
+ :font-size 100%
55
+ :vertical-align baseline
56
+ :background transparent
57
+
58
+
59
+ del
60
+ :margin 0
61
+ :padding 0
62
+ :border 0
63
+ :outline 0
64
+ :font-size 100%
65
+ :vertical-align baseline
66
+ :background transparent
67
+ :text-decoration line-through
68
+
69
+
70
+ dfn, em, font, img
71
+ :margin 0
72
+ :padding 0
73
+ :border 0
74
+ :outline 0
75
+ :font-size 100%
76
+ :vertical-align baseline
77
+ :background transparent
78
+
79
+
80
+ ins
81
+ :margin 0
82
+ :padding 0
83
+ :border 0
84
+ :outline 0
85
+ :font-size 100%
86
+ :vertical-align baseline
87
+ :background transparent
88
+ :text-decoration none
89
+
90
+
91
+ kbd
92
+ :margin 0
93
+ :padding 0
94
+ :border 0
95
+ :outline 0
96
+ :font-size 100%
97
+ :vertical-align baseline
98
+ :background transparent
99
+
100
+
101
+ q
102
+ :margin 0
103
+ :padding 0
104
+ :border 0
105
+ :outline 0
106
+ :font-size 100%
107
+ :vertical-align baseline
108
+ :background transparent
109
+ :quotes none
110
+
111
+ &:before, &:after
112
+ :content ''
113
+ :content none
114
+
115
+
116
+ s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd
117
+ :margin 0
118
+ :padding 0
119
+ :border 0
120
+ :outline 0
121
+ :font-size 100%
122
+ :vertical-align baseline
123
+ :background transparent
124
+
125
+
126
+ ol, ul
127
+ :margin 0
128
+ :padding 0
129
+ :border 0
130
+ :outline 0
131
+ :font-size 100%
132
+ :vertical-align baseline
133
+ :background transparent
134
+ :list-style none
135
+
136
+
137
+ li, fieldset, form, label, legend
138
+ :margin 0
139
+ :padding 0
140
+ :border 0
141
+ :outline 0
142
+ :font-size 100%
143
+ :vertical-align baseline
144
+ :background transparent
145
+
146
+
147
+ table
148
+ :margin 0
149
+ :padding 0
150
+ :border 0
151
+ :outline 0
152
+ :font-size 100%
153
+ :vertical-align baseline
154
+ :background transparent
155
+ :border-collapse collapse
156
+ :border-spacing 0
157
+
158
+
159
+ caption, tbody, tfoot, thead, tr, th, td
160
+ :margin 0
161
+ :padding 0
162
+ :border 0
163
+ :outline 0
164
+ :font-size 100%
165
+ :vertical-align baseline
166
+ :background transparent
167
+
168
+
169
+ html :focus
170
+ :outline 0
File without changes
@@ -0,0 +1,65 @@
1
+ // This file is generated using css2sass on text.css from http://960.gs/
2
+ // This gives some good defaults to start with for fonts
3
+ // Feel free to edit as needed
4
+ body
5
+ :font 13px/1.5 Helvetica,Arial,'Liberation Sans',FreeSans,sans-serif
6
+
7
+
8
+ a:focus
9
+ :outline 1px dotted invert
10
+
11
+
12
+ hr
13
+ :border 0 #ccc solid
14
+ :border-top-width 1px
15
+ :clear both
16
+ :height 0
17
+ :margin-bottom 20px
18
+
19
+
20
+ h1
21
+ :font-size 25px
22
+ :margin-bottom 20px
23
+
24
+
25
+ h2
26
+ :font-size 23px
27
+ :margin-bottom 20px
28
+
29
+
30
+ h3
31
+ :font-size 21px
32
+ :margin-bottom 20px
33
+
34
+
35
+ h4
36
+ :font-size 19px
37
+ :margin-bottom 20px
38
+
39
+
40
+ h5
41
+ :font-size 17px
42
+ :margin-bottom 20px
43
+
44
+
45
+ h6
46
+ :font-size 15px
47
+ :margin-bottom 20px
48
+
49
+
50
+ ol
51
+ :list-style decimal
52
+ :margin-bottom 20px
53
+
54
+
55
+ ul
56
+ :list-style disc
57
+ :margin-bottom 20px
58
+
59
+
60
+ li
61
+ :margin-left 30px
62
+
63
+
64
+ p, dl, pre, table, address, fieldset
65
+ :margin-bottom 20px
@@ -0,0 +1,15 @@
1
+ !!! xml
2
+ !!! strict
3
+ %html{:xmlns=>"http://www.w3.org/1999/xhtml", :lang=>"en"}
4
+ %head
5
+ %meta{:"http-equiv"=>"content-type", :content=>"application/xhtml+xml; charset=UTF-8"}
6
+ %link{:rel=>"shortcut icon", :type=>"image/x-icon", :href=>"/favicon.ico"}/
7
+ - if @keywords && @keywords.length > 0
8
+ %meta{:name=>"keywords", :content=>@keywords}
9
+ - if @description && @description.length > 0
10
+ %meta{:name=>"description", :content=>@description}
11
+ %link{:rel=>"stylesheet", :type=>"text/css", :media=>"screen", :href=>"/style/style.css"}/
12
+ %title&= (@title || @pagename) + " - " + Milk::SITE_NAME
13
+ %body
14
+ = yield
15
+
@@ -0,0 +1,15 @@
1
+ --- &id001 !ruby/object:Milk::Page
2
+ components:
3
+ - !ruby/object:Head
4
+ parent: *id001
5
+ - !ruby/object:Body
6
+ markdown: |-
7
+ # About Us
8
+
9
+ Description of about page
10
+ parent: *id001
11
+ - !ruby/object:Foot
12
+ parent: *id001
13
+ title: About Us
14
+ keywords: ""
15
+ description: ""
@@ -0,0 +1,15 @@
1
+ --- &id001 !ruby/object:Milk::Page
2
+ components:
3
+ - !ruby/object:Head
4
+ parent: *id001
5
+ - !ruby/object:Body
6
+ markdown: |-
7
+ # Home
8
+
9
+ Description of home page
10
+ parent: *id001
11
+ - !ruby/object:Foot
12
+ parent: *id001
13
+ title: Home
14
+ keywords: keywords, that, are, relevent, to, search, engines
15
+ description: This is a description of this site.
@@ -0,0 +1,15 @@
1
+ --- &id001 !ruby/object:Milk::Page
2
+ components:
3
+ - !ruby/object:Head
4
+ parent: *id001
5
+ - !ruby/object:Body
6
+ markdown: |-
7
+ # News
8
+
9
+ Description of news page
10
+ parent: *id001
11
+ - !ruby/object:Foot
12
+ parent: *id001
13
+ title: News
14
+ keywords: ""
15
+ description: ""
@@ -0,0 +1,15 @@
1
+ --- &id001 !ruby/object:Milk::Page
2
+ components:
3
+ - !ruby/object:Head
4
+ parent: *id001
5
+ - !ruby/object:Body
6
+ markdown: |-
7
+ # 404 - Page not found
8
+
9
+ The page you were looking for was not found
10
+ parent: *id001
11
+ - !ruby/object:Foot
12
+ parent: *id001
13
+ title: 404 - Page not found
14
+ keywords: ""
15
+ description: ""
@@ -0,0 +1,15 @@
1
+ --- &id001 !ruby/object:Milk::Page
2
+ components:
3
+ - !ruby/object:Head
4
+ parent: *id001
5
+ - !ruby/object:Body
6
+ markdown: |-
7
+ # Products
8
+
9
+ Description of products page
10
+ parent: *id001
11
+ - !ruby/object:Foot
12
+ parent: *id001
13
+ title: Products
14
+ keywords: ""
15
+ description: ""
Binary file
@@ -0,0 +1,2 @@
1
+ This folder contains images uploaded by the user used as content.
2
+
File without changes
@@ -0,0 +1,155 @@
1
+ #head { padding-top: 20px; padding-bottom: 20px; }
2
+ #head li a { display: block; color: inherit; text-decoration: none; border: 1px solid #999; text-align: center; font-size: 80%; font-weight: bold; background-color: #222; color: #08f; padding-top: 5px; padding-bottom: 5px; }
3
+ #head li a:hover { background-color: #8af; color: #000; }
4
+ #head li a.active { background-color: #8fa; color: #000; }.container_12 { margin-left: auto; margin-right: auto; width: 960px; }
5
+ .container_12 .grid_3 { width: 220px; }
6
+ .container_12 .grid_6 { width: 460px; }
7
+ .container_12 .grid_9 { width: 700px; }
8
+ .container_12 .grid_12 { width: 940px; }
9
+ .container_12 .grid_1 { width: 60px; }
10
+ .container_12 .grid_2 { width: 140px; }
11
+ .container_12 .grid_4 { width: 300px; }
12
+ .container_12 .grid_5 { width: 380px; }
13
+ .container_12 .grid_7 { width: 540px; }
14
+ .container_12 .grid_8 { width: 620px; }
15
+ .container_12 .grid_10 { width: 780px; }
16
+ .container_12 .grid_11 { width: 860px; }
17
+ .container_12 .prefix_3 { padding-left: 240px; }
18
+ .container_12 .prefix_6 { padding-left: 480px; }
19
+ .container_12 .prefix_9 { padding-left: 720px; }
20
+ .container_12 .prefix_1 { padding-left: 80px; }
21
+ .container_12 .prefix_2 { padding-left: 160px; }
22
+ .container_12 .prefix_4 { padding-left: 320px; }
23
+ .container_12 .prefix_5 { padding-left: 400px; }
24
+ .container_12 .prefix_7 { padding-left: 560px; }
25
+ .container_12 .prefix_8 { padding-left: 640px; }
26
+ .container_12 .prefix_10 { padding-left: 800px; }
27
+ .container_12 .prefix_11 { padding-left: 880px; }
28
+ .container_12 .suffix_3 { padding-right: 240px; }
29
+ .container_12 .suffix_6 { padding-right: 480px; }
30
+ .container_12 .suffix_9 { padding-right: 720px; }
31
+ .container_12 .suffix_1 { padding-right: 80px; }
32
+ .container_12 .suffix_2 { padding-right: 160px; }
33
+ .container_12 .suffix_4 { padding-right: 320px; }
34
+ .container_12 .suffix_5 { padding-right: 400px; }
35
+ .container_12 .suffix_7 { padding-right: 560px; }
36
+ .container_12 .suffix_8 { padding-right: 640px; }
37
+ .container_12 .suffix_10 { padding-right: 800px; }
38
+ .container_12 .suffix_11 { padding-right: 880px; }
39
+
40
+ .container_16 { margin-left: auto; margin-right: auto; width: 960px; }
41
+ .container_16 .grid_4 { width: 220px; }
42
+ .container_16 .grid_8 { width: 460px; }
43
+ .container_16 .grid_12 { width: 700px; }
44
+ .container_16 .grid_16 { width: 940px; }
45
+ .container_16 .grid_1 { width: 40px; }
46
+ .container_16 .grid_2 { width: 100px; }
47
+ .container_16 .grid_3 { width: 160px; }
48
+ .container_16 .grid_5 { width: 280px; }
49
+ .container_16 .grid_6 { width: 340px; }
50
+ .container_16 .grid_7 { width: 400px; }
51
+ .container_16 .grid_9 { width: 520px; }
52
+ .container_16 .grid_10 { width: 580px; }
53
+ .container_16 .grid_11 { width: 640px; }
54
+ .container_16 .grid_13 { width: 760px; }
55
+ .container_16 .grid_14 { width: 820px; }
56
+ .container_16 .grid_15 { width: 880px; }
57
+ .container_16 .prefix_4 { padding-left: 240px; }
58
+ .container_16 .prefix_8 { padding-left: 480px; }
59
+ .container_16 .prefix_12 { padding-left: 720px; }
60
+ .container_16 .prefix_1 { padding-left: 60px; }
61
+ .container_16 .prefix_2 { padding-left: 120px; }
62
+ .container_16 .prefix_3 { padding-left: 180px; }
63
+ .container_16 .prefix_5 { padding-left: 300px; }
64
+ .container_16 .prefix_6 { padding-left: 360px; }
65
+ .container_16 .prefix_7 { padding-left: 420px; }
66
+ .container_16 .prefix_9 { padding-left: 540px; }
67
+ .container_16 .prefix_10 { padding-left: 600px; }
68
+ .container_16 .prefix_11 { padding-left: 660px; }
69
+ .container_16 .prefix_13 { padding-left: 780px; }
70
+ .container_16 .prefix_14 { padding-left: 840px; }
71
+ .container_16 .prefix_15 { padding-left: 900px; }
72
+ .container_16 .suffix_4 { padding-right: 240px; }
73
+ .container_16 .suffix_8 { padding-right: 480px; }
74
+ .container_16 .suffix_12 { padding-right: 720px; }
75
+ .container_16 .suffix_1 { padding-right: 60px; }
76
+ .container_16 .suffix_2 { padding-right: 120px; }
77
+ .container_16 .suffix_3 { padding-right: 180px; }
78
+ .container_16 .suffix_5 { padding-right: 300px; }
79
+ .container_16 .suffix_6 { padding-right: 360px; }
80
+ .container_16 .suffix_7 { padding-right: 420px; }
81
+ .container_16 .suffix_9 { padding-right: 540px; }
82
+ .container_16 .suffix_10 { padding-right: 600px; }
83
+ .container_16 .suffix_11 { padding-right: 660px; }
84
+ .container_16 .suffix_13 { padding-right: 780px; }
85
+ .container_16 .suffix_14 { padding-right: 840px; }
86
+ .container_16 .suffix_15 { padding-right: 900px; }
87
+
88
+ .grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12, .grid_13, .grid_14, .grid_15, .grid_16 { display: inline; float: left; margin-left: 10px; margin-right: 10px; }
89
+
90
+ .alpha { margin-left: 0; }
91
+
92
+ .omega { margin-right: 0; }
93
+
94
+ .clear { clear: both; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; }
95
+
96
+ .clearfix { display: inline-block; display: block; }
97
+ .clearfix:after { clear: both; content: ' '; display: block; font-size: 0; line-height: 0; visibility: hidden; width: 0; height: 0; }
98
+
99
+ * html .clearfix { height: 1%; }body { font: 13px/1.5 Helvetica,Arial,'Liberation Sans',FreeSans,sans-serif; }
100
+
101
+ a:focus { outline: 1px dotted invert; }
102
+
103
+ hr { border: 0 #ccc solid; border-top-width: 1px; clear: both; height: 0; margin-bottom: 20px; }
104
+
105
+ h1 { font-size: 25px; margin-bottom: 20px; }
106
+
107
+ h2 { font-size: 23px; margin-bottom: 20px; }
108
+
109
+ h3 { font-size: 21px; margin-bottom: 20px; }
110
+
111
+ h4 { font-size: 19px; margin-bottom: 20px; }
112
+
113
+ h5 { font-size: 17px; margin-bottom: 20px; }
114
+
115
+ h6 { font-size: 15px; margin-bottom: 20px; }
116
+
117
+ ol { list-style: decimal; margin-bottom: 20px; }
118
+
119
+ ul { list-style: disc; margin-bottom: 20px; }
120
+
121
+ li { margin-left: 30px; }
122
+
123
+ p, dl, pre, table, address, fieldset { margin-bottom: 20px; }#admin { color: #999; text-align: right; }#foot { text-align: center; font-size: 90%; color: #888; }html { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
124
+
125
+ body { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; line-height: 1; }
126
+
127
+ div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
128
+
129
+ blockquote { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; quotes: none; }
130
+ blockquote:before, blockquote:after { content: ''; content: none; }
131
+
132
+ pre, a, abbr, acronym, address, big, cite, code { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
133
+
134
+ del { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; text-decoration: line-through; }
135
+
136
+ dfn, em, font, img { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
137
+
138
+ ins { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; text-decoration: none; }
139
+
140
+ kbd { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
141
+
142
+ q { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; quotes: none; }
143
+ q:before, q:after { content: ''; content: none; }
144
+
145
+ s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
146
+
147
+ ol, ul { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; list-style: none; }
148
+
149
+ li, fieldset, form, label, legend { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
150
+
151
+ table { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; border-collapse: collapse; border-spacing: 0; }
152
+
153
+ caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; }
154
+
155
+ html :focus { outline: 0; }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: milk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Caswell
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-16 00:00:00 -05:00
12
+ date: 2009-06-24 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -44,13 +44,54 @@ dependencies:
44
44
  version:
45
45
  description: Milk is a rack based cms system built for ease of use and simplicity. Milk tastes great with and without cookies. The public facing aspect is static html files, and the admin side is super easy to use.
46
46
  email: tim@creationix.com
47
- executables: []
48
-
47
+ executables:
48
+ - milk
49
49
  extensions: []
50
50
 
51
51
  extra_rdoc_files: []
52
52
 
53
53
  files:
54
+ - site_template
55
+ - site_template/public
56
+ - site_template/public/robots.txt
57
+ - site_template/public/style
58
+ - site_template/public/style/style.css
59
+ - site_template/public/images
60
+ - site_template/public/images/README.txt
61
+ - site_template/public/favicon.ico
62
+ - site_template/tmp
63
+ - site_template/tmp/restart.txt
64
+ - site_template/config.ru
65
+ - site_template/design
66
+ - site_template/design/head.sass
67
+ - site_template/design/foot.haml
68
+ - site_template/design/body.rb
69
+ - site_template/design/head.rb
70
+ - site_template/design/960.sass
71
+ - site_template/design/text.sass
72
+ - site_template/design/sprites.sass
73
+ - site_template/design/head.haml
74
+ - site_template/design/page.sass
75
+ - site_template/design/foot.rb
76
+ - site_template/design/page.haml
77
+ - site_template/design/xhtml.haml
78
+ - site_template/design/button.haml
79
+ - site_template/design/foot.sass
80
+ - site_template/design/reset.sass
81
+ - site_template/design/body.haml
82
+ - site_template/design/button.rb
83
+ - site_template/pages
84
+ - site_template/pages/News.yaml
85
+ - site_template/pages/NotFound.yaml
86
+ - site_template/pages/Home.yaml
87
+ - site_template/pages/Products.yaml
88
+ - site_template/pages/About.yaml
89
+ - site_template/config
90
+ - site_template/config/head.yaml
91
+ - site_template/config/users.yaml
92
+ - site_template/config/config.yaml
93
+ - site_template/config/foot.yaml
94
+ - site_template/Rakefile
54
95
  - lib
55
96
  - lib/milk
56
97
  - lib/milk/page.rb
@@ -76,14 +117,13 @@ files:
76
117
  - lib/milk/fields/component.haml
77
118
  - lib/milk/component.rb
78
119
  - lib/milk/application.rb
79
- - lib/milk/templates
80
- - lib/milk/templates/rakefile
81
- - lib/milk/templates/restart
82
- - lib/milk/templates/bzrignore
83
- - lib/milk/templates/rackup
84
120
  - lib/milk.rb
85
121
  - LICENSE
122
+ - milk-0.0.5.gem
123
+ - Rakefile
86
124
  - milk.gemspec
125
+ - bin
126
+ - bin/milk
87
127
  has_rdoc: true
88
128
  homepage: http://milk.rubyforge.org
89
129
  post_install_message:
@@ -1,3 +0,0 @@
1
- haxe/*.swf
2
- public/cache/*
3
- public/style/style.css