Permalink
Browse files

add logo

  • Loading branch information...
1 parent cd10a05 commit fb36095bb0b560ebd89f551d8cbe94fc0e415c00 @rkh committed with cypher Sep 3, 2010
Showing with 13 additions and 3 deletions.
  1. +5 −0 assets/book.css
  2. +2 −0 book/TOC.markdown
  3. 0 images/.gitignore
  4. BIN images/logo.png
  5. +6 −3 sinatra-book.thor
View
@@ -56,6 +56,11 @@ body p
body hr
{ display: none; }
+
+body img[src="logo.png"]
+ { position: relative;
+ left: -1em;
+ margin-bottom: -2em; }
/* TOC */
.maruku_toc ul { font-weight: bold; padding: 0em; }
View
@@ -1,6 +1,8 @@
CSS: ./book.css
Title: Sinatra Book
+![logo](logo.png)
+
Table of Contents
=================
View
No changes.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -6,6 +6,7 @@ require 'maruku'
require 'fileutils'
class Book < Thor
+ include FileUtils
SUPPORTED_FORMATS = %w{html latex pdf}
OUTPUT_DIR = File.join(File.dirname(__FILE__), "output")
@@ -17,8 +18,10 @@ class Book < Thor
def build(format = 'html')
doc = Maruku.new(complete_markdown)
- FileUtils.mkdir_p(OUTPUT_DIR)
- FileUtils.cp( File.join(File.dirname(__FILE__), 'assets', 'book.css'), File.join(File.dirname(__FILE__), 'output'))
+ mkdir_p OUTPUT_DIR
+ Dir.glob File.expand_path('../{assets,images}/*', __FILE__) do |file|
+ cp file, OUTPUT_DIR
+ end
if SUPPORTED_FORMATS.include?( format )
@@ -32,7 +35,7 @@ class Book < Thor
desc "clean", "Delete the output directory, along with all contents"
def clean
- FileUtils.rm_rf(OUTPUT_DIR, {:verbose => true})
+ rm_rf OUTPUT_DIR, :verbose => true
end
private

0 comments on commit fb36095

Please sign in to comment.