Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiii committed Jun 29, 2013
1 parent f0aeb60 commit e94f881
Show file tree
Hide file tree
Showing 61 changed files with 3,091 additions and 484 deletions.
22 changes: 9 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'
source 'https://rubygems.org'

gem "middleman", "~>3.1.0"
gem 'rake', '~> 10.1'
gem 'middleman', '~> 3.1'
gem 'middleman-livereload', '~> 3.1'
gem 'middleman-syntax'

# Live-reloading plugin
gem "middleman-livereload", "~> 3.1.0"
gem 'slim', '~> 2.0'
gem 'redcarpet', '2.1.1'

# For faster file watcher updates:
# gem "wdm", "~> 0.1.0") # Windows

# Cross-templating language block fix for Ruby 1.8
platforms :mri_18 do
gem "ruby18_source_location"
end
# monkey-patched
gem 'tilt', '1.3.7'
34 changes: 24 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
activesupport (3.2.12)
i18n (~> 0.6)
Expand Down Expand Up @@ -31,18 +31,18 @@ GEM
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
middleman (3.1.0)
middleman (3.1.1)
coffee-script (~> 2.2.0)
compass (>= 0.12.2)
execjs (~> 1.4.0)
haml (>= 3.1.6)
kramdown (~> 1.0.0)
middleman-core (= 3.1.0)
middleman-more (= 3.1.0)
middleman-core (= 3.1.1)
middleman-more (= 3.1.1)
middleman-sprockets (>= 3.1.2)
sass (>= 3.1.20)
uglifier (~> 2.1.0)
middleman-core (3.1.0)
middleman-core (3.1.1)
activesupport (~> 3.2.6)
bundler (~> 1.1)
i18n (~> 0.6.1)
Expand All @@ -56,26 +56,35 @@ GEM
middleman-core (>= 3.0.2)
multi_json (~> 1.0)
rack-livereload
middleman-more (3.1.0)
middleman-more (3.1.1)
middleman-sprockets (3.1.2)
middleman-core (>= 3.0.14)
middleman-more (>= 3.0.14)
sprockets (~> 2.1)
sprockets-helpers (~> 1.0.0)
sprockets-sass (~> 1.0.0)
middleman-syntax (1.2.1)
middleman-core (~> 3.0)
rouge (~> 0.3.0)
multi_json (1.7.7)
rack (1.5.2)
rack-livereload (0.3.15)
rack
rack-test (0.6.2)
rack (>= 1.0)
rake (10.1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.0)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
ruby18_source_location (0.2)
redcarpet (2.1.1)
rouge (0.3.7)
thor
sass (3.2.9)
slim (2.0.0)
temple (~> 0.6.5)
tilt (~> 1.3, >= 1.3.3)
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
Expand All @@ -86,6 +95,7 @@ GEM
sprockets-sass (1.0.1)
sprockets (~> 2.0)
tilt (~> 1.1)
temple (0.6.5)
thor (0.18.1)
tilt (1.3.7)
uglifier (2.1.1)
Expand All @@ -96,6 +106,10 @@ PLATFORMS
ruby

DEPENDENCIES
middleman (~> 3.1.0)
middleman-livereload (~> 3.1.0)
ruby18_source_location
middleman (~> 3.1)
middleman-livereload (~> 3.1)
middleman-syntax
rake (~> 10.1)
redcarpet (= 2.1.1)
slim (~> 2.0)
tilt (= 1.3.7)
4 changes: 4 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
desc 'Start development server'
task :server do
system 'bundle exec middleman server'
end
30 changes: 29 additions & 1 deletion config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# activate :automatic_image_sizes

# Reload the browser automatically whenever files change
# activate :livereload
activate :livereload

# Methods defined in the helpers block are available in templates
# helpers do
Expand All @@ -51,6 +51,34 @@

set :images_dir, 'images'

set :markdown_engine, :redcarpet

# XXX: Does not seem to work.
#set :markdown, options

