prez 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/bin/prez +3 -1
  3. data/lib/prez/assets.rb +10 -3
  4. data/lib/prez/build.rb +7 -18
  5. data/lib/prez/builder.rb +19 -0
  6. data/lib/prez/cli.rb +4 -11
  7. data/lib/prez/error.rb +16 -0
  8. data/lib/prez/files.rb +30 -10
  9. data/lib/prez/helpers.rb +37 -0
  10. data/lib/prez/new.rb +36 -0
  11. data/lib/prez/sass_extensions.rb +40 -0
  12. data/lib/prez/start.rb +69 -0
  13. data/lib/prez/version.rb +1 -1
  14. data/templates/build.html.tt +87 -0
  15. data/templates/new.prez.tt +11 -2
  16. data/vendor/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  17. data/vendor/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  18. data/vendor/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  19. data/vendor/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  20. data/vendor/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  21. data/vendor/javascripts/bootstrap.js +2306 -0
  22. data/vendor/javascripts/prez-controller.js.coffee +131 -0
  23. data/vendor/stylesheets/_bootstrap.scss +50 -0
  24. data/vendor/stylesheets/bootstrap/_alerts.scss +73 -0
  25. data/vendor/stylesheets/bootstrap/_badges.scss +67 -0
  26. data/vendor/stylesheets/bootstrap/_breadcrumbs.scss +26 -0
  27. data/vendor/stylesheets/bootstrap/_button-groups.scss +243 -0
  28. data/vendor/stylesheets/bootstrap/_buttons.scss +160 -0
  29. data/vendor/stylesheets/bootstrap/_carousel.scss +269 -0
  30. data/vendor/stylesheets/bootstrap/_close.scss +36 -0
  31. data/vendor/stylesheets/bootstrap/_code.scss +69 -0
  32. data/vendor/stylesheets/bootstrap/_component-animations.scss +38 -0
  33. data/vendor/stylesheets/bootstrap/_dropdowns.scss +214 -0
  34. data/vendor/stylesheets/bootstrap/_forms.scss +570 -0
  35. data/vendor/stylesheets/bootstrap/_glyphicons.scss +301 -0
  36. data/vendor/stylesheets/bootstrap/_grid.scss +84 -0
  37. data/vendor/stylesheets/bootstrap/_input-groups.scss +166 -0
  38. data/vendor/stylesheets/bootstrap/_jumbotron.scss +50 -0
  39. data/vendor/stylesheets/bootstrap/_labels.scss +66 -0
  40. data/vendor/stylesheets/bootstrap/_list-group.scss +124 -0
  41. data/vendor/stylesheets/bootstrap/_media.scss +61 -0
  42. data/vendor/stylesheets/bootstrap/_mixins.scss +39 -0
  43. data/vendor/stylesheets/bootstrap/_modals.scss +148 -0
  44. data/vendor/stylesheets/bootstrap/_navbar.scss +663 -0
  45. data/vendor/stylesheets/bootstrap/_navs.scss +244 -0
  46. data/vendor/stylesheets/bootstrap/_normalize.scss +427 -0
  47. data/vendor/stylesheets/bootstrap/_pager.scss +54 -0
  48. data/vendor/stylesheets/bootstrap/_pagination.scss +88 -0
  49. data/vendor/stylesheets/bootstrap/_panels.scss +265 -0
  50. data/vendor/stylesheets/bootstrap/_popovers.scss +135 -0
  51. data/vendor/stylesheets/bootstrap/_print.scss +107 -0
  52. data/vendor/stylesheets/bootstrap/_progress-bars.scss +87 -0
  53. data/vendor/stylesheets/bootstrap/_responsive-embed.scss +35 -0
  54. data/vendor/stylesheets/bootstrap/_responsive-utilities.scss +177 -0
  55. data/vendor/stylesheets/bootstrap/_scaffolding.scss +150 -0
  56. data/vendor/stylesheets/bootstrap/_tables.scss +234 -0
  57. data/vendor/stylesheets/bootstrap/_theme.scss +273 -0
  58. data/vendor/stylesheets/bootstrap/_thumbnails.scss +38 -0
  59. data/vendor/stylesheets/bootstrap/_tooltip.scss +103 -0
  60. data/vendor/stylesheets/bootstrap/_type.scss +298 -0
  61. data/vendor/stylesheets/bootstrap/_utilities.scss +56 -0
  62. data/vendor/stylesheets/bootstrap/_variables.scss +862 -0
  63. data/vendor/stylesheets/bootstrap/_wells.scss +29 -0
  64. data/vendor/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
  65. data/vendor/stylesheets/bootstrap/mixins/_background-variant.scss +11 -0
  66. data/vendor/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  67. data/vendor/stylesheets/bootstrap/mixins/_buttons.scss +52 -0
  68. data/vendor/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  69. data/vendor/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  70. data/vendor/stylesheets/bootstrap/mixins/_forms.scss +88 -0
  71. data/vendor/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
  72. data/vendor/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  73. data/vendor/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  74. data/vendor/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  75. data/vendor/stylesheets/bootstrap/mixins/_image.scss +33 -0
  76. data/vendor/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  77. data/vendor/stylesheets/bootstrap/mixins/_list-group.scss +31 -0
  78. data/vendor/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  79. data/vendor/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  80. data/vendor/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
  81. data/vendor/stylesheets/bootstrap/mixins/_pagination.scss +23 -0
  82. data/vendor/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  83. data/vendor/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  84. data/vendor/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  85. data/vendor/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  86. data/vendor/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
  87. data/vendor/stylesheets/bootstrap/mixins/_size.scss +10 -0
  88. data/vendor/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  89. data/vendor/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  90. data/vendor/stylesheets/bootstrap/mixins/_text-emphasis.scss +11 -0
  91. data/vendor/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  92. data/vendor/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  93. data/vendor/stylesheets/bootstrap.scss +2 -0
  94. data/vendor/stylesheets/prez/_variables.scss +3 -0
  95. data/vendor/stylesheets/prez-controller.scss +37 -0
  96. data/vendor/stylesheets/{prez.css → prez.scss} +12 -5
  97. metadata +118 -4
  98. data/vendor/javascripts/prez.js +0 -53
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2249ace5ffb8f6605523aa4604763b57445b4bd3
4
- data.tar.gz: 7dba78c2ade67bd68bab76e895057aae7fb8cfed
3
+ metadata.gz: a9566ac0764fadc9bfd46520d7a5ab5accd03095
4
+ data.tar.gz: 2107dba528cc10fcf9caf3c74192f2c8308f2f94
5
5
  SHA512:
