radiant-site_templates-extension 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/README +3 -0
  2. data/Rakefile +136 -0
  3. data/db/templates/empty.yml +2 -0
  4. data/db/templates/roasters.yml +7826 -0
  5. data/db/templates/simple-blog.yml +251 -0
  6. data/db/templates/styled-blog.yml +535 -0
  7. data/lib/radiant-site_templates-extension/version.rb +3 -0
  8. data/lib/radiant-site_templates-extension.rb +2 -0
  9. data/lib/tasks/site_templates_extension_tasks.rake +55 -0
  10. data/public/images/roasters/banner.jpg +0 -0
  11. data/public/images/roasters/closelabel.gif +0 -0
  12. data/public/images/roasters/comment.png +0 -0
  13. data/public/images/roasters/gallery1.jpg +0 -0
  14. data/public/images/roasters/gallery2.jpg +0 -0
  15. data/public/images/roasters/gallery3.jpg +0 -0
  16. data/public/images/roasters/gallery4.jpg +0 -0
  17. data/public/images/roasters/gift.gif +0 -0
  18. data/public/images/roasters/green.gif +0 -0
  19. data/public/images/roasters/nav-background.gif +0 -0
  20. data/public/images/roasters/nav-divider.gif +0 -0
  21. data/public/images/roasters/nextlabel.gif +0 -0
  22. data/public/images/roasters/open.gif +0 -0
  23. data/public/images/roasters/preview-1.jpg +0 -0
  24. data/public/images/roasters/preview.jpg +0 -0
  25. data/public/images/roasters/prevlabel.gif +0 -0
  26. data/public/images/roasters/prize.gif +0 -0
  27. data/public/images/roasters/recycle.gif +0 -0
  28. data/public/images/roasters/rss.gif +0 -0
  29. data/public/images/roasters/thumb-grinder.jpg +0 -0
  30. data/public/images/roasters/thumb-grower.jpg +0 -0
  31. data/public/images/roasters/thumb-roaster.jpg +0 -0
  32. data/public/images/roasters/truck.gif +0 -0
  33. data/radiant-site_templates-extension.gemspec +30 -0
  34. data/site_templates_extension.rb +8 -0
  35. metadata +101 -0
