diff --git a/.awestruct_ignore b/.awestruct_ignore
new file mode 100644
index 0000000..fff2a89
--- /dev/null
+++ b/.awestruct_ignore
@@ -0,0 +1,7 @@
+README.md
+CONTRIBUTING.md
+LICENSE.md
+Gemfile*
+Rakefile
+bin
+_stg
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3e435e9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,43 @@
+## Awestruct
+_tmp
+_site
+.awestruct
+.sass-cache
+_deploy/
+_site/
+_tmp/
+.sass-cache
+*.swp
+.project
+*.bak
+.rvmrc
+TODO
+.awestruct
+Guardfile
+Gemfile.lock
+
+## OS related
+*.DS_Store
+
+## IDE
+.settings
+.project
+.buildpath
+*.iml
+*.ipr
+*.iws
+.idea
+
+
+# log files
+*.log
+
+## Ruby tools
+.rvmrc
+*.lock
+
+## Sources and docs
+docs
+_stg
+
+*.swp
\ No newline at end of file
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..5bfc4a2
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,4 @@
+ErrorDocument 404 /404
+Options +FollowSymLinks
+Options +Indexes
+
diff --git a/.nojekyll b/.nojekyll
new file mode 100644
index 0000000..e69de29
diff --git a/404.html.haml b/404.html.haml
new file mode 100644
index 0000000..a626b64
--- /dev/null
+++ b/404.html.haml
@@ -0,0 +1,13 @@
+---
+layout: project
+title: OOPS !
+---
+
+/ Main hero unit for a primary marketing message or call to action
+.row-fluid
+ .hero-unit
+ %h1 Oh %$*&!
+ %p
+ Something has gone wrong. The page you're looking for doesn't exist.
+ %b 404, baby!
+ %i.icon-frown
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..c5c0157
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,23 @@
+source 'https://rubygems.org'
+
+if RUBY_PLATFORM=~ /mswin|mingw|cygwin/
+ gem 'therubyracer', '0.11.0beta1' # Call JavaScript code and manipulate JavaScript objects from Ruby and vice versa gem "ruby-debug"
+ gem 'win32-open3-19'
+else
+ gem 'therubyracer', '~> 0.11.4' # Call JavaScript code and manipulate JavaScript objects from Ruby
+end
+
+#gem 'awestruct', '~> 0.5.2.1' # Framework for creating static HTML sites
+gem 'awestruct', :github => 'mojavelinux/awestruct', :branch => 'integration'
+gem 'uglifier', '~> 2.0.1' # Ruby wrapper for UglifyJS JavaScript compressor
+gem 'cssminify', '~> 1.0.2' # CSS compression using YUI compressor
+gem 'less', '~> 2.4.0' # Invoke the Less CSS compiler from Ruby
+gem 'rb-fsevent', '~> 0.9.3' # FSEvents API with Signals catching (without RubyCocoa)
+gem 'kramdown', '~> 1.0.1' # Kramdown works on all platforms, rdiscount only on mri
+gem 'therubyrhino', '~> 1.73', :platforms => :jruby # JavaScript on JRuby
+gem 'htmlcompressor', '~> 0.0.3' # Adds in HTML minification, helps remove the warning on awestruct startup
+gem 'json', '~> 1.7.7'
+gem 'asciidoctor', '~> 0.1.4'
+gem 'git', '~> 1.2.6'
+gem 'trollop', '~> 2.0'
+gem 'coderay', '~> 1.1.0'
\ No newline at end of file
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..98eb8a3
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,3 @@
+# LICENSE
+
+This website ie released under Creative Commons. More details of this license can be found on the [Creative Commons website](http://creativecommons.org/licenses/by/3.0/).
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..59cbee6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,59 @@
+# Introduction
+
+This is the source code for the [Infinispan.org](http://www.infinispan.org) website. This is based on templates created by the JBoss Community using [Awestruct](http://awestruct.org) and [Bootstrap](http://twitter.github.com/bootstrap).
+
+# System Requirements
+* Ruby 1.9.2 or above
+* RubyGems - 1.3.6 or above
+* Bundler - 1.3.5
+ * Try `sudo gem install bundler`
+* GNU WGet 1.14
+
+**Note:** If you are using Mac OS X, you need to have the following setup:
+ 1. [XCode](https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12). After installing XCode, you should go to `XCode -> Preferences -> Download` and install the command line (CLI) tools.
+ 1. [MacPorts](http://www.macports.org/)
+ 1. You can install WGet using MacPorts: `sudo port install wget`
+ 1. You need `libxml2` and `libxslt`: `sudo port install libxml2 libxslt`
+ 1. You will need Ruby >= 1.9.2. Mac OS _Mountain Lion_ comes with 1.8.x. Using [RVM](https://rvm.io/) and [JewelryBox](http://jewelrybox.unfiniti.com/) is probably the best way to manage and install several different versions of Ruby on OS X.
+
+## 1. Build the website
+Run Awestruct in development mode from the top-level directory to build the website and host it using a local web server:
+
+`$ bin/run_dev.sh`
+
+## 2. View the website locally
+Use a web browser to visit [http://localhost:4242](http://localhost:4242) where you can see the site.
+
+## 3. Stage the website
+Staging is published on OpenShift. To do this, you *must* have SSH access to Infinispan's OpenShift account. After that, you must:
+
+* Run `$ bin/publish_staging.sh`
+* Browse to `http://stg-ispn.rhcloud.com` to test
+
+### Permissions.
+To be able to publish to staging, you must:
+* Have the following in your `~/.ssh/config`:
+
+```
+ Host *.rhcloud.com
+ IdentityFile ~/.ssh/libra_id_rsa
+ VerifyHostKeyDNS yes
+ StrictHostKeyChecking no
+ UserKnownHostsFile ~/.ssh/libra_known_hosts
+```
+
+* Have `libra_id_rsa`, `libra_id_rsa.pub` and `libra_known_hosts` in your `~/.ssh` directory.
+Contact Infinispan project leads for these files.
+
+## 4. Publish the website
+If everyone is happy with staging then:
+
+* Run `$ bin/publish_production.sh`
+* Browse to `http://www.infinispan.org`
+
+### Permissions.
+To be able to publish to production, you must have git push rights on *http://github.com/infinispan/infinispan.github.io*.
+Contact Infinispan project leads for such permissions.
+
+# Contribute to issues on Infinispan.org
+Feel like contributing? Great! Read [this page](https://github.com/infinispan/infinispan.github.io/blob/develop/CONTRIBUTING.md) on how to contribute.
\ No newline at end of file
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..632a4da
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,231 @@
+# This file is a rake build file. The purpose of this file is to simplify
+# setting up and using Awestruct. It's not required to use Awestruct, though it
+# does save you time (hopefully). If you don't want to use rake, just ignore or
+# delete this file.
+#
+# If you're just getting started, execute this command to install Awestruct and
+# the libraries on which it depends:
+#
+# rake setup
+#
+# The setup task installs the necessary libraries according to which Ruby
+# environment you are using. If you want the libraries kept inside the project,
+# execute this command instead:
+#
+# rake setup[local]
+#
+# IMPORTANT: To install gems, you'll need development tools on your machine,
+# which include a C compiler, the Ruby development libraries and some other
+# development libraries as well.
+#
+# There are also tasks for running Awestruct. The build will auto-detect
+# whether you are using Bundler and, if you are, wrap calls to awestruct in
+# `bundle exec`.
+#
+# To run in Awestruct in development mode, execute:
+#
+# rake
+#
+# To clean the generated site before you build, execute:
+#
+# rake clean preview
+#
+# To deploy using the production profile, execute:
+#
+# rake deploy
+#
+# To get a list of all tasks, execute:
+#
+# rake -T
+#
+# Now you're Awestruct with rake!
+
+$use_bundle_exec = true
+$install_gems = ['awestruct -v "~> 0.5.0"', 'rb-inotify -v "~> 0.9.0"']
+$awestruct_cmd = nil
+task :default => :preview
+
+desc 'Setup the environment to run Awestruct'
+task :setup, [:env] => :init do |task, args|
+ next if !which('awestruct').nil?
+
+ if File.exist? 'Gemfile'
+ if args[:env] == 'local'
+ require 'fileutils'
+ FileUtils.remove_file 'Gemfile.lock', true
+ FileUtils.remove_dir '.bundle', true
+ system 'bundle install --binstubs=_bin --path=.bundle'
+ else
+ system 'bundle install'
+ end
+ else
+ if args[:env] == 'local'
+ $install_gems.each do |gem|
+ msg "Installing #{gem}..."
+ system "gem install --bindir=_bin --install-dir=.bundle #{gem}"
+ end
+ else
+ $install_gems.each do |gem|
+ msg "Installing #{gem}..."
+ system "gem install #{gem}"
+ end
+ end
+ end
+ msg 'Run awestruct using `awestruct` or `rake`'
+ # Don't execute any more tasks, need to reset env
+ exit 0
+end
+
+desc 'Update the environment to run Awestruct'
+task :update => :init do
+ if File.exist? 'Gemfile'
+ system 'bundle update'
+ else
+ system 'gem update awestruct'
+ end
+ # Don't execute any more tasks, need to reset env
+ exit 0
+end
+
+desc 'Build and preview the site locally in development mode'
+task :preview => :check do
+ run_awestruct '-d'
+end
+
+desc 'Generate the site using the development profile'
+task :gen => :check do
+ run_awestruct '-P development -g --force'
+end
+
+desc 'Push local commits to origin/master'
+task :push do
+ system 'git push origin master'
+end
+
+#desc 'Generate the site and deploy to production'
+# TODO: This will need to be tweaked a bit for our site, we may need to shell out to a system command
+#task :deploy => [:check, :push] do
+ #run_awestruct '-P production -g --force --deploy'
+#end
+
+#desc 'Generate site from Travis CI and, if not a pull request, publish site to production (GitHub Pages)'
+#task :travis => :check do
+ ## if this is a pull request, do a simple build of the site and stop
+ #if ENV['TRAVIS_PULL_REQUEST'] == '1' || ENV['TRAVIS_PULL_REQUEST'] == 'true'
+ #run_awestruct '-P production -g'
+ #next
+ #end
+
+ #require 'yaml'
+
+ ## TODO use the Git library for these commands rather than system
+ #repo = %x(git config remote.origin.url).gsub(/^git:/, 'https:')
+ #system "git remote set-url --push origin #{repo}"
+ #system 'git remote set-branches --add origin master'
+ #system 'git fetch -q'
+ ##git_user = YAML.load_file('_config/git.yml')
+ ##system "git config user.name '#{git_user['name']}'"
+ ##system "git config user.email '#{git_user['email']}'"
+ #system "git config user.name '#{ENV['GIT_NAME']}'"
+ #system "git config user.email '#{ENV['GIT_EMAIL']}'"
+ #system 'git config credential.helper "store --file=.git/credentials"'
+ ## CREDENTIALS assigned by a Travis CI Secure Environment Variable
+ ## see http://about.travis-ci.org/docs/user/build-configuration/#Secure-environment-variables for details
+ #File.open('.git/credentials', 'w') {|f| f.write("https://#{ENV['GH_TOKEN']}:@github.com") }
+ #set_pub_dates 'develop'
+ #system 'git branch master origin/master'
+ #run_awestruct '-P production -g --deploy'
+ #File.delete '.git/credentials'
+#end
+
+desc 'Clean out generated site and temporary files'
+task :clean, :spec do |task, args|
+ require 'fileutils'
+ dirs = ['.awestruct', '.sass-cache', '_site']
+ if args[:spec] == 'all'
+ dirs << '_tmp'
+ end
+ dirs.each do |dir|
+ FileUtils.remove_dir dir unless !File.directory? dir
+ end
+end
+
+# Perform initialization steps, such as setting up the PATH
+task :init do
+ # Detect using gems local to project
+ if File.exist? '_bin'
+ ENV['PATH'] = "_bin#{File::PATH_SEPARATOR}#{ENV['PATH']}"
+ ENV['GEM_HOME'] = '.bundle'
+ end
+end
+
+desc 'Check to ensure the environment is properly configured'
+task :check => :init do
+ if !File.exist? 'Gemfile'
+ if which('awestruct').nil?
+ msg 'Could not find awestruct.', :warn
+ msg 'Run `rake setup` or `rake setup[local]` to install from RubyGems.'
+ # Enable once the rubygem-awestruct RPM is available
+ #msg 'Run `sudo yum install rubygem-awestruct` to install via RPM. (Fedora >= 18)'
+ exit 1
+ else
+ $use_bundle_exec = false
+ next
+ end
+ end
+
+ begin
+ require 'bundler'
+ Bundler.setup
+ rescue LoadError
+ $use_bundle_exec = false
+ rescue StandardError => e
+ msg e.message, :warn
+ if which('awestruct').nil?
+ msg 'Run `rake setup` or `rake setup[local]` to install required gems from RubyGems.'
+ else
+ msg 'Run `rake update` to install additional required gems from RubyGems.'
+ end
+ exit e.status_code
+ end
+end
+
+# Execute Awestruct
+def run_awestruct(args)
+ system "#{$use_bundle_exec ? 'bundle exec ' : ''}awestruct #{args}"
+end
+
+# A cross-platform means of finding an executable in the $PATH.
+# Respects $PATHEXT, which lists valid file extensions for executables on Windows
+#
+# which 'awestruct'
+# => /usr/bin/awestruct
+def which(cmd, opts = {})
+ unless $awestruct_cmd.nil? || opts[:clear_cache]
+ return $awestruct_cmd
+ end
+
+ $awestruct_cmd = nil
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
+ exts.each do |ext|
+ candidate = File.join path, "#{cmd}#{ext}"
+ if File.executable? candidate
+ $awestruct_cmd = candidate
+ return $awestruct_cmd
+ end
+ end
+ end
+ return $awestruct_cmd
+end
+
+# Print a message to STDOUT
+def msg(text, level = :info)
+ case level
+ when :warn
+ puts "\e[31m#{text}\e[0m"
+ else
+ puts "\e[33m#{text}\e[0m"
+ end
+end
+
diff --git a/_config/modeshape.yml b/_config/modeshape.yml
new file mode 100644
index 0000000..8f34fac
--- /dev/null
+++ b/_config/modeshape.yml
@@ -0,0 +1,43 @@
+################################################################################################
+#####
+##### This section controls what to publish, WRT. ModeShape. There are 4 sections. Please
+##### inspect and update *each one* before publishing the website.
+#####
+################################################################################################
+
+# -----------------------------
+# 1. Main downloads
+# This section covers the artifacts being made available for download, their status
+# (stable or unstable) and links to documentation for each version.
+# -----------------------------
+latest:
+ version: 3.5.0.Final
+ maven_version: 3.5.0.Final
+ release_notes: http://www.jboss.org/modeshape/docs/release3-5-0-final.html
+ whats_new: TODO what's new
+ download:
+ all: http://downloads.jboss.org/modeshape/3.5.0.Final/modeshape-3.5.0.Final-dist.zip
+ eapkit: http://downloads.jboss.org/modeshape/3.5.0.Final/modeshape-3.5.0.Final-jbosseap-61-dist.zip
+ quickstarts: http://downloads.jboss.org/modeshape/3.5.0.Final/modeshape-quickstarts-3.5.0.Final.zip
+ source: http://downloads.jboss.org/modeshape/3.5.0.Final/modeshape-3.5.0.Final-source.zip
+ docs:
+ home: https://docs.jboss.org/author/display/MODE
+ user_guide: https://docs.jboss.org/author/display/MODE/ModeShape+Guide
+ getting_started_guide: https://docs.jboss.org/author/display/MODE/Getting+Started+Guide
+ faqs: https://docs.jboss.org/author/display/MODE/FAQ
+ javadocs: http://docs.jboss.org/modeshape/3.5.0.Final/api/index.html
+
+# Older releases
+ ## Leaving out the docs: element means that docs won't be displayed for this version.
+ ## Leaving out any section of the docs, e.g., the user guide, will mean that the latest version will be used.
+old:
+ 3.4.0:
+ maven_version: 3.4.0.Final
+ release_notes: http://www.jboss.org/modeshape/docs/release3-4-0-final.html
+ download:
+ all: http://downloads.jboss.org/modeshape/3.4.0.Final/modeshape-3.4.0.Final-dist.zip
+ eapkit: http://downloads.jboss.org/modeshape/3.4.0.Final/modeshape-3.4.0.Final-jbosseap-61-dist.zip
+ quickstarts: http://downloads.jboss.org/modeshape/3.4.0.Final/modeshape-quickstarts-3.4.0.Final.zip
+ source: http://downloads.jboss.org/modeshape/3.4.0.Final/modeshape-3.4.0.Final-source.zip
+ docs:
+ javadocs: http://docs.jboss.org/modeshape/3.4.0.Final/api/index.html
\ No newline at end of file
diff --git a/_config/site.yml b/_config/site.yml
new file mode 100644
index 0000000..2eeec8f
--- /dev/null
+++ b/_config/site.yml
@@ -0,0 +1,111 @@
+# Default page title
+title: Modeshape
+
+# Project id name
+project: modeshape
+
+# Default minify settings
+css_minifier: disabled
+js_minifier: disabled
+html_minifier: disabled
+
+asciidoctor:
+ :attributes:
+ icons: 'font'
+ sectanchors: true
+ toclevels: 3
+ numbered: true
+ docinfo: true
+ source-highlighter: coderay
+ backend: html5
+ doctype: book
+ ## Leave this empty!!
+ imagesdir:
+ experimental: true
+# Merge multiple JavaScript files to improve performance
+fileMerger:
+ enabled: true
+ outputFilePath: /javascripts/bootstrap-community.js
+ paths:
+ - /javascripts/_bootstrap-transition.js
+ - /javascripts/_bootstrap-alert.js
+ - /javascripts/_bootstrap-button.js
+ - /javascripts/_bootstrap-carousel.js
+ - /javascripts/_bootstrap-collapse.js
+ - /javascripts/_bootstrap-dropdown.js
+ - /javascripts/_bootstrap-modal.js
+ - /javascripts/_bootstrap-tooltip.js
+ - /javascripts/_bootstrap-popover.js
+ - /javascripts/_bootstrap-scrollspy.js
+ - /javascripts/_bootstrap-tab.js
+ - /javascripts/_bootstrap-typeahead.js
+ - /javascripts/_bootstrap-affix.js
+ - /javascripts/_jbossorg-navbarfix.js
+ - /javascripts/_jbossorg-misc.js
+ - /javascripts/_jquery-easytabs.js
+ - /javascripts/_crisp-scripts.js
+
+# Cache hosted fonts, images and javascript
+wget:
+ enabled: true
+ rerunEach: 86400 # seconds
+ timestampFilename: _wget-timestamp
+ options:
+ - --no-remove-listing
+ - -q
+ - -r
+ - --no-parent
+ - -N
+ - --reject 'index.html*'
+ - -e robots=off
+ - --directory-prefix=cache
+ urls:
+ - http://static.jboss.org/theme/js/libs/jquery/jquery-1.9.1.js
+ - http://static.jboss.org/theme/js/libs/jquery/jquery-1.9.1.min.js
+ - http://static.jboss.org/theme/js/libs/html5/pre3.6/html5.min.js
+ - http://static.jboss.org/theme/js/libs/prettify/188.0.0/prettify.min.js
+ - http://static.jboss.org/theme/js/libs/holder/1.9/holder.js
+ - http://static.jboss.org/theme/fonts/titilliumtext/
+ - http://static.jboss.org/theme/fonts/font-awesome/
+ - http://static.jboss.org/theme/images/common/
+ - http://static.jboss.org/images/example/
+
+# Update resource URLs based on the profile
+profiles:
+ development:
+ jborg_fonts_url: http://static.jboss.org/theme/fonts
+ jborg_images_url: http://static.jboss.org/theme/images
+ jborg_js_url: http://static.jboss.org/theme/js
+ project_images_url: http://static.jboss.org/images/example
+ bootstrap_css_url: http://static.jboss.org/theme/css/bootstrap-community/2.3.1.1/bootstrap-community
+ bootstrap_js_url: http://static.jboss.org/theme/js/libs/bootstrap-community/2.3.1.1/bootstrap-community
+ # jborg_fonts_url: /cache/static.jboss.org/theme/fonts
+ # jborg_images_url: /cache/static.jboss.org/theme/images
+ # jborg_js_url: /cache/static.jboss.org/theme/js
+ # project_images_url: /cache/static.jboss.org/images/example
+ # bootstrap_css_url: /stylesheets/bootstrap-community
+ # bootstrap_js_url: /javascripts/bootstrap-community
+ staging:
+ jborg_fonts_url: http://static.jboss.org/theme/fonts
+ jborg_images_url: http://static.jboss.org/theme/images
+ jborg_js_url: http://static.jboss.org/theme/js
+ project_images_url: http://static.jboss.org/images/example
+ bootstrap_css_url: http://static.jboss.org/theme/css/bootstrap-community/2.3.1.1/bootstrap-community
+ bootstrap_js_url: http://static.jboss.org/theme/js/libs/bootstrap-community/2.3.1.1/bootstrap-community
+ base_url: https://github.com/ModeShape/modeshape.github.com
+ production:
+ minified: .min
+ css_minifier: enabled
+ js_minifier: enabled
+ html_minifier: enabled
+ jborg_fonts_url: http://static.jboss.org/theme/fonts
+ jborg_images_url: http://static.jboss.org/theme/images
+ jborg_js_url: http://static.jboss.org/theme/js
+ project_images_url: http://static.jboss.org/images/example
+ bootstrap_css_url: http://static.jboss.org/theme/css/bootstrap-community/2.3.1.1/bootstrap-community
+ bootstrap_js_url: http://static.jboss.org/theme/js/libs/bootstrap-community/2.3.1.1/bootstrap-community
+ base_url: https://github.com/ModeShape/modeshape.github.com
+ google_analytics: UA-8601422-1
+ deploy:
+ host: github_pages
+ branch: master
diff --git a/_ext/css_minifier.rb b/_ext/css_minifier.rb
new file mode 100644
index 0000000..bb75f23
--- /dev/null
+++ b/_ext/css_minifier.rb
@@ -0,0 +1,82 @@
+require 'cssminify'
+
+##
+#
+# Awestruct::Extensions:CssMinifier is a transformer type of awestruct extension.
+# If configured in project pipeline and site.yml, it will compress CSS files.
+#
+# Required installed gems:
+# - cssminify
+#
+# Configuration:
+#
+# 1. configure the extension in the project pipeline.rb:
+# - add css_minifier dependency:
+#
+# require 'css_minifier'
+#
+# - put the extension initialization in the initialization itself:
+#
+# transformer Awestruct::Extensions::CssMinifier.new
+#
+# 2. In your site.yml add:
+#
+# css_minifier: enabled
+#
+# This setting is optional and defaults to enabled.
+#
+##
+module Awestruct
+ module Extensions
+ class CssMinifier
+
+ def transform(site, page, input)
+
+ # Checking if 'css_minifier' setting is provided and whether it's enabled.
+ # By default, if it's not provided, we imply it's enabled.
+ if !site.css_minifier.nil? and !site.css_minifier.to_s.eql?('enabled')
+ return input
+ end
+
+ output = ''
+
+ # Test if it's a CSS file.
+ ext = File.extname(page.output_path)
+ if !ext.empty?
+
+ ext_txt = ext[1..-1]
+
+ # Filtering out non-css files and those which were already minimized with added suffix.
+ if ext_txt == "css" and !page.output_path.to_s.end_with?("min.css")
+ print "Minifying css #{page.output_path} \n"
+ output = CSSminify.compress(input)
+ else
+ return input
+ end
+
+ oldFileName = File.basename(page.output_path).to_s
+
+ # Create new file name with suffix added
+ newFileName = oldFileName.slice(0..oldFileName.length-4)+"min.css"
+ newOutputPath = File.join(File.dirname(page.output_path.to_s),newFileName)
+
+ # Create a temporary file with the merged content.
+ tmpOutputPath = File.join( "./_tmp/" , newFileName)
+ tmpOutputFile = File.new(tmpOutputPath,"w")
+ tmpOutputFile.write(output)
+ tmpOutputFile.close
+
+ # Add the temporary file to the list of pages for rendering phase.
+ newPage = site.engine.load_page(tmpOutputPath)
+ newPage.source_path = tmpOutputPath
+ newPage.output_path = newOutputPath
+ site.pages << newPage
+
+ end
+
+ # We return the input because we leave the original file untouched
+ input
+ end
+ end
+ end
+end
diff --git a/_ext/file_merger.rb b/_ext/file_merger.rb
new file mode 100644
index 0000000..473c5a6
--- /dev/null
+++ b/_ext/file_merger.rb
@@ -0,0 +1,75 @@
+##
+#
+# Awestruct::Extensions:FileMerger is a classic type of awestruct extension.
+# If configured in project pipeline and site.yml, it will merge listed files into one.
+#
+# Configuration:
+#
+# 1. configure the extension in the project pipeline.rb:
+# - add file_merger dependency:
+#
+# require 'file_merger'
+#
+# - put the extension initialization in the initialization itself:
+#
+# extension Awestruct::Extensions::FileMerger.new
+#
+# 2. This is an example site.yml configuration:
+#
+# fileMerger:
+# enabled: true
+# outputFilePath: /javascripts/javascript.min.js
+# paths:
+# - /javascripts/jquery.js
+# - /javascripts/prettify.js
+# - /javascripts/bootstrap-transition.js
+# - /javascripts/bootstrap-alert.js
+#
+##
+
+module Awestruct
+ module Extensions
+ class FileMerger
+
+ def execute(site)
+
+ # Checking whether a correct configuration is provided
+ if site.fileMerger.nil? or site.fileMerger['paths'].nil? or site.fileMerger['outputFilePath'].nil?
+ print "FileMerger extension is not properly configured in site.yml.\n"
+ return
+ end
+
+ # Checking if it's enabled(default)
+ if !site.fileMerger['enabled'].nil? and !( site.fileMerger['enabled'].to_s.eql?("true") )
+ return
+ end
+
+ # Reading site.yml parameters
+ paths = site.fileMerger['paths']
+ outputPath = site.fileMerger['outputFilePath']
+
+ # Iterate over each defined file and add up all content in 'output' variable
+ output = ''
+ paths.each do |path|
+ inputFile = File.new(path.to_s.start_with?(".") ? path : ("."+path.to_s))
+ inputFile.each { |line| output += line }
+ output += "\n"
+ end
+
+ # Create a temporary file with the merged content.
+ tmpOutputPath = File.join( "./_tmp/" , File.basename(outputPath))
+ tmpOutputFile = File.new(tmpOutputPath,"w")
+ tmpOutputFile.write(output)
+ tmpOutputFile.close
+
+ # Add the temporary file to the list of pages for rendering phase.
+ page = site.engine.load_page(tmpOutputPath)
+ page.source_path = tmpOutputPath
+ page.output_path = outputPath
+ site.pages << page
+
+ end
+
+ end
+ end
+end
diff --git a/_ext/html_minifier.rb b/_ext/html_minifier.rb
new file mode 100644
index 0000000..a6cd6b7
--- /dev/null
+++ b/_ext/html_minifier.rb
@@ -0,0 +1,57 @@
+require 'htmlcompressor'
+
+##
+#
+# Awestruct::Extensions:HtmlMinifier is a transformer type of awestruct extension.
+# If configured in project pipeline and site.yml, it will compress HTML files.
+#
+# Required installed gems:
+# - html_press
+#
+# Configuration:
+#
+# 1. configure the extension in the project pipeline.rb:
+# - add html_minifier dependency:
+#
+# require 'html_minifier'
+#
+# - put the extension initialization in the initialization itself:
+#
+# transformer Awestruct::Extensions::HtmlMinifier.new
+#
+# 2. In your site.yml add:
+#
+# html_minifier: enabled
+#
+# This setting is optional and defaults to 'enabled', it's useful when using different configurations
+# for different runtime profiles.
+#
+##
+module Awestruct
+ module Extensions
+ class HtmlMinifier
+
+ def transform(site, page, input)
+
+ # Checking if 'html_minifier' setting is provided and whether it's enabled.
+ # By default, if it's not provided, we imply it's enabled.
+ if !site.html_minifier.nil? && !site.html_minifier.to_s.eql?("enabled")
+ return input
+ end
+
+ # Test if it's a HTML file.
+ ext = File.extname(page.output_path)
+ if !ext.empty?
+ ext_txt = ext[1..-1]
+ if ext_txt == "html"
+ print "Minifying html #{page.output_path} \n"
+ compressor = HtmlCompressor::Compressor.new
+ input = compressor.compress(input)
+ end
+ end
+
+ input
+ end
+ end
+ end
+end
diff --git a/_ext/js_minifier.rb b/_ext/js_minifier.rb
new file mode 100644
index 0000000..21e6fe8
--- /dev/null
+++ b/_ext/js_minifier.rb
@@ -0,0 +1,83 @@
+require 'uglifier'
+
+##
+#
+# Awestruct::Extensions:JsMinifier is a transformer type of awestruct extension.
+# If configured in project pipeline and site.yml, it will compress javascript files.
+#
+# Required installed gems:
+# - uglifier (this has a runtime dependency on execjs)
+# - therubyracer
+#
+# Configuration:
+#
+# 1. configure the extension in the project pipeline.rb:
+# - add js_minifier dependency:
+#
+# require 'js_minifier'
+#
+# - put the extension initialization in the initialization itself:
+#
+# transformer Awestruct::Extensions::JsMinifier.new
+#
+# 2. In your site.yml add:
+#
+# js_minifier: enabled
+#
+# This setting is optional and defaults to enabled.
+#
+##
+module Awestruct
+ module Extensions
+ class JsMinifier
+
+ def transform(site, page, input)
+
+ # Checking if 'js_minifier' setting is provided and whether it's enabled.
+ # By default, if it's not provided, we imply it's enabled.
+ if !site.js_minifier.nil? and !site.js_minifier.to_s.eql?('enabled')
+ return input
+ end
+
+ output = ''
+
+ # Test if it's a javascript file.
+ ext = File.extname(page.output_path)
+
+ if !ext.empty?
+ ext_txt = ext[1..-1]
+
+ # Filtering out non-css files and those which were already minimized with added suffix.
+ if ext_txt == "js" and !page.output_path.to_s.end_with?("min.js")
+ print "Minifying javascript #{page.output_path} \n"
+ output = Uglifier.new.compile(input)
+ else
+ return input
+ end
+
+ oldFileName = File.basename(page.output_path).to_s
+
+ # Create new file name with suffix added
+ newFileName = oldFileName.slice(0..oldFileName.length-3)+"min.js"
+ newOutputPath = File.join(File.dirname(page.output_path.to_s),newFileName)
+
+ # Create a temporary file with the merged content.
+ tmpOutputPath = File.join( "./_tmp/" , newFileName)
+ tmpOutputFile = File.new(tmpOutputPath,"w")
+ tmpOutputFile.write(output)
+ tmpOutputFile.close
+
+ # Add the temporary file to the list of pages for rendering phase.
+ newPage = site.engine.load_page(tmpOutputPath)
+ newPage.source_path = tmpOutputPath
+ newPage.output_path = newOutputPath
+ site.pages << newPage
+
+ end
+
+ # We return the input because we leave the original file untouched
+ input
+ end
+ end
+ end
+end
diff --git a/_ext/less_config.rb b/_ext/less_config.rb
new file mode 100644
index 0000000..33fed8c
--- /dev/null
+++ b/_ext/less_config.rb
@@ -0,0 +1,47 @@
+##
+#
+# Awestruct::Extensions:LessConfig is a classic type of awestruct extension.
+# If configured in the project pipeline and site.yml it will configure
+# the jborg_fonts_path and jborg_images_path Less variables based on site properties.
+#
+# Configuration:
+#
+# 1. configure the extension in the project pipeline.rb:
+# - add compass_config dependency:
+#
+# require 'less_config'
+#
+# - put the extension initialization in the initialization itself:
+#
+# extension Awestruct::Extensions::LessConfig.new
+#
+# 2. This is an example site.yml configuration:
+#
+# jborg_fonts_url: http://static.jboss.org/theme/fonts
+# jborg_images_url: http://static.jboss.org/theme/images
+#
+##
+module Awestruct
+ module Extensions
+ class LessConfig
+
+ def execute(site)
+ output = ''
+ if !site.jborg_fonts_url.nil?
+ output+= "@jborg_fonts_url: \"" + site.jborg_fonts_url + "\";\n"
+ end
+ if !site.jborg_images_url.nil?
+ output+= "@jborg_images_url: \"" + File.join(site.jborg_images_url , "common") + "\" ;\n"
+ end
+
+ # Create a temporary file with the merged content.
+ tmpOutputPath = File.join( site.config.tmp_dir , "config-variables.less")
+ tmpOutputFile = File.new(tmpOutputPath,"w")
+ tmpOutputFile.write(output)
+ tmpOutputFile.close
+
+ end
+
+ end
+ end
+end
diff --git a/_ext/pipeline.rb b/_ext/pipeline.rb
new file mode 100644
index 0000000..b9a897e
--- /dev/null
+++ b/_ext/pipeline.rb
@@ -0,0 +1,19 @@
+require 'wget_wrapper'
+require 'js_minifier'
+require 'css_minifier'
+require 'html_minifier'
+require 'file_merger'
+require 'less_config'
+
+Awestruct::Extensions::Pipeline.new do
+ helper Awestruct::Extensions::Partial
+ extension Awestruct::Extensions::WgetWrapper.new
+ transformer Awestruct::Extensions::JsMinifier.new
+ transformer Awestruct::Extensions::CssMinifier.new
+ transformer Awestruct::Extensions::HtmlMinifier.new
+ extension Awestruct::Extensions::FileMerger.new
+ extension Awestruct::Extensions::LessConfig.new
+ helper Awestruct::Extensions::GoogleAnalytics
+ extension Awestruct::Extensions::Indexifier.new([/^\/docs\/.*/]) # Exclude generated docs from "Indexification"
+end
+
diff --git a/_ext/wget_wrapper.rb b/_ext/wget_wrapper.rb
new file mode 100644
index 0000000..3cf3334
--- /dev/null
+++ b/_ext/wget_wrapper.rb
@@ -0,0 +1,255 @@
+##
+#
+# Awestruct::Extensions:WgetWrapper is a classic type of awestruct extension.
+# If configured in project pipeline and site.yml, it will download content from listed URLs.
+#
+# Configuration:
+#
+# 1. configure the extension in the project pipeline.rb:
+# - add wget_wrapper dependency:
+#
+# require 'wget_wrapper'
+#
+# - put the extension initialization in the initialization itself:
+#
+# extension Awestruct::Extensions::WgetWrapper.new
+#
+# 2. This is an example site.yml configuration:
+#
+# wget:
+# enabled: true
+# createGitIgnoreFiles: true
+# urls:
+# - http://static.jboss.org/theme/css/bootstrap-community.js
+# - http://static.jboss.org/theme/js/bootstrap-community.js
+# - http://static.jboss.org/theme/fonts/titilliumtext/
+# - http://static.jboss.org/theme/images/common/
+#
+# Note: 'enabled' and 'createGitIgnoreFiles' properties default to 'true' if not defined.
+#
+##
+
+require 'uri'
+
+module Awestruct
+ module Extensions
+ class WgetWrapper
+
+ def execute(site)
+
+ # Checking whether a correct configuration is provided
+ if site.wget.nil? or site.wget['urls'].nil?
+ print "WgetWrapper extension is not properly configured in site.yml.\n"
+ return
+ end
+
+ # Checking if it's enabled(default)
+ if !site.wget['enabled'].nil? and !( site.wget['enabled'].to_s.eql?("true") )
+ return
+ end
+
+ # Start for constructing command with parameters.
+ command = "wget "
+
+ noHostDirectories = false
+ directoryPrefix = ""
+
+ # Getting 'options' from configuration
+ options = site.wget['options']
+ optionsStr = ''
+ if !options.nil?
+
+ options.each do |option|
+
+ opStr = option.to_s.strip
+
+ # Checking if -nH or --no-host-directories was specified.
+ if (opStr.eql?("-nH") or opStr.eql?("--no-host-directories"))
+ noHostDirectories = true
+ end
+
+ # Checking if -P or --directory-prefix was specified.
+ if (opStr.start_with?("-P") or opStr.start_with?("--directory-prefix"))
+ directoryPrefix = opStr.split(/=|\s/,2)[1].strip
+ end
+
+ command += " "+opStr
+ end
+
+ end
+
+ # Checking whether rerunEach parameter was specified - default value is 86400.
+ rerunEach = site.wget['rerunEach'].nil? ? 86400 : site.wget['rerunEach']
+
+ # Checking wheter timestamp filename was provided - default _wget-timestamp
+ timestampFilename = "_wget-timestamp"
+ if !site.wget['timestampFilename'].nil?
+ timestampFilename = site.wget['timestampFilename']
+ end
+
+ # If directory prefix was provided we place timestamp file in it, otherwise in root.
+ timestampFilePath = File.join(".",timestampFilename);
+ if (!directoryPrefix.nil? and !directoryPrefix.eql?(""))
+ timestampFilePath = File.join(directoryPrefix,timestampFilename);
+ end
+
+ if (!rerunNeeded?(timestampFilePath,rerunEach))
+ print "Skipping files cache update.\n"
+ return
+ end
+
+ # Getting urls from site.yml
+ urls = site.wget['urls']
+
+ # Paths for .gitignore files
+ directories = Array.new
+
+ # Checking whether .gitignore files should be created (default)
+ createGitIgnoreFiles = true
+ if !site.wget['createGitIgnoreFiles'].nil? and !( site.wget['createGitIgnoreFiles'].to_s.eql?("true") )
+ createGitIgnoreFiles = false
+ end
+
+ # If there is directory prefix defined then we know where should we search for downloaded files.
+ if (createGitIgnoreFiles and !directoryPrefix.eql?(""))
+ directories.push(directoryPrefix)
+ end
+
+ # Iterate over each defined url, add up all of them and collect root paths for .gitignore files.
+ urlsStr = ''
+ urls.each do |url|
+ urlsStr += " "+url.to_s
+
+ if (createGitIgnoreFiles and directoryPrefix.eql?(""))
+
+ uri = URI(url)
+
+ transformedPath=""
+ # If --no-host-directories or -nH option was specified for wget.
+ if (noHostDirectories)
+ path = uri.path
+ splitPath = path.to_s.split("/")
+ next if splitPath.size == 0
+ transformedPath=splitPath[1].to_s
+ else
+ transformedPath=uri.host+uri.path
+ end
+
+ if (!directories.include?(transformedPath))
+ directories.push(transformedPath)
+ end
+ end
+
+ end
+
+ command += urlsStr
+
+ print "Downloading content...\n"
+
+ if system(command)
+ print "Content downloaded.\n"
+ else
+ print "At least some of content from specified URLs was not reachable.\n"
+ end
+
+ # Iterate over collected root directories of downloaded files.
+ directories.each do |directory|
+
+ dirPath = File.join(".",directory)
+
+ # Checking if the directory itself exists, if not it means that probably wget failed to download it.
+ if (!File.exist?(dirPath) or !File.directory?dirPath)
+ next
+ end
+
+ createGitIgnoreFile(dirPath) if createGitIgnoreFiles
+
+ # Collect all pages' paths that are already scheduled for rendering.
+ pathnames = Array.new
+ site.pages.each { |page| pathnames.push( page.output_path ) }
+
+ addToRenderedPages( Pathname.new(dirPath) , site , pathnames )
+
+ end
+
+ end
+
+
+ # Create .gitignore file if it's not already there.
+ def createGitIgnoreFile ( directoryPath )
+
+ gitIgnoreFilePath = File.join(directoryPath,".gitignore")
+
+ # Checking if .gitignore file already exists
+ if (File.exist?(gitIgnoreFilePath))
+ return
+ end
+
+ gitIgnoreFile = File.new( gitIgnoreFilePath , "w" )
+ gitIgnoreFile.write("*\n")
+ gitIgnoreFile.close
+
+ end
+
+ # Check if timestamp difference is bigger than rerunEach.
+ # In case file doesn't extist if will be created and true returned.
+ def rerunNeeded? ( timestampFilePath , rerunEach )
+
+ isNeeded = true
+
+ # Checking if timestamp file already exists
+ if (File.exist?(timestampFilePath))
+ timestampFile = File.new(timestampFilePath, "r")
+ firstLine = timestampFile.gets
+ previousTimestamp = firstLine.nil? ? 0 : firstLine.to_i
+ isNeeded = (Time.now.to_i - previousTimestamp) > rerunEach
+ end
+
+ if (isNeeded)
+ FileUtils.mkdir_p(File.dirname(timestampFilePath))
+ timestampFile = File.new( timestampFilePath , "w" )
+ timestampFile.write(Time.now.to_i.to_s+"\n")
+ timestampFile.close
+ end
+
+ return isNeeded
+
+ end
+
+
+ # Add all files inside a directory to rendered pages list.
+ def addToRenderedPages ( directory , site , pathnames )
+
+ # Iteration through files and directories inside the directory.
+ directory.children.collect do |entry|
+
+ # If an entry is a non-hidden directory we process its content by a recursive call.
+ if entry.directory? and !entry.basename.to_s.start_with?('.')
+ addToRenderedPages( entry , site , pathnames )
+ next
+ end
+
+ # Removing '.' from the beginning of the path.
+ noDotPath = entry.to_s.slice(1..entry.to_s.length-1)
+
+ # Searching if files are already scheduled for rendering
+ found = false
+ pathnames.each { |path| if path.end_with?(noDotPath) then found=true ; break; end }
+
+ # Depending whether it's a scheduled file or start with a '.', we skip to the next iteration.
+ next if found or entry.basename.to_s.start_with?('.')
+
+ # Adding file to rendered pages.
+ pathnames.push(noDotPath)
+ page = site.engine.load_page(entry.to_s)
+ page.source_path = entry.to_s
+ page.output_path = entry.to_s
+ site.pages << page
+
+ end
+
+ end
+
+ end
+ end
+end
diff --git a/_layouts/bothcol.html.haml b/_layouts/bothcol.html.haml
new file mode 100644
index 0000000..e0f41a6
--- /dev/null
+++ b/_layouts/bothcol.html.haml
@@ -0,0 +1,14 @@
+---
+layout: project
+---
+
+.row-fluid
+ #equalHeightsLayout
+ #leftcol.span2.well
+ = partial( page.leftcol_partial.nil? ? 'leftcol.html.haml' : page.leftcol_partial )
+
+ #maincol.span8
+ ~ content
+
+ #rightcol.span2.well
+ = partial( page.rightcol_partial.nil? ? 'rightcol.html.haml' : page.rightcol_partial )
\ No newline at end of file
diff --git a/_layouts/leftcol.html.haml b/_layouts/leftcol.html.haml
new file mode 100644
index 0000000..e992349
--- /dev/null
+++ b/_layouts/leftcol.html.haml
@@ -0,0 +1,11 @@
+---
+layout: project
+---
+
+.row-fluid
+ #equalHeightsLayout
+ #leftcol.span3.well
+ = partial( page.leftcol_partial.nil? ? 'leftcol.html.haml' : page.leftcol_partial )
+
+ #maincol.span9
+ ~ content
diff --git a/_layouts/project.html.haml b/_layouts/project.html.haml
new file mode 100644
index 0000000..271f201
--- /dev/null
+++ b/_layouts/project.html.haml
@@ -0,0 +1,37 @@
+!!! 5
+%html(lang="en")
+ %head
+ %title #{page.title ? page.title : page.simple_name.capitalize } · #{site.title}
+ = partial( page.head_partial.nil? ? 'head.html.haml' : page.head_partial )
+
+ %body
+ / begin accesibility skip to top
+ %ul#top.visuallyhidden
+ %li
+ %a{:accesskey => "n", :href => "#nav", :title => "Skip to navigation"} Skip to navigation
+ %li
+ %a{:accesskey => "c", :href => "#page", :title => "Skip to content"} Skip to content
+ .container#content
+
+ .dropup
+ %a#tab.tabnav-closed{:href => "https://www.jboss.org"} Red Hat
+
+ = partial( page.banner_partial.nil? ? 'banner.html.haml' : page.banner_partial )
+
+ = partial( page.nav_partial.nil? ? 'nav.html.haml' : page.nav_partial )
+
+ ~ content
+
+ = partial( page.projectfooter_partial.nil? ? 'projectfooter.html.haml' : page.projectfooter_partial )
+
+ = partial( page.companyfooter_partial.nil? ? 'companyfooter.html.haml' : page.companyfooter_partial )
+
+ %span.backToTop
+ %a{:href => "#top"} back to top
+
+ %script(src="#{pageStyle ? site[pageStyle].bootstrap_js_url : site.bootstrap_js_url}#{site.minified}.js")
+ - if page.bottom_javascripts
+ - page.bottom_javascripts.each do |javascript|
+ %script{:src=>javascript, :type=>'text/javascript'}
+ - if site.google_analytics
+ = google_analytics_async
diff --git a/_layouts/rightcol.html.haml b/_layouts/rightcol.html.haml
new file mode 100644
index 0000000..9fed5c2
--- /dev/null
+++ b/_layouts/rightcol.html.haml
@@ -0,0 +1,11 @@
+---
+layout: project
+---
+
+.row-fluid
+ #equalHeightsLayout
+ #maincol.span9
+ ~ content
+
+ #rightcol.span3.well
+ = partial( page.rightcol_partial.nil? ? 'rightcol.html.haml' : page.rightcol_partial )
\ No newline at end of file
diff --git a/_partials/banner.html.haml b/_partials/banner.html.haml
new file mode 100644
index 0000000..0d30098
--- /dev/null
+++ b/_partials/banner.html.haml
@@ -0,0 +1,3 @@
+.banner
+ %a(href="#")<
+ .taglinelight.visible-desktop
diff --git a/_partials/companyfooter.html.haml b/_partials/companyfooter.html.haml
new file mode 100644
index 0000000..23036ad
--- /dev/null
+++ b/_partials/companyfooter.html.haml
@@ -0,0 +1,5 @@
+.container#companyfooter
+ .redhatlogo
+ #logospacer
+ %a(href="http://www.redhat.com/")<
+ %img(src="#{site.jborg_images_url}/common/redhat_logo.png")
diff --git a/_partials/docs-button.html.haml b/_partials/docs-button.html.haml
new file mode 100644
index 0000000..5b0d049
--- /dev/null
+++ b/_partials/docs-button.html.haml
@@ -0,0 +1,6 @@
+-# Renders a button to open documentation
+%a.btn.btn-primary{:href => page["docspage"], :role => "button", :target => "_NEW", :style => "height: 50px; width: 100px;"}
+ %i.icon-book.pull-left
+ %br
+ Documentation
+
diff --git a/_partials/download-tbl-row.html.haml b/_partials/download-tbl-row.html.haml
new file mode 100644
index 0000000..d81ef67
--- /dev/null
+++ b/_partials/download-tbl-row.html.haml
@@ -0,0 +1,26 @@
+-# variables expected: release_version (a String) and release_info (structure).
+- release_version = page["release_version"]
+- release_info = page["release_info"]
+-# release info should contain a codename, all, bin and server URLs, and a maven_latest version.
+%tr
+ %td
+ = release_version
+ %td
+ %a{:href => release_info.download.all}
+ %i.icon-download-alt
+ Download
+ %td
+ %a{:href => release_info.download.eapkit}
+ %i.icon-download-alt
+ Download
+ %td
+ - if defined?(release_info.download.quickstarts)
+ %a{:href => release_info.download.quickstarts}
+ %i.icon-download-alt
+ Download
+ %td
+ %a{:href => release_info.download.source}
+ %i.icon-download-alt
+ Download
+ %td
+ = partial('maven-coords-link.html.haml', {"artifactId" => "modeshape-bom-embedded", "version_latest" => release_info.maven_version, "modal_id" => release_info.maven_version})
\ No newline at end of file
diff --git a/_partials/forum-posts.html.haml b/_partials/forum-posts.html.haml
new file mode 100644
index 0000000..c801548
--- /dev/null
+++ b/_partials/forum-posts.html.haml
@@ -0,0 +1,46 @@
+-# Latest news - reads an RSS feed of forum posts from https://community.jboss.org/community/feeds/threads?community=2126
+- real_page = page["real_page"]
+.span4.well
+ %h2 Latest forum discussions
+ #forumfeed
+ .text-center
+ %i.icon-refresh.icon-spin.icon-4x
+ %a{:href => "https://community.jboss.org/community/feeds/threads?community=2126"} More forum posts
+
+ %script{ :type => 'text/javascript', :src => 'https://www.google.com/jsapi'}
+ -# Uses Google Feed API to load forum post feed and replace the DOM elements
+ :javascript
+ google.load("feeds", "1");
+
+ function initialize() {
+ var feed = new google.feeds.Feed("https://community.jboss.org/community/feeds/threads?community=2126");
+ feed.setNumEntries(4);
+ feed.load(function(result) {
+ if (!result.error) {
+ var feedDiv = $('#forumfeed');
+ feedDiv.empty();
+ for (var i = 0; i < result.feed.entries.length; i++) {
+ var entry = result.feed.entries[i];
+ var entryDate = new Date(entry.publishedDate);
+ var date_string =
+ entryDate.getFullYear() + '-'
+ + ('0' + entryDate.getDate()).slice(-2) + '-'
+ + ('0' + (entryDate.getMonth()+1)).slice(-2);
+ feedDiv.append(
+ $('
').append(
+ $('').html(entry.title)
+ ).append(
+ $('').text(date_string)
+ ).append(
+ $('').html(entry.contentSnippet.replace(/<!--.*-->/g, '').replace(' ', ' ')).append(
+ ' more'
+ )
+ ).append(
+ '
'
+ )
+ );
+ }
+ }
+ });
+ }
+ google.setOnLoadCallback(initialize);
\ No newline at end of file
diff --git a/_partials/head.html.haml b/_partials/head.html.haml
new file mode 100644
index 0000000..3de141e
--- /dev/null
+++ b/_partials/head.html.haml
@@ -0,0 +1,35 @@
+%meta(charset="utf-8")
+%meta(name="viewport" content="width=device-width, initial-scale=1.0")
+%meta(name="description" content="#{page.description}")
+%meta(name="author" content="#{page.author}")
+
+- pageStyle = page.style ;
+%link(href="#{pageStyle ? site[pageStyle].bootstrap_css_url : site.bootstrap_css_url}#{site.minified}.css" rel="stylesheet" media="screen")
+/ IE 6-8 support of HTML 5 elements
+/[if lt IE 9]
+ %script(src="#{site.jborg_js_url}/libs/html5/pre3.6/html5.min.js")
+
+/ Defines the project favicon. Change these URLs to your specific project folder on static.jboss.org.
+
+%link(rel="shortcut icon" href="/images/modeshape_icon_64px.png" type="image/png")
+%link(rel="apple-touch-icon-precomposed" sizes="144x144" href="#{site.project_images_url}/apple-touch-icon-144x144-precomposed.png")
+%link(rel="apple-touch-icon-precomposed" sizes="114x114" href="#{site.project_images_url}/apple-touch-icon-114x114-precomposed.png")
+%link(rel="apple-touch-icon-precomposed" sizes="72x72" href="#{site.project_images_url}/apple-touch-icon-72x72-precomposed.png")
+%link(rel="apple-touch-icon-precomposed" href="#{site.project_images_url}/apple-touch-icon-precomposed.png")
+
+/ Defines the project banner. Change these URLs to your specific project folder on static.jboss.org
+:css
+ @media (min-width: 980px) {
+ .banner { background-image: url("/images/modeshape-banner_r1v3.png"); height: 110px; }
+ }
+ @media (max-width: 979px) {
+ .banner { background-image: url("/images/modeshape_logo_200px.png"); background-repeat:no-repeat; height: 60px; }
+ }
+ @media (max-width: 650px) {
+ .banner { width: 200px; margin: 0px auto; }
+ }
+
+%script(src="#{site.jborg_js_url}/libs/jquery/jquery-1.9.1#{site.minified}.js")
+- if page.javascripts
+ - page.javascripts.each do |javascript|
+ %script{:src=>javascript, :type=>'text/javascript'}
diff --git a/_partials/latest-news.html.haml b/_partials/latest-news.html.haml
new file mode 100644
index 0000000..1a4eac8
--- /dev/null
+++ b/_partials/latest-news.html.haml
@@ -0,0 +1,46 @@
+-# Latest news - reads an RSS feed from http://modeshape.wordpress.com/
+- real_page = page["real_page"]
+.span4.well
+ %h2 Latest news
+ #feed
+ .text-center
+ %i.icon-refresh.icon-spin.icon-4x
+ %a{:href => "http://modeshape.wordpress.com/"} More news
+
+ %script{ :type => 'text/javascript', :src => 'https://www.google.com/jsapi'}
+ -# Uses Google Feed API
+ :javascript
+ google.load("feeds", "1");
+
+ function initialize() {
+ var feed = new google.feeds.Feed("http://modeshape.wordpress.com/feed");
+ feed.setNumEntries(4);
+ feed.load(function(result) {
+ if (!result.error) {
+ var feedDiv = $('#feed');
+ feedDiv.empty();
+ for (var i = 0; i < result.feed.entries.length; i++) {
+ var entry = result.feed.entries[i];
+ var entryDate = new Date(entry.publishedDate);
+ var date_string =
+ entryDate.getFullYear() + '-'
+ + ('0' + entryDate.getDate()).slice(-2) + '-'
+ + ('0' + (entryDate.getMonth()+1)).slice(-2);
+ feedDiv.append(
+ $('').append(
+ $('').html(entry.title)
+ ).append(
+ $('').text(date_string)
+ ).append(
+ $('').html(entry.contentSnippet).append(
+ ' more'
+ )
+ ).append(
+ '
'
+ )
+ );
+ }
+ }
+ });
+ }
+ google.setOnLoadCallback(initialize);
\ No newline at end of file
diff --git a/_partials/maven-coords-button.html.haml b/_partials/maven-coords-button.html.haml
new file mode 100644
index 0000000..b578ce0
--- /dev/null
+++ b/_partials/maven-coords-button.html.haml
@@ -0,0 +1,9 @@
+-# Renders a button displaying Maven coordinates
+- page["modal_id"] = page["artifactId"] if not page["modal_id"]
+- page["modal_id"] = page["modal_id"].gsub(/\./, '')
+%a.btn.btn-primary{"data-toggle" => "modal", :href => "#mvn" + page["modal_id"], :role => "button", :style => "height: 50px; width: 100px;"}
+ %i.icon-cloud-download.pull-left
+ Maven coordinates
+
+= partial( 'maven-coords.html.haml', {"artifactId" => page["artifactId"], "version_stable" => page["version_stable"], "version_unstable" => page["version_unstable"], "modal_id" => page["modal_id"] } )
+
diff --git a/_partials/maven-coords-link.html.haml b/_partials/maven-coords-link.html.haml
new file mode 100644
index 0000000..43ee56c
--- /dev/null
+++ b/_partials/maven-coords-link.html.haml
@@ -0,0 +1,8 @@
+-# Renders a link displaying Maven coordinates
+- page["modal_id"] = page["artifactId"] if not page["modal_id"]
+- page["modal_id"] = page["modal_id"].gsub(/\./, '')
+%a{"data-toggle" => "modal", :href => "#mvn" + page["modal_id"], :role => "button"}
+ %i.icon-cloud-download
+ Maven coordinates
+
+= partial( 'maven-coords.html.haml', {"artifactId" => page["artifactId"], "version_latest" => page["version_latest"], "modal_id" => page["modal_id"] } )
\ No newline at end of file
diff --git a/_partials/maven-coords.html.haml b/_partials/maven-coords.html.haml
new file mode 100644
index 0000000..27d1889
--- /dev/null
+++ b/_partials/maven-coords.html.haml
@@ -0,0 +1,25 @@
+- artifactId = page["artifactId"]
+- latest = page["version_latest"]
+%div.modal.hide.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1", :id => "mvn" + page["modal_id"], :style => "text-align: left;"}
+ .modal-header
+ %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
+ %h4#myModalLabel Maven Coordinates
+ .modal-body{:style => "max-height: 500px;"}
+ %p
+ Add the following to the dependencies declared in your
+ %code pom.xml
+ file for the
+ %b latest
+ version of
+ %code #{artifactId}
+ %pre
+ :preserve
+ ...
+ <dependency>
+ <groupId>org.modeshape</groupId>
+ <artifactId>#{artifactId}</artifactId>
+ <version>#{latest}</version>
+ </dependency>
+ ...
+ .modal-footer
+ %button.btn{"aria-hidden" => "true", "data-dismiss" => "modal"} Close
diff --git a/_partials/nav.html.haml b/_partials/nav.html.haml
new file mode 100644
index 0000000..70d9af9
--- /dev/null
+++ b/_partials/nav.html.haml
@@ -0,0 +1,30 @@
+.navbar.navbar-inverse#navbar-fix
+ .navbar-inner
+ .container
+ %a.btn.btn-navbar(data-toggle="collapse" data-target=".nav-collapse")
+ %span.icon-bar
+ %span.icon-bar
+ %span.icon-bar
+ .nav-collapse.collapse
+ %ul.nav
+ %li{:class=>"#{'active' if page.output_path.start_with?('/index') }" }<
+ %a(href="/") Home
+ %li{:class=>"#{'active' if page.output_path.start_with?('/about') }" }<
+ %a(href="/about") About
+ %li{:class=>"#{'active' if page.output_path.start_with?('/documentation') }" }<
+ %a(href="/documentation") Documentation
+ %li{:class=>"#{'active' if page.output_path.start_with?('/download') }" }<
+ %a(href="/download") Download
+ %li{:class=>"#{'active' if page.output_path.start_with?('/community') }" }<
+ %a(href="/community") Community
+ %li{:class=>"#{'active' if page.output_path.start_with?('/getinvolved') }" }<
+ %a(href="/getinvolved") Get Involved
+ %li.dropdown
+ %a.dropdown-toggle(href="#" data-toggle="dropdown")<
+ = precede 'Follow Us ' do
+ %b.caret>
+ %ul.dropdown-menu.projectsocialmedia
+ %li<
+ %a(href="https://twitter.com/modeshape")<
+ %img(src="#{site.jborg_images_url}/common/socialmedia_icon40_twitter.png")
+ %li.divider
diff --git a/_partials/projectfooter.html.haml b/_partials/projectfooter.html.haml
new file mode 100644
index 0000000..dae40ad
--- /dev/null
+++ b/_partials/projectfooter.html.haml
@@ -0,0 +1,64 @@
+%footer.container
+ .row-fluid
+ .span2.offset2
+ %h4 Navigate
+ %ul
+ %li
+ %a{:href => "/about", :title => "About"} About
+ %li
+ %a{:href => "/documentation", :title => "Docs"} Docs
+ %li
+ %a{:href => "/community", :title => "Community"} Community
+ %li
+ %a{:href => "/getinvolved", :title => "Get Involved"} Get Involved
+ %li
+ %a{:href => "/download", :title => "Download"} Download
+
+ .span2
+ %h4 Contribute
+ %ul
+ %li
+ %a{:href => "https://issues.jboss.org/browse/MODE", :title => "Submit a bug"} Submit a bug
+ %li
+ %a{:href => "https://github.com/modeshape", :title => "Write code"} Write Code
+
+ .span2
+ %h4 Follow Us
+ %ul
+ %li
+ %a{:href => "http://modeshape.wordpress.com/", :title => "Blog"} Blog
+ %li
+ %a{:href => "http://twitter.com/modeshape", :title => "Twitter"} Twitter
+
+ .span2
+ %h4 Open Source
+ %p
+ ModeShape is released under the
+ %b Apache 2.0 open source license.
+ Learn more about the Apache 2.0 license
+ %a{:href => "http://www.apache.org/licenses/LICENSE-2.0"}here.
+ %p
+ .jbossbadge
+ %a{:href => "http://www.jboss.org/"}
+ %img{:src => "https://static.jboss.org/theme/images/common/jbossbadge.png"}/
+ .span10
+ %p{:style => "margin-top: 5px; font-size: 80%;"}
+ © Copyright 2009-2013 Red Hat, Inc.
+ %br
+ %i.icon-fire
+ Made with
+ %a{:href => "https://github.com/jbossorg/bootstrap-community", :style=>"text-decoration: underline;", :target=> "_NEW"}JBoss Community Bootstrap
+ and
+ %a{:href => "http://awestruct.org/", :style=>"text-decoration: underline;", :target=> "_NEW"}Awestruct
+ %br
+ %i.icon-globe
+ This website is open source! If you want to improve it,
+ %a{:href => "https://github.com/ModeShape/modeshape.github.com", :style=>"text-decoration: underline;", :target=> "_NEW"}fork the project,
+ and hack on it, then send a pull request. You can also view the
+ %a{:href => "http://www.seethestats.com/site/infinispan.org", :style=>"text-decoration: underline;", :target=> "_NEW"}visitor stats.
+ %br
+ %i.icon-share
+ Website and documentation released under
+ %a{:href => "http://creativecommons.org/licenses/by/3.0/", :style=>"text-decoration: underline;", :target=> "_NEW"}CC BY 3.0.
+
+
diff --git a/_partials/rightcol-docs.html.haml b/_partials/rightcol-docs.html.haml
new file mode 100644
index 0000000..45d210d
--- /dev/null
+++ b/_partials/rightcol-docs.html.haml
@@ -0,0 +1,7 @@
+%h3 Documentation
+%p
+ Looking for documentation, tutorials on using ModeShape, Javadocs or even sample code?
+%a.btn.btn-primary{:href => "/documentation"}
+ Get Started with ModeShape
+
+%hr
diff --git a/_partials/rightcol-download.html.haml b/_partials/rightcol-download.html.haml
new file mode 100644
index 0000000..5593fdb
--- /dev/null
+++ b/_partials/rightcol-download.html.haml
@@ -0,0 +1,29 @@
+%i.icon-cloud-download.icon-2x.pull-left
+%h3 Maven
+%p
+ Prefer to use
+ %a{:href=>"http://maven.apache.org", :target=>"_NEW"} Maven
+ in your project? We sure do!
+%p
+ %a.btn.btn-primary{"data-toggle" => "modal", :href => "#myModal", :role => "button"} Maven Instructions
+ #myModal.modal.hide.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
+ .modal-header
+ %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
+ %h4#myModalLabel Maven Instructions
+ .modal-body
+ %p
+ ModeShape artifacts are available on
+ %a{:href => "http://search.maven.org", :target=>"_NEW"}Maven Central.
+ %p
+ If you wish to search for historical releases of ModeShape on Maven Central, you can search for the artifact you are looking for on Maven Central's
+ %a{:href => "http://search.maven.org", :target=>"_NEW"}search interface.
+ %p
+ If you are looking for a comprehensive list of all ModeShape artifacts and their respective versions, use the
+ %a{:href => "http://search.maven.org/#search|ga|1|g%3A%22org.modeshape%22", :target=>"_NEW"}advanced search interface
+ and look for group id
+ %code org.modeshape
+ .modal-footer
+ %button.btn{"aria-hidden" => "true", "data-dismiss" => "modal"} Close
+%hr
+
+= partial("rightcol-docs.html.haml")
\ No newline at end of file
diff --git a/_partials/tweets.html.haml b/_partials/tweets.html.haml
new file mode 100644
index 0000000..0e1b499
--- /dev/null
+++ b/_partials/tweets.html.haml
@@ -0,0 +1,11 @@
+.span4.well
+ %h2 Tweets - TODO: Enable ModeShape Twitter Timeline widget
+ %a{"href" => "https://twitter.com/modeshape", "class" => "twitter-follow-button", "data-show-count" => "false", "data-lang" => "en", "data-align" => "right"}Follow @modeshape
+ %script{:type => 'text/javascript'}
+ :javascript
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
+ -# Enable ModeShape Twitter Timeline widget
+ -#%a{"class" => "twitter-timeline", "data-dnt" => "true", "href" => "https://twitter.com/modeshape", "data-widget-id" => "87048481", "data-chrome" => "nofooter transparent noheader", "data-link-color" => "#336699"}Tweets by @modeshape
+ -#%script{:type => 'text/javascript'}
+ -#:javascript
+ -# !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
diff --git a/_partials/view-on-github-button.html.haml b/_partials/view-on-github-button.html.haml
new file mode 100644
index 0000000..f94f568
--- /dev/null
+++ b/_partials/view-on-github-button.html.haml
@@ -0,0 +1,5 @@
+-# Renders a button displaying a link to GitHub
+%a.btn.btn-primary{:href=>page["repo"], :target => "_NEW", :alt => "Link to " + page["repo"], :style => "height: 50px; width: 100px;"}
+ %i.icon-github.pull-left
+ %br
+ View on GitHub
\ No newline at end of file
diff --git a/about.html.haml b/about.html.haml
new file mode 100644
index 0000000..e717d16
--- /dev/null
+++ b/about.html.haml
@@ -0,0 +1,57 @@
+---
+layout: project
+title: Learn
+---
+
+.row-fluid
+ .hero-unit
+ %h1 Learn about ModeShape
+ %p Distributed, hierarchical, transactional and consistent data store
+
+ %h2
+ .row-fluid#equalHeightsB
+ .well.span6
+ %i.enormous-icon.icon-question-sign.pull-left.icon-2x
+ %h3 What is it?
+ %p
+ TODO
+ .span6
+ %i.enormous-icon.icon-beaker.pull-left.icon-2x
+ %h3 How do I use it?
+ %p
+ TODO
+ .row-fluid
+ .span6
+ %i.enormous-icon.icon-dashboard.pull-left.icon-2x
+ %h3 Why would I use it?
+ %p
+ TODO
+ %i.enormous-icon.icon-book.pull-left.icon-2x
+ %h3 Where can I learn more?
+ %p
+ Visit the
+ %a{:href => "/documentation"}Documentation section
+ of this website.
+ %p
+ %a.btn.btn-primary{:href => "/documentation", :role => "button"}
+ %i.icon-book.pull-left
+ Learn more ModeShape
+
+ .span6
+ %i.enormous-icon.icon-exchange.pull-left.icon-2x
+ %h3 What about transactions?
+ %p
+ TODO
+ %p
+ %i.enormous-icon.icon-search.pull-left.icon-2x
+ %h3 Can I perform searches?
+ %p
+ TODO
+
+ %h2 Standards
+ .row-fluid#equalHeightsB
+ .well.span6
+ %h3 JSR 283
+ %p
+ %a{:href=>"http://www.jcp.org/en/jsr/detail?id=283"} JSR 283
+ (Content Repository for JavaTM Technology API Version 2.0)
\ No newline at end of file
diff --git a/bin/fetch_docs.rb b/bin/fetch_docs.rb
new file mode 100644
index 0000000..d868b8a
--- /dev/null
+++ b/bin/fetch_docs.rb
@@ -0,0 +1,75 @@
+#!/usr/bin/env ruby
+
+require 'yaml'
+require 'fileutils'
+require 'git'
+require 'trollop'
+
+opts = Trollop::options do
+ version "fetch_docs 0.0.1 (c) 2013 Manik Surtani"
+ banner <<-EOS
+This script pulls AsciiDoc documentation from Infnispan repositories (defined
+in _config/ispn.yml) and incorporates them into the Awestruct website.
+
+Usage:
+ bin/fetch_docs.rb [options]
+where [options] are:
+EOS
+
+ opt :force_clone, "Force re-clone of documentation repos", :default => false
+ opt :verbose, "Be verbose", :default => false
+ opt :git_update, "Will update documentation from git, if force-clone is not set", :default => false
+end
+
+beginning = Time.now
+
+verbose = opts.verbose == true
+force_clone = opts.force_clone == true
+git_update = opts.git_update == true
+
+cwd = File.expand_path File.dirname(__FILE__)
+site_home = cwd + "/../"
+puts "Using site home as #{site_home}" if verbose
+cfg = YAML.load_file(site_home + "_config/ispn.yml")
+
+FileUtils.rm_rf site_home + "docs"
+
+def get_docs(repo, branch, loc, target, verbose)
+ FileUtils.mkdir_p target
+ puts " Cloning #{repo}@#{branch}/#{loc} to #{target}" if verbose
+ tmp = "/tmp/fetchdocs"
+ FileUtils.rm_rf tmp
+ Git.clone(repo, tmp)
+ g = Git.open(tmp)
+ g.checkout branch
+
+ docs_src = "#{tmp}/#{loc}"
+ d = Dir.open docs_src
+ d.each {|f| FileUtils.cp_r("#{docs_src}/#{f}", target, :verbose => verbose) if f != "." and f != ".." and f != "Guardfile"}
+ FileUtils.rm_rf tmp
+end
+
+cfg["docs"].each do |type, tcfg|
+ puts "Processing #{type}"
+ tcfg.each do |ver, vcfg|
+ puts " #{ver}"
+ if type == "infinispan"
+ core = vcfg["core"]
+ server = vcfg["server"]
+
+ get_docs(core["git_repo"], core["branch"], core["location"], "#{site_home}docs/#{ver}", verbose)
+ get_docs(server["git_repo"], server["branch"], server["location"], "#{site_home}docs/#{ver}", verbose) if server != nil
+
+ elsif type == "cachestores"
+ cs_name = ver
+ get_docs(vcfg["git_repo"], vcfg["branch"], vcfg["location"], "#{site_home}docs/#{type}/#{cs_name}", verbose)
+
+ elsif type == "hotrod-clients"
+ hrc_name = ver
+ get_docs(vcfg["git_repo"], vcfg["branch"], vcfg["location"], "#{site_home}docs/#{type}/#{hrc_name}", verbose)
+
+ end
+ end
+end
+
+puts "Time elapsed #{Time.now - beginning} seconds"
diff --git a/bin/publish_production.sh b/bin/publish_production.sh
new file mode 100755
index 0000000..c7433cd
--- /dev/null
+++ b/bin/publish_production.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+rm -rf _site
+bin/fetch_docs.rb -f
+bundle exec awestruct -g -Pproduction --deploy
diff --git a/bin/publish_staging.sh b/bin/publish_staging.sh
new file mode 100755
index 0000000..3c6c884
--- /dev/null
+++ b/bin/publish_staging.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+rm -rf _site
+bin/fetch_docs.rb -f
+bundle exec awestruct -g -Pstaging
+
+git clone ssh://5229a8884382ecc523000001@stg-ispn.rhcloud.com/~/git/stg.git _stg
+
+cd _stg
+git rm -rf php
+git commit -am "Clean old site"
+mkdir php
+cp -r ../_site/* php/
+git add php
+git commit -am "New site"
+git push
+cd ..
+
+rm -rf _stg
+
+echo "******************************************************"
+echo " Staging Build Complete"
+echo " ----------------------"
+echo " Visit http://stg-ispn.rhcloud.com to test"
+echo "******************************************************"
diff --git a/bin/run_dev.sh b/bin/run_dev.sh
new file mode 100755
index 0000000..08330c5
--- /dev/null
+++ b/bin/run_dev.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+bundle exec awestruct -d --force
\ No newline at end of file
diff --git a/community.html.haml b/community.html.haml
new file mode 100644
index 0000000..dc45299
--- /dev/null
+++ b/community.html.haml
@@ -0,0 +1,60 @@
+---
+layout: project
+title: Community
+---
+
+.row-fluid
+ .hero-unit
+ %h1 Communications
+ %p How to communicate with the ModeShape team
+
+ .row-fluid
+ %ul
+ %li.span6
+ %h2 User Forums
+ %p
+ ModeShape's user forums should be your first port of call for any user-related issues with ModeShape. Be it a question, wanting to report a bug, looking for advice, or simply sharing some cool stories you may have.
+ %p
+ %a.btn.btn-primary{:href => "https://community.jboss.org/en/modeshape/content?filterID=contentstatus[published]~objecttype~objecttype[thread]", :role => "button"} Visit the User Forums
+ .well
+ %p
+ %i.icon-thumbs-up.icon-2x.pull-left
+ %h4 Etiquette
+ If you are asking for help, have you read through the
+ %a{:href => "/documentation"} documentation
+ first? You may find your answer there.
+ %p
+ Also, if you are reporting a bug, have you checked our
+ %a{:href => "http://issues.jboss.org/browse/MODE"} bug tracker
+ first? It may be a known issue.
+
+ %li.span6
+ %h2 IRC
+ %p
+ The ModeShape community uses
+ %a{:href => "http://en.wikipedia.org/wiki/Internet_Relay_Chat", :target => "_NEW"} IRC
+ for real-time communications. Join us on the
+ %code #modeshape
+ IRC channel on
+ %a{:href=>"http://freenode.net/", :target=>"_new"}Freenode.
+ %p
+ %a.btn.btn-primary{"data-toggle" => "modal", :href => "#myModal", :role => "button"} IRC Instructions
+ #myModal.modal.hide.fade{"aria-hidden" => "true", "aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"}
+ .modal-header
+ %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
+ %h4#myModalLabel IRC Instructions
+ .modal-body
+ %p
+ Learn more about Freenode
+ %a{:href=>"http://freenode.net/", :target=>"_new"}here
+ and if you need a list of IRC clients, visit
+ %a{:href=>"http://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients", :target=>"_new"}Wikipedia.
+ There are many high-quality, free and open source clients for almost any platform - including mobile devices!
+ %p
+ Once you have connected to a Freenode server, join
+ %code #modeshape
+ and you will be able to speak with a number of ModeShape developers, users and contributors.
+ .modal-footer
+ %button.btn{"aria-hidden" => "true", "data-dismiss" => "modal"} Close
+ %p
+ %img(src="/images/chat.png")
\ No newline at end of file
diff --git a/documentation.html.haml b/documentation.html.haml
new file mode 100644
index 0000000..6b65570
--- /dev/null
+++ b/documentation.html.haml
@@ -0,0 +1,175 @@
+---
+layout: project
+title: Documentation
+---
+
+.row-fluid
+ .hero-unit
+ %h1 Get Started
+ %p Get up and running with ModeShape quickly. Let us walk you through it!
+
+.row-fluid
+ .span5.quickstarts
+ %h2 EAP/AS7 Quickstarts
+ %table.table.table-bordered
+ %tbody
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b CDI
+ %br
+ %i using repository from a JSF application via CDI
+ %td
+ %a{:href=>"https://github.com/ModeShape/quickstart/tree/master/modeshape-cdi"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b CLI
+ %br
+ %i using CLI scripts for creating & setting up a repository
+ %td
+ %a{:href=>"https://github.com/ModeShape/quickstart/tree/master/modeshape-cli"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Clustering
+ %br
+ %i how to configure ModeShape to run in a cluster
+ %td
+ %a{:href=>"https://github.com/ModeShape/quickstart/tree/master/modeshape-clustering"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b EJBs
+ %br
+ %i using a repository from various EJBs
+ %td
+ %a{:href=>"https://github.com/ModeShape/quickstart/tree/master/modeshape-ejb"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Federation
+ %br
+ %i connecting a repository to an external file system
+ %td
+ %a{:href=>"https://github.com/ModeShape/quickstart/tree/master/modeshape-federation"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Servlet
+ %br
+ %i setting up and using a repository from a servlet
+ %td
+ %a{:href=>"https://github.com/ModeShape/quickstart/tree/master/modeshape-servlet"} GitHub
+ .span5.quickstarts
+ %h2 Examples
+ %table.table.table-bordered
+ %tbody
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Standalone
+ %br
+ %i how to embed a repository in a standalone application
+ %td
+ %a{:href=>"https://github.com/ModeShape/modeshape-examples/tree/master/modeshape-embedded-example"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Tomcat JSF
+ %br
+ %i how to use ModeShape from a Tomcat/JSF application
+ %td
+ %a{:href=>"https://github.com/ModeShape/modeshape-examples/tree/master/modeshape-tomcat-jsf-example"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Sequencing
+ %br
+ %i how to configure sequencing
+ %td
+ %a{:href=>"https://github.com/ModeShape/modeshape-examples/tree/master/modeshape-sequencing-example"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Spring integration
+ %br
+ %i how to integrate ModeShape with the Spring framework
+ %td
+ %a{:href=>"https://github.com/ModeShape/modeshape-examples/tree/master/modeshape-spring-example"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b Custom logging
+ %br
+ %i writing & configuring your own custom logger
+ %td
+ %a{:href=>"https://github.com/ModeShape/modeshape-examples/tree/master/modeshape-custom-logging-example"} GitHub
+ %tr
+ %td
+ %i.icon-certificate.pull-left
+ %b External filesystem
+ %br
+ %i connecting to an external file system
+ %td
+ %a{:href=>"https://github.com/ModeShape/modeshape-examples/tree/master/modeshape-filesystem-store-example"} GitHub
+.row-fluid
+ %a{:name => "documentation"}
+ %h2 Documentation
+ %p Official ModeShape documentation is available online:
+
+ %table.table.table-bordered.table-striped
+ %thead
+ %tr
+ %th Version
+ %th
+ %th
+ %th
+ %th
+ %th
+ %tbody
+ %tr
+ %td
+ #{site.modeshape.latest.version}
+ .label.label-success.pull-right
+ %i.icon-check-sign
+ Latest
+ %td
+ %a{:href=>site.modeshape.latest.docs.home} Documentation Home
+ %td
+ %a{:href=>site.modeshape.latest.docs.user_guide} User Guide
+ %td
+ %a{:href=>site.modeshape.latest.docs.getting_started_guide} Getting Started Guide
+ %td
+ %a{:href=>site.modeshape.latest.docs.faqs} FAQs
+ %td
+ %a{:href=>site.modeshape.latest.docs.javadocs} Javadocs
+ - site.modeshape.old.each do |ver, cfg|
+ - doc = cfg.docs
+ %tr
+ %td
+ #{ver}
+ %td
+ %td
+ %td
+ %td
+ %td
+ %a{:href=>doc.javadocs} Javadocs
+
+%h2 Community Help
+%p ModeShape is backed by an active community of developers, end users, content producers and generally cool people. :)
+%dl.dl-horizontal
+ %dt
+ %i.icon-bookmark
+ User Forums
+ %dd can help answer questions you have and be a point of discussion and reference for using ModeShape
+ %dt
+ %i.icon-comments-alt
+ IRC
+ %dd
+ is our real-time chat location. Join us on the
+ %code #modeshape
+ IRC channel on
+ %a{:href=>"http://freenode.net/", :target=>"_new"}Freenode.
+ Join in to talk to us in real time!
+ %a.btn{:href => "/community", :role => "button"} Talk to us
diff --git a/download.html.haml b/download.html.haml
new file mode 100644
index 0000000..64f7f5f
--- /dev/null
+++ b/download.html.haml
@@ -0,0 +1,71 @@
+---
+layout: rightcol
+rightcol_partial: rightcol-download.html.haml
+title: Download
+---
+.row-fluid
+ .row-fluid
+ .span10
+ .label.label-success
+ %i.icon-check-sign
+ Latest
+ %h4 #{site.modeshape.latest.version}
+ %p #{site.modeshape.latest.whats_new}
+ .row-fluid
+ .span3
+ %p Zip Downloads:
+ .span4
+ %a.btn.btn-success.btn-block{:href => site.modeshape.latest.download.all}
+ %i.icon-download-alt
+ All
+ All ModeShape components
+ .span4
+ %a.btn.btn-success.btn-block{:href => site.modeshape.latest.download.eapkit}
+ %i.icon-download-alt
+ EAP Kit
+ Deploy ModeShape in EAP/AS7
+ %br
+ .row-fluid
+ .span3
+ .span4
+ %a.btn.btn-success.btn-block{:href => site.modeshape.latest.download.quickstarts}
+ %i.icon-download-alt
+ Quickstarts
+ EAP/AS7 quickstarts
+ %br
+ .span4
+ %a.btn.btn-success.btn-block{:href => site.modeshape.latest.download.source}
+ %i.icon-download-alt
+ Sources
+ All the ModeShape component sources
+ %br
+ %br
+ .row-fluid
+ .span12{:style => "text-align: right;"}
+ %a{:href => site.modeshape.latest.release_notes, :target => "_NEW"}
+ %i.icon-pencil
+ Release notes
+
+ = partial( 'maven-coords-link.html.haml', {"artifactId" => "modeshape-bom-embedded", "version_latest" => site.modeshape.latest.maven_version, "modal_id" => "main"} )
+
+#accordion2.accordion
+ .accordion-group
+ .accordion-heading
+ %a.accordion-toggle{"data-parent" => "#accordion2", "data-toggle" => "collapse", :href => "#collapseOne"}
+ Download older versions of ModeShape
+ %i.icon-angle-down
+ #collapseOne.accordion-body.collapse.in
+ .accordion-inner
+ %table.table.table-bordered.table-striped
+ %thead
+ %tr
+ %th Version
+ %th All
+ %th EAP Kit
+ %th Quickstarts
+ %th Sources
+ %th Maven
+ %tbody
+ - site.modeshape.old.each do |ver, info|
+ = partial( 'download-tbl-row.html.haml', {"release_version" => ver, "release_info" => info} )
+ %br
diff --git a/getinvolved.html.haml b/getinvolved.html.haml
new file mode 100644
index 0000000..d75b4d2
--- /dev/null
+++ b/getinvolved.html.haml
@@ -0,0 +1,82 @@
+---
+layout: project
+title: Get Involved
+---
+
+.row-fluid
+ .hero-unit
+ %h1 Getting Involved
+ %p How to contribute
+
+ .row-fluid
+ .span6
+ %h2 Yup, we're open.
+ As an open-source project, the ModeShape community has many entry points.
+ We welcome your participation however it suits your level of interest.
+ %br
+ %br
+ ModeShape is a 100% open source project.
+ This means that not only is the code open source, free to use and free to modify, the development process too is open.
+ Mode engineers are available on public IRC channels, hold weekly team meetings in the public, publish design documents and roadmaps to public wikis.
+ And this is where you can get involved.
+
+ .span6
+ %h2 Everything is on-line
+ %p
+ Our code is on-line, so is our continuous integration and bug tracker, team meetings are held in public chat rooms, developer discussion mailing lists are public and so are our design wikis.
+ It's easy to get involved - just meet one of the core engineers on IRC and say hello.
+ Or read
+ %a{:href => "https://community.jboss.org/wiki/ModeShapeDevelopmentWorkflow", :target => "_NEW"}this document.
+ %p
+ %i.icon-github
+ %a{:href => "https://github.com/modeshape", :target => "_NEW"}Code on GitHub
+ %br
+ %i.icon-bolt
+ %a{:href => "https://jira.jboss.org/browse/MODE", :target => "_NEW"}Public issue tracker
+ %br
+ %i.icon-comments
+ %a{:href => "irc://irc.freenode.net/modeshape"}Team meetings and live conversations on IRC
+ %br
+ %i.icon-user
+ %a{:href => "https://community.jboss.org/en/modeshape", :target => "_NEW"} Community
+ .row-fluid
+ .span6
+ %h2 Project statistics
+ %script{:type => "text/javascript", :src => "http://www.ohloh.net/p/modeshape/widgets/project_factoids_stats.js"}
+
+ .span6
+ %h2 Want to talk to us?
+ The ModeShape community is on-line, geographically distributed, and communicate in a number of ways.
+ Visit our
+ %a{:href=>"/community"}community page
+ for more information.
+ %hr
+
+ %h2 Disclosure
+ %p
+ We'd like to make clear how this project works and who holds what responsibilities.
+ We want everyone involved to understand how decisions are made and where they can contribute.
+ TODO
+ %h3 Stewardship
+ %p
+ This project is developed and released by Red Hat with assistance from the Java developer community.
+ The project lead is appointed by Red Hat, and has the power to accept and reject contributions to the project and set the roadmap.
+ Red Hat employees assigned to work on ModeShape as well as community contributors, in this regard, all answer to the project lead.
+ TODO
+ %p
+ The best way for you to suggest requirements for a future release of ModeShape is to enter a feature request in JIRA.
+
+ %h3 Release Cycle
+ %p
+ TODO
+ %h3 Contribution
+ %p
+ ModeShape welcomes, thrives on and greatly values community contribution, and makes the barto contributing as low as possible.
+ If you have any questions on contributing, join us on
+ %a{:href => "/community"}IRC
+ and speak to a member of the ModeShape team.
+ %p
+ You are advised to read up on the
+ %a{:href => "https://community.jboss.org/wiki/ModeShapeDevelopmentWorkflow"} ModeShape Development Workflow
+ page in our documentation before contributing.
+ It contains hints and tips on how to write code that will maximize chances for acceptance into the project
diff --git a/images/chat.png b/images/chat.png
new file mode 100644
index 0000000..24c9729
Binary files /dev/null and b/images/chat.png differ
diff --git a/images/glyphicons-halflings-white.png b/images/glyphicons-halflings-white.png
new file mode 100644
index 0000000..3bf6484
Binary files /dev/null and b/images/glyphicons-halflings-white.png differ
diff --git a/images/glyphicons-halflings.png b/images/glyphicons-halflings.png
new file mode 100644
index 0000000..79bc568
Binary files /dev/null and b/images/glyphicons-halflings.png differ
diff --git a/images/icon-archive.png b/images/icon-archive.png
new file mode 100644
index 0000000..7f34fb8
Binary files /dev/null and b/images/icon-archive.png differ
diff --git a/images/icon-info.png b/images/icon-info.png
new file mode 100644
index 0000000..e832e2e
Binary files /dev/null and b/images/icon-info.png differ
diff --git a/images/icon-thumbs-up.png b/images/icon-thumbs-up.png
new file mode 100644
index 0000000..68ec9f6
Binary files /dev/null and b/images/icon-thumbs-up.png differ
diff --git a/images/modeshape-banner_r1v1.png b/images/modeshape-banner_r1v1.png
new file mode 100644
index 0000000..10facff
Binary files /dev/null and b/images/modeshape-banner_r1v1.png differ
diff --git a/images/modeshape-banner_r1v2.png b/images/modeshape-banner_r1v2.png
new file mode 100644
index 0000000..9c70cc7
Binary files /dev/null and b/images/modeshape-banner_r1v2.png differ
diff --git a/images/modeshape-banner_r1v3.png b/images/modeshape-banner_r1v3.png
new file mode 100644
index 0000000..9bdbbd4
Binary files /dev/null and b/images/modeshape-banner_r1v3.png differ
diff --git a/images/modeshape-distributed.png b/images/modeshape-distributed.png
new file mode 100644
index 0000000..972c892
Binary files /dev/null and b/images/modeshape-distributed.png differ
diff --git a/images/modeshape-hierarchy.png b/images/modeshape-hierarchy.png
new file mode 100644
index 0000000..fe9dc38
Binary files /dev/null and b/images/modeshape-hierarchy.png differ
diff --git a/images/modeshape-scale-out.png b/images/modeshape-scale-out.png
new file mode 100644
index 0000000..7d9c4ef
Binary files /dev/null and b/images/modeshape-scale-out.png differ
diff --git a/images/modeshape-validation.png b/images/modeshape-validation.png
new file mode 100644
index 0000000..bdd9f97
Binary files /dev/null and b/images/modeshape-validation.png differ
diff --git a/images/modeshape_icon_16px.ico b/images/modeshape_icon_16px.ico
new file mode 100644
index 0000000..3fb60c9
Binary files /dev/null and b/images/modeshape_icon_16px.ico differ
diff --git a/images/modeshape_icon_16px.png b/images/modeshape_icon_16px.png
new file mode 100644
index 0000000..17b399e
Binary files /dev/null and b/images/modeshape_icon_16px.png differ
diff --git a/images/modeshape_icon_32px.png b/images/modeshape_icon_32px.png
new file mode 100644
index 0000000..fd63c00
Binary files /dev/null and b/images/modeshape_icon_32px.png differ
diff --git a/images/modeshape_icon_64px.png b/images/modeshape_icon_64px.png
new file mode 100644
index 0000000..9daeacc
Binary files /dev/null and b/images/modeshape_icon_64px.png differ
diff --git a/images/modeshape_logo_100px.png b/images/modeshape_logo_100px.png
new file mode 100644
index 0000000..61ed07e
Binary files /dev/null and b/images/modeshape_logo_100px.png differ
diff --git a/images/modeshape_logo_200px.png b/images/modeshape_logo_200px.png
new file mode 100644
index 0000000..a87b602
Binary files /dev/null and b/images/modeshape_logo_200px.png differ
diff --git a/images/modeshape_logo_300px.png b/images/modeshape_logo_300px.png
new file mode 100644
index 0000000..ba8a682
Binary files /dev/null and b/images/modeshape_logo_300px.png differ
diff --git a/images/modeshape_logo_450px.png b/images/modeshape_logo_450px.png
new file mode 100644
index 0000000..61ee016
Binary files /dev/null and b/images/modeshape_logo_450px.png differ
diff --git a/images/modeshape_logo_600px.png b/images/modeshape_logo_600px.png
new file mode 100644
index 0000000..966fb87
Binary files /dev/null and b/images/modeshape_logo_600px.png differ
diff --git a/images/modeshape_new_icon_16px.png b/images/modeshape_new_icon_16px.png
new file mode 100644
index 0000000..92ef659
Binary files /dev/null and b/images/modeshape_new_icon_16px.png differ
diff --git a/images/modeshape_new_icon_200px.png b/images/modeshape_new_icon_200px.png
new file mode 100644
index 0000000..2a58b05
Binary files /dev/null and b/images/modeshape_new_icon_200px.png differ
diff --git a/images/modeshape_new_icon_300px.png b/images/modeshape_new_icon_300px.png
new file mode 100644
index 0000000..e1c3661
Binary files /dev/null and b/images/modeshape_new_icon_300px.png differ
diff --git a/images/modeshape_new_icon_400px.png b/images/modeshape_new_icon_400px.png
new file mode 100644
index 0000000..6d84738
Binary files /dev/null and b/images/modeshape_new_icon_400px.png differ
diff --git a/images/server_stack.jpg b/images/server_stack.jpg
new file mode 100644
index 0000000..f50caec
Binary files /dev/null and b/images/server_stack.jpg differ
diff --git a/images/storage_stack.jpg b/images/storage_stack.jpg
new file mode 100644
index 0000000..48d424c
Binary files /dev/null and b/images/storage_stack.jpg differ
diff --git a/index.html.haml b/index.html.haml
new file mode 100644
index 0000000..1199393
--- /dev/null
+++ b/index.html.haml
@@ -0,0 +1,41 @@
+---
+layout: project
+title: Homepage
+---
+
+/ Main hero unit for a primary marketing message or call to action
+.row-fluid
+ -##myCarousel.carousel.slide
+ -# %ol.carousel-indicators
+ -# %li.active{"data-slide-to" => "0", "data-target" => "#myCarousel"}
+ -# %li{"data-slide-to" => "1", "data-target" => "#myCarousel"}
+ -# %li{"data-slide-to" => "2", "data-target" => "#myCarousel"}
+ -# %li{"data-slide-to" => "3", "data-target" => "#myCarousel"}
+ -# / Carousel items
+ -# .carousel-inner
+ -# .active.item
+ -# / Database dog slow? You need Infinispan
+ -# %a{:href => "/about"}
+ -# %img(src="http://static.jboss.org/images/infinispan/carousel_img1.png")
+ -# .item
+ -# / Now fully supported, by Red Hat, as JDG.
+ -# %a{:href => "http://www.redhat.com/promo/infspn2jdg/", :target=>"_NEW"}
+ -# %img(src="http://static.jboss.org/images/infinispan/carousel_img2.png")
+ -# .item
+ -# / Book available
+ -# %a{:href => "/documentation"}
+ -# %img(src="http://static.jboss.org/images/infinispan/carousel_img3.png")
+ -# .item
+ -# / New tutorials and getting started guides available
+ -# %a{:href => "/documentation"}
+ -# %img(src="http://static.jboss.org/images/infinispan/carousel_img4.png")
+ -# / Carousel nav
+ -# %a.carousel-control.left{"data-slide" => "prev", :href => "#myCarousel"} ‹
+ -# %a.carousel-control.right{"data-slide" => "next", :href => "#myCarousel"} ›
+ %h1 TODO: Center content
+
+/ section containing blog posts
+.row-fluid.posts
+ = partial( 'latest-news.html.haml', {"real_page" => page} )
+ = partial( 'forum-posts.html.haml', {"real_page" => page} )
+ = partial( 'tweets.html.haml' )
diff --git a/javascripts/_bootstrap-affix.js b/javascripts/_bootstrap-affix.js
new file mode 100644
index 0000000..827ff45
--- /dev/null
+++ b/javascripts/_bootstrap-affix.js
@@ -0,0 +1,117 @@
+/* ==========================================================
+ * bootstrap-affix.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#affix
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* AFFIX CLASS DEFINITION
+ * ====================== */
+
+ var Affix = function (element, options) {
+ this.options = $.extend({}, $.fn.affix.defaults, options)
+ this.$window = $(window)
+ .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
+ .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
+ this.$element = $(element)
+ this.checkPosition()
+ }
+
+ Affix.prototype.checkPosition = function () {
+ if (!this.$element.is(':visible')) return
+
+ var scrollHeight = $(document).height()
+ , scrollTop = this.$window.scrollTop()
+ , position = this.$element.offset()
+ , offset = this.options.offset
+ , offsetBottom = offset.bottom
+ , offsetTop = offset.top
+ , reset = 'affix affix-top affix-bottom'
+ , affix
+
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
+ if (typeof offsetTop == 'function') offsetTop = offset.top()
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
+
+ affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
+ false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
+ 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
+ 'top' : false
+
+ if (this.affixed === affix) return
+
+ this.affixed = affix
+ this.unpin = affix == 'bottom' ? position.top - scrollTop : null
+
+ this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
+ }
+
+
+ /* AFFIX PLUGIN DEFINITION
+ * ======================= */
+
+ var old = $.fn.affix
+
+ $.fn.affix = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('affix')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('affix', (data = new Affix(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.affix.Constructor = Affix
+
+ $.fn.affix.defaults = {
+ offset: 0
+ }
+
+
+ /* AFFIX NO CONFLICT
+ * ================= */
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
+ }
+
+
+ /* AFFIX DATA-API
+ * ============== */
+
+ $(window).on('load', function () {
+ $('[data-spy="affix"]').each(function () {
+ var $spy = $(this)
+ , data = $spy.data()
+
+ data.offset = data.offset || {}
+
+ data.offsetBottom && (data.offset.bottom = data.offsetBottom)
+ data.offsetTop && (data.offset.top = data.offsetTop)
+
+ $spy.affix(data)
+ })
+ })
+
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-alert.js b/javascripts/_bootstrap-alert.js
new file mode 100644
index 0000000..8917f94
--- /dev/null
+++ b/javascripts/_bootstrap-alert.js
@@ -0,0 +1,99 @@
+/* ==========================================================
+ * bootstrap-alert.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* ALERT CLASS DEFINITION
+ * ====================== */
+
+ var dismiss = '[data-dismiss="alert"]'
+ , Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ , selector = $this.attr('data-target')
+ , $parent
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+
+ e && e.preventDefault()
+
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+ $parent.trigger(e = $.Event('close'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ $parent
+ .trigger('closed')
+ .remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent.on($.support.transition.end, removeElement) :
+ removeElement()
+ }
+
+
+ /* ALERT PLUGIN DEFINITION
+ * ======================= */
+
+ var old = $.fn.alert
+
+ $.fn.alert = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('alert')
+ if (!data) $this.data('alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.alert.Constructor = Alert
+
+
+ /* ALERT NO CONFLICT
+ * ================= */
+
+ $.fn.alert.noConflict = function () {
+ $.fn.alert = old
+ return this
+ }
+
+
+ /* ALERT DATA-API
+ * ============== */
+
+ $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-button.js b/javascripts/_bootstrap-button.js
new file mode 100644
index 0000000..66df0a2
--- /dev/null
+++ b/javascripts/_bootstrap-button.js
@@ -0,0 +1,105 @@
+/* ============================================================
+ * bootstrap-button.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* BUTTON PUBLIC CLASS DEFINITION
+ * ============================== */
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.button.defaults, options)
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ , $el = this.$element
+ , data = $el.data()
+ , val = $el.is('input') ? 'val' : 'html'
+
+ state = state + 'Text'
+ data.resetText || $el.data('resetText', $el[val]())
+
+ $el[val](data[state] || this.options[state])
+
+ // push to event loop to allow forms to submit
+ setTimeout(function () {
+ state == 'loadingText' ?
+ $el.addClass(d).attr(d, d) :
+ $el.removeClass(d).removeAttr(d)
+ }, 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
+
+ $parent && $parent
+ .find('.active')
+ .removeClass('active')
+
+ this.$element.toggleClass('active')
+ }
+
+
+ /* BUTTON PLUGIN DEFINITION
+ * ======================== */
+
+ var old = $.fn.button
+
+ $.fn.button = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('button')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('button', (data = new Button(this, options)))
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ $.fn.button.defaults = {
+ loadingText: 'loading...'
+ }
+
+ $.fn.button.Constructor = Button
+
+
+ /* BUTTON NO CONFLICT
+ * ================== */
+
+ $.fn.button.noConflict = function () {
+ $.fn.button = old
+ return this
+ }
+
+
+ /* BUTTON DATA-API
+ * =============== */
+
+ $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ $btn.button('toggle')
+ })
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-carousel.js b/javascripts/_bootstrap-carousel.js
new file mode 100644
index 0000000..b40edd7
--- /dev/null
+++ b/javascripts/_bootstrap-carousel.js
@@ -0,0 +1,207 @@
+/* ==========================================================
+ * bootstrap-carousel.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* CAROUSEL CLASS DEFINITION
+ * ========================= */
+
+ var Carousel = function (element, options) {
+ this.$element = $(element)
+ this.$indicators = this.$element.find('.carousel-indicators')
+ this.options = options
+ this.options.pause == 'hover' && this.$element
+ .on('mouseenter', $.proxy(this.pause, this))
+ .on('mouseleave', $.proxy(this.cycle, this))
+ }
+
+ Carousel.prototype = {
+
+ cycle: function (e) {
+ if (!e) this.paused = false
+ if (this.interval) clearInterval(this.interval);
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+ return this
+ }
+
+ , getActiveIndex: function () {
+ this.$active = this.$element.find('.item.active')
+ this.$items = this.$active.parent().children()
+ return this.$items.index(this.$active)
+ }
+
+ , to: function (pos) {
+ var activeIndex = this.getActiveIndex()
+ , that = this
+
+ if (pos > (this.$items.length - 1) || pos < 0) return
+
+ if (this.sliding) {
+ return this.$element.one('slid', function () {
+ that.to(pos)
+ })
+ }
+
+ if (activeIndex == pos) {
+ return this.pause().cycle()
+ }
+
+ return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
+ }
+
+ , pause: function (e) {
+ if (!e) this.paused = true
+ if (this.$element.find('.next, .prev').length && $.support.transition.end) {
+ this.$element.trigger($.support.transition.end)
+ this.cycle(true)
+ }
+ clearInterval(this.interval)
+ this.interval = null
+ return this
+ }
+
+ , next: function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ , prev: function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ , slide: function (type, next) {
+ var $active = this.$element.find('.item.active')
+ , $next = next || $active[type]()
+ , isCycling = this.interval
+ , direction = type == 'next' ? 'left' : 'right'
+ , fallback = type == 'next' ? 'first' : 'last'
+ , that = this
+ , e
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ $next = $next.length ? $next : this.$element.find('.item')[fallback]()
+
+ e = $.Event('slide', {
+ relatedTarget: $next[0]
+ , direction: direction
+ })
+
+ if ($next.hasClass('active')) return
+
+ if (this.$indicators.length) {
+ this.$indicators.find('.active').removeClass('active')
+ this.$element.one('slid', function () {
+ var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()])
+ $nextIndicator && $nextIndicator.addClass('active')
+ })
+ }
+
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ this.$element.one($.support.transition.end, function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () { that.$element.trigger('slid') }, 0)
+ })
+ } else {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger('slid')
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+ }
+
+
+ /* CAROUSEL PLUGIN DEFINITION
+ * ========================== */
+
+ var old = $.fn.carousel
+
+ $.fn.carousel = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('carousel')
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+ , action = typeof option == 'string' ? option : options.slide
+ if (!data) $this.data('carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (action) data[action]()
+ else if (options.interval) data.pause().cycle()
+ })
+ }
+
+ $.fn.carousel.defaults = {
+ interval: 5000
+ , pause: 'hover'
+ }
+
+ $.fn.carousel.Constructor = Carousel
+
+
+ /* CAROUSEL NO CONFLICT
+ * ==================== */
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
+
+ /* CAROUSEL DATA-API
+ * ================= */
+
+ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
+ var $this = $(this), href
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ , options = $.extend({}, $target.data(), $this.data())
+ , slideIndex
+
+ $target.carousel(options)
+
+ if (slideIndex = $this.attr('data-slide-to')) {
+ $target.data('carousel').pause().to(slideIndex).cycle()
+ }
+
+ e.preventDefault()
+ })
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-collapse.js b/javascripts/_bootstrap-collapse.js
new file mode 100644
index 0000000..2bede4a
--- /dev/null
+++ b/javascripts/_bootstrap-collapse.js
@@ -0,0 +1,167 @@
+/* =============================================================
+ * bootstrap-collapse.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* COLLAPSE PUBLIC CLASS DEFINITION
+ * ================================ */
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
+
+ if (this.options.parent) {
+ this.$parent = $(this.options.parent)
+ }
+
+ this.options.toggle && this.toggle()
+ }
+
+ Collapse.prototype = {
+
+ constructor: Collapse
+
+ , dimension: function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ , show: function () {
+ var dimension
+ , scroll
+ , actives
+ , hasData
+
+ if (this.transitioning || this.$element.hasClass('in')) return
+
+ dimension = this.dimension()
+ scroll = $.camelCase(['scroll', dimension].join('-'))
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+
+ if (actives && actives.length) {
+ hasData = actives.data('collapse')
+ if (hasData && hasData.transitioning) return
+ actives.collapse('hide')
+ hasData || actives.data('collapse', null)
+ }
+
+ this.$element[dimension](0)
+ this.transition('addClass', $.Event('show'), 'shown')
+ $.support.transition && this.$element[dimension](this.$element[0][scroll])
+ }
+
+ , hide: function () {
+ var dimension
+ if (this.transitioning || !this.$element.hasClass('in')) return
+ dimension = this.dimension()
+ this.reset(this.$element[dimension]())
+ this.transition('removeClass', $.Event('hide'), 'hidden')
+ this.$element[dimension](0)
+ }
+
+ , reset: function (size) {
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ [dimension](size || 'auto')
+ [0].offsetWidth
+
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
+
+ return this
+ }
+
+ , transition: function (method, startEvent, completeEvent) {
+ var that = this
+ , complete = function () {
+ if (startEvent.type == 'show') that.reset()
+ that.transitioning = 0
+ that.$element.trigger(completeEvent)
+ }
+
+ this.$element.trigger(startEvent)
+
+ if (startEvent.isDefaultPrevented()) return
+
+ this.transitioning = 1
+
+ this.$element[method]('in')
+
+ $.support.transition && this.$element.hasClass('collapse') ?
+ this.$element.one($.support.transition.end, complete) :
+ complete()
+ }
+
+ , toggle: function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+ }
+
+
+ /* COLLAPSE PLUGIN DEFINITION
+ * ========================== */
+
+ var old = $.fn.collapse
+
+ $.fn.collapse = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('collapse')
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.collapse.defaults = {
+ toggle: true
+ }
+
+ $.fn.collapse.Constructor = Collapse
+
+
+ /* COLLAPSE NO CONFLICT
+ * ==================== */
+
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ /* COLLAPSE DATA-API
+ * ================= */
+
+ $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
+ var $this = $(this), href
+ , target = $this.attr('data-target')
+ || e.preventDefault()
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+ $(target).collapse(option)
+ })
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-dropdown.js b/javascripts/_bootstrap-dropdown.js
new file mode 100644
index 0000000..a1d5151
--- /dev/null
+++ b/javascripts/_bootstrap-dropdown.js
@@ -0,0 +1,165 @@
+/* ============================================================
+ * bootstrap-dropdown.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* DROPDOWN CLASS DEFINITION
+ * ========================= */
+
+ var toggle = '[data-toggle=dropdown]'
+ , Dropdown = function (element) {
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
+ $('html').on('click.dropdown.data-api', function () {
+ $el.parent().removeClass('open')
+ })
+ }
+
+ Dropdown.prototype = {
+
+ constructor: Dropdown
+
+ , toggle: function (e) {
+ var $this = $(this)
+ , $parent
+ , isActive
+
+ if ($this.is('.disabled, :disabled')) return
+
+ $parent = getParent($this)
+
+ isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) {
+ $parent.toggleClass('open')
+ }
+
+ $this.focus()
+
+ return false
+ }
+
+ , keydown: function (e) {
+ var $this
+ , $items
+ , $active
+ , $parent
+ , isActive
+ , index
+
+ if (!/(38|40|27)/.test(e.keyCode)) return
+
+ $this = $(this)
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ if ($this.is('.disabled, :disabled')) return
+
+ $parent = getParent($this)
+
+ isActive = $parent.hasClass('open')
+
+ if (!isActive || (isActive && e.keyCode == 27)) {
+ if (e.which == 27) $parent.find(toggle).focus()
+ return $this.click()
+ }
+
+ $items = $('[role=menu] li:not(.divider):visible a', $parent)
+
+ if (!$items.length) return
+
+ index = $items.index($items.filter(':focus'))
+
+ if (e.keyCode == 38 && index > 0) index-- // up
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
+
+ $items
+ .eq(index)
+ .focus()
+ }
+
+ }
+
+ function clearMenus() {
+ $(toggle).each(function () {
+ getParent($(this)).removeClass('open')
+ })
+ }
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+ , $parent
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = selector && $(selector)
+
+ if (!$parent || !$parent.length) $parent = $this.parent()
+
+ return $parent
+ }
+
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ var old = $.fn.dropdown
+
+ $.fn.dropdown = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('dropdown')
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ /* DROPDOWN NO CONFLICT
+ * ==================== */
+
+ $.fn.dropdown.noConflict = function () {
+ $.fn.dropdown = old
+ return this
+ }
+
+
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
+ * =================================== */
+
+ $(document)
+ .on('click.dropdown.data-api', clearMenus)
+ .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.dropdown-menu', function (e) { e.stopPropagation() })
+ .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
+ .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
+
+}(window.jQuery);
diff --git a/javascripts/_bootstrap-modal.js b/javascripts/_bootstrap-modal.js
new file mode 100644
index 0000000..12abe06
--- /dev/null
+++ b/javascripts/_bootstrap-modal.js
@@ -0,0 +1,247 @@
+/* =========================================================
+ * bootstrap-modal.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#modals
+ * =========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* MODAL CLASS DEFINITION
+ * ====================== */
+
+ var Modal = function (element, options) {
+ this.options = options
+ this.$element = $(element)
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+ this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
+ }
+
+ Modal.prototype = {
+
+ constructor: Modal
+
+ , toggle: function () {
+ return this[!this.isShown ? 'show' : 'hide']()
+ }
+
+ , show: function () {
+ var that = this
+ , e = $.Event('show')
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = true
+
+ this.escape()
+
+ this.backdrop(function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(document.body) //don't move modals dom position
+ }
+
+ that.$element.show()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element
+ .addClass('in')
+ .attr('aria-hidden', false)
+
+ that.enforceFocus()
+
+ transition ?
+ that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
+ that.$element.focus().trigger('shown')
+
+ })
+ }
+
+ , hide: function (e) {
+ e && e.preventDefault()
+
+ var that = this
+
+ e = $.Event('hide')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ this.escape()
+
+ $(document).off('focusin.modal')
+
+ this.$element
+ .removeClass('in')
+ .attr('aria-hidden', true)
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.hideWithTransition() :
+ this.hideModal()
+ }
+
+ , enforceFocus: function () {
+ var that = this
+ $(document).on('focusin.modal', function (e) {
+ if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
+ that.$element.focus()
+ }
+ })
+ }
+
+ , escape: function () {
+ var that = this
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keyup.dismiss.modal', function ( e ) {
+ e.which == 27 && that.hide()
+ })
+ } else if (!this.isShown) {
+ this.$element.off('keyup.dismiss.modal')
+ }
+ }
+
+ , hideWithTransition: function () {
+ var that = this
+ , timeout = setTimeout(function () {
+ that.$element.off($.support.transition.end)
+ that.hideModal()
+ }, 500)
+
+ this.$element.one($.support.transition.end, function () {
+ clearTimeout(timeout)
+ that.hideModal()
+ })
+ }
+
+ , hideModal: function () {
+ var that = this
+ this.$element.hide()
+ this.backdrop(function () {
+ that.removeBackdrop()
+ that.$element.trigger('hidden')
+ })
+ }
+
+ , removeBackdrop: function () {
+ this.$backdrop && this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ , backdrop: function (callback) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('')
+ .appendTo(document.body)
+
+ this.$backdrop.click(
+ this.options.backdrop == 'static' ?
+ $.proxy(this.$element[0].focus, this.$element[0])
+ : $.proxy(this.hide, this)
+ )
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ if (!callback) return
+
+ doAnimate ?
+ this.$backdrop.one($.support.transition.end, callback) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade')?
+ this.$backdrop.one($.support.transition.end, callback) :
+ callback()
+
+ } else if (callback) {
+ callback()
+ }
+ }
+ }
+
+
+ /* MODAL PLUGIN DEFINITION
+ * ======================= */
+
+ var old = $.fn.modal
+
+ $.fn.modal = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('modal')
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option]()
+ else if (options.show) data.show()
+ })
+ }
+
+ $.fn.modal.defaults = {
+ backdrop: true
+ , keyboard: true
+ , show: true
+ }
+
+ $.fn.modal.Constructor = Modal
+
+
+ /* MODAL NO CONFLICT
+ * ================= */
+
+ $.fn.modal.noConflict = function () {
+ $.fn.modal = old
+ return this
+ }
+
+
+ /* MODAL DATA-API
+ * ============== */
+
+ $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
+ var $this = $(this)
+ , href = $this.attr('href')
+ , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
+ , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
+
+ e.preventDefault()
+
+ $target
+ .modal(option)
+ .one('hide', function () {
+ $this.focus()
+ })
+ })
+
+}(window.jQuery);
diff --git a/javascripts/_bootstrap-popover.js b/javascripts/_bootstrap-popover.js
new file mode 100644
index 0000000..e6d897c
--- /dev/null
+++ b/javascripts/_bootstrap-popover.js
@@ -0,0 +1,114 @@
+/* ===========================================================
+ * bootstrap-popover.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* POPOVER PUBLIC CLASS DEFINITION
+ * =============================== */
+
+ var Popover = function (element, options) {
+ this.init('popover', element, options)
+ }
+
+
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
+ ========================================== */
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
+
+ constructor: Popover
+
+ , setContent: function () {
+ var $tip = this.tip()
+ , title = this.getTitle()
+ , content = this.getContent()
+
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
+
+ $tip.removeClass('fade top bottom left right in')
+ }
+
+ , hasContent: function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ , getContent: function () {
+ var content
+ , $e = this.$element
+ , o = this.options
+
+ content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
+ || $e.attr('data-content')
+
+ return content
+ }
+
+ , tip: function () {
+ if (!this.$tip) {
+ this.$tip = $(this.options.template)
+ }
+ return this.$tip
+ }
+
+ , destroy: function () {
+ this.hide().$element.off('.' + this.type).removeData(this.type)
+ }
+
+ })
+
+
+ /* POPOVER PLUGIN DEFINITION
+ * ======================= */
+
+ var old = $.fn.popover
+
+ $.fn.popover = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('popover')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.popover.Constructor = Popover
+
+ $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
+ placement: 'right'
+ , trigger: 'click'
+ , content: ''
+ , template: ''
+ })
+
+
+ /* POPOVER NO CONFLICT
+ * =================== */
+
+ $.fn.popover.noConflict = function () {
+ $.fn.popover = old
+ return this
+ }
+
+}(window.jQuery);
diff --git a/javascripts/_bootstrap-scrollspy.js b/javascripts/_bootstrap-scrollspy.js
new file mode 100644
index 0000000..ac1402b
--- /dev/null
+++ b/javascripts/_bootstrap-scrollspy.js
@@ -0,0 +1,162 @@
+/* =============================================================
+ * bootstrap-scrollspy.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* SCROLLSPY CLASS DEFINITION
+ * ========================== */
+
+ function ScrollSpy(element, options) {
+ var process = $.proxy(this.process, this)
+ , $element = $(element).is('body') ? $(window) : $(element)
+ , href
+ this.options = $.extend({}, $.fn.scrollspy.defaults, options)
+ this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
+ this.selector = (this.options.target
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ || '') + ' .nav li > a'
+ this.$body = $('body')
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.prototype = {
+
+ constructor: ScrollSpy
+
+ , refresh: function () {
+ var self = this
+ , $targets
+
+ this.offsets = $([])
+ this.targets = $([])
+
+ $targets = this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ , href = $el.data('target') || $el.attr('href')
+ , $href = /^#\w/.test(href) && $(href)
+ return ( $href
+ && $href.length
+ && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href ]] ) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ self.offsets.push(this[0])
+ self.targets.push(this[1])
+ })
+ }
+
+ , process: function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+ , maxScroll = scrollHeight - this.$scrollElement.height()
+ , offsets = this.offsets
+ , targets = this.targets
+ , activeTarget = this.activeTarget
+ , i
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets.last()[0])
+ && this.activate ( i )
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+ && this.activate( targets[i] )
+ }
+ }
+
+ , activate: function (target) {
+ var active
+ , selector
+
+ this.activeTarget = target
+
+ $(this.selector)
+ .parent('.active')
+ .removeClass('active')
+
+ selector = this.selector
+ + '[data-target="' + target + '"],'
+ + this.selector + '[href="' + target + '"]'
+
+ active = $(selector)
+ .parent('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu').length) {
+ active = active.closest('li.dropdown').addClass('active')
+ }
+
+ active.trigger('activate')
+ }
+
+ }
+
+
+ /* SCROLLSPY PLUGIN DEFINITION
+ * =========================== */
+
+ var old = $.fn.scrollspy
+
+ $.fn.scrollspy = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('scrollspy')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+ $.fn.scrollspy.defaults = {
+ offset: 10
+ }
+
+
+ /* SCROLLSPY NO CONFLICT
+ * ===================== */
+
+ $.fn.scrollspy.noConflict = function () {
+ $.fn.scrollspy = old
+ return this
+ }
+
+
+ /* SCROLLSPY DATA-API
+ * ================== */
+
+ $(window).on('load', function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ $spy.scrollspy($spy.data())
+ })
+ })
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-tab.js b/javascripts/_bootstrap-tab.js
new file mode 100644
index 0000000..1d23df6
--- /dev/null
+++ b/javascripts/_bootstrap-tab.js
@@ -0,0 +1,144 @@
+/* ========================================================
+ * bootstrap-tab.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* TAB CLASS DEFINITION
+ * ==================== */
+
+ var Tab = function (element) {
+ this.element = $(element)
+ }
+
+ Tab.prototype = {
+
+ constructor: Tab
+
+ , show: function () {
+ var $this = this.element
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
+ , selector = $this.attr('data-target')
+ , previous
+ , $target
+ , e
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ if ( $this.parent('li').hasClass('active') ) return
+
+ previous = $ul.find('.active:last a')[0]
+
+ e = $.Event('show', {
+ relatedTarget: previous
+ })
+
+ $this.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $target = $(selector)
+
+ this.activate($this.parent('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $this.trigger({
+ type: 'shown'
+ , relatedTarget: previous
+ })
+ })
+ }
+
+ , activate: function ( element, container, callback) {
+ var $active = container.find('> .active')
+ , transition = callback
+ && $.support.transition
+ && $active.hasClass('fade')
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+
+ element.addClass('active')
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if ( element.parent('.dropdown-menu') ) {
+ element.closest('li.dropdown').addClass('active')
+ }
+
+ callback && callback()
+ }
+
+ transition ?
+ $active.one($.support.transition.end, next) :
+ next()
+
+ $active.removeClass('in')
+ }
+ }
+
+
+ /* TAB PLUGIN DEFINITION
+ * ===================== */
+
+ var old = $.fn.tab
+
+ $.fn.tab = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('tab')
+ if (!data) $this.data('tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tab.Constructor = Tab
+
+
+ /* TAB NO CONFLICT
+ * =============== */
+
+ $.fn.tab.noConflict = function () {
+ $.fn.tab = old
+ return this
+ }
+
+
+ /* TAB DATA-API
+ * ============ */
+
+ $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ e.preventDefault()
+ $(this).tab('show')
+ })
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-tooltip.js b/javascripts/_bootstrap-tooltip.js
new file mode 100644
index 0000000..835abbe
--- /dev/null
+++ b/javascripts/_bootstrap-tooltip.js
@@ -0,0 +1,361 @@
+/* ===========================================================
+ * bootstrap-tooltip.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* TOOLTIP PUBLIC CLASS DEFINITION
+ * =============================== */
+
+ var Tooltip = function (element, options) {
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.prototype = {
+
+ constructor: Tooltip
+
+ , init: function (type, element, options) {
+ var eventIn
+ , eventOut
+ , triggers
+ , trigger
+ , i
+
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.enabled = true
+
+ triggers = this.options.trigger.split(' ')
+
+ for (i = triggers.length; i--;) {
+ trigger = triggers[i]
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ eventIn = trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = trigger == 'hover' ? 'mouseleave' : 'blur'
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ , getOptions: function (options) {
+ options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay
+ , hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ , enter: function (e) {
+ var defaults = $.fn[this.type].defaults
+ , options = {}
+ , self
+
+ this._options && $.each(this._options, function (key, value) {
+ if (defaults[key] != value) options[key] = value
+ }, this)
+
+ self = $(e.currentTarget)[this.type](options).data(this.type)
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ clearTimeout(this.timeout)
+ self.hoverState = 'in'
+ this.timeout = setTimeout(function() {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ , leave: function (e) {
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+ if (this.timeout) clearTimeout(this.timeout)
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.hoverState = 'out'
+ this.timeout = setTimeout(function() {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ , show: function () {
+ var $tip
+ , pos
+ , actualWidth
+ , actualHeight
+ , placement
+ , tp
+ , e = $.Event('show')
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $tip = this.tip()
+ this.setContent()
+
+ if (this.options.animation) {
+ $tip.addClass('fade')
+ }
+
+ placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+ pos = this.getPosition()
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+
+ switch (placement) {
+ case 'bottom':
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'top':
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'left':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+ break
+ case 'right':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+ break
+ }
+
+ this.applyPlacement(tp, placement)
+ this.$element.trigger('shown')
+ }
+ }
+
+ , applyPlacement: function(offset, placement){
+ var $tip = this.tip()
+ , width = $tip[0].offsetWidth
+ , height = $tip[0].offsetHeight
+ , actualWidth
+ , actualHeight
+ , delta
+ , replace
+
+ $tip
+ .offset(offset)
+ .addClass(placement)
+ .addClass('in')
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ offset.top = offset.top + height - actualHeight
+ replace = true
+ }
+
+ if (placement == 'bottom' || placement == 'top') {
+ delta = 0
+
+ if (offset.left < 0){
+ delta = offset.left * -2
+ offset.left = 0
+ $tip.offset(offset)
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+ }
+
+ this.replaceArrow(delta - width + actualWidth, actualWidth, 'left')
+ } else {
+ this.replaceArrow(actualHeight - height, actualHeight, 'top')
+ }
+
+ if (replace) $tip.offset(offset)
+ }
+
+ , replaceArrow: function(delta, dimension, position){
+ this
+ .arrow()
+ .css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
+ }
+
+ , setContent: function () {
+ var $tip = this.tip()
+ , title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ , hide: function () {
+ var that = this
+ , $tip = this.tip()
+ , e = $.Event('hide')
+
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+
+ $tip.removeClass('in')
+
+ function removeWithAnimation() {
+ var timeout = setTimeout(function () {
+ $tip.off($.support.transition.end).detach()
+ }, 500)
+
+ $tip.one($.support.transition.end, function () {
+ clearTimeout(timeout)
+ $tip.detach()
+ })
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ removeWithAnimation() :
+ $tip.detach()
+
+ this.$element.trigger('hidden')
+
+ return this
+ }
+
+ , fixTitle: function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+ }
+ }
+
+ , hasContent: function () {
+ return this.getTitle()
+ }
+
+ , getPosition: function () {
+ var el = this.$element[0]
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : {
+ width: el.offsetWidth
+ , height: el.offsetHeight
+ }, this.$element.offset())
+ }
+
+ , getTitle: function () {
+ var title
+ , $e = this.$element
+ , o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ , tip: function () {
+ return this.$tip = this.$tip || $(this.options.template)
+ }
+
+ , arrow: function(){
+ return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
+ }
+
+ , validate: function () {
+ if (!this.$element[0].parentNode) {
+ this.hide()
+ this.$element = null
+ this.options = null
+ }
+ }
+
+ , enable: function () {
+ this.enabled = true
+ }
+
+ , disable: function () {
+ this.enabled = false
+ }
+
+ , toggleEnabled: function () {
+ this.enabled = !this.enabled
+ }
+
+ , toggle: function (e) {
+ var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+ self.tip().hasClass('in') ? self.hide() : self.show()
+ }
+
+ , destroy: function () {
+ this.hide().$element.off('.' + this.type).removeData(this.type)
+ }
+
+ }
+
+
+ /* TOOLTIP PLUGIN DEFINITION
+ * ========================= */
+
+ var old = $.fn.tooltip
+
+ $.fn.tooltip = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('tooltip')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tooltip.Constructor = Tooltip
+
+ $.fn.tooltip.defaults = {
+ animation: true
+ , placement: 'top'
+ , selector: false
+ , template: ''
+ , trigger: 'hover focus'
+ , title: ''
+ , delay: 0
+ , html: false
+ , container: false
+ }
+
+
+ /* TOOLTIP NO CONFLICT
+ * =================== */
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ }
+
+}(window.jQuery);
diff --git a/javascripts/_bootstrap-transition.js b/javascripts/_bootstrap-transition.js
new file mode 100644
index 0000000..92719d3
--- /dev/null
+++ b/javascripts/_bootstrap-transition.js
@@ -0,0 +1,60 @@
+/* ===================================================
+ * bootstrap-transition.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
+ * ===================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+ * ======================================================= */
+
+ $(function () {
+
+ $.support.transition = (function () {
+
+ var transitionEnd = (function () {
+
+ var el = document.createElement('bootstrap')
+ , transEndEventNames = {
+ 'WebkitTransition' : 'webkitTransitionEnd'
+ , 'MozTransition' : 'transitionend'
+ , 'OTransition' : 'oTransitionEnd otransitionend'
+ , 'transition' : 'transitionend'
+ }
+ , name
+
+ for (name in transEndEventNames){
+ if (el.style[name] !== undefined) {
+ return transEndEventNames[name]
+ }
+ }
+
+ }())
+
+ return transitionEnd && {
+ end: transitionEnd
+ }
+
+ })()
+
+ })
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/javascripts/_bootstrap-typeahead.js b/javascripts/_bootstrap-typeahead.js
new file mode 100644
index 0000000..280cde8
--- /dev/null
+++ b/javascripts/_bootstrap-typeahead.js
@@ -0,0 +1,335 @@
+/* =============================================================
+ * bootstrap-typeahead.js v2.3.1
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function($){
+
+ "use strict"; // jshint ;_;
+
+
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+ * ================================= */
+
+ var Typeahead = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.typeahead.defaults, options)
+ this.matcher = this.options.matcher || this.matcher
+ this.sorter = this.options.sorter || this.sorter
+ this.highlighter = this.options.highlighter || this.highlighter
+ this.updater = this.options.updater || this.updater
+ this.source = this.options.source
+ this.$menu = $(this.options.menu)
+ this.shown = false
+ this.listen()
+ }
+
+ Typeahead.prototype = {
+
+ constructor: Typeahead
+
+ , select: function () {
+ var val = this.$menu.find('.active').attr('data-value')
+ this.$element
+ .val(this.updater(val))
+ .change()
+ return this.hide()
+ }
+
+ , updater: function (item) {
+ return item
+ }
+
+ , show: function () {
+ var pos = $.extend({}, this.$element.position(), {
+ height: this.$element[0].offsetHeight
+ })
+
+ this.$menu
+ .insertAfter(this.$element)
+ .css({
+ top: pos.top + pos.height
+ , left: pos.left
+ })
+ .show()
+
+ this.shown = true
+ return this
+ }
+
+ , hide: function () {
+ this.$menu.hide()
+ this.shown = false
+ return this
+ }
+
+ , lookup: function (event) {
+ var items
+
+ this.query = this.$element.val()
+
+ if (!this.query || this.query.length < this.options.minLength) {
+ return this.shown ? this.hide() : this
+ }
+
+ items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
+
+ return items ? this.process(items) : this
+ }
+
+ , process: function (items) {
+ var that = this
+
+ items = $.grep(items, function (item) {
+ return that.matcher(item)
+ })
+
+ items = this.sorter(items)
+
+ if (!items.length) {
+ return this.shown ? this.hide() : this
+ }
+
+ return this.render(items.slice(0, this.options.items)).show()
+ }
+
+ , matcher: function (item) {
+ return ~item.toLowerCase().indexOf(this.query.toLowerCase())
+ }
+
+ , sorter: function (items) {
+ var beginswith = []
+ , caseSensitive = []
+ , caseInsensitive = []
+ , item
+
+ while (item = items.shift()) {
+ if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
+ else if (~item.indexOf(this.query)) caseSensitive.push(item)
+ else caseInsensitive.push(item)
+ }
+
+ return beginswith.concat(caseSensitive, caseInsensitive)
+ }
+
+ , highlighter: function (item) {
+ var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+ return '' + match + ''
+ })
+ }
+
+ , render: function (items) {
+ var that = this
+
+ items = $(items).map(function (i, item) {
+ i = $(that.options.item).attr('data-value', item)
+ i.find('a').html(that.highlighter(item))
+ return i[0]
+ })
+
+ items.first().addClass('active')
+ this.$menu.html(items)
+ return this
+ }
+
+ , next: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , next = active.next()
+
+ if (!next.length) {
+ next = $(this.$menu.find('li')[0])
+ }
+
+ next.addClass('active')
+ }
+
+ , prev: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , prev = active.prev()
+
+ if (!prev.length) {
+ prev = this.$menu.find('li').last()
+ }
+
+ prev.addClass('active')
+ }
+
+ , listen: function () {
+ this.$element
+ .on('focus', $.proxy(this.focus, this))
+ .on('blur', $.proxy(this.blur, this))
+ .on('keypress', $.proxy(this.keypress, this))
+ .on('keyup', $.proxy(this.keyup, this))
+
+ if (this.eventSupported('keydown')) {
+ this.$element.on('keydown', $.proxy(this.keydown, this))
+ }
+
+ this.$menu
+ .on('click', $.proxy(this.click, this))
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+ .on('mouseleave', 'li', $.proxy(this.mouseleave, this))
+ }
+
+ , eventSupported: function(eventName) {
+ var isSupported = eventName in this.$element
+ if (!isSupported) {
+ this.$element.setAttribute(eventName, 'return;')
+ isSupported = typeof this.$element[eventName] === 'function'
+ }
+ return isSupported
+ }
+
+ , move: function (e) {
+ if (!this.shown) return
+
+ switch(e.keyCode) {
+ case 9: // tab
+ case 13: // enter
+ case 27: // escape
+ e.preventDefault()
+ break
+
+ case 38: // up arrow
+ e.preventDefault()
+ this.prev()
+ break
+
+ case 40: // down arrow
+ e.preventDefault()
+ this.next()
+ break
+ }
+
+ e.stopPropagation()
+ }
+
+ , keydown: function (e) {
+ this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
+ this.move(e)
+ }
+
+ , keypress: function (e) {
+ if (this.suppressKeyPressRepeat) return
+ this.move(e)
+ }
+
+ , keyup: function (e) {
+ switch(e.keyCode) {
+ case 40: // down arrow
+ case 38: // up arrow
+ case 16: // shift
+ case 17: // ctrl
+ case 18: // alt
+ break
+
+ case 9: // tab
+ case 13: // enter
+ if (!this.shown) return
+ this.select()
+ break
+
+ case 27: // escape
+ if (!this.shown) return
+ this.hide()
+ break
+
+ default:
+ this.lookup()
+ }
+
+ e.stopPropagation()
+ e.preventDefault()
+ }
+
+ , focus: function (e) {
+ this.focused = true
+ }
+
+ , blur: function (e) {
+ this.focused = false
+ if (!this.mousedover && this.shown) this.hide()
+ }
+
+ , click: function (e) {
+ e.stopPropagation()
+ e.preventDefault()
+ this.select()
+ this.$element.focus()
+ }
+
+ , mouseenter: function (e) {
+ this.mousedover = true
+ this.$menu.find('.active').removeClass('active')
+ $(e.currentTarget).addClass('active')
+ }
+
+ , mouseleave: function (e) {
+ this.mousedover = false
+ if (!this.focused && this.shown) this.hide()
+ }
+
+ }
+
+
+ /* TYPEAHEAD PLUGIN DEFINITION
+ * =========================== */
+
+ var old = $.fn.typeahead
+
+ $.fn.typeahead = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('typeahead')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.typeahead.defaults = {
+ source: []
+ , items: 8
+ , menu: ''
+ , item: ''
+ , minLength: 1
+ }
+
+ $.fn.typeahead.Constructor = Typeahead
+
+
+ /* TYPEAHEAD NO CONFLICT
+ * =================== */
+
+ $.fn.typeahead.noConflict = function () {
+ $.fn.typeahead = old
+ return this
+ }
+
+
+ /* TYPEAHEAD DATA-API
+ * ================== */
+
+ $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+ var $this = $(this)
+ if ($this.data('typeahead')) return
+ $this.typeahead($this.data())
+ })
+
+}(window.jQuery);
diff --git a/javascripts/_crisp-scripts.js b/javascripts/_crisp-scripts.js
new file mode 100644
index 0000000..17f6a76
--- /dev/null
+++ b/javascripts/_crisp-scripts.js
@@ -0,0 +1,102 @@
+
+/*================================================================*/
+/* TRIGGER EQUAL COLUMNS AT 767 px
+/*================================================================*/
+$(window).load(function(){
+if (document.documentElement.clientWidth > 767) { //if client width is greater than 767px load equal columns
+
+(function($) {
+
+ $.fn.eqHeights = function() {
+
+ var el = $(this);
+ if (el.length > 0 && !el.data('eqHeights')) {
+ $(window).bind('resize.eqHeights', function() {
+ el.eqHeights();
+ });
+ el.data('eqHeights', true);
+ }
+ return el.each(function() {
+ var curHighest = 0;
+ $(this).children().each(function() {
+ var el = $(this),
+ elHeight = el.height('auto').height();
+ if (elHeight > curHighest) {
+ curHighest = elHeight;
+ }
+ }).height(curHighest);
+ });
+ };
+
+ $('#equalHeights,#equalHeightsA,#equalHeightsB,#equalHeightsC,#equalHeightsD,#equalHeightsLayout').eqHeights(); /*one time per page unless you make another id to add here */
+
+}(jQuery));
+} // end if
+}); // end windowload
+
+
+/*================================================================*/
+/* BACK TO TOP
+/*================================================================*/
+$(document).ready(function(){
+
+if ( navigator.userAgent.indexOf('iPad','iPhone','iPod') == -1 )
+ {
+ // hide .backToTop first
+ $(".backToTop").hide();
+ $(window).scroll(function(){
+ if ($(this).scrollTop() > 100) {
+ $('.backToTop').fadeIn();
+ } else {
+ $('.backToTop').fadeOut();
+ }
+ });
+
+ $('.backToTop').click(function(){
+ $("html, body").animate({ scrollTop: 0 }, 800);
+ return false;
+ });
+
+ } // end if NOT
+
+var deviceAgent = navigator.userAgent.toLowerCase();
+var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
+if (agentID) {
+
+ $('.backToTop').css({"position":"relative","clear":"both","margin":"0 auto","width":"100%","right":"auto","bottom":"auto"});
+ $('.backToTop a').css({"width":"100%"});
+
+}// end IS ipad/iphone/ipod
+
+});
+
+/*================================================================*/
+/* ROTATING TESTIMONIALS
+/*================================================================*/
+ $(document).ready( function() {
+ $('.rotating-testimonials').easytabs({
+ animationSpeed: 400,
+ updateHash: false,
+ cycle: 5000
+});
+});
+
+/*================================================================*/
+/* SIDE BAR TABS
+/*================================================================*/
+ $(document).ready( function() {
+ $('.sidebar-tabs').easytabs({
+ transitionIn: 'slideDown',
+ updateHash: false
+});
+});
+
+/*================================================================*/
+/* CONTENT TABS
+/*================================================================*/
+ $(document).ready( function() {
+ $('.content-tabs').easytabs({
+ transitionIn: 'slideDown',
+ updateHash: false
+});
+});
diff --git a/javascripts/_jbossorg-misc.js b/javascripts/_jbossorg-misc.js
new file mode 100644
index 0000000..8a24624
--- /dev/null
+++ b/javascripts/_jbossorg-misc.js
@@ -0,0 +1,130 @@
+// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
+// IT'S ALL JUST JUNK FOR OUR DOCS!
+// ++++++++++++++++++++++++++++++++++++++++++
+
+!function ($) {
+ $(function(){
+ var $window = $(window)
+
+ // Disable certain links in docs
+ $('section [href^=#]').click(function (e) { e.preventDefault() })
+
+ // side bar
+ $('.bs-docs-sidenav').affix({
+ offset: {
+ top: function () { return $window.width() <= 980 ? 290 : 210 },
+ bottom: 270
+ }
+ })
+
+ // make code pretty
+ window.prettyPrint && prettyPrint()
+
+ // add-ons
+ $('.add-on :checkbox').on('click', function () {
+ var $this = $(this),
+ method = $this.attr('checked') ? 'addClass' : 'removeClass'
+ $(this).parents('.add-on')[method]('active')
+ })
+
+ // add tipsies to grid for scaffolding
+ if ($('#gridSystem').length) {
+ $('#gridSystem').tooltip({
+ selector: '.show-grid > div',
+ title: function () { return $(this).width() + 'px' }
+ })
+ }
+
+ // tooltip demo
+ $('.tooltip-demo').tooltip({
+ selector: "a[rel=tooltip]"
+ })
+
+ $('.tooltip-test').tooltip()
+ $('.popover-test').popover()
+
+ // popover demo
+ $("a[rel=popover]").popover().click(function(e) {
+ e.preventDefault()
+ })
+
+ // button state demo
+ $('#fat-btn').click(function () {
+ var btn = $(this)
+ btn.button('loading')
+ setTimeout(function () { btn.button('reset') }, 3000)
+ })
+
+ // carousel demo
+ $('#myCarousel').carousel()
+
+ // javascript build logic
+ var inputsComponent = $("#components.download input"),
+ inputsPlugin = $("#plugins.download input"),
+ inputsVariables = $("#variables.download input")
+
+ // toggle all plugin checkboxes
+ $('#components.download .toggle-all').on('click', function (e) {
+ e.preventDefault()
+ inputsComponent.attr('checked', !inputsComponent.is(':checked'))
+ })
+
+ $('#plugins.download .toggle-all').on('click', function (e) {
+ e.preventDefault()
+ inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
+ })
+
+ $('#variables.download .toggle-all').on('click', function (e) {
+ e.preventDefault()
+ inputsVariables.val('')
+ })
+
+ // request built javascript
+ $('.download-btn .btn').on('click', function () {
+ var css = $("#components.download input:checked").map(function () { return this.value }).toArray(),
+ js = $("#plugins.download input:checked").map(function () { return this.value }).toArray(),
+ vars = {},
+ img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
+
+ $("#variables.download input").each(function () {
+ $(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
+ })
+
+ $.ajax({
+ type: 'POST',
+ url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com',
+ dataType: 'jsonpi',
+ params: {
+ js: js,
+ css: css,
+ vars: vars,
+ img: img
+ }
+ })
+ })
+ })
+
+ // Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
+ $.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
+ var url = opts.url;
+
+ return {
+ send: function(_, completeCallback) {
+ var name = 'jQuery_iframe_' + jQuery.now(),
+ iframe,
+ form
+
+ iframe = $('