6
- metadata.gz: 2e4dc2afb90be92edde3071a9dfef2901fbe7a6e629f3353dec14581b6b11b2e656f0d5b48b40a396e1f0c92a06a1f2e84773a7183cff69bc56fd0d22de98726
7
- data.tar.gz: a4888d107c8efb98b12d363a5204ccfe26d838a730a2fb71e48c6d37a7bc9654a35ab11fa24e27f853a563e8a678e210c593c9a321efaa7293f6e7552caf0f5b
6
+ metadata.gz: 27ea96591daee1b5a597453f3c17ee810bb266821244b7a62c156eb9d20c8f6e3f449535189a4772fa1a6c1f149d8dec5bbb30ac1a95f91956cb94af6d921bbc
7
+ data.tar.gz: cb71ef8a94917acbd27b72418e6b9486b1f981f3d9b6e420581c00afb0bc9a2974252a39166392cbe6a979e9ee75a72745950db2cbb4e1a1b7f0298764cfd32e
data/bin/prez CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  require "rubygems"
3
- gem "prez", "= 0.0.1"
3
+ gem "coffee-script", "~> 2.3"
4
+ gem "launchy", "~> 2.4"
5
+ gem "prez", "= 0.0.2"
4
6
  gem "sass", "~> 3.4"
5
7
  gem "therubyracer", "~> 0.12"
6
8
  gem "thor", "~> 0.19"
data/lib/prez/assets.rb CHANGED
@@ -1,15 +1,18 @@
1
+ require "coffee-script"
1
2
  require "prez/files"
3
+ require "prez/sass_extensions"
2
4
  require "sass"
3
5
  require "uglifier"
4
6
 
5
7
  module Prez
6
8
  module Assets
7
9
  class Tagged
8
- attr_reader :name, :contents
10
+ attr_reader :name, :contents, :file
9
11
 
10
12
  def initialize(name, options = {})
11
13
  @name = name
12
14
  @contents = Prez::Files.contents name, extension
15
+ @file = Prez::Files.find name, extension
13
16
  @dev = options.fetch :dev, false
14
17
  end
15
18
 
