From 8fa9a30fbd3b559de99dc9639bb28d71184e7a89 Mon Sep 17 00:00:00 2001 From: Logan Blackburn Date: Sun, 26 May 2013 01:59:44 -0500 Subject: [PATCH] switched haml.info from StaticMatic (dead for 2 years now) to Middleman --- .gitignore | 4 +- Gemfile | 20 +-- Gemfile.lock | 133 +++++++++++++++--- Rakefile | 37 ++--- config.rb | 88 ++++++++++++ config/site.rb | 25 ---- {src/pages => source}/_footer.haml | 0 source/_header.haml | 8 ++ source/_subnav.haml | 4 + {src/pages => source}/about.haml | 2 +- {src/pages => source}/development.haml | 2 +- {src/pages => source}/docs.haml | 2 +- {src/pages => source}/download.haml | 2 +- {src/pages => source}/editors.haml | 2 +- source/error.haml | 4 + .../fonts/DroidSansMono-webfont.eot | Bin .../fonts/DroidSansMono-webfont.svg | 0 .../fonts/DroidSansMono-webfont.ttf | Bin .../fonts/DroidSansMono-webfont.woff | Bin {site => source}/fonts/PTS55F-webfont.eot | Bin {site => source}/fonts/PTS55F-webfont.svg | 0 {site => source}/fonts/PTS55F-webfont.ttf | Bin {site => source}/fonts/PTS55F-webfont.woff | Bin {site => source}/fonts/PTS56F-webfont.eot | Bin {site => source}/fonts/PTS56F-webfont.svg | 0 {site => source}/fonts/PTS56F-webfont.ttf | Bin {site => source}/fonts/PTS56F-webfont.woff | Bin {site => source}/fonts/PTS75F-webfont.eot | Bin {site => source}/fonts/PTS75F-webfont.svg | 0 {site => source}/fonts/PTS75F-webfont.ttf | Bin {site => source}/fonts/PTS75F-webfont.woff | Bin {src/pages => source}/help.haml | 2 +- {site => source}/images/bg-about.png | Bin {site => source}/images/bg-body.png | Bin {site => source}/images/bg-footer.png | Bin {site => source}/images/bg-quote-alt.png | Bin {site => source}/images/bg-quote.png | Bin {site => source}/images/bg-sample-arrow.png | Bin {site => source}/images/bg-sample-erb.png | Bin {site => source}/images/bg-sample-haml.png | Bin {site => source}/images/bg-sample.png | Bin {site => source}/images/favicon.ico | Bin {site => source}/images/haml.png | Bin {site => source}/images/img-about.png | Bin {site => source}/images/img-badge-about.png | Bin .../images/img-badge-development.png | Bin .../images/img-badge-documentation.png | Bin .../images/img-badge-download.png | Bin {site => source}/images/img-badge-editors.png | Bin {site => source}/images/img-badge-help.png | Bin .../images/img-badge-tutorial.png | Bin {site => source}/images/img-error.png | Bin {site => source}/images/img-hero-boat.png | Bin {site => source}/images/img-hero.png | Bin {src/pages => source}/index.haml | 16 +-- {site => source}/javascripts/modernizr.js | 0 .../layouts/layout.haml | 6 +- {src => source}/stylesheets/_base.sass | 0 {src => source}/stylesheets/_reset.sass | 0 {src => source}/stylesheets/_settings.sass | 0 {src => source}/stylesheets/application.sass | 0 {src/pages => source}/tutorial.haml | 2 +- src/pages/_header.haml | 8 -- src/pages/_subnav.haml | 4 - src/pages/error.haml | 4 - 65 files changed, 268 insertions(+), 107 deletions(-) create mode 100644 config.rb delete mode 100644 config/site.rb rename {src/pages => source}/_footer.haml (100%) create mode 100644 source/_header.haml create mode 100644 source/_subnav.haml rename {src/pages => source}/about.haml (98%) rename {src/pages => source}/development.haml (97%) rename {src/pages => source}/docs.haml (94%) rename {src/pages => source}/download.haml (90%) rename {src/pages => source}/editors.haml (98%) create mode 100644 source/error.haml rename {site => source}/fonts/DroidSansMono-webfont.eot (100%) rename {site => source}/fonts/DroidSansMono-webfont.svg (100%) rename {site => source}/fonts/DroidSansMono-webfont.ttf (100%) rename {site => source}/fonts/DroidSansMono-webfont.woff (100%) rename {site => source}/fonts/PTS55F-webfont.eot (100%) rename {site => source}/fonts/PTS55F-webfont.svg (100%) rename {site => source}/fonts/PTS55F-webfont.ttf (100%) rename {site => source}/fonts/PTS55F-webfont.woff (100%) rename {site => source}/fonts/PTS56F-webfont.eot (100%) rename {site => source}/fonts/PTS56F-webfont.svg (100%) rename {site => source}/fonts/PTS56F-webfont.ttf (100%) rename {site => source}/fonts/PTS56F-webfont.woff (100%) rename {site => source}/fonts/PTS75F-webfont.eot (100%) rename {site => source}/fonts/PTS75F-webfont.svg (100%) rename {site => source}/fonts/PTS75F-webfont.ttf (100%) rename {site => source}/fonts/PTS75F-webfont.woff (100%) rename {src/pages => source}/help.haml (94%) rename {site => source}/images/bg-about.png (100%) rename {site => source}/images/bg-body.png (100%) rename {site => source}/images/bg-footer.png (100%) rename {site => source}/images/bg-quote-alt.png (100%) rename {site => source}/images/bg-quote.png (100%) rename {site => source}/images/bg-sample-arrow.png (100%) rename {site => source}/images/bg-sample-erb.png (100%) rename {site => source}/images/bg-sample-haml.png (100%) rename {site => source}/images/bg-sample.png (100%) rename {site => source}/images/favicon.ico (100%) rename {site => source}/images/haml.png (100%) rename {site => source}/images/img-about.png (100%) rename {site => source}/images/img-badge-about.png (100%) rename {site => source}/images/img-badge-development.png (100%) rename {site => source}/images/img-badge-documentation.png (100%) rename {site => source}/images/img-badge-download.png (100%) rename {site => source}/images/img-badge-editors.png (100%) rename {site => source}/images/img-badge-help.png (100%) rename {site => source}/images/img-badge-tutorial.png (100%) rename {site => source}/images/img-error.png (100%) rename {site => source}/images/img-hero-boat.png (100%) rename {site => source}/images/img-hero.png (100%) rename {src/pages => source}/index.haml (82%) rename {site => source}/javascripts/modernizr.js (100%) rename src/layouts/default.haml => source/layouts/layout.haml (92%) rename {src => source}/stylesheets/_base.sass (100%) rename {src => source}/stylesheets/_reset.sass (100%) rename {src => source}/stylesheets/_settings.sass (100%) rename {src => source}/stylesheets/application.sass (100%) rename {src/pages => source}/tutorial.haml (98%) delete mode 100644 src/pages/_header.haml delete mode 100644 src/pages/_subnav.haml delete mode 100644 src/pages/error.haml diff --git a/.gitignore b/.gitignore index b7af029..2b4c83b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,4 @@ *.rbc .rvmrc .DS_Store -site/*.html -site/docs -site/stylesheets +/build diff --git a/Gemfile b/Gemfile index 2987120..49058c5 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,13 @@ -source :rubygems +source 'https://rubygems.org' + +gem 'middleman', '~> 3.0.14' +gem 'haml', '~> 4.0.0' +gem 'haml-contrib' +gem 'compass', '~> 0.12.2' +gem 'rake' +gem 'yard' + +gem 'middleman-livereload' +gem 'json', '~> 1.7.7' #required by middleman +gem 'rb-inotify', '~> 0.9' -gem "staticmatic" -gem "maruku" -gem "haml", "3.2.0.rc.1" -gem "haml-contrib" -gem "compass", "0.11.7" -gem "rake", "0.9.3.beta.1" -gem "yard" diff --git a/Gemfile.lock b/Gemfile.lock index ed6d1d3..09e2b20 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,37 +1,132 @@ GEM - remote: http://rubygems.org/ + remote: https://rubygems.org/ specs: - chunky_png (1.2.6) - compass (0.11.7) + activesupport (3.2.13) + i18n (= 0.6.1) + multi_json (~> 1.0) + chunky_png (1.2.8) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.3.3) + compass (0.12.2) chunky_png (~> 1.2) fssm (>= 0.2.7) sass (~> 3.1) - fssm (0.2.9) - haml (3.2.0.rc.1) + em-websocket (0.5.0) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.5.3) + eventmachine (1.0.3) + execjs (1.4.0) + multi_json (~> 1.0) + ffi (1.8.1) + fssm (0.2.10) + haml (4.0.3) tilt - haml-contrib (0.0.1) + haml-contrib (1.0.0) haml (>= 3.2.0.alpha.13) + hike (1.2.2) + http_parser.rb (0.5.3) + http_router (0.10.2) + rack (>= 1.0.0) + url_mount (~> 0.2.1) + i18n (0.6.1) + json (1.7.7) + listen (0.7.3) maruku (0.6.1) syntax (>= 1.0.0) - rack (1.4.1) - rake (0.9.3.beta.1) - sass (3.2.1) - staticmatic (0.11.1) - compass (>= 0.10.0) - haml (>= 2.0.0) + middleman (3.0.14) + middleman-core (= 3.0.14) + middleman-more (= 3.0.14) + middleman-sprockets (~> 3.1.0) + middleman-core (3.0.14) + activesupport (~> 3.2.6) + bundler (~> 1.1) + listen (~> 0.7.3) + rack (~> 1.4.1) + rack-test (~> 0.6.1) + rb-fsevent (~> 0.9.3) + thor (~> 0.15.4) + tilt (~> 1.3.6) + middleman-livereload (3.1.0) + em-websocket (>= 0.2.0) + middleman-core (>= 3.0.2) + multi_json (~> 1.0) + rack-livereload + middleman-more (3.0.14) + coffee-script (~> 2.2.0) + coffee-script-source (~> 1.3.3) + compass (>= 0.12.2) + execjs (~> 1.4.0) + haml (>= 3.1.6) + i18n (~> 0.6.0, < 0.6.2) + maruku (~> 0.6.0) + middleman-core (= 3.0.14) + padrino-helpers (= 0.10.7) + sass (>= 3.1.20) + uglifier (~> 1.2.6) + middleman-sprockets (3.1.1) + middleman-core (>= 3.0.14) + padrino-helpers (= 0.10.7) + sprockets (~> 2.1) + sprockets-helpers (~> 1.0.0) + sprockets-sass (~> 1.0.0) + multi_json (1.7.3) + padrino-core (0.10.7) + activesupport (~> 3.2.0) + http_router (~> 0.10.2) + sinatra (~> 1.3.1) + thor (~> 0.15.2) + tilt (~> 1.3.0) + padrino-helpers (0.10.7) + i18n (~> 0.6) + padrino-core (= 0.10.7) + rack (1.4.5) + rack-livereload (0.3.15) + rack + rack-protection (1.5.0) + rack + rack-test (0.6.2) rack (>= 1.0) + rake (10.0.4) + rb-fsevent (0.9.3) + rb-inotify (0.9.0) + ffi (>= 0.5.0) + sass (3.2.9) + sinatra (1.3.6) + rack (~> 1.4) + rack-protection (~> 1.3) + tilt (~> 1.3, >= 1.3.3) + sprockets (2.10.0) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-helpers (1.0.1) + sprockets (~> 2.0) + sprockets-sass (1.0.1) + sprockets (~> 2.0) + tilt (~> 1.1) syntax (1.0.0) - tilt (1.3.3) - yard (0.8.2.1) + thor (0.15.4) + tilt (1.3.7) + uglifier (1.2.7) + execjs (>= 0.3.0) + multi_json (~> 1.3) + url_mount (0.2.1) + rack + yard (0.8.6.1) PLATFORMS ruby DEPENDENCIES - compass (= 0.11.7) - haml (= 3.2.0.rc.1) + compass (~> 0.12.2) + haml (~> 4.0.0) haml-contrib - maruku - rake (= 0.9.3.beta.1) - staticmatic + json (~> 1.7.7) + middleman (~> 3.0.14) + middleman-livereload + rake + rb-inotify (~> 0.9) yard diff --git a/Rakefile b/Rakefile index 9e1f8b2..df8ecec 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,3 @@ -require 'rubygems' require "bundler/setup" require 'rake' require 'date' @@ -11,33 +10,35 @@ if defined?(Encoding) Encoding.default_internal = 'UTF-8' end -def staticmatic(command) - require '.haml/lib/haml' - require 'staticmatic' - configuration = StaticMatic::Configuration.new - eval(File.read("config/site.rb")) - StaticMatic::Base.new(".", configuration).run(command) -end - desc "Build everything." task :build => [:site, :yardoc] -desc "Use StaticMatic to build the site." -task(:site => :haml) {staticmatic "build"} +#mostly from https://github.com/middleman/middleman/blob/master/middleman-core/bin/middleman +def middleman(command) + require 'middleman-core/profiling' + Middleman::Profiling.start + require 'middleman-core/load_paths' + Middleman.setup_load_paths + require 'middleman-core/cli' + Middleman::Cli::Base.start([command]) +end + +desc "Use Middleman to build the site." +task(:site => :haml) { middleman 'build' } -desc "Preview the site with StaticMatic." -task(:preview => :haml) {staticmatic "preview"} +desc "Preview the site with Middleman." +task(:preview => :haml) { middleman 'server' } desc "Sync files to web server" -task(:sync) { sh "rsync -e 'ssh -p 2233' -avz site/ haml.info:/var/sites/haml.info/"} +task(:sync) { sh "rsync -e 'ssh -p 2233' -avz build/ haml.info:/var/sites/haml.info/"} desc "Build the YARD documentation." task :yardoc => :haml do require 'fileutils' - Dir.chdir(".haml") {sh %{rake doc ANALYTICS=UA-3592613-6 YARD_TITLE="Haml Documentation"}} - FileUtils.mkdir_p("site/docs") - FileUtils.rm_rf("site/docs/yardoc") - FileUtils.mv(".haml/doc", "site/docs/yardoc") + Dir.chdir(".haml") {sh %{bundle exec rake doc ANALYTICS=UA-3592613-6 YARD_TITLE="Haml Documentation"}} + FileUtils.mkdir_p("build/docs") + FileUtils.rm_rf("build/docs/yardoc") + FileUtils.mv(".haml/doc", "build/docs/yardoc") end task :haml => ".haml" do diff --git a/config.rb b/config.rb new file mode 100644 index 0000000..4b88783 --- /dev/null +++ b/config.rb @@ -0,0 +1,88 @@ +### +# Compass +### + +# Susy grids in Compass +# First: gem install susy +# require 'susy' + +# Change Compass configuration +# compass_config do |config| +# config.output_style = :compact +# end + +### +# Page options, layouts, aliases and proxies +### + +# Per-page layout changes: +# +# With no layout +# page "/path/to/file.html", :layout => false +# +# With alternative layout +# page "/path/to/file.html", :layout => :otherlayout +# +# A path which all have the same layout +# with_layout :admin do +# page "/admin/*" +# end + +# Proxy (fake) files +# page "/this-page-has-no-template.html", :proxy => "/template-file.html" do +# @which_fake_page = "Rendering a fake page with a variable" +# end + +### +# Helpers +### + +# Automatic image dimensions on image_tag helper +# activate :automatic_image_sizes + +# Methods defined in the helpers block are available in templates +helpers do + def local_page + current_page.url.gsub(/\.html$/, '').gsub(/\/index$/, '').gsub(/^\//, '') + end + + def page_title + (["Haml"] + local_page.capitalize.split(File::SEPARATOR)).join(" :: ") + end + + def h_and_preserve(content = nil, &block) + return preserve CGI.escapeHTML(content) if content + return h_and_preserve capture_haml(&block).strip + end +end + +set :css_dir, 'stylesheets' + +set :js_dir, 'javascripts' + +set :images_dir, 'images' + +activate :livereload + +# Build-specific configuration +configure :build do + # For example, change the Compass output style for deployment + # activate :minify_css + + # Minify Javascript on build + # activate :minify_javascript + + # Enable cache buster + # activate :cache_buster + + # Use relative URLs + # activate :relative_assets + + # Compress PNGs after build + # First: gem install middleman-smusher + # require "middleman-smusher" + # activate :smusher + + # Or use a different image path + # set :http_path, "/Content/images/" +end diff --git a/config/site.rb b/config/site.rb deleted file mode 100644 index cd2fb4b..0000000 --- a/config/site.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'compass' -require 'cgi' - -Compass.configuration do |config| - # project_path should be the the directory to which the sass directory is relative. - # I think maybe this should be one more directory up from the configuration file. - # Please update this if it is or remove this message if it can stay the way it is. - config.project_path = File.dirname(__FILE__) - config.sass_dir = File.join('src', 'stylesheets' ) -end - -module StaticMatic::Helpers - def local_page - current_page.gsub(/\.html$/, '').gsub(/\/index$/, '').gsub(/^\//, '') - end - - def css - (["Haml"] + local_page.capitalize.split(File::SEPARATOR)).join(" :: ") - end - - def h_and_preserve(content = nil, &block) - return preserve(CGI.escapeHTML(content)) if content - return h_and_preserve(capture_haml(&block).strip) - end -end diff --git a/src/pages/_footer.haml b/source/_footer.haml similarity index 100% rename from src/pages/_footer.haml rename to source/_footer.haml diff --git a/source/_header.haml b/source/_header.haml new file mode 100644 index 0000000..fe4ebc4 --- /dev/null +++ b/source/_header.haml @@ -0,0 +1,8 @@ +%header.cell + = link_to image_tag('haml.png', alt: 'Haml'), '/', class: 'logo' + %ul + %li= link_to 'About', '/about.html' + %li= link_to 'Tutorial', '/tutorial.html' + %li= link_to 'Documentation', '/docs.html' + %li= link_to 'Blog', 'http://haml.tumblr.com/' + %li= link_to 'Help', '/help.html' diff --git a/source/_subnav.haml b/source/_subnav.haml new file mode 100644 index 0000000..f522f27 --- /dev/null +++ b/source/_subnav.haml @@ -0,0 +1,4 @@ +%ul.subnav + %li= link_to 'Download', '/download.html' + %li= link_to 'Editors', '/editors.html' + %li= link_to 'Development', '/development.html' diff --git a/src/pages/about.haml b/source/about.haml similarity index 98% rename from src/pages/about.haml rename to source/about.haml index 88cae16..28c1634 100644 --- a/src/pages/about.haml +++ b/source/about.haml @@ -1,6 +1,6 @@ .content %h1 - = img 'img-badge-about.png', alt: 'About' + = image_tag 'img-badge-about.png', alt: 'About' About = partial 'subnav' diff --git a/src/pages/development.haml b/source/development.haml similarity index 97% rename from src/pages/development.haml rename to source/development.haml index 62ef312..c02a45c 100644 --- a/src/pages/development.haml +++ b/source/development.haml @@ -1,6 +1,6 @@ .content %h1 - = img 'img-badge-development.png', alt: 'Development' + = image_tag 'img-badge-development.png', alt: 'Development' Development = partial 'subnav' diff --git a/src/pages/docs.haml b/source/docs.haml similarity index 94% rename from src/pages/docs.haml rename to source/docs.haml index c7d7e51..94e36d5 100644 --- a/src/pages/docs.haml +++ b/source/docs.haml @@ -1,6 +1,6 @@ .content %h1 - = img 'img-badge-documentation.png', alt: 'Documentation' + = image_tag 'img-badge-documentation.png', alt: 'Documentation' Documentation = partial 'subnav' diff --git a/src/pages/download.haml b/source/download.haml similarity index 90% rename from src/pages/download.haml rename to source/download.haml index 2a3e36a..75d0517 100644 --- a/src/pages/download.haml +++ b/source/download.haml @@ -1,6 +1,6 @@ .content %h1 - = img 'img-badge-download.png', alt: 'Download' + = image_tag 'img-badge-download.png', alt: 'Download' Download = partial 'subnav' diff --git a/src/pages/editors.haml b/source/editors.haml similarity index 98% rename from src/pages/editors.haml rename to source/editors.haml index d9fe686..bf0ebf3 100644 --- a/src/pages/editors.haml +++ b/source/editors.haml @@ -1,6 +1,6 @@ .content %h1 - = img 'img-badge-editors.png', alt: 'Editors' + = image_tag 'img-badge-editors.png', alt: 'Editors' Editors = partial 'subnav' diff --git a/source/error.haml b/source/error.haml new file mode 100644 index 0000000..5061ca7 --- /dev/null +++ b/source/error.haml @@ -0,0 +1,4 @@ +.content.error + = image_tag 'img-error.png', alt: 'Error' + %h2 Sorry, Something Went Wrong. + = link_to 'Head Back Home', '/', class: 'btn' diff --git a/site/fonts/DroidSansMono-webfont.eot b/source/fonts/DroidSansMono-webfont.eot similarity index 100% rename from site/fonts/DroidSansMono-webfont.eot rename to source/fonts/DroidSansMono-webfont.eot diff --git a/site/fonts/DroidSansMono-webfont.svg b/source/fonts/DroidSansMono-webfont.svg similarity index 100% rename from site/fonts/DroidSansMono-webfont.svg rename to source/fonts/DroidSansMono-webfont.svg diff --git a/site/fonts/DroidSansMono-webfont.ttf b/source/fonts/DroidSansMono-webfont.ttf similarity index 100% rename from site/fonts/DroidSansMono-webfont.ttf rename to source/fonts/DroidSansMono-webfont.ttf diff --git a/site/fonts/DroidSansMono-webfont.woff b/source/fonts/DroidSansMono-webfont.woff similarity index 100% rename from site/fonts/DroidSansMono-webfont.woff rename to source/fonts/DroidSansMono-webfont.woff diff --git a/site/fonts/PTS55F-webfont.eot b/source/fonts/PTS55F-webfont.eot similarity index 100% rename from site/fonts/PTS55F-webfont.eot rename to source/fonts/PTS55F-webfont.eot diff --git a/site/fonts/PTS55F-webfont.svg b/source/fonts/PTS55F-webfont.svg similarity index 100% rename from site/fonts/PTS55F-webfont.svg rename to source/fonts/PTS55F-webfont.svg diff --git a/site/fonts/PTS55F-webfont.ttf b/source/fonts/PTS55F-webfont.ttf similarity index 100% rename from site/fonts/PTS55F-webfont.ttf rename to source/fonts/PTS55F-webfont.ttf diff --git a/site/fonts/PTS55F-webfont.woff b/source/fonts/PTS55F-webfont.woff similarity index 100% rename from site/fonts/PTS55F-webfont.woff rename to source/fonts/PTS55F-webfont.woff diff --git a/site/fonts/PTS56F-webfont.eot b/source/fonts/PTS56F-webfont.eot similarity index 100% rename from site/fonts/PTS56F-webfont.eot rename to source/fonts/PTS56F-webfont.eot diff --git a/site/fonts/PTS56F-webfont.svg b/source/fonts/PTS56F-webfont.svg similarity index 100% rename from site/fonts/PTS56F-webfont.svg rename to source/fonts/PTS56F-webfont.svg diff --git a/site/fonts/PTS56F-webfont.ttf b/source/fonts/PTS56F-webfont.ttf similarity index 100% rename from site/fonts/PTS56F-webfont.ttf rename to source/fonts/PTS56F-webfont.ttf diff --git a/site/fonts/PTS56F-webfont.woff b/source/fonts/PTS56F-webfont.woff similarity index 100% rename from site/fonts/PTS56F-webfont.woff rename to source/fonts/PTS56F-webfont.woff diff --git a/site/fonts/PTS75F-webfont.eot b/source/fonts/PTS75F-webfont.eot similarity index 100% rename from site/fonts/PTS75F-webfont.eot rename to source/fonts/PTS75F-webfont.eot diff --git a/site/fonts/PTS75F-webfont.svg b/source/fonts/PTS75F-webfont.svg similarity index 100% rename from site/fonts/PTS75F-webfont.svg rename to source/fonts/PTS75F-webfont.svg diff --git a/site/fonts/PTS75F-webfont.ttf b/source/fonts/PTS75F-webfont.ttf similarity index 100% rename from site/fonts/PTS75F-webfont.ttf rename to source/fonts/PTS75F-webfont.ttf diff --git a/site/fonts/PTS75F-webfont.woff b/source/fonts/PTS75F-webfont.woff similarity index 100% rename from site/fonts/PTS75F-webfont.woff rename to source/fonts/PTS75F-webfont.woff diff --git a/src/pages/help.haml b/source/help.haml similarity index 94% rename from src/pages/help.haml rename to source/help.haml index ec350be..37dd46e 100644 --- a/src/pages/help.haml +++ b/source/help.haml @@ -1,6 +1,6 @@ .content %h1 - = img 'img-badge-help.png', alt: 'Help' + = image_tag 'img-badge-help.png', alt: 'Help' Help = partial 'subnav' diff --git a/site/images/bg-about.png b/source/images/bg-about.png similarity index 100% rename from site/images/bg-about.png rename to source/images/bg-about.png diff --git a/site/images/bg-body.png b/source/images/bg-body.png similarity index 100% rename from site/images/bg-body.png rename to source/images/bg-body.png diff --git a/site/images/bg-footer.png b/source/images/bg-footer.png similarity index 100% rename from site/images/bg-footer.png rename to source/images/bg-footer.png diff --git a/site/images/bg-quote-alt.png b/source/images/bg-quote-alt.png similarity index 100% rename from site/images/bg-quote-alt.png rename to source/images/bg-quote-alt.png diff --git a/site/images/bg-quote.png b/source/images/bg-quote.png similarity index 100% rename from site/images/bg-quote.png rename to source/images/bg-quote.png diff --git a/site/images/bg-sample-arrow.png b/source/images/bg-sample-arrow.png similarity index 100% rename from site/images/bg-sample-arrow.png rename to source/images/bg-sample-arrow.png diff --git a/site/images/bg-sample-erb.png b/source/images/bg-sample-erb.png similarity index 100% rename from site/images/bg-sample-erb.png rename to source/images/bg-sample-erb.png diff --git a/site/images/bg-sample-haml.png b/source/images/bg-sample-haml.png similarity index 100% rename from site/images/bg-sample-haml.png rename to source/images/bg-sample-haml.png diff --git a/site/images/bg-sample.png b/source/images/bg-sample.png similarity index 100% rename from site/images/bg-sample.png rename to source/images/bg-sample.png diff --git a/site/images/favicon.ico b/source/images/favicon.ico similarity index 100% rename from site/images/favicon.ico rename to source/images/favicon.ico diff --git a/site/images/haml.png b/source/images/haml.png similarity index 100% rename from site/images/haml.png rename to source/images/haml.png diff --git a/site/images/img-about.png b/source/images/img-about.png similarity index 100% rename from site/images/img-about.png rename to source/images/img-about.png diff --git a/site/images/img-badge-about.png b/source/images/img-badge-about.png similarity index 100% rename from site/images/img-badge-about.png rename to source/images/img-badge-about.png diff --git a/site/images/img-badge-development.png b/source/images/img-badge-development.png similarity index 100% rename from site/images/img-badge-development.png rename to source/images/img-badge-development.png diff --git a/site/images/img-badge-documentation.png b/source/images/img-badge-documentation.png similarity index 100% rename from site/images/img-badge-documentation.png rename to source/images/img-badge-documentation.png diff --git a/site/images/img-badge-download.png b/source/images/img-badge-download.png similarity index 100% rename from site/images/img-badge-download.png rename to source/images/img-badge-download.png diff --git a/site/images/img-badge-editors.png b/source/images/img-badge-editors.png similarity index 100% rename from site/images/img-badge-editors.png rename to source/images/img-badge-editors.png diff --git a/site/images/img-badge-help.png b/source/images/img-badge-help.png similarity index 100% rename from site/images/img-badge-help.png rename to source/images/img-badge-help.png diff --git a/site/images/img-badge-tutorial.png b/source/images/img-badge-tutorial.png similarity index 100% rename from site/images/img-badge-tutorial.png rename to source/images/img-badge-tutorial.png diff --git a/site/images/img-error.png b/source/images/img-error.png similarity index 100% rename from site/images/img-error.png rename to source/images/img-error.png diff --git a/site/images/img-hero-boat.png b/source/images/img-hero-boat.png similarity index 100% rename from site/images/img-hero-boat.png rename to source/images/img-hero-boat.png diff --git a/site/images/img-hero.png b/source/images/img-hero.png similarity index 100% rename from site/images/img-hero.png rename to source/images/img-hero.png diff --git a/src/pages/index.haml b/source/index.haml similarity index 82% rename from src/pages/index.haml rename to source/index.haml index f91918f..3aabc99 100644 --- a/src/pages/index.haml +++ b/source/index.haml @@ -1,17 +1,17 @@ .hero .box.boat - = img 'img-hero.png', alt: 'Haml' - = img 'img-hero-boat.png', class: 'boat-img', alt: 'Templating Haiku' + = image_tag 'img-hero.png', alt: 'Haml' + = image_tag 'img-hero-boat.png', class: 'boat-img', alt: 'Templating Haiku' .box %h1 Beautiful, DRY,
well-indented, clear markup:
%strong templating haiku. %p - = link 'Download Haml', '/download.html', class: 'btn' + = link_to 'Download Haml', '/download.html', class: 'btn' %b Latest: #{Haml::VERSION} - - %strong= link "What's New?", '/docs/yardoc/file.CHANGELOG.html' + %strong= link_to "What's New?", '/docs/yardoc/file.CHANGELOG.html' .sample .box @@ -41,15 +41,15 @@ %p Haml (HTML abstraction markup language) is based on one primary principle: markup should be beautiful. It’s not just beauty for beauty’s sake either; Haml accelerates and simplifies template creation down to veritable haiku. %p Unspace Interactive and several other professional Rails shops use Haml exclusively for their projects, valuing its focus on cleanliness, readability, and production speed. %p Give yourself 5 minutes to read the tutorial and then convert one of your ERB templates to Haml. Simplify. Enjoy. Laugh. 20 minutes later, you will never go back. - = img 'img-about.png', alt: 'About Haml' + = image_tag 'img-about.png', alt: 'About Haml' %ul.quotes %li %blockquote Emotions when returning to haml (after erb): 1. This code looks pretty... 2. This is madness! 3. Hey, I remember how it's done. 4. Marry me? - = link '@eishe', 'http://twitter.com/eishe' + = link_to '@eishe', 'http://twitter.com/eishe' %li.alt %blockquote We have used Haml in every web project for the past 2 years and it has saved us an inestimable amount of time. Just brilliant. - = link '@edenspiekermann', 'http://twitter.com/edenspiekermann' + = link_to '@edenspiekermann', 'http://twitter.com/edenspiekermann' %li %blockquote The world would be a much better place if you used more HAML and less ERB. Stop being lazy and learn it today. #ruby takes over my brain. - = link '@tobrien', 'http://twitter.com/tobrien' + = link_to '@tobrien', 'http://twitter.com/tobrien' diff --git a/site/javascripts/modernizr.js b/source/javascripts/modernizr.js similarity index 100% rename from site/javascripts/modernizr.js rename to source/javascripts/modernizr.js diff --git a/src/layouts/default.haml b/source/layouts/layout.haml similarity index 92% rename from src/layouts/default.haml rename to source/layouts/layout.haml index 1aac970..7e745b2 100644 --- a/src/layouts/default.haml +++ b/source/layouts/layout.haml @@ -10,11 +10,11 @@ %meta{name: 'keywords', content: 'Haml, HAML, haml, Rails, Ruby, Ruby on Rails, Template, Template Engine, HTML Abstraction Markup Language'} %meta{name: 'verify-v1', content: '3zvYccFjus45bkqbIvoSzbVRlaQ3JBhHOcC/+DpAeoc='} %meta{name: "google-site-verification", content: "_HduvdWLa6WXLgvQNiBbFDb18ZqvHMp_4ocOTEz0Drc"} - %title&= css + %title&= page_title %link{rel: 'shortcut icon', href: '/images/favicon.ico', type: 'image/x-icon'} - = stylesheets :application + = stylesheet_link_tag 'application' / [if lte IE 8] - %script(src="../javascripts/modernizr.js") + %script(src='../javascripts/modernizr.js') %body = partial 'header' .cell= yield diff --git a/src/stylesheets/_base.sass b/source/stylesheets/_base.sass similarity index 100% rename from src/stylesheets/_base.sass rename to source/stylesheets/_base.sass diff --git a/src/stylesheets/_reset.sass b/source/stylesheets/_reset.sass similarity index 100% rename from src/stylesheets/_reset.sass rename to source/stylesheets/_reset.sass diff --git a/src/stylesheets/_settings.sass b/source/stylesheets/_settings.sass similarity index 100% rename from src/stylesheets/_settings.sass rename to source/stylesheets/_settings.sass diff --git a/src/stylesheets/application.sass b/source/stylesheets/application.sass similarity index 100% rename from src/stylesheets/application.sass rename to source/stylesheets/application.sass diff --git a/src/pages/tutorial.haml b/source/tutorial.haml similarity index 98% rename from src/pages/tutorial.haml rename to source/tutorial.haml index e5dba9e..446d0ec 100644 --- a/src/pages/tutorial.haml +++ b/source/tutorial.haml @@ -1,6 +1,6 @@ .content %h1 - = img 'img-badge-tutorial.png', alt: 'Tutorial' + = image_tag 'img-badge-tutorial.png', alt: 'Tutorial' Tutorial = partial 'subnav' diff --git a/src/pages/_header.haml b/src/pages/_header.haml deleted file mode 100644 index 26d7084..0000000 --- a/src/pages/_header.haml +++ /dev/null @@ -1,8 +0,0 @@ -%header.cell - = link img('haml.png', alt: 'Haml'), '/', class: 'logo' - %ul - %li= link 'About', '/about.html' - %li= link 'Tutorial', '/tutorial.html' - %li= link 'Documentation', '/docs.html' - %li= link 'Blog', 'http://haml.tumblr.com/' - %li= link 'Help', '/help.html' diff --git a/src/pages/_subnav.haml b/src/pages/_subnav.haml deleted file mode 100644 index 48141df..0000000 --- a/src/pages/_subnav.haml +++ /dev/null @@ -1,4 +0,0 @@ -%ul.subnav - %li= link 'Download', '/download.html' - %li= link 'Editors', '/editors.html' - %li= link 'Development', '/development.html' diff --git a/src/pages/error.haml b/src/pages/error.haml deleted file mode 100644 index 070d652..0000000 --- a/src/pages/error.haml +++ /dev/null @@ -1,4 +0,0 @@ -.content.error - = img 'img-error.png', alt: 'Error' - %h2 Sorry, Something Went Wrong. - = link 'Head Back Home', '/', class: 'btn'