jamesgolick-webby 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +219 -0
- data/README.rdoc +92 -0
- data/Rakefile +62 -0
- data/bin/webby +41 -0
- data/bin/webby-gen +41 -0
- data/examples/blog/Sitefile +7 -0
- data/examples/blog/tasks/blog.rake +72 -0
- data/examples/blog/templates/atom_feed.erb +40 -0
- data/examples/blog/templates/blog/month.erb +22 -0
- data/examples/blog/templates/blog/post.erb +16 -0
- data/examples/blog/templates/blog/year.erb +22 -0
- data/examples/presentation/Sitefile +10 -0
- data/examples/presentation/content/css/uv/twilight.css +137 -0
- data/examples/presentation/content/presentation/_sample_code.txt +10 -0
- data/examples/presentation/content/presentation/index.txt +63 -0
- data/examples/presentation/content/presentation/s5/blank.gif +0 -0
- data/examples/presentation/content/presentation/s5/bodybg.gif +0 -0
- data/examples/presentation/content/presentation/s5/framing.css +23 -0
- data/examples/presentation/content/presentation/s5/iepngfix.htc +42 -0
- data/examples/presentation/content/presentation/s5/opera.css +7 -0
- data/examples/presentation/content/presentation/s5/outline.css +15 -0
- data/examples/presentation/content/presentation/s5/pretty.css +86 -0
- data/examples/presentation/content/presentation/s5/print.css +25 -0
- data/examples/presentation/content/presentation/s5/s5-core.css +9 -0
- data/examples/presentation/content/presentation/s5/slides.css +3 -0
- data/examples/presentation/content/presentation/s5/slides.js +553 -0
- data/examples/presentation/layouts/presentation.txt +43 -0
- data/examples/presentation/templates/_code_partial.erb +13 -0
- data/examples/presentation/templates/presentation.erb +40 -0
- data/examples/tumblog/Sitefile +9 -0
- data/examples/tumblog/content/css/tumblog.css +308 -0
- data/examples/tumblog/content/images/tumblog/permalink.gif +0 -0
- data/examples/tumblog/content/images/tumblog/rss.gif +0 -0
- data/examples/tumblog/content/tumblog/200806/the-noble-chicken/index.txt +12 -0
- data/examples/tumblog/content/tumblog/200807/historical-perspectives-on-the-classic-chicken-joke/index.txt +12 -0
- data/examples/tumblog/content/tumblog/200807/mad-city-chickens/index.txt +10 -0
- data/examples/tumblog/content/tumblog/200807/the-wisdom-of-the-dutch/index.txt +11 -0
- data/examples/tumblog/content/tumblog/200807/up-a-tree/index.txt +13 -0
- data/examples/tumblog/content/tumblog/index.txt +37 -0
- data/examples/tumblog/content/tumblog/rss.txt +37 -0
- data/examples/tumblog/layouts/tumblog/default.txt +44 -0
- data/examples/tumblog/layouts/tumblog/post.txt +15 -0
- data/examples/tumblog/lib/tumblog_helper.rb +32 -0
- data/examples/tumblog/tasks/tumblog.rake +30 -0
- data/examples/tumblog/templates/atom_feed.erb +40 -0
- data/examples/tumblog/templates/tumblog/conversation.erb +12 -0
- data/examples/tumblog/templates/tumblog/link.erb +10 -0
- data/examples/tumblog/templates/tumblog/photo.erb +13 -0
- data/examples/tumblog/templates/tumblog/post.erb +12 -0
- data/examples/tumblog/templates/tumblog/quote.erb +11 -0
- data/examples/webby/Sitefile +19 -0
- data/examples/webby/content/communicate/index.txt +28 -0
- data/examples/webby/content/css/background.gif +0 -0
- data/examples/webby/content/css/blueprint/print.css +76 -0
- data/examples/webby/content/css/blueprint/screen.css +696 -0
- data/examples/webby/content/css/coderay.css +96 -0
- data/examples/webby/content/css/site.css +196 -0
- data/examples/webby/content/css/uv/twilight.css +137 -0
- data/examples/webby/content/index.txt +37 -0
- data/examples/webby/content/learn/index.txt +28 -0
- data/examples/webby/content/reference/index.txt +204 -0
- data/examples/webby/content/release-notes/index.txt +21 -0
- data/examples/webby/content/release-notes/rel-0-9-0/index.txt +74 -0
- data/examples/webby/content/release-notes/rel-0-9-1/index.txt +93 -0
- data/examples/webby/content/release-notes/rel-0-9-2/index.txt +14 -0
- data/examples/webby/content/release-notes/rel-0-9-3/index.txt +47 -0
- data/examples/webby/content/robots.txt +6 -0
- data/examples/webby/content/script/jquery.corner.js +152 -0
- data/examples/webby/content/script/jquery.js +31 -0
- data/examples/webby/content/sitemap.txt +31 -0
- data/examples/webby/content/tips_and_tricks/index.txt +97 -0
- data/examples/webby/content/tutorial/index.txt +135 -0
- data/examples/webby/content/user-manual/index.txt +419 -0
- data/examples/webby/layouts/default.txt +49 -0
- data/examples/webby/templates/page.erb +10 -0
- data/examples/website/Sitefile +7 -0
- data/examples/website/content/css/blueprint/ie.css +26 -0
- data/examples/website/content/css/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/examples/website/content/css/blueprint/plugins/buttons/icons/key.png +0 -0
- data/examples/website/content/css/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/examples/website/content/css/blueprint/plugins/buttons/readme.txt +32 -0
- data/examples/website/content/css/blueprint/plugins/buttons/screen.css +97 -0
- data/examples/website/content/css/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/examples/website/content/css/blueprint/plugins/fancy-type/screen.css +71 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/readme.txt +18 -0
- data/examples/website/content/css/blueprint/plugins/link-icons/screen.css +40 -0
- data/examples/website/content/css/blueprint/plugins/rtl/readme.txt +10 -0
- data/examples/website/content/css/blueprint/plugins/rtl/screen.css +109 -0
- data/examples/website/content/css/blueprint/print.css +30 -0
- data/examples/website/content/css/blueprint/screen.css +251 -0
- data/examples/website/content/css/blueprint/src/forms.css +49 -0
- data/examples/website/content/css/blueprint/src/grid.css +212 -0
- data/examples/website/content/css/blueprint/src/grid.png +0 -0
- data/examples/website/content/css/blueprint/src/ie.css +59 -0
- data/examples/website/content/css/blueprint/src/print.css +85 -0
- data/examples/website/content/css/blueprint/src/reset.css +38 -0
- data/examples/website/content/css/blueprint/src/typography.css +105 -0
- data/examples/website/content/css/coderay.css +111 -0
- data/examples/website/content/css/site.css +67 -0
- data/examples/website/content/index.txt +19 -0
- data/examples/website/layouts/default.txt +61 -0
- data/examples/website/lib/breadcrumbs.rb +28 -0
- data/examples/website/templates/_partial.erb +10 -0
- data/examples/website/templates/page.erb +18 -0
- data/lib/webby.rb +233 -0
- data/lib/webby/apps.rb +12 -0
- data/lib/webby/apps/generator.rb +276 -0
- data/lib/webby/apps/main.rb +258 -0
- data/lib/webby/auto_builder.rb +157 -0
- data/lib/webby/builder.rb +172 -0
- data/lib/webby/core_ext/enumerable.rb +11 -0
- data/lib/webby/core_ext/hash.rb +28 -0
- data/lib/webby/core_ext/kernel.rb +26 -0
- data/lib/webby/core_ext/string.rb +163 -0
- data/lib/webby/core_ext/time.rb +9 -0
- data/lib/webby/filters.rb +85 -0
- data/lib/webby/filters/basepath.rb +97 -0
- data/lib/webby/filters/erb.rb +9 -0
- data/lib/webby/filters/haml.rb +18 -0
- data/lib/webby/filters/markdown.rb +16 -0
- data/lib/webby/filters/maruku.rb +16 -0
- data/lib/webby/filters/outline.rb +309 -0
- data/lib/webby/filters/sass.rb +17 -0
- data/lib/webby/filters/slides.rb +56 -0
- data/lib/webby/filters/textile.rb +16 -0
- data/lib/webby/filters/tidy.rb +76 -0
- data/lib/webby/filters/wiki_words.rb +14 -0
- data/lib/webby/helpers.rb +30 -0
- data/lib/webby/helpers/capture_helper.rb +141 -0
- data/lib/webby/helpers/coderay_helper.rb +69 -0
- data/lib/webby/helpers/graphviz_helper.rb +136 -0
- data/lib/webby/helpers/tag_helper.rb +65 -0
- data/lib/webby/helpers/tex_img_helper.rb +133 -0
- data/lib/webby/helpers/ultraviolet_helper.rb +63 -0
- data/lib/webby/helpers/url_helper.rb +241 -0
- data/lib/webby/journal.rb +126 -0
- data/lib/webby/link_validator.rb +160 -0
- data/lib/webby/renderer.rb +390 -0
- data/lib/webby/resources.rb +137 -0
- data/lib/webby/resources/db.rb +251 -0
- data/lib/webby/resources/layout.rb +54 -0
- data/lib/webby/resources/meta_file.rb +211 -0
- data/lib/webby/resources/page.rb +81 -0
- data/lib/webby/resources/partial.rb +85 -0
- data/lib/webby/resources/resource.rb +201 -0
- data/lib/webby/resources/static.rb +36 -0
- data/lib/webby/stelan/mktemp.rb +135 -0
- data/lib/webby/stelan/paginator.rb +165 -0
- data/lib/webby/tasks/build.rake +27 -0
- data/lib/webby/tasks/create.rake +25 -0
- data/lib/webby/tasks/deploy.rake +22 -0
- data/lib/webby/tasks/growl.rake +16 -0
- data/lib/webby/tasks/validate.rake +19 -0
- data/spec/core_ext/hash_spec.rb +47 -0
- data/spec/core_ext/string_spec.rb +110 -0
- data/spec/core_ext/time_spec.rb +19 -0
- data/spec/data/hooligans/bad_meta_data_1.txt +34 -0
- data/spec/data/hooligans/bad_meta_data_2.txt +34 -0
- data/spec/data/html/anchor.html +11 -0
- data/spec/data/html/external.html +10 -0
- data/spec/data/html/invalid-relative.html +10 -0
- data/spec/data/html/relative-anchor.html +10 -0
- data/spec/data/html/relative-invalid-anchor.html +10 -0
- data/spec/data/html/relative.html +10 -0
- data/spec/data/outline/basic.out +81 -0
- data/spec/data/outline/basic.txt +25 -0
- data/spec/data/outline/no_clobber.out +86 -0
- data/spec/data/outline/numbering.out +81 -0
- data/spec/data/outline/numbering_only.out +21 -0
- data/spec/data/outline/toc_range_1.out +66 -0
- data/spec/data/outline/toc_range_2.out +55 -0
- data/spec/data/outline/toc_style.out +81 -0
- data/spec/data/site/Sitefile +9 -0
- data/spec/data/site/content/_partial.txt +10 -0
- data/spec/data/site/content/css/coderay.css +111 -0
- data/spec/data/site/content/css/site.css +67 -0
- data/spec/data/site/content/css/tumblog.css +308 -0
- data/spec/data/site/content/images/tumblog/permalink.gif +0 -0
- data/spec/data/site/content/images/tumblog/rss.gif +0 -0
- data/spec/data/site/content/index.txt +19 -0
- data/spec/data/site/content/photos.txt +21 -0
- data/spec/data/site/content/tumblog/200806/the-noble-chicken/index.txt +12 -0
- data/spec/data/site/content/tumblog/200807/historical-perspectives-on-the-classic-chicken-joke/index.txt +12 -0
- data/spec/data/site/content/tumblog/200807/mad-city-chickens/index.txt +10 -0
- data/spec/data/site/content/tumblog/200807/the-wisdom-of-the-dutch/index.txt +11 -0
- data/spec/data/site/content/tumblog/200807/up-a-tree/index.txt +13 -0
- data/spec/data/site/content/tumblog/index.txt +37 -0
- data/spec/data/site/content/tumblog/rss.txt +37 -0
- data/spec/data/site/layouts/default.txt +58 -0
- data/spec/data/site/layouts/tumblog/default.txt +44 -0
- data/spec/data/site/layouts/tumblog/post.txt +15 -0
- data/spec/data/site/lib/breadcrumbs.rb +28 -0
- data/spec/data/site/lib/tumblog_helper.rb +32 -0
- data/spec/data/site/tasks/tumblog.rake +30 -0
- data/spec/data/site/templates/_partial.erb +10 -0
- data/spec/data/site/templates/atom_feed.erb +40 -0
- data/spec/data/site/templates/page.erb +18 -0
- data/spec/data/site/templates/presentation.erb +40 -0
- data/spec/data/site/templates/tumblog/conversation.erb +12 -0
- data/spec/data/site/templates/tumblog/link.erb +10 -0
- data/spec/data/site/templates/tumblog/photo.erb +13 -0
- data/spec/data/site/templates/tumblog/post.erb +12 -0
- data/spec/data/site/templates/tumblog/quote.erb +11 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +58 -0
- data/spec/webby/apps/generator_spec.rb +117 -0
- data/spec/webby/apps/main_spec.rb +88 -0
- data/spec/webby/filters/basepath_spec.rb +167 -0
- data/spec/webby/filters/maruku_spec.rb +31 -0
- data/spec/webby/filters/outline_spec.rb +92 -0
- data/spec/webby/filters/textile_spec.rb +31 -0
- data/spec/webby/helpers/capture_helper_spec.rb +56 -0
- data/spec/webby/link_validator_spec.rb +154 -0
- data/spec/webby/renderer_spec.rb +139 -0
- data/spec/webby/resources/db_spec.rb +250 -0
- data/spec/webby/resources/layout_spec.rb +83 -0
- data/spec/webby/resources/meta_file_spec.rb +171 -0
- data/spec/webby/resources/page_spec.rb +111 -0
- data/spec/webby/resources/partial_spec.rb +58 -0
- data/spec/webby/resources/resource_spec.rb +219 -0
- data/spec/webby/resources/static_spec.rb +49 -0
- data/spec/webby/resources_spec.rb +69 -0
- data/tasks/mswin32.rake +38 -0
- data/tasks/website.rake +37 -0
- metadata +435 -0
@@ -0,0 +1,72 @@
|
|
1
|
+
|
2
|
+
namespace :blog do
|
3
|
+
|
4
|
+
# iterate over all the files in the "templates/blog" folder and create a
|
5
|
+
# rake task corresponding to each file found
|
6
|
+
FileList["#{Webby.site.template_dir}/blog/*"].each do |template|
|
7
|
+
next unless test(?f, template)
|
8
|
+
name = template.pathmap('%n')
|
9
|
+
next if name =~ %r/^(month|year)$/ # skip month/year blog entries
|
10
|
+
|
11
|
+
desc "Create a new blog #{name}"
|
12
|
+
task name => [:create_year_index, :create_month_index] do |t|
|
13
|
+
page, title, dir = Webby::Builder.new_page_info
|
14
|
+
|
15
|
+
# if no directory was given use the default blog directory (underneath
|
16
|
+
# the content directory)
|
17
|
+
dir = Webby.site.blog_dir if dir.empty?
|
18
|
+
dir = File.join(dir, Time.now.strftime('%Y/%m/%d'))
|
19
|
+
|
20
|
+
page = File.join(dir, File.basename(page))
|
21
|
+
page = Webby::Builder.create(page, :from => template,
|
22
|
+
:locals => {:title => title, :directory => dir})
|
23
|
+
exec(::Webby.editor, page) unless ::Webby.editor.nil?
|
24
|
+
end
|
25
|
+
end # each
|
26
|
+
|
27
|
+
# this task is used to create the year index file (blog/2008/index.txt)
|
28
|
+
task :create_year_index do |t|
|
29
|
+
# parse out information about the page to create
|
30
|
+
_, _, dir = Webby::Builder.new_page_info
|
31
|
+
year = Time.now.strftime '%Y'
|
32
|
+
|
33
|
+
# if no directory was given use the default blog directory (underneath
|
34
|
+
# the content directory)
|
35
|
+
dir = Webby.site.blog_dir if dir.empty?
|
36
|
+
dir = File.join(dir, year)
|
37
|
+
|
38
|
+
# determine the filename and template name
|
39
|
+
fn = File.join(dir, 'index.txt')
|
40
|
+
tmpl = Dir.glob(File.join(Webby.site.template_dir, 'blog/year.*')).first.to_s
|
41
|
+
|
42
|
+
if test(?f, tmpl) and not test(?f, File.join(Webby.site.content_dir, fn))
|
43
|
+
Webby::Builder.create(fn, :from => tmpl,
|
44
|
+
:locals => {:title => year, :directory => dir})
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
# this task is used to create the month index file (blog/2008/04/index.txt)
|
49
|
+
task :create_month_index do |t|
|
50
|
+
# parse out information about the page to create
|
51
|
+
_, _, dir = Webby::Builder.new_page_info
|
52
|
+
now = Time.now
|
53
|
+
month = now.strftime '%m'
|
54
|
+
|
55
|
+
# if no directory was given use the default blog directory (underneath
|
56
|
+
# the content directory)
|
57
|
+
dir = Webby.site.blog_dir if dir.empty?
|
58
|
+
dir = File.join(dir, now.strftime('%Y/%m'))
|
59
|
+
|
60
|
+
# determine the filename and template name
|
61
|
+
fn = File.join(dir, 'index.txt')
|
62
|
+
tmpl = Dir.glob(File.join(Webby.site.template_dir, 'blog/month.*')).first.to_s
|
63
|
+
|
64
|
+
if test(?f, tmpl) and not test(?f, File.join(Webby.site.content_dir, fn))
|
65
|
+
Webby::Builder.create(fn, :from => tmpl,
|
66
|
+
:locals => {:title => month, :directory => dir})
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
end # namespace :blog
|
71
|
+
|
72
|
+
# EOF
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
title: A New Atom Feed
|
3
|
+
subtitle: A really swell blog built with Webby
|
4
|
+
site: fake-n-site.org
|
5
|
+
author: Author's Name
|
6
|
+
email: author@fake-n-site.org
|
7
|
+
extension: xml
|
8
|
+
layout: nil
|
9
|
+
dirty: true
|
10
|
+
filter: erb
|
11
|
+
---
|
12
|
+
<?xml version="1.0" encoding="utf-8"?>
|
13
|
+
<feed xmlns="http://www.w3.org/2005/Atom">
|
14
|
+
|
15
|
+
<title><%%= h(@page.title) %></title>
|
16
|
+
<subtitle><%%= h(@page.subtitle) %></subtitle>
|
17
|
+
<link href="http://<%%= @page.site %>/<%= directory %>/" rel="self" />
|
18
|
+
<link href="http://<%%= @page.site %>/" />
|
19
|
+
<updated><%%= Time.now.xmlschema %></updated>
|
20
|
+
<author>
|
21
|
+
<name><%%= h(@page.author) %></name>
|
22
|
+
<email><%%= h(@page.email) %></email>
|
23
|
+
</author>
|
24
|
+
<id>http://<%%= @page.site %>/</id>
|
25
|
+
<%% @pages.find(:limit => 10,
|
26
|
+
:in_directory => '<%= directory %>',
|
27
|
+
:recursive => true,
|
28
|
+
:sort_by => 'mtime',
|
29
|
+
:reverse => true).each do |article|
|
30
|
+
next if article == @page
|
31
|
+
%>
|
32
|
+
<entry>
|
33
|
+
<title><%%= h(article.title) %></title>
|
34
|
+
<link href="<%%= article.url %>" />
|
35
|
+
<id>tag:<%%= @page.site %>,<%%= article.created_at.strftime('%Y-%m-%d') %>:<%%= article.created_at.to_i %></id>
|
36
|
+
<updated><%%= article.created_at.xmlschema %></updated>
|
37
|
+
<content type="html"><%%= h(render(article)) %></content>
|
38
|
+
</entry>
|
39
|
+
<%% end %>
|
40
|
+
</feed>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
title: <%= title %>
|
3
|
+
created_at: <%= Time.now.to_y %>
|
4
|
+
filter: erb
|
5
|
+
dirty: true
|
6
|
+
---
|
7
|
+
<h2><%%= h(@page.title) %></h2>
|
8
|
+
|
9
|
+
<%%
|
10
|
+
articles = @pages.find(:all, :in_directory => @page.dir, :recursive => true,
|
11
|
+
:sort_by => "created_at", :reverse => true, :blog_post => true)
|
12
|
+
articles.delete(@page)
|
13
|
+
paginate(articles, 10) do |page|
|
14
|
+
-%>
|
15
|
+
<div class="article">
|
16
|
+
<h1><%%= link_to_page(page) %><span class="date">(<%%= page.created_at.strftime('%Y-%m-%d') %>)</span></h1>
|
17
|
+
|
18
|
+
<div class="body">
|
19
|
+
<%%= render(page) %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<%% end -%>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
---
|
2
|
+
title: <%= title %>
|
3
|
+
created_at: <%= Time.now.to_y %>
|
4
|
+
blog_post: true
|
5
|
+
filter:
|
6
|
+
- textile
|
7
|
+
---
|
8
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc congue ipsum vestibulum libero. Aenean vitae justo. Nam eget tellus. Etiam convallis, est eu lobortis mattis, lectus tellus tempus felis, a ultricies erat ipsum at metus.
|
9
|
+
|
10
|
+
h3. Litora Sociis
|
11
|
+
|
12
|
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi et risus. Aliquam nisl. Nulla facilisi. Cras accumsan vestibulum ante. Vestibulum sed tortor. Praesent tempus fringilla elit. Ut elit diam, sagittis in, nonummy in, gravida non, nunc. Ut orci. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nam egestas, orci eu imperdiet malesuada, nisl purus fringilla odio, quis commodo est orci vitae justo. Aliquam placerat odio tincidunt nulla. Cras in libero. Aenean rutrum, magna non tristique posuere, erat odio eleifend nisl, non convallis est tortor blandit ligula. Nulla id augue.
|
13
|
+
|
14
|
+
bq. Nullam mattis, odio ut tempus facilisis, metus nisl facilisis metus, auctor consectetuer felis ligula nec mauris. Vestibulum odio erat, fermentum at, commodo vitae, ultrices et, urna. Mauris vulputate, mi pulvinar sagittis condimentum, sem nulla aliquam velit, sed imperdiet mi purus eu magna. Nulla varius metus ut eros. Aenean aliquet magna eget orci. Class aptent taciti sociosqu ad litora.
|
15
|
+
|
16
|
+
Vivamus euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse vel nibh ut turpis dictum sagittis. Aliquam vel velit a elit auctor sollicitudin. Nam vel dui vel neque lacinia pretium. Quisque nunc erat, venenatis id, volutpat ut, scelerisque sed, diam. Mauris ante. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec mattis. Morbi dignissim sollicitudin libero. Nulla lorem.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
title: <%= title %>
|
3
|
+
created_at: <%= Time.now.to_y %>
|
4
|
+
filter: erb
|
5
|
+
dirty: true
|
6
|
+
---
|
7
|
+
<h2><%%= h(@page.title) %></h2>
|
8
|
+
|
9
|
+
<%%
|
10
|
+
articles = @pages.find(:all, :in_directory => @page.dir, :recursive => true,
|
11
|
+
:sort_by => "created_at", :reverse => true, :blog_post => true)
|
12
|
+
articles.delete(@page)
|
13
|
+
paginate(articles, 10) do |page|
|
14
|
+
-%>
|
15
|
+
<div class="article">
|
16
|
+
<h1><%%= link_to_page(page) %><span class="date">(<%%= page.created_at.strftime('%Y-%m-%d') %>)</span></h1>
|
17
|
+
|
18
|
+
<div class="body">
|
19
|
+
<%%= render(page) %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<%% end -%>
|
@@ -0,0 +1,137 @@
|
|
1
|
+
pre.twilight .DiffInserted {
|
2
|
+
background-color: #253B22;
|
3
|
+
color: #F8F8F8;
|
4
|
+
}
|
5
|
+
pre.twilight .DiffHeader {
|
6
|
+
background-color: #0E2231;
|
7
|
+
color: #F8F8F8;
|
8
|
+
font-style: italic;
|
9
|
+
}
|
10
|
+
pre.twilight .CssPropertyValue {
|
11
|
+
color: #F9EE98;
|
12
|
+
}
|
13
|
+
pre.twilight .CCCPreprocessorDirective {
|
14
|
+
color: #AFC4DB;
|
15
|
+
}
|
16
|
+
pre.twilight .Constant {
|
17
|
+
color: #CF6A4C;
|
18
|
+
}
|
19
|
+
pre.twilight .DiffChanged {
|
20
|
+
background-color: #4A410D;
|
21
|
+
color: #F8F8F8;
|
22
|
+
}
|
23
|
+
pre.twilight .EmbeddedSource {
|
24
|
+
background-color: #A3A6AD;
|
25
|
+
}
|
26
|
+
pre.twilight .Support {
|
27
|
+
color: #9B859D;
|
28
|
+
}
|
29
|
+
pre.twilight .MarkupList {
|
30
|
+
color: #F9EE98;
|
31
|
+
}
|
32
|
+
pre.twilight .CssConstructorArgument {
|
33
|
+
color: #8F9D6A;
|
34
|
+
}
|
35
|
+
pre.twilight .Storage {
|
36
|
+
color: #F9EE98;
|
37
|
+
}
|
38
|
+
pre.twilight .line-numbers {
|
39
|
+
background-color: inherit;
|
40
|
+
color: #999999;
|
41
|
+
}
|
42
|
+
pre.twilight .CssClass {
|
43
|
+
color: #9B703F;
|
44
|
+
}
|
45
|
+
pre.twilight .StringConstant {
|
46
|
+
color: #DDF2A4;
|
47
|
+
}
|
48
|
+
pre.twilight .CssAtRule {
|
49
|
+
color: #8693A5;
|
50
|
+
}
|
51
|
+
pre.twilight .MetaTagInline {
|
52
|
+
color: #E0C589;
|
53
|
+
}
|
54
|
+
pre.twilight .MarkupHeading {
|
55
|
+
color: #CF6A4C;
|
56
|
+
}
|
57
|
+
pre.twilight .CssTagName {
|
58
|
+
color: #CDA869;
|
59
|
+
}
|
60
|
+
pre.twilight .SupportConstant {
|
61
|
+
color: #CF6A4C;
|
62
|
+
}
|
63
|
+
pre.twilight .DiffDeleted {
|
64
|
+
background-color: #420E09;
|
65
|
+
color: #F8F8F8;
|
66
|
+
}
|
67
|
+
pre.twilight .CCCPreprocessorLine {
|
68
|
+
color: #8996A8;
|
69
|
+
}
|
70
|
+
pre.twilight .StringRegexpSpecial {
|
71
|
+
color: #CF7D34;
|
72
|
+
}
|
73
|
+
pre.twilight .EmbeddedSourceBright {
|
74
|
+
background-color: #9C9EA4;
|
75
|
+
}
|
76
|
+
pre.twilight .InvalidIllegal {
|
77
|
+
background-color: #241A24;
|
78
|
+
color: #F8F8F8;
|
79
|
+
}
|
80
|
+
pre.twilight .SupportFunction {
|
81
|
+
color: #DAD085;
|
82
|
+
}
|
83
|
+
pre.twilight .CssAdditionalConstants {
|
84
|
+
color: #CA7840;
|
85
|
+
}
|
86
|
+
pre.twilight .MetaTagAll {
|
87
|
+
color: #AC885B;
|
88
|
+
}
|
89
|
+
pre.twilight .StringRegexp {
|
90
|
+
color: #E9C062;
|
91
|
+
}
|
92
|
+
pre.twilight .StringEmbeddedSource {
|
93
|
+
color: #DAEFA3;
|
94
|
+
}
|
95
|
+
pre.twilight .EntityInheritedClass {
|
96
|
+
color: #9B5C2E;
|
97
|
+
font-style: italic;
|
98
|
+
}
|
99
|
+
pre.twilight .CssId {
|
100
|
+
color: #8B98AB;
|
101
|
+
}
|
102
|
+
pre.twilight .CssPseudoClass {
|
103
|
+
color: #8F9D6A;
|
104
|
+
}
|
105
|
+
pre.twilight .StringVariable {
|
106
|
+
color: #8A9A95;
|
107
|
+
}
|
108
|
+
pre.twilight .String {
|
109
|
+
color: #8F9D6A;
|
110
|
+
}
|
111
|
+
pre.twilight .Keyword {
|
112
|
+
color: #CDA869;
|
113
|
+
}
|
114
|
+
pre.twilight {
|
115
|
+
background-color: #141414;
|
116
|
+
color: #F8F8F8;
|
117
|
+
}
|
118
|
+
pre.twilight .CssPropertyName {
|
119
|
+
color: #C5AF75;
|
120
|
+
}
|
121
|
+
pre.twilight .DoctypeXmlProcessing {
|
122
|
+
color: #494949;
|
123
|
+
}
|
124
|
+
pre.twilight .InvalidDeprecated {
|
125
|
+
color: #D2A8A1;
|
126
|
+
font-style: italic;
|
127
|
+
}
|
128
|
+
pre.twilight .Variable {
|
129
|
+
color: #7587A6;
|
130
|
+
}
|
131
|
+
pre.twilight .Entity {
|
132
|
+
color: #9B703F;
|
133
|
+
}
|
134
|
+
pre.twilight .Comment {
|
135
|
+
color: #5F5A60;
|
136
|
+
font-style: italic;
|
137
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
title: Webby S5
|
3
|
+
created_at: 2008-05-18 22:10:21.995012 -06:00
|
4
|
+
author: You
|
5
|
+
company: Company
|
6
|
+
copyright: Creative Commons
|
7
|
+
filter:
|
8
|
+
- erb
|
9
|
+
- textile
|
10
|
+
- slides
|
11
|
+
layout: presentation
|
12
|
+
---
|
13
|
+
h1. Webby S5 Generator
|
14
|
+
|
15
|
+
Clever introductory text that will grab the audience's attention.
|
16
|
+
|
17
|
+
|
18
|
+
h1. Title of the First Slide
|
19
|
+
|
20
|
+
A little more build up before really getting into the meat of it.
|
21
|
+
|
22
|
+
|
23
|
+
h1. Title of the Second Slide
|
24
|
+
|
25
|
+
Finally, some code!
|
26
|
+
|
27
|
+
<% uv :lang => "ragel", :theme => 'twilight' do -%>
|
28
|
+
action dgt { printf("DGT: %c\n", fc); }
|
29
|
+
action dec { printf("DEC: .\n"); }
|
30
|
+
action exp { printf("EXP: %c\n", fc); }
|
31
|
+
action exp_sign { printf("SGN: %c\n", fc); }
|
32
|
+
action number { /*NUMBER*/ }
|
33
|
+
|
34
|
+
number = (
|
35
|
+
[0-9]+ $dgt ( '.' @dec [0-9]+ $dgt )?
|
36
|
+
( [eE] ( [+\-] $exp_sign )? [0-9]+ $exp )?
|
37
|
+
) %number;
|
38
|
+
|
39
|
+
main := ( number '\n' )*;
|
40
|
+
<% end -%>
|
41
|
+
|
42
|
+
|
43
|
+
h1. Title of the Third Slide
|
44
|
+
|
45
|
+
This code comes from a partial
|
46
|
+
|
47
|
+
<%= render :partial => 'sample_code', :guard => true %>
|
48
|
+
|
49
|
+
|
50
|
+
h1. Title of the Fourth Slide
|
51
|
+
|
52
|
+
A quadratic equation with real or complex coefficients has two (not necessarily distinct) solutions, called roots, which may or may not be real, given by the quadratic formula:
|
53
|
+
|
54
|
+
<% tex2img 'quadratic', :path => 'images', :alt => 'quadratic', :resolution => '300x300' do -%>
|
55
|
+
x = \frac{-b\pm\sqrt[]{b^2-4ac}}{2a}
|
56
|
+
<% end -%>
|
57
|
+
|
58
|
+
|
59
|
+
h1. The Final Slide
|
60
|
+
|
61
|
+
And that about sums it up!
|
62
|
+
|
63
|
+
Thanks for visiting
|
Binary file
|
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/* The following styles size, place, and layer the slide components.
|
2
|
+
Edit these if you want to change the overall slide layout.
|
3
|
+
The commented lines can be uncommented (and modified, if necessary)
|
4
|
+
to help you with the rearrangement process. */
|
5
|
+
|
6
|
+
/* target = 1024x768 */
|
7
|
+
|
8
|
+
div#header, div#footer, .slide {width: 100%; top: 0; left: 0;}
|
9
|
+
div#header {top: 0; height: 3em; z-index: 1;}
|
10
|
+
div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;}
|
11
|
+
.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;}
|
12
|
+
div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;}
|
13
|
+
div#controls form {position: absolute; bottom: 0; right: 0; width: 100%;
|
14
|
+
margin: 0;}
|
15
|
+
#currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;}
|
16
|
+
html>body #currentSlide {position: fixed;}
|
17
|
+
|
18
|
+
/*
|
19
|
+
div#header {background: #FCC;}
|
20
|
+
div#footer {background: #CCF;}
|
21
|
+
div#controls {background: #BBD;}
|
22
|
+
div#currentSlide {background: #FFC;}
|
23
|
+
*/
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<public:component>
|
2
|
+
<public:attach event="onpropertychange" onevent="doFix()" />
|
3
|
+
|
4
|
+
<script>
|
5
|
+
|
6
|
+
// IE5.5+ PNG Alpha Fix v1.0 by Angus Turnbull http://www.twinhelix.com
|
7
|
+
// Free usage permitted as long as this notice remains intact.
|
8
|
+
|
9
|
+
// This must be a path to a blank image. That's all the configuration you need here.
|
10
|
+
var blankImg = 'ui/default/blank.gif';
|
11
|
+
|
12
|
+
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
13
|
+
|
14
|
+
function filt(s, m) {
|
15
|
+
if (filters[f]) {
|
16
|
+
filters[f].enabled = s ? true : false;
|
17
|
+
if (s) with (filters[f]) { src = s; sizingMethod = m }
|
18
|
+
} else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
|
19
|
+
}
|
20
|
+
|
21
|
+
function doFix() {
|
22
|
+
if ((parseFloat(navigator.userAgent.match(/MSIE (\S+)/)[1]) < 5.5) ||
|
23
|
+
(event && !/(background|src)/.test(event.propertyName))) return;
|
24
|
+
|
25
|
+
if (tagName == 'IMG') {
|
26
|
+
if ((/\.png$/i).test(src)) {
|
27
|
+
filt(src, 'image'); // was 'scale'
|
28
|
+
src = blankImg;
|
29
|
+
} else if (src.indexOf(blankImg) < 0) filt();
|
30
|
+
} else if (style.backgroundImage) {
|
31
|
+
if (style.backgroundImage.match(/^url[("']+(.*\.png)[)"']+$/i)) {
|
32
|
+
var s = RegExp.$1;
|
33
|
+
style.backgroundImage = '';
|
34
|
+
filt(s, 'crop');
|
35
|
+
} else filt();
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
doFix();
|
40
|
+
|
41
|
+
</script>
|
42
|
+
</public:component>
|