@@ -29,7 +32,7 @@ module Prez
29
32
  if dev?
30
33
  "#{open}\n#{contents}#{close}"
31
34
  else
32
- "#{open}#{minified_contents}#{close}"
35
+ "#{open}#{minified_contents.strip}#{close}"
33
36
  end
34
37
  end
35
38
  end
@@ -48,6 +51,7 @@ module Prez
48
51
  end
49
52
 
50
53
  def minify(contents)
54
+ contents = CoffeeScript.compile contents if file =~ /\.coffee$/
51
55
  Uglifier.compile contents
52
56
  end
53
57
  end
@@ -66,7 +70,10 @@ module Prez
66
70
  end
67
71
 
68
72
  def minify(contents)
69
- Sass::Engine.new(contents, syntax: :scss, style: :compressed).render
73
+ Sass::Engine.new(contents,
74
+ syntax: :scss,
75
+ style: :compressed,
76
+ load_paths: [File.expand_path("..", file)]).render
70
77
  end
71
78
  end
72
79
 
data/lib/prez/build.rb CHANGED
@@ -1,11 +1,12 @@
1
- require "prez/assets"
1
+ require "prez/builder"
2
+ require "prez/error"
2
3
  require "thor/actions"
3
- require "thor/error"
4
4
  require "thor/group"
5
5
 
6
6
  module Prez
7
7
  class Build < Thor::Group
8
8
  include Thor::Actions
9
+ include Prez::Builder
9
10
  argument :name, type: :string
10
11
 
11
12
  def check_file!
@@ -14,16 +15,16 @@ module Prez
14
15
  elsif File.exists? "#{name}.prez"
15
16
  @filename = "#{name}.prez"
16
17
  else
17
- raise Thor::Error.new(set_color("Missing prez file '#{name}'", :red, :bold))
18
+ raise Prez::Error.new("Missing prez file '#{name}'")
18
19
  end
19
20
 
20
21
  if filename =~ /\.html$/
21
- raise Thor::Error.new(set_color("Prez file cannot be html file: '#{name}'", :red, :bold))
22
+ raise Prez::Error.new("Prez file cannot be an html file: '#{name}'")
22
23
  end
23
24
  end
24
25
 
25
26
  def generate_html
26
- template filename, html_filename
27
+ create_file html_filename, build_html(filename)
27
28
  end
28
29
 
29
30
  private
@@ -40,21 +41,9 @@ module Prez
40
41
  "#{base_name}.html"
41
42
  end
42
43
 
43
- def javascript(name)
44
- Prez::Assets.javascript name
45
- rescue Prez::Files::MissingError
46
- raise Thor::Error.new(set_color("Could not find file: '#{name}.js'", :red, :bold))
47
- end
48
-
49
- def stylesheet(name)
50
- Prez::Assets.stylesheet name
51
- rescue Prez::Files::MissingError
52
- raise Thor::Error.new(set_color("Could not find file: '#{name}.css'", :red, :bold))
53
- end
54
-
55
44
  class << self
56
45
  def source_root
57
- File.expand_path "."
46
+ File.absolute_path File.expand_path("../../../templates", __FILE__)
58
47
  end
59
48
  end
60
49
  end
@@ -0,0 +1,19 @@
1
+ require "erb"
2
+ require "prez/helpers"
3
+
4
+ module Prez
5
+ module Builder
6
+ include Prez::Helpers
7
+
8
+ private
9
+
10
+ def build_html(filename)
11
+ @_slide_contents = erb_eval filename
12
+ erb_eval File.expand_path("../../../templates/build.html.tt", __FILE__)
13
+ end
14
+
15
+ def erb_eval(template)
16
+ ERB.new(File.read(template), nil, "-", "@output_buffer").result(binding)
17
+ end
18
+ end
19
+ end
data/lib/prez/cli.rb CHANGED
@@ -1,20 +1,17 @@
1
1
  require "prez/build"
2
+ require "prez/new"
3
+ require "prez/start"
2
4
  require "prez/version"
3
5
  require "thor"
4
- require "thor/actions"
5
6
 
6
7
  module Prez
7
8
  class CLI < Thor
8
- include Thor::Actions
9
9
  register Prez::Build, "build", "build NAME", "Builds the single html presentation from the prez file"
10
+ register Prez::New, "new", "new NAME", "Generates a new presentation"
11
+ register Prez::Start, "start", "start NAME", "Launches your browser with the given presentation"
10
12
 
