├── .bundle └── config ├── .gitignore ├── .ruby-version ├── Gemfile ├── Gemfile.lock ├── Procfile ├── README.md ├── app.rb ├── app ├── css │ ├── main.css │ └── normalize.css ├── img │ ├── .gitignore │ ├── 404.gif │ ├── arrows.svg │ ├── circle-pattern.png │ ├── icons.svg │ ├── logo-dark.png │ ├── logo.png │ ├── sache_square_ad_grey.jpg │ ├── sache_square_ad_pink.jpg │ ├── spinner.gif │ └── wave-pattern.png └── js │ ├── main.js │ ├── plugins.js │ └── vendor │ ├── jquery-1.10.2.min.js │ ├── jquery.pjax.js │ └── modernizr-2.6.2.min.js ├── bower_components ├── html5-boilerplate │ ├── .DS_Store │ ├── .bower.json │ ├── .gitattributes │ ├── .gitignore │ ├── .htaccess │ ├── 404.html │ ├── CHANGELOG.md │ ├── CONTRIBUTING.md │ ├── LICENSE.md │ ├── README.md │ ├── apple-touch-icon-precomposed.png │ ├── crossdomain.xml │ ├── doc │ │ ├── TOC.md │ │ ├── crossdomain.md │ │ ├── css.md │ │ ├── extend.md │ │ ├── faq.md │ │ ├── html.md │ │ ├── js.md │ │ ├── misc.md │ │ └── usage.md │ ├── favicon.ico │ ├── humans.txt │ ├── index.html │ └── robots.txt ├── jquery-pjax │ ├── .bower.json │ ├── LICENSE │ ├── README.md │ ├── bower.json │ └── jquery.pjax.js └── jquery │ ├── .bower.json │ ├── .gitignore │ ├── README.md │ ├── bower.json │ ├── component.json │ ├── composer.json │ ├── jquery-migrate.js │ ├── jquery-migrate.min.js │ ├── jquery.js │ ├── jquery.min.js │ ├── jquery.min.map │ └── package.json ├── config.rb ├── config.ru ├── config ├── database.yml └── environments.rb ├── db ├── migrate │ ├── 20131105214242_create_extensions.rb │ ├── 20131105220532_add_url_to_extensions.rb │ ├── 20131105220709_add_last_commit_to_extensions.rb │ ├── 20140131123221_add_keywords_to_extension.rb │ ├── 20140131140856_add_featured_to_extensions.rb │ ├── 20140209055744_add_project_name_to_extension.rb │ ├── 20140209083613_add_stars_to_extension.rb │ ├── 20140329141012_add_docs_to_extensions.rb │ └── 20140415062028_add_slug_to_extensions.rb └── schema.rb ├── rakefile.rb ├── sass ├── _extensions.scss ├── _footer.scss ├── _globals.scss ├── _header_title.scss ├── _helpers.scss ├── _modal.scss ├── _pagination.scss ├── _promote.scss ├── _sache_bar.scss ├── _type.scss ├── main.scss └── normalize.scss └── views ├── 404.haml ├── _bottom_assets.haml ├── _extension.haml ├── _featured.haml ├── _footer.haml ├── _head.haml ├── _modal.haml ├── _sache_bar.haml ├── index.haml ├── project.haml ├── promote.haml ├── search.haml ├── tag.haml └── user.haml /.bundle/config: -------------------------------------------------------------------------------- 1 | --- 2 | BUNDLE_PATH: vendor 3 | BUNDLE_DISABLE_SHARED_GEMS: '1' 4 | BUNDLE_WITHOUT: nothing 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache 2 | .DS_Store 3 | vendor/ruby 4 | env.rb 5 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.1.6 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | ruby '2.1.6' 4 | 5 | gem "sinatra" 6 | gem "octokit" 7 | gem "sass" 8 | gem "compass" 9 | gem "haml" 10 | gem "sinatra-assetpack", :require => 'sinatra/assetpack' 11 | gem "activerecord" 12 | gem "sinatra-activerecord" 13 | gem 'sinatra-flash' 14 | gem 'sinatra-redirect-with-flash' 15 | gem 'will_paginate' 16 | gem 'pg' 17 | gem "tux" 18 | gem 'sinatra-contrib' 19 | gem 'friendly_id', '~> 5.0.3' 20 | 21 | group :development do 22 | 23 | end 24 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activemodel (4.0.1) 5 | activesupport (= 4.0.1) 6 | builder (~> 3.1.0) 7 | activerecord (4.0.1) 8 | activemodel (= 4.0.1) 9 | activerecord-deprecated_finders (~> 1.0.2) 10 | activesupport (= 4.0.1) 11 | arel (~> 4.0.0) 12 | activerecord-deprecated_finders (1.0.3) 13 | activesupport (4.0.1) 14 | i18n (~> 0.6, >= 0.6.4) 15 | minitest (~> 4.2) 16 | multi_json (~> 1.3) 17 | thread_safe (~> 0.1) 18 | tzinfo (~> 0.3.37) 19 | addressable (2.3.5) 20 | arel (4.0.1) 21 | atomic (1.1.14) 22 | backports (3.6.4) 23 | bond (0.4.3) 24 | builder (3.1.4) 25 | chunky_png (1.2.9) 26 | compass (0.12.2) 27 | chunky_png (~> 1.2) 28 | fssm (>= 0.2.7) 29 | sass (~> 3.1) 30 | faraday (0.8.8) 31 | multipart-post (~> 1.2.0) 32 | friendly_id (5.0.3) 33 | activerecord (>= 4.0.0) 34 | fssm (0.2.10) 35 | haml (4.0.4) 36 | tilt 37 | i18n (0.6.5) 38 | jsmin (1.0.1) 39 | minitest (4.7.5) 40 | multi_json (1.8.2) 41 | multipart-post (1.2.0) 42 | octokit (2.5.1) 43 | sawyer (~> 0.5.1) 44 | pg (0.17.0) 45 | rack (1.5.2) 46 | rack-protection (1.5.1) 47 | rack 48 | rack-test (0.6.2) 49 | rack (>= 1.0) 50 | ripl (0.7.0) 51 | bond (~> 0.4.2) 52 | ripl-multi_line (0.3.1) 53 | ripl (>= 0.3.6) 54 | ripl-rack (0.2.0) 55 | rack (>= 1.0) 56 | rack-test (>= 0.5) 57 | ripl (>= 0.3.5) 58 | sass (3.2.12) 59 | sawyer (0.5.1) 60 | addressable (~> 2.3.5) 61 | faraday (~> 0.8, < 0.10) 62 | sinatra (1.4.4) 63 | rack (~> 1.4) 64 | rack-protection (~> 1.4) 65 | tilt (~> 1.3, >= 1.3.4) 66 | sinatra-activerecord (1.2.3) 67 | activerecord (>= 3.0) 68 | sinatra (~> 1.0) 69 | sinatra-assetpack (0.3.1) 70 | jsmin 71 | rack-test 72 | sinatra 73 | tilt (>= 1.3.0) 74 | sinatra-contrib (1.4.2) 75 | backports (>= 2.0) 76 | multi_json 77 | rack-protection 78 | rack-test 79 | sinatra (~> 1.4.0) 80 | tilt (~> 1.3) 81 | sinatra-flash (0.3.0) 82 | sinatra (>= 1.0.0) 83 | sinatra-redirect-with-flash (0.2.0) 84 | sinatra (>= 1.0.0) 85 | thread_safe (0.1.3) 86 | atomic 87 | tilt (1.4.1) 88 | tux (0.3.0) 89 | ripl (>= 0.3.5) 90 | ripl-multi_line (>= 0.2.4) 91 | ripl-rack (>= 0.2.0) 92 | sinatra (>= 1.2.1) 93 | tzinfo (0.3.38) 94 | will_paginate (3.0.5) 95 | 96 | PLATFORMS 97 | ruby 98 | 99 | DEPENDENCIES 100 | activerecord 101 | compass 102 | friendly_id (~> 5.0.3) 103 | haml 104 | octokit 105 | pg 106 | sass 107 | sinatra 108 | sinatra-activerecord 109 | sinatra-assetpack 110 | sinatra-contrib 111 | sinatra-flash 112 | sinatra-redirect-with-flash 113 | tux 114 | will_paginate 115 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec rackup config.ru -p $PORT -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Sache 2 | --- 3 | Find the perfect tool for your next Sass or Compass project by easily searching by tag, author or keyword. 4 | 5 | 6 | #### Adding Your Own Extension to the Directory 7 | 8 | * Add `sache.json` to your public repo. 9 | * Visit [http://sache.in](http://sache.in) and click "Add Extension". 10 | * Enter your Github project SSH URL in the input field and click "Add". 11 | 12 | Once that's done you should see a success message to let you know its been added successfully. 13 | 14 | 15 | #### Contributing 16 | 17 | We love open-source projects and community so we've kept this repo open for anyone to contribute to. Feel free to open an issue or submit a pull request with an additional feature or even a bug fix. If you are going to contribute: create a new branch off of master and open a pull request against that so we can check out your work. Please make sure you've tested your work thouroughly before finalizing your pull request. 18 | 19 | ##### Running Sache Locally 20 | 21 | * Make sure you install [Postgres](http://postgresapp.com/) so that you can run a local database. 22 | * After you install Postgres, start it up and open Terminal. 23 | * Close the repo by running: `git clone git@github.com:jhardy/sache.git`. 24 | * Change into that directory and run: `bundle`. 25 | * In Terminal, type: `psql`, this opens the Postgres command line. 26 | * Type in: `CREATE DATABASE sachein_dev;` 27 | * Press `ctrl + z` to exit Postgres. 28 | * Now we need to migrate, run: `bundle exec rake db:migrate`. 29 | * Once that's done you can start up the app by running: `bundle exec ruby app.rb`. 30 | * If you are going to be changing Sass sheets, open a new Terminal window or tab and run: `compass watch`. 31 | 32 | Now you can visit and edit to your hearts desire. 33 | 34 | -- 35 | 36 | Built by [@hatefulcrawdad](https://github.com/hatefulcrawdad) and [@jhardy](https://github.com/jhardy) for the love of the amazing Sass Community. We love communicating via Github, but if you want to email us, please send it to [sassy@sache.in](mailto:sassy@sache.in). 37 | -------------------------------------------------------------------------------- /app.rb: -------------------------------------------------------------------------------- 1 | require "bundler/setup" 2 | require 'sinatra' 3 | require "sinatra/reloader" 4 | require 'octokit' 5 | require 'haml' 6 | require 'json' 7 | require 'sinatra/flash' 8 | require 'sinatra/redirect_with_flash' 9 | require 'sinatra/activerecord' 10 | require 'sinatra/assetpack' 11 | require "sinatra/namespace" 12 | 13 | require 'will_paginate' 14 | require 'will_paginate/active_record' 15 | require 'friendly_id' 16 | 17 | require './config/environments' #database configuration 18 | require './env' if File.exists?('env.rb') 19 | 20 | enable :sessions 21 | 22 | module WillPaginate 23 | module ViewHelpers 24 | def page_entries_info(collection, options = {}) 25 | entry_name = options[:entry_name] || (collection.empty?? 'entry' : collection.first.class.name.underscore.sub('_', ' ')) 26 | 27 | if collection.total_pages < 2 28 | case collection.size 29 | when 0; "(No Extensions)" 30 | when 1; "(1 Extension Available)" 31 | else; " " 32 | end 33 | else 34 | %{(%d - %d of %d)} % [ 35 | collection.offset + 1, 36 | collection.offset + collection.length, 37 | collection.total_entries 38 | ] 39 | end 40 | end 41 | end 42 | end 43 | 44 | class Extension < ActiveRecord::Base 45 | include FriendlyId 46 | friendly_id :name, :use => :slugged 47 | 48 | validates_uniqueness_of :url, {:message => 'Ooops! It looks like this extension has already been added.'} 49 | self.per_page = 20 50 | end 51 | 52 | configure do 53 | set :root, File.dirname(__FILE__) # You must set app root 54 | register Sinatra::AssetPack 55 | 56 | assets { 57 | serve '/js', from: 'app/js' # Default 58 | serve '/css', from: 'app/css' # Default 59 | serve '/img', from: 'app/img' # Default 60 | 61 | # The second parameter defines where the compressed version will be served. 62 | # (Note: that parameter is optional, AssetPack will figure it out.) 63 | # The final parameter is an array of glob patterns defining the contents 64 | # of the package (as matched on the public URIs, not the filesystem) 65 | js :app, ['/js/main.js'] 66 | } 67 | 68 | end 69 | 70 | configure :development do 71 | register Sinatra::Reloader 72 | end 73 | 74 | 75 | get '/' do 76 | #hacky, TODO make this more robust 77 | ids = [37, 28, 12] 78 | begin 79 | @featured = Extension.find(ids) 80 | rescue ActiveRecord::RecordNotFound => e 81 | @featured = nil 82 | end 83 | 84 | @extensions = Extension.paginate(:page => params[:page], :order => sort_column + ' ' + sort_direction) 85 | haml :index 86 | 87 | end 88 | 89 | get '/extensions' do 90 | haml :index 91 | end 92 | 93 | post '/extensions' do 94 | unless params[:project_url].empty? 95 | #%r{github\.com[:/](.+?)/(.+?)(?:\.git|)$}i.match(params[:project_url]) 96 | begin 97 | project_url = %r{github\.com[:/](.+?)/(.+?)(?:\.git)$}i.match(params[:project_url]) 98 | username = project_url[1] 99 | reponame = project_url[2] 100 | rescue NoMethodError => e 101 | halt 400, "That URL looks funny, make sure you use the github SSH URL for your repo" 102 | end 103 | else 104 | halt 400, "We appreciate minimalism, but you still actually have to provide a URL!" 105 | end 106 | 107 | begin 108 | client = Octokit::Client.new \ 109 | :client_id => ENV['Github_Client_ID'], 110 | :client_secret => ENV['Github_Client_Secret'] 111 | repo_info = client.repository("#{username}/#{reponame}") 112 | rescue Octokit::NotFound => e 113 | halt 400, "Slow down turbo! Double check that URL because the repo doesn't exist." 114 | end 115 | 116 | begin 117 | manifest_data = get_manifest_data(client, username, reponame) 118 | rescue Octokit::NotFound => e 119 | halt 400, "Dang! Make sure you have a sache.json file in your repo." 120 | end 121 | 122 | manifest_hash = set_manifest_hash(manifest_data, repo_info, username, reponame, params[:project_url]) 123 | 124 | @extension = Extension.new(manifest_hash) 125 | 126 | if @extension.save 127 | flash.now[:notice] = 'Sweeeeet! Thanks for adding your exension!' 128 | else 129 | status 409 130 | flash.now[:error] = @extension.errors.first[1] 131 | end 132 | end 133 | 134 | get '/tag/:tag' do 135 | @extensions = Extension.where("? = ANY (tags)", params[:tag]).paginate(:page => params[:page], :order => 'created_at DESC') 136 | haml :tag 137 | end 138 | 139 | get '/search' do 140 | @extensions = search(params[:query]).paginate(:page => params[:page], :order => 'created_at DESC') 141 | haml :search 142 | end 143 | 144 | get '/:user' do 145 | @extensions = Extension.where(:author => params[:user]).paginate(:page => params[:page], :order => 'created_at DESC') 146 | haml :user 147 | end 148 | 149 | get '/project/:project_name' do 150 | @extensions = Extension.friendly.find(params[:project_name]) 151 | haml :project 152 | end 153 | 154 | get '/promote' do 155 | haml :promote 156 | end 157 | 158 | namespace '/api' do 159 | before {content_type :json} 160 | 161 | get '/extensions' do 162 | @extensions = Extension.all.to_json 163 | end 164 | 165 | get '/extensions/:id' do 166 | @extension = Extension.find(params[:id]).to_json 167 | end 168 | 169 | get '/users/:user' do 170 | @extensions = Extension.where(:author => params[:user]).to_json 171 | end 172 | 173 | get '/search' do 174 | @extensions = search(params[:query]).to_json 175 | end 176 | 177 | end 178 | 179 | 180 | not_found { haml :'404' } 181 | 182 | helpers do 183 | 184 | def search q 185 | Extension.where("(keywords ILIKE ?) OR (name ILIKE ?)", '%' + q + '%', '%' + q + '%') 186 | end 187 | 188 | def truncate w 189 | words = w.split() 190 | return words[0..40].join(' ') + (words.length > 40 ? '...' : '') 191 | end 192 | 193 | def sort_column 194 | Extension.column_names.include?(params[:sort]) ? params[:sort] : "created_at" 195 | end 196 | 197 | def sort_direction 198 | %w[asc desc].include?(params[:direction]) ? params[:direction] : "desc" 199 | end 200 | 201 | def sortable(column, title) 202 | css_class = column == sort_column ? "current #{sort_direction}" : nil 203 | direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc" 204 | 205 | "" + title + "" 206 | end 207 | 208 | def get_manifest_data(client, username, reponame) 209 | #begin 210 | manifest_data = client.contents("#{username}/#{reponame}", :path => 'sache.json', :accept => "application/vnd.github-blob.raw") 211 | #rescue Octokit::NotFound => e 212 | #halt 400, "Dang! Make sure you have a sache.json file in your repo." 213 | #end 214 | end 215 | 216 | def set_manifest_hash(data, repo, username, reponame, url) 217 | hash = JSON.parse(data) 218 | parsed_params = { project_name: reponame, author: username, url: url, last_commit: repo.updated_at, stars: repo.watchers, keywords: hash["tags"].join(', '), website: repo.website, docs: repo.docs } 219 | hash.merge!(parsed_params) 220 | end 221 | 222 | def set_github_client 223 | client = Octokit::Client.new \ 224 | :client_id => ENV['Github_Client_ID'], 225 | :client_secret => ENV['Github_Client_Secret'] 226 | end 227 | 228 | def update_all 229 | @extensions = Extension.all 230 | @extensions.each do |e| 231 | update(e.id) 232 | end 233 | end 234 | 235 | def update id 236 | 237 | client = set_github_client() 238 | e = Extension.find(id) 239 | begin 240 | repo = client.repository("#{e.author}/#{e.project_name}") 241 | manifest_data = get_manifest_data(client, e.author, e.project_name) 242 | manifest_hash = set_manifest_hash(manifest_data, repo, e.author, e.project_name, e.url) 243 | 244 | manifest_hash.each{|k, v|; e[k] = v; } 245 | e.save 246 | 247 | rescue Octokit::NotFound => k 248 | e.destroy 249 | end 250 | end 251 | end -------------------------------------------------------------------------------- /app/css/main.css: -------------------------------------------------------------------------------- 1 | #featured,.extension-list,.pagination{padding:0 20px 0px}@media all and (min-width: 1024px){#featured,.extension-list,.pagination{padding:0 5% 0px}}@media all and (min-width: 1500px){#featured,.extension-list,.pagination{padding:0 15% 0px}}.sache-bar-actions,.featured-cards,.ghub-info{list-style:none;margin:0;padding:0;overflow:hidden}.page-title,.card-title,.card-description,.add-project-title{margin-top:0}h1,h2,h3,h4,h5,h6,.title-link,.actions .button{font-family:"ff-tisa-web-pro", serif}body,.response-bar .response-text{font-family:"ff-tisa-sans-web-pro", sans-serif}*,* *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{height:100%}body{font-size:1em}.img-404{text-align:center}.container{min-height:100%}.main-content{padding-bottom:280px;overflow:auto}@media all and (min-width: 520px){.main-content{padding-bottom:250px}}@media all and (min-width: 768px){.main-content{padding-bottom:200px}}footer{height:280px;margin-top:-280px}@media all and (min-width: 520px){footer{height:250px;margin-top:-250px}}@media all and (min-width: 768px){footer{height:200px;margin-top:-200px}}.button{background-color:#ad3972;display:inline-block;margin-bottom:1.25em;font-size:0.875em;font-weight:bold;color:#fff;line-height:2.1875em;border:none;-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px;-webkit-transition:background-color 200ms linear;-moz-transition:background-color 200ms linear;-o-transition:background-color 200ms linear;transition:background-color 200ms linear}.button:hover{background-color:#9a3366}.button:active{outline:none}a{text-decoration:none;-webkit-transition:color 200ms linear;-moz-transition:color 200ms linear;-o-transition:color 200ms linear;transition:color 200ms linear}p{font-weight:400}.note{font-size:0.75em;margin-bottom:1.875em}.instruction-list .note a{color:rgba(255,255,255,0.6)}.instruction-list .note a:hover{color:#fff}.footer-wrap .note{color:#bbb;margin-bottom:0;margin-top:0}pre{background-color:#c0407f;padding:0.875em;overflow:auto;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}pre code{display:block;color:#f2d9e6;white-space:pre}h1,h2,h3,h4,h5,h6{font-weight:normal}h3{color:#706c69;font-size:1em;font-weight:bold;text-align:center;margin-bottom:1.875em}.sache-bar{background:#c6538c url("../img/wave-pattern.png") 0 0 repeat-x;padding:0;overflow:hidden;height:7.5em}@media all and (min-width: 768px){.sache-bar{height:3.75em;padding:0 0.9375em}}.logo{margin:0;color:#fff;text-align:center}.logo img{height:35px;margin-top:10px}@media all and (min-width: 768px){.logo{float:left;text-align:left;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}}.sache-bar-actions{height:3.875em;background-color:#c0407f}.sache-bar-actions li{float:left;color:rgba(255,255,255,0.6);overflow:hidden;height:100%;width:50%;-webkit-transition:color 200ms linear;-moz-transition:color 200ms linear;-o-transition:color 200ms linear;transition:color 200ms linear}.sache-bar-actions li a{color:transparent;display:inline-block;height:100%;line-height:60px;-webkit-transition:opacity 200ms linear;-moz-transition:opacity 200ms linear;-o-transition:opacity 200ms linear;transition:opacity 200ms linear}.sache-bar-actions li a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}@media all and (min-width: 768px){.sache-bar-actions li a{color:#fff;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}}@media all and (min-width: 768px){.sache-bar-actions li{width:auto}}@media all and (min-width: 768px){.sache-bar-actions{float:right;background-color:transparent}}.sache-add-extension{border-left:solid 1px rgba(255,255,255,0.1)}.sache-add-extension a{background:url("../img/icons.svg") 50% -102px no-repeat;position:relative;width:100%;padding-left:4.375em;padding-right:1.5625em}@media all and (min-width: 768px){.sache-add-extension a{background-position:40px -104px !important;width:auto}}.sache-search form{height:99%}.sache-search input{background:#c0407f url("../img/icons.svg") 50% -58px no-repeat;border:0;height:100%;color:#fff;width:100%;text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.sache-search input::-webkit-input-placeholder{color:transparent}.sache-search input:-moz-placeholder{color:transparent}.sache-search input::-moz-placeholder{color:transparent}.sache-search input:-ms-input-placeholder{color:transparent}@media all and (min-width: 768px){.sache-search input{background-color:#c6538c}}.sache-search input.activated{left:0;background-color:#d98cb2}.sache-search input:focus{outline:none;background-image:none !important;background-color:#c0407f;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.sache-search input:focus::-webkit-input-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus:-moz-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus::-moz-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus:-ms-input-placeholder{color:rgba(255,255,255,0.5)}@media all and (min-width: 768px){.sache-search input:focus{width:250px}.sache-search input:focus:before{display:none}}@media all and (min-width: 768px){.sache-search input{background-position:20px -57px !important;width:150px;margin-left:10px;padding:5px 5px 4px 49px;text-align:left;color:#fff;-webkit-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;-moz-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;-o-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.sache-search input::-webkit-input-placeholder{color:#fff}.sache-search input:-moz-placeholder{color:#fff}.sache-search input::-moz-placeholder{color:#fff}.sache-search input:-ms-input-placeholder{color:#fff}}header{background:#f8f8fa url("../img/circle-pattern.png") 50% 45% no-repeat;margin-bottom:1.875em;padding:1.25em 20px 1.625em;text-align:center}@media all and (min-width: 768px){header{padding:3.125em 5% 3.75em}}@media all and (min-width: 1500px){header{padding:5em 15% 5.875em}}.page-title{margin-bottom:0.25em;font-size:2em;line-height:1.3;color:#706c69}@media all and (min-width: 768px){.page-title{font-size:2.5em}}@media all and (min-width: 1024px){.page-title{font-size:2.875em}}.title-wrapper .page-title{display:inline;margin-left:5px}@media all and (min-width: 1024px){.title-wrapper .page-title{margin-left:10px}}.title-wrapper .to-home{display:inline;font-size:2.25em;font-weight:300;color:#d9d7d6;margin-right:5px}@media all and (min-width: 768px){.title-wrapper .to-home{font-size:2.625em}}@media all and (min-width: 1024px){.title-wrapper .to-home{font-size:3.125em;margin-right:10px}}.title-wrapper .to-home:hover{color:#a8a4a2}.page-description{font-size:0.875em;color:#706c69;margin-bottom:0;line-height:1.5}@media all and (min-width: 768px){.page-description{font-size:1em}}@media all and (min-width: 1024px){.page-description{font-size:1.125em}}.page-description a{color:#7ca4ab;-webkit-transition:all 200ms linear;-moz-transition:all 200ms linear;-o-transition:all 200ms linear;transition:all 200ms linear}.page-description a:hover{color:#c6538c}.cta-button{background-color:#e3e3eb;padding:10px 30px 11px 30px;font-weight:bold;font-size:16px;margin-top:10px;display:inline-block;color:#96928f !important;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.cta-button:hover{background-color:#d4d4e0;color:#706c69 !important}#featured{margin-bottom:50px}@media all and (min-width: 768px){.featured-cards{display:table;height:100%}}.feature-card{margin:0 0 1.25em;width:100%}@media all and (min-width: 768px){.feature-card{padding:0 1em 0;width:33.333%;height:100%;display:table-cell;position:relative}.feature-card:first-child{padding-left:0}.feature-card:last-child{padding-right:0}}.feature-card>span{display:block;position:relative;border:solid 1px #ddd;height:100%;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.card-title{font-size:1.375em;line-height:1.5;padding:20px 20px 0}.title-link{display:block;width:100%;color:#c6538c;cursor:pointer}.title-link:hover,.title-link:active{color:#862d59}table .title-link{font-size:0.875em;margin-bottom:12px}@media all and (min-width: 768px){table .title-link{margin-top:-6px;margin-bottom:0px}}.card-description-wrapper{overflow:hidden;padding-bottom:1em;padding:0 20px 20px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}@media all and (min-width: 768px){.card-description-wrapper{margin-bottom:90px}}@media all and (min-width: 1024px){.card-description-wrapper{margin-bottom:50px}}.card-description{font-size:1em;line-height:1.6;margin-bottom:1em;color:#706c69}table .card-description{font-size:0.875em;line-height:1.6}.ghub-info{color:#888;background-color:#fbfbfc;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px}.ghub-info li{background-color:#fbfbfc;float:left;border-top:solid 1px #eee;width:100%;text-align:center;color:#888 !important;padding:12px 0;font-size:0.875em}@media all and (min-width: 520px){.ghub-info li{width:50%}}@media all and (min-width: 768px){.ghub-info li{width:100%}}@media all and (min-width: 1024px){.ghub-info li{width:50%}}@media all and (min-width: 768px){.ghub-info{position:absolute;bottom:0;width:100%}}.author-filter{display:inline-block;color:#888}.author-filter:hover,.author-filter:active{color:#222}.author{position:relative;cursor:pointer;border-right:solid 1px #eee}.author:before{content:" ";background:url("../img/icons.svg") 0 -42px no-repeat;display:inline-block;width:14px;height:14px;margin-right:3px;position:relative;top:2px}.author a:hover{color:#c6538c}table .author{border-right:none;font-size:13px}.ghub-stars{float:right;position:relative}table .ghub-stars{float:none;font-size:13px}.ghub-stars:before{content:" ";background:url("../img/icons.svg") 0 0 no-repeat;display:inline-block;width:14px;height:14px;margin-right:2px;position:relative;top:2px}@media all and (min-width: 768px){.ghub-stars:before{margin-right:5px}}.tags{padding-bottom:0;margin-bottom:5px;color:#7ca4ab}.tag:after{content:",";color:#333}.tag:last-child:after{content:""}table .tag-list{line-height:1.45;margin-bottom:12px}@media all and (min-width: 768px){table .tag-list{margin-bottom:0}}.tag{color:#7ca4ab;font-size:0.875em;-webkit-transition:color 200ms;-moz-transition:color 200ms;-o-transition:color 200ms;transition:color 200ms}.tag:hover{color:#c6538c}.extension-list h3{margin-top:80px}.extension-list h3 small{color:#d4d2d1;display:block}@media all and (min-width: 768px){.extension-list h3 small{display:inline;margin-left:10px}}.extension-list table{width:100%;margin:0 0 100px;padding:0 15px}.extension-list table thead{font-weight:bold}@media all and (max-width: 767px){.extension-list table thead{display:none}}.extension-list table thead th{text-align:left}.extension-list table thead td,.extension-list table thead th{line-height:43px;color:#a5a19c;padding:0 10px}.extension-list table thead td:first-child,.extension-list table thead th:first-child{padding-left:0}.extension-list table tbody td{padding:20px 10px}@media all and (min-width: 768px){.extension-list table tbody td:first-child{padding-left:0}}@media all and (max-width: 767px){.extension-list table tbody td{padding:0}}.extension-list table tr{border-bottom:solid 1px #ddd;color:#888}@media all and (max-width: 767px){.extension-list table tr{display:block;border:solid 1px #ddd;padding:20px;margin-bottom:20px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}}.extension-list table td{vertical-align:top}@media all and (max-width: 767px){.extension-list table td{display:block}}.sortable a{display:block;width:100%;position:relative;cursor:pointer}.sortable a:hover{color:#8d8881}.sortable a:after{display:block;content:"";width:11px;height:15px;position:absolute;right:8px;top:15px;background:url("../img/arrows.svg") #fff -36px -2px no-repeat;background-size:50px auto;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);opacity:0.4}.sortable a.current.asc:after{background-position:-2px -1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.sortable a.current.desc:after{background-position:-20px -1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.banners{margin-top:60px}.img-container{width:50%;float:left}@media all and (max-width: 700px){.img-container{width:100%;float:none;padding:0 20px;text-align:center}}.img-container .pink{float:right}@media all and (max-width: 700px){.img-container .pink{float:none}}.img-container .grey{float:left}@media all and (max-width: 700px){.img-container .grey{float:none}}.banner-code{clear:both;width:300px;border:solid 1px #d4d2d1;color:#a39f9c;padding-left:8px;margin-top:20px;line-height:1.3;height:100px;margin-bottom:60px}@media all and (max-width: 700px){.banner-code{width:100%}}.banner-code:focus{outline:none;border-color:#706c69}.pink+.banner-code{float:right}@media all and (max-width: 700px){.pink+.banner-code{float:none}}.grey+.banner-code{float:left;clear:left;border-left:none}@media all and (max-width: 700px){.grey+.banner-code{float:none;border-left:solid 1px #d4d2d1}}.previous_page,.next_page{display:none;height:22px;color:#fff;position:absolute;top:50%;background-color:#d98cb2;background-image:url("../img/icons.svg");background-repeat:no-repeat;padding:13px !important;margin:0 !important;font-size:0.8125em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-transition:background-color 200ms linear;-moz-transition:background-color 200ms linear;-o-transition:background-color 200ms linear;transition:background-color 200ms linear}@media all and (min-width: 520px){.previous_page,.next_page{display:inline}}.previous_page:hover,.next_page:hover{background-color:#d379a6}.disabled.previous_page,.disabled.next_page{background-color:#dfa0bf;background-image:none !important;color:rgba(255,255,255,0.5);cursor:default;padding-left:0 !important;padding-right:0 !important}.pagination a,.pagination .current{color:#fff;margin:0 3px;font-size:0.8125em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.pagination{background-color:#dfa0bf;border-bottom:solid 2px #d379a6;padding-top:12px;padding-bottom:12px;text-align:center;color:#fff;position:relative;z-index:1}.pagination a{background-color:#d98cb2;padding:3px 10px}.pagination a:hover{background-color:#d379a6}.pagination .current{background-color:#e6b3cc;cursor:default;padding:3px 10px;font-style:normal}.previous_page{left:20px;background-position:7px -161px}@media all and (min-width: 1024px){.previous_page{left:5%}}@media all and (min-width: 1500px){.previous_page{left:15%}}.next_page{right:20px;background-position:6px -192px}@media all and (min-width: 1024px){.next_page{right:5%}}@media all and (min-width: 1500px){.next_page{right:15%}}.modal-tarp{display:none;width:100%;height:100%;background-color:rgba(0,0,0,0.8);position:fixed;top:0;left:0;z-index:999;overflow:scroll}.add-project{background:#c6538c;padding:1.875em;margin:0 auto;width:100%;max-width:100%;position:relative;top:0;left:50%;margin-left:-50%;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;-webkit-transition:all 200ms ease-in-out;-webkit-transition-delay:200ms;-moz-transition:all 200ms ease-in-out 200ms;-o-transition:all 200ms ease-in-out 200ms;transition:all 200ms ease-in-out 200ms;-webkit-transform:scale(1.1, 1.1);-moz-transform:scale(1.1, 1.1);-ms-transform:scale(1.1, 1.1);-o-transform:scale(1.1, 1.1);transform:scale(1.1, 1.1)}@media all and (min-width: 768px){.add-project{top:100px;width:80%;margin-left:-40%;position:absolute;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}}@media all and (min-width: 1024px){.add-project{width:60%;margin-left:-30%}}.add-project.modal-open{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1;-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);-ms-transform:scale(1, 1);-o-transform:scale(1, 1);transform:scale(1, 1)}.add-project-title{font-size:1.25em;line-height:1.2;padding-right:20px;color:#fff}.instruction-list{padding-left:20px;color:#fff}.instruction-list li p code{background-color:#c0407f;color:#f2d9e6;padding:2px 5px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.field{width:100%}@media all and (min-width: 520px){.field{float:left;width:80%}}form.processing .button{text-indent:-9999px;background-image:url("../img/spinner.gif");background-repeat:no-repeat;background-position:50% 50%;background-size:15%;cursor:default}form.processing .button:hover{background-color:#ad3972}.actions .button{line-height:35px;height:40px;font-size:1em;font-weight:normal;width:100%;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}@media all and (min-width: 520px){.actions .button{width:20%;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}.add-url{border:none;color:#333;line-height:40px;height:40px;width:100%;font-size:1em;padding-left:5px;margin-bottom:10px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}@media all and (min-width: 520px){.add-url{margin-bottom:0px;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}}.add-url:focus{outline:none}.cancel-button{position:absolute;top:12px;right:20px;font-size:1.875em;color:rgba(255,255,255,0.6);-webkit-transition:color 200ms;-moz-transition:color 200ms;-o-transition:color 200ms;transition:color 200ms}.cancel-button:hover,.cancel-button:active{color:#fff}.response-bar{width:100%;padding:20px;font-size:1.125em;position:relative;top:-100px;-webkit-transition:top 200ms 50ms;-webkit-transition-delay:cubic-bezier(0.36, -0.27, 0.49, 1.29);-moz-transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29);-o-transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29);transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29)}.response-bar .response-text{max-width:900px;margin:0 auto;text-align:center}.response-bar.error{background:#a20237;color:#fff}.response-bar.success{background:#3b620c;color:#fff}.response-bar.show{top:0}footer{background:#f8f8fa url("../img/circle-pattern.png") 50% 44% no-repeat;text-align:center;padding-left:20px;padding-right:20px}@media all and (min-width: 1024px){footer{padding-left:5%;padding-right:5%}}@media all and (min-width: 1500px){footer{padding-left:15%;padding-right:15%}}footer a{color:inherit}footer a:hover,footer a:active{color:#c6538c}@media all and (min-width: 520px){footer .note{width:340px;margin:0 auto}}.footer-wrap{position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.footer-title{font-size:1.75em;margin:0}.authors{color:#888;margin:0;margin-top:0.25em;margin-bottom:0.625em} 2 | -------------------------------------------------------------------------------- /app/css/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v2.1.3 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden],template{display:none}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}a{background:transparent}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:0.67em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}code,kbd,pre,samp{font-family:monospace, serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0} 2 | -------------------------------------------------------------------------------- /app/img/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/.gitignore -------------------------------------------------------------------------------- /app/img/404.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/404.gif -------------------------------------------------------------------------------- /app/img/arrows.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/img/circle-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/circle-pattern.png -------------------------------------------------------------------------------- /app/img/icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 12 | 15 | 19 | 21 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /app/img/logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/logo-dark.png -------------------------------------------------------------------------------- /app/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/logo.png -------------------------------------------------------------------------------- /app/img/sache_square_ad_grey.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/sache_square_ad_grey.jpg -------------------------------------------------------------------------------- /app/img/sache_square_ad_pink.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/sache_square_ad_pink.jpg -------------------------------------------------------------------------------- /app/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/spinner.gif -------------------------------------------------------------------------------- /app/img/wave-pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/app/img/wave-pattern.png -------------------------------------------------------------------------------- /app/js/main.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | var $responseBar = $(".response-bar"); 4 | 5 | $("#submit-form").submit(function(event) { 6 | 7 | event.preventDefault(); 8 | 9 | var $form = $(this), 10 | actionURL = $form.attr('action'), 11 | formData = $form.serialize(); 12 | 13 | 14 | $.ajax({ 15 | url: actionURL, 16 | type: "POST", 17 | data: formData, 18 | beforeSend: function() { 19 | $responseBar.removeClass('show') 20 | $form.addClass('processing'); 21 | $form.find(".button").attr('disabled', true); 22 | }, 23 | complete: function(jqXHR, status) { 24 | $responseBar.find('.response-text').html(jqXHR.responseText); 25 | $responseBar.addClass('show'); 26 | 27 | console.log("complete") 28 | console.log("jqxr: ", jqXHR, " , status: ", status) 29 | console.log('responseText: ', jqXHR.responseText); 30 | $form.removeClass('processing'); 31 | $form.find(".button").removeAttr('disabled', false); 32 | 33 | }, 34 | success: function(e) { 35 | $responseBar.removeClass('error').addClass('success'); 36 | //console.log("success") 37 | if(window.location.pathname === "/") { 38 | $("#main").load("/ #main"); 39 | } 40 | 41 | }, 42 | error: function(jqXHR, textStatus, errorThrown) { 43 | $responseBar.removeClass('success').addClass('error'); 44 | } 45 | }); 46 | }); 47 | 48 | 49 | var $addProject = $('[data-add-project]'), 50 | $modalTarp = $('.modal-tarp'), 51 | $projectModal = $('.add-project'), 52 | $cancelProject = $('[data-cancel-project]'), 53 | $sachesearch = $('.sache-search input'), 54 | fadeSpeed = 200; 55 | 56 | var closeModal = function() { 57 | $modalTarp.fadeOut(fadeSpeed); 58 | $projectModal.removeClass('modal-open'); 59 | $('body').css('position','static'); 60 | $responseBar.removeClass('show'); 61 | } 62 | 63 | // Fade in add project instructions 64 | $addProject.on('click', function(e) { 65 | e.preventDefault(); 66 | e.stopPropagation(); 67 | $modalTarp.fadeIn(fadeSpeed); 68 | $projectModal.addClass('modal-open'); 69 | if ($(window).width() < 768) { 70 | $('body').css('position','fixed'); 71 | } 72 | }); 73 | 74 | // Fade out project instruction 75 | $cancelProject.on('click', function(e) { 76 | e.preventDefault(); 77 | closeModal(); 78 | }); 79 | 80 | 81 | // Handle clicking outside of elements 82 | $('body').on('click', function(e) { 83 | if ($modalTarp.is(':visible')) { 84 | if ($(e.target).is('.modal-tarp')) { 85 | closeModal(); 86 | } 87 | } 88 | }); 89 | 90 | // Esc functions 91 | $(document).keyup(function(e) { 92 | if ($modalTarp.is(':visible')) { 93 | if (e.keyCode == 27) { // esc 94 | closeModal(); 95 | } 96 | } 97 | }); 98 | 99 | $("#main").on('click', 'th a', function() { 100 | 101 | var el = $(this), 102 | data = {sort: el.data('sort'), direction: el.data('direction')}; 103 | 104 | $.ajax({ 105 | url: '/', 106 | data: data, 107 | success: function(data) { 108 | var table = $(data).find(".extensions") 109 | $("#main").html(table); 110 | } 111 | }); 112 | }) 113 | 114 | }); 115 | -------------------------------------------------------------------------------- /app/js/plugins.js: -------------------------------------------------------------------------------- 1 | // Avoid `console` errors in browsers that lack a console. 2 | (function() { 3 | var method; 4 | var noop = function () {}; 5 | var methods = [ 6 | 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 7 | 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 8 | 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 9 | 'timeStamp', 'trace', 'warn' 10 | ]; 11 | var length = methods.length; 12 | var console = (window.console = window.console || {}); 13 | 14 | while (length--) { 15 | method = methods[length]; 16 | 17 | // Only stub undefined methods. 18 | if (!console[method]) { 19 | console[method] = noop; 20 | } 21 | } 22 | }()); 23 | 24 | // Place any jQuery/helper plugins in here. 25 | -------------------------------------------------------------------------------- /app/js/vendor/modernizr-2.6.2.min.js: -------------------------------------------------------------------------------- 1 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 2 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 3 | */ 4 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f 2 | 3 | 4 | 5 | Page Not Found :( 6 | 141 | 142 | 143 |
144 |