# XXX: Find out how to properly pass markdown options
# to Tilt for an embedded Slim engine.
class Tilt::RedcarpetTemplate::Redcarpet2

alias_method :original_prepare, :prepare

def prepare
options.merge!(
autolink: true,
fenced_code_blocks: true,
no_intra_emphasis: true,
tables: true,
strikethrough: true,
disable_indented_code_blocks: true,
space_after_headers: true,
superscript: true
)

original_prepare
end

end

# Build-specific configuration
configure :build do
# For example, change the Compass output style for deployment
Expand Down
39 changes: 39 additions & 0 deletions helpers/layout_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
module LayoutHelper

def page_title
current_page.data.title
end

def page_name
page_classes.split(' ').first
end

def page_version
current_page.data.version
end

def page_order
current_page.data.order
end

def show_sibling_navigation?
!!page_order
end

def prev_page
find_sibling(page_order - 1)
end

def next_page
find_sibling(page_order + 1)
end

def link_to_page(page)
link_to(page.data.title, page.url) if page
end

def find_sibling(order)
current_page.siblings.find { |page| page.data.order == order }
end

end
Binary file added source/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed source/images/background.png
Binary file not shown.
Binary file removed source/images/middleman.png
Binary file not shown.
10 changes: 0 additions & 10 deletions source/index.html.erb

This file was deleted.

45 changes: 45 additions & 0 deletions source/index.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Welcome
---

markdown:
Savon is a [SOAP](http://en.wikipedia.org/wiki/SOAP) client
for the [Ruby programming language](http://www.ruby-lang.org/).

ul.list-of-icons
li
i.icon-github
= link_to 'Source code', 'https://github.com/savonrb/savon'
| is hosted on GitHub
li
i.icon-cloud-download
= link_to 'Releases', 'http://rubygems.org/gems/savon'
| are available via RubyGems.org
li
i.icon-comments
| Ask questions through the
= link_to 'mailing list', 'https://groups.google.com/forum/#!forum/savonrb'
| or on
= link_to 'StackOverflow', 'http://stackoverflow.com/questions/tagged/savon'
li
i.icon-twitter
| And
= link_to 'receive updates', 'https://twitter.com/savonrb'
| via Twitter


h2 Documentation by version

ol.list-of-icons
li
i.icon-thumbs-down
= link_to 'Version 1', '/version1/index.html'
| (deprecated)
li
i.icon-thumbs-up
= link_to 'Version 2', '/version2/index.html'
| (stable)
li
i.icon-warning-sign
= link_to 'Version 3', '/version3/index.html'
| (unstable)
1 change: 0 additions & 1 deletion source/javascripts/all.js

This file was deleted.

41 changes: 41 additions & 0 deletions source/javascripts/main.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$ ->

# syntax highlighting
hljs.initHighlightingOnLoad()

# delayed code block icons, because highlight.js
# can be a little slow and doesn't provide a callback.
setTimeout ->
console.log 'bla'
$('pre code').each ->
classes = $(this).attr('class')
$(this).parent().addClass(classes)
, 200

# mobile navigation
$('#nav')
.clone()
.removeAttr('id')
.addClass('nav-copy')
.prependTo($('#mobile-nav'))

$('#mobile-nav .trigger').on 'click', (event) ->
event.preventDefault()
$(this).parent().toggleClass('on')

# floating link-list
$('#floating-link-list a')
.on('mouseenter', (e) -> $(this).parent().addClass('on'))
.on('mouseleave', (e) -> $(this).parent().removeClass('on'))

# highlight navigation
classes = $('body').attr('class').split(' ')
if classes.length == 2
version = classes[0]
pageName = classes[1].split('_')[1]

$('#mobile-nav li a, #nav li a').each ->
$this = $(this)

if $this.attr('href').match(pageName)
$this.parent().addClass('on')
19 changes: 0 additions & 19 deletions source/layouts/layout.erb

This file was deleted.

Loading

0 comments on commit e94f881

Please sign in to comment.