11
13
  map "-v" => "version"
12
14
 
13
- desc "new NAME", "Generates a new presentation"
14
- def new(name)
15
- template "new.prez.tt", "#{name}.prez"
16
- end
17
-
18
15
  desc "version", "Show the prez version"
19
16
  long_desc "
20
17
  This can be optionally used as 'prez -v'"
@@ -26,10 +23,6 @@ module Prez
26
23
  def exit_on_failure?
27
24
  true
28
25
  end
29
-
30
- def source_root
31
- File.absolute_path File.expand_path("../../../templates", __FILE__)
32
- end
33
26
  end
34
27
  end
35
28
  end
data/lib/prez/error.rb ADDED
@@ -0,0 +1,16 @@
1
+ require "thor/error"
2
+ require "thor/shell/color"
3
+
4
+ module Prez
5
+ class Error < Thor::Error
6
+ def initialize(msg)
7
+ super colorize(msg)
8
+ end
9
+
10
+ private
11
+
12
+ def colorize(msg)
13
+ Thor::Shell::Color.new.set_color msg, :red, :bold
14
+ end
15
+ end
16
+ end
data/lib/prez/files.rb CHANGED
@@ -7,10 +7,12 @@ module Prez
7
7
  end
8
8
 
9
9
  class Paths
10
- attr_reader :extension, :paths
10
+ attr_reader :extension_alias, :extensions, :paths
11
11
 
12
- def initialize(extension, dirname)
13
- @extension = extension
12
+ def initialize(extension_alias, extensions, dirname, options = {})
13
+ @extension_alias = extension_alias
14
+ @extensions = extensions
15
+ @binary = options.fetch :binary, false
14
16
 
15
17
  @paths = [].tap do |paths|
16
18
  paths << File.expand_path(".")
@@ -21,26 +23,44 @@ module Prez
21
23
 
22
24
  def find(name)
23
25
  paths.each do |path|
24
- file = File.join path, "#{name}.#{extension}"
26
+ extensions.each do |extension|
27
+ files = [File.join(path, "#{name}.#{extension}")]
25
28
 
26
- if File.exists?(file)
27
- return file
29
+ if name.end_with?(".#{extension}")
30
+ files << File.join(path, name)
31
+ end
32
+
33
+ files.each do |file|
34
+ if File.exists?(file)
35
+ return file
36
+ end
37
+ end
28
38
  end
29
39
  end
30
40
 
31
- raise Prez::Files::MissingError.new(name, extension)
41
+ raise Prez::Files::MissingError.new(name, extension_alias)
42
+ end
43
+
44
+ def binary?
45
+ @binary
32
46
  end
33
47
  end
34
48
 
35
49
  class << self
36
50
  SEARCH_PATHS = {
37
- "js" => Prez::Files::Paths.new("js", "javascripts"),
38
- "css" => Prez::Files::Paths.new("css", "stylesheets")
51
+ "js" => Prez::Files::Paths.new("js", ["js.coffee", "coffee", "js"], "javascripts"),
52
+ "css" => Prez::Files::Paths.new("css", ["css.scss", "scss", "css"], "stylesheets"),
53
+ "font" => Prez::Files::Paths.new("font", ["eot", "svg", "ttf", "woff", "woff2"], "fonts", binary: true)
39
54
  }
40
55
 
41
56
  def contents(name, extension)
42
57
  file = find name, extension
43
- File.read file
58
+
59
+ if SEARCH_PATHS[extension].binary?
60
+ File.read file, mode: "rb"
61
+ else
62
+ File.read file
63
+ end
44
64
  end
45
65
 
46
66
  def find(name, extension)
