Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: judy/makespace
base: 32e99df2f1
...
head fork: judy/makespace
compare: eae6f0a464
Checking mergeability… Don't worry, you can still create the pull request.
  • 15 commits
  • 112 files changed
  • 0 commit comments
  • 1 contributor
Showing with 19,346 additions and 3 deletions.
  1. +37 −1 .gitignore
  2. +23 −0 .powenv
  3. +1 −0  .rspec
  4. +1 −0  .ruby-version
  5. +50 −0 Gemfile
  6. +167 −0 Gemfile.lock
  7. +2 −2 README.md
  8. +28 −0 README.rdoc
  9. +6 −0 Rakefile
  10. 0  app/assets/images/.keep
  11. BIN  app/assets/images/header-logo.png
  12. +27 −0 app/assets/javascripts/application.js
  13. +1 −0  app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
  14. +13 −0 app/assets/stylesheets/application.css
  15. +1 −0  app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css
  16. +5 −0 app/controllers/application_controller.rb
  17. 0  app/controllers/concerns/.keep
  18. +2 −0  app/helpers/application_helper.rb
  19. +5 −0 app/helpers/cms_helper.rb
  20. 0  app/mailers/.keep
  21. 0  app/models/.keep
  22. 0  app/models/concerns/.keep
  23. +21 −0 app/views/layouts/application.html.haml
  24. +99 −0 app/views/shared/_footer.html.haml
  25. +16 −0 app/views/shared/_navbar.html.haml
  26. +3 −0  bin/bundle
  27. +4 −0 bin/rails
  28. +4 −0 bin/rake
  29. +4 −0 config.ru
  30. +23 −0 config/application.rb
  31. +4 −0 config/boot.rb
  32. +60 −0 config/database.yml.sample
  33. +5 −0 config/environment.rb
  34. +29 −0 config/environments/development.rb
  35. +80 −0 config/environments/production.rb
  36. +36 −0 config/environments/test.rb
  37. +7 −0 config/initializers/backtrace_silencers.rb
  38. +108 −0 config/initializers/comfortable_mexican_sofa.rb
  39. +4 −0 config/initializers/filter_parameter_logging.rb
  40. +16 −0 config/initializers/inflections.rb
  41. +5 −0 config/initializers/mime_types.rb
  42. +12 −0 config/initializers/secret_token.rb
  43. +3 −0  config/initializers/session_store.rb
  44. +14 −0 config/initializers/wrap_parameters.rb
  45. +23 −0 config/locales/en.yml
  46. +6 −0 config/routes.rb
  47. +1 −0  db/cms_fixtures/sample-site/categories/files.yml
  48. +1 −0  db/cms_fixtures/sample-site/categories/pages.yml
  49. +1 −0  db/cms_fixtures/sample-site/categories/snippets.yml
  50. +5 −0 db/cms_fixtures/sample-site/files/_sample.jpg.yml
  51. BIN  db/cms_fixtures/sample-site/files/sample.jpg
  52. +1 −0  db/cms_fixtures/sample-site/layouts/default/attributes.yml
  53. +5 −0 db/cms_fixtures/sample-site/layouts/default/content.html
  54. +1 −0  db/cms_fixtures/sample-site/layouts/default/javascript.js
  55. +2 −0  db/cms_fixtures/sample-site/layouts/default/nested/attributes.yml
  56. +2 −0  db/cms_fixtures/sample-site/layouts/default/nested/content.html
  57. +1 −0  db/cms_fixtures/sample-site/layouts/default/nested/javascript.js
  58. +1 −0  db/cms_fixtures/sample-site/layouts/default/nested/stylesheet.css
  59. +1 −0  db/cms_fixtures/sample-site/layouts/default/stylesheet.css
  60. +6 −0 db/cms_fixtures/sample-site/pages/index/attributes.yml
  61. +3 −0  db/cms_fixtures/sample-site/pages/index/child/attributes.yml
  62. +1 −0  db/cms_fixtures/sample-site/pages/index/child/left.html
  63. +1 −0  db/cms_fixtures/sample-site/pages/index/child/right.html
  64. +2 −0  db/cms_fixtures/sample-site/pages/index/content.html
  65. +4 −0 db/cms_fixtures/sample-site/snippets/default/attributes.yml
  66. +1 −0  db/cms_fixtures/sample-site/snippets/default/content.html
  67. +138 −0 db/migrate/20140127124740_create_cms.rb
  68. +136 −0 db/schema.rb
  69. +7 −0 db/seeds.rb
  70. 0  lib/assets/.keep
  71. 0  lib/tasks/.keep
  72. 0  log/.keep
  73. +58 −0 public/404.html
  74. +58 −0 public/422.html
  75. +57 −0 public/500.html
  76. 0  public/favicon.ico
  77. +5 −0 public/robots.txt
  78. BIN  vendor/assets/fonts/FontAwesome.otf
  79. BIN  vendor/assets/fonts/fontawesome-webfont.eot
  80. +399 −0 vendor/assets/fonts/fontawesome-webfont.svg
  81. BIN  vendor/assets/fonts/fontawesome-webfont.ttf
  82. BIN  vendor/assets/fonts/fontawesome-webfont.woff
  83. 0  vendor/assets/javascripts/.keep
  84. +2,280 −0 vendor/assets/javascripts/bootstrap.js
  85. +6 −0 vendor/assets/javascripts/bootstrap.min.js
  86. +7 −0 vendor/assets/javascripts/jquery.colorbox-min.js
  87. +818 −0 vendor/assets/javascripts/jquery.imagesloaded.js
  88. +12 −0 vendor/assets/javascripts/jquery.wookmark.min.js
  89. +88 −0 vendor/assets/javascripts/main.js
  90. +183 −0 vendor/assets/javascripts/placeholder.js
  91. +24 −0 vendor/assets/javascripts/plugins.js
  92. +6 −0 vendor/assets/javascripts/respond.min.js
  93. +6 −0 vendor/assets/javascripts/vendor/jquery-1.10.2.min.js
  94. +4 −0 vendor/assets/javascripts/vendor/modernizr-2.6.2.min.js
  95. 0  vendor/assets/stylesheets/.keep
  96. +786 −0 vendor/assets/stylesheets/bootstrap-responsive.min.sass
  97. +786 −0 vendor/assets/stylesheets/bootstrap-responsive.sass
  98. +4,620 −0 vendor/assets/stylesheets/bootstrap.min.sass
  99. +4,633 −0 vendor/assets/stylesheets/bootstrap.sass
  100. +165 −0 vendor/assets/stylesheets/colorbox.sass
  101. +14 −0 vendor/assets/stylesheets/colors.sass
  102. +80 −0 vendor/assets/stylesheets/filter.sass
  103. +1,370 −0 vendor/assets/stylesheets/font-awesome.min.sass
  104. BIN  vendor/assets/stylesheets/img/bg-overlay.png
  105. BIN  vendor/assets/stylesheets/img/browser-header.png
  106. BIN  vendor/assets/stylesheets/img/controls.png
  107. BIN  vendor/assets/stylesheets/img/featured.png
  108. BIN  vendor/assets/stylesheets/img/glyphicons-halflings-white.png
  109. BIN  vendor/assets/stylesheets/img/glyphicons-halflings.png
  110. BIN  vendor/assets/stylesheets/img/ie-black-bg.png
  111. BIN  vendor/assets/stylesheets/img/loading.gif
  112. +1,605 −0 vendor/assets/stylesheets/main.sass