Not found :(

145 |

Sorry, but the page you were trying to view does not exist.

146 |

It looks like this was the result of either:

147 |
    148 |
  • a mistyped address
  • 149 |
  • an out-of-date link
  • 150 |
151 | 154 | 155 |
156 | 157 | 158 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### HEAD 2 | 3 | ### 4.3.0 (September 10, 2013) 4 | 5 | * Use one apple-touch-icon instead of six ([#1367](https://github.com/h5bp/html5-boilerplate/issues/1367)). 6 | * Move font-related declarations from `body` to `html` ([#1411](https://github.com/h5bp/html5-boilerplate/issues/1411)). 7 | * Update to Apache Server Configs 1.1.0. 8 | * Add `initial-scale=1` to the viewport `meta` ([#1398](https://github.com/h5bp/html5-boilerplate/pull/1398)). 9 | * Vertical centering for audio-, canvas- and video-tags ([#1326](https://github.com/h5bp/html5-boilerplate/issues/1326)). 10 | * Remove Google Chrome Frame related code ([#1379](https://github.com/h5bp/html5-boilerplate/pull/1379), [#1396](https://github.com/h5bp/html5-boilerplate/pull/1396)). 11 | * Update to Google Universal Analytics ([#1347](https://github.com/h5bp/html5-boilerplate/issues/1347)). 12 | * Update to jQuery 1.10.2. 13 | * Update to Normalize.css 1.1.3. 14 | 15 | ### 4.2.0 (April 8, 2013) 16 | 17 | * Remove Google Analytics protocol check ([#1319](https://github.com/h5bp/html5-boilerplate/pull/1319)). 18 | * Update to Normalize.css 1.1.1. 19 | * Update Apache configurations to include the latest changes in the canonical 20 | [`.htaccess`](https://github.com/h5bp/server-configs-apache) file. 21 | * Use a protocol relative URL for the 404 template script. 22 | * Update to jQuery 1.9.1. 23 | 24 | ### 4.1.0 (January 21, 2013) 25 | 26 | * Update to Normalize.css 1.1.0. 27 | * Update to jQuery 1.9.0. 28 | 29 | ### 4.0.3 (January 12, 2013) 30 | 31 | * Use 32x32 favicon.ico ([#1286](https://github.com/h5bp/html5-boilerplate/pull/1286)). 32 | * Remove named function expression in plugins.js ([#1280](https://github.com/h5bp/html5-boilerplate/pull/1280)). 33 | * Adjust CSS image-replacement code ([#1239](https://github.com/h5bp/html5-boilerplate/issues/1239)). 34 | * Update HiDPI example media query ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 35 | 36 | ### 4.0.2 (December 9, 2012) 37 | 38 | * Update placeholder icons. 39 | * Update to Normalize.css 1.0.2. 40 | * Update to jQuery 1.8.3. 41 | 42 | ### 4.0.1 (October 20, 2012) 43 | 44 | * Further improvements to `console` method stubbing ([#1206](https://github.com/h5bp/html5-boilerplate/issues/1206), [#1229](https://github.com/h5bp/html5-boilerplate/pull/1229)). 45 | * Update to jQuery 1.8.2. 46 | * Update to Modernizr 2.6.2. 47 | * Minor additions to the documentation. 48 | 49 | ### 4.0.0 (August 28, 2012) 50 | 51 | * Improve the Apache compression configuration ([#1012](https://github.com/h5bp/html5-boilerplate/issues/1012), [#1173](https://github.com/h5bp/html5-boilerplate/issues/1173)). 52 | * Add a HiDPI example media query ([#1127](https://github.com/h5bp/html5-boilerplate/issues/1127)). 53 | * Add bundled docs ([#1154](https://github.com/h5bp/html5-boilerplate/issues/1154)). 54 | * Add MIT license ([#1139](https://github.com/h5bp/html5-boilerplate/issues/1139)). 55 | * Update to Normalize.css 1.0.1. 56 | * Separate Normalize.css from the rest of the CSS ([#1160](https://github.com/h5bp/html5-boilerplate/issues/1160)). 57 | * Improve `console.log` protection ([#1107](https://github.com/h5bp/html5-boilerplate/issues/1107)). 58 | * Replace hot pink text selection color with a neutral color. 59 | * Change image replacement technique ([#1149](https://github.com/h5bp/html5-boilerplate/issues/1149)). 60 | * Code format and consistency changes ([#1112](https://github.com/h5bp/html5-boilerplate/issues/1112)). 61 | * Rename CSS file and rename JS files and subdirectories. 62 | * Update to jQuery 1.8 ([#1161](https://github.com/h5bp/html5-boilerplate/issues/1161)). 63 | * Update to Modernizr 2.6.1 ([#1086](https://github.com/h5bp/html5-boilerplate/issues/1086)). 64 | * Remove uncompressed jQuery ([#1153](https://github.com/h5bp/html5-boilerplate/issues/1153)). 65 | * Remove superfluous inline comments ([#1150](https://github.com/h5bp/html5-boilerplate/issues/1150)). 66 | 67 | ### 3.0.2 (February 19, 2012) 68 | 69 | * Update to Modernizr 2.5.3. 70 | 71 | ### 3.0.1 (February 08, 2012). 72 | 73 | * Update to Modernizr 2.5.2 (includes html5shiv 3.3). 74 | 75 | ### 3.0.0 (February 06, 2012) 76 | 77 | * Improvements to `.htaccess`. 78 | * Improve 404 design. 79 | * Simplify JS folder structure. 80 | * Change `html` IE class names changed to target ranges rather than specific versions of IE. 81 | * Update CSS to include latest normalize.css changes and better typographic defaults ([#825](https://github.com/h5bp/html5-boilerplate/issues/825)). 82 | * Update to Modernizr 2.5 (includes yepnope 1.5 and html5shiv 3.2). 83 | * Update to jQuery 1.7.1. 84 | * Revert to async snippet for the Google Analytics script. 85 | * Remove the ant build script ([#826](https://github.com/h5bp/html5-boilerplate/issues/826)). 86 | * Remove Respond.js ([#816](https://github.com/h5bp/html5-boilerplate/issues/816)). 87 | * Remove the `demo/` directory ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 88 | * Remove the `test/` directory ([#808](https://github.com/h5bp/html5-boilerplate/issues/808)). 89 | * Remove Google Chrome Frame script for IE6 users; replace with links to Chrome Frame and options for alternative browsers. 90 | * Remove `initial-scale=1` from the viewport `meta` ([#824](https://github.com/h5bp/html5-boilerplate/issues/824)). 91 | * Remove `defer` from all scripts to avoid legacy IE bugs. 92 | * Remove explicit Site Speed tracking for Google Analytics. It's now enabled by default. 93 | 94 | ### 2.0.0 (August 10, 2011) 95 | 96 | * Change starting CSS to be based on normalize.css instead of reset.css ([#500](https://github.com/h5bp/html5-boilerplate/issues/500)). 97 | * Add Respond.js media query polyfill. 98 | * Add Google Chrome Frame script prompt for IE6 users. 99 | * Simplify the `html` conditional comments for modern browsers and add an `oldie` class. 100 | * Update clearfix to use "micro clearfix". 101 | * Add placeholder CSS MQs for mobile-first approach. 102 | * Add `textarea { resize: vertical; }` to only allow vertical resizing. 103 | * Add `img { max-width: 100%; }` to the print styles; prevents images being truncated. 104 | * Add Site Speed tracking for Google Analytics. 105 | * Update to jQuery 1.6.2 (and use minified by default). 106 | * Update to Modernizr 2.0 Complete, Production minified (includes yepnope, html5shiv, and Respond.js). 107 | * Use `Modernizr.load()` to load the Google Analytics script. 108 | * Much faster build process. 109 | * Add build script options for CSSLint, JSLint, JSHint tools. 110 | * Build script now compresses all images in subfolders. 111 | * Build script now versions files by SHA hash. 112 | * Many `.htaccess` improvements including: disable directory browsing, improved support for all versions of Apache, more robust and extensive HTTP compression rules. 113 | * Remove `handheld.css` as it has very poor device support. 114 | * Remove touch-icon `link` elements from the HTML and include improved touch-icon support. 115 | * Remove the cache-busting query paramaters from files references in the HTML. 116 | * Remove IE6 PNGFix. 117 | 118 | ### 1.0.0 (March 21, 2011) 119 | 120 | * Rewrite build script to make it more customizable and flexible. 121 | * Add a humans.txt. 122 | * Numerous `.htaccess` improvements (including inline documentation). 123 | * Move the alternative server configurations to the H5BP server configs repo. 124 | * Use a protocol-relative url to reference jQuery and prevent mixed content warnings. 125 | * Optimize the Google Analytics snippet. 126 | * Use Eric Meyer's recent CSS reset update and the HTML5 Doctor reset. 127 | * More robust `sub`/`sup` CSS styles. 128 | * Add keyboard `.focusable` helper class that extends `.visuallyhidden`. 129 | * Print styles no longer print hash or JavaScript links. 130 | * Add a print reset for IE's proprietary filters. 131 | * Remove IE9-specific conditional class on the `html` element. 132 | * Remove margins from lists within `nav` elements. 133 | * Remove YUI profiling. 134 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to HTML5 Boilerplate 2 | 3 | ♥ [HTML5 Boilerplate](http://html5boilerplate.com) and want to get involved? 4 | Thanks! There are plenty of ways you can help! 5 | 6 | Please take a moment to review this document in order to make the contribution 7 | process easy and effective for everyone involved. 8 | 9 | Following these guidelines helps to communicate that you respect the time of 10 | the developers managing and developing this open source project. In return, 11 | they should reciprocate that respect in addressing your issue or assessing 12 | patches and features. 13 | 14 | 15 | ## Using the issue tracker 16 | 17 | The [issue tracker](https://github.com/h5bp/html5-boilerplate/issues) is 18 | the preferred channel for [bug reports](#bugs), [features requests](#features) 19 | and [submitting pull requests](#pull-requests), but please respect the following 20 | restrictions: 21 | 22 | * Please **do not** use the issue tracker for personal support requests (use 23 | [Stack Overflow](http://stackoverflow.com/questions/tagged/html5boilerplate) 24 | or IRC). 25 | 26 | * Please **do not** derail or troll issues. Keep the discussion on topic and 27 | respect the opinions of others. 28 | 29 | * Please **do not** open issues or pull requests regarding the code in 30 | [`.htaccess`](https://github.com/h5bp/server-configs-apache), 31 | [`jQuery`](https://github.com/jquery/jquery/), 32 | [`Modernizr`](https://github.com/Modernizr/Modernizr) or 33 | [`Normalize.css`](https://github.com/necolas/normalize.css) (open them in 34 | their respective repositories). 35 | 36 | 37 | 38 | ## Bug reports 39 | 40 | A bug is a _demonstrable problem_ that is caused by the code in the repository. 41 | Good bug reports are extremely helpful - thank you! 42 | 43 | Guidelines for bug reports: 44 | 45 | 1. **Use the GitHub issue search** — check if the issue has already been 46 | reported. 47 | 48 | 2. **Check if the issue has been fixed** — try to reproduce it using the 49 | latest `master` or development branch in the repository. 50 | 51 | 3. **Isolate the problem** — ideally create a [reduced test 52 | case](http://css-tricks.com/6263-reduced-test-cases/) and a live example. 53 | 54 | A good bug report shouldn't leave others needing to chase you up for more 55 | information. Please try to be as detailed as possible in your report. What is 56 | your environment? What steps will reproduce the issue? What browser(s) and OS 57 | experience the problem? What would you expect to be the outcome? All these 58 | details will help people to fix any potential bugs. 59 | 60 | Example: 61 | 62 | > Short and descriptive example bug report title 63 | > 64 | > A summary of the issue and the browser/OS environment in which it occurs. If 65 | > suitable, include the steps required to reproduce the bug. 66 | > 67 | > 1. This is the first step 68 | > 2. This is the second step 69 | > 3. Further steps, etc. 70 | > 71 | > `` - a link to the reduced test case 72 | > 73 | > Any other information you want to share that is relevant to the issue being 74 | > reported. This might include the lines of code that you have identified as 75 | > causing the bug, and potential solutions (and your opinions on their 76 | > merits). 77 | 78 | 79 | 80 | ## Feature requests 81 | 82 | Feature requests are welcome. But take a moment to find out whether your idea 83 | fits with the scope and aims of the project. It's up to *you* to make a strong 84 | case to convince the project's developers of the merits of this feature. Please 85 | provide as much detail and context as possible. 86 | 87 | 88 | 89 | ## Pull requests 90 | 91 | Good pull requests - patches, improvements, new features - are a fantastic 92 | help. They should remain focused in scope and avoid containing unrelated 93 | commits. 94 | 95 | **Please ask first** before embarking on any significant pull request (e.g. 96 | implementing features, refactoring code, porting to a different language), 97 | otherwise you risk spending a lot of time working on something that the 98 | project's developers might not want to merge into the project. 99 | 100 | Please adhere to the coding conventions used throughout a project (indentation, 101 | accurate comments, etc.) and any other requirements (such as test coverage). 102 | 103 | Adhering to the following this process is the best way to get your work 104 | included in the project: 105 | 106 | 1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, 107 | and configure the remotes: 108 | 109 | ```bash 110 | # Clone your fork of the repo into the current directory 111 | git clone https://github.com//html5-boilerplate.git 112 | # Navigate to the newly cloned directory 113 | cd html5-boilerplate 114 | # Assign the original repo to a remote called "upstream" 115 | git remote add upstream https://github.com/h5bp/html5-boilerplate.git 116 | ``` 117 | 118 | 2. If you cloned a while ago, get the latest changes from upstream: 119 | 120 | ```bash 121 | git checkout master 122 | git pull upstream master 123 | ``` 124 | 125 | 3. Create a new topic branch (off the main project development branch) to 126 | contain your feature, change, or fix: 127 | 128 | ```bash 129 | git checkout -b 130 | ``` 131 | 132 | 4. Commit your changes in logical chunks. Please adhere to these [git commit 133 | message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 134 | or your code is unlikely be merged into the main project. Use Git's 135 | [interactive rebase](https://help.github.com/articles/interactive-rebase) 136 | feature to tidy up your commits before making them public. 137 | 138 | 5. Locally merge (or rebase) the upstream development branch into your topic branch: 139 | 140 | ```bash 141 | git pull [--rebase] upstream master 142 | ``` 143 | 144 | 6. Push your topic branch up to your fork: 145 | 146 | ```bash 147 | git push origin 148 | ``` 149 | 150 | 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/) 151 | with a clear title and description. 152 | 153 | **IMPORTANT**: By submitting a patch, you agree to allow the project owners to 154 | license your work under the the terms of the [MIT License](LICENSE.md). 155 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) HTML5 Boilerplate 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/README.md: -------------------------------------------------------------------------------- 1 | # [HTML5 Boilerplate](http://html5boilerplate.com) 2 | 3 | HTML5 Boilerplate is a professional front-end template for building fast, 4 | robust, and adaptable web apps or sites. 5 | 6 | This project is the product of many years of iterative development and combined 7 | community knowledge. It does not impose a specific development philosophy or 8 | framework, so you're free to architect your code in the way that you want. 9 | 10 | * Source: [https://github.com/h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate) 11 | * Homepage: [http://html5boilerplate.com](http://html5boilerplate.com) 12 | * Twitter: [@h5bp](http://twitter.com/h5bp) 13 | 14 | 15 | ## Quick start 16 | 17 | Choose one of the following options: 18 | 19 | 1. Download the latest stable release from 20 | [html5boilerplate.com](http://html5boilerplate.com/) or a custom build from 21 | [Initializr](http://www.initializr.com). 22 | 2. Clone the git repo — `git clone 23 | https://github.com/h5bp/html5-boilerplate.git` - and checkout the tagged 24 | release you'd like to use. 25 | 26 | 27 | ## Features 28 | 29 | * HTML5 ready. Use the new elements with confidence. 30 | * Cross-browser compatible (Chrome, Opera, Safari, Firefox 3.6+, IE6+). 31 | * Designed with progressive enhancement in mind. 32 | * Includes [Normalize.css](http://necolas.github.com/normalize.css/) for CSS 33 | normalizations and common bug fixes. 34 | * The latest [jQuery](http://jquery.com/) via CDN, with a local fallback. 35 | * The latest [Modernizr](http://modernizr.com/) build for feature detection. 36 | * IE-specific classes for easier cross-browser control. 37 | * Placeholder CSS Media Queries. 38 | * Useful CSS helpers. 39 | * Default print CSS, performance optimized. 40 | * Protection against any stray `console.log` causing JavaScript errors in 41 | IE6/7. 42 | * An optimized Google Analytics snippet. 43 | * Apache server caching, compression, and other configuration defaults for 44 | Grade-A performance. 45 | * Cross-domain Ajax and Flash. 46 | * "Delete-key friendly." Easy to strip out parts you don't need. 47 | * Extensive inline and accompanying documentation. 48 | 49 | 50 | ## Documentation 51 | 52 | Take a look at the [documentation table of contents](doc/TOC.md). This 53 | documentation is bundled with the project, which makes it readily available for 54 | offline reading and provides a useful starting point for any documentation you 55 | want to write about your project. 56 | 57 | 58 | ## Contributing 59 | 60 | Anyone and everyone is welcome to [contribute](CONTRIBUTING.md). Hundreds of 61 | developers have helped make the HTML5 Boilerplate what it is today. 62 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/bower_components/html5-boilerplate/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/crossdomain.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/TOC.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) 2 | 3 | # HTML5 Boilerplate documentation: 4 | 5 | ## Getting started 6 | 7 | * [Usage](usage.md) — Overview of the project contents. 8 | * [FAQ](faq.md) — Frequently asked questions, along with their answers. 9 | 10 | ## The core of HTML5 Boilerplate 11 | 12 | * [HTML](html.md) — A guide to the default HTML. 13 | * [CSS](css.md) — A guide to the default CSS. 14 | * [JavaScript](js.md) — A guide to the default JavaScript. 15 | * [.htaccess](https://github.com/h5bp/server-configs-apache/tree/master/doc) 16 | — All about the Apache web server configs (also see our [alternative server 17 | configs](https://github.com/h5bp/server-configs/blob/master/README.md)). 18 | * [crossdomain.xml](crossdomain.md) — An introduction to making use of 19 | crossdomain requests. 20 | * [Everything else](misc.md). 21 | 22 | ## Development 23 | 24 | * [Extending and customizing HTML5 Boilerplate](extend.md) — Going further with 25 | the boilerplate. 26 | 27 | ## Related projects 28 | 29 | HTML5 Boilerplate has several related projects to help improve the performance 30 | of your site/app in various production environments. 31 | 32 | * [Server configs](https://github.com/h5bp/server-configs) — Configs for 33 | different servers. 34 | * [Node build script](https://github.com/h5bp/node-build-script) — A 35 | feature-rich [grunt](https://github.com/gruntjs/grunt) plugin. 36 | * [Ant build script](https://github.com/h5bp/ant-build-script) — The original 37 | HTML5 Boilerplate build script. 38 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/crossdomain.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # crossdomain.xml 5 | 6 | A cross-domain policy file is an XML document that grants a web client—such as 7 | Adobe Flash Player, Adobe Reader, etc., permission to handle data across 8 | multiple domains. When a client hosts content from a particular source domain 9 | and that content makes requests directed towards a domain other than its own, 10 | the remote domain would need to host a cross-domain policy file that grants 11 | access to the source domain, allowing the client to continue with the 12 | transaction. Policy files grant read access to data, permit a client to include 13 | custom headers in cross-domain requests, and are also used with sockets to 14 | grant permissions for socket-based connections. 15 | 16 | For full details, check out Adobe's article about the [cross-domain policy file 17 | specification](http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html). 18 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/css.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The CSS 5 | 6 | The HTML5 Boilerplate starting CSS includes: 7 | 8 | * [Normalize.css](https://github.com/necolas/normalize.css). 9 | * Useful HTML5 Boilerplate defaults. 10 | * Common helpers. 11 | * Placeholder media queries. 12 | * Print styles. 13 | 14 | This starting CSS does not rely on the presence of conditional classnames, 15 | conditional style sheets, or Modernizr. It is ready to use whatever your 16 | development preferences happen to be. 17 | 18 | 19 | ## Normalize.css 20 | 21 | Normalize.css is a modern, HTML5-ready alternative to CSS resets. It contains 22 | extensive inline documentation. Please refer to the [Normalize.css 23 | project](http://necolas.github.com/normalize.css/) for more information. 24 | 25 | 26 | ## HTML5 Boilerplate defaults 27 | 28 | This project includes a handful of base styles that build upon Normalize.css. 29 | These include: 30 | 31 | * Basic typography settings to provide improved text readability by default. 32 | * Protection against unwanted `text-shadow` during text highlighting. 33 | * Tweaks to default image alignment, fieldsets, and textareas. 34 | * A pretty Chrome Frame prompt. 35 | 36 | You are free to modify or add to these base styles as your project requires. 37 | 38 | 39 | ## Common helpers 40 | 41 | #### `.ir` 42 | 43 | Add the `.ir` class to any element you are applying image-replacement to. When 44 | replacing an element's content with an image, make sure to also set a specific 45 | `background-image: url(pathtoimage.png);`, `width`, and `height` so that your 46 | replacement image appears. 47 | 48 | #### `.hidden` 49 | 50 | Add the `.hidden` class to any elements that you want to hide from all 51 | presentations, including screen readers. It could be an element that will be 52 | populated later with JavaScript or an element you will hide with JavaScript. Do 53 | not use this for SEO keyword stuffing. That is just not cool. 54 | 55 | #### `.visuallyhidden` 56 | 57 | Add the `.visuallyhidden` class to hide text from browsers but make it 58 | available for screen readers. You can use this to hide text that is specific to 59 | screen readers but that other users should not see. [About invisible 60 | content](http://www.webaim.org/techniques/css/invisiblecontent/), [Hiding 61 | content for 62 | accessibility](http://snook.ca/archives/html_and_css/hiding-content-for-accessibility), 63 | [HTML5 Boilerplate 64 | issue/research](https://github.com/h5bp/html5-boilerplate/issues/194/). 65 | 66 | #### `.invisible` 67 | 68 | Add the `.invisible` class to any element you want to hide without affecting 69 | layout. When you use `display: none` an element is effectively removed from the 70 | layout. But in some cases you want the element to simply be invisible while 71 | remaining in the flow and not affecting the positioning of surrounding 72 | content. 73 | 74 | #### `.clearfix` 75 | 76 | Adding `.clearfix` to an element will ensure that it always fully contains its 77 | floated children. There have been many variants of the clearfix hack over the 78 | years, and there are other hacks that can also help you to contain floated 79 | children, but the HTML5 Boilerplate currently uses the [micro 80 | clearfix](http://nicolasgallagher.com/micro-clearfix-hack/). 81 | 82 | 83 | ## Media Queries 84 | 85 | The boilerplate makes it easy to get started with a "Mobile First" and 86 | [Responsive Web 87 | Design](http://www.alistapart.com/articles/responsive-web-design/) approach to 88 | development. But it's worth remembering that there are [no silver 89 | bullets](http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/). 90 | 91 | We include a placeholder Media Queries to build up your mobile styles for wider 92 | viewports and high-resolution displays. It's recommended that you adapt these 93 | Media Queries based on the content of your site rather than mirroring the fixed 94 | dimensions of specific devices. 95 | 96 | If you do not want to take a "Mobile First" approach, you can simply edit or 97 | remove these placeholder Media Queries. One possibility would be to work from 98 | wide viewports down and use `max-width` MQs instead, e.g., `@media only screen 99 | and (max-width: 480px)`. 100 | 101 | Take a look into the [Mobile 102 | Boilerplate](https://github.com/h5bp/mobile-boilerplate) for features that are 103 | useful when developing mobile wep apps. 104 | 105 | 106 | ## Print styles 107 | 108 | * Print styles are inlined to [reduce the number of page 109 | requests](http://www.phpied.com/delay-loading-your-print-css/). 110 | * We strip all background colors, change the font color to black and remove 111 | text-shadow. This is meant to [help save printer ink and make the printing 112 | process much faster](http://www.sanbeiji.com/archives/953). 113 | * Anchors do not need colors to indicate they are linked. They are underlined 114 | to indicate so. 115 | * Anchors and Abbreviations are expanded to indicate where users reading the 116 | printed page can refer to. 117 | * But we do not want to show link text for image replaced elements (given that 118 | they are primarily images). 119 | 120 | ### Paged media styles 121 | 122 | * Paged media is supported only in a [few 123 | browsers](http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29#Grammar_and_rules). 124 | * Paged media support means browsers would know how to interpret instructions 125 | on breaking content into pages and on orphans/widows. 126 | * We use `page-break-inside: avoid;` to prevent an image and table row from 127 | being split into two different pages, so use the same `page-break-inside: 128 | avoid;` for that as well. 129 | * Headings should always appear with the text they are titles for. So, we 130 | ensure headings never appear in a different page than the text they describe 131 | by using `page-break-after: avoid;`. 132 | * We also apply a default margin for the page specified in `cm`. 133 | * We do not want [orphans and 134 | widows](http://en.wikipedia.org/wiki/Widows_and_orphans) to appear on pages 135 | you print. So, by defining `orphans: 3` and `widows: 3` you define the minimal 136 | number of words that every line should contain. 137 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/faq.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Frequently asked questions 5 | 6 | ### Why is the URL for jQuery without "http"? 7 | 8 | This is an intentional use of [protocol-relative 9 | URLs](http://paulirish.com/2010/the-protocol-relative-url/) 10 | 11 | **N.B.** Using a protocol-relative URL for files that exist on a CDN is 12 | problematic when you try to view your local files directly in the browser. The 13 | browser will attempt to fetch the file from your local file system. We 14 | recommend that you use a local server to test your pages (or Dropbox). This can 15 | be done using Python 2.x by running `python -m SimpleHTTPServer` or Python 3.x 16 | with `python -m http.server` from your local directory, using Ruby by installing 17 | and running [asdf](https://rubygems.org/gems/asdf), and by installing any one of 18 | XAMPP, MAMP, or WAMP. 19 | 20 | ### Why don't you automatically load the latest version of jQuery from the Google CDN? 21 | 22 | 1. The latest version of jQuery may not be compatible with the existing 23 | plugins/code on the site. Version updating should be an intentional 24 | decision. 25 | 2. The latest version has a very short `max-age=3600` compares to the specific 26 | version of `max-age=31536000`, which means you won't get the benefits of 27 | long-term caching. 28 | 29 | 30 | ### Why is the Google Analytics code at the bottom? Google recommends it be placed the `head`. 31 | 32 | The advantage to placing it in the `head` is that you will track a user's 33 | pageview even if they leave the page before it has been fully loaded. However, 34 | putting the code at the bottom keeps all the scripts together and reinforces 35 | that scripts at the bottom are the right move. 36 | 37 | 38 | ### How can I integrate [Twitter Bootstrap](http://twitter.github.com/bootstrap/) with HTML5 Boilerplate? 39 | 40 | You can use [Initializr](http://initializr.com) to create a custom build that 41 | includes HTML5 Boilerplate with Twitter Bootstrap. 42 | 43 | Read more about how [HTML5 Boilerplate and Twitter Bootstrap complement each 44 | other](http://www.quora.com/Is-Bootstrap-a-complement-OR-an-alternative-to-HTML5-Boilerplate-or-viceversa/answer/Nicolas-Gallagher). 45 | 46 | 47 | ### How do I prevent phone numbers looking twice as large and having a Skype highlight? 48 | 49 | If this is occurring, it is because a user has the Skype browser extension 50 | installed. 51 | 52 | Use the following CSS to prevent Skype from formatting the numbers on your 53 | page: 54 | 55 | ```css 56 | span.skype_pnh_container { 57 | display: none !important; 58 | } 59 | 60 | span.skype_pnh_print_container { 61 | display: inline !important; 62 | } 63 | ``` 64 | 65 | 66 | ### Do I need to upgrade my sites each time a new version of HTML5 Boilerplate is released? 67 | 68 | No. You don't normally replace the foundations of a house once it has been 69 | built. There is nothing stopping you from trying to work in the latest changes 70 | but you'll have to assess the costs/benefits of doing so. 71 | 72 | 73 | ### Where can I get help for support questions? 74 | 75 | Please ask for help on 76 | [StackOverflow](http://stackoverflow.com/questions/tagged/html5boilerplate). 77 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/html.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The HTML 5 | 6 | ## Conditional `html` classes 7 | 8 | A series of IE conditional comments apply the relevant IE-specific classes to 9 | the `html` tag. This provides one method of specifying CSS fixes for specific 10 | legacy versions of IE. While you may or may not choose to use this technique in 11 | your project code, HTML5 Boilerplate's default CSS does not rely on it. 12 | 13 | When using the conditional classes technique, applying classes to the `html` 14 | element has several benefits: 15 | 16 | * It avoids a [file blocking 17 | issue](http://webforscher.wordpress.com/2010/05/20/ie-6-slowing-down-ie-8/) 18 | discovered by Stoyan Stefanov and Markus Leptien. 19 | * It avoids the need for an empty comment that also fixes the above issue. 20 | * CMSes like WordPress and Drupal use the body class more heavily. This makes 21 | integrating there a touch simpler. 22 | * It still validates as HTML5. 23 | * It uses the same element as Modernizr (and Dojo). That feels nice. 24 | * It can improve the clarity of code in multi-developer teams. 25 | 26 | 27 | ## The `no-js` class 28 | 29 | Allows you to more easily explicitly add custom styles when JavaScript is 30 | disabled (`no-js`) or enabled (`js`). More here: [Avoiding the 31 | FOUC](http://paulirish.com/2009/avoiding-the-fouc-v3/). 32 | 33 | 34 | ## The order of meta tags, and `` 35 | 36 | As recommended by [the HTML5 37 | spec](http://www.whatwg.org/specs/web-apps/current-work/complete/semantics.html#charset) 38 | (4.2.5.5 Specifying the document's character encoding), add your charset 39 | declaration early (before any ASCII art ;) to avoid a potential 40 | [encoding-related security 41 | issue](http://code.google.com/p/doctype-mirror/wiki/ArticleUtf7) in IE. It 42 | should come in the first [1024 43 | bytes](http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#charset). 44 | 45 | The charset should also come before the `<title>` tag, due to [potential XSS 46 | vectors](http://code.google.com/p/doctype-mirror/wiki/ArticleUtf7). 47 | 48 | The meta tag for compatibility mode [needs to be before all elements except 49 | title and meta](http://h5bp.com/f "Defining Document Compatibility - MSDN"). 50 | And that same meta tag can only be invoked for Google Chrome Frame if it is 51 | within the [first 1024 52 | bytes](http://code.google.com/p/chromium/issues/detail?id=23003). 53 | 54 | 55 | ## X-UA-Compatible 56 | 57 | This makes sure the latest version of IE is used in versions of IE that contain 58 | multiple rendering engines. Even if a site visitor is using IE8 or IE9, it's 59 | possible that they're not using the latest rendering engine their browser 60 | contains. To fix this, use: 61 | 62 | ```html 63 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> 64 | ``` 65 | 66 | The `meta` tag tells the IE rendering engine it should use the latest, or edge, 67 | version of the IE rendering environment. 68 | 69 | This `meta` tag ensures that anyone browsing your site in IE is treated to the 70 | best possible user experience that their browser can offer. 71 | 72 | This line breaks validation. To avoid this edge case issue it is recommended 73 | that you **remove this line and use the `.htaccess`** (or other server config) 74 | to send these headers instead. You also might want to read [Validating: 75 | X-UA-Compatible](http://groups.google.com/group/html5boilerplate/browse_thread/thread/6d1b6b152aca8ed2). 76 | 77 | If you are serving your site on a non-standard port, you will need to set this 78 | header on the server-side. This is because the IE preference option 'Display 79 | intranet sites in Compatibility View' is checked by default. 80 | 81 | 82 | ## Mobile viewport 83 | 84 | There are a few different options that you can use with the [`viewport` meta 85 | tag](https://docs.google.com/present/view?id=dkx3qtm_22dxsrgcf4 "Viewport and 86 | Media Queries - The Complete Idiot's Guide"). You can find out more in [the 87 | Apple developer docs](http://j.mp/mobileviewport). HTML5 Boilerplate comes with 88 | a simple setup that strikes a good balance for general use cases. 89 | 90 | ```html 91 | <meta name="viewport" content="width=device-width, initial-scale=1"> 92 | ``` 93 | 94 | ## Favicons and Touch Icon 95 | 96 | The shortcut icons should be put in the root directory of your site. HTML5 97 | Boilerplate comes with a default set of icons (include favicon and one Apple 98 | Touch Icon) that you can use as a baseline to create your own. 99 | 100 | Please refer to the more detailed description in the [Extend section](extend.md) 101 | of these docs. 102 | 103 | ## Modernizr 104 | 105 | HTML5 Boilerplate uses a custom build of Modernizr. 106 | 107 | [Modernizr](http://modernizr.com) is a JavaScript library which adds classes to 108 | the `html` element based on the results of feature test and which ensures that 109 | all browsers can make use of HTML5 elements (as it includes the HTML5 Shiv). 110 | This allows you to target parts of your CSS and JavaScript based on the 111 | features supported by a browser. 112 | 113 | In general, in order to keep page load times to a minimum, it's best to call 114 | any JavaScript at the end of the page because if a script is slow to load 115 | from an external server it may cause the whole page to hang. That said, the 116 | Modernizr script *needs* to run *before* the browser begins rendering the page, 117 | so that browsers lacking support for some of the new HTML5 elements are able to 118 | handle them properly. Therefore the Modernizr script is the only JavaScript 119 | file synchronously loaded at the top of the document. 120 | 121 | 122 | ## The content area 123 | 124 | The central part of the boilerplate template is pretty much empty. This is 125 | intentional, in order to make the boilerplate suitable for both web page and 126 | web app development. 127 | 128 | ### Google Chrome Frame 129 | 130 | The main content area of the boilerplate includes a prompt to install Chrome 131 | Frame (which no longer requires administrative rights) for users of IE 6. If 132 | you intended to support IE 6, then you should remove the snippet of code. 133 | 134 | ### Google CDN for jQuery 135 | 136 | The Google CDN version of the jQuery JavaScript library is referenced towards 137 | the bottom of the page using a protocol-independent path (read more about this 138 | in the [FAQ](faq.md)). A local fallback of jQuery is included for rare instances 139 | when the CDN version might not be available, and to facilitate offline 140 | development. 141 | 142 | Regardless of which JavaScript library you choose to use, it is well worth the 143 | time and effort to look up and reference the Google CDN (Content Delivery 144 | Network) version. Your users may already have this version cached in their 145 | browsers, and Google's CDN is likely to deliver the asset faster than your 146 | server. 147 | 148 | ### Google Analytics Tracking Code 149 | 150 | Finally, an optimized version of the latest Google Analytics tracking code is 151 | included. Google recommends that this script be placed at the top of the page. 152 | Factors to consider: if you place this script at the top of the page, you’ll be 153 | able to count users who don’t fully load the page, and you’ll incur the max 154 | number of simultaneous connections of the browser. 155 | 156 | Further information: 157 | 158 | * [Optimizing the asynchronous Google Analytics 159 | snippet](http://mathiasbynens.be/notes/async-analytics-snippet). 160 | * [Tracking Site Activity - Google 161 | Analytics](http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html). 162 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/js.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # The JavaScript 5 | 6 | Information about the default JavaScript included in the project. 7 | 8 | ## main.js 9 | 10 | This file can be used to contain or reference your site/app JavaScript code. 11 | For larger projects, you can make use of a JavaScript module loader, like 12 | [Require.js](http://requirejs.org/), to load any other scripts you need to 13 | run. 14 | 15 | ## plugins.js 16 | 17 | This file can be used to contain all your plugins, such as jQuery plugins and 18 | other 3rd party scripts. 19 | 20 | One approach is to put jQuery plugins inside of a `(function($){ ... 21 | })(jQuery);` closure to make sure they're in the jQuery namespace safety 22 | blanket. Read more about [jQuery plugin 23 | authoring](http://docs.jquery.com/Plugins/Authoring#Getting_Started) 24 | 25 | ## vendor 26 | 27 | This directory can be used to contain all 3rd party library code. 28 | 29 | Minified versions of the latest jQuery and Modernizr libraries are included by 30 | default. You may wish to create your own [custom Modernizr 31 | build](http://www.modernizr.com/download/). 32 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/misc.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Miscellaneous 5 | 6 | ## .gitignore 7 | 8 | HTML5 Boilerplate includes a basic project-level `.gitignore`. This should 9 | primarily be used to avoid certain project-level files and directories from 10 | being kept under source control. Different development-environments will 11 | benefit from different collections of ignores. 12 | 13 | OS-specific and editor-specific files should be ignored using a "global 14 | ignore" that applies to all repositories on your system. 15 | 16 | For example, add the following to your `~/.gitconfig`, where the `.gitignore` 17 | in your HOME directory contains the files and directories you'd like to 18 | globally ignore: 19 | 20 | ```gitignore 21 | [core] 22 | excludesfile = ~/.gitignore 23 | ``` 24 | 25 | * More on global ignores: http://help.github.com/ignore-files/ 26 | * Comprehensive set of ignores on GitHub: https://github.com/github/gitignore 27 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/doc/usage.md: -------------------------------------------------------------------------------- 1 | [HTML5 Boilerplate homepage](http://html5boilerplate.com) | [Documentation 2 | table of contents](TOC.md) 3 | 4 | # Usage 5 | 6 | Once you have cloned or downloaded HTML5 Boilerplate, creating a site or app 7 | usually involves the following: 8 | 9 | 1. Set up the basic structure of the site. 10 | 2. Add some content, style, and functionality. 11 | 3. Run your site locally to see how it looks. 12 | 4. (Optionally run a build script to automate the optimization of your site - 13 | e.g. [ant build script](https://github.com/h5bp/ant-build-script) or [node 14 | build script](https://github.com/h5bp/node-build-script)). 15 | 5. Deploy your site. 16 | 17 | 18 | ## Basic structure 19 | 20 | A basic HTML5 Boilerplate site initially looks something like this: 21 | 22 | ``` 23 | . 24 | ├── css 25 | │ ├── main.css 26 | │ └── normalize.css 27 | ├── doc 28 | ├── img 29 | ├── js 30 | │ ├── main.js 31 | │ ├── plugins.js 32 | │ └── vendor 33 | │ ├── jquery.min.js 34 | │ └── modernizr.min.js 35 | ├── .htaccess 36 | ├── 404.html 37 | ├── apple-touch-icon-precomposed.png 38 | ├── index.html 39 | ├── humans.txt 40 | ├── robots.txt 41 | ├── crossdomain.xml 42 | └── favicon.ico 43 | ``` 44 | 45 | What follows is a general overview of each major part and how to use them. 46 | 47 | ### css 48 | 49 | This directory should contain all your project's CSS files. It includes some 50 | initial CSS to help get you started from a solid foundation. [About the 51 | CSS](css.md). 52 | 53 | ### doc 54 | 55 | This directory contains all the HTML5 Boilerplate documentation. You can use it 56 | as the location and basis for your own project's documentation. 57 | 58 | ### js 59 | 60 | This directory should contain all your project's JS files. Libraries, plugins, 61 | and custom code can all be included here. It includes some initial JS to help 62 | get you started. [About the JavaScript](js.md). 63 | 64 | ### .htaccess 65 | 66 | The default web server configs are for Apache. For more information, please 67 | refer to the [Apache Server Configs 68 | documentation](https://github.com/h5bp/server-configs-apache/tree/master/doc). 69 | 70 | Host your site on a server other than Apache? You're likely to find the 71 | corresponding server configs project listed in our [Server Configs 72 | ](https://github.com/h5bp/server-configs/blob/master/README.md) repository. 73 | 74 | ### 404.html 75 | 76 | A helpful custom 404 to get you started. 77 | 78 | ### index.html 79 | 80 | This is the default HTML skeleton that should form the basis of all pages on 81 | your site. If you are using a server-side templating framework, then you will 82 | need to integrate this starting HTML with your setup. 83 | 84 | Make sure that you update the URLs for the referenced CSS and JavaScript if you 85 | modify the directory structure at all. 86 | 87 | If you are using Google Analytics, make sure that you edit the corresponding 88 | snippet at the bottom to include your analytics ID. 89 | 90 | ### humans.txt 91 | 92 | Edit this file to include the team that worked on your site/app, and the 93 | technology powering it. 94 | 95 | ### robots.txt 96 | 97 | Edit this file to include any pages you need hidden from search engines. 98 | 99 | ### crossdomain.xml 100 | 101 | A template for working with cross-domain requests. [About 102 | crossdomain.xml](crossdomain.md). 103 | 104 | ### Icons 105 | 106 | Replace the default `favicon.ico` and Apple Touch Icon with your own. 107 | 108 | If you want to use different Apple Touch Icons for different resolutions please 109 | refer to the [according documentation](extend.md#apple-touch-icons). 110 | 111 | You might want to check out Hans' handy [HTML5 Boilerplate Favicon and Apple 112 | Touch Icon 113 | PSD-Template](http://drublic.de/blog/html5-boilerplate-favicons-psd-template/). 114 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jhardy/sache/6160095401f8f0cf28ceb82482dafbef69a4b93e/bower_components/html5-boilerplate/favicon.ico -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/humans.txt: -------------------------------------------------------------------------------- 1 | # humanstxt.org/ 2 | # The humans responsible & technology colophon 3 | 4 | # TEAM 5 | 6 | <name> -- <role> -- <twitter> 7 | 8 | # THANKS 9 | 10 | <name> 11 | 12 | # TECHNOLOGY COLOPHON 13 | 14 | HTML5, CSS3 15 | Normalize.css, jQuery, Modernizr 16 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> 3 | <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> 4 | <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> 5 | <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> 6 | <head> 7 | <meta charset="utf-8"> 8 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> 9 | <title> 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 |

Hello world! This is HTML5 Boilerplate.

26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /bower_components/html5-boilerplate/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org/ 2 | 3 | User-agent: * 4 | -------------------------------------------------------------------------------- /bower_components/jquery-pjax/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pjax", 3 | "version": "1.7.3", 4 | "main": "./jquery.pjax.js", 5 | "dependencies": { 6 | "jquery": ">=1.8" 7 | }, 8 | "ignore": [ 9 | ".travis.yml", 10 | "test/" 11 | ], 12 | "homepage": "https://github.com/defunkt/jquery-pjax", 13 | "_release": "1.7.3", 14 | "_resolution": { 15 | "type": "version", 16 | "tag": "v1.7.3", 17 | "commit": "99300241a530b336410827595ff0820a8de3da42" 18 | }, 19 | "_source": "git://github.com/defunkt/jquery-pjax.git", 20 | "_target": "~1.7.3", 21 | "_originalSource": "jquery-pjax", 22 | "_direct": true 23 | } -------------------------------------------------------------------------------- /bower_components/jquery-pjax/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Chris Wanstrath 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | Software), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /bower_components/jquery-pjax/README.md: -------------------------------------------------------------------------------- 1 | # pjax 2 | 3 | 4 | .--. 5 | / \ 6 | ## a a 7 | ( '._) 8 | |'-- | 9 | _.\___/_ ___pjax___ 10 | ."\> \Y/|<'. '._.-' 11 | / \ \_\/ / '-' / 12 | | --'\_/|/ | _/ 13 | |___.-' | |`'` 14 | | | | 15 | | / './ 16 | /__./` | | 17 | \ | | 18 | \ | | 19 | ; | | 20 | / | | 21 | jgs |___\_.\_ 22 | `-"--'---' 23 | 24 | ## pjax = pushState + ajax 25 | 26 | pjax is a jQuery plugin that uses ajax and pushState to deliver a fast browsing experience with real permalinks, page titles, and a working back button. 27 | 28 | pjax works by grabbing html from your server via ajax and replacing the content of a container on your page with the ajax'd html. It then updates the browser's current url using pushState without reloading your page's layout or any resources (js, css), giving the appearance of a fast, full page load. But really it's just ajax and pushState. 29 | 30 | For [browsers that don't support pushState][compat] pjax fully degrades. 31 | 32 | ## Overview 33 | 34 | pjax is not fully automatic. You'll need to setup and designate a containing element on your page that will be replaced when you navigate your site. 35 | 36 | Consider the following page. 37 | 38 | ``` html 39 | 40 | 41 | 42 | 43 | 44 | 45 |

My Site

46 |
47 | Go to next page. 48 |
49 | 50 | 51 | ``` 52 | 53 | We want pjax to grab the url `/page/2` then replace `#pjax-container` with whatever it gets back. No styles or scripts will be reloaded and even the h1 can stay the same - we just want to change the `#pjax-container` element. 54 | 55 | We do this by telling pjax to listen on `a` tags and use `#pjax-container` as the target container: 56 | 57 | ``` javascript 58 | $(document).pjax('a', '#pjax-container') 59 | ``` 60 | 61 | Now when someone in a pjax-compatible browser clicks "next page" the content of `#pjax-container` will be replaced with the body of `/page/2`. 62 | 63 | Magic! Almost. You still need to configure your server to look for pjax requests and send back pjax-specific content. 64 | 65 | The pjax ajax request sends an `X-PJAX` header so in this example (and in most cases) we want to return just the content of the page without any layout for any requests with that header. 66 | 67 | Here's what it might look like in Rails: 68 | 69 | ``` ruby 70 | def index 71 | if request.headers['X-PJAX'] 72 | render :layout => false 73 | end 74 | end 75 | ``` 76 | 77 | If you'd like a more automatic solution than pjax for Rails check out [Turbolinks](https://github.com/rails/turbolinks). 78 | 79 | Also check out [RailsCasts #294 : Playing with PJAX](http://railscasts.com/episodes/294-playing-with-pjax) 80 | 81 | ## Installation 82 | 83 | ### bower 84 | 85 | Via [bower](https://github.com/twitter/bower). 86 | 87 | ``` 88 | $ bower install jquery-pjax 89 | ``` 90 | 91 | Or add `jquery-pjax` to your apps `bower.json`. 92 | 93 | ``` json 94 | "dependencies": { 95 | "jquery-pjax": "latest" 96 | } 97 | ``` 98 | 99 | ### standalone 100 | 101 | pjax can be downloaded directly into your app's public directory - just be sure you've loaded jQuery first. 102 | 103 | ``` 104 | curl -O https://raw.github.com/defunkt/jquery-pjax/master/jquery.pjax.js 105 | ``` 106 | 107 | **WARNING** Do not hotlink the raw script url. GitHub is not a CDN. 108 | 109 | ## Dependencies 110 | 111 | Requires jQuery 1.8.x or higher. 112 | 113 | ## Compatibility 114 | 115 | pjax only works with [browsers that support the `history.pushState` API][compat]. When the API isn't supported pjax goes into fallback mode: `$.fn.pjax` calls will be a no-op and `$.pjax` will hard load the given url. This mode targets the browser requirements of the jQuery version being used. 116 | 117 | For debugging purposes, you can intentionally disable pjax even if the browser supports `pushState`. Just call `$.pjax.disable()`. To see if pjax is actually supports `pushState`, check `$.support.pjax`. 118 | 119 | ## Usage 120 | 121 | ### `$.fn.pjax` 122 | 123 | Let's talk more about the most basic way to get started: 124 | 125 | ``` javascript 126 | $(document).pjax('a', '#pjax-container') 127 | ``` 128 | 129 | This will enable pjax on all links and designate the container as `#pjax-container`. 130 | 131 | If you are migrating an existing site you probably don't want to enable pjax everywhere just yet. Instead of using a global selector like `a` try annotating pjaxable links with `data-pjax`, then use `'a[data-pjax]'` as your selector. 132 | 133 | Or try this selector that matches any `` links inside a `
` container. 134 | 135 | ``` javascript 136 | $(document).pjax('[data-pjax] a, a[data-pjax]', '#pjax-container') 137 | ``` 138 | 139 | When invoking `$.fn.pjax` there are a few different argument styles you can use: 140 | 141 | 1. `$(document).pjax(delegation selector, options object)` 142 | 2. `$(document).pjax(delegation selector, container selector, options object)` 143 | 144 | In other words: 145 | 146 | 1. The first argument must always be a `String` selector used for delegation. 147 | 2. The second argument can either be a `String` container selector or an options object. 148 | 3. If there are three arguments the second must be the `String` container selector and the third must be the options object. 149 | 150 | ### `$.pjax.click` 151 | 152 | This is a lower level function used by `$.fn.pjax` itself. It allows you to get a little more control over the pjax event handling. 153 | 154 | This example uses the current click context to set an ancestor as the container: 155 | 156 | ``` javascript 157 | if ($.support.pjax) { 158 | $(document).on('click', 'a[data-pjax]', function(event) { 159 | var container = $(this).closest('[data-pjax-container]') 160 | $.pjax.click(event, {container: container}) 161 | }) 162 | } 163 | ``` 164 | 165 | **NOTE** Use the explicit `$.support.pjax` guard. We aren't using `$.fn.pjax` so we should avoid binding this event handler unless the browser is actually going to use pjax. 166 | 167 | ### `$.pjax.submit` 168 | 169 | Submits a form via pjax. This function is experimental but GitHub uses it on [Gist][gist] so give it a shot! 170 | 171 | ``` javascript 172 | $(document).on('submit', 'form[data-pjax]', function(event) { 173 | $.pjax.submit(event, '#pjax-container') 174 | }) 175 | ``` 176 | 177 | ### `$.pjax` 178 | 179 | Manual pjax invocation. Used mainly when you want to start a pjax request in a handler that didn't originate from a click. If you can get access to a click `event`, consider `$.pjax.click(event)` instead. 180 | 181 | ``` javascript 182 | function applyFilters() { 183 | var url = urlForFilters() 184 | $.pjax({url: url, container: '#pjax-container'}) 185 | } 186 | ``` 187 | 188 | ### Events 189 | 190 | pjax fires a number of events regardless of how its invoked. 191 | 192 | All events are fired from the container, not the link was clicked. 193 | 194 | #### start and end 195 | 196 | * `pjax:start` - Fired when pjaxing begins. 197 | * `pjax:end` - Fired when pjaxing ends. 198 | * `pjax:click` - Fired when pjaxified link is clicked. 199 | 200 | This pair events fire anytime a pjax request starts and finishes. This includes pjaxing on `popstate` and when pages are loaded from cache instead of making a request. 201 | 202 | #### ajax related 203 | 204 | * `pjax:beforeSend` - Fired before the pjax request begins. Returning false will abort the request. 205 | * `pjax:send` - Fired after the pjax request begins. 206 | * `pjax:complete` - Fired after the pjax request finishes. 207 | * `pjax:success` - Fired after the pjax request succeeds. 208 | * `pjax:error` - Fired after the pjax request fails. Returning false will prevent the the fallback redirect. 209 | * `pjax:timeout` - Fired if after timeout is reached. Returning false will disable the fallback and will wait indefinitely until the response returns. 210 | 211 | `send` and `complete` are a good pair of events to use if you are implementing a loading indicator. They'll only be triggered if an actual request is made, not if it's loaded from cache. 212 | 213 | ``` javascript 214 | $(document).on('pjax:send', function() { 215 | $('#loading').show() 216 | }) 217 | $(document).on('pjax:complete', function() { 218 | $('#loading').hide() 219 | }) 220 | ``` 221 | 222 | Another protip: disable the fallback timeout behavior if a spinner is being shown. 223 | 224 | ``` javascript 225 | $(document).on('pjax:timeout', function(event) { 226 | // Prevent default timeout redirection behavior 227 | event.preventDefault() 228 | }) 229 | ``` 230 | 231 | ### Server side 232 | 233 | Server configuration will vary between languages and frameworks. The following example shows how you might configure Rails. 234 | 235 | ``` ruby 236 | def index 237 | if request.headers['X-PJAX'] 238 | render :layout => false 239 | end 240 | end 241 | ``` 242 | 243 | An `X-PJAX` request header is set to differentiate a pjax request from normal XHR requests. In this case, if the request is pjax, we skip the layout html and just render the inner contents of the container. 244 | 245 | Check if your favorite server framework supports pjax here: https://gist.github.com/4283721 246 | 247 | #### Layout Reloading 248 | 249 | Layouts can be forced to do a hard reload assets or html changes. 250 | 251 | First set the initial layout version in your header with a custom meta tag. 252 | 253 | ``` html 254 | 255 | ``` 256 | 257 | Then from the server side, set the `X-PJAX-Version` header to the same. 258 | 259 | ``` ruby 260 | if request.headers['X-PJAX'] 261 | response.headers['X-PJAX-Version'] = "v123" 262 | end 263 | ``` 264 | 265 | Deploying a deploy, bumping the version constant to force clients to do a full reload the next request getting the new layout and assets. 266 | 267 | ### Legacy API 268 | 269 | Pre 1.0 versions used an older style syntax that was analogous to the now deprecated `$.fn.live` api. The current api is based off `$.fn.on`. 270 | 271 | ``` javascript 272 | $('a[data-pjax]').pjax('#pjax-container') 273 | ``` 274 | 275 | Expanded to 276 | 277 | ``` javascript 278 | $('a[data-pjax]').live('click', function(event) { 279 | $.pjax.click(event, '#pjax-container') 280 | }) 281 | ``` 282 | 283 | The new api 284 | 285 | ``` javascript 286 | $(document).pjax('a[data-pjax]', '#pjax-container') 287 | ``` 288 | 289 | Which is roughly the same as 290 | 291 | ``` javascript 292 | $(document).on('click', 'a[data-pjax]', function(event) { 293 | $.pjax.click(event, '#pjax-container') 294 | }) 295 | ``` 296 | 297 | **NOTE** The new api gives you control over the delegated element container. `$.fn.live` always bound to `document`. This is what you still want to do most of the time. 298 | 299 | ## Contributing 300 | 301 | ``` 302 | $ git clone https://github.com/defunkt/jquery-pjax.git 303 | $ cd jquery-pjax/ 304 | ``` 305 | 306 | To run the test suite locally, start up the Sinatra test application. 307 | 308 | ``` 309 | $ ruby test/app.rb 310 | == Sinatra/1.3.2 has taken the stage on 4567 for development with backup from WEBrick 311 | 312 | $ open http://localhost:4567/ 313 | ``` 314 | 315 | [compat]: http://caniuse.com/#search=pushstate 316 | [gist]: https://gist.github.com/ 317 | -------------------------------------------------------------------------------- /bower_components/jquery-pjax/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pjax", 3 | "version": "1.7.3", 4 | "main": "./jquery.pjax.js", 5 | "dependencies": { 6 | "jquery": ">=1.8" 7 | }, 8 | "ignore": [ 9 | ".travis.yml", 10 | "test/" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.0", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "main": "jquery.js", 10 | "license": "MIT", 11 | "homepage": "https://github.com/components/jquery", 12 | "_release": "2.1.0", 13 | "_resolution": { 14 | "type": "version", 15 | "tag": "2.1.0", 16 | "commit": "099ad075783a6189f13c1e742e03f9cc95654a27" 17 | }, 18 | "_source": "git://github.com/components/jquery.git", 19 | "_target": ">=1.8", 20 | "_originalSource": "jquery" 21 | } -------------------------------------------------------------------------------- /bower_components/jquery/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /bower_components/jquery/README.md: -------------------------------------------------------------------------------- 1 | jQuery Component 2 | ================ 3 | 4 | Shim [repository](https://github.com/components/jquery) for the [jQuery](http://jquery.com). 5 | 6 | Package Managers 7 | ---------------- 8 | 9 | * [Bower](http://bower.io/): `jquery` 10 | * [Component](https://github.com/component/component): `components/jquery` 11 | * [Composer](http://packagist.org/packages/components/jquery): `components/jquery` 12 | -------------------------------------------------------------------------------- /bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "version": "2.1.0", 4 | "description": "jQuery component", 5 | "keywords": [ 6 | "jquery", 7 | "component" 8 | ], 9 | "main": "jquery.js", 10 | "license": "MIT" 11 | } 12 | -------------------------------------------------------------------------------- /bower_components/jquery/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "repo": "components/jquery", 4 | "version": "2.1.0", 5 | "description": "jQuery component", 6 | "keywords": [ 7 | "jquery", 8 | "component" 9 | ], 10 | "main": "jquery.js", 11 | "scripts": [ 12 | "jquery.js" 13 | ], 14 | "license": "MIT" 15 | } 16 | -------------------------------------------------------------------------------- /bower_components/jquery/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "components/jquery", 3 | "description": "jQuery JavaScript Library", 4 | "type": "component", 5 | "homepage": "http://jquery.com", 6 | "license": "MIT", 7 | "support": { 8 | "irc": "irc://irc.freenode.org/jquery", 9 | "issues": "http://bugs.jquery.com", 10 | "forum": "http://forum.jquery.com", 11 | "wiki": "http://docs.jquery.com/", 12 | "source": "https://github.com/jquery/jquery" 13 | }, 14 | "authors": [ 15 | { 16 | "name": "John Resig", 17 | "email": "jeresig@gmail.com" 18 | } 19 | ], 20 | "require": { 21 | "robloach/component-installer": "*" 22 | }, 23 | "extra": { 24 | "component": { 25 | "scripts": [ 26 | "jquery.js" 27 | ], 28 | "files": [ 29 | "jquery.min.js", 30 | "jquery.min.map", 31 | "jquery-migrate.js", 32 | "jquery-migrate.min.js" 33 | ] 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /bower_components/jquery/jquery-migrate.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Migrate - v1.2.1 - 2013-05-08 3 | * https://github.com/jquery/jquery-migrate 4 | * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT 5 | */ 6 | (function( jQuery, window, undefined ) { 7 | // See http://bugs.jquery.com/ticket/13335 8 | // "use strict"; 9 | 10 | 11 | var warnedAbout = {}; 12 | 13 | // List of warnings already given; public read only 14 | jQuery.migrateWarnings = []; 15 | 16 | // Set to true to prevent console output; migrateWarnings still maintained 17 | // jQuery.migrateMute = false; 18 | 19 | // Show a message on the console so devs know we're active 20 | if ( !jQuery.migrateMute && window.console && window.console.log ) { 21 | window.console.log("JQMIGRATE: Logging is active"); 22 | } 23 | 24 | // Set to false to disable traces that appear with warnings 25 | if ( jQuery.migrateTrace === undefined ) { 26 | jQuery.migrateTrace = true; 27 | } 28 | 29 | // Forget any warnings we've already given; public 30 | jQuery.migrateReset = function() { 31 | warnedAbout = {}; 32 | jQuery.migrateWarnings.length = 0; 33 | }; 34 | 35 | function migrateWarn( msg) { 36 | var console = window.console; 37 | if ( !warnedAbout[ msg ] ) { 38 | warnedAbout[ msg ] = true; 39 | jQuery.migrateWarnings.push( msg ); 40 | if ( console && console.warn && !jQuery.migrateMute ) { 41 | console.warn( "JQMIGRATE: " + msg ); 42 | if ( jQuery.migrateTrace && console.trace ) { 43 | console.trace(); 44 | } 45 | } 46 | } 47 | } 48 | 49 | function migrateWarnProp( obj, prop, value, msg ) { 50 | if ( Object.defineProperty ) { 51 | // On ES5 browsers (non-oldIE), warn if the code tries to get prop; 52 | // allow property to be overwritten in case some other plugin wants it 53 | try { 54 | Object.defineProperty( obj, prop, { 55 | configurable: true, 56 | enumerable: true, 57 | get: function() { 58 | migrateWarn( msg ); 59 | return value; 60 | }, 61 | set: function( newValue ) { 62 | migrateWarn( msg ); 63 | value = newValue; 64 | } 65 | }); 66 | return; 67 | } catch( err ) { 68 | // IE8 is a dope about Object.defineProperty, can't warn there 69 | } 70 | } 71 | 72 | // Non-ES5 (or broken) browser; just set the property 73 | jQuery._definePropertyBroken = true; 74 | obj[ prop ] = value; 75 | } 76 | 77 | if ( document.compatMode === "BackCompat" ) { 78 | // jQuery has never supported or tested Quirks Mode 79 | migrateWarn( "jQuery is not compatible with Quirks Mode" ); 80 | } 81 | 82 | 83 | var attrFn = jQuery( "", { size: 1 } ).attr("size") && jQuery.attrFn, 84 | oldAttr = jQuery.attr, 85 | valueAttrGet = jQuery.attrHooks.value && jQuery.attrHooks.value.get || 86 | function() { return null; }, 87 | valueAttrSet = jQuery.attrHooks.value && jQuery.attrHooks.value.set || 88 | function() { return undefined; }, 89 | rnoType = /^(?:input|button)$/i, 90 | rnoAttrNodeType = /^[238]$/, 91 | rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, 92 | ruseDefault = /^(?:checked|selected)$/i; 93 | 94 | // jQuery.attrFn 95 | migrateWarnProp( jQuery, "attrFn", attrFn || {}, "jQuery.attrFn is deprecated" ); 96 | 97 | jQuery.attr = function( elem, name, value, pass ) { 98 | var lowerName = name.toLowerCase(), 99 | nType = elem && elem.nodeType; 100 | 101 | if ( pass ) { 102 | // Since pass is used internally, we only warn for new jQuery 103 | // versions where there isn't a pass arg in the formal params 104 | if ( oldAttr.length < 4 ) { 105 | migrateWarn("jQuery.fn.attr( props, pass ) is deprecated"); 106 | } 107 | if ( elem && !rnoAttrNodeType.test( nType ) && 108 | (attrFn ? name in attrFn : jQuery.isFunction(jQuery.fn[name])) ) { 109 | return jQuery( elem )[ name ]( value ); 110 | } 111 | } 112 | 113 | // Warn if user tries to set `type`, since it breaks on IE 6/7/8; by checking 114 | // for disconnected elements we don't warn on $( "