Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

getting all the assets actually needed and slides to relative

  • Loading branch information...
commit ce714e2d034a2baad722532cbf6a09b8e68f3ad8 1 parent a30593f
@schacon schacon authored
Showing with 8 additions and 3 deletions.
  1. +7 −1 lib/showoff.rb
  2. +1 −1  public/js/showoff.js
  3. +0 −1  showoff.gemspec
View
8 lib/showoff.rb
@@ -269,8 +269,14 @@ def assets_needed
href = clean_link(link['src'])
assets << href if href
end
+
+ css = Dir.glob("#{options.public}/**/*.css").map { |path| path.gsub(options.public + '/', '') }
+ assets << css
- assets.join("\n")
+ js = Dir.glob("#{options.public}/**/*.js").map { |path| path.gsub(options.public + '/', '') }
+ assets << js
+
+ assets.uniq.join("\n")
end
def slides(static=false)
View
2  public/js/showoff.js
@@ -45,7 +45,7 @@ function setupPreso(load_slides, prefix) {
function loadSlides(load_slides, prefix) {
//load slides offscreen, wait for images and then initialize
if (load_slides) {
- $("#slides").load("/slides", false, function(){
+ $("#slides").load("slides", false, function(){
$("#slides img").batchImageLoad({
loadingCompleteCallback: initializePresentation(prefix)
})
View
1  showoff.gemspec
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
s.add_dependency "bluecloth"
s.add_dependency "nokogiri"
s.add_dependency "json"
- s.add_dependency "kramdown"
s.add_dependency ("gli",">= 1.1.1")
s.description = <<-desc
ShowOff is a Sinatra web app that reads simple configuration files for a
Please sign in to comment.
Something went wrong with that request. Please try again.