@@ -0,0 +1,37 @@
1
+ require "cgi"
2
+ require "prez/assets"
3
+ require "prez/error"
4
+
5
+ module Prez
6
+ module Helpers
7
+ protected
8
+
9
+ def html_escape(value)
10
+ CGI.escape_html value
11
+ end
12
+
13
+ def slide
14
+ concat %{<div class="prez-slide">}
15
+ yield
16
+ concat %{</div>}
17
+ end
18
+
19
+ def notes
20
+ concat %{<div class="prez-notes">}
21
+ yield
22
+ concat %{</div>}
23
+ end
24
+
25
+ def javascript(name)
26
+ Prez::Assets.javascript name
27
+ rescue Prez::Files::MissingError
28
+ raise Prez::Error.new("Could not find file: '#{name}.js'")
29
+ end
30
+
31
+ def stylesheet(name)
32
+ Prez::Assets.stylesheet name
33
+ rescue Prez::Files::MissingError
34
+ raise Prez::Error.new("Could not find file: '#{name}.css'")
35
+ end
36
+ end
37
+ end
data/lib/prez/new.rb ADDED
@@ -0,0 +1,36 @@
1
+ require "prez/error"
2
+ require "thor/actions"
3
+ require "thor/group"
4
+
5
+ module Prez
6
+ class New < Thor::Group
7
+ include Thor::Actions
8
+ argument :name, type: :string
9
+
10
+ def check_file!
11
+ if File.exists? filename
12
+ raise Prez::Error.new("There is already a presentation file named '#{filename}'")
13
+ end
14
+ end
15
+
16
+ def generate_prez
17
+ template "new.prez.tt", "#{name}.prez"
18
+ end
19
+
20
+ private
21
+
22
+ def filename
23
+ if name =~ /\.prez$/
24
+ name
25
+ else
26
+ "#{name}.prez"
27
+ end
28
+ end
29
+
30
+ class << self
31
+ def source_root
32
+ File.absolute_path File.expand_path("../../../templates", __FILE__)
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,40 @@
1
+ require "base64"
2
+ require "prez/error"
3
+ require "prez/files"
4
+ require "sass"
5
+
6
+ module Sass::Script::Functions
7
+ def twbs_font_path(path)
8
+ assert_type path, :String
9
+ path = path.value.sub /[?#].*/, ""
10
+ font_data = Base64.encode64 Prez::Files.contents(path, "font")
11
+ font_data.gsub! "\n", ""
12
+ extension = path[/\.([^.]*)$/, 1]
13
+
14
+ case extension
15
+ when "eot"
16
+ font_type = "application/vnd.ms-fontobject"
17
+ when "svg"
18
+ font_type = "image/svg+xml"
19
+ when "ttf"
20
+ font_type = "font/ttf"
21
+ when "woff"
22
+ font_type = "application/font-woff"
23
+ when "woff2"
24
+ font_type = "application/font-woff2"
25
+ else
26
+ raise Prez::Error.new("Unknown font extension '#{extension}'")
27
+ end
28
+
29
+ Sass::Script::Value::String.new("data:#{font_type};base64,#{font_data}")
30
+ rescue Prez::Files::MissingError => e
31
+ raise Prez::Error.new("Could not find font: '#{path}'")
32
+ end
33
+
34
+ def twbs_image_path(path)
35
+ Sass::Script::Value::String.new("ARGLE BARGLE IMAGE #{path.inspect}")
36
+ end
37
+
38
+ declare :twbs_font_path, [:path]
39
+ declare :twbs_image_path, [:path]
40
+ end
data/lib/prez/start.rb ADDED
@@ -0,0 +1,69 @@
1
+ require "launchy"
2
+ require "prez/builder"
3
+ require "prez/error"
4
+ require "thor/actions"
5
+ require "thor/group"
6
+ require "webrick"
7
+
8
+ module Prez
9
+ class Start < Thor::Group
10
+ include Thor::Actions
11
+ include Prez::Builder
12
+ argument :name, type: :string
13
+
14
+ def check_file!
15
+ if File.exists? name
16
+ @filename = name
17
+ elsif File.exists? "#{name}.prez"
18
+ @filename = "#{name}.prez"
19
+ else
20
+ raise Prez::Error.new("Missing prez file '#{name}'")
21
+ end
22
+
23
+ if filename =~ /\.html$/
24
+ raise Prez::Error.new("Prez file cannot be an html file: '#{name}'")
25
+ end
26
+ end
27
+
28
+ def generate_html
29
+ say "Generating html..."
30
+ @html = build_html filename
31
+ end
32
+
33
+ def start_server
34
+ say "Starting server..."
35
+ server = WEBrick::HTTPServer.new Port: 0, Logger: Prez::Start::NoopLog.new, AccessLog: []
36
+ port = server.config[:Port]
37
+
38
+ server.mount_proc "/" do |request, response|
39
+ response.body = @html
40
+ server.stop
41
+ end
42
+
43
+ begin
44
+ Launchy.open "http://localhost:#{port}/"
45
+ server.start
46
+ ensure
47
+ server.shutdown
48
+ end
49
+ end
50
+
51
+ private
52
+
53
+ def filename
54
+ @filename
55
+ end
56
+
57
+ class << self
58
+ def source_root
59
+ File.absolute_path File.expand_path("../../../templates", __FILE__)
60
+ end
61
+ end
62
+
63
+ class NoopLog < WEBrick::BasicLog
64
+ def initialize
65
+ @level = INFO
66
+ end
67
+ end
68
+ end
69
+ end
data/lib/prez/version.rb CHANGED
@@ -2,7 +2,7 @@ module Prez
2
2
  module Version
3
3
  class << self
4
4
  def to_s
5
- "0.0.1"
5
+ "0.0.2"
6
6
  end
7
7
  end
8
8
  end
@@ -0,0 +1,87 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1">
7
+ <%= stylesheet "bootstrap" %>
8
+ <%= stylesheet "prez-controller" %>
9
+ <%= javascript "jquery" %>
10
+ <%= javascript "prez-controller" %>
11
+ <%= javascript "bootstrap" %>
12
+ </head>
13
+
14
+ <body>
15
+ <div id="container" class="container-fluid">
16
+ <div id="pre-launch">
17
+ <div id="filler"></div>
18
+
19
+ <div class="row">
20
+ <div class="col-xs-6 col-md-offset-2 col-md-4 col-lg-offset-3 col-lg-3">
21
+ <button id="new-window" type="button" class="btn btn-default btn-block btn-lg active" data-toggle="button">
22
+ <span class="glyphicon glyphicon-new-window"></span>
23
+ <span id="launch-message">Launch in new window</span>
24
+ </button>
25
+ </div>
26
+
27
+ <div class="col-xs-6 col-md-4 col-lg-3">
28
+ <button id="launch" class="btn btn-primary btn-block btn-lg">Start Presentation</button>
29
+ </div>
30
+ </div>
31
+
32
+ <div id="slides-document" style="display: none;"><%= html_escape @_slide_contents %></div>
33
+ </div>
34
+
35
+ <div id="post-launch">
36
+ <div class="row">
37
+ <div class="col-xs-2">
38
+ <button class="prev-slide btn btn-primary btn-block btn-lg"><span class="glyphicon glyphicon-chevron-left"></span></button>
39
+ </div>
40
+
41
+ <div class="col-xs-offset-3 col-xs-2">
42
+ <button class="end-prez btn btn-danger btn-block btn-lg"><span class="glyphicon glyphicon-remove"></span></button>
43
+ </div>
44
+
45
+ <div class="col-xs-offset-3 col-xs-2">
46
+ <button class="next-slide btn btn-primary btn-block btn-lg"><span class="glyphicon glyphicon-chevron-right"></span></button>
47
+ </div>
48
+ </div>
49
+
50
+ <p class="lead text-center">
51
+ <strong>Current slide: <span class="current-slide-number"></span></strong>
52
+ </p>
53
+
54
+ <iframe id="preview-frame"></iframe>
55
+ <div id="preview-frame-padding"></div>
56
+
57
+ <div class="row">
58
+ <div class="col-xs-offset-2 col-xs-8">
59
+ <div id="slide-notes" class="lead">
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </div>
64
+
65
+ <div id="in-window-not-implemented-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="not-implemented" aria-hidden="true">
66
+ <div class="modal-dialog">
67
+ <div class="modal-content">
68
+ <div class="modal-header">
69
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
70
+ <h4 class="modal-title" id="not-implemented">Not Implemented</h4>
71
+ </div>
72
+
73
+ <div class="modal-body">
74
+ <p>
75
+ Sorry, same window presentations are not yet implemented!
76
+ </p>
77
+ </div>
78
+
79
+ <div class="modal-footer">
80
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </body>
87
+ </html>
@@ -1,10 +1,19 @@
1
1
  <html>
2
2
  <head>
3
- <%%= javascript "jquery" %>
4
- <%%= javascript "prez" %>
5
3
  <%%= stylesheet "prez" %>
6
4
  </head>
7
5
 
8
6
  <body>
7
+ <%% slide do %>
8
+ <p>
9
+ Put each slide inside slide blocks.
10
+ </p>
11
+
12
+ <%% notes do %>
13
+ <p>
14
+ Nest your slide notes inside the slide.
15
+ </p>
16
+ <%% end %>
17
+ <%% end %>
9
18
  </body>
10
19
  </html>