webby 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +20 -0
- data/Manifest.txt +46 -2
- data/Rakefile +4 -3
- data/bin/webby +1 -1
- data/data/Rakefile +0 -1
- data/data/content/css/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/data/content/css/blueprint/plugins/buttons/icons/key.png +0 -0
- data/data/content/css/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/data/content/s5/blank.gif +0 -0
- data/data/content/s5/bodybg.gif +0 -0
- data/data/content/s5/framing.css +23 -0
- data/data/content/s5/iepngfix.htc +42 -0
- data/data/content/s5/opera.css +7 -0
- data/data/content/s5/outline.css +15 -0
- data/data/content/s5/pretty.css +86 -0
- data/data/content/s5/print.css +1 -0
- data/data/content/s5/s5-core.css +9 -0
- data/data/content/s5/slides.css +3 -0
- data/data/content/s5/slides.js +553 -0
- data/data/lib/breadcrumbs.rb +0 -0
- data/data/tasks/blog.rake +71 -0
- data/data/tasks/build.rake +27 -0
- data/data/tasks/create.rake +19 -1
- data/data/tasks/deploy.rake +2 -2
- data/data/tasks/setup.rb +4 -1
- data/data/templates/atom_feed.erb +20 -13
- data/data/templates/page.erb +1 -1
- data/data/templates/presentation.erb +40 -0
- data/examples/presentation/Rakefile +14 -0
- data/examples/presentation/content/_sample_code.txt +10 -0
- data/examples/presentation/content/css/uv/twilight.css +137 -0
- data/examples/presentation/content/index.txt +63 -0
- data/examples/presentation/content/s5/blank.gif +0 -0
- data/examples/presentation/content/s5/bodybg.gif +0 -0
- data/examples/presentation/content/s5/framing.css +23 -0
- data/examples/presentation/content/s5/iepngfix.htc +42 -0
- data/examples/presentation/content/s5/opera.css +7 -0
- data/examples/presentation/content/s5/outline.css +15 -0
- data/examples/presentation/content/s5/pretty.css +86 -0
- data/examples/presentation/content/s5/print.css +1 -0
- data/examples/presentation/content/s5/s5-core.css +9 -0
- data/examples/presentation/content/s5/slides.css +3 -0
- data/examples/presentation/content/s5/slides.js +553 -0
- data/examples/presentation/layouts/presentation.rhtml +43 -0
- data/examples/presentation/tasks/blog.rake +71 -0
- data/examples/presentation/tasks/build.rake +27 -0
- data/examples/presentation/tasks/create.rake +22 -0
- data/examples/presentation/tasks/deploy.rake +22 -0
- data/examples/presentation/tasks/growl.rake +12 -0
- data/examples/presentation/tasks/heel.rake +28 -0
- data/examples/presentation/tasks/setup.rb +17 -0
- data/examples/presentation/tasks/validate.rake +19 -0
- data/examples/presentation/templates/_partial.erb +13 -0
- data/examples/presentation/templates/presentation.erb +40 -0
- data/examples/webby/Rakefile +3 -2
- data/examples/webby/content/css/blueprint/screen.css +1 -1
- data/examples/webby/content/css/coderay.css +0 -15
- data/examples/webby/content/css/site.css +18 -13
- data/examples/webby/content/css/uv/twilight.css +137 -0
- data/examples/webby/content/index.txt +6 -10
- data/examples/webby/content/manual/index.txt +83 -122
- data/examples/webby/content/reference/index.txt +161 -16
- data/examples/webby/content/script/jquery.js +1 -1
- data/examples/webby/content/tips_and_tricks/index.txt +1 -1
- data/examples/webby/content/tutorial/index.txt +1 -1
- data/examples/webby/layouts/default.rhtml +2 -7
- data/examples/webby/tasks/blog.rake +71 -0
- data/examples/webby/tasks/build.rake +27 -0
- data/examples/webby/tasks/create.rake +19 -1
- data/examples/webby/tasks/deploy.rake +2 -2
- data/examples/webby/tasks/setup.rb +4 -20
- data/examples/webby/templates/page.erb +1 -1
- data/lib/webby.rb +30 -5
- data/lib/webby/auto_builder.rb +0 -2
- data/lib/webby/builder.rb +51 -5
- data/lib/webby/filters.rb +3 -3
- data/lib/webby/filters/basepath.rb +7 -7
- data/lib/webby/filters/erb.rb +0 -2
- data/lib/webby/filters/haml.rb +0 -2
- data/lib/webby/filters/markdown.rb +0 -2
- data/lib/webby/filters/outline.rb +43 -2
- data/lib/webby/filters/sass.rb +0 -2
- data/lib/webby/filters/slides.rb +56 -0
- data/lib/webby/filters/textile.rb +0 -2
- data/lib/webby/filters/tidy.rb +0 -2
- data/lib/webby/helpers.rb +0 -2
- data/lib/webby/helpers/capture_helper.rb +141 -0
- data/lib/webby/helpers/coderay_helper.rb +5 -16
- data/lib/webby/helpers/graphviz_helper.rb +6 -18
- data/lib/webby/helpers/tag_helper.rb +0 -2
- data/lib/webby/helpers/tex_img_helper.rb +5 -16
- data/lib/webby/helpers/ultraviolet_helper.rb +11 -22
- data/lib/webby/helpers/url_helper.rb +2 -4
- data/lib/webby/link_validator.rb +0 -2
- data/lib/webby/main.rb +0 -2
- data/lib/webby/renderer.rb +163 -37
- data/lib/webby/resources.rb +0 -2
- data/lib/webby/resources/db.rb +37 -27
- data/lib/webby/resources/file.rb +0 -2
- data/lib/webby/resources/layout.rb +0 -2
- data/lib/webby/resources/page.rb +4 -9
- data/lib/webby/resources/partial.rb +1 -3
- data/lib/webby/resources/resource.rb +10 -2
- data/lib/webby/resources/static.rb +0 -2
- data/lib/webby/stelan/mktemp.rb +0 -2
- data/lib/webby/stelan/spawner.rb +0 -2
- data/lib/webby/utils.rb +0 -2
- data/spec/spec_helper.rb +1 -4
- data/spec/webby/helpers/capture_helper_spec.rb +56 -0
- data/spec/webby/resources/file_spec.rb +0 -1
- data/tasks/ann.rake +7 -4
- data/tasks/bones.rake +2 -2
- data/tasks/gem.rake +26 -14
- data/tasks/notes.rake +11 -5
- data/tasks/post_load.rake +4 -2
- data/tasks/rdoc.rake +4 -2
- data/tasks/rubyforge.rake +3 -3
- data/tasks/setup.rb +24 -9
- data/tasks/spec.rake +1 -1
- data/tasks/website.rake +1 -1
- metadata +51 -7
- data/lib/webby/webby_task.rb +0 -134
- data/tasks/svn.rake +0 -45
data/data/lib/breadcrumbs.rb
CHANGED
File without changes
|
@@ -0,0 +1,71 @@
|
|
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(t)
|
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(t)
|
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(t)
|
52
|
+
now = Time.now
|
53
|
+
|
54
|
+
# if no directory was given use the default blog directory (underneath
|
55
|
+
# the content directory)
|
56
|
+
dir = Webby.site.blog_dir if dir.empty?
|
57
|
+
dir = File.join(dir, now.strftime('%Y/%m'))
|
58
|
+
|
59
|
+
# determine the filename and template name
|
60
|
+
fn = File.join(dir, 'index.txt')
|
61
|
+
tmpl = Dir.glob(File.join(Webby.site.template_dir, 'blog/month.*')).first.to_s
|
62
|
+
|
63
|
+
if test(?f, tmpl) and not test(?f, File.join(Webby.site.content_dir, fn))
|
64
|
+
Webby::Builder.create(fn, :from => tmpl,
|
65
|
+
:locals => {:title => year, :directory => dir})
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end # namespace :blog
|
70
|
+
|
71
|
+
# EOF
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
task :configure_basepath do
|
3
|
+
Webby.site.base = ENV['BASE'] if ENV.has_key?('BASE')
|
4
|
+
end
|
5
|
+
|
6
|
+
desc "Build the website"
|
7
|
+
task :build => :configure_basepath do |t|
|
8
|
+
Webby::Builder.run
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Rebuild the website"
|
12
|
+
task :rebuild => :configure_basepath do |t|
|
13
|
+
Webby::Builder.run :rebuild => true
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Continuously build the website"
|
17
|
+
task :autobuild => :configure_basepath do |t|
|
18
|
+
Webby::AutoBuilder.run
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Delete the website"
|
22
|
+
task :clobber do |t|
|
23
|
+
rm_rf Webby.site.output_dir
|
24
|
+
mkdir Webby.site.output_dir
|
25
|
+
end
|
26
|
+
|
27
|
+
# EOF
|
data/data/tasks/create.rake
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
namespace :create do
|
3
|
+
|
4
|
+
FileList["#{Webby.site.template_dir}/*"].each do |template|
|
5
|
+
next unless test(?f, template)
|
6
|
+
name = template.pathmap '%n'
|
7
|
+
|
8
|
+
# if the file is a partial template
|
9
|
+
name = $1 if name =~ %r/^_(.*)/
|
10
|
+
|
11
|
+
desc "Create a new #{name}"
|
12
|
+
task name do |t|
|
13
|
+
page, title, dir = Webby::Builder.new_page_info(t)
|
14
|
+
page = Webby::Builder.create(page, :from => template,
|
15
|
+
:locals => {:title => title, :directory => dir})
|
16
|
+
exec(::Webby.editor, page) unless ::Webby.editor.nil?
|
17
|
+
end
|
18
|
+
end # each
|
19
|
+
|
20
|
+
end # namespace :create
|
3
21
|
|
4
22
|
# EOF
|
data/data/tasks/deploy.rake
CHANGED
@@ -6,14 +6,14 @@ namespace :deploy do
|
|
6
6
|
desc 'Deploy to the server using rsync'
|
7
7
|
task :rsync do
|
8
8
|
cmd = "rsync #{SITE.rsync_args.join(' ')} "
|
9
|
-
cmd << "#{SITE.output_dir}/ #{SITE.host}:#{SITE.remote_dir}"
|
9
|
+
cmd << "#{SITE.output_dir}/ #{SITE.user}@#{SITE.host}:#{SITE.remote_dir}"
|
10
10
|
sh cmd
|
11
11
|
end
|
12
12
|
|
13
13
|
desc 'Deploy to the server using ssh'
|
14
14
|
task :ssh do
|
15
15
|
Rake::SshDirPublisher.new(
|
16
|
-
SITE.host, SITE.remote_dir, SITE.output_dir
|
16
|
+
"#{SITE.user}@#{SITE.host}", SITE.remote_dir, SITE.output_dir
|
17
17
|
).upload
|
18
18
|
end
|
19
19
|
|
data/data/tasks/setup.rb
CHANGED
@@ -9,6 +9,9 @@ end
|
|
9
9
|
SITE = Webby.site
|
10
10
|
|
11
11
|
# Load the other rake files in the tasks folder
|
12
|
-
Dir.glob(
|
12
|
+
Dir.glob(::File.join(%w[tasks *.rake])).sort.each {|fn| import fn}
|
13
|
+
|
14
|
+
# Load all the ruby files in the lib folder
|
15
|
+
Dir.glob(::File.join(%w[lib ** *.rb])).sort.each {|fn| require fn}
|
13
16
|
|
14
17
|
# EOF
|
@@ -1,6 +1,11 @@
|
|
1
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
|
2
7
|
extension: xml
|
3
|
-
layout:
|
8
|
+
layout: nil
|
4
9
|
dirty: true
|
5
10
|
filter:
|
6
11
|
- erb
|
@@ -8,25 +13,27 @@ filter:
|
|
8
13
|
<?xml version="1.0" encoding="utf-8"?>
|
9
14
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
10
15
|
|
11
|
-
<title
|
12
|
-
<subtitle
|
13
|
-
<link href="http
|
14
|
-
<link href="http
|
16
|
+
<title><%%= h(@page.title) %></title>
|
17
|
+
<subtitle><%%= h(@page.subtitle) %></subtitle>
|
18
|
+
<link href="http://<%%= @page.site %>/<%= directory %>/" rel="self" />
|
19
|
+
<link href="http://<%%= @page.site %>/" />
|
15
20
|
<updated><%%= Time.now.xmlschema %></updated>
|
16
21
|
<author>
|
17
|
-
<name
|
18
|
-
<email
|
22
|
+
<name><%%= h(@page.author) %></name>
|
23
|
+
<email><%%= h(@page.email) %></email>
|
19
24
|
</author>
|
20
|
-
<id>http
|
25
|
+
<id>http://<%%= @page.site %>/</id>
|
21
26
|
<%% @pages.find(:limit => 10,
|
22
|
-
:in_directory => '
|
27
|
+
:in_directory => 'blog',
|
23
28
|
:recursive => true,
|
24
|
-
:sort_by => '
|
25
|
-
:reverse => true).each do |article|
|
29
|
+
:sort_by => 'mtime',
|
30
|
+
:reverse => true).each do |article|
|
31
|
+
next if article == @page
|
32
|
+
%>
|
26
33
|
<entry>
|
27
34
|
<title><%%= h(article.title) %></title>
|
28
|
-
<link href="<%%= article.url %>"/>
|
29
|
-
<id>tag
|
35
|
+
<link href="<%%= article.url %>" />
|
36
|
+
<id>tag:<%%= @page.site %>,<%%= article.created_at.strftime('%Y-%m-%d') %>:<%%= article.created_at.to_i %></id>
|
30
37
|
<updated><%%= article.created_at.xmlschema %></updated>
|
31
38
|
<content type="html"><%%= h(article.render) %></content>
|
32
39
|
</entry>
|
data/data/templates/page.erb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
title: <%= title %>
|
3
|
+
created_at: <%= Time.now.to_y %>
|
4
|
+
author: You
|
5
|
+
company: Company
|
6
|
+
copyright: Creative Commons
|
7
|
+
filter:
|
8
|
+
- erb
|
9
|
+
- textile
|
10
|
+
- slides
|
11
|
+
layout: presentation
|
12
|
+
---
|
13
|
+
h1. Presentation Title
|
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 => 'ruby', :line_numbers => false do -%>
|
28
|
+
class EnglishMajor
|
29
|
+
def supercilious
|
30
|
+
'behaving or looking as though one thinks one is superior to others'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
<%% end -%>
|
34
|
+
|
35
|
+
|
36
|
+
h1. The Final Slide
|
37
|
+
|
38
|
+
And that about sums it up!
|
39
|
+
|
40
|
+
Thanks for visiting
|
@@ -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
|