View
38 .gitignore
@@ -1,3 +1,40 @@
+# App-generated stuff
+.bundle
+.sass-cache/
+config/database.yml
+db/*.sqlite3
+log/
+tmp/
+solr/data/
+solr/pids/
+logfile
+public/system
+config/initializers/secret_token.rb
+
+# Doc generated stuff
+.yardoc
+doc/app/
+doc/apipie_examples.yml
+doc/apidoc*
+
+# Test generated stuff
+coverage/
+rails_best_practices_output.html
+spec/reports/
+
+# Vagrant stuff
+.vagrant
+Vagrantfile
+
+# OS stuff
+.DS_Store
+.env
+.envrc
+
+# IDE stuff
+.project
+
+# Automatically generated by Github
*.rbc
*.sassc
.sass-cache
@@ -16,4 +53,3 @@ capybara-*.html
rerun.txt
pickle-email-*.html
.project
-config/initializers/secret_token.rb
View
23 .powenv
@@ -0,0 +1,23 @@
+# detect `$rvm_path`
+if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
+ then rvm_path="${HOME:-}/.rvm"
+fi
+if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
+ then rvm_path="/usr/local/rvm"
+fi
+
+# load environment of current project ruby
+if
+ [ -n "${rvm_path:-}" ] &&
+ [ -x "${rvm_path:-}/bin/rvm" ] &&
+ rvm_project_environment=`"${rvm_path:-}/bin/rvm" . do rvm env --path 2>/dev/null` &&
+ [ -n "${rvm_project_environment:-}" ] &&
+ [ -s "${rvm_project_environment:-}" ]
+then
+ echo "RVM loading: ${rvm_project_environment:-}"
+ \. "${rvm_project_environment:-}"
+else
+ echo "RVM project not found at: $PWD"
+fi
+
+export $(cat .env)
View
1  .rspec
@@ -0,0 +1 @@
+--color
View
1  .ruby-version
@@ -0,0 +1 @@
+2.0.0-p247
View
50 Gemfile
@@ -0,0 +1,50 @@
+source 'https://rubygems.org'
+
+# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
+gem 'rails', '4.0.0'
+
+# Use postgresql as the database for Active Record
+gem 'pg'
+
+# Use SCSS for stylesheets
+gem 'sass-rails', '~> 4.0.0'
+
+# Use Uglifier as compressor for JavaScript assets
+gem 'uglifier', '>= 1.3.0'
+
+# Use CoffeeScript for .js.coffee assets and views
+gem 'coffee-rails', '~> 4.0.0'
+
+# See https://github.com/sstephenson/execjs#readme for more supported runtimes
+# gem 'therubyracer', platforms: :ruby
+
+# Use jquery as the JavaScript library
+gem 'jquery-rails'
+
+# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
+gem 'turbolinks'
+gem 'jquery-turbolinks'
+
+# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
+gem 'jbuilder', '~> 1.2'
+
+gem 'git'
+
+gem 'comfortable_mexican_sofa'
+
+group :doc do
+ # bundle exec rake doc:rails generates the API under doc/api.
+ gem 'sdoc', require: false
+end
+
+# Use ActiveModel has_secure_password
+# gem 'bcrypt-ruby', '~> 3.0.0'
+
+# Use unicorn as the app server
+# gem 'unicorn'
+
+# Use Capistrano for deployment
+# gem 'capistrano', group: :development
+
+# Use debugger
+# gem 'debugger', group: [:development, :test]
View
167 Gemfile.lock
@@ -0,0 +1,167 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ actionmailer (4.0.0)
+ actionpack (= 4.0.0)
+ mail (~> 2.5.3)
+ actionpack (4.0.0)
+ activesupport (= 4.0.0)
+ builder (~> 3.1.0)
+ erubis (~> 2.7.0)
+ rack (~> 1.5.2)
+ rack-test (~> 0.6.2)
+ active_link_to (1.0.1)
+ actionpack
+ activemodel (4.0.0)
+ activesupport (= 4.0.0)
+ builder (~> 3.1.0)
+ activerecord (4.0.0)
+ activemodel (= 4.0.0)
+ activerecord-deprecated_finders (~> 1.0.2)
+ activesupport (= 4.0.0)
+ arel (~> 4.0.0)
+ activerecord-deprecated_finders (1.0.3)
+ activesupport (4.0.0)
+ i18n (~> 0.6, >= 0.6.4)
+ minitest (~> 4.2)
+ multi_json (~> 1.3)
+ thread_safe (~> 0.1)
+ tzinfo (~> 0.3.37)
+ arel (4.0.1)
+ atomic (1.1.14)
+ builder (3.1.4)
+ climate_control (0.0.3)
+ activesupport (>= 3.0)
+ cocaine (0.5.3)
+ climate_control (>= 0.0.3, < 1.0)
+ codemirror-rails (3.16)
+ railties (>= 3.0, < 5)
+ coffee-rails (4.0.1)
+ coffee-script (>= 2.2.0)
+ railties (>= 4.0.0, < 5.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.6.3)
+ comfortable_mexican_sofa (1.11.1)
+ active_link_to (>= 1.0.0)
+ codemirror-rails (>= 3.0.0)
+ coffee-rails (>= 3.1.0)
+ formatted_form (>= 2.1.0)
+ haml-rails (>= 0.3.0)
+ jquery-rails (>= 3.0.0)
+ jquery-ui-rails (>= 4.0.0)
+ kaminari (>= 0.14.0)
+ kramdown (>= 1.0.0)
+ paperclip (>= 3.4.0)
+ rails (~> 4.0)
+ sass-rails (>= 3.1.0)
+ erubis (2.7.0)
+ execjs (2.0.2)
+ formatted_form (2.1.2)
+ rails (>= 3.1)
+ git (1.2.6)
+ haml (4.0.4)
+ tilt
+ haml-rails (0.5.1)
+ actionpack (~> 4.0.0)
+ activesupport (~> 4.0.0)
+ haml (>= 3.1, < 5.0)
+ railties (~> 4.0.0)
+ hike (1.2.3)
+ i18n (0.6.9)
+ jbuilder (1.5.2)
+ activesupport (>= 3.0.0)
+ multi_json (>= 1.2.0)
+ jquery-rails (3.0.4)
+ railties (>= 3.0, < 5.0)
+ thor (>= 0.14, < 2.0)
+ jquery-turbolinks (2.0.1)
+ railties (>= 3.1.0)
+ turbolinks
+ jquery-ui-rails (4.1.1)
+ railties (>= 3.1.0)
+ json (1.8.1)
+ kaminari (0.15.0)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ kramdown (1.3.0)
+ mail (2.5.4)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.25)
+ minitest (4.7.5)
+ multi_json (1.8.2)
+ paperclip (3.5.2)
+ activemodel (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ cocaine (~> 0.5.3)
+ mime-types
+ pg (0.17.0)
+ polyglot (0.3.3)
+ rack (1.5.2)
+ rack-test (0.6.2)
+ rack (>= 1.0)
+ rails (4.0.0)
+ actionmailer (= 4.0.0)
+ actionpack (= 4.0.0)
+ activerecord (= 4.0.0)
+ activesupport (= 4.0.0)
+ bundler (>= 1.3.0, < 2.0)
+ railties (= 4.0.0)
+ sprockets-rails (~> 2.0.0)
+ railties (4.0.0)
+ actionpack (= 4.0.0)
+ activesupport (= 4.0.0)
+ rake (>= 0.8.7)
+ thor (>= 0.18.1, < 2.0)
+ rake (10.1.0)
+ rdoc (3.12.2)
+ json (~> 1.4)
+ sass (3.2.13)
+ sass-rails (4.0.1)
+ railties (>= 4.0.0, < 5.0)
+ sass (>= 3.1.10)
+ sprockets-rails (~> 2.0.0)
+ sdoc (0.3.20)
+ json (>= 1.1.3)
+ rdoc (~> 3.10)
+ sprockets (2.10.1)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sprockets-rails (2.0.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ sprockets (~> 2.8)
+ thor (0.18.1)
+ thread_safe (0.1.3)
+ atomic
+ tilt (1.4.1)
+ treetop (1.4.15)
+ polyglot
+ polyglot (>= 0.3.1)
+ turbolinks (2.1.0)
+ coffee-rails
+ tzinfo (0.3.38)
+ uglifier (2.4.0)
+ execjs (>= 0.3.0)
+ json (>= 1.8.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ coffee-rails (~> 4.0.0)
+ comfortable_mexican_sofa
+ git
+ jbuilder (~> 1.2)
+ jquery-rails
+ jquery-turbolinks
+ pg
+ rails (= 4.0.0)
+ sass-rails (~> 4.0.0)
+ sdoc
+ turbolinks
+ uglifier (>= 1.3.0)
View
4 README.md
@@ -1,4 +1,4 @@
-makespace
+Makespace.io
=========
-Website for the Make Space
+This is a website for the Make Space. We're using Comfortable Mexican Sofa on top of Rails 4 and Postgres. The documentation for those projects will be more than enough to get this project running locally.
View
28 README.rdoc
@@ -0,0 +1,28 @@
+== README
+
+This README would normally document whatever steps are necessary to get the
+application up and running.
+
+Things you may want to cover:
+
+* Ruby version
+
+* System dependencies
+
+* Configuration
+
+* Database creation
+
+* Database initialization
+
+* How to run the test suite
+
+* Services (job queues, cache servers, search engines, etc.)
+
+* Deployment instructions
+
+* ...
+
+
+Please feel free to use a different markup language if you do not plan to run
+<tt>rake doc:app</tt>.
View
6 Rakefile
@@ -0,0 +1,6 @@
+# Add your own tasks in files placed in lib/tasks ending in .rake,
+# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
+
+require File.expand_path('../config/application', __FILE__)
+
+Makespace::Application.load_tasks
View
0  app/assets/images/.keep
No changes.
View
BIN  app/assets/images/header-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
27 app/assets/javascripts/application.js
@@ -0,0 +1,27 @@
+// This is a manifest file that'll be compiled into application.js, which will include all the files
+// listed below.
+//
+// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
+// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
+//
+// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
+// compiled file.
+//
+// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
+// about supported directives.
+//
+//= require jquery
+//= require jquery.turbolinks
+//= require jquery_ujs
+//= require bootstrap.min
+//= require jquery.colorbox-min
+//= require jquery.imagesloaded
+//= require jquery.wookmark.min
+//= require placeholder
+//= require plugins
+//= require respond.min
+//= require main
+//
+//= require turbolinks
+
+//= require_tree .
View
1  app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
@@ -0,0 +1 @@
+// Overwrite this file in your application /app/assets/javascripts/comfortable_mexican_sofa/admin/application.js
View
13 app/assets/stylesheets/application.css
@@ -0,0 +1,13 @@
+/*
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
+ * listed below.
+ *
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
+ *
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
+ * compiled file, but it's generally better to create a new file per style scope.
+ *
+ *= require_self
+ *= require_tree .
+ */
View
1  app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css
@@ -0,0 +1 @@
+/* Overwrite this file in your application /app/assets/stylesheets/comfortable_mexican_sofa/admin/application.css */
View
5 app/controllers/application_controller.rb
@@ -0,0 +1,5 @@
+class ApplicationController < ActionController::Base
+ # Prevent CSRF attacks by raising an exception.
+ # For APIs, you may want to use :null_session instead.
+ protect_from_forgery with: :exception
+end
View
0  app/controllers/concerns/.keep
No changes.
View
2  app/helpers/application_helper.rb
@@ -0,0 +1,2 @@
+module ApplicationHelper
+end
View
5 app/helpers/cms_helper.rb
@@ -0,0 +1,5 @@
+module CmsHelper
+ def current_page?(page)
+ @cms_page == page
+ end
+end
View
0  app/mailers/.keep
No changes.
View
0  app/models/.keep
No changes.
View
0  app/models/concerns/.keep
No changes.
View
21 app/views/layouts/application.html.haml
@@ -0,0 +1,21 @@
+!!!
+%html.no-js
+ %head
+ %title MAKEspace
+ %meta{charset: "utf-8"}/
+ %meta{content: "IE=edge", "http-equiv" => "X-UA-Compatible"}/
+ %meta{content: "A hackerspace/makerspace located in State College, PA.", name: "description"}/
+ %meta{content: "width=device-width, initial-scale=1", name: "viewport"}/
+ = stylesheet_link_tag "bootstrap.min", media: "screen", "data-turbolinks-track" => true
+ = stylesheet_link_tag "bootstrap-responsive.min", media: "screen", "data-turbolinks-track" => true
+ = stylesheet_link_tag "colorbox", media: "all", "data-turbolinks-track" => true
+ = stylesheet_link_tag "http://fonts.googleapis.com/css?family=Open+Sans:400,800,700,300,600,400italic&subset=latin,cyrillic"
+ = stylesheet_link_tag "main", media: "all", "data-turbolinks-track" => true
+ = stylesheet_link_tag "font-awesome.min", media: "all", "data-turbolinks-track" => true
+ = stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
+ = csrf_meta_tags
+ %body
+ = render "shared/navbar"
+ = yield
+ = render "shared/footer"
+ = javascript_include_tag "application", "data-turbolinks-track" => true
View
99 app/views/shared/_footer.html.haml
@@ -0,0 +1,99 @@
+%footer
+ .light-bg
+ .container
+ .row-fluid
+ .span3
+ %h4 Get in touch
+ .info-block
+ %article.clearfix
+ %i.icon-globe
+ %address
+ 141 South Fraser St.
+ %br/
+ State College, Pennsylvania
+ %br/
+ 16801
+ %article.clearfix
+ %i.icon-phone
+ %p 814.689.3103
+ %article.clearfix
+ %i.icon-envelope
+ %p
+ %a{href: "mailto:root@makespace.io"} root@makespace.io
+ .span3
+ %h4 Follow us
+ .social
+ %ul.unstyled.clearfix
+ %li
+ %a{href: "https://twitter.com/TheMakeSpaceSC", target: "_blank", title: ""}
+ %i.icon-twitter
+ %li
+ %a{href: "https://www.facebook.com/hackvalley", target: "_blank", title: ""}
+ %i.icon-facebook
+ -# %li
+ -# %a{href: "#", target: "_blank", title: ""}
+ -# %i.icon-github
+ -# %li
+ -# %a{href: "#", target: "_blank", title: ""}
+ -# %i.icon-linkedin
+ -# %li
+ -# %a{href: "#", target: "_blank", title: ""}
+ -# %i.icon-pinterest
+ %li
+ %a{href: "https://plus.google.com/116879917434169348901/about?gl=US&hl=en-US", target: "_blank", title: ""}
+ %i.icon-google-plus
+ %li
+ %a{href: "http://hackerspaces.org/wiki/The_Make_Space", target: "_blank", title: "Our location on hackerspaces.org"}
+ %i.icon-gear
+ -# %li
+ -# %a{href: "#", target: "_blank", title: ""}
+ -# %i.icon-rss
+ .span3
+ %h4 Notable events
+ %ul.link-list
+ %li
+ %a{href: "#"} Dynamically created list of events coming soonish!
+ .span3
+ %h4 Photostream
+ %p We&rsquo;re trying to remember to take pictures more frequently. We'll have stuff here at some point&hellip;
+ -# %ul.footer-thumbnails.unstyled.clearfix
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ -# %li.stream
+ -# %a{href: "#"}
+ -# %img{alt: "", src: "http://dummyimage.com/45x45/243135/fff"}/
+ .copyright-block.dark-bg.clearfix
+ .container
+ .row
+ .span1
+ %a{href: "http://creativecommons.org/licenses/by-sa/4.0/", rel: "license"}
+ %img{alt: "Creative Commons License", src: "http://i.creativecommons.org/l/by-sa/4.0/88x31.png", style: "border-width:0"}/
+ .span8
+ %p.pull-left
+ This work is licensed under a
+ %a{href: "http://creativecommons.org/licenses/by-sa/4.0/", rel: "license"} Creative Commons Attribution-ShareAlike 4.0 International License.
+ Except where we stole content without permission. Which we might have done by accident. Copyright is tricky. ;p
+
+
+ .span3
+ .pull-right
+ %p
View
16 app/views/shared/_navbar.html.haml
@@ -0,0 +1,16 @@
+.navbar.navbar-fixed-top
+ .navbar-inner
+ .container
+ %a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
+ %span.icon-bar
+ %span.icon-bar
+ %span.icon-bar
+ = link_to @cms_site.pages.root.full_path, class: "brand goTop" do
+ = image_tag "header-logo.png"
+ .nav-collapse.pull-right
+ %ul.nav
+ %li{class: ("active" if current_page?(@cms_site.pages.root))}
+ = link_to @cms_site.pages.root.label.upcase, @cms_site.pages.root.full_path
+ - @cms_site.pages.root.children.published.each do |page|
+ %li{class: ("active" if current_page?(page))}
+ = link_to page.label.upcase, page.full_path
View
3  bin/bundle
@@ -0,0 +1,3 @@
+#!/usr/bin/env ruby
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+load Gem.bin_path('bundler', 'bundle')
View
4 bin/rails
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+APP_PATH = File.expand_path('../../config/application', __FILE__)
+require_relative '../config/boot'
+require 'rails/commands'
View
4 bin/rake
@@ -0,0 +1,4 @@
+#!/usr/bin/env ruby
+require_relative '../config/boot'
+require 'rake'
+Rake.application.run
View
4 config.ru
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run Rails.application
View
23 config/application.rb
@@ -0,0 +1,23 @@
+require File.expand_path('../boot', __FILE__)
+
+require 'rails/all'
+
+# Require the gems listed in Gemfile, including any gems
+# you've limited to :test, :development, or :production.
+Bundler.require(:default, Rails.env)
+
+module Makespace
+ class Application < Rails::Application
+ # Settings in config/environments/* take precedence over those specified here.
+ # Application configuration should go into files in config/initializers
+ # -- all .rb files in that directory are automatically loaded.
+
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
+ # config.time_zone = 'Central Time (US & Canada)'
+
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
+ # config.i18n.default_locale = :de
+ end
+end
View
4 config/boot.rb
@@ -0,0 +1,4 @@
+# Set up gems listed in the Gemfile.
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
+
+require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
View
60 config/database.yml.sample
@@ -0,0 +1,60 @@
+# PostgreSQL. Versions 8.2 and up are supported.
+#
+# Install the pg driver:
+# gem install pg
+# On OS X with Homebrew:
+# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
+# On OS X with MacPorts:
+# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
+# On Windows:
+# gem install pg
+# Choose the win32 build.
+# Install PostgreSQL and put its /bin directory on your path.
+#
+# Configure Using Gemfile
+# gem 'pg'
+#
+development:
+ adapter: postgresql
+ encoding: unicode
+ database: makespace_development
+ pool: 5
+ username: makespace
+ password:
+
+ # Connect on a TCP socket. Omitted by default since the client uses a
+ # domain socket that doesn't need configuration. Windows does not have
+ # domain sockets, so uncomment these lines.
+ #host: localhost
+
+ # The TCP port the server listens on. Defaults to 5432.
+ # If your server runs on a different port number, change accordingly.
+ #port: 5432
+
+ # Schema search path. The server defaults to $user,public
+ #schema_search_path: myapp,sharedapp,public
+
+ # Minimum log levels, in increasing order:
+ # debug5, debug4, debug3, debug2, debug1,
+ # log, notice, warning, error, fatal, and panic
+ # Defaults to warning.
+ #min_messages: notice
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ adapter: postgresql
+ encoding: unicode
+ database: makespace_test
+ pool: 5
+ username: makespace
+ password:
+
+production:
+ adapter: postgresql
+ encoding: unicode
+ database: makespace_production
+ pool: 5
+ username: makespace
+ password:
View
5 config/environment.rb
@@ -0,0 +1,5 @@
+# Load the Rails application.
+require File.expand_path('../application', __FILE__)
+
+# Initialize the Rails application.
+Makespace::Application.initialize!
View
29 config/environments/development.rb
@@ -0,0 +1,29 @@
+Makespace::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb.
+
+ # In the development environment your application's code is reloaded on
+ # every request. This slows down response time but is perfect for development
+ # since you don't have to restart the web server when you make code changes.
+ config.cache_classes = false
+
+ # Do not eager load code on boot.
+ config.eager_load = false
+
+ # Show full error reports and disable caching.
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Don't care if the mailer can't send.
+ config.action_mailer.raise_delivery_errors = false
+
+ # Print deprecation notices to the Rails logger.
+ config.active_support.deprecation = :log
+
+ # Raise an error on page load if there are pending migrations
+ config.active_record.migration_error = :page_load
+
+ # Debug mode disables concatenation and preprocessing of assets.
+ # This option may cause significant delays in view rendering with a large
+ # number of complex assets.
+ config.assets.debug = true
+end
View
80 config/environments/production.rb
@@ -0,0 +1,80 @@
+Makespace::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb.
+
+ # Code is not reloaded between requests.
+ config.cache_classes = true
+
+ # Eager load code on boot. This eager loads most of Rails and
+ # your application in memory, allowing both thread web servers
+ # and those relying on copy on write to perform better.
+ # Rake tasks automatically ignore this option for performance.
+ config.eager_load = true
+
+ # Full error reports are disabled and caching is turned on.
+ config.consider_all_requests_local = false
+ config.action_controller.perform_caching = true
+
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
+ # Add `rack-cache` to your Gemfile before enabling this.
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
+ # config.action_dispatch.rack_cache = true
+
+ # Disable Rails's static asset server (Apache or nginx will already do this).
+ config.serve_static_assets = false
+
+ # Compress JavaScripts and CSS.
+ config.assets.js_compressor = :uglifier
+ # config.assets.css_compressor = :sass
+
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
+ config.assets.compile = false
+
+ # Generate digests for assets URLs.
+ config.assets.digest = true
+
+ # Version of your assets, change this if you want to expire all your assets.
+ config.assets.version = '1.0'
+
+ # Specifies the header that your server uses for sending files.
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
+
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
+ # config.force_ssl = true
+
+ # Set to :debug to see everything in the log.
+ config.log_level = :info
+
+ # Prepend all log lines with the following tags.
+ # config.log_tags = [ :subdomain, :uuid ]
+
+ # Use a different logger for distributed setups.
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
+
+ # Use a different cache store in production.
+ # config.cache_store = :mem_cache_store
+
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
+ # config.action_controller.asset_host = "http://assets.example.com"
+
+ # Precompile additional assets.
+ # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
+ # config.assets.precompile += %w( search.js )
+
+ # Ignore bad email addresses and do not raise email delivery errors.
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
+ # config.action_mailer.raise_delivery_errors = false
+
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
+ # the I18n.default_locale when a translation can not be found).
+ config.i18n.fallbacks = true
+
+ # Send deprecation notices to registered listeners.
+ config.active_support.deprecation = :notify
+
+ # Disable automatic flushing of the log to improve performance.
+ # config.autoflush_log = false
+
+ # Use default logging formatter so that PID and timestamp are not suppressed.
+ config.log_formatter = ::Logger::Formatter.new
+end
View
36 config/environments/test.rb
@@ -0,0 +1,36 @@
+Makespace::Application.configure do
+ # Settings specified here will take precedence over those in config/application.rb.
+
+ # The test environment is used exclusively to run your application's
+ # test suite. You never need to work with it otherwise. Remember that
+ # your test database is "scratch space" for the test suite and is wiped
+ # and recreated between test runs. Don't rely on the data there!
+ config.cache_classes = true
+
+ # Do not eager load code on boot. This avoids loading your whole application
+ # just for the purpose of running a single test. If you are using a tool that
+ # preloads Rails for running tests, you may have to set it to true.
+ config.eager_load = false
+
+ # Configure static asset server for tests with Cache-Control for performance.
+ config.serve_static_assets = true
+ config.static_cache_control = "public, max-age=3600"
+
+ # Show full error reports and disable caching.
+ config.consider_all_requests_local = true
+ config.action_controller.perform_caching = false
+
+ # Raise exceptions instead of rendering exception templates.
+ config.action_dispatch.show_exceptions = false
+
+ # Disable request forgery protection in test environment.
+ config.action_controller.allow_forgery_protection = false
+
+ # Tell Action Mailer not to deliver emails to the real world.
+ # The :test delivery method accumulates sent emails in the
+ # ActionMailer::Base.deliveries array.
+ config.action_mailer.delivery_method = :test
+
+ # Print deprecation notices to the stderr.
+ config.active_support.deprecation = :stderr
+end
View
7 config/initializers/backtrace_silencers.rb
@@ -0,0 +1,7 @@
+# Be sure to restart your server when you modify this file.
+
+# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
+# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
+
+# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
+# Rails.backtrace_cleaner.remove_silencers!
View
108 config/initializers/comfortable_mexican_sofa.rb
@@ -0,0 +1,108 @@
+# encoding: utf-8
+
+ComfortableMexicanSofa.configure do |config|
+ # Title of the admin area
+ # config.cms_title = 'ComfortableMexicanSofa CMS Engine'
+
+ # Controller that is inherited from CmsAdmin::BaseController
+ # config.base_controller = 'ApplicationController'
+
+ # Module responsible for authentication. You can replace it with your own.
+ # It simply needs to have #authenticate method. See http_auth.rb for reference.
+ # config.admin_auth = 'ComfortableMexicanSofa::HttpAuth'
+
+ # Module responsible for public authentication. Similar to the above. You also
+ # will have access to @cms_site, @cms_layout, @cms_page so you can use them in
+ # your logic. Default module doesn't do anything.
+ # config.public_auth = 'ComfortableMexicanSofa::DummyAuth'
+
+ # When arriving at /cms-admin you may chose to redirect to arbirtary path,
+ # for example '/cms-admin/users'
+ # config.admin_route_redirect = ''
+
+ # File uploads use Paperclip and can support filesystem or s3 uploads. Override
+ # the upload method and appropriate settings based on Paperclip. For S3 see:
+ # http://rdoc.info/gems/paperclip/2.3.8/Paperclip/Storage/S3, and for
+ # filesystem see: http://rdoc.info/gems/paperclip/2.3.8/Paperclip/Storage/Filesystem
+ # If you are using S3 and HTTPS, pass :s3_protocol => '' to have URLs that use the protocol of the page
+ # config.upload_file_options = {:url => '/system/:class/:id/:attachment/:style/:filename'}
+
+ # Sofa allows you to setup entire site from files. Database is updated with each
+ # request (if necessary). Please note that database entries are destroyed if there's
+ # no corresponding file. Fixtures are disabled by default.
+ # config.enable_fixtures = false
+
+ # Path where fixtures can be located.
+ # config.fixtures_path = File.expand_path('db/cms_fixtures', Rails.root)
+
+ # Importing fixtures into Database
+ # To load fixtures into the database just run this rake task:
+ # local: $ rake comfortable_mexican_sofa:fixtures:import FROM=example.local TO=localhost
+ # Heroku: $ heroku run rake comfortable_mexican_sofa:fixtures:import FROM=example.local TO=yourapp.herokuapp.com
+ # From indicates folder the fixtures are in and to is the Site hostname you have defined in the database.
+
+ # Exporting fixtures into Files
+ # If you need to dump database contents into fixture files run:
+ # local: $ rake comfortable_mexican_sofa:fixtures:export FROM=localhost TO=example.local
+ # Heroku: $ heroku run rake comfortable_mexican_sofa:fixtures:export FROM=yourapp.herokuapp.com TO=example.local
+ # This will create example.local folder and dump all content from example.com Site.
+
+ # Content for Layouts, Pages and Snippets has a revision history. You can revert
+ # a previous version using this system. You can control how many revisions per
+ # object you want to keep. Set it to 0 if you wish to turn this feature off.
+ # config.revisions_limit = 25
+
+ # Locale definitions. If you want to define your own locale merge
+ # {:locale => 'Locale Title'} with this.
+ # config.locales = {:en => 'English', :es => 'Español'}
+
+ # Admin interface will respect the locale of the site being managed. However you can
+ # force it to English by setting this to `:en`
+ # config.admin_locale = nil
+
+ # If you want to keep your CMS tables in a location other than the default database
+ # add a database_config. For example, setting it to 'cms' will look for a cms_#{Rails.env}
+ # definition in your database.yml file
+ # config.database_config = nil
+
+ # A class that is included as a sweeper to admin base controller if it's set
+ # config.admin_cache_sweeper = nil
+
+ # By default you cannot have irb code inside your layouts/pages/snippets.
+ # Generally this is to prevent putting something like this:
+ # <% User.delete_all %> but if you really want to allow it...
+ # config.allow_irb = false
+
+ # Whitelist of all helper methods that can be used via {{cms:helper}} tag. By default
+ # all helpers are allowed except `eval`, `send`, `call` and few others. Empty array
+ # will prevent rendering of all helpers.
+ # config.allowed_helpers = nil
+
+ # Whitelist of partials paths that can be used via {{cms:partial}} tag. All partials
+ # are accessible by default. Empty array will prevent rendering of all partials.
+ # config.allowed_partials = nil
+
+ # Site aliases, if you want to have aliases for your site. Good for harmonizing
+ # production env with dev/testing envs.
+ # e.g. config.hostname_aliases = {'host.com' => 'host.inv', 'host_a.com' => ['host.lvh.me', 'host.dev']}
+ # Default is nil (not used)
+ # config.hostname_aliases = nil
+
+ # Reveal partials that can be overwritten in the admin area.
+ # Default is false.
+ # config.reveal_cms_partials = false
+
+end
+
+# Default credentials for ComfortableMexicanSofa::HttpAuth
+# YOU REALLY WANT TO CHANGE THIS BEFORE PUTTING YOUR SITE LIVE
+ComfortableMexicanSofa::HttpAuth.username = 'username'
+ComfortableMexicanSofa::HttpAuth.password = 'password'
+
+# You can use bcrypt (gem 'bcrypt-ruby') if you want to:
+# require 'bcrypt'
+# ComfortableMexicanSofa::HttpAuth.username = 'username'
+# ComfortableMexicanSofa::HttpAuth.password = BCrypt::Password.new '... bcrypt hash ...'
+#
+# To create a bcrypt hash:
+# BCrypt::Password.create('password').to_s
View
4 config/initializers/filter_parameter_logging.rb
@@ -0,0 +1,4 @@
+# Be sure to restart your server when you modify this file.
+
+# Configure sensitive parameters which will be filtered from the log file.
+Rails.application.config.filter_parameters += [:password]
View
16 config/initializers/inflections.rb
@@ -0,0 +1,16 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new inflection rules using the following format. Inflections
+# are locale specific, and you may define rules for as many different
+# locales as you wish. All of these examples are active by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+# inflect.plural /^(ox)$/i, '\1en'
+# inflect.singular /^(ox)en/i, '\1'
+# inflect.irregular 'person', 'people'
+# inflect.uncountable %w( fish sheep )
+# end
+
+# These inflection rules are supported but not enabled by default:
+# ActiveSupport::Inflector.inflections(:en) do |inflect|
+# inflect.acronym 'RESTful'
+# end
View
5 config/initializers/mime_types.rb
@@ -0,0 +1,5 @@
+# Be sure to restart your server when you modify this file.
+
+# Add new mime types for use in respond_to blocks:
+# Mime::Type.register "text/richtext", :rtf
+# Mime::Type.register_alias "text/html", :iphone
View
12 config/initializers/secret_token.rb
@@ -0,0 +1,12 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key is used for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+# You can use `rake secret` to generate a secure secret key.
+
+# Make sure your secret_key_base is kept private
+# if you're sharing your code publicly.
+Makespace::Application.config.secret_key_base = '3cf3e2c92cbc7d847ffd4ea7d58a6d1690529d54a87ce8bf5bdd82027b847b2073369527eb8c2b43b531cafc120ca5f259542e54ed16b9f364abcbf39e59ba3f'
View
3  config/initializers/session_store.rb
@@ -0,0 +1,3 @@
+# Be sure to restart your server when you modify this file.
+
+Makespace::Application.config.session_store :cookie_store, key: '_makespace_session'
View
14 config/initializers/wrap_parameters.rb
@@ -0,0 +1,14 @@
+# Be sure to restart your server when you modify this file.
+
+# This file contains settings for ActionController::ParamsWrapper which
+# is enabled by default.
+
+# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
+ActiveSupport.on_load(:action_controller) do
+ wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
+end
+
+# To enable root element in JSON for ActiveRecord objects.
+# ActiveSupport.on_load(:active_record) do
+# self.include_root_in_json = true
+# end
View
23 config/locales/en.yml
@@ -0,0 +1,23 @@
+# Files in the config/locales directory are used for internationalization
+# and are automatically loaded by Rails. If you want to use locales other
+# than English, add the necessary files in this directory.
+#
+# To use the locales, use `I18n.t`:
+#
+# I18n.t 'hello'
+#
+# In views, this is aliased to just `t`:
+#
+# <%= t('hello') %>
+#
+# To use a different locale, set it with `I18n.locale`:
+#
+# I18n.locale = :es
+#
+# This would use the information in config/locales/es.yml.
+#
+# To learn more, please read the Rails Internationalization guide
+# available at http://guides.rubyonrails.org/i18n.html.
+
+en:
+ hello: "Hello world"
View
6 config/routes.rb
@@ -0,0 +1,6 @@
+Makespace::Application.routes.draw do
+ comfy_route :cms_admin, :path => '/admin'
+
+ # Make sure this routeset is defined last
+ comfy_route :cms, :path => '/', :sitemap => false
+end
View
1  db/cms_fixtures/sample-site/categories/files.yml
@@ -0,0 +1 @@
+- File Category
View
1  db/cms_fixtures/sample-site/categories/pages.yml
@@ -0,0 +1 @@
+- Page Category
View
1  db/cms_fixtures/sample-site/categories/snippets.yml
@@ -0,0 +1 @@
+- Snippet Category
View
5 db/cms_fixtures/sample-site/files/_sample.jpg.yml
@@ -0,0 +1,5 @@
+label: Fixture File
+description: Fixture Description
+categories:
+ - category_a
+ - category_b
View
BIN  db/cms_fixtures/sample-site/files/sample.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
1  db/cms_fixtures/sample-site/layouts/default/attributes.yml
@@ -0,0 +1 @@
+label: Default Fixture Layout
View
5 db/cms_fixtures/sample-site/layouts/default/content.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ {{ cms:page:content }}
+ </body>
+</html>
View
1  db/cms_fixtures/sample-site/layouts/default/javascript.js
@@ -0,0 +1 @@
+// default js
View
2  db/cms_fixtures/sample-site/layouts/default/nested/attributes.yml
@@ -0,0 +1,2 @@
+label: Default Fixture Nested Layout
+position: 42
View
2  db/cms_fixtures/sample-site/layouts/default/nested/content.html
@@ -0,0 +1,2 @@
+<div class='left'> {{ cms:page:left }} </div>
+<div class='right'> {{ cms:page:right }} </div>
View
1  db/cms_fixtures/sample-site/layouts/default/nested/javascript.js
@@ -0,0 +1 @@
+// nested js
View
1  db/cms_fixtures/sample-site/layouts/default/nested/stylesheet.css
@@ -0,0 +1 @@
+div{float:left}
View
1  db/cms_fixtures/sample-site/layouts/default/stylesheet.css
@@ -0,0 +1 @@
+body{color: red}
View
6 db/cms_fixtures/sample-site/pages/index/attributes.yml
@@ -0,0 +1,6 @@
+label: Home Fixture Page
+layout: default
+target_page: '/child'
+categories:
+ - category_a
+ - category_b
View
3  db/cms_fixtures/sample-site/pages/index/child/attributes.yml
@@ -0,0 +1,3 @@
+label: Child Fixture Page
+layout: nested
+position: 42
View
1  db/cms_fixtures/sample-site/pages/index/child/left.html
@@ -0,0 +1 @@
+Child Page Left Fixture Content
View
1  db/cms_fixtures/sample-site/pages/index/child/right.html
@@ -0,0 +1 @@
+Child Page Right Fixture Content
View
2  db/cms_fixtures/sample-site/pages/index/content.html
@@ -0,0 +1,2 @@
+Home Page Fixture Contént
+{{ cms:snippet:default }}
View
4 db/cms_fixtures/sample-site/snippets/default/attributes.yml
@@ -0,0 +1,4 @@
+label: Default Fixture Snippet
+categories:
+ - category_a
+ - category_b
View
1  db/cms_fixtures/sample-site/snippets/default/content.html
@@ -0,0 +1 @@
+Fixture Content for Default Snippet
View
138 db/migrate/20140127124740_create_cms.rb
@@ -0,0 +1,138 @@
+class CreateCms < ActiveRecord::Migration
+
+ def self.up
+
+ text_limit = case ActiveRecord::Base.connection.adapter_name
+ when 'PostgreSQL'
+ { }
+ else
+ { :limit => 16777215 }
+ end
+
+ # -- Sites --------------------------------------------------------------
+ create_table :cms_sites do |t|
+ t.string :label, :null => false
+ t.string :identifier, :null => false
+ t.string :hostname, :null => false
+ t.string :path
+ t.string :locale, :null => false, :default => 'en'
+ t.boolean :is_mirrored, :null => false, :default => false
+ end
+ add_index :cms_sites, :hostname
+ add_index :cms_sites, :is_mirrored
+
+ # -- Layouts ------------------------------------------------------------
+ create_table :cms_layouts do |t|
+ t.integer :site_id, :null => false
+ t.integer :parent_id
+ t.string :app_layout
+ t.string :label, :null => false
+ t.string :identifier, :null => false
+ t.text :content, text_limit
+ t.text :css, text_limit
+ t.text :js, text_limit
+ t.integer :position, :null => false, :default => 0
+ t.boolean :is_shared, :null => false, :default => false
+ t.timestamps
+ end
+ add_index :cms_layouts, [:parent_id, :position]
+ add_index :cms_layouts, [:site_id, :identifier], :unique => true
+
+ # -- Pages --------------------------------------------------------------
+ create_table :cms_pages do |t|
+ t.integer :site_id, :null => false
+ t.integer :layout_id
+ t.integer :parent_id
+ t.integer :target_page_id
+ t.string :label, :null => false
+ t.string :slug
+ t.string :full_path, :null => false
+ t.text :content, text_limit
+ t.integer :position, :null => false, :default => 0
+ t.integer :children_count, :null => false, :default => 0
+ t.boolean :is_published, :null => false, :default => true
+ t.boolean :is_shared, :null => false, :default => false
+ t.timestamps
+ end
+ add_index :cms_pages, [:site_id, :full_path]
+ add_index :cms_pages, [:parent_id, :position]
+
+ # -- Page Blocks --------------------------------------------------------
+ create_table :cms_blocks do |t|
+ t.integer :page_id, :null => false
+ t.string :identifier, :null => false
+ t.text :content, text_limit
+ t.timestamps
+ end
+ add_index :cms_blocks, [:page_id, :identifier]
+
+ # -- Snippets -----------------------------------------------------------
+ create_table :cms_snippets do |t|
+ t.integer :site_id, :null => false
+ t.string :label, :null => false
+ t.string :identifier, :null => false
+ t.text :content, text_limit
+ t.integer :position, :null => false, :default => 0
+ t.boolean :is_shared, :null => false, :default => false
+ t.timestamps
+ end
+ add_index :cms_snippets, [:site_id, :identifier], :unique => true
+ add_index :cms_snippets, [:site_id, :position]
+
+ # -- Files --------------------------------------------------------------
+ create_table :cms_files do |t|
+ t.integer :site_id, :null => false
+ t.integer :block_id
+ t.string :label, :null => false
+ t.string :file_file_name, :null => false
+ t.string :file_content_type, :null => false
+ t.integer :file_file_size, :null => false
+ t.string :description, :limit => 2048
+ t.integer :position, :null => false, :default => 0
+ t.timestamps
+ end
+ add_index :cms_files, [:site_id, :label]
+ add_index :cms_files, [:site_id, :file_file_name]
+ add_index :cms_files, [:site_id, :position]
+ add_index :cms_files, [:site_id, :block_id]
+
+ # -- Revisions -----------------------------------------------------------
+ create_table :cms_revisions, :force => true do |t|
+ t.string :record_type, :null => false
+ t.integer :record_id, :null => false
+ t.text :data, text_limit
+ t.datetime :created_at
+ end
+ add_index :cms_revisions, [:record_type, :record_id, :created_at],
+ :name => 'index_cms_revisions_on_rtype_and_rid_and_created_at'
+
+ # -- Categories ---------------------------------------------------------
+ create_table :cms_categories, :force => true do |t|
+ t.integer :site_id, :null => false
+ t.string :label, :null => false
+ t.string :categorized_type, :null => false
+ end
+ add_index :cms_categories, [:site_id, :categorized_type, :label], :unique => true
+
+ create_table :cms_categorizations, :force => true do |t|
+ t.integer :category_id, :null => false
+ t.string :categorized_type, :null => false
+ t.integer :categorized_id, :null => false
+ end
+ add_index :cms_categorizations, [:category_id, :categorized_type, :categorized_id], :unique => true,
+ :name => 'index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id'
+ end
+
+ def self.down
+ drop_table :cms_sites
+ drop_table :cms_layouts
+ drop_table :cms_pages
+ drop_table :cms_snippets
+ drop_table :cms_blocks
+ drop_table :cms_files
+ drop_table :cms_revisions
+ drop_table :cms_categories
+ drop_table :cms_categorizations
+ end
+end
+
View
136 db/schema.rb
@@ -0,0 +1,136 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended that you check this file into your version control system.
+
+ActiveRecord::Schema.define(version: 20140127124740) do
+
+ # These are extensions that must be enabled in order to support this database
+ enable_extension "plpgsql"
+
+ create_table "cms_blocks", force: true do |t|
+ t.integer "page_id", null: false
+ t.string "identifier", null: false
+ t.text "content"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "cms_blocks", ["page_id", "identifier"], name: "index_cms_blocks_on_page_id_and_identifier", using: :btree
+
+ create_table "cms_categories", force: true do |t|
+ t.integer "site_id", null: false
+ t.string "label", null: false
+ t.string "categorized_type", null: false
+ end
+
+ add_index "cms_categories", ["site_id", "categorized_type", "label"], name: "index_cms_categories_on_site_id_and_categorized_type_and_label", unique: true, using: :btree
+
+ create_table "cms_categorizations", force: true do |t|
+ t.integer "category_id", null: false
+ t.string "categorized_type", null: false
+ t.integer "categorized_id", null: false
+ end
+
+ add_index "cms_categorizations", ["category_id", "categorized_type", "categorized_id"], name: "index_cms_categorizations_on_cat_id_and_catd_type_and_catd_id", unique: true, using: :btree
+
+ create_table "cms_files", force: true do |t|
+ t.integer "site_id", null: false
+ t.integer "block_id"
+ t.string "label", null: false
+ t.string "file_file_name", null: false
+ t.string "file_content_type", null: false
+ t.integer "file_file_size", null: false
+ t.string "description", limit: 2048
+ t.integer "position", default: 0, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "cms_files", ["site_id", "block_id"], name: "index_cms_files_on_site_id_and_block_id", using: :btree
+ add_index "cms_files", ["site_id", "file_file_name"], name: "index_cms_files_on_site_id_and_file_file_name", using: :btree
+ add_index "cms_files", ["site_id", "label"], name: "index_cms_files_on_site_id_and_label", using: :btree
+ add_index "cms_files", ["site_id", "position"], name: "index_cms_files_on_site_id_and_position", using: :btree
+
+ create_table "cms_layouts", force: true do |t|
+ t.integer "site_id", null: false
+ t.integer "parent_id"
+ t.string "app_layout"
+ t.string "label", null: false
+ t.string "identifier", null: false
+ t.text "content"
+ t.text "css"
+ t.text "js"
+ t.integer "position", default: 0, null: false
+ t.boolean "is_shared", default: false, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "cms_layouts", ["parent_id", "position"], name: "index_cms_layouts_on_parent_id_and_position", using: :btree
+ add_index "cms_layouts", ["site_id", "identifier"], name: "index_cms_layouts_on_site_id_and_identifier", unique: true, using: :btree
+
+ create_table "cms_pages", force: true do |t|
+ t.integer "site_id", null: false
+ t.integer "layout_id"
+ t.integer "parent_id"
+ t.integer "target_page_id"
+ t.string "label", null: false
+ t.string "slug"
+ t.string "full_path", null: false
+ t.text "content"
+ t.integer "position", default: 0, null: false
+ t.integer "children_count", default: 0, null: false
+ t.boolean "is_published", default: true, null: false
+ t.boolean "is_shared", default: false, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "cms_pages", ["parent_id", "position"], name: "index_cms_pages_on_parent_id_and_position", using: :btree
+ add_index "cms_pages", ["site_id", "full_path"], name: "index_cms_pages_on_site_id_and_full_path", using: :btree
+
+ create_table "cms_revisions", force: true do |t|
+ t.string "record_type", null: false
+ t.integer "record_id", null: false
+ t.text "data"
+ t.datetime "created_at"
+ end
+
+ add_index "cms_revisions", ["record_type", "record_id", "created_at"], name: "index_cms_revisions_on_rtype_and_rid_and_created_at", using: :btree
+
+ create_table "cms_sites", force: true do |t|
+ t.string "label", null: false
+ t.string "identifier", null: false
+ t.string "hostname", null: false
+ t.string "path"
+ t.string "locale", default: "en", null: false
+ t.boolean "is_mirrored", default: false, null: false
+ end
+
+ add_index "cms_sites", ["hostname"], name: "index_cms_sites_on_hostname", using: :btree
+ add_index "cms_sites", ["is_mirrored"], name: "index_cms_sites_on_is_mirrored", using: :btree
+
+ create_table "cms_snippets", force: true do |t|
+ t.integer "site_id", null: false
+ t.string "label", null: false
+ t.string "identifier", null: false
+ t.text "content"
+ t.integer "position", default: 0, null: false
+ t.boolean "is_shared", default: false, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "cms_snippets", ["site_id", "identifier"], name: "index_cms_snippets_on_site_id_and_identifier", unique: true, using: :btree
+ add_index "cms_snippets", ["site_id", "position"], name: "index_cms_snippets_on_site_id_and_position", using: :btree
+
+end
View
7 db/seeds.rb
@@ -0,0 +1,7 @@
+# This file should contain all the record creation needed to seed the database with its default values.
+# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
+#
+# Examples:
+#
+# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
+# Mayor.create(name: 'Emanuel', city: cities.first)
View
0  lib/assets/.keep
No changes.
View
0  lib/tasks/.keep
No changes.
View
0  log/.keep
No changes.
View
58 public/404.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The page you were looking for doesn't exist (404)</title>
+ <style>
+ body {
+ background-color: #EFEFEF;
+ color: #2E2F30;
+ text-align: center;
+ font-family: arial, sans-serif;
+ }
+
+ div.dialog {
+ width: 25em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #CCC;
+ border-right-color: #999;
+ border-left-color: #999;
+ border-bottom-color: #BBB;
+ border-top: #B00100 solid 4px;
+ border-top-left-radius: 9px;
+ border-top-right-radius: 9px;
+ background-color: white;
+ padding: 7px 4em 0 4em;
+ }
+
+ h1 {
+ font-size: 100%;
+ color: #730E15;
+ line-height: 1.5em;
+ }
+
+ body > p {
+ width: 33em;
+ margin: 0 auto 1em;
+ padding: 1em 0;
+ background-color: #F7F7F7;
+ border: 1px solid #CCC;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ border-top-color: #DADADA;
+ color: #666;
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
+ }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/404.html -->
+ <div class="dialog">
+ <h1>The page you were looking for doesn't exist.</h1>
+ <p>You may have mistyped the address or the page may have moved.</p>
+ </div>
+ <p>If you are the application owner check the logs for more information.</p>
+</body>
+</html>
View
58 public/422.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>The change you wanted was rejected (422)</title>
+ <style>
+ body {
+ background-color: #EFEFEF;
+ color: #2E2F30;
+ text-align: center;
+ font-family: arial, sans-serif;
+ }
+
+ div.dialog {
+ width: 25em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #CCC;
+ border-right-color: #999;
+ border-left-color: #999;
+ border-bottom-color: #BBB;
+ border-top: #B00100 solid 4px;
+ border-top-left-radius: 9px;
+ border-top-right-radius: 9px;
+ background-color: white;
+ padding: 7px 4em 0 4em;
+ }
+
+ h1 {
+ font-size: 100%;
+ color: #730E15;
+ line-height: 1.5em;
+ }
+
+ body > p {
+ width: 33em;
+ margin: 0 auto 1em;
+ padding: 1em 0;
+ background-color: #F7F7F7;
+ border: 1px solid #CCC;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ border-top-color: #DADADA;
+ color: #666;
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
+ }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/422.html -->
+ <div class="dialog">
+ <h1>The change you wanted was rejected.</h1>
+ <p>Maybe you tried to change something you didn't have access to.</p>
+ </div>
+ <p>If you are the application owner check the logs for more information.</p>
+</body>
+</html>
View
57 public/500.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>We're sorry, but something went wrong (500)</title>
+ <style>
+ body {
+ background-color: #EFEFEF;
+ color: #2E2F30;
+ text-align: center;
+ font-family: arial, sans-serif;
+ }
+
+ div.dialog {
+ width: 25em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #CCC;
+ border-right-color: #999;
+ border-left-color: #999;
+ border-bottom-color: #BBB;
+ border-top: #B00100 solid 4px;
+ border-top-left-radius: 9px;
+ border-top-right-radius: 9px;
+ background-color: white;
+ padding: 7px 4em 0 4em;
+ }
+
+ h1 {
+ font-size: 100%;
+ color: #730E15;
+ line-height: 1.5em;
+ }
+
+ body > p {
+ width: 33em;
+ margin: 0 auto 1em;
+ padding: 1em 0;
+ background-color: #F7F7F7;
+ border: 1px solid #CCC;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ border-top-color: #DADADA;
+ color: #666;
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
+ }
+ </style>
+</head>
+
+<body>
+ <!-- This file lives in public/500.html -->
+ <div class="dialog">
+ <h1>We're sorry, but something went wrong.</h1>
+ </div>
+ <p>If you are the application owner check the logs for more information.</p>
+</body>
+</html>
View
0  public/favicon.ico
No changes.
View
5 public/robots.txt
@@ -0,0 +1,5 @@
+# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
+#
+# To ban all spiders from the entire site uncomment the next two lines:
+# User-agent: *
+# Disallow: /
View
BIN  vendor/assets/fonts/FontAwesome.otf
Binary file not shown
View
BIN  vendor/assets/fonts/fontawesome-webfont.eot
Binary file not shown
View
399 vendor/assets/fonts/fontawesome-webfont.svg
399 additions, 0 deletions not shown
View
BIN  vendor/assets/fonts/fontawesome-webfont.ttf
Binary file not shown
View
BIN  vendor/assets/fonts/fontawesome-webfont.woff
Binary file not shown
View
0  vendor/assets/javascripts/.keep
No changes.
View
2,280 vendor/assets/javascripts/bootstrap.js
@@ -0,0 +1,2280 @@
+/* ===================================================
+ * bootstrap-transition.js v2.3.2
+ * http://getbootstrap.com/2.3.2/javascript.html#transitions
+ * ===================================================
+ * Copyright 2013 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);/* ==========================================================
+ * bootstrap-alert.js v2.3.2
+ * http://getbootstrap.com/2.3.2/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2013 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);/* ============================================================
+ * bootstrap-button.js v2.3.2
+ * http://getbootstrap.com/2.3.2/javascript.html#buttons
+ * ============================================================
+ * Copyright 2013 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);/* ==========================================================
+ * bootstrap-carousel.js v2.3.2
+ * http://getbootstrap.com/2.3.2/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2013 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