@@ -0,0 +1,535 @@
1
+ --- !omap
2
+ - description: Setup Radiant as a fully styled weblog.
3
+ - name: Styled Blog
4
+ - records: !omap
5
+ - Layouts: !omap
6
+ - 1:
7
+ name: Normal
8
+ content_type: text/html
9
+ id: 1
10
+ content: |
11
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
12
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
13
+ <html>
14
+ <head>
15
+ <title><r:title /></title>
16
+ <link href="/rss/" rel="alternate" title="RSS" type="application/rss+xml" />
17
+ <r:stylesheet slug="styles.css" as="link" />
18
+ </head>
19
+ <body>
20
+ <div id="page">
21
+ <r:snippet name="header" />
22
+ <div id="main">
23
+ <div id="content-wrapper">
24
+ <div id="content">
25
+ <r:unless_path matches="^/$"><h1><r:title /></h1></r:unless_path>
26
+ <r:content />
27
+ <r:if_content part="extended">
28
+ <div id="extended">
29
+ <r:content part="extended" />
30
+ </div>
31
+ </r:if_content>
32
+ <r:if_path matches="^/articles/\d{4}/\d{2}/\d{2}/.+"><r:unless_path matches="-archives/$"><p class="info">Posted by <r:author /> on <r:date /></p></r:unless_path></r:if_path>
33
+ </div>
34
+ </div>
35
+ <div id="sidebar-wrapper">
36
+ <div id="sidebar">
37
+ <r:content part="sidebar" inherit="true" />
38
+ </div>
39
+ </div>
40
+ </div>
41
+ <r:snippet name="footer" />
42
+ </div>
43
+ </body>
44
+ </html>
45
+
46
+ - 2:
47
+ name: XML Feed
48
+ content_type: text/xml
49
+ id: 2
50
+ content: |
51
+ <r:content />
52
+
53
+ - Snippets: !omap
54
+ - 2:
55
+ name: footer
56
+ filter_id:
57
+ id: 2
58
+ content: |
59
+ <hr class="hidden" />
60
+ <div id="footer">
61
+ <p>Copyright &copy; <r:date format="%Y" />, Your Name Here. All rights reserved.<br />
62
+ This site is powered by <a href="http://radiantcms.org/">Radiant CMS</a>.</p>
63
+ </div>
64
+
65
+ - 1:
66
+ name: header
67
+ filter_id:
68
+ id: 1
69
+ content: |
70
+ <div id="header">
71
+ <div id="site-title"><r:if_path matches="^/$">Your Blog Name</r:if_path><r:unless_path matches="^/$"><a href="/">Your Blog Name</a></r:unless_path></div>
72
+ <div id="site-subtitle">a really amusing tag-line here</div>
73
+ </div>
74
+ <hr class="hidden" />
75
+
76
+ - Pages: !omap
77
+ - 1:
78
+ slug: /
79
+ class_name:
80
+ virtual: false
81
+ title: Home Page
82
+ id: 1
83
+ breadcrumb: Home
84
+ parent_id:
85
+ status_id: 100
86
+ published_at: 2011-03-22 14:52:18 Z
87
+ layout_id: 1
88
+ - 2:
89
+ slug: file-not-found
90
+ class_name: FileNotFoundPage
91
+ virtual: true
92
+ title: File Not Found
93
+ id: 2
94
+ breadcrumb: File Not Found
95
+ parent_id: 1
96
+ status_id: 100
97
+ published_at: 2011-03-22 14:52:18 Z
98
+ layout_id:
99
+ - 3:
100
+ slug: rss
101
+ class_name:
102
+ virtual: false
103
+ title: RSS Feed
104
+ id: 3
105
+ breadcrumb: RSS Feed
106
+ parent_id: 1
107
+ status_id: 100
108
+ published_at: 2011-03-22 14:52:18 Z
109
+ layout_id: 2
110
+ - 4:
111
+ slug: articles
112
+ class_name: ArchivePage
113
+ virtual: false
114
+ title: Articles
115
+ id: 4
116
+ breadcrumb: Articles
117
+ parent_id: 1
118
+ status_id: 100
119
+ published_at: 2011-03-22 14:52:18 Z
120
+ layout_id:
121
+ - 5:
122
+ slug: first-post
123
+ class_name:
124
+ virtual: false
125
+ title: First Post
126
+ id: 5
127
+ breadcrumb: First Post
128
+ parent_id: 4
129
+ status_id: 100
130
+ published_at: 2010-06-09 00:00:00 Z
131
+ layout_id:
132
+ - 6:
133
+ slug: second-post
134
+ class_name:
135
+ virtual: false
136
+ title: Second Post
137
+ id: 6
138
+ breadcrumb: Second Post
139
+ parent_id: 4
140
+ status_id: 100
141
+ published_at: 2010-06-10 00:00:00 Z
142
+ layout_id:
143
+ - 7:
144
+ slug: third-post
145
+ class_name:
146
+ virtual: false
147
+ title: Third Post
148
+ id: 7
149
+ breadcrumb: Third Post
150
+ parent_id: 4
151
+ status_id: 100
152
+ published_at: 2011-01-11 00:00:00 Z
153
+ layout_id:
154
+ - 8:
155
+ slug: about
156
+ class_name:
157
+ virtual: false
158
+ title: About
159
+ id: 8
160
+ breadcrumb: About
161
+ parent_id: 1
162
+ status_id: 100
163
+ published_at: 2011-03-22 14:52:18 Z
164
+ layout_id:
165
+ - 9:
166
+ slug: monthly-archives
167
+ class_name: ArchiveMonthIndexPage
168
+ virtual: true
169
+ title: "%B %Y Archives"
170
+ id: 9
171
+ breadcrumb: Monthly Archives
172
+ parent_id: 4
173
+ status_id: 100
174
+ published_at: 2011-03-22 14:52:18 Z
175
+ layout_id:
176
+ - 10:
177
+ slug: css
178
+ class_name: StylesheetPage
179
+ virtual: true
180
+ title: css
181
+ id: 10
182
+ breadcrumb: css
183
+ parent_id: 1
184
+ status_id: 100
185
+ published_at: 2011-03-22 14:52:18 Z
186
+ layout_id:
187
+ - 11:
188
+ slug: styles.css
189
+ class_name: StylesheetPage
190
+ virtual: true
191
+ title: styles.css
192
+ id: 11
193
+ breadcrumb: styles.css
194
+ parent_id: 10
195
+ status_id: 100
196
+ published_at: 2011-03-22 14:52:18 Z
197
+ layout_id:
198
+ - PageParts: !omap
199
+ - 1:
200
+ name: body
201
+ filter_id:
202
+ page_id: 1
203
+ id: 1
204
+ content: |
205
+ <r:find path="/articles/">
206
+
207
+ <r:children:each limit="1" by="published_at" order="desc">
208
+ <div class="first entry">
209
+ <h3><r:link /></h3>
210
+ <r:content />
211
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
212
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
213
+ </div>
214
+ </r:children:each>
215
+
216
+ <r:children:each limit="4" offset="1" by="published_at" order="desc">
217
+ <div class="entry">
218
+ <h3><r:link /></h3>
219
+ <r:content />
220
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
221
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
222
+ </div>
223
+ </r:children:each>
224
+
225
+ </r:find>
226
+
227
+ - 2:
228
+ name: body
229
+ filter_id: Textile
230
+ page_id: 2
231
+ id: 2
232
+ content: |
233
+ The file you were looking for could not be found.
234
+
235
+ Attempted URL: @<r:attempted_url />@
236
+
237
+ It is possible that you typed the URL incorrectly or that you clicked on a bad link.
238
+
239
+ "<< Back to Home Page":/
240
+
241
+ - 3:
242
+ name: body
243
+ filter_id:
244
+ page_id: 3
245
+ id: 3
246
+ content: |
247
+ <?xml version="1.0" encoding="UTF-8"?>
248
+ <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
249
+ <channel>
250
+ <title>Article RSS Feed</title>
251
+ <link>http://example.com<r:path /></link>
252
+ <language>en-us</language>
253
+ <ttl>40</ttl>
254
+ <description>The main blog feed for my Web site.</description>
255
+ <r:find path="/articles/">
256
+ <r:children:each limit="10" by="published_at" order="desc">
257
+ <item>
258
+ <title><r:title /></title>
259
+ <description><r:escape_html><r:content /></r:escape_html></description>
260
+ <pubDate><r:rfc1123_date /></pubDate>
261
+ <guid>http://example.com<r:path /></guid>
262
+ <link>http://example.com<r:path /></link>
263
+ </item>
264
+ </r:children:each>
265
+ </r:find>
266
+ </channel>
267
+ </rss>
268
+
269
+ - 4:
270
+ name: body
271
+ filter_id:
272
+ page_id: 4
273
+ id: 4
274
+ content: |-
275
+ <r:children:each limit="5" by="published_at" order="desc">
276
+ <div class="entry">
277
+ <h3><r:link /></h3>
278
+ <r:content />
279
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
280
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
281
+ </div>
282
+ </r:children:each>
283
+ - 5:
284
+ name: body
285
+ filter_id: Textile
286
+ page_id: 5
287
+ id: 5
288
+ content: |
289
+ This post uses "textile":http://www.textism.com/tools/textile/.
290
+
291
+ - 6:
292
+ name: body
293
+ filter_id: Markdown
294
+ page_id: 6
295
+ id: 6
296
+ content: |
297
+ This post uses **Markdown**.
298
+
299
+ - 8:
300
+ name: body
301
+ filter_id:
302
+ page_id: 7
303
+ id: 8
304
+ content: This is the third post.
305
+ - 9:
306
+ name: body
307
+ filter_id: Textile
308
+ page_id: 8
309
+ id: 9
310
+ content: This is just an example of how Radiant can be used to power a Weblog.
311
+ - 12:
312
+ name: body
313
+ filter_id:
314
+ page_id: 9
315
+ id: 12
316
+ content: |-
317
+ <r:archive:children:each by="published_at" order="desc">
318
+ <div class="entry">
319
+ <h3><r:link /></h3>
320
+ <r:content />
321
+ <r:if_content part="extended"><r:link anchor="extended">Continue Reading&#8230;</r:link></r:if_content>
322
+ <p class="info">Posted by <r:author /> on <r:date format="%b %d, %Y" /></p>
323
+ </div>
324
+ </r:archive:children:each>
325
+ - 13:
326
+ name: body
327
+ filter_id:
328
+ page_id: 10
329
+ id: 13
330
+ content:
331
+ - 14:
332
+ name: body
333
+ filter_id: ""
334
+ page_id: 11
335
+ id: 14
336
+ content: |-
337
+ a {
338
+ color: #3256B6;
339
+ }
340
+ a:visited {
341
+ color: #cc9;
342
+ }
343
+ a:hover, a:visited:hover {
344
+ color: #e00;
345
+ text-decoration: none;
346
+ }
347
+ body {
348
+ background-color: #041a61;
349
+ font-family: Verdana, Arial, Helvetica, sans-serif;
350
+ font-size: 80%;
351
+ padding: 0;
352
+ margin: 0;
353
+ text-align: center;
354
+ }
355
+ h1 {
356
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
357
+ font-size: 250%;
358
+ font-weight: normal;
359
+ }
360
+ h3 {
361
+ color: #999;
362
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
363
+ font-size: 180%;
364
+ font-weight: normal;
365
+ margin-top: 1.5em;
366
+ margin-bottom: .5em;
367
+ }
368
+ .hidden {
369
+ display: none;
370
+ }
371
+ .clear {
372
+ clear: both;
373
+ }
374
+ #page {
375
+ margin-left: auto;
376
+ margin-right: auto;
377
+ width: 730px;
378
+ text-align: left;
379
+ }
380
+ #header {
381
+ background-color: #4f57c5;
382
+ border-bottom: 4px solid #fc0;
383
+ color: white;
384
+ font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
385
+ padding: 0;
386
+ padding-top: 30px;
387
+ padding-bottom: 30px;
388
+ text-align: center;
389
+ }
390
+ #site-title {
391
+ color: white;
392
+ font-size: 325%;
393
+ }
394
+ #site-title a, #site-title a:visited {
395
+ color: white;
396
+ text-decoration: none;
397
+ }
398
+ #site-title a:hover, #site-title a:hover {
399
+ color: white;
400
+ text-decoration: underline;
401
+ }
402
+ #site-subtitle {
403
+ font-style: italic;
404
+ letter-spacing: 2px;
405
+ text-transform: lowercase;
406
+ }
407
+ #main {
408
+ background-color: white;
409
+ border-bottom: 4px solid #fc0;
410
+ float: left;
411
+ width: 100%;
412
+ }
413
+ #content-wrapper {
414
+ float: left;
415
+ width: 500px;
416
+ }
417
+ #content {
418
+ padding: 25px;
419
+ border-right: 1px dotted #a3a39c;
420
+ }
421
+ #content h1 {
422
+ margin-top: 0;
423
+ }
424
+ #content h3 a {
425
+ border-bottom: 1px dotted #a3a39c;
426
+ display: block;
427
+ padding-bottom: 2px;
428
+ text-decoration: none;
429
+ }
430
+ #content p {
431
+ line-height: 160%;
432
+ }
433
+ #content .info {
434
+ color: #b0af99;
435
+ font-size: 80%;
436
+ margin-top: 1.5em;
437
+ }
438
+ #content .entry .info {
439
+ margin-top: 1em;
440
+ }
441
+ #content .first.entry {
442
+ background-color: #f7f3e8;
443
+ margin: -25px;
444
+ margin-bottom: 0;
445
+ padding: 25px;
446
+ }
447
+ #content .first.entry h3 {
448
+ margin-top: 0.25em;
449
+ }
450
+ #sidebar-wrapper {
451
+ float: right;
452
+ width: 225px;
453
+ }
454
+ #sidebar {
455
+ font-size: 90%;
456
+ padding: 15px;
457
+ padding-top: 0px;
458
+ }
459
+ #sidebar h3 {
460
+ font-size: 160%;
461
+ }
462
+ #sidebar p {
463
+ line-height: 140%;
464
+ }
465
+ #sidebar ul {
466
+ margin-left: 1.5em;
467
+ padding: 0;
468
+ }
469
+ #sidebar li {
470
+ margin-bottom: .25em;
471
+ }
472
+ #footer {
473
+ color: #818cb0;
474
+ float: left;
475
+ font-size: 90%;
476
+ padding-top: 1px;
477
+ padding-bottom: 20px;
478
+ width: 100%;
479
+ }
480
+ - 7:
481
+ name: sidebar
482
+ filter_id: Textile
483
+ page_id: 1
484
+ id: 7
485
+ content: |-
486
+ h3. About Me
487
+
488
+ I'm just a demonstration of how easy it is to use Radiant to power a blog. "More...":/about/
489
+
490
+ h3. Favorite Sites
491
+
492
+ * "Radiant CMS":http://radiantcms.org
493
+ * "Ruby-Lang":http://ruby-lang.org
494
+ * "Wiseheart Design":http://wiseheartdesign.com
495
+ * "AVLUX Hosting":http://avlux.net
496
+
497
+ h3. Recent Entries
498
+ <r:if_path matches="^/$">
499
+ <r:find path="/articles/"><r:children:each limit="10" offset="5" by="published_at" order="desc">
500
+ * <r:link /></r:children:each></r:find>
501
+ </r:if_path>
502
+ <r:unless_path matches="^/$">
503
+ <r:find path="/articles/"><r:children:each limit="10" by="published_at" order="desc">
504
+ * <r:link /></r:children:each></r:find>
505
+ </r:unless_path>
506
+
507
+ "Archives...":/articles/
508
+
509
+ h3. Syndicate
510
+
511
+ "Articles RSS Feed":/rss/
512
+ - 10:
513
+ name: sidebar
514
+ filter_id: Textile
515
+ page_id: 8
516
+ id: 10
517
+ content: |-
518
+ h3. Contact Me
519
+
520
+ List your contact information here.
521
+ - 11:
522
+ name: sidebar
523
+ filter_id:
524
+ page_id: 4
525
+ id: 11
526
+ content: |-
527
+ <h3>Archives By Month</h3>
528
+ <ul>
529
+ <r:find path="/articles/">
530
+ <r:children:each by="published_at" order="desc">
531
+ <r:header><li><a href="<r:date format="/articles/%Y/%m/" />"><r:date format="%B %Y" /></a></li></r:header>
532
+ </r:children:each>
533
+ </r:find>
534
+ </ul>
535
+ - PageFields: !omap []
@@ -0,0 +1,3 @@
1
+ module RadiantSiteTemplatesExtension
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1,2 @@
1
+ module RadiantSiteTemplatesExtension
2
+ end
@@ -0,0 +1,55 @@
1
+ namespace :radiant do
2
+ namespace :extensions do
3
+ namespace :site_templates do
4
+
5
+ desc "Runs the migration of the Site Templates extension"
6
+ task :migrate => :environment do
7
+ require 'radiant/extension_migrator'
8
+ if ENV["VERSION"]
9
+ SiteTemplatesExtension.migrator.migrate(ENV["VERSION"].to_i)
10
+ Rake::Task['db:schema:dump'].invoke
11
+ else
12
+ SiteTemplatesExtension.migrator.migrate
13
+ Rake::Task['db:schema:dump'].invoke
14
+ end
15
+ end
16
+
17
+ desc "Copies public assets of the Site Templates to the instance public/ directory."
18
+ task :update => :environment do
19
+ is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
20
+ puts "Copying assets from SiteTemplatesExtension"
21
+ Dir[SiteTemplatesExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
22
+ path = file.sub(SiteTemplatesExtension.root, '')
23
+ directory = File.dirname(path)
24
+ mkdir_p RAILS_ROOT + directory, :verbose => false
25
+ cp file, RAILS_ROOT + path, :verbose => false
26
+ end
27
+ unless SiteTemplatesExtension.root.starts_with? RAILS_ROOT # don't need to copy vendored tasks
28
+ puts "Copying rake tasks from SiteTemplatesExtension"
29
+ local_tasks_path = File.join(RAILS_ROOT, %w(lib tasks))
30
+ mkdir_p local_tasks_path, :verbose => false
31
+ Dir[File.join SiteTemplatesExtension.root, %w(lib tasks *.rake)].each do |file|
32
+ cp file, local_tasks_path, :verbose => false
33
+ end
34
+ end
35
+ end
36
+
37
+ desc "Syncs all available translations for this ext to the English ext master"
38
+ task :sync => :environment do
39
+ # The main translation root, basically where English is kept
40
+ language_root = SiteTemplatesExtension.root + "/config/locales"
41
+ words = TranslationSupport.get_translation_keys(language_root)
42
+
43
+ Dir["#{language_root}/*.yml"].each do |filename|
44
+ next if filename.match('_available_tags')
45
+ basename = File.basename(filename, '.yml')
46
+ puts "Syncing #{basename}"
47
+ (comments, other) = TranslationSupport.read_file(filename, basename)
48
+ words.each { |k,v| other[k] ||= words[k] } # Initializing hash variable as empty if it does not exist
49
+ other.delete_if { |k,v| !words[k] } # Remove if not defined in en.yml
50
+ TranslationSupport.write_file(filename, basename, comments, other)
51
+ end
52
+ end
53
+ end
54
+ end
55
+ end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "radiant-site_templates-extension/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "radiant-site_templates-extension"
7
+ s.version = RadiantSiteTemplatesExtension::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Radiant CMS Dev Team"]
10
+ s.email = ["radiant@radiantcms.org"]
11
+ s.homepage = "http://radiantcms.org/"
12
+ s.summary = %q{Site Templates for Radiant CMS}
13
+ s.description = %q{Standard site templates}
14
+
15
+ ignores = if File.exist?(".gitignore")
16
+ File.read(".gitignore").split("\n").inject([]) {|a,p| a + Dir[p] }
17
+ else
18
+ []
19
+ end
20
+ s.files = Dir["**/*"] - ignores
21
+ s.test_files = Dir["test/**/*","spec/**/*","features/**/*"] - ignores
22
+ s.require_paths = ["lib"]
23
+
24
+ # s.add_dependency "some_gem", "~> 1.0.0"
25
+
26
+ s.post_install_message = %{
27
+ Add this to your radiant project with:
28
+ config.gem "radiant-site_templates-extension", :version => "~> #{RadiantSiteTemplatesExtension::VERSION}"
29
+ }
30
+ end