diff --git a/.env.example b/.env.example index f03c28f6..24754733 100644 --- a/.env.example +++ b/.env.example @@ -1,39 +1,52 @@ +######### Application Settings ######### + +LANG=en_US.UTF-8 +LC_ALL=en_US.UTF-8 + +# Hawt Service +PRIVATE_ADMIN_PATH=private_admin_path +PRIVATE_URL=http://development:development@localhost:3000 + DISCOUNT_TOKEN=discount_token +REVIEWERS="['Administrator']" +NOTIFIER_ADMIN_EMAILS="['notifier_admin@example.com']" +SUPPORT_EMAIL=support@example.com +SESSION_SECRET=session_secret + +######### Development Settings ######### + +TRUSTED_IP=127.0.0.1 + +# VCR record mode should only be touched if your adding to or updating api backed tests. +# VCR_RECORD_MODE=none #Modes: [new, once, all] + +############### API KEYS ############### + +# GitHub User GITHUB_ADMIN_USER=github_admin_user GITHUB_ADMIN_USER_PASSWORD=github_admin_user_password -GITHUB_CLIENT_ID=github_client_id + +# GitHub Application: https://github.com/settings/applications/new GITHUB_REDIRECT_URL=http://localhost:3000/auth/github/callback +GITHUB_CLIENT_ID=github_client_id GITHUB_SECRET=github_secret -LANG=en_US.UTF-8 -LC_ALL=en_US.UTF-8 - +# LinkedIn LINKEDIN_KEY=linkedin_key LINKEDIN_SECRET=linkedin_secret +# Mailgun MAILGUN_API_KEY=key-mailgun_api_key MAILGUN_DOMAIN=localhost MAILGUN_SIGNATURE=mailgun_signature MAILGUN_TOKEN=mailgun_token +# Mixpanel MIXPANEL_API_SECRET=mixpanel_api_secret MIXPANEL_TOKEN=mixpanel_token -NOTIFIER_ADMIN_EMAILS="['notifier_admin@example.com']" - -PRIVATE_ADMIN_PATH=private_admin_path -PRIVATE_URL=http://development:development@localhost:3000 - -REDIS_URL=redis://localhost:6379 - -REVIEWERS="['Administrator']" - -STRIPE_PUBLISHABLE_KEY=pk_test_stripe_publishable_key -STRIPE_SECRET_KEY=sk_test_BQokikJOvBiI2HlWgH4olfQ2 - -SUPPORT_EMAIL=support@example.com - +# Twitter TWITTER_ACCOUNT_ID=111111111 TWITTER_CONSUMER_KEY=twitter_consumer_key TWITTER_CONSUMER_SECRET=twitter_consumer_secret @@ -41,4 +54,13 @@ TWITTER_OAUTH_SECRET=twitter_oauth_secret TWITTER_OAUTH_TOKEN=twitter_oauth_token TWITTER_REDIRECT_URL=http://localhost:3000/auth/twitter/callback -SESSION_SECRET=session_secret +# Stripe +STRIPE_PUBLISHABLE_KEY=pk_test_stripe_publishable_key +STRIPE_SECRET_KEY=sk_test_stripe_secret_key + +# Akismet +AKISMET_KEY=your_akismet_key +AKISMET_URL=http://localhost:3000/ + +# Code Climate +CODECLIMATE_REPO_TOKEN=unsecure diff --git a/.gitignore b/.gitignore index 4f11b7f8..a15803ee 100644 --- a/.gitignore +++ b/.gitignore @@ -11,15 +11,17 @@ .idea .sass-cache .vagrant +.rspec-local .yardoc /.bundle -/config/application.yml +config/application.yml +config/database.yml /db/*.sqlite3 /db/*.sqlite3-journal /log/*.log /tmp InstalledFiles -Procfile.bashir +Procfile.dev Procfile.test TODO _yardoc @@ -47,7 +49,15 @@ tmp vagrant/cache vagrant/coderwall-box/output-virtualbox-iso/ vagrant/coderwall-box/packer_cache/ -vagrant/coderwall-box/packer_virtualbox-iso_virtualbox.box +vagrant/coderwall-box/*.box vagrant/dotfiles -vcr_cassettes erd.pdf +vagrant.yml +git_stats +*.iml +dump +BACKUP +Guardfile +verification.log +npm-debug.log +dump.rdb diff --git a/.rspec b/.rspec index 9ea47d88..0e668b15 100644 --- a/.rspec +++ b/.rspec @@ -1,4 +1,3 @@ ---require spec_helper --format Fuubar --color --profile diff --git a/.ruby-version b/.ruby-version index 93045150..b1b25a5f 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.1.0 +2.2.2 diff --git a/.travis.yml b/.travis.yml index f5f40c55..ff778e68 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,24 @@ language: ruby rvm: - - 2.1.0 -bundler_args: "--without development production autotest" + - 2.2.2 +cache: bundler +sudo: false +bundler_args: "--without development production" +addons: + postgresql: "9.3" services: - - memcached - - mongodb - redis-server + - elasticsearch before_install: - - wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.5.deb - - sudo dpkg -i elasticsearch-0.20.5.deb - - sudo service elasticsearch start - gem update --system - travis_retry gem install bundler --pre before_script: - cp -f config/database.travis.yml config/database.yml - cp -f .env.example .env - - bin/rake db:create db:schema:load RAILS_ENV=test \ No newline at end of file + - bundle exec rake db:create:all + - bundle exec rake db:schema:load + - bundle exec rake db:migrate + - bundle exec rake db:test:prepare +env: + global: + secure: X7TELzrdZJg8lph9n392igWcUfzWpNUb0wrYvKRIOj1Uz+vT9xrAdv8txJgA/HWwby7gNR3IOcoa3CamxyGCstBnrzKu/xKxk9BYpp5BSfSTLeKrTZf7X45kWc2w70VpgrYUgCmfT1xQxuC7WIgUeqiF7zn7XWogpv8jy6JrFC0= diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1464a462..e65da7f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,40 +1,26 @@ -## **Protip for Contributors** - -When committing a Pull Request for non-application/test code please add [`[skip ci]`](http://docs.travis-ci.com/user/how-to-skip-a-build/) to your commit message. - # Contributing -Here are the steps for getting setup & started with contributing to CoderWall : +Here are the steps for getting setup & started with contributing to Coderwall : 1. Go to [https://assemblymade.com/coderwall](https://assemblymade.com/coderwall) and sign up. 2. Link your GitHub account to your Assembly account in your profile settings. -3. [Fork the code](https://github.com/assemblymade/coderwall). -4. Create a new WIP at [https://assemblymade.com/coderwall/wips](https://assemblymade.com/coderwall/wips). -5. Get vagrant running -6. Run the test suite +3. [Fork assemblymade/coderwall](https://github.com/assemblymade/coderwall). +4. Install Virtualbox and Vagrant +5. Prepare your vagrant.yml and .env files +6. Execute `run.sh` (or `run.bat` on Windows) 7. If you have any issues, jump into chat, introduce yourself and ask or leave a message if no one is around. 8. Find an [interesting bounty](https://assemblymade.com/coderwall/wips) on Assembly or suggest a new one. -9. Fork and then issue a PR when you are done referencing the Bounty. (Note: Only PRs from those with valid Assembly account will be merged). - -You're on your way to having a stake in CoderWall. - -## External Dependencies +9. Issue a PR with your work when it is ready for review. (Note: Only PRs from those with valid Assembly account will be merged). -### Stripe configuration +You're on your way to having a stake in Coderwall. -You'll need to set up a test account with Stripe for local development until this dependency is refactored out of development/test. +# How to set up the environment -## Github configuration +We have videos and text instructions on how to get up and running to develop on Coderwall. -You will need a Github application configured for local development until this dependency is refactored out of development/test. +## Check out our video tutorials on how to get started with developing on Coderwall -https://github.com/settings/applications/new - -## How to run Coderwall locally. - -We use Vagrant to isolate all of our dependencies without polluting your normal working environment. - -You're free to not use Vagrant but by the time you're done setting up you'll probably already have given up and installed Vagrant. +[](http://www.youtube.com/playlist?list=PLhlPwpqjsgvXK4n8FJBbj7KkvuOw8h3FO) ### How to work on Coderwall using Vagrant on VirtualBox @@ -44,7 +30,9 @@ To save time and headaches we use Vagrant. Vagrant is a automation tool for Virt Here's everything you need to get started working on Coderwall with Vagrant TODAY! -*At the time of writing this document we were using VirtualBox 4.3.10 and Vagrant 1.6.2.* +*At the time of writing this document we were using VirtualBox 4.3.20 and Vagrant 1.6.5.* + +**WE ARE USING VIRTUALBOX 4.3.20 DUE TO COMPATABILITY ISSUES WITH VBOX GUEST ADDITIONS.** #### Vagrant! I already know what to do. @@ -52,26 +40,28 @@ __If you're an experienced Vagrant user then you can fetch the base box and regi There's only a VirtualBox basebox right now. - vagrant box add coderwall https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall.box + vagrant box add coderwall_v3 https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall_v3.box #### Vagrant? VirtualBox? Let's take this one step at a time. -If you're running Windows, [here's a guide written by one of our members on how to get set up.](https://github.com/assemblymade/coderwall/docs/getting_started_on_windows.md) +If you're running Windows, [here's a guide written by one of our members on how to get set up.](https://github.com/assemblymade/coderwall/blob/master/docs/getting_started_on_windows.md) 1. **Install VirtualBox** Grab the VirtualBox installer from **[here](https://www.virtualbox.org/wiki/Downloads)**. - _At the time of writing this documentation the current version is VirtualBox 4.3.10._ + [](https://www.virtualbox.org/wiki/Downloads) - You don't have to install the VirtualBox 4.3.10 Oracle VM VirtualBox Extension Pack but I recommend installing it for the extra drivers. + The _required_ version is **VirtualBox 4.3.20.** + + I recommend installing VirtualBox 4.3.20 Oracle VM VirtualBox Extension Pack for the extra drivers. 2. **Install Vagrant** - [Vagrant](http://vagrantup.com) is the recommended way to run CoderWall on your own machine. You need to download and install. - Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**. - _At the time of writing this documentation the current version is Vagrant 1.6.2._ - + [Vagrant](http://vagrantup.com) is the recommended way to run Coderwall on your own machine. You need to download and install. + Grab the Vagrant installer from **[here](http://www.vagrantup.com/downloads.html)**. + _At the time of writing this documentation the current version is Vagrant 1.6.5._ + Follow the installation instructions for your platform on the Vagrant download page. After installing Vagrant we need to add a couple plugins. @@ -79,18 +69,25 @@ If you're running Windows, [here's a guide written by one of our members on how If you're on a OS X/Linux system you can install the plugins by running: vagrant plugin install vagrant-vbguest + vagrant plugin install vagrant-cachier The vagrant-vbguest plugin will each help with keeping the VirtualBox Guest Additions up-to-date. 3. **Git assemblymade/coderwall** - mkdir -p ~/assemblymade - cd ~/assemblymade - - depending on your choice of protocols : _(this will take a while to run so you may want to grab some coffee)_ - * git clone https://github.com/assemblymade/coderwall.git coderwall - * git clone git@github.com:assemblymade/coderwall.git coderwall - + [Fork the code](https://github.com/assemblymade/coderwall) if you haven't already done so. + + mkdir -p ~/assemblymade + cd ~/assemblymade + + Depending on your choice of protocols: _(this will take a while to run so you may want to grab some coffee)_ + * git clone https://github.com/your_username/coderwall.git coderwall + * git clone git@github.com:your_username/coderwall.git coderwall + + Add upstream: + * git remote add upstream https://github.com/assemblymade/coderwall.git + * git remote add upstream git@github.com:assemblymade/coderwall.git + I am going to assume that the project is cloned into your home directory in and into a directory structure like `~/assemblymade/coderwall`. 4. **Fire it up! Fire it up! Fire it up!** @@ -98,11 +95,9 @@ If you're running Windows, [here's a guide written by one of our members on how Now that you've got VirtualBox and Vagrant installed with the source code cloned in `~/assemblymade/coderwall` we can start up the Vagrant instance. cd ~/assemblymade/coderwall - vagrant up - - You will likely be prompted for your `sudo` password to allow VirtualBox to mount the shared folder using NFS. + ./run.sh # or run.bat if you're on Windows - Since this is probably the first time you're running this command it's going to take a VERY long time (bandwidth willing) to run. This is because Vagrant needs to fetch the Coderwall base box from the Internet and it's about 1GB. Fortunately that really only has to be done once (unless the base box get's updated but that's another story). + Since this is probably the first time you're running this command it's going to take a VERY long time (bandwidth willing) to run. This is because Vagrant needs to fetch the Coderwall base box from the Internet and it's about 1.4GB. Fortunately that really only has to be done once (unless the base box get's updated but that's another story). Once Vagrant reports that you're booted up and ready to go then you'll be able to SSH into the local vm similiar to any other remote box. @@ -117,16 +112,16 @@ If you're running Windows, [here's a guide written by one of our members on how Now that you're SSH'ed into the Vagrant VM it's time to run the app. # we're still SSH'ed into Vbox - cd ~/assemblymade - rvm current # should be ruby-2.1.0@coderwall - bundle check # should be a response that everything's good - bundle exec rails server + cd ~/web + rvm current # should be ruby-2.1.2@coderwall + bundle check # should be 'The Gemfile's dependencies are satisfied' + rails s If all went well the Rails server should start up on PORT 3000. Now go open your favorite web browser on you host machine and navigate to [http://localhost:3000](http://localhost:3000). - If all goes well (and if it doesn't then check if another app is running on port 3000 and if there's any logging output being displayed in the window you were running Vagrant in) then you're going to be looking at the CoderWall homepage. + If all goes well (and if it doesn't then check if another app is running on port 3000 and if there's any logging output being displayed in the window you were running Vagrant in) then you're going to be looking at the Coderwall homepage. Congratulations! NOW GET TO WORK! Enough dilly-dallying with your DEV env. @@ -158,7 +153,7 @@ If you're running Windows, [here's a guide written by one of our members on how 7. Gems Installation and Database Migration - Remember that you are using Vagrant, so if you run ```bundle install``` or ```rake db:migrate``` directly in your terminal it will not affect the virtual machine where CoderWall is running. + Remember that you are using Vagrant, so if you run ```bundle install``` or ```rake db:migrate``` directly in your terminal it will not affect the virtual machine where Coderwall is running. In order to run these commands, in the virtual machine, all you have to do is to run ```vagrant provision```. @@ -166,9 +161,43 @@ If you're running Windows, [here's a guide written by one of our members on how If you need to change any environment variable you have to edit ```.env``` file properly and restart Rails server running: - vagrant ssh -c "sudo restart coderwall" + vagrant reload ; ./run.sh 9. **Thanks** - I hope you enjoy working with Vagrant as much as we do and feel free to ask questions if you get stuck or have a problem. You're probably not alone and even if you're the first to encounter a rough patch you won't be the last. \ No newline at end of file + I hope you enjoy working with Vagrant as much as we do and feel free to ask questions if you get stuck or have a problem. You're probably not alone and even if you're the first to encounter a rough patch you won't be the last. + +## External Dependencies + +### Stripe configuration + +You'll need to set up a test account with Stripe for local development until this dependency is refactored out of development/test. + +See [docs/configuration.md](https://github.com/assemblymade/coderwall/blob/master/docs/configuration.md#stripe) for more. + +## Github configuration + +You will need a Github application configured for local development until this dependency is refactored out of development/test. + +- Create a new GitHub application at [https://github.com/settings/applications/new](https://github.com/settings/applications/new). +- Copy the the ENV variables that you'll need from GitHub. + + + +## How to run Coderwall locally. + +We use Vagrant to isolate all of our dependencies without polluting your normal working environment. + +You're free to not use Vagrant but by the time you're done setting up you'll probably already have given up and installed Vagrant. + +## **Protip for Contributors** + +When committing a Pull Request for non-application/test code please add [`[skip ci]`](http://docs.travis-ci.com/user/how-to-skip-a-build/) to your commit message. + +# Code Conventions and Style Guide + +Please refer to the community Ruby & Rails Style Guides created by [bbatsov](https://github.com/bbatsov), author of [Rubocop](https://github.com/bbatsov/rubocop). + +[Ruby Style Guide](https://github.com/bbatsov/ruby-style-guide/blob/master/README.md) +[Rails Style Guide](https://github.com/bbatsov/rails-style-guide/blob/master/README.md) diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..97c7e1a3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM whatupdave/ruby:2.1.5 + +RUN apt-get update -qq && apt-get install -y nodejs + +RUN mkdir /app +WORKDIR /app + +COPY Gemfile Gemfile +COPY Gemfile.lock Gemfile.lock +RUN bundle install + +ADD . /app diff --git a/Gemfile b/Gemfile index 6d08d69d..3daa75c0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,186 +1,187 @@ -source 'https://rubygems.org' +ruby '2.2.2' -ruby '2.1.0' +source 'https://rubygems.org' do + gem 'rails', '~> 3.2' + gem 'rails_latest' -gem 'rails', '~> 3.2' + gem 'sass' + gem 'coffee-rails' + gem 'sass-rails' + gem 'uglifier' +# Assets + gem 'autoprefixer-rails' + gem 'jquery-rails', '= 2.0.3' + gem 'selectize-rails' # Load environment variables first -gem 'dotenv-rails', groups: [:development, :test] - -gem 'strong_parameters' - -# Mongo -gem 'mongoid', '~> 2.4.12' -gem 'mongo', '<= 1.6.2' -gem 'mongoid_taggable' -gem 'bson_ext', '~> 1.3' + gem 'dotenv-rails', groups: [:development, :test] # Attachements -gem 'carrierwave', '0.5.8' -gem 'carrierwave_backgrounder' #background processing of images -gem 'carrierwave-mongoid', '~> 0.1.7', require: 'carrierwave/mongoid' - -# Two Client-side JS frameworks. Yep, first one to refactor out the other wins. -gem 'backbone-on-rails' -gem 'ember-rails', github: 'emberjs/ember-rails' -gem 'jquery-rails', '= 2.0.3' + gem 'carrierwave' + gem 'carrierwave_backgrounder' #background processing of images # HTML -gem 'haml', '3.1.7' -gem 'hamlbars' #haml support for handlebars/ember.js - -# Memcached -gem 'dalli' -gem 'memcachier' + gem 'haml' + gem 'slim-rails' # Postgres -gem 'pg' + gem 'pg' -# AREL support for RDBMS queries -gem 'squeel', '1.0.1' +# Scheduled tasks + gem 'clockwork' # Authentication -gem 'omniauth', '~> 1.1.0' -gem 'omniauth-facebook' -gem 'omniauth-github' -gem 'omniauth-linkedin', '~> 0.0.6' -gem 'omniauth-twitter', '~> 0.0.16' + gem 'omniauth', '~> 1.1.0' + gem 'omniauth-facebook' + gem 'omniauth-github' + gem 'omniauth-linkedin', '~> 0.0.6' + gem 'omniauth-twitter', '~> 0.0.16' # Markdown -gem 'redcarpet' #markdown processing -gem 'kramdown' -gem 'github-markdown' + gem 'redcarpet', ">=3.3.4" + gem 'kramdown' + gem 'github-markdown' # XML -gem 'nokogiri' - -# Hosted on Heroku -gem 'heroku' -gem 'heroku-autoscale', github: 'ndbroadbent/heroku-autoscale' + gem 'nokogiri' # Twitter API client -gem 'grackle' -gem 'twitter' + gem 'grackle' + gem 'twitter' # Paging -gem 'kaminari' + gem 'kaminari' # Date parsing -gem 'chronic' + gem 'chronic' # Redis -gem 'hiredis' -gem 'redis', require: ['redis', 'redis/connection/hiredis'] + gem 'redis-rails', '3.2.4' -# Background Job Processing -gem 'resque' -gem 'resque-scheduler', require: 'resque_scheduler' -gem 'resque_mailer' + + gem 'sidekiq' + gem 'sinatra' # Payment processing -gem 'stripe', github: 'stripe/stripe-ruby' + gem 'stripe' # RSS parsing -gem 'feedjira' - -# ElasticSearch client -gem 'tire', '~> 0.4.1' - -# A/B testing -gem 'split', require: 'split/dashboard' + gem 'feedjira' # HTTP client -gem 'rest-client' + gem 'rest-client' # JSON parser -gem 'multi_json' -gem 'oj' -gem 'active_model_serializers' -gem 'jbuilder' + gem 'multi_json' + gem 'oj' + gem 'jbuilder' # Run app -gem 'foreman' + gem 'foreman' # Better logging -gem 'awesome_print' + gem 'awesome_print' + +# Tagging + gem 'acts-as-taggable-on', '~> 3.4' -# Hangup on long calls -gem 'rack-timeout' + gem 'faraday', '~> 0.8.1' + gem 'metamagic' -gem 'faraday', '~> 0.8.1' # ---------------- -gem 'rocket_tag' - -gem 'acts_as_commentable', '2.0.1' -gem 'acts_as_follower' -gem 'color' -gem 'createsend' -gem 'fog' -gem 'font_assets', '~> 0.1.2' -gem 'geocoder' -gem 'hashie' -gem 'linkedin' -gem 'mail' -gem 'mini_magick' -gem 'mixpanel' -gem 'never_wastes' -gem 'octokit', '~> 1.23.0' -gem 'pubnub', '0.1.9' -gem 'querystring' -gem 'rails_autolink' -gem 'ruby-progressbar' -gem 'sanitize' -gem 'simple_form' -gem 'tweet-button' - -group :assets do - gem 'sass', '~> 3.2.9' - gem 'coffee-rails', '~> 3.2.1' - gem 'compass-rails' - gem 'sass-rails', '~> 3.2.3' - gem 'uglifier', '>= 1.0.3' -end + gem 'acts_as_follower', '0.1.1' + gem 'fog' + gem 'friendly_id', '4.0.10.1' + gem 'geocoder' + gem 'linkedin' + gem 'mini_magick' + gem 'mixpanel' + gem 'never_wastes' + gem 'octokit' + gem 'rakismet' + gem 'sanitize' + gem 'simple_form' + gem 'sitemap_generator' + gem 'tweet-button' + gem 'local_time' + gem 'materialize-sass' + + gem 'closure_tree' + + gem 'elasticsearch-model' + gem 'elasticsearch-rails' -group :development do - gem 'better_errors' - gem 'guard-rspec' - gem 'spring' - gem 'spring-commands-rspec' - gem 'rails-erd' -end + gem 'newrelic_rpm' -group :development, :test do - gem 'quiet_assets' - gem 'jazz_hands' - gem 'launchy' - gem 'letter_opener', github: 'alexrothenberg/letter_opener', branch: 'on_a_server' - gem 'syntax' -end -gem 'mail_view' - -group :test do - gem 'capybara', '~> 1.1' - gem 'database_cleaner' - gem 'fabrication', '1.4.1' - gem 'faker' - gem 'fuubar' - gem 'resque_spec' - gem 'rspec-rails' - gem 'simplecov' - gem 'timecop' - gem 'vcr' - gem 'webmock', '<1.16' +# DROP BEFORE RAILS 4 + gem 'compass-rails' + gem 'strong_parameters' + gem 'postgres_ext' + gem 'test-unit' + gem 'foreigner' + gem 'state_machine' + gem 'activerecord-postgres-json' + gem "mail_view", "~> 2.0.4" + +# ElasticSearch client + gem 'tire' +# /DROP BEFORE RAILS 4 + + group :development do + gem 'better_errors' + gem 'binding_of_caller' + gem 'flog' + gem 'fukuzatsu' + gem 'guard-rspec' + gem 'rails-erd' + gem 'rubocop' + gem 'spring' + gem 'spring-commands-rspec' + gem 'pry-rails' #better console + end + + group :development, :test do + gem 'annotate' + gem 'fabrication', '2.11.3' + gem 'fabrication-rails' + gem 'ffaker' + gem 'launchy' + gem 'pry-byebug' + #gem 'pry-rescue' + #gem 'pry-stack_explorer' + gem 'quiet_assets' + gem 'rspec-rails' + gem 'syntax' + end + + group :test do + gem 'capybara' + gem 'capybara-screenshot' + gem 'rack_session_access' # allows to set session from within Capybara + gem 'poltergeist' # headless js driver for Capybara that uses phantomJs + gem 'selenium-webdriver' # headfull js driver for Capybara + gem 'codeclimate-test-reporter', require: false + gem 'database_cleaner' + gem 'fuubar' + gem 'shoulda-matchers' + gem 'timecop' + gem 'vcr' + gem 'webmock', '<1.16' + gem 'stripe-ruby-mock' + end + + group :production do + gem 'puma', '>=2.15.3' + gem 'rails_12factor' + gem 'heroku-deflater' + gem 'bugsnag' + end end -group :production do - gem 'honeybadger' - gem 'rails_stdout_logging' - gem 'rails_12factor' - gem 'unicorn' - gem 'unicorn-worker-killer' - gem 'newrelic_rpm' - gem 'newrelic_resque_agent' - gem 'le' +source 'https://rails-assets.org' do + gem 'rails-assets-font-awesome' + gem 'rails-assets-jquery-cookie', '1.4.0' + gem 'rails-assets-jquery-dropdown' end diff --git a/Gemfile.lock b/Gemfile.lock index dc682a24..e098f1ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,49 +1,14 @@ -GIT - remote: git://github.com/alexrothenberg/letter_opener.git - revision: 50b077315f11872f1173d092ddf81b9176c9badf - branch: on_a_server - specs: - letter_opener (0.0.2) - fakefs - launchy - -GIT - remote: git://github.com/emberjs/ember-rails.git - revision: bc359f9625d5961d9cd809f8a0e916d1a25f5b56 - specs: - ember-rails (0.8.0) - active_model_serializers - barber - execjs (>= 1.2) - railties (~> 3.1) - -GIT - remote: git://github.com/ndbroadbent/heroku-autoscale.git - revision: fc5a14dc46abe54452a24fdd312856b853a7e142 - specs: - heroku-autoscale (0.2.2) - eventmachine - heroku (~> 2.31.3) - rack (~> 1.0) - -GIT - remote: git://github.com/stripe/stripe-ruby.git - revision: 637d5899f614a6f4d0fa2147f9b3b8b1c8b39b28 - specs: - stripe (1.10.2) - json (~> 1.8.1) - mime-types (~> 1.25) - rest-client (~> 1.4) - GEM remote: https://rubygems.org/ + remote: https://rails-assets.org/ specs: - actionmailer (3.2.18) - actionpack (= 3.2.18) + CFPropertyList (2.3.1) + actionmailer (3.2.22) + actionpack (= 3.2.22) mail (~> 2.5.4) - actionpack (3.2.18) - activemodel (= 3.2.18) - activesupport (= 3.2.18) + actionpack (3.2.22) + activemodel (= 3.2.22) + activesupport (= 3.2.22) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) @@ -51,667 +16,797 @@ GEM rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) - active_model_serializers (0.6.0) - activemodel (>= 3.0) - activemodel (3.2.18) - activesupport (= 3.2.18) + activemodel (3.2.22) + activesupport (= 3.2.22) builder (~> 3.0.0) - activerecord (3.2.18) - activemodel (= 3.2.18) - activesupport (= 3.2.18) + activerecord (3.2.22) + activemodel (= 3.2.22) + activesupport (= 3.2.22) arel (~> 3.0.2) tzinfo (~> 0.3.29) - activeresource (3.2.18) - activemodel (= 3.2.18) - activesupport (= 3.2.18) - activesupport (3.2.18) + activerecord-postgres-json (0.2.1) + activerecord (>= 3.2, < 4) + multi_json + activeresource (3.2.22) + activemodel (= 3.2.22) + activesupport (= 3.2.22) + activesupport (3.2.22) i18n (~> 0.6, >= 0.6.4) multi_json (~> 1.0) - acts_as_commentable (2.0.1) + acts-as-taggable-on (3.5.0) + activerecord (>= 3.2, < 5) acts_as_follower (0.1.1) - addressable (2.3.6) + addressable (2.3.8) + analyst (1.2.0) + haml + parser + thor + annotate (2.6.10) + activerecord (>= 3.2, <= 4.3) + rake (~> 10.4) + ansi (1.5.0) arel (3.0.3) - atomic (1.1.16) - awesome_print (1.2.0) - backbone-on-rails (1.0.0.0) - eco - ejs - jquery-rails - rails (>= 3.1) - barber (0.1.2) + ast (2.0.0) + astrolabe (1.3.1) + parser (~> 2.2) + autoprefixer-rails (5.2.1) execjs - better_errors (1.1.0) + json + awesome_print (1.6.1) + better_errors (2.1.1) coderay (>= 1.0.0) erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - bson (1.7.1) - bson_ext (1.7.1) - bson (~> 1.7.1) + blankslate (3.1.3) buftok (0.2.0) + bugsnag (2.8.10) + json (~> 1.7, >= 1.7.7) builder (3.0.4) - capybara (1.1.2) + byebug (4.0.5) + columnize (= 0.9.0) + capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) - selenium-webdriver (~> 2.0) - xpath (~> 0.1.4) - carrierwave (0.5.8) - activesupport (~> 3.0) - carrierwave-mongoid (0.1.7) - carrierwave (~> 0.5.6) - mongoid (~> 2.1) - carrierwave_backgrounder (0.0.8) + xpath (~> 2.0) + capybara-screenshot (1.0.10) + capybara (>= 1.0, < 3) + launchy + carrierwave (0.10.0) + activemodel (>= 3.2.0) + activesupport (>= 3.2.0) + json (>= 1.7) + mime-types (>= 1.16) + carrierwave_backgrounder (0.4.1) carrierwave (~> 0.5) - childprocess (0.3.6) - ffi (~> 1.0, >= 1.0.6) - choice (0.1.6) - chronic (0.8.0) - chunky_png (1.3.0) + celluloid (0.16.0) + timers (~> 4.0.0) + childprocess (0.5.6) + ffi (~> 1.0, >= 1.0.11) + choice (0.2.0) + chronic (0.10.2) + chunky_png (1.3.4) + cliver (0.3.2) + clockwork (1.2.0) + activesupport + tzinfo + closure_tree (5.2.0) + activerecord (>= 3.2.0) + with_advisory_lock (>= 3.0.0) + codeclimate-test-reporter (0.4.7) + simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.0) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) - coffee-script (2.2.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.4.0) - color (1.4.1) - columnize (0.3.6) - compass (0.12.2) + coffee-script-source (1.9.1.1) + columnize (0.9.0) + compass (1.0.3) chunky_png (~> 1.2) - fssm (>= 0.2.7) - sass (~> 3.1) - compass-rails (1.1.7) - compass (>= 0.12.2) - sprockets (<= 2.11.0) - cookiejar (0.3.0) - coolline (0.4.3) + compass-core (~> 1.0.2) + compass-import-once (~> 1.0.5) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9) + sass (>= 3.3.13, < 3.5) + compass-core (1.0.3) + multi_json (~> 1.0) + sass (>= 3.3.0, < 3.5) + compass-import-once (1.0.5) + sass (>= 3.2, < 3.5) + compass-rails (2.0.4) + compass (~> 1.0.0) + sass-rails (<= 5.0.1) + sprockets (< 2.13) + connection_pool (2.2.0) crack (0.4.2) safe_yaml (~> 1.0.0) - createsend (2.4.0) - hashie (~> 1.0) - httparty (~> 0.8) - json - curb (0.8.5) - dalli (2.6.4) - database_cleaner (0.9.1) + crass (1.0.2) + curb (0.8.8) + dante (0.2.0) + database_cleaner (1.4.1) debug_inspector (0.0.2) - debugger (1.6.5) - columnize (>= 0.3.1) - debugger-linecache (~> 1.2.0) - debugger-ruby_core_source (~> 1.3.1) - debugger-linecache (1.2.0) - debugger-ruby_core_source (1.3.2) - descendants_tracker (0.0.3) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.2.5) - diffy (3.0.1) - docile (1.1.3) - dotenv (0.10.0) - dotenv-rails (0.10.0) - dotenv (= 0.10.0) - eco (1.0.0) - coffee-script - eco-source - execjs - eco-source (1.1.0.rc.1) - ejs (1.1.1) - em-http-request (1.0.3) - addressable (>= 2.2.3) - cookiejar - em-socksify - eventmachine (>= 1.0.0.beta.4) - http_parser.rb (>= 0.5.3) - em-socksify (0.2.1) - eventmachine (>= 1.0.0.beta.4) - equalizer (0.0.9) + docile (1.1.5) + domain_name (0.5.24) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.0.1) + dotenv-rails (2.0.1) + dotenv (= 2.0.1) + elasticsearch (1.0.12) + elasticsearch-api (= 1.0.12) + elasticsearch-transport (= 1.0.12) + elasticsearch-api (1.0.12) + multi_json + elasticsearch-model (0.1.7) + activesupport (> 3) + elasticsearch (> 0.4) + hashie + elasticsearch-rails (0.1.7) + elasticsearch-transport (1.0.12) + faraday + multi_json + equalizer (0.0.11) erubis (2.7.0) escape (0.0.4) - eventmachine (1.0.0) - excon (0.32.0) - execjs (1.4.0) - multi_json (~> 1.0) - fabrication (1.4.1) - fakefs (0.4.2) - faker (1.1.2) - i18n (~> 0.5) + excon (0.45.4) + execjs (2.5.2) + fabrication (2.11.3) + fabrication-rails (0.0.1) + fabrication + railties (>= 3.0) faraday (0.8.9) multipart-post (~> 1.2.0) - faraday_middleware (0.9.1) - faraday (>= 0.7.4, < 0.10) - feedjira (1.2.0) - curb (~> 0.8.1) - loofah (~> 1.2.1) - sax-machine (~> 0.2.1) - ffi (1.9.3) - fog (0.7.2) + feedjira (1.6.0) + curb (~> 0.8) + loofah (~> 2.0) + sax-machine (~> 1.0) + ffaker (2.1.0) + ffi (1.9.10) + fission (0.5.0) + CFPropertyList (~> 2.2) + flog (4.3.2) + ruby_parser (~> 3.1, > 3.1.0) + sexp_processor (~> 4.4) + fog (1.32.0) + fog-atmos + fog-aws (>= 0.6.0) + fog-brightbox (~> 0.4) + fog-core (~> 1.32) + fog-ecloud (= 0.1.1) + fog-google (>= 0.0.2) + fog-json + fog-local + fog-powerdns (>= 0.1.1) + fog-profitbricks + fog-radosgw (>= 0.0.2) + fog-riakcs + fog-sakuracloud (>= 0.0.4) + fog-serverlove + fog-softlayer + fog-storm_on_demand + fog-terremark + fog-vmfusion + fog-voxel + fog-xml (~> 0.1.1) + ipaddress (~> 0.5) + nokogiri (~> 1.5, >= 1.5.11) + fog-atmos (0.1.0) + fog-core + fog-xml + fog-aws (0.7.3) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-brightbox (0.7.2) + fog-core (~> 1.22) + fog-json + inflecto (~> 0.0.2) + fog-core (1.32.0) builder - excon (>= 0.6.1) - formatador (>= 0.1.3) - json + excon (~> 0.45) + formatador (~> 0.2) mime-types + net-scp (~> 1.1) net-ssh (>= 2.1.3) - nokogiri (>= 1.4.4) - ruby-hmac - font_assets (0.1.2) - rack - foreman (0.63.0) - dotenv (>= 0.7) - thor (>= 0.13.6) - formatador (0.2.4) - fssm (0.2.10) - fuubar (1.2.1) - rspec (~> 2.0) - rspec-instafail (~> 0.2.0) - ruby-progressbar (~> 1.0) - geocoder (1.1.4) - github-markdown (0.6.5) - grackle (0.2.1) + fog-ecloud (0.1.1) + fog-core + fog-xml + fog-google (0.0.7) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.2.1) + fog-core (~> 1.27) + fog-powerdns (0.1.1) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-profitbricks (0.0.3) + fog-core + fog-xml + nokogiri + fog-radosgw (0.0.4) + fog-core (>= 1.21.0) + fog-json + fog-xml (>= 0.0.1) + fog-riakcs (0.1.0) + fog-core + fog-json + fog-xml + fog-sakuracloud (1.0.1) + fog-core + fog-json + fog-serverlove (0.1.2) + fog-core + fog-json + fog-softlayer (0.4.7) + fog-core + fog-json + fog-storm_on_demand (0.1.1) + fog-core + fog-json + fog-terremark (0.1.0) + fog-core + fog-xml + fog-vmfusion (0.1.0) + fission + fog-core + fog-voxel (0.1.0) + fog-core + fog-xml + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) + foreigner (1.7.4) + activerecord (>= 3.0.0) + foreman (0.78.0) + thor (~> 0.19.1) + formatador (0.2.5) + friendly_id (4.0.10.1) + activerecord (>= 3.0, < 4.0) + fukuzatsu (2.3.1) + analyst (>= 0.16.0) + haml + parser + rainbow + rouge + terminal-table + thor + fuubar (2.0.0) + rspec (~> 3.0) + ruby-progressbar (~> 1.4) + geocoder (1.2.9) + github-markdown (0.6.8) + grackle (0.3.0) json mime-types oauth - grit (2.5.0) - diff-lcs (~> 1.1) - mime-types (~> 1.15) - posix-spawn (~> 0.3.6) - guard (1.8.3) + guard (2.12.8) formatador (>= 0.2.4) - listen (~> 1.3) - lumberjack (>= 1.0.2) - pry (>= 0.9.10) - thor (>= 0.14.6) - guard-rspec (3.1.0) - guard (>= 1.8) - rspec (~> 2.13) - haml (3.1.7) - hamlbars (1.1.0) - execjs (>= 1.2) - haml - sprockets + listen (>= 2.7, <= 4.0) + lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-rspec (4.6.2) + guard (~> 2.1) + guard-compat (~> 1.1) + rspec (>= 2.99.0, < 4.0) + haml (4.0.6) tilt - hashie (1.2.0) + hashie (2.1.2) hashr (0.0.22) - heroku (2.31.5) - heroku-api (~> 0.3.5) - launchy (>= 0.3.2) - netrc (~> 0.7.7) - rest-client (~> 1.6.1) - rubyzip - heroku-api (0.3.17) - excon (~> 0.27) - multi_json (~> 1.8.2) + heroku-deflater (0.5.3) + rack (>= 1.4.5) hike (1.2.3) - hirb (0.7.1) - hiredis (0.4.5) - honeybadger (1.6.2) - json - http (0.5.0) + hitimes (1.2.2) + http (0.5.1) http_parser.rb - http_parser.rb (0.5.3) - httparty (0.9.0) - multi_json (~> 1.0) - multi_xml - httpauth (0.2.0) - i18n (0.6.9) - jazz_hands (0.5.2) - awesome_print (~> 1.2) - coolline (>= 0.4.2) - hirb (~> 0.7.1) - pry (~> 0.9.12) - pry-debugger (~> 0.2.2) - pry-doc (~> 0.4.6) - pry-git (~> 0.2.3) - pry-rails (~> 0.3.2) - pry-remote (>= 0.1.7) - pry-stack_explorer (~> 0.4.9) - railties (>= 3.0, < 5.0) - jbuilder (2.0.6) + http-cookie (1.0.2) + domain_name (~> 0.5) + http_parser.rb (0.6.0) + httpauth (0.2.1) + i18n (0.7.0) + inflecto (0.0.2) + ipaddress (0.8.0) + jbuilder (2.3.1) activesupport (>= 3.0.0, < 5) multi_json (~> 1.2) + jimson-temp (0.9.5) + blankslate (>= 3.1.2) + multi_json (~> 1.0) + rack (~> 1.4) + rest-client (~> 1.0) journey (1.0.4) jquery-rails (2.0.3) railties (>= 3.1.0, < 5.0) thor (~> 0.14) - json (1.8.1) - jwt (0.1.5) - multi_json (>= 1.0) - kaminari (0.14.1) + json (1.8.3) + jwt (0.1.13) + multi_json (>= 1.5) + kaminari (0.16.3) actionpack (>= 3.0.0) activesupport (>= 3.0.0) - kgio (2.9.2) - kramdown (1.3.3) - launchy (2.4.2) + kramdown (1.8.0) + launchy (2.4.3) addressable (~> 2.3) - le (2.2.6) - libwebsocket (0.1.5) - addressable - linkedin (0.4.6) - hashie (>= 1.2, < 2.1) + linkedin (0.4.7) + hashie (~> 2.0) multi_json (~> 1.0) oauth (~> 0.4) - listen (1.3.1) + listen (3.0.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) - rb-kqueue (>= 0.2) - loofah (1.2.1) - nokogiri (>= 1.4.4) - lumberjack (1.0.5) + local_time (1.0.2) + coffee-rails + loofah (2.0.2) + nokogiri (>= 1.5.9) + lumberjack (1.0.9) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - mail_view (1.0.3) + mail_view (2.0.4) tilt - memcachier (0.0.1) - memoizable (0.2.0) - thread_safe (~> 0.1.3) + materialize-sass (0.97.0) + sass (~> 3.3) + memoizable (0.4.2) + thread_safe (~> 0.3, >= 0.3.1) + metamagic (3.1.7) + rails (>= 3.0.0) method_source (0.8.2) mime-types (1.25.1) - mini_magick (3.5.0) - subexec (~> 0.2.1) - mini_portile (0.5.3) - mixpanel (3.0.2) + mini_magick (4.2.7) + mini_portile (0.6.2) + mixpanel (4.1.1) escape json rack - mongo (1.3.1) - bson (>= 1.3.1) - mongoid (2.4.12) - activemodel (~> 3.1) - mongo (<= 1.6.2) - tzinfo (~> 0.3.22) - mongoid_taggable (0.1.7) - mono_logger (1.1.0) - multi_json (1.8.4) - multi_xml (0.5.1) + multi_json (1.11.2) multipart-post (1.2.0) - net-ssh (2.6.1) - netrc (0.7.7) - never_wastes (0.0.6) - actionpack (>= 3.0.0) + nenv (0.2.0) + net-scp (1.2.1) + net-ssh (>= 2.6.5) + net-ssh (2.9.2) + netrc (0.10.3) + never_wastes (1.0.0) + activerecord (>= 3.0.0) activesupport (>= 3.0.0) - railties (>= 3.0.0) - newrelic_plugin (1.0.3) - faraday (>= 0.8.1) - json - newrelic_resque_agent (1.0.1) - newrelic_plugin (= 1.0.3) - redis (>= 3.0.4) - resque (>= 1.24.1) - newrelic_rpm (3.7.3.204) - nokogiri (1.6.1) - mini_portile (~> 0.5.0) + newrelic_rpm (3.12.1.298) + nokogiri (1.6.6.2) + mini_portile (~> 0.6.0) + nokogumbo (1.4.1) + nokogiri + notiffany (0.0.6) + nenv (~> 0.1) + shellany (~> 0.0) oauth (0.4.7) - oauth2 (0.8.0) + oauth2 (0.8.1) faraday (~> 0.8) httpauth (~> 0.1) jwt (~> 0.1.4) multi_json (~> 1.0) rack (~> 1.2) - octokit (1.23.0) - addressable (~> 2.2) - faraday (~> 0.8) - faraday_middleware (~> 0.9) - hashie (~> 1.2) - multi_json (~> 1.3) - netrc (~> 0.7.7) - oj (2.5.5) - omniauth (1.1.1) - hashie (~> 1.2) + octokit (4.0.1) + sawyer (~> 0.6.0, >= 0.5.3) + oj (2.12.10) + omniauth (1.1.4) + hashie (>= 1.2, < 3) rack - omniauth-facebook (1.4.1) - omniauth-oauth2 (~> 1.1.0) - omniauth-github (1.0.3) + omniauth-facebook (1.6.0) + omniauth-oauth2 (~> 1.1) + omniauth-github (1.1.2) omniauth (~> 1.0) omniauth-oauth2 (~> 1.1) omniauth-linkedin (0.0.8) omniauth-oauth (~> 1.0) - omniauth-oauth (1.0.1) + omniauth-oauth (1.1.0) oauth omniauth (~> 1.0) omniauth-oauth2 (1.1.1) oauth2 (~> 0.8.0) omniauth (~> 1.0) - omniauth-twitter (0.0.16) + omniauth-twitter (0.0.18) multi_json (~> 1.3) omniauth-oauth (~> 1.0) - pg (0.14.1) - polyamorous (0.5.0) - activerecord (~> 3.0) - polyglot (0.3.4) - posix-spawn (0.3.8) - pry (0.9.12.6) - coderay (~> 1.0) - method_source (~> 0.8) + parser (2.2.2.6) + ast (>= 1.1, < 3.0) + pg (0.18.2) + pg_array_parser (0.0.9) + poltergeist (1.6.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + multi_json (~> 1.0) + websocket-driver (>= 0.2.0) + polyglot (0.3.5) + postgres_ext (1.0.0) + activerecord (~> 3.2.0) + pg_array_parser (~> 0.0.9) + power_assert (0.2.3) + powerpack (0.1.1) + pry (0.10.1) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) - pry-debugger (0.2.2) - debugger (~> 1.3) - pry (~> 0.9.10) - pry-doc (0.4.6) - pry (>= 0.9) - yard (>= 0.8) - pry-git (0.2.3) - diffy - grit - pry (>= 0.9.8) - pry-rails (0.3.2) + pry-byebug (3.1.0) + byebug (~> 4.0) + pry (~> 0.10) + pry-rails (0.3.4) pry (>= 0.9.10) - pry-remote (0.1.8) - pry (~> 0.9) - slop (~> 3.0) - pry-stack_explorer (0.4.9.1) - binding_of_caller (>= 0.7) - pry (>= 0.9.11) - pubnub (0.1.9) - em-http-request (>= 1.0.2) - json - querystring (0.1.0) - quiet_assets (1.0.2) + puma (2.15.3) + quiet_assets (1.1.0) railties (>= 3.1, < 5.0) - rack (1.4.5) + rack (1.4.7) rack-cache (1.2) rack (>= 0.4) - rack-protection (1.5.2) + rack-protection (1.5.3) rack rack-ssl (1.3.4) rack - rack-test (0.6.2) + rack-test (0.6.3) rack (>= 1.0) - rack-timeout (0.0.4) - rails (3.2.18) - actionmailer (= 3.2.18) - actionpack (= 3.2.18) - activerecord (= 3.2.18) - activeresource (= 3.2.18) - activesupport (= 3.2.18) + rack_session_access (0.1.1) + builder (>= 2.0.0) + rack (>= 1.0.0) + rails (3.2.22) + actionmailer (= 3.2.22) + actionpack (= 3.2.22) + activerecord (= 3.2.22) + activeresource (= 3.2.22) + activesupport (= 3.2.22) bundler (~> 1.0) - railties (= 3.2.18) - rails-erd (1.1.0) - activerecord (>= 3.0) - activesupport (>= 3.0) - choice (~> 0.1.6) - ruby-graphviz (~> 1.0.4) - rails_12factor (0.0.2) + railties (= 3.2.22) + rails-assets-font-awesome (4.3.0) + rails-assets-jquery (2.1.4) + rails-assets-jquery-cookie (1.4.0) + rails-assets-jquery (>= 1.2) + rails-assets-jquery-dropdown (2.0.0) + rails-assets-jquery (>= 1.8.0) + rails-erd (1.4.1) + activerecord (>= 3.2) + activesupport (>= 3.2) + choice (~> 0.2.0) + ruby-graphviz (~> 1.2) + rails_12factor (0.0.3) rails_serve_static_assets rails_stdout_logging - rails_autolink (1.0.9) - rails (~> 3.1) - rails_serve_static_assets (0.0.1) - rails_stdout_logging (0.0.2) - railties (3.2.18) - actionpack (= 3.2.18) - activesupport (= 3.2.18) + rails_latest (0.0.2) + railties (= 3.2.22) + rails_serve_static_assets (0.0.4) + rails_stdout_logging (0.0.3) + railties (3.2.22) + actionpack (= 3.2.22) + activesupport (= 3.2.22) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) - raindrops (0.13.0) - rake (10.3.1) - rb-fsevent (0.9.4) - rb-inotify (0.9.3) - ffi (>= 0.5.0) - rb-kqueue (0.2.2) + rainbow (2.0.0) + rake (10.4.2) + rakismet (1.5.1) + rb-fsevent (0.9.5) + rb-inotify (0.9.5) ffi (>= 0.5.0) rdoc (3.12.2) json (~> 1.4) - redcarpet (2.2.2) - redis (3.0.7) - redis-namespace (1.4.1) - redis (~> 3.0.4) - resque (1.25.2) - mono_logger (~> 1.0) - multi_json (~> 1.0) - redis-namespace (~> 1.3) - sinatra (>= 0.9.2) - vegas (~> 0.1.2) - resque-scheduler (2.5.5) - mono_logger (~> 1.0) - redis (~> 3.0.4) - resque (~> 1.25.1) - rufus-scheduler (~> 2.0.24) - resque_mailer (2.2.6) - actionmailer (>= 3.0) - resque_spec (0.12.5) - resque (>= 1.19.0) - rspec (>= 2.5.0) - rest-client (1.6.7) - mime-types (>= 1.16) - rocket_tag (0.0.4) - activerecord (>= 3.1.0) - squeel - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.8) - rspec-expectations (2.14.5) - diff-lcs (>= 1.1.3, < 2.0) - rspec-instafail (0.2.4) - rspec-mocks (2.14.6) - rspec-rails (2.14.1) - actionpack (>= 3.0) - activemodel (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - ruby-graphviz (1.0.9) - ruby-hmac (0.4.0) - ruby-progressbar (1.4.1) - rubyzip (1.1.0) - rufus-scheduler (2.0.24) - tzinfo (>= 0.3.22) - safe_yaml (1.0.1) - sanitize (2.1.0) + redcarpet (3.3.4) + redis (3.2.1) + redis-actionpack (3.2.4) + actionpack (~> 3.2.0) + redis-rack (~> 1.4.4) + redis-store (~> 1.1.4) + redis-activesupport (3.2.5) + activesupport (~> 3.2.0) + redis-store (~> 1.1.0) + redis-namespace (1.5.2) + redis (~> 3.0, >= 3.0.4) + redis-rack (1.4.4) + rack (~> 1.4.0) + redis-store (~> 1.1.4) + redis-rails (3.2.4) + redis-actionpack (~> 3.2.4) + redis-activesupport (~> 3.2.4) + redis-store (~> 1.1.4) + redis-store (1.1.5) + redis (>= 2.2) + rest-client (1.8.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 3.0) + netrc (~> 0.7) + rouge (1.9.1) + rspec (3.3.0) + rspec-core (~> 3.3.0) + rspec-expectations (~> 3.3.0) + rspec-mocks (~> 3.3.0) + rspec-core (3.3.2) + rspec-support (~> 3.3.0) + rspec-expectations (3.3.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.3.0) + rspec-mocks (3.3.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.3.0) + rspec-rails (3.3.3) + actionpack (>= 3.0, < 4.3) + activesupport (>= 3.0, < 4.3) + railties (>= 3.0, < 4.3) + rspec-core (~> 3.3.0) + rspec-expectations (~> 3.3.0) + rspec-mocks (~> 3.3.0) + rspec-support (~> 3.3.0) + rspec-support (3.3.0) + rubocop (0.32.1) + astrolabe (~> 1.3) + parser (>= 2.2.2.5, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.4) + ruby-graphviz (1.2.2) + ruby-progressbar (1.7.5) + ruby_parser (3.7.0) + sexp_processor (~> 4.1) + rubyzip (1.1.7) + safe_yaml (1.0.4) + sanitize (4.0.0) + crass (~> 1.0.2) nokogiri (>= 1.4.4) - sass (3.2.17) + nokogumbo (= 1.4.1) + sass (3.4.16) sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) - sax-machine (0.2.1) - nokogiri (~> 1.6.0) - selenium-webdriver (2.26.0) - childprocess (>= 0.2.5) - libwebsocket (~> 0.1.3) + sawyer (0.6.0) + addressable (~> 2.3.5) + faraday (~> 0.8, < 0.10) + sax-machine (1.3.2) + selectize-rails (0.12.1) + selenium-webdriver (2.46.2) + childprocess (~> 0.5) multi_json (~> 1.0) - rubyzip - simple-random (0.9.3) - simple_form (2.0.4) + rubyzip (~> 1.0) + websocket (~> 1.0) + sexp_processor (4.6.0) + shellany (0.0.1) + shoulda-matchers (2.8.0) + activesupport (>= 3.0.0) + sidekiq (3.4.2) + celluloid (~> 0.16.0) + connection_pool (~> 2.2, >= 2.2.0) + json (~> 1.0) + redis (~> 3.2, >= 3.2.1) + redis-namespace (~> 1.5, >= 1.5.2) + simple_form (2.1.3) actionpack (~> 3.0) activemodel (~> 3.0) simple_oauth (0.2.0) - simplecov (0.8.2) + simplecov (0.10.0) docile (~> 1.1.0) - multi_json - simplecov-html (~> 0.8.0) - simplecov-html (0.8.0) - sinatra (1.3.3) - rack (~> 1.3, >= 1.3.6) - rack-protection (~> 1.2) - tilt (~> 1.3, >= 1.3.3) - slop (3.5.0) - split (0.6.1) - redis (>= 2.1) - redis-namespace (>= 1.1.0) - simple-random - sinatra (>= 1.2.6) - spring (1.1.2) - spring-commands-rspec (1.0.2) + json (~> 1.8) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.4.6) + rack (~> 1.4) + rack-protection (~> 1.4) + tilt (>= 1.3, < 3) + sitemap_generator (5.1.0) + builder + slim (3.0.6) + temple (~> 0.7.3) + tilt (>= 1.3.3, < 2.1) + slim-rails (3.0.1) + actionmailer (>= 3.1, < 5.0) + actionpack (>= 3.1, < 5.0) + activesupport (>= 3.1, < 5.0) + railties (>= 3.1, < 5.0) + slim (~> 3.0) + slop (3.6.0) + spring (1.3.6) + spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (2.2.2) + sprockets (2.2.3) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) - squeel (1.0.1) - activerecord (~> 3.0) - activesupport (~> 3.0) - polyamorous (~> 0.5.0) + state_machine (1.2.0) + stripe (1.20.1) + json (~> 1.8.1) + mime-types (>= 1.25, < 3.0) + rest-client (~> 1.4) + stripe-ruby-mock (2.1.1) + dante (>= 0.2.0) + jimson-temp + stripe (= 1.20.1) strong_parameters (0.2.3) actionpack (~> 3.0) activemodel (~> 3.0) activesupport (~> 3.0) railties (~> 3.0) - subexec (0.2.3) - syntax (1.0.0) - thor (0.14.6) - thread_safe (0.1.3) - atomic + syntax (1.2.0) + temple (0.7.6) + terminal-table (1.5.2) + test-unit (3.1.2) + power_assert + thor (0.19.1) + thread_safe (0.3.5) tilt (1.4.1) - timecop (0.5.3) - tire (0.4.3) + timecop (0.7.4) + timers (4.0.1) + hitimes + tire (0.6.2) activemodel (>= 3.0) + activesupport + ansi hashr (~> 0.0.19) - multi_json (~> 1.0) + multi_json (~> 1.3) rake rest-client (~> 1.6) treetop (1.4.15) polyglot polyglot (>= 0.3.1) tweet-button (0.1.0) - twitter (5.1.1) + twitter (5.5.1) addressable (~> 2.3) buftok (~> 0.2.0) - descendants_tracker (~> 0.0.1) - equalizer (~> 0.0.7) + descendants_tracker (~> 0.0.3) + equalizer (~> 0.0.9) faraday (>= 0.8, < 0.10) http (~> 0.5.0) - http_parser.rb (~> 0.5.0) + http_parser.rb (~> 0.6.0) json (~> 1.8) - memoizable (~> 0.2.0) + memoizable (~> 0.4.0) simple_oauth (~> 0.2.0) - tzinfo (0.3.39) - uglifier (1.3.0) + tzinfo (0.3.44) + uglifier (2.7.1) execjs (>= 0.3.0) - multi_json (~> 1.0, >= 1.0.2) - unicorn (4.8.2) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - unicorn-worker-killer (0.4.2) - unicorn (~> 4) - vcr (2.8.0) - vegas (0.1.11) - rack (>= 1.0.0) + json (>= 1.8.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.1) + vcr (2.9.3) webmock (1.15.2) addressable (>= 2.2.7) crack (>= 0.3.2) - xpath (0.1.4) + websocket (1.2.2) + websocket-driver (0.6.1) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + with_advisory_lock (3.0.0) + activerecord (>= 3.2) + thread_safe + xpath (2.0.0) nokogiri (~> 1.3) - yard (0.8.7.3) PLATFORMS ruby DEPENDENCIES - active_model_serializers - acts_as_commentable (= 2.0.1) - acts_as_follower - awesome_print - backbone-on-rails - better_errors - bson_ext (~> 1.3) - capybara (~> 1.1) - carrierwave (= 0.5.8) - carrierwave-mongoid (~> 0.1.7) - carrierwave_backgrounder - chronic - coffee-rails (~> 3.2.1) - color - compass-rails - createsend - dalli - database_cleaner - dotenv-rails - ember-rails! - fabrication (= 1.4.1) - faker - faraday (~> 0.8.1) - feedjira - fog - font_assets (~> 0.1.2) - foreman - fuubar - geocoder - github-markdown - grackle - guard-rspec - haml (= 3.1.7) - hamlbars - hashie - heroku - heroku-autoscale! - hiredis - honeybadger - jazz_hands - jbuilder - jquery-rails (= 2.0.3) - kaminari - kramdown - launchy - le - letter_opener! - linkedin - mail - mail_view - memcachier - mini_magick - mixpanel - mongo (<= 1.6.2) - mongoid (~> 2.4.12) - mongoid_taggable - multi_json - never_wastes - newrelic_resque_agent - newrelic_rpm - nokogiri - octokit (~> 1.23.0) - oj - omniauth (~> 1.1.0) - omniauth-facebook - omniauth-github - omniauth-linkedin (~> 0.0.6) - omniauth-twitter (~> 0.0.16) - pg - pubnub (= 0.1.9) - querystring - quiet_assets - rack-timeout - rails (~> 3.2) - rails-erd - rails_12factor - rails_autolink - rails_stdout_logging - redcarpet - redis - resque - resque-scheduler - resque_mailer - resque_spec - rest-client - rocket_tag - rspec-rails - ruby-progressbar - sanitize - sass (~> 3.2.9) - sass-rails (~> 3.2.3) - simple_form - simplecov - split - spring - spring-commands-rspec - squeel (= 1.0.1) + activerecord-postgres-json! + acts-as-taggable-on (~> 3.4)! + acts_as_follower (= 0.1.1)! + annotate! + autoprefixer-rails! + awesome_print! + better_errors! + binding_of_caller! + bugsnag! + capybara! + capybara-screenshot! + carrierwave! + carrierwave_backgrounder! + chronic! + clockwork! + closure_tree! + codeclimate-test-reporter! + coffee-rails! + compass-rails! + database_cleaner! + dotenv-rails! + elasticsearch-model! + elasticsearch-rails! + fabrication (= 2.11.3)! + fabrication-rails! + faraday (~> 0.8.1)! + feedjira! + ffaker! + flog! + fog! + foreigner! + foreman! + friendly_id (= 4.0.10.1)! + fukuzatsu! + fuubar! + geocoder! + github-markdown! + grackle! + guard-rspec! + haml! + heroku-deflater! + jbuilder! + jquery-rails (= 2.0.3)! + kaminari! + kramdown! + launchy! + linkedin! + local_time! + mail_view (~> 2.0.4)! + materialize-sass! + metamagic! + mini_magick! + mixpanel! + multi_json! + never_wastes! + newrelic_rpm! + nokogiri! + octokit! + oj! + omniauth (~> 1.1.0)! + omniauth-facebook! + omniauth-github! + omniauth-linkedin (~> 0.0.6)! + omniauth-twitter (~> 0.0.16)! + pg! + poltergeist! + postgres_ext! + pry-byebug! + pry-rails! + puma (>= 2.15.3)! + quiet_assets! + rack_session_access! + rails (~> 3.2)! + rails-assets-font-awesome! + rails-assets-jquery-cookie (= 1.4.0)! + rails-assets-jquery-dropdown! + rails-erd! + rails_12factor! + rails_latest! + rakismet! + redcarpet (>= 3.3.4)! + redis-rails (= 3.2.4)! + rest-client! + rspec-rails! + rubocop! + sanitize! + sass! + sass-rails! + selectize-rails! + selenium-webdriver! + shoulda-matchers! + sidekiq! + simple_form! + sinatra! + sitemap_generator! + slim-rails! + spring! + spring-commands-rspec! + state_machine! stripe! - strong_parameters - syntax - timecop - tire (~> 0.4.1) - tweet-button - twitter - uglifier (>= 1.0.3) - unicorn - unicorn-worker-killer - vcr - webmock (< 1.16) + stripe-ruby-mock! + strong_parameters! + syntax! + test-unit! + timecop! + tire! + tweet-button! + twitter! + uglifier! + vcr! + webmock (< 1.16)! + +BUNDLED WITH + 1.11.2 diff --git a/Guardfile b/Guardfile index a236037e..d74e729e 100644 --- a/Guardfile +++ b/Guardfile @@ -1,5 +1,5 @@ group :rspec, halt_on_fail: true do - guard :rspec, failed_mode: :keep, all_on_start: false, all_after_pass: false, cmd: 'bin/rspec spec/' do + guard :rspec, failed_mode: :keep, all_on_start: false, all_after_pass: false, cmd: 'TRAVIS=true bundle exec rspec spec/' do watch(%r{^spec/.+_spec\.rb$}) watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } watch('spec/spec_helper.rb') { "spec" } @@ -12,12 +12,5 @@ group :rspec, halt_on_fail: true do watch(%r{^spec/support/(.+)\.rb$}) { "spec" } watch('config/routes.rb') { "spec/routing" } watch('app/controllers/application_controller.rb') { "spec/controllers" } - - # Capybara features specs - watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" } - - # Capyfeatures and steps - watch(%r{^spec/features/(.+)\.feature$}) - watch(%r{^spec/features/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/features' } end end diff --git a/LICENSE b/LICENSE index dda9ec55..58777e31 100644 --- a/LICENSE +++ b/LICENSE @@ -1,10 +1,661 @@ -Copyright © 2014, Assembly Made, Inc -All rights reserved. +GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 -Redistribution and use in source and binary forms, with or without modification, are permitted and provided that the following conditions are met: + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. -* Any redistribution or use is for noncommercial purposes only and is not redistributed or used in connection with any application that is substantially similar to it (Coderwall). -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + Preamble -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OF BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +<http://www.gnu.org/licenses/>. diff --git a/Procfile b/Procfile index b36bbe9c..49f2ebc7 100644 --- a/Procfile +++ b/Procfile @@ -1,5 +1,3 @@ -web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb -worker: env QUEUE=CRITICAL,HIGH,MEDIUM,LOW,LOWER bundle exec rake resque:work -scheduler: bundle exec rake resque:scheduler -refresher: env QUEUE=REFRESH bundle exec rake resque:work -mailer: env QUEUE=mailer,digest_mailer bundle exec rake resque:work +web: bundle exec puma -C ./config/puma.rb +sidekiq: bundle exec sidekiq -C ./config/sidekiq.yml +clock: bundle exec clockwork app/clock.rb diff --git a/README.md b/README.md index 8bf22de1..ee287e64 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,18 @@ <a href="http://www.coderwall.com/"></a> -[](https://travis-ci.org/assemblymade/coderwall) - -[](https://codeclimate.com/repos/5372500ce30ba06dcb029a39/feed) +[](https://travis-ci.org/assemblymade/coderwall) +[](https://codeclimate.com/github/assemblymade/coderwall) +[](https://codeclimate.com/github/assemblymade/coderwall) +[](https://gemnasium.com/assemblymade/coderwall) +<a href="https://assembly.com/coderwall/bounties?utm_campaign=assemblage&utm_source=coderwall&utm_medium=repo_badge"><img src="http://badger.asm.co/coderwall/badges/tasks.svg" height="20px" alt="Open Tasks" /></a> A community for developers to unlock & share new skills. - -## **Protip for Contributors** - -When committing a Pull Request for non-application/test code please add [`[skip ci]`](http://docs.travis-ci.com/user/how-to-skip-a-build/) to your commit message. - ## Contributing & Getting Started -Please see our [/master/CONTRIBUTING.md](https://github.com/assemblymade/coderwall/blob/master/CONTRIBUTING.md) for instructions on how to set up your development environment for Coderwall. +**IMPORTANT**: Please see our [/master/CONTRIBUTING.md](https://github.com/assemblymade/coderwall/blob/master/CONTRIBUTING.md) for instructions on how to set up your development environment for Coderwall. + +[](https://github.com/assemblymade/coderwall/blob/master/CONTRIBUTING.md) ## Built With @@ -21,9 +20,7 @@ Coderwall is built from the following open source components: - [Backbone.js](https://github.com/jashkenas/backbone) - [ElasticSearch](http://www.elasticsearch.org/) -- [Ember.js](https://github.com/emberjs/ember.js) - [jQuery](http://jquery.com/) -- [MongoDB](http://mongodb.org/) - [PostgreSQL](http://www.postgresql.org/) - [Redis](http://redis.io/) - [Ruby on Rails](https://github.com/rails/rails) @@ -32,16 +29,4 @@ Plus *lots* of Ruby Gems, a complete list of which is at [/master/Gemfile](https We use [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) to isolate and simplify the local development process. - -## Copyright / License - -Copyright © 2014, Assembly Made, Inc -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted and provided that the following conditions are met: - -* Any redistribution or use is for noncommercial purposes only and is not redistributed or used in connection with any application that is substantially similar to it (Coderwall). -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OF BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +See our [YouTube videos](https://www.youtube.com/playlist?list=PLhlPwpqjsgvXK4n8FJBbj7KkvuOw8h3FO).... diff --git a/Rakefile b/Rakefile index 1b1662f4..1e1d001f 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,6 @@ require File.expand_path('../config/application', __FILE__) require 'rake' -Badgiy::Application.load_tasks +Coderwall::Application.load_tasks + +task default: :spec diff --git a/Vagrantfile b/Vagrantfile index 713b75a3..85752e03 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,15 +1,33 @@ # -*- mode: ruby -*- # vi: set ft=ruby : +# Load in custom vagrant settings +raise <<-EOF unless File.exists?("vagrant.yml") + + Hi! Before getting started with Vagrant and Coderwall + you'll need to setup the `vagrant.yml`. There should + be a file `vagrant.yml.example` that you can use as + a base reference. Copy the `vagrant.yml.example` to + `vagrant.yml` to get started. + +EOF + +require 'yaml' +custom_settings = File.file?('vagrant.yml') ? YAML.load_file('vagrant.yml') : {} + +if ENV['VAGRANT_DEBUG'] + puts '== Using Custom Vagrant Settings ==' + puts custom_settings.inspect +end + VAGRANTFILE_API_VERSION = "2" -$box = 'coderwall' -# The box is 1GB. Prepare yourself. -#$box_url = 'http://cdn.coderwall.com/vagrant/coderwall.box' -$box_url = 'https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall.box' +$box = 'coderwall_v3' +$box_url = 'https://s3.amazonaws.com/coderwall-assets-0/vagrant/coderwall_v3.box' # The box is 1.4GB. $provision = 'vagrant/bootstrap.sh' Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = $box config.vm.box_url = $box_url config.vm.provision :shell do |s| @@ -21,24 +39,24 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.network :private_network, ip: '192.168.237.95' # 192.168.cdr.wl - # Rails - config.vm.network :forwarded_port, guest: 3000, host: 3000 - - # Postgres - config.vm.network :forwarded_port, guest: 5432, host: 2200 - # Redis - config.vm.network :forwarded_port, guest: 6379, host: 2201 - # ElasticSearch - config.vm.network :forwarded_port, guest: 9200, host: 9200 - # MongoDB - config.vm.network :forwarded_port, guest: 27017, host: 27017 + set_port_mapping_for(config, 'elasticsearch', 9200, custom_settings) + set_port_mapping_for(config, 'postgres', 5432, custom_settings) + set_port_mapping_for(config, 'redis', 6379, custom_settings) + set_port_mapping_for(config, 'rails', 3000, custom_settings, true) - config.vm.synced_folder '.', '/home/vagrant/web', nfs: true + config.vm.synced_folder '.', '/home/vagrant/web', nfs: custom_settings['use_nfs'] config.vm.provider :virtualbox do |vb| - vb.customize ['modifyvm', :id, '--cpus', '4'] + # Use custom settings unless they don't exist + if virtualbox_settings = custom_settings['virtualbox'] + vb.customize ['modifyvm', :id, '--cpus', "#{virtualbox_settings['cpus'] || 2}"] + vb.customize ['modifyvm', :id, '--memory', "#{virtualbox_settings['memory'] || 2048}"] + else + vb.customize ['modifyvm', :id, '--cpus', '2'] + vb.customize ['modifyvm', :id, '--memory', '2048'] + end + vb.customize ['modifyvm', :id, '--ioapic', 'on'] - vb.customize ['modifyvm', :id, '--memory', '4096'] # https://github.com/mitchellh/vagrant/issues/1807 # whatupdave: my VM was super slow until I added these: @@ -47,6 +65,36 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # seems to be safe to run: https://github.com/griff/docker/commit/e5239b98598ece4287c1088e95a2eaed585d2da4 end - config.vbguest.auto_update = true - config.vbguest.no_remote = false + if Vagrant.has_plugin?('vagrant-vbguest') + config.vbguest.auto_update = true + config.vbguest.no_remote = false + else + puts "Please install the 'vagrant-vbguest' plugin" + end + + if Vagrant.has_plugin?('vagrant-cachier') + config.cache.scope = :box + else + puts "Please install the 'vagrant-cachier' plugin" + end +end + +def set_port_mapping_for(config, service, guest_port, settings, force = false) + if settings['network'] && settings['network']['port_mappings'] && settings['network']['port_mappings'][service] + host_port = settings['network']['port_mappings'][service] + + if ENV['VAGRANT_DEBUG'] + puts " !! Setting up port mapping rule for #{service} host:#{host_port} => guest:#{guest_port}" + end + config.vm.network(:forwarded_port, guest: guest_port, host: host_port) + else + # no host port mapping was defined + if force + # but we want to force a mapping for the default ports + if ENV['VAGRANT_DEBUG'] + puts " !! Setting up port mapping rule for #{service} host:#{guest_port} => guest:#{guest_port}" + end + config.vm.network(:forwarded_port, guest: guest_port, host: guest_port) + end + end end diff --git a/app/assets/fonts/221897_0_0.eot b/app/assets/fonts/221897_0_0.eot deleted file mode 100644 index 74b112ee..00000000 Binary files a/app/assets/fonts/221897_0_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_0_0.ttf b/app/assets/fonts/221897_0_0.ttf deleted file mode 100644 index dff0075d..00000000 Binary files a/app/assets/fonts/221897_0_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_0_0.woff b/app/assets/fonts/221897_0_0.woff deleted file mode 100644 index e7413276..00000000 Binary files a/app/assets/fonts/221897_0_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_1_0.eot b/app/assets/fonts/221897_1_0.eot deleted file mode 100644 index e5be5806..00000000 Binary files a/app/assets/fonts/221897_1_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_1_0.ttf b/app/assets/fonts/221897_1_0.ttf deleted file mode 100644 index 0e9b4808..00000000 Binary files a/app/assets/fonts/221897_1_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_1_0.woff b/app/assets/fonts/221897_1_0.woff deleted file mode 100644 index 3cf5a711..00000000 Binary files a/app/assets/fonts/221897_1_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_2_0.eot b/app/assets/fonts/221897_2_0.eot deleted file mode 100644 index 4caf3991..00000000 Binary files a/app/assets/fonts/221897_2_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_2_0.ttf b/app/assets/fonts/221897_2_0.ttf deleted file mode 100644 index ca70d055..00000000 Binary files a/app/assets/fonts/221897_2_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_2_0.woff b/app/assets/fonts/221897_2_0.woff deleted file mode 100644 index 9c2993b4..00000000 Binary files a/app/assets/fonts/221897_2_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_3_0.eot b/app/assets/fonts/221897_3_0.eot deleted file mode 100644 index cc4e339b..00000000 Binary files a/app/assets/fonts/221897_3_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_3_0.ttf b/app/assets/fonts/221897_3_0.ttf deleted file mode 100644 index 796a79fe..00000000 Binary files a/app/assets/fonts/221897_3_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_3_0.woff b/app/assets/fonts/221897_3_0.woff deleted file mode 100644 index 82f6fdcc..00000000 Binary files a/app/assets/fonts/221897_3_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_4_0.eot b/app/assets/fonts/221897_4_0.eot deleted file mode 100644 index af8b7369..00000000 Binary files a/app/assets/fonts/221897_4_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_4_0.ttf b/app/assets/fonts/221897_4_0.ttf deleted file mode 100644 index 18c0bcac..00000000 Binary files a/app/assets/fonts/221897_4_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_4_0.woff b/app/assets/fonts/221897_4_0.woff deleted file mode 100644 index 27c31593..00000000 Binary files a/app/assets/fonts/221897_4_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_5_0.eot b/app/assets/fonts/221897_5_0.eot deleted file mode 100644 index 59467b80..00000000 Binary files a/app/assets/fonts/221897_5_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_5_0.ttf b/app/assets/fonts/221897_5_0.ttf deleted file mode 100644 index cde3b2e2..00000000 Binary files a/app/assets/fonts/221897_5_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_5_0.woff b/app/assets/fonts/221897_5_0.woff deleted file mode 100644 index 9ed1e5cb..00000000 Binary files a/app/assets/fonts/221897_5_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_6_0.eot b/app/assets/fonts/221897_6_0.eot deleted file mode 100644 index 6981dded..00000000 Binary files a/app/assets/fonts/221897_6_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_6_0.ttf b/app/assets/fonts/221897_6_0.ttf deleted file mode 100644 index 052ed124..00000000 Binary files a/app/assets/fonts/221897_6_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_6_0.woff b/app/assets/fonts/221897_6_0.woff deleted file mode 100644 index 3c4721d7..00000000 Binary files a/app/assets/fonts/221897_6_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_7_0.eot b/app/assets/fonts/221897_7_0.eot deleted file mode 100644 index cb2ff4a8..00000000 Binary files a/app/assets/fonts/221897_7_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_7_0.ttf b/app/assets/fonts/221897_7_0.ttf deleted file mode 100644 index f345626e..00000000 Binary files a/app/assets/fonts/221897_7_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_7_0.woff b/app/assets/fonts/221897_7_0.woff deleted file mode 100644 index 9a8a61b6..00000000 Binary files a/app/assets/fonts/221897_7_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_8_0.eot b/app/assets/fonts/221897_8_0.eot deleted file mode 100644 index 27034d2f..00000000 Binary files a/app/assets/fonts/221897_8_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_8_0.ttf b/app/assets/fonts/221897_8_0.ttf deleted file mode 100644 index 54720326..00000000 Binary files a/app/assets/fonts/221897_8_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_8_0.woff b/app/assets/fonts/221897_8_0.woff deleted file mode 100644 index bcf418a5..00000000 Binary files a/app/assets/fonts/221897_8_0.woff and /dev/null differ diff --git a/app/assets/fonts/221897_9_0.eot b/app/assets/fonts/221897_9_0.eot deleted file mode 100644 index 1ba9405c..00000000 Binary files a/app/assets/fonts/221897_9_0.eot and /dev/null differ diff --git a/app/assets/fonts/221897_9_0.ttf b/app/assets/fonts/221897_9_0.ttf deleted file mode 100644 index a5fc607a..00000000 Binary files a/app/assets/fonts/221897_9_0.ttf and /dev/null differ diff --git a/app/assets/fonts/221897_9_0.woff b/app/assets/fonts/221897_9_0.woff deleted file mode 100644 index 4375d196..00000000 Binary files a/app/assets/fonts/221897_9_0.woff and /dev/null differ diff --git a/app/assets/fonts/Chunkfive-webfont.eot b/app/assets/fonts/Chunkfive-webfont.eot deleted file mode 100755 index f9d8a7ff..00000000 Binary files a/app/assets/fonts/Chunkfive-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/Chunkfive-webfont.svg b/app/assets/fonts/Chunkfive-webfont.svg deleted file mode 100755 index 1600fe53..00000000 --- a/app/assets/fonts/Chunkfive-webfont.svg +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata> -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Generated in 2009 by FontLab Studio Copyright info pending -</metadata> -<defs> -<font id="webfontbMWZ83oH" horiz-adv-x="790" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="512" /> -<glyph unicode=" " horiz-adv-x="512" /> -<glyph unicode="	" horiz-adv-x="512" /> -<glyph unicode=" " horiz-adv-x="512" /> -<glyph unicode="!" horiz-adv-x="630" d="M57 209q0 84 64.5 150.5t169.5 66.5q106 0 175 -63.5t69 -153.5q0 -88 -68 -149.5t-176 -61.5q-98 0 -166 64.5t-68 146.5zM66 1042v390h489v-390l-109 -516h-270z" /> -<glyph unicode="'" horiz-adv-x="559" d="M74 1436h405l-73 -613h-256z" /> -<glyph unicode="(" horiz-adv-x="794" d="M51 639q0 170 50.5 341t128 303t154.5 227.5t148 158.5l211 -217q-59 -74 -94 -122t-96 -156.5t-93 -243.5t-32 -291q0 -162 29.5 -301t85 -245.5t97.5 -168t103 -133.5l-211 -219q-193 174 -337 459.5t-144 607.5z" /> -<glyph unicode=")" horiz-adv-x="794" d="M51 -211q61 72 103.5 133.5t97.5 168t85 245.5t30 301q0 156 -32 291t-93.5 243.5t-96 156.5t-94.5 122l211 217q72 -63 148.5 -158.5t154.5 -227.5t128 -303t50 -341q0 -322 -144 -607.5t-337 -459.5z" /> -<glyph unicode="," horiz-adv-x="557" d="M-12 -264q115 145 162 294.5t32 370.5l373 -98q6 -195 -82 -376t-250 -324z" /> -<glyph unicode="-" d="M96 352v273h594v-273h-594z" /> -<glyph unicode="." horiz-adv-x="528" d="M31 213q0 86 63.5 159.5t168 73.5t170 -73.5t65.5 -159.5q0 -96 -62.5 -158.5t-173.5 -62.5q-98 0 -164.5 67.5t-66.5 153.5z" /> -<glyph unicode="0" horiz-adv-x="1226" d="M31 723q0 326 160.5 530.5t416.5 204.5q293 0 440.5 -199.5t147.5 -549.5q0 -344 -150.5 -539t-427.5 -195q-266 0 -426.5 190.5t-160.5 557.5zM436 723q0 -186 57.5 -308t124.5 -122q72 0 119 115.5t47 300.5q0 182 -51 300.5t-127 118.5q-61 2 -115.5 -113.5 t-54.5 -291.5z" /> -<glyph unicode="1" horiz-adv-x="1015" d="M51 1163l42 21l44 21l39 21q29 15 43 26l41 31q27 19 47 40l48 48q28 28 55 61h364v-1160h191v-272h-820v272h205v760l-205 -96z" /> -<glyph unicode="2" horiz-adv-x="1208" d="M51 0v297q82 135 140.5 201.5t158.5 146.5q47 43 150.5 111.5t158 121t54.5 109.5q0 135 -172 135q-51 0 -103.5 -29.5t-77 -53t-71.5 -72.5l-221 233q219 254 532 254q209 0 348 -123t139 -325q0 -164 -70.5 -251t-256.5 -208q-86 -55 -180.5 -136t-126.5 -139h360v164 h344v-436h-1106z" /> -<glyph unicode="3" horiz-adv-x="1105" d="M31 205l209 217q133 -133 270 -133q86 0 135 41t49 116q0 150 -170 150h-153v244h149q76 0 125 36.5t49 104.5q0 78 -54 120t-126 42q-123 0 -240 -123l-198 240q66 72 188.5 133t249.5 61q248 0 385 -117.5t137 -316.5q0 -143 -151 -260q190 -137 190 -336 q0 -213 -170 -332t-397 -119q-141 0 -278.5 70t-198.5 162z" /> -<glyph unicode="4" horiz-adv-x="1196" d="M20 403v293l590 736h424v-807h109v-222h-109v-133h111v-270h-664v270h129v133h-590zM307 625h303v379z" /> -<glyph unicode="5" horiz-adv-x="1181" d="M31 221l223 232q147 -152 287 -152q102 0 163.5 57.5t61.5 147.5q0 82 -60.5 140.5t-148.5 58.5q-102 0 -192 -95l-263 117l125 705h811v-306h-551l-34 -198q76 49 221 49q193 0 335 -130t142 -355q0 -125 -53.5 -225.5t-141.5 -163t-195.5 -96.5t-221.5 -34 q-150 0 -296 75t-212 173z" /> -<glyph unicode="6" horiz-adv-x="1189" d="M33 623q-2 96 8 191t47 213t99.5 207t178 152.5t269.5 67.5q109 4 253 -42t230 -120l-139 -266q-178 104 -299 104q-111 -2 -181.5 -80.5t-86.5 -197.5q41 41 115.5 71.5t152.5 32.5q201 8 340 -121.5t139 -334.5q0 -213 -143.5 -361.5t-386.5 -156.5q-256 -8 -422 165 t-174 476zM416 545q0 -88 50 -165t140 -77q78 0 133.5 51.5t53.5 124.5q-2 72 -42 128.5t-124 54.5q-121 -6 -211 -117z" /> -<glyph unicode="7" horiz-adv-x="1159" d="M31 1026v406h1108v-273l-551 -1159h-443l549 1159h-336v-133h-327z" /> -<glyph unicode="8" horiz-adv-x="1144" d="M31 420q0 102 61.5 206.5t159.5 153.5q-74 45 -114 120t-40 153q0 176 131 289.5t357 113.5q231 0 360 -113.5t129 -289.5q0 -96 -49 -170t-123 -109q100 -49 155.5 -147.5t55.5 -206.5q0 -193 -148.5 -320t-392.5 -127q-250 0 -396 126t-146 321zM385 432 q0 -72 56.5 -120t133.5 -48q80 0 133.5 44t55.5 124q0 94 -81 136t-179 46q-49 -29 -84 -79t-35 -103zM434 1069q0 -51 39 -84t79 -41t85 -10q98 47 98 135q0 55 -46 92t-107 37q-59 0 -103.5 -39t-44.5 -90z" /> -<glyph unicode="9" horiz-adv-x="1202" d="M31 936q0 213 143 361.5t387 156.5q258 8 429 -166t179 -475q2 -106 -8 -205.5t-50 -215.5t-104.5 -202t-181 -145t-270.5 -63q-109 -4 -253 42t-230 119l139 267q178 -104 299 -105q117 4 184.5 76t65.5 203q-98 -98 -250 -105q-201 -8 -340 122t-139 335zM397 956 q2 -72 42 -128t124 -54q102 4 193 117q0 94 -42 168t-130 74q-78 0 -133.5 -51.5t-53.5 -125.5z" /> -<glyph unicode=":" horiz-adv-x="520" d="M31 201q0 86 62.5 157.5t164.5 71.5q104 0 167.5 -72.5t63.5 -156.5q0 -92 -64.5 -154.5t-166.5 -62.5q-96 0 -161.5 66.5t-65.5 150.5zM31 823q0 86 62.5 158t164.5 72q104 0 167.5 -73t63.5 -157q0 -94 -62 -155.5t-169 -61.5q-92 0 -159.5 67.5t-67.5 149.5z" /> -<glyph unicode=";" horiz-adv-x="618" d="M10 -264l236 -133q162 143 250 324.5t82 375.5l-373 98q14 -221 -33 -370.5t-162 -294.5zM121 788q0 86 63.5 160t168 74t170 -74t65.5 -160q0 -94 -63.5 -157.5t-172.5 -63.5q-94 0 -162.5 68.5t-68.5 152.5z" /> -<glyph unicode="=" horiz-adv-x="1028" d="M90 352v273h844v-273h-844zM90 805v272h844v-272h-844z" /> -<glyph unicode="?" horiz-adv-x="1064" d="M4 1200q227 264 533 264q213 0 350 -109.5t137 -310.5q0 -74 -34 -136t-82 -104t-95 -77t-81 -69.5t-34 -67.5v-113h-379l-2 164q0 63 51.5 126.5t112 105.5t111.5 90.5t51 85.5q0 96 -151 96q-61 0 -134 -49t-133 -119zM264 209q0 84 64.5 150.5t169.5 66.5 q106 0 174.5 -63.5t68.5 -153.5q0 -88 -67.5 -149.5t-175.5 -61.5q-98 0 -166 64.5t-68 146.5z" /> -<glyph unicode="@" horiz-adv-x="1705" /> -<glyph unicode="A" horiz-adv-x="1685" d="M31 0v268h139l276 899h-84v265h787l362 -1164h144v-268h-821v268h194l-43 140h-420l-43 -140h160v-268h-651zM641 653h268l-135 443z" /> -<glyph unicode="B" horiz-adv-x="1406" d="M51 0v266h119v901h-119v265h764q502 0 502 -351q0 -131 -44 -201.5t-157 -115.5q121 -33 195.5 -120t74.5 -228q0 -217 -131 -316.5t-426 -99.5h-778zM594 266h164q68 0 117 48t49 128t-45 130.5t-127 50.5h-158v-357zM594 854h125q78 0 108.5 40t30.5 118 q0 70 -38 109.5t-97 39.5h-129v-307z" /> -<glyph unicode="C" horiz-adv-x="1404" d="M31 702q0 168 59.5 314.5t151.5 240t200.5 146.5t210.5 53q211 0 316 -139l47 115h321v-582h-366q-4 109 -59.5 183.5t-157.5 74.5q-109 0 -176.5 -117t-67.5 -289q0 -162 80 -273.5t219 -111.5q31 0 62.5 8.5t58 20.5t53.5 29.5t46.5 34t40 36t30.5 31.5l22 27l13 14 l239 -262q-262 -289 -620 -289q-328 0 -525.5 197.5t-197.5 537.5z" /> -<glyph unicode="D" horiz-adv-x="1474" d="M51 0v272h127v889h-127v271h625q362 0 570 -197t208 -500q0 -350 -205 -542.5t-581 -192.5h-617zM598 272h78q156 2 231.5 130t75.5 333q0 180 -77 303t-230 123h-78v-889z" /> -<glyph unicode="E" horiz-adv-x="1337" d="M51 0v272h129v889h-129v271h1235v-453h-354v182h-328v-282h389v-273h-389v-334h328v191h354v-463h-1235z" /> -<glyph unicode="F" horiz-adv-x="1306" d="M51 0v272h127v889h-127v271h1225v-453h-363v182h-309v-356h389v-273h-389v-260h209v-272h-762z" /> -<glyph unicode="G" horiz-adv-x="1589" d="M31 702q0 324 189.5 539t438.5 215q70 0 130.5 -11t98.5 -25.5t70.5 -37t48 -38t32 -36t20.5 -24.5l43 148h305v-605h-367q-4 121 -71.5 190.5t-161.5 69.5q-121 0 -201 -113.5t-80 -271.5q0 -162 76 -269t205 -107q139 0 197 100v86h-125v219h680v-219h-82v-512h-410 l-63 129q-37 -61 -127.5 -104t-202.5 -43q-274 0 -458.5 197t-184.5 523z" /> -<glyph unicode="H" horiz-adv-x="1572" d="M51 0v270h113v891h-113v271h664v-271h-127v-309h389v309h-121v271h666v-271h-119v-891h119v-270h-666v270h121v310h-389v-310h127v-270h-664z" /> -<glyph unicode="I" horiz-adv-x="782" d="M51 0v272h129v889h-129v271h680v-271h-127v-889h127v-272h-680z" /> -<glyph unicode="J" horiz-adv-x="948" d="M41 -125q41 -18 92 -18q170 0 170 295v1011h-176v269h770v-269h-170v-1011q0 -283 -135 -426.5t-442 -143.5q-51 0 -107 23z" /> -<glyph unicode="K" horiz-adv-x="1669" d="M51 0v266h111v901h-111v265h645v-265h-110v-333l381 333h-148v265h682v-265h-119l-297 -256l414 -645h119v-266h-799v266h139l-221 348l-151 -129v-219h110v-266h-645z" /> -<glyph unicode="L" horiz-adv-x="1249" d="M51 0v272h113v889h-113v271h647v-271h-108v-889h264v260h344v-532h-1147z" /> -<glyph unicode="M" horiz-adv-x="2064" d="M51 0v264h111v903h-109v265h776l207 -766l197 766h780v-265h-112v-901h112v-266h-647v266h117l-2 684v121h-8q-35 -190 -60 -274l-215 -797h-428l-229 817q-35 119 -43 254h-9v-807h117v-264h-555z" /> -<glyph unicode="N" horiz-adv-x="1671" d="M51 0v264h121v903h-119v265h588l504 -752l-2 487h-139v265h616v-265h-135v-1167h-441l-522 780v-516h158v-264h-629z" /> -<glyph unicode="O" horiz-adv-x="1515" d="M31 723q0 332 200.5 539.5t518.5 207.5q367 0 551 -202.5t184 -558.5q0 -350 -188.5 -548t-532.5 -198q-334 0 -533.5 193.5t-199.5 566.5zM537 723q0 -199 63.5 -318.5t163.5 -119.5q96 0 152.5 115.5t56.5 308.5q0 199 -56.5 322.5t-168.5 123.5h-4q-92 0 -149 -120 q-58 -122 -58 -312z" /> -<glyph unicode="P" horiz-adv-x="1310" d="M51 0v270h115v893h-115v269h664q172 0 287.5 -34t174 -99.5t81 -137t22.5 -168.5q0 -195 -153.5 -300t-385.5 -105h-155v-318h125v-270h-660zM586 809h92q90 0 145.5 45t55.5 125q0 90 -50.5 138t-140.5 48h-102v-356z" /> -<glyph unicode="Q" horiz-adv-x="1546" d="M31 725q0 315 190.5 514t497.5 199q350 0 525 -193.5t175 -533.5q0 -326 -170 -512q35 -133 90 -133q41 0 41 92v59h136v-104q0 -143 -80 -235.5t-228 -92.5q-119 0 -199.5 64.5t-117.5 162.5q-74 -12 -160 -12q-319 0 -509.5 186.5t-190.5 538.5zM481 725q0 -66 8 -113 q94 98 242 99q119 0 230 -80q4 49 4 80q0 182 -69 305t-179 123h-3q-92 0 -162 -118q-71 -120 -71 -296zM594 375q61 -68 137 -68q57 0 109 45q-12 86 -36 129t-73 43q-84 1 -137 -149z" /> -<glyph unicode="R" horiz-adv-x="1509" d="M51 0v270h115v893h-115v269h666q172 0 287.5 -32t175 -93.5t82 -131t22.5 -165.5q0 -117 -83 -198t-214 -99q109 -16 188.5 -99.5t79.5 -191.5q0 -139 50 -139q47 0 47 65v68h137v-113q0 -143 -70.5 -235.5t-228.5 -92.5q-199 0 -298 99.5t-99 281.5q0 143 -36 187.5 t-169 44.5v-318h125v-270h-662zM588 817h92q90 0 143.5 43t53.5 123q0 182 -187 182h-102v-348z" /> -<glyph unicode="S" horiz-adv-x="1454" d="M51 0v516h381q0 -61 26.5 -103t71.5 -62.5t82 -29t78 -10.5q174 0 174 103q0 37 -58 65.5t-145.5 48t-189.5 57.5t-189 87t-145.5 141t-58.5 215q0 109 47 196t122 139t156.5 78.5t161.5 26.5q317 0 428 -208l21 172h352v-514h-371q0 111 -74.5 174t-187.5 63 q-51 0 -96 -29.5t-45 -78.5q0 -57 84 -100.5t202.5 -81.5t237.5 -87t203 -145t84 -230q0 -115 -49 -201.5t-131 -136t-174.5 -73t-188.5 -23.5q-268 0 -428 189l-22 -158h-359z" /> -<glyph unicode="T" horiz-adv-x="1435" d="M31 899v533h1374v-533h-301v262h-172v-889h170v-272h-762v272h168v889h-176v-262h-301z" /> -<glyph unicode="U" horiz-adv-x="1509" d="M31 1165v267h651v-265h-111v-442q0 -233 49.5 -316t155.5 -83q70 0 111 25.5t68.5 116.5t27.5 259v434h-111v271h607v-265h-111v-497q0 -705 -588 -705q-635 18 -635 694v506h-114z" /> -<glyph unicode="V" horiz-adv-x="1583" d="M-20 1165v267h755l-2 -267h-110l174 -458q59 -180 63 -248h10q6 92 74 260l186 446h-106l-2 267h582v-267h-101l-491 -1165h-377l-543 1165h-112z" /> -<glyph unicode="W" horiz-adv-x="2078" d="M-20 1165v267h675v-267h-118l53 -299q29 -123 65 -403h11q4 47 100 508l102 461h426l129 -566q39 -182 62 -403h10q16 178 61 391l70 311h-113v267h586v-267h-112l-306 -1165h-485l-123 487q-27 98 -51 254h-8q-14 -102 -49 -249l-125 -492h-475l-271 1165h-114z" /> -<glyph unicode="X" horiz-adv-x="1710" d="M51 0v264h178l301 391l-370 510h-107v267h811v-267h-119l201 -272l209 272h-180v267h680v-267h-174l-310 -395l369 -504h119v-266h-817v266h116l-155 209l-43 57l-211 -268h182v-264h-680z" /> -<glyph unicode="Y" horiz-adv-x="1370" d="M-20 1169v263h700v-263h-107l119 -217q6 -16 33 -81.5t31 -84.5h8q4 18 76 177l112 206h-112v263h551v-263h-111l-379 -665v-238h115v-266h-656v266h117v242l-397 661h-100z" /> -<glyph unicode="Z" horiz-adv-x="1462" d="M51 0v266l746 895l-387 -2l2 -266h-349v539h1344l4 -273l-749 -889h378l2 262h363v-532h-1354z" /> -<glyph unicode="[" horiz-adv-x="1474" d="M59 0v270h115v893h-115v271h664q170 0 286.5 -39t175 -108.5t81 -145.5t22.5 -174q0 -215 -221 -338l229 -363h119v-266h-393l-340 549h-88v-279h125v-270h-660zM594 809h92q90 0 145.5 45t55.5 125q0 90 -50.5 138t-140.5 48h-102v-356z" /> -<glyph unicode="\" horiz-adv-x="1337" /> -<glyph unicode="]" horiz-adv-x="1325" d="M61 0v266h84v1002h-84v268h474v-926l237 142h-147v272h573v-272h-158l-129 -76l285 -408h84v-268h-332l-344 489l-72 -49v-172h146v-268h-617z" /> -<glyph unicode="a" horiz-adv-x="1228" d="M31 303q0 170 124 273.5t302 103.5q55 0 103 -16.5t69.5 -31t29.5 -24.5v72q0 115 -194 115q-135 0 -305 -95l-86 238q242 145 446 145q100 0 191.5 -20.5t176.5 -65.5t136 -132t51 -203v-400h123v-262h-438l-49 92q-51 -70 -129 -100.5t-148 -30.5q-162 0 -282.5 88 t-120.5 254zM420 324q0 -43 30.5 -70t77.5 -27q43 0 79 20.5t52 47.5v78q-35 59 -120 59q-119 1 -119 -108z" /> -<glyph unicode="b" horiz-adv-x="1343" d="M63 0v266h87v1002h-87v268h496v-592q33 39 113 67.5t155 28.5q223 0 350 -158q122 -154 122 -364q0 -7 -1 -14q-4 -240 -131 -383.5t-342 -143.5q-74 0 -128 14.5t-80.5 31t-61.5 47.5l-31 -70h-461zM555 489q0 -102 44 -173.5t103 -71.5q66 0 106 69.5t40 186.5 q0 98 -41 175t-107 77q-63 0 -107 -73q-39 -64 -39 -162q0 -14 1 -28z" /> -<glyph unicode="c" horiz-adv-x="1087" d="M2 518q0 256 145.5 390t358.5 134q158 0 256 -116l35 98h241v-463h-301q-4 88 -34.5 151.5t-94.5 63.5q-86 0 -133 -76.5t-47 -185.5q0 -102 57.5 -171t153.5 -71h5q136 0 243 117l180 -209q-80 -88 -213 -148.5t-289 -60.5q-240 0 -401.5 143.5t-161.5 403.5z" /> -<glyph unicode="d" horiz-adv-x="1298" d="M20 522q0 231 139.5 376.5t336.5 145.5q135 0 258 -77v303h-95v266h510v-1270h99v-266h-480l-34 76q-102 -94 -258 -94q-211 0 -343.5 159.5t-132.5 380.5zM461 522q0 -98 41 -175t106 -77q63 0 108 73q39 64 38 162v27q0 102 -44 174t-104 72q-66 0 -105.5 -69.5 t-39.5 -186.5z" /> -<glyph unicode="e" horiz-adv-x="1110" d="M10 518q0 246 156 390.5t395 144.5q180 0 312.5 -83t177.5 -214q23 -66 27 -156q1 -14 1 -27q0 -78 -24 -163h-645q6 -31 14 -51.5t29.5 -52.5t64.5 -48t103 -16q168 0 286 98l172 -199q-207 -178 -528 -178q-215 0 -378 141.5t-163 413.5zM416 612h309q-2 74 -32.5 119 t-119.5 45q-82 0 -117.5 -53.5t-39.5 -110.5z" /> -<glyph unicode="f" d="M51 758v266h84v174q0 43 6 84t31 97.5t66 96.5t119.5 68.5t183.5 28.5q80 0 170 -15.5t131 -35.5l-123 -236q-45 20 -113 21q-66 0 -65 -109v-174h186v-266h-186v-490h123v-268h-611v268h82v490h-84z" /> -<glyph unicode="g" horiz-adv-x="1310" d="M20 518q0 244 133.5 385t381.5 141q63 0 123.5 -25.5t93.5 -57.5l41 63h487v-268h-123v-613q0 -262 -161.5 -411.5t-477.5 -151.5q-152 2 -272.5 56.5t-196.5 123.5l109 228q49 -43 151.5 -87t204.5 -44q125 0 181.5 57t56.5 135v70q-88 -113 -240 -113 q-246 0 -369 148.5t-123 363.5zM457 522q0 -98 41 -175t106 -77q63 0 108 73q39 64 38 162v27q0 102 -44 174t-104 72q-66 0 -105.5 -69.5t-39.5 -186.5z" /> -<glyph unicode="h" horiz-adv-x="1353" d="M51 0v268h86v1002h-86v266h496v-639q25 41 124 102.5t197 61.5q113 0 189 -38t110.5 -108.5t47 -140t12.5 -164.5v-342h96v-268h-526v557q0 39 -2 61.5t-12.5 57.5t-37 53.5t-69.5 18.5q-129 0 -129 -191v-289h147v-268h-643z" /> -<glyph unicode="i" horiz-adv-x="675" d="M51 0v268h86v490h-86v266h475v-756h99v-268h-574zM109 1323q0 78 60 143.5t160.5 65.5t163 -65.5t62.5 -143.5q0 -88 -60.5 -147.5t-164.5 -59.5q-92 0 -156.5 64.5t-64.5 142.5z" /> -<glyph unicode="j" horiz-adv-x="737" d="M29 -154q68 0 114.5 24t69.5 51.5t35 77.5t13 74.5t1 69.5v615h-86v266h475v-881q0 -86 -12 -157.5t-51 -151.5t-104.5 -135t-181.5 -91t-273 -36v274zM233 1323q0 78 60.5 143.5t161 65.5t163 -65.5t62.5 -143.5q0 -88 -60.5 -147.5t-164.5 -59.5q-92 0 -157 64.5 t-65 142.5z" /> -<glyph unicode="k" horiz-adv-x="1339" d="M78 0v266h84v1002h-84v268h473v-926l237 142h-147v270h573v-270h-157l-139 -88l276 -396h102v-268h-606v268h86l-155 221l-72 -49v-172h76v-268h-547z" /> -<glyph unicode="l" horiz-adv-x="679" d="M51 0v268h88v1004h-86v264h475v-1268h121v-268h-598z" /> -<glyph unicode="m" horiz-adv-x="1859" d="M51 0v268h86v484h-86v270h387l45 -121q125 150 256 150q72 0 128.5 -14.5t92 -42t51 -46t33.5 -45.5q131 147 302 148q119 0 198.5 -40t117.5 -115t52.5 -152.5t14.5 -184.5v-283h100v-276h-520v502q0 12 1 44t1 50t-2 46t-7.5 45.5t-13.5 34.5t-22.5 25.5t-34.5 8.5 q-61 0 -85 -38t-24 -112v-332h123v-274h-530v522q0 137 -14.5 185.5t-71.5 48.5q-92 0 -92 -123v-365h122v-268h-608z" /> -<glyph unicode="n" horiz-adv-x="1325" d="M51 0v268h86v490h-86v266h436l48 -127q119 164 292 164q92 0 161 -26.5t108 -68.5t62.5 -104.5t31.5 -121t8 -130.5v-342h96v-268h-516v559v48q0 11 -5 47t-16.5 50.5t-35 30t-57.5 15.5q-129 0 -129 -191v-291h147v-268h-631z" /> -<glyph unicode="o" horiz-adv-x="1175" d="M191 904q167 144 393 145q250 -4 407.5 -147.5t161.5 -393.5v-6q0 -243 -158 -385q-160 -143 -401 -144q-238 0 -406 143q-166 141 -165 394q-1 248 168 394zM442 514q0 -125 43 -201.5t109 -76.5q63 0 101 76.5t38 195.5t-40 195.5t-109 78.5q-59 0 -100.5 -77.5 t-41.5 -190.5z" /> -<glyph unicode="p" horiz-adv-x="1306" d="M51 -150h86v902h-86v272h469l35 -72q119 88 248 88q229 0 356 -153.5t127 -382.5q0 -240 -132 -383.5t-335 -143.5q-172 0 -266 80v-207h111v-268h-613v268zM553 489q0 -102 44 -173.5t103 -71.5q66 0 106 69.5t40 186.5q0 98 -41 175t-107 77q-63 0 -107 -73 q-39 -64 -39 -162q0 -14 1 -28z" /> -<glyph unicode="q" horiz-adv-x="1351" d="M51 518q0 256 137.5 391t352.5 135q88 0 155.5 -27.5t87.5 -53.5l39 61h477v-266h-100v-955h100v-274h-649v268h133v271q-104 -86 -262 -86q-201 0 -336 147t-135 389zM492 516q0 -102 44 -174t103 -72q66 0 105.5 70t39.5 186q0 98 -41 175t-106 77q-63 0 -108 -72 q-39 -64 -38 -162q0 -14 1 -28z" /> -<glyph unicode="r" horiz-adv-x="847" d="M51 0v268h90v490h-88v266h385l62 -131q25 45 44 70.5t54 55.5t89 43t130 13v-368q-147 0 -218 -49.5t-71 -178.5v-211h103v-268h-580z" /> -<glyph unicode="s" horiz-adv-x="1040" d="M31 0v369h274q0 -49 44 -83t89 -44.5t84 -10.5q90 0 90 70q0 18 -16 31.5t-48 24t-66 19.5l-84 22q-50 13 -87 26q-272 96 -272 328q0 143 115.5 220t244.5 77q102 0 187.5 -46.5t118.5 -113.5l16 135h252v-369h-266q0 63 -64.5 109.5t-144.5 46.5t-80 -74 q0 -16 12 -29.5t41 -26.5t51.5 -21.5t72.5 -24.5l75 -25q80 -27 120.5 -45t98 -56t84 -94.5t26.5 -131.5q0 -139 -112.5 -223.5t-268.5 -84.5q-104 0 -189 43t-124 107l-18 -125h-256z" /> -<glyph unicode="t" horiz-adv-x="743" d="M31 758v266h110v188l377 121v-309h195v-266h-195v-365q0 -8 -1 -29.5t0 -34t2 -29.5t5 -27.5t11.5 -21.5t19.5 -16.5t29 -5.5q47 0 129 35v-262q-41 -16 -122 -27.5t-126 -11.5q-90 0 -150.5 21.5t-94.5 52.5t-51 94.5t-21.5 114.5t-6.5 147v365h-110z" /> -<glyph unicode="u" horiz-adv-x="1292" d="M31 754v270h495v-494q0 -135 24.5 -196.5t86.5 -61.5q55 0 92 44t37 112v326h-135v270h530v-752h101v-272h-388l-55 129l-20 -23q-20 -25 -28 -31l-30 -29q-23 -22 -41 -30t-44.5 -21t-58.5 -18.5t-69 -5.5q-227 0 -319 119t-92 381v283h-86z" /> -<glyph unicode="v" horiz-adv-x="1255" d="M0 764v260h623v-260h-103l94 -217q45 -133 54 -215h8q4 94 61 225l99 207h-109v260h528v-260h-106l-354 -764h-318l-381 764h-96z" /> -<glyph unicode="w" horiz-adv-x="1785" d="M0 758v266h551v-266h-70l45 -150q41 -139 52 -295h4q20 268 84 482l65 229h379l78 -266q59 -188 88 -445h4q18 193 55 324l35 121h-84v266h500v-266h-84l-240 -758h-432l-141 463l-148 -463h-422l-231 758h-88z" /> -<glyph unicode="x" horiz-adv-x="1329" d="M41 0v254h137l209 235l-254 279h-92v256h664v-256h-97l144 -156l153 156h-137v256h522v-256h-135l-217 -219l258 -295h96v-254h-653v254h96l-155 166l-148 -166h133v-254h-524z" /> -<glyph unicode="y" horiz-adv-x="1187" d="M-18 762v262h630v-260h-96l133 -320l133 320h-94v260h520v-254h-98l-389 -946q-23 -49 -40 -80t-54 -76t-80 -70.5t-111.5 -44t-154.5 -18.5q-139 8 -248 103l153 241q68 -59 119 -69q9 -2 18 -2q34 0 62 26q35 33 51 84l29 86l-399 758h-84z" /> -<glyph unicode="z" horiz-adv-x="1132" d="M51 0v268l494 492h-228v-146h-266v410h1014v-264l-487 -492h215v140h288v-408h-1030z" /> -<glyph unicode="ª" horiz-adv-x="1228" d="M31 303q0 170 124 273.5t302 103.5q55 0 103 -16.5t69.5 -31t29.5 -24.5v72q0 115 -194 115q-135 0 -305 -95l-86 238q242 145 446 145q100 0 191.5 -20.5t176.5 -65.5t136 -132t51 -203v-400h123v-262h-438l-49 92q-51 -70 -129 -100.5t-148 -30.5q-162 0 -282.5 88 t-120.5 254zM420 324q0 -43 30.5 -70t77.5 -27q43 0 79 20.5t52 47.5v78q-35 59 -120 59q-119 1 -119 -108z" /> -<glyph unicode="­" d="M96 352v273h594v-273h-594z" /> -<glyph unicode="²" horiz-adv-x="1208" d="M51 0v297q82 135 140.5 201.5t158.5 146.5q47 43 150.5 111.5t158 121t54.5 109.5q0 135 -172 135q-51 0 -103.5 -29.5t-77 -53t-71.5 -72.5l-221 233q219 254 532 254q209 0 348 -123t139 -325q0 -164 -70.5 -251t-256.5 -208q-86 -55 -180.5 -136t-126.5 -139h360v164 h344v-436h-1106z" /> -<glyph unicode="³" horiz-adv-x="1105" d="M31 205l209 217q133 -133 270 -133q86 0 135 41t49 116q0 150 -170 150h-153v244h149q76 0 125 36.5t49 104.5q0 78 -54 120t-126 42q-123 0 -240 -123l-198 240q66 72 188.5 133t249.5 61q248 0 385 -117.5t137 -316.5q0 -143 -151 -260q190 -137 190 -336 q0 -213 -170 -332t-397 -119q-141 0 -278.5 70t-198.5 162z" /> -<glyph unicode="¹" horiz-adv-x="1015" d="M51 1163l42 21l44 21l39 21q29 15 43 26l41 31q27 19 47 40l48 48q28 28 55 61h364v-1160h191v-272h-820v272h205v760l-205 -96z" /> -<glyph unicode="º" horiz-adv-x="1175" d="M191 904q167 144 393 145q250 -4 407.5 -147.5t161.5 -393.5v-6q0 -243 -158 -385q-160 -143 -401 -144q-238 0 -406 143q-166 141 -165 394q-1 248 168 394zM442 514q0 -125 43 -201.5t109 -76.5q63 0 101 76.5t38 195.5t-40 195.5t-109 78.5q-59 0 -100.5 -77.5 t-41.5 -190.5z" /> -<glyph unicode="Å" horiz-adv-x="1685" d="M31 0v268h139l276 899h-84v265h787l362 -1164h144v-268h-821v268h194l-43 140h-420l-43 -140h160v-268h-651zM641 653h268l-135 443z" /> -<glyph unicode="å" horiz-adv-x="1228" d="M31 303q0 170 124 273.5t302 103.5q55 0 103 -16.5t69.5 -31t29.5 -24.5v72q0 115 -194 115q-135 0 -305 -95l-86 238q242 145 446 145q100 0 191.5 -20.5t176.5 -65.5t136 -132t51 -203v-400h123v-262h-438l-49 92q-51 -70 -129 -100.5t-148 -30.5q-162 0 -282.5 88 t-120.5 254zM420 324q0 -43 30.5 -70t77.5 -27q43 0 79 20.5t52 47.5v78q-35 59 -120 59q-119 1 -119 -108z" /> -<glyph unicode="Œ" horiz-adv-x="2852" d="M1567 0v272h129v889h-129v271h1235v-453h-354v182h-328v-282h389v-273h-389v-334h328v191h354v-463h-1235zM31 723q0 332 200.5 539.5t518.5 207.5q367 0 551 -202.5t184 -558.5q0 -350 -188.5 -548t-532.5 -198q-334 0 -533.5 193.5t-199.5 566.5zM537 723 q0 -199 63.5 -318.5t163.5 -119.5q96 0 152.5 115.5t56.5 308.5q0 199 -56.5 322.5t-168.5 123.5h-4q-92 0 -149 -120q-58 -122 -58 -312z" /> -<glyph unicode="œ" horiz-adv-x="2285" d="M1186 518q0 246 156 390.5t395 144.5q180 0 312.5 -83t177.5 -214q23 -66 27 -156q1 -14 1 -27q0 -78 -24 -163h-645q6 -31 14 -51.5t29.5 -52.5t64.5 -48t103 -16q168 0 286 98l172 -199q-207 -178 -528 -178q-215 0 -378 141.5t-163 413.5zM1592 612h309 q-2 74 -32.5 119t-119.5 45q-82 0 -117.5 -53.5t-39.5 -110.5zM191 904q167 144 393 145q250 -4 407.5 -147.5t161.5 -393.5v-6q0 -243 -158 -385q-160 -143 -401 -144q-238 0 -406 143q-166 141 -165 394q-1 248 168 394zM442 514q0 -125 43 -201.5t109 -76.5 q63 0 101 76.5t38 195.5t-40 195.5t-109 78.5q-59 0 -100.5 -77.5t-41.5 -190.5z" /> -<glyph unicode="˚" horiz-adv-x="1705" /> -<glyph unicode=" " horiz-adv-x="833" /> -<glyph unicode=" " horiz-adv-x="1669" /> -<glyph unicode=" " horiz-adv-x="833" /> -<glyph unicode=" " horiz-adv-x="1669" /> -<glyph unicode=" " horiz-adv-x="555" /> -<glyph unicode=" " horiz-adv-x="415" /> -<glyph unicode=" " horiz-adv-x="276" /> -<glyph unicode=" " horiz-adv-x="276" /> -<glyph unicode=" " horiz-adv-x="206" /> -<glyph unicode=" " horiz-adv-x="333" /> -<glyph unicode=" " horiz-adv-x="92" /> -<glyph unicode="‐" d="M96 352v273h594v-273h-594z" /> -<glyph unicode="‑" d="M96 352v273h594v-273h-594z" /> -<glyph unicode="‒" d="M96 352v273h594v-273h-594z" /> -<glyph unicode="–" horiz-adv-x="915" d="M66 352v273h772v-273h-772z" /> -<glyph unicode="—" horiz-adv-x="1292" d="M86 352v273h1104v-273h-1104z" /> -<glyph unicode="’" horiz-adv-x="559" d="M74 1436h405l-73 -613h-256z" /> -<glyph unicode="•" horiz-adv-x="712" d="M123 659q0 86 63.5 160t168 74t170 -74t65.5 -160q0 -96 -62.5 -158.5t-173.5 -62.5q-98 0 -164.5 67.5t-66.5 153.5z" /> -<glyph unicode="…" horiz-adv-x="1585" d="M1088 213q0 86 63.5 159.5t168 73.5t170 -73.5t65.5 -159.5q0 -96 -62.5 -158.5t-173.5 -62.5q-98 0 -164.5 67.5t-66.5 153.5zM559 213q0 86 63.5 159.5t168 73.5t170 -73.5t65.5 -159.5q0 -96 -62.5 -158.5t-173.5 -62.5q-98 0 -164.5 67.5t-66.5 153.5zM31 213 q0 86 63.5 159.5t168 73.5t170 -73.5t65.5 -159.5q0 -96 -62.5 -158.5t-173.5 -62.5q-98 0 -164.5 67.5t-66.5 153.5z" /> -<glyph unicode=" " horiz-adv-x="333" /> -<glyph unicode=" " horiz-adv-x="415" /> -<glyph unicode="™" horiz-adv-x="3500" d="M1487 0v264h111v903h-109v265h776l207 -766l197 766h780v-265h-112v-901h112v-266h-647v266h117l-2 684v121h-8q-35 -190 -60 -274l-215 -797h-428l-229 817q-35 119 -43 254h-9v-807h117v-264h-555zM31 899v533h1374v-533h-301v262h-172v-889h170v-272h-762v272h168v889 h-176v-262h-301z" /> -<glyph unicode="" horiz-adv-x="1025" d="M0 1025h1025v-1025h-1025v1025z" /> -<glyph unicode="fi" horiz-adv-x="1466" d="M842 0v268h86v490h-86v266h475v-756h99v-268h-574zM900 1323q0 78 60 143.5t160.5 65.5t163 -65.5t62.5 -143.5q0 -88 -60.5 -147.5t-164.5 -59.5q-92 0 -156.5 64.5t-64.5 142.5zM51 758v266h84v174q0 43 6 84t31 97.5t66 96.5t119.5 68.5t183.5 28.5q80 0 170 -15.5 t131 -35.5l-123 -236q-45 20 -113 21q-66 0 -65 -109v-174h186v-266h-186v-490h123v-268h-611v268h82v490h-84z" /> -<glyph unicode="fl" horiz-adv-x="1470" d="M842 0v268h88v1004h-86v264h475v-1268h121v-268h-598zM51 758v266h84v174q0 43 6 84t31 97.5t66 96.5t119.5 68.5t183.5 28.5q80 0 170 -15.5t131 -35.5l-123 -236q-45 20 -113 21q-66 0 -65 -109v-174h186v-266h-186v-490h123v-268h-611v268h82v490h-84z" /> -<glyph unicode="ffi" horiz-adv-x="2256" d="M1632 0v268h86v490h-86v266h475v-756h99v-268h-574zM1690 1323q0 78 60 143.5t160.5 65.5t163 -65.5t62.5 -143.5q0 -88 -60.5 -147.5t-164.5 -59.5q-92 0 -156.5 64.5t-64.5 142.5zM842 758v266h84v174q0 43 6 84t31 97.5t66 96.5t119.5 68.5t183.5 28.5q80 0 170 -15.5 t131 -35.5l-123 -236q-45 20 -113 21q-66 0 -65 -109v-174h186v-266h-186v-490h123v-268h-611v268h82v490h-84zM51 758v266h84v174q0 43 6 84t31 97.5t66 96.5t119.5 68.5t183.5 28.5q80 0 170 -15.5t131 -35.5l-123 -236q-45 20 -113 21q-66 0 -65 -109v-174h186v-266h-186 v-490h123v-268h-611v268h82v490h-84z" /> -<glyph unicode="ffl" horiz-adv-x="2260" d="M1632 0v268h88v1004h-86v264h475v-1268h121v-268h-598zM842 758v266h84v174q0 43 6 84t31 97.5t66 96.5t119.5 68.5t183.5 28.5q80 0 170 -15.5t131 -35.5l-123 -236q-45 20 -113 21q-66 0 -65 -109v-174h186v-266h-186v-490h123v-268h-611v268h82v490h-84zM51 758v266 h84v174q0 43 6 84t31 97.5t66 96.5t119.5 68.5t183.5 28.5q80 0 170 -15.5t131 -35.5l-123 -236q-45 20 -113 21q-66 0 -65 -109v-174h186v-266h-186v-490h123v-268h-611v268h82v490h-84z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/Chunkfive-webfont.ttf b/app/assets/fonts/Chunkfive-webfont.ttf deleted file mode 100755 index af3b7f7f..00000000 Binary files a/app/assets/fonts/Chunkfive-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/Chunkfive-webfont.woff b/app/assets/fonts/Chunkfive-webfont.woff deleted file mode 100755 index d152f8ec..00000000 Binary files a/app/assets/fonts/Chunkfive-webfont.woff and /dev/null differ diff --git a/app/assets/fonts/liberator-webfont.eot b/app/assets/fonts/liberator-webfont.eot deleted file mode 100755 index c8931bf9..00000000 Binary files a/app/assets/fonts/liberator-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/liberator-webfont.svg b/app/assets/fonts/liberator-webfont.svg deleted file mode 100755 index 0e59a6c9..00000000 --- a/app/assets/fonts/liberator-webfont.svg +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="LiberatorRegular" horiz-adv-x="1024" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="500" /> -<glyph horiz-adv-x="0" /> -<glyph horiz-adv-x="2048" /> -<glyph unicode=" " /> -<glyph unicode="!" d="M532 25v258q0 29 29 28h242q12 0 21.5 -8t9.5 -20v-258h-3q-4 -25 -28 -25h-242q-25 0 -29 25zM532 526v873q0 29 29 28h242q12 0 21.5 -8t9.5 -20v-873h-3q-4 -25 -28 -24h-242q-25 0 -29 24z" /> -<glyph unicode=""" d="M350 1026v379q0 29 29 29h242q29 0 28 -29v-379q-4 -25 -28 -25h-242q-25 0 -29 25zM723 1026v379q0 29 29 29h241q29 0 29 -29v-379q-4 -25 -29 -25h-241q-25 0 -29 25z" /> -<glyph unicode="#" horiz-adv-x="1536" d="M174 319v244q0 29 29 29h180l72 272h-252q-12 0 -20.5 9.5t-8.5 19.5v244q0 29 29 28h329l54 209q0 29 28 29h244q29 0 29 -29l-53 -209h299l55 209q0 29 29 29h241q12 0 21.5 -8.5t9.5 -20.5l-55 -209h73q29 0 29 -28v-244q0 -10 -8 -19.5t-21 -9.5h-151l-70 -272h221 q29 0 29 -29v-244q0 -10 -8 -19t-21 -9h-299l-67 -260q0 -12 -9.5 -20.5t-21.5 -8.5h-242q-29 0 -28 29l67 260h-301l-67 -260q0 -29 -29 -29h-244q-29 0 -28 29l67 260h-102q-12 0 -20.5 9t-8.5 19zM684 592h301l70 272h-299z" /> -<glyph unicode="$" d="M274 287v166q0 23 25 22h197q23 0 22 -22v-74h209q6 0 8 4l29 27q4 4 4 8v133q0 2 -4 10l-29 27q-4 4 -8 4h-299q-24 0 -43 18l-92 92q-19 19 -19 43v396q0 24 19 43l92 94q23 23 43 16h94v113q0 25 23 25h198q23 0 23 -25v-113h92q19 6 43 -16l94 -94q19 -19 19 -43h-2 l2 -2v-172q0 -23 -25 -23h-196q-25 0 -25 23v84h-205q-8 0 -12 -4l-27 -29q-6 -6 -6 -8v-138h2v-4q0 -6 4 -8l25 -24h309q20 6 43 -17l94 -94q19 -19 19 -43v-393q0 -30 -19 -43l-94 -94q-17 -19 -43 -19h-92v-113q-4 -20 -23 -20h-198q-18 0 -23 20v113h-94q-24 0 -43 19 l-92 92q-19 19 -19 43z" /> -<glyph unicode="%" d="M207 1112v277q0 29 29 28h243q29 0 29 -28v-277h-2q-4 -25 -27 -25h-243q-25 0 -29 25zM274 29l451 1360q0 12 9 20t22 8h241q29 0 29 -28l-451 -1360q0 -29 -28 -29h-242q-12 0 -21.5 8t-9.5 21zM821 25v276q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-276 q-4 -25 -28 -25h-244q-23 0 -27 25h-2z" /> -<glyph unicode="&" d="M168 524v244q0 29 29 29h284v284q0 10 8.5 19.5t20.5 9.5h242q12 0 21 -9t9 -20v-284h287q25 -4 25 -29v-244q0 -23 -25 -26v-2h-287v-287h-2q-4 -27 -28 -27h-242q-25 0 -29 27v287h-284q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="'" d="M537 1026v379q0 29 28 29h242q29 0 29 -29v-379q-4 -25 -29 -25h-242q-25 0 -28 25z" /> -<glyph unicode="(" horiz-adv-x="989" d="M438 190v1051q-6 26 21 53l116 117q10 10 18.5 13t16.5 6q8 2 19 2h264v-302h-100q-8 0 -15 -6l-33 -32q-6 -6 -6 -13v-735q0 -8 6 -14l29 -29h119v-301h-264q-31 0 -54 23l-116 114q-26 26 -21 53z" /> -<glyph unicode=")" horiz-adv-x="976" d="M451 4v301h118l29 29q6 6 6 14v735q0 2 -2 5.5t-4 7.5l-35 32q-4 6 -12 7h-100v301h264q32 0 53 -21l115 -117q22 -22 22 -53v-1050q0 -31 -22 -54l-115 -114q-23 -23 -53 -23h-264z" /> -<glyph unicode="*" horiz-adv-x="1155" d="M265 796.5q1 8.5 5 12.5l205 145l-203 142q-14 10 -4 28l92 131q12 16 27 5l162 -115v198q0 18 20 19h160q20 0 21 -19v-198l161 115q14 12 27 -5l92 -131q10 -18 -4 -28l-203 -142l205 -145q4 -4 5 -12.5t-3 -12.5l-92 -133q-10 -10 -25 -4v-2l-163 117v-201h-2 q0 -16 -19 -16h-160q-18 0 -18 16h-2v201l-164 -117v2q-14 -6 -25 4l-92 133q-4 4 -3 12.5z" /> -<glyph unicode="+" d="M168 524v244q0 29 29 29h284v284q0 10 8.5 19.5t20.5 9.5h242q12 0 21 -9t9 -20v-284h287q25 -4 25 -29v-244q0 -23 -25 -26v-2h-287v-287h-2q-4 -27 -28 -27h-242q-25 0 -29 27v287h-284q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="," d="M598 29v276q0 29 29 29h241q12 0 21.5 -8.5t9.5 -20.5v-387l-2 2q-5 -31 -37 -18l-235 96q-25 10 -27 31z" /> -<glyph unicode="-" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="." d="M535 29v276q0 29 28 29h242q29 0 29 -29v-276q-4 -25 -29 -25h-242q-25 0 -28 25z" /> -<glyph unicode="/" d="M328 29l450 1374q0 29 29 29h244q10 0 19 -8.5t9 -20.5l-450 -1374q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29z" /> -<glyph unicode="0" horiz-adv-x="1173" d="M250 195v1048h2q-7 26 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2q0 -2 1 -2t1 -2v-1049q0 -28 -22 -51l-115 -116q-27 -27 -53 -21h-531q-27 -5 -53 21l-115 114q-27 27 -20 53q0 2 -2 5zM551 344q0 -6 8 -12l27 -29h239l29 29q6 6 6 12v737 q0 2 -2 4t-4 7l-35 34q-10 6 -14 7h-199q-6 0 -14 -7l-33 -34q-11 -12 -8 -15v-733z" /> -<glyph unicode="1" horiz-adv-x="694" d="M233.5 1136.5q-8.5 8.5 2.5 26.5l96 236q10 25 28 26h281l4 -2q12 0 23 -22v-1372q0 -12 -9.5 -20.5t-21.5 -8.5h-242q-29 0 -28 29v1095h-115v2q-10 2 -18.5 10.5z" /> -<glyph unicode="2" horiz-adv-x="1226" d="M313 29v606q0 30 23 53l115 115q20 20 53 20h383l28 29q2 4 4.5 5t2.5 5v215q0 6 -7 13l-32 32q-8 8 -15 8h-254v-104q0 -29 -28 -29h-244q-29 0 -29 29v215q0 30 23 53l115 115q18 18 53 21l530 2v-2q32 0 53 -21l115 -115q21 -21 21 -53v-528q0 -31 -21 -54l-117 -114 q-26 -26 -51 -21h-368l-11 -6l-34 -35q-6 -6 -7 -10v-172h580q12 0 20.5 -9t8.5 -22v-241q0 -29 -29 -29h-852q-29 0 -29 29z" /> -<glyph unicode="3" horiz-adv-x="1247" d="M371 190h2q-2 2 -2 5v211q0 12 9 20t19 8h244q29 0 29 -28v-103h258l28 27q6 8 7 14v170q0 3 -7 12l-34 33q-4 4 -7.5 5t-7.5 3h-213v299h234l28 29q6 8 7 14v170q0 2 -2 5t-5 8l-34 32q-4 4 -7.5 5t-7.5 4h-237v-105q0 -29 -29 -29h-244q-10 0 -19 8.5t-9 20.5v211 q0 2 2 4h-2q0 31 22 53l115 115q10 10 18.5 13t16.5 6q8 2 18 2h514q32 0 53 -21l115 -115q23 -23 23 -53v-407q0 -31 -23 -54l-80 -82l80 -82q23 -18 23 -36v-392q0 -30 -23 -53l-115 -114q-27 -27 -53 -21h-514q-27 -5 -53 21l-115 114q-22 22 -22 53z" /> -<glyph unicode="4" horiz-adv-x="1128" d="M168 555h2l-2 4v838q0 10 9 19t22 9h241q12 0 20.5 -9t8.5 -19v-688q0 -6 6 -15l29 -28h213v731q0 29 28 28h244q10 0 19.5 -8t9.5 -20v-731h106q10 0 19.5 -8.5t9.5 -20.5v-244q0 -10 -9 -19t-20 -9h-106v-336q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29v336h-359 q-30 0 -53 22l-115 115q-22 22 -22 53z" /> -<glyph unicode="5" horiz-adv-x="1189" d="M279 1401q0 12 9 21.5t21 9.5h852q10 0 19.5 -9.5t9.5 -21.5v-242q0 -12 -9.5 -20.5t-19.5 -8.5h-581v-169q-2 -2 0 -5q0 -6 8 -10l33 -35q8 -4 10 -4h368v-2q32 0 54 -20l114 -115q23 -23 23 -53v-529q0 -30 -23 -53l-114 -115q-26 -26 -54 -20h-530q-26 -5 -53 20 l-115 115q-25 25 -20 53v215q0 29 28 29h242q29 0 29 -29v-102h254q10 0 14 6l35 33q2 4 4 5t2 5v213l-2 -2v4q0 6 -6 13l-29 28h-383q-27 -5 -53 21l-115 114q-25 25 -20 54z" /> -<glyph unicode="6" horiz-adv-x="1153" d="M258 188h2q0 2 -1 2t-1 3v1044q0 2 1 2t1 2h-2q0 30 23 53l114 115q18 18 54 21h514q32 0 53 -21l114 -115q23 -23 23 -53v-215q0 -29 -29 -29h-243q-29 0 -29 29v104h-238q-4 -2 -7 -3t-7 -5l-35 -32q-6 -6 -6 -13v-170q0 -6 6 -14l29 -29h151q2 2 5 2h211l2 -2v2 q30 0 53 -22l114 -115q23 -23 23 -53v-490q0 -28 -23 -51l-114 -115q-27 -27 -53 -20h-529q-20 4 -39 20l-114 115q-23 23 -23 53zM559 342q0 -6 6 -14l27 -25h225l29 29q6 4 6 12v168q0 10 -6 14l-39 39h-193q-4 -2 -7 -3t-7 -5l-35 -33q-6 -6 -6 -12v-170z" /> -<glyph unicode="7" horiz-adv-x="1136" d="M256 1153v244q0 10 8 19t21 9h821q12 0 20.5 -9t8.5 -19v-244q0 -6 -8.5 -26.5t-12.5 -24.5l-387 -1073l-8 -29h-367v2q0 10 6 21l414 1101h-487q-29 0 -29 29z" /> -<glyph unicode="8" d="M260 188v392q4 20 21 36l81 82l-81 82q-26 26 -21 54v409q0 31 21 51l116 115q18 18 54 21h514q32 0 53 -21l115 -115q20 -20 20 -51v-409q0 -32 -20 -54l-82 -82l82 -82q16 -16 20 -36v-392q0 -32 -20 -53l-115 -115q-20 -20 -41 -20h-543q-16 0 -37 20l-116 115 q-21 21 -21 53zM561 342q0 -8 6 -14l29 -27h221l29 27q6 6 6 14v170q0 6 -6 12l-33 33q-4 4 -8 5t-6 3h-185q-2 -2 -6 -3t-8 -5l-33 -33q-6 -6 -6 -12v-170zM561 907q0 -8 6 -14l29 -29h221l29 29q6 6 6 14v168q0 10 -6 15l-33 32q-4 4 -8 5t-6 3h-185q-2 -2 -6 -3t-8 -5 l-33 -32q-6 -4 -6 -15v-168z" /> -<glyph unicode="9" horiz-adv-x="1148" d="M262 188v215q0 29 29 29h241q12 0 21.5 -8t9.5 -21v-102h238q8 0 14 6l33 33q6 6 6 10v172q0 8 -6 15l-29 28h-149q-2 0 -4 -2h-211q-2 0 -2 1t-6 0q-24 -4 -50 22l-114 114q-26 26 -21 54v489q-2 4 1 19.5t20 31.5l114 115q18 18 54 21h530q20 -4 37 -21l117 -115 q20 -20 20 -53v-1053q0 -33 -20 -53l-117 -115q-27 -27 -53 -20h-514q-27 -5 -54 20l-114 115q-26 26 -21 53zM561 918q2 -4 3 -7.5t5 -7.5l33 -35l6 -2l193 -2v2q8 0 14 6l33 33q6 6 6 10v172q0 8 -6 15l-27 24h-223l-29 -28q-6 -4 -6 -13v-59h-2v-108z" /> -<glyph unicode=":" d="M530 27v276q0 12 9.5 20.5t21.5 8.5h242q29 0 28 -29v-276q-4 -25 -28 -25h-242q-25 0 -29 25h-2zM530 547v276q0 10 9.5 19.5t21.5 9.5h242q12 0 20 -9t8 -20v-276q-4 -25 -28 -25h-242q-25 0 -29 25h-2z" /> -<glyph unicode=";" d="M537 41v276q0 12 9 20.5t19 8.5h244q29 0 29 -29v-385q-5 -32 -37 -18l-236 96q-27 12 -26 31h-2zM537 561v277q0 10 9 19t19 9h244q12 0 20.5 -9t8.5 -19v-277q-4 -25 -29 -24h-244q-23 0 -26 24h-2z" /> -<glyph unicode="<" horiz-adv-x="1103" d="M309 510v272q0 23 25 35l719 352q4 2 8 4.5t12 5.5t17.5 -8.5t9.5 -21.5v-264q0 -25 -29 -37l-399 -201l399 -201q29 -12 29 -36v-265q0 -10 -10 -21q-15 -19 -37 3l-719 350q-24 8 -25 33z" /> -<glyph unicode="=" horiz-adv-x="1064" d="M211 381v244q0 29 29 28h872q25 -4 25 -28v-244q0 -23 -25 -27v-2h-872q-12 0 -20.5 9.5t-8.5 19.5zM211 821v242q0 29 29 29h872q25 -4 25 -29v-242q0 -25 -25 -28v-2h-872q-12 0 -20.5 9t-8.5 21z" /> -<glyph unicode=">" horiz-adv-x="1136" d="M342 141v265q0 25 29 36l397 201l-397 201q-29 12 -29 37v264q0 10 8 21.5t17.5 8.5t13.5 -5.5t8 -4.5l719 -352q25 -13 25 -35v-272q0 -25 -25 -33l-719 -350q-23 -23 -35 -7.5t-12 25.5z" /> -<glyph unicode="?" horiz-adv-x="1204" d="M295 1010v227q-6 25 20 53l115 115q22 22 53 22h531q31 0 53 -22l115 -115q16 -16 20 -37h2v-731q0 -12 -9 -20t-21 -8h-291v-78q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29v348q0 12 8 21.5t20 9.5h293v288q0 8 -6 15l-29 28h-237l-29 -28q-6 -4 -6 -15v-73 q0 -12 -9 -21.5t-22 -9.5h-241q-12 0 -20.5 9t-8.5 22zM582 25v256q0 12 8 21t20 9h244q12 0 20.5 -9t8.5 -21v-256h-2q-5 -25 -27 -25h-244q-23 0 -28 25z" /> -<glyph unicode="@" horiz-adv-x="1505" d="M162 -78v1127q-7 13 14 34l78 78q17 17 35 17h1097q18 0 35 -17l78 -78q7 -7 11.5 -18.5t3.5 -14.5t2 -3v-938h-922q-14 -5 -35 14l-80 78q-6 6 -9 13q-7 17 -5 24h2l-2 2v503q-8 15 14 37l78 78q6 6 13.5 8t12.5 4t11 2h479q6 0 11 -2t11.5 -4t14.5 -8l78 -78 q6 -6 8 -13t4 -12t2 -10v-432h109v627q0 2 -4 6l-23 23q-4 4 -10 4h-873q-6 0 -8 -4l-24 -23q-4 -4 -4 -6v-913q0 -2 4 -11l20 -18h805v-205h-903q-16 -5 -37 14l-78 78q-6 6 -9 13q-7 18 -5 24zM670 342q0 -6 4 -10l18 -19h283l18 19q4 4 4 10v293l-4 8l-22 23l-8 4h-256 q-2 0 -11 -4l-22 -23l-4 -8v-293z" /> -<glyph unicode="A" horiz-adv-x="1198" d="M141 29l406 1372v2q12 29 28 29h244q18 0 29 -29v-2q102 -344 202.5 -686t202.5 -686q1 -3 1 -5q0 -6 -8 -14q-11 -10 -23 -10h-234q-26 0 -37 29l-49 166h-411l-50 -166q-12 -29 -36 -29h-234q-12 0 -24 9q-9 7 -8 14q0 3 1 6zM573 471h248l-123 420z" /> -<glyph unicode="B" horiz-adv-x="1126" d="M256 29v1374q0 29 29 29h651q30 0 53 -23l115 -115q22 -22 22 -53v-407q0 -31 -22 -54l-80 -82l80 -80q15 -15 20 -36h2v-392q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM557 301h234l28 29q6 8 6 14v170q0 2 -2 4t-4 6l-35 35q-6 6 -12 6h-215v-264z M557 866h234l28 29q6 8 6 14v170q0 2 -2 4t-4 7l-35 34q-4 6 -12 6h-215v-264z" /> -<glyph unicode="C" horiz-adv-x="1155" d="M248 193v1050q0 33 20 53l115 115q26 23 53 23h531q28 0 53 -23l115 -115q22 -22 22 -53h-2l2 -4v-215q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-6 6 -14 7h-199q-6 0 -14 -7l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l29 -29h237l29 29q6 6 6 14v62q0 10 8 19t21 9h243q10 0 19.5 -9t9.5 -19v-232q-5 -19 -22 -37l-115 -114q-23 -23 -53 -23h-531q-33 0 -53 23l-115 114q-20 20 -20 54z" /> -<glyph unicode="D" horiz-adv-x="1126" d="M254 29v1374q0 29 29 29h651q28 0 53 -23l115 -115q22 -24 22 -53v-1051q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM555 301h233l29 29q6 8 6 14v735q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-213v-829z" /> -<glyph unicode="E" horiz-adv-x="1064" d="M258 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -12 -9.5 -20.5t-19.5 -8.5h-473v-264h363q29 0 28 -28v-244q0 -29 -28 -29h-363v-264h473q10 0 19.5 -8t9.5 -21v-243q0 -12 -9.5 -20.5t-19.5 -8.5h-745q-29 0 -29 29z" /> -<glyph unicode="F" horiz-adv-x="1060" d="M254 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -18 -17 -24v-5h-485v-264h363q29 0 28 -28v-244q0 -18 -14 -25v-4h-377v-536q0 -29 -29 -29h-243q-29 0 -29 29z" /> -<glyph unicode="G" horiz-adv-x="1163" d="M254 193v1048h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2v-217q0 -10 -9 -19.5t-21 -9.5h-242q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-199q-8 0 -14 -6l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l27 -29h239l29 29q6 8 6 14v180h-135q-12 0 -20.5 9.5t-8.5 19.5v244q0 29 29 28h406q12 0 21 -8t9 -20v-623h-2q-4 -20 -20 -37l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="H" horiz-adv-x="1163" d="M254 29v1374q0 29 29 29h243q10 0 19.5 -8.5t9.5 -20.5v-537h307v537q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-1374q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v536h-307v-536q0 -12 -9 -20.5t-20 -8.5h-243q-29 0 -29 29z" /> -<glyph unicode="I" horiz-adv-x="544" d="M244 29v1368q0 28 26 28h2h244q29 0 29 -28v-1368q0 -29 -29 -29h-244q-29 0 -28 29z" /> -<glyph unicode="J" horiz-adv-x="1253" d="M344 174v322q0 29 29 28h243q10 0 19.5 -8t9.5 -20v-152q0 -10 6 -14l29 -29h238l28 29q6 6 6 14v1059q4 22 27 22h2h244q25 0 28 -22v-1213q0 -30 -22 -53l-115 -117q-21 -21 -42 -21q-6 0 -11 1h-531q-4 -1 -9 -1q-20 0 -42 21l-116 117q-13 13 -19 37h-2z" /> -<glyph unicode="K" horiz-adv-x="1077" d="M176 29v1374q0 10 8.5 19.5t20.5 9.5h244q12 0 20 -9.5t8 -19.5v-449l303 449q23 29 37 29h309q10 0 25.5 -9.5t11.5 -19.5l-385 -539l389 -819l9 -16q1 -3 1 -5q-1 -6 -9 -14q-12 -10 -23 -10h-273q-25 0 -36 29l-252 565l-107 -148v-417q0 -29 -28 -29h-244 q-29 0 -29 29z" /> -<glyph unicode="L" horiz-adv-x="1083" d="M258 29v1374h2q4 22 27 22h2h241q25 0 29 -22v-1102h549q12 0 21.5 -9t9.5 -20v-243q0 -12 -9.5 -20.5t-21.5 -8.5h-819q-12 0 -21.5 8t-9.5 21z" /> -<glyph unicode="M" horiz-adv-x="1216" d="M154 29l55 1368v6q2 12 8 15t9 4t5 3h261q20 0 30 -26l185 -791l22 -172l16 172l216 791q6 26 28 26h2h260q4 -4 9 -4q8 -6 12 -18v-4l2 -2l53 -1368q0 -29 -29 -29h-241q-12 0 -21.5 8t-9.5 21l-8 518l-158 -522q-12 -29 -37 -29h-164q-22 0 -38 29l-156 522l-10 -518 q0 -29 -29 -29h-244q-10 0 -19 8t-9 21z" /> -<glyph unicode="N" horiz-adv-x="1198" d="M256 31v1374q0 29 29 29h305q23 0 28 -29h3l270 -791l4 -22v813q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1374q0 -10 -8 -19.5t-21 -9.5h-323q-26 0 -37 29l-250 684v-684q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9t-8.5 20z" /> -<glyph unicode="O" horiz-adv-x="1163" d="M254 190v1051q0 30 22 53l115 115q23 23 53 23h529q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-117 -114q-23 -23 -51 -23h-531q-30 0 -53 23l-115 114q-22 22 -22 53zM555 344q0 -6 6 -14l29 -29h237l29 29q6 6 6 14v735q0 6 -6 13l-33 32q-6 6 -14 6 h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-735z" /> -<glyph unicode="P" horiz-adv-x="1126" d="M256 31v1374q0 29 29 29h651q32 0 53 -21l115 -117q22 -22 22 -53v-522l-2 -2h2q0 -31 -22 -53l-115 -117q-27 -27 -53 -21h-379v-497q0 -10 -9 -19.5t-22 -9.5h-241q-12 0 -20.5 9t-8.5 20zM557 829h215q6 0 12 7l35 32q2 4 4 5t2 6v202q0 2 -2 4t-4 7l-35 34 q-4 2 -7 4.5t-5 2.5h-215v-304z" /> -<glyph unicode="Q" horiz-adv-x="1167" d="M258 190v1051q0 30 23 53l114 115q23 23 54 23h528q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-43 -43l78 -186q5 -10 5 -18t-6 -13q-12 -10 -22 -10h-274q-26 0 -37 29l-45 104h-354q-31 0 -54 23l-114 114q-23 23 -23 53zM559 340q0 -4 6 -10l29 -29 h237l29 29q6 6 6 10v739q0 6 -6 13l-33 32q-6 6 -14 6h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-739z" /> -<glyph unicode="R" horiz-adv-x="1130" d="M256 29v1374q0 12 9 20.5t20 8.5h651q32 0 53 -21l117 -117q20 -20 20 -57v-520q0 -33 -20 -53l-117 -117l-6 -4l209 -514q1 -3 1 -5q0 -6 -8 -14q-11 -10 -22 -10h-274q-26 0 -37 29l-201 497h-94v-497q0 -10 -8 -19.5t-21 -9.5h-243q-10 0 -19.5 9t-9.5 20zM557 827 h215q8 0 14 7l33 32q6 6 6 11v202q0 6 -6 13l-33 32q-6 6 -12 6h-217v-303z" /> -<glyph unicode="S" horiz-adv-x="1159" d="M248 195v198q0 12 9 20.5t22 8.5h241q29 0 29 -29v-92h258q4 0 10 6l35 33q2 4 4 5t2 5v164q0 2 -2 5t-4 7l-35 33q-6 6 -10 6h-369q-30 0 -53 23l-115 114q-25 25 -20 54h-2v485h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2 v-211q0 -12 -9 -20.5t-22 -8.5h-241q-29 0 -29 29v102h-254q-8 0 -14 -6l-33 -32q-17 -17 -8 -17v-166l2 2v-6q0 -4 6 -10l29 -29h383q30 0 53 -22l115 -115q22 -22 22 -53v-486q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="T" horiz-adv-x="983" d="M176 1155v242q0 12 9.5 21t21.5 9h819q12 0 21.5 -9t9.5 -21v-242q0 -12 -9.5 -20.5t-21.5 -8.5h-260v-1101q-4 -25 -29 -25h-241q-25 0 -29 25v1101h-260q-12 0 -21.5 8.5t-9.5 20.5z" /> -<glyph unicode="U" horiz-adv-x="1173" d="M254 190h2l-2 5v1208q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1059q0 -6 6 -14l29 -29h237l29 29q4 4 5 8t3 6v1059q0 29 29 29h242q29 0 28 -29v-1213q0 -33 -20 -53l-115 -114q-23 -23 -53 -23l-531 2q-27 -5 -53 21l-115 114q-22 22 -22 53z" /> -<glyph unicode="V" horiz-adv-x="1118" d="M160 1397q-2 4 -2 9q0 6 5 14q9 14 21 14h256q20 0 31 -29l184 -791l17 -120l20 120l217 791q6 29 31 29h256q12 0 20 -14q6 -9 6 -16q0 -4 -1 -7l-357 -1364q-10 -31 -39 -31h-272q-27 0 -37 31z" /> -<glyph unicode="W" horiz-adv-x="1208" d="M135 1399q0 10 8.5 19t20.5 9h242q12 0 21 -9t9 -19l49 -697l117 318q12 29 37 29h164q22 0 39 -29l114 -318l52 697q0 10 8 19t20 9h244q10 0 19.5 -9t9.5 -19l-111 -1368v-6q-4 -12 -12 -19q-2 0 -2 -1t-2 -1l-2 -2h-4l-5 -2h-256q-23 0 -28 29l-144 516l-14 102 l-12 -102l-160 -516q-10 -29 -31 -29h-256q-2 0 -2 1t-2 1l-6 2q-2 0 -2 2q-12 6 -12 19q-2 0 -2 2v4z" /> -<glyph unicode="X" horiz-adv-x="1077" d="M164 31q4 12 8 16l350 721l-313 627q-13 13 -0.5 25t24.5 12h256q17 0 31 -29l172 -307l174 307q14 29 31 29h256q12 0 23 -10q15 -14 2 -27l-314 -627l350 -721q12 -12 12 -22q0 -7 -6 -12q-14 -13 -26 -13h-262q-12 0 -23.5 9t-15.5 22l-201 397l-198 -397 q-4 -12 -15.5 -21.5t-23.5 -9.5h-262q-13 0 -23 9q-8 7 -7 15q0 3 1 7z" /> -<glyph unicode="Y" horiz-adv-x="1081" d="M155 1413q11 10 23 10h264q26 0 37 -28l201 -400l199 400q17 28 39 28h262q12 0 23 -9q8 -7 8 -13q0 -2 -1 -4q-4 -8 -5 -12.5t-5 -8.5l-371 -719v-628q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v628l-370 719q-8 15 -8 25q0 8 5 12z" /> -<glyph unicode="Z" horiz-adv-x="1136" d="M252 31v243q0 10 6 21l492 835h-469q-10 0 -19.5 8.5t-9.5 20.5v244q0 12 9 20.5t20 8.5h821q29 0 28 -29v-244q0 -14 -8 -20l-495 -838h475q29 0 28 -29v-241q0 -12 -8 -21.5t-20 -9.5h-821q-10 0 -19.5 9t-9.5 22z" /> -<glyph unicode="\" d="M305 1403q0 29 29 29h244q10 0 19 -8.5t9 -20.5l451 -1374q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29z" /> -<glyph unicode="^" d="M96 678q4 12 8 16l351 719q13 25 34 25h273q14 0 23.5 -9.5t11.5 -15.5l350 -719q4 -4 8 -16t-6 -21.5t-23 -9.5h-262q-12 0 -23.5 9.5t-15.5 19.5l-200 399l-199 -399q-4 -10 -15.5 -19.5t-23.5 -9.5h-262q-12 0 -22.5 9.5t-6.5 21.5z" /> -<glyph unicode="a" horiz-adv-x="1198" d="M141 29l406 1372v2q12 29 28 29h244q18 0 29 -29v-2q102 -344 202.5 -686t202.5 -686q1 -3 1 -5q0 -6 -8 -14q-11 -10 -23 -10h-234q-26 0 -37 29l-49 166h-411l-50 -166q-12 -29 -36 -29h-234q-12 0 -24 9q-9 7 -8 14q0 3 1 6zM573 471h248l-123 420z" /> -<glyph unicode="b" horiz-adv-x="1126" d="M256 29v1374q0 29 29 29h651q30 0 53 -23l115 -115q22 -22 22 -53v-407q0 -31 -22 -54l-80 -82l80 -80q15 -15 20 -36h2v-392q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM557 301h234l28 29q6 8 6 14v170q0 2 -2 4t-4 6l-35 35q-6 6 -12 6h-215v-264z M557 866h234l28 29q6 8 6 14v170q0 2 -2 4t-4 7l-35 34q-4 6 -12 6h-215v-264z" /> -<glyph unicode="c" horiz-adv-x="1155" d="M248 193v1050q0 33 20 53l115 115q26 23 53 23h531q28 0 53 -23l115 -115q22 -22 22 -53h-2l2 -4v-215q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-6 6 -14 7h-199q-6 0 -14 -7l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l29 -29h237l29 29q6 6 6 14v62q0 10 8 19t21 9h243q10 0 19.5 -9t9.5 -19v-232q-5 -19 -22 -37l-115 -114q-23 -23 -53 -23h-531q-33 0 -53 23l-115 114q-20 20 -20 54z" /> -<glyph unicode="d" horiz-adv-x="1126" d="M254 29v1374q0 29 29 29h651q28 0 53 -23l115 -115q22 -24 22 -53v-1051q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM555 301h233l29 29q6 8 6 14v735q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-213v-829z" /> -<glyph unicode="e" horiz-adv-x="1064" d="M258 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -12 -9.5 -20.5t-19.5 -8.5h-473v-264h363q29 0 28 -28v-244q0 -29 -28 -29h-363v-264h473q10 0 19.5 -8t9.5 -21v-243q0 -12 -9.5 -20.5t-19.5 -8.5h-745q-29 0 -29 29z" /> -<glyph unicode="f" horiz-adv-x="1060" d="M254 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -18 -17 -24v-5h-485v-264h363q29 0 28 -28v-244q0 -18 -14 -25v-4h-377v-536q0 -29 -29 -29h-243q-29 0 -29 29z" /> -<glyph unicode="g" horiz-adv-x="1163" d="M254 193v1048h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2v-217q0 -10 -9 -19.5t-21 -9.5h-242q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-199q-8 0 -14 -6l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l27 -29h239l29 29q6 8 6 14v180h-135q-12 0 -20.5 9.5t-8.5 19.5v244q0 29 29 28h406q12 0 21 -8t9 -20v-623h-2q-4 -20 -20 -37l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="h" horiz-adv-x="1163" d="M254 29v1374q0 29 29 29h243q10 0 19.5 -8.5t9.5 -20.5v-537h307v537q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-1374q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v536h-307v-536q0 -12 -9 -20.5t-20 -8.5h-243q-29 0 -29 29z" /> -<glyph unicode="i" horiz-adv-x="544" d="M244 29v1368q0 28 26 28h2h244q29 0 29 -28v-1368q0 -29 -29 -29h-244q-29 0 -28 29z" /> -<glyph unicode="j" horiz-adv-x="1253" d="M344 174v322q0 29 29 28h243q10 0 19.5 -8t9.5 -20v-152q0 -10 6 -14l29 -29h238l28 29q6 6 6 14v1059q4 22 27 22h2h244q25 0 28 -22v-1213q0 -30 -22 -53l-115 -117q-21 -21 -42 -21q-6 0 -11 1h-531q-4 -1 -9 -1q-20 0 -42 21l-116 117q-13 13 -19 37h-2z" /> -<glyph unicode="k" horiz-adv-x="1077" d="M176 29v1374q0 10 8.5 19.5t20.5 9.5h244q12 0 20 -9.5t8 -19.5v-449l303 449q23 29 37 29h309q10 0 25.5 -9.5t11.5 -19.5l-385 -539l389 -819l9 -16q1 -3 1 -5q-1 -6 -9 -14q-12 -10 -23 -10h-273q-25 0 -36 29l-252 565l-107 -148v-417q0 -29 -28 -29h-244 q-29 0 -29 29z" /> -<glyph unicode="l" horiz-adv-x="1083" d="M258 29v1374h2q4 22 27 22h2h241q25 0 29 -22v-1102h549q12 0 21.5 -9t9.5 -20v-243q0 -12 -9.5 -20.5t-21.5 -8.5h-819q-12 0 -21.5 8t-9.5 21z" /> -<glyph unicode="m" horiz-adv-x="1216" d="M154 29l55 1368v6q2 12 8 15t9 4t5 3h261q20 0 30 -26l185 -791l22 -172l16 172l216 791q6 26 28 26h2h260q4 -4 9 -4q8 -6 12 -18v-4l2 -2l53 -1368q0 -29 -29 -29h-241q-12 0 -21.5 8t-9.5 21l-8 518l-158 -522q-12 -29 -37 -29h-164q-22 0 -38 29l-156 522l-10 -518 q0 -29 -29 -29h-244q-10 0 -19 8t-9 21z" /> -<glyph unicode="n" horiz-adv-x="1198" d="M256 31v1374q0 29 29 29h305q23 0 28 -29h3l270 -791l4 -22v813q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1374q0 -10 -8 -19.5t-21 -9.5h-323q-26 0 -37 29l-250 684v-684q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9t-8.5 20z" /> -<glyph unicode="o" horiz-adv-x="1163" d="M254 190v1051q0 30 22 53l115 115q23 23 53 23h529q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-117 -114q-23 -23 -51 -23h-531q-30 0 -53 23l-115 114q-22 22 -22 53zM555 344q0 -6 6 -14l29 -29h237l29 29q6 6 6 14v735q0 6 -6 13l-33 32q-6 6 -14 6 h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-735z" /> -<glyph unicode="p" horiz-adv-x="1126" d="M256 31v1374q0 29 29 29h651q32 0 53 -21l115 -117q22 -22 22 -53v-522l-2 -2h2q0 -31 -22 -53l-115 -117q-27 -27 -53 -21h-379v-497q0 -10 -9 -19.5t-22 -9.5h-241q-12 0 -20.5 9t-8.5 20zM557 829h215q6 0 12 7l35 32q2 4 4 5t2 6v202q0 2 -2 4t-4 7l-35 34 q-4 2 -7 4.5t-5 2.5h-215v-304z" /> -<glyph unicode="q" horiz-adv-x="1167" d="M258 190v1051q0 30 23 53l114 115q23 23 54 23h528q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-43 -43l78 -186q5 -10 5 -18t-6 -13q-12 -10 -22 -10h-274q-26 0 -37 29l-45 104h-354q-31 0 -54 23l-114 114q-23 23 -23 53zM559 340q0 -4 6 -10l29 -29 h237l29 29q6 6 6 10v739q0 6 -6 13l-33 32q-6 6 -14 6h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-739z" /> -<glyph unicode="r" horiz-adv-x="1130" d="M256 29v1374q0 12 9 20.5t20 8.5h651q32 0 53 -21l117 -117q20 -20 20 -57v-520q0 -33 -20 -53l-117 -117l-6 -4l209 -514q1 -3 1 -5q0 -6 -8 -14q-11 -10 -22 -10h-274q-26 0 -37 29l-201 497h-94v-497q0 -10 -8 -19.5t-21 -9.5h-243q-10 0 -19.5 9t-9.5 20zM557 827 h215q8 0 14 7l33 32q6 6 6 11v202q0 6 -6 13l-33 32q-6 6 -12 6h-217v-303z" /> -<glyph unicode="s" horiz-adv-x="1159" d="M248 195v198q0 12 9 20.5t22 8.5h241q29 0 29 -29v-92h258q4 0 10 6l35 33q2 4 4 5t2 5v164q0 2 -2 5t-4 7l-35 33q-6 6 -10 6h-369q-30 0 -53 23l-115 114q-25 25 -20 54h-2v485h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2 v-211q0 -12 -9 -20.5t-22 -8.5h-241q-29 0 -29 29v102h-254q-8 0 -14 -6l-33 -32q-17 -17 -8 -17v-166l2 2v-6q0 -4 6 -10l29 -29h383q30 0 53 -22l115 -115q22 -22 22 -53v-486q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="t" horiz-adv-x="983" d="M176 1155v242q0 12 9.5 21t21.5 9h819q12 0 21.5 -9t9.5 -21v-242q0 -12 -9.5 -20.5t-21.5 -8.5h-260v-1101q-4 -25 -29 -25h-241q-25 0 -29 25v1101h-260q-12 0 -21.5 8.5t-9.5 20.5z" /> -<glyph unicode="u" horiz-adv-x="1173" d="M254 190h2l-2 5v1208q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1059q0 -6 6 -14l29 -29h237l29 29q4 4 5 8t3 6v1059q0 29 29 29h242q29 0 28 -29v-1213q0 -33 -20 -53l-115 -114q-23 -23 -53 -23l-531 2q-27 -5 -53 21l-115 114q-22 22 -22 53z" /> -<glyph unicode="v" horiz-adv-x="1118" d="M160 1397q-2 4 -2 9q0 6 5 14q9 14 21 14h256q20 0 31 -29l184 -791l17 -120l20 120l217 791q6 29 31 29h256q12 0 20 -14q6 -9 6 -16q0 -4 -1 -7l-357 -1364q-10 -31 -39 -31h-272q-27 0 -37 31z" /> -<glyph unicode="w" horiz-adv-x="1208" d="M135 1399q0 10 8.5 19t20.5 9h242q12 0 21 -9t9 -19l49 -697l117 318q12 29 37 29h164q22 0 39 -29l114 -318l52 697q0 10 8 19t20 9h244q10 0 19.5 -9t9.5 -19l-111 -1368v-6q-4 -12 -12 -19q-2 0 -2 -1t-2 -1l-2 -2h-4l-5 -2h-256q-23 0 -28 29l-144 516l-14 102 l-12 -102l-160 -516q-10 -29 -31 -29h-256q-2 0 -2 1t-2 1l-6 2q-2 0 -2 2q-12 6 -12 19q-2 0 -2 2v4z" /> -<glyph unicode="x" horiz-adv-x="1077" d="M164 31q4 12 8 16l350 721l-313 627q-13 13 -0.5 25t24.5 12h256q17 0 31 -29l172 -307l174 307q14 29 31 29h256q12 0 23 -10q15 -14 2 -27l-314 -627l350 -721q12 -12 12 -22q0 -7 -6 -12q-14 -13 -26 -13h-262q-12 0 -23.5 9t-15.5 22l-201 397l-198 -397 q-4 -12 -15.5 -21.5t-23.5 -9.5h-262q-13 0 -23 9q-8 7 -7 15q0 3 1 7z" /> -<glyph unicode="y" horiz-adv-x="1081" d="M155 1413q11 10 23 10h264q26 0 37 -28l201 -400l199 400q17 28 39 28h262q12 0 23 -9q8 -7 8 -13q0 -2 -1 -4q-4 -8 -5 -12.5t-5 -8.5l-371 -719v-628q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v628l-370 719q-8 15 -8 25q0 8 5 12z" /> -<glyph unicode="z" horiz-adv-x="1136" d="M252 31v243q0 10 6 21l492 835h-469q-10 0 -19.5 8.5t-9.5 20.5v244q0 12 9 20.5t20 8.5h821q29 0 28 -29v-244q0 -14 -8 -20l-495 -838h475q29 0 28 -29v-241q0 -12 -8 -21.5t-20 -9.5h-821q-10 0 -19.5 9t-9.5 22z" /> -<glyph unicode="|" d="M496 -242v1585q0 29 28 29h244q10 0 19.5 -8t9.5 -21v-1585q0 -12 -9.5 -20t-19.5 -8h-244q-29 0 -28 28z" /> -<glyph unicode=" " /> -<glyph unicode="­" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode=" " horiz-adv-x="719" /> -<glyph unicode=" " horiz-adv-x="1438" /> -<glyph unicode=" " horiz-adv-x="719" /> -<glyph unicode=" " horiz-adv-x="1438" /> -<glyph unicode=" " horiz-adv-x="479" /> -<glyph unicode=" " horiz-adv-x="359" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="179" /> -<glyph unicode=" " horiz-adv-x="287" /> -<glyph unicode=" " horiz-adv-x="79" /> -<glyph unicode="‐" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="‑" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="‒" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="–" d="M176 436v244q0 29 29 29h872q25 -4 25 -29v-244q0 -23 -25 -26v-2h-872q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="—" d="M0 436v244q0 29 29 29h1212q25 -4 25 -29v-244q0 -23 -25 -26v-2h-1212q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="‘" d="M535 1126v277q0 12 9 20.5t21 8.5h242q29 0 29 -29v-387q-10 -30 -37 -17l-236 97q-27 12 -26 30h-2z" /> -<glyph unicode="’" d="M535 1018v387q0 29 28 29h242q12 0 21.5 -8.5t9.5 -20.5v-277h-2q0 -18 -27 -30l-236 -97q-29 -13 -36 17z" /> -<glyph unicode="“" d="M338 1126v277q0 12 9 20.5t22 8.5h241q29 0 29 -29v-387q-10 -30 -37 -17l-235 97q-27 12 -27 30h-2zM715 1126v277q0 29 28 29h244q29 0 29 -29v-385q-2 -12 -11.5 -19.5t-27.5 0.5l-234 97q-27 10 -28 30z" /> -<glyph unicode="”" d="M326 1018v387q0 29 28 29h242q12 0 21.5 -8.5t9.5 -20.5v-277h-2q0 -18 -27 -30l-236 -97q-31 -14 -36 17zM700 1018v387q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-277q-2 -20 -26 -30l-236 -97q-18 -8 -27.5 -0.5t-9.5 19.5z" /> -<glyph unicode="•" d="M338 387v541q0 25 17.5 42t41.5 17h500q25 0 42 -17.5t17 -41.5v-541h-2q-9 -51 -57 -51h-500q-23 0 -38 14.5t-19 36.5h-2z" /> -<glyph unicode=" " horiz-adv-x="287" /> -<glyph unicode=" " horiz-adv-x="359" /> -<glyph unicode="" horiz-adv-x="1433" d="M0 0v1434h1434v-1434h-1434z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/liberator-webfont.ttf b/app/assets/fonts/liberator-webfont.ttf deleted file mode 100755 index f3aabef2..00000000 Binary files a/app/assets/fonts/liberator-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/liberator-webfont.woff b/app/assets/fonts/liberator-webfont.woff deleted file mode 100755 index cb4b739f..00000000 Binary files a/app/assets/fonts/liberator-webfont.woff and /dev/null differ diff --git a/app/assets/fonts/museosans_500-webfont 08.25.25.svg b/app/assets/fonts/museosans_500-webfont 08.25.25.svg deleted file mode 100644 index 3e365605..00000000 --- a/app/assets/fonts/museosans_500-webfont 08.25.25.svg +++ /dev/null @@ -1,231 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata> -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Copyright c 2008 by Jos Buivenga All rights reserved -Designer : Jos Buivenga -Foundry : Jos Buivenga -Foundry URL : httpwwwjosbuivengademonnl -</metadata> -<defs> -<font id="MuseoSans500" horiz-adv-x="1681" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="526" /> -<glyph unicode=" " horiz-adv-x="526" /> -<glyph unicode="	" horiz-adv-x="526" /> -<glyph unicode=" " horiz-adv-x="526" /> -<glyph unicode="!" horiz-adv-x="651" d="M223 1446h205l-12 -1049h-178zM225 0v199h203v-199h-203z" /> -<glyph unicode=""" horiz-adv-x="700" d="M129 1085v385h156v-385h-156zM416 1085v385h155v-385h-155z" /> -<glyph unicode="#" horiz-adv-x="1470" d="M90 391l25 152h268l59 344h-264l25 149h266l72 410h166l-72 -410h317l72 410h166l-72 -410h268l-26 -149h-266l-62 -344h266l-26 -152h-264l-70 -391h-166l68 391h-318l-67 -391h-166l67 391h-266zM549 543h317l62 344h-318z" /> -<glyph unicode="$" horiz-adv-x="1159" d="M111 166l114 153q6 -6 17.5 -16t50.5 -37.5t79 -48t101.5 -37t120.5 -16.5q106 0 178 57.5t72 155.5q0 82 -73 142.5t-177.5 104.5t-208.5 95t-177 139t-73 209q0 150 105.5 261.5t275.5 135.5v193h146v-191q102 -8 189 -42.5t124 -67.5l37 -31l-92 -168q-14 14 -42 34.5 t-111 55.5t-165 35q-115 0 -188.5 -61.5t-73.5 -149.5q0 -57 39 -103t101.5 -79t138 -63.5t151.5 -68.5t138.5 -85t101.5 -121t39 -168q0 -158 -104.5 -270.5t-282.5 -132.5v-189h-146v189q-231 23 -389 170z" /> -<glyph unicode="%" horiz-adv-x="1558" d="M98 1167q0 125 90.5 214t219.5 89t220 -89t91 -214t-91 -214t-220 -89t-219.5 88t-90.5 215zM129 0l1106 1446h192l-1105 -1446h-193zM256 1167q0 -66 44 -108.5t107.5 -42.5t107.5 43t44 108q0 63 -44 108.5t-107.5 45.5t-107.5 -45.5t-44 -108.5zM840 279q0 125 91 214 t220 89q127 0 219 -89.5t92 -214t-92 -214t-219 -89.5q-131 0 -221 88.5t-90 215.5zM999 279q0 -66 43 -109t109 -43q63 0 107.5 44t44.5 107.5t-44.5 108.5t-108 45t-107.5 -45t-44 -108z" /> -<glyph unicode="&" horiz-adv-x="1400" d="M111 406q0 123 68.5 227t185.5 143v4q-8 2 -20.5 8.5t-45.5 31t-58.5 57t-46 92t-20.5 129.5q0 176 124 274t320 98q35 0 79 -6t71 -10l27 -6l-52 -162q-59 12 -108 12q-111 0 -183.5 -59t-72.5 -162q0 -39 11 -74.5t38 -72.5t82 -58.5t135 -21.5h268v197h199v-197h193 v-176h-193v-193q0 -240 -133 -373t-367 -133q-223 0 -362 123.5t-139 307.5zM317 416q0 -106 82 -180t213 -74q143 0 222 81t79 246v185h-276q-154 0 -237 -67.5t-83 -190.5z" /> -<glyph unicode="'" horiz-adv-x="415" d="M129 1085v385h158v-385h-158z" /> -<glyph unicode="(" horiz-adv-x="618" d="M150 696q0 430 237 809h174q-231 -387 -231 -811q0 -469 231 -889h-174q-237 395 -237 891z" /> -<glyph unicode=")" horiz-adv-x="618" d="M57 -195q231 420 232 889q0 424 -232 811h174q238 -379 238 -809q0 -496 -238 -891h-174z" /> -<glyph unicode="*" horiz-adv-x="956" d="M74 1085l53 172l272 -102l-14 291h186l-16 -291l274 102l56 -172l-281 -75v-4l180 -226l-145 -106l-158 241h-4l-160 -241l-147 106l182 226v4z" /> -<glyph unicode="+" horiz-adv-x="1398" d="M158 504v160h458v503h168v-503h457v-160h-457v-504h-168v504h-458z" /> -<glyph unicode="," horiz-adv-x="522" d="M55 -207l127 422h203l-172 -422h-158z" /> -<glyph unicode="-" horiz-adv-x="966" d="M184 496v176h598v-176h-598z" /> -<glyph unicode="." horiz-adv-x="520" d="M156 0v211h209v-211h-209z" /> -<glyph unicode="/" horiz-adv-x="827" d="M74 -86l520 1610h176l-520 -1610h-176z" /> -<glyph unicode="0" horiz-adv-x="1280" d="M129 725q0 745 510 745q512 0 512 -745q0 -750 -512 -750q-510 0 -510 750zM336 725q0 -563 303 -563q305 0 305 563q0 559 -305 559q-303 0 -303 -559z" /> -<glyph unicode="1" horiz-adv-x="1001" d="M104 1110l347 336h180v-1270h315v-176h-831v176h319v934l2 90h-4q-16 -33 -70 -84l-135 -133z" /> -<glyph unicode="2" horiz-adv-x="1171" d="M113 111q0 121 52 224t131 170.5t171 135.5l171 122q79 54 131 127t52 150q0 106 -72.5 173t-187.5 67q-53 0 -103 -19.5t-83 -46t-58.5 -53t-37.5 -47.5l-11 -18l-149 100q6 10 16 29.5t50 66.5t88.5 83t129 65.5t172.5 29.5q201 0 329 -114.5t128 -300.5 q0 -96 -38 -180t-99 -144.5t-135 -116t-147.5 -104.5t-135 -98.5t-100.5 -109.5t-39 -126h717v-176h-932q-10 66 -10 111z" /> -<glyph unicode="3" horiz-adv-x="1161" d="M82 172l111 154q16 -18 44.5 -44t121 -70t184.5 -44q123 0 209 74.5t86 189.5q0 127 -96.5 196.5t-239.5 69.5h-101l-47 109l316 371l90 94v4q-43 -6 -123 -6h-490v176h865v-129l-394 -453q168 -18 296 -124.5t128 -299t-137 -329t-354 -136.5q-82 0 -161 20.5t-132 49.5 t-95 57.5t-61 49.5z" /> -<glyph unicode="4" horiz-adv-x="1241" d="M63 387v127l668 932h232v-887h196v-172h-196v-387h-199v387h-701zM287 559h477v526l8 144h-4q-33 -68 -72 -119l-409 -547v-4z" /> -<glyph unicode="5" horiz-adv-x="1153" d="M98 176l113 148q4 -6 13 -16.5t40 -38t64.5 -48t88 -37t111.5 -16.5q131 0 224.5 82t93.5 211t-94.5 213t-235.5 84q-63 0 -123.5 -18.5t-89.5 -34.5l-31 -19l-116 43l71 717h729v-176h-553l-34 -305l-11 -76h4q80 45 187 45q223 0 363.5 -136t140.5 -335 q0 -209 -146.5 -348.5t-365.5 -139.5q-248 0 -414 168z" /> -<glyph unicode="6" horiz-adv-x="1226" d="M121 657q0 143 40 283.5t116.5 261.5t204.5 194.5t290 73.5q76 0 145.5 -14t102.5 -31l33 -14l-66 -174q-92 47 -207 47q-186 0 -296.5 -142.5t-137.5 -342.5h4q45 61 134 99t186 38q203 0 329.5 -136t126.5 -341q0 -213 -131 -348.5t-333 -135.5q-236 0 -388.5 188.5 t-152.5 493.5zM334 561q0 -147 96 -273t229 -126q121 0 194 84t73 213q0 135 -81 220t-216 85q-121 0 -208 -61.5t-87 -141.5z" /> -<glyph unicode="7" horiz-adv-x="1083" d="M72 1270v176h966v-139l-653 -1307h-209l563 1139q18 37 39 69.5t33 48.5l12 15v4q-33 -6 -106 -6h-645z" /> -<glyph unicode="8" horiz-adv-x="1243" d="M117 418q0 76 28.5 146.5t74.5 120.5t74 74.5t54 43.5q-162 117 -162 289q0 156 117 267t334 111q203 0 329 -105t126 -282q0 -186 -172 -376q197 -121 196 -308q0 -174 -138 -299t-357.5 -125t-361.5 124t-142 319zM324 430q0 -121 88 -196.5t209 -75.5 q117 0 201.5 69.5t84.5 178.5q0 37 -18.5 70.5t-43 57t-71.5 51t-83 44.5l-97 44l-96 44q-174 -121 -174 -287zM387 1087q0 -29 10.5 -55t21.5 -46.5t39.5 -43t47 -35t59.5 -33t61.5 -29.5t71 -29.5t68.5 -29.5q127 127 127 285q0 98 -71.5 157.5t-186.5 59.5 q-117 0 -182.5 -57.5t-65.5 -143.5z" /> -<glyph unicode="9" horiz-adv-x="1226" d="M100 987q0 213 131 348t334 135q233 0 387 -188t154 -494q0 -143 -40 -283t-117 -261t-205 -195t-289 -74q-76 0 -146.5 14.5t-103.5 30.5l-31 15l66 176q92 -49 206 -49q186 0 297 142t138 343h-4q-43 -61 -133.5 -98t-186.5 -37q-203 0 -330 135t-127 340zM301 987 q0 -135 80 -220t217 -85q121 0 208 62.5t87 140.5q0 147 -96.5 273t-229.5 126q-123 0 -194.5 -84t-71.5 -213z" /> -<glyph unicode=":" horiz-adv-x="598" d="M195 0v211h208v-211h-208zM195 825v211h208v-211h-208z" /> -<glyph unicode=";" horiz-adv-x="600" d="M96 -207l109 422h205l-154 -422h-160zM207 825v211h209v-211h-209z" /> -<glyph unicode="<" horiz-adv-x="1142" d="M68 516v135l954 426v-182l-733 -309v-4l733 -310v-182z" /> -<glyph unicode="=" horiz-adv-x="1370" d="M197 309v160h977v-160h-977zM197 696v160h977v-160h-977z" /> -<glyph unicode=">" horiz-adv-x="1142" d="M121 90v182l731 310v4l-731 309v182l954 -426v-135z" /> -<glyph unicode="?" horiz-adv-x="1001" d="M66 1343q14 14 42.5 36t123 59t192.5 37q178 0 303 -104.5t125 -270.5q0 -94 -37 -169t-90 -125t-107.5 -96t-91.5 -103.5t-37 -125.5v-84h-194v97q0 86 36 156.5t87 119.5l102 94q51 45 87 101.5t36 119.5q0 86 -66.5 144.5t-166.5 58.5q-57 0 -115.5 -21.5t-89.5 -41.5 l-29 -23zM291 0v199h203v-199h-203z" /> -<glyph unicode="@" d="M121 493.5q0 317.5 217 537.5t530 220q276 0 404.5 -117.5t128.5 -297.5v-580h147v-150h-559q-186 0 -305 114t-119 274q0 158 118 270.5t306 112.5h221q-4 92 -91 151t-240 59q-236 0 -398 -175t-162 -418q0 -248 163 -418t419 -170v-162q-340 0 -560 216t-220 533.5z M766 496q0 -100 67.5 -170t170.5 -70h206v483h-202q-106 0 -174 -70.5t-68 -172.5z" /> -<glyph unicode="A" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" /> -<glyph unicode="B" horiz-adv-x="1298" d="M197 0v1446h505q186 0 303 -98.5t117 -270.5q0 -104 -48 -186t-132 -125v-4q111 -33 174.5 -129t63.5 -221q0 -197 -132.5 -304.5t-332.5 -107.5h-518zM399 176h326q115 0 181.5 66.5t66.5 179.5q0 111 -68.5 179.5t-181.5 68.5h-324v-494zM399 838h303q96 0 154.5 61.5 t58.5 157.5t-57 154.5t-160 58.5h-299v-432z" /> -<glyph unicode="C" horiz-adv-x="1478" d="M98 731q0 315 210 527t526 212q98 0 188 -19t148.5 -47t103.5 -56.5t65 -49.5l21 -18l-100 -152q-18 18 -53.5 44t-145 70t-219.5 44q-238 0 -386.5 -158.5t-148.5 -394.5q0 -238 150.5 -404.5t386.5 -166.5q121 0 232.5 47t162.5 94l51 47l109 -145q-8 -10 -23.5 -25.5 t-70 -54.5t-115 -69.5t-155.5 -55.5t-197 -25q-322 0 -531 217t-209 539z" /> -<glyph unicode="D" horiz-adv-x="1515" d="M197 0v1446h479q336 0 534.5 -191.5t198.5 -529.5q0 -340 -198.5 -532.5t-534.5 -192.5h-479zM399 176h263q248 0 393 143.5t145 405.5q0 260 -145.5 402.5t-392.5 142.5h-263v-1094z" /> -<glyph unicode="E" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874z" /> -<glyph unicode="F" horiz-adv-x="1067" d="M197 0v1446h796v-176h-594v-475h506v-177h-506v-618h-202z" /> -<glyph unicode="G" horiz-adv-x="1556" d="M100 725q0 315 211 530t527 215q96 0 186 -18t149.5 -43t104.5 -50.5t65 -43.5l21 -19l-102 -151q-18 16 -52 39.5t-140.5 62.5t-215.5 39q-248 0 -396.5 -158.5t-148.5 -398.5q0 -250 151.5 -408.5t381.5 -158.5q111 0 213 45t149 90l47 45v209h-235v176h420v-727h-179 v90l3 62h-5l-18 -19q-12 -12 -55 -43t-90.5 -53.5t-124 -42t-156.5 -19.5q-297 0 -504 212t-207 538z" /> -<glyph unicode="H" horiz-adv-x="1548" d="M197 0v1446h202v-635h750v635h203v-1446h-203v635h-750v-635h-202z" /> -<glyph unicode="I" horiz-adv-x="595" d="M197 0v1446h202v-1446h-202z" /> -<glyph unicode="J" horiz-adv-x="1099" d="M61 487h201v-61q0 -137 66.5 -200.5t163 -63.5t161 61.5t64.5 194.5v852h-365v176h568v-1030q0 -219 -127 -330t-303.5 -111t-302.5 112t-126 329v71z" /> -<glyph unicode="K" horiz-adv-x="1275" d="M197 0v1446h202v-608h215l365 608h223l-420 -686v-4l447 -756h-230l-385 664h-215v-664h-202z" /> -<glyph unicode="L" horiz-adv-x="1083" d="M197 0v1446h202v-1270h648v-176h-850z" /> -<glyph unicode="M" horiz-adv-x="1773" d="M152 0l116 1446h213l332 -782l72 -195h4q39 115 72 195l331 782h213l117 -1446h-201l-71 911l-2 213h-5q-43 -133 -77 -213l-289 -651h-180l-287 651q-33 78 -78 217h-4q2 -129 -4 -217l-70 -911h-202z" /> -<glyph unicode="N" horiz-adv-x="1550" d="M197 0v1446h200l643 -940q25 -35 55 -87l48 -87l18 -35h4q-14 129 -14 209v940h203v-1446h-199l-645 938q-53 80 -121 211h-4q14 -129 14 -211v-938h-202z" /> -<glyph unicode="O" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5z" /> -<glyph unicode="P" horiz-adv-x="1243" d="M197 0v1446h528q201 0 328 -124t127 -329t-128 -331.5t-327 -126.5h-326v-535h-202zM399 711h293q131 0 206 75.5t75 206.5q0 129 -75 203t-204 74h-295v-559z" /> -<glyph unicode="Q" horiz-adv-x="1705" d="M100 731q0 313 214 526t528 213q315 0 529 -213t214 -526q0 -270 -170 -477l172 -164l-119 -127l-168 168q-195 -156 -458 -156q-313 0 -527.5 219.5t-214.5 536.5zM309 731q0 -242 153.5 -405.5t379.5 -163.5q180 0 313 106l-170 166l119 127l166 -168q106 147 106 338 q0 238 -153.5 396.5t-380.5 158.5q-225 0 -379 -158.5t-154 -396.5z" /> -<glyph unicode="R" horiz-adv-x="1312" d="M197 0v1446h442q182 0 270 -33q113 -41 178.5 -145.5t65.5 -245.5q0 -139 -70.5 -245.5t-189.5 -145.5v-4q16 -18 43 -66l307 -561h-229l-305 575h-310v-575h-202zM399 752h291q119 0 187.5 70.5t68.5 191.5q0 160 -115 223q-61 33 -198 33h-234v-518z" /> -<glyph unicode="S" horiz-adv-x="1118" d="M86 166l115 153q6 -6 17 -16t50 -37.5t79 -48t101.5 -37t120.5 -16.5q106 0 178 57.5t72 155.5q0 63 -39 112.5t-100.5 84t-136 66.5t-149.5 68.5t-136 82t-100 116t-39 160.5q0 170 132 286.5t335 116.5q119 0 221 -36.5t145 -73.5l43 -35l-92 -168q-14 14 -41.5 34.5 t-110.5 55.5t-165 35q-113 0 -187.5 -61.5t-74.5 -149.5q0 -82 71.5 -139.5t175 -98t207 -90t175 -140.5t71.5 -220q0 -174 -125 -291t-334 -117q-86 0 -167 19.5t-135 47.5t-96 56.5t-61 48.5z" /> -<glyph unicode="T" horiz-adv-x="1214" d="M10 1270v176h1194v-176h-495v-1270h-203v1270h-496z" /> -<glyph unicode="U" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5z" /> -<glyph unicode="V" horiz-adv-x="1294" d="M12 1446h219l359 -1022l55 -199h4q29 121 56 199l362 1022h215l-532 -1446h-203z" /> -<glyph unicode="W" horiz-adv-x="1941" d="M68 1446h208l256 -1061q18 -78 27 -154h4q10 74 31 154l283 1061h180l282 -1061l31 -154h4q6 76 27 154l266 1061h209l-379 -1446h-235l-250 938q-25 92 -43 205h-4q-18 -113 -43 -205l-250 -938h-236z" /> -<glyph unicode="X" horiz-adv-x="1253" d="M45 0l457 745l-428 701h233l228 -391l92 -172h4q41 92 88 172l227 391h234l-428 -701l456 -745h-229l-262 444l-92 166h-4q-39 -86 -86 -166l-263 -444h-227z" /> -<glyph unicode="Y" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612z" /> -<glyph unicode="Z" horiz-adv-x="1243" d="M84 0v135l696 1004q25 37 50.5 69.5t39.5 48.5l15 15v4q-39 -6 -109 -6h-655v176h1016v-133l-697 -1006q-25 -35 -51.5 -67.5t-40.5 -46.5l-12 -17v-4q39 4 108 4h701v-176h-1061z" /> -<glyph unicode="[" horiz-adv-x="616" d="M207 -195v1700h338v-149h-164v-1399h164v-152h-338z" /> -<glyph unicode="\" horiz-adv-x="827" d="M57 1524h176l521 -1610h-176z" /> -<glyph unicode="]" horiz-adv-x="618" d="M72 -43h166v1399h-166v149h340v-1700h-340v152z" /> -<glyph unicode="^" horiz-adv-x="1255" d="M141 506l410 940h129l407 -940h-178l-295 721l-292 -721h-181z" /> -<glyph unicode="_" horiz-adv-x="1216" d="M57 0h1102v-160h-1102v160z" /> -<glyph unicode="`" horiz-adv-x="1021" d="M330 1806h213l149 -260h-168z" /> -<glyph unicode="a" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="b" horiz-adv-x="1228" d="M156 0v1446h198v-473l-4 -88h4l11.5 18t36 43t62.5 53.5t94 42t128 19.5q207 0 331 -149.5t124 -393.5t-132 -393.5t-339 -149.5q-66 0 -123.5 18.5t-92 45.5t-61 52.5t-37.5 43.5l-12 19h-4q4 -33 4 -78v-76h-188zM348 514q0 -150 77 -259.5t216 -109.5q127 0 213 99.5 t86 271.5q0 168 -81 269.5t-212 101.5q-127 0 -213 -93.5t-86 -279.5z" /> -<glyph unicode="c" horiz-adv-x="1120" d="M82 518q0 231 156.5 387t398.5 156q115 0 212 -38t138 -77l39 -37l-94 -139q-12 12 -36 32.5t-98.5 53.5t-152.5 33q-156 0 -258 -104.5t-102 -264.5t103.5 -266.5t262.5 -106.5q86 0 166 35t117 70l37 35l80 -146l-18 -17q-11 -11 -50 -40t-84 -50.5t-115.5 -40 t-146.5 -18.5q-244 0 -399.5 153.5t-155.5 389.5z" /> -<glyph unicode="d" horiz-adv-x="1230" d="M88 518q0 246 131 394.5t338 148.5q68 0 125 -16.5t91 -41t59.5 -49t35.5 -41.5l9 -16h4q-4 31 -4 70v479h198v-1446h-188v98l2 70h-4q-4 -8 -11.5 -20.5t-35 -46t-63.5 -59.5t-97.5 -46.5t-132.5 -20.5q-209 0 -333 149.5t-124 393.5zM291 518q0 -168 81 -269.5 t212 -101.5q127 0 213 93.5t86 279.5q0 150 -77 259.5t-216 109.5q-127 0 -213 -99.5t-86 -271.5z" /> -<glyph unicode="e" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5z" /> -<glyph unicode="f" horiz-adv-x="688" d="M82 862v160h129v49q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-45h245v-160h-245v-862h-197v862h-129z" /> -<glyph unicode="g" horiz-adv-x="1214" d="M88 542.5q0 229.5 121 374t332 144.5q213 0 311 -131l14 -23h4q-2 14 -2 33v96h191v-993q0 -123 -44 -217t-120 -148.5t-166 -81t-192 -26.5q-186 0 -355 86l66 156q129 -70 284 -70q147 0 237.5 70.5t90.5 220.5v76l2 65h-4q-96 -162 -307 -162t-337 150.5t-126 380z M289 547q0 -164 81 -263.5t220 -99.5q121 0 197.5 84t76.5 273q0 348 -293 348q-133 0 -207.5 -91t-74.5 -251z" /> -<glyph unicode="h" horiz-adv-x="1234" d="M156 1446h198v-531l-4 -86h4q41 90 141.5 161t241.5 71q356 0 357 -397v-664h-199v618q0 125 -41 193t-155.5 68t-205 -72t-122.5 -184q-16 -55 -17 -138v-485h-198v1446z" /> -<glyph unicode="i" horiz-adv-x="509" d="M154 1243v203h200v-203h-200zM156 0v1036h198v-1036h-198z" /> -<glyph unicode="j" horiz-adv-x="507" d="M-113 -248q18 -2 45 -2q35 0 68 8.5t71 28.5t61.5 69.5t23.5 120.5v1059h196v-1071q0 -121 -42 -205t-109.5 -119.5t-125 -49t-118.5 -13.5l-70 4v170zM154 1243v203h200v-203h-200z" /> -<glyph unicode="k" horiz-adv-x="1077" d="M156 0v1446h198v-791h146l282 381h226l-344 -456v-5l383 -575h-232l-311 487h-150v-487h-198z" /> -<glyph unicode="l" horiz-adv-x="542" d="M143 283v1163h199v-1129q0 -86 28.5 -116.5t82.5 -30.5l34 2v-176q-31 -4 -65 -4q-279 0 -279 291z" /> -<glyph unicode="m" horiz-adv-x="1871" d="M156 1036h192v-137l-4 -76h4q39 96 139.5 167t217.5 71q258 0 311 -236h4q45 98 146.5 167t222.5 69q342 0 342 -397v-664h-199v621q0 125 -38 192.5t-146 67.5q-104 0 -183.5 -76t-107.5 -189q-14 -59 -15 -143v-473h-198v621q0 123 -36 191.5t-144.5 68.5t-187.5 -78 t-109 -195q-12 -49 -13 -135v-473h-198v1036z" /> -<glyph unicode="n" horiz-adv-x="1234" d="M156 1036h192v-137l-4 -76h4q41 88 139.5 163t249.5 75q356 0 357 -397v-664h-199v618q0 125 -41 193t-156 68q-117 0 -206 -71t-121 -183q-16 -55 -17 -140v-485h-198v1036z" /> -<glyph unicode="o" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5z" /> -<glyph unicode="p" horiz-adv-x="1228" d="M156 1036h182v-88l-4 -76h4q4 8 11 20.5t37 45.5t65.5 57.5t98 45t136.5 20.5q207 0 331 -149.5t124 -393.5t-132 -393.5t-337 -149.5q-63 0 -119.5 17.5t-91.5 43t-60.5 50.5t-35.5 41l-11 18h-4q4 -37 4 -90v-465h-198v1446zM348 514q0 -150 79 -259.5t214 -109.5 q127 0 213 99.5t86 271.5q0 168 -81 269.5t-212 101.5q-127 0 -213 -93.5t-86 -279.5z" /> -<glyph unicode="q" horiz-adv-x="1230" d="M88 518q0 246 131 394.5t338 148.5q68 0 126 -18.5t93 -43t61.5 -50t36.5 -44.5l11 -18h4q-2 31 -2 71v78h188v-1446h-198v473l4 91h-4q-4 -8 -11.5 -19.5t-35 -42.5t-62.5 -54.5t-94.5 -43t-128.5 -19.5q-209 0 -333 149.5t-124 393.5zM291 518q0 -168 81 -269.5 t212 -101.5q127 0 213 93.5t86 279.5q0 150 -77 259.5t-216 109.5q-127 0 -213 -99.5t-86 -271.5z" /> -<glyph unicode="r" horiz-adv-x="768" d="M156 0v1036h192v-180l-4 -78h4q37 119 124 195t204 76l51 -5v-196q-27 6 -57 6q-96 0 -176 -65.5t-115 -178.5q-25 -80 -25 -186v-424h-198z" /> -<glyph unicode="s" horiz-adv-x="917" d="M72 127l96 141q12 -14 36.5 -33.5t102.5 -53.5t158 -34q70 0 121 35t51 94q0 51 -55.5 90.5t-133 69t-155.5 65.5t-133.5 103.5t-55.5 161.5q0 137 106.5 216t268.5 79q100 0 184.5 -28.5t116.5 -57.5l33 -29l-80 -149q-10 10 -29.5 25.5t-86 41t-140.5 25.5 q-72 0 -121 -32t-49 -95q0 -51 55.5 -88t133 -66.5t155.5 -65.5t133.5 -103.5t55.5 -162.5q0 -131 -103.5 -216t-271.5 -85q-113 0 -211 38t-139 77z" /> -<glyph unicode="t" horiz-adv-x="733" d="M63 862v160h142v299h192v-299h250v-160h-250v-461q0 -59 16.5 -103t40 -68.5t55.5 -39t57.5 -18.5t51.5 -4l48 4v-176q-29 -4 -70 -4q-49 0 -94 6t-102.5 30.5t-99.5 64.5t-71.5 114t-29.5 172v483h-136z" /> -<glyph unicode="u" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398z" /> -<glyph unicode="v" horiz-adv-x="1028" d="M14 1036h211l252 -700q8 -25 16.5 -60.5l14.5 -58.5l4 -22h4l4 22l16 58q9 36 17 61l252 700h209l-383 -1036h-230z" /> -<glyph unicode="w" horiz-adv-x="1667" d="M35 1036h211l215 -727l13 -51q7 -29 9 -45l4 -14h5q10 57 26 110l225 725h183l223 -725l29 -110h4q8 57 24 110l217 727h209l-334 -1036h-219l-215 666l-28 112h-5q-12 -59 -28 -112l-213 -666h-221z" /> -<glyph unicode="x" horiz-adv-x="1040" d="M45 0l352 532l-334 504h228l192 -315l35 -62h4q18 35 35 62l193 315h227l-334 -504l352 -532h-225l-217 346l-31 57h-4q-16 -33 -31 -57l-217 -346h-225z" /> -<glyph unicode="y" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118z" /> -<glyph unicode="z" horiz-adv-x="1058" d="M80 0v115l522 655l86 96v4q-33 -4 -100 -4h-486v170h854v-114l-522 -658l-88 -94v-4q35 4 103 4h526v-170h-895z" /> -<glyph unicode="{" horiz-adv-x="716" d="M100 578v176q6 0 18.5 2t42 16t53.5 36.5t42 68t18 104.5v172q0 92 26 160.5t61.5 104.5t86 58.5t86 27.5t72.5 5l47 -2v-151h-28q-27 0 -50.5 -7.5t-55.5 -26.5t-51 -65.5t-19 -115.5v-211q0 -57 -17.5 -104.5t-42 -75t-48.5 -47t-42 -27.5l-16 -6v-4q6 -2 17 -6.5 t40 -25t50.5 -47t39.5 -74.5q19 -47 19 -107v-236q0 -70 19 -116t51 -65.5t55.5 -26.5t50.5 -7h28v-152q-18 -4 -47 -4q-37 0 -72.5 5.5t-86 28t-86 58t-61.5 105.5t-26 162v196q0 59 -18 103.5t-43 66t-50.5 34.5t-43.5 15z" /> -<glyph unicode="|" horiz-adv-x="579" d="M203 -326v1948h174v-1948h-174z" /> -<glyph unicode="}" horiz-adv-x="716" d="M63 -45h29q27 0 50.5 7t55 26.5t51 65.5t19.5 116v235q0 94 42 159t83 83l41 19v4q-6 2 -17 7t-40 25.5t-50.5 47t-40 74.5t-18.5 106v211q0 70 -19.5 116t-51 65t-55 26.5t-50.5 7.5h-29v151q18 2 48 2q37 0 72.5 -5t85.5 -27.5t86 -58.5t61.5 -104.5t25.5 -160.5v-172 q0 -172 138 -219l36 -8v-176q-6 0 -18 -2.5t-42 -16.5t-53.5 -35.5t-42 -65.5t-18.5 -104v-196q0 -92 -25.5 -162t-61.5 -105.5t-86 -58t-86 -28t-72 -5.5l-48 4v152z" /> -<glyph unicode="~" horiz-adv-x="1245" d="M137 418q0 174 75 260t212 86q72 0 130 -32t89 -68.5t76 -68.5t96 -32q74 0 105.5 57.5t31.5 135.5h162q0 -346 -285 -346q-72 0 -130 30.5t-88.5 68.5t-77 68.5t-97.5 30.5q-72 0 -104.5 -57t-32.5 -133h-162z" /> -<glyph unicode="¡" horiz-adv-x="591" d="M193 -410l14 1049h178l12 -1049h-204zM193 838v198h202v-198h-202z" /> -<glyph unicode="¢" horiz-adv-x="1179" d="M109 723q0 227 116.5 388t315.5 187v172h145v-172q133 -20 232.5 -103t152.5 -214l-180 -70q-90 203 -273 203q-143 0 -225 -109.5t-82 -281.5q0 -176 80 -282.5t227 -106.5q184 0 273 203l180 -72q-55 -125 -152.5 -213t-232.5 -102v-177h-145v177q-199 27 -315.5 187.5 t-116.5 385.5z" /> -<glyph unicode="£" horiz-adv-x="1210" d="M115 0v176h125v477h-90v144h90v278q0 170 126 282.5t318 112.5q186 0 332 -120l10 -11l-117 -141q-98 88 -223 88q-111 0 -176.5 -62.5t-65.5 -156.5v-270h377v-144h-377v-477h666v-176h-995z" /> -<glyph unicode="¥" horiz-adv-x="1243" d="M57 1446h232l241 -451l88 -209h5q43 113 88 209l243 451h232l-340 -606h209v-129h-277l-55 -99v-75h332v-129h-332v-408h-205v408h-334v129h334v75l-55 99h-279v129h211z" /> -<glyph unicode="§" horiz-adv-x="905" d="M98 -23l90 138q84 -76 199 -76q94 0 155.5 56.5t61.5 158.5q0 41 -12 92l-135 770h161l144 -799q10 -55 10 -92q0 -156 -104.5 -254t-280.5 -98q-80 0 -151.5 26.5t-104.5 51.5zM129 1120q0 154 104.5 252t282.5 98q78 0 150.5 -26.5t105.5 -50.5l33 -27l-94 -131 q-82 70 -195 70q-96 0 -157.5 -53.5t-61.5 -153.5q0 -37 12 -82l140 -789h-164l-144 799q-12 47 -12 94z" /> -<glyph unicode="¨" horiz-adv-x="1021" d="M258 1599v207h164v-207h-164zM600 1599v207h164v-207h-164z" /> -<glyph unicode="©" d="M111 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM260 723q0 -256 167 -432t411 -176q248 0 415.5 176t167.5 432t-168 432t-415 176q-244 0 -411 -176t-167 -432zM449 721q0 168 111.5 288.5t291.5 120.5 q195 0 311 -165l23 -37l-125 -68q-8 14 -23.5 36t-67.5 57.5t-112 35.5q-117 0 -185.5 -79t-68.5 -189q0 -115 67.5 -191.5t186.5 -76.5q59 0 110.5 32.5t71.5 63.5l21 33l125 -68q-4 -8 -12.5 -21.5t-38 -49t-64.5 -62.5t-94 -48.5t-125 -21.5q-180 0 -291.5 120 t-111.5 290z" /> -<glyph unicode="ª" horiz-adv-x="864" d="M150 543v116h563v-116h-563zM152 981q0 225 385 225h20v13q0 129 -131 129q-39 0 -82 -14.5t-65 -28.5l-23 -15l-59 101q92 76 247 75q127 0 194 -66.5t67 -191.5v-411h-140v94h-4q-6 -12 -19.5 -30.5t-61.5 -48.5t-107 -30q-88 0 -154.5 53.5t-66.5 145.5zM299 991 q0 -37 27.5 -62.5t76.5 -25.5q68 0 111 56.5t43 125.5v17h-25q-233 0 -233 -111z" /> -<glyph unicode="«" horiz-adv-x="1138" d="M90 578l336 421h199l-336 -421l336 -420h-199zM502 578l336 421h198l-336 -421l336 -420h-198z" /> -<glyph unicode="¬" horiz-adv-x="1257" d="M123 696v160h977v-547h-166v387h-811z" /> -<glyph unicode="­" horiz-adv-x="882" d="M143 496v176h598v-176h-598z" /> -<glyph unicode="®" d="M111 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM260 723q0 -256 167 -432t411 -176q248 0 415.5 176t167.5 432t-168 432t-415 176q-244 0 -411 -176t-167 -432zM588 340v772h297q111 0 177 -64.5 t66 -170.5q0 -82 -43 -136.5t-98 -68.5v-4q8 -8 27 -43l147 -285h-160l-143 299h-125v-299h-145zM733 745h123q57 0 91 35t34 97q0 59 -34 91.5t-91 32.5h-123v-256z" /> -<glyph unicode="¯" horiz-adv-x="1021" d="M250 1606v143h522v-143h-522z" /> -<glyph unicode="°" horiz-adv-x="796" d="M88 1167q0 125 90 214t219 89t220.5 -89t91.5 -214t-91.5 -214t-220.5 -89t-219 88t-90 215zM246 1167.5q0 -63.5 44 -107.5t107.5 -44t107.5 44t44 107.5t-44 108.5t-107.5 45t-107.5 -45t-44 -108.5z" /> -<glyph unicode="±" horiz-adv-x="1394" d="M156 504v160h458v503h168v-503h457v-160h-457v-504h-168v504h-458zM188 -195h1018v-159h-1018v159z" /> -<glyph unicode="²" horiz-adv-x="796" d="M96 940q0 96 45 171t108.5 121t127 86t108.5 87t45 102q0 57 -42 95t-105 38q-96 -4 -172 -98l-100 92l11 17q7 10 32.5 34.5t56.5 44t79 36t101 16.5q127 0 211 -75t84 -194q0 -82 -42 -147.5t-103.5 -107t-123 -78.5t-105.5 -81t-48 -98h436v-135h-598q0 8 -2 23.5 t-3 28t-1 22.5z" /> -<glyph unicode="³" horiz-adv-x="796" d="M82 981l86 109q8 -12 24.5 -29t70.5 -45.5t114 -28.5q68 0 119 45t51 111q0 68 -54.5 106.5t-127.5 38.5h-70l-33 78l182 211l50 49v4q-39 -6 -74 -6h-289v137h555v-98l-223 -258q102 -14 170.5 -81t68.5 -181q0 -121 -91 -209t-228 -88q-92 0 -167 33.5t-105 66.5z" /> -<glyph unicode="´" horiz-adv-x="1021" d="M330 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="µ" horiz-adv-x="1267" d="M170 -410v1446h199v-618q0 -125 40 -191.5t152 -66.5q154 0 246 114.5t92 276.5v485h199v-1036h-193v141l4 72h-6q-4 -10 -12 -25.5t-40 -56.5t-72 -72.5t-108.5 -57.5t-148.5 -26q-131 2 -186 64h-4q14 -100 14 -160v-289h-176z" /> -<glyph unicode="μ" horiz-adv-x="1267" d="M170 -410v1446h199v-618q0 -125 40 -191.5t152 -66.5q154 0 246 114.5t92 276.5v485h199v-1036h-193v141l4 72h-6q-4 -10 -12 -25.5t-40 -56.5t-72 -72.5t-108.5 -57.5t-148.5 -26q-131 2 -186 64h-4q14 -100 14 -160v-289h-176z" /> -<glyph unicode="¶" horiz-adv-x="1208" d="M88 970.5q0 200.5 142.5 338t340.5 137.5h557v-176h-401v-1372h-154v596q-199 0 -342 138t-143 338.5zM854 -102v1255h152v-1255h-152z" /> -<glyph unicode="·" horiz-adv-x="563" d="M180 489v211h203v-211h-203z" /> -<glyph unicode="¸" horiz-adv-x="1021" d="M350 -291q41 -14 86 -14q98 0 98.5 63.5t-108.5 63.5l-37 -2l60 227l100 -20v-17l-25 -112q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119z" /> -<glyph unicode="¹" horiz-adv-x="796" d="M133 1550l217 211h139v-760h187v-135h-531v135h191v510l4 54h-4q-8 -18 -37 -45l-72 -70z" /> -<glyph unicode="º" horiz-adv-x="956" d="M127 1130q0 145 101.5 241.5t246.5 96.5q147 0 249.5 -96t102.5 -242q0 -150 -101 -247t-248.5 -97t-249 97t-101.5 247zM160 543v116h639v-116h-639zM274 1130q0 -92 58.5 -152t144.5 -60q84 0 142.5 60t58.5 152q0 90 -58.5 148.5t-142.5 58.5q-86 0 -144.5 -58.5 t-58.5 -148.5z" /> -<glyph unicode="»" horiz-adv-x="1140" d="M102 158l336 420l-336 421h199l336 -421l-336 -420h-199zM516 158l336 420l-336 421h199l336 -421l-336 -420h-199z" /> -<glyph unicode="¼" horiz-adv-x="1980" d="M109 1235l217 211h139v-760h186v-135h-530v135h190v510l4 53h-4q-8 -18 -37 -45l-71 -69zM535 0l688 1446h153l-688 -1446h-153zM1167 219v103l412 573h166v-541h125v-135h-125v-219h-152v219h-426zM1335 354h258v252l6 119h-4q-29 -55 -59 -98l-201 -269v-4z" /> -<glyph unicode="½" horiz-adv-x="1968" d="M109 1235l217 211h139v-760h186v-135h-530v135h190v510l4 53h-4q-8 -18 -37 -45l-71 -69zM539 0l688 1446h153l-688 -1446h-153zM1229 74q0 96 45 170.5t108.5 121t127 86.5t108.5 87t45 102q0 57 -42 95t-105 38q-96 -4 -173 -98l-100 92l11 16q7 10 33 35t56.5 44.5 t78.5 35.5t102 16q127 0 211 -74.5t84 -193.5q0 -82 -42 -147.5t-103.5 -107.5t-123 -79t-105.5 -81t-48 -97h436v-135h-598q0 8 -2 23.5t-3 28t-1 22.5z" /> -<glyph unicode="¾" horiz-adv-x="2004" d="M82 666l86 108q8 -12 24.5 -28.5t70.5 -45t114 -28.5q68 0 119 45t51 110q0 68 -54.5 107t-127.5 39h-70l-33 78l182 211l50 49v4q-39 -6 -74 -6h-289v137h555v-98l-223 -258q102 -14 170.5 -81t68.5 -182q0 -121 -91 -209t-228 -88q-92 0 -167 34t-105 67zM559 0 l688 1446h154l-688 -1446h-154zM1192 219v103l412 573h165v-541h125v-135h-125v-219h-151v219h-426zM1360 354h258v252l6 119h-4q-29 -55 -59 -98l-201 -269v-4z" /> -<glyph unicode="¿" horiz-adv-x="921" d="M80 -57q0 94 37 168.5t90 125t107.5 96.5t91 104.5t36.5 125.5v76h193v-88q0 -86 -36 -157.5t-86 -120.5l-101 -93q-51 -45 -87 -101t-36 -120q0 -86 66.5 -145.5t166.5 -59.5q57 0 115.5 22.5t87.5 43.5l31 22l108 -141q-6 -6 -16 -14.5t-45 -31t-74 -39.5t-98.5 -31.5 t-122.5 -14.5q-178 0 -303 103.5t-125 269.5zM438 838v198h203v-198h-203z" /> -<glyph unicode="À" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM369 1806h213l149 -260h-168zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" /> -<glyph unicode="Á" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM553 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="Â" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM358 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" /> -<glyph unicode="Ã" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM299 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143zM422 584h438l-160 458l-55 205h-4 q-33 -131 -57 -205z" /> -<glyph unicode="Ä" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM391 1599v207h164v-207h-164zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM733 1599v207h164v-207h-164z" /> -<glyph unicode="Å" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM469 1673q0 70 51 112t123 42t123 -42t51 -112q0 -68 -51 -109.5t-123 -41.5t-123 41.5t-51 109.5zM575 1673q0 -29 18.5 -48t49.5 -19 q29 0 48.5 19.5t19.5 47.5q0 33 -19.5 52.5t-48.5 19.5q-31 0 -49.5 -19.5t-18.5 -52.5z" /> -<glyph unicode="Æ" horiz-adv-x="1798" d="M8 0l598 1446h1057v-176h-639v-453h520v-176h-520v-465h674v-176h-875v643h-346l-258 -643h-211zM545 811h278v459h-94z" /> -<glyph unicode="Ç" horiz-adv-x="1482" d="M102 731q0 315 210 527t526 212q98 0 188 -19t148.5 -47t103.5 -56.5t65 -49.5l21 -18l-100 -152q-18 18 -53 44t-145 70t-220 44q-238 0 -386.5 -158.5t-148.5 -394.5q0 -238 150.5 -404.5t386.5 -166.5q121 0 232.5 47t162.5 94l51 47l109 -145l-23 -24 q-14 -15 -65 -52t-108.5 -66.5t-147.5 -56t-187 -31.5l-16 -77q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119q41 -14 86 -14q98 0 98 63.5t-108 63.5l-37 -2l41 160q-291 27 -475.5 238.5t-184.5 512.5z" /> -<glyph unicode="È" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM365 1806h213l149 -260h-168z" /> -<glyph unicode="É" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM551 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="Ê" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM356 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" /> -<glyph unicode="Ë" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM387 1599v207h164v-207h-164zM729 1599v207h164v-207h-164z" /> -<glyph unicode="Ì" horiz-adv-x="595" d="M25 1806h213l149 -260h-168zM197 0v1446h202v-1446h-202z" /> -<glyph unicode="Í" horiz-adv-x="595" d="M197 0v1446h202v-1446h-202zM211 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="Î" horiz-adv-x="595" d="M14 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM197 0v1446h202v-1446h-202z" /> -<glyph unicode="Ï" horiz-adv-x="595" d="M47 1599v207h164v-207h-164zM197 0v1446h202v-1446h-202zM389 1599v207h164v-207h-164z" /> -<glyph unicode="Ð" horiz-adv-x="1554" d="M115 639v168h121v639h479q336 0 534.5 -191.5t198.5 -529.5q0 -340 -198.5 -532.5t-534.5 -192.5h-479v639h-121zM438 176h262q248 0 393.5 143.5t145.5 405.5q0 260 -145.5 402.5t-393.5 142.5h-262v-463h305v-168h-305v-463z" /> -<glyph unicode="Ñ" horiz-adv-x="1550" d="M197 0v1446h200l643 -940q25 -35 55 -87l48 -87l18 -35h4q-14 129 -14 209v940h203v-1446h-199l-645 938q-53 80 -121 211h-4q14 -129 14 -211v-938h-202zM430 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260 q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143z" /> -<glyph unicode="Ò" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM567 1806h213l150 -260h-168z " /> -<glyph unicode="Ó" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM754 1546l149 260h213 l-196 -260h-166z" /> -<glyph unicode="Ô" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM557 1546l180 260h207 l180 -260h-174l-108 164h-4l-107 -164h-174z" /> -<glyph unicode="Õ" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM498 1548q0 260 209 260 q59 0 104 -34.5t82 -69.5t72 -35q41 0 60 40t19 93h144q0 -260 -209 -260q-59 0 -104.5 35t-82 69.5t-71.5 34.5q-80 0 -80 -133h-143z" /> -<glyph unicode="Ö" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM590 1599v207h164v-207h-164z M932 1599v207h164v-207h-164z" /> -<glyph unicode="×" horiz-adv-x="1320" d="M129 113l422 471l-422 471l113 112l417 -467l420 467l113 -112l-424 -471l424 -471l-113 -113l-420 465l-417 -465z" /> -<glyph unicode="Ø" horiz-adv-x="1687" d="M102 733q0 311 215 524t529 213q205 0 379 -100l94 129l100 -69l-94 -132q123 -102 192.5 -248.5t69.5 -316.5q0 -319 -214 -538.5t-527 -219.5q-217 0 -393 109l-97 -135l-102 69l100 142q-119 104 -185.5 252.5t-66.5 320.5zM311 733q0 -246 160 -411l641 890 q-121 74 -266 74q-223 0 -379 -158.5t-156 -394.5zM567 242q125 -80 279 -80q223 0 377.5 165t154.5 406q0 248 -168 406z" /> -<glyph unicode="Ù" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM471 1806h213l150 -260h-168z" /> -<glyph unicode="Ú" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM655 1546l150 260h213l-197 -260h-166z" /> -<glyph unicode="Û" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM461 1546l180 260h207l180 -260h-174l-109 164h-4l-106 -164h-174z" /> -<glyph unicode="Ü" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM494 1599v207h163v-207h-163zM836 1599v207h163v-207h-163z" /> -<glyph unicode="Ý" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612zM514 1546l150 260h213l-197 -260h-166z" /> -<glyph unicode="Þ" horiz-adv-x="1243" d="M197 1446h200v-246h328q201 0 327 -124t126 -328.5t-127 -331.5t-328 -127h-326v-289h-200v1446zM397 465h295q131 0 206 75.5t75 207.5q0 129 -75 202.5t-204 73.5h-297v-559z" /> -<glyph unicode="ß" horiz-adv-x="1204" d="M156 0v1085q0 180 131 282.5t311 102.5q168 0 278.5 -95t110.5 -234q0 -68 -31.5 -126.5t-70.5 -93t-71 -77.5t-32 -84q0 -35 38 -72t92.5 -73.5t107.5 -78.5t91 -104.5t38 -134.5q0 -147 -102.5 -229t-247.5 -82q-84 0 -157 14t-103 29l-31 16v176q115 -63 266 -63 q74 0 123 36.5t49 110.5q0 55 -57.5 109.5t-126 94.5t-125.5 105.5t-57 139.5q0 57 32.5 110.5t70.5 89t70.5 86t32.5 99.5q0 66 -51 112.5t-143 46.5q-98 0 -168 -59t-70 -168v-1071h-198z" /> -<glyph unicode="à" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M264 1446h213l150 -260h-168zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="á" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM446 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="â" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M252 1186l180 260h207l180 -260h-174l-108 164h-5l-106 -164h-174zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="ã" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M193 1188q0 260 208 260q59 0 104.5 -35t82.5 -69.5t71 -34.5q41 0 60.5 40t19.5 93h144q0 -260 -209 -260q-59 0 -104.5 34.5t-82 69.5t-71.5 35q-80 0 -80 -133h-143zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="ä" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM285 1239v207h164v-207h-164zM627 1239v207h164v-207h-164z" /> -<glyph unicode="å" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM362 1313q0 70 51.5 111.5t123 41.5t123 -42t51.5 -111q0 -68 -51.5 -110t-123 -42t-123 42t-51.5 110zM469 1313q0 -29 18.5 -48.5t49.5 -19.5q29 0 48 19.5t19 48.5 q0 33 -19.5 52t-47.5 19q-31 0 -49.5 -19t-18.5 -52z" /> -<glyph unicode="æ" horiz-adv-x="1769" d="M74 291q0 92 45 160.5t109.5 104.5t155.5 58.5t160.5 27.5t147.5 5h51v19q0 227 -233 227q-70 0 -140.5 -24.5t-107.5 -49.5l-37 -26l-80 145q6 4 17.5 13.5t48.5 29.5t78 36.5t105.5 30t129.5 13.5q260 0 344 -182h4q123 182 379 182q203 0 317.5 -142.5t114.5 -361.5 l-4 -59h-743q8 -170 103.5 -260.5t240.5 -90.5q80 0 156.5 30t113.5 61l37 28l82 -143q-16 -16 -49 -41t-137.5 -66t-212.5 -41q-154 0 -268.5 69t-178.5 192h-4q-10 -29 -32.5 -65t-67.5 -84t-121 -80t-170 -32q-150 0 -252 85.5t-102 230.5zM276 301q0 -70 50.5 -118 t144.5 -48q121 0 197.5 103.5t76.5 228.5v31h-96q-373 0 -373 -197zM944 647h539q-4 125 -74 190.5t-172 65.5q-117 0 -195 -64.5t-98 -191.5z" /> -<glyph unicode="ç" horiz-adv-x="1122" d="M84 518q0 231 156.5 387t398.5 156q115 0 212 -38t136 -77l41 -37l-94 -139q-12 12 -36 32.5t-98.5 53.5t-152.5 33q-156 0 -258 -104.5t-102 -264.5t103.5 -266.5t262.5 -106.5q86 0 166 35t117 70l37 35l80 -146l-17 -16q-10 -10 -47 -38t-79 -49.5t-108.5 -41 t-137.5 -21.5l-17 -77q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119q41 -14 86 -14q98 0 98 63.5t-108 63.5l-37 -2l41 162q-209 29 -339 176t-130 360z" /> -<glyph unicode="è" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM330 1446h213l149 -260h-168z" /> -<glyph unicode="é" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM514 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="ê" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM317 1186l181 260h207l180 -260h-174l-109 164h-4l-106 -164h-175z" /> -<glyph unicode="ë" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM350 1239v207h164v-207h-164zM692 1239v207h164v-207h-164z" /> -<glyph unicode="ì" horiz-adv-x="509" d="M-18 1446h213l149 -260h-168zM156 0v1036h198v-1036h-198z" /> -<glyph unicode="í" horiz-adv-x="509" d="M156 0v1036h198v-1036h-198zM168 1186l149 260h213l-196 -260h-166z" /> -<glyph unicode="î" horiz-adv-x="509" d="M-27 1186l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM156 0v1036h198v-1036h-198z" /> -<glyph unicode="ï" horiz-adv-x="509" d="M4 1239v207h164v-207h-164zM156 0v1036h198v-1036h-198zM346 1239v207h164v-207h-164z" /> -<glyph unicode="ð" horiz-adv-x="1206" d="M88 481q0 193 130 333t355 140q158 -2 252 -86h4q-61 164 -223 273l-370 -164l-21 127l254 113q-125 63 -264 94l55 162q238 -53 424 -164l285 125l18 -125l-188 -86q295 -246 295 -660q0 -109 -30 -209t-89.5 -187t-163.5 -139.5t-238 -52.5q-223 0 -354 150.5 t-131 355.5zM289 477q0 -135 76.5 -232.5t212.5 -97.5q80 0 142 34t98 91.5t54.5 122t18.5 133.5q0 117 -79 192t-210 75q-150 0 -231.5 -93.5t-81.5 -224.5z" /> -<glyph unicode="ñ" horiz-adv-x="1234" d="M156 1036h192v-137l-4 -76h4q41 88 139.5 163t249.5 75q356 0 357 -397v-664h-199v618q0 125 -41 193t-156 68q-117 0 -206 -71t-121 -183q-16 -55 -17 -140v-485h-198v1036zM297 1188q0 260 209 260q59 0 104 -35t82 -69.5t72 -34.5q41 0 60.5 40t19.5 93h143 q0 -260 -209 -260q-59 0 -104 34.5t-82 69.5t-72 35q-80 0 -80 -133h-143z" /> -<glyph unicode="ò" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM365 1446h213 l149 -260h-168z" /> -<glyph unicode="ó" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM551 1186 l149 260h213l-196 -260h-166z" /> -<glyph unicode="ô" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM356 1186 l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" /> -<glyph unicode="õ" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM295 1188 q0 260 209 260q59 0 104 -35t82 -69.5t72 -34.5q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 34.5t-82 69.5t-72 35q-80 0 -80 -133h-143z" /> -<glyph unicode="ö" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM387 1239v207 h164v-207h-164zM729 1239v207h164v-207h-164z" /> -<glyph unicode="÷" horiz-adv-x="1300" d="M133 504v160h1034v-160h-1034zM553 90v186h192v-186h-192zM553 891v186h192v-186h-192z" /> -<glyph unicode="ø" horiz-adv-x="1277" d="M80 520q0 233 161.5 387t397.5 154q147 0 276 -68l82 113l97 -70l-80 -110q184 -158 184 -406q0 -233 -163 -389t-396 -156q-137 0 -262 60l-80 -113l-98 72l75 106q-194 158 -194 420zM283 520q0 -160 102 -266l426 592q-82 43 -172 43q-147 0 -251.5 -104.5 t-104.5 -264.5zM483 182q74 -35 156 -35q150 0 253 105.5t103 267.5q0 147 -92 250z" /> -<glyph unicode="ù" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM332 1446h213l149 -260h-168z" /> -<glyph unicode="ú" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM516 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="û" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM322 1186l180 260h207l180 -260h-174l-109 164h-4l-106 -164h-174z" /> -<glyph unicode="ü" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM354 1239v207h164v-207h-164zM696 1239v207h164v-207h-164z" /> -<glyph unicode="ý" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118zM440 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="þ" horiz-adv-x="1228" d="M156 1446h198v-471l-2 -86h4q2 2 19 22l29 36q13 15 43 38t61 38t77 26.5t97 11.5q209 0 335 -151.5t126 -391t-130 -391.5t-337 -152q-66 0 -124 17.5t-93 43t-59.5 50.5t-34.5 41l-11 18h-4q4 -37 4 -90v-465h-198v1856zM348 516q0 -162 81 -265.5t216 -103.5 q127 0 211 102.5t84 268.5q0 164 -80 267.5t-211 103.5q-129 0 -215 -92.5t-86 -280.5z" /> -<glyph unicode="ÿ" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118zM276 1239v207h164v-207h-164zM618 1239v207h164v-207h-164z" /> -<glyph unicode="Œ" horiz-adv-x="1966" d="M98 725q0 313 214 526t534 213q53 0 136 -9t116 -9h733v-176h-639v-453h520v-176h-520v-465h676v-176h-768q-33 0 -117 -9t-137 -9q-317 0 -532.5 214t-215.5 529zM307 725q0 -242 151.5 -404.5t387.5 -162.5q37 0 72.5 3t54.5 7l18 4v1102q-63 16 -145 16 q-236 0 -387.5 -162.5t-151.5 -402.5z" /> -<glyph unicode="œ" horiz-adv-x="2048" d="M82 516q0 240 160.5 392.5t392.5 152.5q301 0 448 -246h4q131 246 426 246q211 0 330 -137.5t119 -348.5l-6 -86h-756q12 -164 112.5 -253t243.5 -89q164 0 299 115l9 6l82 -145q-16 -16 -49 -41t-137.5 -66t-215.5 -41q-313 0 -452 252h-5q-145 -252 -452 -252 q-231 0 -392 150.5t-161 390.5zM285 516q0 -164 102 -266.5t251.5 -102.5t253 103.5t103.5 271.5q0 162 -104.5 264.5t-251.5 102.5t-250.5 -103.5t-103.5 -269.5zM1206 639h553q-4 127 -73.5 195.5t-174.5 68.5q-119 0 -202 -69.5t-103 -194.5z" /> -<glyph unicode="Ÿ" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612zM344 1599v207h164v-207h-164zM686 1599v207h164v-207h-164z" /> -<glyph unicode="ˆ" horiz-adv-x="1021" d="M227 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" /> -<glyph unicode="˜" horiz-adv-x="1021" d="M166 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143z" /> -<glyph unicode="–" horiz-adv-x="1445" d="M184 504v160h1078v-160h-1078z" /> -<glyph unicode="—" horiz-adv-x="1855" d="M184 504v160h1487v-160h-1487z" /> -<glyph unicode="‘" horiz-adv-x="464" d="M100 1069l136 399h145l-88 -399h-193z" /> -<glyph unicode="’" horiz-adv-x="448" d="M104 1071l89 399h192l-133 -399h-148z" /> -<glyph unicode="‚" horiz-adv-x="499" d="M86 -184l88 399h186l-133 -399h-141z" /> -<glyph unicode="“" horiz-adv-x="755" d="M100 1069l136 399h147l-88 -399h-195zM389 1069l135 399h148l-88 -399h-195z" /> -<glyph unicode="”" horiz-adv-x="737" d="M104 1071l89 399h194l-135 -399h-148zM393 1071l88 399h195l-133 -399h-150z" /> -<glyph unicode="„" horiz-adv-x="784" d="M86 -184l88 399h186l-133 -399h-141zM369 -184l88 399h188l-133 -399h-143z" /> -<glyph unicode="•" horiz-adv-x="841" d="M104 596q0 133 93.5 225t224.5 92t223 -93t92 -224t-92 -224t-223 -93t-224.5 92t-93.5 225z" /> -<glyph unicode="…" horiz-adv-x="1576" d="M156 0v211h202v-211h-202zM686 0v211h205v-211h-205zM1219 0v211h202v-211h-202z" /> -<glyph unicode="‹" horiz-adv-x="727" d="M90 578l336 421h199l-336 -421l336 -420h-199z" /> -<glyph unicode="›" horiz-adv-x="727" d="M102 158l336 420l-336 421h199l336 -421l-336 -420h-199z" /> -<glyph unicode="€" horiz-adv-x="1210" d="M78 528v129h112q-8 82 0 148h-112v131h137q61 236 251.5 385t440.5 149q51 0 102.5 -6t77.5 -12l27 -6l-49 -186q-76 23 -162 22q-170 0 -296 -94t-177 -252h576l-27 -131h-578q-12 -68 -2 -148h553l-26 -129h-492q47 -162 177 -261t300 -99q45 0 92.5 6t69.5 14l25 7 l39 -185q-98 -35 -230 -35q-258 0 -447.5 153t-246.5 400h-135z" /> -<glyph unicode="™" horiz-adv-x="1925" d="M47 1309v137h778v-137h-311v-764h-156v764h-311zM891 545l72 901h141l213 -471l29 -86h4q12 49 26 86l213 471h144l69 -901h-153l-43 538l2 62h-4l-195 -434h-125l-194 434h-5l2 -62l-43 -538h-153z" /> -<glyph unicode="" horiz-adv-x="1035" d="M0 1035h1035v-1035h-1035v1035z" /> -<glyph unicode="fi" horiz-adv-x="1198" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h634v-1036h-198v877h-436v-877h-197v877h-129zM842 1243v203h200v-203h-200z" /> -<glyph unicode="fl" horiz-adv-x="1230" d="M82 862v160h129v49q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-45h245v-160h-245v-862h-197v862h-129zM831 283v1163h199v-1129q0 -86 28.5 -116.5t82.5 -30.5l35 2v-176q-31 -4 -66 -4 q-279 0 -279 291z" /> -<glyph unicode="ffi" horiz-adv-x="1886" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h491v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5 t-59 -67.5t-22.5 -115v-31h635v-1036h-199v877h-436v-877h-197v877h-491v-877h-197v877h-129zM1530 1243v203h201v-203h-201z" /> -<glyph unicode="ffl" horiz-adv-x="1918" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h491v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5 t-59 -67.5t-22.5 -115v-31h245v-159h-245v-877h-197v877h-491v-877h-197v877h-129zM1520 283v1163h198v-1129q0 -86 29 -116.5t82 -30.5l35 2v-176q-31 -4 -66 -4q-278 0 -278 291z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/museosans_500-webfont 08.25.25.ttf b/app/assets/fonts/museosans_500-webfont 08.25.25.ttf deleted file mode 100644 index 966dc3c2..00000000 Binary files a/app/assets/fonts/museosans_500-webfont 08.25.25.ttf and /dev/null differ diff --git a/app/assets/fonts/museosans_500-webfont.eot b/app/assets/fonts/museosans_500-webfont.eot deleted file mode 100644 index e0238d09..00000000 Binary files a/app/assets/fonts/museosans_500-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/museosans_500-webfont.svg b/app/assets/fonts/museosans_500-webfont.svg deleted file mode 100644 index 3e365605..00000000 --- a/app/assets/fonts/museosans_500-webfont.svg +++ /dev/null @@ -1,231 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata> -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Copyright c 2008 by Jos Buivenga All rights reserved -Designer : Jos Buivenga -Foundry : Jos Buivenga -Foundry URL : httpwwwjosbuivengademonnl -</metadata> -<defs> -<font id="MuseoSans500" horiz-adv-x="1681" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="526" /> -<glyph unicode=" " horiz-adv-x="526" /> -<glyph unicode="	" horiz-adv-x="526" /> -<glyph unicode=" " horiz-adv-x="526" /> -<glyph unicode="!" horiz-adv-x="651" d="M223 1446h205l-12 -1049h-178zM225 0v199h203v-199h-203z" /> -<glyph unicode=""" horiz-adv-x="700" d="M129 1085v385h156v-385h-156zM416 1085v385h155v-385h-155z" /> -<glyph unicode="#" horiz-adv-x="1470" d="M90 391l25 152h268l59 344h-264l25 149h266l72 410h166l-72 -410h317l72 410h166l-72 -410h268l-26 -149h-266l-62 -344h266l-26 -152h-264l-70 -391h-166l68 391h-318l-67 -391h-166l67 391h-266zM549 543h317l62 344h-318z" /> -<glyph unicode="$" horiz-adv-x="1159" d="M111 166l114 153q6 -6 17.5 -16t50.5 -37.5t79 -48t101.5 -37t120.5 -16.5q106 0 178 57.5t72 155.5q0 82 -73 142.5t-177.5 104.5t-208.5 95t-177 139t-73 209q0 150 105.5 261.5t275.5 135.5v193h146v-191q102 -8 189 -42.5t124 -67.5l37 -31l-92 -168q-14 14 -42 34.5 t-111 55.5t-165 35q-115 0 -188.5 -61.5t-73.5 -149.5q0 -57 39 -103t101.5 -79t138 -63.5t151.5 -68.5t138.5 -85t101.5 -121t39 -168q0 -158 -104.5 -270.5t-282.5 -132.5v-189h-146v189q-231 23 -389 170z" /> -<glyph unicode="%" horiz-adv-x="1558" d="M98 1167q0 125 90.5 214t219.5 89t220 -89t91 -214t-91 -214t-220 -89t-219.5 88t-90.5 215zM129 0l1106 1446h192l-1105 -1446h-193zM256 1167q0 -66 44 -108.5t107.5 -42.5t107.5 43t44 108q0 63 -44 108.5t-107.5 45.5t-107.5 -45.5t-44 -108.5zM840 279q0 125 91 214 t220 89q127 0 219 -89.5t92 -214t-92 -214t-219 -89.5q-131 0 -221 88.5t-90 215.5zM999 279q0 -66 43 -109t109 -43q63 0 107.5 44t44.5 107.5t-44.5 108.5t-108 45t-107.5 -45t-44 -108z" /> -<glyph unicode="&" horiz-adv-x="1400" d="M111 406q0 123 68.5 227t185.5 143v4q-8 2 -20.5 8.5t-45.5 31t-58.5 57t-46 92t-20.5 129.5q0 176 124 274t320 98q35 0 79 -6t71 -10l27 -6l-52 -162q-59 12 -108 12q-111 0 -183.5 -59t-72.5 -162q0 -39 11 -74.5t38 -72.5t82 -58.5t135 -21.5h268v197h199v-197h193 v-176h-193v-193q0 -240 -133 -373t-367 -133q-223 0 -362 123.5t-139 307.5zM317 416q0 -106 82 -180t213 -74q143 0 222 81t79 246v185h-276q-154 0 -237 -67.5t-83 -190.5z" /> -<glyph unicode="'" horiz-adv-x="415" d="M129 1085v385h158v-385h-158z" /> -<glyph unicode="(" horiz-adv-x="618" d="M150 696q0 430 237 809h174q-231 -387 -231 -811q0 -469 231 -889h-174q-237 395 -237 891z" /> -<glyph unicode=")" horiz-adv-x="618" d="M57 -195q231 420 232 889q0 424 -232 811h174q238 -379 238 -809q0 -496 -238 -891h-174z" /> -<glyph unicode="*" horiz-adv-x="956" d="M74 1085l53 172l272 -102l-14 291h186l-16 -291l274 102l56 -172l-281 -75v-4l180 -226l-145 -106l-158 241h-4l-160 -241l-147 106l182 226v4z" /> -<glyph unicode="+" horiz-adv-x="1398" d="M158 504v160h458v503h168v-503h457v-160h-457v-504h-168v504h-458z" /> -<glyph unicode="," horiz-adv-x="522" d="M55 -207l127 422h203l-172 -422h-158z" /> -<glyph unicode="-" horiz-adv-x="966" d="M184 496v176h598v-176h-598z" /> -<glyph unicode="." horiz-adv-x="520" d="M156 0v211h209v-211h-209z" /> -<glyph unicode="/" horiz-adv-x="827" d="M74 -86l520 1610h176l-520 -1610h-176z" /> -<glyph unicode="0" horiz-adv-x="1280" d="M129 725q0 745 510 745q512 0 512 -745q0 -750 -512 -750q-510 0 -510 750zM336 725q0 -563 303 -563q305 0 305 563q0 559 -305 559q-303 0 -303 -559z" /> -<glyph unicode="1" horiz-adv-x="1001" d="M104 1110l347 336h180v-1270h315v-176h-831v176h319v934l2 90h-4q-16 -33 -70 -84l-135 -133z" /> -<glyph unicode="2" horiz-adv-x="1171" d="M113 111q0 121 52 224t131 170.5t171 135.5l171 122q79 54 131 127t52 150q0 106 -72.5 173t-187.5 67q-53 0 -103 -19.5t-83 -46t-58.5 -53t-37.5 -47.5l-11 -18l-149 100q6 10 16 29.5t50 66.5t88.5 83t129 65.5t172.5 29.5q201 0 329 -114.5t128 -300.5 q0 -96 -38 -180t-99 -144.5t-135 -116t-147.5 -104.5t-135 -98.5t-100.5 -109.5t-39 -126h717v-176h-932q-10 66 -10 111z" /> -<glyph unicode="3" horiz-adv-x="1161" d="M82 172l111 154q16 -18 44.5 -44t121 -70t184.5 -44q123 0 209 74.5t86 189.5q0 127 -96.5 196.5t-239.5 69.5h-101l-47 109l316 371l90 94v4q-43 -6 -123 -6h-490v176h865v-129l-394 -453q168 -18 296 -124.5t128 -299t-137 -329t-354 -136.5q-82 0 -161 20.5t-132 49.5 t-95 57.5t-61 49.5z" /> -<glyph unicode="4" horiz-adv-x="1241" d="M63 387v127l668 932h232v-887h196v-172h-196v-387h-199v387h-701zM287 559h477v526l8 144h-4q-33 -68 -72 -119l-409 -547v-4z" /> -<glyph unicode="5" horiz-adv-x="1153" d="M98 176l113 148q4 -6 13 -16.5t40 -38t64.5 -48t88 -37t111.5 -16.5q131 0 224.5 82t93.5 211t-94.5 213t-235.5 84q-63 0 -123.5 -18.5t-89.5 -34.5l-31 -19l-116 43l71 717h729v-176h-553l-34 -305l-11 -76h4q80 45 187 45q223 0 363.5 -136t140.5 -335 q0 -209 -146.5 -348.5t-365.5 -139.5q-248 0 -414 168z" /> -<glyph unicode="6" horiz-adv-x="1226" d="M121 657q0 143 40 283.5t116.5 261.5t204.5 194.5t290 73.5q76 0 145.5 -14t102.5 -31l33 -14l-66 -174q-92 47 -207 47q-186 0 -296.5 -142.5t-137.5 -342.5h4q45 61 134 99t186 38q203 0 329.5 -136t126.5 -341q0 -213 -131 -348.5t-333 -135.5q-236 0 -388.5 188.5 t-152.5 493.5zM334 561q0 -147 96 -273t229 -126q121 0 194 84t73 213q0 135 -81 220t-216 85q-121 0 -208 -61.5t-87 -141.5z" /> -<glyph unicode="7" horiz-adv-x="1083" d="M72 1270v176h966v-139l-653 -1307h-209l563 1139q18 37 39 69.5t33 48.5l12 15v4q-33 -6 -106 -6h-645z" /> -<glyph unicode="8" horiz-adv-x="1243" d="M117 418q0 76 28.5 146.5t74.5 120.5t74 74.5t54 43.5q-162 117 -162 289q0 156 117 267t334 111q203 0 329 -105t126 -282q0 -186 -172 -376q197 -121 196 -308q0 -174 -138 -299t-357.5 -125t-361.5 124t-142 319zM324 430q0 -121 88 -196.5t209 -75.5 q117 0 201.5 69.5t84.5 178.5q0 37 -18.5 70.5t-43 57t-71.5 51t-83 44.5l-97 44l-96 44q-174 -121 -174 -287zM387 1087q0 -29 10.5 -55t21.5 -46.5t39.5 -43t47 -35t59.5 -33t61.5 -29.5t71 -29.5t68.5 -29.5q127 127 127 285q0 98 -71.5 157.5t-186.5 59.5 q-117 0 -182.5 -57.5t-65.5 -143.5z" /> -<glyph unicode="9" horiz-adv-x="1226" d="M100 987q0 213 131 348t334 135q233 0 387 -188t154 -494q0 -143 -40 -283t-117 -261t-205 -195t-289 -74q-76 0 -146.5 14.5t-103.5 30.5l-31 15l66 176q92 -49 206 -49q186 0 297 142t138 343h-4q-43 -61 -133.5 -98t-186.5 -37q-203 0 -330 135t-127 340zM301 987 q0 -135 80 -220t217 -85q121 0 208 62.5t87 140.5q0 147 -96.5 273t-229.5 126q-123 0 -194.5 -84t-71.5 -213z" /> -<glyph unicode=":" horiz-adv-x="598" d="M195 0v211h208v-211h-208zM195 825v211h208v-211h-208z" /> -<glyph unicode=";" horiz-adv-x="600" d="M96 -207l109 422h205l-154 -422h-160zM207 825v211h209v-211h-209z" /> -<glyph unicode="<" horiz-adv-x="1142" d="M68 516v135l954 426v-182l-733 -309v-4l733 -310v-182z" /> -<glyph unicode="=" horiz-adv-x="1370" d="M197 309v160h977v-160h-977zM197 696v160h977v-160h-977z" /> -<glyph unicode=">" horiz-adv-x="1142" d="M121 90v182l731 310v4l-731 309v182l954 -426v-135z" /> -<glyph unicode="?" horiz-adv-x="1001" d="M66 1343q14 14 42.5 36t123 59t192.5 37q178 0 303 -104.5t125 -270.5q0 -94 -37 -169t-90 -125t-107.5 -96t-91.5 -103.5t-37 -125.5v-84h-194v97q0 86 36 156.5t87 119.5l102 94q51 45 87 101.5t36 119.5q0 86 -66.5 144.5t-166.5 58.5q-57 0 -115.5 -21.5t-89.5 -41.5 l-29 -23zM291 0v199h203v-199h-203z" /> -<glyph unicode="@" d="M121 493.5q0 317.5 217 537.5t530 220q276 0 404.5 -117.5t128.5 -297.5v-580h147v-150h-559q-186 0 -305 114t-119 274q0 158 118 270.5t306 112.5h221q-4 92 -91 151t-240 59q-236 0 -398 -175t-162 -418q0 -248 163 -418t419 -170v-162q-340 0 -560 216t-220 533.5z M766 496q0 -100 67.5 -170t170.5 -70h206v483h-202q-106 0 -174 -70.5t-68 -172.5z" /> -<glyph unicode="A" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" /> -<glyph unicode="B" horiz-adv-x="1298" d="M197 0v1446h505q186 0 303 -98.5t117 -270.5q0 -104 -48 -186t-132 -125v-4q111 -33 174.5 -129t63.5 -221q0 -197 -132.5 -304.5t-332.5 -107.5h-518zM399 176h326q115 0 181.5 66.5t66.5 179.5q0 111 -68.5 179.5t-181.5 68.5h-324v-494zM399 838h303q96 0 154.5 61.5 t58.5 157.5t-57 154.5t-160 58.5h-299v-432z" /> -<glyph unicode="C" horiz-adv-x="1478" d="M98 731q0 315 210 527t526 212q98 0 188 -19t148.5 -47t103.5 -56.5t65 -49.5l21 -18l-100 -152q-18 18 -53.5 44t-145 70t-219.5 44q-238 0 -386.5 -158.5t-148.5 -394.5q0 -238 150.5 -404.5t386.5 -166.5q121 0 232.5 47t162.5 94l51 47l109 -145q-8 -10 -23.5 -25.5 t-70 -54.5t-115 -69.5t-155.5 -55.5t-197 -25q-322 0 -531 217t-209 539z" /> -<glyph unicode="D" horiz-adv-x="1515" d="M197 0v1446h479q336 0 534.5 -191.5t198.5 -529.5q0 -340 -198.5 -532.5t-534.5 -192.5h-479zM399 176h263q248 0 393 143.5t145 405.5q0 260 -145.5 402.5t-392.5 142.5h-263v-1094z" /> -<glyph unicode="E" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874z" /> -<glyph unicode="F" horiz-adv-x="1067" d="M197 0v1446h796v-176h-594v-475h506v-177h-506v-618h-202z" /> -<glyph unicode="G" horiz-adv-x="1556" d="M100 725q0 315 211 530t527 215q96 0 186 -18t149.5 -43t104.5 -50.5t65 -43.5l21 -19l-102 -151q-18 16 -52 39.5t-140.5 62.5t-215.5 39q-248 0 -396.5 -158.5t-148.5 -398.5q0 -250 151.5 -408.5t381.5 -158.5q111 0 213 45t149 90l47 45v209h-235v176h420v-727h-179 v90l3 62h-5l-18 -19q-12 -12 -55 -43t-90.5 -53.5t-124 -42t-156.5 -19.5q-297 0 -504 212t-207 538z" /> -<glyph unicode="H" horiz-adv-x="1548" d="M197 0v1446h202v-635h750v635h203v-1446h-203v635h-750v-635h-202z" /> -<glyph unicode="I" horiz-adv-x="595" d="M197 0v1446h202v-1446h-202z" /> -<glyph unicode="J" horiz-adv-x="1099" d="M61 487h201v-61q0 -137 66.5 -200.5t163 -63.5t161 61.5t64.5 194.5v852h-365v176h568v-1030q0 -219 -127 -330t-303.5 -111t-302.5 112t-126 329v71z" /> -<glyph unicode="K" horiz-adv-x="1275" d="M197 0v1446h202v-608h215l365 608h223l-420 -686v-4l447 -756h-230l-385 664h-215v-664h-202z" /> -<glyph unicode="L" horiz-adv-x="1083" d="M197 0v1446h202v-1270h648v-176h-850z" /> -<glyph unicode="M" horiz-adv-x="1773" d="M152 0l116 1446h213l332 -782l72 -195h4q39 115 72 195l331 782h213l117 -1446h-201l-71 911l-2 213h-5q-43 -133 -77 -213l-289 -651h-180l-287 651q-33 78 -78 217h-4q2 -129 -4 -217l-70 -911h-202z" /> -<glyph unicode="N" horiz-adv-x="1550" d="M197 0v1446h200l643 -940q25 -35 55 -87l48 -87l18 -35h4q-14 129 -14 209v940h203v-1446h-199l-645 938q-53 80 -121 211h-4q14 -129 14 -211v-938h-202z" /> -<glyph unicode="O" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5z" /> -<glyph unicode="P" horiz-adv-x="1243" d="M197 0v1446h528q201 0 328 -124t127 -329t-128 -331.5t-327 -126.5h-326v-535h-202zM399 711h293q131 0 206 75.5t75 206.5q0 129 -75 203t-204 74h-295v-559z" /> -<glyph unicode="Q" horiz-adv-x="1705" d="M100 731q0 313 214 526t528 213q315 0 529 -213t214 -526q0 -270 -170 -477l172 -164l-119 -127l-168 168q-195 -156 -458 -156q-313 0 -527.5 219.5t-214.5 536.5zM309 731q0 -242 153.5 -405.5t379.5 -163.5q180 0 313 106l-170 166l119 127l166 -168q106 147 106 338 q0 238 -153.5 396.5t-380.5 158.5q-225 0 -379 -158.5t-154 -396.5z" /> -<glyph unicode="R" horiz-adv-x="1312" d="M197 0v1446h442q182 0 270 -33q113 -41 178.5 -145.5t65.5 -245.5q0 -139 -70.5 -245.5t-189.5 -145.5v-4q16 -18 43 -66l307 -561h-229l-305 575h-310v-575h-202zM399 752h291q119 0 187.5 70.5t68.5 191.5q0 160 -115 223q-61 33 -198 33h-234v-518z" /> -<glyph unicode="S" horiz-adv-x="1118" d="M86 166l115 153q6 -6 17 -16t50 -37.5t79 -48t101.5 -37t120.5 -16.5q106 0 178 57.5t72 155.5q0 63 -39 112.5t-100.5 84t-136 66.5t-149.5 68.5t-136 82t-100 116t-39 160.5q0 170 132 286.5t335 116.5q119 0 221 -36.5t145 -73.5l43 -35l-92 -168q-14 14 -41.5 34.5 t-110.5 55.5t-165 35q-113 0 -187.5 -61.5t-74.5 -149.5q0 -82 71.5 -139.5t175 -98t207 -90t175 -140.5t71.5 -220q0 -174 -125 -291t-334 -117q-86 0 -167 19.5t-135 47.5t-96 56.5t-61 48.5z" /> -<glyph unicode="T" horiz-adv-x="1214" d="M10 1270v176h1194v-176h-495v-1270h-203v1270h-496z" /> -<glyph unicode="U" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5z" /> -<glyph unicode="V" horiz-adv-x="1294" d="M12 1446h219l359 -1022l55 -199h4q29 121 56 199l362 1022h215l-532 -1446h-203z" /> -<glyph unicode="W" horiz-adv-x="1941" d="M68 1446h208l256 -1061q18 -78 27 -154h4q10 74 31 154l283 1061h180l282 -1061l31 -154h4q6 76 27 154l266 1061h209l-379 -1446h-235l-250 938q-25 92 -43 205h-4q-18 -113 -43 -205l-250 -938h-236z" /> -<glyph unicode="X" horiz-adv-x="1253" d="M45 0l457 745l-428 701h233l228 -391l92 -172h4q41 92 88 172l227 391h234l-428 -701l456 -745h-229l-262 444l-92 166h-4q-39 -86 -86 -166l-263 -444h-227z" /> -<glyph unicode="Y" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612z" /> -<glyph unicode="Z" horiz-adv-x="1243" d="M84 0v135l696 1004q25 37 50.5 69.5t39.5 48.5l15 15v4q-39 -6 -109 -6h-655v176h1016v-133l-697 -1006q-25 -35 -51.5 -67.5t-40.5 -46.5l-12 -17v-4q39 4 108 4h701v-176h-1061z" /> -<glyph unicode="[" horiz-adv-x="616" d="M207 -195v1700h338v-149h-164v-1399h164v-152h-338z" /> -<glyph unicode="\" horiz-adv-x="827" d="M57 1524h176l521 -1610h-176z" /> -<glyph unicode="]" horiz-adv-x="618" d="M72 -43h166v1399h-166v149h340v-1700h-340v152z" /> -<glyph unicode="^" horiz-adv-x="1255" d="M141 506l410 940h129l407 -940h-178l-295 721l-292 -721h-181z" /> -<glyph unicode="_" horiz-adv-x="1216" d="M57 0h1102v-160h-1102v160z" /> -<glyph unicode="`" horiz-adv-x="1021" d="M330 1806h213l149 -260h-168z" /> -<glyph unicode="a" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="b" horiz-adv-x="1228" d="M156 0v1446h198v-473l-4 -88h4l11.5 18t36 43t62.5 53.5t94 42t128 19.5q207 0 331 -149.5t124 -393.5t-132 -393.5t-339 -149.5q-66 0 -123.5 18.5t-92 45.5t-61 52.5t-37.5 43.5l-12 19h-4q4 -33 4 -78v-76h-188zM348 514q0 -150 77 -259.5t216 -109.5q127 0 213 99.5 t86 271.5q0 168 -81 269.5t-212 101.5q-127 0 -213 -93.5t-86 -279.5z" /> -<glyph unicode="c" horiz-adv-x="1120" d="M82 518q0 231 156.5 387t398.5 156q115 0 212 -38t138 -77l39 -37l-94 -139q-12 12 -36 32.5t-98.5 53.5t-152.5 33q-156 0 -258 -104.5t-102 -264.5t103.5 -266.5t262.5 -106.5q86 0 166 35t117 70l37 35l80 -146l-18 -17q-11 -11 -50 -40t-84 -50.5t-115.5 -40 t-146.5 -18.5q-244 0 -399.5 153.5t-155.5 389.5z" /> -<glyph unicode="d" horiz-adv-x="1230" d="M88 518q0 246 131 394.5t338 148.5q68 0 125 -16.5t91 -41t59.5 -49t35.5 -41.5l9 -16h4q-4 31 -4 70v479h198v-1446h-188v98l2 70h-4q-4 -8 -11.5 -20.5t-35 -46t-63.5 -59.5t-97.5 -46.5t-132.5 -20.5q-209 0 -333 149.5t-124 393.5zM291 518q0 -168 81 -269.5 t212 -101.5q127 0 213 93.5t86 279.5q0 150 -77 259.5t-216 109.5q-127 0 -213 -99.5t-86 -271.5z" /> -<glyph unicode="e" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5z" /> -<glyph unicode="f" horiz-adv-x="688" d="M82 862v160h129v49q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-45h245v-160h-245v-862h-197v862h-129z" /> -<glyph unicode="g" horiz-adv-x="1214" d="M88 542.5q0 229.5 121 374t332 144.5q213 0 311 -131l14 -23h4q-2 14 -2 33v96h191v-993q0 -123 -44 -217t-120 -148.5t-166 -81t-192 -26.5q-186 0 -355 86l66 156q129 -70 284 -70q147 0 237.5 70.5t90.5 220.5v76l2 65h-4q-96 -162 -307 -162t-337 150.5t-126 380z M289 547q0 -164 81 -263.5t220 -99.5q121 0 197.5 84t76.5 273q0 348 -293 348q-133 0 -207.5 -91t-74.5 -251z" /> -<glyph unicode="h" horiz-adv-x="1234" d="M156 1446h198v-531l-4 -86h4q41 90 141.5 161t241.5 71q356 0 357 -397v-664h-199v618q0 125 -41 193t-155.5 68t-205 -72t-122.5 -184q-16 -55 -17 -138v-485h-198v1446z" /> -<glyph unicode="i" horiz-adv-x="509" d="M154 1243v203h200v-203h-200zM156 0v1036h198v-1036h-198z" /> -<glyph unicode="j" horiz-adv-x="507" d="M-113 -248q18 -2 45 -2q35 0 68 8.5t71 28.5t61.5 69.5t23.5 120.5v1059h196v-1071q0 -121 -42 -205t-109.5 -119.5t-125 -49t-118.5 -13.5l-70 4v170zM154 1243v203h200v-203h-200z" /> -<glyph unicode="k" horiz-adv-x="1077" d="M156 0v1446h198v-791h146l282 381h226l-344 -456v-5l383 -575h-232l-311 487h-150v-487h-198z" /> -<glyph unicode="l" horiz-adv-x="542" d="M143 283v1163h199v-1129q0 -86 28.5 -116.5t82.5 -30.5l34 2v-176q-31 -4 -65 -4q-279 0 -279 291z" /> -<glyph unicode="m" horiz-adv-x="1871" d="M156 1036h192v-137l-4 -76h4q39 96 139.5 167t217.5 71q258 0 311 -236h4q45 98 146.5 167t222.5 69q342 0 342 -397v-664h-199v621q0 125 -38 192.5t-146 67.5q-104 0 -183.5 -76t-107.5 -189q-14 -59 -15 -143v-473h-198v621q0 123 -36 191.5t-144.5 68.5t-187.5 -78 t-109 -195q-12 -49 -13 -135v-473h-198v1036z" /> -<glyph unicode="n" horiz-adv-x="1234" d="M156 1036h192v-137l-4 -76h4q41 88 139.5 163t249.5 75q356 0 357 -397v-664h-199v618q0 125 -41 193t-156 68q-117 0 -206 -71t-121 -183q-16 -55 -17 -140v-485h-198v1036z" /> -<glyph unicode="o" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5z" /> -<glyph unicode="p" horiz-adv-x="1228" d="M156 1036h182v-88l-4 -76h4q4 8 11 20.5t37 45.5t65.5 57.5t98 45t136.5 20.5q207 0 331 -149.5t124 -393.5t-132 -393.5t-337 -149.5q-63 0 -119.5 17.5t-91.5 43t-60.5 50.5t-35.5 41l-11 18h-4q4 -37 4 -90v-465h-198v1446zM348 514q0 -150 79 -259.5t214 -109.5 q127 0 213 99.5t86 271.5q0 168 -81 269.5t-212 101.5q-127 0 -213 -93.5t-86 -279.5z" /> -<glyph unicode="q" horiz-adv-x="1230" d="M88 518q0 246 131 394.5t338 148.5q68 0 126 -18.5t93 -43t61.5 -50t36.5 -44.5l11 -18h4q-2 31 -2 71v78h188v-1446h-198v473l4 91h-4q-4 -8 -11.5 -19.5t-35 -42.5t-62.5 -54.5t-94.5 -43t-128.5 -19.5q-209 0 -333 149.5t-124 393.5zM291 518q0 -168 81 -269.5 t212 -101.5q127 0 213 93.5t86 279.5q0 150 -77 259.5t-216 109.5q-127 0 -213 -99.5t-86 -271.5z" /> -<glyph unicode="r" horiz-adv-x="768" d="M156 0v1036h192v-180l-4 -78h4q37 119 124 195t204 76l51 -5v-196q-27 6 -57 6q-96 0 -176 -65.5t-115 -178.5q-25 -80 -25 -186v-424h-198z" /> -<glyph unicode="s" horiz-adv-x="917" d="M72 127l96 141q12 -14 36.5 -33.5t102.5 -53.5t158 -34q70 0 121 35t51 94q0 51 -55.5 90.5t-133 69t-155.5 65.5t-133.5 103.5t-55.5 161.5q0 137 106.5 216t268.5 79q100 0 184.5 -28.5t116.5 -57.5l33 -29l-80 -149q-10 10 -29.5 25.5t-86 41t-140.5 25.5 q-72 0 -121 -32t-49 -95q0 -51 55.5 -88t133 -66.5t155.5 -65.5t133.5 -103.5t55.5 -162.5q0 -131 -103.5 -216t-271.5 -85q-113 0 -211 38t-139 77z" /> -<glyph unicode="t" horiz-adv-x="733" d="M63 862v160h142v299h192v-299h250v-160h-250v-461q0 -59 16.5 -103t40 -68.5t55.5 -39t57.5 -18.5t51.5 -4l48 4v-176q-29 -4 -70 -4q-49 0 -94 6t-102.5 30.5t-99.5 64.5t-71.5 114t-29.5 172v483h-136z" /> -<glyph unicode="u" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398z" /> -<glyph unicode="v" horiz-adv-x="1028" d="M14 1036h211l252 -700q8 -25 16.5 -60.5l14.5 -58.5l4 -22h4l4 22l16 58q9 36 17 61l252 700h209l-383 -1036h-230z" /> -<glyph unicode="w" horiz-adv-x="1667" d="M35 1036h211l215 -727l13 -51q7 -29 9 -45l4 -14h5q10 57 26 110l225 725h183l223 -725l29 -110h4q8 57 24 110l217 727h209l-334 -1036h-219l-215 666l-28 112h-5q-12 -59 -28 -112l-213 -666h-221z" /> -<glyph unicode="x" horiz-adv-x="1040" d="M45 0l352 532l-334 504h228l192 -315l35 -62h4q18 35 35 62l193 315h227l-334 -504l352 -532h-225l-217 346l-31 57h-4q-16 -33 -31 -57l-217 -346h-225z" /> -<glyph unicode="y" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118z" /> -<glyph unicode="z" horiz-adv-x="1058" d="M80 0v115l522 655l86 96v4q-33 -4 -100 -4h-486v170h854v-114l-522 -658l-88 -94v-4q35 4 103 4h526v-170h-895z" /> -<glyph unicode="{" horiz-adv-x="716" d="M100 578v176q6 0 18.5 2t42 16t53.5 36.5t42 68t18 104.5v172q0 92 26 160.5t61.5 104.5t86 58.5t86 27.5t72.5 5l47 -2v-151h-28q-27 0 -50.5 -7.5t-55.5 -26.5t-51 -65.5t-19 -115.5v-211q0 -57 -17.5 -104.5t-42 -75t-48.5 -47t-42 -27.5l-16 -6v-4q6 -2 17 -6.5 t40 -25t50.5 -47t39.5 -74.5q19 -47 19 -107v-236q0 -70 19 -116t51 -65.5t55.5 -26.5t50.5 -7h28v-152q-18 -4 -47 -4q-37 0 -72.5 5.5t-86 28t-86 58t-61.5 105.5t-26 162v196q0 59 -18 103.5t-43 66t-50.5 34.5t-43.5 15z" /> -<glyph unicode="|" horiz-adv-x="579" d="M203 -326v1948h174v-1948h-174z" /> -<glyph unicode="}" horiz-adv-x="716" d="M63 -45h29q27 0 50.5 7t55 26.5t51 65.5t19.5 116v235q0 94 42 159t83 83l41 19v4q-6 2 -17 7t-40 25.5t-50.5 47t-40 74.5t-18.5 106v211q0 70 -19.5 116t-51 65t-55 26.5t-50.5 7.5h-29v151q18 2 48 2q37 0 72.5 -5t85.5 -27.5t86 -58.5t61.5 -104.5t25.5 -160.5v-172 q0 -172 138 -219l36 -8v-176q-6 0 -18 -2.5t-42 -16.5t-53.5 -35.5t-42 -65.5t-18.5 -104v-196q0 -92 -25.5 -162t-61.5 -105.5t-86 -58t-86 -28t-72 -5.5l-48 4v152z" /> -<glyph unicode="~" horiz-adv-x="1245" d="M137 418q0 174 75 260t212 86q72 0 130 -32t89 -68.5t76 -68.5t96 -32q74 0 105.5 57.5t31.5 135.5h162q0 -346 -285 -346q-72 0 -130 30.5t-88.5 68.5t-77 68.5t-97.5 30.5q-72 0 -104.5 -57t-32.5 -133h-162z" /> -<glyph unicode="¡" horiz-adv-x="591" d="M193 -410l14 1049h178l12 -1049h-204zM193 838v198h202v-198h-202z" /> -<glyph unicode="¢" horiz-adv-x="1179" d="M109 723q0 227 116.5 388t315.5 187v172h145v-172q133 -20 232.5 -103t152.5 -214l-180 -70q-90 203 -273 203q-143 0 -225 -109.5t-82 -281.5q0 -176 80 -282.5t227 -106.5q184 0 273 203l180 -72q-55 -125 -152.5 -213t-232.5 -102v-177h-145v177q-199 27 -315.5 187.5 t-116.5 385.5z" /> -<glyph unicode="£" horiz-adv-x="1210" d="M115 0v176h125v477h-90v144h90v278q0 170 126 282.5t318 112.5q186 0 332 -120l10 -11l-117 -141q-98 88 -223 88q-111 0 -176.5 -62.5t-65.5 -156.5v-270h377v-144h-377v-477h666v-176h-995z" /> -<glyph unicode="¥" horiz-adv-x="1243" d="M57 1446h232l241 -451l88 -209h5q43 113 88 209l243 451h232l-340 -606h209v-129h-277l-55 -99v-75h332v-129h-332v-408h-205v408h-334v129h334v75l-55 99h-279v129h211z" /> -<glyph unicode="§" horiz-adv-x="905" d="M98 -23l90 138q84 -76 199 -76q94 0 155.5 56.5t61.5 158.5q0 41 -12 92l-135 770h161l144 -799q10 -55 10 -92q0 -156 -104.5 -254t-280.5 -98q-80 0 -151.5 26.5t-104.5 51.5zM129 1120q0 154 104.5 252t282.5 98q78 0 150.5 -26.5t105.5 -50.5l33 -27l-94 -131 q-82 70 -195 70q-96 0 -157.5 -53.5t-61.5 -153.5q0 -37 12 -82l140 -789h-164l-144 799q-12 47 -12 94z" /> -<glyph unicode="¨" horiz-adv-x="1021" d="M258 1599v207h164v-207h-164zM600 1599v207h164v-207h-164z" /> -<glyph unicode="©" d="M111 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM260 723q0 -256 167 -432t411 -176q248 0 415.5 176t167.5 432t-168 432t-415 176q-244 0 -411 -176t-167 -432zM449 721q0 168 111.5 288.5t291.5 120.5 q195 0 311 -165l23 -37l-125 -68q-8 14 -23.5 36t-67.5 57.5t-112 35.5q-117 0 -185.5 -79t-68.5 -189q0 -115 67.5 -191.5t186.5 -76.5q59 0 110.5 32.5t71.5 63.5l21 33l125 -68q-4 -8 -12.5 -21.5t-38 -49t-64.5 -62.5t-94 -48.5t-125 -21.5q-180 0 -291.5 120 t-111.5 290z" /> -<glyph unicode="ª" horiz-adv-x="864" d="M150 543v116h563v-116h-563zM152 981q0 225 385 225h20v13q0 129 -131 129q-39 0 -82 -14.5t-65 -28.5l-23 -15l-59 101q92 76 247 75q127 0 194 -66.5t67 -191.5v-411h-140v94h-4q-6 -12 -19.5 -30.5t-61.5 -48.5t-107 -30q-88 0 -154.5 53.5t-66.5 145.5zM299 991 q0 -37 27.5 -62.5t76.5 -25.5q68 0 111 56.5t43 125.5v17h-25q-233 0 -233 -111z" /> -<glyph unicode="«" horiz-adv-x="1138" d="M90 578l336 421h199l-336 -421l336 -420h-199zM502 578l336 421h198l-336 -421l336 -420h-198z" /> -<glyph unicode="¬" horiz-adv-x="1257" d="M123 696v160h977v-547h-166v387h-811z" /> -<glyph unicode="­" horiz-adv-x="882" d="M143 496v176h598v-176h-598z" /> -<glyph unicode="®" d="M111 723q0 311 212 529t515 218q305 0 519 -218t214 -529t-214 -529.5t-519 -218.5q-303 0 -515 218.5t-212 529.5zM260 723q0 -256 167 -432t411 -176q248 0 415.5 176t167.5 432t-168 432t-415 176q-244 0 -411 -176t-167 -432zM588 340v772h297q111 0 177 -64.5 t66 -170.5q0 -82 -43 -136.5t-98 -68.5v-4q8 -8 27 -43l147 -285h-160l-143 299h-125v-299h-145zM733 745h123q57 0 91 35t34 97q0 59 -34 91.5t-91 32.5h-123v-256z" /> -<glyph unicode="¯" horiz-adv-x="1021" d="M250 1606v143h522v-143h-522z" /> -<glyph unicode="°" horiz-adv-x="796" d="M88 1167q0 125 90 214t219 89t220.5 -89t91.5 -214t-91.5 -214t-220.5 -89t-219 88t-90 215zM246 1167.5q0 -63.5 44 -107.5t107.5 -44t107.5 44t44 107.5t-44 108.5t-107.5 45t-107.5 -45t-44 -108.5z" /> -<glyph unicode="±" horiz-adv-x="1394" d="M156 504v160h458v503h168v-503h457v-160h-457v-504h-168v504h-458zM188 -195h1018v-159h-1018v159z" /> -<glyph unicode="²" horiz-adv-x="796" d="M96 940q0 96 45 171t108.5 121t127 86t108.5 87t45 102q0 57 -42 95t-105 38q-96 -4 -172 -98l-100 92l11 17q7 10 32.5 34.5t56.5 44t79 36t101 16.5q127 0 211 -75t84 -194q0 -82 -42 -147.5t-103.5 -107t-123 -78.5t-105.5 -81t-48 -98h436v-135h-598q0 8 -2 23.5 t-3 28t-1 22.5z" /> -<glyph unicode="³" horiz-adv-x="796" d="M82 981l86 109q8 -12 24.5 -29t70.5 -45.5t114 -28.5q68 0 119 45t51 111q0 68 -54.5 106.5t-127.5 38.5h-70l-33 78l182 211l50 49v4q-39 -6 -74 -6h-289v137h555v-98l-223 -258q102 -14 170.5 -81t68.5 -181q0 -121 -91 -209t-228 -88q-92 0 -167 33.5t-105 66.5z" /> -<glyph unicode="´" horiz-adv-x="1021" d="M330 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="µ" horiz-adv-x="1267" d="M170 -410v1446h199v-618q0 -125 40 -191.5t152 -66.5q154 0 246 114.5t92 276.5v485h199v-1036h-193v141l4 72h-6q-4 -10 -12 -25.5t-40 -56.5t-72 -72.5t-108.5 -57.5t-148.5 -26q-131 2 -186 64h-4q14 -100 14 -160v-289h-176z" /> -<glyph unicode="μ" horiz-adv-x="1267" d="M170 -410v1446h199v-618q0 -125 40 -191.5t152 -66.5q154 0 246 114.5t92 276.5v485h199v-1036h-193v141l4 72h-6q-4 -10 -12 -25.5t-40 -56.5t-72 -72.5t-108.5 -57.5t-148.5 -26q-131 2 -186 64h-4q14 -100 14 -160v-289h-176z" /> -<glyph unicode="¶" horiz-adv-x="1208" d="M88 970.5q0 200.5 142.5 338t340.5 137.5h557v-176h-401v-1372h-154v596q-199 0 -342 138t-143 338.5zM854 -102v1255h152v-1255h-152z" /> -<glyph unicode="·" horiz-adv-x="563" d="M180 489v211h203v-211h-203z" /> -<glyph unicode="¸" horiz-adv-x="1021" d="M350 -291q41 -14 86 -14q98 0 98.5 63.5t-108.5 63.5l-37 -2l60 227l100 -20v-17l-25 -112q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119z" /> -<glyph unicode="¹" horiz-adv-x="796" d="M133 1550l217 211h139v-760h187v-135h-531v135h191v510l4 54h-4q-8 -18 -37 -45l-72 -70z" /> -<glyph unicode="º" horiz-adv-x="956" d="M127 1130q0 145 101.5 241.5t246.5 96.5q147 0 249.5 -96t102.5 -242q0 -150 -101 -247t-248.5 -97t-249 97t-101.5 247zM160 543v116h639v-116h-639zM274 1130q0 -92 58.5 -152t144.5 -60q84 0 142.5 60t58.5 152q0 90 -58.5 148.5t-142.5 58.5q-86 0 -144.5 -58.5 t-58.5 -148.5z" /> -<glyph unicode="»" horiz-adv-x="1140" d="M102 158l336 420l-336 421h199l336 -421l-336 -420h-199zM516 158l336 420l-336 421h199l336 -421l-336 -420h-199z" /> -<glyph unicode="¼" horiz-adv-x="1980" d="M109 1235l217 211h139v-760h186v-135h-530v135h190v510l4 53h-4q-8 -18 -37 -45l-71 -69zM535 0l688 1446h153l-688 -1446h-153zM1167 219v103l412 573h166v-541h125v-135h-125v-219h-152v219h-426zM1335 354h258v252l6 119h-4q-29 -55 -59 -98l-201 -269v-4z" /> -<glyph unicode="½" horiz-adv-x="1968" d="M109 1235l217 211h139v-760h186v-135h-530v135h190v510l4 53h-4q-8 -18 -37 -45l-71 -69zM539 0l688 1446h153l-688 -1446h-153zM1229 74q0 96 45 170.5t108.5 121t127 86.5t108.5 87t45 102q0 57 -42 95t-105 38q-96 -4 -173 -98l-100 92l11 16q7 10 33 35t56.5 44.5 t78.5 35.5t102 16q127 0 211 -74.5t84 -193.5q0 -82 -42 -147.5t-103.5 -107.5t-123 -79t-105.5 -81t-48 -97h436v-135h-598q0 8 -2 23.5t-3 28t-1 22.5z" /> -<glyph unicode="¾" horiz-adv-x="2004" d="M82 666l86 108q8 -12 24.5 -28.5t70.5 -45t114 -28.5q68 0 119 45t51 110q0 68 -54.5 107t-127.5 39h-70l-33 78l182 211l50 49v4q-39 -6 -74 -6h-289v137h555v-98l-223 -258q102 -14 170.5 -81t68.5 -182q0 -121 -91 -209t-228 -88q-92 0 -167 34t-105 67zM559 0 l688 1446h154l-688 -1446h-154zM1192 219v103l412 573h165v-541h125v-135h-125v-219h-151v219h-426zM1360 354h258v252l6 119h-4q-29 -55 -59 -98l-201 -269v-4z" /> -<glyph unicode="¿" horiz-adv-x="921" d="M80 -57q0 94 37 168.5t90 125t107.5 96.5t91 104.5t36.5 125.5v76h193v-88q0 -86 -36 -157.5t-86 -120.5l-101 -93q-51 -45 -87 -101t-36 -120q0 -86 66.5 -145.5t166.5 -59.5q57 0 115.5 22.5t87.5 43.5l31 22l108 -141q-6 -6 -16 -14.5t-45 -31t-74 -39.5t-98.5 -31.5 t-122.5 -14.5q-178 0 -303 103.5t-125 269.5zM438 838v198h203v-198h-203z" /> -<glyph unicode="À" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM369 1806h213l149 -260h-168zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" /> -<glyph unicode="Á" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM553 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="Â" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM358 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205z" /> -<glyph unicode="Ã" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM299 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143zM422 584h438l-160 458l-55 205h-4 q-33 -131 -57 -205z" /> -<glyph unicode="Ä" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM391 1599v207h164v-207h-164zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM733 1599v207h164v-207h-164z" /> -<glyph unicode="Å" horiz-adv-x="1286" d="M16 0l521 1446h213l520 -1446h-211l-146 416h-544l-144 -416h-209zM422 584h438l-160 458l-55 205h-4q-33 -131 -57 -205zM469 1673q0 70 51 112t123 42t123 -42t51 -112q0 -68 -51 -109.5t-123 -41.5t-123 41.5t-51 109.5zM575 1673q0 -29 18.5 -48t49.5 -19 q29 0 48.5 19.5t19.5 47.5q0 33 -19.5 52.5t-48.5 19.5q-31 0 -49.5 -19.5t-18.5 -52.5z" /> -<glyph unicode="Æ" horiz-adv-x="1798" d="M8 0l598 1446h1057v-176h-639v-453h520v-176h-520v-465h674v-176h-875v643h-346l-258 -643h-211zM545 811h278v459h-94z" /> -<glyph unicode="Ç" horiz-adv-x="1482" d="M102 731q0 315 210 527t526 212q98 0 188 -19t148.5 -47t103.5 -56.5t65 -49.5l21 -18l-100 -152q-18 18 -53 44t-145 70t-220 44q-238 0 -386.5 -158.5t-148.5 -394.5q0 -238 150.5 -404.5t386.5 -166.5q121 0 232.5 47t162.5 94l51 47l109 -145l-23 -24 q-14 -15 -65 -52t-108.5 -66.5t-147.5 -56t-187 -31.5l-16 -77q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119q41 -14 86 -14q98 0 98 63.5t-108 63.5l-37 -2l41 160q-291 27 -475.5 238.5t-184.5 512.5z" /> -<glyph unicode="È" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM365 1806h213l149 -260h-168z" /> -<glyph unicode="É" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM551 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="Ê" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM356 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" /> -<glyph unicode="Ë" horiz-adv-x="1173" d="M197 0v1446h839v-176h-637v-453h519v-176h-519v-465h672v-176h-874zM387 1599v207h164v-207h-164zM729 1599v207h164v-207h-164z" /> -<glyph unicode="Ì" horiz-adv-x="595" d="M25 1806h213l149 -260h-168zM197 0v1446h202v-1446h-202z" /> -<glyph unicode="Í" horiz-adv-x="595" d="M197 0v1446h202v-1446h-202zM211 1546l149 260h213l-196 -260h-166z" /> -<glyph unicode="Î" horiz-adv-x="595" d="M14 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM197 0v1446h202v-1446h-202z" /> -<glyph unicode="Ï" horiz-adv-x="595" d="M47 1599v207h164v-207h-164zM197 0v1446h202v-1446h-202zM389 1599v207h164v-207h-164z" /> -<glyph unicode="Ð" horiz-adv-x="1554" d="M115 639v168h121v639h479q336 0 534.5 -191.5t198.5 -529.5q0 -340 -198.5 -532.5t-534.5 -192.5h-479v639h-121zM438 176h262q248 0 393.5 143.5t145.5 405.5q0 260 -145.5 402.5t-393.5 142.5h-262v-463h305v-168h-305v-463z" /> -<glyph unicode="Ñ" horiz-adv-x="1550" d="M197 0v1446h200l643 -940q25 -35 55 -87l48 -87l18 -35h4q-14 129 -14 209v940h203v-1446h-199l-645 938q-53 80 -121 211h-4q14 -129 14 -211v-938h-202zM430 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260 q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143z" /> -<glyph unicode="Ò" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM567 1806h213l150 -260h-168z " /> -<glyph unicode="Ó" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM754 1546l149 260h213 l-196 -260h-166z" /> -<glyph unicode="Ô" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM557 1546l180 260h207 l180 -260h-174l-108 164h-4l-107 -164h-174z" /> -<glyph unicode="Õ" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM498 1548q0 260 209 260 q59 0 104 -34.5t82 -69.5t72 -35q41 0 60 40t19 93h144q0 -260 -209 -260q-59 0 -104.5 35t-82 69.5t-71.5 34.5q-80 0 -80 -133h-143z" /> -<glyph unicode="Ö" d="M98 733q0 311 215 524t528.5 213t527.5 -213t214 -524q0 -319 -214 -538.5t-527.5 -219.5t-528.5 219.5t-215 538.5zM307 733q0 -242 155.5 -406.5t379 -164.5t378 165t154.5 406q0 236 -154.5 394.5t-378 158.5t-379 -158.5t-155.5 -394.5zM590 1599v207h164v-207h-164z M932 1599v207h164v-207h-164z" /> -<glyph unicode="×" horiz-adv-x="1320" d="M129 113l422 471l-422 471l113 112l417 -467l420 467l113 -112l-424 -471l424 -471l-113 -113l-420 465l-417 -465z" /> -<glyph unicode="Ø" horiz-adv-x="1687" d="M102 733q0 311 215 524t529 213q205 0 379 -100l94 129l100 -69l-94 -132q123 -102 192.5 -248.5t69.5 -316.5q0 -319 -214 -538.5t-527 -219.5q-217 0 -393 109l-97 -135l-102 69l100 142q-119 104 -185.5 252.5t-66.5 320.5zM311 733q0 -246 160 -411l641 890 q-121 74 -266 74q-223 0 -379 -158.5t-156 -394.5zM567 242q125 -80 279 -80q223 0 377.5 165t154.5 406q0 248 -168 406z" /> -<glyph unicode="Ù" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM471 1806h213l150 -260h-168z" /> -<glyph unicode="Ú" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM655 1546l150 260h213l-197 -260h-166z" /> -<glyph unicode="Û" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM461 1546l180 260h207l180 -260h-174l-109 164h-4l-106 -164h-174z" /> -<glyph unicode="Ü" horiz-adv-x="1490" d="M176 512v934h203v-934q0 -164 98 -257t266 -93q170 0 269.5 93t99.5 261v930h203v-934q0 -240 -158 -388.5t-411.5 -148.5t-411.5 148.5t-158 388.5zM494 1599v207h163v-207h-163zM836 1599v207h163v-207h-163z" /> -<glyph unicode="Ý" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612zM514 1546l150 260h213l-197 -260h-166z" /> -<glyph unicode="Þ" horiz-adv-x="1243" d="M197 1446h200v-246h328q201 0 327 -124t126 -328.5t-127 -331.5t-328 -127h-326v-289h-200v1446zM397 465h295q131 0 206 75.5t75 207.5q0 129 -75 202.5t-204 73.5h-297v-559z" /> -<glyph unicode="ß" horiz-adv-x="1204" d="M156 0v1085q0 180 131 282.5t311 102.5q168 0 278.5 -95t110.5 -234q0 -68 -31.5 -126.5t-70.5 -93t-71 -77.5t-32 -84q0 -35 38 -72t92.5 -73.5t107.5 -78.5t91 -104.5t38 -134.5q0 -147 -102.5 -229t-247.5 -82q-84 0 -157 14t-103 29l-31 16v176q115 -63 266 -63 q74 0 123 36.5t49 110.5q0 55 -57.5 109.5t-126 94.5t-125.5 105.5t-57 139.5q0 57 32.5 110.5t70.5 89t70.5 86t32.5 99.5q0 66 -51 112.5t-143 46.5q-98 0 -168 -59t-70 -168v-1071h-198z" /> -<glyph unicode="à" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M264 1446h213l150 -260h-168zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="á" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM446 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="â" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M252 1186l180 260h207l180 -260h-174l-108 164h-5l-106 -164h-174zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="ã" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M193 1188q0 260 208 260q59 0 104.5 -35t82.5 -69.5t71 -34.5q41 0 60.5 40t19.5 93h144q0 -260 -209 -260q-59 0 -104.5 34.5t-82 69.5t-71.5 35q-80 0 -80 -133h-143zM272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197z" /> -<glyph unicode="ä" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM285 1239v207h164v-207h-164zM627 1239v207h164v-207h-164z" /> -<glyph unicode="å" horiz-adv-x="1081" d="M72 291q0 356 624 356h45v19q0 227 -227 227q-156 -2 -289 -100l-82 145q16 14 48 34.5t132.5 54.5t206.5 34q197 0 303.5 -104.5t106.5 -301.5v-655h-184v98l4 82h-4l-12 -22q-7 -14 -34.5 -49t-61.5 -62t-94 -49.5t-130 -22.5q-143 0 -247.5 84.5t-104.5 231.5z M272 301q0 -68 51.5 -117t143.5 -49q119 0 197.5 103.5t78.5 226.5v33h-51q-420 0 -420 -197zM362 1313q0 70 51.5 111.5t123 41.5t123 -42t51.5 -111q0 -68 -51.5 -110t-123 -42t-123 42t-51.5 110zM469 1313q0 -29 18.5 -48.5t49.5 -19.5q29 0 48 19.5t19 48.5 q0 33 -19.5 52t-47.5 19q-31 0 -49.5 -19t-18.5 -52z" /> -<glyph unicode="æ" horiz-adv-x="1769" d="M74 291q0 92 45 160.5t109.5 104.5t155.5 58.5t160.5 27.5t147.5 5h51v19q0 227 -233 227q-70 0 -140.5 -24.5t-107.5 -49.5l-37 -26l-80 145q6 4 17.5 13.5t48.5 29.5t78 36.5t105.5 30t129.5 13.5q260 0 344 -182h4q123 182 379 182q203 0 317.5 -142.5t114.5 -361.5 l-4 -59h-743q8 -170 103.5 -260.5t240.5 -90.5q80 0 156.5 30t113.5 61l37 28l82 -143q-16 -16 -49 -41t-137.5 -66t-212.5 -41q-154 0 -268.5 69t-178.5 192h-4q-10 -29 -32.5 -65t-67.5 -84t-121 -80t-170 -32q-150 0 -252 85.5t-102 230.5zM276 301q0 -70 50.5 -118 t144.5 -48q121 0 197.5 103.5t76.5 228.5v31h-96q-373 0 -373 -197zM944 647h539q-4 125 -74 190.5t-172 65.5q-117 0 -195 -64.5t-98 -191.5z" /> -<glyph unicode="ç" horiz-adv-x="1122" d="M84 518q0 231 156.5 387t398.5 156q115 0 212 -38t136 -77l41 -37l-94 -139q-12 12 -36 32.5t-98.5 53.5t-152.5 33q-156 0 -258 -104.5t-102 -264.5t103.5 -266.5t262.5 -106.5q86 0 166 35t117 70l37 35l80 -146l-17 -16q-10 -10 -47 -38t-79 -49.5t-108.5 -41 t-137.5 -21.5l-17 -77q66 -8 107 -47t41 -103q0 -88 -60.5 -130t-148.5 -42l-113 14v119q41 -14 86 -14q98 0 98 63.5t-108 63.5l-37 -2l41 162q-209 29 -339 176t-130 360z" /> -<glyph unicode="è" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM330 1446h213l149 -260h-168z" /> -<glyph unicode="é" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM514 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="ê" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM317 1186l181 260h207l180 -260h-174l-109 164h-4l-106 -164h-175z" /> -<glyph unicode="ë" horiz-adv-x="1136" d="M84 518q0 244 146.5 393.5t371.5 149.5q211 0 330 -137.5t119 -348.5l-7 -86h-755q8 -164 109.5 -253t246.5 -89q164 0 299 115l8 6l82 -145q-16 -16 -49 -41t-137.5 -66t-214.5 -41q-242 0 -395.5 155t-153.5 388zM295 639h553q-4 129 -75 196.5t-175 67.5 q-117 0 -200 -69.5t-103 -194.5zM350 1239v207h164v-207h-164zM692 1239v207h164v-207h-164z" /> -<glyph unicode="ì" horiz-adv-x="509" d="M-18 1446h213l149 -260h-168zM156 0v1036h198v-1036h-198z" /> -<glyph unicode="í" horiz-adv-x="509" d="M156 0v1036h198v-1036h-198zM168 1186l149 260h213l-196 -260h-166z" /> -<glyph unicode="î" horiz-adv-x="509" d="M-27 1186l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174zM156 0v1036h198v-1036h-198z" /> -<glyph unicode="ï" horiz-adv-x="509" d="M4 1239v207h164v-207h-164zM156 0v1036h198v-1036h-198zM346 1239v207h164v-207h-164z" /> -<glyph unicode="ð" horiz-adv-x="1206" d="M88 481q0 193 130 333t355 140q158 -2 252 -86h4q-61 164 -223 273l-370 -164l-21 127l254 113q-125 63 -264 94l55 162q238 -53 424 -164l285 125l18 -125l-188 -86q295 -246 295 -660q0 -109 -30 -209t-89.5 -187t-163.5 -139.5t-238 -52.5q-223 0 -354 150.5 t-131 355.5zM289 477q0 -135 76.5 -232.5t212.5 -97.5q80 0 142 34t98 91.5t54.5 122t18.5 133.5q0 117 -79 192t-210 75q-150 0 -231.5 -93.5t-81.5 -224.5z" /> -<glyph unicode="ñ" horiz-adv-x="1234" d="M156 1036h192v-137l-4 -76h4q41 88 139.5 163t249.5 75q356 0 357 -397v-664h-199v618q0 125 -41 193t-156 68q-117 0 -206 -71t-121 -183q-16 -55 -17 -140v-485h-198v1036zM297 1188q0 260 209 260q59 0 104 -35t82 -69.5t72 -34.5q41 0 60.5 40t19.5 93h143 q0 -260 -209 -260q-59 0 -104 34.5t-82 69.5t-72 35q-80 0 -80 -133h-143z" /> -<glyph unicode="ò" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM365 1446h213 l149 -260h-168z" /> -<glyph unicode="ó" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM551 1186 l149 260h213l-196 -260h-166z" /> -<glyph unicode="ô" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM356 1186 l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" /> -<glyph unicode="õ" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM295 1188 q0 260 209 260q59 0 104 -35t82 -69.5t72 -34.5q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 34.5t-82 69.5t-72 35q-80 0 -80 -133h-143z" /> -<glyph unicode="ö" horiz-adv-x="1277" d="M80 520.5q0 233.5 161.5 387t397 153.5t397.5 -153.5t162 -387t-163 -389.5t-396 -156t-396 156t-163 389.5zM283 520q0 -160 104.5 -266.5t251.5 -106.5q150 0 253 105.5t103 267.5q0 160 -103.5 264.5t-252.5 104.5q-147 0 -251.5 -104.5t-104.5 -264.5zM387 1239v207 h164v-207h-164zM729 1239v207h164v-207h-164z" /> -<glyph unicode="÷" horiz-adv-x="1300" d="M133 504v160h1034v-160h-1034zM553 90v186h192v-186h-192zM553 891v186h192v-186h-192z" /> -<glyph unicode="ø" horiz-adv-x="1277" d="M80 520q0 233 161.5 387t397.5 154q147 0 276 -68l82 113l97 -70l-80 -110q184 -158 184 -406q0 -233 -163 -389t-396 -156q-137 0 -262 60l-80 -113l-98 72l75 106q-194 158 -194 420zM283 520q0 -160 102 -266l426 592q-82 43 -172 43q-147 0 -251.5 -104.5 t-104.5 -264.5zM483 182q74 -35 156 -35q150 0 253 105.5t103 267.5q0 147 -92 250z" /> -<glyph unicode="ù" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM332 1446h213l149 -260h-168z" /> -<glyph unicode="ú" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM516 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="û" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM322 1186l180 260h207l180 -260h-174l-109 164h-4l-106 -164h-174z" /> -<glyph unicode="ü" horiz-adv-x="1224" d="M141 373v663h199v-618q0 -125 40 -191.5t155 -66.5q152 0 243.5 114.5t91.5 276.5v485h199v-1036h-192v137l4 76h-4q-39 -90 -140.5 -164t-240.5 -74q-355 1 -355 398zM354 1239v207h164v-207h-164zM696 1239v207h164v-207h-164z" /> -<glyph unicode="ý" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118zM440 1186l150 260h213l-197 -260h-166z" /> -<glyph unicode="þ" horiz-adv-x="1228" d="M156 1446h198v-471l-2 -86h4q2 2 19 22l29 36q13 15 43 38t61 38t77 26.5t97 11.5q209 0 335 -151.5t126 -391t-130 -391.5t-337 -152q-66 0 -124 17.5t-93 43t-59.5 50.5t-34.5 41l-11 18h-4q4 -37 4 -90v-465h-198v1856zM348 516q0 -162 81 -265.5t216 -103.5 q127 0 211 102.5t84 268.5q0 164 -80 267.5t-211 103.5q-129 0 -215 -92.5t-86 -280.5z" /> -<glyph unicode="ÿ" horiz-adv-x="1044" d="M4 1036h223l260 -678l39 -125h4q16 70 35 123l252 680h215l-485 -1222q-47 -117 -136 -180.5t-200 -63.5q-51 0 -101.5 16.5t-74.5 32.5l-25 14l70 152q57 -43 121 -43q123 0 186 152l51 118zM276 1239v207h164v-207h-164zM618 1239v207h164v-207h-164z" /> -<glyph unicode="Œ" horiz-adv-x="1966" d="M98 725q0 313 214 526t534 213q53 0 136 -9t116 -9h733v-176h-639v-453h520v-176h-520v-465h676v-176h-768q-33 0 -117 -9t-137 -9q-317 0 -532.5 214t-215.5 529zM307 725q0 -242 151.5 -404.5t387.5 -162.5q37 0 72.5 3t54.5 7l18 4v1102q-63 16 -145 16 q-236 0 -387.5 -162.5t-151.5 -402.5z" /> -<glyph unicode="œ" horiz-adv-x="2048" d="M82 516q0 240 160.5 392.5t392.5 152.5q301 0 448 -246h4q131 246 426 246q211 0 330 -137.5t119 -348.5l-6 -86h-756q12 -164 112.5 -253t243.5 -89q164 0 299 115l9 6l82 -145q-16 -16 -49 -41t-137.5 -66t-215.5 -41q-313 0 -452 252h-5q-145 -252 -452 -252 q-231 0 -392 150.5t-161 390.5zM285 516q0 -164 102 -266.5t251.5 -102.5t253 103.5t103.5 271.5q0 162 -104.5 264.5t-251.5 102.5t-250.5 -103.5t-103.5 -269.5zM1206 639h553q-4 127 -73.5 195.5t-174.5 68.5q-119 0 -202 -69.5t-103 -194.5z" /> -<glyph unicode="Ÿ" horiz-adv-x="1204" d="M16 1446h230l268 -475l88 -183h4q43 100 88 183l264 475h230l-483 -834v-612h-203v612zM344 1599v207h164v-207h-164zM686 1599v207h164v-207h-164z" /> -<glyph unicode="ˆ" horiz-adv-x="1021" d="M227 1546l181 260h206l181 -260h-174l-109 164h-4l-107 -164h-174z" /> -<glyph unicode="˜" horiz-adv-x="1021" d="M166 1548q0 260 209 260q59 0 104 -34.5t82 -69.5t72 -35q41 0 60.5 40t19.5 93h143q0 -260 -209 -260q-59 0 -104 35t-82 69.5t-72 34.5q-80 0 -80 -133h-143z" /> -<glyph unicode="–" horiz-adv-x="1445" d="M184 504v160h1078v-160h-1078z" /> -<glyph unicode="—" horiz-adv-x="1855" d="M184 504v160h1487v-160h-1487z" /> -<glyph unicode="‘" horiz-adv-x="464" d="M100 1069l136 399h145l-88 -399h-193z" /> -<glyph unicode="’" horiz-adv-x="448" d="M104 1071l89 399h192l-133 -399h-148z" /> -<glyph unicode="‚" horiz-adv-x="499" d="M86 -184l88 399h186l-133 -399h-141z" /> -<glyph unicode="“" horiz-adv-x="755" d="M100 1069l136 399h147l-88 -399h-195zM389 1069l135 399h148l-88 -399h-195z" /> -<glyph unicode="”" horiz-adv-x="737" d="M104 1071l89 399h194l-135 -399h-148zM393 1071l88 399h195l-133 -399h-150z" /> -<glyph unicode="„" horiz-adv-x="784" d="M86 -184l88 399h186l-133 -399h-141zM369 -184l88 399h188l-133 -399h-143z" /> -<glyph unicode="•" horiz-adv-x="841" d="M104 596q0 133 93.5 225t224.5 92t223 -93t92 -224t-92 -224t-223 -93t-224.5 92t-93.5 225z" /> -<glyph unicode="…" horiz-adv-x="1576" d="M156 0v211h202v-211h-202zM686 0v211h205v-211h-205zM1219 0v211h202v-211h-202z" /> -<glyph unicode="‹" horiz-adv-x="727" d="M90 578l336 421h199l-336 -421l336 -420h-199z" /> -<glyph unicode="›" horiz-adv-x="727" d="M102 158l336 420l-336 421h199l336 -421l-336 -420h-199z" /> -<glyph unicode="€" horiz-adv-x="1210" d="M78 528v129h112q-8 82 0 148h-112v131h137q61 236 251.5 385t440.5 149q51 0 102.5 -6t77.5 -12l27 -6l-49 -186q-76 23 -162 22q-170 0 -296 -94t-177 -252h576l-27 -131h-578q-12 -68 -2 -148h553l-26 -129h-492q47 -162 177 -261t300 -99q45 0 92.5 6t69.5 14l25 7 l39 -185q-98 -35 -230 -35q-258 0 -447.5 153t-246.5 400h-135z" /> -<glyph unicode="™" horiz-adv-x="1925" d="M47 1309v137h778v-137h-311v-764h-156v764h-311zM891 545l72 901h141l213 -471l29 -86h4q12 49 26 86l213 471h144l69 -901h-153l-43 538l2 62h-4l-195 -434h-125l-194 434h-5l2 -62l-43 -538h-153z" /> -<glyph unicode="" horiz-adv-x="1035" d="M0 1035h1035v-1035h-1035v1035z" /> -<glyph unicode="fi" horiz-adv-x="1198" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h634v-1036h-198v877h-436v-877h-197v877h-129zM842 1243v203h200v-203h-200z" /> -<glyph unicode="fl" horiz-adv-x="1230" d="M82 862v160h129v49q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-45h245v-160h-245v-862h-197v862h-129zM831 283v1163h199v-1129q0 -86 28.5 -116.5t82.5 -30.5l35 2v-176q-31 -4 -66 -4 q-279 0 -279 291z" /> -<glyph unicode="ffi" horiz-adv-x="1886" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h491v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5 t-59 -67.5t-22.5 -115v-31h635v-1036h-199v877h-436v-877h-197v877h-491v-877h-197v877h-129zM1530 1243v203h201v-203h-201z" /> -<glyph unicode="ffl" horiz-adv-x="1918" d="M82 877v159h129v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5t-59 -67.5t-22.5 -115v-31h491v35q0 98 28.5 171t69.5 113t98.5 63.5t101.5 30.5t91 7l76 -6v-170q-20 4 -51 4q-35 0 -67 -7t-68.5 -27.5 t-59 -67.5t-22.5 -115v-31h245v-159h-245v-877h-197v877h-491v-877h-197v877h-129zM1520 283v1163h198v-1129q0 -86 29 -116.5t82 -30.5l35 2v-176q-31 -4 -66 -4q-278 0 -278 291z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/museosans_500-webfont.ttf b/app/assets/fonts/museosans_500-webfont.ttf deleted file mode 100644 index 966dc3c2..00000000 Binary files a/app/assets/fonts/museosans_500-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/museosans_500-webfont.woff b/app/assets/fonts/museosans_500-webfont.woff deleted file mode 100644 index fdc5be7d..00000000 Binary files a/app/assets/fonts/museosans_500-webfont.woff and /dev/null differ diff --git a/app/assets/fonts/nothingyoucoulddo-webfont.eot b/app/assets/fonts/nothingyoucoulddo-webfont.eot deleted file mode 100755 index 902c2691..00000000 Binary files a/app/assets/fonts/nothingyoucoulddo-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/nothingyoucoulddo-webfont.svg b/app/assets/fonts/nothingyoucoulddo-webfont.svg deleted file mode 100755 index e8f819d4..00000000 --- a/app/assets/fonts/nothingyoucoulddo-webfont.svg +++ /dev/null @@ -1,242 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="nothing_you_could_doregular" horiz-adv-x="1074" > -<font-face units-per-em="2048" ascent="1638" descent="-410" /> -<missing-glyph horiz-adv-x="1344" /> -<glyph horiz-adv-x="2048" /> -<glyph horiz-adv-x="2048" /> -<glyph unicode="
" horiz-adv-x="1024" /> -<glyph unicode=" " horiz-adv-x="1344" /> -<glyph unicode="	" horiz-adv-x="1344" /> -<glyph unicode=" " horiz-adv-x="1344" /> -<glyph unicode="!" horiz-adv-x="664" d="M25 123q17 35 46 58t59 25t40 -36q8 -36 0 -77t-29 -66t-51 -22t-62 53q-20 30 -3 65zM170 762q-6 16 4 76t31 146t51 191t65 210t72 202t74 169t71 111t60 25q2 -14 -10 -85t-34 -174t-53 -228t-66 -245t-72 -224t-72 -166t-66 -70t-55 62z" /> -<glyph unicode=""" horiz-adv-x="710" d="M150 1383q0 53 2 89q0 28 8 32t21 -8t27 -34t27 -44t21 -39t8 -19q2 -32 3 -84t1 -102t-1 -86t-3 -38l-28 -28q-4 2 -13 9t-18 16t-16 17t-9 14q-12 34 -18 87t-9 109t-3 109zM434 1078v424q48 24 74 -1t36 -77t8 -122t-12 -134t-23 -113t-25 -61q-4 2 -16 13t-14 15 q-6 10 -17 31t-11 25z" /> -<glyph unicode="#" horiz-adv-x="1722" d="M44 424q-12 24 30 39t110 32t147 42t143 67t97 107t9 165q-26 2 -70 -5t-95 -16t-104 -15t-98 0t-76 27t-37 65q62 26 129 44t136 33t137 29t134 36l36 66t52 89t55 77t44 31t22 -47t-11 -160q78 -14 126 16t76 79t42 105t26 95t27 48t43 -33q20 -32 21 -66t-5 -69 t-13 -71t-3 -74q48 -4 115 -5t136 -1t131 1t102 -2t47 -11t-35 -23t-140 -40t-272 -61q-76 -16 -133 -70t-87 -115t-27 -115t49 -68q8 -4 57 4t115 19t139 19t130 5t87 -20t10 -57t-71 -57t-116 -23t-136 -5t-133 -5t-108 -22t-60 -56q-6 -28 -14 -92t-23 -136t-40 -135 t-63 -89q-4 2 -16 12t-14 16q-8 46 3 100t23 107t17 102t-13 87q-8 16 -21 23t-28 9t-32 0t-33 -4q-68 -10 -103 -39t-51 -69t-21 -86t-14 -89t-28 -81t-65 -60q-44 30 -52 71t-1 87t19 93t6 87q-6 0 -57 -6t-113 -5t-119 15t-77 54zM662 650q0 -18 1 -34t1 -22 q92 -14 142 10t75 72t37 115t28 141q-18 56 -46 63t-59 -16t-62 -66t-56 -87t-41 -79t-18 -41q0 -6 -1 -22t-1 -34z" /> -<glyph unicode="$" horiz-adv-x="1186" d="M42 480q0 34 30 56q10 0 38 4t60 9t60 10t38 7q8 2 23 6t28 8t24 8t11 6l142 396q10 30 -16 55t-67 51t-88 53t-79 61t-38 76t34 98q26 36 77 53t109 29t115 24t93 36q14 10 31 49t36 88t41 98t45 78t48 26t53 -57q12 -24 7 -52t-14 -58t-17 -60t-4 -56h254q6 0 16 -11 t12 -17q0 -6 1 -18t1 -26t-1 -26t-1 -16q-90 -6 -173 -17t-144 -44t-92 -98t-15 -179q186 -68 275 -130t106 -121t-23 -112t-112 -100t-161 -88t-168 -75t-136 -61t-63 -47l-112 -338q-2 -6 -18 -23t-35 -29t-37 -10t-24 32q-8 54 2 109t25 103t24 88t-4 66t-55 34t-132 -4 q-30 22 -30 56zM378 1249q14 -23 32 -35q70 -48 108 -41t50 40t2 76t-37 68t-66 17t-85 -76q-18 -26 -4 -49zM550 620q56 -10 119 9t121 54t107 80t77 85q-2 42 -30 76t-70 52t-93 15t-97 -33t-83 -91t-51 -161v-86z" /> -<glyph unicode="%" horiz-adv-x="820" d="M28 184q72 158 156 308t170 299t169 300t155 307q46 16 64 -1t20 -48t-8 -65t-18 -54q-66 -142 -140 -280t-151 -274l-154 -272t-149 -274q-28 -38 -48 -33t-36 33q-4 6 -16 27t-14 27zM28 184q72 158 156 308t170 299t169 300t155 307q46 16 64 -1t20 -48t-8 -65 t-18 -54q-66 -142 -140 -280t-151 -274l-154 -272t-149 -274q-28 -38 -48 -33t-36 33q-4 6 -16 27t-14 27zM164 1214q-16 48 8 68t56 15t52 -34t-4 -77q-10 -4 -27 -6t-34 0t-31 9t-20 25q-16 48 8 68t56 15t52 -34t-4 -77q-10 -4 -27 -6t-34 0t-31 9t-20 25zM566 300 q-16 48 8 67t56 14t52 -33t-4 -78q-10 -4 -27 -6t-34 0t-31 10t-20 26zM566 300q-16 48 8 67t56 14t52 -33t-4 -78q-10 -4 -27 -6t-34 0t-31 10t-20 26z" /> -<glyph unicode="&" horiz-adv-x="960" d="M47 521q-11 35 15 72t70 78t96 84t93 89t62 95t1 101q-30 -6 -63 -5t-64 11t-58 29t-41 49q-18 38 23 84t101 97t117 105t69 108q38 172 61 254t37 100t20 -15t9 -93t5 -134t10 -138q38 -18 76 4t76 52t78 52t82 4q14 -56 -12 -93t-71 -62t-99 -45t-97 -45t-63 -60t2 -89 q140 14 210 6t87 -32t-6 -62t-68 -86t-102 -104t-105 -114t-78 -117t-22 -115q14 2 55 2h86h85t56 -2q72 -6 78 -21t-28 -36t-93 -44t-118 -43t-104 -34t-47 -18q-24 -34 -32 -86t-11 -112t-3 -122t-8 -116t-28 -96t-58 -62l-58 58q-16 14 -19 53t1 91t13 111t17 114t13 99 t3 68q-124 30 -182 63t-69 68zM214 558q38 -6 69 -5t51 13t26 38t-4 68q-16 4 -32 0t-31 -13t-28 -20t-21 -23q-4 -6 -15 -28zM552 1010q22 -8 47 6t39 24h-86v-30z" /> -<glyph unicode="'" horiz-adv-x="528" d="M168 1116q0 32 1 60t3 40q0 2 6 23t15 48t19 54t16 43q28 74 47 91t30 -4t14 -72t-1 -111t-16 -122t-30 -105t-43 -59t-57 16q-2 10 -3 38t-1 60z" /> -<glyph unicode="(" horiz-adv-x="720" d="M73 638q7 168 47 342t97 332t124 287t131 206t115 91t77 -58q-82 -74 -167 -201t-156 -283t-120 -329t-61 -339t20 -313t124 -251q12 -14 51 -40t84 -57t88 -65t64 -67t11 -62t-70 -49q-4 -2 -15 -2t-15 2q-18 14 -58 53t-85 84t-85 86t-54 59q-88 108 -121 257t-26 317z " /> -<glyph unicode=")" horiz-adv-x="620" d="M46 -189q0 9 4 13q138 126 224 281t127 327t40 354t-36 364t-99 357t-150 331q-8 20 -3 47t31 37q140 -112 221 -281t115 -366t28 -406t-40 -401t-88 -352t-118 -259t-130 -121t-122 62q-4 4 -4 13z" /> -<glyph unicode="*" horiz-adv-x="1398" d="M44 389q-16 19 0 63q56 10 125 14t126 20t92 52t23 112q-6 36 -38 71t-65 69t-56 69t-9 73q28 12 57 7t55 -20t48 -34t36 -37q10 22 25 59t34 74t40 64t40 29t35 -29t24 -113q4 4 15 14t13 14q6 8 18 28t26 43t26 43t16 28q54 18 70 -5t8 -71t-32 -111t-48 -123t-42 -107 t-14 -65q82 -6 163 0t161 14t161 14t165 2q14 -30 -28 -52t-112 -39t-153 -31t-150 -29t-105 -33t-16 -42l254 -282v-58h-86l-338 312q-4 -48 2 -94t14 -91t13 -91t-1 -92h-86l-84 170q-8 16 -29 -7t-47 -57t-51 -64t-41 -29t-19 47t17 166q8 46 -12 66t-53 27t-72 8t-69 8 t-46 26z" /> -<glyph unicode="+" horiz-adv-x="862" d="M28 480q2 2 10 6t17 9t18 9t13 4q14 4 55 12t86 17l85 17t56 12l56 394q2 14 16 23t29 9t27 -8t12 -24v-366q14 0 50 -4t77 -9t77 -9t52 -6q6 -2 29 -13t27 -17q-26 -42 -71 -56t-92 -20t-88 -16t-61 -48q-24 -50 -20 -101t13 -102t10 -100t-29 -93q-4 2 -16 13t-14 15 q-24 36 -39 85t-23 101t-12 103t-10 93h-282z" /> -<glyph unicode="," horiz-adv-x="452" d="M-30 -364q-12 34 11 80t59 93t74 91t54 74q24 46 32 91t11 90t4 91t9 96q6 48 20 53t29 -18t29 -69t22 -99t5 -109t-19 -98q-4 -8 -20 -45t-40 -86t-54 -103t-64 -95t-68 -62t-66 -5q-6 2 -16 14t-12 16z" /> -<glyph unicode="-" horiz-adv-x="1244" d="M72 706q-32 32 4 62t115 55t189 43t227 28t229 8t195 -17t125 -45t18 -78q-26 0 -90 -4t-137 -8t-137 -8t-90 -6q-62 -6 -152 -30t-184 -40t-179 -12t-133 52z" /> -<glyph unicode="." horiz-adv-x="366" d="M63 100q1 36 17 66t43 50t57 24t58 -12t44 -58q16 -38 -4 -79t-54 -67t-74 -29t-64 33t-23 72z" /> -<glyph unicode="/" horiz-adv-x="776" d="M58 28q-16 96 8 229t73 284t117 311t139 311t138 281t117 224q26 18 45 8t29 -32t13 -49t-1 -41l-30 -66t-45 -100t-53 -117t-53 -117t-45 -100t-28 -64q-12 -24 -37 -85t-52 -129t-50 -128t-31 -82q-12 -34 -30 -106t-39 -153t-47 -158t-54 -121q-6 -8 -18 -17t-26 -12 t-25 2t-15 27z" /> -<glyph unicode="0" horiz-adv-x="1214" d="M66 431q18 133 72 280t133 284t177 253t204 187t215 85t209 -52q74 -50 92 -151t-8 -229t-88 -272t-147 -281t-184 -255t-201 -193t-198 -96t-172 37q-76 56 -99 163t-5 240zM156 264q0 -90 42 -152q38 -56 94 -50t121 58t137 138t141 190t131 216t111 214t79 183t34 125 q10 112 -15 164t-74 54t-117 -39t-144 -111t-154 -165t-147 -201t-124 -217t-85 -214t-30 -193z" /> -<glyph unicode="1" horiz-adv-x="692" d="M26 130q4 66 26 135t50 129t40 86q8 20 32 79t55 137t68 167t68 167t55 136t32 78q6 16 15 49t21 70t28 70t35 50t44 9t55 -52q2 -2 -19 -64t-57 -163t-83 -229t-97 -262t-98 -263t-87 -230t-65 -164t-32 -65q-4 -2 -25 8t-29 20q-36 36 -32 102z" /> -<glyph unicode="2" horiz-adv-x="1370" d="M57 84q7 30 29 58q94 112 189 216t183 212t166 223t140 251q32 72 26 106t-36 42t-78 -2t-99 -29t-98 -38t-76 -29t-34 -4t29 40q46 54 112 93t134 57t130 14t100 -38t43 -99t-41 -167q-54 -120 -135 -224t-167 -203t-165 -201t-127 -220q40 -12 124 11t189 60t219 77 t217 62t183 17t116 -57q4 -6 4 -29t-4 -29q-76 14 -181 -10t-223 -64t-242 -86t-237 -76t-207 -33t-154 43q-36 26 -29 56z" /> -<glyph unicode="3" horiz-adv-x="1298" d="M45 103q-3 11 2 22t25 17q26 8 58 4t66 -13t67 -17t63 -4q38 4 105 31t147 69t165 96t161 113t135 118t86 113t15 97t-80 71q-46 8 -118 -8t-152 -41t-160 -48t-140 -29t-92 14t-16 82q34 38 90 97t114 128t111 143t81 140q-2 0 -41 -11t-94 -24t-117 -23t-109 -10 t-68 15t5 53q4 8 52 36t116 61t147 64t147 44t114 1t48 -65t-49 -155t-179 -266v-86q200 16 313 -19t154 -100t19 -153t-92 -181t-182 -181t-250 -153t-295 -99t-317 -18q-4 2 -15 14t-13 16q-6 10 -15 22t-12 23z" /> -<glyph unicode="4" horiz-adv-x="1356" d="M46 791q6 65 37 139t79 153t96 157t90 151t62 135q58 14 83 0t29 -45t-9 -74t-33 -85t-40 -79t-30 -57q-12 -22 -40 -74t-59 -110t-59 -110t-40 -72v-58q60 -6 127 5t134 30t130 41t117 38q122 34 196 104t122 164t83 206t81 232q58 20 74 -14t5 -97t-39 -144t-57 -157 t-51 -134t-18 -76q40 16 82 1t60 -57q-16 -34 -49 -47t-71 -22t-75 -23t-59 -50q-52 -82 -89 -172t-67 -185t-53 -191t-45 -186q-8 -4 -21 -5t-27 2t-25 11t-13 22q-12 58 -2 115t30 114t45 114t45 113t28 111t-6 111q-52 8 -115 -9t-132 -42t-140 -50t-135 -34t-119 6 t-91 71q-32 48 -26 113z" /> -<glyph unicode="5" horiz-adv-x="1356" d="M44 142q0 8 22 9t56 -2t74 -10t78 -14t67 -11t41 -2q142 16 271 84t224 171t146 234t37 275q-38 76 -105 94t-147 2t-165 -55t-157 -76t-124 -63t-66 -16q-40 28 -51 57t-5 61t23 66t33 72q4 6 22 51t43 100t53 109t52 78q30 30 84 48t122 29t142 17t146 12t135 14 t107 22q60 20 85 -5t4 -65t-90 -80t-197 -50q-22 -2 -79 -5t-120 -8t-119 -8t-78 -5q-22 -18 -50 -48t-51 -64t-36 -72t-5 -70q58 -12 116 0t117 29t120 29t127 -2q128 -28 191 -94t73 -155t-27 -191t-109 -201t-173 -187t-218 -147t-245 -81t-254 10q-18 4 -42 12t-46 22 t-37 33t-15 47z" /> -<glyph unicode="6" horiz-adv-x="904" d="M45 355q-3 53 2 105t25 106q8 22 36 73t69 118t92 143t105 149t108 135t101 100t83 45t54 -31q6 -10 6 -42t-6 -42q-38 -36 -97 -90t-123 -121t-126 -141t-109 -150t-71 -150t-10 -138h28q204 108 336 142t205 16t92 -75t-2 -129t-77 -148t-134 -132t-172 -79t-192 9 q-24 8 -52 17t-55 22t-51 31t-38 44q-8 54 -16 107t-11 106zM226 208q-6 -38 42 -66q54 -32 117 -22t123 45t111 85t80 99t30 86t-37 45q-26 6 -80 -9t-118 -43t-125 -65t-99 -77t-44 -78z" /> -<glyph unicode="7" horiz-adv-x="1200" d="M67 1161q25 29 97 57t178 54t222 46t229 34t200 20t134 2t33 -18q-16 -34 -54 -118t-92 -195t-119 -240t-133 -253t-136 -233t-128 -181t-109 -97t-77 19q-2 4 -2 13t2 13q10 20 32 60t50 90t58 105t58 105t50 90t34 60q18 30 51 79t72 106t78 119t68 121t42 110t1 85 q-116 -30 -214 -54t-193 -39t-194 -20t-219 1q-44 30 -19 59z" /> -<glyph unicode="8" horiz-adv-x="1244" d="M40 205q6 53 31 104t55 87q20 20 68 73t102 111t102 110t68 72q22 56 2 110t-54 107t-67 108t-35 114t43 125t167 142q94 58 161 82t115 22t84 -28t67 -68t64 -95t75 -109q6 -8 24 -15t34 -16t26 -22t2 -33q-62 -40 -130 -89t-136 -103t-131 -113t-113 -119 q-22 -86 -6 -157t40 -132t42 -115t0 -107t-86 -107t-216 -116q-34 -14 -74 -22t-81 -9t-81 7t-76 24q-56 28 -74 76t-12 101zM154 154q0 -14 1 -26t1 -16q148 -28 242 4t145 94t66 140t6 143t-35 104t-58 23q-26 -24 -82 -74t-116 -110t-109 -124t-59 -114q0 -6 -1 -18 t-1 -26zM445 1163q-9 -85 51 -203q2 -6 10 -19t17 -26t16 -25t11 -14q4 -4 15 -4t15 4q16 12 56 44l85 68t85 69t56 45q6 6 16 15t19 18l16 16t7 9v224q0 28 -48 40t-115 4t-138 -38t-118 -86t-56 -141z" /> -<glyph unicode="9" horiz-adv-x="974" d="M42 849q-8 53 18 114t79 122t125 111t156 82t171 34t172 -33t157 -119q4 -14 -17 -76t-58 -152t-87 -199t-105 -218t-110 -208t-104 -169t-86 -103t-57 -7q-8 44 -7 79t10 67t23 65t32 73l254 508v28q-44 14 -85 5t-82 -29t-82 -44t-83 -39t-86 -13t-90 34q-50 34 -58 87 zM156 876q74 -18 160 2t168 64t152 102t114 116q-24 50 -71 59t-103 -8t-117 -54t-116 -79t-97 -82t-62 -64q-4 -4 -15 -27t-13 -29z" /> -<glyph unicode=":" horiz-adv-x="312" d="M67 114q15 22 43 29t58 0t42 -31q22 -42 9 -71t-40 -38t-59 4t-50 51q-18 34 -3 56zM69 789q-3 29 11 50t41 26t61 -17q32 -22 36 -55t-11 -57t-45 -29t-64 29q-26 24 -29 53z" /> -<glyph unicode=";" horiz-adv-x="438" d="M-44 -398q0 10 4 12q72 90 119 162t73 147t33 162t-1 207q12 8 27 1t28 -19t22 -24l9 -12q46 -60 48 -149t-22 -181t-68 -176t-94 -136t-97 -60t-77 52q-4 4 -4 14zM96 887q0 23 4 29h112v-114q-18 -10 -35 -7t-32 12t-27 23t-18 28q-4 6 -4 29z" /> -<glyph unicode="<" horiz-adv-x="1160" d="M32 818q4 40 54 86q22 20 68 62t105 95t123 111t123 111t105 95t68 62q12 4 35 0t41 -16t24 -29t-14 -39l-536 -536q-18 -18 -8 -44t36 -57t62 -62t70 -56t61 -43l33 -22q22 -16 68 -47t104 -70t123 -82t123 -82t105 -69t69 -44q26 -32 30 -63t-8 -51t-40 -22t-66 22 q-202 132 -407 268t-385 298q-40 36 -81 72t-65 74t-20 78z" /> -<glyph unicode="=" d="M58 58q-16 22 19 41t95 34t136 27t143 20t116 13t55 5q20 0 73 1t111 1t110 -1t74 -1q14 -8 25 -23t3 -33q-94 -12 -215 -32t-241 -41t-225 -40t-167 -29q-22 -4 -37 -3t-27 7t-23 19t-25 35zM198 620q16 30 72 55t134 40t166 21t168 -1t140 -28t82 -57q-10 -12 -68 -25 t-139 -24t-175 -18t-175 -6t-138 10t-67 33z" /> -<glyph unicode=">" horiz-adv-x="862" d="M70 1384q0 6 7 15t16 18t18 16t15 7q54 -42 136 -94t170 -114t168 -131t128 -143t51 -152t-61 -156q-20 -26 -58 -71t-84 -100t-95 -114t-92 -110t-76 -90t-45 -53l-22 -22l-34 -34t-35 -34t-23 -22q-4 2 -12 10l-17 17t-17 18t-10 13q-24 48 10 108t99 127t146 139 t148 144t108 141t25 131q-2 6 -46 42t-109 88t-139 113t-136 119t-101 104t-33 70z" /> -<glyph unicode="?" horiz-adv-x="1370" d="M160 682q-14 52 26 117t113 138t171 150t202 154t204 151t178 141t124 123t43 97t-66 64t-205 23h-678q-18 40 -3 76t61 36h706q62 0 136 -35t127 -91t66 -127t-47 -141q-76 -90 -168 -161t-191 -135t-201 -124t-195 -128t-175 -148t-142 -180q-8 -10 -20 -19t-26 -11 t-25 4t-15 26zM164 180q18 56 37 56t34 -30t22 -74t4 -75t-19 -36t-48 45q-18 26 -29 54t-1 60z" /> -<glyph unicode="@" horiz-adv-x="1668" d="M59 697q21 157 79 315t146 307t191 267t214 195t218 91t202 -46t163 -216q32 -74 52 -154t20 -161t-24 -159t-76 -146q-38 -50 -87 -104t-107 -97t-123 -68t-135 -15q-28 4 -72 1t-91 -7t-88 -4t-59 10q-76 38 -101 91t-14 112t50 119t92 111t113 89t113 52t92 0t49 -66 q8 -42 0 -90t-24 -97t-34 -95t-26 -84q10 -20 24 -26t30 -3t31 11t29 18q88 58 151 122t102 139t53 163t4 196q-14 152 -77 214t-154 56t-200 -73t-213 -175t-194 -248t-144 -293t-61 -310t55 -299q52 -124 126 -180t161 -62t184 30t196 96t198 135t188 148t167 134t136 95 q14 -92 -42 -187t-156 -181t-230 -160t-264 -122t-258 -65t-210 7q-156 46 -242 146t-115 233t-8 290zM506 890q0 -32 4 -42q48 -28 82 4t58 87t38 112t18 79q-34 20 -67 -2t-60 -59t-45 -78t-24 -59q-4 -10 -4 -42z" /> -<glyph unicode="A" horiz-adv-x="2118" d="M-254 -366q2 16 28 16q40 -54 104 -57h11q60 0 131 30q78 33 163 95t167 136t157 154t132 151t91 124t34 73q0 8 -21 24t-46 33t-48 32t-27 23q8 24 48 39t90 26t98 22t74 27q88 128 161 238t136 212t122 199t120 200t127 216t146 245q24 41 42 41q5 0 10 -4 q20 -17 31 -84t13 -172q1 -42 1 -86q0 -67 -2 -139q-3 -120 -9 -244t-11 -229t-9 -181q-3 -51 -3 -78q0 -14 1 -22q8 -126 12 -220t25 -173t69 -153t148 -160q-37 -12 -69 -12q-37 0 -66 17q-53 31 -87 94t-55 147t-41 162t-43 138t-63 76q-4 0 -15 1t-24 1t-26 -1t-19 -1 q-14 -4 -47 -11t-77 -18t-93 -23t-95 -24t-83 -21t-57 -15q-62 -16 -131 -79t-145 -152t-157 -194t-166 -205t-173 -186t-176 -137t-176 -58q-9 -1 -19 -1q-78 0 -155 52q-8 6 -24 24t-26 37q-8 16 -8 30v5zM1160 638q6 -2 27 -2t27 2q44 6 112 16t137 24t126 33t79 41l7 52 t17 133t21 181t21 195t17 176t9 125q-4 2 -8 2q-25 0 -64 -65q-46 -75 -117 -208t-172 -310t-239 -365v-30z" /> -<glyph unicode="B" horiz-adv-x="1794" d="M50 175q0 45 23 100t53 127q6 14 28 61t52 109t62 132t62 132t51 108t29 62q28 64 28 113v12q-4 53 -12 99q-6 37 -6 74v18q2 46 46 104q6 8 31 35t54 58t54 58t31 33q14 16 72 50t143 76t188 85t206 76t198 52q67 13 120 14q22 0 42 -3q67 -8 98 -48q18 -23 18 -61 q0 -27 -9 -61q-26 -90 -72 -165t-104 -138t-121 -117t-120 -99t-105 -85t-74 -76q240 -8 375 -50t187 -109q37 -48 37 -105q0 -23 -6 -47q-21 -85 -93 -176t-186 -184t-249 -175t-280 -147t-280 -103t-250 -42h-21q-101 0 -166 36q-74 42 -104 82t-30 85zM214 226 q2 -58 37 -95t107 -44q12 -1 26 -1q67 0 166 28q266 60 462 152t324 194t190 202q58 94 58 167v9q-4 76 -72 117q-48 29 -127 29q-33 0 -71 -5q-130 -17 -322 -103t-442 -264q-28 -22 -50 -21t-42 10t-38 16t-38 -5q-48 -56 -88 -125t-61 -136q-19 -61 -19 -115v-10z M436 769q0 -17 1 -32t1 -21q20 4 83 47t151 110t193 154t211 180t202 187t167 176t107 146q25 44 25 74q0 13 -5 24q-40 6 -81 6q-73 0 -150 -18q-121 -28 -237 -83t-216 -127t-168 -140q-10 -22 -29 -67t-44 -102t-53 -120t-53 -120t-45 -102t-30 -67q-2 -4 -14 -26 t-14 -26q0 -6 -1 -21t-1 -32z" /> -<glyph unicode="C" horiz-adv-x="1582" d="M12 320q-3 27 -3 55q0 70 21 147q30 108 89 223t142 232t177 228t193 212t191 184t170 144t130 93q90 54 150 54t96 -37t50 -101q13 -60 13 -126v-10q-1 -72 -15 -143t-35 -124t-45 -77t-46 -2q-2 20 5 62t18 93t22 106t15 102q1 17 1 32q0 26 -4 47q-7 32 -29 38 q-23 6 -48 6q-53 0 -116 -26q-92 -38 -195 -116t-209 -188t-205 -236t-184 -260t-144 -260t-87 -236q-19 -73 -18 -132q0 -30 4 -56q14 -78 78 -116q43 -26 114 -26q34 0 74 6q94 14 179 56t165 100t155 126t150 133t152 120t159 89q15 6 29 6q25 0 43 -20q19 -20 19 -45 q0 -13 -5 -27q-14 -42 -89 -112t-183 -147t-238 -153t-254 -131t-230 -79q-53 -12 -94.5 -12t-71.5 12q-122 48 -183 123t-73 169z" /> -<glyph unicode="D" horiz-adv-x="2058" d="M58 28q-6 17 -6 32q0 19 10 35q18 29 52 47q156 78 304 131t292 107t287 121t289 171q262 152 425 288t245 253t93 214q2 20 2 39q0 74 -34 133q-43 75 -129 125t-199 74q-94 20 -199 20q-22 0 -44 -1q-130 -5 -259 -40t-247 -103t-208 -172q-2 -4 -7 -17t-9 -27t-8 -27 t-4 -15q-50 -120 -95 -216t-88 -180t-82 -162t-75 -163t-70 -185t-66 -228q-20 -6 -35 -6q-18 0 -29 9q-20 17 -22 53v11q0 32 9 73q11 48 26 93t30 82t21 53q20 56 63 149t90 192t89 191t64 150q-13 44 -13 82q0 24 5 47q14 57 50 103t85 85t99 77q142 104 307 162t337 64 q18 1 37 1q153 0 304 -45q169 -50 319 -164q120 -100 141 -217q6 -33 6 -66q0 -86 -39 -175q-54 -124 -171 -252t-272 -251t-336 -236t-362 -209t-352 -169t-305 -116t-219 -52q-17 -2 -31 -2q-56 0 -66 29z" /> -<glyph unicode="E" horiz-adv-x="1864" d="M44 58q-5 5 -5 10q0 8 13 18q24 90 52 173t58 164t63 164t71 175q12 24 -5 48t-37 48t-30 49t18 53q2 2 19 7t36 9t36 8t21 6t12 9t17 16l17 17t10 12q38 68 75 121t68 105t58 110t45 136q8 30 -14 38t-49 16t-46 24q-10 9 -10 26q0 15 7 36q10 28 96 60t219 62t297 55 t329 40t316 18q27 1 52 1q118 0 204 -12q105 -14 149 -48q22 -17 22 -39q0 -23 -24 -53q-22 -6 -46 -1t-49 12t-51 13t-52 4q-100 -8 -197 -8h-39q-116 2 -230 2t-229 -9t-231 -41q-80 -22 -142 -79t-119 -143t-114 -199t-125 -247q7 -2 17 -2q30 0 87 14q76 18 175 43 t208 52t206 38q48 6 90.5 5.5t79.5 -5.5q73 -11 97 -59q2 -4 2 -14t-2 -14q-132 -20 -273 -36t-280 -40t-272 -65t-249 -113q-96 -168 -171 -345t-133 -361q72 26 168 50t185 43t156 32t79 15q212 34 409 53q113 11 232 11q87 0 177 -6q18 -4 25 -20t9 -34t0 -35t-4 -25 q-78 4 -156 4q-194 0 -385 -25q-267 -35 -535 -93q-42 -10 -103 -34t-125 -44t-123 -27q-13 -1 -24 -1q-43 0 -75 20q-10 4 -17 11t-11 21z" /> -<glyph unicode="F" horiz-adv-x="1860" d="M38 99q6 37 21 74t34 72t33 67q12 24 40 88t60 136t60 136t40 90q14 32 -4 55t-40 45t-33 45t19 53q18 18 46 23t57 9t55 14t40 38l284 542q-14 50 -14 88q0 12 2 24q6 44 30 77t64 61t88 62q128 20 254 38t252 30t254 16q51 2 103 2q77 0 155 -4q14 -2 37 -21t38 -43 q14 -22 14 -43q0 -25 -35 -33q-4 0 -16 4t-26 9t-27 10t-15 5q-200 0 -347 -5t-256 -21t-187 -48t-140 -89t-116 -142t-112 -207l-17 -30t-35 -71t-30 -84q-7 -26 -7 -45q0 -13 3 -24q60 -10 121 -10q34 0 68 3q95 9 191 32t193 53t194 54t195 37q51 7 102 7l94 -6v-58 q0 -4 -54 -14t-143 -27t-205 -41t-241 -55t-249 -69t-229 -84t-182 -101t-109 -117q-82 -162 -153 -334t-131 -344q-16 -22 -43 -28q-4 -1 -8 -1q-21 0 -31 29q-8 23 -8 47q0 12 2 24z" /> -<glyph unicode="G" horiz-adv-x="1520" d="M10 493q14 141 74 294t149 301t200 281t228 235t231 163t208 65q21 6 42 6l50 -8q46 -14 83 -46t63 -74t32 -84q2 -11 2 -21q0 -30 -13 -56q-17 -35 -63 -53q-10 -6 -25 -6t-15 6v196q0 6 -12 12t-29 10t-34 6t-27 0q-246 -62 -423 -210t-293 -350q-166 -292 -243 -487 t-86 -311q-1 -18 -1 -34q0 -89 42 -128q45 -41 119 -41h17q86 5 198 51t228 116t226 153t192 161t127 142q33 47 33 76q0 10 -4 18q-13 2 -28 2q-28 0 -60 -8q-48 -12 -82 -22l-84 -28t-128 -42t-128 -43t-84 -29q-36 -12 -59 7t-31 46t-1 55t35 34q30 6 96 28t152 53 t186 65t197 64t184 51t146 23h10q51 0 75 -18q13 -10 13 -27.5t-13 -42.5q-24 -24 -83 -85t-127 -129t-128 -127t-86 -83q-6 -6 -30 -26t-58 -49t-74 -62t-78 -66t-72 -61t-56 -44q-32 -28 -83 -70t-112 -86t-128 -83t-135 -61t-132 -22t-116 38q-110 82 -149 203 q-29 89 -29 189q0 36 4 73z" /> -<glyph unicode="H" horiz-adv-x="1772" d="M67 148q7 82 33 185t65 218t79 218t74 185t50 120q16 40 45 107t63 150t72 172t72 172t62 150t46 107q25 8 42 8q20 0 30 -11q12 -15 12 -43q0 -13 -2 -28q-8 -50 -35 -121t-64 -152t-76 -166t-70 -162t-47 -140q-11 -42 -11 -72q0 -15 3 -27q24 -3 52 -3q24 0 51 2 q59 5 121 15t121 22t105 20q150 26 260 65t191 94t140 127t109 165t98 205t108 248q17 36 33 36q3 0 5 -1q18 -7 30 -35t16 -64q2 -18 2 -30.5t-2 -19.5q-2 -6 -15 -31t-27 -54t-27 -53t-15 -30q-4 -10 -12 -34l-17 -51t-18 -52t-11 -33q10 -4 32 -26t26 -32q1 -8 1 -16 q0 -37 -29 -82q-36 -54 -87 -111t-100 -112t-67 -103q-102 -250 -176 -499t-108 -517q-8 -14 -23 -26q-8 -7 -17 -7q-8 0 -16 5q-1 12 -1 26q0 49 11 125q14 97 37 210t50 231t50 216t38 163t13 73q-32 6 -77 6q-27 0 -57 -2q-82 -6 -180 -22t-204 -39t-204 -48t-183 -49 t-139 -42q-44 -94 -72 -208t-55 -229t-63 -222t-94 -189q-4 2 -15 13t-13 15q-20 30 -20 87q0 16 1 33z" /> -<glyph unicode="I" horiz-adv-x="550" d="M27 134q3 32 10 64t13 56t8 28l564 1470q12 30 22 34q2 1 5 1q7 0 14 -10q9 -13 15 -38t9 -54q2 -17 2 -34q0 -11 -1 -23q-2 -28 -10 -46q-80 -190 -161 -380t-156 -384t-139 -391t-110 -399q-15 -10 -29 -10h-4q-15 2 -25 13t-17 26t-9 27q-2 10 -2 25q0 11 1 25z" /> -<glyph unicode="J" horiz-adv-x="1554" d="M7 362q-2 15 -2 29q0 28 9 50q14 33 58 39q2 -34 8 -89t23 -108t50 -94t89 -47q22 -1 44 -1q96 0 175 29q97 36 174 105t136 164t106 204t84 226t68 230t59 216t58 183q11 42 11 71q0 19 -5 33q-12 34 -45 43q-16 4 -35 4q-22 0 -49 -5q-51 -10 -109 -30t-121 -43 t-120 -39t-104 -20q-9 -1 -16 -1q-36 0 -59 15q-39 26 -39 51q0 9 4 17q17 34 83 65t169 59t222 53t243 45t232 36t189 26t113 14q42 6 118 15l152 18t137 16t73 7q46 4 118 6t140 2t117 -2t49 -6l28 -84q-66 -4 -182 -7t-254 -11t-284 -22t-274 -38t-226 -60t-136 -88 q-20 -58 -48 -171t-68 -257t-91 -305t-115 -314t-142 -284t-171 -214t-202 -106q-29 -6 -59 -6q-84 0 -178 47q-26 12 -59 49t-63 85t-53 101t-30 99z" /> -<glyph unicode="K" horiz-adv-x="1988" d="M48 0q-1 5 -1 12q0 26 13 73q16 59 47 142t69 175t79 184t77 169t61 131t31 70q60 142 123 261t125 234t119 235t109 264q16 10 30 10q5 0 10 -1q18 -5 30 -21t17 -36t-1 -36q-16 -32 -47 -95t-65 -132t-64 -133t-46 -96q-2 -6 -8 -20t-11 -31t-9 -34t0 -29q26 -6 57 -6 q53 0 122 17q109 27 236 80t263 122t259 137t225 126t164 88q40 20 53 17q9 -2 9 -12q0 -4 -1 -9q-5 -18 -24 -46t-45 -57t-54 -53t-50 -36q-24 -14 -75 -40t-105 -53t-100 -49t-60 -28q-66 -30 -169 -67t-215 -80t-220 -91t-186 -100l-12 -9t-24 -22t-20 -28t0 -27 q38 -24 116 -90t175 -159t206 -206t211 -228t188 -225t137 -199t58 -148q1 -7 1 -13q0 -48 -48 -60q-4 2 -14 13t-14 15q-78 126 -157 232t-164 205t-180 198t-205 213q-158 164 -261 245t-172 92q-12 2 -24 2q-53 0 -90 -41q-45 -50 -87 -149t-90 -239t-122 -306 q-12 -26 -26 -58t-31 -63t-38 -59t-47 -46q-34 -22 -38 4z" /> -<glyph unicode="L" horiz-adv-x="1752" d="M40 110q2 26 12 56t22 58q30 66 82 142q78 152 142 274t120 229t106 207t101 209t106 235t121 286q6 10 18 28t27 29q11 8 24 8q5 0 9 -1q18 -4 36 -36q13 -27 13 -64q0 -33 -10 -74q-21 -88 -73 -201t-126 -244t-153 -266t-157 -267t-136 -248t-90 -209 q-24 -71 -24 -120q0 -15 2 -29q79 -7 159 -8q99 0 199 12q180 20 360 48t361 51q119 15 237 15q62 0 124 -4q32 2 55 -25q12 -14 12 -30q0 -14 -9 -29q-6 0 -22 1t-34 1t-34 -1t-22 -1q-92 -8 -208 -25t-244 -37t-263 -40t-267 -33t-257 -16q-25 -1 -49 -1q-97 0 -184 10 q-4 0 -25 11t-29 17q-20 12 -27 34q-5 17 -5 37v11z" /> -<glyph unicode="M" horiz-adv-x="2534" d="M85 113q9 71 48 182t102 252t137 292t152 300t147 277t122 225t79 141q39 -14 71 -14q11 0 21 2q40 6 75 26t69 48t76 52q80 48 130 48q6 0 12 -1q52 -7 76 -56t25 -130v-12q0 -76 -12 -163q-13 -94 -34 -193t-41 -182t-33 -142q-11 -51 -11 -70v-5q20 -10 33 3t23 25 q8 12 37 47t66 81t80 99t81 99t66 81t38 47q218 172 368 255t244 93q15 2 28 2q73 0 109 -46q43 -54 46 -156v-18q0 -96 -29 -224q-32 -140 -88 -302q-8 -22 -30 -94t-51 -168t-61 -204t-61 -204t-51 -168t-28 -94q0 -2 -6 -32t-16 -71t-27 -88t-39 -84t-50 -57 q-18 -12 -37 -12q-12 0 -25 4q-4 2 -14 12t-12 16q-2 2 -2 14t2 16l10 30t17 53t18 54t11 31q48 154 88 286t76 253t68 236t65 237t67 256t74 292q2 8 2 29t-2 27q-33 11 -68 11q-43 0 -89 -17q-83 -30 -170 -97t-177 -162t-175 -198t-165 -205t-147 -185t-121 -137t-88 -62 q-10 -2 -25 0t-29 7t-23 11t-9 12v170q6 28 20 88t30 135t35 158t35 158t30 134t20 89q12 58 24 112q7 32 7 67q0 23 -3 47q-21 7 -42 7q-41 0 -85 -25q-67 -38 -137 -118t-142 -193t-143 -244t-140 -271t-132 -274t-120 -252t-104 -206t-83 -136q-31 -41 -51 -41q-3 0 -7 1 q-27 9 -27 56q0 12 2 27z" /> -<glyph unicode="N" horiz-adv-x="2074" d="M26 28q0 22 2 30q16 78 60 172t96 187t103 177t81 142q14 30 46 91t70 139t81 164t83 164t70 140t46 92q53 55 93 55q4 0 8 -1q43 -6 78 -61t62 -148t53 -208t52 -241t57 -245t70 -223t91 -172q8 -4 17 -4q27 0 61 36q46 48 101 139t116 215t122 259t119 271t106 253 t85 204t57 123q17 31 35 31h1q18 -1 32 -20t20 -48q3 -12 3 -24q0 -15 -5 -27q-80 -218 -150 -392t-144 -337t-158 -332t-192 -375q-40 -48 -78 -77t-76 -32h-8q-34 0 -69 23q-39 26 -79 86q-82 146 -130 275t-81 256t-60 259t-67 284q-16 10 -51 -26t-81 -104t-100 -160 t-109 -194t-109 -204t-99 -191t-79 -155t-50 -96q-12 -22 -32 -56t-38 -65t-32 -54l-14 -23h-84q-2 6 -2 28z" /> -<glyph unicode="O" horiz-adv-x="1318" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69q28 4 56 4q67 0 131 -21q90 -29 164 -96t113 -169q34 -88 34 -202q0 -18 -1 -36q-6 -136 -75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71 t-154 -33q-11 -1 -22 -1q-66 0 -124 26q-84 36 -128 90t-59 120q-9 41 -9 85q0 27 3 54zM156 226q26 -114 95 -141q29 -11 63 -12q46 0 101 22q95 37 208 128t225 212t215 263t178 282t115 268q30 97 30 173q0 25 -3 48q-13 93 -90 141q-54 34 -148 34q-39 0 -85 -6 q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270q-28 -85 -27 -159q-1 -38 7 -73z" /> -<glyph unicode="P" horiz-adv-x="1520" d="M55 169q19 69 52 144t71 145t56 114q8 14 11 25t7 23t10 28t18 42q16 32 49 101t75 155t88 181t88 182t75 155t49 102v56q-18 3 -35 3q-26 0 -51 -7q-42 -12 -81 -35t-75 -52t-68 -51q-34 8 -39 32t5 52t29 52t33 34q262 162 559 217q162 30 326 30q137 0 275 -21 q184 -94 252 -198q53 -81 53 -164q0 -23 -4 -47q-19 -107 -110 -212t-225 -201t-295 -178t-320 -143t-301 -94t-238 -33q-48 -76 -77 -125t-47 -85t-29 -67t-23 -70t-29 -94t-47 -137l-28 -28q-10 4 -31 26t-25 32q-12 23 -12 53q0 26 9 58zM480 748q45 -8 93 -8 q64 0 131 14q118 24 234 69t223 101t193 104q210 118 314 229t127 207q8 33 8 63q0 58 -29 108q-44 75 -130 121t-200 58q-33 3 -65 3q-82 0 -165 -21q-116 -30 -222 -107t-174 -209q-26 -50 -61 -118t-72 -143t-74 -149t-66 -133t-47 -96t-18 -39v-54z" /> -<glyph unicode="Q" horiz-adv-x="1482" d="M168 328v11q0 125 44 259q46 140 128 283t173 273t179 237t146 175q38 46 85 106t101 117t113 104t125 69q6 2 12 2q13 0 26 -10q18 -14 33 -35t25 -42t16 -27q114 -136 160 -297q38 -132 38 -269q0 -30 -2 -60q-10 -168 -69 -334t-153 -310q-6 -10 -26 -36t-46 -61 t-56 -74t-56 -74t-46 -61t-26 -34q-42 -60 -48 -120q-2 -17 -2 -34q0 -43 11 -85q15 -59 43 -116t51 -112t35 -108q5 -23 5 -45q0 -29 -9 -58q-10 -4 -17 -4q-11 0 -18 7q-13 13 -23 25q-32 42 -55 109t-46 136t-52 126t-73 79q-16 8 -54 -5t-91 -32t-117 -35 q-51 -13 -104 -13q-14 0 -27 1q-67 4 -133 35t-122 107q-76 100 -78 230zM302 156q4 -6 15 -19t25 -26t27 -25t19 -16q95 -63 171 -63q9 0 17 1q82 8 144 66t105 151t70 192t40 189t15 142q4 2 20 3t34 -2t32 -9t14 -20v-282q86 62 158 155t126 199t87 219t39 217 q4 65 4 122q0 126 -19 208q-27 118 -81 160q-33 26 -75 26q-27 0 -56 -10q-77 -26 -165 -101t-182 -188t-183 -248t-166 -282t-133 -286t-84 -262q-21 -91 -21 -162q0 -26 3 -49z" /> -<glyph unicode="R" horiz-adv-x="1718" d="M44 28q-6 17 -6 40q0 35 13 83q21 81 66 185t106 224t126 240t128 235t110 208t74 156q21 49 21 72q0 7 -2 11q-11 4 -23 4q-20 0 -41 -11l-68 -34t-66 -21h-6q-28 0 -50 34q-12 18 -8 35t14 32t24 27t24 18q286 186 542 291t459 143q129 24 231 24q60 0 111 -8 q139 -22 192 -91q28 -37 28 -85q0 -42 -21 -93q-46 -109 -213 -244t-468 -289t-757 -314q-9 -15 -9 -33q0 -27 23 -58q38 -51 115 -108t180 -120t209 -127t203 -125t160 -117t81 -103q5 -12 5 -23q0 -32 -39 -58q-2 -2 -31 19t-71 55t-91 73t-92 75t-74 61t-37 29 q-150 96 -301 188t-293 208q-8 3 -17 3q-26 0 -53 -27q-36 -36 -71 -99t-69 -145t-66 -164t-61 -154t-55 -116t-48 -50q-2 -1 -5 -1q-19 0 -33 45zM640 1070q25 -8 58 -8q39 0 90 11q94 21 208 68t237 114t236 141t207 149t147 139q57 69 57 113q0 40 -62 53h-61 q-231 0 -399 -27q-190 -31 -326 -116t-228 -232t-164 -375v-30z" /> -<glyph unicode="S" horiz-adv-x="1536" d="M26 170q-4 8 -4 16q0 22 36 40q28 -26 76 -61t94 -53q74 -3 147 -3q61 0 120 2q131 5 254 32t240 81t225 142q124 102 162 188q23 53 23 101q0 30 -9 59q-24 74 -98 138t-174 120t-215 105t-221 96t-190 92t-124 91q-2 7 -2 14q0 37 44 85q52 57 144 119t213 122t247 111 t245 85t208 43q26 3 48 3q55 0 90 -16q37 -17 37 -56q0 -13 -4 -28q-18 -4 -91 -23t-176 -50t-225 -71t-239 -84t-216 -89t-158 -86q-64 -45 -65 -82q0 -33 68 -55q292 -88 483 -185t297 -198t138 -202q18 -56 17 -109q0 -44 -11 -86q-26 -94 -100 -179t-178 -154t-229 -118 t-253 -72q-98 -18 -193 -18q-29 0 -58 2q-123 7 -221 49q-12 4 -58 27t-87 53t-57 62z" /> -<glyph unicode="T" horiz-adv-x="1394" d="M44 1272q16 34 127 76t282 88t383 93t432 90t429 78t374 58t267 31q37 3 61 3q42 0 45 -9q5 -15 5 -32q0 -8 -1 -17q-4 -27 -32 -35q-124 -20 -266 -44t-288 -50t-287 -53t-261 -51q-76 -16 -149 -91t-141 -186t-130 -248t-117 -276t-103 -269t-88 -229t-70 -154 q-25 -47 -44 -47q-3 0 -6 2q-6 4 -16 14t-12 14q-8 30 -8 65q0 37 9 78q17 81 47 164t65 159t57 126q12 28 39 86t60 131t69 153t70 152t60 129t40 85q-14 3 -32 3q-36 0 -89 -11q-79 -16 -174 -39t-196 -48t-186 -37q-51 -7 -94 -7q-28 0 -53 3q-62 8 -78 52z" /> -<glyph unicode="U" horiz-adv-x="1520" d="M82 471q10 139 52 293t101 303t125 284t123 237t96 162q38 58 43 58q16 0 28 -27q8 -17 9 -36t-2 -40t-5 -37q0 -4 -5 -12t-10 -18t-10 -18t-5 -10q-194 -426 -292 -715t-120 -462q-7 -59 -7 -105q0 -91 28 -137q36 -57 103 -57q14 0 29 2q89 14 213 98t262 217t282 302 t272 354t230 373t158 358q4 4 14 15t14 11q55 -37 55 -116q0 -81 -45 -195q-44 -111 -126 -243t-187 -272t-228 -280t-249 -265t-249 -227t-230 -168t-190 -87q-30 -7 -55 -7q-45 0 -76 24q-92 72 -124 188q-24 88 -24 190q0 32 2 65z" /> -<glyph unicode="V" horiz-adv-x="1400" d="M66 887q4 167 28 313t71 257t117 153q10 -7 10 -48v-15q-2 -55 -13 -141t-27 -195t-32 -228t-29 -239t-17 -225q-1 -38 -2 -74q0 -62 5 -116q7 -85 32 -132t71 -51h6q45 0 112 52q102 80 202 171t196 187t188 191t176 185q206 218 394 442t368 464q24 32 47 34h5 q20 0 35 -15q17 -17 25 -46q5 -17 5 -33q0 -13 -3 -26q-18 -20 -56 -61t-86 -94t-100 -112t-99 -112t-85 -96t-56 -63q-44 -50 -116 -139t-163 -197t-194 -227t-208 -228t-208 -199t-193 -142t-161 -57h-10q-64 0 -103 59q-46 68 -77 197t-45 284q-11 121 -11 248q0 37 1 74 z" /> -<glyph unicode="W" horiz-adv-x="1754" d="M44 440q-1 49 -1 100q0 102 5 215q8 169 24 337t39 323t50 271t58 181q27 56 54 56q4 0 9 -1q6 -4 17 -14t13 -16v-15q0 -30 -5 -89q-7 -76 -20 -182t-31 -234t-35 -258t-32 -254t-23 -223t-8 -164t12 -77l28 -30q38 16 78 90t82 181t85 234t86 251t86 234t85 180t82 89 q10 5 20 5q29 0 57 -43q37 -57 70 -200t61 -397q2 -10 8 -50t18 -98t27 -126t34 -131t39 -116t42 -80t43 -22t43 57q8 20 34 86t61 153t74 185t74 185t61 152t36 87q10 24 33 89t57 147t76 170t90 156t99 106q35 26 70 26q17 0 33 -6q4 0 15 -11t11 -17q-154 -198 -255 -399 t-178 -409t-146 -424t-159 -446q-38 -98 -79 -112q-10 -3 -20 -3q-31 0 -61 32q-40 43 -79 131t-74 197t-65 225t-52 214t-36 166t-16 82q-4 18 -9 47t-9 57q-6 32 -10 66h-28q-2 0 -15 -24t-33 -63t-44 -88t-49 -99t-47 -97t-38 -81q-8 -20 -26 -77t-42 -136t-54 -171 t-63 -180t-68 -164t-69 -124t-67 -58q-6 -2 -12 -2q-26 0 -51 36q-32 48 -49 157t-21 255z" /> -<glyph unicode="X" horiz-adv-x="1342" d="M61 101q3 35 25 69q30 50 86 114t121 135t130 145t114 145t74 135q16 41 16 77q0 20 -5 39q-10 20 -33 68t-50 102t-52 102t-35 66q-4 8 -21 37t-36 62t-36 63t-19 38q-4 6 -4 27t4 29q9 7 20 7q19 0 41 -23q35 -36 74 -100t80 -142t79 -144t72 -107q25 -31 45 -31 q7 0 13 4q4 6 16 22t26 34t26 34t16 22q16 24 48 85t77 123t99 104q39 30 82 30q16 0 34 -4q32 -8 32 -35t-22 -66t-61 -88t-84 -101t-90 -106t-79 -101t-53 -87q-13 -28 -13 -48q0 -9 2 -16q16 -40 59 -109t97 -151t111 -170t102 -166t69 -138q17 -42 17 -68q0 -11 -3 -18 q-4 -2 -14 -2t-14 2t-16 13t-25 24t-25 27t-18 20q-16 20 -53 76t-82 128t-96 149t-96 140t-79 100t-48 29q-156 -146 -280 -300t-256 -322q-36 -46 -62 -51t-38 14q-10 15 -10 41q0 6 1 13z" /> -<glyph unicode="Y" horiz-adv-x="1004" d="M87 1689q7 19 53 -3q36 -32 87 -104t108 -161t116 -183t109 -168t88 -117q30 -34 46 -34q5 0 8 3q20 38 52 110l72 162t85 190t90 192t88 170t79 124t62 53q3 1 6 1q22 0 32 -42q2 -7 2 -17q0 -38 -26 -113q-32 -94 -91 -226t-140 -293t-170 -333t-178 -346t-166 -333 t-135 -291t-84 -222q-8 -26 -24 -49t-37 -33q-10 -5 -20 -5l-22 6q-21 11 -37 53q-17 43 -17 89q0 33 9 69q22 84 73 175t118 189t127 201t101 212q39 104 39 212v11q-10 24 -44 77t-82 125t-104 153t-107 161t-92 150t-61 118q-15 36 -15 55q0 7 2 12z" /> -<glyph unicode="Z" horiz-adv-x="2106" d="M72 28q-23 17 -23 45q0 29 24 69q47 80 153 191t257 244t312 273t317 279t274 261t181 219q46 70 46 120q0 19 -7 35q-4 0 -58 -10t-136 -24t-184 -30t-202 -27t-190 -16q-32 -2 -60 -2q-50 0 -87 6q-57 9 -74 33q-5 6 -5 15q0 22 34 55q16 -2 35 -2q47 0 112 11 q91 15 200 40t226 52t222 44t189 18h5q80 0 123 -29q40 -28 41 -85q0 -5 -1 -11q-4 -66 -78 -180q-130 -204 -286 -363t-325 -301t-346 -282t-351 -310q-2 -2 -27 -28t-53 -62t-49 -73q-15 -27 -15 -47q0 -8 2 -14q8 -2 21 -2q34 0 106 15q99 21 241 55t313 76t340 79 t324 62t264 25t159 -32q28 -18 28 -51q0 -25 -16 -57q-62 -4 -177 -20t-261 -40t-313 -53t-333 -57t-321 -54t-277 -42t-201 -22q-30 -2 -50 -2q-34 0 -43 6z" /> -<glyph unicode="[" horiz-adv-x="1186" d="M84 -140q-4 30 1 126t15 231t26 299t38 331t49 326t58 286t67 209t74 94q6 2 35 6t62 8t62 8t37 6q16 4 50 15t76 24t88 29t87 30t74 26t49 18q18 4 48 -2t50 -19t21 -30t-35 -35q-190 -54 -315 -102t-205 -107t-125 -137t-75 -192t-53 -275t-61 -383q-18 -60 -31 -161 t-21 -210t-9 -211t3 -166l850 42q24 -36 -4 -59t-71 -35t-83 -16t-42 -4q-96 -14 -175 -22t-155 -11t-159 -1t-189 6q-4 0 -16 4t-26 8t-26 9t-16 7t-15 14t-13 16z" /> -<glyph unicode="\" horiz-adv-x="820" d="M50 1290q20 66 45 65t57 -50t71 -139t85 -202t98 -238t112 -248t128 -232t144 -188q-28 -42 -55 -56t-57 26q-68 66 -135 164t-129 213t-119 238t-104 242t-83 223t-58 182z" /> -<glyph unicode="]" horiz-adv-x="1116" d="M32 1752q-10 16 26 34t102 36t154 32t182 22t186 7t165 -15t121 -42t52 -74q10 -96 8 -242t-11 -316t-21 -354t-19 -354t-6 -316t17 -242q0 -8 3 -25t1 -35t-8 -34t-24 -20q-60 8 -134 -3t-153 -28t-157 -34t-146 -22t-121 7t-81 54q-16 22 26 45t114 45t160 41t165 33 t130 23t55 9q-2 88 2 227t13 303t19 341t18 341t11 302t-3 224q-36 2 -106 -6t-156 -17t-178 -17t-174 -5t-144 20t-88 55z" /> -<glyph unicode="^" horiz-adv-x="650" d="M80 1018q12 22 40 78t60 119t60 120t38 79q56 118 103 150t84 5t65 -98t45 -158t23 -175t1 -149t-22 -82t-45 27q-2 4 -11 39t-21 82t-26 101t-29 96t-29 66t-24 12q-6 -12 -22 -49t-37 -85t-47 -98t-55 -87t-60 -54t-63 5q-12 8 -25 23t-3 33z" /> -<glyph unicode="_" horiz-adv-x="1568" d="M44 58q2 8 64 21t163 27t230 29t265 27t266 19t234 6t171 -11t75 -34q4 -6 4 -28t-4 -30q-46 -4 -144 -11t-220 -15t-258 -17t-258 -17t-220 -15t-144 -9q-62 -4 -102 -2t-94 30q-4 2 -15 14t-13 16z" /> -<glyph unicode="`" horiz-adv-x="424" d="M114 1253q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="a" horiz-adv-x="1754" d="M75 206q-1 17 -1 34q0 85 28 185q34 121 101 255t154 255t189 217t205 143q79 36 156 36q23 0 45 -3q98 -14 178 -114q50 -62 60 -126q4 -28 5 -56q0 -37 -8 -74q-13 -66 -40 -134t-53 -138t-42 -143q-10 -45 -10 -90q0 -28 4 -57q10 -72 54 -99q37 -23 90 -23q10 0 20 1 q66 5 146 34t162 71t160 89t138 87t97 67l37 27q26 5 43 5q30 0 36 -15q2 -5 2 -10q0 -23 -29 -59q-36 -45 -109 -104t-166 -114t-198 -100t-205 -62q-47 -8 -92 -8q-50 0 -96 10q-88 19 -146 89q-26 30 -41 61t-43 53q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76 q-55 -20 -111 -20q-17 0 -35 2q-74 8 -142 66q-60 50 -67 148zM170 142q16 -60 66 -70q13 -3 27 -3q41 0 91 22q68 29 149 92t160 152t151 197t123 227t75 242q14 70 14 140q0 52 -8 103q-30 24 -69 24q-18 0 -38 -5q-63 -17 -136 -71t-150 -138t-149 -183t-135 -206 t-106 -205t-62 -182q-10 -46 -10 -82q0 -30 7 -54z" /> -<glyph unicode="b" horiz-adv-x="1370" d="M40 98q0 10 4 14q32 64 73 170t85 233t91 263t93 262t91 231t85 169t73 76q6 2 11 2q26 0 46 -50q16 -40 16 -81q0 -19 -3 -38q-11 -61 -39 -125t-67 -129t-72 -131t-52 -131q-12 -43 -12 -84q0 -22 3 -43q72 18 127 67t109 105t111 103t133 63q48 10 90 10q59 0 106 -20 q80 -34 120 -104q37 -65 37 -154v-14q-3 -98 -51 -202t-143 -205t-241 -177t-343 -119q-154 -34 -342 -34q-52 0 -107 3q-4 6 -15 28t-13 28q-4 4 -4 14zM264 183q0 -13 1 -25t3 -16q53 -8 106 -8q60 0 119 10q113 18 218 63t195 114t153 159t95 197q23 78 23 163 q0 32 -3 64q-2 6 -14 16t-16 12q-25 4 -51 4q-58 0 -121 -19q-90 -27 -180 -81t-173 -129t-153 -157t-122 -166t-76 -158q-2 -6 -3 -18t-1 -25z" /> -<glyph unicode="c" horiz-adv-x="1398" d="M65 363q19 113 86 240t159 242t195 208t193 140q74 39 131 39q12 0 24 -2q65 -10 81 -100q2 -11 2 -22q0 -31 -12 -66q-16 -48 -44 -92t-64 -80t-69 -54t-60 -12t-35 44q30 52 67 101t73 95q-9 18 -31 18q-11 0 -26 -5q-43 -15 -102 -60t-126 -113t-129 -148t-111 -167 t-71 -167q-15 -53 -15 -101q0 -24 4 -47q11 -68 71 -112q17 -1 35 -1q69 0 154 18q107 23 220 60t224 82t202 82t155 58q43 14 67 14q11 0 17 -3q25 -13 25 -32q0 -8 -4 -18q-15 -32 -68 -71t-136 -81t-180 -81t-201 -72t-201 -54t-178 -26q-19 -1 -37 -1q-56 0 -94 12 q-128 42 -169 132q-28 62 -28 134q0 33 6 69z" /> -<glyph unicode="d" horiz-adv-x="1360" d="M11 193q-7 29 -7 63q0 43 12 94q22 90 78 181t143 173t202 136t253 68q32 3 66 3q110 0 232 -35l28 28l338 678q66 -10 79 -59q6 -24 6 -50q0 -28 -7 -59q-14 -60 -40 -117t-38 -83q-6 -14 -28 -57t-51 -101t-62 -123t-62 -124t-51 -102t-28 -57q-22 -46 -30 -95t-9 -100 v-20q0 -41 3 -82q4 -51 8 -99q10 -46 39 -74t63 -51l68 -46t56 -55q-10 -32 -40 -33h-5q-28 0 -58 11q-33 12 -61 29t-34 23q-46 32 -79 73t-56 88t-38 99t-25 106h-28q-202 -166 -352 -248t-252 -100q-35 -6 -65 -6q-57 0 -94 22q-57 34 -74 101zM136 361q-11 -41 -10 -84 q0 -53 16 -107q7 -29 41 -29h7q40 3 99 31t132 77t145 106t140 119t116 119t73 101q16 28 16 48q0 11 -5 20q-78 42 -173 42t-189 -33t-180 -95t-145 -142t-83 -173z" /> -<glyph unicode="e" horiz-adv-x="1088" d="M45 349q9 69 27 131q76 80 170 183t199 204t219 187t230 132q18 7 33 7q18 0 31 -10q24 -19 34 -58q9 -35 9 -82v-10q-1 -53 -9 -102t-20 -90t-26 -55q-22 -26 -77 -60t-128 -73t-155 -82t-157 -87t-136 -90t-92 -90q-25 -36 -25 -70q0 -8 1 -15q7 -41 69 -77 q29 -3 62 -3q64 0 144 12q122 19 248 51t243 66t193 52l30 -28q-36 -48 -106 -91t-157 -79t-186 -61t-192 -39q-87 -13 -163 -13h-11q-81 1 -135 19q-76 26 -114 76t-50 113q-7 36 -7 74q0 28 4 58zM360 630q11 -2 25 -2q33 0 79 14q64 20 132 54t131 78t100 86t37 75 t-54 47q0 1 -1 1q-6 0 -36 -21q-35 -24 -87 -63t-110 -85t-108 -86t-81 -68t-27 -30z" /> -<glyph unicode="f" horiz-adv-x="1174" d="M42 656q-1 5 -1 9q0 8 3 13q8 2 28 10t42 17t42 18t28 13q8 2 42 14t73 25t72 26t39 19q28 20 70 99t94 189t115 236t135 242t152 207t167 130q51 23 105 23q36 0 74 -11q92 -27 190 -147q18 -24 26 -53q5 -17 5 -33q0 -13 -3 -26q-22 -14 -45 -6t-42 25t-33 36t-20 29 q-65 10 -119 10q-39 0 -73 -5q-80 -13 -138 -50t-99 -94t-76 -126t-69 -149t-76 -160q-16 -30 -41 -77t-47 -92t-38 -78t-16 -35v-28q0 -6 29 -11t75 -10t100 -11t104 -17t89 -27t55 -38l-28 -26q-114 6 -199 6h-41q-98 -2 -170 -33t-127 -98t-113 -187q-20 -42 -53 -108 t-64 -129t-55 -110t-26 -49l-28 -28q-4 2 -13 10t-18 17t-16 18t-9 13q-4 6 -4 27t4 27l210 482h-238q-6 0 -12 10t-11 24t-7 28z" /> -<glyph unicode="g" horiz-adv-x="904" d="M-574 -374q-2 26 -2 50q0 36 5 66q9 50 30 76t49 12v-16q0 -206 51 -313q53 -111 140 -139q35 -11 73 -11q58 0 123 25q109 42 219 131t211 212t172 257t100 266q14 63 14 120q0 62 -17 118q-180 -130 -295 -182q-103 -47 -164 -47q-7 0 -14 1q-63 6 -78 61q-7 24 -7 54 q0 37 11 82q19 81 67 180t113 195t139 178t147 130t138 52h8q60 0 103 -56q58 -76 72 -208q5 -51 5 -107q0 -87 -13 -185q-22 -160 -78 -335t-139 -341t-188 -310t-228 -239t-258 -128q-52 -13 -106 -13q-83 0 -169 32q-78 28 -127 83t-75 119t-32 130zM164 465q0 -23 1 -42 t5 -27q21 -6 42 -6q40 0 82 20q64 30 122 86t109 130t86 145t52 131q11 38 11 63q0 15 -4 26q-7 22 -30 22q-8 0 -18 -3q-38 -10 -114 -78q-30 -28 -80 -75t-101 -102t-95 -113t-62 -106q-4 -8 -5 -28t-1 -43z" /> -<glyph unicode="h" horiz-adv-x="1384" d="M26 71q0 9 2 13q8 20 32 69t51 103t52 102t35 66q4 8 26 43t53 87t67 113l72 122t68 114t52 87q50 82 116 195t136 228t138 222t126 178t98 93q12 7 21 7q23 0 33 -37q2 -10 2 -41t-2 -41q-16 -26 -46 -70t-62 -93t-61 -93t-45 -70q-22 -34 -72 -112t-113 -176t-128 -204 t-118 -198t-84 -158q-25 -52 -25 -75q0 -6 2 -9q60 18 129 63t139 97t140 102t130 78q60 -8 106 -45t64 -95q-2 -24 -3 -85t-1 -128t1 -127t3 -84q2 -26 25 -68t49 -82t47 -71t19 -33q-26 -9 -50 -9q-23 0 -44 8q-44 17 -78 52t-56 82t-26 91q-4 24 -8 85t-9 128t-8 127 t-3 84l-58 30q-14 6 -51 -14t-85 -55t-100 -79t-97 -84t-78 -70t-41 -38q-22 -20 -74 -72l-111 -111t-110 -112t-71 -73q-27 -6 -53 -6h-13q-32 2 -48 36q-2 4 -2 13z" /> -<glyph unicode="i" horiz-adv-x="634" d="M28 28q102 328 186 522t139 272q41 58 63 58q8 0 13 -7q10 -13 10 -44q0 -36 -13 -96q-24 -113 -100 -301t-214 -432q-12 -5 -27 -5q-9 0 -20 2q-27 5 -37 31zM462 1274q0 14 1 26t3 16q33 11 57 12q18 0 31 -7q30 -15 37 -44q3 -13 3 -26q0 -17 -5 -36q-9 -33 -29 -49 q-12 -9 -25 -9q-9 0 -20 4q-25 11 -49 69q-2 6 -3 18t-1 26z" /> -<glyph unicode="j" horiz-adv-x="466" d="M-863 -573q7 63 85 123q18 -2 25 -25t11 -55t8 -70t17 -72t38 -59t71 -31q26 -4 52 -4q84 0 155 41q93 53 167 153t134 233t109 276t90 285t78 257t73 192t74 93q31 -10 31 -91v-5q-1 -86 -29 -217t-80 -292t-123 -322t-156 -309t-180 -251t-195 -149q-51 -24 -102 -24 l-98 22q-62 26 -126 74t-100 106q-30 49 -30 101q0 10 1 20zM304 1260q13 23 37 23h6q29 -3 53 -39q15 -23 15 -62q0 -23 -5 -52q-6 -4 -13 -4t-14 4q-15 8 -28 20t-17 18l-14 20q-24 33 -24 55q0 9 4 17z" /> -<glyph unicode="k" horiz-adv-x="1822" d="M44 112q-2 6 -2 15q0 28 20 82q26 71 74 173t115 226t140 254t147 257t138 236t114 191t72 122q10 7 20 7q8 0 17 -5q19 -10 32 -31t18 -45t-3 -40l-226 -394v-58q17 -3 36 -3q41 0 95 14q79 21 170 61t187 93t181 107t155 102t108 78q34 18 60 11t39 -27q11 -17 11 -40 v-7q-2 -27 -24 -51q-72 -72 -168 -123t-203 -92t-219 -78t-213 -79t-187 -95t-140 -125q32 -28 86 -86t117 -132t128 -155t117 -157t85 -138t33 -96v-56q-15 -8 -29 -8q-4 0 -8 1q-17 3 -31 13t-26 24t-20 26q-162 220 -259 364t-159 214q-59 67 -99 67h-3q-40 -3 -86 -76 t-114 -216t-184 -353q-14 -26 -31 -32t-33 0t-29 23t-19 37z" /> -<glyph unicode="l" horiz-adv-x="820" d="M42 334q14 94 54 194t86 193t90 170t68 127q4 10 19 40t36 70t43 86t43 87t36 72t19 41q6 12 20 48t32 79t39 82t44 57q13 10 27 10q10 0 20 -5q24 -13 46 -75q-10 -26 -48 -100t-91 -179t-116 -232t-124 -258t-113 -255t-85 -225t-40 -168q-1 -13 -2 -23q0 -46 25 -58 q29 -15 72 -15q9 0 19 1q55 4 116 15t119 21q48 8 84 8h14q10 -22 -15 -43t-70 -37t-103 -27t-112 -16q-39 -4 -71 -4q-13 0 -25 1q-42 2 -56 12q-74 52 -94 132q-12 47 -12 99q0 36 6 75z" /> -<glyph unicode="m" horiz-adv-x="2062" d="M56 98q0 10 2 14q12 26 38 80t59 121t70 140t71 140t61 119t41 78q12 26 35 65t45 75t39 62t19 26h58q9 -27 9 -52q0 -29 -12 -56q-23 -50 -54 -97t-53 -94q-12 -25 -12 -51q0 -24 10 -48q162 144 266 228t165 122q55 34 80 34h5q25 -4 25 -44q0 -34 -13 -90 q-14 -60 -29 -133t-24 -154q-4 -35 -4 -69q0 -46 7 -90h30q14 10 50 38t77 60t77 60t50 38q28 22 81 63t107 81t98 73t54 39q10 8 44 31t75 50t79 52t56 35q35 22 65 22h5q32 -2 53 -23t26 -58q1 -10 1 -20q0 -29 -10 -61q-60 -114 -120 -221t-108 -216t-79 -224t-33 -243 q-6 -4 -12.5 -4t-13.5 4q-14 8 -27 20t-17 18l-14 20q-26 34 -30 74q-1 13 -1 27q0 27 5 54q8 41 24 81t32 72q12 26 43 91t67 137t68 137t46 89v56q-6 3 -14 3q-20 0 -55 -18q-49 -25 -117 -74t-150 -115t-165 -138t-164 -145t-147 -135t-113 -107t-63 -63q-16 -5 -29 -5 q-30 0 -41 29t-11 74q0 20 2 42q7 74 29 165t46 172t43 138t17 63q-17 6 -35 6q-34 0 -70 -20q-55 -30 -112 -89t-116 -137t-115 -157t-110 -150t-101 -115t-88 -53q-7 -1 -13 -1q-33 0 -58 38q-2 4 -2 14z" /> -<glyph unicode="n" horiz-adv-x="1440" d="M44 170q0 2 17 38t46 95t67 133t79 152t81 154t73 136t57 98t32 42q50 -34 52 -75v-10q0 -37 -13 -76q-15 -45 -33 -90q-11 -27 -11 -54q0 -18 5 -35q42 28 112 77t155 101t175 101t171 79t144 32h6q59 0 87 -38q22 -29 22 -86q0 -21 -3 -45q-11 -91 -79 -249 q-4 -12 -20 -47t-36 -81t-43 -98t-44 -98t-36 -81t-19 -47q-4 -10 -7 -37t-9 -58t-16 -60t-24 -43q-6 -6 -12 -6q-2 0 -5 1q-9 3 -18 9t-15 13t-8 11q-2 22 -2 44q0 60 16 119q22 81 58 160t77 158t72 155t43 150q4 26 4 52q0 47 -14 94q-26 9 -54 9q-42 0 -91 -20 q-81 -33 -171 -99t-186 -155t-187 -180t-174 -173t-150 -136t-112 -68q-10 -3 -19 -3q-29 0 -40 35z" /> -<glyph unicode="o" d="M68 155q-13 42 -13 88q0 48 14 102q27 105 94 215t149 203t166 156t144 71q51 7 95 7q90 0 149 -28q88 -41 121 -119q23 -54 22 -119q0 -30 -4 -62q-15 -103 -66 -209t-132 -203t-180 -162t-209 -88q-38 -8 -76 -8l-144 29q-104 42 -130 127zM170 170q16 -64 62 -82 q22 -9 49 -9q28 0 60 10q63 19 137 66t146 111t137 140t109 149t62 139q8 30 8 57q0 31 -11 56q-21 47 -87 67q-35 11 -86 11q-46 0 -104 -9q-36 -32 -90 -79t-114 -102t-117 -119t-99 -131t-61 -137q-10 -36 -10 -71q0 -34 9 -67z" /> -<glyph unicode="p" horiz-adv-x="1356" d="M-229 -685q13 95 43 190t70 190t80 189t73 187t49 185q0 4 21 29t47 54t48 54t24 31q42 88 82 162t63 143q20 61 20 123v16q-3 70 -51 150q-4 4 -4 14t4 14q74 92 169 155t202 100t221 50q71 8 141 8l87 -3q96 -80 122 -182q14 -53 14 -108q0 -51 -12 -103 q-24 -109 -88 -218t-146 -205t-174 -170t-170 -114q-72 -36 -107 -47t-66 -14t-78 -5t-143 -20q-42 -8 -70 -39t-47 -70t-31 -79t-22 -66q-44 -110 -81 -204t-70 -186t-65 -189t-68 -211q-6 -12 -18 -21t-26 -11h-6q-11 0 -20 5q-12 7 -14 27q-9 52 -9 104q0 42 6 85z M340 282q45 -8 88 -8q70 0 136 21q108 35 203 109t171 178t129 218t78 230q18 83 18 157q0 29 -3 57q-34 30 -83 31h-19q-38 0 -68 -3q-136 -18 -213 -69t-126 -129t-84 -179t-85 -217q-10 -18 -30 -62t-43 -93t-42 -93t-27 -62v-86z" /> -<glyph unicode="q" horiz-adv-x="990" d="M38 380q0 44 34 130q14 36 73 113t143 163t182 164t187 117q60 26 112 26q25 0 48 -6q71 -19 103 -127q6 -20 0 -55t-17 -73t-23 -73t-18 -53q-20 -52 -68 -129t-112 -170t-137 -198t-140 -215t-123 -220t-87 -212q-30 -99 -30 -186v-6q1 -90 47 -160q10 -16 51 8t100 72 t133 114t151 132t153 126t140 98t110 45q7 1 14 1q35 0 52 -32q4 -4 4 -14t-4 -14q-38 -28 -112 -96t-166 -151t-195 -167t-197 -144t-171 -82q-26 -8 -49 -8q-42 0 -70 28q-72 72 -84 170q-4 37 -4 75q0 63 12 129q20 106 60 208t72 180q52 124 66 198q8 43 8 75 q0 23 -4 40q-10 41 -39 55t-64 20t-69 12t-53 27t-19 65zM180 396q0 -18 1 -34t3 -22q26 -9 52 -9q40 0 79 21q65 34 127 95t119 138t107 140t92 101q30 27 54 27q11 0 20 -5q9 36 9 61q0 23 -8 36q-14 22 -43 22q-7 0 -14 -1q-40 -6 -98 -39t-121 -80t-127 -104t-116 -113 t-88 -103t-44 -75q-2 -6 -3 -22t-1 -34z" /> -<glyph unicode="r" horiz-adv-x="1214" d="M72 28q-2 1 -2 10q0 14 4 49q6 57 19 142t32 187t42 195t49 166t52 99q18 18 35 1t34 -41t35 -42t38 -4q70 98 154 187t186 153q10 8 55 24t103 32t119 28q52 10 91 10h13q43 -2 59 -23q5 -7 5 -17q0 -20 -21 -54q-112 -2 -213 -51t-191 -129t-169 -182t-145 -207 t-121 -206t-96 -180t-70 -127t-43 -48q-4 0 -24 11t-30 17z" /> -<glyph unicode="s" horiz-adv-x="990" d="M71 81q29 33 93 73t148 82t163 79t140 66t77 43q66 56 81 97q6 17 6 32q0 21 -12 37q-21 28 -72 46t-115 31t-136 23t-135 22t-109 28t-62 42q-7 11 -7 24q0 17 13 38q22 36 98 88q36 26 104 73t147 97t156 90t129 52q9 2 19 2q18 0 36 -7q29 -11 47 -29t16 -40t-34 -40 q-140 -78 -272 -149t-264 -161q-10 -20 2 -35t26 -23q214 -22 341 -59t185 -82t58 -97t-41 -105t-114 -105t-160 -99t-179 -86t-170 -64t-133 -36q-29 -6 -46 -6q-16 0 -23 5q-15 10 -15 24q0 13 14 29z" /> -<glyph unicode="t" d="M28 762q18 42 53 63t77 31t89 14t91 12t82 25t62 53q24 64 54 158t66 196t77 203t85 179q15 10 27 10q10 0 18 -8q17 -16 27 -45t12 -59t0 -40q-16 -66 -52 -139t-68 -149t-50 -150q-9 -37 -9 -72.5t9 -69.5h536q4 0 14 -16t16 -26q4 -9 4 -16q0 -21 -30 -30 q-40 -12 -108 -16t-153 -6t-165 -12t-142 -36t-84 -80q-66 -170 -121 -339t-105 -339q-6 -10 -21 -26t-32 -27q-13 -9 -27 -9l-7 1q-17 3 -25 31q-4 6 -4 28t4 28q8 28 27 97t42 145t43 144t28 96q10 34 23 81q8 29 8 56q0 17 -3 33q-8 1 -18 1q-32 0 -74 -11 q-54 -14 -109 -22q-28 -4 -53 -4t-48 4q-46 8 -66 58z" /> -<glyph unicode="u" horiz-adv-x="1440" d="M58 198q-5 15 -5 34q0 31 13 74q22 70 65 156t98 177t110 170t101 135t70 74q53 -25 53 -74q0 -5 -1 -10q-6 -56 -46 -128t-101 -155t-114 -165t-86 -157q-22 -51 -22 -92q0 -20 5 -39q17 -7 37 -7q27 0 60 13q57 22 123 71t139 118t144 146t139 154t125 144t100 115 t65 66q52 -26 52 -82t-28 -129t-70 -157t-72 -166t-35 -157v-15q0 -66 41 -114l84 -100h254q11 0 11 -6q0 -4 -4 -9q-11 -15 -30 -33t-39 -34t-22 -16q-32 -6 -56 -6t-47 4t-45 11t-48 19q-70 26 -110 72t-62 103t-33 121t-23 128q-18 12 -55 -12t-87 -65t-110 -94 t-123 -100t-125 -82t-118 -40q-8 -1 -16 -1q-47 0 -84 26q-44 30 -72 114z" /> -<glyph unicode="v" horiz-adv-x="1328" d="M41 300q-1 15 -1 31q0 68 11 142q13 91 30 175t35 152t26 104q12 8 27 0t28 -20t22 -24l9 -12q3 -48 3 -95q0 -39 -2 -76q-5 -83 -14 -166t-16 -168q-4 -46 -4 -92q0 -40 3 -81q10 -19 31 -18q13 0 29 6q44 18 108 70t142 129t162 165t168 178t160 168t138 136t101 81 q21 12 34 12q11 0 16 -9q3 -6 3 -17q0 -26 -18 -81q-46 -40 -104 -110t-125 -155t-142 -179t-153 -181t-158 -161t-158 -119t-151 -56q-16 -2 -31 -2q-56 0 -108 31q-52 30 -75 95t-26 147z" /> -<glyph unicode="w" horiz-adv-x="1864" d="M38 96q-5 13 -5 27q0 22 11 47q48 152 105 323t119 327q22 56 49 61t46 -20t27 -69q3 -15 3 -29q0 -29 -11 -57q-8 -20 -28 -72t-43 -111t-42 -111t-27 -72v-86q78 70 131 126t99 112t96 119t124 151q56 66 89 73t49 -27t20 -97q2 -36 2 -76q0 -30 -1 -61q-3 -74 -7 -147 q-3 -58 -3 -105v-22q1 -54 12 -77t37 3q30 46 87 137t130 199t159 220t176 200t180 139q73 41 140 41q16 0 32 -2q4 -12 -28 -56t-83 -105t-113 -132t-119 -137t-103 -118t-62 -76q-8 -10 -31 -45t-55 -81t-68 -98t-68 -99t-57 -82t-33 -47q-22 -32 -37 -52t-29 -27 q-8 -4 -17 -4q-7 0 -14 2q-17 5 -43 25q-48 36 -76 96t-42 128t-18 136t-6 120q-4 4 -14 4t-14 -4q-62 -46 -120 -107t-113 -127t-110 -130t-109 -116q-24 -8 -49 -8q-11 0 -22 1q-37 5 -64 24t-39 51z" /> -<glyph unicode="x" horiz-adv-x="1258" d="M44 58q-10 14 -10 31q0 22 19 48q33 45 96 96t142 107t146 111t110 106q35 41 35 77q0 8 -2 16q-2 12 -15 57t-27 98t-27 98t-15 57q-2 6 -2 28t2 30q22 16 43 2t41 -46t39 -74t37 -82t34 -71t30 -41q44 30 96 71t102 85t95 85t75 71q45 23 67 23q3 0 6 -1q22 -4 22 -29 q0 -21 -14 -52q-15 -33 -32 -64t-33 -53l-16 -22q-132 -120 -202 -204t-97 -141q-21 -44 -21 -75q0 -9 2 -18q8 -36 34 -60t61 -41t61 -38t36 -51q3 -8 3 -18q0 -26 -19 -62q-28 -7 -51 -7q-33 0 -55 14q-38 23 -62 65t-41 92t-41 86t-62 47q-9 3 -20 3q-34 0 -86 -26 q-68 -34 -171 -125t-257 -261q-4 2 -12 10l-17 17t-17 18t-10 13z" /> -<glyph unicode="y" horiz-adv-x="1102" d="M-424 -852q24 72 67 152t90 149t69 99q20 26 62 82t95 125t111 146t111 147t95 125t62 81q10 11 10 28t-11 42q-21 48 -62 112t-92 140t-92 155t-62 156q-11 39 -11 77q0 35 10 68q8 6 17 6q20 0 43 -30q34 -44 70 -120t75 -167t77 -165t74 -116q23 -27 44 -27q12 0 24 9 q64 48 127 122t120 154t109 157t96 133q18 22 35 31t51 -3q12 -4 12 -20q0 -15 -10 -39q-20 -51 -71 -136t-127 -197t-167 -238t-191 -262t-199 -269t-190 -258t-165 -230t-125 -183t-69 -118q-10 -22 -21 -45t-33 -39q-4 2 -13 10t-18 17t-17 18t-10 13q-12 18 -12 45 t12 63z" /> -<glyph unicode="z" horiz-adv-x="1414" d="M67 105q15 49 71 113t146 139t193 154t211 161t201 159t161 146t94 125q-6 32 -51 36q-14 1 -29 1q-35 0 -78 -6q-62 -9 -132 -23t-124 -16h-10q-47 0 -73 17q-18 12 -18 38q0 16 7 37q2 4 54 21t129 34t166 30q77 11 146 11h21q78 -2 131 -24t58 -75v-9q0 -51 -52 -132 q-57 -88 -201 -222q-10 -10 -43 -40t-74 -66t-79 -70t-58 -50q-16 -14 -61 -48t-101 -77t-116 -91t-108 -90t-76 -74t-18 -44q50 -5 101 -5l111 6q106 11 211 27t211 27q56 6 112 6q51 0 102 -5q12 -8 26 -20t24 -27t12 -32t-6 -35q-64 -4 -161 -21t-208 -37t-228 -38 t-224 -26q-57 -4 -109 -4q-45 0 -87 3q-89 7 -141 39q-37 21 -37 55q0 10 4 22z" /> -<glyph unicode="{" horiz-adv-x="678" d="M41 344q-5 100 65 186q6 8 35 42t63 72t63 71t35 41q32 38 33 65t-15 48t-41 38t-44 35t-27 41t10 55q4 6 21 27t37 44t36 44t20 27q28 64 13 129t-44 129t-56 126t-21 122t60 118t188 112q14 6 28 0t24 -16t18 -22t14 -20q-22 -28 -70 -60t-91 -69t-67 -83t4 -100 l140 -282q0 -2 -3 -39t-6 -89t-2 -110t11 -100q18 -72 7 -121t-39 -86t-66 -68t-75 -63t-67 -73t-42 -97q-24 -124 6 -202t94 -128t150 -83t174 -69q48 -18 44 -38t-43 -32t-100 -10t-127 26q-84 30 -164 103t-129 166t-54 193z" /> -<glyph unicode="|" horiz-adv-x="282" d="M56 368q0 90 1 170t1 112q0 20 2 81t5 142t6 173t6 173t5 141t4 80q0 4 3 30t10 60t16 68t22 55t28 20t33 -35q6 -202 1 -403t-12 -402l-14 -402t-3 -403q-16 -34 -41 -30t-43 30q-4 6 -15 28t-13 28q0 32 -1 113t-1 171z" /> -<glyph unicode="}" horiz-adv-x="750" d="M24 2004h82q6 0 42 -33t81 -78t90 -93t71 -78q64 -78 80 -147t1 -133t-53 -127t-84 -131q-8 -12 -19 -33t-9 -23l140 -142q34 -32 23 -54t-33 -39t-42 -34t-4 -41q30 -44 74 -91t88 -97t78 -102t42 -108q12 -66 -16 -149t-78 -164t-114 -152t-124 -111t-109 -42t-67 56 q-8 22 23 50t79 65t105 82t104 98t73 113t12 128q-12 56 -46 103t-78 89t-88 83t-75 85t-41 94t16 112q-56 114 -69 172t0 85t43 37t61 31t55 67t24 144q0 50 -29 97t-71 90t-89 84t-85 80t-58 78t-6 79z" /> -<glyph unicode="~" horiz-adv-x="1328" d="M86 77q-12 35 2 95t48 133t79 137t98 105t105 37t98 -66t78 -206q24 -106 65 -147t94 -38t117 40t131 85t136 96t135 76q14 -24 -15 -70t-85 -100t-130 -107t-151 -89t-149 -48t-120 18q-66 40 -97 111t-48 139t-31 114t-45 36t-91 -94t-168 -276q-44 -16 -56 19z" /> -<glyph unicode="¡" horiz-adv-x="664" d="M37 1575.5q17 -31.5 45.5 -52t58.5 -22.5t40 32q8 33 0 69.5t-29 59t-50.5 20t-61.5 -47.5q-20 -27 -3 -58.5zM181 1001q-6 -14 4 -68t31 -131.5t50.5 -171.5t64.5 -188.5t71.5 -181.5t73.5 -152t70.5 -100t59.5 -22q2 12 -10 76t-33.5 156.5t-52.5 205t-65.5 220 t-71.5 201t-72 149.5t-65.5 63t-54.5 -56z" /> -<glyph unicode="¢" horiz-adv-x="1398" d="M65 363q19 113 86 240t159 242t195 208t193 140t155 37t81 -100q6 -40 -10 -88t-44 -92t-64 -80t-69 -54t-60 -12t-35 44q30 52 67 101t73 95q-14 28 -57 13t-102 -60t-126 -113t-129 -148t-111 -167t-71 -167t-11 -148t71 -112q82 -6 189 17t220 60t224 82t202 82 t155 58t84 11q36 -18 21 -50t-68 -71t-136 -81t-180 -81t-201 -72t-201 -54t-178 -26t-131 11q-128 42 -169 132t-22 203zM472 598q0 20 4 84t10 151t13 184t13 184t10 150t6 83q0 4 3 30t10 60t17 68t23 55t28 20t33 -35q-28 -202 -48 -423t-23 -448t17 -449t74 -422 q-18 -34 -42 -31t-42 31q-4 6 -16 27t-14 27q0 22 -6 73t-15 116t-19 138t-18 139t-14 116t-4 72z" /> -<glyph unicode="£" horiz-adv-x="830" d="M-30 728q6 10 38 17t82 13q20 132 56 259t86 236t112 192t135 126t155 38t172 -71l-74 -132q-62 60 -119 66t-109 -29t-98 -104t-85 -160t-70 -198t-53 -217q74 2 155 0t152 -11t125 -25t72 -40q-26 0 -90 -4t-136 -8t-136 -8t-90 -6q-20 2 -37 4t-33 4q-16 -92 -26 -179 t-11 -161t5 -131t22 -87q28 12 107 31t189 23t238 -19t256 -91q24 -14 5 -17t-68 -1t-120 8t-150 12t-159 10t-148 2t-116 -12t-62 -30q-58 120 -71 293t9 363q-66 12 -91 23t-19 21z" /> -<glyph unicode="¤" horiz-adv-x="1484" d="M135 44q3 18 41 70l150 166q-26 4 -37 38t-8 83t19 109t40 119t56 111t70 84q-36 46 -86 88t-93 87t-71 95t-18 112q44 2 94 -34t95 -88t80 -111t47 -101q38 66 104 102t138 47t140 -4t112 -51q150 106 241 153t132 53t35 -21t-51 -70t-124 -92t-185 -87q18 -46 15 -98 t-22 -108t-50 -112t-69 -108q44 -22 88 -68t81 -97t60 -100t26 -78t-19 -31t-78 40q-24 38 -56 70t-65 63t-61 63t-40 68q-24 -46 -78 -80t-118 -54t-129 -26t-111 6q-22 -24 -59 -59t-79 -68t-79 -59t-59 -33t-19 11zM368 372q2 -16 12 -25t20 -14t19 -8t11 -5 q46 -28 110 -14t133 55t135 101t116 127t76 132t14 116t-69 78t-173 19q-16 2 -55 -21t-87 -66t-100 -100t-92 -121t-61 -129t-9 -125z" /> -<glyph unicode="¥" horiz-adv-x="1004" d="M46 352q-18 26 34 48t135 39t174 30t151 19q6 24 12 47t10 47q-66 -4 -131 -5t-116 3t-86 13t-41 27q12 24 50 44t93 36t121 25t134 13q2 24 3 49t1 51q-10 24 -44 77t-82 125t-104 153t-107 161t-92 150t-61 118t-13 67t53 -3q36 -32 87 -104t108 -161t116 -183 t109 -168t88 -117t54 -31q20 38 52 110l72 162t85 190t90 192t88 170t79 124t62 53t38 -41q-26 -44 -79 -157t-119 -270t-140 -345t-144 -384q60 -10 103 -29t61 -47q-10 -12 -67 -25t-141 -25q-10 -28 -17 -53t-17 -53h77h79h68h44q16 -8 27 -24t3 -34q-70 -10 -156 -23 t-178 -29q-36 -116 -65 -224t-49 -203t-28 -174t-2 -137q-8 -26 -24 -49t-37 -33t-42 1t-37 55q-30 72 -27 156t24 177t54 195t65 208q-108 -20 -199 -36t-147 -26q-22 -4 -37 -3t-27 7t-23 19t-25 35z" /> -<glyph unicode="¦" horiz-adv-x="282" d="M56 368q0 90 1 170t1 112q0 14 1 25t3 32t4 58t4 107l130 8q-4 -128 -10 -229t-11 -197t-8 -197t-1 -229q-16 -34 -41 -30t-43 30q-4 6 -15 28t-13 28q0 32 -1 113t-1 171zM70 1008q2 64 5 134t5 132t4 107t2 59q0 4 3 30t10 60t16 68t22 55t28 20t33 -35q4 -146 3 -310 t-5 -310z" /> -<glyph unicode="§" horiz-adv-x="1510" d="M186 48q-30 20 0 53t94 72t148 81t163 80t139 66t76 42q56 48 75 85t10 64t-43 45t-82 32l-236 12q-82 12 -154 33t-107 52t-20 76t107 109q32 22 91 63t129 86t141 86t129 63q-90 14 -174 28t-129 40t-34 67t109 109q36 26 104 74t147 97t157 90t130 51q26 6 55 -4 t46 -28t16 -40t-33 -40q-142 -78 -274 -149t-264 -163q-10 -18 2 -33t28 -23q242 -26 373 -70t179 -98t25 -114t-89 -120t-164 -116t-200 -100q126 -42 167 -94t23 -110t-85 -117t-157 -113t-192 -100t-191 -77t-154 -44t-81 -3zM440 838q-12 -28 9 -42t52 -21t65 -10t50 -5 q66 36 139 71t139 65t114 54t62 36q80 70 88 111t-22 58t-79 14t-81 -21q-140 -78 -272 -149t-264 -161z" /> -<glyph unicode="¨" horiz-adv-x="1194" d="M257 1170q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM615 1183q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="©" horiz-adv-x="1706" d="M22 610q8 174 69 359t163 353t238 303t292 209t325 71t337 -113q102 -60 152 -161t57 -225t-23 -265t-91 -283t-148 -278t-191 -251t-223 -201t-242 -128t-247 -32t-242 86q-128 90 -181 236t-45 320zM136 603q-16 -129 17 -245t131 -204q110 -78 232 -70t244 78t236 188 t208 258q-76 -36 -165 -68t-174 -54t-158 -29t-117 7q-74 26 -108 74t-37 110t22 134t67 145t97 143t114 127t117 98t105 56t80 1t43 -68q4 -30 -7 -65t-32 -68t-47 -60t-51 -41t-45 -10t-28 34q24 38 51 75t55 71q-14 26 -64 -1t-114 -87t-127 -142t-103 -166t-43 -158 t55 -118q74 -6 171 19t196 62t190 75t151 60q54 98 94 195t61 187t22 169t-23 137q-30 138 -100 203t-163 72t-202 -38t-221 -127t-218 -193t-192 -238t-145 -263t-75 -265z" /> -<glyph unicode="ª" horiz-adv-x="1072" d="M45.5 585q-4.5 59 16.5 132t61.5 154t93.5 154t115 131t125 86.5t122.5 20t108.5 -69.5q30 -37 36 -75.5t-2 -78.5t-24 -81t-32 -83t-26 -86t-3 -89q6 -44 32.5 -60t66.5 -13t89 20.5t99 43t97.5 53.5t84 52.5t58.5 40.5l23 16q42 9 47.5 -5.5t-16.5 -42t-66 -63 t-101 -68.5t-120.5 -60.5t-124.5 -37.5t-114.5 1.5t-89.5 53.5q-15 18 -24.5 37t-26.5 32q-23 -22 -54.5 -55.5t-69.5 -67.5t-80 -64t-85.5 -46t-88.5 -11t-87 40q-36 30 -40.5 89zM103 547q10 -37 40.5 -43t72 11.5t90.5 55.5t97.5 92t92 119t74.5 137t45.5 146t3.5 146 q-26 22 -64.5 12t-83 -43t-91.5 -83.5t-90.5 -110t-82 -124t-64.5 -124t-37.5 -110t-2.5 -81.5z" /> -<glyph unicode="«" horiz-adv-x="1706" d="M32 818q4 40 54 86q22 20 68 62t105 95t123 111t123 111t105 95t68 62q12 4 35 0t41 -16t24 -29t-14 -39l-536 -536q-18 -18 -8 -44t36 -57t62 -62t70 -56t61 -43l33 -22q22 -16 68 -47t104 -70t123 -82t123 -82t105 -69t69 -44q26 -32 30 -63t-8 -51t-40 -22t-66 22 q-202 132 -407 268t-385 298q-40 36 -81 72t-65 74t-20 78zM530 886q4 40 54 84q22 20 68 63t105 96t123 111t123 111t105 95t68 62q12 4 35 0t41 -16t24 -30t-14 -38l-538 -538q-18 -16 -7 -43t37 -57t62 -61t70 -56t60 -43t32 -22q22 -16 68 -47t104 -70t123 -82t123 -82 t105 -70t69 -45q26 -32 31 -63t-8 -51t-41 -22t-66 24q-200 132 -405 268t-385 298q-40 36 -81 72t-65 74t-20 78z" /> -<glyph unicode="¬" horiz-adv-x="1288" d="M182 846q-10 16 26 34t102 36t154 32t182 22t186 7t166 -15t121 -42t53 -74l4 -434q-28 -52 -56 -29t-50 89t-34 160t-6 186q-36 2 -107 -6t-156 -18t-178 -17t-175 -5t-144 19t-88 55z" /> -<glyph unicode="­" horiz-adv-x="1244" d="M72 706q-32 32 4 62t115 55t189 43t227 28t229 8t195 -17t125 -45t18 -78q-26 0 -90 -4t-137 -8t-137 -8t-90 -6q-62 -6 -152 -30t-184 -40t-179 -12t-133 52z" /> -<glyph unicode="®" horiz-adv-x="1706" d="M22 610q8 174 69 359t163 353t238 303t292 209t325 71t337 -113q102 -60 152 -161t57 -225t-23 -265t-91 -283t-148 -278t-191 -251t-223 -201t-242 -128t-247 -32t-242 86q-128 90 -181 236t-45 320zM136 603q-16 -129 17 -245t131 -204q98 -72 208 -71t221 54t218 150 t199 217t166 254t119 262t57 241t-20 191q-30 138 -100 203t-163 72t-202 -38t-221 -127t-218 -193t-192 -238t-145 -263t-75 -265zM340 398q-10 24 14 83t66 135t92 159t92 154t69 121t23 62q-16 4 -33 -3l-34 -14t-33 -9t-28 14t3 29t25 19q206 132 378 186t284 49 t151 -60t-24 -142t-241 -196t-496 -223q-10 -20 38 -49t119 -63t149 -69t129 -69t59 -64t-62 -50q-2 -2 -38 14t-78 36t-78 38t-40 22q-106 76 -177 92t-117 -3t-74 -60t-49 -79t-41 -59t-48 -1zM654 882q210 56 336 118t186 120t63 104t-33 70t-102 18t-144 -51t-159 -137 t-147 -242z" /> -<glyph unicode="°" horiz-adv-x="820" d="M86 1225q16 51 55 104t88 97t99 73t88 33q124 16 179 -23t57 -102t-41 -137t-112 -131t-157 -84t-176 7q-62 24 -79 68t-1 95zM182 1174q12 -46 49 -57t84 4t97 49t91 75t65 83t17 73t-50 47t-137 2q-32 -28 -76 -52t-80 -54t-56 -70t-4 -100z" /> -<glyph unicode="±" horiz-adv-x="950" d="M56 568q2 2 10 6t17 9t17 9t12 4q16 4 56 12l85 17t86 17t57 12l54 394q2 14 16 23t29 9t27 -8t12 -24v-366q14 0 51 -4t78 -9t77 -9t50 -6q6 -2 29 -13t27 -17q-26 -42 -71 -56t-92 -20t-88 -16t-61 -48q-16 -32 -19 -65t0 -65t10 -64t11 -64q82 10 156 13t119 -5 t52 -31t-41 -63q-134 -16 -244 -41t-197 -40t-154 -9t-115 54q-10 10 14 23t70 28t109 29t131 26q-22 70 -27 148t-13 140h-284z" /> -<glyph unicode="²" horiz-adv-x="772" d="M38 372q3 12 14 23q47 43 93.5 84t90 83t81.5 87t69 99q16 28 13 41t-18 16.5t-38.5 -0.5t-48.5 -11.5t-48 -15t-37.5 -11.5t-17 -1.5t14.5 15.5q22 21 54.5 36.5t66 22.5t64 5.5t49.5 -15t21.5 -39t-20.5 -64.5q-27 -47 -66.5 -88t-82 -79.5t-81.5 -78.5t-62 -86 q19 -5 60.5 4t93 23.5t108 30t107 24t90 6.5t56.5 -22q2 -2 2 -11t-2 -12q-37 6 -88.5 -3.5t-109.5 -25t-119 -33.5t-117 -30t-102 -13t-76 17q-17 10 -14 22z" /> -<glyph unicode="³" horiz-adv-x="564" d="M22 526q-1 6 1 12t9 9q10 4 22.5 2t25.5 -7t25.5 -9t23.5 -2q15 2 40.5 16.5t56 37t63 51.5t61.5 60.5t51.5 63t32.5 60.5t5.5 52t-30.5 38q-17 5 -44.5 -4t-58 -22t-61 -25.5t-53.5 -15.5t-35 7.5t-6 43.5q13 21 34 52.5t43.5 68.5t42.5 76.5t31 74.5q-1 0 -16 -6 t-36 -12.5t-44.5 -12t-41.5 -5.5t-26 8t2 28q2 5 20 20t44 32.5t56 34t56 23.5t43.5 0.5t18.5 -35t-18.5 -83t-68.5 -142.5v-46q76 9 119 -10t59 -53.5t7.5 -82t-35 -97t-69.5 -97t-95.5 -82t-112.5 -53t-121 -9.5q-1 1 -5.5 7.5t-5.5 8.5q-2 5 -5.5 11.5t-4.5 12.5z" /> -<glyph unicode="´" horiz-adv-x="582" d="M66 1051q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="µ" horiz-adv-x="1002" d="M58 944q-2 60 38 86q22 -24 74 -102t119 -177t144 -206t150 -191t137 -130t106 -24q12 58 -13 134t-67 158t-90 166t-79 157t-35 129t40 86q18 -18 54 -75t79 -137t87 -172t77 -178t50 -158t7 -110q-22 -84 -57 -115t-78 -26t-92 40t-98 83t-96 101t-86 96t-68 66t-43 11 q-6 -44 20 -124t66 -178t84 -201t74 -191t37 -152t-29 -82l-78 -8q-40 224 -97 416t-114 351t-109 285t-82 219t-32 153z" /> -<glyph unicode="¶" horiz-adv-x="1398" d="M200 966q-8 98 38 169t129 116t195 64t240 12t262 -38t262 -87q-16 -34 -54 -118t-92 -195t-119 -240t-133 -253t-136 -233t-128 -181t-109 -97t-77 19q-2 4 -2 13t2 13q10 20 32 60t50 90t58 105t58 105t50 90t34 60q26 48 49 87t55 102t81 163t127 268 q-112 -12 -174 10q-20 -56 -56 -140t-82 -183t-100 -205t-109 -207t-108 -189t-98 -148t-79 -87t-50 -5q-10 42 4 96t38 110t51 108t45 92q14 28 50 101t77 157t77 161t50 117q-44 14 -90 13t-89 -7t-83 -10t-71 4t-51 35t-24 83z" /> -<glyph unicode="·" horiz-adv-x="804" d="M358 648q0 52 22 96t59 73t77 35t77 -17t59 -85q14 -36 6 -76t-30 -74t-54 -61t-65 -37t-65 -2t-54 44q-32 52 -32 104z" /> -<glyph unicode="¸" horiz-adv-x="606" d="M130 -394q-8 24 6 36t42 20t63 13t68 12t60 18t39 31q16 30 5 45t-35 22t-56 10t-60 10t-45 23t-13 50q-10 56 -7 103t14 66t30 0t41 -93q10 -32 38 -49t63 -28t71 -19t62 -20t37 -33t-5 -59q-4 -20 -47 -62t-103 -79t-126 -55t-114 10q-6 2 -16 13t-12 15z" /> -<glyph unicode="¹" horiz-adv-x="494" d="M12 471q3 38 18.5 77t35 73.5t27.5 48.5q6 12 22.5 45.5t38 78t47.5 95t47.5 95t38.5 77.5t22 44q5 10 11 28.5t14.5 39.5t19.5 40t24.5 28.5t31 5t38.5 -29.5q1 -1 -13.5 -36.5t-40 -93t-58 -130.5t-67.5 -149t-68.5 -149.5t-60.5 -131t-45.5 -93.5t-22.5 -37 q-3 -1 -17.5 4.5t-20.5 11.5q-25 20 -22 58z" /> -<glyph unicode="º" horiz-adv-x="820" d="M86 1225q16 51 55 104t88 97t99 73t88 33q124 16 179 -23t57 -102t-41 -137t-112 -131t-157 -84t-176 7q-62 24 -79 68t-1 95zM182 1174q12 -46 49 -57t84 4t97 49t91 75t65 83t17 73t-50 47t-137 2q-32 -28 -76 -52t-80 -54t-56 -70t-4 -100z" /> -<glyph unicode="»" horiz-adv-x="1472" d="M70 1384q0 6 7 15t16 18t18 16t15 7q54 -42 136 -94t170 -114t168 -131t128 -143t51 -152t-61 -156q-20 -26 -58 -71t-84 -100t-95 -114t-92 -110t-76 -90t-45 -53l-22 -22l-34 -34t-35 -34t-23 -22q-4 2 -12 10l-17 17t-17 18t-10 13q-24 48 10 108t99 127t146 139 t148 144t108 141t25 131q-2 6 -46 42t-109 88t-139 113t-136 119t-101 104t-33 70zM614 1398q0 6 8 15t17 18t18 16t15 7q52 -40 135 -93t170 -115t168 -131t129 -143t51 -152t-61 -156q-20 -26 -58 -71t-84 -100t-95 -113t-92 -110t-76 -91t-45 -53q-6 -6 -23 -22t-35 -34 t-35 -34t-23 -22q-4 2 -12 10l-17 17t-16 18t-9 13q-24 48 10 108t99 127t145 139t148 144t109 141t25 131q-2 6 -46 42t-109 88t-139 113t-137 119t-102 104t-33 70z" /> -<glyph unicode="¼" horiz-adv-x="1686" d="M83 473.5q2 32.5 16 66t31 63.5t24 42q5 10 20 39t34 67.5t42 82.5t42 82.5t33.5 67t19.5 38.5q4 7 9.5 23.5t13 34.5t17.5 34.5t21.5 25t27 4.5t33.5 -26q2 -1 -11 -31.5t-35.5 -80t-51.5 -112.5t-59.5 -129t-60 -129.5t-53.5 -113.5t-40 -81t-20 -32q-2 -1 -15 4 t-18 10q-22 18 -20 50.5zM320 77q-14 94 6 225.5t60 280t96 306.5t114 306.5t113 277t96 220.5q21 18 37 8.5t24 -31.5t10.5 -48.5t-0.5 -40.5q-9 -22 -25 -65t-36.5 -98.5t-43.5 -115.5t-43.5 -115t-37 -98.5t-23.5 -63.5q-10 -24 -30.5 -84t-42.5 -127t-41 -126t-25 -81 q-10 -34 -24.5 -104.5t-32 -150.5t-39 -156t-44.5 -119q-4 -8 -14 -17t-21.5 -12t-20.5 2t-12 27zM439.5 400.5q3.5 30.5 21.5 65t46 71.5t56 73.5t52.5 70.5t36.5 63q33 7 48 0.5t17 -21t-5.5 -34.5t-19 -40t-23 -37t-17.5 -27q-7 -10 -23.5 -34t-34.5 -51.5t-34.5 -51.5 t-23.5 -34v-27q35 -3 74 2.5t78 14.5t76 19t68 18q71 15 114 48t71 77t48.5 96.5t47.5 108.5q34 9 43 -7t2.5 -45.5t-22.5 -67t-33 -73.5t-30 -63t-10 -35q23 7 47.5 0t34.5 -26q-9 -16 -28 -22t-41.5 -10.5t-44 -11t-33.5 -23.5q-31 -38 -52.5 -80t-39 -86.5t-31 -89.5 t-25.5 -87q-5 -2 -12.5 -2.5t-15.5 1t-14.5 5.5t-7.5 10q-7 27 -1.5 54t17.5 53.5t26.5 53t26 52.5t16 52t-3.5 52q-30 4 -67 -4t-77 -19.5t-81.5 -23.5t-78.5 -16t-69 3t-53 33q-19 22 -15.5 52.5z" /> -<glyph unicode="½" horiz-adv-x="1422" d="M5 472q2 34 13 70t25 67t20 44q4 11 16 41.5t27.5 71t34 86.5t33.5 86.5t27 70.5l16 40q3 8 7.5 25t10.5 36.5t14 36.5t17.5 26t22 4.5t27.5 -27.5q1 -1 -9.5 -33t-28.5 -84t-41.5 -118.5t-48.5 -136t-48.5 -136t-43 -119t-32.5 -85t-16 -33.5q-2 -1 -12.5 4t-14.5 10 q-18 19 -16 53zM162 20q-12 98 6.5 232.5t57 288t91.5 315.5t108.5 315.5t108 285t91.5 227.5q21 18 35.5 7.5t22.5 -32.5t10.5 -49.5t-0.5 -41.5q-8 -22 -24 -67t-35.5 -101.5t-41 -118.5t-41.5 -119t-35.5 -101.5t-21.5 -64.5q-9 -24 -29 -86t-41 -131t-39 -130t-24 -83 q-9 -34 -23.5 -107.5t-30.5 -155.5t-36.5 -160t-42.5 -123q-5 -8 -14 -17t-20 -12t-20 2t-12 27zM378 143.5q4 15.5 17 30.5q53 58 107 112t103.5 110.5t94 116t79.5 130.5q18 37 14.5 55t-20.5 22t-44 -1t-56 -15t-55.5 -20t-43 -15t-19.5 -2t16 21q27 28 64 48t75.5 29.5 t74 7.5t57 -19.5t24 -51.5t-23.5 -87q-30 -62 -76 -116.5t-95 -106t-93.5 -104.5t-71.5 -114q22 -6 70 6t107.5 31t124 40t122.5 32.5t103.5 8.5t65.5 -30q3 -3 3 -15t-3 -15q-43 7 -102.5 -5.5t-126 -33t-137 -44.5t-134.5 -39.5t-117 -17t-87 22.5q-21 13 -17 28.5z" /> -<glyph unicode="¾" horiz-adv-x="1686" d="M23.5 518.5q-1.5 6.5 0.5 13t11 10.5q11 4 25 2t29 -7.5t29 -10t27 -2.5q16 2 45 18t64 41t71.5 56.5t69.5 66.5t58.5 69.5t37 66.5t6.5 57.5t-34 41.5q-20 5 -51.5 -4.5t-66 -24.5t-69 -28.5t-60.5 -17t-40 8.5t-7 48q15 23 39 57.5t49.5 75.5t48.5 84.5t35 82.5 q-1 0 -18 -6.5t-41 -14.5t-50.5 -13.5t-47 -5.5t-29.5 8.5t2 31.5q2 4 22.5 20.5t50 36t64 38t63.5 26t49 0.5t21 -38t-21 -91.5t-77 -156.5v-51q86 9 135 -11.5t66.5 -58.5t8 -90t-39.5 -107t-78.5 -106.5t-108.5 -90t-128 -58.5t-137 -11q-1 2 -6 9t-6 9q-2 6 -6 13 t-5.5 13.5zM347 43q-11 98 5 234t49.5 290.5t80 318.5t94.5 318.5t94 287.5t80 229q18 19 30.5 8.5t19.5 -33t9 -50t-1 -41.5q-6 -23 -20 -68t-31 -102.5t-36 -120t-36 -119.5t-30.5 -102t-19.5 -66q-8 -24 -25 -86.5t-35.5 -132t-34 -131t-20.5 -84.5q-9 -34 -21 -108 t-26.5 -157t-32 -161.5t-36.5 -123.5q-4 -9 -12.5 -18t-18 -12t-17 2t-9.5 28zM471.5 485q3.5 38 20.5 81.5t44 89.5t53.5 92t49.5 88.5t34 79.5q33 8 46.5 -0.5t16 -26.5t-5 -43t-18.5 -50t-22 -46.5t-17 -33.5q-6 -13 -21.5 -43.5t-33 -64.5t-33 -64.5t-21.5 -41.5v-34 q33 -4 70 2.5t74.5 17.5t72.5 24t64 23q68 19 109 60.5t68 96.5t46 120.5t45 135.5q32 12 41 -8t3 -57t-21.5 -84.5t-32 -92t-28.5 -78.5t-10 -44q22 9 45.5 0.5t33.5 -33.5q-9 -20 -27.5 -27.5t-39.5 -13t-41.5 -13.5t-32.5 -29q-29 -48 -49.5 -101t-37 -108.5t-29.5 -112 t-25 -109.5q-4 -2 -11.5 -2.5t-15 1t-13.5 6.5t-8 13q-6 34 -0.5 67.5t16.5 67t25 66.5t25 66t15.5 65.5t-3.5 64.5q-29 5 -64 -5t-73 -24.5t-77.5 -29t-75 -20t-66 3.5t-50.5 41q-18 29 -14.5 67z" /> -<glyph unicode="¿" horiz-adv-x="1016" d="M-262.5 164q-6.5 61 24.5 121q39 77 86.5 138t98.5 116t104 106.5t100.5 110t90 127t73.5 154.5q4 8 10.5 16t13.5 9.5t12.5 -3.5t7.5 -22q8 -45 -13 -100.5t-58.5 -118.5t-88 -129t-104 -132t-105.5 -129.5t-92 -121t-64 -105.5t-22 -83.5t34.5 -55t105.5 -19.5h350 q9 -34 1 -65t-31 -31h-365q-32 0 -70 30t-65.5 78t-34 109zM307.5 1573q1.5 27 9.5 31t25 -39q9 -22 15 -46t0 -51q-9 -49 -19 -49t-17.5 26t-11 63.5t-2 64.5z" /> -<glyph unicode="À" horiz-adv-x="2118" d="M-254 -366q2 16 28 16q40 -54 104 -57t142 30t163 95t167 136t157 154t132 151t91 124t34 73q0 8 -21 24t-46 33t-48 32t-27 23q8 24 48 39t90 26t98 22t74 27q88 128 161 238t136 212t122 199t120 200t127 216t146 245q32 54 52 37t31 -84t13 -172t-1 -225t-9 -244 t-11 -229t-9 -181t-2 -100q8 -126 12 -220t25 -173t69 -153t148 -160q-82 -26 -135 5t-87 94t-55 147t-41 162t-43 138t-63 76q-4 0 -15 1t-24 1t-26 -1t-19 -1q-14 -4 -47 -11t-77 -18t-93 -23t-95 -24t-83 -21t-57 -15q-62 -16 -131 -79t-145 -152t-157 -194t-166 -205 t-173 -186t-176 -137t-176 -58t-174 51q-8 6 -24 24t-26 37t-8 35zM1160 638q6 -2 27 -2t27 2q44 6 112 16t137 24t126 33t79 41l7 52t17 133t21 181t21 195t17 176t9 125q-26 12 -72 -63t-117 -208t-172 -310t-239 -365v-30zM1708 2135q-14 33 0 107q54 4 110 -33t102 -90 t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="Á" horiz-adv-x="2118" d="M-254 -366q2 16 28 16q40 -54 104 -57t142 30t163 95t167 136t157 154t132 151t91 124t34 73q0 8 -21 24t-46 33t-48 32t-27 23q8 24 48 39t90 26t98 22t74 27q88 128 161 238t136 212t122 199t120 200t127 216t146 245q32 54 52 37t31 -84t13 -172t-1 -225t-9 -244 t-11 -229t-9 -181t-2 -100q8 -126 12 -220t25 -173t69 -153t148 -160q-82 -26 -135 5t-87 94t-55 147t-41 162t-43 138t-63 76q-4 0 -15 1t-24 1t-26 -1t-19 -1q-14 -4 -47 -11t-77 -18t-93 -23t-95 -24t-83 -21t-57 -15q-62 -16 -131 -79t-145 -152t-157 -194t-166 -205 t-173 -186t-176 -137t-176 -58t-174 51q-8 6 -24 24t-26 37t-8 35zM1160 638q6 -2 27 -2t27 2q44 6 112 16t137 24t126 33t79 41l7 52t17 133t21 181t21 195t17 176t9 125q-26 12 -72 -63t-117 -208t-172 -310t-239 -365v-30zM1516 1849q4 35 38 93t86 112t114 93t122 35 q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="Â" horiz-adv-x="2118" d="M-254 -366q2 16 28 16q40 -54 104 -57t142 30t163 95t167 136t157 154t132 151t91 124t34 73q0 8 -21 24t-46 33t-48 32t-27 23q8 24 48 39t90 26t98 22t74 27q88 128 161 238t136 212t122 199t120 200t127 216t146 245q32 54 52 37t31 -84t13 -172t-1 -225t-9 -244 t-11 -229t-9 -181t-2 -100q8 -126 12 -220t25 -173t69 -153t148 -160q-82 -26 -135 5t-87 94t-55 147t-41 162t-43 138t-63 76q-4 0 -15 1t-24 1t-26 -1t-19 -1q-14 -4 -47 -11t-77 -18t-93 -23t-95 -24t-83 -21t-57 -15q-62 -16 -131 -79t-145 -152t-157 -194t-166 -205 t-173 -186t-176 -137t-176 -58t-174 51q-8 6 -24 24t-26 37t-8 35zM1160 638q6 -2 27 -2t27 2q44 6 112 16t137 24t126 33t79 41l7 52t17 133t21 181t21 195t17 176t9 125q-26 12 -72 -63t-117 -208t-172 -310t-239 -365v-30zM1440 1896q12 22 44 48t68 53t67 54t43 49 q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="Ã" horiz-adv-x="2118" d="M-254 -366q2 16 28 16q40 -54 104 -57t142 30t163 95t167 136t157 154t132 151t91 124t34 73q0 8 -21 24t-46 33t-48 32t-27 23q8 24 48 39t90 26t98 22t74 27q88 128 161 238t136 212t122 199t120 200t127 216t146 245q32 54 52 37t31 -84t13 -172t-1 -225t-9 -244 t-11 -229t-9 -181t-2 -100q8 -126 12 -220t25 -173t69 -153t148 -160q-82 -26 -135 5t-87 94t-55 147t-41 162t-43 138t-63 76q-4 0 -15 1t-24 1t-26 -1t-19 -1q-14 -4 -47 -11t-77 -18t-93 -23t-95 -24t-83 -21t-57 -15q-62 -16 -131 -79t-145 -152t-157 -194t-166 -205 t-173 -186t-176 -137t-176 -58t-174 51q-8 6 -24 24t-26 37t-8 35zM1160 638q6 -2 27 -2t27 2q44 6 112 16t137 24t126 33t79 41l7 52t17 133t21 181t21 195t17 176t9 125q-26 12 -72 -63t-117 -208t-172 -310t-239 -365v-30zM1438 1809q8 41 37 99t72 113t96 96t109 51 t112 -22t104 -126q24 -106 65 -147t94 -38t117 40t131 85t136 96t135 76q14 -24 -15 -70t-85 -100t-131 -107t-152 -89t-148 -48t-119 18q-54 10 -88 39t-55 67t-33 77t-26 66t-31 37t-48 -11t-79 -79t-122 -166q-50 -30 -67 -14t-9 57z" /> -<glyph unicode="Ä" horiz-adv-x="2118" d="M-254 -366q2 16 28 16q40 -54 104 -57t142 30t163 95t167 136t157 154t132 151t91 124t34 73q0 8 -21 24t-46 33t-48 32t-27 23q8 24 48 39t90 26t98 22t74 27q88 128 161 238t136 212t122 199t120 200t127 216t146 245q32 54 52 37t31 -84t13 -172t-1 -225t-9 -244 t-11 -229t-9 -181t-2 -100q8 -126 12 -220t25 -173t69 -153t148 -160q-82 -26 -135 5t-87 94t-55 147t-41 162t-43 138t-63 76q-4 0 -15 1t-24 1t-26 -1t-19 -1q-14 -4 -47 -11t-77 -18t-93 -23t-95 -24t-83 -21t-57 -15q-62 -16 -131 -79t-145 -152t-157 -194t-166 -205 t-173 -186t-176 -137t-176 -58t-174 51q-8 6 -24 24t-26 37t-8 35zM1160 638q6 -2 27 -2t27 2q44 6 112 16t137 24t126 33t79 41l7 52t17 133t21 181t21 195t17 176t9 125q-26 12 -72 -63t-117 -208t-172 -310t-239 -365v-30zM1517 2106q17 52 57 82t87 24t73 -70 q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM1875 2119q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="Å" horiz-adv-x="2118" d="M-254 -366q2 16 28 16q40 -54 104 -57t142 30t163 95t167 136t157 154t132 151t91 124t34 73q0 8 -21 24t-46 33t-48 32t-27 23q8 24 48 39t90 26t98 22t74 27q88 128 161 238t136 212t122 199t120 200t127 216t146 245q32 54 52 37t31 -84t13 -172t-1 -225t-9 -244 t-11 -229t-9 -181t-2 -100q8 -126 12 -220t25 -173t69 -153t148 -160q-82 -26 -135 5t-87 94t-55 147t-41 162t-43 138t-63 76q-4 0 -15 1t-24 1t-26 -1t-19 -1q-14 -4 -47 -11t-77 -18t-93 -23t-95 -24t-83 -21t-57 -15q-62 -16 -131 -79t-145 -152t-157 -194t-166 -205 t-173 -186t-176 -137t-176 -58t-174 51q-8 6 -24 24t-26 37t-8 35zM1160 638q6 -2 27 -2t27 2q44 6 112 16t137 24t126 33t79 41l7 52t17 133t21 181t21 195t17 176t9 125q-26 12 -72 -63t-117 -208t-172 -310t-239 -365v-30zM1528 1954q-16 42 1 91t58 99t90 92t100 70 t89 32q124 16 178 -21t55 -98t-43 -133t-114 -127t-159 -80t-177 9q-62 24 -78 66zM1642 2038q12 -66 62 -72t110 22t113 77t71 91t-15 65t-145 -1q-32 -28 -63 -47t-58 -38t-47 -41t-28 -56z" /> -<glyph unicode="Æ" horiz-adv-x="3982" d="M-485 -5q5 15 31 9q28 -62 90 -77t144 3t178 62t191 101t184 122t159 123t114 104t48 66q2 8 -15 27t-39 41t-42 41t-22 29q12 20 54 27t93 8t100 2t77 13q112 108 202 190t168 151t151 132t150 133t163 154t194 196q66 70 104 81t52 -22t9 -103t-23 -164q84 32 203 66 t253 65t275 57t271 43t241 23t183 -3t98 -36t-12 -77q-22 -6 -46 -1t-49 12t-51 13t-52 4q-120 -10 -235 -35t-231 -54t-231 -59t-235 -50q-124 -20 -208 -54t-137 -80t-81 -102t-42 -123t-19 -145t-13 -164q28 -6 104 12t175 43t208 52t206 38t170 0t97 -59q2 -4 2 -14 t-2 -14q-132 -20 -273 -36t-280 -40t-272 -65t-249 -113q-2 -4 -4 -6t-4 -6q-4 -18 -7 -34t-7 -30q-28 -144 -79 -299t-103 -299q74 20 155 39t152 34t120 24t61 11q212 34 409 53t409 5q18 -4 25 -20t9 -34t0 -35t-4 -25q-274 14 -541 -21t-535 -93q-28 -6 -66 -20t-79 -29 t-85 -30t-84 -21q-48 -144 -68 -243t16 -127q-56 -6 -84 22t-36 82t0 128t26 158q-6 4 -11 10t-7 16q-14 12 8 28q24 90 51 171t57 161q14 60 24 112t13 94t-2 70t-21 40q-4 0 -15 3t-24 5t-26 5t-19 3q-22 0 -77 21t-119 46t-124 45t-90 18q-64 -4 -144 -52t-172 -121 t-192 -160t-203 -169t-205 -149t-199 -101t-184 -24t-161 84q-6 6 -18 27t-18 43t-1 37zM1096 708q4 -4 25 -8t27 -2q44 -4 103 -32t112 -60t91 -58l38 -26l68 46q0 2 2 4l4 12q-10 18 -12 36t20 40q4 4 20 6q22 66 53 161t62 191t56 182t37 134q-10 -20 -36 -55t-99 -101 t-207 -173t-360 -269z" /> -<glyph unicode="Ç" horiz-adv-x="1582" d="M12 320q-12 94 18 202t89 223t142 232t177 228t193 212t191 184t170 144t130 93q90 54 150 54t96 -37t50 -101t13 -136t-15 -143t-35 -124t-45 -77t-46 -2q-2 20 5 62t18 93t22 106t15 102t-3 79t-29 38q-72 18 -164 -20t-195 -116t-209 -188t-205 -236t-184 -260 t-144 -260t-87 -236t-14 -188t78 -116t188 -20q94 14 179 56t165 100t155 126t150 133t152 120t159 89q44 16 72 -14t14 -72t-89 -112t-183 -147t-238 -153t-254 -131t-230 -79t-166 0q-122 48 -183 123t-73 169zM546 -320q-8 24 6 36t42 20t63 13t68 12t60 18t39 31 q16 30 5 45t-35 22t-56 10t-60 10t-45 23t-13 50q-10 56 -7 103t14 66t30 0t41 -93q10 -32 38 -49t63 -28t71 -19t62 -20t37 -33t-5 -59q-4 -20 -47 -62t-103 -79t-126 -55t-114 10q-6 2 -16 13t-12 15z" /> -<glyph unicode="È" horiz-adv-x="1864" d="M44 58q-14 12 8 28q24 90 52 173t58 164t63 164t71 175q12 24 -5 48t-37 48t-30 49t18 53q2 2 19 7t36 9t36 8t21 6t12 9t17 16l17 17t10 12q38 68 75 121t68 105t58 110t45 136q8 30 -14 38t-49 16t-46 24t-3 62q10 28 96 60t219 62t297 55t329 40t316 18t256 -11 t149 -48t-2 -92q-22 -6 -46 -1t-49 12t-51 13t-52 4q-120 -10 -236 -8t-230 2t-229 -9t-231 -41q-80 -22 -142 -79t-119 -143t-114 -199t-125 -247q28 -6 104 12t175 43t208 52t206 38t170 0t97 -59q2 -4 2 -14t-2 -14q-132 -20 -273 -36t-280 -40t-272 -65t-249 -113 q-96 -168 -171 -345t-133 -361q72 26 168 50t185 43t156 32t79 15q212 34 409 53t409 5q18 -4 25 -20t9 -34t0 -35t-4 -25q-274 14 -541 -21t-535 -93q-42 -10 -103 -34t-125 -44t-123 -27t-99 19q-10 4 -17 11t-11 21zM856 2153q-14 33 0 107q54 4 110 -33t102 -90t75 -108 t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="É" horiz-adv-x="1864" d="M44 58q-14 12 8 28q24 90 52 173t58 164t63 164t71 175q12 24 -5 48t-37 48t-30 49t18 53q2 2 19 7t36 9t36 8t21 6t12 9t17 16l17 17t10 12q38 68 75 121t68 105t58 110t45 136q8 30 -14 38t-49 16t-46 24t-3 62q10 28 96 60t219 62t297 55t329 40t316 18t256 -11 t149 -48t-2 -92q-22 -6 -46 -1t-49 12t-51 13t-52 4q-120 -10 -236 -8t-230 2t-229 -9t-231 -41q-80 -22 -142 -79t-119 -143t-114 -199t-125 -247q28 -6 104 12t175 43t208 52t206 38t170 0t97 -59q2 -4 2 -14t-2 -14q-132 -20 -273 -36t-280 -40t-272 -65t-249 -113 q-96 -168 -171 -345t-133 -361q72 26 168 50t185 43t156 32t79 15q212 34 409 53t409 5q18 -4 25 -20t9 -34t0 -35t-4 -25q-274 14 -541 -21t-535 -93q-42 -10 -103 -34t-125 -44t-123 -27t-99 19q-10 4 -17 11t-11 21zM864 1901q4 35 38 93t86 112t114 93t122 35 q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="Ê" horiz-adv-x="1864" d="M44 58q-14 12 8 28q24 90 52 173t58 164t63 164t71 175q12 24 -5 48t-37 48t-30 49t18 53q2 2 19 7t36 9t36 8t21 6t12 9t17 16l17 17t10 12q38 68 75 121t68 105t58 110t45 136q8 30 -14 38t-49 16t-46 24t-3 62q10 28 96 60t219 62t297 55t329 40t316 18t256 -11 t149 -48t-2 -92q-22 -6 -46 -1t-49 12t-51 13t-52 4q-120 -10 -236 -8t-230 2t-229 -9t-231 -41q-80 -22 -142 -79t-119 -143t-114 -199t-125 -247q28 -6 104 12t175 43t208 52t206 38t170 0t97 -59q2 -4 2 -14t-2 -14q-132 -20 -273 -36t-280 -40t-272 -65t-249 -113 q-96 -168 -171 -345t-133 -361q72 26 168 50t185 43t156 32t79 15q212 34 409 53t409 5q18 -4 25 -20t9 -34t0 -35t-4 -25q-274 14 -541 -21t-535 -93q-42 -10 -103 -34t-125 -44t-123 -27t-99 19q-10 4 -17 11t-11 21zM718 1996q12 22 44 48t68 53t67 54t43 49 q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="Ë" horiz-adv-x="1864" d="M44 58q-14 12 8 28q24 90 52 173t58 164t63 164t71 175q12 24 -5 48t-37 48t-30 49t18 53q2 2 19 7t36 9t36 8t21 6t12 9t17 16l17 17t10 12q38 68 75 121t68 105t58 110t45 136q8 30 -14 38t-49 16t-46 24t-3 62q10 28 96 60t219 62t297 55t329 40t316 18t256 -11 t149 -48t-2 -92q-22 -6 -46 -1t-49 12t-51 13t-52 4q-120 -10 -236 -8t-230 2t-229 -9t-231 -41q-80 -22 -142 -79t-119 -143t-114 -199t-125 -247q28 -6 104 12t175 43t208 52t206 38t170 0t97 -59q2 -4 2 -14t-2 -14q-132 -20 -273 -36t-280 -40t-272 -65t-249 -113 q-96 -168 -171 -345t-133 -361q72 26 168 50t185 43t156 32t79 15q212 34 409 53t409 5q18 -4 25 -20t9 -34t0 -35t-4 -25q-274 14 -541 -21t-535 -93q-42 -10 -103 -34t-125 -44t-123 -27t-99 19q-10 4 -17 11t-11 21zM903 2040q17 52 57 82t87 24t73 -70q14 -38 -5 -79 t-54 -67t-75 -29t-64 33q-36 54 -19 106zM1261 2053q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="Ì" horiz-adv-x="550" d="M27 134q3 32 10 64t13 56t8 28l564 1470q12 30 22 34t19 -9t15 -38t9 -54t1 -57t-10 -46q-80 -190 -161 -380t-156 -384t-139 -391t-110 -399q-18 -12 -33 -10t-25 13t-17 26t-9 27q-4 18 -1 50zM356 2113q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33 t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="Í" horiz-adv-x="550" d="M27 134q3 32 10 64t13 56t8 28l564 1470q12 30 22 34t19 -9t15 -38t9 -54t1 -57t-10 -46q-80 -190 -161 -380t-156 -384t-139 -391t-110 -399q-18 -12 -33 -10t-25 13t-17 26t-9 27q-4 18 -1 50zM294 1837q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59 t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="Î" horiz-adv-x="550" d="M27 134q3 32 10 64t13 56t8 28l564 1470q12 30 22 34t19 -9t15 -38t9 -54t1 -57t-10 -46q-80 -190 -161 -380t-156 -384t-139 -391t-110 -399q-18 -12 -33 -10t-25 13t-17 26t-9 27q-4 18 -1 50zM366 1878q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54 t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="Ï" horiz-adv-x="550" d="M27 134q3 32 10 64t13 56t8 28l564 1470q12 30 22 34t19 -9t15 -38t9 -54t1 -57t-10 -46q-80 -190 -161 -380t-156 -384t-139 -391t-110 -399q-18 -12 -33 -10t-25 13t-17 26t-9 27q-4 18 -1 50zM341 2072q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29 t-64 33q-36 54 -19 106zM699 2085q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="Ð" horiz-adv-x="2058" d="M-59 911q29 27 96 51t163 42t202 30q40 90 76 168t56 130q-22 72 -8 129t50 103t85 85t99 77q142 104 307 162t337 64t341 -44t319 -164q120 -100 141 -217t-33 -241t-171 -252t-272 -251t-336 -236t-362 -209t-352 -169t-305 -116t-219 -52t-97 27q-14 38 4 67t52 47 q156 78 304 131t292 107t287 121t289 171q262 152 425 288t245 253t93 214t-32 172t-129 125t-199 74t-243 19t-259 -40t-247 -103t-208 -172q-2 -4 -7 -17t-9 -27t-8 -27t-4 -15q-26 -114 -51 -203t-53 -165q100 4 189 -2t153 -22t93 -44t9 -70q-26 0 -90 -4t-137 -8 t-137 -8t-90 -6q-14 -2 -30 -4t-32 -6q-36 -78 -74 -144t-76 -133t-76 -143t-74 -172q-44 -14 -64 3t-22 53t9 84t26 93t30 82t21 53q10 32 30 76t44 96q-54 -10 -106 -17t-100 -5t-88 14t-66 40q-30 30 -1 57z" /> -<glyph unicode="Ñ" horiz-adv-x="2074" d="M26 28q0 22 2 30q16 78 60 172t96 187t103 177t81 142q14 30 46 91t70 139t81 164t83 164t70 140t46 92q58 60 101 54t78 -61t62 -148t53 -208t52 -241t57 -245t70 -223t91 -172q32 -16 78 32t101 139t116 215t122 259t119 271t106 253t85 204t57 123q18 32 36 31t32 -20 t20 -48t-2 -51q-80 -218 -150 -392t-144 -337t-158 -332t-192 -375q-40 -48 -78 -77t-76 -32t-77 23t-79 86q-82 146 -130 275t-81 256t-60 259t-67 284q-16 10 -51 -26t-81 -104t-100 -160t-109 -194t-109 -204t-99 -191t-79 -155t-50 -96q-12 -22 -32 -56t-38 -65t-32 -54 l-14 -23h-84q-2 6 -2 28zM724 1781q8 41 37 99t72 113t96 96t109 51t112 -22t104 -126q24 -106 65 -147t94 -38t117 40t131 85t136 96t135 76q14 -24 -15 -70t-85 -100t-131 -107t-152 -89t-148 -48t-119 18q-54 10 -88 39t-55 67t-33 77t-26 66t-31 37t-48 -11t-79 -79 t-122 -166q-50 -30 -67 -14t-9 57z" /> -<glyph unicode="Ò" horiz-adv-x="1318" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69t187 -17t164 -96t113 -169t33 -238t-75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71t-154 -33t-146 25q-84 36 -128 90t-59 120t-6 139zM156 226 q26 -114 95 -141t164 10t208 128t225 212t215 263t178 282t115 268t27 221t-90 141t-233 28q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270t-20 -232zM812 2131q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45 t-43 54z" /> -<glyph unicode="Ó" horiz-adv-x="1318" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69t187 -17t164 -96t113 -169t33 -238t-75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71t-154 -33t-146 25q-84 36 -128 90t-59 120t-6 139zM156 226 q26 -114 95 -141t164 10t208 128t225 212t215 263t178 282t115 268t27 221t-90 141t-233 28q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270t-20 -232zM730 1815q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60 t-29 35z" /> -<glyph unicode="Ô" horiz-adv-x="1318" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69t187 -17t164 -96t113 -169t33 -238t-75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71t-154 -33t-146 25q-84 36 -128 90t-59 120t-6 139zM156 226 q26 -114 95 -141t164 10t208 128t225 212t215 263t178 282t115 268t27 221t-90 141t-233 28q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270t-20 -232zM900 1920q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52 t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="Õ" horiz-adv-x="1318" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69t187 -17t164 -96t113 -169t33 -238t-75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71t-154 -33t-146 25q-84 36 -128 90t-59 120t-6 139zM156 226 q26 -114 95 -141t164 10t208 128t225 212t215 263t178 282t115 268t27 221t-90 141t-233 28q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270t-20 -232zM702 1831q8 41 37 99t72 113t96 96t109 51t112 -22t104 -126q24 -106 65 -147t94 -38t117 40t131 85 t136 96t135 76q14 -24 -15 -70t-85 -100t-131 -107t-152 -89t-148 -48t-119 18q-54 10 -88 39t-55 67t-33 77t-26 66t-31 37t-48 -11t-79 -79t-122 -166q-50 -30 -67 -14t-9 57z" /> -<glyph unicode="Ö" horiz-adv-x="1318" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69t187 -17t164 -96t113 -169t33 -238t-75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71t-154 -33t-146 25q-84 36 -128 90t-59 120t-6 139zM156 226 q26 -114 95 -141t164 10t208 128t225 212t215 263t178 282t115 268t27 221t-90 141t-233 28q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270t-20 -232zM829 2018q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM1187 2031 q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="×" horiz-adv-x="1706" d="M213 292q21 32 64 65t100 67t105 70t78 75t20 81q-2 12 -15 57t-27 98t-27 98t-15 57q-2 6 -2 28t2 30q22 16 43 2t41 -46t39 -74t37 -82t34 -71t30 -41q44 30 96 71t102 85t95 85t75 71q52 26 73 22t22 -26t-14 -55t-32 -64t-33 -53l-16 -22q-148 -98 -216 -152t-82 -88 t9 -63t57 -75t63 -122t27 -208q-74 -22 -111 4t-53 76t-20 113t-13 114t-31 79t-73 8t-140 -98t-233 -240q-4 2 -12 10l-17 17t-17 18t-10 13q-24 34 -3 66z" /> -<glyph unicode="Ø" horiz-adv-x="1318" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69t187 -17t164 -96t113 -169t33 -238t-75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71t-154 -33t-146 25q-84 36 -128 90t-59 120t-6 139zM156 226 q26 -114 95 -141t164 10t208 128t225 212t215 263t178 282t115 268t27 221t-90 141t-233 28q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270t-20 -232zM465 -231q-19 125 9 297.5t85 368t136.5 403t162 403.5t161 364.5t136.5 290.5q30 24 52.5 11t34 -41.5 t15 -63.5t-1.5 -54q-11 -28 -34.5 -85t-52.5 -129.5t-62 -152t-62 -152t-52.5 -129.5t-32.5 -83q-14 -31 -43 -110t-60.5 -167.5t-58.5 -166t-36 -106.5q-14 -44 -35 -137.5t-45.5 -198.5t-55 -205t-62.5 -157q-7 -10 -21 -21.5t-30.5 -15.5t-29.5 2.5t-17 34.5z" /> -<glyph unicode="Ù" horiz-adv-x="1520" d="M82 471q10 139 52 293t101 303t125 284t123 237t96 162t43 58q20 -10 28 -27t9 -36t-2 -40t-5 -37q0 -4 -5 -12t-10 -18t-10 -18t-5 -10q-194 -426 -292 -715t-120 -462t21 -242t132 -55t213 98t262 217t282 302t272 354t230 373t158 358q4 4 14 15t14 11q56 -38 55 -119 t-45 -192t-126 -243t-187 -272t-228 -280t-249 -265t-249 -227t-230 -168t-190 -87t-131 17q-92 72 -124 188t-22 255zM820 2029q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="Ú" horiz-adv-x="1520" d="M82 471q10 139 52 293t101 303t125 284t123 237t96 162t43 58q20 -10 28 -27t9 -36t-2 -40t-5 -37q0 -4 -5 -12t-10 -18t-10 -18t-5 -10q-194 -426 -292 -715t-120 -462t21 -242t132 -55t213 98t262 217t282 302t272 354t230 373t158 358q4 4 14 15t14 11q56 -38 55 -119 t-45 -192t-126 -243t-187 -272t-228 -280t-249 -265t-249 -227t-230 -168t-190 -87t-131 17q-92 72 -124 188t-22 255zM892 1817q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="Û" horiz-adv-x="1520" d="M82 471q10 139 52 293t101 303t125 284t123 237t96 162t43 58q20 -10 28 -27t9 -36t-2 -40t-5 -37q0 -4 -5 -12t-10 -18t-10 -18t-5 -10q-194 -426 -292 -715t-120 -462t21 -242t132 -55t213 98t262 217t282 302t272 354t230 373t158 358q4 4 14 15t14 11q56 -38 55 -119 t-45 -192t-126 -243t-187 -272t-228 -280t-249 -265t-249 -227t-230 -168t-190 -87t-131 17q-92 72 -124 188t-22 255zM888 1950q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8 q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="Ü" horiz-adv-x="1520" d="M82 471q10 139 52 293t101 303t125 284t123 237t96 162t43 58q20 -10 28 -27t9 -36t-2 -40t-5 -37q0 -4 -5 -12t-10 -18t-10 -18t-5 -10q-194 -426 -292 -715t-120 -462t21 -242t132 -55t213 98t262 217t282 302t272 354t230 373t158 358q4 4 14 15t14 11q56 -38 55 -119 t-45 -192t-126 -243t-187 -272t-228 -280t-249 -265t-249 -227t-230 -168t-190 -87t-131 17q-92 72 -124 188t-22 255zM899 2122q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM1257 2135q17 53 57 82t87 23t73 -70q14 -38 -5 -79 t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="Ý" horiz-adv-x="1004" d="M87 1689q7 19 53 -3q36 -32 87 -104t108 -161t116 -183t109 -168t88 -117t54 -31q20 38 52 110l72 162t85 190t90 192t88 170t79 124t62 53t38 -41q8 -36 -24 -130t-91 -226t-140 -293t-170 -333t-178 -346t-166 -333t-135 -291t-84 -222q-8 -26 -24 -49t-37 -33t-42 1 t-37 53q-30 74 -8 158t73 175t118 189t127 201t101 212t39 223q-10 24 -44 77t-82 125t-104 153t-107 161t-92 150t-61 118t-13 67zM468 1869q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="Þ" horiz-adv-x="1502" d="M-174 -364q26 52 66 155t89 239t105 297t115 330t119 336t118 316t111 270t98 197t78 99t53 -25q38 -34 39 -77t-21 -95t-58 -114t-74 -135t-70 -158t-42 -183q210 160 370 237t272 91t176 -26t84 -115t-3 -173t-88 -201t-169 -201t-247 -170t-322 -110t-391 -22 q-2 2 -17 -57t-37 -149t-48 -194t-48 -194t-37 -149t-15 -57t-33 7t-72 12t-70 12t-31 7zM350 564q0 -32 4 -42q124 -6 249 20t236 77t202 124t150 159t79 183t-10 199q0 2 -11 3t-23 0t-23 -1h-13q-84 12 -171 -13t-172 -76t-163 -122t-143 -150t-114 -162t-73 -157 q-4 -10 -4 -42z" /> -<glyph unicode="ß" horiz-adv-x="1660" d="M62 96q4 72 16 140t34 120q8 16 21 73t29 134t33 165t33 166t29 135t19 73q32 76 29 133t-12 108t-6 100t47 111q6 8 31 37t54 62t54 62t31 37q14 16 73 60t146 98t192 114t211 110t202 83t165 35t102 -34t11 -126q-22 -86 -73 -165t-119 -154t-145 -147t-151 -142 t-138 -141t-104 -145q230 -8 375 -45t220 -93t89 -128t-19 -150t-105 -157t-168 -150t-208 -131t-226 -98t-222 -50t-194 12l20 78q240 0 421 56t303 140t186 184t68 188t-52 152t-173 74t-295 -44t-418 -202l50 274q80 68 185 157t215 188t214 200t181 190t118 161t23 114 q-72 12 -153 -9t-163 -65t-164 -103t-155 -122t-135 -126t-106 -111q-88 -192 -172 -423t-143 -477t-80 -497t15 -485q-42 2 -72 37t-47 91t-24 126t-3 142z" /> -<glyph unicode="à" horiz-adv-x="1754" d="M75 206q-7 98 27 219t101 255t154 255t189 217t205 143t201 33t178 -114q50 -62 60 -126t-3 -130t-40 -134t-53 -138t-42 -143t-6 -147q10 -72 54 -99t110 -22t146 34t162 71t160 89t138 87t97 67l37 27q70 14 79 -10t-27 -69t-109 -104t-166 -114t-198 -100t-205 -62 t-188 2t-146 89q-26 30 -41 61t-43 53q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76t-146 -18t-142 66q-60 50 -67 148zM170 142q16 -60 66 -70t118 19t149 92t160 152t151 197t123 227t75 242t6 243q-44 36 -107 19t-136 -71t-150 -138t-149 -183t-135 -206t-106 -205 t-62 -182t-3 -136zM830 1681q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="á" horiz-adv-x="1754" d="M75 206q-7 98 27 219t101 255t154 255t189 217t205 143t201 33t178 -114q50 -62 60 -126t-3 -130t-40 -134t-53 -138t-42 -143t-6 -147q10 -72 54 -99t110 -22t146 34t162 71t160 89t138 87t97 67l37 27q70 14 79 -10t-27 -69t-109 -104t-166 -114t-198 -100t-205 -62 t-188 2t-146 89q-26 30 -41 61t-43 53q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76t-146 -18t-142 66q-60 50 -67 148zM170 142q16 -60 66 -70t118 19t149 92t160 152t151 197t123 227t75 242t6 243q-44 36 -107 19t-136 -71t-150 -138t-149 -183t-135 -206t-106 -205 t-62 -182t-3 -136zM518 1385q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="â" horiz-adv-x="1754" d="M75 206q-7 98 27 219t101 255t154 255t189 217t205 143t201 33t178 -114q50 -62 60 -126t-3 -130t-40 -134t-53 -138t-42 -143t-6 -147q10 -72 54 -99t110 -22t146 34t162 71t160 89t138 87t97 67l37 27q70 14 79 -10t-27 -69t-109 -104t-166 -114t-198 -100t-205 -62 t-188 2t-146 89q-26 30 -41 61t-43 53q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76t-146 -18t-142 66q-60 50 -67 148zM170 142q16 -60 66 -70t118 19t149 92t160 152t151 197t123 227t75 242t6 243q-44 36 -107 19t-136 -71t-150 -138t-149 -183t-135 -206t-106 -205 t-62 -182t-3 -136zM568 1660q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="ã" horiz-adv-x="1754" d="M75 206q-7 98 27 219t101 255t154 255t189 217t205 143t201 33t178 -114q50 -62 60 -126t-3 -130t-40 -134t-53 -138t-42 -143t-6 -147q10 -72 54 -99t110 -22t146 34t162 71t160 89t138 87t97 67l37 27q70 14 79 -10t-27 -69t-109 -104t-166 -114t-198 -100t-205 -62 t-188 2t-146 89q-26 30 -41 61t-43 53q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76t-146 -18t-142 66q-60 50 -67 148zM170 142q16 -60 66 -70t118 19t149 92t160 152t151 197t123 227t75 242t6 243q-44 36 -107 19t-136 -71t-150 -138t-149 -183t-135 -206t-106 -205 t-62 -182t-3 -136zM398 1527q8 41 37 99t72 113t96 96t109 51t112 -22t104 -126q24 -106 65 -147t94 -38t117 40t131 85t136 96t135 76q14 -24 -15 -70t-85 -100t-131 -107t-152 -89t-148 -48t-119 18q-54 10 -88 39t-55 67t-33 77t-26 66t-31 37t-48 -11t-79 -79t-122 -166 q-50 -30 -67 -14t-9 57z" /> -<glyph unicode="ä" horiz-adv-x="1754" d="M75 206q-7 98 27 219t101 255t154 255t189 217t205 143t201 33t178 -114q50 -62 60 -126t-3 -130t-40 -134t-53 -138t-42 -143t-6 -147q10 -72 54 -99t110 -22t146 34t162 71t160 89t138 87t97 67l37 27q70 14 79 -10t-27 -69t-109 -104t-166 -114t-198 -100t-205 -62 t-188 2t-146 89q-26 30 -41 61t-43 53q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76t-146 -18t-142 66q-60 50 -67 148zM170 142q16 -60 66 -70t118 19t149 92t160 152t151 197t123 227t75 242t6 243q-44 36 -107 19t-136 -71t-150 -138t-149 -183t-135 -206t-106 -205 t-62 -182t-3 -136zM567 1514q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM925 1527q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="å" horiz-adv-x="1754" d="M75 206q-7 98 27 219t101 255t154 255t189 217t205 143t201 33t178 -114q50 -62 60 -126t-3 -130t-40 -134t-53 -138t-42 -143t-6 -147q10 -72 54 -99t110 -22t146 34t162 71t160 89t138 87t97 67l37 27q70 14 79 -10t-27 -69t-109 -104t-166 -114t-198 -100t-205 -62 t-188 2t-146 89q-26 30 -41 61t-43 53q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76t-146 -18t-142 66q-60 50 -67 148zM170 142q16 -60 66 -70t118 19t149 92t160 152t151 197t123 227t75 242t6 243q-44 36 -107 19t-136 -71t-150 -138t-149 -183t-135 -206t-106 -205 t-62 -182t-3 -136zM586 1376q-16 42 1 91t58 99t90 92t100 70t89 32q124 16 178 -21t55 -98t-43 -133t-114 -127t-159 -80t-177 9q-62 24 -78 66zM700 1460q12 -66 62 -72t110 22t113 77t71 91t-15 65t-145 -1q-32 -28 -63 -47t-58 -38t-47 -41t-28 -56z" /> -<glyph unicode="æ" horiz-adv-x="2840" d="M75 206q-7 98 27 219t101 255t154 255t189 217t205 143t201 33t178 -114q50 -62 60 -126t-3 -130t-40 -134t-53 -138t-42 -143t-6 -147q10 -72 58 -103t119 -34t159 16t178 51t176 70t152 70t107 54l41 22q22 -6 0 -37t-75 -74t-132 -91t-169 -89t-187 -69t-187 -30 t-167 27t-129 103q-22 32 -39 62t-45 52q-38 -36 -90 -92t-114 -112t-131 -106t-141 -76t-146 -18t-142 66q-60 50 -67 148zM170 142q16 -60 66 -70t118 19t149 92t160 152t151 197t123 227t75 242t6 243q-44 36 -107 19t-136 -71t-150 -138t-149 -183t-135 -206t-106 -205 t-62 -182t-3 -136zM943 557q9 69 27 131q76 80 170 183t199 204t219 187t230 132q40 16 64 -3t34 -58t9 -92t-9 -102t-20 -90t-26 -55q-22 -26 -77 -60t-128 -73t-155 -82t-157 -87t-136 -90t-92 -90t-24 -85t69 -77q84 -10 206 9t248 51t243 66t193 52l30 -28 q-36 -48 -106 -91t-157 -79t-186 -61t-192 -39t-174 -13t-135 19q-76 26 -114 76t-50 113t-3 132zM1258 838q40 -8 104 12t132 54t131 78t100 86t37 75t-54 47q-2 4 -37 -20t-87 -63t-110 -85t-108 -86t-81 -68t-27 -30z" /> -<glyph unicode="ç" horiz-adv-x="1398" d="M65 363q19 113 86 240t159 242t195 208t193 140t155 37t81 -100q6 -40 -10 -88t-44 -92t-64 -80t-69 -54t-60 -12t-35 44q30 52 67 101t73 95q-14 28 -57 13t-102 -60t-126 -113t-129 -148t-111 -167t-71 -167t-11 -148t71 -112q82 -6 189 17t220 60t224 82t202 82 t155 58t84 11q36 -18 21 -50t-68 -71t-136 -81t-180 -81t-201 -72t-201 -54t-178 -26t-131 11q-128 42 -169 132t-22 203zM474 -394q-8 24 6 36t42 20t63 13t68 12t60 18t39 31q16 30 5 45t-35 22t-56 10t-60 10t-45 23t-13 50q-10 56 -7 103t14 66t30 0t41 -93 q10 -32 38 -49t63 -28t71 -19t62 -20t37 -33t-5 -59q-4 -20 -47 -62t-103 -79t-126 -55t-114 10q-6 2 -16 13t-12 15z" /> -<glyph unicode="è" horiz-adv-x="1088" d="M45 349q9 69 27 131q76 80 170 183t199 204t219 187t230 132q40 16 64 -3t34 -58t9 -92t-9 -102t-20 -90t-26 -55q-22 -26 -77 -60t-128 -73t-155 -82t-157 -87t-136 -90t-92 -90t-24 -85t69 -77q84 -10 206 9t248 51t243 66t193 52l30 -28q-36 -48 -106 -91t-157 -79 t-186 -61t-192 -39t-174 -13t-135 19q-76 26 -114 76t-50 113t-3 132zM342 1515q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54zM360 630q40 -8 104 12t132 54t131 78t100 86t37 75t-54 47q-2 4 -37 -20t-87 -63t-110 -85 t-108 -86t-81 -68t-27 -30z" /> -<glyph unicode="é" horiz-adv-x="1088" d="M45 349q9 69 27 131q76 80 170 183t199 204t219 187t230 132q40 16 64 -3t34 -58t9 -92t-9 -102t-20 -90t-26 -55q-22 -26 -77 -60t-128 -73t-155 -82t-157 -87t-136 -90t-92 -90t-24 -85t69 -77q84 -10 206 9t248 51t243 66t193 52l30 -28q-36 -48 -106 -91t-157 -79 t-186 -61t-192 -39t-174 -13t-135 19q-76 26 -114 76t-50 113t-3 132zM360 630q40 -8 104 12t132 54t131 78t100 86t37 75t-54 47q-2 4 -37 -20t-87 -63t-110 -85t-108 -86t-81 -68t-27 -30zM394 1051q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52 t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="ê" horiz-adv-x="1088" d="M45 349q9 69 27 131q76 80 170 183t199 204t219 187t230 132q40 16 64 -3t34 -58t9 -92t-9 -102t-20 -90t-26 -55q-22 -26 -77 -60t-128 -73t-155 -82t-157 -87t-136 -90t-92 -90t-24 -85t69 -77q84 -10 206 9t248 51t243 66t193 52l30 -28q-36 -48 -106 -91t-157 -79 t-186 -61t-192 -39t-174 -13t-135 19q-76 26 -114 76t-50 113t-3 132zM244 1522q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32 t-64 14q-14 8 -27 22t-3 32zM360 630q40 -8 104 12t132 54t131 78t100 86t37 75t-54 47q-2 4 -37 -20t-87 -63t-110 -85t-108 -86t-81 -68t-27 -30z" /> -<glyph unicode="ë" horiz-adv-x="1088" d="M45 349q9 69 27 131q76 80 170 183t199 204t219 187t230 132q40 16 64 -3t34 -58t9 -92t-9 -102t-20 -90t-26 -55q-22 -26 -77 -60t-128 -73t-155 -82t-157 -87t-136 -90t-92 -90t-24 -85t69 -77q84 -10 206 9t248 51t243 66t193 52l30 -28q-36 -48 -106 -91t-157 -79 t-186 -61t-192 -39t-174 -13t-135 19q-76 26 -114 76t-50 113t-3 132zM293 1336q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM360 630q40 -8 104 12t132 54t131 78t100 86t37 75t-54 47q-2 4 -37 -20t-87 -63t-110 -85t-108 -86 t-81 -68t-27 -30zM651 1349q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="ì" horiz-adv-x="634" d="M28 28q102 328 186 522t139 272t76 51t-3 -140t-100 -301t-214 -432q-20 -8 -47 -3t-37 31zM136 1253q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="í" horiz-adv-x="634" d="M28 28q10 -26 37 -31t47 3q138 244 214 432t100 301t3 140t-76 -51t-139 -272t-186 -522zM168 1051q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="î" horiz-adv-x="634" d="M-2 1242q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32zM28 28q102 328 186 522t139 272t76 51 t-3 -140t-100 -301t-214 -432q-20 -8 -47 -3t-37 31z" /> -<glyph unicode="ï" horiz-adv-x="634" d="M28 28q102 328 186 522t139 272t76 51t-3 -140t-100 -301t-214 -432q-20 -8 -47 -3t-37 31zM49 1170q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM407 1183q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35 q-36 52 -19 105z" /> -<glyph unicode="ð" horiz-adv-x="786" d="M21 543q9 67 55 113q60 46 128 35t140 -50t143 -93t137 -94q10 28 -2 69t-37 86t-61 93t-74 92q-28 -26 -54 -45t-48 -31q-34 -18 -21 27t55 121q-58 56 -96 78q-64 60 -73 96t14 47t63 -4t76 -53q16 -20 44 -53t44 -55l144 136q32 -22 46 -33t5 -28t-42 -48t-93 -93 q62 -74 120 -177t94 -209t44 -202t-26 -156q-62 -88 -134 -122t-146 -27t-144 48t-128 103t-101 137t-62 150t-10 142zM120 542q-12 -50 9 -118t63 -136t97 -126t113 -89t111 -26t89 65q16 42 5 96t-42 107t-79 102t-107 82t-126 46t-133 -3z" /> -<glyph unicode="ñ" horiz-adv-x="1440" d="M44 170q0 2 17 38t46 95t67 133t79 152t81 154t73 136t57 98t32 42q50 -34 52 -75t-13 -86t-33 -90t-6 -89q42 28 112 77t155 101t175 101t171 79t144 32t93 -38t19 -131t-79 -249q-4 -12 -20 -47t-36 -81t-43 -98t-44 -98t-36 -81t-19 -47q-4 -10 -7 -37t-9 -58t-16 -60 t-24 -43q-8 -8 -17 -5t-18 9t-15 13t-8 11q-8 82 14 163t58 160t77 158t72 155t43 150t-10 146q-64 22 -145 -11t-171 -99t-186 -155t-187 -180t-174 -173t-150 -136t-112 -68t-59 32zM194 1235q8 41 37 99t72 113t96 96t109 51t112 -22t104 -126q24 -106 65 -147t94 -38 t117 40t131 85t136 96t135 76q14 -24 -15 -70t-85 -100t-131 -107t-152 -89t-148 -48t-119 18q-54 10 -88 39t-55 67t-33 77t-26 66t-31 37t-48 -11t-79 -79t-122 -166q-50 -30 -67 -14t-9 57z" /> -<glyph unicode="ò" d="M68 155q-26 85 1 190t94 215t149 203t166 156t144 71q156 20 244 -21t121 -119t18 -181t-66 -209t-132 -203t-180 -162t-209 -88t-220 21q-104 42 -130 127zM170 170q16 -64 62 -82t109 1t137 66t146 111t137 140t109 149t62 139t-3 113t-87 67t-190 2q-36 -32 -90 -79 t-114 -102t-117 -119t-99 -131t-61 -137t-1 -138zM512 1389q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="ó" d="M68 155q-26 85 1 190t94 215t149 203t166 156t144 71q156 20 244 -21t121 -119t18 -181t-66 -209t-132 -203t-180 -162t-209 -88t-220 21q-104 42 -130 127zM170 170q16 -64 62 -82t109 1t137 66t146 111t137 140t109 149t62 139t-3 113t-87 67t-190 2q-36 -32 -90 -79 t-114 -102t-117 -119t-99 -131t-61 -137t-1 -138zM388 1051q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="ô" d="M68 155q-26 85 1 190t94 215t149 203t166 156t144 71q156 20 244 -21t121 -119t18 -181t-66 -209t-132 -203t-180 -162t-209 -88t-220 21q-104 42 -130 127zM170 170q16 -64 62 -82t109 1t137 66t146 111t137 140t109 149t62 139t-3 113t-87 67t-190 2q-36 -32 -90 -79 t-114 -102t-117 -119t-99 -131t-61 -137t-1 -138zM374 1380q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22 t-3 32z" /> -<glyph unicode="õ" d="M68 155q-26 85 1 190t94 215t149 203t166 156t144 71q156 20 244 -21t121 -119t18 -181t-66 -209t-132 -203t-180 -162t-209 -88t-220 21q-104 42 -130 127zM170 170q16 -64 62 -82t109 1t137 66t146 111t137 140t109 149t62 139t-3 113t-87 67t-190 2q-36 -32 -90 -79 t-114 -102t-117 -119t-99 -131t-61 -137t-1 -138zM210 1161q8 41 37 99t72 113t96 96t109 51t112 -22t104 -126q24 -106 65 -147t94 -38t117 40t131 85t136 96t135 76q14 -24 -15 -70t-85 -100t-131 -107t-152 -89t-148 -48t-119 18q-54 10 -88 39t-55 67t-33 77t-26 66 t-31 37t-48 -11t-79 -79t-122 -166q-50 -30 -67 -14t-9 57z" /> -<glyph unicode="ö" d="M68 155q-26 85 1 190t94 215t149 203t166 156t144 71q156 20 244 -21t121 -119t18 -181t-66 -209t-132 -203t-180 -162t-209 -88t-220 21q-104 42 -130 127zM170 170q16 -64 62 -82t109 1t137 66t146 111t137 140t109 149t62 139t-3 113t-87 67t-190 2q-36 -32 -90 -79 t-114 -102t-117 -119t-99 -131t-61 -137t-1 -138zM381 1224q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM739 1237q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="÷" horiz-adv-x="1538" d="M107 520q-23 18 31 86q2 8 54 19t135 24t190 25t219 20t220 12t195 1t143 -15t64 -36q4 -6 4 -28t-4 -30q-46 -4 -136 -10t-202 -14t-234 -17t-234 -17t-203 -15t-137 -9q-82 -14 -105 4zM550 284q16 22 44 29t58 0t42 -31q22 -42 9 -71t-40 -38t-60 4t-51 51 q-18 34 -2 56zM553 959q-3 29 11 50t41 26t61 -17q32 -22 36 -55t-11 -57t-45 -29t-64 29q-26 24 -29 53z" /> -<glyph unicode="ø" d="M68 155q-26 85 1 190t94 215t149 203t166 156t144 71q156 20 244 -21t121 -119t18 -181t-66 -209t-132 -203t-180 -162t-209 -88t-220 21q-104 42 -130 127zM170 170q16 -64 62 -82t109 1t137 66t146 111t137 140t109 149t62 139t-3 113t-87 67t-190 2q-36 -32 -90 -79 t-114 -102t-117 -119t-99 -131t-61 -137t-1 -138zM234 -260q-16 96 8 229t73 284t117 311t139 311t138 281t117 224q26 18 45 8t29 -32t13 -49t-1 -41l-30 -66t-45 -100t-53 -117t-53 -117t-45 -100t-28 -64q-12 -24 -37 -85t-52 -129t-50 -128t-31 -82q-12 -34 -30 -106 t-39 -153t-47 -158t-54 -121q-6 -8 -18 -17t-26 -12t-25 2t-15 27z" /> -<glyph unicode="ù" horiz-adv-x="1440" d="M58 198q-14 38 8 108t65 156t98 177t110 170t101 135t70 74q58 -28 52 -84t-46 -128t-101 -155t-114 -165t-86 -157t-17 -131q40 -16 97 6t123 71t139 118t144 146t139 154t125 144t100 115t65 66q52 -26 52 -82t-28 -129t-70 -157t-72 -166t-35 -157t41 -129l84 -100 h254q18 0 7 -15t-30 -33t-39 -34t-22 -16q-32 -6 -56 -6t-47 4t-45 11t-48 19q-70 26 -110 72t-62 103t-33 121t-23 128q-18 12 -55 -12t-87 -65t-110 -94t-123 -100t-125 -82t-118 -40t-100 25t-72 114zM538 1253q-14 33 0 107q54 4 110 -33t102 -90t75 -108t31 -89 t-29 -33t-107 63q-34 60 -72 84t-67 45t-43 54z" /> -<glyph unicode="ú" horiz-adv-x="1440" d="M58 198q-14 38 8 108t65 156t98 177t110 170t101 135t70 74q58 -28 52 -84t-46 -128t-101 -155t-114 -165t-86 -157t-17 -131q40 -16 97 6t123 71t139 118t144 146t139 154t125 144t100 115t65 66q52 -26 52 -82t-28 -129t-70 -157t-72 -166t-35 -157t41 -129l84 -100 h254q18 0 7 -15t-30 -33t-39 -34t-22 -16q-32 -6 -56 -6t-47 4t-45 11t-48 19q-70 26 -110 72t-62 103t-33 121t-23 128q-18 12 -55 -12t-87 -65t-110 -94t-123 -100t-125 -82t-118 -40t-100 25t-72 114zM674 1045q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59 t-79 -52t-82 -88q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="û" horiz-adv-x="1440" d="M58 198q-14 38 8 108t65 156t98 177t110 170t101 135t70 74q58 -28 52 -84t-46 -128t-101 -155t-114 -165t-86 -157t-17 -131q40 -16 97 6t123 71t139 118t144 146t139 154t125 144t100 115t65 66q52 -26 52 -82t-28 -129t-70 -157t-72 -166t-35 -157t41 -129l84 -100 h254q18 0 7 -15t-30 -33t-39 -34t-22 -16q-32 -6 -56 -6t-47 4t-45 11t-48 19q-70 26 -110 72t-62 103t-33 121t-23 128q-18 12 -55 -12t-87 -65t-110 -94t-123 -100t-125 -82t-118 -40t-100 25t-72 114zM524 1388q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35 t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="ü" horiz-adv-x="1440" d="M58 198q-14 38 8 108t65 156t98 177t110 170t101 135t70 74q58 -28 52 -84t-46 -128t-101 -155t-114 -165t-86 -157t-17 -131q40 -16 97 6t123 71t139 118t144 146t139 154t125 144t100 115t65 66q52 -26 52 -82t-28 -129t-70 -157t-72 -166t-35 -157t41 -129l84 -100 h254q18 0 7 -15t-30 -33t-39 -34t-22 -16q-32 -6 -56 -6t-47 4t-45 11t-48 19q-70 26 -110 72t-62 103t-33 121t-23 128q-18 12 -55 -12t-87 -65t-110 -94t-123 -100t-125 -82t-118 -40t-100 25t-72 114zM513 1274q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29 t-64 33q-36 54 -19 106zM871 1287q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="ý" horiz-adv-x="1102" d="M-424 -852q24 72 67 152t90 149t69 99q20 26 62 82t95 125t111 146t111 147t95 125t62 81q20 22 -1 70t-62 112t-92 140t-92 155t-62 156t-1 145q26 20 60 -24t70 -120t75 -167t77 -165t74 -116t68 -18q64 48 127 122t120 154t109 157t96 133q18 22 35 31t51 -3 q22 -8 2 -59t-71 -136t-127 -197t-167 -238t-191 -262t-199 -269t-190 -258t-165 -230t-125 -183t-69 -118q-10 -22 -21 -45t-33 -39q-4 2 -13 10t-18 17t-17 18t-10 13q-24 36 0 108zM402 1051q4 35 38 93t86 112t114 93t122 35q16 -74 -1 -109t-52 -59t-79 -52t-82 -88 q-84 -60 -117 -60t-29 35z" /> -<glyph unicode="þ" horiz-adv-x="1354" d="M-118 -940q12 220 64 469t123 514t154 540t156 546t128 531t71 498q42 6 78 2t59 -33t29 -87t-11 -160t-61 -254t-122 -366q254 88 414 79t239 -82t86 -194t-43 -256t-147 -268t-227 -230t-285 -141t-319 -4q-66 -192 -100 -323t-48 -224t-17 -159t-8 -125t-19 -125 t-50 -158q-6 -10 -28 -18t-47 -8t-46 8t-23 28zM356 282q84 -30 177 -10t184 74t174 135t148 173t105 186t46 176t-28 143t-118 85q-172 -16 -280 -64t-173 -120t-98 -162t-52 -192t-35 -210t-50 -214z" /> -<glyph unicode="ÿ" horiz-adv-x="1102" d="M-424 -852q24 72 67 152t90 149t69 99q20 26 62 82t95 125t111 146t111 147t95 125t62 81q20 22 -1 70t-62 112t-92 140t-92 155t-62 156t-1 145q26 20 60 -24t70 -120t75 -167t77 -165t74 -116t68 -18q64 48 127 122t120 154t109 157t96 133q18 22 35 31t51 -3 q22 -8 2 -59t-71 -136t-127 -197t-167 -238t-191 -262t-199 -269t-190 -258t-165 -230t-125 -183t-69 -118q-10 -22 -21 -45t-33 -39q-4 2 -13 10t-18 17t-17 18t-10 13q-24 36 0 108zM281 1170q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33 q-36 54 -19 106zM639 1183q17 53 57 82t87 23t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="Œ" horiz-adv-x="2876" d="M49 377q9 73 34 146t59 141t70 126q12 20 38 60t59 90t70 105t71 105t60 90t40 58q24 154 87 257t148 160t182 69t187 -17t164 -96t113 -169t33 -238t-75 -301t-210 -357t-375 -408q-50 -48 -118 -91t-144 -71t-154 -33t-146 25q-84 36 -128 90t-59 120t-6 139zM156 226 q26 -114 95 -141t164 10t208 128t225 212t215 263t178 282t115 268t27 221t-90 141t-233 28q-56 -50 -151 -146t-203 -219t-216 -264t-190 -281t-124 -270t-20 -232zM1050 40q-14 12 8 28q24 90 52 173t58 164t63 164t71 175q12 24 -5 48t-37 48t-30 49t18 53q2 2 19 7t36 9 t36 8t21 6t12 9t17 16l17 17t10 12q38 68 75 121t68 105t58 110t45 136q8 30 -14 38t-49 16t-46 24t-3 62q10 28 96 60t219 62t297 55t329 40t316 18t256 -11t149 -48t-2 -92q-22 -6 -46 -1t-49 12t-51 13t-52 4q-120 -10 -236 -8t-230 2t-229 -9t-231 -41q-80 -22 -142 -79 t-119 -143t-114 -199t-125 -247q28 -6 104 12t175 43t208 52t206 38t170 0t97 -59q2 -4 2 -14t-2 -14q-132 -20 -273 -36t-280 -40t-272 -65t-249 -113q-96 -168 -171 -345t-133 -361q72 26 168 50t185 43t156 32t79 15q212 34 409 53t409 5q18 -4 25 -20t9 -34t0 -35 t-4 -25q-274 14 -541 -21t-535 -93q-42 -10 -103 -34t-125 -44t-123 -27t-99 19q-10 4 -17 11t-11 21z" /> -<glyph unicode="œ" horiz-adv-x="1984" d="M68 155q-26 85 1 190t94 215t149 203t166 156t144 71q156 20 244 -21t121 -119t18 -181t-66 -209t-132 -203t-180 -162t-209 -88t-220 21q-104 42 -130 127zM170 170q16 -64 62 -82t109 1t137 66t146 111t137 140t109 149t62 139t-3 113t-87 67t-190 2q-36 -32 -90 -79 t-114 -102t-117 -119t-99 -131t-61 -137t-1 -138zM811 349q9 69 27 131q76 80 170 183t199 204t219 187t230 132q40 16 64 -3t34 -58t9 -92t-9 -102t-20 -90t-26 -55q-22 -26 -77 -60t-128 -73t-155 -82t-157 -87t-136 -90t-92 -90t-24 -85t69 -77q84 -10 206 9t248 51 t243 66t193 52l30 -28q-36 -48 -106 -91t-157 -79t-186 -61t-192 -39t-174 -13t-135 19q-76 26 -114 76t-50 113t-3 132zM1126 630q40 -8 104 12t132 54t131 78t100 86t37 75t-54 47q-2 4 -37 -20t-87 -63t-110 -85t-108 -86t-81 -68t-27 -30z" /> -<glyph unicode="Ÿ" horiz-adv-x="1004" d="M87 1689q7 19 53 -3q36 -32 87 -104t108 -161t116 -183t109 -168t88 -117t54 -31q20 38 52 110l72 162t85 190t90 192t88 170t79 124t62 53t38 -41q8 -36 -24 -130t-91 -226t-140 -293t-170 -333t-178 -346t-166 -333t-135 -291t-84 -222q-8 -26 -24 -49t-37 -33t-42 1 t-37 53q-30 74 -8 158t73 175t118 189t127 201t101 212t39 223q-10 24 -44 77t-82 125t-104 153t-107 161t-92 150t-61 118t-13 67zM355 1858q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM713 1871q17 53 57 82t87 23t73 -70 q14 -38 -5 -79t-54 -67t-75 -29t-64 35q-36 52 -19 105z" /> -<glyph unicode="ˆ" horiz-adv-x="1054" d="M168 1242q12 22 44 48t68 53t67 54t43 49q56 118 102 161t82 35t62 -54t42 -107t21 -125t-1 -107t-23 -52t-45 39q-6 8 -19 47t-31 79t-37 66t-35 8q-6 -12 -23 -40t-41 -63t-54 -69t-62 -58t-66 -32t-64 14q-14 8 -27 22t-3 32z" /> -<glyph unicode="˜" horiz-adv-x="1706" d="M212 1047q8 41 37 99t72 113t96 96t109 51t112 -22t104 -126q24 -106 65 -147t94 -38t117 40t131 85t136 96t135 76q14 -24 -15 -70t-85 -100t-131 -107t-152 -89t-148 -48t-119 18q-54 10 -88 39t-55 67t-33 77t-26 66t-31 37t-48 -11t-79 -79t-122 -166 q-50 -30 -67 -14t-9 57z" /> -<glyph unicode=" " horiz-adv-x="1198" /> -<glyph unicode=" " horiz-adv-x="2397" /> -<glyph unicode=" " horiz-adv-x="1198" /> -<glyph unicode=" " horiz-adv-x="2397" /> -<glyph unicode=" " horiz-adv-x="799" /> -<glyph unicode=" " horiz-adv-x="599" /> -<glyph unicode=" " horiz-adv-x="399" /> -<glyph unicode=" " horiz-adv-x="399" /> -<glyph unicode=" " horiz-adv-x="299" /> -<glyph unicode=" " horiz-adv-x="479" /> -<glyph unicode=" " horiz-adv-x="133" /> -<glyph unicode="‐" horiz-adv-x="1244" d="M72 706q-32 32 4 62t115 55t189 43t227 28t229 8t195 -17t125 -45t18 -78q-26 0 -90 -4t-137 -8t-137 -8t-90 -6q-62 -6 -152 -30t-184 -40t-179 -12t-133 52z" /> -<glyph unicode="‑" horiz-adv-x="1244" d="M72 706q-32 32 4 62t115 55t189 43t227 28t229 8t195 -17t125 -45t18 -78q-26 0 -90 -4t-137 -8t-137 -8t-90 -6q-62 -6 -152 -30t-184 -40t-179 -12t-133 52z" /> -<glyph unicode="‒" horiz-adv-x="1244" d="M72 706q-32 32 4 62t115 55t189 43t227 28t229 8t195 -17t125 -45t18 -78q-26 0 -90 -4t-137 -8t-137 -8t-90 -6q-62 -6 -152 -30t-184 -40t-179 -12t-133 52z" /> -<glyph unicode="–" horiz-adv-x="1266" d="M60 538q2 8 49 20t123 25t172 25t198 22t200 14t177 2t130 -14t59 -36q4 -6 4 -28t-4 -30q-70 -6 -191 -13t-251 -15t-251 -16t-191 -12q-62 -4 -102 -2t-94 30q-4 2 -15 13t-13 15z" /> -<glyph unicode="—" horiz-adv-x="1706" d="M80 548q2 8 64 21t164 28t231 30t264 27t266 19t235 6t170 -12t74 -35q4 -6 4 -27t-4 -29q-46 -4 -143 -10t-220 -15t-258 -18t-258 -17t-220 -15t-143 -9q-62 -4 -103 -2t-95 30q-4 2 -15 13t-13 15z" /> -<glyph unicode="‘" horiz-adv-x="422" d="M108 1116q0 32 1 60t3 40q0 2 7 23l16 48l18 54t15 43q28 74 47 91t30 -4t14 -72t-1 -111t-16 -122t-30 -105t-43 -59t-57 16q-2 10 -3 38t-1 60z" /> -<glyph unicode="’" horiz-adv-x="450" d="M144 1116q0 32 1 60t3 40q0 2 6 23t15 48l18 54t15 43q28 74 47 91t31 -4t15 -72t-1 -111t-16 -122t-30 -105t-43 -59t-57 16q-2 10 -3 38t-1 60z" /> -<glyph unicode="‚" horiz-adv-x="312" d="M87 -36q1 44 8 85t21 85t32 100q28 74 47 91t30 -5t14 -72t-1 -111t-16 -123t-30 -105t-43 -59t-57 16q-6 54 -5 98z" /> -<glyph unicode="“" horiz-adv-x="686" d="M118 1383q0 53 2 89q0 42 18 32t39 -41t39 -65t18 -38q2 -32 3 -84t1 -102t-1 -86t-3 -38l-30 -28q-10 4 -30 25t-24 31q-12 34 -19 87t-10 109t-3 109zM404 1078v424q48 24 74 -1t36 -77t8 -122t-12 -134t-24 -113t-26 -61q-4 2 -15 13t-13 15q-6 10 -17 31t-11 25z" /> -<glyph unicode="”" horiz-adv-x="692" d="M144 1383q0 53 2 89q0 28 8 32t21 -8t27 -34t27 -44t21 -39t8 -19q2 -32 3 -84t1 -102t-1 -86t-3 -38l-28 -28q-4 2 -13 9t-18 16t-16 17t-9 14q-12 34 -18 87t-9 109t-3 109zM428 1078v424q48 24 74 -1t36 -77t8 -122t-12 -134t-23 -113t-25 -61q-4 2 -16 13t-14 15 q-6 10 -17 31t-11 25z" /> -<glyph unicode="„" horiz-adv-x="550" d="M84 121q0 53 2 89q0 28 8 32t21 -8t27 -34t27 -44t21 -39t8 -19q2 -32 3 -84t1 -101t-1 -85t-3 -38l-28 -30q-10 4 -31 25t-25 31q-12 34 -18 87t-9 109t-3 109zM368 -184v424q48 24 75 -1t37 -77t8 -122t-12 -134t-24 -113t-26 -61q-4 2 -15 13t-13 15q-6 10 -18 31 t-12 25z" /> -<glyph unicode="•" horiz-adv-x="804" d="M191 723q1 69 33 125t86 94t113 46t113 -22t88 -110q20 -48 9 -100t-44 -97t-80 -79t-96 -48t-96 -2t-79 58q-48 66 -47 135z" /> -<glyph unicode="…" horiz-adv-x="1100" d="M63 100q1 36 17 66t43 50t57 24t58 -12t44 -58q16 -38 -4 -79t-54 -67t-74 -29t-64 33t-23 72zM433 134q17 52 57 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-75 -29t-64 33q-36 54 -19 106zM800 134q16 52 56 82t87 24t73 -70q14 -38 -5 -79t-54 -67t-74 -29t-63 33 q-36 54 -20 106z" /> -<glyph unicode=" " horiz-adv-x="479" /> -<glyph unicode="‹" horiz-adv-x="1160" d="M32 818q4 40 54 86q22 20 68 62t105 95t123 111t123 111t105 95t68 62q12 4 35 0t41 -16t24 -29t-14 -39l-536 -536q-18 -18 -8 -44t36 -57t62 -62t70 -56t61 -43l33 -22q22 -16 68 -47t104 -70t123 -82t123 -82t105 -69t69 -44q26 -32 30 -63t-8 -51t-40 -22t-66 22 q-202 132 -407 268t-385 298q-40 36 -81 72t-65 74t-20 78z" /> -<glyph unicode="›" horiz-adv-x="862" d="M70 1384q0 6 7 15t16 18t18 16t15 7q54 -42 136 -94t170 -114t168 -131t128 -143t51 -152t-61 -156q-20 -26 -58 -71t-84 -100t-95 -114t-92 -110t-76 -90t-45 -53l-22 -22l-34 -34t-35 -34t-23 -22q-4 2 -12 10l-17 17t-17 18t-10 13q-24 48 10 108t99 127t146 139 t148 144t108 141t25 131q-2 6 -46 42t-109 88t-139 113t-136 119t-101 104t-33 70z" /> -<glyph unicode=" " horiz-adv-x="599" /> -<glyph unicode="€" horiz-adv-x="1770" d="M52 724q-16 22 19 41t95 35t136 28t143 20t116 13t55 5q20 0 73 1t111 1t110 -1t74 -1q14 -8 25 -23t3 -35q-94 -12 -215 -31t-241 -40t-225 -40t-167 -29q-22 -4 -37 -3t-27 7t-23 18t-25 34zM192 1288q16 30 72 55t134 40t166 21t168 -2t140 -29t82 -57 q-10 -12 -68 -24t-139 -23t-175 -18t-175 -6t-138 10t-67 33zM209 359q-9 111 26 243t100 272t154 285t189 282t204 262t200 226t176 172t132 103q90 54 162 60t127 -20t94 -76t63 -108t35 -115t9 -99t-15 -60t-35 4q-4 30 -29 82t-61 104t-77 93t-75 49q-72 18 -167 -31 t-201 -144t-218 -228t-216 -286t-195 -314t-157 -314t-99 -286t-22 -228t73 -144t186 -31q140 20 264 49t240 65t230 80t238 94q46 16 73 -14t13 -72t-90 -87t-186 -85t-241 -72t-257 -49t-233 -17t-167 24q-122 48 -180 134t-67 197z" /> -<glyph unicode="™" horiz-adv-x="3928" d="M44 1272q16 34 108 67t230 65t310 60t349 51t346 40t301 25t215 7t87 -15q4 -10 11 -37t15 -57q40 20 76 50t82 58q90 54 143 47t77 -56t25 -130t-12 -175t-35 -193t-42 -182t-33 -142t-11 -75q22 -10 34 3t22 25q8 12 37 47t66 81t80 99t81 99t66 81t38 47q10 10 47 48 t82 83t89 87t66 64q192 180 320 275t204 121t107 -9t31 -111t-27 -187t-67 -239t-87 -264t-87 -264q-12 -34 -37 -115t-53 -171t-53 -170t-35 -114q0 -2 -6 -32t-16 -71t-26 -88t-38 -84t-50 -57t-62 -8q-4 2 -15 12t-13 16q-2 2 -2 14t2 16l10 30t17 53t18 54t11 31 q48 154 92 284t85 248t80 229t78 229t77 250t78 290q2 8 2 29t-2 27q-74 24 -164 -20t-188 -135t-201 -215t-203 -258t-194 -266t-173 -239t-139 -175t-94 -76q-10 -2 -25 0t-28 7t-23 11t-10 12v170q6 28 20 88t31 135t35 158t35 158t30 134t19 89q12 58 25 112t3 114 q-106 -38 -205 -124t-189 -198t-170 -242t-149 -256t-128 -240t-105 -195t-80 -120t-54 -15q-42 12 -29 87t60 187t120 249t153 275t156 264t130 216q-62 8 -114 21t-108 23t-121 12t-151 -16q-76 -16 -148 -87t-139 -175t-128 -232t-116 -258t-102 -251t-85 -213t-68 -143 t-50 -41q-6 4 -16 14t-12 14q-16 62 1 143t47 164t65 159t57 126q12 28 39 86t60 131t69 153t70 152t60 129t40 85q-42 8 -121 -8t-174 -39t-196 -48t-186 -37t-147 -4t-78 52z" /> -<glyph unicode="" horiz-adv-x="1040" d="M0 0v1040h1040v-1040h-1040z" /> -<glyph unicode="fi" horiz-adv-x="1344" d="M42 656q-2 14 2 22q8 2 28 10t42 17t42 18t28 13q8 2 42 14t73 25t72 26t39 19q28 20 70 99t94 189t115 236t135 242t152 207t167 130t179 12t190 -147q18 -24 26 -53t2 -59q-22 -14 -45 -6t-42 25t-33 36t-20 29q-112 18 -192 5t-138 -50t-99 -94t-76 -126t-69 -149 t-76 -160q-16 -30 -41 -77t-47 -92t-38 -78t-16 -35v-28q0 -6 29 -11t75 -10t100 -11t104 -17t89 -27t55 -38l-28 -26q-142 8 -240 6t-170 -33t-127 -98t-113 -187q-20 -42 -53 -108t-64 -129t-55 -110t-26 -49l-28 -28q-4 2 -13 10t-18 17t-16 18t-9 13q-4 6 -4 27t4 27 l210 482h-238q-6 0 -12 10t-11 24t-7 28zM702 -52q102 328 186 522t139 272t76 51t-3 -140t-100 -301t-214 -432q-20 -8 -47 -3t-37 31zM1136 1194q0 14 1 26t3 16q58 20 88 5t37 -44t-2 -62t-29 -49t-45 -5t-49 69q-2 6 -3 18t-1 26z" /> -<glyph unicode="fl" horiz-adv-x="1622" d="M42 656q-2 14 2 22q8 2 28 10t42 17t42 18t28 13q8 2 42 14t73 25t72 26t39 19q28 20 70 99t94 189t115 236t135 242t152 207t167 130t179 12t190 -147q18 -24 26 -53t2 -59q-22 -14 -45 -6t-42 25t-33 36t-20 29q-112 18 -192 5t-138 -50t-99 -94t-76 -126t-69 -149 t-76 -160q-16 -30 -41 -77t-47 -92t-38 -78t-16 -35v-28q0 -6 29 -11t75 -10t100 -11t104 -17t89 -27t55 -38l-28 -26q-142 8 -240 6t-170 -33t-127 -98t-113 -187q-20 -42 -53 -108t-64 -129t-55 -110t-26 -49l-28 -28q-4 2 -13 10t-18 17t-16 18t-9 13q-4 6 -4 27t4 27 l210 482h-238q-6 0 -12 10t-11 24t-7 28zM884 328q14 94 54 194t86 193t90 170t68 127q4 10 19 40t36 70t43 86t43 87t36 72t19 41q6 12 20 48t32 79t39 82t44 57t47 5t46 -75q-10 -26 -48 -100t-91 -179t-116 -232t-124 -258t-113 -255t-85 -225t-40 -168t23 -81 q36 -18 91 -14t116 15t119 21t98 8q10 -22 -15 -43t-70 -37t-103 -27t-112 -16t-96 -3t-56 12q-74 52 -94 132t-6 174z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/nothingyoucoulddo-webfont.ttf b/app/assets/fonts/nothingyoucoulddo-webfont.ttf deleted file mode 100755 index 65ae6fee..00000000 Binary files a/app/assets/fonts/nothingyoucoulddo-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/nothingyoucoulddo-webfont.woff b/app/assets/fonts/nothingyoucoulddo-webfont.woff deleted file mode 100755 index e9adadea..00000000 Binary files a/app/assets/fonts/nothingyoucoulddo-webfont.woff and /dev/null differ diff --git a/app/assets/fonts/nothingyoucoulddobold-webfont.eot b/app/assets/fonts/nothingyoucoulddobold-webfont.eot deleted file mode 100755 index ca8327c9..00000000 Binary files a/app/assets/fonts/nothingyoucoulddobold-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/nothingyoucoulddobold-webfont.svg b/app/assets/fonts/nothingyoucoulddobold-webfont.svg deleted file mode 100755 index 5a4cf7dc..00000000 --- a/app/assets/fonts/nothingyoucoulddobold-webfont.svg +++ /dev/null @@ -1,239 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="nothing_you_could_do_boldbold" horiz-adv-x="1074" > -<font-face units-per-em="2048" ascent="1638" descent="-410" /> -<missing-glyph horiz-adv-x="1344" /> -<glyph horiz-adv-x="2048" /> -<glyph horiz-adv-x="2048" /> -<glyph unicode="
" horiz-adv-x="1024" /> -<glyph unicode=" " horiz-adv-x="1344" /> -<glyph unicode="	" horiz-adv-x="1344" /> -<glyph unicode=" " horiz-adv-x="1344" /> -<glyph unicode="!" horiz-adv-x="664" d="M26 132q0 34 15 65t38 54t52 37t57 14q36 0 66 -22t52 -70l-2 2q14 -36 3 -75t-36 -70t-61 -51t-68 -20q-28 0 -49 10t-39 38q-28 44 -28 88zM134 738q-6 14 6 72t35 142t57 186t73 205t81 197t82 164t76 106t62 22q2 -12 -9 -69t-29 -142t-44 -190t-56 -212t-62 -209 t-65 -181t-65 -127t-60 -48q-56 0 -82 86v-2z" /> -<glyph unicode=""" horiz-adv-x="710" d="M114 1324v51t2 43q0 26 14 29t34 -8t43 -32t43 -42t33 -37t13 -18v2q2 -28 3 -71t1 -87q0 -58 -5 -106t-11 -54l-44 -46q-8 4 -23 16t-31 25t-28 26t-14 21v-2q-10 24 -15 58t-9 73t-5 80t-1 79zM380 1046v420q54 26 89 21t57 -34t31 -76t9 -103q0 -52 -8 -108t-21 -105 t-28 -86t-29 -51q-6 2 -16 9t-21 16t-21 17t-14 12l4 -4q-8 14 -20 38t-12 34z" /> -<glyph unicode="#" horiz-adv-x="1722" d="M29 462q7 18 30 31t57 23t74 22q54 14 115 32t114 46t88 70t35 102q0 14 1 14t-3 18q-16 -2 -39 -7t-45 -9q-44 -6 -91 -13t-95 -7q-72 0 -124 30t-66 118q48 20 90 34t80 25t73 18t69 15q56 10 107 22t97 26q4 8 8 14l-2 -2q16 30 40 71t51 79t54 64t51 26q28 0 44 -24 t16 -80q0 -16 -1 -40t-5 -50q42 2 69 23t45 53t29 68t19 68q12 46 24 80t27 47t37 -1t56 -64q16 -24 21 -47t5 -47q0 -22 -3 -47t-7 -41t-8 -33t-4 -33q24 -2 50 -1t54 1h196q84 0 142 -9t58 -43q0 -14 -23 -29t-76 -33t-139 -41t-212 -49q-44 -10 -81 -36t-64 -59t-42 -70 t-15 -67q0 -14 5 -25t17 -13l4 -2q12 2 26 4q12 2 29 5t37 7q64 10 142 21t144 11q44 0 79 -6t55 -21t23 -39t-15 -62q-18 -36 -53 -56t-80 -29t-97 -12t-106 -3q-42 0 -82 -2t-73 -7t-57 -14t-32 -25q-2 -8 -4 -26t-4 -34q-8 -44 -18 -101t-27 -113t-43 -105t-66 -77 q-6 2 -17 9t-22 16t-20 18t-11 15l-2 2q-8 44 0 93t22 99q6 32 13 64t7 60t-10 46q-4 10 -24 9t-42 -5q-40 -6 -65 -24t-39 -42t-21 -52t-11 -58v2q-4 -34 -10 -65t-20 -61t-40 -56t-68 -46q-52 34 -69 71t-17 77q0 46 16 104l-2 -2q2 16 5 33t5 33q-22 -2 -49 -3t-59 -1 q-36 0 -71 4t-66 13t-55 26t-36 43q-14 26 -7 44zM686 626h20q44 0 71 17t44 46t25 68t16 85q4 16 7 32t7 32q-10 28 -18 28q-24 0 -51 -33t-53 -76t-44 -82t-24 -51v-66z" /> -<glyph unicode="$" horiz-adv-x="1186" d="M20 486q0 48 54 90q12 0 40 4t60 8t59 9t37 7h-8q8 2 16 10t16 12t13 -1t5 -25l136 376q-2 14 -31 34t-65 42q-30 18 -62 38t-57 44t-41 52t-16 62q0 48 40 106q34 44 98 64t130 34q44 10 85 19t65 27q6 2 18 32t26 70q14 38 31 77t36 70t42 51t51 20q22 0 45 -16t43 -56 q16 -34 9 -71t-17 -73v2q-4 -12 -7 -17t-5 -8t-2 -7v-16h200q6 0 17 -7t20 -18t17 -21t8 -16v-118q-76 -6 -149 -14t-129 -30t-90 -63t-34 -111v-17t2 -19q104 -38 174 -75t113 -73t61 -72t18 -72q0 -58 -44 -108t-111 -94t-148 -81t-153 -67q-70 -32 -120 -55t-52 -29 l-104 -318q-4 -10 -29 -33t-55 -38t-58 -9t-38 58v2q-10 60 2 118t28 108v-2q8 28 14 50t6 42q0 14 -13 21t-51 7q-12 0 -33 -2t-55 -6q-28 22 -43 46t-15 46zM406 1230q-4 -6 3 -13t15 -11l2 -2q22 -18 40 -24t30 -6t17 10t5 24q0 28 -12 55t-32 27q-28 0 -68 -60zM572 654 q44 0 90 18t88 45t79 60t63 65q-10 36 -47 61t-83 25q-58 0 -114 -56t-76 -180v-38z" /> -<glyph unicode="%" horiz-adv-x="820" d="M0 214q70 156 151 300t163 286q76 138 156 279t150 299q82 26 113 -2t31 -82q0 -30 -10 -65t-18 -55q-76 -164 -161 -319t-173 -309q-58 -102 -115 -203t-109 -203q-48 -64 -81 -57t-61 57v-4l-7 14l-11 22t-11 24t-7 18zM0 214q70 156 151 300t163 286q76 138 156 279 t150 299q82 26 113 -2t31 -82q0 -30 -10 -65t-18 -55q-76 -164 -161 -319t-173 -309q-58 -102 -115 -203t-109 -203q-48 -64 -81 -57t-61 57v-4l-7 14l-11 22t-11 24t-7 18zM122 1190v22q0 20 6 32q10 20 26 28l4 4q16 8 24 10q6 0 8 2q6 0 12 1t10 1q30 0 58 -18q4 -2 6 -4 t6 -4l12 -12l6 -8q4 -4 5 -9t5 -9q16 -40 -6 -94q-2 -4 -4 -7t-2 -7q-2 0 -2 -1t-2 -1q-4 -2 -8 -2t-8 -2q-4 0 -6 -1t-6 -1q-4 -2 -14 -2q-18 -4 -36 0q-4 0 -8 1t-8 1q-10 4 -19 6t-19 6q-6 4 -12 9t-12 13t-8 18v-2q-4 4 -4 9t-2 9q0 8 -2 12zM499 362q3 24 16 39t33 23 t42 8q26 0 50 -11t39 -33t16 -53t-19 -73q-16 -6 -41 -10t-51 0t-47 16t-31 38q-10 32 -7 56zM499 362q3 24 16 39t33 23t42 8q26 0 50 -11t39 -33t16 -53t-19 -73q-16 -6 -41 -10t-51 0t-47 16t-31 38q-10 32 -7 56z" /> -<glyph unicode="&" horiz-adv-x="960" d="M20 542q0 52 48 104t106 100q32 28 63 55t56 55t39 56t12 56q-60 -4 -123 21t-91 83q-14 30 -7 57t27 54t51 55t65 56q52 44 97 88t55 84h-2q46 204 78 285t58 81q22 0 33 -16t16 -43t6 -64t3 -77q2 -48 3 -85t7 -83q16 4 39 19t45 31q20 16 43 31t48 24t53 9t62 -14 q14 -58 2 -98t-41 -68t-68 -47t-81 -35q-26 -10 -51 -21t-44 -23t-30 -27t-9 -35q36 4 61 5t53 1q98 0 139 -25t41 -67q0 -44 -46 -96t-106 -114q-34 -34 -69 -71t-65 -74t-51 -73t-27 -70h78h92t62 -2q58 -4 83 -23t25 -41q0 -24 -31 -46t-78 -43t-100 -40t-97 -33h2 q-30 -10 -52 -21t-18 3q-22 -36 -27 -99t-7 -131q0 -52 -3 -104t-17 -99t-41 -84t-75 -61l-68 68q-18 16 -26 46t-8 70q0 54 8 121t18 131q8 46 13 80t5 56q-132 36 -184 79t-52 89zM224 596q16 -2 26 -3t20 -1h4l-4 -4q-2 -2 -5 -9t-7 -13q-4 -8 -5 -14t-3 -10zM274 592 q40 0 42 34q-10 -4 -22 -14t-18 -18zM532 974l24 24l-12 20q8 -4 22 6t24 16l22 -66h-80z" /> -<glyph unicode="'" horiz-adv-x="528" d="M128 1082v52t4 44q0 6 7 27t15 47t17 52t15 42q44 118 94 118q30 0 48 -46t18 -112q0 -48 -6 -100t-18 -101t-30 -89t-41 -61t-52 -20t-63 35q-6 24 -7 52t-1 60z" /> -<glyph unicode="(" horiz-adv-x="720" d="M42 576q0 142 28 291t73 291t103 268t117 220t115 149t98 55q30 0 56 -25t44 -79q-84 -76 -169 -207t-154 -289t-113 -330t-44 -330q0 -124 29 -231t99 -183q10 -10 29 -23t45 -31v2q34 -24 73 -50t71 -55t53 -60t21 -61q0 -32 -22 -57t-74 -43q-6 -4 -27 -3t-31 5 q-16 14 -56 52t-83 81t-82 83t-53 58v-2q-78 98 -112 227t-34 277z" /> -<glyph unicode=")" horiz-adv-x="620" d="M17 -136q1 24 13 34q190 176 272 402t82 474q0 252 -71 500t-189 462q-12 32 1 76t65 66q102 -82 173 -191t114 -237t63 -268t20 -282q0 -214 -38 -421t-98 -369t-133 -261t-145 -99q-68 0 -122 78l2 -2q-10 14 -9 38z" /> -<glyph unicode="*" horiz-adv-x="1398" d="M19 407q-5 31 17 87q30 6 47 9t27 4t19 1t23 2q42 2 84 8t74 19t49 37t9 66q-4 22 -25 45t-43 49q-44 44 -74 90t-8 112q58 24 110 6t90 -48q14 30 30 63t35 61t40 46t43 18t41 -19t33 -65q18 28 35 59t23 41q76 26 108 3t32 -75q0 -56 -26 -126t-54 -138 q-22 -56 -36 -74t-10 -34h36q58 0 116 3t116 11q76 8 153 13t169 3q24 -46 3 -78t-69 -54t-113 -36t-131 -26q-40 -6 -77 -13t-67 -12t-49 -7t-21 0l248 -274v-106h-136l-258 240q4 -16 6 -35t6 -35q6 -46 11 -98t-5 -124h-138l-88 180v-2q14 -24 7 -39t-17 -31 q-28 -34 -57 -65t-57 -31q-24 0 -40 21t-16 69q0 50 18 152q2 18 -5 28t-22 15t-34 7t-37 4q-36 2 -68 6t-52 20t-25 47z" /> -<glyph unicode="+" horiz-adv-x="862" d="M-10 488q4 4 16 13t26 19t28 18t22 10q20 6 71 16t99 20q30 8 45 9t25 3q14 88 27 174t23 172q4 26 29 40t53 14t50 -15t22 -45v-308q24 -2 54 -5t58 -6t52 -6t34 -5l18 -9t31 -17t32 -21t21 -19q-42 -66 -94 -85t-104 -25q-36 -4 -65 -11t-41 -29v2q-14 -34 -14 -72 q0 -20 3 -43t7 -47v2q4 -22 8 -47t4 -53t-12 -62t-40 -76q-6 2 -18 9t-24 16t-22 18t-14 13l4 -6q-40 60 -53 142t-21 156v2q-2 20 -1 22t-3 18h-248z" /> -<glyph unicode="," horiz-adv-x="452" d="M-61 -253q9 33 28 67t46 68t51 64q20 22 37 45t27 39q26 50 32 102t8 104q2 30 3 65t5 63q6 44 22 63t38 19q18 0 38 -26t37 -68t28 -94t11 -104q0 -34 -4 -67t-16 -61l-10 -22q-10 -24 -29 -66t-45 -88t-57 -93t-65 -79t-69 -46t-69 4l6 -2q-12 4 -29 23t-21 29v-2 q-12 30 -3 63z" /> -<glyph unicode="-" horiz-adv-x="1244" d="M42 735q14 31 62 58t124 50t166 40t188 26t190 9q94 0 173 -11t132 -36t72 -64t-9 -95q-24 0 -87 -3t-134 -7t-134 -8t-87 -6q-34 -4 -73 -11t-79 -19q-74 -16 -152 -32t-148 -16q-56 0 -103 14t-81 48q-34 32 -20 63z" /> -<glyph unicode="." horiz-adv-x="366" d="M26 132q0 34 15 65t38 54t52 37t57 14q36 0 66 -22t52 -70l-2 2q14 -36 3 -75t-36 -70t-61 -51t-68 -20q-28 0 -49 10t-39 38q-28 44 -28 88z" /> -<glyph unicode="/" horiz-adv-x="776" d="M24 138q0 100 30 225t78 263t110 279t124 273t121 246t103 196q42 30 73 19t49 -39t24 -63t0 -55q-10 -22 -32 -73t-50 -111q-22 -50 -47 -105t-46 -104t-38 -87t-25 -56q-10 -20 -32 -73t-46 -114t-47 -119t-33 -86q-10 -22 -18 -55t-18 -71q-12 -50 -27 -105t-30 -108 t-32 -98t-35 -73q-10 -12 -32 -27t-46 -20t-45 7t-27 52v2q-6 32 -6 80z" /> -<glyph unicode="0" horiz-adv-x="1214" d="M36 334q0 110 34 239t93 258t140 250t173 213t191 148t197 56t184 -56q52 -38 81 -104t29 -146q0 -106 -40 -236t-107 -264t-155 -261t-184 -225t-194 -158t-184 -60q-74 0 -138 46q-62 46 -91 124t-29 176zM202 294q0 -38 8 -71t26 -61v2q22 -32 50 -32q56 0 126 62 t144 160t145 217t127 232t92 206t42 141v52q0 60 -14 86t-38 26q-52 0 -124 -50t-151 -133t-156 -189t-139 -220t-100 -225t-38 -203z" /> -<glyph unicode="1" horiz-adv-x="692" d="M-2 154q0 42 11 90t28 94t35 86t30 64l4 8t4 6q6 12 17 40t26 67t34 88t41 101q26 66 54 134t52 126t41 100t23 56q12 22 13 29t1 11q8 32 20 70t29 71t40 55t53 22q22 0 47 -15t49 -51l-4 6q0 -2 -20 -61t-54 -156t-78 -221t-91 -254t-93 -255t-84 -226t-65 -165 t-35 -72q-14 2 -47 13t-43 27q-38 40 -38 112z" /> -<glyph unicode="2" horiz-adv-x="1370" d="M38 110q0 26 10 44t24 38q40 50 83 98t85 94q128 144 252 304t212 342q20 50 20 72q0 18 -26 18q-18 0 -45 -6t-56 -16t-60 -22t-57 -24q-68 -28 -118 -45t-69 -14t-4 33t77 94q32 36 77 66t93 53t97 35t91 12q82 0 138 -41t56 -133q0 -66 -42 -164q-52 -114 -128 -211 t-156 -191q-72 -84 -138 -165t-112 -175q50 8 125 32t163 56q64 24 131 47t131 41t124 29t112 11q58 0 101 -17t69 -55q2 -10 2 -27t-3 -35t-7 -33t-8 -21q-52 8 -112 2t-128 -23t-140 -42t-144 -51q-140 -52 -273 -93t-241 -41q-46 0 -88 11t-76 37q-24 16 -33 35t-9 41z " /> -<glyph unicode="3" horiz-adv-x="1298" d="M18 151q0 17 12 31t46 24t71 4t75 -16q26 -4 52 -10t48 -4q38 4 108 32t151 72t165 99t153 113t112 114t43 102q0 36 -56 60l8 -4q-42 8 -118 -12t-160 -44q-78 -24 -152 -43t-126 -19q-66 0 -97 31t-9 115q10 10 25 26t29 32h-2q64 68 145 159t137 181q-30 -6 -65 -14 t-71 -15t-70 -11t-62 -4q-36 0 -64 6t-41 20t-10 38t27 58q8 8 39 28t76 44t99 49t109 46t108 35t93 14q58 0 93 -26t35 -84q0 -56 -49 -153t-165 -249v-26h68q104 0 179 -18t123 -50t70 -76t22 -96q0 -68 -39 -145t-108 -153t-165 -147t-209 -125t-239 -86t-256 -32h-51 t-49 4q-10 4 -29 22t-25 28l2 -2q-2 4 -4 6t-4 6l4 -4q-12 16 -22 34t-10 35z" /> -<glyph unicode="4" horiz-adv-x="1356" d="M28 760q0 48 17 102t45 111t63 115t69 114q46 74 89 149t65 145q96 24 134 -2t38 -82q0 -28 -10 -62t-24 -68t-31 -66t-29 -56q-4 -6 -7 -12t-7 -12q-8 -14 -24 -47t-38 -71l-36 -68t-35 -65t-30 -55t-19 -36v-8q76 0 166 26t166 50q26 10 49 17t45 13q84 24 143 71 t100 110t70 138t57 157q14 40 30 90t32 90q82 28 114 2t32 -88q0 -36 -10 -79t-25 -91t-34 -97t-35 -95q-26 -64 -38 -84t-8 -36q40 -4 75 -28t53 -68q-26 -56 -64 -73t-80 -27q-32 -8 -60 -17t-44 -37q-44 -70 -77 -148t-59 -159t-47 -164t-39 -161l-16 -60q-12 -6 -35 -9 t-47 2t-43 18t-23 37v-2q-6 26 -6 66q0 72 24 139t52 135q26 60 47 120t21 118q0 8 1 11t1 4v3t-2 10q-46 -2 -105 -21t-119 -41q-70 -24 -142 -47t-140 -23q-56 0 -102 21t-80 73q-12 22 -20 51t-8 57z" /> -<glyph unicode="5" horiz-adv-x="1356" d="M26 170q0 26 21 36t55 10t75 -6t81 -14q40 -4 73 -10t37 -6q120 14 231 68t195 138t134 191t50 225v44q-22 40 -56 55t-74 15q-42 0 -91 -13t-100 -34t-100 -46t-91 -47q-64 -34 -113 -54t-77 -4q-38 28 -54 57t-16 63q0 32 12 60t26 62q4 8 8 17t12 31q6 6 11 19t15 33 q12 30 29 69t36 78t39 73t38 52q26 28 76 46t111 30t128 19t127 13q76 6 148 13t114 21q66 22 103 0t37 -68q0 -24 -18 -55t-56 -59t-98 -50t-142 -28q-22 -2 -73 -4t-109 -6t-106 -6t-68 -6q-18 -16 -37 -36t-36 -42t-29 -46t-12 -44q40 -4 83 6t83 22q42 12 89 24t95 12 q16 0 34 -2t40 -8l-2 2q148 -34 214 -115t66 -191q0 -78 -34 -165t-93 -172t-141 -162t-177 -136t-201 -94t-214 -35q-34 0 -72 4t-78 14l2 -2q-20 4 -48 14t-53 27t-42 42t-17 61z" /> -<glyph unicode="6" horiz-adv-x="904" d="M18 406q0 92 28 174q10 28 57 106t113 173t144 192t149 164t129 88t84 -35l-2 2q4 -6 6 -23t2 -36t-3 -36t-7 -25q-8 -6 -19 -17t-21 -19h2q-38 -36 -86 -82t-99 -99t-100 -112t-88 -117t-63 -115t-24 -109q150 80 258 113t184 33q100 0 145 -48t45 -118q0 -66 -39 -144 t-106 -146t-155 -114t-184 -46q-28 0 -57 4t-57 14l-16 6l-51 17t-53 23t-50 35t-40 51l-6 44q-8 48 -14 99t-6 103zM262 226q0 -10 22 -24q26 -16 64 -16q54 0 109 29t100 70t74 85t29 74q0 6 -8 8q-26 6 -90 -15t-131 -55t-118 -76t-51 -80z" /> -<glyph unicode="7" horiz-adv-x="1200" d="M55 1110q27 40 110 77t203 69t245 55t240 37t185 14q76 0 106 -16t-4 -56q-4 -8 -7 -17t-11 -21v2q-24 -52 -66 -142t-96 -199t-116 -227t-127 -229t-129 -204t-122 -150t-106 -69t-80 38l-4 8q-4 10 -3 26t5 26q14 28 50 95t78 143t81 144t57 98q10 16 30 44t42 62 q32 48 70 103t70 111t54 107t26 87q-88 -24 -165 -42t-151 -30t-150 -19t-160 -7q-26 0 -60 1t-62 3q-60 38 -33 78z" /> -<glyph unicode="8" horiz-adv-x="1244" d="M18 202q0 64 27 126t65 104q18 18 63 68t95 104q52 56 94 101t62 67q4 16 4 30q0 38 -22 76t-48 78q-30 46 -57 99t-27 109q0 32 10 66t35 68t66 70t103 74q90 54 154 79t114 25q42 0 76 -15t62 -41t52 -61t48 -73q16 -24 35 -51t39 -55l8 -4l8 -4q16 -8 33 -17t28 -22 t14 -33t-9 -48q-58 -38 -123 -83t-128 -95t-121 -103t-104 -107q-4 -18 -5 -35t-1 -37q0 -50 15 -97t33 -91q16 -40 28 -77t12 -79q0 -36 -14 -72t-50 -71t-96 -71t-152 -74q-80 -32 -164 -32q-78 0 -158 32h-2q-56 28 -79 73t-23 99zM202 174q42 -6 76 -6q80 0 135 26 t87 67t46 91t14 96q0 52 -10 94t-24 42q-4 -4 -11 -10t-11 -10q-32 -30 -79 -74t-93 -93t-83 -97t-47 -84v-42zM472 1112q0 -70 46 -160l2 -6q2 -6 11 -24t19 -28q16 12 41 32t53 46q48 38 93 74t63 48l18 20l16 12t8 -2v208q0 4 -19 6t-49 2q-44 0 -96 -13t-98 -40t-77 -70 t-31 -105zM540 888h2h-2zM542 888q4 4 8 6q2 -2 2 -6h-10zM552 888h2h-2z" /> -<glyph unicode="9" horiz-adv-x="974" d="M16 858q0 66 48 144t127 145t180 111t205 44q90 0 174 -36t160 -124q4 -16 -17 -76t-60 -148t-91 -195t-109 -212t-115 -201t-108 -164t-89 -99t-59 -5l-8 16q-2 18 -3 35t-1 37q0 54 15 98t41 100l-2 -4q2 4 5 11t3 11l228 454q-36 0 -72 -17t-74 -39q-44 -24 -89 -43 t-97 -19q-28 0 -60 9t-60 27q-72 50 -72 140zM170 892q10 -4 21 -4h27l-2 -2l-2 -2q-4 -4 -10 -18t-8 -18zM218 888h8q58 0 121 21t122 54t112 76t89 85q-18 22 -50 22q-50 0 -111 -31t-119 -74t-105 -86t-67 -67z" /> -<glyph unicode=":" horiz-adv-x="312" d="M21 134q3 26 19 43t41 26t53 9t57 -12t43 -40q20 -38 20 -67t-14 -50t-38 -32t-52 -11q-32 0 -65 18t-49 58v-2q-18 34 -15 60zM30 784q0 28 13 51t35 36t53 12t65 -23q26 -18 39 -44t13 -50q0 -42 -27 -74t-69 -32t-80 38q-42 38 -42 86z" /> -<glyph unicode=";" horiz-adv-x="438" d="M-68 -330q4 24 14 36l-8 -8q56 70 95 128t63 114t35 117t11 139v56t-4 76q22 14 49 6t51 -24t40 -32t16 -18l-6 22q28 -38 40 -85t12 -99q0 -88 -31 -182t-77 -172t-100 -128t-100 -50q-30 0 -56 16t-42 54l4 -4q-10 14 -6 38zM62 848q0 16 2 32t6 31t10 21h160v-164 q-28 -16 -55 -17t-50 8t-41 25t-26 34q-2 0 -4 6v2v-2q-2 8 -2 24z" /> -<glyph unicode="<" horiz-adv-x="1160" d="M10 790q0 30 15 59t49 63q16 14 45 40t66 59t80 72t87 79l88 80t82 74t67 61t45 41q20 8 53 0t60 -27t35 -48t-22 -63l-502 -502q-12 -12 15 -41t67 -60t82 -60t60 -41q6 -6 14 -10l-4 2q20 -14 63 -44t98 -66t116 -76t116 -76t99 -65t64 -41q42 -54 42 -102 q0 -40 -23 -66t-65 -26q-36 0 -76 26h-2q-24 16 -47 31t-47 31q-170 110 -336 224t-316 248q-8 6 -15 12t-13 14q-52 44 -96 92t-44 106z" /> -<glyph unicode="=" d="M40 72l2 -2q-22 30 9 55t91 46t137 38t146 28t119 17t56 6h352q24 -14 43 -47t1 -79q-58 -6 -129 -17t-148 -24t-155 -26t-146 -25q-74 -14 -135 -24t-101 -18q-28 -6 -47 -5t-35 9t-30 24t-30 44zM168 602v34q16 28 62 52t109 41t137 27t148 10q112 0 205 -30t133 -94 q-14 -18 -73 -36t-140 -33t-173 -24t-170 -9q-90 0 -156 14t-82 48z" /> -<glyph unicode=">" horiz-adv-x="862" d="M42 1338q4 10 17 24t29 28t31 23t25 9q38 -28 75 -52t77 -52q78 -52 163 -111t156 -125t118 -139t47 -151q0 -92 -64 -170v2q-18 -24 -54 -67t-79 -95t-90 -108t-88 -104t-72 -84t-43 -50q-4 -6 -21 -21t-33 -31l-70 -72q-8 2 -22 14t-29 25t-27 25t-14 16l-2 2 q-22 44 -9 90t49 95t88 100t110 103q52 48 103 97t89 95t58 89t12 79q2 -10 -30 16t-80 64q-62 50 -137 112t-139 123t-106 114t-38 87z" /> -<glyph unicode="?" horiz-adv-x="1370" d="M136 668l2 -2q-16 62 29 136t128 153t190 162t215 163q82 60 160 119t138 111t97 94t37 70q0 22 -50 35t-168 13h-660q-14 32 -16 64t8 58t32 42t56 16h660q50 0 111 -24t113 -65t87 -94t35 -111q0 -72 -54 -138q-100 -114 -224 -201t-254 -165h2q-76 -48 -151 -95 t-143 -101t-128 -117t-106 -139q-12 -16 -34 -30t-44 -16t-41 11t-27 51zM141 140q-13 34 1 78q16 42 35 60t39 18q18 0 35 -19t30 -48t20 -62t7 -61q0 -36 -14 -62t-44 -26q-32 0 -74 60v-2q-22 30 -35 64z" /> -<glyph unicode="@" horiz-adv-x="1668" d="M36 568q0 132 38 277t104 285t153 267t184 222t200 152t199 57q100 0 187 -63t149 -207q32 -72 52 -151t20 -159t-25 -158t-77 -148q-38 -48 -88 -102t-109 -98t-125 -68t-136 -14q-16 4 -49 2t-65 -6q-26 -2 -56 -3t-52 -1q-24 0 -45 2t-37 12l2 -2q-70 36 -100 85 t-30 105q0 72 46 147t113 137t141 102t132 40q46 0 79 -24t43 -76q10 -60 -8 -126t-40 -130v2q-10 -28 -16 -44t-12 -40q10 0 22 7t22 11q140 94 209 205t69 267q0 16 -1 35t-3 41q-10 116 -53 168t-107 52q-68 0 -150 -42t-164 -114t-159 -170t-136 -210t-95 -234t-36 -242 q0 -130 48 -246q46 -112 112 -158t144 -46q80 0 171 38t185 97t185 131t173 140q34 28 66 55t67 52t74 52t87 55q14 -90 -29 -181t-123 -177t-188 -161t-225 -132t-232 -89t-211 -32q-34 0 -62 2t-56 12h2q-102 28 -174 80t-117 123t-66 156t-21 181zM534 879q0 -11 2 -21 q20 0 36 23t30 55t24 68t16 60q-18 -6 -34 -28t-30 -49t-25 -52t-15 -37v-4q-4 -4 -4 -15z" /> -<glyph unicode="A" horiz-adv-x="2118" d="M-245 -334q-4 12 -4 24q0 16 8 30q13 24 71 24q40 -54 94 -54q66 0 150 45t171 114t170 151t148 158t106 135t41 81q-4 -4 -22 7t-36 25q-22 14 -45 30t-35 44q10 26 31 44t48 30t58 20t63 16q34 6 62 12t44 14q90 130 162 240t135 212t122 200t123 206q50 84 105 177 t119 197q36 58 72 58q24 0 42 -29t28 -79t15 -118t5 -146q0 -70 -2 -146t-5 -153t-7 -151t-8 -138q-4 -92 -9 -161q-3 -38 -3 -61q0 -18 2 -26q2 -32 3 -61t3 -57q4 -86 12 -155t34 -133t79 -131t149 -149q-100 -34 -140 -34q-62 0 -104 34t-71 88t-49 121t-36 133 q-22 80 -40 145t-48 79h-66q-22 -6 -66 -17t-96 -23q-78 -18 -153 -36t-107 -28q-38 -10 -83 -46t-96 -90t-105 -121t-110 -137q-78 -100 -163 -201t-172 -182t-177 -132t-180 -51q-94 0 -174 54l-2 2q-12 8 -32 37t-29 59zM1132 678q4 -2 20 0t24 4h2l-16 -22v-18z M1178 682q40 6 101 14t121 20t110 27t68 33l4 36t11 95t14 135t15 154t15 153t11 133q-16 -30 -39 -74t-55 -102q-64 -120 -157 -284t-219 -340z" /> -<glyph unicode="B" horiz-adv-x="1794" d="M32 202q0 42 18 88t42 102q4 10 7 20t7 20q6 14 27 58t49 103t59 126t59 126t49 104t29 59v-2q24 56 24 104q0 16 -4 37t-8 41q-2 18 -5 36t-3 46q0 32 10 67t42 75q6 6 30 33t53 57t53 56t30 32q14 16 68 47t131 69t171 79t189 74t185 54t160 21q84 0 135 -32t51 -112 q0 -16 -2 -33t-8 -35q-26 -90 -73 -165t-105 -138t-120 -116t-118 -97q-26 -20 -41 -30l-24 -16t-16 -13t-19 -23q142 -10 241 -35t161 -63t90 -86t28 -104q0 -84 -67 -181t-177 -192t-250 -184t-287 -156t-289 -108t-256 -41q-52 0 -97 9t-83 31q-80 46 -113 91t-33 97z M262 266q0 -48 28 -78t98 -30q58 0 146 24q240 54 419 136t298 172t177 178t58 156q0 48 -40 78t-116 30q-118 0 -307 -78t-455 -266q-37 -32 -68 -32q-4 0 -9 1q-35 5 -63 21h2q-16 8 -22 8q-30 -36 -57 -78t-47 -84t-31 -82t-11 -76zM406 586l8 6l-6 -6h-2zM476 776 q40 26 105 72t143 107t165 133t171 146t161 147t135 138t92 117t34 86q-10 2 -21 2h-21q-94 0 -194 -31t-195 -80t-177 -109t-140 -116q-10 -20 -24 -55t-34 -77q-24 -54 -51 -117t-52 -120t-45 -103t-30 -68l-12 -24q-4 -6 -7 -11t-3 -1v-36z" /> -<glyph unicode="C" horiz-adv-x="1582" d="M-12 392q0 92 36 195t96 211t140 217t169 212t181 196t176 169t155 133t119 85q98 58 168 58q50 0 86 -23t57 -62t31 -91t10 -108q0 -84 -20 -162t-51 -133t-68 -75q-14 -7 -27 -7q-23 0 -44 21q0 30 7 76t17 96q10 58 22 120t12 102v26t-2 14q-14 2 -29 2 q-53 0 -115 -27q-80 -35 -169 -103t-182 -162t-179 -203t-163 -225t-134 -228t-90 -212t-33 -178q0 -70 34 -110t116 -40q22 0 62 6q72 10 140 41t132 74t125 94t119 103q90 80 185 157t197 119q32 12 61 6t49 -26t27 -48q3 -12 3 -24q0 -17 -6 -36q-14 -40 -77 -101 t-157 -131t-208 -140t-228 -127t-219 -92t-179 -35q-26 0 -45 2t-35 10q-146 58 -209 151t-63 213z" /> -<glyph unicode="D" horiz-adv-x="2058" d="M48 52q-8 23 -8 44q0 25 12 47q22 39 68 63q34 16 66 31t66 31q-25 -6 -44 -6q-35 0 -54 19q-28 29 -28 85q0 32 8 70t20 75t25 71t21 58v-2q6 18 10 26q22 64 66 159t92 195v-2q40 88 74 161t54 125q-6 22 -8 38t-2 36q0 56 22 103t56 86t77 72t85 65q148 108 318 165 t352 57q160 0 316 -50t296 -156q84 -68 119 -143t35 -155q0 -114 -72 -236t-192 -243t-278 -238t-329 -222t-346 -193t-329 -152t-276 -100t-190 -36q-84 0 -102 54v-2zM276 278q76 32 150 59t146 55q84 30 166 62t163 68t162 80t161 100q194 114 330 217t221 194t123 170 t38 145q0 70 -40 125t-108 92t-158 57t-190 20q-90 0 -185 -18t-185 -53t-171 -88t-145 -125q-2 -4 -5 -14l-6 -20t-6 -19t-3 -11q-52 -128 -101 -231t-93 -189q-36 -70 -71 -142t-69 -153t-65 -174t-59 -207z" /> -<glyph unicode="E" horiz-adv-x="1864" d="M40 70q-17 16 -17 32q0 19 23 38q22 86 47 161t51 146t55 142t61 147q4 10 8 19t8 19q4 6 -6 18l-20 24q-16 18 -29 36t-19 37t0 40t30 45q8 8 33 16t47 12q16 4 25 6t11 2q4 2 19 17l19 19h-2q20 34 44 72t48 72q42 64 79 130t59 162q-4 -4 -22 4q-22 4 -42 12t-34 22 t-17 38t11 62v-2q8 26 72 55t166 57t232 53t268 44t276 30t256 11q112 0 200 -12t139 -37t59 -66q1 -6 1 -13q0 -37 -39 -86q-29 -7 -52 -7q-9 0 -18 1q-30 4 -58 14h-2q-18 4 -39 8t-37 4q-48 -4 -99 -6t-101 -2q-32 0 -64 1t-66 1h-104q-110 0 -220 -7t-218 -37 q-58 -16 -109 -62t-99 -115t-95 -155t-97 -184q-4 -8 -9 -20t-9 -20q36 8 86 20t102 26q60 16 125 33t131 30t127 22t113 9q70 0 121 -18t73 -64q4 -10 1 -36t-7 -42q-54 -10 -120 -18t-124 -14q-100 -12 -202 -27t-202 -37t-194 -56t-176 -84q-76 -138 -140 -284t-116 -296 q72 20 153 39t153 34t124 25t62 12q162 26 312 44t310 18q40 0 84 -1t84 -5q30 -6 43 -32t16 -56t-1 -58t-6 -40q-34 2 -84 4t-84 2q-220 0 -436 -32t-440 -80l2 2q-16 -4 -44 -13t-62 -23q-60 -22 -128 -44t-128 -22q-56 0 -94 24l4 -2q-32 16 -42 42z" /> -<glyph unicode="F" horiz-adv-x="1860" d="M23 115q1 31 10 62t23 60t28 57v-2l14 28t12 26q6 12 19 39t28 61t32 74t35 78q26 58 46 105t30 69q2 12 -8 26t-20 26q-16 16 -30 32t-20 34t1 39t31 45q22 20 48 28t56 12q24 4 46 8t30 22l262 500q-6 22 -8 41t-2 39q0 42 12 73t33 56t51 47t64 44q10 10 19 15t19 13 q214 34 419 58t419 24q34 0 73 -1t75 -1q20 -4 50 -32t46 -64q11 -25 11 -49q0 -10 -2 -20q-7 -33 -59 -45q-6 0 -24 5t-34 13q-10 4 -20 6t-6 4q-182 0 -317 -4t-236 -20t-173 -47t-131 -85t-108 -135t-105 -195q-2 0 -14 -18t-25 -43t-24 -54t-11 -53q38 -6 78 -6 q106 0 213 26t217 60q116 34 232 62t236 28q28 0 58 -3t68 -7v-88q0 -18 -42 -35t-108 -29q-76 -16 -185 -38t-230 -51t-245 -66t-231 -80t-187 -93t-112 -106q-74 -150 -145 -317t-125 -325q-14 -20 -35 -34t-42 -16h-6q-18 0 -34 10q-19 12 -31 44v2q-9 27 -9 55v6z" /> -<glyph unicode="G" horiz-adv-x="1520" d="M-12 430q0 138 53 293t140 307t199 292t232 247t237 172t213 69q20 4 39 4l69 -13q54 -21 96 -60t68 -89t26 -96t-22 -81t-74 -57l4 4q-12 -6 -29 -7t-31 4t-24 14t-10 21v186l-20 -4q-10 -2 -18 -3t-12 -3q-224 -56 -385 -190t-269 -322q-166 -290 -237 -477t-71 -289 q0 -68 31 -97t83 -29q70 0 165 35t196 90t200 123t179 136t132 127t60 95q-30 -2 -61 -11t-57 -15h2q-22 -10 -80 -29t-122 -41q-60 -20 -119 -39t-81 -27q-32 -10 -58 -2t-44 25t-27 42t-9 49q0 32 16 59t50 35q16 2 77 23t145 51q86 30 186 64t198 64t184 49t144 19 q78 0 106 -33q12 -14 12 -36q0 -29 -22 -73l-88 -88q-40 -40 -88 -89t-94 -96t-83 -84t-55 -53v2q-8 -8 -52 -46t-99 -85t-111 -93t-90 -70q-40 -34 -105 -87t-143 -104t-162 -87t-162 -36q-40 0 -74 10t-68 34q-98 72 -142 174t-44 222z" /> -<glyph unicode="H" horiz-adv-x="1772" d="M52 150q0 60 17 142t45 173t61 185t66 176t60 146t41 98q16 42 46 115t64 157q32 76 67 159t68 159t60 139t43 99q44 14 74 14q24 0 38 -9q32 -21 32 -79q0 -64 -44 -170t-98 -226q-28 -60 -54 -117t-47 -108t-33 -93t-12 -72q32 0 71 3t81 9t83 14t77 16q18 4 36 7t34 5 q190 34 310 91t201 143t140 204t127 276q14 28 26 58t28 62q30 64 59 64h3q30 -4 52 -41t32 -86q6 -31 6 -51q0 -12 -2 -20q-6 -14 -16 -33t-22 -43q-16 -28 -28 -54t-14 -30q-4 -8 -11 -27t-15 -40t-15 -41t-9 -28q16 -14 31 -32t21 -28q2 -10 2 -20q0 -21 -8 -43 q-12 -33 -34 -68t-51 -69t-59 -66q-38 -40 -71 -82t-49 -76q-94 -236 -164 -470t-102 -488q-8 -12 -20 -25t-28 -20t-36 -7t-44 14q-1 14 -1 29q0 54 11 131q14 98 36 211t48 227t48 208q22 90 32 127t8 45h-32q-84 0 -206 -20t-249 -48t-243 -60t-190 -56q-30 -70 -53 -157 t-43 -171q-32 -132 -69 -256t-115 -234q-6 2 -17 9t-22 16t-21 17t-16 14l4 -4q-16 20 -21 46t-5 60z" /> -<glyph unicode="I" horiz-adv-x="550" d="M-3 162q3 32 9 65t13 59t9 32q132 346 267 696t267 696q28 66 53 79q9 5 17 5q15 0 27 -15q19 -23 30 -71t11 -102q0 -22 -3 -45t-11 -39q-18 -44 -37 -86t-37 -88q-134 -312 -258 -634t-204 -672q-34 -22 -61 -22t-46 14t-30 36t-15 42v-2q-2 11 -2 27q0 11 1 25z" /> -<glyph unicode="J" horiz-adv-x="1554" d="M2 412q0 48 31 81t107 43q2 -34 6 -87t18 -105t38 -91t66 -43h-2q19 -1 37 -1q90 0 165 32q90 39 161 110t127 168t99 205t77 222t64 220q24 90 46 168t42 136v-4q8 30 8 56q0 40 -42 40q-38 0 -100 -20t-124 -42q-70 -26 -140 -47t-124 -21q-48 0 -80 18q-54 38 -54 82 q0 36 45 68t121 61t175 54t205 47t213 40t199 31t161 22t101 13q40 6 110 14t141 16t130 15t79 7q44 4 114 6t132 2q78 0 134 -13t60 -31q4 -12 9 -29t11 -33t11 -31t7 -23q-14 0 -38 -1t-51 -3t-55 -3t-50 -1q-88 -4 -195 -9t-221 -13t-225 -22t-205 -34t-163 -47t-97 -65 q-12 -34 -26 -87t-32 -119q-30 -116 -70 -264t-93 -301t-119 -300t-148 -262t-179 -185t-213 -70q-86 0 -188 48h2q-30 14 -67 57t-71 99t-57 117t-23 109z" /> -<glyph unicode="K" horiz-adv-x="1988" d="M46 83q12 69 47 169t79 207t91 210t81 177q20 44 34 73t18 39q52 120 106 228t102 198q62 120 124 244t120 282q29 18 56 18q6 0 12 -1q32 -5 54 -26t31 -49t1 -52q-10 -20 -27 -56t-35 -74q-20 -42 -43 -88t-44 -89t-39 -80t-28 -57q-2 -4 -3 -9t-3 -7q-4 -10 -9 -20 t-7 -20q54 0 127 19t156 51t173 74t180 87t175 91t157 86q70 40 132 73t102 53h-2q38 18 53 10t15 -32t-14 -59t-35 -70t-45 -63t-44 -40v2q-22 -12 -67 -36t-96 -49t-97 -47t-66 -32q-40 -18 -98 -40t-122 -46q-66 -24 -138 -51t-141 -56t-132 -61t-111 -64q-16 0 -26 -2 t-15 -8t3 -16q36 -24 99 -79t142 -130t169 -167t178 -189t169 -194t143 -184t99 -159t37 -118q0 -38 -21 -64t-69 -36q-10 6 -18 14q-8 6 -15 13l-11 11l-2 2l-6 8q-72 118 -146 217t-154 191t-170 185t-194 201q-156 164 -251 237t-153 73t-102 -90t-96 -236 q-28 -76 -61 -164t-77 -184l2 2q-4 -6 -8 -14l-8 -16q-22 -52 -54 -110t-80 -92q-36 -24 -57 -24q-14 0 -21 10q-11 16 -11 47q0 20 5 48z" /> -<glyph unicode="L" horiz-adv-x="1752" d="M24 126q0 34 10 70t24 70q26 56 80 138q48 90 89 171t79 151q68 128 125 239t113 228t116 253t134 318q6 10 15 24t21 28t28 23t36 9q22 0 42 -12t36 -44q16 -36 16 -76q0 -66 -34 -157t-88 -198t-122 -225t-138 -238q-64 -110 -126 -217t-110 -202t-78 -172t-32 -129 q26 -2 50 -2h50q136 0 274 18t280 40q140 22 281 41t285 19q28 0 55 -1t55 -3q24 0 45 -13t33 -35q13 -24 13 -53q0 -27 -17 -55h-124q-86 -6 -190 -22t-220 -34q-200 -32 -412 -59t-406 -27q-46 0 -90 2t-84 6q-12 4 -37 16t-33 18q-28 16 -36 40t-8 52z" /> -<glyph unicode="M" horiz-adv-x="2534" d="M76 122q0 52 28 142t75 204t109 244t128 262t133 258t125 233t103 187t67 120q30 -12 51 -17t33 -5q38 0 68 19t62 43q34 28 80 56l-2 -2q88 50 144 50q80 0 112 -65t32 -167q0 -62 -9 -134t-23 -146t-31 -145t-31 -131h2q-4 -18 -8 -33t-8 -31q28 36 73 91t90 111 t84 104t55 68q4 4 12 13t10 11q228 178 382 258t248 80q98 0 142 -65t44 -177q0 -102 -31 -233t-83 -281q-8 -22 -29 -88t-48 -155t-58 -189t-58 -190t-47 -158t-26 -92q-2 -8 -9 -40t-20 -75t-34 -91t-47 -85t-59 -57q-21 -12 -43 -12q-14 0 -28 4q-8 6 -19 17t-21 23 q-4 10 -8 32t0 28q2 6 10 29t17 51t17 52l10 30q62 204 115 379t101 347t96 353t102 397l-2 -2q2 6 3 7t-1 7q-4 0 -11 1t-13 1q-78 0 -171 -63t-190 -159t-193 -212t-180 -222q-52 -66 -100 -127t-91 -108t-80 -78t-63 -37q-16 -4 -38 2t-42 17t-34 23t-14 24v170 q4 20 13 57t19 85t23 104t25 114q12 56 25 112t24 105t20 86t13 59q4 10 5 21t5 21q8 32 14 65q4 25 4 50v17q-50 0 -109 -48t-121 -131t-128 -194t-131 -234t-128 -251t-119 -246t-108 -225t-98 -185t-86 -120q-31 -33 -57 -33q-8 0 -15 3h2q-52 18 -52 92zM1788 -130 l6 -14q-6 8 -6 14zM1794 -144l2 -2v2h-2z" /> -<glyph unicode="N" horiz-adv-x="2074" d="M18 83v17q10 54 36 118t61 130t73 132t72 126q26 42 47 79t37 67q14 30 43 90t67 135t79 157l78 156t67 132t44 86q32 34 63 49t59 15q50 0 88 -46t67 -124t53 -180t46 -214q20 -92 41 -189t47 -187t57 -167t69 -127q22 2 59 53t83 135t97 193t103 227t103 236t93 222 q48 118 87 209t61 127q28 50 58 51h2q29 0 51 -24q23 -25 35 -65q7 -24 7 -47q0 -15 -3 -29q-70 -190 -138 -356t-140 -326t-154 -326t-182 -358q-48 -58 -95 -91t-93 -33q-92 0 -170 122q-58 102 -98 197t-70 187t-51 182t-41 182q-16 64 -27 123t-31 133q-18 -14 -54 -71 t-82 -139t-99 -181t-106 -199t-100 -192t-81 -160q-20 -40 -35 -69t-23 -45q-12 -22 -33 -56t-41 -67t-36 -57t-18 -26h-122q-2 8 -4 23t-4 31t-2 29z" /> -<glyph unicode="O" horiz-adv-x="1318" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z" /> -<glyph unicode="P" horiz-adv-x="1520" d="M34 162q6 50 26 106t48 114t54 110l52 104q12 26 14 36q4 16 11 34t17 42q16 30 48 94t71 145t82 169t82 169t70 145t45 96v12q-46 -4 -94 -33t-90 -59q-12 -10 -31 -23t-33 -23q-46 12 -65 35t-19 51q0 20 8 42t20 41t25 35t23 24q200 124 418 185t444 61q72 0 140 -6 t136 -16q170 -86 243 -181t73 -197q0 -108 -78 -216t-204 -207t-283 -184t-317 -149t-305 -102t-245 -42q-42 -66 -68 -110t-42 -77t-26 -61t-20 -66q-10 -36 -26 -89t-44 -125l-52 -52q-10 4 -25 15t-30 24t-27 26t-14 19v-2q-14 27 -14 62q0 12 2 24zM518 778q12 -2 25 -2 h23q88 0 186 27t194 67t184 87t158 87q210 120 308 236t98 202q0 54 -30 98t-80 76t-116 49t-138 17q-68 0 -139 -17t-136 -53t-122 -93t-99 -137q-24 -46 -56 -110t-67 -133t-70 -137t-62 -122l-44 -88l-17 -34v-20z" /> -<glyph unicode="Q" horiz-adv-x="1482" d="M144 370q0 102 35 215t91 226t127 222t143 205t137 175t111 133l-2 -2q10 12 21 25t23 27q34 44 78 95t93 99t101 86t104 56q13 4 24.5 4t22.5 -4q21 -8 38 -24t30 -37t23 -39q6 -16 8 -18q106 -124 152 -267t46 -293q0 -180 -58 -357t-160 -331v2q-8 -12 -35 -49 t-62 -82t-70 -91t-57 -76q-6 -6 -11 -14t-9 -12q-40 -60 -40 -124q0 -56 21 -111t47 -111q26 -58 47 -111t21 -109q0 -16 -3 -36t-13 -46q-31 -14 -51 -14q-11 0 -19 4q-22 12 -38 34l2 -4q0 4 -4 8l-4 2q-26 34 -49 91t-39 109q-22 70 -48 133t-66 83l-20 -8t-22 -8t-28 -8 q-52 -20 -119 -41t-143 -21t-153 34t-141 118q-42 58 -62 124t-20 138zM346 198q10 -12 33 -34t33 -28q42 -28 78 -40t68 -12q60 0 107 39t83 101t61 139t42 153t24 143t9 109q6 2 34 4t59 -2t55 -16t24 -34v-186q62 60 116 142t94 171t67 181t35 174q2 30 3 57t1 53 q0 184 -36 262t-94 78q-76 0 -173 -79t-199 -207t-200 -288t-172 -322t-117 -309q-36 -124 -36 -216q0 -17 1 -33z" /> -<glyph unicode="R" horiz-adv-x="1718" d="M32 147q10 57 36 130t64 158t84 175t96 182t98 180q42 74 79 142t66 125t50 99t29 64q-10 -4 -24 -11l-26 -13q-22 -10 -50 -22t-52 -12q-50 0 -84 50q-16 26 -13 51t17 47t32 38t30 24h-2q180 116 349 200t320 136t282 77t235 25q168 0 261 -56t93 -158q0 -78 -77 -182 t-244 -223t-431 -250t-640 -263q0 -26 38 -63t100 -81t141 -94t163 -100q90 -54 177 -108t154 -105t109 -99t42 -90q0 -56 -56 -88l2 2q-18 -8 -60 16t-93 63t-104 84t-95 79q-56 46 -64 52q-34 22 -72 45t-72 45h2q-108 64 -212 131t-206 151q-18 0 -44 -37t-55 -95 t-59 -129t-56 -139q-24 -62 -47 -119t-47 -101t-47 -71t-47 -27q-22 0 -40 17t-28 55q-7 20 -7 46q0 21 5 47zM646 1088q12 -6 28 -6q0 -4 -1 -5t-1 -3v-22zM674 1082h14q74 0 182 37t229 96t241 132t215 146t155 137t60 106q0 8 -24 16h-58q-228 0 -391 -31t-280 -108 t-198 -206t-145 -325z" /> -<glyph unicode="S" horiz-adv-x="1536" d="M21 243q11 29 61 55q30 -28 78 -64t88 -52q34 -2 66 -3t64 -1q106 0 208 10t198 37t187 72t177 115q86 72 124 133t38 113q0 64 -53 122t-136 111t-184 100t-199 89q-58 26 -119 53t-116 56t-99 58t-68 57q-2 8 -2 17q0 40 47 92q57 63 155 130t225 134t255 119t246 84 t198 32q84 0 125 -39q27 -25 27 -72q0 -25 -8 -55q-20 -4 -108 -28t-211 -60t-260 -81t-253 -91t-192 -89t-76 -75q0 -8 38 -18q238 -76 410 -162t284 -176t165 -180t53 -176t-41 -166t-112 -150t-164 -128t-199 -99t-218 -64t-218 -23q-76 0 -147 12t-133 38l2 -2 q-10 4 -38 18t-60 36t-62 49t-42 55q-6 15 -6 29t5 28z" /> -<glyph unicode="T" horiz-adv-x="1394" d="M32 1244q12 26 85 58t189 67t266 71t317 71t342 68t340 62t312 50t257 34t175 16q15 1 27 1q39 0 42 -8v2q6 -18 6 -38t-6 -38t-22 -33t-44 -23q-118 -18 -251 -41t-269 -47t-268 -49t-246 -49q-52 -14 -106 -68t-106 -133t-103 -179t-98 -207t-90 -214t-79 -203 q-34 -92 -67 -173t-64 -138t-60 -84q-19 -18 -37 -18q-9 0 -18 5q-10 8 -25 23t-19 25l-2 2q-6 26 -6 68q0 54 15 115t37 123t47 119t47 105q14 30 24 54q12 30 36 83t52 116t59 131t59 130t51 111t35 73q-50 -6 -120 -23t-142 -33q-108 -28 -217 -52t-187 -24 q-60 0 -103 21t-65 71z" /> -<glyph unicode="U" horiz-adv-x="1520" d="M64 422q0 136 41 291t102 307t133 291t135 245t107 168q43 60 50 60q19 0 38 -31q12 -19 16 -40t1 -42t-5 -41v-12q0 -10 -7 -23t-15 -27l2 2q-4 -6 -7 -12t-3 -2q-106 -236 -182 -425t-124 -337t-70 -258t-22 -184q0 -78 24 -114t64 -36q76 0 191 73t245 196t267 284 t260 338t221 359t152 346l12 12q4 4 6 10t6 11t15 8t35 3q40 -28 58 -67t18 -87q0 -82 -49 -197t-134 -248t-196 -277t-235 -282t-254 -261t-249 -216t-222 -148t-175 -55q-58 0 -96 30h-2q-82 68 -117 168t-35 220z" /> -<glyph unicode="V" horiz-adv-x="1400" d="M50 804q0 130 14 257t44 236t76 190t110 119q26 -16 35 -57q7 -31 7 -72q0 -14 -1 -28q-3 -59 -13 -134t-22 -161q-12 -84 -25 -176t-23 -183t-17 -177t-7 -160q0 -108 15 -176t53 -68q32 0 86 42q90 72 184 158t187 177t181 183t164 174q198 208 374 419t346 435 q18 26 39 36t43 10q24 0 43 -14t33 -38t18 -54q2 -12 2 -24q0 -18 -4 -36q-12 -12 -33 -36t-49 -55t-59 -67t-63 -72q-40 -44 -80 -89t-75 -84t-63 -69t-42 -46q-24 -28 -60 -71t-76 -93q-72 -86 -160 -192t-185 -215t-198 -211t-197 -182t-182 -129t-152 -49q-84 0 -134 74 q-32 48 -57 123t-42 169t-26 201t-9 215z" /> -<glyph unicode="W" horiz-adv-x="1754" d="M32 552q0 142 11 300t31 311t46 290t58 238t66 156q29 47 58 47l10 -2q10 -8 28 -26t22 -34q1 -6 1 -15q0 -21 -4 -57q-5 -50 -14 -120t-20 -156t-23 -178q-16 -114 -31 -234t-27 -231t-20 -202t-8 -147q0 -52 2 -54l4 -4q24 24 50 77t54 127t58 161t62 179v-2 q40 120 82 235t84 205t86 146t90 56q64 0 120 -154t96 -484q0 -8 4 -20q6 -36 16 -90t22 -114t26 -119t29 -107t29 -78t26 -30q2 2 4 8q2 4 5 9t7 15l-2 -2q8 20 33 82t58 145t70 176t70 176t58 145t35 82q4 8 20 56q18 48 45 117t60 144t74 146t86 124t95 78q29 15 59 15 q21 0 43 -8h-10q6 -2 16 -11t19 -21t16 -24t7 -20q-106 -138 -184 -274t-140 -274t-112 -279t-98 -287q-38 -114 -78 -233t-88 -241q-58 -136 -132 -136q-48 0 -96 70t-91 178t-81 235t-66 241t-45 197t-19 103q-4 14 -7 37t-7 45l2 -4q-2 4 -3 12t-3 12t-2 7t-2 7 q-8 -22 -29 -71t-47 -106t-52 -115t-44 -98q-6 -14 -16 -47t-26 -79q-20 -66 -45 -148t-55 -166t-63 -164t-68 -143t-71 -101t-72 -38q-50 0 -80 50q-40 60 -56 195t-16 313z" /> -<glyph unicode="X" horiz-adv-x="1342" d="M36 122q0 22 7 48t23 50v-2q32 52 86 115t118 131q56 62 115 128t104 128t69 117q16 37 16 68q0 15 -4 29q-4 8 -12 25t-12 25l-36 72l-39 78t-35 69t-24 45v-2l-26 52q-22 38 -48 82t-32 64q-4 16 -2 48t10 44q22 16 44 16q13 0 26 -6q34 -16 67 -57t67 -101t68 -122 q20 -38 40 -75t38 -68t33 -54t23 -31q8 10 15 20t15 20l40 52q2 6 8 14q4 6 9 14t9 18q22 42 55 98t76 103t94 74q34 18 71 18q19 0 40 -5q54 -14 60 -49q1 -7 1 -14q0 -31 -20 -71q-25 -50 -73 -110t-102 -122q-38 -42 -74 -85t-63 -80t-42 -65t-9 -42v2q8 -20 25 -50 t39 -66t49 -78t55 -84q50 -76 102 -157t90 -155t57 -134q11 -35 11 -61q0 -20 -6 -35q-14 -4 -37 -7q-10 -1 -17 -1q-10 0 -16 2q-12 4 -34 26l-40 40h2q-14 18 -20 22l-2 2q-20 26 -50 73t-64 99q-40 60 -84 128t-82 128t-66 102t-34 50q-56 -52 -116 -116t-117 -132 t-111 -134t-98 -122l-58 -74q-28 -34 -52 -49t-46 -15q-34 0 -54 26t-20 66z" /> -<glyph unicode="Y" horiz-adv-x="1004" d="M60 1626q0 40 26 53q8 4 20 4q25 0 66 -19q26 -24 59 -65t68 -92t72 -109t73 -116q46 -72 80 -137t59 -112t43 -72t30 -15q18 36 45 94t59 128q42 94 90 199t97 201t97 175t89 121q37 38 65 38q4 0 7 -1q31 -5 49 -73q2 -9 2 -21q0 -44 -28 -125q-36 -104 -102 -247 t-152 -315t-176 -348q-76 -148 -152 -299t-142 -287t-115 -249t-69 -187v2q-12 -40 -45 -76t-69 -36q-26 0 -51 19t-41 63l2 -2q-18 48 -18 98q0 102 59 210t137 228q44 66 87 135t78 141t57 145t22 147q-16 32 -60 100t-98 144q-52 78 -109 163t-104 162t-77 138t-30 95z " /> -<glyph unicode="Z" horiz-adv-x="2106" d="M41 109q5 47 44 107t107 134t155 156t188 171t205 179q142 122 280 244t248 229t179 194t71 141q-10 0 -16 -2h2q-52 -10 -142 -26t-195 -31t-211 -26t-190 -11q-90 0 -143 20t-53 68q0 38 54 92q24 -3 51 -3q60 0 137 15q112 22 238 52q68 16 138 32t136 28t127 20 t109 8q96 0 152 -31t56 -109q0 -82 -80 -206q-82 -122 -174 -230t-192 -205t-205 -186t-209 -173q-120 -100 -239 -198t-227 -204q0 -2 -16 -18t-37 -39t-40 -48t-27 -45q54 6 175 34t277 66q132 32 276 67t282 63t261 47t213 19q100 0 157 -27t57 -91q0 -28 -28 -88 q-54 -4 -141 -16t-198 -30t-238 -39t-261 -45q-186 -32 -371 -62t-336 -51t-252 -29q-34 -3 -58 -3q-49 0 -63 11q-34 25 -34 64q0 6 1 11z" /> -<glyph unicode="[" horiz-adv-x="1186" d="M62 -100q-4 30 1 121t15 221t27 286t39 316t50 313t59 274t67 200t74 91h-2q16 4 42 7t60 7q30 4 55 8t33 6l-2 -2q22 4 76 22t115 39t116 40t77 27q32 8 76 -3t73 -32t29 -50t-60 -59q-148 -44 -253 -86t-178 -92t-120 -110t-78 -139t-51 -180t-40 -231q-8 -56 -17 -118 t-21 -132q-16 -48 -26 -123t-18 -158t-11 -167t-3 -152v-21v-12v-10v-15q194 10 389 19t389 19q24 -36 22 -64t-20 -48t-48 -33t-60 -22t-56 -12t-38 -5q-118 -18 -212 -24t-196 -6h-109t-125 4q-6 0 -21 5l-30 10t-28 10t-17 7h2q-12 10 -29 29t-17 25z" /> -<glyph unicode="\" horiz-adv-x="820" d="M22 1246q28 98 84 98q26 0 54 -32t58 -86t61 -127t63 -155q42 -102 90 -218t105 -230t123 -218t142 -182q-24 -36 -47 -61t-45 -34t-45 0t-47 41q-66 64 -129 157t-123 202t-113 228t-98 231t-79 212t-54 174z" /> -<glyph unicode="]" horiz-adv-x="1116" d="M18 1650q-16 30 34 62t140 60t206 46t230 18q72 0 139 -9t118 -28t84 -48t39 -71q4 -34 6 -80t2 -98q0 -124 -8 -279t-18 -319q-10 -176 -18 -346t-8 -314q0 -80 3 -148t11 -120q0 -4 1 -9t1 -9q2 -16 3 -36t-4 -40t-19 -35t-40 -21q-66 10 -150 -6t-172 -36 q-72 -16 -142 -29t-134 -13q-58 0 -103 17t-75 59v-2q-18 24 10 48t83 48t128 46t146 41t136 32t99 21q0 56 2 132t6 164t9 186t11 198q6 104 11 210t10 206t7 190t2 166q0 42 2 60t-2 48q-28 -2 -68 -6t-90 -10l-170 -17t-176 -9q-98 0 -173 17t-109 63z" /> -<glyph unicode="^" horiz-adv-x="650" d="M52 944q-20 26 2 64h-2q12 20 38 72t56 111t56 111t36 74q46 96 90 138t84 42q48 0 85 -55t62 -137t38 -175t13 -169q0 -70 -8 -121t-25 -72t-42 -7t-59 72l-2 2q2 -4 -3 16l-11 44q-6 28 -16 70t-19 84t-16 80t-7 60q-2 -4 -4 -10t-4 -10q-18 -44 -49 -113t-70 -126 t-86 -86t-97 5v-2q-20 12 -40 38z" /> -<glyph unicode="_" horiz-adv-x="1568" d="M26 90q2 10 61 25t155 33t218 36t251 33t254 24t225 9q118 0 194 -14t92 -52l-4 4q2 -8 3 -23t-1 -32t-6 -31t-8 -22q-44 -4 -136 -10t-209 -15t-246 -18t-246 -16t-209 -13t-136 -8q-20 -2 -37 -3t-33 -1q-36 0 -67 7t-67 27l6 -2q-6 2 -14 11t-17 18t-15 18t-8 15z" /> -<glyph unicode="`" horiz-adv-x="424" d="M72 1252q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="a" horiz-adv-x="1754" d="M64 264q0 90 35 204t95 232t141 230t171 199t186 140t186 53q66 0 127 -30t113 -96q38 -46 53 -94t15 -98q0 -66 -22 -133t-48 -135q-30 -78 -54 -160q-17 -58 -17 -115q0 -24 3 -47q8 -64 62 -80q-4 -2 1 -3t12 -1t14 1l7 1q54 0 140 29t180 72t181 92t145 87q41 6 70 6 q47 0 62 -16q10 -11 10 -25q0 -21 -21 -50q-35 -49 -117 -110t-187 -117t-220 -96t-217 -46q-14 -1 -27 -1q-85 0 -150 33q-75 38 -99 138q-6 8 -6 11v4t-1 4t-9 9q-24 -20 -40 -42q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-100 0 -190 76q-40 34 -58 85t-18 115z M220 222q0 -28 6 -42q12 -42 50 -42q50 0 120 40t145 109t149 163t133 201t95 224t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168z" /> -<glyph unicode="b" horiz-adv-x="1370" d="M24 130q0 18 6 30q40 78 88 215t104 295q50 146 103 294t104 265t101 191t94 74q48 0 78 -68q12 -24 16 -47t4 -45q0 -76 -37 -154t-81 -156q-40 -70 -73 -140t-37 -134q40 22 78 57t74 73q58 58 116 107t138 65q50 10 90 10q70 0 123 -23t89 -63t54 -95t18 -117 q0 -112 -64 -242t-197 -241t-339 -184t-490 -73q-24 0 -57 1t-57 3q-8 10 -21 33t-19 39q-6 12 -6 30zM304 204q18 -2 35 -3t33 -1q132 0 260 47t229 131t163 198t62 250q0 10 -1 21t-3 25h4h-4v2h-2l2 -2q-21 3 -42 3q-53 0 -110 -18q-80 -25 -159 -73t-153 -115t-136 -141 t-107 -149t-67 -141v2q-4 -12 -4 -36z" /> -<glyph unicode="c" horiz-adv-x="1398" d="M40 308q0 90 40 193t105 205t146 197t165 168t163 116t137 43q54 0 90 -31t48 -99q2 -12 2 -25q0 -41 -20 -88q-26 -61 -68 -113t-89 -88t-83 -36q-28 0 -51 21t-31 67q28 58 59 95t59 75h-6q-23 0 -63 -27q-45 -31 -99 -87t-110 -129t-102 -151t-75 -155t-29 -139 q0 -34 11 -62t37 -50q12 -1 25 -1q57 0 125 15q84 18 176 47t184 65t176 70h-2q116 46 202 76q56 20 91 20q19 0 31 -6q26 -16 26 -39q0 -15 -11 -32q-27 -45 -102 -99t-183 -109t-227 -100t-234 -73t-205 -28q-56 0 -98 14q-114 38 -162 112t-48 168z" /> -<glyph unicode="d" horiz-adv-x="1360" d="M-10 276q0 92 52 206t148 212t233 165t305 67q48 0 103 -6t109 -20l4 4q78 160 163 328t165 326q76 -12 107 -49t31 -89q0 -32 -8 -67t-20 -68t-25 -62t-23 -49q-2 -4 -2 -6t-2 -2q-4 -10 -18 -37t-33 -65t-42 -83t-45 -89t-44 -87t-39 -79t-30 -62t-17 -36 q-20 -40 -27 -87t-7 -93q0 -34 2 -67t6 -67v2q4 -20 4 -40q10 -32 40 -57t62 -47q28 -18 56 -40t56 -62q-12 -40 -35 -58t-53 -18q-22 0 -47 8t-47 19t-40 23t-26 18q-84 58 -128 142t-66 180q-108 -88 -201 -149t-170 -99t-139 -54t-110 -16q-106 0 -154 59t-48 151z M178 298q0 -48 14 -90v-2q64 16 136 57t143 94t134 113t108 115t65 98q12 25 12 42q0 12 -6 19q-18 4 -38 6t-40 2q-90 0 -184 -37t-170 -99t-125 -145t-49 -173z" /> -<glyph unicode="e" horiz-adv-x="1088" d="M22 308q0 48 8 99t24 99q22 22 46 49t46 53q68 74 150 159t171 165t184 146t189 104q26 10 47 10q12 0 22 -3q29 -9 47 -36t26 -67t8 -84q0 -38 -5 -77t-14 -74t-19 -62t-22 -41q-32 -36 -108 -79t-168 -91q-74 -38 -152 -81t-141 -85t-104 -82t-41 -72q0 -26 42 -52 q10 -2 22 -2h22q62 0 136 11t152 29t156 40t148 42q50 14 105 27t89 23l72 -58q-48 -66 -144 -122t-211 -97t-235 -65t-216 -24q-42 0 -79 4t-69 14q-106 36 -145 113t-39 167zM378 662h9q27 0 63 10q42 12 88 32t91 47t81 55t58 55t22 49q0 4 -22 10l-22 18q2 -4 -21 -23 t-60 -48t-81 -62t-86 -63t-75 -52t-45 -28z" /> -<glyph unicode="f" horiz-adv-x="1174" d="M38 663q-2 10 -2 19q0 12 4 22q14 2 36 11t45 18t42 17t25 12q8 2 38 12t65 22t63 23t32 15q22 18 62 96t90 178q38 80 83 170t95 178t105 168t115 140t125 96t133 36t136 -38t138 -126q22 -28 32 -66q5 -19 5 -39.5t-5 -42.5q-28 -19 -54 -19h-7q-29 3 -53 16t-43 33 t-29 36q-48 6 -88 6q-86 0 -144 -28t-101 -76t-75 -113t-64 -139q-18 -40 -38 -84t-42 -86q-16 -28 -38 -70t-42 -81t-35 -67l-15 -28v-24q2 16 22 17t48 -3q44 -6 97 -14t104 -22t95 -36t68 -56l-60 -58q-50 4 -100 5t-88 1q-78 0 -134 -11t-102 -41t-85 -84t-81 -140 q-18 -40 -50 -104l-62 -124t-54 -105t-26 -47l-44 -46q-8 4 -21 14t-27 21t-25 23t-17 20q-4 6 -7 19t-3 28t3 28t7 19q24 54 44 102t39 94t40 93t45 103h-166q-10 0 -21 17t-20 41t-13 49z" /> -<glyph unicode="g" horiz-adv-x="904" d="M-572 -268q0 98 44 149q27 31 62 31q23 0 48 -12q0 -118 15 -200t43 -134t66 -76t84 -24q72 0 156 42t167 113t160 164t136 194t94 204t35 195v23t-2 21q-148 -102 -244 -144t-158 -42q-70 0 -102 39t-32 105q0 60 29 144t78 173t112 176t132 156t138 111t127 42 q36 0 70 -16t62 -50q42 -56 61 -137t19 -179q0 -138 -36 -302t-101 -329t-155 -320t-199 -275t-234 -192t-259 -72q-44 0 -87 7t-83 25q-70 24 -117 69t-75 99t-41 112t-13 110zM194 451q-1 -2 -1 -3q0 -4 3 -8q6 -1 12 -1q40 0 82 24q48 27 93 72t84 102t69 114t47 108 t17 83q0 4 4 6q-14 -2 -38 -17t-62 -49h2q-28 -26 -74 -69t-92 -93t-86 -101t-56 -93q-2 -4 -2 -18v-30q0 -22 -2 -27z" /> -<glyph unicode="h" horiz-adv-x="1384" d="M8 105q0 15 4 25q8 20 30 65t47 95l48 96t35 66q10 18 50 83t90 149q24 42 50 85t50 82t45 73t35 58q24 40 53 90t61 104q54 94 114 194t119 189t114 161t101 109q40 32 71 32q5 0 10 -1q35 -6 53 -70q2 -8 0 -40t-4 -48q-16 -22 -47 -68t-61 -92t-56 -86t-40 -64 q-4 -8 -11 -19t-13 -21q-26 -40 -66 -101t-86 -133t-94 -148t-91 -146t-76 -129t-51 -97q48 26 104 65t108 79q58 44 119 85t119 69q72 -8 126 -53t76 -115q-4 -24 -4 -80v-120v-117t4 -77q0 -12 10 -33t25 -45t31 -49t30 -45q22 -32 31 -56q2 -7 2 -13q0 -17 -17 -35 q-33 -12 -63 -12q-24 0 -46 7q-51 17 -91 56t-65 90t-29 99v-2q-2 20 -6 69t-8 106t-7 113t-5 92q-6 4 -15 8t-17 8q-12 0 -43 -21t-71 -53t-85 -71t-83 -74t-66 -60t-36 -33q-14 -14 -44 -43t-67 -66l-77 -77t-74 -76q-26 -28 -51 -53l-37 -37q-35 -8 -69 -8q-10 0 -20 1 q-43 3 -67 53l-2 6q-4 10 -4 25z" /> -<glyph unicode="i" horiz-adv-x="634" d="M0 74q68 218 130 374t115 256t93 147t64 47q30 0 36 -64q1 -11 1 -24q0 -61 -24 -157q-29 -117 -95 -282t-180 -365q-22 -9 -47 -9q-14 0 -30 3q-43 8 -61 48zM407 1201v12q0 12 1 24q2 19 5 36t7 25q28 10 46 14t32 4q58 0 82 -32t24 -76q0 -46 -27 -86t-67 -40 q-28 0 -53 20t-47 72v4q-2 6 -3 23z" /> -<glyph unicode="j" horiz-adv-x="466" d="M-854 -522q0 42 25 87t85 91q26 -4 41 -15t23 -29t11 -40t7 -48q2 -24 7 -51t14 -51t25 -40t44 -20q22 -3 42 -3q62 0 116 27q72 36 132 106t110 168t93 207t79 224t68 221q26 90 52 171t53 144t57 106t66 59q68 -26 68 -130q0 -64 -19 -162t-54 -215t-83 -246t-108 -254 t-129 -237t-144 -198t-154 -136t-159 -50q-56 0 -106 22q-46 18 -93 49t-84 69t-61 82t-24 92zM238 1202q0 36 22 55t52 19q20 0 42 -12t37 -37t22 -63q3 -16 3 -34q0 -26 -6 -58q-12 -7 -26 -7q-9 0 -19 3q-25 8 -48 24t-40 33t-19 23l8 -22q-16 22 -22 41t-6 35z" /> -<glyph unicode="k" horiz-adv-x="1822" d="M34 130q-1 5 -1 12q0 33 24 99q29 79 81 187t121 236t142 259t145 255t132 224q42 72 77 133t51 89q17 12 35 12q12 0 23 -5q30 -13 51 -41t31 -62t0 -56l-206 -356v-12h8q48 0 113 21q71 23 150 60t162 85t156 95t133 89t94 70q34 17 62 17h3q29 -1 50 -14t33 -37 t12 -50q0 -42 -34 -82q-52 -50 -115 -90t-133 -72t-146 -60t-152 -54q-72 -24 -142 -50t-134 -55t-118 -64t-94 -79q36 -36 89 -93t110 -126t114 -144t102 -143t73 -124t28 -88v-76q-32 -17 -59 -17h-3q-28 1 -49 12t-37 28t-26 33v-2q-66 92 -120 168t-100 140 q-98 142 -152 211t-82 69q-22 0 -56 -61t-96 -181q-34 -68 -76 -154t-100 -188v2q-16 -30 -36 -43t-42 -13q-32 0 -58 26t-38 60z" /> -<glyph unicode="l" horiz-adv-x="820" d="M10 276q0 74 23 159t58 168t76 161t75 140q16 30 31 54t25 46q4 12 26 57t50 99q18 34 35 69t32 65l26 52t13 32q4 4 7 13t9 21h-2q12 30 29 72t39 80t48 65t56 27q28 0 54 -26t48 -88q-8 -22 -38 -85t-76 -149q-42 -84 -93 -187t-103 -212t-101 -217t-87 -203t-61 -171 t-23 -118v-24q18 -10 58 -10q32 0 76 7t88 17q42 8 88 14q28 4 57 4q20 0 41 -2q6 -14 6 -27q0 -25 -23 -48q-35 -35 -95 -61t-132 -41t-128 -15q-32 0 -59 4t-41 18l4 -2q-64 46 -90 107t-26 135z" /> -<glyph unicode="m" horiz-adv-x="2062" d="M49 131q1 19 5 29q12 24 36 74t55 113t66 131t67 131t57 112t37 73v-2q12 26 38 67t53 78t48 64t23 27h80q16 -42 17 -78v-7q0 -32 -8 -60q-9 -31 -25 -58t-32 -51q-10 -18 -21 -35t-19 -33q96 84 168 143t125 96t87 53t56 16q34 0 49 -16t17 -46v-12q0 -26 -6 -59 q-8 -41 -20 -89l2 2q-14 -64 -28 -136t-14 -142v-34q20 16 43 35t49 39q40 30 74 56t46 36q30 22 79 60t100 76t91 68t52 36h-4q10 8 43 31t72 49t75 49t52 31l-2 -2q44 26 84 26q52 0 83 -37t31 -95q0 -16 -4 -34t-8 -40q-18 -34 -36 -66t-34 -64q-48 -86 -91 -169 t-77 -170t-55 -181t-23 -200q-12 -7 -26 -7q-9 0 -19 3q-25 8 -48 24t-40 33t-19 21l6 -20q-20 24 -28 55t-8 63q0 56 20 111t42 97q12 24 40 84t61 126t62 125t43 83v10q-36 -10 -109 -62t-163 -128t-188 -164t-182 -167t-146 -139t-80 -80q-32 -11 -55 -11q-31 0 -48 20 q-29 35 -29 111q0 48 11 112t28 130t35 128t32 108q4 8 6 19t6 15q-36 -6 -77 -39t-85 -83t-89 -111t-89 -123t-87 -119t-83 -101t-78 -70t-74 -26q-52 0 -92 58q-3 8 -3 22v7z" /> -<glyph unicode="n" horiz-adv-x="1440" d="M26 190q0 2 31 64t79 153t105 199t108 201t90 157t49 70q48 -34 67 -66t19 -64q0 -28 -9 -56t-19 -54l-8 -24l-8 -24q64 42 152 99t181 108t181 86t154 35q64 0 103 -34t39 -118q0 -48 -19 -120t-61 -172l2 4q-4 -8 -14 -31t-23 -54t-30 -68t-33 -73q-28 -64 -55 -124 t-33 -76q-2 -4 -2 -12q-2 -6 -2 -13t-2 -15q-4 -38 -15 -83t-39 -73q-15 -15 -33 -15h-2q-19 1 -35 11t-29 22t-15 16l-4 14q-2 22 -2 45q0 37 6 72q10 57 29 114t46 112t55 109q46 90 82 174t36 164q0 28 -6 56q-9 1 -19 1q-50 0 -113 -34q-76 -41 -162 -110t-176 -155 t-174 -170q-86 -86 -164 -159t-140 -115q-59 -40 -102 -40h-4q-44 2 -62 66z" /> -<glyph unicode="o" d="M30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33q-76 0 -150 30q-84 34 -121 95t-37 137zM206 258q0 -32 6 -52q14 -56 68 -56 q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142z" /> -<glyph unicode="p" horiz-adv-x="1356" d="M-242 -682q0 70 15 141t38 143t52 142t59 140q44 100 83 200t55 198v-4q4 16 28 46t50 62q22 22 39 42t17 24q16 28 29 56t27 54v-2q40 76 68 141t28 129q0 32 -10 69t-32 73q-8 16 -7 38t11 32l-2 -2q66 82 147 140t173 96t192 55t200 17q22 0 49 -1t49 -3 q82 -66 117 -144t35 -162q0 -116 -58 -238t-144 -231t-186 -195t-186 -130q-44 -22 -73 -34t-50 -18t-39 -8t-42 -2q-24 -2 -64 -6t-110 -16q-24 -6 -42 -26t-32 -45t-25 -53t-19 -50q-4 -10 -6 -21t-6 -19q-42 -104 -76 -192t-66 -175t-62 -178t-64 -199q-10 -18 -32 -33 t-47 -18q-4 -1 -9 -1q-20 0 -37 12q-21 14 -25 54v-2q-4 26 -7 51t-3 53zM372 334q10 -2 21 -2h21q92 0 178 40t160 107t134 154t102 181t63 189q16 74 16 141q0 19 -1 38q-14 8 -31 10t-33 2q-14 0 -28 -1t-26 -3q-96 -12 -158 -45t-103 -82t-68 -114t-55 -141 q-16 -34 -31 -74t-31 -80q-8 -14 -21 -41t-28 -59t-30 -65t-27 -61q-16 -44 -24 -58v-36z" /> -<glyph unicode="q" horiz-adv-x="990" d="M16 386q0 56 34 142q10 26 49 79t96 117t126 130t142 120t144 89t131 35q58 0 106 -36t70 -116q6 -20 3 -50t-11 -63t-18 -65t-18 -56v2q-4 -8 -8 -20t-6 -16q-20 -54 -78 -143t-132 -199q-72 -102 -148 -218t-140 -231t-105 -226t-41 -203q0 -40 8 -75t28 -67q0 2 19 20 t52 48t77 69t94 83q70 60 144 124t143 115t130 84t105 33q58 0 84 -48l-6 6q10 -12 10 -33v-7q-2 -26 -14 -40q-18 -14 -58 -50t-92 -84q-76 -70 -171 -153t-192 -155t-187 -121t-156 -49q-56 0 -92 36q-52 52 -74 117t-22 137q0 68 14 136t35 132t46 123t45 109 q36 88 51 144t15 94q0 46 -29 59t-63 19q-28 4 -53 9t-44 17t-31 34t-12 62zM223 422v-13q0 -12 1 -23q6 -1 12 -1q36 0 74 22q44 25 87 67t86 95t81 103q26 36 53 69t54 60t52 46t47 23v18q0 16 -8 16q-32 0 -83 -26t-108 -68t-115 -94t-107 -102t-83 -93t-40 -69v-4 q-2 -6 -3 -26z" /> -<glyph unicode="r" horiz-adv-x="1214" d="M72 30q-2 1 -2 15.5t2 43.5q4 57 14 143t27 189t38 197t45 167t50 99q20 20 37 23t31 -6t26 -26t24 -35q4 -8 10 -16t10 -12q66 90 144 172t174 142q12 8 54 24t96 31t112 27t102 12q50 0 80 -16t30 -58q0 -32 -36 -88q-102 -2 -193 -46t-173 -114t-154 -160t-132 -184 t-110 -185t-90 -165q-48 -92 -83 -148t-67 -56q-10 0 -29 8t-35 18h14zM74 26v2v-2z" /> -<glyph unicode="s" horiz-adv-x="990" d="M59 140q27 30 74 61t104 62t119 60t118 55h-2q62 30 107 52t61 32q70 66 70 92q0 18 -26 32t-68 25t-94 20t-104 17q-60 8 -117 19t-102 27t-72 39t-27 59q0 30 29 68t93 82l-2 -2q32 24 97 68t140 91t150 86t129 51q12 3 24 3q14 0 30 -4q28 -7 50 -22t37 -35t15 -40 q0 -46 -50 -76q-34 -20 -68 -38l-68 -36q-98 -54 -188 -104t-160 -96q158 -18 268 -44t178 -60t98 -74t30 -84q0 -60 -60 -123t-151 -121t-200 -109t-206 -86t-168 -50q-39 -8 -62 -8q-18 0 -25 5l2 -2q-32 21 -32 47q0 29 29 61z" /> -<glyph unicode="t" d="M8 750q18 44 46 70t61 40t69 20t74 10q56 6 105 17t75 45q12 32 26 72t28 86q20 62 45 133t52 142t57 140t64 127q26 17 46 17q13 0 24 -7q28 -18 45 -53t22 -74t3 -51h2q-10 -42 -33 -92t-47 -102q-32 -70 -60 -142t-28 -136q0 -16 -2 -14t2 -12h472q22 0 37 -22t25 -38 q10 -22 10 -40q0 -13 -6 -23q-14 -23 -50 -34t-88 -14t-112 -5q-58 -2 -121 -5t-117 -13t-94 -29t-54 -51q-62 -158 -114 -316t-98 -318q-8 -14 -31 -38t-50 -37q-18 -8 -35 -8l-19 2q-27 7 -41 55v-2q-6 16 -5 46t9 40q4 12 6 20q12 38 30 102l36 128t34 119t24 79q2 4 1 6 t1 6q4 22 13 44t9 46q-38 -4 -72 -12q-32 -8 -65 -14t-69 -6q-46 0 -82 21t-60 75z" /> -<glyph unicode="u" horiz-adv-x="1440" d="M40 210q-5 15 -5 35q0 31 13 74q22 71 65 157t100 177t112 170t102 136t69 75q90 -46 90 -118q0 -34 -14 -72t-38 -80t-55 -86t-63 -90t-64 -93t-57 -90t-40 -82t-15 -69q5 -1 9 -1q31 0 73 23q48 26 104 72t117 107t123 127t120 133t108 125q58 64 99 112t83 82 q50 -24 71 -56t21 -72q0 -58 -29 -124t-63 -142q-38 -78 -71 -159t-33 -145q0 -52 30 -88l68 -82h220q10 0 10 -10q0 -6 -3 -15q-9 -25 -26 -55t-36 -57t-23 -29h8q-30 -6 -66 -6q-38 0 -70 10t-70 26l2 -2q-66 26 -106 66t-64 89t-36 104t-22 111q-4 16 -2 14t-2 12 q-18 -10 -56 -43t-88 -77q-48 -42 -102 -87t-108 -81t-107 -60t-103 -24q-58 0 -105 37t-75 123v-2z" /> -<glyph unicode="v" horiz-adv-x="1328" d="M24 340q0 62 9 130t21 133t26 124t24 103l-2 -2q4 20 10 44t10 36q28 16 54 8t48 -24q24 -20 48 -48q2 -22 2 -48v-46q0 -64 -5 -122t-9 -116q-8 -60 -13 -121t-5 -121v-58q2 -1 4 -1q16 0 63 38q53 43 127 115t160 162t168 178q70 74 139 145t129 127t107 90t73 34 q42 0 52 -36q3 -9 3 -22q0 -36 -21 -98q-54 -46 -116 -121t-132 -165q-82 -104 -174 -216t-188 -205t-191 -153t-185 -60q-68 0 -124 36q-64 38 -88 113t-24 167z" /> -<glyph unicode="w" horiz-adv-x="1864" d="M28 118q-5 16 -5 33q0 28 13 61l-2 -4q46 142 99 303t111 307q34 82 90 82q40 0 70 -45t30 -103q0 -16 -2 -33t-12 -35q-6 -14 -17 -44t-25 -67t-29 -77t-27 -74q-6 -16 -11 -30t-9 -24q62 64 109 119t101 121v-2q28 36 61 78t75 90q72 84 124 84q28 0 46 -17t28 -47 t14 -71t4 -87q0 -40 -1 -82t-5 -82q-2 -34 -4 -70t-2 -64q0 -12 -1 -23t-3 -21q4 10 12 21t14 21q40 64 97 154t126 185t147 187t161 161t167 107q64 29 125 29q19 0 39 -3q2 -6 2 -13q0 -22 -18 -58q-24 -47 -67 -105t-98 -122t-107 -122q-60 -70 -112 -128t-70 -88 q-8 -10 -31 -43t-54 -77t-65 -93t-64 -93t-52 -77t-30 -43q-30 -46 -50 -70t-58 -24q-16 0 -34 9t-40 25q-46 34 -73 85t-43 108t-22 117t-8 112q-60 -48 -115 -110t-111 -128q-40 -46 -85 -97t-85 -91q-29 -11 -61 -11q-14 0 -28 2q-47 7 -81 32t-48 65zM672 480l2 2z" /> -<glyph unicode="x" horiz-adv-x="1258" d="M19 142q13 38 50 79t91 84t112 85q44 32 90 68t82 69t59 61t23 48q-4 14 -14 55t-26 89q-14 48 -26 94t-14 58q-4 10 -3 39t5 39q29 22 54 22q6 0 12 -1q30 -7 56 -37t47 -74t41 -88q12 -26 22 -47t18 -37q40 30 85 67t88 74t81 72t64 61q54 26 84 26q20 0 24 -21 q1 -8 1 -17q0 -16 -4 -35q-7 -31 -21 -67t-27 -67t-24 -52l-11 -21l24 8q-84 -74 -139 -132t-88 -101t-47 -75t-14 -56q0 -28 25 -47t53 -35v2q40 -22 73 -50t33 -82q0 -36 -28 -90q-37 -8 -67 -8q-21 0 -39 4q-42 10 -70 35t-46 61t-32 74h2q-18 42 -37 76t-49 34 q-26 0 -65 -20t-95 -66t-132 -121t-178 -187q-8 4 -22 15t-29 25t-28 25t-15 15l2 -2q-16 22 -16 46q0 13 5 26z" /> -<glyph unicode="y" horiz-adv-x="1102" d="M-434 -811q4 43 23 94t48 106t59 103t57 86t41 58t43 59t67 88t81 105t85 114q74 96 136 178t88 116q3 4 3 11q0 17 -23 56q-32 53 -84 129q-34 50 -69 107t-64 115t-48 117t-19 113q0 34 14 82q21 16 41 16q13 0 25 -6q32 -16 63 -58t60 -103t59 -127q24 -54 48 -107 t46 -94t38 -65t26 -20q42 32 82 76t79 94t76 102t71 100q30 42 56 81t50 69q26 32 50 44q10 5 25 5q20 0 49 -9q21 -9 21 -38q0 -12 -3 -27q-12 -53 -56 -138t-116 -194t-159 -233t-183 -256t-192 -262q-90 -122 -174 -236t-152 -210t-116 -168t-66 -110q-6 -6 -6 -12 q-12 -26 -27 -51t-49 -49q-8 4 -22 16t-29 25t-27 24t-14 17l2 -4q-15 23 -15 56q0 7 1 15z" /> -<glyph unicode="z" horiz-adv-x="1414" d="M46 116q0 46 44 105t116 126t165 140t191 147q78 60 155 119t143 115t116 106t74 90q-4 2 -30 2q-28 0 -67 -5t-83 -15q-46 -10 -90 -16t-84 -6q-70 0 -104 28q-20 16 -20 49q0 23 10 55q2 6 53 25t125 39t160 36t162 16q98 0 166 -30t68 -106q0 -58 -57 -145t-193 -215 v2q-10 -10 -42 -39t-70 -64t-74 -66t-52 -45v2q-12 -10 -37 -30t-59 -46q-54 -40 -117 -81t-115 -77t-84 -63t-22 -39h42q76 0 153 10t155 20q76 12 154 21t162 9q22 0 44 -1t56 -5q18 -12 35 -29t29 -39t13 -49t-13 -61q-62 -4 -143 -18t-177 -30q-140 -26 -291 -49 t-283 -23q-72 0 -131 10t-101 36q-52 30 -52 84z" /> -<glyph unicode="{" horiz-adv-x="678" d="M14 362q0 50 15 99t51 95q10 10 44 51t72 83q24 28 43 49t25 29q24 30 24 44q0 12 -15 25t-31 25q-20 14 -38 30t-29 36t-10 44t19 56q4 8 15 21t21 27q22 26 42 51t28 33q10 30 10 58q0 44 -17 90t-39 92v-2q-24 50 -43 99t-19 101q0 36 12 72t42 69t79 65t123 62v-2 q24 10 42 6t33 -15t26 -25t19 -26q2 -4 10 -12l14 -14q-28 -34 -54 -54l-52 -40q-22 -16 -45 -33t-42 -36t-31 -39t-12 -40q0 -18 10 -36l134 -278q-2 -16 -6 -70t-4 -122q0 -32 2 -62t8 -56l-2 2q8 -24 10 -44t2 -40q0 -44 -12 -78t-33 -62t-47 -51t-52 -47 q-42 -36 -80 -74t-50 -96q-4 -24 -6 -45t-2 -39q0 -66 26 -113t68 -80t98 -57t116 -46l72 -28q66 -28 66 -70q0 -34 -45 -56t-109 -22q-34 0 -72 5t-76 21q-64 22 -126 70t-112 112t-80 138t-30 150z" /> -<glyph unicode="|" horiz-adv-x="282" d="M20 114v532q0 18 2 76t4 134t5 162t6 163t6 133t5 74q0 10 6 44t16 73t25 76t34 56t43 9t54 -64q2 -46 2 -96v-96q0 -152 -4 -304t-10 -304q-6 -148 -11 -294t-5 -296q0 -32 1 -68t1 -70q-30 -64 -72 -59t-74 47q-2 2 -7 12t-10 22t-10 23t-7 15z" /> -<glyph unicode="}" horiz-adv-x="750" d="M-1 1865q-7 39 9 85h102q8 0 46 -32t84 -77t92 -91t72 -76q50 -62 72 -118t22 -108q0 -42 -13 -83t-33 -81t-45 -81t-51 -79q-6 -4 -15 -7t-15 1l128 -132q30 -28 37 -50t-1 -40t-25 -33t-35 -29q-8 -4 -14 -8t-8 -2q20 -28 44 -56t50 -56q28 -32 57 -65t54 -67t42 -70 t23 -74v2q10 -56 -8 -123t-55 -136t-87 -135t-104 -117t-105 -82t-91 -31q-34 0 -60 19t-38 61q-14 40 27 78t99 84q40 32 86 71t83 83t59 92t14 96q-16 54 -58 104t-90 96q-60 58 -110 118t-50 142q0 40 12 76q-40 78 -55 127t-15 83q0 48 26 70t60 38q14 8 31 19t31 31 t23 52t9 84q0 28 -15 56t-38 57t-52 56t-57 53q-36 32 -68 64t-54 67t-29 74z" /> -<glyph unicode="~" horiz-adv-x="1328" d="M96 580q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71q14 -24 -5 -67t-60 -96t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76 q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80z" /> -<glyph unicode="¡" horiz-adv-x="664" d="M38 1567q0 -30 15 -58t37.5 -48.5t51.5 -33t57 -12.5q36 0 65.5 19.5t51.5 62.5l-2 -2q14 33 3 68t-36 63t-60.5 46t-67.5 18q-28 0 -48.5 -9t-38.5 -35q-28 -39 -28 -79zM145 1021v2q-6 -13 6 -65t35 -127.5t56.5 -167t72.5 -184t80.5 -177t81.5 -147.5t75.5 -95.5 t61.5 -19.5q2 11 -9 62t-28.5 127.5t-43.5 170.5t-56 190.5t-61.5 188t-64.5 162.5t-65 114t-59 43q-56 0 -82 -77z" /> -<glyph unicode="¢" horiz-adv-x="1398" d="M40 308q0 90 40 193t105 205t146 197t165 168t163 116t137 43q54 0 90 -31t48 -99q8 -52 -18 -113t-68 -113t-89 -88t-83 -36q-28 0 -51 21t-31 67q28 58 59 95t59 75q-24 4 -69 -27t-99 -87t-110 -129t-102 -151t-75 -155t-29 -139q0 -34 11 -62t37 -50q66 -4 150 14 t176 47t184 65t176 70h-2q116 46 202 76t122 14q42 -26 15 -71t-102 -99t-183 -109t-227 -100t-234 -73t-205 -28q-56 0 -98 14q-114 38 -162 112t-48 168zM426 596q0 18 3 77t8 138t12 169t12 172t10 144t7 86q0 10 6 44t17 73t27 76t36 54t44 7t54 -64q-28 -206 -48 -431 t-20 -449q0 -200 19 -393t69 -371q-34 -66 -77 -65t-73 51q-6 10 -18 35t-16 35q0 12 -3 36t-7 58t-10 75t-12 85q-8 54 -16 110t-14 104t-9 86t-1 58z" /> -<glyph unicode="£" horiz-adv-x="830" d="M-52 712q0 22 33 41t87 27q26 152 74 297t115 257t151 180t182 68q48 0 106 -23t122 -73l-106 -194q-48 46 -82 66t-58 20q-54 0 -102 -48t-90 -129t-75 -187t-57 -222h24q68 0 139 -8t136 -26t118 -46t83 -68q-36 0 -108 -3t-150 -7t-145 -8t-91 -6h-10q-20 0 -30 2 q-14 -88 -21 -167t-7 -143q0 -40 2 -70t8 -52q44 14 118 27t170 13q100 0 214 -23t232 -85q72 -42 77 -61t-34 -25t-114 -2t-163 12q-82 8 -175 14t-169 6q-68 0 -124 -16t-84 -60q-56 114 -80 231t-24 235q0 46 2 94t8 96q-102 24 -102 66z" /> -<glyph unicode="¤" horiz-adv-x="1484" d="M111 60q-5 32 49 104l112 130q-12 16 -17 42t-5 56q0 44 12 101t33 115t50 112t65 92q-16 18 -35 35t-39 35q-34 30 -66 62t-56 69t-35 83t-1 106q46 2 96 -24t96 -66t84 -90t60 -94q54 54 128 80t144 26q50 0 98 -12t84 -34q144 100 233 142t127 42q44 0 50 -32t-28 -80 t-106 -103t-184 -99q6 -28 6 -58q0 -72 -34 -151t-82 -155q44 -28 84 -73t71 -95t49 -96t18 -72q0 -58 -37 -67t-121 53q-20 30 -45 56t-51 50l-45 45t-43 55q-30 -30 -70 -53t-85 -38t-92 -23t-89 -8h-29t-27 4q-28 -28 -69 -63t-83 -67t-78 -53t-50 -21q-42 0 -47 32z M406 390q0 -4 10 -7t16 -7h-8q4 0 7 -1t5 -1q32 -16 56 -16q42 0 92 21t99 55t96 79t82 93t57 96t22 88q0 42 -44 67t-152 17q-14 2 -46 -18t-73 -57t-84 -85t-76 -103t-51 -111t-8 -108v-2zM420 378q2 -2 4 -2z" /> -<glyph unicode="¥" horiz-adv-x="1004" d="M31 393q15 23 52 41t90 34t110 28t114 20t101 14q2 4 2 6t2 6q-28 -2 -52 -2h-48q-92 0 -159 14t-81 50l2 30q12 26 48 48t86 39t112 27t126 16v50q-16 32 -60 99t-98 143l-108 162t-102 159t-76 136t-30 93q0 40 26 53t84 -15q26 -24 58 -64t67 -91t72 -108t73 -115 q44 -70 78 -134t59 -111t43 -72t30 -15q18 36 45 93t57 127q42 94 90 198t97 199t96 172t88 117t72 32t49 -80q-24 -40 -72 -142t-108 -243t-127 -312t-131 -351q48 -14 87 -39t61 -61q-22 -26 -79 -48t-135 -32q-4 -10 -5 -16t-3 -10h208q30 -16 47 -50t-1 -76 q-14 -4 -39 -7t-41 -7q-58 -8 -110 -15t-120 -19q-30 -102 -56 -199t-43 -183t-25 -157t-2 -121q-12 -42 -44 -80t-70 -38q-26 0 -50 19t-40 63l2 -2q-30 78 -30 156q0 96 32 208t68 232q4 14 5 19t3 9t4 10t6 22q-28 -4 -52 -8l-48 -8q-50 -10 -92 -18t-72 -12 q-28 -6 -47 -5t-34 9t-29 24t-32 42l2 -2q-18 26 -3 49z" /> -<glyph unicode="¦" horiz-adv-x="282" d="M22 114v532v38q2 18 5 69t7 135l196 12q-4 -92 -8 -188t-8 -166q-6 -94 -11 -183t-5 -199q0 -24 1 -53t1 -57q-14 -32 -33 -45t-39 -13t-40 13t-34 33l-7 14t-10 21l-10 22t-5 15zM30 942q0 24 2 57t3 68t3 68t2 59q4 70 6 123t2 67q0 6 5 39t15 73t25 80t35 59t44 11 t54 -64q2 -58 3 -124t1 -130q0 -88 -2 -191t-4 -183z" /> -<glyph unicode="§" horiz-adv-x="1510" d="M146 99q2 27 29 57t74 62t104 63t119 60t118 55q64 28 108 51t56 33q68 60 68 90q0 32 -86 56q-52 2 -112 4t-112 6q-58 8 -112 21t-95 33t-66 47t-25 63q0 34 28 72t94 84h-2q6 4 13 9t13 9q28 20 66 46t81 55t89 58t92 53q-96 16 -162 42t-66 86q0 30 28 67t94 83h-2 q32 24 98 69t141 92t150 86t129 51q40 8 79 -8t60 -44t16 -62t-53 -62q-48 -26 -100 -56q-102 -52 -200 -109t-180 -109q158 -18 267 -45t177 -62t98 -75t30 -82q0 -46 -31 -93t-83 -92t-119 -86t-141 -77q66 -34 97 -75t31 -85q0 -58 -59 -120t-150 -120t-199 -109 t-204 -86t-167 -51t-89 -4q-34 22 -32 49zM474 802q14 -4 47 -7t59 -7h10q56 30 124 60t124 58q58 28 104 51t60 33l-2 -2q40 34 56 56t16 38q0 8 -14 10t-32 2q-20 0 -39 -3t-31 -13l-68 -36t-66 -38q-90 -46 -174 -93t-174 -109z" /> -<glyph unicode="¨" horiz-adv-x="1194" d="M218 1102q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM550 1114q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2 q-28 44 -28 88z" /> -<glyph unicode="©" horiz-adv-x="1706" d="M8 566q0 138 38 288t107 293t165 272t211 227t244 155t267 57q90 0 179 -27t181 -85h-2q114 -70 165 -182t51 -256q0 -136 -43 -288t-119 -301t-180 -285t-224 -239t-252 -165t-264 -62q-76 0 -150 21t-144 67v2q-120 84 -175 217t-55 291zM186 520q0 -88 32 -167 t100 -143q82 -56 174 -56q70 0 141 27t142 76t139 116t130 145q-106 -40 -213 -67t-185 -27q-46 0 -78 12h-2q-86 30 -124 86t-38 132q0 66 30 144t79 155t111 148t126 125t123 87t103 33t72 -24t36 -78q4 -36 -12 -75t-43 -73t-60 -59t-65 -35t-57 1t-35 47q40 64 82 118 q-30 -8 -85 -64t-109 -133t-94 -161t-40 -150q0 -48 26 -72q50 -4 114 10t132 36t136 50t128 52q36 16 62 27t52 21q72 134 112 259t40 227q0 34 -4 64t-16 58q-26 120 -86 172t-142 52q-90 0 -193 -49t-207 -131t-200 -192t-171 -231t-119 -248t-44 -245z" /> -<glyph unicode="ª" horiz-adv-x="1072" d="M39 620q0 55 21.5 123.5t58 139.5t85.5 139t104 120.5t113.5 84t112.5 31.5q40 0 77.5 -18t68.5 -58q23 -27 32.5 -56t9.5 -59q0 -40 -13.5 -80.5t-29.5 -81.5q-18 -47 -32.5 -96.5t-8.5 -97.5q5 -39 37 -49q-2 -1 1 -1.5t7.5 -0.5t8.5 1h4q33 0 85.5 17.5t109.5 43.5 t110 55.5t88 52.5q66 10 80.5 -6t-6.5 -45.5t-71 -66t-114 -70.5t-134 -58t-132 -27.5t-107.5 19.5t-60.5 83q-4 5 -4 6.5v2.5t-0.5 2.5t-5.5 5.5q-14 -12 -24 -26q-29 -29 -64.5 -63t-75 -63.5t-82.5 -49.5t-87 -20q-61 0 -116 46q-24 20 -35 51t-11 69zM134 595 q0 -17 4 -25q7 -26 30 -26q30 0 73 24t88.5 66t90.5 98.5t81 121t58 135t22 139.5v21t-3 23q-8 4 -18 4q-35 0 -80.5 -31t-92.5 -82t-93 -115t-81 -128.5t-57 -123.5t-22 -101z" /> -<glyph unicode="«" horiz-adv-x="1706" d="M18 790q0 30 15 59t49 63q16 14 45 40t66 59t80 72t87 79l88 80t82 74t67 61t45 41q20 8 53 0t60 -27t35 -48t-22 -63l-502 -502q-12 -12 15 -41t67 -60t82 -60t60 -41q6 -6 14 -10l-4 2q20 -14 63 -44t98 -66t116 -76t116 -76t99 -65t64 -41q42 -54 42 -102 q0 -40 -23 -66t-65 -26q-36 0 -76 26h-2q-24 16 -47 31t-47 31q-170 110 -336 224t-316 248q-8 6 -15 12t-13 14q-52 44 -96 92t-44 106zM484 854q0 30 15 60t49 60q22 20 67 60t100 91t117 106t116 105h-2q52 48 95 87t63 57q18 6 54 -2t64 -26t37 -46t-25 -62l-506 -506 q-10 -10 20 -39t73 -63t85 -64l56 -40q-2 0 -2 2q24 -16 69 -47t100 -68t115 -77t115 -75t98 -64t63 -41q42 -54 42 -104q0 -40 -23 -65t-63 -25t-80 28q-32 20 -62 40t-62 40q-152 100 -315 214t-303 238q-8 6 -17 15t-15 13q-52 44 -95 92t-43 106zM952 640q4 -4 8 -6 q-4 2 -5 4t-3 2z" /> -<glyph unicode="¬" horiz-adv-x="1288" d="M160 808q-16 26 35 58t142 59t208 45t231 18q74 0 140 -8t117 -26t84 -48t39 -74l4 -418q-36 -68 -74 -62t-69 60t-51 144t-20 190v9v1v1v9q-28 -4 -70 -9t-84 -9q-78 -10 -169 -18t-175 -8q-96 0 -174 18t-114 68z" /> -<glyph unicode="­" horiz-adv-x="1244" d="M42 735q14 31 62 58t124 50t166 40t188 26t190 9q94 0 173 -11t132 -36t72 -64t-9 -95q-24 0 -87 -3t-134 -7t-134 -8t-87 -6q-34 -4 -73 -11t-79 -19q-74 -16 -152 -32t-148 -16q-56 0 -103 14t-81 48q-34 32 -20 63z" /> -<glyph unicode="®" horiz-adv-x="1706" d="M8 566q0 138 38 288t107 293t165 272t211 227t244 155t267 57q90 0 179 -27t181 -85h-2q114 -70 165 -182t51 -256q0 -136 -43 -288t-119 -301t-180 -285t-224 -239t-252 -165t-264 -62q-76 0 -150 21t-144 67v2q-120 84 -175 217t-55 291zM186 520q0 -90 30 -167 t100 -141q44 -32 88 -46t90 -14q102 0 206 56t201 148t182 210t148 242t100 245t37 217q0 34 -4 64t-16 58q-26 120 -86 172t-142 52q-90 0 -193 -49t-207 -131t-200 -192t-171 -231t-119 -248t-44 -245zM310 396q-10 24 6 75t48 116t74 136t82 137q28 48 55 92t45 72 q-26 -10 -48 -9t-44 29q-14 20 -13 36t9 28t20 21t22 15h-2q190 120 351 173t271 53q100 0 154 -37t54 -101q0 -46 -37 -104t-121 -123t-219 -136t-331 -141q20 -8 65 -29t103 -45l100 -48t90 -49t65 -51t25 -54q0 -52 -88 -78l18 10q-4 -4 -44 10t-88 32t-90 36t-50 22 l4 -2q-66 46 -114 66t-82 20q-28 0 -49 -11t-37 -28t-29 -37t-23 -40q-16 -26 -29 -47t-28 -33t-35 -11t-46 19zM630 898q20 6 39 11t37 9q-8 -16 -16 -34t-18 -36zM706 918q122 36 207 74t138 74t76 68t23 58q0 16 -19 27t-49 11q-36 0 -83 -16t-96 -53t-100 -97t-97 -146z " /> -<glyph unicode="°" horiz-adv-x="820" d="M48 1136q0 56 39 119t94 118t115 93t102 42q16 2 30 3t30 1q108 0 155 -47t47 -115q0 -58 -34 -123t-89 -121t-128 -93t-151 -37q-56 0 -104 20q-58 22 -82 58t-24 82zM217 1203q-7 -25 1 -57q8 -30 38 -30q38 0 84 23t86 58t68 73t28 68q0 12 -15 18t-51 6q-10 0 -26 -1 t-30 -3q-16 -12 -34 -23t-36 -21l-48 -32t-41 -35t-24 -44z" /> -<glyph unicode="±" horiz-adv-x="950" d="M16 570q2 2 16 12t31 20t33 19t22 11h-6q12 4 42 9t64 13q48 10 82 16t52 10q10 84 23 172t23 172q4 26 29 40t53 14t50 -15t22 -45v-306q24 -2 57 -6t63 -9t55 -8t35 -5q4 0 16 -7t27 -16t28 -19t19 -18q-44 -68 -96 -87t-104 -25h2q-34 -4 -65 -11t-41 -29v2 q-10 -16 -13 -35t-3 -35q0 -18 4 -43t8 -49q2 -12 2 -10t2 -10q38 4 75 6t71 2q76 0 121 -19t45 -59q0 -36 -62 -90q-80 -10 -154 -24t-136 -28q-70 -14 -128 -25t-112 -11q-52 0 -96 14t-78 50q-20 20 -5 41t55 42t101 40t131 33q-10 42 -15 83t-7 81q-2 18 -1 20t-1 18 h-250z" /> -<glyph unicode="²" horiz-adv-x="772" d="M33 444q0 12 6 20t14 17q24 23 50 45t51 43q77 65 151.5 138t127.5 156q12 23 12 33q0 8 -16 8q-11 0 -27 -2.5t-33.5 -7.5t-36 -10t-34.5 -11q-41 -13 -71 -20.5t-41.5 -6t-2 15t46.5 42.5q19 16 46 30t56 24.5t58 16t55 5.5q49 0 82.5 -19t33.5 -61q0 -30 -25 -74 q-31 -52 -77 -96.5t-94 -86.5q-43 -39 -82.5 -75.5t-67.5 -79.5q30 3 75 14t98 26q39 11 79 21.5t78.5 18.5t74.5 13t67 5q35 0 61 -7.5t41 -25.5q1 -4 1 -12t-1.5 -16t-4 -15t-4.5 -9q-32 3 -68 0.5t-76.5 -10.5t-84 -19.5t-86.5 -22.5q-84 -24 -164 -42.5t-145 -18.5 q-27 0 -52.5 5t-45.5 16q-14 8 -19.5 16.5t-5.5 18.5z" /> -<glyph unicode="³" horiz-adv-x="564" d="M21 556q0 10 6 18.5t22 14.5q16 5 33 1.5t35 -8.5q12 -3 24.5 -6.5t22.5 -2.5q18 3 51 19t71 42t77 58t71.5 66t53 67t20.5 60q0 21 -27 35l4 -3q-20 5 -55.5 -6.5t-74.5 -25.5q-37 -14 -71.5 -25.5t-59.5 -11.5q-31 0 -45.5 18.5t-4.5 67.5q5 6 12 15t14 19h-1 q30 40 68 93t64 106q-14 -4 -30.5 -8.5t-33.5 -8.5t-32.5 -6.5t-29.5 -2.5q-17 0 -30 3.5t-19 11.5t-4.5 22.5t12.5 33.5q4 5 18.5 17t35.5 26t46.5 28.5t51 26.5t50.5 20.5t44 8.5q27 0 43.5 -15.5t16.5 -49.5q0 -32 -23 -89t-77 -146v-15h32q48 0 83.5 -10.5t58 -29.5 t32.5 -44.5t10 -55.5q0 -40 -18 -85t-50.5 -89.5t-77.5 -86t-98 -73.5t-112 -50.5t-120 -18.5h-24.5t-22.5 2q-5 3 -14 13.5t-12 15.5l1 -1q-1 3 -1.5 4l-1.5 3l1 -2q-5 9 -10 19.5t-5 20.5z" /> -<glyph unicode="´" horiz-adv-x="582" d="M71 982q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="µ" horiz-adv-x="1002" d="M30 920q0 74 84 130q26 -30 65 -83t81 -117q56 -84 126 -186t140 -192t131 -152t97 -66q2 32 -10 73t-31 85t-45 91t-52 95h2q-52 94 -92 178t-40 148q0 74 78 126q18 -18 53 -75t78 -135t86 -169t78 -178t55 -161t14 -116q-22 -86 -61 -124t-87 -38q-42 0 -85 24t-87 61 t-86 83t-80 88q-28 30 -42 54t-21 38t-13 18t-14 -4q10 -58 45 -144t75 -184q26 -62 52 -123t46 -118t32 -105t12 -84q0 -74 -54 -100l-116 -10q-30 166 -67 311t-77 269t-80 229t-74 193q-48 124 -82 214t-34 156z" /> -<glyph unicode="¶" horiz-adv-x="1398" d="M174 938q-6 94 34 165t114 119t175 72t217 24q136 0 290 -34t310 -104q-8 -18 -15 -37t-17 -35v2q-24 -52 -66 -142t-96 -199t-116 -227t-127 -229t-129 -204t-122 -150t-106 -69t-80 38l-4 8q-4 10 -3 26t5 26q8 18 29 56t46 85t54 99t56 99t48 84t33 57q10 16 17 32 t17 32q18 32 33 60t39 74t61 121t97 201h-6q-42 0 -74 6q-32 -80 -89 -199t-126 -248t-144 -254t-141 -216t-119 -134t-77 -9q-10 38 -3 81t22 88t36 88t39 83l21 42l19 38q2 2 6 10q18 38 49 99t63 125t60 122t40 92q-10 2 -18 2h-18q-22 0 -48 -2t-48 -4q-22 -4 -44 -6 t-44 -2q-60 0 -101 30t-49 118z" /> -<glyph unicode="·" horiz-adv-x="804" d="M314 648q0 46 17 87t46 72t65 49t72 18q46 0 86 -29t62 -93q16 -48 2 -99t-46 -93t-75 -69t-85 -27q-34 0 -61 15t-47 49q-36 60 -36 120z" /> -<glyph unicode="¸" horiz-adv-x="606" d="M95 -290q9 20 31 32t53 19t65 13q40 6 74 14t42 22q2 4 -14 7t-36 7q-28 6 -55 11t-48 17t-34 31t-11 53q-4 20 -5 42t-1 42q0 56 17 90t47 34q52 0 90 -122q10 -24 45 -38t73 -24h-2q36 -8 68 -17t52 -26t25 -44t-13 -71l4 8q-4 -18 -38 -55t-84 -74t-109 -64t-111 -27 q-40 0 -76 18q-12 10 -28 26t-18 24q-12 32 -3 52z" /> -<glyph unicode="¹" horiz-adv-x="590" d="M48 491q0 23 8 49.5t20.5 52t26 47.5t21.5 35q2 2 3.5 4.5t2.5 3.5q5 6 13 21.5t19 37t25 48.5t31 56q19 36 39.5 73.5t38.5 69.5t30.5 55t16.5 31q9 12 10 16t1 6q5 18 14 38.5t21.5 39t29.5 30.5t40 12q16 0 34.5 -8t36.5 -28l-3 3q0 -1 -15 -33.5t-40 -86t-57.5 -122 t-67.5 -140t-69 -140.5t-62 -124.5t-48 -90.5t-26 -40q-10 1 -34.5 7t-31.5 15q-28 22 -28 62z" /> -<glyph unicode="º" horiz-adv-x="820" d="M48 1136q0 56 39 119t94 118t115 93t102 42q16 2 30 3t30 1q108 0 155 -47t47 -115q0 -58 -34 -123t-89 -121t-128 -93t-151 -37q-56 0 -104 20q-58 22 -82 58t-24 82zM217 1203q-7 -25 1 -57q8 -30 38 -30q38 0 84 23t86 58t68 73t28 68q0 12 -15 18t-51 6q-10 0 -26 -1 t-30 -3q-16 -12 -34 -23t-36 -21l-48 -32t-41 -35t-24 -44z" /> -<glyph unicode="»" horiz-adv-x="1472" d="M50 1338q4 10 17 24t30 28t32 23t25 9q36 -28 73 -52t77 -52q78 -52 163 -111t157 -125t119 -139t47 -151q0 -92 -66 -170v2q-18 -24 -53 -67t-78 -95t-90 -108t-88 -104t-72 -84t-43 -50q-6 -6 -22 -21t-32 -31l-72 -72q-8 2 -22 14t-29 25t-27 25t-14 16l-2 2 q-22 44 -9 90t49 95t88 100t110 103q52 48 103 97t89 95t58 89t12 79q2 -10 -29 16t-79 64q-62 50 -137 112t-140 123t-107 114t-38 87zM560 1352q4 10 18 24t30 28t32 23t24 9q32 -24 68 -49t78 -53q78 -50 164 -110t158 -127t119 -141t47 -154q0 -42 -14 -85t-48 -83v2 q-18 -24 -54 -67t-79 -95t-90 -107t-88 -103t-72 -84t-43 -50l-54 -56q-18 -16 -44 -40t-30 -30q-8 4 -22 15t-28 25t-25 26t-13 16l-2 2q-22 42 -9 88t49 95t88 100t108 105q52 48 103 97t89 95t58 89t12 77v-2q2 -4 -26 18t-72 58q-62 48 -138 111t-143 126t-111 118 t-40 89z" /> -<glyph unicode="¿" horiz-adv-x="1370" d="M94 312q0 72 54 138q100 114 224 201t254 165h-2q76 48 151 95t143 101t128 117t106 139q12 16 34 30t44 16t41 -11t27 -51l-2 2q16 -62 -29 -136t-128 -153t-190 -162t-215 -163q-82 -60 -160 -119t-138 -111t-97 -94t-37 -70q0 -22 50 -35t168 -13h660q14 -32 16 -64 t-8 -58t-32 -42t-56 -16h-660q-50 0 -111 24t-113 65t-87 94t-35 111zM1126 1814q0 36 14 62t44 26q32 0 74 -60v2q22 -30 35 -64t-1 -78q-16 -42 -35 -60t-39 -18q-18 0 -35 19t-30 48t-20 62t-7 61z" /> -<glyph unicode="À" horiz-adv-x="2118" d="M-245 -334q-9 30 4 54t71 24q40 -54 94 -54q66 0 150 45t171 114t170 151t148 158t106 135t41 81q-4 -4 -22 7t-36 25q-22 14 -45 30t-35 44q10 26 31 44t48 30t58 20t63 16q34 6 62 12t44 14q90 130 162 240t135 212t122 200t123 206q50 84 105 177t119 197q36 58 72 58 q24 0 42 -29t28 -79t15 -118t5 -146q0 -70 -2 -146t-5 -153t-7 -151t-8 -138q-4 -92 -9 -161t-1 -87q2 -32 3 -61t3 -57q4 -86 12 -155t34 -133t79 -131t149 -149q-100 -34 -140 -34q-62 0 -104 34t-71 88t-49 121t-36 133q-22 80 -40 145t-48 79h-66q-22 -6 -66 -17 t-96 -23q-78 -18 -153 -36t-107 -28q-38 -10 -83 -46t-96 -90t-105 -121t-110 -137q-78 -100 -163 -201t-172 -182t-177 -132t-180 -51q-94 0 -174 54l-2 2q-12 8 -32 37t-29 59zM1132 678q4 -2 20 0t24 4h2l-16 -22v-18zM1178 682q40 6 101 14t121 20t110 27t68 33l4 36 t11 95t14 135t15 154t15 153t11 133q-16 -30 -39 -74t-55 -102q-64 -120 -157 -284t-219 -340zM1584 2232q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="Á" horiz-adv-x="2118" d="M-245 -334q-9 30 4 54t71 24q40 -54 94 -54q66 0 150 45t171 114t170 151t148 158t106 135t41 81q-4 -4 -22 7t-36 25q-22 14 -45 30t-35 44q10 26 31 44t48 30t58 20t63 16q34 6 62 12t44 14q90 130 162 240t135 212t122 200t123 206q50 84 105 177t119 197q36 58 72 58 q24 0 42 -29t28 -79t15 -118t5 -146q0 -70 -2 -146t-5 -153t-7 -151t-8 -138q-4 -92 -9 -161t-1 -87q2 -32 3 -61t3 -57q4 -86 12 -155t34 -133t79 -131t149 -149q-100 -34 -140 -34q-62 0 -104 34t-71 88t-49 121t-36 133q-22 80 -40 145t-48 79h-66q-22 -6 -66 -17 t-96 -23q-78 -18 -153 -36t-107 -28q-38 -10 -83 -46t-96 -90t-105 -121t-110 -137q-78 -100 -163 -201t-172 -182t-177 -132t-180 -51q-94 0 -174 54l-2 2q-12 8 -32 37t-29 59zM1132 678q4 -2 20 0t24 4h2l-16 -22v-18zM1178 682q40 6 101 14t121 20t110 27t68 33l4 36 t11 95t14 135t15 154t15 153t11 133q-16 -30 -39 -74t-55 -102q-64 -120 -157 -284t-219 -340zM1477 1906q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="Â" horiz-adv-x="2118" d="M-245 -334q-9 30 4 54t71 24q40 -54 94 -54q66 0 150 45t171 114t170 151t148 158t106 135t41 81q-4 -4 -22 7t-36 25q-22 14 -45 30t-35 44q10 26 31 44t48 30t58 20t63 16q34 6 62 12t44 14q90 130 162 240t135 212t122 200t123 206q50 84 105 177t119 197q36 58 72 58 q24 0 42 -29t28 -79t15 -118t5 -146q0 -70 -2 -146t-5 -153t-7 -151t-8 -138q-4 -92 -9 -161t-1 -87q2 -32 3 -61t3 -57q4 -86 12 -155t34 -133t79 -131t149 -149q-100 -34 -140 -34q-62 0 -104 34t-71 88t-49 121t-36 133q-22 80 -40 145t-48 79h-66q-22 -6 -66 -17 t-96 -23q-78 -18 -153 -36t-107 -28q-38 -10 -83 -46t-96 -90t-105 -121t-110 -137q-78 -100 -163 -201t-172 -182t-177 -132t-180 -51q-94 0 -174 54l-2 2q-12 8 -32 37t-29 59zM1132 678q4 -2 20 0t24 4h2l-16 -22v-18zM1178 682q40 6 101 14t121 20t110 27t68 33l4 36 t11 95t14 135t15 154t15 153t11 133q-16 -30 -39 -74t-55 -102q-64 -120 -157 -284t-219 -340zM1366 1974q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2 q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19q-22 12 -40 36z" /> -<glyph unicode="Ã" horiz-adv-x="2118" d="M-245 -334q-9 30 4 54t71 24q40 -54 94 -54q66 0 150 45t171 114t170 151t148 158t106 135t41 81q-4 -4 -22 7t-36 25q-22 14 -45 30t-35 44q10 26 31 44t48 30t58 20t63 16q34 6 62 12t44 14q90 130 162 240t135 212t122 200t123 206q50 84 105 177t119 197q36 58 72 58 q24 0 42 -29t28 -79t15 -118t5 -146q0 -70 -2 -146t-5 -153t-7 -151t-8 -138q-4 -92 -9 -161t-1 -87q2 -32 3 -61t3 -57q4 -86 12 -155t34 -133t79 -131t149 -149q-100 -34 -140 -34q-62 0 -104 34t-71 88t-49 121t-36 133q-22 80 -40 145t-48 79h-66q-22 -6 -66 -17 t-96 -23q-78 -18 -153 -36t-107 -28q-38 -10 -83 -46t-96 -90t-105 -121t-110 -137q-78 -100 -163 -201t-172 -182t-177 -132t-180 -51q-94 0 -174 54l-2 2q-12 8 -32 37t-29 59zM1132 678q4 -2 20 0t24 4h2l-16 -22v-18zM1178 682q40 6 101 14t121 20t110 27t68 33l4 36 t11 95t14 135t15 154t15 153t11 133q-16 -30 -39 -74t-55 -102q-64 -120 -157 -284t-219 -340zM1344 2010q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71q14 -24 -5 -67t-60 -96 t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80z" /> -<glyph unicode="Ä" horiz-adv-x="2118" d="M-245 -334q-9 30 4 54t71 24q40 -54 94 -54q66 0 150 45t171 114t170 151t148 158t106 135t41 81q-4 -4 -22 7t-36 25q-22 14 -45 30t-35 44q10 26 31 44t48 30t58 20t63 16q34 6 62 12t44 14q90 130 162 240t135 212t122 200t123 206q50 84 105 177t119 197q36 58 72 58 q24 0 42 -29t28 -79t15 -118t5 -146q0 -70 -2 -146t-5 -153t-7 -151t-8 -138q-4 -92 -9 -161t-1 -87q2 -32 3 -61t3 -57q4 -86 12 -155t34 -133t79 -131t149 -149q-100 -34 -140 -34q-62 0 -104 34t-71 88t-49 121t-36 133q-22 80 -40 145t-48 79h-66q-22 -6 -66 -17 t-96 -23q-78 -18 -153 -36t-107 -28q-38 -10 -83 -46t-96 -90t-105 -121t-110 -137q-78 -100 -163 -201t-172 -182t-177 -132t-180 -51q-94 0 -174 54l-2 2q-12 8 -32 37t-29 59zM1132 678q4 -2 20 0t24 4h2l-16 -22v-18zM1178 682q40 6 101 14t121 20t110 27t68 33l4 36 t11 95t14 135t15 154t15 153t11 133q-16 -30 -39 -74t-55 -102q-64 -120 -157 -284t-219 -340zM1468 2174q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM1800 2186q0 34 14 64t37 53t52 37 t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="Å" horiz-adv-x="2118" d="M-245 -334q-9 30 4 54t71 24q40 -54 94 -54q66 0 150 45t171 114t170 151t148 158t106 135t41 81q-4 -4 -22 7t-36 25q-22 14 -45 30t-35 44q10 26 31 44t48 30t58 20t63 16q34 6 62 12t44 14q90 130 162 240t135 212t122 200t123 206q50 84 105 177t119 197q36 58 72 58 q24 0 42 -29t28 -79t15 -118t5 -146q0 -70 -2 -146t-5 -153t-7 -151t-8 -138q-4 -92 -9 -161t-1 -87q2 -32 3 -61t3 -57q4 -86 12 -155t34 -133t79 -131t149 -149q-100 -34 -140 -34q-62 0 -104 34t-71 88t-49 121t-36 133q-22 80 -40 145t-48 79h-66q-22 -6 -66 -17 t-96 -23q-78 -18 -153 -36t-107 -28q-38 -10 -83 -46t-96 -90t-105 -121t-110 -137q-78 -100 -163 -201t-172 -182t-177 -132t-180 -51q-94 0 -174 54l-2 2q-12 8 -32 37t-29 59zM1132 678q4 -2 20 0t24 4h2l-16 -22v-18zM1178 682q40 6 101 14t121 20t110 27t68 33l4 36 t11 95t14 135t15 154t15 153t11 133q-16 -30 -39 -74t-55 -102q-64 -120 -157 -284t-219 -340zM1482 1976q0 54 40 115t96 114t117 90t105 41h-2q16 2 32 2h34q104 0 149 -44t45 -108q0 -54 -34 -118t-89 -119t-128 -91t-151 -36q-60 0 -108 20q-58 22 -82 56t-24 78z M1670 2008l2 16q0 -6 2 -6q-4 -8 -4 -10zM1674 2018q4 -18 14 -25t22 -7q32 0 71 18t74 45t58 56t23 51q0 6 -32 6q-26 0 -66 -8q-16 -16 -40 -31l-40 -25q-28 -20 -51 -38t-33 -42z" /> -<glyph unicode="Æ" horiz-adv-x="3256" d="M-448 12q-2 32 15 54t69 10q20 -40 49 -58t67 -18q70 0 161 33t186 85t187 114t165 120t119 104t50 64l-44 40q-24 22 -44 46t-24 52q28 46 85 53t121 9q38 0 70 2t50 8q136 130 239 222t193 172l120 104t124 111t135 129t157 160h-2q46 50 81 72t63 22q46 0 63 -36 t17 -94q0 -28 -2 -60t-8 -68q118 40 276 80t324 72t324 52t274 20q76 0 132 -10t85 -32t28 -57t-39 -85q-38 -10 -69 -6t-59 14h-2q-18 4 -39 8t-37 4q-126 -10 -255 -40t-247 -60q-98 -26 -194 -49t-186 -37q-150 -24 -233 -70t-125 -111t-54 -147t-20 -180q0 -10 -1 -15 t-1 -9t-1 -9t-1 -17q34 4 90 19t120 31q60 16 126 33t131 30t127 22t112 9q70 0 121 -18t73 -64q4 -10 2 -36t-6 -42q-54 -10 -121 -18t-125 -14q-100 -12 -202 -27t-201 -38t-193 -56t-176 -83l-4 -18q-4 -26 -8 -34q-26 -128 -63 -251t-83 -251q64 16 129 31t119 26t93 18 t53 9q156 24 310 43t310 19q40 0 84 -1t84 -5q30 -6 43 -32t16 -56t-1 -58t-6 -40q-34 2 -83 4t-83 2q-222 0 -438 -32t-440 -80q-22 -4 -48 -14t-58 -22q-40 -16 -83 -31t-87 -23q-28 -82 -44 -148t-16 -106q0 -14 18 -35t64 -55q-70 -8 -119 2t-79 33t-44 60t-14 83 q0 92 24 204l-10 20q-30 36 10 66q48 172 100 306v-4q14 64 24 119t10 97q0 34 -4 38q-4 2 -10 3t-10 3l2 -2q-6 0 -16 2t-19 3t-14 3t-1 2q-26 2 -68 17t-94 37q-32 12 -65 25t-63 23t-53 16t-35 6q-40 -4 -92 -31t-112 -70t-126 -98t-132 -111q-90 -76 -183 -152 t-186 -138t-184 -100t-175 -38q-60 0 -116 21t-106 73q-10 8 -23 41t-15 65zM1118 714l2 20q6 0 8 2q4 0 9 -1t11 -1q-8 -4 -15 -10t-15 -10zM1148 734q38 -6 82 -26t86 -44t78 -48t58 -38q6 4 13 9t13 9q-8 22 -4 44t32 50q4 6 14 10q42 124 81 237t61 203 q-64 -64 -186 -160t-328 -246zM1432 562q4 4 20 16q4 -4 7 -6t7 -4v2l4 -4zM1478 596q6 4 11 7t9 7l-10 -12l4 -26q-6 8 -14 24zM1772 532q2 2 2 6z" /> -<glyph unicode="Ç" horiz-adv-x="1582" d="M-12 392q0 92 36 195t96 211t140 217t169 212t181 196t176 169t155 133t119 85q98 58 168 58q50 0 86 -23t57 -62t31 -91t10 -108q0 -84 -20 -162t-51 -133t-68 -75t-71 14q0 30 7 76t17 96q10 58 22 120t12 102v26t-2 14q-64 10 -144 -25t-169 -103t-182 -162t-179 -203 t-163 -225t-134 -228t-90 -212t-33 -178q0 -70 34 -110t116 -40q22 0 62 6q72 10 140 41t132 74t125 94t119 103q90 80 185 157t197 119q32 12 61 6t49 -26t27 -48t-3 -60q-14 -40 -77 -101t-157 -131t-208 -140t-228 -127t-219 -92t-179 -35q-26 0 -45 2t-35 10 q-146 58 -209 151t-63 213zM511 -216q9 20 31 32t53 19t65 13q40 6 74 14t42 22q2 4 -14 7t-36 7q-28 6 -55 11t-48 17t-34 31t-11 53q-4 20 -5 42t-1 42q0 56 17 90t47 34q52 0 90 -122q10 -24 45 -38t73 -24h-2q36 -8 68 -17t52 -26t25 -44t-13 -71l4 8q-4 -18 -38 -55 t-84 -74t-109 -64t-111 -27q-40 0 -76 18q-12 10 -28 26t-18 24q-12 32 -3 52z" /> -<glyph unicode="È" horiz-adv-x="1864" d="M40 70q-36 34 6 70q22 86 47 161t51 146t55 142t61 147q4 10 8 19t8 19q4 6 -6 18l-20 24q-16 18 -29 36t-19 37t0 40t30 45q8 8 33 16t47 12q16 4 25 6t11 2q4 2 19 17l19 19h-2q20 34 44 72t48 72q42 64 79 130t59 162q-4 -4 -22 4q-22 4 -42 12t-34 22t-17 38t11 62 v-2q8 26 72 55t166 57t232 53t268 44t276 30t256 11q112 0 200 -12t139 -37t59 -66t-38 -99q-40 -10 -70 -6t-58 14h-2q-18 4 -39 8t-37 4q-48 -4 -99 -6t-101 -2q-32 0 -64 1t-66 1h-104q-110 0 -220 -7t-218 -37q-58 -16 -109 -62t-99 -115t-95 -155t-97 -184 q-4 -8 -9 -20t-9 -20q36 8 86 20t102 26q60 16 125 33t131 30t127 22t113 9q70 0 121 -18t73 -64q4 -10 1 -36t-7 -42q-54 -10 -120 -18t-124 -14q-100 -12 -202 -27t-202 -37t-194 -56t-176 -84q-76 -138 -140 -284t-116 -296q72 20 153 39t153 34t124 25t62 12 q162 26 312 44t310 18q40 0 84 -1t84 -5q30 -6 43 -32t16 -56t-1 -58t-6 -40q-34 2 -84 4t-84 2q-220 0 -436 -32t-440 -80l2 2q-16 -4 -44 -13t-62 -23q-60 -22 -128 -44t-128 -22q-56 0 -94 24l4 -2q-32 16 -42 42zM960 2276q0 24 12 94q64 4 129 -36t118 -96t86 -115 t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="É" horiz-adv-x="1864" d="M40 70q-36 34 6 70q22 86 47 161t51 146t55 142t61 147q4 10 8 19t8 19q4 6 -6 18l-20 24q-16 18 -29 36t-19 37t0 40t30 45q8 8 33 16t47 12q16 4 25 6t11 2q4 2 19 17l19 19h-2q20 34 44 72t48 72q42 64 79 130t59 162q-4 -4 -22 4q-22 4 -42 12t-34 22t-17 38t11 62 v-2q8 26 72 55t166 57t232 53t268 44t276 30t256 11q112 0 200 -12t139 -37t59 -66t-38 -99q-40 -10 -70 -6t-58 14h-2q-18 4 -39 8t-37 4q-48 -4 -99 -6t-101 -2q-32 0 -64 1t-66 1h-104q-110 0 -220 -7t-218 -37q-58 -16 -109 -62t-99 -115t-95 -155t-97 -184 q-4 -8 -9 -20t-9 -20q36 8 86 20t102 26q60 16 125 33t131 30t127 22t113 9q70 0 121 -18t73 -64q4 -10 1 -36t-7 -42q-54 -10 -120 -18t-124 -14q-100 -12 -202 -27t-202 -37t-194 -56t-176 -84q-76 -138 -140 -284t-116 -296q72 20 153 39t153 34t124 25t62 12 q162 26 312 44t310 18q40 0 84 -1t84 -5q30 -6 43 -32t16 -56t-1 -58t-6 -40q-34 2 -84 4t-84 2q-220 0 -436 -32t-440 -80l2 2q-16 -4 -44 -13t-62 -23q-60 -22 -128 -44t-128 -22q-56 0 -94 24l4 -2q-32 16 -42 42zM1067 1946q3 32 26 80t63 103t86 101t96 76t96 26 q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="Ê" horiz-adv-x="1864" d="M40 70q-36 34 6 70q22 86 47 161t51 146t55 142t61 147q4 10 8 19t8 19q4 6 -6 18l-20 24q-16 18 -29 36t-19 37t0 40t30 45q8 8 33 16t47 12q16 4 25 6t11 2q4 2 19 17l19 19h-2q20 34 44 72t48 72q42 64 79 130t59 162q-4 -4 -22 4q-22 4 -42 12t-34 22t-17 38t11 62 v-2q8 26 72 55t166 57t232 53t268 44t276 30t256 11q112 0 200 -12t139 -37t59 -66t-38 -99q-40 -10 -70 -6t-58 14h-2q-18 4 -39 8t-37 4q-48 -4 -99 -6t-101 -2q-32 0 -64 1t-66 1h-104q-110 0 -220 -7t-218 -37q-58 -16 -109 -62t-99 -115t-95 -155t-97 -184 q-4 -8 -9 -20t-9 -20q36 8 86 20t102 26q60 16 125 33t131 30t127 22t113 9q70 0 121 -18t73 -64q4 -10 1 -36t-7 -42q-54 -10 -120 -18t-124 -14q-100 -12 -202 -27t-202 -37t-194 -56t-176 -84q-76 -138 -140 -284t-116 -296q72 20 153 39t153 34t124 25t62 12 q162 26 312 44t310 18q40 0 84 -1t84 -5q30 -6 43 -32t16 -56t-1 -58t-6 -40q-34 2 -84 4t-84 2q-220 0 -436 -32t-440 -80l2 2q-16 -4 -44 -13t-62 -23q-60 -22 -128 -44t-128 -22q-56 0 -94 24l4 -2q-32 16 -42 42zM998 2004q-18 24 4 62q14 26 44 52t66 54q28 22 57 45 t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19q-22 12 -40 36z" /> -<glyph unicode="Ë" horiz-adv-x="1864" d="M40 70q-36 34 6 70q22 86 47 161t51 146t55 142t61 147q4 10 8 19t8 19q4 6 -6 18l-20 24q-16 18 -29 36t-19 37t0 40t30 45q8 8 33 16t47 12q16 4 25 6t11 2q4 2 19 17l19 19h-2q20 34 44 72t48 72q42 64 79 130t59 162q-4 -4 -22 4q-22 4 -42 12t-34 22t-17 38t11 62 v-2q8 26 72 55t166 57t232 53t268 44t276 30t256 11q112 0 200 -12t139 -37t59 -66t-38 -99q-40 -10 -70 -6t-58 14h-2q-18 4 -39 8t-37 4q-48 -4 -99 -6t-101 -2q-32 0 -64 1t-66 1h-104q-110 0 -220 -7t-218 -37q-58 -16 -109 -62t-99 -115t-95 -155t-97 -184 q-4 -8 -9 -20t-9 -20q36 8 86 20t102 26q60 16 125 33t131 30t127 22t113 9q70 0 121 -18t73 -64q4 -10 1 -36t-7 -42q-54 -10 -120 -18t-124 -14q-100 -12 -202 -27t-202 -37t-194 -56t-176 -84q-76 -138 -140 -284t-116 -296q72 20 153 39t153 34t124 25t62 12 q162 26 312 44t310 18q40 0 84 -1t84 -5q30 -6 43 -32t16 -56t-1 -58t-6 -40q-34 2 -84 4t-84 2q-220 0 -436 -32t-440 -80l2 2q-16 -4 -44 -13t-62 -23q-60 -22 -128 -44t-128 -22q-56 0 -94 24l4 -2q-32 16 -42 42zM1008 2128q0 34 14 64t36 53t50 37t58 14q38 0 69 -22 t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM1340 2140q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="Ì" horiz-adv-x="550" d="M-3 162q3 32 9 65t13 59t9 32q132 346 267 696t267 696q28 66 53 79t44 -10t30 -71t11 -102q0 -22 -3 -45t-11 -39q-18 -44 -37 -86t-37 -88q-134 -312 -258 -634t-204 -672q-34 -22 -61 -22t-46 14t-30 36t-15 42v-2q-4 20 -1 52zM376 2268q0 24 12 94q64 4 129 -36 t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="Í" horiz-adv-x="550" d="M-3 162q3 32 9 65t13 59t9 32q132 346 267 696t267 696q28 66 53 79t44 -10t30 -71t11 -102q0 -22 -3 -45t-11 -39q-18 -44 -37 -86t-37 -88q-134 -312 -258 -634t-204 -672q-34 -22 -61 -22t-46 14t-30 36t-15 42v-2q-4 20 -1 52zM413 1914q3 32 26 80t63 103t86 101 t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="Î" horiz-adv-x="550" d="M-3 162q3 32 9 65t13 59t9 32q132 346 267 696t267 696q28 66 53 79t44 -10t30 -71t11 -102q0 -22 -3 -45t-11 -39q-18 -44 -37 -86t-37 -88q-134 -312 -258 -634t-204 -672q-34 -22 -61 -22t-46 14t-30 36t-15 42v-2q-4 20 -1 52zM344 2012q-18 24 4 62q14 26 44 52 t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19q-22 12 -40 36z" /> -<glyph unicode="Ï" horiz-adv-x="550" d="M-3 162q3 32 9 65t13 59t9 32q132 346 267 696t267 696q28 66 53 79t44 -10t30 -71t11 -102q0 -22 -3 -45t-11 -39q-18 -44 -37 -86t-37 -88q-134 -312 -258 -634t-204 -672q-34 -22 -61 -22t-46 14t-30 36t-15 42v-2q-4 20 -1 52zM302 2004q0 34 14 64t36 53t50 37 t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM634 2016q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="Ð" horiz-adv-x="2058" d="M-75 899q21 37 85 67t163 53t211 35l34 74q22 50 42 91t34 83q-6 22 -8 38t-2 36q0 56 22 103t56 86t78 72t86 65q146 108 317 165t351 57q160 0 316 -50t296 -156q84 -68 120 -143t36 -155q0 -114 -72 -236t-192 -243t-278 -238t-330 -222t-347 -193t-329 -152 t-276 -100t-190 -36q-86 0 -100 54v-2q-20 52 3 91t69 63q32 16 64 31t66 31q-70 -16 -98 13t-28 85q0 32 8 70t20 75t25 71t21 58v-2q6 18 10 26q6 20 16 46t26 56q-30 -4 -60 -6t-58 -2q-58 0 -105 14t-81 48q-42 42 -21 79zM276 278q76 34 149 60t145 54q84 30 166 62 t163 68t162 80t161 100q194 114 330 217t221 194t123 170t38 145q0 70 -40 125t-108 92t-158 57t-190 20q-90 0 -185 -18t-185 -53t-171 -88t-145 -125q-2 -4 -5 -14t-6 -21t-6 -20t-3 -11q-20 -92 -39 -165t-41 -137h20q94 0 173 -12t131 -37t71 -65t-7 -94q-24 0 -88 -3 t-137 -7t-138 -8t-91 -6h-13t-19 -4q-28 -58 -54 -105t-54 -97q-20 -36 -40 -71t-41 -77t-43 -92t-46 -114z" /> -<glyph unicode="Ñ" horiz-adv-x="2074" d="M18 83v17q10 54 36 118t61 130t73 132t72 126q26 42 47 79t37 67q14 30 43 90t67 135t79 157l78 156t67 132t44 86q32 34 63 49t59 15q50 0 88 -46t67 -124t53 -180t46 -214q20 -92 41 -189t47 -187t57 -167t69 -127q22 2 59 53t83 135t97 193t103 227t103 236t93 222 q48 118 87 209t61 127q28 50 58 51t53 -24t35 -65t4 -76q-70 -190 -138 -356t-140 -326t-154 -326t-182 -358q-48 -58 -95 -91t-93 -33q-92 0 -170 122q-58 102 -98 197t-70 187t-51 182t-41 182q-16 64 -27 123t-31 133q-18 -14 -54 -71t-82 -139t-99 -181t-106 -199 t-100 -192t-81 -160q-20 -40 -35 -69t-23 -45q-12 -22 -33 -56t-41 -67t-36 -57t-18 -26h-122q-2 8 -4 23t-4 31t-2 29zM876 1928q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71 q14 -24 -5 -67t-60 -96t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80z" /> -<glyph unicode="Ò" horiz-adv-x="1318" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z M770 2130q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="Ó" horiz-adv-x="1318" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z M735 1746q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="Ô" horiz-adv-x="1318" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z M868 1834q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19 q-22 12 -40 36z" /> -<glyph unicode="Õ" horiz-adv-x="1318" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z M532 2000q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71q14 -24 -5 -67t-60 -96t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76 q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80z" /> -<glyph unicode="Ö" horiz-adv-x="1318" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z M790 1950q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM1122 1962q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88 z" /> -<glyph unicode="×" horiz-adv-x="1706" d="M175 293q5 31 29 60t64 57t84 56q32 20 63 42t56 44t41 44t16 40q-2 14 -13 55t-25 89q-16 48 -28 94t-14 58q-4 10 -3 39t5 39q38 28 68 21t56 -37t47 -74t41 -88q10 -26 20 -47t18 -37q40 30 85 67t89 74t82 72t64 61q52 26 84 26q20 0 23 -21t-3 -52t-20 -67t-28 -67 t-25 -52l-11 -21l20 4q-78 -50 -129 -85t-81 -60t-43 -41t-13 -28q0 -10 8 -21t22 -27q18 -22 40 -53t40 -77t30 -111t10 -155q-64 -18 -90 -18q-52 0 -81 23t-46 60t-23 82t-10 89q-4 52 -11 91t-25 39t-47 -17t-74 -56t-107 -102t-144 -155q-8 4 -23 15t-30 24t-27 25 t-14 16l2 -2q-24 34 -19 65z" /> -<glyph unicode="Ø" horiz-adv-x="1318" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z M425 -88q0 130 35 292t91 341t128.5 362t144.5 354t141 319t120 254q49 39 85 24.5t57 -50.5t28 -81.5t0 -71.5q-11 -28 -37 -94.5t-58 -144.5q-26 -64 -55 -135.5t-53.5 -135t-44.5 -113t-29 -72.5q-12 -26 -37.5 -95t-53.5 -148t-55 -154t-38 -111q-12 -29 -21.5 -72 t-20.5 -92q-14 -65 -31.5 -136t-35 -140t-37.5 -127.5t-41 -94.5q-12 -15 -37.5 -34.5t-53.5 -26t-52.5 9t-31.5 67.5v2q-7 42 -7 104z" /> -<glyph unicode="Ù" horiz-adv-x="1520" d="M64 422q0 136 41 291t102 307t133 291t135 245t107 168t50 60q26 -12 38 -31t16 -40t1 -42t-5 -41v-12q0 -10 -7 -23t-15 -27l2 2q-4 -6 -7 -12t-3 -2q-106 -236 -182 -425t-124 -337t-70 -258t-22 -184q0 -78 24 -114t64 -36q76 0 191 73t245 196t267 284t260 338 t221 359t152 346l12 12q4 4 6 10t6 11t15 8t35 3q40 -28 58 -67t18 -87q0 -82 -49 -197t-134 -248t-196 -277t-235 -282t-254 -261t-249 -216t-222 -148t-175 -55q-58 0 -96 30h-2q-82 68 -117 168t-35 220zM778 2028q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93 q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="Ú" horiz-adv-x="1520" d="M64 422q0 136 41 291t102 307t133 291t135 245t107 168t50 60q26 -12 38 -31t16 -40t1 -42t-5 -41v-12q0 -10 -7 -23t-15 -27l2 2q-4 -6 -7 -12t-3 -2q-106 -236 -182 -425t-124 -337t-70 -258t-22 -184q0 -78 24 -114t64 -36q76 0 191 73t245 196t267 284t260 338 t221 359t152 346l12 12q4 4 6 10t6 11t15 8t35 3q40 -28 58 -67t18 -87q0 -82 -49 -197t-134 -248t-196 -277t-235 -282t-254 -261t-249 -216t-222 -148t-175 -55q-58 0 -96 30h-2q-82 68 -117 168t-35 220zM897 1748q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92 q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="Û" horiz-adv-x="1520" d="M64 422q0 136 41 291t102 307t133 291t135 245t107 168t50 60q26 -12 38 -31t16 -40t1 -42t-5 -41v-12q0 -10 -7 -23t-15 -27l2 2q-4 -6 -7 -12t-3 -2q-106 -236 -182 -425t-124 -337t-70 -258t-22 -184q0 -78 24 -114t64 -36q76 0 191 73t245 196t267 284t260 338 t221 359t152 346l12 12q4 4 6 10t6 11t15 8t35 3q40 -28 58 -67t18 -87q0 -82 -49 -197t-134 -248t-196 -277t-235 -282t-254 -261t-249 -216t-222 -148t-175 -55q-58 0 -96 30h-2q-82 68 -117 168t-35 220zM856 1864q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39 q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19q-22 12 -40 36z" /> -<glyph unicode="Ü" horiz-adv-x="1520" d="M64 422q0 136 41 291t102 307t133 291t135 245t107 168t50 60q26 -12 38 -31t16 -40t1 -42t-5 -41v-12q0 -10 -7 -23t-15 -27l2 2q-4 -6 -7 -12t-3 -2q-106 -236 -182 -425t-124 -337t-70 -258t-22 -184q0 -78 24 -114t64 -36q76 0 191 73t245 196t267 284t260 338 t221 359t152 346l12 12q4 4 6 10t6 11t15 8t35 3q40 -28 58 -67t18 -87q0 -82 -49 -197t-134 -248t-196 -277t-235 -282t-254 -261t-249 -216t-222 -148t-175 -55q-58 0 -96 30h-2q-82 68 -117 168t-35 220zM860 2054q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70 q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM1192 2066q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="Ý" horiz-adv-x="1004" d="M60 1626q0 40 26 53t86 -15q26 -24 59 -65t68 -92t72 -109t73 -116q46 -72 80 -137t59 -112t43 -72t30 -15q18 36 45 94t59 128q42 94 90 199t97 201t97 175t89 121t72 37t49 -73q10 -42 -26 -146t-102 -247t-152 -315t-176 -348q-76 -148 -152 -299t-142 -287t-115 -249 t-69 -187v2q-12 -40 -45 -76t-69 -36q-26 0 -51 19t-41 63l2 -2q-18 48 -18 98q0 102 59 210t137 228q44 66 87 135t78 141t57 145t22 147q-16 32 -60 100t-98 144q-52 78 -109 163t-104 162t-77 138t-30 95zM473 1800q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92 q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="Þ" horiz-adv-x="1502" d="M-186 -298q20 40 51 116t67 175t77 216t83 239q62 180 130 370t135 365t131 321t120 237t101 116t75 -45q46 -46 46 -104q0 -50 -27 -106t-67 -122q-38 -68 -79 -148t-65 -176q204 144 351 204t253 60q124 0 185 -68t61 -176q0 -74 -32 -163t-95 -178t-156 -172 t-215 -147t-271 -103t-323 -39h-57t-71 4q4 -4 -2 -57t-18 -130t-30 -165t-36 -162q-26 -104 -48 -150t-38 -60t-27 -7t-13 11q0 -24 -21 -25t-45 3q-52 8 -91 28t-39 38zM384 570q150 -2 295 44t258 125t182 184t69 221q0 24 -3 50t-13 54q0 -34 -4 -43t-9 -6t-11 11t-10 8 q-112 16 -230 -40t-223 -151t-185 -210t-112 -217l-2 -4q-2 -6 -2 -26z" /> -<glyph unicode="ß" horiz-adv-x="1660" d="M46 82q0 82 13 163t39 141q4 8 13 46t21 93t25 122t27 133q10 52 20 101t19 90t16 70t11 41q26 64 26 116q0 16 -3 38t-7 44q-4 20 -6 37t-2 45q0 36 11 72t41 78q4 8 28 36t52 60q12 14 26 30t26 29t18 21t4 6q14 16 74 59t146 97t189 113t205 107t195 80t159 32 t104 -30t38 -100q0 -28 -8 -66q-20 -74 -60 -141t-92 -130t-113 -123t-123 -118q-76 -70 -147 -141t-119 -141q168 -10 286 -38t191 -71t107 -98t34 -117q0 -74 -46 -153t-124 -156t-180 -146t-213 -120t-223 -82t-210 -31q-32 0 -72 7t-88 19l34 136q226 0 396 50t283 126 t170 164t57 166q0 70 -53 117t-161 47t-273 -61t-405 -209l64 350q70 60 164 139t192 166t192 175t168 167t120 143t44 102q-94 6 -202 -47t-213 -130t-196 -164t-149 -151q-70 -150 -136 -325t-117 -364t-83 -384t-32 -383q0 -72 7 -152t19 -166q-58 2 -99 33t-67 82 t-39 115t-13 134z" /> -<glyph unicode="à" horiz-adv-x="1754" d="M64 264q0 90 35 204t95 232t141 230t171 199t186 140t186 53q66 0 127 -30t113 -96q38 -46 53 -94t15 -98q0 -66 -22 -133t-48 -135q-30 -78 -54 -160t-14 -162q8 -64 62 -80q-4 -2 1 -3t12 -1t14 1l7 1q54 0 140 29t180 72t181 92t145 87q108 16 132 -10t-11 -75 t-117 -110t-187 -117t-220 -96t-217 -46t-177 32t-99 138q-6 8 -6 11v4t-1 4t-9 9q-24 -20 -40 -42q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-100 0 -190 76q-40 34 -58 85t-18 115zM220 222q0 -28 6 -42q12 -42 50 -42q50 0 120 40t145 109t149 163t133 201t95 224 t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168zM788 1680q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="á" horiz-adv-x="1754" d="M64 264q0 90 35 204t95 232t141 230t171 199t186 140t186 53q66 0 127 -30t113 -96q38 -46 53 -94t15 -98q0 -66 -22 -133t-48 -135q-30 -78 -54 -160t-14 -162q8 -64 62 -80q-4 -2 1 -3t12 -1t14 1l7 1q54 0 140 29t180 72t181 92t145 87q108 16 132 -10t-11 -75 t-117 -110t-187 -117t-220 -96t-217 -46t-177 32t-99 138q-6 8 -6 11v4t-1 4t-9 9q-24 -20 -40 -42q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-100 0 -190 76q-40 34 -58 85t-18 115zM220 222q0 -28 6 -42q12 -42 50 -42q50 0 120 40t145 109t149 163t133 201t95 224 t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168zM523 1316q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="â" horiz-adv-x="1754" d="M64 264q0 90 35 204t95 232t141 230t171 199t186 140t186 53q66 0 127 -30t113 -96q38 -46 53 -94t15 -98q0 -66 -22 -133t-48 -135q-30 -78 -54 -160t-14 -162q8 -64 62 -80q-4 -2 1 -3t12 -1t14 1l7 1q54 0 140 29t180 72t181 92t145 87q108 16 132 -10t-11 -75 t-117 -110t-187 -117t-220 -96t-217 -46t-177 32t-99 138q-6 8 -6 11v4t-1 4t-9 9q-24 -20 -40 -42q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-100 0 -190 76q-40 34 -58 85t-18 115zM220 222q0 -28 6 -42q12 -42 50 -42q50 0 120 40t145 109t149 163t133 201t95 224 t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168zM536 1574q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2 q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19q-22 12 -40 36z" /> -<glyph unicode="ã" horiz-adv-x="1754" d="M64 264q0 90 35 204t95 232t141 230t171 199t186 140t186 53q66 0 127 -30t113 -96q38 -46 53 -94t15 -98q0 -66 -22 -133t-48 -135q-30 -78 -54 -160t-14 -162q8 -64 62 -80q-4 -2 1 -3t12 -1t14 1l7 1q54 0 140 29t180 72t181 92t145 87q108 16 132 -10t-11 -75 t-117 -110t-187 -117t-220 -96t-217 -46t-177 32t-99 138q-6 8 -6 11v4t-1 4t-9 9q-24 -20 -40 -42q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-100 0 -190 76q-40 34 -58 85t-18 115zM220 222q0 -28 6 -42q12 -42 50 -42q50 0 120 40t145 109t149 163t133 201t95 224 t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168zM578 1558q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71q14 -24 -5 -67t-60 -96 t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80z" /> -<glyph unicode="ä" horiz-adv-x="1754" d="M64 264q0 90 35 204t95 232t141 230t171 199t186 140t186 53q66 0 127 -30t113 -96q38 -46 53 -94t15 -98q0 -66 -22 -133t-48 -135q-30 -78 -54 -160t-14 -162q8 -64 62 -80q-4 -2 1 -3t12 -1t14 1l7 1q54 0 140 29t180 72t181 92t145 87q108 16 132 -10t-11 -75 t-117 -110t-187 -117t-220 -96t-217 -46t-177 32t-99 138q-6 8 -6 11v4t-1 4t-9 9q-24 -20 -40 -42q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-100 0 -190 76q-40 34 -58 85t-18 115zM220 222q0 -28 6 -42q12 -42 50 -42q50 0 120 40t145 109t149 163t133 201t95 224 t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168zM676 1618q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM1008 1630q0 34 14 64t37 53t52 37 t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="å" horiz-adv-x="1754" d="M64 264q0 90 35 204t95 232t141 230t171 199t186 140t186 53q66 0 127 -30t113 -96q38 -46 53 -94t15 -98q0 -66 -22 -133t-48 -135q-30 -78 -54 -160t-14 -162q8 -64 62 -80q-4 -2 1 -3t12 -1t14 1l7 1q54 0 140 29t180 72t181 92t145 87q108 16 132 -10t-11 -75 t-117 -110t-187 -117t-220 -96t-217 -46t-177 32t-99 138q-6 8 -6 11v4t-1 4t-9 9q-24 -20 -40 -42q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-100 0 -190 76q-40 34 -58 85t-18 115zM220 222q0 -28 6 -42q12 -42 50 -42q50 0 120 40t145 109t149 163t133 201t95 224 t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168zM540 1398q0 54 40 115t96 114t117 90t105 41h-2q16 2 32 2h34q104 0 149 -44t45 -108q0 -54 -34 -118t-89 -119t-128 -91t-151 -36q-60 0 -108 20q-58 22 -82 56t-24 78z M728 1430l2 16q0 -6 2 -6q-4 -8 -4 -10zM732 1440q4 -18 14 -25t22 -7q32 0 71 18t74 45t58 56t23 51q0 6 -32 6q-26 0 -66 -8q-16 -16 -40 -31l-40 -25q-28 -20 -51 -38t-33 -42z" /> -<glyph unicode="æ" horiz-adv-x="2080" d="M66 264q0 90 35 204t96 232t141 230t171 199t186 140t185 53q66 0 127 -30t115 -96q36 -46 52 -94t16 -98v-4q116 116 244 220t260 158q40 14 69 5t47 -35t27 -66t9 -86q0 -38 -5 -77t-14 -74t-20 -62t-23 -39q-30 -38 -107 -81t-167 -91q-76 -38 -153 -81t-141 -85 t-104 -82t-40 -72q0 -12 9 -24t31 -28q12 -2 24 -2h22q60 0 134 11t152 29t156 40t148 42q38 10 79 21t75 19q10 4 16 8l12 8t12 6q14 -6 14 -22l58 -48q-44 -60 -126 -111t-184 -91q-104 -70 -229 -120t-251 -50q-44 0 -71 4t-47 16t-38 35t-44 59q8 -24 -2 -55t-32 -62 t-51 -57t-58 -40t-53 -11t-34 29q-2 4 12 50t31 100t31 99t12 49q-10 -10 -19 -20t-19 -22q-48 -48 -106 -105t-123 -106t-136 -82t-143 -33q-102 0 -190 76q-40 34 -59 85t-19 115zM224 222q0 -28 6 -42q4 -22 18 -32t32 -10q50 0 120 40t145 109t149 163t133 201t95 224 t36 231v35t-4 37q-14 8 -30 8q-58 0 -132 -52t-152 -136t-153 -190t-133 -213t-94 -205t-36 -168zM1234 858q30 -2 72 9t88 31t91 47t81 55t58 55t22 49q0 6 -22 12l-24 16q2 -4 -21 -23t-60 -48t-81 -62t-85 -62t-74 -51t-45 -28z" /> -<glyph unicode="ç" horiz-adv-x="1398" d="M40 308q0 90 40 193t105 205t146 197t165 168t163 116t137 43q54 0 90 -31t48 -99q8 -52 -18 -113t-68 -113t-89 -88t-83 -36q-28 0 -51 21t-31 67q28 58 59 95t59 75q-24 4 -69 -27t-99 -87t-110 -129t-102 -151t-75 -155t-29 -139q0 -34 11 -62t37 -50q66 -4 150 14 t176 47t184 65t176 70h-2q116 46 202 76t122 14q42 -26 15 -71t-102 -99t-183 -109t-227 -100t-234 -73t-205 -28q-56 0 -98 14q-114 38 -162 112t-48 168zM439 -290q9 20 31 32t53 19t65 13q40 6 74 14t42 22q2 4 -14 7t-36 7q-28 6 -55 11t-48 17t-34 31t-11 53 q-4 20 -5 42t-1 42q0 56 17 90t47 34q52 0 90 -122q10 -24 45 -38t73 -24h-2q36 -8 68 -17t52 -26t25 -44t-13 -71l4 8q-4 -18 -38 -55t-84 -74t-109 -64t-111 -27q-40 0 -76 18q-12 10 -28 26t-18 24q-12 32 -3 52z" /> -<glyph unicode="è" horiz-adv-x="1088" d="M22 308q0 48 8 99t24 99q22 22 46 49t46 53q68 74 150 159t171 165t184 146t189 104q40 16 69 7t47 -36t26 -67t8 -84q0 -38 -5 -77t-14 -74t-19 -62t-22 -41q-32 -36 -108 -79t-168 -91q-74 -38 -152 -81t-141 -85t-104 -82t-41 -72q0 -26 42 -52q10 -2 22 -2h22 q62 0 136 11t152 29t156 40t148 42q50 14 105 27t89 23l72 -58q-48 -66 -144 -122t-211 -97t-235 -65t-216 -24q-42 0 -79 4t-69 14q-106 36 -145 113t-39 167zM300 1514q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10 q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53zM378 662q30 -2 72 10t88 32t91 47t81 55t58 55t22 49q0 4 -22 10l-22 18q2 -4 -21 -23t-60 -48t-81 -62t-86 -63t-75 -52t-45 -28z" /> -<glyph unicode="é" horiz-adv-x="1088" d="M22 308q0 48 8 99t24 99q22 22 46 49t46 53q68 74 150 159t171 165t184 146t189 104q40 16 69 7t47 -36t26 -67t8 -84q0 -38 -5 -77t-14 -74t-19 -62t-22 -41q-32 -36 -108 -79t-168 -91q-74 -38 -152 -81t-141 -85t-104 -82t-41 -72q0 -26 42 -52q10 -2 22 -2h22 q62 0 136 11t152 29t156 40t148 42q50 14 105 27t89 23l72 -58q-48 -66 -144 -122t-211 -97t-235 -65t-216 -24q-42 0 -79 4t-69 14q-106 36 -145 113t-39 167zM378 662q30 -2 72 10t88 32t91 47t81 55t58 55t22 49q0 4 -22 10l-22 18q2 -4 -21 -23t-60 -48t-81 -62t-86 -63 t-75 -52t-45 -28zM481 1210q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="ê" horiz-adv-x="1088" d="M22 308q0 48 8 99t24 99q22 22 46 49t46 53q68 74 150 159t171 165t184 146t189 104q40 16 69 7t47 -36t26 -67t8 -84q0 -38 -5 -77t-14 -74t-19 -62t-22 -41q-32 -36 -108 -79t-168 -91q-74 -38 -152 -81t-141 -85t-104 -82t-41 -72q0 -26 42 -52q10 -2 22 -2h22 q62 0 136 11t152 29t156 40t148 42q50 14 105 27t89 23l72 -58q-48 -66 -144 -122t-211 -97t-235 -65t-216 -24q-42 0 -79 4t-69 14q-106 36 -145 113t-39 167zM212 1436q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116 t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19q-22 12 -40 36zM378 662q30 -2 72 10t88 32t91 47t81 55t58 55t22 49q0 4 -22 10l-22 18q2 -4 -21 -23t-60 -48t-81 -62 t-86 -63t-75 -52t-45 -28z" /> -<glyph unicode="ë" horiz-adv-x="1088" d="M22 308q0 48 8 99t24 99q22 22 46 49t46 53q68 74 150 159t171 165t184 146t189 104q40 16 69 7t47 -36t26 -67t8 -84q0 -38 -5 -77t-14 -74t-19 -62t-22 -41q-32 -36 -108 -79t-168 -91q-74 -38 -152 -81t-141 -85t-104 -82t-41 -72q0 -26 42 -52q10 -2 22 -2h22 q62 0 136 11t152 29t156 40t148 42q50 14 105 27t89 23l72 -58q-48 -66 -144 -122t-211 -97t-235 -65t-216 -24q-42 0 -79 4t-69 14q-106 36 -145 113t-39 167zM378 662q30 -2 72 10t88 32t91 47t81 55t58 55t22 49q0 4 -22 10l-22 18q2 -4 -21 -23t-60 -48t-81 -62t-86 -63 t-75 -52t-45 -28zM418 1482q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM750 1494q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54 v-2q-28 44 -28 88z" /> -<glyph unicode="ì" horiz-adv-x="634" d="M-2 74q68 218 131 378t116 265t94 156t63 51q30 0 36 -68t-23 -190t-97 -291t-182 -369q-16 -6 -36 -8t-40 2t-36 16t-24 32zM146 1422q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23 t-27 26t-18 36t-7 53z" /> -<glyph unicode="í" horiz-adv-x="582" d="M0 48v26q66 218 128 374t115 256t93 147t64 47q30 0 36 -64t-23 -181t-95 -282t-180 -365q-34 -14 -77 -6t-61 48zM149 1026q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64 q-24 0 -21 32z" /> -<glyph unicode="î" horiz-adv-x="634" d="M-37 1184q-1 16 11 34q16 26 46 52t66 54q28 22 56 45t38 39q52 102 103 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-36 43v-2q-2 4 -8 19t-16 37q-10 28 -23 64t-11 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-67 19 q-12 6 -23 15t-18 21t-8 28zM0 48v26q66 218 128 374t115 256t93 147t64 47q30 0 36 -64t-23 -181t-95 -282t-180 -365q-34 -14 -77 -6t-61 48z" /> -<glyph unicode="ï" horiz-adv-x="634" d="M2 74q66 218 128 374t115 256t93 147t64 47q30 0 36 -64t-23 -181t-95 -282t-180 -365q-16 -6 -36 -8t-40 2t-36 16t-24 32zM16 1102q0 34 14 64t36 53t51 37t59 14q36 0 67 -22t53 -70q12 -36 0 -73t-37 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90z M350 1114q0 34 14 64t37 53t51 37t58 14q36 0 68 -21t52 -71q12 -36 1 -74t-36 -69t-59 -52t-68 -21q-58 0 -90 54v-2q-28 40 -28 88z" /> -<glyph unicode="ð" horiz-adv-x="786" d="M-8 504q0 50 16 95t54 83q28 22 59 31t63 9q22 0 43 -5t43 -13q4 26 18 61t36 77q-18 16 -35 28t-33 20q-46 44 -66 79t-20 59q0 30 21 46t53 17t70 -15t70 -50q16 -18 29 -33t29 -37l126 120q10 -8 23 -17t5 -5q32 -22 48 -37t16 -37t-17 -42t-53 -54q-6 -8 -10 -12 t-9 -8t-11 -10t-16 -18q46 -58 88 -131t73 -151t50 -154t19 -142q0 -80 -30 -134q-60 -86 -129 -123t-141 -37q-90 0 -177 52t-154 132t-109 175t-42 181zM156 512q0 -54 32 -122t79 -128t102 -102t105 -42q40 0 66 38q4 10 6 19t2 19q0 50 -30 107t-79 104t-114 78t-133 31 h-18t-18 -2zM346 670q40 -22 80 -49t78 -53q14 -10 18 -14t7 -6t8 -5t19 -11q-16 40 -50 92t-76 104q-42 -36 -74 -52q-8 -4 -10 -6zM540 156l4 4z" /> -<glyph unicode="ñ" horiz-adv-x="1440" d="M26 190q0 2 31 64t79 153t105 199t108 201t90 157t49 70q48 -34 67 -66t19 -64q0 -28 -9 -56t-19 -54l-8 -24l-8 -24q64 42 152 99t181 108t181 86t154 35q64 0 103 -34t39 -118q0 -48 -19 -120t-61 -172l2 4q-4 -8 -14 -31t-23 -54t-30 -68t-33 -73q-28 -64 -55 -124 t-33 -76q-2 -4 -2 -12q-2 -6 -2 -13t-2 -15q-4 -38 -15 -83t-39 -73q-16 -16 -35 -15t-35 11t-29 22t-15 16l-4 14q-6 60 4 117t29 114t46 112t55 109q46 90 82 174t36 164q0 28 -6 56q-56 8 -132 -33t-162 -110t-176 -155t-174 -170q-86 -86 -164 -159t-140 -115t-106 -40 t-62 66zM298 1412q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71q14 -24 -5 -67t-60 -96t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76 q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80z" /> -<glyph unicode="ò" d="M30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33q-76 0 -150 30q-84 34 -121 95t-37 137zM206 258q0 -32 6 -52q14 -56 68 -56 q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142zM470 1388q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10 q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="ó" d="M30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33q-76 0 -150 30q-84 34 -121 95t-37 137zM206 258q0 -32 6 -52q14 -56 68 -56 q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142zM483 1186q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38 t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="ô" d="M30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33q-76 0 -150 30q-84 34 -121 95t-37 137zM206 258q0 -32 6 -52q14 -56 68 -56 q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142zM342 1294q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116 t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19q-22 12 -40 36z" /> -<glyph unicode="õ" d="M-72 1306q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71q14 -24 -5 -67t-60 -96t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76 q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80zM30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33 q-76 0 -150 30q-84 34 -121 95t-37 137zM206 258q0 -32 6 -52q14 -56 68 -56q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142z" /> -<glyph unicode="ö" d="M30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33q-76 0 -150 30q-84 34 -121 95t-37 137zM206 258q0 -32 6 -52q14 -56 68 -56 q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142zM342 1156q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20 q-28 0 -51 10t-39 38q-26 44 -26 90zM674 1168q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="÷" horiz-adv-x="1538" d="M69 510q-13 32 53 116l-8 -14q2 10 46 23t116 27t165 27t194 24t202 18t187 7q116 0 198 -17t104 -51q2 -8 2 -24t-1 -32t-5 -31t-8 -21q-44 -4 -129 -11t-191 -15t-223 -17t-224 -16t-193 -13t-130 -8h4q-18 -2 -34 -3t-30 -1q-82 0 -95 32zM492 291q4 25 20 43t42 27 t54 9q30 0 57 -12t41 -40q18 -38 18 -67t-14 -49t-38 -31t-52 -11q-32 0 -63 17t-51 57q-18 32 -14 57zM502 944q0 26 13 50t35 37t52 12t64 -23q28 -18 41 -45t13 -51q0 -42 -27 -73t-69 -31q-44 0 -80 38q-42 38 -42 86z" /> -<glyph unicode="ø" d="M30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33q-76 0 -150 30q-84 34 -121 95t-37 137zM200 -150q0 100 30 225t78 263t110 279t124 273 t121 246t103 196q42 30 73 19t49 -39t24 -63t0 -55q-10 -22 -32 -73t-50 -111q-22 -50 -47 -105t-46 -104t-38 -87t-25 -56q-10 -20 -32 -73t-46 -114t-47 -119t-33 -86q-10 -22 -18 -55t-18 -71q-12 -50 -27 -105t-30 -108t-32 -98t-35 -73q-10 -12 -32 -27t-46 -20t-45 7 t-27 52v2q-6 32 -6 80zM206 258q0 -32 6 -52q14 -56 68 -56q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142z" /> -<glyph unicode="ù" horiz-adv-x="1440" d="M40 210q-14 38 8 109t65 157t100 177t112 170t102 136t69 75q90 -46 90 -118q0 -34 -14 -72t-38 -80t-55 -86t-63 -90t-64 -93t-57 -90t-40 -82t-15 -69q34 -4 82 22t104 72t117 107t123 127t120 133t108 125q58 64 99 112t83 82q50 -24 71 -56t21 -72q0 -58 -29 -124 t-63 -142q-38 -78 -71 -159t-33 -145q0 -52 30 -88l68 -82h220q16 0 7 -25t-26 -55t-36 -57t-23 -29h8q-30 -6 -66 -6q-38 0 -70 10t-70 26l2 -2q-66 26 -106 66t-64 89t-36 104t-22 111q-4 16 -2 14t-2 12q-18 -10 -56 -43t-88 -77q-48 -42 -102 -87t-108 -81t-107 -60 t-103 -24q-58 0 -105 37t-75 123v-2zM618 1490q0 24 12 94q64 4 129 -36t118 -96t86 -115t33 -93q0 -30 -10 -49t-33 -21t-59 15t-86 59l-8 10q-22 38 -47 58t-49 36q-18 12 -34 23t-27 26t-18 36t-7 53z" /> -<glyph unicode="ú" horiz-adv-x="1440" d="M40 210q-14 38 8 109t65 157t100 177t112 170t102 136t69 75q90 -46 90 -118q0 -34 -14 -72t-38 -80t-55 -86t-63 -90t-64 -93t-57 -90t-40 -82t-15 -69q34 -4 82 22t104 72t117 107t123 127t120 133t108 125q58 64 99 112t83 82q50 -24 71 -56t21 -72q0 -58 -29 -124 t-63 -142q-38 -78 -71 -159t-33 -145q0 -52 30 -88l68 -82h220q16 0 7 -25t-26 -55t-36 -57t-23 -29h8q-30 -6 -66 -6q-38 0 -70 10t-70 26l2 -2q-66 26 -106 66t-64 89t-36 104t-22 111q-4 16 -2 14t-2 12q-18 -10 -56 -43t-88 -77q-48 -42 -102 -87t-108 -81t-107 -60 t-103 -24q-58 0 -105 37t-75 123v-2zM745 1244q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="û" horiz-adv-x="1440" d="M40 210q-14 38 8 109t65 157t100 177t112 170t102 136t69 75q90 -46 90 -118q0 -34 -14 -72t-38 -80t-55 -86t-63 -90t-64 -93t-57 -90t-40 -82t-15 -69q34 -4 82 22t104 72t117 107t123 127t120 133t108 125q58 64 99 112t83 82q50 -24 71 -56t21 -72q0 -58 -29 -124 t-63 -142q-38 -78 -71 -159t-33 -145q0 -52 30 -88l68 -82h220q16 0 7 -25t-26 -55t-36 -57t-23 -29h8q-30 -6 -66 -6q-38 0 -70 10t-70 26l2 -2q-66 26 -106 66t-64 89t-36 104t-22 111q-4 16 -2 14t-2 12q-18 -10 -56 -43t-88 -77q-48 -42 -102 -87t-108 -81t-107 -60 t-103 -24q-58 0 -105 37t-75 123v-2zM492 1302q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63 t-66 -50t-69 -22t-69 19q-22 12 -40 36z" /> -<glyph unicode="ü" horiz-adv-x="1440" d="M40 210q-14 38 8 109t65 157t100 177t112 170t102 136t69 75q90 -46 90 -118q0 -34 -14 -72t-38 -80t-55 -86t-63 -90t-64 -93t-57 -90t-40 -82t-15 -69q34 -4 82 22t104 72t117 107t123 127t120 133t108 125q58 64 99 112t83 82q50 -24 71 -56t21 -72q0 -58 -29 -124 t-63 -142q-38 -78 -71 -159t-33 -145q0 -52 30 -88l68 -82h220q16 0 7 -25t-26 -55t-36 -57t-23 -29h8q-30 -6 -66 -6q-38 0 -70 10t-70 26l2 -2q-66 26 -106 66t-64 89t-36 104t-22 111q-4 16 -2 14t-2 12q-18 -10 -56 -43t-88 -77q-48 -42 -102 -87t-108 -81t-107 -60 t-103 -24q-58 0 -105 37t-75 123v-2zM474 1206q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM806 1218q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52 t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="ý" horiz-adv-x="1102" d="M-434 -811q4 43 23 94t48 106t59 103t57 86t41 58t43 59t67 88t81 105t85 114q74 96 136 178t88 116q12 14 -20 67t-84 129q-34 50 -69 107t-64 115t-48 117t-19 113q0 34 14 82q34 26 66 10t63 -58t60 -103t59 -127q24 -54 48 -107t46 -94t38 -65t26 -20q42 32 82 76 t79 94t76 102t71 100q30 42 56 81t50 69q26 32 50 44t74 -4q30 -12 18 -65t-56 -138t-116 -194t-159 -233t-183 -256t-192 -262q-90 -122 -174 -236t-152 -210t-116 -168t-66 -110q-6 -6 -6 -12q-12 -26 -27 -51t-49 -49q-8 4 -22 16t-29 25t-27 24t-14 17l2 -4 q-18 28 -14 71zM439 1286q3 32 26 80t63 103t86 101t96 76t96 26q14 -62 14 -92q0 -64 -29 -94t-75 -58h2q-28 -16 -57 -38t-55 -62l-10 -10q-94 -64 -136 -64q-24 0 -21 32z" /> -<glyph unicode="þ" horiz-adv-x="1354" d="M-128 -840q8 150 38 322t74 355t98 373t110 378q54 188 108 381t100 383t79 376t45 362q48 8 89 6t73 -20t50 -56t18 -106q0 -88 -36 -241t-122 -397q90 28 166 40t140 12q96 0 164 -25t112 -68t65 -103t21 -130q0 -88 -31 -185t-88 -194t-136 -185t-174 -155t-203 -107 t-222 -40q-56 0 -116 12q-46 -140 -73 -244t-42 -184t-21 -138t-8 -106q-2 -40 -5 -77t-11 -76t-21 -84t-33 -99q-12 -22 -47 -38t-67 -16q-36 0 -64 16t-30 52v6zM366 336l16 -4l16 -4q-4 -10 -5 -19t-5 -19zM398 328q26 -6 54 -6q74 0 150 33t148 88t135 127t110 149 t74 153t27 140q0 52 -25 93t-79 59q-168 -16 -267 -70t-154 -134t-79 -177t-40 -201q-10 -58 -22 -123t-32 -131z" /> -<glyph unicode="ÿ" horiz-adv-x="1102" d="M-434 -811q4 43 23 94t48 106t59 103t57 86t41 58t43 59t67 88t81 105t85 114q74 96 136 178t88 116q12 14 -20 67t-84 129q-34 50 -69 107t-64 115t-48 117t-19 113q0 34 14 82q34 26 66 10t63 -58t60 -103t59 -127q24 -54 48 -107t46 -94t38 -65t26 -20q42 32 82 76 t79 94t76 102t71 100q30 42 56 81t50 69q26 32 50 44t74 -4q30 -12 18 -65t-56 -138t-116 -194t-159 -233t-183 -256t-192 -262q-90 -122 -174 -236t-152 -210t-116 -168t-66 -110q-6 -6 -6 -12q-12 -26 -27 -51t-49 -49q-8 4 -22 16t-29 25t-27 24t-14 17l2 -4 q-18 28 -14 71zM194 1422q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM526 1434q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2 q-28 44 -28 88z" /> -<glyph unicode="Œ" horiz-adv-x="2876" d="M26 342q0 60 14 123t37 123t52 116t59 102q10 18 33 54t53 82t64 97t66 98t58 86t42 59q20 126 69 218t115 152t144 89t158 29q86 0 168 -33t146 -97t103 -156t39 -212q0 -100 -33 -220t-108 -255t-197 -286t-300 -315v2q-38 -36 -89 -72t-108 -63t-119 -44t-122 -17 q-68 0 -136 28q-116 50 -162 132t-46 180zM198 318q0 -10 2 -26t6 -32q12 -62 41 -88t69 -26q78 0 180 64t211 168t214 237t188 271t134 268t51 230q0 78 -44 126t-148 48q-12 0 -29 -1t-33 -3q-50 -46 -132 -129t-176 -188t-189 -226t-172 -243t-125 -238t-48 -212z M1046 52q-36 34 6 70q22 86 47 161t51 146t55 142t61 147q4 10 8 19t8 19q4 6 -6 18l-20 24q-16 18 -29 36t-19 37t0 40t30 45q8 8 33 16t47 12q16 4 25 6t11 2q4 2 19 17l19 19h-2q20 34 44 72t48 72q42 64 79 130t59 162q-4 -4 -22 4q-22 4 -42 12t-34 22t-17 38t11 62v-2 q8 26 72 55t166 57t232 53t268 44t276 30t256 11q112 0 200 -12t139 -37t59 -66t-38 -99q-40 -10 -70 -6t-58 14h-2q-18 4 -39 8t-37 4q-48 -4 -99 -6t-101 -2q-32 0 -64 1t-66 1h-104q-110 0 -220 -7t-218 -37q-58 -16 -109 -62t-99 -115t-95 -155t-97 -184q-4 -8 -9 -20 t-9 -20q36 8 86 20t102 26q60 16 125 33t131 30t127 22t113 9q70 0 121 -18t73 -64q4 -10 1 -36t-7 -42q-54 -10 -120 -18t-124 -14q-100 -12 -202 -27t-202 -37t-194 -56t-176 -84q-76 -138 -140 -284t-116 -296q72 20 153 39t153 34t124 25t62 12q162 26 312 44t310 18 q40 0 84 -1t84 -5q30 -6 43 -32t16 -56t-1 -58t-6 -40q-34 2 -84 4t-84 2q-220 0 -436 -32t-440 -80l2 2q-16 -4 -44 -13t-62 -23q-60 -22 -128 -44t-128 -22q-56 0 -94 24l4 -2q-32 16 -42 42z" /> -<glyph unicode="œ" horiz-adv-x="1984" d="M30 262q0 70 29 150t77 160t109 155t123 134t122 97t104 44q22 2 45 3t45 1q84 0 144 -22t98 -60t56 -90t18 -114q0 -74 -25 -155t-71 -161t-108 -153t-135 -129t-156 -89t-167 -33q-76 0 -150 30q-84 34 -121 95t-37 137zM206 258q0 -32 6 -52q14 -56 68 -56 q48 0 109 30t126 79t127 111t110 128t78 130t30 114q0 38 -31 62t-107 24q-34 0 -78 -6q-10 -10 -21 -19t-25 -21q-54 -46 -122 -108t-128 -131t-101 -143t-41 -142zM788 308q0 48 8 99t24 99q22 22 46 49t46 53q68 74 150 159t171 165t184 146t189 104q40 16 69 7t47 -36 t26 -67t8 -84q0 -38 -5 -77t-14 -74t-19 -62t-22 -41q-32 -36 -108 -79t-168 -91q-74 -38 -152 -81t-141 -85t-104 -82t-41 -72q0 -26 42 -52q10 -2 22 -2h22q62 0 136 11t152 29t156 40t148 42q50 14 105 27t89 23l72 -58q-48 -66 -144 -122t-211 -97t-235 -65t-216 -24 q-42 0 -79 4t-69 14q-106 36 -145 113t-39 167zM1144 662q30 -2 72 10t88 32t91 47t81 55t58 55t22 49q0 4 -22 10l-22 18q2 -4 -21 -23t-60 -48t-81 -62t-86 -63t-75 -52t-45 -28z" /> -<glyph unicode="Ÿ" horiz-adv-x="1004" d="M60 1626q0 40 26 53t86 -15q26 -24 59 -65t68 -92t72 -109t73 -116q46 -72 80 -137t59 -112t43 -72t30 -15q18 36 45 94t59 128q42 94 90 199t97 201t97 175t89 121t72 37t49 -73q10 -42 -26 -146t-102 -247t-152 -315t-176 -348q-76 -148 -152 -299t-142 -287t-115 -249 t-69 -187v2q-12 -40 -45 -76t-69 -36q-26 0 -51 19t-41 63l2 -2q-18 48 -18 98q0 102 59 210t137 228q44 66 87 135t78 141t57 145t22 147q-16 32 -60 100t-98 144q-52 78 -109 163t-104 162t-77 138t-30 95zM316 1790q0 34 14 64t36 53t50 37t58 14q38 0 69 -22t51 -70 q12 -36 1 -73t-36 -69t-60 -52t-67 -20q-28 0 -51 10t-39 38q-26 44 -26 90zM648 1802q0 34 14 64t37 53t52 37t59 14q36 0 68 -21t52 -71q12 -36 1 -74t-37 -69t-60 -52t-68 -21q-56 0 -90 54v-2q-28 44 -28 88z" /> -<glyph unicode="ˆ" horiz-adv-x="1054" d="M136 1156q-18 24 4 62q14 26 44 52t66 54q28 22 57 45t39 39q50 102 101 154t93 52t73 -37t52 -91t31 -116t10 -114q0 -60 -16 -98t-50 -38q-16 0 -34 13t-34 43v-2q-8 12 -24 56q-12 28 -25 64t-9 52q-10 -18 -30 -48t-46 -62t-58 -63t-66 -50t-69 -22t-69 19 q-22 12 -40 36z" /> -<glyph unicode="˜" horiz-adv-x="1328" d="M64 1306q0 34 14 84t39 104t59 107t72 95t80 68t82 26q64 0 119 -65t89 -223q20 -78 45 -110t59 -32q48 0 115 42t139 94q56 40 117 79t137 71q14 -24 -5 -67t-60 -96t-99 -108t-123 -99t-132 -73t-125 -29q-28 0 -52 5t-46 19q-40 24 -66 59t-43 73t-29 78t-20 76 q-4 18 -7 33t-7 27t-6 24q-8 0 -25 -17t-44 -58t-66 -106t-93 -161q-62 -24 -90 0t-28 80z" /> -<glyph unicode=" " horiz-adv-x="1247" /> -<glyph unicode=" " horiz-adv-x="2494" /> -<glyph unicode=" " horiz-adv-x="1247" /> -<glyph unicode=" " horiz-adv-x="2494" /> -<glyph unicode=" " horiz-adv-x="831" /> -<glyph unicode=" " horiz-adv-x="623" /> -<glyph unicode=" " horiz-adv-x="415" /> -<glyph unicode=" " horiz-adv-x="415" /> -<glyph unicode=" " horiz-adv-x="311" /> -<glyph unicode=" " horiz-adv-x="498" /> -<glyph unicode=" " horiz-adv-x="138" /> -<glyph unicode="‐" horiz-adv-x="1244" d="M42 735q14 31 62 58t124 50t166 40t188 26t190 9q94 0 173 -11t132 -36t72 -64t-9 -95q-24 0 -87 -3t-134 -7t-134 -8t-87 -6q-34 -4 -73 -11t-79 -19q-74 -16 -152 -32t-148 -16q-56 0 -103 14t-81 48q-34 32 -20 63z" /> -<glyph unicode="‑" horiz-adv-x="1244" d="M42 735q14 31 62 58t124 50t166 40t188 26t190 9q94 0 173 -11t132 -36t72 -64t-9 -95q-24 0 -87 -3t-134 -7t-134 -8t-87 -6q-34 -4 -73 -11t-79 -19q-74 -16 -152 -32t-148 -16q-56 0 -103 14t-81 48q-34 32 -20 63z" /> -<glyph unicode="‒" horiz-adv-x="1244" d="M42 735q14 31 62 58t124 50t166 40t188 26t190 9q94 0 173 -11t132 -36t72 -64t-9 -95q-24 0 -87 -3t-134 -7t-134 -8t-87 -6q-34 -4 -73 -11t-79 -19q-74 -16 -152 -32t-148 -16q-56 0 -103 14t-81 48q-34 32 -20 63z" /> -<glyph unicode="–" horiz-adv-x="1266" d="M36 538q2 10 44 24t110 30t155 32t180 28t185 20t170 8q102 0 172 -16t92 -50q2 -8 2 -24t-1 -32t-4 -31t-7 -21q-44 -4 -112 -9t-147 -10t-164 -11t-164 -10t-147 -8t-112 -6q-20 -2 -37 -3t-33 -1q-36 0 -67 6t-67 26h4q-10 4 -29 26t-23 32z" /> -<glyph unicode="—" horiz-adv-x="1706" d="M62 548q2 10 61 26t154 34t216 36t249 33t252 24t226 9q112 0 188 -13t98 -47q2 -10 3 -25t0 -32t-4 -31t-7 -22q-44 -4 -136 -10t-210 -15t-247 -18t-246 -16t-210 -13t-135 -8q-18 -2 -37 -3t-33 -1q-38 0 -68 7t-68 27l6 -2q-6 2 -14 10t-16 18t-14 19t-8 13z" /> -<glyph unicode="‘" horiz-adv-x="422" d="M70 1082v52t4 44q2 6 8 27t14 48t17 52t15 41q46 118 94 118q30 0 48 -46t18 -112q0 -48 -6 -100t-18 -101t-30 -89t-41 -61t-52 -20t-63 35q-6 24 -7 52t-1 60z" /> -<glyph unicode="’" horiz-adv-x="450" d="M104 1082v54t4 44q2 10 9 31t15 46t16 49t12 40q46 118 94 118q34 0 51 -44t17 -114t-14 -150t-41 -138t-66 -78t-87 30q-8 24 -9 52t-1 60z" /> -<glyph unicode="‚" horiz-adv-x="312" d="M50 -10q0 72 15 132t43 146q24 64 47 92t47 28q30 0 49 -46t19 -112q0 -70 -14 -151t-40 -140t-64 -81t-86 28l-12 20q-4 22 -4 43v41z" /> -<glyph unicode="“" horiz-adv-x="686" d="M84 1332v46t2 40q0 38 28 28t61 -38t61 -60t30 -36q2 -28 3 -73t1 -85q0 -58 -5 -107t-13 -57l-46 -40q-10 4 -24 15t-28 24t-25 25t-13 18v2q-10 26 -16 62t-10 77t-5 82t-1 77zM350 1046v422q54 26 89 20t57 -34t31 -74t9 -100q0 -52 -8 -108t-21 -107t-28 -89t-29 -52 q-6 2 -17 9t-22 16t-20 17t-13 12l4 -4q-6 14 -19 38t-13 34z" /> -<glyph unicode="”" horiz-adv-x="692" d="M108 1324v51t2 43q0 26 14 29t34 -8t43 -32t43 -42t33 -37t13 -18v2q2 -28 3 -71t1 -87q0 -58 -5 -106t-11 -54l-44 -46q-8 4 -23 16t-30 25t-28 26t-15 21v-2q-10 24 -15 58t-9 73t-5 80t-1 79zM374 1046v420q54 26 89 21t57 -34t31 -76t9 -103q0 -52 -8 -108t-21 -105 t-28 -86t-27 -51q-6 2 -17 9t-22 16t-21 17t-14 12l4 -4q-8 14 -20 38t-12 34z" /> -<glyph unicode="„" horiz-adv-x="550" d="M50 142v53t2 43q0 24 13 27t32 -7t42 -30t43 -40t34 -37t16 -21q2 -30 3 -79t1 -95q0 -50 -5 -91t-11 -49l4 2q-6 -6 -23 -24t-21 -26q-10 4 -25 15t-30 24t-28 25t-15 18l-2 2q-18 50 -24 133t-6 157zM316 -134v420q54 26 90 21t58 -33t31 -75t9 -101q0 -52 -9 -109 t-22 -107t-28 -87t-27 -51q-12 4 -35 23t-33 29l6 -10q-12 12 -14 18q-8 14 -17 35t-9 27z" /> -<glyph unicode="•" horiz-adv-x="804" d="M156 718q0 56 24 108t63 91t89 62t100 23q60 0 112 -35t86 -115q16 -38 16 -72q0 -54 -27 -106t-71 -93t-97 -66t-103 -25q-42 0 -79 19t-65 59h2q-28 38 -39 76t-11 74z" /> -<glyph unicode="…" horiz-adv-x="1100" d="M38 132q0 34 15 65t38 54t51 37t56 14q80 0 118 -92l-2 2q16 -36 5 -75t-36 -70t-61 -51t-68 -20q-28 0 -49 10t-39 38q-28 44 -28 88zM382 132q0 34 14 65t36 54t51 37t59 14q36 0 67 -22t53 -70q12 -36 0 -74t-37 -70t-60 -52t-67 -20q-56 0 -90 50q-14 22 -20 44 t-6 44zM724 132q0 34 14 65t37 54t52 37t57 14q36 0 68 -22t52 -70q12 -36 1 -74t-37 -69t-60 -51t-68 -20q-26 0 -47 10t-41 38q-28 44 -28 88z" /> -<glyph unicode=" " horiz-adv-x="498" /> -<glyph unicode="‹" horiz-adv-x="1160" d="M10 790q0 30 15 59t49 63q16 14 45 40t66 59t80 72t87 79l88 80t82 74t67 61t45 41q20 8 53 0t60 -27t35 -48t-22 -63l-502 -502q-12 -12 15 -41t67 -60t82 -60t60 -41q6 -6 14 -10l-4 2q20 -14 63 -44t98 -66t116 -76t116 -76t99 -65t64 -41q42 -54 42 -102 q0 -40 -23 -66t-65 -26q-36 0 -76 26h-2q-24 16 -47 31t-47 31q-170 110 -336 224t-316 248q-8 6 -15 12t-13 14q-52 44 -96 92t-44 106z" /> -<glyph unicode="›" horiz-adv-x="862" d="M42 1338q4 10 17 24t29 28t31 23t25 9q38 -28 75 -52t77 -52q78 -52 163 -111t156 -125t118 -139t47 -151q0 -92 -64 -170v2q-18 -24 -54 -67t-79 -95t-90 -108t-88 -104t-72 -84t-43 -50q-4 -6 -21 -21t-33 -31l-70 -72q-8 2 -22 14t-29 25t-27 25t-14 16l-2 2 q-22 44 -9 90t49 95t88 100t110 103q52 48 103 97t89 95t58 89t12 79q2 -10 -30 16t-80 64q-62 50 -137 112t-139 123t-106 114t-38 87z" /> -<glyph unicode=" " horiz-adv-x="623" /> -<glyph unicode="€" horiz-adv-x="1770" d="M48 694l2 -2q-22 28 10 54t92 48t136 39t146 29t119 18t55 6h354q22 -16 42 -48t2 -78q-58 -8 -132 -19t-152 -24t-157 -27t-147 -26h2q-70 -12 -129 -23t-99 -15q-56 -10 -83 3t-61 65zM176 1228v34q16 28 61 52t108 41t136 26t145 9q112 0 207 -30t135 -94 q-12 -16 -71 -34t-139 -33t-172 -25t-170 -10q-94 0 -159 14t-81 50zM186 412q0 142 66 315t170 351t232 350t254 316t234 246t170 142q110 64 200 64q84 0 144 -46t98 -112t56 -138t18 -126q0 -82 -31 -109t-89 31q-4 26 -25 72t-51 91t-63 81t-61 44q-62 16 -145 -25 t-176 -124t-190 -199t-189 -250t-174 -277t-143 -281t-97 -261t-36 -217q0 -80 36 -127t116 -47h21t27 4q132 18 246 45t222 61t215 75t221 87q36 12 64 5t46 -26t24 -48t-4 -59q-12 -36 -65 -73t-133 -73t-179 -66t-202 -54t-204 -37t-185 -13q-54 0 -100 5t-82 21l2 -2 q-138 54 -198 153t-60 231z" /> -<glyph unicode="™" horiz-adv-x="3928" d="M60 1230q14 30 81 60t171 58t236 55t275 50t289 43t279 33t243 21t182 8q62 0 99 -9t43 -33q4 -8 6 -19t6 -21q10 6 17 13t17 13q6 6 28 19t40 24t23 16t-21 -7q90 50 144 50q80 0 111 -64t31 -166q0 -62 -9 -134t-23 -146t-31 -144t-31 -128q-4 -18 -8 -34t-8 -30 q26 34 71 89t90 111t84 104t55 68q2 2 4 5t6 7l8 8q10 10 34 35t58 57q20 20 47 46t52 51l45 45l30 30q112 106 201 180t159 121t122 69t88 22q60 0 87 -41t27 -111q0 -56 -15 -130t-39 -161t-55 -182t-63 -191q-22 -64 -42 -127t-38 -121q-12 -32 -36 -106t-50 -157 t-49 -156t-31 -105q-2 -14 -10 -49t-22 -77t-34 -86t-45 -78t-57 -52t-68 -8q-8 4 -20 16t-20 22q-4 10 -8 31t0 29q2 6 9 29t16 50l17 51l10 30q50 158 99 300t91 262q34 98 68 198t68 206t67 220t65 244l-2 -2q2 6 3 7t-1 7q-54 4 -118 -31t-136 -99t-148 -150t-152 -183 t-150 -199t-142 -196q-60 -86 -116 -163t-105 -137t-89 -98t-68 -44q-14 -4 -36 1t-42 16t-34 23t-14 24v166q4 20 12 57t18 84t23 102t25 113q12 56 25 111t24 103t19 85t12 57q4 14 7 27t7 25q6 24 10 48t6 48q-114 -52 -215 -159t-191 -240t-167 -277t-141 -266 q-46 -88 -85 -160t-73 -119t-65 -63t-59 8q-48 20 -48 86q0 46 26 120t68 165t97 194t114 206t117 201t108 180q12 20 15 24t13 24q-20 4 -36 8t-36 8q-42 10 -87 18t-99 8q-28 0 -61 -2t-73 -12q-54 -14 -107 -64t-105 -123t-101 -164t-94 -188t-86 -197t-75 -188 q-36 -88 -67 -164t-60 -129t-57 -78t-58 -9q-10 6 -26 24t-20 32q-4 20 -4 60q0 54 15 114t36 121t46 118t47 103q14 30 24 54q12 30 36 82t52 114t58 130t58 128t50 109t34 73q-48 -4 -118 -21t-142 -35q-106 -26 -213 -50t-185 -24q-58 0 -101 21t-63 71zM2816 -80l6 -14 q-6 8 -6 14zM2822 -94l2 -2v2h-2z" /> -<glyph unicode="" horiz-adv-x="1050" d="M0 0v1050h1050v-1050h-1050z" /> -<glyph unicode="fi" horiz-adv-x="1344" d="M38 663q-4 25 2 41q14 2 36 11t45 18t42 17t25 12q8 2 38 12t65 22t63 23t32 15q22 18 62 96t90 178q38 80 83 170t95 178t105 168t115 140t125 96t133 36t136 -38t138 -126q22 -28 32 -66t0 -82q-32 -22 -61 -19t-53 16t-43 33t-29 36q-48 6 -88 6q-86 0 -144 -28 t-101 -76t-75 -113t-64 -139q-18 -40 -38 -84t-42 -86q-16 -28 -38 -70t-42 -81t-35 -67l-15 -28v-24q2 16 22 17t48 -3q44 -6 97 -14t104 -22t95 -36t68 -56l-60 -58q-50 4 -100 5t-88 1q-78 0 -134 -11t-102 -41t-85 -84t-81 -140q-18 -40 -50 -104l-62 -124t-54 -105 t-26 -47l-44 -46q-8 4 -21 14t-27 21t-25 23t-17 20q-4 6 -7 19t-3 28t3 28t7 19q24 54 44 102t39 94t40 93t45 103h-166q-10 0 -21 17t-20 41t-13 49zM674 -6q68 218 130 374t115 256t93 147t64 47q30 0 36 -64t-23 -181t-95 -282t-180 -365q-34 -14 -77 -6t-61 48z M1081 1121q-1 17 1 36t5 36t7 25q28 10 46 14t32 4q58 0 82 -32t24 -76q0 -46 -27 -86t-67 -40q-28 0 -53 20t-47 72v4q-2 6 -3 23z" /> -<glyph unicode="fl" horiz-adv-x="1622" d="M38 663q-4 25 2 41q14 2 36 11t45 18t42 17t25 12q8 2 38 12t65 22t63 23t32 15q22 18 62 96t90 178q38 80 83 170t95 178t105 168t115 140t125 96t133 36t136 -38t138 -126q22 -28 32 -66t0 -82q-32 -22 -61 -19t-53 16t-43 33t-29 36q-48 6 -88 6q-86 0 -144 -28 t-101 -76t-75 -113t-64 -139q-18 -40 -38 -84t-42 -86q-16 -28 -38 -70t-42 -81t-35 -67l-15 -28v-24q2 16 22 17t48 -3q44 -6 97 -14t104 -22t95 -36t68 -56l-60 -58q-50 4 -100 5t-88 1q-78 0 -134 -11t-102 -41t-85 -84t-81 -140q-18 -40 -50 -104l-62 -124t-54 -105 t-26 -47l-44 -46q-8 4 -21 14t-27 21t-25 23t-17 20q-4 6 -7 19t-3 28t3 28t7 19q24 54 44 102t39 94t40 93t45 103h-166q-10 0 -21 17t-20 41t-13 49zM852 270q0 74 23 159t58 168t76 161t75 140q16 30 31 54t25 46q4 12 26 57t50 99q18 34 35 69t32 65l26 52t13 32 q4 4 7 13t9 21h-2q12 30 29 72t39 80t48 65t56 27q28 0 54 -26t48 -88q-8 -22 -38 -85t-76 -149q-42 -84 -93 -187t-103 -212t-101 -217t-87 -203t-61 -171t-23 -118v-24q18 -10 58 -10q32 0 76 7t88 17q42 8 88 14t98 2q18 -40 -17 -75t-95 -61t-132 -41t-128 -15 q-32 0 -59 4t-41 18l4 -2q-64 46 -90 107t-26 135z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/nothingyoucoulddobold-webfont.ttf b/app/assets/fonts/nothingyoucoulddobold-webfont.ttf deleted file mode 100755 index c250206c..00000000 Binary files a/app/assets/fonts/nothingyoucoulddobold-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/nothingyoucoulddobold-webfont.woff b/app/assets/fonts/nothingyoucoulddobold-webfont.woff deleted file mode 100755 index 04a5f5be..00000000 Binary files a/app/assets/fonts/nothingyoucoulddobold-webfont.woff and /dev/null differ diff --git a/app/assets/fonts/oli.dev.svg b/app/assets/fonts/oli.dev.svg deleted file mode 100644 index ad5e2cf2..00000000 --- a/app/assets/fonts/oli.dev.svg +++ /dev/null @@ -1,607 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata> -This is a custom SVG font generated by IcoMoon. -<iconset grid="16"></iconset> -</metadata> -<defs> -<font id="oli" horiz-adv-x="512" > -<font-face units-per-em="512" ascent="480" descent="-32" /> -<missing-glyph horiz-adv-x="512" /> -<glyph class="hidden" unicode="" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" /> -<glyph unicode="g" d="M 256.056,180.472c-3.792,0-7.504-0.176-11.2-0.392c-2.488,7.024-3.936,14.712-3.936,23.096c0,8.264, 1.456,22.824, 3.824,22.856 - c 1.264,0, 2.536-0.12, 3.752-0.12c 62.84,0, 113.824,51.008, 113.824,113.912c0,15.016-6.84,34.448-14.896,42.44l 39.088,21.856L 386.512,480 L 305.032,434.536 - c-18.104,12.048-36.504,19.128-59.872,19.128c-62.84,0-112.168-50.912-112.168-113.816c0-35.36, 16.992-66.992, 42.296-87.848 - c-7.080-14.8-10.712-31.24-10.712-48.736c0-15.68, 3.504-30.6, 9.256-44.192c-33.104-19.376-54.472-50.104-54.472-84.792 - C 119.368,15.552, 180.584-32, 256.024-32c 75.464,0, 136.608,47.552, 136.608,106.28C 392.632,132.912, 331.512,180.472, 256.056,180.472z - M 248.488,393c 29.368,0, 53.128-23.792, 53.128-53.096c0-29.392-23.76-53.16-53.128-53.16c-29.36,0-53.16,23.768-53.16,53.16 - C 195.328,369.208, 219.128,393, 248.488,393z M 256.056,33.384c-33.48,0-60.728,18.288-60.728,40.896c0,22.52, 27.248,40.832, 60.728,40.832 - c 33.536,0, 60.72-18.312, 60.72-40.832C 316.776,51.672, 289.592,33.384, 256.056,33.384z" data-tags="github" /> -<glyph unicode="t" d="M 512,382.792c-18.832-8.352-39.080-14-60.328-16.536c 21.688,13, 38.344,33.584, 46.184,58.12c-20.296-12.040-42.784-20.784-66.712-25.496 - c-19.16,20.416-46.456,33.168-76.664,33.168c-58.016,0-105.048-47.032-105.048-105.040c0-8.232, 0.92-16.248, 2.72-23.944 - c-87.304,4.384-164.704,46.2-216.504,109.76c-9.048-15.512-14.224-33.56-14.224-52.816c0-36.448, 18.544-68.592, 46.736-87.432 - c-17.216,0.544-33.424,5.272-47.576,13.144c-0.016-0.448-0.016-0.88-0.016-1.328c0-50.888, 36.208-93.344, 84.264-103 - c-8.816-2.4-18.096-3.68-27.672-3.68c-6.776,0-13.352,0.656-19.768,1.88c 13.368-41.736, 52.16-72.104, 98.128-72.944 - C 119.56,78.472, 74.272,61.68, 25.056,61.68c-8.48,0-16.832,0.496-25.056,1.472c 46.488-29.808, 101.704-47.192, 161.024-47.192 - c 193.208,0, 298.864,160.064, 298.864,298.872c0,4.544-0.104,9.080-0.304,13.584C 480.112,343.224, 497.92,361.728, 512,382.792z" data-tags="twitter" /> -<glyph unicode="c" d="M 381.448,105.816c-7.576-8.056-15.856-15.264-24.688-21.608c 8.264-29.048, 16.248-58.152, 23.712-87.416 - c-28.24-9.6-56.488-19.184-84.752-28.792c-11.92,27.76-23.312,55.696-34.456,83.76c-10.864-0.344-21.824,0.344-32.736,2.104 - c-14.712-26.36-29.768-52.56-45.2-78.52c-26.752,13.168-53.512,26.376-80.248,39.544c 11.176,28.064, 22.776,55.952, 34.736,83.672 - c-8.056,7.568-15.256,15.856-21.608,24.672c-29.040-8.248-58.16-16.232-87.424-23.672C 19.192,127.776, 9.592,156.016,0,184.272 - c 27.744,11.928, 55.696,23.328, 83.76,34.472c-0.344,10.856, 0.336,21.832, 2.104,32.736c-26.376,14.696-52.544,29.744-78.504,45.168 - c 13.176,26.768, 26.36,53.512, 39.536,80.264c 28.056-11.184, 55.936-22.784, 83.672-34.736c 7.584,8.056, 15.856,15.256, 24.68,21.592 - c-8.256,29.032-16.24,58.16-23.688,87.424c 28.232,9.616, 56.48,19.2, 84.72,28.808c 11.912-27.752, 23.328-55.696, 34.464-83.76 - c 10.864,0.344, 21.832-0.344, 32.744-2.096c 14.688,26.36, 29.744,52.552, 45.184,78.512c 26.744-13.176, 53.504-26.368, 80.256-39.552 - c-11.176-28.048-22.784-55.936-34.736-83.672c 8.056-7.56, 15.256-15.832, 21.592-24.672c 29.048,8.256, 58.168,16.24, 87.432,23.688 - C 492.808,320.2, 502.4,291.944, 512,263.744c-27.744-11.944-55.696-23.328-83.776-34.48c 0.328-10.864-0.336-21.832-2.112-32.728 - c 26.368-14.704, 52.576-29.752, 78.536-45.192c-13.168-26.752-26.368-53.504-39.536-80.264C 437.040,82.264, 409.168,93.848, 381.448,105.816z - M 293.112,299.304c-41.592,20.496-91.912,3.384-112.416-38.192c-20.496-41.6-3.4-91.936, 38.184-112.432c 41.6-20.48, 91.92-3.392, 112.416,38.192 - C 351.8,228.464, 334.712,278.816, 293.112,299.304z" data-tags="cog" /> -<glyph unicode="w" d="M 176.040,452.232c 0.088,0.088, 0.24,0.136, 0.384,0.192C 175.2,452.32, 173.968,452.224, 172.808,452.168 - c 1.52-0.136, 2.96-0.536, 4.472-0.424C 177.144,451.832, 175.896,452.144, 176.040,452.232zM 182.568,453.12c-0.112-0.016-0.648-0.088-1.416-0.176C 181.768,452.976, 182.256,453.024, 182.568,453.12zM 175.52,430.92c-0.248,0.024-0.496,0.064-0.632,0.048C 175.144,430.88, 175.32,430.88, 175.52,430.92zM 78.144,266.264c 0.024-0.024, 0.024,0, 0.024,0.080C 78.168,266.328, 78.192,266.304, 78.144,266.264zM 265.48,453.744c-0.72-0.032-1.304-0.048-1.576-0.056C 264.712,453.592, 264.8,453.592, 265.48,453.744zM 234.76,454.176c 0.216-0.072, 1.168-0.032, 2.448,0.040C 236.232,454.216, 235.408,454.216, 234.76,454.176zM 243.96,453.656c 0.384,0.024, 2.584,0.336, 4.808,0.632c-1.184-0.112-2.424-0.16-3.68-0.168 - C 244.344,453.872, 243.736,453.656, 243.96,453.656zM 124.744,432.056c0-0.192-0.704-0.56-1.192-0.848C 124.24,431.384, 124.688,431.648, 124.744,432.056zM 101.84,431.24c-0.512-0.376, 3.016,0.184, 4.088,0.352C 103.88,431.672, 102.328,431.592, 101.84,431.24zM 160.456,434.76c 0.632,0.512, 1.392,0.768, 2.24,0.792C 162,435.648, 161.24,435.416, 160.456,434.76zM 105.928,431.592c 0.088,0, 0.168,0, 0.24,0c 0.040,0.032, 0.072,0.032, 0.088,0.056 - C 106.272,431.664, 106.136,431.64, 105.928,431.592zM 153.856,441.304c 0.032,0, 0.064,0, 0.112-0.008C 154.128,441.36, 154.048,441.36, 153.856,441.304zM 27.096,316.704c 3.808,6.64, 8.608,9.704, 15.168,13.248c 4.44,2.344, 7.456-4.24, 10.688-2.832 - c-0.464,1.104, 1,2.168, 2.168,4c-0.736-0.304-0.584-0.344-1.2,0.096c 1.88,0.632, 3.616,0.264, 5.312,0.632 - c-0.584-1.072, 10.544-2.832, 10.608-3.064c 0.496-1.608-7.088-20.776-3.080-21.296c 4.472-0.6, 8.008,12.704, 8.328,15.728 - c 1.28,11.84, 10.216,16.024, 20.12,20.352c-0.032,0.080-0.096,0.152-0.144,0.224c 2.472,1.624, 5.496,2.048, 7.84,3.856 - c-1.808,2.048, 0.936,1.416, 1.976,2.832c-0.464,0.12-0.896,0.24-0.88,1.056c 1.376,0.336, 2.296,1.144, 2.76,2.376 - c-0.208,0-0.512,0.024-0.728,0.024c-0.296,0.84, 2.752,5.912, 3.48,6.672c-0.16-0.384-1.312-5.336-1.52-5.312 - c 3.496-0.088, 4.136,5.696, 5.864,6.752c-0.552,1.368, 9.24,4.928, 11.496,5.504c-0.56,0.68-2.832,0.080-3.616,0.080 - c 3.952,1.72, 9.296,1.488, 12.928,2.816c-5.856-0.144, 4.792,8.68, 8.312,7.92c 3.344-0.704, 10.296,4.064, 14.496,4.168 - c-0.832-1.080-0.512-1.512, 0.944-1.296c-5.576-0.256-9.976-7.32-5.768-5.128c 2.544,1.352, 13.824,3.080, 14.896,5.232 - c 0.608,1.2-12.528,0.384-6.688,7.576c-0.536,0-1.552,0.256-2.512,0.256c 1.68,1.048, 4.784,0.56, 5.88,2.536 - c 1.328,2.304-15.096-1.432-15.904-1.496c 6.784,5.376, 39.368,4.264, 36.16,15.184c-0.96-0.28-11.624-3.040-11.808-1.76 - c 2.448,0.72, 8.464,1.264, 9.768,2.496c 0.784,0.936-8.472,0.136-6.648,3.184l 0.136,0.168c-2.192-0.032-2.96,0.768-3.856,1.328 - c 5.568,1.76-1.392,11.056-4.624,6.736c 0.432-0.52, 0.92-0.864, 1.488-1.168c-1.44,0.472-2.536,0.784-0.896,3.712 - c-2.696-4.92-13.544-1.784-17.184-0.048c-12.632,6.040-8.8-2.328-18.272-4.464c 0.176-4.528, 6.552-4.544-2.192-8.008 - c-7.040-2.808-2.88-4.336-6.488-8.32c-3.16-0.072-4.392,0.248-4.68,0.792c 0.552-0.232, 1.144-0.376, 1.736-0.336 - c 0.768,0.96-0.84,0.984-1.808,0.776c 0.304,1.344, 3.928,3.576, 1.448,5.344c-7.408-0.256-6.488,5.144-15.68,4.736 - c 2.512,2.568, 2.936,4.104-0.912,3.456c 4.96,3.328, 14.512,6.256, 18.496,9.848c-0.344,0.296-0.704,0.496-1.104,0.632 - c 4.544-0.4, 12.2,0.416, 15.216,3.032c-2.16,0.208-4.832-0.096-4.536,1.032c 2.104-0.656, 4.696-0.648, 7.432-0.288 - c-2.44-0.992-5.704-2.832-6.88-3.832c 0.608,0.064, 2.176,0.264, 3.208,0.144c-0.616-0.416-1.312-0.872-0.392-0.832 - c 3.584,0.176, 9.56,0.8, 13.136,1.808c-0.176,0.472-1.808,0.192-2.496,0.656c-0.232,0.152, 0.312,0.448, 0.224,0.712 - c-0.352,0.896-3.848,1.384-4.672,1.024c 0.048,0.272,0,0.44, 0.032,0.68c 0.84,0.168, 1.672,0.416, 2.504,0.64 - c-0.336-0.272-0.096-0.544, 0.824-0.544c-0.128,0.32, 0.336,0.776-0.712,0.576c 5,1.4, 9.784,3.704, 12.176,5.768 - c-1.24-0.056-2.704,0.528-3.968,0.656c 1.776,0.048, 3.352,0.104, 4.208,0.088c-1.192-0.904, 4.624,0.608, 6.192-0.256 - c-0.064,0-0.112-0.016-0.176-0.016c 0.496-0.072, 0.944-0.272, 1.376-0.696c-0.608-0.168-1.256-0.32-1.888-0.496 - c 0.144,0.12, 3.776-0.024, 4.608-0.432c-1.528,0.168-2.896-0.168-4.16-1c-0.096-0.072, 4.888-1.504, 4.96,0.528 - c 3.104-2.232-6.168-3.904-3.616-4.784c-3.248-1.424-9.44-0.448-11.704-3.512c-0.416-0.536, 10.176,0.632, 11.184,0.144 - c 2.448-1.24, 7.208-4.104, 11.2-3.232c 3.192,0.728-2.832,3.6-2.808,3.552c 5.416,0.888, 5.256-1.784, 6.696,2.864 - c-1.888-0.24-2.432,1.552-3.776,1.416c 0.312,0.896, 0.768,0.368, 1.080,0.976c 2.496-0.368, 7.608-1.8, 8.064,1.392 - c 0.016,0.192-6.832,2.52-7.304,2.68c 0.56,0.44, 0.944,0.448, 1.76,0.696c-0.608,0.288-1.28,0.352-1.952,0.208 - c 0.496,0.32, 1.080,0.312, 1.728,0.416c-0.496,0.512-1.104,0.696-1.776,0.544c 0.048,0.136, 0.112,0.272, 0.176,0.408 - c-5.656,0.224-10.624,2-16.616,2.056c 0.312,0, 0.968,1.192, 0.92,1.376c-0.848,2.376-14.912-2.368-11.6-0.888 - c-1.576,0, 3.472,1.32, 4.6,1.536c-2.976,0.168-5.64,0.16-8.632-0.44c 1.056,0.352, 2.064,0.544, 3.040,1.048 - c-6.272-0.248-8.584-0.216-13.152-3.424c 1.504-0.048, 2.888,0.312, 4.208,1.112c-0.304-0.024-0.568-0.024-0.856-0.048 - c 1.6,0.776, 4.368,0.552, 5.936,1.048c-0.952-0.496-6.616-1.136-5.744-2.872c0,0, 3.896-0.096, 4.368-0.272 - c-1.24-1.048-2.784-1.176-4.576-0.432c-1.592-1.272, 11.168-1.416, 11.24-1.416c-1.56-0.416-7.824-6.040-9.952-4.016 - c-0.32,1.336, 0.456,1.976, 2.248,1.896c 1.48,1.208-6.088-0.536-5.76-0.512c 1.888,1.52-1.552,0.88, 1.288,1.696 - c-0.664,0.28-2.608-0.12-2.792,0.328c 0.92,0.28, 1.84,0.568, 2.744,0.856c 2.048,1.552-6.632,1.368-9.040-0.416 - c-0.664-0.472, 3.16-0.816, 2.472-1.352c-0.616-0.36-1.232-0.696-1.872-1.032c 0.656,0.16, 1.16,0.24, 1.872,0.416 - c-0.928-1.376-4.504-0.888-6.744-2.648c-1.384-0.216-1.152,0.040-0.616,0.376c-3.16-0.856-11.912,0.192-17.376,0.392 - c-1.992-1.672-5.616-1.96-6.824-1.544c-6.984,2.368-12.52-2.48-17.128-6.592c-14.008-12.464-26.64-26.488-37.632-41.64 - C 22.24,350.88, 6.912,315.112,0,277.648c 2.064,0.040, 2.776-8.216, 5.352-8.912c 2.152-0.552, 4.384,5.648, 5.648,0.832 - c 1.744-0.424, 0.896-8.744, 1.608-10.432c 1.752-4.448, 5.112-6.832, 8.536-7.928c-1.064-3.792-0.456-6.936-0.192-10.752 - c 0.28-4.16-3.176-8.4-2.192-12.328c 0.32-0.144, 0.656-0.224, 0.976-0.36c-0.040,0.496, 0.272,1.344, 0.72,1.928 - c 3.888-1.328, 1.352-21.264, 6.568-23.376c 2.64-1.128, 3.088,11.672, 8.528,9.792c 2.712-1.008, 0.504-7.832, 0.736-9.744 - c 0.040-0.072, 4.376,3.928, 4.736,4.504c-0.896,3.232-1.008,12.040-6.808,9.52c-12.248-5.256-6.984,15.968-4.528,22.32 - c 2.832,7.272, 13.312,20.672-0.824,21.52c-11.76,0.744, 1.8,11.648, 3.264,14.272c 1.112,1.264, 2.104,2.368, 3.176,4.656 - c 1.624,3.408, 4.552,5.952, 6.2,9.368c-13.28,2.4-13.784-14.768-26.048-12.096c-8.944,1.864, 10.448,33.992, 11.456,36.32 - C 26.976,316.752, 27.032,316.72, 27.096,316.704z M 175.52,430.92c-0.2-0.040-0.384-0.040-0.632,0.048 - C 175.024,430.984, 175.272,430.944, 175.52,430.92zM 172.136,384.896c 0.16,0.336-0.296,0.512-0.36,0.872c-1.552-0.64-2.896-1.6-4-2.856 - c-0.536-1.080, 3.88-0.872, 4.648,0.68C 169.856,383.656, 171.68,383.992, 172.136,384.896zM 182.304,391.32c-0.496-0.128-1.016-0.2-1.504-0.304c0,0, 0.136,0.304, 0.16,0.4 - c-0.672,0.024-1.32,0.024-2,0.024c 0.096,0.576, 0.456,0.936, 1.016,1.080c-1.192,0.592-2.36,0.512-3.544-0.216 - c 0.112,0.248, 6.24,5.184, 4.688,5.208c-5.008,0-8.64-7.032-13.336-8.456c0-0.248, 0.36-0.408, 0.672-0.408 - c-0.56-1.232-2.424-0.872-2.984-2.032c-0.024-0.104, 11.816-0.968, 13.16-0.976c-0.744-0.288-1.392-0.744-1.88-1.344 - c-0.248-0.56, 5.072,2.24, 5.032,2.208c 2.264-2.352, 2.016-5.752, 4.376,0.264c-0.848-0.312-0.56-0.496-1.728-0.488 - c 0.672,1.744, 0.408,0.84, 1.368,2.56c-0.448,0.024-1.080-0.056-1.368-0.208c 0.496,1.208, 0.896,1.928, 1.208,2.632 - C 184.952,391.064, 183.472,391.080, 182.304,391.32zM 129.032,420.6c 1.32,0.152, 4.152,1.152, 5.368,1.712c-1.704,0.464-3.208-0.4-4.784-1.112 - C 129.432,421.016, 129.224,420.824, 129.032,420.6zM 111.576,445.184c-1.48,0.168-2.688-0.384-3.648-1.576c 1.168-0.184, 2.040,0.168, 2.592,1 - C 112.064,444.728, 112.408,444.92, 111.576,445.184zM 112.44,444.128c 0.688-0.104, 1.232,0.048, 1.824,0.384c-0.664-0.040-1.32-0.072-1.984-0.104 - C 111.88,444.184, 112.168,444.112, 112.44,444.128zM 116.336,445.84c-0.56,0.344-1.176,0.344-1.8-0.008C 115.048,445.352, 115.648,445.352, 116.336,445.84zM 164.632,394.448c 1.544-1.176, 4.448-3.304, 6.488-1.832C 169.368,393.544, 168.176,394.96, 164.632,394.448zM 121.88,446.024c-2.6-0.144-2.16-0.040, 1.336,0.328c-0.008,0.168-0.136,0.256-0.312,0.344 - c 0.288,0.032, 0.568,0.072, 0.88,0.112c-1.736-0.024-4.864,0.176-5.816-0.36c 0.824,0.256, 1.648,0.296, 2.472,0.112 - c-2.064-0.456-4.32-1.432-2.848-1.352C 118.848,445.256, 121.12,445.552, 121.88,446.024zM 91.632,431.448c-0.552-0.456-1.136-0.888-1.704-1.344c 0.696,0.152, 1.792,0.168, 2.304,0.368 - C 92.392,431.224, 92.424,431.456, 91.632,431.448zM 124.936,446.936c-0.384-0.056-0.768-0.096-1.152-0.136C 124.4,446.816, 124.832,446.84, 124.936,446.936zM 94.712,431.952c 0.816-0.776, 18.496-0.176, 21.48,1.2c0,0-0.416,0.8-0.576,0.68 - c 0.952,0.696, 3.096,0.464, 4.208,0.752c-2.256,1.784-4.048-0.184-2.504,3.024c 0.304,0.68, 3.832,2.864, 4.064,2.776 - c-4.184,1.472-7.32-3.352-10.408-3.52c 0.56,0.024-4.704,1.856-7.936,1.032c 0.192,0.84-0.080,1.144-0.568,1.12 - c 0.104,0.184, 0.16,0.44, 0.064,0.776c-0.496-0.376-1.008-0.712-1.504-1.080c 0.16-0.024, 0.256-0.016, 0.384-0.024 - c-2.048-0.968-5.28-3.728-6.088-4.36c 1.008,0.144, 3,0.488, 4.208-0.080c-3.184-0.288-4.592-0.152-7.176-2.232 - C 93.288,432.080, 94.52,432.168, 94.712,431.952zM 108.424,441.68c 0.28,0.16, 0.808,0.344, 1.2,0.376c 0.008-0.064-0.016-0.112-0.016-0.16 - c 4.616,1.040, 11.456-1, 15.688,1.52c 0.504,0.312-5.504-0.136-2.592,1.336c-0.552-0.032-5.984-1.008-3.44-1.072 - c-0.368-0.312-0.808-0.472-1.32-0.464c 0.168-0.032, 0.416-0.040, 1.056-0.024c-3.176-1.24-6.264,0.84-9.232,0.512 - c-0.208-0.128-0.144-0.192, 0.048-0.224c-0.592,0-1.2-0.12-1.784-0.344c 0.104-0.056, 0.24-0.080, 0.376-0.096 - c-0.76,0.016-1.24,0.008-1.848-0.432c 0.144-0.032, 0.296-0.056, 0.44-0.072c-0.88,0.104-1.576-0.288-2.16-1.16 - C 106.032,441.328, 107.24,441.416, 108.424,441.68zM 109.608,441.896c-0.776-0.168-1.52-0.424-2.168-0.816C 108.944,440.688, 109.632,440.976, 109.608,441.896zM 80.368,312.016c-0.328-0.432-0.432-1.336-0.040-1.232C 80.352,311.2, 80.352,311.608, 80.368,312.016zM 195.152,165.008c-5.344,1.080-8.4,4.312-13.504,5.776c-5.072,1.416-10.64-0.224-15.024-0.648 - c-0.96,4.016-2.264,3.856-5.792,5.344c-9.36,3.88-4.96-4.72-9.744-5.168c-4.832-0.56-10.248,5.68-6.456,10.664 - c 2.496,3.296-6.552,16.344-11.896,15.944c-4.608-0.12-16.712,0.936-19.584,5.144c-3.6,5.368-16.616,6.76-17.76,12.688 - c 0.432-0.248, 1.36-0.048, 1.768,0.336c-3.56,0-8.696-3.464-11.376-2.496c-1.912,0.696-7.504-0.048-8.832,1.488 - c-1.824,2.064-5.6,4.76-8.672,4.64c 0.296-1.608, 2.024-0.872, 2.8-2.472c-8.64-0.512-2.312-9.272-3.96-9.384 - c-3.824-0.224-2.8,7.968-2.808,9.704c 1.096,0.848, 1.24,1.704, 0.464,2.528c-1.576,2.176-2.848-1.52-4.048-2.040 - c-5.312-2.36-14.032-7.168-12.688-14.28c-6.656-2.72,0-11.344, 1.12-16.464c-0.616-1.184-0.176-2, 1.312-2.472 - c 0.080-5.392-7.184-11.144-7.296-16.44c-0.168-6.192-1.816-6.984, 3.856-10.064c 0.072-3.752-4.040-5.48-2.96-9.72 - c 1.136-4.448, 5.040-4.672, 7.024-7.344c 3.904-5.752, 8.904-11.72, 13.824-17.024c 5.832-6.28, 7.336-14.48, 16.928-16.144 - c 7.472-1.032, 15.832-5.704, 18.824-12.64c 2.728-6.336, 3.696-12.936, 5.968-19.408c 1.080-6.824, 0.464-18.768, 4.64-24.224 - c 3.872-9.504, 4.512-15.448, 4.544-25.016c 0.024-4.936, 2.8-5.456, 4.424-8.952c 1.592-3.416-1.064-6.424, 4.080-9.416 - c 0.176,1.152, 0.768,1.712, 1.824,1.736c 4.528-9.416, 22.496-14.464, 32.16-18.352c 0.744,3.8-14.040,6.264-6.536,10.832 - c 4.536,2.136, 0.904,8.080-0.184,10.504c 0.832,0.224, 4.8-1.104, 3.624,1.488c 0.768-1.64-10.936,3.656-6.288,4.912 - c 2.504,0.648, 8.648-1.28, 6.912,2.808c 0.080,2.096-3.928,6.4-0.136,7.344c 3.216,0.792, 8.648,1.528, 10.216,5.032 - c 4.432,9.88-4.96,7.144-7.496,13.696c 0.536-1.392, 13.808,0.632, 14.616,4.92c 1.232,6.424, 3.608,11.984, 4.472,18.32 - c0-0.048, 0.016-0.072, 0.016-0.112c-0.016,2.448, 0.744,4.6, 2.36,6.44c-0.96,2.816-1.856,5.616-2.696,8.448 - c-0.56,3.232, 3.864,7.928, 6.24,9.432c 8.624,5.416, 10.112,8.96, 12.6,18.8c 0.832,5.752-5.080,18.832-3.056,22.68 - C 195.664,141.456, 206.64,162.56, 195.152,165.008zM 80.456,283.608c 1.816-0.128, 2.824,0.64, 3,2.28C 83.048,285.464, 78.704,284.080, 80.456,283.608zM 197.44,438.232c 0.16,0.080, 0.224,0.136, 0.36,0.184C 197.616,438.408, 197.488,438.376, 197.44,438.232zM 292.688,359.592c 0.072,0.008, 0.16,0.008, 0.224,0.024c-3.616-4.808-7.856-9.072-11.408-13.992 - c-2.432-3.344-1.552-7.744-2.792-11.536c-1.12-3.576-5.168-6.968-8.576-8.216c-6.168-2.28-8.616-9.272-11.176-14.84 - c-2.064-4.52-3.728-8.76-6.168-13.072c-3.208-5.632, 1.096-14.624, 0.896-20.76c-0.168-4.344-1.776-9.36-4.112-13.056 - c-2.272-3.56, 0.648-7.872, 0.576-12.568c-0.136-0.024-0.24-0.024-0.376-0.024c 2.352-3.776, 5.248-7.176, 8.232-10.44 - c 5.32-5.856, 6.472-13.744, 12.128-19.424c 4.288-4.312, 9.344-11.048, 16.168-8.688c 3.144,1.056, 5.656,3.008, 9.12,3.072 - c 2.872,0.096, 5.12-2.424, 7.928-2.376c 6.616,0.176, 13.216,9.408, 21.256,9.584c 5.856,0.176, 5.344-9.832, 10.424-9.704 - c 16.464,0.32, 14.488-11.384, 10.304-22.744c-2.672-7.296, 4.536-14.192, 8.6-19.336s 4.536-12.864, 6.216-19.112 - c 1.544-5.832, 4.4-15.024, 2.968-21.088c-1.44-6.016-6.472-10.328-7.616-16.544c-1.592-8.688, 1.736-17.264, 5.592-24.856 - c 3.704-7.32, 3.904-10.368, 4.808-18.392c 1.88-17.352, 15.2-29.856, 15-46.48c 1.728,1.008, 7.096-2.336, 11.792,0.112 - c 4.936,2.608, 9.2,1.392, 14.256,1.952c 0.384,2.024, 9.816,5.344, 11.696,7.928c 4.536,6.152, 7.184,13.2, 12.112,18.992 - c 5.344,6.288-0.704,10.912, 5.608,16.128c 5.928,4.936, 7.816,2.984, 8.168,12.488c 0.136,4.088-7.656,14.128, 0.768,15.792 - c 0.968,6.016, 6.96,8.592, 11.536,11.432c 13.144,8.080, 3.008,19.528, 8.312,30.808c 1.928,4.16-4.336,8.96-4.288,13.472 - c 0.064,4.336-0.968,8.56-0.944,12.888c 0.048,4.288, 3.616,6.496, 4.496,10.472c 3.296,15, 16.168,19.128, 24.12,30.712 - c 6.864,10.016, 20.384,33.64, 15.264,45.816c-4.648-1.576-9.272-4.136-14.232-5.208c-8.76-1.568-12.128-4.088-14.544,6.464 - c-1.688,7.352-14.328,12.392-16.040,20.208c-1.272,5.896-2.736,7.992-6.624,12.312c-3.608,4.056-2.312,11.016-5.2,15.984 - c-2.512,4.312-3.104,8.832-5.416,13.328c-3.464,6.624-10.6,15.568-11,23.016c 2.336-2.496, 4.864-9.256, 7.608-9.696 - c 1.688,7.24, 1.904,9.104-0.92,16.112c-4.76-1.304-8.936,1.696-13.512,0.024c-6.168-2.28-10.96-1.496-17.136,0.696 - c-4.384,1.568-21.984,11.816-21.736-0.080c 0.264-13.792-16.208,4.096-20.488,5.504c-4.552,1.464-12.184-1.12-12.128,6.76 - c0,4.472, 1.688,7.88, 1.976,11.888c-1.296-1.264-2.512-1.176-3.608,0.256c-2,3.112-4.808-0.952-7.032-1.016 - c-4.624-0.168-8.808-0.040-13.336-0.216c-6.848-0.232-14.104-3.872-19.944-7.168M 482.792,106.176c 1.256,2.288, 2.448,4.6, 3.656,6.96C 484.608,111.928, 483.168,110.16, 482.792,106.176zM 242.44,440.376c 0.624,1.952, 4.472-3.136, 5.52,0c-1.040,0.584-2.136,1.024-3.256,1.336 - c 2,0.040, 5.232-1.472, 7.008,0.56c-0.336,0.072-0.632,0.24-0.536,0.464c 1.344,0.080, 2.872,0.376, 3.48,0.872 - c-0.96-0.136-1.824,0.040-2.624,0.528c 0.36,1.024, 2.136-0.232, 2.648,1.088c 0.536,1.416-2.808,1.208-2.648,1.592 - c 0.72,1.704, 6.088-0.696, 6.784,1.032c-0.848,0.448-1.752,0.72-2.72,0.832c 0.456,0.024, 0.992,0.112, 1.368,0.192 - c-1.568,0.4-3.144,0.496-4.736,0.312c 1.864,0.976, 12.016,3.232, 12.76,4.544c 2.832,0.136, 8.152,0.48, 8.912,1.696 - C 274.632,455.848, 249.464,452.8, 248,452.584c 0.344,0.264, 5.52,1.92, 5.64,2.080c 0.088,0.16-0.992,0.080-2.432-0.088 - c 1.784,0.304, 3.28,0.816, 4.224,1.6c-13.32,0.296-27.688,1.056-40.688-1.936c 0.136-0.12, 0.496-0.12, 0.72-0.216 - c-0.672,0.008-1.352-0.112-1.976-0.344c 0.624-0.456, 1.344-0.656, 2.136-0.616c-1.080-0.072-6.288,0.976-6.912-0.024 - c-0.12-0.168, 0.040-0.264, 0.088-0.416c-1.032,0.392-2.472,0.624-2.96-0.272c-1.928-0.136-15-0.664-16.392-3.376 - c 0.784-0.312, 1.568-0.4, 2.424-0.224c-1.416-2.688-7.368-0.336-8.472-2.72c-0.424-0.784, 5.352-0.36, 5.88-0.336 - c-1.168-1.312-4.376,0.136-5.344-1.32c 0.816,0.16, 1.6,0.064, 2.336-0.24c-0.216-0.208-0.472-0.24-0.832-0.384 - c 0.832-0.456, 1.616-0.552, 2.472-0.344c-0.088,0.016-0.224,0.104-0.264,0.16c 2.512,0.68, 11.968,0.68, 10.232-3.808 - c 1.192-0.28, 1.128-0.744-0.088-1.336c 1.032,0.072, 3.88-1.536, 4.264-1.616c-0.816-1.248-2.496,0.248-3.68-0.024 - c-0.072-0.736, 2.888-0.864, 4.152-1.152c-1.344-1.552-4.76-2.008-5.408-4.096c 0.264,0.152, 0.552,0.112, 0.808-0.016 - c-1.64-2.24, 1.208-2.592, 1.952-3.496c-3.616-1.92, 6.264-6.416, 7.656-6.52c 2.088-0.168, 6.912,7.936, 10.936,8.704 - c-0.072-0.216-0.136-0.424-0.176-0.64c 4.312-0.128, 6.552,2.36, 10.352,3.432c 5.832-0.072, 12.016,0.936, 17.56,2.816 - c-1.376,0.248-7.256,0.16-6.944,1.12c 1.864,0.2, 0.832,0.2, 1.152,1.208c 0.848-0.28, 7.208-2.624, 7.608-1.232 - C 248.656,438.976, 243.4,439.84, 242.44,440.376z M 265.48,453.744c-0.68-0.152-0.768-0.152-1.576-0.056 - C 264.168,453.696, 264.76,453.712, 265.48,453.744z M 243.96,453.656c-0.224,0, 0.384,0.216, 1.128,0.472c 1.256,0.008, 2.496,0.056, 3.68,0.168 - C 246.544,453.992, 244.344,453.68, 243.96,453.656z M 234.76,454.176c 0.648,0.040, 1.48,0.040, 2.448,0.040 - C 235.92,454.152, 234.976,454.112, 234.76,454.176zM 77.904,314.184c-0.512,0.064-1.544-0.448-2.032-0.984c 0.616-0.080, 1.592-0.36, 2.728-0.336 - C 78.6,313.336, 78.648,314.096, 77.904,314.184zM 252.792,432.808c-0.176,0.024-0.496-0.104-0.768-0.168c 7.096-0.696, 11.072-3.688, 18.656-0.4 - c 0.56,0.944-2.512,2.464-0.448,3c-0.92,0.096-8.848,0.92-8.96,0c-1.104,0.632-2.424-0.288-3.168,0.808 - c-0.832-0.44-3.152-1.32-2.176,0.96c-1.056,0.104-2.648-0.376-3.656-0.512c-0.168-0.36, 2.96-1.824, 2.808-1.712 - c-0.848-0.128-2.808-0.192-3.824-0.112c 0.36-0.528, 1.84-0.168, 2.808-0.456C 253.592,433.696, 253.184,433.44, 252.792,432.808zM 171.32,395.768C 169.504,394.32, 173.456,395.464, 171.32,395.768L 171.32,395.768zM 59.8,266.12c-0.888,0.184-4.232-4.112, 3.312-3.784c 0.168,0.776, 0.168,1.392-0.384,1.904 - c 0.032-0.152, 0.072-0.272, 0.088-0.416C 62.288,264.352, 61.144,265.792, 59.8,266.12zM 71.56,262.144c 2.392,6.512, 7.992-3.632, 8.048-3.656c 0.896-0.168, 4.688,5.688, 4.952,3.152 - c 0.024-0.040, 8.184-0.040, 8.52-0.096c0-0.224-1.008,3.392-1.488,5.096c-1.496,2.64-0.96,6.608-4.928,7.248 - c-1.896,0.28-3.96-1.4-5.32,0.712c-2.92,4.472-3.136-7.056-3.184-8.216C 77.448,266.744, 65.376,265.728, 71.56,262.144z - M 78.168,266.344c0-0.080,0-0.104-0.024-0.080C 78.192,266.304, 78.168,266.328, 78.168,266.344zM 160.832,386c-0.248-0.088-0.608-0.328-0.72-0.584c-0.432-0.76, 4.376-3.52, 5.68-0.832 - C 163.736,383.936, 162.096,384.408, 160.832,386zM 74.768,275.832c-1.616,2.288, 0.928,4.288-2.592,5.296c 0.296,1.952-4.848,9.352-7.128,11.552 - c-7.048,6.856-11.904,5.528-18.32-2.584c 6.272-0.816, 7.032,7.936, 9.072,0.976c 7.96-0.984, 9.592-9.328, 7.376-14.6 - C 67.168,275.816, 71.056,270.896, 74.768,275.832zM 97.168,258.16c-0.912-2.792, 4.016-4.2, 5.384-2.296C 102.488,257.184, 98.040,260.936, 97.168,258.16zM 91.6,266.632c 0.032-0.072, 0.048-0.128, 0.080-0.176C 91.24,268, 91.32,267.64, 91.6,266.632zM 74.512,303.336c 0.256,0.52-0.232,3.064-0.592,2.376C 73.744,305.336, 73.248,300.664, 74.512,303.336zM 51.632,289.256c-0.872-0.2-1.464-0.8-1.752-1.688c 0.536,1.112, 0.872-2.672, 2.8,2.832 - C 52.024,291.12, 52.048,290.184, 51.632,289.256zM 140.936,443.496c-0.152,0-1.040-0.168-1.432-0.424c 0.12,0, 7.512-0.192, 5.52,0.856 - C 143.632,444.344, 142.272,444.184, 140.936,443.496zM 355.584,378.32c 1.080-9.12, 7.168,3.504-1.376,2.208C 354.44,379.704, 355.512,379.136, 355.584,378.32zM 298.488,417.648c 5.32-0.36, 8.6,1.168, 8.736,5.952c 0.024,0.72, 4.448,3.416-1.528,3.8 - c-1.008,0.064-6.192,0.296-4.24-1.808c-0.784-0.432-4.112-0.024-4.192-1.184c 0.624-0.512, 1.256-1.024, 1.904-1.552 - C 298.712,421.448, 292.96,418.032, 298.488,417.648zM 356.824,382.216c 0.248,0.568, 0.312,2.648, 0.512,3.776c-0.36,0.104-0.496,0.592-0.584,1.064 - c-0.72-0.536-1.52-0.832-2.424-0.896C 354.952,385.352, 355.648,382.504, 356.824,382.216zM 414.64,355.216c-2.048,0.76-4.872,1.6-7.296,1.416C 408.864,355.776, 412.824,354.376, 414.64,355.216zM 336.272,378.216c 0.112-0.112, 2.584-1.96, 2.448-0.6C 338.408,379.016, 337.576,379.248, 336.272,378.216zM 312.248,424.464c-0.632-0.16-0.744-0.416-0.744-0.768c 0.624-0.032, 0.944-0.056, 1.144-0.072 - c0,0.344, 0.096,0.592, 0.096,0.8C 312.648,424.424, 312.36,424.456, 312.248,424.464zM 305.848,433.712c 1.080-0.072, 1.928,0.552, 1.952,1.176C 307.576,434.912, 303.848,433.832, 305.848,433.712zM 306.728,433.080c-0.024-0.76, 0.736-0.992, 2.216-1.264c-0.064-1.904, 0.336-1.448, 0.296-3.784 - c 0.264-0.008, 0.536-0.040, 0.808-0.048c-0.2,0.264-0.496,0.48, 0.024,0.944c 3.392-1.728, 0.696-0.632, 0.648-2.92 - c-0.024-1.016, 4.264-0.544, 4.896-0.6c-1.192-1.504, 0.112-1.768, 1.728-1.784c0-2.152-2.92-2.096-4.6-1.984 - c0-2.496-2.072-2.784-2.072-4.12c0-0.384, 5.592-1.376, 6.36-0.6c 0.048-1.208-5.776-2.168-7.008-4.224 - c 2.112-0.136, 19.848,1.472, 19.808,2.28c-0.696,0.152-1.416,0.304-2.112,0.456c 2.408,2.768, 2.408,5.344, 0.088,4.272 - c-0.4-0.128-0.496-0.328-1.208-0.416c-0.16,3.992-6.28,8.064-10.304,9.088c 0.408,0.96, 3.856,2.312, 3.464,3.944 - c-3.080-1.392-5.104-1.096-6.112,0.88c 0.848,0.36, 1.68,0.816, 2.472,1.312c 0.112,3.352-8.504-1.096-6.712-1.8 - C 309.376,432.392, 306.928,433.064, 306.728,433.080zM 125.552,442.48C 126.4,442.328, 126.96,442.568, 127.2,443.216c-1.056-0.168-1.872-0.32-2.824-0.768 - C 124.912,442.496, 124.936,442.456, 125.552,442.48zM 368.656,369.656c 0.192-1.32, 6.96-5.056, 8.44-5.208c 0.12-0.016, 0.176,3.76, 0.408,4.752 - C 376.064,369.56, 369.84,370.096, 368.656,369.656zM 335.504,455.496c0,0.024,0,0.048,0,0.064c-0.040-0.008-0.040-0.016-0.088-0.016 - C 335.472,455.512, 335.488,455.504, 335.504,455.496zM 385.792,428.464c 1.208-0.112, 1.752,0.96, 1.8,1.88c-0.704,0.24-3.192,1.016-1.064-0.6 - c-0.736,0.008-1.208-0.296-1.976-0.296C 384.664,429.096, 384.888,428.544, 385.792,428.464zM 335.424,455.536c-0.768-0.16, 0.744-0.736, 1.752-0.88C 336.768,455.104, 336.072,455.216, 335.424,455.536zM 338.584,454.944c-0.16,0.016-0.264,0-0.432-0.016c 0.768-0.568, 3.912-0.296, 5.568-0.208 - c-1.368-0.2-3.776-0.592-3.792-0.536c 0.040-0.632, 4.28-0.48, 4.824-0.64C 343.368,453.472, 342.136,453.6, 340.72,453.6 - c 0.224-3.072, 8.648-0.064, 11.456,0.528c 0.312-0.216, 0.872-0.552, 1.304-0.632c-0.072-0.36-0.856-0.192-0.92-0.64 - c 0.92-0.072, 2.36-0.136, 3.184-0.232c-0.176-0.104-0.16-0.24, 0.048-0.464c 1.752,0.088, 2.448,0.496, 4.4,0.632 - c-2.048,1.016-4.576,1.328-6.552,1.576c 0.2-0.016, 0.496-0.024, 0.672-0.016c-0.472,0.2-1.056,0.416-1.664,0.576 - c 3.84-0.4, 10.528,0.72, 11.944,0.96c-3.944,1.96-10.688,1.016-15.016,1.088c 0.136-0.048, 0.24-0.12, 0.36-0.168 - c-0.36,0-0.72,0.008-1.064,0.024c0-0.040,0-0.064,0-0.104c-0.696,0.080-1.416,0.12-2.136,0.12 - c 0.408-0.824, 2.672-0.728, 3.192-0.728C 350.064,456.112, 352.712,456, 353,455.992c-0.984-0.064-1.952-0.072-2.912-0.040 - c 0.112-0.2, 0.336-0.368, 0.6-0.512c-1.544,0.328-3.12,0.512-4.288,0.352c0,0.144, 0.16,0.24, 0.144,0.368 - c-0.024,0.128-5.28,1.496-2.744-0.656c-0.432,0.080-4.336,0.608-3.152,0.376c-0.4,0.144-0.936,0.16-1.504,0.32 - c 0.16,0.080, 0.36,0.12, 0.624,0.216c-1.504,0.296-2.984,0.224-4.424-0.216c 0.536-0.264, 1.104-0.448, 1.712-0.552 - C 336.856,455.36, 337.664,455.168, 338.584,454.944zM 355.272,426.776c 0.064-0.144, 0.16-0.272, 0.176-0.432C 355.408,426.632, 355.336,426.776, 355.272,426.776zM 375.44,426.784c 0.536,0.72, 1.12,1.456, 1.704,2.144C 376.528,428.944, 374.136,427.832, 375.44,426.784zM 321.096,410.784c 0.048-1.104, 0.608-1.824, 0.648-2.824c-1.032-0.112-9.456,1.544-9.432-0.328 - c0-2.728, 14.464-4.272, 11.272-9.536c 0.072,0.024, 0.136,0.064, 0.2,0.128c 0.384-7.28-1.664-5.368-6.936-6.056 - c-4.72,0.368-9.32,1.616-14.016,1.96c-5.504,0.4-3.272-3.152-3.272-5.816c0-1.896-3.704-15.984, 0.536-16.304 - c 4.152-0.312, 5.704,1.232, 8.328-2.792c 2.048-3.168, 8.472,1.704, 11.896,0.416c 2.92,1.12, 6.16,3.472, 8.216,6.384 - c-6.84,2.968, 8.832,9.656, 9.008,10.272c-2.968,7.568, 8.352,1.584, 11.792,3.288c 6.984,3.536, 7.92,1.512, 13.2-3.968 - c-0.968,2.136, 23.016-16.536, 15.536-15.832c 0.496-3.168, 4.504,3.032, 4.624,2.408c-0.872,5.184-3.64,4.536, 3.52,2.672 - c-0.112,4.376-7.68,3.416-8.376,7.32c-4.984,0.488-12.824,7.112-13.48,11.912c-0.448,3.072, 14.664-7.344, 15.944-7.472 - c 0.608-3.416, 7.904-4.176, 8.864-9.408c 0.584-3.072, 6.784-9.184, 9.68-9.496c-1.568-3.208, 0.744-5.024, 4.496-5.448 - c-0.624,0.328-1.544,4.472-1.688,5.16c 1.576-1.384, 3.352-2.424, 5.232-1.464c-3.208,2.664-4.712,5.264-7.504,7.928 - c-0.472,2.36, 4.136-0.824, 4.176-0.824c 0.064,0.792-0.072,1.384-0.456,2.216c 2.72,0.496, 3.128,1.712, 5.976-0.36 - c 3.752-2.632, 3.256,0.832, 6.648,0.36c0-0.456, 1.032-1.064, 1.208-1.4c-1.528-0.568-10.112,0.88-9.392-2.368 - c 0.512-2.312, 4.16-0.8, 0.536-4.504c 3.304-1.672, 5.168-3.576, 7.928-5.984c-0.072-0.184-0.472-0.472-0.768-0.544 - c 9.408-0.92, 17.136-4.72, 26.408-2.208c 1.152-4.304, 0.176-7.624-0.088-11.92c-0.072-1.28, 0.336-5.56-0.744-6.36 - c-0.408-0.312, 3.904-8.352, 3.976-10.048c 0.496-11.376, 17.576-17.64, 19.96-28.032c 1.416-6.28, 6.552-10.072, 10.216-14.976 - c 4.912-6.592, 6.712-11.48, 10.344-18.528c 6.832-13.296, 15.744-2.472, 26.632,0.6c-1.856,12.544-4.648,24.84-8.304,36.768 - c-2.832,1.792-1.208,4.672-2.472,7.208c-1.056-0.128-0.384-1.792-1.616-1.992c-1.824,4.976-7.928,7.536-10.448,12.576 - c-5.072,10.256, 5.504,3.728, 8.648-0.664c-5.568,14.504-12.304,28.56-21,41.144c 0.248,0.112, 0.52,0.176, 0.816,0.176 - c-12.712,20.968-28.456,40.128-46.544,56.712c-11.88,10.864-31.168,30.672-47.224,32.048c 0.744,2.384-7.456,0.92-5.048,0.496 - c-3.352-0.488-7.12,0.544-10.312-0.496c 0.408-0.144, 0.32-0.112, 0.792-0.264c-1.184,0.136-2.312,0.024-3.464-0.344 - c 0.768-0.016, 0.792-0.056, 1.376-0.152c-0.16-0.016-6.872,0.592-7.096-0.296c0,0, 0.872-0.136, 1.32-0.168 - c-0.36-0.048-1.232-0.152-1.616-0.344c 2.072-0.12, 2.832,0.24, 4.92,0.28c-0.52-1.576-15.608-7.656-17.512-7.76 - c 0.848-0.168, 1.232-0.272, 2.24-0.472c-2.936,0.344-15.92-2.16-9.144-6.832c-0.6-0.296-1.056-0.728-1.392-1.28 - c 1.128,0.176, 1.128,0.176, 2.448,0.088c 0.176-1.584-1.568-0.56-1.456-1.536c 0.336-3.496, 9.992-1.008, 11.088-0.344 - c 3.376,2.040, 4.224-0.112, 6.2-2.992c 0.744-1.112, 3.832-7.104, 5.344-7.256c 1.728-0.136, 9.48,1.744, 9.384,4.248 - c-6.472,1.128, 3.752,5.36, 3.616,5.88c-0.792,3-4.896,2.072-5.416,5.392c-0.512,3.176, 9.816,2.256, 9.12,4.36 - c 0.896,1.224, 8.264,5.16, 10.088,0.648c 0.136-0.376-9.232-3.736-10.016-3.68c 0.96-1.176, 0.744-2.504, 2.648-3.040 - c-3.392-4.176, 19.24-3.592, 21.040-5.536c-4.736-1.768-9.944,1.68-14.416-0.608c-1.44-0.76, 3.68-2.664, 3.704-4.184 - c-0.024,1.72-11.656-0.856-10.712-7.24C 380.4,419.6, 379.2,419.64, 378.016,419.704c-0.048,0.136, 0.096,0.472, 0.224,0.712 - c-2.92,1.064-14.84-3.096-14.304,0.536c-3.168,0.52-6.912,0.304-10.064,0.576c-0.264-0.76-0.112,0.344, 0.176,1.728 - c 0.72-0.264, 1.84,0.152, 2-0.928c 0.248,1.536-0.512,1.976-1.704,2.168c 0.336,1.216, 0.672,2.312, 0.92,2.28 - c-0.408,0.776-1.376,1.432-1.64,3.208c-6.176-2.432-6.216-2.416-2.832-8.192c 1.52-2.6-4.648-2.304-6.336-2.16 - c-5.776,0.472-5.144-4.624-9.88-5.64C 328.776,412.736, 327.808,410.248, 321.096,410.784zM 357.584,422.296c-0.2,0.408-0.432,0.408-0.72-0.008c 3.008-2.032, 2.216,1.664, 4.152,1.872 - c-2.312,3.888-6.624-0.184-2.192-1.104C 358.88,422.712, 358.256,422.296, 357.584,422.296zM 440.64,354.32c-1.824-0.12-4.448-0.896-5.928-1.488C 435.456,349.624, 440.712,352.784, 440.64,354.32zM 136.792,446.768c-0.512-0.072-0.984-0.176-1.368-0.184c 0.768,0.032, 1.392,0.080, 1.928,0.184 - c 2.224,0.056, 4.232,0.368, 3.648,0.888c 0.24,0.072, 0.616,0.168, 0.84,0.232c-1.304,1.224-6.496,0.64-8.2,0.504 - c-0.464-0.264-0.408-0.32, 0.416-0.288c-0.216-0.096-0.552-0.176-0.816-0.224c 0.232-0.128, 0.768,0.032, 2.072,0.064 - c-0.816-0.504-1.696-0.688-2.688-0.576C 133,446.952, 134.872,446.768, 136.792,446.768zM 129.728,445.504c 0.4,0.008, 0.968,0.144, 1.296,0.312C 130.072,445.92, 130.8,446.4, 129.256,446.336 - C 128.736,446.032, 129.056,445.464, 129.728,445.504zM 135.784,443.888c-0.824-0.24-2.544-0.44-3.4-1c 1.36,0.856, 8.040-1.192, 8,2.216 - c0-0.040-5.32,0.016-5.832-0.048c-0.304-0.336, 0.56-0.304, 1.584-0.264c-1.408-0.84-2.568,0.328-3.824-0.424 - c 0.024-0.128, 0.2-0.224, 0.432-0.328C 133.896,444.136, 134.992,444.152, 135.784,443.888zM 148.616,444.144c-4.16-0.744, 3.728-0.88, 4.88-0.848c 4.256,2.44, 13.288-1.928, 18.16,1.096 - c0,0-0.472-0.032-0.872,0c 0.408,0.176, 0.832,0.28, 1.256,0.296c-0.176,1.232-19.512-0.472-18.136-0.096 - c-0.504,0.24-2.696-0.192-2.080,0.44c 0.872,0.048, 1.752,0.088, 2.592,0.104c-0.36,1-10.296,1.104-11.248,0.504 - c 1-0.448, 2.056-0.664, 3.168-0.648C 147.592,445.736, 148.344,445.464, 148.616,444.144zM 127.28,433.16c 1.36,2.96-6.816,0.064-5.152,0.368C 117.824,432.88, 126.072,432.864, 127.28,433.16zM 123.4,438.864c 2.28-3.136, 8.304-1.072, 10.704,0.408c-0.296,0.048-1.064,0.064-1.272,0.072 - c 1.648,1.168-0.648,0.464-1.504,0.376c 1.232,0.24, 2.424,0.616, 3.552,1.128c-0.424-0.272-11.176-0.768-6.344-0.88 - C 126.712,438.736, 125.088,439.96, 123.4,438.864zM 149.472,446.64c 0.696-0.032, 1.288,0.16, 1.8,0.528c-1.768-0.168-3.544-0.016-5.288-0.432 - C 145.976,446.744, 149.168,446.608, 149.472,446.64zM 132.744,444.048c-0.024,0-0.048,0-0.096,0C 132.744,444.024, 132.8,444, 132.832,444.008 - C 132.8,444.024, 132.776,444.024, 132.744,444.048zM 129.352,443.952c-0.080-0.088-0.168-0.168-0.216-0.256c 0.896,0.040, 2.224,0.232, 3.512,0.352 - c-0.776,0.184-3.656,1.288-3.648,0.472c0,0.016-0.008,0.040-0.008,0.056l-0.736-0.44C 128.488,444.008, 128.608,443.84, 129.352,443.952zM 147.264,449.432c 0.256,0.16, 0.504,0.272, 0.744,0.416c-0.416-0.008-1.264-0.024-2.080-0.072 - C 145.048,449.296, 148.312,449.48, 147.264,449.432zM 155.8,448.288c-0.312-0.12-0.576-0.104-0.848-0.088c-0.064-0.032-0.176-0.072-0.224-0.096 - C 155.192,448.144, 155.504,448.216, 155.8,448.288zM 154.152,449.552c-0.616-0.016-1.136-0.080-1.36-0.2C 153.328,449.416, 153.736,449.472, 154.152,449.552zM 148.936,447.4C 150.448,449.168, 144,448.736, 145.592,447.424C 142.464,447.072, 147.464,447.36, 148.936,447.4zM 154.664,449.656c-0.176-0.048-0.344-0.072-0.512-0.104c 1.72,0.048, 4.376-0.224, 5.16-0.296 - c-1.832-0.016-3.64-0.2-5.424-0.544c 0.264-0.376, 0.648-0.496, 1.064-0.504c 1.192,0.464, 5.784,0.096, 7.232,0.16 - c 0.072,0.168-0.112,0.192-0.136,0.392c 1.688,0.376, 4.56,0.608, 6.192-0.672c-1.032-0.056-8.736,0.8-5.344-0.688 - c-1.272-0.096-2.528-0.296-3.728-0.584c 6.064,0.584, 15.768-2.896, 19.92,1.080c 0.216,0.208-1.528,0.112-2.224,0.048 - c 1.008,0.864, 3.232,0.448, 3.752,1.64c 2.496,0.152, 3.776,0.776, 6.288,1.264c-0.024,0.256-0.536,0.312-1.032,0.416 - c 0.96,0, 1.52,0, 1.816,0.384c-0.448-0.016-0.912-0.040-1.416-0.048c 5.44,1.384, 11.32,1.224, 16.776,2.752 - c-1.008-0.008-2.712-0.16-3.056-0.032c 0.536,0.096, 6.648,0.080, 6.984,0.76c 0.48,0.912-9.832-0.64-5.92,0.336 - c-7.544,2.696-28.816,0.816-36.336-1.992c 1.392,0.056, 2.768,0.192, 4.136,0.232c-0.792-0.096-1.232-0.16-2.16-0.344 - c 1.568-0.256, 3.104,0.344, 4.696,0.264c-1.712-0.176-3.032-0.168-4.536-0.664c 0.92,0.040, 1.824,0.072, 2.72,0.096 - c-0.624-0.088-1.28-0.168-1.88-0.264c 0.264-0.424, 1.568-0.584, 3.224-0.584c 0.968-0.288, 0.608-0.432-1.008-0.416 - c 0.648-0.096, 2.432-0.736, 2.224-0.864c-3.368-2.32-3.928,0.336-5.976-0.856c 1.056,0.608, 1.368,0.864-0.2,0.832 - c 0.024-0.032, 0.048-0.080, 0.072-0.104c-1.392-0.808-5.64,0.992-7.704,0.992c-0.432-0.24, 0.56-0.24, 1.104-0.32 - c-1.232-0.016-2.448-0.112-3.64-0.256c 0.12-0.168, 0.288-0.2, 0.432-0.296C 155.28,450.88, 154.28,450.944, 153.576,450.56 - c 0.568-0.312, 1.208-0.408, 1.88-0.336c-1.016,0-2.136-0.016-3.184-0.056C 151.416,449.608, 152.576,449.584, 154.664,449.656z M 172.808,452.168 - c 1.168,0.056, 2.4,0.152, 3.616,0.256c-0.144-0.064-0.296-0.112-0.384-0.192c-0.144-0.096, 1.104-0.408, 1.232-0.488 - C 175.768,451.632, 174.328,452.040, 172.808,452.168z M 181.16,452.936c 0.768,0.096, 1.304,0.168, 1.416,0.176 - C 182.256,453.024, 181.768,452.976, 181.16,452.936zM 159.168,446.808c-1.344-0.128-2.512-0.448-3.392-1.080C 156.88,446.168, 158.008,446.52, 159.168,446.808zM 148.936,447.4c-0.024-0.016,0-0.032-0.032-0.056C 149.544,447.408, 149.44,447.416, 148.936,447.4zM 169.68,451.728c 0.096-0.008, 0.144,0, 0.224,0C 169.8,451.752, 169.704,451.752, 169.68,451.728zM 166.072,441.992c-0.632-0.488, 1.88-1.048, 2.040-1.032c 1.712,0.048, 5.144-0.048, 6.784,0.736 - C 172.808,442.112, 168.088,443.48, 166.072,441.992z" data-tags="globe" /> -<glyph unicode="a" d="M 512,401.056c0-34.952-28.128-62.944-62.72-62.944c-34.952,0-63.040,27.992-63.040,62.944c0,34.688, 28.088,62.68, 63.040,62.68 - C 483.872,463.736, 512,435.744, 512,401.056zM 512,224.056c0-34.728-28.128-62.92-62.72-62.92c-34.952,0-63.040,28.192-63.040,62.92c0,34.616, 28.088,62.904, 63.040,62.904 - C 483.872,286.96, 512,258.672, 512,224.056zM 512,47.080c0-34.72-28.128-62.816-62.72-62.816c-34.952,0-63.040,28.096-63.040,62.816c0,34.824, 28.088,62.928, 63.040,62.928 - C 483.872,110.008, 512,81.896, 512,47.080zM 318.816,401.056c0-34.952-28.112-62.944-62.832-62.944c-34.712,0-62.8,27.992-62.8,62.944 - c0,34.688, 28.088,62.68, 62.8,62.68C 290.704,463.736, 318.816,435.744, 318.816,401.056zM 318.816,224.056c0-34.728-28.112-62.92-62.832-62.92c-34.712,0-62.8,28.192-62.8,62.92 - c0,34.616, 28.088,62.904, 62.8,62.904C 290.704,286.96, 318.816,258.672, 318.816,224.056zM 125.736,401.056c0-34.952-28.216-62.944-62.928-62.944S0,366.104,0,401.056c0,34.688, 28.104,62.68, 62.816,62.68 - S 125.736,435.744, 125.736,401.056z" data-tags="coderwall" /> -<glyph unicode="p" d="M 256-32c-71.688,0-130.016,58.328-130.016,130.016L 125.984,385.888 C 125.984,437.784, 168.2,480, 220.088,480 - c 51.888,0, 94.112-42.216, 94.112-94.112l0-262.376 c0-32.088-26.12-58.2-58.192-58.2c-32.096,0-58.2,26.12-58.2,58.2l0,246.16 - c0,12.304, 9.984,22.288, 22.288,22.288c 12.312,0, 22.288-9.984, 22.288-22.288l0-246.16 c0-7.504, 6.112-13.624, 13.624-13.624 - c 7.512,0, 13.608,6.12, 13.608,13.624L 269.616,385.888 c0,27.312-22.208,49.528-49.52,49.528S 170.56,413.2, 170.56,385.888l0-287.872 - c0-47.112, 38.336-85.448, 85.44-85.448s 85.448,38.336, 85.448,85.448L 341.448,369.672 c0,12.304, 9.984,22.288, 22.28,22.288 - c 12.32,0, 22.288-9.984, 22.288-22.288l0-271.664 C 386.016,26.328, 327.704-32, 256-32z" data-tags="clip" /> -<glyph unicode="l" d="M 420.48,256.576L 267.184,256.576L 342.984,480L 91.52,191.432L 244.824,191.432L 169.032-32 z" data-tags="lightning" /> -<glyph unicode="u" d="M 474.592,269.424L 269.656,474.368c-7.512,7.512-19.8,7.512-27.312,0L 37.4,269.424c-7.504-7.504-4.968-13.656, 5.664-13.656l 105.64,0 - l0-146.704 l 214.592,0 L 363.296,255.768 l 105.64,0 C 479.568,255.768, 482.104,261.92, 474.592,269.424zM 148.704,86.992L 363.296,86.992L 363.296,38.816L 148.704,38.816zM 148.704,16.176L 363.296,16.176L 363.296-32L 148.704-32z" data-tags="upvote" /> -<glyph unicode="*" d="M 499.928,434.032l-37.616-37.608C 414.168,447.832, 345.704,480, 269.712,480C 123.976,480, 5.832,361.856, 5.832,216.136l 84.752,0 - c0,98.92, 80.192,179.12, 179.128,179.12c 52.592,0, 99.864-22.696, 132.632-58.8l-40.048-40.056c-3.44-3.432-2.272-6.24, 2.576-6.24l 132.472,0 - c 4.848,0, 8.824,3.968, 8.824,8.832L 506.168,431.448 C 506.168,436.296, 503.36,437.464, 499.928,434.032zM 242.288,52.76c-52.6,0-99.872,22.696-132.64,58.8l 40.056,40.056c 3.432,3.432, 2.264,6.232-2.592,6.232L 14.656,157.848 - c-4.848,0-8.816-3.968-8.816-8.824l0-132.472 c0-4.848, 2.808-6.016, 6.232-2.576l 37.608,37.608C 97.824,0.168, 166.288-32, 242.288-32 - c 145.736,0, 263.872,118.16, 263.872,263.88L 421.416,231.88 C 421.416,132.952, 341.216,52.76, 242.288,52.76z" data-tags="circle-arrow" /> -<glyph unicode="b" d="M 493.48,332L 357.24,332 L 357.24,432.376 l-202.48,0 L 154.76,332 L 18.512,332 C 8.288,332,0,323.704,0,313.48l0-279.336 c0-10.224, 8.288-18.512, 18.512-18.512l 474.96,0 - c 10.232,0, 18.52,8.288, 18.52,18.512L 511.992,313.48 C 512,323.704, 503.712,332, 493.48,332z M 199.912,387.232l 112.176,0 L 312.088,332 L 199.912,332 L 199.912,387.232 z - M 277.68,233.072c0-11.968-9.696-21.68-21.672-21.68s-21.68,9.712-21.68,21.68s 9.704,21.672, 21.68,21.672S 277.68,245.040, 277.68,233.072z" data-tags="case" /> -<glyph unicode="!" d="M 512.008,361.472L 452.432,421.064L 177.448,146.112L 59.568,263.976L-0.008,204.408L 117.872,86.512L 117.856,86.512L 177.448,26.936L 237.032,86.512L 237.032,86.512 z" data-tags="tick" /> -<glyph unicode="$" d="M 239.912,452.72c 8.848,19.992, 23.336,19.992, 32.192,0l 52.824-119.376c 8.84-19.976, 33.96-36.344, 55.816-36.344l 110.56,0 - c 21.856,0, 27.288-12.84, 12.072-28.536L 421.192,183.728c-15.248-15.68-24.64-46.16-20.944-67.704l 19.024-110.936 - c 3.688-21.536-9.128-30.832-28.464-20.68L 291.184,36.8c-19.368,10.168-51,10.168-70.368,0l-99.624-52.392 - c-19.336-10.152-32.136-0.856-28.44,20.68l 19.032,110.936c 3.672,21.544-5.744,52.024-20.976,67.704L 8.64,268.456 - c-15.216,15.696-9.784,28.536, 12.072,28.536l 110.56,0 c 21.872,0, 46.984,16.368, 55.816,36.344L 239.912,452.72z" data-tags="star" /> -<glyph unicode="&" d="M 512,118.496c0-11.512-4.392-23.024-13.16-31.816c-17.576-17.56-46.048-17.56-63.624,0L 256,265.896L 76.8,86.68 - c-17.568-17.56-46.056-17.56-63.624,0c-17.56,17.568-17.56,46.056,0,63.616l 211.008,211.024c 8.448,8.44, 19.88,13.168, 31.816,13.168 - c 11.944,0, 23.376-4.736, 31.816-13.168l 211.032-211.024C 507.608,141.512, 512,130.008, 512,118.496z" data-tags="arrow-up" /> -<glyph unicode=">" d="M 150.496-32c-11.512,0-23.024,4.392-31.816,13.168c-17.56,17.568-17.56,46.048,0,63.616L 297.896,224L 118.68,403.2 - c-17.56,17.568-17.56,46.056,0,63.624c 17.568,17.56, 46.056,17.56, 63.616,0l 211.024-211.008c 8.44-8.448, 13.168-19.88, 13.168-31.816 - s-4.736-23.376-13.168-31.816L 182.296-18.832C 173.512-27.608, 162.008-32, 150.496-32z" data-tags="arrow-right" /> -<glyph unicode="s" d="M 259.344,458.8L 304.664,458.8L 304.664,329.752L 259.344,329.752zM 455.192,464.904L 363.304,464.904 l-4.632-152.848c0-12.744-10.28-23.104-23.072-23.104L 126.976,288.952 - c-12.784,0-23.088,10.36-23.088,23.104L 103.888,464.904 L 33.824,464.904 C 15.096,464.904,0,449.688,0,431.024l0-414.088 c0-18.648, 15.096-33.84, 33.824-33.84l 444.344,0 - c 18.744,0, 33.832,15.192, 33.832,33.84L 512,401.296 L 455.192,464.904z" data-tags="save" /> -<glyph unicode="%" d="M 398.336,277.968l 1.232,0 L 256-32L 112.472,277.968l 1.192,0 c-5.672,15.896-8.928,32.936-8.928,50.776 - C 104.736,412.28, 172.48,480, 256,480c 83.552,0, 151.264-67.72, 151.264-151.256C 407.264,310.904, 404,293.864, 398.336,277.968z M 256,407.4 - c-42.616,0-77.144-34.536-77.144-77.144c0-42.6, 34.52-77.136, 77.144-77.136s 77.144,34.536, 77.144,77.136C 333.144,372.864, 298.616,407.4, 256,407.4z" data-tags="pin" /> -<glyph unicode="<" d="M 361.504,480c 11.512,0, 23.024-4.392, 31.816-13.168c 17.56-17.568, 17.56-46.048,0-63.616L 214.104,224l 179.216-179.2 - c 17.56-17.568, 17.56-46.056,0-63.624c-17.568-17.56-46.056-17.56-63.616,0L 118.68,192.176c-8.44,8.448-13.168,19.88-13.168,31.816 - s 4.736,23.376, 13.168,31.816L 329.704,466.832C 338.488,475.608, 349.992,480, 361.504,480z" data-tags="arrow-left" /> -<glyph unicode="v" d="M0,329.504c0,11.512, 4.392,23.024, 13.16,31.816c 17.576,17.56, 46.048,17.56, 63.624,0L 256,182.104l 179.2,179.216 - c 17.568,17.56, 46.056,17.56, 63.624,0c 17.56-17.568, 17.56-46.056,0-63.616L 287.824,86.68c-8.448-8.44-19.88-13.168-31.824-13.168 - c-11.944,0-23.376,4.736-31.816,13.168L 13.152,297.704C 4.384,306.488,0,317.992,0,329.504z" data-tags="arrow-down" /> -<glyph unicode="." d="M 117.592,5L0-32L 37,85.608L 363.184,411.784L 443.784,331.184 zM 473.912,361.312L 393.32,441.92l 30.912,30.92l0,0c 9.544,9.544, 25.072,9.56, 34.624,0l 45.968-45.976 - c 9.568-9.568, 9.56-25.088, 0.008-34.64l0,0L 473.912,361.312z" data-tags="pen" /> -<glyph unicode="m" d="M 448.312,416.28c-84.912,84.952-222.576,84.912-307.472,0c-74.664-74.648-83.632-190.016-27.008-274.512L 12.416,40.392 - c-16.592-16.552-16.512-43.432,0-59.968c 16.576-16.536, 43.448-16.536, 59.992,0l 101.392,101.392c 84.496-56.584, 199.88-47.608, 274.512,27.024 - C 533.224,193.712, 533.224,331.376, 448.312,416.28z M 402.216,154.872c-59.432-59.52-155.856-59.464-215.328,0c-59.48,59.504-59.48,155.912,0,215.36 - c 59.472,59.504, 155.896,59.472, 215.328,0C 461.728,310.784, 461.728,214.376, 402.216,154.872z" data-tags="mag" /> -<glyph unicode="i" d="M 6.472-20.696l 109.76,0 L 116.232,309.512 L 6.472,309.512 L 6.472-20.696 z M 62.072,468.696C 24.496,468.696,0,444.056,0,411.632c0-31.672, 23.808-57.040, 60.608-57.040l 0.76,0 - c 38.232,0, 62.080,25.368, 62.080,57.040C 122.736,444.056, 99.6,468.696, 62.072,468.696z M 385.648,317.304c-58.328,0-84.384-32.104-98.936-54.624l0-1.064 - l-0.696,0 c 0.216,0.344, 0.472,0.712, 0.696,1.064l0,46.832 L 176.96,309.512 c 1.4-30.968,0-330.208,0-330.208l 109.752,0 L 286.712,163.696 - c0,9.864, 0.704,19.712, 3.648,26.776c 7.936,19.752, 25.968,40.168, 56.296,40.168c 39.696,0, 55.592-30.28, 55.592-74.672l0-176.656 L 512-20.688 L 512,168.64 - C 512,270.088, 457.872,317.304, 385.648,317.304z" data-tags="linkedin" /> -<glyph unicode="@" d="M 274.944,242.968c 28.12-28.104, 21.6-80.168-14.512-116.296l-33.752-33.744l-22.488-22.488c-36.12-36.128-88.176-42.616-116.28-14.512 - c-28.104,28.104-21.6,80.152, 14.52,116.272l 14.808,14.808l 7.68,7.68c-8.952,28.568-9.6,59.328-2.104,88.672l-19.664-19.664l-60.848-60.856 - c-55.048-55.048-56.584-142.768-3.408-195.936c 53.176-53.176, 140.904-51.648, 195.952,3.4l 80.528,80.52l 5.176,5.176 - c 55.072,55.072, 56.592,142.792, 3.416,195.968l-16.568,16.568l-49.016-49.008L 274.944,242.968zM 237.048,205.032c-28.112,28.112-21.6,80.168, 14.528,116.304l 33.752,33.736l 22.488,22.488c 36.112,36.112, 88.168,42.616, 116.272,14.512 - c 28.104-28.096, 21.592-80.16-14.504-116.264l-14.808-14.808l-7.696-7.688c 8.952-28.576, 9.616-59.328, 2.112-88.664l 19.656,19.656l 60.856,60.856 - c 55.040,55.040, 56.584,142.768, 3.416,195.936c-53.184,53.176-140.912,51.648-195.96-3.392L 196.632,357.176l-5.192-5.192 - c-55.056-55.064-56.584-142.784-3.4-195.968l 16.568-16.568l 49.008,49.008L 237.048,205.032z" data-tags="link" /> -<glyph unicode="0" d="M 255.992,480C 114.832,480,0,365.152,0,224.008C0,82.848, 114.832-32, 255.992-32C 397.152-32, 512,82.848, 512,224.008 - C 512,365.152, 397.152,480, 255.992,480z M 142.696,424.040c 0.28-0.032, 0.728-0.016, 1.232,0c-0.584-0.352-1.128-0.32-1.656-0.248 - C 142.416,423.88, 142.552,423.968, 142.696,424.040z M 160.304,14.92c-0.488,1.808-1.472,3.576-1.944,4.632 - c 0.792,0.2, 4.488-1.032, 3.384,1.392c 0.712-1.528-10.224,3.408-5.88,4.584c 2.344,0.616, 8.096-1.2, 6.472,2.616 - c 0.064,1.968-3.68,5.992-0.128,6.872c 3.008,0.736, 8.096,1.448, 9.56,4.704c 4.136,9.224-4.64,6.688-7,12.808 - c 0.496-1.304, 12.904,0.6, 13.656,4.608c 1.16,6, 3.392,11.208, 4.184,17.136c0-0.048, 0.024-0.056, 0.024-0.104 - c-0.024,2.264, 0.696,4.296, 2.2,6.016c-0.896,2.616-1.736,5.248-2.504,7.872c-0.536,3.048, 3.6,7.432, 5.832,8.832 - c 8.056,5.056, 9.448,8.384, 11.776,17.576c 0.768,5.368-4.752,17.616-2.856,21.2c 2.512,4.752, 12.784,24.48, 2.040,26.784 - c-5,1-7.864,4.024-12.624,5.376c-4.752,1.336-9.952-0.216-14.048-0.608c-0.888,3.784-2.128,3.632-5.408,5.024 - c-8.752,3.616-4.648-4.432-9.112-4.856c-4.528-0.512-9.584,5.336-6.040,10c 2.336,3.064-6.128,15.28-11.112,14.912 - c-4.312-0.136-15.64,0.864-18.312,4.784c-3.376,5.032-15.544,6.32-16.616,11.856c 0.408-0.232, 1.264-0.040, 1.656,0.336 - c-3.336,0-8.128-3.24-10.632-2.336c-1.792,0.64-7.024-0.048-8.272,1.368c-1.696,1.936-5.24,4.472-8.104,4.36 - c 0.28-1.52, 1.888-0.832, 2.616-2.328c-8.088-0.472-2.16-8.648-3.704-8.76c-3.56-0.208-2.608,7.456-2.624,9.064 - c 1.032,0.808, 1.168,1.608, 0.432,2.368c-1.464,2.048-2.656-1.424-3.776-1.904c-4.96-2.2-13.128-6.68-11.848-13.344 - c-6.232-2.536,0-10.616, 1.032-15.392c-0.568-1.112-0.168-1.872, 1.224-2.304c 0.072-5.040-6.712-10.432-6.824-15.376 - c-0.144-5.792-1.696-6.52, 3.608-9.408c 0.072-3.504-3.776-5.12-2.76-9.088c 1.048-4.168, 4.72-4.368, 6.568-6.88 - c 3.656-5.344, 8.328-10.944, 12.928-15.888c 5.456-5.888, 6.848-13.536, 15.832-15.112c 6.976-0.952, 14.8-5.32, 17.584-11.824 - c 2.552-5.928, 3.456-12.096, 5.584-18.136c 1.016-6.384, 0.44-17.544, 4.336-22.656c 3.224-7.896, 4.048-13.176, 4.224-20.528 - C 65.176,76.76, 26,145.88, 26,224.008c0,10.336, 0.752,20.512, 2.080,30.52c 0.048-1.768, 0.088-3.432, 0.344-4.072 - c 1.632-4.168, 4.776-6.384, 7.984-7.416c-0.992-3.536-0.416-6.488-0.176-10.048c 0.272-3.88-2.976-7.848-2.048-11.536 - c 0.296-0.12, 0.616-0.208, 0.912-0.328c-0.032,0.472, 0.248,1.272, 0.672,1.808c 3.64-1.24, 1.264-19.872, 6.144-21.864 - C 44.376,200.032, 44.8,212, 49.88,210.224c 2.536-0.944, 0.472-7.336, 0.688-9.112c 0.040-0.088, 4.096,3.664, 4.432,4.208 - c-0.84,3.040-0.944,11.248-6.36,8.912c-11.456-4.912-6.528,14.928-4.24,20.856c 2.64,6.808, 12.44,19.344-0.768,20.144 - c-11,0.688, 1.664,10.88, 3.040,13.336c 1.056,1.184, 1.976,2.208, 2.976,4.352c 1.52,3.176, 4.264,5.568, 5.8,8.768 - c-12.416,2.232-12.888-13.808-24.344-11.328c-0.152,0.040-0.232,0.144-0.368,0.2c 1.888,9.184, 4.408,18.168, 7.376,26.928 - c 1.912,3.576, 3.44,6.248, 3.696,6.832c 0.056-0.016, 0.104-0.048, 0.16-0.048c 3.56,6.2, 8.056,9.056, 14.184,12.376 - c 4.144,2.192, 6.976-3.968, 10-2.656c-0.432,1.040, 0.936,2.024, 2.024,3.744c-0.696-0.296-0.552-0.32-1.128,0.088 - c 1.752,0.592, 3.376,0.24, 4.96,0.592c-0.544-1, 9.872-2.64, 9.928-2.864c 0.448-1.504-6.64-19.416-2.872-19.92 - c 4.168-0.56, 7.472,11.88, 7.784,14.712c 1.2,11.072, 9.552,14.976, 18.808,19.024c-0.024,0.072-0.088,0.128-0.136,0.216 - c 2.304,1.512, 5.136,1.912, 7.336,3.608c-1.68,1.912, 0.872,1.328, 1.848,2.656c-0.432,0.104-0.84,0.232-0.832,0.976 - c 1.288,0.328, 2.152,1.080, 2.584,2.224c-0.192,0-0.48,0.024-0.664,0.024c-0.288,0.784, 2.56,5.52, 3.248,6.232 - c-0.152-0.352-1.232-4.984-1.432-4.96c 3.264-0.088, 3.856,5.328, 5.488,6.304c-0.528,1.296, 8.64,4.616, 10.736,5.152 - c-0.52,0.632-2.64,0.072-3.368,0.072c 3.688,1.608, 8.688,1.392, 12.088,2.64c-5.488-0.136, 4.472,8.104, 7.768,7.392 - c 3.128-0.664, 9.616,3.808, 13.56,3.896c-0.784-1.008-0.488-1.416, 0.888-1.208c-5.224-0.248-9.328-6.84-5.392-4.792 - c 2.376,1.256, 12.92,2.88, 13.936,4.888c 0.56,1.128-11.728,0.352-6.256,7.096c-0.504,0-1.464,0.24-2.352,0.24 - c 1.568,0.976, 4.472,0.528, 5.496,2.36c 1.24,2.16-14.112-1.328-14.872-1.384c 6.344,5.024, 36.816,3.984, 33.824,14.192 - c-0.904-0.256-10.872-2.848-11.048-1.656c 2.288,0.672, 7.92,1.192, 9.136,2.344c 0.736,0.88-7.92,0.12-6.216,2.968l 0.136,0.168 - c-2.064-0.040-2.776,0.696-3.616,1.232c 5.2,1.648-1.312,10.336-4.328,6.312c 0.4-0.496, 0.864-0.824, 1.392-1.104 - c-1.352,0.448-2.376,0.728-0.84,3.472c-2.52-4.6-12.672-1.672-16.072-0.040c-11.816,5.64-8.216-2.176-17.104-4.176 - c 0.184-4.224, 6.136-4.256-2.040-7.48c-6.576-2.624-2.696-4.056-6.064-7.792c-2.952-0.056-4.096,0.232-4.376,0.736 - c 0.528-0.224, 1.072-0.352, 1.616-0.32c 0.72,0.904-0.768,0.928-1.68,0.728c 0.288,1.256, 3.664,3.344, 1.352,4.992 - c-6.936-0.24-6.064,4.808-14.664,4.432c 2.352,2.392, 2.752,3.832-0.856,3.24c 4.648,3.104, 13.576,5.848, 17.296,9.192 - c-0.328,0.288-0.664,0.472-1.032,0.592c 4.264-0.368, 11.408,0.392, 14.224,2.848c-2,0.2-4.512-0.096-4.232,0.96 - c 1.96-0.616, 4.384-0.592, 6.944-0.264c-2.272-0.928-5.328-2.656-6.424-3.592c 0.568,0.048, 2.024,0.248, 3,0.128 - c-0.576-0.384-1.224-0.816-0.36-0.768c 3.344,0.168, 8.936,0.736, 12.288,1.68c-0.176,0.432-1.696,0.184-2.352,0.616 - c-0.216,0.136, 0.304,0.416, 0.216,0.656c-0.328,0.856-3.592,1.304-4.36,0.976c 0.040,0.248,0,0.4, 0.016,0.624 - c 0.8,0.168, 1.568,0.392, 2.344,0.616c-0.312-0.272-0.072-0.52, 0.768-0.52c-0.112,0.296, 0.32,0.712-0.664,0.536 - c 4.672,1.304, 9.152,3.464, 11.392,5.384c-1.168-0.056-2.52,0.496-3.72,0.616c 1.656,0.040, 3.144,0.096, 3.944,0.088 - c-1.12-0.848, 4.328,0.568, 5.8-0.248c-0.072,0-0.112-0.016-0.168-0.016c 0.472-0.056, 0.888-0.248, 1.296-0.64 - c-0.576-0.168-1.192-0.304-1.776-0.464c 0.128,0.104, 3.528-0.024, 4.312-0.416c-1.44,0.168-2.712-0.152-3.896-0.928 - c-0.088-0.072, 4.576-1.392, 4.648,0.496c 2.888-2.096-5.784-3.648-3.392-4.472c-3.032-1.336-8.832-0.416-10.944-3.288 - c-0.384-0.504, 9.52,0.608, 10.464,0.136c 2.288-1.152, 6.736-3.832, 10.48-3.024c 2.984,0.68-2.64,3.36-2.624,3.336 - c 5.056,0.824, 4.912-1.664, 6.256,2.672c-1.768-0.224-2.264,1.456-3.528,1.328c 0.296,0.84, 0.712,0.336, 1.016,0.912 - c 2.328-0.336, 7.12-1.688, 7.536,1.296c 0.016,0.176-6.392,2.344-6.832,2.496c 0.536,0.416, 0.88,0.416, 1.64,0.664 - c-0.56,0.264-1.192,0.328-1.824,0.192c 0.464,0.296, 1.008,0.296, 1.624,0.384c-0.472,0.48-1.032,0.648-1.664,0.52 - c 0.040,0.112, 0.104,0.248, 0.168,0.368c-5.288,0.216-9.928,1.872-15.536,1.92c 0.304,0, 0.904,1.136, 0.872,1.304 - c-0.816,2.208-13.952-2.216-10.856-0.84c-1.472,0, 3.24,1.24, 4.304,1.44c-2.776,0.168-5.272,0.144-8.072-0.416 - c 0.992,0.344, 1.928,0.512, 2.84,0.992c-5.856-0.24-8.016-0.2-12.288-3.2c 1.4-0.056, 2.704,0.296, 3.928,1.024 - c-0.272-0.016-0.528-0.016-0.808-0.032c 1.512,0.728, 4.088,0.52, 5.552,0.984c-0.88-0.456-6.168-1.064-5.368-2.688 - c0,0, 3.656-0.080, 4.088-0.256c-1.16-0.992-2.6-1.104-4.28-0.408c-1.496-1.184, 10.448-1.328, 10.512-1.328 - c-1.456-0.376-7.32-5.648-9.304-3.744c-0.304,1.24, 0.424,1.84, 2.104,1.768c 1.384,1.136-5.696-0.496-5.392-0.488 - c 1.784,1.432-1.448,0.832, 1.208,1.592c-0.624,0.248-2.432-0.12-2.6,0.296c 0.856,0.272, 1.712,0.536, 2.552,0.816 - c 1.912,1.456-6.2,1.272-8.448-0.4c-0.624-0.416, 2.952-0.752, 2.32-1.256c-0.576-0.344-1.168-0.664-1.76-0.968 - c 0.6,0.152, 1.080,0.224, 1.76,0.384c-0.88-1.288-4.232-0.84-6.32-2.48c-1.296-0.192-1.072,0.032-0.576,0.352 - c-1.808-0.488-5.6-0.32-9.44-0.056c 1.416,1.016, 2.824,2.056, 4.264,3.040c 0.616,0.040, 1.248,0.064, 1.68,0.184 - c-0.24,0.208-0.496,0.336-0.736,0.456c 1.544,1.032, 3.112,2, 4.672,3c 2.424-2.048, 7.352-0.352, 9.424,0.92 - c-0.272,0.048-0.984,0.064-1.184,0.072c 1.536,1.080-0.616,0.424-1.4,0.344c 1.144,0.224, 2.264,0.576, 3.328,1.056 - c-0.4-0.256-10.456-0.728-5.936-0.832c-0.936-0.64-1.816-0.576-2.664-0.568c 2.416,1.52, 4.872,2.984, 7.344,4.424 - c 0.8,0.024, 1.544,0, 2.096-0.176c-0.768-0.232-2.392-0.424-3.184-0.928c 1.28,0.8, 7.52-1.128, 7.488,2.064 - c0-0.024-3.248-0.008-4.744-0.024c 0.944,0.536, 1.872,1.104, 2.824,1.624c 1.664,0.12, 2.968,0.368, 2.496,0.784 - c 0.224,0.072, 0.576,0.16, 0.792,0.216c-0.168,0.152-0.392,0.264-0.664,0.368c 32.080,17.016, 68.624,26.696, 107.392,26.696 - c 32.056,0, 62.592-6.608, 90.344-18.512c-1.008-0.024-2-0.064-2.84-0.056c 0.128-0.040, 0.224-0.104, 0.336-0.16 - c-0.336,0-0.688,0.008-0.992,0.032c0-0.040,0-0.064,0-0.104c-0.664,0.072-1.328,0.12-2,0.12 - c 0.384-0.776, 2.496-0.68, 2.992-0.68c 0.12-0.008, 2.592-0.12, 2.864-0.136c-0.92-0.048-1.832-0.056-2.728-0.032 - c 0.112-0.192, 0.312-0.336, 0.56-0.488c-1.448,0.312-2.912,0.488-4,0.328c0,0.144, 0.16,0.224, 0.12,0.352 - c-0.032,0.112-4.928,1.4-2.56-0.608c-0.4,0.064-4.040,0.568-2.936,0.344c-0.376,0.128-0.872,0.136-1.4,0.296 - c 0.144,0.064, 0.328,0.12, 0.584,0.2c-1.416,0.28-2.808,0.208-4.144-0.2c 0.504-0.24, 1.032-0.416, 1.6-0.504 - c-0.192-0.28, 0.56-0.456, 1.432-0.664c-0.152,0.016-0.256,0-0.416-0.008c 0.736-0.528, 3.664-0.28, 5.208-0.192 - c-1.272-0.192-3.52-0.552-3.544-0.496c 0.048-0.6, 4.016-0.456, 4.512-0.608C 337.688,432.16, 336.528,432.288, 335.2,432.288 - c 0.216-2.872, 8.096-0.072, 10.72,0.48c 0.296-0.192, 0.824-0.504, 1.216-0.584C 347.080,431.848, 346.352,432, 346.272,431.584 - c 0.864-0.072, 2.216-0.12, 2.984-0.224c-0.16-0.096-0.152-0.216, 0.048-0.424c 1.64,0.088, 2.28,0.472, 4.112,0.592 - c-1.912,0.944-4.272,1.24-6.12,1.472c 0.176-0.016, 0.456-0.024, 0.616-0.016c-0.44,0.192-0.976,0.384-1.544,0.544 - c 1.208-0.128, 2.736-0.088, 4.248,0.024c 1.752-0.784, 3.52-1.536, 5.24-2.376c-1.304-0.016-2.44-0.112-2.528-0.456 - c0,0, 0.824-0.128, 1.232-0.16c-0.336-0.040-1.152-0.152-1.504-0.32c 1.752-0.104, 2.544,0.16, 4.144,0.232 - c 0.112-0.056, 0.208-0.104, 0.32-0.16c-1.384-1.696-14.52-6.968-16.24-7.064c 0.8-0.152, 1.144-0.248, 2.104-0.432 - c-2.768,0.328-14.888-2.016-8.544-6.392c-0.56-0.272-0.984-0.672-1.288-1.2c 1.040,0.168, 1.040,0.168, 2.28,0.080 - c 0.168-1.488-1.472-0.52-1.36-1.448c 0.304-3.264, 9.336-0.944, 10.36-0.312c 3.152,1.896, 3.952-0.104, 5.808-2.8 - c 0.68-1.040, 3.584-6.648, 5-6.792c 1.608-0.12, 8.84,1.632, 8.76,3.968c-6.032,1.048, 3.504,5.016, 3.392,5.504 - c-0.736,2.816-4.584,1.936-5.064,5.032c-0.496,2.976, 9.168,2.128, 8.52,4.088c 0.040,0.056, 0.168,0.16, 0.248,0.224 - c 1.144-0.656, 2.312-1.304, 3.448-1.976c-1.776-0.624-3.336-1.104-3.632-1.080c 0.896-1.104, 0.696-2.344, 2.48-2.84 - c-2.112-2.6, 6.568-3.232, 13.104-3.888c 0.808-0.568, 1.592-1.136, 2.392-1.712c-3.184,0.264-6.408,1.344-9.296-0.16 - c-1.344-0.696, 3.44-2.488, 3.472-3.912c-0.032,1.608-10.896-0.8-10.024-6.76c-1.12,0.040-2.224,0.072-3.344,0.152 - c-0.032,0.12, 0.088,0.432, 0.224,0.656c-2.744,0.992-13.888-2.896-13.384,0.504c-2.968,0.48-6.472,0.288-9.4,0.536 - c-0.264-0.712-0.112,0.312, 0.152,1.608c 0.688-0.248, 1.744,0.144, 1.88-0.864c 0.224,1.44-0.496,1.856-1.6,2.024 - c 0.32,1.144, 0.632,2.168, 0.872,2.136c-0.384,0.712-1.28,1.336-1.528,3c-5.792-2.264-5.832-2.264-2.656-7.664 - c 1.424-2.424-4.344-2.152-5.92-2.008c-5.408,0.432-4.808-4.32-9.24-5.28c-5.432-1.176-6.336-3.504-12.616-2.992 - c 0.056-1.040, 0.56-1.704, 0.608-2.648c-0.96-0.104-8.832,1.464-8.808-0.304c0-2.544, 13.504-4, 10.528-8.92 - c 0.064,0.024, 0.12,0.056, 0.184,0.12c 0.36-6.808-1.552-5.024-6.488-5.664c-4.408,0.352-8.712,1.512-13.104,1.84 - c-5.152,0.36-3.072-2.96-3.072-5.44c0-1.784-3.472-14.96, 0.512-15.256c 3.872-0.296, 5.32,1.168, 7.784-2.608 - c 1.912-2.96, 7.92,1.592, 11.128,0.376c 2.736,1.064, 5.752,3.248, 7.688,5.984c-6.416,2.768, 8.24,9.032, 8.424,9.608 - c-2.784,7.072, 7.808,1.48, 11.016,3.072c 6.528,3.304, 7.416,1.408, 12.36-3.712c-0.904,2, 21.504-15.464, 14.512-14.8 - c 0.464-2.968, 4.216,2.832, 4.328,2.248c-0.816,4.848-3.416,4.24, 3.296,2.496c-0.112,4.096-7.184,3.192-7.832,6.856 - c-4.664,0.448-12,6.632-12.608,11.128c-0.416,2.888, 13.712-6.856, 14.912-6.976c 0.56-3.2, 7.4-3.912, 8.296-8.8 - c 0.536-2.864, 6.336-8.6, 9.040-8.88c-1.472-3, 0.696-4.704, 4.208-5.080c-0.592,0.312-1.448,4.168-1.592,4.808 - c 1.488-1.28, 3.136-2.264, 4.904-1.36c-3,2.488-4.408,4.928-7.008,7.416c-0.456,2.2, 3.848-0.768, 3.896-0.768 - c 0.064,0.736-0.064,1.288-0.416,2.080c 2.528,0.464, 2.904,1.6, 5.576-0.344c 3.504-2.456, 3.056,0.792, 6.216,0.344 - c0-0.44, 0.968-1, 1.128-1.312c-1.424-0.528-9.448,0.832-8.784-2.208c 0.496-2.168, 3.888-0.752, 0.512-4.208 - c 3.088-1.568, 4.824-3.344, 7.408-5.608c-0.064-0.168-0.432-0.44-0.712-0.512c 8.792-0.848, 16.016-4.4, 24.696-2.064 - c 1.064-4.016, 0.168-7.128-0.088-11.144c-0.072-1.192, 0.32-5.2-0.688-5.944c-0.392-0.296, 3.64-7.808, 3.704-9.392 - c 0.472-10.64, 16.448-16.504, 18.664-26.216c 1.328-5.864, 6.136-9.408, 9.552-13.992c 4.608-6.168, 6.28-10.736, 9.688-17.336 - c 3.792-7.4, 8.28-6.792, 13.448-4.496c 0.44-3.328, 0.816-6.656, 1.12-10c-3.472-1.392-6.944-3.056-10.64-3.848 - c-8.192-1.472-11.336-3.832-13.608,6.040c-1.56,6.88-13.392,11.584-14.984,18.888c-1.192,5.528-2.568,7.472-6.184,11.52 - c-3.392,3.792-2.168,10.288-4.88,14.952c-2.344,4.016-2.888,8.248-5.064,12.464c-3.224,6.192-9.904,14.544-10.28,21.52 - c 2.176-2.344, 4.552-8.664, 7.12-9.080c 1.576,6.768, 1.784,8.512-0.856,15.056c-4.456-1.2-8.36,1.608-12.64,0.024 - c-5.776-2.128-10.248-1.392-16.024,0.656c-4.088,1.472-20.552,11.040-20.328-0.072c 0.264-12.896-15.152,3.832-19.128,5.152 - c-4.28,1.368-11.416-1.048-11.336,6.328c0,4.176, 1.56,7.36, 1.832,11.112c-1.216-1.184-2.352-1.096-3.384,0.248 - c-1.864,2.912-4.496-0.888-6.56-0.96c-4.328-0.16-8.24-0.024-12.496-0.2c-6.392-0.216-13.168-3.608-18.64-6.704 - c-6.776-3.952-12.784,1.824-16.632-3.344c 0.056,0.008, 0.144,0.008, 0.208,0.024c-3.392-4.496-7.352-8.488-10.672-13.088 - c-2.264-3.12-1.456-7.24-2.608-10.792c-1.048-3.344-4.824-6.52-8.016-7.688c-5.776-2.128-8.064-8.672-10.456-13.864 - c-1.928-4.232-3.488-8.192-5.776-12.224c-3-5.272, 1.024-13.672, 0.84-19.424c-0.16-4.048-1.664-8.736-3.848-12.2 - c-2.128-3.32, 0.6-7.36, 0.544-11.736c-0.128-0.040-0.24-0.040-0.36-0.040c 2.2-3.528, 4.912-6.712, 7.704-9.768 - c 4.976-5.464, 6.048-12.832, 11.336-18.16c 4.016-4.008, 8.728-10.304, 15.128-8.128c 2.928,1.008, 5.28,2.824, 8.512,2.896 - c 2.688,0.064, 4.784-2.296, 7.416-2.224c 6.192,0.168, 12.36,8.792, 19.88,8.952c 5.472,0.168, 5-9.192, 9.736-9.072 - c 15.4,0.288, 13.544-10.656, 9.648-21.264c-2.512-6.816, 4.248-13.28, 8.040-18.088c 3.8-4.8, 4.24-12.032, 5.816-17.856 - c 1.456-5.472, 4.128-14.056, 2.768-19.72c-1.336-5.624-6.048-9.648-7.112-15.472c-1.496-8.128, 1.608-16.128, 5.216-23.232 - c 3.472-6.832, 3.664-9.696, 4.496-17.192c 1.76-16.216, 14.216-27.92, 14.024-43.464c 1.232,0.72, 4.424-0.896, 7.824-0.728 - c-35.944-23.28-78.72-36.84-124.632-36.84C 221.848-6.008, 189.464,1.52, 160.304,14.92z M 421.704,64.744 - c 0.080,3.128-0.736,5.96, 2.96,9c 5.528,4.616, 7.304,2.784, 7.632,11.672c 0.128,3.808-7.168,13.2, 0.704,14.776 - c 0.912,5.608, 6.52,8.016, 10.8,10.672c 12.288,7.56, 2.824,18.248, 7.768,28.816c 1.824,3.856-4.056,8.36-4.008,12.576 - c 0.064,4.056-0.888,7.992-0.88,12.064c 0.048,4, 3.384,6.056, 4.192,9.776c 3.104,14.032, 15.128,17.888, 22.552,28.72 - c 3.608,5.272, 9.176,14.528, 12.52,23.68c0-0.832, 0.056-1.648, 0.056-2.472C 486,162.224, 461.472,106.12, 421.704,64.744zM 133.28,412.128c0-0.184-0.664-0.528-1.128-0.792C 132.8,411.512, 133.224,411.752, 133.28,412.128zM 168.76,415.392c-0.656,0.104-1.36-0.128-2.088-0.736C 167.248,415.144, 167.976,415.368, 168.76,415.392zM 160.496,420.776c 0.032,0, 0.056,0, 0.112,0C 160.752,420.832, 160.68,420.824, 160.496,420.776zM 177.584,368.040c 0.144,0.32-0.264,0.472-0.336,0.808c-1.448-0.592-2.704-1.496-3.736-2.672 - c-0.504-1, 3.632-0.832, 4.344,0.648C 175.472,366.872, 177.16,367.192, 177.584,368.040zM 190.344,371.736c-0.424,0.024-1-0.048-1.28-0.192c 0.464,1.128, 0.84,1.808, 1.128,2.464 - c-0.624-0.2-2-0.176-3.112,0.040c-0.456-0.112-0.936-0.184-1.392-0.288c0,0, 0.12,0.288, 0.136,0.384 - c-0.632,0.008-1.24,0.008-1.872,0.008c 0.088,0.544, 0.424,0.88, 0.952,1c-1.112,0.56-2.216,0.488-3.32-0.2 - c 0.104,0.248, 5.832,4.856, 4.392,4.88c-4.68,0-8.096-6.568-12.472-7.896c0-0.24, 0.336-0.392, 0.632-0.392 - c-0.528-1.152-2.272-0.816-2.792-1.888c-0.024-0.096, 11.040-0.904, 12.304-0.912c-0.696-0.28-1.304-0.688-1.76-1.256 - c-0.232-0.528, 4.736,2.096, 4.696,2.064c 2.12-2.2, 1.888-5.376, 4.104,0.248c-0.808-0.296-0.536-0.472-1.624-0.448 - C 189.696,370.976, 189.448,370.136, 190.344,371.736zM 137.832,401.984c-0.168-0.168-0.368-0.36-0.536-0.568c 1.232,0.136, 3.872,1.080, 5.024,1.6 - C 140.704,403.448, 139.304,402.648, 137.832,401.984zM 176.64,375.248c-1.64,0.88-2.744,2.2-6.064,1.712C 172.024,375.856, 174.72,373.872, 176.64,375.248zM 91.744,298.736c 0.024,0.4, 0.024,0.776, 0.032,1.152C 91.472,299.496, 91.384,298.64, 91.744,298.736zM 94.664,275.472c-0.376-0.416-4.432-1.696-2.808-2.128C 93.552,273.216, 94.496,273.936, 94.664,275.472zM 243.32,419.904c 0.584,1.824, 4.176-2.928, 5.16,0c-0.968,0.536-1.992,0.968-3.032,1.256c 1.864,0.032, 4.888-1.376, 6.544,0.52 - c-0.312,0.072-0.592,0.232-0.504,0.44c 1.264,0.064, 2.688,0.336, 3.264,0.808c-0.904-0.12-1.712,0.040-2.464,0.496 - c 0.336,0.952, 2-0.224, 2.48,1.024c 0.504,1.328-2.624,1.128-2.48,1.488c 0.672,1.592, 5.696-0.64, 6.344,0.968 - c-0.792,0.416-1.64,0.664-2.536,0.784c 0.416,0.016, 0.92,0.104, 1.288,0.176c-1.488,0.384-2.944,0.472-4.44,0.304 - c 1.744,0.904, 11.24,3.016, 11.928,4.24c 2.64,0.136, 7.632,0.448, 8.336,1.584c 0.24,0.384-23.304-2.464-24.672-2.664 - c 0.312,0.264, 5.16,1.808, 5.28,1.96c 0.088,0.136-0.928,0.064-2.272-0.088c 1.664,0.296, 3.056,0.768, 3.944,1.496 - c-12.448,0.288-25.888,0.992-38.040-1.816c 0.128-0.104, 0.456-0.104, 0.672-0.192c-0.632,0-1.256-0.104-1.848-0.336 - c 0.6-0.416, 1.264-0.592, 2-0.56c-1-0.080-5.872,0.904-6.472-0.024c-0.104-0.152, 0.056-0.256, 0.088-0.392 - c-0.96,0.36-2.304,0.584-2.76-0.248c-1.8-0.12-14.016-0.632-15.336-3.152c 0.736-0.304, 1.48-0.384, 2.264-0.208 - c-1.32-2.512-6.88-0.32-7.92-2.552c-0.384-0.72, 5.016-0.328, 5.512-0.32c-1.080-1.224-4.096,0.128-5-1.224 - c 0.76,0.136, 1.488,0.048, 2.192-0.232c-0.216-0.2-0.44-0.224-0.792-0.368c 0.792-0.416, 1.512-0.504, 2.32-0.312 - c-0.088,0.008-0.216,0.088-0.256,0.144c 2.36,0.64, 11.192,0.64, 9.576-3.56c 1.12-0.264, 1.048-0.704-0.088-1.24 - c 0.976,0.056, 3.648-1.448, 4-1.528c-0.752-1.168-2.336,0.24-3.448-0.016c-0.064-0.688, 2.696-0.808, 3.888-1.080 - C 204.752,414.024, 201.568,413.6, 200.96,411.64c 0.24,0.144, 0.52,0.112, 0.752-0.008c-1.528-2.080, 1.136-2.432, 1.832-3.256 - c-3.384-1.8, 5.848-6, 7.16-6.096c 1.944-0.16, 6.472,7.424, 10.232,8.136c-0.072-0.192-0.136-0.392-0.176-0.608 - c 4.032-0.104, 6.136,2.224, 9.68,3.216c 5.464-0.072, 11.232,0.872, 16.424,2.624c-1.28,0.24-6.792,0.152-6.488,1.048 - c 1.736,0.184, 0.776,0.184, 1.072,1.136c 0.792-0.264, 6.728-2.464, 7.12-1.16C 249.136,418.6, 244.224,419.416, 243.32,419.904zM 89.488,301.92c-0.488,0.056-1.456-0.416-1.904-0.904c 0.584-0.088, 1.488-0.336, 2.552-0.32 - C 90.136,301.136, 90.176,301.832, 89.488,301.92zM 269.304,415.112c-0.848,0.088-8.256,0.856-8.368,0c-1.040,0.584-2.272-0.28-2.96,0.752c-0.784-0.416-2.952-1.24-2.048,0.904 - c-0.984,0.096-2.472-0.336-3.416-0.488c-0.144-0.336, 2.776-1.696, 2.624-1.608c-0.808-0.112-2.624-0.168-3.568-0.096 - c 0.336-0.512, 1.72-0.168, 2.624-0.424c-0.448-0.488-0.824-0.728-1.192-1.328c-0.168,0.024-0.472-0.104-0.72-0.152 - c 6.64-0.656, 10.352-3.456, 17.464-0.376C 270.256,413.184, 267.368,414.608, 269.304,415.112zM 176.824,378.192C 175.128,376.832, 178.824,377.912, 176.824,378.192L 176.824,378.192zM 75.376,254.824c-0.496,0.496-1.568,1.84-2.824,2.152c-0.832,0.176-3.96-3.848, 3.096-3.536 - c 0.16,0.72, 0.16,1.296-0.36,1.784C 75.32,255.080, 75.344,254.976, 75.376,254.824zM 97.672,264.24c-1.768,0.264-3.704-1.312-4.968,0.664c-2.736,4.176-2.928-6.6-2.976-7.688 - c-0.672,0.336-11.968-0.608-6.176-3.96c 2.224,6.080, 7.472-3.408, 7.52-3.424c 0.84-0.16, 4.376,5.336, 4.64,2.952 - c 0.008-0.040, 7.648-0.040, 7.968-0.096c0-0.208-0.944,3.168-1.384,4.768C 100.888,259.92, 101.392,263.64, 97.672,264.24zM 167.024,369.072c-0.232-0.088-0.568-0.304-0.672-0.552c-0.4-0.696, 4.088-3.296, 5.32-0.768 - C 169.728,367.136, 168.192,367.584, 167.024,369.072zM 86.536,266.056c-1.504,2.144, 0.88,4-2.416,4.96c 0.28,1.832-4.536,8.744-6.664,10.808 - c-6.6,6.408-11.144,5.176-17.136-2.408c 5.872-0.776, 6.576,7.416, 8.488,0.904c 7.456-0.92, 8.968-8.72, 6.912-13.656 - C 79.448,266.040, 83.080,261.44, 86.536,266.056zM 107.488,249.528c-0.856-2.6, 3.76-3.936, 5.032-2.144C 112.464,248.624, 108.304,252.152, 107.488,249.528zM 102.296,257.456c 0.024-0.056, 0.032-0.112, 0.072-0.168C 101.96,258.736, 102.016,258.4, 102.296,257.456zM 86.32,291.776c 0.232,0.496-0.224,2.864-0.56,2.216C 85.584,293.64, 85.128,289.28, 86.32,291.776zM 64.92,278.616c-0.824-0.192-1.36-0.752-1.632-1.576c 0.496,1.040, 0.808-2.496, 2.6,2.64 - C 65.28,280.36, 65.312,279.488, 64.92,278.616zM 148.416,422.832c-0.128,0-0.968-0.16-1.336-0.384c 0.104,0, 7.024-0.2, 5.168,0.784C 150.936,423.624, 149.664,423.48, 148.416,422.832zM 347.832,363.96c 0.208-0.784, 1.216-1.32, 1.272-2.072C 350.12,353.368, 355.808,365.152, 347.832,363.96zM 295.72,398.664c 4.976-0.344, 8.040,1.088, 8.168,5.56c 0.008,0.664, 4.168,3.192-1.424,3.552 - c-0.944,0.056-5.808,0.272-3.976-1.688c-0.736-0.4-3.84-0.016-3.928-1.112c 0.584-0.488, 1.184-0.96, 1.792-1.44 - C 295.92,402.208, 290.552,399.016, 295.72,398.664zM 350.272,365.52c 0.224,0.544, 0.28,2.48, 0.48,3.536c-0.336,0.096-0.472,0.552-0.544,1 - c-0.672-0.504-1.424-0.784-2.264-0.84C 348.528,368.456, 349.168,365.808, 350.272,365.52zM 404.328,340.28c-1.904,0.712-4.552,1.504-6.832,1.32C 398.936,340.808, 402.632,339.504, 404.328,340.28zM 333.352,361.232c-0.296,1.304-1.080,1.528-2.296,0.568C 331.168,361.68, 333.472,359.96, 333.352,361.232zM 308.584,405.032c-0.576-0.144-0.688-0.392-0.688-0.712c 0.592-0.024, 0.88-0.064, 1.072-0.064c0,0.32, 0.088,0.56, 0.088,0.752 - C 308.968,405, 308.704,405.008, 308.584,405.032zM 302.608,413.68c 1.008-0.056, 1.808,0.512, 1.816,1.112C 304.224,414.808, 300.744,413.8, 302.608,413.68zM 303.44,413.080c-0.040-0.704, 0.68-0.92, 2.072-1.176c-0.064-1.776, 0.32-1.344, 0.272-3.528 - c 0.248-0.008, 0.496-0.032, 0.752-0.048c-0.192,0.248-0.472,0.448, 0.024,0.872c 3.168-1.608, 0.648-0.576, 0.608-2.72 - c-0.024-0.952, 3.984-0.504, 4.584-0.568c-1.12-1.4, 0.104-1.656, 1.608-1.656c0-2.016-2.728-1.96-4.304-1.848 - c0-2.336-1.92-2.6-1.92-3.856c0-0.352, 5.216-1.288, 5.928-0.56c 0.048-1.136-5.4-2.024-6.552-3.96 - c 1.984-0.12, 18.568,1.376, 18.52,2.136c-0.648,0.136-1.328,0.28-1.976,0.432c 2.248,2.568, 2.248,4.992, 0.088,4 - c-0.384-0.136-0.456-0.32-1.136-0.4c-0.152,3.736-5.864,7.536-9.624,8.496c 0.368,0.904, 3.592,2.16, 3.224,3.68 - c-2.88-1.312-4.776-1.024-5.712,0.832c 0.792,0.328, 1.576,0.752, 2.304,1.216c 0.104,3.136-7.952-1.008-6.28-1.672 - C 305.912,412.448, 303.616,413.072, 303.44,413.080zM 369.224,348.912c 0.104-0.008, 0.168,3.512, 0.384,4.44c-1.352,0.344-7.168,0.84-8.28,0.432 - C 361.528,352.552, 367.848,349.048, 369.224,348.912zM 377.352,408.776c 1.144-0.104, 1.64,0.896, 1.68,1.752c-0.664,0.224-2.984,0.96-0.984-0.56c-0.696,0-1.136-0.272-1.848-0.272 - C 376.304,409.36, 376.504,408.84, 377.352,408.776zM 330.336,434.056c0,0.016,0,0.024,0,0.040c-0.040-0.008-0.040-0.016-0.080-0.016c-0.704-0.144, 0.688-0.68, 1.64-0.816 - C 331.528,433.664, 330.92,433.784, 330.336,434.056zM 369.272,409.2c-0.568,0.008-2.824-1.008-1.6-2C 368.168,407.856, 368.72,408.56, 369.272,409.2zM 350.976,403.008c-0.176,0.376-0.392,0.376-0.672-0.024c 2.816-1.888, 2.088,1.568, 3.888,1.768 - C 352.032,408.4, 348,404.576, 352.136,403.736C 352.2,403.384, 351.608,403.008, 350.976,403.008zM 428.632,339.448c-1.696-0.112-4.144-0.848-5.528-1.376C 423.8,335.048, 428.704,338, 428.632,339.448zM 177.144,423.656c0,0-0.44-0.024-0.816,0c 0.376,0.168, 0.784,0.272, 1.176,0.28c-0.168,1.16-18.256-0.44-16.968-0.088 - c-0.472,0.224-2.52-0.184-1.944,0.416c 0.824,0.032, 1.632,0.072, 2.432,0.088c-0.336,0.944-9.624,1.024-10.52,0.472 - c 0.928-0.408, 1.92-0.624, 2.984-0.608c 1.152,0.704, 1.864,0.448, 2.112-0.792c-3.888-0.688, 3.488-0.832, 4.56-0.8 - C 164.152,424.904, 172.592,420.832, 177.144,423.656zM 130.832,413.504c-4.024-0.6, 3.688-0.608, 4.816-0.352C 136.928,415.928, 129.272,413.224, 130.832,413.504zM 156.392,425.768c 0.656-0.024, 1.208,0.152, 1.68,0.496c-1.648-0.168-3.32-0.016-4.952-0.408 - C 153.12,425.856, 156.112,425.736, 156.392,425.768zM 154.352,428.376c0,0-0.008,0-0.016-0.008C 154.624,428.392, 154.552,428.376, 154.352,428.376zM 154.352,428.376c 0.232,0.152, 0.464,0.256, 0.68,0.384c-0.392-0.016-1.184-0.016-1.944-0.056 - C 152.496,428.376, 153.864,428.376, 154.352,428.376zM 162.32,427.304c-0.304-0.104-0.552-0.088-0.808-0.080c-0.064-0.024-0.16-0.072-0.2-0.088 - C 161.744,427.176, 162.032,427.248, 162.32,427.304zM 160.776,428.496c-0.576-0.024-1.064-0.088-1.28-0.208C 160,428.36, 160.392,428.416, 160.776,428.496zM 155.904,426.48c 1.408,1.656-4.624,1.248-3.128,0.016C 149.84,426.168, 154.512,426.448, 155.904,426.48zM 191.4,429.696c-0.016,0.24-0.496,0.28-0.968,0.376c 0.904,0, 1.432,0, 1.696,0.368C 191.72,430.416, 191.28,430.4, 190.816,430.392 - c 5.072,1.296, 10.584,1.152, 15.68,2.576c-0.952-0.008-2.536-0.144-2.856-0.024c 0.496,0.072, 6.208,0.072, 6.52,0.696 - c 0.448,0.856-9.192-0.592-5.544,0.32c-7.056,2.512-26.928,0.752-33.968-1.856c 1.304,0.040, 2.576,0.192, 3.856,0.208 - C 173.792,432.224, 173.36,432.176, 172.504,432c 1.472-0.248, 2.896,0.312, 4.384,0.24c-1.6-0.176-2.832-0.152-4.24-0.608 - c 0.856,0.024, 1.696,0.056, 2.536,0.072c-0.592-0.072-1.192-0.16-1.768-0.24c 0.248-0.392, 1.472-0.552, 3.032-0.552 - c 0.904-0.264, 0.568-0.4-0.952-0.384c 0.616-0.080, 2.272-0.672, 2.080-0.816c-3.152-2.168-3.664,0.312-5.584-0.8 - c 0.992,0.568, 1.28,0.808-0.192,0.784c 0.016-0.032, 0.040-0.088, 0.064-0.112c-1.304-0.744-5.272,0.936-7.2,0.936 - c-0.392-0.224, 0.528-0.224, 1.032-0.304c-1.152-0.016-2.288-0.104-3.408-0.248c 0.112-0.152, 0.28-0.184, 0.4-0.264 - c-0.856,0.024-1.8,0.080-2.472-0.272c 0.544-0.296, 1.144-0.392, 1.776-0.32c-0.96,0-2-0.024-2.984-0.048 - c-0.808-0.528, 0.296-0.544, 2.248-0.488c-0.176-0.040-0.328-0.056-0.488-0.088c 1.6,0.040, 4.088-0.224, 4.816-0.28 - c-1.712-0.008-3.392-0.192-5.064-0.52c 0.248-0.352, 0.608-0.456, 0.992-0.472c 1.128,0.432, 5.416,0.096, 6.768,0.152 - c 0.064,0.152-0.104,0.176-0.128,0.368c 1.576,0.336, 4.264,0.56, 5.8-0.632c-0.96-0.048-8.16,0.736-5-0.64 - c-1.192-0.096-2.376-0.288-3.472-0.544c 5.664,0.544, 14.736-2.728, 18.616,1c 0.208,0.2-1.44,0.112-2.080,0.040 - c 0.944,0.824, 3.024,0.408, 3.512,1.528C 187.848,428.648, 189.048,429.224, 191.4,429.696zM 165.48,425.928c-1.264-0.128-2.352-0.424-3.184-1.024C 163.336,425.32, 164.376,425.656, 165.48,425.928zM 155.904,426.48c-0.016-0.016,0-0.032-0.040-0.056C 156.472,426.488, 156.36,426.488, 155.904,426.48zM 171.912,421.416c-0.592-0.448, 1.76-0.976, 1.92-0.976c 1.592,0.056, 4.8-0.040, 6.336,0.704 - C 178.216,421.528, 173.808,422.808, 171.912,421.416z" data-tags="globe2" /> -<glyph unicode="f" d="M 295.408,312.224l 0.144,44.192c0,23.032, 2.184,35.328, 35.208,35.328l 44.168,0 L 374.928,480 l-70.672,0 C 219.384,480, 189.48,437.176, 189.48,365.216l0-52.992 - l-52.936,0 L 136.544,224 l 52.936,0 l0-256 l 105.928,0 L 295.408,224 l 70.672,0 l 9.376,88.224L 295.408,312.224 z" data-tags="facebook" /> -<glyph unicode="+" d="M 398.904,140.312c-1.888,10.080-4.744,19.816-8.584,29.064l-0.76,1.72L 256,480L 122.344,170.904l-0.608-1.4 - c-3.872-9.264-6.744-19.064-8.632-29.192c-1.624-8.696-2.576-17.664-2.576-26.832C 110.52,33.144, 175.656-32, 256-32 - c 80.36,0, 145.48,65.144, 145.48,145.488C 401.48,122.648, 400.528,131.616, 398.904,140.312z" data-tags="drip" /> -<glyph unicode="d" d="M 256,479.976C 114.632,479.976,0,365.368,0,224c0-141.392, 114.632-255.976, 256-255.976S 512,82.608, 512,224C 512,365.368, 397.368,479.976, 256,479.976z - M 474.52,226.408c-9.616,2.016-80.168,15.968-151.944,6.96c-1.512,3.784-3.048,7.56-4.696,11.368 - c-4.584,10.768-9.512,21.464-14.656,31.968c 80.728,33.008, 116.872,79.256, 121.816,85.96C 455.544,325.504, 473.952,278.104, 474.52,226.408z - M 400.408,387.896c-4.76-6.752-37.256-49.672-114.080-78.488c-35.696,65.464-74.616,118.152-81.312,127.040c 16.384,3.92, 33.392,6.224, 50.984,6.224 - C 311.424,442.68, 361.872,421.888, 400.408,387.896z M 163.016,421.696c 6.080-8.28, 44.568-61.2, 80.832-125.6c-101.52-26.96-190.080-26.96-201.744-26.832 - C 56.352,336.952, 101.992,392.928, 163.016,421.696z M 37.352,224c0,2.336, 0.272,4.6, 0.344,6.912c 12.832-0.208, 116.52-0.912, 224.344,31.336 - c 6.304-12.32, 12.272-24.84, 17.808-37.336c-2.88-0.832-5.792-1.688-8.64-2.632c-111.656-36.072-171.44-132.72-178.024-143.864 - C 58.576,117.096, 37.352,168, 37.352,224z M 121.488,51.848c 5.112,10.272, 49.768,93.632, 171.928,136.184c 0.464,0.168, 0.96,0.32, 1.416,0.456 - c 30.44-79.064, 43.24-145.392, 46.728-165.76C 315.28,11.536, 286.368,5.328, 256,5.328C 205.216,5.328, 158.6,22.8, 121.488,51.848z - M 378.552,42.896c-2.648,15.368-14.488,78.568-42.576,155.824c 67.368,10.76, 126.032-6.16, 135.696-9.168 - C 462.008,128.672, 427.496,76.088, 378.552,42.896z" data-tags="dribbble" /> -<glyph unicode="4" d="M 512,344.544c0,19.056-15.464,34.496-34.504,34.496c-19.064,0-34.496-15.448-34.496-34.496c0-17.176, 12.576-31.312, 29.016-33.96 - l-68.344-102.688l-68.264,102.568c 16.984,2.16, 30.176,16.496, 30.176,34.080c0,19.056-15.464,34.496-34.504,34.496c-19.064,0-34.504-15.448-34.504-34.496 - c0-16.784, 11.984-30.744, 27.856-33.84l-68.416-102.8l-68.16,102.416c 17.72,1.448, 31.696,16.128, 31.696,34.224c0,19.056-15.44,34.496-34.504,34.496 - c-19.048,0-34.504-15.448-34.504-34.496c0-16.28, 11.312-29.832, 26.456-33.48l-68.648-103.168L 40.008,310.584 - c 16.424,2.648, 29.016,16.784, 29.016,33.96c0,19.056-15.456,34.496-34.52,34.496C 15.456,379.048,0,363.6,0,344.544 - c0-19.064, 15.456-34.504, 34.504-34.504l 0.016,0 L 34.504,68.952l 442.992,0 L 477.496,310.040 C 496.536,310.040, 512,325.488, 512,344.544z" data-tags="crown" /> -<glyph unicode="x" d="M 512.008,402.576L 434.616,480L 256.008,301.408L 77.408,480L-0.008,402.608L 178.6,223.984L-0.008,45.384L 77.4-32L 256.008,146.592L 434.616-32L 512.008,45.416L 333.416,224.008 z" data-tags="cross" /> -<glyph unicode="~" d="M 78.92-32L 22.52-32L 22.52,480L 78.92,480L 78.92-32 zM 111,163.68c0,0, 114.368-57.328, 207.080-12.248c 100.936,49.072, 144.76,13.2, 171.4,12.248L 489.48,428.416 - c-26.64,0.96-70.464,36.824-171.4-12.248c-92.712-45.072-207.080,12.248-207.080,12.248L 111,163.68 z" data-tags="flag" /> -<glyph unicode="3" d="M 84.688,112.256c0,28.184, 10.632,62.384, 52.592,86.288c-1.528,0.352-2.856,0.792-4.448,1.112c 12.104,12, 19.312,29.944, 19.312,49.136 - c0,35.112-23.856,63.696-53.208,63.696c-29.32,0-53.208-28.584-53.208-63.696c0-19.184, 7.208-37.136, 19.328-49.136 - C 21.872,190.952,0,170.944,0,140.096c0-21.664, 43.336-30.688, 85.296-32.256C 85.136,109.32, 84.688,110.688, 84.688,112.256zM 446.944,199.656c 12.12,12, 19.328,29.944, 19.328,49.136c0,35.112-23.88,63.696-53.2,63.696c-29.36,0-53.224-28.584-53.224-63.696 - c0-19.184, 7.216-37.136, 19.32-49.136c-1.568-0.32-2.904-0.76-4.424-1.112c 41.944-23.904, 52.576-58.104, 52.576-86.288 - c0-1.568-0.44-2.936-0.608-4.424C 468.672,109.408, 512,118.448, 512,140.096C 512,170.944, 490.128,190.952, 446.944,199.656zM 310.168,207.424c 19.336,19.168, 30.848,47.856, 30.848,78.496c0,56.136-38.136,101.784-85.008,101.784 - c-46.864,0-85.008-45.648-85.008-101.784c0-30.64, 11.52-59.336, 30.864-78.496c-68.96-13.856-103.928-45.832-103.928-95.168 - c0-38.36, 85.168-51.96, 158.072-51.96s 158.072,13.6, 158.072,51.96C 414.080,161.584, 379.112,193.56, 310.168,207.424z" data-tags="team" /> -<glyph unicode="2" d="M 223.448,480c0,0, 75.752-113.64, 63.84-183.968l 2.8,4.432c0,0, 20.016,51.976, 47.112,67.84c-20.552-53.272, 24.592-133.72, 27.232-136.68 - C 512.904,64.672, 315.2-32, 315.2-32l 1.92,0 c0,0, 31.248,68.88-10.68,105.048c-39.504,34.064-49.488,69.64-49.488,108.248 - c0-38.608-9.976-74.184-49.472-108.248C 165.568,36.88, 196.792-32, 196.792-32s-197.696,96.672-49.208,263.624 - c 77.008,86.576, 87.664,148.272, 76.832,231.592L 223.448,480z" data-tags="flame" /> -<glyph unicode="5" d="M 345.168,271.144c-18.368-25.984-39.728-46.168-62.896-55.168l0-106.24 c0-2.56-0.344-5.032-0.944-7.4l 46.576,0 l0-27.616 l 19.368,0 l0-89.064 - L 164.736-14.344 L 164.736,74.72 l 19.368,0 l0,27.616 l 46.576,0 c-0.6,2.368-0.936,4.832-0.936,7.4l0,106.24 c-23.168,9-44.536,29.184-62.904,55.168 - C 21.568,334.944-4.96,367.104, 0.688,395.336c 6.552,32.544, 62.968,37.848, 103.936,37.312c-1.376,10.464-2.12,20.448-2.12,29.696 - c 102.328,0, 193.6,0, 306.992,0c0-9.248-0.76-19.232-2.12-29.696c 40.96,0.536, 97.384-4.768, 103.92-37.312 - C 516.968,367.104, 490.448,334.944, 345.168,271.144z M 400.784,397.632c-6.048-24.864-14.984-50.824-26.272-75.176 - c 81.768,38.968, 99.904,58.736, 103.888,65.248C 468.624,394.096, 434.424,398.544, 400.784,397.632z M 33.616,387.704 - c 3.992-6.504, 22.12-26.28, 103.888-65.248c-11.312,24.352-20.232,50.312-26.256,75.176C 77.544,398.536, 43.376,394.088, 33.616,387.704z" data-tags="cup" /> -<glyph unicode="6" d="M 496.384,255.072l-57.080,46.832c-12.728,10.448-25.096,20.584-33.64,27.6c-36.2,34.56-89.768,56.52-149.664,56.52 - c-59.952,0-113.536-22-149.76-56.6c-8.528-7-20.856-17.12-33.544-27.528l-57.080-46.832c-20.824-17.088-20.824-45.048,0-62.136l 57.080-46.832 - c 12.728-10.456, 25.096-20.592, 33.624-27.6c 36.216-34.56, 89.784-56.528, 149.68-56.528c 59.936,0, 113.536,22, 149.744,56.608 - c 8.544,7.008, 20.872,17.12, 33.56,27.52l 57.080,46.84C 517.2,210.032, 517.2,237.984, 496.384,255.072z M 256,124.448 - c-54.984,0-99.552,44.584-99.552,99.552c0,54.984, 44.568,99.552, 99.552,99.552S 355.552,278.984, 355.552,224 - C 355.552,169.032, 310.984,124.448, 256,124.448zM 208.048,224A47.952,47.952 180 1 1 303.952,224A47.952,47.952 180 1 1 208.048,224z" data-tags="eye" /> -<glyph unicode="7" d="M 400.8,459.792L 111.208,459.792 C 49.784,459.792,0,410.016,0,348.584l0-149.504 c0-61.416, 49.784-111.2, 111.208-111.2l 25.336,0 l0-99.664 l 99.664,99.664L 400.8,87.88 - c 61.416,0, 111.2,49.792, 111.2,111.2L 512,348.584 C 512,410.016, 462.208,459.792, 400.8,459.792z" data-tags="comment" /> -<glyph unicode="8" d="M 63.968,480L 63.968-32L 256,66.304L 448.032-32L 448.032,480 z" data-tags="tag" /> -<glyph unicode="h" d="M0,424L 512,424L 512,344.664L0,344.664zM0,263.672L 512,263.672L 512,184.336L0,184.336zM0,103.344L 512,103.344L 512,24L0,24z" data-tags="menu" /> -<glyph unicode="9" d="M 301.608,479.976L 210.416,480L 210.408,269.6L 0.008,269.592L0,178.416L 210.416,178.4L 210.416-32L 301.584-31.992L 301.6,178.416L 512,178.424L 511.984,269.6L 301.592,269.6 z" data-tags="plus" /> -<glyph unicode="1" d="M 490.824,157.272c 0.48,12.56-9.072,24.984-23.944,28.912C 414.776,200, 361.648,208.568, 308.264,211.952l0,13.144 - c 36.248,22.544, 61.032,67.68, 61.032,119.8C 369.296,419.504, 318.568,480, 256,480S 142.704,419.504, 142.704,344.888c0-52.544, 25.208-97.984, 61.952-120.328 - l0-12.608 C 151.264,208.568, 98.144,200, 46.040,186.184c-14.872-3.944-24.424-16.352-23.944-28.912L 21.128,157.272 L 21.128-32 l 469.752,0 L 490.88,157.272 L 490.824,157.272 z" data-tags="profile" /> -<glyph unicode="^" d="M 255.88,349.552C 189.616,504.208, 1.24,468.112,0,288.616c-0.728-103.784, 248.776-261.984, 256.264-287.632 - C 263.104,27.64, 512.712,186.624, 512,289.696C 510.76,469.632, 319.096,498.024, 255.88,349.552z" data-tags="heart" /> -<glyph unicode="#" d="M 42.016,246.264c0,0, 170.664-29.704, 212.952,219.608c 34.872,40.056, 57.384-16.664, 60.104-27.472 - c 12.704-50.64-8.912-120.184-15.584-151.352l 3.696-0.728l 143.928,0 c0,0, 50.456-51.856, 7.432-85.24c 12.608-17.808, 36.44-51.816, 2.296-82.976 - c 14.096-19.288, 14.848-51.752-20.744-80.68c 7.432-45.264, 2.136-57.552-39.44-63.48C 353.096-32.28, 231.208-32, 231.208-32 - s-60.848,30.424-69.736,51.192c-8.912,20.768-123.92,6.688-123.92,6.688L 37.552,233.64 L 42.016,246.264z" data-tags="thumbs-up" /> -<glyph unicode=" " horiz-adv-x="256" /> -</font></defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/oli.eot b/app/assets/fonts/oli.eot deleted file mode 100644 index 5ee2cedf..00000000 Binary files a/app/assets/fonts/oli.eot and /dev/null differ diff --git a/app/assets/fonts/oli.svg b/app/assets/fonts/oli.svg deleted file mode 100644 index 304697a7..00000000 --- a/app/assets/fonts/oli.svg +++ /dev/null @@ -1,607 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata> -This is a custom SVG font generated by IcoMoon. -<iconset grid="16"></iconset> -</metadata> -<defs> -<font id="oli" horiz-adv-x="512" > -<font-face units-per-em="512" ascent="480" descent="-32" /> -<missing-glyph horiz-adv-x="512" /> -<glyph class="hidden" unicode="" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" /> -<glyph unicode="g" d="M 256.056,180.472c-3.792,0-7.504-0.176-11.2-0.392c-2.488,7.024-3.936,14.712-3.936,23.096c0,8.264, 1.456,22.824, 3.824,22.856 - c 1.264,0, 2.536-0.12, 3.752-0.12c 62.84,0, 113.824,51.008, 113.824,113.912c0,15.016-6.84,34.448-14.896,42.44l 39.088,21.856L 386.512,480 L 305.032,434.536 - c-18.104,12.048-36.504,19.128-59.872,19.128c-62.84,0-112.168-50.912-112.168-113.816c0-35.36, 16.992-66.992, 42.296-87.848 - c-7.080-14.8-10.712-31.24-10.712-48.736c0-15.68, 3.504-30.6, 9.256-44.192c-33.104-19.376-54.472-50.104-54.472-84.792 - C 119.368,15.552, 180.584-32, 256.024-32c 75.464,0, 136.608,47.552, 136.608,106.28C 392.632,132.912, 331.512,180.472, 256.056,180.472z - M 248.488,393c 29.368,0, 53.128-23.792, 53.128-53.096c0-29.392-23.76-53.16-53.128-53.16c-29.36,0-53.16,23.768-53.16,53.16 - C 195.328,369.208, 219.128,393, 248.488,393z M 256.056,33.384c-33.48,0-60.728,18.288-60.728,40.896c0,22.52, 27.248,40.832, 60.728,40.832 - c 33.536,0, 60.72-18.312, 60.72-40.832C 316.776,51.672, 289.592,33.384, 256.056,33.384z" /> -<glyph unicode="t" d="M 512,382.792c-18.832-8.352-39.080-14-60.328-16.536c 21.688,13, 38.344,33.584, 46.184,58.12c-20.296-12.040-42.784-20.784-66.712-25.496 - c-19.16,20.416-46.456,33.168-76.664,33.168c-58.016,0-105.048-47.032-105.048-105.040c0-8.232, 0.92-16.248, 2.72-23.944 - c-87.304,4.384-164.704,46.2-216.504,109.76c-9.048-15.512-14.224-33.56-14.224-52.816c0-36.448, 18.544-68.592, 46.736-87.432 - c-17.216,0.544-33.424,5.272-47.576,13.144c-0.016-0.448-0.016-0.88-0.016-1.328c0-50.888, 36.208-93.344, 84.264-103 - c-8.816-2.4-18.096-3.68-27.672-3.68c-6.776,0-13.352,0.656-19.768,1.88c 13.368-41.736, 52.16-72.104, 98.128-72.944 - C 119.56,78.472, 74.272,61.68, 25.056,61.68c-8.48,0-16.832,0.496-25.056,1.472c 46.488-29.808, 101.704-47.192, 161.024-47.192 - c 193.208,0, 298.864,160.064, 298.864,298.872c0,4.544-0.104,9.080-0.304,13.584C 480.112,343.224, 497.92,361.728, 512,382.792z" /> -<glyph unicode="c" d="M 381.448,105.816c-7.576-8.056-15.856-15.264-24.688-21.608c 8.264-29.048, 16.248-58.152, 23.712-87.416 - c-28.24-9.6-56.488-19.184-84.752-28.792c-11.92,27.76-23.312,55.696-34.456,83.76c-10.864-0.344-21.824,0.344-32.736,2.104 - c-14.712-26.36-29.768-52.56-45.2-78.52c-26.752,13.168-53.512,26.376-80.248,39.544c 11.176,28.064, 22.776,55.952, 34.736,83.672 - c-8.056,7.568-15.256,15.856-21.608,24.672c-29.040-8.248-58.16-16.232-87.424-23.672C 19.192,127.776, 9.592,156.016,0,184.272 - c 27.744,11.928, 55.696,23.328, 83.76,34.472c-0.344,10.856, 0.336,21.832, 2.104,32.736c-26.376,14.696-52.544,29.744-78.504,45.168 - c 13.176,26.768, 26.36,53.512, 39.536,80.264c 28.056-11.184, 55.936-22.784, 83.672-34.736c 7.584,8.056, 15.856,15.256, 24.68,21.592 - c-8.256,29.032-16.24,58.16-23.688,87.424c 28.232,9.616, 56.48,19.2, 84.72,28.808c 11.912-27.752, 23.328-55.696, 34.464-83.76 - c 10.864,0.344, 21.832-0.344, 32.744-2.096c 14.688,26.36, 29.744,52.552, 45.184,78.512c 26.744-13.176, 53.504-26.368, 80.256-39.552 - c-11.176-28.048-22.784-55.936-34.736-83.672c 8.056-7.56, 15.256-15.832, 21.592-24.672c 29.048,8.256, 58.168,16.24, 87.432,23.688 - C 492.808,320.2, 502.4,291.944, 512,263.744c-27.744-11.944-55.696-23.328-83.776-34.48c 0.328-10.864-0.336-21.832-2.112-32.728 - c 26.368-14.704, 52.576-29.752, 78.536-45.192c-13.168-26.752-26.368-53.504-39.536-80.264C 437.040,82.264, 409.168,93.848, 381.448,105.816z - M 293.112,299.304c-41.592,20.496-91.912,3.384-112.416-38.192c-20.496-41.6-3.4-91.936, 38.184-112.432c 41.6-20.48, 91.92-3.392, 112.416,38.192 - C 351.8,228.464, 334.712,278.816, 293.112,299.304z" /> -<glyph unicode="w" d="M 176.040,452.232c 0.088,0.088, 0.24,0.136, 0.384,0.192C 175.2,452.32, 173.968,452.224, 172.808,452.168 - c 1.52-0.136, 2.96-0.536, 4.472-0.424C 177.144,451.832, 175.896,452.144, 176.040,452.232zM 182.568,453.12c-0.112-0.016-0.648-0.088-1.416-0.176C 181.768,452.976, 182.256,453.024, 182.568,453.12zM 175.52,430.92c-0.248,0.024-0.496,0.064-0.632,0.048C 175.144,430.88, 175.32,430.88, 175.52,430.92zM 78.144,266.264c 0.024-0.024, 0.024,0, 0.024,0.080C 78.168,266.328, 78.192,266.304, 78.144,266.264zM 265.48,453.744c-0.72-0.032-1.304-0.048-1.576-0.056C 264.712,453.592, 264.8,453.592, 265.48,453.744zM 234.76,454.176c 0.216-0.072, 1.168-0.032, 2.448,0.040C 236.232,454.216, 235.408,454.216, 234.76,454.176zM 243.96,453.656c 0.384,0.024, 2.584,0.336, 4.808,0.632c-1.184-0.112-2.424-0.16-3.68-0.168 - C 244.344,453.872, 243.736,453.656, 243.96,453.656zM 124.744,432.056c0-0.192-0.704-0.56-1.192-0.848C 124.24,431.384, 124.688,431.648, 124.744,432.056zM 101.84,431.24c-0.512-0.376, 3.016,0.184, 4.088,0.352C 103.88,431.672, 102.328,431.592, 101.84,431.24zM 160.456,434.76c 0.632,0.512, 1.392,0.768, 2.24,0.792C 162,435.648, 161.24,435.416, 160.456,434.76zM 105.928,431.592c 0.088,0, 0.168,0, 0.24,0c 0.040,0.032, 0.072,0.032, 0.088,0.056 - C 106.272,431.664, 106.136,431.64, 105.928,431.592zM 153.856,441.304c 0.032,0, 0.064,0, 0.112-0.008C 154.128,441.36, 154.048,441.36, 153.856,441.304zM 27.096,316.704c 3.808,6.64, 8.608,9.704, 15.168,13.248c 4.44,2.344, 7.456-4.24, 10.688-2.832 - c-0.464,1.104, 1,2.168, 2.168,4c-0.736-0.304-0.584-0.344-1.2,0.096c 1.88,0.632, 3.616,0.264, 5.312,0.632 - c-0.584-1.072, 10.544-2.832, 10.608-3.064c 0.496-1.608-7.088-20.776-3.080-21.296c 4.472-0.6, 8.008,12.704, 8.328,15.728 - c 1.28,11.84, 10.216,16.024, 20.12,20.352c-0.032,0.080-0.096,0.152-0.144,0.224c 2.472,1.624, 5.496,2.048, 7.84,3.856 - c-1.808,2.048, 0.936,1.416, 1.976,2.832c-0.464,0.12-0.896,0.24-0.88,1.056c 1.376,0.336, 2.296,1.144, 2.76,2.376 - c-0.208,0-0.512,0.024-0.728,0.024c-0.296,0.84, 2.752,5.912, 3.48,6.672c-0.16-0.384-1.312-5.336-1.52-5.312 - c 3.496-0.088, 4.136,5.696, 5.864,6.752c-0.552,1.368, 9.24,4.928, 11.496,5.504c-0.56,0.68-2.832,0.080-3.616,0.080 - c 3.952,1.72, 9.296,1.488, 12.928,2.816c-5.856-0.144, 4.792,8.68, 8.312,7.92c 3.344-0.704, 10.296,4.064, 14.496,4.168 - c-0.832-1.080-0.512-1.512, 0.944-1.296c-5.576-0.256-9.976-7.32-5.768-5.128c 2.544,1.352, 13.824,3.080, 14.896,5.232 - c 0.608,1.2-12.528,0.384-6.688,7.576c-0.536,0-1.552,0.256-2.512,0.256c 1.68,1.048, 4.784,0.56, 5.88,2.536 - c 1.328,2.304-15.096-1.432-15.904-1.496c 6.784,5.376, 39.368,4.264, 36.16,15.184c-0.96-0.28-11.624-3.040-11.808-1.76 - c 2.448,0.72, 8.464,1.264, 9.768,2.496c 0.784,0.936-8.472,0.136-6.648,3.184l 0.136,0.168c-2.192-0.032-2.96,0.768-3.856,1.328 - c 5.568,1.76-1.392,11.056-4.624,6.736c 0.432-0.52, 0.92-0.864, 1.488-1.168c-1.44,0.472-2.536,0.784-0.896,3.712 - c-2.696-4.92-13.544-1.784-17.184-0.048c-12.632,6.040-8.8-2.328-18.272-4.464c 0.176-4.528, 6.552-4.544-2.192-8.008 - c-7.040-2.808-2.88-4.336-6.488-8.32c-3.16-0.072-4.392,0.248-4.68,0.792c 0.552-0.232, 1.144-0.376, 1.736-0.336 - c 0.768,0.96-0.84,0.984-1.808,0.776c 0.304,1.344, 3.928,3.576, 1.448,5.344c-7.408-0.256-6.488,5.144-15.68,4.736 - c 2.512,2.568, 2.936,4.104-0.912,3.456c 4.96,3.328, 14.512,6.256, 18.496,9.848c-0.344,0.296-0.704,0.496-1.104,0.632 - c 4.544-0.4, 12.2,0.416, 15.216,3.032c-2.16,0.208-4.832-0.096-4.536,1.032c 2.104-0.656, 4.696-0.648, 7.432-0.288 - c-2.44-0.992-5.704-2.832-6.88-3.832c 0.608,0.064, 2.176,0.264, 3.208,0.144c-0.616-0.416-1.312-0.872-0.392-0.832 - c 3.584,0.176, 9.56,0.8, 13.136,1.808c-0.176,0.472-1.808,0.192-2.496,0.656c-0.232,0.152, 0.312,0.448, 0.224,0.712 - c-0.352,0.896-3.848,1.384-4.672,1.024c 0.048,0.272,0,0.44, 0.032,0.68c 0.84,0.168, 1.672,0.416, 2.504,0.64 - c-0.336-0.272-0.096-0.544, 0.824-0.544c-0.128,0.32, 0.336,0.776-0.712,0.576c 5,1.4, 9.784,3.704, 12.176,5.768 - c-1.24-0.056-2.704,0.528-3.968,0.656c 1.776,0.048, 3.352,0.104, 4.208,0.088c-1.192-0.904, 4.624,0.608, 6.192-0.256 - c-0.064,0-0.112-0.016-0.176-0.016c 0.496-0.072, 0.944-0.272, 1.376-0.696c-0.608-0.168-1.256-0.32-1.888-0.496 - c 0.144,0.12, 3.776-0.024, 4.608-0.432c-1.528,0.168-2.896-0.168-4.16-1c-0.096-0.072, 4.888-1.504, 4.96,0.528 - c 3.104-2.232-6.168-3.904-3.616-4.784c-3.248-1.424-9.44-0.448-11.704-3.512c-0.416-0.536, 10.176,0.632, 11.184,0.144 - c 2.448-1.24, 7.208-4.104, 11.2-3.232c 3.192,0.728-2.832,3.6-2.808,3.552c 5.416,0.888, 5.256-1.784, 6.696,2.864 - c-1.888-0.24-2.432,1.552-3.776,1.416c 0.312,0.896, 0.768,0.368, 1.080,0.976c 2.496-0.368, 7.608-1.8, 8.064,1.392 - c 0.016,0.192-6.832,2.52-7.304,2.68c 0.56,0.44, 0.944,0.448, 1.76,0.696c-0.608,0.288-1.28,0.352-1.952,0.208 - c 0.496,0.32, 1.080,0.312, 1.728,0.416c-0.496,0.512-1.104,0.696-1.776,0.544c 0.048,0.136, 0.112,0.272, 0.176,0.408 - c-5.656,0.224-10.624,2-16.616,2.056c 0.312,0, 0.968,1.192, 0.92,1.376c-0.848,2.376-14.912-2.368-11.6-0.888 - c-1.576,0, 3.472,1.32, 4.6,1.536c-2.976,0.168-5.64,0.16-8.632-0.44c 1.056,0.352, 2.064,0.544, 3.040,1.048 - c-6.272-0.248-8.584-0.216-13.152-3.424c 1.504-0.048, 2.888,0.312, 4.208,1.112c-0.304-0.024-0.568-0.024-0.856-0.048 - c 1.6,0.776, 4.368,0.552, 5.936,1.048c-0.952-0.496-6.616-1.136-5.744-2.872c0,0, 3.896-0.096, 4.368-0.272 - c-1.24-1.048-2.784-1.176-4.576-0.432c-1.592-1.272, 11.168-1.416, 11.24-1.416c-1.56-0.416-7.824-6.040-9.952-4.016 - c-0.32,1.336, 0.456,1.976, 2.248,1.896c 1.48,1.208-6.088-0.536-5.76-0.512c 1.888,1.52-1.552,0.88, 1.288,1.696 - c-0.664,0.28-2.608-0.12-2.792,0.328c 0.92,0.28, 1.84,0.568, 2.744,0.856c 2.048,1.552-6.632,1.368-9.040-0.416 - c-0.664-0.472, 3.16-0.816, 2.472-1.352c-0.616-0.36-1.232-0.696-1.872-1.032c 0.656,0.16, 1.16,0.24, 1.872,0.416 - c-0.928-1.376-4.504-0.888-6.744-2.648c-1.384-0.216-1.152,0.040-0.616,0.376c-3.16-0.856-11.912,0.192-17.376,0.392 - c-1.992-1.672-5.616-1.96-6.824-1.544c-6.984,2.368-12.52-2.48-17.128-6.592c-14.008-12.464-26.64-26.488-37.632-41.64 - C 22.24,350.88, 6.912,315.112,0,277.648c 2.064,0.040, 2.776-8.216, 5.352-8.912c 2.152-0.552, 4.384,5.648, 5.648,0.832 - c 1.744-0.424, 0.896-8.744, 1.608-10.432c 1.752-4.448, 5.112-6.832, 8.536-7.928c-1.064-3.792-0.456-6.936-0.192-10.752 - c 0.28-4.16-3.176-8.4-2.192-12.328c 0.32-0.144, 0.656-0.224, 0.976-0.36c-0.040,0.496, 0.272,1.344, 0.72,1.928 - c 3.888-1.328, 1.352-21.264, 6.568-23.376c 2.64-1.128, 3.088,11.672, 8.528,9.792c 2.712-1.008, 0.504-7.832, 0.736-9.744 - c 0.040-0.072, 4.376,3.928, 4.736,4.504c-0.896,3.232-1.008,12.040-6.808,9.52c-12.248-5.256-6.984,15.968-4.528,22.32 - c 2.832,7.272, 13.312,20.672-0.824,21.52c-11.76,0.744, 1.8,11.648, 3.264,14.272c 1.112,1.264, 2.104,2.368, 3.176,4.656 - c 1.624,3.408, 4.552,5.952, 6.2,9.368c-13.28,2.4-13.784-14.768-26.048-12.096c-8.944,1.864, 10.448,33.992, 11.456,36.32 - C 26.976,316.752, 27.032,316.72, 27.096,316.704z M 175.52,430.92c-0.2-0.040-0.384-0.040-0.632,0.048 - C 175.024,430.984, 175.272,430.944, 175.52,430.92zM 172.136,384.896c 0.16,0.336-0.296,0.512-0.36,0.872c-1.552-0.64-2.896-1.6-4-2.856 - c-0.536-1.080, 3.88-0.872, 4.648,0.68C 169.856,383.656, 171.68,383.992, 172.136,384.896zM 182.304,391.32c-0.496-0.128-1.016-0.2-1.504-0.304c0,0, 0.136,0.304, 0.16,0.4 - c-0.672,0.024-1.32,0.024-2,0.024c 0.096,0.576, 0.456,0.936, 1.016,1.080c-1.192,0.592-2.36,0.512-3.544-0.216 - c 0.112,0.248, 6.24,5.184, 4.688,5.208c-5.008,0-8.64-7.032-13.336-8.456c0-0.248, 0.36-0.408, 0.672-0.408 - c-0.56-1.232-2.424-0.872-2.984-2.032c-0.024-0.104, 11.816-0.968, 13.16-0.976c-0.744-0.288-1.392-0.744-1.88-1.344 - c-0.248-0.56, 5.072,2.24, 5.032,2.208c 2.264-2.352, 2.016-5.752, 4.376,0.264c-0.848-0.312-0.56-0.496-1.728-0.488 - c 0.672,1.744, 0.408,0.84, 1.368,2.56c-0.448,0.024-1.080-0.056-1.368-0.208c 0.496,1.208, 0.896,1.928, 1.208,2.632 - C 184.952,391.064, 183.472,391.080, 182.304,391.32zM 129.032,420.6c 1.32,0.152, 4.152,1.152, 5.368,1.712c-1.704,0.464-3.208-0.4-4.784-1.112 - C 129.432,421.016, 129.224,420.824, 129.032,420.6zM 111.576,445.184c-1.48,0.168-2.688-0.384-3.648-1.576c 1.168-0.184, 2.040,0.168, 2.592,1 - C 112.064,444.728, 112.408,444.92, 111.576,445.184zM 112.44,444.128c 0.688-0.104, 1.232,0.048, 1.824,0.384c-0.664-0.040-1.32-0.072-1.984-0.104 - C 111.88,444.184, 112.168,444.112, 112.44,444.128zM 116.336,445.84c-0.56,0.344-1.176,0.344-1.8-0.008C 115.048,445.352, 115.648,445.352, 116.336,445.84zM 164.632,394.448c 1.544-1.176, 4.448-3.304, 6.488-1.832C 169.368,393.544, 168.176,394.96, 164.632,394.448zM 121.88,446.024c-2.6-0.144-2.16-0.040, 1.336,0.328c-0.008,0.168-0.136,0.256-0.312,0.344 - c 0.288,0.032, 0.568,0.072, 0.88,0.112c-1.736-0.024-4.864,0.176-5.816-0.36c 0.824,0.256, 1.648,0.296, 2.472,0.112 - c-2.064-0.456-4.32-1.432-2.848-1.352C 118.848,445.256, 121.12,445.552, 121.88,446.024zM 91.632,431.448c-0.552-0.456-1.136-0.888-1.704-1.344c 0.696,0.152, 1.792,0.168, 2.304,0.368 - C 92.392,431.224, 92.424,431.456, 91.632,431.448zM 124.936,446.936c-0.384-0.056-0.768-0.096-1.152-0.136C 124.4,446.816, 124.832,446.84, 124.936,446.936zM 94.712,431.952c 0.816-0.776, 18.496-0.176, 21.48,1.2c0,0-0.416,0.8-0.576,0.68 - c 0.952,0.696, 3.096,0.464, 4.208,0.752c-2.256,1.784-4.048-0.184-2.504,3.024c 0.304,0.68, 3.832,2.864, 4.064,2.776 - c-4.184,1.472-7.32-3.352-10.408-3.52c 0.56,0.024-4.704,1.856-7.936,1.032c 0.192,0.84-0.080,1.144-0.568,1.12 - c 0.104,0.184, 0.16,0.44, 0.064,0.776c-0.496-0.376-1.008-0.712-1.504-1.080c 0.16-0.024, 0.256-0.016, 0.384-0.024 - c-2.048-0.968-5.28-3.728-6.088-4.36c 1.008,0.144, 3,0.488, 4.208-0.080c-3.184-0.288-4.592-0.152-7.176-2.232 - C 93.288,432.080, 94.52,432.168, 94.712,431.952zM 108.424,441.68c 0.28,0.16, 0.808,0.344, 1.2,0.376c 0.008-0.064-0.016-0.112-0.016-0.16 - c 4.616,1.040, 11.456-1, 15.688,1.52c 0.504,0.312-5.504-0.136-2.592,1.336c-0.552-0.032-5.984-1.008-3.44-1.072 - c-0.368-0.312-0.808-0.472-1.32-0.464c 0.168-0.032, 0.416-0.040, 1.056-0.024c-3.176-1.24-6.264,0.84-9.232,0.512 - c-0.208-0.128-0.144-0.192, 0.048-0.224c-0.592,0-1.2-0.12-1.784-0.344c 0.104-0.056, 0.24-0.080, 0.376-0.096 - c-0.76,0.016-1.24,0.008-1.848-0.432c 0.144-0.032, 0.296-0.056, 0.44-0.072c-0.88,0.104-1.576-0.288-2.16-1.16 - C 106.032,441.328, 107.24,441.416, 108.424,441.68zM 109.608,441.896c-0.776-0.168-1.52-0.424-2.168-0.816C 108.944,440.688, 109.632,440.976, 109.608,441.896zM 80.368,312.016c-0.328-0.432-0.432-1.336-0.040-1.232C 80.352,311.2, 80.352,311.608, 80.368,312.016zM 195.152,165.008c-5.344,1.080-8.4,4.312-13.504,5.776c-5.072,1.416-10.64-0.224-15.024-0.648 - c-0.96,4.016-2.264,3.856-5.792,5.344c-9.36,3.88-4.96-4.72-9.744-5.168c-4.832-0.56-10.248,5.68-6.456,10.664 - c 2.496,3.296-6.552,16.344-11.896,15.944c-4.608-0.12-16.712,0.936-19.584,5.144c-3.6,5.368-16.616,6.76-17.76,12.688 - c 0.432-0.248, 1.36-0.048, 1.768,0.336c-3.56,0-8.696-3.464-11.376-2.496c-1.912,0.696-7.504-0.048-8.832,1.488 - c-1.824,2.064-5.6,4.76-8.672,4.64c 0.296-1.608, 2.024-0.872, 2.8-2.472c-8.64-0.512-2.312-9.272-3.96-9.384 - c-3.824-0.224-2.8,7.968-2.808,9.704c 1.096,0.848, 1.24,1.704, 0.464,2.528c-1.576,2.176-2.848-1.52-4.048-2.040 - c-5.312-2.36-14.032-7.168-12.688-14.28c-6.656-2.72,0-11.344, 1.12-16.464c-0.616-1.184-0.176-2, 1.312-2.472 - c 0.080-5.392-7.184-11.144-7.296-16.44c-0.168-6.192-1.816-6.984, 3.856-10.064c 0.072-3.752-4.040-5.48-2.96-9.72 - c 1.136-4.448, 5.040-4.672, 7.024-7.344c 3.904-5.752, 8.904-11.72, 13.824-17.024c 5.832-6.28, 7.336-14.48, 16.928-16.144 - c 7.472-1.032, 15.832-5.704, 18.824-12.64c 2.728-6.336, 3.696-12.936, 5.968-19.408c 1.080-6.824, 0.464-18.768, 4.64-24.224 - c 3.872-9.504, 4.512-15.448, 4.544-25.016c 0.024-4.936, 2.8-5.456, 4.424-8.952c 1.592-3.416-1.064-6.424, 4.080-9.416 - c 0.176,1.152, 0.768,1.712, 1.824,1.736c 4.528-9.416, 22.496-14.464, 32.16-18.352c 0.744,3.8-14.040,6.264-6.536,10.832 - c 4.536,2.136, 0.904,8.080-0.184,10.504c 0.832,0.224, 4.8-1.104, 3.624,1.488c 0.768-1.64-10.936,3.656-6.288,4.912 - c 2.504,0.648, 8.648-1.28, 6.912,2.808c 0.080,2.096-3.928,6.4-0.136,7.344c 3.216,0.792, 8.648,1.528, 10.216,5.032 - c 4.432,9.88-4.96,7.144-7.496,13.696c 0.536-1.392, 13.808,0.632, 14.616,4.92c 1.232,6.424, 3.608,11.984, 4.472,18.32 - c0-0.048, 0.016-0.072, 0.016-0.112c-0.016,2.448, 0.744,4.6, 2.36,6.44c-0.96,2.816-1.856,5.616-2.696,8.448 - c-0.56,3.232, 3.864,7.928, 6.24,9.432c 8.624,5.416, 10.112,8.96, 12.6,18.8c 0.832,5.752-5.080,18.832-3.056,22.68 - C 195.664,141.456, 206.64,162.56, 195.152,165.008zM 80.456,283.608c 1.816-0.128, 2.824,0.64, 3,2.28C 83.048,285.464, 78.704,284.080, 80.456,283.608zM 197.44,438.232c 0.16,0.080, 0.224,0.136, 0.36,0.184C 197.616,438.408, 197.488,438.376, 197.44,438.232zM 292.688,359.592c 0.072,0.008, 0.16,0.008, 0.224,0.024c-3.616-4.808-7.856-9.072-11.408-13.992 - c-2.432-3.344-1.552-7.744-2.792-11.536c-1.12-3.576-5.168-6.968-8.576-8.216c-6.168-2.28-8.616-9.272-11.176-14.84 - c-2.064-4.52-3.728-8.76-6.168-13.072c-3.208-5.632, 1.096-14.624, 0.896-20.76c-0.168-4.344-1.776-9.36-4.112-13.056 - c-2.272-3.56, 0.648-7.872, 0.576-12.568c-0.136-0.024-0.24-0.024-0.376-0.024c 2.352-3.776, 5.248-7.176, 8.232-10.44 - c 5.32-5.856, 6.472-13.744, 12.128-19.424c 4.288-4.312, 9.344-11.048, 16.168-8.688c 3.144,1.056, 5.656,3.008, 9.12,3.072 - c 2.872,0.096, 5.12-2.424, 7.928-2.376c 6.616,0.176, 13.216,9.408, 21.256,9.584c 5.856,0.176, 5.344-9.832, 10.424-9.704 - c 16.464,0.32, 14.488-11.384, 10.304-22.744c-2.672-7.296, 4.536-14.192, 8.6-19.336s 4.536-12.864, 6.216-19.112 - c 1.544-5.832, 4.4-15.024, 2.968-21.088c-1.44-6.016-6.472-10.328-7.616-16.544c-1.592-8.688, 1.736-17.264, 5.592-24.856 - c 3.704-7.32, 3.904-10.368, 4.808-18.392c 1.88-17.352, 15.2-29.856, 15-46.48c 1.728,1.008, 7.096-2.336, 11.792,0.112 - c 4.936,2.608, 9.2,1.392, 14.256,1.952c 0.384,2.024, 9.816,5.344, 11.696,7.928c 4.536,6.152, 7.184,13.2, 12.112,18.992 - c 5.344,6.288-0.704,10.912, 5.608,16.128c 5.928,4.936, 7.816,2.984, 8.168,12.488c 0.136,4.088-7.656,14.128, 0.768,15.792 - c 0.968,6.016, 6.96,8.592, 11.536,11.432c 13.144,8.080, 3.008,19.528, 8.312,30.808c 1.928,4.16-4.336,8.96-4.288,13.472 - c 0.064,4.336-0.968,8.56-0.944,12.888c 0.048,4.288, 3.616,6.496, 4.496,10.472c 3.296,15, 16.168,19.128, 24.12,30.712 - c 6.864,10.016, 20.384,33.64, 15.264,45.816c-4.648-1.576-9.272-4.136-14.232-5.208c-8.76-1.568-12.128-4.088-14.544,6.464 - c-1.688,7.352-14.328,12.392-16.040,20.208c-1.272,5.896-2.736,7.992-6.624,12.312c-3.608,4.056-2.312,11.016-5.2,15.984 - c-2.512,4.312-3.104,8.832-5.416,13.328c-3.464,6.624-10.6,15.568-11,23.016c 2.336-2.496, 4.864-9.256, 7.608-9.696 - c 1.688,7.24, 1.904,9.104-0.92,16.112c-4.76-1.304-8.936,1.696-13.512,0.024c-6.168-2.28-10.96-1.496-17.136,0.696 - c-4.384,1.568-21.984,11.816-21.736-0.080c 0.264-13.792-16.208,4.096-20.488,5.504c-4.552,1.464-12.184-1.12-12.128,6.76 - c0,4.472, 1.688,7.88, 1.976,11.888c-1.296-1.264-2.512-1.176-3.608,0.256c-2,3.112-4.808-0.952-7.032-1.016 - c-4.624-0.168-8.808-0.040-13.336-0.216c-6.848-0.232-14.104-3.872-19.944-7.168M 482.792,106.176c 1.256,2.288, 2.448,4.6, 3.656,6.96C 484.608,111.928, 483.168,110.16, 482.792,106.176zM 242.44,440.376c 0.624,1.952, 4.472-3.136, 5.52,0c-1.040,0.584-2.136,1.024-3.256,1.336 - c 2,0.040, 5.232-1.472, 7.008,0.56c-0.336,0.072-0.632,0.24-0.536,0.464c 1.344,0.080, 2.872,0.376, 3.48,0.872 - c-0.96-0.136-1.824,0.040-2.624,0.528c 0.36,1.024, 2.136-0.232, 2.648,1.088c 0.536,1.416-2.808,1.208-2.648,1.592 - c 0.72,1.704, 6.088-0.696, 6.784,1.032c-0.848,0.448-1.752,0.72-2.72,0.832c 0.456,0.024, 0.992,0.112, 1.368,0.192 - c-1.568,0.4-3.144,0.496-4.736,0.312c 1.864,0.976, 12.016,3.232, 12.76,4.544c 2.832,0.136, 8.152,0.48, 8.912,1.696 - C 274.632,455.848, 249.464,452.8, 248,452.584c 0.344,0.264, 5.52,1.92, 5.64,2.080c 0.088,0.16-0.992,0.080-2.432-0.088 - c 1.784,0.304, 3.28,0.816, 4.224,1.6c-13.32,0.296-27.688,1.056-40.688-1.936c 0.136-0.12, 0.496-0.12, 0.72-0.216 - c-0.672,0.008-1.352-0.112-1.976-0.344c 0.624-0.456, 1.344-0.656, 2.136-0.616c-1.080-0.072-6.288,0.976-6.912-0.024 - c-0.12-0.168, 0.040-0.264, 0.088-0.416c-1.032,0.392-2.472,0.624-2.96-0.272c-1.928-0.136-15-0.664-16.392-3.376 - c 0.784-0.312, 1.568-0.4, 2.424-0.224c-1.416-2.688-7.368-0.336-8.472-2.72c-0.424-0.784, 5.352-0.36, 5.88-0.336 - c-1.168-1.312-4.376,0.136-5.344-1.32c 0.816,0.16, 1.6,0.064, 2.336-0.24c-0.216-0.208-0.472-0.24-0.832-0.384 - c 0.832-0.456, 1.616-0.552, 2.472-0.344c-0.088,0.016-0.224,0.104-0.264,0.16c 2.512,0.68, 11.968,0.68, 10.232-3.808 - c 1.192-0.28, 1.128-0.744-0.088-1.336c 1.032,0.072, 3.88-1.536, 4.264-1.616c-0.816-1.248-2.496,0.248-3.68-0.024 - c-0.072-0.736, 2.888-0.864, 4.152-1.152c-1.344-1.552-4.76-2.008-5.408-4.096c 0.264,0.152, 0.552,0.112, 0.808-0.016 - c-1.64-2.24, 1.208-2.592, 1.952-3.496c-3.616-1.92, 6.264-6.416, 7.656-6.52c 2.088-0.168, 6.912,7.936, 10.936,8.704 - c-0.072-0.216-0.136-0.424-0.176-0.64c 4.312-0.128, 6.552,2.36, 10.352,3.432c 5.832-0.072, 12.016,0.936, 17.56,2.816 - c-1.376,0.248-7.256,0.16-6.944,1.12c 1.864,0.2, 0.832,0.2, 1.152,1.208c 0.848-0.28, 7.208-2.624, 7.608-1.232 - C 248.656,438.976, 243.4,439.84, 242.44,440.376z M 265.48,453.744c-0.68-0.152-0.768-0.152-1.576-0.056 - C 264.168,453.696, 264.76,453.712, 265.48,453.744z M 243.96,453.656c-0.224,0, 0.384,0.216, 1.128,0.472c 1.256,0.008, 2.496,0.056, 3.68,0.168 - C 246.544,453.992, 244.344,453.68, 243.96,453.656z M 234.76,454.176c 0.648,0.040, 1.48,0.040, 2.448,0.040 - C 235.92,454.152, 234.976,454.112, 234.76,454.176zM 77.904,314.184c-0.512,0.064-1.544-0.448-2.032-0.984c 0.616-0.080, 1.592-0.36, 2.728-0.336 - C 78.6,313.336, 78.648,314.096, 77.904,314.184zM 252.792,432.808c-0.176,0.024-0.496-0.104-0.768-0.168c 7.096-0.696, 11.072-3.688, 18.656-0.4 - c 0.56,0.944-2.512,2.464-0.448,3c-0.92,0.096-8.848,0.92-8.96,0c-1.104,0.632-2.424-0.288-3.168,0.808 - c-0.832-0.44-3.152-1.32-2.176,0.96c-1.056,0.104-2.648-0.376-3.656-0.512c-0.168-0.36, 2.96-1.824, 2.808-1.712 - c-0.848-0.128-2.808-0.192-3.824-0.112c 0.36-0.528, 1.84-0.168, 2.808-0.456C 253.592,433.696, 253.184,433.44, 252.792,432.808zM 171.32,395.768C 169.504,394.32, 173.456,395.464, 171.32,395.768L 171.32,395.768zM 59.8,266.12c-0.888,0.184-4.232-4.112, 3.312-3.784c 0.168,0.776, 0.168,1.392-0.384,1.904 - c 0.032-0.152, 0.072-0.272, 0.088-0.416C 62.288,264.352, 61.144,265.792, 59.8,266.12zM 71.56,262.144c 2.392,6.512, 7.992-3.632, 8.048-3.656c 0.896-0.168, 4.688,5.688, 4.952,3.152 - c 0.024-0.040, 8.184-0.040, 8.52-0.096c0-0.224-1.008,3.392-1.488,5.096c-1.496,2.64-0.96,6.608-4.928,7.248 - c-1.896,0.28-3.96-1.4-5.32,0.712c-2.92,4.472-3.136-7.056-3.184-8.216C 77.448,266.744, 65.376,265.728, 71.56,262.144z - M 78.168,266.344c0-0.080,0-0.104-0.024-0.080C 78.192,266.304, 78.168,266.328, 78.168,266.344zM 160.832,386c-0.248-0.088-0.608-0.328-0.72-0.584c-0.432-0.76, 4.376-3.52, 5.68-0.832 - C 163.736,383.936, 162.096,384.408, 160.832,386zM 74.768,275.832c-1.616,2.288, 0.928,4.288-2.592,5.296c 0.296,1.952-4.848,9.352-7.128,11.552 - c-7.048,6.856-11.904,5.528-18.32-2.584c 6.272-0.816, 7.032,7.936, 9.072,0.976c 7.96-0.984, 9.592-9.328, 7.376-14.6 - C 67.168,275.816, 71.056,270.896, 74.768,275.832zM 97.168,258.16c-0.912-2.792, 4.016-4.2, 5.384-2.296C 102.488,257.184, 98.040,260.936, 97.168,258.16zM 91.6,266.632c 0.032-0.072, 0.048-0.128, 0.080-0.176C 91.24,268, 91.32,267.64, 91.6,266.632zM 74.512,303.336c 0.256,0.52-0.232,3.064-0.592,2.376C 73.744,305.336, 73.248,300.664, 74.512,303.336zM 51.632,289.256c-0.872-0.2-1.464-0.8-1.752-1.688c 0.536,1.112, 0.872-2.672, 2.8,2.832 - C 52.024,291.12, 52.048,290.184, 51.632,289.256zM 140.936,443.496c-0.152,0-1.040-0.168-1.432-0.424c 0.12,0, 7.512-0.192, 5.52,0.856 - C 143.632,444.344, 142.272,444.184, 140.936,443.496zM 355.584,378.32c 1.080-9.12, 7.168,3.504-1.376,2.208C 354.44,379.704, 355.512,379.136, 355.584,378.32zM 298.488,417.648c 5.32-0.36, 8.6,1.168, 8.736,5.952c 0.024,0.72, 4.448,3.416-1.528,3.8 - c-1.008,0.064-6.192,0.296-4.24-1.808c-0.784-0.432-4.112-0.024-4.192-1.184c 0.624-0.512, 1.256-1.024, 1.904-1.552 - C 298.712,421.448, 292.96,418.032, 298.488,417.648zM 356.824,382.216c 0.248,0.568, 0.312,2.648, 0.512,3.776c-0.36,0.104-0.496,0.592-0.584,1.064 - c-0.72-0.536-1.52-0.832-2.424-0.896C 354.952,385.352, 355.648,382.504, 356.824,382.216zM 414.64,355.216c-2.048,0.76-4.872,1.6-7.296,1.416C 408.864,355.776, 412.824,354.376, 414.64,355.216zM 336.272,378.216c 0.112-0.112, 2.584-1.96, 2.448-0.6C 338.408,379.016, 337.576,379.248, 336.272,378.216zM 312.248,424.464c-0.632-0.16-0.744-0.416-0.744-0.768c 0.624-0.032, 0.944-0.056, 1.144-0.072 - c0,0.344, 0.096,0.592, 0.096,0.8C 312.648,424.424, 312.36,424.456, 312.248,424.464zM 305.848,433.712c 1.080-0.072, 1.928,0.552, 1.952,1.176C 307.576,434.912, 303.848,433.832, 305.848,433.712zM 306.728,433.080c-0.024-0.76, 0.736-0.992, 2.216-1.264c-0.064-1.904, 0.336-1.448, 0.296-3.784 - c 0.264-0.008, 0.536-0.040, 0.808-0.048c-0.2,0.264-0.496,0.48, 0.024,0.944c 3.392-1.728, 0.696-0.632, 0.648-2.92 - c-0.024-1.016, 4.264-0.544, 4.896-0.6c-1.192-1.504, 0.112-1.768, 1.728-1.784c0-2.152-2.92-2.096-4.6-1.984 - c0-2.496-2.072-2.784-2.072-4.12c0-0.384, 5.592-1.376, 6.36-0.6c 0.048-1.208-5.776-2.168-7.008-4.224 - c 2.112-0.136, 19.848,1.472, 19.808,2.28c-0.696,0.152-1.416,0.304-2.112,0.456c 2.408,2.768, 2.408,5.344, 0.088,4.272 - c-0.4-0.128-0.496-0.328-1.208-0.416c-0.16,3.992-6.28,8.064-10.304,9.088c 0.408,0.96, 3.856,2.312, 3.464,3.944 - c-3.080-1.392-5.104-1.096-6.112,0.88c 0.848,0.36, 1.68,0.816, 2.472,1.312c 0.112,3.352-8.504-1.096-6.712-1.8 - C 309.376,432.392, 306.928,433.064, 306.728,433.080zM 125.552,442.48C 126.4,442.328, 126.96,442.568, 127.2,443.216c-1.056-0.168-1.872-0.32-2.824-0.768 - C 124.912,442.496, 124.936,442.456, 125.552,442.48zM 368.656,369.656c 0.192-1.32, 6.96-5.056, 8.44-5.208c 0.12-0.016, 0.176,3.76, 0.408,4.752 - C 376.064,369.56, 369.84,370.096, 368.656,369.656zM 335.504,455.496c0,0.024,0,0.048,0,0.064c-0.040-0.008-0.040-0.016-0.088-0.016 - C 335.472,455.512, 335.488,455.504, 335.504,455.496zM 385.792,428.464c 1.208-0.112, 1.752,0.96, 1.8,1.88c-0.704,0.24-3.192,1.016-1.064-0.6 - c-0.736,0.008-1.208-0.296-1.976-0.296C 384.664,429.096, 384.888,428.544, 385.792,428.464zM 335.424,455.536c-0.768-0.16, 0.744-0.736, 1.752-0.88C 336.768,455.104, 336.072,455.216, 335.424,455.536zM 338.584,454.944c-0.16,0.016-0.264,0-0.432-0.016c 0.768-0.568, 3.912-0.296, 5.568-0.208 - c-1.368-0.2-3.776-0.592-3.792-0.536c 0.040-0.632, 4.28-0.48, 4.824-0.64C 343.368,453.472, 342.136,453.6, 340.72,453.6 - c 0.224-3.072, 8.648-0.064, 11.456,0.528c 0.312-0.216, 0.872-0.552, 1.304-0.632c-0.072-0.36-0.856-0.192-0.92-0.64 - c 0.92-0.072, 2.36-0.136, 3.184-0.232c-0.176-0.104-0.16-0.24, 0.048-0.464c 1.752,0.088, 2.448,0.496, 4.4,0.632 - c-2.048,1.016-4.576,1.328-6.552,1.576c 0.2-0.016, 0.496-0.024, 0.672-0.016c-0.472,0.2-1.056,0.416-1.664,0.576 - c 3.84-0.4, 10.528,0.72, 11.944,0.96c-3.944,1.96-10.688,1.016-15.016,1.088c 0.136-0.048, 0.24-0.12, 0.36-0.168 - c-0.36,0-0.72,0.008-1.064,0.024c0-0.040,0-0.064,0-0.104c-0.696,0.080-1.416,0.12-2.136,0.12 - c 0.408-0.824, 2.672-0.728, 3.192-0.728C 350.064,456.112, 352.712,456, 353,455.992c-0.984-0.064-1.952-0.072-2.912-0.040 - c 0.112-0.2, 0.336-0.368, 0.6-0.512c-1.544,0.328-3.12,0.512-4.288,0.352c0,0.144, 0.16,0.24, 0.144,0.368 - c-0.024,0.128-5.28,1.496-2.744-0.656c-0.432,0.080-4.336,0.608-3.152,0.376c-0.4,0.144-0.936,0.16-1.504,0.32 - c 0.16,0.080, 0.36,0.12, 0.624,0.216c-1.504,0.296-2.984,0.224-4.424-0.216c 0.536-0.264, 1.104-0.448, 1.712-0.552 - C 336.856,455.36, 337.664,455.168, 338.584,454.944zM 355.272,426.776c 0.064-0.144, 0.16-0.272, 0.176-0.432C 355.408,426.632, 355.336,426.776, 355.272,426.776zM 375.44,426.784c 0.536,0.72, 1.12,1.456, 1.704,2.144C 376.528,428.944, 374.136,427.832, 375.44,426.784zM 321.096,410.784c 0.048-1.104, 0.608-1.824, 0.648-2.824c-1.032-0.112-9.456,1.544-9.432-0.328 - c0-2.728, 14.464-4.272, 11.272-9.536c 0.072,0.024, 0.136,0.064, 0.2,0.128c 0.384-7.28-1.664-5.368-6.936-6.056 - c-4.72,0.368-9.32,1.616-14.016,1.96c-5.504,0.4-3.272-3.152-3.272-5.816c0-1.896-3.704-15.984, 0.536-16.304 - c 4.152-0.312, 5.704,1.232, 8.328-2.792c 2.048-3.168, 8.472,1.704, 11.896,0.416c 2.92,1.12, 6.16,3.472, 8.216,6.384 - c-6.84,2.968, 8.832,9.656, 9.008,10.272c-2.968,7.568, 8.352,1.584, 11.792,3.288c 6.984,3.536, 7.92,1.512, 13.2-3.968 - c-0.968,2.136, 23.016-16.536, 15.536-15.832c 0.496-3.168, 4.504,3.032, 4.624,2.408c-0.872,5.184-3.64,4.536, 3.52,2.672 - c-0.112,4.376-7.68,3.416-8.376,7.32c-4.984,0.488-12.824,7.112-13.48,11.912c-0.448,3.072, 14.664-7.344, 15.944-7.472 - c 0.608-3.416, 7.904-4.176, 8.864-9.408c 0.584-3.072, 6.784-9.184, 9.68-9.496c-1.568-3.208, 0.744-5.024, 4.496-5.448 - c-0.624,0.328-1.544,4.472-1.688,5.16c 1.576-1.384, 3.352-2.424, 5.232-1.464c-3.208,2.664-4.712,5.264-7.504,7.928 - c-0.472,2.36, 4.136-0.824, 4.176-0.824c 0.064,0.792-0.072,1.384-0.456,2.216c 2.72,0.496, 3.128,1.712, 5.976-0.36 - c 3.752-2.632, 3.256,0.832, 6.648,0.36c0-0.456, 1.032-1.064, 1.208-1.4c-1.528-0.568-10.112,0.88-9.392-2.368 - c 0.512-2.312, 4.16-0.8, 0.536-4.504c 3.304-1.672, 5.168-3.576, 7.928-5.984c-0.072-0.184-0.472-0.472-0.768-0.544 - c 9.408-0.92, 17.136-4.72, 26.408-2.208c 1.152-4.304, 0.176-7.624-0.088-11.92c-0.072-1.28, 0.336-5.56-0.744-6.36 - c-0.408-0.312, 3.904-8.352, 3.976-10.048c 0.496-11.376, 17.576-17.64, 19.96-28.032c 1.416-6.28, 6.552-10.072, 10.216-14.976 - c 4.912-6.592, 6.712-11.48, 10.344-18.528c 6.832-13.296, 15.744-2.472, 26.632,0.6c-1.856,12.544-4.648,24.84-8.304,36.768 - c-2.832,1.792-1.208,4.672-2.472,7.208c-1.056-0.128-0.384-1.792-1.616-1.992c-1.824,4.976-7.928,7.536-10.448,12.576 - c-5.072,10.256, 5.504,3.728, 8.648-0.664c-5.568,14.504-12.304,28.56-21,41.144c 0.248,0.112, 0.52,0.176, 0.816,0.176 - c-12.712,20.968-28.456,40.128-46.544,56.712c-11.88,10.864-31.168,30.672-47.224,32.048c 0.744,2.384-7.456,0.92-5.048,0.496 - c-3.352-0.488-7.12,0.544-10.312-0.496c 0.408-0.144, 0.32-0.112, 0.792-0.264c-1.184,0.136-2.312,0.024-3.464-0.344 - c 0.768-0.016, 0.792-0.056, 1.376-0.152c-0.16-0.016-6.872,0.592-7.096-0.296c0,0, 0.872-0.136, 1.32-0.168 - c-0.36-0.048-1.232-0.152-1.616-0.344c 2.072-0.12, 2.832,0.24, 4.92,0.28c-0.52-1.576-15.608-7.656-17.512-7.76 - c 0.848-0.168, 1.232-0.272, 2.24-0.472c-2.936,0.344-15.92-2.16-9.144-6.832c-0.6-0.296-1.056-0.728-1.392-1.28 - c 1.128,0.176, 1.128,0.176, 2.448,0.088c 0.176-1.584-1.568-0.56-1.456-1.536c 0.336-3.496, 9.992-1.008, 11.088-0.344 - c 3.376,2.040, 4.224-0.112, 6.2-2.992c 0.744-1.112, 3.832-7.104, 5.344-7.256c 1.728-0.136, 9.48,1.744, 9.384,4.248 - c-6.472,1.128, 3.752,5.36, 3.616,5.88c-0.792,3-4.896,2.072-5.416,5.392c-0.512,3.176, 9.816,2.256, 9.12,4.36 - c 0.896,1.224, 8.264,5.16, 10.088,0.648c 0.136-0.376-9.232-3.736-10.016-3.68c 0.96-1.176, 0.744-2.504, 2.648-3.040 - c-3.392-4.176, 19.24-3.592, 21.040-5.536c-4.736-1.768-9.944,1.68-14.416-0.608c-1.44-0.76, 3.68-2.664, 3.704-4.184 - c-0.024,1.72-11.656-0.856-10.712-7.24C 380.4,419.6, 379.2,419.64, 378.016,419.704c-0.048,0.136, 0.096,0.472, 0.224,0.712 - c-2.92,1.064-14.84-3.096-14.304,0.536c-3.168,0.52-6.912,0.304-10.064,0.576c-0.264-0.76-0.112,0.344, 0.176,1.728 - c 0.72-0.264, 1.84,0.152, 2-0.928c 0.248,1.536-0.512,1.976-1.704,2.168c 0.336,1.216, 0.672,2.312, 0.92,2.28 - c-0.408,0.776-1.376,1.432-1.64,3.208c-6.176-2.432-6.216-2.416-2.832-8.192c 1.52-2.6-4.648-2.304-6.336-2.16 - c-5.776,0.472-5.144-4.624-9.88-5.64C 328.776,412.736, 327.808,410.248, 321.096,410.784zM 357.584,422.296c-0.2,0.408-0.432,0.408-0.72-0.008c 3.008-2.032, 2.216,1.664, 4.152,1.872 - c-2.312,3.888-6.624-0.184-2.192-1.104C 358.88,422.712, 358.256,422.296, 357.584,422.296zM 440.64,354.32c-1.824-0.12-4.448-0.896-5.928-1.488C 435.456,349.624, 440.712,352.784, 440.64,354.32zM 136.792,446.768c-0.512-0.072-0.984-0.176-1.368-0.184c 0.768,0.032, 1.392,0.080, 1.928,0.184 - c 2.224,0.056, 4.232,0.368, 3.648,0.888c 0.24,0.072, 0.616,0.168, 0.84,0.232c-1.304,1.224-6.496,0.64-8.2,0.504 - c-0.464-0.264-0.408-0.32, 0.416-0.288c-0.216-0.096-0.552-0.176-0.816-0.224c 0.232-0.128, 0.768,0.032, 2.072,0.064 - c-0.816-0.504-1.696-0.688-2.688-0.576C 133,446.952, 134.872,446.768, 136.792,446.768zM 129.728,445.504c 0.4,0.008, 0.968,0.144, 1.296,0.312C 130.072,445.92, 130.8,446.4, 129.256,446.336 - C 128.736,446.032, 129.056,445.464, 129.728,445.504zM 135.784,443.888c-0.824-0.24-2.544-0.44-3.4-1c 1.36,0.856, 8.040-1.192, 8,2.216 - c0-0.040-5.32,0.016-5.832-0.048c-0.304-0.336, 0.56-0.304, 1.584-0.264c-1.408-0.84-2.568,0.328-3.824-0.424 - c 0.024-0.128, 0.2-0.224, 0.432-0.328C 133.896,444.136, 134.992,444.152, 135.784,443.888zM 148.616,444.144c-4.16-0.744, 3.728-0.88, 4.88-0.848c 4.256,2.44, 13.288-1.928, 18.16,1.096 - c0,0-0.472-0.032-0.872,0c 0.408,0.176, 0.832,0.28, 1.256,0.296c-0.176,1.232-19.512-0.472-18.136-0.096 - c-0.504,0.24-2.696-0.192-2.080,0.44c 0.872,0.048, 1.752,0.088, 2.592,0.104c-0.36,1-10.296,1.104-11.248,0.504 - c 1-0.448, 2.056-0.664, 3.168-0.648C 147.592,445.736, 148.344,445.464, 148.616,444.144zM 127.28,433.16c 1.36,2.96-6.816,0.064-5.152,0.368C 117.824,432.88, 126.072,432.864, 127.28,433.16zM 123.4,438.864c 2.28-3.136, 8.304-1.072, 10.704,0.408c-0.296,0.048-1.064,0.064-1.272,0.072 - c 1.648,1.168-0.648,0.464-1.504,0.376c 1.232,0.24, 2.424,0.616, 3.552,1.128c-0.424-0.272-11.176-0.768-6.344-0.88 - C 126.712,438.736, 125.088,439.96, 123.4,438.864zM 149.472,446.64c 0.696-0.032, 1.288,0.16, 1.8,0.528c-1.768-0.168-3.544-0.016-5.288-0.432 - C 145.976,446.744, 149.168,446.608, 149.472,446.64zM 132.744,444.048c-0.024,0-0.048,0-0.096,0C 132.744,444.024, 132.8,444, 132.832,444.008 - C 132.8,444.024, 132.776,444.024, 132.744,444.048zM 129.352,443.952c-0.080-0.088-0.168-0.168-0.216-0.256c 0.896,0.040, 2.224,0.232, 3.512,0.352 - c-0.776,0.184-3.656,1.288-3.648,0.472c0,0.016-0.008,0.040-0.008,0.056l-0.736-0.44C 128.488,444.008, 128.608,443.84, 129.352,443.952zM 147.264,449.432c 0.256,0.16, 0.504,0.272, 0.744,0.416c-0.416-0.008-1.264-0.024-2.080-0.072 - C 145.048,449.296, 148.312,449.48, 147.264,449.432zM 155.8,448.288c-0.312-0.12-0.576-0.104-0.848-0.088c-0.064-0.032-0.176-0.072-0.224-0.096 - C 155.192,448.144, 155.504,448.216, 155.8,448.288zM 154.152,449.552c-0.616-0.016-1.136-0.080-1.36-0.2C 153.328,449.416, 153.736,449.472, 154.152,449.552zM 148.936,447.4C 150.448,449.168, 144,448.736, 145.592,447.424C 142.464,447.072, 147.464,447.36, 148.936,447.4zM 154.664,449.656c-0.176-0.048-0.344-0.072-0.512-0.104c 1.72,0.048, 4.376-0.224, 5.16-0.296 - c-1.832-0.016-3.64-0.2-5.424-0.544c 0.264-0.376, 0.648-0.496, 1.064-0.504c 1.192,0.464, 5.784,0.096, 7.232,0.16 - c 0.072,0.168-0.112,0.192-0.136,0.392c 1.688,0.376, 4.56,0.608, 6.192-0.672c-1.032-0.056-8.736,0.8-5.344-0.688 - c-1.272-0.096-2.528-0.296-3.728-0.584c 6.064,0.584, 15.768-2.896, 19.92,1.080c 0.216,0.208-1.528,0.112-2.224,0.048 - c 1.008,0.864, 3.232,0.448, 3.752,1.64c 2.496,0.152, 3.776,0.776, 6.288,1.264c-0.024,0.256-0.536,0.312-1.032,0.416 - c 0.96,0, 1.52,0, 1.816,0.384c-0.448-0.016-0.912-0.040-1.416-0.048c 5.44,1.384, 11.32,1.224, 16.776,2.752 - c-1.008-0.008-2.712-0.16-3.056-0.032c 0.536,0.096, 6.648,0.080, 6.984,0.76c 0.48,0.912-9.832-0.64-5.92,0.336 - c-7.544,2.696-28.816,0.816-36.336-1.992c 1.392,0.056, 2.768,0.192, 4.136,0.232c-0.792-0.096-1.232-0.16-2.16-0.344 - c 1.568-0.256, 3.104,0.344, 4.696,0.264c-1.712-0.176-3.032-0.168-4.536-0.664c 0.92,0.040, 1.824,0.072, 2.72,0.096 - c-0.624-0.088-1.28-0.168-1.88-0.264c 0.264-0.424, 1.568-0.584, 3.224-0.584c 0.968-0.288, 0.608-0.432-1.008-0.416 - c 0.648-0.096, 2.432-0.736, 2.224-0.864c-3.368-2.32-3.928,0.336-5.976-0.856c 1.056,0.608, 1.368,0.864-0.2,0.832 - c 0.024-0.032, 0.048-0.080, 0.072-0.104c-1.392-0.808-5.64,0.992-7.704,0.992c-0.432-0.24, 0.56-0.24, 1.104-0.32 - c-1.232-0.016-2.448-0.112-3.64-0.256c 0.12-0.168, 0.288-0.2, 0.432-0.296C 155.28,450.88, 154.28,450.944, 153.576,450.56 - c 0.568-0.312, 1.208-0.408, 1.88-0.336c-1.016,0-2.136-0.016-3.184-0.056C 151.416,449.608, 152.576,449.584, 154.664,449.656z M 172.808,452.168 - c 1.168,0.056, 2.4,0.152, 3.616,0.256c-0.144-0.064-0.296-0.112-0.384-0.192c-0.144-0.096, 1.104-0.408, 1.232-0.488 - C 175.768,451.632, 174.328,452.040, 172.808,452.168z M 181.16,452.936c 0.768,0.096, 1.304,0.168, 1.416,0.176 - C 182.256,453.024, 181.768,452.976, 181.16,452.936zM 159.168,446.808c-1.344-0.128-2.512-0.448-3.392-1.080C 156.88,446.168, 158.008,446.52, 159.168,446.808zM 148.936,447.4c-0.024-0.016,0-0.032-0.032-0.056C 149.544,447.408, 149.44,447.416, 148.936,447.4zM 169.68,451.728c 0.096-0.008, 0.144,0, 0.224,0C 169.8,451.752, 169.704,451.752, 169.68,451.728zM 166.072,441.992c-0.632-0.488, 1.88-1.048, 2.040-1.032c 1.712,0.048, 5.144-0.048, 6.784,0.736 - C 172.808,442.112, 168.088,443.48, 166.072,441.992z" /> -<glyph unicode="a" d="M 512,401.056c0-34.952-28.128-62.944-62.72-62.944c-34.952,0-63.040,27.992-63.040,62.944c0,34.688, 28.088,62.68, 63.040,62.68 - C 483.872,463.736, 512,435.744, 512,401.056zM 512,224.056c0-34.728-28.128-62.92-62.72-62.92c-34.952,0-63.040,28.192-63.040,62.92c0,34.616, 28.088,62.904, 63.040,62.904 - C 483.872,286.96, 512,258.672, 512,224.056zM 512,47.080c0-34.72-28.128-62.816-62.72-62.816c-34.952,0-63.040,28.096-63.040,62.816c0,34.824, 28.088,62.928, 63.040,62.928 - C 483.872,110.008, 512,81.896, 512,47.080zM 318.816,401.056c0-34.952-28.112-62.944-62.832-62.944c-34.712,0-62.8,27.992-62.8,62.944 - c0,34.688, 28.088,62.68, 62.8,62.68C 290.704,463.736, 318.816,435.744, 318.816,401.056zM 318.816,224.056c0-34.728-28.112-62.92-62.832-62.92c-34.712,0-62.8,28.192-62.8,62.92 - c0,34.616, 28.088,62.904, 62.8,62.904C 290.704,286.96, 318.816,258.672, 318.816,224.056zM 125.736,401.056c0-34.952-28.216-62.944-62.928-62.944S0,366.104,0,401.056c0,34.688, 28.104,62.68, 62.816,62.68 - S 125.736,435.744, 125.736,401.056z" /> -<glyph unicode="p" d="M 256-32c-71.688,0-130.016,58.328-130.016,130.016L 125.984,385.888 C 125.984,437.784, 168.2,480, 220.088,480 - c 51.888,0, 94.112-42.216, 94.112-94.112l0-262.376 c0-32.088-26.12-58.2-58.192-58.2c-32.096,0-58.2,26.12-58.2,58.2l0,246.16 - c0,12.304, 9.984,22.288, 22.288,22.288c 12.312,0, 22.288-9.984, 22.288-22.288l0-246.16 c0-7.504, 6.112-13.624, 13.624-13.624 - c 7.512,0, 13.608,6.12, 13.608,13.624L 269.616,385.888 c0,27.312-22.208,49.528-49.52,49.528S 170.56,413.2, 170.56,385.888l0-287.872 - c0-47.112, 38.336-85.448, 85.44-85.448s 85.448,38.336, 85.448,85.448L 341.448,369.672 c0,12.304, 9.984,22.288, 22.28,22.288 - c 12.32,0, 22.288-9.984, 22.288-22.288l0-271.664 C 386.016,26.328, 327.704-32, 256-32z" /> -<glyph unicode="l" d="M 420.48,256.576L 267.184,256.576L 342.984,480L 91.52,191.432L 244.824,191.432L 169.032-32 z" /> -<glyph unicode="u" d="M 474.592,269.424L 269.656,474.368c-7.512,7.512-19.8,7.512-27.312,0L 37.4,269.424c-7.504-7.504-4.968-13.656, 5.664-13.656l 105.64,0 - l0-146.704 l 214.592,0 L 363.296,255.768 l 105.64,0 C 479.568,255.768, 482.104,261.92, 474.592,269.424zM 148.704,86.992L 363.296,86.992L 363.296,38.816L 148.704,38.816zM 148.704,16.176L 363.296,16.176L 363.296-32L 148.704-32z" /> -<glyph unicode="*" d="M 499.928,434.032l-37.616-37.608C 414.168,447.832, 345.704,480, 269.712,480C 123.976,480, 5.832,361.856, 5.832,216.136l 84.752,0 - c0,98.92, 80.192,179.12, 179.128,179.12c 52.592,0, 99.864-22.696, 132.632-58.8l-40.048-40.056c-3.44-3.432-2.272-6.24, 2.576-6.24l 132.472,0 - c 4.848,0, 8.824,3.968, 8.824,8.832L 506.168,431.448 C 506.168,436.296, 503.36,437.464, 499.928,434.032zM 242.288,52.76c-52.6,0-99.872,22.696-132.64,58.8l 40.056,40.056c 3.432,3.432, 2.264,6.232-2.592,6.232L 14.656,157.848 - c-4.848,0-8.816-3.968-8.816-8.824l0-132.472 c0-4.848, 2.808-6.016, 6.232-2.576l 37.608,37.608C 97.824,0.168, 166.288-32, 242.288-32 - c 145.736,0, 263.872,118.16, 263.872,263.88L 421.416,231.88 C 421.416,132.952, 341.216,52.76, 242.288,52.76z" /> -<glyph unicode="b" d="M 493.48,332L 357.24,332 L 357.24,432.376 l-202.48,0 L 154.76,332 L 18.512,332 C 8.288,332,0,323.704,0,313.48l0-279.336 c0-10.224, 8.288-18.512, 18.512-18.512l 474.96,0 - c 10.232,0, 18.52,8.288, 18.52,18.512L 511.992,313.48 C 512,323.704, 503.712,332, 493.48,332z M 199.912,387.232l 112.176,0 L 312.088,332 L 199.912,332 L 199.912,387.232 z - M 277.68,233.072c0-11.968-9.696-21.68-21.672-21.68s-21.68,9.712-21.68,21.68s 9.704,21.672, 21.68,21.672S 277.68,245.040, 277.68,233.072z" /> -<glyph unicode="!" d="M 512.008,361.472L 452.432,421.064L 177.448,146.112L 59.568,263.976L-0.008,204.408L 117.872,86.512L 117.856,86.512L 177.448,26.936L 237.032,86.512L 237.032,86.512 z" /> -<glyph unicode="$" d="M 239.912,452.72c 8.848,19.992, 23.336,19.992, 32.192,0l 52.824-119.376c 8.84-19.976, 33.96-36.344, 55.816-36.344l 110.56,0 - c 21.856,0, 27.288-12.84, 12.072-28.536L 421.192,183.728c-15.248-15.68-24.64-46.16-20.944-67.704l 19.024-110.936 - c 3.688-21.536-9.128-30.832-28.464-20.68L 291.184,36.8c-19.368,10.168-51,10.168-70.368,0l-99.624-52.392 - c-19.336-10.152-32.136-0.856-28.44,20.68l 19.032,110.936c 3.672,21.544-5.744,52.024-20.976,67.704L 8.64,268.456 - c-15.216,15.696-9.784,28.536, 12.072,28.536l 110.56,0 c 21.872,0, 46.984,16.368, 55.816,36.344L 239.912,452.72z" /> -<glyph unicode="&" d="M 512,118.496c0-11.512-4.392-23.024-13.16-31.816c-17.576-17.56-46.048-17.56-63.624,0L 256,265.896L 76.8,86.68 - c-17.568-17.56-46.056-17.56-63.624,0c-17.56,17.568-17.56,46.056,0,63.616l 211.008,211.024c 8.448,8.44, 19.88,13.168, 31.816,13.168 - c 11.944,0, 23.376-4.736, 31.816-13.168l 211.032-211.024C 507.608,141.512, 512,130.008, 512,118.496z" /> -<glyph unicode=">" d="M 150.496-32c-11.512,0-23.024,4.392-31.816,13.168c-17.56,17.568-17.56,46.048,0,63.616L 297.896,224L 118.68,403.2 - c-17.56,17.568-17.56,46.056,0,63.624c 17.568,17.56, 46.056,17.56, 63.616,0l 211.024-211.008c 8.44-8.448, 13.168-19.88, 13.168-31.816 - s-4.736-23.376-13.168-31.816L 182.296-18.832C 173.512-27.608, 162.008-32, 150.496-32z" /> -<glyph unicode="s" d="M 259.344,458.8L 304.664,458.8L 304.664,329.752L 259.344,329.752zM 455.192,464.904L 363.304,464.904 l-4.632-152.848c0-12.744-10.28-23.104-23.072-23.104L 126.976,288.952 - c-12.784,0-23.088,10.36-23.088,23.104L 103.888,464.904 L 33.824,464.904 C 15.096,464.904,0,449.688,0,431.024l0-414.088 c0-18.648, 15.096-33.84, 33.824-33.84l 444.344,0 - c 18.744,0, 33.832,15.192, 33.832,33.84L 512,401.296 L 455.192,464.904z" /> -<glyph unicode="%" d="M 398.336,277.968l 1.232,0 L 256-32L 112.472,277.968l 1.192,0 c-5.672,15.896-8.928,32.936-8.928,50.776 - C 104.736,412.28, 172.48,480, 256,480c 83.552,0, 151.264-67.72, 151.264-151.256C 407.264,310.904, 404,293.864, 398.336,277.968z M 256,407.4 - c-42.616,0-77.144-34.536-77.144-77.144c0-42.6, 34.52-77.136, 77.144-77.136s 77.144,34.536, 77.144,77.136C 333.144,372.864, 298.616,407.4, 256,407.4z" /> -<glyph unicode="<" d="M 361.504,480c 11.512,0, 23.024-4.392, 31.816-13.168c 17.56-17.568, 17.56-46.048,0-63.616L 214.104,224l 179.216-179.2 - c 17.56-17.568, 17.56-46.056,0-63.624c-17.568-17.56-46.056-17.56-63.616,0L 118.68,192.176c-8.44,8.448-13.168,19.88-13.168,31.816 - s 4.736,23.376, 13.168,31.816L 329.704,466.832C 338.488,475.608, 349.992,480, 361.504,480z" /> -<glyph unicode="v" d="M0,329.504c0,11.512, 4.392,23.024, 13.16,31.816c 17.576,17.56, 46.048,17.56, 63.624,0L 256,182.104l 179.2,179.216 - c 17.568,17.56, 46.056,17.56, 63.624,0c 17.56-17.568, 17.56-46.056,0-63.616L 287.824,86.68c-8.448-8.44-19.88-13.168-31.824-13.168 - c-11.944,0-23.376,4.736-31.816,13.168L 13.152,297.704C 4.384,306.488,0,317.992,0,329.504z" /> -<glyph unicode="." d="M 117.592,5L0-32L 37,85.608L 363.184,411.784L 443.784,331.184 zM 473.912,361.312L 393.32,441.92l 30.912,30.92l0,0c 9.544,9.544, 25.072,9.56, 34.624,0l 45.968-45.976 - c 9.568-9.568, 9.56-25.088, 0.008-34.64l0,0L 473.912,361.312z" /> -<glyph unicode="m" d="M 448.312,416.28c-84.912,84.952-222.576,84.912-307.472,0c-74.664-74.648-83.632-190.016-27.008-274.512L 12.416,40.392 - c-16.592-16.552-16.512-43.432,0-59.968c 16.576-16.536, 43.448-16.536, 59.992,0l 101.392,101.392c 84.496-56.584, 199.88-47.608, 274.512,27.024 - C 533.224,193.712, 533.224,331.376, 448.312,416.28z M 402.216,154.872c-59.432-59.52-155.856-59.464-215.328,0c-59.48,59.504-59.48,155.912,0,215.36 - c 59.472,59.504, 155.896,59.472, 215.328,0C 461.728,310.784, 461.728,214.376, 402.216,154.872z" /> -<glyph unicode="i" d="M 6.472-20.696l 109.76,0 L 116.232,309.512 L 6.472,309.512 L 6.472-20.696 z M 62.072,468.696C 24.496,468.696,0,444.056,0,411.632c0-31.672, 23.808-57.040, 60.608-57.040l 0.76,0 - c 38.232,0, 62.080,25.368, 62.080,57.040C 122.736,444.056, 99.6,468.696, 62.072,468.696z M 385.648,317.304c-58.328,0-84.384-32.104-98.936-54.624l0-1.064 - l-0.696,0 c 0.216,0.344, 0.472,0.712, 0.696,1.064l0,46.832 L 176.96,309.512 c 1.4-30.968,0-330.208,0-330.208l 109.752,0 L 286.712,163.696 - c0,9.864, 0.704,19.712, 3.648,26.776c 7.936,19.752, 25.968,40.168, 56.296,40.168c 39.696,0, 55.592-30.28, 55.592-74.672l0-176.656 L 512-20.688 L 512,168.64 - C 512,270.088, 457.872,317.304, 385.648,317.304z" /> -<glyph unicode="@" d="M 274.944,242.968c 28.12-28.104, 21.6-80.168-14.512-116.296l-33.752-33.744l-22.488-22.488c-36.12-36.128-88.176-42.616-116.28-14.512 - c-28.104,28.104-21.6,80.152, 14.52,116.272l 14.808,14.808l 7.68,7.68c-8.952,28.568-9.6,59.328-2.104,88.672l-19.664-19.664l-60.848-60.856 - c-55.048-55.048-56.584-142.768-3.408-195.936c 53.176-53.176, 140.904-51.648, 195.952,3.4l 80.528,80.52l 5.176,5.176 - c 55.072,55.072, 56.592,142.792, 3.416,195.968l-16.568,16.568l-49.016-49.008L 274.944,242.968zM 237.048,205.032c-28.112,28.112-21.6,80.168, 14.528,116.304l 33.752,33.736l 22.488,22.488c 36.112,36.112, 88.168,42.616, 116.272,14.512 - c 28.104-28.096, 21.592-80.16-14.504-116.264l-14.808-14.808l-7.696-7.688c 8.952-28.576, 9.616-59.328, 2.112-88.664l 19.656,19.656l 60.856,60.856 - c 55.040,55.040, 56.584,142.768, 3.416,195.936c-53.184,53.176-140.912,51.648-195.96-3.392L 196.632,357.176l-5.192-5.192 - c-55.056-55.064-56.584-142.784-3.4-195.968l 16.568-16.568l 49.008,49.008L 237.048,205.032z" /> -<glyph unicode="0" d="M 255.992,480C 114.832,480,0,365.152,0,224.008C0,82.848, 114.832-32, 255.992-32C 397.152-32, 512,82.848, 512,224.008 - C 512,365.152, 397.152,480, 255.992,480z M 142.696,424.040c 0.28-0.032, 0.728-0.016, 1.232,0c-0.584-0.352-1.128-0.32-1.656-0.248 - C 142.416,423.88, 142.552,423.968, 142.696,424.040z M 160.304,14.92c-0.488,1.808-1.472,3.576-1.944,4.632 - c 0.792,0.2, 4.488-1.032, 3.384,1.392c 0.712-1.528-10.224,3.408-5.88,4.584c 2.344,0.616, 8.096-1.2, 6.472,2.616 - c 0.064,1.968-3.68,5.992-0.128,6.872c 3.008,0.736, 8.096,1.448, 9.56,4.704c 4.136,9.224-4.64,6.688-7,12.808 - c 0.496-1.304, 12.904,0.6, 13.656,4.608c 1.16,6, 3.392,11.208, 4.184,17.136c0-0.048, 0.024-0.056, 0.024-0.104 - c-0.024,2.264, 0.696,4.296, 2.2,6.016c-0.896,2.616-1.736,5.248-2.504,7.872c-0.536,3.048, 3.6,7.432, 5.832,8.832 - c 8.056,5.056, 9.448,8.384, 11.776,17.576c 0.768,5.368-4.752,17.616-2.856,21.2c 2.512,4.752, 12.784,24.48, 2.040,26.784 - c-5,1-7.864,4.024-12.624,5.376c-4.752,1.336-9.952-0.216-14.048-0.608c-0.888,3.784-2.128,3.632-5.408,5.024 - c-8.752,3.616-4.648-4.432-9.112-4.856c-4.528-0.512-9.584,5.336-6.040,10c 2.336,3.064-6.128,15.28-11.112,14.912 - c-4.312-0.136-15.64,0.864-18.312,4.784c-3.376,5.032-15.544,6.32-16.616,11.856c 0.408-0.232, 1.264-0.040, 1.656,0.336 - c-3.336,0-8.128-3.24-10.632-2.336c-1.792,0.64-7.024-0.048-8.272,1.368c-1.696,1.936-5.24,4.472-8.104,4.36 - c 0.28-1.52, 1.888-0.832, 2.616-2.328c-8.088-0.472-2.16-8.648-3.704-8.76c-3.56-0.208-2.608,7.456-2.624,9.064 - c 1.032,0.808, 1.168,1.608, 0.432,2.368c-1.464,2.048-2.656-1.424-3.776-1.904c-4.96-2.2-13.128-6.68-11.848-13.344 - c-6.232-2.536,0-10.616, 1.032-15.392c-0.568-1.112-0.168-1.872, 1.224-2.304c 0.072-5.040-6.712-10.432-6.824-15.376 - c-0.144-5.792-1.696-6.52, 3.608-9.408c 0.072-3.504-3.776-5.12-2.76-9.088c 1.048-4.168, 4.72-4.368, 6.568-6.88 - c 3.656-5.344, 8.328-10.944, 12.928-15.888c 5.456-5.888, 6.848-13.536, 15.832-15.112c 6.976-0.952, 14.8-5.32, 17.584-11.824 - c 2.552-5.928, 3.456-12.096, 5.584-18.136c 1.016-6.384, 0.44-17.544, 4.336-22.656c 3.224-7.896, 4.048-13.176, 4.224-20.528 - C 65.176,76.76, 26,145.88, 26,224.008c0,10.336, 0.752,20.512, 2.080,30.52c 0.048-1.768, 0.088-3.432, 0.344-4.072 - c 1.632-4.168, 4.776-6.384, 7.984-7.416c-0.992-3.536-0.416-6.488-0.176-10.048c 0.272-3.88-2.976-7.848-2.048-11.536 - c 0.296-0.12, 0.616-0.208, 0.912-0.328c-0.032,0.472, 0.248,1.272, 0.672,1.808c 3.64-1.24, 1.264-19.872, 6.144-21.864 - C 44.376,200.032, 44.8,212, 49.88,210.224c 2.536-0.944, 0.472-7.336, 0.688-9.112c 0.040-0.088, 4.096,3.664, 4.432,4.208 - c-0.84,3.040-0.944,11.248-6.36,8.912c-11.456-4.912-6.528,14.928-4.24,20.856c 2.64,6.808, 12.44,19.344-0.768,20.144 - c-11,0.688, 1.664,10.88, 3.040,13.336c 1.056,1.184, 1.976,2.208, 2.976,4.352c 1.52,3.176, 4.264,5.568, 5.8,8.768 - c-12.416,2.232-12.888-13.808-24.344-11.328c-0.152,0.040-0.232,0.144-0.368,0.2c 1.888,9.184, 4.408,18.168, 7.376,26.928 - c 1.912,3.576, 3.44,6.248, 3.696,6.832c 0.056-0.016, 0.104-0.048, 0.16-0.048c 3.56,6.2, 8.056,9.056, 14.184,12.376 - c 4.144,2.192, 6.976-3.968, 10-2.656c-0.432,1.040, 0.936,2.024, 2.024,3.744c-0.696-0.296-0.552-0.32-1.128,0.088 - c 1.752,0.592, 3.376,0.24, 4.96,0.592c-0.544-1, 9.872-2.64, 9.928-2.864c 0.448-1.504-6.64-19.416-2.872-19.92 - c 4.168-0.56, 7.472,11.88, 7.784,14.712c 1.2,11.072, 9.552,14.976, 18.808,19.024c-0.024,0.072-0.088,0.128-0.136,0.216 - c 2.304,1.512, 5.136,1.912, 7.336,3.608c-1.68,1.912, 0.872,1.328, 1.848,2.656c-0.432,0.104-0.84,0.232-0.832,0.976 - c 1.288,0.328, 2.152,1.080, 2.584,2.224c-0.192,0-0.48,0.024-0.664,0.024c-0.288,0.784, 2.56,5.52, 3.248,6.232 - c-0.152-0.352-1.232-4.984-1.432-4.96c 3.264-0.088, 3.856,5.328, 5.488,6.304c-0.528,1.296, 8.64,4.616, 10.736,5.152 - c-0.52,0.632-2.64,0.072-3.368,0.072c 3.688,1.608, 8.688,1.392, 12.088,2.64c-5.488-0.136, 4.472,8.104, 7.768,7.392 - c 3.128-0.664, 9.616,3.808, 13.56,3.896c-0.784-1.008-0.488-1.416, 0.888-1.208c-5.224-0.248-9.328-6.84-5.392-4.792 - c 2.376,1.256, 12.92,2.88, 13.936,4.888c 0.56,1.128-11.728,0.352-6.256,7.096c-0.504,0-1.464,0.24-2.352,0.24 - c 1.568,0.976, 4.472,0.528, 5.496,2.36c 1.24,2.16-14.112-1.328-14.872-1.384c 6.344,5.024, 36.816,3.984, 33.824,14.192 - c-0.904-0.256-10.872-2.848-11.048-1.656c 2.288,0.672, 7.92,1.192, 9.136,2.344c 0.736,0.88-7.92,0.12-6.216,2.968l 0.136,0.168 - c-2.064-0.040-2.776,0.696-3.616,1.232c 5.2,1.648-1.312,10.336-4.328,6.312c 0.4-0.496, 0.864-0.824, 1.392-1.104 - c-1.352,0.448-2.376,0.728-0.84,3.472c-2.52-4.6-12.672-1.672-16.072-0.040c-11.816,5.64-8.216-2.176-17.104-4.176 - c 0.184-4.224, 6.136-4.256-2.040-7.48c-6.576-2.624-2.696-4.056-6.064-7.792c-2.952-0.056-4.096,0.232-4.376,0.736 - c 0.528-0.224, 1.072-0.352, 1.616-0.32c 0.72,0.904-0.768,0.928-1.68,0.728c 0.288,1.256, 3.664,3.344, 1.352,4.992 - c-6.936-0.24-6.064,4.808-14.664,4.432c 2.352,2.392, 2.752,3.832-0.856,3.24c 4.648,3.104, 13.576,5.848, 17.296,9.192 - c-0.328,0.288-0.664,0.472-1.032,0.592c 4.264-0.368, 11.408,0.392, 14.224,2.848c-2,0.2-4.512-0.096-4.232,0.96 - c 1.96-0.616, 4.384-0.592, 6.944-0.264c-2.272-0.928-5.328-2.656-6.424-3.592c 0.568,0.048, 2.024,0.248, 3,0.128 - c-0.576-0.384-1.224-0.816-0.36-0.768c 3.344,0.168, 8.936,0.736, 12.288,1.68c-0.176,0.432-1.696,0.184-2.352,0.616 - c-0.216,0.136, 0.304,0.416, 0.216,0.656c-0.328,0.856-3.592,1.304-4.36,0.976c 0.040,0.248,0,0.4, 0.016,0.624 - c 0.8,0.168, 1.568,0.392, 2.344,0.616c-0.312-0.272-0.072-0.52, 0.768-0.52c-0.112,0.296, 0.32,0.712-0.664,0.536 - c 4.672,1.304, 9.152,3.464, 11.392,5.384c-1.168-0.056-2.52,0.496-3.72,0.616c 1.656,0.040, 3.144,0.096, 3.944,0.088 - c-1.12-0.848, 4.328,0.568, 5.8-0.248c-0.072,0-0.112-0.016-0.168-0.016c 0.472-0.056, 0.888-0.248, 1.296-0.64 - c-0.576-0.168-1.192-0.304-1.776-0.464c 0.128,0.104, 3.528-0.024, 4.312-0.416c-1.44,0.168-2.712-0.152-3.896-0.928 - c-0.088-0.072, 4.576-1.392, 4.648,0.496c 2.888-2.096-5.784-3.648-3.392-4.472c-3.032-1.336-8.832-0.416-10.944-3.288 - c-0.384-0.504, 9.52,0.608, 10.464,0.136c 2.288-1.152, 6.736-3.832, 10.48-3.024c 2.984,0.68-2.64,3.36-2.624,3.336 - c 5.056,0.824, 4.912-1.664, 6.256,2.672c-1.768-0.224-2.264,1.456-3.528,1.328c 0.296,0.84, 0.712,0.336, 1.016,0.912 - c 2.328-0.336, 7.12-1.688, 7.536,1.296c 0.016,0.176-6.392,2.344-6.832,2.496c 0.536,0.416, 0.88,0.416, 1.64,0.664 - c-0.56,0.264-1.192,0.328-1.824,0.192c 0.464,0.296, 1.008,0.296, 1.624,0.384c-0.472,0.48-1.032,0.648-1.664,0.52 - c 0.040,0.112, 0.104,0.248, 0.168,0.368c-5.288,0.216-9.928,1.872-15.536,1.92c 0.304,0, 0.904,1.136, 0.872,1.304 - c-0.816,2.208-13.952-2.216-10.856-0.84c-1.472,0, 3.24,1.24, 4.304,1.44c-2.776,0.168-5.272,0.144-8.072-0.416 - c 0.992,0.344, 1.928,0.512, 2.84,0.992c-5.856-0.24-8.016-0.2-12.288-3.2c 1.4-0.056, 2.704,0.296, 3.928,1.024 - c-0.272-0.016-0.528-0.016-0.808-0.032c 1.512,0.728, 4.088,0.52, 5.552,0.984c-0.88-0.456-6.168-1.064-5.368-2.688 - c0,0, 3.656-0.080, 4.088-0.256c-1.16-0.992-2.6-1.104-4.28-0.408c-1.496-1.184, 10.448-1.328, 10.512-1.328 - c-1.456-0.376-7.32-5.648-9.304-3.744c-0.304,1.24, 0.424,1.84, 2.104,1.768c 1.384,1.136-5.696-0.496-5.392-0.488 - c 1.784,1.432-1.448,0.832, 1.208,1.592c-0.624,0.248-2.432-0.12-2.6,0.296c 0.856,0.272, 1.712,0.536, 2.552,0.816 - c 1.912,1.456-6.2,1.272-8.448-0.4c-0.624-0.416, 2.952-0.752, 2.32-1.256c-0.576-0.344-1.168-0.664-1.76-0.968 - c 0.6,0.152, 1.080,0.224, 1.76,0.384c-0.88-1.288-4.232-0.84-6.32-2.48c-1.296-0.192-1.072,0.032-0.576,0.352 - c-1.808-0.488-5.6-0.32-9.44-0.056c 1.416,1.016, 2.824,2.056, 4.264,3.040c 0.616,0.040, 1.248,0.064, 1.68,0.184 - c-0.24,0.208-0.496,0.336-0.736,0.456c 1.544,1.032, 3.112,2, 4.672,3c 2.424-2.048, 7.352-0.352, 9.424,0.92 - c-0.272,0.048-0.984,0.064-1.184,0.072c 1.536,1.080-0.616,0.424-1.4,0.344c 1.144,0.224, 2.264,0.576, 3.328,1.056 - c-0.4-0.256-10.456-0.728-5.936-0.832c-0.936-0.64-1.816-0.576-2.664-0.568c 2.416,1.52, 4.872,2.984, 7.344,4.424 - c 0.8,0.024, 1.544,0, 2.096-0.176c-0.768-0.232-2.392-0.424-3.184-0.928c 1.28,0.8, 7.52-1.128, 7.488,2.064 - c0-0.024-3.248-0.008-4.744-0.024c 0.944,0.536, 1.872,1.104, 2.824,1.624c 1.664,0.12, 2.968,0.368, 2.496,0.784 - c 0.224,0.072, 0.576,0.16, 0.792,0.216c-0.168,0.152-0.392,0.264-0.664,0.368c 32.080,17.016, 68.624,26.696, 107.392,26.696 - c 32.056,0, 62.592-6.608, 90.344-18.512c-1.008-0.024-2-0.064-2.84-0.056c 0.128-0.040, 0.224-0.104, 0.336-0.16 - c-0.336,0-0.688,0.008-0.992,0.032c0-0.040,0-0.064,0-0.104c-0.664,0.072-1.328,0.12-2,0.12 - c 0.384-0.776, 2.496-0.68, 2.992-0.68c 0.12-0.008, 2.592-0.12, 2.864-0.136c-0.92-0.048-1.832-0.056-2.728-0.032 - c 0.112-0.192, 0.312-0.336, 0.56-0.488c-1.448,0.312-2.912,0.488-4,0.328c0,0.144, 0.16,0.224, 0.12,0.352 - c-0.032,0.112-4.928,1.4-2.56-0.608c-0.4,0.064-4.040,0.568-2.936,0.344c-0.376,0.128-0.872,0.136-1.4,0.296 - c 0.144,0.064, 0.328,0.12, 0.584,0.2c-1.416,0.28-2.808,0.208-4.144-0.2c 0.504-0.24, 1.032-0.416, 1.6-0.504 - c-0.192-0.28, 0.56-0.456, 1.432-0.664c-0.152,0.016-0.256,0-0.416-0.008c 0.736-0.528, 3.664-0.28, 5.208-0.192 - c-1.272-0.192-3.52-0.552-3.544-0.496c 0.048-0.6, 4.016-0.456, 4.512-0.608C 337.688,432.16, 336.528,432.288, 335.2,432.288 - c 0.216-2.872, 8.096-0.072, 10.72,0.48c 0.296-0.192, 0.824-0.504, 1.216-0.584C 347.080,431.848, 346.352,432, 346.272,431.584 - c 0.864-0.072, 2.216-0.12, 2.984-0.224c-0.16-0.096-0.152-0.216, 0.048-0.424c 1.64,0.088, 2.28,0.472, 4.112,0.592 - c-1.912,0.944-4.272,1.24-6.12,1.472c 0.176-0.016, 0.456-0.024, 0.616-0.016c-0.44,0.192-0.976,0.384-1.544,0.544 - c 1.208-0.128, 2.736-0.088, 4.248,0.024c 1.752-0.784, 3.52-1.536, 5.24-2.376c-1.304-0.016-2.44-0.112-2.528-0.456 - c0,0, 0.824-0.128, 1.232-0.16c-0.336-0.040-1.152-0.152-1.504-0.32c 1.752-0.104, 2.544,0.16, 4.144,0.232 - c 0.112-0.056, 0.208-0.104, 0.32-0.16c-1.384-1.696-14.52-6.968-16.24-7.064c 0.8-0.152, 1.144-0.248, 2.104-0.432 - c-2.768,0.328-14.888-2.016-8.544-6.392c-0.56-0.272-0.984-0.672-1.288-1.2c 1.040,0.168, 1.040,0.168, 2.28,0.080 - c 0.168-1.488-1.472-0.52-1.36-1.448c 0.304-3.264, 9.336-0.944, 10.36-0.312c 3.152,1.896, 3.952-0.104, 5.808-2.8 - c 0.68-1.040, 3.584-6.648, 5-6.792c 1.608-0.12, 8.84,1.632, 8.76,3.968c-6.032,1.048, 3.504,5.016, 3.392,5.504 - c-0.736,2.816-4.584,1.936-5.064,5.032c-0.496,2.976, 9.168,2.128, 8.52,4.088c 0.040,0.056, 0.168,0.16, 0.248,0.224 - c 1.144-0.656, 2.312-1.304, 3.448-1.976c-1.776-0.624-3.336-1.104-3.632-1.080c 0.896-1.104, 0.696-2.344, 2.48-2.84 - c-2.112-2.6, 6.568-3.232, 13.104-3.888c 0.808-0.568, 1.592-1.136, 2.392-1.712c-3.184,0.264-6.408,1.344-9.296-0.16 - c-1.344-0.696, 3.44-2.488, 3.472-3.912c-0.032,1.608-10.896-0.8-10.024-6.76c-1.12,0.040-2.224,0.072-3.344,0.152 - c-0.032,0.12, 0.088,0.432, 0.224,0.656c-2.744,0.992-13.888-2.896-13.384,0.504c-2.968,0.48-6.472,0.288-9.4,0.536 - c-0.264-0.712-0.112,0.312, 0.152,1.608c 0.688-0.248, 1.744,0.144, 1.88-0.864c 0.224,1.44-0.496,1.856-1.6,2.024 - c 0.32,1.144, 0.632,2.168, 0.872,2.136c-0.384,0.712-1.28,1.336-1.528,3c-5.792-2.264-5.832-2.264-2.656-7.664 - c 1.424-2.424-4.344-2.152-5.92-2.008c-5.408,0.432-4.808-4.32-9.24-5.28c-5.432-1.176-6.336-3.504-12.616-2.992 - c 0.056-1.040, 0.56-1.704, 0.608-2.648c-0.96-0.104-8.832,1.464-8.808-0.304c0-2.544, 13.504-4, 10.528-8.92 - c 0.064,0.024, 0.12,0.056, 0.184,0.12c 0.36-6.808-1.552-5.024-6.488-5.664c-4.408,0.352-8.712,1.512-13.104,1.84 - c-5.152,0.36-3.072-2.96-3.072-5.44c0-1.784-3.472-14.96, 0.512-15.256c 3.872-0.296, 5.32,1.168, 7.784-2.608 - c 1.912-2.96, 7.92,1.592, 11.128,0.376c 2.736,1.064, 5.752,3.248, 7.688,5.984c-6.416,2.768, 8.24,9.032, 8.424,9.608 - c-2.784,7.072, 7.808,1.48, 11.016,3.072c 6.528,3.304, 7.416,1.408, 12.36-3.712c-0.904,2, 21.504-15.464, 14.512-14.8 - c 0.464-2.968, 4.216,2.832, 4.328,2.248c-0.816,4.848-3.416,4.24, 3.296,2.496c-0.112,4.096-7.184,3.192-7.832,6.856 - c-4.664,0.448-12,6.632-12.608,11.128c-0.416,2.888, 13.712-6.856, 14.912-6.976c 0.56-3.2, 7.4-3.912, 8.296-8.8 - c 0.536-2.864, 6.336-8.6, 9.040-8.88c-1.472-3, 0.696-4.704, 4.208-5.080c-0.592,0.312-1.448,4.168-1.592,4.808 - c 1.488-1.28, 3.136-2.264, 4.904-1.36c-3,2.488-4.408,4.928-7.008,7.416c-0.456,2.2, 3.848-0.768, 3.896-0.768 - c 0.064,0.736-0.064,1.288-0.416,2.080c 2.528,0.464, 2.904,1.6, 5.576-0.344c 3.504-2.456, 3.056,0.792, 6.216,0.344 - c0-0.44, 0.968-1, 1.128-1.312c-1.424-0.528-9.448,0.832-8.784-2.208c 0.496-2.168, 3.888-0.752, 0.512-4.208 - c 3.088-1.568, 4.824-3.344, 7.408-5.608c-0.064-0.168-0.432-0.44-0.712-0.512c 8.792-0.848, 16.016-4.4, 24.696-2.064 - c 1.064-4.016, 0.168-7.128-0.088-11.144c-0.072-1.192, 0.32-5.2-0.688-5.944c-0.392-0.296, 3.64-7.808, 3.704-9.392 - c 0.472-10.64, 16.448-16.504, 18.664-26.216c 1.328-5.864, 6.136-9.408, 9.552-13.992c 4.608-6.168, 6.28-10.736, 9.688-17.336 - c 3.792-7.4, 8.28-6.792, 13.448-4.496c 0.44-3.328, 0.816-6.656, 1.12-10c-3.472-1.392-6.944-3.056-10.64-3.848 - c-8.192-1.472-11.336-3.832-13.608,6.040c-1.56,6.88-13.392,11.584-14.984,18.888c-1.192,5.528-2.568,7.472-6.184,11.52 - c-3.392,3.792-2.168,10.288-4.88,14.952c-2.344,4.016-2.888,8.248-5.064,12.464c-3.224,6.192-9.904,14.544-10.28,21.52 - c 2.176-2.344, 4.552-8.664, 7.12-9.080c 1.576,6.768, 1.784,8.512-0.856,15.056c-4.456-1.2-8.36,1.608-12.64,0.024 - c-5.776-2.128-10.248-1.392-16.024,0.656c-4.088,1.472-20.552,11.040-20.328-0.072c 0.264-12.896-15.152,3.832-19.128,5.152 - c-4.28,1.368-11.416-1.048-11.336,6.328c0,4.176, 1.56,7.36, 1.832,11.112c-1.216-1.184-2.352-1.096-3.384,0.248 - c-1.864,2.912-4.496-0.888-6.56-0.96c-4.328-0.16-8.24-0.024-12.496-0.2c-6.392-0.216-13.168-3.608-18.64-6.704 - c-6.776-3.952-12.784,1.824-16.632-3.344c 0.056,0.008, 0.144,0.008, 0.208,0.024c-3.392-4.496-7.352-8.488-10.672-13.088 - c-2.264-3.12-1.456-7.24-2.608-10.792c-1.048-3.344-4.824-6.52-8.016-7.688c-5.776-2.128-8.064-8.672-10.456-13.864 - c-1.928-4.232-3.488-8.192-5.776-12.224c-3-5.272, 1.024-13.672, 0.84-19.424c-0.16-4.048-1.664-8.736-3.848-12.2 - c-2.128-3.32, 0.6-7.36, 0.544-11.736c-0.128-0.040-0.24-0.040-0.36-0.040c 2.2-3.528, 4.912-6.712, 7.704-9.768 - c 4.976-5.464, 6.048-12.832, 11.336-18.16c 4.016-4.008, 8.728-10.304, 15.128-8.128c 2.928,1.008, 5.28,2.824, 8.512,2.896 - c 2.688,0.064, 4.784-2.296, 7.416-2.224c 6.192,0.168, 12.36,8.792, 19.88,8.952c 5.472,0.168, 5-9.192, 9.736-9.072 - c 15.4,0.288, 13.544-10.656, 9.648-21.264c-2.512-6.816, 4.248-13.28, 8.040-18.088c 3.8-4.8, 4.24-12.032, 5.816-17.856 - c 1.456-5.472, 4.128-14.056, 2.768-19.72c-1.336-5.624-6.048-9.648-7.112-15.472c-1.496-8.128, 1.608-16.128, 5.216-23.232 - c 3.472-6.832, 3.664-9.696, 4.496-17.192c 1.76-16.216, 14.216-27.92, 14.024-43.464c 1.232,0.72, 4.424-0.896, 7.824-0.728 - c-35.944-23.28-78.72-36.84-124.632-36.84C 221.848-6.008, 189.464,1.52, 160.304,14.92z M 421.704,64.744 - c 0.080,3.128-0.736,5.96, 2.96,9c 5.528,4.616, 7.304,2.784, 7.632,11.672c 0.128,3.808-7.168,13.2, 0.704,14.776 - c 0.912,5.608, 6.52,8.016, 10.8,10.672c 12.288,7.56, 2.824,18.248, 7.768,28.816c 1.824,3.856-4.056,8.36-4.008,12.576 - c 0.064,4.056-0.888,7.992-0.88,12.064c 0.048,4, 3.384,6.056, 4.192,9.776c 3.104,14.032, 15.128,17.888, 22.552,28.72 - c 3.608,5.272, 9.176,14.528, 12.52,23.68c0-0.832, 0.056-1.648, 0.056-2.472C 486,162.224, 461.472,106.12, 421.704,64.744zM 133.28,412.128c0-0.184-0.664-0.528-1.128-0.792C 132.8,411.512, 133.224,411.752, 133.28,412.128zM 168.76,415.392c-0.656,0.104-1.36-0.128-2.088-0.736C 167.248,415.144, 167.976,415.368, 168.76,415.392zM 160.496,420.776c 0.032,0, 0.056,0, 0.112,0C 160.752,420.832, 160.68,420.824, 160.496,420.776zM 177.584,368.040c 0.144,0.32-0.264,0.472-0.336,0.808c-1.448-0.592-2.704-1.496-3.736-2.672 - c-0.504-1, 3.632-0.832, 4.344,0.648C 175.472,366.872, 177.16,367.192, 177.584,368.040zM 190.344,371.736c-0.424,0.024-1-0.048-1.28-0.192c 0.464,1.128, 0.84,1.808, 1.128,2.464 - c-0.624-0.2-2-0.176-3.112,0.040c-0.456-0.112-0.936-0.184-1.392-0.288c0,0, 0.12,0.288, 0.136,0.384 - c-0.632,0.008-1.24,0.008-1.872,0.008c 0.088,0.544, 0.424,0.88, 0.952,1c-1.112,0.56-2.216,0.488-3.32-0.2 - c 0.104,0.248, 5.832,4.856, 4.392,4.88c-4.68,0-8.096-6.568-12.472-7.896c0-0.24, 0.336-0.392, 0.632-0.392 - c-0.528-1.152-2.272-0.816-2.792-1.888c-0.024-0.096, 11.040-0.904, 12.304-0.912c-0.696-0.28-1.304-0.688-1.76-1.256 - c-0.232-0.528, 4.736,2.096, 4.696,2.064c 2.12-2.2, 1.888-5.376, 4.104,0.248c-0.808-0.296-0.536-0.472-1.624-0.448 - C 189.696,370.976, 189.448,370.136, 190.344,371.736zM 137.832,401.984c-0.168-0.168-0.368-0.36-0.536-0.568c 1.232,0.136, 3.872,1.080, 5.024,1.6 - C 140.704,403.448, 139.304,402.648, 137.832,401.984zM 176.64,375.248c-1.64,0.88-2.744,2.2-6.064,1.712C 172.024,375.856, 174.72,373.872, 176.64,375.248zM 91.744,298.736c 0.024,0.4, 0.024,0.776, 0.032,1.152C 91.472,299.496, 91.384,298.64, 91.744,298.736zM 94.664,275.472c-0.376-0.416-4.432-1.696-2.808-2.128C 93.552,273.216, 94.496,273.936, 94.664,275.472zM 243.32,419.904c 0.584,1.824, 4.176-2.928, 5.16,0c-0.968,0.536-1.992,0.968-3.032,1.256c 1.864,0.032, 4.888-1.376, 6.544,0.52 - c-0.312,0.072-0.592,0.232-0.504,0.44c 1.264,0.064, 2.688,0.336, 3.264,0.808c-0.904-0.12-1.712,0.040-2.464,0.496 - c 0.336,0.952, 2-0.224, 2.48,1.024c 0.504,1.328-2.624,1.128-2.48,1.488c 0.672,1.592, 5.696-0.64, 6.344,0.968 - c-0.792,0.416-1.64,0.664-2.536,0.784c 0.416,0.016, 0.92,0.104, 1.288,0.176c-1.488,0.384-2.944,0.472-4.44,0.304 - c 1.744,0.904, 11.24,3.016, 11.928,4.24c 2.64,0.136, 7.632,0.448, 8.336,1.584c 0.24,0.384-23.304-2.464-24.672-2.664 - c 0.312,0.264, 5.16,1.808, 5.28,1.96c 0.088,0.136-0.928,0.064-2.272-0.088c 1.664,0.296, 3.056,0.768, 3.944,1.496 - c-12.448,0.288-25.888,0.992-38.040-1.816c 0.128-0.104, 0.456-0.104, 0.672-0.192c-0.632,0-1.256-0.104-1.848-0.336 - c 0.6-0.416, 1.264-0.592, 2-0.56c-1-0.080-5.872,0.904-6.472-0.024c-0.104-0.152, 0.056-0.256, 0.088-0.392 - c-0.96,0.36-2.304,0.584-2.76-0.248c-1.8-0.12-14.016-0.632-15.336-3.152c 0.736-0.304, 1.48-0.384, 2.264-0.208 - c-1.32-2.512-6.88-0.32-7.92-2.552c-0.384-0.72, 5.016-0.328, 5.512-0.32c-1.080-1.224-4.096,0.128-5-1.224 - c 0.76,0.136, 1.488,0.048, 2.192-0.232c-0.216-0.2-0.44-0.224-0.792-0.368c 0.792-0.416, 1.512-0.504, 2.32-0.312 - c-0.088,0.008-0.216,0.088-0.256,0.144c 2.36,0.64, 11.192,0.64, 9.576-3.56c 1.12-0.264, 1.048-0.704-0.088-1.24 - c 0.976,0.056, 3.648-1.448, 4-1.528c-0.752-1.168-2.336,0.24-3.448-0.016c-0.064-0.688, 2.696-0.808, 3.888-1.080 - C 204.752,414.024, 201.568,413.6, 200.96,411.64c 0.24,0.144, 0.52,0.112, 0.752-0.008c-1.528-2.080, 1.136-2.432, 1.832-3.256 - c-3.384-1.8, 5.848-6, 7.16-6.096c 1.944-0.16, 6.472,7.424, 10.232,8.136c-0.072-0.192-0.136-0.392-0.176-0.608 - c 4.032-0.104, 6.136,2.224, 9.68,3.216c 5.464-0.072, 11.232,0.872, 16.424,2.624c-1.28,0.24-6.792,0.152-6.488,1.048 - c 1.736,0.184, 0.776,0.184, 1.072,1.136c 0.792-0.264, 6.728-2.464, 7.12-1.16C 249.136,418.6, 244.224,419.416, 243.32,419.904zM 89.488,301.92c-0.488,0.056-1.456-0.416-1.904-0.904c 0.584-0.088, 1.488-0.336, 2.552-0.32 - C 90.136,301.136, 90.176,301.832, 89.488,301.92zM 269.304,415.112c-0.848,0.088-8.256,0.856-8.368,0c-1.040,0.584-2.272-0.28-2.96,0.752c-0.784-0.416-2.952-1.24-2.048,0.904 - c-0.984,0.096-2.472-0.336-3.416-0.488c-0.144-0.336, 2.776-1.696, 2.624-1.608c-0.808-0.112-2.624-0.168-3.568-0.096 - c 0.336-0.512, 1.72-0.168, 2.624-0.424c-0.448-0.488-0.824-0.728-1.192-1.328c-0.168,0.024-0.472-0.104-0.72-0.152 - c 6.64-0.656, 10.352-3.456, 17.464-0.376C 270.256,413.184, 267.368,414.608, 269.304,415.112zM 176.824,378.192C 175.128,376.832, 178.824,377.912, 176.824,378.192L 176.824,378.192zM 75.376,254.824c-0.496,0.496-1.568,1.84-2.824,2.152c-0.832,0.176-3.96-3.848, 3.096-3.536 - c 0.16,0.72, 0.16,1.296-0.36,1.784C 75.32,255.080, 75.344,254.976, 75.376,254.824zM 97.672,264.24c-1.768,0.264-3.704-1.312-4.968,0.664c-2.736,4.176-2.928-6.6-2.976-7.688 - c-0.672,0.336-11.968-0.608-6.176-3.96c 2.224,6.080, 7.472-3.408, 7.52-3.424c 0.84-0.16, 4.376,5.336, 4.64,2.952 - c 0.008-0.040, 7.648-0.040, 7.968-0.096c0-0.208-0.944,3.168-1.384,4.768C 100.888,259.92, 101.392,263.64, 97.672,264.24zM 167.024,369.072c-0.232-0.088-0.568-0.304-0.672-0.552c-0.4-0.696, 4.088-3.296, 5.32-0.768 - C 169.728,367.136, 168.192,367.584, 167.024,369.072zM 86.536,266.056c-1.504,2.144, 0.88,4-2.416,4.96c 0.28,1.832-4.536,8.744-6.664,10.808 - c-6.6,6.408-11.144,5.176-17.136-2.408c 5.872-0.776, 6.576,7.416, 8.488,0.904c 7.456-0.92, 8.968-8.72, 6.912-13.656 - C 79.448,266.040, 83.080,261.44, 86.536,266.056zM 107.488,249.528c-0.856-2.6, 3.76-3.936, 5.032-2.144C 112.464,248.624, 108.304,252.152, 107.488,249.528zM 102.296,257.456c 0.024-0.056, 0.032-0.112, 0.072-0.168C 101.96,258.736, 102.016,258.4, 102.296,257.456zM 86.32,291.776c 0.232,0.496-0.224,2.864-0.56,2.216C 85.584,293.64, 85.128,289.28, 86.32,291.776zM 64.92,278.616c-0.824-0.192-1.36-0.752-1.632-1.576c 0.496,1.040, 0.808-2.496, 2.6,2.64 - C 65.28,280.36, 65.312,279.488, 64.92,278.616zM 148.416,422.832c-0.128,0-0.968-0.16-1.336-0.384c 0.104,0, 7.024-0.2, 5.168,0.784C 150.936,423.624, 149.664,423.48, 148.416,422.832zM 347.832,363.96c 0.208-0.784, 1.216-1.32, 1.272-2.072C 350.12,353.368, 355.808,365.152, 347.832,363.96zM 295.72,398.664c 4.976-0.344, 8.040,1.088, 8.168,5.56c 0.008,0.664, 4.168,3.192-1.424,3.552 - c-0.944,0.056-5.808,0.272-3.976-1.688c-0.736-0.4-3.84-0.016-3.928-1.112c 0.584-0.488, 1.184-0.96, 1.792-1.44 - C 295.92,402.208, 290.552,399.016, 295.72,398.664zM 350.272,365.52c 0.224,0.544, 0.28,2.48, 0.48,3.536c-0.336,0.096-0.472,0.552-0.544,1 - c-0.672-0.504-1.424-0.784-2.264-0.84C 348.528,368.456, 349.168,365.808, 350.272,365.52zM 404.328,340.28c-1.904,0.712-4.552,1.504-6.832,1.32C 398.936,340.808, 402.632,339.504, 404.328,340.28zM 333.352,361.232c-0.296,1.304-1.080,1.528-2.296,0.568C 331.168,361.68, 333.472,359.96, 333.352,361.232zM 308.584,405.032c-0.576-0.144-0.688-0.392-0.688-0.712c 0.592-0.024, 0.88-0.064, 1.072-0.064c0,0.32, 0.088,0.56, 0.088,0.752 - C 308.968,405, 308.704,405.008, 308.584,405.032zM 302.608,413.68c 1.008-0.056, 1.808,0.512, 1.816,1.112C 304.224,414.808, 300.744,413.8, 302.608,413.68zM 303.44,413.080c-0.040-0.704, 0.68-0.92, 2.072-1.176c-0.064-1.776, 0.32-1.344, 0.272-3.528 - c 0.248-0.008, 0.496-0.032, 0.752-0.048c-0.192,0.248-0.472,0.448, 0.024,0.872c 3.168-1.608, 0.648-0.576, 0.608-2.72 - c-0.024-0.952, 3.984-0.504, 4.584-0.568c-1.12-1.4, 0.104-1.656, 1.608-1.656c0-2.016-2.728-1.96-4.304-1.848 - c0-2.336-1.92-2.6-1.92-3.856c0-0.352, 5.216-1.288, 5.928-0.56c 0.048-1.136-5.4-2.024-6.552-3.96 - c 1.984-0.12, 18.568,1.376, 18.52,2.136c-0.648,0.136-1.328,0.28-1.976,0.432c 2.248,2.568, 2.248,4.992, 0.088,4 - c-0.384-0.136-0.456-0.32-1.136-0.4c-0.152,3.736-5.864,7.536-9.624,8.496c 0.368,0.904, 3.592,2.16, 3.224,3.68 - c-2.88-1.312-4.776-1.024-5.712,0.832c 0.792,0.328, 1.576,0.752, 2.304,1.216c 0.104,3.136-7.952-1.008-6.28-1.672 - C 305.912,412.448, 303.616,413.072, 303.44,413.080zM 369.224,348.912c 0.104-0.008, 0.168,3.512, 0.384,4.44c-1.352,0.344-7.168,0.84-8.28,0.432 - C 361.528,352.552, 367.848,349.048, 369.224,348.912zM 377.352,408.776c 1.144-0.104, 1.64,0.896, 1.68,1.752c-0.664,0.224-2.984,0.96-0.984-0.56c-0.696,0-1.136-0.272-1.848-0.272 - C 376.304,409.36, 376.504,408.84, 377.352,408.776zM 330.336,434.056c0,0.016,0,0.024,0,0.040c-0.040-0.008-0.040-0.016-0.080-0.016c-0.704-0.144, 0.688-0.68, 1.64-0.816 - C 331.528,433.664, 330.92,433.784, 330.336,434.056zM 369.272,409.2c-0.568,0.008-2.824-1.008-1.6-2C 368.168,407.856, 368.72,408.56, 369.272,409.2zM 350.976,403.008c-0.176,0.376-0.392,0.376-0.672-0.024c 2.816-1.888, 2.088,1.568, 3.888,1.768 - C 352.032,408.4, 348,404.576, 352.136,403.736C 352.2,403.384, 351.608,403.008, 350.976,403.008zM 428.632,339.448c-1.696-0.112-4.144-0.848-5.528-1.376C 423.8,335.048, 428.704,338, 428.632,339.448zM 177.144,423.656c0,0-0.44-0.024-0.816,0c 0.376,0.168, 0.784,0.272, 1.176,0.28c-0.168,1.16-18.256-0.44-16.968-0.088 - c-0.472,0.224-2.52-0.184-1.944,0.416c 0.824,0.032, 1.632,0.072, 2.432,0.088c-0.336,0.944-9.624,1.024-10.52,0.472 - c 0.928-0.408, 1.92-0.624, 2.984-0.608c 1.152,0.704, 1.864,0.448, 2.112-0.792c-3.888-0.688, 3.488-0.832, 4.56-0.8 - C 164.152,424.904, 172.592,420.832, 177.144,423.656zM 130.832,413.504c-4.024-0.6, 3.688-0.608, 4.816-0.352C 136.928,415.928, 129.272,413.224, 130.832,413.504zM 156.392,425.768c 0.656-0.024, 1.208,0.152, 1.68,0.496c-1.648-0.168-3.32-0.016-4.952-0.408 - C 153.12,425.856, 156.112,425.736, 156.392,425.768zM 154.352,428.376c0,0-0.008,0-0.016-0.008C 154.624,428.392, 154.552,428.376, 154.352,428.376zM 154.352,428.376c 0.232,0.152, 0.464,0.256, 0.68,0.384c-0.392-0.016-1.184-0.016-1.944-0.056 - C 152.496,428.376, 153.864,428.376, 154.352,428.376zM 162.32,427.304c-0.304-0.104-0.552-0.088-0.808-0.080c-0.064-0.024-0.16-0.072-0.2-0.088 - C 161.744,427.176, 162.032,427.248, 162.32,427.304zM 160.776,428.496c-0.576-0.024-1.064-0.088-1.28-0.208C 160,428.36, 160.392,428.416, 160.776,428.496zM 155.904,426.48c 1.408,1.656-4.624,1.248-3.128,0.016C 149.84,426.168, 154.512,426.448, 155.904,426.48zM 191.4,429.696c-0.016,0.24-0.496,0.28-0.968,0.376c 0.904,0, 1.432,0, 1.696,0.368C 191.72,430.416, 191.28,430.4, 190.816,430.392 - c 5.072,1.296, 10.584,1.152, 15.68,2.576c-0.952-0.008-2.536-0.144-2.856-0.024c 0.496,0.072, 6.208,0.072, 6.52,0.696 - c 0.448,0.856-9.192-0.592-5.544,0.32c-7.056,2.512-26.928,0.752-33.968-1.856c 1.304,0.040, 2.576,0.192, 3.856,0.208 - C 173.792,432.224, 173.36,432.176, 172.504,432c 1.472-0.248, 2.896,0.312, 4.384,0.24c-1.6-0.176-2.832-0.152-4.24-0.608 - c 0.856,0.024, 1.696,0.056, 2.536,0.072c-0.592-0.072-1.192-0.16-1.768-0.24c 0.248-0.392, 1.472-0.552, 3.032-0.552 - c 0.904-0.264, 0.568-0.4-0.952-0.384c 0.616-0.080, 2.272-0.672, 2.080-0.816c-3.152-2.168-3.664,0.312-5.584-0.8 - c 0.992,0.568, 1.28,0.808-0.192,0.784c 0.016-0.032, 0.040-0.088, 0.064-0.112c-1.304-0.744-5.272,0.936-7.2,0.936 - c-0.392-0.224, 0.528-0.224, 1.032-0.304c-1.152-0.016-2.288-0.104-3.408-0.248c 0.112-0.152, 0.28-0.184, 0.4-0.264 - c-0.856,0.024-1.8,0.080-2.472-0.272c 0.544-0.296, 1.144-0.392, 1.776-0.32c-0.96,0-2-0.024-2.984-0.048 - c-0.808-0.528, 0.296-0.544, 2.248-0.488c-0.176-0.040-0.328-0.056-0.488-0.088c 1.6,0.040, 4.088-0.224, 4.816-0.28 - c-1.712-0.008-3.392-0.192-5.064-0.52c 0.248-0.352, 0.608-0.456, 0.992-0.472c 1.128,0.432, 5.416,0.096, 6.768,0.152 - c 0.064,0.152-0.104,0.176-0.128,0.368c 1.576,0.336, 4.264,0.56, 5.8-0.632c-0.96-0.048-8.16,0.736-5-0.64 - c-1.192-0.096-2.376-0.288-3.472-0.544c 5.664,0.544, 14.736-2.728, 18.616,1c 0.208,0.2-1.44,0.112-2.080,0.040 - c 0.944,0.824, 3.024,0.408, 3.512,1.528C 187.848,428.648, 189.048,429.224, 191.4,429.696zM 165.48,425.928c-1.264-0.128-2.352-0.424-3.184-1.024C 163.336,425.32, 164.376,425.656, 165.48,425.928zM 155.904,426.48c-0.016-0.016,0-0.032-0.040-0.056C 156.472,426.488, 156.36,426.488, 155.904,426.48zM 171.912,421.416c-0.592-0.448, 1.76-0.976, 1.92-0.976c 1.592,0.056, 4.8-0.040, 6.336,0.704 - C 178.216,421.528, 173.808,422.808, 171.912,421.416z" /> -<glyph unicode="f" d="M 295.408,312.224l 0.144,44.192c0,23.032, 2.184,35.328, 35.208,35.328l 44.168,0 L 374.928,480 l-70.672,0 C 219.384,480, 189.48,437.176, 189.48,365.216l0-52.992 - l-52.936,0 L 136.544,224 l 52.936,0 l0-256 l 105.928,0 L 295.408,224 l 70.672,0 l 9.376,88.224L 295.408,312.224 z" /> -<glyph unicode="+" d="M 398.904,140.312c-1.888,10.080-4.744,19.816-8.584,29.064l-0.76,1.72L 256,480L 122.344,170.904l-0.608-1.4 - c-3.872-9.264-6.744-19.064-8.632-29.192c-1.624-8.696-2.576-17.664-2.576-26.832C 110.52,33.144, 175.656-32, 256-32 - c 80.36,0, 145.48,65.144, 145.48,145.488C 401.48,122.648, 400.528,131.616, 398.904,140.312z" /> -<glyph unicode="d" d="M 256,479.976C 114.632,479.976,0,365.368,0,224c0-141.392, 114.632-255.976, 256-255.976S 512,82.608, 512,224C 512,365.368, 397.368,479.976, 256,479.976z - M 474.52,226.408c-9.616,2.016-80.168,15.968-151.944,6.96c-1.512,3.784-3.048,7.56-4.696,11.368 - c-4.584,10.768-9.512,21.464-14.656,31.968c 80.728,33.008, 116.872,79.256, 121.816,85.96C 455.544,325.504, 473.952,278.104, 474.52,226.408z - M 400.408,387.896c-4.76-6.752-37.256-49.672-114.080-78.488c-35.696,65.464-74.616,118.152-81.312,127.040c 16.384,3.92, 33.392,6.224, 50.984,6.224 - C 311.424,442.68, 361.872,421.888, 400.408,387.896z M 163.016,421.696c 6.080-8.28, 44.568-61.2, 80.832-125.6c-101.52-26.96-190.080-26.96-201.744-26.832 - C 56.352,336.952, 101.992,392.928, 163.016,421.696z M 37.352,224c0,2.336, 0.272,4.6, 0.344,6.912c 12.832-0.208, 116.52-0.912, 224.344,31.336 - c 6.304-12.32, 12.272-24.84, 17.808-37.336c-2.88-0.832-5.792-1.688-8.64-2.632c-111.656-36.072-171.44-132.72-178.024-143.864 - C 58.576,117.096, 37.352,168, 37.352,224z M 121.488,51.848c 5.112,10.272, 49.768,93.632, 171.928,136.184c 0.464,0.168, 0.96,0.32, 1.416,0.456 - c 30.44-79.064, 43.24-145.392, 46.728-165.76C 315.28,11.536, 286.368,5.328, 256,5.328C 205.216,5.328, 158.6,22.8, 121.488,51.848z - M 378.552,42.896c-2.648,15.368-14.488,78.568-42.576,155.824c 67.368,10.76, 126.032-6.16, 135.696-9.168 - C 462.008,128.672, 427.496,76.088, 378.552,42.896z" /> -<glyph unicode="4" d="M 512,344.544c0,19.056-15.464,34.496-34.504,34.496c-19.064,0-34.496-15.448-34.496-34.496c0-17.176, 12.576-31.312, 29.016-33.96 - l-68.344-102.688l-68.264,102.568c 16.984,2.16, 30.176,16.496, 30.176,34.080c0,19.056-15.464,34.496-34.504,34.496c-19.064,0-34.504-15.448-34.504-34.496 - c0-16.784, 11.984-30.744, 27.856-33.84l-68.416-102.8l-68.16,102.416c 17.72,1.448, 31.696,16.128, 31.696,34.224c0,19.056-15.44,34.496-34.504,34.496 - c-19.048,0-34.504-15.448-34.504-34.496c0-16.28, 11.312-29.832, 26.456-33.48l-68.648-103.168L 40.008,310.584 - c 16.424,2.648, 29.016,16.784, 29.016,33.96c0,19.056-15.456,34.496-34.52,34.496C 15.456,379.048,0,363.6,0,344.544 - c0-19.064, 15.456-34.504, 34.504-34.504l 0.016,0 L 34.504,68.952l 442.992,0 L 477.496,310.040 C 496.536,310.040, 512,325.488, 512,344.544z" /> -<glyph unicode="x" d="M 512.008,402.576L 434.616,480L 256.008,301.408L 77.408,480L-0.008,402.608L 178.6,223.984L-0.008,45.384L 77.4-32L 256.008,146.592L 434.616-32L 512.008,45.416L 333.416,224.008 z" /> -<glyph unicode="~" d="M 78.92-32L 22.52-32L 22.52,480L 78.92,480L 78.92-32 zM 111,163.68c0,0, 114.368-57.328, 207.080-12.248c 100.936,49.072, 144.76,13.2, 171.4,12.248L 489.48,428.416 - c-26.64,0.96-70.464,36.824-171.4-12.248c-92.712-45.072-207.080,12.248-207.080,12.248L 111,163.68 z" /> -<glyph unicode="3" d="M 84.688,112.256c0,28.184, 10.632,62.384, 52.592,86.288c-1.528,0.352-2.856,0.792-4.448,1.112c 12.104,12, 19.312,29.944, 19.312,49.136 - c0,35.112-23.856,63.696-53.208,63.696c-29.32,0-53.208-28.584-53.208-63.696c0-19.184, 7.208-37.136, 19.328-49.136 - C 21.872,190.952,0,170.944,0,140.096c0-21.664, 43.336-30.688, 85.296-32.256C 85.136,109.32, 84.688,110.688, 84.688,112.256zM 446.944,199.656c 12.12,12, 19.328,29.944, 19.328,49.136c0,35.112-23.88,63.696-53.2,63.696c-29.36,0-53.224-28.584-53.224-63.696 - c0-19.184, 7.216-37.136, 19.32-49.136c-1.568-0.32-2.904-0.76-4.424-1.112c 41.944-23.904, 52.576-58.104, 52.576-86.288 - c0-1.568-0.44-2.936-0.608-4.424C 468.672,109.408, 512,118.448, 512,140.096C 512,170.944, 490.128,190.952, 446.944,199.656zM 310.168,207.424c 19.336,19.168, 30.848,47.856, 30.848,78.496c0,56.136-38.136,101.784-85.008,101.784 - c-46.864,0-85.008-45.648-85.008-101.784c0-30.64, 11.52-59.336, 30.864-78.496c-68.96-13.856-103.928-45.832-103.928-95.168 - c0-38.36, 85.168-51.96, 158.072-51.96s 158.072,13.6, 158.072,51.96C 414.080,161.584, 379.112,193.56, 310.168,207.424z" /> -<glyph unicode="2" d="M 223.448,480c0,0, 75.752-113.64, 63.84-183.968l 2.8,4.432c0,0, 20.016,51.976, 47.112,67.84c-20.552-53.272, 24.592-133.72, 27.232-136.68 - C 512.904,64.672, 315.2-32, 315.2-32l 1.92,0 c0,0, 31.248,68.88-10.68,105.048c-39.504,34.064-49.488,69.64-49.488,108.248 - c0-38.608-9.976-74.184-49.472-108.248C 165.568,36.88, 196.792-32, 196.792-32s-197.696,96.672-49.208,263.624 - c 77.008,86.576, 87.664,148.272, 76.832,231.592L 223.448,480z" /> -<glyph unicode="5" d="M 345.168,271.144c-18.368-25.984-39.728-46.168-62.896-55.168l0-106.24 c0-2.56-0.344-5.032-0.944-7.4l 46.576,0 l0-27.616 l 19.368,0 l0-89.064 - L 164.736-14.344 L 164.736,74.72 l 19.368,0 l0,27.616 l 46.576,0 c-0.6,2.368-0.936,4.832-0.936,7.4l0,106.24 c-23.168,9-44.536,29.184-62.904,55.168 - C 21.568,334.944-4.96,367.104, 0.688,395.336c 6.552,32.544, 62.968,37.848, 103.936,37.312c-1.376,10.464-2.12,20.448-2.12,29.696 - c 102.328,0, 193.6,0, 306.992,0c0-9.248-0.76-19.232-2.12-29.696c 40.96,0.536, 97.384-4.768, 103.92-37.312 - C 516.968,367.104, 490.448,334.944, 345.168,271.144z M 400.784,397.632c-6.048-24.864-14.984-50.824-26.272-75.176 - c 81.768,38.968, 99.904,58.736, 103.888,65.248C 468.624,394.096, 434.424,398.544, 400.784,397.632z M 33.616,387.704 - c 3.992-6.504, 22.12-26.28, 103.888-65.248c-11.312,24.352-20.232,50.312-26.256,75.176C 77.544,398.536, 43.376,394.088, 33.616,387.704z" /> -<glyph unicode="6" d="M 496.384,255.072l-57.080,46.832c-12.728,10.448-25.096,20.584-33.64,27.6c-36.2,34.56-89.768,56.52-149.664,56.52 - c-59.952,0-113.536-22-149.76-56.6c-8.528-7-20.856-17.12-33.544-27.528l-57.080-46.832c-20.824-17.088-20.824-45.048,0-62.136l 57.080-46.832 - c 12.728-10.456, 25.096-20.592, 33.624-27.6c 36.216-34.56, 89.784-56.528, 149.68-56.528c 59.936,0, 113.536,22, 149.744,56.608 - c 8.544,7.008, 20.872,17.12, 33.56,27.52l 57.080,46.84C 517.2,210.032, 517.2,237.984, 496.384,255.072z M 256,124.448 - c-54.984,0-99.552,44.584-99.552,99.552c0,54.984, 44.568,99.552, 99.552,99.552S 355.552,278.984, 355.552,224 - C 355.552,169.032, 310.984,124.448, 256,124.448zM 208.048,224A47.952,47.952 180 1 1 303.952,224A47.952,47.952 180 1 1 208.048,224z" /> -<glyph unicode="7" d="M 400.8,459.792L 111.208,459.792 C 49.784,459.792,0,410.016,0,348.584l0-149.504 c0-61.416, 49.784-111.2, 111.208-111.2l 25.336,0 l0-99.664 l 99.664,99.664L 400.8,87.88 - c 61.416,0, 111.2,49.792, 111.2,111.2L 512,348.584 C 512,410.016, 462.208,459.792, 400.8,459.792z" /> -<glyph unicode="8" d="M 63.968,480L 63.968-32L 256,66.304L 448.032-32L 448.032,480 z" /> -<glyph unicode="h" d="M0,424L 512,424L 512,344.664L0,344.664zM0,263.672L 512,263.672L 512,184.336L0,184.336zM0,103.344L 512,103.344L 512,24L0,24z" /> -<glyph unicode="9" d="M 301.608,479.976L 210.416,480L 210.408,269.6L 0.008,269.592L0,178.416L 210.416,178.4L 210.416-32L 301.584-31.992L 301.6,178.416L 512,178.424L 511.984,269.6L 301.592,269.6 z" /> -<glyph unicode="1" d="M 490.824,157.272c 0.48,12.56-9.072,24.984-23.944,28.912C 414.776,200, 361.648,208.568, 308.264,211.952l0,13.144 - c 36.248,22.544, 61.032,67.68, 61.032,119.8C 369.296,419.504, 318.568,480, 256,480S 142.704,419.504, 142.704,344.888c0-52.544, 25.208-97.984, 61.952-120.328 - l0-12.608 C 151.264,208.568, 98.144,200, 46.040,186.184c-14.872-3.944-24.424-16.352-23.944-28.912L 21.128,157.272 L 21.128-32 l 469.752,0 L 490.88,157.272 L 490.824,157.272 z" /> -<glyph unicode="^" d="M 255.88,349.552C 189.616,504.208, 1.24,468.112,0,288.616c-0.728-103.784, 248.776-261.984, 256.264-287.632 - C 263.104,27.64, 512.712,186.624, 512,289.696C 510.76,469.632, 319.096,498.024, 255.88,349.552z" /> -<glyph unicode="#" d="M 42.016,246.264c0,0, 170.664-29.704, 212.952,219.608c 34.872,40.056, 57.384-16.664, 60.104-27.472 - c 12.704-50.64-8.912-120.184-15.584-151.352l 3.696-0.728l 143.928,0 c0,0, 50.456-51.856, 7.432-85.24c 12.608-17.808, 36.44-51.816, 2.296-82.976 - c 14.096-19.288, 14.848-51.752-20.744-80.68c 7.432-45.264, 2.136-57.552-39.44-63.48C 353.096-32.28, 231.208-32, 231.208-32 - s-60.848,30.424-69.736,51.192c-8.912,20.768-123.92,6.688-123.92,6.688L 37.552,233.64 L 42.016,246.264z" /> -<glyph unicode=" " horiz-adv-x="256" /> -</font></defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/oli.ttf b/app/assets/fonts/oli.ttf deleted file mode 100644 index 172f8de5..00000000 Binary files a/app/assets/fonts/oli.ttf and /dev/null differ diff --git a/app/assets/fonts/oli.woff b/app/assets/fonts/oli.woff deleted file mode 100644 index c56b7ba6..00000000 Binary files a/app/assets/fonts/oli.woff and /dev/null differ diff --git a/app/assets/fonts/saturnv-webfont.eot b/app/assets/fonts/saturnv-webfont.eot deleted file mode 100755 index 6ba9921d..00000000 Binary files a/app/assets/fonts/saturnv-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/saturnv-webfont.svg b/app/assets/fonts/saturnv-webfont.svg deleted file mode 100755 index 7017b0b7..00000000 --- a/app/assets/fonts/saturnv-webfont.svg +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="SaturnVRegular" horiz-adv-x="2048" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="614" /> -<glyph horiz-adv-x="0" /> -<glyph /> -<glyph unicode=" " horiz-adv-x="614" /> -<glyph unicode="	" horiz-adv-x="614" /> -<glyph unicode=" " horiz-adv-x="614" /> -<glyph unicode="a" horiz-adv-x="1652" d="M102 186v652q0 76 55 131t132 55h518q37 0 64.5 -27.5t27.5 -66.5v-51q0 -16 13 -28.5t34 -12.5q22 0 33.5 12t11.5 29v145h467v-186q0 -39 -27.5 -66t-66.5 -27h-92v-372q0 -39 27.5 -66.5t64.5 -27.5h186v-185q0 -40 -27 -67t-65 -27h-373q-39 0 -66.5 27.5t-27.5 66.5 v41q0 51 -45 51q-22 0 -34.5 -14t-12.5 -37v-41q0 -39 -27.5 -66.5t-64.5 -27.5h-518q-77 0 -132 55t-55 131zM381 373q0 -40 27 -67t67 -27h424q38 0 65 27t27 67v278q0 40 -27 67t-65 27h-424q-40 0 -67 -27t-27 -67v-278z" /> -<glyph unicode="b" horiz-adv-x="1468" d="M102 184v1248h185q39 0 67.5 -28t28.5 -65v-460q0 -14 12 -26.5t27 -12.5q23 0 38 12t15 27v53q0 40 26 66t66 26h613q78 0 132 -53.5t54 -130.5v-656q0 -77 -54 -130.5t-132 -53.5h-893q-77 0 -131 54t-54 130zM383 373q0 -40 26 -66t66 -26h518q40 0 66 26t26 66v276 q0 42 -26.5 70.5t-65.5 28.5h-518q-39 0 -65.5 -28.5t-26.5 -70.5v-276z" /> -<glyph unicode="c" horiz-adv-x="1234" d="M102 184v654q0 78 56.5 134t134.5 56h840v-190q0 -37 -28 -65t-67 -28h-561q-38 0 -65 -27t-27 -65v-280q0 -40 27 -68.5t65 -28.5h561q40 0 67.5 -26.5t27.5 -65.5v-184h-564q-37 0 -63.5 27t-26.5 65v41q0 25 -14 39t-37 14q-18 0 -30.5 -14.5t-12.5 -38.5v-41 q0 -38 -27 -66t-65 -28q-78 0 -134.5 55t-56.5 131z" /> -<glyph unicode="d" horiz-adv-x="1468" d="M102 186v654q0 77 55 130.5t132 53.5h612q39 0 65.5 -26.5t26.5 -65.5v-53q0 -15 13 -27t28 -12q24 0 37.5 11.5t13.5 27.5v460q0 38 28.5 66.5t66.5 28.5h186v-1248q0 -78 -54 -132t-132 -54h-891q-77 0 -132 54t-55 132zM383 373q0 -40 26 -66t66 -26h518q40 0 66 26 t26 66v278q0 40 -26 67t-66 27h-518q-40 0 -66 -27t-26 -67v-278z" /> -<glyph unicode="e" horiz-adv-x="1363" d="M102 186v256l2 312v176q0 40 27 67t66 27h90q40 0 68 -26.5t28 -63.5v-53q0 -19 13.5 -31t31.5 -12t32.5 12t14.5 31v53q0 37 27 63.5t65 26.5h508q78 0 132.5 -53.5t54.5 -132.5v-226q0 -190 -228 -190h-579q-38 0 -56 -22.5t-18 -51.5t18 -51.5t56 -22.5h805v-180 q0 -40 -27 -67t-66 -27h-878q-78 0 -132.5 53.5t-54.5 132.5zM381 668q0 -26 18.5 -51t55.5 -25h454q37 0 55.5 25t18.5 51t-18.5 50.5t-55.5 24.5h-454q-37 0 -55.5 -24.5t-18.5 -50.5z" /> -<glyph unicode="f" horiz-adv-x="1136" d="M102 741v189q0 38 27.5 65t67.5 27h184l2 227q0 77 54 131t130 54h467v-185q0 -41 -27 -68.5t-67 -27.5h-184q-38 0 -65 -27t-27 -65v-187q0 -14 12 -27t29 -13q21 0 36 13t15 27v56q0 38 26.5 65t63.5 27h188v-188q0 -38 -27 -65.5t-67 -27.5h-184q-38 0 -65 -26 t-27 -64v-465q0 -77 -56 -131.5t-133 -54.5h-280v186q0 39 27 67t65 28q41 0 68.5 26.5t27.5 65.5q0 23 -0.5 57.5t-1.5 126.5q-1 61 -1 97v30q1 34 1 57h-279z" /> -<glyph unicode="g" horiz-adv-x="1654" d="M102 188v650q0 77 55.5 131.5t133.5 54.5h608q40 0 67 -26.5t27 -67.5v-49q0 -19 12 -31t31 -12q23 0 36 12t13 31v49q0 41 27.5 67.5t67.5 26.5h278q41 0 67.5 -26.5t26.5 -67.5v-185h-94q-37 0 -65.5 -28t-28.5 -66v-973q0 -78 -53 -133t-131 -55h-281 q-37 0 -63.5 27.5t-26.5 66.5v185h184q39 0 65.5 27.5t26.5 66.5v270q0 55 -49 55q-19 0 -31 -14.5t-12 -40.5v-39q0 -39 -27.5 -66.5t-66.5 -27.5h-608q-78 0 -133.5 55t-55.5 133zM385 371q0 -37 26 -62.5t64 -25.5h518q39 0 65.5 25.5t26.5 62.5v280q0 39 -26.5 66.5 t-65.5 27.5h-518q-38 0 -64 -27.5t-26 -66.5v-280z" /> -<glyph unicode="h" horiz-adv-x="1603" d="M102 0v184q0 41 27.5 68t67.5 27h90v874h-90q-40 0 -67.5 26.5t-27.5 67.5v185h375q37 0 64.5 -27.5t27.5 -65.5v-458q0 -16 12 -29.5t29 -13.5q23 0 37.5 13.5t14.5 29.5v51q0 37 28 65.5t66 28.5h372q77 0 132 -54.5t55 -133.5v-559h92q39 0 66.5 -27t27.5 -68v-184 h-653v184q0 41 26.5 68t65.5 27h94v374q0 38 -27 65t-67 27h-278q-38 0 -65.5 -27.5t-27.5 -64.5v-374h93q40 0 67 -27t27 -68v-184h-654z" /> -<glyph unicode="i" horiz-adv-x="858" d="M102 0v186q0 38 27.5 65.5t67.5 27.5h94v466h-94q-40 0 -67.5 26.5t-27.5 64.5v188h373q38 0 65 -27t27 -67v-651h95q38 0 66 -27.5t28 -65.5v-186h-654z" /> -<glyph unicode="j" horiz-adv-x="669" d="M102 -229h93q40 0 67 26t27 66v880h-94q-38 0 -65.5 27.5t-27.5 67.5v186h465v-1350q0 -78 -53 -131t-131 -53h-188q-38 0 -65.5 27t-27.5 65v189z" /> -<glyph unicode="k" horiz-adv-x="1421" d="M102 1243v191h373q36 0 63 -29t27 -66v-647q0 -15 14.5 -27t30.5 -12h54q15 0 26.5 12t11.5 27v240q0 37 29.5 65.5t67.5 28.5h432v-188q0 -37 -26.5 -63.5t-63.5 -26.5h-195q-21 0 -35 -16t-14 -40q0 -16 14 -27.5t35 -11.5q79 0 134 -56t55 -134v-90q0 -39 26.5 -65.5 t63.5 -26.5q41 0 67.5 -27.5t26.5 -67.5v-186h-277q-39 0 -67.5 27.5t-28.5 68.5v191q0 36 -26 64t-62 28h-199q-37 0 -65.5 -28.5t-28.5 -63.5v-287h-184q-38 0 -66 28t-28 68v1059h-90q-41 0 -68 25.5t-27 62.5z" /> -<glyph unicode="l" horiz-adv-x="856" d="M102 1247v187h371q40 0 67 -27.5t27 -67.5v-1056h187v-187q0 -40 -27.5 -67t-67.5 -27h-276q-40 0 -67 27t-27 67v1057h-92q-39 0 -67 27.5t-28 66.5z" /> -<glyph unicode="m" horiz-adv-x="2344" d="M102 -2v186q0 39 27.5 65.5t65.5 26.5h94v469h-94q-38 0 -65.5 26t-27.5 65v186h373q38 0 65 -27.5t27 -64.5v-53q0 -14 14 -27.5t29 -13.5q21 0 36.5 13.5t15.5 27.5v53q0 37 27 64.5t65 27.5h372q69 0 121 -41t66 -104q0 -41 43 -41q22 0 36.5 13t14.5 28v53 q0 37 27 64.5t65 27.5h375q77 0 130.5 -54t53.5 -132v-560h92q40 0 66.5 -26t26.5 -66v-186h-652v186q0 39 28 65.5t67 26.5h92v373q0 40 -26.5 68t-65.5 28h-279q-38 0 -66 -28t-28 -68v-373h94q39 0 65.5 -26.5t26.5 -65.5v-186h-649v186q0 40 26 66t66 26h92v373 q0 39 -27.5 67.5t-64.5 28.5h-280q-38 0 -66.5 -28.5t-28.5 -67.5v-373h95q40 0 66 -26t26 -66v-186h-652z" /> -<glyph unicode="n" horiz-adv-x="1693" d="M102 0v188q0 38 27.5 64.5t65.5 26.5h96v464h-96q-38 0 -65.5 27.5t-27.5 65.5v188h371q38 0 66 -27t28 -65v-53q0 -17 13 -30t28 -13q24 0 39 12.5t15 30.5v53q0 38 28 65t66 27h463q78 0 132 -55t54 -133v-557h92q39 0 66.5 -26.5t27.5 -64.5v-188h-653v188 q0 38 28 64.5t68 26.5h92v374q0 37 -27 63.5t-65 26.5h-372q-40 0 -67.5 -26.5t-27.5 -63.5v-374h95q39 0 66.5 -26.5t27.5 -64.5v-188h-654z" /> -<glyph unicode="o" horiz-adv-x="1429" d="M102 188v648q0 78 54.5 133t132.5 55h852q75 0 130.5 -55t55.5 -133v-648q0 -78 -55.5 -133t-130.5 -55h-576q-37 0 -63.5 28t-26.5 66v41q0 25 -14 39t-37 14q-18 0 -30.5 -14.5t-12.5 -38.5v-41q0 -38 -27 -66t-65 -28q-78 0 -132.5 55t-54.5 133zM383 375 q0 -41 26.5 -68.5t65.5 -27.5h479q39 0 66 27.5t27 68.5v278q0 37 -27.5 63.5t-65.5 26.5h-479q-38 0 -65 -26.5t-27 -63.5v-278z" /> -<glyph unicode="p" horiz-adv-x="1650" d="M102 745v185q0 40 27.5 67t67.5 27h368v-145q0 -15 13 -27t30 -12q22 0 36.5 11.5t14.5 27.5v51q0 39 28 66.5t67 27.5h608q76 0 131 -54.5t55 -129.5v-654q0 -76 -55 -131t-131 -55h-608q-39 0 -67 27.5t-28 66.5v41q0 24 -13.5 37.5t-37.5 13.5q-18 0 -30.5 -13.5 t-12.5 -37.5v-553q0 -40 -26 -67t-64 -27h-188v1163q0 39 -26 66.5t-64 27.5h-95zM565 373q0 -38 28 -65t66 -27h519q38 0 65 27t27 65v278q0 38 -27 66t-65 28h-519q-38 0 -66 -28t-28 -66v-278z" /> -<glyph unicode="q" horiz-adv-x="1650" d="M102 186v654q0 75 55.5 129.5t131.5 54.5h608q39 0 66.5 -27.5t27.5 -66.5v-51q0 -16 14.5 -27.5t36.5 -11.5q17 0 30 12t13 27v145h369q40 0 67 -27t27 -67v-185h-94q-38 0 -64 -27.5t-26 -66.5v-1163h-188q-38 0 -64.5 27t-26.5 67v553q0 24 -12.5 37.5t-30.5 13.5 q-24 0 -37.5 -13.5t-13.5 -37.5v-41q0 -39 -27.5 -66.5t-66.5 -27.5h-608q-77 0 -132 55t-55 131zM381 373q0 -38 27 -65t65 -27h518q38 0 66 27t28 65v278q0 38 -28 66t-66 28h-518q-38 0 -65 -28t-27 -66v-278z" /> -<glyph unicode="r" horiz-adv-x="1134" d="M102 0v186q0 40 27.5 66.5t67.5 26.5h90v466h-90q-40 0 -67.5 26.5t-27.5 66.5v186h373q38 0 65 -27t27 -67v-51q0 -15 13 -28t28 -13q24 0 39 12.5t15 28.5v51q0 40 27 67t65 27h186q38 0 65 -27t27 -67v-92q0 -40 -27 -66.5t-65 -26.5h-278q-40 0 -67.5 -27t-27.5 -67 v-372h95q38 0 65 -26.5t27 -66.5v-186h-652z" /> -<glyph unicode="s" horiz-adv-x="1363" d="M102 602v236q0 79 54.5 132.5t132.5 53.5h508q38 0 65 -26.5t27 -63.5v-53q0 -19 14.5 -31t32.5 -12t31.5 12t13.5 31v53q0 37 28 63.5t68 26.5h90q39 0 66 -27t27 -67v-176h-805q-37 0 -55.5 -20.5t-18.5 -45.5q0 -24 18.5 -44.5t55.5 -20.5h579q120 0 174 -44t54 -137 v-256q0 -79 -54.5 -132.5t-132.5 -53.5h-508q-38 0 -65 26.5t-27 63.5v53q0 17 -11 30t-34 13t-35 -13t-12 -30v-53q0 -37 -28 -63.5t-68 -26.5h-90q-39 0 -66 27t-27 67v176h805q38 0 56 20.5t18 49.5t-18 50.5t-56 21.5h-579q-228 0 -228 190z" /> -<glyph unicode="t" horiz-adv-x="989" d="M102 186v1155q0 38 27.5 65.5t65.5 27.5h186v-553q0 -15 14 -29t31 -14q21 0 36 13.5t15 29.5v47q0 39 26.5 67.5t65.5 28.5h318v-186q0 -37 -27 -66t-65 -29h-318q-39 0 -67.5 -26.5t-28.5 -65.5v-276q0 -38 29 -67t67 -29h316q38 0 66 -27t28 -66v-186h-598 q-77 0 -132 55t-55 131z" /> -<glyph unicode="u" horiz-adv-x="1601" d="M102 838v186h467v-651q0 -37 27.5 -65.5t65.5 -28.5h278q38 0 66 28.5t28 65.5v368h-94q-39 0 -66.5 28.5t-27.5 68.5v186h467v-745h92q39 0 66.5 -27t27.5 -66v-186h-373q-38 0 -65 27t-27 67v41q0 23 -15 37t-38 14q-16 0 -28.5 -14.5t-12.5 -36.5v-41 q0 -39 -27.5 -66.5t-66.5 -27.5h-371q-78 0 -132 54.5t-54 131.5v555h-92q-40 0 -67.5 28.5t-27.5 68.5z" /> -<glyph unicode="v" horiz-adv-x="1599" d="M102 838v186h652v-186q0 -38 -28.5 -65.5t-66.5 -27.5h-92l92 -374l11 -39q9 -25 33 -39t51 -14h161h-69q25 0 49.5 14t34.5 39q20 80 56 229t44 184h-90q-40 0 -67 27.5t-27 65.5v186h651v-186q0 -39 -26.5 -66t-65.5 -27h-90l-168 -651q-8 -42 -31.5 -68t-60.5 -26 h-508q-38 0 -62 26t-30 68l-166 651h-92q-40 0 -67.5 27.5t-27.5 65.5z" /> -<glyph unicode="w" horiz-adv-x="2342" d="M102 836v188h652v-188q0 -37 -28 -64t-69 -27h-90v-372q0 -41 26.5 -69t63.5 -28h281q38 0 65 28t27 69v372h-92q-38 0 -65 27t-27 64v188h649v-188q0 -37 -26.5 -64t-63.5 -27h-96v-372q0 -41 28.5 -69t67.5 -28h276q40 0 67.5 28t27.5 69v372h-95q-38 0 -65 27t-27 64 v188h652v-188q0 -37 -27.5 -64t-65.5 -27h-94v-559q0 -78 -54 -132t-132 -54h-651q-66 0 -117.5 41t-69.5 104q0 15 -14 28t-37 13q-15 0 -28 -14.5t-13 -34.5v-45q0 -39 -26.5 -65.5t-65.5 -26.5h-375q-75 0 -129.5 54t-54.5 132v559h-92q-38 0 -65.5 27t-27.5 64z" /> -<glyph unicode="x" horiz-adv-x="1611" d="M102 0v190q0 37 29 65t68 28h143l176 239l-162 217h-157q-40 0 -68.5 27t-28.5 65v191h660v-191q0 -38 -28.5 -65t-67.5 -27h-93l84 -123h301l80 123h-92q-39 0 -65.5 26.5t-26.5 65.5v191h655v-191q0 -39 -27.5 -65.5t-68.5 -26.5h-151l-158 -217l168 -239h141 q41 0 68.5 -27.5t27.5 -65.5v-190h-655v190q0 38 26.5 65.5t65.5 27.5h105l-93 143h-301l-96 -143h105q38 0 67 -28t29 -65v-190h-660z" /> -<glyph unicode="y" horiz-adv-x="1601" d="M102 838v186h652v-186q0 -37 -27 -65t-65 -28h-95v-372q0 -39 27.5 -66.5t67.5 -27.5h278q39 0 66.5 27.5t27.5 66.5v372h-94q-38 0 -65 28t-27 65v186h651v-186q0 -37 -27.5 -65t-66.5 -28h-92v-1071q0 -77 -54.5 -131.5t-130.5 -54.5h-188q-38 0 -65 27t-27 67v185h92 q40 0 67 27t27 65v274q0 25 -14 39t-37 14q-18 0 -30.5 -14.5t-12.5 -38.5v-41q0 -38 -27 -66t-65 -28h-375q-76 0 -130 55t-54 133v559h-92q-39 0 -67 28t-28 65z" /> -<glyph unicode="z" horiz-adv-x="1257" d="M102 0v186q0 102 72 146l717 440h-467q-18 0 -30.5 -14.5t-12.5 -38.5v-39q0 -40 -27 -67t-65 -27h-187v344q0 38 27.5 65t65.5 27h983v-279l-768 -464h436q22 0 37.5 13.5t15.5 29.5v51q0 38 27 65t65 27h187v-373q0 -38 -27.5 -65t-65.5 -27h-983z" /> -<glyph unicode=" " horiz-adv-x="717" /> -<glyph unicode=" " horiz-adv-x="1434" /> -<glyph unicode=" " horiz-adv-x="717" /> -<glyph unicode=" " horiz-adv-x="1434" /> -<glyph unicode=" " horiz-adv-x="478" /> -<glyph unicode=" " horiz-adv-x="358" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="179" /> -<glyph unicode=" " horiz-adv-x="286" /> -<glyph unicode=" " horiz-adv-x="79" /> -<glyph unicode=" " horiz-adv-x="286" /> -<glyph unicode=" " horiz-adv-x="358" /> -<glyph unicode="" horiz-adv-x="1024" d="M0 0v1024h1024v-1024h-1024z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/saturnv-webfont.ttf b/app/assets/fonts/saturnv-webfont.ttf deleted file mode 100755 index d3e6a36d..00000000 Binary files a/app/assets/fonts/saturnv-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/saturnv-webfont.woff b/app/assets/fonts/saturnv-webfont.woff deleted file mode 100755 index 249fdd94..00000000 Binary files a/app/assets/fonts/saturnv-webfont.woff and /dev/null differ diff --git a/app/assets/fonts/wisdom_script-webfont.eot b/app/assets/fonts/wisdom_script-webfont.eot deleted file mode 100755 index 59c8b544..00000000 Binary files a/app/assets/fonts/wisdom_script-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/wisdom_script-webfont.svg b/app/assets/fonts/wisdom_script-webfont.svg deleted file mode 100755 index 9d6ad510..00000000 --- a/app/assets/fonts/wisdom_script-webfont.svg +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="WisdomScriptAIRegular" horiz-adv-x="1005" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="624" /> -<glyph horiz-adv-x="0" /> -<glyph horiz-adv-x="2048" /> -<glyph unicode=" " horiz-adv-x="624" /> -<glyph unicode="	" horiz-adv-x="624" /> -<glyph unicode=" " horiz-adv-x="624" /> -<glyph unicode="!" horiz-adv-x="661" d="M29 102q0 53 35.5 89t87.5 36t88 -36t36 -89q0 -52 -35.5 -87t-88.5 -35t-88 35t-35 87zM162 311l669 1164h213l-667 -1164h-215z" /> -<glyph unicode=""" horiz-adv-x="724" d="M205 1108l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14zM512 1108l4 82h12q37 0 77 20.5t59 49.5q-46 8 -74.5 35.5t-28.5 66.5q0 54 33 83.5t76 29.5 q48 0 84.5 -31t36.5 -84q0 -70 -41.5 -129.5t-102 -91t-121.5 -31.5h-14z" /> -<glyph unicode="#" horiz-adv-x="1538" d="M80 276l82 144h287l118 205h-284l82 143h284l148 256h192l-147 -256h258l147 256h193l-148 -256h277l-82 -143h-277l-116 -205h272l-82 -144h-272l-158 -276h-195l158 276h-256l-158 -276h-194l158 276h-287zM643 420h256l119 205h-258z" /> -<glyph unicode="$" horiz-adv-x="870" d="M24.5 186.5q-30.5 102.5 20.5 225.5h178q-26 -42 -31.5 -92t8 -91.5t48.5 -69.5t84 -28q47 0 90 43t43 119q0 27 -10 58t-20 51t-32.5 60.5t-31.5 57.5q-62 115 -62 211q0 82 27 147t71.5 104.5t98.5 60t112 20.5q22 0 72 -8l121 211h160l-154 -269q101 -80 101 -202 q0 -80 -41 -166h-179q47 81 47 149q0 59 -34 95t-80 36q-47 0 -90 -42.5t-43 -118.5q0 -27 10 -58.5t19.5 -51t32.5 -61t32 -57.5q61 -113 61 -211q0 -82 -27 -147t-71.5 -104.5t-98.5 -60t-112 -20.5q-14 0 -59 5l-101 -179h-159l127 224q-97 57 -127.5 159.5z" /> -<glyph unicode="%" horiz-adv-x="1177" d="M-94 0h215l1147 1024h-213zM319 868q0 74 51 125t124 51q74 0 125 -51t51 -125q0 -73 -51 -123.5t-125 -50.5t-124.5 50.5t-50.5 123.5zM438 868q0 -23 16.5 -39t39.5 -16t39 16t16 39t-16 39.5t-39 16.5t-39.5 -16.5t-16.5 -39.5zM524 152q0 74 50.5 125t123.5 51 q74 0 125 -51t51 -125q0 -73 -51 -124t-125 -51q-73 0 -123.5 50.5t-50.5 124.5zM643 152q0 -23 16 -39.5t39 -16.5t39.5 16.5t16.5 39.5t-16.5 39t-39.5 16t-39 -16t-16 -39z" /> -<glyph unicode="&" horiz-adv-x="800" d="M-104 -197l112 199q-59 33 -88 91t-18 147.5t71 193.5q68 120 139 177t158 73q-39 46 -37 123t52 164q55 96 118.5 149.5t122.5 70.5t142 19l96 166h160l-111 -194q85 -46 109.5 -142.5t-29.5 -210.5h-209l18 31q62 107 32 174q-23 49 -81 43q-77 -8 -150 -109 q-13 -19 -26 -40l-24 -43q-36 -62 -28 -104.5t38.5 -64.5t71.5 -22l-58 -98q-188 0 -284 -162l-72 -123q-63 -110 -18 -163q33 -40 101 -25q79 19 128 97q3 4 6 9l41 72l211 2q-2 -4 -31 -57q-78 -134 -188.5 -204t-220.5 -73l-95 -166h-159z" /> -<glyph unicode="'" horiz-adv-x="358" d="M268 1098l4 82h13q37 0 76.5 20t58.5 49q-46 8 -74.5 36t-28.5 67q0 54 33 83t76 29q48 0 84.5 -31t36.5 -83q0 -105 -84.5 -178.5t-179.5 -73.5h-15z" /> -<glyph unicode="(" horiz-adv-x="774" d="M44 132.5q-5 169.5 41.5 345t142 354.5t223.5 328t296 264.5t349 166.5l73 -53q-112 -50 -222.5 -133.5t-205 -185.5t-180 -222.5t-151 -243.5t-114.5 -248t-73.5 -237.5t-25 -211.5t27.5 -169l-112 -53q-64 129 -69 298.5z" /> -<glyph unicode=")" horiz-adv-x="962" d="M-215 -113q100 44 199 115.5t186 159t168 189.5t146.5 211t119.5 220t89.5 219t54.5 206t16.5 183.5t-27.5 147.5l113 53q64 -129 69 -298.5t-41.5 -345t-142 -354.5t-223.5 -328t-296 -264.5t-349 -166.5z" /> -<glyph unicode="*" horiz-adv-x="983" d="M172 1012l72 125h248l-123 217l108 59l121 -213l125 215h145l-161 -278h319l-72 -125h-247l122 -215l-108 -62l-123 215l-123 -213h-143l157 275h-317z" /> -<glyph unicode="+" horiz-adv-x="1116" d="M133 467l82 143h320l174 299h192l-174 -299h324l-82 -143h-324l-194 -338h-195l195 338h-318z" /> -<glyph unicode="," horiz-adv-x="258" d="M29 -152l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14z" /> -<glyph unicode="-" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="." horiz-adv-x="493" d="M53 96q0 50 34 84.5t83 34.5q50 0 84.5 -34.5t34.5 -84.5q0 -49 -34.5 -82.5t-84.5 -33.5t-83.5 33.5t-33.5 82.5z" /> -<glyph unicode="/" horiz-adv-x="1167" d="M-94 0l1601 1432h213l-1599 -1432h-215z" /> -<glyph unicode="0" horiz-adv-x="890" d="M-11 122q-42 131 64 312q85 146 197 340q89 154 187 216.5t227 62.5q100 0 167.5 -63t75.5 -160t-53 -212l-215 -372q-102 -177 -264 -245q-137 -57 -253 -15q-102 37 -133 136zM183 148q33 -40 101 -25q79 19 128 97q3 4 6 9l272 469q62 107 32 174q-23 49 -81 43 q-77 -8 -150 -109q-13 -19 -26 -40q-76 -126 -264 -455q-63 -110 -18 -163z" /> -<glyph unicode="1" horiz-adv-x="702" d="M-164 0l82 143h176l387 670q-85 -46 -227 -86l-45 133q8 3 43 15t44.5 15.5t41 15t43.5 16.5t40 16.5t42.5 19.5t39 21t42 24.5t39 26.5t41.5 31l82 -187l-422 -731h188l-82 -143h-555z" /> -<glyph unicode="2" horiz-adv-x="956" d="M-143 0l80 137q101 23 180 49.5t163.5 69t154 99t140.5 139.5t134 190q62 105 30 170q-23 49 -81 44q-77 -7 -146 -102q-13 -18 -25 -38l-59 -94h-217l80 139q93 164 249 217q132 45 247 -6q104 -45 135 -145q35 -116 -45 -259q-55 -98 -127 -180t-149 -138t-148 -93.5 t-142 -61.5h375l-80 -137h-749z" /> -<glyph unicode="3" horiz-adv-x="937" d="M-145 19.5q17 83.5 69 150.5h201q-10 -11 -24 -31.5t-38 -79.5t-24 -114q0 -65 53 -92q64 -33 148 16q79 46 143 156q38 67 50.5 128.5t0.5 104.5t-43.5 68.5t-75.5 25.5l80 137q118 0 187.5 37t119.5 123q30 52 43.5 98t9.5 79t-23 52t-52 19q-43 0 -93 -37.5 t-93 -111.5l-43 -74h-218l56 100q89 154 186.5 216.5t226.5 62.5q83 0 141.5 -42t81 -106t15 -141.5t-46.5 -145.5q-68 -118 -144.5 -174.5t-181.5 -76.5q35 -47 49.5 -105t3.5 -131.5t-53 -146.5q-49 -85 -110.5 -145t-126 -90.5t-121 -43t-115.5 -12.5q-95 0 -157 49.5 t-80.5 121.5t-1.5 155.5z" /> -<glyph unicode="4" horiz-adv-x="948" d="M-178 133q166 129 335.5 271.5t292 254.5t221 206t149.5 145l50 51l82 -187l-422 -731h211l-82 -143h-210l-164 -287h-189l164 287h-393zM63 143h279l317 549q-293 -311 -596 -549z" /> -<glyph unicode="5" horiz-adv-x="878" d="M-170 -143q-35 103 35 227l47 84h209l-78 -139q-60 -105 -18 -158q33 -40 104 -23q85 20 145 108q8 11 15 24l168 294q28 49 34.5 93.5t-4.5 74.5t-35.5 47.5t-56 17.5t-69.5 -21t-72 -62q-20 20 -58 56.5t-46 43.5l290 500h551l-94 -164h-369l-133 -233q10 2 35 2 q100 0 167.5 -62.5t75.5 -159t-52 -212.5l-146 -258q-96 -169 -258 -223q-135 -44 -253 6q-102 43 -134 137z" /> -<glyph unicode="6" horiz-adv-x="917" d="M5 146q-31 102 38 225q71 127 205 362t162 285q95 167 245 222q124 46 227 -3q96 -45 118 -149q7 -37 4 -76l-152 -11q16 76 -37 102q-53 25 -126 -14q-70 -36 -114 -114l-40 -72q40 12 90 12q101 0 159 -61t57 -162t-63 -211l-145 -258q-96 -170 -256 -223 q-131 -44 -244 6q-100 44 -128 140zM183 157q34 -41 104 -23q85 21 145 109q7 11 14 23l168 295q24 42 32 81t1 66t-23.5 47.5t-42 25t-54 -2t-61 -33t-60.5 -67.5q-150 -263 -205 -363q-61 -106 -18 -158z" /> -<glyph unicode="7" horiz-adv-x="788" d="M-164 -287q197 331 420 627t418 518h-537l94 166h594l93 -150q-20 -20 -54.5 -56.5t-139 -156.5t-204.5 -247t-233 -319t-242 -382h-209z" /> -<glyph unicode="8" horiz-adv-x="897" d="M14 124q-39 130 64 310l41 72q117 206 307 242q-12 34 -12 75q0 91 63 197q72 127 152.5 178t187.5 51q87 0 142 -56t55 -146q0 -87 -56 -185q-92 -154 -229 -205q43 -60 43.5 -136t-49.5 -171l-59 -104q-102 -178 -266 -246q-136 -57 -251 -14q-102 38 -133 138z M207 148q33 -40 101 -25q79 19 128 97q3 4 6 9l117 201q62 107 32 174q-23 49 -81 43q-77 -8 -150 -109q-13 -19 -26 -40q-105 -181 -109 -187q-63 -110 -18 -163zM591 773q27 -32 75 -17q46 15 77 69l84 148q45 77 17 122q-22 35 -69 20q-55 -20 -99 -97l-78 -137 q-39 -68 -7 -108z" /> -<glyph unicode="9" horiz-adv-x="915" d="M-106 12l151 11q-16 -76 37 -102q53 -25 126 14q70 36 114 114l40 72q-44 -12 -90 -12q-53 0 -95 23t-66 65t-31.5 95.5t7.5 119t52 131.5l146 258q96 169 255 223q130 44 243 -6q100 -44 128 -140q29 -103 -39 -225q-71 -127 -204.5 -362t-161.5 -285 q-94 -166 -247 -222q-127 -46 -235 2q-99 43 -124 144q-9 38 -6 82zM235 290q7 -28 24.5 -46.5t46 -18.5t59 10.5t65 39.5t62.5 71q149 263 204 363q61 106 18 158q-34 41 -104 23q-85 -21 -145 -109q-7 -11 -14 -23l-168 -295q-31 -54 -43 -99.5t-5 -73.5z" /> -<glyph unicode=":" horiz-adv-x="765" d="M29 96q0 50 33.5 84.5t82.5 34.5t84 -34.5t35 -84.5q0 -49 -34.5 -82.5t-84.5 -33.5q-49 0 -82.5 33t-33.5 83zM438 731q0 50 34 84.5t83 34.5t84 -35t35 -84t-34.5 -83t-84.5 -34q-49 0 -83 34t-34 83z" /> -<glyph unicode=";" horiz-adv-x="727" d="M29 -152l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14zM397 668q0 50 34 84t83 34q50 0 84.5 -34.5t34.5 -83.5t-34.5 -83t-84.5 -34t-83.5 33.5t-33.5 83.5z" /> -<glyph unicode="<" horiz-adv-x="1095" d="M18 436l72 127l1071 481l-114 -204l-805 -383l389 -334l-82 -143z" /> -<glyph unicode="=" horiz-adv-x="1003" d="M123 313l82 144h549l-82 -144h-549zM272 569l82 144h549l-82 -144h-549z" /> -<glyph unicode=">" horiz-adv-x="1095" d="M-66 -20l115 204l805 383l-389 334l82 143l530 -456l-71 -127z" /> -<glyph unicode="?" horiz-adv-x="1001" d="M109 96q0 50 33.5 84.5t82.5 34.5t84 -34.5t35 -84.5q0 -49 -34.5 -82.5t-84.5 -33.5t-83 33t-33 83zM242 311q18 32 97.5 170t121.5 213q398 185 483 434q42 123 -7 188q-40 55 -117 34q-101 -26 -191 -163q-44 -67 -80 -155l-164 29q57 228 222 358q133 104 277 103 q135 -1 209 -96q58 -75 58 -193q0 -161 -150.5 -331t-384.5 -306h2l-161 -285h-215z" /> -<glyph unicode="@" horiz-adv-x="1775" d="M-75 464q33 253 197 467q177 231 441 325q218 77 461 44q133 -18 236.5 -67t167 -118t100 -155t42 -178.5t-13.5 -188.5t-60 -184.5t-103 -167t-138 -136.5t-170 -91.5t-194 -33.5q-80 0 -128 38t-56 101q-169 -139 -295 -139q-128 0 -171 92t25 211l299 516 q65 112 169.5 178.5t195.5 66.5q98 0 164 -71t59 -144h121l-344 -602q-33 -63 -24 -89.5t48 -26.5q85 0 165.5 41.5t142 111t105.5 159.5t62.5 186t4.5 192.5t-58.5 177t-137 141.5t-222.5 84q-277 49 -529 -109q-196 -123 -317 -334q-128 -221 -117 -440q12 -241 193 -383 q114 -90 286 -128q92 -21 183.5 -23t171.5 11t161.5 42.5t149.5 65t140.5 87t129.5 99.5t121 111t110.5 113t102.5 114l15 16q22 -9 45.5 -30.5t33.5 -42.5q-71 -85 -143.5 -160.5t-153.5 -147.5t-164.5 -131.5t-172.5 -109.5t-182.5 -83.5t-189.5 -52.5t-198 -18t-203 23 q-325 69 -472 304q-126 201 -92 467zM427 137.5q9 -26.5 48 -26.5q69 0 160 76t184 223l166 290q51 94 9 144q-34 40 -101 23q-82 -20 -140 -113q-2 -5 -5 -9l-297 -518q-33 -63 -24 -89.5z" /> -<glyph unicode="A" horiz-adv-x="2035" d="M40 434q-2 24 -3 48q0 74 20 157q26 109 88 215q57 98 139 169t170.5 107.5t183.5 41.5q15 1 29 1q79 0 149 -23q84 -27 154.5 -90.5t110.5 -156.5l-170 -65q-29 72 -83 116t-121 52q-20 2 -40 3q-47 -1 -97 -15q-70 -20 -141 -80.5t-124 -151.5q-61 -106 -77 -214 q-5 -37 -6 -71q0 -66 20 -122q30 -85 111 -139q80 -53 196 -52h4q87 1 181 50.5t181 132t177 188t176.5 220t172.5 226.5t171.5 208.5t166.5 165.5t164 97q45 15 87 15q36 0 71 -11l-422 -1229q-14 -42 -17.5 -64.5t2.5 -31t22 -8.5q29 0 124.5 87t210.5 220l15 16 q22 -9 46 -30.5t34 -42.5q-53 -62 -88 -101.5t-84 -90.5t-86.5 -82.5t-80.5 -61t-83 -43.5t-78 -14q-74 0 -110 44q-34 42 -34 105v5q2 66 31 149l76 217h-287q-88 -117 -166 -202.5t-171.5 -162t-194.5 -116t-207 -39.5q-109 0 -201.5 35t-158 95t-105.5 144t-48 180z M1368 602h246l213 604q-54 -55 -117 -134t-108.5 -142t-119.5 -168t-114 -160z" /> -<glyph unicode="B" horiz-adv-x="1554" d="M43 492q1 95 29.5 182t86.5 164t140 129l86 -109q-101 -66 -151 -178q-39 -89 -39 -185q0 -25 3 -51q13 -124 85 -225q41 49 82 121l573 991q69 121 164.5 185.5t187.5 64.5q176 0 256 -114q46 -67 46 -151q0 -40 -10 -83q-34 -142 -160 -243q-75 -60 -171 -93 q75 -50 121 -122.5t60 -154.5q8 -43 9 -88q0 -40 -7 -82q-13 -89 -50.5 -173t-101.5 -160t-144.5 -132.5t-186.5 -90t-222 -33.5q-135 0 -250 36t-194.5 96.5t-136 142t-81.5 171.5q-24 87 -24 178v7zM418 98q130 -73 307 -73q148 0 268.5 76.5t174.5 190t61 231.5 q1 10 1 20q0 107 -70 195q-76 96 -220 126l-57 6l-359 -620q-57 -95 -106 -152zM954 995q168 3 264 48t156 157q31 59 31 110q0 32 -12 60q-25 58 -82 62h-9q-73 0 -144 -94q-17 -22 -32 -48z" /> -<glyph unicode="C" horiz-adv-x="1101" d="M39 1059q0 112 54.5 215t164.5 182l70 -125q-68 -53 -103 -123t-35 -145q0 -92 49.5 -173.5t141.5 -129.5l332 571q69 121 164.5 185.5t187.5 64.5q121 0 202 -87.5t81 -229.5q0 -135 -86 -287q-81 -141 -194 -235.5t-227 -134.5t-233 -40q-50 0 -121 11l-59 -105 q-46 -77 -57 -147q-4 -25 -3 -48q0 -39 12 -68q20 -46 60 -72.5t95 -26.5q276 0 552 319l15 16q24 -6 47.5 -27.5t32.5 -45.5q-75 -87 -141 -149.5t-153 -122t-189 -90.5t-216 -31q-109 0 -185 49q-74 49 -104 126q-21 55 -21 120q0 27 3 55q12 98 68 194l63 111 q-127 66 -197.5 180t-70.5 244zM565 709h43q118 0 228.5 59t184 145.5t117.5 181.5t44 171q0 61 -29.5 96t-87.5 35q-47 0 -97.5 -39t-95.5 -117z" /> -<glyph unicode="D" horiz-adv-x="1918" d="M27 8q0 94 78.5 165t220.5 71q107 0 235 -62q123 214 350.5 607.5t288.5 498.5q-5 0 -15.5 1t-15.5 1q-101 0 -190.5 -30t-152 -78.5t-105.5 -112t-59 -129.5q-9 -37 -8 -75q0 -29 5 -57q12 -66 54 -120l-123 -110q-67 60 -95 150q-20 65 -20 132q0 27 3 54 q11 96 63.5 193t135 173t209 124t275.5 48q380 0 568 -229q145 -176 145 -445v-14q-4 -258 -135 -497q-129 -235 -331 -354q-160 -93 -337 -93q-69 0 -130.5 11t-120 35t-94 42.5t-93.5 52.5q-135 -170 -342 -170q-125 0 -194.5 63.5t-69.5 153.5zM213 18q0 -27 26 -45 t76 -18q62 0 99 20.5t69 65.5q-93 39 -178 39q-43 0 -67.5 -18.5t-24.5 -43.5zM721 94q91 -53 171.5 -81.5t174.5 -28.5q97 0 190 46t166.5 122.5t130 178t88.5 210t36 219.5v26q0 96 -24 180q-26 96 -94 172.5t-171 114.5z" /> -<glyph unicode="E" horiz-adv-x="1398" d="M31 307q0 121 39.5 231t108.5 194.5t160 146.5t198 93q95 27 192 27h25q-41 80 -41 166q0 162 102 269.5t258 107.5q146 0 246 -82.5t100 -224.5q0 -47 -13 -91t-31.5 -73t-36.5 -51t-31 -32l-13 -11l-114 121q1 0 8.5 5.5t18.5 17.5t21 28t17.5 41.5t7.5 54.5 q0 94 -75 137q-40 22 -82 22q-32 0 -66 -12q-88 -31 -122 -126q-17 -48 -17 -107q0 -50 16.5 -92.5t42 -69t43 -40.5t31.5 -21q0 -2 4 -2l-63 -111q-28 9 -68 29q-67 24 -137 26h-13q-64 0 -123 -18q-66 -20 -128 -54.5t-113.5 -87t-90 -114.5t-60 -138t-21.5 -155 q0 -114 61.5 -203.5t155 -134.5t197.5 -45q87 0 167 37t133 98.5t83 133.5q23 57 23 117q0 16 -2 32q-8 78 -56 139l125 88q64 -76 86 -168q12 -51 13 -100q-1 -40 -9 -80q-18 -88 -69.5 -172t-126 -147t-175 -101t-207.5 -38q-161 0 -291.5 63.5t-209 188t-78.5 288.5z" /> -<glyph unicode="F" horiz-adv-x="1550" d="M29 252q0 128 68.5 235.5t181 168.5t239.5 61v-162q-130 0 -222.5 -84.5t-92.5 -210.5q0 -117 91 -192.5t222 -75.5q123 0 241 72.5t204 222.5l215 375h-203l55 102h205l317 551q-33 -14 -70.5 -22.5t-81.5 -10.5q-45 -4 -76 -4h-23q-26 0 -64 1q-56 1 -80 1 q-95 0 -171 -10.5t-140 -34.5t-99.5 -67t-35.5 -103v-14h-183q-2 12 -2 36q0 76 32 137t84.5 100t122 65.5t141 37.5t145.5 11h89q36 0 60 -0.5t36 0.5q26 0 87 2.5t95.5 9.5t85 18t93 29t84.5 43l111 -186h-2l-340 -590h176l-55 -102h-180l-240 -416q-65 -113 -144 -197.5 t-161 -134.5t-163 -74t-163 -24q-135 0 -247.5 58.5t-177 159t-64.5 218.5z" /> -<glyph unicode="G" horiz-adv-x="1359" d="M45 1059q0 112 54.5 215t164.5 182l70 -125q-67 -53 -102 -123t-35 -145q0 -92 49.5 -173.5t140.5 -129.5l332 571q69 121 164.5 185.5t187.5 64.5q224 0 308 -142q42 -71 42 -162q0 -66 -22 -142q-54 -184 -208 -333q-194 -186 -453 -226q-61 -9 -124 -9q-48 0 -120 11 l-60 -105q-81 -141 -81 -235q0 -14 1 -28q15 -99 125 -99q117 0 216.5 89t191.5 251l22 36h213l-270 -462q123 53 240.5 150.5t253.5 254.5l14 16q22 -9 46 -30.5t34 -42.5q-332 -384 -672 -492l-164 -280q-44 -75 -107 -121.5t-125 -55.5q-25 -4 -49 -4q-34 0 -65 8 q-54 13 -87.5 55.5t-33.5 102.5q0 223 467 365l55 96q-108 -67 -231 -67q-73 0 -128 22.5t-85.5 61.5t-44.5 92q-9 37 -9 78q0 17 1 34q6 61 28.5 126.5t59.5 129.5l63 111q-127 66 -197.5 180t-70.5 244zM309 -375q0 -28 19 -41q10 -6 22 -6t26 6q29 13 50 51l96 172 q-213 -82 -213 -182zM571 709h43q239 0 418 157q128 113 176 258q20 62 20 112q0 56 -26 98q-40 63 -131 63q-47 0 -97 -39t-95 -117z" /> -<glyph unicode="H" horiz-adv-x="2271" d="M21 430q10 128 81 250q40 69 91.5 120.5t97 76t85 39.5t62.5 18l23 2l39 -158l-16.5 -5.5t-41 -18t-58.5 -33.5t-62 -53.5t-58 -75.5q-57 -99 -57 -194q0 -60 22 -118q47 -123 173 -191q100 -53 214 -53q61 0 126 15q243 58 439 312q53 70 101 153l432 750 q-72 -37 -189 -71t-208 -56t-176 -65t-119 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t40.5 -29.5l18 -9l-80 -137q-57 22 -105.5 63.5t-82.5 99.5q-32 54 -32 128v11q2 80 52 165q41 71 110 121t147 75t177 52t192 51t199 73.5t193 118.5l108 -186 l-342 -590h320l303 522q60 103 130.5 168.5t136.5 87.5q59 20 115 19q6 1 13 1q63 -2 112.5 -29t84 -65.5t45.5 -81.5l-141 -77q-23 51 -59 73q-25 15 -54 15q-12 -1 -26 -3q-42 -10 -90 -54t-91 -119l-704 -1221h-215l380 662h-319l-137 -240q-217 -376 -521 -511 q-148 -65 -294 -65q-91 0 -181 25q-193 54 -312 202q-114 144 -114 318q0 19 1 39z" /> -<glyph unicode="I" horiz-adv-x="1028" d="M12 -512l1024 1778q-72 -37 -189 -71t-208 -56t-176 -65t-119 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t40.5 -29.5l18 -9l-80 -137q-57 22 -105.5 63.5t-82.5 99.5q-32 54 -32 128v11q2 80 52 165q41 71 110 121t147 75t177 52t192 51t199 73.5 t193 118.5l109 -186l-1072 -1866h-219z" /> -<glyph unicode="J" horiz-adv-x="1392" d="M51 428q0 93 37 174t80 133t143 114.5t156.5 91t190.5 90.5l102 48q28 13 134.5 63t148 70t132.5 67t144 80.5t122 82.5t124 98l121 -139l-803 -1376q123 53 241 150.5t254 254.5l15 16q22 -9 46 -30.5t34 -42.5q-329 -384 -674 -492l-162 -280q-44 -75 -107 -121.5 t-124 -55.5q-26 -4 -50 -4q-34 0 -66 8q-53 13 -86.5 55.5t-33.5 102.5q0 225 469 365l735 1280q-32 -25 -66.5 -48.5t-79 -48.5t-72.5 -41t-86 -43t-77.5 -36t-88 -40t-79.5 -36q-36 -16 -89 -39t-89.5 -38.5t-84.5 -37.5t-81.5 -40t-72.5 -42t-65 -46.5t-52 -52 t-41.5 -59.5t-25 -67t-9.5 -78q0 -96 54 -156.5t137 -60.5q53 0 105.5 29t90.5 84l98 -96q-43 -76 -125.5 -120t-175.5 -44q-159 0 -253.5 103t-94.5 251zM342 -375q0 -28 20 -41q9 -6 21 -6t27 6q28 13 49 51l98 172q-215 -82 -215 -182z" /> -<glyph unicode="K" horiz-adv-x="2172" d="M38 430q10 128 81 250q40 69 91.5 120.5t96.5 76t84.5 39.5t62.5 18l23 2l39 -158l-16.5 -5.5t-41 -18t-58 -33.5t-61.5 -53.5t-58 -75.5q-57 -98 -57 -193q0 -59 22 -118q46 -124 172 -191q100 -54 214 -53q60 0 124 14q243 57 439 310q54 70 103 155l433 750 q-72 -37 -189.5 -71t-208 -56t-176 -65t-119.5 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t40.5 -29.5l18 -9l-80 -137q-57 22 -105.5 63.5t-82.5 99.5q-32 54 -32 128v11q2 80 52 165q41 71 110 121t147 75t177 52t192 51t199 73.5t193 118.5l109 -186 l-318 -551q34 -8 67 -8q201 0 365 282l87 150q51 89 110.5 150.5t116 89t113.5 35.5q21 3 40 3q34 0 65 -9q48 -14 88 -38.5t66.5 -59t36.5 -71.5l-141 -78q-23 51 -59 73q-26 15 -55 16q-13 0 -25 -3q-42 -9 -89.5 -53.5t-90.5 -120.5l-88 -155q-42 -75 -77.5 -125 t-88 -101t-120 -78.5t-151.5 -31.5q80 -81 80 -192q0 -114 -84 -261l-315 -547q-17 -27 -23 -63q-2 -12 -2 -24q0 -25 8 -49q12 -36 46 -52l-91 -156q-64 32 -102 84q-38 51 -46 110q-3 24 -3 48q-1 36 7 73q12 62 46 119l316 547q60 103 60 186q0 123 -132 199l-156 -270 q-217 -376 -521 -511q-148 -65 -294 -65q-91 0 -181 25q-193 54 -311 202q-114 144 -114 318q0 19 1 39z" /> -<glyph unicode="L" horiz-adv-x="1568" d="M-61 174q0 108 76.5 188t213.5 80q92 0 172 -38.5t160 -110.5q6 8 16.5 26t12.5 21l170 295q-128 65 -199.5 179t-71.5 245q0 112 55 215t165 182l69 -125q-67 -53 -102 -123t-35 -145q0 -93 49 -174t141 -129l332 571q69 121 165 185.5t188 64.5q121 0 201.5 -87.5 t80.5 -229.5q0 -135 -86 -287q-81 -141 -193.5 -235.5t-226.5 -134.5t-233 -40q-49 0 -121 11l-188 -328q-3 -6 -58 -88q13 -13 36.5 -39t43.5 -47t39 -39q90 -91 142 -142t115.5 -106.5t107.5 -81.5t93 -43.5t97 -17.5q176 0 295 116l104 -110q-5 -7 -15 -19t-46 -42 t-78.5 -52.5t-113.5 -41.5t-150 -19q-55 0 -111.5 15.5t-105 38.5t-104 62.5t-98 75.5t-97 90t-91 93t-91 97t-86.5 91q-160 -133 -338 -133q-144 0 -222.5 79t-78.5 187zM96 172q0 -42 32 -71t91 -29q131 0 232 90q-137 117 -242 117q-51 0 -82 -32t-31 -75zM1016 709h43 q118 0 228.5 59t183.5 145.5t117 181.5t44 171q0 61 -29 96t-87 35q-47 0 -97.5 -39t-95.5 -117z" /> -<glyph unicode="M" horiz-adv-x="1914" d="M16 884q2 80 52 165q36 62 91 106.5t121.5 72t142 48t160 42.5t166.5 47.5t171.5 70t164.5 104.5l109 -186l-57 -101q192 242 366 242q57 0 99 -33.5t52 -91.5q2 -12 2 -25q0 -48 -28 -108q202 258 381 258q61 0 103 -36q44 -36 50 -98q1 -8 0 -16q0 -56 -38 -128 l-789 -1367q-17 -27 -23 -63q-2 -12 -2 -24q0 -25 8 -49q12 -36 46 -52l-90 -156q-64 32 -102 84q-38 50 -46 110q-3 24 -3 49q-1 36 7 73q12 62 46 119l733 1273q28 48 28 78q0 17 -9 28q-10 12 -29 12q-32 0 -87 -34q-159 -102 -385 -419l-10 -13l-2 -2l-495 -864h-218 l701 1214q28 48 28 78q0 18 -10 29q-10 12 -28 12q-32 0 -89 -37q-157 -101 -380 -411l-508 -885h-219l729 1266q-72 -37 -189 -71t-207 -56t-175 -65t-119 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t39.5 -29.5l18 -9l-79 -137q-57 22 -105.5 63.5 t-82.5 99.5q-32 54 -32 128v11z" /> -<glyph unicode="N" horiz-adv-x="2267" d="M41 564q12 153 94 296q58 101 146 174.5t184 110.5q95 37 199 42q15 1 31 1q87 0 163 -24q90 -28 162.5 -95.5t109.5 -165.5l-149 -78q-31 75 -93 121q-64 46 -140 54q-24 3 -47 2q-53 0 -109 -13q-80 -19 -152 -73.5t-118 -133.5q-79 -136 -79 -262q0 -53 14 -105 q38 -139 159 -212q92 -55 200 -55q58 0 121 16q234 57 436 312q69 87 130 194l462 805h213l-155 -1020l481 831q60 103 129 168.5t132 87.5q57 20 111 19q6 1 12 1q60 -2 107.5 -29t80.5 -65t44 -82l-141 -77q-23 51 -59 73q-25 15 -53 15q-11 -1 -25 -3q-42 -10 -90.5 -54 t-91.5 -119l-705 -1221h-215l154 1014l-197 -344q-266 -462 -590 -630q-163 -84 -317 -84q-81 0 -159 23q-180 52 -288 207q-104 148 -104 331q0 23 2 47z" /> -<glyph unicode="O" horiz-adv-x="1159" d="M61 28q-25 56 -25 122q0 106 66 238q12 23 25 46l340 590h104q-3 26 -3 51q0 127 77 260q114 199 292 257q64 21 125 21q79 0 152 -35q115 -54 160 -167q22 -57 22 -118q0 -105 -65 -221q-1 -1 -2 -3l-164 -285q179 32 344 181l60 -117q-111 -102 -236.5 -152.5 t-249.5 -52.5l-227 -397q-130 -225 -324 -319q-108 -52 -206 -52q-48 0 -94 12q-123 34 -171 141zM243 89q34 -51 108 -50h19q103 9 193 97q42 40 72 93l254 443q-195 62 -279 223l-336 -584q-51 -89 -51 -152q0 -40 20 -70zM752 1042q4 -96 59 -160.5t147 -90.5l207 358 q43 76 43 141q0 38 -14 72q-29 69 -100 86q-19 4 -38 4l-144 -63q-57 -50 -101 -132q-59 -112 -59 -203v-12z" /> -<glyph unicode="P" horiz-adv-x="1355" d="M29 0l829 1434h213l-383 -666q52 -59 130 -84q52 -17 107 -17q27 1 55 5q84 12 170 75t146 168q97 167 97 313q0 68 -21 130q-47 140 -183 213q-99 53 -210 53q-48 0 -98 -10q-189 -39 -314 -205q-24 -33 -45 -70q-34 -60 -58 -122.5t-31 -94.5l-7 -32l-145 22 q2 18 6.5 48t30 111t63.5 148q138 239 373 318q103 35 208 35q103 0 207 -34q190 -63 302 -213q105 -141 105 -312q0 -50 -9 -104q-22 -127 -97 -257q-69 -119 -160.5 -196t-183.5 -104q-75 -22 -150 -22q-18 0 -36 2q-93 6 -172 44t-135 100l-389 -676h-215z" /> -<glyph unicode="Q" horiz-adv-x="1513" d="M47 125q0 88 76.5 151.5t214.5 63.5q149 0 352 -156q134 81 254.5 208.5t204.5 271.5q145 249 145 439q0 50 -10 95q-31 147 -155 210q-71 36 -152 36q-62 0 -131 -21q-179 -56 -309 -232q-27 -37 -50 -77q-60 -104 -88 -194q-26 -82 -26 -140q0 -5 1 -10q2 -62 26 -109 t59 -73.5t80 -38.5l-29 -141q-87 8 -153 45t-103.5 94t-55.5 130q-15 59 -15 121q0 15 1 30q4 78 27.5 158t64.5 151q169 292 417 409q137 64 272 64q72 0 143 -18q180 -46 284 -195q95 -137 95 -317q0 -60 -10 -124q-29 -182 -142 -378q-90 -155 -219 -291t-280 -228 q24 -22 79 -72.5t82 -74.5t77.5 -67.5t81.5 -65.5t77.5 -52t82 -44.5t78 -25.5t81.5 -11q175 0 294 116l105 -110q-5 -7 -15 -19t-46.5 -42t-79 -52.5t-113.5 -41.5t-150 -19q-62 0 -124 15.5t-123.5 49t-112.5 66.5t-114 88t-103.5 92.5t-106 101t-98.5 93.5 q-179 -76 -340 -76q-142 0 -221.5 64.5t-79.5 152.5zM207 135q0 -27 31.5 -45t89.5 -18q98 0 207 39q-125 86 -218 86q-52 0 -81 -18.5t-29 -43.5z" /> -<glyph unicode="R" horiz-adv-x="1359" d="M29 0l798 1382h213l-313 -542q96 -46 186 -46q25 0 51 4q114 17 205.5 90.5t147.5 188.5q43 93 43 172q0 37 -10 69q-30 104 -123 167t-215 63q-74 0 -138 -20.5t-106 -53.5t-75.5 -73t-52 -80t-30.5 -73t-16 -54l-4 -20l-180 28q2 11 6 30t22.5 74.5t44 105.5t74.5 111 t108 105.5t150 74.5t197 30q291 0 434 -171q104 -123 104 -297q0 -15 -1 -31q-9 -187 -125 -338q-129 -169 -332 -213q-59 -12 -121 -13q78 -82 79 -193q0 -115 -85 -260l-316 -547q-17 -27 -23 -63q-2 -12 -2 -24q0 -25 8 -49q12 -36 46 -52l-90 -156q-84 42 -122 118 q-31 62 -31 127q-1 15 1 30q8 82 53 159l316 547q59 105 59 187q0 37 -12 70q-38 104 -190 161l-418 -725h-215z" /> -<glyph unicode="S" horiz-adv-x="1802" d="M20 109l64 79q96 -65 210 -65q44 0 91 10q-30 77 -35 163q-1 19 -1 39q0 65 13 127q17 80 59.5 154t103.5 128.5t149.5 87t191.5 32.5q166 0 281 -112l301 295q11 161 35 278t68.5 205t115 132t168.5 44q60 0 104 -23.5t63 -65.5q17 -37 17 -82v-12q-2 -52 -36.5 -115 t-96.5 -122l-246 -242q-8 -133 -8 -354q0 -188 -44.5 -351t-128.5 -287t-215.5 -195.5t-295.5 -71.5q-172 0 -298 62.5t-201 168.5q-67 -18 -133 -18q-49 0 -97 10q-113 23 -199 101zM525 338q2 -74 28 -139q79 49 139 106l357 350q-80 64 -183 64q-81 0 -148 -32.5 t-108.5 -86.5t-63.5 -121q-21 -62 -21 -129v-12zM621 88q113 -133 327 -133q158 0 270.5 97t166 260.5t53.5 377.5v158l-209 -207q39 -77 45 -161q1 -13 1 -26q0 -70 -27 -137q-32 -80 -101 -137l-88 90q66 63 83 139q6 28 6 54q0 45 -18 84l-325 -320q-90 -87 -184 -139z M1659 1255l86 84q104 99 104 160q0 4 -1 9q-6 35 -46 36q-51 0 -86 -70t-57 -219z" /> -<glyph unicode="T" horiz-adv-x="1337" d="M36 150q2 65 38 135t102 129l115 -111q-71 -71 -78 -147q-1 -9 -1 -16q0 -64 48 -108q54 -48 152 -48q202 0 376 303l607 1059q-151 -80 -330 -80q-28 0 -119 4t-115 4q-132 0 -219.5 -67.5t-87.5 -155.5q0 -109 103 -166l-105 -131q-84 44 -127 117.5t-43 158.5 q0 178 147 293t378 115q22 0 105.5 -1t107.5 -1q101 0 205 26t158 52l54 26l111 -186h-2l-639 -1108q-249 -430 -590 -430q-78 0 -146 27.5t-113.5 73t-69.5 107.5q-22 56 -22 114v12z" /> -<glyph unicode="U" horiz-adv-x="1585" d="M39 872q0 90 37.5 159.5t105 117t151 84t186.5 69t200 63.5t203.5 76.5t185.5 98.5l109 -186l-539 -932q-70 -121 -71 -195q0 -29 12 -51q21 -41 72 -42q18 0 40 6q104 24 214 145q46 49 85 110l623 1080h213l-717 -1248q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27 q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -133.5 41.5t-52.5 109.5q-83 -71 -169 -109q-85 -38 -155 -38h-2q-68 0 -117 36t-67 100q-8 27 -8 61q0 47 15 107q25 104 97 228l455 791q-60 -30 -150.5 -61.5t-167 -54t-159 -55.5t-140 -67 t-94.5 -85.5t-37 -115.5q0 -29 11.5 -55t28.5 -42.5t33.5 -28.5t27.5 -18l12 -5l-80 -137q-89 35 -154 111.5t-65 178.5z" /> -<glyph unicode="V" horiz-adv-x="1431" d="M36 876q6 155 143 275q116 100 306 152q376 103 576 237l121 -139l-267 -924l555 809q69 97 143.5 160t139.5 85q62 21 121 21h5q61 -1 107 -25t78 -60.5t43 -80.5l-141 -77q-38 85 -101 85q-14 0 -30 -4q-85 -24 -188 -169l-869 -1221h-190l379 1325 q-59 -34 -149.5 -67.5t-171 -57t-166 -56.5t-147 -67.5t-101 -88.5t-39.5 -120q0 -71 40 -115.5t96 -52.5q13 -2 26 -2q43 0 93 22q64 28 107 91l98 -96q-43 -76 -125.5 -120t-175.5 -44q-144 0 -235 100q-81 88 -81 208v17z" /> -<glyph unicode="W" horiz-adv-x="1916" d="M35 872q0 90 37.5 159.5t105 117t151 84t186.5 69t200 63.5t203.5 76.5t185.5 98.5l108 -186l-606 -1051q-51 -89 -51 -147q0 -17 4 -32q12 -39 49 -39q11 0 25 4q91 25 211 187q33 43 65 95l637 1104h213l-717 -1248q-25 -45 -25 -78q0 -26 15 -44q19 -22 52 -22 q22 0 50 9q101 35 192 170l28 45l565 979q60 103 130.5 168.5t136.5 87.5q59 20 115 19q6 1 13 1q63 -2 112.5 -29t84 -65.5t45.5 -81.5l-141 -77q-23 51 -59 73q-25 15 -54 15q-12 -1 -26 -3q-42 -10 -90 -54t-91 -119l-524 -918q-51 -88 -114 -155.5t-126.5 -105 t-128.5 -57.5q-53 -16 -101 -16q-11 1 -21 1q-58 4 -105 23t-78.5 57.5t-40.5 88.5q-146 -157 -289 -167q-9 -1 -17 -1q-92 0 -145 70q-39 52 -39 123q0 41 13 87q15 52 45 105l545 951q-69 -34 -181 -71.5t-202.5 -67t-178 -69.5t-137 -98t-49.5 -133q0 -29 11.5 -55 t28.5 -42.5t33.5 -28.5t27.5 -18l12 -5l-80 -137q-89 35 -154 111.5t-65 178.5z" /> -<glyph unicode="X" horiz-adv-x="1572" d="M129 186l154 47q16 -73 66 -99q23 -12 50 -12q33 0 73 17q72 31 149 117l374 424l70 637q-60 -27 -154.5 -59.5t-172 -56.5t-162.5 -59.5t-143 -71.5t-96 -88.5t-38 -113.5q0 -57 26 -98t68 -57q36 -14 77 -14q6 1 12 1q48 2 97 31.5t83 79.5l98 -96q-43 -76 -125.5 -120 t-175.5 -44q-144 0 -235 100q-81 88 -81 208v17q6 155 143 275q116 100 306 152q374 103 575 237l121 -139l-49 -414l-16 -67l39 59l307 342q57 64 118.5 106.5t118 59.5t110.5 19h9q49 0 91 -16q45 -17 81 -45t58.5 -67t29.5 -84l-153 -47q-12 55 -44 83t-76 28h-2 q-44 0 -101 -34.5t-115 -98.5l-494 -551l-49 -422q-2 -19 -2 -35q0 -76 53 -77q2 0 5 1q77 5 215 137q74 70 137 152l14 16q22 -9 46 -30.5t34 -42.5q-109 -154 -269 -271q-169 -124 -284 -124q-8 0 -16 1q-136 10 -138 210q0 43 6 94l11 94l10 49l-29 -43l-199 -223 q-78 -89 -165 -136q-87 -48 -161 -50h-13q-66 0 -124 23q-64 25 -104 75.5t-49 113.5z" /> -<glyph unicode="Y" horiz-adv-x="1519" d="M27 872q0 90 37.5 159.5t105 117t151 84t186.5 69t200 63.5t203.5 76.5t185.5 98.5l108 -186l-538 -932q-69 -120 -69 -193q0 -30 11 -52q21 -43 73 -43q17 0 38 5q104 24 213 144q65 71 117 163l2 -2l587 1029h213l-841 -1448q123 53 241 150.5t254 254.5l15 16 q22 -9 45.5 -30.5t33.5 -42.5q-329 -384 -673 -492l-162 -280q-44 -75 -107 -121.5t-125 -55.5q-25 -4 -49 -4q-34 0 -65 8q-54 13 -87.5 55.5t-33.5 102.5q0 225 469 365l72 123q-78 -52 -154 -74q-54 -15 -100 -15q-18 0 -35 3q-60 8 -100 48t-52 104q-4 20 -4 43 q0 51 19 119q27 98 94 214l455 791q-60 -30 -150.5 -61.5t-167 -54t-159 -55.5t-140 -67t-94.5 -85.5t-37 -115.5q0 -29 11.5 -55t28.5 -42.5t33.5 -28.5t27.5 -18l12 -5l-80 -137q-89 35 -154 111.5t-65 178.5zM469 -375q0 -28 19 -41q10 -6 22 -6t26 6q29 13 50 51l98 172 q-215 -82 -215 -182z" /> -<glyph unicode="Z" horiz-adv-x="1269" d="M47 -414q0 225 473 367q10 19 10 37q0 28 -26 48q-35 30 -86 31q-7 0 -15 -1h-6l2 2l-14 127q147 26 297.5 125t264 230.5t185.5 287t72 290.5q0 141 -90 204q-50 34 -112 34q-44 0 -94 -17q-143 -50 -253 -219q-165 -253 -184 -671l-152 -15q-4 61 -4 119q0 359 164 619 q129 205 325 297q121 57 233 57q54 0 106 -13q154 -40 222 -182q44 -92 44 -215q0 -106 -33.5 -222.5t-100.5 -234.5t-159.5 -222.5t-219 -191.5t-269.5 -136l-9 -2q57 -48 66 -121q146 44 279.5 147t291.5 285l15 16q22 -9 46 -30.5t34 -42.5q-336 -388 -678 -494 q-9 -29 -37 -84l-113 -196q-44 -76 -108 -123q-64 -46 -126 -55q-24 -4 -47 -4q-36 0 -70 9q-55 14 -89.5 57t-34.5 103zM219 -375q0 -29 19 -41q10 -6 22 -6t26 6q28 12 50 51l100 172q-217 -82 -217 -182z" /> -<glyph unicode="[" horiz-adv-x="1075" d="M-231 -373l1282 2220h462l-96 -168h-250l-1087 -1884h248l-97 -168h-462z" /> -<glyph unicode="\" horiz-adv-x="745" d="M90 1432h154l391 -1432h-152z" /> -<glyph unicode="]" horiz-adv-x="1075" d="M-231 -373l96 168h250l1087 1884h-248l97 168h462l-1282 -2220h-462z" /> -<glyph unicode="_" horiz-adv-x="815" d="M-82 -256l82 143h815l-82 -143h-815z" /> -<glyph unicode="a" d="M-135 139q0 66 41 144l299 516q65 112 169 178.5t195 66.5q99 0 165 -71q60 -64 60 -130q0 -7 -1 -14h120l-344 -602q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-80 0 -128 38t-56 101 q-169 -139 -295 -139q-84 0 -134 44q-52 44 -52 115zM66 138q10 -26 49 -27q69 0 160 76t184 223l166 290q27 51 27 89q0 31 -18 54q-24 29 -66 29q-16 0 -35 -4q-82 -21 -140 -113l-6 -10l-297 -518q-26 -49 -26 -76q0 -7 2 -13z" /> -<glyph unicode="b" horiz-adv-x="927" d="M-84 197q0 108 76 237l602 1041h217l-270 -469q70 47 139 47q88 0 140 -54t52 -137q0 -104 -79 -244l-201 -346q82 2 167 42t154 116l15 16q22 -9 46 -30.5t34 -42.5q-78 -92 -206.5 -149.5t-230.5 -57.5q-31 0 -47 2q-76 -99 -172 -149t-190 -50q-106 0 -176 61t-70 167 zM102 201q0 -38 24.5 -60t61.5 -22q43 0 87 26t75 76q-108 68 -135 221l-76 -131q-37 -67 -37 -110zM322 518q0 -125 90 -192l217 372q41 69 41 127q0 42 -22 67.5t-58 25.5q-58 0 -122 -68t-105 -162.5t-41 -169.5z" /> -<glyph unicode="c" horiz-adv-x="792" d="M-72 252q6 80 54 164l223 383q68 118 169.5 181.5t229.5 63.5q88 0 147 -46t69 -122q1 -11 1 -23q0 -68 -47 -153l-31 -53h-174l31 53q39 69 39 115q0 27 -13 45q-18 27 -52 27q-17 0 -38 -7q-79 -25 -141 -122q-4 -6 -8 -13l-219 -380q-44 -78 -44 -132v-11 q5 -56 46 -83.5t109 -27.5q108 0 243 89.5t256 229.5l15 16q22 -9 45.5 -30.5t33.5 -42.5q-148 -172 -318 -282.5t-339 -110.5q-93 0 -161 36t-100 96q-27 51 -27 117q0 11 1 23z" /> -<glyph unicode="d" d="M-135 139q0 66 41 144l299 516q65 112 169 178.5t195 66.5q63 0 114 -31t81 -79l313 541h213l-721 -1248q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-80 0 -128 38t-56 101q-169 -139 -295 -139 q-84 0 -134 44q-52 44 -52 115zM66 138q10 -26 49 -27q71 0 164 79.5t186 231.5l162 278h-2q27 51 27 89q0 31 -18 54q-24 29 -66 29q-16 0 -35 -4q-82 -21 -140 -113l-6 -10l-297 -518q-26 -49 -26 -76q0 -7 2 -13z" /> -<glyph unicode="e" horiz-adv-x="792" d="M-72 252q6 80 54 164l223 383q68 118 169.5 181.5t229.5 63.5q88 0 147 -46t69 -122q1 -11 1 -23q0 -68 -47 -153l-31 -53q-57 -98 -134 -162q-77 -65 -153 -87q-73 -22 -139 -21h-5q-68 1 -124 24l-20 -36q-44 -78 -44 -132v-11q5 -56 46 -83.5t109 -27.5 q108 0 243 89.5t256 229.5l15 16q22 -9 45.5 -30.5t33.5 -42.5q-148 -172 -318 -282.5t-339 -110.5q-93 0 -161 36t-100 96q-27 51 -27 117q0 11 1 23zM250 506q34 -12 70 -14h13q31 0 67 8q44 10 88.5 47.5t80.5 99.5l31 53q39 69 39 115q0 27 -13 45q-18 27 -52 27 q-17 0 -38 -7q-79 -25 -141 -122q-4 -6 -8 -13z" /> -<glyph unicode="f" horiz-adv-x="761" d="M-510 -495q5 64 43 130l881 1530q113 196 265 271q72 36 132 36q41 0 76 -16q81 -35 89 -134q1 -11 1 -22q0 -95 -70 -215l-342 -591q-133 -227 -430 -383q359 25 613 319l14 16q22 -9 46 -30.5t34 -42.5q-284 -329 -733 -355q13 -40 13 -80q0 -67 -38 -135l-160 -280 q-98 -172 -222 -208q-28 -8 -54 -8q-58 0 -102 40q-57 51 -57 134q0 12 1 24zM-327 -524q7 -13 20 -13q12 0 30 12q29 20 56 66l178 314q35 64 35 105q0 36 -27 54h-18l-242 -413q-38 -64 -38 -101q0 -14 6 -24zM33 164q80 35 158.5 105t136 145.5t108.5 163.5l332 575 q36 67 36 105q0 20 -9 32q-10 12 -26 12q-19 0 -49 -19q-58 -38 -110 -128z" /> -<glyph unicode="g" horiz-adv-x="950" d="M-272 -414q0 222 467 365l59 100q-114 -71 -203 -71q-84 0 -134 44q-52 44 -52 115q0 66 41 144l299 516q65 112 169 178.5t195 66.5q94 0 159 -66t65 -138h125l-478 -815q123 53 242 151t254 254l14 16q22 -9 46 -30.5t34 -42.5q-329 -384 -674 -492l-161 -280 q-44 -75 -107 -121.5t-124 -55.5q-26 -4 -50 -4q-34 0 -66 8q-53 13 -86.5 55.5t-33.5 102.5zM-100 -375q0 -28 20 -41q9 -6 21 -6t26 6q28 13 49 51l97 172q-213 -83 -213 -182zM66 138q10 -27 49 -27q70 0 162.5 78.5t185.5 228.5l162 282q27 51 27 89q0 31 -18 54 q-24 29 -66 29q-16 0 -35 -4q-82 -21 -140 -113l-6 -10l-297 -518q-26 -49 -26 -76q0 -8 2 -13z" /> -<glyph unicode="h" d="M-258 0l850 1475h213l-340 -592q154 161 297 161q61 0 103.5 -36t48.5 -98q1 -8 1 -16q0 -56 -38 -128l-308 -539q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 45 -52 115 q0 66 41 144l277 481q28 48 28 78q0 17 -9 28q-10 12 -29 12q-32 0 -87 -36q-120 -77 -284 -283l-324 -563h-215z" /> -<glyph unicode="i" horiz-adv-x="526" d="M-135 139q0 66 41 144l428 741h213l-457 -797q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 44 -52 115zM451 1255q0 53 35 89t87 36q53 0 89 -36t36 -89q0 -52 -36 -87t-89 -35 t-87.5 34.5t-34.5 87.5z" /> -<glyph unicode="j" horiz-adv-x="575" d="M-647 -414q0 226 471 365l244 428q-48 35 -68 67q67 78 139.5 171.5t116.5 153t106 147t76 106.5h213l-583 -999q122 52 239 149.5t254 255.5l14 16q22 -9 46 -30.5t34 -42.5q-332 -385 -671 -492l-164 -280q-44 -75 -107 -121.5t-125 -55.5q-25 -4 -49 -4q-34 0 -65 8 q-54 13 -87.5 55.5t-33.5 102.5zM-475 -375q0 -28 19 -41q10 -6 22 -6t26 6q29 13 50 51l98 172q-215 -83 -215 -182zM504 1255q0 53 35.5 89t87.5 36q53 0 89 -36t36 -89q0 -52 -36 -87t-89 -35t-88 35t-35 87z" /> -<glyph unicode="k" horiz-adv-x="882" d="M-258 0l850 1475h213l-303 -527q45 41 97.5 66.5t100.5 29.5q14 1 27 1q33 -1 63 -7q44 -10 71.5 -39.5t39.5 -70.5q6 -19 5 -42q0 -26 -7 -60q-14 -62 -55 -132l-58 -98q-75 -131 -185 -199q-92 -57 -186 -57q-18 0 -36 2v-88q0 -68 27 -105.5t65 -37.5q121 0 397 319 l15 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-123 0 -165 64t-42 210v170l-244 -424h-215zM268 541q22 -65 82 -73q11 -1 22 -1q50 0 100 30q61 37 93 93l103 176q19 33 19 59q0 20 -11 36q-17 23 -50 23q-21 0 -49 -10q-114 -42 -247 -227z" /> -<glyph unicode="l" horiz-adv-x="526" d="M-135 139q0 66 41 144l688 1192h213l-717 -1248q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 44 -52 115z" /> -<glyph unicode="m" horiz-adv-x="1536" d="M-258 0l592 1024h213l-127 -221q191 241 366 241q57 0 99 -34q41 -32 51 -90q2 -12 3 -26q0 -48 -28 -108q202 258 381 258q61 0 103.5 -36t48.5 -98q1 -8 1 -16q0 -56 -38 -128l-307 -539q-26 -50 -26 -76q0 -7 2 -13q9 -26 48 -27q122 0 398 319l14 16q22 -9 46 -30.5 t34 -42.5q-337 -393 -555 -393q-128 0 -171 92q-17 36 -17 75q0 63 42 136l277 481q28 48 28 78q0 17 -9 28q-10 12 -29 12q-32 0 -87 -35q-160 -102 -387 -421l-6 -8l-239 -418h-217l440 764q28 48 28 77q0 17 -10 29t-29 12q-32 0 -88 -36q-158 -103 -382 -416l-248 -430 h-215z" /> -<glyph unicode="n" d="M-258 0l592 1024h213l-80 -139q152 159 295 159q61 0 103.5 -36t48.5 -98q1 -8 1 -16q0 -56 -38 -128l-308 -539q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 45 -52 115 q0 66 41 144l277 481q28 48 28 78q0 17 -9 28q-10 12 -29 12q-31 0 -85 -34q-120 -75 -284 -281l-326 -567h-215z" /> -<glyph unicode="o" horiz-adv-x="927" d="M-83 197q-1 107 75 237q86 146 196 340q89 154 187 216.5t227 62.5q74 0 132 -37q58 -36 88 -96q25 -50 25 -116q1 -12 -1 -24q-6 -80 -53 -162l-201 -346q82 2 166.5 42t154.5 116l15 16q22 -9 46 -30.5t34 -42.5q-78 -92 -206.5 -149.5t-230.5 -57.5h-47 q-117 -147 -276 -185q-47 -12 -90 -12q-79 0 -142 40q-99 61 -99 188zM121 148q24 -29 67 -30q16 0 34 5q79 19 128 97q3 4 6 9l2 4q-20 33 -20 72q0 53 36.5 90t88.5 37h10l156 266q42 71 42 125q0 26 -10 48q-21 45 -69 45q-6 0 -12 -1q-77 -8 -150 -108q-14 -19 -27 -41 q-74 -126 -264 -455q-37 -64 -37 -109q0 -32 19 -54z" /> -<glyph unicode="p" horiz-adv-x="923" d="M-516 -451l850 1475h213l-43 -74q53 47 114 71.5t115 24.5t96.5 -24.5t63.5 -67.5q14 -27 14 -66q0 -21 -4 -44q-11 -69 -59 -150l-236 -403q-11 -18 -40 -74t-48 -86q94 33 195.5 112t193.5 187l15 16q24 -6 47.5 -27.5t32.5 -45.5q-58 -67 -109 -119t-118.5 -105 t-134.5 -87.5t-151 -57t-174 -24.5h-12q-55 0 -99 17.5t-68 43t-40 51t-21 42.5l-5 18l121 57q29 -53 72 -53h6q47 4 75 53l322 557q12 22 12 41q0 20 -13 37q-19 26 -55 26q-19 0 -43 -8q-107 -33 -233 -205l-637 -1108h-215z" /> -<glyph unicode="q" horiz-adv-x="882" d="M-142 136q5 74 58 165l289 498q65 112 169 178.5t195 66.5q94 0 159 -66t65 -138h118l-413 -709q212 117 370 299l15 16q22 -9 46 -30.5t34 -42.5q-229 -264 -557 -398l-3 -4q11 0 15 -2q61 -26 82 -117q7 -27 7 -54q0 -68 -38 -142l-76 -133q-98 -171 -219 -207 q-29 -9 -56 -9q-55 0 -98 39q-55 50 -55 132q0 13 1 27q6 64 44 130l287 502q-176 -157 -299 -157q-70 0 -108 40q-33 36 -33 97q0 9 1 19zM83 200q-1 -7 -1 -12q0 -26 22 -36q5 -2 13 -2q33 0 103 44q85 54 200 160l223 389q8 26 8 48q0 42 -33 65q-23 16 -52 16t-62 -15 q-70 -31 -117 -112l-256 -446q-43 -72 -48 -99zM151 -524q5 -13 16 -13t27 12q27 21 54 66l94 166q35 64 35 108q0 42 -31 58l-158 -272q-40 -69 -40 -106q0 -11 3 -19z" /> -<glyph unicode="r" horiz-adv-x="868" d="M0 446q133 157 360 478l-18 24q-49 59 -49 130q1 15 3 30q12 88 101 168l111 -121q-34 -33 -35 -67q0 -28 23 -56l118 -143q29 -35 45 -63.5t24 -63.5q4 -16 4 -33q1 -20 -5 -42q-10 -40 -37 -87l-213 -373q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319 l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 45 -52 115q0 66 41 144l225 391q15 26 15 51q0 35 -27 70l-29 34q-236 -321 -352 -456q-55 35 -80 73z" /> -<glyph unicode="s" horiz-adv-x="718" d="M-92 152l133 69q1 -3 3.5 -8.5t11 -19t19 -23.5t28.5 -18.5t38 -8.5q57 0 94 41.5t55 114t29 148.5t26.5 167t37.5 148q-9 -11 -76.5 -102.5t-120 -157.5t-106.5 -129q-55 35 -80 73q67 78 146 179.5t127 167.5t119 165t81 113l160 -86q-57 -118 -87.5 -268t-50.5 -295.5 t-46 -222.5q142 96 256 231l14 16q24 -6 47.5 -27.5t32.5 -45.5q-132 -154 -286 -260.5t-306 -126.5q-1 0 -3 -1t-3 -1q-40 -4 -60 -4q-55 0 -99 17.5t-68 43t-40 51t-21 42.5z" /> -<glyph unicode="t" horiz-adv-x="526" d="M-135 139q0 66 41 144l428 741h-195l62 102h192l201 349h213l-201 -349h176l-61 -102h-174l-457 -797q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 44 -52 115z" /> -<glyph unicode="u" d="M-142 136q6 74 58 165l418 723h213l-416 -725q-43 -72 -48 -99q-6 -36 21 -48q6 -2 14 -2q34 0 104 45q88 56 210 167l379 662h213l-455 -797q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393 q-99 0 -148 58q-38 44 -38 106q0 19 4 40q-212 -204 -350 -204q-70 0 -108 40q-33 35 -33 97q0 10 1 19z" /> -<glyph unicode="v" horiz-adv-x="763" d="M-98 110q-1 9 -1 19q0 66 33 156l297 739h215l-284 -711q-51 -127 -51 -149q0 -4 2 -4h1q8 0 42 48q24 33 67 99l477 717h193l-346 -516q-34 -70 -34 -112q0 -35 24 -51q16 -10 38 -11q34 0 82 25q52 26 93 71l14 16q22 -9 46 -30.5t34 -42.5q-63 -74 -133 -113 q-69 -38 -127 -40q-3 0 -7 -1q-53 1 -96 23q-45 24 -67 67l-111 -166q-48 -72 -116 -115t-127 -45h-8q-54 0 -98 27q-46 28 -52 100z" /> -<glyph unicode="w" horiz-adv-x="1355" d="M-120 72q-17 35 -17 74q0 63 43 137l430 741h211l-457 -797q-26 -49 -25 -76q-1 -7 1 -13q10 -26 49 -27q70 0 162.5 79t187.5 230l350 604h211l-457 -797q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q79 0 194 118q-22 31 -22 76q0 53 36.5 90t88.5 37q27 0 51 -12 q171 255 295 604h137q-165 -490 -360 -752q84 0 169.5 40t157.5 118l15 16q22 -9 46 -30.5t34 -42.5q-78 -92 -206.5 -149.5t-230.5 -57.5q-50 0 -75 4q-184 -190 -394 -190q-80 0 -128.5 37.5t-57.5 99.5q-167 -137 -293 -137q-127 0 -171 92z" /> -<glyph unicode="x" horiz-adv-x="983" d="M-49 2l440 487l47 338q-4 -6 -68.5 -90.5t-99 -129t-92 -116t-98.5 -118.5q-55 35 -80 73q147 174 346 439q102 159 197 159q70 0 91 -57q11 -29 11 -77q0 -45 -10 -107l-21 -129l306 350h157l-495 -567l-35 -230q-3 -21 -4 -38q0 -69 53 -69q80 0 236 156q66 66 137 154 l14 16q22 -9 46 -30.5t34 -42.5q-78 -91 -134.5 -150.5t-126 -120.5t-133.5 -91.5t-124 -30.5q-123 0 -163 79q-27 53 -27 135q0 41 7 89v8l-268 -289h-143z" /> -<glyph unicode="y" horiz-adv-x="950" d="M-272 -414q0 225 469 365l116 201q-192 -172 -315 -172q-70 0 -108 40q-33 36 -33 97q0 9 1 19q5 74 58 165l418 723h213l-416 -725q-43 -72 -48 -99q-6 -36 21 -48q6 -3 14 -3q34 0 106 47q89 59 212 173l377 655h213l-584 -999q123 53 240.5 150.5t253.5 254.5l14 16 q22 -9 46 -30.5t34 -42.5q-332 -384 -672 -492l-163 -280q-44 -75 -107 -121.5t-124 -55.5q-26 -4 -50 -4q-34 0 -66 8q-53 13 -86.5 55.5t-33.5 102.5zM-100 -375q0 -28 20 -41q9 -6 21 -6t26 6q28 13 49 51l99 172q-215 -83 -215 -182z" /> -<glyph unicode="z" horiz-adv-x="950" d="M-272 -414q0 224 473 367q10 19 10 37q1 28 -25 48q-35 30 -87 31q-7 0 -15 -1h-6l2 2l-14 127q63 21 129.5 56.5t127 78t117 93t102 100.5t79.5 101q33 51 51 95q16 41 17 75q-1 3 -1 6q-2 37 -24 60q-17 17 -42 17q-106 0 -364 -295q-42 -49 -116 -138q-45 -54 -62 -73 q-55 35 -80 73q32 38 84 103t92.5 114.5t94 111t103 106t105 83.5t114 59.5t116.5 20.5q134 0 171 -111q13 -38 13 -83q0 -89 -51 -205q-86 -197 -270 -354q-121 -105 -265 -170l-8 -2q57 -48 66 -121q146 44 279.5 147t291.5 285l14 16q22 -9 46 -30.5t34 -42.5 q-336 -388 -678 -494q-9 -29 -37 -84l-112 -196q-44 -76 -107.5 -122.5t-125.5 -55.5q-24 -4 -48 -4q-36 0 -70 9q-55 14 -89.5 57t-34.5 103zM-100 -375q0 -29 19 -41q10 -6 21.5 -6t25.5 6q28 12 50 51l101 172q-217 -82 -217 -182z" /> -<glyph unicode="{" horiz-adv-x="966" d="M-66 -138q6 58 35 109l375 668q24 41 32 76t4.5 55.5t-13.5 37t-16.5 21.5t-10.5 7q12 3 33 13t59 32t78 62t68 89l340 578q68 118 177 177.5t222 59.5h196l-96 -168h-94q-87 0 -139 -32t-105 -123l-299 -508q-24 -41 -55.5 -74.5t-59 -52.5t-53.5 -31.5t-40.5 -17 t-18.5 -4.5q5 -4 11 -10t14 -24.5t10 -40t-7.5 -57.5t-33.5 -77l-397 -705q-41 -75 -13 -129.5t103 -54.5h59l-96 -168h-29q-54 0 -102 24.5t-79.5 66.5t-48 92.5t-10.5 108.5z" /> -<glyph unicode="|" horiz-adv-x="516" d="M-131 0l827 1434h189l-828 -1434h-188z" /> -<glyph unicode="}" horiz-adv-x="1044" d="M-358 -430l96 168h94q86 0 138.5 32.5t105.5 123.5l321 552q24 41 56 75t59.5 52.5t53.5 31.5t40.5 17.5t18.5 4.5q-5 4 -11 10t-14 24.5t-10 40t7.5 57.5t33.5 77l375 659q41 75 12.5 129.5t-103.5 54.5h-59l96 168h29q54 0 102 -24.5t79.5 -66.5t48 -92.5t10.5 -108.5 t-35 -109l-375 -668q-24 -41 -32 -76t-4.5 -55.5t13.5 -36.5t16.5 -21t10.5 -7q-11 -3 -32.5 -13t-59 -32t-77.5 -62.5t-68 -89.5l-340 -578q-68 -118 -177.5 -177.5t-222.5 -59.5h-196z" /> -<glyph unicode="­" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode=" " horiz-adv-x="923" /> -<glyph unicode=" " horiz-adv-x="1847" /> -<glyph unicode=" " horiz-adv-x="923" /> -<glyph unicode=" " horiz-adv-x="1847" /> -<glyph unicode=" " horiz-adv-x="615" /> -<glyph unicode=" " horiz-adv-x="461" /> -<glyph unicode=" " horiz-adv-x="307" /> -<glyph unicode=" " horiz-adv-x="307" /> -<glyph unicode=" " horiz-adv-x="230" /> -<glyph unicode=" " horiz-adv-x="369" /> -<glyph unicode=" " horiz-adv-x="102" /> -<glyph unicode="‐" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="‑" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="‒" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="–" horiz-adv-x="1259" d="M133 467l82 143h938l-82 -143h-938z" /> -<glyph unicode="—" horiz-adv-x="1679" d="M133 467l82 143h1348l-82 -143h-1348z" /> -<glyph unicode="‘" horiz-adv-x="393" d="M33 1223q0 105 84.5 178.5t179.5 73.5h14l-4 -82h-12q-37 0 -76.5 -20.5t-58.5 -49.5q46 -8 74 -35.5t28 -66.5q0 -54 -32.5 -83.5t-75.5 -29.5q-48 0 -84.5 31t-36.5 84z" /> -<glyph unicode="’" horiz-adv-x="417" d="M205 1096l4 82h12q37 0 76.5 20t58.5 49q-46 8 -74 35.5t-28 67.5q0 54 32.5 83t75.5 29q48 0 84.5 -31t36.5 -83q0 -105 -84.5 -178.5t-179.5 -73.5h-14z" /> -<glyph unicode="“" horiz-adv-x="464" d="M43 1223q0 105 84.5 178.5t179.5 73.5h15l-5 -82h-12q-37 0 -76.5 -20.5t-58.5 -49.5q46 -8 74 -35.5t28 -66.5q0 -54 -32.5 -83.5t-75.5 -29.5q-48 0 -84.5 31t-36.5 84zM350 1223q0 105 84.5 178.5t179.5 73.5h15l-4 -82h-13q-37 0 -76.5 -20.5t-58.5 -49.5 q46 -8 74.5 -35.5t28.5 -66.5q0 -54 -33 -83.5t-76 -29.5q-48 0 -84.5 31t-36.5 84z" /> -<glyph unicode="”" horiz-adv-x="724" d="M205 1108l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14zM512 1108l4 82h12q37 0 77 20.5t59 49.5q-46 8 -74.5 35.5t-28.5 66.5q0 54 33 83.5t76 29.5 q48 0 84.5 -31t36.5 -84q0 -70 -41.5 -129.5t-102 -91t-121.5 -31.5h-14z" /> -<glyph unicode="•" horiz-adv-x="649" d="M137 506q0 78 55.5 133t133.5 55t133 -55t55 -133t-55 -133.5t-133 -55.5t-133.5 55.5t-55.5 133.5z" /> -<glyph unicode=" " horiz-adv-x="369" /> -<glyph unicode=" " horiz-adv-x="461" /> -<glyph unicode="" horiz-adv-x="1044" d="M0 0v1044h1044v-1044h-1044z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/fonts/wisdom_script-webfont.ttf b/app/assets/fonts/wisdom_script-webfont.ttf deleted file mode 100755 index f8420701..00000000 Binary files a/app/assets/fonts/wisdom_script-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/wisdom_script-webfont.woff b/app/assets/fonts/wisdom_script-webfont.woff deleted file mode 100755 index a7f21b3b..00000000 Binary files a/app/assets/fonts/wisdom_script-webfont.woff and /dev/null differ diff --git a/app/assets/images/blog/after.png b/app/assets/images/blog/after.png deleted file mode 100644 index 09b9ec06..00000000 Binary files a/app/assets/images/blog/after.png and /dev/null differ diff --git a/app/assets/images/blog/before.png b/app/assets/images/blog/before.png deleted file mode 100644 index 3140c845..00000000 Binary files a/app/assets/images/blog/before.png and /dev/null differ diff --git a/app/assets/images/blog/cheeter.png b/app/assets/images/blog/cheeter.png deleted file mode 100644 index d0aa6ee9..00000000 Binary files a/app/assets/images/blog/cheeter.png and /dev/null differ diff --git a/app/assets/images/blog/newcopy.png b/app/assets/images/blog/newcopy.png deleted file mode 100644 index 5d3082e7..00000000 Binary files a/app/assets/images/blog/newcopy.png and /dev/null differ diff --git a/app/assets/images/blog/newskills.png b/app/assets/images/blog/newskills.png deleted file mode 100644 index f5512ccd..00000000 Binary files a/app/assets/images/blog/newskills.png and /dev/null differ diff --git a/app/assets/images/blog/oldcopy.png b/app/assets/images/blog/oldcopy.png deleted file mode 100644 index 7a18b6a7..00000000 Binary files a/app/assets/images/blog/oldcopy.png and /dev/null differ diff --git a/app/assets/images/blog/oldskills.png b/app/assets/images/blog/oldskills.png deleted file mode 100644 index 3f14b878..00000000 Binary files a/app/assets/images/blog/oldskills.png and /dev/null differ diff --git a/app/assets/images/blog/tweet-of-new-skills.png b/app/assets/images/blog/tweet-of-new-skills.png deleted file mode 100644 index 08080a03..00000000 Binary files a/app/assets/images/blog/tweet-of-new-skills.png and /dev/null differ diff --git a/app/assets/images/email/email-popular_protip-header.png b/app/assets/images/email/email-popular_protip-header.png new file mode 100644 index 00000000..82c61950 Binary files /dev/null and b/app/assets/images/email/email-popular_protip-header.png differ diff --git a/app/assets/images/email/logo-wordmark-muted@2x.png b/app/assets/images/email/logo-wordmark-muted@2x.png new file mode 100644 index 00000000..43252cd0 Binary files /dev/null and b/app/assets/images/email/logo-wordmark-muted@2x.png differ diff --git a/app/assets/images/fav128x128.png b/app/assets/images/fav128x128.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/app/assets/images/fav128x128.png differ diff --git a/app/assets/images/fav32x32.png b/app/assets/images/fav32x32.png new file mode 100644 index 00000000..bef89128 Binary files /dev/null and b/app/assets/images/fav32x32.png differ diff --git a/app/assets/images/fav64x64.png b/app/assets/images/fav64x64.png new file mode 100644 index 00000000..a2e61f21 Binary files /dev/null and b/app/assets/images/fav64x64.png differ diff --git a/app/assets/images/pg_team-avatar.png b/app/assets/images/pg_team-avatar.png new file mode 100644 index 00000000..4ce56494 Binary files /dev/null and b/app/assets/images/pg_team-avatar.png differ diff --git a/app/assets/images/prem-profile-explaination.png b/app/assets/images/prem-profile-explaination.png new file mode 100644 index 00000000..877a9036 Binary files /dev/null and b/app/assets/images/prem-profile-explaination.png differ diff --git a/app/assets/images/relic-tee.png b/app/assets/images/relic-tee.png index de83f724..29bf8124 100644 Binary files a/app/assets/images/relic-tee.png and b/app/assets/images/relic-tee.png differ diff --git a/app/assets/images/select-arrow.png b/app/assets/images/select-arrow.png new file mode 100644 index 00000000..20e0f02b Binary files /dev/null and b/app/assets/images/select-arrow.png differ diff --git a/app/assets/images/touch-icon-iphone.png b/app/assets/images/touch-icon-iphone.png new file mode 100644 index 00000000..6d123d8a Binary files /dev/null and b/app/assets/images/touch-icon-iphone.png differ diff --git a/app/assets/images/user-avatar.png b/app/assets/images/user-avatar.png new file mode 100644 index 00000000..99847eae Binary files /dev/null and b/app/assets/images/user-avatar.png differ diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js deleted file mode 100644 index b98f4341..00000000 --- a/app/assets/javascripts/application.js +++ /dev/null @@ -1,197 +0,0 @@ -//= require jquery -//= require jquery_ujs -//= require jquery.tipTip.min -//= require jquery.sortElements -//= require jquery.fancybox.min -//= require jquery.autocomplete -//= require jquery.flexslider-min -//= require underscore -//= require backbone - -$(function () { - $('a.remove-parent').live('click', function (e) { - $(this).parents('.' + $(this).attr('data-parent')).slideUp(); - e.preventDefault(); - }); - registerButtons(); -}) - -$(function () { - $('[placeholder]').focus(function () { - var input = $(this); - if (input.val() == input.attr('placeholder')) { - input.val(''); - input.removeClass('placeholder'); - } - }).blur(function () { - var input = $(this); - if (input.val() == '' || input.val() == input.attr('placeholder')) { - input.addClass('placeholder'); - input.val(input.attr('placeholder')); - } - }).blur(); - - $('.save a').live('click', function (e) { - var form = $(this).parents('form'); - $.post(form.attr('action'), form.serialize()).success(function (response) { - - }); - e.preventDefault(); - }) - - $('a.submitEndorsement').live('click', function (e) { - var form = $(this).parents('form'); - $.post(form.attr('action'), form.serialize()).success(function (response) { - $.fancybox.close(); - setTimeout(function () { - $('#endorsementcounter span').slideUp(); - }, 600); - setTimeout(function () { - $('#endorsementcounter span').html(response.totalEndorsements).slideDown(); - if (response.availableEndorsements <= 0) { - $('#endorse .endorsements').remove(); - $('#endorse .notification').remove(); - $('#endorse .message').html("You used up all your endorsements. Unlock additional achievements to make more endorsements."); - } else if (response.remainingEndoresments <= 0) { - $('#endorse .endorsements').remove(); - $('#endorse .notification').remove(); - $('#endorse .message').html("There are no more skills to endorse."); - } else { - $('#endorse .notification').html(response.message); - $(response.ensorsementsMade).each(function () { - $('#' + this).remove(); - }); - } - }, 1500); - }); - e.preventDefault(); - }) - - $('#nocount input, #withcount input').live('change', function () { - $('.endorseButtons .markdown, .endorseButtons .html, .endorseButtons .textile').toggleClass('hide'); - }); - - $('a.seeMore').live('click', function (e) { - $(this).siblings('.seeMore').slideDown(); - e.preventDefault(); - }); - - $('#achievementcode a').live('click', function () { - $(this).hide().parents('em').hide(); - $('.claimcode').fadeIn(); - e.preventDefault(); - }); - - $(".tip").tipTip({maxWidth: "auto", edgeOffset: 10}); - - $("a.filter").click(function (e) { - $('a.filter').removeClass('active'); - $(this).addClass('active'); - - var list = $(this).attr('data-list'); - var filter = $(this).attr('data-filter'); - - if (filter == '') { - $(list).removeClass('suppress'); - } - else { - $(list).removeClass('suppress').addClass('suppress'); - $(list + '.' + filter).removeClass('suppress'); - } - sortListItems(list, filter); - e.preventDefault(); - }); - - $("a.fancybox").fancybox({ - hideOnContentClick: false, - margin: 0, - padding: 0, - onClosed: function () { - $(this.href).find("form").each(function () { - this.reset(); - }); - } - }); - - $("a.closefancybox").live("click", function (e) { - $.fancybox.close(); - }); - - $('.event_links a.more').live('click', function (e) { - $(this).siblings('.more.hide').slideToggle(); - e.preventDefault(); - }); - - if ($('.featuredAccomplishment').length > 0) { - setInterval(function () { - var element = $('.featuredAccomplishment:not(.hide)').fadeOut().delay(1000).addClass('hide'); - if (element.next().length > 0) - element.next().removeClass('hide').fadeIn(); - else - $('.featuredAccomplishment:first').removeClass('hide').fadeIn(); - }, 6000); - } - - $('.attentionSpan').first().each(function () { - $(this).slideDown().next().delay(1500).slideDown(); - }); - $('.attentionSpan.disappear').delay(4000).slideUp(); - - //replace authenticity token with the meta tag to make sure cached fragments are not being exposed - $('input[name=authenticity_token]').val($('meta[name=csrf-token]').attr('content')) -}); - -function sortListItems(list, value) { - $(list).sortElements(function (x, y) { - if ($(x).hasClass(value) == true && $(y).hasClass(value) == true) { - if ($(x).attr('data-popularity') > $(y).attr('data-popularity')) - return -1; - else - return 1; - } - else if ($(x).hasClass(value) == true && $(y).hasClass(value) == false) { - return -1; - } else { - return 1; - } - }); -} - -function readCookie(name) { - var nameEQ = name + "="; - var ca = document.cookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) == ' ') c = c.substring(1, c.length); - if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); - } - return null; -} - -function updateCountdown(e) { - var remaining = 100 - $('#new_accomplishment').val().length; - if (remaining <= 0) { - $('#new_accomplishment').val($('#new_accomplishment').val().substring(0, 100)); - $('#countdown').text('0'); - } - else - $('#countdown').text(remaining); -} - -function toggleNewAccomplishment() { - $('.accomplishments .featured').toggle(); - $('.accomplishments .addnew').toggle(); - $('#new_accomplishment').val(''); -} - -function handle_redirect(response) { - if (response.status == "redirect") - window.location = response.to -} - -function registerButtons() { - $("a.follow-team:not(.noauth)").live("click", function (e) { - $(this).toggleClass("following"); - return e.preventDefault(); - }); -} diff --git a/app/assets/javascripts/autosaver.js.coffee b/app/assets/javascripts/autosaver.js.coffee new file mode 100644 index 00000000..a0fd4581 --- /dev/null +++ b/app/assets/javascripts/autosaver.js.coffee @@ -0,0 +1,71 @@ +window.Coderwall ?= {} +window.Coderwall.Autosaver ?= {} + +class window.Coderwall.Autosaver.TextField + + constructor: (options={}) -> + return unless @supportsStorage() + + @autosave_field = $("##{options.field_id}") + @save_delay = options.save_delay ? 3000 + @storage_key = options.storage_key ? "coderwall:autosaver:textfield:#{@autosave_field}" + @key_append = options.storage_key_append + @storage_key = "#{@storage_key}:#{@key_append}" if @key_append? + @initialize() + return + + + initialize: ()-> + @populateOnInit() + @setupHandlers() + return + + + populateOnInit: ()-> + if @fieldIsEmpty() + # attempt to populate from localstorage + data = @getStorage() + @autosave_field.val data if data? + else + # prefill localstorage with content from field + @store @fieldValue() + return + + + setupHandlers: () -> + @autosave_field.on "keyup", (e)=> + unless @save_timeout? + @save_timeout = setTimeout @saveTimeoutHandler, @save_delay + return + + + supportsStorage: ()-> + window.localStorage? + + + store: (value)-> + localStorage.setItem @storageKey(), JSON.stringify(value) + return + + + getStorage: ()-> + JSON.parse localStorage.getItem(@storageKey()) + + + storageKey: ()-> + @storage_key + + + saveTimeoutHandler: ()=> + @store @fieldValue() + delete @save_timeout + + clear: ()-> + clearTimeout(@save_timeout) + delete localStorage[@storageKey()] + + fieldIsEmpty: ()-> + @fieldValue() == "" + + fieldValue: ()-> + @autosave_field.val() diff --git a/app/assets/javascripts/backbone/routers/ProtipRouter.js.coffee b/app/assets/javascripts/backbone/routers/ProtipRouter.js.coffee deleted file mode 100644 index c0a7abe8..00000000 --- a/app/assets/javascripts/backbone/routers/ProtipRouter.js.coffee +++ /dev/null @@ -1,18 +0,0 @@ -window.ProtipRouter = Backbone.Router.extend( - routes: - 'p/:id': 'fetchProtip' - '*path': 'closeProtip' - - fetchProtip: (id)-> - if(id.match(/^[\dA-Z\-_]{6}$/i)) - $.ajax '/p/' + id, - type: 'GET' - data: - mode: 'popup' - dataType: 'script' - else - @.closeProtip() - - closeProtip: -> - $('#x-active-preview-pane').remove() -) diff --git a/app/assets/javascripts/backbone/views/ProtipGridView.js.coffee b/app/assets/javascripts/backbone/views/ProtipGridView.js.coffee deleted file mode 100644 index 32ea57f5..00000000 --- a/app/assets/javascripts/backbone/views/ProtipGridView.js.coffee +++ /dev/null @@ -1,117 +0,0 @@ -window.ProtipGridView = Backbone.View.extend( - - el: $("#x-protips-grid") - - events: - "click #x-scope-toggle": "toggleScope" - "click #x-followings-toggle": "toggleFollowings" - "submit #x-search form": "search" - "click #x-show-search": "showSearchBar" - "click #x-hide-search": "hideSearchBar" - "click #x-followings .unfollow": "removeUnfollowed" - "click .x-mode-popup": "previewProtip" - "click #x-active-preview-pane .follow": "updateFollowList" - - initialize: (router)-> - view = this - this.render() - $(document).ajaxComplete (e, xhr, options)-> - try handle_redirect(JSON.parse(xhr.responseText)) - catch Error - this.markUpvotes() - this.router = router - this.loadFollowings() - - toggleScope: (e)-> - e.preventDefault() - $(e.target).toggleClass('following').toggleClass('everything') - this.search(e) - - toggleFollowings: (e)-> - e.preventDefault() - $('#x-followings').slideToggle(400) - - showSearchBar: (e)-> - e.preventDefault() - $('#x-scopes-bar').slideUp(100) - $('#x-search').slideDown(600) - $('#x-search input[type=text]').focus() - - hideSearchBar: (e)-> - e.preventDefault() - $('#x-scopes-bar').slideDown(400) - $('#x-search').slideUp(100) - $('#x-scope-toggle').hide() - - search: (e)-> - e.preventDefault() - query_string = $('#x-search form input[type=text]').val() - query_string = null if query_string == $('#x-search form input[type=text]').attr('placeholder') - - domain = $('#x-search form') if query_string? - domain = $('#x-scopes a.selected') unless domain? - url = domain.attr('href') - scope = if $('#x-scope-toggle').hasClass('following') then 'following' else 'everything' - - params = $.extend(this.parseUrl(url), - scope: scope, - search: query_string if query_string? - ) - - destination_url = url.split("?")[0] + "?" + $.param(params) - window.location = destination_url - - parseUrl: (url = location.href) -> - params = {} - ( ( parts = part.split("=") ) && params[ parts[0] ] = parts[1] for part in ( url.split "?" ).pop().split "&" if url.indexOf("?") != -1 ) && params || {} - - markUpvotes: -> - upvoted_protips = $('#upvoted-protips').data('protips') - protips = $('.protip') - this.highlightUpvote(protip) for protip in upvoted_protips if upvoted_protips? - - highlightUpvote: (protip)-> - $('#' + protip + ' .upvotes').addClass('upvoted') - - removeUnfollowed: (e)-> - li = $(e.target).closest('li') - counter = li.parent().find('.x-follow-count') - li.remove() - counter.text(((Number) counter.text()) - 1) - - previewProtip: (e)-> - e.preventDefault() - e.stopPropagation() - protipId = $(e.currentTarget).closest('article').attr('id') - this.router.navigate('/p/' + protipId, {trigger: true}) - this.dimLights() - - dimLights: -> - pane = $("<div id='x-active-preview-pane' style='opacity:0'></div>") - $("<div class='dark-screen'></div>").appendTo(pane) - $(this.el).append(pane) - pane.fadeTo('slow', 1) - $(window).scrollTop(pane.position().top) - - loadFollowings: -> - this.followingNetworks = $('#x-following-networks').data('networks') - this.followingUsers = $('#x-following-users').data('users') - this.followingTeams = $('#x-following-teams').data('teams') - - markFollowings: -> - $(follow).addClass('followed') for follow in $('.x-protip-pane .follow') when follow.attributes['data-value'].value in eval('this.following' + $(follow).data('follow-type')) - - updateFollowList: (e)-> - list = eval('this.following' + $(e.target).data('follow-type')) - entity = $(e.target).data('value') - if $(e.target).hasClass('followed') then (list.filter (val) -> - val is entity) - else - list.push entity - this.markFollowed(e.target) - - markFollowed: (el)-> - unless $(el).data('follow-type') == 'Network' - $(el).toggleClass('followed') - -) \ No newline at end of file diff --git a/app/assets/javascripts/backbone/views/ProtipView.js.coffee b/app/assets/javascripts/backbone/views/ProtipView.js.coffee deleted file mode 100644 index 93826c05..00000000 --- a/app/assets/javascripts/backbone/views/ProtipView.js.coffee +++ /dev/null @@ -1,69 +0,0 @@ -window.ProtipView = Backbone.View.extend( - - el: $("#x-protip") - - events: - "click .upvote,.small-upvote": "upvote" - "click .flag": "flag" - "click .user-flag": "user_flag" - "click .queue": "queue" - "click .feature": "feature" - "click .like": "like" - - initialize: -> - this.highlightCode() if hljs? - this.enableCommentReply() - this.enableCommentLikeUpdate() - this.enableCommentEditing() - this.render() - - highlightCode: -> - hljs.initHighlighting() - - upvote: -> - $('.upvote,.small-upvote').on 'click', -> - if $(@).not('.upvoted').length == 1 - $(@).html(((Number) $(@).html()) + 1) - $(@).addClass('upvoted') - - flag: (e)-> - $(e.target).toggleClass('flagged') - - user_flag: (e)-> - $(e.target).addClass('user-flagged') - - queue: -> - $(@).toggleClass('queued') - - feature: -> - $(@).toggleClass('featured') - - like: -> - $(@).addClass('liked') - $(@).removeClass('not-liked') - - - enableCommentReply: -> - $('.reply').on 'click', -> - username = $(this).closest('li.cf').find('a.comment-user').attr('data-reply-to') - textbox = $('#add-comment textarea') - textbox.text("@" + username + " ") - textbox.setSelectionRange(textbox.val().length) - - enableCommentLikeUpdate: -> - $('.like').one 'click', -> - count = (Number) $(this).text() - count += 1 - $(this).text(count) - - enableCommentEditing: -> - $('a.edit, .edit-comment .button').on 'click', -> - comment = $(this).closest('li.cf').find('.comment') - toggleCommentEditMode(comment) - - toggleCommentEditMode: (comment)-> - comment.children('p').first().toggleClass('hidden') - comment.find('.edit-comment').toggleClass('hidden') - comment.siblings('ul.edit-del').toggleClass('hidden') - -) diff --git a/app/assets/javascripts/bundle/jquery.ui.min.js b/app/assets/javascripts/bundle/jquery.ui.min.js deleted file mode 100644 index 8ce896d1..00000000 --- a/app/assets/javascripts/bundle/jquery.ui.min.js +++ /dev/null @@ -1,3481 +0,0 @@ -/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function (a, b) { - function d(b) { - return!a(b).parents().andSelf().filter(function () { - return a.curCSS(this, "visibility") === "hidden" || a.expr.filters.hidden(this) - }).length - } - - function c(b, c) { - var e = b.nodeName.toLowerCase(); - if ("area" === e) { - var f = b.parentNode, g = f.name, h; - if (!b.href || !g || f.nodeName.toLowerCase() !== "map")return!1; - h = a("img[usemap=#" + g + "]")[0]; - return!!h && d(h) - } - return(/input|select|textarea|button|object/.test(e) ? !b.disabled : "a" == e ? b.href || c : c) && d(b) - } - - a.ui = a.ui || {}; - a.ui.version || (a.extend(a.ui, {version: "1.8.18", keyCode: {ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91}}), a.fn.extend({propAttr: a.fn.prop || a.fn.attr, _focus: a.fn.focus, focus: function (b, c) { - return typeof b == "number" ? this.each(function () { - var d = this; - setTimeout(function () { - a(d).focus(), c && c.call(d) - }, b) - }) : this._focus.apply(this, arguments) - }, scrollParent: function () { - var b; - a.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? b = this.parents().filter(function () { - return/(relative|absolute|fixed)/.test(a.curCSS(this, "position", 1)) && /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1)) - }).eq(0) : b = this.parents().filter(function () { - return/(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1)) - }).eq(0); - return/fixed/.test(this.css("position")) || !b.length ? a(document) : b - }, zIndex: function (c) { - if (c !== b)return this.css("zIndex", c); - if (this.length) { - var d = a(this[0]), e, f; - while (d.length && d[0] !== document) { - e = d.css("position"); - if (e === "absolute" || e === "relative" || e === "fixed") { - f = parseInt(d.css("zIndex"), 10); - if (!isNaN(f) && f !== 0)return f - } - d = d.parent() - } - } - return 0 - }, disableSelection: function () { - return this.bind((a.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (a) { - a.preventDefault() - }) - }, enableSelection: function () { - return this.unbind(".ui-disableSelection") - }}), a.each(["Width", "Height"], function (c, d) { - function h(b, c, d, f) { - a.each(e, function () { - c -= parseFloat(a.curCSS(b, "padding" + this, !0)) || 0, d && (c -= parseFloat(a.curCSS(b, "border" + this + "Width", !0)) || 0), f && (c -= parseFloat(a.curCSS(b, "margin" + this, !0)) || 0) - }); - return c - } - - var e = d === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], f = d.toLowerCase(), g = {innerWidth: a.fn.innerWidth, innerHeight: a.fn.innerHeight, outerWidth: a.fn.outerWidth, outerHeight: a.fn.outerHeight}; - a.fn["inner" + d] = function (c) { - if (c === b)return g["inner" + d].call(this); - return this.each(function () { - a(this).css(f, h(this, c) + "px") - }) - }, a.fn["outer" + d] = function (b, c) { - if (typeof b != "number")return g["outer" + d].call(this, b); - return this.each(function () { - a(this).css(f, h(this, b, !0, c) + "px") - }) - } - }), a.extend(a.expr[":"], {data: function (b, c, d) { - return!!a.data(b, d[3]) - }, focusable: function (b) { - return c(b, !isNaN(a.attr(b, "tabindex"))) - }, tabbable: function (b) { - var d = a.attr(b, "tabindex"), e = isNaN(d); - return(e || d >= 0) && c(b, !e) - }}), a(function () { - var b = document.body, c = b.appendChild(c = document.createElement("div")); - c.offsetHeight, a.extend(c.style, {minHeight: "100px", height: "auto", padding: 0, borderWidth: 0}), a.support.minHeight = c.offsetHeight === 100, a.support.selectstart = "onselectstart"in c, b.removeChild(c).style.display = "none" - }), a.extend(a.ui, {plugin: {add: function (b, c, d) { - var e = a.ui[b].prototype; - for (var f in d)e.plugins[f] = e.plugins[f] || [], e.plugins[f].push([c, d[f]]) - }, call: function (a, b, c) { - var d = a.plugins[b]; - if (!!d && !!a.element[0].parentNode)for (var e = 0; e < d.length; e++)a.options[d[e][0]] && d[e][1].apply(a.element, c) - }}, contains: function (a, b) { - return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b) - }, hasScroll: function (b, c) { - if (a(b).css("overflow") === "hidden")return!1; - var d = c && c === "left" ? "scrollLeft" : "scrollTop", e = !1; - if (b[d] > 0)return!0; - b[d] = 1, e = b[d] > 0, b[d] = 0; - return e - }, isOverAxis: function (a, b, c) { - return a > b && a < b + c - }, isOver: function (b, c, d, e, f, g) { - return a.ui.isOverAxis(b, d, f) && a.ui.isOverAxis(c, e, g) - }})) -})(jQuery), function (a, b) { - if (a.cleanData) { - var c = a.cleanData; - a.cleanData = function (b) { - for (var d = 0, e; (e = b[d]) != null; d++)try { - a(e).triggerHandler("remove") - } catch (f) { - } - c(b) - } - } else { - var d = a.fn.remove; - a.fn.remove = function (b, c) { - return this.each(function () { - c || (!b || a.filter(b, [this]).length) && a("*", this).add([this]).each(function () { - try { - a(this).triggerHandler("remove") - } catch (b) { - } - }); - return d.call(a(this), b, c) - }) - } - } - a.widget = function (b, c, d) { - var e = b.split(".")[0], f; - b = b.split(".")[1], f = e + "-" + b, d || (d = c, c = a.Widget), a.expr[":"][f] = function (c) { - return!!a.data(c, b) - }, a[e] = a[e] || {}, a[e][b] = function (a, b) { - arguments.length && this._createWidget(a, b) - }; - var g = new c; - g.options = a.extend(!0, {}, g.options), a[e][b].prototype = a.extend(!0, g, {namespace: e, widgetName: b, widgetEventPrefix: a[e][b].prototype.widgetEventPrefix || b, widgetBaseClass: f}, d), a.widget.bridge(b, a[e][b]) - }, a.widget.bridge = function (c, d) { - a.fn[c] = function (e) { - var f = typeof e == "string", g = Array.prototype.slice.call(arguments, 1), h = this; - e = !f && g.length ? a.extend.apply(null, [!0, e].concat(g)) : e; - if (f && e.charAt(0) === "_")return h; - f ? this.each(function () { - var d = a.data(this, c), f = d && a.isFunction(d[e]) ? d[e].apply(d, g) : d; - if (f !== d && f !== b) { - h = f; - return!1 - } - }) : this.each(function () { - var b = a.data(this, c); - b ? b.option(e || {})._init() : a.data(this, c, new d(e, this)) - }); - return h - } - }, a.Widget = function (a, b) { - arguments.length && this._createWidget(a, b) - }, a.Widget.prototype = {widgetName: "widget", widgetEventPrefix: "", options: {disabled: !1}, _createWidget: function (b, c) { - a.data(c, this.widgetName, this), this.element = a(c), this.options = a.extend(!0, {}, this.options, this._getCreateOptions(), b); - var d = this; - this.element.bind("remove." + this.widgetName, function () { - d.destroy() - }), this._create(), this._trigger("create"), this._init() - }, _getCreateOptions: function () { - return a.metadata && a.metadata.get(this.element[0])[this.widgetName] - }, _create: function () { - }, _init: function () { - }, destroy: function () { - this.element.unbind("." + this.widgetName).removeData(this.widgetName), this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled " + "ui-state-disabled") - }, widget: function () { - return this.element - }, option: function (c, d) { - var e = c; - if (arguments.length === 0)return a.extend({}, this.options); - if (typeof c == "string") { - if (d === b)return this.options[c]; - e = {}, e[c] = d - } - this._setOptions(e); - return this - }, _setOptions: function (b) { - var c = this; - a.each(b, function (a, b) { - c._setOption(a, b) - }); - return this - }, _setOption: function (a, b) { - this.options[a] = b, a === "disabled" && this.widget()[b ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled" + " " + "ui-state-disabled").attr("aria-disabled", b); - return this - }, enable: function () { - return this._setOption("disabled", !1) - }, disable: function () { - return this._setOption("disabled", !0) - }, _trigger: function (b, c, d) { - var e, f, g = this.options[b]; - d = d || {}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent; - if (f)for (e in f)e in c || (c[e] = f[e]); - this.element.trigger(c, d); - return!(a.isFunction(g) && g.call(this.element[0], c, d) === !1 || c.isDefaultPrevented()) - }} -}(jQuery), function (a, b) { - var c = !1; - a(document).mouseup(function (a) { - c = !1 - }), a.widget("ui.mouse", {options: {cancel: ":input,option", distance: 1, delay: 0}, _mouseInit: function () { - var b = this; - this.element.bind("mousedown." + this.widgetName,function (a) { - return b._mouseDown(a) - }).bind("click." + this.widgetName, function (c) { - if (!0 === a.data(c.target, b.widgetName + ".preventClickEvent")) { - a.removeData(c.target, b.widgetName + ".preventClickEvent"), c.stopImmediatePropagation(); - return!1 - } - }), this.started = !1 - }, _mouseDestroy: function () { - this.element.unbind("." + this.widgetName) - }, _mouseDown: function (b) { - if (!c) { - this._mouseStarted && this._mouseUp(b), this._mouseDownEvent = b; - var d = this, e = b.which == 1, f = typeof this.options.cancel == "string" && b.target.nodeName ? a(b.target).closest(this.options.cancel).length : !1; - if (!e || f || !this._mouseCapture(b))return!0; - this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { - d.mouseDelayMet = !0 - }, this.options.delay)); - if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) { - this._mouseStarted = this._mouseStart(b) !== !1; - if (!this._mouseStarted) { - b.preventDefault(); - return!0 - } - } - !0 === a.data(b.target, this.widgetName + ".preventClickEvent") && a.removeData(b.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (a) { - return d._mouseMove(a) - }, this._mouseUpDelegate = function (a) { - return d._mouseUp(a) - }, a(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), b.preventDefault(), c = !0; - return!0 - } - }, _mouseMove: function (b) { - if (a.browser.msie && !(document.documentMode >= 9) && !b.button)return this._mouseUp(b); - if (this._mouseStarted) { - this._mouseDrag(b); - return b.preventDefault() - } - this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== !1, this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b)); - return!this._mouseStarted - }, _mouseUp: function (b) { - a(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, b.target == this._mouseDownEvent.target && a.data(b.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(b)); - return!1 - }, _mouseDistanceMet: function (a) { - return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance - }, _mouseDelayMet: function (a) { - return this.mouseDelayMet - }, _mouseStart: function (a) { - }, _mouseDrag: function (a) { - }, _mouseStop: function (a) { - }, _mouseCapture: function (a) { - return!0 - }}) -}(jQuery), function (a, b) { - a.widget("ui.draggable", a.ui.mouse, {widgetEventPrefix: "drag", options: {addClasses: !0, appendTo: "parent", axis: !1, connectToSortable: !1, containment: !1, cursor: "auto", cursorAt: !1, grid: !1, handle: !1, helper: "original", iframeFix: !1, opacity: !1, refreshPositions: !1, revert: !1, revertDuration: 500, scope: "default", scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, snap: !1, snapMode: "both", snapTolerance: 20, stack: !1, zIndex: !1}, _create: function () { - this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position")) && (this.element[0].style.position = "relative"), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._mouseInit() - }, destroy: function () { - if (!!this.element.data("draggable")) { - this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy(); - return this - } - }, _mouseCapture: function (b) { - var c = this.options; - if (this.helper || c.disabled || a(b.target).is(".ui-resizable-handle"))return!1; - this.handle = this._getHandle(b); - if (!this.handle)return!1; - c.iframeFix && a(c.iframeFix === !0 ? "iframe" : c.iframeFix).each(function () { - a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width: this.offsetWidth + "px", height: this.offsetHeight + "px", position: "absolute", opacity: "0.001", zIndex: 1e3}).css(a(this).offset()).appendTo("body") - }); - return!0 - }, _mouseStart: function (b) { - var c = this.options; - this.helper = this._createHelper(b), this._cacheHelperProportions(), a.ui.ddmanager && (a.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(), this.offset = this.positionAbs = this.element.offset(), this.offset = {top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left}, a.extend(this.offset, {click: {left: b.pageX - this.offset.left, top: b.pageY - this.offset.top}, parent: this._getParentOffset(), relative: this._getRelativeOffset()}), this.originalPosition = this.position = this._generatePosition(b), this.originalPageX = b.pageX, this.originalPageY = b.pageY, c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt), c.containment && this._setContainment(); - if (this._trigger("start", b) === !1) { - this._clear(); - return!1 - } - this._cacheHelperProportions(), a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this.helper.addClass("ui-draggable-dragging"), this._mouseDrag(b, !0), a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b); - return!0 - }, _mouseDrag: function (b, c) { - this.position = this._generatePosition(b), this.positionAbs = this._convertPositionTo("absolute"); - if (!c) { - var d = this._uiHash(); - if (this._trigger("drag", b, d) === !1) { - this._mouseUp({}); - return!1 - } - this.position = d.position - } - if (!this.options.axis || this.options.axis != "y")this.helper[0].style.left = this.position.left + "px"; - if (!this.options.axis || this.options.axis != "x")this.helper[0].style.top = this.position.top + "px"; - a.ui.ddmanager && a.ui.ddmanager.drag(this, b); - return!1 - }, _mouseStop: function (b) { - var c = !1; - a.ui.ddmanager && !this.options.dropBehaviour && (c = a.ui.ddmanager.drop(this, b)), this.dropped && (c = this.dropped, this.dropped = !1); - if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")return!1; - if (this.options.revert == "invalid" && !c || this.options.revert == "valid" && c || this.options.revert === !0 || a.isFunction(this.options.revert) && this.options.revert.call(this.element, c)) { - var d = this; - a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { - d._trigger("stop", b) !== !1 && d._clear() - }) - } else this._trigger("stop", b) !== !1 && this._clear(); - return!1 - }, _mouseUp: function (b) { - this.options.iframeFix === !0 && a("div.ui-draggable-iframeFix").each(function () { - this.parentNode.removeChild(this) - }), a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b); - return a.ui.mouse.prototype._mouseUp.call(this, b) - }, cancel: function () { - this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(); - return this - }, _getHandle: function (b) { - var c = !this.options.handle || !a(this.options.handle, this.element).length ? !0 : !1; - a(this.options.handle, this.element).find("*").andSelf().each(function () { - this == b.target && (c = !0) - }); - return c - }, _createHelper: function (b) { - var c = this.options, d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b])) : c.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; - d.parents("body").length || d.appendTo(c.appendTo == "parent" ? this.element[0].parentNode : c.appendTo), d[0] != this.element[0] && !/(fixed|absolute)/.test(d.css("position")) && d.css("position", "absolute"); - return d - }, _adjustOffsetFromHelper: function (b) { - typeof b == "string" && (b = b.split(" ")), a.isArray(b) && (b = {left: +b[0], top: +b[1] || 0}), "left"in b && (this.offset.click.left = b.left + this.margins.left), "right"in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), "top"in b && (this.offset.click.top = b.top + this.margins.top), "bottom"in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top) - }, _getParentOffset: function () { - this.offsetParent = this.helper.offsetParent(); - var b = this.offsetParent.offset(); - this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()); - if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie)b = {top: 0, left: 0}; - return{top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} - }, _getRelativeOffset: function () { - if (this.cssPosition == "relative") { - var a = this.element.position(); - return{top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} - } - return{top: 0, left: 0} - }, _cacheMargins: function () { - this.margins = {left: parseInt(this.element.css("marginLeft"), 10) || 0, top: parseInt(this.element.css("marginTop"), 10) || 0, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0} - }, _cacheHelperProportions: function () { - this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()} - }, _setContainment: function () { - var b = this.options; - b.containment == "parent" && (b.containment = this.helper[0].parentNode); - if (b.containment == "document" || b.containment == "window")this.containment = [b.containment == "document" ? 0 : a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, b.containment == "document" ? 0 : a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (b.containment == "document" ? 0 : a(window).scrollLeft()) + a(b.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (b.containment == "document" ? 0 : a(window).scrollTop()) + (a(b.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; - if (!/^(document|window|parent)$/.test(b.containment) && b.containment.constructor != Array) { - var c = a(b.containment), d = c[0]; - if (!d)return; - var e = c.offset(), f = a(d).css("overflow") != "hidden"; - this.containment = [(parseInt(a(d).css("borderLeftWidth"), 10) || 0) + (parseInt(a(d).css("paddingLeft"), 10) || 0), (parseInt(a(d).css("borderTopWidth"), 10) || 0) + (parseInt(a(d).css("paddingTop"), 10) || 0), (f ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(a(d).css("borderLeftWidth"), 10) || 0) - (parseInt(a(d).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (f ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(a(d).css("borderTopWidth"), 10) || 0) - (parseInt(a(d).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = c - } else b.containment.constructor == Array && (this.containment = b.containment) - }, _convertPositionTo: function (b, c) { - c || (c = this.position); - var d = b == "absolute" ? 1 : -1, e = this.options, f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, g = /(html|body)/i.test(f[0].tagName); - return{top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d), left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d)} - }, _generatePosition: function (b) { - var c = this.options, d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(d[0].tagName), f = b.pageX, g = b.pageY; - if (this.originalPosition) { - var h; - if (this.containment) { - if (this.relative_container) { - var i = this.relative_container.offset(); - h = [this.containment[0] + i.left, this.containment[1] + i.top, this.containment[2] + i.left, this.containment[3] + i.top] - } else h = this.containment; - b.pageX - this.offset.click.left < h[0] && (f = h[0] + this.offset.click.left), b.pageY - this.offset.click.top < h[1] && (g = h[1] + this.offset.click.top), b.pageX - this.offset.click.left > h[2] && (f = h[2] + this.offset.click.left), b.pageY - this.offset.click.top > h[3] && (g = h[3] + this.offset.click.top) - } - if (c.grid) { - var j = c.grid[1] ? this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1] : this.originalPageY; - g = h ? j - this.offset.click.top < h[1] || j - this.offset.click.top > h[3] ? j - this.offset.click.top < h[1] ? j + c.grid[1] : j - c.grid[1] : j : j; - var k = c.grid[0] ? this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0] : this.originalPageX; - f = h ? k - this.offset.click.left < h[0] || k - this.offset.click.left > h[2] ? k - this.offset.click.left < h[0] ? k + c.grid[0] : k - c.grid[0] : k : k - } - } - return{top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()), left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft())} - }, _clear: function () { - this.helper.removeClass("ui-draggable-dragging"), this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1 - }, _trigger: function (b, c, d) { - d = d || this._uiHash(), a.ui.plugin.call(this, b, [c, d]), b == "drag" && (this.positionAbs = this._convertPositionTo("absolute")); - return a.Widget.prototype._trigger.call(this, b, c, d) - }, plugins: {}, _uiHash: function (a) { - return{helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs} - }}), a.extend(a.ui.draggable, {version: "1.8.18"}), a.ui.plugin.add("draggable", "connectToSortable", {start: function (b, c) { - var d = a(this).data("draggable"), e = d.options, f = a.extend({}, c, {item: d.element}); - d.sortables = [], a(e.connectToSortable).each(function () { - var c = a.data(this, "sortable"); - c && !c.options.disabled && (d.sortables.push({instance: c, shouldRevert: c.options.revert}), c.refreshPositions(), c._trigger("activate", b, f)) - }) - }, stop: function (b, c) { - var d = a(this).data("draggable"), e = a.extend({}, c, {item: d.element}); - a.each(d.sortables, function () { - this.instance.isOver ? (this.instance.isOver = 0, d.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = !0), this.instance._mouseStop(b), this.instance.options.helper = this.instance.options._helper, d.options.helper == "original" && this.instance.currentItem.css({top: "auto", left: "auto"})) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", b, e)) - }) - }, drag: function (b, c) { - var d = a(this).data("draggable"), e = this, f = function (b) { - var c = this.offset.click.top, d = this.offset.click.left, e = this.positionAbs.top, f = this.positionAbs.left, g = b.height, h = b.width, i = b.top, j = b.left; - return a.ui.isOver(e + c, f + d, i, j, g, h) - }; - a.each(d.sortables, function (f) { - this.instance.positionAbs = d.positionAbs, this.instance.helperProportions = d.helperProportions, this.instance.offset.click = d.offset.click, this.instance._intersectsWith(this.instance.containerCache) ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function () { - return c.helper[0] - }, b.target = this.instance.currentItem[0], this.instance._mouseCapture(b, !0), this.instance._mouseStart(b, !0, !0), this.instance.offset.click.top = d.offset.click.top, this.instance.offset.click.left = d.offset.click.left, this.instance.offset.parent.left -= d.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= d.offset.parent.top - this.instance.offset.parent.top, d._trigger("toSortable", b), d.dropped = this.instance.element, d.currentItem = d.element, this.instance.fromOutside = d), this.instance.currentItem && this.instance._mouseDrag(b)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", b, this.instance._uiHash(this.instance)), this.instance._mouseStop(b, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), d._trigger("fromSortable", b), d.dropped = !1) - }) - }}), a.ui.plugin.add("draggable", "cursor", {start: function (b, c) { - var d = a("body"), e = a(this).data("draggable").options; - d.css("cursor") && (e._cursor = d.css("cursor")), d.css("cursor", e.cursor) - }, stop: function (b, c) { - var d = a(this).data("draggable").options; - d._cursor && a("body").css("cursor", d._cursor) - }}), a.ui.plugin.add("draggable", "opacity", {start: function (b, c) { - var d = a(c.helper), e = a(this).data("draggable").options; - d.css("opacity") && (e._opacity = d.css("opacity")), d.css("opacity", e.opacity) - }, stop: function (b, c) { - var d = a(this).data("draggable").options; - d._opacity && a(c.helper).css("opacity", d._opacity) - }}), a.ui.plugin.add("draggable", "scroll", {start: function (b, c) { - var d = a(this).data("draggable"); - d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML" && (d.overflowOffset = d.scrollParent.offset()) - }, drag: function (b, c) { - var d = a(this).data("draggable"), e = d.options, f = !1; - if (d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML") { - if (!e.axis || e.axis != "x")d.overflowOffset.top + d.scrollParent[0].offsetHeight - b.pageY < e.scrollSensitivity ? d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop + e.scrollSpeed : b.pageY - d.overflowOffset.top < e.scrollSensitivity && (d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop - e.scrollSpeed); - if (!e.axis || e.axis != "y")d.overflowOffset.left + d.scrollParent[0].offsetWidth - b.pageX < e.scrollSensitivity ? d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft + e.scrollSpeed : b.pageX - d.overflowOffset.left < e.scrollSensitivity && (d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft - e.scrollSpeed) - } else { - if (!e.axis || e.axis != "x")b.pageY - a(document).scrollTop() < e.scrollSensitivity ? f = a(document).scrollTop(a(document).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < e.scrollSensitivity && (f = a(document).scrollTop(a(document).scrollTop() + e.scrollSpeed)); - if (!e.axis || e.axis != "y")b.pageX - a(document).scrollLeft() < e.scrollSensitivity ? f = a(document).scrollLeft(a(document).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < e.scrollSensitivity && (f = a(document).scrollLeft(a(document).scrollLeft() + e.scrollSpeed)) - } - f !== !1 && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b) - }}), a.ui.plugin.add("draggable", "snap", {start: function (b, c) { - var d = a(this).data("draggable"), e = d.options; - d.snapElements = [], a(e.snap.constructor != String ? e.snap.items || ":data(draggable)" : e.snap).each(function () { - var b = a(this), c = b.offset(); - this != d.element[0] && d.snapElements.push({item: this, width: b.outerWidth(), height: b.outerHeight(), top: c.top, left: c.left}) - }) - }, drag: function (b, c) { - var d = a(this).data("draggable"), e = d.options, f = e.snapTolerance, g = c.offset.left, h = g + d.helperProportions.width, i = c.offset.top, j = i + d.helperProportions.height; - for (var k = d.snapElements.length - 1; k >= 0; k--) { - var l = d.snapElements[k].left, m = l + d.snapElements[k].width, n = d.snapElements[k].top, o = n + d.snapElements[k].height; - if (!(l - f < g && g < m + f && n - f < i && i < o + f || l - f < g && g < m + f && n - f < j && j < o + f || l - f < h && h < m + f && n - f < i && i < o + f || l - f < h && h < m + f && n - f < j && j < o + f)) { - d.snapElements[k].snapping && d.options.snap.release && d.options.snap.release.call(d.element, b, a.extend(d._uiHash(), {snapItem: d.snapElements[k].item})), d.snapElements[k].snapping = !1; - continue - } - if (e.snapMode != "inner") { - var p = Math.abs(n - j) <= f, q = Math.abs(o - i) <= f, r = Math.abs(l - h) <= f, s = Math.abs(m - g) <= f; - p && (c.position.top = d._convertPositionTo("relative", {top: n - d.helperProportions.height, left: 0}).top - d.margins.top), q && (c.position.top = d._convertPositionTo("relative", {top: o, left: 0}).top - d.margins.top), r && (c.position.left = d._convertPositionTo("relative", {top: 0, left: l - d.helperProportions.width}).left - d.margins.left), s && (c.position.left = d._convertPositionTo("relative", {top: 0, left: m}).left - d.margins.left) - } - var t = p || q || r || s; - if (e.snapMode != "outer") { - var p = Math.abs(n - i) <= f, q = Math.abs(o - j) <= f, r = Math.abs(l - g) <= f, s = Math.abs(m - h) <= f; - p && (c.position.top = d._convertPositionTo("relative", {top: n, left: 0}).top - d.margins.top), q && (c.position.top = d._convertPositionTo("relative", {top: o - d.helperProportions.height, left: 0}).top - d.margins.top), r && (c.position.left = d._convertPositionTo("relative", {top: 0, left: l}).left - d.margins.left), s && (c.position.left = d._convertPositionTo("relative", {top: 0, left: m - d.helperProportions.width}).left - d.margins.left) - } - !d.snapElements[k].snapping && (p || q || r || s || t) && d.options.snap.snap && d.options.snap.snap.call(d.element, b, a.extend(d._uiHash(), {snapItem: d.snapElements[k].item})), d.snapElements[k].snapping = p || q || r || s || t - } - }}), a.ui.plugin.add("draggable", "stack", {start: function (b, c) { - var d = a(this).data("draggable").options, e = a.makeArray(a(d.stack)).sort(function (b, c) { - return(parseInt(a(b).css("zIndex"), 10) || 0) - (parseInt(a(c).css("zIndex"), 10) || 0) - }); - if (!!e.length) { - var f = parseInt(e[0].style.zIndex) || 0; - a(e).each(function (a) { - this.style.zIndex = f + a - }), this[0].style.zIndex = f + e.length - } - }}), a.ui.plugin.add("draggable", "zIndex", {start: function (b, c) { - var d = a(c.helper), e = a(this).data("draggable").options; - d.css("zIndex") && (e._zIndex = d.css("zIndex")), d.css("zIndex", e.zIndex) - }, stop: function (b, c) { - var d = a(this).data("draggable").options; - d._zIndex && a(c.helper).css("zIndex", d._zIndex) - }}) -}(jQuery), function (a, b) { - a.widget("ui.droppable", {widgetEventPrefix: "drop", options: {accept: "*", activeClass: !1, addClasses: !0, greedy: !1, hoverClass: !1, scope: "default", tolerance: "intersect"}, _create: function () { - var b = this.options, c = b.accept; - this.isover = 0, this.isout = 1, this.accept = a.isFunction(c) ? c : function (a) { - return a.is(c) - }, this.proportions = {width: this.element[0].offsetWidth, height: this.element[0].offsetHeight}, a.ui.ddmanager.droppables[b.scope] = a.ui.ddmanager.droppables[b.scope] || [], a.ui.ddmanager.droppables[b.scope].push(this), b.addClasses && this.element.addClass("ui-droppable") - }, destroy: function () { - var b = a.ui.ddmanager.droppables[this.options.scope]; - for (var c = 0; c < b.length; c++)b[c] == this && b.splice(c, 1); - this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"); - return this - }, _setOption: function (b, c) { - b == "accept" && (this.accept = a.isFunction(c) ? c : function (a) { - return a.is(c) - }), a.Widget.prototype._setOption.apply(this, arguments) - }, _activate: function (b) { - var c = a.ui.ddmanager.current; - this.options.activeClass && this.element.addClass(this.options.activeClass), c && this._trigger("activate", b, this.ui(c)) - }, _deactivate: function (b) { - var c = a.ui.ddmanager.current; - this.options.activeClass && this.element.removeClass(this.options.activeClass), c && this._trigger("deactivate", b, this.ui(c)) - }, _over: function (b) { - var c = a.ui.ddmanager.current; - !!c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", b, this.ui(c))) - }, _out: function (b) { - var c = a.ui.ddmanager.current; - !!c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", b, this.ui(c))) - }, _drop: function (b, c) { - var d = c || a.ui.ddmanager.current; - if (!d || (d.currentItem || d.element)[0] == this.element[0])return!1; - var e = !1; - this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function () { - var b = a.data(this, "droppable"); - if (b.options.greedy && !b.options.disabled && b.options.scope == d.options.scope && b.accept.call(b.element[0], d.currentItem || d.element) && a.ui.intersect(d, a.extend(b, {offset: b.element.offset()}), b.options.tolerance)) { - e = !0; - return!1 - } - }); - if (e)return!1; - if (this.accept.call(this.element[0], d.currentItem || d.element)) { - this.options.activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("drop", b, this.ui(d)); - return this.element - } - return!1 - }, ui: function (a) { - return{draggable: a.currentItem || a.element, helper: a.helper, position: a.position, offset: a.positionAbs} - }}), a.extend(a.ui.droppable, {version: "1.8.18"}), a.ui.intersect = function (b, c, d) { - if (!c.offset)return!1; - var e = (b.positionAbs || b.position.absolute).left, f = e + b.helperProportions.width, g = (b.positionAbs || b.position.absolute).top, h = g + b.helperProportions.height, i = c.offset.left, j = i + c.proportions.width, k = c.offset.top, l = k + c.proportions.height; - switch (d) { - case"fit": - return i <= e && f <= j && k <= g && h <= l; - case"intersect": - return i < e + b.helperProportions.width / 2 && f - b.helperProportions.width / 2 < j && k < g + b.helperProportions.height / 2 && h - b.helperProportions.height / 2 < l; - case"pointer": - var m = (b.positionAbs || b.position.absolute).left + (b.clickOffset || b.offset.click).left, n = (b.positionAbs || b.position.absolute).top + (b.clickOffset || b.offset.click).top, o = a.ui.isOver(n, m, k, i, c.proportions.height, c.proportions.width); - return o; - case"touch": - return(g >= k && g <= l || h >= k && h <= l || g < k && h > l) && (e >= i && e <= j || f >= i && f <= j || e < i && f > j); - default: - return!1 - } - }, a.ui.ddmanager = {current: null, droppables: {"default": []}, prepareOffsets: function (b, c) { - var d = a.ui.ddmanager.droppables[b.options.scope] || [], e = c ? c.type : null, f = (b.currentItem || b.element).find(":data(droppable)").andSelf(); - droppablesLoop:for (var g = 0; g < d.length; g++) { - if (d[g].options.disabled || b && !d[g].accept.call(d[g].element[0], b.currentItem || b.element))continue; - for (var h = 0; h < f.length; h++)if (f[h] == d[g].element[0]) { - d[g].proportions.height = 0; - continue droppablesLoop - } - d[g].visible = d[g].element.css("display") != "none"; - if (!d[g].visible)continue; - e == "mousedown" && d[g]._activate.call(d[g], c), d[g].offset = d[g].element.offset(), d[g].proportions = {width: d[g].element[0].offsetWidth, - height: d[g].element[0].offsetHeight} - } - }, drop: function (b, c) { - var d = !1; - a.each(a.ui.ddmanager.droppables[b.options.scope] || [], function () { - !this.options || (!this.options.disabled && this.visible && a.ui.intersect(b, this, this.options.tolerance) && (d = this._drop.call(this, c) || d), !this.options.disabled && this.visible && this.accept.call(this.element[0], b.currentItem || b.element) && (this.isout = 1, this.isover = 0, this._deactivate.call(this, c))) - }); - return d - }, dragStart: function (b, c) { - b.element.parents(":not(body,html)").bind("scroll.droppable", function () { - b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c) - }) - }, drag: function (b, c) { - b.options.refreshPositions && a.ui.ddmanager.prepareOffsets(b, c), a.each(a.ui.ddmanager.droppables[b.options.scope] || [], function () { - if (!(this.options.disabled || this.greedyChild || !this.visible)) { - var d = a.ui.intersect(b, this, this.options.tolerance), e = !d && this.isover == 1 ? "isout" : d && this.isover == 0 ? "isover" : null; - if (!e)return; - var f; - if (this.options.greedy) { - var g = this.element.parents(":data(droppable):eq(0)"); - g.length && (f = a.data(g[0], "droppable"), f.greedyChild = e == "isover" ? 1 : 0) - } - f && e == "isover" && (f.isover = 0, f.isout = 1, f._out.call(f, c)), this[e] = 1, this[e == "isout" ? "isover" : "isout"] = 0, this[e == "isover" ? "_over" : "_out"].call(this, c), f && e == "isout" && (f.isout = 0, f.isover = 1, f._over.call(f, c)) - } - }) - }, dragStop: function (b, c) { - b.element.parents(":not(body,html)").unbind("scroll.droppable"), b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c) - }} -}(jQuery), function (a, b) { - a.widget("ui.resizable", a.ui.mouse, {widgetEventPrefix: "resize", options: {alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 1e3}, _create: function () { - var b = this, c = this.options; - this.element.addClass("ui-resizable"), a.extend(this, {_aspectRatio: !!c.aspectRatio, aspectRatio: c.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: c.helper || c.ghost || c.animate ? c.helper || "ui-resizable-helper" : null}), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left")})), this.element = this.element.parent().data("resizable", this.element.data("resizable")), this.elementIsWrapper = !0, this.element.css({marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom")}), this.originalElement.css({marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({position: "static", zoom: 1, display: "block"})), this.originalElement.css({margin: this.originalElement.css("margin")}), this._proportionallyResize()), this.handles = c.handles || (a(".ui-resizable-handle", this.element).length ? {n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw"} : "e,s,se"); - if (this.handles.constructor == String) { - this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw"); - var d = this.handles.split(","); - this.handles = {}; - for (var e = 0; e < d.length; e++) { - var f = a.trim(d[e]), g = "ui-resizable-" + f, h = a('<div class="ui-resizable-handle ' + g + '"></div>'); - /sw|se|ne|nw/.test(f) && h.css({zIndex: ++c.zIndex}), "se" == f && h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[f] = ".ui-resizable-" + f, this.element.append(h) - } - } - this._renderAxis = function (b) { - b = b || this.element; - for (var c in this.handles) { - this.handles[c].constructor == String && (this.handles[c] = a(this.handles[c], this.element).show()); - if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { - var d = a(this.handles[c], this.element), e = 0; - e = /sw|ne|nw|se|n|s/.test(c) ? d.outerHeight() : d.outerWidth(); - var f = ["padding", /ne|nw|n/.test(c) ? "Top" : /se|sw|s/.test(c) ? "Bottom" : /^e$/.test(c) ? "Right" : "Left"].join(""); - b.css(f, e), this._proportionallyResize() - } - if (!a(this.handles[c]).length)continue - } - }, this._renderAxis(this.element), this._handles = a(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function () { - if (!b.resizing) { - if (this.className)var a = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); - b.axis = a && a[1] ? a[1] : "se" - } - }), c.autoHide && (this._handles.hide(), a(this.element).addClass("ui-resizable-autohide").hover(function () { - c.disabled || (a(this).removeClass("ui-resizable-autohide"), b._handles.show()) - }, function () { - c.disabled || b.resizing || (a(this).addClass("ui-resizable-autohide"), b._handles.hide()) - })), this._mouseInit() - }, destroy: function () { - this._mouseDestroy(); - var b = function (b) { - a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove() - }; - if (this.elementIsWrapper) { - b(this.element); - var c = this.element; - c.after(this.originalElement.css({position: c.css("position"), width: c.outerWidth(), height: c.outerHeight(), top: c.css("top"), left: c.css("left")})).remove() - } - this.originalElement.css("resize", this.originalResizeStyle), b(this.originalElement); - return this - }, _mouseCapture: function (b) { - var c = !1; - for (var d in this.handles)a(this.handles[d])[0] == b.target && (c = !0); - return!this.options.disabled && c - }, _mouseStart: function (b) { - var d = this.options, e = this.element.position(), f = this.element; - this.resizing = !0, this.documentScroll = {top: a(document).scrollTop(), left: a(document).scrollLeft()}, (f.is(".ui-draggable") || /absolute/.test(f.css("position"))) && f.css({position: "absolute", top: e.top, left: e.left}), this._renderProxy(); - var g = c(this.helper.css("left")), h = c(this.helper.css("top")); - d.containment && (g += a(d.containment).scrollLeft() || 0, h += a(d.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {left: g, top: h}, this.size = this._helper ? {width: f.outerWidth(), height: f.outerHeight()} : {width: f.width(), height: f.height()}, this.originalSize = this._helper ? {width: f.outerWidth(), height: f.outerHeight()} : {width: f.width(), height: f.height()}, this.originalPosition = {left: g, top: h}, this.sizeDiff = {width: f.outerWidth() - f.width(), height: f.outerHeight() - f.height()}, this.originalMousePosition = {left: b.pageX, top: b.pageY}, this.aspectRatio = typeof d.aspectRatio == "number" ? d.aspectRatio : this.originalSize.width / this.originalSize.height || 1; - var i = a(".ui-resizable-" + this.axis).css("cursor"); - a("body").css("cursor", i == "auto" ? this.axis + "-resize" : i), f.addClass("ui-resizable-resizing"), this._propagate("start", b); - return!0 - }, _mouseDrag: function (b) { - var c = this.helper, d = this.options, e = {}, f = this, g = this.originalMousePosition, h = this.axis, i = b.pageX - g.left || 0, j = b.pageY - g.top || 0, k = this._change[h]; - if (!k)return!1; - var l = k.apply(this, [b, i, j]), m = a.browser.msie && a.browser.version < 7, n = this.sizeDiff; - this._updateVirtualBoundaries(b.shiftKey); - if (this._aspectRatio || b.shiftKey)l = this._updateRatio(l, b); - l = this._respectSize(l, b), this._propagate("resize", b), c.css({top: this.position.top + "px", left: this.position.left + "px", width: this.size.width + "px", height: this.size.height + "px"}), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), this._updateCache(l), this._trigger("resize", b, this.ui()); - return!1 - }, _mouseStop: function (b) { - this.resizing = !1; - var c = this.options, d = this; - if (this._helper) { - var e = this._proportionallyResizeElements, f = e.length && /textarea/i.test(e[0].nodeName), g = f && a.ui.hasScroll(e[0], "left") ? 0 : d.sizeDiff.height, h = f ? 0 : d.sizeDiff.width, i = {width: d.helper.width() - h, height: d.helper.height() - g}, j = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null, k = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null; - c.animate || this.element.css(a.extend(i, {top: k, left: j})), d.helper.height(d.size.height), d.helper.width(d.size.width), this._helper && !c.animate && this._proportionallyResize() - } - a("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", b), this._helper && this.helper.remove(); - return!1 - }, _updateVirtualBoundaries: function (a) { - var b = this.options, c, e, f, g, h; - h = {minWidth: d(b.minWidth) ? b.minWidth : 0, maxWidth: d(b.maxWidth) ? b.maxWidth : Infinity, minHeight: d(b.minHeight) ? b.minHeight : 0, maxHeight: d(b.maxHeight) ? b.maxHeight : Infinity}; - if (this._aspectRatio || a)c = h.minHeight * this.aspectRatio, f = h.minWidth / this.aspectRatio, e = h.maxHeight * this.aspectRatio, g = h.maxWidth / this.aspectRatio, c > h.minWidth && (h.minWidth = c), f > h.minHeight && (h.minHeight = f), e < h.maxWidth && (h.maxWidth = e), g < h.maxHeight && (h.maxHeight = g); - this._vBoundaries = h - }, _updateCache: function (a) { - var b = this.options; - this.offset = this.helper.offset(), d(a.left) && (this.position.left = a.left), d(a.top) && (this.position.top = a.top), d(a.height) && (this.size.height = a.height), d(a.width) && (this.size.width = a.width) - }, _updateRatio: function (a, b) { - var c = this.options, e = this.position, f = this.size, g = this.axis; - d(a.height) ? a.width = a.height * this.aspectRatio : d(a.width) && (a.height = a.width / this.aspectRatio), g == "sw" && (a.left = e.left + (f.width - a.width), a.top = null), g == "nw" && (a.top = e.top + (f.height - a.height), a.left = e.left + (f.width - a.width)); - return a - }, _respectSize: function (a, b) { - var c = this.helper, e = this._vBoundaries, f = this._aspectRatio || b.shiftKey, g = this.axis, h = d(a.width) && e.maxWidth && e.maxWidth < a.width, i = d(a.height) && e.maxHeight && e.maxHeight < a.height, j = d(a.width) && e.minWidth && e.minWidth > a.width, k = d(a.height) && e.minHeight && e.minHeight > a.height; - j && (a.width = e.minWidth), k && (a.height = e.minHeight), h && (a.width = e.maxWidth), i && (a.height = e.maxHeight); - var l = this.originalPosition.left + this.originalSize.width, m = this.position.top + this.size.height, n = /sw|nw|w/.test(g), o = /nw|ne|n/.test(g); - j && n && (a.left = l - e.minWidth), h && n && (a.left = l - e.maxWidth), k && o && (a.top = m - e.minHeight), i && o && (a.top = m - e.maxHeight); - var p = !a.width && !a.height; - p && !a.left && a.top ? a.top = null : p && !a.top && a.left && (a.left = null); - return a - }, _proportionallyResize: function () { - var b = this.options; - if (!!this._proportionallyResizeElements.length) { - var c = this.helper || this.element; - for (var d = 0; d < this._proportionallyResizeElements.length; d++) { - var e = this._proportionallyResizeElements[d]; - if (!this.borderDif) { - var f = [e.css("borderTopWidth"), e.css("borderRightWidth"), e.css("borderBottomWidth"), e.css("borderLeftWidth")], g = [e.css("paddingTop"), e.css("paddingRight"), e.css("paddingBottom"), e.css("paddingLeft")]; - this.borderDif = a.map(f, function (a, b) { - var c = parseInt(a, 10) || 0, d = parseInt(g[b], 10) || 0; - return c + d - }) - } - if (a.browser.msie && (!!a(c).is(":hidden") || !!a(c).parents(":hidden").length))continue; - e.css({height: c.height() - this.borderDif[0] - this.borderDif[2] || 0, width: c.width() - this.borderDif[1] - this.borderDif[3] || 0}) - } - } - }, _renderProxy: function () { - var b = this.element, c = this.options; - this.elementOffset = b.offset(); - if (this._helper) { - this.helper = this.helper || a('<div style="overflow:hidden;"></div>'); - var d = a.browser.msie && a.browser.version < 7, e = d ? 1 : 0, f = d ? 2 : -1; - this.helper.addClass(this._helper).css({width: this.element.outerWidth() + f, height: this.element.outerHeight() + f, position: "absolute", left: this.elementOffset.left - e + "px", top: this.elementOffset.top - e + "px", zIndex: ++c.zIndex}), this.helper.appendTo("body").disableSelection() - } else this.helper = this.element - }, _change: {e: function (a, b, c) { - return{width: this.originalSize.width + b} - }, w: function (a, b, c) { - var d = this.options, e = this.originalSize, f = this.originalPosition; - return{left: f.left + b, width: e.width - b} - }, n: function (a, b, c) { - var d = this.options, e = this.originalSize, f = this.originalPosition; - return{top: f.top + c, height: e.height - c} - }, s: function (a, b, c) { - return{height: this.originalSize.height + c} - }, se: function (b, c, d) { - return a.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [b, c, d])) - }, sw: function (b, c, d) { - return a.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [b, c, d])) - }, ne: function (b, c, d) { - return a.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [b, c, d])) - }, nw: function (b, c, d) { - return a.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [b, c, d])) - }}, _propagate: function (b, c) { - a.ui.plugin.call(this, b, [c, this.ui()]), b != "resize" && this._trigger(b, c, this.ui()) - }, plugins: {}, ui: function () { - return{originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition} - }}), a.extend(a.ui.resizable, {version: "1.8.18"}), a.ui.plugin.add("resizable", "alsoResize", {start: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = function (b) { - a(b).each(function () { - var b = a(this); - b.data("resizable-alsoresize", {width: parseInt(b.width(), 10), height: parseInt(b.height(), 10), left: parseInt(b.css("left"), 10), top: parseInt(b.css("top"), 10)}) - }) - }; - typeof e.alsoResize == "object" && !e.alsoResize.parentNode ? e.alsoResize.length ? (e.alsoResize = e.alsoResize[0], f(e.alsoResize)) : a.each(e.alsoResize, function (a) { - f(a) - }) : f(e.alsoResize) - }, resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.originalSize, g = d.originalPosition, h = {height: d.size.height - f.height || 0, width: d.size.width - f.width || 0, top: d.position.top - g.top || 0, left: d.position.left - g.left || 0}, i = function (b, d) { - a(b).each(function () { - var b = a(this), e = a(this).data("resizable-alsoresize"), f = {}, g = d && d.length ? d : b.parents(c.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; - a.each(g, function (a, b) { - var c = (e[b] || 0) + (h[b] || 0); - c && c >= 0 && (f[b] = c || null) - }), b.css(f) - }) - }; - typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? a.each(e.alsoResize, function (a, b) { - i(a, b) - }) : i(e.alsoResize) - }, stop: function (b, c) { - a(this).removeData("resizable-alsoresize") - }}), a.ui.plugin.add("resizable", "animate", {stop: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d._proportionallyResizeElements, g = f.length && /textarea/i.test(f[0].nodeName), h = g && a.ui.hasScroll(f[0], "left") ? 0 : d.sizeDiff.height, i = g ? 0 : d.sizeDiff.width, j = {width: d.size.width - i, height: d.size.height - h}, k = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null, l = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null; - d.element.animate(a.extend(j, l && k ? {top: l, left: k} : {}), {duration: e.animateDuration, easing: e.animateEasing, step: function () { - var c = {width: parseInt(d.element.css("width"), 10), height: parseInt(d.element.css("height"), 10), top: parseInt(d.element.css("top"), 10), left: parseInt(d.element.css("left"), 10)}; - f && f.length && a(f[0]).css({width: c.width, height: c.height}), d._updateCache(c), d._propagate("resize", b) - }}) - }}), a.ui.plugin.add("resizable", "containment", {start: function (b, d) { - var e = a(this).data("resizable"), f = e.options, g = e.element, h = f.containment, i = h instanceof a ? h.get(0) : /parent/.test(h) ? g.parent().get(0) : h; - if (!!i) { - e.containerElement = a(i); - if (/document/.test(h) || h == document)e.containerOffset = {left: 0, top: 0}, e.containerPosition = {left: 0, top: 0}, e.parentData = {element: a(document), left: 0, top: 0, width: a(document).width(), height: a(document).height() || document.body.parentNode.scrollHeight}; else { - var j = a(i), k = []; - a(["Top", "Right", "Left", "Bottom"]).each(function (a, b) { - k[a] = c(j.css("padding" + b)) - }), e.containerOffset = j.offset(), e.containerPosition = j.position(), e.containerSize = {height: j.innerHeight() - k[3], width: j.innerWidth() - k[1]}; - var l = e.containerOffset, m = e.containerSize.height, n = e.containerSize.width, o = a.ui.hasScroll(i, "left") ? i.scrollWidth : n, p = a.ui.hasScroll(i) ? i.scrollHeight : m; - e.parentData = {element: i, left: l.left, top: l.top, width: o, height: p} - } - } - }, resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.containerSize, g = d.containerOffset, h = d.size, i = d.position, j = d._aspectRatio || b.shiftKey, k = {top: 0, left: 0}, l = d.containerElement; - l[0] != document && /static/.test(l.css("position")) && (k = g), i.left < (d._helper ? g.left : 0) && (d.size.width = d.size.width + (d._helper ? d.position.left - g.left : d.position.left - k.left), j && (d.size.height = d.size.width / e.aspectRatio), d.position.left = e.helper ? g.left : 0), i.top < (d._helper ? g.top : 0) && (d.size.height = d.size.height + (d._helper ? d.position.top - g.top : d.position.top), j && (d.size.width = d.size.height * e.aspectRatio), d.position.top = d._helper ? g.top : 0), d.offset.left = d.parentData.left + d.position.left, d.offset.top = d.parentData.top + d.position.top; - var m = Math.abs((d._helper ? d.offset.left - k.left : d.offset.left - k.left) + d.sizeDiff.width), n = Math.abs((d._helper ? d.offset.top - k.top : d.offset.top - g.top) + d.sizeDiff.height), o = d.containerElement.get(0) == d.element.parent().get(0), p = /relative|absolute/.test(d.containerElement.css("position")); - o && p && (m -= d.parentData.left), m + d.size.width >= d.parentData.width && (d.size.width = d.parentData.width - m, j && (d.size.height = d.size.width / d.aspectRatio)), n + d.size.height >= d.parentData.height && (d.size.height = d.parentData.height - n, j && (d.size.width = d.size.height * d.aspectRatio)) - }, stop: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.position, g = d.containerOffset, h = d.containerPosition, i = d.containerElement, j = a(d.helper), k = j.offset(), l = j.outerWidth() - d.sizeDiff.width, m = j.outerHeight() - d.sizeDiff.height; - d._helper && !e.animate && /relative/.test(i.css("position")) && a(this).css({left: k.left - h.left - g.left, width: l, height: m}), d._helper && !e.animate && /static/.test(i.css("position")) && a(this).css({left: k.left - h.left - g.left, width: l, height: m}) - }}), a.ui.plugin.add("resizable", "ghost", {start: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.size; - d.ghost = d.originalElement.clone(), d.ghost.css({opacity: .25, display: "block", position: "relative", height: f.height, width: f.width, margin: 0, left: 0, top: 0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost == "string" ? e.ghost : ""), d.ghost.appendTo(d.helper) - }, resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options; - d.ghost && d.ghost.css({position: "relative", height: d.size.height, width: d.size.width}) - }, stop: function (b, c) { - var d = a(this).data("resizable"), e = d.options; - d.ghost && d.helper && d.helper.get(0).removeChild(d.ghost.get(0)) - }}), a.ui.plugin.add("resizable", "grid", {resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.size, g = d.originalSize, h = d.originalPosition, i = d.axis, j = e._aspectRatio || b.shiftKey; - e.grid = typeof e.grid == "number" ? [e.grid, e.grid] : e.grid; - var k = Math.round((f.width - g.width) / (e.grid[0] || 1)) * (e.grid[0] || 1), l = Math.round((f.height - g.height) / (e.grid[1] || 1)) * (e.grid[1] || 1); - /^(se|s|e)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l) : /^(ne)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l) : /^(sw)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.left = h.left - k) : (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l, d.position.left = h.left - k) - }}); - var c = function (a) { - return parseInt(a, 10) || 0 - }, d = function (a) { - return!isNaN(parseInt(a, 10)) - } -}(jQuery), function (a, b) { - a.widget("ui.selectable", a.ui.mouse, {options: {appendTo: "body", autoRefresh: !0, distance: 0, filter: "*", tolerance: "touch"}, _create: function () { - var b = this; - this.element.addClass("ui-selectable"), this.dragged = !1; - var c; - this.refresh = function () { - c = a(b.options.filter, b.element[0]), c.addClass("ui-selectee"), c.each(function () { - var b = a(this), c = b.offset(); - a.data(this, "selectable-item", {element: this, $element: b, left: c.left, top: c.top, right: c.left + b.outerWidth(), bottom: c.top + b.outerHeight(), startselected: !1, selected: b.hasClass("ui-selected"), selecting: b.hasClass("ui-selecting"), unselecting: b.hasClass("ui-unselecting")}) - }) - }, this.refresh(), this.selectees = c.addClass("ui-selectee"), this._mouseInit(), this.helper = a("<div class='ui-selectable-helper'></div>") - }, destroy: function () { - this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"), this._mouseDestroy(); - return this - }, _mouseStart: function (b) { - var c = this; - this.opos = [b.pageX, b.pageY]; - if (!this.options.disabled) { - var d = this.options; - this.selectees = a(d.filter, this.element[0]), this._trigger("start", b), a(d.appendTo).append(this.helper), this.helper.css({left: b.clientX, top: b.clientY, width: 0, height: 0}), d.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { - var d = a.data(this, "selectable-item"); - d.startselected = !0, !b.metaKey && !b.ctrlKey && (d.$element.removeClass("ui-selected"), d.selected = !1, d.$element.addClass("ui-unselecting"), d.unselecting = !0, c._trigger("unselecting", b, {unselecting: d.element})) - }), a(b.target).parents().andSelf().each(function () { - var d = a.data(this, "selectable-item"); - if (d) { - var e = !b.metaKey && !b.ctrlKey || !d.$element.hasClass("ui-selected"); - d.$element.removeClass(e ? "ui-unselecting" : "ui-selected").addClass(e ? "ui-selecting" : "ui-unselecting"), d.unselecting = !e, d.selecting = e, d.selected = e, e ? c._trigger("selecting", b, {selecting: d.element}) : c._trigger("unselecting", b, {unselecting: d.element}); - return!1 - } - }) - } - }, _mouseDrag: function (b) { - var c = this; - this.dragged = !0; - if (!this.options.disabled) { - var d = this.options, e = this.opos[0], f = this.opos[1], g = b.pageX, h = b.pageY; - if (e > g) { - var i = g; - g = e, e = i - } - if (f > h) { - var i = h; - h = f, f = i - } - this.helper.css({left: e, top: f, width: g - e, height: h - f}), this.selectees.each(function () { - var i = a.data(this, "selectable-item"); - if (!!i && i.element != c.element[0]) { - var j = !1; - d.tolerance == "touch" ? j = !(i.left > g || i.right < e || i.top > h || i.bottom < f) : d.tolerance == "fit" && (j = i.left > e && i.right < g && i.top > f && i.bottom < h), j ? (i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, c._trigger("selecting", b, {selecting: i.element}))) : (i.selecting && ((b.metaKey || b.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), c._trigger("unselecting", b, {unselecting: i.element}))), i.selected && !b.metaKey && !b.ctrlKey && !i.startselected && (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, c._trigger("unselecting", b, {unselecting: i.element}))) - } - }); - return!1 - } - }, _mouseStop: function (b) { - var c = this; - this.dragged = !1; - var d = this.options; - a(".ui-unselecting", this.element[0]).each(function () { - var d = a.data(this, "selectable-item"); - d.$element.removeClass("ui-unselecting"), d.unselecting = !1, d.startselected = !1, c._trigger("unselected", b, {unselected: d.element}) - }), a(".ui-selecting", this.element[0]).each(function () { - var d = a.data(this, "selectable-item"); - d.$element.removeClass("ui-selecting").addClass("ui-selected"), d.selecting = !1, d.selected = !0, d.startselected = !0, c._trigger("selected", b, {selected: d.element}) - }), this._trigger("stop", b), this.helper.remove(); - return!1 - }}), a.extend(a.ui.selectable, {version: "1.8.18"}) -}(jQuery), function (a, b) { - a.widget("ui.sortable", a.ui.mouse, {widgetEventPrefix: "sort", ready: !1, options: {appendTo: "parent", axis: !1, connectWith: !1, containment: !1, cursor: "auto", cursorAt: !1, dropOnEmpty: !0, forcePlaceholderSize: !1, forceHelperSize: !1, grid: !1, handle: !1, helper: "original", items: "> *", opacity: !1, placeholder: !1, revert: !1, scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1e3}, _create: function () { - var a = this.options; - this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.floating = this.items.length ? a.axis === "x" || /left|right/.test(this.items[0].item.css("float")) || /inline|table-cell/.test(this.items[0].item.css("display")) : !1, this.offset = this.element.offset(), this._mouseInit(), this.ready = !0 - }, destroy: function () { - a.Widget.prototype.destroy.call(this), this.element.removeClass("ui-sortable ui-sortable-disabled"), this._mouseDestroy(); - for (var b = this.items.length - 1; b >= 0; b--)this.items[b].item.removeData(this.widgetName + "-item"); - return this - }, _setOption: function (b, c) { - b === "disabled" ? (this.options[b] = c, this.widget()[c ? "addClass" : "removeClass"]("ui-sortable-disabled")) : a.Widget.prototype._setOption.apply(this, arguments) - }, _mouseCapture: function (b, c) { - var d = this; - if (this.reverting)return!1; - if (this.options.disabled || this.options.type == "static")return!1; - this._refreshItems(b); - var e = null, f = this, g = a(b.target).parents().each(function () { - if (a.data(this, d.widgetName + "-item") == f) { - e = a(this); - return!1 - } - }); - a.data(b.target, d.widgetName + "-item") == f && (e = a(b.target)); - if (!e)return!1; - if (this.options.handle && !c) { - var h = !1; - a(this.options.handle, e).find("*").andSelf().each(function () { - this == b.target && (h = !0) - }); - if (!h)return!1 - } - this.currentItem = e, this._removeCurrentsFromItems(); - return!0 - }, _mouseStart: function (b, c, d) { - var e = this.options, f = this; - this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(b), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left}, this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), a.extend(this.offset, {click: {left: b.pageX - this.offset.left, top: b.pageY - this.offset.top}, parent: this._getParentOffset(), relative: this._getRelativeOffset()}), this.originalPosition = this._generatePosition(b), this.originalPageX = b.pageX, this.originalPageY = b.pageY, e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt), this.domPosition = {prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0]}, this.helper[0] != this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), e.containment && this._setContainment(), e.cursor && (a("body").css("cursor") && (this._storedCursor = a("body").css("cursor")), a("body").css("cursor", e.cursor)), e.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", e.opacity)), e.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", e.zIndex)), this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", b, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(); - if (!d)for (var g = this.containers.length - 1; g >= 0; g--)this.containers[g]._trigger("activate", b, f._uiHash(this)); - a.ui.ddmanager && (a.ui.ddmanager.current = this), a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this.dragging = !0, this.helper.addClass("ui-sortable-helper"), this._mouseDrag(b); - return!0 - }, _mouseDrag: function (b) { - this.position = this._generatePosition(b), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs); - if (this.options.scroll) { - var c = this.options, d = !1; - this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - b.pageY < c.scrollSensitivity ? this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop + c.scrollSpeed : b.pageY - this.overflowOffset.top < c.scrollSensitivity && (this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop - c.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - b.pageX < c.scrollSensitivity ? this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft + c.scrollSpeed : b.pageX - this.overflowOffset.left < c.scrollSensitivity && (this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft - c.scrollSpeed)) : (b.pageY - a(document).scrollTop() < c.scrollSensitivity ? d = a(document).scrollTop(a(document).scrollTop() - c.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < c.scrollSensitivity && (d = a(document).scrollTop(a(document).scrollTop() + c.scrollSpeed)), b.pageX - a(document).scrollLeft() < c.scrollSensitivity ? d = a(document).scrollLeft(a(document).scrollLeft() - c.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < c.scrollSensitivity && (d = a(document).scrollLeft(a(document).scrollLeft() + c.scrollSpeed))), d !== !1 && a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b) - } - this.positionAbs = this._convertPositionTo("absolute"); - if (!this.options.axis || this.options.axis != "y")this.helper[0].style.left = this.position.left + "px"; - if (!this.options.axis || this.options.axis != "x")this.helper[0].style.top = this.position.top + "px"; - for (var e = this.items.length - 1; e >= 0; e--) { - var f = this.items[e], g = f.item[0], h = this._intersectsWithPointer(f); - if (!h)continue; - if (g != this.currentItem[0] && this.placeholder[h == 1 ? "next" : "prev"]()[0] != g && !a.ui.contains(this.placeholder[0], g) && (this.options.type == "semi-dynamic" ? !a.ui.contains(this.element[0], g) : !0)) { - this.direction = h == 1 ? "down" : "up"; - if (this.options.tolerance == "pointer" || this._intersectsWithSides(f))this._rearrange(b, f); else break; - this._trigger("change", b, this._uiHash()); - break - } - } - this._contactContainers(b), a.ui.ddmanager && a.ui.ddmanager.drag(this, b), this._trigger("sort", b, this._uiHash()), this.lastPositionAbs = this.positionAbs; - return!1 - }, _mouseStop: function (b, c) { - if (!!b) { - a.ui.ddmanager && !this.options.dropBehaviour && a.ui.ddmanager.drop(this, b); - if (this.options.revert) { - var d = this, e = d.placeholder.offset(); - d.reverting = !0, a(this.helper).animate({left: e.left - this.offset.parent.left - d.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), top: e.top - this.offset.parent.top - d.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)}, parseInt(this.options.revert, 10) || 500, function () { - d._clear(b) - }) - } else this._clear(b, c); - return!1 - } - }, cancel: function () { - var b = this; - if (this.dragging) { - this._mouseUp({target: null}), this.options.helper == "original" ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show(); - for (var c = this.containers.length - 1; c >= 0; c--)this.containers[c]._trigger("deactivate", null, b._uiHash(this)), this.containers[c].containerCache.over && (this.containers[c]._trigger("out", null, b._uiHash(this)), this.containers[c].containerCache.over = 0) - } - this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.options.helper != "original" && this.helper && this.helper[0].parentNode && this.helper.remove(), a.extend(this, {helper: null, dragging: !1, reverting: !1, _noFinalSort: null}), this.domPosition.prev ? a(this.domPosition.prev).after(this.currentItem) : a(this.domPosition.parent).prepend(this.currentItem)); - return this - }, serialize: function (b) { - var c = this._getItemsAsjQuery(b && b.connected), d = []; - b = b || {}, a(c).each(function () { - var c = (a(b.item || this).attr(b.attribute || "id") || "").match(b.expression || /(.+)[-=_](.+)/); - c && d.push((b.key || c[1] + "[]") + "=" + (b.key && b.expression ? c[1] : c[2])) - }), !d.length && b.key && d.push(b.key + "="); - return d.join("&") - }, toArray: function (b) { - var c = this._getItemsAsjQuery(b && b.connected), d = []; - b = b || {}, c.each(function () { - d.push(a(b.item || this).attr(b.attribute || "id") || "") - }); - return d - }, _intersectsWith: function (a) { - var b = this.positionAbs.left, c = b + this.helperProportions.width, d = this.positionAbs.top, e = d + this.helperProportions.height, f = a.left, g = f + a.width, h = a.top, i = h + a.height, j = this.offset.click.top, k = this.offset.click.left, l = d + j > h && d + j < i && b + k > f && b + k < g; - return this.options.tolerance == "pointer" || this.options.forcePointerForContainers || this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > a[this.floating ? "width" : "height"] ? l : f < b + this.helperProportions.width / 2 && c - this.helperProportions.width / 2 < g && h < d + this.helperProportions.height / 2 && e - this.helperProportions.height / 2 < i - }, _intersectsWithPointer: function (b) { - var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top, b.height), d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left, b.width), e = c && d, f = this._getDragVerticalDirection(), g = this._getDragHorizontalDirection(); - if (!e)return!1; - return this.floating ? g && g == "right" || f == "down" ? 2 : 1 : f && (f == "down" ? 2 : 1) - }, _intersectsWithSides: function (b) { - var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top + b.height / 2, b.height), d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left + b.width / 2, b.width), e = this._getDragVerticalDirection(), f = this._getDragHorizontalDirection(); - return this.floating && f ? f == "right" && d || f == "left" && !d : e && (e == "down" && c || e == "up" && !c) - }, _getDragVerticalDirection: function () { - var a = this.positionAbs.top - this.lastPositionAbs.top; - return a != 0 && (a > 0 ? "down" : "up") - }, _getDragHorizontalDirection: function () { - var a = this.positionAbs.left - this.lastPositionAbs.left; - return a != 0 && (a > 0 ? "right" : "left") - }, refresh: function (a) { - this._refreshItems(a), this.refreshPositions(); - return this - }, _connectWith: function () { - var a = this.options; - return a.connectWith.constructor == String ? [a.connectWith] : a.connectWith - }, _getItemsAsjQuery: function (b) { - var c = this, d = [], e = [], f = this._connectWith(); - if (f && b)for (var g = f.length - 1; g >= 0; g--) { - var h = a(f[g]); - for (var i = h.length - 1; i >= 0; i--) { - var j = a.data(h[i], this.widgetName); - j && j != this && !j.options.disabled && e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element) : a(j.options.items, j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), j]) - } - } - e.push - ([a.isFunction(this.options.items) ? this.options.items.call(this.element, null, {options: this.options, item: this.currentItem}) : a(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - for (var g = e.length - 1; g >= 0; g--)e[g][0].each(function () { - d.push(this) - }); - return a(d) - }, _removeCurrentsFromItems: function () { - var a = this.currentItem.find(":data(" + this.widgetName + "-item)"); - for (var b = 0; b < this.items.length; b++)for (var c = 0; c < a.length; c++)a[c] == this.items[b].item[0] && this.items.splice(b, 1) - }, _refreshItems: function (b) { - this.items = [], this.containers = [this]; - var c = this.items, d = this, e = [ - [a.isFunction(this.options.items) ? this.options.items.call(this.element[0], b, {item: this.currentItem}) : a(this.options.items, this.element), this] - ], f = this._connectWith(); - if (f && this.ready)for (var g = f.length - 1; g >= 0; g--) { - var h = a(f[g]); - for (var i = h.length - 1; i >= 0; i--) { - var j = a.data(h[i], this.widgetName); - j && j != this && !j.options.disabled && (e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element[0], b, {item: this.currentItem}) : a(j.options.items, j.element), j]), this.containers.push(j)) - } - } - for (var g = e.length - 1; g >= 0; g--) { - var k = e[g][1], l = e[g][0]; - for (var i = 0, m = l.length; i < m; i++) { - var n = a(l[i]); - n.data(this.widgetName + "-item", k), c.push({item: n, instance: k, width: 0, height: 0, left: 0, top: 0}) - } - } - }, refreshPositions: function (b) { - this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); - for (var c = this.items.length - 1; c >= 0; c--) { - var d = this.items[c]; - if (d.instance != this.currentContainer && this.currentContainer && d.item[0] != this.currentItem[0])continue; - var e = this.options.toleranceElement ? a(this.options.toleranceElement, d.item) : d.item; - b || (d.width = e.outerWidth(), d.height = e.outerHeight()); - var f = e.offset(); - d.left = f.left, d.top = f.top - } - if (this.options.custom && this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this); else for (var c = this.containers.length - 1; c >= 0; c--) { - var f = this.containers[c].element.offset(); - this.containers[c].containerCache.left = f.left, this.containers[c].containerCache.top = f.top, this.containers[c].containerCache.width = this.containers[c].element.outerWidth(), this.containers[c].containerCache.height = this.containers[c].element.outerHeight() - } - return this - }, _createPlaceholder: function (b) { - var c = b || this, d = c.options; - if (!d.placeholder || d.placeholder.constructor == String) { - var e = d.placeholder; - d.placeholder = {element: function () { - var b = a(document.createElement(c.currentItem[0].nodeName)).addClass(e || c.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; - e || (b.style.visibility = "hidden"); - return b - }, update: function (a, b) { - if (!e || !!d.forcePlaceholderSize)b.height() || b.height(c.currentItem.innerHeight() - parseInt(c.currentItem.css("paddingTop") || 0, 10) - parseInt(c.currentItem.css("paddingBottom") || 0, 10)), b.width() || b.width(c.currentItem.innerWidth() - parseInt(c.currentItem.css("paddingLeft") || 0, 10) - parseInt(c.currentItem.css("paddingRight") || 0, 10)) - }} - } - c.placeholder = a(d.placeholder.element.call(c.element, c.currentItem)), c.currentItem.after(c.placeholder), d.placeholder.update(c, c.placeholder) - }, _contactContainers: function (b) { - var c = null, d = null; - for (var e = this.containers.length - 1; e >= 0; e--) { - if (a.ui.contains(this.currentItem[0], this.containers[e].element[0]))continue; - if (this._intersectsWith(this.containers[e].containerCache)) { - if (c && a.ui.contains(this.containers[e].element[0], c.element[0]))continue; - c = this.containers[e], d = e - } else this.containers[e].containerCache.over && (this.containers[e]._trigger("out", b, this._uiHash(this)), this.containers[e].containerCache.over = 0) - } - if (!!c)if (this.containers.length === 1)this.containers[d]._trigger("over", b, this._uiHash(this)), this.containers[d].containerCache.over = 1; else if (this.currentContainer != this.containers[d]) { - var f = 1e4, g = null, h = this.positionAbs[this.containers[d].floating ? "left" : "top"]; - for (var i = this.items.length - 1; i >= 0; i--) { - if (!a.ui.contains(this.containers[d].element[0], this.items[i].item[0]))continue; - var j = this.items[i][this.containers[d].floating ? "left" : "top"]; - Math.abs(j - h) < f && (f = Math.abs(j - h), g = this.items[i]) - } - if (!g && !this.options.dropOnEmpty)return; - this.currentContainer = this.containers[d], g ? this._rearrange(b, g, null, !0) : this._rearrange(b, null, this.containers[d].element, !0), this._trigger("change", b, this._uiHash()), this.containers[d]._trigger("change", b, this._uiHash(this)), this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[d]._trigger("over", b, this._uiHash(this)), this.containers[d].containerCache.over = 1 - } - }, _createHelper: function (b) { - var c = this.options, d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b, this.currentItem])) : c.helper == "clone" ? this.currentItem.clone() : this.currentItem; - d.parents("body").length || a(c.appendTo != "parent" ? c.appendTo : this.currentItem[0].parentNode)[0].appendChild(d[0]), d[0] == this.currentItem[0] && (this._storedCSS = {width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left")}), (d[0].style.width == "" || c.forceHelperSize) && d.width(this.currentItem.width()), (d[0].style.height == "" || c.forceHelperSize) && d.height(this.currentItem.height()); - return d - }, _adjustOffsetFromHelper: function (b) { - typeof b == "string" && (b = b.split(" ")), a.isArray(b) && (b = {left: +b[0], top: +b[1] || 0}), "left"in b && (this.offset.click.left = b.left + this.margins.left), "right"in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), "top"in b && (this.offset.click.top = b.top + this.margins.top), "bottom"in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top) - }, _getParentOffset: function () { - this.offsetParent = this.helper.offsetParent(); - var b = this.offsetParent.offset(); - this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()); - if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie)b = {top: 0, left: 0}; - return{top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} - }, _getRelativeOffset: function () { - if (this.cssPosition == "relative") { - var a = this.currentItem.position(); - return{top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} - } - return{top: 0, left: 0} - }, _cacheMargins: function () { - this.margins = {left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, top: parseInt(this.currentItem.css("marginTop"), 10) || 0} - }, _cacheHelperProportions: function () { - this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()} - }, _setContainment: function () { - var b = this.options; - b.containment == "parent" && (b.containment = this.helper[0].parentNode); - if (b.containment == "document" || b.containment == "window")this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, a(b.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (a(b.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; - if (!/^(document|window|parent)$/.test(b.containment)) { - var c = a(b.containment)[0], d = a(b.containment).offset(), e = a(c).css("overflow") != "hidden"; - this.containment = [d.left + (parseInt(a(c).css("borderLeftWidth"), 10) || 0) + (parseInt(a(c).css("paddingLeft"), 10) || 0) - this.margins.left, d.top + (parseInt(a(c).css("borderTopWidth"), 10) || 0) + (parseInt(a(c).css("paddingTop"), 10) || 0) - this.margins.top, d.left + (e ? Math.max(c.scrollWidth, c.offsetWidth) : c.offsetWidth) - (parseInt(a(c).css("borderLeftWidth"), 10) || 0) - (parseInt(a(c).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, d.top + (e ? Math.max(c.scrollHeight, c.offsetHeight) : c.offsetHeight) - (parseInt(a(c).css("borderTopWidth"), 10) || 0) - (parseInt(a(c).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] - } - }, _convertPositionTo: function (b, c) { - c || (c = this.position); - var d = b == "absolute" ? 1 : -1, e = this.options, f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, g = /(html|body)/i.test(f[0].tagName); - return{top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d), left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d)} - }, _generatePosition: function (b) { - var c = this.options, d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(d[0].tagName); - this.cssPosition == "relative" && (this.scrollParent[0] == document || this.scrollParent[0] == this.offsetParent[0]) && (this.offset.relative = this._getRelativeOffset()); - var f = b.pageX, g = b.pageY; - if (this.originalPosition) { - this.containment && (b.pageX - this.offset.click.left < this.containment[0] && (f = this.containment[0] + this.offset.click.left), b.pageY - this.offset.click.top < this.containment[1] && (g = this.containment[1] + this.offset.click.top), b.pageX - this.offset.click.left > this.containment[2] && (f = this.containment[2] + this.offset.click.left), b.pageY - this.offset.click.top > this.containment[3] && (g = this.containment[3] + this.offset.click.top)); - if (c.grid) { - var h = this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1]; - g = this.containment ? h - this.offset.click.top < this.containment[1] || h - this.offset.click.top > this.containment[3] ? h - this.offset.click.top < this.containment[1] ? h + c.grid[1] : h - c.grid[1] : h : h; - var i = this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0]; - f = this.containment ? i - this.offset.click.left < this.containment[0] || i - this.offset.click.left > this.containment[2] ? i - this.offset.click.left < this.containment[0] ? i + c.grid[0] : i - c.grid[0] : i : i - } - } - return{top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()), left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft())} - }, _rearrange: function (a, b, c, d) { - c ? c[0].appendChild(this.placeholder[0]) : b.item[0].parentNode.insertBefore(this.placeholder[0], this.direction == "down" ? b.item[0] : b.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1; - var e = this, f = this.counter; - window.setTimeout(function () { - f == e.counter && e.refreshPositions(!d) - }, 0) - }, _clear: function (b, c) { - this.reverting = !1; - var d = [], e = this; - !this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null; - if (this.helper[0] == this.currentItem[0]) { - for (var f in this._storedCSS)if (this._storedCSS[f] == "auto" || this._storedCSS[f] == "static")this._storedCSS[f] = ""; - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") - } else this.currentItem.show(); - this.fromOutside && !c && d.push(function (a) { - this._trigger("receive", a, this._uiHash(this.fromOutside)) - }), (this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !c && d.push(function (a) { - this._trigger("update", a, this._uiHash()) - }); - if (!a.ui.contains(this.element[0], this.currentItem[0])) { - c || d.push(function (a) { - this._trigger("remove", a, this._uiHash()) - }); - for (var f = this.containers.length - 1; f >= 0; f--)a.ui.contains(this.containers[f].element[0], this.currentItem[0]) && !c && (d.push(function (a) { - return function (b) { - a._trigger("receive", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), d.push(function (a) { - return function (b) { - a._trigger("update", b, this._uiHash(this)) - } - }.call(this, this.containers[f]))) - } - for (var f = this.containers.length - 1; f >= 0; f--)c || d.push(function (a) { - return function (b) { - a._trigger("deactivate", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), this.containers[f].containerCache.over && (d.push(function (a) { - return function (b) { - a._trigger("out", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), this.containers[f].containerCache.over = 0); - this._storedCursor && a("body").css("cursor", this._storedCursor), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex), this.dragging = !1; - if (this.cancelHelperRemoval) { - if (!c) { - this._trigger("beforeStop", b, this._uiHash()); - for (var f = 0; f < d.length; f++)d[f].call(this, b); - this._trigger("stop", b, this._uiHash()) - } - return!1 - } - c || this._trigger("beforeStop", b, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.helper[0] != this.currentItem[0] && this.helper.remove(), this.helper = null; - if (!c) { - for (var f = 0; f < d.length; f++)d[f].call(this, b); - this._trigger("stop", b, this._uiHash()) - } - this.fromOutside = !1; - return!0 - }, _trigger: function () { - a.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() - }, _uiHash: function (b) { - var c = b || this; - return{helper: c.helper, placeholder: c.placeholder || a([]), position: c.position, originalPosition: c.originalPosition, offset: c.positionAbs, item: c.currentItem, sender: b ? b.element : null} - }}), a.extend(a.ui.sortable, {version: "1.8.18"}) -}(jQuery), jQuery.effects || function (a, b) { - function l(b) { - if (!b || typeof b == "number" || a.fx.speeds[b])return!0; - if (typeof b == "string" && !a.effects[b])return!0; - return!1 - } - - function k(b, c, d, e) { - typeof b == "object" && (e = c, d = null, c = b, b = c.effect), a.isFunction(c) && (e = c, d = null, c = {}); - if (typeof c == "number" || a.fx.speeds[c])e = d, d = c, c = {}; - a.isFunction(d) && (e = d, d = null), c = c || {}, d = d || c.duration, d = a.fx.off ? 0 : typeof d == "number" ? d : d in a.fx.speeds ? a.fx.speeds[d] : a.fx.speeds._default, e = e || c.complete; - return[b, c, d, e] - } - - function j(a, b) { - var c = {_: 0}, d; - for (d in b)a[d] != b[d] && (c[d] = b[d]); - return c - } - - function i(b) { - var c, d; - for (c in b)d = b[c], (d == null || a.isFunction(d) || c in g || /scrollbar/.test(c) || !/color/i.test(c) && isNaN(parseFloat(d))) && delete b[c]; - return b - } - - function h() { - var a = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle, b = {}, c, d; - if (a && a.length && a[0] && a[a[0]]) { - var e = a.length; - while (e--)c = a[e], typeof a[c] == "string" && (d = c.replace(/\-(\w)/g, function (a, b) { - return b.toUpperCase() - }), b[d] = a[c]) - } else for (c in a)typeof a[c] == "string" && (b[c] = a[c]); - return b - } - - function d(b, d) { - var e; - do { - e = a.curCSS(b, d); - if (e != "" && e != "transparent" || a.nodeName(b, "body"))break; - d = "backgroundColor" - } while (b = b.parentNode); - return c(e) - } - - function c(b) { - var c; - if (b && b.constructor == Array && b.length == 3)return b; - if (c = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))return[parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10)]; - if (c = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))return[parseFloat(c[1]) * 2.55, parseFloat(c[2]) * 2.55, parseFloat(c[3]) * 2.55]; - if (c = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))return[parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16)]; - if (c = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))return[parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16)]; - if (c = /rgba\(0, 0, 0, 0\)/.exec(b))return e.transparent; - return e[a.trim(b).toLowerCase()] - } - - a.effects = {}, a.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderColor", "color", "outlineColor"], function (b, e) { - a.fx.step[e] = function (a) { - a.colorInit || (a.start = d(a.elem, e), a.end = c(a.end), a.colorInit = !0), a.elem.style[e] = "rgb(" + Math.max(Math.min(parseInt(a.pos * (a.end[0] - a.start[0]) + a.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt(a.pos * (a.end[1] - a.start[1]) + a.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt(a.pos * (a.end[2] - a.start[2]) + a.start[2], 10), 255), 0) + ")" - } - }); - var e = {aqua: [0, 255, 255], azure: [240, 255, 255], beige: [245, 245, 220], black: [0, 0, 0], blue: [0, 0, 255], brown: [165, 42, 42], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkviolet: [148, 0, 211], fuchsia: [255, 0, 255], gold: [255, 215, 0], green: [0, 128, 0], indigo: [75, 0, 130], khaki: [240, 230, 140], lightblue: [173, 216, 230], lightcyan: [224, 255, 255], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightyellow: [255, 255, 224], lime: [0, 255, 0], magenta: [255, 0, 255], maroon: [128, 0, 0], navy: [0, 0, 128], olive: [128, 128, 0], orange: [255, 165, 0], pink: [255, 192, 203], purple: [128, 0, 128], violet: [128, 0, 128], red: [255, 0, 0], silver: [192, 192, 192], white: [255, 255, 255], yellow: [255, 255, 0], transparent: [255, 255, 255]}, f = ["add", "remove", "toggle"], g = {border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1}; - a.effects.animateClass = function (b, c, d, e) { - a.isFunction(d) && (e = d, d = null); - return this.queue(function () { - var g = a(this), k = g.attr("style") || " ", l = i(h.call(this)), m, n = g.attr("class"); - a.each(f, function (a, c) { - b[c] && g[c + "Class"](b[c]) - }), m = i(h.call(this)), g.attr("class", n), g.animate(j(l, m), {queue: !1, duration: c, easing: d, complete: function () { - a.each(f, function (a, c) { - b[c] && g[c + "Class"](b[c]) - }), typeof g.attr("style") == "object" ? (g.attr("style").cssText = "", g.attr("style").cssText = k) : g.attr("style", k), e && e.apply(this, arguments), a.dequeue(this) - }}) - }) - }, a.fn.extend({_addClass: a.fn.addClass, addClass: function (b, c, d, e) { - return c ? a.effects.animateClass.apply(this, [ - {add: b}, - c, - d, - e - ]) : this._addClass(b) - }, _removeClass: a.fn.removeClass, removeClass: function (b, c, d, e) { - return c ? a.effects.animateClass.apply(this, [ - {remove: b}, - c, - d, - e - ]) : this._removeClass(b) - }, _toggleClass: a.fn.toggleClass, toggleClass: function (c, d, e, f, g) { - return typeof d == "boolean" || d === b ? e ? a.effects.animateClass.apply(this, [d ? {add: c} : {remove: c}, e, f, g]) : this._toggleClass(c, d) : a.effects.animateClass.apply(this, [ - {toggle: c}, - d, - e, - f - ]) - }, switchClass: function (b, c, d, e, f) { - return a.effects.animateClass.apply(this, [ - {add: c, remove: b}, - d, - e, - f - ]) - }}), a.extend(a.effects, {version: "1.8.18", save: function (a, b) { - for (var c = 0; c < b.length; c++)b[c] !== null && a.data("ec.storage." + b[c], a[0].style[b[c]]) - }, restore: function (a, b) { - for (var c = 0; c < b.length; c++)b[c] !== null && a.css(b[c], a.data("ec.storage." + b[c])) - }, setMode: function (a, b) { - b == "toggle" && (b = a.is(":hidden") ? "show" : "hide"); - return b - }, getBaseline: function (a, b) { - var c, d; - switch (a[0]) { - case"top": - c = 0; - break; - case"middle": - c = .5; - break; - case"bottom": - c = 1; - break; - default: - c = a[0] / b.height - } - switch (a[1]) { - case"left": - d = 0; - break; - case"center": - d = .5; - break; - case"right": - d = 1; - break; - default: - d = a[1] / b.width - } - return{x: d, y: c} - }, createWrapper: function (b) { - if (b.parent().is(".ui-effects-wrapper"))return b.parent(); - var c = {width: b.outerWidth(!0), height: b.outerHeight(!0), "float": b.css("float")}, d = a("<div></div>").addClass("ui-effects-wrapper").css({fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0}), e = document.activeElement; - b.wrap(d), (b[0] === e || a.contains(b[0], e)) && a(e).focus(), d = b.parent(), b.css("position") == "static" ? (d.css({position: "relative"}), b.css({position: "relative"})) : (a.extend(c, {position: b.css("position"), zIndex: b.css("z-index")}), a.each(["top", "left", "bottom", "right"], function (a, d) { - c[d] = b.css(d), isNaN(parseInt(c[d], 10)) && (c[d] = "auto") - }), b.css({position: "relative", top: 0, left: 0, right: "auto", bottom: "auto"})); - return d.css(c).show() - }, removeWrapper: function (b) { - var c, d = document.activeElement; - if (b.parent().is(".ui-effects-wrapper")) { - c = b.parent().replaceWith(b), (b[0] === d || a.contains(b[0], d)) && a(d).focus(); - return c - } - return b - }, setTransition: function (b, c, d, e) { - e = e || {}, a.each(c, function (a, c) { - unit = b.cssUnit(c), unit[0] > 0 && (e[c] = unit[0] * d + unit[1]) - }); - return e - }}), a.fn.extend({effect: function (b, c, d, e) { - var f = k.apply(this, arguments), g = {options: f[1], duration: f[2], callback: f[3]}, h = g.options.mode, i = a.effects[b]; - if (a.fx.off || !i)return h ? this[h](g.duration, g.callback) : this.each(function () { - g.callback && g.callback.call(this) - }); - return i.call(this, g) - }, _show: a.fn.show, show: function (a) { - if (l(a))return this._show.apply(this, arguments); - var b = k.apply(this, arguments); - b[1].mode = "show"; - return this.effect.apply(this, b) - }, _hide: a.fn.hide, hide: function (a) { - if (l(a))return this._hide.apply(this, arguments); - var b = k.apply(this, arguments); - b[1].mode = "hide"; - return this.effect.apply(this, b) - }, __toggle: a.fn.toggle, toggle: function (b) { - if (l(b) || typeof b == "boolean" || a.isFunction(b))return this.__toggle.apply(this, arguments); - var c = k.apply(this, arguments); - c[1].mode = "toggle"; - return this.effect.apply(this, c) - }, cssUnit: function (b) { - var c = this.css(b), d = []; - a.each(["em", "px", "%", "pt"], function (a, b) { - c.indexOf(b) > 0 && (d = [parseFloat(c), b]) - }); - return d - }}), a.easing.jswing = a.easing.swing, a.extend(a.easing, {def: "easeOutQuad", swing: function (b, c, d, e, f) { - return a.easing[a.easing.def](b, c, d, e, f) - }, easeInQuad: function (a, b, c, d, e) { - return d * (b /= e) * b + c - }, easeOutQuad: function (a, b, c, d, e) { - return-d * (b /= e) * (b - 2) + c - }, easeInOutQuad: function (a, b, c, d, e) { - if ((b /= e / 2) < 1)return d / 2 * b * b + c; - return-d / 2 * (--b * (b - 2) - 1) + c - }, easeInCubic: function (a, b, c, d, e) { - return d * (b /= e) * b * b + c - }, easeOutCubic: function (a, b, c, d, e) { - return d * ((b = b / e - 1) * b * b + 1) + c - }, easeInOutCubic: function (a, b, c, d, e) { - if ((b /= e / 2) < 1)return d / 2 * b * b * b + c; - return d / 2 * ((b -= 2) * b * b + 2) + c - }, easeInQuart: function (a, b, c, d, e) { - return d * (b /= e) * b * b * b + c - }, easeOutQuart: function (a, b, c, d, e) { - return-d * ((b = b / e - 1) * b * b * b - 1) + c - }, easeInOutQuart: function (a, b, c, d, e) { - if ((b /= e / 2) < 1)return d / 2 * b * b * b * b + c; - return-d / 2 * ((b -= 2) * b * b * b - 2) + c - }, easeInQuint: function (a, b, c, d, e) { - return d * (b /= e) * b * b * b * b + c - }, easeOutQuint: function (a, b, c, d, e) { - return d * ((b = b / e - 1) * b * b * b * b + 1) + c - }, easeInOutQuint: function (a, b, c, d, e) { - if ((b /= e / 2) < 1)return d / 2 * b * b * b * b * b + c; - return d / 2 * ((b -= 2) * b * b * b * b + 2) + c - }, easeInSine: function (a, b, c, d, e) { - return-d * Math.cos(b / e * (Math.PI / 2)) + d + c - }, easeOutSine: function (a, b, c, d, e) { - return d * Math.sin(b / e * (Math.PI / 2)) + c - }, easeInOutSine: function (a, b, c, d, e) { - return-d / 2 * (Math.cos(Math.PI * b / e) - 1) + c - }, easeInExpo: function (a, b, c, d, e) { - return b == 0 ? c : d * Math.pow(2, 10 * (b / e - 1)) + c - }, easeOutExpo: function (a, b, c, d, e) { - return b == e ? c + d : d * (-Math.pow(2, -10 * b / e) + 1) + c - }, easeInOutExpo: function (a, b, c, d, e) { - if (b == 0)return c; - if (b == e)return c + d; - if ((b /= e / 2) < 1)return d / 2 * Math.pow(2, 10 * (b - 1)) + c; - return d / 2 * (-Math.pow(2, -10 * --b) + 2) + c - }, easeInCirc: function (a, b, c, d, e) { - return-d * (Math.sqrt(1 - (b /= e) * b) - 1) + c - }, easeOutCirc: function (a, b, c, d, e) { - return d * Math.sqrt(1 - (b = b / e - 1) * b) + c - }, easeInOutCirc: function (a, b, c, d, e) { - if ((b /= e / 2) < 1)return-d / 2 * (Math.sqrt(1 - b * b) - 1) + c; - return d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c - }, easeInElastic: function (a, b, c, d, e) { - var f = 1.70158, g = 0, h = d; - if (b == 0)return c; - if ((b /= e) == 1)return c + d; - g || (g = e * .3); - if (h < Math.abs(d)) { - h = d; - var f = g / 4 - } else var f = g / (2 * Math.PI) * Math.asin(d / h); - return-(h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g)) + c - }, easeOutElastic: function (a, b, c, d, e) { - var f = 1.70158, g = 0, h = d; - if (b == 0)return c; - if ((b /= e) == 1)return c + d; - g || (g = e * .3); - if (h < Math.abs(d)) { - h = d; - var f = g / 4 - } else var f = g / (2 * Math.PI) * Math.asin(d / h); - return h * Math.pow(2, -10 * b) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c - }, easeInOutElastic: function (a, b, c, d, e) { - var f = 1.70158, g = 0, h = d; - if (b == 0)return c; - if ((b /= e / 2) == 2)return c + d; - g || (g = e * .3 * 1.5); - if (h < Math.abs(d)) { - h = d; - var f = g / 4 - } else var f = g / (2 * Math.PI) * Math.asin(d / h); - if (b < 1)return-0.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + c; - return h * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) * .5 + d + c - }, easeInBack: function (a, c, d, e, f, g) { - g == b && (g = 1.70158); - return e * (c /= f) * c * ((g + 1) * c - g) + d - }, easeOutBack: function (a, c, d, e, f, g) { - g == b && (g = 1.70158); - return e * ((c = c / f - 1) * c * ((g + 1) * c + g) + 1) + d - }, easeInOutBack: function (a, c, d, e, f, g) { - g == b && (g = 1.70158); - if ((c /= f / 2) < 1)return e / 2 * c * c * (((g *= 1.525) + 1) * c - g) + d; - return e / 2 * ((c -= 2) * c * (((g *= 1.525) + 1) * c + g) + 2) + d - }, easeInBounce: function (b, c, d, e, f) { - return e - a.easing.easeOutBounce(b, f - c, 0, e, f) + d - }, easeOutBounce: function (a, b, c, d, e) { - return(b /= e) < 1 / 2.75 ? d * 7.5625 * b * b + c : b < 2 / 2.75 ? d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c : b < 2.5 / 2.75 ? d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c : d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c - }, easeInOutBounce: function (b, c, d, e, f) { - if (c < f / 2)return a.easing.easeInBounce(b, c * 2, 0, e, f) * .5 + d; - return a.easing.easeOutBounce(b, c * 2 - f, 0, e, f) * .5 + e * .5 + d - }}) -}(jQuery), function (a, b) { - a.effects.blind = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right"], e = a.effects.setMode(c, b.options.mode || "hide"), f = b.options.direction || "vertical"; - a.effects.save(c, d), c.show(); - var g = a.effects.createWrapper(c).css({overflow: "hidden"}), h = f == "vertical" ? "height" : "width", i = f == "vertical" ? g.height() : g.width(); - e == "show" && g.css(h, 0); - var j = {}; - j[h] = e == "show" ? i : 0, g.animate(j, b.duration, b.options.easing, function () { - e == "hide" && c.hide(), a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(c[0], arguments), c.dequeue() - }) - }) - } -}(jQuery), function (a, b) { - a.effects.bounce = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right"], e = a.effects.setMode(c, b.options.mode || "effect"), f = b.options.direction || "up", g = b.options.distance || 20, h = b.options.times || 5, i = b.duration || 250; - /show|hide/.test(e) && d.push("opacity"), a.effects.save(c, d), c.show(), a.effects.createWrapper(c); - var j = f == "up" || f == "down" ? "top" : "left", k = f == "up" || f == "left" ? "pos" : "neg", g = b.options.distance || (j == "top" ? c.outerHeight({margin: !0}) / 3 : c.outerWidth({margin: !0}) / 3); - e == "show" && c.css("opacity", 0).css(j, k == "pos" ? -g : g), e == "hide" && (g = g / (h * 2)), e != "hide" && h--; - if (e == "show") { - var l = {opacity: 1}; - l[j] = (k == "pos" ? "+=" : "-=") + g, c.animate(l, i / 2, b.options.easing), g = g / 2, h-- - } - for (var m = 0; m < h; m++) { - var n = {}, p = {}; - n[j] = (k == "pos" ? "-=" : "+=") + g, p[j] = (k == "pos" ? "+=" : "-=") + g, c.animate(n, i / 2, b.options.easing).animate(p, i / 2, b.options.easing), g = e == "hide" ? g * 2 : g / 2 - } - if (e == "hide") { - var l = {opacity: 0}; - l[j] = (k == "pos" ? "-=" : "+=") + g, c.animate(l, i / 2, b.options.easing, function () { - c.hide(), a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(this, arguments) - }) - } else { - var n = {}, p = {}; - n[j] = (k == "pos" ? "-=" : "+=") + g, p[j] = (k == "pos" ? "+=" : "-=") + g, c.animate(n, i / 2, b.options.easing).animate(p, i / 2, b.options.easing, function () { - a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(this, arguments) - }) - } - c.queue("fx", function () { - c.dequeue() - }), c.dequeue() - }) - } -}(jQuery), function (a, b) { - a.effects.clip = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right", "height", "width"], e = a.effects.setMode(c, b.options.mode || "hide"), f = b.options.direction || "vertical"; - a.effects.save(c, d), c.show(); - var g = a.effects.createWrapper(c).css({overflow: "hidden"}), h = c[0].tagName == "IMG" ? g : c, i = {size: f == "vertical" ? "height" : "width", position: f == "vertical" ? "top" : "left"}, j = f == "vertical" ? h.height() : h.width(); - e == "show" && (h.css(i.size, 0), h.css(i.position, j / 2)); - var k = {}; - k[i.size] = e == "show" ? j : 0, k[i.position] = e == "show" ? 0 : j / 2, h.animate(k, {queue: !1, duration: b.duration, easing: b.options.easing, complete: function () { - e == "hide" && c.hide(), a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(c[0], arguments), c.dequeue() - }}) - }) - } -}(jQuery), function (a, b) { - a.effects.drop = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right", "opacity"], e = a.effects.setMode(c, b.options.mode || "hide"), f = b.options.direction || "left"; - a.effects.save(c, d), c.show(), a.effects.createWrapper(c); - var g = f == "up" || f == "down" ? "top" : "left", h = f == "up" || f == "left" ? "pos" : "neg", i = b.options.distance || (g == "top" ? c.outerHeight({margin: !0}) / 2 : c.outerWidth({margin: !0}) / 2); - e == "show" && c.css("opacity", 0).css(g, h == "pos" ? -i : i); - var j = {opacity: e == "show" ? 1 : 0}; - j[g] = (e == "show" ? h == "pos" ? "+=" : "-=" : h == "pos" ? "-=" : "+=") + i, c.animate(j, {queue: !1, duration: b.duration, easing: b.options.easing, complete: function () { - e == "hide" && c.hide(), a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(this, arguments), c.dequeue() - }}) - }) - } -}(jQuery), function (a, b) { - a.effects.explode = function (b) { - return this.queue(function () { - var c = b.options.pieces ? Math.round(Math.sqrt(b.options.pieces)) : 3, d = b.options.pieces ? Math.round(Math.sqrt(b.options.pieces)) : 3; - b.options.mode = b.options.mode == "toggle" ? a(this).is(":visible") ? "hide" : "show" : b.options.mode; - var e = a(this).show().css("visibility", "hidden"), f = e.offset(); - f.top -= parseInt(e.css("marginTop"), 10) || 0, f.left -= parseInt(e.css("marginLeft"), 10) || 0; - var g = e.outerWidth(!0), h = e.outerHeight(!0); - for (var i = 0; i < c; i++)for (var j = 0; j < d; j++)e.clone().appendTo("body").wrap("<div></div>").css({position: "absolute", visibility: "visible", left: -j * (g / d), top: -i * (h / c)}).parent().addClass("ui-effects-explode").css({position: "absolute", overflow: "hidden", width: g / d, height: h / c, left: f.left + j * (g / d) + (b.options.mode == "show" ? (j - Math.floor(d / 2)) * (g / d) : 0), top: f.top + i * (h / c) + (b.options.mode == "show" ? (i - Math.floor(c / 2)) * (h / c) : 0), opacity: b.options.mode == "show" ? 0 : 1}).animate({left: f.left + j * (g / d) + (b.options.mode == "show" ? 0 : (j - Math.floor(d / 2)) * (g / d)), top: f.top + i * (h / c) + (b.options.mode == "show" ? 0 : (i - Math.floor(c / 2)) * (h / c)), opacity: b.options.mode == "show" ? 1 : 0}, b.duration || 500); - setTimeout(function () { - b.options.mode == "show" ? e.css({visibility: "visible"}) : e.css({visibility: "visible"}).hide(), b.callback && b.callback.apply(e[0]), e.dequeue(), a("div.ui-effects-explode").remove() - }, b.duration || 500) - }) - } -}(jQuery), function (a, b) { - a.effects.fade = function (b) { - return this.queue(function () { - var c = a(this), d = a.effects.setMode(c, b.options.mode || "hide"); - c.animate({opacity: d}, {queue: !1, duration: b.duration, easing: b.options.easing, complete: function () { - b.callback && b.callback.apply(this, arguments), c.dequeue() - }}) - }) - } -}(jQuery), function (a, b) { - a.effects.fold = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right"], e = a.effects.setMode(c, b.options.mode || "hide"), f = b.options.size || 15, g = !!b.options.horizFirst, h = b.duration ? b.duration / 2 : a.fx.speeds._default / 2; - a.effects.save(c, d), c.show(); - var i = a.effects.createWrapper(c).css({overflow: "hidden"}), j = e == "show" != g, k = j ? ["width", "height"] : ["height", "width"], l = j ? [i.width(), i.height()] : [i.height(), i.width()], m = /([0-9]+)%/.exec(f); - m && (f = parseInt(m[1], 10) / 100 * l[e == "hide" ? 0 : 1]), e == "show" && i.css(g ? {height: 0, width: f} : {height: f, width: 0}); - var n = {}, p = {}; - n[k[0]] = e == "show" ? l[0] : f, p[k[1]] = e == "show" ? l[1] : 0, i.animate(n, h, b.options.easing).animate(p, h, b.options.easing, function () { - e == "hide" && c.hide(), a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(c[0], arguments), c.dequeue() - }) - }) - } -}(jQuery), function (a, b) { - a.effects.highlight = function (b) { - return this.queue(function () { - var c = a(this), d = ["backgroundImage", "backgroundColor", "opacity"], e = a.effects.setMode(c, b.options.mode || "show"), f = {backgroundColor: c.css("backgroundColor")}; - e == "hide" && (f.opacity = 0), a.effects.save(c, d), c.show().css({backgroundImage: "none", backgroundColor: b.options.color || "#ffff99"}).animate(f, {queue: !1, duration: b.duration, easing: b.options.easing, complete: function () { - e == "hide" && c.hide(), a.effects.restore(c, d), e == "show" && !a.support.opacity && this.style.removeAttribute("filter"), b.callback && b.callback.apply(this, arguments), c.dequeue() - }}) - }) - } -}(jQuery), function (a, b) { - a.effects.pulsate = function (b) { - return this.queue(function () { - var c = a(this), d = a.effects.setMode(c, b.options.mode || "show"); - times = (b.options.times || 5) * 2 - 1, duration = b.duration ? b.duration / 2 : a.fx.speeds._default / 2, isVisible = c.is(":visible"), animateTo = 0, isVisible || (c.css("opacity", 0).show(), animateTo = 1), (d == "hide" && isVisible || d == "show" && !isVisible) && times--; - for (var e = 0; e < times; e++)c.animate({opacity: animateTo}, duration, b.options.easing), animateTo = (animateTo + 1) % 2; - c.animate({opacity: animateTo}, duration, b.options.easing, function () { - animateTo == 0 && c.hide(), b.callback && b.callback.apply(this, arguments) - }), c.queue("fx",function () { - c.dequeue() - }).dequeue() - }) - } -}(jQuery), function (a, b) { - a.effects.puff = function (b) { - return this.queue(function () { - var c = a(this), d = a.effects.setMode(c, b.options.mode || "hide"), e = parseInt(b.options.percent, 10) || 150, f = e / 100, g = {height: c.height(), width: c.width()}; - a.extend(b.options, {fade: !0, mode: d, percent: d == "hide" ? e : 100, from: d == "hide" ? g : {height: g.height * f, width: g.width * f}}), c.effect("scale", b.options, b.duration, b.callback), c.dequeue() - }) - }, a.effects.scale = function (b) { - return this.queue(function () { - var c = a(this), d = a.extend(!0, {}, b.options), e = a.effects.setMode(c, b.options.mode || "effect"), f = parseInt(b.options.percent, 10) || (parseInt(b.options.percent, 10) == 0 ? 0 : e == "hide" ? 0 : 100), g = b.options.direction || "both", h = b.options.origin; - e != "effect" && (d.origin = h || ["middle", "center"], d.restore = !0); - var i = {height: c.height(), width: c.width()}; - c.from = b.options.from || (e == "show" ? {height: 0, width: 0} : i); - var j = {y: g != "horizontal" ? f / 100 : 1, x: g != "vertical" ? f / 100 : 1}; - c.to = {height: i.height * j.y, width: i.width * j.x}, b.options.fade && (e == "show" && (c.from.opacity = 0, c.to.opacity = 1), e == "hide" && (c.from.opacity = 1, c.to.opacity = 0)), d.from = c.from, d.to = c.to, d.mode = e, c.effect("size", d, b.duration, b.callback), c. - dequeue() - }) - }, a.effects.size = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], e = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], f = ["width", "height", "overflow"], g = ["fontSize"], h = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], i = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], j = a.effects.setMode(c, b.options.mode || "effect"), k = b.options.restore || !1, l = b.options.scale || "both", m = b.options.origin, n = {height: c.height(), width: c.width()}; - c.from = b.options.from || n, c.to = b.options.to || n; - if (m) { - var p = a.effects.getBaseline(m, n); - c.from.top = (n.height - c.from.height) * p.y, c.from.left = (n.width - c.from.width) * p.x, c.to.top = (n.height - c.to.height) * p.y, c.to.left = (n.width - c.to.width) * p.x - } - var q = {from: {y: c.from.height / n.height, x: c.from.width / n.width}, to: {y: c.to.height / n.height, x: c.to.width / n.width}}; - if (l == "box" || l == "both")q.from.y != q.to.y && (d = d.concat(h), c.from = a.effects.setTransition(c, h, q.from.y, c.from), c.to = a.effects.setTransition(c, h, q.to.y, c.to)), q.from.x != q.to.x && (d = d.concat(i), c.from = a.effects.setTransition(c, i, q.from.x, c.from), c.to = a.effects.setTransition(c, i, q.to.x, c.to)); - (l == "content" || l == "both") && q.from.y != q.to.y && (d = d.concat(g), c.from = a.effects.setTransition(c, g, q.from.y, c.from), c.to = a.effects.setTransition(c, g, q.to.y, c.to)), a.effects.save(c, k ? d : e), c.show(), a.effects.createWrapper(c), c.css("overflow", "hidden").css(c.from); - if (l == "content" || l == "both")h = h.concat(["marginTop", "marginBottom"]).concat(g), i = i.concat(["marginLeft", "marginRight"]), f = d.concat(h).concat(i), c.find("*[width]").each(function () { - child = a(this), k && a.effects.save(child, f); - var c = {height: child.height(), width: child.width()}; - child.from = {height: c.height * q.from.y, width: c.width * q.from.x}, child.to = {height: c.height * q.to.y, width: c.width * q.to.x}, q.from.y != q.to.y && (child.from = a.effects.setTransition(child, h, q.from.y, child.from), child.to = a.effects.setTransition(child, h, q.to.y, child.to)), q.from.x != q.to.x && (child.from = a.effects.setTransition(child, i, q.from.x, child.from), child.to = a.effects.setTransition(child, i, q.to.x, child.to)), child.css(child.from), child.animate(child.to, b.duration, b.options.easing, function () { - k && a.effects.restore(child, f) - }) - }); - c.animate(c.to, {queue: !1, duration: b.duration, easing: b.options.easing, complete: function () { - c.to.opacity === 0 && c.css("opacity", c.from.opacity), j == "hide" && c.hide(), a.effects.restore(c, k ? d : e), a.effects.removeWrapper(c), b.callback && b.callback.apply(this, arguments), c.dequeue() - }}) - }) - } -}(jQuery), function (a, b) { - a.effects.shake = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right"], e = a.effects.setMode(c, b.options.mode || "effect"), f = b.options.direction || "left", g = b.options.distance || 20, h = b.options.times || 3, i = b.duration || b.options.duration || 140; - a.effects.save(c, d), c.show(), a.effects.createWrapper(c); - var j = f == "up" || f == "down" ? "top" : "left", k = f == "up" || f == "left" ? "pos" : "neg", l = {}, m = {}, n = {}; - l[j] = (k == "pos" ? "-=" : "+=") + g, m[j] = (k == "pos" ? "+=" : "-=") + g * 2, n[j] = (k == "pos" ? "-=" : "+=") + g * 2, c.animate(l, i, b.options.easing); - for (var p = 1; p < h; p++)c.animate(m, i, b.options.easing).animate(n, i, b.options.easing); - c.animate(m, i, b.options.easing).animate(l, i / 2, b.options.easing, function () { - a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(this, arguments) - }), c.queue("fx", function () { - c.dequeue() - }), c.dequeue() - }) - } -}(jQuery), function (a, b) { - a.effects.slide = function (b) { - return this.queue(function () { - var c = a(this), d = ["position", "top", "bottom", "left", "right"], e = a.effects.setMode(c, b.options.mode || "show"), f = b.options.direction || "left"; - a.effects.save(c, d), c.show(), a.effects.createWrapper(c).css({overflow: "hidden"}); - var g = f == "up" || f == "down" ? "top" : "left", h = f == "up" || f == "left" ? "pos" : "neg", i = b.options.distance || (g == "top" ? c.outerHeight({margin: !0}) : c.outerWidth({margin: !0})); - e == "show" && c.css(g, h == "pos" ? isNaN(i) ? "-" + i : -i : i); - var j = {}; - j[g] = (e == "show" ? h == "pos" ? "+=" : "-=" : h == "pos" ? "-=" : "+=") + i, c.animate(j, {queue: !1, duration: b.duration, easing: b.options.easing, complete: function () { - e == "hide" && c.hide(), a.effects.restore(c, d), a.effects.removeWrapper(c), b.callback && b.callback.apply(this, arguments), c.dequeue() - }}) - }) - } -}(jQuery), function (a, b) { - a.effects.transfer = function (b) { - return this.queue(function () { - var c = a(this), d = a(b.options.to), e = d.offset(), f = {top: e.top, left: e.left, height: d.innerHeight(), width: d.innerWidth()}, g = c.offset(), h = a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top: g.top, left: g.left, height: c.innerHeight(), width: c.innerWidth(), position: "absolute"}).animate(f, b.duration, b.options.easing, function () { - h.remove(), b.callback && b.callback.apply(c[0], arguments), c.dequeue() - }) - }) - } -}(jQuery), function (a, b) { - a.widget("ui.accordion", {options: {active: 0, animated: "slide", autoHeight: !0, clearStyle: !1, collapsible: !1, event: "click", fillSpace: !1, header: "> li > :first-child,> :not(li):even", icons: {header: "ui-icon-triangle-1-e", headerSelected: "ui-icon-triangle-1-s"}, navigation: !1, navigationFilter: function () { - return this.href.toLowerCase() === location.href.toLowerCase() - }}, _create: function () { - var b = this, c = b.options; - b.running = 0, b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"), b.headers = b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function () { - c.disabled || a(this).addClass("ui-state-hover") - }).bind("mouseleave.accordion",function () { - c.disabled || a(this).removeClass("ui-state-hover") - }).bind("focus.accordion",function () { - c.disabled || a(this).addClass("ui-state-focus") - }).bind("blur.accordion", function () { - c.disabled || a(this).removeClass("ui-state-focus") - }), b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); - if (c.navigation) { - var d = b.element.find("a").filter(c.navigationFilter).eq(0); - if (d.length) { - var e = d.closest(".ui-accordion-header"); - e.length ? b.active = e : b.active = d.closest(".ui-accordion-content").prev() - } - } - b.active = b._findActive(b.active || c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"), b.active.next().addClass("ui-accordion-content-active"), b._createIcons(), b.resize(), b.element.attr("role", "tablist"), b.headers.attr("role", "tab").bind("keydown.accordion",function (a) { - return b._keydown(a) - }).next().attr("role", "tabpanel"), b.headers.not(b.active || "").attr({"aria-expanded": "false", "aria-selected": "false", tabIndex: -1}).next().hide(), b.active.length ? b.active.attr({"aria-expanded": "true", "aria-selected": "true", tabIndex: 0}) : b.headers.eq(0).attr("tabIndex", 0), a.browser.safari || b.headers.find("a").attr("tabIndex", -1), c.event && b.headers.bind(c.event.split(" ").join(".accordion ") + ".accordion", function (a) { - b._clickHandler.call(b, a, this), a.preventDefault() - }) - }, _createIcons: function () { - var b = this.options; - b.icons && (a("<span></span>").addClass("ui-icon " + b.icons.header).prependTo(this.headers), this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected), this.element.addClass("ui-accordion-icons")) - }, _destroyIcons: function () { - this.headers.children(".ui-icon").remove(), this.element.removeClass("ui-accordion-icons") - }, destroy: function () { - var b = this.options; - this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"), this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"), this.headers.find("a").removeAttr("tabIndex"), this._destroyIcons(); - var c = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled"); - (b.autoHeight || b.fillHeight) && c.css("height", ""); - return a.Widget.prototype.destroy.call(this) - }, _setOption: function (b, c) { - a.Widget.prototype._setOption.apply(this, arguments), b == "active" && this.activate(c), b == "icons" && (this._destroyIcons(), c && this._createIcons()), b == "disabled" && this.headers.add(this.headers.next())[c ? "addClass" : "removeClass"]("ui-accordion-disabled ui-state-disabled") - }, _keydown: function (b) { - if (!(this.options.disabled || b.altKey || b.ctrlKey)) { - var c = a.ui.keyCode, d = this.headers.length, e = this.headers.index(b.target), f = !1; - switch (b.keyCode) { - case c.RIGHT: - case c.DOWN: - f = this.headers[(e + 1) % d]; - break; - case c.LEFT: - case c.UP: - f = this.headers[(e - 1 + d) % d]; - break; - case c.SPACE: - case c.ENTER: - this._clickHandler({target: b.target}, b.target), b.preventDefault() - } - if (f) { - a(b.target).attr("tabIndex", -1), a(f).attr("tabIndex", 0), f.focus(); - return!1 - } - return!0 - } - }, resize: function () { - var b = this.options, c; - if (b.fillSpace) { - if (a.browser.msie) { - var d = this.element.parent().css("overflow"); - this.element.parent().css("overflow", "hidden") - } - c = this.element.parent().height(), a.browser.msie && this.element.parent().css("overflow", d), this.headers.each(function () { - c -= a(this).outerHeight(!0) - }), this.headers.next().each(function () { - a(this).height(Math.max(0, c - a(this).innerHeight() + a(this).height())) - }).css("overflow", "auto") - } else b.autoHeight && (c = 0, this.headers.next().each(function () { - c = Math.max(c, a(this).height("").height()) - }).height(c)); - return this - }, activate: function (a) { - this.options.active = a; - var b = this._findActive(a)[0]; - this._clickHandler({target: b}, b); - return this - }, _findActive: function (b) { - return b ? typeof b == "number" ? this.headers.filter(":eq(" + b + ")") : this.headers.not(this.headers.not(b)) : b === !1 ? a([]) : this.headers.filter(":eq(0)") - }, _clickHandler: function (b, c) { - var d = this.options; - if (!d.disabled) { - if (!b.target) { - if (!d.collapsible)return; - this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header), this.active.next().addClass("ui-accordion-content-active"); - var e = this.active.next(), f = {options: d, newHeader: a([]), oldHeader: d.active, newContent: a([]), oldContent: e}, g = this.active = a([]); - this._toggle(g, e, f); - return - } - var h = a(b.currentTarget || c), i = h[0] === this.active[0]; - d.active = d.collapsible && i ? !1 : this.headers.index(h); - if (this.running || !d.collapsible && i)return; - var j = this.active, g = h.next(), e = this.active.next(), f = {options: d, newHeader: i && d.collapsible ? a([]) : h, oldHeader: this.active, newContent: i && d.collapsible ? a([]) : g, oldContent: e}, k = this.headers.index(this.active[0]) > this.headers.index(h[0]); - this.active = i ? a([]) : h, this._toggle(g, e, f, i, k), j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header), i || (h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected), h.next().addClass("ui-accordion-content-active")); - return - } - }, _toggle: function (b, c, d, e, f) { - var g = this, h = g.options; - g.toShow = b, g.toHide = c, g.data = d; - var i = function () { - if (!!g)return g._completed.apply(g, arguments) - }; - g._trigger("changestart", null, g.data), g.running = c.size() === 0 ? b.size() : c.size(); - if (h.animated) { - var j = {}; - h.collapsible && e ? j = {toShow: a([]), toHide: c, complete: i, down: f, autoHeight: h.autoHeight || h.fillSpace} : j = {toShow: b, toHide: c, complete: i, down: f, autoHeight: h.autoHeight || h.fillSpace}, h.proxied || (h.proxied = h.animated), h.proxiedDuration || (h.proxiedDuration = h.duration), h.animated = a.isFunction(h.proxied) ? h.proxied(j) : h.proxied, h.duration = a.isFunction(h.proxiedDuration) ? h.proxiedDuration(j) : h.proxiedDuration; - var k = a.ui.accordion.animations, l = h.duration, m = h.animated; - m && !k[m] && !a.easing[m] && (m = "slide"), k[m] || (k[m] = function (a) { - this.slide(a, {easing: m, duration: l || 700}) - }), k[m](j) - } else h.collapsible && e ? b.toggle() : (c.hide(), b.show()), i(!0); - c.prev().attr({"aria-expanded": "false", "aria-selected": "false", tabIndex: -1}).blur(), b.prev().attr({"aria-expanded": "true", "aria-selected": "true", tabIndex: 0}).focus() - }, _completed: function (a) { - this.running = a ? 0 : --this.running; - this.running || (this.options.clearStyle && this.toShow.add(this.toHide).css({height: "", overflow: ""}), this.toHide.removeClass("ui-accordion-content-active"), this.toHide.length && (this.toHide.parent()[0].className = this.toHide.parent()[0].className), this._trigger("change", null, this.data)) - }}), a.extend(a.ui.accordion, {version: "1.8.18", animations: {slide: function (b, c) { - b = a.extend({easing: "swing", duration: 300}, b, c); - if (!b.toHide.size())b.toShow.animate({height: "show", paddingTop: "show", paddingBottom: "show"}, b); else { - if (!b.toShow.size()) { - b.toHide.animate({height: "hide", paddingTop: "hide", paddingBottom: "hide"}, b); - return - } - var d = b.toShow.css("overflow"), e = 0, f = {}, g = {}, h = ["height", "paddingTop", "paddingBottom"], i, j = b.toShow; - i = j[0].style.width, j.width(j.parent().width() - parseFloat(j.css("paddingLeft")) - parseFloat(j.css("paddingRight")) - (parseFloat(j.css("borderLeftWidth")) || 0) - (parseFloat(j.css("borderRightWidth")) || 0)), a.each(h, function (c, d) { - g[d] = "hide"; - var e = ("" + a.css(b.toShow[0], d)).match(/^([\d+-.]+)(.*)$/); - f[d] = {value: e[1], unit: e[2] || "px"} - }), b.toShow.css({height: 0, overflow: "hidden"}).show(), b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g, {step: function (a, c) { - c.prop == "height" && (e = c.end - c.start === 0 ? 0 : (c.now - c.start) / (c.end - c.start)), b.toShow[0].style[c.prop] = e * f[c.prop].value + f[c.prop].unit - }, duration: b.duration, easing: b.easing, complete: function () { - b.autoHeight || b.toShow.css("height", ""), b.toShow.css({width: i, overflow: d}), b.complete() - }}) - } - }, bounceslide: function (a) { - this.slide(a, {easing: a.down ? "easeOutBounce" : "swing", duration: a.down ? 1e3 : 200}) - }}}) -}(jQuery), function (a, b) { - var c = 0; - a.widget("ui.autocomplete", {options: {appendTo: "body", autoFocus: !1, delay: 300, minLength: 1, position: {my: "left top", at: "left bottom", collision: "none"}, source: null}, pending: 0, _create: function () { - var b = this, c = this.element[0].ownerDocument, d; - this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off").attr({role: "textbox", "aria-autocomplete": "list", "aria-haspopup": "true"}).bind("keydown.autocomplete",function (c) { - if (!b.options.disabled && !b.element.propAttr("readOnly")) { - d = !1; - var e = a.ui.keyCode; - switch (c.keyCode) { - case e.PAGE_UP: - b._move("previousPage", c); - break; - case e.PAGE_DOWN: - b._move("nextPage", c); - break; - case e.UP: - b._move("previous", c), c.preventDefault(); - break; - case e.DOWN: - b._move("next", c), c.preventDefault(); - break; - case e.ENTER: - case e.NUMPAD_ENTER: - b.menu.active && (d = !0, c.preventDefault()); - case e.TAB: - if (!b.menu.active)return; - b.menu.select(c); - break; - case e.ESCAPE: - b.element.val(b.term), b.close(c); - break; - default: - clearTimeout(b.searching), b.searching = setTimeout(function () { - b.term != b.element.val() && (b.selectedItem = null, b.search(null, c)) - }, b.options.delay) - } - } - }).bind("keypress.autocomplete",function (a) { - d && (d = !1, a.preventDefault()) - }).bind("focus.autocomplete",function () { - b.options.disabled || (b.selectedItem = null, b.previous = b.element.val()) - }).bind("blur.autocomplete", function (a) { - b.options.disabled || (clearTimeout(b.searching), b.closing = setTimeout(function () { - b.close(a), b._change(a) - }, 150)) - }), this._initSource(), this.response = function () { - return b._response.apply(b, arguments) - }, this.menu = a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo || "body", c)[0]).mousedown(function (c) { - var d = b.menu.element[0]; - a(c.target).closest(".ui-menu-item").length || setTimeout(function () { - a(document).one("mousedown", function (c) { - c.target !== b.element[0] && c.target !== d && !a.ui.contains(d, c.target) && b.close() - }) - }, 1), setTimeout(function () { - clearTimeout(b.closing) - }, 13) - }).menu({focus: function (a, c) { - var d = c.item.data("item.autocomplete"); - !1 !== b._trigger("focus", a, {item: d}) && /^key/.test(a.originalEvent.type) && b.element.val(d.value) - }, selected: function (a, d) { - var e = d.item.data("item.autocomplete"), f = b.previous; - b.element[0] !== c.activeElement && (b.element.focus(), b.previous = f, setTimeout(function () { - b.previous = f, b.selectedItem = e - }, 1)), !1 !== b._trigger("select", a, {item: e}) && b.element.val(e.value), b.term = b.element.val(), b.close(a), b.selectedItem = e - }, blur: function (a, c) { - b.menu.element.is(":visible") && b.element.val() !== b.term && b.element.val(b.term) - }}).zIndex(this.element.zIndex() + 1).css({top: 0, left: 0}).hide().data("menu"), a.fn.bgiframe && this.menu.element.bgiframe(), b.beforeunloadHandler = function () { - b.element.removeAttr("autocomplete") - }, a(window).bind("beforeunload", b.beforeunloadHandler) - }, destroy: function () { - this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"), this.menu.element.remove(), a(window).unbind("beforeunload", this.beforeunloadHandler), a.Widget.prototype.destroy.call(this) - }, _setOption: function (b, c) { - a.Widget.prototype._setOption.apply(this, arguments), b === "source" && this._initSource(), b === "appendTo" && this.menu.element.appendTo(a(c || "body", this.element[0].ownerDocument)[0]), b === "disabled" && c && this.xhr && this.xhr.abort() - }, _initSource: function () { - var b = this, d, e; - a.isArray(this.options.source) ? (d = this.options.source, this.source = function (b, c) { - c(a.ui.autocomplete.filter(d, b.term)) - }) : typeof this.options.source == "string" ? (e = this.options.source, this.source = function (d, f) { - b.xhr && b.xhr.abort(), b.xhr = a.ajax({url: e, data: d, dataType: "json", context: {autocompleteRequest: ++c}, success: function (a, b) { - this.autocompleteRequest === c && f(a) - }, error: function () { - this.autocompleteRequest === c && f([]) - }}) - }) : this.source = this.options.source - }, search: function (a, b) { - a = a != null ? a : this.element.val(), this.term = this.element.val(); - if (a.length < this.options.minLength)return this.close(b); - clearTimeout(this.closing); - if (this._trigger("search", b) !== !1)return this._search(a) - }, _search: function (a) { - this.pending++, this.element.addClass("ui-autocomplete-loading"), this.source({term: a}, this.response) - }, _response: function (a) { - !this.options.disabled && a && a.length ? (a = this._normalize(a), this._suggest(a), this._trigger("open")) : this.close(), this.pending--, this.pending || this.element.removeClass("ui-autocomplete-loading") - }, close: function (a) { - clearTimeout(this.closing), this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.deactivate(), this._trigger("close", a)) - }, _change: function (a) { - this.previous !== this.element.val() && this._trigger("change", a, {item: this.selectedItem}) - }, _normalize: function (b) { - if (b.length && b[0].label && b[0].value)return b; - return a.map(b, function (b) { - if (typeof b == "string")return{label: b, value: b}; - return a.extend({label: b.label || b.value, value: b.value || b.label}, b) - }) - }, _suggest: function (b) { - var c = this.menu.element.empty().zIndex(this.element.zIndex() + 1); - this._renderMenu(c, b), this.menu.deactivate(), this.menu.refresh(), c.show(), this._resizeMenu(), c.position(a.extend({of: this.element}, this.options.position)), this.options.autoFocus && this.menu.next(new a.Event("mouseover")) - }, _resizeMenu: function () { - var a = this.menu.element; - a.outerWidth(Math.max(a.width("").outerWidth() + 1, this.element.outerWidth())) - }, _renderMenu: function (b, c) { - var d = this; - a.each(c, function (a, c) { - d._renderItem(b, c) - }) - }, _renderItem: function (b, c) { - return a("<li></li>").data("item.autocomplete", c).append(a("<a></a>").text(c.label)).appendTo(b) - }, _move: function (a, b) { - if (!this.menu.element.is(":visible"))this.search(null, b); else { - if (this.menu.first() && /^previous/.test(a) || this.menu.last() && /^next/.test(a)) { - this.element.val(this.term), this.menu.deactivate(); - return - } - this.menu[a](b) - } - }, widget: function () { - return this.menu.element - }}), a.extend(a.ui.autocomplete, {escapeRegex: function (a) { - return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") - }, filter: function (b, c) { - var d = new RegExp(a.ui.autocomplete.escapeRegex(c), "i"); - return a.grep(b, function (a) { - return d.test(a.label || a.value || a) - }) - }}) -}(jQuery), function (a) { - a.widget("ui.menu", {_create: function () { - var b = this; - this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role: "listbox", "aria-activedescendant": "ui-active-menuitem"}).click(function (c) { - !a(c.target).closest(".ui-menu-item a").length || (c.preventDefault(), b.select(c)) - }), this.refresh() - }, refresh: function () { - var b = this, c = this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "menuitem"); - c.children("a").addClass("ui-corner-all").attr("tabindex", -1).mouseenter(function (c) { - b.activate(c, a(this).parent()) - }).mouseleave(function () { - b.deactivate() - }) - }, activate: function (a, b) { - this.deactivate(); - if (this.hasScroll()) { - var c = b.offset().top - this.element.offset().top, d = this.element.scrollTop(), e = this.element.height(); - c < 0 ? this.element.scrollTop(d + c) : c >= e && this.element.scrollTop(d + c - e + b.height()) - } - this.active = b.eq(0).children("a").addClass("ui-state-hover").attr("id", "ui-active-menuitem").end(), this._trigger("focus", a, {item: b}) - }, deactivate: function () { - !this.active || (this.active.children("a").removeClass("ui-state-hover").removeAttr("id"), this._trigger("blur"), this.active = null) - }, next: function (a) { - this.move("next", ".ui-menu-item:first", a) - }, previous: function (a) { - this.move("prev", ".ui-menu-item:last", a) - }, first: function () { - return this.active && !this.active.prevAll(".ui-menu-item").length - }, last: function () { - return this.active && !this.active.nextAll(".ui-menu-item").length - }, move: function (a, b, c) { - if (!this.active)this.activate(c, this.element.children(b)); else { - var d = this.active[a + "All"](".ui-menu-item").eq(0); - d.length ? this.activate(c, d) : this.activate(c, this.element.children(b)) - } - }, nextPage: function (b) { - if (this.hasScroll()) { - if (!this.active || this.last()) { - this.activate(b, this.element.children(".ui-menu-item:first")); - return - } - var c = this.active.offset().top, d = this.element.height(), e = this.element.children(".ui-menu-item").filter(function () { - var b = a(this).offset().top - c - d + a(this).height(); - return b < 10 && b > -10 - }); - e.length || (e = this.element.children(".ui-menu-item:last")), this.activate(b, e) - } else this.activate(b, this.element.children(".ui-menu-item").filter(!this.active || this.last() ? ":first" : ":last")) - }, previousPage: function (b) { - if (this.hasScroll()) { - if (!this.active || this.first()) { - this.activate(b, this.element.children(".ui-menu-item:last")); - return - } - var c = this.active.offset().top, d = this.element.height(); - result = this.element.children(".ui-menu-item").filter(function () { - var b = a(this).offset().top - c + d - a(this).height(); - return b < 10 && b > -10 - }), result.length || (result = this.element.children(".ui-menu-item:first")), this.activate(b, result) - } else this.activate(b, this.element.children(".ui-menu-item").filter(!this.active || this.first() ? ":last" : ":first")) - }, hasScroll: function () { - return this.element.height() < this.element[a.fn.prop ? "prop" : "attr"]("scrollHeight") - }, select: function (a) { - this._trigger("selected", a, {item: this.active}) - }}) -}(jQuery), function (a, b) { - var c, d, e, f, g = "ui-button ui-widget ui-state-default ui-corner-all", h = "ui-state-hover ui-state-active ", i = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", j = function () { - var b = a(this).find(":ui-button"); - setTimeout(function () { - b.button("refresh") - }, 1) - }, k = function (b) { - var c = b.name, d = b.form, e = a([]); - c && (d ? e = a(d).find("[name='" + c + "']") : e = a("[name='" + c + "']", b.ownerDocument).filter(function () { - return!this.form - })); - return e - }; - a.widget("ui.button", {options: {disabled: null, text: !0, label: null, icons: {primary: null, secondary: null}}, _create: function () { - this.element.closest("form").unbind("reset.button").bind("reset.button", j), typeof this.options.disabled != "boolean" ? this.options.disabled = !!this.element.propAttr("disabled") : this.element.propAttr("disabled", this.options.disabled), this._determineButtonType(), this.hasTitle = !!this.buttonElement.attr("title"); - var b = this, h = this.options, i = this.type === "checkbox" || this.type === "radio", l = "ui-state-hover" + (i ? "" : " ui-state-active"), m = "ui-state-focus"; - h.label === null && (h.label = this.buttonElement.html()), this.buttonElement.addClass(g).attr("role", "button").bind("mouseenter.button",function () { - h.disabled || (a(this).addClass("ui-state-hover"), this === c && a(this).addClass("ui-state-active")) - }).bind("mouseleave.button",function () { - h.disabled || a(this).removeClass(l) - }).bind("click.button", function (a) { - h.disabled && (a.preventDefault(), a.stopImmediatePropagation()) - }), this.element.bind("focus.button",function () { - b.buttonElement.addClass(m) - }).bind("blur.button", function () { - b.buttonElement.removeClass(m) - }), i && (this.element.bind("change.button", function () { - f || b.refresh() - }), this.buttonElement.bind("mousedown.button",function (a) { - h.disabled || (f = !1, d = a.pageX, e = a.pageY) - }).bind("mouseup.button", function (a) { - !h.disabled && (d !== a.pageX || e !== a.pageY) && (f = !0) - })), this.type === "checkbox" ? this.buttonElement.bind("click.button", function () { - if (h.disabled || f)return!1; - a(this).toggleClass("ui-state-active"), b.buttonElement.attr("aria-pressed", b.element[0].checked) - }) : this.type === "radio" ? this.buttonElement.bind("click.button", function () { - if (h.disabled || f)return!1; - a(this).addClass("ui-state-active"), b.buttonElement.attr("aria-pressed", "true"); - var c = b.element[0]; - k(c).not(c).map(function () { - return a(this).button("widget")[0] - }).removeClass("ui-state-active").attr("aria-pressed", "false") - }) : (this.buttonElement.bind("mousedown.button",function () { - if (h.disabled)return!1; - a(this).addClass("ui-state-active"), c = this, a(document).one("mouseup", function () { - c = null - }) - }).bind("mouseup.button",function () { - if (h.disabled)return!1; - a(this).removeClass("ui-state-active") - }).bind("keydown.button",function (b) { - if (h.disabled)return!1; - (b.keyCode == a.ui.keyCode.SPACE || b.keyCode == a.ui.keyCode.ENTER) && a(this).addClass("ui-state-active") - }).bind("keyup.button", function () { - a(this).removeClass("ui-state-active") - }), this.buttonElement.is("a") && this.buttonElement.keyup(function (b) { - b.keyCode === a.ui.keyCode.SPACE && a(this).click() - })), this._setOption("disabled", h.disabled), this._resetButton() - }, _determineButtonType: function () { - this.element.is(":checkbox") ? this.type = "checkbox" : this.element.is(":radio") ? this.type = "radio" : this.element.is("input") ? this.type = "input" : this.type = "button"; - if (this.type === "checkbox" || this.type === "radio") { - var a = this.element.parents().filter(":last"), b = "label[for='" + this.element.attr("id") + "']"; - this.buttonElement = a.find(b), this.buttonElement.length || (a = a.length ? a.siblings() : this.element.siblings(), this.buttonElement = a.filter(b), this.buttonElement.length || (this.buttonElement = a.find(b))), this.element.addClass("ui-helper-hidden-accessible"); - var c = this.element.is(":checked"); - c && this.buttonElement.addClass("ui-state-active"), this.buttonElement.attr("aria-pressed", c) - } else this.buttonElement = this.element - }, widget: function () { - return this.buttonElement - }, destroy: function () { - this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(g + " " + h + " " + i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title"), a.Widget.prototype.destroy.call(this) - }, _setOption: function (b, c) { - a.Widget.prototype._setOption.apply(this, arguments); - b === "disabled" ? c ? this.element.propAttr("disabled", !0) : this.element.propAttr("disabled", !1) : this._resetButton() - }, refresh: function () { - var b = this.element.is(":disabled"); - b !== this.options.disabled && this._setOption("disabled", b), this.type === "radio" ? k(this.element[0]).each(function () { - a(this).is(":checked") ? a(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") : a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false") - }) : this.type === "checkbox" && (this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false")) - }, _resetButton: function () { - if (this.type === "input")this.options.label && this.element.val(this.options.label); else { - var b = this.buttonElement.removeClass(i), c = a("<span></span>", this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(), d = this.options.icons, e = d.primary && d.secondary, f = []; - d.primary || d.secondary ? (this.options.text && f.push("ui-button-text-icon" + (e ? "s" : d.primary ? "-primary" : "-secondary")), d.primary && b.prepend("<span class='ui-button-icon-primary ui-icon " + d.primary + "'></span>"), d.secondary && b.append("<span class='ui-button-icon-secondary ui-icon " + d.secondary + "'></span>"), this.options.text || (f.push(e ? "ui-button-icons-only" : "ui-button-icon-only"), this.hasTitle || b.attr("title", c))) : f.push("ui-button-text-only"), b.addClass(f.join(" ")) - } - }}), a.widget("ui.buttonset", {options: {items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"}, _create: function () { - this.element.addClass("ui-buttonset") - }, _init: function () { - this.refresh() - }, _setOption: function (b, c) { - b === "disabled" && this.buttons.button("option", b, c), a.Widget.prototype._setOption.apply(this, arguments) - }, refresh: function () { - var b = this.element.css("direction") === "rtl"; - this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function () { - return a(this).button("widget")[0] - }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(b ? "ui-corner-left" : "ui-corner-right").end().end() - }, destroy: function () { - this.element.removeClass("ui-buttonset"), this.buttons.map(function () { - return a(this).button("widget")[0] - }).removeClass("ui-corner-left ui-corner-right").end().button("destroy"), a.Widget.prototype.destroy.call(this) - }}) -}(jQuery), function ($, undefined) { - function isArray(a) { - return a && ($.browser.safari && typeof a == "object" && a.length || a.constructor && a.constructor.toString().match(/\Array\(\)/)) - } - - function extendRemove(a, b) { - $.extend(a, b); - for (var c in b)if (b[c] == null || b[c] == undefined)a[c] = b[c]; - return a - } - - function bindHover(a) { - var b = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; - return a.bind("mouseout",function (a) { - var c = $(a.target).closest(b); - !c.length || c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover") - }).bind("mouseover", function (c) { - var d = $(c.target).closest(b); - !$.datepicker._isDisabledDatepicker(instActive.inline ? a.parent()[0] : instActive.input[0]) && !!d.length && (d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), d.addClass("ui-state-hover"), d.hasClass("ui-datepicker-prev") && d.addClass("ui-datepicker-prev-hover"), d.hasClass("ui-datepicker-next") && d.addClass("ui-datepicker-next-hover")) - }) - } - - function Datepicker() { - this.debug = !1, this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = "ui-datepicker-div", this._inlineClass = "ui-datepicker-inline", this._appendClass = "ui-datepicker-append", this._triggerClass = "ui-datepicker-trigger", this._dialogClass = "ui-datepicker-dialog", this._disableClass = "ui-datepicker-disabled", this._unselectableClass = "ui-datepicker-unselectable", this._currentClass = "ui-datepicker-current-day", this._dayOverClass = "ui-datepicker-days-cell-over", this.regional = [], this.regional[""] = {closeText: "Done", prevText: "Prev", nextText: "Next", currentText: "Today", monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader: "Wk", dateFormat: "mm/dd/yy", firstDay: 0, isRTL: !1, showMonthAfterYear: !1, yearSuffix: ""}, this._defaults = {showOn: "focus", showAnim: "fadeIn", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: !1, hideIfNoPrevNext: !1, navigationAsDateFormat: !1, gotoCurrent: !1, changeMonth: !1, changeYear: !1, yearRange: "c-10:c+10", showOtherMonths: !1, selectOtherMonths: !1, showWeek: !1, calculateWeek: this.iso8601Week, shortYearCutoff: "+10", minDate: null, maxDate: null, duration: "fast", beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: "", altFormat: "", constrainInput: !0, showButtonPanel: !1, autoSize: !1, disabled: !1}, $.extend(this._defaults, this.regional[""]), this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) - } - - $.extend($.ui, {datepicker: {version: "1.8.18"}}); - var PROP_NAME = "datepicker", dpuuid = (new Date).getTime(), instActive; - $.extend(Datepicker.prototype, {markerClassName: "hasDatepicker", maxRows: 4, log: function () { - this.debug && console.log.apply("", arguments) - }, _widgetDatepicker: function () { - return this.dpDiv - }, setDefaults: function (a) { - extendRemove(this._defaults, a || {}); - return this - }, _attachDatepicker: function (target, settings) { - var inlineSettings = null; - for (var attrName in this._defaults) { - var attrValue = target.getAttribute("date:" + attrName); - if (attrValue) { - inlineSettings = inlineSettings || {}; - try { - inlineSettings[attrName] = eval(attrValue) - } catch (err) { - inlineSettings[attrName] = attrValue - } - } - } - var nodeName = target.nodeName.toLowerCase(), inline = nodeName == "div" || nodeName == "span"; - target.id || (this.uuid += 1, target.id = "dp" + this.uuid); - var inst = this._newInst($(target), inline); - inst.settings = $.extend({}, settings || {}, inlineSettings || {}), nodeName == "input" ? this._connectDatepicker(target, inst) : inline && this._inlineDatepicker(target, inst) - }, _newInst: function (a, b) { - var c = a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1"); - return{id: c, input: a, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: b, dpDiv: b ? bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) : this.dpDiv} - }, _connectDatepicker: function (a, b) { - var c = $(a); - b.append = $([]), b.trigger = $([]); - c.hasClass(this.markerClassName) || (this._attachments(c, b), c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function (a, c, d) { - b.settings[c] = d - }).bind("getData.datepicker", function (a, c) { - return this._get(b, c) - }), this._autoSize(b), $.data(a, PROP_NAME, b), b.settings.disabled && this._disableDatepicker(a)) - }, _attachments: function (a, b) { - var c = this._get(b, "appendText"), d = this._get(b, "isRTL"); - b.append && b.append.remove(), c && (b.append = $('<span class="' + this._appendClass + '">' + c + "</span>"), a[d ? "before" : "after"](b.append)), a.unbind("focus", this._showDatepicker), b.trigger && b.trigger.remove(); - var e = this._get(b, "showOn"); - (e == "focus" || e == "both") && a.focus(this._showDatepicker); - if (e == "button" || e == "both") { - var f = this._get(b, "buttonText"), g = this._get(b, "buttonImage"); - b.trigger = $(this._get(b, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({src: g, alt: f, title: f}) : $('<button type="button"></button>').addClass(this._triggerClass).html(g == "" ? f : $("<img/>").attr({src: g, alt: f, title: f}))), a[d ? "before" : "after"](b.trigger), b.trigger.click(function () { - $.datepicker._datepickerShowing && $.datepicker._lastInput == a[0] ? $.datepicker._hideDatepicker() : $.datepicker._datepickerShowing && $.datepicker._lastInput != a[0] ? ($.datepicker._hideDatepicker(), $.datepicker._showDatepicker(a[0])) : $.datepicker._showDatepicker(a[0]); - return!1 - }) - } - }, _autoSize: function (a) { - if (this._get(a, "autoSize") && !a.inline) { - var b = new Date(2009, 11, 20), c = this._get(a, "dateFormat"); - if (c.match(/[DM]/)) { - var d = function (a) { - var b = 0, c = 0; - for (var d = 0; d < a.length; d++)a[d].length > b && (b = a[d].length, c = d); - return c - }; - b.setMonth(d(this._get(a, c.match(/MM/) ? "monthNames" : "monthNamesShort"))), b.setDate(d(this._get(a, c.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - b.getDay()) - } - a.input.attr("size", this._formatDate(a, b).length) - } - }, _inlineDatepicker: function (a, b) { - var c = $(a); - c.hasClass(this.markerClassName) || (c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function (a, c, d) { - b.settings[c] = d - }).bind("getData.datepicker", function (a, c) { - return this._get(b, c) - }), $.data(a, PROP_NAME, b), this._setDate(b, this._getDefaultDate(b), !0), this._updateDatepicker(b), this._updateAlternate(b), b.settings.disabled && this._disableDatepicker(a), b.dpDiv.css("display", "block")) - }, _dialogDatepicker: function (a, b, c, d, e) { - var f = this._dialogInst; - if (!f) { - this.uuid += 1; - var g = "dp" + this.uuid; - this._dialogInput = $('<input type="text" id="' + g + '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'), this._dialogInput.keydown(this._doKeyDown), $("body").append(this._dialogInput), f = this._dialogInst = this._newInst(this._dialogInput, !1), f.settings = {}, $.data(this._dialogInput[0], PROP_NAME, f) - } - extendRemove(f.settings, d || {}), b = b && b.constructor == Date ? this._formatDate(f, b) : b, this._dialogInput.val(b), this._pos = e ? e.length ? e : [e.pageX, e.pageY] : null; - if (!this._pos) { - var h = document.documentElement.clientWidth, i = document.documentElement.clientHeight, j = document.documentElement.scrollLeft || document.body.scrollLeft, k = document.documentElement.scrollTop || document.body.scrollTop; - this._pos = [h / 2 - 100 + j, i / 2 - 150 + k] - } - this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), f.settings.onSelect = c, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), $.blockUI && $.blockUI(this.dpDiv), $.data(this._dialogInput[0], PROP_NAME, f); - return this - }, _destroyDatepicker: function (a) { - var b = $(a), c = $.data(a, PROP_NAME); - if (!!b.hasClass(this.markerClassName)) { - var d = a.nodeName.toLowerCase(); - $.removeData(a, PROP_NAME), d == "input" ? (c.append.remove(), c.trigger.remove(), b.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : (d == "div" || d == "span") && b.removeClass(this.markerClassName).empty() - } - }, _enableDatepicker: function (a) { - var b = $(a), c = $.data(a, PROP_NAME); - if (!!b.hasClass(this.markerClassName)) { - var d = a.nodeName.toLowerCase(); - if (d == "input")a.disabled = !1, c.trigger.filter("button").each(function () { - this.disabled = !1 - }).end().filter("img").css({opacity: "1.0", cursor: ""}); else if (d == "div" || d == "span") { - var e = b.children("." + this._inlineClass); - e.children().removeClass("ui-state-disabled"), e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled") - } - this._disabledInputs = $.map(this._disabledInputs, function (b) { - return b == a ? null : b - }) - } - }, _disableDatepicker: function (a) { - var b = $(a), c = $.data(a, PROP_NAME); - if (!!b.hasClass(this.markerClassName)) { - var d = a.nodeName.toLowerCase(); - if (d == "input")a.disabled = !0, c.trigger.filter("button").each(function () { - this.disabled = !0 - }).end().filter("img").css({opacity: "0.5", cursor: "default"}); else if (d == "div" || d == "span") { - var e = b.children("." + this._inlineClass); - e.children().addClass("ui-state-disabled"), e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled", "disabled") - } - this._disabledInputs = $.map(this._disabledInputs, function (b) { - return b == a ? null : b - }), this._disabledInputs[this._disabledInputs.length] = a - } - }, _isDisabledDatepicker: function (a) { - if (!a)return!1; - for (var b = 0; b < this._disabledInputs.length; b++)if (this._disabledInputs[b] == a)return!0; - return!1 - }, _getInst: function (a) { - try { - return $.data(a, PROP_NAME) - } catch (b) { - throw"Missing instance data for this datepicker" - } - }, _optionDatepicker: function (a, b, c) { - var d = this._getInst(a); - if (arguments.length == 2 && typeof b == "string")return b == "defaults" ? $.extend({}, $.datepicker._defaults) : d ? b == "all" ? $.extend({}, d.settings) : this._get(d, b) : null; - var e = b || {}; - typeof b == "string" && (e = {}, e[b] = c); - if (d) { - this._curInst == d && this._hideDatepicker(); - var f = this._getDateDatepicker(a, !0), g = this._getMinMaxDate(d, "min"), h = this._getMinMaxDate(d, "max"); - extendRemove(d.settings, e), g !== null && e.dateFormat !== undefined && e.minDate === undefined && (d.settings.minDate = this._formatDate(d, g)), h !== null && e.dateFormat !== undefined && e.maxDate === undefined && (d.settings.maxDate = this._formatDate(d, h)), this._attachments($(a), d), this._autoSize(d), this._setDate(d, f), this._updateAlternate(d), this._updateDatepicker(d) - } - }, _changeDatepicker: function (a, b, c) { - this._optionDatepicker(a, b, c) - }, _refreshDatepicker: function (a) { - var b = this._getInst(a); - b && this._updateDatepicker(b) - }, _setDateDatepicker: function (a, b) { - var c = this._getInst(a); - c && (this._setDate(c, b), this._updateDatepicker(c), this._updateAlternate(c)) - }, _getDateDatepicker: function (a, b) { - var c = this._getInst(a); - c && !c.inline && this._setDateFromField(c, b); - return c ? this._getDate(c) : null - }, _doKeyDown: function (a) { - var b = $.datepicker._getInst(a.target), c = !0, d = b.dpDiv.is(".ui-datepicker-rtl"); - b._keyEvent = !0; - if ($.datepicker._datepickerShowing)switch (a.keyCode) { - case 9: - $.datepicker._hideDatepicker(), c = !1; - break; - case 13: - var e = $("td." + $.datepicker._dayOverClass + ":not(." + $.datepicker._currentClass + ")", b.dpDiv); - e[0] && $.datepicker._selectDay(a.target, b.selectedMonth, b.selectedYear, e[0]); - var f = $.datepicker._get(b, "onSelect"); - if (f) { - var g = $.datepicker._formatDate(b); - f.apply(b.input ? b.input[0] : null, [g, b]) - } else $.datepicker._hideDatepicker(); - return!1; - case 27: - $.datepicker._hideDatepicker(); - break; - case 33: - $.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M"); - break; - case 34: - $.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M"); - break; - case 35: - (a.ctrlKey || a.metaKey) && $.datepicker._clearDate(a.target), c = a.ctrlKey || a.metaKey; - break; - case 36: - (a.ctrlKey || a.metaKey) && $.datepicker._gotoToday(a.target), c = a.ctrlKey || a.metaKey; - break; - case 37: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? 1 : -1, "D"), c = a.ctrlKey || a.metaKey, a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M"); - break; - case 38: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, -7, "D"), c = a.ctrlKey || a.metaKey; - break; - case 39: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? -1 : 1, "D"), c = a.ctrlKey || a.metaKey, a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M"); - break; - case 40: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, 7, "D"), c = a.ctrlKey || a.metaKey; - break; - default: - c = !1 - } else a.keyCode == 36 && a.ctrlKey ? $.datepicker._showDatepicker(this) : c = !1; - c && (a.preventDefault(), a.stopPropagation()) - }, _doKeyPress: function (a) { - var b = $.datepicker._getInst(a.target); - if ($.datepicker._get(b, "constrainInput")) { - var c = $.datepicker._possibleChars($.datepicker._get(b, "dateFormat")), d = String.fromCharCode(a.charCode == undefined ? a.keyCode : a.charCode); - return a.ctrlKey || a.metaKey || d < " " || !c || c.indexOf(d) > -1 - } - }, _doKeyUp: function (a) { - var b = $.datepicker._getInst(a.target); - if (b.input.val() != b.lastVal)try { - var c = $.datepicker.parseDate($.datepicker._get(b, "dateFormat"), b.input ? b.input.val() : null, $.datepicker._getFormatConfig(b)); - c && ($.datepicker._setDateFromField(b), $.datepicker._updateAlternate(b), $.datepicker._updateDatepicker(b)) - } catch (a) { - $.datepicker.log(a) - } - return!0 - }, _showDatepicker: function (a) { - a = a.target || a, a.nodeName.toLowerCase() != "input" && (a = $("input", a.parentNode)[0]); - if (!$.datepicker._isDisabledDatepicker(a) && $.datepicker._lastInput != a) { - var b = $.datepicker._getInst(a); - $.datepicker._curInst && $.datepicker._curInst != b && ($.datepicker._curInst.dpDiv.stop(!0, !0), b && $.datepicker._datepickerShowing && $.datepicker._hideDatepicker($.datepicker._curInst.input[0])); - var c = $.datepicker._get(b, "beforeShow"), d = c ? c.apply(a, [a, b]) : {}; - if (d === !1)return; - extendRemove(b.settings, d), b.lastVal = null, $.datepicker._lastInput = a, $.datepicker._setDateFromField(b), $.datepicker._inDialog && (a.value = ""), $.datepicker._pos || ($.datepicker._pos = $.datepicker._findPos(a), $.datepicker._pos[1] += a.offsetHeight); - var e = !1; - $(a).parents().each(function () { - e |= $(this).css("position") == "fixed"; - return!e - }), e && $.browser.opera && ($.datepicker._pos[0] -= document.documentElement.scrollLeft, $.datepicker._pos[1] -= document.documentElement.scrollTop); - var f = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; - $.datepicker._pos = null, b.dpDiv.empty(), b.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}), $.datepicker._updateDatepicker(b), f = $.datepicker._checkOffset(b, f, e), b.dpDiv.css({position: $.datepicker._inDialog && $.blockUI ? "static" : e ? "fixed" : "absolute", display: "none", left: f.left + "px", top: f.top + "px"}); - if (!b.inline) { - var g = $.datepicker._get(b, "showAnim"), h = $.datepicker._get(b, "duration"), i = function () { - var a = b.dpDiv.find("iframe.ui-datepicker-cover"); - if (!!a.length) { - var c = $.datepicker._getBorders(b.dpDiv); - a.css({left: -c[0], top: -c[1], width: b.dpDiv.outerWidth(), height: b.dpDiv.outerHeight()}) - } - }; - b.dpDiv.zIndex($(a).zIndex() + 1), $.datepicker._datepickerShowing = !0, $.effects && $.effects[g] ? b.dpDiv.show(g, $.datepicker._get(b, "showOptions"), h, i) : b.dpDiv[g || "show"](g ? h : null, i), (!g || !h) && i(), b.input.is(":visible") && !b.input.is(":disabled") && b.input.focus(), $.datepicker._curInst = b - } - } - }, _updateDatepicker: function (a) { - var b = this; - b.maxRows = 4; - var c = $.datepicker._getBorders(a.dpDiv); - instActive = a, a.dpDiv.empty().append(this._generateHTML(a)); - var d = a.dpDiv.find("iframe.ui-datepicker-cover"); - !d.length || d.css({left: -c[0], top: -c[1], width: a.dpDiv.outerWidth(), height: a.dpDiv.outerHeight()}), a.dpDiv.find("." + this._dayOverClass + " a").mouseover(); - var e = this._getNumberOfMonths(a), f = e[1], g = 17; - a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), f > 1 && a.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", g * f + "em"), a.dpDiv[(e[0] != 1 || e[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi"), a.dpDiv[(this._get(a, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"), a == $.datepicker._curInst && $.datepicker._datepickerShowing && a.input && a.input.is(":visible") && !a.input.is(":disabled") && a.input[0] != document.activeElement && a.input.focus(); - if (a.yearshtml) { - var h = a.yearshtml; - setTimeout(function () { - h === a.yearshtml && a.yearshtml && a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml), h = a.yearshtml = null - }, 0) - } - }, _getBorders: function (a) { - var b = function (a) { - return{thin: 1, medium: 2, thick: 3}[a] || a - }; - return[parseFloat(b(a.css("border-left-width"))), parseFloat(b(a.css("border-top-width")))] - }, _checkOffset: function (a, b, c) { - var d = a.dpDiv.outerWidth(), e = a.dpDiv.outerHeight(), f = a.input ? a.input.outerWidth() : 0, g = a.input ? a.input.outerHeight() : 0, h = document.documentElement.clientWidth + $(document).scrollLeft(), i = document.documentElement.clientHeight + $(document).scrollTop(); - b.left -= this._get(a, "isRTL") ? d - f : 0, b.left -= c && b.left == a.input.offset().left ? $(document).scrollLeft() : 0, b.top -= c && b.top == a.input.offset().top + g ? $(document).scrollTop() : 0, b.left -= Math.min(b.left, b.left + d > h && h > d ? Math.abs(b.left + d - h) : 0), b.top -= Math.min(b.top, b.top + e > i && i > e ? Math.abs(e + g) : 0); - return b - }, _findPos: function (a) { - var b = this._getInst(a), c = this._get(b, "isRTL"); - while (a && (a.type == "hidden" || a.nodeType != 1 || $.expr.filters.hidden(a)))a = a[c ? "previousSibling" : "nextSibling"]; - var d = $(a).offset(); - return[d.left, d.top] - }, _hideDatepicker: function (a) { - var b = this._curInst; - if (!(!b || a && b != $.data(a, PROP_NAME)) && this._datepickerShowing) { - var c = this._get(b, "showAnim"), d = this._get(b, "duration"), e = this, f = function () { - $.datepicker._tidyDialog(b), e._curInst = null - }; - $.effects && $.effects[c] ? b.dpDiv.hide(c, $.datepicker._get(b, "showOptions"), d, f) : b.dpDiv[c == "slideDown" ? "slideUp" : c == "fadeIn" ? "fadeOut" : "hide"](c ? d : null, f), c || f(), this._datepickerShowing = !1; - var g = this._get(b, "onClose"); - g && g.apply(b.input ? b.input[0] : null, [b.input ? b.input.val() : "", b]), this._lastInput = null, this._inDialog && (this._dialogInput.css({position: "absolute", left: "0", top: "-100px"}), $.blockUI && ($.unblockUI(), $("body").append(this.dpDiv))), this._inDialog = !1 - } - }, _tidyDialog: function (a) { - a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar") - }, _checkExternalClick: function (a) { - if (!!$.datepicker._curInst) { - var b = $(a.target), c = $.datepicker._getInst(b[0]); - (b[0].id != $.datepicker._mainDivId && b.parents("#" + $.datepicker._mainDivId).length == 0 && !b.hasClass($.datepicker.markerClassName) && !b.closest("." + $.datepicker._triggerClass).length && $.datepicker._datepickerShowing && (!$.datepicker._inDialog || !$.blockUI) || b.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != c) && $.datepicker._hideDatepicker() - } - }, _adjustDate: function (a, b, c) { - var d = $(a), e = this._getInst(d[0]); - this._isDisabledDatepicker(d[0]) || (this._adjustInstDate(e, b + (c == "M" ? this._get(e, "showCurrentAtPos") : 0), c), this._updateDatepicker(e)) - }, _gotoToday: function (a) { - var b = $(a), c = this._getInst(b[0]); - if (this._get(c, "gotoCurrent") && c.currentDay)c.selectedDay = c.currentDay, c.drawMonth = c.selectedMonth = c.currentMonth, c.drawYear = c.selectedYear = c.currentYear; else { - var d = new Date; - c.selectedDay = d.getDate(), c.drawMonth = c.selectedMonth = d.getMonth(), c.drawYear = c.selectedYear = d.getFullYear() - } - this._notifyChange(c), this._adjustDate(b) - }, _selectMonthYear: function (a, b, c) { - var d = $(a), e = this._getInst(d[0]); - e["selected" + (c == "M" ? "Month" : "Year")] = e["draw" + (c == "M" ? "Month" : "Year")] = parseInt(b.options[b.selectedIndex].value, 10), this._notifyChange(e), this._adjustDate(d) - }, _selectDay: function (a, b, c, d) { - var e = $(a); - if (!$(d).hasClass(this._unselectableClass) && !this._isDisabledDatepicker(e[0])) { - var f = this._getInst(e[0]); - f.selectedDay = f.currentDay = $("a", d).html(), f.selectedMonth = f.currentMonth = b, f.selectedYear = f.currentYear = c, this._selectDate(a, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear)) - } - }, _clearDate: function (a) { - var b = $(a), c = this._getInst(b[0]); - this._selectDate(b, "") - }, _selectDate: function (a, b) { - var c = $(a), d = this._getInst(c[0]); - b = b != null ? b : this._formatDate(d), d.input && d.input.val(b), this._updateAlternate(d); - var e = this._get(d, "onSelect"); - e ? e.apply(d.input ? d.input[0] : null, [b, d]) : d.input && d.input.trigger("change"), d.inline ? this._updateDatepicker(d) : (this._hideDatepicker(), this._lastInput = d.input[0], typeof d.input[0] != "object" && d.input.focus(), this._lastInput = null) - }, _updateAlternate: function (a) { - var b = this._get(a, "altField"); - if (b) { - var c = this._get(a, "altFormat") || this._get(a, "dateFormat"), d = this._getDate(a), e = this.formatDate(c, d, this._getFormatConfig(a)); - $(b).each(function () { - $(this).val(e) - }) - } - }, noWeekends: function (a) { - var b = a.getDay(); - return[b > 0 && b < 6, ""] - }, iso8601Week: function (a) { - var b = new Date(a.getTime()); - b.setDate(b.getDate() + 4 - (b.getDay() || 7)); - var c = b.getTime(); - b.setMonth(0), b.setDate(1); - return Math.floor(Math.round((c - b) / 864e5) / 7) + 1 - }, parseDate: function (a, b, c) { - if (a == null || b == null)throw"Invalid arguments"; - b = typeof b == "object" ? b.toString() : b + ""; - if (b == "")return null; - var d = (c ? c.shortYearCutoff : null) || this._defaults.shortYearCutoff; - d = typeof d != "string" ? d : (new Date).getFullYear() % 100 + parseInt(d, 10); - var e = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort, f = (c ? c.dayNames : null) || this._defaults.dayNames, g = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort, h = (c ? c.monthNames : null) || this._defaults.monthNames, i = -1, j = -1, k = -1, l = -1, m = !1, n = function (b) { - var c = s + 1 < a.length && a.charAt(s + 1) == b; - c && s++; - return c - }, o = function (a) { - var c = n(a), d = a == "@" ? 14 : a == "!" ? 20 : a == "y" && c ? 4 : a == "o" ? 3 : 2, e = new RegExp("^\\d{1," + d + "}"), f = b.substring(r).match(e); - if (!f)throw"Missing number at position " + r; - r += f[0].length; - return parseInt(f[0], 10) - }, p = function (a, c, d) { - var e = $.map(n(a) ? d : c,function (a, b) { - return[ - [b, a] - ] - }).sort(function (a, b) { - return-(a[1].length - b[1].length) - }), f = -1; - $.each(e, function (a, c) { - var d = c[1]; - if (b.substr(r, d.length).toLowerCase() == d.toLowerCase()) { - f = c[0], r += d.length; - return!1 - } - }); - if (f != -1)return f + 1; - throw"Unknown name at position " + r - }, q = function () { - if (b.charAt(r) != a.charAt(s))throw"Unexpected literal at position " + r; - r++ - }, r = 0; - for (var s = 0; s < a.length; s++)if (m)a.charAt(s) == "'" && !n("'") ? m = !1 : q(); else switch (a.charAt(s)) { - case"d": - k = o("d"); - break; - case"D": - p("D", e, f); - break; - case"o": - l = o("o"); - break; - case"m": - j = o("m"); - break; - case"M": - j = p("M", g, h); - break; - case"y": - i = o("y"); - break; - case"@": - var t = new Date(o("@")); - i = t.getFullYear(), j = t.getMonth() + 1, k = t.getDate(); - break; - case"!": - var t = new Date((o("!") - this._ticksTo1970) / 1e4); - i = t.getFullYear(), j = t.getMonth() + 1, k = t.getDate(); - break; - case"'": - n("'") ? q() : m = !0; - break; - default: - q() - } - if (r < b.length)throw"Extra/unparsed characters found in date: " + b.substring(r); - i == -1 ? i = (new Date).getFullYear() : i < 100 && (i += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (i <= d ? 0 : -100)); - if (l > -1) { - j = 1, k = l; - for (; ;) { - var u = this._getDaysInMonth(i, j - 1); - if (k <= u)break; - j++, k -= u - } - } - var t = this._daylightSavingAdjust(new Date(i, j - 1, k)); - if (t.getFullYear() != i || t.getMonth() + 1 != j || t.getDate() != k)throw"Invalid date"; - return t - }, ATOM: "yy-mm-dd", COOKIE: "D, dd M yy", ISO_8601: "yy-mm-dd", RFC_822: "D, d M y", RFC_850: "DD, dd-M-y", RFC_1036: "D, d M y", RFC_1123: "D, d M yy", RFC_2822: "D, d M yy", RSS: "D, d M y", TICKS: "!", TIMESTAMP: "@", W3C: "yy-mm-dd", _ticksTo1970: (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 24 * 60 * 60 * 1e7, formatDate: function (a, b, c) { - if (!b)return""; - var d = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort, e = (c ? c.dayNames : null) || this._defaults.dayNames, f = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort, g = (c ? c.monthNames : null) || this._defaults.monthNames, h = function (b) { - var c = m + 1 < a.length && a.charAt(m + 1) == b; - c && m++; - return c - }, i = function (a, b, c) { - var d = "" + b; - if (h(a))while (d.length < c)d = "0" + d; - return d - }, j = function (a, b, c, d) { - return h(a) ? d[b] : c[b] - }, k = "", l = !1; - if (b)for (var m = 0; m < a.length; m++)if (l)a.charAt(m) == "'" && !h("'") ? l = !1 : k += a.charAt(m); else switch (a.charAt(m)) { - case"d": - k += i("d", b.getDate(), 2); - break; - case"D": - k += j("D", b.getDay(), d, e); - break; - case"o": - k += i("o", Math.round(((new Date(b.getFullYear(), b.getMonth(), b.getDate())).getTime() - (new Date(b.getFullYear(), 0, 0)).getTime()) / 864e5), 3); - break; - case"m": - k += i("m", b.getMonth() + 1, 2); - break; - case"M": - k += j("M", b.getMonth(), f, g); - break; - case"y": - k += h("y") ? b.getFullYear() : (b.getYear() % 100 < 10 ? "0" : "") + b.getYear() % 100; - break; - case"@": - k += b.getTime(); - break; - case"!": - k += b.getTime() * 1e4 + this._ticksTo1970; - break; - case"'": - h("'") ? k += "'" : l = !0; - break; - default: - k += a.charAt(m) - } - return k - }, _possibleChars: function (a) { - var b = "", c = !1, d = function (b) { - var c = e + 1 < a.length && a.charAt(e + 1) == b; - c && e++; - return c - }; - for (var e = 0; e < a.length; e++)if (c)a.charAt(e) == "'" && !d("'") ? c = !1 : b += a.charAt(e); else switch (a.charAt(e)) { - case"d": - case"m": - case"y": - case"@": - b += "0123456789"; - break; - case"D": - case"M": - return null; - case"'": - d("'") ? b += "'" : c = !0; - break; - default: - b += a.charAt(e) - } - return b - }, _get: function (a, b) { - return a.settings[b] !== undefined ? a.settings[b] : this._defaults[b] - }, _setDateFromField: function (a, b) { - if (a.input.val() != a.lastVal) { - var c = this._get(a, "dateFormat"), d = a.lastVal = a.input ? a.input.val() : null, e, f; - e = f = this._getDefaultDate(a); - var g = this._getFormatConfig(a); - try { - e = this.parseDate(c, d, g) || f - } catch (h) { - this.log(h), d = b ? "" : d - } - a.selectedDay = e.getDate(), a.drawMonth = a.selectedMonth = e.getMonth(), a.drawYear = a.selectedYear = e.getFullYear(), a.currentDay = d ? e.getDate() : 0, a.currentMonth = d ? e.getMonth() : 0, a.currentYear = d ? e.getFullYear() : 0, this._adjustInstDate(a) - } - }, _getDefaultDate: function (a) { - return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date)) - }, _determineDate: function (a, b, c) { - var d = function (a) { - var b = new Date; - b.setDate(b.getDate() + a); - return b - }, e = function (b) { - try { - return $.datepicker.parseDate($.datepicker._get(a, "dateFormat"), b, $.datepicker._getFormatConfig(a)) - } catch (c) { - } - var d = (b.toLowerCase().match(/^c/) ? $.datepicker._getDate(a) : null) || new Date, e = d.getFullYear(), f = d.getMonth(), g = d.getDate(), h = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, i = h.exec(b); - while (i) { - switch (i[2] || "d") { - case"d": - case"D": - g += parseInt(i[1], 10); - break; - case"w": - case"W": - g += parseInt(i[1], 10) * 7; - break; - case"m": - case"M": - f += parseInt(i[1], 10), g = Math.min(g, $.datepicker._getDaysInMonth(e, f)); - break; - case"y": - case"Y": - e += parseInt(i[1], 10), g = Math.min(g, $.datepicker._getDaysInMonth(e, f)) - } - i = h.exec(b) - } - return new Date(e, f, g) - }, f = b == null || b === "" ? c : typeof b == "string" ? e(b) : typeof b == "number" ? isNaN(b) ? c : d(b) : new Date(b.getTime()); - f = f && f.toString() == "Invalid Date" ? c : f, f && (f.setHours(0), f.setMinutes(0), f.setSeconds(0), f.setMilliseconds(0)); - return this._daylightSavingAdjust(f) - }, _daylightSavingAdjust: function (a) { - if (!a)return null; - a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0); - return a - }, _setDate: function (a, b, c) { - var d = !b, e = a.selectedMonth, f = a.selectedYear, g = this._restrictMinMax(a, this._determineDate(a, b, new Date)); - a.selectedDay = a.currentDay = g.getDate(), a.drawMonth = a.selectedMonth = a.currentMonth = g.getMonth(), a.drawYear = a.selectedYear = a.currentYear = g.getFullYear(), (e != a.selectedMonth || f != a.selectedYear) && !c && this._notifyChange(a), this._adjustInstDate(a), a.input && a.input.val(d ? "" : this._formatDate(a)) - }, _getDate: function (a) { - var b = !a.currentYear || a.input && a.input.val() == "" ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)); - return b - }, _generateHTML: function (a) { - var b = new Date; - b = this._daylightSavingAdjust(new Date(b.getFullYear(), b.getMonth(), b.getDate())); - var c = this._get(a, "isRTL"), d = this._get(a, "showButtonPanel"), e = this._get(a, "hideIfNoPrevNext"), f = this._get(a, "navigationAsDateFormat"), g = this._getNumberOfMonths(a), h = this._get(a, "showCurrentAtPos"), i = this._get(a, "stepMonths"), j = g[0] != 1 || g[1] != 1, k = this._daylightSavingAdjust(a.currentDay ? new Date(a.currentYear, a.currentMonth, a.currentDay) : new Date(9999, 9, 9)), l = this._getMinMaxDate(a, "min"), m = this._getMinMaxDate(a, "max"), n = a.drawMonth - h, o = a.drawYear; - n < 0 && (n += 12, o--); - if (m) { - var p = this._daylightSavingAdjust(new Date(m.getFullYear(), m.getMonth() - g[0] * g[1] + 1, m.getDate())); - p = l && p < l ? l : p; - while (this._daylightSavingAdjust(new Date(o, n, 1)) > p)n--, n < 0 && (n = 11, o--) - } - a.drawMonth = n, a.drawYear = o; - var q = this._get(a, "prevText"); - q = f ? this.formatDate(q, this._daylightSavingAdjust(new Date(o, n - i, 1)), this._getFormatConfig(a)) : q; - var r = this._canAdjustMonth(a, -1, o, n) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._adjustDate('#" + a.id + "', -" + i + ", 'M');\"" + ' title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e" : "w") + '">' + q + "</span></a>" : e ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e" : "w") + '">' + q + "</span></a>", s = this._get(a, "nextText"); - s = f ? this.formatDate(s, this._daylightSavingAdjust(new Date(o, n + i, 1)), this._getFormatConfig(a)) : s; - var t = this._canAdjustMonth(a, 1, o, n) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._adjustDate('#" + a.id + "', +" + i + ", 'M');\"" + ' title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w" : "e") + '">' + s + "</span></a>" : e ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w" : "e") + '">' + s + "</span></a>", u = this._get(a, "currentText"), v = this._get(a, "gotoCurrent") && a.currentDay ? k : b; - u = f ? this.formatDate(u, v, this._getFormatConfig(a)) : u; - var w = a.inline ? "" : '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid + '.datepicker._hideDatepicker();">' + this._get(a, "closeText") + "</button>", x = d ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (c ? w : "") + (this._isInRange(a, v) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._gotoToday('#" + a.id + "');\"" + ">" + u + "</button>" : "") + (c ? "" : w) + "</div>" : "", y = parseInt(this._get(a, "firstDay"), 10); - y = isNaN(y) ? 0 : y; - var z = this._get(a, "showWeek"), A = this._get(a, "dayNames"), B = this._get(a, "dayNamesShort"), C = this._get(a, "dayNamesMin"), D = this._get(a, "monthNames"), E = this._get(a, "monthNamesShort"), F = this._get(a, "beforeShowDay"), G = this._get(a, "showOtherMonths"), H = this._get(a, "selectOtherMonths"), I = this._get(a, "calculateWeek") || this.iso8601Week, J = this._getDefaultDate(a), K = ""; - for (var L = 0; L < g[0]; L++) { - var M = ""; - this.maxRows = 4; - for (var N = 0; N < g[1]; N++) { - var O = this._daylightSavingAdjust(new Date(o, n, a.selectedDay)), P = " ui-corner-all", Q = ""; - if (j) { - Q += '<div class="ui-datepicker-group'; - if (g[1] > 1)switch (N) { - case 0: - Q += " ui-datepicker-group-first", P = " ui-corner-" + (c ? "right" : "left"); - break; - case g[1] - 1: - Q += " ui-datepicker-group-last", P = " ui-corner-" + (c ? "left" : "right"); - break; - default: - Q += " ui-datepicker-group-middle", P = "" - } - Q += '">' - } - Q += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + P + '">' + (/all|left/.test(P) && L == 0 ? c ? t : r : "") + (/all|right/.test(P) && L == 0 ? c ? r : t : "") + this._generateMonthYearHeader(a, n, o, l, m, L > 0 || N > 0, D, E) + '</div><table class="ui-datepicker-calendar"><thead>' + "<tr>"; - var R = z ? '<th class="ui-datepicker-week-col">' + this._get(a, "weekHeader") + "</th>" : ""; - for (var S = 0; S < 7; S++) { - var T = (S + y) % 7; - R += "<th" + ((S + y + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + ">" + '<span title="' + A[T] + '">' + C[T] + "</span></th>" - } - Q += R + "</tr></thead><tbody>"; - var U = this._getDaysInMonth(o, n); - o == a.selectedYear && n == a.selectedMonth && (a.selectedDay = Math.min(a.selectedDay, U)); - var V = (this._getFirstDayOfMonth(o, n) - y + 7) % 7, W = Math.ceil((V + U) / 7), X = j ? this.maxRows > W ? this.maxRows : W : W; - this.maxRows = X; - var Y = this._daylightSavingAdjust(new Date(o, n, 1 - V)); - for (var Z = 0; Z < X; Z++) { - Q += "<tr>"; - var _ = z ? '<td class="ui-datepicker-week-col">' + this._get(a, "calculateWeek")(Y) + "</td>" : ""; - for (var S = 0; S < 7; S++) { - var ba = F ? F.apply(a.input ? a.input[0] : null, [Y]) : [!0, ""], bb = Y.getMonth() != n, bc = bb && !H || !ba[0] || l && Y < l || m && Y > m; - _ += '<td class="' + ((S + y + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (bb ? " ui-datepicker-other-month" : "") + (Y.getTime() == O.getTime() && n == a.selectedMonth && a._keyEvent || J.getTime() == Y.getTime() && J.getTime() == O.getTime() ? " " + this._dayOverClass : "") + (bc ? " " + this._unselectableClass + " ui-state-disabled" : "") + (bb && !G ? "" : " " + ba[1] + (Y.getTime() == k.getTime() ? " " + this._currentClass : "") + (Y.getTime() == b.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!bb || G) && ba[2] ? ' title="' + ba[2] + '"' : "") + (bc ? "" : ' onclick="DP_jQuery_' + dpuuid + ".datepicker._selectDay('#" + a.id + "'," + Y.getMonth() + "," + Y.getFullYear() + ', this);return false;"') + ">" + (bb && !G ? " " : bc ? '<span class="ui-state-default">' + Y.getDate() + "</span>" : '<a class="ui-state-default' + (Y.getTime() == b.getTime() ? " ui-state-highlight" : "") + (Y.getTime() == k.getTime() ? " ui-state-active" : "") + (bb ? " ui-priority-secondary" : "") + '" href="#">' + Y.getDate() + "</a>") + "</td>", Y.setDate(Y.getDate() + 1), Y = this._daylightSavingAdjust(Y) - } - Q += _ + "</tr>" - } - n++, n > 11 && (n = 0, o++), Q += "</tbody></table>" + (j ? "</div>" + (g[0] > 0 && N == g[1] - 1 ? '<div class="ui-datepicker-row-break"></div>' : "") : ""), M += Q - } - K += M - } - K += x + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !a.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : ""), a._keyEvent = !1; - return K - }, _generateMonthYearHeader: function (a, b, c, d, e, f, g, h) { - var i = this._get(a, "changeMonth"), j = this._get(a, "changeYear"), k = this._get(a, "showMonthAfterYear"), l = '<div class="ui-datepicker-title">', m = ""; - if (f || !i)m += '<span class="ui-datepicker-month">' + g[b] + "</span>"; else { - var n = d && d.getFullYear() == c, o = e && e.getFullYear() == c; - m += '<select class="ui-datepicker-month" onchange="DP_jQuery_' + dpuuid + ".datepicker._selectMonthYear('#" + a.id + "', this, 'M');\" " + ">"; - for (var p = 0; p < 12; p++)(!n || p >= d.getMonth()) && (!o || p <= e.getMonth()) && (m += '<option value="' + p + '"' + (p == b ? ' selected="selected"' : "") + ">" + h[p] + "</option>"); - m += "</select>" - } - k || (l += m + (f || !i || !j ? " " : "")); - if (!a.yearshtml) { - a.yearshtml = ""; - if (f || !j)l += '<span class="ui-datepicker-year">' + c + "</span>"; else { - var q = this._get(a, "yearRange").split(":"), r = (new Date).getFullYear(), s = function (a) { - var b = a.match(/c[+-].*/) ? c + parseInt(a.substring(1), 10) : a.match(/[+-].*/) ? r + parseInt(a, 10) : parseInt(a, 10); - return isNaN(b) ? r : b - }, t = s(q[0]), u = Math.max(t, s(q[1] || "")); - t = d ? Math.max(t, d.getFullYear()) : t, u = e ? Math.min(u, e.getFullYear()) : u, a.yearshtml += '<select class="ui-datepicker-year" onchange="DP_jQuery_' + dpuuid + ".datepicker._selectMonthYear('#" + a.id + "', this, 'Y');\" " + ">"; - for (; t <= u; t++)a.yearshtml += '<option value="' + t + '"' + (t == c ? ' selected="selected"' : "") + ">" + t + "</option>"; - a.yearshtml += "</select>", l += a.yearshtml, a.yearshtml = null - } - } - l += this._get(a, "yearSuffix"), k && (l += (f || !i || !j ? " " : "") + m), l += "</div>"; - return l - }, _adjustInstDate: function (a, b, c) { - var d = a.drawYear + (c == "Y" ? b : 0), e = a.drawMonth + (c == "M" ? b : 0), f = Math.min(a.selectedDay, this._getDaysInMonth(d, e)) + (c == "D" ? b : 0), g = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(d, e, f))); - a.selectedDay = g.getDate(), a.drawMonth = a.selectedMonth = g.getMonth(), a.drawYear = a.selectedYear = g.getFullYear(), (c == "M" || c == "Y") && this._notifyChange(a) - }, _restrictMinMax: function (a, b) { - var c = this._getMinMaxDate(a, "min"), d = this._getMinMaxDate(a, "max"), e = c && b < c ? c : b; - e = d && e > d ? d : e; - return e - }, _notifyChange: function (a) { - var b = this._get(a, "onChangeMonthYear"); - b && b.apply(a.input ? a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a]) - }, _getNumberOfMonths: function (a) { - var b = this._get(a, "numberOfMonths"); - return b == null ? [1, 1] : typeof b == "number" ? [1, b] : b - }, _getMinMaxDate: function (a, b) { - return this._determineDate(a, this._get(a, b + "Date"), null) - }, _getDaysInMonth: function (a, b) { - return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate() - }, _getFirstDayOfMonth: function (a, b) { - return(new Date(a, b, 1)).getDay() - }, _canAdjustMonth: function (a, b, c, d) { - var e = this._getNumberOfMonths(a), f = this._daylightSavingAdjust(new Date(c, d + (b < 0 ? b : e[0] * e[1]), 1)); - b < 0 && f.setDate(this._getDaysInMonth(f.getFullYear(), f.getMonth())); - return this._isInRange(a, f) - }, _isInRange: function (a, b) { - var c = this._getMinMaxDate(a, "min"), d = this._getMinMaxDate(a, "max"); - return(!c || b.getTime() >= c.getTime()) && (!d || b.getTime() <= d.getTime()) - }, _getFormatConfig: function (a) { - var b = this._get(a, "shortYearCutoff"); - b = typeof b != "string" ? b : (new Date).getFullYear() % 100 + parseInt(b, 10); - return{shortYearCutoff: b, dayNamesShort: this._get(a, "dayNamesShort"), dayNames: this._get(a, "dayNames"), monthNamesShort: this._get(a, "monthNamesShort"), monthNames: this._get(a, "monthNames")} - }, _formatDate: function (a, b, c, d) { - b || (a.currentDay = a.selectedDay, a.currentMonth = a.selectedMonth, a.currentYear = a.selectedYear); - var e = b ? typeof b == "object" ? b : this._daylightSavingAdjust(new Date(d, c, b)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)); - return this.formatDate(this._get(a, "dateFormat"), e, this._getFormatConfig(a)) - }}), $.fn.datepicker = function (a) { - if (!this.length)return this; - $.datepicker.initialized || ($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv), $.datepicker.initialized = !0); - var b = Array.prototype.slice.call(arguments, 1); - if (typeof a == "string" && (a == "isDisabled" || a == "getDate" || a == "widget" - ))return $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b)); - if (a == "option" && arguments.length == 2 && typeof arguments[1] == "string")return $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b)); - return this.each(function () { - typeof a == "string" ? $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this].concat(b)) : $.datepicker._attachDatepicker(this, a) - }) - }, $.datepicker = new Datepicker, $.datepicker.initialized = !1, $.datepicker.uuid = (new Date).getTime(), $.datepicker.version = "1.8.18", window["DP_jQuery_" + dpuuid] = $ -}(jQuery), function (a, b) { - var c = "ui-dialog ui-widget ui-widget-content ui-corner-all ", d = {buttons: !0, height: !0, maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0, width: !0}, e = {maxHeight: !0, maxWidth: !0, minHeight: !0, minWidth: !0}, f = a.attrFn || {val: !0, css: !0, html: !0, text: !0, data: !0, width: !0, height: !0, offset: !0, click: !0}; - a.widget("ui.dialog", {options: {autoOpen: !0, buttons: {}, closeOnEscape: !0, closeText: "close", dialogClass: "", draggable: !0, hide: null, height: "auto", maxHeight: !1, maxWidth: !1, minHeight: 150, minWidth: 150, modal: !1, position: {my: "center", at: "center", collision: "fit", using: function (b) { - var c = a(this).css(b).offset().top; - c < 0 && a(this).css("top", b.top - c) - }}, resizable: !0, show: null, stack: !0, title: "", width: 300, zIndex: 1e3}, _create: function () { - this.originalTitle = this.element.attr("title"), typeof this.originalTitle != "string" && (this.originalTitle = ""), this.options.title = this.options.title || this.originalTitle; - var b = this, d = b.options, e = d.title || " ", f = a.ui.dialog.getTitleId(b.element), g = (b.uiDialog = a("<div></div>")).appendTo(document.body).hide().addClass(c + d.dialogClass).css({zIndex: d.zIndex}).attr("tabIndex", -1).css("outline", 0).keydown(function (c) { - d.closeOnEscape && !c.isDefaultPrevented() && c.keyCode && c.keyCode === a.ui.keyCode.ESCAPE && (b.close(c), c.preventDefault()) - }).attr({role: "dialog", "aria-labelledby": f}).mousedown(function (a) { - b.moveToTop(!1, a) - }), h = b.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g), i = (b.uiDialogTitlebar = a("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), j = a('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(function () { - j.addClass("ui-state-hover") - },function () { - j.removeClass("ui-state-hover") - }).focus(function () { - j.addClass("ui-state-focus") - }).blur(function () { - j.removeClass("ui-state-focus") - }).click(function (a) { - b.close(a); - return!1 - }).appendTo(i), k = (b.uiDialogTitlebarCloseText = a("<span></span>")).addClass("ui-icon ui-icon-closethick").text(d.closeText).appendTo(j), l = a("<span></span>").addClass("ui-dialog-title").attr("id", f).html(e).prependTo(i); - a.isFunction(d.beforeclose) && !a.isFunction(d.beforeClose) && (d.beforeClose = d.beforeclose), i.find("*").add(i).disableSelection(), d.draggable && a.fn.draggable && b._makeDraggable(), d.resizable && a.fn.resizable && b._makeResizable(), b._createButtons(d.buttons), b._isOpen = !1, a.fn.bgiframe && g.bgiframe() - }, _init: function () { - this.options.autoOpen && this.open() - }, destroy: function () { - var a = this; - a.overlay && a.overlay.destroy(), a.uiDialog.hide(), a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"), a.uiDialog.remove(), a.originalTitle && a.element.attr("title", a.originalTitle); - return a - }, widget: function () { - return this.uiDialog - }, close: function (b) { - var c = this, d, e; - if (!1 !== c._trigger("beforeClose", b)) { - c.overlay && c.overlay.destroy(), c.uiDialog.unbind("keypress.ui-dialog"), c._isOpen = !1, c.options.hide ? c.uiDialog.hide(c.options.hide, function () { - c._trigger("close", b) - }) : (c.uiDialog.hide(), c._trigger("close", b)), a.ui.dialog.overlay.resize(), c.options.modal && (d = 0, a(".ui-dialog").each(function () { - this !== c.uiDialog[0] && (e = a(this).css("z-index"), isNaN(e) || (d = Math.max(d, e))) - }), a.ui.dialog.maxZ = d); - return c - } - }, isOpen: function () { - return this._isOpen - }, moveToTop: function (b, c) { - var d = this, e = d.options, f; - if (e.modal && !b || !e.stack && !e.modal)return d._trigger("focus", c); - e.zIndex > a.ui.dialog.maxZ && (a.ui.dialog.maxZ = e.zIndex), d.overlay && (a.ui.dialog.maxZ += 1, d.overlay.$el.css("z-index", a.ui.dialog.overlay.maxZ = a.ui.dialog.maxZ)), f = {scrollTop: d.element.scrollTop(), scrollLeft: d.element.scrollLeft()}, a.ui.dialog.maxZ += 1, d.uiDialog.css("z-index", a.ui.dialog.maxZ), d.element.attr(f), d._trigger("focus", c); - return d - }, open: function () { - if (!this._isOpen) { - var b = this, c = b.options, d = b.uiDialog; - b.overlay = c.modal ? new a.ui.dialog.overlay(b) : null, b._size(), b._position(c.position), d.show(c.show), b.moveToTop(!0), c.modal && d.bind("keydown.ui-dialog", function (b) { - if (b.keyCode === a.ui.keyCode.TAB) { - var c = a(":tabbable", this), d = c.filter(":first"), e = c.filter(":last"); - if (b.target === e[0] && !b.shiftKey) { - d.focus(1); - return!1 - } - if (b.target === d[0] && b.shiftKey) { - e.focus(1); - return!1 - } - } - }), a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus(), b._isOpen = !0, b._trigger("open"); - return b - } - }, _createButtons: function (b) { - var c = this, d = !1, e = a("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), g = a("<div></div>").addClass("ui-dialog-buttonset").appendTo(e); - c.uiDialog.find(".ui-dialog-buttonpane").remove(), typeof b == "object" && b !== null && a.each(b, function () { - return!(d = !0) - }), d && (a.each(b, function (b, d) { - d = a.isFunction(d) ? {click: d, text: b} : d; - var e = a('<button type="button"></button>').click(function () { - d.click.apply(c.element[0], arguments) - }).appendTo(g); - a.each(d, function (a, b) { - a !== "click" && (a in f ? e[a](b) : e.attr(a, b)) - }), a.fn.button && e.button() - }), e.appendTo(c.uiDialog)) - }, _makeDraggable: function () { - function f(a) { - return{position: a.position, offset: a.offset} - } - - var b = this, c = b.options, d = a(document), e; - b.uiDialog.draggable({cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function (d, g) { - e = c.height === "auto" ? "auto" : a(this).height(), a(this).height(a(this).height()).addClass("ui-dialog-dragging"), b._trigger("dragStart", d, f(g)) - }, drag: function (a, c) { - b._trigger("drag", a, f(c)) - }, stop: function (g, h) { - c.position = [h.position.left - d.scrollLeft(), h.position.top - d.scrollTop()], a(this).removeClass("ui-dialog-dragging").height(e), b._trigger("dragStop", g, f(h)), a.ui.dialog.overlay.resize() - }}) - }, _makeResizable: function (c) { - function h(a) { - return{originalPosition: a.originalPosition, originalSize: a.originalSize, position: a.position, size: a.size} - } - - c = c === b ? this.options.resizable : c; - var d = this, e = d.options, f = d.uiDialog.css("position"), g = typeof c == "string" ? c : "n,e,s,w,se,sw,ne,nw"; - d.uiDialog.resizable({cancel: ".ui-dialog-content", containment: "document", alsoResize: d.element, maxWidth: e.maxWidth, maxHeight: e.maxHeight, minWidth: e.minWidth, minHeight: d._minHeight(), handles: g, start: function (b, c) { - a(this).addClass("ui-dialog-resizing"), d._trigger("resizeStart", b, h(c)) - }, resize: function (a, b) { - d._trigger("resize", a, h(b)) - }, stop: function (b, c) { - a(this).removeClass("ui-dialog-resizing"), e.height = a(this).height(), e.width = a(this).width(), d._trigger("resizeStop", b, h(c)), a.ui.dialog.overlay.resize() - }}).css("position", f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se") - }, _minHeight: function () { - var a = this.options; - return a.height === "auto" ? a.minHeight : Math.min(a.minHeight, a.height) - }, _position: function (b) { - var c = [], d = [0, 0], e; - if (b) { - if (typeof b == "string" || typeof b == "object" && "0"in b)c = b.split ? b.split(" ") : [b[0], b[1]], c.length === 1 && (c[1] = c[0]), a.each(["left", "top"], function (a, b) { - +c[a] === c[a] && (d[a] = c[a], c[a] = b) - }), b = {my: c.join(" "), at: c.join(" "), offset: d.join(" ")}; - b = a.extend({}, a.ui.dialog.prototype.options.position, b) - } else b = a.ui.dialog.prototype.options.position; - e = this.uiDialog.is(":visible"), e || this.uiDialog.show(), this.uiDialog.css({top: 0, left: 0}).position(a.extend({of: window}, b)), e || this.uiDialog.hide() - }, _setOptions: function (b) { - var c = this, f = {}, g = !1; - a.each(b, function (a, b) { - c._setOption(a, b), a in d && (g = !0), a in e && (f[a] = b) - }), g && this._size(), this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", f) - }, _setOption: function (b, d) { - var e = this, f = e.uiDialog; - switch (b) { - case"beforeclose": - b = "beforeClose"; - break; - case"buttons": - e._createButtons(d); - break; - case"closeText": - e.uiDialogTitlebarCloseText.text("" + d); - break; - case"dialogClass": - f.removeClass(e.options.dialogClass).addClass(c + d); - break; - case"disabled": - d ? f.addClass("ui-dialog-disabled") : f.removeClass("ui-dialog-disabled"); - break; - case"draggable": - var g = f.is(":data(draggable)"); - g && !d && f.draggable("destroy"), !g && d && e._makeDraggable(); - break; - case"position": - e._position(d); - break; - case"resizable": - var h = f.is(":data(resizable)"); - h && !d && f.resizable("destroy"), h && typeof d == "string" && f.resizable("option", "handles", d), !h && d !== !1 && e._makeResizable(d); - break; - case"title": - a(".ui-dialog-title", e.uiDialogTitlebar).html("" + (d || " ")) - } - a.Widget.prototype._setOption.apply(e, arguments) - }, _size: function () { - var b = this.options, c, d, e = this.uiDialog.is(":visible"); - this.element.show().css({width: "auto", minHeight: 0, height: 0}), b.minWidth > b.width && (b.width = b.minWidth), c = this.uiDialog.css({height: "auto", width: b.width}).height(), d = Math.max(0, b.minHeight - c); - if (b.height === "auto")if (a.support.minHeight)this.element.css({minHeight: d, height: "auto"}); else { - this.uiDialog.show(); - var f = this.element.css("height", "auto").height(); - e || this.uiDialog.hide(), this.element.height(Math.max(f, d)) - } else this.element.height(Math.max(b.height - c, 0)); - this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight()) - }}), a.extend(a.ui.dialog, {version: "1.8.18", uuid: 0, maxZ: 0, getTitleId: function (a) { - var b = a.attr("id"); - b || (this.uuid += 1, b = this.uuid); - return"ui-dialog-title-" + b - }, overlay: function (b) { - this.$el = a.ui.dialog.overlay.create(b) - }}), a.extend(a.ui.dialog.overlay, {instances: [], oldInstances: [], maxZ: 0, events: a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function (a) { - return a + ".dialog-overlay" - }).join(" "), create: function (b) { - this.instances.length === 0 && (setTimeout(function () { - a.ui.dialog.overlay.instances.length && a(document).bind(a.ui.dialog.overlay.events, function (b) { - if (a(b.target).zIndex() < a.ui.dialog.overlay.maxZ)return!1 - }) - }, 1), a(document).bind("keydown.dialog-overlay", function (c) { - b.options.closeOnEscape && !c.isDefaultPrevented() && c.keyCode && c.keyCode === a.ui.keyCode.ESCAPE && (b.close(c), c.preventDefault()) - }), a(window).bind("resize.dialog-overlay", a.ui.dialog.overlay.resize)); - var c = (this.oldInstances.pop() || a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width: this.width(), height: this.height()}); - a.fn.bgiframe && c.bgiframe(), this.instances.push(c); - return c - }, destroy: function (b) { - var c = a.inArray(b, this.instances); - c != -1 && this.oldInstances.push(this.instances.splice(c, 1)[0]), this.instances.length === 0 && a([document, window]).unbind(".dialog-overlay"), b.remove(); - var d = 0; - a.each(this.instances, function () { - d = Math.max(d, this.css("z-index")) - }), this.maxZ = d - }, height: function () { - var b, c; - if (a.browser.msie && a.browser.version < 7) { - b = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), c = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight); - return b < c ? a(window).height() + "px" : b + "px" - } - return a(document).height() + "px" - }, width: function () { - var b, c; - if (a.browser.msie) { - b = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), c = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); - return b < c ? a(window).width() + "px" : b + "px" - } - return a(document).width() + "px" - }, resize: function () { - var b = a([]); - a.each(a.ui.dialog.overlay.instances, function () { - b = b.add(this) - }), b.css({width: 0, height: 0}).css({width: a.ui.dialog.overlay.width(), height: a.ui.dialog.overlay.height()}) - }}), a.extend(a.ui.dialog.overlay.prototype, {destroy: function () { - a.ui.dialog.overlay.destroy(this.$el) - }}) -}(jQuery), function (a, b) { - a.ui = a.ui || {}; - var c = /left|center|right/, d = /top|center|bottom/, e = "center", f = {}, g = a.fn.position, h = a.fn.offset; - a.fn.position = function (b) { - if (!b || !b.of)return g.apply(this, arguments); - b = a.extend({}, b); - var h = a(b.of), i = h[0], j = (b.collision || "flip").split(" "), k = b.offset ? b.offset.split(" ") : [0, 0], l, m, n; - i.nodeType === 9 ? (l = h.width(), m = h.height(), n = {top: 0, left: 0}) : i.setTimeout ? (l = h.width(), m = h.height(), n = {top: h.scrollTop(), left: h.scrollLeft()}) : i.preventDefault ? (b.at = "left top", l = m = 0, n = {top: b.of.pageY, left: b.of.pageX}) : (l = h.outerWidth(), m = h.outerHeight(), n = h.offset()), a.each(["my", "at"], function () { - var a = (b[this] || "").split(" "); - a.length === 1 && (a = c.test(a[0]) ? a.concat([e]) : d.test(a[0]) ? [e].concat(a) : [e, e]), a[0] = c.test(a[0]) ? a[0] : e, a[1] = d.test(a[1]) ? a[1] : e, b[this] = a - }), j.length === 1 && (j[1] = j[0]), k[0] = parseInt(k[0], 10) || 0, k.length === 1 && (k[1] = k[0]), k[1] = parseInt(k[1], 10) || 0, b.at[0] === "right" ? n.left += l : b.at[0] === e && (n.left += l / 2), b.at[1] === "bottom" ? n.top += m : b.at[1] === e && (n.top += m / 2), n.left += k[0], n.top += k[1]; - return this.each(function () { - var c = a(this), d = c.outerWidth(), g = c.outerHeight(), h = parseInt(a.curCSS(this, "marginLeft", !0)) || 0, i = parseInt(a.curCSS(this, "marginTop", !0)) || 0, o = d + h + (parseInt(a.curCSS(this, "marginRight", !0)) || 0), p = g + i + (parseInt(a.curCSS(this, "marginBottom", !0)) || 0), q = a.extend({}, n), r; - b.my[0] === "right" ? q.left -= d : b.my[0] === e && (q.left -= d / 2), b.my[1] === "bottom" ? q.top -= g : b.my[1] === e && (q.top -= g / 2), f.fractions || (q.left = Math.round(q.left), q.top = Math.round(q.top)), r = {left: q.left - h, top: q.top - i}, a.each(["left", "top"], function (c, e) { - a.ui.position[j[c]] && a.ui.position[j[c]][e](q, {targetWidth: l, targetHeight: m, elemWidth: d, elemHeight: g, collisionPosition: r, collisionWidth: o, collisionHeight: p, offset: k, my: b.my, at: b.at}) - }), a.fn.bgiframe && c.bgiframe(), c.offset(a.extend(q, {using: b.using})) - }) - }, a.ui.position = {fit: {left: function (b, c) { - var d = a(window), e = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(); - b.left = e > 0 ? b.left - e : Math.max(b.left - c.collisionPosition.left, b.left) - }, top: function (b, c) { - var d = a(window), e = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(); - b.top = e > 0 ? b.top - e : Math.max(b.top - c.collisionPosition.top, b.top) - }}, flip: {left: function (b, c) { - if (c.at[0] !== e) { - var d = a(window), f = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(), g = c.my[0] === "left" ? -c.elemWidth : c.my[0] === "right" ? c.elemWidth : 0, h = c.at[0] === "left" ? c.targetWidth : -c.targetWidth, i = -2 * c.offset[0]; - b.left += c.collisionPosition.left < 0 ? g + h + i : f > 0 ? g + h + i : 0 - } - }, top: function (b, c) { - if (c.at[1] !== e) { - var d = a(window), f = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(), g = c.my[1] === "top" ? -c.elemHeight : c.my[1] === "bottom" ? c.elemHeight : 0, h = c.at[1] === "top" ? c.targetHeight : -c.targetHeight, i = -2 * c.offset[1]; - b.top += c.collisionPosition.top < 0 ? g + h + i : f > 0 ? g + h + i : 0 - } - }}}, a.offset.setOffset || (a.offset.setOffset = function (b, c) { - /static/.test(a.curCSS(b, "position")) && (b.style.position = "relative"); - var d = a(b), e = d.offset(), f = parseInt(a.curCSS(b, "top", !0), 10) || 0, g = parseInt(a.curCSS(b, "left", !0), 10) || 0, h = {top: c.top - e.top + f, left: c.left - e.left + g}; - "using"in c ? c.using.call(b, h) : d.css(h) - }, a.fn.offset = function (b) { - var c = this[0]; - if (!c || !c.ownerDocument)return null; - if (b)return this.each(function () { - a.offset.setOffset(this, b) - }); - return h.call(this) - }), function () { - var b = document.getElementsByTagName("body")[0], c = document.createElement("div"), d, e, g, h, i; - d = document.createElement(b ? "div" : "body"), g = {visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none"}, b && a.extend(g, {position: "absolute", left: "-1000px", top: "-1000px"}); - for (var j in g)d.style[j] = g[j]; - d.appendChild(c), e = b || document.documentElement, e.insertBefore(d, e.firstChild), c.style.cssText = "position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;", h = a(c).offset(function (a, b) { - return b - }).offset(), d.innerHTML = "", e.removeChild(d), i = h.top + h.left + (b ? 2e3 : 0), f.fractions = i > 21 && i < 22 - }() -}(jQuery), function (a, b) { - a.widget("ui.progressbar", {options: {value: 0, max: 100}, min: 0, _create: function () { - this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role: "progressbar", "aria-valuemin": this.min, "aria-valuemax": this.options.max, "aria-valuenow": this._value()}), this.valueDiv = a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element), this.oldValue = this._value(), this._refreshValue() - }, destroy: function () { - this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"), this.valueDiv.remove(), a.Widget.prototype.destroy.apply(this, arguments) - }, value: function (a) { - if (a === b)return this._value(); - this._setOption("value", a); - return this - }, _setOption: function (b, c) { - b === "value" && (this.options.value = c, this._refreshValue(), this._value() === this.options.max && this._trigger("complete")), a.Widget.prototype._setOption.apply(this, arguments) - }, _value: function () { - var a = this.options.value; - typeof a != "number" && (a = 0); - return Math.min(this.options.max, Math.max(this.min, a)) - }, _percentage: function () { - return 100 * this._value() / this.options.max - }, _refreshValue: function () { - var a = this.value(), b = this._percentage(); - this.oldValue !== a && (this.oldValue = a, this._trigger("change")), this.valueDiv.toggle(a > this.min).toggleClass("ui-corner-right", a === this.options.max).width(b.toFixed(0) + "%"), this.element.attr("aria-valuenow", a) - }}), a.extend(a.ui.progressbar, {version: "1.8.18"}) -}(jQuery), function (a, b) { - var c = 5; - a.widget("ui.slider", a.ui.mouse, {widgetEventPrefix: "slide", options: {animate: !1, distance: 0, max: 100, min: 0, orientation: "horizontal", range: !1, step: 1, value: 0, values: null}, _create: function () { - var b = this, d = this.options, e = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"), f = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>", g = d.values && d.values.length || 1, h = []; - this._keySliding = !1, this._mouseSliding = !1, this._animateOff = !0, this._handleIndex = null, this._detectOrientation(), this._mouseInit(), this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget" + " ui-widget-content" + " ui-corner-all" + (d.disabled ? " ui-slider-disabled ui-disabled" : "")), this.range = a([]), d.range && (d.range === !0 && (d.values || (d.values = [this._valueMin(), this._valueMin()]), d.values.length && d.values.length !== 2 && (d.values = [d.values[0], d.values[0]])), this.range = a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header" + (d.range === "min" || d.range === "max" ? " ui-slider-range-" + d.range : ""))); - for (var i = e.length; i < g; i += 1)h.push(f); - this.handles = e.add(a(h.join("")).appendTo(b.element)), this.handle = this.handles.eq(0), this.handles.add(this.range).filter("a").click(function (a) { - a.preventDefault() - }).hover(function () { - d.disabled || a(this).addClass("ui-state-hover") - },function () { - a(this).removeClass("ui-state-hover") - }).focus(function () { - d.disabled ? a(this).blur() : (a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"), a(this).addClass("ui-state-focus")) - }).blur(function () { - a(this).removeClass("ui-state-focus") - }), this.handles.each(function (b) { - a(this).data("index.ui-slider-handle", b) - }), this.handles.keydown(function (d) { - var e = a(this).data("index.ui-slider-handle"), f, g, h, i; - if (!b.options.disabled) { - switch (d.keyCode) { - case a.ui.keyCode.HOME: - case a.ui.keyCode.END: - case a.ui.keyCode.PAGE_UP: - case a.ui.keyCode.PAGE_DOWN: - case a.ui.keyCode.UP: - case a.ui.keyCode.RIGHT: - case a.ui.keyCode.DOWN: - case a.ui.keyCode.LEFT: - d.preventDefault(); - if (!b._keySliding) { - b._keySliding = !0, a(this).addClass("ui-state-active"), f = b._start(d, e); - if (f === !1)return - } - } - i = b.options.step, b.options.values && b.options.values.length ? g = h = b.values(e) : g = h = b.value(); - switch (d.keyCode) { - case a.ui.keyCode.HOME: - h = b._valueMin(); - break; - case a.ui.keyCode.END: - h = b._valueMax(); - break; - case a.ui.keyCode.PAGE_UP: - h = b._trimAlignValue(g + (b._valueMax() - b._valueMin()) / c); - break; - case a.ui.keyCode.PAGE_DOWN: - h = b._trimAlignValue(g - (b._valueMax() - b._valueMin()) / c); - break; - case a.ui.keyCode.UP: - case a.ui.keyCode.RIGHT: - if (g === b._valueMax())return; - h = b._trimAlignValue(g + i); - break; - case a.ui.keyCode.DOWN: - case a.ui.keyCode.LEFT: - if (g === b._valueMin())return; - h = b._trimAlignValue(g - i) - } - b._slide(d, e, h) - } - }).keyup(function (c) { - var d = a(this).data("index.ui-slider-handle"); - b._keySliding && (b._keySliding = !1, b._stop(c, d), b._change(c, d), a(this).removeClass("ui-state-active")) - }), this._refreshValue(), this._animateOff = !1 - }, destroy: function () { - this.handles.remove(), this.range.remove(), this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"), this._mouseDestroy(); - return this - }, _mouseCapture: function (b) { - var c = this.options, d, e, f, g, h, i, j, k, l; - if (c.disabled)return!1; - this.elementSize = {width: this.element.outerWidth(), height: this.element.outerHeight()}, this.elementOffset = this.element.offset(), d = {x: b.pageX, y: b.pageY}, e = this._normValueFromMouse(d), f = this._valueMax() - this._valueMin() + 1, h = this, this.handles.each(function (b) { - var c = Math.abs(e - h.values(b)); - f > c && (f = c, g = a(this), i = b) - }), c.range === !0 && this.values(1) === c.min && (i += 1, g = a(this.handles[i])), j = this._start(b, i); - if (j === !1)return!1; - this._mouseSliding = !0, h._handleIndex = i, g.addClass("ui-state-active").focus(), k = g.offset(), l = !a(b.target).parents().andSelf().is(".ui-slider-handle"), this._clickOffset = l ? {left: 0, top: 0} : {left: b.pageX - k.left - g.width() / 2, top: b.pageY - k.top - g.height() / 2 - (parseInt(g.css("borderTopWidth"), 10) || 0) - (parseInt(g.css("borderBottomWidth"), 10) || 0) + (parseInt(g.css("marginTop"), 10) || 0)}, this.handles.hasClass("ui-state-hover") || this._slide(b, i, e), this._animateOff = !0; - return!0 - }, _mouseStart: function (a) { - return!0 - }, _mouseDrag: function (a) { - var b = {x: a.pageX, y: a.pageY}, c = this._normValueFromMouse(b); - this._slide(a, this._handleIndex, c); - return!1 - }, _mouseStop: function (a) { - this.handles.removeClass("ui-state-active"), this._mouseSliding = !1, this._stop(a, this._handleIndex), this._change(a, this._handleIndex), this._handleIndex = null, this._clickOffset = null, this._animateOff = !1; - return!1 - }, _detectOrientation: function () { - this.orientation = this.options.orientation === "vertical" ? "vertical" : "horizontal" - }, _normValueFromMouse: function (a) { - var b, c, d, e, f; - this.orientation === "horizontal" ? (b = this.elementSize.width, c = a.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)) : (b = this.elementSize.height, c = a.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)), d = c / b, d > 1 && (d = 1), d < 0 && (d = 0), this.orientation === "vertical" && (d = 1 - d), e = this._valueMax() - this._valueMin(), f = this._valueMin() + d * e; - return this._trimAlignValue(f) - }, _start: function (a, b) { - var c = {handle: this.handles[b], value: this.value()}; - this.options.values && this.options.values.length && (c.value = this.values(b), c.values = this.values()); - return this._trigger("start", a, c) - }, _slide: function (a, b, c) { - var d, e, f; - this.options.values && this.options.values.length ? (d = this.values(b ? 0 : 1), this.options.values.length === 2 && this.options.range === !0 && (b === 0 && c > d || b === 1 && c < d) && (c = d), c !== this.values(b) && (e = this.values(), e[b] = c, f = this._trigger("slide", a, {handle: this.handles[b], value: c, values: e}), d = this.values(b ? 0 : 1), f !== !1 && this.values(b, c, !0))) : c !== this.value() && (f = this._trigger("slide", a, {handle: this.handles[b], value: c}), f !== !1 && this.value(c)) - }, _stop: function (a, b) { - var c = {handle: this.handles[b], value: this.value()}; - this.options.values && this.options.values.length && (c.value = this.values(b), c.values = this.values()), this._trigger("stop", a, c) - }, _change: function (a, b) { - if (!this._keySliding && !this._mouseSliding) { - var c = {handle: this.handles[b], value: this.value()}; - this.options.values && this.options.values.length && (c.value = this.values(b), c.values = this.values()), this._trigger("change", a, c) - } - }, value: function (a) { - if (arguments.length)this.options.value = this._trimAlignValue(a), this._refreshValue(), this._change(null, 0); else return this._value() - }, values: function (b, c) { - var d, e, f; - if (arguments.length > 1)this.options.values[b] = this._trimAlignValue(c), this._refreshValue(), this._change(null, b); else { - if (!arguments.length)return this._values(); - if (!a.isArray(arguments[0]))return this.options.values && this.options.values.length ? this._values(b) : this.value(); - d = this.options.values, e = arguments[0]; - for (f = 0; f < d.length; f += 1)d[f] = this._trimAlignValue(e[f]), this._change(null, f); - this._refreshValue() - } - }, _setOption: function (b, c) { - var d, e = 0; - a.isArray(this.options.values) && (e = this.options.values.length), a.Widget.prototype._setOption.apply(this, arguments); - switch (b) { - case"disabled": - c ? (this.handles.filter(".ui-state-focus").blur(), this.handles.removeClass("ui-state-hover"), this.handles.propAttr("disabled", !0), this.element.addClass("ui-disabled")) : (this.handles.propAttr("disabled", !1), this.element.removeClass("ui-disabled")); - break; - case"orientation": - this._detectOrientation(), this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation), this._refreshValue(); - break; - case"value": - this._animateOff = !0, this._refreshValue(), this._change(null, 0), this._animateOff = !1; - break; - case"values": - this._animateOff = !0, this._refreshValue(); - for (d = 0; d < e; d += 1)this._change(null, d); - this._animateOff = !1 - } - }, _value: function () { - var a = this.options.value; - a = this._trimAlignValue(a); - return a - }, _values: function (a) { - var b, c, d; - if (arguments.length) { - b = this.options.values[a], b = this._trimAlignValue(b); - return b - } - c = this.options.values.slice(); - for (d = 0; d < c.length; d += 1)c[d] = this._trimAlignValue(c[d]); - return c - }, _trimAlignValue: function (a) { - if (a <= this._valueMin())return this._valueMin(); - if (a >= this._valueMax())return this._valueMax(); - var b = this.options.step > 0 ? this.options.step : 1, c = (a - this._valueMin()) % b, d = a - c; - Math.abs(c) * 2 >= b && (d += c > 0 ? b : -b); - return parseFloat(d.toFixed(5)) - }, _valueMin: function () { - return this.options.min - }, _valueMax: function () { - return this.options.max - }, _refreshValue: function () { - var b = this.options.range, c = this.options, d = this, e = this._animateOff ? !1 : c.animate, f, g = {}, h, i, j, k; - this.options.values && this.options.values.length ? this.handles.each(function (b, i) { - f = (d.values(b) - d._valueMin()) / (d._valueMax() - d._valueMin()) * 100, g[d.orientation === "horizontal" ? "left" : "bottom"] = f + "%", a(this).stop(1, 1)[e ? "animate" : "css"](g, c.animate), d.options.range === !0 && (d.orientation === "horizontal" ? (b === 0 && d.range.stop(1, 1)[e ? "animate" : "css"]({left: f + "%"}, c.animate), b === 1 && d.range[e ? "animate" : "css"]({width: f - h + "%"}, {queue: !1, duration: c.animate})) : (b === 0 && d.range.stop(1, 1)[e ? "animate" : "css"]({bottom: f + "%"}, c.animate), b === 1 && d.range[e ? "animate" : "css"]({height: f - h + "%"}, {queue: !1, duration: c.animate}))), h = f - }) : (i = this.value(), j = this._valueMin(), k = this._valueMax(), f = k !== j ? (i - j) / (k - j) * 100 : 0, g[d.orientation === "horizontal" ? "left" : "bottom"] = f + "%", this.handle.stop(1, 1)[e ? "animate" : "css"](g, c.animate), b === "min" && this.orientation === "horizontal" && this.range.stop(1, 1)[e ? "animate" : "css"]({width: f + "%"}, c.animate), b === "max" && this.orientation === "horizontal" && this.range[e ? "animate" : "css"]({width: 100 - f + "%"}, {queue: !1, duration: c.animate}), b === "min" && this.orientation === "vertical" && this.range.stop(1, 1)[e ? "animate" : "css"]({height: f + "%"}, c.animate), b === "max" && this.orientation === "vertical" && this.range[e ? "animate" : "css"]({height: 100 - f + "%"}, {queue: !1, duration: c.animate})) - }}), a.extend(a.ui.slider, {version: "1.8.18"}) -}(jQuery), function (a, b) { - function f() { - return++d - } - - function e() { - return++c - } - - var c = 0, d = 0; - a.widget("ui.tabs", {options: {add: null, ajaxOptions: null, cache: !1, cookie: null, collapsible: !1, disable: null, disabled: [], enable: null, event: "click", fx: null, idPrefix: "ui-tabs-", load: null, panelTemplate: "<div></div>", remove: null, select: null, show: null, spinner: "<em>Loading…</em>", tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"}, _create: function () { - this._tabify(!0) - }, _setOption: function (a, b) { - if (a == "selected") { - if (this.options.collapsible && b == this.options.selected)return; - this.select(b) - } else this.options[a] = b, this._tabify() - }, _tabId: function (a) { - return a.title && a.title.replace(/\s/g, "_").replace(/[^\w\u00c0-\uFFFF-]/g, "") || this.options.idPrefix + e() - }, _sanitizeSelector: function (a) { - return a.replace(/:/g, "\\:") - }, _cookie: function () { - var b = this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + f()); - return a.cookie.apply(null, [b].concat(a.makeArray(arguments))) - }, _ui: function (a, b) { - return{tab: a, panel: b, index: this.anchors.index(a)} - }, _cleanup: function () { - this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function () { - var b = a(this); - b.html(b.data("label.tabs")).removeData("label.tabs") - }) - }, _tabify: function (c) { - function m(b, c) { - b.css("display", ""), !a.support.opacity && c.opacity && b[0].style.removeAttribute("filter") - } - - var d = this, e = this.options, f = /^#.+/; - this.list = this.element.find("ol,ul").eq(0), this.lis = a(" > li:has(a[href])", this.list), this.anchors = this.lis.map(function () { - return a("a", this)[0] - }), this.panels = a([]), this.anchors.each(function (b, c) { - var g = a(c).attr("href"), h = g.split("#")[0], i; - h && (h === location.toString().split("#")[0] || (i = a("base")[0]) && h === i.href) && (g = c.hash, c.href = g); - if (f.test(g))d.panels = d.panels.add(d.element.find(d._sanitizeSelector(g))); else if (g && g !== "#") { - a.data(c, "href.tabs", g), a.data(c, "load.tabs", g.replace(/#.*$/, "")); - var j = d._tabId(c); - c.href = "#" + j; - var k = d.element.find("#" + j); - k.length || (k = a(e.panelTemplate).attr("id", j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b - 1] || d.list), k.data("destroy.tabs", !0)), d.panels = d.panels.add(k) - } else e.disabled.push(b) - }), c ? (this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"), this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"), this.lis.addClass("ui-state-default ui-corner-top"), this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"), e.selected === b ? (location.hash && this.anchors.each(function (a, b) { - if (b.hash == location.hash) { - e.selected = a; - return!1 - } - }), typeof e.selected != "number" && e.cookie && (e.selected = parseInt(d._cookie(), 10)), typeof e.selected != "number" && this.lis.filter(".ui-tabs-selected").length && (e.selected = this.lis.index(this.lis.filter(".ui-tabs-selected"))), e.selected = e.selected || (this.lis.length ? 0 : -1)) : e.selected === null && (e.selected = -1), e.selected = e.selected >= 0 && this.anchors[e.selected] || e.selected < 0 ? e.selected : 0, e.disabled = a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"), function (a, b) { - return d.lis.index(a) - }))).sort(), a.inArray(e.selected, e.disabled) != -1 && e.disabled.splice(a.inArray(e.selected, e.disabled), 1), this.panels.addClass("ui-tabs-hide"), this.lis.removeClass("ui-tabs-selected ui-state-active"), e.selected >= 0 && this.anchors.length && (d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide"), this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active"), d.element.queue("tabs", function () { - d._trigger("show", null, d._ui(d.anchors[e.selected], d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0])) - }), this.load(e.selected)), a(window).bind("unload", function () { - d.lis.add(d.anchors).unbind(".tabs"), d.lis = d.anchors = d.panels = null - })) : e.selected = this.lis.index(this.lis.filter(".ui-tabs-selected")), this.element[e.collapsible ? "addClass" : "removeClass"]("ui-tabs-collapsible"), e.cookie && this._cookie(e.selected, e.cookie); - for (var g = 0, h; h = this.lis[g]; g++)a(h)[a.inArray(g, e.disabled) != -1 && !a(h).hasClass("ui-tabs-selected") ? "addClass" : "removeClass"]("ui-state-disabled"); - e.cache === !1 && this.anchors.removeData("cache.tabs"), this.lis.add(this.anchors).unbind(".tabs"); - if (e.event !== "mouseover") { - var i = function (a, b) { - b.is(":not(.ui-state-disabled)") && b.addClass("ui-state-" + a) - }, j = function (a, b) { - b.removeClass("ui-state-" + a) - }; - this.lis.bind("mouseover.tabs", function () { - i("hover", a(this)) - }), this.lis.bind("mouseout.tabs", function () { - j("hover", a(this)) - }), this.anchors.bind("focus.tabs", function () { - i("focus", a(this).closest("li")) - }), this.anchors.bind("blur.tabs", function () { - j("focus", a(this).closest("li")) - }) - } - var k, l; - e.fx && (a.isArray(e.fx) ? (k = e.fx[0], l = e.fx[1]) : k = l = e.fx); - var n = l ? function (b, c) { - a(b).closest("li").addClass("ui-tabs-selected ui-state-active"), c.hide().removeClass("ui-tabs-hide").animate(l, l.duration || "normal", function () { - m(c, l), d._trigger("show", null, d._ui(b, c[0])) - }) - } : function (b, c) { - a(b).closest("li").addClass("ui-tabs-selected ui-state-active"), c.removeClass("ui-tabs-hide"), d._trigger("show", null, d._ui(b, c[0])) - }, o = k ? function (a, b) { - b.animate(k, k.duration || "normal", function () { - d.lis.removeClass("ui-tabs-selected ui-state-active"), b.addClass("ui-tabs-hide"), m(b, k), d.element.dequeue("tabs") - }) - } : function (a, b, c) { - d.lis.removeClass("ui-tabs-selected ui-state-active"), b.addClass("ui-tabs-hide"), d.element.dequeue("tabs") - }; - this.anchors.bind(e.event + ".tabs", function () { - var b = this, c = a(b).closest("li"), f = d.panels.filter(":not(.ui-tabs-hide)"), g = d.element.find(d._sanitizeSelector(b.hash)); - if (c.hasClass("ui-tabs-selected") && !e.collapsible || c.hasClass("ui-state-disabled") || c.hasClass("ui-state-processing") || d.panels.filter(":animated").length || d._trigger("select", null, d._ui(this, g[0])) === !1) { - this.blur(); - return!1 - } - e.selected = d.anchors.index(this), d.abort(); - if (e.collapsible) { - if (c.hasClass("ui-tabs-selected")) { - e.selected = -1, e.cookie && d._cookie(e.selected, e.cookie), d.element.queue("tabs",function () { - o(b, f) - }).dequeue("tabs"), this.blur(); - return!1 - } - if (!f.length) { - e.cookie && d._cookie(e.selected, e.cookie), d.element.queue("tabs", function () { - n(b, g) - } - ), d.load(d.anchors.index(this)), this.blur(); - return!1 - } - } - e.cookie && d._cookie(e.selected, e.cookie); - if (g.length)f.length && d.element.queue("tabs", function () { - o(b, f) - }), d.element.queue("tabs", function () { - n(b, g) - }), d.load(d.anchors.index(this)); else throw"jQuery UI Tabs: Mismatching fragment identifier."; - a.browser.msie && this.blur() - }), this.anchors.bind("click.tabs", function () { - return!1 - }) - }, _getIndex: function (a) { - typeof a == "string" && (a = this.anchors.index(this.anchors.filter("[href$=" + a + "]"))); - return a - }, destroy: function () { - var b = this.options; - this.abort(), this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"), this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"), this.anchors.each(function () { - var b = a.data(this, "href.tabs"); - b && (this.href = b); - var c = a(this).unbind(".tabs"); - a.each(["href", "load", "cache"], function (a, b) { - c.removeData(b + ".tabs") - }) - }), this.lis.unbind(".tabs").add(this.panels).each(function () { - a.data(this, "destroy.tabs") ? a(this).remove() : a(this).removeClass(["ui-state-default", "ui-corner-top", "ui-tabs-selected", "ui-state-active", "ui-state-hover", "ui-state-focus", "ui-state-disabled", "ui-tabs-panel", "ui-widget-content", "ui-corner-bottom", "ui-tabs-hide"].join(" ")) - }), b.cookie && this._cookie(null, b.cookie); - return this - }, add: function (c, d, e) { - e === b && (e = this.anchors.length); - var f = this, g = this.options, h = a(g.tabTemplate.replace(/#\{href\}/g, c).replace(/#\{label\}/g, d)), i = c.indexOf("#") ? this._tabId(a("a", h)[0]) : c.replace("#", ""); - h.addClass("ui-state-default ui-corner-top").data("destroy.tabs", !0); - var j = f.element.find("#" + i); - j.length || (j = a(g.panelTemplate).attr("id", i).data("destroy.tabs", !0)), j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"), e >= this.lis.length ? (h.appendTo(this.list), j.appendTo(this.list[0].parentNode)) : (h.insertBefore(this.lis[e]), j.insertBefore(this.panels[e])), g.disabled = a.map(g.disabled, function (a, b) { - return a >= e ? ++a : a - }), this._tabify(), this.anchors.length == 1 && (g.selected = 0, h.addClass("ui-tabs-selected ui-state-active"), j.removeClass("ui-tabs-hide"), this.element.queue("tabs", function () { - f._trigger("show", null, f._ui(f.anchors[0], f.panels[0])) - }), this.load(0)), this._trigger("add", null, this._ui(this.anchors[e], this.panels[e])); - return this - }, remove: function (b) { - b = this._getIndex(b); - var c = this.options, d = this.lis.eq(b).remove(), e = this.panels.eq(b).remove(); - d.hasClass("ui-tabs-selected") && this.anchors.length > 1 && this.select(b + (b + 1 < this.anchors.length ? 1 : -1)), c.disabled = a.map(a.grep(c.disabled, function (a, c) { - return a != b - }), function (a, c) { - return a >= b ? --a : a - }), this._tabify(), this._trigger("remove", null, this._ui(d.find("a")[0], e[0])); - return this - }, enable: function (b) { - b = this._getIndex(b); - var c = this.options; - if (a.inArray(b, c.disabled) != -1) { - this.lis.eq(b).removeClass("ui-state-disabled"), c.disabled = a.grep(c.disabled, function (a, c) { - return a != b - }), this._trigger("enable", null, this._ui(this.anchors[b], this.panels[b])); - return this - } - }, disable: function (a) { - a = this._getIndex(a); - var b = this, c = this.options; - a != c.selected && (this.lis.eq(a).addClass("ui-state-disabled"), c.disabled.push(a), c.disabled.sort(), this._trigger("disable", null, this._ui(this.anchors[a], this.panels[a]))); - return this - }, select: function (a) { - a = this._getIndex(a); - if (a == -1)if (this.options.collapsible && this.options.selected != -1)a = this.options.selected; else return this; - this.anchors.eq(a).trigger(this.options.event + ".tabs"); - return this - }, load: function (b) { - b = this._getIndex(b); - var c = this, d = this.options, e = this.anchors.eq(b)[0], f = a.data(e, "load.tabs"); - this.abort(); - if (!f || this.element.queue("tabs").length !== 0 && a.data(e, "cache.tabs"))this.element.dequeue("tabs"); else { - this.lis.eq(b).addClass("ui-state-processing"); - if (d.spinner) { - var g = a("span", e); - g.data("label.tabs", g.html()).html(d.spinner) - } - this.xhr = a.ajax(a.extend({}, d.ajaxOptions, {url: f, success: function (f, g) { - c.element.find(c._sanitizeSelector(e.hash)).html(f), c._cleanup(), d.cache && a.data(e, "cache.tabs", !0), c._trigger("load", null, c._ui(c.anchors[b], c.panels[b])); - try { - d.ajaxOptions.success(f, g) - } catch (h) { - } - }, error: function (a, f, g) { - c._cleanup(), c._trigger("load", null, c._ui(c.anchors[b], c.panels[b])); - try { - d.ajaxOptions.error(a, f, b, e) - } catch (g) { - } - }})), c.element.dequeue("tabs"); - return this - } - }, abort: function () { - this.element.queue([]), this.panels.stop(!1, !0), this.element.queue("tabs", this.element.queue("tabs").splice(-2, 2)), this.xhr && (this.xhr.abort(), delete this.xhr), this._cleanup(); - return this - }, url: function (a, b) { - this.anchors.eq(a).removeData("cache.tabs").data("load.tabs", b); - return this - }, length: function () { - return this.anchors.length - }}), a.extend(a.ui.tabs, {version: "1.8.18"}), a.extend(a.ui.tabs.prototype, {rotation: null, rotate: function (a, b) { - var c = this, d = this.options, e = c._rotate || (c._rotate = function (b) { - clearTimeout(c.rotation), c.rotation = setTimeout(function () { - var a = d.selected; - c.select(++a < c.anchors.length ? a : 0) - }, a), b && b.stopPropagation() - }), f = c._unrotate || (c._unrotate = b ? function (a) { - t = d.selected, e() - } : function (a) { - a.clientX && c.rotate(null) - }); - a ? (this.element.bind("tabsshow", e), this.anchors.bind(d.event + ".tabs", f), e()) : (clearTimeout(c.rotation), this.element.unbind("tabsshow", e), this.anchors.unbind(d.event + ".tabs", f), delete this._rotate, delete this._unrotate); - return this - }}) -}(jQuery) \ No newline at end of file diff --git a/app/assets/javascripts/coderwall.js b/app/assets/javascripts/coderwall.js new file mode 100644 index 00000000..f6022c02 --- /dev/null +++ b/app/assets/javascripts/coderwall.js @@ -0,0 +1,199 @@ +//= require jquery +//= require jquery-migrate +//= require jquery_ujs +//= require jquery.tipTip +//= require jquery.sortElements +//= require jquery.fancybox.min +//= require jquery.autocomplete +//= require jquery.flexslider-min +//= require underscore + +//= require jquery-dropdown/jquery.dropdown + +$(function () { + $('a.remove-parent').on('click', this.selector, function (e) { + $(this).parents('.' + $(this).attr('data-parent')).slideUp(); + e.preventDefault(); + }); + registerButtons(); +}); + +$(function () { + $('[placeholder]').focus(function () { + var input = $(this); + if (input.val() == input.attr('placeholder')) { + input.val(''); + input.removeClass('placeholder'); + } + }).blur(function () { + var input = $(this); + if (input.val() == '' || input.val() == input.attr('placeholder')) { + input.addClass('placeholder'); + input.val(input.attr('placeholder')); + } + }).blur(); + + $('.save a').on('click', this.selector, function (e) { + var form = $(this).parents('form'); + $.post(form.attr('action'), form.serialize()).success(function (response) { + + }); + e.preventDefault(); + }) + + $('a.submitEndorsement').on('click', this.selector, function (e) { + var form = $(this).parents('form'); + $.post(form.attr('action'), form.serialize()).success(function (response) { + $.fancybox.close(); + setTimeout(function () { + $('#endorsementcounter span').slideUp(); + }, 600); + setTimeout(function () { + $('#endorsementcounter span').html(response.totalEndorsements).slideDown(); + if (response.availableEndorsements <= 0) { + $('#endorse .endorsements').remove(); + $('#endorse .notification').remove(); + $('#endorse .message').html("You used up all your endorsements. Unlock additional achievements to make more endorsements."); + } else if (response.remainingEndoresments <= 0) { + $('#endorse .endorsements').remove(); + $('#endorse .notification').remove(); + $('#endorse .message').html("There are no more skills to endorse."); + } else { + $('#endorse .notification').html(response.message); + $(response.ensorsementsMade).each(function () { + $('#' + this).remove(); + }); + } + }, 1500); + }); + e.preventDefault(); + }); + + $('#nocount input, #withcount input').change(function () { + $('.endorseButtons .markdown, .endorseButtons .html, .endorseButtons .textile').toggleClass('hide'); + }); + + $('a.seeMore').on('click', this.selector, function (e) { + $(this).siblings('.seeMore').slideDown(); + e.preventDefault(); + }); + + $('#achievementcode').on('click', this.selector, function () { + $(this).hide().parents('em').hide(); + $('.claimcode').fadeIn(); + e.preventDefault(); + }); + + $(".tip").tipTip({maxWidth: "auto", edgeOffset: 10}); + + $("a.filter").click(function (e) { + $('a.filter').removeClass('active'); + $(this).addClass('active'); + + var list = $(this).attr('data-list'); + var filter = $(this).attr('data-filter'); + + if (filter == '') { + $(list).removeClass('suppress'); + } + else { + $(list).removeClass('suppress').addClass('suppress'); + $(list + '.' + filter).removeClass('suppress'); + } + sortListItems(list, filter); + e.preventDefault(); + }); + + $("a.fancybox").fancybox({ + hideOnContentClick: false, + margin: 0, + padding: 0, + onClosed: function () { + $(this.href).find("form").each(function () { + this.reset(); + }); + } + }); + + $("a.closefancybox").on('click', this.selector, function (e) { + $.fancybox.close(); + }); + + $('.event_links a.more').on('click', this.selector, function (e) { + $(this).siblings('.more.hide').slideToggle(); + e.preventDefault(); + }); + + if ($('.featuredAccomplishment').length > 0) { + setInterval(function () { + var element = $('.featuredAccomplishment:not(.hide)').fadeOut().delay(1000).addClass('hide'); + if (element.next().length > 0) + element.next().removeClass('hide').fadeIn(); + else + $('.featuredAccomplishment:first').removeClass('hide').fadeIn(); + }, 6000); + } + + $('.attentionSpan').first().each(function () { + $(this).slideDown().next().delay(1500).slideDown(); + }); + $('.attentionSpan.disappear').delay(4000).slideUp(); + + //replace authenticity token with the meta tag to make sure cached fragments are not being exposed + $('input[name=authenticity_token]').val($('meta[name=csrf-token]').attr('content')) +}); + +function sortListItems(list, value) { + $(list).sortElements(function (x, y) { + if ($(x).hasClass(value) == true && $(y).hasClass(value) == true) { + if ($(x).attr('data-popularity') > $(y).attr('data-popularity')) + return -1; + else + return 1; + } + else if ($(x).hasClass(value) == true && $(y).hasClass(value) == false) { + return -1; + } else { + return 1; + } + }); +} + +function readCookie(name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for (var i = 0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0) == ' ') c = c.substring(1, c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); + } + return null; +} + +function updateCountdown(e) { + var remaining = 100 - $('#new_accomplishment').val().length; + if (remaining <= 0) { + $('#new_accomplishment').val($('#new_accomplishment').val().substring(0, 100)); + $('#countdown').text('0'); + } + else + $('#countdown').text(remaining); +} + +function toggleNewAccomplishment() { + $('.accomplishments .featured').toggle(); + $('.accomplishments .addnew').toggle(); + $('#new_accomplishment').val(''); +} + +function handle_redirect(response) { + if (response.status == "redirect") + window.location = response.to +} + +function registerButtons() { + $("a.follow-team:not(.noauth)").on('click', this.selector, function (e) { + $(this).toggleClass("following"); + return e.preventDefault(); + }); +} diff --git a/app/assets/javascripts/coderwallv2.js b/app/assets/javascripts/coderwallv2.js new file mode 100644 index 00000000..11c8c677 --- /dev/null +++ b/app/assets/javascripts/coderwallv2.js @@ -0,0 +1,10 @@ +//= require jquery +//= require jquery_ujs +//= require materialize-sprockets + +$(function () { + $(".button-collapse").sideNav(); + + $(".dropdown-button").dropdown(); +}); + diff --git a/app/assets/javascripts/dismissable.js.coffee b/app/assets/javascripts/dismissable.js.coffee new file mode 100644 index 00000000..ced2c992 --- /dev/null +++ b/app/assets/javascripts/dismissable.js.coffee @@ -0,0 +1,19 @@ +#= require jquery-cookie + +$ -> + $('[data-dismissable]').each -> + $el = $(@) + key = "dismissed-#{$el.data('dismissable')}" + + if $.cookie(key) == "true" + $el.hide() + $('.tee-ribbon').css("top", "0px") + else + $el.fadeIn() + $('.tee-ribbon').css("top", "40px") + + $('.js-dismiss', $el).click (e)-> + e.preventDefault() + $.cookie(key, "true") + $el.fadeOut() + $('.tee-ribbon').css("top", "0px") diff --git a/app/assets/javascripts/ember/coderwall.js.coffee b/app/assets/javascripts/ember/coderwall.js.coffee deleted file mode 100644 index 9d2a8c76..00000000 --- a/app/assets/javascripts/ember/coderwall.js.coffee +++ /dev/null @@ -1,30 +0,0 @@ -#= require ../vendor/ember -#= require ../vendor/ember-rest -#= require ../vendor/ember-routemanager -#= require ../vendor/sorted-array -#= require_self - -window.Coderwall = Ember.Application.create() - -Coderwall.routeManager = Ember.RouteManager.create( - protips: Em.ViewState.create( - route: "p/t" - view: Coderwall.protipsView - index: Em.State.create( - route: ":tag" - enter: (stateManager, transition) -> - @_super stateManager, transition - params = stateManager.get("params") - tags = params - alert tags - ) - ) -) - -Coderwall.displayError = (e) -> - if typeof e is "string" - alert e - else if typeof e is "object" and e.responseText isnt `undefined` - alert e.responseText - else - alert "An unexpected error occurred." \ No newline at end of file diff --git a/app/assets/javascripts/ember/controllers/activityfeed.js.coffee b/app/assets/javascripts/ember/controllers/activityfeed.js.coffee deleted file mode 100644 index fbbbaf5a..00000000 --- a/app/assets/javascripts/ember/controllers/activityfeed.js.coffee +++ /dev/null @@ -1,232 +0,0 @@ -#= require vendor/history.adapter.jquery -#= require vendor/history -#window.console.log = -> - -Coderwall.activityFeedController = Ember.ArrayController.create( - resourceType: Coderwall.Event - requestInterval: 60 * 1000 - rateLimitInterval: 60 * 60 * 1000 - subscribedChannels: [] - reloadTimer: null - username: null - unreadActivities: [] - activities: [] - sortedActivities: [] - content: [] - skills: [] - skillsShown: [] - achievements: [] - achievementsShown: [] - inputCollectionName: "activities" - outputCollectionName: "sortedActivities" - sortOrder: "normal" - maxCollectionSize: 100 - rateLimitTable: { - new_skill: - limit: 15 - count: 0 - unlocked_achievement: - limit: 10 - count: 0 - } - viewingSince: 0 - updating: false - lastPull: new Date() - profileUrl: null - protipsUrl: null - connectionsUrl: null - - skillAdded: (skill_name)-> - @skills.push(skill_name) - - sortFunction: (eventA, eventB)-> - eventB.timestamp - eventA.timestamp - - unreadActivityCount: Ember.computed(-> - @.get('unreadActivities').size - ).property('unreadActivities').cacheable() - - loadSubscriptions: (channels)-> - @.set('subscribedChannels', channels) - - resourceUrl: Ember.computed(-> - return @.get("username") + "/events/more" - ).property("username").cacheable() - - start: -> - @set('viewingSince', (new Date()).valueOf() / 1000) - context = @ - # @resetRateLimits() - @.subscribeToChannels() - @.startRequestTimer() - # @.startRateLimitTimer() - window.onfocus = -> - context.userPresence(true) - window.onblur = -> - context.userPresence(false) - - subscribeToChannels: -> - @.subscribeToChannel(channel) for channel in @.get('subscribedChannels') - - subscribeToChannel: (channel_name)-> - context = @ - console.log("subscribing to " + channel_name) - PUBNUB.subscribe({channel: channel_name}, (message)-> - context.processChannelData(channel_name, message)) - - processChannelData: (channel_name, data) -> - console.log("received data from " + channel_name + ", data:" + data.toString()) - event = $.parseJSON(data) - @.addEvent(event) if event? - - loadEvents: (events) -> -# events = $.parseJSON(data) - @.addEvent(event) for event in events - -# loadFromHistory: -> -# context = @ -# remainingChannels = @.subscribedChannels.length -# console.log("requesting history from " + remainingChannels + " channels") -# (PUBNUB.history({channel: subscribedChannel, limit: 50}, -# (messages) -> -# console.log("got " + messages.length + " messages from history on channel " + subscribedChannel) -# context.processChannelData(subscribedChannel, message) for message in messages -# remainingChannels -= 1 -# if remainingChannels == 0 -# context.releaseUnreadActivities(true) -# -# ); console.log("requested history from " + subscribedChannel)) for subscribedChannel in @.subscribedChannels - - addEvent: (event_data) -> - event = Coderwall.Event.create(event_data) - console.log("pushing event " + event.event_type + " to content") - @content.pushObject(event) - - requestMore: (-> - console.log("requesting more data from " + window.location.origin + "/" + @.get('resourceUrl')) - context = @ - - $.ajax({ - url: window.location.protocol + "//" + window.location.host + "/" + @.get('resourceUrl') - dataType: 'json' - data: - since: context.viewingSince - count: Math.floor(Math.random() * 10) + 1 - success: (stats)-> - context.set('viewingSince', (new Date()).valueOf() / 1000); - context.updateStats(stats); - context.startRequestTimer() - }) - ).observes('window.onfocus') - - updateStats: (data)-> - stats = $.parseJSON(data) - Coderwall.statsController.set('profileViews', data['profile_views']) - Coderwall.statsController.set('protips', data['protips_count']) - Coderwall.statsController.set('protipUpvotes', data['protip_upvotes']) - Coderwall.statsController.set('followers', data['followers']) - - processEvents: (-> - if @.content.length > 0 - console.log("processing events") - @.unreadActivities.pushObjects(event for event in @.content when !@duplicateEvent(event)) - # @replaceBrowserState() if @.unreadActivities.length > 0 - @.content.clear() - ).observes('content.@each') - - duplicateEvent: (event)-> - if event.user? and (event.user.username == @username) - return true - - if event.event_type == 'new_skill' - if (event.skill.name in @skillsShown) - return true - else - @skillsShown.pushObject(event.skill.name) - if (event.skill.name in @skills) - return true - else if event.achievement? - if (event.achievement.name in @achievementsShown) - return true - else - @achievementsShown.pushObject(event.achievement.name) - if (event.achievement.name in @achievements) - return true - - return @rateLimit(event) - - rateLimit: (event)-> - return false -# rate = @rateLimitTable[event.event_type] -# return false unless rate? -# rate['count']++ -# rate['count'] > rate['limit'] - - userPresence: (present)-> - console.log(((new Date()).valueOf() - @lastPull)) - if present and (((new Date()).valueOf() - @lastPull) > 60 * 1000) then @requestMore() else @stopRequestTimer() - - startRequestTimer: (-> - context = @ - @set('reloadTimer', setTimeout -> - context.requestMore() - , @get('requestInterval')) - ).observes('window.onfocus') - - stopRequestTimer: (-> - console.log("Timer stopped") - clearTimeout @get('reloadTimer') - ).observes('window.onblur') - -# startRateLimitTimer: (-> -# console.log("Rate Limit Timer started") -# context = @ -# @set('rateLimitTimer', setTimeout -> -# context.resetRateLimits() -# , @get('rateLimitInterval')) -# ) -# -# resetRateLimits: -> -# console.log("clearing rate limit table") -# @rateLimitTable[event_type]['count'] = 0 for event_type, rate of @rateLimitTable - - releaseUnreadActivities: (pushState)-> - console.log("releasing activities ") - @.activities.unshiftObjects(@.unreadActivities) - @.unreadActivities.clear() -# if pushState -# @replaceBrowserState() - -# replaceBrowserState: (-> -# console.log("updating browser history") -# @.set('updating', true) -# if @.activities.length > 0 -# @set('lastPull', (new Date()).valueOf()) -# History.replaceState({lastPull: @lastPull, events: @.activities, unreadEvents: @.unreadActivities}, "activities", location.href) -# ) - -# handlePopState: -> -# return if @get('updating') -# -# unless History? and (state = History.getState())? and !$.isEmptyObject(state.data) and state.data.events? and state.data.events.length > 0 and ((new Date()).valueOf() - state.data.lastPull) < 5*60*1000 -# @loadFromHistory() -# else -# console.log("loading events from browser history") -# @addEvent(event) for event in state.data.events -# @releaseUnreadActivities(false) -# @set('unreadActivities', state.data.unreadEvents) -# @set('updating', false) -) - -Coderwall.statsController = Ember.ResourceController.create( - profileViews: null - followers: null - protips: null - protipUpvotes: null - profileUrl: null - protipsUrl: null -) - -#window.onpopstate =-> -# Coderwall.activityFeedController.handlePopState() - diff --git a/app/assets/javascripts/ember/controllers/networks.js.coffee b/app/assets/javascripts/ember/controllers/networks.js.coffee deleted file mode 100644 index 3bd6d306..00000000 --- a/app/assets/javascripts/ember/controllers/networks.js.coffee +++ /dev/null @@ -1,30 +0,0 @@ -Coderwall.networksController = Ember.SortedArrayController.create( - inputCollectionName: "content" - outputCollectionName: "content" - sortOrder: "normal" - sortField: "name" - - sortFunction: (networkA, networkB) -> - if @sortField is "name" - @sortFunctionAlphabetical(networkA, networkB) - else if @sortField is "upvotes" - @sortFunctionUpvotes(networkA, networkB) - else if @sortField is "created_at" - @sortFunctionCreatedAt(networkA, networkB) - - sortFunctionAlphabetical: (networkA, networkB)-> - if networkA.name < networkB.name - -1 - else if networkA.name > networkB.name - 1 - else - 0 - - sortFunctionUpvotes: (networkA, networkB)-> - networkA.upvotes - networkB.upvotes - - sortFunctionCreatedAt: (networkA, networkB)-> - networkA.created_at - networkB.created_at - - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/controllers/teams.js.coffee b/app/assets/javascripts/ember/controllers/teams.js.coffee deleted file mode 100644 index 1ab4d56f..00000000 --- a/app/assets/javascripts/ember/controllers/teams.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -Coderwall.teamsController = Ember.ResourceController.create( - resourceType: Coderwall.Team - followedTeamsList: null - - updateFollowedTeam: (team_id)-> - @followedTeamsList[team_id] = !@followedTeamsList[team_id] -) - diff --git a/app/assets/javascripts/ember/controllers/users.js.coffee b/app/assets/javascripts/ember/controllers/users.js.coffee deleted file mode 100644 index 573d5bae..00000000 --- a/app/assets/javascripts/ember/controllers/users.js.coffee +++ /dev/null @@ -1,10 +0,0 @@ -Coderwall.usersController = Ember.ResourceController.create( - resourceType: Coderwall.User - userStatusUrl: "/user/status" - signedInUser: null - - init: -> -# $.get(@.userStatusUrl).success (data)-> -# if data.any? -# @.signedInUser = Coderwall.User.create(data) -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/dashboard.js.coffee b/app/assets/javascripts/ember/dashboard.js.coffee deleted file mode 100644 index 9e1940a5..00000000 --- a/app/assets/javascripts/ember/dashboard.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -#= require ./coderwall -#= require_tree ./models -#= require ./controllers/activityfeed -#= require_tree ./templates/events -#= require_tree ./helpers -#= require_tree ./views/events \ No newline at end of file diff --git a/app/assets/javascripts/ember/helpers/debug.js.coffee b/app/assets/javascripts/ember/helpers/debug.js.coffee deleted file mode 100644 index f3242a34..00000000 --- a/app/assets/javascripts/ember/helpers/debug.js.coffee +++ /dev/null @@ -1,8 +0,0 @@ -Handlebars.registerHelper "debug", (optionalValue) -> - console.log "Current Context" - console.log "====================" - console.log this - if optionalValue - console.log "Value" - console.log "====================" - console.log optionalValue \ No newline at end of file diff --git a/app/assets/javascripts/ember/helpers/events.js.coffee b/app/assets/javascripts/ember/helpers/events.js.coffee deleted file mode 100644 index 37dd2abc..00000000 --- a/app/assets/javascripts/ember/helpers/events.js.coffee +++ /dev/null @@ -1,26 +0,0 @@ -Handlebars.registerHelper "tagged_protips_path", -> - "/p/t/" + encodeURI(@) - -Handlebars.registerHelper "write_tagged_protips_path", -> - '/p/new?topics=' + encodeURI(@) - -Handlebars.registerHelper "image_path", -> - '/assets/' + @ - -Handlebars.registerHelper "any_skills", -> - @.length > 0 - -Handlebars.registerHelper "followed_text", -> - if @.toString() == 'followed_team' then "is now following your team." else "is now following you." - -Handlebars.registerHelper "comment_action", -> - if @.event_type == 'new_comment' then "Your protip" else if @.likes > 0 then "Your comment on protip" else "" - -Handlebars.registerHelper "comment_or_like_message", -> - if @.event_type == 'new_comment' then "now has " + @.comments + " comments" else if @.likes > 0 then "now has " + @.likes + " likes" else "" - -Handlebars.registerHelper "if_repliable", (block)-> - if @.event_type == 'new_comment' or @.event_type == 'comment_reply' then block(@) - -Handlebars.registerHelper "reply_url", -> - @.url + encodeURI("?reply_to=@" + @.user.username + " #add-comment") diff --git a/app/assets/javascripts/ember/helpers/networks.js.coffee b/app/assets/javascripts/ember/helpers/networks.js.coffee deleted file mode 100644 index fcbd88d4..00000000 --- a/app/assets/javascripts/ember/helpers/networks.js.coffee +++ /dev/null @@ -1,3 +0,0 @@ -Handlebars.registerHelper "each_network", (block)-> - character = @ - block(network) for network in Coderwall.AllNetworksView.networks when network[0].toUpperCase() == @[0] \ No newline at end of file diff --git a/app/assets/javascripts/ember/helpers/teams.js.coffee b/app/assets/javascripts/ember/helpers/teams.js.coffee deleted file mode 100644 index 625137b3..00000000 --- a/app/assets/javascripts/ember/helpers/teams.js.coffee +++ /dev/null @@ -1,50 +0,0 @@ -Handlebars.registerHelper "compare", (lvalue, rvalue, options) -> - throw new Error("Handlerbars Helper 'compare' needs 2 parameters") if arguments.length < 3 - operator = options.hash.operator or "==" - operators = - "==": (l, r) -> - l is r - - "===": (l, r) -> - l is r - - "!=": (l, r) -> - l isnt r - - "<": (l, r) -> - l < r - - ">": (l, r) -> - l > r - - "<=": (l, r) -> - l <= r - - ">=": (l, r) -> - l >= r - - typeof: (l, r) -> - typeof l is r - - throw new Error("Handlerbars Helper 'compare' doesn't support the operator " + operator) unless operators[operator] - result = operators[operator](lvalue, rvalue) - if result - options.fn this - else - options.inverse this - -Handlebars.registerHelper "signed_in", -> - UsersController.signedInUser? - -#Handlebars.registerHelper "remaining_team_member_count", (team_members) -> -# team_members - 3 -# -#Handlebars.registerHelper "following", (team_name, options) -> -# if defined? Coderwall.teamsController.followedTeamsList[team_name] -# options.fn @ -# else if defined? elsefn -# options.else.fn @ -# -#Handlebars.registerHelper "plusone", (team_members) -> -# team_members+1 -# diff --git a/app/assets/javascripts/ember/models/.gitkeep b/app/assets/javascripts/ember/models/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/javascripts/ember/models/event.js.coffee b/app/assets/javascripts/ember/models/event.js.coffee deleted file mode 100644 index b9ffae2f..00000000 --- a/app/assets/javascripts/ember/models/event.js.coffee +++ /dev/null @@ -1,54 +0,0 @@ -Coderwall.Event = Ember.Resource.extend( - resourceUrl: "/:username/events" - resourceName: "event" - resourceProperties: [ "version", "event_type", "tags", "url", "hiring" ] - actionable: true - - tweetUrl: Ember.computed(-> - correctedUrl = encodeURI(@.url) - unless /^https?::\/\//.test(correctedUrl) - correctedUrl = "http://coderwall.com" + correctedUrl - 'http://twitter.com/share?url=' + correctedUrl + '&via=coderwall&text=' + encodeURI(@.title) + '+%23protip&related=&count=vertical&lang=en' - ).property().cacheable() - - teamHireUrl: Ember.computed(-> - @team.url + "#open-positions" - ).property('url').cacheable() - - topTag: Ember.computed(-> - if @.tags.get('firstObject')? then @.tags.get('firstObject') else null - ).property().cacheable() - - belongsToTeam: Ember.computed(-> - if @.team? then true else false - ).property().cacheable() - - protipEvent: Ember.computed(-> - @event_type == 'protip_view' or @event_type == 'protip_upvote' - ).property('event_type').cacheable() - - viewEvent: Ember.computed(-> - @event_type == 'protip_view' or @event_type == 'profile_view' - ).property('event_type').cacheable() - - - eventTypeString: Ember.computed(-> - switch @.event_type - when 'new_protip' then 'New protip' - when 'trending_protip' then 'Trending protip' - when 'admin_message' then 'A message from Coderwall' - when 'new_team' then 'created a new team' - when 'new_skill' then 'added a skill' - when 'endorsement' then 'endorsed you' - when 'unlocked_achievement' then 'just unlocked an achievement' - when 'profile_view' then 'viewed your profile' - when 'protip_view' then 'viewed your protip' - when 'protip_upvote' then 'upvoted your protip' - when 'followed_team' then 'just followed your team' - when 'followed_user' then 'just followed you' - when 'new_mayor' then 'is mayor of' - when 'new_comment' then 'commented on your protip' - when 'comment_like' then 'liked your comment' - when 'comment_reply' then 'replied to your comment' - ) -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/models/team.js.coffee b/app/assets/javascripts/ember/models/team.js.coffee deleted file mode 100644 index e93d394a..00000000 --- a/app/assets/javascripts/ember/models/team.js.coffee +++ /dev/null @@ -1,51 +0,0 @@ -Coderwall.Team = Ember.Resource.extend( - resourceUrl: "/teams" - resourceName: "team" - resourceProperties: [ "id", "name", "rank", "score", "size", "avatar", "country", "team_url", "follow_path", - "followed" ] - - rounded_score: Ember.computed(-> - Math.round(@get("score")) - ).property("score").cacheable() - - ordinalized_rank: Ember.computed(-> - @get("rank").toString().ordinalize() - ).property("score", "rank").cacheable() -# -# top_3_members: Ember.computed(-> -# _.sortBy @get("team_members"), (memmber) -> member.score -# ).property("team_members").cacheable() - - has_more_than_min_members: Ember.computed(-> - @get("size") > 3 - ).property("size").cacheable() - - remaining_members: Ember.computed(-> - @get("size") - 3 - ).property("size").cacheable() - - follow_text: Ember.computed(-> - if @get("followed") - "Unfollow" - else - "Follow" - ).property("followed").cacheable() - -# followed: Ember.computed(-> -# Coderwall.teamsController.followedTeamsList[@get("id")] -# ).property().cacheable() - - follow: -> - team = @ - $.post(this.follow_path).success -> - Coderwall.teamsController.updateFollowedTeam team.get("id") - team.set("followed", Coderwall.teamsController.followedTeamsList[team.get("id")]) - - followed_class: Ember.computed(-> - classes = "btn btn-large follow " - if @get("followed") - classes += "btn-primary" - classes - ).property("followed").cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/models/user.js.coffee b/app/assets/javascripts/ember/models/user.js.coffee deleted file mode 100644 index 14ca8543..00000000 --- a/app/assets/javascripts/ember/models/user.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -Coderwall.User = Ember.Resource.extend( - resourceUrl: "/users" - resourceName: "user" - resourceProperties: [ "username", "signed_in" ] - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/networks.js.coffee b/app/assets/javascripts/ember/networks.js.coffee deleted file mode 100644 index 95a6a5fa..00000000 --- a/app/assets/javascripts/ember/networks.js.coffee +++ /dev/null @@ -1,6 +0,0 @@ -#= require ./coderwall -#= require_tree ./models -#= require ./controllers/networks -#= require_tree ./templates/networks -#= require_tree ./helpers -#= require_tree ./views/networks \ No newline at end of file diff --git a/app/assets/javascripts/ember/teams.js.coffee b/app/assets/javascripts/ember/teams.js.coffee deleted file mode 100644 index c07e0cab..00000000 --- a/app/assets/javascripts/ember/teams.js.coffee +++ /dev/null @@ -1,26 +0,0 @@ -#= require ./coderwall -#= require ./models/team -#= require ./controllers/teams -#= require_tree ./templates/teams -#= require_tree ./helpers -#= require_tree ./views/teams -#= require ../search - -$ -> - search_teams = (name, country) -> - query = 'q=' + name - query += '&country=' + country if country? - # Coderwall.teamsController.clearAll() - # $.getJSON encodeURI('/teams/search?' + query), (teams) -> - # Coderwall.teamsController.loadAll teams - $.getScript encodeURI('/teams/search?' + query) - - $('.country-link').click -> - search_teams("*", $(this).find('.country-name').text()) - - searchBox.enableSearch('#teams-search', search_teams) - $('form.network-search').submit (e)-> - e.preventDefault() - query = $('#teams-search').val() - query = "" if query == $('#teams-search').attr('placeholder') - search_teams(query, null) \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/.gitkeep b/app/assets/javascripts/ember/templates/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/javascripts/ember/templates/events/achievement.js.hamlbars b/app/assets/javascripts/ember/templates/events/achievement.js.hamlbars deleted file mode 100644 index 20557213..00000000 --- a/app/assets/javascripts/ember/templates/events/achievement.js.hamlbars +++ /dev/null @@ -1,34 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - %li.fragment - = hb 'event.eventTypeString' - .content.cf - .badge-unlocked - = hb('with event.achievement.image_path') do - %img{:src => hb('image_path')} - %a{:bind => {:src => 'event.user.profile_url'}} - %span - = hb 'event.achievement.name' - .footer - %p - = hb 'event.achievement.achiever.first_name' - unlocked the - = hb 'event.achievement.name' - achievement for - = hb 'event.achievement.description' - Only - = hb 'event.achievement.percentage_of_achievers' - ==% of developers on Coderwall have earned this achievement. diff --git a/app/assets/javascripts/ember/templates/events/activity_list.js.hamlbars b/app/assets/javascripts/ember/templates/events/activity_list.js.hamlbars deleted file mode 100644 index 5e2bd8ab..00000000 --- a/app/assets/javascripts/ember/templates/events/activity_list.js.hamlbars +++ /dev/null @@ -1,2 +0,0 @@ -= hb 'each events' do - = hb 'view Coderwall.EventView', :eventBinding => 'this' \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/admin.js.hamlbars b/app/assets/javascripts/ember/templates/events/admin.js.hamlbars deleted file mode 100644 index 0471051c..00000000 --- a/app/assets/javascripts/ember/templates/events/admin.js.hamlbars +++ /dev/null @@ -1,10 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.team - =hb 'event.eventTypeString' - - .content.cf - %p - {{{event.message}}} \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/comment.js.hamlbars b/app/assets/javascripts/ember/templates/events/comment.js.hamlbars deleted file mode 100644 index f571562e..00000000 --- a/app/assets/javascripts/ember/templates/events/comment.js.hamlbars +++ /dev/null @@ -1,36 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - %li.fragment - = hb 'event.eventTypeString' - - .content.cf{:bind => {:id => 'event.public_id'}} - %a.small-upvote.track{:bind => {:href => 'event.upvote_path'}, :rel => "nofollow", 'data-action' => 'upvote protip', 'data-from' => 'comment in feed', 'data-remote' => 'true', 'data-method' => 'post'} - = hb('event.upvotes') - %h1 - = hb('with event') do - = hb('comment_action') - %a{:bind => {:href => 'url'}} - %blockquote - = hb('title') - = hb 'comment_or_like_message' - - =hb ('with event') do - =hb ('if_repliable') do - .footer.cf - %ul.actions-list - %li - %a.reply{:href => hb('reply_url')} - reply \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/endorsement.js.hamlbars b/app/assets/javascripts/ember/templates/events/endorsement.js.hamlbars deleted file mode 100644 index 3136e973..00000000 --- a/app/assets/javascripts/ember/templates/events/endorsement.js.hamlbars +++ /dev/null @@ -1,24 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - %li.fragment - = hb 'event.eventTypeString' - - .content.cf - %h1 - = hb 'event.endorsement.endorser' - thinks you are awesome at - = hb 'event.endorsement.skill' - , sweet! \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/expert.js.hamlbars b/app/assets/javascripts/ember/templates/events/expert.js.hamlbars deleted file mode 100644 index 832e43d5..00000000 --- a/app/assets/javascripts/ember/templates/events/expert.js.hamlbars +++ /dev/null @@ -1,32 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - %li.fragment - = hb 'event.eventTypeString' - %li.fragment - %a{:bind => {:href => 'event.network.url'}} - =hb 'event.network.name' - .content.cf - %h1 - = hb 'event.user.username' - is now the mayor of - = hb 'event.network.name' - .footer.cf - %ul.actions-list - %li - = hb('with event.network.name') do - %a.write-tip.track{:href => hb('write_tagged_protips_path'), 'data-action' => 'create protip', 'data-from' => 'expert in feed'} - Create a tip about - =hb('this') \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/follow.js.hamlbars b/app/assets/javascripts/ember/templates/events/follow.js.hamlbars deleted file mode 100644 index b933f5df..00000000 --- a/app/assets/javascripts/ember/templates/events/follow.js.hamlbars +++ /dev/null @@ -1,30 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - %li.fragment - = hb 'event.eventTypeString' - - .content.cf - %h1 - Nice, - = hb 'event.follow.follower' - = hb 'with event.event_type' do - = hb 'followed_text' - Your protips and achievements will now show up in their activity feed. - .footer - %p - Check out their - %a.user-name{:bind => {:href => 'event.user.profile_path'}, :class => "track", 'data-action' => 'view user profile', 'data-from' => 'follow in feed'} - profile \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/more_activity.js.hamlbars b/app/assets/javascripts/ember/templates/events/more_activity.js.hamlbars deleted file mode 100644 index aa967f35..00000000 --- a/app/assets/javascripts/ember/templates/events/more_activity.js.hamlbars +++ /dev/null @@ -1,5 +0,0 @@ - -%a.track{:href => 'javascript:;', :event => { :on => 'click', :action => 'showUnreadActivity' }, 'data-action' => 'request more activity' } - + - =hb 'Coderwall.activityFeedController.unreadActivities.length' - New activity items \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/protip.js.hamlbars b/app/assets/javascripts/ember/templates/events/protip.js.hamlbars deleted file mode 100644 index bb5455a3..00000000 --- a/app/assets/javascripts/ember/templates/events/protip.js.hamlbars +++ /dev/null @@ -1,42 +0,0 @@ -.graphic -.item - .header.cf - = hb('if event.team.hiring') do - %a.hiring-ribbon.track{:bind => {:href => 'event.teamHireUrl'}, 'data-action' => 'view team jobs', 'data-from' => 'protip ribbon on dashboard'} - %span Join us - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - =hb 'event.eventTypeString' - by - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - .content.cf{:bind => {:id => 'event.public_id'}} - %a.small-upvote.track{:bind => {:href => 'event.upvote_path'}, :rel => "nofollow", 'data-action' => 'upvote protip', 'data-from' => 'protip in feed', 'data-remote' => 'true', 'data-method' => 'post'} - = hb('event.upvotes') - %a{:bind => {:href => 'event.url'}} - %h1 - = hb('event.title') - %ul.tags.cf - = hb 'each event.tags' do - %li - %a.tag{:href => hb('tagged_protips_path')} - =hb('this') - .footer.cf - %ul.actions-list - = hb('if event.topTag') do - %li - = hb('with event.topTag') do - %a.write-tip.track{:href => hb('write_tagged_protips_path'), 'data-action' => 'create protip', 'data-from' => 'protip in feed'} - Create a tip about - =hb('this') - %li - %a.tweet{:bind => {:href => 'event.tweetUrl'}} - Tweet this \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/skill.js.hamlbars b/app/assets/javascripts/ember/templates/events/skill.js.hamlbars deleted file mode 100644 index 2471d0d1..00000000 --- a/app/assets/javascripts/ember/templates/events/skill.js.hamlbars +++ /dev/null @@ -1,30 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - %li.fragment - = hb 'event.eventTypeString' - - .content.cf - %h1 - = hb('with event.skill.name') do - %a{:href => hb('tagged_protips_path')} - = hb 'this' - .footer - %ul.actions-list - %li - %a.add-skill.track{:bind => {:href => 'event.skill.add_path', :class => 'showSkill'}, :event => { :on => 'click', :action => 'addSkill' }, 'data-remote' => 'true', 'data-method' => 'post', 'data-action' => 'add skill', 'data-from' => 'skill in feed'} - Add - =hb('event.skill.name') - to my skills \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/stats.js.hamlbars b/app/assets/javascripts/ember/templates/events/stats.js.hamlbars deleted file mode 100644 index 34721845..00000000 --- a/app/assets/javascripts/ember/templates/events/stats.js.hamlbars +++ /dev/null @@ -1,16 +0,0 @@ -%li.profile-views - %span - = hb('profileViews') - %a{:bind => {:href => 'Coderwall.activityFeedController.profileUrl'}}Profile views -%li.followers - %span - = hb('followers') - %a{:bind => {:href => 'Coderwall.activityFeedController.connectionsUrl'}}Followers -%li.protips - %span - = hb('protips') - %a{:bind => {:href => 'Coderwall.activityFeedController.protipsUrl'}}Protips -%li.upvotes - %span - = hb('protipUpvotes') - Upvotes \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/events/team.js.hamlbars b/app/assets/javascripts/ember/templates/events/team.js.hamlbars deleted file mode 100644 index b9f10a92..00000000 --- a/app/assets/javascripts/ember/templates/events/team.js.hamlbars +++ /dev/null @@ -1,30 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - =hb 'event.eventTypeString' - - .content.cf - .team-added - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - .footnote - =hb 'with event.team.skills' do - =hb 'if any_skills' do - %p - =hb 'event.team.name' - builds awesome stuff with - =hb 'each event.team.skills' do - %a.tag{:href => hb('tagged_protips_path')} - =hb('this') - .footer - %ul.actions-list - %li - %a.follow.track{:bind => {:href => 'event.team.follow_path', :class => 'showTeam'}, :event => { :on => 'click', :action => 'followTeam' }, 'data-method' => 'post', 'data-remote' => 'true', 'data-action' => 'follow team', 'data-from' => 'team in feed'} - Follow - =hb('event.team.name') diff --git a/app/assets/javascripts/ember/templates/events/view.js.hamlbars b/app/assets/javascripts/ember/templates/events/view.js.hamlbars deleted file mode 100644 index dbaef7bb..00000000 --- a/app/assets/javascripts/ember/templates/events/view.js.hamlbars +++ /dev/null @@ -1,39 +0,0 @@ -.graphic -.item - .header.cf - %ul.cf - %li.user - %img{:bind => {:src => 'event.user.profile_url'}} - %a.user-name{:bind => {:href => 'event.user.profile_path'}} - = hb 'event.user.username' - = hb('if event.belongsToTeam') do - %li.team - %span - of - %img{:bind => {:src => 'event.team.avatar'}} - %a{:bind => {:href => 'event.team.url'}} - =hb 'event.team.name' - %li.fragment - = hb 'event.eventTypeString' - .content.cf - = hb 'if event.protipEvent' do - -#%a.small-upvote - -# = hb('event.upvotes') - %h1 - Your protip - %a{:bind => {:href => 'event.url'}} - %blockquote - = hb('event.title') - = hb 'if event.viewEvent' do - has been viewed by - = hb 'event.views' - people - = hb 'else' - has - = hb 'event.upvotes' - upvotes - = hb 'else' - %h1 - Your profile has been viewed by - = hb 'event.views' - people \ No newline at end of file diff --git a/app/assets/javascripts/ember/templates/networks/all_networks/a_z.js.hamlbars b/app/assets/javascripts/ember/templates/networks/all_networks/a_z.js.hamlbars deleted file mode 100644 index 300147c2..00000000 --- a/app/assets/javascripts/ember/templates/networks/all_networks/a_z.js.hamlbars +++ /dev/null @@ -1,25 +0,0 @@ -%ol.networks-list - = hb('each alphabet') do - %li.cf - %span.letter - = hb 'this' - - = hb('each_network') do - /Network - .network.cf - %h2 - %a{:bind => {:href => 'url'}} - =hb 'name' - %ul.tips-and-users - %li - %a.users{:bind => {:href => 'members_url'}} - Members - %span - =hb 'members_count' - %li - %a.tips{:bind => {:href => 'url'}} - Protips - %span - =hb 'protips_count' - %a.join{:bind => {:href => 'join_url'}} - =hb 'joinOrMember' diff --git a/app/assets/javascripts/ember/templates/teams/index.js.hamlbars b/app/assets/javascripts/ember/templates/teams/index.js.hamlbars deleted file mode 100644 index 6afba991..00000000 --- a/app/assets/javascripts/ember/templates/teams/index.js.hamlbars +++ /dev/null @@ -1,5 +0,0 @@ -%table.table.table-striped - %tbody - =hb 'each teams' do - %tr - =hb 'view Coderwall.ShowTeamView', :teamBinding => 'this' diff --git a/app/assets/javascripts/ember/templates/teams/show.js.hamlbars b/app/assets/javascripts/ember/templates/teams/show.js.hamlbars deleted file mode 100644 index 96a95b23..00000000 --- a/app/assets/javascripts/ember/templates/teams/show.js.hamlbars +++ /dev/null @@ -1,21 +0,0 @@ -%tr.team.span10 - %td.rank.span1=hb 'team.ordinalized_rank' - %td.teamname.span3 - %a{:bind => {:href => 'team.url'}} - %img.team-avatar{:bind => {:src => 'team.avatar'}} - %span=hb 'team.name' - %td.members.span3 - =hb 'each team.team_members' do - %a{:bind => {:href => 'profile_path' }} - %img.thumb{:bind => {:src => 'avatar'}} - =hb 'if team.has_more_than_min_members' do - .size - + - =hb 'team.remaining_members' - %td.score.span1 - .circle=hb 'team.rounded_score' - %td.team-actions.span2 - =hb 'if signed_in' do - %a{:event => {:action => 'follow'}, :bind => {:class => 'team.followed:btn-primary :btn :btn-large :follow'}} - =hb 'team.follow_text' - diff --git a/app/assets/javascripts/ember/views/.gitkeep b/app/assets/javascripts/ember/views/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/app/assets/javascripts/ember/views/events/achievement.js.coffee b/app/assets/javascripts/ember/views/events/achievement.js.coffee deleted file mode 100644 index 7b11519e..00000000 --- a/app/assets/javascripts/ember/views/events/achievement.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -Coderwall.AchievementEventView = Ember.View.extend( - templateName: "ember/templates/events/achievement" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["protipEvent"] - - protipEvent: Ember.computed(-> - classnames = ["badge-unlocked", "cf"] - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/activity_feed.js.coffee b/app/assets/javascripts/ember/views/events/activity_feed.js.coffee deleted file mode 100644 index d7cf50c8..00000000 --- a/app/assets/javascripts/ember/views/events/activity_feed.js.coffee +++ /dev/null @@ -1,74 +0,0 @@ -Coderwall.ActivityListView = Ember.CollectionView.create( -# templateName: "ember/templates/events/activity_list" - contentBinding: "Coderwall.activityFeedController.activities" - tagName: "ul" - createChildView: (view, attrs) -> - console.log("attempting to render " + attrs.content) - - switch attrs.content.event_type - when 'new_protip' then view = Coderwall.ProtipEventView - when 'trending_protip' then view = Coderwall.ProtipEventView - when 'admin_message' then view = Coderwall.AdminEventView - when 'new_team' then view = Coderwall.TeamEventView - when 'new_skill' then view = Coderwall.SkillEventView - when 'endorsement' then view = Coderwall.EndorsementEventView - when 'unlocked_achievement' then view = Coderwall.AchievementEventView - when 'profile_view' then view = Coderwall.ViewEventView - when 'protip_view' then view = Coderwall.ViewEventView - when 'protip_upvote' then view = Coderwall.ViewEventView - when 'followed_user' then view = Coderwall.FollowEventView - when 'followed_team' then view = Coderwall.FollowEventView - when 'new_mayor' then view = Coderwall.ExpertEventView - when 'new_comment' then view = Coderwall.CommentEventView - when 'comment_like' then view = Coderwall.CommentEventView - when 'comment_reply' then view = Coderwall.CommentEventView - else - view = Coderwall.AdminEventView - - @._super(view, attrs) - - didInsertElement: -> - #calling all the global functions that are necessary for rewiring rendered events to the rest of the site - registerToggles() - @._super() - -) - -Coderwall.MoreActivityView = Ember.View.create( - templateName: "ember/templates/events/more_activity" - classNameBindings: ["visibility"] - tagName: "li" - - visibility: Ember.computed(-> - classes = "more-activity cf" - console.log("changing visibility " + Coderwall.activityFeedController.unreadActivities.length) - if Coderwall.activityFeedController.unreadActivities.length > 0 then classes else (classes + " no-new-activity") - ).property('Coderwall.activityFeedController.unreadActivities.@each').cacheable() - - showUnreadActivity: -> - console.log("showing unread activity") - Coderwall.activityFeedController.releaseUnreadActivities(true) -) - -Coderwall.ActivityFeedView = Ember.ContainerView.create( -# templateName: "ember/templates/events/activity_feed" - classNames: ["feed"] - tagName: "ul" - childViews: ["unreadActivityView", "activityListView", "previousActivityView"] - unreadActivityView: Coderwall.MoreActivityView - activityListView: Coderwall.ActivityListView - previousActivityView: Coderwall.MoreActivityView -) - -Coderwall.ActivityStatsView = Ember.View.create( - templateName: "ember/templates/events/stats" - tagName: "ul" - profileViewsBinding: "Coderwall.statsController.profileViews" - followersBinding: "Coderwall.statsController.followers" - protipsBinding: "Coderwall.statsController.protips" - protipUpvotesBinding: "Coderwall.statsController.protipUpvotes" - -) -#$ -> -Coderwall.ActivityFeedView.appendTo('#activity_feed') -Coderwall.ActivityStatsView.appendTo('#stats') \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/admin.js.coffee b/app/assets/javascripts/ember/views/events/admin.js.coffee deleted file mode 100644 index 62c43f55..00000000 --- a/app/assets/javascripts/ember/views/events/admin.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -Coderwall.AdminEventView = Ember.View.extend( - templateName: "ember/templates/events/admin" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["protipEvent"] - - protipEvent: Ember.computed(-> - classnames = ["admin", "cf"] - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/comment.js.coffee b/app/assets/javascripts/ember/views/events/comment.js.coffee deleted file mode 100644 index d94abad4..00000000 --- a/app/assets/javascripts/ember/views/events/comment.js.coffee +++ /dev/null @@ -1,18 +0,0 @@ -Coderwall.CommentEventView = Ember.View.extend( - templateName: "ember/templates/events/comment" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["commentEvent"] - - commentEvent: Ember.computed(-> - classnames = ["comment", "cf"] - switch @.event.event_type - when 'comment_like' then classnames.push "comment-liked" - else - classnames.push "comment" - classnames.join(" ") - ).property().cacheable() - - didInsertElement: -> - registerToggles() -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/endorsement.js.coffee b/app/assets/javascripts/ember/views/events/endorsement.js.coffee deleted file mode 100644 index 0241b24e..00000000 --- a/app/assets/javascripts/ember/views/events/endorsement.js.coffee +++ /dev/null @@ -1,12 +0,0 @@ -Coderwall.EndorsementEventView = Ember.View.extend( - templateName: "ember/templates/events/endorsement" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["endorsementEvent"] - - endorsementEvent: Ember.computed(-> - classnames = ["endorsement", "cf"] - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/event.js.coffee b/app/assets/javascripts/ember/views/events/event.js.coffee deleted file mode 100644 index 2fadcb51..00000000 --- a/app/assets/javascripts/ember/views/events/event.js.coffee +++ /dev/null @@ -1,5 +0,0 @@ -Coderwall.EventView = Ember.View.extend( - templateName: "ember/templates/events/activity_list" - activityBinding: "Coderwall.activityFeedController.activities" - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/expert.js.coffee b/app/assets/javascripts/ember/views/events/expert.js.coffee deleted file mode 100644 index 92ef802c..00000000 --- a/app/assets/javascripts/ember/views/events/expert.js.coffee +++ /dev/null @@ -1,15 +0,0 @@ -Coderwall.ExpertEventView = Ember.View.extend( - templateName: "ember/templates/events/expert" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["expertEvent"] - - expertEvent: Ember.computed(-> - classnames = ["cf"] - switch @.event.event_type - when 'new_mayor' then classnames.push "mayor" - - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/follow.js.coffee b/app/assets/javascripts/ember/views/events/follow.js.coffee deleted file mode 100644 index ab1d8363..00000000 --- a/app/assets/javascripts/ember/views/events/follow.js.coffee +++ /dev/null @@ -1,13 +0,0 @@ -Coderwall.FollowEventView = Ember.View.extend( - templateName: "ember/templates/events/follow" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["followEvent"] - - followEvent: Ember.computed(-> - classnames = ["cf"] - if @.event.event_type == "followed_team" then classnames.push "new-team-follow" else classnames.push "new-follow" - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/protip.js.coffee b/app/assets/javascripts/ember/views/events/protip.js.coffee deleted file mode 100644 index c3e86f16..00000000 --- a/app/assets/javascripts/ember/views/events/protip.js.coffee +++ /dev/null @@ -1,18 +0,0 @@ -Coderwall.ProtipEventView = Ember.View.extend( - templateName: "ember/templates/events/protip" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["protipEvent"] - - protipEvent: Ember.computed(-> - classnames = ["ptip", "cf"] - switch @.event.event_type - when 'new_protip' - if @.event.kind == "link" then classnames.push "link-protip" else classnames.push "new-protip" - when 'trending_protip' then classnames.push "trending-protip" - classnames.join(" ") - ).property().cacheable() - - didInsertElement: -> - registerToggles() -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/skill.js.coffee b/app/assets/javascripts/ember/views/events/skill.js.coffee deleted file mode 100644 index 73f33fae..00000000 --- a/app/assets/javascripts/ember/views/events/skill.js.coffee +++ /dev/null @@ -1,21 +0,0 @@ -Coderwall.SkillEventView = Ember.View.extend( - templateName: "ember/templates/events/skill" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["protipEvent"] - skillsBinding: 'Coderwall.activityFeedController.skills' - - showSkill: Ember.computed(-> - if @content.skill.name in Coderwall.activityFeedController.skills then "hide" else "show add-skill track" - ).property('event.actionable').cacheable() - - addSkill: -> - Coderwall.activityFeedController.skillAdded(@content.skill.name) - @content.set('actionable', false) - - protipEvent: Ember.computed(-> - classnames = ["added-skill", "cf"] - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/team.js.coffee b/app/assets/javascripts/ember/views/events/team.js.coffee deleted file mode 100644 index 877e6a88..00000000 --- a/app/assets/javascripts/ember/views/events/team.js.coffee +++ /dev/null @@ -1,19 +0,0 @@ -Coderwall.TeamEventView = Ember.View.extend( - templateName: "ember/templates/events/team" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["protipEvent"] - - showTeam: Ember.computed(-> - if @content.get('actionable') then "show follow track" else "hide" - ).property('event.actionable').cacheable() - - followTeam: -> - @content.set('actionable', false) - - protipEvent: Ember.computed(-> - classnames = ["new-team", "cf"] - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/events/view.js.coffee b/app/assets/javascripts/ember/views/events/view.js.coffee deleted file mode 100644 index 24ecb7d5..00000000 --- a/app/assets/javascripts/ember/views/events/view.js.coffee +++ /dev/null @@ -1,17 +0,0 @@ -Coderwall.ViewEventView = Ember.View.extend( - templateName: "ember/templates/events/view" - eventBinding: 'content' - tagName: "li" - classNameBindings: ["protipEvent"] - - protipEvent: Ember.computed(-> - classnames = ["cf"] - switch @.event.event_type - when 'protip_view' then classnames.push "protip-viewed" - when 'profile_view' then classnames.push "profile-viewed" - when 'protip_upvote' then classnames.push "protip-upvoted" - - classnames.join(" ") - ).property().cacheable() - -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/networks/network.js.coffee b/app/assets/javascripts/ember/views/networks/network.js.coffee deleted file mode 100644 index cf9c2e94..00000000 --- a/app/assets/javascripts/ember/views/networks/network.js.coffee +++ /dev/null @@ -1,29 +0,0 @@ -Coderwall.AllNetworksView = Ember.View.create( - alphabet: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", - "V", "W", "X", "Y", "Z"] - tagName: "div" - sortOrder: 'a_z' - networksBinding: "Coderwall.networksController.content" - - templateName: (-> - templateName = if @get('sortOrder')? then @get('sortOrder') else "a_z" - "ember/templates/networks/all_networks/" + templateName - ).property("sortOrder").cacheable() - - sortByAlpyhabet: -> - Coderwall.networksController.set('sortField', 'name') - @set('sortOrder', 'a_z') - - sortByUpvotes: -> - Coderwall.networksController.set('sortField', 'upvotes') - @set('sortOrder', 'upvotes') - - sortByNewProtips: -> - Coderwall.networksController.set('sortField', 'created_at') - @set('sortOrder', 'new') - - showMembers: -> - -) - -Coderwall.AllNetworksView.appendTo('#networks') \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/teams/index.js.coffee b/app/assets/javascripts/ember/views/teams/index.js.coffee deleted file mode 100644 index 66027126..00000000 --- a/app/assets/javascripts/ember/views/teams/index.js.coffee +++ /dev/null @@ -1,7 +0,0 @@ -Coderwall.ListTeamsView = Ember.View.extend( - templateName: "ember/templates/teams/index" - teamsBinding: "Coderwall.teamsController" - - refreshListing: -> - Coderwall.teamsController.findAll() -) \ No newline at end of file diff --git a/app/assets/javascripts/ember/views/teams/show.js.coffee b/app/assets/javascripts/ember/views/teams/show.js.coffee deleted file mode 100644 index 019e95ca..00000000 --- a/app/assets/javascripts/ember/views/teams/show.js.coffee +++ /dev/null @@ -1,10 +0,0 @@ -Coderwall.ShowTeamView = Ember.View.extend( - templateName: "ember/templates/teams/show" - classNames: [ "team" ] - tagName: "tr" - - follow: (e)-> - team = @get("team") - team.follow() - e.preventDefault() -) \ No newline at end of file diff --git a/app/assets/javascripts/jobs.js.coffee b/app/assets/javascripts/jobs.js.coffee index f0eeb59f..fd93a584 100644 --- a/app/assets/javascripts/jobs.js.coffee +++ b/app/assets/javascripts/jobs.js.coffee @@ -1,8 +1,16 @@ $ -> - $('a.filter').on 'click', (e)-> - $('.location-drop-down').toggleClass("hide") - e.stopPropagation() + # if the query is not empty, then make it active to see the text better + if $('input.query').val() != $('input.query').attr('placeholder') && $('input.query').val().length > 0 + $('input.query').addClass('active') - $(document).on 'click', -> - $('.location-drop-down').addClass("hide") + # after a change in keywords input, if the query is not empty, then make it active to see the text better + $('input.query').on 'change', (e) -> + if $(this).val().length > 0 + $(this).addClass('active') + else + $(this).removeClass('active') + # make sure the placeholder for the keywords input form doesn't get sent as the query + $('#filter-jobs').on 'submit', (e) => + if $('input.query').attr('placeholder') == $('input.query').val() + $('input.query').val('') \ No newline at end of file diff --git a/app/assets/javascripts/jquery-ui-1.8.17.custom.min.js b/app/assets/javascripts/jquery-ui-1.8.17.custom.min.js deleted file mode 100644 index d1bbef6b..00000000 --- a/app/assets/javascripts/jquery-ui-1.8.17.custom.min.js +++ /dev/null @@ -1,1553 +0,0 @@ -/*! - * jQuery UI 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function (a, b) { - function d(b) { - return!a(b).parents().andSelf().filter(function () { - return a.curCSS(this, "visibility") === "hidden" || a.expr.filters.hidden(this) - }).length - } - - function c(b, c) { - var e = b.nodeName.toLowerCase(); - if ("area" === e) { - var f = b.parentNode, g = f.name, h; - if (!b.href || !g || f.nodeName.toLowerCase() !== "map")return!1; - h = a("img[usemap=#" + g + "]")[0]; - return!!h && d(h) - } - return(/input|select|textarea|button|object/.test(e) ? !b.disabled : "a" == e ? b.href || c : c) && d(b) - } - - a.ui = a.ui || {}; - a.ui.version || (a.extend(a.ui, {version: "1.8.17", keyCode: {ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91}}), a.fn.extend({propAttr: a.fn.prop || a.fn.attr, _focus: a.fn.focus, focus: function (b, c) { - return typeof b == "number" ? this.each(function () { - var d = this; - setTimeout(function () { - a(d).focus(), c && c.call(d) - }, b) - }) : this._focus.apply(this, arguments) - }, scrollParent: function () { - var b; - a.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? b = this.parents().filter(function () { - return/(relative|absolute|fixed)/.test(a.curCSS(this, "position", 1)) && /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1)) - }).eq(0) : b = this.parents().filter(function () { - return/(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1)) - }).eq(0); - return/fixed/.test(this.css("position")) || !b.length ? a(document) : b - }, zIndex: function (c) { - if (c !== b)return this.css("zIndex", c); - if (this.length) { - var d = a(this[0]), e, f; - while (d.length && d[0] !== document) { - e = d.css("position"); - if (e === "absolute" || e === "relative" || e === "fixed") { - f = parseInt(d.css("zIndex"), 10); - if (!isNaN(f) && f !== 0)return f - } - d = d.parent() - } - } - return 0 - }, disableSelection: function () { - return this.bind((a.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (a) { - a.preventDefault() - }) - }, enableSelection: function () { - return this.unbind(".ui-disableSelection") - }}), a.each(["Width", "Height"], function (c, d) { - function h(b, c, d, f) { - a.each(e, function () { - c -= parseFloat(a.curCSS(b, "padding" + this, !0)) || 0, d && (c -= parseFloat(a.curCSS(b, "border" + this + "Width", !0)) || 0), f && (c -= parseFloat(a.curCSS(b, "margin" + this, !0)) || 0) - }); - return c - } - - var e = d === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], f = d.toLowerCase(), g = {innerWidth: a.fn.innerWidth, innerHeight: a.fn.innerHeight, outerWidth: a.fn.outerWidth, outerHeight: a.fn.outerHeight}; - a.fn["inner" + d] = function (c) { - if (c === b)return g["inner" + d].call(this); - return this.each(function () { - a(this).css(f, h(this, c) + "px") - }) - }, a.fn["outer" + d] = function (b, c) { - if (typeof b != "number")return g["outer" + d].call(this, b); - return this.each(function () { - a(this).css(f, h(this, b, !0, c) + "px") - }) - } - }), a.extend(a.expr[":"], {data: function (b, c, d) { - return!!a.data(b, d[3]) - }, focusable: function (b) { - return c(b, !isNaN(a.attr(b, "tabindex"))) - }, tabbable: function (b) { - var d = a.attr(b, "tabindex"), e = isNaN(d); - return(e || d >= 0) && c(b, !e) - }}), a(function () { - var b = document.body, c = b.appendChild(c = document.createElement("div")); - a.extend(c.style, {minHeight: "100px", height: "auto", padding: 0, borderWidth: 0}), a.support.minHeight = c.offsetHeight === 100, a.support.selectstart = "onselectstart"in c, b.removeChild(c).style.display = "none" - }), a.extend(a.ui, {plugin: {add: function (b, c, d) { - var e = a.ui[b].prototype; - for (var f in d)e.plugins[f] = e.plugins[f] || [], e.plugins[f].push([c, d[f]]) - }, call: function (a, b, c) { - var d = a.plugins[b]; - if (!!d && !!a.element[0].parentNode)for (var e = 0; e < d.length; e++)a.options[d[e][0]] && d[e][1].apply(a.element, c) - }}, contains: function (a, b) { - return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b) - }, hasScroll: function (b, c) { - if (a(b).css("overflow") === "hidden")return!1; - var d = c && c === "left" ? "scrollLeft" : "scrollTop", e = !1; - if (b[d] > 0)return!0; - b[d] = 1, e = b[d] > 0, b[d] = 0; - return e - }, isOverAxis: function (a, b, c) { - return a > b && a < b + c - }, isOver: function (b, c, d, e, f, g) { - return a.ui.isOverAxis(b, d, f) && a.ui.isOverAxis(c, e, g) - }})) -})(jQuery); -/*! - * jQuery UI Widget 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function (a, b) { - if (a.cleanData) { - var c = a.cleanData; - a.cleanData = function (b) { - for (var d = 0, e; (e = b[d]) != null; d++)try { - a(e).triggerHandler("remove") - } catch (f) { - } - c(b) - } - } else { - var d = a.fn.remove; - a.fn.remove = function (b, c) { - return this.each(function () { - c || (!b || a.filter(b, [this]).length) && a("*", this).add([this]).each(function () { - try { - a(this).triggerHandler("remove") - } catch (b) { - } - }); - return d.call(a(this), b, c) - }) - } - } - a.widget = function (b, c, d) { - var e = b.split(".")[0], f; - b = b.split(".")[1], f = e + "-" + b, d || (d = c, c = a.Widget), a.expr[":"][f] = function (c) { - return!!a.data(c, b) - }, a[e] = a[e] || {}, a[e][b] = function (a, b) { - arguments.length && this._createWidget(a, b) - }; - var g = new c; - g.options = a.extend(!0, {}, g.options), a[e][b].prototype = a.extend(!0, g, {namespace: e, widgetName: b, widgetEventPrefix: a[e][b].prototype.widgetEventPrefix || b, widgetBaseClass: f}, d), a.widget.bridge(b, a[e][b]) - }, a.widget.bridge = function (c, d) { - a.fn[c] = function (e) { - var f = typeof e == "string", g = Array.prototype.slice.call(arguments, 1), h = this; - e = !f && g.length ? a.extend.apply(null, [!0, e].concat(g)) : e; - if (f && e.charAt(0) === "_")return h; - f ? this.each(function () { - var d = a.data(this, c), f = d && a.isFunction(d[e]) ? d[e].apply(d, g) : d; - if (f !== d && f !== b) { - h = f; - return!1 - } - }) : this.each(function () { - var b = a.data(this, c); - b ? b.option(e || {})._init() : a.data(this, c, new d(e, this)) - }); - return h - } - }, a.Widget = function (a, b) { - arguments.length && this._createWidget(a, b) - }, a.Widget.prototype = {widgetName: "widget", widgetEventPrefix: "", options: {disabled: !1}, _createWidget: function (b, c) { - a.data(c, this.widgetName, this), this.element = a(c), this.options = a.extend(!0, {}, this.options, this._getCreateOptions(), b); - var d = this; - this.element.bind("remove." + this.widgetName, function () { - d.destroy() - }), this._create(), this._trigger("create"), this._init() - }, _getCreateOptions: function () { - return a.metadata && a.metadata.get(this.element[0])[this.widgetName] - }, _create: function () { - }, _init: function () { - }, destroy: function () { - this.element.unbind("." + this.widgetName).removeData(this.widgetName), this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled " + "ui-state-disabled") - }, widget: function () { - return this.element - }, option: function (c, d) { - var e = c; - if (arguments.length === 0)return a.extend({}, this.options); - if (typeof c == "string") { - if (d === b)return this.options[c]; - e = {}, e[c] = d - } - this._setOptions(e); - return this - }, _setOptions: function (b) { - var c = this; - a.each(b, function (a, b) { - c._setOption(a, b) - }); - return this - }, _setOption: function (a, b) { - this.options[a] = b, a === "disabled" && this.widget()[b ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled" + " " + "ui-state-disabled").attr("aria-disabled", b); - return this - }, enable: function () { - return this._setOption("disabled", !1) - }, disable: function () { - return this._setOption("disabled", !0) - }, _trigger: function (b, c, d) { - var e, f, g = this.options[b]; - d = d || {}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent; - if (f)for (e in f)e in c || (c[e] = f[e]); - this.element.trigger(c, d); - return!(a.isFunction(g) && g.call(this.element[0], c, d) === !1 || c.isDefaultPrevented()) - }} -})(jQuery); -/*! - * jQuery UI Mouse 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function (a, b) { - var c = !1; - a(document).mouseup(function (a) { - c = !1 - }), a.widget("ui.mouse", {options: {cancel: ":input,option", distance: 1, delay: 0}, _mouseInit: function () { - var b = this; - this.element.bind("mousedown." + this.widgetName,function (a) { - return b._mouseDown(a) - }).bind("click." + this.widgetName, function (c) { - if (!0 === a.data(c.target, b.widgetName + ".preventClickEvent")) { - a.removeData(c.target, b.widgetName + ".preventClickEvent"), c.stopImmediatePropagation(); - return!1 - } - }), this.started = !1 - }, _mouseDestroy: function () { - this.element.unbind("." + this.widgetName) - }, _mouseDown: function (b) { - if (!c) { - this._mouseStarted && this._mouseUp(b), this._mouseDownEvent = b; - var d = this, e = b.which == 1, f = typeof this.options.cancel == "string" && b.target.nodeName ? a(b.target).closest(this.options.cancel).length : !1; - if (!e || f || !this._mouseCapture(b))return!0; - this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { - d.mouseDelayMet = !0 - }, this.options.delay)); - if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) { - this._mouseStarted = this._mouseStart(b) !== !1; - if (!this._mouseStarted) { - b.preventDefault(); - return!0 - } - } - !0 === a.data(b.target, this.widgetName + ".preventClickEvent") && a.removeData(b.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function (a) { - return d._mouseMove(a) - }, this._mouseUpDelegate = function (a) { - return d._mouseUp(a) - }, a(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), b.preventDefault(), c = !0; - return!0 - } - }, _mouseMove: function (b) { - if (a.browser.msie && !(document.documentMode >= 9) && !b.button)return this._mouseUp(b); - if (this._mouseStarted) { - this._mouseDrag(b); - return b.preventDefault() - } - this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== !1, this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b)); - return!this._mouseStarted - }, _mouseUp: function (b) { - a(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, b.target == this._mouseDownEvent.target && a.data(b.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(b)); - return!1 - }, _mouseDistanceMet: function (a) { - return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance - }, _mouseDelayMet: function (a) { - return this.mouseDelayMet - }, _mouseStart: function (a) { - }, _mouseDrag: function (a) { - }, _mouseStop: function (a) { - }, _mouseCapture: function (a) { - return!0 - }}) -})(jQuery); -/* - * jQuery UI Position 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Position - */ -(function (a, b) { - a.ui = a.ui || {}; - var c = /left|center|right/, d = /top|center|bottom/, e = "center", f = {}, g = a.fn.position, h = a.fn.offset; - a.fn.position = function (b) { - if (!b || !b.of)return g.apply(this, arguments); - b = a.extend({}, b); - var h = a(b.of), i = h[0], j = (b.collision || "flip").split(" "), k = b.offset ? b.offset.split(" ") : [0, 0], l, m, n; - i.nodeType === 9 ? (l = h.width(), m = h.height(), n = {top: 0, left: 0}) : i.setTimeout ? (l = h.width(), m = h.height(), n = {top: h.scrollTop(), left: h.scrollLeft()}) : i.preventDefault ? (b.at = "left top", l = m = 0, n = {top: b.of.pageY, left: b.of.pageX}) : (l = h.outerWidth(), m = h.outerHeight(), n = h.offset()), a.each(["my", "at"], function () { - var a = (b[this] || "").split(" "); - a.length === 1 && (a = c.test(a[0]) ? a.concat([e]) : d.test(a[0]) ? [e].concat(a) : [e, e]), a[0] = c.test(a[0]) ? a[0] : e, a[1] = d.test(a[1]) ? a[1] : e, b[this] = a - }), j.length === 1 && (j[1] = j[0]), k[0] = parseInt(k[0], 10) || 0, k.length === 1 && (k[1] = k[0]), k[1] = parseInt(k[1], 10) || 0, b.at[0] === "right" ? n.left += l : b.at[0] === e && (n.left += l / 2), b.at[1] === "bottom" ? n.top += m : b.at[1] === e && (n.top += m / 2), n.left += k[0], n.top += k[1]; - return this.each(function () { - var c = a(this), d = c.outerWidth(), g = c.outerHeight(), h = parseInt(a.curCSS(this, "marginLeft", !0)) || 0, i = parseInt(a.curCSS(this, "marginTop", !0)) || 0, o = d + h + (parseInt(a.curCSS(this, "marginRight", !0)) || 0), p = g + i + (parseInt(a.curCSS(this, "marginBottom", !0)) || 0), q = a.extend({}, n), r; - b.my[0] === "right" ? q.left -= d : b.my[0] === e && (q.left -= d / 2), b.my[1] === "bottom" ? q.top -= g : b.my[1] === e && (q.top -= g / 2), f.fractions || (q.left = Math.round(q.left), q.top = Math.round(q.top)), r = {left: q.left - h, top: q.top - i}, a.each(["left", "top"], function (c, e) { - a.ui.position[j[c]] && a.ui.position[j[c]][e](q, {targetWidth: l, targetHeight: m, elemWidth: d, elemHeight: g, collisionPosition: r, collisionWidth: o, collisionHeight: p, offset: k, my: b.my, at: b.at}) - }), a.fn.bgiframe && c.bgiframe(), c.offset(a.extend(q, {using: b.using})) - }) - }, a.ui.position = {fit: {left: function (b, c) { - var d = a(window), e = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(); - b.left = e > 0 ? b.left - e : Math.max(b.left - c.collisionPosition.left, b.left) - }, top: function (b, c) { - var d = a(window), e = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(); - b.top = e > 0 ? b.top - e : Math.max(b.top - c.collisionPosition.top, b.top) - }}, flip: {left: function (b, c) { - if (c.at[0] !== e) { - var d = a(window), f = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(), g = c.my[0] === "left" ? -c.elemWidth : c.my[0] === "right" ? c.elemWidth : 0, h = c.at[0] === "left" ? c.targetWidth : -c.targetWidth, i = -2 * c.offset[0]; - b.left += c.collisionPosition.left < 0 ? g + h + i : f > 0 ? g + h + i : 0 - } - }, top: function (b, c) { - if (c.at[1] !== e) { - var d = a(window), f = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(), g = c.my[1] === "top" ? -c.elemHeight : c.my[1] === "bottom" ? c.elemHeight : 0, h = c.at[1] === "top" ? c.targetHeight : -c.targetHeight, i = -2 * c.offset[1]; - b.top += c.collisionPosition.top < 0 ? g + h + i : f > 0 ? g + h + i : 0 - } - }}}, a.offset.setOffset || (a.offset.setOffset = function (b, c) { - /static/.test(a.curCSS(b, "position")) && (b.style.position = "relative"); - var d = a(b), e = d.offset(), f = parseInt(a.curCSS(b, "top", !0), 10) || 0, g = parseInt(a.curCSS(b, "left", !0), 10) || 0, h = {top: c.top - e.top + f, left: c.left - e.left + g}; - "using"in c ? c.using.call(b, h) : d.css(h) - }, a.fn.offset = function (b) { - var c = this[0]; - if (!c || !c.ownerDocument)return null; - if (b)return this.each(function () { - a.offset.setOffset(this, b) - }); - return h.call(this) - }), function () { - var b = document.getElementsByTagName("body")[0], c = document.createElement("div"), d, e, g, h, i; - d = document.createElement(b ? "div" : "body"), g = {visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none"}, b && jQuery.extend(g, {position: "absolute", left: "-1000px", top: "-1000px"}); - for (var j in g)d.style[j] = g[j]; - d.appendChild(c), e = b || document.documentElement, e.insertBefore(d, e.firstChild), c.style.cssText = "position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;", h = a(c).offset(function (a, b) { - return b - }).offset(), d.innerHTML = "", e.removeChild(d), i = h.top + h.left + (b ? 2e3 : 0), f.fractions = i > 21 && i < 22 - }() -})(jQuery); -/* - * jQuery UI Draggable 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Draggables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function (a, b) { - a.widget("ui.draggable", a.ui.mouse, {widgetEventPrefix: "drag", options: {addClasses: !0, appendTo: "parent", axis: !1, connectToSortable: !1, containment: !1, cursor: "auto", cursorAt: !1, grid: !1, handle: !1, helper: "original", iframeFix: !1, opacity: !1, refreshPositions: !1, revert: !1, revertDuration: 500, scope: "default", scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, snap: !1, snapMode: "both", snapTolerance: 20, stack: !1, zIndex: !1}, _create: function () { - this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position")) && (this.element[0].style.position = "relative"), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._mouseInit() - }, destroy: function () { - if (!!this.element.data("draggable")) { - this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy(); - return this - } - }, _mouseCapture: function (b) { - var c = this.options; - if (this.helper || c.disabled || a(b.target).is(".ui-resizable-handle"))return!1; - this.handle = this._getHandle(b); - if (!this.handle)return!1; - c.iframeFix && a(c.iframeFix === !0 ? "iframe" : c.iframeFix).each(function () { - a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width: this.offsetWidth + "px", height: this.offsetHeight + "px", position: "absolute", opacity: "0.001", zIndex: 1e3}).css(a(this).offset()).appendTo("body") - }); - return!0 - }, _mouseStart: function (b) { - var c = this.options; - this.helper = this._createHelper(b), this._cacheHelperProportions(), a.ui.ddmanager && (a.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(), this.offset = this.positionAbs = this.element.offset(), this.offset = {top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left}, a.extend(this.offset, {click: {left: b.pageX - this.offset.left, top: b.pageY - this.offset.top}, parent: this._getParentOffset(), relative: this._getRelativeOffset()}), this.originalPosition = this.position = this._generatePosition(b), this.originalPageX = b.pageX, this.originalPageY = b.pageY, c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt), c.containment && this._setContainment(); - if (this._trigger("start", b) === !1) { - this._clear(); - return!1 - } - this._cacheHelperProportions(), a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this.helper.addClass("ui-draggable-dragging"), this._mouseDrag(b, !0), a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b); - return!0 - }, _mouseDrag: function (b, c) { - this.position = this._generatePosition(b), this.positionAbs = this._convertPositionTo("absolute"); - if (!c) { - var d = this._uiHash(); - if (this._trigger("drag", b, d) === !1) { - this._mouseUp({}); - return!1 - } - this.position = d.position - } - if (!this.options.axis || this.options.axis != "y")this.helper[0].style.left = this.position.left + "px"; - if (!this.options.axis || this.options.axis != "x")this.helper[0].style.top = this.position.top + "px"; - a.ui.ddmanager && a.ui.ddmanager.drag(this, b); - return!1 - }, _mouseStop: function (b) { - var c = !1; - a.ui.ddmanager && !this.options.dropBehaviour && (c = a.ui.ddmanager.drop(this, b)), this.dropped && (c = this.dropped, this.dropped = !1); - if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")return!1; - if (this.options.revert == "invalid" && !c || this.options.revert == "valid" && c || this.options.revert === !0 || a.isFunction(this.options.revert) && this.options.revert.call(this.element, c)) { - var d = this; - a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { - d._trigger("stop", b) !== !1 && d._clear() - }) - } else this._trigger("stop", b) !== !1 && this._clear(); - return!1 - }, _mouseUp: function (b) { - this.options.iframeFix === !0 && a("div.ui-draggable-iframeFix").each(function () { - this.parentNode.removeChild(this) - }), a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b); - return a.ui.mouse.prototype._mouseUp.call(this, b) - }, cancel: function () { - this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(); - return this - }, _getHandle: function (b) { - var c = !this.options.handle || !a(this.options.handle, this.element).length ? !0 : !1; - a(this.options.handle, this.element).find("*").andSelf().each(function () { - this == b.target && (c = !0) - }); - return c - }, _createHelper: function (b) { - var c = this.options, d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b])) : c.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; - d.parents("body").length || d.appendTo(c.appendTo == "parent" ? this.element[0].parentNode : c.appendTo), d[0] != this.element[0] && !/(fixed|absolute)/.test(d.css("position")) && d.css("position", "absolute"); - return d - }, _adjustOffsetFromHelper: function (b) { - typeof b == "string" && (b = b.split(" ")), a.isArray(b) && (b = {left: +b[0], top: +b[1] || 0}), "left"in b && (this.offset.click.left = b.left + this.margins.left), "right"in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), "top"in b && (this.offset.click.top = b.top + this.margins.top), "bottom"in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top) - }, _getParentOffset: function () { - this.offsetParent = this.helper.offsetParent(); - var b = this.offsetParent.offset(); - this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()); - if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie)b = {top: 0, left: 0}; - return{top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} - }, _getRelativeOffset: function () { - if (this.cssPosition == "relative") { - var a = this.element.position(); - return{top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} - } - return{top: 0, left: 0} - }, _cacheMargins: function () { - this.margins = {left: parseInt(this.element.css("marginLeft"), 10) || 0, top: parseInt(this.element.css("marginTop"), 10) || 0, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0} - }, _cacheHelperProportions: function () { - this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()} - }, _setContainment: function () { - var b = this.options; - b.containment == "parent" && (b.containment = this.helper[0].parentNode); - if (b.containment == "document" || b.containment == "window")this.containment = [b.containment == "document" ? 0 : a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, b.containment == "document" ? 0 : a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (b.containment == "document" ? 0 : a(window).scrollLeft()) + a(b.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (b.containment == "document" ? 0 : a(window).scrollTop()) + (a(b.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; - if (!/^(document|window|parent)$/.test(b.containment) && b.containment.constructor != Array) { - var c = a(b.containment), d = c[0]; - if (!d)return; - var e = c.offset(), f = a(d).css("overflow") != "hidden"; - this.containment = [(parseInt(a(d).css("borderLeftWidth"), 10) || 0) + (parseInt(a(d).css("paddingLeft"), 10) || 0), (parseInt(a(d).css("borderTopWidth"), 10) || 0) + (parseInt(a(d).css("paddingTop"), 10) || 0), (f ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(a(d).css("borderLeftWidth"), 10) || 0) - (parseInt(a(d).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (f ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(a(d).css("borderTopWidth"), 10) || 0) - (parseInt(a(d).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = c - } else b.containment.constructor == Array && (this.containment = b.containment) - }, _convertPositionTo: function (b, c) { - c || (c = this.position); - var d = b == "absolute" ? 1 : -1, e = this.options, f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, g = /(html|body)/i.test(f[0].tagName); - return{top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d), left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d)} - }, _generatePosition: function (b) { - var c = this.options, d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(d[0].tagName), f = b.pageX, g = b.pageY; - if (this.originalPosition) { - var h; - if (this.containment) { - if (this.relative_container) { - var i = this.relative_container.offset(); - h = [this.containment[0] + i.left, this.containment[1] + i.top, this.containment[2] + i.left, this.containment[3] + i.top] - } else h = this.containment; - b.pageX - this.offset.click.left < h[0] && (f = h[0] + this.offset.click.left), b.pageY - this.offset.click.top < h[1] && (g = h[1] + this.offset.click.top), b.pageX - this.offset.click.left > h[2] && (f = h[2] + this.offset.click.left), b.pageY - this.offset.click.top > h[3] && (g = h[3] + this.offset.click.top) - } - if (c.grid) { - var j = c.grid[1] ? this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1] : this.originalPageY; - g = h ? j - this.offset.click.top < h[1] || j - this.offset.click.top > h[3] ? j - this.offset.click.top < h[1] ? j + c.grid[1] : j - c.grid[1] : j : j; - var k = c.grid[0] ? this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0] : this.originalPageX; - f = h ? k - this.offset.click.left < h[0] || k - this.offset.click.left > h[2] ? k - this.offset.click.left < h[0] ? k + c.grid[0] : k - c.grid[0] : k : k - } - } - return{top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()), left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft())} - }, _clear: function () { - this.helper.removeClass("ui-draggable-dragging"), this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1 - }, _trigger: function (b, c, d) { - d = d || this._uiHash(), a.ui.plugin.call(this, b, [c, d]), b == "drag" && (this.positionAbs = this._convertPositionTo("absolute")); - return a.Widget.prototype._trigger.call(this, b, c, d) - }, plugins: {}, _uiHash: function (a) { - return{helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs} - }}), a.extend(a.ui.draggable, {version: "1.8.17"}), a.ui.plugin.add("draggable", "connectToSortable", {start: function (b, c) { - var d = a(this).data("draggable"), e = d.options, f = a.extend({}, c, {item: d.element}); - d.sortables = [], a(e.connectToSortable).each(function () { - var c = a.data(this, "sortable"); - c && !c.options.disabled && (d.sortables.push({instance: c, shouldRevert: c.options.revert}), c.refreshPositions(), c._trigger("activate", b, f)) - }) - }, stop: function (b, c) { - var d = a(this).data("draggable"), e = a.extend({}, c, {item: d.element}); - a.each(d.sortables, function () { - this.instance.isOver ? (this.instance.isOver = 0, d.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = !0), this.instance._mouseStop(b), this.instance.options.helper = this.instance.options._helper, d.options.helper == "original" && this.instance.currentItem.css({top: "auto", left: "auto"})) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", b, e)) - }) - }, drag: function (b, c) { - var d = a(this).data("draggable"), e = this, f = function (b) { - var c = this.offset.click.top, d = this.offset.click.left, e = this.positionAbs.top, f = this.positionAbs.left, g = b.height, h = b.width, i = b.top, j = b.left; - return a.ui.isOver(e + c, f + d, i, j, g, h) - }; - a.each(d.sortables, function (f) { - this.instance.positionAbs = d.positionAbs, this.instance.helperProportions = d.helperProportions, this.instance.offset.click = d.offset.click, this.instance._intersectsWith(this.instance.containerCache) ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function () { - return c.helper[0] - }, b.target = this.instance.currentItem[0], this.instance._mouseCapture(b, !0), this.instance._mouseStart(b, !0, !0), this.instance.offset.click.top = d.offset.click.top, this.instance.offset.click.left = d.offset.click.left, this.instance.offset.parent.left -= d.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= d.offset.parent.top - this.instance.offset.parent.top, d._trigger("toSortable", b), d.dropped = this.instance.element, d.currentItem = d.element, this.instance.fromOutside = d), this.instance.currentItem && this.instance._mouseDrag(b)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", b, this.instance._uiHash(this.instance)), this.instance._mouseStop(b, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), d._trigger("fromSortable", b), d.dropped = !1) - }) - }}), a.ui.plugin.add("draggable", "cursor", {start: function (b, c) { - var d = a("body"), e = a(this).data("draggable").options; - d.css("cursor") && (e._cursor = d.css("cursor")), d.css("cursor", e.cursor) - }, stop: function (b, c) { - var d = a(this).data("draggable").options; - d._cursor && a("body").css("cursor", d._cursor) - }}), a.ui.plugin.add("draggable", "opacity", {start: function (b, c) { - var d = a(c.helper), e = a(this).data("draggable").options; - d.css("opacity") && (e._opacity = d.css("opacity")), d.css("opacity", e.opacity) - }, stop: function (b, c) { - var d = a(this).data("draggable").options; - d._opacity && a(c.helper).css("opacity", d._opacity) - }}), a.ui.plugin.add("draggable", "scroll", {start: function (b, c) { - var d = a(this).data("draggable"); - d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML" && (d.overflowOffset = d.scrollParent.offset()) - }, drag: function (b, c) { - var d = a(this).data("draggable"), e = d.options, f = !1; - if (d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML") { - if (!e.axis || e.axis != "x")d.overflowOffset.top + d.scrollParent[0].offsetHeight - b.pageY < e.scrollSensitivity ? d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop + e.scrollSpeed : b.pageY - d.overflowOffset.top < e.scrollSensitivity && (d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop - e.scrollSpeed); - if (!e.axis || e.axis != "y")d.overflowOffset.left + d.scrollParent[0].offsetWidth - b.pageX < e.scrollSensitivity ? d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft + e.scrollSpeed : b.pageX - d.overflowOffset.left < e.scrollSensitivity && (d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft - e.scrollSpeed) - } else { - if (!e.axis || e.axis != "x")b.pageY - a(document).scrollTop() < e.scrollSensitivity ? f = a(document).scrollTop(a(document).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < e.scrollSensitivity && (f = a(document).scrollTop(a(document).scrollTop() + e.scrollSpeed)); - if (!e.axis || e.axis != "y")b.pageX - a(document).scrollLeft() < e.scrollSensitivity ? f = a(document).scrollLeft(a(document).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < e.scrollSensitivity && (f = a(document).scrollLeft(a(document).scrollLeft() + e.scrollSpeed)) - } - f !== !1 && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b) - }}), a.ui.plugin.add("draggable", "snap", {start: function (b, c) { - var d = a(this).data("draggable"), e = d.options; - d.snapElements = [], a(e.snap.constructor != String ? e.snap.items || ":data(draggable)" : e.snap).each(function () { - var b = a(this), c = b.offset(); - this != d.element[0] && d.snapElements.push({item: this, width: b.outerWidth(), height: b.outerHeight(), top: c.top, left: c.left}) - }) - }, drag: function (b, c) { - var d = a(this).data("draggable"), e = d.options, f = e.snapTolerance, g = c.offset.left, h = g + d.helperProportions.width, i = c.offset.top, j = i + d.helperProportions.height; - for (var k = d.snapElements.length - 1; k >= 0; k--) { - var l = d.snapElements[k].left, m = l + d.snapElements[k].width, n = d.snapElements[k].top, o = n + d.snapElements[k].height; - if (!(l - f < g && g < m + f && n - f < i && i < o + f || l - f < g && g < m + f && n - f < j && j < o + f || l - f < h && h < m + f && n - f < i && i < o + f || l - f < h && h < m + f && n - f < j && j < o + f)) { - d.snapElements[k].snapping && d.options.snap.release && d.options.snap.release.call(d.element, b, a.extend(d._uiHash(), {snapItem: d.snapElements[k].item})), d.snapElements[k].snapping = !1; - continue - } - if (e.snapMode != "inner") { - var p = Math.abs(n - j) <= f, q = Math.abs(o - i) <= f, r = Math.abs(l - h) <= f, s = Math.abs(m - g) <= f; - p && (c.position.top = d._convertPositionTo("relative", {top: n - d.helperProportions.height, left: 0}).top - d.margins.top), q && (c.position.top = d._convertPositionTo("relative", {top: o, left: 0}).top - d.margins.top), r && (c.position.left = d._convertPositionTo("relative", {top: 0, left: l - d.helperProportions.width}).left - d.margins.left), s && (c.position.left = d._convertPositionTo("relative", {top: 0, left: m}).left - d.margins.left) - } - var t = p || q || r || s; - if (e.snapMode != "outer") { - var p = Math.abs(n - i) <= f, q = Math.abs(o - j) <= f, r = Math.abs(l - g) <= f, s = Math.abs(m - h) <= f; - p && (c.position.top = d._convertPositionTo("relative", {top: n, left: 0}).top - d.margins.top), q && (c.position.top = d._convertPositionTo("relative", {top: o - d.helperProportions.height, left: 0}).top - d.margins.top), r && (c.position.left = d._convertPositionTo("relative", {top: 0, left: l}).left - d.margins.left), s && (c.position.left = d._convertPositionTo("relative", {top: 0, left: m - d.helperProportions.width}).left - d.margins.left) - } - !d.snapElements[k].snapping && (p || q || r || s || t) && d.options.snap.snap && d.options.snap.snap.call(d.element, b, a.extend(d._uiHash(), {snapItem: d.snapElements[k].item})), d.snapElements[k].snapping = p || q || r || s || t - } - }}), a.ui.plugin.add("draggable", "stack", {start: function (b, c) { - var d = a(this).data("draggable").options, e = a.makeArray(a(d.stack)).sort(function (b, c) { - return(parseInt(a(b).css("zIndex"), 10) || 0) - (parseInt(a(c).css("zIndex"), 10) || 0) - }); - if (!!e.length) { - var f = parseInt(e[0].style.zIndex) || 0; - a(e).each(function (a) { - this.style.zIndex = f + a - }), this[0].style.zIndex = f + e.length - } - }}), a.ui.plugin.add("draggable", "zIndex", {start: function (b, c) { - var d = a(c.helper), e = a(this).data("draggable").options; - d.css("zIndex") && (e._zIndex = d.css("zIndex")), d.css("zIndex", e.zIndex) - }, stop: function (b, c) { - var d = a(this).data("draggable").options; - d._zIndex && a(c.helper).css("zIndex", d._zIndex) - }}) -})(jQuery); -/* - * jQuery UI Droppable 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Droppables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.mouse.js - * jquery.ui.draggable.js - */ -(function (a, b) { - a.widget("ui.droppable", {widgetEventPrefix: "drop", options: {accept: "*", activeClass: !1, addClasses: !0, greedy: !1, hoverClass: !1, scope: "default", tolerance: "intersect"}, _create: function () { - var b = this.options, c = b.accept; - this.isover = 0, this.isout = 1, this.accept = a.isFunction(c) ? c : function (a) { - return a.is(c) - }, this.proportions = {width: this.element[0].offsetWidth, height: this.element[0].offsetHeight}, a.ui.ddmanager.droppables[b.scope] = a.ui.ddmanager.droppables[b.scope] || [], a.ui.ddmanager.droppables[b.scope].push(this), b.addClasses && this.element.addClass("ui-droppable") - }, destroy: function () { - var b = a.ui.ddmanager.droppables[this.options.scope]; - for (var c = 0; c < b.length; c++)b[c] == this && b.splice(c, 1); - this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"); - return this - }, _setOption: function (b, c) { - b == "accept" && (this.accept = a.isFunction(c) ? c : function (a) { - return a.is(c) - }), a.Widget.prototype._setOption.apply(this, arguments) - }, _activate: function (b) { - var c = a.ui.ddmanager.current; - this.options.activeClass && this.element.addClass(this.options.activeClass), c && this._trigger("activate", b, this.ui(c)) - }, _deactivate: function (b) { - var c = a.ui.ddmanager.current; - this.options.activeClass && this.element.removeClass(this.options.activeClass), c && this._trigger("deactivate", b, this.ui(c)) - }, _over: function (b) { - var c = a.ui.ddmanager.current; - !!c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", b, this.ui(c))) - }, _out: function (b) { - var c = a.ui.ddmanager.current; - !!c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", b, this.ui(c))) - }, _drop: function (b, c) { - var d = c || a.ui.ddmanager.current; - if (!d || (d.currentItem || d.element)[0] == this.element[0])return!1; - var e = !1; - this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function () { - var b = a.data(this, "droppable"); - if (b.options.greedy && !b.options.disabled && b.options.scope == d.options.scope && b.accept.call(b.element[0], d.currentItem || d.element) && a.ui.intersect(d, a.extend(b, {offset: b.element.offset()}), b.options.tolerance)) { - e = !0; - return!1 - } - }); - if (e)return!1; - if (this.accept.call(this.element[0], d.currentItem || d.element)) { - this.options.activeClass && this.element.removeClass(this.options.activeClass), this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("drop", b, this.ui(d)); - return this.element - } - return!1 - }, ui: function (a) { - return{draggable: a.currentItem || a.element, helper: a.helper, position: a.position, offset: a.positionAbs} - }}), a.extend(a.ui.droppable, {version: "1.8.17"}), a.ui.intersect = function (b, c, d) { - if (!c.offset)return!1; - var e = (b.positionAbs || b.position.absolute).left, f = e + b.helperProportions.width, g = (b.positionAbs || b.position.absolute).top, h = g + b.helperProportions.height, i = c.offset.left, j = i + c.proportions.width, k = c.offset.top, l = k + c.proportions.height; - switch (d) { - case"fit": - return i <= e && f <= j && k <= g && h <= l; - case"intersect": - return i < e + b.helperProportions.width / 2 && f - b.helperProportions.width / 2 < j && k < g + b.helperProportions.height / 2 && h - b.helperProportions.height / 2 < l; - case"pointer": - var m = (b.positionAbs || b.position.absolute).left + (b.clickOffset || b.offset.click).left, n = (b.positionAbs || b.position.absolute).top + (b.clickOffset || b.offset.click).top, o = a.ui.isOver(n, m, k, i, c.proportions.height, c.proportions.width); - return o; - case"touch": - return(g >= k && g <= l || h >= k && h <= l || g < k && h > l) && (e >= i && e <= j || f >= i && f <= j || e < i && f > j); - default: - return!1 - } - }, a.ui.ddmanager = {current: null, droppables: {"default": []}, prepareOffsets: function (b, c) { - var d = a.ui.ddmanager.droppables[b.options.scope] || [], e = c ? c.type : null, f = (b.currentItem || b.element).find(":data(droppable)").andSelf(); - droppablesLoop:for (var g = 0; g < d.length; g++) { - if (d[g].options.disabled || b && !d[g].accept.call(d[g].element[0], b.currentItem || b.element))continue; - for (var h = 0; h < f.length; h++)if (f[h] == d[g].element[0]) { - d[g].proportions.height = 0; - continue droppablesLoop - } - d[g].visible = d[g].element.css("display") != "none"; - if (!d[g].visible)continue; - e == "mousedown" && d[g]._activate.call(d[g], c), d[g].offset = d[g].element.offset(), d[g].proportions = {width: d[g].element[0].offsetWidth, height: d[g].element[0].offsetHeight} - } - }, drop: function (b, c) { - var d = !1; - a.each(a.ui.ddmanager.droppables[b.options.scope] || [], function () { - !this.options || (!this.options.disabled && this.visible && a.ui.intersect(b, this, this.options.tolerance) && (d = this._drop.call(this, c) || d), !this.options.disabled && this.visible && this.accept.call(this.element[0], b.currentItem || b.element) && (this.isout = 1, this.isover = 0, this._deactivate.call(this, c))) - }); - return d - }, dragStart: function (b, c) { - b.element.parents(":not(body,html)").bind("scroll.droppable", function () { - b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c) - }) - }, drag: function (b, c) { - b.options.refreshPositions && a.ui.ddmanager.prepareOffsets(b, c), a.each(a.ui.ddmanager.droppables[b.options.scope] || [], function () { - if (!(this.options.disabled || this.greedyChild || !this.visible)) { - var d = a.ui.intersect(b, this, this.options.tolerance), e = !d && this.isover == 1 ? "isout" : d && this.isover == 0 ? "isover" : null; - if (!e)return; - var f; - if (this.options.greedy) { - var g = this.element.parents(":data(droppable):eq(0)"); - g.length && (f = a.data(g[0], "droppable"), f.greedyChild = e == "isover" ? 1 : 0) - } - f && e == "isover" && (f.isover = 0, f.isout = 1, f._out.call(f, c)), this[e] = 1, this[e == "isout" ? "isover" : "isout"] = 0, this[e == "isover" ? "_over" : "_out"].call(this, c), f && e == "isout" && (f.isout = 0, f.isover = 1, f._over.call(f, c)) - } - }) - }, dragStop: function (b, c) { - b.element.parents(":not(body,html)").unbind("scroll.droppable"), b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c) - }} -})(jQuery); -/* - * jQuery UI Resizable 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function (a, b) { - a.widget("ui.resizable", a.ui.mouse, {widgetEventPrefix: "resize", options: {alsoResize: !1, animate: !1, animateDuration: "slow", animateEasing: "swing", aspectRatio: !1, autoHide: !1, containment: !1, ghost: !1, grid: !1, handles: "e,s,se", helper: !1, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 1e3}, _create: function () { - var b = this, c = this.options; - this.element.addClass("ui-resizable"), a.extend(this, {_aspectRatio: !!c.aspectRatio, aspectRatio: c.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: c.helper || c.ghost || c.animate ? c.helper || "ui-resizable-helper" : null}), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (/relative/.test(this.element.css("position")) && a.browser.opera && this.element.css({position: "relative", top: "auto", left: "auto"}), this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position: this.element.css("position"), width: this.element.outerWidth(), height: this.element.outerHeight(), top: this.element.css("top"), left: this.element.css("left")})), this.element = this.element.parent().data("resizable", this.element.data("resizable")), this.elementIsWrapper = !0, this.element.css({marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom")}), this.originalElement.css({marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({position: "static", zoom: 1, display: "block"})), this.originalElement.css({margin: this.originalElement.css("margin")}), this._proportionallyResize()), this.handles = c.handles || (a(".ui-resizable-handle", this.element).length ? {n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw"} : "e,s,se"); - if (this.handles.constructor == String) { - this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw"); - var d = this.handles.split(","); - this.handles = {}; - for (var e = 0; e < d.length; e++) { - var f = a.trim(d[e]), g = "ui-resizable-" + f, h = a('<div class="ui-resizable-handle ' + g + '"></div>'); - /sw|se|ne|nw/.test(f) && h.css({zIndex: ++c.zIndex}), "se" == f && h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[f] = ".ui-resizable-" + f, this.element.append(h) - } - } - this._renderAxis = function (b) { - b = b || this.element; - for (var c in this.handles) { - this.handles[c].constructor == String && (this.handles[c] = a(this.handles[c], this.element).show()); - if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { - var d = a(this.handles[c], this.element), e = 0; - e = /sw|ne|nw|se|n|s/.test(c) ? d.outerHeight() : d.outerWidth(); - var f = ["padding", /ne|nw|n/.test(c) ? "Top" : /se|sw|s/.test(c) ? "Bottom" : /^e$/.test(c) ? "Right" : "Left"].join(""); - b.css(f, e), this._proportionallyResize() - } - if (!a(this.handles[c]).length)continue - } - }, this._renderAxis(this.element), this._handles = a(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function () { - if (!b.resizing) { - if (this.className)var a = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); - b.axis = a && a[1] ? a[1] : "se" - } - }), c.autoHide && (this._handles.hide(), a(this.element).addClass("ui-resizable-autohide").hover(function () { - c.disabled || (a(this).removeClass("ui-resizable-autohide"), b._handles.show()) - }, function () { - c.disabled || b.resizing || (a(this).addClass("ui-resizable-autohide"), b._handles.hide()) - })), this._mouseInit() - }, destroy: function () { - this._mouseDestroy(); - var b = function (b) { - a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove() - }; - if (this.elementIsWrapper) { - b(this.element); - var c = this.element; - c.after(this.originalElement.css({position: c.css("position"), width: c.outerWidth(), height: c.outerHeight(), top: c.css("top"), left: c.css("left")})).remove() - } - this.originalElement.css("resize", this.originalResizeStyle), b(this.originalElement); - return this - }, _mouseCapture: function (b) { - var c = !1; - for (var d in this.handles)a(this.handles[d])[0] == b.target && (c = !0); - return!this.options.disabled && c - }, _mouseStart: function (b) { - var d = this.options, e = this.element.position(), f = this.element; - this.resizing = !0, this.documentScroll = {top: a(document).scrollTop(), left: a(document).scrollLeft()}, (f.is(".ui-draggable") || /absolute/.test(f.css("position"))) && f.css({position: "absolute", top: e.top, left: e.left}), a.browser.opera && /relative/.test(f.css("position")) && f.css({position: "relative", top: "auto", left: "auto"}), this._renderProxy(); - var g = c(this.helper.css("left")), h = c(this.helper.css("top")); - d.containment && (g += a(d.containment).scrollLeft() || 0, h += a(d.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {left: g, top: h}, this.size = this._helper ? {width: f.outerWidth(), height: f.outerHeight()} : {width: f.width(), height: f.height()}, this.originalSize = this._helper ? {width: f.outerWidth(), height: f.outerHeight()} : {width: f.width(), height: f.height()}, this.originalPosition = {left: g, top: h}, this.sizeDiff = {width: f.outerWidth() - f.width(), height: f.outerHeight() - f.height()}, this.originalMousePosition = {left: b.pageX, top: b.pageY}, this.aspectRatio = typeof d.aspectRatio == "number" ? d.aspectRatio : this.originalSize.width / this.originalSize.height || 1; - var i = a(".ui-resizable-" + this.axis).css("cursor"); - a("body").css("cursor", i == "auto" ? this.axis + "-resize" : i), f.addClass("ui-resizable-resizing"), this._propagate("start", b); - return!0 - }, _mouseDrag: function (b) { - var c = this.helper, d = this.options, e = {}, f = this, g = this.originalMousePosition, h = this.axis, i = b.pageX - g.left || 0, j = b.pageY - g.top || 0, k = this._change[h]; - if (!k)return!1; - var l = k.apply(this, [b, i, j]), m = a.browser.msie && a.browser.version < 7, n = this.sizeDiff; - this._updateVirtualBoundaries(b.shiftKey); - if (this._aspectRatio || b.shiftKey)l = this._updateRatio(l, b); - l = this._respectSize(l, b), this._propagate("resize", b), c.css({top: this.position.top + "px", left: this.position.left + "px", width: this.size.width + "px", height: this.size.height + "px"}), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), this._updateCache(l), this._trigger("resize", b, this.ui()); - return!1 - }, _mouseStop: function (b) { - this.resizing = !1; - var c = this.options, d = this; - if (this._helper) { - var e = this._proportionallyResizeElements, f = e.length && /textarea/i.test(e[0].nodeName), g = f && a.ui.hasScroll(e[0], "left") ? 0 : d.sizeDiff.height, h = f ? 0 : d.sizeDiff.width, i = {width: d.helper.width() - h, height: d.helper.height() - g}, j = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null, k = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null; - c.animate || this.element.css(a.extend(i, {top: k, left: j})), d.helper.height(d.size.height), d.helper.width(d.size.width), this._helper && !c.animate && this._proportionallyResize() - } - a("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", b), this._helper && this.helper.remove(); - return!1 - }, _updateVirtualBoundaries: function (a) { - var b = this.options, c, e, f, g, h; - h = {minWidth: d(b.minWidth) ? b.minWidth : 0, maxWidth: d(b.maxWidth) ? b.maxWidth : Infinity, minHeight: d(b.minHeight) ? b.minHeight : 0, maxHeight: d(b.maxHeight) ? b.maxHeight : Infinity}; - if (this._aspectRatio || a)c = h.minHeight * this.aspectRatio, f = h.minWidth / this.aspectRatio, e = h.maxHeight * this.aspectRatio, g = h.maxWidth / this.aspectRatio, c > h.minWidth && (h.minWidth = c), f > h.minHeight && (h.minHeight = f), e < h.maxWidth && (h.maxWidth = e), g < h.maxHeight && (h.maxHeight = g); - this._vBoundaries = h - }, _updateCache: function (a) { - var b = this.options; - this.offset = this.helper.offset(), d(a.left) && (this.position.left = a.left), d(a.top) && (this.position.top = a.top), d(a.height) && (this.size.height = a.height), d(a.width) && (this.size.width = a.width) - }, _updateRatio: function (a, b) { - var c = this.options, e = this.position, f = this.size, g = this.axis; - d(a.height) ? a.width = a.height * this.aspectRatio : d(a.width) && (a.height = a.width / this.aspectRatio), g == "sw" && (a.left = e.left + (f.width - a.width), a.top = null), g == "nw" && (a.top = e.top + (f.height - a.height), a.left = e.left + (f.width - a.width)); - return a - }, _respectSize: function (a, b) { - var c = this.helper, e = this._vBoundaries, f = this._aspectRatio || b.shiftKey, g = this.axis, h = d(a.width) && e.maxWidth && e.maxWidth < a.width, i = d(a.height) && e.maxHeight && e.maxHeight < a.height, j = d(a.width) && e.minWidth && e.minWidth > a.width, k = d(a.height) && e.minHeight && e.minHeight > a.height; - j && (a.width = e.minWidth), k && (a.height = e.minHeight), h && (a.width = e.maxWidth), i && (a.height = e.maxHeight); - var l = this.originalPosition.left + this.originalSize.width, m = this.position.top + this.size.height, n = /sw|nw|w/.test(g), o = /nw|ne|n/.test(g); - j && n && (a.left = l - e.minWidth), h && n && (a.left = l - e.maxWidth), k && o && (a.top = m - e.minHeight), i && o && (a.top = m - e.maxHeight); - var p = !a.width && !a.height; - p && !a.left && a.top ? a.top = null : p && !a.top && a.left && (a.left = null); - return a - }, _proportionallyResize: function () { - var b = this.options; - if (!!this._proportionallyResizeElements.length) { - var c = this.helper || this.element; - for (var d = 0; d < this._proportionallyResizeElements.length; d++) { - var e = this._proportionallyResizeElements[d]; - if (!this.borderDif) { - var f = [e.css("borderTopWidth"), e.css("borderRightWidth"), e.css("borderBottomWidth"), e.css("borderLeftWidth")], g = [e.css("paddingTop"), e.css("paddingRight"), e.css("paddingBottom"), e.css("paddingLeft")]; - this.borderDif = a.map(f, function (a, b) { - var c = parseInt(a, 10) || 0, d = parseInt(g[b], 10) || 0; - return c + d - }) - } - if (a.browser.msie && (!!a(c).is(":hidden") || !!a(c).parents(":hidden").length))continue; - e.css({height: c.height() - this.borderDif[0] - this.borderDif[2] || 0, width: c.width() - this.borderDif[1] - this.borderDif[3] || 0}) - } - } - }, _renderProxy: function () { - var b = this.element, c = this.options; - this.elementOffset = b.offset(); - if (this._helper) { - this.helper = this.helper || a('<div style="overflow:hidden;"></div>'); - var d = a.browser.msie && a.browser.version < 7, e = d ? 1 : 0, f = d ? 2 : -1; - this.helper.addClass(this._helper).css({width: this.element.outerWidth() + f, height: this.element.outerHeight() + f, position: "absolute", left: this.elementOffset.left - e + "px", top: this.elementOffset.top - e + "px", zIndex: ++c.zIndex}), this.helper.appendTo("body").disableSelection() - } else this.helper = this.element - }, _change: {e: function (a, b, c) { - return{width: this.originalSize.width + b} - }, w: function (a, b, c) { - var d = this.options, e = this.originalSize, f = this.originalPosition; - return{left: f.left + b, width: e.width - b} - }, n: function (a, b, c) { - var d = this.options, e = this.originalSize, f = this.originalPosition; - return{top: f.top + c, height: e.height - c} - }, s: function (a, b, c) { - return{height: this.originalSize.height + c} - }, se: function (b, c, d) { - return a.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [b, c, d])) - }, sw: function (b, c, d) { - return a.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [b, c, d])) - }, ne: function (b, c, d) { - return a.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [b, c, d])) - }, nw: function (b, c, d) { - return a.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [b, c, d])) - }}, _propagate: function (b, c) { - a.ui.plugin.call(this, b, [c, this.ui()]), b != "resize" && this._trigger(b, c, this.ui()) - }, plugins: {}, ui: function () { - return{originalElement: this.originalElement, element: this.element, helper: this.helper, position: this.position, size: this.size, originalSize: this.originalSize, originalPosition: this.originalPosition} - }}), a.extend(a.ui.resizable, {version: "1.8.17"}), a.ui.plugin.add("resizable", "alsoResize", {start: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = function (b) { - a(b).each(function () { - var b = a(this); - b.data("resizable-alsoresize", {width: parseInt(b.width(), 10), height: parseInt(b.height(), 10), left: parseInt(b.css("left"), 10), top: parseInt(b.css("top"), 10), position: b.css("position")}) - }) - }; - typeof e.alsoResize == "object" && !e.alsoResize.parentNode ? e.alsoResize.length ? (e.alsoResize = e.alsoResize[0], f(e.alsoResize)) : a.each(e.alsoResize, function (a) { - f(a) - }) : f(e.alsoResize) - }, resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.originalSize, g = d.originalPosition, h = {height: d.size.height - f.height || 0, width: d.size.width - f.width || 0, top: d.position.top - g.top || 0, left: d.position.left - g.left || 0}, i = function (b, e) { - a(b).each(function () { - var b = a(this), f = a(this).data("resizable-alsoresize"), g = {}, i = e && e.length ? e : b.parents(c.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; - a.each(i, function (a, b) { - var c = (f[b] || 0) + (h[b] || 0); - c && c >= 0 && (g[b] = c || null) - }), a.browser.opera && /relative/.test(b.css("position")) && (d._revertToRelativePosition = !0, b.css({position: "absolute", top: "auto", left: "auto"})), b.css(g) - }) - }; - typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? a.each(e.alsoResize, function (a, b) { - i(a, b) - }) : i(e.alsoResize) - }, stop: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = function (b) { - a(b).each(function () { - var b = a(this); - b.css({position: b.data("resizable-alsoresize").position}) - }) - }; - d._revertToRelativePosition && (d._revertToRelativePosition = !1, typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? a.each(e.alsoResize, function (a) { - f(a) - }) : f(e.alsoResize)), a(this).removeData("resizable-alsoresize") - }}), a.ui.plugin.add("resizable", "animate", {stop: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d._proportionallyResizeElements, g = f.length && /textarea/i.test(f[0].nodeName), h = g && a.ui.hasScroll(f[0], "left") ? 0 : d.sizeDiff.height, i = g ? 0 : d.sizeDiff.width, j = {width: d.size.width - i, height: d.size.height - h}, k = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null, l = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null; - d.element.animate(a.extend(j, l && k ? {top: l, left: k} : {}), {duration: e.animateDuration, easing: e.animateEasing, step: function () { - var c = {width: parseInt(d.element.css("width"), 10), height: parseInt(d.element.css("height"), 10), top: parseInt(d.element.css("top"), 10), left: parseInt(d.element.css("left"), 10)}; - f && f.length && a(f[0]).css({width: c.width, height: c.height}), d._updateCache(c), d._propagate("resize", b) - }}) - }}), a.ui.plugin.add("resizable", "containment", {start: function (b, d) { - var e = a(this).data("resizable"), f = e.options, g = e.element, h = f.containment, i = h instanceof a ? h.get(0) : /parent/.test(h) ? g.parent().get(0) : h; - if (!!i) { - e.containerElement = a(i); - if (/document/.test(h) || h == document)e.containerOffset = {left: 0, top: 0}, e.containerPosition = {left: 0, top: 0}, e.parentData = {element: a(document), left: 0, top: 0, width: a(document).width(), height: a(document).height() || document.body.parentNode.scrollHeight}; else { - var j = a(i), k = []; - a(["Top", "Right", "Left", "Bottom"]).each(function (a, b) { - k[a] = c(j.css("padding" + b)) - }), e.containerOffset = j.offset(), e.containerPosition = j.position(), e.containerSize = {height: j.innerHeight() - k[3], width: j.innerWidth() - k[1]}; - var l = e.containerOffset, m = e.containerSize.height, n = e.containerSize.width, o = a.ui.hasScroll(i, "left") ? i.scrollWidth : n, p = a.ui.hasScroll(i) ? i.scrollHeight : m; - e.parentData = {element: i, left: l.left, top: l.top, width: o, height: p} - } - } - }, resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.containerSize, g = d.containerOffset, h = d.size, i = d.position, j = d._aspectRatio || b.shiftKey, k = {top: 0, left: 0}, l = d.containerElement; - l[0] != document && /static/.test(l.css("position")) && (k = g), i.left < (d._helper ? g.left : 0) && (d.size.width = d.size.width + (d._helper ? d.position.left - g.left : d.position.left - k.left), j && (d.size.height = d.size.width / e.aspectRatio), d.position.left = e.helper ? g.left : 0), i.top < (d._helper ? g.top : 0) && (d.size.height = d.size.height + (d._helper ? d.position.top - g.top : d.position.top), j && (d.size.width = d.size.height * e.aspectRatio), d.position.top = d._helper ? g.top : 0), d.offset.left = d.parentData.left + d.position.left, d.offset.top = d.parentData.top + d.position.top; - var m = Math.abs((d._helper ? d.offset.left - k.left : d.offset.left - k.left) + d.sizeDiff.width), n = Math.abs((d._helper ? d.offset.top - k.top : d.offset.top - g.top) + d.sizeDiff.height), o = d.containerElement.get(0) == d.element.parent().get(0), p = /relative|absolute/.test(d.containerElement.css("position")); - o && p && (m -= d.parentData.left), m + d.size.width >= d.parentData.width && (d.size.width = d.parentData.width - m, j && (d.size.height = d.size.width / d.aspectRatio)), n + d.size.height >= d.parentData.height && (d.size.height = d.parentData.height - n, j && (d.size.width = d.size.height * d.aspectRatio)) - }, stop: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.position, g = d.containerOffset, h = d.containerPosition, i = d.containerElement, j = a(d.helper), k = j.offset(), l = j.outerWidth() - d.sizeDiff.width, m = j.outerHeight() - d.sizeDiff.height; - d._helper && !e.animate && /relative/.test(i.css("position")) && a(this).css({left: k.left - h.left - g.left, width: l, height: m}), d._helper && !e.animate && /static/.test(i.css("position")) && a(this).css({left: k.left - h.left - g.left, width: l, height: m}) - }}), a.ui.plugin.add("resizable", "ghost", {start: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.size; - d.ghost = d.originalElement.clone(), d.ghost.css({opacity: .25, display: "block", position: "relative", height: f.height, width: f.width, margin: 0, left: 0, top: 0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost == "string" ? e.ghost : ""), d.ghost.appendTo(d.helper) - }, resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options; - d.ghost && d.ghost.css({position: "relative", height: d.size.height, width: d.size.width}) - }, stop: function (b, c) { - var d = a(this).data("resizable"), e = d.options; - d.ghost && d.helper && d.helper.get(0).removeChild(d.ghost.get(0)) - }}), a.ui.plugin.add("resizable", "grid", {resize: function (b, c) { - var d = a(this).data("resizable"), e = d.options, f = d.size, g = d.originalSize, h = d.originalPosition, i = d.axis, j = e._aspectRatio || b.shiftKey; - e.grid = typeof e.grid == "number" ? [e.grid, e.grid] : e.grid; - var k = Math.round((f.width - g.width) / (e.grid[0] || 1)) * (e.grid[0] || 1), l = Math.round((f.height - g.height) / (e.grid[1] || 1)) * (e.grid[1] || 1); - /^(se|s|e)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l) : /^(ne)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l) : /^(sw)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.left = h.left - k) : (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l, d.position.left = h.left - k) - }}); - var c = function (a) { - return parseInt(a, 10) || 0 - }, d = function (a) { - return!isNaN(parseInt(a, 10)) - } -})(jQuery); -/* - * jQuery UI Selectable 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function (a, b) { - a.widget("ui.selectable", a.ui.mouse, {options: {appendTo: "body", autoRefresh: !0, distance: 0, filter: "*", tolerance: "touch"}, _create: function () { - var b = this; - this.element.addClass("ui-selectable"), this.dragged = !1; - var c; - this.refresh = function () { - c = a(b.options.filter, b.element[0]), c.addClass("ui-selectee"), c.each(function () { - var b = a(this), c = b.offset(); - a.data(this, "selectable-item", {element: this, $element: b, left: c.left, top: c.top, right: c.left + b.outerWidth(), bottom: c.top + b.outerHeight(), startselected: !1, selected: b.hasClass("ui-selected"), selecting: b.hasClass("ui-selecting"), unselecting: b.hasClass("ui-unselecting")}) - }) - }, this.refresh(), this.selectees = c.addClass("ui-selectee"), this._mouseInit(), this.helper = a("<div class='ui-selectable-helper'></div>") - }, destroy: function () { - this.selectees.removeClass("ui-selectee").removeData("selectable-item"), this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"), this._mouseDestroy(); - return this - }, _mouseStart: function (b) { - var c = this; - this.opos = [b.pageX, b.pageY]; - if (!this.options.disabled) { - var d = this.options; - this.selectees = a(d.filter, this.element[0]), this._trigger("start", b), a(d.appendTo).append(this.helper), this.helper.css({left: b.clientX, top: b.clientY, width: 0, height: 0}), d.autoRefresh && this.refresh(), this.selectees.filter(".ui-selected").each(function () { - var d = a.data(this, "selectable-item"); - d.startselected = !0, !b.metaKey && !b.ctrlKey && (d.$element.removeClass("ui-selected"), d.selected = !1, d.$element.addClass("ui-unselecting"), d.unselecting = !0, c._trigger("unselecting", b, {unselecting: d.element})) - }), a(b.target).parents().andSelf().each(function () { - var d = a.data(this, "selectable-item"); - if (d) { - var e = !b.metaKey && !b.ctrlKey || !d.$element.hasClass("ui-selected"); - d.$element.removeClass(e ? "ui-unselecting" : "ui-selected").addClass(e ? "ui-selecting" : "ui-unselecting"), d.unselecting = !e, d.selecting = e, d.selected = e, e ? c._trigger("selecting", b, {selecting: d.element}) : c._trigger("unselecting", b, {unselecting: d.element}); - return!1 - } - }) - } - }, _mouseDrag: function (b) { - var c = this; - this.dragged = !0; - if (!this.options.disabled) { - var d = this.options, e = this.opos[0], f = this.opos[1], g = b.pageX, h = b.pageY; - if (e > g) { - var i = g; - g = e, e = i - } - if (f > h) { - var i = h; - h = f, f = i - } - this.helper.css({left: e, top: f, width: g - e, height: h - f}), this.selectees.each(function () { - var i = a.data(this, "selectable-item"); - if (!!i && i.element != c.element[0]) { - var j = !1; - d.tolerance == "touch" ? j = !(i.left > g || i.right < e || i.top > h || i.bottom < f) : d.tolerance == "fit" && (j = i.left > e && i.right < g && i.top > f && i.bottom < h), j ? (i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, c._trigger("selecting", b, {selecting: i.element}))) : (i.selecting && ((b.metaKey || b.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), c._trigger("unselecting", b, {unselecting: i.element}))), i.selected && !b.metaKey && !b.ctrlKey && !i.startselected && (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, c._trigger("unselecting", b, {unselecting: i.element}))) - } - }); - return!1 - } - }, _mouseStop: function (b) { - var c = this; - this.dragged = !1; - var d = this.options; - a(".ui-unselecting", this.element[0]).each(function () { - var d = a.data(this, "selectable-item"); - d.$element.removeClass("ui-unselecting"), d.unselecting = !1, d.startselected = !1, c._trigger("unselected", b, {unselected: d.element}) - }), a(".ui-selecting", this.element[0]).each(function () { - var d = a.data(this, "selectable-item"); - d.$element.removeClass("ui-selecting").addClass("ui-selected"), d.selecting = !1, d.selected = !0, d.startselected = !0, c._trigger("selected", b, {selected: d.element}) - }), this._trigger("stop", b), this.helper.remove(); - return!1 - }}), a.extend(a.ui.selectable, {version: "1.8.17"}) -})(jQuery); -/* - * jQuery UI Sortable 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Sortables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function (a, b) { - a.widget("ui.sortable", a.ui.mouse, {widgetEventPrefix: "sort", options: {appendTo: "parent", axis: !1, connectWith: !1, containment: !1, cursor: "auto", cursorAt: !1, dropOnEmpty: !0, forcePlaceholderSize: !1, forceHelperSize: !1, grid: !1, handle: !1, helper: "original", items: "> *", opacity: !1, placeholder: !1, revert: !1, scroll: !0, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1e3}, _create: function () { - var a = this.options; - this.containerCache = {}, this.element.addClass("ui-sortable"), this.refresh(), this.floating = this.items.length ? a.axis === "x" || /left|right/.test(this.items[0].item.css("float")) || /inline|table-cell/.test(this.items[0].item.css("display")) : !1, this.offset = this.element.offset(), this._mouseInit() - }, destroy: function () { - this.element.removeClass("ui-sortable ui-sortable-disabled"), this._mouseDestroy(); - for (var a = this.items.length - 1; a >= 0; a--)this.items[a].item.removeData(this.widgetName + "-item"); - return this - }, _setOption: function (b, c) { - b === "disabled" ? (this.options[b] = c, this.widget()[c ? "addClass" : "removeClass"]("ui-sortable-disabled")) : a.Widget.prototype._setOption.apply(this, arguments) - }, _mouseCapture: function (b, c) { - var d = this; - if (this.reverting)return!1; - if (this.options.disabled || this.options.type == "static")return!1; - this._refreshItems(b); - var e = null, f = this, g = a(b.target).parents().each(function () { - if (a.data(this, d.widgetName + "-item") == f) { - e = a(this); - return!1 - } - }); - a.data(b.target, d.widgetName + "-item") == f && (e = a(b.target)); - if (!e)return!1; - if (this.options.handle && !c) { - var h = !1; - a(this.options.handle, e).find("*").andSelf().each(function () { - this == b.target && (h = !0) - }); - if (!h)return!1 - } - this.currentItem = e, this._removeCurrentsFromItems(); - return!0 - }, _mouseStart: function (b, c, d) { - var e = this.options, f = this; - this.currentContainer = this, this.refreshPositions(), this.helper = this._createHelper(b), this._cacheHelperProportions(), this._cacheMargins(), this.scrollParent = this.helper.scrollParent(), this.offset = this.currentItem.offset(), this.offset = {top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left}, this.helper.css("position", "absolute"), this.cssPosition = this.helper.css("position"), a.extend(this.offset, {click: {left: b.pageX - this.offset.left, top: b.pageY - this.offset.top}, parent: this._getParentOffset(), relative: this._getRelativeOffset()}), this.originalPosition = this._generatePosition(b), this.originalPageX = b.pageX, this.originalPageY = b.pageY, e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt), this.domPosition = {prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0]}, this.helper[0] != this.currentItem[0] && this.currentItem.hide(), this._createPlaceholder(), e.containment && this._setContainment(), e.cursor && (a("body").css("cursor") && (this._storedCursor = a("body").css("cursor")), a("body").css("cursor", e.cursor)), e.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", e.opacity)), e.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", e.zIndex)), this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" && (this.overflowOffset = this.scrollParent.offset()), this._trigger("start", b, this._uiHash()), this._preserveHelperProportions || this._cacheHelperProportions(); - if (!d)for (var g = this.containers.length - 1; g >= 0; g--)this.containers[g]._trigger("activate", b, f._uiHash(this)); - a.ui.ddmanager && (a.ui.ddmanager.current = this), a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this.dragging = !0, this.helper.addClass("ui-sortable-helper"), this._mouseDrag(b); - return!0 - }, _mouseDrag: function (b) { - this.position = this._generatePosition(b), this.positionAbs = this._convertPositionTo("absolute"), this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs); - if (this.options.scroll) { - var c = this.options, d = !1; - this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - b.pageY < c.scrollSensitivity ? this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop + c.scrollSpeed : b.pageY - this.overflowOffset.top < c.scrollSensitivity && (this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop - c.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - b.pageX < c.scrollSensitivity ? this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft + c.scrollSpeed : b.pageX - this.overflowOffset.left < c.scrollSensitivity && (this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft - c.scrollSpeed)) : (b.pageY - a(document).scrollTop() < c.scrollSensitivity ? d = a(document).scrollTop(a(document).scrollTop() - c.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < c.scrollSensitivity && (d = a(document).scrollTop(a(document).scrollTop() + c.scrollSpeed)), b.pageX - a(document).scrollLeft() < c.scrollSensitivity ? d = a(document).scrollLeft(a(document).scrollLeft() - c.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < c.scrollSensitivity && (d = a(document).scrollLeft(a(document).scrollLeft() + c.scrollSpeed))), d !== !1 && a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b) - } - this.positionAbs = this._convertPositionTo("absolute"); - if (!this.options.axis || this.options.axis != "y")this.helper[0].style.left = this.position.left + "px"; - if (!this.options.axis || this.options.axis != "x")this.helper[0].style.top = this.position.top + "px"; - for (var e = this.items.length - 1; e >= 0; e--) { - var f = this.items[e], g = f.item[0], h = this._intersectsWithPointer(f); - if (!h)continue; - if (g != this.currentItem[0] && this.placeholder[h == 1 ? "next" : "prev"]()[0] != g && !a.ui.contains(this.placeholder[0], g) && (this.options.type == "semi-dynamic" ? !a.ui.contains(this.element[0], g) : !0)) { - this.direction = h == 1 ? "down" : "up"; - if (this.options.tolerance == "pointer" || this._intersectsWithSides(f))this._rearrange(b, f); else break; - this._trigger("change", b, this._uiHash()); - break - } - } - this._contactContainers(b), a.ui.ddmanager && a.ui.ddmanager.drag(this, b), this._trigger("sort", b, this._uiHash()), this.lastPositionAbs = this.positionAbs; - return!1 - }, _mouseStop: function (b, c) { - if (!!b) { - a.ui.ddmanager && !this.options.dropBehaviour && a.ui.ddmanager.drop(this, b); - if (this.options.revert) { - var d = this, e = d.placeholder.offset(); - d.reverting = !0, a(this.helper).animate({left: e.left - this.offset.parent.left - d.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), top: e.top - this.offset.parent.top - d.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)}, parseInt(this.options.revert, 10) || 500, function () { - d._clear(b) - }) - } else this._clear(b, c); - return!1 - } - }, cancel: function () { - var b = this; - if (this.dragging) { - this._mouseUp({target: null}), this.options.helper == "original" ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show(); - for (var c = this.containers.length - 1; c >= 0; c--)this.containers[c]._trigger("deactivate", null, b._uiHash(this)), this.containers[c].containerCache.over && (this.containers[c]._trigger("out", null, b._uiHash(this)), this.containers[c].containerCache.over = 0) - } - this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.options.helper != "original" && this.helper && this.helper[0].parentNode && this.helper.remove(), a.extend(this, {helper: null, dragging: !1, reverting: !1, _noFinalSort: null}), this.domPosition.prev ? a(this.domPosition.prev).after(this.currentItem) : a(this.domPosition.parent).prepend(this.currentItem)); - return this - }, serialize: function (b) { - var c = this._getItemsAsjQuery(b && b.connected), d = []; - b = b || {}, a(c).each(function () { - var c = (a(b.item || this).attr(b.attribute || "id") || "").match(b.expression || /(.+)[-=_](.+)/); - c && d.push((b.key || c[1] + "[]") + "=" + (b.key && b.expression ? c[1] : c[2])) - }), !d.length && b.key && d.push(b.key + "="); - return d.join("&") - }, toArray: function (b) { - var c = this._getItemsAsjQuery(b && b.connected), d = []; - b = b || {}, c.each(function () { - d.push(a(b.item || this).attr(b.attribute || "id") || "") - }); - return d - }, _intersectsWith: function (a) { - var b = this.positionAbs.left, c = b + this.helperProportions.width, d = this.positionAbs.top, e = d + this.helperProportions.height, f = a.left, g = f + a.width, h = a.top, i = h + a.height, j = this.offset.click.top, k = this.offset.click.left, l = d + j > h && d + j < i && b + k > f && b + k < g; - return this.options.tolerance == "pointer" || this.options.forcePointerForContainers || this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > a[this.floating ? "width" : "height"] ? l : f < b + this.helperProportions.width / 2 && c - this.helperProportions.width / 2 < g && h < d + this.helperProportions.height / 2 && e - this.helperProportions.height / 2 < i - }, _intersectsWithPointer: function (b) { - var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top, b.height), d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left, b.width), e = c && d, f = this._getDragVerticalDirection(), g = this._getDragHorizontalDirection(); - if (!e)return!1; - return this.floating ? g && g == "right" || f == "down" ? 2 : 1 : f && (f == "down" ? 2 : 1) - }, _intersectsWithSides: function (b) { - var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top + b.height / 2, b.height), d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left + b.width / 2, b.width), e = this._getDragVerticalDirection(), f = this._getDragHorizontalDirection(); - return this.floating && f ? f == "right" && d || f == "left" && !d : e && (e == "down" && c || e == "up" && !c) - }, _getDragVerticalDirection: function () { - var a = this.positionAbs.top - this.lastPositionAbs.top; - return a != 0 && (a > 0 ? "down" : "up") - }, _getDragHorizontalDirection: function () { - var a = this.positionAbs.left - this.lastPositionAbs.left; - return a != 0 && (a > 0 ? "right" : "left") - }, refresh: function (a) { - this._refreshItems(a), this.refreshPositions(); - return this - }, _connectWith: function () { - var a = this.options; - return a.connectWith.constructor == String ? [a.connectWith] : a.connectWith - }, _getItemsAsjQuery: function (b) { - var c = this, d = [], e = [], f = this._connectWith(); - if (f && b)for (var g = f.length - 1; g >= 0; g--) { - var h = a(f[g]); - for (var i = h.length - 1; i >= 0; i--) { - var j = a.data(h[i], this.widgetName); - j && j != this && !j.options.disabled && e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element) : a(j.options.items, j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), j]) - } - } - e.push([a.isFunction(this.options.items) ? this.options.items.call(this.element, null, {options: this.options, item: this.currentItem}) : a(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - for (var g = e.length - 1; g >= 0; g--)e[g][0].each(function () { - d.push(this) - }); - return a(d) - }, _removeCurrentsFromItems: function () { - var a = this.currentItem.find(":data(" + this.widgetName + "-item)"); - for (var b = 0; b < this.items.length; b++)for (var c = 0; c < a.length; c++)a[c] == this.items[b].item[0] && this.items.splice(b, 1) - }, _refreshItems: function (b) { - this.items = [], this.containers = [this]; - var c = this.items, d = this, e = [ - [a.isFunction(this.options.items) ? this.options.items.call(this.element[0], b, {item: this.currentItem}) : a(this.options.items, this.element), this] - ], f = this._connectWith(); - if (f)for (var g = f.length - 1; g >= 0; g--) { - var h = a(f[g]); - for (var i = h.length - 1; i >= 0; i--) { - var j = a.data(h[i], this.widgetName); - j && j != this && !j.options.disabled && (e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element[0], b, {item: this.currentItem}) : a(j.options.items, j.element), j]), this.containers.push(j)) - } - } - for (var g = e.length - 1; g >= 0; g--) { - var k = e[g][1], l = e[g][0]; - for (var i = 0, m = l.length; i < m; i++) { - var n = a(l[i]); - n.data(this.widgetName + "-item", k), c.push({item: n, instance: k, width: 0, height: 0, left: 0, top: 0}) - } - } - }, refreshPositions: function (b) { - this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); - for (var c = this.items.length - 1; c >= 0; c--) { - var d = this.items[c]; - if (d.instance != this.currentContainer && this.currentContainer && d.item[0] != this.currentItem[0])continue; - var e = this.options.toleranceElement ? a(this.options.toleranceElement, d.item) : d.item; - b || (d.width = e.outerWidth(), d.height = e.outerHeight()); - var f = e.offset(); - d.left = f.left, d.top = f.top - } - if (this.options.custom && this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this); else for (var c = this.containers.length - 1; c >= 0; c--) { - var f = this.containers[c].element.offset(); - this.containers[c].containerCache.left = f.left, this.containers[c].containerCache.top = f.top, this.containers[c].containerCache.width = this.containers[c].element.outerWidth(), this.containers[c].containerCache.height = this.containers[c].element.outerHeight() - } - return this - }, _createPlaceholder: function (b) { - var c = b || this, d = c.options; - if (!d.placeholder || d.placeholder.constructor == String) { - var e = d.placeholder; - d.placeholder = {element: function () { - var b = a(document.createElement(c.currentItem[0].nodeName)).addClass(e || c.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; - e || (b.style.visibility = "hidden"); - return b - }, update: function (a, b) { - if (!e || !!d.forcePlaceholderSize)b.height() || b.height(c.currentItem.innerHeight() - parseInt(c.currentItem.css("paddingTop") || 0, 10) - parseInt(c.currentItem.css("paddingBottom") || 0, 10)), b.width() || b.width(c.currentItem.innerWidth() - parseInt(c.currentItem.css("paddingLeft") || 0, 10) - parseInt(c.currentItem.css("paddingRight") || 0, 10)) - }} - } - c.placeholder = a(d.placeholder.element.call(c.element, c.currentItem)), c.currentItem.after(c.placeholder), d.placeholder.update(c, c.placeholder) - }, _contactContainers: function (b) { - var c = null, d = null; - for (var e = this.containers.length - 1; e >= 0; e--) { - if (a.ui.contains(this.currentItem[0], this.containers[e].element[0]))continue; - if (this._intersectsWith(this.containers[e].containerCache)) { - if (c && a.ui.contains(this.containers[e].element[0], c.element[0]))continue; - c = this.containers[e], d = e - } else this.containers[e].containerCache.over && (this.containers[e]._trigger("out", b, this._uiHash(this)), this.containers[e].containerCache.over = 0) - } - if (!!c)if (this.containers.length === 1)this.containers[d]._trigger("over", b, this._uiHash(this)), this.containers[d].containerCache.over = 1; else if (this.currentContainer != this.containers[d]) { - var f = 1e4, g = null, h = this.positionAbs[this.containers[d].floating ? "left" : "top"]; - for (var i = this.items.length - 1; i >= 0; i--) { - if (!a.ui.contains(this.containers[d].element[0], this.items[i].item[0]))continue; - var j = this.items[i][this.containers[d].floating ? "left" : "top"]; - Math.abs(j - h) < f && (f = Math.abs(j - h), g = this.items[i]) - } - if (!g && !this.options.dropOnEmpty)return; - this.currentContainer = this.containers[d], g ? this._rearrange(b, g, null, !0) : this._rearrange(b, null, this.containers[d].element, !0), this._trigger("change", b, this._uiHash()), this.containers[d]._trigger("change", b, this._uiHash(this)), this.options.placeholder.update(this.currentContainer, this.placeholder), this.containers[d]._trigger("over", b, this._uiHash(this)), this.containers[d].containerCache.over = 1 - } - }, _createHelper: function (b) { - var c = this.options, d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b, this.currentItem])) : c.helper == "clone" ? this.currentItem.clone() : this.currentItem; - d.parents("body").length || a(c.appendTo != "parent" ? c.appendTo : this.currentItem[0].parentNode)[0].appendChild(d[0]), d[0] == this.currentItem[0] && (this._storedCSS = {width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left")}), (d[0].style.width == "" || c.forceHelperSize) && d.width(this.currentItem.width()), (d[0].style.height == "" || c.forceHelperSize) && d.height(this.currentItem.height()); - return d - }, _adjustOffsetFromHelper: function (b) { - typeof b == "string" && (b = b.split(" ")), a.isArray(b) && (b = {left: +b[0], top: +b[1] || 0}), "left"in b && (this.offset.click.left = b.left + this.margins.left), "right"in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), "top"in b && (this.offset.click.top = b.top + this.margins.top), "bottom"in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top) - }, _getParentOffset: function () { - this.offsetParent = this.helper.offsetParent(); - var b = this.offsetParent.offset(); - this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()); - if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie)b = {top: 0, left: 0}; - return{top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} - }, _getRelativeOffset: function () { - if (this.cssPosition == "relative") { - var a = this.currentItem.position(); - return{top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} - } - return{top: 0, left: 0} - }, _cacheMargins: function () { - this.margins = {left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, top: parseInt(this.currentItem.css("marginTop"), 10) || 0} - }, _cacheHelperProportions: function () { - this.helperProportions = {width: this.helper.outerWidth(), height: this.helper.outerHeight()} - }, _setContainment: function () { - var b = this.options; - b.containment == "parent" && (b.containment = this.helper[0].parentNode); - if (b.containment == "document" || b.containment == "window")this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, a(b.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (a(b.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; - if (!/^(document|window|parent)$/.test(b.containment)) { - var c = a(b.containment)[0], d = a(b.containment).offset(), e = a(c).css("overflow") != "hidden"; - this.containment = [d.left + (parseInt(a(c).css("borderLeftWidth"), 10) || 0) + (parseInt(a(c).css("paddingLeft"), 10) || 0) - this.margins.left, d.top + (parseInt(a(c).css("borderTopWidth"), 10) || 0) + (parseInt(a(c).css("paddingTop"), 10) || 0) - this.margins.top, d.left + (e ? Math.max(c.scrollWidth, c.offsetWidth) : c.offsetWidth) - (parseInt(a(c).css("borderLeftWidth"), 10) || 0) - (parseInt(a(c).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, d.top + (e ? Math.max(c.scrollHeight, c.offsetHeight) : c.offsetHeight) - (parseInt(a(c).css("borderTopWidth"), 10) || 0) - (parseInt(a(c).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] - } - }, _convertPositionTo: function (b, c) { - c || (c = this.position); - var d = b == "absolute" ? 1 : -1, e = this.options, f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, g = /(html|body)/i.test(f[0].tagName); - return{top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d), left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d)} - }, _generatePosition: function (b) { - var c = this.options, d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, e = /(html|body)/i.test(d[0].tagName); - this.cssPosition == "relative" && (this.scrollParent[0] == document || this.scrollParent[0] == this.offsetParent[0]) && (this.offset.relative = this._getRelativeOffset()); - var f = b.pageX, g = b.pageY; - if (this.originalPosition) { - this.containment && (b.pageX - this.offset.click.left < this.containment[0] && (f = this.containment[0] + this.offset.click.left), b.pageY - this.offset.click.top < this.containment[1] && (g = this.containment[1] + this.offset.click.top), b.pageX - this.offset.click.left > this.containment[2] && (f = this.containment[2] + this.offset.click.left), b.pageY - this.offset.click.top > this.containment[3] && (g = this.containment[3] + this.offset.click.top)); - if (c.grid) { - var h = this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1]; - g = this.containment ? h - this.offset.click.top < this.containment[1] || h - this.offset.click.top > this.containment[3] ? h - this.offset.click.top < this.containment[1] ? h + c.grid[1] : h - c.grid[1] : h : h; - var i = this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0]; - f = this.containment ? i - this.offset.click.left < this.containment[0] || i - this.offset.click.left > this.containment[2] ? i - this.offset.click.left < this.containment[0] ? i + c.grid[0] : i - c.grid[0] : i : i - } - } - return{top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()), left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft())} - }, _rearrange: function (a, b, c, d) { - c ? c[0].appendChild(this.placeholder[0]) : b.item[0].parentNode.insertBefore(this.placeholder[0], this.direction == "down" ? b.item[0] : b.item[0].nextSibling), this.counter = this.counter ? ++this.counter : 1; - var e = this, f = this.counter; - window.setTimeout(function () { - f == e.counter && e.refreshPositions(!d) - }, 0) - }, _clear: function (b, c) { - this.reverting = !1; - var d = [], e = this; - !this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), this._noFinalSort = null; - if (this.helper[0] == this.currentItem[0]) { - for (var f in this._storedCSS)if (this._storedCSS[f] == "auto" || this._storedCSS[f] == "static")this._storedCSS[f] = ""; - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") - } else this.currentItem.show(); - this.fromOutside && !c && d.push(function (a) { - this._trigger("receive", a, this._uiHash(this.fromOutside)) - }), (this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !c && d.push(function (a) { - this._trigger("update", a, this._uiHash()) - }); - if (!a.ui.contains(this.element[0], this.currentItem[0])) { - c || d.push(function (a) { - this._trigger("remove", a, this._uiHash()) - }); - for (var f = this.containers.length - 1; f >= 0; f--)a.ui.contains(this.containers[f].element[0], this.currentItem[0]) && !c && (d.push(function (a) { - return function (b) { - a._trigger("receive", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), d.push(function (a) { - return function (b) { - a._trigger("update", b, this._uiHash(this)) - } - }.call(this, this.containers[f]))) - } - for (var f = this.containers.length - 1; f >= 0; f--)c || d.push(function (a) { - return function (b) { - a._trigger("deactivate", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), this.containers[f].containerCache.over && (d.push(function (a) { - return function (b) { - a._trigger("out", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), this.containers[f].containerCache.over = 0); - this._storedCursor && a("body").css("cursor", this._storedCursor), this._storedOpacity && this.helper.css("opacity", this._storedOpacity), this._storedZIndex && this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex), this.dragging = !1; - if (this.cancelHelperRemoval) { - if (!c) { - this._trigger("beforeStop", b, this._uiHash()); - for (var f = 0; f < d.length; f++)d[f].call(this, b); - this._trigger("stop", b, this._uiHash()) - } - return!1 - } - c || this._trigger("beforeStop", b, this._uiHash()), this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.helper[0] != this.currentItem[0] && this.helper.remove(), this.helper = null; - if (!c) { - for (var f = 0; f < d.length; f++)d[f].call(this, b); - this._trigger("stop", b, this._uiHash()) - } - this.fromOutside = !1; - return!0 - }, _trigger: function () { - a.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() - }, _uiHash: function (b) { - var c = b || this; - return{helper: c.helper, placeholder: c.placeholder || a([]), position: c.position, originalPosition: c.originalPosition, offset: c.positionAbs, item: c.currentItem, sender: b ? b.element : null} - }}), a.extend(a.ui.sortable, {version: "1.8.17"}) -})(jQuery); -/* - * jQuery UI Autocomplete 1.8.17 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Autocomplete - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.position.js - */ -(function (a, b) { - var c = 0; - a.widget("ui.autocomplete", {options: {appendTo: "body", autoFocus: !1, delay: 300, minLength: 1, position: {my: "left top", at: "left bottom", collision: "none"}, source: null}, pending: 0, _create: function () { - var b = this, c = this.element[0].ownerDocument, d; - this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off").attr({role: "textbox", "aria-autocomplete": "list", "aria-haspopup": "true"}).bind("keydown.autocomplete",function (c) { - if (!b.options.disabled && !b.element.propAttr("readOnly")) { - d = !1; - var e = a.ui.keyCode; - switch (c.keyCode) { - case e.PAGE_UP: - b._move("previousPage", c); - break; - case e.PAGE_DOWN: - b._move("nextPage", c); - break; - case e.UP: - b._move("previous", c), c.preventDefault(); - break; - case e.DOWN: - b._move("next", c), c.preventDefault(); - break; - case e.ENTER: - case e.NUMPAD_ENTER: - b.menu.active && (d = !0, c.preventDefault()); - case e.TAB: - if (!b.menu.active)return; - b.menu.select(c); - break; - case e.ESCAPE: - b.element.val(b.term), b.close(c); - break; - default: - clearTimeout(b.searching), b.searching = setTimeout(function () { - b.term != b.element.val() && (b.selectedItem = null, b.search(null, c)) - }, b.options.delay) - } - } - }).bind("keypress.autocomplete",function (a) { - d && (d = !1, a.preventDefault()) - }).bind("focus.autocomplete",function () { - b.options.disabled || (b.selectedItem = null, b.previous = b.element.val()) - }).bind("blur.autocomplete", function (a) { - b.options.disabled || (clearTimeout(b.searching), b.closing = setTimeout(function () { - b.close(a), b._change(a) - }, 150)) - }), this._initSource(), this.response = function () { - return b._response.apply(b, arguments) - }, this.menu = a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo || "body", c)[0]).mousedown(function (c) { - var d = b.menu.element[0]; - a(c.target).closest(".ui-menu-item").length || setTimeout(function () { - a(document).one("mousedown", function (c) { - c.target !== b.element[0] && c.target !== d && !a.ui.contains(d, c.target) && b.close() - }) - }, 1), setTimeout(function () { - clearTimeout(b.closing) - }, 13) - }).menu({focus: function (a, c) { - var d = c.item.data("item.autocomplete"); - !1 !== b._trigger("focus", a, {item: d}) && /^key/.test(a.originalEvent.type) && b.element.val(d.value) - }, selected: function (a, d) { - var e = d.item.data("item.autocomplete"), f = b.previous; - b.element[0] !== c.activeElement && (b.element.focus(), b.previous = f, setTimeout(function () { - b.previous = f, b.selectedItem = e - }, 1)), !1 !== b._trigger("select", a, {item: e}) && b.element.val(e.value), b.term = b.element.val(), b.close(a), b.selectedItem = e - }, blur: function (a, c) { - b.menu.element.is(":visible") && b.element.val() !== b.term && b.element.val(b.term) - }}).zIndex(this.element.zIndex() + 1).css({top: 0, left: 0}).hide().data("menu"), a.fn.bgiframe && this.menu.element.bgiframe(), b.beforeunloadHandler = function () { - b.element.removeAttr("autocomplete") - }, a(window).bind("beforeunload", b.beforeunloadHandler) - }, destroy: function () { - this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"), this.menu.element.remove(), a(window).unbind("beforeunload", this.beforeunloadHandler), a.Widget.prototype.destroy.call(this) - }, _setOption: function (b, c) { - a.Widget.prototype._setOption.apply(this, arguments), b === "source" && this._initSource(), b === "appendTo" && this.menu.element.appendTo(a(c || "body", this.element[0].ownerDocument)[0]), b === "disabled" && c && this.xhr && this.xhr.abort() - }, _initSource: function () { - var b = this, d, e; - a.isArray(this.options.source) ? (d = this.options.source, this.source = function (b, c) { - c(a.ui.autocomplete.filter(d, b.term)) - }) : typeof this.options.source == "string" ? (e = this.options.source, this.source = function (d, f) { - b.xhr && b.xhr.abort(), b.xhr = a.ajax({url: e, data: d, dataType: "json", autocompleteRequest: ++c, success: function (a, b) { - this.autocompleteRequest === c && f(a) - }, error: function () { - this.autocompleteRequest === c && f([]) - }}) - }) : this.source = this.options.source - }, search: function (a, b) { - a = a != null ? a : this.element.val(), this.term = this.element.val(); - if (a.length < this.options.minLength)return this.close(b); - clearTimeout(this.closing); - if (this._trigger("search", b) !== !1)return this._search(a) - }, _search: function (a) { - this.pending++, this.element.addClass("ui-autocomplete-loading"), this.source({term: a}, this.response) - }, _response: function (a) { - !this.options.disabled && a && a.length ? (a = this._normalize(a), this._suggest(a), this._trigger("open")) : this.close(), this.pending--, this.pending || this.element.removeClass("ui-autocomplete-loading") - }, close: function (a) { - clearTimeout(this.closing), this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.deactivate(), this._trigger("close", a)) - }, _change: function (a) { - this.previous !== this.element.val() && this._trigger("change", a, {item: this.selectedItem}) - }, _normalize: function (b) { - if (b.length && b[0].label && b[0].value)return b; - return a.map(b, function (b) { - if (typeof b == "string")return{label: b, value: b}; - return a.extend({label: b.label || b.value, value: b.value || b.label}, b) - }) - }, _suggest: function (b) { - var c = this.menu.element.empty().zIndex(this.element.zIndex() + 1); - this._renderMenu(c, b), this.menu.deactivate(), this.menu.refresh(), c.show(), this._resizeMenu(), c.position(a.extend({of: this.element}, this.options.position)), this.options.autoFocus && this.menu.next(new a.Event("mouseover")) - }, _resizeMenu: function () { - var a = this.menu.element; - a.outerWidth(Math.max(a.width("").outerWidth() + 1, this.element.outerWidth())) - }, _renderMenu: function (b, c) { - var d = this; - a.each(c, function (a, c) { - d._renderItem(b, c) - }) - }, _renderItem: function (b, c) { - return a("<li></li>").data("item.autocomplete", c).append(a("<a></a>").text(c.label)).appendTo(b) - }, _move: function (a, b) { - if (!this.menu.element.is(":visible"))this.search(null, b); else { - if (this.menu.first() && /^previous/.test(a) || this.menu.last() && /^next/.test(a)) { - this.element.val(this.term), this.menu.deactivate(); - return - } - this.menu[a](b) - } - }, widget: function () { - return this.menu.element - }}), a.extend(a.ui.autocomplete, {escapeRegex: function (a) { - return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") - }, filter: function (b, c) { - var d = new RegExp(a.ui.autocomplete.escapeRegex(c), "i"); - return a.grep(b, function (a) { - return d.test(a.label || a.value || a) - }) - }}) -})(jQuery), function (a) { - a.widget("ui.menu", {_create: function () { - var b = this; - this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role: "listbox", "aria-activedescendant": "ui-active-menuitem"}).click(function (c) { - !a(c.target).closest(".ui-menu-item a").length || (c.preventDefault(), b.select(c)) - }), this.refresh() - }, refresh: function () { - var b = this, c = this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "menuitem"); - c.children("a").addClass("ui-corner-all").attr("tabindex", -1).mouseenter(function (c) { - b.activate(c, a(this).parent()) - }).mouseleave(function () { - b.deactivate() - }) - }, activate: function (a, b) { - this.deactivate(); - if (this.hasScroll()) { - var c = b.offset().top - this.element.offset().top, d = this.element.scrollTop(), e = this.element.height(); - c < 0 ? this.element.scrollTop(d + c) : c >= e && this.element.scrollTop(d + c - e + b.height()) - } - this.active = b.eq(0).children("a").addClass("ui-state-hover").attr("id", "ui-active-menuitem").end(), this._trigger("focus", a, {item: b}) - }, deactivate: function () { - !this.active || (this.active.children("a").removeClass("ui-state-hover").removeAttr("id"), this._trigger("blur"), this.active = null) - }, next: function (a) { - this.move("next", ".ui-menu-item:first", a) - }, previous: function (a) { - this.move("prev", ".ui-menu-item:last", a) - }, first: function () { - return this.active && !this.active.prevAll(".ui-menu-item").length - }, last: function () { - return this.active && !this.active.nextAll(".ui-menu-item").length - }, move: function (a, b, c) { - if (!this.active)this.activate(c, this.element.children(b)); else { - var d = this.active[a + "All"](".ui-menu-item").eq(0); - d.length ? this.activate(c, d) : this.activate(c, this.element.children(b)) - } - }, nextPage: function (b) { - if (this.hasScroll()) { - if (!this.active || this.last()) { - this.activate(b, this.element.children(".ui-menu-item:first")); - return - } - var c = this.active.offset().top, d = this.element.height(), e = this.element.children(".ui-menu-item").filter(function () { - var b = a(this).offset().top - c - d + a(this).height(); - return b < 10 && b > -10 - }); - e.length || (e = this.element.children(".ui-menu-item:last")), this.activate(b, e) - } else this.activate(b, this.element.children(".ui-menu-item").filter(!this.active || this.last() ? ":first" : ":last")) - }, previousPage: function (b) { - if (this.hasScroll()) { - if (!this.active || this.first()) { - this.activate(b, this.element.children(".ui-menu-item:last")); - return - } - var c = this.active.offset().top, d = this.element.height(); - result = this.element.children(".ui-menu-item").filter(function () { - var b = a(this).offset().top - c + d - a(this).height(); - return b < 10 && b > -10 - }), result.length || (result = this.element.children(".ui-menu-item:first")), this.activate(b, result) - } else this.activate(b, this.element.children(".ui-menu-item").filter(!this.active || this.first() ? ":last" : ":first")) - }, hasScroll: function () { - return this.element.height() < this.element[a.fn.prop ? "prop" : "attr"]("scrollHeight") - }, select: function (a) { - this._trigger("selected", a, {item: this.active}) - }}) -}(jQuery); \ No newline at end of file diff --git a/app/assets/javascripts/jquery.coderwall.js b/app/assets/javascripts/jquery.coderwall.js deleted file mode 100644 index 60df594c..00000000 --- a/app/assets/javascripts/jquery.coderwall.js +++ /dev/null @@ -1,53 +0,0 @@ -(function ($) { - var CODERWALL_API_URL = "http://coderwall.com/:username.json?source=jqcw&callback=?", - CODERWALL_USER_URL = "http://coderwall.com/:username"; - - var DEFAULTS = { - username: null, - width: 65, - opacity: 0.8, - orientation: "vertical" - }; - - var LOGO_HTML = "" + - "<div class='coderwall-logo'>" + - " <a href='http://coderwall.com'>" + - " <img src='http://coderwall.com/images/favicon.png' class='coderwall-icon' />" + - " <div class='coderwall-tag-container'>" + - " <div class='coderwall-tag-name'>coderwall</div>" + - " </div>" + - " </a>" + - "</div>"; - - $.fn.coderwall = function (opts) { - opts = $.extend({}, DEFAULTS, opts); - - return $(".coderwall").each(function () { - var root = $(this), - username = $(this).attr("data-coderwall-username") || opts.username, - width = $(this).attr("data-coderwall-badge-width") || opts.width, - orientation = $(this).attr("data-coderwall-orientation") || opts.orientation, - url = CODERWALL_API_URL.replace(/:username/, username); - - root.addClass("coderwall-root").addClass(orientation); - - $.getJSON(url, function (response) { - $(response.data.badges).each(function () { - var link = $("<a/>").attr({ href: CODERWALL_USER_URL.replace(/:username/, username) }), - img = $("<img/>") - .addClass("coderwall-badge") - .attr({ src: this.badge, width: width, height: width, alt: this.description }); - - link.append(img); - root.append(link); - }); - - root.append(LOGO_HTML); - }); - }); - } - - $(function () { - $(".coderwall").coderwall(); - }); -})(jQuery); \ No newline at end of file diff --git a/app/assets/javascripts/jquery.ketchup.all.min.js b/app/assets/javascripts/jquery.ketchup.all.min.js deleted file mode 100644 index 59d79421..00000000 --- a/app/assets/javascripts/jquery.ketchup.all.min.js +++ /dev/null @@ -1,346 +0,0 @@ -/* - jQuery Ketchup Plugin - Tasty Form Validation - --------------------------------------------- - - Version 0.3.1 - 12. Jan 2011 - - Copyright (c) 2011 by Sebastian Senf: - http://mustardamus.com/ - http://usejquery.com/ - http://twitter.com/mustardamus - - Dual licensed under the MIT and GPL licenses: - http://www.opensource.org/licenses/mit-license.php - http://www.gnu.org/licenses/gpl.html - - Demo: http://demos.usejquery.com/ketchup-plugin/ - Repo: http://github.com/mustardamus/ketchup-plugin - */ - -(function (g) { - g.ketchup = {defaults: {attribute: "data-validate", validateIndicator: "validate", eventIndicator: "on", validateEvents: "blur", validateElements: ["input", "textarea", "select"], createErrorContainer: null, showErrorContainer: null, hideErrorContainer: null, addErrorMessages: null}, dataNames: {validationString: "ketchup-validation-string", validations: "ketchup-validations", events: "ketchup-events", elements: "ketchup-validation-elements", container: "ketchup-container"}, validations: {}, helpers: {}, validation: function (b, c, d, h) { - var j; - if (typeof c == "function")c = c; else { - j = c; - c = d - } - this.validations[b] = {message: j, func: c, init: h || function () { - }}; - return this - }, message: function (b, c) { - this.addMessage(b, c); - return this - }, messages: function (b) { - for (name in b)this.addMessage(name, b[name]); - return this - }, addMessage: function (b, c) { - if (this.validations[b])this.validations[b].message = c - }, helper: function (b, c) { - this.helpers[b] = c; - return this - }, init: function (b, c, d) { - this.options = c; - var h = this; - c = this.initFunctions().initFields(b, d); - c.each(function () { - var j = - g(this); - h.bindValidationEvent(b, j).callInitFunctions(b, j) - }); - b.data(this.dataNames.elements, c); - this.bindFormSubmit(b) - }, initFunctions: function () { - var b = this.options, c = ["createErrorContainer", "showErrorContainer", "hideErrorContainer", "addErrorMessages"]; - for (f = 0; f < c.length; f++) { - var d = c[f]; - b[d] || (b[d] = this[d]) - } - return this - }, initFields: function (b, c) { - var d = this, h = this.dataNames, j = g(!c ? this.fieldsFromForm(b) : this.fieldsFromObject(b, c)); - j.each(function () { - var l = g(this), m = d.extractValidations(l.data(h.validationString), - d.options.validateIndicator); - l.data(h.validations, m) - }); - return j - }, callInitFunctions: function (b, c) { - var d = c.data(this.dataNames.validations); - for (i = 0; i < d.length; i++)d[i].init.apply(this.helpers, [b, c]) - }, fieldsFromForm: function (b) { - var c = this, d = this.options, h = this.dataNames, j = d.validateElements, l = []; - j = typeof j == "string" ? [j] : j; - for (i = 0; i < j.length; i++) { - var m = b.find(j[i] + "[" + d.attribute + "*=" + d.validateIndicator + "]"); - m.each(function () { - var k = g(this), p = k.attr(d.attribute), q = c.extractEvents(p, d.eventIndicator); - k.data(h.validationString, p).data(h.events, q ? q : d.validateEvents) - }); - l.push(m.get()) - } - return this.normalizeArray(l) - }, fieldsFromObject: function (b, c) { - var d = this.options, h = this.dataNames, j = []; - for (s in c) { - var l, m; - if (typeof c[s] == "string") { - l = c[s]; - m = d.validateEvents - } else { - l = c[s][0]; - m = c[s][1] - } - var k = b.find(s); - l = this.mergeValidationString(k, l); - m = this.mergeEventsString(k, m); - k.data(h.validationString, d.validateIndicator + "(" + l + ")").data(h.events, m); - j.push(k.get()) - } - return this.normalizeArray(j) - }, mergeEventsString: function (b, c) { - var d = b.data(this.dataNames.events), h = ""; - if (d) { - d = d.split(" "); - for (i = 0; i < d.length; i++)if (c.indexOf(d[i]) == -1)h += " " + d[i] - } - return g.trim(c + h) - }, mergeValidationString: function (b, c) { - var d = this.options, h = b.data(this.dataNames.validationString), j = function (k) { - var p = k.name; - if (k.arguments.length)p = p + "(" + k.arguments.join(",") + ")"; - return p - }, l = function (k, p) { - for (i = 0; i < k.length; i++)if (k[i].name == p.name)return true - }; - if (h) { - var m = this.extractValidations(d.validateIndicator + "(" + c + ")", d.validateIndicator); - d = this.extractValidations(h, - d.validateIndicator); - c = ""; - for (o = 0; o < d.length; o++)c += j(d[o]) + ","; - for (n = 0; n < m.length; n++)l(d, m[n]) || (c += j(m[n]) + ",") - } - return c - }, bindFormSubmit: function (b) { - var c = this; - b.submit(function () { - return c.allFieldsValid(b, true) - }) - }, allFieldsValid: function (b, c) { - var d = this, h = true; - b.data(this.dataNames.elements).each(function () { - var j = g(this); - if (d.validateElement(j, b) != true) { - c == true && d.triggerValidationEvents(j); - h = false - } - }); - b.trigger("formIs" + (h ? "Valid" : "Invalid"), [b]); - return h - }, bindValidationEvent: function (b, c) { - var d = - this, h = this.options, j = this.dataNames, l = c.data(j.events).split(" "); - for (i = 0; i < l.length; i++) { - c.bind("ketchup." + l[i], function () { - var m = d.validateElement(c, b), k = c.data(j.container); - if (m != true) { - if (!k) { - k = h.createErrorContainer(b, c); - c.data(j.container, k) - } - h.addErrorMessages(b, c, k, m); - h.showErrorContainer(b, c, k) - } else k && h.hideErrorContainer(b, c, k) - }); - this.bindValidationEventBridge(c, l[i]) - } - return this - }, bindValidationEventBridge: function (b, c) { - b.bind(c, function () { - b.trigger("ketchup." + c) - }) - }, validateElement: function (b, c) { - var d = [], h = b.data(this.dataNames.validations), j = [c, b, b.val()]; - for (i = 0; i < h.length; i++)h[i].func.apply(this.helpers, j.concat(h[i].arguments)) || d.push(h[i].message); - c.trigger("fieldIs" + (d.length ? "Invalid" : "Valid"), [c, b]); - return d.length ? d : true - }, elementIsValid: function (b) { - var c = this.dataNames; - if (b.data(c.validations)) { - c = b.parentsUntil("form").last().parent(); - return this.validateElement(b, c) == true ? true : false - } else if (b.data(c.elements))return this.allFieldsValid(b); - return null - }, triggerValidationEvents: function (b) { - for (var c = - b.data(this.dataNames.events).split(" "), d = 0; d < c.length; d++)b.trigger("ketchup." + c[d]) - }, extractValidations: function (b, c) { - for (var d = b.substr(b.indexOf(c) + c.length + 1), h = "", j = [], l = 0, m = [], k = 0; k < d.length; k++)switch (d.charAt(k)) { - case "(": - h += "("; - l++; - break; - case ")": - if (l) { - h += ")"; - l-- - } else j.push(g.trim(h)); - break; - case ",": - if (l)h += ","; else { - j.push(g.trim(h)); - h = "" - } - break; - default: - h += d.charAt(k) - } - for (v = 0; v < j.length; v++) { - l = j[v].indexOf("("); - d = j[v]; - h = []; - if (l != -1) { - d = g.trim(j[v].substr(0, l)); - h = g.map(j[v].substr(d.length).split(","), - function (p) { - return g.trim(p.replace("(", "").replace(")", "")) - }) - } - if ((l = this.validations[d]) && l.message) { - k = l.message; - for (a = 1; a <= h.length; a++)k = k.replace("{arg" + a + "}", h[a - 1]); - m.push({name: d, arguments: h, func: l.func, message: k, init: l.init}) - } - } - return m - }, extractEvents: function (b, c) { - var d = false, h = b.indexOf(c + "("); - if (h != -1)d = b.substr(h + c.length + 1).split(")")[0]; - return d - }, normalizeArray: function (b) { - var c = []; - for (i = 0; i < b.length; i++)for (e = 0; e < b[i].length; e++)b[i][e] && c.push(b[i][e]); - return c - }, createErrorContainer: function (b, c) { - if (typeof b == "function") { - this.defaults.createErrorContainer = b; - return this - } else { - var d = c.offset(); - return g("<div/>", {html: "<ul></ul><span></span>", "class": "ketchup-error", css: {top: d.top, left: d.left + c.outerWidth() - 20}}).appendTo("body") - } - }, showErrorContainer: function (b, c, d) { - if (typeof b == "function") { - this.defaults.showErrorContainer = b; - return this - } else d.show().animate({top: c.offset().top - d.height(), opacity: 1}, "fast") - }, hideErrorContainer: function (b, c, d) { - if (typeof b == "function") { - this.defaults.hideErrorContainer = - b; - return this - } else d.animate({top: c.offset().top, opacity: 0}, "fast", function () { - d.hide() - }) - }, addErrorMessages: function (b, c, d, h) { - if (typeof b == "function") { - this.defaults.addErrorMessages = b; - return this - } else { - b = d.children("ul"); - b.html(""); - for (i = 0; i < h.length; i++)g("<li/>", {text: h[i]}).appendTo(b) - } - }}; - g.fn.ketchup = function (b, c) { - var d = g(this); - if (typeof b == "string")switch (b) { - case "validate": - g.ketchup.triggerValidationEvents(d); - break; - case "isValid": - return g.ketchup.elementIsValid(d) - } else this.each(function () { - g.ketchup.init(d, - g.extend({}, g.ketchup.defaults, b), c) - }); - return this - } -})(jQuery); -jQuery.ketchup.validation("required", "This field is required.",function (g, b, c) { - g = b.attr("type").toLowerCase(); - return g == "checkbox" || g == "radio" ? b.attr("checked") == true : c.length != 0 -}).validation("minlength", "This field must have a minimal length of {arg1}.",function (g, b, c, d) { - return c.length >= +d -}).validation("maxlength", "This field must have a maximal length of {arg1}.",function (g, b, c, d) { - return c.length <= +d -}).validation("rangelength", "This field must have a length between {arg1} and {arg2}.",function (g, b, c, d, h) { - return c.length >= d && c.length <= h -}).validation("min", "Must be at least {arg1}.",function (g, b, c, d) { - return this.isNumber(c) && +c >= +d -}).validation("max", "Can not be greater than {arg1}.",function (g, b, c, d) { - return this.isNumber(c) && +c <= +d -}).validation("range", "Must be between {arg1} and {arg2}.",function (g, b, c, d, h) { - return this.isNumber(c) && +c >= +d && +c <= +h -}).validation("number", "Must be a number.",function (g, b, c) { - return this.isNumber(c) -}).validation("digits", "Must be digits.",function (g, b, c) { - return/^\d+$/.test(c) -}).validation("email", - "Must be a valid E-Mail.",function (g, b, c) { - return this.isEmail(c) - }).validation("url", "Must be a valid URL.",function (g, b, c) { - return this.isUrl(c) - }).validation("username", "Must be a valid username.",function (g, b, c) { - return this.isUsername(c) - }).validation("match", "Must be {arg1}.",function (g, b, c, d) { - return b.val() == d - }).validation("contain", "Must contain {arg1}",function (g, b, c, d) { - return this.contains(c, d) - }).validation("date", "Must be a valid date.",function (g, b, c) { - return this.isDate(c) - }).validation("minselect", - "Select at least {arg1} checkboxes.",function (g, b, c, d) { - return d <= this.inputsWithName(g, b).filter(":checked").length - },function (g, b) { - this.bindBrothers(g, b) - }).validation("maxselect", "Select not more than {arg1} checkboxes.",function (g, b, c, d) { - return d >= this.inputsWithName(g, b).filter(":checked").length - },function (g, b) { - this.bindBrothers(g, b) - }).validation("rangeselect", "Select between {arg1} and {arg2} checkboxes.", function (g, b, c, d, h) { - g = this.inputsWithName(g, b).filter(":checked").length; - return d <= g && h >= - g - }, function (g, b) { - this.bindBrothers(g, b) - }); -jQuery.ketchup.helper("isNumber",function (g) { - return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(g) -}).helper("contains",function (g, b) { - return g.indexOf(b) != -1 -}).helper("isEmail",function (g) { - return/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(g) -}).helper("isUrl",function (g) { - return/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(g) -}).helper("isUsername", - function (g) { - return/^([a-zA-Z])[a-zA-Z_-]*[\w_-]*[\S]$|^([a-zA-Z])[0-9_-]*[\S]$|^[a-zA-Z]*[\S]$/.test(g) - }).helper("isDate",function (g) { - return!/Invalid|NaN/.test(new Date(g)) - }).helper("inputsWithName",function (g, b) { - return $('input[name="' + b.attr("name") + '"]', g) - }).helper("inputsWithNameNotSelf",function (g, b) { - return this.inputsWithName(g, b).filter(function () { - return $(this).index() != b.index() - }) - }).helper("getKetchupEvents",function (g) { - g = g.data("events").ketchup; - var b = []; - for (i = 0; i < g.length; i++)b.push(g[i].namespace); - return b.join(" ") - }).helper("bindBrothers", function (g, b) { - this.inputsWithNameNotSelf(g, b).bind(this.getKetchupEvents(b), function () { - b.ketchup("validate") - }) - }); \ No newline at end of file diff --git a/app/assets/javascripts/jquery.konami.min.js b/app/assets/javascripts/jquery.konami.min.js deleted file mode 100644 index d464193a..00000000 --- a/app/assets/javascripts/jquery.konami.min.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Konami Code jQuery plugin - * - * Copyright 2011 8BIT, http://8bit.io - * marek-san, http://github.com/marek-saji - * - * Released under the MIT License. - */ -(function (a) { - var b = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65], c = b.length; - a.konami = function (b) { - a(window).konami(b) - }, a.fn.konami = function (d) { - return this.each(function () { - var e = 0; - a(this).keyup(function (a) { - var f = a.keyCode || a.which; - f === b[e] ? e++ : e = 0, e === c && (d(), e = 0) - }) - }) - } -})(jQuery) \ No newline at end of file diff --git a/app/assets/javascripts/jquery.min.js b/app/assets/javascripts/jquery.min.js deleted file mode 100644 index 34028d63..00000000 --- a/app/assets/javascripts/jquery.min.js +++ /dev/null @@ -1,2576 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function (a, b) { - function cy(a) { - return f.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1 - } - - function cv(a) { - if (!ck[a]) { - var b = c.body, d = f("<" + a + ">").appendTo(b), e = d.css("display"); - d.remove(); - if (e === "none" || e === "") { - cl || (cl = c.createElement("iframe"), cl.frameBorder = cl.width = cl.height = 0), b.appendChild(cl); - if (!cm || !cl.createElement)cm = (cl.contentWindow || cl.contentDocument).document, cm.write((c.compatMode === "CSS1Compat" ? "<!doctype html>" : "") + "<html><body>"), cm.close(); - d = cm.createElement(a), cm.body.appendChild(d), e = f.css(d, "display"), b.removeChild(cl) - } - ck[a] = e - } - return ck[a] - } - - function cu(a, b) { - var c = {}; - f.each(cq.concat.apply([], cq.slice(0, b)), function () { - c[this] = a - }); - return c - } - - function ct() { - cr = b - } - - function cs() { - setTimeout(ct, 0); - return cr = f.now() - } - - function cj() { - try { - return new a.ActiveXObject("Microsoft.XMLHTTP") - } catch (b) { - } - } - - function ci() { - try { - return new a.XMLHttpRequest - } catch (b) { - } - } - - function cc(a, c) { - a.dataFilter && (c = a.dataFilter(c, a.dataType)); - var d = a.dataTypes, e = {}, g, h, i = d.length, j, k = d[0], l, m, n, o, p; - for (g = 1; g < i; g++) { - if (g === 1)for (h in a.converters)typeof h == "string" && (e[h.toLowerCase()] = a.converters[h]); - l = k, k = d[g]; - if (k === "*")k = l; else if (l !== "*" && l !== k) { - m = l + " " + k, n = e[m] || e["* " + k]; - if (!n) { - p = b; - for (o in e) { - j = o.split(" "); - if (j[0] === l || j[0] === "*") { - p = e[j[1] + " " + k]; - if (p) { - o = e[o], o === !0 ? n = p : p === !0 && (n = o); - break - } - } - } - } - !n && !p && f.error("No conversion from " + m.replace(" ", " to ")), n !== !0 && (c = n ? n(c) : p(o(c))) - } - } - return c - } - - function cb(a, c, d) { - var e = a.contents, f = a.dataTypes, g = a.responseFields, h, i, j, k; - for (i in g)i in d && (c[g[i]] = d[i]); - while (f[0] === "*")f.shift(), h === b && (h = a.mimeType || c.getResponseHeader("content-type")); - if (h)for (i in e)if (e[i] && e[i].test(h)) { - f.unshift(i); - break - } - if (f[0]in d)j = f[0]; else { - for (i in d) { - if (!f[0] || a.converters[i + " " + f[0]]) { - j = i; - break - } - k || (k = i) - } - j = j || k - } - if (j) { - j !== f[0] && f.unshift(j); - return d[j] - } - } - - function ca(a, b, c, d) { - if (f.isArray(b))f.each(b, function (b, e) { - c || bE.test(a) ? d(a, e) : ca(a + "[" + (typeof e == "object" || f.isArray(e) ? b : "") + "]", e, c, d) - }); else if (!c && b != null && typeof b == "object")for (var e in b)ca(a + "[" + e + "]", b[e], c, d); else d(a, b) - } - - function b_(a, c) { - var d, e, g = f.ajaxSettings.flatOptions || {}; - for (d in c)c[d] !== b && ((g[d] ? a : e || (e = {}))[d] = c[d]); - e && f.extend(!0, a, e) - } - - function b$(a, c, d, e, f, g) { - f = f || c.dataTypes[0], g = g || {}, g[f] = !0; - var h = a[f], i = 0, j = h ? h.length : 0, k = a === bT, l; - for (; i < j && (k || !l); i++)l = h[i](c, d, e), typeof l == "string" && (!k || g[l] ? l = b : (c.dataTypes.unshift(l), l = b$(a, c, d, e, l, g))); - (k || !l) && !g["*"] && (l = b$(a, c, d, e, "*", g)); - return l - } - - function bZ(a) { - return function (b, c) { - typeof b != "string" && (c = b, b = "*"); - if (f.isFunction(c)) { - var d = b.toLowerCase().split(bP), e = 0, g = d.length, h, i, j; - for (; e < g; e++)h = d[e], j = /^\+/.test(h), j && (h = h.substr(1) || "*"), i = a[h] = a[h] || [], i[j ? "unshift" : "push"](c) - } - } - } - - function bC(a, b, c) { - var d = b === "width" ? a.offsetWidth : a.offsetHeight, e = b === "width" ? bx : by, g = 0, h = e.length; - if (d > 0) { - if (c !== "border")for (; g < h; g++)c || (d -= parseFloat(f.css(a, "padding" + e[g])) || 0), c === "margin" ? d += parseFloat(f.css(a, c + e[g])) || 0 : d -= parseFloat(f.css(a, "border" + e[g] + "Width")) || 0; - return d + "px" - } - d = bz(a, b, b); - if (d < 0 || d == null)d = a.style[b] || 0; - d = parseFloat(d) || 0; - if (c)for (; g < h; g++)d += parseFloat(f.css(a, "padding" + e[g])) || 0, c !== "padding" && (d += parseFloat(f.css(a, "border" + e[g] + "Width")) || 0), c === "margin" && (d += parseFloat(f.css(a, c + e[g])) || 0); - return d + "px" - } - - function bp(a, b) { - b.src ? f.ajax({url: b.src, async: !1, dataType: "script"}) : f.globalEval((b.text || b.textContent || b.innerHTML || "").replace(bf, "/*$0*/")), b.parentNode && b.parentNode.removeChild(b) - } - - function bo(a) { - var b = c.createElement("div"); - bh.appendChild(b), b.innerHTML = a.outerHTML; - return b.firstChild - } - - function bn(a) { - var b = (a.nodeName || "").toLowerCase(); - b === "input" ? bm(a) : b !== "script" && typeof a.getElementsByTagName != "undefined" && f.grep(a.getElementsByTagName("input"), bm) - } - - function bm(a) { - if (a.type === "checkbox" || a.type === "radio")a.defaultChecked = a.checked - } - - function bl(a) { - return typeof a.getElementsByTagName != "undefined" ? a.getElementsByTagName("*") : typeof a.querySelectorAll != "undefined" ? a.querySelectorAll("*") : [] - } - - function bk(a, b) { - var c; - if (b.nodeType === 1) { - b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase(); - if (c === "object")b.outerHTML = a.outerHTML; else if (c !== "input" || a.type !== "checkbox" && a.type !== "radio") { - if (c === "option")b.selected = a.defaultSelected; else if (c === "input" || c === "textarea")b.defaultValue = a.defaultValue - } else a.checked && (b.defaultChecked = b.checked = a.checked), b.value !== a.value && (b.value = a.value); - b.removeAttribute(f.expando) - } - } - - function bj(a, b) { - if (b.nodeType === 1 && !!f.hasData(a)) { - var c, d, e, g = f._data(a), h = f._data(b, g), i = g.events; - if (i) { - delete h.handle, h.events = {}; - for (c in i)for (d = 0, e = i[c].length; d < e; d++)f.event.add(b, c + (i[c][d].namespace ? "." : "") + i[c][d].namespace, i[c][d], i[c][d].data) - } - h.data && (h.data = f.extend({}, h.data)) - } - } - - function bi(a, b) { - return f.nodeName(a, "table") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a - } - - function U(a) { - var b = V.split("|"), c = a.createDocumentFragment(); - if (c.createElement)while (b.length)c.createElement(b.pop()); - return c - } - - function T(a, b, c) { - b = b || 0; - if (f.isFunction(b))return f.grep(a, function (a, d) { - var e = !!b.call(a, d, a); - return e === c - }); - if (b.nodeType)return f.grep(a, function (a, d) { - return a === b === c - }); - if (typeof b == "string") { - var d = f.grep(a, function (a) { - return a.nodeType === 1 - }); - if (O.test(b))return f.filter(b, d, !c); - b = f.filter(b, d) - } - return f.grep(a, function (a, d) { - return f.inArray(a, b) >= 0 === c - }) - } - - function S(a) { - return!a || !a.parentNode || a.parentNode.nodeType === 11 - } - - function K() { - return!0 - } - - function J() { - return!1 - } - - function n(a, b, c) { - var d = b + "defer", e = b + "queue", g = b + "mark", h = f._data(a, d); - h && (c === "queue" || !f._data(a, e)) && (c === "mark" || !f._data(a, g)) && setTimeout(function () { - !f._data(a, e) && !f._data(a, g) && (f.removeData(a, d, !0), h.fire()) - }, 0) - } - - function m(a) { - for (var b in a) { - if (b === "data" && f.isEmptyObject(a[b]))continue; - if (b !== "toJSON")return!1 - } - return!0 - } - - function l(a, c, d) { - if (d === b && a.nodeType === 1) { - var e = "data-" + c.replace(k, "-$1").toLowerCase(); - d = a.getAttribute(e); - if (typeof d == "string") { - try { - d = d === "true" ? !0 : d === "false" ? !1 : d === "null" ? null : f.isNumeric(d) ? parseFloat(d) : j.test(d) ? f.parseJSON(d) : d - } catch (g) { - } - f.data(a, c, d) - } else d = b - } - return d - } - - function h(a) { - var b = g[a] = {}, c, d; - a = a.split(/\s+/); - for (c = 0, d = a.length; c < d; c++)b[a[c]] = !0; - return b - } - - var c = a.document, d = a.navigator, e = a.location, f = function () { - function J() { - if (!e.isReady) { - try { - c.documentElement.doScroll("left") - } catch (a) { - setTimeout(J, 1); - return - } - e.ready() - } - } - - var e = function (a, b) { - return new e.fn.init(a, b, h) - }, f = a.jQuery, g = a.$, h, i = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, j = /\S/, k = /^\s+/, l = /\s+$/, m = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, n = /^[\],:{}\s]*$/, o = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, p = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, q = /(?:^|:|,)(?:\s*\[)+/g, r = /(webkit)[ \/]([\w.]+)/, s = /(opera)(?:.*version)?[ \/]([\w.]+)/, t = /(msie) ([\w.]+)/, u = /(mozilla)(?:.*? rv:([\w.]+))?/, v = /-([a-z]|[0-9])/ig, w = /^-ms-/, x = function (a, b) { - return(b + "").toUpperCase() - }, y = d.userAgent, z, A, B, C = Object.prototype.toString, D = Object.prototype.hasOwnProperty, E = Array.prototype.push, F = Array.prototype.slice, G = String.prototype.trim, H = Array.prototype.indexOf, I = {}; - e.fn = e.prototype = {constructor: e, init: function (a, d, f) { - var g, h, j, k; - if (!a)return this; - if (a.nodeType) { - this.context = this[0] = a, this.length = 1; - return this - } - if (a === "body" && !d && c.body) { - this.context = c, this[0] = c.body, this.selector = a, this.length = 1; - return this - } - if (typeof a == "string") { - a.charAt(0) !== "<" || a.charAt(a.length - 1) !== ">" || a.length < 3 ? g = i.exec(a) : g = [null, a, null]; - if (g && (g[1] || !d)) { - if (g[1]) { - d = d instanceof e ? d[0] : d, k = d ? d.ownerDocument || d : c, j = m.exec(a), j ? e.isPlainObject(d) ? (a = [c.createElement(j[1])], e.fn.attr.call(a, d, !0)) : a = [k.createElement(j[1])] : (j = e.buildFragment([g[1]], [k]), a = (j.cacheable ? e.clone(j.fragment) : j.fragment).childNodes); - return e.merge(this, a) - } - h = c.getElementById(g[2]); - if (h && h.parentNode) { - if (h.id !== g[2])return f.find(a); - this.length = 1, this[0] = h - } - this.context = c, this.selector = a; - return this - } - return!d || d.jquery ? (d || f).find(a) : this.constructor(d).find(a) - } - if (e.isFunction(a))return f.ready(a); - a.selector !== b && (this.selector = a.selector, this.context = a.context); - return e.makeArray(a, this) - }, selector: "", jquery: "1.7.1", length: 0, size: function () { - return this.length - }, toArray: function () { - return F.call(this, 0) - }, get: function (a) { - return a == null ? this.toArray() : a < 0 ? this[this.length + a] : this[a] - }, pushStack: function (a, b, c) { - var d = this.constructor(); - e.isArray(a) ? E.apply(d, a) : e.merge(d, a), d.prevObject = this, d.context = this.context, b === "find" ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")"); - return d - }, each: function (a, b) { - return e.each(this, a, b) - }, ready: function (a) { - e.bindReady(), A.add(a); - return this - }, eq: function (a) { - a = +a; - return a === -1 ? this.slice(a) : this.slice(a, a + 1) - }, first: function () { - return this.eq(0) - }, last: function () { - return this.eq(-1) - }, slice: function () { - return this.pushStack(F.apply(this, arguments), "slice", F.call(arguments).join(",")) - }, map: function (a) { - return this.pushStack(e.map(this, function (b, c) { - return a.call(b, c, b) - })) - }, end: function () { - return this.prevObject || this.constructor(null) - }, push: E, sort: [].sort, splice: [].splice}, e.fn.init.prototype = e.fn, e.extend = e.fn.extend = function () { - var a, c, d, f, g, h, i = arguments[0] || {}, j = 1, k = arguments.length, l = !1; - typeof i == "boolean" && (l = i, i = arguments[1] || {}, j = 2), typeof i != "object" && !e.isFunction(i) && (i = {}), k === j && (i = this, --j); - for (; j < k; j++)if ((a = arguments[j]) != null)for (c in a) { - d = i[c], f = a[c]; - if (i === f)continue; - l && f && (e.isPlainObject(f) || (g = e.isArray(f))) ? (g ? (g = !1, h = d && e.isArray(d) ? d : []) : h = d && e.isPlainObject(d) ? d : {}, i[c] = e.extend(l, h, f)) : f !== b && (i[c] = f) - } - return i - }, e.extend({noConflict: function (b) { - a.$ === e && (a.$ = g), b && a.jQuery === e && (a.jQuery = f); - return e - }, isReady: !1, readyWait: 1, holdReady: function (a) { - a ? e.readyWait++ : e.ready(!0) - }, ready: function (a) { - if (a === !0 && !--e.readyWait || a !== !0 && !e.isReady) { - if (!c.body)return setTimeout(e.ready, 1); - e.isReady = !0; - if (a !== !0 && --e.readyWait > 0)return; - A.fireWith(c, [e]), e.fn.trigger && e(c).trigger("ready").off("ready") - } - }, bindReady: function () { - if (!A) { - A = e.Callbacks("once memory"); - if (c.readyState === "complete")return setTimeout(e.ready, 1); - if (c.addEventListener)c.addEventListener("DOMContentLoaded", B, !1), a.addEventListener("load", e.ready, !1); else if (c.attachEvent) { - c.attachEvent("onreadystatechange", B), a.attachEvent("onload", e.ready); - var b = !1; - try { - b = a.frameElement == null - } catch (d) { - } - c.documentElement.doScroll && b && J() - } - } - }, isFunction: function (a) { - return e.type(a) === "function" - }, isArray: Array.isArray || function (a) { - return e.type(a) === "array" - }, isWindow: function (a) { - return a && typeof a == "object" && "setInterval"in a - }, isNumeric: function (a) { - return!isNaN(parseFloat(a)) && isFinite(a) - }, type: function (a) { - return a == null ? String(a) : I[C.call(a)] || "object" - }, isPlainObject: function (a) { - if (!a || e.type(a) !== "object" || a.nodeType || e.isWindow(a))return!1; - try { - if (a.constructor && !D.call(a, "constructor") && !D.call(a.constructor.prototype, "isPrototypeOf"))return!1 - } catch (c) { - return!1 - } - var d; - for (d in a); - return d === b || D.call(a, d) - }, isEmptyObject: function (a) { - for (var b in a)return!1; - return!0 - }, error: function (a) { - throw new Error(a) - }, parseJSON: function (b) { - if (typeof b != "string" || !b)return null; - b = e.trim(b); - if (a.JSON && a.JSON.parse)return a.JSON.parse(b); - if (n.test(b.replace(o, "@").replace(p, "]").replace(q, "")))return(new Function("return " + b))(); - e.error("Invalid JSON: " + b) - }, parseXML: function (c) { - var d, f; - try { - a.DOMParser ? (f = new DOMParser, d = f.parseFromString(c, "text/xml")) : (d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c)) - } catch (g) { - d = b - } - (!d || !d.documentElement || d.getElementsByTagName("parsererror").length) && e.error("Invalid XML: " + c); - return d - }, noop: function () { - }, globalEval: function (b) { - b && j.test(b) && (a.execScript || function (b) { - a.eval.call(a, b) - })(b) - }, camelCase: function (a) { - return a.replace(w, "ms-").replace(v, x) - }, nodeName: function (a, b) { - return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase() - }, each: function (a, c, d) { - var f, g = 0, h = a.length, i = h === b || e.isFunction(a); - if (d) { - if (i) { - for (f in a)if (c.apply(a[f], d) === !1)break - } else for (; g < h;)if (c.apply(a[g++], d) === !1)break - } else if (i) { - for (f in a)if (c.call(a[f], f, a[f]) === !1)break - } else for (; g < h;)if (c.call(a[g], g, a[g++]) === !1)break; - return a - }, trim: G ? function (a) { - return a == null ? "" : G.call(a) - } : function (a) { - return a == null ? "" : (a + "").replace(k, "").replace(l, "") - }, makeArray: function (a, b) { - var c = b || []; - if (a != null) { - var d = e.type(a); - a.length == null || d === "string" || d === "function" || d === "regexp" || e.isWindow(a) ? E.call(c, a) : e.merge(c, a) - } - return c - }, inArray: function (a, b, c) { - var d; - if (b) { - if (H)return H.call(b, a, c); - d = b.length, c = c ? c < 0 ? Math.max(0, d + c) : c : 0; - for (; c < d; c++)if (c in b && b[c] === a)return c - } - return-1 - }, merge: function (a, c) { - var d = a.length, e = 0; - if (typeof c.length == "number")for (var f = c.length; e < f; e++)a[d++] = c[e]; else while (c[e] !== b)a[d++] = c[e++]; - a.length = d; - return a - }, grep: function (a, b, c) { - var d = [], e; - c = !!c; - for (var f = 0, g = a.length; f < g; f++)e = !!b(a[f], f), c !== e && d.push(a[f]); - return d - }, map: function (a, c, d) { - var f, g, h = [], i = 0, j = a.length, k = a instanceof e || j !== b && typeof j == "number" && (j > 0 && a[0] && a[j - 1] || j === 0 || e.isArray(a)); - if (k)for (; i < j; i++)f = c(a[i], i, d), f != null && (h[h.length] = f); else for (g in a)f = c(a[g], g, d), f != null && (h[h.length] = f); - return h.concat.apply([], h) - }, guid: 1, proxy: function (a, c) { - if (typeof c == "string") { - var d = a[c]; - c = a, a = d - } - if (!e.isFunction(a))return b; - var f = F.call(arguments, 2), g = function () { - return a.apply(c, f.concat(F.call(arguments))) - }; - g.guid = a.guid = a.guid || g.guid || e.guid++; - return g - }, access: function (a, c, d, f, g, h) { - var i = a.length; - if (typeof c == "object") { - for (var j in c)e.access(a, j, c[j], f, g, d); - return a - } - if (d !== b) { - f = !h && f && e.isFunction(d); - for (var k = 0; k < i; k++)g(a[k], c, f ? d.call(a[k], k, g(a[k], c)) : d, h); - return a - } - return i ? g(a[0], c) : b - }, now: function () { - return(new Date).getTime() - }, uaMatch: function (a) { - a = a.toLowerCase(); - var b = r.exec(a) || s.exec(a) || t.exec(a) || a.indexOf("compatible") < 0 && u.exec(a) || []; - return{browser: b[1] || "", version: b[2] || "0"} - }, sub: function () { - function a(b, c) { - return new a.fn.init(b, c) - } - - e.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function (d, f) { - f && f instanceof e && !(f instanceof a) && (f = a(f)); - return e.fn.init.call(this, d, f, b) - }, a.fn.init.prototype = a.fn; - var b = a(c); - return a - }, browser: {}}), e.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (a, b) { - I["[object " + b + "]"] = b.toLowerCase() - }), z = e.uaMatch(y), z.browser && (e.browser[z.browser] = !0, e.browser.version = z.version), e.browser.webkit && (e.browser.safari = !0), j.test(" ") && (k = /^[\s\xA0]+/, l = /[\s\xA0]+$/), h = e(c), c.addEventListener ? B = function () { - c.removeEventListener("DOMContentLoaded", B, !1), e.ready() - } : c.attachEvent && (B = function () { - c.readyState === "complete" && (c.detachEvent("onreadystatechange", B), e.ready()) - }); - return e - }(), g = {}; - f.Callbacks = function (a) { - a = a ? g[a] || h(a) : {}; - var c = [], d = [], e, i, j, k, l, m = function (b) { - var d, e, g, h, i; - for (d = 0, e = b.length; d < e; d++)g = b[d], h = f.type(g), h === "array" ? m(g) : h === "function" && (!a.unique || !o.has(g)) && c.push(g) - }, n = function (b, f) { - f = f || [], e = !a.memory || [b, f], i = !0, l = j || 0, j = 0, k = c.length; - for (; c && l < k; l++)if (c[l].apply(b, f) === !1 && a.stopOnFalse) { - e = !0; - break - } - i = !1, c && (a.once ? e === !0 ? o.disable() : c = [] : d && d.length && (e = d.shift(), o.fireWith(e[0], e[1]))) - }, o = {add: function () { - if (c) { - var a = c.length; - m(arguments), i ? k = c.length : e && e !== !0 && (j = a, n(e[0], e[1])) - } - return this - }, remove: function () { - if (c) { - var b = arguments, d = 0, e = b.length; - for (; d < e; d++)for (var f = 0; f < c.length; f++)if (b[d] === c[f]) { - i && f <= k && (k--, f <= l && l--), c.splice(f--, 1); - if (a.unique)break - } - } - return this - }, has: function (a) { - if (c) { - var b = 0, d = c.length; - for (; b < d; b++)if (a === c[b])return!0 - } - return!1 - }, empty: function () { - c = []; - return this - }, disable: function () { - c = d = e = b; - return this - }, disabled: function () { - return!c - }, lock: function () { - d = b, (!e || e === !0) && o.disable(); - return this - }, locked: function () { - return!d - }, fireWith: function (b, c) { - d && (i ? a.once || d.push([b, c]) : (!a.once || !e) && n(b, c)); - return this - }, fire: function () { - o.fireWith(this, arguments); - return this - }, fired: function () { - return!!e - }}; - return o - }; - var i = [].slice; - f.extend({Deferred: function (a) { - var b = f.Callbacks("once memory"), c = f.Callbacks("once memory"), d = f.Callbacks("memory"), e = "pending", g = {resolve: b, reject: c, notify: d}, h = {done: b.add, fail: c.add, progress: d.add, state: function () { - return e - }, isResolved: b.fired, isRejected: c.fired, then: function (a, b, c) { - i.done(a).fail(b).progress(c); - return this - }, always: function () { - i.done.apply(i, arguments).fail.apply(i, arguments); - return this - }, pipe: function (a, b, c) { - return f.Deferred(function (d) { - f.each({done: [a, "resolve"], fail: [b, "reject"], progress: [c, "notify"]}, function (a, b) { - var c = b[0], e = b[1], g; - f.isFunction(c) ? i[a](function () { - g = c.apply(this, arguments), g && f.isFunction(g.promise) ? g.promise().then(d.resolve, d.reject, d.notify) : d[e + "With"](this === i ? d : this, [g]) - }) : i[a](d[e]) - }) - }).promise() - }, promise: function (a) { - if (a == null)a = h; else for (var b in h)a[b] = h[b]; - return a - }}, i = h.promise({}), j; - for (j in g)i[j] = g[j].fire, i[j + "With"] = g[j].fireWith; - i.done(function () { - e = "resolved" - }, c.disable, d.lock).fail(function () { - e = "rejected" - }, b.disable, d.lock), a && a.call(i, i); - return i - }, when: function (a) { - function m(a) { - return function (b) { - e[a] = arguments.length > 1 ? i.call(arguments, 0) : b, j.notifyWith(k, e) - } - } - - function l(a) { - return function (c) { - b[a] = arguments.length > 1 ? i.call(arguments, 0) : c, --g || j.resolveWith(j, b) - } - } - - var b = i.call(arguments, 0), c = 0, d = b.length, e = Array(d), g = d, h = d, j = d <= 1 && a && f.isFunction(a.promise) ? a : f.Deferred(), k = j.promise(); - if (d > 1) { - for (; c < d; c++)b[c] && b[c].promise && f.isFunction(b[c].promise) ? b[c].promise().then(l(c), j.reject, m(c)) : --g; - g || j.resolveWith(j, b) - } else j !== a && j.resolveWith(j, d ? [a] : []); - return k - }}), f.support = function () { - var b, d, e, g, h, i, j, k, l, m, n, o, p, q = c.createElement("div"), r = c.documentElement; - q.setAttribute("className", "t"), q.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>", d = q.getElementsByTagName("*"), e = q.getElementsByTagName("a")[0]; - if (!d || !d.length || !e)return{}; - g = c.createElement("select"), h = g.appendChild(c.createElement("option")), i = q.getElementsByTagName("input")[0], b = {leadingWhitespace: q.firstChild.nodeType === 3, tbody: !q.getElementsByTagName("tbody").length, htmlSerialize: !!q.getElementsByTagName("link").length, style: /top/.test(e.getAttribute("style")), hrefNormalized: e.getAttribute("href") === "/a", opacity: /^0.55/.test(e.style.opacity), cssFloat: !!e.style.cssFloat, checkOn: i.value === "on", optSelected: h.selected, getSetAttribute: q.className !== "t", enctype: !!c.createElement("form").enctype, html5Clone: c.createElement("nav").cloneNode(!0).outerHTML !== "<:nav></:nav>", submitBubbles: !0, changeBubbles: !0, focusinBubbles: !1, deleteExpando: !0, noCloneEvent: !0, inlineBlockNeedsLayout: !1, shrinkWrapBlocks: !1, reliableMarginRight: !0}, i.checked = !0, b.noCloneChecked = i.cloneNode(!0).checked, g.disabled = !0, b.optDisabled = !h.disabled; - try { - delete q.test - } catch (s) { - b.deleteExpando = !1 - } - !q.addEventListener && q.attachEvent && q.fireEvent && (q.attachEvent("onclick", function () { - b.noCloneEvent = !1 - }), q.cloneNode(!0).fireEvent("onclick")), i = c.createElement("input"), i.value = "t", i.setAttribute("type", "radio"), b.radioValue = i.value === "t", i.setAttribute("checked", "checked"), q.appendChild(i), k = c.createDocumentFragment(), k.appendChild(q.lastChild), b.checkClone = k.cloneNode(!0).cloneNode(!0).lastChild.checked, b.appendChecked = i.checked, k.removeChild(i), k.appendChild(q), q.innerHTML = "", a.getComputedStyle && (j = c.createElement("div"), j.style.width = "0", j.style.marginRight = "0", q.style.width = "2px", q.appendChild(j), b.reliableMarginRight = (parseInt((a.getComputedStyle(j, null) || {marginRight: 0}).marginRight, 10) || 0) === 0); - if (q.attachEvent)for (o in{submit: 1, change: 1, focusin: 1})n = "on" + o, p = n in q, p || (q.setAttribute(n, "return;"), p = typeof q[n] == "function"), b[o + "Bubbles"] = p; - k.removeChild(q), k = g = h = j = q = i = null, f(function () { - var a, d, e, g, h, i, j, k, m, n, o, r = c.getElementsByTagName("body")[0]; - !r || (j = 1, k = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;", m = "visibility:hidden;border:0;", n = "style='" + k + "border:5px solid #000;padding:0;'", o = "<div " + n + "><div></div></div>" + "<table " + n + " cellpadding='0' cellspacing='0'>" + "<tr><td></td></tr></table>", a = c.createElement("div"), a.style.cssText = m + "width:0;height:0;position:static;top:0;margin-top:" + j + "px", r.insertBefore(a, r.firstChild), q = c.createElement("div"), a.appendChild(q), q.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>", l = q.getElementsByTagName("td"), p = l[0].offsetHeight === 0, l[0].style.display = "", l[1].style.display = "none", b.reliableHiddenOffsets = p && l[0].offsetHeight === 0, q.innerHTML = "", q.style.width = q.style.paddingLeft = "1px", f.boxModel = b.boxModel = q.offsetWidth === 2, typeof q.style.zoom != "undefined" && (q.style.display = "inline", q.style.zoom = 1, b.inlineBlockNeedsLayout = q.offsetWidth === 2, q.style.display = "", q.innerHTML = "<div style='width:4px;'></div>", b.shrinkWrapBlocks = q.offsetWidth !== 2), q.style.cssText = k + m, q.innerHTML = o, d = q.firstChild, e = d.firstChild, h = d.nextSibling.firstChild.firstChild, i = {doesNotAddBorder: e.offsetTop !== 5, doesAddBorderForTableAndCells: h.offsetTop === 5}, e.style.position = "fixed", e.style.top = "20px", i.fixedPosition = e.offsetTop === 20 || e.offsetTop === 15, e.style.position = e.style.top = "", d.style.overflow = "hidden", d.style.position = "relative", i.subtractsBorderForOverflowNotVisible = e.offsetTop === -5, i.doesNotIncludeMarginInBodyOffset = r.offsetTop !== j, r.removeChild(a), q = a = null, f.extend(b, i)) - }); - return b - }(); - var j = /^(?:\{.*\}|\[.*\])$/, k = /([A-Z])/g; - f.extend({cache: {}, uuid: 0, expando: "jQuery" + (f.fn.jquery + Math.random()).replace(/\D/g, ""), noData: {embed: !0, object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", applet: !0}, hasData: function (a) { - a = a.nodeType ? f.cache[a[f.expando]] : a[f.expando]; - return!!a && !m(a) - }, data: function (a, c, d, e) { - if (!!f.acceptData(a)) { - var g, h, i, j = f.expando, k = typeof c == "string", l = a.nodeType, m = l ? f.cache : a, n = l ? a[j] : a[j] && j, o = c === "events"; - if ((!n || !m[n] || !o && !e && !m[n].data) && k && d === b)return; - n || (l ? a[j] = n = ++f.uuid : n = j), m[n] || (m[n] = {}, l || (m[n].toJSON = f.noop)); - if (typeof c == "object" || typeof c == "function")e ? m[n] = f.extend(m[n], c) : m[n].data = f.extend(m[n].data, c); - g = h = m[n], e || (h.data || (h.data = {}), h = h.data), d !== b && (h[f.camelCase(c)] = d); - if (o && !h[c])return g.events; - k ? (i = h[c], i == null && (i = h[f.camelCase(c)])) : i = h; - return i - } - }, removeData: function (a, b, c) { - if (!!f.acceptData(a)) { - var d, e, g, h = f.expando, i = a.nodeType, j = i ? f.cache : a, k = i ? a[h] : h; - if (!j[k])return; - if (b) { - d = c ? j[k] : j[k].data; - if (d) { - f.isArray(b) || (b in d ? b = [b] : (b = f.camelCase(b), b in d ? b = [b] : b = b.split(" "))); - for (e = 0, g = b.length; e < g; e++)delete d[b[e]]; - if (!(c ? m : f.isEmptyObject)(d))return - } - } - if (!c) { - delete j[k].data; - if (!m(j[k]))return - } - f.support.deleteExpando || !j.setInterval ? delete j[k] : j[k] = null, i && (f.support.deleteExpando ? delete a[h] : a.removeAttribute ? a.removeAttribute(h) : a[h] = null) - } - }, _data: function (a, b, c) { - return f.data(a, b, c, !0) - }, acceptData: function (a) { - if (a.nodeName) { - var b = f.noData[a.nodeName.toLowerCase()]; - if (b)return b !== !0 && a.getAttribute("classid") === b - } - return!0 - }}), f.fn.extend({data: function (a, c) { - var d, e, g, h = null; - if (typeof a == "undefined") { - if (this.length) { - h = f.data(this[0]); - if (this[0].nodeType === 1 && !f._data(this[0], "parsedAttrs")) { - e = this[0].attributes; - for (var i = 0, j = e.length; i < j; i++)g = e[i].name, g.indexOf("data-") === 0 && (g = f.camelCase(g.substring(5)), l(this[0], g, h[g])); - f._data(this[0], "parsedAttrs", !0) - } - } - return h - } - if (typeof a == "object")return this.each(function () { - f.data(this, a) - }); - d = a.split("."), d[1] = d[1] ? "." + d[1] : ""; - if (c === b) { - h = this.triggerHandler("getData" + d[1] + "!", [d[0]]), h === b && this.length && (h = f.data(this[0], a), h = l(this[0], a, h)); - return h === b && d[1] ? this.data(d[0]) : h - } - return this.each(function () { - var b = f(this), e = [d[0], c]; - b.triggerHandler("setData" + d[1] + "!", e), f.data(this, a, c), b.triggerHandler("changeData" + d[1] + "!", e) - }) - }, removeData: function (a) { - return this.each(function () { - f.removeData(this, a) - }) - }}), f.extend({_mark: function (a, b) { - a && (b = (b || "fx") + "mark", f._data(a, b, (f._data(a, b) || 0) + 1)) - }, _unmark: function (a, b, c) { - a !== !0 && (c = b, b = a, a = !1); - if (b) { - c = c || "fx"; - var d = c + "mark", e = a ? 0 : (f._data(b, d) || 1) - 1; - e ? f._data(b, d, e) : (f.removeData(b, d, !0), n(b, c, "mark")) - } - }, queue: function (a, b, c) { - var d; - if (a) { - b = (b || "fx") + "queue", d = f._data(a, b), c && (!d || f.isArray(c) ? d = f._data(a, b, f.makeArray(c)) : d.push(c)); - return d || [] - } - }, dequeue: function (a, b) { - b = b || "fx"; - var c = f.queue(a, b), d = c.shift(), e = {}; - d === "inprogress" && (d = c.shift()), d && (b === "fx" && c.unshift("inprogress"), f._data(a, b + ".run", e), d.call(a, function () { - f.dequeue(a, b) - }, e)), c.length || (f.removeData(a, b + "queue " + b + ".run", !0), n(a, b, "queue")) - }}), f.fn.extend({queue: function (a, c) { - typeof a != "string" && (c = a, a = "fx"); - if (c === b)return f.queue(this[0], a); - return this.each(function () { - var b = f.queue(this, a, c); - a === "fx" && b[0] !== "inprogress" && f.dequeue(this, a) - }) - }, dequeue: function (a) { - return this.each(function () { - f.dequeue(this, a) - }) - }, delay: function (a, b) { - a = f.fx ? f.fx.speeds[a] || a : a, b = b || "fx"; - return this.queue(b, function (b, c) { - var d = setTimeout(b, a); - c.stop = function () { - clearTimeout(d) - } - }) - }, clearQueue: function (a) { - return this.queue(a || "fx", []) - }, promise: function (a, c) { - function m() { - --h || d.resolveWith(e, [e]) - } - - typeof a != "string" && (c = a, a = b), a = a || "fx"; - var d = f.Deferred(), e = this, g = e.length, h = 1, i = a + "defer", j = a + "queue", k = a + "mark", l; - while (g--)if (l = f.data(e[g], i, b, !0) || (f.data(e[g], j, b, !0) || f.data(e[g], k, b, !0)) && f.data(e[g], i, f.Callbacks("once memory"), !0))h++, l.add(m); - m(); - return d.promise() - }}); - var o = /[\n\t\r]/g, p = /\s+/, q = /\r/g, r = /^(?:button|input)$/i, s = /^(?:button|input|object|select|textarea)$/i, t = /^a(?:rea)?$/i, u = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, v = f.support.getSetAttribute, w, x, y; - f.fn.extend({attr: function (a, b) { - return f.access(this, a, b, !0, f.attr) - }, removeAttr: function (a) { - return this.each(function () { - f.removeAttr(this, a) - }) - }, prop: function (a, b) { - return f.access(this, a, b, !0, f.prop) - }, removeProp: function (a) { - a = f.propFix[a] || a; - return this.each(function () { - try { - this[a] = b, delete this[a] - } catch (c) { - } - }) - }, addClass: function (a) { - var b, c, d, e, g, h, i; - if (f.isFunction(a))return this.each(function (b) { - f(this).addClass(a.call(this, b, this.className)) - }); - if (a && typeof a == "string") { - b = a.split(p); - for (c = 0, d = this.length; c < d; c++) { - e = this[c]; - if (e.nodeType === 1)if (!e.className && b.length === 1)e.className = a; else { - g = " " + e.className + " "; - for (h = 0, i = b.length; h < i; h++)~g.indexOf(" " + b[h] + " ") || (g += b[h] + " "); - e.className = f.trim(g) - } - } - } - return this - }, removeClass: function (a) { - var c, d, e, g, h, i, j; - if (f.isFunction(a))return this.each(function (b) { - f(this).removeClass(a.call(this, b, this.className)) - }); - if (a && typeof a == "string" || a === b) { - c = (a || "").split(p); - for (d = 0, e = this.length; d < e; d++) { - g = this[d]; - if (g.nodeType === 1 && g.className)if (a) { - h = (" " + g.className + " ").replace(o, " "); - for (i = 0, j = c.length; i < j; i++)h = h.replace(" " + c[i] + " ", " "); - g.className = f.trim(h) - } else g.className = "" - } - } - return this - }, toggleClass: function (a, b) { - var c = typeof a, d = typeof b == "boolean"; - if (f.isFunction(a))return this.each(function (c) { - f(this).toggleClass(a.call(this, c, this.className, b), b) - }); - return this.each(function () { - if (c === "string") { - var e, g = 0, h = f(this), i = b, j = a.split(p); - while (e = j[g++])i = d ? i : !h.hasClass(e), h[i ? "addClass" : "removeClass"](e) - } else if (c === "undefined" || c === "boolean")this.className && f._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : f._data(this, "__className__") || "" - }) - }, hasClass: function (a) { - var b = " " + a + " ", c = 0, d = this.length; - for (; c < d; c++)if (this[c].nodeType === 1 && (" " + this[c].className + " ").replace(o, " ").indexOf(b) > -1)return!0; - return!1 - }, val: function (a) { - var c, d, e, g = this[0]; - { - if (!!arguments.length) { - e = f.isFunction(a); - return this.each(function (d) { - var g = f(this), h; - if (this.nodeType === 1) { - e ? h = a.call(this, d, g.val()) : h = a, h == null ? h = "" : typeof h == "number" ? h += "" : f.isArray(h) && (h = f.map(h, function (a) { - return a == null ? "" : a + "" - })), c = f.valHooks[this.nodeName.toLowerCase()] || f.valHooks[this.type]; - if (!c || !("set"in c) || c.set(this, h, "value") === b)this.value = h - } - }) - } - if (g) { - c = f.valHooks[g.nodeName.toLowerCase()] || f.valHooks[g.type]; - if (c && "get"in c && (d = c.get(g, "value")) !== b)return d; - d = g.value; - return typeof d == "string" ? d.replace(q, "") : d == null ? "" : d - } - } - }}), f.extend({valHooks: {option: {get: function (a) { - var b = a.attributes.value; - return!b || b.specified ? a.value : a.text - }}, select: {get: function (a) { - var b, c, d, e, g = a.selectedIndex, h = [], i = a.options, j = a.type === "select-one"; - if (g < 0)return null; - c = j ? g : 0, d = j ? g + 1 : i.length; - for (; c < d; c++) { - e = i[c]; - if (e.selected && (f.support.optDisabled ? !e.disabled : e.getAttribute("disabled") === null) && (!e.parentNode.disabled || !f.nodeName(e.parentNode, "optgroup"))) { - b = f(e).val(); - if (j)return b; - h.push(b) - } - } - if (j && !h.length && i.length)return f(i[g]).val(); - return h - }, set: function (a, b) { - var c = f.makeArray(b); - f(a).find("option").each(function () { - this.selected = f.inArray(f(this).val(), c) >= 0 - }), c.length || (a.selectedIndex = -1); - return c - }}}, attrFn: {val: !0, css: !0, html: !0, text: !0, data: !0, width: !0, height: !0, offset: !0}, attr: function (a, c, d, e) { - var g, h, i, j = a.nodeType; - if (!!a && j !== 3 && j !== 8 && j !== 2) { - if (e && c in f.attrFn)return f(a)[c](d); - if (typeof a.getAttribute == "undefined")return f.prop(a, c, d); - i = j !== 1 || !f.isXMLDoc(a), i && (c = c.toLowerCase(), h = f.attrHooks[c] || (u.test(c) ? x : w)); - if (d !== b) { - if (d === null) { - f.removeAttr(a, c); - return - } - if (h && "set"in h && i && (g = h.set(a, d, c)) !== b)return g; - a.setAttribute(c, "" + d); - return d - } - if (h && "get"in h && i && (g = h.get(a, c)) !== null)return g; - g = a.getAttribute(c); - return g === null ? b : g - } - }, removeAttr: function (a, b) { - var c, d, e, g, h = 0; - if (b && a.nodeType === 1) { - d = b.toLowerCase().split(p), g = d.length; - for (; h < g; h++)e = d[h], e && (c = f.propFix[e] || e, f.attr(a, e, ""), a.removeAttribute(v ? e : c), u.test(e) && c in a && (a[c] = !1)) - } - }, attrHooks: {type: {set: function (a, b) { - if (r.test(a.nodeName) && a.parentNode)f.error("type property can't be changed"); else if (!f.support.radioValue && b === "radio" && f.nodeName(a, "input")) { - var c = a.value; - a.setAttribute("type", b), c && (a.value = c); - return b - } - }}, value: {get: function (a, b) { - if (w && f.nodeName(a, "button"))return w.get(a, b); - return b in a ? a.value : null - }, set: function (a, b, c) { - if (w && f.nodeName(a, "button"))return w.set(a, b, c); - a.value = b - }}}, propFix: {tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable"}, prop: function (a, c, d) { - var e, g, h, i = a.nodeType; - if (!!a && i !== 3 && i !== 8 && i !== 2) { - h = i !== 1 || !f.isXMLDoc(a), h && (c = f.propFix[c] || c, g = f.propHooks[c]); - return d !== b ? g && "set"in g && (e = g.set(a, d, c)) !== b ? e : a[c] = d : g && "get"in g && (e = g.get(a, c)) !== null ? e : a[c] - } - }, propHooks: {tabIndex: {get: function (a) { - var c = a.getAttributeNode("tabindex"); - return c && c.specified ? parseInt(c.value, 10) : s.test(a.nodeName) || t.test(a.nodeName) && a.href ? 0 : b - }}}}), f.attrHooks.tabindex = f.propHooks.tabIndex, x = {get: function (a, c) { - var d, e = f.prop(a, c); - return e === !0 || typeof e != "boolean" && (d = a.getAttributeNode(c)) && d.nodeValue !== !1 ? c.toLowerCase() : b - }, set: function (a, b, c) { - var d; - b === !1 ? f.removeAttr(a, c) : (d = f.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase())); - return c - }}, v || (y = {name: !0, id: !0}, w = f.valHooks.button = {get: function (a, c) { - var d; - d = a.getAttributeNode(c); - return d && (y[c] ? d.nodeValue !== "" : d.specified) ? d.nodeValue : b - }, set: function (a, b, d) { - var e = a.getAttributeNode(d); - e || (e = c.createAttribute(d), a.setAttributeNode(e)); - return e.nodeValue = b + "" - }}, f.attrHooks.tabindex.set = w.set, f.each(["width", "height"], function (a, b) { - f.attrHooks[b] = f.extend(f.attrHooks[b], {set: function (a, c) { - if (c === "") { - a.setAttribute(b, "auto"); - return c - } - }}) - }), f.attrHooks.contenteditable = {get: w.get, set: function (a, b, c) { - b === "" && (b = "false"), w.set(a, b, c) - }}), f.support.hrefNormalized || f.each(["href", "src", "width", "height"], function (a, c) { - f.attrHooks[c] = f.extend(f.attrHooks[c], {get: function (a) { - var d = a.getAttribute(c, 2); - return d === null ? b : d - }}) - }), f.support.style || (f.attrHooks.style = {get: function (a) { - return a.style.cssText.toLowerCase() || b - }, set: function (a, b) { - return a.style.cssText = "" + b - }}), f.support.optSelected || (f.propHooks.selected = f.extend(f.propHooks.selected, {get: function (a) { - var b = a.parentNode; - b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex); - return null - }})), f.support.enctype || (f.propFix.enctype = "encoding"), f.support.checkOn || f.each(["radio", "checkbox"], function () { - f.valHooks[this] = {get: function (a) { - return a.getAttribute("value") === null ? "on" : a.value - }} - }), f.each(["radio", "checkbox"], function () { - f.valHooks[this] = f.extend(f.valHooks[this], {set: function (a, b) { - if (f.isArray(b))return a.checked = f.inArray(f(a).val(), b) >= 0 - }}) - }); - var z = /^(?:textarea|input|select)$/i, A = /^([^\.]*)?(?:\.(.+))?$/, B = /\bhover(\.\S+)?\b/, C = /^key/, D = /^(?:mouse|contextmenu)|click/, E = /^(?:focusinfocus|focusoutblur)$/, F = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, G = function (a) { - var b = F.exec(a); - b && (b[1] = (b[1] || "").toLowerCase(), b[3] = b[3] && new RegExp("(?:^|\\s)" + b[3] + "(?:\\s|$)")); - return b - }, H = function (a, b) { - var c = a.attributes || {}; - return(!b[1] || a.nodeName.toLowerCase() === b[1]) && (!b[2] || (c.id || {}).value === b[2]) && (!b[3] || b[3].test((c["class"] || {}).value)) - }, I = function (a) { - return f.event.special.hover ? a : a.replace(B, "mouseenter$1 mouseleave$1") - }; - f.event = {add: function (a, c, d, e, g) { - var h, i, j, k, l, m, n, o, p, q, r, s; - if (!(a.nodeType === 3 || a.nodeType === 8 || !c || !d || !(h = f._data(a)))) { - d.handler && (p = d, d = p.handler), d.guid || (d.guid = f.guid++), j = h.events, j || (h.events = j = {}), i = h.handle, i || (h.handle = i = function (a) { - return typeof f != "undefined" && (!a || f.event.triggered !== a.type) ? f.event.dispatch.apply(i.elem, arguments) : b - }, i.elem = a), c = f.trim(I(c)).split(" "); - for (k = 0; k < c.length; k++) { - l = A.exec(c[k]) || [], m = l[1], n = (l[2] || "").split(".").sort(), s = f.event.special[m] || {}, m = (g ? s.delegateType : s.bindType) || m, s = f.event.special[m] || {}, o = f.extend({type: m, origType: l[1], data: e, handler: d, guid: d.guid, selector: g, quick: G(g), namespace: n.join(".")}, p), r = j[m]; - if (!r) { - r = j[m] = [], r.delegateCount = 0; - if (!s.setup || s.setup.call(a, e, n, i) === !1)a.addEventListener ? a.addEventListener(m, i, !1) : a.attachEvent && a.attachEvent("on" + m, i) - } - s.add && (s.add.call(a, o), o.handler.guid || (o.handler.guid = d.guid)), g ? r.splice(r.delegateCount++, 0, o) : r.push(o), f.event.global[m] = !0 - } - a = null - } - }, global: {}, remove: function (a, b, c, d, e) { - var g = f.hasData(a) && f._data(a), h, i, j, k, l, m, n, o, p, q, r, s; - if (!!g && !!(o = g.events)) { - b = f.trim(I(b || "")).split(" "); - for (h = 0; h < b.length; h++) { - i = A.exec(b[h]) || [], j = k = i[1], l = i[2]; - if (!j) { - for (j in o)f.event.remove(a, j + b[h], c, d, !0); - continue - } - p = f.event.special[j] || {}, j = (d ? p.delegateType : p.bindType) || j, r = o[j] || [], m = r.length, l = l ? new RegExp("(^|\\.)" + l.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; - for (n = 0; n < r.length; n++)s = r[n], (e || k === s.origType) && (!c || c.guid === s.guid) && (!l || l.test(s.namespace)) && (!d || d === s.selector || d === "**" && s.selector) && (r.splice(n--, 1), s.selector && r.delegateCount--, p.remove && p.remove.call(a, s)); - r.length === 0 && m !== r.length && ((!p.teardown || p.teardown.call(a, l) === !1) && f.removeEvent(a, j, g.handle), delete o[j]) - } - f.isEmptyObject(o) && (q = g.handle, q && (q.elem = null), f.removeData(a, ["events", "handle"], !0)) - } - }, customEvent: {getData: !0, setData: !0, changeData: !0}, trigger: function (c, d, e, g) { - if (!e || e.nodeType !== 3 && e.nodeType !== 8) { - var h = c.type || c, i = [], j, k, l, m, n, o, p, q, r, s; - if (E.test(h + f.event.triggered))return; - h.indexOf("!") >= 0 && (h = h.slice(0, -1), k = !0), h.indexOf(".") >= 0 && (i = h.split("."), h = i.shift(), i.sort()); - if ((!e || f.event.customEvent[h]) && !f.event.global[h])return; - c = typeof c == "object" ? c[f.expando] ? c : new f.Event(h, c) : new f.Event(h), c.type = h, c.isTrigger = !0, c.exclusive = k, c.namespace = i.join("."), c.namespace_re = c.namespace ? new RegExp("(^|\\.)" + i.join("\\.(?:.*\\.)?") + "(\\.|$)") : null, o = h.indexOf(":") < 0 ? "on" + h : ""; - if (!e) { - j = f.cache; - for (l in j)j[l].events && j[l].events[h] && f.event.trigger(c, d, j[l].handle.elem, !0); - return - } - c.result = b, c.target || (c.target = e), d = d != null ? f.makeArray(d) : [], d.unshift(c), p = f.event.special[h] || {}; - if (p.trigger && p.trigger.apply(e, d) === !1)return; - r = [ - [e, p.bindType || h] - ]; - if (!g && !p.noBubble && !f.isWindow(e)) { - s = p.delegateType || h, m = E.test(s + h) ? e : e.parentNode, n = null; - for (; m; m = m.parentNode)r.push([m, s]), n = m; - n && n === e.ownerDocument && r.push([n.defaultView || n.parentWindow || a, s]) - } - for (l = 0; l < r.length && !c.isPropagationStopped(); l++)m = r[l][0], c.type = r[l][1], q = (f._data(m, "events") || {})[c.type] && f._data(m, "handle"), q && q.apply(m, d), q = o && m[o], q && f.acceptData(m) && q.apply(m, d) === !1 && c.preventDefault(); - c.type = h, !g && !c.isDefaultPrevented() && (!p._default || p._default.apply(e.ownerDocument, d) === !1) && (h !== "click" || !f.nodeName(e, "a")) && f.acceptData(e) && o && e[h] && (h !== "focus" && h !== "blur" || c.target.offsetWidth !== 0) && !f.isWindow(e) && (n = e[o], n && (e[o] = null), f.event.triggered = h, e[h](), f.event.triggered = b, n && (e[o] = n)); - return c.result - } - }, dispatch: function (c) { - c = f.event.fix(c || a.event); - var d = (f._data(this, "events") || {})[c.type] || [], e = d.delegateCount, g = [].slice.call(arguments, 0), h = !c.exclusive && !c.namespace, i = [], j, k, l, m, n, o, p, q, r, s, t; - g[0] = c, c.delegateTarget = this; - if (e && !c.target.disabled && (!c.button || c.type !== "click")) { - m = f(this), m.context = this.ownerDocument || this; - for (l = c.target; l != this; l = l.parentNode || this) { - o = {}, q = [], m[0] = l; - for (j = 0; j < e; j++)r = d[j], s = r.selector, o[s] === b && (o[s] = r.quick ? H(l, r.quick) : m.is(s)), o[s] && q.push(r); - q.length && i.push({elem: l, matches: q}) - } - } - d.length > e && i.push({elem: this, matches: d.slice(e)}); - for (j = 0; j < i.length && !c.isPropagationStopped(); j++) { - p = i[j], c.currentTarget = p.elem; - for (k = 0; k < p.matches.length && !c.isImmediatePropagationStopped(); k++) { - r = p.matches[k]; - if (h || !c.namespace && !r.namespace || c.namespace_re && c.namespace_re.test(r.namespace))c.data = r.data, c.handleObj = r, n = ((f.event.special[r.origType] || {}).handle || r.handler).apply(p.elem, g), n !== b && (c.result = n, n === !1 && (c.preventDefault(), c.stopPropagation())) - } - } - return c.result - }, props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: {props: "char charCode key keyCode".split(" "), filter: function (a, b) { - a.which == null && (a.which = b.charCode != null ? b.charCode : b.keyCode); - return a - }}, mouseHooks: {props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function (a, d) { - var e, f, g, h = d.button, i = d.fromElement; - a.pageX == null && d.clientX != null && (e = a.target.ownerDocument || c, f = e.documentElement, g = e.body, a.pageX = d.clientX + (f && f.scrollLeft || g && g.scrollLeft || 0) - (f && f.clientLeft || g && g.clientLeft || 0), a.pageY = d.clientY + (f && f.scrollTop || g && g.scrollTop || 0) - (f && f.clientTop || g && g.clientTop || 0)), !a.relatedTarget && i && (a.relatedTarget = i === a.target ? d.toElement : i), !a.which && h !== b && (a.which = h & 1 ? 1 : h & 2 ? 3 : h & 4 ? 2 : 0); - return a - }}, fix: function (a) { - if (a[f.expando])return a; - var d, e, g = a, h = f.event.fixHooks[a.type] || {}, i = h.props ? this.props.concat(h.props) : this.props; - a = f.Event(g); - for (d = i.length; d;)e = i[--d], a[e] = g[e]; - a.target || (a.target = g.srcElement || c), a.target.nodeType === 3 && (a.target = a.target.parentNode), a.metaKey === b && (a.metaKey = a.ctrlKey); - return h.filter ? h.filter(a, g) : a - }, special: {ready: {setup: f.bindReady}, load: {noBubble: !0}, focus: {delegateType: "focusin"}, blur: {delegateType: "focusout"}, beforeunload: {setup: function (a, b, c) { - f.isWindow(this) && (this.onbeforeunload = c) - }, teardown: function (a, b) { - this.onbeforeunload === b && (this.onbeforeunload = null) - }}}, simulate: function (a, b, c, d) { - var e = f.extend(new f.Event, c, {type: a, isSimulated: !0, originalEvent: {}}); - d ? f.event.trigger(e, null, b) : f.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault() - }}, f.event.handle = f.event.dispatch, f.removeEvent = c.removeEventListener ? function (a, b, c) { - a.removeEventListener && a.removeEventListener(b, c, !1) - } : function (a, b, c) { - a.detachEvent && a.detachEvent("on" + b, c) - }, f.Event = function (a, b) { - if (!(this instanceof f.Event))return new f.Event(a, b); - a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? K : J) : this.type = a, b && f.extend(this, b), this.timeStamp = a && a.timeStamp || f.now(), this[f.expando] = !0 - }, f.Event.prototype = {preventDefault: function () { - this.isDefaultPrevented = K; - var a = this.originalEvent; - !a || (a.preventDefault ? a.preventDefault() : a.returnValue = !1) - }, stopPropagation: function () { - this.isPropagationStopped = K; - var a = this.originalEvent; - !a || (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0) - }, stopImmediatePropagation: function () { - this.isImmediatePropagationStopped = K, this.stopPropagation() - }, isDefaultPrevented: J, isPropagationStopped: J, isImmediatePropagationStopped: J}, f.each({mouseenter: "mouseover", mouseleave: "mouseout"}, function (a, b) { - f.event.special[a] = {delegateType: b, bindType: b, handle: function (a) { - var c = this, d = a.relatedTarget, e = a.handleObj, g = e.selector, h; - if (!d || d !== c && !f.contains(c, d))a.type = e.origType, h = e.handler.apply(this, arguments), a.type = b; - return h - }} - }), f.support.submitBubbles || (f.event.special.submit = {setup: function () { - if (f.nodeName(this, "form"))return!1; - f.event.add(this, "click._submit keypress._submit", function (a) { - var c = a.target, d = f.nodeName(c, "input") || f.nodeName(c, "button") ? c.form : b; - d && !d._submit_attached && (f.event.add(d, "submit._submit", function (a) { - this.parentNode && !a.isTrigger && f.event.simulate("submit", this.parentNode, a, !0) - }), d._submit_attached = !0) - }) - }, teardown: function () { - if (f.nodeName(this, "form"))return!1; - f.event.remove(this, "._submit") - }}), f.support.changeBubbles || (f.event.special.change = {setup: function () { - if (z.test(this.nodeName)) { - if (this.type === "checkbox" || this.type === "radio")f.event.add(this, "propertychange._change", function (a) { - a.originalEvent.propertyName === "checked" && (this._just_changed = !0) - }), f.event.add(this, "click._change", function (a) { - this._just_changed && !a.isTrigger && (this._just_changed = !1, f.event.simulate("change", this, a, !0)) - }); - return!1 - } - f.event.add(this, "beforeactivate._change", function (a) { - var b = a.target; - z.test(b.nodeName) && !b._change_attached && (f.event.add(b, "change._change", function (a) { - this.parentNode && !a.isSimulated && !a.isTrigger && f.event.simulate("change", this.parentNode, a, !0) - }), b._change_attached = !0) - }) - }, handle: function (a) { - var b = a.target; - if (this !== b || a.isSimulated || a.isTrigger || b.type !== "radio" && b.type !== "checkbox")return a.handleObj.handler.apply(this, arguments) - }, teardown: function () { - f.event.remove(this, "._change"); - return z.test(this.nodeName) - }}), f.support.focusinBubbles || f.each({focus: "focusin", blur: "focusout"}, function (a, b) { - var d = 0, e = function (a) { - f.event.simulate(b, a.target, f.event.fix(a), !0) - }; - f.event.special[b] = {setup: function () { - d++ === 0 && c.addEventListener(a, e, !0) - }, teardown: function () { - --d === 0 && c.removeEventListener(a, e, !0) - }} - }), f.fn.extend({on: function (a, c, d, e, g) { - var h, i; - if (typeof a == "object") { - typeof c != "string" && (d = c, c = b); - for (i in a)this.on(i, c, d, a[i], g); - return this - } - d == null && e == null ? (e = c, d = c = b) : e == null && (typeof c == "string" ? (e = d, d = b) : (e = d, d = c, c = b)); - if (e === !1)e = J; else if (!e)return this; - g === 1 && (h = e, e = function (a) { - f().off(a); - return h.apply(this, arguments) - }, e.guid = h.guid || (h.guid = f.guid++)); - return this.each(function () { - f.event.add(this, a, e, d, c) - }) - }, one: function (a, b, c, d) { - return this.on.call(this, a, b, c, d, 1) - }, off: function (a, c, d) { - if (a && a.preventDefault && a.handleObj) { - var e = a.handleObj; - f(a.delegateTarget).off(e.namespace ? e.type + "." + e.namespace : e.type, e.selector, e.handler); - return this - } - if (typeof a == "object") { - for (var g in a)this.off(g, c, a[g]); - return this - } - if (c === !1 || typeof c == "function")d = c, c = b; - d === !1 && (d = J); - return this.each(function () { - f.event.remove(this, a, d, c) - }) - }, bind: function (a, b, c) { - return this.on(a, null, b, c) - }, unbind: function (a, b) { - return this.off(a, null, b) - }, live: function (a, b, c) { - f(this.context).on(a, this.selector, b, c); - return this - }, die: function (a, b) { - f(this.context).off(a, this.selector || "**", b); - return this - }, delegate: function (a, b, c, d) { - return this.on(b, a, c, d) - }, undelegate: function (a, b, c) { - return arguments.length == 1 ? this.off(a, "**") : this.off(b, a, c) - }, trigger: function (a, b) { - return this.each(function () { - f.event.trigger(a, b, this) - }) - }, triggerHandler: function (a, b) { - if (this[0])return f.event.trigger(a, b, this[0], !0) - }, toggle: function (a) { - var b = arguments, c = a.guid || f.guid++, d = 0, e = function (c) { - var e = (f._data(this, "lastToggle" + a.guid) || 0) % d; - f._data(this, "lastToggle" + a.guid, e + 1), c.preventDefault(); - return b[e].apply(this, arguments) || !1 - }; - e.guid = c; - while (d < b.length)b[d++].guid = c; - return this.click(e) - }, hover: function (a, b) { - return this.mouseenter(a).mouseleave(b || a) - }}), f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (a, b) { - f.fn[b] = function (a, c) { - c == null && (c = a, a = null); - return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b) - }, f.attrFn && (f.attrFn[b] = !0), C.test(b) && (f.event.fixHooks[b] = f.event.keyHooks), D.test(b) && (f.event.fixHooks[b] = f.event.mouseHooks) - }), function () { - function x(a, b, c, e, f, g) { - for (var h = 0, i = e.length; h < i; h++) { - var j = e[h]; - if (j) { - var k = !1; - j = j[a]; - while (j) { - if (j[d] === c) { - k = e[j.sizset]; - break - } - if (j.nodeType === 1) { - g || (j[d] = c, j.sizset = h); - if (typeof b != "string") { - if (j === b) { - k = !0; - break - } - } else if (m.filter(b, [j]).length > 0) { - k = j; - break - } - } - j = j[a] - } - e[h] = k - } - } - } - - function w(a, b, c, e, f, g) { - for (var h = 0, i = e.length; h < i; h++) { - var j = e[h]; - if (j) { - var k = !1; - j = j[a]; - while (j) { - if (j[d] === c) { - k = e[j.sizset]; - break - } - j.nodeType === 1 && !g && (j[d] = c, j.sizset = h); - if (j.nodeName.toLowerCase() === b) { - k = j; - break - } - j = j[a] - } - e[h] = k - } - } - } - - var a = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, d = "sizcache" + (Math.random() + "").replace(".", ""), e = 0, g = Object.prototype.toString, h = !1, i = !0, j = /\\/g, k = /\r\n/g, l = /\W/; - [0, 0].sort(function () { - i = !1; - return 0 - }); - var m = function (b, d, e, f) { - e = e || [], d = d || c; - var h = d; - if (d.nodeType !== 1 && d.nodeType !== 9)return[]; - if (!b || typeof b != "string")return e; - var i, j, k, l, n, q, r, t, u = !0, v = m.isXML(d), w = [], x = b; - do { - a.exec(""), i = a.exec(x); - if (i) { - x = i[3], w.push(i[1]); - if (i[2]) { - l = i[3]; - break - } - } - } while (i); - if (w.length > 1 && p.exec(b))if (w.length === 2 && o.relative[w[0]])j = y(w[0] + w[1], d, f); else { - j = o.relative[w[0]] ? [d] : m(w.shift(), d); - while (w.length)b = w.shift(), o.relative[b] && (b += w.shift()), j = y(b, j, f) - } else { - !f && w.length > 1 && d.nodeType === 9 && !v && o.match.ID.test(w[0]) && !o.match.ID.test(w[w.length - 1]) && (n = m.find(w.shift(), d, v), d = n.expr ? m.filter(n.expr, n.set)[0] : n.set[0]); - if (d) { - n = f ? {expr: w.pop(), set: s(f)} : m.find(w.pop(), w.length === 1 && (w[0] === "~" || w[0] === "+") && d.parentNode ? d.parentNode : d, v), j = n.expr ? m.filter(n.expr, n.set) : n.set, w.length > 0 ? k = s(j) : u = !1; - while (w.length)q = w.pop(), r = q, o.relative[q] ? r = w.pop() : q = "", r == null && (r = d), o.relative[q](k, r, v) - } else k = w = [] - } - k || (k = j), k || m.error(q || b); - if (g.call(k) === "[object Array]")if (!u)e.push.apply(e, k); else if (d && d.nodeType === 1)for (t = 0; k[t] != null; t++)k[t] && (k[t] === !0 || k[t].nodeType === 1 && m.contains(d, k[t])) && e.push(j[t]); else for (t = 0; k[t] != null; t++)k[t] && k[t].nodeType === 1 && e.push(j[t]); else s(k, e); - l && (m(l, h, e, f), m.uniqueSort(e)); - return e - }; - m.uniqueSort = function (a) { - if (u) { - h = i, a.sort(u); - if (h)for (var b = 1; b < a.length; b++)a[b] === a[b - 1] && a.splice(b--, 1) - } - return a - }, m.matches = function (a, b) { - return m(a, null, null, b) - }, m.matchesSelector = function (a, b) { - return m(b, null, null, [a]).length > 0 - }, m.find = function (a, b, c) { - var d, e, f, g, h, i; - if (!a)return[]; - for (e = 0, f = o.order.length; e < f; e++) { - h = o.order[e]; - if (g = o.leftMatch[h].exec(a)) { - i = g[1], g.splice(1, 1); - if (i.substr(i.length - 1) !== "\\") { - g[1] = (g[1] || "").replace(j, ""), d = o.find[h](g, b, c); - if (d != null) { - a = a.replace(o.match[h], ""); - break - } - } - } - } - d || (d = typeof b.getElementsByTagName != "undefined" ? b.getElementsByTagName("*") : []); - return{set: d, expr: a} - }, m.filter = function (a, c, d, e) { - var f, g, h, i, j, k, l, n, p, q = a, r = [], s = c, t = c && c[0] && m.isXML(c[0]); - while (a && c.length) { - for (h in o.filter)if ((f = o.leftMatch[h].exec(a)) != null && f[2]) { - k = o.filter[h], l = f[1], g = !1, f.splice(1, 1); - if (l.substr(l.length - 1) === "\\")continue; - s === r && (r = []); - if (o.preFilter[h]) { - f = o.preFilter[h](f, s, d, r, e, t); - if (!f)g = i = !0; else if (f === !0)continue - } - if (f)for (n = 0; (j = s[n]) != null; n++)j && (i = k(j, f, n, s), p = e ^ i, d && i != null ? p ? g = !0 : s[n] = !1 : p && (r.push(j), g = !0)); - if (i !== b) { - d || (s = r), a = a.replace(o.match[h], ""); - if (!g)return[]; - break - } - } - if (a === q)if (g == null)m.error(a); else break; - q = a - } - return s - }, m.error = function (a) { - throw new Error("Syntax error, unrecognized expression: " + a) - }; - var n = m.getText = function (a) { - var b, c, d = a.nodeType, e = ""; - if (d) { - if (d === 1 || d === 9) { - if (typeof a.textContent == "string")return a.textContent; - if (typeof a.innerText == "string")return a.innerText.replace(k, ""); - for (a = a.firstChild; a; a = a.nextSibling)e += n(a) - } else if (d === 3 || d === 4)return a.nodeValue - } else for (b = 0; c = a[b]; b++)c.nodeType !== 8 && (e += n(c)); - return e - }, o = m.selectors = {order: ["ID", "NAME", "TAG"], match: {ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/}, leftMatch: {}, attrMap: {"class": "className", "for": "htmlFor"}, attrHandle: {href: function (a) { - return a.getAttribute("href") - }, type: function (a) { - return a.getAttribute("type") - }}, relative: {"+": function (a, b) { - var c = typeof b == "string", d = c && !l.test(b), e = c && !d; - d && (b = b.toLowerCase()); - for (var f = 0, g = a.length, h; f < g; f++)if (h = a[f]) { - while ((h = h.previousSibling) && h.nodeType !== 1); - a[f] = e || h && h.nodeName.toLowerCase() === b ? h || !1 : h === b - } - e && m.filter(b, a, !0) - }, ">": function (a, b) { - var c, d = typeof b == "string", e = 0, f = a.length; - if (d && !l.test(b)) { - b = b.toLowerCase(); - for (; e < f; e++) { - c = a[e]; - if (c) { - var g = c.parentNode; - a[e] = g.nodeName.toLowerCase() === b ? g : !1 - } - } - } else { - for (; e < f; e++)c = a[e], c && (a[e] = d ? c.parentNode : c.parentNode === b); - d && m.filter(b, a, !0) - } - }, "": function (a, b, c) { - var d, f = e++, g = x; - typeof b == "string" && !l.test(b) && (b = b.toLowerCase(), d = b, g = w), g("parentNode", b, f, a, d, c) - }, "~": function (a, b, c) { - var d, f = e++, g = x; - typeof b == "string" && !l.test(b) && (b = b.toLowerCase(), d = b, g = w), g("previousSibling", b, f, a, d, c) - }}, find: {ID: function (a, b, c) { - if (typeof b.getElementById != "undefined" && !c) { - var d = b.getElementById(a[1]); - return d && d.parentNode ? [d] : [] - } - }, NAME: function (a, b) { - if (typeof b.getElementsByName != "undefined") { - var c = [], d = b.getElementsByName(a[1]); - for (var e = 0, f = d.length; e < f; e++)d[e].getAttribute("name") === a[1] && c.push(d[e]); - return c.length === 0 ? null : c - } - }, TAG: function (a, b) { - if (typeof b.getElementsByTagName != "undefined")return b.getElementsByTagName(a[1]) - }}, preFilter: {CLASS: function (a, b, c, d, e, f) { - a = " " + a[1].replace(j, "") + " "; - if (f)return a; - for (var g = 0, h; (h = b[g]) != null; g++)h && (e ^ (h.className && (" " + h.className + " ").replace(/[\t\n\r]/g, " ").indexOf(a) >= 0) ? c || d.push(h) : c && (b[g] = !1)); - return!1 - }, ID: function (a) { - return a[1].replace(j, "") - }, TAG: function (a, b) { - return a[1].replace(j, "").toLowerCase() - }, CHILD: function (a) { - if (a[1] === "nth") { - a[2] || m.error(a[0]), a[2] = a[2].replace(/^\+|\s*/g, ""); - var b = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2] === "even" && "2n" || a[2] === "odd" && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]); - a[2] = b[1] + (b[2] || 1) - 0, a[3] = b[3] - 0 - } else a[2] && m.error(a[0]); - a[0] = e++; - return a - }, ATTR: function (a, b, c, d, e, f) { - var g = a[1] = a[1].replace(j, ""); - !f && o.attrMap[g] && (a[1] = o.attrMap[g]), a[4] = (a[4] || a[5] || "").replace(j, ""), a[2] === "~=" && (a[4] = " " + a[4] + " "); - return a - }, PSEUDO: function (b, c, d, e, f) { - if (b[1] === "not")if ((a.exec(b[3]) || "").length > 1 || /^\w/.test(b[3]))b[3] = m(b[3], null, null, c); else { - var g = m.filter(b[3], c, d, !0 ^ f); - d || e.push.apply(e, g); - return!1 - } else if (o.match.POS.test(b[0]) || o.match.CHILD.test(b[0]))return!0; - return b - }, POS: function (a) { - a.unshift(!0); - return a - }}, filters: {enabled: function (a) { - return a.disabled === !1 && a.type !== "hidden" - }, disabled: function (a) { - return a.disabled === !0 - }, checked: function (a) { - return a.checked === !0 - }, selected: function (a) { - a.parentNode && a.parentNode.selectedIndex; - return a.selected === !0 - }, parent: function (a) { - return!!a.firstChild - }, empty: function (a) { - return!a.firstChild - }, has: function (a, b, c) { - return!!m(c[3], a).length - }, header: function (a) { - return/h\d/i.test(a.nodeName) - }, text: function (a) { - var b = a.getAttribute("type"), c = a.type; - return a.nodeName.toLowerCase() === "input" && "text" === c && (b === c || b === null) - }, radio: function (a) { - return a.nodeName.toLowerCase() === "input" && "radio" === a.type - }, checkbox: function (a) { - return a.nodeName.toLowerCase() === "input" && "checkbox" === a.type - }, file: function (a) { - return a.nodeName.toLowerCase() === "input" && "file" === a.type - }, password: function (a) { - return a.nodeName.toLowerCase() === "input" && "password" === a.type - }, submit: function (a) { - var b = a.nodeName.toLowerCase(); - return(b === "input" || b === "button") && "submit" === a.type - }, image: function (a) { - return a.nodeName.toLowerCase() === "input" && "image" === a.type - }, reset: function (a) { - var b = a.nodeName.toLowerCase(); - return(b === "input" || b === "button") && "reset" === a.type - }, button: function (a) { - var b = a.nodeName.toLowerCase(); - return b === "input" && "button" === a.type || b === "button" - }, input: function (a) { - return/input|select|textarea|button/i.test(a.nodeName) - }, focus: function (a) { - return a === a.ownerDocument.activeElement - }}, setFilters: {first: function (a, b) { - return b === 0 - }, last: function (a, b, c, d) { - return b === d.length - 1 - }, even: function (a, b) { - return b % 2 === 0 - }, odd: function (a, b) { - return b % 2 === 1 - }, lt: function (a, b, c) { - return b < c[3] - 0 - }, gt: function (a, b, c) { - return b > c[3] - 0 - }, nth: function (a, b, c) { - return c[3] - 0 === b - }, eq: function (a, b, c) { - return c[3] - 0 === b - }}, filter: {PSEUDO: function (a, b, c, d) { - var e = b[1], f = o.filters[e]; - if (f)return f(a, c, b, d); - if (e === "contains")return(a.textContent || a.innerText || n([a]) || "").indexOf(b[3]) >= 0; - if (e === "not") { - var g = b[3]; - for (var h = 0, i = g.length; h < i; h++)if (g[h] === a)return!1; - return!0 - } - m.error(e) - }, CHILD: function (a, b) { - var c, e, f, g, h, i, j, k = b[1], l = a; - switch (k) { - case"only": - case"first": - while (l = l.previousSibling)if (l.nodeType === 1)return!1; - if (k === "first")return!0; - l = a; - case"last": - while (l = l.nextSibling)if (l.nodeType === 1)return!1; - return!0; - case"nth": - c = b[2], e = b[3]; - if (c === 1 && e === 0)return!0; - f = b[0], g = a.parentNode; - if (g && (g[d] !== f || !a.nodeIndex)) { - i = 0; - for (l = g.firstChild; l; l = l.nextSibling)l.nodeType === 1 && (l.nodeIndex = ++i); - g[d] = f - } - j = a.nodeIndex - e; - return c === 0 ? j === 0 : j % c === 0 && j / c >= 0 - } - }, ID: function (a, b) { - return a.nodeType === 1 && a.getAttribute("id") === b - }, TAG: function (a, b) { - return b === "*" && a.nodeType === 1 || !!a.nodeName && a.nodeName.toLowerCase() === b - }, CLASS: function (a, b) { - return(" " + (a.className || a.getAttribute("class")) + " ").indexOf(b) > -1 - }, ATTR: function (a, b) { - var c = b[1], d = m.attr ? m.attr(a, c) : o.attrHandle[c] ? o.attrHandle[c](a) : a[c] != null ? a[c] : a.getAttribute(c), e = d + "", f = b[2], g = b[4]; - return d == null ? f === "!=" : !f && m.attr ? d != null : f === "=" ? e === g : f === "*=" ? e.indexOf(g) >= 0 : f === "~=" ? (" " + e + " ").indexOf(g) >= 0 : g ? f === "!=" ? e !== g : f === "^=" ? e.indexOf(g) === 0 : f === "$=" ? e.substr(e.length - g.length) === g : f === "|=" ? e === g || e.substr(0, g.length + 1) === g + "-" : !1 : e && d !== !1 - }, POS: function (a, b, c, d) { - var e = b[2], f = o.setFilters[e]; - if (f)return f(a, c, b, d) - }}}, p = o.match.POS, q = function (a, b) { - return"\\" + (b - 0 + 1) - }; - for (var r in o.match)o.match[r] = new RegExp(o.match[r].source + /(?![^\[]*\])(?![^\(]*\))/.source), o.leftMatch[r] = new RegExp(/(^(?:.|\r|\n)*?)/.source + o.match[r].source.replace(/\\(\d+)/g, q)); - var s = function (a, b) { - a = Array.prototype.slice.call(a, 0); - if (b) { - b.push.apply(b, a); - return b - } - return a - }; - try { - Array.prototype.slice.call(c.documentElement.childNodes, 0)[0].nodeType - } catch (t) { - s = function (a, b) { - var c = 0, d = b || []; - if (g.call(a) === "[object Array]")Array.prototype.push.apply(d, a); else if (typeof a.length == "number")for (var e = a.length; c < e; c++)d.push(a[c]); else for (; a[c]; c++)d.push(a[c]); - return d - } - } - var u, v; - c.documentElement.compareDocumentPosition ? u = function (a, b) { - if (a === b) { - h = !0; - return 0 - } - if (!a.compareDocumentPosition || !b.compareDocumentPosition)return a.compareDocumentPosition ? -1 : 1; - return a.compareDocumentPosition(b) & 4 ? -1 : 1 - } : (u = function (a, b) { - if (a === b) { - h = !0; - return 0 - } - if (a.sourceIndex && b.sourceIndex)return a.sourceIndex - b.sourceIndex; - var c, d, e = [], f = [], g = a.parentNode, i = b.parentNode, j = g; - if (g === i)return v(a, b); - if (!g)return-1; - if (!i)return 1; - while (j)e.unshift(j), j = j.parentNode; - j = i; - while (j)f.unshift(j), j = j.parentNode; - c = e.length, d = f.length; - for (var k = 0; k < c && k < d; k++)if (e[k] !== f[k])return v(e[k], f[k]); - return k === c ? v(a, f[k], -1) : v(e[k], b, 1) - }, v = function (a, b, c) { - if (a === b)return c; - var d = a.nextSibling; - while (d) { - if (d === b)return-1; - d = d.nextSibling - } - return 1 - }), function () { - var a = c.createElement("div"), d = "script" + (new Date).getTime(), e = c.documentElement; - a.innerHTML = "<a name='" + d + "'/>", e.insertBefore(a, e.firstChild), c.getElementById(d) && (o.find.ID = function (a, c, d) { - if (typeof c.getElementById != "undefined" && !d) { - var e = c.getElementById(a[1]); - return e ? e.id === a[1] || typeof e.getAttributeNode != "undefined" && e.getAttributeNode("id").nodeValue === a[1] ? [e] : b : [] - } - }, o.filter.ID = function (a, b) { - var c = typeof a.getAttributeNode != "undefined" && a.getAttributeNode("id"); - return a.nodeType === 1 && c && c.nodeValue === b - }), e.removeChild(a), e = a = null - }(), function () { - var a = c.createElement("div"); - a.appendChild(c.createComment("")), a.getElementsByTagName("*").length > 0 && (o.find.TAG = function (a, b) { - var c = b.getElementsByTagName(a[1]); - if (a[1] === "*") { - var d = []; - for (var e = 0; c[e]; e++)c[e].nodeType === 1 && d.push(c[e]); - c = d - } - return c - }), a.innerHTML = "<a href='#'></a>", a.firstChild && typeof a.firstChild.getAttribute != "undefined" && a.firstChild.getAttribute("href") !== "#" && (o.attrHandle.href = function (a) { - return a.getAttribute("href", 2) - }), a = null - }(), c.querySelectorAll && function () { - var a = m, b = c.createElement("div"), d = "__sizzle__"; - b.innerHTML = "<p class='TEST'></p>"; - if (!b.querySelectorAll || b.querySelectorAll(".TEST").length !== 0) { - m = function (b, e, f, g) { - e = e || c; - if (!g && !m.isXML(e)) { - var h = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b); - if (h && (e.nodeType === 1 || e.nodeType === 9)) { - if (h[1])return s(e.getElementsByTagName(b), f); - if (h[2] && o.find.CLASS && e.getElementsByClassName)return s(e.getElementsByClassName(h[2]), f) - } - if (e.nodeType === 9) { - if (b === "body" && e.body)return s([e.body], f); - if (h && h[3]) { - var i = e.getElementById(h[3]); - if (!i || !i.parentNode)return s([], f); - if (i.id === h[3])return s([i], f) - } - try { - return s(e.querySelectorAll(b), f) - } catch (j) { - } - } else if (e.nodeType === 1 && e.nodeName.toLowerCase() !== "object") { - var k = e, l = e.getAttribute("id"), n = l || d, p = e.parentNode, q = /^\s*[+~]/.test(b); - l ? n = n.replace(/'/g, "\\$&") : e.setAttribute("id", n), q && p && (e = e.parentNode); - try { - if (!q || p)return s(e.querySelectorAll("[id='" + n + "'] " + b), f) - } catch (r) { - } finally { - l || k.removeAttribute("id") - } - } - } - return a(b, e, f, g) - }; - for (var e in a)m[e] = a[e]; - b = null - } - }(), function () { - var a = c.documentElement, b = a.matchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || a.msMatchesSelector; - if (b) { - var d = !b.call(c.createElement("div"), "div"), e = !1; - try { - b.call(c.documentElement, "[test!='']:sizzle") - } catch (f) { - e = !0 - } - m.matchesSelector = function (a, c) { - c = c.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - if (!m.isXML(a))try { - if (e || !o.match.PSEUDO.test(c) && !/!=/.test(c)) { - var f = b.call(a, c); - if (f || !d || a.document && a.document.nodeType !== 11)return f - } - } catch (g) { - } - return m(c, null, null, [a]).length > 0 - } - } - }(), function () { - var a = c.createElement("div"); - a.innerHTML = "<div class='test e'></div><div class='test'></div>"; - if (!!a.getElementsByClassName && a.getElementsByClassName("e").length !== 0) { - a.lastChild.className = "e"; - if (a.getElementsByClassName("e").length === 1)return; - o.order.splice(1, 0, "CLASS"), o.find.CLASS = function (a, b, c) { - if (typeof b.getElementsByClassName != "undefined" && !c)return b.getElementsByClassName(a[1]) - }, a = null - } - }(), c.documentElement.contains ? m.contains = function (a, b) { - return a !== b && (a.contains ? a.contains(b) : !0) - } : c.documentElement.compareDocumentPosition ? m.contains = function (a, b) { - return!!(a.compareDocumentPosition(b) & 16) - } : m.contains = function () { - return!1 - }, m.isXML = function (a) { - var b = (a ? a.ownerDocument || a : 0).documentElement; - return b ? b.nodeName !== "HTML" : !1 - }; - var y = function (a, b, c) { - var d, e = [], f = "", g = b.nodeType ? [b] : b; - while (d = o.match.PSEUDO.exec(a))f += d[0], a = a.replace(o.match.PSEUDO, ""); - a = o.relative[a] ? a + "*" : a; - for (var h = 0, i = g.length; h < i; h++)m(a, g[h], e, c); - return m.filter(f, e) - }; - m.attr = f.attr, m.selectors.attrMap = {}, f.find = m, f.expr = m.selectors, f.expr[":"] = f.expr.filters, f.unique = m.uniqueSort, f.text = m.getText, f.isXMLDoc = m.isXML, f.contains = m.contains - }(); - var L = /Until$/, M = /^(?:parents|prevUntil|prevAll)/, N = /,/, O = /^.[^:#\[\.,]*$/, P = Array.prototype.slice, Q = f.expr.match.POS, R = {children: !0, contents: !0, next: !0, prev: !0}; - f.fn.extend({find: function (a) { - var b = this, c, d; - if (typeof a != "string")return f(a).filter(function () { - for (c = 0, d = b.length; c < d; c++)if (f.contains(b[c], this))return!0 - }); - var e = this.pushStack("", "find", a), g, h, i; - for (c = 0, d = this.length; c < d; c++) { - g = e.length, f.find(a, this[c], e); - if (c > 0)for (h = g; h < e.length; h++)for (i = 0; i < g; i++)if (e[i] === e[h]) { - e.splice(h--, 1); - break - } - } - return e - }, has: function (a) { - var b = f(a); - return this.filter(function () { - for (var a = 0, c = b.length; a < c; a++)if (f.contains(this, b[a]))return!0 - }) - }, not: function (a) { - return this.pushStack(T(this, a, !1), "not", a) - }, filter: function (a) { - return this.pushStack(T(this, a, !0), "filter", a) - }, is: function (a) { - return!!a && (typeof a == "string" ? Q.test(a) ? f(a, this.context).index(this[0]) >= 0 : f.filter(a, this).length > 0 : this.filter(a).length > 0) - }, closest: function (a, b) { - var c = [], d, e, g = this[0]; - if (f.isArray(a)) { - var h = 1; - while (g && g.ownerDocument && g !== b) { - for (d = 0; d < a.length; d++)f(g).is(a[d]) && c.push({selector: a[d], elem: g, level: h}); - g = g.parentNode, h++ - } - return c - } - var i = Q.test(a) || typeof a != "string" ? f(a, b || this.context) : 0; - for (d = 0, e = this.length; d < e; d++) { - g = this[d]; - while (g) { - if (i ? i.index(g) > -1 : f.find.matchesSelector(g, a)) { - c.push(g); - break - } - g = g.parentNode; - if (!g || !g.ownerDocument || g === b || g.nodeType === 11)break - } - } - c = c.length > 1 ? f.unique(c) : c; - return this.pushStack(c, "closest", a) - }, index: function (a) { - if (!a)return this[0] && this[0].parentNode ? this.prevAll().length : -1; - if (typeof a == "string")return f.inArray(this[0], f(a)); - return f.inArray(a.jquery ? a[0] : a, this) - }, add: function (a, b) { - var c = typeof a == "string" ? f(a, b) : f.makeArray(a && a.nodeType ? [a] : a), d = f.merge(this.get(), c); - return this.pushStack(S(c[0]) || S(d[0]) ? d : f.unique(d)) - }, andSelf: function () { - return this.add(this.prevObject) - }}), f.each({parent: function (a) { - var b = a.parentNode; - return b && b.nodeType !== 11 ? b : null - }, parents: function (a) { - return f.dir(a, "parentNode") - }, parentsUntil: function (a, b, c) { - return f.dir(a, "parentNode", c) - }, next: function (a) { - return f.nth(a, 2, "nextSibling") - }, prev: function (a) { - return f.nth(a, 2, "previousSibling") - }, nextAll: function (a) { - return f.dir(a, "nextSibling") - }, prevAll: function (a) { - return f.dir(a, "previousSibling") - }, nextUntil: function (a, b, c) { - return f.dir(a, "nextSibling", c) - }, prevUntil: function (a, b, c) { - return f.dir(a, "previousSibling", c) - }, siblings: function (a) { - return f.sibling(a.parentNode.firstChild, a) - }, children: function (a) { - return f.sibling(a.firstChild) - }, contents: function (a) { - return f.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : f.makeArray(a.childNodes) - }}, function (a, b) { - f.fn[a] = function (c, d) { - var e = f.map(this, b, c); - L.test(a) || (d = c), d && typeof d == "string" && (e = f.filter(d, e)), e = this.length > 1 && !R[a] ? f.unique(e) : e, (this.length > 1 || N.test(d)) && M.test(a) && (e = e.reverse()); - return this.pushStack(e, a, P.call(arguments).join(",")) - } - }), f.extend({filter: function (a, b, c) { - c && (a = ":not(" + a + ")"); - return b.length === 1 ? f.find.matchesSelector(b[0], a) ? [b[0]] : [] : f.find.matches(a, b) - }, dir: function (a, c, d) { - var e = [], g = a[c]; - while (g && g.nodeType !== 9 && (d === b || g.nodeType !== 1 || !f(g).is(d)))g.nodeType === 1 && e.push(g), g = g[c]; - return e - }, nth: function (a, b, c, d) { - b = b || 1; - var e = 0; - for (; a; a = a[c])if (a.nodeType === 1 && ++e === b)break; - return a - }, sibling: function (a, b) { - var c = []; - for (; a; a = a.nextSibling)a.nodeType === 1 && a !== b && c.push(a); - return c - }}); - var V = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", W = / jQuery\d+="(?:\d+|null)"/g, X = /^\s+/, Y = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, Z = /<([\w:]+)/, $ = /<tbody/i, _ = /<|&#?\w+;/, ba = /<(?:script|style)/i, bb = /<(?:script|object|embed|option|style)/i, bc = new RegExp("<(?:" + V + ")", "i"), bd = /checked\s*(?:[^=]|=\s*.checked.)/i, be = /\/(java|ecma)script/i, bf = /^\s*<!(?:\[CDATA\[|\-\-)/, bg = {option: [1, "<select multiple='multiple'>", "</select>"], legend: [1, "<fieldset>", "</fieldset>"], thead: [1, "<table>", "</table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"], area: [1, "<map>", "</map>"], _default: [0, "", ""]}, bh = U(c); - bg.optgroup = bg.option, bg.tbody = bg.tfoot = bg.colgroup = bg.caption = bg.thead, bg.th = bg.td, f.support.htmlSerialize || (bg._default = [1, "div<div>", "</div>"]), f.fn.extend({text: function (a) { - if (f.isFunction(a))return this.each(function (b) { - var c = f(this); - c.text(a.call(this, b, c.text())) - }); - if (typeof a != "object" && a !== b)return this.empty().append((this[0] && this[0].ownerDocument || c).createTextNode(a)); - return f.text(this) - }, wrapAll: function (a) { - if (f.isFunction(a))return this.each(function (b) { - f(this).wrapAll(a.call(this, b)) - }); - if (this[0]) { - var b = f(a, this[0].ownerDocument).eq(0).clone(!0); - this[0].parentNode && b.insertBefore(this[0]), b.map(function () { - var a = this; - while (a.firstChild && a.firstChild.nodeType === 1)a = a.firstChild; - return a - }).append(this) - } - return this - }, wrapInner: function (a) { - if (f.isFunction(a))return this.each(function (b) { - f(this).wrapInner(a.call(this, b)) - }); - return this.each(function () { - var b = f(this), c = b.contents(); - c.length ? c.wrapAll(a) : b.append(a) - }) - }, wrap: function (a) { - var b = f.isFunction(a); - return this.each(function (c) { - f(this).wrapAll(b ? a.call(this, c) : a) - }) - }, unwrap: function () { - return this.parent().each(function () { - f.nodeName(this, "body") || f(this).replaceWith(this.childNodes) - }).end() - }, append: function () { - return this.domManip(arguments, !0, function (a) { - this.nodeType === 1 && this.appendChild(a) - }) - }, prepend: function () { - return this.domManip(arguments, !0, function (a) { - this.nodeType === 1 && this.insertBefore(a, this.firstChild) - }) - }, before: function () { - if (this[0] && this[0].parentNode)return this.domManip(arguments, !1, function (a) { - this.parentNode.insertBefore(a, this) - }); - if (arguments.length) { - var a = f.clean(arguments); - a.push.apply(a, this.toArray()); - return this.pushStack(a, "before", arguments) - } - }, after: function () { - if (this[0] && this[0].parentNode)return this.domManip(arguments, !1, function (a) { - this.parentNode.insertBefore(a, this.nextSibling) - }); - if (arguments.length) { - var a = this.pushStack(this, "after", arguments); - a.push.apply(a, f.clean(arguments)); - return a - } - }, remove: function (a, b) { - for (var c = 0, d; (d = this[c]) != null; c++)if (!a || f.filter(a, [d]).length)!b && d.nodeType === 1 && (f.cleanData(d.getElementsByTagName("*")), f.cleanData([d])), d.parentNode && d.parentNode.removeChild(d); - return this - }, empty: function () { - for (var a = 0, b; (b = this[a]) != null; a++) { - b.nodeType === 1 && f.cleanData(b.getElementsByTagName("*")); - while (b.firstChild)b.removeChild(b.firstChild) - } - return this - }, clone: function (a, b) { - a = a == null ? !1 : a, b = b == null ? a : b; - return this.map(function () { - return f.clone(this, a, b) - }) - }, html: function (a) { - if (a === b)return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(W, "") : null; - if (typeof a == "string" && !ba.test(a) && (f.support.leadingWhitespace || !X.test(a)) && !bg[(Z.exec(a) || ["", ""])[1].toLowerCase()]) { - a = a.replace(Y, "<$1></$2>"); - try { - for (var c = 0, d = this.length; c < d; c++)this[c].nodeType === 1 && (f.cleanData(this[c].getElementsByTagName("*")), this[c].innerHTML = a) - } catch (e) { - this.empty().append(a) - } - } else f.isFunction(a) ? this.each(function (b) { - var c = f(this); - c.html(a.call(this, b, c.html())) - }) : this.empty().append(a); - return this - }, replaceWith: function (a) { - if (this[0] && this[0].parentNode) { - if (f.isFunction(a))return this.each(function (b) { - var c = f(this), d = c.html(); - c.replaceWith(a.call(this, b, d)) - }); - typeof a != "string" && (a = f(a).detach()); - return this.each(function () { - var b = this.nextSibling, c = this.parentNode; - f(this).remove(), b ? f(b).before(a) : f(c).append(a) - }) - } - return this.length ? this.pushStack(f(f.isFunction(a) ? a() : a), "replaceWith", a) : this - }, detach: function (a) { - return this.remove(a, !0) - }, domManip: function (a, c, d) { - var e, g, h, i, j = a[0], k = []; - if (!f.support.checkClone && arguments.length === 3 && typeof j == "string" && bd.test(j))return this.each(function () { - f(this).domManip(a, c, d, !0) - }); - if (f.isFunction(j))return this.each(function (e) { - var g = f(this); - a[0] = j.call(this, e, c ? g.html() : b), g.domManip(a, c, d) - }); - if (this[0]) { - i = j && j.parentNode, f.support.parentNode && i && i.nodeType === 11 && i.childNodes.length === this.length ? e = {fragment: i} : e = f.buildFragment(a, this, k), h = e.fragment, h.childNodes.length === 1 ? g = h = h.firstChild : g = h.firstChild; - if (g) { - c = c && f.nodeName(g, "tr"); - for (var l = 0, m = this.length, n = m - 1; l < m; l++)d.call(c ? bi(this[l], g) : this[l], e.cacheable || m > 1 && l < n ? f.clone(h, !0, !0) : h) - } - k.length && f.each(k, bp) - } - return this - }}), f.buildFragment = function (a, b, d) { - var e, g, h, i, j = a[0]; - b && b[0] && (i = b[0].ownerDocument || b[0]), i.createDocumentFragment || (i = c), a.length === 1 && typeof j == "string" && j.length < 512 && i === c && j.charAt(0) === "<" && !bb.test(j) && (f.support.checkClone || !bd.test(j)) && (f.support.html5Clone || !bc.test(j)) && (g = !0, h = f.fragments[j], h && h !== 1 && (e = h)), e || (e = i.createDocumentFragment(), f.clean(a, i, e, d)), g && (f.fragments[j] = h ? e : 1); - return{fragment: e, cacheable: g} - }, f.fragments = {}, f.each({appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith"}, function (a, b) { - f.fn[a] = function (c) { - var d = [], e = f(c), g = this.length === 1 && this[0].parentNode; - if (g && g.nodeType === 11 && g.childNodes.length === 1 && e.length === 1) { - e[b](this[0]); - return this - } - for (var h = 0, i = e.length; h < i; h++) { - var j = (h > 0 ? this.clone(!0) : this).get(); - f(e[h])[b](j), d = d.concat(j) - } - return this.pushStack(d, a, e.selector) - } - }), f.extend({clone: function (a, b, c) { - var d, e, g, h = f.support.html5Clone || !bc.test("<" + a.nodeName) ? a.cloneNode(!0) : bo(a); - if ((!f.support.noCloneEvent || !f.support.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !f.isXMLDoc(a)) { - bk(a, h), d = bl(a), e = bl(h); - for (g = 0; d[g]; ++g)e[g] && bk(d[g], e[g]) - } - if (b) { - bj(a, h); - if (c) { - d = bl(a), e = bl(h); - for (g = 0; d[g]; ++g)bj(d[g], e[g]) - } - } - d = e = null; - return h - }, clean: function (a, b, d, e) { - var g; - b = b || c, typeof b.createElement == "undefined" && (b = b.ownerDocument || b[0] && b[0].ownerDocument || c); - var h = [], i; - for (var j = 0, k; (k = a[j]) != null; j++) { - typeof k == "number" && (k += ""); - if (!k)continue; - if (typeof k == "string")if (!_.test(k))k = b.createTextNode(k); else { - k = k.replace(Y, "<$1></$2>"); - var l = (Z.exec(k) || ["", ""])[1].toLowerCase(), m = bg[l] || bg._default, n = m[0], o = b.createElement("div"); - b === c ? bh.appendChild(o) : U(b).appendChild(o), o.innerHTML = m[1] + k + m[2]; - while (n--)o = o.lastChild; - if (!f.support.tbody) { - var p = $.test(k), q = l === "table" && !p ? o.firstChild && o.firstChild.childNodes : m[1] === "<table>" && !p ? o.childNodes : []; - for (i = q.length - 1; i >= 0; --i)f.nodeName(q[i], "tbody") && !q[i].childNodes.length && q[i].parentNode.removeChild(q[i]) - } - !f.support.leadingWhitespace && X.test(k) && o.insertBefore(b.createTextNode(X.exec(k)[0]), o.firstChild), k = o.childNodes - } - var r; - if (!f.support.appendChecked)if (k[0] && typeof (r = k.length) == "number")for (i = 0; i < r; i++)bn(k[i]); else bn(k); - k.nodeType ? h.push(k) : h = f.merge(h, k) - } - if (d) { - g = function (a) { - return!a.type || be.test(a.type) - }; - for (j = 0; h[j]; j++)if (e && f.nodeName(h[j], "script") && (!h[j].type || h[j].type.toLowerCase() === "text/javascript"))e.push(h[j].parentNode ? h[j].parentNode.removeChild(h[j]) : h[j]); else { - if (h[j].nodeType === 1) { - var s = f.grep(h[j].getElementsByTagName("script"), g); - h.splice.apply(h, [j + 1, 0].concat(s)) - } - d.appendChild(h[j]) - } - } - return h - }, cleanData: function (a) { - var b, c, d = f.cache, e = f.event.special, g = f.support.deleteExpando; - for (var h = 0, i; (i = a[h]) != null; h++) { - if (i.nodeName && f.noData[i.nodeName.toLowerCase()])continue; - c = i[f.expando]; - if (c) { - b = d[c]; - if (b && b.events) { - for (var j in b.events)e[j] ? f.event.remove(i, j) : f.removeEvent(i, j, b.handle); - b.handle && (b.handle.elem = null) - } - g ? delete i[f.expando] : i.removeAttribute && i.removeAttribute(f.expando), delete d[c] - } - } - }}); - var bq = /alpha\([^)]*\)/i, br = /opacity=([^)]*)/, bs = /([A-Z]|^ms)/g, bt = /^-?\d+(?:px)?$/i, bu = /^-?\d/, bv = /^([\-+])=([\-+.\de]+)/, bw = {position: "absolute", visibility: "hidden", display: "block"}, bx = ["Left", "Right"], by = ["Top", "Bottom"], bz, bA, bB; - f.fn.css = function (a, c) { - if (arguments.length === 2 && c === b)return this; - return f.access(this, a, c, !0, function (a, c, d) { - return d !== b ? f.style(a, c, d) : f.css(a, c) - }) - }, f.extend({cssHooks: {opacity: {get: function (a, b) { - if (b) { - var c = bz(a, "opacity", "opacity"); - return c === "" ? "1" : c - } - return a.style.opacity - }}}, cssNumber: {fillOpacity: !0, fontWeight: !0, lineHeight: !0, opacity: !0, orphans: !0, widows: !0, zIndex: !0, zoom: !0}, cssProps: {"float": f.support.cssFloat ? "cssFloat" : "styleFloat"}, style: function (a, c, d, e) { - if (!!a && a.nodeType !== 3 && a.nodeType !== 8 && !!a.style) { - var g, h, i = f.camelCase(c), j = a.style, k = f.cssHooks[i]; - c = f.cssProps[i] || i; - if (d === b) { - if (k && "get"in k && (g = k.get(a, !1, e)) !== b)return g; - return j[c] - } - h = typeof d, h === "string" && (g = bv.exec(d)) && (d = +(g[1] + 1) * +g[2] + parseFloat(f.css(a, c)), h = "number"); - if (d == null || h === "number" && isNaN(d))return; - h === "number" && !f.cssNumber[i] && (d += "px"); - if (!k || !("set"in k) || (d = k.set(a, d)) !== b)try { - j[c] = d - } catch (l) { - } - } - }, css: function (a, c, d) { - var e, g; - c = f.camelCase(c), g = f.cssHooks[c], c = f.cssProps[c] || c, c === "cssFloat" && (c = "float"); - if (g && "get"in g && (e = g.get(a, !0, d)) !== b)return e; - if (bz)return bz(a, c) - }, swap: function (a, b, c) { - var d = {}; - for (var e in b)d[e] = a.style[e], a.style[e] = b[e]; - c.call(a); - for (e in b)a.style[e] = d[e] - }}), f.curCSS = f.css, f.each(["height", "width"], function (a, b) { - f.cssHooks[b] = {get: function (a, c, d) { - var e; - if (c) { - if (a.offsetWidth !== 0)return bC(a, b, d); - f.swap(a, bw, function () { - e = bC(a, b, d) - }); - return e - } - }, set: function (a, b) { - if (!bt.test(b))return b; - b = parseFloat(b); - if (b >= 0)return b + "px" - }} - }), f.support.opacity || (f.cssHooks.opacity = {get: function (a, b) { - return br.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "" : b ? "1" : "" - }, set: function (a, b) { - var c = a.style, d = a.currentStyle, e = f.isNumeric(b) ? "alpha(opacity=" + b * 100 + ")" : "", g = d && d.filter || c.filter || ""; - c.zoom = 1; - if (b >= 1 && f.trim(g.replace(bq, "")) === "") { - c.removeAttribute("filter"); - if (d && !d.filter)return - } - c.filter = bq.test(g) ? g.replace(bq, e) : g + " " + e - }}), f(function () { - f.support.reliableMarginRight || (f.cssHooks.marginRight = {get: function (a, b) { - var c; - f.swap(a, {display: "inline-block"}, function () { - b ? c = bz(a, "margin-right", "marginRight") : c = a.style.marginRight - }); - return c - }}) - }), c.defaultView && c.defaultView.getComputedStyle && (bA = function (a, b) { - var c, d, e; - b = b.replace(bs, "-$1").toLowerCase(), (d = a.ownerDocument.defaultView) && (e = d.getComputedStyle(a, null)) && (c = e.getPropertyValue(b), c === "" && !f.contains(a.ownerDocument.documentElement, a) && (c = f.style(a, b))); - return c - }), c.documentElement.currentStyle && (bB = function (a, b) { - var c, d, e, f = a.currentStyle && a.currentStyle[b], g = a.style; - f === null && g && (e = g[b]) && (f = e), !bt.test(f) && bu.test(f) && (c = g.left, d = a.runtimeStyle && a.runtimeStyle.left, d && (a.runtimeStyle.left = a.currentStyle.left), g.left = b === "fontSize" ? "1em" : f || 0, f = g.pixelLeft + "px", g.left = c, d && (a.runtimeStyle.left = d)); - return f === "" ? "auto" : f - }), bz = bA || bB, f.expr && f.expr.filters && (f.expr.filters.hidden = function (a) { - var b = a.offsetWidth, c = a.offsetHeight; - return b === 0 && c === 0 || !f.support.reliableHiddenOffsets && (a.style && a.style.display || f.css(a, "display")) === "none" - }, f.expr.filters.visible = function (a) { - return!f.expr.filters.hidden(a) - }); - var bD = /%20/g, bE = /\[\]$/, bF = /\r?\n/g, bG = /#.*$/, bH = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, bI = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, bJ = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, bK = /^(?:GET|HEAD)$/, bL = /^\/\//, bM = /\?/, bN = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, bO = /^(?:select|textarea)/i, bP = /\s+/, bQ = /([?&])_=[^&]*/, bR = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, bS = f.fn.load, bT = {}, bU = {}, bV, bW, bX = ["*/"] + ["*"]; - try { - bV = e.href - } catch (bY) { - bV = c.createElement("a"), bV.href = "", bV = bV.href - } - bW = bR.exec(bV.toLowerCase()) || [], f.fn.extend({load: function (a, c, d) { - if (typeof a != "string" && bS)return bS.apply(this, arguments); - if (!this.length)return this; - var e = a.indexOf(" "); - if (e >= 0) { - var g = a.slice(e, a.length); - a = a.slice(0, e) - } - var h = "GET"; - c && (f.isFunction(c) ? (d = c, c = b) : typeof c == "object" && (c = f.param(c, f.ajaxSettings.traditional), h = "POST")); - var i = this; - f.ajax({url: a, type: h, dataType: "html", data: c, complete: function (a, b, c) { - c = a.responseText, a.isResolved() && (a.done(function (a) { - c = a - }), i.html(g ? f("<div>").append(c.replace(bN, "")).find(g) : c)), d && i.each(d, [c, b, a]) - }}); - return this - }, serialize: function () { - return f.param(this.serializeArray()) - }, serializeArray: function () { - return this.map(function () { - return this.elements ? f.makeArray(this.elements) : this - }).filter(function () { - return this.name && !this.disabled && (this.checked || bO.test(this.nodeName) || bI.test(this.type)) - }).map(function (a, b) { - var c = f(this).val(); - return c == null ? null : f.isArray(c) ? f.map(c, function (a, c) { - return{name: b.name, value: a.replace(bF, "\r\n")} - }) : {name: b.name, value: c.replace(bF, "\r\n")} - }).get() - }}), f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (a, b) { - f.fn[b] = function (a) { - return this.on(b, a) - } - }), f.each(["get", "post"], function (a, c) { - f[c] = function (a, d, e, g) { - f.isFunction(d) && (g = g || e, e = d, d = b); - return f.ajax({type: c, url: a, data: d, success: e, dataType: g}) - } - }), f.extend({getScript: function (a, c) { - return f.get(a, b, c, "script") - }, getJSON: function (a, b, c) { - return f.get(a, b, c, "json") - }, ajaxSetup: function (a, b) { - b ? b_(a, f.ajaxSettings) : (b = a, a = f.ajaxSettings), b_(a, b); - return a - }, ajaxSettings: {url: bV, isLocal: bJ.test(bW[1]), global: !0, type: "GET", contentType: "application/x-www-form-urlencoded", processData: !0, async: !0, accepts: {xml: "application/xml, text/xml", html: "text/html", text: "text/plain", json: "application/json, text/javascript", "*": bX}, contents: {xml: /xml/, html: /html/, json: /json/}, responseFields: {xml: "responseXML", text: "responseText"}, converters: {"* text": a.String, "text html": !0, "text json": f.parseJSON, "text xml": f.parseXML}, flatOptions: {context: !0, url: !0}}, ajaxPrefilter: bZ(bT), ajaxTransport: bZ(bU), ajax: function (a, c) { - function w(a, c, l, m) { - if (s !== 2) { - s = 2, q && clearTimeout(q), p = b, n = m || "", v.readyState = a > 0 ? 4 : 0; - var o, r, u, w = c, x = l ? cb(d, v, l) : b, y, z; - if (a >= 200 && a < 300 || a === 304) { - if (d.ifModified) { - if (y = v.getResponseHeader("Last-Modified"))f.lastModified[k] = y; - if (z = v.getResponseHeader("Etag"))f.etag[k] = z - } - if (a === 304)w = "notmodified", o = !0; else try { - r = cc(d, x), w = "success", o = !0 - } catch (A) { - w = "parsererror", u = A - } - } else { - u = w; - if (!w || a)w = "error", a < 0 && (a = 0) - } - v.status = a, v.statusText = "" + (c || w), o ? h.resolveWith(e, [r, w, v]) : h.rejectWith(e, [v, w, u]), v.statusCode(j), j = b, t && g.trigger("ajax" + (o ? "Success" : "Error"), [v, d, o ? r : u]), i.fireWith(e, [v, w]), t && (g.trigger("ajaxComplete", [v, d]), --f.active || f.event.trigger("ajaxStop")) - } - } - - typeof a == "object" && (c = a, a = b), c = c || {}; - var d = f.ajaxSetup({}, c), e = d.context || d, g = e !== d && (e.nodeType || e instanceof f) ? f(e) : f.event, h = f.Deferred(), i = f.Callbacks("once memory"), j = d.statusCode || {}, k, l = {}, m = {}, n, o, p, q, r, s = 0, t, u, v = {readyState: 0, setRequestHeader: function (a, b) { - if (!s) { - var c = a.toLowerCase(); - a = m[c] = m[c] || a, l[a] = b - } - return this - }, getAllResponseHeaders: function () { - return s === 2 ? n : null - }, getResponseHeader: function (a) { - var c; - if (s === 2) { - if (!o) { - o = {}; - while (c = bH.exec(n))o[c[1].toLowerCase()] = c[2] - } - c = o[a.toLowerCase()] - } - return c === b ? null : c - }, overrideMimeType: function (a) { - s || (d.mimeType = a); - return this - }, abort: function (a) { - a = a || "abort", p && p.abort(a), w(0, a); - return this - }}; - h.promise(v), v.success = v.done, v.error = v.fail, v.complete = i.add, v.statusCode = function (a) { - if (a) { - var b; - if (s < 2)for (b in a)j[b] = [j[b], a[b]]; else b = a[v.status], v.then(b, b) - } - return this - }, d.url = ((a || d.url) + "").replace(bG, "").replace(bL, bW[1] + "//"), d.dataTypes = f.trim(d.dataType || "*").toLowerCase().split(bP), d.crossDomain == null && (r = bR.exec(d.url.toLowerCase()), d.crossDomain = !(!r || r[1] == bW[1] && r[2] == bW[2] && (r[3] || (r[1] === "http:" ? 80 : 443)) == (bW[3] || (bW[1] === "http:" ? 80 : 443)))), d.data && d.processData && typeof d.data != "string" && (d.data = f.param(d.data, d.traditional)), b$(bT, d, c, v); - if (s === 2)return!1; - t = d.global, d.type = d.type.toUpperCase(), d.hasContent = !bK.test(d.type), t && f.active++ === 0 && f.event.trigger("ajaxStart"); - if (!d.hasContent) { - d.data && (d.url += (bM.test(d.url) ? "&" : "?") + d.data, delete d.data), k = d.url; - if (d.cache === !1) { - var x = f.now(), y = d.url.replace(bQ, "$1_=" + x); - d.url = y + (y === d.url ? (bM.test(d.url) ? "&" : "?") + "_=" + x : "") - } - } - (d.data && d.hasContent && d.contentType !== !1 || c.contentType) && v.setRequestHeader("Content-Type", d.contentType), d.ifModified && (k = k || d.url, f.lastModified[k] && v.setRequestHeader("If-Modified-Since", f.lastModified[k]), f.etag[k] && v.setRequestHeader("If-None-Match", f.etag[k])), v.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + (d.dataTypes[0] !== "*" ? ", " + bX + "; q=0.01" : "") : d.accepts["*"]); - for (u in d.headers)v.setRequestHeader(u, d.headers[u]); - if (d.beforeSend && (d.beforeSend.call(e, v, d) === !1 || s === 2)) { - v.abort(); - return!1 - } - for (u in{success: 1, error: 1, complete: 1})v[u](d[u]); - p = b$(bU, d, c, v); - if (!p)w(-1, "No Transport"); else { - v.readyState = 1, t && g.trigger("ajaxSend", [v, d]), d.async && d.timeout > 0 && (q = setTimeout(function () { - v.abort("timeout") - }, d.timeout)); - try { - s = 1, p.send(l, w) - } catch (z) { - if (s < 2)w(-1, z); else throw z - } - } - return v - }, param: function (a, c) { - var d = [], e = function (a, b) { - b = f.isFunction(b) ? b() : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b) - }; - c === b && (c = f.ajaxSettings.traditional); - if (f.isArray(a) || a.jquery && !f.isPlainObject(a))f.each(a, function () { - e(this.name, this.value) - }); else for (var g in a)ca(g, a[g], c, e); - return d.join("&").replace(bD, "+") - }}), f.extend({active: 0, lastModified: {}, etag: {}}); - var cd = f.now(), ce = /(\=)\?(&|$)|\?\?/i; - f.ajaxSetup({jsonp: "callback", jsonpCallback: function () { - return f.expando + "_" + cd++ - }}), f.ajaxPrefilter("json jsonp", function (b, c, d) { - var e = b.contentType === "application/x-www-form-urlencoded" && typeof b.data == "string"; - if (b.dataTypes[0] === "jsonp" || b.jsonp !== !1 && (ce.test(b.url) || e && ce.test(b.data))) { - var g, h = b.jsonpCallback = f.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, i = a[h], j = b.url, k = b.data, l = "$1" + h + "$2"; - b.jsonp !== !1 && (j = j.replace(ce, l), b.url === j && (e && (k = k.replace(ce, l)), b.data === k && (j += (/\?/.test(j) ? "&" : "?") + b.jsonp + "=" + h))), b.url = j, b.data = k, a[h] = function (a) { - g = [a] - }, d.always(function () { - a[h] = i, g && f.isFunction(i) && a[h](g[0]) - }), b.converters["script json"] = function () { - g || f.error(h + " was not called"); - return g[0] - }, b.dataTypes[0] = "json"; - return"script" - } - }), f.ajaxSetup({accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"}, contents: {script: /javascript|ecmascript/}, converters: {"text script": function (a) { - f.globalEval(a); - return a - }}}), f.ajaxPrefilter("script", function (a) { - a.cache === b && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1) - }), f.ajaxTransport("script", function (a) { - if (a.crossDomain) { - var d, e = c.head || c.getElementsByTagName("head")[0] || c.documentElement; - return{send: function (f, g) { - d = c.createElement("script"), d.async = "async", a.scriptCharset && (d.charset = a.scriptCharset), d.src = a.url, d.onload = d.onreadystatechange = function (a, c) { - if (c || !d.readyState || /loaded|complete/.test(d.readyState))d.onload = d.onreadystatechange = null, e && d.parentNode && e.removeChild(d), d = b, c || g(200, "success") - }, e.insertBefore(d, e.firstChild) - }, abort: function () { - d && d.onload(0, 1) - }} - } - }); - var cf = a.ActiveXObject ? function () { - for (var a in ch)ch[a](0, 1) - } : !1, cg = 0, ch; - f.ajaxSettings.xhr = a.ActiveXObject ? function () { - return!this.isLocal && ci() || cj() - } : ci, function (a) { - f.extend(f.support, {ajax: !!a, cors: !!a && "withCredentials"in a}) - }(f.ajaxSettings.xhr()), f.support.ajax && f.ajaxTransport(function (c) { - if (!c.crossDomain || f.support.cors) { - var d; - return{send: function (e, g) { - var h = c.xhr(), i, j; - c.username ? h.open(c.type, c.url, c.async, c.username, c.password) : h.open(c.type, c.url, c.async); - if (c.xhrFields)for (j in c.xhrFields)h[j] = c.xhrFields[j]; - c.mimeType && h.overrideMimeType && h.overrideMimeType(c.mimeType), !c.crossDomain && !e["X-Requested-With"] && (e["X-Requested-With"] = "XMLHttpRequest"); - try { - for (j in e)h.setRequestHeader(j, e[j]) - } catch (k) { - } - h.send(c.hasContent && c.data || null), d = function (a, e) { - var j, k, l, m, n; - try { - if (d && (e || h.readyState === 4)) { - d = b, i && (h.onreadystatechange = f.noop, cf && delete ch[i]); - if (e)h.readyState !== 4 && h.abort(); else { - j = h.status, l = h.getAllResponseHeaders(), m = {}, n = h.responseXML, n && n.documentElement && (m.xml = n), m.text = h.responseText; - try { - k = h.statusText - } catch (o) { - k = "" - } - !j && c.isLocal && !c.crossDomain ? j = m.text ? 200 : 404 : j === 1223 && (j = 204) - } - } - } catch (p) { - e || g(-1, p) - } - m && g(j, k, m, l) - }, !c.async || h.readyState === 4 ? d() : (i = ++cg, cf && (ch || (ch = {}, f(a).unload(cf)), ch[i] = d), h.onreadystatechange = d) - }, abort: function () { - d && d(0, 1) - }} - } - }); - var ck = {}, cl, cm, cn = /^(?:toggle|show|hide)$/, co = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, cp, cq = [ - ["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], - ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], - ["opacity"] - ], cr; - f.fn.extend({show: function (a, b, c) { - var d, e; - if (a || a === 0)return this.animate(cu("show", 3), a, b, c); - for (var g = 0, h = this.length; g < h; g++)d = this[g], d.style && (e = d.style.display, !f._data(d, "olddisplay") && e === "none" && (e = d.style.display = ""), e === "" && f.css(d, "display") === "none" && f._data(d, "olddisplay", cv(d.nodeName))); - for (g = 0; g < h; g++) { - d = this[g]; - if (d.style) { - e = d.style.display; - if (e === "" || e === "none")d.style.display = f._data(d, "olddisplay") || "" - } - } - return this - }, hide: function (a, b, c) { - if (a || a === 0)return this.animate(cu("hide", 3), a, b, c); - var d, e, g = 0, h = this.length; - for (; g < h; g++)d = this[g], d.style && (e = f.css(d, "display"), e !== "none" && !f._data(d, "olddisplay") && f._data(d, "olddisplay", e)); - for (g = 0; g < h; g++)this[g].style && (this[g].style.display = "none"); - return this - }, _toggle: f.fn.toggle, toggle: function (a, b, c) { - var d = typeof a == "boolean"; - f.isFunction(a) && f.isFunction(b) ? this._toggle.apply(this, arguments) : a == null || d ? this.each(function () { - var b = d ? a : f(this).is(":hidden"); - f(this)[b ? "show" : "hide"]() - }) : this.animate(cu("toggle", 3), a, b, c); - return this - }, fadeTo: function (a, b, c, d) { - return this.filter(":hidden").css("opacity", 0).show().end().animate({opacity: b}, a, c, d) - }, animate: function (a, b, c, d) { - function g() { - e.queue === !1 && f._mark(this); - var b = f.extend({}, e), c = this.nodeType === 1, d = c && f(this).is(":hidden"), g, h, i, j, k, l, m, n, o; - b.animatedProperties = {}; - for (i in a) { - g = f.camelCase(i), i !== g && (a[g] = a[i], delete a[i]), h = a[g], f.isArray(h) ? (b.animatedProperties[g] = h[1], h = a[g] = h[0]) : b.animatedProperties[g] = b.specialEasing && b.specialEasing[g] || b.easing || "swing"; - if (h === "hide" && d || h === "show" && !d)return b.complete.call(this); - c && (g === "height" || g === "width") && (b.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY], f.css(this, "display") === "inline" && f.css(this, "float") === "none" && (!f.support.inlineBlockNeedsLayout || cv(this.nodeName) === "inline" ? this.style.display = "inline-block" : this.style.zoom = 1)) - } - b.overflow != null && (this.style.overflow = "hidden"); - for (i in a)j = new f.fx(this, b, i), h = a[i], cn.test(h) ? (o = f._data(this, "toggle" + i) || (h === "toggle" ? d ? "show" : "hide" : 0), o ? (f._data(this, "toggle" + i, o === "show" ? "hide" : "show"), j[o]()) : j[h]()) : (k = co.exec(h), l = j.cur(), k ? (m = parseFloat(k[2]), n = k[3] || (f.cssNumber[i] ? "" : "px"), n !== "px" && (f.style(this, i, (m || 1) + n), l = (m || 1) / j.cur() * l, f.style(this, i, l + n)), k[1] && (m = (k[1] === "-=" ? -1 : 1) * m + l), j.custom(l, m, n)) : j.custom(l, h, "")); - return!0 - } - - var e = f.speed(b, c, d); - if (f.isEmptyObject(a))return this.each(e.complete, [!1]); - a = f.extend({}, a); - return e.queue === !1 ? this.each(g) : this.queue(e.queue, g) - }, stop: function (a, c, d) { - typeof a != "string" && (d = c, c = a, a = b), c && a !== !1 && this.queue(a || "fx", []); - return this.each(function () { - function h(a, b, c) { - var e = b[c]; - f.removeData(a, c, !0), e.stop(d) - } - - var b, c = !1, e = f.timers, g = f._data(this); - d || f._unmark(!0, this); - if (a == null)for (b in g)g[b] && g[b].stop && b.indexOf(".run") === b.length - 4 && h(this, g, b); else g[b = a + ".run"] && g[b].stop && h(this, g, b); - for (b = e.length; b--;)e[b].elem === this && (a == null || e[b].queue === a) && (d ? e[b](!0) : e[b].saveState(), c = !0, e.splice(b, 1)); - (!d || !c) && f.dequeue(this, a) - }) - }}), f.each({slideDown: cu("show", 1), slideUp: cu("hide", 1), slideToggle: cu("toggle", 1), fadeIn: {opacity: "show"}, fadeOut: {opacity: "hide"}, fadeToggle: {opacity: "toggle"}}, function (a, b) { - f.fn[a] = function (a, c, d) { - return this.animate(b, a, c, d) - } - }), f.extend({speed: function (a, b, c) { - var d = a && typeof a == "object" ? f.extend({}, a) : {complete: c || !c && b || f.isFunction(a) && a, duration: a, easing: c && b || b && !f.isFunction(b) && b}; - d.duration = f.fx.off ? 0 : typeof d.duration == "number" ? d.duration : d.duration in f.fx.speeds ? f.fx.speeds[d.duration] : f.fx.speeds._default; - if (d.queue == null || d.queue === !0)d.queue = "fx"; - d.old = d.complete, d.complete = function (a) { - f.isFunction(d.old) && d.old.call(this), d.queue ? f.dequeue(this, d.queue) : a !== !1 && f._unmark(this) - }; - return d - }, easing: {linear: function (a, b, c, d) { - return c + d * a - }, swing: function (a, b, c, d) { - return(-Math.cos(a * Math.PI) / 2 + .5) * d + c - }}, timers: [], fx: function (a, b, c) { - this.options = b, this.elem = a, this.prop = c, b.orig = b.orig || {} - }}), f.fx.prototype = {update: function () { - this.options.step && this.options.step.call(this.elem, this.now, this), (f.fx.step[this.prop] || f.fx.step._default)(this) - }, cur: function () { - if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null))return this.elem[this.prop]; - var a, b = f.css(this.elem, this.prop); - return isNaN(a = parseFloat(b)) ? !b || b === "auto" ? 0 : b : a - }, custom: function (a, c, d) { - function h(a) { - return e.step(a) - } - - var e = this, g = f.fx; - this.startTime = cr || cs(), this.end = c, this.now = this.start = a, this.pos = this.state = 0, this.unit = d || this.unit || (f.cssNumber[this.prop] ? "" : "px"), h.queue = this.options.queue, h.elem = this.elem, h.saveState = function () { - e.options.hide && f._data(e.elem, "fxshow" + e.prop) === b && f._data(e.elem, "fxshow" + e.prop, e.start) - }, h() && f.timers.push(h) && !cp && (cp = setInterval(g.tick, g.interval)) - }, show: function () { - var a = f._data(this.elem, "fxshow" + this.prop); - this.options.orig[this.prop] = a || f.style(this.elem, this.prop), this.options.show = !0, a !== b ? this.custom(this.cur(), a) : this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()), f(this.elem).show() - }, hide: function () { - this.options.orig[this.prop] = f._data(this.elem, "fxshow" + this.prop) || f.style(this.elem, this.prop), this.options.hide = !0, this.custom(this.cur(), 0) - }, step: function (a) { - var b, c, d, e = cr || cs(), g = !0, h = this.elem, i = this.options; - if (a || e >= i.duration + this.startTime) { - this.now = this.end, this.pos = this.state = 1, this.update(), i.animatedProperties[this.prop] = !0; - for (b in i.animatedProperties)i.animatedProperties[b] !== !0 && (g = !1); - if (g) { - i.overflow != null && !f.support.shrinkWrapBlocks && f.each(["", "X", "Y"], function (a, b) { - h.style["overflow" + b] = i.overflow[a] - }), i.hide && f(h).hide(); - if (i.hide || i.show)for (b in i.animatedProperties)f.style(h, b, i.orig[b]), f.removeData(h, "fxshow" + b, !0), f.removeData(h, "toggle" + b, !0); - d = i.complete, d && (i.complete = !1, d.call(h)) - } - return!1 - } - i.duration == Infinity ? this.now = e : (c = e - this.startTime, this.state = c / i.duration, this.pos = f.easing[i.animatedProperties[this.prop]](this.state, c, 0, 1, i.duration), this.now = this.start + (this.end - this.start) * this.pos), this.update(); - return!0 - }}, f.extend(f.fx, {tick: function () { - var a, b = f.timers, c = 0; - for (; c < b.length; c++)a = b[c], !a() && b[c] === a && b.splice(c--, 1); - b.length || f.fx.stop() - }, interval: 13, stop: function () { - clearInterval(cp), cp = null - }, speeds: {slow: 600, fast: 200, _default: 400}, step: {opacity: function (a) { - f.style(a.elem, "opacity", a.now) - }, _default: function (a) { - a.elem.style && a.elem.style[a.prop] != null ? a.elem.style[a.prop] = a.now + a.unit : a.elem[a.prop] = a.now - }}}), f.each(["width", "height"], function (a, b) { - f.fx.step[b] = function (a) { - f.style(a.elem, b, Math.max(0, a.now) + a.unit) - } - }), f.expr && f.expr.filters && (f.expr.filters.animated = function (a) { - return f.grep(f.timers,function (b) { - return a === b.elem - }).length - }); - var cw = /^t(?:able|d|h)$/i, cx = /^(?:body|html)$/i; - "getBoundingClientRect"in c.documentElement ? f.fn.offset = function (a) { - var b = this[0], c; - if (a)return this.each(function (b) { - f.offset.setOffset(this, a, b) - }); - if (!b || !b.ownerDocument)return null; - if (b === b.ownerDocument.body)return f.offset.bodyOffset(b); - try { - c = b.getBoundingClientRect() - } catch (d) { - } - var e = b.ownerDocument, g = e.documentElement; - if (!c || !f.contains(g, b))return c ? {top: c.top, left: c.left} : {top: 0, left: 0}; - var h = e.body, i = cy(e), j = g.clientTop || h.clientTop || 0, k = g.clientLeft || h.clientLeft || 0, l = i.pageYOffset || f.support.boxModel && g.scrollTop || h.scrollTop, m = i.pageXOffset || f.support.boxModel && g.scrollLeft || h.scrollLeft, n = c.top + l - j, o = c.left + m - k; - return{top: n, left: o} - } : f.fn.offset = function (a) { - var b = this[0]; - if (a)return this.each(function (b) { - f.offset.setOffset(this, a, b) - }); - if (!b || !b.ownerDocument)return null; - if (b === b.ownerDocument.body)return f.offset.bodyOffset(b); - var c, d = b.offsetParent, e = b, g = b.ownerDocument, h = g.documentElement, i = g.body, j = g.defaultView, k = j ? j.getComputedStyle(b, null) : b.currentStyle, l = b.offsetTop, m = b.offsetLeft; - while ((b = b.parentNode) && b !== i && b !== h) { - if (f.support.fixedPosition && k.position === "fixed")break; - c = j ? j.getComputedStyle(b, null) : b.currentStyle, l -= b.scrollTop, m -= b.scrollLeft, b === d && (l += b.offsetTop, m += b.offsetLeft, f.support.doesNotAddBorder && (!f.support.doesAddBorderForTableAndCells || !cw.test(b.nodeName)) && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), e = d, d = b.offsetParent), f.support.subtractsBorderForOverflowNotVisible && c.overflow !== "visible" && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), k = c - } - if (k.position === "relative" || k.position === "static")l += i.offsetTop, m += i.offsetLeft; - f.support.fixedPosition && k.position === "fixed" && (l += Math.max(h.scrollTop, i.scrollTop), m += Math.max(h.scrollLeft, i.scrollLeft)); - return{top: l, left: m} - }, f.offset = {bodyOffset: function (a) { - var b = a.offsetTop, c = a.offsetLeft; - f.support.doesNotIncludeMarginInBodyOffset && (b += parseFloat(f.css(a, "marginTop")) || 0, c += parseFloat(f.css(a, "marginLeft")) || 0); - return{top: b, left: c} - }, setOffset: function (a, b, c) { - var d = f.css(a, "position"); - d === "static" && (a.style.position = "relative"); - var e = f(a), g = e.offset(), h = f.css(a, "top"), i = f.css(a, "left"), j = (d === "absolute" || d === "fixed") && f.inArray("auto", [h, i]) > -1, k = {}, l = {}, m, n; - j ? (l = e.position(), m = l.top, n = l.left) : (m = parseFloat(h) || 0, n = parseFloat(i) || 0), f.isFunction(b) && (b = b.call(a, c, g)), b.top != null && (k.top = b.top - g.top + m), b.left != null && (k.left = b.left - g.left + n), "using"in b ? b.using.call(a, k) : e.css(k) - }}, f.fn.extend({position: function () { - if (!this[0])return null; - var a = this[0], b = this.offsetParent(), c = this.offset(), d = cx.test(b[0].nodeName) ? {top: 0, left: 0} : b.offset(); - c.top -= parseFloat(f.css(a, "marginTop")) || 0, c.left -= parseFloat(f.css(a, "marginLeft")) || 0, d.top += parseFloat(f.css(b[0], "borderTopWidth")) || 0, d.left += parseFloat(f.css(b[0], "borderLeftWidth")) || 0; - return{top: c.top - d.top, left: c.left - d.left} - }, offsetParent: function () { - return this.map(function () { - var a = this.offsetParent || c.body; - while (a && !cx.test(a.nodeName) && f.css(a, "position") === "static")a = a.offsetParent; - return a - }) - }}), f.each(["Left", "Top"], function (a, c) { - var d = "scroll" + c; - f.fn[d] = function (c) { - var e, g; - if (c === b) { - e = this[0]; - if (!e)return null; - g = cy(e); - return g ? "pageXOffset"in g ? g[a ? "pageYOffset" : "pageXOffset"] : f.support.boxModel && g.document.documentElement[d] || g.document.body[d] : e[d] - } - return this.each(function () { - g = cy(this), g ? g.scrollTo(a ? f(g).scrollLeft() : c, a ? c : f(g).scrollTop()) : this[d] = c - }) - } - }), f.each(["Height", "Width"], function (a, c) { - var d = c.toLowerCase(); - f.fn["inner" + c] = function () { - var a = this[0]; - return a ? a.style ? parseFloat(f.css(a, d, "padding")) : this[d]() : null - }, f.fn["outer" + c] = function (a) { - var b = this[0]; - return b ? b.style ? parseFloat(f.css(b, d, a ? "margin" : "border")) : this[d]() : null - }, f.fn[d] = function (a) { - var e = this[0]; - if (!e)return a == null ? null : this; - if (f.isFunction(a))return this.each(function (b) { - var c = f(this); - c[d](a.call(this, b, c[d]())) - }); - if (f.isWindow(e)) { - var g = e.document.documentElement["client" + c], h = e.document.body; - return e.document.compatMode === "CSS1Compat" && g || h && h["client" + c] || g - } - if (e.nodeType === 9)return Math.max(e.documentElement["client" + c], e.body["scroll" + c], e.documentElement["scroll" + c], e.body["offset" + c], e.documentElement["offset" + c]); - if (a === b) { - var i = f.css(e, d), j = parseFloat(i); - return f.isNumeric(j) ? j : i - } - return this.css(d, typeof a == "string" ? a : a + "px") - } - }), a.jQuery = a.$ = f, typeof define == "function" && define.amd && define.amd.jQuery && define("jquery", [], function () { - return f - }) -})(window); diff --git a/app/assets/javascripts/jquery.tipTip.min.js b/app/assets/javascripts/jquery.tipTip.min.js deleted file mode 100644 index 5d165c59..00000000 --- a/app/assets/javascripts/jquery.tipTip.min.js +++ /dev/null @@ -1,175 +0,0 @@ -/* - * TipTip - * Copyright 2010 Drew Wilson - * www.drewwilson.com - * code.drewwilson.com/entry/tiptip-jquery-plugin - * - * Version 1.3 - Updated: Mar. 23, 2010 - * - * This Plug-In will create a custom tooltip to replace the default - * browser tooltip. It is extremely lightweight and very smart in - * that it detects the edges of the browser window and will make sure - * the tooltip stays within the current window size. As a result the - * tooltip will adjust itself to be displayed above, below, to the left - * or to the right depending on what is necessary to stay within the - * browser window. It is completely customizable as well via CSS. - * - * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses: - * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -(function ($) { - $.fn.tipTip = function (options) { - var defaults = {activation: "hover", keepAlive: false, maxWidth: "200px", edgeOffset: 3, defaultPosition: "bottom", delay: 400, fadeIn: 200, fadeOut: 200, attribute: "title", content: false, enter: function () { - }, exit: function () { - }}; - var opts = $.extend(defaults, options); - if ($("#tiptip_holder").length <= 0) { - var tiptip_holder = $('<div id="tiptip_holder" style="max-width:' + opts.maxWidth + ';"></div>'); - var tiptip_content = $('<div id="tiptip_content"></div>'); - var tiptip_arrow = $('<div id="tiptip_arrow"></div>'); - $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>'))) - } else { - var tiptip_holder = $("#tiptip_holder"); - var tiptip_content = $("#tiptip_content"); - var tiptip_arrow = $("#tiptip_arrow") - } - return this.each(function () { - var org_elem = $(this); - if (opts.content) { - var org_title = opts.content - } else { - var org_title = org_elem.attr(opts.attribute) - } - if (org_title != "") { - if (!opts.content) { - org_elem.removeAttr(opts.attribute) - } - var timeout = false; - if (opts.activation == "hover") { - org_elem.hover(function () { - active_tiptip() - }, function () { - if (!opts.keepAlive) { - deactive_tiptip() - } - }); - if (opts.keepAlive) { - tiptip_holder.hover(function () { - }, function () { - deactive_tiptip() - }) - } - } else if (opts.activation == "focus") { - org_elem.focus(function () { - active_tiptip() - }).blur(function () { - deactive_tiptip() - }) - } else if (opts.activation == "click") { - org_elem.click(function () { - active_tiptip(); - return false - }).hover(function () { - }, function () { - if (!opts.keepAlive) { - deactive_tiptip() - } - }); - if (opts.keepAlive) { - tiptip_holder.hover(function () { - }, function () { - deactive_tiptip() - }) - } - } - function active_tiptip() { - opts.enter.call(this); - tiptip_content.html(org_title); - tiptip_holder.hide().removeAttr("class").css("margin", "0"); - tiptip_arrow.removeAttr("style"); - var top = parseInt(org_elem.offset()['top']); - var left = parseInt(org_elem.offset()['left']); - var org_width = parseInt(org_elem.outerWidth()); - var org_height = parseInt(org_elem.outerHeight()); - var tip_w = tiptip_holder.outerWidth(); - var tip_h = tiptip_holder.outerHeight(); - var w_compare = Math.round((org_width - tip_w) / 2); - var h_compare = Math.round((org_height - tip_h) / 2); - var marg_left = Math.round(left + w_compare); - var marg_top = Math.round(top + org_height + opts.edgeOffset); - var t_class = ""; - var arrow_top = ""; - var arrow_left = Math.round(tip_w - 12) / 2; - if (opts.defaultPosition == "bottom") { - t_class = "_bottom" - } else if (opts.defaultPosition == "top") { - t_class = "_top" - } else if (opts.defaultPosition == "left") { - t_class = "_left" - } else if (opts.defaultPosition == "right") { - t_class = "_right" - } - var right_compare = (w_compare + left) < parseInt($(window).scrollLeft()); - var left_compare = (tip_w + left) > parseInt($(window).width()); - if ((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))) { - t_class = "_right"; - arrow_top = Math.round(tip_h - 13) / 2; - arrow_left = -12; - marg_left = Math.round(left + org_width + opts.edgeOffset); - marg_top = Math.round(top + h_compare) - } else if ((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)) { - t_class = "_left"; - arrow_top = Math.round(tip_h - 13) / 2; - arrow_left = Math.round(tip_w); - marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5)); - marg_top = Math.round(top + h_compare) - } - var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop()); - var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0; - if (top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)) { - if (t_class == "_top" || t_class == "_bottom") { - t_class = "_top" - } else { - t_class = t_class + "_top" - } - arrow_top = tip_h; - marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset)) - } else if (bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)) { - if (t_class == "_top" || t_class == "_bottom") { - t_class = "_bottom" - } else { - t_class = t_class + "_bottom" - } - arrow_top = -12; - marg_top = Math.round(top + org_height + opts.edgeOffset) - } - if (t_class == "_right_top" || t_class == "_left_top") { - marg_top = marg_top + 5 - } else if (t_class == "_right_bottom" || t_class == "_left_bottom") { - marg_top = marg_top - 5 - } - if (t_class == "_left_top" || t_class == "_left_bottom") { - marg_left = marg_left + 5 - } - tiptip_arrow.css({"margin-left": arrow_left + "px", "margin-top": arrow_top + "px"}); - tiptip_holder.css({"margin-left": marg_left + "px", "margin-top": marg_top + "px"}).attr("class", "tip" + t_class); - if (timeout) { - clearTimeout(timeout) - } - timeout = setTimeout(function () { - tiptip_holder.stop(true, true).fadeIn(opts.fadeIn) - }, opts.delay) - } - - function deactive_tiptip() { - opts.exit.call(this); - if (timeout) { - clearTimeout(timeout) - } - tiptip_holder.fadeOut(opts.fadeOut) - } - } - }) - } -})(jQuery); \ No newline at end of file diff --git a/app/assets/javascripts/premium-admin.js.coffee b/app/assets/javascripts/premium-admin.js.coffee index f7d598fe..de6e968c 100644 --- a/app/assets/javascripts/premium-admin.js.coffee +++ b/app/assets/javascripts/premium-admin.js.coffee @@ -1,7 +1,7 @@ $ -> last_zindex = 0 - $("a.close-editor").live "click", (e)-> + $("a.close-editor").click (e)-> sectionSel = $(@).attr("href") section = $(sectionSel) form = section.find(".form").addClass('hide') @@ -9,7 +9,7 @@ $ -> e.preventDefault() turnUpTheLights() - $("a.launch-editor, a.activate-editor").live "click", (e)-> + $("a.launch-editor, a.activate-editor").click (e)-> sectionSel = $(@).attr("href") section = $(sectionSel) form = section.find(".form").removeClass('hide') @@ -17,11 +17,11 @@ $ -> form.css('z-index', 9999) turndownTheLights() - $('form').live "ajax:beforeSend", (e)-> + $('form').on "ajax:beforeSend", (e)-> submit = $(@).children('input[name="commit"]') submit.val("Saving...") - $('form').live "ajax:error", (e, response, error)-> + $('form').on "ajax:error", (e, response, error)-> if response.status == 422 errorList = $(@).children("ul.errors") errorList.html("") @@ -31,11 +31,11 @@ $ -> errorList.prepend("<li>" + data.errors[i] + "</li>") i++ - $('form').live "ajax:complete", (e)-> + $('form').on "ajax:complete", (e)-> submit = $(@).children('input[name="commit"]') submit.val("Save") - $('a.add-interview-step').live "click", (e)-> + $('a.add-interview-step').click (e)-> e.preventDefault() $("ol.edit-interview-steps").append(" <li class='interview-step'> @@ -46,17 +46,17 @@ $ -> </li>") - $('a.remove-interview-step').live "click", (e)-> + $('a.remove-interview-step').click (e)-> e.preventDefault() $(@).parents('li.interview-step').remove() Chute.setApp('502d8ffd3f59d8200c000097') - $("a.remove-photo").live "click", (e)-> + $("a.remove-photo").click (e)-> e.preventDefault() $(@).parent('li.preview-photos').remove() - $("a.photo-chooser").live "click", (e)-> + $("a.photo-chooser").click (e)-> e.preventDefault() width = $(@).attr("data-fit-w") height = $(@).attr("data-fit-h") @@ -71,7 +71,7 @@ $ -> preview.children('img').remove() preview.prepend("<img src='" + url + "'/>") - $("a.photos-chooser").live "click", (e)-> + $("a.photos-chooser").click (e)-> e.preventDefault() width = $(@).attr("data-fit-w") Chute.MediaChooser.choose (urls, data)-> diff --git a/app/assets/javascripts/premium.js.coffee b/app/assets/javascripts/premium.js.coffee index 188a5707..b81eb5fb 100644 --- a/app/assets/javascripts/premium.js.coffee +++ b/app/assets/javascripts/premium.js.coffee @@ -43,7 +43,7 @@ $ -> $(".location-details .selected .description").text(desc) $(".location-details .selected .poi").html(pois) - $("a.mapLocation").live "click", (e)-> + $(document).on "click", "a.mapLocation", (e)-> featureLocation($(@)) e.preventDefault() @@ -54,7 +54,7 @@ $ -> $(".about-members").html(memberElement.siblings(".member_expanded").children().clone()) memberElement.addClass("active") - $("a.show-closeup").live "click", (e)-> + $(document).on "click", "a.show-closeup", (e)-> showCloseupOnMember($(@)) e.preventDefault() @@ -80,11 +80,12 @@ $ -> members_to_show.removeClass('hide') showCloseupOnMember(last_visible.children("a.show-closeup")) - $("a.arrow.right:not(.disable)").live "click", (e)-> + $(document).on "click", "a.arrow.right:not(.disable)", (e)-> e.preventDefault() moveRight() - $("a.arrow.left:not(.disable)").live "click", (e)-> + $(document).on "click", "a.arrow.left:not(.disable)", (e)-> + e.preventDefault() moveLeft() @@ -104,9 +105,6 @@ $ -> # gutterWidth: gutter # isFitWidth: true - $('.apply:not(.applied)').on 'click', -> - $(@).toggleClass('applied') - $('.active-opportunity, .inactive-opportunity').on 'click', -> $(@).toggleClass('active-opportunity') $(@).toggleClass('inactive-opportunity') @@ -183,14 +181,36 @@ registerApplication = -> $(this).toggleClass('hide-application') $('input[type=file]').on 'change', -> - theform = $(this).closest('form') - file = theform.find('input:file').get(0).files[0] - formData = new FormData(theform.get(0)) - xhr = new XMLHttpRequest() - xhr.open('PUT', theform.attr('action'), true) - xhr.send(formData) + uploading_begin_text = "Your resume is uploading ..." + uploading_finished_text = "Send your resume using the button below." + + form = $(this).closest('form') + status = $(".application p.status") + status.text(uploading_begin_text) + + formData = new FormData(form.get(0)) + + # Using a timeout due to weird behavior with change event + # on file input. In testing, browser would not redraw until this + # change function returned, therefore the status text above was never displayed + send_request = ()-> + req = $.ajax + url: form.attr('action') + data: formData + cache: false + processData: false + contentType: false + type: 'POST' + + req.done (data,response,xhr)-> + $(".send-application.disabled").removeClass("disabled").css("display","block") + form.css("display","none") + status.text(uploading_finished_text) + return + + setTimeout(send_request, 100) + return $('a.send-application:not(.applied)').on 'click', (e)-> - $(this).addClass('applied') $(this).href('#already-applied') diff --git a/app/assets/javascripts/protips-grid.js.coffee b/app/assets/javascripts/protips-grid.js.coffee deleted file mode 100644 index 5d4df998..00000000 --- a/app/assets/javascripts/protips-grid.js.coffee +++ /dev/null @@ -1,22 +0,0 @@ -#= require ./highlight/highlight -#= require ./highlight/language -#= require ./backbone/routers/ProtipRouter -#= require ./backbone/views/ProtipGridView -#= require ./backbone/views/ProtipView -#= require ./protips -$ -> - Backbone.history.start({pushState: true}) - history.pushState(null, null, window.location.href) - Backbone.history.push - window.protipRouter = new ProtipRouter() - window.protipGrid = new ProtipGridView(protipRouter) - -window.registerProtipClickOff = -> - $('html').on 'click', (e)-> - activePane = $('#x-active-preview-pane') - #contains works on dom elements not jquery - content = activePane.find('.x-protip-content') - if((activePane.length > 0) && (content.length > 0) && !$.contains(content[0], e.target)) - activePane.fadeTo('fast', 0) - activePane.remove() - window.history.back() diff --git a/app/assets/javascripts/protips.js.coffee b/app/assets/javascripts/protips.js.coffee index 15a745b2..64285a19 100644 --- a/app/assets/javascripts/protips.js.coffee +++ b/app/assets/javascripts/protips.js.coffee @@ -1,10 +1,12 @@ -# Place all the behaviors and hooks related to the matching controller here. -# All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ -#= require showdown +#= require marked +#= require highlight/highlight +#= require highlight/language #= require blur #= require jquery.filedrop -#= require vendor/jquery.textselection +#= require jquery.textselection +#= require local_time +#= require selectize window.handle_redirect = (response)-> window.location = response.to if (response.status == "redirect") @@ -30,11 +32,24 @@ $ -> if event.keyCode == 13 search(null) + $('#protip_tags').selectize + delimiter: ',' + persist: false + placeholder: "Tags, comma separated" + create: (input) -> + { + value: input, + text: input + } + + enablePreviewEditing() + window.initializeProtip = -> if inEditMode = $(".x-tip-content.preview").length > 0 setTimeout (-> animateFloat()), 100 + registerAutosaver() registerTextareaAutoResize() registerFlipper() enableDragNDrop() @@ -57,6 +72,7 @@ window.initializeProtip = -> handle_redirect(response) e.preventDefault() + markFollowings() registerToggles() enableSearchBox() registerMoreHistory() @@ -67,6 +83,7 @@ window.initializeProtip = -> fixScrollBars() fillComment() setupMobileMenu() + show_hide_by_current_user() toggleSubscriptionStatus = (subscription_link) -> # subscription_link.toggleClass('protip-subscribe') @@ -141,6 +158,11 @@ fetchPreview = -> success: (data, status, xhr) -> preview(data) +registerAutosaver = -> + window.protip_auto_saver = new Coderwall.Autosaver.TextField({field_id: "protip_body", key_append: window.current_user}) + $("#protip-save-and-publish-button").on "click" , ()-> + window.protip_auto_saver.clear() + registerTextareaAutoResize = -> $("textarea").keydown (event) -> if event.keycode == 13 @@ -198,6 +220,12 @@ uploadFinished = (i, file, response, time)-> $('#protip_body').val $('#protip_body').val() + markdown $("#dropzone").removeClass 'upload-in-progress' +getFollowings = (type)-> + $('#x-following-' + type.toLowerCase()).data(type.toLowerCase()) + +markFollowings = -> + $(follow).addClass('followed') for follow in $('.x-protip-pane .follow') when follow.attributes['data-value'].value in getFollowings($(follow).data('follow-type')) + window.registerToggles = -> $('.upvote,.small-upvote').on 'click', -> if $(@).not('.upvoted').length == 1 @@ -207,16 +235,14 @@ window.registerToggles = -> $(@).toggleClass('flagged') $('.user-flag').on 'click', -> $(@).addClass('user-flagged') - $('.queue').on 'click', -> - $(@).toggleClass('queued') $('.feature').on 'click', -> $(@).toggleClass('featured') $('.like').on 'click', -> $(@).addClass('liked') $(@).removeClass('not-liked') - $('.follow-user').on 'click', -> - $(@).addClass('following-user') - $(@).removeClass('follow-user') + $('.follow').on 'click', (e)-> + unless $(e.target).data('follow-type') == 'Network' + $(e.target).toggleClass('followed') enableSearchBox = -> $('.slidedown').on 'click', (e)-> @@ -336,3 +362,16 @@ toggleCommentEditMode = (comment)-> comment.children('p').first().toggleClass('hidden') comment.find('.edit-comment').toggleClass('hidden') comment.siblings('ul.edit-del').toggleClass('hidden') + +marked.setOptions highlight: (code) -> + hljs.highlightAuto(code).value + +enablePreviewEditing = -> + if $('.preview-body').length > 0 + updatePreview = -> + markdown = marked $('#protip_body').val(), gfm: true + $('.preview-body').html markdown + + $('#protip_body').on 'keyup', updatePreview + + updatePreview() diff --git a/app/assets/javascripts/settings.js.coffee b/app/assets/javascripts/settings.js.coffee deleted file mode 100644 index c4d84b25..00000000 --- a/app/assets/javascripts/settings.js.coffee +++ /dev/null @@ -1,34 +0,0 @@ -$ -> - showProfileSection = (navigationElement) -> - $("a.filternav").removeClass "active" - navigationElement.addClass "active" - $(".editsection").hide() - $(navigationElement.attr("href") + "_section").fadeIn() - - $("a.filternav").click (e) -> - showProfileSection $(this) - - $('a[href=#jobs]').click (e) -> - $('#pb').show(); - $('a.filternav:not(a[href=#jobs])').click (e) -> - $('#pb').hide(); - - unless window.location.hash is "" - preSelectedNavigationElement = $("a.filternav[href=\"" + window.location.hash + "\"]") - showProfileSection preSelectedNavigationElement - - Chute.setApp('502d8ffd3f59d8200c000097') - $("a.photo-chooser").live "click", (e)-> - e.preventDefault() - width = $(@).attr("data-fit-w") - height = $(@).attr("data-fit-h") - input = $('#' + $(@).attr("data-input")) - preview = $(@).parents('.preview') - Chute.MediaChooser.choose #https://github.com/chute/media-chooser - limit: 1, - (urls, data)-> - url = urls[0] - url = Chute.fit(width, height, url) - input.val(url) - preview.children('img').remove() - preview.prepend("<img src='" + url + "'/>") diff --git a/app/assets/javascripts/signup.js b/app/assets/javascripts/signup.js deleted file mode 100644 index 294ac081..00000000 --- a/app/assets/javascripts/signup.js +++ /dev/null @@ -1,19 +0,0 @@ -$(function () { - var username = $("#user_username"); - var message = $("#username_validation"); - - username.live('blur', validateUsername); - - function validateUsername() { - message.stop(); - message.show().html('Validating your username....'); - var verificationUrl = username.attr('data-validation') + "/" + username.val(); - $.get(verificationUrl,function (data) { - message.show().removeClass('failed').html("Great username! It's all yours.").delay(5000).fadeOut(); - }).error(function (data) { - message.show().addClass('failed').html('That username has already been taken!'); - }); - } - - validateUsername(); -}); \ No newline at end of file diff --git a/app/assets/javascripts/teams.js.coffee b/app/assets/javascripts/teams.js.coffee index 1ae8856b..af3b1100 100644 --- a/app/assets/javascripts/teams.js.coffee +++ b/app/assets/javascripts/teams.js.coffee @@ -29,7 +29,7 @@ $ -> fixTeamNavigation() fixUserCloseup() - $("ul.team-members-list li img").live "mouseenter", -> + $("ul.team-members-list li img").mouseenter -> closeUpHtml = $(this).parents("li").find(".user-close-up").clone() $("#user-close-up").html(closeUpHtml) diff --git a/app/assets/javascripts/username-validation.js b/app/assets/javascripts/username-validation.js new file mode 100644 index 00000000..890786b0 --- /dev/null +++ b/app/assets/javascripts/username-validation.js @@ -0,0 +1,19 @@ +$(function () { + var username = $("#user_username"); + var message = $("#username_validation"); + + username.blur(validateUsername); + + function validateUsername() { + message.stop(); + message.show().html('Validating your username....'); + var verificationUrl = username.attr('data-validation') + "/" + username.val(); + $.get(verificationUrl,function (data) { + message.show().removeClass('failed').html("Great username! It's all yours.").delay(5000).fadeOut(); + }).error(function (data) { + message.show().addClass('failed').html('That username has already been taken!'); + }); + } + + validateUsername(); +}); \ No newline at end of file diff --git a/app/assets/javascripts/users.js b/app/assets/javascripts/users.js index 288f6f30..9b95d1e7 100644 --- a/app/assets/javascripts/users.js +++ b/app/assets/javascripts/users.js @@ -1,37 +1,37 @@ $(function () { - $('a.add-to-network:not(.noauth)').live('click', function (e) { + $('a.add-to-network:not(.noauth)').click(function (e) { var follow_button = $(this); follow_button.toggleClass('following'); e.preventDefault(); }); - $('.skill-left > ul > li').live('hover', function (e) { + $('.skill-left > ul > li').hover(function (e) { $(this).parents('ul.skills li').children('.details').slideDown(); - }) + }); - $('ul.skills > li').live('mouseleave', function (e) { + $('ul.skills > li').mouseleave(function (e) { $(this).children('.details').slideUp(); - }) + }); - $('a.endorsed').live('click', function (e) { + $('a.endorsed').click(function (e) { e.preventDefault(); - }) + }); - $('a[href="#addskill"]').live('click', function (e) { + $('a[href="#addskill"]').click(function (e) { $('#add-skill').slideDown(); e.preventDefault(); - }) + }); - $('.embed-code-button').live('click', function (e) { + $('.embed-code-button').click( function (e) { $('.embed-codes').is('.shown') ? $('.embed-codes').slideUp() : $('.embed-codes').slideDown(); $('.embed-codes, .show-embed-codes').toggleClass('shown'); $('.embed-codes').toggleClass('hide'); e.preventDefault(); - }) + }); - $('a.endorse:not(.endorsed, .not-signed-in)').live('click', function (e) { + $('a.endorse:not(.endorsed, .not-signed-in)').click(function (e) { var link = $(this); var form = link.parents('form'); link.addClass('endorsed'); diff --git a/app/assets/javascripts/vendor/ember-rest.js b/app/assets/javascripts/vendor/ember-rest.js deleted file mode 100644 index 4d8d28ab..00000000 --- a/app/assets/javascripts/vendor/ember-rest.js +++ /dev/null @@ -1,337 +0,0 @@ -/** - Ember-REST.js 0.1.1 - - A simple library for RESTful resources in Ember.js - - Copyright (c) 2012 Cerebris Corporation - - Licensed under the MIT license: - http://www.opensource.org/licenses/mit-license.php - */ - -/** - An adapter for performing resource requests - - The default implementation is a thin wrapper around jQuery.ajax(). It is mixed in to both Ember.Resource - and Ember.ResourceController. - - To override Ember.ResourceAdapter entirely, define your own version and include it before this module. - - To override a portion of this adapter, reopen it directly or reopen a particular Ember.Resource or - Ember.ResourceController. You can override `_resourceRequest()` entirely, or just provide an implementation of - `_prepareResourceRequest(params)` to adjust request params before `jQuery.ajax(params)`. - */ -if (Ember.ResourceAdapter === undefined) { - Ember.ResourceAdapter = Ember.Mixin.create({ - /** - @private - - Performs an XHR request with `jQuery.ajax()`. Calls `_prepareResourceRequest(params)` if defined. - */ - _resourceRequest: function (params) { - params.url = this._resourceUrl(); - params.dataType = 'json'; - - if (this._prepareResourceRequest !== undefined) { - this._prepareResourceRequest(params); - } - - return jQuery.ajax(params); - } - }); -} - -/** - A model class for RESTful resources - - Extend this class and define the following properties: - - * `resourceIdField` -- the id field for this resource ('id' by default) - * `resourceUrl` -- the base url of the resource (e.g. '/contacts'); - will append '/' + id for individual resources (required) - * `resourceName` -- the name used to contain the serialized data in this - object's JSON representation (required only for serialization) - * `resourceProperties` -- an array of property names to be returned in this - object's JSON representation (required only for serialization) - - Because `resourceName` and `resourceProperties` are only used for - serialization, they aren't required for read-only resources. - - You may also wish to override / define the following methods: - - * `serialize()` - * `serializeProperty(prop)` - * `deserialize(json)` - * `deserializeProperty(prop, value)` - * `validate()` - */ -Ember.Resource = Ember.Object.extend(Ember.ResourceAdapter, Ember.Copyable, { - resourceIdField: 'id', - resourceUrl: Ember.required(), - - /** - Duplicate properties from another resource - - * `source` -- an Ember.Resource object - * `props` -- the array of properties to be duplicated; - defaults to `resourceProperties` - */ - duplicateProperties: function (source, props) { - var prop; - - if (props === undefined) props = this.resourceProperties; - - for (var i = 0; i < props.length; i++) { - prop = props[i]; - this.set(prop, source.get(prop)); - } - }, - - /** - Create a copy of this resource - - Needed to implement Ember.Copyable - - REQUIRED: `resourceProperties` - */ - copy: function (deep) { - var c = this.constructor.create(); - c.duplicateProperties(this); - c.set(this.resourceIdField, this.get(this.resourceIdField)); - return c; - }, - - /** - Generate this resource's JSON representation - - Override this or `serializeProperty` to provide custom serialization - - REQUIRED: `resourceProperties` and `resourceName` (see note above) - */ - serialize: function () { - var name = this.resourceName, - props = this.resourceProperties, - prop, - ret = {}; - - ret[name] = {}; - for (var i = 0; i < props.length; i++) { - prop = props[i]; - ret[name][prop] = this.serializeProperty(prop); - } - return ret; - }, - - /** - Generate an individual property's JSON representation - - Override to provide custom serialization - */ - serializeProperty: function (prop) { - return this.get(prop); - }, - - /** - Set this resource's properties from JSON - - Override this or `deserializeProperty` to provide custom deserialization - */ - deserialize: function (json) { - Ember.beginPropertyChanges(this); - for (var prop in json) { - if (json.hasOwnProperty(prop)) this.deserializeProperty(prop, json[prop]); - } - Ember.endPropertyChanges(this); - return this; - }, - - /** - Set an individual property from its value in JSON - - Override to provide custom serialization - */ - deserializeProperty: function (prop, value) { - this.set(prop, value); - }, - - /** - Request resource and deserialize - - REQUIRED: `id` - */ - findResource: function () { - var self = this; - - return this._resourceRequest({type: 'GET'}) - .done(function (json) { - self.deserialize(json); - }); - }, - - /** - Create (if new) or update (if existing) record - - Will call validate() if defined for this record - - If successful, updates this record's id and other properties - by calling `deserialize()` with the data returned. - - REQUIRED: `properties` and `name` (see note above) - */ - saveResource: function () { - var self = this; - - if (this.validate !== undefined) { - var error = this.validate(); - if (error) { - return { - fail: function (f) { - f(error); - return this; - }, - done: function () { - return this; - }, - always: function (f) { - f(); - return this; - } - }; - } - } - - return this._resourceRequest({type: this.isNew() ? 'POST' : 'PUT', - data: this.serialize()}) - .done(function (json) { - // Update properties - if (json) self.deserialize(json); - }); - }, - - /** - Delete resource - */ - destroyResource: function () { - return this._resourceRequest({type: 'DELETE'}); - }, - - /** - Is this a new resource? - */ - isNew: function () { - return (this._resourceId() === undefined); - }, - - /** - @private - - The URL for this resource, based on `resourceUrl` and `_resourceId()` (which will be - undefined for new resources). - */ - _resourceUrl: function () { - var url = this.resourceUrl, - id = this._resourceId(); - - if (id !== undefined) - url += '/' + id; - - return url; - }, - - /** - @private - - The id for this resource. - */ - _resourceId: function () { - return this.get(this.resourceIdField); - } -}); - -/** - A controller for RESTful resources - - Extend this class and define the following: - - * `resourceType` -- an Ember.Resource class; the class must have a `serialize()` method - that returns a JSON representation of the object - * `resourceUrl` -- (optional) the base url of the resource (e.g. '/contacts/active'); - will default to the `resourceUrl` for `resourceType` - */ -Ember.ResourceController = Ember.ArrayController.extend(Ember.ResourceAdapter, { - resourceType: Ember.required(), - - /** - @private - */ - init: function () { - this._super(); - this.clearAll(); - }, - - /** - Create and load a single `Ember.Resource` from JSON - */ - load: function (json) { - var resource = this.get('resourceType').create().deserialize(json); - this.pushObject(resource); - }, - - /** - Create and load `Ember.Resource` objects from a JSON array - */ - loadAll: function (json) { - for (var i = 0; i < json.length; i++) - this.load(json[i]); - }, - - /** - Clear this controller's contents (without deleting remote resources) - */ - clearAll: function () { - this.set("content", []); - }, - - /** - Replace this controller's contents with an request to `url` - */ - findAll: function () { - var self = this; - - return this._resourceRequest({type: 'GET'}) - .done(function (json) { - self.clearAll(); - self.loadAll(json); - }); - }, - - /** - @private - - Base URL for requests - - Will use the `resourceUrl` set for this controller, or if that's missing, - the `resourceUrl` specified for `resourceType`. - */ - _resourceUrl: function () { - if (this.resourceUrl === undefined) { - // If `resourceUrl` is not defined for this controller, there are a couple - // ways to retrieve it from the resource. If a resource has been instantiated, - // then it can be retrieved from the resource's prototype. Otherwise, we need - // to loop through the mixins for the prototype to get the resourceUrl. - var rt = this.get('resourceType'); - if (rt.prototype.resourceUrl === undefined) { - for (var i = rt.PrototypeMixin.mixins.length - 1; i >= 0; i--) { - var m = rt.PrototypeMixin.mixins[i]; - if (m.properties !== undefined && m.properties.resourceUrl !== undefined) { - return m.properties.resourceUrl; - } - } - } - else { - return rt.prototype.resourceUrl; - } - } - return this.resourceUrl; - } -}); \ No newline at end of file diff --git a/app/assets/javascripts/vendor/ember-routemanager.js b/app/assets/javascripts/vendor/ember-routemanager.js deleted file mode 100644 index fe4c2cd6..00000000 --- a/app/assets/javascripts/vendor/ember-routemanager.js +++ /dev/null @@ -1,566 +0,0 @@ -var get = Ember.get, set = Ember.set; - -/** - Whether the browser supports HTML5 history. - */ -var supportsHistory = !!(window.history && window.history.pushState); - -/** - Whether the browser supports the hashchange event. - */ -var supportsHashChange = ('onhashchange' in window) && (document.documentMode === undefined || document.documentMode > 7); - -/** - @class - Ember.RouteManager manages the browser location and changes states accordingly - to the current location. The location can be programmatically set as follows: - - routeManager.set('location', 'notes/edit/4'); - - Ember.RouteManager also supports HTML5 history, which uses a '/' instead of a - '#!' in the URLs, so that all your website's URLs are consistent. - */ -Ember.RouteManager = Ember.StateManager.extend({ - - /** - Set this property to true if you want to use HTML5 history, if available on - the browser, instead of the location hash. - - HTML 5 history uses the history.pushState method and the window's popstate - event. - - By default it is false, so your URLs will look like: - - http://domain.tld/my_app#!notes/edit/4 - - If set to true and the browser supports pushState(), your URLs will look - like: - - http://domain.tld/my_app/notes/edit/4 - - You will also need to make sure that baseURI is properly configured, as - well as your server so that your routes are properly pointing to your - Ember application. - - @see http://dev.w3.org/html5/spec/history.html#the-history-interface - @property - @type {Boolean} - */ - wantsHistory: false, - - /** - A read-only boolean indicating whether or not HTML5 history is used. Based - on the value of wantsHistory and the browser's support for pushState. - - @see wantsHistory - @property - @type {Boolean} - */ - usesHistory: null, - - /** - The base URI used to resolve routes (which are relative URLs). Only used - when usesHistory is equal to true. - - The build tools automatically configure this value if you have the - html5_history option activated in the Buildfile: - - config :my_app, :html5_history => true - - Alternatively, it uses by default the value of the href attribute of the - <base> tag of the HTML document. For example: - - <base href="http://domain.tld/my_app"> - - The value can also be customized before or during the exectution of the - main() method. - - @see http://www.w3.org/TR/html5/semantics.html#the-base-element - @property - @type {String} - */ - baseURI: document.baseURI, - - /** @private - A boolean value indicating whether or not the ping method has been called - to setup the Ember.routes. - - @property - @type {Boolean} - */ - _didSetup: false, - - /** @private - Internal representation of the current location hash. - - @property - @type {String} - */ - _location: null, - - /** @private - Internal method used to extract and merge the parameters of a URL. - - @returns {Hash} - */ - _extractParametersAndRoute: function (obj) { - var params = {}, route = obj.route || '', separator, parts, i, len, crumbs, key; - separator = (route.indexOf('?') < 0 && route.indexOf('&') >= 0) ? '&' : '?'; - parts = route.split(separator); - route = parts[0]; - if (parts.length === 1) { - parts = []; - } else if (parts.length === 2) { - parts = parts[1].split('&'); - } else if (parts.length > 2) { - parts.shift(); - } - - // extract the parameters from the route string - len = parts.length; - for (i = 0; i < len; ++i) { - crumbs = parts[i].split('='); - params[crumbs[0]] = crumbs[1]; - } - - // overlay any parameter passed in obj - for (key in obj) { - if (obj.hasOwnProperty(key) && key !== 'route') { - params[key] = '' + obj[key]; - } - } - - // build the route - parts = []; - for (key in params) { - parts.push([key, params[key]].join('=')); - } - params.params = separator + parts.join('&'); - params.route = route; - - return params; - }, - - /** - The current location hash. It is the part in the browser's location after - the '#!' mark. - - @property - @type {String} - */ - location: Ember.computed(function (key, value) { - this._skipRoute = false; - return this._extractLocation(key, value); - }).property(), - - _extractLocation: function (key, value) { - var crumbs, encodedValue; - - if (value !== undefined) { - if (value === null) { - value = ''; - } - - if (typeof (value) === 'object') { - crumbs = this._extractParametersAndRoute(value); - value = crumbs.route + crumbs.params; - } - - if (!this._skipPush && (!Ember.empty(value) || (this._location && this._location !== value))) { - encodedValue = encodeURI(value); - - if (this.usesHistory) { - encodedValue = '/' + encodedValue; - window.history.pushState(null, null, get(this, 'baseURI') + encodedValue); - } else if (encodedValue.length > 0 || window.location.hash.length > 0) { - window.location.hash = '!' + encodedValue; - } - } - - this._location = value; - } - - return this._location; - }, - - updateLocation: function (loc) { - this._skipRoute = true; - return this._extractLocation('location', loc); - }, - - /** - Start this routemanager. - - Registers for the hashchange event if available. If not, it creates a - timer that looks for location changes every 150ms. - */ - start: function () { - if (!this._didSetup) { - this._didSetup = true; - var state = ''; - - if (get(this, 'wantsHistory') && supportsHistory) { - this.usesHistory = true; - - // Move any hash state to url state - if (!Ember.empty(window.location.hash)) { - state = window.location.hash.slice(1); - if (state.length > 0) { - state = '/' + state; - window.history.replaceState(null, null, get(this, 'baseURI') + state); - } - } - - this.popState(); - this.popState = jQuery.proxy(this.popState, this); - jQuery(window).bind('popstate', this.popState); - - } else { - this.usesHistory = false; - - if (get(this, 'wantsHistory')) { - // Move any url state to hash - var base = get(this, 'baseURI'); - var loc = (base.charAt(0) === '/') ? document.location.pathname : document.location.href.replace(document.location.hash, ''); - state = loc.slice(base.length + 1); - if (state.length > 0) { - window.location.href = base + '#!' + state; - } - } - - if (supportsHashChange) { - this.hashChange(); - this.hashChange = jQuery.proxy(this.hashChange, this); - jQuery(window).bind('hashchange', this.hashChange); - - } else { - // we don't use a Ember.Timer because we don't want - // a run loop to be triggered at each ping - var _this = this, invokeHashChange = function () { - _this.hashChange(); - _this._timerId = setTimeout(invokeHashChange, 100); - }; - - invokeHashChange(); - } - } - } - }, - - /** - Stop this routemanager - */ - stop: function () { - if (this._didSetup) { - if (get(this, 'wantsHistory') && supportsHistory) { - jQuery(window).unbind('popstate', this.popState); - } else { - if (supportsHashChange) { - jQuery(window).unbind('hashchange', this.hashChange); - } else { - clearTimeout(this._timerId); - } - } - this._didSetup = false; - } - }, - - destroy: function () { - this.stop(); - this._super(); - }, - - /** - Observer of the 'location' property that calls the correct route handler - when the location changes. - */ - locationDidChange: Ember.observer(function () { - this.trigger(); - }, 'location'), - - /** - Triggers a route even if already in that route (does change the location, if - it is not already changed, as well). - - If the location is not the same as the supplied location, this simply lets - "location" handle it (which ends up coming back to here). - */ - trigger: function () { - var location = get(this, 'location'), params, route; - params = this._extractParametersAndRoute({ - route: location - }); - location = params.route; - delete params.route; - delete params.params; - - var result = this.getState(location, params); - if (result) { - set(this, 'params', result.params); - - // We switch states in two phases. The point of this is to handle - // parameter-only location changes. This will correspond to the same - // state path in the manager, but states with parts with changed - // parameters should be re-entered: - - // 1. We go to the earliest clean state. This prevents - // unnecessary transitions. - if (result.cleanStates.length > 0) { - var cleanState = result.cleanStates.join('.'); - this.goToState(cleanState); - } - - // 2. We transition to the dirty state. This forces dirty - // states to be transitioned. - if (result.dirtyStates.length > 0) { - var dirtyState = result.cleanStates.concat(result.dirtyStates).join('.'); - // Special case for re-entering the root state on a parameter change - if (this.currentState && dirtyState === this.currentState.get('path')) { - this.goToState('__nullState'); - } - this.goToState(dirtyState); - } - } else { - var states = get(this, 'states'); - if (states && get(states, "404")) { - this.goToState("404"); - } - } - }, - - getState: function (route, params) { - var parts = route.split('/'); - parts = parts.filter(function (part) { - return part !== ''; - }); - - return this._findState(parts, this, [], [], params, false); - }, - - /** @private - Recursive helper that the state and the params if a match is found - */ - _findState: function (parts, state, cleanStates, dirtyStates, params) { - parts = Ember.copy(parts); - - var hasChildren = false, name, states, childState; - // sort desc based on priority - states = []; - for (name in state.states) { - // 404 state is special and not matched - childState = state.states[name]; - if (name == "404" || !Ember.State.detect(childState) && !( childState instanceof Ember.State)) { - continue; - } - states.push({ - name: name, - state: childState - }); - } - states = states.sort(function (a, b) { - return (b.state.get('priority') || 0) - (a.state.get('priority') || 0); - }); - - for (var i = 0; i < states.length; i++) { - name = states[i].name; - childState = states[i].state; - if (!( childState instanceof Ember.State)) { - continue; - } - hasChildren = true; - - var result = this._matchState(parts, childState, params); - if (!result) { - continue; - } - - var newParams = Ember.copy(params); - jQuery.extend(newParams, result.params); - - var dirty = dirtyStates.length > 0 || result.dirty; - var newCleanStates = cleanStates; - var newDirtyStates = dirtyStates; - if (dirty) { - newDirtyStates = Ember.copy(newDirtyStates); - newDirtyStates.push(name); - } else { - newCleanStates = Ember.copy(newCleanStates); - newCleanStates.push(name); - } - result = this._findState(result.parts, childState, newCleanStates, newDirtyStates, newParams); - if (result) { - return result; - } - } - - if (!hasChildren && parts.length === 0) { - return { - state: state, - params: params, - cleanStates: cleanStates, - dirtyStates: dirtyStates - }; - } - return null; - }, - - /** @private - Check if a state accepts the parts with the params - - Returns the remaining parts as well as merged params if - the state accepts. - - Will also set the dirty flag if the route is the same but - the parameters have changed - */ - _matchState: function (parts, state, params) { - parts = Ember.copy(parts); - params = Ember.copy(params); - var dirty = false; - var route = get(state, 'route'); - if (route) { - var partDefinitions; - // route could be either a string or regex - if (typeof route == "string") { - partDefinitions = route.split('/'); - } else if (route instanceof RegExp) { - partDefinitions = [route]; - } else { - Ember.assert("route must be either a string or regexp", false); - } - - for (var i = 0; i < partDefinitions.length; i++) { - if (parts.length === 0) { - return false; - } - var part = parts.shift(); - var partDefinition = partDefinitions[i]; - var partParams = this._matchPart(partDefinition, part, state); - if (!partParams) { - return false; - } - - var oldParams = this.get('params') || {}; - for (var param in partParams) { - dirty = dirty || (oldParams[param] != partParams[param]); - } - - jQuery.extend(params, partParams); - } - } - - var enabled = get(state, 'enabled'); - if (enabled !== undefined && !enabled) { - return false; - } - - return { - parts: parts, - params: params, - dirty: dirty - }; - }, - - /** @private - Returns params if the part matches the partDefinition - */ - _matchPart: function (partDefinition, part, state) { - var params = {}; - - // Handle string parts - if (typeof partDefinition == "string") { - - switch (partDefinition.slice(0, 1)) { - // 1. dynamic routes - case ':': - var name = partDefinition.slice(1, partDefinition.length); - params[name] = part; - return params; - - // 2. wildcard routes - case '*': - return {}; - - // 3. static routes - default: - if (partDefinition == part) - return {}; - break; - } - - return false; - } - - if (partDefinition instanceof RegExp) { - // JS doesn't support named capture groups in Regexes so instead - // we can define a list of 'captures' which maps to the matched groups - var captures = get(state, 'captures'); - var matches = partDefinition.exec(part); - - if (matches) { - if (captures) { - var len = captures.length, i; - for (i = 0; i < len; ++i) { - params[captures[i]] = matches[i + 1]; - } - } - return params; - } else { - return false; - } - } - - return false; - }, - - /** - Event handler for the hashchange event. Called automatically by the browser - if it supports the hashchange event, or by our timer if not. - */ - hashChange: function (event) { - var loc = window.location.hash; - var routes = this; - - // Remove the '#!' prefix - loc = (loc && loc.length > 1) ? loc.slice(2, loc.length) : ''; - - if (!jQuery.browser.mozilla) { - // because of bug https://bugzilla.mozilla.org/show_bug.cgi?id=483304 - loc = decodeURI(loc); - } - - if (get(routes, 'location') !== loc && !routes._skipRoute) { - Ember.run.once(function () { - routes._skipPush = true; - set(routes, 'location', loc); - routes._skipPush = false; - }); - - } - routes._skipRoute = false; - }, - - popState: function (event) { - var routes = this; - var base = get(routes, 'baseURI'), loc = (base.charAt(0) === '/') ? document.location.pathname : document.location.href; - - if (loc.slice(0, base.length) === base) { - // Remove the base prefix and the extra '/' - loc = loc.slice(base.length + 1, loc.length); - - if (get(routes, 'location') !== loc && !routes._skipRoute) { - Ember.run.once(function () { - routes._skipPush = true; - set(routes, 'location', loc); - routes._skipPush = false; - }); - - } - } - routes._skipRoute = false; - }, - - // This is used to re-enter a dirty root state - __nullState: Ember.State.create({enabled: false}) - -}); \ No newline at end of file diff --git a/app/assets/javascripts/vendor/ember.js b/app/assets/javascripts/vendor/ember.js deleted file mode 100644 index 53faee9d..00000000 --- a/app/assets/javascripts/vendor/ember.js +++ /dev/null @@ -1,19494 +0,0 @@ -(function () { - /*global __fail__*/ - - /** - Define an assertion that will throw an exception if the condition is not - met. Ember build tools will remove any calls to ember_assert() when - doing a production build. - - ## Examples - - #js: - - // pass a simple Boolean value - ember_assert('must pass a valid object', !!obj); - - // pass a function. If the function returns false the assertion fails - // any other return value (including void) will pass. - ember_assert('a passed record must have a firstName', function() { - if (obj instanceof Ember.Record) { - return !Ember.empty(obj.firstName); - } - }); - - @static - @function - @param {String} desc - A description of the assertion. This will become the text of the Error - thrown if the assertion fails. - - @param {Boolean} test - Must return true for the assertion to pass. If you pass a function it - will be executed. If the function returns false an exception will be - thrown. - */ - window.ember_assert = function ember_assert(desc, test) { - if ('function' === typeof test) test = test() !== false; - if (!test) throw new Error("assertion failed: " + desc); - }; - - - /** - Display a warning with the provided message. Ember build tools will - remove any calls to ember_warn() when doing a production build. - - @static - @function - @param {String} message - A warning to display. - - @param {Boolean} test - An optional boolean or function. If the test returns false, the warning - will be displayed. - */ - window.ember_warn = function (message, test) { - if (arguments.length === 1) { - test = false; - } - if ('function' === typeof test) test = test() !== false; - if (!test) console.warn("WARNING: " + message); - }; - - /** - Display a deprecation warning with the provided message and a stack trace - (Chrome and Firefox only). Ember build tools will remove any calls to - ember_deprecate() when doing a production build. - - @static - @function - @param {String} message - A description of the deprecation. - - @param {Boolean} test - An optional boolean or function. If the test returns false, the deprecation - will be displayed. - */ - window.ember_deprecate = function (message, test) { - if (Ember && Ember.TESTING_DEPRECATION) { - return; - } - - if (arguments.length === 1) { - test = false; - } - if ('function' === typeof test) { - test = test() !== false; - } - if (test) { - return; - } - - if (Ember && Ember.ENV.RAISE_ON_DEPRECATION) { - throw new Error(message); - } - - var error, stackStr = ''; - - // When using new Error, we can't do the arguments check for Chrome. Alternatives are welcome - try { - __fail__.fail(); - } catch (e) { - error = e; - } - - if (error.stack) { - var stack; - - if (error['arguments']) { - // Chrome - stack = error.stack.replace(/^\s+at\s+/gm, ''). - replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2'). - replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n'); - stack.shift(); - } else { - // Firefox - stack = error.stack.replace(/(?:\n@:0)?\s+$/m, ''). - replace(/^\(/gm, '{anonymous}(').split('\n'); - } - - stackStr = "\n " + stack.slice(2).join("\n "); - } - - console.warn("DEPRECATION: " + message + stackStr); - }; - - - /** - Display a deprecation warning with the provided message and a stack trace - (Chrome and Firefox only) when the wrapped method is called. - - @static - @function - @param {String} message - A description of the deprecation. - - @param {Function} func - The function to be deprecated. - */ - window.ember_deprecateFunc = function (message, func) { - return function () { - window.ember_deprecate(message); - return func.apply(this, arguments); - }; - }; - -})(); - -(function () { -// lib/handlebars/base.js - var Handlebars = {}; - - window.Handlebars = Handlebars; - - Handlebars.VERSION = "1.0.beta.2"; - - Handlebars.helpers = {}; - Handlebars.partials = {}; - - Handlebars.registerHelper = function (name, fn, inverse) { - if (inverse) { - fn.not = inverse; - } - this.helpers[name] = fn; - }; - - Handlebars.registerPartial = function (name, str) { - this.partials[name] = str; - }; - - Handlebars.registerHelper('helperMissing', function (arg) { - if (arguments.length === 2) { - return undefined; - } else { - throw new Error("Could not find property '" + arg + "'"); - } - }); - - Handlebars.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse || function () { - }, fn = options.fn; - - - var ret = ""; - var type = Object.prototype.toString.call(context); - - if (type === "[object Function]") { - context = context(); - } - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (type === "[object Array]") { - if (context.length > 0) { - for (var i = 0, j = context.length; i < j; i++) { - ret = ret + fn(context[i]); - } - } else { - ret = inverse(this); - } - return ret; - } else { - return fn(context); - } - }); - - Handlebars.registerHelper('each', function (context, options) { - var fn = options.fn, inverse = options.inverse; - var ret = ""; - - if (context && context.length > 0) { - for (var i = 0, j = context.length; i < j; i++) { - ret = ret + fn(context[i]); - } - } else { - ret = inverse(this); - } - return ret; - }); - - Handlebars.registerHelper('if', function (context, options) { - if (!context || Handlebars.Utils.isEmpty(context)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - Handlebars.registerHelper('unless', function (context, options) { - var fn = options.fn, inverse = options.inverse; - options.fn = inverse; - options.inverse = fn; - - return Handlebars.helpers['if'].call(this, context, options); - }); - - Handlebars.registerHelper('with', function (context, options) { - return options.fn(context); - }); - - Handlebars.registerHelper('log', function (context) { - Handlebars.log(context); - }); - ; -// lib/handlebars/compiler/parser.js - /* Jison generated parser */ - var handlebars = (function () { - - var parser = {trace: function trace() { - }, - yy: {}, - symbols_: {"error": 2, "root": 3, "program": 4, "EOF": 5, "statements": 6, "simpleInverse": 7, "statement": 8, "openInverse": 9, "closeBlock": 10, "openBlock": 11, "mustache": 12, "partial": 13, "CONTENT": 14, "COMMENT": 15, "OPEN_BLOCK": 16, "inMustache": 17, "CLOSE": 18, "OPEN_INVERSE": 19, "OPEN_ENDBLOCK": 20, "path": 21, "OPEN": 22, "OPEN_UNESCAPED": 23, "OPEN_PARTIAL": 24, "params": 25, "hash": 26, "param": 27, "STRING": 28, "INTEGER": 29, "BOOLEAN": 30, "hashSegments": 31, "hashSegment": 32, "ID": 33, "EQUALS": 34, "pathSegments": 35, "SEP": 36, "$accept": 0, "$end": 1}, - terminals_: {2: "error", 5: "EOF", 14: "CONTENT", 15: "COMMENT", 16: "OPEN_BLOCK", 18: "CLOSE", 19: "OPEN_INVERSE", 20: "OPEN_ENDBLOCK", 22: "OPEN", 23: "OPEN_UNESCAPED", 24: "OPEN_PARTIAL", 28: "STRING", 29: "INTEGER", 30: "BOOLEAN", 33: "ID", 34: "EQUALS", 36: "SEP"}, - productions_: [0, [3, 2], [4, 3], [4, 1], [4, 0], [6, 1], [6, 2], [8, 3], [8, 3], [8, 1], [8, 1], [8, 1], [8, 1], [11, 3], [9, 3], [10, 3], [12, 3], [12, 3], [13, 3], [13, 4], [7, 2], [17, 3], [17, 2], [17, 2], [17, 1], [25, 2], [25, 1], [27, 1], [27, 1], [27, 1], [27, 1], [26, 1], [31, 2], [31, 1], [32, 3], [32, 3], [32, 3], [32, 3], [21, 1], [35, 3], [35, 1]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1] - break; - case 2: - this.$ = new yy.ProgramNode($$[$0 - 2], $$[$0]) - break; - case 3: - this.$ = new yy.ProgramNode($$[$0]) - break; - case 4: - this.$ = new yy.ProgramNode([]) - break; - case 5: - this.$ = [$$[$0]] - break; - case 6: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1] - break; - case 7: - this.$ = new yy.InverseNode($$[$0 - 2], $$[$0 - 1], $$[$0]) - break; - case 8: - this.$ = new yy.BlockNode($$[$0 - 2], $$[$0 - 1], $$[$0]) - break; - case 9: - this.$ = $$[$0] - break; - case 10: - this.$ = $$[$0] - break; - case 11: - this.$ = new yy.ContentNode($$[$0]) - break; - case 12: - this.$ = new yy.CommentNode($$[$0]) - break; - case 13: - this.$ = new yy.MustacheNode($$[$0 - 1][0], $$[$0 - 1][1]) - break; - case 14: - this.$ = new yy.MustacheNode($$[$0 - 1][0], $$[$0 - 1][1]) - break; - case 15: - this.$ = $$[$0 - 1] - break; - case 16: - this.$ = new yy.MustacheNode($$[$0 - 1][0], $$[$0 - 1][1]) - break; - case 17: - this.$ = new yy.MustacheNode($$[$0 - 1][0], $$[$0 - 1][1], true) - break; - case 18: - this.$ = new yy.PartialNode($$[$0 - 1]) - break; - case 19: - this.$ = new yy.PartialNode($$[$0 - 2], $$[$0 - 1]) - break; - case 20: - break; - case 21: - this.$ = [[$$[$0 - 2]].concat($$[$0 - 1]), $$[$0]] - break; - case 22: - this.$ = [[$$[$0 - 1]].concat($$[$0]), null] - break; - case 23: - this.$ = [ - [$$[$0 - 1]], - $$[$0] - ] - break; - case 24: - this.$ = [ - [$$[$0]], - null - ] - break; - case 25: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1]; - break; - case 26: - this.$ = [$$[$0]] - break; - case 27: - this.$ = $$[$0] - break; - case 28: - this.$ = new yy.StringNode($$[$0]) - break; - case 29: - this.$ = new yy.IntegerNode($$[$0]) - break; - case 30: - this.$ = new yy.BooleanNode($$[$0]) - break; - case 31: - this.$ = new yy.HashNode($$[$0]) - break; - case 32: - $$[$0 - 1].push($$[$0]); - this.$ = $$[$0 - 1] - break; - case 33: - this.$ = [$$[$0]] - break; - case 34: - this.$ = [$$[$0 - 2], $$[$0]] - break; - case 35: - this.$ = [$$[$0 - 2], new yy.StringNode($$[$0])] - break; - case 36: - this.$ = [$$[$0 - 2], new yy.IntegerNode($$[$0])] - break; - case 37: - this.$ = [$$[$0 - 2], new yy.BooleanNode($$[$0])] - break; - case 38: - this.$ = new yy.IdNode($$[$0]) - break; - case 39: - $$[$0 - 2].push($$[$0]); - this.$ = $$[$0 - 2]; - break; - case 40: - this.$ = [$$[$0]] - break; - } - }, - table: [ - {3: 1, 4: 2, 5: [2, 4], 6: 3, 8: 4, 9: 5, 11: 6, 12: 7, 13: 8, 14: [1, 9], 15: [1, 10], 16: [1, 12], 19: [1, 11], 22: [1, 13], 23: [1, 14], 24: [1, 15]}, - {1: [3]}, - {5: [1, 16]}, - {5: [2, 3], 7: 17, 8: 18, 9: 5, 11: 6, 12: 7, 13: 8, 14: [1, 9], 15: [1, 10], 16: [1, 12], 19: [1, 19], 20: [2, 3], 22: [1, 13], 23: [1, 14], 24: [1, 15]}, - {5: [2, 5], 14: [2, 5], 15: [2, 5], 16: [2, 5], 19: [2, 5], 20: [2, 5], 22: [2, 5], 23: [2, 5], 24: [2, 5]}, - {4: 20, 6: 3, 8: 4, 9: 5, 11: 6, 12: 7, 13: 8, 14: [1, 9], 15: [1, 10], 16: [1, 12], 19: [1, 11], 20: [2, 4], 22: [1, 13], 23: [1, 14], 24: [1, 15]}, - {4: 21, 6: 3, 8: 4, 9: 5, 11: 6, 12: 7, 13: 8, 14: [1, 9], 15: [1, 10], 16: [1, 12], 19: [1, 11], 20: [2, 4], 22: [1, 13], 23: [1, 14], 24: [1, 15]}, - {5: [2, 9], 14: [2, 9], 15: [2, 9], 16: [2, 9], 19: [2, 9], 20: [2, 9], 22: [2, 9], 23: [2, 9], 24: [2, 9]}, - {5: [2, 10], 14: [2, 10], 15: [2, 10], 16: [2, 10], 19: [2, 10], 20: [2, 10], 22: [2, 10], 23: [2, 10], 24: [2, 10]}, - {5: [2, 11], 14: [2, 11], 15: [2, 11], 16: [2, 11], 19: [2, 11], 20: [2, 11], 22: [2, 11], 23: [2, 11], 24: [2, 11]}, - {5: [2, 12], 14: [2, 12], 15: [2, 12], 16: [2, 12], 19: [2, 12], 20: [2, 12], 22: [2, 12], 23: [2, 12], 24: [2, 12]}, - {17: 22, 21: 23, 33: [1, 25], 35: 24}, - {17: 26, 21: 23, 33: [1, 25], 35: 24}, - {17: 27, 21: 23, 33: [1, 25], 35: 24}, - {17: 28, 21: 23, 33: [1, 25], 35: 24}, - {21: 29, 33: [1, 25], 35: 24}, - {1: [2, 1]}, - {6: 30, 8: 4, 9: 5, 11: 6, 12: 7, 13: 8, 14: [1, 9], 15: [1, 10], 16: [1, 12], 19: [1, 11], 22: [1, 13], 23: [1, 14], 24: [1, 15]}, - {5: [2, 6], 14: [2, 6], 15: [2, 6], 16: [2, 6], 19: [2, 6], 20: [2, 6], 22: [2, 6], 23: [2, 6], 24: [2, 6]}, - {17: 22, 18: [1, 31], 21: 23, 33: [1, 25], 35: 24}, - {10: 32, 20: [1, 33]}, - {10: 34, 20: [1, 33]}, - {18: [1, 35]}, - {18: [2, 24], 21: 40, 25: 36, 26: 37, 27: 38, 28: [1, 41], 29: [1, 42], 30: [1, 43], 31: 39, 32: 44, 33: [1, 45], 35: 24}, - {18: [2, 38], 28: [2, 38], 29: [2, 38], 30: [2, 38], 33: [2, 38], 36: [1, 46]}, - {18: [2, 40], 28: [2, 40], 29: [2, 40], 30: [2, 40], 33: [2, 40], 36: [2, 40]}, - {18: [1, 47]}, - {18: [1, 48]}, - {18: [1, 49]}, - {18: [1, 50], 21: 51, 33: [1, 25], 35: 24}, - {5: [2, 2], 8: 18, 9: 5, 11: 6, 12: 7, 13: 8, 14: [1, 9], 15: [1, 10], 16: [1, 12], 19: [1, 11], 20: [2, 2], 22: [1, 13], 23: [1, 14], 24: [1, 15]}, - {14: [2, 20], 15: [2, 20], 16: [2, 20], 19: [2, 20], 22: [2, 20], 23: [2, 20], 24: [2, 20]}, - {5: [2, 7], 14: [2, 7], 15: [2, 7], 16: [2, 7], 19: [2, 7], 20: [2, 7], 22: [2, 7], 23: [2, 7], 24: [2, 7]}, - {21: 52, 33: [1, 25], 35: 24}, - {5: [2, 8], 14: [2, 8], 15: [2, 8], 16: [2, 8], 19: [2, 8], 20: [2, 8], 22: [2, 8], 23: [2, 8], 24: [2, 8]}, - {14: [2, 14], 15: [2, 14], 16: [2, 14], 19: [2, 14], 20: [2, 14], 22: [2, 14], 23: [2, 14], 24: [2, 14]}, - {18: [2, 22], 21: 40, 26: 53, 27: 54, 28: [1, 41], 29: [1, 42], 30: [1, 43], 31: 39, 32: 44, 33: [1, 45], 35: 24}, - {18: [2, 23]}, - {18: [2, 26], 28: [2, 26], 29: [2, 26], 30: [2, 26], 33: [2, 26]}, - {18: [2, 31], 32: 55, 33: [1, 56]}, - {18: [2, 27], 28: [2, 27], 29: [2, 27], 30: [2, 27], 33: [2, 27]}, - {18: [2, 28], 28: [2, 28], 29: [2, 28], 30: [2, 28], 33: [2, 28]}, - {18: [2, 29], 28: [2, 29], 29: [2, 29], 30: [2, 29], 33: [2, 29]}, - {18: [2, 30], 28: [2, 30], 29: [2, 30], 30: [2, 30], 33: [2, 30]}, - {18: [2, 33], 33: [2, 33]}, - {18: [2, 40], 28: [2, 40], 29: [2, 40], 30: [2, 40], 33: [2, 40], 34: [1, 57], 36: [2, 40]}, - {33: [1, 58]}, - {14: [2, 13], 15: [2, 13], 16: [2, 13], 19: [2, 13], 20: [2, 13], 22: [2, 13], 23: [2, 13], 24: [2, 13]}, - {5: [2, 16], 14: [2, 16], 15: [2, 16], 16: [2, 16], 19: [2, 16], 20: [2, 16], 22: [2, 16], 23: [2, 16], 24: [2, 16]}, - {5: [2, 17], 14: [2, 17], 15: [2, 17], 16: [2, 17], 19: [2, 17], 20: [2, 17], 22: [2, 17], 23: [2, 17], 24: [2, 17]}, - {5: [2, 18], 14: [2, 18], 15: [2, 18], 16: [2, 18], 19: [2, 18], 20: [2, 18], 22: [2, 18], 23: [2, 18], 24: [2, 18]}, - {18: [1, 59]}, - {18: [1, 60]}, - {18: [2, 21]}, - {18: [2, 25], 28: [2, 25], 29: [2, 25], 30: [2, 25], 33: [2, 25]}, - {18: [2, 32], 33: [2, 32]}, - {34: [1, 57]}, - {21: 61, 28: [1, 62], 29: [1, 63], 30: [1, 64], 33: [1, 25], 35: 24}, - {18: [2, 39], 28: [2, 39], 29: [2, 39], 30: [2, 39], 33: [2, 39], 36: [2, 39]}, - {5: [2, 19], 14: [2, 19], 15: [2, 19], 16: [2, 19], 19: [2, 19], 20: [2, 19], 22: [2, 19], 23: [2, 19], 24: [2, 19]}, - {5: [2, 15], 14: [2, 15], 15: [2, 15], 16: [2, 15], 19: [2, 15], 20: [2, 15], 22: [2, 15], 23: [2, 15], 24: [2, 15]}, - {18: [2, 34], 33: [2, 34]}, - {18: [2, 35], 33: [2, 35]}, - {18: [2, 36], 33: [2, 36]}, - {18: [2, 37], 33: [2, 37]} - ], - defaultActions: {16: [2, 1], 37: [2, 23], 53: [2, 21]}, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], // semantic value stack - lstack = [], // location stack - table = this.table, - yytext = '', - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - - //this.reductionCount = this.shiftCount = 0; - - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - if (typeof this.lexer.yylloc == 'undefined') - this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - - if (typeof this.yy.parseError === 'function') - this.parseError = this.yy.parseError; - - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - - function lex() { - var token; - token = self.lexer.lex() || 1; // $end = 1 - // if token isn't its numeric value, convert - if (typeof token !== 'number') { - token = self.symbols_[token] || token; - } - return token; - }; - - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - // retrieve state number from top of stack - state = stack[stack.length - 1]; - - // use default actions if available - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol == null) - symbol = lex(); - // read action for current state and first input - action = table[state] && table[state][symbol]; - } - - // handle parse error - if (typeof action === 'undefined' || !action.length || !action[0]) { - - if (!recovering) { - // Report error - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - var errStr = ''; - if (this.lexer.showPosition) { - errStr = 'Parse error on line ' + (yylineno + 1) + ":\n" + this.lexer.showPosition() + '\nExpecting ' + expected.join(', '); - } else { - errStr = 'Parse error on line ' + (yylineno + 1) + ": Unexpected " + - (symbol == 1 /*EOF*/ ? "end of input" : - ("'" + (this.terminals_[symbol] || symbol) + "'")); - } - this.parseError(errStr, - {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - - // just recovered from another error - if (recovering == 3) { - if (symbol == EOF) { - throw new Error(errStr || 'Parsing halted.'); - } - - // discard current lookahead and grab another - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - symbol = lex(); - } - - // try to recover from error - while (1) { - // check for error recovery rule in this state - if ((TERROR.toString()) in table[state]) { - break; - } - if (state == 0) { - throw new Error(errStr || 'Parsing halted.'); - } - popStack(1); - state = stack[stack.length - 1]; - } - - preErrorSymbol = symbol; // save the lookahead token - symbol = TERROR; // insert generic error symbol as new lookahead - state = stack[stack.length - 1]; - action = table[state] && table[state][TERROR]; - recovering = 3; // allow 3 real symbols to be shifted before reporting a new error - } - - // this shouldn't happen, unless resolve defaults are off - if (action[0] instanceof Array && action.length > 1) { - throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); - } - - switch (action[0]) { - - case 1: // shift - //this.shiftCount++; - - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); // push state - symbol = null; - if (!preErrorSymbol) { // normal execution/no error - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { // error just occurred, resume old lookahead f/ before error - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - - case 2: // reduce - //this.reductionCount++; - - len = this.productions_[action[1]][1]; - - // perform semantic action - yyval.$ = vstack[vstack.length - len]; // default to $$ = $1 - // default location, uses first token for firsts, last for lasts - yyval._$ = { - first_line: lstack[lstack.length - (len || 1)].first_line, - last_line: lstack[lstack.length - 1].last_line, - first_column: lstack[lstack.length - (len || 1)].first_column, - last_column: lstack[lstack.length - 1].last_column - }; - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - - if (typeof r !== 'undefined') { - return r; - } - - // pop off stack - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - - stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce) - vstack.push(yyval.$); - lstack.push(yyval._$); - // goto new state = table[STATE][NONTERMINAL] - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - - case 3: // accept - return true; - } - - } - - return true; - }}; - /* Jison generated lexer */ - var lexer = (function () { - - var lexer = ({EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parseError) { - this.yy.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function (input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ''; - this.conditionStack = ['INITIAL']; - this.yylloc = {first_line: 1, first_column: 0, last_line: 1, last_column: 0}; - return this; - }, - input: function () { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/\n/); - if (lines) this.yylineno++; - this._input = this._input.slice(1); - return ch; - }, - unput: function (ch) { - this._input = ch + this._input; - return this; - }, - more: function () { - this._more = true; - return this; - }, - pastInput: function () { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function () { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); - }, - showPosition: function () { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function () { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, - match, - col, - lines; - if (!this._more) { - this.yytext = ''; - this.match = ''; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - match = this._input.match(this.rules[rules[i]]); - if (match) { - lines = match[0].match(/\n.*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = {first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - 1 : this.yylloc.last_column + match[0].length} - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[i], this.conditionStack[this.conditionStack.length - 1]); - if (token) return token; - else return; - } - } - if (this._input === "") { - return this.EOF; - } else { - this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), - {text: "", token: null, line: this.yylineno}); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== 'undefined') { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }}); - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - var YYSTATE = YY_START - switch ($avoiding_name_collisions) { - case 0: - this.begin("mu"); - if (yy_.yytext) return 14; - break; - case 1: - return 14; - break; - case 2: - return 24; - break; - case 3: - return 16; - break; - case 4: - return 20; - break; - case 5: - return 19; - break; - case 6: - return 19; - break; - case 7: - return 23; - break; - case 8: - return 23; - break; - case 9: - yy_.yytext = yy_.yytext.substr(3, yy_.yyleng - 5); - this.begin("INITIAL"); - return 15; - break; - case 10: - return 22; - break; - case 11: - return 34; - break; - case 12: - return 33; - break; - case 13: - return 33; - break; - case 14: - return 36; - break; - case 15: /*ignore whitespace*/ - break; - case 16: - this.begin("INITIAL"); - return 18; - break; - case 17: - this.begin("INITIAL"); - return 18; - break; - case 18: - yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2).replace(/\\"/g, '"'); - return 28; - break; - case 19: - return 30; - break; - case 20: - return 30; - break; - case 21: - return 29; - break; - case 22: - return 33; - break; - case 23: - yy_.yytext = yy_.yytext.substr(1, yy_.yyleng - 2); - return 33; - break; - case 24: - return 'INVALID'; - break; - case 25: - return 5; - break; - } - }; - lexer.rules = [/^[^\x00]*?(?=(\{\{))/, /^[^\x00]+/, /^\{\{>/, /^\{\{#/, /^\{\{\//, /^\{\{\^/, /^\{\{\s*else\b/, /^\{\{\{/, /^\{\{&/, /^\{\{![\s\S]*?\}\}/, /^\{\{/, /^=/, /^\.(?=[} ])/, /^\.\./, /^[/.]/, /^\s+/, /^\}\}\}/, /^\}\}/, /^"(\\["]|[^"])*"/, /^true(?=[}\s])/, /^false(?=[}\s])/, /^[0-9]+(?=[}\s])/, /^[a-zA-Z0-9_$-]+(?=[=}\s/.])/, /^\[.*\]/, /^./, /^$/]; - lexer.conditions = {"mu": {"rules": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], "inclusive": false}, "INITIAL": {"rules": [0, 1, 25], "inclusive": true}}; - return lexer; - })() - parser.lexer = lexer; - return parser; - })(); - if (typeof require !== 'undefined' && typeof exports !== 'undefined') { - exports.parser = handlebars; - exports.parse = function () { - return handlebars.parse.apply(handlebars, arguments); - } - exports.main = function commonjsMain(args) { - if (!args[1]) - throw new Error('Usage: ' + args[0] + ' FILE'); - if (typeof process !== 'undefined') { - var source = require('fs').readFileSync(require('path').join(process.cwd(), args[1]), "utf8"); - } else { - var cwd = require("file").path(require("file").cwd()); - var source = cwd.join(args[1]).read({charset: "utf-8"}); - } - return exports.parser.parse(source); - } - if (typeof module !== 'undefined' && require.main === module) { - exports.main(typeof process !== 'undefined' ? process.argv.slice(1) : require("system").args); - } - } - ; - ; -// lib/handlebars/compiler/base.js - Handlebars.Parser = handlebars; - - Handlebars.parse = function (string) { - Handlebars.Parser.yy = Handlebars.AST; - return Handlebars.Parser.parse(string); - }; - - Handlebars.print = function (ast) { - return new Handlebars.PrintVisitor().accept(ast); - }; - - Handlebars.logger = { - DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3, - - // override in the host environment - log: function (level, str) { - } - }; - - Handlebars.log = function (level, str) { - Handlebars.logger.log(level, str); - }; - ; -// lib/handlebars/compiler/ast.js - (function () { - - Handlebars.AST = {}; - - Handlebars.AST.ProgramNode = function (statements, inverse) { - this.type = "program"; - this.statements = statements; - if (inverse) { - this.inverse = new Handlebars.AST.ProgramNode(inverse); - } - }; - - Handlebars.AST.MustacheNode = function (params, hash, unescaped) { - this.type = "mustache"; - this.id = params[0]; - this.params = params.slice(1); - this.hash = hash; - this.escaped = !unescaped; - }; - - Handlebars.AST.PartialNode = function (id, context) { - this.type = "partial"; - - // TODO: disallow complex IDs - - this.id = id; - this.context = context; - }; - - var verifyMatch = function (open, close) { - if (open.original !== close.original) { - throw new Handlebars.Exception(open.original + " doesn't match " + close.original); - } - }; - - Handlebars.AST.BlockNode = function (mustache, program, close) { - verifyMatch(mustache.id, close); - this.type = "block"; - this.mustache = mustache; - this.program = program; - }; - - Handlebars.AST.InverseNode = function (mustache, program, close) { - verifyMatch(mustache.id, close); - this.type = "inverse"; - this.mustache = mustache; - this.program = program; - }; - - Handlebars.AST.ContentNode = function (string) { - this.type = "content"; - this.string = string; - }; - - Handlebars.AST.HashNode = function (pairs) { - this.type = "hash"; - this.pairs = pairs; - }; - - Handlebars.AST.IdNode = function (parts) { - this.type = "ID"; - this.original = parts.join("."); - - var dig = [], depth = 0; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i]; - - if (part === "..") { - depth++; - } - else if (part === "." || part === "this") { - this.isScoped = true; - } - else { - dig.push(part); - } - } - - this.parts = dig; - this.string = dig.join('.'); - this.depth = depth; - this.isSimple = (dig.length === 1) && (depth === 0); - }; - - Handlebars.AST.StringNode = function (string) { - this.type = "STRING"; - this.string = string; - }; - - Handlebars.AST.IntegerNode = function (integer) { - this.type = "INTEGER"; - this.integer = integer; - }; - - Handlebars.AST.BooleanNode = function (bool) { - this.type = "BOOLEAN"; - this.bool = bool; - }; - - Handlebars.AST.CommentNode = function (comment) { - this.type = "comment"; - this.comment = comment; - }; - - })(); - ; -// lib/handlebars/utils.js - Handlebars.Exception = function (message) { - var tmp = Error.prototype.constructor.apply(this, arguments); - - for (var p in tmp) { - if (tmp.hasOwnProperty(p)) { - this[p] = tmp[p]; - } - } - }; - Handlebars.Exception.prototype = new Error; - -// Build out our basic SafeString type - Handlebars.SafeString = function (string) { - this.string = string; - }; - Handlebars.SafeString.prototype.toString = function () { - return this.string.toString(); - }; - - (function () { - var escape = { - "<": "<", - ">": ">", - '"': """, - "'": "'", - "`": "`" - }; - - var badChars = /&(?!\w+;)|[<>"'`]/g; - var possible = /[&<>"'`]/; - - var escapeChar = function (chr) { - return escape[chr] || "&"; - }; - - Handlebars.Utils = { - escapeExpression: function (string) { - // don't escape SafeStrings, since they're already safe - if (string instanceof Handlebars.SafeString) { - return string.toString(); - } else if (string == null || string === false) { - return ""; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - }, - - isEmpty: function (value) { - if (typeof value === "undefined") { - return true; - } else if (value === null) { - return true; - } else if (value === false) { - return true; - } else if (Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) { - return true; - } else { - return false; - } - } - }; - })(); - ; -// lib/handlebars/compiler/compiler.js - Handlebars.Compiler = function () { - }; - Handlebars.JavaScriptCompiler = function () { - }; - - (function (Compiler, JavaScriptCompiler) { - Compiler.OPCODE_MAP = { - appendContent: 1, - getContext: 2, - lookupWithHelpers: 3, - lookup: 4, - append: 5, - invokeMustache: 6, - appendEscaped: 7, - pushString: 8, - truthyOrFallback: 9, - functionOrFallback: 10, - invokeProgram: 11, - invokePartial: 12, - push: 13, - assignToHash: 15, - pushStringParam: 16 - }; - - Compiler.MULTI_PARAM_OPCODES = { - appendContent: 1, - getContext: 1, - lookupWithHelpers: 2, - lookup: 1, - invokeMustache: 3, - pushString: 1, - truthyOrFallback: 1, - functionOrFallback: 1, - invokeProgram: 3, - invokePartial: 1, - push: 1, - assignToHash: 1, - pushStringParam: 1 - }; - - Compiler.DISASSEMBLE_MAP = {}; - - for (var prop in Compiler.OPCODE_MAP) { - var value = Compiler.OPCODE_MAP[prop]; - Compiler.DISASSEMBLE_MAP[value] = prop; - } - - Compiler.multiParamSize = function (code) { - return Compiler.MULTI_PARAM_OPCODES[Compiler.DISASSEMBLE_MAP[code]]; - }; - - Compiler.prototype = { - compiler: Compiler, - - disassemble: function () { - var opcodes = this.opcodes, opcode, nextCode; - var out = [], str, name, value; - - for (var i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - if (opcode === 'DECLARE') { - name = opcodes[++i]; - value = opcodes[++i]; - out.push("DECLARE " + name + " = " + value); - } else { - str = Compiler.DISASSEMBLE_MAP[opcode]; - - var extraParams = Compiler.multiParamSize(opcode); - var codes = []; - - for (var j = 0; j < extraParams; j++) { - nextCode = opcodes[++i]; - - if (typeof nextCode === "string") { - nextCode = "\"" + nextCode.replace("\n", "\\n") + "\""; - } - - codes.push(nextCode); - } - - str = str + " " + codes.join(" "); - - out.push(str); - } - } - - return out.join("\n"); - }, - - guid: 0, - - compile: function (program, options) { - this.children = []; - this.depths = {list: []}; - this.options = options; - - // These changes will propagate to the other compiler components - var knownHelpers = this.options.knownHelpers; - this.options.knownHelpers = { - 'helperMissing': true, - 'blockHelperMissing': true, - 'each': true, - 'if': true, - 'unless': true, - 'with': true, - 'log': true - }; - if (knownHelpers) { - for (var name in knownHelpers) { - this.options.knownHelpers[name] = knownHelpers[name]; - } - } - - return this.program(program); - }, - - accept: function (node) { - return this[node.type](node); - }, - - program: function (program) { - var statements = program.statements, statement; - this.opcodes = []; - - for (var i = 0, l = statements.length; i < l; i++) { - statement = statements[i]; - this[statement.type](statement); - } - this.isSimple = l === 1; - - this.depths.list = this.depths.list.sort(function (a, b) { - return a - b; - }); - - return this; - }, - - compileProgram: function (program) { - var result = new this.compiler().compile(program, this.options); - var guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - - for (var i = 0, l = result.depths.list.length; i < l; i++) { - depth = result.depths.list[i]; - - if (depth < 2) { - continue; - } - else { - this.addDepth(depth - 1); - } - } - - return guid; - }, - - block: function (block) { - var mustache = block.mustache; - var depth, child, inverse, inverseGuid; - - var params = this.setupStackForMustache(mustache); - - var programGuid = this.compileProgram(block.program); - - if (block.program.inverse) { - inverseGuid = this.compileProgram(block.program.inverse); - this.declare('inverse', inverseGuid); - } - - this.opcode('invokeProgram', programGuid, params.length, !!mustache.hash); - this.declare('inverse', null); - this.opcode('append'); - }, - - inverse: function (block) { - var params = this.setupStackForMustache(block.mustache); - - var programGuid = this.compileProgram(block.program); - - this.declare('inverse', programGuid); - - this.opcode('invokeProgram', null, params.length, !!block.mustache.hash); - this.opcode('append'); - }, - - hash: function (hash) { - var pairs = hash.pairs, pair, val; - - this.opcode('push', '{}'); - - for (var i = 0, l = pairs.length; i < l; i++) { - pair = pairs[i]; - val = pair[1]; - - this.accept(val); - this.opcode('assignToHash', pair[0]); - } - }, - - partial: function (partial) { - var id = partial.id; - this.usePartial = true; - - if (partial.context) { - this.ID(partial.context); - } else { - this.opcode('push', 'depth0'); - } - - this.opcode('invokePartial', id.original); - this.opcode('append'); - }, - - content: function (content) { - this.opcode('appendContent', content.string); - }, - - mustache: function (mustache) { - var params = this.setupStackForMustache(mustache); - - this.opcode('invokeMustache', params.length, mustache.id.original, !!mustache.hash); - - if (mustache.escaped) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - - ID: function (id) { - this.addDepth(id.depth); - - this.opcode('getContext', id.depth); - - this.opcode('lookupWithHelpers', id.parts[0] || null, id.isScoped || false); - - for (var i = 1, l = id.parts.length; i < l; i++) { - this.opcode('lookup', id.parts[i]); - } - }, - - STRING: function (string) { - this.opcode('pushString', string.string); - }, - - INTEGER: function (integer) { - this.opcode('push', integer.integer); - }, - - BOOLEAN: function (bool) { - this.opcode('push', bool.bool); - }, - - comment: function () { - }, - - // HELPERS - pushParams: function (params) { - var i = params.length, param; - - while (i--) { - param = params[i]; - - if (this.options.stringParams) { - if (param.depth) { - this.addDepth(param.depth); - } - - this.opcode('getContext', param.depth || 0); - this.opcode('pushStringParam', param.string); - } else { - this[param.type](param); - } - } - }, - - opcode: function (name, val1, val2, val3) { - this.opcodes.push(Compiler.OPCODE_MAP[name]); - if (val1 !== undefined) { - this.opcodes.push(val1); - } - if (val2 !== undefined) { - this.opcodes.push(val2); - } - if (val3 !== undefined) { - this.opcodes.push(val3); - } - }, - - declare: function (name, value) { - this.opcodes.push('DECLARE'); - this.opcodes.push(name); - this.opcodes.push(value); - }, - - addDepth: function (depth) { - if (depth === 0) { - return; - } - - if (!this.depths[depth]) { - this.depths[depth] = true; - this.depths.list.push(depth); - } - }, - - setupStackForMustache: function (mustache) { - var params = mustache.params; - - this.pushParams(params); - - if (mustache.hash) { - this.hash(mustache.hash); - } - - this.ID(mustache.id); - - return params; - } - }; - - JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function (parent, name, type) { - if (/^[0-9]+$/.test(name)) { - return parent + "[" + name + "]"; - } else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { - return parent + "." + name; - } - else { - return parent + "['" + name + "']"; - } - }, - - appendToBuffer: function (string) { - if (this.environment.isSimple) { - return "return " + string + ";"; - } else { - return "buffer += " + string + ";"; - } - }, - - initializeBuffer: function () { - return this.quotedString(""); - }, - - namespace: "Handlebars", - // END PUBLIC API - - compile: function (environment, options, context, asObject) { - this.environment = environment; - this.options = options || {}; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - programs: [], - aliases: { self: 'this' }, - registers: {list: []} - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - - this.compileChildren(environment, options); - - var opcodes = environment.opcodes, opcode; - - this.i = 0; - - for (l = opcodes.length; this.i < l; this.i++) { - opcode = this.nextOpcode(0); - - if (opcode[0] === 'DECLARE') { - this.i = this.i + 2; - this[opcode[1]] = opcode[2]; - } else { - this.i = this.i + opcode[1].length; - this[opcode[0]].apply(this, opcode[1]); - } - } - - return this.createFunctionContext(asObject); - }, - - nextOpcode: function (n) { - var opcodes = this.environment.opcodes, opcode = opcodes[this.i + n], name, val; - var extraParams, codes; - - if (opcode === 'DECLARE') { - name = opcodes[this.i + 1]; - val = opcodes[this.i + 2]; - return ['DECLARE', name, val]; - } else { - name = Compiler.DISASSEMBLE_MAP[opcode]; - - extraParams = Compiler.multiParamSize(opcode); - codes = []; - - for (var j = 0; j < extraParams; j++) { - codes.push(opcodes[this.i + j + 1 + n]); - } - - return [name, codes]; - } - }, - - eat: function (opcode) { - this.i = this.i + opcode.length; - }, - - preamble: function () { - var out = []; - - if (!this.isChild) { - var namespace = this.namespace; - var copies = "helpers = helpers || " + namespace + ".helpers;"; - if (this.environment.usePartial) { - copies = copies + " partials = partials || " + namespace + ".partials;"; - } - out.push(copies); - } else { - out.push(''); - } - - if (!this.environment.isSimple) { - out.push(", buffer = " + this.initializeBuffer()); - } else { - out.push(""); - } - - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = out; - }, - - createFunctionContext: function (asObject) { - var locals = this.stackVars; - if (!this.isChild) { - locals = locals.concat(this.context.registers.list); - } - - if (locals.length > 0) { - this.source[1] = this.source[1] + ", " + locals.join(", "); - } - - // Generate minimizer alias mappings - if (!this.isChild) { - var aliases = [] - for (var alias in this.context.aliases) { - this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias]; - } - } - - if (this.source[1]) { - this.source[1] = "var " + this.source[1].substring(2) + ";"; - } - - // Merge children - if (!this.isChild) { - this.source[1] += '\n' + this.context.programs.join('\n') + '\n'; - } - - if (!this.environment.isSimple) { - this.source.push("return buffer;"); - } - - var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"]; - - for (var i = 0, l = this.environment.depths.list.length; i < l; i++) { - params.push("depth" + this.environment.depths.list[i]); - } - - if (asObject) { - params.push(this.source.join("\n ")); - - return Function.apply(this, params); - } else { - var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n ' + this.source.join("\n ") + '}'; - Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n"); - return functionSource; - } - }, - - appendContent: function (content) { - this.source.push(this.appendToBuffer(this.quotedString(content))); - }, - - append: function () { - var local = this.popStack(); - this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }"); - if (this.environment.isSimple) { - this.source.push("else { " + this.appendToBuffer("''") + " }"); - } - }, - - appendEscaped: function () { - var opcode = this.nextOpcode(1), extra = ""; - this.context.aliases.escapeExpression = 'this.escapeExpression'; - - if (opcode[0] === 'appendContent') { - extra = " + " + this.quotedString(opcode[1][0]); - this.eat(opcode); - } - - this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")" + extra)); - }, - - getContext: function (depth) { - if (this.lastContext !== depth) { - this.lastContext = depth; - } - }, - - lookupWithHelpers: function (name, isScoped) { - if (name) { - var topStack = this.nextStack(); - - this.usingKnownHelper = false; - - var toPush; - if (!isScoped && this.options.knownHelpers[name]) { - toPush = topStack + " = " + this.nameLookup('helpers', name, 'helper'); - this.usingKnownHelper = true; - } else if (isScoped || this.options.knownHelpersOnly) { - toPush = topStack + " = " + this.nameLookup('depth' + this.lastContext, name, 'context'); - } else { - toPush = topStack + " = " - + this.nameLookup('helpers', name, 'helper') - + " || " - + this.nameLookup('depth' + this.lastContext, name, 'context'); - } - - toPush += ';'; - this.source.push(toPush); - } else { - this.pushStack('depth' + this.lastContext); - } - }, - - lookup: function (name) { - var topStack = this.topStack(); - this.source.push(topStack + " = (" + topStack + " === null || " + topStack + " === undefined || " + topStack + " === false ? " + - topStack + " : " + this.nameLookup(topStack, name, 'context') + ");"); - }, - - pushStringParam: function (string) { - this.pushStack('depth' + this.lastContext); - this.pushString(string); - }, - - pushString: function (string) { - this.pushStack(this.quotedString(string)); - }, - - push: function (name) { - this.pushStack(name); - }, - - invokeMustache: function (paramSize, original, hasHash) { - this.populateParams(paramSize, this.quotedString(original), "{}", null, hasHash, function (nextStack, helperMissingString, id) { - if (!this.usingKnownHelper) { - this.context.aliases.helperMissing = 'helpers.helperMissing'; - this.context.aliases.undef = 'void 0'; - this.source.push("else if(" + id + "=== undef) { " + nextStack + " = helperMissing.call(" + helperMissingString + "); }"); - if (nextStack !== id) { - this.source.push("else { " + nextStack + " = " + id + "; }"); - } - } - }); - }, - - invokeProgram: function (guid, paramSize, hasHash) { - var inverse = this.programExpression(this.inverse); - var mainProgram = this.programExpression(guid); - - this.populateParams(paramSize, null, mainProgram, inverse, hasHash, function (nextStack, helperMissingString, id) { - if (!this.usingKnownHelper) { - this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing'; - this.source.push("else { " + nextStack + " = blockHelperMissing.call(" + helperMissingString + "); }"); - } - }); - }, - - populateParams: function (paramSize, helperId, program, inverse, hasHash, fn) { - var needsRegister = hasHash || this.options.stringParams || inverse || this.options.data; - var id = this.popStack(), nextStack; - var params = [], param, stringParam, stringOptions; - - if (needsRegister) { - this.register('tmp1', program); - stringOptions = 'tmp1'; - } else { - stringOptions = '{ hash: {} }'; - } - - if (needsRegister) { - var hash = (hasHash ? this.popStack() : '{}'); - this.source.push('tmp1.hash = ' + hash + ';'); - } - - if (this.options.stringParams) { - this.source.push('tmp1.contexts = [];'); - } - - for (var i = 0; i < paramSize; i++) { - param = this.popStack(); - params.push(param); - - if (this.options.stringParams) { - this.source.push('tmp1.contexts.push(' + this.popStack() + ');'); - } - } - - if (inverse) { - this.source.push('tmp1.fn = tmp1;'); - this.source.push('tmp1.inverse = ' + inverse + ';'); - } - - if (this.options.data) { - this.source.push('tmp1.data = data;'); - } - - params.push(stringOptions); - - this.populateCall(params, id, helperId || id, fn); - }, - - populateCall: function (params, id, helperId, fn) { - var paramString = ["depth0"].concat(params).join(", "); - var helperMissingString = ["depth0"].concat(helperId).concat(params).join(", "); - - var nextStack = this.nextStack(); - - if (this.usingKnownHelper) { - this.source.push(nextStack + " = " + id + ".call(" + paramString + ");"); - } else { - this.context.aliases.functionType = '"function"'; - this.source.push("if(typeof " + id + " === functionType) { " + nextStack + " = " + id + ".call(" + paramString + "); }"); - } - fn.call(this, nextStack, helperMissingString, id); - this.usingKnownHelper = false; - }, - - invokePartial: function (context) { - this.pushStack("self.invokePartial(" + this.nameLookup('partials', context, 'partial') + ", '" + context + "', " + this.popStack() + ", helpers, partials);"); - }, - - assignToHash: function (key) { - var value = this.popStack(); - var hash = this.topStack(); - - this.source.push(hash + "['" + key + "'] = " + value + ";"); - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function (environment, options) { - var children = environment.children, child, compiler; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); - - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - var index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context); - } - }, - - programExpression: function (guid) { - if (guid == null) { - return "self.noop"; - } - - var child = this.environment.children[guid], - depths = child.depths.list; - var programParams = [child.index, child.name, "data"]; - - for (var i = 0, l = depths.length; i < l; i++) { - depth = depths[i]; - - if (depth === 1) { - programParams.push("depth0"); - } - else { - programParams.push("depth" + (depth - 1)); - } - } - - if (depths.length === 0) { - return "self.program(" + programParams.join(", ") + ")"; - } else { - programParams.shift(); - return "self.programWithDepth(" + programParams.join(", ") + ")"; - } - }, - - register: function (name, val) { - this.useRegister(name); - this.source.push(name + " = " + val + ";"); - }, - - useRegister: function (name) { - if (!this.context.registers[name]) { - this.context.registers[name] = true; - this.context.registers.list.push(name); - } - }, - - pushStack: function (item) { - this.source.push(this.nextStack() + " = " + item + ";"); - return "stack" + this.stackSlot; - }, - - nextStack: function () { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push("stack" + this.stackSlot); - } - return "stack" + this.stackSlot; - }, - - popStack: function () { - return "stack" + this.stackSlot--; - }, - - topStack: function () { - return "stack" + this.stackSlot; - }, - - quotedString: function (str) { - return '"' + str - .replace(/\\/g, '\\\\') - .replace(/"/g, '\\"') - .replace(/\n/g, '\\n') - .replace(/\r/g, '\\r') + '"'; - } - }; - - var reservedWords = ("break case catch continue default delete do else finally " + - "for function if in instanceof new return switch this throw " + - "try typeof var void while with null true false").split(" "); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } - - JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - if (!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) { - return true; - } - return false; - } - - })(Handlebars.Compiler, Handlebars.JavaScriptCompiler); - - Handlebars.precompile = function (string, options) { - options = options || {}; - - var ast = Handlebars.parse(string); - var environment = new Handlebars.Compiler().compile(ast, options); - return new Handlebars.JavaScriptCompiler().compile(environment, options); - }; - - Handlebars.compile = function (string, options) { - options = options || {}; - - var compiled; - - function compile() { - var ast = Handlebars.parse(string); - var environment = new Handlebars.Compiler().compile(ast, options); - var templateSpec = new Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true); - return Handlebars.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - return function (context, options) { - if (!compiled) { - compiled = compile(); - } - return compiled.call(this, context, options); - }; - }; - ; -// lib/handlebars/vm.js - Handlebars.VM = { - template: function (templateSpec) { - // Just add water - var container = { - escapeExpression: Handlebars.Utils.escapeExpression, - invokePartial: Handlebars.VM.invokePartial, - programs: [], - program: function (i, fn, data) { - var programWrapper = this.programs[i]; - if (data) { - return Handlebars.VM.program(fn, data); - } else if (programWrapper) { - return programWrapper; - } else { - programWrapper = this.programs[i] = Handlebars.VM.program(fn); - return programWrapper; - } - }, - programWithDepth: Handlebars.VM.programWithDepth, - noop: Handlebars.VM.noop - }; - - return function (context, options) { - options = options || {}; - return templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data); - }; - }, - - programWithDepth: function (fn, data, $depth) { - var args = Array.prototype.slice.call(arguments, 2); - - return function (context, options) { - options = options || {}; - - return fn.apply(this, [context, options.data || data].concat(args)); - }; - }, - program: function (fn, data) { - return function (context, options) { - options = options || {}; - - return fn(context, options.data || data); - }; - }, - noop: function () { - return ""; - }, - invokePartial: function (partial, name, context, helpers, partials) { - if (partial === undefined) { - throw new Handlebars.Exception("The partial " + name + " could not be found"); - } else if (partial instanceof Function) { - return partial(context, {helpers: helpers, partials: partials}); - } else if (!Handlebars.compile) { - throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in vm mode"); - } else { - partials[name] = Handlebars.compile(partial); - return partials[name](context, {helpers: helpers, partials: partials}); - } - } - }; - - Handlebars.template = Handlebars.VM.template; - ; - - -})(); - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Em:true ENV */ - - if ('undefined' === typeof Ember) { - /** - @namespace - @name Ember - @version 0.9.7.1 - - All Ember methods and functions are defined inside of this namespace. - You generally should not add new properties to this namespace as it may be - overwritten by future versions of Ember. - - You can also use the shorthand "Em" instead of "Ember". - - Ember-Runtime is a framework that provides core functions for - Ember including cross-platform functions, support for property - observing and objects. Its focus is on small size and performance. You can - use this in place of or along-side other cross-platform libraries such as - jQuery. - - The core Runtime framework is based on the jQuery API with a number of - performance optimizations. - */ - -// Create core object. Make it act like an instance of Ember.Namespace so that -// objects assigned to it are given a sane string representation. - Ember = { isNamespace: true, toString: function () { - return "Ember"; - } }; - -// aliases needed to keep minifiers from removing the global context - if ('undefined' !== typeof window) { - window.Em = window.Ember = Em = Ember; - } - - } - - /** - @static - @type String - @default '0.9.7.1' - @constant - */ - Ember.VERSION = '0.9.7.1'; - - /** - @static - @type Hash - @constant - - Standard environmental variables. You can define these in a global `ENV` - variable before loading Ember to control various configuration - settings. - */ - Ember.ENV = 'undefined' === typeof ENV ? {} : ENV; - - -// .......................................................... -// BOOTSTRAP -// - - /** - @static - @type Boolean - @default true - @constant - - Determines whether Ember should enhances some built-in object - prototypes to provide a more friendly API. If enabled, a few methods - will be added to Function, String, and Array. Object.prototype will not be - enhanced, which is the one that causes most troubles for people. - - In general we recommend leaving this option set to true since it rarely - conflicts with other code. If you need to turn it off however, you can - define an ENV.EXTEND_PROTOTYPES config to disable it. - */ - Ember.EXTEND_PROTOTYPES = (Ember.ENV.EXTEND_PROTOTYPES !== false); - - - /** - @static - @type Boolean - @default Ember.EXTEND_PROTOTYPES - @constant - - Determines whether Ember should add ECMAScript 5 shims to older browsers. - */ - Ember.SHIM_ES5 = (Ember.ENV.SHIM_ES5 === false) ? false : Ember.EXTEND_PROTOTYPES; - - - /** - @static - @type Boolean - @default false - @constant - - Determines whether computed properties are cacheable by default. - In future releases this will default to `true`. For the 1.0 release, - the option to turn off caching by default will be removed entirely. - - When caching is enabled by default, you can use `volatile()` to disable - caching on individual computed properties. - */ - Ember.CP_DEFAULT_CACHEABLE = !!Ember.ENV.CP_DEFAULT_CACHEABLE; - - - /** - Empty function. Useful for some operations. - - @returns {Object} - @private - */ - Ember.K = function () { - return this; - }; - - /** - @namespace - @name window - @description The global window object - */ - - -// Stub out the methods defined by the ember-debug package in case it's not loaded - - if ('undefined' === typeof ember_assert) { - window.ember_assert = Ember.K; - } - - if ('undefined' === typeof ember_warn) { - window.ember_warn = Ember.K; - } - - if ('undefined' === typeof ember_deprecate) { - window.ember_deprecate = Ember.K; - } - - if ('undefined' === typeof ember_deprecateFunc) { - window.ember_deprecateFunc = function (_, func) { - return func; - }; - } - -// .......................................................... -// LOGGER -// - - /** - @class - - Inside Ember-Metal, simply uses the window.console object. - Override this to provide more robust logging functionality. - */ - Ember.Logger = window.console || { log: Ember.K, warn: Ember.K, error: Ember.K }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Node */ - /** - @class - - Platform specific methods and feature detectors needed by the framework. - - @name Ember.platform - */ - var platform = Ember.platform = {}; - - /** - Identical to Object.create(). Implements if not available natively. - @memberOf Ember.platform - @name create - */ - platform.create = Object.create; - - if (!platform.create) { - /** @private */ - var O_ctor = function () { - }, - O_proto = O_ctor.prototype; - - platform.create = function (obj, descs) { - O_ctor.prototype = obj; - obj = new O_ctor(); - O_ctor.prototype = O_proto; - - if (descs !== undefined) { - for (var key in descs) { - if (!descs.hasOwnProperty(key)) continue; - platform.defineProperty(obj, key, descs[key]); - } - } - - return obj; - }; - - platform.create.isSimulated = true; - } - - /** @private */ - var defineProperty = Object.defineProperty; - var canRedefineProperties, canDefinePropertyOnDOM; - -// Catch IE8 where Object.defineProperty exists but only works on DOM elements - if (defineProperty) { - try { - defineProperty({}, 'a', {get: function () { - }}); - } catch (e) { - /** @private */ - defineProperty = null; - } - } - - if (defineProperty) { - // Detects a bug in Android <3.2 where you cannot redefine a property using - // Object.defineProperty once accessors have already been set. - /** @private */ - canRedefineProperties = (function () { - var obj = {}; - - defineProperty(obj, 'a', { - configurable: true, - enumerable: true, - get: function () { - }, - set: function () { - } - }); - - defineProperty(obj, 'a', { - configurable: true, - enumerable: true, - writable: true, - value: true - }); - - return obj.a === true; - })(); - - // This is for Safari 5.0, which supports Object.defineProperty, but not - // on DOM nodes. - /** @private */ - canDefinePropertyOnDOM = (function () { - try { - defineProperty(document.createElement('div'), 'definePropertyOnDOM', {}); - return true; - } catch (e) { - } - - return false; - })(); - - if (!canRedefineProperties) { - /** @private */ - defineProperty = null; - } else if (!canDefinePropertyOnDOM) { - /** @private */ - defineProperty = function (obj, keyName, desc) { - var isNode; - - if (typeof Node === "object") { - isNode = obj instanceof Node; - } else { - isNode = typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string"; - } - - if (isNode) { - // TODO: Should we have a warning here? - return (obj[keyName] = desc.value); - } else { - return Object.defineProperty(obj, keyName, desc); - } - }; - } - } - - /** - Identical to Object.defineProperty(). Implements as much functionality - as possible if not available natively. - - @memberOf Ember.platform - @name defineProperty - @param {Object} obj The object to modify - @param {String} keyName property name to modify - @param {Object} desc descriptor hash - @returns {void} - */ - platform.defineProperty = defineProperty; - - /** - Set to true if the platform supports native getters and setters. - - @memberOf Ember.platform - @name hasPropertyAccessors - */ - platform.hasPropertyAccessors = true; - - if (!platform.defineProperty) { - platform.hasPropertyAccessors = false; - - platform.defineProperty = function (obj, keyName, desc) { - ember_assert("property descriptor cannot have `get` or `set` on this platform", !desc.get && !desc.set); - obj[keyName] = desc.value; - }; - - platform.defineProperty.isSimulated = true; - } - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== -// .......................................................... -// GUIDS -// - -// Used for guid generation... - var GUID_KEY = '__ember' + (+new Date()); - var uuid, numberCache, stringCache; - - uuid = 0; - numberCache = []; - stringCache = {}; - - var GUID_DESC = Ember.GUID_DESC = { - configurable: true, - writable: true, - enumerable: false - }; - - var o_defineProperty = Ember.platform.defineProperty; - var o_create = Ember.platform.create; - - /** - @private - @static - @type String - @constant - - A unique key used to assign guids and other private metadata to objects. - If you inspect an object in your browser debugger you will often see these. - They can be safely ignored. - - On browsers that support it, these properties are added with enumeration - disabled so they won't show up when you iterate over your properties. - */ - Ember.GUID_KEY = GUID_KEY; - - /** - @private - - Generates a new guid, optionally saving the guid to the object that you - pass in. You will rarely need to use this method. Instead you should - call Ember.guidFor(obj), which return an existing guid if available. - - @param {Object} obj - Optional object the guid will be used for. If passed in, the guid will - be saved on the object and reused whenever you pass the same object - again. - - If no object is passed, just generate a new guid. - - @param {String} prefix - Optional prefix to place in front of the guid. Useful when you want to - separate the guid into separate namespaces. - - @returns {String} the guid - */ - Ember.generateGuid = function (obj, prefix) { - if (!prefix) prefix = 'ember'; - var ret = (prefix + (uuid++)); - if (obj) { - GUID_DESC.value = ret; - o_defineProperty(obj, GUID_KEY, GUID_DESC); - GUID_DESC.value = null; - } - - return ret; - }; - - /** - @private - - Returns a unique id for the object. If the object does not yet have - a guid, one will be assigned to it. You can call this on any object, - Ember.Object-based or not, but be aware that it will add a _guid property. - - You can also use this method on DOM Element objects. - - @method - @param obj {Object} any object, string, number, Element, or primitive - @returns {String} the unique guid for this instance. - */ - Ember.guidFor = function (obj) { - - // special cases where we don't want to add a key to object - if (obj === undefined) return "(undefined)"; - if (obj === null) return "(null)"; - - var cache, ret; - var type = typeof obj; - - // Don't allow prototype changes to String etc. to change the guidFor - switch (type) { - case 'number': - ret = numberCache[obj]; - if (!ret) ret = numberCache[obj] = 'nu' + obj; - return ret; - - case 'string': - ret = stringCache[obj]; - if (!ret) ret = stringCache[obj] = 'st' + (uuid++); - return ret; - - case 'boolean': - return obj ? '(true)' : '(false)'; - - default: - if (obj[GUID_KEY]) return obj[GUID_KEY]; - if (obj === Object) return '(Object)'; - if (obj === Array) return '(Array)'; - return Ember.generateGuid(obj, 'ember'); - } - }; - - -// .......................................................... -// META -// - - var META_DESC = { - writable: true, - configurable: false, - enumerable: false, - value: null - }; - - var META_KEY = Ember.GUID_KEY + '_meta'; - - /** - The key used to store meta information on object for property observing. - - @static - @property - */ - Ember.META_KEY = META_KEY; - -// Placeholder for non-writable metas. - var EMPTY_META = { - descs: {}, - watching: {} - }; - - if (Object.freeze) Object.freeze(EMPTY_META); - - var createMeta = Ember.platform.defineProperty.isSimulated ? o_create : (function (meta) { - return meta; - }); - - /** - @private - @function - - Retrieves the meta hash for an object. If 'writable' is true ensures the - hash is writable for this object as well. - - The meta object contains information about computed property descriptors as - well as any watched properties and other information. You generally will - not access this information directly but instead work with higher level - methods that manipulate this hash indirectly. - - @param {Object} obj - The object to retrieve meta for - - @param {Boolean} writable - Pass false if you do not intend to modify the meta hash, allowing the - method to avoid making an unnecessary copy. - - @returns {Hash} - */ - Ember.meta = function meta(obj, writable) { - - var ret = obj[META_KEY]; - if (writable === false) return ret || EMPTY_META; - - if (!ret) { - o_defineProperty(obj, META_KEY, META_DESC); - ret = obj[META_KEY] = createMeta({ - descs: {}, - watching: {}, - values: {}, - lastSetValues: {}, - cache: {}, - source: obj - }); - - // make sure we don't accidentally try to create constructor like desc - ret.descs.constructor = null; - - } else if (ret.source !== obj) { - ret = o_create(ret); - ret.descs = o_create(ret.descs); - ret.values = o_create(ret.values); - ret.watching = o_create(ret.watching); - ret.lastSetValues = {}; - ret.cache = {}; - ret.source = obj; - - o_defineProperty(obj, META_KEY, META_DESC); - ret = obj[META_KEY] = createMeta(ret); - } - return ret; - }; - - Ember.getMeta = function getMeta(obj, property) { - var meta = Ember.meta(obj, false); - return meta[property]; - }; - - Ember.setMeta = function setMeta(obj, property, value) { - var meta = Ember.meta(obj, true); - meta[property] = value; - return value; - }; - - /** - @private - - In order to store defaults for a class, a prototype may need to create - a default meta object, which will be inherited by any objects instantiated - from the class's constructor. - - However, the properties of that meta object are only shallow-cloned, - so if a property is a hash (like the event system's `listeners` hash), - it will by default be shared across all instances of that class. - - This method allows extensions to deeply clone a series of nested hashes or - other complex objects. For instance, the event system might pass - ['listeners', 'foo:change', 'ember157'] to `prepareMetaPath`, which will - walk down the keys provided. - - For each key, if the key does not exist, it is created. If it already - exists and it was inherited from its constructor, the constructor's - key is cloned. - - You can also pass false for `writable`, which will simply return - undefined if `prepareMetaPath` discovers any part of the path that - shared or undefined. - - @param {Object} obj The object whose meta we are examining - @param {Array} path An array of keys to walk down - @param {Boolean} writable whether or not to create a new meta - (or meta property) if one does not already exist or if it's - shared with its constructor - */ - Ember.metaPath = function (obj, path, writable) { - var meta = Ember.meta(obj, writable), keyName, value; - - for (var i = 0, l = path.length; i < l; i++) { - keyName = path[i]; - value = meta[keyName]; - - if (!value) { - if (!writable) { - return undefined; - } - value = meta[keyName] = { __ember_source__: obj }; - } else if (value.__ember_source__ !== obj) { - if (!writable) { - return undefined; - } - value = meta[keyName] = o_create(value); - value.__ember_source__ = obj; - } - - meta = value; - } - - return value; - }; - - /** - @private - - Wraps the passed function so that `this._super` will point to the superFunc - when the function is invoked. This is the primitive we use to implement - calls to super. - - @param {Function} func - The function to call - - @param {Function} superFunc - The super function. - - @returns {Function} wrapped function. - */ - Ember.wrap = function (func, superFunc) { - - function K() { - } - - var newFunc = function () { - var ret, sup = this._super; - this._super = superFunc || K; - ret = func.apply(this, arguments); - this._super = sup; - return ret; - }; - - newFunc.base = func; - return newFunc; - }; - - /** - Returns true if the passed object is an array or Array-like. - - Ember Array Protocol: - - - the object has an objectAt property - - the object is a native Array - - the object is an Object, and has a length property - - Unlike Ember.typeOf this method returns true even if the passed object is - not formally array but appears to be array-like (i.e. implements Ember.Array) - - Ember.isArray(); // false - Ember.isArray([]); // true - Ember.isArray( Ember.ArrayProxy.create({ content: [] }) ); // true - - @param {Object} obj The object to test - @returns {Boolean} - */ - Ember.isArray = function (obj) { - if (!obj || obj.setInterval) { - return false; - } - if (Array.isArray && Array.isArray(obj)) { - return true; - } - if (Ember.Array && Ember.Array.detect(obj)) { - return true; - } - if ((obj.length !== undefined) && 'object' === typeof obj) { - return true; - } - return false; - }; - - /** - Forces the passed object to be part of an array. If the object is already - an array or array-like, returns the object. Otherwise adds the object to - an array. If obj is null or undefined, returns an empty array. - - Ember.makeArray(); => [] - Ember.makeArray(null); => [] - Ember.makeArray(undefined); => [] - Ember.makeArray('lindsay'); => ['lindsay'] - Ember.makeArray([1,2,42]); => [1,2,42] - - var controller = Ember.ArrayProxy.create({ content: [] }); - Ember.makeArray(controller) === controller; => true - - @param {Object} obj the object - @returns {Array} - */ - Ember.makeArray = function (obj) { - if (obj === null || obj === undefined) return []; - return Ember.isArray(obj) ? obj : [obj]; - }; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ - var USE_ACCESSORS = Ember.platform.hasPropertyAccessors && Ember.ENV.USE_ACCESSORS; - Ember.USE_ACCESSORS = !!USE_ACCESSORS; - - var meta = Ember.meta; - -// .......................................................... -// GET AND SET -// -// If we are on a platform that supports accessors we can get use those. -// Otherwise simulate accessors by looking up the property directly on the -// object. - - var get, set; - - /** @private */ - get = function get(obj, keyName) { - if (keyName === undefined && 'string' === typeof obj) { - keyName = obj; - obj = Ember; - } - - if (!obj) return undefined; - var ret = obj[keyName]; - if (ret === undefined && 'function' === typeof obj.unknownProperty) { - ret = obj.unknownProperty(keyName); - } - return ret; - }; - - /** @private */ - set = function set(obj, keyName, value) { - if (('object' === typeof obj) && !(keyName in obj)) { - if ('function' === typeof obj.setUnknownProperty) { - obj.setUnknownProperty(keyName, value); - } else if ('function' === typeof obj.unknownProperty) { - obj.unknownProperty(keyName, value); - } else obj[keyName] = value; - } else { - obj[keyName] = value; - } - return value; - }; - - if (!USE_ACCESSORS) { - - var o_get = get, o_set = set; - - /** @private */ - get = function (obj, keyName) { - if (keyName === undefined && 'string' === typeof obj) { - keyName = obj; - obj = Ember; - } - - ember_assert("You need to provide an object and key to `get`.", !!obj && keyName); - - if (!obj) return undefined; - var desc = meta(obj, false).descs[keyName]; - if (desc) return desc.get(obj, keyName); - else return o_get(obj, keyName); - }; - - /** @private */ - set = function (obj, keyName, value) { - ember_assert("You need to provide an object and key to `set`.", !!obj && keyName !== undefined); - var desc = meta(obj, false).descs[keyName]; - if (desc) desc.set(obj, keyName, value); - else o_set(obj, keyName, value); - return value; - }; - - } - - /** - @function - - Gets the value of a property on an object. If the property is computed, - the function will be invoked. If the property is not defined but the - object implements the unknownProperty() method then that will be invoked. - - If you plan to run on IE8 and older browsers then you should use this - method anytime you want to retrieve a property on an object that you don't - know for sure is private. (My convention only properties beginning with - an underscore '_' are considered private.) - - On all newer browsers, you only need to use this method to retrieve - properties if the property might not be defined on the object and you want - to respect the unknownProperty() handler. Otherwise you can ignore this - method. - - Note that if the obj itself is null, this method will simply return - undefined. - - @param {Object} obj - The object to retrieve from. - - @param {String} keyName - The property key to retrieve - - @returns {Object} the property value or null. - */ - Ember.get = get; - - /** - @function - - Sets the value of a property on an object, respecting computed properties - and notifying observers and other listeners of the change. If the - property is not defined but the object implements the unknownProperty() - method then that will be invoked as well. - - If you plan to run on IE8 and older browsers then you should use this - method anytime you want to set a property on an object that you don't - know for sure is private. (My convention only properties beginning with - an underscore '_' are considered private.) - - On all newer browsers, you only need to use this method to set - properties if the property might not be defined on the object and you want - to respect the unknownProperty() handler. Otherwise you can ignore this - method. - - @param {Object} obj - The object to modify. - - @param {String} keyName - The property key to set - - @param {Object} value - The value to set - - @returns {Object} the passed value. - */ - Ember.set = set; - -// .......................................................... -// PATHS -// - - /** @private */ - function normalizePath(path) { - ember_assert('must pass non-empty string to normalizePath()', path && path !== ''); - - if (path === '*') return path; //special case... - var first = path.charAt(0); - if (first === '.') return 'this' + path; - if (first === '*' && path.charAt(1) !== '.') return 'this.' + path.slice(1); - return path; - } - -// assumes normalized input; no *, normalized path, always a target... - /** @private */ - function getPath(target, path) { - var len = path.length, idx, next, key; - - idx = path.indexOf('*'); - if (idx > 0 && path.charAt(idx - 1) !== '.') { - return getPath(getPath(target, path.slice(0, idx)), path.slice(idx + 1)); - } - - idx = 0; - while (target && idx < len) { - next = path.indexOf('.', idx); - if (next < 0) next = len; - key = path.slice(idx, next); - target = key === '*' ? target : get(target, key); - - if (target && target.isDestroyed) { - return undefined; - } - - idx = next + 1; - } - return target; - } - - var TUPLE_RET = []; - var IS_GLOBAL = /^([A-Z$]|([0-9][A-Z$]))/; - var IS_GLOBAL_PATH = /^([A-Z$]|([0-9][A-Z$])).*[\.\*]/; - var HAS_THIS = /^this[\.\*]/; - var FIRST_KEY = /^([^\.\*]+)/; - - /** @private */ - function firstKey(path) { - return path.match(FIRST_KEY)[0]; - } - -// assumes path is already normalized - /** @private */ - function normalizeTuple(target, path) { - var hasThis = HAS_THIS.test(path), - isGlobal = !hasThis && IS_GLOBAL_PATH.test(path), - key; - - if (!target || isGlobal) target = window; - if (hasThis) path = path.slice(5); - - var idx = path.indexOf('*'); - if (idx > 0 && path.charAt(idx - 1) !== '.') { - - // should not do lookup on a prototype object because the object isn't - // really live yet. - if (target && meta(target, false).proto !== target) { - target = getPath(target, path.slice(0, idx)); - } else { - target = null; - } - path = path.slice(idx + 1); - - } else if (target === window) { - key = firstKey(path); - target = get(target, key); - path = path.slice(key.length + 1); - } - - // must return some kind of path to be valid else other things will break. - if (!path || path.length === 0) throw new Error('Invalid Path'); - - TUPLE_RET[0] = target; - TUPLE_RET[1] = path; - return TUPLE_RET; - } - - /** - @private - - Normalizes a path to support older-style property paths beginning with . or - - @function - @param {String} path path to normalize - @returns {String} normalized path - */ - Ember.normalizePath = normalizePath; - - /** - @private - - Normalizes a target/path pair to reflect that actual target/path that should - be observed, etc. This takes into account passing in global property - paths (i.e. a path beginning with a captial letter not defined on the - target) and * separators. - - @param {Object} target - The current target. May be null. - - @param {String} path - A path on the target or a global property path. - - @returns {Array} a temporary array with the normalized target/path pair. - */ - Ember.normalizeTuple = function (target, path) { - return normalizeTuple(target, normalizePath(path)); - }; - - Ember.normalizeTuple.primitive = normalizeTuple; - - Ember.getWithDefault = function (root, key, defaultValue) { - var value = Ember.get(root, key); - - if (value === undefined) { - return defaultValue; - } - return value; - }; - - Ember.getPath = function (root, path, _checkGlobal) { - var pathOnly, hasThis, hasStar, isGlobal, ret; - - // Helpers that operate with 'this' within an #each - if (path === '') { - return root; - } - - if (!path && 'string' === typeof root) { - path = root; - root = null; - pathOnly = true; - } - - hasStar = path.indexOf('*') > -1; - - // If there is no root and path is a key name, return that - // property from the global object. - // E.g. getPath('Ember') -> Ember - if (root === null && !hasStar && path.indexOf('.') < 0) { - return get(window, path); - } - - // detect complicated paths and normalize them - path = normalizePath(path); - hasThis = HAS_THIS.test(path); - - if (!root || hasThis || hasStar) { - ember_deprecate("Fetching globals with Ember.getPath is deprecated (root: " + root + ", path: " + path + ")", !root || root === window || !IS_GLOBAL.test(path)); - - var tuple = normalizeTuple(root, path); - root = tuple[0]; - path = tuple[1]; - tuple.length = 0; - } - - ret = getPath(root, path); - - if (ret === undefined && !pathOnly && !hasThis && root !== window && IS_GLOBAL.test(path) && _checkGlobal !== false) { - ember_deprecate("Fetching globals with Ember.getPath is deprecated (root: " + root + ", path: " + path + ")"); - return Ember.getPath(window, path); - } else { - return ret; - } - }; - - Ember.setPath = function (root, path, value, tolerant) { - var keyName; - - if (arguments.length === 2 && 'string' === typeof root) { - value = path; - path = root; - root = null; - } - - path = normalizePath(path); - if (path.indexOf('*') > 0) { - ember_deprecate("Setting globals with Ember.setPath is deprecated (path: " + path + ")", !root || root === window || !IS_GLOBAL.test(path)); - - var tuple = normalizeTuple(root, path); - root = tuple[0]; - path = tuple[1]; - tuple.length = 0; - } - - if (path.indexOf('.') > 0) { - keyName = path.slice(path.lastIndexOf('.') + 1); - path = path.slice(0, path.length - (keyName.length + 1)); - if (path !== 'this') { - // Remove the `false` when we're done with this deprecation - root = Ember.getPath(root, path, false); - if (!root && IS_GLOBAL.test(path)) { - ember_deprecate("Setting globals with Ember.setPath is deprecated (path: " + path + ")"); - root = Ember.getPath(window, path); - } - } - - } else { - if (IS_GLOBAL.test(path)) throw new Error('Invalid Path'); - keyName = path; - } - - if (!keyName || keyName.length === 0 || keyName === '*') { - throw new Error('Invalid Path'); - } - - if (!root) { - if (tolerant) { - return; - } - else { - throw new Error('Object in path ' + path + ' could not be found or was destroyed.'); - } - } - - return Ember.set(root, keyName, value); - }; - - /** - Error-tolerant form of Ember.setPath. Will not blow up if any part of the - chain is undefined, null, or destroyed. - - This is primarily used when syncing bindings, which may try to update after - an object has been destroyed. - */ - Ember.trySetPath = function (root, path, value) { - if (arguments.length === 2 && 'string' === typeof root) { - value = path; - path = root; - root = null; - } - - return Ember.setPath(root, path, value, true); - }; - - /** - Returns true if the provided path is global (e.g., "MyApp.fooController.bar") - instead of local ("foo.bar.baz"). - - @param {String} path - @returns Boolean - */ - Ember.isGlobalPath = function (path) { - return !HAS_THIS.test(path) && IS_GLOBAL.test(path); - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ - var USE_ACCESSORS = Ember.USE_ACCESSORS; - var GUID_KEY = Ember.GUID_KEY; - var META_KEY = Ember.META_KEY; - var meta = Ember.meta; - var o_create = Ember.platform.create; - var o_defineProperty = Ember.platform.defineProperty; - var SIMPLE_PROPERTY, WATCHED_PROPERTY; - -// .......................................................... -// DESCRIPTOR -// - - var SIMPLE_DESC = { - writable: true, - configurable: true, - enumerable: true, - value: null - }; - - /** - @private - @constructor - - Objects of this type can implement an interface to responds requests to - get and set. The default implementation handles simple properties. - - You generally won't need to create or subclass this directly. - */ - var Dc = Ember.Descriptor = function () { - }; - - var setup = Dc.setup = function (obj, keyName, value) { - SIMPLE_DESC.value = value; - o_defineProperty(obj, keyName, SIMPLE_DESC); - SIMPLE_DESC.value = null; - }; - - var Dp = Ember.Descriptor.prototype; - - /** - Called whenever we want to set the property value. Should set the value - and return the actual set value (which is usually the same but may be - different in the case of computed properties.) - - @param {Object} obj - The object to set the value on. - - @param {String} keyName - The key to set. - - @param {Object} value - The new value - - @returns {Object} value actual set value - */ - Dp.set = function (obj, keyName, value) { - obj[keyName] = value; - return value; - }; - - /** - Called whenever we want to get the property value. Should retrieve the - current value. - - @param {Object} obj - The object to get the value on. - - @param {String} keyName - The key to retrieve - - @returns {Object} the current value - */ - Dp.get = function (obj, keyName) { - return w_get(obj, keyName, obj); - }; - - /** - This is called on the descriptor to set it up on the object. The - descriptor is responsible for actually defining the property on the object - here. - - The passed `value` is the transferValue returned from any previous - descriptor. - - @param {Object} obj - The object to set the value on. - - @param {String} keyName - The key to set. - - @param {Object} value - The transfer value from any previous descriptor. - - @returns {void} - */ - Dp.setup = setup; - - /** - This is called on the descriptor just before another descriptor takes its - place. This method should at least return the 'transfer value' of the - property - which is the value you want to passed as the input to the new - descriptor's setup() method. - - It is not generally necessary to actually 'undefine' the property as a new - property descriptor will redefine it immediately after this method returns. - - @param {Object} obj - The object to set the value on. - - @param {String} keyName - The key to set. - - @returns {Object} transfer value - */ - Dp.teardown = function (obj, keyName) { - return obj[keyName]; - }; - - Dp.val = function (obj, keyName) { - return obj[keyName]; - }; - -// .......................................................... -// SIMPLE AND WATCHED PROPERTIES -// - -// if accessors are disabled for the app then this will act as a guard when -// testing on browsers that do support accessors. It will throw an exception -// if you do foo.bar instead of Ember.get(foo, 'bar') - -// The exception to this is that any objects managed by Ember but not a descendant -// of Ember.Object will not throw an exception, instead failing silently. This -// prevent errors with other libraries that may attempt to access special -// properties on standard objects like Array. Usually this happens when copying -// an object by looping over all properties. - - if (!USE_ACCESSORS) { - Ember.Descriptor.MUST_USE_GETTER = function () { - if (this instanceof Ember.Object) { - ember_assert('Must use Ember.get() to access this property', false); - } - }; - - Ember.Descriptor.MUST_USE_SETTER = function () { - if (this instanceof Ember.Object) { - if (this.isDestroyed) { - ember_assert('You cannot set observed properties on destroyed objects', false); - } else { - ember_assert('Must use Ember.set() to access this property', false); - } - } - }; - } - - var WATCHED_DESC = { - configurable: true, - enumerable: true, - set: Ember.Descriptor.MUST_USE_SETTER - }; - - /** @private */ - function w_get(obj, keyName, values) { - values = values || meta(obj, false).values; - - if (values) { - var ret = values[keyName]; - if (ret !== undefined) { - return ret; - } - if (obj.unknownProperty) { - return obj.unknownProperty(keyName); - } - } - - } - - /** @private */ - function w_set(obj, keyName, value) { - var m = meta(obj), watching; - - watching = m.watching[keyName] > 0 && value !== m.values[keyName]; - if (watching) Ember.propertyWillChange(obj, keyName); - m.values[keyName] = value; - if (watching) Ember.propertyDidChange(obj, keyName); - return value; - } - - var WATCHED_GETTERS = {}; - - /** @private */ - function mkWatchedGetter(keyName) { - var ret = WATCHED_GETTERS[keyName]; - if (!ret) { - ret = WATCHED_GETTERS[keyName] = function () { - return w_get(this, keyName); - }; - } - return ret; - } - - var WATCHED_SETTERS = {}; - - /** @private */ - function mkWatchedSetter(keyName) { - var ret = WATCHED_SETTERS[keyName]; - if (!ret) { - ret = WATCHED_SETTERS[keyName] = function (value) { - return w_set(this, keyName, value); - }; - } - return ret; - } - - /** - @private - - Private version of simple property that invokes property change callbacks. - */ - WATCHED_PROPERTY = new Ember.Descriptor(); - - if (Ember.platform.hasPropertyAccessors) { - WATCHED_PROPERTY.get = w_get; - WATCHED_PROPERTY.set = w_set; - - if (USE_ACCESSORS) { - WATCHED_PROPERTY.setup = function (obj, keyName, value) { - WATCHED_DESC.get = mkWatchedGetter(keyName); - WATCHED_DESC.set = mkWatchedSetter(keyName); - o_defineProperty(obj, keyName, WATCHED_DESC); - WATCHED_DESC.get = WATCHED_DESC.set = null; - if (value !== undefined) meta(obj).values[keyName] = value; - }; - - } else { - WATCHED_PROPERTY.setup = function (obj, keyName, value) { - WATCHED_DESC.get = mkWatchedGetter(keyName); - o_defineProperty(obj, keyName, WATCHED_DESC); - WATCHED_DESC.get = null; - if (value !== undefined) meta(obj).values[keyName] = value; - }; - } - - WATCHED_PROPERTY.teardown = function (obj, keyName) { - var ret = meta(obj).values[keyName]; - delete meta(obj).values[keyName]; - return ret; - }; - -// NOTE: if platform does not have property accessors then we just have to -// set values and hope for the best. You just won't get any warnings... - } else { - - WATCHED_PROPERTY.set = function (obj, keyName, value) { - var m = meta(obj), watching; - - watching = m.watching[keyName] > 0 && value !== obj[keyName]; - if (watching) Ember.propertyWillChange(obj, keyName); - obj[keyName] = value; - if (watching) Ember.propertyDidChange(obj, keyName); - return value; - }; - - } - - /** - The default descriptor for simple properties. Pass as the third argument - to Ember.defineProperty() along with a value to set a simple value. - - @static - @default Ember.Descriptor - */ - Ember.SIMPLE_PROPERTY = new Ember.Descriptor(); - SIMPLE_PROPERTY = Ember.SIMPLE_PROPERTY; - - SIMPLE_PROPERTY.unwatched = WATCHED_PROPERTY.unwatched = SIMPLE_PROPERTY; - SIMPLE_PROPERTY.watched = WATCHED_PROPERTY.watched = WATCHED_PROPERTY; - - -// .......................................................... -// DEFINING PROPERTIES API -// - - /** @private */ - function hasDesc(descs, keyName) { - if (keyName === 'toString') return 'function' !== typeof descs.toString; - else return !!descs[keyName]; - } - - /** - @private - - NOTE: This is a low-level method used by other parts of the API. You almost - never want to call this method directly. Instead you should use Ember.mixin() - to define new properties. - - Defines a property on an object. This method works much like the ES5 - Object.defineProperty() method except that it can also accept computed - properties and other special descriptors. - - Normally this method takes only three parameters. However if you pass an - instance of Ember.Descriptor as the third param then you can pass an optional - value as the fourth parameter. This is often more efficient than creating - new descriptor hashes for each property. - - ## Examples - - // ES5 compatible mode - Ember.defineProperty(contact, 'firstName', { - writable: true, - configurable: false, - enumerable: true, - value: 'Charles' - }); - - // define a simple property - Ember.defineProperty(contact, 'lastName', Ember.SIMPLE_PROPERTY, 'Jolley'); - - // define a computed property - Ember.defineProperty(contact, 'fullName', Ember.computed(function() { - return this.firstName+' '+this.lastName; - }).property('firstName', 'lastName').cacheable()); - */ - Ember.defineProperty = function (obj, keyName, desc, val) { - var m = meta(obj, false), descs = m.descs, watching = m.watching[keyName] > 0, override = true; - - if (val === undefined) { - override = false; - val = hasDesc(descs, keyName) ? descs[keyName].teardown(obj, keyName) : obj[keyName]; - } else if (hasDesc(descs, keyName)) { - descs[keyName].teardown(obj, keyName); - } - - if (!desc) desc = SIMPLE_PROPERTY; - - if (desc instanceof Ember.Descriptor) { - m = meta(obj, true); - descs = m.descs; - - desc = (watching ? desc.watched : desc.unwatched) || desc; - descs[keyName] = desc; - desc.setup(obj, keyName, val, watching); - - // compatibility with ES5 - } else { - if (descs[keyName]) meta(obj).descs[keyName] = null; - o_defineProperty(obj, keyName, desc); - } - - // if key is being watched, override chains that - // were initialized with the prototype - if (override && watching) Ember.overrideChains(obj, keyName, m); - - return this; - }; - - /** - Creates a new object using the passed object as its prototype. On browsers - that support it, this uses the built in Object.create method. Else one is - simulated for you. - - This method is a better choice than Object.create() because it will make - sure that any observers, event listeners, and computed properties are - inherited from the parent as well. - - @param {Object} obj - The object you want to have as the prototype. - - @returns {Object} the newly created object - */ - Ember.create = function (obj, props) { - var ret = o_create(obj, props); - if (GUID_KEY in ret) Ember.generateGuid(ret, 'ember'); - if (META_KEY in ret) Ember.rewatch(ret); // setup watch chains if needed. - return ret; - }; - - /** - @private - - Creates a new object using the passed object as its prototype. This method - acts like `Ember.create()` in every way except that bindings, observers, and - computed properties will be activated on the object. - - The purpose of this method is to build an object for use in a prototype - chain. (i.e. to be set as the `prototype` property on a constructor - function). Prototype objects need to inherit bindings, observers and - other configuration so they pass it on to their children. However since - they are never 'live' objects themselves, they should not fire or make - other changes when various properties around them change. - - You should use this method anytime you want to create a new object for use - in a prototype chain. - - @param {Object} obj - The base object. - - @param {Object} hash - Optional hash of properties to define on the object. - - @returns {Object} new object - */ - Ember.createPrototype = function (obj, props) { - var ret = o_create(obj, props); - meta(ret, true).proto = ret; - if (GUID_KEY in ret) Ember.generateGuid(ret, 'ember'); - if (META_KEY in ret) Ember.rewatch(ret); // setup watch chains if needed. - return ret; - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ - ember_warn("Computed properties will soon be cacheable by default. To enable this in your app, set `ENV.CP_DEFAULT_CACHEABLE = true`.", Ember.CP_DEFAULT_CACHEABLE); - - - var meta = Ember.meta; - var guidFor = Ember.guidFor; - var USE_ACCESSORS = Ember.USE_ACCESSORS; - var a_slice = Array.prototype.slice; - var o_create = Ember.platform.create; - var o_defineProperty = Ember.platform.defineProperty; - -// .......................................................... -// DEPENDENT KEYS -// - -// data structure: -// meta.deps = { -// 'depKey': { -// 'keyName': count, -// __emberproto__: SRC_OBJ [to detect clones] -// }, -// __emberproto__: SRC_OBJ -// } - - /** @private */ - function uniqDeps(obj, depKey) { - var m = meta(obj), deps, ret; - deps = m.deps; - if (!deps) { - deps = m.deps = { __emberproto__: obj }; - } else if (deps.__emberproto__ !== obj) { - deps = m.deps = o_create(deps); - deps.__emberproto__ = obj; - } - - ret = deps[depKey]; - if (!ret) { - ret = deps[depKey] = { __emberproto__: obj }; - } else if (ret.__emberproto__ !== obj) { - ret = deps[depKey] = o_create(ret); - ret.__emberproto__ = obj; - } - - return ret; - } - - /** @private */ - function addDependentKey(obj, keyName, depKey) { - var deps = uniqDeps(obj, depKey); - deps[keyName] = (deps[keyName] || 0) + 1; - Ember.watch(obj, depKey); - } - - /** @private */ - function removeDependentKey(obj, keyName, depKey) { - var deps = uniqDeps(obj, depKey); - deps[keyName] = (deps[keyName] || 0) - 1; - Ember.unwatch(obj, depKey); - } - - /** @private */ - function addDependentKeys(desc, obj, keyName) { - var keys = desc._dependentKeys, - len = keys ? keys.length : 0; - for (var idx = 0; idx < len; idx++) addDependentKey(obj, keyName, keys[idx]); - } - -// .......................................................... -// COMPUTED PROPERTY -// - - /** @private */ - function ComputedProperty(func, opts) { - this.func = func; - this._cacheable = (opts && opts.cacheable !== undefined) ? opts.cacheable : Ember.CP_DEFAULT_CACHEABLE; - this._dependentKeys = opts && opts.dependentKeys; - } - - /** - @constructor - */ - Ember.ComputedProperty = ComputedProperty; - ComputedProperty.prototype = new Ember.Descriptor(); - - var CP_DESC = { - configurable: true, - enumerable: true, - get: function () { - return undefined; - }, // for when use_accessors is false. - set: Ember.Descriptor.MUST_USE_SETTER // for when use_accessors is false - }; - - /** @private */ - function mkCpGetter(keyName, desc) { - var cacheable = desc._cacheable, - func = desc.func; - - if (cacheable) { - return function () { - var ret, cache = meta(this).cache; - if (keyName in cache) return cache[keyName]; - ret = cache[keyName] = func.call(this, keyName); - return ret; - }; - } else { - return function () { - return func.call(this, keyName); - }; - } - } - - /** @private */ - function mkCpSetter(keyName, desc) { - var cacheable = desc._cacheable, - func = desc.func; - - return function (value) { - var m = meta(this, cacheable), - watched = (m.source === this) && m.watching[keyName] > 0, - ret, oldSuspended, lastSetValues; - - oldSuspended = desc._suspended; - desc._suspended = this; - - watched = watched && m.lastSetValues[keyName] !== guidFor(value); - if (watched) { - m.lastSetValues[keyName] = guidFor(value); - Ember.propertyWillChange(this, keyName); - } - - if (cacheable) delete m.cache[keyName]; - ret = func.call(this, keyName, value); - if (cacheable) m.cache[keyName] = ret; - if (watched) Ember.propertyDidChange(this, keyName); - desc._suspended = oldSuspended; - return ret; - }; - } - - /** - @extends Ember.ComputedProperty - @private - */ - var Cp = ComputedProperty.prototype; - - /** - Call on a computed property to set it into cacheable mode. When in this - mode the computed property will automatically cache the return value of - your function until one of the dependent keys changes. - - MyApp.president = Ember.Object.create({ - fullName: function() { - return this.get('firstName') + ' ' + this.get('lastName'); - - // After calculating the value of this function, Ember.js will - // return that value without re-executing this function until - // one of the dependent properties change. - }.property('firstName', 'lastName').cacheable() - }); - - Properties are cacheable by default. - - @name Ember.ComputedProperty.cacheable - @param {Boolean} aFlag optional set to false to disable caching - @returns {Ember.ComputedProperty} receiver - */ - Cp.cacheable = function (aFlag) { - this._cacheable = aFlag !== false; - return this; - }; - - /** - Call on a computed property to set it into non-cached mode. When in this - mode the computed property will not automatically cache the return value. - - MyApp.outsideService = Ember.Object.create({ - value: function() { - return OutsideService.getValue(); - }.property().volatile() - }); - - @name Ember.ComputedProperty.volatile - @returns {Ember.ComputedProperty} receiver - */ - Cp.volatile = function () { - return this.cacheable(false); - }; - - /** - Sets the dependent keys on this computed property. Pass any number of - arguments containing key paths that this computed property depends on. - - MyApp.president = Ember.Object.create({ - fullName: Ember.computed(function() { - return this.get('firstName') + ' ' + this.get('lastName'); - - // Tell Ember.js that this computed property depends on firstName - // and lastName - }).property('firstName', 'lastName') - }); - - @name Ember.ComputedProperty.property - @param {String} path... zero or more property paths - @returns {Ember.ComputedProperty} receiver - */ - Cp.property = function () { - this._dependentKeys = a_slice.call(arguments); - return this; - }; - - /** - In some cases, you may want to annotate computed properties with additional - metadata about how they function or what values they operate on. For example, - computed property functions may close over variables that are then no longer - available for introspection. - - You can pass a hash of these values to a computed property like this: - - person: function() { - var personId = this.get('personId'); - return App.Person.create({ id: personId }); - }.property().meta({ type: App.Person }) - - The hash that you pass to the `meta()` function will be saved on the - computed property descriptor under the `_meta` key. Ember runtime - exposes a public API for retrieving these values from classes, - via the `metaForProperty()` function. - - @name Ember.ComputedProperty.meta - @param {Hash} metadata - @returns {Ember.ComputedProperty} property descriptor instance - */ - - Cp.meta = function (meta) { - this._meta = meta; - return this; - }; - - /** @private - impl descriptor API */ - Cp.setup = function (obj, keyName, value) { - CP_DESC.get = mkCpGetter(keyName, this); - CP_DESC.set = mkCpSetter(keyName, this); - o_defineProperty(obj, keyName, CP_DESC); - CP_DESC.get = CP_DESC.set = null; - addDependentKeys(this, obj, keyName); - }; - - /** @private - impl descriptor API */ - Cp.teardown = function (obj, keyName) { - var keys = this._dependentKeys, - len = keys ? keys.length : 0; - for (var idx = 0; idx < len; idx++) removeDependentKey(obj, keyName, keys[idx]); - - if (this._cacheable) delete meta(obj).cache[keyName]; - - return null; // no value to restore - }; - - /** @private - impl descriptor API */ - Cp.didChange = function (obj, keyName) { - if (this._cacheable && (this._suspended !== obj)) { - delete meta(obj).cache[keyName]; - } - }; - - /** @private - impl descriptor API */ - Cp.get = function (obj, keyName) { - var ret, cache; - - if (this._cacheable) { - cache = meta(obj).cache; - if (keyName in cache) return cache[keyName]; - ret = cache[keyName] = this.func.call(obj, keyName); - } else { - ret = this.func.call(obj, keyName); - } - return ret; - }; - - /** @private - impl descriptor API */ - Cp.set = function (obj, keyName, value) { - var cacheable = this._cacheable; - - var m = meta(obj, cacheable), - watched = (m.source === obj) && m.watching[keyName] > 0, - ret, oldSuspended, lastSetValues; - - oldSuspended = this._suspended; - this._suspended = obj; - - watched = watched && m.lastSetValues[keyName] !== guidFor(value); - if (watched) { - m.lastSetValues[keyName] = guidFor(value); - Ember.propertyWillChange(obj, keyName); - } - - if (cacheable) delete m.cache[keyName]; - ret = this.func.call(obj, keyName, value); - if (cacheable) m.cache[keyName] = ret; - if (watched) Ember.propertyDidChange(obj, keyName); - this._suspended = oldSuspended; - return ret; - }; - - Cp.val = function (obj, keyName) { - return meta(obj, false).values[keyName]; - }; - - if (!Ember.platform.hasPropertyAccessors) { - Cp.setup = function (obj, keyName, value) { - obj[keyName] = undefined; // so it shows up in key iteration - addDependentKeys(this, obj, keyName); - }; - - } else if (!USE_ACCESSORS) { - Cp.setup = function (obj, keyName) { - // throw exception if not using Ember.get() and Ember.set() when supported - o_defineProperty(obj, keyName, CP_DESC); - addDependentKeys(this, obj, keyName); - }; - } - - /** - This helper returns a new property descriptor that wraps the passed - computed property function. You can use this helper to define properties - with mixins or via Ember.defineProperty(). - - The function you pass will be used to both get and set property values. - The function should accept two parameters, key and value. If value is not - undefined you should set the value first. In either case return the - current value of the property. - - @param {Function} func - The computed property function. - - @returns {Ember.ComputedProperty} property descriptor instance - */ - Ember.computed = function (func) { - var args; - - if (arguments.length > 1) { - args = a_slice.call(arguments, 0, -1); - func = a_slice.call(arguments, -1)[0]; - } - - var cp = new ComputedProperty(func); - - if (args) { - cp.property.apply(cp, args); - } - - return cp; - }; - - /** - Returns the cached value for a property, if one exists. - This can be useful for peeking at the value of a computed - property that is generated lazily, without accidentally causing - it to be created. - - @param {Object} obj the object whose property you want to check - @param {String} key the name of the property whose cached value you want - to return - - */ - Ember.cacheFor = function (obj, key) { - var cache = meta(obj, false).cache; - - if (cache && cache[key]) { - return cache[key]; - } - }; - -})(); - - -(function () { - /*jshint newcap:false*/ - -// NOTE: There is a bug in jshint that doesn't recognize `Object()` without `new` -// as being ok unless both `newcap:false` and not `use strict`. -// https://github.com/jshint/jshint/issues/392 - -// Testing this is not ideal, but we want ArrayUtils to use native functions -// if available, but not to use versions created by libraries like Prototype - /** @private */ - var isNativeFunc = function (func) { - // This should probably work in all browsers likely to have ES5 array methods - return func && Function.prototype.toString.call(func).indexOf('[native code]') > -1; - }; - -// From: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/map - /** @private */ - var arrayMap = isNativeFunc(Array.prototype.map) ? Array.prototype.map : function (fun /*, thisp */) { - //"use strict"; - - if (this === void 0 || this === null) { - throw new TypeError(); - } - - var t = Object(this); - var len = t.length >>> 0; - if (typeof fun !== "function") { - throw new TypeError(); - } - - var res = new Array(len); - var thisp = arguments[1]; - for (var i = 0; i < len; i++) { - if (i in t) { - res[i] = fun.call(thisp, t[i], i, t); - } - } - - return res; - }; - -// From: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/foreach - /** @private */ - var arrayForEach = isNativeFunc(Array.prototype.forEach) ? Array.prototype.forEach : function (fun /*, thisp */) { - //"use strict"; - - if (this === void 0 || this === null) { - throw new TypeError(); - } - - var t = Object(this); - var len = t.length >>> 0; - if (typeof fun !== "function") { - throw new TypeError(); - } - - var thisp = arguments[1]; - for (var i = 0; i < len; i++) { - if (i in t) { - fun.call(thisp, t[i], i, t); - } - } - }; - - /** @private */ - var arrayIndexOf = isNativeFunc(Array.prototype.indexOf) ? Array.prototype.indexOf : function (obj, fromIndex) { - if (fromIndex === null || fromIndex === undefined) { - fromIndex = 0; - } - else if (fromIndex < 0) { - fromIndex = Math.max(0, this.length + fromIndex); - } - for (var i = fromIndex, j = this.length; i < j; i++) { - if (this[i] === obj) { - return i; - } - } - return -1; - }; - - - Ember.ArrayUtils = { - map: function (obj) { - var args = Array.prototype.slice.call(arguments, 1); - return obj.map ? obj.map.apply(obj, args) : arrayMap.apply(obj, args); - }, - - forEach: function (obj) { - var args = Array.prototype.slice.call(arguments, 1); - return obj.forEach ? obj.forEach.apply(obj, args) : arrayForEach.apply(obj, args); - }, - - indexOf: function (obj) { - var args = Array.prototype.slice.call(arguments, 1); - return obj.indexOf ? obj.indexOf.apply(obj, args) : arrayIndexOf.apply(obj, args); - }, - - indexesOf: function (obj) { - var args = Array.prototype.slice.call(arguments, 1); - return args[0] === undefined ? [] : Ember.ArrayUtils.map(args[0], function (item) { - return Ember.ArrayUtils.indexOf(obj, item); - }); - }, - - removeObject: function (array, item) { - var index = this.indexOf(array, item); - if (index !== -1) { - array.splice(index, 1); - } - } - }; - - - if (Ember.SHIM_ES5) { - if (!Array.prototype.map) { - /** @private */ - Array.prototype.map = arrayMap; - } - - if (!Array.prototype.forEach) { - /** @private */ - Array.prototype.forEach = arrayForEach; - } - - if (!Array.prototype.indexOf) { - /** @private */ - Array.prototype.indexOf = arrayIndexOf; - } - } - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var AFTER_OBSERVERS = ':change'; - var BEFORE_OBSERVERS = ':before'; - var guidFor = Ember.guidFor; - var normalizePath = Ember.normalizePath; - - var deferred = 0; - var array_Slice = Array.prototype.slice; - var array_ForEach = Ember.ArrayUtils.forEach; - - /** @private */ - var ObserverSet = function () { - this.targetSet = {}; - }; - ObserverSet.prototype.add = function (target, path) { - var targetSet = this.targetSet, - targetGuid = Ember.guidFor(target), - pathSet = targetSet[targetGuid]; - if (!pathSet) { - targetSet[targetGuid] = pathSet = {}; - } - if (pathSet[path]) { - return false; - } else { - return pathSet[path] = true; - } - }; - ObserverSet.prototype.clear = function () { - this.targetSet = {}; - }; - - /** @private */ - var DeferredEventQueue = function () { - this.targetSet = {}; - this.queue = []; - }; - - DeferredEventQueue.prototype.push = function (target, eventName) { - var targetSet = this.targetSet, - queue = this.queue, - targetGuid = Ember.guidFor(target), - eventNameSet = targetSet[targetGuid], - index; - - if (!eventNameSet) { - targetSet[targetGuid] = eventNameSet = {}; - } - index = eventNameSet[eventName]; - if (index === undefined) { - eventNameSet[eventName] = queue.push(Ember.deferEvent(target, eventName)) - 1; - } else { - queue[index] = Ember.deferEvent(target, eventName); - } - }; - - DeferredEventQueue.prototype.flush = function () { - var queue = this.queue; - this.queue = []; - this.targetSet = {}; - for (var i = 0, len = queue.length; i < len; ++i) { - queue[i](); - } - }; - - var queue = new DeferredEventQueue(), beforeObserverSet = new ObserverSet(); - - /** @private */ - function notifyObservers(obj, eventName, forceNotification) { - if (deferred && !forceNotification) { - queue.push(obj, eventName); - } else { - Ember.sendEvent(obj, eventName); - } - } - - /** @private */ - function flushObserverQueue() { - beforeObserverSet.clear(); - - queue.flush(); - } - - Ember.beginPropertyChanges = function () { - deferred++; - return this; - }; - - Ember.endPropertyChanges = function () { - deferred--; - if (deferred <= 0) flushObserverQueue(); - }; - - /** - Make a series of property changes together in an - exception-safe way. - - Ember.changeProperties(function() { - obj1.set('foo', mayBlowUpWhenSet); - obj2.set('bar', baz); - }); - */ - Ember.changeProperties = function (cb, binding) { - Ember.beginPropertyChanges(); - try { - cb.call(binding); - } finally { - Ember.endPropertyChanges(); - } - }; - - /** - Set a list of properties on an object. These properties are set inside - a single `beginPropertyChanges` and `endPropertyChanges` batch, so - observers will be buffered. - */ - Ember.setProperties = function (self, hash) { - Ember.changeProperties(function () { - for (var prop in hash) { - if (hash.hasOwnProperty(prop)) Ember.set(self, prop, hash[prop]); - } - }); - return self; - }; - - - /** @private */ - function changeEvent(keyName) { - return keyName + AFTER_OBSERVERS; - } - - /** @private */ - function beforeEvent(keyName) { - return keyName + BEFORE_OBSERVERS; - } - - /** @private */ - function changeKey(eventName) { - return eventName.slice(0, -7); - } - - /** @private */ - function beforeKey(eventName) { - return eventName.slice(0, -7); - } - - /** @private */ - function xformForArgs(args) { - return function (target, method, params) { - var obj = params[0], keyName = changeKey(params[1]), val; - var copy_args = args.slice(); - if (method.length > 2) { - val = Ember.getPath(Ember.isGlobalPath(keyName) ? window : obj, keyName); - } - copy_args.unshift(obj, keyName, val); - method.apply(target, copy_args); - }; - } - - var xformChange = xformForArgs([]); - - /** @private */ - function xformBefore(target, method, params) { - var obj = params[0], keyName = beforeKey(params[1]), val; - if (method.length > 2) val = Ember.getPath(obj, keyName); - method.call(target, obj, keyName, val); - } - - Ember.addObserver = function (obj, path, target, method) { - path = normalizePath(path); - - var xform; - if (arguments.length > 4) { - var args = array_Slice.call(arguments, 4); - xform = xformForArgs(args); - } else { - xform = xformChange; - } - Ember.addListener(obj, changeEvent(path), target, method, xform); - Ember.watch(obj, path); - return this; - }; - - /** @private */ - Ember.observersFor = function (obj, path) { - return Ember.listenersFor(obj, changeEvent(path)); - }; - - Ember.removeObserver = function (obj, path, target, method) { - path = normalizePath(path); - Ember.unwatch(obj, path); - Ember.removeListener(obj, changeEvent(path), target, method); - return this; - }; - - Ember.addBeforeObserver = function (obj, path, target, method) { - path = normalizePath(path); - Ember.addListener(obj, beforeEvent(path), target, method, xformBefore); - Ember.watch(obj, path); - return this; - }; - -// Suspend observer during callback. -// -// This should only be used by the target of the observer -// while it is setting the observed path. - /** @private */ - Ember._suspendObserver = function (obj, path, target, method, callback) { - return Ember._suspendListener(obj, changeEvent(path), target, method, callback); - }; - - /** @private */ - Ember.beforeObserversFor = function (obj, path) { - return Ember.listenersFor(obj, beforeEvent(path)); - }; - - Ember.removeBeforeObserver = function (obj, path, target, method) { - path = normalizePath(path); - Ember.unwatch(obj, path); - Ember.removeListener(obj, beforeEvent(path), target, method); - return this; - }; - - /** @private */ - Ember.notifyObservers = function (obj, keyName) { - if (obj.isDestroying) { - return; - } - - notifyObservers(obj, changeEvent(keyName)); - }; - - /** @private */ - Ember.notifyBeforeObservers = function (obj, keyName) { - if (obj.isDestroying) { - return; - } - - var guid, set, forceNotification = false; - - if (deferred) { - if (beforeObserverSet.add(obj, keyName)) { - forceNotification = true; - } else { - return; - } - } - - notifyObservers(obj, beforeEvent(keyName), forceNotification); - }; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ - var guidFor = Ember.guidFor; - var meta = Ember.meta; - var get = Ember.get, set = Ember.set; - var normalizeTuple = Ember.normalizeTuple.primitive; - var normalizePath = Ember.normalizePath; - var SIMPLE_PROPERTY = Ember.SIMPLE_PROPERTY; - var GUID_KEY = Ember.GUID_KEY; - var META_KEY = Ember.META_KEY; - var notifyObservers = Ember.notifyObservers; - var forEach = Ember.ArrayUtils.forEach; - - var FIRST_KEY = /^([^\.\*]+)/; - var IS_PATH = /[\.\*]/; - - /** @private */ - function firstKey(path) { - return path.match(FIRST_KEY)[0]; - } - -// returns true if the passed path is just a keyName - /** @private */ - function isKeyName(path) { - return path === '*' || !IS_PATH.test(path); - } - -// .......................................................... -// DEPENDENT KEYS -// - - var DEP_SKIP = { __emberproto__: true }; // skip some keys and toString - - /** @private */ - function iterDeps(method, obj, depKey, seen, meta) { - - var guid = guidFor(obj); - if (!seen[guid]) seen[guid] = {}; - if (seen[guid][depKey]) return; - seen[guid][depKey] = true; - - var deps = meta.deps; - deps = deps && deps[depKey]; - if (deps) { - for (var key in deps) { - if (DEP_SKIP[key]) continue; - method(obj, key); - } - } - } - - - var WILL_SEEN, DID_SEEN; - -// called whenever a property is about to change to clear the cache of any dependent keys (and notify those properties of changes, etc...) - /** @private */ - function dependentKeysWillChange(obj, depKey, meta) { - if (obj.isDestroying) { - return; - } - - var seen = WILL_SEEN, top = !seen; - if (top) seen = WILL_SEEN = {}; - iterDeps(propertyWillChange, obj, depKey, seen, meta); - if (top) WILL_SEEN = null; - } - -// called whenever a property has just changed to update dependent keys - /** @private */ - function dependentKeysDidChange(obj, depKey, meta) { - if (obj.isDestroying) { - return; - } - - var seen = DID_SEEN, top = !seen; - if (top) seen = DID_SEEN = {}; - iterDeps(propertyDidChange, obj, depKey, seen, meta); - if (top) DID_SEEN = null; - } - -// .......................................................... -// CHAIN -// - - /** @private */ - function addChainWatcher(obj, keyName, node) { - if (!obj || ('object' !== typeof obj)) return; // nothing to do - var m = meta(obj); - var nodes = m.chainWatchers; - if (!nodes || nodes.__emberproto__ !== obj) { - nodes = m.chainWatchers = { __emberproto__: obj }; - } - - if (!nodes[keyName]) nodes[keyName] = {}; - nodes[keyName][guidFor(node)] = node; - Ember.watch(obj, keyName); - } - - /** @private */ - function removeChainWatcher(obj, keyName, node) { - if (!obj || ('object' !== typeof obj)) return; // nothing to do - var m = meta(obj, false); - var nodes = m.chainWatchers; - if (!nodes || nodes.__emberproto__ !== obj) return; //nothing to do - if (nodes[keyName]) delete nodes[keyName][guidFor(node)]; - Ember.unwatch(obj, keyName); - } - - var pendingQueue = []; - -// attempts to add the pendingQueue chains again. If some of them end up -// back in the queue and reschedule is true, schedules a timeout to try -// again. - /** @private */ - function flushPendingChains(reschedule) { - if (pendingQueue.length === 0) return; // nothing to do - - var queue = pendingQueue; - pendingQueue = []; - - forEach(queue, function (q) { - q[0].add(q[1]); - }); - if (reschedule !== false && pendingQueue.length > 0) { - setTimeout(flushPendingChains, 1); - } - } - - /** @private */ - function isProto(pvalue) { - return meta(pvalue, false).proto === pvalue; - } - -// A ChainNode watches a single key on an object. If you provide a starting -// value for the key then the node won't actually watch it. For a root node -// pass null for parent and key and object for value. - /** @private */ - var ChainNode = function (parent, key, value, separator) { - var obj; - this._parent = parent; - this._key = key; - - // _watching is true when calling get(this._parent, this._key) will - // return the value of this node. - // - // It is false for the root of a chain (because we have no parent) - // and for global paths (because the parent node is the object with - // the observer on it) - this._watching = value === undefined; - - this._value = value; - this._separator = separator || '.'; - this._paths = {}; - if (this._watching) { - this._object = parent.value(); - if (this._object) addChainWatcher(this._object, this._key, this); - } - - // Special-case: the EachProxy relies on immediate evaluation to - // establish its observers. - // - // TODO: Replace this with an efficient callback that the EachProxy - // can implement. - if (this._parent && this._parent._key === '@each') { - this.value(); - } - }; - - - var Wp = ChainNode.prototype; - - Wp.value = function () { - if (this._value === undefined && this._watching) { - var obj = this._parent.value(); - this._value = (obj && !isProto(obj)) ? get(obj, this._key) : undefined; - } - return this._value; - }; - - Wp.destroy = function () { - if (this._watching) { - var obj = this._object; - if (obj) removeChainWatcher(obj, this._key, this); - this._watching = false; // so future calls do nothing - } - }; - -// copies a top level object only - Wp.copy = function (obj) { - var ret = new ChainNode(null, null, obj, this._separator); - var paths = this._paths, path; - for (path in paths) { - if (paths[path] <= 0) continue; // this check will also catch non-number vals. - ret.add(path); - } - return ret; - }; - -// called on the root node of a chain to setup watchers on the specified -// path. - Wp.add = function (path) { - var obj, tuple, key, src, separator, paths; - - paths = this._paths; - paths[path] = (paths[path] || 0) + 1; - - obj = this.value(); - tuple = normalizeTuple(obj, path); - - // the path was a local path - if (tuple[0] && (tuple[0] === obj)) { - path = tuple[1]; - key = firstKey(path); - path = path.slice(key.length + 1); - - // global path, but object does not exist yet. - // put into a queue and try to connect later. - } else if (!tuple[0]) { - pendingQueue.push([this, path]); - tuple.length = 0; - return; - - // global path, and object already exists - } else { - src = tuple[0]; - key = path.slice(0, 0 - (tuple[1].length + 1)); - separator = path.slice(key.length, key.length + 1); - path = tuple[1]; - } - - tuple.length = 0; - this.chain(key, path, src, separator); - }; - -// called on the root node of a chain to teardown watcher on the specified -// path - Wp.remove = function (path) { - var obj, tuple, key, src, paths; - - paths = this._paths; - if (paths[path] > 0) paths[path]--; - - obj = this.value(); - tuple = normalizeTuple(obj, path); - if (tuple[0] === obj) { - path = tuple[1]; - key = firstKey(path); - path = path.slice(key.length + 1); - - } else { - src = tuple[0]; - key = path.slice(0, 0 - (tuple[1].length + 1)); - path = tuple[1]; - } - - tuple.length = 0; - this.unchain(key, path); - }; - - Wp.count = 0; - - Wp.chain = function (key, path, src, separator) { - var chains = this._chains, node; - if (!chains) chains = this._chains = {}; - - node = chains[key]; - if (!node) node = chains[key] = new ChainNode(this, key, src, separator); - node.count++; // count chains... - - // chain rest of path if there is one - if (path && path.length > 0) { - key = firstKey(path); - path = path.slice(key.length + 1); - node.chain(key, path); // NOTE: no src means it will observe changes... - } - }; - - Wp.unchain = function (key, path) { - var chains = this._chains, node = chains[key]; - - // unchain rest of path first... - if (path && path.length > 1) { - key = firstKey(path); - path = path.slice(key.length + 1); - node.unchain(key, path); - } - - // delete node if needed. - node.count--; - if (node.count <= 0) { - delete chains[node._key]; - node.destroy(); - } - - }; - - Wp.willChange = function () { - var chains = this._chains; - if (chains) { - for (var key in chains) { - if (!chains.hasOwnProperty(key)) continue; - chains[key].willChange(); - } - } - - if (this._parent) this._parent.chainWillChange(this, this._key, 1); - }; - - Wp.chainWillChange = function (chain, path, depth) { - if (this._key) path = this._key + this._separator + path; - - if (this._parent) { - this._parent.chainWillChange(this, path, depth + 1); - } else { - if (depth > 1) Ember.propertyWillChange(this.value(), path); - path = 'this.' + path; - if (this._paths[path] > 0) Ember.propertyWillChange(this.value(), path); - } - }; - - Wp.chainDidChange = function (chain, path, depth) { - if (this._key) path = this._key + this._separator + path; - if (this._parent) { - this._parent.chainDidChange(this, path, depth + 1); - } else { - if (depth > 1) Ember.propertyDidChange(this.value(), path); - path = 'this.' + path; - if (this._paths[path] > 0) Ember.propertyDidChange(this.value(), path); - } - }; - - Wp.didChange = function (suppressEvent) { - // invalidate my own value first. - if (this._watching) { - var obj = this._parent.value(); - if (obj !== this._object) { - removeChainWatcher(this._object, this._key, this); - this._object = obj; - addChainWatcher(obj, this._key, this); - } - this._value = undefined; - - // Special-case: the EachProxy relies on immediate evaluation to - // establish its observers. - if (this._parent && this._parent._key === '@each') - this.value(); - } - - // then notify chains... - var chains = this._chains; - if (chains) { - for (var key in chains) { - if (!chains.hasOwnProperty(key)) continue; - chains[key].didChange(suppressEvent); - } - } - - if (suppressEvent) return; - - // and finally tell parent about my path changing... - if (this._parent) this._parent.chainDidChange(this, this._key, 1); - }; - -// get the chains for the current object. If the current object has -// chains inherited from the proto they will be cloned and reconfigured for -// the current object. - /** @private */ - function chainsFor(obj) { - var m = meta(obj), ret = m.chains; - if (!ret) { - ret = m.chains = new ChainNode(null, null, obj); - } else if (ret.value() !== obj) { - ret = m.chains = ret.copy(obj); - } - return ret; - } - - - /** @private */ - function notifyChains(obj, m, keyName, methodName, arg) { - var nodes = m.chainWatchers; - - if (!nodes || nodes.__emberproto__ !== obj) return; // nothing to do - - nodes = nodes[keyName]; - if (!nodes) return; - - for (var key in nodes) { - if (!nodes.hasOwnProperty(key)) continue; - nodes[key][methodName](arg); - } - } - - Ember.overrideChains = function (obj, keyName, m) { - notifyChains(obj, m, keyName, 'didChange', true); - }; - - /** @private */ - function chainsWillChange(obj, keyName, m) { - notifyChains(obj, m, keyName, 'willChange'); - } - - /** @private */ - function chainsDidChange(obj, keyName, m) { - notifyChains(obj, m, keyName, 'didChange'); - } - -// .......................................................... -// WATCH -// - - var WATCHED_PROPERTY = Ember.SIMPLE_PROPERTY.watched; - - /** - @private - - Starts watching a property on an object. Whenever the property changes, - invokes Ember.propertyWillChange and Ember.propertyDidChange. This is the - primitive used by observers and dependent keys; usually you will never call - this method directly but instead use higher level methods like - Ember.addObserver(). - */ - Ember.watch = function (obj, keyName) { - - // can't watch length on Array - it is special... - if (keyName === 'length' && Ember.typeOf(obj) === 'array') return this; - - var m = meta(obj), watching = m.watching, desc; - keyName = normalizePath(keyName); - - // activate watching first time - if (!watching[keyName]) { - watching[keyName] = 1; - if (isKeyName(keyName)) { - desc = m.descs[keyName]; - desc = desc ? desc.watched : WATCHED_PROPERTY; - if (desc) Ember.defineProperty(obj, keyName, desc); - } else { - chainsFor(obj).add(keyName); - } - - } else { - watching[keyName] = (watching[keyName] || 0) + 1; - } - return this; - }; - - Ember.isWatching = function (obj, keyName) { - return !!meta(obj).watching[keyName]; - }; - - Ember.watch.flushPending = flushPendingChains; - - /** @private */ - Ember.unwatch = function (obj, keyName) { - // can't watch length on Array - it is special... - if (keyName === 'length' && Ember.typeOf(obj) === 'array') return this; - - var watching = meta(obj).watching, desc, descs; - keyName = normalizePath(keyName); - if (watching[keyName] === 1) { - watching[keyName] = 0; - if (isKeyName(keyName)) { - desc = meta(obj).descs[keyName]; - desc = desc ? desc.unwatched : SIMPLE_PROPERTY; - if (desc) Ember.defineProperty(obj, keyName, desc); - } else { - chainsFor(obj).remove(keyName); - } - - } else if (watching[keyName] > 1) { - watching[keyName]--; - } - - return this; - }; - - /** - @private - - Call on an object when you first beget it from another object. This will - setup any chained watchers on the object instance as needed. This method is - safe to call multiple times. - */ - Ember.rewatch = function (obj) { - var m = meta(obj, false), chains = m.chains, bindings = m.bindings, key, b; - - // make sure the object has its own guid. - if (GUID_KEY in obj && !obj.hasOwnProperty(GUID_KEY)) { - Ember.generateGuid(obj, 'ember'); - } - - // make sure any chained watchers update. - if (chains && chains.value() !== obj) chainsFor(obj); - - // if the object has bindings then sync them.. - if (bindings && m.proto !== obj) { - for (key in bindings) { - b = !DEP_SKIP[key] && obj[key]; - if (b && b instanceof Ember.Binding) b.fromDidChange(obj); - } - } - - return this; - }; - -// .......................................................... -// PROPERTY CHANGES -// - - /** - This function is called just before an object property is about to change. - It will notify any before observers and prepare caches among other things. - - Normally you will not need to call this method directly but if for some - reason you can't directly watch a property you can invoke this method - manually along with `Ember.propertyDidChange()` which you should call just - after the property value changes. - - @memberOf Ember - - @param {Object} obj - The object with the property that will change - - @param {String} keyName - The property key (or path) that will change. - - @returns {void} - */ - function propertyWillChange(obj, keyName) { - var m = meta(obj, false), proto = m.proto, desc = m.descs[keyName]; - if (proto === obj) return; - if (desc && desc.willChange) desc.willChange(obj, keyName); - dependentKeysWillChange(obj, keyName, m); - chainsWillChange(obj, keyName, m); - Ember.notifyBeforeObservers(obj, keyName); - } - - Ember.propertyWillChange = propertyWillChange; - - /** - This function is called just after an object property has changed. - It will notify any observers and clear caches among other things. - - Normally you will not need to call this method directly but if for some - reason you can't directly watch a property you can invoke this method - manually along with `Ember.propertyWilLChange()` which you should call just - before the property value changes. - - @memberOf Ember - - @param {Object} obj - The object with the property that will change - - @param {String} keyName - The property key (or path) that will change. - - @returns {void} - */ - function propertyDidChange(obj, keyName) { - var m = meta(obj, false), proto = m.proto, desc = m.descs[keyName]; - if (proto === obj) return; - if (desc && desc.didChange) desc.didChange(obj, keyName); - dependentKeysDidChange(obj, keyName, m); - chainsDidChange(obj, keyName, m); - Ember.notifyObservers(obj, keyName); - } - - Ember.propertyDidChange = propertyDidChange; - - var NODE_STACK = []; - - /** - Tears down the meta on an object so that it can be garbage collected. - Multiple calls will have no effect. - - @param {Object} obj the object to destroy - @returns {void} - */ - Ember.destroy = function (obj) { - var meta = obj[META_KEY], node, nodes, key, nodeObject; - if (meta) { - obj[META_KEY] = null; - // remove chainWatchers to remove circular references that would prevent GC - node = meta.chains; - if (node) { - NODE_STACK.push(node); - // process tree - while (NODE_STACK.length > 0) { - node = NODE_STACK.pop(); - // push children - nodes = node._chains; - if (nodes) { - for (key in nodes) { - if (nodes.hasOwnProperty(key)) { - NODE_STACK.push(nodes[key]); - } - } - } - // remove chainWatcher in node object - if (node._watching) { - nodeObject = node._object; - if (nodeObject) { - removeChainWatcher(nodeObject, node._key, node); - } - } - } - } - } - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ - var o_create = Ember.platform.create; - var meta = Ember.meta; - var guidFor = Ember.guidFor; - var a_slice = Array.prototype.slice; - - /** - The event system uses a series of nested hashes to store listeners on an - object. When a listener is registered, or when an event arrives, these - hashes are consulted to determine which target and action pair to invoke. - - The hashes are stored in the object's meta hash, and look like this: - - // Object's meta hash - { - listeners: { // variable name: `listenerSet` - "foo:changed": { // variable name: `targetSet` - [targetGuid]: { // variable name: `actionSet` - [methodGuid]: { // variable name: `action` - target: [Object object], - method: [Function function], - xform: [Function function] - } - } - } - } - } - - */ - - /** @private */ - var metaPath = Ember.metaPath; - -// Gets the set of all actions, keyed on the guid of each action's -// method property. - /** @private */ - function actionSetFor(obj, eventName, target, writable) { - var targetGuid = guidFor(target); - return metaPath(obj, ['listeners', eventName, targetGuid], writable); - } - -// Gets the set of all targets, keyed on the guid of each action's -// target property. - /** @private */ - function targetSetFor(obj, eventName) { - var listenerSet = meta(obj, false).listeners; - if (!listenerSet) { - return false; - } - - return listenerSet[eventName] || false; - } - -// TODO: This knowledge should really be a part of the -// meta system. - var SKIP_PROPERTIES = { __ember_source__: true }; - - /** @private */ - function iterateSet(targetSet, callback, params) { - if (!targetSet) { - return false; - } - // Iterate through all elements of the target set - for (var targetGuid in targetSet) { - if (SKIP_PROPERTIES[targetGuid]) { - continue; - } - - var actionSet = targetSet[targetGuid]; - if (actionSet) { - // Iterate through the elements of the action set - for (var methodGuid in actionSet) { - if (SKIP_PROPERTIES[methodGuid]) { - continue; - } - - var action = actionSet[methodGuid]; - if (action) { - if (callback(action, params) === true) { - return true; - } - } - } - } - } - return false; - } - - /** @private */ - function invokeAction(action, params) { - var method = action.method, target = action.target, xform = action.xform; - // If there is no target, the target is the object - // on which the event was fired. - if (!target) { - target = params[0]; - } - if ('string' === typeof method) { - method = target[method]; - } - - // Listeners can provide an `xform` function, which can perform - // arbitrary transformations, such as changing the order of - // parameters. - // - // This is primarily used by ember-runtime's observer system, which - // provides a higher level abstraction on top of events, including - // dynamically looking up current values and passing them into the - // registered listener. - if (xform) { - xform(target, method, params); - } else { - method.apply(target, params); - } - } - - /** - The parameters passed to an event listener are not exactly the - parameters passed to an observer. if you pass an xform function, it will - be invoked and is able to translate event listener parameters into the form - that observers are expecting. - - @memberOf Ember - */ - function addListener(obj, eventName, target, method, xform) { - ember_assert("You must pass at least an object and event name to Ember.addListener", !!obj && !!eventName); - - if (!method && 'function' === typeof target) { - method = target; - target = null; - } - - var actionSet = actionSetFor(obj, eventName, target, true), - methodGuid = guidFor(method); - - if (!actionSet[methodGuid]) { - actionSet[methodGuid] = { target: target, method: method, xform: xform }; - } else { - actionSet[methodGuid].xform = xform; // used by observers etc to map params - } - - if ('function' === typeof obj.didAddListener) { - obj.didAddListener(eventName, target, method); - } - } - - /** @memberOf Ember */ - function removeListener(obj, eventName, target, method) { - if (!method && 'function' === typeof target) { - method = target; - target = null; - } - - var actionSet = actionSetFor(obj, eventName, target, true), - methodGuid = guidFor(method); - - // we can't simply delete this parameter, because if we do, we might - // re-expose the property from the prototype chain. - if (actionSet && actionSet[methodGuid]) { - actionSet[methodGuid] = null; - } - - if (obj && 'function' === typeof obj.didRemoveListener) { - obj.didRemoveListener(eventName, target, method); - } - } - -// Suspend listener during callback. -// -// This should only be used by the target of the event listener -// when it is taking an action that would cause the event, e.g. -// an object might suspend its property change listener while it is -// setting that property. - /** @private */ - function suspendListener(obj, eventName, target, method, callback) { - if (!method && 'function' === typeof target) { - method = target; - target = null; - } - - var actionSet = actionSetFor(obj, eventName, target, true), - methodGuid = guidFor(method), - action = actionSet && actionSet[methodGuid]; - - actionSet[methodGuid] = null; - try { - return callback.call(target); - } finally { - actionSet[methodGuid] = action; - } - } - -// returns a list of currently watched events - /** @memberOf Ember */ - function watchedEvents(obj) { - var listeners = meta(obj, false).listeners, ret = []; - - if (listeners) { - for (var eventName in listeners) { - if (!SKIP_PROPERTIES[eventName] && listeners[eventName]) { - ret.push(eventName); - } - } - } - return ret; - } - - /** @memberOf Ember */ - function sendEvent(obj, eventName) { - - // first give object a chance to handle it - if (obj !== Ember && 'function' === typeof obj.sendEvent) { - obj.sendEvent.apply(obj, a_slice.call(arguments, 1)); - } - - var targetSet = targetSetFor(obj, eventName); - iterateSet(targetSet, invokeAction, arguments); - - return true; - } - - /** @memberOf Ember */ - function deferEvent(obj, eventName) { - var targetSet = targetSetFor(obj, eventName), actions = [], params = arguments; - iterateSet(targetSet, function (action) { - actions.push(action); - }); - - return function () { - if (obj !== Ember && 'function' === typeof obj.sendEvent) { - obj.sendEvent.apply(obj, a_slice.call(params, 1)); - } - - for (var i = 0, len = actions.length; i < len; ++i) { - invokeAction(actions[i], params); - } - }; - } - - /** @memberOf Ember */ - function hasListeners(obj, eventName) { - var targetSet = targetSetFor(obj, eventName); - if (iterateSet(targetSet, function () { - return true; - })) { - return true; - } - - // no listeners! might as well clean this up so it is faster later. - var set = metaPath(obj, ['listeners'], true); - set[eventName] = null; - - return false; - } - - /** @memberOf Ember */ - function listenersFor(obj, eventName) { - var targetSet = targetSetFor(obj, eventName), ret = []; - iterateSet(targetSet, function (action) { - ret.push([action.target, action.method]); - }); - return ret; - } - - Ember.addListener = addListener; - Ember.removeListener = removeListener; - Ember._suspendListener = suspendListener; - Ember.sendEvent = sendEvent; - Ember.hasListeners = hasListeners; - Ember.watchedEvents = watchedEvents; - Ember.listenersFor = listenersFor; - Ember.deferEvent = deferEvent; -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var Mixin, MixinDelegate, REQUIRED, Alias; - var classToString, superClassString; - - var a_map = Ember.ArrayUtils.map; - var a_indexOf = Ember.ArrayUtils.indexOf; - var a_forEach = Ember.ArrayUtils.forEach; - var a_slice = Array.prototype.slice; - var EMPTY_META = {}; // dummy for non-writable meta - var META_SKIP = { __emberproto__: true, __ember_count__: true }; - - var o_create = Ember.platform.create; - - /** @private */ - function meta(obj, writable) { - var m = Ember.meta(obj, writable !== false), ret = m.mixins; - if (writable === false) return ret || EMPTY_META; - - if (!ret) { - ret = m.mixins = { __emberproto__: obj }; - } else if (ret.__emberproto__ !== obj) { - ret = m.mixins = o_create(ret); - ret.__emberproto__ = obj; - } - return ret; - } - - /** @private */ - function initMixin(mixin, args) { - if (args && args.length > 0) { - mixin.mixins = a_map(args, function (x) { - if (x instanceof Mixin) return x; - - // Note: Manually setup a primitive mixin here. This is the only - // way to actually get a primitive mixin. This way normal creation - // of mixins will give you combined mixins... - var mixin = new Mixin(); - mixin.properties = x; - return mixin; - }); - } - return mixin; - } - - var NATIVES = [Boolean, Object, Number, Array, Date, String]; - - /** @private */ - function isMethod(obj) { - if ('function' !== typeof obj || obj.isMethod === false) return false; - return a_indexOf(NATIVES, obj) < 0; - } - - /** @private */ - function mergeMixins(mixins, m, descs, values, base) { - var len = mixins.length, idx, mixin, guid, props, value, key, ovalue, concats; - - /** @private */ - function removeKeys(keyName) { - delete descs[keyName]; - delete values[keyName]; - } - - for (idx = 0; idx < len; idx++) { - - mixin = mixins[idx]; - if (!mixin) throw new Error('Null value found in Ember.mixin()'); - - if (mixin instanceof Mixin) { - guid = Ember.guidFor(mixin); - if (m[guid]) continue; - m[guid] = mixin; - props = mixin.properties; - } else { - props = mixin; // apply anonymous mixin properties - } - - if (props) { - - // reset before adding each new mixin to pickup concats from previous - concats = values.concatenatedProperties || base.concatenatedProperties; - if (props.concatenatedProperties) { - concats = concats ? concats.concat(props.concatenatedProperties) : props.concatenatedProperties; - } - - for (key in props) { - if (!props.hasOwnProperty(key)) continue; - value = props[key]; - if (value instanceof Ember.Descriptor) { - if (value === REQUIRED && descs[key]) { - continue; - } - - descs[key] = value; - values[key] = undefined; - } else { - - // impl super if needed... - if (isMethod(value)) { - ovalue = (descs[key] === Ember.SIMPLE_PROPERTY) && values[key]; - if (!ovalue) ovalue = base[key]; - if ('function' !== typeof ovalue) ovalue = null; - if (ovalue) { - var o = value.__ember_observes__, ob = value.__ember_observesBefore__; - value = Ember.wrap(value, ovalue); - value.__ember_observes__ = o; - value.__ember_observesBefore__ = ob; - } - } else if ((concats && a_indexOf(concats, key) >= 0) || key === 'concatenatedProperties') { - var baseValue = values[key] || base[key]; - value = baseValue ? baseValue.concat(value) : Ember.makeArray(value); - } - - descs[key] = Ember.SIMPLE_PROPERTY; - values[key] = value; - } - } - - // manually copy toString() because some JS engines do not enumerate it - if (props.hasOwnProperty('toString')) { - base.toString = props.toString; - } - - } else if (mixin.mixins) { - mergeMixins(mixin.mixins, m, descs, values, base); - if (mixin._without) a_forEach(mixin._without, removeKeys); - } - } - } - - /** @private */ - var defineProperty = Ember.defineProperty; - - /** @private */ - function writableReq(obj) { - var m = Ember.meta(obj), req = m.required; - if (!req || (req.__emberproto__ !== obj)) { - req = m.required = req ? o_create(req) : { __ember_count__: 0 }; - req.__emberproto__ = obj; - } - return req; - } - - /** @private */ - function getObserverPaths(value) { - return ('function' === typeof value) && value.__ember_observes__; - } - - /** @private */ - function getBeforeObserverPaths(value) { - return ('function' === typeof value) && value.__ember_observesBefore__; - } - - Ember._mixinBindings = function (obj, key, value, m) { - return value; - }; - - /** @private */ - function applyMixin(obj, mixins, partial) { - var descs = {}, values = {}, m = Ember.meta(obj), req = m.required; - var key, willApply, didApply, value, desc; - - var mixinBindings = Ember._mixinBindings; - - // Go through all mixins and hashes passed in, and: - // - // * Handle concatenated properties - // * Set up _super wrapping if necessary - // * Set up descriptors (simple, watched or computed properties) - // * Copying `toString` in broken browsers - mergeMixins(mixins, meta(obj), descs, values, obj); - - if (MixinDelegate.detect(obj)) { - willApply = values.willApplyProperty || obj.willApplyProperty; - didApply = values.didApplyProperty || obj.didApplyProperty; - } - - for (key in descs) { - if (!descs.hasOwnProperty(key)) continue; - - desc = descs[key]; - value = values[key]; - - if (desc === REQUIRED) { - if (!(key in obj)) { - if (!partial) throw new Error('Required property not defined: ' + key); - - // for partial applies add to hash of required keys - req = writableReq(obj); - req.__ember_count__++; - req[key] = true; - } - - } else { - - while (desc instanceof Alias) { - - var altKey = desc.methodName; - if (descs[altKey]) { - value = values[altKey]; - desc = descs[altKey]; - } else if (m.descs[altKey]) { - desc = m.descs[altKey]; - value = desc.val(obj, altKey); - } else { - value = obj[altKey]; - desc = Ember.SIMPLE_PROPERTY; - } - } - - if (willApply) willApply.call(obj, key); - - var observerPaths = getObserverPaths(value), - curObserverPaths = observerPaths && getObserverPaths(obj[key]), - beforeObserverPaths = getBeforeObserverPaths(value), - curBeforeObserverPaths = beforeObserverPaths && getBeforeObserverPaths(obj[key]), - len, idx; - - if (curObserverPaths) { - len = curObserverPaths.length; - for (idx = 0; idx < len; idx++) { - Ember.removeObserver(obj, curObserverPaths[idx], null, key); - } - } - - if (curBeforeObserverPaths) { - len = curBeforeObserverPaths.length; - for (idx = 0; idx < len; idx++) { - Ember.removeBeforeObserver(obj, curBeforeObserverPaths[idx], null, key); - } - } - - // TODO: less hacky way for ember-runtime to add bindings. - value = mixinBindings(obj, key, value, m); - - defineProperty(obj, key, desc, value); - - if (observerPaths) { - len = observerPaths.length; - for (idx = 0; idx < len; idx++) { - Ember.addObserver(obj, observerPaths[idx], null, key); - } - } - - if (beforeObserverPaths) { - len = beforeObserverPaths.length; - for (idx = 0; idx < len; idx++) { - Ember.addBeforeObserver(obj, beforeObserverPaths[idx], null, key); - } - } - - if (req && req[key]) { - req = writableReq(obj); - req.__ember_count__--; - req[key] = false; - } - - if (didApply) didApply.call(obj, key); - - } - } - - // Make sure no required attrs remain - if (!partial && req && req.__ember_count__ > 0) { - var keys = []; - for (key in req) { - if (META_SKIP[key]) continue; - keys.push(key); - } - throw new Error('Required properties not defined: ' + keys.join(',')); - } - return obj; - } - - Ember.mixin = function (obj) { - var args = a_slice.call(arguments, 1); - return applyMixin(obj, args, false); - }; - - - /** - @constructor - */ - Ember.Mixin = function () { - return initMixin(this, arguments); - }; - - /** @private */ - Mixin = Ember.Mixin; - - /** @private */ - Mixin._apply = applyMixin; - - Mixin.applyPartial = function (obj) { - var args = a_slice.call(arguments, 1); - return applyMixin(obj, args, true); - }; - - Mixin.create = function () { - classToString.processed = false; - var M = this; - return initMixin(new M(), arguments); - }; - - Mixin.prototype.reopen = function () { - - var mixin, tmp; - - if (this.properties) { - mixin = Mixin.create(); - mixin.properties = this.properties; - delete this.properties; - this.mixins = [mixin]; - } - - var len = arguments.length, mixins = this.mixins, idx; - - for (idx = 0; idx < len; idx++) { - mixin = arguments[idx]; - if (mixin instanceof Mixin) { - mixins.push(mixin); - } else { - tmp = Mixin.create(); - tmp.properties = mixin; - mixins.push(tmp); - } - } - - return this; - }; - - var TMP_ARRAY = []; - Mixin.prototype.apply = function (obj) { - TMP_ARRAY[0] = this; - var ret = applyMixin(obj, TMP_ARRAY, false); - TMP_ARRAY.length = 0; - return ret; - }; - - Mixin.prototype.applyPartial = function (obj) { - TMP_ARRAY[0] = this; - var ret = applyMixin(obj, TMP_ARRAY, true); - TMP_ARRAY.length = 0; - return ret; - }; - - /** @private */ - function _detect(curMixin, targetMixin, seen) { - var guid = Ember.guidFor(curMixin); - - if (seen[guid]) return false; - seen[guid] = true; - - if (curMixin === targetMixin) return true; - var mixins = curMixin.mixins, loc = mixins ? mixins.length : 0; - while (--loc >= 0) { - if (_detect(mixins[loc], targetMixin, seen)) return true; - } - return false; - } - - Mixin.prototype.detect = function (obj) { - if (!obj) return false; - if (obj instanceof Mixin) return _detect(obj, this, {}); - return !!meta(obj, false)[Ember.guidFor(this)]; - }; - - Mixin.prototype.without = function () { - var ret = new Mixin(this); - ret._without = a_slice.call(arguments); - return ret; - }; - - /** @private */ - function _keys(ret, mixin, seen) { - if (seen[Ember.guidFor(mixin)]) return; - seen[Ember.guidFor(mixin)] = true; - - if (mixin.properties) { - var props = mixin.properties; - for (var key in props) { - if (props.hasOwnProperty(key)) ret[key] = true; - } - } else if (mixin.mixins) { - a_forEach(mixin.mixins, function (x) { - _keys(ret, x, seen); - }); - } - } - - Mixin.prototype.keys = function () { - var keys = {}, seen = {}, ret = []; - _keys(keys, this, seen); - for (var key in keys) { - if (keys.hasOwnProperty(key)) ret.push(key); - } - return ret; - }; - - /** @private - make Mixin's have nice displayNames */ - - var NAME_KEY = Ember.GUID_KEY + '_name'; - var get = Ember.get; - - /** @private */ - function processNames(paths, root, seen) { - var idx = paths.length; - for (var key in root) { - if (!root.hasOwnProperty || !root.hasOwnProperty(key)) continue; - var obj = root[key]; - paths[idx] = key; - - if (obj && obj.toString === classToString) { - obj[NAME_KEY] = paths.join('.'); - } else if (obj && get(obj, 'isNamespace')) { - if (seen[Ember.guidFor(obj)]) continue; - seen[Ember.guidFor(obj)] = true; - processNames(paths, obj, seen); - } - - } - paths.length = idx; // cut out last item - } - - /** @private */ - function findNamespaces() { - var Namespace = Ember.Namespace, obj; - - if (Namespace.PROCESSED) { - return; - } - - for (var prop in window) { - // get(window.globalStorage, 'isNamespace') would try to read the storage for domain isNamespace and cause exception in Firefox. - // globalStorage is a storage obsoleted by the WhatWG storage specification. See https://developer.mozilla.org/en/DOM/Storage#globalStorage - if (prop === "globalStorage" && window.StorageList && window.globalStorage instanceof window.StorageList) { - continue; - } - // Unfortunately, some versions of IE don't support window.hasOwnProperty - if (window.hasOwnProperty && !window.hasOwnProperty(prop)) { - continue; - } - - try { - obj = window[prop]; - } catch (e) { - continue; - } - - if (obj && get(obj, 'isNamespace')) { - ember_deprecate("Namespaces should not begin with lowercase.", /^[A-Z]/.test(prop)); - obj[NAME_KEY] = prop; - } - } - } - - Ember.identifyNamespaces = findNamespaces; - - /** @private */ - superClassString = function (mixin) { - var superclass = mixin.superclass; - if (superclass) { - if (superclass[NAME_KEY]) { - return superclass[NAME_KEY]; - } - else { - return superClassString(superclass); - } - } else { - return; - } - }; - - /** @private */ - classToString = function () { - var Namespace = Ember.Namespace, namespace; - - // TODO: Namespace should really be in Metal - if (Namespace) { - if (!this[NAME_KEY] && !classToString.processed) { - if (!Namespace.PROCESSED) { - findNamespaces(); - Namespace.PROCESSED = true; - } - - classToString.processed = true; - - var namespaces = Namespace.NAMESPACES; - for (var i = 0, l = namespaces.length; i < l; i++) { - namespace = namespaces[i]; - processNames([namespace.toString()], namespace, {}); - } - } - } - - if (this[NAME_KEY]) { - return this[NAME_KEY]; - } else { - var str = superClassString(this); - if (str) { - return "(subclass of " + str + ")"; - } else { - return "(unknown mixin)"; - } - } - }; - - Mixin.prototype.toString = classToString; - -// returns the mixins currently applied to the specified object -// TODO: Make Ember.mixin - Mixin.mixins = function (obj) { - var ret = [], mixins = meta(obj, false), key, mixin; - for (key in mixins) { - if (META_SKIP[key]) continue; - mixin = mixins[key]; - - // skip primitive mixins since these are always anonymous - if (!mixin.properties) ret.push(mixins[key]); - } - return ret; - }; - - REQUIRED = new Ember.Descriptor(); - REQUIRED.toString = function () { - return '(Required Property)'; - }; - - Ember.required = function () { - return REQUIRED; - }; - - /** @private */ - Alias = function (methodName) { - this.methodName = methodName; - }; - Alias.prototype = new Ember.Descriptor(); - - Ember.alias = function (methodName) { - return new Alias(methodName); - }; - - Ember.MixinDelegate = Mixin.create({ - - willApplyProperty: Ember.required(), - didApplyProperty: Ember.required() - - }); - - /** @private */ - MixinDelegate = Ember.MixinDelegate; - - -// .......................................................... -// OBSERVER HELPER -// - - Ember.observer = function (func) { - var paths = a_slice.call(arguments, 1); - func.__ember_observes__ = paths; - return func; - }; - - Ember.beforeObserver = function (func) { - var paths = a_slice.call(arguments, 1); - func.__ember_observesBefore__ = paths; - return func; - }; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2010 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ -// Ember.Logger -// Ember.watch.flushPending -// Ember.beginPropertyChanges, Ember.endPropertyChanges -// Ember.guidFor -// Ember.ArrayUtils - -// .......................................................... -// HELPERS -// - - var slice = Array.prototype.slice; - var forEach = Ember.ArrayUtils.forEach; - -// invokes passed params - normalizing so you can pass target/func, -// target/string or just func - /** @private */ - function invoke(target, method, args, ignore) { - - if (method === undefined) { - method = target; - target = undefined; - } - - if ('string' === typeof method) method = target[method]; - if (args && ignore > 0) { - args = args.length > ignore ? slice.call(args, ignore) : null; - } - - // Unfortunately in some browsers we lose the backtrace if we rethrow the existing error, - // so in the event that we don't have an `onerror` handler we don't wrap in a try/catch - if ('function' === typeof Ember.onerror) { - try { - // IE8's Function.prototype.apply doesn't accept undefined/null arguments. - return method.apply(target || this, args || []); - } catch (error) { - Ember.onerror(error); - } - } else { - // IE8's Function.prototype.apply doesn't accept undefined/null arguments. - return method.apply(target || this, args || []); - } - } - - -// .......................................................... -// RUNLOOP -// - - var timerMark; // used by timers... - - /** @private */ - var K = function () { - }; - - /** @private */ - var RunLoop = function (prev) { - var self; - - if (this instanceof RunLoop) { - self = this; - } else { - self = new K(); - } - - self._prev = prev || null; - self.onceTimers = {}; - - return self; - }; - - K.prototype = RunLoop.prototype; - - RunLoop.prototype = { - end: function () { - this.flush(); - }, - - prev: function () { - return this._prev; - }, - - // .......................................................... - // Delayed Actions - // - - schedule: function (queueName, target, method) { - var queues = this._queues, queue; - if (!queues) queues = this._queues = {}; - queue = queues[queueName]; - if (!queue) queue = queues[queueName] = []; - - var args = arguments.length > 3 ? slice.call(arguments, 3) : null; - queue.push({ target: target, method: method, args: args }); - return this; - }, - - flush: function (queueName) { - var queues = this._queues, queueNames, idx, len, queue, log; - - if (!queues) return this; // nothing to do - - function iter(item) { - invoke(item.target, item.method, item.args); - } - - Ember.watch.flushPending(); // make sure all chained watchers are setup - - if (queueName) { - while (this._queues && (queue = this._queues[queueName])) { - this._queues[queueName] = null; - - // the sync phase is to allow property changes to propagate. don't - // invoke observers until that is finished. - if (queueName === 'sync') { - log = Ember.LOG_BINDINGS; - if (log) Ember.Logger.log('Begin: Flush Sync Queue'); - - Ember.beginPropertyChanges(); - try { - forEach(queue, iter); - } finally { - Ember.endPropertyChanges(); - } - - if (log) Ember.Logger.log('End: Flush Sync Queue'); - - } else { - forEach(queue, iter); - } - } - - } else { - queueNames = Ember.run.queues; - len = queueNames.length; - do { - this._queues = null; - for (idx = 0; idx < len; idx++) { - queueName = queueNames[idx]; - queue = queues[queueName]; - - if (queue) { - // the sync phase is to allow property changes to propagate. don't - // invoke observers until that is finished. - if (queueName === 'sync') { - log = Ember.LOG_BINDINGS; - if (log) Ember.Logger.log('Begin: Flush Sync Queue'); - - Ember.beginPropertyChanges(); - try { - forEach(queue, iter); - } finally { - Ember.endPropertyChanges(); - } - - if (log) Ember.Logger.log('End: Flush Sync Queue'); - } else { - forEach(queue, iter); - } - } - } - } while (queues = this._queues); // go until queues stay clean - } - - timerMark = null; - - return this; - } - - }; - - Ember.RunLoop = RunLoop; - -// .......................................................... -// Ember.run - this is ideally the only public API the dev sees -// - /** - * @namespace Ember.run is both a function and a namespace for - * RunLoop-related functions. - * @name Ember.run - */ - - /** - Runs the passed target and method inside of a RunLoop, ensuring any - deferred actions including bindings and views updates are flushed at the - end. - - Normally you should not need to invoke this method yourself. However if - you are implementing raw event handlers when interfacing with other - libraries or plugins, you should probably wrap all of your code inside this - call. - - Ember.run(function(){ - // code to be execute within a RunLoop - }); - - @name run^2 - @methodOf Ember.run - @param {Object} target - (Optional) target of method to call - - @param {Function|String} method - Method to invoke. May be a function or a string. If you pass a string - then it will be looked up on the passed target. - - @param {Object...} args - Any additional arguments you wish to pass to the method. - - @returns {Object} return value from invoking the passed function. - */ - Ember.run = function (target, method) { - - var ret, loop; - run.begin(); - try { - if (target || method) ret = invoke(target, method, arguments, 2); - } finally { - run.end(); - } - return ret; - }; - - /** @private */ - var run = Ember.run; - - - /** - Begins a new RunLoop. Any deferred actions invoked after the begin will - be buffered until you invoke a matching call to Ember.run.end(). This is - an lower-level way to use a RunLoop instead of using Ember.run(). - - Ember.run.begin(); - // code to be execute within a RunLoop - Ember.run.end(); - - - @returns {void} - */ - Ember.run.begin = function () { - run.currentRunLoop = new RunLoop(run.currentRunLoop); - }; - - /** - Ends a RunLoop. This must be called sometime after you call Ember.run.begin() - to flush any deferred actions. This is a lower-level way to use a RunLoop - instead of using Ember.run(). - - Ember.run.begin(); - // code to be execute within a RunLoop - Ember.run.end(); - - @returns {void} - */ - Ember.run.end = function () { - ember_assert('must have a current run loop', run.currentRunLoop); - try { - run.currentRunLoop.end(); - } - finally { - run.currentRunLoop = run.currentRunLoop.prev(); - } - }; - - /** - Array of named queues. This array determines the order in which queues - are flushed at the end of the RunLoop. You can define your own queues by - simply adding the queue name to this array. Normally you should not need - to inspect or modify this property. - - @property {String} - @default ['sync', 'actions', 'destroy', 'timers'] - */ - Ember.run.queues = ['sync', 'actions', 'destroy', 'timers']; - - /** - Adds the passed target/method and any optional arguments to the named - queue to be executed at the end of the RunLoop. If you have not already - started a RunLoop when calling this method one will be started for you - automatically. - - At the end of a RunLoop, any methods scheduled in this way will be invoked. - Methods will be invoked in an order matching the named queues defined in - the run.queues property. - - Ember.run.schedule('timers', this, function(){ - // this will be executed at the end of the RunLoop, when timers are run - console.log("scheduled on timers queue"); - }); - Ember.run.schedule('sync', this, function(){ - // this will be executed at the end of the RunLoop, when bindings are synced - console.log("scheduled on sync queue"); - }); - // Note the functions will be run in order based on the run queues order. Output would be: - // scheduled on sync queue - // scheduled on timers queue - - @param {String} queue - The name of the queue to schedule against. Default queues are 'sync' and - 'actions' - - @param {Object} target - (Optional) target object to use as the context when invoking a method. - - @param {String|Function} method - The method to invoke. If you pass a string it will be resolved on the - target object at the time the scheduled item is invoked allowing you to - change the target function. - - @param {Object} arguments... - Optional arguments to be passed to the queued method. - - @returns {void} - */ - Ember.run.schedule = function (queue, target, method) { - var loop = run.autorun(); - loop.schedule.apply(loop, arguments); - }; - - var autorunTimer; - - /** @private */ - function autorun() { - autorunTimer = null; - if (run.currentRunLoop) run.end(); - } - - /** - Begins a new RunLoop if necessary and schedules a timer to flush the - RunLoop at a later time. This method is used by parts of Ember to - ensure the RunLoop always finishes. You normally do not need to call this - method directly. Instead use Ember.run(). - - Ember.run.autorun(); - - @returns {Ember.RunLoop} the new current RunLoop - */ - Ember.run.autorun = function () { - - if (!run.currentRunLoop) { - run.begin(); - - // TODO: throw during tests - if (Ember.testing) { - run.end(); - } else if (!autorunTimer) { - autorunTimer = setTimeout(autorun, 1); - } - } - - return run.currentRunLoop; - }; - - /** - Immediately flushes any events scheduled in the 'sync' queue. Bindings - use this queue so this method is a useful way to immediately force all - bindings in the application to sync. - - You should call this method anytime you need any changed state to propagate - throughout the app immediately without repainting the UI. - - Ember.run.sync(); - - @returns {void} - */ - Ember.run.sync = function () { - run.autorun(); - run.currentRunLoop.flush('sync'); - }; - -// .......................................................... -// TIMERS -// - - var timers = {}; // active timers... - - var laterScheduled = false; - - /** @private */ - function invokeLaterTimers() { - var now = (+new Date()), earliest = -1; - for (var key in timers) { - if (!timers.hasOwnProperty(key)) continue; - var timer = timers[key]; - if (timer && timer.expires) { - if (now >= timer.expires) { - delete timers[key]; - invoke(timer.target, timer.method, timer.args, 2); - } else { - if (earliest < 0 || (timer.expires < earliest)) earliest = timer.expires; - } - } - } - - // schedule next timeout to fire... - if (earliest > 0) setTimeout(invokeLaterTimers, earliest - (+new Date())); - } - - /** - Invokes the passed target/method and optional arguments after a specified - period if time. The last parameter of this method must always be a number - of milliseconds. - - You should use this method whenever you need to run some action after a - period of time instead of using setTimeout(). This method will ensure that - items that expire during the same script execution cycle all execute - together, which is often more efficient than using a real setTimeout. - - Ember.run.later(myContext, function(){ - // code here will execute within a RunLoop in about 500ms with this == myContext - }, 500); - - @param {Object} target - (optional) target of method to invoke - - @param {Function|String} method - The method to invoke. If you pass a string it will be resolved on the - target at the time the method is invoked. - - @param {Object...} args - Optional arguments to pass to the timeout. - - @param {Number} wait - Number of milliseconds to wait. - - @returns {Timer} an object you can use to cancel a timer at a later time. - */ - Ember.run.later = function (target, method) { - var args, expires, timer, guid, wait; - - // setTimeout compatibility... - if (arguments.length === 2 && 'function' === typeof target) { - wait = method; - method = target; - target = undefined; - args = [target, method]; - - } else { - args = slice.call(arguments); - wait = args.pop(); - } - - expires = (+new Date()) + wait; - timer = { target: target, method: method, expires: expires, args: args }; - guid = Ember.guidFor(timer); - timers[guid] = timer; - run.once(timers, invokeLaterTimers); - return guid; - }; - - /** @private */ - function invokeOnceTimer(guid, onceTimers) { - if (onceTimers[this.tguid]) delete onceTimers[this.tguid][this.mguid]; - if (timers[guid]) invoke(this.target, this.method, this.args, 2); - delete timers[guid]; - } - - /** - Schedules an item to run one time during the current RunLoop. Calling - this method with the same target/method combination will have no effect. - - Note that although you can pass optional arguments these will not be - considered when looking for duplicates. New arguments will replace previous - calls. - - Ember.run(function(){ - var doFoo = function() { foo(); } - Ember.run.once(myContext, doFoo); - Ember.run.once(myContext, doFoo); - // doFoo will only be executed once at the end of the RunLoop - }); - - @param {Object} target - (optional) target of method to invoke - - @param {Function|String} method - The method to invoke. If you pass a string it will be resolved on the - target at the time the method is invoked. - - @param {Object...} args - Optional arguments to pass to the timeout. - - - @returns {Object} timer - */ - Ember.run.once = function (target, method) { - var tguid = Ember.guidFor(target), mguid = Ember.guidFor(method), guid, timer; - - var onceTimers = run.autorun().onceTimers; - guid = onceTimers[tguid] && onceTimers[tguid][mguid]; - if (guid && timers[guid]) { - timers[guid].args = slice.call(arguments); // replace args - - } else { - timer = { - target: target, - method: method, - args: slice.call(arguments), - tguid: tguid, - mguid: mguid - }; - - guid = Ember.guidFor(timer); - timers[guid] = timer; - if (!onceTimers[tguid]) onceTimers[tguid] = {}; - onceTimers[tguid][mguid] = guid; // so it isn't scheduled more than once - - run.schedule('actions', timer, invokeOnceTimer, guid, onceTimers); - } - - return guid; - }; - - var scheduledNext = false; - - /** @private */ - function invokeNextTimers() { - scheduledNext = null; - for (var key in timers) { - if (!timers.hasOwnProperty(key)) continue; - var timer = timers[key]; - if (timer.next) { - delete timers[key]; - invoke(timer.target, timer.method, timer.args, 2); - } - } - } - - /** - Schedules an item to run after control has been returned to the system. - This is often equivalent to calling setTimeout(function...,1). - - Ember.run.next(myContext, function(){ - // code to be executed in the next RunLoop, which will be scheduled after the current one - }); - - @param {Object} target - (optional) target of method to invoke - - @param {Function|String} method - The method to invoke. If you pass a string it will be resolved on the - target at the time the method is invoked. - - @param {Object...} args - Optional arguments to pass to the timeout. - - @returns {Object} timer - */ - Ember.run.next = function (target, method) { - var timer, guid; - - timer = { - target: target, - method: method, - args: slice.call(arguments), - next: true - }; - - guid = Ember.guidFor(timer); - timers[guid] = timer; - - if (!scheduledNext) scheduledNext = setTimeout(invokeNextTimers, 1); - return guid; - }; - - /** - Cancels a scheduled item. Must be a value returned by `Ember.run.later()`, - `Ember.run.once()`, or `Ember.run.next()`. - - var runNext = Ember.run.next(myContext, function(){ - // will not be executed - }); - Ember.run.cancel(runNext); - - var runLater = Ember.run.next(myContext, function(){ - // will not be executed - }, 500); - Ember.run.cancel(runLater); - - var runOnce = Ember.run.once(myContext, function(){ - // will not be executed - }); - Ember.run.cancel(runOnce); - - @param {Object} timer - Timer object to cancel - - @returns {void} - */ - Ember.run.cancel = function (timer) { - delete timers[timer]; - }; - -// .......................................................... -// DEPRECATED API -// - - /** - @namespace Compatibility for Ember.run - @name Ember.RunLoop - @deprecated - */ - - /** - @deprecated - @method - - Use `#js:Ember.run.begin()` instead - */ - Ember.RunLoop.begin = ember_deprecateFunc("Use Ember.run.begin instead of Ember.RunLoop.begin.", Ember.run.begin); - - /** - @deprecated - @method - - Use `#js:Ember.run.end()` instead - */ - Ember.RunLoop.end = ember_deprecateFunc("Use Ember.run.end instead of Ember.RunLoop.end.", Ember.run.end); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ -// Ember.Logger -// get, getPath, setPath, trySetPath -// guidFor, isArray, meta -// addObserver, removeObserver -// Ember.run.schedule - -// .......................................................... -// CONSTANTS -// - - - /** - @static - - Debug parameter you can turn on. This will log all bindings that fire to - the console. This should be disabled in production code. Note that you - can also enable this from the console or temporarily. - - @type Boolean - @default false - */ - Ember.LOG_BINDINGS = false || !!Ember.ENV.LOG_BINDINGS; - - /** - @static - - Performance paramter. This will benchmark the time spent firing each - binding. - - @type Boolean - */ - Ember.BENCHMARK_BINDING_NOTIFICATIONS = !!Ember.ENV.BENCHMARK_BINDING_NOTIFICATIONS; - - /** - @static - - Performance parameter. This will benchmark the time spend configuring each - binding. - - @type Boolean - */ - Ember.BENCHMARK_BINDING_SETUP = !!Ember.ENV.BENCHMARK_BINDING_SETUP; - - - /** - @static - - Default placeholder for multiple values in bindings. - - @type String - @default '@@MULT@@' - */ - Ember.MULTIPLE_PLACEHOLDER = '@@MULT@@'; - - /** - @static - - Default placeholder for empty values in bindings. Used by notEmpty() - helper unless you specify an alternative. - - @type String - @default '@@EMPTY@@' - */ - Ember.EMPTY_PLACEHOLDER = '@@EMPTY@@'; - -// .......................................................... -// TYPE COERCION HELPERS -// - -// Coerces a non-array value into an array. - /** @private */ - function MULTIPLE(val) { - if (val instanceof Array) return val; - if (val === undefined || val === null) return []; - return [val]; - } - -// Treats a single-element array as the element. Otherwise -// returns a placeholder. - /** @private */ - function SINGLE(val, placeholder) { - if (val instanceof Array) { - if (val.length > 1) return placeholder; - else return val[0]; - } - return val; - } - -// Coerces the binding value into a Boolean. - - var BOOL = { - to: function (val) { - return !!val; - } - }; - -// Returns the Boolean inverse of the value. - var NOT = { - to: function NOT(val) { - return !val; - } - }; - - var get = Ember.get, - getPath = Ember.getPath, - setPath = Ember.setPath, - guidFor = Ember.guidFor, - isGlobalPath = Ember.isGlobalPath; - -// Applies a binding's transformations against a value. - /** @private */ - function getTransformedValue(binding, val, obj, dir) { - - // First run a type transform, if it exists, that changes the fundamental - // type of the value. For example, some transforms convert an array to a - // single object. - - var typeTransform = binding._typeTransform; - if (typeTransform) { - val = typeTransform(val, binding._placeholder); - } - - // handle transforms - var transforms = binding._transforms, - len = transforms ? transforms.length : 0, - idx; - - for (idx = 0; idx < len; idx++) { - var transform = transforms[idx][dir]; - if (transform) { - val = transform.call(this, val, obj); - } - } - return val; - } - - /** @private */ - function empty(val) { - return val === undefined || val === null || val === '' || (Ember.isArray(val) && get(val, 'length') === 0); - } - - /** @private */ - function getPathWithGlobals(obj, path) { - return getPath(isGlobalPath(path) ? window : obj, path); - } - - /** @private */ - function getTransformedFromValue(obj, binding) { - var operation = binding._operation, - fromValue; - if (operation) { - fromValue = operation(obj, binding._from, binding._operand); - } else { - fromValue = getPathWithGlobals(obj, binding._from); - } - return getTransformedValue(binding, fromValue, obj, 'to'); - } - - /** @private */ - function getTransformedToValue(obj, binding) { - var toValue = getPath(obj, binding._to); - return getTransformedValue(binding, toValue, obj, 'from'); - } - - /** @private */ - var AND_OPERATION = function (obj, left, right) { - return getPathWithGlobals(obj, left) && getPathWithGlobals(obj, right); - }; - - /** @private */ - var OR_OPERATION = function (obj, left, right) { - return getPathWithGlobals(obj, left) || getPathWithGlobals(obj, right); - }; - -// .......................................................... -// BINDING -// - /** @private */ - var K = function () { - }; - - /** @private */ - var Binding = function (toPath, fromPath) { - var self; - - if (this instanceof Binding) { - self = this; - } else { - self = new K(); - } - - /** @private */ - self._direction = 'fwd'; - - /** @private */ - self._from = fromPath; - self._to = toPath; - - return self; - }; - - K.prototype = Binding.prototype; - - Binding.prototype = /** @scope Ember.Binding.prototype */ { - // .......................................................... - // CONFIG - // - - /** - This will set "from" property path to the specified value. It will not - attempt to resolve this property path to an actual object until you - connect the binding. - - The binding will search for the property path starting at the root object - you pass when you connect() the binding. It follows the same rules as - `getPath()` - see that method for more information. - - @param {String} propertyPath the property path to connect to - @returns {Ember.Binding} receiver - */ - from: function (path) { - this._from = path; - return this; - }, - - /** - This will set the "to" property path to the specified value. It will not - attempt to resolve this property path to an actual object until you - connect the binding. - - The binding will search for the property path starting at the root object - you pass when you connect() the binding. It follows the same rules as - `getPath()` - see that method for more information. - - @param {String|Tuple} propertyPath A property path or tuple - @param {Object} [root] Root object to use when resolving the path. - @returns {Ember.Binding} this - */ - to: function (path) { - this._to = path; - return this; - }, - - /** - Configures the binding as one way. A one-way binding will relay changes - on the "from" side to the "to" side, but not the other way around. This - means that if you change the "to" side directly, the "from" side may have - a different value. - - @param {Boolean} flag - (Optional) passing nothing here will make the binding oneWay. You can - instead pass false to disable oneWay, making the binding two way again. - - @returns {Ember.Binding} receiver - */ - oneWay: function (flag) { - this._oneWay = flag === undefined ? true : !!flag; - return this; - }, - - /** - Adds the specified transform to the array of transform functions. - - A transform is a hash with `to` and `from` properties. Each property - should be a function that performs a transformation in either the - forward or back direction. - - The functions you pass must have the following signature: - - function(value) {}; - - They must also return the transformed value. - - Transforms are invoked in the order they were added. If you are - extending a binding and want to reset the transforms, you can call - `resetTransform()` first. - - @param {Function} transformFunc the transform function. - @returns {Ember.Binding} this - */ - transform: function (transform) { - if ('function' === typeof transform) { - transform = { to: transform }; - } - - if (!this._transforms) this._transforms = []; - this._transforms.push(transform); - return this; - }, - - /** - Resets the transforms for the binding. After calling this method the - binding will no longer transform values. You can then add new transforms - as needed. - - @returns {Ember.Binding} this - */ - resetTransforms: function () { - this._transforms = null; - return this; - }, - - /** - Adds a transform to the chain that will allow only single values to pass. - This will allow single values and nulls to pass through. If you pass an - array, it will be mapped as so: - - - [] => null - - [a] => a - - [a,b,c] => Multiple Placeholder - - You can pass in an optional multiple placeholder or it will use the - default. - - Note that this transform will only happen on forwarded valued. Reverse - values are send unchanged. - - @param {String} fromPath from path or null - @param {Object} [placeholder] Placeholder value. - @returns {Ember.Binding} this - */ - single: function (placeholder) { - if (placeholder === undefined) placeholder = Ember.MULTIPLE_PLACEHOLDER; - this._typeTransform = SINGLE; - this._placeholder = placeholder; - return this; - }, - - /** - Adds a transform that will convert the passed value to an array. If - the value is null or undefined, it will be converted to an empty array. - - @param {String} [fromPath] - @returns {Ember.Binding} this - */ - multiple: function () { - this._typeTransform = MULTIPLE; - this._placeholder = null; - return this; - }, - - /** - Adds a transform to convert the value to a bool value. If the value is - an array it will return true if array is not empty. If the value is a - string it will return true if the string is not empty. - - @returns {Ember.Binding} this - */ - bool: function () { - this.transform(BOOL); - return this; - }, - - /** - Adds a transform that will return the placeholder value if the value is - null, undefined, an empty array or an empty string. See also notNull(). - - @param {Object} [placeholder] Placeholder value. - @returns {Ember.Binding} this - */ - notEmpty: function (placeholder) { - if (placeholder === null || placeholder === undefined) { - placeholder = Ember.EMPTY_PLACEHOLDER; - } - - this.transform({ - to: function (val) { - return empty(val) ? placeholder : val; - } - }); - - return this; - }, - - /** - Adds a transform that will return the placeholder value if the value is - null or undefined. Otherwise it will passthrough untouched. See also notEmpty(). - - @param {String} fromPath from path or null - @param {Object} [placeholder] Placeholder value. - @returns {Ember.Binding} this - */ - notNull: function (placeholder) { - if (placeholder === null || placeholder === undefined) { - placeholder = Ember.EMPTY_PLACEHOLDER; - } - - this.transform({ - to: function (val) { - return (val === null || val === undefined) ? placeholder : val; - } - }); - - return this; - }, - - /** - Adds a transform to convert the value to the inverse of a bool value. This - uses the same transform as bool() but inverts it. - - @returns {Ember.Binding} this - */ - not: function () { - this.transform(NOT); - return this; - }, - - /** - Adds a transform that will return true if the value is null or undefined, false otherwise. - - @returns {Ember.Binding} this - */ - isNull: function () { - this.transform(function (val) { - return val === null || val === undefined; - }); - return this; - }, - - /** @private */ - toString: function () { - var oneWay = this._oneWay ? '[oneWay]' : ''; - return "Ember.Binding<" + guidFor(this) + ">(" + this._from + " -> " + this._to + ")" + oneWay; - }, - - // .......................................................... - // CONNECT AND SYNC - // - - /** - Attempts to connect this binding instance so that it can receive and relay - changes. This method will raise an exception if you have not set the - from/to properties yet. - - @param {Object} obj - The root object for this binding. - - @param {Boolean} preferFromParam - private: Normally, `connect` cannot take an object if `from` already set - an object. Internally, we would like to be able to provide a default object - to be used if no object was provided via `from`, so this parameter turns - off the assertion. - - @returns {Ember.Binding} this - */ - connect: function (obj) { - ember_assert('Must pass a valid object to Ember.Binding.connect()', !!obj); - - var oneWay = this._oneWay, operand = this._operand; - - // add an observer on the object to be notified when the binding should be updated - Ember.addObserver(obj, this._from, this, this.fromDidChange); - - // if there is an operand, add an observer onto it as well - if (operand) { - Ember.addObserver(obj, operand, this, this.fromDidChange); - } - - // if the binding is a two-way binding, also set up an observer on the target - // object. - if (!oneWay) { - Ember.addObserver(obj, this._to, this, this.toDidChange); - } - - if (Ember.meta(obj, false).proto !== obj) { - this._scheduleSync(obj, 'fwd'); - } - - this._readyToSync = true; - return this; - }, - - /** - Disconnects the binding instance. Changes will no longer be relayed. You - will not usually need to call this method. - - @param {Object} obj - The root object you passed when connecting the binding. - - @returns {Ember.Binding} this - */ - disconnect: function (obj) { - ember_assert('Must pass a valid object to Ember.Binding.disconnect()', !!obj); - - var oneWay = this._oneWay, operand = this._operand; - - // remove an observer on the object so we're no longer notified of - // changes that should update bindings. - Ember.removeObserver(obj, this._from, this, this.fromDidChange); - - // if there is an operand, remove the observer from it as well - if (operand) Ember.removeObserver(obj, operand, this, this.fromDidChange); - - // if the binding is two-way, remove the observer from the target as well - if (!oneWay) Ember.removeObserver(obj, this._to, this, this.toDidChange); - - this._readyToSync = false; // disable scheduled syncs... - return this; - }, - - // .......................................................... - // PRIVATE - // - - /** @private - called when the from side changes */ - fromDidChange: function (target) { - this._scheduleSync(target, 'fwd'); - }, - - /** @private - called when the to side changes */ - toDidChange: function (target) { - this._scheduleSync(target, 'back'); - }, - - /** @private */ - _scheduleSync: function (obj, dir) { - var guid = guidFor(obj), existingDir = this[guid]; - - // if we haven't scheduled the binding yet, schedule it - if (!existingDir) { - Ember.run.schedule('sync', this, this._sync, obj); - this[guid] = dir; - } - - // If both a 'back' and 'fwd' sync have been scheduled on the same object, - // default to a 'fwd' sync so that it remains deterministic. - if (existingDir === 'back' && dir === 'fwd') { - this[guid] = 'fwd'; - } - }, - - /** @private */ - _sync: function (obj) { - var log = Ember.LOG_BINDINGS; - - // don't synchronize destroyed objects or disconnected bindings - if (obj.isDestroyed || !this._readyToSync) { - return; - } - - // get the direction of the binding for the object we are - // synchronizing from - var guid = guidFor(obj), direction = this[guid]; - - var fromPath = this._from, toPath = this._to; - - delete this[guid]; - - // if we're synchronizing from the remote object... - if (direction === 'fwd') { - var fromValue = getTransformedFromValue(obj, this); - if (log) { - Ember.Logger.log(' ', this.toString(), '->', fromValue, obj); - } - if (this._oneWay) { - Ember.trySetPath(Ember.isGlobalPath(toPath) ? window : obj, toPath, fromValue); - } else { - Ember._suspendObserver(obj, toPath, this, this.toDidChange, function () { - Ember.trySetPath(Ember.isGlobalPath(toPath) ? window : obj, toPath, fromValue); - }); - } - // if we're synchronizing *to* the remote object - } else if (direction === 'back') {// && !this._oneWay) { - var toValue = getTransformedToValue(obj, this); - if (log) { - Ember.Logger.log(' ', this.toString(), '<-', toValue, obj); - } - Ember._suspendObserver(obj, fromPath, this, this.fromDidChange, function () { - Ember.trySetPath(Ember.isGlobalPath(fromPath) ? window : obj, fromPath, toValue); - }); - } - } - - }; - - /** @private */ - function mixinProperties(to, from) { - for (var key in from) { - if (from.hasOwnProperty(key)) { - to[key] = from[key]; - } - } - } - - mixinProperties(Binding, - /** @scope Ember.Binding */ { - - /** - @see Ember.Binding.prototype.from - */ - from: function () { - var C = this, binding = new C(); - return binding.from.apply(binding, arguments); - }, - - /** - @see Ember.Binding.prototype.to - */ - to: function () { - var C = this, binding = new C(); - return binding.to.apply(binding, arguments); - }, - - /** - @see Ember.Binding.prototype.oneWay - */ - oneWay: function (from, flag) { - var C = this, binding = new C(null, from); - return binding.oneWay(flag); - }, - - /** - @see Ember.Binding.prototype.single - */ - single: function (from, placeholder) { - var C = this, binding = new C(null, from); - return binding.single(placeholder); - }, - - /** - @see Ember.Binding.prototype.multiple - */ - multiple: function (from) { - var C = this, binding = new C(null, from); - return binding.multiple(); - }, - - /** - @see Ember.Binding.prototype.transform - */ - transform: function (from, func) { - if (!func) { - func = from; - from = null; - } - var C = this, binding = new C(null, from); - return binding.transform(func); - }, - - /** - @see Ember.Binding.prototype.notEmpty - */ - notEmpty: function (from, placeholder) { - var C = this, binding = new C(null, from); - return binding.notEmpty(placeholder); - }, - - /** - @see Ember.Binding.prototype.notNull - */ - notNull: function (from, placeholder) { - var C = this, binding = new C(null, from); - return binding.notNull(placeholder); - }, - - - /** - @see Ember.Binding.prototype.bool - */ - bool: function (from) { - var C = this, binding = new C(null, from); - return binding.bool(); - }, - - /** - @see Ember.Binding.prototype.not - */ - not: function (from) { - var C = this, binding = new C(null, from); - return binding.not(); - }, - - /** - @see Ember.Binding.prototype.isNull - */ - isNull: function (from) { - var C = this, binding = new C(null, from); - return binding.isNull(); - }, - - /** - Adds a transform that forwards the logical 'AND' of values at 'pathA' and - 'pathB' whenever either source changes. Note that the transform acts - strictly as a one-way binding, working only in the direction - - 'pathA' AND 'pathB' --> value (value returned is the result of ('pathA' && 'pathB')) - - Usage example where a delete button's `isEnabled` value is determined by - whether something is selected in a list and whether the current user is - allowed to delete: - - deleteButton: Ember.ButtonView.design({ - isEnabledBinding: Ember.Binding.and('MyApp.itemsController.hasSelection', 'MyApp.userController.canDelete') - }) - - @param {String} pathA The first part of the conditional - @param {String} pathB The second part of the conditional - */ - and: function (pathA, pathB) { - var C = this, binding = new C(null, pathA).oneWay(); - binding._operand = pathB; - binding._operation = AND_OPERATION; - return binding; - }, - - /** - Adds a transform that forwards the 'OR' of values at 'pathA' and - 'pathB' whenever either source changes. Note that the transform acts - strictly as a one-way binding, working only in the direction - - 'pathA' AND 'pathB' --> value (value returned is the result of ('pathA' || 'pathB')) - - @param {String} pathA The first part of the conditional - @param {String} pathB The second part of the conditional - */ - or: function (pathA, pathB) { - var C = this, binding = new C(null, pathA).oneWay(); - binding._operand = pathB; - binding._operation = OR_OPERATION; - return binding; - } - - }); - - /** - @class - - A binding simply connects the properties of two objects so that whenever the - value of one property changes, the other property will be changed also. You - do not usually work with Binding objects directly but instead describe - bindings in your class definition using something like: - - valueBinding: "MyApp.someController.title" - - This will create a binding from `MyApp.someController.title` to the `value` - property of your object instance automatically. Now the two values will be - kept in sync. - - ## Customizing Your Bindings - - In addition to synchronizing values, bindings can also perform some basic - transforms on values. These transforms can help to make sure the data fed - into one object always meets the expectations of that object regardless of - what the other object outputs. - - To customize a binding, you can use one of the many helper methods defined - on Ember.Binding like so: - - valueBinding: Ember.Binding.single("MyApp.someController.title") - - This will create a binding just like the example above, except that now the - binding will convert the value of `MyApp.someController.title` to a single - object (removing any arrays) before applying it to the `value` property of - your object. - - You can also chain helper methods to build custom bindings like so: - - valueBinding: Ember.Binding.single("MyApp.someController.title").notEmpty("(EMPTY)") - - This will force the value of MyApp.someController.title to be a single value - and then check to see if the value is "empty" (null, undefined, empty array, - or an empty string). If it is empty, the value will be set to the string - "(EMPTY)". - - ## One Way Bindings - - One especially useful binding customization you can use is the `oneWay()` - helper. This helper tells Ember that you are only interested in - receiving changes on the object you are binding from. For example, if you - are binding to a preference and you want to be notified if the preference - has changed, but your object will not be changing the preference itself, you - could do: - - bigTitlesBinding: Ember.Binding.oneWay("MyApp.preferencesController.bigTitles") - - This way if the value of MyApp.preferencesController.bigTitles changes the - "bigTitles" property of your object will change also. However, if you - change the value of your "bigTitles" property, it will not update the - preferencesController. - - One way bindings are almost twice as fast to setup and twice as fast to - execute because the binding only has to worry about changes to one side. - - You should consider using one way bindings anytime you have an object that - may be created frequently and you do not intend to change a property; only - to monitor it for changes. (such as in the example above). - - ## Adding Custom Transforms - - In addition to using the standard helpers provided by Ember, you can - also defined your own custom transform functions which will be used to - convert the value. To do this, just define your transform function and add - it to the binding with the transform() helper. The following example will - not allow Integers less than ten. Note that it checks the value of the - bindings and allows all other values to pass: - - valueBinding: Ember.Binding.transform(function(value, binding) { - return ((Ember.typeOf(value) === 'number') && (value < 10)) ? 10 : value; - }).from("MyApp.someController.value") - - If you would like to instead use this transform on a number of bindings, - you can also optionally add your own helper method to Ember.Binding. This - method should simply return the value of `this.transform()`. The example - below adds a new helper called `notLessThan()` which will limit the value to - be not less than the passed minimum: - - Ember.Binding.reopen({ - notLessThan: function(minValue) { - return this.transform(function(value, binding) { - return ((Ember.typeOf(value) === 'number') && (value < minValue)) ? minValue : value; - }); - } - }); - - You could specify this in your core.js file, for example. Then anywhere in - your application you can use it to define bindings like so: - - valueBinding: Ember.Binding.from("MyApp.someController.value").notLessThan(10) - - Also, remember that helpers are chained so you can use your helper along - with any other helpers. The example below will create a one way binding that - does not allow empty values or values less than 10: - - valueBinding: Ember.Binding.oneWay("MyApp.someController.value").notEmpty().notLessThan(10) - - Finally, it's also possible to specify bi-directional transforms. To do this, - you can pass a hash to `transform` with `to` and `from`. In the following - example, we are expecting a lowercase string that we want to transform to - uppercase. - - valueBinding: Ember.Binding.transform({ - to: function(value, binding) { return value.toUpperCase(); }, - from: function(value, binding) { return value.toLowerCase(); } - - ## How to Manually Adding Binding - - All of the examples above show you how to configure a custom binding, but - the result of these customizations will be a binding template, not a fully - active binding. The binding will actually become active only when you - instantiate the object the binding belongs to. It is useful however, to - understand what actually happens when the binding is activated. - - For a binding to function it must have at least a "from" property and a "to" - property. The from property path points to the object/key that you want to - bind from while the to path points to the object/key you want to bind to. - - When you define a custom binding, you are usually describing the property - you want to bind from (such as "MyApp.someController.value" in the examples - above). When your object is created, it will automatically assign the value - you want to bind "to" based on the name of your binding key. In the - examples above, during init, Ember objects will effectively call - something like this on your binding: - - binding = Ember.Binding.from(this.valueBinding).to("value"); - - This creates a new binding instance based on the template you provide, and - sets the to path to the "value" property of the new object. Now that the - binding is fully configured with a "from" and a "to", it simply needs to be - connected to become active. This is done through the connect() method: - - binding.connect(this); - - Note that when you connect a binding you pass the object you want it to be - connected to. This object will be used as the root for both the from and - to side of the binding when inspecting relative paths. This allows the - binding to be automatically inherited by subclassed objects as well. - - Now that the binding is connected, it will observe both the from and to side - and relay changes. - - If you ever needed to do so (you almost never will, but it is useful to - understand this anyway), you could manually create an active binding by - using the Ember.bind() helper method. (This is the same method used by - to setup your bindings on objects): - - Ember.bind(MyApp.anotherObject, "value", "MyApp.someController.value"); - - Both of these code fragments have the same effect as doing the most friendly - form of binding creation like so: - - MyApp.anotherObject = Ember.Object.create({ - valueBinding: "MyApp.someController.value", - - // OTHER CODE FOR THIS OBJECT... - - }); - - Ember's built in binding creation method makes it easy to automatically - create bindings for you. You should always use the highest-level APIs - available, even if you understand how to it works underneath. - - @since Ember 0.9 - */ - Ember.Binding = Binding; - - /** - Global helper method to create a new binding. Just pass the root object - along with a to and from path to create and connect the binding. The new - binding object will be returned which you can further configure with - transforms and other conditions. - - @param {Object} obj - The root object of the transform. - - @param {String} to - The path to the 'to' side of the binding. Must be relative to obj. - - @param {String} from - The path to the 'from' side of the binding. Must be relative to obj or - a global path. - - @returns {Ember.Binding} binding instance - */ - Ember.bind = function (obj, to, from) { - return new Ember.Binding(to, from).connect(obj); - }; - - Ember.oneWay = function (obj, to, from) { - return new Ember.Binding(to, from).oneWay().connect(obj); - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Metal -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - -(function () { - /** - * @license - * ========================================================================== - * Ember - * Copyright ©2006-2011, Strobe Inc. and contributors. - * Portions copyright ©2008-2011 Apple Inc. All rights reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * For more information about Ember, visit http://www.emberjs.com - * - * ========================================================================== - */ - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ENV ember_assert */ - var indexOf = Ember.ArrayUtils.indexOf; - -// ........................................ -// GLOBAL CONSTANTS -// - -// ensure no undefined errors in browsers where console doesn't exist - if (typeof console === 'undefined') { - window.console = {}; - console.log = console.info = console.warn = console.error = function () { - }; - } - - -// ........................................ -// TYPING & ARRAY MESSAGING -// - - var TYPE_MAP = {}; - var t = "Boolean Number String Function Array Date RegExp Object".split(" "); - Ember.ArrayUtils.forEach(t, function (name) { - TYPE_MAP[ "[object " + name + "]" ] = name.toLowerCase(); - }); - - var toString = Object.prototype.toString; - - /** - Returns a consistent type for the passed item. - - Use this instead of the built-in Ember.typeOf() to get the type of an item. - It will return the same result across all browsers and includes a bit - more detail. Here is what will be returned: - - | Return Value | Meaning | - |---------------|------------------------------------------------------| - | 'string' | String primitive | - | 'number' | Number primitive | - | 'boolean' | Boolean primitive | - | 'null' | Null value | - | 'undefined' | Undefined value | - | 'function' | A function | - | 'array' | An instance of Array | - | 'class' | A Ember class (created using Ember.Object.extend()) | - | 'instance' | A Ember object instance | - | 'error' | An instance of the Error object | - | 'object' | A JavaScript object not inheriting from Ember.Object | - - Examples: - - Ember.typeOf(); => 'undefined' - Ember.typeOf(null); => 'null' - Ember.typeOf(undefined); => 'undefined' - Ember.typeOf('michael'); => 'string' - Ember.typeOf(101); => 'number' - Ember.typeOf(true); => 'boolean' - Ember.typeOf(Ember.makeArray); => 'function' - Ember.typeOf([1,2,90]); => 'array' - Ember.typeOf(Ember.Object.extend()); => 'class' - Ember.typeOf(Ember.Object.create()); => 'instance' - Ember.typeOf(new Error('teamocil')); => 'error' - - // "normal" JavaScript object - Ember.typeOf({a: 'b'}); => 'object' - - @param item {Object} the item to check - @returns {String} the type - */ - Ember.typeOf = function (item) { - var ret; - - ret = (item === null || item === undefined) ? String(item) : TYPE_MAP[toString.call(item)] || 'object'; - - if (ret === 'function') { - if (Ember.Object && Ember.Object.detect(item)) ret = 'class'; - } else if (ret === 'object') { - if (item instanceof Error) ret = 'error'; - else if (Ember.Object && item instanceof Ember.Object) ret = 'instance'; - else ret = 'object'; - } - - return ret; - }; - - /** - Returns true if the passed value is null or undefined. This avoids errors - from JSLint complaining about use of ==, which can be technically - confusing. - - Ember.none(); => true - Ember.none(null); => true - Ember.none(undefined); => true - Ember.none(''); => false - Ember.none([]); => false - Ember.none(function(){}); => false - - @param {Object} obj Value to test - @returns {Boolean} - */ - Ember.none = function (obj) { - return obj === null || obj === undefined; - }; - - /** - Verifies that a value is null or an empty string | array | function. - - Constrains the rules on `Ember.none` by returning false for empty - string and empty arrays. - - Ember.empty(); => true - Ember.empty(null); => true - Ember.empty(undefined); => true - Ember.empty(''); => true - Ember.empty([]); => true - Ember.empty('tobias fünke'); => false - Ember.empty([0,1,2]); => false - - @param {Object} obj Value to test - @returns {Boolean} - */ - Ember.empty = function (obj) { - return obj === null || obj === undefined || (obj.length === 0 && typeof obj !== 'function'); - }; - - /** - This will compare two javascript values of possibly different types. - It will tell you which one is greater than the other by returning: - - - -1 if the first is smaller than the second, - - 0 if both are equal, - - 1 if the first is greater than the second. - - The order is calculated based on Ember.ORDER_DEFINITION, if types are different. - In case they have the same type an appropriate comparison for this type is made. - - Ember.compare('hello', 'hello'); => 0 - Ember.compare('abc', 'dfg'); => -1 - Ember.compare(2, 1); => 1 - - @param {Object} v First value to compare - @param {Object} w Second value to compare - @returns {Number} -1 if v < w, 0 if v = w and 1 if v > w. - */ - Ember.compare = function compare(v, w) { - if (v === w) { - return 0; - } - - var type1 = Ember.typeOf(v); - var type2 = Ember.typeOf(w); - - var Comparable = Ember.Comparable; - if (Comparable) { - if (type1 === 'instance' && Comparable.detect(v.constructor)) { - return v.constructor.compare(v, w); - } - - if (type2 === 'instance' && Comparable.detect(w.constructor)) { - return 1 - w.constructor.compare(w, v); - } - } - - // If we haven't yet generated a reverse-mapping of Ember.ORDER_DEFINITION, - // do so now. - var mapping = Ember.ORDER_DEFINITION_MAPPING; - if (!mapping) { - var order = Ember.ORDER_DEFINITION; - mapping = Ember.ORDER_DEFINITION_MAPPING = {}; - var idx, len; - for (idx = 0, len = order.length; idx < len; ++idx) { - mapping[order[idx]] = idx; - } - - // We no longer need Ember.ORDER_DEFINITION. - delete Ember.ORDER_DEFINITION; - } - - var type1Index = mapping[type1]; - var type2Index = mapping[type2]; - - if (type1Index < type2Index) { - return -1; - } - if (type1Index > type2Index) { - return 1; - } - - // types are equal - so we have to check values now - switch (type1) { - case 'boolean': - case 'number': - if (v < w) { - return -1; - } - if (v > w) { - return 1; - } - return 0; - - case 'string': - var comp = v.localeCompare(w); - if (comp < 0) { - return -1; - } - if (comp > 0) { - return 1; - } - return 0; - - case 'array': - var vLen = v.length; - var wLen = w.length; - var l = Math.min(vLen, wLen); - var r = 0; - var i = 0; - while (r === 0 && i < l) { - r = compare(v[i], w[i]); - i++; - } - if (r !== 0) { - return r; - } - - // all elements are equal now - // shorter array should be ordered first - if (vLen < wLen) { - return -1; - } - if (vLen > wLen) { - return 1; - } - // arrays are equal now - return 0; - - case 'instance': - if (Ember.Comparable && Ember.Comparable.detect(v)) { - return v.compare(v, w); - } - return 0; - - default: - return 0; - } - }; - - /** @private */ - function _copy(obj, deep, seen, copies) { - var ret, loc, key; - - // primitive data types are immutable, just return them. - if ('object' !== typeof obj || obj === null) return obj; - - // avoid cyclical loops - if (deep && (loc = indexOf(seen, obj)) >= 0) return copies[loc]; - - ember_assert('Cannot clone an Ember.Object that does not implement Ember.Copyable', !(obj instanceof Ember.Object) || (Ember.Copyable && Ember.Copyable.detect(obj))); - - // IMPORTANT: this specific test will detect a native array only. Any other - // object will need to implement Copyable. - if (Ember.typeOf(obj) === 'array') { - ret = obj.slice(); - if (deep) { - loc = ret.length; - while (--loc >= 0) ret[loc] = _copy(ret[loc], deep, seen, copies); - } - } else if (Ember.Copyable && Ember.Copyable.detect(obj)) { - ret = obj.copy(deep, seen, copies); - } else { - ret = {}; - for (key in obj) { - if (!obj.hasOwnProperty(key)) continue; - ret[key] = deep ? _copy(obj[key], deep, seen, copies) : obj[key]; - } - } - - if (deep) { - seen.push(obj); - copies.push(ret); - } - - return ret; - } - - /** - Creates a clone of the passed object. This function can take just about - any type of object and create a clone of it, including primitive values - (which are not actually cloned because they are immutable). - - If the passed object implements the clone() method, then this function - will simply call that method and return the result. - - @param {Object} object The object to clone - @param {Boolean} deep If true, a deep copy of the object is made - @returns {Object} The cloned object - */ - Ember.copy = function (obj, deep) { - // fast paths - if ('object' !== typeof obj || obj === null) return obj; // can't copy primitives - if (Ember.Copyable && Ember.Copyable.detect(obj)) return obj.copy(deep); - return _copy(obj, deep, deep ? [] : null, deep ? [] : null); - }; - - /** - Convenience method to inspect an object. This method will attempt to - convert the object into a useful string description. - - @param {Object} obj The object you want to inspect. - @returns {String} A description of the object - */ - Ember.inspect = function (obj) { - var v, ret = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - v = obj[key]; - if (v === 'toString') { - continue; - } // ignore useless items - if (Ember.typeOf(v) === 'function') { - v = "function() { ... }"; - } - ret.push(key + ": " + v); - } - } - return "{" + ret.join(" , ") + "}"; - }; - - /** - Compares two objects, returning true if they are logically equal. This is - a deeper comparison than a simple triple equal. For sets it will compare the - internal objects. For any other object that implements `isEqual()` it will - respect that method. - - Ember.isEqual('hello', 'hello'); => true - Ember.isEqual(1, 2); => false - Ember.isEqual([4,2], [4,2]); => false - - @param {Object} a first object to compare - @param {Object} b second object to compare - @returns {Boolean} - */ - Ember.isEqual = function (a, b) { - if (a && 'function' === typeof a.isEqual) return a.isEqual(b); - return a === b; - }; - - /** - @private - Used by Ember.compare - */ - Ember.ORDER_DEFINITION = Ember.ENV.ORDER_DEFINITION || [ - 'undefined', - 'null', - 'boolean', - 'number', - 'string', - 'array', - 'object', - 'instance', - 'function', - 'class' - ]; - - /** - Returns all of the keys defined on an object or hash. This is useful - when inspecting objects for debugging. On browsers that support it, this - uses the native Object.keys implementation. - - @function - @param {Object} obj - @returns {Array} Array containing keys of obj - */ - Ember.keys = Object.keys; - - if (!Ember.keys) { - Ember.keys = function (obj) { - var ret = []; - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - ret.push(key); - } - } - return ret; - }; - } - -// .......................................................... -// ERROR -// - - /** - @class - - A subclass of the JavaScript Error object for use in Ember. - */ - Ember.Error = function () { - var tmp = Error.prototype.constructor.apply(this, arguments); - - for (var p in tmp) { - if (tmp.hasOwnProperty(p)) { - this[p] = tmp[p]; - } - } - this.message = tmp.message; - }; - - Ember.Error.prototype = Ember.create(Error.prototype); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - /** @private **/ - var STRING_DASHERIZE_REGEXP = (/[ _]/g); - var STRING_DASHERIZE_CACHE = {}; - var STRING_DECAMELIZE_REGEXP = (/([a-z])([A-Z])/g); - var STRING_CAMELIZE_REGEXP = (/(\-|_|\s)+(.)?/g); - var STRING_UNDERSCORE_REGEXP_1 = (/([a-z\d])([A-Z]+)/g); - var STRING_UNDERSCORE_REGEXP_2 = (/\-|\s+/g); - - /** - Defines the hash of localized strings for the current language. Used by - the `Ember.String.loc()` helper. To localize, add string values to this - hash. - - @property {String} - */ - Ember.STRINGS = {}; - - /** - Defines string helper methods including string formatting and localization. - Unless Ember.EXTEND_PROTOTYPES = false these methods will also be added to the - String.prototype as well. - - @namespace - */ - Ember.String = { - - /** - Apply formatting options to the string. This will look for occurrences - of %@ in your string and substitute them with the arguments you pass into - this method. If you want to control the specific order of replacement, - you can add a number after the key as well to indicate which argument - you want to insert. - - Ordered insertions are most useful when building loc strings where values - you need to insert may appear in different orders. - - "Hello %@ %@".fmt('John', 'Doe') => "Hello John Doe" - "Hello %@2, %@1".fmt('John', 'Doe') => "Hello Doe, John" - - @param {Object...} [args] - @returns {String} formatted string - */ - fmt: function (str, formats) { - // first, replace any ORDERED replacements. - var idx = 0; // the current index for non-numerical replacements - return str.replace(/%@([0-9]+)?/g, function (s, argIndex) { - argIndex = (argIndex) ? parseInt(argIndex, 0) - 1 : idx++; - s = formats[argIndex]; - return ((s === null) ? '(null)' : (s === undefined) ? '' : s).toString(); - }); - }, - - /** - Formats the passed string, but first looks up the string in the localized - strings hash. This is a convenient way to localize text. See - `Ember.String.fmt()` for more information on formatting. - - Note that it is traditional but not required to prefix localized string - keys with an underscore or other character so you can easily identify - localized strings. - - Ember.STRINGS = { - '_Hello World': 'Bonjour le monde', - '_Hello %@ %@': 'Bonjour %@ %@' - }; - - Ember.String.loc("_Hello World"); - => 'Bonjour le monde'; - - Ember.String.loc("_Hello %@ %@", ["John", "Smith"]); - => "Bonjour John Smith"; - - @param {String} str - The string to format - - @param {Array} formats - Optional array of parameters to interpolate into string. - - @returns {String} formatted string - */ - loc: function (str, formats) { - str = Ember.STRINGS[str] || str; - return Ember.String.fmt(str, formats); - }, - - /** - Splits a string into separate units separated by spaces, eliminating any - empty strings in the process. This is a convenience method for split that - is mostly useful when applied to the String.prototype. - - Ember.String.w("alpha beta gamma").forEach(function(key) { - console.log(key); - }); - > alpha - > beta - > gamma - - @param {String} str - The string to split - - @returns {String} split string - */ - w: function (str) { - return str.split(/\s+/); - }, - - /** - Converts a camelized string into all lower case separated by underscores. - - 'innerHTML'.decamelize() => 'inner_html' - 'action_name'.decamelize() => 'action_name' - 'css-class-name'.decamelize() => 'css-class-name' - 'my favorite items'.decamelize() => 'my favorite items' - - @param {String} str - The string to decamelize. - - @returns {String} the decamelized string. - */ - decamelize: function (str) { - return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase(); - }, - - /** - Replaces underscores or spaces with dashes. - - 'innerHTML'.dasherize() => 'inner-html' - 'action_name'.dasherize() => 'action-name' - 'css-class-name'.dasherize() => 'css-class-name' - 'my favorite items'.dasherize() => 'my-favorite-items' - - @param {String} str - The string to dasherize. - - @returns {String} the dasherized string. - */ - dasherize: function (str) { - var cache = STRING_DASHERIZE_CACHE, - ret = cache[str]; - - if (ret) { - return ret; - } else { - ret = Ember.String.decamelize(str).replace(STRING_DASHERIZE_REGEXP, '-'); - cache[str] = ret; - } - - return ret; - }, - - /** - Returns the lowerCaseCamel form of a string. - - 'innerHTML'.camelize() => 'innerHTML' - 'action_name'.camelize() => 'actionName' - 'css-class-name'.camelize() => 'cssClassName' - 'my favorite items'.camelize() => 'myFavoriteItems' - - @param {String} str - The string to camelize. - - @returns {String} the camelized string. - */ - camelize: function (str) { - return str.replace(STRING_CAMELIZE_REGEXP, function (match, separator, chr) { - return chr ? chr.toUpperCase() : ''; - }); - }, - - /** - More general than decamelize. Returns the lower_case_and_underscored - form of a string. - - 'innerHTML'.underscore() => 'inner_html' - 'action_name'.underscore() => 'action_name' - 'css-class-name'.underscore() => 'css_class_name' - 'my favorite items'.underscore() => 'my_favorite_items' - - @param {String} str - The string to underscore. - - @returns {String} the underscored string. - */ - underscore: function (str) { - return str.replace(STRING_UNDERSCORE_REGEXP_1, '$1_$2'). - replace(STRING_UNDERSCORE_REGEXP_2, '_').toLowerCase(); - } - }; -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var fmt = Ember.String.fmt, - w = Ember.String.w, - loc = Ember.String.loc, - camelize = Ember.String.camelize, - decamelize = Ember.String.decamelize, - dasherize = Ember.String.dasherize, - underscore = Ember.String.underscore; - - if (Ember.EXTEND_PROTOTYPES) { - - /** - @see Ember.String.fmt - */ - String.prototype.fmt = function () { - return fmt(this, arguments); - }; - - /** - @see Ember.String.w - */ - String.prototype.w = function () { - return w(this); - }; - - /** - @see Ember.String.loc - */ - String.prototype.loc = function () { - return loc(this, arguments); - }; - - /** - @see Ember.String.camelize - */ - String.prototype.camelize = function () { - return camelize(this); - }; - - /** - @see Ember.String.decamelize - */ - String.prototype.decamelize = function () { - return decamelize(this); - }; - - /** - @see Ember.String.dasherize - */ - String.prototype.dasherize = function () { - return dasherize(this); - }; - - /** - @see Ember.String.underscore - */ - String.prototype.underscore = function () { - return underscore(this); - }; - - } - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var a_slice = Array.prototype.slice; - - if (Ember.EXTEND_PROTOTYPES) { - - /** - The `property` extension of Javascript's Function prototype is available - when Ember.EXTEND_PROTOTYPES is true, which is the default. - - Computed properties allow you to treat a function like a property: - - MyApp.president = Ember.Object.create({ - firstName: "Barack", - lastName: "Obama", - - fullName: function() { - return this.get('firstName') + ' ' + this.get('lastName'); - - // Call this flag to mark the function as a property - }.property() - }); - - MyApp.president.get('fullName'); => "Barack Obama" - - Treating a function like a property is useful because they can work with - bindings, just like any other property. - - Many computed properties have dependencies on other properties. For - example, in the above example, the `fullName` property depends on - `firstName` and `lastName` to determine its value. You can tell Ember.js - about these dependencies like this: - - MyApp.president = Ember.Object.create({ - firstName: "Barack", - lastName: "Obama", - - fullName: function() { - return this.get('firstName') + ' ' + this.get('lastName'); - - // Tell Ember.js that this computed property depends on firstName - // and lastName - }.property('firstName', 'lastName') - }); - - Make sure you list these dependencies so Ember.js knows when to update - bindings that connect to a computed property. - - Note: you will usually want to use `property(...)` with `cacheable()`. - - @see Ember.ComputedProperty - @see Ember.computed - */ - Function.prototype.property = function () { - var ret = Ember.computed(this); - return ret.property.apply(ret, arguments); - }; - - /** - The `observes` extension of Javascript's Function prototype is available - when Ember.EXTEND_PROTOTYPES is true, which is the default. - - You can observe property changes simply by adding the `observes` - call to the end of your method declarations in classes that you write. - For example: - - Ember.Object.create({ - valueObserver: function() { - // Executes whenever the "value" property changes - }.observes('value') - }); - - @see Ember.Observable - */ - Function.prototype.observes = function () { - this.__ember_observes__ = a_slice.call(arguments); - return this; - }; - - /** - The `observesBefore` extension of Javascript's Function prototype is - available when Ember.EXTEND_PROTOTYPES is true, which is the default. - - You can get notified when a property changes is about to happen by - by adding the `observesBefore` call to the end of your method - declarations in classes that you write. For example: - - Ember.Object.create({ - valueObserver: function() { - // Executes whenever the "value" property is about to change - }.observesBefore('value') - }); - - @see Ember.Observable - */ - Function.prototype.observesBefore = function () { - this.__ember_observesBefore__ = a_slice.call(arguments); - return this; - }; - - } - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var IS_BINDING = Ember.IS_BINDING = /^.+Binding$/; - - Ember._mixinBindings = function (obj, key, value, m) { - if (IS_BINDING.test(key)) { - if (!(value instanceof Ember.Binding)) { - value = new Ember.Binding(key.slice(0, -7), value); // make binding - } else { - value.to(key.slice(0, -7)); - } - value.connect(obj); - - // keep a set of bindings in the meta so that when we rewatch we can - // resync them... - var bindings = m.bindings; - if (!bindings) { - bindings = m.bindings = { __emberproto__: obj }; - } else if (bindings.__emberproto__ !== obj) { - bindings = m.bindings = Ember.create(m.bindings); - bindings.__emberproto__ = obj; - } - - bindings[key] = true; - } - - return value; - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - -// .......................................................... -// HELPERS -// - - var get = Ember.get, set = Ember.set; - var a_slice = Array.prototype.slice; - var a_indexOf = Ember.ArrayUtils.indexOf; - - var contexts = []; - - /** @private */ - function popCtx() { - return contexts.length === 0 ? {} : contexts.pop(); - } - - /** @private */ - function pushCtx(ctx) { - contexts.push(ctx); - return null; - } - - /** @private */ - function iter(key, value) { - var valueProvided = arguments.length === 2; - - function i(item) { - var cur = get(item, key); - return valueProvided ? value === cur : !!cur; - } - - return i; - } - - /** @private */ - function xform(target, method, params) { - method.call(target, params[0], params[2], params[3]); - } - - /** - @class - - This mixin defines the common interface implemented by enumerable objects - in Ember. Most of these methods follow the standard Array iteration - API defined up to JavaScript 1.8 (excluding language-specific features that - cannot be emulated in older versions of JavaScript). - - This mixin is applied automatically to the Array class on page load, so you - can use any of these methods on simple arrays. If Array already implements - one of these methods, the mixin will not override them. - - h3. Writing Your Own Enumerable - - To make your own custom class enumerable, you need two items: - - 1. You must have a length property. This property should change whenever - the number of items in your enumerable object changes. If you using this - with an Ember.Object subclass, you should be sure to change the length - property using set(). - - 2. If you must implement nextObject(). See documentation. - - Once you have these two methods implement, apply the Ember.Enumerable mixin - to your class and you will be able to enumerate the contents of your object - like any other collection. - - h3. Using Ember Enumeration with Other Libraries - - Many other libraries provide some kind of iterator or enumeration like - facility. This is often where the most common API conflicts occur. - Ember's API is designed to be as friendly as possible with other - libraries by implementing only methods that mostly correspond to the - JavaScript 1.8 API. - - @since Ember 0.9 - */ - Ember.Enumerable = Ember.Mixin.create(/** @lends Ember.Enumerable */ { - - /** @private - compatibility */ - isEnumerable: true, - - /** - Implement this method to make your class enumerable. - - This method will be call repeatedly during enumeration. The index value - will always begin with 0 and increment monotonically. You don't have to - rely on the index value to determine what object to return, but you should - always check the value and start from the beginning when you see the - requested index is 0. - - The previousObject is the object that was returned from the last call - to nextObject for the current iteration. This is a useful way to - manage iteration if you are tracing a linked list, for example. - - Finally the context parameter will always contain a hash you can use as - a "scratchpad" to maintain any other state you need in order to iterate - properly. The context object is reused and is not reset between - iterations so make sure you setup the context with a fresh state whenever - the index parameter is 0. - - Generally iterators will continue to call nextObject until the index - reaches the your current length-1. If you run out of data before this - time for some reason, you should simply return undefined. - - The default implementation of this method simply looks up the index. - This works great on any Array-like objects. - - @param index {Number} the current index of the iteration - @param previousObject {Object} the value returned by the last call to nextObject. - @param context {Object} a context object you can use to maintain state. - @returns {Object} the next object in the iteration or undefined - */ - nextObject: Ember.required(Function), - - /** - Helper method returns the first object from a collection. This is usually - used by bindings and other parts of the framework to extract a single - object if the enumerable contains only one item. - - If you override this method, you should implement it so that it will - always return the same value each time it is called. If your enumerable - contains only one object, this method should always return that object. - If your enumerable is empty, this method should return undefined. - - var arr = ["a", "b", "c"]; - arr.firstObject(); => "a" - - var arr = []; - arr.firstObject(); => undefined - - @returns {Object} the object or undefined - */ - firstObject: Ember.computed(function () { - if (get(this, 'length') === 0) return undefined; - if (Ember.Array && Ember.Array.detect(this)) return this.objectAt(0); - - // handle generic enumerables - var context = popCtx(), ret; - ret = this.nextObject(0, null, context); - pushCtx(context); - return ret; - }).property().volatile(), - - /** - Helper method returns the last object from a collection. If your enumerable - contains only one object, this method should always return that object. - If your enumerable is empty, this method should return undefined. - - var arr = ["a", "b", "c"]; - arr.lastObject(); => "c" - - var arr = []; - arr.lastObject(); => undefined - - @returns {Object} the last object or undefined - */ - lastObject: Ember.computed(function () { - var len = get(this, 'length'); - if (len === 0) return undefined; - if (Ember.Array && Ember.Array.detect(this)) { - return this.objectAt(len - 1); - } else { - var context = popCtx(), idx = 0, cur, last = null; - do { - last = cur; - cur = this.nextObject(idx++, last, context); - } while (cur !== undefined); - pushCtx(context); - return last; - } - }).property().volatile(), - - /** - Returns true if the passed object can be found in the receiver. The - default version will iterate through the enumerable until the object - is found. You may want to override this with a more efficient version. - - var arr = ["a", "b", "c"]; - arr.contains("a"); => true - arr.contains("z"); => false - - @param {Object} obj - The object to search for. - - @returns {Boolean} true if object is found in enumerable. - */ - contains: function (obj) { - return this.find(function (item) { - return item === obj; - }) !== undefined; - }, - - /** - Iterates through the enumerable, calling the passed function on each - item. This method corresponds to the forEach() method defined in - JavaScript 1.6. - - The callback method you provide should have the following signature (all - parameters are optional): - - function(item, index, enumerable); - - - *item* is the current item in the iteration. - - *index* is the current index in the iteration - - *enumerable* is the enumerable object itself. - - Note that in addition to a callback, you can also pass an optional target - object that will be set as "this" on the context. This is a good way - to give your iterator function access to the current object. - - @param {Function} callback The callback to execute - @param {Object} target The target object to use - @returns {Object} receiver - */ - forEach: function (callback, target) { - if (typeof callback !== "function") throw new TypeError(); - var len = get(this, 'length'), last = null, context = popCtx(); - - if (target === undefined) target = null; - - for (var idx = 0; idx < len; idx++) { - var next = this.nextObject(idx, last, context); - callback.call(target, next, idx, this); - last = next; - } - last = null; - context = pushCtx(context); - return this; - }, - - /** - Alias for mapProperty - - @params key {String} name of the property - @returns {Array} The mapped array. - */ - getEach: function (key) { - return this.mapProperty(key); - }, - - /** - Sets the value on the named property for each member. This is more - efficient than using other methods defined on this helper. If the object - implements Ember.Observable, the value will be changed to set(), otherwise - it will be set directly. null objects are skipped. - - @param {String} key The key to set - @param {Object} value The object to set - @returns {Object} receiver - */ - setEach: function (key, value) { - return this.forEach(function (item) { - set(item, key, value); - }); - }, - - /** - Maps all of the items in the enumeration to another value, returning - a new array. This method corresponds to map() defined in JavaScript 1.6. - - The callback method you provide should have the following signature (all - parameters are optional): - - function(item, index, enumerable); - - - *item* is the current item in the iteration. - - *index* is the current index in the iteration - - *enumerable* is the enumerable object itself. - - It should return the mapped value. - - Note that in addition to a callback, you can also pass an optional target - object that will be set as "this" on the context. This is a good way - to give your iterator function access to the current object. - - @param {Function} callback The callback to execute - @param {Object} target The target object to use - @returns {Array} The mapped array. - */ - map: function (callback, target) { - var ret = []; - this.forEach(function (x, idx, i) { - ret[idx] = callback.call(target, x, idx, i); - }); - return ret; - }, - - /** - Similar to map, this specialized function returns the value of the named - property on all items in the enumeration. - - @params key {String} name of the property - @returns {Array} The mapped array. - */ - mapProperty: function (key) { - return this.map(function (next) { - return get(next, key); - }); - }, - - /** - Returns an array with all of the items in the enumeration that the passed - function returns true for. This method corresponds to filter() defined in - JavaScript 1.6. - - The callback method you provide should have the following signature (all - parameters are optional): - - function(item, index, enumerable); - - - *item* is the current item in the iteration. - - *index* is the current index in the iteration - - *enumerable* is the enumerable object itself. - - It should return the true to include the item in the results, false otherwise. - - Note that in addition to a callback, you can also pass an optional target - object that will be set as "this" on the context. This is a good way - to give your iterator function access to the current object. - - @param {Function} callback The callback to execute - @param {Object} target The target object to use - @returns {Array} A filtered array. - */ - filter: function (callback, target) { - var ret = []; - this.forEach(function (x, idx, i) { - if (callback.call(target, x, idx, i)) ret.push(x); - }); - return ret; - }, - - /** - Returns an array with just the items with the matched property. You - can pass an optional second argument with the target value. Otherwise - this will match any property that evaluates to true. - - @params key {String} the property to test - @param value {String} optional value to test against. - @returns {Array} filtered array - */ - filterProperty: function (key, value) { - return this.filter(iter.apply(this, arguments)); - }, - - /** - Returns the first item in the array for which the callback returns true. - This method works similar to the filter() method defined in JavaScript 1.6 - except that it will stop working on the array once a match is found. - - The callback method you provide should have the following signature (all - parameters are optional): - - function(item, index, enumerable); - - - *item* is the current item in the iteration. - - *index* is the current index in the iteration - - *enumerable* is the enumerable object itself. - - It should return the true to include the item in the results, false otherwise. - - Note that in addition to a callback, you can also pass an optional target - object that will be set as "this" on the context. This is a good way - to give your iterator function access to the current object. - - @param {Function} callback The callback to execute - @param {Object} target The target object to use - @returns {Object} Found item or null. - */ - find: function (callback, target) { - var len = get(this, 'length'); - if (target === undefined) target = null; - - var last = null, next, found = false, ret; - var context = popCtx(); - for (var idx = 0; idx < len && !found; idx++) { - next = this.nextObject(idx, last, context); - if (found = callback.call(target, next, idx, this)) ret = next; - last = next; - } - next = last = null; - context = pushCtx(context); - return ret; - }, - - /** - Returns an the first item with a property matching the passed value. You - can pass an optional second argument with the target value. Otherwise - this will match any property that evaluates to true. - - This method works much like the more generic find() method. - - @params key {String} the property to test - @param value {String} optional value to test against. - @returns {Object} found item or null - */ - findProperty: function (key, value) { - return this.find(iter.apply(this, arguments)); - }, - - /** - Returns true if the passed function returns true for every item in the - enumeration. This corresponds with the every() method in JavaScript 1.6. - - The callback method you provide should have the following signature (all - parameters are optional): - - function(item, index, enumerable); - - - *item* is the current item in the iteration. - - *index* is the current index in the iteration - - *enumerable* is the enumerable object itself. - - It should return the true or false. - - Note that in addition to a callback, you can also pass an optional target - object that will be set as "this" on the context. This is a good way - to give your iterator function access to the current object. - - Example Usage: - - if (people.every(isEngineer)) { Paychecks.addBigBonus(); } - - @param {Function} callback The callback to execute - @param {Object} target The target object to use - @returns {Boolean} - */ - every: function (callback, target) { - return !this.find(function (x, idx, i) { - return !callback.call(target, x, idx, i); - }); - }, - - /** - Returns true if the passed property resolves to true for all items in the - enumerable. This method is often simpler/faster than using a callback. - - @params key {String} the property to test - @param value {String} optional value to test against. - @returns {Array} filtered array - */ - everyProperty: function (key, value) { - return this.every(iter.apply(this, arguments)); - }, - - - /** - Returns true if the passed function returns true for any item in the - enumeration. This corresponds with the every() method in JavaScript 1.6. - - The callback method you provide should have the following signature (all - parameters are optional): - - function(item, index, enumerable); - - - *item* is the current item in the iteration. - - *index* is the current index in the iteration - - *enumerable* is the enumerable object itself. - - It should return the true to include the item in the results, false otherwise. - - Note that in addition to a callback, you can also pass an optional target - object that will be set as "this" on the context. This is a good way - to give your iterator function access to the current object. - - Usage Example: - - if (people.some(isManager)) { Paychecks.addBiggerBonus(); } - - @param {Function} callback The callback to execute - @param {Object} target The target object to use - @returns {Array} A filtered array. - */ - some: function (callback, target) { - return !!this.find(function (x, idx, i) { - return !!callback.call(target, x, idx, i); - }); - }, - - /** - Returns true if the passed property resolves to true for any item in the - enumerable. This method is often simpler/faster than using a callback. - - @params key {String} the property to test - @param value {String} optional value to test against. - @returns {Boolean} true - */ - someProperty: function (key, value) { - return this.some(iter.apply(this, arguments)); - }, - - /** - This will combine the values of the enumerator into a single value. It - is a useful way to collect a summary value from an enumeration. This - corresponds to the reduce() method defined in JavaScript 1.8. - - The callback method you provide should have the following signature (all - parameters are optional): - - function(previousValue, item, index, enumerable); - - - *previousValue* is the value returned by the last call to the iterator. - - *item* is the current item in the iteration. - - *index* is the current index in the iteration - - *enumerable* is the enumerable object itself. - - Return the new cumulative value. - - In addition to the callback you can also pass an initialValue. An error - will be raised if you do not pass an initial value and the enumerator is - empty. - - Note that unlike the other methods, this method does not allow you to - pass a target object to set as this for the callback. It's part of the - spec. Sorry. - - @param {Function} callback The callback to execute - @param {Object} initialValue Initial value for the reduce - @param {String} reducerProperty internal use only. - @returns {Object} The reduced value. - */ - reduce: function (callback, initialValue, reducerProperty) { - if (typeof callback !== "function") { - throw new TypeError(); - } - - var ret = initialValue; - - this.forEach(function (item, i) { - ret = callback.call(null, ret, item, i, this, reducerProperty); - }, this); - - return ret; - }, - - /** - Invokes the named method on every object in the receiver that - implements it. This method corresponds to the implementation in - Prototype 1.6. - - @param methodName {String} the name of the method - @param args {Object...} optional arguments to pass as well. - @returns {Array} return values from calling invoke. - */ - invoke: function (methodName) { - var args, ret = []; - if (arguments.length > 1) args = a_slice.call(arguments, 1); - - this.forEach(function (x, idx) { - var method = x && x[methodName]; - if ('function' === typeof method) { - ret[idx] = args ? method.apply(x, args) : method.call(x); - } - }, this); - - return ret; - }, - - /** - Simply converts the enumerable into a genuine array. The order is not - guaranteed. Corresponds to the method implemented by Prototype. - - @returns {Array} the enumerable as an array. - */ - toArray: function () { - var ret = []; - this.forEach(function (o, idx) { - ret[idx] = o; - }); - return ret; - }, - - /** - Returns a copy of the array with all null elements removed. - - var arr = ["a", null, "c", null]; - arr.compact(); => ["a", "c"] - - @returns {Array} the array without null elements. - */ - compact: function () { - return this.without(null); - }, - - /** - Returns a new enumerable that excludes the passed value. The default - implementation returns an array regardless of the receiver type unless - the receiver does not contain the value. - - var arr = ["a", "b", "a", "c"]; - arr.without("a"); => ["b", "c"] - - @param {Object} value - @returns {Ember.Enumerable} - */ - without: function (value) { - if (!this.contains(value)) return this; // nothing to do - var ret = []; - this.forEach(function (k) { - if (k !== value) ret[ret.length] = k; - }); - return ret; - }, - - /** - Returns a new enumerable that contains only unique values. The default - implementation returns an array regardless of the receiver type. - - var arr = ["a", "a", "b", "b"]; - arr.uniq(); => ["a", "b"] - - @returns {Ember.Enumerable} - */ - uniq: function () { - var ret = []; - this.forEach(function (k) { - if (a_indexOf(ret, k) < 0) ret.push(k); - }); - return ret; - }, - - /** - This property will trigger anytime the enumerable's content changes. - You can observe this property to be notified of changes to the enumerables - content. - - For plain enumerables, this property is read only. Ember.Array overrides - this method. - - @property {Ember.Array} - */ - '[]': Ember.computed(function (key, value) { - return this; - }).property().cacheable(), - - // .......................................................... - // ENUMERABLE OBSERVERS - // - - /** - Registers an enumerable observer. Must implement Ember.EnumerableObserver - mixin. - */ - addEnumerableObserver: function (target, opts) { - var willChange = (opts && opts.willChange) || 'enumerableWillChange', - didChange = (opts && opts.didChange) || 'enumerableDidChange'; - - var hasObservers = get(this, 'hasEnumerableObservers'); - if (!hasObservers) Ember.propertyWillChange(this, 'hasEnumerableObservers'); - Ember.addListener(this, '@enumerable:before', target, willChange, xform); - Ember.addListener(this, '@enumerable:change', target, didChange, xform); - if (!hasObservers) Ember.propertyDidChange(this, 'hasEnumerableObservers'); - return this; - }, - - /** - Removes a registered enumerable observer. - */ - removeEnumerableObserver: function (target, opts) { - var willChange = (opts && opts.willChange) || 'enumerableWillChange', - didChange = (opts && opts.didChange) || 'enumerableDidChange'; - - var hasObservers = get(this, 'hasEnumerableObservers'); - if (hasObservers) Ember.propertyWillChange(this, 'hasEnumerableObservers'); - Ember.removeListener(this, '@enumerable:before', target, willChange); - Ember.removeListener(this, '@enumerable:change', target, didChange); - if (hasObservers) Ember.propertyDidChange(this, 'hasEnumerableObservers'); - return this; - }, - - /** - Becomes true whenever the array currently has observers watching changes - on the array. - - @property {Boolean} - */ - hasEnumerableObservers: Ember.computed(function () { - return Ember.hasListeners(this, '@enumerable:change') || Ember.hasListeners(this, '@enumerable:before'); - }).property().cacheable(), - - - /** - Invoke this method just before the contents of your enumerable will - change. You can either omit the parameters completely or pass the objects - to be removed or added if available or just a count. - - @param {Ember.Enumerable|Number} removing - An enumerable of the objects to be removed or the number of items to - be removed. - - @param {Ember.Enumerable|Number} adding - An enumerable of the objects to be added or the number of items to be - added. - - @returns {Ember.Enumerable} receiver - */ - enumerableContentWillChange: function (removing, adding) { - - var removeCnt, addCnt, hasDelta; - - if ('number' === typeof removing) removeCnt = removing; - else if (removing) removeCnt = get(removing, 'length'); - else removeCnt = removing = -1; - - if ('number' === typeof adding) addCnt = adding; - else if (adding) addCnt = get(adding, 'length'); - else addCnt = adding = -1; - - hasDelta = addCnt < 0 || removeCnt < 0 || addCnt - removeCnt !== 0; - - if (removing === -1) removing = null; - if (adding === -1) adding = null; - - if (hasDelta) Ember.propertyWillChange(this, 'length'); - Ember.sendEvent(this, '@enumerable:before', removing, adding); - - return this; - }, - - /** - Invoke this method when the contents of your enumerable has changed. - This will notify any observers watching for content changes. If your are - implementing an ordered enumerable (such as an array), also pass the - start and end values where the content changed so that it can be used to - notify range observers. - - @param {Number} start - optional start offset for the content change. For unordered - enumerables, you should always pass -1. - - @param {Enumerable} added - optional enumerable containing items that were added to the set. For - ordered enumerables, this should be an ordered array of items. If no - items were added you can pass null. - - @param {Enumerable} removes - optional enumerable containing items that were removed from the set. - For ordered enumerables, this should be an ordered array of items. If - no items were removed you can pass null. - - @returns {Object} receiver - */ - enumerableContentDidChange: function (removing, adding) { - var notify = this.propertyDidChange, removeCnt, addCnt, hasDelta; - - if ('number' === typeof removing) removeCnt = removing; - else if (removing) removeCnt = get(removing, 'length'); - else removeCnt = removing = -1; - - if ('number' === typeof adding) addCnt = adding; - else if (adding) addCnt = get(adding, 'length'); - else addCnt = adding = -1; - - hasDelta = addCnt < 0 || removeCnt < 0 || addCnt - removeCnt !== 0; - - if (removing === -1) removing = null; - if (adding === -1) adding = null; - - Ember.sendEvent(this, '@enumerable:change', removing, adding); - if (hasDelta) Ember.propertyDidChange(this, 'length'); - - return this; - } - - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== -// .......................................................... -// HELPERS -// - - var get = Ember.get, set = Ember.set, meta = Ember.meta, map = Ember.ArrayUtils.map; - - /** @private */ - function none(obj) { - return obj === null || obj === undefined; - } - - /** @private */ - function xform(target, method, params) { - method.call(target, params[0], params[2], params[3], params[4]); - } - -// .......................................................... -// ARRAY -// - /** - @namespace - - This module implements Observer-friendly Array-like behavior. This mixin is - picked up by the Array class as well as other controllers, etc. that want to - appear to be arrays. - - Unlike Ember.Enumerable, this mixin defines methods specifically for - collections that provide index-ordered access to their contents. When you - are designing code that needs to accept any kind of Array-like object, you - should use these methods instead of Array primitives because these will - properly notify observers of changes to the array. - - Although these methods are efficient, they do add a layer of indirection to - your application so it is a good idea to use them only when you need the - flexibility of using both true JavaScript arrays and "virtual" arrays such - as controllers and collections. - - You can use the methods defined in this module to access and modify array - contents in a KVO-friendly way. You can also be notified whenever the - membership if an array changes by changing the syntax of the property to - .observes('*myProperty.[]') . - - To support Ember.Array in your own class, you must override two - primitives to use it: replace() and objectAt(). - - Note that the Ember.Array mixin also incorporates the Ember.Enumerable mixin. All - Ember.Array-like objects are also enumerable. - - @extends Ember.Enumerable - @since Ember 0.9.0 - */ - Ember.Array = Ember.Mixin.create(Ember.Enumerable, /** @scope Ember.Array.prototype */ { - - /** @private - compatibility */ - isSCArray: true, - - /** - @field {Number} length - - Your array must support the length property. Your replace methods should - set this property whenever it changes. - */ - length: Ember.required(), - - /** - This is one of the primitives you must implement to support Ember.Array. - Returns the object at the named index. If your object supports retrieving - the value of an array item using get() (i.e. myArray.get(0)), then you do - not need to implement this method yourself. - - @param {Number} idx - The index of the item to return. If idx exceeds the current length, - return null. - */ - objectAt: function (idx) { - if ((idx < 0) || (idx >= get(this, 'length'))) return undefined; - return get(this, idx); - }, - - /** - This returns the objects at the specified indexes, using objectAt. - - @param {Array} indexes - An array of indexes of items to return. - */ - objectsAt: function (indexes) { - var self = this; - return map(indexes, function (idx) { - return self.objectAt(idx); - }); - }, - - /** @private (nodoc) - overrides Ember.Enumerable version */ - nextObject: function (idx) { - return this.objectAt(idx); - }, - - /** - @field [] - - This is the handler for the special array content property. If you get - this property, it will return this. If you set this property it a new - array, it will replace the current content. - - This property overrides the default property defined in Ember.Enumerable. - */ - '[]': Ember.computed(function (key, value) { - if (value !== undefined) this.replace(0, get(this, 'length'), value); - return this; - }).property().cacheable(), - - /** @private (nodoc) - optimized version from Enumerable */ - contains: function (obj) { - return this.indexOf(obj) >= 0; - }, - - // Add any extra methods to Ember.Array that are native to the built-in Array. - /** - Returns a new array that is a slice of the receiver. This implementation - uses the observable array methods to retrieve the objects for the new - slice. - - var arr = ['red', 'green', 'blue']; - arr.slice(0); => ['red', 'green', 'blue'] - arr.slice(0, 2); => ['red', 'green'] - arr.slice(1, 100); => ['green', 'blue'] - - @param beginIndex {Integer} (Optional) index to begin slicing from. - @param endIndex {Integer} (Optional) index to end the slice at. - @returns {Array} New array with specified slice - */ - slice: function (beginIndex, endIndex) { - var ret = []; - var length = get(this, 'length'); - if (none(beginIndex)) beginIndex = 0; - if (none(endIndex) || (endIndex > length)) endIndex = length; - while (beginIndex < endIndex) { - ret[ret.length] = this.objectAt(beginIndex++); - } - return ret; - }, - - /** - Returns the index of the given object's first occurrence. - If no startAt argument is given, the starting location to - search is 0. If it's negative, will count backward from - the end of the array. Returns -1 if no match is found. - - var arr = ["a", "b", "c", "d", "a"]; - arr.indexOf("a"); => 0 - arr.indexOf("z"); => -1 - arr.indexOf("a", 2); => 4 - arr.indexOf("a", -1); => 4 - arr.indexOf("b", 3); => -1 - arr.indexOf("a", 100); => -1 - - @param {Object} object the item to search for - @param {Number} startAt optional starting location to search, default 0 - @returns {Number} index or -1 if not found - */ - indexOf: function (object, startAt) { - var idx, len = get(this, 'length'); - - if (startAt === undefined) startAt = 0; - if (startAt < 0) startAt += len; - - for (idx = startAt; idx < len; idx++) { - if (this.objectAt(idx, true) === object) return idx; - } - return -1; - }, - - /** - Returns the index of the given object's last occurrence. - If no startAt argument is given, the search starts from - the last position. If it's negative, will count backward - from the end of the array. Returns -1 if no match is found. - - var arr = ["a", "b", "c", "d", "a"]; - arr.lastIndexOf("a"); => 4 - arr.lastIndexOf("z"); => -1 - arr.lastIndexOf("a", 2); => 0 - arr.lastIndexOf("a", -1); => 4 - arr.lastIndexOf("b", 3); => 1 - arr.lastIndexOf("a", 100); => 4 - - @param {Object} object the item to search for - @param {Number} startAt optional starting location to search, default 0 - @returns {Number} index or -1 if not found - */ - lastIndexOf: function (object, startAt) { - var idx, len = get(this, 'length'); - - if (startAt === undefined || startAt >= len) startAt = len - 1; - if (startAt < 0) startAt += len; - - for (idx = startAt; idx >= 0; idx--) { - if (this.objectAt(idx) === object) return idx; - } - return -1; - }, - - // .......................................................... - // ARRAY OBSERVERS - // - - /** - Adds an array observer to the receiving array. The array observer object - normally must implement two methods: - - * `arrayWillChange(start, removeCount, addCount)` - This method will be - called just before the array is modified. - * `arrayDidChange(start, removeCount, addCount)` - This method will be - called just after the array is modified. - - Both callbacks will be passed the starting index of the change as well a - a count of the items to be removed and added. You can use these callbacks - to optionally inspect the array during the change, clear caches, or do - any other bookkeeping necessary. - - In addition to passing a target, you can also include an options hash - which you can use to override the method names that will be invoked on the - target. - - @param {Object} target - The observer object. - - @param {Hash} opts - Optional hash of configuration options including willChange, didChange, - and a context option. - - @returns {Ember.Array} receiver - */ - addArrayObserver: function (target, opts) { - var willChange = (opts && opts.willChange) || 'arrayWillChange', - didChange = (opts && opts.didChange) || 'arrayDidChange'; - - var hasObservers = get(this, 'hasArrayObservers'); - if (!hasObservers) Ember.propertyWillChange(this, 'hasArrayObservers'); - Ember.addListener(this, '@array:before', target, willChange, xform); - Ember.addListener(this, '@array:change', target, didChange, xform); - if (!hasObservers) Ember.propertyDidChange(this, 'hasArrayObservers'); - return this; - }, - - /** - Removes an array observer from the object if the observer is current - registered. Calling this method multiple times with the same object will - have no effect. - - @param {Object} target - The object observing the array. - - @returns {Ember.Array} receiver - */ - removeArrayObserver: function (target, opts) { - var willChange = (opts && opts.willChange) || 'arrayWillChange', - didChange = (opts && opts.didChange) || 'arrayDidChange'; - - var hasObservers = get(this, 'hasArrayObservers'); - if (hasObservers) Ember.propertyWillChange(this, 'hasArrayObservers'); - Ember.removeListener(this, '@array:before', target, willChange, xform); - Ember.removeListener(this, '@array:change', target, didChange, xform); - if (hasObservers) Ember.propertyDidChange(this, 'hasArrayObservers'); - return this; - }, - - /** - Becomes true whenever the array currently has observers watching changes - on the array. - - @property {Boolean} - */ - hasArrayObservers: Ember.computed(function () { - return Ember.hasListeners(this, '@array:change') || Ember.hasListeners(this, '@array:before'); - }).property().cacheable(), - - /** - If you are implementing an object that supports Ember.Array, call this - method just before the array content changes to notify any observers and - invalidate any related properties. Pass the starting index of the change - as well as a delta of the amounts to change. - - @param {Number} startIdx - The starting index in the array that will change. - - @param {Number} removeAmt - The number of items that will be removed. If you pass null assumes 0 - - @param {Number} addAmt - The number of items that will be added. If you pass null assumes 0. - - @returns {Ember.Array} receiver - */ - arrayContentWillChange: function (startIdx, removeAmt, addAmt) { - - // if no args are passed assume everything changes - if (startIdx === undefined) { - startIdx = 0; - removeAmt = addAmt = -1; - } else { - if (!removeAmt) removeAmt = 0; - if (!addAmt) addAmt = 0; - } - - Ember.sendEvent(this, '@array:before', startIdx, removeAmt, addAmt); - - var removing, lim; - if (startIdx >= 0 && removeAmt >= 0 && get(this, 'hasEnumerableObservers')) { - removing = []; - lim = startIdx + removeAmt; - for (var idx = startIdx; idx < lim; idx++) removing.push(this.objectAt(idx)); - } else { - removing = removeAmt; - } - - this.enumerableContentWillChange(removing, addAmt); - - // Make sure the @each proxy is set up if anyone is observing @each - if (Ember.isWatching(this, '@each')) { - get(this, '@each'); - } - return this; - }, - - arrayContentDidChange: function (startIdx, removeAmt, addAmt) { - - // if no args are passed assume everything changes - if (startIdx === undefined) { - startIdx = 0; - removeAmt = addAmt = -1; - } else { - if (!removeAmt) removeAmt = 0; - if (!addAmt) addAmt = 0; - } - - var adding, lim; - if (startIdx >= 0 && addAmt >= 0 && get(this, 'hasEnumerableObservers')) { - adding = []; - lim = startIdx + addAmt; - for (var idx = startIdx; idx < lim; idx++) adding.push(this.objectAt(idx)); - } else { - adding = addAmt; - } - - this.enumerableContentDidChange(removeAmt, adding); - Ember.sendEvent(this, '@array:change', startIdx, removeAmt, addAmt); - return this; - }, - - // .......................................................... - // ENUMERATED PROPERTIES - // - - /** - Returns a special object that can be used to observe individual properties - on the array. Just get an equivalent property on this object and it will - return an enumerable that maps automatically to the named key on the - member objects. - */ - '@each': Ember.computed(function () { - if (!this.__each) this.__each = new Ember.EachProxy(this); - return this.__each; - }).property().cacheable() - - - - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /** - @namespace - - Implements some standard methods for comparing objects. Add this mixin to - any class you create that can compare its instances. - - You should implement the compare() method. - - @since Ember 0.9 - */ - Ember.Comparable = Ember.Mixin.create(/** @scope Ember.Comparable.prototype */{ - - /** - walk like a duck. Indicates that the object can be compared. - - @type Boolean - @default true - @constant - */ - isComparable: true, - - /** - Override to return the result of the comparison of the two parameters. The - compare method should return: - - - `-1` if `a < b` - - `0` if `a == b` - - `1` if `a > b` - - Default implementation raises an exception. - - @param a {Object} the first object to compare - @param b {Object} the second object to compare - @returns {Integer} the result of the comparison - */ - compare: Ember.required(Function) - - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2010 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - /** - @namespace - - Implements some standard methods for copying an object. Add this mixin to - any object you create that can create a copy of itself. This mixin is - added automatically to the built-in array. - - You should generally implement the copy() method to return a copy of the - receiver. - - Note that frozenCopy() will only work if you also implement Ember.Freezable. - - @since Ember 0.9 - */ - Ember.Copyable = Ember.Mixin.create( - /** @scope Ember.Copyable.prototype */ { - - /** - Override to return a copy of the receiver. Default implementation raises - an exception. - - @param deep {Boolean} if true, a deep copy of the object should be made - @returns {Object} copy of receiver - */ - copy: Ember.required(Function), - - /** - If the object implements Ember.Freezable, then this will return a new copy - if the object is not frozen and the receiver if the object is frozen. - - Raises an exception if you try to call this method on a object that does - not support freezing. - - You should use this method whenever you want a copy of a freezable object - since a freezable object can simply return itself without actually - consuming more memory. - - @returns {Object} copy of receiver or receiver - */ - frozenCopy: function () { - if (Ember.Freezable && Ember.Freezable.detect(this)) { - return get(this, 'isFrozen') ? this : this.copy().freeze(); - } else { - throw new Error(Ember.String.fmt("%@ does not support freezing", [this])); - } - } - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2010 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - - var get = Ember.get, set = Ember.set; - - /** - @namespace - - The Ember.Freezable mixin implements some basic methods for marking an object - as frozen. Once an object is frozen it should be read only. No changes - may be made the internal state of the object. - - ## Enforcement - - To fully support freezing in your subclass, you must include this mixin and - override any method that might alter any property on the object to instead - raise an exception. You can check the state of an object by checking the - isFrozen property. - - Although future versions of JavaScript may support language-level freezing - object objects, that is not the case today. Even if an object is freezable, - it is still technically possible to modify the object, even though it could - break other parts of your application that do not expect a frozen object to - change. It is, therefore, very important that you always respect the - isFrozen property on all freezable objects. - - ## Example Usage - - The example below shows a simple object that implement the Ember.Freezable - protocol. - - Contact = Ember.Object.extend(Ember.Freezable, { - - firstName: null, - - lastName: null, - - // swaps the names - swapNames: function() { - if (this.get('isFrozen')) throw Ember.FROZEN_ERROR; - var tmp = this.get('firstName'); - this.set('firstName', this.get('lastName')); - this.set('lastName', tmp); - return this; - } - - }); - - c = Context.create({ firstName: "John", lastName: "Doe" }); - c.swapNames(); => returns c - c.freeze(); - c.swapNames(); => EXCEPTION - - ## Copying - - Usually the Ember.Freezable protocol is implemented in cooperation with the - Ember.Copyable protocol, which defines a frozenCopy() method that will return - a frozen object, if the object implements this method as well. - - @since Ember 0.9 - */ - Ember.Freezable = Ember.Mixin.create( - /** @scope Ember.Freezable.prototype */ { - - /** - Set to true when the object is frozen. Use this property to detect whether - your object is frozen or not. - - @property {Boolean} - */ - isFrozen: false, - - /** - Freezes the object. Once this method has been called the object should - no longer allow any properties to be edited. - - @returns {Object} receiver - */ - freeze: function () { - if (get(this, 'isFrozen')) return this; - set(this, 'isFrozen', true); - return this; - } - - }); - - Ember.FROZEN_ERROR = "Frozen object cannot be modified."; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var forEach = Ember.ArrayUtils.forEach; - - /** - @class - - This mixin defines the API for modifying generic enumerables. These methods - can be applied to an object regardless of whether it is ordered or - unordered. - - Note that an Enumerable can change even if it does not implement this mixin. - For example, a MappedEnumerable cannot be directly modified but if its - underlying enumerable changes, it will change also. - - ## Adding Objects - - To add an object to an enumerable, use the addObject() method. This - method will only add the object to the enumerable if the object is not - already present and the object if of a type supported by the enumerable. - - set.addObject(contact); - - ## Removing Objects - - To remove an object form an enumerable, use the removeObject() method. This - will only remove the object if it is already in the enumerable, otherwise - this method has no effect. - - set.removeObject(contact); - - ## Implementing In Your Own Code - - If you are implementing an object and want to support this API, just include - this mixin in your class and implement the required methods. In your unit - tests, be sure to apply the Ember.MutableEnumerableTests to your object. - - @extends Ember.Mixin - @extends Ember.Enumerable - */ - Ember.MutableEnumerable = Ember.Mixin.create(Ember.Enumerable, - /** @scope Ember.MutableEnumerable.prototype */ { - - /** - __Required.__ You must implement this method to apply this mixin. - - Attempts to add the passed object to the receiver if the object is not - already present in the collection. If the object is present, this method - has no effect. - - If the passed object is of a type not supported by the receiver - then this method should raise an exception. - - @param {Object} object - The object to add to the enumerable. - - @returns {Object} the passed object - */ - addObject: Ember.required(Function), - - /** - Adds each object in the passed enumerable to the receiver. - - @param {Ember.Enumerable} objects the objects to add. - @returns {Object} receiver - */ - addObjects: function (objects) { - Ember.beginPropertyChanges(this); - forEach(objects, function (obj) { - this.addObject(obj); - }, this); - Ember.endPropertyChanges(this); - return this; - }, - - /** - __Required.__ You must implement this method to apply this mixin. - - Attempts to remove the passed object from the receiver collection if the - object is in present in the collection. If the object is not present, - this method has no effect. - - If the passed object is of a type not supported by the receiver - then this method should raise an exception. - - @param {Object} object - The object to remove from the enumerable. - - @returns {Object} the passed object - */ - removeObject: Ember.required(Function), - - - /** - Removes each objects in the passed enumerable from the receiver. - - @param {Ember.Enumerable} objects the objects to remove - @returns {Object} receiver - */ - removeObjects: function (objects) { - Ember.beginPropertyChanges(this); - forEach(objects, function (obj) { - this.removeObject(obj); - }, this); - Ember.endPropertyChanges(this); - return this; - } - - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== -// .......................................................... -// CONSTANTS -// - - var OUT_OF_RANGE_EXCEPTION = "Index out of range"; - var EMPTY = []; - -// .......................................................... -// HELPERS -// - - var get = Ember.get, set = Ember.set, forEach = Ember.ArrayUtils.forEach; - - /** - @class - - This mixin defines the API for modifying array-like objects. These methods - can be applied only to a collection that keeps its items in an ordered set. - - Note that an Array can change even if it does not implement this mixin. - For example, one might implement a SparseArray that cannot be directly - modified, but if its underlying enumerable changes, it will change also. - - @extends Ember.Mixin - @extends Ember.Array - @extends Ember.MutableEnumerable - */ - Ember.MutableArray = Ember.Mixin.create(Ember.Array, Ember.MutableEnumerable, - /** @scope Ember.MutableArray.prototype */ { - - /** - __Required.__ You must implement this method to apply this mixin. - - This is one of the primitives you must implement to support Ember.Array. You - should replace amt objects started at idx with the objects in the passed - array. You should also call this.enumerableContentDidChange() ; - - @param {Number} idx - Starting index in the array to replace. If idx >= length, then append - to the end of the array. - - @param {Number} amt - Number of elements that should be removed from the array, starting at - *idx*. - - @param {Array} objects - An array of zero or more objects that should be inserted into the array - at *idx* - */ - replace: Ember.required(), - - /** - Remove all elements from self. This is useful if you - want to reuse an existing array without having to recreate it. - - var colors = ["red", "green", "blue"]; - color.length(); => 3 - colors.clear(); => [] - colors.length(); => 0 - - @returns {Ember.Array} An empty Array. - */ - clear: function () { - var len = get(this, 'length'); - if (len === 0) return this; - this.replace(0, len, EMPTY); - return this; - }, - - /** - This will use the primitive replace() method to insert an object at the - specified index. - - var colors = ["red", "green", "blue"]; - colors.insertAt(2, "yellow"); => ["red", "green", "yellow", "blue"] - colors.insertAt(5, "orange"); => Error: Index out of range - - @param {Number} idx index of insert the object at. - @param {Object} object object to insert - */ - insertAt: function (idx, object) { - if (idx > get(this, 'length')) throw new Error(OUT_OF_RANGE_EXCEPTION); - this.replace(idx, 0, [object]); - return this; - }, - - /** - Remove an object at the specified index using the replace() primitive - method. You can pass either a single index, or a start and a length. - - If you pass a start and length that is beyond the - length this method will throw an Ember.OUT_OF_RANGE_EXCEPTION - - var colors = ["red", "green", "blue", "yellow", "orange"]; - colors.removeAt(0); => ["green", "blue", "yellow", "orange"] - colors.removeAt(2, 2); => ["green", "blue"] - colors.removeAt(4, 2); => Error: Index out of range - - @param {Number|Ember.IndexSet} start index, start of range, or index set - @param {Number} len length of passing range - @returns {Object} receiver - */ - removeAt: function (start, len) { - - var delta = 0; - - if ('number' === typeof start) { - - if ((start < 0) || (start >= get(this, 'length'))) { - throw new Error(OUT_OF_RANGE_EXCEPTION); - } - - // fast case - if (len === undefined) len = 1; - this.replace(start, len, EMPTY); - } - - return this; - }, - - /** - Push the object onto the end of the array. Works just like push() but it - is KVO-compliant. - - var colors = ["red", "green", "blue"]; - colors.pushObject("black"); => ["red", "green", "blue", "black"] - colors.pushObject(["yellow", "orange"]); => ["red", "green", "blue", "black", ["yellow", "orange"]] - - */ - pushObject: function (obj) { - this.insertAt(get(this, 'length'), obj); - return obj; - }, - - /** - Add the objects in the passed numerable to the end of the array. Defers - notifying observers of the change until all objects are added. - - var colors = ["red", "green", "blue"]; - colors.pushObjects("black"); => ["red", "green", "blue", "black"] - colors.pushObjects(["yellow", "orange"]); => ["red", "green", "blue", "black", "yellow", "orange"] - - @param {Ember.Enumerable} objects the objects to add - @returns {Ember.Array} receiver - */ - pushObjects: function (objects) { - this.replace(get(this, 'length'), 0, objects); - return this; - }, - - /** - Pop object from array or nil if none are left. Works just like pop() but - it is KVO-compliant. - - var colors = ["red", "green", "blue"]; - colors.popObject(); => "blue" - console.log(colors); => ["red", "green"] - - */ - popObject: function () { - var len = get(this, 'length'); - if (len === 0) return null; - - var ret = this.objectAt(len - 1); - this.removeAt(len - 1, 1); - return ret; - }, - - /** - Shift an object from start of array or nil if none are left. Works just - like shift() but it is KVO-compliant. - - var colors = ["red", "green", "blue"]; - colors.shiftObject(); => "red" - console.log(colors); => ["green", "blue"] - - */ - shiftObject: function () { - if (get(this, 'length') === 0) return null; - var ret = this.objectAt(0); - this.removeAt(0); - return ret; - }, - - /** - Unshift an object to start of array. Works just like unshift() but it is - KVO-compliant. - - var colors = ["red", "green", "blue"]; - colors.unshiftObject("yellow"); => ["yellow", "red", "green", "blue"] - colors.unshiftObject(["black", "white"]); => [["black", "white"], "yellow", "red", "green", "blue"] - - */ - unshiftObject: function (obj) { - this.insertAt(0, obj); - return obj; - }, - - /** - Adds the named objects to the beginning of the array. Defers notifying - observers until all objects have been added. - - var colors = ["red", "green", "blue"]; - colors.unshiftObjects(["black", "white"]); => ["black", "white", "red", "green", "blue"] - colors.unshiftObjects("yellow"); => Type Error: 'undefined' is not a function - - @param {Ember.Enumerable} objects the objects to add - @returns {Ember.Array} receiver - */ - unshiftObjects: function (objects) { - this.beginPropertyChanges(); - forEach(objects, function (obj) { - this.unshiftObject(obj); - }, this); - this.endPropertyChanges(); - return this; - }, - - // .......................................................... - // IMPLEMENT Ember.MutableEnumerable - // - - /** @private (nodoc) */ - removeObject: function (obj) { - var loc = get(this, 'length') || 0; - while (--loc >= 0) { - var curObject = this.objectAt(loc); - if (curObject === obj) this.removeAt(loc); - } - return this; - }, - - /** @private (nodoc) */ - addObject: function (obj) { - if (!this.contains(obj)) this.pushObject(obj); - return this; - } - - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - var get = Ember.get, set = Ember.set; - - /** - @class - - ## Overview - - This mixin provides properties and property observing functionality, core - features of the Ember object model. - - Properties and observers allow one object to observe changes to a - property on another object. This is one of the fundamental ways that - models, controllers and views communicate with each other in an Ember - application. - - Any object that has this mixin applied can be used in observer - operations. That includes Ember.Object and most objects you will - interact with as you write your Ember application. - - Note that you will not generally apply this mixin to classes yourself, - but you will use the features provided by this module frequently, so it - is important to understand how to use it. - - ## Using get() and set() - - Because of Ember's support for bindings and observers, you will always - access properties using the get method, and set properties using the - set method. This allows the observing objects to be notified and - computed properties to be handled properly. - - More documentation about `get` and `set` are below. - - ## Observing Property Changes - - You typically observe property changes simply by adding the `observes` - call to the end of your method declarations in classes that you write. - For example: - - Ember.Object.create({ - valueObserver: function() { - // Executes whenever the "value" property changes - }.observes('value') - }); - - Although this is the most common way to add an observer, this capability - is actually built into the Ember.Object class on top of two methods - defined in this mixin: `addObserver` and `removeObserver`. You can use - these two methods to add and remove observers yourself if you need to - do so at runtime. - - To add an observer for a property, call: - - object.addObserver('propertyKey', targetObject, targetAction) - - This will call the `targetAction` method on the `targetObject` to be called - whenever the value of the `propertyKey` changes. - - @extends Ember.Mixin - */ - Ember.Observable = Ember.Mixin.create(/** @scope Ember.Observable.prototype */ { - - /** @private - compatibility */ - isObserverable: true, - - /** - Retrieves the value of a property from the object. - - This method is usually similar to using object[keyName] or object.keyName, - however it supports both computed properties and the unknownProperty - handler. - - Because `get` unifies the syntax for accessing all these kinds - of properties, it can make many refactorings easier, such as replacing a - simple property with a computed property, or vice versa. - - ### Computed Properties - - Computed properties are methods defined with the `property` modifier - declared at the end, such as: - - fullName: function() { - return this.getEach('firstName', 'lastName').compact().join(' '); - }.property('firstName', 'lastName') - - When you call `get` on a computed property, the function will be - called and the return value will be returned instead of the function - itself. - - ### Unknown Properties - - Likewise, if you try to call `get` on a property whose value is - undefined, the unknownProperty() method will be called on the object. - If this method returns any value other than undefined, it will be returned - instead. This allows you to implement "virtual" properties that are - not defined upfront. - - @param {String} key The property to retrieve - @returns {Object} The property value or undefined. - */ - get: function (keyName) { - return get(this, keyName); - }, - - /** - To get multiple properties at once, call getProperties - with a list of strings or an array: - - record.getProperties('firstName', 'lastName', 'zipCode'); // => { firstName: 'John', lastName: 'Doe', zipCode: '10011' } - - is equivalent to: - - record.getProperties(['firstName', 'lastName', 'zipCode']); // => { firstName: 'John', lastName: 'Doe', zipCode: '10011' } - - @param {String...|Array} list of keys to get - @returns {Hash} - */ - getProperties: function () { - var ret = {}; - var propertyNames = arguments; - if (arguments.length === 1 && Ember.typeOf(arguments[0]) === 'array') { - propertyNames = arguments[0]; - } - for (var i = 0; i < propertyNames.length; i++) { - ret[propertyNames[i]] = get(this, propertyNames[i]); - } - return ret; - }, - - /** - Sets the key equal to value. - - This method is generally very similar to calling object[key] = value or - object.key = value, except that it provides support for computed - properties, the unknownProperty() method and property observers. - - ### Computed Properties - - If you try to set a value on a key that has a computed property handler - defined (see the get() method for an example), then set() will call - that method, passing both the value and key instead of simply changing - the value itself. This is useful for those times when you need to - implement a property that is composed of one or more member - properties. - - ### Unknown Properties - - If you try to set a value on a key that is undefined in the target - object, then the unknownProperty() handler will be called instead. This - gives you an opportunity to implement complex "virtual" properties that - are not predefined on the object. If unknownProperty() returns - undefined, then set() will simply set the value on the object. - - ### Property Observers - - In addition to changing the property, set() will also register a - property change with the object. Unless you have placed this call - inside of a beginPropertyChanges() and endPropertyChanges(), any "local" - observers (i.e. observer methods declared on the same object), will be - called immediately. Any "remote" observers (i.e. observer methods - declared on another object) will be placed in a queue and called at a - later time in a coalesced manner. - - ### Chaining - - In addition to property changes, set() returns the value of the object - itself so you can do chaining like this: - - record.set('firstName', 'Charles').set('lastName', 'Jolley'); - - @param {String} key The property to set - @param {Object} value The value to set or null. - @returns {Ember.Observable} - */ - set: function (keyName, value) { - set(this, keyName, value); - return this; - }, - - /** - To set multiple properties at once, call setProperties - with a Hash: - - record.setProperties({ firstName: 'Charles', lastName: 'Jolley' }); - - @param {Hash} hash the hash of keys and values to set - @returns {Ember.Observable} - */ - setProperties: function (hash) { - return Ember.setProperties(this, hash); - }, - - /** - Begins a grouping of property changes. - - You can use this method to group property changes so that notifications - will not be sent until the changes are finished. If you plan to make a - large number of changes to an object at one time, you should call this - method at the beginning of the changes to begin deferring change - notifications. When you are done making changes, call endPropertyChanges() - to deliver the deferred change notifications and end deferring. - - @returns {Ember.Observable} - */ - beginPropertyChanges: function () { - Ember.beginPropertyChanges(); - return this; - }, - - /** - Ends a grouping of property changes. - - You can use this method to group property changes so that notifications - will not be sent until the changes are finished. If you plan to make a - large number of changes to an object at one time, you should call - beginPropertyChanges() at the beginning of the changes to defer change - notifications. When you are done making changes, call this method to - deliver the deferred change notifications and end deferring. - - @returns {Ember.Observable} - */ - endPropertyChanges: function () { - Ember.endPropertyChanges(); - return this; - }, - - /** - Notify the observer system that a property is about to change. - - Sometimes you need to change a value directly or indirectly without - actually calling get() or set() on it. In this case, you can use this - method and propertyDidChange() instead. Calling these two methods - together will notify all observers that the property has potentially - changed value. - - Note that you must always call propertyWillChange and propertyDidChange as - a pair. If you do not, it may get the property change groups out of order - and cause notifications to be delivered more often than you would like. - - @param {String} key The property key that is about to change. - @returns {Ember.Observable} - */ - propertyWillChange: function (keyName) { - Ember.propertyWillChange(this, keyName); - return this; - }, - - /** - Notify the observer system that a property has just changed. - - Sometimes you need to change a value directly or indirectly without - actually calling get() or set() on it. In this case, you can use this - method and propertyWillChange() instead. Calling these two methods - together will notify all observers that the property has potentially - changed value. - - Note that you must always call propertyWillChange and propertyDidChange as - a pair. If you do not, it may get the property change groups out of order - and cause notifications to be delivered more often than you would like. - - @param {String} keyName The property key that has just changed. - @returns {Ember.Observable} - */ - propertyDidChange: function (keyName) { - Ember.propertyDidChange(this, keyName); - return this; - }, - - /** - Convenience method to call `propertyWillChange` and `propertyDidChange` in - succession. - - @param {String} keyName The property key to be notified about. - @returns {Ember.Observable} - */ - notifyPropertyChange: function (keyName) { - this.propertyWillChange(keyName); - this.propertyDidChange(keyName); - return this; - }, - - /** - Adds an observer on a property. - - This is the core method used to register an observer for a property. - - Once you call this method, anytime the key's value is set, your observer - will be notified. Note that the observers are triggered anytime the - value is set, regardless of whether it has actually changed. Your - observer should be prepared to handle that. - - You can also pass an optional context parameter to this method. The - context will be passed to your observer method whenever it is triggered. - Note that if you add the same target/method pair on a key multiple times - with different context parameters, your observer will only be called once - with the last context you passed. - - ### Observer Methods - - Observer methods you pass should generally have the following signature if - you do not pass a "context" parameter: - - fooDidChange: function(sender, key, value, rev); - - The sender is the object that changed. The key is the property that - changes. The value property is currently reserved and unused. The rev - is the last property revision of the object when it changed, which you can - use to detect if the key value has really changed or not. - - If you pass a "context" parameter, the context will be passed before the - revision like so: - - fooDidChange: function(sender, key, value, context, rev); - - Usually you will not need the value, context or revision parameters at - the end. In this case, it is common to write observer methods that take - only a sender and key value as parameters or, if you aren't interested in - any of these values, to write an observer that has no parameters at all. - - @param {String} key The key to observer - @param {Object} target The target object to invoke - @param {String|Function} method The method to invoke. - @returns {Ember.Object} self - */ - addObserver: function (key, target, method) { - Ember.addObserver(this, key, target, method); - }, - - /** - Remove an observer you have previously registered on this object. Pass - the same key, target, and method you passed to addObserver() and your - target will no longer receive notifications. - - @param {String} key The key to observer - @param {Object} target The target object to invoke - @param {String|Function} method The method to invoke. - @returns {Ember.Observable} receiver - */ - removeObserver: function (key, target, method) { - Ember.removeObserver(this, key, target, method); - }, - - /** - Returns true if the object currently has observers registered for a - particular key. You can use this method to potentially defer performing - an expensive action until someone begins observing a particular property - on the object. - - @param {String} key Key to check - @returns {Boolean} - */ - hasObserverFor: function (key) { - return Ember.hasListeners(this, key + ':change'); - }, - - /** - This method will be called when a client attempts to get the value of a - property that has not been defined in one of the typical ways. Override - this method to create "virtual" properties. - - @param {String} key The name of the unknown property that was requested. - @returns {Object} The property value or undefined. Default is undefined. - */ - unknownProperty: function (key) { - return undefined; - }, - - /** - This method will be called when a client attempts to set the value of a - property that has not been defined in one of the typical ways. Override - this method to create "virtual" properties. - - @param {String} key The name of the unknown property to be set. - @param {Object} value The value the unknown property is to be set to. - */ - setUnknownProperty: function (key, value) { - this[key] = value; - }, - - /** - This is like `get`, but allows you to pass in a dot-separated property - path. - - person.getPath('address.zip'); // return the zip - person.getPath('children.firstObject.age'); // return the first kid's age - - This reads much better than chained `get` calls. - - @param {String} path The property path to retrieve - @returns {Object} The property value or undefined. - */ - getPath: function (path) { - return Ember.getPath(this, path); - }, - - /** - This is like `set`, but allows you to specify the property you want to - set as a dot-separated property path. - - person.setPath('address.zip', 10011); // set the zip to 10011 - person.setPath('children.firstObject.age', 6); // set the first kid's age to 6 - - This is not as commonly used as `getPath`, but it can be useful. - - @param {String} path The path to the property that will be set - @param {Object} value The value to set or null. - @returns {Ember.Observable} - */ - setPath: function (path, value) { - Ember.setPath(this, path, value); - return this; - }, - - /** - Retrieves the value of a property, or a default value in the case that the property - returns undefined. - - person.getWithDefault('lastName', 'Doe'); - - @param {String} keyName The name of the property to retrieve - @param {Object} defaultValue The value to return if the property value is undefined - @returns {Object} The property value or the defaultValue. - */ - getWithDefault: function (keyName, defaultValue) { - return Ember.getWithDefault(this, keyName, defaultValue); - }, - - /** - Set the value of a property to the current value plus some amount. - - person.incrementProperty('age'); - team.incrementProperty('score', 2); - - @param {String} keyName The name of the property to increment - @param {Object} increment The amount to increment by. Defaults to 1 - @returns {Object} The new property value - */ - incrementProperty: function (keyName, increment) { - if (!increment) { - increment = 1; - } - set(this, keyName, (get(this, keyName) || 0) + increment); - return get(this, keyName); - }, - - /** - Set the value of a property to the current value minus some amount. - - player.decrementProperty('lives'); - orc.decrementProperty('health', 5); - - @param {String} keyName The name of the property to decrement - @param {Object} increment The amount to decrement by. Defaults to 1 - @returns {Object} The new property value - */ - decrementProperty: function (keyName, increment) { - if (!increment) { - increment = 1; - } - set(this, keyName, (get(this, keyName) || 0) - increment); - return get(this, keyName); - }, - - /** - Set the value of a boolean property to the opposite of it's - current value. - - starship.toggleProperty('warpDriveEnaged'); - - @param {String} keyName The name of the property to toggle - @returns {Object} The new property value - */ - toggleProperty: function (keyName) { - set(this, keyName, !get(this, keyName)); - return get(this, keyName); - }, - - /** - Returns the cached value of a computed property, if it exists. - This allows you to inspect the value of a computed property - without accidentally invoking it if it is intended to be - generated lazily. - - @param {String} keyName - @returns {Object} The cached value of the computed property, if any - */ - cacheFor: function (keyName) { - return Ember.cacheFor(this, keyName); - }, - - /** @private - intended for debugging purposes */ - observersForKey: function (keyName) { - return Ember.observersFor(this, keyName); - } - }); - - -})(); - - -(function () { - var get = Ember.get, set = Ember.set, getPath = Ember.getPath; - - Ember.TargetActionSupport = Ember.Mixin.create({ - target: null, - action: null, - - targetObject: Ember.computed(function () { - var target = get(this, 'target'); - - if (Ember.typeOf(target) === "string") { - // TODO: Remove the false when deprecation is done - var value = getPath(this, target, false); - if (value === undefined) { - value = getPath(window, target); - } - return value; - } else { - return target; - } - }).property('target').cacheable(), - - triggerAction: function () { - var action = get(this, 'action'), - target = get(this, 'targetObject'); - - if (target && action) { - var ret; - - if (typeof target.send === 'function') { - ret = target.send(action, this); - } else { - if (typeof action === 'string') { - action = target[action]; - } - ret = action.call(target, this); - } - if (ret !== false) ret = true; - - return ret; - } else { - return false; - } - } - }); - -})(); - - -(function () { - var get = Ember.get, set = Ember.set, a_slice = Array.prototype.slice; - - /** @private */ - function xform(target, method, params) { - var args = a_slice.call(params, 2); - method.apply(target, args); - } - - Ember.Evented = Ember.Mixin.create({ - on: function (name, target, method) { - if (!method) { - method = target; - target = null; - } - - Ember.addListener(this, name, target, method, xform); - }, - - fire: function (name) { - Ember.sendEvent.apply(null, [this, name].concat(a_slice.call(arguments, 1))); - }, - - off: function (name, target, method) { - Ember.removeListener(this, name, target, method); - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - -// NOTE: this object should never be included directly. Instead use Ember. -// Ember.Object. We only define this separately so that Ember.Set can depend on it - - - var rewatch = Ember.rewatch; - var classToString = Ember.Mixin.prototype.toString; - var set = Ember.set, get = Ember.get; - var o_create = Ember.platform.create, - o_defineProperty = Ember.platform.defineProperty, - a_slice = Array.prototype.slice, - meta = Ember.meta; - - /** @private */ - function makeCtor() { - - // Note: avoid accessing any properties on the object since it makes the - // method a lot faster. This is glue code so we want it to be as fast as - // possible. - - var wasApplied = false, initMixins, init = false, hasChains = false; - - var Class = function () { - if (!wasApplied) { - Class.proto(); - } // prepare prototype... - if (initMixins) { - this.reopen.apply(this, initMixins); - initMixins = null; - rewatch(this); // always rewatch just in case - this.init.apply(this, arguments); - } else { - if (hasChains) { - rewatch(this); - } else { - Ember.GUID_DESC.value = undefined; - o_defineProperty(this, Ember.GUID_KEY, Ember.GUID_DESC); - } - if (init === false) { - init = this.init; - } // cache for later instantiations - Ember.GUID_DESC.value = undefined; - o_defineProperty(this, '_super', Ember.GUID_DESC); - init.apply(this, arguments); - } - }; - - Class.toString = classToString; - Class.willReopen = function () { - if (wasApplied) { - Class.PrototypeMixin = Ember.Mixin.create(Class.PrototypeMixin); - } - - wasApplied = false; - }; - Class._initMixins = function (args) { - initMixins = args; - }; - - Class.proto = function () { - var superclass = Class.superclass; - if (superclass) { - superclass.proto(); - } - - if (!wasApplied) { - wasApplied = true; - Class.PrototypeMixin.applyPartial(Class.prototype); - Ember.rewatch(Class.prototype); // setup watch chains if needed. - hasChains = !!meta(Class.prototype, false).chains; // avoid rewatch - } - - return this.prototype; - }; - - return Class; - - } - - var CoreObject = makeCtor(); - - CoreObject.PrototypeMixin = Ember.Mixin.create( - /** @scope Ember.CoreObject */ { - - reopen: function () { - Ember.Mixin._apply(this, arguments, true); - return this; - }, - - isInstance: true, - - /** @private */ - init: function () { - }, - - /** @field */ - isDestroyed: false, - - /** @field */ - isDestroying: false, - - /** - Destroys an object by setting the isDestroyed flag and removing its - metadata, which effectively destroys observers and bindings. - - If you try to set a property on a destroyed object, an exception will be - raised. - - Note that destruction is scheduled for the end of the run loop and does not - happen immediately. - - @returns {Ember.Object} receiver - */ - destroy: function () { - if (this.isDestroying) { - return; - } - - this.isDestroying = true; - - if (this.willDestroy) { - this.willDestroy(); - } - - set(this, 'isDestroyed', true); - Ember.run.schedule('destroy', this, this._scheduledDestroy); - return this; - }, - - /** - Invoked by the run loop to actually destroy the object. This is - scheduled for execution by the `destroy` method. - - @private - */ - _scheduledDestroy: function () { - Ember.destroy(this); - if (this.didDestroy) { - this.didDestroy(); - } - }, - - bind: function (to, from) { - if (!(from instanceof Ember.Binding)) { - from = Ember.Binding.from(from); - } - from.to(to).connect(this); - return from; - }, - - toString: function () { - return '<' + this.constructor.toString() + ':' + Ember.guidFor(this) + '>'; - } - }); - - CoreObject.__super__ = null; - - var ClassMixin = Ember.Mixin.create({ - - ClassMixin: Ember.required(), - - PrototypeMixin: Ember.required(), - - isClass: true, - - isMethod: false, - - extend: function () { - var Class = makeCtor(), proto; - Class.ClassMixin = Ember.Mixin.create(this.ClassMixin); - Class.PrototypeMixin = Ember.Mixin.create(this.PrototypeMixin); - - Class.ClassMixin.ownerConstructor = Class; - Class.PrototypeMixin.ownerConstructor = Class; - - var PrototypeMixin = Class.PrototypeMixin; - PrototypeMixin.reopen.apply(PrototypeMixin, arguments); - - Class.superclass = this; - Class.__super__ = this.prototype; - - proto = Class.prototype = o_create(this.prototype); - proto.constructor = Class; - Ember.generateGuid(proto, 'ember'); - meta(proto).proto = proto; // this will disable observers on prototype - - - Class.subclasses = Ember.Set ? new Ember.Set() : null; - if (this.subclasses) { - this.subclasses.add(Class); - } - - Class.ClassMixin.apply(Class); - return Class; - }, - - create: function () { - var C = this; - if (arguments.length > 0) { - this._initMixins(arguments); - } - return new C(); - }, - - reopen: function () { - this.willReopen(); - var PrototypeMixin = this.PrototypeMixin; - PrototypeMixin.reopen.apply(PrototypeMixin, arguments); - return this; - }, - - reopenClass: function () { - var ClassMixin = this.ClassMixin; - ClassMixin.reopen.apply(ClassMixin, arguments); - Ember.Mixin._apply(this, arguments, false); - return this; - }, - - detect: function (obj) { - if ('function' !== typeof obj) { - return false; - } - while (obj) { - if (obj === this) { - return true; - } - obj = obj.superclass; - } - return false; - }, - - detectInstance: function (obj) { - return obj instanceof this; - }, - - /** - In some cases, you may want to annotate computed properties with additional - metadata about how they function or what values they operate on. For example, - computed property functions may close over variables that are then no longer - available for introspection. - - You can pass a hash of these values to a computed property like this: - - person: function() { - var personId = this.get('personId'); - return App.Person.create({ id: personId }); - }.property().meta({ type: App.Person }) - - Once you've done this, you can retrieve the values saved to the computed - property from your class like this: - - MyClass.metaForProperty('person'); - - This will return the original hash that was passed to `meta()`. - */ - metaForProperty: function (key) { - var desc = meta(this.proto(), false).descs[key]; - - ember_assert("metaForProperty() could not find a computed property with key '" + key + "'.", !!desc && desc instanceof Ember.ComputedProperty); - return desc._meta || {}; - }, - - /** - Iterate over each computed property for the class, passing its name - and any associated metadata (see `metaForProperty`) to the callback. - */ - eachComputedProperty: function (callback, binding) { - var proto = this.proto(), - descs = meta(proto).descs, - empty = {}, - property; - - for (var name in descs) { - property = descs[name]; - - if (property instanceof Ember.ComputedProperty) { - callback.call(binding || this, name, property._meta || empty); - } - } - } - - }); - - CoreObject.ClassMixin = ClassMixin; - ClassMixin.apply(CoreObject); - - /** - @class - */ - Ember.CoreObject = CoreObject; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set, guidFor = Ember.guidFor, none = Ember.none; - - /** - @class - - An unordered collection of objects. - - A Set works a bit like an array except that its items are not ordered. - You can create a set to efficiently test for membership for an object. You - can also iterate through a set just like an array, even accessing objects - by index, however there is no guarantee as to their order. - - Starting with Ember 2.0 all Sets are now observable since there is no - added cost to providing this support. Sets also do away with the more - specialized Set Observer API in favor of the more generic Enumerable - Observer API - which works on any enumerable object including both Sets and - Arrays. - - ## Creating a Set - - You can create a set like you would most objects using - `new Ember.Set()`. Most new sets you create will be empty, but you can - also initialize the set with some content by passing an array or other - enumerable of objects to the constructor. - - Finally, you can pass in an existing set and the set will be copied. You - can also create a copy of a set by calling `Ember.Set#copy()`. - - #js - // creates a new empty set - var foundNames = new Ember.Set(); - - // creates a set with four names in it. - var names = new Ember.Set(["Charles", "Tom", "Juan", "Alex"]); // :P - - // creates a copy of the names set. - var namesCopy = new Ember.Set(names); - - // same as above. - var anotherNamesCopy = names.copy(); - - ## Adding/Removing Objects - - You generally add or remove objects from a set using `add()` or - `remove()`. You can add any type of object including primitives such as - numbers, strings, and booleans. - - Unlike arrays, objects can only exist one time in a set. If you call `add()` - on a set with the same object multiple times, the object will only be added - once. Likewise, calling `remove()` with the same object multiple times will - remove the object the first time and have no effect on future calls until - you add the object to the set again. - - NOTE: You cannot add/remove null or undefined to a set. Any attempt to do so - will be ignored. - - In addition to add/remove you can also call `push()`/`pop()`. Push behaves - just like `add()` but `pop()`, unlike `remove()` will pick an arbitrary - object, remove it and return it. This is a good way to use a set as a job - queue when you don't care which order the jobs are executed in. - - ## Testing for an Object - - To test for an object's presence in a set you simply call - `Ember.Set#contains()`. - - ## Observing changes - - When using `Ember.Set`, you can add an enumerable observer to the set to - be notified of specific objects that are added and removed from the set. - See `Ember.Enumerable` for more information on enumerables. - - This is often unhelpful. If you are filtering sets of objects, for instance, - it is very inefficient to re-filter all of the items each time the set - changes. It would be better if you could just adjust the filtered set based - on what was changed on the original set. The same issue applies to merging - sets, as well. - - ## Other Methods - - `Ember.Set` primary implements other mixin APIs. For a complete reference - on the methods you will use with `Ember.Set`, please consult these mixins. - The most useful ones will be `Ember.Enumerable` and - `Ember.MutableEnumerable` which implement most of the common iterator - methods you are used to on Array. - - Note that you can also use the `Ember.Copyable` and `Ember.Freezable` - APIs on `Ember.Set` as well. Once a set is frozen it can no longer be - modified. The benefit of this is that when you call frozenCopy() on it, - Ember will avoid making copies of the set. This allows you to write - code that can know with certainty when the underlying set data will or - will not be modified. - - @extends Ember.Enumerable - @extends Ember.MutableEnumerable - @extends Ember.Copyable - @extends Ember.Freezable - - @since Ember 0.9 - */ - Ember.Set = Ember.CoreObject.extend(Ember.MutableEnumerable, Ember.Copyable, Ember.Freezable, - /** @scope Ember.Set.prototype */ { - - // .......................................................... - // IMPLEMENT ENUMERABLE APIS - // - - /** - This property will change as the number of objects in the set changes. - - @property Number - @default 0 - */ - length: 0, - - /** - Clears the set. This is useful if you want to reuse an existing set - without having to recreate it. - - var colors = new Ember.Set(["red", "green", "blue"]); - colors.length; => 3 - colors.clear(); - colors.length; => 0 - - @returns {Ember.Set} An empty Set - */ - clear: function () { - if (this.isFrozen) { - throw new Error(Ember.FROZEN_ERROR); - } - var len = get(this, 'length'); - var guid; - this.enumerableContentWillChange(len, 0); - for (var i = 0; i < len; i++) { - guid = guidFor(this[i]); - delete this[guid]; - delete this[i]; - } - set(this, 'length', 0); - this.enumerableContentDidChange(len, 0); - return this; - }, - - /** - Returns true if the passed object is also an enumerable that contains the - same objects as the receiver. - - var colors = ["red", "green", "blue"], - same_colors = new Ember.Set(colors); - same_colors.isEqual(colors); => true - same_colors.isEqual(["purple", "brown"]); => false - - @param {Ember.Set} obj the other object. - @returns {Boolean} - */ - isEqual: function (obj) { - // fail fast - if (!Ember.Enumerable.detect(obj)) return false; - - var loc = get(this, 'length'); - if (get(obj, 'length') !== loc) return false; - - while (--loc >= 0) { - if (!obj.contains(this[loc])) return false; - } - - return true; - }, - - /** - Adds an object to the set. Only non-null objects can be added to a set - and those can only be added once. If the object is already in the set or - the passed value is null this method will have no effect. - - This is an alias for `Ember.MutableEnumerable.addObject()`. - - var colors = new Ember.Set(); - colors.add("blue"); => ["blue"] - colors.add("blue"); => ["blue"] - colors.add("red"); => ["blue", "red"] - colors.add(null); => ["blue", "red"] - colors.add(undefined); => ["blue", "red"] - - @function - @param {Object} obj The object to add. - @returns {Ember.Set} The set itself. - */ - add: Ember.alias('addObject'), - - /** - Removes the object from the set if it is found. If you pass a null value - or an object that is already not in the set, this method will have no - effect. This is an alias for `Ember.MutableEnumerable.removeObject()`. - - var colors = new Ember.Set(["red", "green", "blue"]); - colors.remove("red"); => ["blue", "green"] - colors.remove("purple"); => ["blue", "green"] - colors.remove(null); => ["blue", "green"] - - @function - @param {Object} obj The object to remove - @returns {Ember.Set} The set itself. - */ - remove: Ember.alias('removeObject'), - - /** - Removes the last element from the set and returns it, or null if it's empty. - - var colors = new Ember.Set(["green", "blue"]); - colors.pop(); => "blue" - colors.pop(); => "green" - colors.pop(); => null - - @returns {Object} The removed object from the set or null. - */ - pop: function () { - if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR); - var obj = this.length > 0 ? this[this.length - 1] : null; - this.remove(obj); - return obj; - }, - - /** - Inserts the given object on to the end of the set. It returns - the set itself. - - This is an alias for `Ember.MutableEnumerable.addObject()`. - - var colors = new Ember.Set(); - colors.push("red"); => ["red"] - colors.push("green"); => ["red", "green"] - colors.push("blue"); => ["red", "green", "blue"] - - @function - @returns {Ember.Set} The set itself. - */ - push: Ember.alias('addObject'), - - /** - Removes the last element from the set and returns it, or null if it's empty. - - This is an alias for `Ember.Set.pop()`. - - var colors = new Ember.Set(["green", "blue"]); - colors.shift(); => "blue" - colors.shift(); => "green" - colors.shift(); => null - - @function - @returns {Object} The removed object from the set or null. - */ - shift: Ember.alias('pop'), - - /** - Inserts the given object on to the end of the set. It returns - the set itself. - - This is an alias of `Ember.Set.push()` - - var colors = new Ember.Set(); - colors.unshift("red"); => ["red"] - colors.unshift("green"); => ["red", "green"] - colors.unshift("blue"); => ["red", "green", "blue"] - - @function - @returns {Ember.Set} The set itself. - */ - unshift: Ember.alias('push'), - - /** - Adds each object in the passed enumerable to the set. - - This is an alias of `Ember.MutableEnumerable.addObjects()` - - var colors = new Ember.Set(); - colors.addEach(["red", "green", "blue"]); => ["red", "green", "blue"] - - @function - @param {Ember.Enumerable} objects the objects to add. - @returns {Ember.Set} The set itself. - */ - addEach: Ember.alias('addObjects'), - - /** - Removes each object in the passed enumerable to the set. - - This is an alias of `Ember.MutableEnumerable.removeObjects()` - - var colors = new Ember.Set(["red", "green", "blue"]); - colors.removeEach(["red", "blue"]); => ["green"] - - @function - @param {Ember.Enumerable} objects the objects to remove. - @returns {Ember.Set} The set itself. - */ - removeEach: Ember.alias('removeObjects'), - - // .......................................................... - // PRIVATE ENUMERABLE SUPPORT - // - - /** @private */ - init: function (items) { - this._super(); - if (items) this.addObjects(items); - }, - - /** @private (nodoc) - implement Ember.Enumerable */ - nextObject: function (idx) { - return this[idx]; - }, - - /** @private - more optimized version */ - firstObject: Ember.computed(function () { - return this.length > 0 ? this[0] : undefined; - }).property('[]').cacheable(), - - /** @private - more optimized version */ - lastObject: Ember.computed(function () { - return this.length > 0 ? this[this.length - 1] : undefined; - }).property('[]').cacheable(), - - /** @private (nodoc) - implements Ember.MutableEnumerable */ - addObject: function (obj) { - if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR); - if (none(obj)) return this; // nothing to do - - var guid = guidFor(obj), - idx = this[guid], - len = get(this, 'length'), - added; - - if (idx >= 0 && idx < len && (this[idx] === obj)) return this; // added - - added = [obj]; - this.enumerableContentWillChange(null, added); - len = get(this, 'length'); - this[guid] = len; - this[len] = obj; - set(this, 'length', len + 1); - this.enumerableContentDidChange(null, added); - - return this; - }, - - /** @private (nodoc) - implements Ember.MutableEnumerable */ - removeObject: function (obj) { - if (get(this, 'isFrozen')) throw new Error(Ember.FROZEN_ERROR); - if (none(obj)) return this; // nothing to do - - var guid = guidFor(obj), - idx = this[guid], - len = get(this, 'length'), - last, removed; - - - if (idx >= 0 && idx < len && (this[idx] === obj)) { - removed = [obj]; - - this.enumerableContentWillChange(removed, null); - - // swap items - basically move the item to the end so it can be removed - if (idx < len - 1) { - last = this[len - 1]; - this[idx] = last; - this[guidFor(last)] = idx; - } - - delete this[guid]; - delete this[len - 1]; - set(this, 'length', len - 1); - - this.enumerableContentDidChange(removed, null); - } - - return this; - }, - - /** @private (nodoc) - optimized version */ - contains: function (obj) { - return this[guidFor(obj)] >= 0; - }, - - /** @private (nodoc) */ - copy: function () { - var C = this.constructor, ret = new C(), loc = get(this, 'length'); - set(ret, 'length', loc); - while (--loc >= 0) { - ret[loc] = this[loc]; - ret[guidFor(this[loc])] = loc; - } - return ret; - }, - - /** @private */ - toString: function () { - var len = this.length, idx, array = []; - for (idx = 0; idx < len; idx++) { - array[idx] = this[idx]; - } - return "Ember.Set<%@>".fmt(array.join(',')); - }, - - // .......................................................... - // DEPRECATED - // - - /** @deprecated - - This property is often used to determine that a given object is a set. - Instead you should use instanceof: - - #js: - // SproutCore 1.x: - isSet = myobject && myobject.isSet; - - // Ember: - isSet = myobject instanceof Ember.Set - - @type Boolean - @default true - */ - isSet: true - - }); - -// Support the older API - var o_create = Ember.Set.create; - Ember.Set.create = function (items) { - if (items && Ember.Enumerable.detect(items)) { - ember_deprecate('Passing an enumerable to Ember.Set.create() is deprecated and will be removed in a future version of Ember. Use new Ember.Set(items) instead.'); - return new Ember.Set(items); - } else { - return o_create.apply(this, arguments); - } - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - Ember.CoreObject.subclasses = new Ember.Set(); - - /** - @class - @extends Ember.CoreObject - @extends Ember.Observable - */ - Ember.Object = Ember.CoreObject.extend(Ember.Observable); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var indexOf = Ember.ArrayUtils.indexOf; - - /** - @private - A Namespace is an object usually used to contain other objects or methods - such as an application or framework. Create a namespace anytime you want - to define one of these new containers. - - # Example Usage - - MyFramework = Ember.Namespace.create({ - VERSION: '1.0.0' - }); - - */ - Ember.Namespace = Ember.Object.extend({ - isNamespace: true, - - init: function () { - Ember.Namespace.NAMESPACES.push(this); - Ember.Namespace.PROCESSED = false; - }, - - toString: function () { - Ember.identifyNamespaces(); - return this[Ember.GUID_KEY + '_name']; - }, - - destroy: function () { - var namespaces = Ember.Namespace.NAMESPACES; - window[this.toString()] = undefined; - namespaces.splice(indexOf(namespaces, this), 1); - this._super(); - } - }); - - Ember.Namespace.NAMESPACES = [Ember]; - Ember.Namespace.PROCESSED = false; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /** - @private - - Defines a namespace that will contain an executable application. This is - very similar to a normal namespace except that it is expected to include at - least a 'ready' function which can be run to initialize the application. - - Currently Ember.Application is very similar to Ember.Namespace. However, this - class may be augmented by additional frameworks so it is important to use - this instance when building new applications. - - # Example Usage - - MyApp = Ember.Application.create({ - VERSION: '1.0.0', - store: Ember.Store.create().from(Ember.fixtures) - }); - - MyApp.ready = function() { - //..init code goes here... - } - - */ - Ember.Application = Ember.Namespace.extend(); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - /** - @class - - An ArrayProxy wraps any other object that implements Ember.Array and/or - Ember.MutableArray, forwarding all requests. This makes it very useful for - a number of binding use cases or other cases where being able to swap - out the underlying array is useful. - - A simple example of usage: - - var pets = ['dog', 'cat', 'fish']; - var arrayProxy = Ember.ArrayProxy.create({ content: Ember.A(pets) }); - ap.get('firstObject'); // => 'dog' - ap.set('content', ['amoeba', 'paramecium']); - ap.get('firstObject'); // => 'amoeba' - - This class can also be useful as a layer to transform the contents of - an array, as they are accessed. This can be done by overriding - `objectAtContent`: - - var pets = ['dog', 'cat', 'fish']; - var ap = Ember.ArrayProxy.create({ - content: Ember.A(pets), - objectAtContent: function(idx) { - return this.get('content').objectAt(idx).toUpperCase(); - } - }); - ap.get('firstObject'); // => 'DOG' - - - @extends Ember.Object - @extends Ember.Array - @extends Ember.MutableArray - */ - Ember.ArrayProxy = Ember.Object.extend(Ember.MutableArray, - /** @scope Ember.ArrayProxy.prototype */ { - - /** - The content array. Must be an object that implements Ember.Array and/or - Ember.MutableArray. - - @property {Ember.Array} - */ - content: null, - - /** - Should actually retrieve the object at the specified index from the - content. You can override this method in subclasses to transform the - content item to something new. - - This method will only be called if content is non-null. - - @param {Number} idx - The index to retrieve. - - @returns {Object} the value or undefined if none found - */ - objectAtContent: function (idx) { - return get(this, 'content').objectAt(idx); - }, - - /** - Should actually replace the specified objects on the content array. - You can override this method in subclasses to transform the content item - into something new. - - This method will only be called if content is non-null. - - @param {Number} idx - The starting index - - @param {Number} amt - The number of items to remove from the content. - - @param {Array} objects - Optional array of objects to insert or null if no objects. - - @returns {void} - */ - replaceContent: function (idx, amt, objects) { - get(this, 'content').replace(idx, amt, objects); - }, - - /** - Invoked when the content property is about to change. Notifies observers that the - entire array content will change. - */ - contentWillChange: Ember.beforeObserver(function () { - var content = get(this, 'content'), - len = content ? get(content, 'length') : 0; - this.arrayWillChange(content, 0, len, undefined); - if (content) content.removeArrayObserver(this); - }, 'content'), - - /** - Invoked when the content property changes. Notifies observers that the - entire array content has changed. - */ - contentDidChange: Ember.observer(function () { - var content = get(this, 'content'), - len = content ? get(content, 'length') : 0; - if (content) content.addArrayObserver(this); - this.arrayDidChange(content, 0, undefined, len); - }, 'content'), - - /** @private (nodoc) */ - objectAt: function (idx) { - return get(this, 'content') && this.objectAtContent(idx); - }, - - /** @private (nodoc) */ - length: Ember.computed(function () { - var content = get(this, 'content'); - return content ? get(content, 'length') : 0; - }).property('content.length').cacheable(), - - /** @private (nodoc) */ - replace: function (idx, amt, objects) { - if (get(this, 'content')) this.replaceContent(idx, amt, objects); - return this; - }, - - /** @private (nodoc) */ - arrayWillChange: function (item, idx, removedCnt, addedCnt) { - this.arrayContentWillChange(idx, removedCnt, addedCnt); - }, - - /** @private (nodoc) */ - arrayDidChange: function (item, idx, removedCnt, addedCnt) { - this.arrayContentDidChange(idx, removedCnt, addedCnt); - }, - - /** @private (nodoc) */ - init: function () { - this._super(); - this.contentDidChange(); - } - - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var set = Ember.set, get = Ember.get, guidFor = Ember.guidFor; - var forEach = Ember.ArrayUtils.forEach; - - var EachArray = Ember.Object.extend(Ember.Array, { - - init: function (content, keyName, owner) { - this._super(); - this._keyName = keyName; - this._owner = owner; - this._content = content; - }, - - objectAt: function (idx) { - var item = this._content.objectAt(idx); - return item && get(item, this._keyName); - }, - - length: Ember.computed(function () { - var content = this._content; - return content ? get(content, 'length') : 0; - }).property('[]').cacheable() - - }); - - var IS_OBSERVER = /^.+:(before|change)$/; - - /** @private */ - function addObserverForContentKey(content, keyName, proxy, idx, loc) { - var objects = proxy._objects, guid; - if (!objects) objects = proxy._objects = {}; - - while (--loc >= idx) { - var item = content.objectAt(loc); - if (item) { - Ember.addBeforeObserver(item, keyName, proxy, 'contentKeyWillChange'); - Ember.addObserver(item, keyName, proxy, 'contentKeyDidChange'); - - // keep track of the indicies each item was found at so we can map - // it back when the obj changes. - guid = guidFor(item); - if (!objects[guid]) objects[guid] = []; - objects[guid].push(loc); - } - } - } - - /** @private */ - function removeObserverForContentKey(content, keyName, proxy, idx, loc) { - var objects = proxy._objects; - if (!objects) objects = proxy._objects = {}; - var indicies, guid; - - while (--loc >= idx) { - var item = content.objectAt(loc); - if (item) { - Ember.removeBeforeObserver(item, keyName, proxy, 'contentKeyWillChange'); - Ember.removeObserver(item, keyName, proxy, 'contentKeyDidChange'); - - guid = guidFor(item); - indicies = objects[guid]; - indicies[indicies.indexOf(loc)] = null; - } - } - } - - /** - @private - @class - - This is the object instance returned when you get the @each property on an - array. It uses the unknownProperty handler to automatically create - EachArray instances for property names. - - @extends Ember.Object - */ - Ember.EachProxy = Ember.Object.extend({ - - init: function (content) { - this._super(); - this._content = content; - content.addArrayObserver(this); - - // in case someone is already observing some keys make sure they are - // added - forEach(Ember.watchedEvents(this), function (eventName) { - this.didAddListener(eventName); - }, this); - }, - - /** - You can directly access mapped properties by simply requesting them. - The unknownProperty handler will generate an EachArray of each item. - */ - unknownProperty: function (keyName, value) { - var ret; - ret = new EachArray(this._content, keyName, this); - new Ember.Descriptor().setup(this, keyName, ret); - this.beginObservingContentKey(keyName); - return ret; - }, - - // .......................................................... - // ARRAY CHANGES - // Invokes whenever the content array itself changes. - - arrayWillChange: function (content, idx, removedCnt, addedCnt) { - var keys = this._keys, key, array, lim; - - lim = removedCnt > 0 ? idx + removedCnt : -1; - Ember.beginPropertyChanges(this); - - for (key in keys) { - if (!keys.hasOwnProperty(key)) { - continue; - } - - if (lim > 0) removeObserverForContentKey(content, key, this, idx, lim); - - Ember.propertyWillChange(this, key); - } - - Ember.propertyWillChange(this._content, '@each'); - Ember.endPropertyChanges(this); - }, - - arrayDidChange: function (content, idx, removedCnt, addedCnt) { - var keys = this._keys, key, array, lim; - - lim = addedCnt > 0 ? idx + addedCnt : -1; - Ember.beginPropertyChanges(this); - - for (key in keys) { - if (!keys.hasOwnProperty(key)) { - continue; - } - - if (lim > 0) addObserverForContentKey(content, key, this, idx, lim); - - Ember.propertyDidChange(this, key); - } - - Ember.propertyDidChange(this._content, '@each'); - Ember.endPropertyChanges(this); - }, - - // .......................................................... - // LISTEN FOR NEW OBSERVERS AND OTHER EVENT LISTENERS - // Start monitoring keys based on who is listening... - - didAddListener: function (eventName) { - if (IS_OBSERVER.test(eventName)) { - this.beginObservingContentKey(eventName.slice(0, -7)); - } - }, - - didRemoveListener: function (eventName) { - if (IS_OBSERVER.test(eventName)) { - this.stopObservingContentKey(eventName.slice(0, -7)); - } - }, - - // .......................................................... - // CONTENT KEY OBSERVING - // Actual watch keys on the source content. - - beginObservingContentKey: function (keyName) { - var keys = this._keys; - if (!keys) keys = this._keys = {}; - if (!keys[keyName]) { - keys[keyName] = 1; - var content = this._content, - len = get(content, 'length'); - addObserverForContentKey(content, keyName, this, 0, len); - } else { - keys[keyName]++; - } - }, - - stopObservingContentKey: function (keyName) { - var keys = this._keys; - if (keys && (keys[keyName] > 0) && (--keys[keyName] <= 0)) { - var content = this._content, - len = get(content, 'length'); - removeObserverForContentKey(content, keyName, this, 0, len); - } - }, - - contentKeyWillChange: function (obj, keyName) { - Ember.propertyWillChange(this, keyName); - }, - - contentKeyDidChange: function (obj, keyName) { - Ember.propertyDidChange(this, keyName); - } - - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - -// Add Ember.Array to Array.prototype. Remove methods with native -// implementations and supply some more optimized versions of generic methods -// because they are so common. - var NativeArray = Ember.Mixin.create(Ember.MutableArray, Ember.Observable, Ember.Copyable, { - - // because length is a built-in property we need to know to just get the - // original property. - get: function (key) { - if (key === 'length') return this.length; - else if ('number' === typeof key) return this[key]; - else return this._super(key); - }, - - objectAt: function (idx) { - return this[idx]; - }, - - // primitive for array support. - replace: function (idx, amt, objects) { - - if (this.isFrozen) throw Ember.FROZEN_ERROR; - - // if we replaced exactly the same number of items, then pass only the - // replaced range. Otherwise, pass the full remaining array length - // since everything has shifted - var len = objects ? get(objects, 'length') : 0; - this.arrayContentWillChange(idx, amt, len); - - if (!objects || objects.length === 0) { - this.splice(idx, amt); - } else { - var args = [idx, amt].concat(objects); - this.splice.apply(this, args); - } - - this.arrayContentDidChange(idx, amt, len); - return this; - }, - - // If you ask for an unknown property, then try to collect the value - // from member items. - unknownProperty: function (key, value) { - var ret;// = this.reducedProperty(key, value) ; - if ((value !== undefined) && ret === undefined) { - ret = this[key] = value; - } - return ret; - }, - - // If browser did not implement indexOf natively, then override with - // specialized version - indexOf: function (object, startAt) { - var idx, len = this.length; - - if (startAt === undefined) startAt = 0; - else startAt = (startAt < 0) ? Math.ceil(startAt) : Math.floor(startAt); - if (startAt < 0) startAt += len; - - for (idx = startAt; idx < len; idx++) { - if (this[idx] === object) return idx; - } - return -1; - }, - - lastIndexOf: function (object, startAt) { - var idx, len = this.length; - - if (startAt === undefined) startAt = len - 1; - else startAt = (startAt < 0) ? Math.ceil(startAt) : Math.floor(startAt); - if (startAt < 0) startAt += len; - - for (idx = startAt; idx >= 0; idx--) { - if (this[idx] === object) return idx; - } - return -1; - }, - - copy: function () { - return this.slice(); - } - }); - -// Remove any methods implemented natively so we don't override them - var ignore = ['length']; - Ember.ArrayUtils.forEach(NativeArray.keys(), function (methodName) { - if (Array.prototype[methodName]) ignore.push(methodName); - }); - - if (ignore.length > 0) { - NativeArray = NativeArray.without.apply(NativeArray, ignore); - } - - /** - The NativeArray mixin contains the properties needed to to make the native - Array support Ember.MutableArray and all of its dependent APIs. Unless you - have Ember.EXTEND_PROTOTYPES set to false, this will be applied automatically. - Otherwise you can apply the mixin at anytime by calling - `Ember.NativeArray.activate`. - - @namespace - @extends Ember.MutableArray - @extends Ember.Array - @extends Ember.Enumerable - @extends Ember.MutableEnumerable - @extends Ember.Copyable - @extends Ember.Freezable - */ - Ember.NativeArray = NativeArray; - - /** - Creates an Ember.NativeArray from an Array like object. - Does not modify the original object. - - @returns {Ember.NativeArray} - */ - Ember.A = function (arr) { - if (arr === undefined) { - arr = []; - } - return Ember.NativeArray.apply(arr); - }; - - /** - Activates the mixin on the Array.prototype if not already applied. Calling - this method more than once is safe. - - @returns {void} - */ - Ember.NativeArray.activate = function () { - NativeArray.apply(Array.prototype); - - Ember.A = function (arr) { - return arr || []; - }; - }; - - if (Ember.EXTEND_PROTOTYPES) Ember.NativeArray.activate(); - - -})(); - - -(function () { - /** - JavaScript (before ES6) does not have a Map implementation. Objects, - which are often used as dictionaries, may only have Strings as keys. - - Because Ember has a way to get a unique identifier for every object - via `Ember.guidFor`, we can implement a performant Map with arbitrary - keys. Because it is commonly used in low-level bookkeeping, Map is - implemented as a pure JavaScript object for performance. - - This implementation follows the current iteration of the ES6 proposal - for maps (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets), - with two exceptions. First, because we need our implementation to be - pleasant on older browsers, we do not use the `delete` name (using - `remove` instead). Second, as we do not have the luxury of in-VM - iteration, we implement a forEach method for iteration. - - Map is mocked out to look like an Ember object, so you can do - `Ember.Map.create()` for symmetry with other Ember classes. - */ - - /** @private */ - var guidFor = Ember.guidFor; - var indexOf = Ember.ArrayUtils.indexOf; - -// This class is used internally by Ember.js and Ember Data. -// Please do not use it at this time. We plan to clean it up -// and add many tests soon. - var OrderedSet = Ember.OrderedSet = function () { - this.clear(); - }; - - OrderedSet.create = function () { - return new OrderedSet(); - }; - - OrderedSet.prototype = { - clear: function () { - this.presenceSet = {}; - this.list = []; - }, - - add: function (obj) { - var guid = guidFor(obj), - presenceSet = this.presenceSet, - list = this.list; - - if (guid in presenceSet) { - return; - } - - presenceSet[guid] = true; - list.push(obj); - }, - - remove: function (obj) { - var guid = guidFor(obj), - presenceSet = this.presenceSet, - list = this.list; - - delete presenceSet[guid]; - - var index = indexOf(list, obj); - if (index > -1) { - list.splice(index, 1); - } - }, - - isEmpty: function () { - return this.list.length === 0; - }, - - forEach: function (fn, self) { - // allow mutation during iteration - var list = this.list.slice(); - - for (var i = 0, j = list.length; i < j; i++) { - fn.call(self, list[i]); - } - }, - - toArray: function () { - return this.list.slice(); - } - }; - - /** - A Map stores values indexed by keys. Unlike JavaScript's - default Objects, the keys of a Map can be any JavaScript - object. - - Internally, a Map has two data structures: - - `keys`: an OrderedSet of all of the existing keys - `values`: a JavaScript Object indexed by the - Ember.guidFor(key) - - When a key/value pair is added for the first time, we - add the key to the `keys` OrderedSet, and create or - replace an entry in `values`. When an entry is deleted, - we delete its entry in `keys` and `values`. - */ - - /** @private */ - var Map = Ember.Map = function () { - this.keys = Ember.OrderedSet.create(); - this.values = {}; - }; - - Map.create = function () { - return new Map(); - }; - - Map.prototype = { - /** - Retrieve the value associated with a given key. - - @param {anything} key - @return {anything} the value associated with the key, or undefined - */ - get: function (key) { - var values = this.values, - guid = guidFor(key); - - return values[guid]; - }, - - /** - Adds a value to the map. If a value for the given key has already been - provided, the new value will replace the old value. - - @param {anything} key - @param {anything} value - */ - set: function (key, value) { - var keys = this.keys, - values = this.values, - guid = guidFor(key); - - keys.add(key); - values[guid] = value; - }, - - /** - Removes a value from the map for an associated key. - - @param {anything} key - @returns {Boolean} true if an item was removed, false otherwise - */ - remove: function (key) { - // don't use ES6 "delete" because it will be annoying - // to use in browsers that are not ES6 friendly; - var keys = this.keys, - values = this.values, - guid = guidFor(key), - value; - - if (values.hasOwnProperty(guid)) { - keys.remove(key); - value = values[guid]; - delete values[guid]; - return true; - } else { - return false; - } - }, - - /** - Check whether a key is present. - - @param {anything} key - @returns {Boolean} true if the item was present, false otherwise - */ - has: function (key) { - var values = this.values, - guid = guidFor(key); - - return values.hasOwnProperty(guid); - }, - - /** - Iterate over all the keys and values. Calls the function once - for each key, passing in the key and value, in that order. - - The keys are guaranteed to be iterated over in insertion order. - - @param {Function} callback - @param {anything} self if passed, the `this` value inside the - callback. By default, `this` is the map. - */ - forEach: function (callback, self) { - var keys = this.keys, - values = this.values; - - keys.forEach(function (key) { - var guid = guidFor(key); - callback.call(self, key, values[guid]); - }); - } - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /** - @class - - Ember.ArrayController provides a way for you to publish a collection of objects - so that you can easily bind to the collection from a Handlebars #each helper, - an Ember.CollectionView, or other controllers. - - The advantage of using an ArrayController is that you only have to set up - your view bindings once; to change what's displayed, simply swap out the - `content` property on the controller. - - For example, imagine you wanted to display a list of items fetched via an XHR - request. Create an Ember.ArrayController and set its `content` property: - - MyApp.listController = Ember.ArrayController.create(); - - $.get('people.json', function(data) { - MyApp.listController.set('content', data); - }); - - Then, create a view that binds to your new controller: - - {{#each MyApp.listController}} - {{firstName}} {{lastName}} - {{/each}} - - Although you are binding to the controller, the behavior of this controller - is to pass through any methods or properties to the underlying array. This - capability comes from `Ember.ArrayProxy`, which this class inherits from. - - Note: As of this writing, `ArrayController` does not add any functionality - to its superclass, `ArrayProxy`. The Ember team plans to add additional - controller-specific functionality in the future, e.g. single or multiple - selection support. If you are creating something that is conceptually a - controller, use this class. - - @extends Ember.ArrayProxy - */ - - Ember.ArrayController = Ember.ArrayProxy.extend(); - -})(); - - -(function () { - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Runtime -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - ember_assert("Ember requires jQuery 1.6 or 1.7", window.jQuery && window.jQuery().jquery.match(/^1\.[67](\.\d+)?(pre|rc\d?)?/)); - Ember.$ = window.jQuery; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - var get = Ember.get, set = Ember.set; - var forEach = Ember.ArrayUtils.forEach; - var indexOf = Ember.ArrayUtils.indexOf; - - /** @private */ - var ClassSet = function () { - this.seen = {}; - this.list = []; - }; - - ClassSet.prototype = { - add: function (string) { - if (string in this.seen) { - return; - } - this.seen[string] = true; - - this.list.push(string); - }, - - toDOM: function () { - return this.list.join(" "); - } - }; - - /** - @class - - Ember.RenderBuffer gathers information regarding the a view and generates the - final representation. Ember.RenderBuffer will generate HTML which can be pushed - to the DOM. - - @extends Ember.Object - */ - Ember.RenderBuffer = function (tagName) { - return new Ember._RenderBuffer(tagName); - }; - - Ember._RenderBuffer = function (tagName) { - this.elementTag = tagName; - this.childBuffers = []; - }; - - Ember._RenderBuffer.prototype = - /** @scope Ember.RenderBuffer.prototype */ { - - /** - Array of class-names which will be applied in the class="" attribute - - You should not maintain this array yourself, rather, you should use - the addClass() method of Ember.RenderBuffer. - - @type Array - @default [] - */ - elementClasses: null, - - /** - The id in of the element, to be applied in the id="" attribute - - You should not set this property yourself, rather, you should use - the id() method of Ember.RenderBuffer. - - @type String - @default null - */ - elementId: null, - - /** - A hash keyed on the name of the attribute and whose value will be - applied to that attribute. For example, if you wanted to apply a - data-view="Foo.bar" property to an element, you would set the - elementAttributes hash to {'data-view':'Foo.bar'} - - You should not maintain this hash yourself, rather, you should use - the attr() method of Ember.RenderBuffer. - - @type Hash - @default {} - */ - elementAttributes: null, - - /** - The tagname of the element an instance of Ember.RenderBuffer represents. - - Usually, this gets set as the first parameter to Ember.RenderBuffer. For - example, if you wanted to create a `p` tag, then you would call - - Ember.RenderBuffer('p') - - @type String - @default null - */ - elementTag: null, - - /** - A hash keyed on the name of the style attribute and whose value will - be applied to that attribute. For example, if you wanted to apply a - background-color:black;" style to an element, you would set the - elementStyle hash to {'background-color':'black'} - - You should not maintain this hash yourself, rather, you should use - the style() method of Ember.RenderBuffer. - - @type Hash - @default {} - */ - elementStyle: null, - - /** - Nested RenderBuffers will set this to their parent RenderBuffer - instance. - - @type Ember._RenderBuffer - */ - parentBuffer: null, - - /** - Adds a string of HTML to the RenderBuffer. - - @param {String} string HTML to push into the buffer - @returns {Ember.RenderBuffer} this - */ - push: function (string) { - this.childBuffers.push(String(string)); - return this; - }, - - /** - Adds a class to the buffer, which will be rendered to the class attribute. - - @param {String} className Class name to add to the buffer - @returns {Ember.RenderBuffer} this - */ - addClass: function (className) { - // lazily create elementClasses - var elementClasses = this.elementClasses = (this.elementClasses || new ClassSet()); - this.elementClasses.add(className); - - return this; - }, - - /** - Sets the elementID to be used for the element. - - @param {String} id - @returns {Ember.RenderBuffer} this - */ - id: function (id) { - this.elementId = id; - return this; - }, - - // duck type attribute functionality like jQuery so a render buffer - // can be used like a jQuery object in attribute binding scenarios. - - /** - Adds an attribute which will be rendered to the element. - - @param {String} name The name of the attribute - @param {String} value The value to add to the attribute - @returns {Ember.RenderBuffer|String} this or the current attribute value - */ - attr: function (name, value) { - var attributes = this.elementAttributes = (this.elementAttributes || {}); - - if (arguments.length === 1) { - return attributes[name]; - } else { - attributes[name] = value; - } - - return this; - }, - - /** - Remove an attribute from the list of attributes to render. - - @param {String} name The name of the attribute - @returns {Ember.RenderBuffer} this - */ - removeAttr: function (name) { - var attributes = this.elementAttributes; - if (attributes) { - delete attributes[name]; - } - - return this; - }, - - /** - Adds a style to the style attribute which will be rendered to the element. - - @param {String} name Name of the style - @param {String} value - @returns {Ember.RenderBuffer} this - */ - style: function (name, value) { - var style = this.elementStyle = (this.elementStyle || {}); - - this.elementStyle[name] = value; - return this; - }, - - /** - Create a new child render buffer from a parent buffer. Optionally set - additional properties on the buffer. Optionally invoke a callback - with the newly created buffer. - - This is a primitive method used by other public methods: `begin`, - `prepend`, `replaceWith`, `insertAfter`. - - @private - @param {String} tagName Tag name to use for the child buffer's element - @param {Ember._RenderBuffer} parent The parent render buffer that this - buffer should be appended to. - @param {Function} fn A callback to invoke with the newly created buffer. - @param {Object} other Additional properties to add to the newly created - buffer. - */ - newBuffer: function (tagName, parent, fn, other) { - var buffer = new Ember._RenderBuffer(tagName); - buffer.parentBuffer = parent; - - if (other) { - buffer.setProperties(other); - } - if (fn) { - fn.call(this, buffer); - } - - return buffer; - }, - - /** - Replace the current buffer with a new buffer. This is a primitive - used by `remove`, which passes `null` for `newBuffer`, and `replaceWith`, - which passes the new buffer it created. - - @private - @param {Ember._RenderBuffer} buffer The buffer to insert in place of - the existing buffer. - */ - replaceWithBuffer: function (newBuffer) { - var parent = this.parentBuffer; - if (!parent) { - return; - } - - var childBuffers = parent.childBuffers; - - var index = indexOf(childBuffers, this); - - if (newBuffer) { - childBuffers.splice(index, 1, newBuffer); - } else { - childBuffers.splice(index, 1); - } - }, - - /** - Creates a new Ember.RenderBuffer object with the provided tagName as - the element tag and with its parentBuffer property set to the current - Ember.RenderBuffer. - - @param {String} tagName Tag name to use for the child buffer's element - @returns {Ember.RenderBuffer} A new RenderBuffer object - */ - begin: function (tagName) { - return this.newBuffer(tagName, this, function (buffer) { - this.childBuffers.push(buffer); - }); - }, - - /** - Prepend a new child buffer to the current render buffer. - - @param {String} tagName Tag name to use for the child buffer's element - */ - prepend: function (tagName) { - return this.newBuffer(tagName, this, function (buffer) { - this.childBuffers.splice(0, 0, buffer); - }); - }, - - /** - Replace the current buffer with a new render buffer. - - @param {String} tagName Tag name to use for the new buffer's element - */ - replaceWith: function (tagName) { - var parentBuffer = this.parentBuffer; - - return this.newBuffer(tagName, parentBuffer, function (buffer) { - this.replaceWithBuffer(buffer); - }); - }, - - /** - Insert a new render buffer after the current render buffer. - - @param {String} tagName Tag name to use for the new buffer's element - */ - insertAfter: function (tagName) { - var parentBuffer = get(this, 'parentBuffer'); - - return this.newBuffer(tagName, parentBuffer, function (buffer) { - var siblings = parentBuffer.childBuffers; - var index = indexOf(siblings, this); - siblings.splice(index + 1, 0, buffer); - }); - }, - - /** - Closes the current buffer and adds its content to the parentBuffer. - - @returns {Ember.RenderBuffer} The parentBuffer, if one exists. Otherwise, this - */ - end: function () { - var parent = this.parentBuffer; - return parent || this; - }, - - remove: function () { - this.replaceWithBuffer(null); - }, - - /** - @returns {DOMElement} The element corresponding to the generated HTML - of this buffer - */ - element: function () { - return Ember.$(this.string())[0]; - }, - - /** - Generates the HTML content for this buffer. - - @returns {String} The generated HTMl - */ - string: function () { - var content = '', tag = this.elementTag, openTag; - - if (tag) { - var id = this.elementId, - classes = this.elementClasses, - attrs = this.elementAttributes, - style = this.elementStyle, - styleBuffer = '', prop; - - openTag = ["<" + tag]; - - if (id) { - openTag.push('id="' + this._escapeAttribute(id) + '"'); - } - if (classes) { - openTag.push('class="' + this._escapeAttribute(classes.toDOM()) + '"'); - } - - if (style) { - for (prop in style) { - if (style.hasOwnProperty(prop)) { - styleBuffer += (prop + ':' + this._escapeAttribute(style[prop]) + ';'); - } - } - - openTag.push('style="' + styleBuffer + '"'); - } - - if (attrs) { - for (prop in attrs) { - if (attrs.hasOwnProperty(prop)) { - openTag.push(prop + '="' + this._escapeAttribute(attrs[prop]) + '"'); - } - } - } - - openTag = openTag.join(" ") + '>'; - } - - var childBuffers = this.childBuffers; - - forEach(childBuffers, function (buffer) { - var stringy = typeof buffer === 'string'; - content += (stringy ? buffer : buffer.string()); - }); - - if (tag) { - return openTag + content + "</" + tag + ">"; - } else { - return content; - } - }, - - _escapeAttribute: function (value) { - // Stolen shamelessly from Handlebars - - var escape = { - "<": "<", - ">": ">", - '"': """, - "'": "'", - "`": "`" - }; - - var badChars = /&(?!\w+;)|[<>"'`]/g; - var possible = /[&<>"'`]/; - - var escapeChar = function (chr) { - return escape[chr] || "&"; - }; - - var string = value.toString(); - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt; - - /** - @ignore - - Ember.EventDispatcher handles delegating browser events to their corresponding - Ember.Views. For example, when you click on a view, Ember.EventDispatcher ensures - that that view's `mouseDown` method gets called. - */ - Ember.EventDispatcher = Ember.Object.extend( - /** @scope Ember.EventDispatcher.prototype */{ - - /** - @private - - The root DOM element to which event listeners should be attached. Event - listeners will be attached to the document unless this is overridden. - - Can be specified as a DOMElement or a selector string. - - The default body is a string since this may be evaluated before document.body - exists in the DOM. - - @type DOMElement - @default 'body' - */ - rootElement: 'body', - - /** - @private - - Sets up event listeners for standard browser events. - - This will be called after the browser sends a DOMContentReady event. By - default, it will set up all of the listeners on the document body. If you - would like to register the listeners on a different element, set the event - dispatcher's `root` property. - */ - setup: function (addedEvents) { - var event, events = { - touchstart: 'touchStart', - touchmove: 'touchMove', - touchend: 'touchEnd', - touchcancel: 'touchCancel', - keydown: 'keyDown', - keyup: 'keyUp', - keypress: 'keyPress', - mousedown: 'mouseDown', - mouseup: 'mouseUp', - contextmenu: 'contextMenu', - click: 'click', - dblclick: 'doubleClick', - mousemove: 'mouseMove', - focusin: 'focusIn', - focusout: 'focusOut', - mouseenter: 'mouseEnter', - mouseleave: 'mouseLeave', - submit: 'submit', - change: 'change', - dragstart: 'dragStart', - drag: 'drag', - dragenter: 'dragEnter', - dragleave: 'dragLeave', - dragover: 'dragOver', - drop: 'drop', - dragend: 'dragEnd' - }; - - Ember.$.extend(events, addedEvents || {}); - - var rootElement = Ember.$(get(this, 'rootElement')); - - ember_assert(fmt('You cannot use the same root element (%@) multiple times in an Ember.Application', [rootElement.selector || rootElement[0].tagName]), !rootElement.is('.ember-application')); - ember_assert('You cannot make a new Ember.Application using a root element that is a descendent of an existing Ember.Application', !rootElement.closest('.ember-application').length); - ember_assert('You cannot make a new Ember.Application using a root element that is an ancestor of an existing Ember.Application', !rootElement.find('.ember-application').length); - - rootElement.addClass('ember-application'); - - ember_assert('Unable to add "ember-application" class to rootElement. Make sure you set rootElement to the body or an element in the body.', rootElement.is('.ember-application')); - - for (event in events) { - if (events.hasOwnProperty(event)) { - this.setupHandler(rootElement, event, events[event]); - } - } - }, - - /** - @private - - Registers an event listener on the document. If the given event is - triggered, the provided event handler will be triggered on the target - view. - - If the target view does not implement the event handler, or if the handler - returns false, the parent view will be called. The event will continue to - bubble to each successive parent view until it reaches the top. - - For example, to have the `mouseDown` method called on the target view when - a `mousedown` event is received from the browser, do the following: - - setupHandler('mousedown', 'mouseDown'); - - @param {String} event the browser-originated event to listen to - @param {String} eventName the name of the method to call on the view - */ - setupHandler: function (rootElement, event, eventName) { - var self = this; - - rootElement.delegate('.ember-view', event + '.ember', function (evt, triggeringManager) { - - var view = Ember.View.views[this.id], - result = true, manager = null; - - manager = self._findNearestEventManager(view, eventName); - - if (manager && manager !== triggeringManager) { - result = self._dispatchEvent(manager, evt, eventName, view); - } else if (view) { - result = self._bubbleEvent(view, evt, eventName); - } else { - evt.stopPropagation(); - } - - return result; - }); - - rootElement.delegate('[data-ember-action]', event + '.ember', function (evt) { - var actionId = Ember.$(evt.currentTarget).attr('data-ember-action'), - action = Ember.Handlebars.ActionHelper.registeredActions[actionId], - handler = action.handler; - - if (action.eventName === eventName) { - return handler(evt); - } - }); - }, - - /** @private */ - _findNearestEventManager: function (view, eventName) { - var manager = null; - - while (view) { - manager = get(view, 'eventManager'); - if (manager && manager[eventName]) { - break; - } - - view = get(view, 'parentView'); - } - - return manager; - }, - - /** @private */ - _dispatchEvent: function (object, evt, eventName, view) { - var result = true; - - var handler = object[eventName]; - if (Ember.typeOf(handler) === 'function') { - result = handler.call(object, evt, view); - evt.stopPropagation(); - } - else { - result = this._bubbleEvent(view, evt, eventName); - } - - return result; - }, - - /** @private */ - _bubbleEvent: function (view, evt, eventName) { - return Ember.run(function () { - return view.handleEvent(eventName, evt); - }); - }, - - /** @private */ - destroy: function () { - var rootElement = get(this, 'rootElement'); - Ember.$(rootElement).undelegate('.ember').removeClass('ember-application'); - return this._super(); - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - /** - @class - - An Ember.Application instance serves as the namespace in which you define your - application's classes. You can also override the configuration of your - application. - - By default, Ember.Application will begin listening for events on the document. - If your application is embedded inside a page, instead of controlling the - entire document, you can specify which DOM element to attach to by setting - the `rootElement` property: - - MyApp = Ember.Application.create({ - rootElement: $('#my-app') - }); - - The root of an Ember.Application must not be removed during the course of the - page's lifetime. If you have only a single conceptual application for the - entire page, and are not embedding any third-party Ember applications - in your page, use the default document root for your application. - - You only need to specify the root if your page contains multiple instances - of Ember.Application. - - @extends Ember.Object - */ - Ember.Application = Ember.Namespace.extend( - /** @scope Ember.Application.prototype */{ - - /** - The root DOM element of the Application. - - Can be specified as DOMElement or a selector string. - - @type DOMElement - @default 'body' - */ - rootElement: 'body', - - /** - @type Ember.EventDispatcher - @default null - */ - eventDispatcher: null, - - /** - @type Object - @default null - */ - customEvents: null, - - /** @private */ - init: function () { - var eventDispatcher, - rootElement = get(this, 'rootElement'); - this._super(); - - eventDispatcher = Ember.EventDispatcher.create({ - rootElement: rootElement - }); - - set(this, 'eventDispatcher', eventDispatcher); - - // jQuery 1.7 doesn't call the ready callback if already ready - if (Ember.$.isReady) { - this.didBecomeReady(); - } else { - var self = this; - Ember.$(document).ready(function () { - self.didBecomeReady(); - }); - } - }, - - /** @private */ - didBecomeReady: function () { - var eventDispatcher = get(this, 'eventDispatcher'), - customEvents = get(this, 'customEvents'); - - eventDispatcher.setup(customEvents); - - this.ready(); - }, - - /** - Called when the Application has become ready. - The call will be delayed until the DOM has become ready. - */ - ready: Ember.K, - - /** @private */ - destroy: function () { - get(this, 'eventDispatcher').destroy(); - return this._super(); - } - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -// Add a new named queue for rendering views that happens -// after bindings have synced. - var queues = Ember.run.queues; - queues.splice(Ember.$.inArray('actions', queues) + 1, 0, 'render'); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals ember_assert */ - var get = Ember.get, set = Ember.set, addObserver = Ember.addObserver; - var getPath = Ember.getPath, meta = Ember.meta, fmt = Ember.String.fmt; - var a_slice = Array.prototype.slice; - var a_forEach = Ember.ArrayUtils.forEach; - - var childViewsProperty = Ember.computed(function () { - var childViews = get(this, '_childViews'); - - var ret = Ember.A(); - - a_forEach(childViews, function (view) { - if (view.isVirtual) { - ret.pushObjects(get(view, 'childViews')); - } else { - ret.push(view); - } - }); - - return ret; - }).property().cacheable(); - - /** - @static - - Global hash of shared templates. This will automatically be populated - by the build tools so that you can store your Handlebars templates in - separate files that get loaded into JavaScript at buildtime. - - @type Hash - */ - Ember.TEMPLATES = {}; - - var invokeForState = { - preRender: {}, - inBuffer: {}, - hasElement: {}, - inDOM: {}, - destroyed: {} - }; - - /** - @class - @since Ember 0.9 - @extends Ember.Object - */ - Ember.View = Ember.Object.extend(Ember.Evented, - /** @scope Ember.View.prototype */ { - - /** @private */ - concatenatedProperties: ['classNames', 'classNameBindings', 'attributeBindings'], - - /** - @type Boolean - @default true - @constant - */ - isView: true, - - // .......................................................... - // TEMPLATE SUPPORT - // - - /** - The name of the template to lookup if no template is provided. - - Ember.View will look for a template with this name in this view's - `templates` object. By default, this will be a global object - shared in `Ember.TEMPLATES`. - - @type String - @default null - */ - templateName: null, - - /** - The name of the layout to lookup if no layout is provided. - - Ember.View will look for a template with this name in this view's - `templates` object. By default, this will be a global object - shared in `Ember.TEMPLATES`. - - @type String - @default null - */ - layoutName: null, - - /** - The hash in which to look for `templateName`. - - @type Ember.Object - @default Ember.TEMPLATES - */ - templates: Ember.TEMPLATES, - - /** - The template used to render the view. This should be a function that - accepts an optional context parameter and returns a string of HTML that - will be inserted into the DOM relative to its parent view. - - In general, you should set the `templateName` property instead of setting - the template yourself. - - @field - @type Function - */ - template: Ember.computed(function (key, value) { - if (value !== undefined) { - return value; - } - - var templateName = get(this, 'templateName'), - template = this.templateForName(templateName, 'template'); - - return template || get(this, 'defaultTemplate'); - }).property('templateName').cacheable(), - - /** - The controller managing this view. If this property is set, it will be made - made available for use by the template. - - @type Object - */ - controller: null, - - /** - A view may contain a layout. A layout is a regular template but - supersedes the `template` property during rendering. It is the - responsibility of the layout template to retrieve the `template` - property from the view and render it in the correct location. - - This is useful for a view that has a shared wrapper, but which delegates - the rendering of the contents of the wrapper to the `template` property - on a subclass. - - @field - @type Function - */ - layout: Ember.computed(function (key, value) { - if (arguments.length === 2) { - return value; - } - - var layoutName = get(this, 'layoutName'), - layout = this.templateForName(layoutName, 'layout'); - - return layout || get(this, 'defaultLayout'); - }).property('layoutName').cacheable(), - - templateForName: function (name, type) { - if (!name) { - return; - } - - var templates = get(this, 'templates'), - template = get(templates, name); - - if (!template) { - throw new Ember.Error(fmt('%@ - Unable to find %@ "%@".', [this, type, name])); - } - - return template; - }, - - /** - The object from which templates should access properties. - - This object will be passed to the template function each time the render - method is called, but it is up to the individual function to decide what - to do with it. - - By default, this will be the view itself. - - @type Object - */ - templateContext: Ember.computed(function (key, value) { - if (arguments.length === 2) { - set(this, '_templateContext', value); - return value; - } else { - return get(this, '_templateContext'); - } - }).cacheable(), - - /** - @private - - Private copy of the view's template context. This can be set directly - by Handlebars without triggering the observer that causes the view - to be re-rendered. - */ - _templateContext: Ember.computed(function (key, value) { - if (arguments.length === 2) { - return value; - } else { - return this; - } - }).cacheable(), - - /** - If a value that affects template rendering changes, the view should be - re-rendered to reflect the new value. - - @private - */ - _displayPropertyDidChange: Ember.observer(function () { - this.rerender(); - }, 'templateContext', 'controller'), - - /** - If the view is currently inserted into the DOM of a parent view, this - property will point to the parent of the view. - - @type Ember.View - @default null - */ - _parentView: null, - - parentView: Ember.computed(function () { - var parent = get(this, '_parentView'); - - if (parent && parent.isVirtual) { - return get(parent, 'parentView'); - } else { - return parent; - } - }).property('_parentView').volatile(), - - // return the current view, not including virtual views - concreteView: Ember.computed(function () { - if (!this.isVirtual) { - return this; - } - else { - return get(this, 'parentView'); - } - }).property('_parentView').volatile(), - - /** - If false, the view will appear hidden in DOM. - - @type Boolean - @default null - */ - isVisible: true, - - /** - Array of child views. You should never edit this array directly. - Instead, use appendChild and removeFromParent. - - @private - @type Array - @default [] - */ - childViews: childViewsProperty, - - _childViews: [], - - /** - Return the nearest ancestor that is an instance of the provided - class. - - @param {Class} klass Subclass of Ember.View (or Ember.View itself) - @returns Ember.View - */ - nearestInstanceOf: function (klass) { - var view = get(this, 'parentView'); - - while (view) { - if (view instanceof klass) { - return view; - } - view = get(view, 'parentView'); - } - }, - - /** - Return the nearest ancestor that has a given property. - - @param {String} property A property name - @returns Ember.View - */ - nearestWithProperty: function (property) { - var view = get(this, 'parentView'); - - while (view) { - if (property in view) { - return view; - } - view = get(view, 'parentView'); - } - }, - - /** - Return the nearest ancestor that is a direct child of a - view of. - - @param {Class} klass Subclass of Ember.View (or Ember.View itself) - @returns Ember.View - */ - nearestChildOf: function (klass) { - var view = get(this, 'parentView'); - - while (view) { - if (get(view, 'parentView') instanceof klass) { - return view; - } - view = get(view, 'parentView'); - } - }, - - /** - Return the nearest ancestor that is an Ember.CollectionView - - @returns Ember.CollectionView - */ - collectionView: Ember.computed(function () { - return this.nearestInstanceOf(Ember.CollectionView); - }).cacheable(), - - /** - Return the nearest ancestor that is a direct child of - an Ember.CollectionView - - @returns Ember.View - */ - itemView: Ember.computed(function () { - return this.nearestChildOf(Ember.CollectionView); - }).cacheable(), - - /** - Return the nearest ancestor that has the property - `content`. - - @returns Ember.View - */ - contentView: Ember.computed(function () { - return this.nearestWithProperty('content'); - }).cacheable(), - - /** - @private - - When the parent view changes, recursively invalidate - collectionView, itemView, and contentView - */ - _parentViewDidChange: Ember.observer(function () { - if (this.isDestroying) { - return; - } - - this.invokeRecursively(function (view) { - view.propertyDidChange('collectionView'); - view.propertyDidChange('itemView'); - view.propertyDidChange('contentView'); - }); - }, '_parentView'), - - /** - Called on your view when it should push strings of HTML into a - Ember.RenderBuffer. Most users will want to override the `template` - or `templateName` properties instead of this method. - - By default, Ember.View will look for a function in the `template` - property and invoke it with the value of `templateContext`. The value of - `templateContext` will be the view itself unless you override it. - - @param {Ember.RenderBuffer} buffer The render buffer - */ - render: function (buffer) { - // If this view has a layout, it is the responsibility of the - // the layout to render the view's template. Otherwise, render the template - // directly. - var template = get(this, 'layout') || get(this, 'template'); - - if (template) { - var context = get(this, '_templateContext'), - templateData = this.get('templateData'), - controller = this.get('controller'); - - var data = { - view: this, - buffer: buffer, - isRenderData: true, - keywords: { - view: get(this, 'concreteView') - } - }; - - // If the view has a controller specified, make it available to the - // template. If not, pass along the parent template's controller, - // if it exists. - data.keywords.controller = controller || (templateData && templateData.keywords.controller); - - // Invoke the template with the provided template context, which - // is the view by default. A hash of data is also passed that provides - // the template with access to the view and render buffer. - - ember_assert('template must be a function. Did you mean to specify templateName instead?', typeof template === 'function'); - // The template should write directly to the render buffer instead - // of returning a string. - var output = template(context, { data: data }); - - // If the template returned a string instead of writing to the buffer, - // push the string onto the buffer. - if (output !== undefined) { - buffer.push(output); - } - } - }, - - invokeForState: function (name) { - var stateName = this.state, args; - - // try to find the function for the state in the cache - if (fn = invokeForState[stateName][name]) { - args = a_slice.call(arguments); - args[0] = this; - - return fn.apply(this, args); - } - - // otherwise, find and cache the function for this state - var parent = this, states = parent.states, state; - - while (states) { - state = states[stateName]; - - while (state) { - var fn = state[name]; - - if (fn) { - invokeForState[stateName][name] = fn; - - args = a_slice.call(arguments, 1); - args.unshift(this); - - return fn.apply(this, args); - } - - state = state.parentState; - } - - states = states.parent; - } - }, - - /** - Renders the view again. This will work regardless of whether the - view is already in the DOM or not. If the view is in the DOM, the - rendering process will be deferred to give bindings a chance - to synchronize. - - If children were added during the rendering process using `appendChild`, - `rerender` will remove them, because they will be added again - if needed by the next `render`. - - In general, if the display of your view changes, you should modify - the DOM element directly instead of manually calling `rerender`, which can - be slow. - */ - rerender: function () { - return this.invokeForState('rerender'); - }, - - clearRenderedChildren: function () { - var lengthBefore = this.lengthBeforeRender, - lengthAfter = this.lengthAfterRender; - - // If there were child views created during the last call to render(), - // remove them under the assumption that they will be re-created when - // we re-render. - - // VIEW-TODO: Unit test this path. - var childViews = get(this, '_childViews'); - for (var i = lengthAfter - 1; i >= lengthBefore; i--) { - if (childViews[i]) { - childViews[i].destroy(); - } - } - }, - - /** - @private - - Iterates over the view's `classNameBindings` array, inserts the value - of the specified property into the `classNames` array, then creates an - observer to update the view's element if the bound property ever changes - in the future. - */ - _applyClassNameBindings: function () { - var classBindings = get(this, 'classNameBindings'), - classNames = get(this, 'classNames'), - elem, newClass, dasherizedClass; - - if (!classBindings) { - return; - } - - // Loop through all of the configured bindings. These will be either - // property names ('isUrgent') or property paths relative to the view - // ('content.isUrgent') - a_forEach(classBindings, function (binding) { - - // Variable in which the old class value is saved. The observer function - // closes over this variable, so it knows which string to remove when - // the property changes. - var oldClass, property; - - // Set up an observer on the context. If the property changes, toggle the - // class name. - var observer = function () { - // Get the current value of the property - newClass = this._classStringForProperty(binding); - elem = this.$(); - - // If we had previously added a class to the element, remove it. - if (oldClass) { - elem.removeClass(oldClass); - // Also remove from classNames so that if the view gets rerendered, - // the class doesn't get added back to the DOM. - classNames.removeObject(oldClass); - } - - // If necessary, add a new class. Make sure we keep track of it so - // it can be removed in the future. - if (newClass) { - elem.addClass(newClass); - oldClass = newClass; - } else { - oldClass = null; - } - }; - - // Get the class name for the property at its current value - dasherizedClass = this._classStringForProperty(binding); - - if (dasherizedClass) { - // Ensure that it gets into the classNames array - // so it is displayed when we render. - classNames.push(dasherizedClass); - - // Save a reference to the class name so we can remove it - // if the observer fires. Remember that this variable has - // been closed over by the observer. - oldClass = dasherizedClass; - } - - // Extract just the property name from bindings like 'foo:bar' - property = binding.split(':')[0]; - addObserver(this, property, observer); - }, this); - }, - - /** - Iterates through the view's attribute bindings, sets up observers for each, - then applies the current value of the attributes to the passed render buffer. - - @param {Ember.RenderBuffer} buffer - */ - _applyAttributeBindings: function (buffer) { - var attributeBindings = get(this, 'attributeBindings'), - attributeValue, elem, type; - - if (!attributeBindings) { - return; - } - - a_forEach(attributeBindings, function (binding) { - var split = binding.split(':'), - property = split[0], - attributeName = split[1] || property; - - // Create an observer to add/remove/change the attribute if the - // JavaScript property changes. - var observer = function () { - elem = this.$(); - attributeValue = get(this, property); - - Ember.View.applyAttributeBindings(elem, attributeName, attributeValue); - }; - - addObserver(this, property, observer); - - // Determine the current value and add it to the render buffer - // if necessary. - attributeValue = get(this, property); - Ember.View.applyAttributeBindings(buffer, attributeName, attributeValue); - }, this); - }, - - /** - @private - - Given a property name, returns a dasherized version of that - property name if the property evaluates to a non-falsy value. - - For example, if the view has property `isUrgent` that evaluates to true, - passing `isUrgent` to this method will return `"is-urgent"`. - */ - _classStringForProperty: function (property) { - var split = property.split(':'), - className = split[1]; - - property = split[0]; - - // TODO: Remove this `false` when the `getPath` globals support is removed - var val = Ember.getPath(this, property, false); - if (val === undefined && Ember.isGlobalPath(property)) { - val = Ember.getPath(window, property); - } - - // If the value is truthy and we're using the colon syntax, - // we should return the className directly - if (!!val && className) { - return className; - - // If value is a Boolean and true, return the dasherized property - // name. - } else if (val === true) { - // Normalize property path to be suitable for use - // as a class name. For exaple, content.foo.barBaz - // becomes bar-baz. - var parts = property.split('.'); - return Ember.String.dasherize(parts[parts.length - 1]); - - // If the value is not false, undefined, or null, return the current - // value of the property. - } else if (val !== false && val !== undefined && val !== null) { - return val; - - // Nothing to display. Return null so that the old class is removed - // but no new class is added. - } else { - return null; - } - }, - - // .......................................................... - // ELEMENT SUPPORT - // - - /** - Returns the current DOM element for the view. - - @field - @type DOMElement - */ - element: Ember.computed(function (key, value) { - if (value !== undefined) { - return this.invokeForState('setElement', value); - } else { - return this.invokeForState('getElement'); - } - }).property('_parentView').cacheable(), - - /** - Returns a jQuery object for this view's element. If you pass in a selector - string, this method will return a jQuery object, using the current element - as its buffer. - - For example, calling `view.$('li')` will return a jQuery object containing - all of the `li` elements inside the DOM element of this view. - - @param {String} [selector] a jQuery-compatible selector string - @returns {Ember.CoreQuery} the CoreQuery object for the DOM node - */ - $: function (sel) { - return this.invokeForState('$', sel); - }, - - /** @private */ - mutateChildViews: function (callback) { - var childViews = get(this, '_childViews'), - idx = get(childViews, 'length'), - view; - - while (--idx >= 0) { - view = childViews[idx]; - callback.call(this, view, idx); - } - - return this; - }, - - /** @private */ - forEachChildView: function (callback) { - var childViews = get(this, '_childViews'); - - if (!childViews) { - return this; - } - - var len = get(childViews, 'length'), - view, idx; - - for (idx = 0; idx < len; idx++) { - view = childViews[idx]; - callback.call(this, view); - } - - return this; - }, - - /** - Appends the view's element to the specified parent element. - - If the view does not have an HTML representation yet, `createElement()` - will be called automatically. - - Note that this method just schedules the view to be appended; the DOM - element will not be appended to the given element until all bindings have - finished synchronizing. - - @param {String|DOMElement|jQuery} A selector, element, HTML string, or jQuery object - @returns {Ember.View} receiver - */ - appendTo: function (target) { - // Schedule the DOM element to be created and appended to the given - // element after bindings have synchronized. - this._insertElementLater(function () { - this.$().appendTo(target); - }); - - return this; - }, - - /** - Replaces the view's element to the specified parent element. - If the view does not have an HTML representation yet, `createElement()` - will be called automatically. - If the parent element already has some content, it will be removed. - - Note that this method just schedules the view to be appended; the DOM - element will not be appended to the given element until all bindings have - finished synchronizing - - @param {String|DOMElement|jQuery} A selector, element, HTML string, or jQuery object - @returns {Ember.View} received - */ - replaceIn: function (target) { - this._insertElementLater(function () { - Ember.$(target).empty(); - this.$().appendTo(target); - }); - - return this; - }, - - /** - @private - - Schedules a DOM operation to occur during the next render phase. This - ensures that all bindings have finished synchronizing before the view is - rendered. - - To use, pass a function that performs a DOM operation.. - - Before your function is called, this view and all child views will receive - the `willInsertElement` event. After your function is invoked, this view - and all of its child views will receive the `didInsertElement` event. - - view._insertElementLater(function() { - this.createElement(); - this.$().appendTo('body'); - }); - - @param {Function} fn the function that inserts the element into the DOM - */ - _insertElementLater: function (fn) { - this._lastInsert = Ember.guidFor(fn); - Ember.run.schedule('render', this, this.invokeForState, 'insertElement', fn); - }, - - /** - Appends the view's element to the document body. If the view does - not have an HTML representation yet, `createElement()` will be called - automatically. - - Note that this method just schedules the view to be appended; the DOM - element will not be appended to the document body until all bindings have - finished synchronizing. - - @returns {Ember.View} receiver - */ - append: function () { - return this.appendTo(document.body); - }, - - /** - Removes the view's element from the element to which it is attached. - - @returns {Ember.View} receiver - */ - remove: function () { - // What we should really do here is wait until the end of the run loop - // to determine if the element has been re-appended to a different - // element. - // In the interim, we will just re-render if that happens. It is more - // important than elements get garbage collected. - this.destroyElement(); - this.invokeRecursively(function (view) { - view.clearRenderedChildren(); - }); - }, - - /** - The ID to use when trying to locate the element in the DOM. If you do not - set the elementId explicitly, then the view's GUID will be used instead. - This ID must be set at the time the view is created. - - @type String - @readOnly - */ - elementId: Ember.computed(function (key, value) { - return value !== undefined ? value : Ember.guidFor(this); - }).cacheable(), - - /** @private */ - _elementIdDidChange: Ember.beforeObserver(function () { - throw "Changing a view's elementId after creation is not allowed."; - }, 'elementId'), - - /** - Attempts to discover the element in the parent element. The default - implementation looks for an element with an ID of elementId (or the view's - guid if elementId is null). You can override this method to provide your - own form of lookup. For example, if you want to discover your element - using a CSS class name instead of an ID. - - @param {DOMElement} parentElement The parent's DOM element - @returns {DOMElement} The discovered element - */ - findElementInParentElement: function (parentElem) { - var id = "#" + get(this, 'elementId'); - return Ember.$(id)[0] || Ember.$(id, parentElem)[0]; - }, - - /** - Creates a new renderBuffer with the passed tagName. You can override this - method to provide further customization to the buffer if needed. Normally - you will not need to call or override this method. - - @returns {Ember.RenderBuffer} - */ - renderBuffer: function (tagName) { - tagName = tagName || get(this, 'tagName'); - - // Explicitly check for null or undefined, as tagName - // may be an empty string, which would evaluate to false. - if (tagName === null || tagName === undefined) { - tagName = 'div'; - } - - return Ember.RenderBuffer(tagName); - }, - - /** - Creates a DOM representation of the view and all of its - child views by recursively calling the `render()` method. - - After the element has been created, `didInsertElement` will - be called on this view and all of its child views. - - @returns {Ember.View} receiver - */ - createElement: function () { - if (get(this, 'element')) { - return this; - } - - var buffer = this.renderToBuffer(); - set(this, 'element', buffer.element()); - - return this; - }, - - /** - Called when a view is going to insert an element into the DOM. - */ - willInsertElement: Ember.K, - - /** - Called when the element of the view has been inserted into the DOM. - Override this function to do any set up that requires an element in the - document body. - */ - didInsertElement: Ember.K, - - /** - Called when the view is about to rerender, but before anything has - been torn down. This is a good opportunity to tear down any manual - observers you have installed based on the DOM state - */ - willRerender: Ember.K, - - /** - Run this callback on the current view and recursively on child views. - - @private - */ - invokeRecursively: function (fn) { - fn.call(this, this); - - this.forEachChildView(function (view) { - view.invokeRecursively(fn); - }); - }, - - /** - Invalidates the cache for a property on all child views. - */ - invalidateRecursively: function (key) { - this.forEachChildView(function (view) { - view.propertyDidChange(key); - }); - }, - - /** - @private - - Invokes the receiver's willInsertElement() method if it exists and then - invokes the same on all child views. - - NOTE: In some cases this was called when the element existed. This no longer - works so we let people know. We can remove this warning code later. - */ - _notifyWillInsertElement: function (fromPreRender) { - this.invokeRecursively(function (view) { - if (fromPreRender) { - view._willInsertElementAccessUnsupported = true; - } - view.fire('willInsertElement'); - view._willInsertElementAccessUnsupported = false; - }); - }, - - /** - @private - - Invokes the receiver's didInsertElement() method if it exists and then - invokes the same on all child views. - */ - _notifyDidInsertElement: function () { - this.invokeRecursively(function (view) { - view.fire('didInsertElement'); - }); - }, - - /** - @private - - Invokes the receiver's willRerender() method if it exists and then - invokes the same on all child views. - */ - _notifyWillRerender: function () { - this.invokeRecursively(function (view) { - view.fire('willRerender'); - }); - }, - - /** - Destroys any existing element along with the element for any child views - as well. If the view does not currently have a element, then this method - will do nothing. - - If you implement willDestroyElement() on your view, then this method will - be invoked on your view before your element is destroyed to give you a - chance to clean up any event handlers, etc. - - If you write a willDestroyElement() handler, you can assume that your - didInsertElement() handler was called earlier for the same element. - - Normally you will not call or override this method yourself, but you may - want to implement the above callbacks when it is run. - - @returns {Ember.View} receiver - */ - destroyElement: function () { - return this.invokeForState('destroyElement'); - }, - - /** - Called when the element of the view is going to be destroyed. Override - this function to do any teardown that requires an element, like removing - event listeners. - */ - willDestroyElement: function () { - }, - - /** - @private - - Invokes the `willDestroyElement` callback on the view and child views. - */ - _notifyWillDestroyElement: function () { - this.invokeRecursively(function (view) { - view.fire('willDestroyElement'); - }); - }, - - /** @private (nodoc) */ - _elementWillChange: Ember.beforeObserver(function () { - this.forEachChildView(function (view) { - Ember.propertyWillChange(view, 'element'); - }); - }, 'element'), - - /** - @private - - If this view's element changes, we need to invalidate the caches of our - child views so that we do not retain references to DOM elements that are - no longer needed. - - @observes element - */ - _elementDidChange: Ember.observer(function () { - this.forEachChildView(function (view) { - Ember.propertyDidChange(view, 'element'); - }); - }, 'element'), - - /** - Called when the parentView property has changed. - - @function - */ - parentViewDidChange: Ember.K, - - /** - @private - - Invoked by the view system when this view needs to produce an HTML - representation. This method will create a new render buffer, if needed, - then apply any default attributes, such as class names and visibility. - Finally, the `render()` method is invoked, which is responsible for - doing the bulk of the rendering. - - You should not need to override this method; instead, implement the - `template` property, or if you need more control, override the `render` - method. - - @param {Ember.RenderBuffer} buffer the render buffer. If no buffer is - passed, a default buffer, using the current view's `tagName`, will - be used. - */ - renderToBuffer: function (parentBuffer, bufferOperation) { - var buffer; - - Ember.run.sync(); - - // Determine where in the parent buffer to start the new buffer. - // By default, a new buffer will be appended to the parent buffer. - // The buffer operation may be changed if the child views array is - // mutated by Ember.ContainerView. - bufferOperation = bufferOperation || 'begin'; - - // If this is the top-most view, start a new buffer. Otherwise, - // create a new buffer relative to the original using the - // provided buffer operation (for example, `insertAfter` will - // insert a new buffer after the "parent buffer"). - if (parentBuffer) { - var tagName = get(this, 'tagName'); - if (tagName === null || tagName === undefined) { - tagName = 'div'; - } - - buffer = parentBuffer[bufferOperation](tagName); - } else { - buffer = this.renderBuffer(); - } - - this.buffer = buffer; - this.transitionTo('inBuffer', false); - - this.lengthBeforeRender = get(get(this, '_childViews'), 'length'); - - this.beforeRender(buffer); - this.render(buffer); - this.afterRender(buffer); - - this.lengthAfterRender = get(get(this, '_childViews'), 'length'); - - return buffer; - }, - - beforeRender: function (buffer) { - this.applyAttributesToBuffer(buffer); - }, - - afterRender: Ember.K, - - /** - @private - */ - applyAttributesToBuffer: function (buffer) { - // Creates observers for all registered class name and attribute bindings, - // then adds them to the element. - this._applyClassNameBindings(); - - // Pass the render buffer so the method can apply attributes directly. - // This isn't needed for class name bindings because they use the - // existing classNames infrastructure. - this._applyAttributeBindings(buffer); - - - a_forEach(get(this, 'classNames'), function (name) { - buffer.addClass(name); - }); - buffer.id(get(this, 'elementId')); - - var role = get(this, 'ariaRole'); - if (role) { - buffer.attr('role', role); - } - - if (get(this, 'isVisible') === false) { - buffer.style('display', 'none'); - } - }, - - // .......................................................... - // STANDARD RENDER PROPERTIES - // - - /** - Tag name for the view's outer element. The tag name is only used when - an element is first created. If you change the tagName for an element, you - must destroy and recreate the view element. - - By default, the render buffer will use a `<div>` tag for views. - - @type String - @default null - */ - - // We leave this null by default so we can tell the difference between - // the default case and a user-specified tag. - tagName: null, - - /** - The WAI-ARIA role of the control represented by this view. For example, a - button may have a role of type 'button', or a pane may have a role of - type 'alertdialog'. This property is used by assistive software to help - visually challenged users navigate rich web applications. - - The full list of valid WAI-ARIA roles is available at: - http://www.w3.org/TR/wai-aria/roles#roles_categorization - - @type String - @default null - */ - ariaRole: null, - - /** - Standard CSS class names to apply to the view's outer element. This - property automatically inherits any class names defined by the view's - superclasses as well. - - @type Array - @default ['ember-view'] - */ - classNames: ['ember-view'], - - /** - A list of properties of the view to apply as class names. If the property - is a string value, the value of that string will be applied as a class - name. - - // Applies the 'high' class to the view element - Ember.View.create({ - classNameBindings: ['priority'] - priority: 'high' - }); - - If the value of the property is a Boolean, the name of that property is - added as a dasherized class name. - - // Applies the 'is-urgent' class to the view element - Ember.View.create({ - classNameBindings: ['isUrgent'] - isUrgent: true - }); - - If you would prefer to use a custom value instead of the dasherized - property name, you can pass a binding like this: - - // Applies the 'urgent' class to the view element - Ember.View.create({ - classNameBindings: ['isUrgent:urgent'] - isUrgent: true - }); - - This list of properties is inherited from the view's superclasses as well. - - @type Array - @default [] - */ - classNameBindings: [], - - /** - A list of properties of the view to apply as attributes. If the property is - a string value, the value of that string will be applied as the attribute. - - // Applies the type attribute to the element - // with the value "button", like <div type="button"> - Ember.View.create({ - attributeBindings: ['type'], - type: 'button' - }); - - If the value of the property is a Boolean, the name of that property is - added as an attribute. - - // Renders something like <div enabled="enabled"> - Ember.View.create({ - attributeBindings: ['enabled'], - enabled: true - }); - */ - attributeBindings: [], - - state: 'preRender', - - // ....................................................... - // CORE DISPLAY METHODS - // - - /** - @private - - Setup a view, but do not finish waking it up. - - configure childViews - - register the view with the global views hash, which is used for event - dispatch - */ - init: function () { - this._super(); - - // Register the view for event handling. This hash is used by - // Ember.RootResponder to dispatch incoming events. - Ember.View.views[get(this, 'elementId')] = this; - - var childViews = get(this, '_childViews').slice(); - - // setup child views. be sure to clone the child views array first - set(this, '_childViews', childViews); - - ember_assert("Only arrays are allowed for 'classNameBindings'", Ember.typeOf(this.classNameBindings) === 'array'); - this.classNameBindings = Ember.A(this.classNameBindings.slice()); - - ember_assert("Only arrays are allowed for 'classNames'", Ember.typeOf(this.classNames) === 'array'); - this.classNames = Ember.A(this.classNames.slice()); - - var viewController = get(this, 'viewController'); - if (viewController) { - viewController = Ember.getPath(viewController); - if (viewController) { - set(viewController, 'view', this); - } - } - }, - - appendChild: function (view, options) { - return this.invokeForState('appendChild', view, options); - }, - - /** - Removes the child view from the parent view. - - @param {Ember.View} view - @returns {Ember.View} receiver - */ - removeChild: function (view) { - // If we're destroying, the entire subtree will be - // freed, and the DOM will be handled separately, - // so no need to mess with childViews. - if (this.isDestroying) { - return; - } - - // update parent node - set(view, '_parentView', null); - - // remove view from childViews array. - var childViews = get(this, '_childViews'); - Ember.ArrayUtils.removeObject(childViews, view); - - this.propertyDidChange('childViews'); - - return this; - }, - - /** - Removes all children from the parentView. - - @returns {Ember.View} receiver - */ - removeAllChildren: function () { - return this.mutateChildViews(function (view) { - this.removeChild(view); - }); - }, - - destroyAllChildren: function () { - return this.mutateChildViews(function (view) { - view.destroy(); - }); - }, - - /** - Removes the view from its parentView, if one is found. Otherwise - does nothing. - - @returns {Ember.View} receiver - */ - removeFromParent: function () { - var parent = get(this, '_parentView'); - - // Remove DOM element from parent - this.remove(); - - if (parent) { - parent.removeChild(this); - } - return this; - }, - - /** - You must call `destroy` on a view to destroy the view (and all of its - child views). This will remove the view from any parent node, then make - sure that the DOM element managed by the view can be released by the - memory manager. - */ - willDestroy: function () { - // calling this._super() will nuke computed properties and observers, - // so collect any information we need before calling super. - var childViews = get(this, '_childViews'), - parent = get(this, '_parentView'), - elementId = get(this, 'elementId'), - childLen; - - // destroy the element -- this will avoid each child view destroying - // the element over and over again... - if (!this.removedFromDOM) { - this.destroyElement(); - } - - // remove from non-virtual parent view if viewName was specified - if (this.viewName) { - var nonVirtualParentView = get(this, 'parentView'); - if (nonVirtualParentView) { - set(nonVirtualParentView, this.viewName, null); - } - } - - // remove from parent if found. Don't call removeFromParent, - // as removeFromParent will try to remove the element from - // the DOM again. - if (parent) { - parent.removeChild(this); - } - - this.state = 'destroyed'; - - childLen = get(childViews, 'length'); - for (var i = childLen - 1; i >= 0; i--) { - childViews[i].removedFromDOM = true; - childViews[i].destroy(); - } - - // next remove view from global hash - delete Ember.View.views[get(this, 'elementId')]; - }, - - /** - Instantiates a view to be added to the childViews array during view - initialization. You generally will not call this method directly unless - you are overriding createChildViews(). Note that this method will - automatically configure the correct settings on the new view instance to - act as a child of the parent. - - @param {Class} viewClass - @param {Hash} [attrs] Attributes to add - @returns {Ember.View} new instance - @test in createChildViews - */ - createChildView: function (view, attrs) { - var coreAttrs; - - if (Ember.View.detect(view)) { - coreAttrs = { _parentView: this }; - if (attrs) { - view = view.create(coreAttrs, attrs); - } else { - view = view.create(coreAttrs); - } - - var viewName = view.viewName; - - // don't set the property on a virtual view, as they are invisible to - // consumers of the view API - if (viewName) { - set(get(this, 'concreteView'), viewName, view); - } - } else { - ember_assert('must pass instance of View', view instanceof Ember.View); - set(view, '_parentView', this); - } - - return view; - }, - - becameVisible: Ember.K, - becameHidden: Ember.K, - - /** - @private - - When the view's `isVisible` property changes, toggle the visibility - element of the actual DOM element. - */ - _isVisibleDidChange: Ember.observer(function () { - var isVisible = get(this, 'isVisible'); - - this.$().toggle(isVisible); - - if (this._isAncestorHidden()) { - return; - } - - if (isVisible) { - this._notifyBecameVisible(); - } else { - this._notifyBecameHidden(); - } - }, 'isVisible'), - - _notifyBecameVisible: function () { - this.fire('becameVisible'); - - this.forEachChildView(function (view) { - var isVisible = get(view, 'isVisible'); - - if (isVisible || isVisible === null) { - view._notifyBecameVisible(); - } - }); - }, - - _notifyBecameHidden: function () { - this.fire('becameHidden'); - this.forEachChildView(function (view) { - var isVisible = get(view, 'isVisible'); - - if (isVisible || isVisible === null) { - view._notifyBecameHidden(); - } - }); - }, - - _isAncestorHidden: function () { - var parent = get(this, 'parentView'); - - while (parent) { - if (get(parent, 'isVisible') === false) { - return true; - } - - parent = get(parent, 'parentView'); - } - - return false; - }, - - clearBuffer: function () { - this.invokeRecursively(function (view) { - this.buffer = null; - }); - }, - - transitionTo: function (state, children) { - this.state = state; - - if (children !== false) { - this.forEachChildView(function (view) { - view.transitionTo(state); - }); - } - }, - - /** - @private - - Override the default event firing from Ember.Evented to - also call methods with the given name. - */ - fire: function (name) { - if (this[name]) { - this[name].apply(this, [].slice.call(arguments, 1)); - } - this._super.apply(this, arguments); - }, - - // ....................................................... - // EVENT HANDLING - // - - /** - @private - - Handle events from `Ember.EventDispatcher` - */ - handleEvent: function (eventName, evt) { - return this.invokeForState('handleEvent', eventName, evt); - } - - }); - - /** - Describe how the specified actions should behave in the various - states that a view can exist in. Possible states: - - * preRender: when a view is first instantiated, and after its - element was destroyed, it is in the preRender state - * inBuffer: once a view has been rendered, but before it has - been inserted into the DOM, it is in the inBuffer state - * inDOM: once a view has been inserted into the DOM it is in - the inDOM state. A view spends the vast majority of its - existence in this state. - * destroyed: once a view has been destroyed (using the destroy - method), it is in this state. No further actions can be invoked - on a destroyed view. - */ - - // in the destroyed state, everything is illegal - - // before rendering has begun, all legal manipulations are noops. - - // inside the buffer, legal manipulations are done on the buffer - - // once the view has been inserted into the DOM, legal manipulations - // are done on the DOM element. - - /** @private */ - var DOMManager = { - prepend: function (view, childView) { - childView._insertElementLater(function () { - var element = view.$(); - element.prepend(childView.$()); - }); - }, - - after: function (view, nextView) { - nextView._insertElementLater(function () { - var element = view.$(); - element.after(nextView.$()); - }); - }, - - replace: function (view) { - var element = get(view, 'element'); - - set(view, 'element', null); - - view._insertElementLater(function () { - Ember.$(element).replaceWith(get(view, 'element')); - }); - }, - - remove: function (view) { - var elem = get(view, 'element'); - - set(view, 'element', null); - view._lastInsert = null; - - Ember.$(elem).remove(); - }, - - empty: function (view) { - view.$().empty(); - } - }; - - Ember.View.reopen({ - states: Ember.View.states, - domManager: DOMManager - }); - -// Create a global view hash. - Ember.View.views = {}; - -// If someone overrides the child views computed property when -// defining their class, we want to be able to process the user's -// supplied childViews and then restore the original computed property -// at view initialization time. This happens in Ember.ContainerView's init -// method. - Ember.View.childViewsProperty = childViewsProperty; - - Ember.View.applyAttributeBindings = function (elem, name, value) { - var type = Ember.typeOf(value); - var currentValue = elem.attr(name); - - // if this changes, also change the logic in ember-handlebars/lib/helpers/binding.js - if ((type === 'string' || (type === 'number' && !isNaN(value))) && value !== currentValue) { - elem.attr(name, value); - } else if (value && type === 'boolean') { - elem.attr(name, name); - } else if (!value) { - elem.removeAttr(name); - } - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - Ember.View.states = { - _default: { - // appendChild is only legal while rendering the buffer. - appendChild: function () { - throw "You can't use appendChild outside of the rendering process"; - }, - - $: function () { - return Ember.$(); - }, - - getElement: function () { - return null; - }, - - // Handle events from `Ember.EventDispatcher` - handleEvent: function () { - return true; // continue event propagation - }, - - destroyElement: function (view) { - set(view, 'element', null); - view._lastInsert = null; - return view; - } - } - }; - - Ember.View.reopen({ - states: Ember.View.states - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - Ember.View.states.preRender = { - parentState: Ember.View.states._default, - - // a view leaves the preRender state once its element has been - // created (createElement). - insertElement: function (view, fn) { - if (view._lastInsert !== Ember.guidFor(fn)) { - return; - } - view.createElement(); - view._notifyWillInsertElement(true); - // after createElement, the view will be in the hasElement state. - fn.call(view); - view.transitionTo('inDOM'); - view._notifyDidInsertElement(); - }, - - // This exists for the removal warning, remove later - $: function (view) { - if (view._willInsertElementAccessUnsupported) { - console.error("Getting element from willInsertElement is unreliable and no longer supported."); - } - return Ember.$(); - }, - - empty: Ember.K, - - // This exists for the removal warning, remove later - getElement: function (view) { - if (view._willInsertElementAccessUnsupported) { - console.error("Getting element from willInsertElement is unreliable and no longer supported."); - } - return null; - }, - - setElement: function (view, value) { - view.beginPropertyChanges(); - view.invalidateRecursively('element'); - - if (value !== null) { - view.transitionTo('hasElement'); - } - - view.endPropertyChanges(); - - return value; - } - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set, meta = Ember.meta; - - Ember.View.states.inBuffer = { - parentState: Ember.View.states._default, - - $: function (view, sel) { - // if we don't have an element yet, someone calling this.$() is - // trying to update an element that isn't in the DOM. Instead, - // rerender the view to allow the render method to reflect the - // changes. - view.rerender(); - return Ember.$(); - }, - - // when a view is rendered in a buffer, rerendering it simply - // replaces the existing buffer with a new one - rerender: function (view) { - ember_deprecate("Something you did caused a view to re-render after it rendered but before it was inserted into the DOM. Because this is avoidable and the cause of significant performance issues in applications, this behavior is deprecated. If you want to use the debugger to find out what caused this, you can set ENV.RAISE_ON_DEPRECATION to true."); - - view._notifyWillRerender(); - - view.clearRenderedChildren(); - view.renderToBuffer(view.buffer, 'replaceWith'); - }, - - // when a view is rendered in a buffer, appending a child - // view will render that view and append the resulting - // buffer into its buffer. - appendChild: function (view, childView, options) { - var buffer = view.buffer; - - childView = this.createChildView(childView, options); - get(view, '_childViews').push(childView); - - childView.renderToBuffer(buffer); - - view.propertyDidChange('childViews'); - - return childView; - }, - - // when a view is rendered in a buffer, destroying the - // element will simply destroy the buffer and put the - // state back into the preRender state. - destroyElement: function (view) { - view.clearBuffer(); - view._notifyWillDestroyElement(); - view.transitionTo('preRender'); - - return view; - }, - - empty: function () { - throw "EWOT"; - }, - - // It should be impossible for a rendered view to be scheduled for - // insertion. - insertElement: function () { - throw "You can't insert an element that has already been rendered"; - }, - - setElement: function (view, value) { - view.invalidateRecursively('element'); - - if (value === null) { - view.transitionTo('preRender'); - } else { - view.clearBuffer(); - view.transitionTo('hasElement'); - } - - return value; - } - }; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set, meta = Ember.meta; - - Ember.View.states.hasElement = { - parentState: Ember.View.states._default, - - $: function (view, sel) { - var elem = get(view, 'element'); - return sel ? Ember.$(sel, elem) : Ember.$(elem); - }, - - getElement: function (view) { - var parent = get(view, 'parentView'); - if (parent) { - parent = get(parent, 'element'); - } - if (parent) { - return view.findElementInParentElement(parent); - } - return Ember.$("#" + get(view, 'elementId'))[0]; - }, - - setElement: function (view, value) { - if (value === null) { - view.invalidateRecursively('element'); - - view.transitionTo('preRender'); - } else { - throw "You cannot set an element to a non-null value when the element is already in the DOM."; - } - - return value; - }, - - // once the view has been inserted into the DOM, rerendering is - // deferred to allow bindings to synchronize. - rerender: function (view) { - view._notifyWillRerender(); - - view.clearRenderedChildren(); - - view.domManager.replace(view); - return view; - }, - - // once the view is already in the DOM, destroying it removes it - // from the DOM, nukes its element, and puts it back into the - // preRender state if inDOM. - - destroyElement: function (view) { - view._notifyWillDestroyElement(); - view.domManager.remove(view); - return view; - }, - - empty: function (view) { - var _childViews = get(view, '_childViews'), len, idx; - if (_childViews) { - len = get(_childViews, 'length'); - for (idx = 0; idx < len; idx++) { - _childViews[idx]._notifyWillDestroyElement(); - } - } - view.domManager.empty(view); - }, - - // Handle events from `Ember.EventDispatcher` - handleEvent: function (view, eventName, evt) { - var handler = view[eventName]; - if (Ember.typeOf(handler) === 'function') { - return handler.call(view, evt); - } else { - return true; // continue event propagation - } - } - }; - - Ember.View.states.inDOM = { - parentState: Ember.View.states.hasElement, - - insertElement: function (view, fn) { - if (view._lastInsert !== Ember.guidFor(fn)) { - return; - } - throw "You can't insert an element into the DOM that has already been inserted"; - } - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var destroyedError = "You can't call %@ on a destroyed view", fmt = Ember.String.fmt; - - Ember.View.states.destroyed = { - parentState: Ember.View.states._default, - - appendChild: function () { - throw fmt(destroyedError, ['appendChild']); - }, - rerender: function () { - throw fmt(destroyedError, ['rerender']); - }, - destroyElement: function () { - throw fmt(destroyedError, ['destroyElement']); - }, - empty: function () { - throw fmt(destroyedError, ['empty']); - }, - - setElement: function () { - throw fmt(destroyedError, ["set('element', ...)"]); - }, - - // Since element insertion is scheduled, don't do anything if - // the view has been destroyed between scheduling and execution - insertElement: Ember.K - }; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set, meta = Ember.meta; - var forEach = Ember.ArrayUtils.forEach; - - var childViewsProperty = Ember.computed(function () { - return get(this, '_childViews'); - }).property('_childViews').cacheable(); - - /** - @class - - A `ContainerView` is an `Ember.View` subclass that allows for manual or programatic - management of a view's `childViews` array that will correctly update the `ContainerView` - instance's rendered DOM representation. - - ## Setting Initial Child Views - The initial array of child views can be set in one of two ways. You can provide - a `childViews` property at creation time that contains instance of `Ember.View`: - - - aContainer = Ember.ContainerView.create({ - childViews: [Ember.View.create(), Ember.View.create()] - }) - - You can also provide a list of property names whose values are instances of `Ember.View`: - - aContainer = Ember.ContainerView.create({ - childViews: ['aView', 'bView', 'cView'], - aView: Ember.View.create(), - bView: Ember.View.create() - cView: Ember.View.create() - }) - - The two strategies can be combined: - - aContainer = Ember.ContainerView.create({ - childViews: ['aView', Ember.View.create()], - aView: Ember.View.create() - }) - - Each child view's rendering will be inserted into the container's rendered HTML in the same - order as its position in the `childViews` property. - - ## Adding and Removing Child Views - The views in a container's `childViews` array should be added and removed by manipulating - the `childViews` property directly. - - To remove a view pass that view into a `removeObject` call on the container's `childViews` property. - - Given an empty `<body>` the following code - - aContainer = Ember.ContainerView.create({ - classNames: ['the-container'], - childViews: ['aView', 'bView'], - aView: Ember.View.create({ - template: Ember.Handlebars.compile("A") - }), - bView: Ember.View.create({ - template: Ember.Handlebars.compile("B") - }) - }) - - aContainer.appendTo('body') - - Results in the HTML - - <div class="ember-view the-container"> - <div class="ember-view">A</div> - <div class="ember-view">B</div> - </div> - - Removing a view - - aContainer.get('childViews') // [aContainer.aView, aContainer.bView] - aContainer.get('childViews').removeObject(aContainer.get('bView')) - aContainer.get('childViews') // [aContainer.aView] - - Will result in the following HTML - - <div class="ember-view the-container"> - <div class="ember-view">A</div> - </div> - - - Similarly, adding a child view is accomplished by adding `Ember.View` instances to the - container's `childViews` property. - - Given an empty `<body>` the following code - - aContainer = Ember.ContainerView.create({ - classNames: ['the-container'], - childViews: ['aView', 'bView'], - aView: Ember.View.create({ - template: Ember.Handlebars.compile("A") - }), - bView: Ember.View.create({ - template: Ember.Handlebars.compile("B") - }) - }) - - aContainer.appendTo('body') - - Results in the HTML - - <div class="ember-view the-container"> - <div class="ember-view">A</div> - <div class="ember-view">B</div> - </div> - - Adding a view - - AnotherViewClass = Ember.View.extend({ - template: Ember.Handlebars.compile("Another view") - }) - - aContainer.get('childViews') // [aContainer.aView, aContainer.bView] - aContainer.get('childViews').pushObject(AnotherViewClass.create()) - aContainer.get('childViews') // [aContainer.aView, <AnotherViewClass instance>] - - Will result in the following HTML - - <div class="ember-view the-container"> - <div class="ember-view">A</div> - <div class="ember-view">Another view</div> - </div> - - - Direct manipulation of childViews presence or absence in the DOM via calls to - `remove` or `removeFromParent` or calls to a container's `removeChild` may not behave - correctly. - - Calling `remove()` on a child view will remove the view's HTML, but it will remain as part of its - container's `childView`s property. - - Calling `removeChild()` on the container will remove the passed view instance from the container's - `childView`s but keep its HTML within the container's rendered view. - - Calling `removeFromParent()` behaves as expected but should be avoided in favor of direct - manipulation of a container's `childViews` property. - - aContainer = Ember.ContainerView.create({ - classNames: ['the-container'], - childViews: ['aView', 'bView'], - aView: Ember.View.create({ - template: Ember.Handlebars.compile("A") - }), - bView: Ember.View.create({ - template: Ember.Handlebars.compile("B") - }) - }) - - aContainer.appendTo('body') - - Results in the HTML - - <div class="ember-view the-container"> - <div class="ember-view">A</div> - <div class="ember-view">B</div> - </div> - - Calling `aContainer.get('aView').removeFromParent()` will result in the following HTML - - <div class="ember-view the-container"> - <div class="ember-view">A</div> - <div class="ember-view">B</div> - </div> - - And the `Ember.View` instance stored in `aContainer.aView` will be removed from `aContainer`'s - `childViews` array. - - - ## Templates and Layout - A `template`, `templateName`, `defaultTemplate`, `layout`, `layoutName` or `defaultLayout` - property on a container view will not result in the template or layout being rendered. - The HTML contents of a `Ember.ContainerView`'s DOM representation will only be the rendered HTML - of its child views. - - @extends Ember.View - */ - - Ember.ContainerView = Ember.View.extend({ - - init: function () { - var childViews = get(this, 'childViews'); - Ember.defineProperty(this, 'childViews', childViewsProperty); - - this._super(); - - var _childViews = get(this, '_childViews'); - - forEach(childViews, function (viewName, idx) { - var view; - - if ('string' === typeof viewName) { - view = get(this, viewName); - view = this.createChildView(view); - set(this, viewName, view); - } else { - view = this.createChildView(viewName); - } - - _childViews[idx] = view; - }, this); - - // Make the _childViews array observable - Ember.A(_childViews); - - // Sets up an array observer on the child views array. This - // observer will detect when child views are added or removed - // and update the DOM to reflect the mutation. - get(this, 'childViews').addArrayObserver(this, { - willChange: 'childViewsWillChange', - didChange: 'childViewsDidChange' - }); - }, - - /** - Instructs each child view to render to the passed render buffer. - - @param {Ember.RenderBuffer} buffer the buffer to render to - @private - */ - render: function (buffer) { - this.forEachChildView(function (view) { - view.renderToBuffer(buffer); - }); - }, - - /** - When the container view is destroyed, tear down the child views - array observer. - - @private - */ - willDestroy: function () { - get(this, 'childViews').removeArrayObserver(this, { - willChange: 'childViewsWillChange', - didChange: 'childViewsDidChange' - }); - - this._super(); - }, - - /** - When a child view is removed, destroy its element so that - it is removed from the DOM. - - The array observer that triggers this action is set up in the - `renderToBuffer` method. - - @private - @param {Ember.Array} views the child views array before mutation - @param {Number} start the start position of the mutation - @param {Number} removed the number of child views removed - **/ - childViewsWillChange: function (views, start, removed) { - if (removed === 0) { - return; - } - - var changedViews = views.slice(start, start + removed); - this.initializeViews(changedViews, null, null); - - this.invokeForState('childViewsWillChange', views, start, removed); - }, - - /** - When a child view is added, make sure the DOM gets updated appropriately. - - If the view has already rendered an element, we tell the child view to - create an element and insert it into the DOM. If the enclosing container view - has already written to a buffer, but not yet converted that buffer into an - element, we insert the string representation of the child into the appropriate - place in the buffer. - - @private - @param {Ember.Array} views the array of child views afte the mutation has occurred - @param {Number} start the start position of the mutation - @param {Number} removed the number of child views removed - @param {Number} the number of child views added - */ - childViewsDidChange: function (views, start, removed, added) { - var len = get(views, 'length'); - - // No new child views were added; bail out. - if (added === 0) return; - - var changedViews = views.slice(start, start + added); - this.initializeViews(changedViews, this, get(this, 'templateData')); - - // Let the current state handle the changes - this.invokeForState('childViewsDidChange', views, start, added); - }, - - initializeViews: function (views, parentView, templateData) { - forEach(views, function (view) { - set(view, '_parentView', parentView); - set(view, 'templateData', templateData); - }); - }, - - /** - Schedules a child view to be inserted into the DOM after bindings have - finished syncing for this run loop. - - @param {Ember.View} view the child view to insert - @param {Ember.View} prev the child view after which the specified view should - be inserted - @private - */ - _scheduleInsertion: function (view, prev) { - if (prev) { - prev.domManager.after(prev, view); - } else { - this.domManager.prepend(this, view); - } - } - }); - -// Ember.ContainerView extends the default view states to provide different -// behavior for childViewsWillChange and childViewsDidChange. - Ember.ContainerView.states = { - parent: Ember.View.states, - - inBuffer: { - childViewsDidChange: function (parentView, views, start, added) { - var buffer = parentView.buffer, - startWith, prev, prevBuffer, view; - - // Determine where to begin inserting the child view(s) in the - // render buffer. - if (start === 0) { - // If views were inserted at the beginning, prepend the first - // view to the render buffer, then begin inserting any - // additional views at the beginning. - view = views[start]; - startWith = start + 1; - view.renderToBuffer(buffer, 'prepend'); - } else { - // Otherwise, just insert them at the same place as the child - // views mutation. - view = views[start - 1]; - startWith = start; - } - - for (var i = startWith; i < start + added; i++) { - prev = view; - view = views[i]; - prevBuffer = prev.buffer; - view.renderToBuffer(prevBuffer, 'insertAfter'); - } - } - }, - - hasElement: { - childViewsWillChange: function (view, views, start, removed) { - for (var i = start; i < start + removed; i++) { - views[i].remove(); - } - }, - - childViewsDidChange: function (view, views, start, added) { - // If the DOM element for this container view already exists, - // schedule each child view to insert its DOM representation after - // bindings have finished syncing. - var prev = start === 0 ? null : views[start - 1]; - - for (var i = start; i < start + added; i++) { - view = views[i]; - this._scheduleInsertion(view, prev); - prev = view; - } - } - } - }; - - Ember.ContainerView.states.inDOM = { - parentState: Ember.ContainerView.states.hasElement - }; - - Ember.ContainerView.reopen({ - states: Ember.ContainerView.states - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set, fmt = Ember.String.fmt; - - /** - @class - - `Ember.CollectionView` is an `Ember.View` descendent responsible for managing a - collection (an array or array-like object) by maintaing a child view object and - associated DOM representation for each item in the array and ensuring that child - views and their associated rendered HTML are updated when items in the array - are added, removed, or replaced. - - ## Setting content - The managed collection of objects is referenced as the `Ember.CollectionView` instance's - `content` property. - - someItemsView = Ember.CollectionView.create({ - content: ['A', 'B','C'] - }) - - The view for each item in the collection will have its `content` property set - to the item. - - ## Specifying itemViewClass - By default the view class for each item in the managed collection will be an instance - of `Ember.View`. You can supply a different class by setting the `CollectionView`'s - `itemViewClass` property. - - Given an empty `<body>` and the following code: - - - someItemsView = Ember.CollectionView.create({ - classNames: ['a-collection'], - content: ['A','B','C'], - itemViewClass: Ember.View.extend({ - template: Ember.Handlebars.compile("the letter: {{content}}") - }) - }) - - someItemsView.appendTo('body') - - Will result in the following HTML structure - - <div class="ember-view a-collection"> - <div class="ember-view">the letter: A</div> - <div class="ember-view">the letter: B</div> - <div class="ember-view">the letter: C</div> - </div> - - - ## Automatic matching of parent/child tagNames - Setting the `tagName` property of a `CollectionView` to any of - "ul", "ol", "table", "thead", "tbody", "tfoot", "tr", or "select" will result - in the item views receiving an appropriately matched `tagName` property. - - - Given an empty `<body>` and the following code: - - anUndorderedListView = Ember.CollectionView.create({ - tagName: 'ul', - content: ['A','B','C'], - itemViewClass: Ember.View.extend({ - template: Ember.Handlebars.compile("the letter: {{content}}") - }) - }) - - anUndorderedListView.appendTo('body') - - Will result in the following HTML structure - - <ul class="ember-view a-collection"> - <li class="ember-view">the letter: A</li> - <li class="ember-view">the letter: B</li> - <li class="ember-view">the letter: C</li> - </ul> - - Additional tagName pairs can be provided by adding to `Ember.CollectionView.CONTAINER_MAP ` - - Ember.CollectionView.CONTAINER_MAP['article'] = 'section' - - - ## Empty View - You can provide an `Ember.View` subclass to the `Ember.CollectionView` instance as its - `emptyView` property. If the `content` property of a `CollectionView` is set to `null` - or an empty array, an instance of this view will be the `CollectionView`s only child. - - aListWithNothing = Ember.CollectionView.create({ - classNames: ['nothing'] - content: null, - emptyView: Ember.View.extend({ - template: Ember.Handlebars.compile("The collection is empty") - }) - }) - - aListWithNothing.appendTo('body') - - Will result in the following HTML structure - - <div class="ember-view nothing"> - <div class="ember-view"> - The collection is empty - </div> - </div> - - ## Adding and Removing items - The `childViews` property of a `CollectionView` should not be directly manipulated. Instead, - add, remove, replace items from its `content` property. This will trigger - appropriate changes to its rendered HTML. - - ## Use in templates via the `{{collection}}` Ember.Handlebars helper - Ember.Handlebars provides a helper specifically for adding `CollectionView`s to templates. - See `Ember.Handlebars.collection` for more details - - @since Ember 0.9 - @extends Ember.ContainerView - */ - Ember.CollectionView = Ember.ContainerView.extend( - /** @scope Ember.CollectionView.prototype */ { - - /** - A list of items to be displayed by the Ember.CollectionView. - - @type Ember.Array - @default null - */ - content: null, - - /** - An optional view to display if content is set to an empty array. - - @type Ember.View - @default null - */ - emptyView: null, - - /** - @type Ember.View - @default Ember.View - */ - itemViewClass: Ember.View, - - /** @private */ - init: function () { - var ret = this._super(); - this._contentDidChange(); - return ret; - }, - - _contentWillChange: Ember.beforeObserver(function () { - var content = this.get('content'); - - if (content) { - content.removeArrayObserver(this); - } - var len = content ? get(content, 'length') : 0; - this.arrayWillChange(content, 0, len); - }, 'content'), - - /** - @private - - Check to make sure that the content has changed, and if so, - update the children directly. This is always scheduled - asynchronously, to allow the element to be created before - bindings have synchronized and vice versa. - */ - _contentDidChange: Ember.observer(function () { - var content = get(this, 'content'); - - if (content) { - ember_assert(fmt("an Ember.CollectionView's content must implement Ember.Array. You passed %@", [content]), Ember.Array.detect(content)); - content.addArrayObserver(this); - } - - var len = content ? get(content, 'length') : 0; - this.arrayDidChange(content, 0, null, len); - }, 'content'), - - willDestroy: function () { - var content = get(this, 'content'); - if (content) { - content.removeArrayObserver(this); - } - - this._super(); - }, - - arrayWillChange: function (content, start, removedCount) { - // If the contents were empty before and this template collection has an - // empty view remove it now. - var emptyView = get(this, 'emptyView'); - if (emptyView && emptyView instanceof Ember.View) { - emptyView.removeFromParent(); - } - - // Loop through child views that correspond with the removed items. - // Note that we loop from the end of the array to the beginning because - // we are mutating it as we go. - var childViews = get(this, 'childViews'), childView, idx, len; - - len = get(childViews, 'length'); - - var removingAll = removedCount === len; - - if (removingAll) { - this.invokeForState('empty'); - } - - for (idx = start + removedCount - 1; idx >= start; idx--) { - childView = childViews[idx]; - if (removingAll) { - childView.removedFromDOM = true; - } - childView.destroy(); - } - }, - - /** - Called when a mutation to the underlying content array occurs. - - This method will replay that mutation against the views that compose the - Ember.CollectionView, ensuring that the view reflects the model. - - This array observer is added in contentDidChange. - - @param {Array} addedObjects - the objects that were added to the content - - @param {Array} removedObjects - the objects that were removed from the content - - @param {Number} changeIndex - the index at which the changes occurred - */ - arrayDidChange: function (content, start, removed, added) { - var itemViewClass = get(this, 'itemViewClass'), - childViews = get(this, 'childViews'), - addedViews = [], view, item, idx, len, itemTagName; - - if ('string' === typeof itemViewClass) { - itemViewClass = Ember.getPath(itemViewClass); - } - - ember_assert(fmt("itemViewClass must be a subclass of Ember.View, not %@", [itemViewClass]), Ember.View.detect(itemViewClass)); - - len = content ? get(content, 'length') : 0; - if (len) { - for (idx = start; idx < start + added; idx++) { - item = content.objectAt(idx); - - view = this.createChildView(itemViewClass, { - content: item, - contentIndex: idx - }); - - addedViews.push(view); - } - } else { - var emptyView = get(this, 'emptyView'); - if (!emptyView) { - return; - } - - emptyView = this.createChildView(emptyView); - addedViews.push(emptyView); - set(this, 'emptyView', emptyView); - } - childViews.replace(start, 0, addedViews); - }, - - createChildView: function (view, attrs) { - view = this._super(view, attrs); - - var itemTagName = get(view, 'tagName'); - var tagName = (itemTagName === null || itemTagName === undefined) ? Ember.CollectionView.CONTAINER_MAP[get(this, 'tagName')] : itemTagName; - - set(view, 'tagName', tagName); - - return view; - } - }); - - /** - @static - - A map of parent tags to their default child tags. You can add - additional parent tags if you want collection views that use - a particular parent tag to default to a child tag. - - @type Hash - @constant - */ - Ember.CollectionView.CONTAINER_MAP = { - ul: 'li', - ol: 'li', - table: 'tr', - thead: 'tr', - tbody: 'tr', - tfoot: 'tr', - tr: 'td', - select: 'option' - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember - JavaScript Application Framework -// Copyright: ©2006-2011 Strobe Inc. and contributors. -// Portions ©2008-2011 Apple Inc. All rights reserved. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - /*globals jQuery*/ - -})(); - -(function () { - var get = Ember.get, set = Ember.set, getPath = Ember.getPath; - - Ember.State = Ember.Object.extend({ - isState: true, - parentState: null, - start: null, - name: null, - path: Ember.computed(function () { - var parentPath = getPath(this, 'parentState.path'), - path = get(this, 'name'); - - if (parentPath) { - path = parentPath + '.' + path; - } - - return path; - }).property().cacheable(), - - init: function () { - var states = get(this, 'states'), foundStates; - var name; - - // As a convenience, loop over the properties - // of this state and look for any that are other - // Ember.State instances or classes, and move them - // to the `states` hash. This avoids having to - // create an explicit separate hash. - - if (!states) { - states = {}; - - for (name in this) { - if (name === "constructor") { - continue; - } - this.setupChild(states, name, this[name]); - } - - set(this, 'states', states); - } else { - for (name in states) { - this.setupChild(states, name, states[name]); - } - } - - set(this, 'routes', {}); - }, - - setupChild: function (states, name, value) { - if (!value) { - return false; - } - - if (Ember.State.detect(value)) { - value = value.create({ - name: name - }); - } else if (value.isState) { - set(value, 'name', name); - } - - if (value.isState) { - set(value, 'parentState', this); - states[name] = value; - } - }, - - enter: Ember.K, - exit: Ember.K - }); - -})(); - - -(function () { - var get = Ember.get, set = Ember.set, getPath = Ember.getPath, fmt = Ember.String.fmt; - /** - @class - - StateManager is part of Ember's implementation of a finite state machine. A StateManager - instance manages a number of properties that are instances of `Ember.State`, - tracks the current active state, and triggers callbacks when states have changed. - - ## Defining States - - The states of StateManager can be declared in one of two ways. First, you can define - a `states` property that contains all the states: - - managerA = Ember.StateManager.create({ - states: { - stateOne: Ember.State.create(), - stateTwo: Ember.State.create() - } - }) - - managerA.get('states') - // { - // stateOne: Ember.State.create(), - // stateTwo: Ember.State.create() - // } - - You can also add instances of `Ember.State` (or an `Ember.State` subclass) directly as properties - of a StateManager. These states will be collected into the `states` property for you. - - managerA = Ember.StateManager.create({ - stateOne: Ember.State.create(), - stateTwo: Ember.State.create() - }) - - managerA.get('states') - // { - // stateOne: Ember.State.create(), - // stateTwo: Ember.State.create() - // } - - ## The Initial State - When created a StateManager instance will immediately enter into the state - defined as its `start` property or the state referenced by name in its - `initialState` property: - - managerA = Ember.StateManager.create({ - start: Ember.State.create({}) - }) - - managerA.getPath('currentState.name') // 'start' - - managerB = Ember.StateManager.create({ - initialState: 'beginHere', - beginHere: Ember.State.create({}) - }) - - managerB.getPath('currentState.name') // 'beginHere' - - Because it is a property you may also provided a computed function if you wish to derive - an `initialState` programmatically: - - managerC = Ember.StateManager.create({ - initialState: function(){ - if (someLogic) { - return 'active'; - } else { - return 'passive'; - } - }.property(), - active: Ember.State.create({}) - passive: Ember.State.create({}) - }) - - ## Moving Between States - A StateManager can have any number of Ember.State objects as properties - and can have a single one of these states as its current state. - - Calling `goToState` transitions between states: - - robotManager = Ember.StateManager.create({ - initialState: 'poweredDown', - poweredDown: Ember.State.create({}), - poweredUp: Ember.State.create({}) - }) - - robotManager.getPath('currentState.name') // 'poweredDown' - robotManager.goToState('poweredUp') - robotManager.getPath('currentState.name') // 'poweredUp' - - Before transitioning into a new state the existing `currentState` will have its - `exit` method called with with the StateManager instance as its first argument and - an object representing the the transition as its second argument. - - After transitioning into a new state the new `currentState` will have its - `enter` method called with with the StateManager instance as its first argument and - an object representing the the transition as its second argument. - - robotManager = Ember.StateManager.create({ - initialState: 'poweredDown', - poweredDown: Ember.State.create({ - exit: function(stateManager, transition){ - console.log("exiting the poweredDown state") - } - }), - poweredUp: Ember.State.create({ - enter: function(stateManager, transition){ - console.log("entering the poweredUp state. Destroy all humans.") - } - }) - }) - - robotManager.getPath('currentState.name') // 'poweredDown' - robotManager.goToState('poweredUp') - // will log - // 'exiting the poweredDown state' - // 'entering the poweredUp state. Destroy all humans.' - - - Once a StateManager is already in a state, subsequent attempts to enter that state will - not trigger enter or exit method calls. Attempts to transition into a state that the - manager does not have will result in no changes in the StateManager's current state: - - robotManager = Ember.StateManager.create({ - initialState: 'poweredDown', - poweredDown: Ember.State.create({ - exit: function(stateManager, transition){ - console.log("exiting the poweredDown state") - } - }), - poweredUp: Ember.State.create({ - enter: function(stateManager, transition){ - console.log("entering the poweredUp state. Destroy all humans.") - } - }) - }) - - robotManager.getPath('currentState.name') // 'poweredDown' - robotManager.goToState('poweredUp') - // will log - // 'exiting the poweredDown state' - // 'entering the poweredUp state. Destroy all humans.' - robotManager.goToState('poweredUp') // no logging, no state change - - robotManager.goToState('someUnknownState') // silently fails - robotManager.getPath('currentState.name') // 'poweredUp' - - - Each state property may itself contain properties that are instances of Ember.State. - The StateManager can transition to specific sub-states in a series of goToState method calls or - via a single goToState with the full path to the specific state. The StateManager will also - keep track of the full path to its currentState - - - robotManager = Ember.StateManager.create({ - initialState: 'poweredDown', - poweredDown: Ember.State.create({ - charging: Ember.State.create(), - charged: Ember.State.create() - }), - poweredUp: Ember.State.create({ - mobile: Ember.State.create(), - stationary: Ember.State.create() - }) - }) - - robotManager.getPath('currentState.name') // 'poweredDown' - - robotManager.goToState('poweredUp') - robotManager.getPath('currentState.name') // 'poweredUp' - - robotManager.goToState('mobile') - robotManager.getPath('currentState.name') // 'mobile' - - // transition via a state path - robotManager.goToState('poweredDown.charging') - robotManager.getPath('currentState.name') // 'charging' - - robotManager.getPath('currentState.get.path') // 'poweredDown.charging' - - Enter transition methods will be called for each state and nested child state in their - hierarchical order. Exit methods will be called for each state and its nested states in - reverse hierarchical order. - - Exit transitions for a parent state are not called when entering into one of its child states, - only when transitioning to a new section of possible states in the hierarchy. - - robotManager = Ember.StateManager.create({ - initialState: 'poweredDown', - poweredDown: Ember.State.create({ - enter: function(){}, - exit: function(){ - console.log("exited poweredDown state") - }, - charging: Ember.State.create({ - enter: function(){}, - exit: function(){} - }), - charged: Ember.State.create({ - enter: function(){ - console.log("entered charged state") - }, - exit: function(){ - console.log("exited charged state") - } - }) - }), - poweredUp: Ember.State.create({ - enter: function(){ - console.log("entered poweredUp state") - }, - exit: function(){}, - mobile: Ember.State.create({ - enter: function(){ - console.log("entered mobile state") - }, - exit: function(){} - }), - stationary: Ember.State.create({ - enter: function(){}, - exit: function(){} - }) - }) - }) - - - robotManager.get('currentState.get.path') // 'poweredDown' - robotManager.goToState('charged') - // logs 'entered charged state' - // but does *not* log 'exited poweredDown state' - robotManager.getPath('currentState.name') // 'charged - - robotManager.goToState('poweredUp.mobile') - // logs - // 'exited charged state' - // 'exited poweredDown state' - // 'entered poweredUp state' - // 'entered mobile state' - - During development you can set a StateManager's `enableLogging` property to `true` to - receive console messages of state transitions. - - robotManager = Ember.StateManager.create({ - enableLogging: true - }) - - ## Managing currentState with Actions - To control which transitions between states are possible for a given state, StateManager - can receive and route action messages to its states via the `send` method. Calling to `send` with - an action name will begin searching for a method with the same name starting at the current state - and moving up through the parent states in a state hierarchy until an appropriate method is found - or the StateManager instance itself is reached. - - If an appropriately named method is found it will be called with the state manager as the first - argument and an optional `context` object as the second argument. - - managerA = Ember.StateManager.create({ - initialState: 'stateOne.substateOne.subsubstateOne', - stateOne: Ember.State.create({ - substateOne: Ember.State.create({ - anAction: function(manager, context){ - console.log("an action was called") - }, - subsubstateOne: Ember.State.create({}) - }) - }) - }) - - managerA.getPath('currentState.name') // 'subsubstateOne' - managerA.send('anAction') - // 'stateOne.substateOne.subsubstateOne' has no anAction method - // so the 'anAction' method of 'stateOne.substateOne' is called - // and logs "an action was called" - // with managerA as the first argument - // and no second argument - - someObject = {} - managerA.send('anAction', someObject) - // the 'anAction' method of 'stateOne.substateOne' is called again - // with managerA as the first argument and - // someObject as the second argument. - - - If the StateManager attempts to send an action but does not find an appropriately named - method in the current state or while moving upwards through the state hierarchy - it will throw a new Ember.Error. Action detection only moves upwards through the state hierarchy - from the current state. It does not search in other portions of the hierarchy. - - managerB = Ember.StateManager.create({ - initialState: 'stateOne.substateOne.subsubstateOne', - stateOne: Ember.State.create({ - substateOne: Ember.State.create({ - subsubstateOne: Ember.State.create({}) - }) - }), - stateTwo: Ember.State.create({ - anAction: function(manager, context){ - // will not be called below because it is - // not a parent of the current state - } - }) - }) - - managerB.getPath('currentState.name') // 'subsubstateOne' - managerB.send('anAction') - // Error: <Ember.StateManager:ember132> could not - // respond to event anAction in state stateOne.substateOne.subsubstateOne. - - Inside of an action method the given state should delegate `goToState` calls on its - StateManager. - - robotManager = Ember.StateManager.create({ - initialState: 'poweredDown.charging', - poweredDown: Ember.State.create({ - charging: Ember.State.create({ - chargeComplete: function(manager, context){ - manager.goToState('charged') - } - }), - charged: Ember.State.create({ - boot: function(manager, context){ - manager.goToState('poweredUp') - } - }) - }), - poweredUp: Ember.State.create({ - beginExtermination: function(manager, context){ - manager.goToState('rampaging') - }, - rampaging: Ember.State.create() - }) - }) - - robotManager.getPath('currentState.name') // 'charging' - robotManager.send('boot') // throws error, no boot action - // in current hierarchy - robotManager.getPath('currentState.name') // remains 'charging' - - robotManager.send('beginExtermination') // throws error, no beginExtermination - // action in current hierarchy - robotManager.getPath('currentState.name') // remains 'charging' - - robotManager.send('chargeComplete') - robotManager.getPath('currentState.name') // 'charged' - - robotManager.send('boot') - robotManager.getPath('currentState.name') // 'poweredUp' - - robotManager.send('beginExtermination', allHumans) - robotManager.getPath('currentState.name') // 'rampaging' - - **/ - Ember.StateManager = Ember.State.extend( - /** @scope Ember.State.prototype */ { - - /** - When creating a new statemanager, look for a default state to transition - into. This state can either be named `start`, or can be specified using the - `initialState` property. - */ - init: function () { - this._super(); - - var initialState = get(this, 'initialState'); - - if (!initialState && getPath(this, 'states.start')) { - initialState = 'start'; - } - - if (initialState) { - this.goToState(initialState); - } - }, - - currentState: null, - - /** - @property - - If set to true, `errorOnUnhandledEvents` will cause an exception to be - raised if you attempt to send an event to a state manager that is not - handled by the current state or any of its parent states. - */ - errorOnUnhandledEvent: true, - - send: function (event, context) { - this.sendRecursively(event, get(this, 'currentState'), context); - }, - - sendRecursively: function (event, currentState, context) { - var log = this.enableLogging; - - var action = currentState[event]; - - if (action) { - if (log) { - console.log(fmt("STATEMANAGER: Sending event '%@' to state %@.", [event, get(currentState, 'path')])); - } - action.call(currentState, this, context); - } else { - var parentState = get(currentState, 'parentState'); - if (parentState) { - this.sendRecursively(event, parentState, context); - } else if (get(this, 'errorOnUnhandledEvent')) { - throw new Ember.Error(this.toString() + " could not respond to event " + event + " in state " + getPath(this, 'currentState.path') + "."); - } - } - }, - - findStatesByRoute: function (state, route) { - if (!route || route === "") { - return undefined; - } - var r = route.split('.'), ret = []; - - for (var i = 0, len = r.length; i < len; i += 1) { - var states = get(state, 'states'); - - if (!states) { - return undefined; - } - - var s = get(states, r[i]); - if (s) { - state = s; - ret.push(s); - } - else { - return undefined; - } - } - - return ret; - }, - - goToState: function (name) { - if (Ember.empty(name)) { - return; - } - - var currentState = get(this, 'currentState') || this, state, newState; - - var exitStates = [], enterStates; - - state = currentState; - - if (state.routes[name]) { - // cache hit - exitStates = state.routes[name].exitStates; - enterStates = state.routes[name].enterStates; - state = state.routes[name].futureState; - } else { - // cache miss - - newState = this.findStatesByRoute(currentState, name); - - while (state && !newState) { - exitStates.unshift(state); - - state = get(state, 'parentState'); - if (!state) { - newState = this.findStatesByRoute(this, name); - if (!newState) { - return; - } - } - newState = this.findStatesByRoute(state, name); - } - - enterStates = newState.slice(0); - exitStates = exitStates.slice(0); - - if (enterStates.length > 0) { - state = enterStates[enterStates.length - 1]; - - while (enterStates.length > 0 && enterStates[0] === exitStates[0]) { - enterStates.shift(); - exitStates.shift(); - } - } - - currentState.routes[name] = { - exitStates: exitStates, - enterStates: enterStates, - futureState: state - }; - } - - this.enterState(exitStates, enterStates, state); - }, - - getState: function (name) { - var state = get(this, name), - parentState = get(this, 'parentState'); - - if (state) { - return state; - } else if (parentState) { - return parentState.getState(name); - } - }, - - asyncEach: function (list, callback, doneCallback) { - var async = false, self = this; - - if (!list.length) { - if (doneCallback) { - doneCallback.call(this); - } - return; - } - - var head = list[0]; - var tail = list.slice(1); - - var transition = { - async: function () { - async = true; - }, - resume: function () { - self.asyncEach(tail, callback, doneCallback); - } - }; - - callback.call(this, head, transition); - - if (!async) { - transition.resume(); - } - }, - - enterState: function (exitStates, enterStates, state) { - var log = this.enableLogging; - - var stateManager = this; - - exitStates = exitStates.slice(0).reverse(); - this.asyncEach(exitStates, function (state, transition) { - state.exit(stateManager, transition); - }, function () { - this.asyncEach(enterStates, function (state, transition) { - if (log) { - console.log("STATEMANAGER: Entering " + get(state, 'path')); - } - state.enter(stateManager, transition); - }, function () { - var startState = state, enteredState, initialState; - - initialState = get(startState, 'initialState'); - - if (!initialState) { - initialState = 'start'; - } - - // right now, start states cannot be entered asynchronously - while (startState = get(get(startState, 'states'), initialState)) { - enteredState = startState; - - if (log) { - console.log("STATEMANAGER: Entering " + get(startState, 'path')); - } - startState.enter(stateManager); - - initialState = get(startState, 'initialState'); - - if (!initialState) { - initialState = 'start'; - } - } - - set(this, 'currentState', enteredState || state); - }); - }); - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Statecharts -// Copyright: ©2011 Living Social Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - -(function () { - var get = Ember.get, set = Ember.set, getPath = Ember.getPath, fmt = Ember.String.fmt; - - /** - @class - - ## Interactions with Ember's View System. - When combined with instances of `Ember.ViewState`, StateManager is designed to - interact with Ember's view system to control which views are added to - and removed from the DOM based on the manager's current state. - - By default, a StateManager will manage views inside the 'body' element. This can be - customized by setting the `rootElement` property to a CSS selector of an existing - HTML element you would prefer to receive view rendering. - - - viewStates = Ember.StateManager.create({ - rootElement: '#some-other-element' - }) - - You can also specify a particular instance of `Ember.ContainerView` you would like to receive - view rendering by setting the `rootView` property. You will be responsible for placing - this element into the DOM yourself. - - aLayoutView = Ember.ContainerView.create() - - // make sure this view instance is added to the browser - aLayoutView.appendTo('body') - - App.viewStates = Ember.StateManager.create({ - rootView: aLayoutView - }) - - - Once you have an instance of StateManager controlling a view, you can provide states - that are instances of `Ember.ViewState`. When the StateManager enters a state - that is an instance of `Ember.ViewState` that `ViewState`'s `view` property will be - instantiated and inserted into the StateManager's `rootView` or `rootElement`. - When a state is exited, the `ViewState`'s view will be removed from the StateManager's - view. - - ContactListView = Ember.View.extend({ - classNames: ['my-contacts-css-class'], - defaultTemplate: Ember.Handlebars.compile('<h2>People</h2>') - }) - - PhotoListView = Ember.View.extend({ - classNames: ['my-photos-css-class'], - defaultTemplate: Ember.Handlebars.compile('<h2>Photos</h2>') - }) - - viewStates = Ember.StateManager.create({ - showingPeople: Ember.ViewState.create({ - view: ContactListView - }), - showingPhotos: Ember.ViewState.create({ - view: PhotoListView - }) - }) - - viewStates.goToState('showingPeople') - - The above code will change the rendered HTML from - - <body></body> - - to - - <body> - <div id="ember1" class="ember-view my-contacts-css-class"> - <h2>People</h2> - </div> - </body> - - Changing the current state via `goToState` from `showingPeople` to - `showingPhotos` will remove the `showingPeople` view and add the `showingPhotos` view: - - viewStates.goToState('showingPhotos') - - will change the rendered HTML to - - <body> - <div id="ember2" class="ember-view my-photos-css-class"> - <h2>Photos</h2> - </div> - </body> - - - When entering nested `ViewState`s, each state's view will be draw into the the StateManager's - `rootView` or `rootElement` as siblings. - - - ContactListView = Ember.View.extend({ - classNames: ['my-contacts-css-class'], - defaultTemplate: Ember.Handlebars.compile('<h2>People</h2>') - }) - - EditAContactView = Ember.View.extend({ - classNames: ['editing-a-contact-css-class'], - defaultTemplate: Ember.Handlebars.compile('Editing...') - }) - - viewStates = Ember.StateManager.create({ - showingPeople: Ember.ViewState.create({ - view: ContactListView, - - withEditingPanel: Ember.ViewState.create({ - view: EditAContactView - }) - }) - }) - - - viewStates.goToState('showingPeople.withEditingPanel') - - - Will result in the following rendered HTML: - - <body> - <div id="ember2" class="ember-view my-contacts-css-class"> - <h2>People</h2> - </div> - - <div id="ember2" class="ember-view editing-a-contact-css-class"> - Editing... - </div> - </body> - - - ViewState views are added and removed from their StateManager's view via their - `enter` and `exit` methods. If you need to override these methods, be sure to call - `_super` to maintain the adding and removing behavior: - - viewStates = Ember.StateManager.create({ - aState: Ember.ViewState.create({ - view: Ember.View.extend({}), - enter: function(manager, transition){ - // calling _super ensures this view will be - // properly inserted - this._super(); - - // now you can do other things - } - }) - }) - - ## Managing Multiple Sections of A Page With States - Multiple StateManagers can be combined to control multiple areas of an application's rendered views. - Given the following HTML body: - - <body> - <div id='sidebar-nav'> - </div> - <div id='content-area'> - </div> - </body> - - You could separately manage view state for each section with two StateManagers - - navigationStates = Ember.StateManager.create({ - rootElement: '#sidebar-nav', - userAuthenticated: Em.ViewState.create({ - view: Ember.View.extend({}) - }), - userNotAuthenticated: Em.ViewState.create({ - view: Ember.View.extend({}) - }) - }) - - contentStates = Ember.StateManager.create({ - rootElement: '#content-area', - books: Em.ViewState.create({ - view: Ember.View.extend({}) - }), - music: Em.ViewState.create({ - view: Ember.View.extend({}) - }) - }) - - - If you prefer to start with an empty body and manage state programmatically you - can also take advantage of StateManager's `rootView` property and the ability of - `Ember.ContainerView`s to manually manage their child views. - - - dashboard = Ember.ContainerView.create({ - childViews: ['navigationAreaView', 'contentAreaView'], - navigationAreaView: Ember.ContainerView.create({}), - contentAreaView: Ember.ContainerView.create({}) - }) - - navigationStates = Ember.StateManager.create({ - rootView: dashboard.get('navigationAreaView'), - userAuthenticated: Em.ViewState.create({ - view: Ember.View.extend({}) - }), - userNotAuthenticated: Em.ViewState.create({ - view: Ember.View.extend({}) - }) - }) - - contentStates = Ember.StateManager.create({ - rootView: dashboard.get('contentAreaView'), - books: Em.ViewState.create({ - view: Ember.View.extend({}) - }), - music: Em.ViewState.create({ - view: Ember.View.extend({}) - }) - }) - - dashboard.appendTo('body') - - ## User Manipulation of State via `{{action}}` Helpers - The Handlebars `{{action}}` helper is StateManager-aware and will use StateManager action sending - to connect user interaction to action-based state transitions. - - Given the following body and handlebars template - - <body> - <script type='text/x-handlebars'> - <a href="#" {{action "anAction" target="App.appStates"}}> Go </a> - </script> - </body> - - And application code - - App = Ember.Application.create() - App.appStates = Ember.StateManager.create({ - initialState: 'aState', - aState: Ember.State.create({ - anAction: function(manager, context){} - }), - bState: Ember.State.create({}) - }) - - A user initiated click or touch event on "Go" will trigger the 'anAction' method of - `App.appStates.aState` with `App.appStates` as the first argument and a - `jQuery.Event` object as the second object. The `jQuery.Event` will include a property - `view` that references the `Ember.View` object that was interacted with. - - **/ - - Ember.StateManager.reopen({ - - /** - @property - - If the current state is a view state or the descendent of a view state, - this property will be the view associated with it. If there is no - view state active in this state manager, this value will be null. - */ - currentView: Ember.computed(function () { - var currentState = get(this, 'currentState'), - view; - - while (currentState) { - if (get(currentState, 'isViewState')) { - view = get(currentState, 'view'); - if (view) { - return view; - } - } - - currentState = get(currentState, 'parentState'); - } - - return null; - }).property('currentState').cacheable(), - - }); - -})(); - - -(function () { - var get = Ember.get, set = Ember.set; - - Ember.ViewState = Ember.State.extend({ - isViewState: true, - - enter: function (stateManager) { - var view = get(this, 'view'), root, childViews; - - if (view) { - if (Ember.View.detect(view)) { - view = view.create(); - set(this, 'view', view); - } - - ember_assert('view must be an Ember.View', view instanceof Ember.View); - - root = stateManager.get('rootView'); - - if (root) { - childViews = get(root, 'childViews'); - childViews.pushObject(view); - } else { - root = stateManager.get('rootElement') || 'body'; - view.appendTo(root); - } - } - }, - - exit: function (stateManager) { - var view = get(this, 'view'); - - if (view) { - // If the view has a parent view, then it is - // part of a view hierarchy and should be removed - // from its parent. - if (get(view, 'parentView')) { - view.removeFromParent(); - } else { - - // Otherwise, the view is a "root view" and - // was appended directly to the DOM. - view.remove(); - } - } - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Statecharts -// Copyright: ©2011 Living Social Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - -(function () { -// ========================================================================== -// Project: metamorph -// Copyright: ©2011 My Company Inc. All rights reserved. -// ========================================================================== - - (function (window) { - - var K = function () { - }, - guid = 0, - document = window.document, - - // Feature-detect the W3C range API, the extended check is for IE9 which only partially supports ranges - supportsRange = ('createRange' in document) && (typeof Range !== 'undefined') && Range.prototype.createContextualFragment, - - // Internet Explorer prior to 9 does not allow setting innerHTML if the first element - // is a "zero-scope" element. This problem can be worked around by making - // the first node an invisible text node. We, like Modernizr, use ­ - needsShy = (function () { - var testEl = document.createElement('div'); - testEl.innerHTML = "<div></div>"; - testEl.firstChild.innerHTML = "<script></script>"; - return testEl.firstChild.innerHTML === ''; - })(); - - // Constructor that supports either Metamorph('foo') or new - // Metamorph('foo'); - // - // Takes a string of HTML as the argument. - - var Metamorph = function (html) { - var self; - - if (this instanceof Metamorph) { - self = this; - } else { - self = new K(); - } - - self.innerHTML = html; - var myGuid = 'metamorph-' + (guid++); - self.start = myGuid + '-start'; - self.end = myGuid + '-end'; - - return self; - }; - - K.prototype = Metamorph.prototype; - - var rangeFor, htmlFunc, removeFunc, outerHTMLFunc, appendToFunc, afterFunc, prependFunc, startTagFunc, endTagFunc; - - outerHTMLFunc = function () { - return this.startTag() + this.innerHTML + this.endTag(); - }; - - startTagFunc = function () { - return "<script id='" + this.start + "' type='text/x-placeholder'></script>"; - }; - - endTagFunc = function () { - return "<script id='" + this.end + "' type='text/x-placeholder'></script>"; - }; - - // If we have the W3C range API, this process is relatively straight forward. - if (supportsRange) { - - // Get a range for the current morph. Optionally include the starting and - // ending placeholders. - rangeFor = function (morph, outerToo) { - var range = document.createRange(); - var before = document.getElementById(morph.start); - var after = document.getElementById(morph.end); - - if (outerToo) { - range.setStartBefore(before); - range.setEndAfter(after); - } else { - range.setStartAfter(before); - range.setEndBefore(after); - } - - return range; - }; - - htmlFunc = function (html, outerToo) { - // get a range for the current metamorph object - var range = rangeFor(this, outerToo); - - // delete the contents of the range, which will be the - // nodes between the starting and ending placeholder. - range.deleteContents(); - - // create a new document fragment for the HTML - var fragment = range.createContextualFragment(html); - - // insert the fragment into the range - range.insertNode(fragment); - }; - - removeFunc = function () { - // get a range for the current metamorph object including - // the starting and ending placeholders. - var range = rangeFor(this, true); - - // delete the entire range. - range.deleteContents(); - }; - - appendToFunc = function (node) { - var range = document.createRange(); - range.setStart(node); - range.collapse(false); - var frag = range.createContextualFragment(this.outerHTML()); - node.appendChild(frag); - }; - - afterFunc = function (html) { - var range = document.createRange(); - var after = document.getElementById(this.end); - - range.setStartAfter(after); - range.setEndAfter(after); - - var fragment = range.createContextualFragment(html); - range.insertNode(fragment); - }; - - prependFunc = function (html) { - var range = document.createRange(); - var start = document.getElementById(this.start); - - range.setStartAfter(start); - range.setEndAfter(start); - - var fragment = range.createContextualFragment(html); - range.insertNode(fragment); - }; - - } else { - /** - * This code is mostly taken from jQuery, with one exception. In jQuery's case, we - * have some HTML and we need to figure out how to convert it into some nodes. - * - * In this case, jQuery needs to scan the HTML looking for an opening tag and use - * that as the key for the wrap map. In our case, we know the parent node, and - * can use its type as the key for the wrap map. - **/ - var wrapMap = { - select: [ 1, "<select multiple='multiple'>", "</select>" ], - fieldset: [ 1, "<fieldset>", "</fieldset>" ], - table: [ 1, "<table>", "</table>" ], - tbody: [ 2, "<table><tbody>", "</tbody></table>" ], - tr: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], - colgroup: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], - map: [ 1, "<map>", "</map>" ], - _default: [ 0, "", "" ] - }; - - /** - * Given a parent node and some HTML, generate a set of nodes. Return the first - * node, which will allow us to traverse the rest using nextSibling. - * - * We need to do this because innerHTML in IE does not really parse the nodes. - **/ - var firstNodeFor = function (parentNode, html) { - var arr = wrapMap[parentNode.tagName.toLowerCase()] || wrapMap._default; - var depth = arr[0], start = arr[1], end = arr[2]; - - if (needsShy) { - html = '­' + html; - } - - var element = document.createElement('div'); - element.innerHTML = start + html + end; - - for (var i = 0; i <= depth; i++) { - element = element.firstChild; - } - - // Look for ­ to remove it. - if (needsShy) { - var shyElement = element; - - // Sometimes we get nameless elements with the shy inside - while (shyElement.nodeType === 1 && !shyElement.nodeName && shyElement.childNodes.length === 1) { - shyElement = shyElement.firstChild; - } - - // At this point it's the actual unicode character. - if (shyElement.nodeType === 3 && shyElement.nodeValue.charAt(0) === "\u00AD") { - shyElement.nodeValue = shyElement.nodeValue.slice(1); - } - } - - return element; - }; - - /** - * In some cases, Internet Explorer can create an anonymous node in - * the hierarchy with no tagName. You can create this scenario via: - * - * div = document.createElement("div"); - * div.innerHTML = "<table>­<script></script><tr><td>hi</td></tr></table>"; - * div.firstChild.firstChild.tagName //=> "" - * - * If our script markers are inside such a node, we need to find that - * node and use *it* as the marker. - **/ - var realNode = function (start) { - while (start.parentNode.tagName === "") { - start = start.parentNode; - } - - return start; - }; - - /** - * When automatically adding a tbody, Internet Explorer inserts the - * tbody immediately before the first <tr>. Other browsers create it - * before the first node, no matter what. - * - * This means the the following code: - * - * div = document.createElement("div"); - * div.innerHTML = "<table><script id='first'></script><tr><td>hi</td></tr><script id='last'></script></table> - * - * Generates the following DOM in IE: - * - * + div - * + table - * - script id='first' - * + tbody - * + tr - * + td - * - "hi" - * - script id='last' - * - * Which means that the two script tags, even though they were - * inserted at the same point in the hierarchy in the original - * HTML, now have different parents. - * - * This code reparents the first script tag by making it the tbody's - * first child. - **/ - var fixParentage = function (start, end) { - if (start.parentNode !== end.parentNode) { - end.parentNode.insertBefore(start, end.parentNode.firstChild); - } - }; - - htmlFunc = function (html, outerToo) { - // get the real starting node. see realNode for details. - var start = realNode(document.getElementById(this.start)); - var end = document.getElementById(this.end); - var parentNode = end.parentNode; - var node, nextSibling, last; - - // make sure that the start and end nodes share the same - // parent. If not, fix it. - fixParentage(start, end); - - // remove all of the nodes after the starting placeholder and - // before the ending placeholder. - node = start.nextSibling; - while (node) { - nextSibling = node.nextSibling; - last = node === end; - - // if this is the last node, and we want to remove it as well, - // set the `end` node to the next sibling. This is because - // for the rest of the function, we insert the new nodes - // before the end (note that insertBefore(node, null) is - // the same as appendChild(node)). - // - // if we do not want to remove it, just break. - if (last) { - if (outerToo) { - end = node.nextSibling; - } else { - break; - } - } - - node.parentNode.removeChild(node); - - // if this is the last node and we didn't break before - // (because we wanted to remove the outer nodes), break - // now. - if (last) { - break; - } - - node = nextSibling; - } - - // get the first node for the HTML string, even in cases like - // tables and lists where a simple innerHTML on a div would - // swallow some of the content. - node = firstNodeFor(start.parentNode, html); - - // copy the nodes for the HTML between the starting and ending - // placeholder. - while (node) { - nextSibling = node.nextSibling; - parentNode.insertBefore(node, end); - node = nextSibling; - } - }; - - // remove the nodes in the DOM representing this metamorph. - // - // this includes the starting and ending placeholders. - removeFunc = function () { - var start = realNode(document.getElementById(this.start)); - var end = document.getElementById(this.end); - - this.html(''); - start.parentNode.removeChild(start); - end.parentNode.removeChild(end); - }; - - appendToFunc = function (parentNode) { - var node = firstNodeFor(parentNode, this.outerHTML()); - - while (node) { - nextSibling = node.nextSibling; - parentNode.appendChild(node); - node = nextSibling; - } - }; - - afterFunc = function (html) { - // get the real starting node. see realNode for details. - var end = document.getElementById(this.end); - var insertBefore = end.nextSibling; - var parentNode = end.parentNode; - var nextSibling; - var node; - - // get the first node for the HTML string, even in cases like - // tables and lists where a simple innerHTML on a div would - // swallow some of the content. - node = firstNodeFor(parentNode, html); - - // copy the nodes for the HTML between the starting and ending - // placeholder. - while (node) { - nextSibling = node.nextSibling; - parentNode.insertBefore(node, insertBefore); - node = nextSibling; - } - }; - - prependFunc = function (html) { - var start = document.getElementById(this.start); - var parentNode = start.parentNode; - var nextSibling; - var node; - - node = firstNodeFor(parentNode, html); - var insertBefore = start.nextSibling; - - while (node) { - nextSibling = node.nextSibling; - parentNode.insertBefore(node, insertBefore); - node = nextSibling; - } - } - } - - Metamorph.prototype.html = function (html) { - this.checkRemoved(); - if (html === undefined) { - return this.innerHTML; - } - - htmlFunc.call(this, html); - - this.innerHTML = html; - }; - - Metamorph.prototype.replaceWith = function (html) { - this.checkRemoved(); - htmlFunc.call(this, html, true); - }; - - Metamorph.prototype.remove = removeFunc; - Metamorph.prototype.outerHTML = outerHTMLFunc; - Metamorph.prototype.appendTo = appendToFunc; - Metamorph.prototype.after = afterFunc; - Metamorph.prototype.prepend = prependFunc; - Metamorph.prototype.startTag = startTagFunc; - Metamorph.prototype.endTag = endTagFunc; - - Metamorph.prototype.isRemoved = function () { - var before = document.getElementById(this.start); - var after = document.getElementById(this.end); - - return !before || !after; - }; - - Metamorph.prototype.checkRemoved = function () { - if (this.isRemoved()) { - throw new Error("Cannot perform operations on a Metamorph that is not in the DOM."); - } - }; - - window.Metamorph = Metamorph; - })(this); - - -})(); - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Handlebars */ - /** - @namespace - @name Handlebars - @private - */ - - /** - @namespace - @name Handlebars.helpers - @description Helpers for Handlebars templates - */ - - /** - @class - - Prepares the Handlebars templating library for use inside Ember's view - system. - - The Ember.Handlebars object is the standard Handlebars library, extended to use - Ember's get() method instead of direct property access, which allows - computed properties to be used inside templates. - - To use Ember.Handlebars, call Ember.Handlebars.compile(). This will return a - function that you can call multiple times, with a context object as the first - parameter: - - var template = Ember.Handlebars.compile("my {{cool}} template"); - var result = template({ - cool: "awesome" - }); - - console.log(result); // prints "my awesome template" - - Note that you won't usually need to use Ember.Handlebars yourself. Instead, use - Ember.View, which takes care of integration into the view layer for you. - */ - Ember.Handlebars = Ember.create(Handlebars); - - Ember.Handlebars.helpers = Ember.create(Handlebars.helpers); - - /** - Override the the opcode compiler and JavaScript compiler for Handlebars. - */ - Ember.Handlebars.Compiler = function () { - }; - Ember.Handlebars.Compiler.prototype = Ember.create(Handlebars.Compiler.prototype); - Ember.Handlebars.Compiler.prototype.compiler = Ember.Handlebars.Compiler; - - Ember.Handlebars.JavaScriptCompiler = function () { - }; - Ember.Handlebars.JavaScriptCompiler.prototype = Ember.create(Handlebars.JavaScriptCompiler.prototype); - Ember.Handlebars.JavaScriptCompiler.prototype.compiler = Ember.Handlebars.JavaScriptCompiler; - Ember.Handlebars.JavaScriptCompiler.prototype.namespace = "Ember.Handlebars"; - - - Ember.Handlebars.JavaScriptCompiler.prototype.initializeBuffer = function () { - return "''"; - }; - - /** - Override the default buffer for Ember Handlebars. By default, Handlebars creates - an empty String at the beginning of each invocation and appends to it. Ember's - Handlebars overrides this to append to a single shared buffer. - - @private - */ - Ember.Handlebars.JavaScriptCompiler.prototype.appendToBuffer = function (string) { - return "data.buffer.push(" + string + ");"; - }; - - /** - Rewrite simple mustaches from {{foo}} to {{bind "foo"}}. This means that all simple - mustaches in Ember's Handlebars will also set up an observer to keep the DOM - up to date when the underlying property changes. - - @private - */ - Ember.Handlebars.Compiler.prototype.mustache = function (mustache) { - if (mustache.params.length || mustache.hash) { - return Handlebars.Compiler.prototype.mustache.call(this, mustache); - } else { - var id = new Handlebars.AST.IdNode(['_triageMustache']); - - // Update the mustache node to include a hash value indicating whether the original node - // was escaped. This will allow us to properly escape values when the underlying value - // changes and we need to re-render the value. - if (mustache.escaped) { - mustache.hash = mustache.hash || new Handlebars.AST.HashNode([]); - mustache.hash.pairs.push(["escaped", new Handlebars.AST.StringNode("true")]); - } - mustache = new Handlebars.AST.MustacheNode([id].concat([mustache.id]), mustache.hash, !mustache.escaped); - return Handlebars.Compiler.prototype.mustache.call(this, mustache); - } - }; - - /** - Used for precompilation of Ember Handlebars templates. This will not be used during normal - app execution. - - @param {String} string The template to precompile - */ - Ember.Handlebars.precompile = function (string) { - var ast = Handlebars.parse(string); - var options = { data: true, stringParams: true }; - var environment = new Ember.Handlebars.Compiler().compile(ast, options); - return new Ember.Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true); - }; - - /** - The entry point for Ember Handlebars. This replaces the default Handlebars.compile and turns on - template-local data and String parameters. - - @param {String} string The template to compile - */ - Ember.Handlebars.compile = function (string) { - var ast = Handlebars.parse(string); - var options = { data: true, stringParams: true }; - var environment = new Ember.Handlebars.Compiler().compile(ast, options); - var templateSpec = new Ember.Handlebars.JavaScriptCompiler().compile(environment, options, undefined, true); - - return Handlebars.template(templateSpec); - }; - - /** - If a path starts with a reserved keyword, returns the root - that should be used. - - @private - */ - var normalizePath = Ember.Handlebars.normalizePath = function (root, path, data) { - var keywords = (data && data.keywords) || {}, - keyword, isKeyword; - - // Get the first segment of the path. For example, if the - // path is "foo.bar.baz", returns "foo". - keyword = path.split('.', 1)[0]; - - // Test to see if the first path is a keyword that has been - // passed along in the view's data hash. If so, we will treat - // that object as the new root. - if (keywords.hasOwnProperty(keyword)) { - // Look up the value in the template's data hash. - root = keywords[keyword]; - isKeyword = true; - - // Handle cases where the entire path is the reserved - // word. In that case, return the object itself. - if (path === keyword) { - path = ''; - } else { - // Strip the keyword from the path and look up - // the remainder from the newly found root. - path = path.substr(keyword.length); - } - } - - return { root: root, path: path, isKeyword: isKeyword }; - }; - /** - Lookup both on root and on window. If the path starts with - a keyword, the corresponding object will be looked up in the - template's data hash and used to resolve the path. - - @param {Object} root The object to look up the property on - @param {String} path The path to be lookedup - @param {Object} options The template's option hash - */ - - Ember.Handlebars.getPath = function (root, path, options) { - var data = options && options.data, - normalizedPath = normalizePath(root, path, data), - value; - - // In cases where the path begins with a keyword, change the - // root to the value represented by that keyword, and ensure - // the path is relative to it. - root = normalizedPath.root; - path = normalizedPath.path; - - // TODO: Remove this `false` when the `getPath` globals support is removed - value = Ember.getPath(root, path, false); - - if (value === undefined && root !== window && Ember.isGlobalPath(path)) { - value = Ember.getPath(window, path); - } - return value; - }; - - /** - Registers a helper in Handlebars that will be called if no property with the - given name can be found on the current context object, and no helper with - that name is registered. - - This throws an exception with a more helpful error message so the user can - track down where the problem is happening. - - @name Handlebars.helpers.helperMissing - @param {String} path - @param {Hash} options - */ - Ember.Handlebars.registerHelper('helperMissing', function (path, options) { - var error, view = ""; - - error = "%@ Handlebars error: Could not find property '%@' on object %@."; - if (options.data) { - view = options.data.view; - } - throw new Ember.Error(Ember.String.fmt(error, [view, path, this])); - }); - - -})(); - - -(function () { - - Ember.String.htmlSafe = function (str) { - return new Handlebars.SafeString(str); - }; - - var htmlSafe = Ember.String.htmlSafe; - - if (Ember.EXTEND_PROTOTYPES) { - - /** - @see Ember.String.htmlSafe - */ - String.prototype.htmlSafe = function () { - return htmlSafe(this); - }; - - } - -})(); - - -(function () { - /*jshint newcap:false*/ - var set = Ember.set, get = Ember.get, getPath = Ember.getPath; - - var DOMManager = { - remove: function (view) { - var morph = view.morph; - if (morph.isRemoved()) { - return; - } - set(view, 'element', null); - view._lastInsert = null; - morph.remove(); - }, - - prepend: function (view, childView) { - childView._insertElementLater(function () { - var morph = view.morph; - morph.prepend(childView.outerHTML); - childView.outerHTML = null; - }); - }, - - after: function (view, nextView) { - nextView._insertElementLater(function () { - var morph = view.morph; - morph.after(nextView.outerHTML); - nextView.outerHTML = null; - }); - }, - - replace: function (view) { - var morph = view.morph; - - view.transitionTo('preRender'); - view.clearRenderedChildren(); - var buffer = view.renderToBuffer(); - - Ember.run.schedule('render', this, function () { - if (get(view, 'isDestroyed')) { - return; - } - view.invalidateRecursively('element'); - view._notifyWillInsertElement(); - morph.replaceWith(buffer.string()); - view.transitionTo('inDOM'); - view._notifyDidInsertElement(); - }); - }, - - empty: function (view) { - view.morph.html(""); - } - }; - -// The `morph` and `outerHTML` properties are internal only -// and not observable. - - Ember.Metamorph = Ember.Mixin.create({ - isVirtual: true, - tagName: '', - - init: function () { - this._super(); - this.morph = Metamorph(); - }, - - beforeRender: function (buffer) { - buffer.push(this.morph.startTag()); - }, - - afterRender: function (buffer) { - buffer.push(this.morph.endTag()); - }, - - createElement: function () { - var buffer = this.renderToBuffer(); - this.outerHTML = buffer.string(); - this.clearBuffer(); - }, - - domManager: DOMManager - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Handlebars */ - - var get = Ember.get, set = Ember.set, getPath = Ember.Handlebars.getPath; - /** - @ignore - @private - @class - - Ember._BindableSpanView is a private view created by the Handlebars `{{bind}}` - helpers that is used to keep track of bound properties. - - Every time a property is bound using a `{{mustache}}`, an anonymous subclass - of Ember._BindableSpanView is created with the appropriate sub-template and - context set up. When the associated property changes, just the template for - this view will re-render. - */ - Ember._BindableSpanView = Ember.View.extend(Ember.Metamorph, - /** @scope Ember._BindableSpanView.prototype */{ - - /** - The function used to determine if the `displayTemplate` or - `inverseTemplate` should be rendered. This should be a function that takes - a value and returns a Boolean. - - @type Function - @default null - */ - shouldDisplayFunc: null, - - /** - Whether the template rendered by this view gets passed the context object - of its parent template, or gets passed the value of retrieving `property` - from the previous context. - - For example, this is true when using the `{{#if}}` helper, because the - template inside the helper should look up properties relative to the same - object as outside the block. This would be false when used with `{{#with - foo}}` because the template should receive the object found by evaluating - `foo`. - - @type Boolean - @default false - */ - preserveContext: false, - - /** - The template to render when `shouldDisplayFunc` evaluates to true. - - @type Function - @default null - */ - displayTemplate: null, - - /** - The template to render when `shouldDisplayFunc` evaluates to false. - - @type Function - @default null - */ - inverseTemplate: null, - - /** - The key to look up on `previousContext` that is passed to - `shouldDisplayFunc` to determine which template to render. - - In addition, if `preserveContext` is false, this object will be passed to - the template when rendering. - - @type String - @default null - */ - property: null, - - normalizedValue: Ember.computed(function () { - var property = get(this, 'property'), - context = get(this, 'previousContext'), - valueNormalizer = get(this, 'valueNormalizerFunc'), - result, templateData; - - // Use the current context as the result if no - // property is provided. - if (property === '') { - result = context; - } else { - templateData = get(this, 'templateData'); - result = getPath(context, property, { data: templateData }); - } - - return valueNormalizer ? valueNormalizer(result) : result; - }).property('property', 'previousContext', 'valueNormalizerFunc').volatile(), - - rerenderIfNeeded: function () { - if (!get(this, 'isDestroyed') && get(this, 'normalizedValue') !== this._lastNormalizedValue) { - this.rerender(); - } - }, - - /** - Determines which template to invoke, sets up the correct state based on - that logic, then invokes the default Ember.View `render` implementation. - - This method will first look up the `property` key on `previousContext`, - then pass that value to the `shouldDisplayFunc` function. If that returns - true, the `displayTemplate` function will be rendered to DOM. Otherwise, - `inverseTemplate`, if specified, will be rendered. - - For example, if this Ember._BindableSpan represented the {{#with foo}} - helper, it would look up the `foo` property of its context, and - `shouldDisplayFunc` would always return true. The object found by looking - up `foo` would be passed to `displayTemplate`. - - @param {Ember.RenderBuffer} buffer - */ - render: function (buffer) { - // If not invoked via a triple-mustache ({{{foo}}}), escape - // the content of the template. - var escape = get(this, 'isEscaped'); - - var shouldDisplay = get(this, 'shouldDisplayFunc'), - preserveContext = get(this, 'preserveContext'), - context = get(this, 'previousContext'); - - var inverseTemplate = get(this, 'inverseTemplate'), - displayTemplate = get(this, 'displayTemplate'); - - var result = get(this, 'normalizedValue'); - this._lastNormalizedValue = result; - - // First, test the conditional to see if we should - // render the template or not. - if (shouldDisplay(result)) { - set(this, 'template', displayTemplate); - - // If we are preserving the context (for example, if this - // is an #if block, call the template with the same object. - if (preserveContext) { - set(this, '_templateContext', context); - } else { - // Otherwise, determine if this is a block bind or not. - // If so, pass the specified object to the template - if (displayTemplate) { - set(this, '_templateContext', result); - } else { - // This is not a bind block, just push the result of the - // expression to the render context and return. - if (result === null || result === undefined) { - result = ""; - } else if (!(result instanceof Handlebars.SafeString)) { - result = String(result); - } - - if (escape) { - result = Handlebars.Utils.escapeExpression(result); - } - buffer.push(result); - return; - } - } - } else if (inverseTemplate) { - set(this, 'template', inverseTemplate); - - if (preserveContext) { - set(this, '_templateContext', context); - } else { - set(this, '_templateContext', result); - } - } else { - set(this, 'template', function () { - return ''; - }); - } - - return this._super(buffer); - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, getPath = Ember.Handlebars.getPath, set = Ember.set, fmt = Ember.String.fmt; - var forEach = Ember.ArrayUtils.forEach; - - var EmberHandlebars = Ember.Handlebars, helpers = EmberHandlebars.helpers; - - (function () { - // Binds a property into the DOM. This will create a hook in DOM that the - // KVO system will look for and update if the property changes. - var bind = function (property, options, preserveContext, shouldDisplay, valueNormalizer) { - var data = options.data, - fn = options.fn, - inverse = options.inverse, - view = data.view, - ctx = this, - normalized; - - normalized = Ember.Handlebars.normalizePath(ctx, property, data); - - ctx = normalized.root; - property = normalized.path; - - // Set up observers for observable objects - if ('object' === typeof this) { - // Create the view that will wrap the output of this template/property - // and add it to the nearest view's childViews array. - // See the documentation of Ember._BindableSpanView for more. - var bindView = view.createChildView(Ember._BindableSpanView, { - preserveContext: preserveContext, - shouldDisplayFunc: shouldDisplay, - valueNormalizerFunc: valueNormalizer, - displayTemplate: fn, - inverseTemplate: inverse, - property: property, - previousContext: ctx, - isEscaped: options.hash.escaped, - templateData: options.data - }); - - view.appendChild(bindView); - - /** @private */ - var observer = function () { - Ember.run.once(bindView, 'rerenderIfNeeded'); - }; - - // Observes the given property on the context and - // tells the Ember._BindableSpan to re-render. If property - // is an empty string, we are printing the current context - // object ({{this}}) so updating it is not our responsibility. - if (property !== '') { - Ember.addObserver(ctx, property, observer); - } - } else { - // The object is not observable, so just render it out and - // be done with it. - data.buffer.push(getPath(this, property, options)); - } - }; - - /** - '_triageMustache' is used internally select between a binding and helper for - the given context. Until this point, it would be hard to determine if the - mustache is a property reference or a regular helper reference. This triage - helper resolves that. - - This would not be typically invoked by directly. - - @private - @name Handlebars.helpers._triageMustache - @param {String} property Property/helperID to triage - @param {Function} fn Context to provide for rendering - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('_triageMustache', function (property, fn) { - ember_assert("You cannot pass more than one argument to the _triageMustache helper", arguments.length <= 2); - if (helpers[property]) { - return helpers[property].call(this, fn); - } - else { - return helpers.bind.apply(this, arguments); - } - }); - - /** - `bind` can be used to display a value, then update that value if it - changes. For example, if you wanted to print the `title` property of - `content`: - - {{bind "content.title"}} - - This will return the `title` property as a string, then create a new - observer at the specified path. If it changes, it will update the value in - DOM. Note that if you need to support IE7 and IE8 you must modify the - model objects properties using Ember.get() and Ember.set() for this to work as - it relies on Ember's KVO system. For all other browsers this will be handled - for you automatically. - - @private - @name Handlebars.helpers.bind - @param {String} property Property to bind - @param {Function} fn Context to provide for rendering - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('bind', function (property, fn) { - ember_assert("You cannot pass more than one argument to the bind helper", arguments.length <= 2); - - var context = (fn.contexts && fn.contexts[0]) || this; - - return bind.call(context, property, fn, false, function (result) { - return !Ember.none(result); - }); - }); - - /** - Use the `boundIf` helper to create a conditional that re-evaluates - whenever the bound value changes. - - {{#boundIf "content.shouldDisplayTitle"}} - {{content.title}} - {{/boundIf}} - - @private - @name Handlebars.helpers.boundIf - @param {String} property Property to bind - @param {Function} fn Context to provide for rendering - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('boundIf', function (property, fn) { - var context = (fn.contexts && fn.contexts[0]) || this; - var func = function (result) { - if (Ember.typeOf(result) === 'array') { - return get(result, 'length') !== 0; - } else { - return !!result; - } - }; - - return bind.call(context, property, fn, true, func, func); - }); - })(); - - /** - @name Handlebars.helpers.with - @param {Function} context - @param {Hash} options - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('with', function (context, options) { - ember_assert("You must pass exactly one argument to the with helper", arguments.length === 2); - ember_assert("You must pass a block to the with helper", options.fn && options.fn !== Handlebars.VM.noop); - - return helpers.bind.call(options.contexts[0], context, options); - }); - - - /** - @name Handlebars.helpers.if - @param {Function} context - @param {Hash} options - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('if', function (context, options) { - ember_assert("You must pass exactly one argument to the if helper", arguments.length === 2); - ember_assert("You must pass a block to the if helper", options.fn && options.fn !== Handlebars.VM.noop); - - return helpers.boundIf.call(options.contexts[0], context, options); - }); - - /** - @name Handlebars.helpers.unless - @param {Function} context - @param {Hash} options - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('unless', function (context, options) { - ember_assert("You must pass exactly one argument to the unless helper", arguments.length === 2); - ember_assert("You must pass a block to the unless helper", options.fn && options.fn !== Handlebars.VM.noop); - - var fn = options.fn, inverse = options.inverse; - - options.fn = inverse; - options.inverse = fn; - - return helpers.boundIf.call(options.contexts[0], context, options); - }); - - /** - `bindAttr` allows you to create a binding between DOM element attributes and - Ember objects. For example: - - <img {{bindAttr src="imageUrl" alt="imageTitle"}}> - - @name Handlebars.helpers.bindAttr - @param {Hash} options - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('bindAttr', function (options) { - - var attrs = options.hash; - - ember_assert("You must specify at least one hash argument to bindAttr", !!Ember.keys(attrs).length); - - var view = options.data.view; - var ret = []; - var ctx = this; - - // Generate a unique id for this element. This will be added as a - // data attribute to the element so it can be looked up when - // the bound property changes. - var dataId = ++Ember.$.uuid; - - // Handle classes differently, as we can bind multiple classes - var classBindings = attrs['class']; - if (classBindings !== null && classBindings !== undefined) { - var classResults = EmberHandlebars.bindClasses(this, classBindings, view, dataId, options); - ret.push('class="' + Handlebars.Utils.escapeExpression(classResults.join(' ')) + '"'); - delete attrs['class']; - } - - var attrKeys = Ember.keys(attrs); - - // For each attribute passed, create an observer and emit the - // current value of the property as an attribute. - forEach(attrKeys, function (attr) { - var property = attrs[attr]; - - ember_assert(fmt("You must provide a String for a bound attribute, not %@", [property]), typeof property === 'string'); - - var value = (property === 'this') ? ctx : getPath(ctx, property, options), - type = Ember.typeOf(value); - - ember_assert(fmt("Attributes must be numbers, strings or booleans, not %@", [value]), value === null || value === undefined || type === 'number' || type === 'string' || type === 'boolean'); - - var observer, invoker; - - /** @private */ - observer = function observer() { - var result = getPath(ctx, property, options); - - ember_assert(fmt("Attributes must be numbers, strings or booleans, not %@", [result]), result === null || result === undefined || typeof result === 'number' || typeof result === 'string' || typeof result === 'boolean'); - - var elem = view.$("[data-bindattr-" + dataId + "='" + dataId + "']"); - - // If we aren't able to find the element, it means the element - // to which we were bound has been removed from the view. - // In that case, we can assume the template has been re-rendered - // and we need to clean up the observer. - if (elem.length === 0) { - Ember.removeObserver(ctx, property, invoker); - return; - } - - Ember.View.applyAttributeBindings(elem, attr, result); - }; - - /** @private */ - invoker = function () { - Ember.run.once(observer); - }; - - // Add an observer to the view for when the property changes. - // When the observer fires, find the element using the - // unique data id and update the attribute to the new value. - if (property !== 'this') { - Ember.addObserver(ctx, property, invoker); - } - - // if this changes, also change the logic in ember-views/lib/views/view.js - if ((type === 'string' || (type === 'number' && !isNaN(value)))) { - ret.push(attr + '="' + Handlebars.Utils.escapeExpression(value) + '"'); - } else if (value && type === 'boolean') { - // The developer controls the attr name, so it should always be safe - ret.push(attr + '="' + attr + '"'); - } - }, this); - - // Add the unique identifier - // NOTE: We use all lower-case since Firefox has problems with mixed case in SVG - ret.push('data-bindattr-' + dataId + '="' + dataId + '"'); - return new EmberHandlebars.SafeString(ret.join(' ')); - }); - - /** - Helper that, given a space-separated string of property paths and a context, - returns an array of class names. Calling this method also has the side - effect of setting up observers at those property paths, such that if they - change, the correct class name will be reapplied to the DOM element. - - For example, if you pass the string "fooBar", it will first look up the - "fooBar" value of the context. If that value is true, it will add the - "foo-bar" class to the current element (i.e., the dasherized form of - "fooBar"). If the value is a string, it will add that string as the class. - Otherwise, it will not add any new class name. - - @param {Ember.Object} context - The context from which to lookup properties - - @param {String} classBindings - A string, space-separated, of class bindings to use - - @param {Ember.View} view - The view in which observers should look for the element to update - - @param {Srting} bindAttrId - Optional bindAttr id used to lookup elements - - @returns {Array} An array of class names to add - */ - EmberHandlebars.bindClasses = function (context, classBindings, view, bindAttrId, options) { - var ret = [], newClass, value, elem; - - // Helper method to retrieve the property from the context and - // determine which class string to return, based on whether it is - // a Boolean or not. - var classStringForProperty = function (property) { - var split = property.split(':'), - className = split[1]; - - property = split[0]; - - var val = property !== '' ? getPath(context, property, options) : true; - - // If the value is truthy and we're using the colon syntax, - // we should return the className directly - if (!!val && className) { - return className; - - // If value is a Boolean and true, return the dasherized property - // name. - } else if (val === true) { - // Normalize property path to be suitable for use - // as a class name. For exaple, content.foo.barBaz - // becomes bar-baz. - var parts = property.split('.'); - return Ember.String.dasherize(parts[parts.length - 1]); - - // If the value is not false, undefined, or null, return the current - // value of the property. - } else if (val !== false && val !== undefined && val !== null) { - return val; - - // Nothing to display. Return null so that the old class is removed - // but no new class is added. - } else { - return null; - } - }; - - // For each property passed, loop through and setup - // an observer. - forEach(classBindings.split(' '), function (binding) { - - // Variable in which the old class value is saved. The observer function - // closes over this variable, so it knows which string to remove when - // the property changes. - var oldClass; - - var observer, invoker; - - // Set up an observer on the context. If the property changes, toggle the - // class name. - /** @private */ - observer = function () { - // Get the current value of the property - newClass = classStringForProperty(binding); - elem = bindAttrId ? view.$("[data-bindattr-" + bindAttrId + "='" + bindAttrId + "']") : view.$(); - - // If we can't find the element anymore, a parent template has been - // re-rendered and we've been nuked. Remove the observer. - if (elem.length === 0) { - Ember.removeObserver(context, binding, invoker); - } else { - // If we had previously added a class to the element, remove it. - if (oldClass) { - elem.removeClass(oldClass); - } - - // If necessary, add a new class. Make sure we keep track of it so - // it can be removed in the future. - if (newClass) { - elem.addClass(newClass); - oldClass = newClass; - } else { - oldClass = null; - } - } - }; - - /** @private */ - invoker = function () { - Ember.run.once(observer); - }; - - var property = binding.split(':')[0]; - if (property !== '') { - Ember.addObserver(context, property, invoker); - } - - // We've already setup the observer; now we just need to figure out the - // correct behavior right now on the first pass through. - value = classStringForProperty(binding); - - if (value) { - ret.push(value); - - // Make sure we save the current value so that it can be removed if the - // observer fires. - oldClass = value; - } - }); - - return ret; - }; - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Handlebars ember_assert */ - -// TODO: Don't require the entire module - var get = Ember.get, set = Ember.set; - var indexOf = Ember.ArrayUtils.indexOf; - var PARENT_VIEW_PATH = /^parentView\./; - var EmberHandlebars = Ember.Handlebars; - - /** @private */ - EmberHandlebars.ViewHelper = Ember.Object.create({ - - viewClassFromHTMLOptions: function (viewClass, options, thisContext) { - var hash = options.hash, data = options.data; - var extensions = {}, - classes = hash['class'], - dup = false; - - if (hash.id) { - extensions.elementId = hash.id; - dup = true; - } - - if (classes) { - classes = classes.split(' '); - extensions.classNames = classes; - dup = true; - } - - if (hash.classBinding) { - extensions.classNameBindings = hash.classBinding.split(' '); - dup = true; - } - - if (hash.classNameBindings) { - extensions.classNameBindings = hash.classNameBindings.split(' '); - dup = true; - } - - if (hash.attributeBindings) { - ember_assert("Setting 'attributeBindings' via Handlebars is not allowed. Please subclass Ember.View and set it there instead."); - extensions.attributeBindings = null; - dup = true; - } - - if (dup) { - hash = Ember.$.extend({}, hash); - delete hash.id; - delete hash['class']; - delete hash.classBinding; - } - - // Look for bindings passed to the helper and, if they are - // local, make them relative to the current context instead of the - // view. - var path, normalized; - - for (var prop in hash) { - if (!hash.hasOwnProperty(prop)) { - continue; - } - - // Test if the property ends in "Binding" - if (Ember.IS_BINDING.test(prop)) { - path = hash[prop]; - - normalized = Ember.Handlebars.normalizePath(null, path, data); - if (normalized.isKeyword) { - hash[prop] = 'templateData.keywords.' + path; - } else if (!Ember.isGlobalPath(path)) { - if (path === 'this') { - hash[prop] = 'bindingContext'; - } else { - hash[prop] = 'bindingContext.' + path; - } - } - } - } - - // Make the current template context available to the view - // for the bindings set up above. - extensions.bindingContext = thisContext; - - return viewClass.extend(hash, extensions); - }, - - helper: function (thisContext, path, options) { - var inverse = options.inverse, - data = options.data, - view = data.view, - fn = options.fn, - hash = options.hash, - newView; - - if ('string' === typeof path) { - newView = EmberHandlebars.getPath(thisContext, path, options); - ember_assert("Unable to find view at path '" + path + "'", !!newView); - } else { - newView = path; - } - - ember_assert(Ember.String.fmt('You must pass a view class to the #view helper, not %@ (%@)', [path, newView]), Ember.View.detect(newView)); - - newView = this.viewClassFromHTMLOptions(newView, options, thisContext); - var currentView = data.view; - var viewOptions = { - templateData: options.data - }; - - if (fn) { - ember_assert("You cannot provide a template block if you also specified a templateName", !get(viewOptions, 'templateName') && !get(newView.proto(), 'templateName')); - viewOptions.template = fn; - } - - currentView.appendChild(newView, viewOptions); - } - }); - - /** - `{{view}}` inserts a new instance of `Ember.View` into a template passing its options - to the `Ember.View`'s `create` method and using the supplied block as the view's own template. - - An empty `<body>` and the following template: - - <script type="text/x-handlebars"> - A span: - {{#view tagName="span"}} - hello. - {{/view}} - </script> - - Will result in HTML structure: - - <body> - <!-- Note: the handlebars template script - also results in a rendered Ember.View - which is the outer <div> here --> - - <div class="ember-view"> - A span: - <span id="ember1" class="ember-view"> - Hello. - </span> - </div> - </body> - - ### parentView setting - The `parentView` property of the new `Ember.View` instance created through `{{view}}` - will be set to the `Ember.View` instance of the template where `{{view}}` was called. - - aView = Ember.View.create({ - template: Ember.Handlebars.compile("{{#view}} my parent: {{parentView.elementId}} {{/view}}") - }) - - aView.appendTo('body') - - Will result in HTML structure: - - <div id="ember1" class="ember-view"> - <div id="ember2" class="ember-view"> - my parent: ember1 - </div> - </div> - - - - ### Setting CSS id and class attributes - The HTML `id` attribute can be set on the `{{view}}`'s resulting element with the `id` option. - This option will _not_ be passed to `Ember.View.create`. - - <script type="text/x-handlebars"> - {{#view tagName="span" id="a-custom-id"}} - hello. - {{/view}} - </script> - - Results in the following HTML structure: - - <div class="ember-view"> - <span id="a-custom-id" class="ember-view"> - hello. - </span> - </div> - - The HTML `class` attribute can be set on the `{{view}}`'s resulting element with - the `class` or `classNameBindings` options. The `class` option - will directly set the CSS `class` attribute and will not be passed to - `Ember.View.create`. `classNameBindings` will be passed to `create` and use - `Ember.View`'s class name binding functionality: - - <script type="text/x-handlebars"> - {{#view tagName="span" class="a-custom-class"}} - hello. - {{/view}} - </script> - - Results in the following HTML structure: - - <div class="ember-view"> - <span id="ember2" class="ember-view a-custom-class"> - hello. - </span> - </div> - - ### Supplying a different view class - `{{view}}` can take an optional first argument before its supplied options to specify a - path to a custom view class. - - <script type="text/x-handlebars"> - {{#view "MyApp.CustomView"}} - hello. - {{/view}} - </script> - - The first argument can also be a relative path. Ember will search for the view class - starting at the `Ember.View` of the template where `{{view}}` was used as the root object: - - - MyApp = Ember.Application.create({}) - MyApp.OuterView = Ember.View.extend({ - innerViewClass: Ember.View.extend({ - classNames: ['a-custom-view-class-as-property'] - }), - template: Ember.Handlebars.compile('{{#view "innerViewClass"}} hi {{/view}}') - }) - - MyApp.OuterView.create().appendTo('body') - - Will result in the following HTML: - - <div id="ember1" class="ember-view"> - <div id="ember2" class="ember-view a-custom-view-class-as-property"> - hi - </div> - </div> - - ### Blockless use - If you supply a custom `Ember.View` subclass that specifies its own template - or provide a `templateName` option to `{{view}}` it can be used without supplying a block. - Attempts to use both a `templateName` option and supply a block will throw an error. - - <script type="text/x-handlebars"> - {{view "MyApp.ViewWithATemplateDefined"}} - </script> - - ### viewName property - You can supply a `viewName` option to `{{view}}`. The `Ember.View` instance will - be referenced as a property of its parent view by this name. - - aView = Ember.View.create({ - template: Ember.Handlebars.compile('{{#view viewName="aChildByName"}} hi {{/view}}') - }) - - aView.appendTo('body') - aView.get('aChildByName') // the instance of Ember.View created by {{view}} helper - - @name Handlebars.helpers.view - @param {String} path - @param {Hash} options - @returns {String} HTML string - */ - EmberHandlebars.registerHelper('view', function (path, options) { - ember_assert("The view helper only takes a single argument", arguments.length <= 2); - - // If no path is provided, treat path param as options. - if (path && path.data && path.data.isRenderData) { - options = path; - path = "Ember.View"; - } - - return EmberHandlebars.ViewHelper.helper(this, path, options); - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Handlebars ember_assert */ - -// TODO: Don't require all of this module - var get = Ember.get, getPath = Ember.Handlebars.getPath, fmt = Ember.String.fmt; - - /** - @name Handlebars.helpers.collection - @param {String} path - @param {Hash} options - @returns {String} HTML string - - `{{collection}}` is a `Ember.Handlebars` helper for adding instances of - `Ember.CollectionView` to a template. See `Ember.CollectionView` for additional - information on how a `CollectionView` functions. - - `{{collection}}`'s primary use is as a block helper with a `contentBinding` option - pointing towards an `Ember.Array`-compatible object. An `Ember.View` instance will - be created for each item in its `content` property. Each view will have its own - `content` property set to the appropriate item in the collection. - - The provided block will be applied as the template for each item's view. - - Given an empty `<body>` the following template: - - <script type="text/x-handlebars"> - {{#collection contentBinding="App.items"}} - Hi {{content.name}} - {{/collection}} - </script> - - And the following application code - - App = Ember.Application.create() - App.items = [ - Ember.Object.create({name: 'Dave'}), - Ember.Object.create({name: 'Mary'}), - Ember.Object.create({name: 'Sara'}) - ] - - Will result in the HTML structure below - - <div class="ember-view"> - <div class="ember-view">Hi Dave</div> - <div class="ember-view">Hi Mary</div> - <div class="ember-view">Hi Sara</div> - </div> - - ### Blockless Use - If you provide an `itemViewClass` option that has its own `template` you can omit - the block. - - The following template: - - <script type="text/x-handlebars"> - {{collection contentBinding="App.items" itemViewClass="App.AnItemView"}} - </script> - - And application code - - App = Ember.Application.create() - App.items = [ - Ember.Object.create({name: 'Dave'}), - Ember.Object.create({name: 'Mary'}), - Ember.Object.create({name: 'Sara'}) - ] - - App.AnItemView = Ember.View.extend({ - template: Ember.Handlebars.compile("Greetings {{content.name}}") - }) - - Will result in the HTML structure below - - <div class="ember-view"> - <div class="ember-view">Greetings Dave</div> - <div class="ember-view">Greetings Mary</div> - <div class="ember-view">Greetings Sara</div> - </div> - - ### Specifying a CollectionView subclass - By default the `{{collection}}` helper will create an instance of `Ember.CollectionView`. - You can supply a `Ember.CollectionView` subclass to the helper by passing it - as the first argument: - - <script type="text/x-handlebars"> - {{#collection App.MyCustomCollectionClass contentBinding="App.items"}} - Hi {{content.name}} - {{/collection}} - </script> - - - ### Forwarded `item.*`-named Options - As with the `{{view}}`, helper options passed to the `{{collection}}` will be set on - the resulting `Ember.CollectionView` as properties. Additionally, options prefixed with - `item` will be applied to the views rendered for each item (note the camelcasing): - - <script type="text/x-handlebars"> - {{#collection contentBinding="App.items" - itemTagName="p" - itemClassNames="greeting"}} - Howdy {{content.name}} - {{/collection}} - </script> - - Will result in the following HTML structure: - - <div class="ember-view"> - <p class="ember-view greeting">Howdy Dave</p> - <p class="ember-view greeting">Howdy Mary</p> - <p class="ember-view greeting">Howdy Sara</p> - </div> - - - */ - Ember.Handlebars.registerHelper('collection', function (path, options) { - // If no path is provided, treat path param as options. - if (path && path.data && path.data.isRenderData) { - options = path; - path = undefined; - ember_assert("You cannot pass more than one argument to the collection helper", arguments.length === 1); - } else { - ember_assert("You cannot pass more than one argument to the collection helper", arguments.length === 2); - } - - var fn = options.fn; - var data = options.data; - var inverse = options.inverse; - - // If passed a path string, convert that into an object. - // Otherwise, just default to the standard class. - var collectionClass; - collectionClass = path ? getPath(this, path, options) : Ember.CollectionView; - ember_assert(fmt("%@ #collection: Could not find %@", data.view, path), !!collectionClass); - - var hash = options.hash, itemHash = {}, match; - - // Extract item view class if provided else default to the standard class - var itemViewClass, itemViewPath = hash.itemViewClass; - var collectionPrototype = collectionClass.proto(); - delete hash.itemViewClass; - itemViewClass = itemViewPath ? getPath(collectionPrototype, itemViewPath, options) : collectionPrototype.itemViewClass; - ember_assert(fmt("%@ #collection: Could not find %@", data.view, itemViewPath), !!itemViewClass); - - // Go through options passed to the {{collection}} helper and extract options - // that configure item views instead of the collection itself. - for (var prop in hash) { - if (hash.hasOwnProperty(prop)) { - match = prop.match(/^item(.)(.*)$/); - - if (match) { - // Convert itemShouldFoo -> shouldFoo - itemHash[match[1].toLowerCase() + match[2]] = hash[prop]; - // Delete from hash as this will end up getting passed to the - // {{view}} helper method. - delete hash[prop]; - } - } - } - - var tagName = hash.tagName || collectionPrototype.tagName; - - if (fn) { - itemHash.template = fn; - delete options.fn; - } - - if (inverse && inverse !== Handlebars.VM.noop) { - var emptyViewClass = Ember.View; - - if (hash.emptyViewClass) { - emptyViewClass = Ember.View.detect(hash.emptyViewClass) ? - hash.emptyViewClass : getPath(this, hash.emptyViewClass, options); - } - - hash.emptyView = emptyViewClass.extend({ - template: inverse, - tagName: itemHash.tagName - }); - } - - if (hash.preserveContext) { - itemHash._templateContext = Ember.computed(function () { - return get(this, 'content'); - }).property('content'); - delete hash.preserveContext; - } - - hash.itemViewClass = Ember.Handlebars.ViewHelper.viewClassFromHTMLOptions(itemViewClass, { data: data, hash: itemHash }, this); - - return Ember.Handlebars.helpers.view.call(this, collectionClass, options); - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Handlebars */ - var getPath = Ember.Handlebars.getPath; - - /** - `unbound` allows you to output a property without binding. *Important:* The - output will not be updated if the property changes. Use with caution. - - <div>{{unbound somePropertyThatDoesntChange}}</div> - - @name Handlebars.helpers.unbound - @param {String} property - @returns {String} HTML string - */ - Ember.Handlebars.registerHelper('unbound', function (property, fn) { - var context = (fn.contexts && fn.contexts[0]) || this; - return getPath(context, property, fn); - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - - /*jshint debug:true*/ - var getPath = Ember.getPath; - - /** - `log` allows you to output the value of a value in the current rendering - context. - - {{log myVariable}} - - @name Handlebars.helpers.log - @param {String} property - */ - Ember.Handlebars.registerHelper('log', function (property, fn) { - var context = (fn.contexts && fn.contexts[0]) || this; - Ember.Logger.log(getPath(context, property)); - }); - - /** - The `debugger` helper executes the `debugger` statement in the current - context. - - {{debugger}} - - @name Handlebars.helpers.debugger - @param {String} property - */ - Ember.Handlebars.registerHelper('debugger', function () { - debugger; - }); - -})(); - - -(function () { - Ember.Handlebars.EachView = Ember.CollectionView.extend(Ember.Metamorph, { - itemViewClass: Ember.View.extend(Ember.Metamorph) - }); - - Ember.Handlebars.registerHelper('each', function (path, options) { - options.hash.contentBinding = path; - options.hash.preserveContext = true; - - // Set up emptyView as a metamorph with no tag - options.hash.itemTagName = ''; - options.hash.emptyViewClass = Ember.View.extend(Ember.Metamorph); - - return Ember.Handlebars.helpers.collection.call(this, 'Ember.Handlebars.EachView', options); - }); - -})(); - - -(function () { - /** - `template` allows you to render a template from inside another template. - This allows you to re-use the same template in multiple places. For example: - - <script type="text/x-handlebars"> - {{#with loggedInUser}} - Last Login: {{lastLogin}} - User Info: {{template "user_info"}} - {{/with}} - </script> - - <script type="text/x-handlebars" data-template-name="user_info"> - Name: <em>{{name}}</em> - Karma: <em>{{karma}}</em> - </script> - - This helper looks for templates in the global Ember.TEMPLATES hash. If you - add <script> tags to your page with the `data-template-name` attribute set, - they will be compiled and placed in this hash automatically. - - You can also manually register templates by adding them to the hash: - - Ember.TEMPLATES["my_cool_template"] = Ember.Handlebars.compile('<b>{{user}}</b>'); - - @name Handlebars.helpers.template - @param {String} templateName the template to render - */ - - Ember.Handlebars.registerHelper('template', function (name, options) { - var template = Ember.TEMPLATES[name]; - - ember_assert("Unable to find template with name '" + name + "'.", !!template); - - Ember.TEMPLATES[name](this, { data: options.data }); - }); - -})(); - - -(function () { - var EmberHandlebars = Ember.Handlebars, getPath = EmberHandlebars.getPath; - - var ActionHelper = EmberHandlebars.ActionHelper = { - registeredActions: {} - }; - - ActionHelper.registerAction = function (actionName, eventName, target, view, context) { - var actionId = (++Ember.$.uuid).toString(); - - ActionHelper.registeredActions[actionId] = { - eventName: eventName, - handler: function (event) { - event.view = view; - event.context = context; - - // Check for StateManager (or compatible object) - if (target.isState && typeof target.send === 'function') { - return target.send(actionName, event); - } else { - return target[actionName].call(target, event); - } - } - }; - - view.on('willRerender', function () { - delete ActionHelper.registeredActions[actionId]; - }); - - return actionId; - }; - - /** - The `{{action}}` helper registers an HTML element within a template for - DOM event handling. User interaction with that element will call the method - on the template's associated `Ember.View` instance that has the same name - as the first provided argument to `{{action}}`: - - Given the following Handlebars template on the page - - <script type="text/x-handlebars" data-template-name='a-template'> - <div {{action "anActionName"}}> - click me - </div> - </script> - - And application code - - AView = Ember.View.extend({ - templateName; 'a-template', - anActionName: function(event){} - }) - - aView = AView.create() - aView.appendTo('body') - - Will results in the following rendered HTML - - <div class="ember-view"> - <div data-ember-action="1"> - click me - </div> - </div> - - Clicking "click me" will trigger the `anActionName` method of the `aView` object with a - `jQuery.Event` object as its argument. The `jQuery.Event` object will be extended to include - a `view` property that is set to the original view interacted with (in this case the `aView` object). - - - ### Specifying an Action Target - A `target` option can be provided to change which object will receive the method call. This option must be - a string representing a path to an object: - - <script type="text/x-handlebars" data-template-name='a-template'> - <div {{action "anActionName" target="MyApplication.someObject"}}> - click me - </div> - </script> - - Clicking "click me" in the rendered HTML of the above template will trigger the - `anActionName` method of the object at `MyApplication.someObject`. The first argument - to this method will be a `jQuery.Event` extended to include a `view` property that is - set to the original view interacted with. - - A path relative to the template's `Ember.View` instance can also be used as a target: - - <script type="text/x-handlebars" data-template-name='a-template'> - <div {{action "anActionName" target="parentView"}}> - click me - </div> - </script> - - Clicking "click me" in the rendered HTML of the above template will trigger the - `anActionName` method of the view's parent view. - - The `{{action}}` helper is `Ember.StateManager` aware. If the target of - the action is an `Ember.StateManager` instance `{{action}}` will use the `send` - functionality of StateManagers. The documentation for `Ember.StateManager` has additional - information about this use. - - If an action's target does not implement a method that matches the supplied action name - an error will be thrown. - - - <script type="text/x-handlebars" data-template-name='a-template'> - <div {{action "aMethodNameThatIsMissing"}}> - click me - </div> - </script> - - With the following application code - - AView = Ember.View.extend({ - templateName; 'a-template', - // note: no method 'aMethodNameThatIsMissing' - anActionName: function(event){} - }) - - aView = AView.create() - aView.appendTo('body') - - Will throw `Uncaught TypeError: Cannot call method 'call' of undefined` when "click me" is clicked. - - - ### Specifying DOM event type - By default the `{{action}}` helper registers for DOM `click` events. You can supply an - `on` option to the helper to specify a different DOM event name: - - <script type="text/x-handlebars" data-template-name='a-template'> - <div {{action "aMethodNameThatIsMissing" on="doubleClick"}}> - click me - </div> - </script> - - See `Ember.EventDispatcher` for a list of acceptable DOM event names. - - Because `{{action}}` depends on Ember's event dispatch system it will only function if - an `Ember.EventDispatcher` instance is available. An `Ember.EventDispatcher` instance - will be created when a new `Ember.Application` is created. Having an instance of - `Ember.Application` will satisfy this requirement. - - @name Handlebars.helpers.action - @param {String} actionName - @param {Hash} options - */ - EmberHandlebars.registerHelper('action', function (actionName, options) { - var hash = options.hash || {}, - eventName = hash.on || "click", - view = options.data.view, - target, context; - - if (view.isVirtual) { - view = view.get('parentView'); - } - target = hash.target ? getPath(this, hash.target, options) : view; - context = options.contexts[0]; - - var actionId = ActionHelper.registerAction(actionName, eventName, target, view, context); - return new EmberHandlebars.SafeString('data-ember-action="' + actionId + '"'); - }); - -})(); - - -(function () { - var get = Ember.get, set = Ember.set; - - /** - - When used in a Handlebars template that is assigned to an `Ember.View` instance's - `layout` property Ember will render the layout template first, inserting the view's - own rendered output at the `{{ yield }}` location. - - An empty `<body>` and the following application code: - - AView = Ember.View.extend({ - classNames: ['a-view-with-layout'], - layout: Ember.Handlebars.compile('<div class="wrapper">{{ yield }}</div>'), - template: Ember.Handlebars.compile('<span>I am wrapped</span>') - }) - - aView = AView.create() - aView.appendTo('body') - - Will result in the following HTML output: - - <body> - <div class='ember-view a-view-with-layout'> - <div class="wrapper"> - <span>I am wrapped</span> - </div> - </div> - </body> - - - The yield helper cannot be used outside of a template assigned to an `Ember.View`'s `layout` property - and will throw an error if attempted. - - BView = Ember.View.extend({ - classNames: ['a-view-with-layout'], - template: Ember.Handlebars.compile('{{yield}}') - }) - - bView = BView.create() - bView.appendTo('body') - - // throws - // Uncaught Error: assertion failed: You called yield in a template that was not a layout - - @name Handlebars.helpers.yield - @param {Hash} options - @returns {String} HTML string - */ - Ember.Handlebars.registerHelper('yield', function (options) { - var view = options.data.view, template; - - while (view && !get(view, 'layout')) { - view = get(view, 'parentView'); - } - - ember_assert("You called yield in a template that was not a layout", !!view); - - template = get(view, 'template'); - - if (template) { - template(this, options); - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var set = Ember.set, get = Ember.get; - - /** - @class - - Creates an HTML input view in one of two formats. - - If a `title` property or binding is provided the input will be wrapped in - a `div` and `label` tag. View properties like `classNames` will be applied to - the outermost `div`. This behavior is deprecated and will issue a warning in development. - - - {{view Ember.Checkbox classNames="applicaton-specific-checkbox" title="Some title"}} - - - <div id="ember1" class="ember-view ember-checkbox applicaton-specific-checkbox"> - <label><input type="checkbox" />Some title</label> - </div> - - If `title` isn't provided the view will render as an input element of the 'checkbox' type and HTML - related properties will be applied directly to the input. - - {{view Ember.Checkbox classNames="applicaton-specific-checkbox"}} - - <input id="ember1" class="ember-view ember-checkbox applicaton-specific-checkbox" type="checkbox"> - - You can add a `label` tag yourself in the template where the Ember.Checkbox is being used. - - <label> - Some Title - {{view Ember.Checkbox classNames="applicaton-specific-checkbox"}} - </label> - - - The `checked` attribute of an Ember.Checkbox object should always be set - through the Ember object or by interacting with its rendered element representation - via the mouse, keyboard, or touch. Updating the value of the checkbox via jQuery will - result in the checked value of the object and its element losing synchronization. - - */ - Ember.Checkbox = Ember.View.extend({ - classNames: ['ember-checkbox'], - - tagName: 'input', - - attributeBindings: ['type', 'checked', 'disabled'], - - type: "checkbox", - checked: false, - disabled: false, - - // Deprecated, use 'checked' instead - title: null, - - value: Ember.computed(function (propName, value) { - ember_deprecate("Ember.Checkbox's 'value' property has been renamed to 'checked' to match the html element attribute name"); - if (value !== undefined) { - return set(this, 'checked', value); - } else { - return get(this, 'checked'); - } - }).property('checked').volatile(), - - change: function () { - Ember.run.once(this, this._updateElementValue); - // returning false will cause IE to not change checkbox state - }, - - /** - @private - */ - _updateElementValue: function () { - var input = get(this, 'title') ? this.$('input:checkbox') : this.$(); - set(this, 'checked', input.prop('checked')); - }, - - init: function () { - if (get(this, 'title') || get(this, 'titleBinding')) { - ember_deprecate("Automatically surrounding Ember.Checkbox inputs with a label by providing a 'title' property is deprecated"); - this.tagName = undefined; - this.attributeBindings = []; - this.defaultTemplate = Ember.Handlebars.compile('<label><input type="checkbox" {{bindAttr checked="checked" disabled="disabled"}}>{{title}}</label>'); - } - - this._super(); - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - /** @class */ - Ember.TextSupport = Ember.Mixin.create( - /** @scope Ember.TextSupport.prototype */ { - - value: "", - - attributeBindings: ['placeholder', 'disabled', 'maxlength'], - placeholder: null, - disabled: false, - maxlength: null, - - insertNewline: Ember.K, - cancel: Ember.K, - - focusOut: function (event) { - this._elementValueDidChange(); - }, - - change: function (event) { - this._elementValueDidChange(); - }, - - keyUp: function (event) { - this.interpretKeyEvents(event); - }, - - /** - @private - */ - interpretKeyEvents: function (event) { - var map = Ember.TextSupport.KEY_EVENTS; - var method = map[event.keyCode]; - - this._elementValueDidChange(); - if (method) { - return this[method](event); - } - }, - - _elementValueDidChange: function () { - set(this, 'value', this.$().val()); - } - - }); - - Ember.TextSupport.KEY_EVENTS = { - 13: 'insertNewline', - 27: 'cancel' - }; - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - /** - @class - @extends Ember.TextSupport - */ - Ember.TextField = Ember.View.extend(Ember.TextSupport, - /** @scope Ember.TextField.prototype */ { - - classNames: ['ember-text-field'], - - tagName: "input", - attributeBindings: ['type', 'value', 'size'], - type: "text", - size: null - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - Ember.Button = Ember.View.extend(Ember.TargetActionSupport, { - classNames: ['ember-button'], - classNameBindings: ['isActive'], - - tagName: 'button', - - propagateEvents: false, - - attributeBindings: ['type', 'disabled', 'href'], - - /** @private - Overrides TargetActionSupport's targetObject computed - property to use Handlebars-specific path resolution. - */ - targetObject: Ember.computed(function () { - var target = get(this, 'target'), - root = get(this, 'templateContext'), - data = get(this, 'templateData'); - - if (typeof target !== 'string') { - return target; - } - - return Ember.Handlebars.getPath(root, target, { data: data }); - }).property('target').cacheable(), - - // Defaults to 'button' if tagName is 'input' or 'button' - type: Ember.computed(function (key, value) { - var tagName = this.get('tagName'); - if (value !== undefined) { - this._type = value; - } - if (this._type !== undefined) { - return this._type; - } - if (tagName === 'input' || tagName === 'button') { - return 'button'; - } - }).property('tagName').cacheable(), - - disabled: false, - - // Allow 'a' tags to act like buttons - href: Ember.computed(function () { - return this.get('tagName') === 'a' ? '#' : null; - }).property('tagName').cacheable(), - - mouseDown: function () { - if (!get(this, 'disabled')) { - set(this, 'isActive', true); - this._mouseDown = true; - this._mouseEntered = true; - } - return get(this, 'propagateEvents'); - }, - - mouseLeave: function () { - if (this._mouseDown) { - set(this, 'isActive', false); - this._mouseEntered = false; - } - }, - - mouseEnter: function () { - if (this._mouseDown) { - set(this, 'isActive', true); - this._mouseEntered = true; - } - }, - - mouseUp: function (event) { - if (get(this, 'isActive')) { - // Actually invoke the button's target and action. - // This method comes from the Ember.TargetActionSupport mixin. - this.triggerAction(); - set(this, 'isActive', false); - } - - this._mouseDown = false; - this._mouseEntered = false; - return get(this, 'propagateEvents'); - }, - - keyDown: function (event) { - // Handle space or enter - if (event.keyCode === 13 || event.keyCode === 32) { - this.mouseDown(); - } - }, - - keyUp: function (event) { - // Handle space or enter - if (event.keyCode === 13 || event.keyCode === 32) { - this.mouseUp(); - } - }, - - // TODO: Handle proper touch behavior. Including should make inactive when - // finger moves more than 20x outside of the edge of the button (vs mouse - // which goes inactive as soon as mouse goes out of edges.) - - touchStart: function (touch) { - return this.mouseDown(touch); - }, - - touchEnd: function (touch) { - return this.mouseUp(touch); - }, - - init: function () { - ember_deprecate("Ember.Button is deprecated and will be removed from future releases. Consider using the `{{action}}` helper."); - this._super(); - } - }); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - var get = Ember.get, set = Ember.set; - - /** - @class - @extends Ember.TextSupport - */ - Ember.TextArea = Ember.View.extend(Ember.TextSupport, - /** @scope Ember.TextArea.prototype */ { - - classNames: ['ember-text-area'], - - tagName: "textarea", - attributeBindings: ['rows', 'cols'], - rows: null, - cols: null, - - /** - @private - */ - didInsertElement: function () { - this._updateElementValue(); - }, - - _updateElementValue: Ember.observer(function () { - this.$().val(get(this, 'value')); - }, 'value') - - }); - -})(); - - -(function () { - Ember.TabContainerView = Ember.View.extend(); - -})(); - - -(function () { - var get = Ember.get, getPath = Ember.getPath; - - Ember.TabPaneView = Ember.View.extend({ - tabsContainer: Ember.computed(function () { - return this.nearestInstanceOf(Ember.TabContainerView); - }).property().volatile(), - - isVisible: Ember.computed(function () { - return get(this, 'viewName') === getPath(this, 'tabsContainer.currentView'); - }).property('tabsContainer.currentView').volatile() - }); - -})(); - - -(function () { - var get = Ember.get, setPath = Ember.setPath; - - Ember.TabView = Ember.View.extend({ - tabsContainer: Ember.computed(function () { - return this.nearestInstanceOf(Ember.TabContainerView); - }).property().volatile(), - - mouseUp: function () { - setPath(this, 'tabsContainer.currentView', get(this, 'value')); - } - }); - -})(); - - -(function () { - -})(); - - -(function () { - /*jshint eqeqeq:false */ - - var set = Ember.set, get = Ember.get, getPath = Ember.getPath; - var indexOf = Ember.ArrayUtils.indexOf, indexesOf = Ember.ArrayUtils.indexesOf; - - Ember.Select = Ember.View.extend({ - tagName: 'select', - defaultTemplate: Ember.Handlebars.compile( - '{{#if prompt}}<option>{{prompt}}</option>{{/if}}' + - '{{#each content}}{{view Ember.SelectOption contentBinding="this"}}{{/each}}' - ), - attributeBindings: ['multiple'], - - multiple: false, - content: null, - selection: null, - prompt: null, - - optionLabelPath: 'content', - optionValuePath: 'content', - - didInsertElement: function () { - var selection = get(this, 'selection'); - - if (selection) { - this.selectionDidChange(); - } - - this.change(); - }, - - change: function () { - if (get(this, 'multiple')) { - this._changeMultiple(); - } else { - this._changeSingle(); - } - }, - - selectionDidChange: Ember.observer(function () { - var selection = get(this, 'selection'), - isArray = Ember.isArray(selection); - if (get(this, 'multiple')) { - if (!isArray) { - set(this, 'selection', Ember.A([selection])); - return; - } - this._selectionDidChangeMultiple(); - } else { - this._selectionDidChangeSingle(); - } - }, 'selection'), - - - _changeSingle: function () { - var selectedIndex = this.$()[0].selectedIndex, - content = get(this, 'content'), - prompt = get(this, 'prompt'); - - if (!content) { - return; - } - if (prompt && selectedIndex === 0) { - set(this, 'selection', null); - return; - } - - if (prompt) { - selectedIndex -= 1; - } - set(this, 'selection', content.objectAt(selectedIndex)); - }, - - _changeMultiple: function () { - var options = this.$('option:selected'), - prompt = get(this, 'prompt'), - offset = prompt ? 1 : 0, - content = get(this, 'content'); - - if (!content) { - return; - } - if (options) { - var selectedIndexes = options.map(function () { - return this.index - offset; - }).toArray(); - set(this, 'selection', content.objectsAt(selectedIndexes)); - } - }, - - _selectionDidChangeSingle: function () { - var el = this.$()[0], - content = get(this, 'content'), - selection = get(this, 'selection'), - selectionIndex = indexOf(content, selection), - prompt = get(this, 'prompt'); - - if (prompt) { - selectionIndex += 1; - } - if (el) { - el.selectedIndex = selectionIndex; - } - }, - - _selectionDidChangeMultiple: function () { - var content = get(this, 'content'), - selection = get(this, 'selection'), - selectedIndexes = indexesOf(content, selection), - prompt = get(this, 'prompt'), - offset = prompt ? 1 : 0, - options = this.$('option'); - - if (options) { - options.each(function () { - this.selected = indexOf(selectedIndexes, this.index + offset) > -1; - }); - } - } - - }); - - Ember.SelectOption = Ember.View.extend({ - tagName: 'option', - defaultTemplate: Ember.Handlebars.compile("{{label}}"), - attributeBindings: ['value', 'selected'], - - init: function () { - this.labelPathDidChange(); - this.valuePathDidChange(); - - this._super(); - }, - - selected: Ember.computed(function () { - var content = get(this, 'content'), - selection = getPath(this, 'parentView.selection'); - if (getPath(this, 'parentView.multiple')) { - return selection && indexOf(selection, content) > -1; - } else { - // Primitives get passed through bindings as objects... since - // `new Number(4) !== 4`, we use `==` below - return content == selection; - } - }).property('content', 'parentView.selection').volatile(), - - labelPathDidChange: Ember.observer(function () { - var labelPath = getPath(this, 'parentView.optionLabelPath'); - - if (!labelPath) { - return; - } - - Ember.defineProperty(this, 'label', Ember.computed(function () { - return getPath(this, labelPath); - }).property(labelPath).cacheable()); - }, 'parentView.optionLabelPath'), - - valuePathDidChange: Ember.observer(function () { - var valuePath = getPath(this, 'parentView.optionValuePath'); - - if (!valuePath) { - return; - } - - Ember.defineProperty(this, 'value', Ember.computed(function () { - return getPath(this, valuePath); - }).property(valuePath).cacheable()); - }, 'parentView.optionValuePath') - }); - - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - /*globals Handlebars */ -// Find templates stored in the head tag as script tags and make them available -// to Ember.CoreView in the global Ember.TEMPLATES object. This will be run as as -// jQuery DOM-ready callback. -// -// Script tags with "text/x-handlebars" will be compiled -// with Ember's Handlebars and are suitable for use as a view's template. -// Those with type="text/x-raw-handlebars" will be compiled with regular -// Handlebars and are suitable for use in views' computed properties. - Ember.Handlebars.bootstrap = function (ctx) { - var selectors = 'script[type="text/x-handlebars"], script[type="text/x-raw-handlebars"]'; - - if (Ember.ENV.LEGACY_HANDLEBARS_TAGS) { - selectors += ', script[type="text/html"]'; - } - - ember_warn("Ember no longer parses text/html script tags by default. Set ENV.LEGACY_HANDLEBARS_TAGS = true to restore this functionality.", Ember.ENV.LEGACY_HANDLEBARS_TAGS || Ember.$('script[type="text/html"]').length === 0); - - Ember.$(selectors, ctx) - .each(function () { - // Get a reference to the script tag - var script = Ember.$(this), - type = script.attr('type'); - - var compile = (script.attr('type') === 'text/x-raw-handlebars') ? - Ember.$.proxy(Handlebars.compile, Handlebars) : - Ember.$.proxy(Ember.Handlebars.compile, Ember.Handlebars), - // Get the name of the script, used by Ember.View's templateName property. - // First look for data-template-name attribute, then fall back to its - // id if no name is found. - templateName = script.attr('data-template-name') || script.attr('id'), - template = compile(script.html()), - view, viewPath, elementId, tagName, options; - - if (templateName) { - // For templates which have a name, we save them and then remove them from the DOM - Ember.TEMPLATES[templateName] = template; - - // Remove script tag from DOM - script.remove(); - } else { - if (script.parents('head').length !== 0) { - // don't allow inline templates in the head - throw new Ember.Error("Template found in <head> without a name specified. " + - "Please provide a data-template-name attribute.\n" + - script.html()); - } - - // For templates which will be evaluated inline in the HTML document, instantiates a new - // view, and replaces the script tag holding the template with the new - // view's DOM representation. - // - // Users can optionally specify a custom view subclass to use by setting the - // data-view attribute of the script tag. - viewPath = script.attr('data-view'); - view = viewPath ? Ember.getPath(viewPath) : Ember.View; - - // Get the id of the script, used by Ember.View's elementId property, - // Look for data-element-id attribute. - elementId = script.attr('data-element-id'); - - // Users can optionally specify a custom tag name to use by setting the - // data-tag-name attribute on the script tag. - tagName = script.attr('data-tag-name'); - - options = { template: template }; - if (elementId) { - options.elementId = elementId; - } - if (tagName) { - options.tagName = tagName; - } - - view = view.create(options); - - view._insertElementLater(function () { - script.replaceWith(this.$()); - - // Avoid memory leak in IE - script = null; - }); - } - }); - }; - - Ember.$(document).ready( - function () { - Ember.Handlebars.bootstrap(Ember.$(document)); - } - ); - -})(); - - -(function () { -// ========================================================================== -// Project: Ember Handlebar Views -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); - -(function () { -// ========================================================================== -// Project: Ember -// Copyright: ©2011 Strobe Inc. and contributors. -// License: Licensed under MIT license (see license.js) -// ========================================================================== - -})(); diff --git a/app/assets/javascripts/vendor/route_manager.js b/app/assets/javascripts/vendor/route_manager.js deleted file mode 100644 index fe4c2cd6..00000000 --- a/app/assets/javascripts/vendor/route_manager.js +++ /dev/null @@ -1,566 +0,0 @@ -var get = Ember.get, set = Ember.set; - -/** - Whether the browser supports HTML5 history. - */ -var supportsHistory = !!(window.history && window.history.pushState); - -/** - Whether the browser supports the hashchange event. - */ -var supportsHashChange = ('onhashchange' in window) && (document.documentMode === undefined || document.documentMode > 7); - -/** - @class - Ember.RouteManager manages the browser location and changes states accordingly - to the current location. The location can be programmatically set as follows: - - routeManager.set('location', 'notes/edit/4'); - - Ember.RouteManager also supports HTML5 history, which uses a '/' instead of a - '#!' in the URLs, so that all your website's URLs are consistent. - */ -Ember.RouteManager = Ember.StateManager.extend({ - - /** - Set this property to true if you want to use HTML5 history, if available on - the browser, instead of the location hash. - - HTML 5 history uses the history.pushState method and the window's popstate - event. - - By default it is false, so your URLs will look like: - - http://domain.tld/my_app#!notes/edit/4 - - If set to true and the browser supports pushState(), your URLs will look - like: - - http://domain.tld/my_app/notes/edit/4 - - You will also need to make sure that baseURI is properly configured, as - well as your server so that your routes are properly pointing to your - Ember application. - - @see http://dev.w3.org/html5/spec/history.html#the-history-interface - @property - @type {Boolean} - */ - wantsHistory: false, - - /** - A read-only boolean indicating whether or not HTML5 history is used. Based - on the value of wantsHistory and the browser's support for pushState. - - @see wantsHistory - @property - @type {Boolean} - */ - usesHistory: null, - - /** - The base URI used to resolve routes (which are relative URLs). Only used - when usesHistory is equal to true. - - The build tools automatically configure this value if you have the - html5_history option activated in the Buildfile: - - config :my_app, :html5_history => true - - Alternatively, it uses by default the value of the href attribute of the - <base> tag of the HTML document. For example: - - <base href="http://domain.tld/my_app"> - - The value can also be customized before or during the exectution of the - main() method. - - @see http://www.w3.org/TR/html5/semantics.html#the-base-element - @property - @type {String} - */ - baseURI: document.baseURI, - - /** @private - A boolean value indicating whether or not the ping method has been called - to setup the Ember.routes. - - @property - @type {Boolean} - */ - _didSetup: false, - - /** @private - Internal representation of the current location hash. - - @property - @type {String} - */ - _location: null, - - /** @private - Internal method used to extract and merge the parameters of a URL. - - @returns {Hash} - */ - _extractParametersAndRoute: function (obj) { - var params = {}, route = obj.route || '', separator, parts, i, len, crumbs, key; - separator = (route.indexOf('?') < 0 && route.indexOf('&') >= 0) ? '&' : '?'; - parts = route.split(separator); - route = parts[0]; - if (parts.length === 1) { - parts = []; - } else if (parts.length === 2) { - parts = parts[1].split('&'); - } else if (parts.length > 2) { - parts.shift(); - } - - // extract the parameters from the route string - len = parts.length; - for (i = 0; i < len; ++i) { - crumbs = parts[i].split('='); - params[crumbs[0]] = crumbs[1]; - } - - // overlay any parameter passed in obj - for (key in obj) { - if (obj.hasOwnProperty(key) && key !== 'route') { - params[key] = '' + obj[key]; - } - } - - // build the route - parts = []; - for (key in params) { - parts.push([key, params[key]].join('=')); - } - params.params = separator + parts.join('&'); - params.route = route; - - return params; - }, - - /** - The current location hash. It is the part in the browser's location after - the '#!' mark. - - @property - @type {String} - */ - location: Ember.computed(function (key, value) { - this._skipRoute = false; - return this._extractLocation(key, value); - }).property(), - - _extractLocation: function (key, value) { - var crumbs, encodedValue; - - if (value !== undefined) { - if (value === null) { - value = ''; - } - - if (typeof (value) === 'object') { - crumbs = this._extractParametersAndRoute(value); - value = crumbs.route + crumbs.params; - } - - if (!this._skipPush && (!Ember.empty(value) || (this._location && this._location !== value))) { - encodedValue = encodeURI(value); - - if (this.usesHistory) { - encodedValue = '/' + encodedValue; - window.history.pushState(null, null, get(this, 'baseURI') + encodedValue); - } else if (encodedValue.length > 0 || window.location.hash.length > 0) { - window.location.hash = '!' + encodedValue; - } - } - - this._location = value; - } - - return this._location; - }, - - updateLocation: function (loc) { - this._skipRoute = true; - return this._extractLocation('location', loc); - }, - - /** - Start this routemanager. - - Registers for the hashchange event if available. If not, it creates a - timer that looks for location changes every 150ms. - */ - start: function () { - if (!this._didSetup) { - this._didSetup = true; - var state = ''; - - if (get(this, 'wantsHistory') && supportsHistory) { - this.usesHistory = true; - - // Move any hash state to url state - if (!Ember.empty(window.location.hash)) { - state = window.location.hash.slice(1); - if (state.length > 0) { - state = '/' + state; - window.history.replaceState(null, null, get(this, 'baseURI') + state); - } - } - - this.popState(); - this.popState = jQuery.proxy(this.popState, this); - jQuery(window).bind('popstate', this.popState); - - } else { - this.usesHistory = false; - - if (get(this, 'wantsHistory')) { - // Move any url state to hash - var base = get(this, 'baseURI'); - var loc = (base.charAt(0) === '/') ? document.location.pathname : document.location.href.replace(document.location.hash, ''); - state = loc.slice(base.length + 1); - if (state.length > 0) { - window.location.href = base + '#!' + state; - } - } - - if (supportsHashChange) { - this.hashChange(); - this.hashChange = jQuery.proxy(this.hashChange, this); - jQuery(window).bind('hashchange', this.hashChange); - - } else { - // we don't use a Ember.Timer because we don't want - // a run loop to be triggered at each ping - var _this = this, invokeHashChange = function () { - _this.hashChange(); - _this._timerId = setTimeout(invokeHashChange, 100); - }; - - invokeHashChange(); - } - } - } - }, - - /** - Stop this routemanager - */ - stop: function () { - if (this._didSetup) { - if (get(this, 'wantsHistory') && supportsHistory) { - jQuery(window).unbind('popstate', this.popState); - } else { - if (supportsHashChange) { - jQuery(window).unbind('hashchange', this.hashChange); - } else { - clearTimeout(this._timerId); - } - } - this._didSetup = false; - } - }, - - destroy: function () { - this.stop(); - this._super(); - }, - - /** - Observer of the 'location' property that calls the correct route handler - when the location changes. - */ - locationDidChange: Ember.observer(function () { - this.trigger(); - }, 'location'), - - /** - Triggers a route even if already in that route (does change the location, if - it is not already changed, as well). - - If the location is not the same as the supplied location, this simply lets - "location" handle it (which ends up coming back to here). - */ - trigger: function () { - var location = get(this, 'location'), params, route; - params = this._extractParametersAndRoute({ - route: location - }); - location = params.route; - delete params.route; - delete params.params; - - var result = this.getState(location, params); - if (result) { - set(this, 'params', result.params); - - // We switch states in two phases. The point of this is to handle - // parameter-only location changes. This will correspond to the same - // state path in the manager, but states with parts with changed - // parameters should be re-entered: - - // 1. We go to the earliest clean state. This prevents - // unnecessary transitions. - if (result.cleanStates.length > 0) { - var cleanState = result.cleanStates.join('.'); - this.goToState(cleanState); - } - - // 2. We transition to the dirty state. This forces dirty - // states to be transitioned. - if (result.dirtyStates.length > 0) { - var dirtyState = result.cleanStates.concat(result.dirtyStates).join('.'); - // Special case for re-entering the root state on a parameter change - if (this.currentState && dirtyState === this.currentState.get('path')) { - this.goToState('__nullState'); - } - this.goToState(dirtyState); - } - } else { - var states = get(this, 'states'); - if (states && get(states, "404")) { - this.goToState("404"); - } - } - }, - - getState: function (route, params) { - var parts = route.split('/'); - parts = parts.filter(function (part) { - return part !== ''; - }); - - return this._findState(parts, this, [], [], params, false); - }, - - /** @private - Recursive helper that the state and the params if a match is found - */ - _findState: function (parts, state, cleanStates, dirtyStates, params) { - parts = Ember.copy(parts); - - var hasChildren = false, name, states, childState; - // sort desc based on priority - states = []; - for (name in state.states) { - // 404 state is special and not matched - childState = state.states[name]; - if (name == "404" || !Ember.State.detect(childState) && !( childState instanceof Ember.State)) { - continue; - } - states.push({ - name: name, - state: childState - }); - } - states = states.sort(function (a, b) { - return (b.state.get('priority') || 0) - (a.state.get('priority') || 0); - }); - - for (var i = 0; i < states.length; i++) { - name = states[i].name; - childState = states[i].state; - if (!( childState instanceof Ember.State)) { - continue; - } - hasChildren = true; - - var result = this._matchState(parts, childState, params); - if (!result) { - continue; - } - - var newParams = Ember.copy(params); - jQuery.extend(newParams, result.params); - - var dirty = dirtyStates.length > 0 || result.dirty; - var newCleanStates = cleanStates; - var newDirtyStates = dirtyStates; - if (dirty) { - newDirtyStates = Ember.copy(newDirtyStates); - newDirtyStates.push(name); - } else { - newCleanStates = Ember.copy(newCleanStates); - newCleanStates.push(name); - } - result = this._findState(result.parts, childState, newCleanStates, newDirtyStates, newParams); - if (result) { - return result; - } - } - - if (!hasChildren && parts.length === 0) { - return { - state: state, - params: params, - cleanStates: cleanStates, - dirtyStates: dirtyStates - }; - } - return null; - }, - - /** @private - Check if a state accepts the parts with the params - - Returns the remaining parts as well as merged params if - the state accepts. - - Will also set the dirty flag if the route is the same but - the parameters have changed - */ - _matchState: function (parts, state, params) { - parts = Ember.copy(parts); - params = Ember.copy(params); - var dirty = false; - var route = get(state, 'route'); - if (route) { - var partDefinitions; - // route could be either a string or regex - if (typeof route == "string") { - partDefinitions = route.split('/'); - } else if (route instanceof RegExp) { - partDefinitions = [route]; - } else { - Ember.assert("route must be either a string or regexp", false); - } - - for (var i = 0; i < partDefinitions.length; i++) { - if (parts.length === 0) { - return false; - } - var part = parts.shift(); - var partDefinition = partDefinitions[i]; - var partParams = this._matchPart(partDefinition, part, state); - if (!partParams) { - return false; - } - - var oldParams = this.get('params') || {}; - for (var param in partParams) { - dirty = dirty || (oldParams[param] != partParams[param]); - } - - jQuery.extend(params, partParams); - } - } - - var enabled = get(state, 'enabled'); - if (enabled !== undefined && !enabled) { - return false; - } - - return { - parts: parts, - params: params, - dirty: dirty - }; - }, - - /** @private - Returns params if the part matches the partDefinition - */ - _matchPart: function (partDefinition, part, state) { - var params = {}; - - // Handle string parts - if (typeof partDefinition == "string") { - - switch (partDefinition.slice(0, 1)) { - // 1. dynamic routes - case ':': - var name = partDefinition.slice(1, partDefinition.length); - params[name] = part; - return params; - - // 2. wildcard routes - case '*': - return {}; - - // 3. static routes - default: - if (partDefinition == part) - return {}; - break; - } - - return false; - } - - if (partDefinition instanceof RegExp) { - // JS doesn't support named capture groups in Regexes so instead - // we can define a list of 'captures' which maps to the matched groups - var captures = get(state, 'captures'); - var matches = partDefinition.exec(part); - - if (matches) { - if (captures) { - var len = captures.length, i; - for (i = 0; i < len; ++i) { - params[captures[i]] = matches[i + 1]; - } - } - return params; - } else { - return false; - } - } - - return false; - }, - - /** - Event handler for the hashchange event. Called automatically by the browser - if it supports the hashchange event, or by our timer if not. - */ - hashChange: function (event) { - var loc = window.location.hash; - var routes = this; - - // Remove the '#!' prefix - loc = (loc && loc.length > 1) ? loc.slice(2, loc.length) : ''; - - if (!jQuery.browser.mozilla) { - // because of bug https://bugzilla.mozilla.org/show_bug.cgi?id=483304 - loc = decodeURI(loc); - } - - if (get(routes, 'location') !== loc && !routes._skipRoute) { - Ember.run.once(function () { - routes._skipPush = true; - set(routes, 'location', loc); - routes._skipPush = false; - }); - - } - routes._skipRoute = false; - }, - - popState: function (event) { - var routes = this; - var base = get(routes, 'baseURI'), loc = (base.charAt(0) === '/') ? document.location.pathname : document.location.href; - - if (loc.slice(0, base.length) === base) { - // Remove the base prefix and the extra '/' - loc = loc.slice(base.length + 1, loc.length); - - if (get(routes, 'location') !== loc && !routes._skipRoute) { - Ember.run.once(function () { - routes._skipPush = true; - set(routes, 'location', loc); - routes._skipPush = false; - }); - - } - } - routes._skipRoute = false; - }, - - // This is used to re-enter a dirty root state - __nullState: Ember.State.create({enabled: false}) - -}); \ No newline at end of file diff --git a/app/assets/javascripts/vendor/sorted-array.js.coffee b/app/assets/javascripts/vendor/sorted-array.js.coffee deleted file mode 100644 index f7db7523..00000000 --- a/app/assets/javascripts/vendor/sorted-array.js.coffee +++ /dev/null @@ -1,50 +0,0 @@ -Ember.SortedArrayController = Ember.ArrayController.extend( - sortOrder: "normal" - sortFunction: null - inputCollectionName: "content" - outputCollectionName: "content" - maxCollectionSize: -1 - - init: -> - @set(@inputCollectionName, []) - @addObserver(@inputCollectionName + '.@each', -> - @elementAdded()) - @addObserver(@outputCollectionName + '.@each', -> - @trimArray()) - - elementAdded: (-> - context = @ - content = @get(@inputCollectionName) - - if @sortOrder == "normal" - if @sortFunction? then content.sort((a, b)-> - context.sortFunction(a, b)) - else - content.sort() - else if @sortOrder == "reverse" - if @sortFunction? then content.sort((a, b)-> - context.sortFunction(b, a)) - else - content.reverse() - else if @sortOrder == "random" - content.sort((a, b)-> - 0.5 - Math.random("deadbeef")) - - @set(@outputCollectionName, content) - ) - - trimArray: (-> - content = @get(@outputCollectionName) - @set(@outputCollectionName, - content.slice(0, @maxCollectionSize - 1))if (@maxCollectionSize > 0) and (content.length > @maxCollectionSize) - ) -) - -#window.myArray = Ember.SortedArrayController.create() -#myArray.content.pushObjects(["Jack", "Cassandra", "Raj"]) - -#window.myArray2 = Ember.SortedArrayController.create({sortOrder: "reverse"}) -#myArray2.content.pushObjects(["Jack", "Cassandra", "Raj"]) -# -#window.myArray3 = Ember.SortedArrayController.create({sortOrder: "random"}) -#myArray3.content.pushObjects(["Jack", "Cassandra", "Raj"]) diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss deleted file mode 100644 index a5c2ffe9..00000000 --- a/app/assets/stylesheets/admin.css.scss +++ /dev/null @@ -1,17 +0,0 @@ -@import "base"; -@import "compass/css3/"; - -ul.alerts { - li { - display: table-row; - - .type, .data, .when { - float: left; - padding-left: 10px; - min-width: 100px; - span { - padding-left: 10px; - } - } - } -} diff --git a/app/assets/stylesheets/alerts.scss b/app/assets/stylesheets/alerts.scss new file mode 100644 index 00000000..b9d2fbed --- /dev/null +++ b/app/assets/stylesheets/alerts.scss @@ -0,0 +1,14 @@ +ul.alerts { + li { + display: table-row; + + .type, .data, .when { + float: left; + padding-left: 10px; + min-width: 100px; + span { + padding-left: 10px; + } + } + } +} diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss deleted file mode 100644 index 06f2f036..00000000 --- a/app/assets/stylesheets/application.scss +++ /dev/null @@ -1,2163 +0,0 @@ -@import "base"; -@import "compass/css3/"; -@import "fonts"; -@import "normailze"; -@import "tipTip"; -@import "new-new-home"; - -.user-mosaic, .team-mosiac { - float: left; - margin: 7px; -} - -.hide { - display: none; -} - -.faded { - opacity: 0 !important; - display: none !important; -} - -body, input, submit, textarea, a, span { - font-family: "MuseoSans-300", arial, sans-serif; -} - -.logo { - margin-top: 31px; - float: left; - width: 182px; - height: 27px; - display: block; - background: image-url("logo.png") no-repeat; - @include transition-all; - span { - display: none; - } - &:hover { - opacity: 0.8; - } -} - -.new-logo { - margin-top: 31px; - float: left; -} - -p { - font-size: 1.4em; -} - -h1 { - font-family: "MuseoSans-500", arial, sans-serif; -} - -h2 { - font-family: "MuseoSans-500", arial, sans-serif; - font-size: 2.4em; -} - -h3 { - font-family: "MuseoSans-500", arial, sans-serif; - font-size: 2em; -} - -h4 { - font-family: "MuseoSans-700", arial, sans-serif; - font-size: 1.4em; - text-transform: uppercase; -} - -#masthead { - background: $dark-grey; - min-width: 1220px; -} - -.inside-masthead { - width: 1160px; - margin: 0 auto; - padding: 0 20px; -} - -#main-content { - min-width: 1220px; - background: #f0f0f0; -} - -.inside-main-content { - width: 1160px; - margin: 0 auto; - padding: 50px 20px; -} - -.mobile-panel { - float: left; -} - -.icon-font-test { - @include icon-font; - font-size: 40px; -} - -#nav { - float: right; - li { - float: left; - line-height: 100px; - margin-left: 30px; - &:first-child { - margin: 0px; - } - } - .new { - a:before { - content: "New"; - padding: 3px 6px 2px 6px; - @include border-radius(4px); - background: $light-blue; - color: #fff; - margin-right: 10px; - font-size: 0.7em; - vertical-align: middle; - text-transform: uppercase; - } - } - a { - font-size: 1.4em; - color: #fff; - @include ts-top-black; - display: block; - &:hover { - color: $light-blue; - } - } - .active { - color: $light-grey; - &:hover { - color: $light-grey; - } - } -} - -#toggle-nav { - display: none; - background: #474747; - width: 100%; - clear: both; - li { - display: block; - border-top: solid 1px rgba(0, 0, 0, 0.3); - &:first-child { - border-top: 0; - } - } - a { - font-size: 1.6em; - color: #fff; - display: block; - width: 90%; - padding: 5%; - &:hover { - color: $light-blue; - } - } - .active { - color: $light-grey; - &:hover { - color: $light-grey; - } - } -} - -.second-level-header { - border-bottom: 2px solid #d4d4d4; - height: 50px; - margin: 0 auto 40px auto; - width: 940px; - h1 { - text-transform: uppercase; - font-size: 2.4em; - color: $mid-blue-grey; - float: left; - max-width: 420px; - @include ellipsis; - a { - color: #000; - } - img { - width: 30px; - height: 30px; - @include border-radius(4px); - float: left; - margin: 0 20px 0 0; - } - } - ul { - float: right; - li { - float: left; - margin-left: 20px; - a { - @include new-more; - } - .active, .current { - color: #fff; - background: #555; - &:hover { - background: #aeaeae; - } - } - } - } -} - -.secondary-notice { - @include secondary-notice; -} - -.visitors { - @include paper-panel; - @include border-radius(4px); - margin: 0 auto; - header { - background: #fff; - padding: 25px 15px; - border-bottom: solid 1px #eaeaea; - } - h1 { - float: left; - font-size: 2em; - } - h2 { - float: right; - font-size: 1.3em; - font-family: "MuseoSans-300"; - text-transform: uppercase; - } - .username { - width: 160px; - } - .score { - width: 31px; - } - .visits { - width: 31px; - } - .time { - width: 68px; - } - .furthest { - width: 99px; - } - .exited-type { - width: 108px; - } - .exited-url { - width: 129px; - } - .last { - width: 74px; - } - .table-head { - li { - float: left; - font-size: 1.3em; - background: image-url("leaderboard/vr.png") no-repeat left top; - padding: 23px 15px; - font-family: "MuseoSans-500"; - &:first-child { - background: none; - } - } - } - .visitors-list { - > li { - border-top: 2px dashed #eaeaea; - &:nth-child(odd) { - background: rgba(255, 255, 255, 0.6); - } - } - ul { - li { - float: left; - font-size: 1.3em; - padding: 23px 15px; - a { - color: $light-blue; - } - } - .visit-avatar { - padding-right: 10px; - &:hover { - opacity: 0.5; - } - img { - width: 25px; - height: 25px; - @include border-radius(4px); - } - } - .username { - font-family: "MuseoSans-500"; - padding: 28px 0 0 0; - margin-right: 15px; - width: 125px; - @include ellipsis; - color: $light-blue; - } - .exited-url { - @include ellipsis; - } - } - } -} - -.notification-bar { - background: #fff; -} - -.notification-bar-inside { - background: image-url("info-icon.png") no-repeat 20px 27px; - width: 940px; - height: 50px; - padding: 30px 20px 0 20px; - text-indent: 35px; - margin: 0 auto; - &.notice { - background: image-url("info-icon.png") no-repeat 20px 27px; - color: $light-blue; - } - &.error { - background: image-url("info-icon-red.png") no-repeat 20px 27px; - color: $red; - } - p { - font-size: 1.5em; - float: left; - } - .close-notification { - float: right; - background: $dark-grey image-url("cross-icon.png") no-repeat center; - width: 20px; - height: 20px; - display: block; - @include border-radius(3px); - &:hover { - background: $light-blue image-url("cross-icon.png") no-repeat center; - } - span { - display: none; - } - } -} - -::selection { - background: $red; - color: #fff; -} - -::-moz-selection { - background: $red; - color: #fff; -} - -#footer { - .inside-footer { - max-width: 1180px; - padding: 40px 20px 10px 20px; - margin: 0 auto; - #tweetbtn { - float: right; - width: 124px; - overflow: hidden; - } - #footer-nav { - ul { - } - .footer-links { - margin-bottom: 10px; - width: 70%; - li { - float: left; - margin-right: 20px; - margin-bottom: 10px; - &:first-child { - } - a { - font-size: 1.4em; - color: $mid-grey; - &:hover { - color: $light-blue; - } - } - } - .employers { - a { - background: $mid-blue-grey; - color: #fff; - padding: 4px 6px; - @include border-radius(4px); - &:hover { - color: #fff; - background: $blue-grey; - } - } - } - } - .copyright { - margin-bottom: 15px; - li { - font-size: 1.2em; - color: $light-grey; - } - } - .credits { - margin-bottom: 15px; - li { - font-size: 1.2em; - } - a { - color: $light-grey; - } - } - .mixpanel { - } - } - } -} - -@import "profile"; -@import "connections"; -@import "protip"; -@import "networks"; -body#sign-in { - #main-content { - background: image-url("black-texture.jpg") repeat; - } -} - -.sign-up-panel { - width: 540px; - margin: 0 auto 25px auto; -} - -.panel { - @include border-radius(3px); - @include subtle-box-shadow; - @include paper-panel; - header { - background: image-url("panel-header-bg.png") no-repeat top; - padding: 25px 0; - h1 { - color: $dark-grey; - text-align: center; - font-family: "MuseoSans-300"; - font-size: 3.6em; - text-transform: uppercase; - } - h2, h3 { - color: $dark-grey; - text-align: center; - font-family: "MuseoSans-300"; - font-size: 2.8em; - } - } - .inside-panel, .inside-panel-align-left { - padding: 34px 83px; - p { - text-align: center; - font-size: 1.6em; - margin-bottom: 25px; - line-height: 22px; - } - .sign-up-buttons { - li { - margin-bottom: 25px; - @include blue-btn; - @include border-radius(6px); - @include transition-all; - height: 58px; - line-height: 58px; - text-align: left; - &:hover { - opacity: 0.8; - } - } - a { - color: #fff; - text-transform: capitalize; - font-size: 1.3em; - display: block; - div { - height: 58px; - width: 46px; - float: left; - margin: 0 20px 0 70px; - background: image-url("sign-up-sprite.png") no-repeat bottom left; - } - .twitter { - background-position: 0px -58px; - } - .github { - background-position: top left; - } - } - } - } -} - -.panel .inside-panel-align-left { - p { - text-align: left; - } - li { - background: image-url("gold-star.png") no-repeat left top; - font-size: 1.6em; - padding-left: 25px; - margin-bottom: 15px; - } - h3 { - margin-bottom: 5px; - } -} - -.sign-up-terms { - width: 350px; - margin: 0 auto; - text-align: center; - font-size: 1.2em; - line-height: 22px; - color: #fff; - a { - color: $light-blue; - } -} - -.big-title { - font-size: 5em; - text-align: center; - margin-bottom: 30px; - font-family: "MuseoSans-100"; -} - -.answers { - float: left; - width: 460px; - padding: 50px 160px 50px 60px; - background: image-url("side-shadow.png") repeat-y right; - h2, h3 { - font-family: "MuseoSans-300"; - } - h2 { - margin-bottom: 25px; - font-size: 2.8em; - } - h3 { - color: $light-blue; - font-size: 1.8em; - margin-bottom: 5px; - } - h4 { - text-transform: capitalize; - } - pre { - font-size: 1.4em; - line-height: 22px; - color: $red; - } - p { - margin-bottom: 25px; - line-height: 22px; - font-size: 1.4em; - color: $dark-grey; - a { - color: $light-blue; - } - } - ul { - li { - margin-bottom: 15px; - } - h4 { - font-size: 1.6em; - font-family: "MuseoSans-300"; - a { - color: $light-blue; - } - } - h5 { - font-size: 1.4em; - } - } -} - -.questions { - h2 { - font-family: "MuseoSans-300"; - margin-bottom: 25px; - font-size: 2.8em; - } - float: right; - width: 200px; - padding: 50px 60px 0 0; - .question-list { - li { - margin-bottom: 15px; - background: image-url("gold-star.png") no-repeat left top; - padding-left: 25px; - } - a { - font-size: 1.4em; - color: $dark-grey; - &:hover { - color: $light-blue; - } - } - } -} - -.contact-hero { - width: 940px; - margin: 50px auto 75px auto; - text-align: center; - - h2 { - color: #777; - text-transform: uppercase; - font-size: 2.2em; - font-weight: normal; - margin-bottom: 15px; - } - - p { - padding: 25px; - font-size: 1.9em; - color: #FFF; - @include border-radius(3px); - background: #555; - } - - a { - color: #CCC; - text-decoration: underline; - display: block; - font-size: .85em; - } -} - -.contact-panels { - width: 940px; - margin: 0 auto; -} - -.half-panel { - float: left; - width: 434px; - a { - @include flat-blue-btn; - @include border-radius(6px); - text-transform: none; - color: #fff; - font-size: 1.6em; - display: block; - text-align: center; - @include transition-all; - &:hover { - opacity: 0.8; - } - } -} - -.half-panel-margin { - margin-right: 70px; -} - -body#member-settings, body#team-settings, body#join-team, body#registration { - #main-content { - background: image-url("black-texture.jpg") repeat; - } - #basic_section { - img { - border: 5px solid #fff; - -webkit-box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); - box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); - margin-bottom: 15px; - } - } - .big-title { - color: #fff; - font-size: 3.5em; - } - .panel { - width: 670px; - margin: 0 auto; - } - .current-resume { - a { - display: inline-block; - height: 25px; - line-height: 25px; - padding: 0 50px; - text-align: center; - color: #fff; - font-size: 1.3em; - margin-bottom: 15px; - background: $light-blue; - } - } - .upload-resume { - font-size: 1.3em; - } - #invitations { - padding: 30px; - p { - } - .sign-btns { - float: left; - padding-top: 20px; - li { - float: left; - margin-right: 10px; - } - } - h2 { - text-align: center; - margin-bottom: 20px; - text-transform: uppercase; - font-family: "MuseoSans-300"; - color: #393939; - font-size: 2em; - } - h3 { - float: left; - width: 220px; - padding: 10px 0 0 0; - border-right: 1px solid #eee; - } - .join, .stay { - float: right; - @include blue-btn; - padding: 0 10px; - @include border-radius(6px); - @include transition-all; - &:hover { - opacity: 0.5; - } - } - .team { - background: none repeat scroll 0 0 rgba(255, 255, 255, 0.8); - border: 2px solid #FFFFFF; - border-radius: 6px 6px 6px 6px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); - padding: 20px; - margin-bottom: 30px; - } - .team-inside { - .members { - float: left; - padding: 0 20px; - width: 190px; - border-right: 1px solid #eee; - a { - margin-right: 5px; - } - } - img { - width: 40px; - height: 40px; - @include border-radius(100px); - } - .size { - margin: 10px 0 0 10px; - float: right; - padding: 5px; - background: #fff; - border: solid 1px #e6e6e6; - vertical-align: middle; - @include border-radius(6px); - } - } - } - .member-nav, .member-nav-with-team { - overflow: auto; - margin: 0 auto 40px auto; - width: 670px; - li { - float: left; - margin-left: 21px; - background: none; - padding: 0; - &:first-child { - margin: 0; - } - } - a { - font-size: 1.4em; - color: #fff; - background: image-url("settings-icons.png") no-repeat left top; - height: 37px; - line-height: 37px; - display: block; - padding-left: 50px; - opacity: 0.6; - @include transition-all; - &:hover { - opacity: 1; - } - } - .active { - opacity: 1; - } - .team-prefs { - background-position: 0px -144px; - } - .email-prefs { - background-position: 0px -108px; - } - .social-bookmarks { - background-position: 0px -36px; - } - .personalize { - background-position: 0px -72px; - } - } - .member-nav-with-team { - width: 820px; - } - #team_section { - .team-title { - font-size: 1.6em; - a { - color: $light-blue; - } - } - } - .panel .inside-panel-align-left { - .save { - padding-top: 20px; - input[type=submit] { - @include blue-btn; - @include border-radius(6px); - height: 58px; - line-height: 58px; - color: #fff; - text-transform: uppercase; - font-size: 1.8em; - display: block; - text-align: center; - width: 100%; - border: 0; - @include transition-all; - &:hover { - opacity: 0.8; - } - } - } - .cancel { - float: right; - padding-top: 20px; - margin-bottom: 20px; - text-transform: uppercase; - color: #393939; - &:hover { - color: $light-blue; - } - } - padding: 40px; - p { - font-size: 1.4em; - } - .special-p { - color: $dark-grey; - margin-bottom: 10px; - label { - font-size: 1em; - &.checkbox { - float: left; - } - } - } - label { - font-size: 1.4em; - color: $dark-grey; - margin-bottom: 10px; - display: block; - } - textarea, input[type=text] { - font-family: "MuseoSans-500"; - width: 97%; - height: 37px; - padding-left: 10px; - outline: none; - border: 0; - border: 2px solid #e4e4e4; - @include border-radius(6px); - @include subtle-box-shadow-inset; - font-size: 1.4em; - color: #000; - margin-bottom: 15px; - } - textarea { - min-height: 100px; - max-width: 97%; - padding: 10px 0 0 10px; - } - .radio { - overflow: auto; - li { - float: left; - background: none; - padding: 0; - margin-right: 20px; - label { - float: left; - margin-right: 10px; - } - } - } - .setting { - padding: 20px 0; - border-bottom: 2px dotted #e6e6e6; - margin-bottom: 15px; - } - .special-setting { - background: rgba(255, 255, 255, 0.8); - padding: 20px; - @include border-radius(6px); - border: 2px solid #fff; - margin-bottom: 15px; - @include subtle-box-shadow; - li { - float: left; - background: none; - padding: 0; - margin: 0 20px 0 0; - font-size: 1.2em; - label { - float: left; - margin: 0 10px 0 0; - color: $dark-grey; - } - } - .preview { - img { - display: block; - margin-bottom: 15px; - border: 5px solid #fff; - -webkit-box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); - box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); - } - } - .photo-chooser { - display: inline-block; - border: 0; - background: #555; - font-size: 1.4em; - padding: 8px 24px; - @include border-radius(4px); - color: #fff; - &:hover { - background: $dark-grey; - } - } - } - .neverpost { - font-size: 1.3em; - margin: 0; - padding-top: 10px; - clear: both; - color: $light-blue; - } - .account-box { - border-bottom: 2px dotted #e6e6e6; - padding-bottom: 20px; - margin-bottom: 40px; - } - .linked-accounts { - a { - color: $light-blue; - } - li { - float: left; - background: rgba(255, 255, 255, 0.8); - padding: 20px; - width: 139px; - @include border-radius(6px); - border: 2px solid #fff; - margin-left: 20px; - @include subtle-box-shadow; - &:first-child { - margin: 0; - } - .unlink { - font-size: 0.7em; - padding: 3px 30px 3px 5px; - background: #efefef image-url("cross-icon.png") no-repeat 93% 50%; - color: $dark-grey; - @include border-radius(4px); - margin-top: 10px; - border: solid 1px #DBDBDB; - &:hover { - color: $light-blue; - } - } - .linked { - font-size: 1.3em; - margin-bottom: 5px; - } - .join-badge-orgs { - font-size: 0.4em; - font-style: normal; - padding-top: 10px; - label { - display: inline-block; - } - } - .linkaccount { - } - } - } - .testimonials { - text-align: center; - padding-top: 20px; - } - .already-signedup { - margin-top: 20px; - } - } - .special-setting { - position: relative; - .number { - top: -10px; - right: -10px; - display: block; - width: 30px; - height: 30px; - line-height: 34px; - position: absolute; - background: $light-blue; - color: #fff; - text-align: center; - @include border-radius(100px); - margin: 0; - } - .two { - background: $red; - } - .three { - background: $green; - } - .four { - background: $orange; - } - } - .explaination { - .name { - position: absolute; - top: 60px; - left: 40px; - color: #fff; - font-size: 1.1em; - } - .bio { - height: 45px; - padding-bottom: 5px; - position: absolute; - top: 80px; - left: 40px; - color: #fff; - font-size: 1em !important; - margin: 0; - width: 200px; - line-height: 13px; - border-bottom: 2px #2B2B2E solid; - } - img { - width: 100%; - } - .one { - top: 60px; - right: 310px; - } - .two { - top: 147px; - right: 310px; - } - .three { - top: 140px; - right: 220px; - } - .four { - top: 150px; - right: 25px; - } - } - .name-bio { - p { - margin: 0; - a { - color: $light-blue; - } - } - } - #email_section { - input[type="checkbox"] { - float: right; - font-size: 1.6em; - } - } - .switch { - background: image-url("switch.png") no-repeat right bottom; - float: right; - color: $green; - text-transform: uppercase; - font-size: 1.2em; - font-family: "MuseoSans-700"; - height: 24px; - line-height: 24px; - padding-right: 75px; - &.inactive { - background-position: right top; - &:after { - content: 'Opportunities disabled'; - color: $red; - } - &:hover { - background-position: right bottom; - &:after { - content: 'Enable Opportunities?'; - color: $green; - } - } - } - &.active { - background-position: right bottom; - &:after { - content: 'Opportunities enabled'; - color: $green; - } - &:hover { - background-position: right top; - &:after { - content: 'Disable Opportunities?'; - color: $red; - } - } - } - } - .new-form { - li, ul { - background: none; - padding: 0; - margin: 0; - } - } - .header { - padding-top: 25px; - margin-bottom: 25px; - border-top: solid 1px #eaeaea; - } - .top-header { - border: 0; - padding: 0; - } - .form-heading { - text-transform: uppercase; - letter-spacing: 0.1em; - font-size: 1.5em; - font-family: "MuseoSans-700"; - float: left; - } - .main-heading { - text-align: center; - text-transform: uppercase; - color: $light-blue; - font-size: 1.5em; - line-height: 1.8em; - padding: 20px 0; - border-bottom: solid 1px #eaeaea; - border-top: solid 1px #eaeaea; - strong { - font-family: "MuseoSans-900"; - } - } - .form-section { - padding-bottom: 15px; - &.errors { - width: 100%; - color: #ff0000; - } - } - .private { - float: right; - color: $light-blue; - text-transform: uppercase; - font-family: "MuseoSans-700"; - background: image-url("private-eye.png") no-repeat left; - padding-left: 30px; - } - .icon-list { - padding: 20px 0 !important; - background: image-url("dots.png") no-repeat 142px 87px, image-url("dots.png") no-repeat 347px 87px; - margin-bottom: 40px; - li { - font-family: "MuseoSans-500"; - float: left; - width: 175px; - margin-left: 32px; - color: $mid-blue-grey; - font-size: 1.3em; - line-height: 1.8em; - @include ts-bottom-white; - text-align: center; - background: none; - padding: 0; - &:first-child { - margin-left: 0; - } - .image { - width: 131px; - height: 140px; - margin: 0 auto 20px auto; - background: image-url("icon-list.png") no-repeat top; - background-size: 100%; - &.coffee { - background-position: 0px -134px; - } - &.eye { - background-position: 0px -275px; - } - } - } - } - .use-account { - label { - float: left; - width: 380px; - margin-bottom: 0; - } - input { - float: right; - font-size: 5em; - } - &:hover { - background: #f8fcff; - } - } - .hint { - color: $mid-blue-grey; - font-family: "MuseoSans-500"; - margin-bottom: 15px; - } - .btn { - @include border-radius(4px); - display: block; - color: #fff; - text-align: center; - padding: 20px 0; - border: 0; - font-size: 1.6em; - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.3); - -webkit-box-shadow: inset 0px 1px 0px 0px rgba(225, 225, 225, 0.5); - box-shadow: inset 0px 1px 0px 0px rgba(225, 225, 225, 0.5); - &:hover { - opacity: 0.5; - } - } - .interested-in { - margin-bottom: 15px !important; - li { - float: left; - margin-right: 15px; - color: #fff; - } - label { - display: block; - background: $light-grey; - font-size: 1em !important; - padding: 8px 41px; - cursor: pointer; - border: solid 1px #595959; - color: #fff !important; - } - input[type=checkbox] { - display: none; - } - input[type=checkbox]:checked + label { - background: $green; - border: solid 1px #377d18; - } - } - .amount-btns { - li { - float: left; - margin-left: 15px; - margin-bottom: 10px; - &:nth-child(3n+1) { - margin-left: 0; - } - } - label { - display: block; - background: $light-blue; - font-size: 1em !important; - padding: 12px 32px; - width: 120px; - cursor: pointer; - border: solid 1px #6598eb; - color: #fff !important; - } - input[type=radio] { - display: none; - } - input[type=radio]:checked + label { - background: $green; - border: solid 1px #377d18; - } - } - .form-list { - > li { - float: left; - width: 285px; - margin-left: 20px; - margin-bottom: 10px; - font-size: 1em; - &:nth-child(2n+1) { - margin-left: 0; - } - input[type=text] { - width: 250px !important; - padding: 5%; - height: 8px !important; - } - } - } - .inside-list { - li { - font-size: 1.2em; - color: #808080; - &:first-child { - margin-bottom: 10px; - } - } - input[type=checkbox] { - float: right; - } - } - .submit-section { - border-top: dotted 3px #eaeaea; - padding-top: 30px; - .try-it { - background: $green; - float: left; - width: 70%; - border: solid 1px #6598EB; - text-transform: uppercase; - letter-spacing: 0.2em; - font-size: 1.8em; - &.update { - width: 100%; - } - } - .skip { - background: #9e9e9e; - border: solid 1px #898989; - float: right; - width: 160px; - } - } -} - -@import "networks"; -@import "team"; -@import "home"; -#simplemodal-overlay { - background-color: #000; - cursor: wait; -} - -#simplemodal-container a.modalCloseImg { - background: image-url("x.png") no-repeat; - width: 25px; - height: 29px; - display: inline; - z-index: 3200; - position: absolute; - top: -15px; - right: -16px; - cursor: pointer; -} - -.achievement-unlocked { - background: #fff; - color: #000; - padding: 50px 67px; - margin: 70px auto 25px auto; - @include border-radius(3px); - position: relative; - width: 496px; - min-height: 153px; - word-wrap: break-word; - h1 { - font-size: 3em; - font-family: "MuseoSans-300"; - text-transform: uppercase; - text-align: center; - margin-bottom: 20px; - background: image-url("big-gold-star.png") no-repeat left top, image-url("big-gold-star.png") no-repeat right top; - } - h2 { - text-align: center; - margin-bottom: 10px; - font-size: 2.8em; - } - p { - text-align: center; - line-height: 1.6em; - margin-bottom: 30px; - } - .seeprofile { - text-align: center; - margin-bottom: 30px; - font-size: 1.6em; - color: $light-blue; - display: block; - margin: 0 auto 15px auto; - } - .clickme { - background: $light-blue; - display: block; - text-align: center; - padding: 20px 0; - font-size: 2em; - @include border-radius; - margin-bottom: 20px; - @include transition-all; - color: #fff; - &:hover { - opacity: 0.5; - } - } - .see-all { - width: 100%; - text-align: center; - display: block; - margin: 0 auto; - @include transition-all; - a { - font-size: 1.4em; - color: $light-blue; - } - &:hover { - opacity: 0.5; - } - } - #award { - margin-bottom: 20px; - img { - display: block; - margin: 0 auto; - } - } -} - -.follow-team-option { - .follow-team { - @include follow-team-button; - } - a { - } - &:hover { - opacity: 0.8; - } -} - -.twitter-follow-button { - text-align: bottom; - position: relative; - top: 5px; -} - -body#blog { - article { - margin-bottom: 15px; - padding-bottom: 15px; - border-bottom: 5px solid #eee; - h1 { - font-size: 2.4em; - color: $dark-grey; - margin-bottom: 10px; - text-align: center; - a { - color: $dark-grey; - } - } - a { - color: $light-blue; - } - .post-details { - font-size: 1.4em; - color: $dark-grey; - margin-bottom: 20px; - padding-bottom: 20px; - border-bottom: solid 1px #eee; - text-align: center; - } - pre { - font-size: 1.4em; - line-height: 22px; - color: $red; - } - } -} - -#admin { - table { - &.stats { - width: 40%; - thead { - font-size: 2em; - } - tbody { - tr { - td { - &:first-child { - font-size: 1.5em; - } - } - &.heading td { - font-size: 2em; - text-align: center; - height: 30px; - } - .goodday { - color: green; - a:link, a:visited { - color: green; - } - } - .badday { - color: red; - a:link, a:visited { - color: red; - } - } - } - } - } - } -} - -input[type=file].safari5-upload-hack { - min-width: 100%; - min-height: 100%; - opacity: 0; - position: absolute; - z-index: -1; - top: 0; - left: 0; -} - -@import "leader-board"; -@import "dashboard"; -.queue { - ol { - padding-top: 20px; - li { - display: block; - ul li { - display: inline-block; - } - } - } -} - -@import "featured-teams"; -@import "jobs"; -@import "protip-phone"; -@import "product_description"; -#new-home-template { - background: #d5d5d5 image-url("premium-team-description/dot-bg.jpg") repeat; - * { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - } - #footer { - background: #fff; - min-width: 100%; - max-width: 1140px !important; - .inside-footer { - max-width: 100%; - padding: 7%; - } - } - .wrapper { - max-width: 1140px; - margin: 0 auto; - background: #3f7eb0; - } - .site-header { - padding: 4% 7%; - background: image-url("new-home/div-bar.png") no-repeat top center; - .new-home-logo { - float: left; - width: 226px; - height: 30px; - background: image-url("new-home/new-home-logo.png") no-repeat; - background-size: 226px; - @include transition-all; - &:hover { - opacity: 0.5; - } - span { - display: none; - } - } - .login { - float: right; - color: #9dc1df; - font-size: 1.6em; - padding-top: 1%; - a { - color: #fff; - &:hover { - text-decoration: underline; - } - } - } - } - .intro { - background: #3f7eb0; - h1 { - font-size: 5em; - color: #fff; - text-align: center; - font-family: "MuseoSans-300"; - padding: 2% 7%; - } - h2 { - color: #1c527d; - text-align: center; - font-family: 'nothing_you_could_doregular', sans-serif; - margin-bottom: 2%; - position: relative; - background: image-url("new-home/pencil-lines.png") no-repeat center; - } - .sign-up-list { - text-align: center; - margin-bottom: 7%; - li { - display: inline-block; - margin-left: 2%; - &:first-child { - margin-left: 0; - } - } - a { - display: block; - background: #fbfbfb; - @include border-radius(6px); - color: #2c6593; - font-size: 1.6em; - height: 60px; - line-height: 60px; - width: 171px; - text-align: center; - -webkit-box-shadow: 0px 3px 0px 0px rgba(53, 103, 163, 0.7); - box-shadow: 0px 3px 0px 0px rgba(53, 103, 163, 0.7); - &:hover { - background: #1c527d; - color: #fff; - } - span { - display: inline-block; - height: 23px; - width: 21px; - background: image-url("new-home/sign-up-sprite-home.png") no-repeat 0px 0px; - margin-right: 5px; - margin-left: -20px; - margin-bottom: -4px; - } - .twitter { - background-position: 0px -23px; - } - .linkedin { - background-position: 0px -48px; - } - } - } - } - .slider { - position: relative; - } - .flex-control-nav { - opacity: 0.5; - padding: 20px 0px; - bottom: 0; - top: -60px; - } - .slides { - ul { - } - li { - height: 460px; - background: rgba(0, 0, 0, 0.2); - } - .browser { - width: 600px; - bottom: -3px; - position: absolute; - img { - width: 100%; - } - } - .bubble { - float: right; - @include border-radius(50%); - width: 300px; - height: 300px; - background: rgba(44, 50, 60, 0.9); - margin: 5% 5% 0 0; - position: relative; - z-index: 100; - h3 { - font-family: "MuseoSans-300"; - font-size: 1.8em; - line-height: 1.5em; - color: #fff; - text-align: center; - } - } - .protips-slide, .teams-slide { - .browser { - right: 5%; - } - .bubble { - margin: 5% 0 0 5%; - float: left; - &:before { - display: none; - } - } - } - .profile-slide .bubble { - padding: 100px 36px 0 36px; - } - .protips-slide .bubble { - padding: 69px 36px 0 36px; - } - .teams-slide .bubble { - padding: 75px 35px 0 37px; - } - .profile-slide { - background: image-url("new-home/profile-bg.jpg") no-repeat; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; - .browser { - left: 5%; - } - } - .protips-slide { - background: image-url("new-home/tip-bg.jpg") no-repeat left; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; - } - .teams-slide { - background: image-url("new-home/team-bg.jpg") no-repeat; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; - } - } - @media screen and (max-width: 1024px) { - .intro { - h1 { - font-size: 5em; - } - } - } - @media screen and (max-width: 768px) { - .site-header { - .new-home-logo { - float: none; - display: block; - margin: 0 auto 3% auto; - } - .login { - float: none; - text-align: center; - padding-top: 0; - } - } - .intro { - h1 { - font-size: 4em; - } - .sign-up-list { - li { - margin-bottom: 3%; - } - } - } - .flex-control-nav { - display: none; - } - .flex-direction-nav { - li:nth-child(1) { - a { - left: 1%; - } - } - li:nth-child(2) { - a { - right: 1%; - } - } - } - .slides { - li { - height: 460px; - background: rgba(0, 0, 0, 0.2); - overflow: hidden; - height: auto !important; - } - .profile-slide .bubble, .protips-slide .bubble, .teams-slide .bubble { - padding: 0; - } - .bubble { - float: none; - @include border-radius(0); - width: 100%; - height: auto; - padding: 5% 7% !important; - margin: 0; - margin-bottom: 4%; - &:after, &:before { - display: none !important; - } - h3 { - font-size: 1.6em; - line-height: 1.4em; - /*text-align: left;*/ - } - } - .browser { - width: 80%; - position: static; - /*display: inline-block;*/ - text-align: center; - margin: 0 auto -3px auto; - right: auto !important; - left: auto !important; - overflow: hidden; - } - .protips-slide, .teams-slide { - .bubble { - margin: 0; - margin-bottom: 4%; - } - } - } - #footer { - .inside-footer { - #tweetbtn { - float: none; - display: block; - margin-bottom: 15px; - } - #footer-nav { - padding-top: 30px; - .footer-links { - li { - margin: 0 15px 5px 0; - margin-left: 0; - } - } - } - } - } - /*footer-end*/ - } - /*760 media query end*/ - @media screen and (max-width: 400px) { - /* .slides { - .browser { - width: 300px; - } - }*/ -.intro { - h1 { - font-size: 2.8em; - line-height: 1.3em; - padding: 5% 7%; - } - .sign-up-list { - padding: 0 10%; - li { - display: block; - margin-left: 0; - } - a { - width: 100%; - height: 40px; - line-height: 40px; - } - } -} - - } - /*phone media query end*/ -} - -/*new-home-template body end*/ -body#admin { - h4 a { - color: $light-blue; - text-decoration: underline; - } - table { - margin-bottom: 30px; - } - .stats, .sections { - thead td { - font-size: 0.8em; - } - tr { - border-bottom: solid 1px $light-blue-grey; - } - .heading { - border: 0; - } - td { - font-size: 1.5em; - padding: 10px; - a { - color: $light-blue; - } - } - } - .comment-admin { - li { - float: left; - } - .titles { - margin-bottom: 15px; - li { - font-family: "MuseoSans-500"; - font-size: 1.5em; - &:nth-child(1) { - width: 60px; - } - &:nth-child(2) { - width: 60px; - } - } - } - .comments-list { - li { - font-size: 1.3em; - margin-bottom: 10px; - a { - color: $light-blue; - } - &:nth-child(1) { - width: 60px; - } - &:nth-child(2) { - width: 60px; - } - &:nth-child(3) { - width: 560px; - } - } - } - } -} - -.analytics { - background: #fff; - @include border-radius(6px); - margin-bottom: 20px; - header { - padding: 30px 20px; - h1 { - font-size: 2.5em; - span { - padding-left: 10px; - font-size: 0.8em; - } - } - } - .analytics-table tr { - &:nth-child(odd) { - td { - @include paper-panel; - } - } - } - .top-list td { - border-top: solid 1px #eaeaea; - border-bottom: solid 1px #eaeaea; - font-size: 1.4em; - font-family: "MuseoSans-500"; - padding: 20px; - border-left: solid 1px #eaeaea; - &:first-child { - border-left: 0; - } - } - .main-list tr { - border-top: solid 1px #eaeaea; - border-bottom: solid 1px #eaeaea; - } - .main-list td { - padding: 20px; - border-left: solid 1px #eaeaea; - &:first-child { - border-left: 0; - } - } - .user { - width: 200px; - } - .sections { - width: 140px; - } - .time { - width: 115px; - } - .last-visit { - width: 135px; - } - .exited { - width: 146px; - position: relative; - .fix { - width: 146px; - @include ellipsis; - } - a { - color: $light-blue; - } - .top-pick { - display: block; - position: absolute; - background: image-url("team/top-pick.png") no-repeat; - top: -9px; - right: -8px; - width: 77px; - height: 77px; - span { - display: none; - } - } - } - .time, .last-visit, .exited { - font-size: 1.4em; - } - .explored { - li { - display: inline-block; - font-size: 1.1em; - background: $light-blue-grey; - @include border-radius(4px); - margin: 0 5px 6px 0; - padding: 4px 8px; - color: #fff; - text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2); - &:nth-child(2) { - background: $mid-blue-grey; - } - &:nth-child(3) { - background: $light-blue; - } - &:nth-child(4) { - background: #ff6600; - } - &:nth-child(5) { - background: #e05745; - } - &:nth-child(6) { - background: #b65e88; - } - &:nth-child(7) { - background: #9fc554; - } - &:nth-child(8) { - background: #ff85d6; - } - &:nth-child(9) { - background: #1526ff; - } - &:nth-child(10) { - background: #efd430; - } - &:nth-child(11) { - background: #179c2e; - } - &:nth-child(12) { - background: #b6b5b2; - } - &:nth-child(13) { - background: #c5c198; - } - &:nth-child(14) { - background: #8320b6; - } - &:nth-child(15) { - background: #55c5ac; - } - } - } - .avatar { - display: inline-block; - width: 41px; - height: 41px; - img { - width: 41px; - height: 41px; - @include border-radius(4px); - } - } - .details { - display: inline-block; - vertical-align: top; - padding-left: 10px; - width: 143px; - h3 { - font-size: 1.6em; - margin-bottom: 2px; - @include ellipsis; - } - h4 { - font-size: 1.1em; - color: $mid-blue-grey; - @include ellipsis; - } - } -} - -@media screen and (max-width: 600px) { - #footer { - .inside-footer { - #tweetbtn { - float: none; - width: 124px; - overflow: hidden; - margin-bottom: 10px; - } - #footer-nav { - .footer-links { - width: 100%; - } - } - } - } -} - diff --git a/app/assets/stylesheets/backgrounds.css.scss b/app/assets/stylesheets/backgrounds.css.scss new file mode 100644 index 00000000..bfe0eba6 --- /dev/null +++ b/app/assets/stylesheets/backgrounds.css.scss @@ -0,0 +1,74 @@ +// Stolen from Bootsrap 3 +.container:before, .container:after { + content: " "; + display: table; +} + +.container { + margin-right: auto; + margin-left: auto; + padding-left: 15px; + padding-right: 15px; + width: 1170px; +} + +.row { + margin-right: -15px; + margin-left: -15px; +} + +.row:before, .row:after { + content: " "; + display: table; +} +.row:after { + clear: both; +} + +.col-md-12 { + width: 100%; + float: left; + position: relative; + min-height: 1px; + padding-right: 15px; + padding-left: 15px; +} + +.bg-primary { + background-color: #d95626; + color: #fff; +} + +.text-center { + text-align: center; +} + +.announcement { + .asm-brand { + background: #d95626; + width: 30px; + height: 26px; + position: absolute; + margin-left: -36px; + margin-top: 6px; + } + + .close { + opacity: 0.4; + &:hover { + opacity: 1.0; + } + text-decoration: none; + + padding-left: 15px; + } + + p { + line-height: 40px; + + a { + color: #fff; + text-decoration: underline; + } + } +} diff --git a/app/assets/stylesheets/base.scss b/app/assets/stylesheets/base.scss index e69af85a..69b817eb 100644 --- a/app/assets/stylesheets/base.scss +++ b/app/assets/stylesheets/base.scss @@ -96,31 +96,12 @@ $level2: #42a3d3; background: $dark-grey; } - &:before { - @include icon-font; - content: "x"; + i.fa { font-size: 16px; margin-right: 5px; } //before - &.twitter { - &:before { - content: "t"; - } - } - - &.github { - &:before { - content: "g"; - } - } - - &.linkedin { - &:before { - content: "i"; - } - } } //btn @@ -137,41 +118,28 @@ $level2: #42a3d3; font-variant: normal; text-transform: none; line-height: 1; - -webkit-font-smoothing: antialiased; + font-smoothing: antialiased; } @mixin border-radius($radius) { - -webkit-border-radius: $radius; - -moz-border-radius: $radius; border-radius: $radius; } @mixin subtle-box-shadow { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); - //-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); } //Mixins @mixin border-radius($radius) { - -webkit-border-radius: $radius; - -moz-border-radius: $radius; border-radius: $radius; } @mixin border-radius-top($radius) { - -webkit-border-top-left-radius: $radius; - -webkit-border-top-right-radius: $radius; - -moz-border-radius-topleft: $radius; - -moz-border-radius-topright: $radius; border-top-left-radius: $radius; border-top-right-radius: $radius; } @mixin border-radius-bottom($radius) { - -webkit-border-bottom-left-radius: $radius; - -webkit-border-bottom-right-radius: $radius; - -moz-border-radius-bottomleft: $radius; - -moz-border-radius-bottomright: $radius; border-bottom-left-radius: $radius; border-bottom-right-radius: $radius; } @@ -179,16 +147,8 @@ $level2: #42a3d3; @mixin transition-all { //text smoothing //text-shadow: 0 0 0 rgba(0,0,0,0); - -webkit-transform: translate3d(0, 0, 0); text-rendering: optimizeLegibility; - -webkit-font-smoothing: subpixel-antialiased; - -moz-font-smoothing: subpixel-antialiased; font-smoothing: subpixel-antialiased; - - -webkit-transition: $transition-speed; - -moz-transition: $transition-speed; - -ms-transition: $transition-speed; - -o-transition: $transition-speed; transition: $transition-speed; } @@ -232,11 +192,6 @@ $level2: #42a3d3; font-size: 1.3em; text-transform: uppercase; background: #6ab3d9; /* Old browsers */ - background: -moz-linear-gradient(top, #6ab3d9 0%, #5cacd5 14%, #3d9cce 37%, #3095ca 51%, #2f95ca 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6ab3d9), color-stop(14%, #5cacd5), color-stop(37%, #3d9cce), color-stop(51%, #3095ca), color-stop(100%, #2f95ca)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #6ab3d9 0%, #5cacd5 14%, #3d9cce 37%, #3095ca 51%, #2f95ca 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #6ab3d9 0%, #5cacd5 14%, #3d9cce 37%, #3095ca 51%, #2f95ca 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #6ab3d9 0%, #5cacd5 14%, #3d9cce 37%, #3095ca 51%, #2f95ca 100%); /* IE10+ */ background: linear-gradient(top, #6ab3d9 0%, #5cacd5 14%, #3d9cce 37%, #3095ca 51%, #2f95ca 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6ab3d9', endColorstr='#2f95ca', GradientType=0); /* IE6-9 */ } @@ -262,11 +217,6 @@ $level2: #42a3d3; font-size: 1.4em; border: 1px solid #eaeaea; background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 3%, #e5e5e5 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(3%, #ffffff), color-stop(100%, #e5e5e5)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 3%, #e5e5e5 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 3%, #e5e5e5 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ffffff 3%, #e5e5e5 100%); /* IE10+ */ background: linear-gradient(top, #ffffff 3%, #e5e5e5 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e5e5e5', GradientType=0); /* IE6-9 */ } @@ -276,7 +226,6 @@ $level2: #42a3d3; } @mixin paper-panel { - -webkit-box-shadow: inset 0px 0px 2px 2px #ffffff; box-shadow: inset 0px 0px 2px 2px #ffffff; background: image-url("paper-texture.jpg") repeat; } @@ -293,15 +242,8 @@ $level2: #42a3d3; @mixin signup-button { background: #dbe7f5; /* Old browsers */ - background: -moz-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dbe7f5), color-stop(3%, #f0f5fb), color-stop(4%, #dae6f6), color-stop(10%, #d8e4f2), color-stop(23%, #d5e1ef), color-stop(52%, #c8d4e2), color-stop(87%, #afc1d5), color-stop(100%, #a8bcd4)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* IE10+ */ background: linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dbe7f5', endColorstr='#a8bcd4', GradientType=0); /* IE6-9 */ - -webkit-box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.5); box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.5); display: block; height: 30px; @@ -334,8 +276,6 @@ $level2: #42a3d3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - -o-text-overflow: ellipsis; - -ms-text-overflow: ellipsis; } @mixin small-grey-btn { @@ -378,11 +318,6 @@ $level2: #42a3d3; @mixin tip-grad { background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #fefefe 64%, #f5f5f5 86%, #eeeeee 96%, #e3e3e3 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(64%, #fefefe), color-stop(86%, #f5f5f5), color-stop(96%, #eeeeee), color-stop(100%, #e3e3e3)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%, #fefefe 64%, #f5f5f5 86%, #eeeeee 96%, #e3e3e3 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%, #fefefe 64%, #f5f5f5 86%, #eeeeee 96%, #e3e3e3 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%, #fefefe 64%, #f5f5f5 86%, #eeeeee 96%, #e3e3e3 100%); /* IE10+ */ background: linear-gradient(top, #ffffff 0%, #fefefe 64%, #f5f5f5 86%, #eeeeee 96%, #e3e3e3 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e3e3e3', GradientType=0); /* IE6-9 */ } @@ -401,15 +336,8 @@ $level2: #42a3d3; @mixin new-signup-button { background: rgb(70, 152, 218); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(70, 152, 218, 1) 0%, rgba(62, 141, 204, 1) 31%, rgba(54, 127, 185, 1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(70, 152, 218, 1)), color-stop(31%, rgba(62, 141, 204, 1)), color-stop(100%, rgba(54, 127, 185, 1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(70, 152, 218, 1) 0%, rgba(62, 141, 204, 1) 31%, rgba(54, 127, 185, 1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(70, 152, 218, 1) 0%, rgba(62, 141, 204, 1) 31%, rgba(54, 127, 185, 1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(70, 152, 218, 1) 0%, rgba(62, 141, 204, 1) 31%, rgba(54, 127, 185, 1) 100%); /* IE10+ */ background: linear-gradient(to bottom, rgba(70, 152, 218, 1) 0%, rgba(62, 141, 204, 1) 31%, rgba(54, 127, 185, 1) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4698da', endColorstr='#367fb9', GradientType=0); /* IE6-9 */ - -webkit-box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1); display: block; height: 30px; @@ -422,19 +350,12 @@ $level2: #42a3d3; @mixin side-box-grad { background: rgb(221, 231, 235); /* Old browsers */ - background: -moz-linear-gradient(top, rgba(221, 231, 235, 1) 0%, rgba(213, 225, 229, 1) 99%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(221, 231, 235, 1)), color-stop(99%, rgba(213, 225, 229, 1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(221, 231, 235, 1) 0%, rgba(213, 225, 229, 1) 99%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(221, 231, 235, 1) 0%, rgba(213, 225, 229, 1) 99%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(221, 231, 235, 1) 0%, rgba(213, 225, 229, 1) 99%); /* IE10+ */ background: linear-gradient(to bottom, rgba(221, 231, 235, 1) 0%, rgba(213, 225, 229, 1) 99%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dde7eb', endColorstr='#d5e1e5', GradientType=0); /* IE6-9 */ } @mixin cleaner-text { text-rendering: optimizeLegibility; - -webkit-font-smoothing: subpixel-antialiased; - -moz-font-smoothing: subpixel-antialiased; font-smoothing: subpixel-antialiased; } @@ -446,7 +367,6 @@ $level2: #42a3d3; vertical-align: middle; text-align: center; font-size: 1.4em; - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); } @@ -458,7 +378,6 @@ $level2: #42a3d3; vertical-align: middle; text-align: center; font-size: 1.4em; - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); } @@ -472,7 +391,6 @@ $level2: #42a3d3; vertical-align: middle; text-align: center; font-size: 1.4em; - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); } diff --git a/app/assets/stylesheets/bundle.scss b/app/assets/stylesheets/bundle.scss deleted file mode 100644 index 5c9187f2..00000000 --- a/app/assets/stylesheets/bundle.scss +++ /dev/null @@ -1,753 +0,0 @@ -@import "normailze"; - -//Variables -$cream: #E7EDDE; -$dark-cream: #D3D9CB; -$yellow: #e0a32e; -$blue: #6baba1; -$red: #e7603b; -$dark-grey: #303030; -$radius: 4px; -$transition-speed: all 0.2s ease-out; - -//Mixins -@mixin border-radius($radius) { - -webkit-border-radius: $radius; - -moz-border-radius: $radius; - border-radius: $radius; -} - -@mixin transition-all { - -webkit-transition: $transition-speed; - -moz-transition: $transition-speed; - -ms-transition: $transition-speed; - -o-transition: $transition-speed; - transition: $transition-speed; -} - -//fonts -@font-face { - font-family: 'SaturnVRegular'; - src: url('https://fonts.coderwall.com/fonts/saturnv-webfont.eot'); - src: url('https://fonts.coderwall.com/fonts/saturnv-webfont.eot?#iefix') format('embedded-opentype'), url('https://fonts.coderwall.com/fonts/saturnv-webfont.woff') format('woff'), url('https://fonts.coderwall.com/fonts/saturnv-webfont.ttf') format('truetype'), url('https://fonts.coderwall.com/fonts/saturnv-webfont.svg#SaturnVRegular') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'WisdomScriptAIRegular'; - src: url('https://fonts.coderwall.com/fonts/wisdom_script-webfont.eot'); - src: url('https://fonts.coderwall.com/fonts/wisdom_script-webfont.eot?#iefix') format('embedded-opentype'), url('https://fonts.coderwall.com/fonts/wisdom_script-webfont.woff') format('woff'), url('https://fonts.coderwall.com/fonts/wisdom_script-webfont.ttf') format('truetype'), url('https://fonts.coderwall.com/fonts/wisdom_script-webfont.svg#WisdomScriptAIRegular') format('svg'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'LiberatorRegular'; - src: url('https://fonts.coderwall.com/fonts/liberator-webfont.eot'); - src: url('https://fonts.coderwall.com/fonts/liberator-webfont.eot?#iefix') format('embedded-opentype'), url('https://fonts.coderwall.com/fonts/liberator-webfont.woff') format('woff'), url('https://fonts.coderwall.com/fonts/liberator-webfont.ttf') format('truetype'), url('https://fonts.coderwall.com/fonts/liberator-webfont.svg#LiberatorRegular') format('svg'); - font-weight: normal; - font-style: normal; -} - -body, input[type=text] { - font-family: Georgia, Times, "Times New Roman", serif; -} - -p, h1, h2, h3, h4, a, li, span { - //text smoothing - text-shadow: 0 0 0 rgba(0, 0, 0, 0); - -webkit-transform: translate3d(0, 0, 0); - text-rendering: optimizeLegibility; - -webkit-font-smoothing: subpixel-antialiased; - -moz-font-smoothing: subpixel-antialiased; - font-smoothing: subpixel-antialiased; -} - -//Globals -body { - background: image-url("bundle/big-stars.png") repeat-x fixed -100% -5%, image-url("bundle/small-stars.png") repeat-x fixed 20% 5%, image-url("bundle/diamonds-a.png") repeat-x fixed 10% 403px, image-url("bundle/diamonds-b.png") repeat-x fixed -10% 400px, image-url("bundle/diamonds-a.png") repeat-x fixed 10% bottom, image-url("bundle/diamonds-b.png") repeat-x fixed -10% bottom, $dark-grey; -} - -p { - font-size: 1.4em; - line-height: 1.4em; -} - -a:hover { - opacity: 0.5; -} - -.main-content { - background: $cream; -} - -//Structure -.site-header, .main-content, .site-footer-inside .site-footer { - min-width: 980px; - overflow: hidden; -} - -.header-inside, .main-content-inside, .site-footer-inside { - width: 960px; - margin: 0 auto; -} - -.yellow { - color: $yellow; -} - -.blue { - color: $blue; -} - -.red { - color: $red; -} - -.share { - display: block; - width: 81px; - height: 35px; - line-height: 25px; - font-style: italic; - background: $red; - text-align: center; - font-size: 1.2em; - letter-spacing: 2px; - opacity: 0.9; - @include transition-all; - top: 0px; - right: 30px; - padding: 10px 16px 0 16px; - z-index: 500; - position: fixed; - - &:hover li { - color: #fff; - } - - li { - color: #8a4838; - float: left; - margin-left: 10px; - - &:first-child { - margin: 0; - } - - } - - a { - display: block; - width: 28px; - height: 28px; - background: image-url("bundle/social-icons.png") no-repeat top; - } - - .twitter { - background-position: 0px -28px; - } - - &:hover { - opacity: 1; - padding-top: 15px; - color: #fff; - } - - span { - display: none; - } - - &:after { - content: ""; - background: image-url("bundle/pattern-btm.png") repeat-x; - height: 10px; - width: 113px; - position: absolute; - bottom: -10px; - left: 0px; - } -} - -//Header -.site-header { - min-height: 439px; - - .header-inside { - - } - - .top-bar { - padding-top: 42px; - height: 100px; - color: $cream; - font-family: "WisdomScriptAIRegular", Georgia, Times, "Times New Roman", serif; - background: image-url("bundle/top-bar-bg.png") no-repeat center; - margin-bottom: 45px; - position: relative; - - li { - position: absolute; - float: left; - font-size: 2.4em; - padding-top: 50px; - - &:last-child { - float: right; - } - } - - a { - color: $cream; - } - - .buy-it { - left: 0px; - } - - .date { - right: 0px; - } - .center { - //display: block; - //text-align: center; - //width: 679px; - font-size: 3.8em; - padding-top: 38px; - left: 352px; - } - } - - h1 { - font-family: "SaturnVRegular", "Arial Black", "Arial Bold", Gadget, sans-serif; - color: $cream; - font-size: 10em; - text-align: center; - text-shadow: 0px 5px 0px #9e4040; - } - - h2 { - font-family: "LiberatorRegular", Arial, "Helvetica Neue", Helvetica, sans-serif; - text-align: center; - font-size: 2.6em; - letter-spacing: 0.5em; - margin-bottom: 0.5em; - - a { - color: $cream; - } - } -} - -//Main content -.main-content-inside { - padding: 40px 0 90px; -} - -.sub-title { - font-family: "WisdomScriptAIRegular", Georgia, Times, "Times New Roman", serif; - font-size: 2.9em; - text-align: center; - background: image-url("bundle/lines.png") repeat-x bottom; - //border-bottom: solid 2px $dark-cream; - margin-bottom: 40px; -} - -.packages { - margin-bottom: 80px; - - li { - width: 257px; - float: left; - margin-left: 94px; - position: relative; - - &:first-child { - margin: 0; - } - - &:nth-child(1), &:nth-child(2) { - &:after { - content: ""; - width: 95px; - height: 19px; - //background: #000; - position: absolute; - top: 110px; - right: -97px; - background: image-url("bundle/divider-hr.png") no-repeat; - } - } - - h3 { - font-family: "WisdomScriptAIRegular", Georgia, Times, "Times New Roman", serif; - font-size: 3.2em; - text-align: center; - color: $dark-grey; - margin-bottom: 5px; - } - - h4 { - font-family: "LiberatorRegular", Arial, "Helvetica Neue", Helvetica, sans-serif; - font-size: 1.8em; - text-align: center; - margin-bottom: 40px; - } - - img { - margin-bottom: 20px; - } - - .read-more { - display: block; - height: 24px; - line-height: 24px; - width: 100%; - margin: 0 auto; - background: $dark-cream; - font-size: 1.3em; - letter-spacing: 0.4em; - text-align: center; - text-transform: uppercase; - position: relative; - color: $cream; - - &:before { - content: ""; - position: absolute; - width: 10px; - height: 0; - left: 0px; - top: 0px; - border-top: 12px solid transparent; - border-bottom: 12px solid transparent; - border-left: 12px solid #E7EDDE; - } - - &:after { - content: ""; - position: absolute; - width: 10px; - height: 0; - right: 0px; - top: 0px; - border-top: 12px solid transparent; - border-bottom: 12px solid transparent; - border-right: 12px solid #E7EDDE; - } - } - - .peep { - background: $yellow; - } - - .codeschool { - background: $blue; - } - - .recipies { - background: $red; - } - - .snazzy-box { - border-width: 21px; - -moz-border-image: url("bundle/corners.png") 21 repeat; - -webkit-border-image: url("bundle/corners.png") 21 repeat; - -o-border-image: url("bundle/corners.png") 21 repeat; - border-image: url("bundle/corners.png") 21 repeat; - position: relative; - margin-bottom: 25px; - - &:before { - content: ""; - width: 30px; - height: 19px; - display: block; - margin: -39px auto 20px auto; - background: image-url("bundle/tip.png") no-repeat; - } - - .inside { - background: $dark-cream; - height: 210px; - } - - img { - margin-bottom: 10px; - } - - p { - text-align: center; - } - } - } -} - -.payment-box { - padding: 10px; - min-height: 340px; - width: 500px; - margin: 0 auto; - border-width: 24px 23px 27px 26px; - -moz-border-image: url("bundle/corners2.png") 24 23 27 26 repeat; - -webkit-border-image: url("bundle/corners2.png") 24 23 27 26 repeat; - -o-border-image: url("bundle/corners2.png") 24 23 27 26 repeat; - border-image: url("bundle/corners2.png") 24 23 27 26 repeat; - position: relative; - - &:before { - content: ""; - width: 385px; - height: 272px; - background: image-url("bundle/ray-gun.png") no-repeat; - position: absolute; - left: -450px; - top: 15px; - } - - &:after { - content: ""; - width: 385px; - height: 272px; - background: image-url("bundle/ray-gun2.png") no-repeat; - position: absolute; - right: -450px; - top: 15px; - } - - h2 { - font-size: 2em; - letter-spacing: 0.2em; - line-height: 1.5em; - text-transform: uppercase; - } - - .advice { - font-style: italic; - color: $red; - font-size: 1.6em; - } - - .recipt-text { - font-size: 1.6em; - margin-bottom: 25px; - - a { - color: $blue; - } - } - - .top-box { - position: relative; - padding-top: 5px; - padding-left: 120px; - margin-bottom: 25px; - min-height: 107px; - background: image-url("bundle/lines.png") repeat-x bottom; - - &:before { - content: ""; - display: block; - width: 97px; - height: 97px; - background: image-url("bundle/value-badge.png") no-repeat; - position: absolute; - left: 0px; - top: -4px; - float: left; - margin-right: 30px; - } - } - - .top-box2 { - position: relative; - padding-top: 5px; - //padding-left: 120px; - margin-bottom: 25px; - padding-bottom: 25px; - //min-height: 107px; - background: image-url("bundle/lines.png") repeat-x bottom; - - h2 { - margin-bottom: 10px; - } - - } - - .slider { - background: image-url("bundle/slider-bg.jpg") repeat; - height: 60px; - width: 100%; - @include border-radius(6px); - margin-bottom: 20px; - } - - .slide-text { - font-family: "WisdomScriptAIRegular", Georgia, Times, "Times New Roman", serif; - font-size: 3em; - text-align: center; - } - - .bx-btm { - &:before { - content: ""; - display: block; - width: 91px; - height: 48px; - background: image-url("bundle/box-top.png") no-repeat; - position: absolute; - left: 210px; - bottom: -70px; - } - } - - .pay-details { - font-family: "LiberatorRegular", Arial, "Helvetica Neue", Helvetica, sans-serif; - font-size: 1.8em; - letter-spacing: 0.1em; - color: $dark-grey; - text-align: center; - padding-bottom: 20px; - margin-bottom: 20px; - background: image-url("bundle/lines.png") repeat-x bottom; - - .amount { - font-family: "WisdomScriptAIRegular", Georgia, Times, "Times New Roman", serif; - font-size: 2em; - } - } - - .buy-bundle { - display: block; - height: 46px; - line-height: 45px; - width: 100%; - margin: 0 auto; - background: $red; - font-size: 1.8em; - letter-spacing: 0.4em; - text-align: center; - text-transform: uppercase; - position: relative; - color: $cream; - font-family: "georiga"; - - &:before { - content: ""; - position: absolute; - width: 10px; - height: 0; - left: 0px; - top: 0px; - border-top: 23px solid transparent; - border-bottom: 23px solid transparent; - border-left: 23px solid #E7EDDE; - } - - &:after { - content: ""; - position: absolute; - width: 10px; - height: 0; - right: 0px; - top: 0px; - border-top: 23px solid transparent; - border-bottom: 23px solid transparent; - border-right: 23px solid #E7EDDE; - } - } - - .final-share { - overflow: auto; - padding-top: 25px; - - .fb-like { - width: 60px !important; - } - - li { - float: left; - - &:first-child { - margin-right: 25px; - } - } - } - - .form-rows { - - li { - margin-bottom: 15px; - font-size: 1.4em; - overflow: auto; - border-bottom: 1px dashed #D3D9CB; - line-height: 2em; - padding-bottom: 1em; - - label { - float: left; - width: 190px; - } - - input[type=text] { - float: left; - padding: 10px; - background: image-url("bundle/slider-bg.jpg") repeat; - @include border-radius(4px); - border: 0; - outline: none; - width: 290px; - -webkit-box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, 0.3); - box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, 0.3); - } - - input[type=submit] { - border: 0; - display: block; - font-size: 1.6em; - position: static; - } - } - - .small input[type=text] { - width: 50px !important; - } - - .submit-row { - width: 100%; - position: relative; - - &:before { - content: ""; - position: absolute; - width: 10px; - height: 0; - left: 0px; - top: 0px; - border-top: 23px solid transparent; - border-bottom: 23px solid transparent; - border-left: 23px solid #E7EDDE; - } - - &:after { - content: ""; - position: absolute; - width: 10px; - height: 0; - right: 0px; - top: 0px; - border-top: 23px solid transparent; - border-bottom: 23px solid transparent; - border-right: 23px solid #E7EDDE; - } - - &:hover { - opacity: 0.5; - } - } - } -} - -//footer - -.site-footer { - //height: 800px; - padding: 40px 0 70px 0; - //margin-bottom: 40px; - background: -moz-linear-gradient(top, rgba(48, 48, 48, 1) 61%, rgba(48, 48, 48, 0) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(61%, rgba(48, 48, 48, 1)), color-stop(100%, rgba(48, 48, 48, 0))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, rgba(48, 48, 48, 1) 61%, rgba(48, 48, 48, 0) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, rgba(48, 48, 48, 1) 61%, rgba(48, 48, 48, 0) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, rgba(48, 48, 48, 1) 61%, rgba(48, 48, 48, 0) 100%); /* IE10+ */ - background: linear-gradient(to bottom, rgba(48, 48, 48, 1) 61%, rgba(48, 48, 48, 0) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#303030', endColorstr='#00303030', GradientType=0); /* IE6-9 */ - -} - -.site-footer-inside { - - .footer-stuff { - background: image-url("bundle/divider-vr.png") no-repeat center; - li { - width: 400px; - float: left; - - &:last-child { - float: right; - } - - img { - float: left; - margin-right: 30px; - } - - a { - color: $cream; - text-transform: uppercase; - font-size: 1.6em; - letter-spacing: 0.2em; - line-height: 1.6em; - display: block; - } - - span { - padding-top: 30px; - float: right; - width: 200px; - } - } - } -} - -#payment-errors { - color: $cream; - background: #e01515; - font-size: 1.4em; - padding: 5px; - @include border-radius(6px); - margin-bottom: 20px; - text-align: center; -} - -.ui-slider { - position: relative; - top: 25px; - left: 50px; - width: 80%; - color: $cream !important; -} - -.ui-slider-horizontal { - background: $dark-cream no-repeat scroll 50% 50%; -} - -.ui-slider-horizontal .ui-state-default { - background: $red no-repeat scroll 50% 50%; - color: $red !important; -} - -.ui-slider-handle { - width: 4em !important; - height: 2em !important; - top: -0.6em !important; - outline: none !important; - border: 0 !important; - background: $dark-grey image-url("bundle/arrow.png") no-repeat center !important; - - &:hover { - opacity: 1 !important; - border: 0 !important; - background: $red image-url("bundle/arrow.png") no-repeat center !important; - cursor: pointer; - } - - &:focus { - background: $red image-url("bundle/arrow.png") no-repeat center !important; - cursor: pointer; - } -} - -.hide { - display: none; -} diff --git a/app/assets/stylesheets/coderwall.scss b/app/assets/stylesheets/coderwall.scss new file mode 100644 index 00000000..5d1de9a7 --- /dev/null +++ b/app/assets/stylesheets/coderwall.scss @@ -0,0 +1,2057 @@ +@import "base", "compass/css3", "fonts", +"normailze", "tipTip", "new-new-home", "error", +"footer"; + +@import 'jquery-dropdown/jquery.dropdown.min'; +@import 'backgrounds'; + +.user-mosaic, .team-mosiac { + float: left; + margin: 7px; +} + +.hide { + display: none; +} + +.faded { + opacity: 0 !important; + display: none !important; +} + +body, input, submit, textarea, a, span { + font-family: "MuseoSans-300", arial, sans-serif; +} + +.logo { + margin-top: 11px; + margin-bottom: 15px; + float: left; + width: 182px; + height: 27px; + display: block; + background: image-url("logo.png") no-repeat; + @include transition-all; + span { + display: none; + } + &:hover { + opacity: 0.8; + } +} + +.new-logo { + margin-top: 31px; + float: left; +} + +p { + font-size: 1.4em; +} + +h1 { + font-family: "MuseoSans-500", arial, sans-serif; +} + +h2 { + font-family: "MuseoSans-500", arial, sans-serif; + font-size: 2.4em; +} + +h3 { + font-family: "MuseoSans-500", arial, sans-serif; + font-size: 2em; +} + +h4 { + font-family: "MuseoSans-700", arial, sans-serif; + font-size: 1.4em; + text-transform: uppercase; +} + +#masthead { + background: $dark-grey; + min-width: 1220px; +} + +.inside-masthead { + width: 1160px; + margin: 0 auto; + padding: 0 20px; +} + +#main-content { + min-width: 1220px; + background: #f0f0f0; +} + +.inside-main-content { + width: 1160px; + margin: 0 auto; + padding: 50px 20px; +} + +.mobile-panel { + float: left; +} + +.icon-font-test { + @include icon-font; + font-size: 40px; +} + +#nav { + float: right; + li { + display: inline-block; + line-height: 50px; + margin-left: 30px; + &:first-child { + margin: 0; + } + } + i { + font-size: 1.6em; + color: $really-light-grey; + margin-right: 4px; + } + a { + font-size: 1.4em; + color: #fff; + @include ts-top-black; + display: inline; + &:hover { + color: $light-blue; + } + } + .active { + color: $light-grey; + &:hover { + color: $light-grey; + } + } +} + +#toggle-nav { + display: none; + background: #474747; + width: 100%; + clear: both; + li { + display: block; + border-top: solid 1px rgba(0, 0, 0, 0.3); + &:first-child { + border-top: 0; + } + } + a { + font-size: 1.6em; + color: #fff; + display: block; + width: 90%; + padding: 5%; + &:hover { + color: $light-blue; + } + } + .active { + color: $light-grey; + &:hover { + color: $light-grey; + } + } +} + +.second-level-header { + border-bottom: 2px solid #d4d4d4; + height: 50px; + margin: 0 auto 40px auto; + width: 940px; + h1 { + text-transform: uppercase; + font-size: 2.4em; + color: $mid-blue-grey; + float: left; + max-width: 420px; + @include ellipsis; + a { + color: #000; + } + img { + width: 30px; + height: 30px; + @include border-radius(4px); + float: left; + margin: 0 20px 0 0; + } + } + ul { + float: right; + li { + float: left; + margin-left: 20px; + a { + @include new-more; + } + .active, .current { + color: #fff; + background: #555; + &:hover { + background: #aeaeae; + } + } + } + } +} + +.networks-header { + width: auto; +} + +.secondary-notice { + @include secondary-notice; +} + +.visitors { + @include paper-panel; + @include border-radius(4px); + margin: 0 auto; + header { + background: #fff; + padding: 25px 15px; + border-bottom: solid 1px #eaeaea; + } + h1 { + float: left; + font-size: 2em; + } + h2 { + float: right; + font-size: 1.3em; + font-family: "MuseoSans-300"; + text-transform: uppercase; + } + .username { + width: 160px; + } + .score { + width: 31px; + } + .visits { + width: 31px; + } + .time { + width: 68px; + } + .furthest { + width: 99px; + } + .exited-type { + width: 108px; + } + .exited-url { + width: 129px; + } + .last { + width: 74px; + } + .table-head { + li { + float: left; + font-size: 1.3em; + background: image-url("leaderboard/vr.png") no-repeat left top; + padding: 23px 15px; + font-family: "MuseoSans-500"; + &:first-child { + background: none; + } + } + } + .visitors-list { + > li { + border-top: 2px dashed #eaeaea; + &:nth-child(odd) { + background: rgba(255, 255, 255, 0.6); + } + } + ul { + li { + float: left; + font-size: 1.3em; + padding: 23px 15px; + a { + color: $light-blue; + } + } + .visit-avatar { + padding-right: 10px; + &:hover { + opacity: 0.5; + } + img { + width: 25px; + height: 25px; + @include border-radius(4px); + } + } + .username { + font-family: "MuseoSans-500"; + padding: 28px 0 0 0; + margin-right: 15px; + width: 125px; + @include ellipsis; + color: $light-blue; + } + .exited-url { + @include ellipsis; + } + } + } +} + +.notification-bar { + background: #fff; +} + +.notification-bar-inside { + background: image-url("info-icon.png") no-repeat 20px 27px; + width: 940px; + height: 50px; + padding: 30px 20px 0 20px; + text-indent: 35px; + margin: 0 auto; + &.notice { + background: image-url("info-icon.png") no-repeat 20px 27px; + color: $light-blue; + } + &.error { + background: image-url("info-icon-red.png") no-repeat 20px 27px; + color: $red; + } + p { + font-size: 1.5em; + float: left; + } + .close-notification { + float: right; + background: $dark-grey image-url("cross-icon.png") no-repeat center; + width: 20px; + height: 20px; + display: block; + @include border-radius(3px); + &:hover { + background: $light-blue image-url("cross-icon.png") no-repeat center; + } + span { + display: none; + } + } +} + +::selection { + background: $red; + color: #fff; +} + + +@import "profile", "connections", "protip", "networks", "alerts"; +body#sign-in { + #main-content { + background: image-url("black-texture.jpg") repeat; + } +} + +.sign-up-panel { + width: 540px; + margin: 0 auto 25px auto; +} + +.panel { + @include border-radius(3px); + @include subtle-box-shadow; + @include paper-panel; + header { + background: image-url("panel-header-bg.png") no-repeat top; + padding: 25px 0; + h1 { + color: $dark-grey; + text-align: center; + font-family: "MuseoSans-300"; + font-size: 3.6em; + text-transform: uppercase; + } + h2, h3 { + color: $dark-grey; + text-align: center; + font-family: "MuseoSans-300"; + font-size: 2.8em; + } + } + .inside-panel, .inside-panel-align-left { + padding: 34px 83px; + p { + text-align: center; + font-size: 1.6em; + margin-bottom: 25px; + line-height: 22px; + } + .sign-up-buttons { + li { + margin-bottom: 25px; + @include blue-btn; + @include border-radius(6px); + @include transition-all; + height: 58px; + line-height: 58px; + text-align: left; + &:hover { + opacity: 0.8; + } + } + a { + color: #fff; + text-transform: capitalize; + font-size: 1.3em; + display: block; + div { + height: 58px; + width: 46px; + float: left; + margin: 0 20px 0 70px; + background: image-url("sign-up-sprite.png") no-repeat bottom left; + } + .twitter { + background-position: 0px -58px; + } + .github { + background-position: top left; + } + } + } + } +} + +.panel .inside-panel-align-left { + p { + text-align: left; + } + li { + background: image-url("gold-star.png") no-repeat left top; + font-size: 1.6em; + padding-left: 25px; + margin-bottom: 15px; + } + h3 { + margin-bottom: 5px; + } +} + +.sign-up-terms { + width: 350px; + margin: 0 auto; + text-align: center; + font-size: 1.2em; + line-height: 22px; + color: #fff; + a { + color: $light-blue; + } +} + +.big-title { + font-size: 5em; + text-align: center; + margin-bottom: 30px; + font-family: "MuseoSans-100"; +} + +.answers { + float: left; + width: 460px; + padding: 50px 160px 50px 60px; + background: image-url("side-shadow.png") repeat-y right; + h2, h3 { + font-family: "MuseoSans-300"; + } + h2 { + margin-bottom: 25px; + font-size: 2.8em; + } + h3 { + color: $light-blue; + font-size: 1.8em; + margin-bottom: 5px; + } + h4 { + text-transform: capitalize; + } + pre { + font-size: 1.4em; + line-height: 22px; + color: $red; + } + p { + margin-bottom: 25px; + line-height: 22px; + font-size: 1.4em; + color: $dark-grey; + a { + color: $light-blue; + } + } + ul { + li { + margin-bottom: 15px; + } + h4 { + font-size: 1.6em; + font-family: "MuseoSans-300"; + a { + color: $light-blue; + } + } + h5 { + font-size: 1.4em; + } + } +} + +.questions { + h2 { + font-family: "MuseoSans-300"; + margin-bottom: 25px; + font-size: 2.8em; + } + float: right; + width: 200px; + padding: 50px 60px 0 0; + .question-list { + li { + margin-bottom: 15px; + background: image-url("gold-star.png") no-repeat left top; + padding-left: 25px; + } + a { + font-size: 1.4em; + color: $dark-grey; + &:hover { + color: $light-blue; + } + } + } +} + +.contact-hero { + width: 940px; + margin: 50px auto 75px auto; + text-align: center; + + h2 { + color: #777; + text-transform: uppercase; + font-size: 2.2em; + font-weight: normal; + margin-bottom: 15px; + } + + p { + padding: 25px; + font-size: 1.9em; + color: #FFF; + @include border-radius(3px); + background: #555; + } + + a { + color: #CCC; + text-decoration: underline; + display: block; + font-size: .85em; + } +} + +.contact-panels { + width: 940px; + margin: 0 auto; +} + +.half-panel { + float: left; + width: 434px; + a { + @include flat-blue-btn; + @include border-radius(6px); + text-transform: none; + color: #fff; + font-size: 1.6em; + display: block; + text-align: center; + @include transition-all; + &:hover { + opacity: 0.8; + } + } +} + +.half-panel-margin { + margin-right: 70px; +} + +body#member-settings, body#team-settings, body#join-team, body#registration { + #main-content { + background: image-url("black-texture.jpg") repeat; + } + #basic_section { + img { + border: 5px solid #fff; + box-shadow: 0 0 5px 4px rgba(0, 0, 0, 0.1); + margin-bottom: 15px; + } + } + .big-title { + color: #fff; + font-size: 3.5em; + } + .panel { + width: 670px; + margin: 0 auto; + } + .current-resume { + a { + display: inline-block; + height: 25px; + line-height: 25px; + padding: 0 50px; + text-align: center; + color: #fff; + font-size: 1.3em; + margin-bottom: 15px; + background: $light-blue; + } + } + .upload-resume { + font-size: 1.3em; + } + #invitations { + padding: 30px; + p { + } + .sign-btns { + float: left; + padding-top: 20px; + li { + float: left; + margin-right: 10px; + } + } + h2 { + text-align: center; + margin-bottom: 20px; + text-transform: uppercase; + font-family: "MuseoSans-300"; + color: #393939; + font-size: 2em; + } + h3 { + float: left; + width: 220px; + padding: 10px 0 0 0; + border-right: 1px solid #eee; + } + .join, .stay { + float: right; + @include blue-btn; + padding: 0 10px; + @include border-radius(6px); + @include transition-all; + &:hover { + opacity: 0.5; + } + } + .team { + background: none repeat scroll 0 0 rgba(255, 255, 255, 0.8); + border: 2px solid #FFFFFF; + border-radius: 6px 6px 6px 6px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + padding: 20px; + margin-bottom: 30px; + } + .team-inside { + .members { + float: left; + padding: 0 20px; + width: 190px; + border-right: 1px solid #eee; + a { + margin-right: 5px; + } + } + img { + width: 40px; + height: 40px; + @include border-radius(100px); + } + .size { + margin: 10px 0 0 10px; + float: right; + padding: 5px; + background: #fff; + border: solid 1px #e6e6e6; + vertical-align: middle; + @include border-radius(6px); + } + } + } + .member-nav, .member-nav-with-team { + overflow: auto; + margin: 0 auto 40px auto; + width: 670px; + li { + float: left; + margin-left: 21px; + background: none; + padding: 0; + &:first-child { + margin: 0; + } + } + a { + font-size: 1.4em; + color: #fff; + background: image-url("settings-icons.png") no-repeat left top; + height: 37px; + line-height: 37px; + display: block; + padding-left: 50px; + opacity: 0.6; + @include transition-all; + &:hover { + opacity: 1; + } + } + .active { + opacity: 1; + } + .team-prefs { + background-position: 0px -144px; + } + .email-prefs { + background-position: 0px -108px; + } + .social-bookmarks { + background-position: 0px -36px; + } + .personalize { + background-position: 0px -72px; + } + } + .member-nav-with-team { + width: 820px; + } + #team_section { + .team-title { + font-size: 1.6em; + a { + color: $light-blue; + } + } + } + .panel .inside-panel-align-left { + .save { + padding-top: 20px; + input[type=submit] { + @include blue-btn; + @include border-radius(6px); + height: 58px; + line-height: 58px; + color: #fff; + text-transform: uppercase; + font-size: 1.8em; + display: block; + text-align: center; + width: 100%; + border: 0; + @include transition-all; + &:hover { + opacity: 0.8; + } + } + } + .cancel { + float: right; + padding-top: 20px; + margin-bottom: 20px; + text-transform: uppercase; + color: #393939; + &:hover { + color: $light-blue; + } + } + padding: 40px; + p { + font-size: 1.4em; + } + .special-p { + color: $dark-grey; + margin-bottom: 10px; + label { + font-size: 1em; + &.checkbox { + float: left; + } + } + } + label { + font-size: 1.4em; + color: $dark-grey; + margin-bottom: 10px; + display: block; + } + textarea, input[type=text] { + font-family: "MuseoSans-500"; + width: 97%; + height: 37px; + padding-left: 10px; + outline: none; + border: 0; + border: 2px solid #e4e4e4; + @include border-radius(6px); + @include subtle-box-shadow-inset; + font-size: 1.4em; + color: #000; + margin-bottom: 15px; + } + textarea { + min-height: 100px; + max-width: 97%; + padding: 10px 0 0 10px; + } + .radio { + overflow: auto; + li { + float: left; + background: none; + padding: 0; + margin-right: 20px; + label { + float: left; + margin-right: 10px; + } + } + } + .setting { + padding: 20px 0; + border-bottom: 2px dotted #e6e6e6; + margin-bottom: 15px; + } + .special-setting { + background: rgba(255, 255, 255, 0.8); + padding: 20px; + @include border-radius(6px); + border: 2px solid #fff; + margin-bottom: 15px; + @include subtle-box-shadow; + li { + float: left; + background: none; + padding: 0; + margin: 0 20px 0 0; + font-size: 1.2em; + label { + float: left; + margin: 0 10px 0 0; + color: $dark-grey; + } + } + .preview { + img { + display: block; + margin-bottom: 15px; + border: 5px solid #fff; + box-shadow: 0 0 5px 4px rgba(0, 0, 0, 0.1); + } + } + .photo-chooser { + display: inline-block; + border: 0; + background: #555; + font-size: 1.4em; + padding: 8px 24px; + @include border-radius(4px); + color: #fff; + &:hover { + background: $dark-grey; + } + } + } + .neverpost { + font-size: 1.3em; + margin: 0; + padding-top: 10px; + clear: both; + color: $light-blue; + } + .account-box { + border-bottom: 2px dotted #e6e6e6; + padding-bottom: 20px; + margin-bottom: 40px; + } + .linked-accounts { + a { + color: $light-blue; + } + li { + float: left; + background: rgba(255, 255, 255, 0.8); + padding: 20px; + width: 139px; + @include border-radius(6px); + border: 2px solid #fff; + margin-left: 20px; + @include subtle-box-shadow; + &:first-child { + margin: 0; + } + .unlink { + font-size: 0.7em; + padding: 3px 30px 3px 5px; + background: #efefef image-url("cross-icon.png") no-repeat 93% 50%; + color: $dark-grey; + @include border-radius(4px); + margin-top: 10px; + border: solid 1px #DBDBDB; + &:hover { + color: $light-blue; + } + } + .linked { + font-size: 1.3em; + margin-bottom: 5px; + } + .join-badge-orgs { + font-size: 0.4em; + font-style: normal; + padding-top: 10px; + label { + display: inline-block; + } + } + .linkaccount { + } + } + } + .testimonials { + text-align: center; + padding-top: 20px; + } + .already-signedup { + margin-top: 20px; + } + } + .special-setting { + position: relative; + .number { + top: -10px; + right: -10px; + display: block; + width: 30px; + height: 30px; + line-height: 34px; + position: absolute; + background: $light-blue; + color: #fff; + text-align: center; + @include border-radius(100px); + margin: 0; + } + .two { + background: $red; + } + .three { + background: $green; + } + .four { + background: $orange; + } + } + .explaination { + .name { + position: absolute; + top: 60px; + left: 40px; + color: #fff; + font-size: 1.1em; + } + .bio { + height: 45px; + padding-bottom: 5px; + position: absolute; + top: 80px; + left: 40px; + color: #fff; + font-size: 1em !important; + margin: 0; + width: 200px; + line-height: 13px; + border-bottom: 2px #2B2B2E solid; + } + img { + width: 100%; + } + .one { + top: 60px; + right: 310px; + } + .two { + top: 147px; + right: 310px; + } + .three { + top: 140px; + right: 220px; + } + .four { + top: 150px; + right: 25px; + } + } + .name-bio { + p { + margin: 0; + a { + color: $light-blue; + } + } + } + #email_section { + input[type="checkbox"] { + float: right; + font-size: 1.6em; + } + } + .switch { + background: image-url("switch.png") no-repeat right bottom; + float: right; + color: $green; + text-transform: uppercase; + font-size: 1.2em; + font-family: "MuseoSans-700"; + height: 24px; + line-height: 24px; + padding-right: 75px; + &.inactive { + background-position: right top; + &:after { + content: 'Opportunities disabled'; + color: $red; + } + &:hover { + background-position: right bottom; + &:after { + content: 'Enable Opportunities?'; + color: $green; + } + } + } + &.active { + background-position: right bottom; + &:after { + content: 'Opportunities enabled'; + color: $green; + } + &:hover { + background-position: right top; + &:after { + content: 'Disable Opportunities?'; + color: $red; + } + } + } + } + .new-form { + li, ul { + background: none; + padding: 0; + margin: 0; + } + } + .header { + padding-top: 25px; + margin-bottom: 25px; + border-top: solid 1px #eaeaea; + } + .top-header { + border: 0; + padding: 0; + } + .form-heading { + text-transform: uppercase; + letter-spacing: 0.1em; + font-size: 1.5em; + font-family: "MuseoSans-700"; + float: left; + } + .main-heading { + text-align: center; + text-transform: uppercase; + color: $light-blue; + font-size: 1.5em; + line-height: 1.8em; + padding: 20px 0; + border-bottom: solid 1px #eaeaea; + border-top: solid 1px #eaeaea; + strong { + font-family: "MuseoSans-900"; + } + } + .form-section { + padding-bottom: 15px; + &.errors { + width: 100%; + color: #ff0000; + } + } + .private { + float: right; + color: $light-blue; + text-transform: uppercase; + font-family: "MuseoSans-700"; + background: image-url("private-eye.png") no-repeat left; + padding-left: 30px; + } + .icon-list { + padding: 20px 0 !important; + background: image-url("dots.png") no-repeat 142px 87px, image-url("dots.png") no-repeat 347px 87px; + margin-bottom: 40px; + li { + font-family: "MuseoSans-500"; + float: left; + width: 175px; + margin-left: 32px; + color: $mid-blue-grey; + font-size: 1.3em; + line-height: 1.8em; + @include ts-bottom-white; + text-align: center; + background: none; + padding: 0; + &:first-child { + margin-left: 0; + } + .image { + width: 131px; + height: 140px; + margin: 0 auto 20px auto; + background: image-url("icon-list.png") no-repeat top; + background-size: 100%; + &.coffee { + background-position: 0px -134px; + } + &.eye { + background-position: 0px -275px; + } + } + } + } + .use-account { + label { + float: left; + width: 380px; + margin-bottom: 0; + } + input { + float: right; + font-size: 5em; + } + &:hover { + background: #f8fcff; + } + } + .hint { + color: $mid-blue-grey; + font-family: "MuseoSans-500"; + margin-bottom: 15px; + } + .btn { + @include border-radius(4px); + display: block; + color: #fff; + text-align: center; + padding: 20px 0; + border: 0; + font-size: 1.6em; + text-shadow: 0px -1px 0 rgba(0, 0, 0, 0.3); + box-shadow: inset 0 1px 0 0 rgba(225, 225, 225, 0.5); + &:hover { + opacity: 0.5; + } + } + .interested-in { + margin-bottom: 15px !important; + li { + float: left; + margin-right: 15px; + color: #fff; + } + label { + display: block; + background: $light-grey; + font-size: 1em !important; + padding: 8px 41px; + cursor: pointer; + border: solid 1px #595959; + color: #fff !important; + } + input[type=checkbox] { + display: none; + } + input[type=checkbox]:checked + label { + background: $green; + border: solid 1px #377d18; + } + } + .amount-btns { + li { + float: left; + margin-left: 15px; + margin-bottom: 10px; + &:nth-child(3n+1) { + margin-left: 0; + } + } + label { + display: block; + background: $light-blue; + font-size: 1em !important; + padding: 12px 32px; + width: 120px; + cursor: pointer; + border: solid 1px #6598eb; + color: #fff !important; + } + input[type=radio] { + display: none; + } + input[type=radio]:checked + label { + background: $green; + border: solid 1px #377d18; + } + } + .form-list { + > li { + float: left; + width: 285px; + margin-left: 20px; + margin-bottom: 10px; + font-size: 1em; + &:nth-child(2n+1) { + margin-left: 0; + } + input[type=text] { + width: 250px !important; + padding: 5%; + height: 8px !important; + } + } + } + .inside-list { + li { + font-size: 1.2em; + color: #808080; + &:first-child { + margin-bottom: 10px; + } + } + input[type=checkbox] { + float: right; + } + } + .submit-section { + border-top: dotted 3px #eaeaea; + padding-top: 30px; + .try-it { + background: $green; + float: left; + width: 70%; + border: solid 1px #6598EB; + text-transform: uppercase; + letter-spacing: 0.2em; + font-size: 1.8em; + &.update { + width: 100%; + } + } + .skip { + background: #9e9e9e; + border: solid 1px #898989; + float: right; + width: 160px; + } + } +} + +@import "networks", "team", "home"; +#simplemodal-overlay { + background-color: #000; + cursor: wait; +} + +#simplemodal-container a.modalCloseImg { + background: image-url("x.png") no-repeat; + width: 25px; + height: 29px; + display: inline; + z-index: 3200; + position: absolute; + top: -15px; + right: -16px; + cursor: pointer; +} + +.achievement-unlocked { + background: #fff; + color: #000; + padding: 50px 67px; + margin: 70px auto 25px auto; + @include border-radius(3px); + position: relative; + width: 496px; + min-height: 153px; + word-wrap: break-word; + h1 { + font-size: 3em; + font-family: "MuseoSans-300"; + text-transform: uppercase; + text-align: center; + margin-bottom: 20px; + background: image-url("big-gold-star.png") no-repeat left top, image-url("big-gold-star.png") no-repeat right top; + } + h2 { + text-align: center; + margin-bottom: 10px; + font-size: 2.8em; + } + p { + text-align: center; + line-height: 1.6em; + margin-bottom: 30px; + } + .seeprofile { + text-align: center; + margin-bottom: 30px; + font-size: 1.6em; + color: $light-blue; + display: block; + margin: 0 auto 15px auto; + } + .clickme { + background: $light-blue; + display: block; + text-align: center; + padding: 20px 0; + font-size: 2em; + @include border-radius; + margin-bottom: 20px; + @include transition-all; + color: #fff; + &:hover { + opacity: 0.5; + } + } + .see-all { + width: 100%; + text-align: center; + display: block; + margin: 0 auto; + @include transition-all; + a { + font-size: 1.4em; + color: $light-blue; + } + &:hover { + opacity: 0.5; + } + } + #award { + margin-bottom: 20px; + img { + display: block; + margin: 0 auto; + } + } +} + +.follow-team-option { + .follow-team { + @include follow-team-button; + } + a { + } + &:hover { + opacity: 0.8; + } +} + +.twitter-follow-button { + text-align: bottom; + position: relative; + top: 5px; +} + +body#blog { + article { + margin-bottom: 15px; + padding-bottom: 15px; + border-bottom: 5px solid #eee; + h1 { + font-size: 2.4em; + color: $dark-grey; + margin-bottom: 10px; + text-align: center; + a { + color: $dark-grey; + } + } + a { + color: $light-blue; + } + .post-details { + font-size: 1.4em; + color: $dark-grey; + margin-bottom: 20px; + padding-bottom: 20px; + border-bottom: solid 1px #eee; + text-align: center; + } + pre { + font-size: 1.4em; + line-height: 22px; + color: $red; + } + } +} + + + +input[type=file].safari5-upload-hack { + min-width: 100%; + min-height: 100%; + opacity: 0; + position: absolute; + z-index: -1; + top: 0; + left: 0; +} + +@import "dashboard"; +.queue { + ol { + padding-top: 20px; + li { + display: block; + ul li { + display: inline-block; + } + } + } +} + +@import "featured-teams", "jobs", "protip-phone", "product_description"; +#new-home-template { + background: #d5d5d5 image-url("premium-team-description/dot-bg.jpg") repeat; + * { + box-sizing: border-box; + } + .wrapper { + max-width: 1140px; + margin: 0 auto; + background: #3f7eb0; + } + .site-header { + padding: 4% 7%; + background: image-url("new-home/div-bar.png") no-repeat top center; + .new-home-logo { + float: left; + width: 226px; + height: 30px; + background: image-url("new-home/new-home-logo.png") no-repeat; + background-size: 226px; + @include transition-all; + &:hover { + opacity: 0.5; + } + span { + display: none; + } + } + .login { + float: right; + color: #9dc1df; + font-size: 1.6em; + padding-top: 1%; + a { + color: #fff; + &:hover { + text-decoration: underline; + } + } + } + } + .intro { + background: #3f7eb0; + h1 { + font-size: 5em; + color: #fff; + text-align: center; + font-family: "MuseoSans-300"; + padding: 2% 7%; + } + h2 { + color: #1c527d; + text-align: center; + font-family: 'nothing_you_could_doregular', sans-serif; + margin-bottom: 2%; + position: relative; + background: image-url("new-home/pencil-lines.png") no-repeat center; + } + .sign-up-list { + text-align: center; + margin-bottom: 7%; + li { + display: inline-block; + margin-left: 2%; + &:first-child { + margin-left: 0; + } + } + a { + display: block; + background: #fbfbfb; + @include border-radius(6px); + color: #2c6593; + font-size: 1.6em; + height: 60px; + line-height: 60px; + width: 171px; + text-align: center; + box-shadow: 0 3px 0 0 rgba(53, 103, 163, 0.7); + &:hover { + background: #1c527d; + color: #fff; + } + span { + display: inline-block; + height: 23px; + width: 21px; + background: image-url("new-home/sign-up-sprite-home.png") no-repeat 0 0; + margin-right: 5px; + margin-left: -20px; + margin-bottom: -4px; + } + .twitter { + background-position: 0px -23px; + } + .linkedin { + background-position: 0px -48px; + } + } + } + } + .slider { + position: relative; + } + .flex-control-nav { + opacity: 0.5; + padding: 20px 0; + bottom: 0; + top: -60px; + } + .slides { + ul { + } + li { + height: 460px; + background: rgba(0, 0, 0, 0.2); + } + .browser { + width: 600px; + bottom: -3px; + position: absolute; + img { + width: 100%; + } + } + .bubble { + float: right; + @include border-radius(50%); + width: 300px; + height: 300px; + background: rgba(44, 50, 60, 0.9); + margin: 5% 5% 0 0; + position: relative; + z-index: 100; + h3 { + font-family: "MuseoSans-300"; + font-size: 1.8em; + line-height: 1.5em; + color: #fff; + text-align: center; + } + } + .protips-slide, .teams-slide { + .browser { + right: 5%; + } + .bubble { + margin: 5% 0 0 5%; + float: left; + &:before { + display: none; + } + } + } + .profile-slide .bubble { + padding: 100px 36px 0 36px; + } + .protips-slide .bubble { + padding: 69px 36px 0 36px; + } + .teams-slide .bubble { + padding: 75px 35px 0 37px; + } + .profile-slide { + background: image-url("new-home/profile-bg.jpg") no-repeat; + background-size: cover; + .browser { + left: 5%; + } + } + .protips-slide { + background: image-url("new-home/tip-bg.jpg") no-repeat left; + background-size: cover; + } + .teams-slide { + background: image-url("new-home/team-bg.jpg") no-repeat; + background-size: cover; + } + } + @media screen and (max-width: 1024px) { + .intro { + h1 { + font-size: 5em; + } + } + } + @media screen and (max-width: 768px) { + .site-header { + .new-home-logo { + float: none; + display: block; + margin: 0 auto 3% auto; + } + .login { + float: none; + text-align: center; + padding-top: 0; + } + } + .intro { + h1 { + font-size: 4em; + } + .sign-up-list { + li { + margin-bottom: 3%; + } + } + } + .flex-control-nav { + display: none; + } + .flex-direction-nav { + li:nth-child(1) { + a { + left: 1%; + } + } + li:nth-child(2) { + a { + right: 1%; + } + } + } + .slides { + li { + height: 460px; + background: rgba(0, 0, 0, 0.2); + overflow: hidden; + height: auto !important; + } + .profile-slide .bubble, .protips-slide .bubble, .teams-slide .bubble { + padding: 0; + } + .bubble { + float: none; + @include border-radius(0); + width: 100%; + height: auto; + padding: 5% 7% !important; + margin: 0; + margin-bottom: 4%; + &:after, &:before { + display: none !important; + } + h3 { + font-size: 1.6em; + line-height: 1.4em; + /*text-align: left;*/ + } + } + .browser { + width: 80%; + position: static; + /*display: inline-block;*/ + text-align: center; + margin: 0 auto -3px auto; + right: auto !important; + left: auto !important; + overflow: hidden; + } + .protips-slide, .teams-slide { + .bubble { + margin: 0; + margin-bottom: 4%; + } + } + } + + } + /*760 media query end*/ + @media screen and (max-width: 400px) { + /* .slides { + .browser { + width: 300px; + } + }*/ +.intro { + h1 { + font-size: 2.8em; + line-height: 1.3em; + padding: 5% 7%; + } + .sign-up-list { + padding: 0 10%; + li { + display: block; + margin-left: 0; + } + a { + width: 100%; + height: 40px; + line-height: 40px; + } + } +} + + } + /*phone media query end*/ +} + +.analytics { + background: #fff; + @include border-radius(6px); + margin-bottom: 20px; + header { + padding: 30px 20px; + h1 { + font-size: 2.5em; + span { + padding-left: 10px; + font-size: 0.8em; + } + } + } + .analytics-table tr { + &:nth-child(odd) { + td { + @include paper-panel; + } + } + } + .top-list td { + border-top: solid 1px #eaeaea; + border-bottom: solid 1px #eaeaea; + font-size: 1.4em; + font-family: "MuseoSans-500"; + padding: 20px; + border-left: solid 1px #eaeaea; + &:first-child { + border-left: 0; + } + } + .main-list tr { + border-top: solid 1px #eaeaea; + border-bottom: solid 1px #eaeaea; + } + .main-list td { + padding: 20px; + border-left: solid 1px #eaeaea; + &:first-child { + border-left: 0; + } + } + .user { + width: 200px; + } + .sections { + width: 140px; + } + .time { + width: 115px; + } + .last-visit { + width: 135px; + } + .exited { + width: 146px; + position: relative; + .fix { + width: 146px; + @include ellipsis; + } + a { + color: $light-blue; + } + .top-pick { + display: block; + position: absolute; + background: image-url("team/top-pick.png") no-repeat; + top: -9px; + right: -8px; + width: 77px; + height: 77px; + span { + display: none; + } + } + } + .time, .last-visit, .exited { + font-size: 1.4em; + } + .explored { + li { + display: inline-block; + font-size: 1.1em; + background: $light-blue-grey; + @include border-radius(4px); + margin: 0 5px 6px 0; + padding: 4px 8px; + color: #fff; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); + &:nth-child(2) { + background: $mid-blue-grey; + } + &:nth-child(3) { + background: $light-blue; + } + &:nth-child(4) { + background: #ff6600; + } + &:nth-child(5) { + background: #e05745; + } + &:nth-child(6) { + background: #b65e88; + } + &:nth-child(7) { + background: #9fc554; + } + &:nth-child(8) { + background: #ff85d6; + } + &:nth-child(9) { + background: #1526ff; + } + &:nth-child(10) { + background: #efd430; + } + &:nth-child(11) { + background: #179c2e; + } + &:nth-child(12) { + background: #b6b5b2; + } + &:nth-child(13) { + background: #c5c198; + } + &:nth-child(14) { + background: #8320b6; + } + &:nth-child(15) { + background: #55c5ac; + } + } + } + .avatar { + display: inline-block; + width: 41px; + height: 41px; + img { + width: 41px; + height: 41px; + @include border-radius(4px); + } + } + .details { + display: inline-block; + vertical-align: top; + padding-left: 10px; + width: 143px; + h3 { + font-size: 1.6em; + margin-bottom: 2px; + @include ellipsis; + } + h4 { + font-size: 1.1em; + color: $mid-blue-grey; + @include ellipsis; + } + } +} + + +.account-dropdown { + .avatar { + height: 32px; + width: 32px; + border-radius: 3px; + box-shadow: 0 1px 0 $blue-grey; + margin: -2px 5px 0 0; + position: relative; + top: 10px; + } + .dropdown-panel { + background-color: $blue-grey; + line-height: 2em; + min-width: 70px + } +} + +/* Bug fix for white on white text in user nav dropdown */ +.jq-dropdown-panel { + background-color: #343131 !important; +} + + +/* ------------------------------------ */ +/* Select Box Styling (cross-browser) */ +/* Source: https://github.com/filamentgroup/select-css/blob/master/src/select.css */ +/* ---------------------------------- */ +/* Container used for styling the custom select, the buttom class below adds the bg gradient, corners, etc. */ +.custom-select { + position: relative; + display:block; + margin-top:0.5em; + padding:0; +} + +/* This is the native select, we're making everything but the text invisible so we can see the button styles in the wrapper */ +.custom-select select { + width:100%; + margin:0; + background:none; + border: 1px solid transparent; + outline: none; + /* Prefixed box-sizing rules necessary for older browsers */ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + /* Remove select styling */ + appearance: none; + -webkit-appearance: none; + /* Font size must the 16px or larger to prevent iOS page zoom on focus */ + font-size:1em; +} + +/* Custom arrow sits on top of the select - could be an image, SVG, icon font, etc. or the arrow could just baked into the bg image on the select. Note this si a 2x image so it will look bad in browsers that don't support background-size. In production, you'd handle this resolution switch via media query but this is a demo. */ + +.custom-select::after { + content: ""; + position: absolute; + width: 9px; + height: 8px; + top: 50%; + right: 1em; + margin-top:-4px; + background-image: url("select-arrow.png"); + background-repeat: no-repeat; + background-size: 100%; + z-index: 2; + /* This hack make the select behind the arrow clickable in some browsers */ + pointer-events:none; +} + +/* Hover style */ +.custom-select:hover { + border:1px solid #888; +} + +/* Focus style */ +.custom-select select:focus { + outline:none; + box-shadow: 0 0 1px 3px rgba(180,222,250, 1); + background-color:transparent; + color: #222; + border:1px solid #aaa; +} + +/* Set options to normal weight */ +.custom-select option { + font-weight:normal; +} + +/* ------------------------------------ */ +/* START OF UGLY BROWSER-SPECIFIC HACKS */ +/* ---------------------------------- */ + +/* OPERA - Pre-Blink nix the custom arrow, go with a native select button to keep it simple. Targeted via this hack http://browserhacks.com/#hack-a3f166304aafed524566bc6814e1d5c7 */ +x:-o-prefocus, .custom-select::after { + display:none; +} + + /* IE 10/11+ - This hides native dropdown button arrow so it will have the custom appearance, IE 9 and earlier get a native select - targeting media query hack via http://browserhacks.com/#hack-28f493d247a12ab654f6c3637f6978d5 - looking for better ways to achieve this targeting */ +/* The second rule removes the odd blue bg color behind the text in the select button in IE 10/11 and sets the text color to match the focus style's - fix via http://stackoverflow.com/questions/17553300/change-ie-background-color-on-unopened-focused-select-box */ +@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { + .custom-select select::-ms-expand { + display: none; + } + .custom-select select:focus::-ms-value { + background: transparent; + color: #222; + } +} + + +/* FIREFOX won't let us hide the native select arrow, so we have to make it wider than needed and clip it via overflow on the parent container. The percentage width is a fallback since FF 4+ supports calc() so we can just add a fixed amount of extra width to push the native arrow out of view. We're applying this hack across all FF versions because all the previous hacks were too fragile and complex. You might want to consider not using this hack and using the native select arrow in FF. Note this makes the menus wider than the select button because they display at the specified width and aren't clipped. Targeting hack via http://browserhacks.com/#hack-758bff81c5c32351b02e10480b5ed48e */ +/* Show only the native arrow */ +@-moz-document url-prefix() { + .custom-select { + overflow: hidden; + } + .custom-select select { + width: 120%; + width: -moz-calc(100% + 3em); + } + +} + +/* Firefox focus has odd artifacts around the text, this kills that. See https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-focusring */ +.custom-select select:-moz-focusring { + color: transparent; + text-shadow: 0 0 0 #000; +} + +/* ------------------------------------ */ +/* END OF UGLY BROWSER-SPECIFIC HACKS */ +/* ------------------------------------ */ diff --git a/app/assets/stylesheets/coderwallv2.scss b/app/assets/stylesheets/coderwallv2.scss new file mode 100644 index 00000000..73905850 --- /dev/null +++ b/app/assets/stylesheets/coderwallv2.scss @@ -0,0 +1,190 @@ +@import "fonts","base","compass/css3", "materialize"; + +nav { + .nav-wrapper { + ul li a img { + max-height: 64px; + } + } +} + +.logo { + margin-top: 17px; + margin-left: 15px; + width: 182px; + height: 27px; + display: block; + background: image-url("logo.png") no-repeat; + text-rendering: optimizeLegibility; + font-smoothing: subpixel-antialiased; + transition: all 0.2s ease-out; + span { + display: none; + } + &:hover { + opacity: 0.8; + } +} + +.bg-primary { + background-color: #d95626; + color: #fff; + .container { + .row { + margin-bottom: 0; + .text-center { + margin: 0; + text-align: center; + padding: 5px; + a{ + color: #fff; + &:hover{ + text-decoration: underline !important; + } + &.close{ + padding: 0px 10px; + background-color: #AD2E00; + float: right; + &:hover{ + background-color: #AD0202 !important; + } + } + } + } + } + } +} + +footer{ + .right_part{ + text-align: right; + } + .copyright,.credits { + color: #444; + text-align: center; + } +} + +.info-post{ + color: #fff !important; + background-color: #26a69a; + padding: 10px +} + +.no_margin{ + margin: 0; +} + +.no_shadow{ + box-shadow: none !important; + +} + +.bark_background{ + background-color: #9e9e9e; +} +.clearboth { + clear: both; +} +.notification-bar-inside { + margin: 0 auto; + width: 100%; + background-color: #26A69A; + padding: 10px; + color: #FFFFFF; + p { + display: inline-block; + } + a.close-notification { + display: inline-block; + float: right; + background-color: #E66167; + padding: 10px; + color: #FFFFFF; + &:hover{ + background-color: #CE4046; + } + } +} + +#member-settings{ + ul.linked-accounts{ + text-align: center; + li{ + display: inline-block; + padding: 20px; + height: 200px; + border: 1px solid #ddd; + vertical-align: top; + margin-bottom: 3px; + i.fa-github-square{ + } + i.fa-twitter-square{ + color: #03C1E6; + } + i.fa-linkedin-square{ + color: #1278AB; + } + } + } + .special-setting{ + div{ + display: inline-block; + margin-right: 10px; + vertical-align: top; + } + } + .setting{ + padding: 20px 0; + border-bottom: 2px dotted #e6e6e6; + margin-bottom: 15px; + } + .collection { + .collection-item.avatar { + .title { + background-color: #FBF9F9; + display: block; + } + } + } + .collapsible { + >li.active { + box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15) !important; + } + .collapsible-header i{ + margin-right: 15px; + img{ + height: 43px; + } + } + form{ + padding: 20px; + } + } + ul.tabs{ + margin-top: 50px; + } + .tab_content{ + margin-top: 10px; + } + ul.email_list{ + color: #505050; + font-size: 13px; + li{ + i { + font-size: 13px; + } + } + } + .profile_card{ + .card-image { + min-height: 300px; + } + .card-title { + color: #000; + font-size: 14px; + .avatar{ + } + } + } +} diff --git a/app/assets/stylesheets/connections.scss b/app/assets/stylesheets/connections.scss index b4434bdb..13f509bf 100644 --- a/app/assets/stylesheets/connections.scss +++ b/app/assets/stylesheets/connections.scss @@ -1,5 +1,5 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; //Connections (previously called networks) body#network { @@ -132,7 +132,6 @@ body#network { .me { background: #F3F3EF; - -webkit-box-shadow: inset 0px 0px 0px 5px rgba(207, 205, 184, 0.2); box-shadow: inset 0px 0px 0px 5px rgba(207, 205, 184, 0.2); .user-details { diff --git a/app/assets/stylesheets/dashboard.css.scss b/app/assets/stylesheets/dashboard.css.scss new file mode 100644 index 00000000..2f0cfc8a --- /dev/null +++ b/app/assets/stylesheets/dashboard.css.scss @@ -0,0 +1,774 @@ +@import "base"; +@import "compass/css3"; + +//Activity feed +body#activity { + .inside-main-content { + border-left: solid 10px #e0e0e0; + width: 1160px; + padding-left: 0px; + padding-top: 40px; + } + +} + +.bundle-panel { + display: block; + //float: right; + width: 270px; + height: 120px; + margin-bottom: 25px; + background: $dark-grey image-url("profile/bundle-panel.png") no-repeat bottom; + @include border-radius(4px); + @include transition-all; + + span { + display: none; + } + + &:hover { + background: #1f1f1f image-url("profile/bundle-panel.png") no-repeat bottom; + } +} + +.secondary-sidebar { + float: right; + width: 330px; + //padding-top: 25px; + + ul { + margin-bottom: 25px; + } + + h2 { + color: #a9a9a9; + font-size: 1.6em; + text-align: center; + margin-bottom: 20px; + text-transform: uppercase; + font-family: "MuseoSans-100"; + } + + .add-tip { + background: #474747; + color: #fff; + display: block; + padding: 20px 20px; + font-size: 1.2em; + margin-bottom: 25px; + text-align: center; + text-transform: uppercase; + + &:before { + @include icon-font; + content: "."; + margin-right: 10px; + } + + &:hover { + opacity: 0.7; + } + } + + li { + //@include border-radius(4px); + margin-bottom: 10px; + @include subtle-box-shadow; + background: #fff; + @include transition-all; + + &.no-networks { + list-style: none; + ul.tags li { + list-style: none; + display: table; + margin: 0 auto; + a { + font-size: 1.5em; + border: 0; + display: inline-block; + padding: 0; + } + } + &:hover { + opacity: 1; + } + + p { + padding: 10px 20px; + font-family: "MuseoSans-500"; + font-size: 1.3em; + line-height: 22px; + + a { + display: inline; + padding: 0; + margin: 0; + font-size: 1em !important; + color: $light-blue; + + &:hover { + border-bottom: dotted 1px $light-blue; + } + } + } + } + } + .topics-list { + + li { + a { + font-size: 1.6em; + } + } + } + //topics-list-end + + .tips-list { + li { + &:hover { + opacity: 0.5; + } + a { + font-size: 1.3em; + color: $dark-grey; + display: block; + padding: 15px 20px; + font-family: "MuseoSans-500"; + } + } + } + //tips-list-end + +} + +section.activity { + float: left; + width: 750px; + min-height: 600px; + + header { + border-bottom: solid 3px #bfceda; + padding-bottom: 20px; + margin-bottom: 20px; + + h1 { + font-size: 2.6em; + float: left; + text-indent: 30px; + } + + ul { + float: right; + } + + li { + float: left; + margin-left: 20px; + + &:first-child { + margin: 0; + } + } + } + + //items + .feed { + + > li, > ul > li { + margin-bottom: 20px; + padding-left: 32px; + position: relative; + } + + .more-activity { + a { + @include more-button-activity; + @include border-radius(6px); + @include transition-all; + + &:hover { + background: #667d8d; + color: #BFCEDA; + } + } + + &.no-new-activity { + visibility: hidden; + height: 0; + margin: 0; + padding: 0; + } + } + + .graphic { + position: absolute; + top: 12px; + left: -26px; + width: 37px; + height: 37px; + @include border-radius(50%); + //background: image-url("profile/activity-icons.png") no-repeat top; + background: #fff; + z-index: 50; + + &:before { + @include icon-font; + content: "t"; + text-align: center; + display: block; + line-height: 37px; + font-size: 14px; + z-index: 100; + position: relative; + } + //before + } + + .item { + background: #fff; + //@include border-radius(6px); + @include subtle-box-shadow; + + &:before { + top: 25px; + left: -20px; + position: absolute; + content: " "; + display: block; + width: 52px; + height: 10px; + background: #e0e0e0; + z-index: 0; + } + + p { + margin-bottom: 10px; + a { + color: $light-blue; + } + } + + h1 { + color: $dark-grey; + font-size: 1.8em; + margin-bottom: 10px; + width: 92%; + @include transition-all; + } + + a h1:hover { + color: $light-blue; + } + + .header { + min-height: 60px; + border-bottom: 1px solid #eaeaea; + background: #fafafa; + + a.hiring-ribbon { + position: absolute; + z-index: 100; + width: 76px; + height: 77px; + top: -7px; + right: -5px; + background: image-url("team/hiring.png") no-repeat; + + span { + display: none; + } + } + + ul { + float: left; + margin: 15px; + width: 538px; + height: 30px; + //@include ellipsis; + overflow: auto; + } + + li { + float: left; + line-height: 30px; + font-size: 1.3em; + height: 30px; + + span { + float: left; + margin-right: 10px; + } + + a { + color: $light-blue; + //@include transition-all; + + &:hover { + opacity: 0.7; + } + + // &:visited { + // color: $red; + // } + } + + &.fragment { + margin-left: 5px; + } + } + + .user, .team { + img { + float: left; + width: 30px; + height: 30px; + @include border-radius(4px); + margin-right: 10px; + } + } + + .user { + margin-right: 5px; + } + } + + .content { + //@include paper-panel; + padding: 20px; + position: relative; + //@include border-radius-bottom(6px); + + a { + color: $dark-grey; + @include transition-all; + + &:hover { + color: $light-blue; + } + } + + // &:after { + // content: ""; + // width: 0; + // height: 0; + // border-left: 8px solid transparent; + // border-right: 8px solid transparent; + // border-bottom: 8px solid #eaeaea; + // left: 20px; + // top: -8px; + // position: absolute; + // } + + .small-upvote { + @include small-upvote; + position: absolute; + top: 0px; + right: 20px; + @include transition-all; + + &:hover { + opacity: 0.7; + } + } + } + + .team-added, .badge-unlocked { + overflow: auto; + margin-bottom: 20px; + font-family: "MuseoSans-500"; + + img { + float: left; + width: 32px; + height: 32px; + margin-right: 10px; + } + + a { + //float: left; + color: $dark-grey; + font-size: 1.8em; + line-height: 32px; + } + } + + .badge-unlocked { + img { + width: 80px; + height: 80px; + } + a { + line-height: 80px; + } + } + .footnote { + padding-top: 5px; + padding-bottom: 5px; + a { + color: $light-blue; + + &:hover { + opacity: 0.7; + } + } + p { + margin: 0; + } + } + .footer { + padding-top: 10px; + border-top: 1px solid #eaeaea; + + a { + color: $light-blue; + + &:hover { + opacity: 0.7; + } + } + + p { + margin: 0; + } + } + + .actions-list { + + li { + float: left; + margin-right: 10px; + + // &:nth-child(2), &:first-child { + // margin: 0; + // } + } + + a { + height: 18px; + line-height: 18px; + font-size: 1.2em; + display: inline-block; + background: image-url("profile/activity-action-icons.png") no-repeat left top; + padding-left: 25px; + color: $dark-grey; + @include transition-all; + opacity: 0.5; + + &:hover { + color: $dark-grey; + opacity: 1; + } + } + + .view { + background-position: 0px 0px; + } + + .write-tip { + background-position: 0px -18px; + } + + .tweet { + background-position: 0px -36px; + } + + .add-skill { + background-position: 0px -54px; + } + + .follow { + background-position: 0px -73px; + } + + .reply { + background-position: 0px -92px; + } + + .hide { + display: none !important; + } + } + + .tags { + //float: left; + overflow: hidden; + height: 20px; + width: 100%; + margin-bottom: 10px; + + li { + float: left; + margin-left: 5px; + line-height: 20px; + + &:first-child { + margin-left: 0; + } + + a { + color: $dark-grey; + + &:hover { + color: $light-blue; + } + } + } + } + } + //end-of-item + + //for protips + .ptip { + .content { + h1 { + width: 480px; + } + .small-upvote { + &:hover { + color: #fff; + } + } + } + } + + .protip-viewed, .protip-upvoted, .comment, .comment-liked { + .content { + h1 { + font-size: 1.3em; + + blockquote { + font-size: 1.4em; + border-left: solid 5px #ccc; + margin: 10px 0; + padding-left: 10px; + } + } + } + } + + //types of update + + .link-protip { + .graphic { + &:before { + content: "@"; + color: #00a8e1; + } + } + } + + .trending-protip { + .graphic { + &:before { + content: "2"; + color: #f35e39; + font-size: 17px; + } + } + } + + .new-protip { + .graphic { + &:before { + content: "."; + color: #00a8e1; + } + } + } + + .admin { + .content { + a { + color: $light-blue; + } + img { + max-width: 400px; + max-height: 600px; + } + background: #FEFFEF; + + p { + a { + color: $light-blue; + } + } + } + .graphic { + &:before { + content: "a"; + color: $light-blue; + } + } + } + + .endorsement { + .graphic { + &:before { + content: "#"; + color: #ff9c00; + } + } + } + + .added-skill { + .graphic { + &:before { + content: "$"; + color: #139593; + } + } + } + + .job { + .graphic { + &:before { + content: "b"; + color: #bb1352; + } + } + } + + .new-team { + .graphic { + &:before { + content: "3"; + color: #bb1352; + font-size: 18px; + } + } + } + + .new-member { + .graphic { + &:before { + content: "1"; + color: #9ad6d4; + } + } + } + + .new-follow { + .graphic { + &:before { + content: "!"; + color: $new-green; + font-size: 16px; + } + } + } + + .new-team-follow { + .graphic { + &:before { + content: "!"; + color: #bb1352; + font-size: 16px; + } + } + } + + .new-team-request { + .graphic { + &:before { + content: "3"; + color: #139593; + font-size: 18px; + } + } + } + + .quest { + .graphic { + &:before { + content: "~"; + color: #139593; + } + } + } + + .level-up { + .graphic { + &:before { + content: "&"; + color: #139593; + } + } + } + + .profile-viewed { + .graphic { + &:before { + content: "6"; + color: #293e6b; + font-size: 17px; + } + } + } + + .protip-viewed { + .graphic { + &:before { + content: "6"; + color: #00a8e1; + font-size: 17px; + } + } + } + + .protip-upvoted { + .graphic { + &:before { + content: "u"; + color: #f35e39; + font-size: 17px; + } + } + } + + .badge-unlocked { + .content { + //background: #f1ffdc; + } + .graphic { + &:before { + content: "5"; + color: #4aae23; + font-size: 16px; + } + } + } + + .mayor { + .graphic { + &:before { + content: "4"; + color: #9f60b5; + font-size: 17px; + } + } + } + + .comment { + .graphic { + &:before { + content: "7"; + color: #6c6f70; + } + } + } + + .comment-liked { + .graphic { + &:before { + content: "^"; + color: #ff7361; + } + } + } + + } + //end-of-feed +} + +//end-of-activity \ No newline at end of file diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss deleted file mode 100644 index 90703505..00000000 --- a/app/assets/stylesheets/dashboard.scss +++ /dev/null @@ -1,774 +0,0 @@ -@import "base"; -@import "compass/css3/"; - -//Activity feed -body#activity { - .inside-main-content { - border-left: solid 10px #e0e0e0; - width: 1160px; - padding-left: 0px; - padding-top: 40px; - } - -} - -.bundle-panel { - display: block; - //float: right; - width: 270px; - height: 120px; - margin-bottom: 25px; - background: $dark-grey image-url("profile/bundle-panel.png") no-repeat bottom; - @include border-radius(4px); - @include transition-all; - - span { - display: none; - } - - &:hover { - background: #1f1f1f image-url("profile/bundle-panel.png") no-repeat bottom; - } -} - -.secondary-sidebar { - float: right; - width: 330px; - //padding-top: 25px; - - ul { - margin-bottom: 25px; - } - - h2 { - color: #a9a9a9; - font-size: 1.6em; - text-align: center; - margin-bottom: 20px; - text-transform: uppercase; - font-family: "MuseoSans-100"; - } - - .add-tip { - background: #474747; - color: #fff; - display: block; - padding: 20px 20px; - font-size: 1.2em; - margin-bottom: 25px; - text-align: center; - text-transform: uppercase; - - &:before { - @include icon-font; - content: "."; - margin-right: 10px; - } - - &:hover { - opacity: 0.7; - } - } - - li { - //@include border-radius(4px); - margin-bottom: 10px; - @include subtle-box-shadow; - background: #fff; - @include transition-all; - - &.no-networks { - list-style: none; - ul.tags li { - list-style: none; - display: table; - margin: 0 auto; - a { - font-size: 1.5em; - border: 0; - display: inline-block; - padding: 0; - } - } - &:hover { - opacity: 1; - } - - p { - padding: 10px 20px; - font-family: "MuseoSans-500"; - font-size: 1.3em; - line-height: 22px; - - a { - display: inline; - padding: 0; - margin: 0; - font-size: 1em !important; - color: $light-blue; - - &:hover { - border-bottom: dotted 1px $light-blue; - } - } - } - } - } - .topics-list { - - li { - a { - font-size: 1.6em; - } - } - } - //topics-list-end - - .tips-list { - li { - &:hover { - opacity: 0.5; - } - a { - font-size: 1.3em; - color: $dark-grey; - display: block; - padding: 15px 20px; - font-family: "MuseoSans-500"; - } - } - } - //tips-list-end - -} - -section.activity { - float: left; - width: 750px; - min-height: 600px; - - header { - border-bottom: solid 3px #bfceda; - padding-bottom: 20px; - margin-bottom: 20px; - - h1 { - font-size: 2.6em; - float: left; - text-indent: 30px; - } - - ul { - float: right; - } - - li { - float: left; - margin-left: 20px; - - &:first-child { - margin: 0; - } - } - } - - //items - .feed { - - > li, > ul > li { - margin-bottom: 20px; - padding-left: 32px; - position: relative; - } - - .more-activity { - a { - @include more-button-activity; - @include border-radius(6px); - @include transition-all; - - &:hover { - background: #667d8d; - color: #BFCEDA; - } - } - - &.no-new-activity { - visibility: hidden; - height: 0; - margin: 0; - padding: 0; - } - } - - .graphic { - position: absolute; - top: 12px; - left: -26px; - width: 37px; - height: 37px; - @include border-radius(50%); - //background: image-url("profile/activity-icons.png") no-repeat top; - background: #fff; - z-index: 50; - - &:before { - @include icon-font; - content: "t"; - text-align: center; - display: block; - line-height: 37px; - font-size: 14px; - z-index: 100; - position: relative; - } - //before - } - - .item { - background: #fff; - //@include border-radius(6px); - @include subtle-box-shadow; - - &:before { - top: 25px; - left: -20px; - position: absolute; - content: " "; - display: block; - width: 52px; - height: 10px; - background: #e0e0e0; - z-index: 0; - } - - p { - margin-bottom: 10px; - a { - color: $light-blue; - } - } - - h1 { - color: $dark-grey; - font-size: 1.8em; - margin-bottom: 10px; - width: 92%; - @include transition-all; - } - - a h1:hover { - color: $light-blue; - } - - .header { - min-height: 60px; - border-bottom: 1px solid #eaeaea; - background: #fafafa; - - a.hiring-ribbon { - position: absolute; - z-index: 100; - width: 76px; - height: 77px; - top: -7px; - right: -5px; - background: image-url("team/hiring.png") no-repeat; - - span { - display: none; - } - } - - ul { - float: left; - margin: 15px; - width: 538px; - height: 30px; - //@include ellipsis; - overflow: auto; - } - - li { - float: left; - line-height: 30px; - font-size: 1.3em; - height: 30px; - - span { - float: left; - margin-right: 10px; - } - - a { - color: $light-blue; - //@include transition-all; - - &:hover { - opacity: 0.7; - } - - // &:visited { - // color: $red; - // } - } - - &.fragment { - margin-left: 5px; - } - } - - .user, .team { - img { - float: left; - width: 30px; - height: 30px; - @include border-radius(4px); - margin-right: 10px; - } - } - - .user { - margin-right: 5px; - } - } - - .content { - //@include paper-panel; - padding: 20px; - position: relative; - //@include border-radius-bottom(6px); - - a { - color: $dark-grey; - @include transition-all; - - &:hover { - color: $light-blue; - } - } - - // &:after { - // content: ""; - // width: 0; - // height: 0; - // border-left: 8px solid transparent; - // border-right: 8px solid transparent; - // border-bottom: 8px solid #eaeaea; - // left: 20px; - // top: -8px; - // position: absolute; - // } - - .small-upvote { - @include small-upvote; - position: absolute; - top: 0px; - right: 20px; - @include transition-all; - - &:hover { - opacity: 0.7; - } - } - } - - .team-added, .badge-unlocked { - overflow: auto; - margin-bottom: 20px; - font-family: "MuseoSans-500"; - - img { - float: left; - width: 32px; - height: 32px; - margin-right: 10px; - } - - a { - //float: left; - color: $dark-grey; - font-size: 1.8em; - line-height: 32px; - } - } - - .badge-unlocked { - img { - width: 80px; - height: 80px; - } - a { - line-height: 80px; - } - } - .footnote { - padding-top: 5px; - padding-bottom: 5px; - a { - color: $light-blue; - - &:hover { - opacity: 0.7; - } - } - p { - margin: 0; - } - } - .footer { - padding-top: 10px; - border-top: 1px solid #eaeaea; - - a { - color: $light-blue; - - &:hover { - opacity: 0.7; - } - } - - p { - margin: 0; - } - } - - .actions-list { - - li { - float: left; - margin-right: 10px; - - // &:nth-child(2), &:first-child { - // margin: 0; - // } - } - - a { - height: 18px; - line-height: 18px; - font-size: 1.2em; - display: inline-block; - background: image-url("profile/activity-action-icons.png") no-repeat left top; - padding-left: 25px; - color: $dark-grey; - @include transition-all; - opacity: 0.5; - - &:hover { - color: $dark-grey; - opacity: 1; - } - } - - .view { - background-position: 0px 0px; - } - - .write-tip { - background-position: 0px -18px; - } - - .tweet { - background-position: 0px -36px; - } - - .add-skill { - background-position: 0px -54px; - } - - .follow { - background-position: 0px -73px; - } - - .reply { - background-position: 0px -92px; - } - - .hide { - display: none !important; - } - } - - .tags { - //float: left; - overflow: hidden; - height: 20px; - width: 100%; - margin-bottom: 10px; - - li { - float: left; - margin-left: 5px; - line-height: 20px; - - &:first-child { - margin-left: 0; - } - - a { - color: $dark-grey; - - &:hover { - color: $light-blue; - } - } - } - } - } - //end-of-item - - //for protips - .ptip { - .content { - h1 { - width: 480px; - } - .small-upvote { - &:hover { - color: #fff; - } - } - } - } - - .protip-viewed, .protip-upvoted, .comment, .comment-liked { - .content { - h1 { - font-size: 1.3em; - - blockquote { - font-size: 1.4em; - border-left: solid 5px #ccc; - margin: 10px 0; - padding-left: 10px; - } - } - } - } - - //types of update - - .link-protip { - .graphic { - &:before { - content: "@"; - color: #00a8e1; - } - } - } - - .trending-protip { - .graphic { - &:before { - content: "2"; - color: #f35e39; - font-size: 17px; - } - } - } - - .new-protip { - .graphic { - &:before { - content: "."; - color: #00a8e1; - } - } - } - - .admin { - .content { - a { - color: $light-blue; - } - img { - max-width: 400px; - max-height: 600px; - } - background: #FEFFEF; - - p { - a { - color: $light-blue; - } - } - } - .graphic { - &:before { - content: "a"; - color: $light-blue; - } - } - } - - .endorsement { - .graphic { - &:before { - content: "#"; - color: #ff9c00; - } - } - } - - .added-skill { - .graphic { - &:before { - content: "$"; - color: #139593; - } - } - } - - .job { - .graphic { - &:before { - content: "b"; - color: #bb1352; - } - } - } - - .new-team { - .graphic { - &:before { - content: "3"; - color: #bb1352; - font-size: 18px; - } - } - } - - .new-member { - .graphic { - &:before { - content: "1"; - color: #9ad6d4; - } - } - } - - .new-follow { - .graphic { - &:before { - content: "!"; - color: $new-green; - font-size: 16px; - } - } - } - - .new-team-follow { - .graphic { - &:before { - content: "!"; - color: #bb1352; - font-size: 16px; - } - } - } - - .new-team-request { - .graphic { - &:before { - content: "3"; - color: #139593; - font-size: 18px; - } - } - } - - .quest { - .graphic { - &:before { - content: "~"; - color: #139593; - } - } - } - - .level-up { - .graphic { - &:before { - content: "&"; - color: #139593; - } - } - } - - .profile-viewed { - .graphic { - &:before { - content: "6"; - color: #293e6b; - font-size: 17px; - } - } - } - - .protip-viewed { - .graphic { - &:before { - content: "6"; - color: #00a8e1; - font-size: 17px; - } - } - } - - .protip-upvoted { - .graphic { - &:before { - content: "u"; - color: #f35e39; - font-size: 17px; - } - } - } - - .badge-unlocked { - .content { - //background: #f1ffdc; - } - .graphic { - &:before { - content: "5"; - color: #4aae23; - font-size: 16px; - } - } - } - - .mayor { - .graphic { - &:before { - content: "4"; - color: #9f60b5; - font-size: 17px; - } - } - } - - .comment { - .graphic { - &:before { - content: "7"; - color: #6c6f70; - } - } - } - - .comment-liked { - .graphic { - &:before { - content: "^"; - color: #ff7361; - } - } - } - - } - //end-of-feed -} - -//end-of-activity \ No newline at end of file diff --git a/app/assets/stylesheets/error.scss b/app/assets/stylesheets/error.scss new file mode 100644 index 00000000..487c503d --- /dev/null +++ b/app/assets/stylesheets/error.scss @@ -0,0 +1,59 @@ +@import "base"; + +.error-body { + p.error-desc { + margin: 20px 0 40px; + font-size: 16px; + line-height: 2; + a { + color: #000; + border-bottom: 1px solid #000; + } + } +} + +.columns { + overflow: hidden; +} + +.column { + float: left; + &.popular-list { + background: #FFF; + padding: 20px; + box-sizing: border-box; + max-width: 515px; + h3 { + margin-bottom: 10px; + } + ol { + list-style-type: decimal; + line-height: 2; + margin-left: 20px; + li { + font-size: 16px; + a { + color: #000; + border-bottom: 1px solid #000; + } + } + } + } + &.signup-list { + background: #3a3a3a; + width: 525px; + padding: 3em 4em; + -o-border-radius: 4px; + border-radius: 4px; + margin: 0 0 0 40px; + overflow: hidden; + @include sign-up-btns; + .sign-btns { + text-align: center; + li { + float: none; + display: inline-block; + } + } + } +} diff --git a/app/assets/stylesheets/featured-teams.scss b/app/assets/stylesheets/featured-teams.scss index 6e87cf6b..b3d12fcf 100644 --- a/app/assets/stylesheets/featured-teams.scss +++ b/app/assets/stylesheets/featured-teams.scss @@ -1,5 +1,5 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; //featured teams grid #featured-team-grid { @@ -42,11 +42,6 @@ @include text-shadow-one-px; background: #6c6e7a; /* Old browsers */ - background: -moz-linear-gradient(top, #6c6e7a 0%, #6c6e7a 47%, #626470 47%, #626470 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6c6e7a), color-stop(47%, #6c6e7a), color-stop(47%, #626470), color-stop(100%, #626470)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #6c6e7a 0%, #6c6e7a 47%, #626470 47%, #626470 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #6c6e7a 0%, #6c6e7a 47%, #626470 47%, #626470 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #6c6e7a 0%, #6c6e7a 47%, #626470 47%, #626470 100%); /* IE10+ */ background: linear-gradient(to bottom, #6c6e7a 0%, #6c6e7a 47%, #626470 47%, #626470 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6c6e7a', endColorstr='#626470', GradientType=0); /* IE6-9 */ @@ -219,7 +214,6 @@ margin-right: 10px; margin-bottom: 10px; background: image-url("team/wavey-bg.jpg") repeat; - -webkit-box-shadow: 0px 1px 0px 0px rgba(36, 96, 144, 0.4); box-shadow: 0px 1px 0px 0px rgba(36, 96, 144, 0.4); text-shadow: 0px -1px 0px #17598e; filter: dropshadow(color=#17598e, offx=0, offy=-1); diff --git a/app/assets/stylesheets/flags.css b/app/assets/stylesheets/flags.css deleted file mode 100644 index 14f0219a..00000000 --- a/app/assets/stylesheets/flags.css +++ /dev/null @@ -1,985 +0,0 @@ -.flag { - width: 16px; - height: 11px; - background: url(flags.png) no-repeat -} - -.flag.flag-ad { - background-position: -16px 0 -} - -.flag.flag-ae { - background-position: -32px 0 -} - -.flag.flag-af { - background-position: -48px 0 -} - -.flag.flag-ag { - background-position: -64px 0 -} - -.flag.flag-ai { - background-position: -80px 0 -} - -.flag.flag-al { - background-position: -96px 0 -} - -.flag.flag-am { - background-position: -112px 0 -} - -.flag.flag-an { - background-position: -128px 0 -} - -.flag.flag-ao { - background-position: -144px 0 -} - -.flag.flag-ar { - background-position: -160px 0 -} - -.flag.flag-as { - background-position: -176px 0 -} - -.flag.flag-at { - background-position: -192px 0 -} - -.flag.flag-au { - background-position: -208px 0 -} - -.flag.flag-aw { - background-position: -224px 0 -} - -.flag.flag-az { - background-position: -240px 0 -} - -.flag.flag-ba { - background-position: 0 -11px -} - -.flag.flag-bb { - background-position: -16px -11px -} - -.flag.flag-bd { - background-position: -32px -11px -} - -.flag.flag-be { - background-position: -48px -11px -} - -.flag.flag-bf { - background-position: -64px -11px -} - -.flag.flag-bg { - background-position: -80px -11px -} - -.flag.flag-bh { - background-position: -96px -11px -} - -.flag.flag-bi { - background-position: -112px -11px -} - -.flag.flag-bj { - background-position: -128px -11px -} - -.flag.flag-bm { - background-position: -144px -11px -} - -.flag.flag-bn { - background-position: -160px -11px -} - -.flag.flag-bo { - background-position: -176px -11px -} - -.flag.flag-br { - background-position: -192px -11px -} - -.flag.flag-bs { - background-position: -208px -11px -} - -.flag.flag-bt { - background-position: -224px -11px -} - -.flag.flag-bv { - background-position: -240px -11px -} - -.flag.flag-bw { - background-position: 0 -22px -} - -.flag.flag-by { - background-position: -16px -22px -} - -.flag.flag-bz { - background-position: -32px -22px -} - -.flag.flag-ca { - background-position: -48px -22px -} - -.flag.flag-catalonia { - background-position: -64px -22px -} - -.flag.flag-cd { - background-position: -80px -22px -} - -.flag.flag-cf { - background-position: -96px -22px -} - -.flag.flag-cg { - background-position: -112px -22px -} - -.flag.flag-ch { - background-position: -128px -22px -} - -.flag.flag-ci { - background-position: -144px -22px -} - -.flag.flag-ck { - background-position: -160px -22px -} - -.flag.flag-cl { - background-position: -176px -22px -} - -.flag.flag-cm { - background-position: -192px -22px -} - -.flag.flag-cn { - background-position: -208px -22px -} - -.flag.flag-co { - background-position: -224px -22px -} - -.flag.flag-cr { - background-position: -240px -22px -} - -.flag.flag-cu { - background-position: 0 -33px -} - -.flag.flag-cv { - background-position: -16px -33px -} - -.flag.flag-cy { - background-position: -32px -33px -} - -.flag.flag-cz { - background-position: -48px -33px -} - -.flag.flag-de { - background-position: -64px -33px -} - -.flag.flag-dj { - background-position: -80px -33px -} - -.flag.flag-dk { - background-position: -96px -33px -} - -.flag.flag-dm { - background-position: -112px -33px -} - -.flag.flag-do { - background-position: -128px -33px -} - -.flag.flag-dz { - background-position: -144px -33px -} - -.flag.flag-ec { - background-position: -160px -33px -} - -.flag.flag-ee { - background-position: -176px -33px -} - -.flag.flag-eg { - background-position: -192px -33px -} - -.flag.flag-eh { - background-position: -208px -33px -} - -.flag.flag-england { - background-position: -224px -33px -} - -.flag.flag-er { - background-position: -240px -33px -} - -.flag.flag-es { - background-position: 0 -44px -} - -.flag.flag-et { - background-position: -16px -44px -} - -.flag.flag-eu { - background-position: -32px -44px -} - -.flag.flag-fi { - background-position: -48px -44px -} - -.flag.flag-fj { - background-position: -64px -44px -} - -.flag.flag-fk { - background-position: -80px -44px -} - -.flag.flag-fm { - background-position: -96px -44px -} - -.flag.flag-fo { - background-position: -112px -44px -} - -.flag.flag-fr { - background-position: -128px -44px -} - -.flag.flag-ga { - background-position: -144px -44px -} - -.flag.flag-gb { - background-position: -160px -44px -} - -.flag.flag-gd { - background-position: -176px -44px -} - -.flag.flag-ge { - background-position: -192px -44px -} - -.flag.flag-gf { - background-position: -208px -44px -} - -.flag.flag-gg { - background-position: -224px -44px -} - -.flag.flag-gh { - background-position: -240px -44px -} - -.flag.flag-gi { - background-position: 0 -55px -} - -.flag.flag-gl { - background-position: -16px -55px -} - -.flag.flag-gm { - background-position: -32px -55px -} - -.flag.flag-gn { - background-position: -48px -55px -} - -.flag.flag-gp { - background-position: -64px -55px -} - -.flag.flag-gq { - background-position: -80px -55px -} - -.flag.flag-gr { - background-position: -96px -55px -} - -.flag.flag-gs { - background-position: -112px -55px -} - -.flag.flag-gt { - background-position: -128px -55px -} - -.flag.flag-gu { - background-position: -144px -55px -} - -.flag.flag-gw { - background-position: -160px -55px -} - -.flag.flag-gy { - background-position: -176px -55px -} - -.flag.flag-hk { - background-position: -192px -55px -} - -.flag.flag-hm { - background-position: -208px -55px -} - -.flag.flag-hn { - background-position: -224px -55px -} - -.flag.flag-hr { - background-position: -240px -55px -} - -.flag.flag-ht { - background-position: 0 -66px -} - -.flag.flag-hu { - background-position: -16px -66px -} - -.flag.flag-id { - background-position: -32px -66px -} - -.flag.flag-ie { - background-position: -48px -66px -} - -.flag.flag-il { - background-position: -64px -66px -} - -.flag.flag-im { - background-position: -80px -66px -} - -.flag.flag-in { - background-position: -96px -66px -} - -.flag.flag-io { - background-position: -112px -66px -} - -.flag.flag-iq { - background-position: -128px -66px -} - -.flag.flag-ir { - background-position: -144px -66px -} - -.flag.flag-is { - background-position: -160px -66px -} - -.flag.flag-it { - background-position: -176px -66px -} - -.flag.flag-je { - background-position: -192px -66px -} - -.flag.flag-jm { - background-position: -208px -66px -} - -.flag.flag-jo { - background-position: -224px -66px -} - -.flag.flag-jp { - background-position: -240px -66px -} - -.flag.flag-ke { - background-position: 0 -77px -} - -.flag.flag-kg { - background-position: -16px -77px -} - -.flag.flag-kh { - background-position: -32px -77px -} - -.flag.flag-ki { - background-position: -48px -77px -} - -.flag.flag-km { - background-position: -64px -77px -} - -.flag.flag-kn { - background-position: -80px -77px -} - -.flag.flag-kp { - background-position: -96px -77px -} - -.flag.flag-kr { - background-position: -112px -77px -} - -.flag.flag-kw { - background-position: -128px -77px -} - -.flag.flag-ky { - background-position: -144px -77px -} - -.flag.flag-kz { - background-position: -160px -77px -} - -.flag.flag-la { - background-position: -176px -77px -} - -.flag.flag-lb { - background-position: -192px -77px -} - -.flag.flag-lc { - background-position: -208px -77px -} - -.flag.flag-li { - background-position: -224px -77px -} - -.flag.flag-lk { - background-position: -240px -77px -} - -.flag.flag-lr { - background-position: 0 -88px -} - -.flag.flag-ls { - background-position: -16px -88px -} - -.flag.flag-lt { - background-position: -32px -88px -} - -.flag.flag-lu { - background-position: -48px -88px -} - -.flag.flag-lv { - background-position: -64px -88px -} - -.flag.flag-ly { - background-position: -80px -88px -} - -.flag.flag-ma { - background-position: -96px -88px -} - -.flag.flag-mc { - background-position: -112px -88px -} - -.flag.flag-md { - background-position: -128px -88px -} - -.flag.flag-me { - background-position: -144px -88px -} - -.flag.flag-mg { - background-position: -160px -88px -} - -.flag.flag-mh { - background-position: -176px -88px -} - -.flag.flag-mk { - background-position: -192px -88px -} - -.flag.flag-ml { - background-position: -208px -88px -} - -.flag.flag-mm { - background-position: -224px -88px -} - -.flag.flag-mn { - background-position: -240px -88px -} - -.flag.flag-mo { - background-position: 0 -99px -} - -.flag.flag-mp { - background-position: -16px -99px -} - -.flag.flag-mq { - background-position: -32px -99px -} - -.flag.flag-mr { - background-position: -48px -99px -} - -.flag.flag-ms { - background-position: -64px -99px -} - -.flag.flag-mt { - background-position: -80px -99px -} - -.flag.flag-mu { - background-position: -96px -99px -} - -.flag.flag-mv { - background-position: -112px -99px -} - -.flag.flag-mw { - background-position: -128px -99px -} - -.flag.flag-mx { - background-position: -144px -99px -} - -.flag.flag-my { - background-position: -160px -99px -} - -.flag.flag-mz { - background-position: -176px -99px -} - -.flag.flag-na { - background-position: -192px -99px -} - -.flag.flag-nc { - background-position: -208px -99px -} - -.flag.flag-ne { - background-position: -224px -99px -} - -.flag.flag-nf { - background-position: -240px -99px -} - -.flag.flag-ng { - background-position: 0 -110px -} - -.flag.flag-ni { - background-position: -16px -110px -} - -.flag.flag-nl { - background-position: -32px -110px -} - -.flag.flag-no { - background-position: -48px -110px -} - -.flag.flag-np { - background-position: -64px -110px -} - -.flag.flag-nr { - background-position: -80px -110px -} - -.flag.flag-nu { - background-position: -96px -110px -} - -.flag.flag-nz { - background-position: -112px -110px -} - -.flag.flag-om { - background-position: -128px -110px -} - -.flag.flag-pa { - background-position: -144px -110px -} - -.flag.flag-pe { - background-position: -160px -110px -} - -.flag.flag-pf { - background-position: -176px -110px -} - -.flag.flag-pg { - background-position: -192px -110px -} - -.flag.flag-ph { - background-position: -208px -110px -} - -.flag.flag-pk { - background-position: -224px -110px -} - -.flag.flag-pl { - background-position: -240px -110px -} - -.flag.flag-pm { - background-position: 0 -121px -} - -.flag.flag-pn { - background-position: -16px -121px -} - -.flag.flag-pr { - background-position: -32px -121px -} - -.flag.flag-ps { - background-position: -48px -121px -} - -.flag.flag-pt { - background-position: -64px -121px -} - -.flag.flag-pw { - background-position: -80px -121px -} - -.flag.flag-py { - background-position: -96px -121px -} - -.flag.flag-qa { - background-position: -112px -121px -} - -.flag.flag-re { - background-position: -128px -121px -} - -.flag.flag-ro { - background-position: -144px -121px -} - -.flag.flag-rs { - background-position: -160px -121px -} - -.flag.flag-ru { - background-position: -176px -121px -} - -.flag.flag-rw { - background-position: -192px -121px -} - -.flag.flag-sa { - background-position: -208px -121px -} - -.flag.flag-sb { - background-position: -224px -121px -} - -.flag.flag-sc { - background-position: -240px -121px -} - -.flag.flag-scotland { - background-position: 0 -132px -} - -.flag.flag-sd { - background-position: -16px -132px -} - -.flag.flag-se { - background-position: -32px -132px -} - -.flag.flag-sg { - background-position: -48px -132px -} - -.flag.flag-sh { - background-position: -64px -132px -} - -.flag.flag-si { - background-position: -80px -132px -} - -.flag.flag-sk { - background-position: -96px -132px -} - -.flag.flag-sl { - background-position: -112px -132px -} - -.flag.flag-sm { - background-position: -128px -132px -} - -.flag.flag-sn { - background-position: -144px -132px -} - -.flag.flag-so { - background-position: -160px -132px -} - -.flag.flag-sr { - background-position: -176px -132px -} - -.flag.flag-ss { - background-position: -192px -132px -} - -.flag.flag-st { - background-position: -208px -132px -} - -.flag.flag-sv { - background-position: -224px -132px -} - -.flag.flag-sy { - background-position: -240px -132px -} - -.flag.flag-sz { - background-position: 0 -143px -} - -.flag.flag-tc { - background-position: -16px -143px -} - -.flag.flag-td { - background-position: -32px -143px -} - -.flag.flag-tf { - background-position: -48px -143px -} - -.flag.flag-tg { - background-position: -64px -143px -} - -.flag.flag-th { - background-position: -80px -143px -} - -.flag.flag-tj { - background-position: -96px -143px -} - -.flag.flag-tk { - background-position: -112px -143px -} - -.flag.flag-tl { - background-position: -128px -143px -} - -.flag.flag-tm { - background-position: -144px -143px -} - -.flag.flag-tn { - background-position: -160px -143px -} - -.flag.flag-to { - background-position: -176px -143px -} - -.flag.flag-tr { - background-position: -192px -143px -} - -.flag.flag-tt { - background-position: -208px -143px -} - -.flag.flag-tv { - background-position: -224px -143px -} - -.flag.flag-tw { - background-position: -240px -143px -} - -.flag.flag-tz { - background-position: 0 -154px -} - -.flag.flag-ua { - background-position: -16px -154px -} - -.flag.flag-ug { - background-position: -32px -154px -} - -.flag.flag-um { - background-position: -48px -154px -} - -.flag.flag-us { - background-position: -64px -154px -} - -.flag.flag-uy { - background-position: -80px -154px -} - -.flag.flag-uz { - background-position: -96px -154px -} - -.flag.flag-va { - background-position: -112px -154px -} - -.flag.flag-vc { - background-position: -128px -154px -} - -.flag.flag-ve { - background-position: -144px -154px -} - -.flag.flag-vg { - background-position: -160px -154px -} - -.flag.flag-vi { - background-position: -176px -154px -} - -.flag.flag-vn { - background-position: -192px -154px -} - -.flag.flag-vu { - background-position: -208px -154px -} - -.flag.flag-wales { - background-position: -224px -154px -} - -.flag.flag-wf { - background-position: -240px -154px -} - -.flag.flag-ws { - background-position: 0 -165px -} - -.flag.flag-ye { - background-position: -16px -165px -} - -.flag.flag-yt { - background-position: -32px -165px -} - -.flag.flag-za { - background-position: -48px -165px -} - -.flag.flag-zm { - background-position: -64px -165px -} - -.flag.flag-zw { - background-position: -80px -165px -} diff --git a/app/assets/stylesheets/flags.css.scss b/app/assets/stylesheets/flags.css.scss new file mode 100644 index 00000000..9f0b9c37 --- /dev/null +++ b/app/assets/stylesheets/flags.css.scss @@ -0,0 +1,985 @@ +.flag { + width: 16px; + height: 11px; + background: image-url('flags.png') no-repeat +} + +.flag.flag-ad { + background-position: -16px 0 +} + +.flag.flag-ae { + background-position: -32px 0 +} + +.flag.flag-af { + background-position: -48px 0 +} + +.flag.flag-ag { + background-position: -64px 0 +} + +.flag.flag-ai { + background-position: -80px 0 +} + +.flag.flag-al { + background-position: -96px 0 +} + +.flag.flag-am { + background-position: -112px 0 +} + +.flag.flag-an { + background-position: -128px 0 +} + +.flag.flag-ao { + background-position: -144px 0 +} + +.flag.flag-ar { + background-position: -160px 0 +} + +.flag.flag-as { + background-position: -176px 0 +} + +.flag.flag-at { + background-position: -192px 0 +} + +.flag.flag-au { + background-position: -208px 0 +} + +.flag.flag-aw { + background-position: -224px 0 +} + +.flag.flag-az { + background-position: -240px 0 +} + +.flag.flag-ba { + background-position: 0 -11px +} + +.flag.flag-bb { + background-position: -16px -11px +} + +.flag.flag-bd { + background-position: -32px -11px +} + +.flag.flag-be { + background-position: -48px -11px +} + +.flag.flag-bf { + background-position: -64px -11px +} + +.flag.flag-bg { + background-position: -80px -11px +} + +.flag.flag-bh { + background-position: -96px -11px +} + +.flag.flag-bi { + background-position: -112px -11px +} + +.flag.flag-bj { + background-position: -128px -11px +} + +.flag.flag-bm { + background-position: -144px -11px +} + +.flag.flag-bn { + background-position: -160px -11px +} + +.flag.flag-bo { + background-position: -176px -11px +} + +.flag.flag-br { + background-position: -192px -11px +} + +.flag.flag-bs { + background-position: -208px -11px +} + +.flag.flag-bt { + background-position: -224px -11px +} + +.flag.flag-bv { + background-position: -240px -11px +} + +.flag.flag-bw { + background-position: 0 -22px +} + +.flag.flag-by { + background-position: -16px -22px +} + +.flag.flag-bz { + background-position: -32px -22px +} + +.flag.flag-ca { + background-position: -48px -22px +} + +.flag.flag-catalonia { + background-position: -64px -22px +} + +.flag.flag-cd { + background-position: -80px -22px +} + +.flag.flag-cf { + background-position: -96px -22px +} + +.flag.flag-cg { + background-position: -112px -22px +} + +.flag.flag-ch { + background-position: -128px -22px +} + +.flag.flag-ci { + background-position: -144px -22px +} + +.flag.flag-ck { + background-position: -160px -22px +} + +.flag.flag-cl { + background-position: -176px -22px +} + +.flag.flag-cm { + background-position: -192px -22px +} + +.flag.flag-cn { + background-position: -208px -22px +} + +.flag.flag-co { + background-position: -224px -22px +} + +.flag.flag-cr { + background-position: -240px -22px +} + +.flag.flag-cu { + background-position: 0 -33px +} + +.flag.flag-cv { + background-position: -16px -33px +} + +.flag.flag-cy { + background-position: -32px -33px +} + +.flag.flag-cz { + background-position: -48px -33px +} + +.flag.flag-de { + background-position: -64px -33px +} + +.flag.flag-dj { + background-position: -80px -33px +} + +.flag.flag-dk { + background-position: -96px -33px +} + +.flag.flag-dm { + background-position: -112px -33px +} + +.flag.flag-do { + background-position: -128px -33px +} + +.flag.flag-dz { + background-position: -144px -33px +} + +.flag.flag-ec { + background-position: -160px -33px +} + +.flag.flag-ee { + background-position: -176px -33px +} + +.flag.flag-eg { + background-position: -192px -33px +} + +.flag.flag-eh { + background-position: -208px -33px +} + +.flag.flag-england { + background-position: -224px -33px +} + +.flag.flag-er { + background-position: -240px -33px +} + +.flag.flag-es { + background-position: 0 -44px +} + +.flag.flag-et { + background-position: -16px -44px +} + +.flag.flag-eu { + background-position: -32px -44px +} + +.flag.flag-fi { + background-position: -48px -44px +} + +.flag.flag-fj { + background-position: -64px -44px +} + +.flag.flag-fk { + background-position: -80px -44px +} + +.flag.flag-fm { + background-position: -96px -44px +} + +.flag.flag-fo { + background-position: -112px -44px +} + +.flag.flag-fr { + background-position: -128px -44px +} + +.flag.flag-ga { + background-position: -144px -44px +} + +.flag.flag-gb { + background-position: -160px -44px +} + +.flag.flag-gd { + background-position: -176px -44px +} + +.flag.flag-ge { + background-position: -192px -44px +} + +.flag.flag-gf { + background-position: -208px -44px +} + +.flag.flag-gg { + background-position: -224px -44px +} + +.flag.flag-gh { + background-position: -240px -44px +} + +.flag.flag-gi { + background-position: 0 -55px +} + +.flag.flag-gl { + background-position: -16px -55px +} + +.flag.flag-gm { + background-position: -32px -55px +} + +.flag.flag-gn { + background-position: -48px -55px +} + +.flag.flag-gp { + background-position: -64px -55px +} + +.flag.flag-gq { + background-position: -80px -55px +} + +.flag.flag-gr { + background-position: -96px -55px +} + +.flag.flag-gs { + background-position: -112px -55px +} + +.flag.flag-gt { + background-position: -128px -55px +} + +.flag.flag-gu { + background-position: -144px -55px +} + +.flag.flag-gw { + background-position: -160px -55px +} + +.flag.flag-gy { + background-position: -176px -55px +} + +.flag.flag-hk { + background-position: -192px -55px +} + +.flag.flag-hm { + background-position: -208px -55px +} + +.flag.flag-hn { + background-position: -224px -55px +} + +.flag.flag-hr { + background-position: -240px -55px +} + +.flag.flag-ht { + background-position: 0 -66px +} + +.flag.flag-hu { + background-position: -16px -66px +} + +.flag.flag-id { + background-position: -32px -66px +} + +.flag.flag-ie { + background-position: -48px -66px +} + +.flag.flag-il { + background-position: -64px -66px +} + +.flag.flag-im { + background-position: -80px -66px +} + +.flag.flag-in { + background-position: -96px -66px +} + +.flag.flag-io { + background-position: -112px -66px +} + +.flag.flag-iq { + background-position: -128px -66px +} + +.flag.flag-ir { + background-position: -144px -66px +} + +.flag.flag-is { + background-position: -160px -66px +} + +.flag.flag-it { + background-position: -176px -66px +} + +.flag.flag-je { + background-position: -192px -66px +} + +.flag.flag-jm { + background-position: -208px -66px +} + +.flag.flag-jo { + background-position: -224px -66px +} + +.flag.flag-jp { + background-position: -240px -66px +} + +.flag.flag-ke { + background-position: 0 -77px +} + +.flag.flag-kg { + background-position: -16px -77px +} + +.flag.flag-kh { + background-position: -32px -77px +} + +.flag.flag-ki { + background-position: -48px -77px +} + +.flag.flag-km { + background-position: -64px -77px +} + +.flag.flag-kn { + background-position: -80px -77px +} + +.flag.flag-kp { + background-position: -96px -77px +} + +.flag.flag-kr { + background-position: -112px -77px +} + +.flag.flag-kw { + background-position: -128px -77px +} + +.flag.flag-ky { + background-position: -144px -77px +} + +.flag.flag-kz { + background-position: -160px -77px +} + +.flag.flag-la { + background-position: -176px -77px +} + +.flag.flag-lb { + background-position: -192px -77px +} + +.flag.flag-lc { + background-position: -208px -77px +} + +.flag.flag-li { + background-position: -224px -77px +} + +.flag.flag-lk { + background-position: -240px -77px +} + +.flag.flag-lr { + background-position: 0 -88px +} + +.flag.flag-ls { + background-position: -16px -88px +} + +.flag.flag-lt { + background-position: -32px -88px +} + +.flag.flag-lu { + background-position: -48px -88px +} + +.flag.flag-lv { + background-position: -64px -88px +} + +.flag.flag-ly { + background-position: -80px -88px +} + +.flag.flag-ma { + background-position: -96px -88px +} + +.flag.flag-mc { + background-position: -112px -88px +} + +.flag.flag-md { + background-position: -128px -88px +} + +.flag.flag-me { + background-position: -144px -88px +} + +.flag.flag-mg { + background-position: -160px -88px +} + +.flag.flag-mh { + background-position: -176px -88px +} + +.flag.flag-mk { + background-position: -192px -88px +} + +.flag.flag-ml { + background-position: -208px -88px +} + +.flag.flag-mm { + background-position: -224px -88px +} + +.flag.flag-mn { + background-position: -240px -88px +} + +.flag.flag-mo { + background-position: 0 -99px +} + +.flag.flag-mp { + background-position: -16px -99px +} + +.flag.flag-mq { + background-position: -32px -99px +} + +.flag.flag-mr { + background-position: -48px -99px +} + +.flag.flag-ms { + background-position: -64px -99px +} + +.flag.flag-mt { + background-position: -80px -99px +} + +.flag.flag-mu { + background-position: -96px -99px +} + +.flag.flag-mv { + background-position: -112px -99px +} + +.flag.flag-mw { + background-position: -128px -99px +} + +.flag.flag-mx { + background-position: -144px -99px +} + +.flag.flag-my { + background-position: -160px -99px +} + +.flag.flag-mz { + background-position: -176px -99px +} + +.flag.flag-na { + background-position: -192px -99px +} + +.flag.flag-nc { + background-position: -208px -99px +} + +.flag.flag-ne { + background-position: -224px -99px +} + +.flag.flag-nf { + background-position: -240px -99px +} + +.flag.flag-ng { + background-position: 0 -110px +} + +.flag.flag-ni { + background-position: -16px -110px +} + +.flag.flag-nl { + background-position: -32px -110px +} + +.flag.flag-no { + background-position: -48px -110px +} + +.flag.flag-np { + background-position: -64px -110px +} + +.flag.flag-nr { + background-position: -80px -110px +} + +.flag.flag-nu { + background-position: -96px -110px +} + +.flag.flag-nz { + background-position: -112px -110px +} + +.flag.flag-om { + background-position: -128px -110px +} + +.flag.flag-pa { + background-position: -144px -110px +} + +.flag.flag-pe { + background-position: -160px -110px +} + +.flag.flag-pf { + background-position: -176px -110px +} + +.flag.flag-pg { + background-position: -192px -110px +} + +.flag.flag-ph { + background-position: -208px -110px +} + +.flag.flag-pk { + background-position: -224px -110px +} + +.flag.flag-pl { + background-position: -240px -110px +} + +.flag.flag-pm { + background-position: 0 -121px +} + +.flag.flag-pn { + background-position: -16px -121px +} + +.flag.flag-pr { + background-position: -32px -121px +} + +.flag.flag-ps { + background-position: -48px -121px +} + +.flag.flag-pt { + background-position: -64px -121px +} + +.flag.flag-pw { + background-position: -80px -121px +} + +.flag.flag-py { + background-position: -96px -121px +} + +.flag.flag-qa { + background-position: -112px -121px +} + +.flag.flag-re { + background-position: -128px -121px +} + +.flag.flag-ro { + background-position: -144px -121px +} + +.flag.flag-rs { + background-position: -160px -121px +} + +.flag.flag-ru { + background-position: -176px -121px +} + +.flag.flag-rw { + background-position: -192px -121px +} + +.flag.flag-sa { + background-position: -208px -121px +} + +.flag.flag-sb { + background-position: -224px -121px +} + +.flag.flag-sc { + background-position: -240px -121px +} + +.flag.flag-scotland { + background-position: 0 -132px +} + +.flag.flag-sd { + background-position: -16px -132px +} + +.flag.flag-se { + background-position: -32px -132px +} + +.flag.flag-sg { + background-position: -48px -132px +} + +.flag.flag-sh { + background-position: -64px -132px +} + +.flag.flag-si { + background-position: -80px -132px +} + +.flag.flag-sk { + background-position: -96px -132px +} + +.flag.flag-sl { + background-position: -112px -132px +} + +.flag.flag-sm { + background-position: -128px -132px +} + +.flag.flag-sn { + background-position: -144px -132px +} + +.flag.flag-so { + background-position: -160px -132px +} + +.flag.flag-sr { + background-position: -176px -132px +} + +.flag.flag-ss { + background-position: -192px -132px +} + +.flag.flag-st { + background-position: -208px -132px +} + +.flag.flag-sv { + background-position: -224px -132px +} + +.flag.flag-sy { + background-position: -240px -132px +} + +.flag.flag-sz { + background-position: 0 -143px +} + +.flag.flag-tc { + background-position: -16px -143px +} + +.flag.flag-td { + background-position: -32px -143px +} + +.flag.flag-tf { + background-position: -48px -143px +} + +.flag.flag-tg { + background-position: -64px -143px +} + +.flag.flag-th { + background-position: -80px -143px +} + +.flag.flag-tj { + background-position: -96px -143px +} + +.flag.flag-tk { + background-position: -112px -143px +} + +.flag.flag-tl { + background-position: -128px -143px +} + +.flag.flag-tm { + background-position: -144px -143px +} + +.flag.flag-tn { + background-position: -160px -143px +} + +.flag.flag-to { + background-position: -176px -143px +} + +.flag.flag-tr { + background-position: -192px -143px +} + +.flag.flag-tt { + background-position: -208px -143px +} + +.flag.flag-tv { + background-position: -224px -143px +} + +.flag.flag-tw { + background-position: -240px -143px +} + +.flag.flag-tz { + background-position: 0 -154px +} + +.flag.flag-ua { + background-position: -16px -154px +} + +.flag.flag-ug { + background-position: -32px -154px +} + +.flag.flag-um { + background-position: -48px -154px +} + +.flag.flag-us { + background-position: -64px -154px +} + +.flag.flag-uy { + background-position: -80px -154px +} + +.flag.flag-uz { + background-position: -96px -154px +} + +.flag.flag-va { + background-position: -112px -154px +} + +.flag.flag-vc { + background-position: -128px -154px +} + +.flag.flag-ve { + background-position: -144px -154px +} + +.flag.flag-vg { + background-position: -160px -154px +} + +.flag.flag-vi { + background-position: -176px -154px +} + +.flag.flag-vn { + background-position: -192px -154px +} + +.flag.flag-vu { + background-position: -208px -154px +} + +.flag.flag-wales { + background-position: -224px -154px +} + +.flag.flag-wf { + background-position: -240px -154px +} + +.flag.flag-ws { + background-position: 0 -165px +} + +.flag.flag-ye { + background-position: -16px -165px +} + +.flag.flag-yt { + background-position: -32px -165px +} + +.flag.flag-za { + background-position: -48px -165px +} + +.flag.flag-zm { + background-position: -64px -165px +} + +.flag.flag-zw { + background-position: -80px -165px +} diff --git a/app/assets/stylesheets/flexslider.scss b/app/assets/stylesheets/flexslider.scss index ee413d19..8e287551 100644 --- a/app/assets/stylesheets/flexslider.scss +++ b/app/assets/stylesheets/flexslider.scss @@ -79,21 +79,13 @@ html[xmlns] .slides { background: #fff; border: 4px solid #fff; position: relative; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - -o-border-radius: 4px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, .2); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, .2); - -o-box-shadow: 0 1px 4px rgba(0, 0, 0, .2); zoom: 1; } .flex-viewport { max-height: 2000px; - -webkit-transition: all 1s ease; - -moz-transition: all 1s ease; transition: all 1s ease; } @@ -125,7 +117,6 @@ html[xmlns] .slides { cursor: pointer; text-indent: -9999px; opacity: 0; - -webkit-transition: all .3s ease; } .flex-direction-nav .flex-next { @@ -180,9 +171,6 @@ html[xmlns] .slides { background: rgba(0, 0, 0, 0.5); cursor: pointer; text-indent: -9999px; - -webkit-border-radius: 20px; - -moz-border-radius: 20px; - -o-border-radius: 20px; border-radius: 20px; box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); } diff --git a/app/assets/stylesheets/fonts.scss b/app/assets/stylesheets/fonts.scss index 9cd762c9..ff032cac 100644 --- a/app/assets/stylesheets/fonts.scss +++ b/app/assets/stylesheets/fonts.scss @@ -54,6 +54,19 @@ * © 2012 Bitstream Inc */ +@import 'font-awesome'; + +@font-face { + font-family: 'FontAwesome'; + src: url("//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.eot?v=4.1.0"); + src: url("//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.eot?#iefix&v=4.1.0") format('embedded-opentype'), + url("//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.woff?v=4.1.0") format('woff'), + url("//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.ttf?v=4.1.0") format('truetype'), + url("//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular") format('svg'); + font-weight: normal; + font-style: normal; +} + @font-face { font-family: 'MuseoSans-700'; src: url('https://s3.amazonaws.com/coderwall-font/221897_0_0.eot'); @@ -145,7 +158,7 @@ @font-face { font-family: 'oli'; - src: url('fonts/oli.eot'); + src: font-url('oli.eot'); } @font-face { @@ -153,4 +166,4 @@ src: url(data:application/x-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BgcWBgcWBgcOASsBJicmBzUqBAwlIy4lIQkMFw8JAQQBBgUJAQSQAgYNBQYMCQoCDwwIGQYPHhRSICA9CQly9gEDDB4uTzMOARMRBw4iJRokBAECBxYUGQkNFCQODS8VIhkEAwMeFRUO0AAAAAwAlgABAAAAAAABAAMACAABAAAAAAACAAcAHAABAAAAAAADAB8AZAABAAAAAAAEAAMAjAABAAAAAAAFAAsAqAABAAAAAAAGAAMAvAADAAEECQABAAYAAAADAAEECQACAA4ADAADAAEECQADAD4AJAADAAEECQAEAAYAhAADAAEECQAFABYAkAADAAEECQAGAAYAtABvAGwAaQAAb2xpAABSAGUAZwB1AGwAYQByAABSZWd1bGFyAABGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAG8AbABpACAAOgAgADEAMQAtADYALQAyADAAMQAzAABGb250Rm9yZ2UgMi4wIDogb2xpIDogMTEtNi0yMDEzAABvAGwAaQAAb2xpAABWAGUAcgBzAGkAbwBuACAAMQAuADAAAFZlcnNpb24gMS4wAABvAGwAaQAAb2xpAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAEAAgECAEoAVwBGAFoARABTAE8AWAANAEUABAAHAAkAIQBWAAgAHwBZABEAUABMACMAEwBJAA4ARwAXAFsAYQAWABUAGAAZABoAGwBLABwAFABBAAYHdW5pRjAwMAAAAAAAAf//AAIAAQAAAA4AAAAYAAAAAAACAAEAAwArAAEABAAAAAIAAAAAAAEAAAAAzD2izwAAAADN3Js0AAAAAM3cmzQ=) format('truetype'); font-weight: normal; font-style: normal; -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/footer.scss b/app/assets/stylesheets/footer.scss new file mode 100644 index 00000000..5026d1fd --- /dev/null +++ b/app/assets/stylesheets/footer.scss @@ -0,0 +1,124 @@ +#footer { + .inside-footer { + max-width: 1180px; + padding: 40px 20px 10px 20px; + margin: 0 auto; + nav{ + &#footer-nav { + .footer-links { + width: 78%; + margin-bottom: 10px; + display: inline-block; + vertical-align: top; + li { + float: left; + margin-right: 20px; + margin-bottom: 10px; + &:first-child { + } + a { + font-size: 1.4em; + color: $mid-grey; + &:hover { + color: $light-blue; + } + } + } + .employers { + a { + background: $mid-blue-grey; + color: #fff; + padding: 4px 6px; + @include border-radius(4px); + &:hover { + color: #fff; + background: $blue-grey; + } + } + } + } + .assembly-badge { + margin: -10px 0 10px -20px; + } + + .right_part { + width: 21%; + text-align: right; + display: inline-block; + #tweetbtn { + width: 124px; + margin-top: -7px; + iframe{ + vertical-align: top; + width: 124px !important; + } + } + } + + } + } + .copyright { + margin-bottom: 15px; + text-align: center; + font-size: 1.2em; + color: $light-grey; + } + .credits { + margin-bottom: 15px; + font-size: 1.2em; + a { + color: $light-grey; + } + } + } +} + +#new-home-template { + #footer { + background: #fff; + min-width: 100%; + max-width: 1140px !important; + .inside-footer { + max-width: 100%; + padding: 7%; + } + } + @media screen and (max-width: 768px) { + #footer { + .inside-footer { + #tweetbtn { + float: none; + display: block; + margin-top: -7px; + margin-bottom: 15px; + } + #footer-nav { + padding-top: 30px; + .footer-links { + li { + margin: 0 15px 5px 0; + margin-left: 0; + } + } + } + } + } + } +} + +@media screen and (max-width: 600px) { + #footer { + .inside-footer { + #tweetbtn { + float: none; + width: 124px; + margin-bottom: 10px; + } + #footer-nav { + .footer-links { + width: 100%; + } + } + } + } +} diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss index 660aac27..2414704f 100644 --- a/app/assets/stylesheets/home.scss +++ b/app/assets/stylesheets/home.scss @@ -1,5 +1,5 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; body#home-template { @@ -398,23 +398,6 @@ body#home-template { } } - .view-team-leader-board { - display: block; - width: 742px; - height: 93px; - background: image-url("home/view-team-leader-board.png") no-repeat; - @include transition-all; - margin: 0 auto 20px auto; - - span { - display: none; - } - - &:hover { - opacity: 0.8; - } - } - .big-sign-up { display: block; background: #393939; diff --git a/app/assets/stylesheets/jobs.scss b/app/assets/stylesheets/jobs.scss index 694fd76e..e7dcb80a 100644 --- a/app/assets/stylesheets/jobs.scss +++ b/app/assets/stylesheets/jobs.scss @@ -8,6 +8,7 @@ position: absolute; top: 0px; right: 50px; + z-index: 100; } .relic-bar { @@ -17,11 +18,11 @@ margin-bottom: 60px; .inside { - height: 210px; - padding: 60px 15px; + height: 550px; + padding: 60px 0px; width: 870px; margin: 0 auto; - background: image-url("relic-tee.png") no-repeat right 102px; + background: image-url("relic-tee.png") no-repeat right 160px; } h1 { @@ -59,6 +60,7 @@ text-transform: uppercase; color: #fff; text-align: center; + float: right; &:hover { background: $green; @@ -104,7 +106,6 @@ body#jobs { width: 100%; height: 226px; position: absolute; - top: 100px; left: 0; } @@ -117,6 +118,7 @@ body#jobs { } .jobs-top { + position: relative; height: 226px; background: $dark-grey image-url("jobs/jobs-header.jpg") no-repeat top center; color: #fff; @@ -132,21 +134,16 @@ body#jobs { padding: 0 20px; position: relative; - .filter-outside { + .heading-outside { float: left; margin-top: 65px; - .filter { + .heading { position: relative; display: inline-block; - background: image-url("jobs/filter-hint.png") no-repeat right center; padding-right: 30px; max-width: 440px; - &:hover { - opacity: 0.6; - } - h1 { font-size: 3.7em; font-family: "MuseoSans-100"; @@ -157,60 +154,9 @@ body#jobs { } } } - //filter - - .location-drop-down { - - //display: none; - - position: absolute; - z-index: 1000; - background: #fff; - width: 175px; - left: 223px; - top: 120px; - @include border-radius(4px); - border: solid 1px #e1e1e1; - -webkit-box-shadow: 0px 3px 5px 1px rgba(0, 0, 0, 0.1); - box-shadow: 0px 3px 5px 1px rgba(0, 0, 0, 0.1); - - li { - border-top: #e1e1e1 solid 1px; - - &:first-child { - border: 0; - } - - &:last-child { - a.worldwide { - color: black; - } - } - - a { - font-family: "MuseoSans-500"; - display: block; - font-size: 1.3em; - color: #8B8B8B; - height: 40px; - line-height: 40px; - padding: 0 20px; - @include ellipsis; - - &:hover { - color: $dark-grey; - background: #f2f2f2; - } - - } - //a - } - //li - } - //location drop down - + //header } - //filter-outside + //header-outside .top-box { position: absolute; @@ -244,16 +190,9 @@ body#jobs { text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.6); @include border-radius(4px); - -webkit-box-shadow: inset 0px 1px 0px 0px rgba(225, 225, 225, 0.2), 0px 2px 1px 0px rgba(0, 0, 0, 0.2); - box-shadow: inset 0px 1px 0px 0px rgba(225, 225, 225, 0.2), 0px 2px 1px 0px rgba(0, 0, 0, 0.2); background: #3f98dc; /* Old browsers */ - background: -moz-linear-gradient(top, #3f98dc 0%, #3286c5 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #3f98dc), color-stop(100%, #3286c5)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #3f98dc 0%, #3286c5 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #3f98dc 0%, #3286c5 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #3f98dc 0%, #3286c5 100%); /* IE10+ */ background: linear-gradient(to bottom, #3f98dc 0%, #3286c5 100%); /* W3C */ &:hover { @@ -280,8 +219,142 @@ body#jobs { } // top-jobs - .jobs { + .filter-outside { margin-top: -50px; + margin-bottom: 15px; + padding: 30px; + background: #fff; + @include border-radius(4px); + @include subtle-box-shadow; + + // clearfix + &:before,&:after { + content: ""; + display: table; + } + &:after { + clear: both; + } + + .filter-option { + float: left; + font-size: 1.6em; + position: relative; + + .query { + width: 250px; + padding: 7px 5px 5px 28px; + outline: none; + border: 0; + border: 1px solid #909090; + -o-border-radius: 6px; + border-radius: 6px; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + font-size: 1.0em; + color: #a0a0a0; + line-height: 35px - 10px; + @include transition-all; + + &:focus, + &.active { + color: #000; + } + + &:focus { + border-color: #606060; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15), 0 0 4px rgba(0, 0, 0, 0.25); + } + } + + .query-icon { + position: absolute; + top: 2px; + left: 10px; + + &:before { + @include icon-font; + content: "m"; + font-size: 13px; + line-height: 35px; + color: #b0b0b0; + } + } + + .custom-select { + width: 230px; + height: 37px; + margin-top: 0; + margin-left: 10px; + border: 1px solid #909090; + -o-border-radius: 6px; + border-radius: 6px; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15); + + &:hover { + border-color: #909090; + } + + &:focus { + border-color: #606060; + } + + select { + padding: 9px 30px 6px 5px; + font-family: "MuseoSans-300", arial, sans-serif; + } + } + // custom-select + + .checkbox { + margin-left: 20px; + line-height: 35px + 4px; + font-size: 1.0em; + } + + &.submit { + float: right; + } + + .submit-btn { + @include cleaner-text; + display: block; + width: 135px; + height: 37px; + padding-top: 2px; + float: left; + text-align: center; + font-size: 1.0em; + text-transform: uppercase; + letter-spacing: 0.1em; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.6); + @include border-radius(4px); + + box-shadow: inset 0px 1px 0px 0px rgba(225, 225, 225, 0.1), 0px 2px 1px 0px rgba(0, 0, 0, 0.1); + + background: #3f98dc; /* Old browsers */ + background: linear-gradient(to bottom, #3f98dc 0%, #3286c5 100%); /* W3C */ + + color: white; + outline: none; + border: none; + + &:hover { + background: #3f98dc; + } + + &:active { + background: darken(#3f98dc, 10%); + } + } + // submit-btn + + } + // filter-option + } + // filter-outside + + .jobs { + margin-top: 0px; li { margin-bottom: 15px; @@ -408,4 +481,4 @@ body#jobs { } -// body#jobs \ No newline at end of file +// body#jobs diff --git a/app/assets/stylesheets/leader-board.scss b/app/assets/stylesheets/leader-board.scss deleted file mode 100644 index 527c5ffd..00000000 --- a/app/assets/stylesheets/leader-board.scss +++ /dev/null @@ -1,254 +0,0 @@ -@import "base"; -@import "compass/css3/"; - -.ribbon-title { - width: 516px; - height: 59px; - background: image-url("leaderboard/ribbon.png") no-repeat; - margin: -20px auto 50px auto; - - span { - display: none; - } -} - -.leader-board { - @include paper-panel; - @include border-radius(3px); - width: 800px; - margin: 0 auto; - - img { - border: 2px solid #fff; - @include subtle-box-shadow; - } - - .leader-board-head { - - border-bottom: 1px solid #e6e6e6; - - li { - float: left; - padding: 30px 0 30px 30px; - background: image-url("leaderboard/vr.png") no-repeat left; - - &:first-child { - background: none; - } - } - - .rank { - width: 95px; - } - - .team { - width: 265px; - } - - .members { - width: 225px; - } - - .score { - width: 95px; - } - - h2 { - font-size: 1.8em; - } - - } - - .team-list { - - > li { - height: 90px; - line-height: 90px; - border-bottom: 1px solid #e6e6e6; - border-top: 1px solid #fff; - position: relative; - - &:nth-child(2n+1) { - background: #fff; - } - - &:last-child { - @include border-radius-bottom(3px); - } - - img { - vertical-align: middle; - } - - a.hiring-ribbon { - position: absolute; - z-index: 100; - width: 76px; - height: 77px; - top: -7px; - right: -5px; - background: image-url("team/hiring.png") no-repeat; - - span { - display: none; - } - } - } - - div { - float: left; - padding: 0 0 0 30px; - } - - .rank { - width: 95px; - - h3 { - color: $light-grey; - } - } - - .team { - width: 265px; - - a { - font-size: 1.8em; - color: $light-blue; - line-height: 0px; - vertical-align: middle; - @include transition-all; - - span { - width: 200px; - text-overflow: hidden; - - } - - img { - margin-right: 20px; - width: 40px; - height: 40px; - overflow: hidden; - } - - &:hover { - opacity: 0.8; - color: #000; - } - } - } - - .members { - width: 225px; - margin-bottom: 0; - - ul { - float: left; - } - - li { - float: left; - margin-left: 10px; - - &:first-child { - margin: 0; - } - - } - - span { - //float: left; - //display: inline-block; - margin-left: 20px; - padding: 5px; - background: #fff; - border: solid 1px #e6e6e6; - line-height: 0px; - vertical-align: middle; - @include border-radius(6px); - - } - - a { - @include transition-all; - - &:hover { - opacity: 0.5; - } - } - } - - .score { - width: 95px; - - span { - font-size: 2.6em; - color: $light-blue; - line-height: 0px; - vertical-align: middle; - font-family: "MuseoSans-500"; - } - } - - .extended a { - font-size: 1.6em !important; - display: block; - width: 400px; - margin: 15px auto 0 auto; - @include blue-btn; - @include border-radius(6px); - @include ts-top-black; - height: 58px; - line-height: 58px; - text-align: center; - @include transition-all; - - &:hover { - opacity: 0.8; - } - - } - - } -} - -.pagination { - //width: 800px; - margin: 0 auto; - padding-top: 20px; - - span { - font-size: 1.6em; - @include ts-bottom-white; - padding-right: 40px; - - } - - .current { - color: $light-blue; - } - - a { - color: #8ea4af; - - height: 32px; - line-height: 32px; - //background: image-url("leaderboard/next-prev.png") no-repeat top right; - @include transition-all; - - &:hover { - opacity: 0.5; - } - } - - .next { - float: right; - padding: 0; - } - - .prev { - float: left; - background-position: bottom left; - //padding: 0 0 0 40px; - } -} \ No newline at end of file diff --git a/app/assets/stylesheets/liberator-webfont.eot b/app/assets/stylesheets/liberator-webfont.eot deleted file mode 100755 index c8931bf9..00000000 Binary files a/app/assets/stylesheets/liberator-webfont.eot and /dev/null differ diff --git a/app/assets/stylesheets/liberator-webfont.svg b/app/assets/stylesheets/liberator-webfont.svg deleted file mode 100755 index 0e59a6c9..00000000 --- a/app/assets/stylesheets/liberator-webfont.svg +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="LiberatorRegular" horiz-adv-x="1024" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="500" /> -<glyph horiz-adv-x="0" /> -<glyph horiz-adv-x="2048" /> -<glyph unicode=" " /> -<glyph unicode="!" d="M532 25v258q0 29 29 28h242q12 0 21.5 -8t9.5 -20v-258h-3q-4 -25 -28 -25h-242q-25 0 -29 25zM532 526v873q0 29 29 28h242q12 0 21.5 -8t9.5 -20v-873h-3q-4 -25 -28 -24h-242q-25 0 -29 24z" /> -<glyph unicode=""" d="M350 1026v379q0 29 29 29h242q29 0 28 -29v-379q-4 -25 -28 -25h-242q-25 0 -29 25zM723 1026v379q0 29 29 29h241q29 0 29 -29v-379q-4 -25 -29 -25h-241q-25 0 -29 25z" /> -<glyph unicode="#" horiz-adv-x="1536" d="M174 319v244q0 29 29 29h180l72 272h-252q-12 0 -20.5 9.5t-8.5 19.5v244q0 29 29 28h329l54 209q0 29 28 29h244q29 0 29 -29l-53 -209h299l55 209q0 29 29 29h241q12 0 21.5 -8.5t9.5 -20.5l-55 -209h73q29 0 29 -28v-244q0 -10 -8 -19.5t-21 -9.5h-151l-70 -272h221 q29 0 29 -29v-244q0 -10 -8 -19t-21 -9h-299l-67 -260q0 -12 -9.5 -20.5t-21.5 -8.5h-242q-29 0 -28 29l67 260h-301l-67 -260q0 -29 -29 -29h-244q-29 0 -28 29l67 260h-102q-12 0 -20.5 9t-8.5 19zM684 592h301l70 272h-299z" /> -<glyph unicode="$" d="M274 287v166q0 23 25 22h197q23 0 22 -22v-74h209q6 0 8 4l29 27q4 4 4 8v133q0 2 -4 10l-29 27q-4 4 -8 4h-299q-24 0 -43 18l-92 92q-19 19 -19 43v396q0 24 19 43l92 94q23 23 43 16h94v113q0 25 23 25h198q23 0 23 -25v-113h92q19 6 43 -16l94 -94q19 -19 19 -43h-2 l2 -2v-172q0 -23 -25 -23h-196q-25 0 -25 23v84h-205q-8 0 -12 -4l-27 -29q-6 -6 -6 -8v-138h2v-4q0 -6 4 -8l25 -24h309q20 6 43 -17l94 -94q19 -19 19 -43v-393q0 -30 -19 -43l-94 -94q-17 -19 -43 -19h-92v-113q-4 -20 -23 -20h-198q-18 0 -23 20v113h-94q-24 0 -43 19 l-92 92q-19 19 -19 43z" /> -<glyph unicode="%" d="M207 1112v277q0 29 29 28h243q29 0 29 -28v-277h-2q-4 -25 -27 -25h-243q-25 0 -29 25zM274 29l451 1360q0 12 9 20t22 8h241q29 0 29 -28l-451 -1360q0 -29 -28 -29h-242q-12 0 -21.5 8t-9.5 21zM821 25v276q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-276 q-4 -25 -28 -25h-244q-23 0 -27 25h-2z" /> -<glyph unicode="&" d="M168 524v244q0 29 29 29h284v284q0 10 8.5 19.5t20.5 9.5h242q12 0 21 -9t9 -20v-284h287q25 -4 25 -29v-244q0 -23 -25 -26v-2h-287v-287h-2q-4 -27 -28 -27h-242q-25 0 -29 27v287h-284q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="'" d="M537 1026v379q0 29 28 29h242q29 0 29 -29v-379q-4 -25 -29 -25h-242q-25 0 -28 25z" /> -<glyph unicode="(" horiz-adv-x="989" d="M438 190v1051q-6 26 21 53l116 117q10 10 18.5 13t16.5 6q8 2 19 2h264v-302h-100q-8 0 -15 -6l-33 -32q-6 -6 -6 -13v-735q0 -8 6 -14l29 -29h119v-301h-264q-31 0 -54 23l-116 114q-26 26 -21 53z" /> -<glyph unicode=")" horiz-adv-x="976" d="M451 4v301h118l29 29q6 6 6 14v735q0 2 -2 5.5t-4 7.5l-35 32q-4 6 -12 7h-100v301h264q32 0 53 -21l115 -117q22 -22 22 -53v-1050q0 -31 -22 -54l-115 -114q-23 -23 -53 -23h-264z" /> -<glyph unicode="*" horiz-adv-x="1155" d="M265 796.5q1 8.5 5 12.5l205 145l-203 142q-14 10 -4 28l92 131q12 16 27 5l162 -115v198q0 18 20 19h160q20 0 21 -19v-198l161 115q14 12 27 -5l92 -131q10 -18 -4 -28l-203 -142l205 -145q4 -4 5 -12.5t-3 -12.5l-92 -133q-10 -10 -25 -4v-2l-163 117v-201h-2 q0 -16 -19 -16h-160q-18 0 -18 16h-2v201l-164 -117v2q-14 -6 -25 4l-92 133q-4 4 -3 12.5z" /> -<glyph unicode="+" d="M168 524v244q0 29 29 29h284v284q0 10 8.5 19.5t20.5 9.5h242q12 0 21 -9t9 -20v-284h287q25 -4 25 -29v-244q0 -23 -25 -26v-2h-287v-287h-2q-4 -27 -28 -27h-242q-25 0 -29 27v287h-284q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="," d="M598 29v276q0 29 29 29h241q12 0 21.5 -8.5t9.5 -20.5v-387l-2 2q-5 -31 -37 -18l-235 96q-25 10 -27 31z" /> -<glyph unicode="-" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="." d="M535 29v276q0 29 28 29h242q29 0 29 -29v-276q-4 -25 -29 -25h-242q-25 0 -28 25z" /> -<glyph unicode="/" d="M328 29l450 1374q0 29 29 29h244q10 0 19 -8.5t9 -20.5l-450 -1374q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29z" /> -<glyph unicode="0" horiz-adv-x="1173" d="M250 195v1048h2q-7 26 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2q0 -2 1 -2t1 -2v-1049q0 -28 -22 -51l-115 -116q-27 -27 -53 -21h-531q-27 -5 -53 21l-115 114q-27 27 -20 53q0 2 -2 5zM551 344q0 -6 8 -12l27 -29h239l29 29q6 6 6 12v737 q0 2 -2 4t-4 7l-35 34q-10 6 -14 7h-199q-6 0 -14 -7l-33 -34q-11 -12 -8 -15v-733z" /> -<glyph unicode="1" horiz-adv-x="694" d="M233.5 1136.5q-8.5 8.5 2.5 26.5l96 236q10 25 28 26h281l4 -2q12 0 23 -22v-1372q0 -12 -9.5 -20.5t-21.5 -8.5h-242q-29 0 -28 29v1095h-115v2q-10 2 -18.5 10.5z" /> -<glyph unicode="2" horiz-adv-x="1226" d="M313 29v606q0 30 23 53l115 115q20 20 53 20h383l28 29q2 4 4.5 5t2.5 5v215q0 6 -7 13l-32 32q-8 8 -15 8h-254v-104q0 -29 -28 -29h-244q-29 0 -29 29v215q0 30 23 53l115 115q18 18 53 21l530 2v-2q32 0 53 -21l115 -115q21 -21 21 -53v-528q0 -31 -21 -54l-117 -114 q-26 -26 -51 -21h-368l-11 -6l-34 -35q-6 -6 -7 -10v-172h580q12 0 20.5 -9t8.5 -22v-241q0 -29 -29 -29h-852q-29 0 -29 29z" /> -<glyph unicode="3" horiz-adv-x="1247" d="M371 190h2q-2 2 -2 5v211q0 12 9 20t19 8h244q29 0 29 -28v-103h258l28 27q6 8 7 14v170q0 3 -7 12l-34 33q-4 4 -7.5 5t-7.5 3h-213v299h234l28 29q6 8 7 14v170q0 2 -2 5t-5 8l-34 32q-4 4 -7.5 5t-7.5 4h-237v-105q0 -29 -29 -29h-244q-10 0 -19 8.5t-9 20.5v211 q0 2 2 4h-2q0 31 22 53l115 115q10 10 18.5 13t16.5 6q8 2 18 2h514q32 0 53 -21l115 -115q23 -23 23 -53v-407q0 -31 -23 -54l-80 -82l80 -82q23 -18 23 -36v-392q0 -30 -23 -53l-115 -114q-27 -27 -53 -21h-514q-27 -5 -53 21l-115 114q-22 22 -22 53z" /> -<glyph unicode="4" horiz-adv-x="1128" d="M168 555h2l-2 4v838q0 10 9 19t22 9h241q12 0 20.5 -9t8.5 -19v-688q0 -6 6 -15l29 -28h213v731q0 29 28 28h244q10 0 19.5 -8t9.5 -20v-731h106q10 0 19.5 -8.5t9.5 -20.5v-244q0 -10 -9 -19t-20 -9h-106v-336q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29v336h-359 q-30 0 -53 22l-115 115q-22 22 -22 53z" /> -<glyph unicode="5" horiz-adv-x="1189" d="M279 1401q0 12 9 21.5t21 9.5h852q10 0 19.5 -9.5t9.5 -21.5v-242q0 -12 -9.5 -20.5t-19.5 -8.5h-581v-169q-2 -2 0 -5q0 -6 8 -10l33 -35q8 -4 10 -4h368v-2q32 0 54 -20l114 -115q23 -23 23 -53v-529q0 -30 -23 -53l-114 -115q-26 -26 -54 -20h-530q-26 -5 -53 20 l-115 115q-25 25 -20 53v215q0 29 28 29h242q29 0 29 -29v-102h254q10 0 14 6l35 33q2 4 4 5t2 5v213l-2 -2v4q0 6 -6 13l-29 28h-383q-27 -5 -53 21l-115 114q-25 25 -20 54z" /> -<glyph unicode="6" horiz-adv-x="1153" d="M258 188h2q0 2 -1 2t-1 3v1044q0 2 1 2t1 2h-2q0 30 23 53l114 115q18 18 54 21h514q32 0 53 -21l114 -115q23 -23 23 -53v-215q0 -29 -29 -29h-243q-29 0 -29 29v104h-238q-4 -2 -7 -3t-7 -5l-35 -32q-6 -6 -6 -13v-170q0 -6 6 -14l29 -29h151q2 2 5 2h211l2 -2v2 q30 0 53 -22l114 -115q23 -23 23 -53v-490q0 -28 -23 -51l-114 -115q-27 -27 -53 -20h-529q-20 4 -39 20l-114 115q-23 23 -23 53zM559 342q0 -6 6 -14l27 -25h225l29 29q6 4 6 12v168q0 10 -6 14l-39 39h-193q-4 -2 -7 -3t-7 -5l-35 -33q-6 -6 -6 -12v-170z" /> -<glyph unicode="7" horiz-adv-x="1136" d="M256 1153v244q0 10 8 19t21 9h821q12 0 20.5 -9t8.5 -19v-244q0 -6 -8.5 -26.5t-12.5 -24.5l-387 -1073l-8 -29h-367v2q0 10 6 21l414 1101h-487q-29 0 -29 29z" /> -<glyph unicode="8" d="M260 188v392q4 20 21 36l81 82l-81 82q-26 26 -21 54v409q0 31 21 51l116 115q18 18 54 21h514q32 0 53 -21l115 -115q20 -20 20 -51v-409q0 -32 -20 -54l-82 -82l82 -82q16 -16 20 -36v-392q0 -32 -20 -53l-115 -115q-20 -20 -41 -20h-543q-16 0 -37 20l-116 115 q-21 21 -21 53zM561 342q0 -8 6 -14l29 -27h221l29 27q6 6 6 14v170q0 6 -6 12l-33 33q-4 4 -8 5t-6 3h-185q-2 -2 -6 -3t-8 -5l-33 -33q-6 -6 -6 -12v-170zM561 907q0 -8 6 -14l29 -29h221l29 29q6 6 6 14v168q0 10 -6 15l-33 32q-4 4 -8 5t-6 3h-185q-2 -2 -6 -3t-8 -5 l-33 -32q-6 -4 -6 -15v-168z" /> -<glyph unicode="9" horiz-adv-x="1148" d="M262 188v215q0 29 29 29h241q12 0 21.5 -8t9.5 -21v-102h238q8 0 14 6l33 33q6 6 6 10v172q0 8 -6 15l-29 28h-149q-2 0 -4 -2h-211q-2 0 -2 1t-6 0q-24 -4 -50 22l-114 114q-26 26 -21 54v489q-2 4 1 19.5t20 31.5l114 115q18 18 54 21h530q20 -4 37 -21l117 -115 q20 -20 20 -53v-1053q0 -33 -20 -53l-117 -115q-27 -27 -53 -20h-514q-27 -5 -54 20l-114 115q-26 26 -21 53zM561 918q2 -4 3 -7.5t5 -7.5l33 -35l6 -2l193 -2v2q8 0 14 6l33 33q6 6 6 10v172q0 8 -6 15l-27 24h-223l-29 -28q-6 -4 -6 -13v-59h-2v-108z" /> -<glyph unicode=":" d="M530 27v276q0 12 9.5 20.5t21.5 8.5h242q29 0 28 -29v-276q-4 -25 -28 -25h-242q-25 0 -29 25h-2zM530 547v276q0 10 9.5 19.5t21.5 9.5h242q12 0 20 -9t8 -20v-276q-4 -25 -28 -25h-242q-25 0 -29 25h-2z" /> -<glyph unicode=";" d="M537 41v276q0 12 9 20.5t19 8.5h244q29 0 29 -29v-385q-5 -32 -37 -18l-236 96q-27 12 -26 31h-2zM537 561v277q0 10 9 19t19 9h244q12 0 20.5 -9t8.5 -19v-277q-4 -25 -29 -24h-244q-23 0 -26 24h-2z" /> -<glyph unicode="<" horiz-adv-x="1103" d="M309 510v272q0 23 25 35l719 352q4 2 8 4.5t12 5.5t17.5 -8.5t9.5 -21.5v-264q0 -25 -29 -37l-399 -201l399 -201q29 -12 29 -36v-265q0 -10 -10 -21q-15 -19 -37 3l-719 350q-24 8 -25 33z" /> -<glyph unicode="=" horiz-adv-x="1064" d="M211 381v244q0 29 29 28h872q25 -4 25 -28v-244q0 -23 -25 -27v-2h-872q-12 0 -20.5 9.5t-8.5 19.5zM211 821v242q0 29 29 29h872q25 -4 25 -29v-242q0 -25 -25 -28v-2h-872q-12 0 -20.5 9t-8.5 21z" /> -<glyph unicode=">" horiz-adv-x="1136" d="M342 141v265q0 25 29 36l397 201l-397 201q-29 12 -29 37v264q0 10 8 21.5t17.5 8.5t13.5 -5.5t8 -4.5l719 -352q25 -13 25 -35v-272q0 -25 -25 -33l-719 -350q-23 -23 -35 -7.5t-12 25.5z" /> -<glyph unicode="?" horiz-adv-x="1204" d="M295 1010v227q-6 25 20 53l115 115q22 22 53 22h531q31 0 53 -22l115 -115q16 -16 20 -37h2v-731q0 -12 -9 -20t-21 -8h-291v-78q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29v348q0 12 8 21.5t20 9.5h293v288q0 8 -6 15l-29 28h-237l-29 -28q-6 -4 -6 -15v-73 q0 -12 -9 -21.5t-22 -9.5h-241q-12 0 -20.5 9t-8.5 22zM582 25v256q0 12 8 21t20 9h244q12 0 20.5 -9t8.5 -21v-256h-2q-5 -25 -27 -25h-244q-23 0 -28 25z" /> -<glyph unicode="@" horiz-adv-x="1505" d="M162 -78v1127q-7 13 14 34l78 78q17 17 35 17h1097q18 0 35 -17l78 -78q7 -7 11.5 -18.5t3.5 -14.5t2 -3v-938h-922q-14 -5 -35 14l-80 78q-6 6 -9 13q-7 17 -5 24h2l-2 2v503q-8 15 14 37l78 78q6 6 13.5 8t12.5 4t11 2h479q6 0 11 -2t11.5 -4t14.5 -8l78 -78 q6 -6 8 -13t4 -12t2 -10v-432h109v627q0 2 -4 6l-23 23q-4 4 -10 4h-873q-6 0 -8 -4l-24 -23q-4 -4 -4 -6v-913q0 -2 4 -11l20 -18h805v-205h-903q-16 -5 -37 14l-78 78q-6 6 -9 13q-7 18 -5 24zM670 342q0 -6 4 -10l18 -19h283l18 19q4 4 4 10v293l-4 8l-22 23l-8 4h-256 q-2 0 -11 -4l-22 -23l-4 -8v-293z" /> -<glyph unicode="A" horiz-adv-x="1198" d="M141 29l406 1372v2q12 29 28 29h244q18 0 29 -29v-2q102 -344 202.5 -686t202.5 -686q1 -3 1 -5q0 -6 -8 -14q-11 -10 -23 -10h-234q-26 0 -37 29l-49 166h-411l-50 -166q-12 -29 -36 -29h-234q-12 0 -24 9q-9 7 -8 14q0 3 1 6zM573 471h248l-123 420z" /> -<glyph unicode="B" horiz-adv-x="1126" d="M256 29v1374q0 29 29 29h651q30 0 53 -23l115 -115q22 -22 22 -53v-407q0 -31 -22 -54l-80 -82l80 -80q15 -15 20 -36h2v-392q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM557 301h234l28 29q6 8 6 14v170q0 2 -2 4t-4 6l-35 35q-6 6 -12 6h-215v-264z M557 866h234l28 29q6 8 6 14v170q0 2 -2 4t-4 7l-35 34q-4 6 -12 6h-215v-264z" /> -<glyph unicode="C" horiz-adv-x="1155" d="M248 193v1050q0 33 20 53l115 115q26 23 53 23h531q28 0 53 -23l115 -115q22 -22 22 -53h-2l2 -4v-215q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-6 6 -14 7h-199q-6 0 -14 -7l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l29 -29h237l29 29q6 6 6 14v62q0 10 8 19t21 9h243q10 0 19.5 -9t9.5 -19v-232q-5 -19 -22 -37l-115 -114q-23 -23 -53 -23h-531q-33 0 -53 23l-115 114q-20 20 -20 54z" /> -<glyph unicode="D" horiz-adv-x="1126" d="M254 29v1374q0 29 29 29h651q28 0 53 -23l115 -115q22 -24 22 -53v-1051q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM555 301h233l29 29q6 8 6 14v735q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-213v-829z" /> -<glyph unicode="E" horiz-adv-x="1064" d="M258 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -12 -9.5 -20.5t-19.5 -8.5h-473v-264h363q29 0 28 -28v-244q0 -29 -28 -29h-363v-264h473q10 0 19.5 -8t9.5 -21v-243q0 -12 -9.5 -20.5t-19.5 -8.5h-745q-29 0 -29 29z" /> -<glyph unicode="F" horiz-adv-x="1060" d="M254 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -18 -17 -24v-5h-485v-264h363q29 0 28 -28v-244q0 -18 -14 -25v-4h-377v-536q0 -29 -29 -29h-243q-29 0 -29 29z" /> -<glyph unicode="G" horiz-adv-x="1163" d="M254 193v1048h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2v-217q0 -10 -9 -19.5t-21 -9.5h-242q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-199q-8 0 -14 -6l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l27 -29h239l29 29q6 8 6 14v180h-135q-12 0 -20.5 9.5t-8.5 19.5v244q0 29 29 28h406q12 0 21 -8t9 -20v-623h-2q-4 -20 -20 -37l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="H" horiz-adv-x="1163" d="M254 29v1374q0 29 29 29h243q10 0 19.5 -8.5t9.5 -20.5v-537h307v537q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-1374q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v536h-307v-536q0 -12 -9 -20.5t-20 -8.5h-243q-29 0 -29 29z" /> -<glyph unicode="I" horiz-adv-x="544" d="M244 29v1368q0 28 26 28h2h244q29 0 29 -28v-1368q0 -29 -29 -29h-244q-29 0 -28 29z" /> -<glyph unicode="J" horiz-adv-x="1253" d="M344 174v322q0 29 29 28h243q10 0 19.5 -8t9.5 -20v-152q0 -10 6 -14l29 -29h238l28 29q6 6 6 14v1059q4 22 27 22h2h244q25 0 28 -22v-1213q0 -30 -22 -53l-115 -117q-21 -21 -42 -21q-6 0 -11 1h-531q-4 -1 -9 -1q-20 0 -42 21l-116 117q-13 13 -19 37h-2z" /> -<glyph unicode="K" horiz-adv-x="1077" d="M176 29v1374q0 10 8.5 19.5t20.5 9.5h244q12 0 20 -9.5t8 -19.5v-449l303 449q23 29 37 29h309q10 0 25.5 -9.5t11.5 -19.5l-385 -539l389 -819l9 -16q1 -3 1 -5q-1 -6 -9 -14q-12 -10 -23 -10h-273q-25 0 -36 29l-252 565l-107 -148v-417q0 -29 -28 -29h-244 q-29 0 -29 29z" /> -<glyph unicode="L" horiz-adv-x="1083" d="M258 29v1374h2q4 22 27 22h2h241q25 0 29 -22v-1102h549q12 0 21.5 -9t9.5 -20v-243q0 -12 -9.5 -20.5t-21.5 -8.5h-819q-12 0 -21.5 8t-9.5 21z" /> -<glyph unicode="M" horiz-adv-x="1216" d="M154 29l55 1368v6q2 12 8 15t9 4t5 3h261q20 0 30 -26l185 -791l22 -172l16 172l216 791q6 26 28 26h2h260q4 -4 9 -4q8 -6 12 -18v-4l2 -2l53 -1368q0 -29 -29 -29h-241q-12 0 -21.5 8t-9.5 21l-8 518l-158 -522q-12 -29 -37 -29h-164q-22 0 -38 29l-156 522l-10 -518 q0 -29 -29 -29h-244q-10 0 -19 8t-9 21z" /> -<glyph unicode="N" horiz-adv-x="1198" d="M256 31v1374q0 29 29 29h305q23 0 28 -29h3l270 -791l4 -22v813q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1374q0 -10 -8 -19.5t-21 -9.5h-323q-26 0 -37 29l-250 684v-684q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9t-8.5 20z" /> -<glyph unicode="O" horiz-adv-x="1163" d="M254 190v1051q0 30 22 53l115 115q23 23 53 23h529q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-117 -114q-23 -23 -51 -23h-531q-30 0 -53 23l-115 114q-22 22 -22 53zM555 344q0 -6 6 -14l29 -29h237l29 29q6 6 6 14v735q0 6 -6 13l-33 32q-6 6 -14 6 h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-735z" /> -<glyph unicode="P" horiz-adv-x="1126" d="M256 31v1374q0 29 29 29h651q32 0 53 -21l115 -117q22 -22 22 -53v-522l-2 -2h2q0 -31 -22 -53l-115 -117q-27 -27 -53 -21h-379v-497q0 -10 -9 -19.5t-22 -9.5h-241q-12 0 -20.5 9t-8.5 20zM557 829h215q6 0 12 7l35 32q2 4 4 5t2 6v202q0 2 -2 4t-4 7l-35 34 q-4 2 -7 4.5t-5 2.5h-215v-304z" /> -<glyph unicode="Q" horiz-adv-x="1167" d="M258 190v1051q0 30 23 53l114 115q23 23 54 23h528q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-43 -43l78 -186q5 -10 5 -18t-6 -13q-12 -10 -22 -10h-274q-26 0 -37 29l-45 104h-354q-31 0 -54 23l-114 114q-23 23 -23 53zM559 340q0 -4 6 -10l29 -29 h237l29 29q6 6 6 10v739q0 6 -6 13l-33 32q-6 6 -14 6h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-739z" /> -<glyph unicode="R" horiz-adv-x="1130" d="M256 29v1374q0 12 9 20.5t20 8.5h651q32 0 53 -21l117 -117q20 -20 20 -57v-520q0 -33 -20 -53l-117 -117l-6 -4l209 -514q1 -3 1 -5q0 -6 -8 -14q-11 -10 -22 -10h-274q-26 0 -37 29l-201 497h-94v-497q0 -10 -8 -19.5t-21 -9.5h-243q-10 0 -19.5 9t-9.5 20zM557 827 h215q8 0 14 7l33 32q6 6 6 11v202q0 6 -6 13l-33 32q-6 6 -12 6h-217v-303z" /> -<glyph unicode="S" horiz-adv-x="1159" d="M248 195v198q0 12 9 20.5t22 8.5h241q29 0 29 -29v-92h258q4 0 10 6l35 33q2 4 4 5t2 5v164q0 2 -2 5t-4 7l-35 33q-6 6 -10 6h-369q-30 0 -53 23l-115 114q-25 25 -20 54h-2v485h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2 v-211q0 -12 -9 -20.5t-22 -8.5h-241q-29 0 -29 29v102h-254q-8 0 -14 -6l-33 -32q-17 -17 -8 -17v-166l2 2v-6q0 -4 6 -10l29 -29h383q30 0 53 -22l115 -115q22 -22 22 -53v-486q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="T" horiz-adv-x="983" d="M176 1155v242q0 12 9.5 21t21.5 9h819q12 0 21.5 -9t9.5 -21v-242q0 -12 -9.5 -20.5t-21.5 -8.5h-260v-1101q-4 -25 -29 -25h-241q-25 0 -29 25v1101h-260q-12 0 -21.5 8.5t-9.5 20.5z" /> -<glyph unicode="U" horiz-adv-x="1173" d="M254 190h2l-2 5v1208q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1059q0 -6 6 -14l29 -29h237l29 29q4 4 5 8t3 6v1059q0 29 29 29h242q29 0 28 -29v-1213q0 -33 -20 -53l-115 -114q-23 -23 -53 -23l-531 2q-27 -5 -53 21l-115 114q-22 22 -22 53z" /> -<glyph unicode="V" horiz-adv-x="1118" d="M160 1397q-2 4 -2 9q0 6 5 14q9 14 21 14h256q20 0 31 -29l184 -791l17 -120l20 120l217 791q6 29 31 29h256q12 0 20 -14q6 -9 6 -16q0 -4 -1 -7l-357 -1364q-10 -31 -39 -31h-272q-27 0 -37 31z" /> -<glyph unicode="W" horiz-adv-x="1208" d="M135 1399q0 10 8.5 19t20.5 9h242q12 0 21 -9t9 -19l49 -697l117 318q12 29 37 29h164q22 0 39 -29l114 -318l52 697q0 10 8 19t20 9h244q10 0 19.5 -9t9.5 -19l-111 -1368v-6q-4 -12 -12 -19q-2 0 -2 -1t-2 -1l-2 -2h-4l-5 -2h-256q-23 0 -28 29l-144 516l-14 102 l-12 -102l-160 -516q-10 -29 -31 -29h-256q-2 0 -2 1t-2 1l-6 2q-2 0 -2 2q-12 6 -12 19q-2 0 -2 2v4z" /> -<glyph unicode="X" horiz-adv-x="1077" d="M164 31q4 12 8 16l350 721l-313 627q-13 13 -0.5 25t24.5 12h256q17 0 31 -29l172 -307l174 307q14 29 31 29h256q12 0 23 -10q15 -14 2 -27l-314 -627l350 -721q12 -12 12 -22q0 -7 -6 -12q-14 -13 -26 -13h-262q-12 0 -23.5 9t-15.5 22l-201 397l-198 -397 q-4 -12 -15.5 -21.5t-23.5 -9.5h-262q-13 0 -23 9q-8 7 -7 15q0 3 1 7z" /> -<glyph unicode="Y" horiz-adv-x="1081" d="M155 1413q11 10 23 10h264q26 0 37 -28l201 -400l199 400q17 28 39 28h262q12 0 23 -9q8 -7 8 -13q0 -2 -1 -4q-4 -8 -5 -12.5t-5 -8.5l-371 -719v-628q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v628l-370 719q-8 15 -8 25q0 8 5 12z" /> -<glyph unicode="Z" horiz-adv-x="1136" d="M252 31v243q0 10 6 21l492 835h-469q-10 0 -19.5 8.5t-9.5 20.5v244q0 12 9 20.5t20 8.5h821q29 0 28 -29v-244q0 -14 -8 -20l-495 -838h475q29 0 28 -29v-241q0 -12 -8 -21.5t-20 -9.5h-821q-10 0 -19.5 9t-9.5 22z" /> -<glyph unicode="\" d="M305 1403q0 29 29 29h244q10 0 19 -8.5t9 -20.5l451 -1374q0 -12 -9.5 -20.5t-19.5 -8.5h-244q-29 0 -28 29z" /> -<glyph unicode="^" d="M96 678q4 12 8 16l351 719q13 25 34 25h273q14 0 23.5 -9.5t11.5 -15.5l350 -719q4 -4 8 -16t-6 -21.5t-23 -9.5h-262q-12 0 -23.5 9.5t-15.5 19.5l-200 399l-199 -399q-4 -10 -15.5 -19.5t-23.5 -9.5h-262q-12 0 -22.5 9.5t-6.5 21.5z" /> -<glyph unicode="a" horiz-adv-x="1198" d="M141 29l406 1372v2q12 29 28 29h244q18 0 29 -29v-2q102 -344 202.5 -686t202.5 -686q1 -3 1 -5q0 -6 -8 -14q-11 -10 -23 -10h-234q-26 0 -37 29l-49 166h-411l-50 -166q-12 -29 -36 -29h-234q-12 0 -24 9q-9 7 -8 14q0 3 1 6zM573 471h248l-123 420z" /> -<glyph unicode="b" horiz-adv-x="1126" d="M256 29v1374q0 29 29 29h651q30 0 53 -23l115 -115q22 -22 22 -53v-407q0 -31 -22 -54l-80 -82l80 -80q15 -15 20 -36h2v-392q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM557 301h234l28 29q6 8 6 14v170q0 2 -2 4t-4 6l-35 35q-6 6 -12 6h-215v-264z M557 866h234l28 29q6 8 6 14v170q0 2 -2 4t-4 7l-35 34q-4 6 -12 6h-215v-264z" /> -<glyph unicode="c" horiz-adv-x="1155" d="M248 193v1050q0 33 20 53l115 115q26 23 53 23h531q28 0 53 -23l115 -115q22 -22 22 -53h-2l2 -4v-215q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-6 6 -14 7h-199q-6 0 -14 -7l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l29 -29h237l29 29q6 6 6 14v62q0 10 8 19t21 9h243q10 0 19.5 -9t9.5 -19v-232q-5 -19 -22 -37l-115 -114q-23 -23 -53 -23h-531q-33 0 -53 23l-115 114q-20 20 -20 54z" /> -<glyph unicode="d" horiz-adv-x="1126" d="M254 29v1374q0 29 29 29h651q28 0 53 -23l115 -115q22 -24 22 -53v-1051q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-651q-29 0 -29 29zM555 301h233l29 29q6 8 6 14v735q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-213v-829z" /> -<glyph unicode="e" horiz-adv-x="1064" d="M258 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -12 -9.5 -20.5t-19.5 -8.5h-473v-264h363q29 0 28 -28v-244q0 -29 -28 -29h-363v-264h473q10 0 19.5 -8t9.5 -21v-243q0 -12 -9.5 -20.5t-19.5 -8.5h-745q-29 0 -29 29z" /> -<glyph unicode="f" horiz-adv-x="1060" d="M254 29v1374q0 29 29 29h745q10 0 19.5 -8.5t9.5 -20.5v-244q0 -18 -17 -24v-5h-485v-264h363q29 0 28 -28v-244q0 -18 -14 -25v-4h-377v-536q0 -29 -29 -29h-243q-29 0 -29 29z" /> -<glyph unicode="g" horiz-adv-x="1163" d="M254 193v1048h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2v-217q0 -10 -9 -19.5t-21 -9.5h-242q-12 0 -20.5 9.5t-8.5 19.5v57q0 2 -2 4t-4 7l-35 34q-4 6 -14 6h-199q-8 0 -14 -6l-33 -34q-11 -12 -8 -15v-731q2 -4 3 -7t5 -7 l27 -29h239l29 29q6 8 6 14v180h-135q-12 0 -20.5 9.5t-8.5 19.5v244q0 29 29 28h406q12 0 21 -8t9 -20v-623h-2q-4 -20 -20 -37l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="h" horiz-adv-x="1163" d="M254 29v1374q0 29 29 29h243q10 0 19.5 -8.5t9.5 -20.5v-537h307v537q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-1374q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v536h-307v-536q0 -12 -9 -20.5t-20 -8.5h-243q-29 0 -29 29z" /> -<glyph unicode="i" horiz-adv-x="544" d="M244 29v1368q0 28 26 28h2h244q29 0 29 -28v-1368q0 -29 -29 -29h-244q-29 0 -28 29z" /> -<glyph unicode="j" horiz-adv-x="1253" d="M344 174v322q0 29 29 28h243q10 0 19.5 -8t9.5 -20v-152q0 -10 6 -14l29 -29h238l28 29q6 6 6 14v1059q4 22 27 22h2h244q25 0 28 -22v-1213q0 -30 -22 -53l-115 -117q-21 -21 -42 -21q-6 0 -11 1h-531q-4 -1 -9 -1q-20 0 -42 21l-116 117q-13 13 -19 37h-2z" /> -<glyph unicode="k" horiz-adv-x="1077" d="M176 29v1374q0 10 8.5 19.5t20.5 9.5h244q12 0 20 -9.5t8 -19.5v-449l303 449q23 29 37 29h309q10 0 25.5 -9.5t11.5 -19.5l-385 -539l389 -819l9 -16q1 -3 1 -5q-1 -6 -9 -14q-12 -10 -23 -10h-273q-25 0 -36 29l-252 565l-107 -148v-417q0 -29 -28 -29h-244 q-29 0 -29 29z" /> -<glyph unicode="l" horiz-adv-x="1083" d="M258 29v1374h2q4 22 27 22h2h241q25 0 29 -22v-1102h549q12 0 21.5 -9t9.5 -20v-243q0 -12 -9.5 -20.5t-21.5 -8.5h-819q-12 0 -21.5 8t-9.5 21z" /> -<glyph unicode="m" horiz-adv-x="1216" d="M154 29l55 1368v6q2 12 8 15t9 4t5 3h261q20 0 30 -26l185 -791l22 -172l16 172l216 791q6 26 28 26h2h260q4 -4 9 -4q8 -6 12 -18v-4l2 -2l53 -1368q0 -29 -29 -29h-241q-12 0 -21.5 8t-9.5 21l-8 518l-158 -522q-12 -29 -37 -29h-164q-22 0 -38 29l-156 522l-10 -518 q0 -29 -29 -29h-244q-10 0 -19 8t-9 21z" /> -<glyph unicode="n" horiz-adv-x="1198" d="M256 31v1374q0 29 29 29h305q23 0 28 -29h3l270 -791l4 -22v813q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1374q0 -10 -8 -19.5t-21 -9.5h-323q-26 0 -37 29l-250 684v-684q0 -10 -9 -19.5t-20 -9.5h-243q-12 0 -20.5 9t-8.5 20z" /> -<glyph unicode="o" horiz-adv-x="1163" d="M254 190v1051q0 30 22 53l115 115q23 23 53 23h529q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-117 -114q-23 -23 -51 -23h-531q-30 0 -53 23l-115 114q-22 22 -22 53zM555 344q0 -6 6 -14l29 -29h237l29 29q6 6 6 14v735q0 6 -6 13l-33 32q-6 6 -14 6 h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-735z" /> -<glyph unicode="p" horiz-adv-x="1126" d="M256 31v1374q0 29 29 29h651q32 0 53 -21l115 -117q22 -22 22 -53v-522l-2 -2h2q0 -31 -22 -53l-115 -117q-27 -27 -53 -21h-379v-497q0 -10 -9 -19.5t-22 -9.5h-241q-12 0 -20.5 9t-8.5 20zM557 829h215q6 0 12 7l35 32q2 4 4 5t2 6v202q0 2 -2 4t-4 7l-35 34 q-4 2 -7 4.5t-5 2.5h-215v-304z" /> -<glyph unicode="q" horiz-adv-x="1167" d="M258 190v1051q0 30 23 53l114 115q23 23 54 23h528q30 0 53 -23l117 -115q20 -20 20 -53v-1051q0 -33 -20 -53l-43 -43l78 -186q5 -10 5 -18t-6 -13q-12 -10 -22 -10h-274q-26 0 -37 29l-45 104h-354q-31 0 -54 23l-114 114q-23 23 -23 53zM559 340q0 -4 6 -10l29 -29 h237l29 29q6 6 6 10v739q0 6 -6 13l-33 32q-6 6 -14 6h-201q-8 0 -12 -6l-35 -32q-6 -6 -6 -13v-739z" /> -<glyph unicode="r" horiz-adv-x="1130" d="M256 29v1374q0 12 9 20.5t20 8.5h651q32 0 53 -21l117 -117q20 -20 20 -57v-520q0 -33 -20 -53l-117 -117l-6 -4l209 -514q1 -3 1 -5q0 -6 -8 -14q-11 -10 -22 -10h-274q-26 0 -37 29l-201 497h-94v-497q0 -10 -8 -19.5t-21 -9.5h-243q-10 0 -19.5 9t-9.5 20zM557 827 h215q8 0 14 7l33 32q6 6 6 11v202q0 6 -6 13l-33 32q-6 6 -12 6h-217v-303z" /> -<glyph unicode="s" horiz-adv-x="1159" d="M248 195v198q0 12 9 20.5t22 8.5h241q29 0 29 -29v-92h258q4 0 10 6l35 33q2 4 4 5t2 5v164q0 2 -2 5t-4 7l-35 33q-6 6 -10 6h-369q-30 0 -53 23l-115 114q-25 25 -20 54h-2v485h2q-6 25 20 53l115 115q23 23 53 23h531q30 0 53 -23l115 -115q22 -22 22 -53h-2l2 -2 v-211q0 -12 -9 -20.5t-22 -8.5h-241q-29 0 -29 29v102h-254q-8 0 -14 -6l-33 -32q-17 -17 -8 -17v-166l2 2v-6q0 -4 6 -10l29 -29h383q30 0 53 -22l115 -115q22 -22 22 -53v-486q0 -30 -22 -53l-115 -114q-23 -23 -53 -23h-531q-30 0 -53 23l-115 114q-26 25 -20 53z" /> -<glyph unicode="t" horiz-adv-x="983" d="M176 1155v242q0 12 9.5 21t21.5 9h819q12 0 21.5 -9t9.5 -21v-242q0 -12 -9.5 -20.5t-21.5 -8.5h-260v-1101q-4 -25 -29 -25h-241q-25 0 -29 25v1101h-260q-12 0 -21.5 8.5t-9.5 20.5z" /> -<glyph unicode="u" horiz-adv-x="1173" d="M254 190h2l-2 5v1208q0 12 9 20.5t20 8.5h243q29 0 29 -29v-1059q0 -6 6 -14l29 -29h237l29 29q4 4 5 8t3 6v1059q0 29 29 29h242q29 0 28 -29v-1213q0 -33 -20 -53l-115 -114q-23 -23 -53 -23l-531 2q-27 -5 -53 21l-115 114q-22 22 -22 53z" /> -<glyph unicode="v" horiz-adv-x="1118" d="M160 1397q-2 4 -2 9q0 6 5 14q9 14 21 14h256q20 0 31 -29l184 -791l17 -120l20 120l217 791q6 29 31 29h256q12 0 20 -14q6 -9 6 -16q0 -4 -1 -7l-357 -1364q-10 -31 -39 -31h-272q-27 0 -37 31z" /> -<glyph unicode="w" horiz-adv-x="1208" d="M135 1399q0 10 8.5 19t20.5 9h242q12 0 21 -9t9 -19l49 -697l117 318q12 29 37 29h164q22 0 39 -29l114 -318l52 697q0 10 8 19t20 9h244q10 0 19.5 -9t9.5 -19l-111 -1368v-6q-4 -12 -12 -19q-2 0 -2 -1t-2 -1l-2 -2h-4l-5 -2h-256q-23 0 -28 29l-144 516l-14 102 l-12 -102l-160 -516q-10 -29 -31 -29h-256q-2 0 -2 1t-2 1l-6 2q-2 0 -2 2q-12 6 -12 19q-2 0 -2 2v4z" /> -<glyph unicode="x" horiz-adv-x="1077" d="M164 31q4 12 8 16l350 721l-313 627q-13 13 -0.5 25t24.5 12h256q17 0 31 -29l172 -307l174 307q14 29 31 29h256q12 0 23 -10q15 -14 2 -27l-314 -627l350 -721q12 -12 12 -22q0 -7 -6 -12q-14 -13 -26 -13h-262q-12 0 -23.5 9t-15.5 22l-201 397l-198 -397 q-4 -12 -15.5 -21.5t-23.5 -9.5h-262q-13 0 -23 9q-8 7 -7 15q0 3 1 7z" /> -<glyph unicode="y" horiz-adv-x="1081" d="M155 1413q11 10 23 10h264q26 0 37 -28l201 -400l199 400q17 28 39 28h262q12 0 23 -9q8 -7 8 -13q0 -2 -1 -4q-4 -8 -5 -12.5t-5 -8.5l-371 -719v-628q0 -29 -28 -29h-244q-10 0 -19.5 8t-9.5 21v628l-370 719q-8 15 -8 25q0 8 5 12z" /> -<glyph unicode="z" horiz-adv-x="1136" d="M252 31v243q0 10 6 21l492 835h-469q-10 0 -19.5 8.5t-9.5 20.5v244q0 12 9 20.5t20 8.5h821q29 0 28 -29v-244q0 -14 -8 -20l-495 -838h475q29 0 28 -29v-241q0 -12 -8 -21.5t-20 -9.5h-821q-10 0 -19.5 9t-9.5 22z" /> -<glyph unicode="|" d="M496 -242v1585q0 29 28 29h244q10 0 19.5 -8t9.5 -21v-1585q0 -12 -9.5 -20t-19.5 -8h-244q-29 0 -28 28z" /> -<glyph unicode=" " /> -<glyph unicode="­" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode=" " horiz-adv-x="719" /> -<glyph unicode=" " horiz-adv-x="1438" /> -<glyph unicode=" " horiz-adv-x="719" /> -<glyph unicode=" " horiz-adv-x="1438" /> -<glyph unicode=" " horiz-adv-x="479" /> -<glyph unicode=" " horiz-adv-x="359" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="179" /> -<glyph unicode=" " horiz-adv-x="287" /> -<glyph unicode=" " horiz-adv-x="79" /> -<glyph unicode="‐" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="‑" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="‒" horiz-adv-x="1054" d="M334 432v244q0 29 28 29h668q25 -4 25 -29v-244q0 -23 -25 -26v-3h-668q-12 0 -20 9.5t-8 19.5z" /> -<glyph unicode="–" d="M176 436v244q0 29 29 29h872q25 -4 25 -29v-244q0 -23 -25 -26v-2h-872q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="—" d="M0 436v244q0 29 29 29h1212q25 -4 25 -29v-244q0 -23 -25 -26v-2h-1212q-12 0 -20.5 9t-8.5 19z" /> -<glyph unicode="‘" d="M535 1126v277q0 12 9 20.5t21 8.5h242q29 0 29 -29v-387q-10 -30 -37 -17l-236 97q-27 12 -26 30h-2z" /> -<glyph unicode="’" d="M535 1018v387q0 29 28 29h242q12 0 21.5 -8.5t9.5 -20.5v-277h-2q0 -18 -27 -30l-236 -97q-29 -13 -36 17z" /> -<glyph unicode="“" d="M338 1126v277q0 12 9 20.5t22 8.5h241q29 0 29 -29v-387q-10 -30 -37 -17l-235 97q-27 12 -27 30h-2zM715 1126v277q0 29 28 29h244q29 0 29 -29v-385q-2 -12 -11.5 -19.5t-27.5 0.5l-234 97q-27 10 -28 30z" /> -<glyph unicode="”" d="M326 1018v387q0 29 28 29h242q12 0 21.5 -8.5t9.5 -20.5v-277h-2q0 -18 -27 -30l-236 -97q-31 -14 -36 17zM700 1018v387q0 12 9.5 20.5t19.5 8.5h244q29 0 28 -29v-277q-2 -20 -26 -30l-236 -97q-18 -8 -27.5 -0.5t-9.5 19.5z" /> -<glyph unicode="•" d="M338 387v541q0 25 17.5 42t41.5 17h500q25 0 42 -17.5t17 -41.5v-541h-2q-9 -51 -57 -51h-500q-23 0 -38 14.5t-19 36.5h-2z" /> -<glyph unicode=" " horiz-adv-x="287" /> -<glyph unicode=" " horiz-adv-x="359" /> -<glyph unicode="" horiz-adv-x="1433" d="M0 0v1434h1434v-1434h-1434z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/stylesheets/liberator-webfont.ttf b/app/assets/stylesheets/liberator-webfont.ttf deleted file mode 100755 index f3aabef2..00000000 Binary files a/app/assets/stylesheets/liberator-webfont.ttf and /dev/null differ diff --git a/app/assets/stylesheets/liberator-webfont.woff b/app/assets/stylesheets/liberator-webfont.woff deleted file mode 100755 index cb4b739f..00000000 Binary files a/app/assets/stylesheets/liberator-webfont.woff and /dev/null differ diff --git a/app/assets/stylesheets/networks.scss b/app/assets/stylesheets/networks.scss index 65258f5f..1cb7926a 100644 --- a/app/assets/stylesheets/networks.scss +++ b/app/assets/stylesheets/networks.scss @@ -1,5 +1,5 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; //Pro tips grid body#protip-multiple { @@ -298,8 +298,6 @@ body#protip-multiple { //width: 250px; white-space: nowrap; text-overflow: ellipsis; - -o-text-overflow: ellipsis; - -ms-text-overflow: ellipsis; } .tips-section { @@ -739,7 +737,6 @@ body#protip-multiple { // width: 30px; // padding: 6px 0; // text-indent: -100px; -// -webkit-box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.3); // box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.3); // background: #BACBD8 image-url("protips/mag.png") no-repeat 7px center; // @include transition-all; @@ -766,7 +763,6 @@ body#protip-multiple { // @include border-radius(30px); // border: 0; // outline: none; - // -webkit-box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.3); // box-shadow: inset 0px 1px 2px 0px rgba(0, 0, 0, 0.3); // margin-left: -30px; // @@ -892,7 +888,6 @@ body#protip-multiple { line-height: 20px; text-align: center; @include border-radius(100px); - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.1); } } @@ -914,7 +909,6 @@ body#protip-multiple { text-transform: uppercase; padding-left: 10px; @include border-radius(3px); - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.1); background: image-url("protips/action-icons.png") no-repeat; } @@ -1038,7 +1032,6 @@ body#protip-multiple { border: solid 1px #c8d5da; @include border-radius(4px); margin-bottom: 20px; - -webkit-box-shadow: inset 0px 1px 0px 0px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 1px 0px 0px rgba(0, 0, 0, 0.1); > a { @@ -1051,7 +1044,6 @@ body#protip-multiple { padding: 10px 45px 10px 15px; background: $light-blue-grey; //background: #fff; - -webkit-box-shadow: inset 0px 1px 0px 0px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 1px 0px 0px rgba(0, 0, 0, 0.1); border-bottom: solid 1px #eaeaea; @include border-radius-top(4px); @@ -1162,7 +1154,6 @@ body#protip-multiple { vertical-align: middle; text-align: center; font-size: 1.4em; - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); @include border-radius(4px); @include transition-all; @@ -1181,7 +1172,6 @@ body#protip-multiple { @include border-radius(4px); margin-bottom: 15px; padding: 30px 40px; - -webkit-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.1); .new { @@ -1333,7 +1323,6 @@ body#protip-multiple { color: #fff; font-family: "MuseoSans-500"; @include border-radius(3px); - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.1); box-shadow: inset 0px 1px 1px 0px rgba(0, 0, 0, 0.1); @include transition-all; } diff --git a/app/assets/stylesheets/new-new-home.scss b/app/assets/stylesheets/new-new-home.scss index 17c7fed7..5fa91e81 100644 --- a/app/assets/stylesheets/new-new-home.scss +++ b/app/assets/stylesheets/new-new-home.scss @@ -1,5 +1,4 @@ -@import "base"; -@import "compass/css3/"; +@import "base", "compass/css3","protips-grid"; .by-tags-list { > li { width: 18.5%; @@ -217,9 +216,6 @@ } .blur-screen { background: image-url("blur-test.jpg") no-repeat center center; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; background-size: cover; position: fixed; height: 100%; @@ -247,56 +243,71 @@ } } } -.team-box { - background: #fff; - color: #333; - display: block; - margin-bottom: 13%; - &:hover { - color: $light-blue; - } - .image-top { - position: relative; - img { - width: 100%; - } - } - .content { - padding: 0 8% 8% 8%; + +.featured-team { + .team-box { background: #fff; - z-index: 100; - .avatar { + color: #333; + display: block; + margin-bottom: 13%; + &:hover { + color: $light-blue; + } + .image-top { position: relative; - z-index: 100; - display: block; - margin-top: -24px; - margin-bottom: 1em; - width: 40px; - height: 40px; - @include border-radius(50%); - overflow: hidden; - background: #f7f7f7; img { - max-width: 100%; + width: 100%; } } - a { - text-decoration: none; - color: black; - &::selection { + .content { + padding: 0 8% 8% 8%; + background: #fff; + z-index: 100; + .avatar { + position: relative; + z-index: 100; + display: block; + margin-top: -24px; + margin-bottom: 1em; + width: 40px; + height: 40px; + @include border-radius(50%); + overflow: hidden; + background: #f7f7f7; + img { + max-width: 100%; + } + } + a { + text-decoration: none; color: black; + &::selection { + color: black; + } + } + h4 { + text-transform: capitalize; + margin-bottom: 0.5em; + } + p { + font-size: 1.4em; + line-height: 1.6em; } } - h4 { - text-transform: capitalize; - margin-bottom: 0.5em; - } - p { - font-size: 1.4em; - line-height: 1.6em; - } } } + +/* Override styles for featured team image if we're not using default image */ + +.featured-team.custom-image { + .image-top { + padding: 8px; + } + .content .avatar { + margin-top: 1em; + } +} + .tip-sidebar { width: 30%; float: right; @@ -379,8 +390,8 @@ } .follow { position: absolute; - top: 0px; - right: 0px; + top: 0; + right: 0; width: 49%; height: 40px; line-height: 40px; @@ -492,21 +503,6 @@ } } } - .queue { - &:before { - content: "l"; - } - &:after { - content: "Queue for Hackernews"; - } - background-position: 0px -14px; - &.queued { - &:after { - content: "Queued for Hackernews"; - } - color: #e68b42 !important; - } - } .reviewed { color: #fff; &:before { @@ -553,9 +549,6 @@ .home-top { height: 560px; background: #000 image-url("home-top-bg.jpg") no-repeat center center fixed; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; background-size: cover; .inside-home-top { margin: 0 auto; @@ -565,6 +558,7 @@ padding-top: 15%; width: 44%; float: left; + padding-left: 8%; h1 { font-size: 3.2em; line-height: 1.6em; @@ -713,7 +707,7 @@ content: " "; width: 98%; margin: 1%; - height: 0px; + height: 0; display: block; border-bottom: solid 2px rgba(0, 0, 0, 0.05); } @@ -733,8 +727,8 @@ } .follow { position: absolute; - top: 0px; - right: 0px; + top: 0; + right: 0; width: 45%; height: 40px; line-height: 40px; @@ -766,8 +760,7 @@ .filter-bar { height: 85px; background: #fff; - -webkit-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05); - box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05); .inside { max-width: 1180px; margin: 0 auto; @@ -920,8 +913,7 @@ height: 35px; @include border-radius(4px); @include transition-all; - -webkit-box-shadow: inset 0px 1px 1px 1px rgba(0, 0, 0, 0.2); - box-shadow: inset 0px 1px 1px 1px rgba(0, 0, 0, 0.2); + box-shadow: inset 0 1px 1px 1px rgba(0, 0, 0, 0.2); } } .search-bar { @@ -957,361 +949,7 @@ font-size: 1.6em; } } -.protips-grid { - &.connections-list { - > li { - height: 40px; - &.plus-more { - background: #3b3b3b; - a { - display: block; - text-align: center; - color: #afafaf; - font-size: 1.4em; - line-height: 40px; - &:hover { - color: #fff; - } - } - } - } - } - &.new-networks-list { - > li { - width: 18.5%; - padding: 1% 2% 1% 1.5%; - height: auto; - border-left: solid 1.2em #d2c5a5; - @include border-radius(4px); - .new-network { - font-size: 1.3em; - color: $dark-grey; - display: block; - text-transform: uppercase; - @include ellipsis; - &:hover { - color: $light-blue; - } - } - &.plus-more { - background: #3b3b3b; - width: 19.4%; - border: 0; - a { - display: block; - text-align: center; - color: #afafaf; - font-size: 1.4em; - &:hover { - color: #fff; - } - } - } - } - } - > li { - position: relative; - width: 19%; - padding: 2%; - margin: 1%; - height: 255px; - float: left; - background: #fff; - -webkit-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05); - box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.05); - .unfollow { - position: absolute; - top: 2px; - right: 2px; - width: 20px; - height: 20px; - line-height: 20px; - text-align: center; - color: #999897; - display: block; - &:hover { - background: $red; - color: #fff; - } - &:before { - @include icon-font; - font-size: 8px; - content: "x"; - } - } - .hiring-ribbon { - @include hiring-ribbon; - } - &.two-cols { - position: relative; - width: 44%; - .tip-image { - z-index: 0; - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 206px; - background: #000; - overflow: hidden; - img { - width: 100%; - height: 100%; - opacity: 0.5; - } - } - header { - z-index: 100; - position: relative; - .avatar, .badge-img { - position: absolute; - top: 0px; - right: 0px; - width: 53px; - height: 53px; - @include border-radius(53px); - overflow: hidden; - img { - width: 100%; - } - } - p { - color: #fff; - font-size: 1.6em; - float: left; - &:before { - @include icon-font; - color: #fff; - margin-right: 10px; - } - &.job { - &:before { - content: "b"; - font-size: 18px; - } - } - &.mayor { - &:before { - content: "4"; - font-size: 18px; - } - } - &.badge { - &:before { - content: "5"; - font-size: 18px; - } - } - } - .feature-jobs { - color: #fff; - float: right; - font-size: 1.1em; - background: rgba(255, 255, 255, 0.3); - text-transform: uppercase; - padding: 0.6em 0.9em 0.4em 0.9em; - letter-spacing: 0.2em; - @include border-radius(4px); - &:hover { - background: rgba(255, 255, 255, 0.6); - } - } - } - .content { - position: relative; - z-index: 100; - height: 160px; - .job-title { - font-size: 2.4em; - display: block; - margin-bottom: 0.5em; - color: #fff; - @include ellipsis; - &:hover { - opacity: 0.5; - } - } - .job-exrp { - font-size: 1.3em; - line-height: 1.8em; - color: #fff; - height: 50px; - overflow: hidden; - } - h3 { - width: 60%; - font-size: 2.4em; - line-height: 1.4em; - color: #fff; - font-family: "MuseoSans-300"; - } - } - } - &.job { - .author { - li { - margin-top: 1em; - } - } - } - header { - height: 50px; - .delete-tip { - position: absolute; - top: -15px; - right: 0px; - background: #c7333a image-url("protips/delete-cross.png") no-repeat center; - border: solid 3px #fff; - width: 22px; - height: 22px; - @include border-radius(100px); - &:hover { - opacity: 0.8; - } - span { - display: none; - } - } - span { - font-size: 1.3em; - color: #b1b4b4; - margin-right: 0.4em; - &:before { - @include icon-font; - margin-right: 5px; - } - &.upvoted { - color: $light-blue; - } - &.upvotes { - &:before { - content: "u"; - font-size: 19px; - } - } - &.comments { - &:before { - @include icon-font; - content: "7"; - font-size: 19px; - } - } - &.views { - &:before { - content: "6"; - font-size: 19px; - } - } - &.hawt { - color: #f35e39; - &:before { - content: "2"; - font-size: 19px; - } - } - } - } - .title { - font-size: 1.8em; - line-height: 1.8em; - color: $dark-grey; - font-family: "MuseoSans-500"; - display: block; - height: 130px; - margin-bottom: 30px; - overflow: hidden; - &:hover { - color: $light-blue; - } - } - footer { - .admin { - position: absolute; - top: 5px; - left: 10px; - p { - font-size: 1em; - color: #acacac; - } - } - .job { - z-index: 0; - background: #5bb156; - width: 31px; - height: 28px; - padding-top: 20px; - display: block; - position: absolute; - bottom: 0px; - right: 25px; - text-align: center; - &:before { - @include icon-font; - content: "b"; - color: #fff; - font-size: 14px; - } - &:hover { - background: #4c9748; - } - } - } - .author { - float: left; - width: 60%; - li { - font-size: 1.4em; - margin-bottom: 0.4em; - @include ellipsis; - a:hover { - color: $light-blue; - } - } - .user { - color: $dark-grey; - a { - color: $dark-grey; - } - } - .team { - color: #a6a5a5; - a { - color: #a6a5a5; - } - } - } - .avatars { - float: right; - li { - display: inline-block; - vertical-align: top; - position: relative; - a { - display: block; - width: 35px; - height: 35px; - @include border-radius(35px); - overflow: hidden; - img { - width: 100%; - } - } - } - .user { - z-index: 2; - } - .team { - z-index: 1; - margin-left: -15px; - background: #f7f7f7; - @include border-radius(35px); - &:hover { - z-index: 2; - } - } - } - } -} + @media screen and (max-width: 1024px) { .users-top { min-height: 480px; @@ -1322,8 +960,7 @@ } @media screen and (max-width: 768px) { .users-top { - .min-height: - 180px; + min-height:180px; .mainline { font-size: 4em; } @@ -1334,7 +971,7 @@ width: 40%; h2 { font-size: 2.4em; - padding-top: 0%; + padding-top: 0; &:before { content: " "; width: 100px; @@ -1375,15 +1012,12 @@ .join-panel { text-align: center; float: none; - .sign-btns { - } } } } @media screen and (max-width: 600px) { .users-top { - .height: - 350px; + height: 350px; .mainline { font-size: 2.3em; width: 90%; @@ -1404,7 +1038,7 @@ .sign-btns { overflow: auto; li { - margin-left: 0em; + margin-left: 0; margin-bottom: 1em; display: block; width: 100%; @@ -1455,7 +1089,7 @@ .sign-btns { overflow: auto; li { - margin-left: 0em; + margin-left: 0; margin-bottom: 1em; display: block; width: 100%; diff --git a/app/assets/stylesheets/oli.scss b/app/assets/stylesheets/oli.scss index 7b5cb85a..fb3e2cc7 100644 --- a/app/assets/stylesheets/oli.scss +++ b/app/assets/stylesheets/oli.scss @@ -4,30 +4,17 @@ $transition-speed: all 0.2s ease-out; //Mixins @mixin border-radius($radius) { - -webkit-border-radius: $radius; - -moz-border-radius: $radius; border-radius: $radius; } @mixin transition-all { - -webkit-transition: $transition-speed; - -moz-transition: $transition-speed; - -ms-transition: $transition-speed; - -o-transition: $transition-speed; transition: $transition-speed; } @mixin share-button { background: #dbe7f5; /* Old browsers */ - background: -moz-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dbe7f5), color-stop(3%, #f0f5fb), color-stop(4%, #dae6f6), color-stop(10%, #d8e4f2), color-stop(23%, #d5e1ef), color-stop(52%, #c8d4e2), color-stop(87%, #afc1d5), color-stop(100%, #a8bcd4)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* IE10+ */ background: linear-gradient(top, #dbe7f5 0%, #f0f5fb 3%, #dae6f6 4%, #d8e4f2 10%, #d5e1ef 23%, #c8d4e2 52%, #afc1d5 87%, #a8bcd4 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dbe7f5', endColorstr='#a8bcd4', GradientType=0); /* IE6-9 */ - -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.5); - -moz-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.5); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.5); display: block; height: 33px; @@ -42,29 +29,15 @@ $transition-speed: all 0.2s ease-out; @mixin tab-button-up { background: #6080b3; /* Old browsers */ - background: -moz-linear-gradient(top, #6080b3 0%, #375583 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #6080b3), color-stop(100%, #375583)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #6080b3 0%, #375583 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #6080b3 0%, #375583 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #6080b3 0%, #375583 100%); /* IE10+ */ background: linear-gradient(top, #6080b3 0%, #375583 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#6080b3', endColorstr='#375583', GradientType=0); /* IE6-9 */ - -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.2); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.2); } @mixin tab-button-down { background: #1e2e49; /* Old browsers */ - background: -moz-linear-gradient(top, #1e2e49 0%, #2b4164 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #1e2e49), color-stop(100%, #2b4164)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #1e2e49 0%, #2b4164 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #1e2e49 0%, #2b4164 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #1e2e49 0%, #2b4164 100%); /* IE10+ */ background: linear-gradient(top, #1e2e49 0%, #2b4164 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1e2e49', endColorstr='#2b4164', GradientType=0); /* IE6-9 */ - -webkit-box-shadow: inset 0px 1px 1px 1px rgba(0, 0, 0, 0.4); - -moz-box-shadow: inset 0px 1px 1px 1px rgba(0, 0, 0, 0.4); box-shadow: inset 0px 1px 1px 1px rgba(0, 0, 0, 0.4); } @@ -84,8 +57,6 @@ $transition-speed: all 0.2s ease-out; } @mixin box-shadow { - -webkit-box-shadow: 0px 5px 5px 5px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0px 5px 5px 5px rgba(0, 0, 0, 0.1); box-shadow: 0px 5px 5px 5px rgba(0, 0, 0, 0.1); } @@ -572,19 +543,4 @@ div.ratio-left { right: 0; } -} - - - - - - - - - - - - - - - +} \ No newline at end of file diff --git a/app/assets/stylesheets/premium-team-admin.scss b/app/assets/stylesheets/premium-team-admin.scss index eefcf1d7..97590b01 100644 --- a/app/assets/stylesheets/premium-team-admin.scss +++ b/app/assets/stylesheets/premium-team-admin.scss @@ -1,10 +1,8 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; .form * { text-rendering: optimizeLegibility; - -webkit-font-smoothing: subpixel-antialiased; - -moz-font-smoothing: subpixel-antialiased; font-smoothing: subpixel-antialiased; } @@ -30,7 +28,6 @@ fieldset { padding: 40px 60px; background: image-url("premium-teams/paper-texture.jpg") repeat; @include border-radius(6px); - -webkit-box-shadow: 0px 0px 18px 8px rgba(0, 0, 0, 0.5); box-shadow: 0px 0px 18px 8px rgba(0, 0, 0, 0.5); footer { @@ -182,14 +179,9 @@ a.launch-editor { font-size: 1.3em; line-height: 36px; padding-left: 35px; - -webkit-border-top-left-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-topleft: 4px; - -moz-border-radius-bottomleft: 4px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1); - -webkit-box-shadow: inset 0px 1px 1px 1px rgba(255, 255, 255, 0.2); box-shadow: inset 0px 1px 1px 1px rgba(255, 255, 255, 0.2); border-top: solid 1px rgba(0, 0, 0, 0.018); } @@ -288,7 +280,6 @@ a.launch-editor { img { width: 450px; border: 5px solid #fff; - -webkit-box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); margin-bottom: 10px; } @@ -306,7 +297,6 @@ a.launch-editor { position: relative; background: #eee; border: 5px solid #fff; - -webkit-box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); &:nth-child(3n+1) { @@ -359,7 +349,6 @@ a.launch-editor { width: 100px; background: #eee; border: 5px solid #fff; - -webkit-box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); box-shadow: 0px 0px 5px 4px rgba(0, 0, 0, 0.1); } @@ -469,22 +458,48 @@ a.launch-editor { } #new_opportunity, .edit_opportunity { - width: 510px; + width: 710px; margin: 0 auto; - padding: 40px 60px; + padding: 30px; background: image-url("premium-teams/paper-texture.jpg") repeat; @include border-radius(6px); + fieldset { + margin-bottom: 20px; + } + + .horizontal { + overflow: auto; + + .job-title { + float: left; + width: 450px; + + input[type=text] { + width: 450px; + } + } + + .job-type { + float: right; + width: 200px; + + select { + width: 185px; + } + } + } + .errors { - background: $red; + background: #f2dede; + border: 1px solid #ebccd1; padding: 10px; @include border-radius(6px); - color: #fff; - margin-bottom: 10px; + color: #a94442; + margin-bottom: 30px; - li { - font-size: 1.2em; - } + h4 { font-size: 2em; text-transform: none; color: $red; margin-bottom: .5em;} + li { font-size: 1.4em; color: $red; line-height: 1.5em; } } label { @@ -492,7 +507,7 @@ a.launch-editor { color: $dark-grey; margin-bottom: 10px; display: block; - font-family: "MuseoSans-500"; + font-family: "MuseoSans-700"; a { color: $light-blue; @@ -545,6 +560,14 @@ a.launch-editor { margin-bottom: 15px; } + textarea { + width: 680px; + } + + textarea#opportunity_description { + height: 300px; + } + select { font-family: "MuseoSans-500"; font-size: 1.4em; @@ -729,7 +752,6 @@ a.launch-editor { float: right; width: 44px; border: solid 3px #fff; - -webkit-box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.07); box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.07); } } @@ -789,4 +811,4 @@ a.launch-editor { background-color: rgba(0, 0, 0, 0.8); height: 100%; width: 100%; -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/premium-teams.css.scss b/app/assets/stylesheets/premium-teams.css.scss new file mode 100644 index 00000000..df1c511b --- /dev/null +++ b/app/assets/stylesheets/premium-teams.css.scss @@ -0,0 +1,2671 @@ +@import "base"; +@import "compass/css3"; + +$branding: #555; + +.reduced-header { + /* This is used when a member views an enhanced team profile*/ + margin-top: -35px; +} + +// This is the style for making the job box stick to the top of the page +body#signed-out { + .inside-main-content { + padding: 28px 0 50px 0; + width: 960px; + } +} + +.incomplete-alert { + background: #db5750 image-url("triangle-white.png") no-repeat 20px center; + color: #fff; + margin: -35px 0 20px 0; + padding: 20px 20px 20px 60px; + @include border-radius(4px); + + p { + font-size: 1.4em; + } +} + +.jobs-top { + background: image-url("team/struts.png") no-repeat top center; + padding-top: 40px; + margin-top: -30px; + margin-bottom: 10px; + + .learn-more-about { + height: 23px; + padding: 35px 0; + background: image-url("team/middle-dots.png") no-repeat top center; + + p { + font-size: 1.3em; + letter-spacing: 0.1em; + text-align: center; + text-transform: uppercase; + font-family: "MuseoSans-500"; + color: $mid-blue-grey; + } + } + + //learn-more + .job-panel { + background: #fff; + @include border-radius(6px); + //overflow: hidden; + width: 840px; + margin: 0 auto 15px auto; + position: relative; + + .job-details { + float: left; + width:520px; + padding: 30px 0 0 30px; + } + + .job-sidebar { + float: right; + width: 220px; + padding: 30px 30px 0 0; + + .section { + margin-bottom: 4em; + overflow: auto; + } + + h4 { + margin-bottom: .5em; + font-size: 1.6em; + text-transform: uppercase; + } + + .apply { + &:after { content: "Apply";} + &.hide-application { + background: #9b9b9b; + &:after { content: "Hide Application"; } + } + } + + .apply, .learn-more { + margin: 0 auto 15px auto; + background: $light-blue; + display: block; + padding: 8px; + color: #fff; + text-transform: uppercase; + font-size: 1.6em; + line-height: 1.5em; + letter-spacing: 0.15em; + text-align: center; + @include border-radius(4px); + + &:hover { background: $green; } + } + + .skills { + overflow: auto; + } + .skills li { + float: left; + background: #e2e2e2; + @include border-radius(4px); + font-size: 1.2em; + margin: 0 5px 5px 0; + padding: 6px 12px; + } + + .job-locations { + clear: both; + + .locations li { + color: $mid-blue-grey; + float: left; + text-transform: uppercase; + font: 1.4em "MuseoSans-700"; + margin-right: 10px; + margin-bottom: 15px; + background: image-url("team/pin.png") no-repeat left; + line-height: 19px; + padding-left: 20px; + } + } + } + + .job-panel-header { + @include paper-panel; + padding: 20px 30px; + border-bottom: solid 1px #eaeaea; + + .job-title { + font-size: 2.4em; + @include ellipsis; + width: 650px; + color: $light-blue; + } + + .job-type { + position: absolute; + top: 30px; + right: 30px; + font-size: 1.3em; + text-transform: uppercase; + } + } + //job-panel-header + + .apply-section { + background: #eaeaea; + padding: 15px; + margin-bottom: 10px; + .status { + margin-bottom: 10px; + font-size: 12px; + text-align: center; + } + //status + + .btn { + padding: 8px 20px; + display: block; + background: $light-blue; + @include border-radius(4px); + color: #fff; + text-align: center; + text-transform: uppercase; + font-family: "MuseoSans-500"; + font-size: 1.2em; + letter-spacing: 0.2em; + + &.upload { + margin-right: 15px; + background: transparent; + padding: 4px; + color: #333; + letter-spacing: 0; + } + + &:hover { + opacity: 0.5; + } + } + //btn + + .send-application.disabled { + display: none; + } + + .send-application { + margin-top: 10px; + &:after { + content: "Send" + } + + &.applied { + &:after { + content: "Already sent" + } + } + } + } + //apply-section + + .content { + + .job-opportunities { + padding-bottom: 10px; + margin-bottom: 50px; + + h3 { + display: block; + background: image-url("team/case.png") no-repeat 0 10%; + line-height: 21px; + height: 17px; + padding-left: 25px; + font-family: "MuseoSans-700"; + font-size: 1.4em; + text-transform: uppercase; + color: #5d5d5d; + margin-bottom: 10px; + border-bottom: 1px solid #eee; + padding-bottom: .5em; + } + + li { + float: left; + font-size: 1.4em; + margin: 0 15px 5px 0; + padding-left: 26px; + background: image-url("team/bullet.jpg") no-repeat 10px 40%; + + a { + color: #5d5d5d; + text-decoration: underline; + &:hover { + color: $light-blue; + text-decoration: none; + } + } + } + } + } + //content + + .job-panel-footer { + border-top: solid 1px #eaeaea; + padding: 20px 30px; + clear: both; + + .other-jobs { + text-align: center; + font-size: 1.3em; + margin: 0 auto; + display: block; + color: $light-blue; + text-decoration: underline; + } + + .btn { + background: #ffffff; /* Old browsers */ + background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%); /* W3C */ + border: solid 1px #e6e6e6; + display: block; + font-size: 1.4em; + width: 280px; + padding: 8px 8px; + @include border-radius(4px); + color: $dark-grey; + + &:hover { + color: $light-blue; + //opacity: 0.5; + } + + .arrow { + content: " "; + display: block; + background: image-url("team/job-arrows.png") no-repeat bottom; + width: 10px; + height: 16px; + } + + .link { + width: 250px; + @include ellipsis; + } + + &.prev { + float: left; + .link { + float: right; + } + .arrow { + float: left; + } + } + + &.next { + float: right; + .arrow { + background-position: top; + float: right; + } + .link { + float: left; + } + } + + } + //btn + } + //job-panel-footer + } + //job-panel + +} + +// job-description markdown styles +.job-description { + margin-bottom: 30px; + + > p:first-child { + margin-top: 0; + } + + a { + text-decoration: underline; + color: $light-blue; + &:hover { + text-decoration: none; + } + } + + h2, h3,h4,h5,h6,p,ol,ul {margin-bottom: .75em; margin-top: 25px;} + h2 {margin-bottom: 1em; font-size: 2.2em;} + h5 {font-size: 1.6em;} + p {line-height: 1.4em; margin-top: 1.25em;} + + ol, ul { + padding: 0 1em; + margin: 0 1em 1em 1em; + font-size: 14px; + + p { font-size: inherit; } + } + ol { list-style: decimal;} + ul { list-style: disc;} + li { margin-bottom: .4em;} + + p > code { + @include border-radius(3px); + background: #eee; border: 1px solid #ddd; + padding: .1em .5em; + } + + pre { + font-size: 14px; + background: #eee; border: 1px solid #ddd; + @include border-radius(3px); + padding: 12px; + margin-bottom: 2em; + } + + blockquote { + background: #f9f9f9; + border-left: 6px solid #ccc; + margin: 2em 0; + padding: 1.5em; + quotes: "\201C""\201D""\2018""\2019"; + + p { + display: inline; + font-style: italic; + } + } +} +// End job-description markdown styles + +.requested-members { + margin-bottom: 30px; + + h3 { + color: $mid-blue-grey; + @include ts-bottom-white; + font-size: 1.6em; + margin-bottom: 15px; + } +} + +.requested-members-list { + li { + padding: 10px; + @include border-radius(6px); + background: $light-blue-grey; + float: left; + border: solid #99b1c3 1px; + margin-left: 15px; + margin-bottom: 15px; + //width: 288px; + + &:nth-child(3n+1) { + margin-left: 0; + } + } + + .member { + color: #fff; + font-size: 1.5em; + display: inline-block; + //float: left; + vertical-align: middle; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); + margin-right: 15px; + height: 30px; + line-height: 30px; + width: 165px; + @include ellipsis; + + &:hover { + opacity: 0.5; + } + + img { + width: 30px; + height: 30px; + @include border-radius(8px); + border: solid 1px #99b1c3; + //display: inline-block; + vertical-align: middle; + margin-right: 10px; + } + } + + .action { + padding: 8px; + @include border-radius(4px); + color: #fff; + font-size: 1em; + display: inline-block; + text-transform: uppercase; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); + + &:hover { + opacity: 0.5; + } + } + + .accept { + background: $green; + margin-right: 5px; + } + + .deny { + background: $red; + } +} + +.admin-bar { + background: #fff; + @include border-radius-bottom(6px); + border: solid 1px #d9d9d9; + border-top: 0; + margin-top: -70px; + margin-bottom: 30px; + + .rank { + float: left; + padding: 25px 20px 20px 20px; + + a { + color: #a1a1a1; + font-size: 1.4em; + display: block; + font-family: "MuseoSans-500"; + &:hover { + color: $light-blue; + } + + span { + font-size: 1.4em; + } + } + } + + .alert { + float: left; + border-left: solid 1px #ececec; + padding: 28px 20px 20px 20px; + color: #db5750; + /*background: image-url("triangle-red.png") no-repeat 23px 20px;*/ + width: 440px; + min-height: 24px; + + p { + line-height: 20px; + } + } + + .actions { + float: right; + padding: 20px; + border-left: solid 1px #ececec; + min-height: 32px; + + a { + display: inline-block; + font-family: "MuseoSans-500"; + font-size: 1.3em; + @include border-radius(4px); + //width: 75px; + padding: 0 12px; + height: 30px; + line-height: 30px; + text-align: center; + color: #757575; + + &:hover { + opacity: 0.5; + } + + &.disable { + opacity: 0.5; + } + } + + .edit { + background: #ffffff; /* Old browsers */ + background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); /* IE6-9 */ + + border: solid 1px #e6e6e6; + margin-right: 10px; + } + + .add-job { + background: $light-blue; + color: #fff; + border: solid 1px #3880b9; + } + + .done { + background: #79c839; + color: #fff; + border: solid 1px #6cb72f; + margin-right: 10px; + + } + + } +} + +.join-us-banner { + background: image-url("premium-teams/banner-dots.png") 0px 8px repeat-x, image-url("premium-teams/banner-dots.png") 0px 50px repeat-x, #343131; + padding-top: 18px; + height: 40px; + width: 1000px; + margin-left: -20px; + position: relative; + color: #fff; + + &:before { + content: " "; + width: 0; + height: 0; + border-top: 20px solid #000; + border-left: 20px solid transparent; + bottom: -20px; + left: 0px; + position: absolute; + } + + &:after { + content: " "; + width: 0; + height: 0; + border-top: 20px solid #000; + border-right: 20px solid transparent; + bottom: -20px; + right: 0px; + position: absolute; + } + + p { + margin-left: 90px; + padding-left: 35px; + font-size: 1.4em; + /*width: 350px;*/ + margin: 0 auto; + text-align: center; + text-transform: uppercase; + letter-spacing: 0.2em; + } + + span { + background: image-url("white-case.png") no-repeat top; + width: 16px; + height: 13px; + margin-right: 10px; + display: inline-block; + } + + .view-jobs { + background: #000; + color: #fff; + @include border-radius(4px); + display: inline-block; + padding: 6px 12px; + margin-left: 15px; + font-size: 0.8em; + + &:hover { + opacity: 0.5; + } + } +} + +#prem-team { + .inside-main-content { + padding: 70px 0px; + width: 960px; + } +} + +.page { + background: #fff; + + section { + position: relative; + } +} + +.page-footer { + height: 20px; + padding: 20px 70px; + border-top: 1px solid #eaeaea; + + .watermark { + font-size: 2em; + text-align: right; + color: #c6c6c6; + } +} + +.legend { + position: fixed; + top: 140px; + right: 0px; + z-index: 200; + @include transition-all; + + li { + margin-bottom: 10px; + background: rgba(133, 167, 194, 0.8); + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + box-shadow: inset 0px 1px 1px 1px rgba(255, 255, 255, 0.2); + border-top: solid 1px rgba(0, 0, 0, 0.018); + + &:hover { + background: rgba(133, 167, 194, 1); + } + + a { + display: block; + color: #fff; + font-size: 1.3em; + width: 100px; + padding: 8px 6px 8px 36px; + text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1); + } + + // .join-us { + // background: $branding image-url("premium-teams/cog.png") no-repeat 10px 10px; + // } + } + + .open-opportunities { + a { + background: image-url("premium-teams/lil-case.png") no-repeat 10px 7px; + } + } + + .team-visitors { + a { + background: image-url("premium-teams/visitors.png") no-repeat 10px 7px; + } + } +} + +@media screen and (max-width: 1240px) { + + .legend { + right: -108px; + + &:hover { + right: 0px; + } + } + +} + +//team header +.team-header { + background: $branding image-url("premium-teams/pattern.png") repeat; + height: 105px; + padding: 35px 70px 0 70px; + + .team-logo { + float: left; + padding-top: 30px; + margin-top: -35px; + width: 88px; + height: 80px; + background: #fff; + box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.1); + + img { + display: block; + @include border-radius(6px); + width: 65px; + height: 65px; + margin: 0 auto; + } + } + + h1 { + color: #fff; + font-size: 3em; + float: left; + padding-left: 40px; + width: 480px; + @include ellipsis; + } + + .follow-team { + &:after { + content: "Follow"; + } + + &:hover:after { + content: "Start following"; + } + + &.following:after { + content: "Following"; + } + + &.following:hover:after { + content: "Stop following"; + } + + color: #fff; + font-size: 1.4em; + text-transform: uppercase; + float: right; + display: block; + background: rgba(0, 0, 0, 0.2); + @include border-radius(4px); + width: 180px; + height: 45px; + line-height: 45px; + text-align: center; + font-family: "MuseoSans-500"; + margin-top: 10px; + + &:hover { + background: rgba(0, 0, 0, 0.4); + } + } + + .connections { + float: left; + padding-left: 40px; + padding-top: 10px; + + li { + margin-right: 10px; + float: left; + } + + a { + display: block; + height: 29px; + width: 29px; + font-size: 0; + text-indent: -9999px; + overflow: hidden; + background: rgba(0, 0, 0, 0.2) image-url("team/team-links.png") no-repeat top left; + @include border-radius(4px); + } + + .url { + background-position: 0px 0px; + } + + .twitter { + background-position: -28px 0px; + } + + .facebook { + background-position: -58px 0px; + } + + .github { + background-position: -88px 0px; + } + } + //connections + +} + +//team header + +//team details +#team-details { + position: relative; + padding: 40px 70px 0 70px; + margin-bottom: 40px; + + .edit-connections { + img { + display: block; + } + + input[type=file] { + padding: 10px; + } + } + .switch-section { + //min-height: 136px; + padding-bottom: 10px; + //width: 560px; + //float: right; + border-bottom: solid 5px #e5e5e5; + + p { + font-size: 1.7em; + line-height: 24px; + color: $branding; + } + } + + // .connections { + // float: left; + // width: 210px; + // + // li { + // margin-bottom: 10px; + // border-bottom: solid 1px #e5e5e5; + // } + // + // a { + // display: block; + // height: 19px; + // font-size: 1.3em; + // color: $dark-grey; + // font-family: "MuseoSans-500"; + // margin-bottom: 10px; + // padding-left: 40px; + // background: image-url("premium-teams/icons.png") no-repeat top left; + // } + // + // .url { + // background-position: 0px -57px; + // } + // + // .twitter { + // background-position: 0px 0px; + // } + // + // .facebook { + // background-position: 0px -19px; + // } + // + // .github { + // background-position: 0px -38px; + // } + // }//connections +} + +//team members +#members { + padding: 0px 32px 0px 70px; + margin-bottom: 30px; + position: relative; + + .arrow { + display: block; + height: 21px; + width: 21px; + background: image-url("premium-teams/arrows.png") no-repeat bottom; + position: absolute; + opacity: 0.5; + @include transition-all; + + &:hover { + opacity: 1; + } + + span { + display: none; + } + } + + .left { + left: 25px; + top: 50px; + background-position: top; + } + + .right { + right: 25px; + top: 50px; + } + + .disable { + display: none; + } +} + +.members-list { + //width: 100px; + //overflow: hidden; + + > li { + float: left; + width: 105px; + margin-right: 37px; + position: relative; + + &:hover { + img { + border-color: #363639; + } + } + + .active { + img { + border-color: #363639; + opacity: 1; + } + + &:before { + width: 0; + height: 0; + border-left: 12px solid transparent; + border-right: 12px solid transparent; + border-bottom: 12px solid $dark-grey; + content: " "; + position: absolute; + bottom: -30px; + left: 35px; + } + } + + img { + opacity: 0.5; + width: 95px; + height: 95px; + border: solid 7px #fff; + box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); + margin-bottom: 10px; + @include border-radius(4px); + } + + ul { + height: 49px; + li { + font-size: 1.2em; + text-align: center; + color: $dark-grey; + margin-bottom: 3px; + font-family: "MuseoSans-500"; + + &:last-child { + margin: 0; + } + } + } + } +} + +//less than 6 members +.tabbed { + padding: 0 !important; + margin: 0 !important; + + .members-list { + background: rgb(16, 16, 16); /* Old browsers */ + background: linear-gradient(to right, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#101010', endColorstr='#1f1f21', GradientType=1); /* IE6-9 */ + + > li { + height: auto; + width: auto; + margin: 0; + padding: 0; + + a { + display: block; + background: #363639; + margin: 0; + width: 154px; + height: 37px; + padding: 10px 0 0 12px; + line-height: 30px; + + background: rgb(16, 16, 16); /* Old browsers */ + background: linear-gradient(to right, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#101010', endColorstr='#1f1f21', GradientType=1); /* IE6-9 */ + } + + &:first-child { + a { + padding-left: 70px; + } + } + + .active { + background: #363639 !important; + + &:before { + display: none; + } + } + + img { + width: 23px; + height: 23px; + border: 2px solid #eee; + float: left; + margin-right: 15px; + } + + ul { + height: auto; + float: left; + + li { + color: #fff; + width: 100px; + @include ellipsis; + text-align: left; + + &:nth-child(2) { + display: none; + } + } + } + } + } +} + +.size-5 { + .members-list { + > li { + &:last-child { + a { + width: 226px !important; + } + } + } + } +} + +.size-1 { + display: none; +} + +//about members +.about-members { + background: #363639; + min-height: 313px; + + .member-details { + float: left; + width: 332px; + padding: 40px 70px; + color: #fff; + + h3 { + font-size: 1.6em; + font-family: "MuseoSans-500"; + margin-bottom: 5px; + } + + h4 { + font-size: 1.3em; + letter-spacing: 0.1em; + margin-bottom: 5px; + } + + p { + font-size: 1.5em; + line-height: 22px; + margin-bottom: 20px; + + &:last-child { + margin-bottom: 0; + } + } + + .about-text { + border-bottom: 5px solid #2b2b2e; + padding-bottom: 10px; + } + } + + .member-pic { + float: right; + width: 488px; + height: 313px; + //max-height: 350px; + overflow: hidden; + position: relative; + + img { + //position: absolute; + width: 100%; + //z-index: 0; + } + + .member-box { + position: absolute; + z-index: 100; + background: $branding; + top: 20px; + right: 0px; + width: 326px; + color: #fff; + + .member-basics { + padding: 20px 70px 20px 40px; + + h3 { + font-family: "MuseoSans-300"; + font-size: 1.6em; + margin-bottom: 3px; + } + + h4 { + font-size: 1.6em; + font-family: "MuseoSans-500"; + text-transform: capitalize; + margin-bottom: 3px; + } + + .view-profile { + display: block; + height: 19px; + line-height: 19px; + padding-left: 26px; + font-size: 1.3em; + color: #fff; + background: image-url("premium-teams/preview-icon.png") no-repeat left; + } + } + + .member-stats { + padding: 20px 70px 20px 40px; + background: rgba(0, 0, 0, 0.1); + + ul { + li { + display: block; + //width: 208px; + overflow: auto; + margin-bottom: 5px; + p { + float: left; + width: 160px; + } + span { + float: right; + font-size: 1.6em; + } + } + } + } + } + } +} + +//member details + +.single-member { + .member-details { + h3 { + @include ellipsis; + font-size: 1.8em; + padding-top: 6px; + margin: 0; + } + + .avatar { + float: left; + margin-right: 20px; + margin-bottom: 20px; + img { + width: 29px; + height: 29px; + border: solid 2px #fff; + @include border-radius(4px); + } + } + //avatar + + .about-text { + clear: both; + border-top: 5px solid #2b2b2e; + padding-top: 10px; + margin-top: 10px; + } + //about-text + + .view-profile { + display: block; + height: 19px; + line-height: 19px; + padding-left: 26px; + font-size: 1.3em; + color: #fff; + background: image-url("premium-teams/preview-icon.png") no-repeat left; + } + //view-profile + + } + //member-details + + .member-pic { + + } + //member-pic +} + +#big-headline { + background: $branding image-url("premium-teams/pattern.png") repeat; + padding: 50px 70px; + + .headline { + color: #fff; + font-family: "MuseoSans-100"; + font-size: 2.4em; + line-height: 34px; + text-align: center; + } +} + +//big headline + +#big-quote { + + + height: 460px; + + //opacity: 0.1; + + // &:before { + // background: rgba(255, 255, 255, 0.8); + // content: " "; + // display: block; + // width: 100%; + // height: 100%; + // position: absolute; + // top: 0px; + // left: 0px; + // z-index: 1000; + // } + + // &:after { + // content: "Activate section"; + // display: block; + // width: 300px; + // height: 80px; + // line-height: 50px; + // background: $dark-grey; + // color: #fff; + // top: 200px; + // left: 300px; + // z-index: 1100; + // position: absolute; + // text-align: center; + // font-size: 1.4em; + // } + + .inside { + height: 460px; + overflow: hidden; + + blockquote { + position: absolute; + background: rgba(0, 0, 0, 0.8); + z-index: 100; + top: 30px; + left: 30px; + color: #fff; + width: 324px; + min-height: 324px; + @include border-radius(50%); + + p { + font-size: 1.8em; + line-height: 36px; + font-family: "MuseoSans-100"; + text-align: center; + margin-top: 10%; + padding: 35px 50px; + background: image-url("premium-teams/quote.png") no-repeat center top; + } + } + + img { + width: 100%; + //top: 0px; + //left: 0px; + //position: absolute; + //z-index: 0; + } + } + +} + +//big image + +#challenges { + padding: 30px 70px; + + .box { + &.half { + width: 310px; + } + min-height: 195px; + padding-left: 100px; + position: relative; + float: left; + background: image-url("premium-teams/big-dots.png") repeat-y 34px 0px; + + header { + height: 75px; + line-height: 75px; + + h3 { + font-size: 2.2em; + } + } + + .icon { + position: absolute; + top: 0px; + left: 0px; + width: 76px; + height: 75px; + //border: 4px solid #fff; + background: image-url("premium-teams/light-blub.png") no-repeat; + } + + .blub { + background-position: 0px -75px; + } + + p { + line-height: 22px; + } + } +} + +#favourite-benefits { + background: $branding image-url("premium-teams/pattern.png") repeat; + padding: 30px 70px 30px 0px; + color: #fff; + position: relative; + + img { + margin-top: 30px; + float: right; + } + + ol { + background: image-url("premium-teams/1-2-3.png") no-repeat top left; + float: left; + min-height: 407px; + margin-left: 70px; + + li { + width: 350px; + padding-left: 170px; + min-height: 111px; + margin-bottom: 20px; + + &:first-child { + margin-top: 20px; + } + + } + + p { + font-size: 1.4em; + line-height: 22px; + } + + h3 { + font-size: 1.6em; + margin-bottom: 5px; + } + + } +} + +#organization-style { + background: image-url("premium-teams/paper-texture.jpg") repeat; + border-right: solid 8px $branding; + //border-bottom: solid 2px #eaeaea; + box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1); + + min-height: 318px; + + //hack to get the left side to match the right sides height + //display: table; + + // .img, .text { + // display:table-cell; + // width:50%; + // min-height:100%; + // vertical-align:top; + // } + // + // .img { + // background: $dark-grey; + // //position: relative; + // + // img { + // width: 100%; + // //height: 100%; + // } + // } + // + // .text { + // padding: 64px; + // + // h3 { + // font-family: "Georgia"; + // font-style: italic; + // font-size: 2em; + // margin-bottom: 10px; + // color: $branding; + // } + // + // p { + // color: $branding; + // font-size: 1.4em; + // line-height: 22px; + // + // a { + // color: $dark-grey; + // text-decoration: underline; + // } + // } + // } + + .img { + float: left; + width: 479px; + overflow: hidden; + max-height: 321px; + //min-height: 100%; + background: $dark-grey; + + img { + width: 100%; + //height: 100%; + display: block; + } + } + + .text { + width: 340px; + height: 100%; + padding: 64px; + float: right; + display: inline-block; + + h3 { + font-family: "Georgia"; + font-style: italic; + font-size: 2em; + margin-bottom: 10px; + color: $branding; + } + + p { + color: $branding; + font-size: 1.4em; + line-height: 22px; + } + } +} + +// half img + +#office-images { + border-bottom: solid 1px #eaeaea; + + .header { + background: image-url("premium-teams/header-swirls.png") no-repeat center; + height: 120px; + + .heading { + font-size: 2.4em; + text-align: center; + line-height: 120px; + font-family: "MuseoSans-300"; + } + } + + .images { + padding: 0px 70px 30px 70px; + + li { + float: left; + width: 260px; + margin-top: 5px; + /* height: 200px;*/ + /* margin: 0 0 20px 20px;*/ + /* margin:5px;*/ + overflow: hidden; + + &:nth-child(3n+1) { + margin-left: 0; + } + + } + } +} + +// .top-positions { +// //padding-bottom: 40px; +// background: #DBE4EB image-url("blue-texture-bg.jpg") repeat; +// +// +// .application { +// background: rgba(225, 225, 225, 0.2); +// width: 430px !important; +// margin: 25px 140px !important; +// @include border-radius(6px); +// +// li { +// a { +// font-size: 0.8em !important; +// } +// } +// +// .resume { +// width: 290px !important; +// overflow: hidden; +// a { +// color: #fff; +// } +// } +// +// } +// +// +// .other-opportunities { +// color: #fff; +// text-transform: none; +// padding-top: 20px; +// margin-bottom: 10px; +// } +// +// .next-job, .previous-job { +// a { +// position: absolute; +// top: 250px; +// width: 34px; +// height: 34px; +// background: rgba(0,0,0,0.5) image-url("premium-teams/job-arrows.png") no-repeat right center; +// @include border-radius(4px); +// color: #fff; +// display: block; +// font-size: 0; +// +// &:hover { +// opacity: 0.5; +// } +// } +// } +// +// .next-job { +// a { +// right: 20px; +// } +// } +// +// .previous-job { +// a { +// left: 20px; +// background-position: left center; +// } +// } +// +// +// .other-jobs { +// overflow: auto; +// li { +// float: left; +// margin-right: 10px; +// padding: 0 !important; +// +// a { +// color: #fff; +// font-size: 1.3em; +// padding: 10px 16px; +// background: rgba(0, 0, 0, 0.6); +// display: inline-block; +// @include border-radius(4px); +// +// &:hover { +// opacity: 0.5; +// } +// } +// } +// } +// +// } + +#open-positions { + background: $branding image-url("premium-teams/pattern.png") repeat; + border-top: solid 1px #eaeaea; + + .header { + padding: 0 70px; + height: 100px; + background: #fff image-url("premium-teams/were-hiring.png") no-repeat 70px 15px; + + .heading { + line-height: 110px; + font-family: "MuseoSans-300"; + font-size: 2.1em; + padding-left: 195px; + color: $branding; + } + } + + .job-area { + padding: 30px 70px; + ul.other-jobs { + width: 100%; + li { + float: left; + padding: 5px 20px 5px 0; + + a { + color: white; + font-size: 1.2em; + } + } + } + } + + // .outside-all-jobs { + // border-top: dashed 2px rgba(0, 0, 0, 0.2); + // height: 20px; + // } + + .all-jobs { + //background: rgba(0,0,0,0.3); + display: block; + @include border-radius(4px); + color: #fff; + font-size: 1.4em; + text-align: center; + padding: 15px; + //border: 1px solid rgba(255, 255, 255, 0.1); + border: dashed 2px rgba(255, 255, 255, 0.3); + text-align: center; + margin-top: 15px; + text-transform: uppercase; + letter-spacing: 1px; + + &:hover { + opacity: 0.5; + } + } + + .job-style-1, .job-style-2, .job-style-3, .job-style-4 { + //padding-left: 122px; + + .location-learn-more { + + ul { + li { + font-size: 1em !important; + padding: 5px 0 0 25px; + min-height: 18px; + } + + li.location { + background: image-url("premium-teams/pin.png") no-repeat left; + } + + li.learn-more { + background: image-url("premium-teams/learn-more-star.png") no-repeat left; + a { + color: #fff; + + &:hover { + border-bottom: #fff 1px dashed; + } + } + } + } + } + + .job { + color: #fff; + @include border-radius(4px); + background: rgba(0, 0, 0, 0.2); + margin-bottom: 15px; + padding: 30px; + position: relative; + float: left; + + &:before { + content: " "; + display: block; + width: 96px; + height: 96px; + //background: image-url("premium-teams/job-arrow.png") no-repeat; + position: absolute; + top: 0px; + //left: -120px; + } + + h3 { + font-size: 2.4em; + //width: 460px; + float: left; + margin-bottom: 10px; + + span { + display: block; + text-transform: uppercase; + margin-bottom: 10px; + padding-top: 5px; + font-size: 0.8em; + letter-spacing: 0.3em; + } + } + + ul { + //width: 460px; + width: 100%; + float: left; + li { + font-size: 1.5em; + margin-bottom: 10px; + line-height: 1.6em; + padding-right: 30px; + + &:last-child { + margin-bottom: 0; + } + } + } + + .skills { + li { + float: left; + background: rgba(0, 0, 0, 0.2); + padding: 3px 6px; + font-size: 0.8em; + margin-right: 6px; + margin-bottom: 5px; + @include border-radius(4px); + } + } + + .salary { + float: right; + } + + .application { + padding: 20px 20px; + + form.resume { + display: inline-block; + + } + } + + } + + .apply, .learn-more, .send-application { + font-family: "MuseoSans-500"; + float: right; + display: block; + //margin: auto 30%; + margin-bottom: 15px; + width: 275px; + height: 40px; + line-height: 40px; + color: #fff; + font-size: 1.4em; + background: $branding; + //background: rgba(255,255,255,0.5); + border: 1px solid rgba(255, 255, 255, 0.1); + text-align: center; + @include border-radius(4px); + margin-top: 15px; + text-transform: uppercase; + letter-spacing: 1px; + box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.1); + + &:hover { + opacity: 0.5; + } + } + + .send-application { + float: none; + } + + //show and hide application panel + .application { + background: rgba(225, 225, 225, 0.2); + width: 430px !important; + margin: 25px 140px !important; + @include border-radius(6px); + overflow: auto; + + li { + a { + font-size: 0.9em !important; + } + } + + .resume { + width: 290px !important; + overflow: hidden; + a { + color: #fff; + &.change { + color: blue; + } + } + } + + } + //application + + } + + .job-style-2, .job-style-3, .job-style-4 { + padding: 0; + + //show and hide application panel + .application { + width: auto !important; + margin: 0 0 10px 0 !important; + + .resume { + width: 170px !important; + } + + } + //application + + .apply, .learn-more, .send-application { + width: 100%; + } + + .job { + float: left; + width: 40.6%; + margin-left: 30px; + //margin-bottom: 20px; + + &:before { + display: none; + } + + &:first-child { + margin: 0; + } + + h3 { + font-size: 1.6em; + margin-bottom: 5px; + width: 100%; + } + + ul { + width: 100%; + float: none; + + li { + font-size: 1.4em; + line-height: 1.4em; + padding-right: 0; + } + } + + .location-learn-more { + border-top: dashed 2px rgba(0, 0, 0, 0.2); + border-bottom: dashed 2px rgba(0, 0, 0, 0.2); + padding: 8px 0px; + + ul { + float: none; + } + + } + + .apply { + display: block; + width: auto; + float: none; + } + } + } + + .job-style-3 { + + .job { + width: 23.5%; + //margin-bottom: 20px; + + .skills { + li { + margin-bottom: 5px; + } + } + + .learn-more, .apply { + width: 100%; + } + + } + } + + .job-style-4 { + + .job { + width: 40.6%; + //margin-bottom: 20px; + //min-height: 100%; + //min-height: 100px; + + //clear: both; + float: none; + display: inline-block; + vertical-align: top; + + &:first-child { + margin-bottom: 20px; + } + + &:nth-child(odd) { + margin-left: 0; + } + + } + } +} + +//jobs-div + +//jobs section + +#why-work { + background: image-url("premium-teams/paper-texture.jpg") repeat; + padding-bottom: 40px; + + .header { + height: 100px; + border-bottom: solid 1px #eaeaea; + + .heading { + line-height: 100px; + text-align: center; + } + } + + .img { + float: right; + width: 300px; + height: 300px; + margin: 30px 70px 0 0; + overflow: hidden; + @include border-radius(300px); + border: 10px solid $branding; + + img { + //width: 100%; + height: 100%; + } + } + + .reasons { + margin: 30px 0 0 70px; + width: 440px; + + h3 { + font-size: 1.8em; + margin-bottom: 5px; + } + + li { + line-height: 22px; + //margin-bottom: 20px; + padding: 0 0 20px 90px; + position: relative; + background: image-url("premium-teams/dots.png") repeat-y 28px 0px; + + &:last-child { + padding-bottom: 0; + background: 0; + } + + .number { + position: absolute; + width: 58px; + height: 58px; + background: $branding image-url("premium-teams/paper-numbers.png") no-repeat top; + top: 0px; + left: 0px; + } + + .two { + background-position: 0px -58px; + } + + .three { + background-position: 0px -116px; + } + } + } +} + +.location { + position: relative; + + #location-map { + width: 100%; + min-height: 485px; + display: block; + } + + .location-details { + color: #fff; + position: absolute; + top: 50px; + right: 0px; + z-index: 100; + width: 460px; + background: rgba(0, 0, 0, 0.7); + + .poi { + //padding-top: 10px; + + li { + background: image-url("premium-teams/poi.png") no-repeat top left; + padding-left: 30px; + font-size: 1.3em; + margin-bottom: 10px; + line-height: 22px; + } + } + + .selected { + padding: 30px 30px 20px 30px; + + h3 { + font-family: "Georgia"; + font-style: italic; + font-size: 1.8em; + margin-bottom: 10px; + } + + .address { + //margin-bottom: 5px; + font-family: "MuseoSans-500"; + } + + .description { + line-height: 22px; + margin-bottom: 10px; + } + } + + .locations { + background: rgba(0, 0, 0, 0.3); + padding: 30px; + + li { + float: left; + margin: 0 10px 8px 0; + + &:first-child { + //margin: 0; + } + } + + a { + color: #fff; + font-size: 1.2em; + display: inline-block; + padding: 6px 12px; + background: #000; + @include border-radius(4px); + } + } + } +} + +//location + +#featured-links { + background: image-url("premium-teams/wood.png") repeat; + + .header { + height: 100px; + background: rgba(157, 83, 25, 0.16); + + .heading { + line-height: 100px; + text-align: center; + color: #fff; + font-family: "MuseoSans-100"; + text-transform: uppercase; + letter-spacing: 3px; + font-size: 2.6em; + } + } + + .footer { + background: rgba(157, 83, 25, 0.16); + height: 30px; + border-top: solid 1px rgba(0, 0, 0, 0.02); + } + + .inside { + box-shadow: inset 0 2px 9px rgba(168, 91, 29, 0.43); + } + + .the-books { + padding: 40px 70px 20px 70px; + text-align: center; + + li { + margin-left: 19px; + margin-bottom: 20px; + width: 118px; + display: inline-block; + + &:nth-child(6n+1) { + margin-left: 0; + } + + img { + width: 100%; + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22); + } + + a { + + &:hover { + opacity: 0.5; + } + } + } + } +} + +#meet-us { + color: #fff; + padding: 30px 70px; + background: $branding; + + header { + //height: 100px; + + h2 { + //line-height: 100px; + font-family: "MuseoSans-100"; + margin-bottom: 30px; + font-size: 3.6em; + } + } + + .event { + background: rgba(0, 0, 0, 0.2); + margin-bottom: 20px; + @include border-radius(4px); + padding: 20px 40px; + + .left { + float: left; + width: 460px; + } + + h3 { + font-family: "MuseoSans-300"; + margin-bottom: 6px; + font-size: 1.8em; + } + + li { + font-size: 1.4em; + } + + .date { + float: right; + width: 77px; + height: 77px; + @include border-radius(100px); + background: $branding; + + p { + padding-top: 15px; + font-size: 2.3em; + text-align: center; + + } + + span { + display: block; + font-size: 1.4em; + text-align: center; + } + } + } +} + +//meet + +.interview { + border-top: solid 1px #eaeaea; + border-bottom: solid 1px #eaeaea; + + .header { + height: 100px; + border-bottom: solid 1px #eaeaea; + + .heading { + line-height: 100px; + text-align: center; + font-size: 2.2em; + } + } + + .inside { + padding: 30px 70px 0px 70px; + } + + .steps { + //padding-left: 100px; + + li { + position: relative; + padding-bottom: 20px; + + &:last-child { + margin-bottom: 0; + } + + .step-inside { + background: image-url("premium-teams/paper-texture.jpg") repeat; + border: solid 1px #eaeaea; + font-size: 1.6em; + width: 470px; + padding: 10px 25px; + min-height: 60px; + margin-left: 100px; + @include border-radius(6px); + box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.05); + } + + .number { + position: absolute; + top: 0px; + left: 0px; + display: block; + width: 60px; + height: 69px; + line-height: 72px; + font-size: 2.6em; + text-align: center; + font-family: "MuseoSans-900"; + color: #fff; + background: $branding image-url("premium-teams/hex-number.png") no-repeat top; + } + + &:nth-child(odd) { + background: image-url("premium-teams/interview-line.jpg") repeat-y 29px 0px, image-url("premium-teams/interview-line3.jpg") no-repeat 638px -50px; + + &:last-child { + background: image-url("premium-teams/interview-line3.jpg") no-repeat 638px -50px; + } + } + + &:nth-child(even) { + background: image-url("premium-teams/interview-line2.jpg") no-repeat 29px -50px, image-url("premium-teams/interview-line.jpg") repeat-y 789px 0px;; + + .step-inside { + margin-left: 200px; + margin-right: 100px; + } + + .number { + left: 760px; + } + + &:last-child { + background: image-url("premium-teams/interview-line2.jpg") no-repeat 29px -50px; + } + } + + &:first-child { + background: image-url("premium-teams/interview-line.jpg") repeat-y 29px 0px; + } + + &:last-child { + padding-bottom: 50px; + } + + } + } +} + +//interview + +#video { + background: $branding; +} + +#team-blog { + + header { + padding: 30px 0; + border-bottom: 1px solid #eaeaea; + + h2 { + text-align: center; + } + } + + .inside { + //padding: 0px 70px 30px 70px; + + article { + float: left; + width: 349px; + border-left: dotted 2px #eaeaea; + padding: 65px; + //margin-right: 30px; + position: relative; + + &:first-child { + border: 0; + //padding-left: 0; + } + + h3 { + margin-bottom: 10px; + font-size: 1.6em; + a { + color: $branding; + } + } + + .date { + background: $branding; + padding-top: 15px; + width: 65px; + height: 50px; + right: 0px; + top: 0px; + color: #fff; + position: absolute; + text-align: center; + + p { + font-size: 2.4em; + margin-bottom: 0px; + } + + span { + font-size: 1.4em; + text-transform: uppercase; + } + } + + p { + line-height: 22px; + margin-bottom: 20px; + } + + .read-more { + font-size: 1.4em; + color: #fff; + display: inline-block; + padding: 8px 16px; + background: $branding; + @include border-radius(6px); + } + } + } + +} + +#team-protips { + border-bottom: solid 1px #eaeaea; + + header { + padding: 30px 70px; + border-bottom: 1px solid #eaeaea; + + h2 { + font-family: "MuseoSans-300"; + text-align: center; + float: left; + font-size: 2em; + padding-top: 10px; + } + + .view-more { + float: right; + background: $branding; + color: #fff; + font-size: 1.3em; + padding: 10px 20px; + @include border-radius(6px); + + &:hover { + opacity: 0.5; + } + } + } + + .inside { + + article { + float: left; + width: 349px; + border-left: dotted 2px #eaeaea; + padding: 65px; + //margin-right: 30px; + position: relative; + min-height: 110px; + + &:first-child { + border: 0; + //padding-left: 0; + } + + h3 { + margin-bottom: 10px; + font-size: 2em; + max-width: 290px; + + a { + color: $branding; + display: block; + &:hover { + opacity: 0.5; + } + } + } + + .upvote { + display: block; + width: 60px; + height: 42px; + padding-top: 38px; + background: image-url("protips/ribbon.png") no-repeat; + background-size: 60px 160px; + position: absolute; + top: 0px; + right: 25px; + font-size: 1.3em; + text-align: center; + color: white; + } + } + } +} + +#stack { + background: $branding image-url("premium-teams/pattern.png") repeat; + border-top: solid 1px #eaeaea; + + .header { + height: 100px; + + .heading { + background: #fff; + line-height: 100px; + font-family: "MuseoSans-300"; + font-size: 2.1em; + color: $branding; + text-align: center; + } + } + + .inside { + padding: 30px 70px; + } + + .stack-list { + background: image-url("premium-teams/big-dots.png") repeat-y center; + + li { + display: inline-block; + vertical-align: top; + width: 320px; + padding: 20px; + background: rgba(0, 0, 0, 0.3); + color: #fff; + font-size: 1.8em; + text-align: center; + position: relative; + @include border-radius(6px); + margin-bottom: 20px; + + &:nth-child(even) { + margin-left: 96px; + + &:before { + content: " "; + display: block; + position: absolute; + left: -16px; + top: 30%; + width: 0; + height: 0; + border-top: 10px solid transparent; + border-right: 16px solid rgba(0, 0, 0, 0.3); + border-bottom: 10px solid transparent; + } + } + + &:nth-child(odd) { + + &:before { + content: " "; + display: block; + position: absolute; + right: -16px; + top: 30%; + width: 0; + height: 0; + border-top: 10px solid transparent; + border-left: 16px solid rgba(0, 0, 0, 0.3); + border-bottom: 10px solid transparent; + } + } + } + } +} + +.inactive { + //opacity: 0.2; + //border-top: 2px solid $dark-grey !important; + border: 0 !important; + + .inactive-box { + text-align: center; + background: rgba(0, 0, 0, 0.8); + padding: 20px; + @include border-radius(6px); + z-index: 1000; + position: absolute; + top: 30%; + left: 33%; + width: 30%; + //margin: 22% 0 0 22%; + + box-shadow: 0px 1px 2px 2px rgba(0, 0, 0, 0.1); + + h2 { + color: #fff; + text-transform: uppercase; + font-size: 1.4em; + margin-bottom: 10px; + } + + p { + color: #fff; + margin-bottom: 20px; + font-size: 1.3em; + } + + a { + display: block; + background: $light-blue; + padding: 12px 24px; + color: #fff; + font-size: 1.6em; + @include border-radius(4px); + @include transition-all; + + &:hover { + background: $green; + } + } + } + + &:before { + //background: rgba(255, 255, 255, 0.9); + background: rgba(0, 0, 0, 0.6); + content: " "; + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 0px; + left: 0px; + z-index: 1000; + @include transition-all; + box-shadow: inset 0px 0px 8px 8px rgba(0, 0, 0, 0.1); + } + + &:hover { + &:before { + //background: rgba(255, 255, 255, 0.7); + background: rgba(0, 0, 0, 0.3); + } + } + + // &:before { + // background: rgba(0, 0, 0, 0.6); + // content: " "; + // display: block; + // width: 100%; + // height: 100%; + // position: absolute; + // top: 0px; + // left: 0px; + // z-index: 1000; + // @include transition-all; + // } + // + // &:hover { + // &:before { + // background: rgba(0, 0, 0, 0.3); + // } + // } +} + +.inactive { + min-height: 350px; + //overflow: hidden; + + .edit { + display: none; + } +} + +//Premium teams admin +@import "premium-team-admin"; diff --git a/app/assets/stylesheets/premium-teams.scss b/app/assets/stylesheets/premium-teams.scss deleted file mode 100644 index 0741f479..00000000 --- a/app/assets/stylesheets/premium-teams.scss +++ /dev/null @@ -1,2629 +0,0 @@ -@import "base"; -@import "compass/css3/"; - -$branding: #555; - -.reduced-header { - /* This is used when a member views an enhanced team profile*/ - margin-top: -35px; -} - -// This is the style for making the job box stick to the top of the page -body#signed-out { - .inside-main-content { - padding: 28px 0 50px 0; - width: 960px; - } -} - -.incomplete-alert { - background: #db5750 image-url("triangle-white.png") no-repeat 20px center; - color: #fff; - margin: -35px 0 20px 0; - padding: 20px 20px 20px 60px; - @include border-radius(4px); - - p { - font-size: 1.4em; - } -} - -.jobs-top { - background: image-url("team/struts.png") no-repeat top center; - padding-top: 40px; - margin-top: -30px; - margin-bottom: 10px; - - .learn-more-about { - height: 23px; - padding: 35px 0; - background: image-url("team/middle-dots.png") no-repeat top center; - - p { - font-size: 1.3em; - letter-spacing: 0.1em; - text-align: center; - text-transform: uppercase; - font-family: "MuseoSans-500"; - color: $mid-blue-grey; - } - } - - //learn-more - .job-panel { - background: #fff; - @include border-radius(6px); - //overflow: hidden; - width: 740px; - margin: 0 auto 15px auto; - position: relative; - - .job-panel-header { - @include paper-panel; - padding: 20px 30px; - border-bottom: solid 1px #eaeaea; - - .job-title { - font-size: 2.4em; - float: left; - @include ellipsis; - width: 489px; - } - //job-title - - } - //job-panel-header - - .apply-section { - background: #eaeaea; - padding: 20px 30px; - margin-bottom: 10px; - .status { - margin-bottom: 10px; - } - //status - - .btn { - padding: 8px 20px; - display: inline-block; - background: $light-blue; - @include border-radius(4px); - color: #fff; - text-align: center; - text-transform: uppercase; - font-family: "MuseoSans-500"; - font-size: 1.2em; - letter-spacing: 0.2em; - - &.upload { - margin-right: 15px; - background: #9b9b9b; - width: 280px; - } - - &:hover { - opacity: 0.5; - } - } - //btn - - .send-application { - margin-top: 10px; - &:after { - content: "Send application" - } - - &.applied { - &:after { - content: "Already applied" - } - } - } - } - //apply-section - - .content { - padding: 20px 30px 5px 30px; - - .contract { - color: $light-blue; - font-size: 1.2em; - margin-bottom: 15px; - } - - .job-text { - margin-bottom: 15px; - } - - .skills { - margin-bottom: 15px; - li { - float: left; - background: #e2e2e2; - @include border-radius(4px); - font-size: 1.2em; - margin-right: 10px; - margin-bottom: 5px; - padding: 6px 12px; - } - } - //skills - - .locations { - li { - color: $mid-blue-grey; - float: left; - text-transform: uppercase; - font-family: "MuseoSans-700"; - margin-right: 10px; - margin-bottom: 15px; - background: image-url("team/pin.png") no-repeat left; - line-height: 19px; - padding-left: 20px; - } - } - //locations - - .opportunities { - //width: 330px; - //float: left; - padding-bottom: 10px; - - h3 { - display: block; - background: image-url("team/case.png") no-repeat left; - line-height: 21px; - height: 17px; - padding-left: 25px; - font-family: "MuseoSans-700"; - font-size: 1.1em; - text-transform: uppercase; - color: #5d5d5d; - margin-bottom: 10px; - } - - li { - float: left; - font-size: 1.2em; - margin: 0 15px 5px 0; - padding-left: 15px; - background: image-url("team/bullet.jpg") no-repeat left; - - a { - color: #5d5d5d; - &:hover { - color: $light-blue; - } - } - } - } - } - //content - - .job-panel-footer { - border-top: solid 1px #eaeaea; - padding: 20px 30px; - - .other-jobs { - text-align: center; - font-size: 1.3em; - margin: 0 auto; - display: block; - color: $light-blue; - text-decoration: underline; - } - - .apply { - &:after { - content: "Apply"; - } - - &.hide-application { - background: #9b9b9b; - &:after { - content: "Hide Application"; - } - } - } - .apply, .learn-more { - //float: right; - margin: 0 auto 15px auto; - background: $light-blue; - display: block; - width: 320px; - padding: 12px; - color: #fff; - text-transform: uppercase; - font-size: 1.8em; - letter-spacing: 0.3em; - text-align: center; - @include border-radius(4px); - - &:hover { - background: $green; - } - } - - .btn { - background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* IE10+ */ - background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%); /* W3C */ - border: solid 1px #e6e6e6; - display: block; - font-size: 1.4em; - width: 280px; - padding: 8px 8px; - @include border-radius(4px); - color: $dark-grey; - - &:hover { - color: $light-blue; - //opacity: 0.5; - } - - .arrow { - content: " "; - display: block; - background: image-url("team/job-arrows.png") no-repeat bottom; - width: 10px; - height: 16px; - } - - .link { - width: 250px; - @include ellipsis; - } - - &.prev { - float: left; - .link { - float: right; - } - .arrow { - float: left; - } - } - - &.next { - float: right; - .arrow { - background-position: top; - float: right; - } - .link { - float: left; - } - } - - } - //btn - } - //job-panel-footer - } - //job-panel - -} - -//job-top - -.requested-members { - margin-bottom: 30px; - - h3 { - color: $mid-blue-grey; - @include ts-bottom-white; - font-size: 1.6em; - margin-bottom: 15px; - } -} - -.requested-members-list { - li { - padding: 10px; - @include border-radius(6px); - background: $light-blue-grey; - float: left; - border: solid #99b1c3 1px; - margin-left: 15px; - margin-bottom: 15px; - //width: 288px; - - &:nth-child(3n+1) { - margin-left: 0; - } - } - - .member { - color: #fff; - font-size: 1.5em; - display: inline-block; - //float: left; - vertical-align: middle; - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - margin-right: 15px; - height: 30px; - line-height: 30px; - width: 165px; - @include ellipsis; - - &:hover { - opacity: 0.5; - } - - img { - width: 30px; - height: 30px; - @include border-radius(8px); - border: solid 1px #99b1c3; - //display: inline-block; - vertical-align: middle; - margin-right: 10px; - } - } - - .action { - padding: 8px; - @include border-radius(4px); - color: #fff; - font-size: 1em; - display: inline-block; - text-transform: uppercase; - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2); - - &:hover { - opacity: 0.5; - } - } - - .accept { - background: $green; - margin-right: 5px; - } - - .deny { - background: $red; - } -} - -.admin-bar { - background: #fff; - @include border-radius-bottom(6px); - border: solid 1px #d9d9d9; - border-top: 0; - margin-top: -70px; - margin-bottom: 30px; - - .rank { - float: left; - padding: 25px 20px 20px 20px; - - a { - color: #a1a1a1; - font-size: 1.4em; - display: block; - font-family: "MuseoSans-500"; - &:hover { - color: $light-blue; - } - - span { - font-size: 1.4em; - } - } - } - - .alert { - float: left; - border-left: solid 1px #ececec; - padding: 28px 20px 20px 20px; - color: #db5750; - /*background: image-url("triangle-red.png") no-repeat 23px 20px;*/ - width: 440px; - min-height: 24px; - - p { - line-height: 20px; - } - } - - .actions { - float: right; - padding: 20px; - border-left: solid 1px #ececec; - min-height: 32px; - - a { - display: inline-block; - font-family: "MuseoSans-500"; - font-size: 1.3em; - @include border-radius(4px); - //width: 75px; - padding: 0 12px; - height: 30px; - line-height: 30px; - text-align: center; - color: #757575; - - &:hover { - opacity: 0.5; - } - - &.disable { - opacity: 0.5; - } - } - - .edit { - background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* IE10+ */ - background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); /* IE6-9 */ - - border: solid 1px #e6e6e6; - margin-right: 10px; - } - - .add-job { - background: $light-blue; - color: #fff; - border: solid 1px #3880b9; - } - - .done { - background: #79c839; - color: #fff; - border: solid 1px #6cb72f; - margin-right: 10px; - - } - - } -} - -.join-us-banner { - background: image-url("premium-teams/banner-dots.png") 0px 8px repeat-x, image-url("premium-teams/banner-dots.png") 0px 50px repeat-x, #343131; - padding-top: 18px; - height: 40px; - width: 1000px; - margin-left: -20px; - position: relative; - color: #fff; - - &:before { - content: " "; - width: 0; - height: 0; - border-top: 20px solid #000; - border-left: 20px solid transparent; - bottom: -20px; - left: 0px; - position: absolute; - } - - &:after { - content: " "; - width: 0; - height: 0; - border-top: 20px solid #000; - border-right: 20px solid transparent; - bottom: -20px; - right: 0px; - position: absolute; - } - - p { - margin-left: 90px; - padding-left: 35px; - font-size: 1.4em; - /*width: 350px;*/ - margin: 0 auto; - text-align: center; - text-transform: uppercase; - letter-spacing: 0.2em; - } - - span { - background: image-url("white-case.png") no-repeat top; - width: 16px; - height: 13px; - margin-right: 10px; - display: inline-block; - } - - .view-jobs { - background: #000; - color: #fff; - @include border-radius(4px); - display: inline-block; - padding: 6px 12px; - margin-left: 15px; - font-size: 0.8em; - - &:hover { - opacity: 0.5; - } - } -} - -#prem-team { - .inside-main-content { - padding: 70px 0px; - width: 960px; - } -} - -.page { - background: #fff; - - section { - position: relative; - } -} - -.page-footer { - height: 20px; - padding: 20px 70px; - border-top: 1px solid #eaeaea; - - .watermark { - font-size: 2em; - text-align: right; - color: #c6c6c6; - } -} - -.legend { - position: fixed; - top: 140px; - right: 0px; - z-index: 200; - @include transition-all; - - li { - margin-bottom: 10px; - background: rgba(133, 167, 194, 0.8); - -webkit-border-top-left-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-topleft: 4px; - -moz-border-radius-bottomleft: 4px; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - -webkit-box-shadow: inset 0px 1px 1px 1px rgba(255, 255, 255, 0.2); - box-shadow: inset 0px 1px 1px 1px rgba(255, 255, 255, 0.2); - border-top: solid 1px rgba(0, 0, 0, 0.018); - - &:hover { - background: rgba(133, 167, 194, 1); - } - - a { - display: block; - color: #fff; - font-size: 1.3em; - width: 100px; - padding: 8px 6px 8px 36px; - text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1); - } - - // .join-us { - // background: $branding image-url("premium-teams/cog.png") no-repeat 10px 10px; - // } - } - - .open-opportunities { - a { - background: image-url("premium-teams/lil-case.png") no-repeat 10px 7px; - } - } - - .team-visitors { - a { - background: image-url("premium-teams/visitors.png") no-repeat 10px 7px; - } - } -} - -@media screen and (max-width: 1240px) { - - .legend { - right: -108px; - - &:hover { - right: 0px; - } - } - -} - -//team header -.team-header { - background: $branding image-url("premium-teams/pattern.png") repeat; - height: 105px; - padding: 35px 70px 0 70px; - - .team-logo { - float: left; - padding-top: 30px; - margin-top: -35px; - width: 88px; - height: 80px; - background: #fff; - -webkit-box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.1); - box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.1); - - img { - display: block; - @include border-radius(6px); - width: 65px; - height: 65px; - margin: 0 auto; - } - } - - h1 { - color: #fff; - font-size: 3em; - float: left; - padding-left: 40px; - width: 480px; - @include ellipsis; - } - - .follow-team { - &:after { - content: "Follow"; - } - - &:hover:after { - content: "Start following"; - } - - &.following:after { - content: "Following"; - } - - &.following:hover:after { - content: "Stop following"; - } - - color: #fff; - font-size: 1.4em; - text-transform: uppercase; - float: right; - display: block; - background: rgba(0, 0, 0, 0.2); - @include border-radius(4px); - width: 180px; - height: 45px; - line-height: 45px; - text-align: center; - font-family: "MuseoSans-500"; - margin-top: 10px; - - &:hover { - background: rgba(0, 0, 0, 0.4); - } - } - - .connections { - float: left; - padding-left: 40px; - padding-top: 10px; - - li { - margin-right: 10px; - float: left; - } - - a { - display: block; - height: 29px; - width: 29px; - font-size: 0; - text-indent: -9999px; - overflow: hidden; - background: rgba(0, 0, 0, 0.2) image-url("team/team-links.png") no-repeat top left; - @include border-radius(4px); - } - - .url { - background-position: 0px 0px; - } - - .twitter { - background-position: -28px 0px; - } - - .facebook { - background-position: -58px 0px; - } - - .github { - background-position: -88px 0px; - } - } - //connections - -} - -//team header - -//team details -#team-details { - position: relative; - padding: 40px 70px 0 70px; - margin-bottom: 40px; - - .edit-connections { - img { - display: block; - } - - input[type=file] { - padding: 10px; - } - } - .switch-section { - //min-height: 136px; - padding-bottom: 10px; - //width: 560px; - //float: right; - border-bottom: solid 5px #e5e5e5; - - p { - font-size: 1.7em; - line-height: 24px; - color: $branding; - } - } - - // .connections { - // float: left; - // width: 210px; - // - // li { - // margin-bottom: 10px; - // border-bottom: solid 1px #e5e5e5; - // } - // - // a { - // display: block; - // height: 19px; - // font-size: 1.3em; - // color: $dark-grey; - // font-family: "MuseoSans-500"; - // margin-bottom: 10px; - // padding-left: 40px; - // background: image-url("premium-teams/icons.png") no-repeat top left; - // } - // - // .url { - // background-position: 0px -57px; - // } - // - // .twitter { - // background-position: 0px 0px; - // } - // - // .facebook { - // background-position: 0px -19px; - // } - // - // .github { - // background-position: 0px -38px; - // } - // }//connections -} - -//team members -#members { - padding: 0px 32px 0px 70px; - margin-bottom: 30px; - position: relative; - - .arrow { - display: block; - height: 21px; - width: 21px; - background: image-url("premium-teams/arrows.png") no-repeat bottom; - position: absolute; - opacity: 0.5; - @include transition-all; - - &:hover { - opacity: 1; - } - - span { - display: none; - } - } - - .left { - left: 25px; - top: 50px; - background-position: top; - } - - .right { - right: 25px; - top: 50px; - } - - .disable { - display: none; - } -} - -.members-list { - //width: 100px; - //overflow: hidden; - - > li { - float: left; - width: 105px; - margin-right: 37px; - position: relative; - - &:hover { - img { - border-color: #363639; - } - } - - .active { - img { - border-color: #363639; - opacity: 1; - -webkit-filter: grayscale(0%); - } - - &:before { - width: 0; - height: 0; - border-left: 12px solid transparent; - border-right: 12px solid transparent; - border-bottom: 12px solid $dark-grey; - content: " "; - position: absolute; - bottom: -30px; - left: 35px; - } - } - - img { - opacity: 0.5; - width: 95px; - height: 95px; - border: solid 7px #fff; - -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); - box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); - margin-bottom: 10px; - @include border-radius(4px); - -webkit-filter: grayscale(100%); - } - - ul { - height: 49px; - li { - font-size: 1.2em; - text-align: center; - color: $dark-grey; - margin-bottom: 3px; - font-family: "MuseoSans-500"; - - &:last-child { - margin: 0; - } - } - } - } -} - -//less than 6 members -.tabbed { - padding: 0 !important; - margin: 0 !important; - - .members-list { - background: rgb(16, 16, 16); /* Old browsers */ - background: -moz-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(16, 16, 16, 1)), color-stop(5%, rgba(28, 28, 30, 1)), color-stop(7%, rgba(31, 31, 33, 1)), color-stop(100%, rgba(31, 31, 33, 1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* IE10+ */ - background: linear-gradient(to right, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#101010', endColorstr='#1f1f21', GradientType=1); /* IE6-9 */ - - > li { - height: auto; - width: auto; - margin: 0; - padding: 0; - - a { - display: block; - background: #363639; - margin: 0; - width: 154px; - height: 37px; - padding: 10px 0 0 12px; - line-height: 30px; - - background: rgb(16, 16, 16); /* Old browsers */ - background: -moz-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(16, 16, 16, 1)), color-stop(5%, rgba(28, 28, 30, 1)), color-stop(7%, rgba(31, 31, 33, 1)), color-stop(100%, rgba(31, 31, 33, 1))); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(left, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* IE10+ */ - background: linear-gradient(to right, rgba(16, 16, 16, 1) 0%, rgba(28, 28, 30, 1) 5%, rgba(31, 31, 33, 1) 7%, rgba(31, 31, 33, 1) 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#101010', endColorstr='#1f1f21', GradientType=1); /* IE6-9 */ - } - - &:first-child { - a { - padding-left: 70px; - } - } - - .active { - background: #363639 !important; - - &:before { - display: none; - } - } - - img { - width: 23px; - height: 23px; - border: 2px solid #eee; - float: left; - margin-right: 15px; - } - - ul { - height: auto; - float: left; - - li { - color: #fff; - width: 100px; - @include ellipsis; - text-align: left; - - &:nth-child(2) { - display: none; - } - } - } - } - } -} - -.size-5 { - .members-list { - > li { - &:last-child { - a { - width: 226px !important; - } - } - } - } -} - -.size-1 { - display: none; -} - -//about members -.about-members { - background: #363639; - min-height: 313px; - - .member-details { - float: left; - width: 332px; - padding: 40px 70px; - color: #fff; - - h3 { - font-size: 1.6em; - font-family: "MuseoSans-500"; - margin-bottom: 5px; - } - - h4 { - font-size: 1.3em; - letter-spacing: 0.1em; - margin-bottom: 5px; - } - - p { - font-size: 1.5em; - line-height: 22px; - margin-bottom: 20px; - - &:last-child { - margin-bottom: 0; - } - } - - .about-text { - border-bottom: 5px solid #2b2b2e; - padding-bottom: 10px; - } - } - - .member-pic { - float: right; - width: 488px; - height: 313px; - //max-height: 350px; - overflow: hidden; - position: relative; - - img { - //position: absolute; - width: 100%; - //z-index: 0; - } - - .member-box { - position: absolute; - z-index: 100; - background: $branding; - top: 20px; - right: 0px; - width: 326px; - color: #fff; - - .member-basics { - padding: 20px 70px 20px 40px; - - h3 { - font-family: "MuseoSans-300"; - font-size: 1.6em; - margin-bottom: 3px; - } - - h4 { - font-size: 1.6em; - font-family: "MuseoSans-500"; - text-transform: capitalize; - margin-bottom: 3px; - } - - .view-profile { - display: block; - height: 19px; - line-height: 19px; - padding-left: 26px; - font-size: 1.3em; - color: #fff; - background: image-url("premium-teams/preview-icon.png") no-repeat left; - } - } - - .member-stats { - padding: 20px 70px 20px 40px; - background: rgba(0, 0, 0, 0.1); - - ul { - li { - display: block; - //width: 208px; - overflow: auto; - margin-bottom: 5px; - p { - float: left; - width: 160px; - } - span { - float: right; - font-size: 1.6em; - } - } - } - } - } - } -} - -//member details - -.single-member { - .member-details { - h3 { - @include ellipsis; - font-size: 1.8em; - padding-top: 6px; - margin: 0; - } - - .avatar { - float: left; - margin-right: 20px; - margin-bottom: 20px; - img { - width: 29px; - height: 29px; - border: solid 2px #fff; - @include border-radius(4px); - } - } - //avatar - - .about-text { - clear: both; - border-top: 5px solid #2b2b2e; - padding-top: 10px; - margin-top: 10px; - } - //about-text - - .view-profile { - display: block; - height: 19px; - line-height: 19px; - padding-left: 26px; - font-size: 1.3em; - color: #fff; - background: image-url("premium-teams/preview-icon.png") no-repeat left; - } - //view-profile - - } - //member-details - - .member-pic { - - } - //member-pic -} - -#big-headline { - background: $branding image-url("premium-teams/pattern.png") repeat; - padding: 50px 70px; - - .headline { - color: #fff; - font-family: "MuseoSans-100"; - font-size: 2.4em; - line-height: 34px; - text-align: center; - } -} - -//big headline - -#big-quote { - - //-webkit-filter: blur(2px); - - height: 460px; - - //opacity: 0.1; - - // &:before { - // background: rgba(255, 255, 255, 0.8); - // content: " "; - // display: block; - // width: 100%; - // height: 100%; - // position: absolute; - // top: 0px; - // left: 0px; - // z-index: 1000; - // } - - // &:after { - // content: "Activate section"; - // display: block; - // width: 300px; - // height: 80px; - // line-height: 50px; - // background: $dark-grey; - // color: #fff; - // top: 200px; - // left: 300px; - // z-index: 1100; - // position: absolute; - // text-align: center; - // font-size: 1.4em; - // } - - .inside { - height: 460px; - overflow: hidden; - - blockquote { - position: absolute; - background: rgba(0, 0, 0, 0.8); - z-index: 100; - top: 30px; - left: 30px; - color: #fff; - width: 324px; - min-height: 324px; - @include border-radius(50%); - - p { - font-size: 1.8em; - line-height: 36px; - font-family: "MuseoSans-100"; - text-align: center; - margin-top: 10%; - padding: 35px 50px; - background: image-url("premium-teams/quote.png") no-repeat center top; - } - } - - img { - width: 100%; - //top: 0px; - //left: 0px; - //position: absolute; - //z-index: 0; - } - } - -} - -//big image - -#challenges { - padding: 30px 70px; - - .box { - &.half { - width: 310px; - } - min-height: 195px; - padding-left: 100px; - position: relative; - float: left; - background: image-url("premium-teams/big-dots.png") repeat-y 34px 0px; - - header { - height: 75px; - line-height: 75px; - - h3 { - font-size: 2.2em; - } - } - - .icon { - position: absolute; - top: 0px; - left: 0px; - width: 76px; - height: 75px; - //border: 4px solid #fff; - background: image-url("premium-teams/light-blub.png") no-repeat; - } - - .blub { - background-position: 0px -75px; - } - - p { - line-height: 22px; - } - } -} - -#favourite-benefits { - background: $branding image-url("premium-teams/pattern.png") repeat; - padding: 30px 70px 30px 0px; - color: #fff; - position: relative; - - img { - margin-top: 30px; - float: right; - } - - ol { - background: image-url("premium-teams/1-2-3.png") no-repeat top left; - float: left; - min-height: 407px; - margin-left: 70px; - - li { - width: 350px; - padding-left: 170px; - min-height: 111px; - margin-bottom: 20px; - - &:first-child { - margin-top: 20px; - } - - } - - p { - font-size: 1.4em; - line-height: 22px; - } - - h3 { - font-size: 1.6em; - margin-bottom: 5px; - } - - } -} - -#organization-style { - background: image-url("premium-teams/paper-texture.jpg") repeat; - border-right: solid 8px $branding; - //border-bottom: solid 2px #eaeaea; - -webkit-box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1); - box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.1); - - min-height: 318px; - - //hack to get the left side to match the right sides height - //display: table; - - // .img, .text { - // display:table-cell; - // width:50%; - // min-height:100%; - // vertical-align:top; - // } - // - // .img { - // background: $dark-grey; - // //position: relative; - // - // img { - // width: 100%; - // //height: 100%; - // } - // } - // - // .text { - // padding: 64px; - // - // h3 { - // font-family: "Georgia"; - // font-style: italic; - // font-size: 2em; - // margin-bottom: 10px; - // color: $branding; - // } - // - // p { - // color: $branding; - // font-size: 1.4em; - // line-height: 22px; - // - // a { - // color: $dark-grey; - // text-decoration: underline; - // } - // } - // } - - .img { - float: left; - width: 479px; - overflow: hidden; - max-height: 321px; - //min-height: 100%; - background: $dark-grey; - - img { - width: 100%; - //height: 100%; - display: block; - } - } - - .text { - width: 340px; - height: 100%; - padding: 64px; - float: right; - display: inline-block; - - h3 { - font-family: "Georgia"; - font-style: italic; - font-size: 2em; - margin-bottom: 10px; - color: $branding; - } - - p { - color: $branding; - font-size: 1.4em; - line-height: 22px; - } - } -} - -// half img - -#office-images { - border-bottom: solid 1px #eaeaea; - - .header { - background: image-url("premium-teams/header-swirls.png") no-repeat center; - height: 120px; - - .heading { - font-size: 2.4em; - text-align: center; - line-height: 120px; - font-family: "MuseoSans-300"; - } - } - - .images { - padding: 0px 70px 30px 70px; - - li { - float: left; - width: 260px; - margin-top: 5px; - /* height: 200px;*/ - /* margin: 0 0 20px 20px;*/ - /* margin:5px;*/ - overflow: hidden; - - &:nth-child(3n+1) { - margin-left: 0; - } - - } - } -} - -// .top-positions { -// //padding-bottom: 40px; -// background: #DBE4EB image-url("blue-texture-bg.jpg") repeat; -// -// -// .application { -// background: rgba(225, 225, 225, 0.2); -// width: 430px !important; -// margin: 25px 140px !important; -// @include border-radius(6px); -// -// li { -// a { -// font-size: 0.8em !important; -// } -// } -// -// .resume { -// width: 290px !important; -// overflow: hidden; -// a { -// color: #fff; -// } -// } -// -// } -// -// -// .other-opportunities { -// color: #fff; -// text-transform: none; -// padding-top: 20px; -// margin-bottom: 10px; -// } -// -// .next-job, .previous-job { -// a { -// position: absolute; -// top: 250px; -// width: 34px; -// height: 34px; -// background: rgba(0,0,0,0.5) image-url("premium-teams/job-arrows.png") no-repeat right center; -// @include border-radius(4px); -// color: #fff; -// display: block; -// font-size: 0; -// -// &:hover { -// opacity: 0.5; -// } -// } -// } -// -// .next-job { -// a { -// right: 20px; -// } -// } -// -// .previous-job { -// a { -// left: 20px; -// background-position: left center; -// } -// } -// -// -// .other-jobs { -// overflow: auto; -// li { -// float: left; -// margin-right: 10px; -// padding: 0 !important; -// -// a { -// color: #fff; -// font-size: 1.3em; -// padding: 10px 16px; -// background: rgba(0, 0, 0, 0.6); -// display: inline-block; -// @include border-radius(4px); -// -// &:hover { -// opacity: 0.5; -// } -// } -// } -// } -// -// } - -#open-positions { - background: $branding image-url("premium-teams/pattern.png") repeat; - border-top: solid 1px #eaeaea; - - .header { - padding: 0 70px; - height: 100px; - background: #fff image-url("premium-teams/were-hiring.png") no-repeat 70px 15px; - - .heading { - line-height: 110px; - font-family: "MuseoSans-300"; - font-size: 2.1em; - padding-left: 195px; - color: $branding; - } - } - - .job-area { - padding: 30px 70px; - ul.other-jobs { - width: 100%; - li { - float: left; - padding: 5px 20px 5px 0; - - a { - color: white; - font-size: 1.2em; - } - } - } - } - - // .outside-all-jobs { - // border-top: dashed 2px rgba(0, 0, 0, 0.2); - // height: 20px; - // } - - .all-jobs { - //background: rgba(0,0,0,0.3); - display: block; - @include border-radius(4px); - color: #fff; - font-size: 1.4em; - text-align: center; - padding: 15px; - //border: 1px solid rgba(255, 255, 255, 0.1); - border: dashed 2px rgba(255, 255, 255, 0.3); - text-align: center; - margin-top: 15px; - text-transform: uppercase; - letter-spacing: 1px; - - &:hover { - opacity: 0.5; - } - } - - .job-style-1, .job-style-2, .job-style-3, .job-style-4 { - //padding-left: 122px; - - .location-learn-more { - - ul { - li { - font-size: 1em !important; - padding: 5px 0 0 25px; - min-height: 18px; - } - - li.location { - background: image-url("premium-teams/pin.png") no-repeat left; - } - - li.learn-more { - background: image-url("premium-teams/learn-more-star.png") no-repeat left; - a { - color: #fff; - - &:hover { - border-bottom: #fff 1px dashed; - } - } - } - } - } - - .job { - color: #fff; - @include border-radius(4px); - background: rgba(0, 0, 0, 0.2); - margin-bottom: 15px; - padding: 30px; - position: relative; - float: left; - - &:before { - content: " "; - display: block; - width: 96px; - height: 96px; - //background: image-url("premium-teams/job-arrow.png") no-repeat; - position: absolute; - top: 0px; - //left: -120px; - } - - h3 { - font-size: 2.4em; - //width: 460px; - float: left; - margin-bottom: 10px; - - span { - display: block; - text-transform: uppercase; - margin-bottom: 10px; - padding-top: 5px; - font-size: 0.8em; - letter-spacing: 0.3em; - } - } - - ul { - //width: 460px; - width: 100%; - float: left; - li { - font-size: 1.5em; - margin-bottom: 10px; - line-height: 1.6em; - padding-right: 30px; - - &:last-child { - margin-bottom: 0; - } - } - } - - .skills { - li { - float: left; - background: rgba(0, 0, 0, 0.2); - padding: 3px 6px; - font-size: 0.8em; - margin-right: 6px; - margin-bottom: 5px; - @include border-radius(4px); - } - } - - .salary { - float: right; - } - - .application { - padding: 20px 20px; - - form.resume { - display: inline-block; - - } - } - - } - - .apply, .learn-more, .send-application { - font-family: "MuseoSans-500"; - float: right; - display: block; - //margin: auto 30%; - margin-bottom: 15px; - width: 275px; - height: 40px; - line-height: 40px; - color: #fff; - font-size: 1.4em; - background: $branding; - //background: rgba(255,255,255,0.5); - border: 1px solid rgba(255, 255, 255, 0.1); - text-align: center; - @include border-radius(4px); - margin-top: 15px; - text-transform: uppercase; - letter-spacing: 1px; - -webkit-box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.1); - box-shadow: 0px 2px 1px 0px rgba(0, 0, 0, 0.1); - - &:hover { - opacity: 0.5; - } - } - - .send-application { - float: none; - } - - //show and hide application panel - .application { - background: rgba(225, 225, 225, 0.2); - width: 430px !important; - margin: 25px 140px !important; - @include border-radius(6px); - overflow: auto; - - li { - a { - font-size: 0.9em !important; - } - } - - .resume { - width: 290px !important; - overflow: hidden; - a { - color: #fff; - &.change { - color: blue; - } - } - } - - } - //application - - } - - .job-style-2, .job-style-3, .job-style-4 { - padding: 0; - - //show and hide application panel - .application { - width: auto !important; - margin: 0 0 10px 0 !important; - - .resume { - width: 170px !important; - } - - } - //application - - .apply, .learn-more, .send-application { - width: 100%; - } - - .job { - float: left; - width: 40.6%; - margin-left: 30px; - //margin-bottom: 20px; - - &:before { - display: none; - } - - &:first-child { - margin: 0; - } - - h3 { - font-size: 1.6em; - margin-bottom: 5px; - width: 100%; - } - - ul { - width: 100%; - float: none; - - li { - font-size: 1.4em; - line-height: 1.4em; - padding-right: 0; - } - } - - .location-learn-more { - border-top: dashed 2px rgba(0, 0, 0, 0.2); - border-bottom: dashed 2px rgba(0, 0, 0, 0.2); - padding: 8px 0px; - - ul { - float: none; - } - - } - - .apply { - display: block; - width: auto; - float: none; - } - } - } - - .job-style-3 { - - .job { - width: 23.5%; - //margin-bottom: 20px; - - .skills { - li { - margin-bottom: 5px; - } - } - - .learn-more, .apply { - width: 100%; - } - - } - } - - .job-style-4 { - - .job { - width: 40.6%; - //margin-bottom: 20px; - //min-height: 100%; - //min-height: 100px; - - //clear: both; - float: none; - display: inline-block; - vertical-align: top; - - &:first-child { - margin-bottom: 20px; - } - - &:nth-child(odd) { - margin-left: 0; - } - - } - } -} - -//jobs-div - -//jobs section - -#why-work { - background: image-url("premium-teams/paper-texture.jpg") repeat; - padding-bottom: 40px; - - .header { - height: 100px; - border-bottom: solid 1px #eaeaea; - - .heading { - line-height: 100px; - text-align: center; - } - } - - .img { - float: right; - width: 300px; - height: 300px; - margin: 30px 70px 0 0; - overflow: hidden; - @include border-radius(300px); - border: 10px solid $branding; - - img { - //width: 100%; - height: 100%; - } - } - - .reasons { - margin: 30px 0 0 70px; - width: 440px; - - h3 { - font-size: 1.8em; - margin-bottom: 5px; - } - - li { - line-height: 22px; - //margin-bottom: 20px; - padding: 0 0 20px 90px; - position: relative; - background: image-url("premium-teams/dots.png") repeat-y 28px 0px; - - &:last-child { - padding-bottom: 0; - background: 0; - } - - .number { - position: absolute; - width: 58px; - height: 58px; - background: $branding image-url("premium-teams/paper-numbers.png") no-repeat top; - top: 0px; - left: 0px; - } - - .two { - background-position: 0px -58px; - } - - .three { - background-position: 0px -116px; - } - } - } -} - -.location { - position: relative; - - #location-map { - width: 100%; - min-height: 485px; - display: block; - } - - .location-details { - color: #fff; - position: absolute; - top: 50px; - right: 0px; - z-index: 100; - width: 460px; - background: rgba(0, 0, 0, 0.7); - - .poi { - //padding-top: 10px; - - li { - background: image-url("premium-teams/poi.png") no-repeat top left; - padding-left: 30px; - font-size: 1.3em; - margin-bottom: 10px; - line-height: 22px; - } - } - - .selected { - padding: 30px 30px 20px 30px; - - h3 { - font-family: "Georgia"; - font-style: italic; - font-size: 1.8em; - margin-bottom: 10px; - } - - .address { - //margin-bottom: 5px; - font-family: "MuseoSans-500"; - } - - .description { - line-height: 22px; - margin-bottom: 10px; - } - } - - .locations { - background: rgba(0, 0, 0, 0.3); - padding: 30px; - - li { - float: left; - margin: 0 10px 8px 0; - - &:first-child { - //margin: 0; - } - } - - a { - color: #fff; - font-size: 1.2em; - display: inline-block; - padding: 6px 12px; - background: #000; - @include border-radius(4px); - } - } - } -} - -//location - -#featured-links { - background: image-url("premium-teams/wood.png") repeat; - - .header { - height: 100px; - background: rgba(157, 83, 25, 0.16); - - .heading { - line-height: 100px; - text-align: center; - color: #fff; - font-family: "MuseoSans-100"; - text-transform: uppercase; - letter-spacing: 3px; - font-size: 2.6em; - } - } - - .footer { - background: rgba(157, 83, 25, 0.16); - height: 30px; - border-top: solid 1px rgba(0, 0, 0, 0.02); - } - - .inside { - -webkit-box-shadow: inset 0 2px 9px rgba(168, 91, 29, 0.43); - -moz-box-shadow: inset 0 2px 9px rgba(168, 91, 29, 0.43); - box-shadow: inset 0 2px 9px rgba(168, 91, 29, 0.43); - } - - .the-books { - padding: 40px 70px 20px 70px; - text-align: center; - - li { - margin-left: 19px; - margin-bottom: 20px; - width: 118px; - display: inline-block; - - &:nth-child(6n+1) { - margin-left: 0; - } - - img { - width: 100%; - -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22); - -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22); - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.22); - } - - a { - - &:hover { - opacity: 0.5; - } - } - } - } -} - -#meet-us { - color: #fff; - padding: 30px 70px; - background: $branding; - - header { - //height: 100px; - - h2 { - //line-height: 100px; - font-family: "MuseoSans-100"; - margin-bottom: 30px; - font-size: 3.6em; - } - } - - .event { - background: rgba(0, 0, 0, 0.2); - margin-bottom: 20px; - @include border-radius(4px); - padding: 20px 40px; - - .left { - float: left; - width: 460px; - } - - h3 { - font-family: "MuseoSans-300"; - margin-bottom: 6px; - font-size: 1.8em; - } - - li { - font-size: 1.4em; - } - - .date { - float: right; - width: 77px; - height: 77px; - @include border-radius(100px); - background: $branding; - - p { - padding-top: 15px; - font-size: 2.3em; - text-align: center; - - } - - span { - display: block; - font-size: 1.4em; - text-align: center; - } - } - } -} - -//meet - -.interview { - border-top: solid 1px #eaeaea; - border-bottom: solid 1px #eaeaea; - - .header { - height: 100px; - border-bottom: solid 1px #eaeaea; - - .heading { - line-height: 100px; - text-align: center; - font-size: 2.2em; - } - } - - .inside { - padding: 30px 70px 0px 70px; - } - - .steps { - //padding-left: 100px; - - li { - position: relative; - padding-bottom: 20px; - - &:last-child { - margin-bottom: 0; - } - - .step-inside { - background: image-url("premium-teams/paper-texture.jpg") repeat; - border: solid 1px #eaeaea; - font-size: 1.6em; - width: 470px; - padding: 10px 25px; - min-height: 60px; - margin-left: 100px; - @include border-radius(6px); - -webkit-box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.05); - box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.05); - } - - .number { - position: absolute; - top: 0px; - left: 0px; - display: block; - width: 60px; - height: 69px; - line-height: 72px; - font-size: 2.6em; - text-align: center; - font-family: "MuseoSans-900"; - color: #fff; - background: $branding image-url("premium-teams/hex-number.png") no-repeat top; - } - - &:nth-child(odd) { - background: image-url("premium-teams/interview-line.jpg") repeat-y 29px 0px, image-url("premium-teams/interview-line3.jpg") no-repeat 638px -50px; - - &:last-child { - background: image-url("premium-teams/interview-line3.jpg") no-repeat 638px -50px; - } - } - - &:nth-child(even) { - background: image-url("premium-teams/interview-line2.jpg") no-repeat 29px -50px, image-url("premium-teams/interview-line.jpg") repeat-y 789px 0px;; - - .step-inside { - margin-left: 200px; - margin-right: 100px; - } - - .number { - left: 760px; - } - - &:last-child { - background: image-url("premium-teams/interview-line2.jpg") no-repeat 29px -50px; - } - } - - &:first-child { - background: image-url("premium-teams/interview-line.jpg") repeat-y 29px 0px; - } - - &:last-child { - padding-bottom: 50px; - } - - } - } -} - -//interview - -#video { - background: $branding; -} - -#team-blog { - - header { - padding: 30px 0; - border-bottom: 1px solid #eaeaea; - - h2 { - text-align: center; - } - } - - .inside { - //padding: 0px 70px 30px 70px; - - article { - float: left; - width: 349px; - border-left: dotted 2px #eaeaea; - padding: 65px; - //margin-right: 30px; - position: relative; - - &:first-child { - border: 0; - //padding-left: 0; - } - - h3 { - margin-bottom: 10px; - font-size: 1.6em; - a { - color: $branding; - } - } - - .date { - background: $branding; - padding-top: 15px; - width: 65px; - height: 50px; - right: 0px; - top: 0px; - color: #fff; - position: absolute; - text-align: center; - - p { - font-size: 2.4em; - margin-bottom: 0px; - } - - span { - font-size: 1.4em; - text-transform: uppercase; - } - } - - p { - line-height: 22px; - margin-bottom: 20px; - } - - .read-more { - font-size: 1.4em; - color: #fff; - display: inline-block; - padding: 8px 16px; - background: $branding; - @include border-radius(6px); - } - } - } - -} - -#team-protips { - border-bottom: solid 1px #eaeaea; - - header { - padding: 30px 70px; - border-bottom: 1px solid #eaeaea; - - h2 { - font-family: "MuseoSans-300"; - text-align: center; - float: left; - font-size: 2em; - padding-top: 10px; - } - - .view-more { - float: right; - background: $branding; - color: #fff; - font-size: 1.3em; - padding: 10px 20px; - @include border-radius(6px); - - &:hover { - opacity: 0.5; - } - } - } - - .inside { - - article { - float: left; - width: 349px; - border-left: dotted 2px #eaeaea; - padding: 65px; - //margin-right: 30px; - position: relative; - min-height: 110px; - - &:first-child { - border: 0; - //padding-left: 0; - } - - h3 { - margin-bottom: 10px; - font-size: 2em; - max-width: 290px; - - a { - color: $branding; - display: block; - &:hover { - opacity: 0.5; - } - } - } - - .upvote { - display: block; - width: 60px; - height: 42px; - padding-top: 38px; - background: image-url("protips/ribbon.png") no-repeat; - background-size: 60px 160px; - position: absolute; - top: 0px; - right: 25px; - font-size: 1.3em; - text-align: center; - color: white; - } - } - } -} - -#stack { - background: $branding image-url("premium-teams/pattern.png") repeat; - border-top: solid 1px #eaeaea; - - .header { - height: 100px; - - .heading { - background: #fff; - line-height: 100px; - font-family: "MuseoSans-300"; - font-size: 2.1em; - color: $branding; - text-align: center; - } - } - - .inside { - padding: 30px 70px; - } - - .stack-list { - background: image-url("premium-teams/big-dots.png") repeat-y center; - - li { - display: inline-block; - vertical-align: top; - width: 320px; - padding: 20px; - background: rgba(0, 0, 0, 0.3); - color: #fff; - font-size: 1.8em; - text-align: center; - position: relative; - @include border-radius(6px); - margin-bottom: 20px; - - &:nth-child(even) { - margin-left: 96px; - - &:before { - content: " "; - display: block; - position: absolute; - left: -16px; - top: 30%; - width: 0; - height: 0; - border-top: 10px solid transparent; - border-right: 16px solid rgba(0, 0, 0, 0.3); - border-bottom: 10px solid transparent; - } - } - - &:nth-child(odd) { - - &:before { - content: " "; - display: block; - position: absolute; - right: -16px; - top: 30%; - width: 0; - height: 0; - border-top: 10px solid transparent; - border-left: 16px solid rgba(0, 0, 0, 0.3); - border-bottom: 10px solid transparent; - } - } - } - } -} - -.inactive { - //opacity: 0.2; - //border-top: 2px solid $dark-grey !important; - border: 0 !important; - - .inactive-box { - text-align: center; - background: rgba(0, 0, 0, 0.8); - padding: 20px; - @include border-radius(6px); - z-index: 1000; - position: absolute; - top: 30%; - left: 33%; - width: 30%; - //margin: 22% 0 0 22%; - -webkit-box-shadow: 0px 1px 2px 2px rgba(0, 0, 0, 0.1); - - box-shadow: 0px 1px 2px 2px rgba(0, 0, 0, 0.1); - - h2 { - color: #fff; - text-transform: uppercase; - font-size: 1.4em; - margin-bottom: 10px; - } - - p { - color: #fff; - margin-bottom: 20px; - font-size: 1.3em; - } - - a { - display: block; - background: $light-blue; - padding: 12px 24px; - color: #fff; - font-size: 1.6em; - @include border-radius(4px); - @include transition-all; - - &:hover { - background: $green; - } - } - } - - &:before { - //background: rgba(255, 255, 255, 0.9); - background: rgba(0, 0, 0, 0.6); - content: " "; - display: block; - width: 100%; - height: 100%; - position: absolute; - top: 0px; - left: 0px; - z-index: 1000; - @include transition-all; - -webkit-box-shadow: inset 0px 0px 8px 8px rgba(0, 0, 0, 0.1); - box-shadow: inset 0px 0px 8px 8px rgba(0, 0, 0, 0.1); - } - - &:hover { - &:before { - //background: rgba(255, 255, 255, 0.7); - background: rgba(0, 0, 0, 0.3); - } - } - - // &:before { - // background: rgba(0, 0, 0, 0.6); - // content: " "; - // display: block; - // width: 100%; - // height: 100%; - // position: absolute; - // top: 0px; - // left: 0px; - // z-index: 1000; - // @include transition-all; - // } - // - // &:hover { - // &:before { - // background: rgba(0, 0, 0, 0.3); - // } - // } -} - -.inactive { - min-height: 350px; - //overflow: hidden; - - .edit { - display: none; - } -} - -//Premium teams admin -@import "premium-team-admin"; diff --git a/app/assets/stylesheets/product_description.css.scss b/app/assets/stylesheets/product_description.css.scss new file mode 100644 index 00000000..37529262 --- /dev/null +++ b/app/assets/stylesheets/product_description.css.scss @@ -0,0 +1,1184 @@ +@import "base"; +@import "compass/css3"; + +#product-description { + + * { + box-sizing: border-box; + } + + fieldset { + margin: 0; + padding: 0; + border: none; + } + + .main-content { + background: #d3d3d3 image-url("premium-team-description/dot-bg.jpg") repeat; + padding: 0 0 5% 0; + } + + #footer { + min-width: 100%; + max-width: 1140px !important; + .inside-footer { + max-width: 1140px; + } + } + + .wrapper { + max-width: 1140px; + margin: 0 auto; + padding-bottom: 5%; + background: #fff; + } + + .masthead { + padding: 5% 7%; + + .desc-logo { + float: left; + + img { + width: 227px; + } + + span { + display: none; + } + } + + h2 { + float: right; + font-size: 1.8em; + text-transform: uppercase; + color: $light-blue; + margin-top: 1%; + font-family: "MuseoSans-300"; + } + } + + .title { + background: $light-blue; + padding: 3.5% 12%; + + h1 { + color: #fff; + font-family: "MuseoSans-100"; + font-size: 3em; + line-height: 1.6em; + text-align: center; + } + } + + .packages { + background: $light-blue; + padding-bottom: 3.5%; + + > ul { + text-align: center; + padding: 0 6%; + + .center { + margin: 0 4%; + } + + .selected { + footer { + a { + background: $light-blue; + color: #fff; + border: solid 1px #2871ac; + } + } + } + + > li { + display: inline-block; + background: #fff; + @include border-radius(4px); + width: 30%; + vertical-align: top; + overflow: hidden; + box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.2); + + footer { + padding: 6%; + + a { + display: block; + font-family: "MuseoSans-500"; + font-size: 1.6em; + @include border-radius(4px); + text-transform: uppercase; + height: 40px; + line-height: 40px; + text-align: center; + color: #757575; + background: #ffffff; /* Old browsers */ + background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%); /* W3C */ + border: solid 1px #e6e6e6; + + &:hover { + opacity: 0.5; + } + } + } + + ul { + + li { + text-align: left; + font-size: 1.3em; + background: image-url("premium-team-description/tick.png") no-repeat 5% 50%; + border-bottom: dashed 1px #eaeaea; + padding: 4% 12% 4% 16%; + + &:nth-child(odd) { + background: #f5f5f5 image-url("premium-team-description/tick.png") no-repeat 5% 50%; + } + + a { + color: $light-blue; + } + } + } + } + + } + + h2 { + text-transform: uppercase; + font-family: "MuseoSans-700"; + font-size: 1.6em; + padding: 6% 0; + letter-spacing: 0.2em; + border-bottom: solid 1px #eaeaea; + background: $dark-grey; + color: #fff; + } + + h3 { + font-size: 3em; + color: $light-blue; + padding: 4% 0; + //border-bottom: solid 1px #eaeaea; + @include ts-bottom-white; + + span { + font-size: 0.5em; + text-transform: uppercase; + } + } + + .free h3 { + color: $red; + background: #f7dede; + } + + .monthly h3 { + color: $green; + background: #e1f1d1; + } + + .one-off h3 { + background: #d8e8f5; + } + } + + .feature { + background: #eee image-url("premium-team-description/feature-image3.jpg") no-repeat 100%; + background-size: cover; + //padding: 0 7%; + + .intro { + float: left; + width: 50%; + min-height: 450px; + padding: 5% 7%; + //max-width: 474px; + background: rgba(0, 0, 0, 0.8); + color: #fff; + + .error { + font-size: 1.4em; + background: $red; + color: #fff; + padding: 1%; + text-align: center; + display: block; + width: 50%; + margin: 0 auto 3% auto; + } + + .notice { + font-size: 1.4em; + background: $green; + color: #fff; + padding: 1%; + text-align: center; + display: block; + width: 50%; + margin: 0 auto 3% auto; + } + + .errors { + width: 90%; + background: $red; + overflow: auto; + padding: 2% 4%; + margin-bottom: 4%; + @include border-radius(4px); + + li { + font-size: 1.3em; + } + + h4 { + text-transform: none; + } + } + + h2 { + font-family: "MuseoSans-300"; + font-size: 2.4em; + margin-bottom: 5%; + } + + p { + font-size: 1.4em; + line-height: 1.8em; + margin-bottom: 5%; + } + + #post-a-job, #create-team { + label { + font-size: 1.3em; + margin-bottom: 2%; + display: block; + } + + input[type=text], input[type=submit], textarea, .button-link { + width: 90%; + height: 45px; + //padding: 2% 20px; + margin-bottom: 5%; + font-size: 1.2em; + display: block; + //text-transform: uppercase; + font-family: "MuseoSans-500"; + border: 0; + color: #555; + @include border-radius(4px); + } + + input[type=text], textarea { + //padding-left: 5%; + text-indent: 25px; + //background: #000; + box-shadow: inset 0px 3px 1px 0px rgba(0, 0, 0, 0.1); + } + + textarea { + height: 150px; + line-height: normal; + padding-top: 20px; + padding-left: 35px; + padding-right: 35px; + text-indent: 0; + } + + #post-a-job .save input, #create-team .save input { + width: 90%; + } + + .email-address { + background: #fff image-url("premium-team-description/email.png") no-repeat 10px 48%; + background-size: 14px 13px; + } + + .company-name { + background: #fff image-url("premium-team-description/flag.png") no-repeat 10px 48%; + background-size: 14px 13px; + } + + input[type=submit] { + color: #fff; + text-align: center; + background: $light-blue; + font-size: 1.5em; + width: 90%; + //text-transform: capitalize; + + &:hover { + background: $green; + } + } + } + //post-a-job & create-a-team + } + //intro + } + //feature + + .payment { + background-image: none; + + .intro { + width: 100%; + + .plans-heading { + font-size: 1.8em; + text-align: center; + width: 70%; + margin: 0 auto 3% auto; + + &:before, &:after { + content: " "; + float: left; + width: 100px; + height: 2px; + background: rgba(225, 225, 225, 0.2); + margin-top: 8px; + } + + &:before { + float: left; + } + + &:after { + float: right; + } + } + + .plans { + width: 100%; + //display: inline-block; + //float: left; + margin-bottom: 10px; + overflow: auto; + + li { + background: #fff; + @include border-radius(4px); + color: $dark-grey; + margin-left: 4%; + padding: 3%; + opacity: 0.8; + float: left; + width: 30.6%; + + &:first-child { + margin-left: 0; + } + + &:hover { + opacity: 1; + } + } + + .monthly { + span { + color: $green; + background: #e1f1d1; + } + } + + .single, .visitor-analytics { + span { + color: $light-blue; + background: #d8e8f5; + } + } + + .free { + span { + color: $red; + background: #f7dede; + } + } + + span { + font-size: 1.4em; + display: inline-block; + width: 46px; + height: 46px; + line-height: 46px; + text-align: center; + @include border-radius(50%); + vertical-align: top; + font-family: "MuseoSans-500"; + margin-bottom: 5%; + } + + .details { + display: inline-block; + padding: 0 4%; + vertical-align: middle; + //min-width: 210px; + width: 77%; + margin-bottom: 10%; + + h3, h4 { + font-size: 1.4em; + } + + h3 { + text-transform: uppercase; + font-family: "MuseoSans-700"; + margin-bottom: 2%; + } + + h4 { + text-transform: none; + color: #5f5f5f; + font-family: "MuseoSans-500"; + } + + @media screen and (min-width: 768px) { + min-height: 55px; + } + } + + .selected { + opacity: 1.0; + } + .select { + //vertical-align: center; + //margin-top: 6px; + display: block; + background: $light-blue; + color: #fff; + text-align: center; + font-size: 1.4em; + padding: 4% 6%; + @include border-radius(4px); + + &:hover { + background: $green; + } + } + // + // li:last-child { + // background: none; + // text-align: center; + // color: #fff; + // opacity: 1; + // + // a { + // color: $light-blue; + // text-decoration: underline; + // } + // } + + } + //plans + } + //intro + } + //payment + + .find-team { + background-image: none; + + .intro { + width: 100%; + + .team-form { + width: 42%; + float: left; + } + .results { + width: 56%; + padding-left: 10%; + float: right; + background: image-url("team/circle-arrow.png") no-repeat left center; + color: $dark-grey; + + h3 { + font-size: 1.5em; + font-family: "MuseoSans-500"; + color: #606060; + margin-bottom: 5%; + } + + .team-results { + background: #f8f8f8; + @include border-radius-top(6px); + padding: 6% 8%; + border-bottom: solid 1px #e4e4e4; + + .results-list { + + li { + margin-bottom: 3%; + } + + .team-avatar { + display: inline-block; + img { + width: 32px; + height: 32px; + @include border-radius(4px); + } + } + + h4 { + display: inline-block; + vertical-align: top; + padding: 2% 4% 0 4%; + text-transform: none; + font-size: 1.4em; + font-family: "MuseoSans-300"; + } + + .select { + margin-top: 6px; + display: inline-block; + float: right; + background: $light-blue; + color: #fff; + text-align: center; + font-size: 1.4em; + padding: 2% 3%; + @include border-radius(4px); + + &:hover { + background: $green; + } + } + //select + + } + //results-list + } + //team-results + + .just-create-team { + background: #eee; + @include border-radius-bottom(4px); + padding: 6% 8%; + border-top: 1px solid #fff; + + .create-team { + display: block; + padding: 4%; + margin-top: 6px; + background: $green; + color: #fff; + text-align: center; + font-size: 1.6em; + @include border-radius(4px); + + &:hover { + background: $light-blue; + } + } + } + //just-create-team + } + //results + + } + //intro + } + //find-team + + .card-section { + //background: rgba(0, 0, 0, 0.8); + //display: inline-block; + float: right; + width: 47%; + //margin: auto 25%; + //clear: both !important + margin-bottom: 5%; + + h2 { + text-align: center; + color: #fff; + margin: 4% 0; + font-size: 3em; + font-family: "MuseoSans-100"; + } + } + + .sign-up-form { + //margin: 0 auto; + //max-width: 620px; + + } + + .steps { + padding-top: 5%; + + .img { + width: 59%; + } + + img { + display: block; + max-width: 100%; + //max-width: 568px; + } + + .text { + width: 38%; + padding-top: 15%; + + p { + line-height: 1.6em; + } + h3 { + margin-bottom: 1em; + font-size: 1.8em; + } + } + + .step-one, .step-two, .step-three { + padding: 0 7%; + margin-bottom: 5%; + } + + .step-one, .step-three { + background: image-url("premium-team-description/circle-line.png") no-repeat 27% 20%, image-url("premium-team-description/grad.png") repeat-x 0% 115%; + + .img { + float: right; + } + .text { + float: left; + padding-right: 2%; + } + } + + .step-two { + background: image-url("premium-team-description/circle-line2.png") no-repeat 80% 20%, image-url("premium-team-description/grad.png") repeat-x 0% 115%; + + .img { + float: left; + } + .text { + float: right; + padding-left: 2%; + text-align: right; + } + } + } + + .big-button { + color: #fff; + text-align: center; + background: $light-blue; + font-size: 1.8em; + width: 60%; + margin: 0 auto; + text-transform: capitalize; + display: block; + height: 60px; + line-height: 60px; + @include border-radius(4px); + + &:hover { + background: $green; + } + + &:visited { + color: #fff; + } + } + + .faq { + padding: 4% 10%; + + h2 { + text-align: center; + margin-bottom: 4%; + font-size: 3em; + font-family: "MuseoSans-100"; + } + + ul { + li { + text-align: center; + font-size: 1.6em; + margin-bottom: 1%; + + &:nth-child(odd) { + color: $light-blue; + font-family: "MuseoSans-500"; + } + + &:nth-child(even) { + margin-bottom: 4%; + } + + &:last-child { + margin-bottom: 0; + } + } + } + } + + .credit-card { + background: #f1f0f5; + border-radius: 16px; + box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.2); + padding: 4% 0 7% 0; + //margin-bottom: 6%; + text-transform: uppercase; + } + + .card-btm { + padding: 5% 7% 0 5%; + overflow: auto; + #stripe_error { + color: $red; + font-size: 1.4em; + } + } + + .purchase { + color: #fff; + text-align: center; + background: $light-blue; + font-size: 1.8em; + width: 60%; + margin: 0 auto; + text-transform: capitalize; + display: block; + height: 60px; + line-height: 60px; + @include border-radius(4px); + border: 0; + + &:hover { + background: $green; + } + + .processing { + background: $light-grey; + } + } + + .credit-card { + h3 { + background: $light-blue; + color: #fff; + height: 50px; + line-height: 50px; + padding-left: 7%; + font-weight: 700; + font-size: 2em; + letter-spacing: 0.2em; + } + label { + color: #676767; + font-size: 1.4em; + display: block; + margin-bottom: 10px; + } + input[type=text] { + padding: 15px; + border: 0; + color: $red; + font-size: 1.3em; + } + } + + .card-number input[type=text] { + width: 100%; + margin-bottom: 20px; + } + + .expiration { + float: left; + } + + .cvc { + float: right; + } + + .expiration input[type=text], .cvc input[type=text] { + width: 75px; + text-align: center; + } + + .expiration input[type=text] { + margin-right: 15px; + } + + .sign-up-form input[type=submit] { + background: $light-blue; + border: 0; + display: block; + width: 100%; + height: 80px; + margin-bottom: 7%; + margin-top: 6%; + font-weight: 700; + color: #fff; + font-size: 2em; + letter-spacing: 0.2em; + text-transform: uppercase; + border-bottom: 4px solid #000; + border-radius: 16px; + &:hover { + opacity: 0.5; + } + } + + .small-print { + font-size: 1.4em; + text-align: center; + color: #8f2e03; + } + + //thank you section + .thankyou { + padding: 0 7%; + + h1 { + font-size: 1.6em; + text-align: center; + margin-bottom: 7%; + padding: 7% 0; + border-top: 3px #eaeaea solid; + border-bottom: 3px #eaeaea solid; + } + + .big-button { + width: 50%; + } + } + + //signup + .sign-up { + background: #eaeaea; + .intro { + margin: 0 auto; + float: none; + + label { + display: block; + font-size: 1.2em; + margin-bottom: 3%; + } + + small { + font-size: 1.1em; + } + + input[type=text] { + text-indent: 15px; + } + + // .short-number { + // width: 30% !important; + // } + } + } + + //media queries + @media screen and (max-width: 1076px) { + + .payment { + .intro { + .plans-heading { + width: 100%; + + &:before, &:after { + display: none; + } + } + } + //intro + } + //payment + } + + @media screen and (max-width: 768px) { + + .find-team { + background-image: none; + + .intro { + width: 100%; + + .team-form { + width: 100%; + float: none; + margin-bottom: 5%; + } + .results { + width: 100%; + padding-left: 0; + float: none; + background: none; + } + + } + //intro + } + //find-team + + .payment { + .intro { + + .plans { + li { + width: 100%; + float: none; + margin: 0; + margin-bottom: 5%; + } + } + + .plans, .card-section { + width: 80%; + margin: 0 auto; + float: none; + } + + .card-section { + margin-bottom: 5%; + } + + } + //intro + } + //payment + + .step-one, .step-two, .step-three { + background: none !important; + .text { + padding-top: 5%; + } + } + + .packages { + > ul { + padding: 0 7%; + + .center { + margin: 0; + margin-bottom: 4%; + } + + li { + width: 80%; + margin-bottom: 4%; + + ul { + //padding: 4% 4% 0 4%; + li { + width: 100%; + margin: 0; + } + } + } + } + h2 { + padding: 4% 0; + } + + h3 { + padding: 3% 0; + } + } + + .feature { + .intro { + width: 100%; + } + } + + .masthead { + .desc-logo { + float: none; + display: block; + margin: 0 auto 10px auto; + width: 220px; + img { + width: 220px; + } + } + + h2 { + clear: both; + width: 100%; + text-align: center; + font-size: 1.8em; + } + } + + #footer { + .inside-footer { + #tweetbtn { + float: none; + display: block; + margin-bottom: 15px; + } + #footer-nav { + .footer-links { + li { + margin: 0 15px 5px 0; + margin-left: 0; + //background: #000; + } + } + } + } + } + + } + //768 + + @media screen and (max-width: 400px) { + + .payment { + .intro { + + .plans, .card-section { + width: 100%; + } + + .plans { + li { + padding: 5% 6%; + } + + .select { + width: 100%; + } + + .details { + width: 70%; + } + } + + } + //intro + } + //payment + + .step-one, .step-two, .step-three { + .img { + width: 100%; + } + .text { + width: 100%; + } + } + + .packages { + > ul { + li { + width: 100%; + } + } + } + + .masthead { + .desc-logo { + width: 180px; + img { + width: 180px; + } + } + + h2 { + font-size: 1.4em; + } + } + + .title { + h1 { + color: #fff; + font-family: "MuseoSans-100"; + font-size: 2em; + line-height: 1.6em; + text-align: center; + } + } + + .card-section, .faq { + h2 { + font-size: 2em; + } + } + + .feature { + //padding: 0 5%; + .intro { + //padding: 5% 7%; + h2 { + font-size: 1.8em; + } + p { + line-height: 1.6em; + } + + #post-a-job, #create-team { + input[type=text], input[type=submit] { + width: 100%; + } + } + } + } + + .sign-up-form input[type=submit] { + font-size: 1.4em; + } + + } + //400 + + .sign-up-buttons { + li { + margin-bottom: 25px; + //@include blue-btn; + font-size: 1.3em; + background: $light-blue; + @include border-radius(6px); + @include transition-all; + height: 58px; + line-height: 58px; + //text-align: left; + + &:hover { + opacity: 0.8; + } + a { + color: #fff; + text-transform: capitalize; + font-size: 1.2em; + display: block; + text-align: center; + position: relative; + + div { + height: 58px; + width: 46px; + //float: left; + position: absolute; + top: 2%; + left: 8%; + //margin: 0 20px 0 20%; + background: image-url("sign-up-sprite.png") no-repeat bottom left; + } + + .twitter { + background-position: 0px -58px; + } + + .github { + background-position: top left; + } + } + } + } + //sign-up buttons + +} + +//body end diff --git a/app/assets/stylesheets/product_description.scss b/app/assets/stylesheets/product_description.scss deleted file mode 100644 index 4e16ae9a..00000000 --- a/app/assets/stylesheets/product_description.scss +++ /dev/null @@ -1,1186 +0,0 @@ -@import "base"; -@import "compass/css3/"; - -#product-description { - - * { - -moz-box-sizing: border-box; - -webkit-box-sizing: border-box; - box-sizing: border-box; - } - - fieldset { - margin: 0; - padding: 0; - border: none; - } - - .main-content { - background: #d3d3d3 image-url("premium-team-description/dot-bg.jpg") repeat; - padding: 0 0 5% 0; - } - - #footer { - min-width: 100%; - max-width: 1140px !important; - .inside-footer { - max-width: 1140px; - } - } - - .wrapper { - max-width: 1140px; - margin: 0 auto; - padding-bottom: 5%; - background: #fff; - } - - .masthead { - padding: 5% 7%; - - .desc-logo { - float: left; - - img { - width: 227px; - } - - span { - display: none; - } - } - - h2 { - float: right; - font-size: 1.8em; - text-transform: uppercase; - color: $light-blue; - margin-top: 1%; - font-family: "MuseoSans-300"; - } - } - - .title { - background: $light-blue; - padding: 3.5% 12%; - - h1 { - color: #fff; - font-family: "MuseoSans-100"; - font-size: 3em; - line-height: 1.6em; - text-align: center; - } - } - - .packages { - background: $light-blue; - padding-bottom: 3.5%; - - > ul { - text-align: center; - padding: 0 6%; - - .center { - margin: 0 4%; - } - - .selected { - footer { - a { - background: $light-blue; - color: #fff; - border: solid 1px #2871ac; - } - } - } - - > li { - display: inline-block; - background: #fff; - @include border-radius(4px); - width: 30%; - vertical-align: top; - overflow: hidden; - -webkit-box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.2); - box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.2); - - footer { - padding: 6%; - - a { - display: block; - font-family: "MuseoSans-500"; - font-size: 1.6em; - @include border-radius(4px); - text-transform: uppercase; - height: 40px; - line-height: 40px; - text-align: center; - color: #757575; - background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%, #f5f5f5 100%); /* IE10+ */ - background: linear-gradient(to bottom, #ffffff 0%, #f5f5f5 100%); /* W3C */ - border: solid 1px #e6e6e6; - - &:hover { - opacity: 0.5; - } - } - } - - ul { - - li { - text-align: left; - font-size: 1.3em; - background: image-url("premium-team-description/tick.png") no-repeat 5% 50%; - border-bottom: dashed 1px #eaeaea; - padding: 4% 12% 4% 16%; - - &:nth-child(odd) { - background: #f5f5f5 image-url("premium-team-description/tick.png") no-repeat 5% 50%; - } - - a { - color: $light-blue; - } - } - } - } - - } - - h2 { - text-transform: uppercase; - font-family: "MuseoSans-700"; - font-size: 1.6em; - padding: 6% 0; - letter-spacing: 0.2em; - border-bottom: solid 1px #eaeaea; - background: $dark-grey; - color: #fff; - } - - h3 { - font-size: 3em; - color: $light-blue; - padding: 4% 0; - //border-bottom: solid 1px #eaeaea; - @include ts-bottom-white; - - span { - font-size: 0.5em; - text-transform: uppercase; - } - } - - .free h3 { - color: $red; - background: #f7dede; - } - - .monthly h3 { - color: $green; - background: #e1f1d1; - } - - .one-off h3 { - background: #d8e8f5; - } - } - - .feature { - background: #eee image-url("premium-team-description/feature-image3.jpg") no-repeat 100%; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; - //padding: 0 7%; - - .intro { - float: left; - width: 50%; - min-height: 450px; - padding: 5% 7%; - //max-width: 474px; - background: rgba(0, 0, 0, 0.8); - color: #fff; - - .error { - font-size: 1.4em; - background: $red; - color: #fff; - padding: 1%; - text-align: center; - display: block; - width: 50%; - margin: 0 auto 3% auto; - } - - .errors { - width: 90%; - background: $red; - overflow: auto; - padding: 2% 4%; - margin-bottom: 4%; - @include border-radius(4px); - - li { - font-size: 1.3em; - } - - h4 { - text-transform: none; - } - } - - h2 { - font-family: "MuseoSans-300"; - font-size: 2.4em; - margin-bottom: 5%; - } - - p { - font-size: 1.4em; - line-height: 1.8em; - margin-bottom: 5%; - } - - #post-a-job, #create-team { - label { - font-size: 1.3em; - margin-bottom: 2%; - display: block; - } - - input[type=text], input[type=submit], textarea, .button-link { - width: 90%; - height: 45px; - //padding: 2% 20px; - margin-bottom: 5%; - font-size: 1.2em; - display: block; - //text-transform: uppercase; - font-family: "MuseoSans-500"; - border: 0; - color: #555; - @include border-radius(4px); - } - - input[type=text], textarea { - //padding-left: 5%; - text-indent: 25px; - //background: #000; - -webkit-box-shadow: inset 0px 3px 1px 0px rgba(0, 0, 0, 0.1); - box-shadow: inset 0px 3px 1px 0px rgba(0, 0, 0, 0.1); - } - - textarea { - height: 150px; - line-height: normal; - padding-top: 20px; - padding-left: 35px; - padding-right: 35px; - text-indent: 0; - } - - #post-a-job .save input, #create-team .save input { - width: 90%; - } - - .email-address { - background: #fff image-url("premium-team-description/email.png") no-repeat 10px 48%; - background-size: 14px 13px; - } - - .company-name { - background: #fff image-url("premium-team-description/flag.png") no-repeat 10px 48%; - background-size: 14px 13px; - } - - input[type=submit] { - color: #fff; - text-align: center; - background: $light-blue; - font-size: 1.5em; - width: 90%; - //text-transform: capitalize; - - &:hover { - background: $green; - } - } - } - //post-a-job & create-a-team - } - //intro - } - //feature - - .payment { - background-image: none; - - .intro { - width: 100%; - - .plans-heading { - font-size: 1.8em; - text-align: center; - width: 70%; - margin: 0 auto 3% auto; - - &:before, &:after { - content: " "; - float: left; - width: 100px; - height: 2px; - background: rgba(225, 225, 225, 0.2); - margin-top: 8px; - } - - &:before { - float: left; - } - - &:after { - float: right; - } - } - - .plans { - width: 100%; - //display: inline-block; - //float: left; - margin-bottom: 10px; - overflow: auto; - - li { - background: #fff; - @include border-radius(4px); - color: $dark-grey; - margin-left: 4%; - padding: 3%; - opacity: 0.8; - float: left; - width: 30.6%; - - &:first-child { - margin-left: 0; - } - - &:hover { - opacity: 1; - } - } - - .monthly { - span { - color: $green; - background: #e1f1d1; - } - } - - .single, .visitor-analytics { - span { - color: $light-blue; - background: #d8e8f5; - } - } - - .free { - span { - color: $red; - background: #f7dede; - } - } - - span { - font-size: 1.4em; - display: inline-block; - width: 46px; - height: 46px; - line-height: 46px; - text-align: center; - @include border-radius(50%); - vertical-align: top; - font-family: "MuseoSans-500"; - margin-bottom: 5%; - } - - .details { - display: inline-block; - padding: 0 4%; - vertical-align: middle; - //min-width: 210px; - width: 77%; - margin-bottom: 10%; - - h3, h4 { - font-size: 1.4em; - } - - h3 { - text-transform: uppercase; - font-family: "MuseoSans-700"; - margin-bottom: 2%; - } - - h4 { - text-transform: none; - color: #5f5f5f; - font-family: "MuseoSans-500"; - } - } - - .selected { - opacity: 1.0; - } - .select { - //vertical-align: center; - //margin-top: 6px; - display: block; - background: $light-blue; - color: #fff; - text-align: center; - font-size: 1.4em; - padding: 4% 6%; - @include border-radius(4px); - - &:hover { - background: $green; - } - } - // - // li:last-child { - // background: none; - // text-align: center; - // color: #fff; - // opacity: 1; - // - // a { - // color: $light-blue; - // text-decoration: underline; - // } - // } - - } - //plans - } - //intro - } - //payment - - .find-team { - background-image: none; - - .intro { - width: 100%; - - .team-form { - width: 42%; - float: left; - } - .results { - width: 56%; - padding-left: 10%; - float: right; - background: image-url("team/circle-arrow.png") no-repeat left center; - color: $dark-grey; - - h3 { - font-size: 1.5em; - font-family: "MuseoSans-500"; - color: #606060; - margin-bottom: 5%; - } - - .team-results { - background: #f8f8f8; - @include border-radius-top(6px); - padding: 6% 8%; - border-bottom: solid 1px #e4e4e4; - - .results-list { - - li { - margin-bottom: 3%; - } - - .team-avatar { - display: inline-block; - img { - width: 32px; - height: 32px; - @include border-radius(4px); - } - } - - h4 { - display: inline-block; - vertical-align: top; - padding: 2% 4% 0 4%; - text-transform: none; - font-size: 1.4em; - font-family: "MuseoSans-300"; - } - - .select { - margin-top: 6px; - display: inline-block; - float: right; - background: $light-blue; - color: #fff; - text-align: center; - font-size: 1.4em; - padding: 2% 3%; - @include border-radius(4px); - - &:hover { - background: $green; - } - } - //select - - } - //results-list - } - //team-results - - .just-create-team { - background: #eee; - @include border-radius-bottom(4px); - padding: 6% 8%; - border-top: 1px solid #fff; - - .create-team { - display: block; - padding: 4%; - margin-top: 6px; - background: $green; - color: #fff; - text-align: center; - font-size: 1.6em; - @include border-radius(4px); - - &:hover { - background: $light-blue; - } - } - } - //just-create-team - } - //results - - } - //intro - } - //find-team - - .card-section { - //background: rgba(0, 0, 0, 0.8); - //display: inline-block; - float: right; - width: 47%; - //margin: auto 25%; - //clear: both !important - margin-bottom: 5%; - - h2 { - text-align: center; - color: #fff; - margin: 4% 0; - font-size: 3em; - font-family: "MuseoSans-100"; - } - } - - .sign-up-form { - //margin: 0 auto; - //max-width: 620px; - - } - - .steps { - padding-top: 5%; - - .img { - width: 59%; - } - - img { - display: block; - max-width: 100%; - //max-width: 568px; - } - - .text { - width: 38%; - padding-top: 15%; - - p { - line-height: 1.6em; - } - h3 { - margin-bottom: 1em; - font-size: 1.8em; - } - } - - .step-one, .step-two, .step-three { - padding: 0 7%; - margin-bottom: 5%; - } - - .step-one, .step-three { - background: image-url("premium-team-description/circle-line.png") no-repeat 27% 20%, image-url("premium-team-description/grad.png") repeat-x 0% 115%; - - .img { - float: right; - } - .text { - float: left; - padding-right: 2%; - } - } - - .step-two { - background: image-url("premium-team-description/circle-line2.png") no-repeat 80% 20%, image-url("premium-team-description/grad.png") repeat-x 0% 115%; - - .img { - float: left; - } - .text { - float: right; - padding-left: 2%; - text-align: right; - } - } - } - - .big-button { - color: #fff; - text-align: center; - background: $light-blue; - font-size: 1.8em; - width: 60%; - margin: 0 auto; - text-transform: capitalize; - display: block; - height: 60px; - line-height: 60px; - @include border-radius(4px); - - &:hover { - background: $green; - } - - &:visited { - color: #fff; - } - } - - .faq { - padding: 4% 10%; - - h2 { - text-align: center; - margin-bottom: 4%; - font-size: 3em; - font-family: "MuseoSans-100"; - } - - ul { - li { - text-align: center; - font-size: 1.6em; - margin-bottom: 1%; - - &:nth-child(odd) { - color: $light-blue; - font-family: "MuseoSans-500"; - } - - &:nth-child(even) { - margin-bottom: 4%; - } - - &:last-child { - margin-bottom: 0; - } - } - } - } - - .credit-card { - background: #f1f0f5; - -webkit-border-radius: 16px; - -moz-border-radius: 16px; - border-radius: 16px; - -webkit-box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.2); - box-shadow: 0px 5px 0px 0px rgba(0, 0, 0, 0.2); - padding: 4% 0 7% 0; - //margin-bottom: 6%; - text-transform: uppercase; - } - - .card-btm { - padding: 5% 7% 0 5%; - overflow: auto; - #stripe_error { - color: $red; - font-size: 1.4em; - } - } - - .purchase { - color: #fff; - text-align: center; - background: $light-blue; - font-size: 1.8em; - width: 60%; - margin: 0 auto; - text-transform: capitalize; - display: block; - height: 60px; - line-height: 60px; - @include border-radius(4px); - border: 0; - - &:hover { - background: $green; - } - - .processing { - background: $light-grey; - } - } - - .credit-card { - h3 { - background: $light-blue; - color: #fff; - height: 50px; - line-height: 50px; - padding-left: 7%; - font-weight: 700; - font-size: 2em; - letter-spacing: 0.2em; - } - label { - color: #676767; - font-size: 1.4em; - display: block; - margin-bottom: 10px; - } - input[type=text] { - padding: 15px; - border: 0; - color: $red; - font-size: 1.3em; - } - } - - .card-number input[type=text] { - width: 100%; - margin-bottom: 20px; - } - - .expiration { - float: left; - } - - .cvc { - float: right; - } - - .expiration input[type=text], .cvc input[type=text] { - width: 75px; - text-align: center; - } - - .expiration input[type=text] { - margin-right: 15px; - } - - .sign-up-form input[type=submit] { - background: $light-blue; - border: 0; - display: block; - width: 100%; - height: 80px; - margin-bottom: 7%; - margin-top: 6%; - font-weight: 700; - color: #fff; - font-size: 2em; - letter-spacing: 0.2em; - text-transform: uppercase; - border-bottom: 4px solid #000; - -webkit-border-radius: 16px; - -moz-border-radius: 16px; - border-radius: 16px; - &:hover { - opacity: 0.5; - } - } - - .small-print { - font-size: 1.4em; - text-align: center; - color: #8f2e03; - } - - //thank you section - .thankyou { - padding: 0 7%; - - h1 { - font-size: 1.6em; - text-align: center; - margin-bottom: 7%; - padding: 7% 0; - border-top: 3px #eaeaea solid; - border-bottom: 3px #eaeaea solid; - } - - .big-button { - width: 50%; - } - } - - //signup - .sign-up { - background: #eaeaea; - .intro { - margin: 0 auto; - float: none; - - label { - display: block; - font-size: 1.2em; - margin-bottom: 3%; - } - - small { - font-size: 1.1em; - } - - input[type=text] { - text-indent: 15px; - } - - // .short-number { - // width: 30% !important; - // } - } - } - - //media queries - @media screen and (max-width: 1076px) { - - .payment { - .intro { - .plans-heading { - width: 100%; - - &:before, &:after { - display: none; - } - } - } - //intro - } - //payment - } - - @media screen and (max-width: 768px) { - - .find-team { - background-image: none; - - .intro { - width: 100%; - - .team-form { - width: 100%; - float: none; - margin-bottom: 5%; - } - .results { - width: 100%; - padding-left: 0; - float: none; - background: none; - } - - } - //intro - } - //find-team - - .payment { - .intro { - - .plans { - li { - width: 100%; - float: none; - margin: 0; - margin-bottom: 5%; - } - } - - .plans, .card-section { - width: 80%; - margin: 0 auto; - float: none; - } - - .card-section { - margin-bottom: 5%; - } - - } - //intro - } - //payment - - .step-one, .step-two, .step-three { - background: none !important; - .text { - padding-top: 5%; - } - } - - .packages { - > ul { - padding: 0 7%; - - .center { - margin: 0; - margin-bottom: 4%; - } - - li { - width: 80%; - margin-bottom: 4%; - - ul { - //padding: 4% 4% 0 4%; - li { - width: 100%; - margin: 0; - } - } - } - } - h2 { - padding: 4% 0; - } - - h3 { - padding: 3% 0; - } - } - - .feature { - .intro { - width: 100%; - } - } - - .masthead { - .desc-logo { - float: none; - display: block; - margin: 0 auto 10px auto; - width: 220px; - img { - width: 220px; - } - } - - h2 { - clear: both; - width: 100%; - text-align: center; - font-size: 1.8em; - } - } - - #footer { - .inside-footer { - #tweetbtn { - float: none; - display: block; - margin-bottom: 15px; - } - #footer-nav { - .footer-links { - li { - margin: 0 15px 5px 0; - margin-left: 0; - //background: #000; - } - } - } - } - } - - } - //768 - - @media screen and (max-width: 400px) { - - .payment { - .intro { - - .plans, .card-section { - width: 100%; - } - - .plans { - li { - padding: 5% 6%; - } - - .select { - width: 100%; - } - - .details { - width: 70%; - } - } - - } - //intro - } - //payment - - .step-one, .step-two, .step-three { - .img { - width: 100%; - } - .text { - width: 100%; - } - } - - .packages { - > ul { - li { - width: 100%; - } - } - } - - .masthead { - .desc-logo { - width: 180px; - img { - width: 180px; - } - } - - h2 { - font-size: 1.4em; - } - } - - .title { - h1 { - color: #fff; - font-family: "MuseoSans-100"; - font-size: 2em; - line-height: 1.6em; - text-align: center; - } - } - - .card-section, .faq { - h2 { - font-size: 2em; - } - } - - .feature { - //padding: 0 5%; - .intro { - //padding: 5% 7%; - h2 { - font-size: 1.8em; - } - p { - line-height: 1.6em; - } - - #post-a-job, #create-team { - input[type=text], input[type=submit] { - width: 100%; - } - } - } - } - - .sign-up-form input[type=submit] { - font-size: 1.4em; - } - - } - //400 - - .sign-up-buttons { - li { - margin-bottom: 25px; - //@include blue-btn; - font-size: 1.3em; - background: $light-blue; - @include border-radius(6px); - @include transition-all; - height: 58px; - line-height: 58px; - //text-align: left; - - &:hover { - opacity: 0.8; - } - a { - color: #fff; - text-transform: capitalize; - font-size: 1.2em; - display: block; - text-align: center; - position: relative; - - div { - height: 58px; - width: 46px; - //float: left; - position: absolute; - top: 2%; - left: 8%; - //margin: 0 20px 0 20%; - background: image-url("sign-up-sprite.png") no-repeat bottom left; - } - - .twitter { - background-position: 0px -58px; - } - - .github { - background-position: top left; - } - } - } - } - //sign-up buttons - -} - -//body end \ No newline at end of file diff --git a/app/assets/stylesheets/profile.scss b/app/assets/stylesheets/profile.scss index 11e8408b..1aa0a4b7 100644 --- a/app/assets/stylesheets/profile.scss +++ b/app/assets/stylesheets/profile.scss @@ -1,5 +1,5 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; //Profile .profile { @@ -192,7 +192,6 @@ //background: #eee image-url("profile/skills-header-bg.png") repeat; background: #474747; border-bottom: solid 1px #e0e1db; - //-webkit-box-shadow: inset 0px 0px 2px 2px #ffffff; //box-shadow: inset 0px 0px 2px 2px #ffffff; color: #fff; @@ -593,6 +592,15 @@ } } +.sidebar { + .admin-controls { + width: 300px; + float: right; + margin-bottom: 20px; + padding: 15px; + } +} + .profile-sidebar { float: right; width: 330px; @@ -761,7 +769,6 @@ @include border-radius(100px); margin-left: 8px; text-align: center; - -webkit-box-shadow: inset 0px 3px 3px 0px rgba(0, 0, 0, 0.3); box-shadow: inset 0px 3px 3px 0px rgba(0, 0, 0, 0.3); &:first-child { @@ -892,7 +899,6 @@ text-align: center; @include border-radius(100px); color: #fff; - -webkit-box-shadow: inset 0px 1px 0px 0px rgba(0, 0, 0, 0.3); box-shadow: inset 0px 1px 0px 0px rgba(0, 0, 0, 0.3); @include blue-tx-shad; } @@ -1288,7 +1294,7 @@ color: $light-blue; } - .impersonate, .refresh { + .admin-action { background: none; padding: 0; margin-bottom: 10px; @@ -1334,7 +1340,6 @@ font-family: "courier", monospace; font-size: 1.1em; line-height: 1.4em; - -webkit-box-shadow: inset 0px 0px 8px 8px rgba(0, 0, 0, 0.2); box-shadow: inset 0px 0px 8px 8px rgba(0, 0, 0, 0.2); } @@ -1346,7 +1351,6 @@ padding: 10px 20px; font-size: 1.4em; @include border-radius(4px); - -webkit-box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); box-shadow: inset 0px 1px 1px 0px rgba(105, 135, 156, 0.4); &:hover { @@ -1461,7 +1465,6 @@ font-family: "courier", monospace; font-size: 1.1em; line-height: 1.4em; - -webkit-box-shadow: inset 0px 0px 8px 8px rgba(0, 0, 0, 0.2); box-shadow: inset 0px 0px 8px 8px rgba(0, 0, 0, 0.2); } diff --git a/app/assets/stylesheets/protip.css.scss b/app/assets/stylesheets/protip.css.scss new file mode 100644 index 00000000..0fdd1b7b --- /dev/null +++ b/app/assets/stylesheets/protip.css.scss @@ -0,0 +1,1381 @@ +@import "base"; +@import "compass/css3"; +@import "selectize/selectize"; +@import "selectize/selectize.default"; + +.tip-content-show { + strong { + font-weight: normal; + font-family: "MuseoSans-500"; + } + + hr { + margin-bottom: 30px; + border: 0; + height: 5px; + background-color: #efefef; + } + + em { + font-weight: normal; + font-style: normal; + font-family: "MuseoSans-300Italic"; + } + + code { + //white-space:nowrap; + //overflow: scroll; + background: #f5f2f0; + + a { + color: black; + } + } + + h1 { + font-size: 2.2em; + } + + h2 { + font-size: 2em; + } + + h3 { + font-size: 1.8em; + } + + h4 { + font-size: 1.6em; + //text-transform: capitalize; + //font-family: "MuseoSans-500"; + } + + h1, h2, h3, h4 { + margin-bottom: 15px; + + a { + color: $light-blue; + } + } + + ol, ul { + margin-bottom: 15px; + li { + list-style-position: inside; + font-size: 1.6em; + padding-left: 25px; + margin-bottom: 5px; + + li { + font-size: 1em; + } + + a { + color: $light-blue; + + &:hover { + border-bottom: 1px dashed $light-blue; + } + } + + p { + font-size: 1em; + margin: 0; + } + + code { + font-size: 0.9em; + } + } + } + + ul li { + list-style-type: disc; + } + + ol li { + list-style-type: upper-roman; + } + + blockquote { + padding-left: 10px; + border-left: 5px solid #efefef; + //border-bottom: 5px solid #efefef; + margin: 0; + margin-bottom: 1.6em; + //@include border-radius(6px); + + p { + margin: 0; + font-family: "MuseoSans-500Italic"; + } + + blockquote { + padding: 5px; + border: 0; + background: #f9f9f9; + } + } + + p { + font-size: 1.6em; + line-height: 1.4em; + margin-bottom: 1.6em; + + &:last-child { + margin: 0; + } + + a { + color: $light-blue; + + &:hover { + border-bottom: 1px dashed $light-blue; + } + } + + code { + font-size: 0.9em; + } + } + + img { + max-width: 100%; + margin-bottom: 15px; + } + + code { + margin-top: 0px; + margin-bottom: 1.6em; + font-size: 1.4em; + line-height: 1.6em; + } + + pre { + margin: 0px; + } +} + +.next-tip-mob { + display: none; +} + +.blur { + min-width: 100%; + min-height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: -2; + opacity: 0.7; +} + +.dimmer { + background: rgba(0, 0, 0, 0.25); + min-width: 100%; + min-height: 100%; + position: fixed; + z-index: 0; + top: 0; + left: 0; +} + +.mobile-job { + display: none; +} + +//Protip single +.conversion-alert { + z-index: 1000; + position: fixed; + top: 0; + width: 100%; + background: rgba(0, 0, 0, 0.9); + padding: 35px 0; + height: 35px; + @include cleaner-text; + + p { + float: left; + font-size: 1.6em; + line-height: 45px; + } + + .convert-signup { + float: right; + @include new-signup-button; + @include border-radius(4px); + + &:hover { + opacity: 0.5; + } + } + + .inside { + width: 630px; + margin: 0 auto; + } +} + +.side-conversion-alert { + display: none !important; + + z-index: 1000; + position: absolute; + top: 110px; + right: -162px; + width: 132px; + background: rgba(0, 0, 0, 0.9); + padding: 15px; + //height: 35px; + @include cleaner-text; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + + p { + font-size: 1.3em; + line-height: 1.6em; + margin-bottom: 10px; + } + + .convert-signup { + @include new-signup-button; + @include border-radius(4px); + + &:hover { + opacity: 0.5; + } + } + + // .inside { + // width: 630px; + // margin: 0 auto; + // } +} + +body.protip-single { + background: #393939; + + .new-logo { + float: left; + @include new-logo; + } + + //for nav + #masthead { + min-width: auto; + .inside-masthead { + width: auto; + max-width: 1180px; + } + } + + .tip-container { + box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.1); + } + + #x-active-preview-pane { + position: static; + clear: both; + } + + .editing { + width: 970px; + + .vertical-floatable { + width: 760px; + } + + .card-container { + //width: 616px; + } + + .tip-panel { + max-width: 661px; + width: 661px; + + .tip-content { + max-width: 100%; + margin: 0; + padding: 0; + } + + .upvote { + right: 7%; + } + } + + .share-this-tip { + display: none; + } + + .tip-sidebar { + display: none; + } + } + +} + +.protip-single { + + ////syntax colours + // #5eb14a; //green + // #3f639e; //blue + // #D75959; //red + + pre code { + display: block; + padding: 1em 1.5em; + color: $dark-grey; + background: #f5f2f0; + @include ts-bottom-white; + max-height: 300px; + overflow-y: scroll; + //@include border-radius(4px); + } + + pre code span { + font-family: 'Courier New', monospace, monospace; + } + + pre .keyword, + pre .literal, + pre .change, + pre .winutils, + pre .flow, + pre .lisp .title, + pre .tex .special { + color: #5eb14a; //green + } + + pre code, + pre .ruby .subst { + color: #3f639e; //blue + } + + pre .string, + pre .function .title, + pre .class .title, + pre .haskell .label, + pre .ini .title, + pre .tag .value, + pre .css .rules .value, + pre .preprocessor, + pre .ruby .symbol, + pre .ruby .symbol .string, + pre .ruby .symbol .keyword, + pre .ruby .symbol .keymethods, + pre .ruby .instancevar, + pre .ruby .class .parent, + pre .built_in, + pre .sql .aggregate, + pre .django .template_tag, + pre .django .variable, + pre .smalltalk .class, + pre .javadoc, + pre .ruby .string, + pre .django .filter .argument, + pre .smalltalk .localvars, + pre .smalltalk .array, + pre .attr_selector, + pre .pseudo, + pre .addition, + pre .stream, + pre .envvar, + pre .apache .tag, + pre .apache .cbracket, + pre .tex .command, + pre .input_number { + color: #D75959; //red + } + + pre .comment, + pre .java .annotation, + pre .python .decorator, + pre .template_comment, + pre .pi, + pre .doctype, + pre .deletion, + pre .shebang, + pre .apache .sqbracket, + pre .tex .formula { + color: #888; + } + + pre .keyword, + pre .literal, + pre .css .id, + pre .phpdoc, + pre .function .title, + pre .class .title, + pre .haskell .label, + pre .vbscript .built_in, + pre .sql .aggregate, + pre .rsl .built_in, + pre .smalltalk .class, + pre .xml .tag .title, + pre .diff .header, + pre .chunk, + pre .winutils, + pre .bash .variable, + pre .lisp .title, + pre .apache .tag, + pre .tex .special { + font-weight: bold; + } + + pre .coffeescript .javascript, + pre .xml .css, + pre .xml .javascript, + pre .xml .vbscript, + pre .tex .formula { + //opacity: 0.5; + } + + .comments-header { + color: #aeaeae; + text-transform: uppercase; + font-size: 1.6em; + margin-bottom: 1.3em; + } + + .comments { + background: #ececec; + padding-top: 30px; + //clear: both; + float: left; + z-index: 9999; + //@include border-radius-bottom(8px); + width: 70%; + // class added when there is no comments + &.no-comment { + padding-top: 0; + } + + a { + color: $dark-grey; + } + + > h2 { + //margin: 0 0 20px 70px; + margin: 5% 10%; + } + + .comment-list { + padding-bottom: 10px; + + li.comment { + //margin: 0 70px 30px 70px; + margin: 5% 10%; + + header { + height: 44px; + margin-bottom: 20px; + background: #f7f7f7; + //border-top: #0a0a0a solid 1px; + //border-bottom: #3e3d3d solid 1px; + border-radius: 44px; + border-top-right-radius: 6px; + border-bottom-right-radius: 6px; + } + + .comment-avatar { + float: left; + img { + width: 44px; + height: 44px; + @include border-radius(50%); + } + } + .comment-user { + float: left; + font-size: 1.6em; + padding: 12px 0 0 0; + margin-left: 15px; + max-width: 250px; + @include ellipsis; + } + .like { + float: right; + height: 11px; + background: image-url("protips/heart.png") no-repeat right bottom; + padding-right: 20px; + margin: 15px 15px 0 0; + font-size: 1.1em; + + &:hover { + background-position: right top; + } + } + + .liked { + background-position: right top; + &:after { + content: ""; + } + } + + .not-liked { + &:after { + content: "Like?"; + } + } + .comment { + margin-bottom: 20px; + img { + max-width: 100%; + } + p { + font-size: 1.5em; + line-height: 1.6em; + margin-bottom: 20px; + + a { + font-size: 1em; + color: $light-blue; + } + } + + a { + font-size: 1.6em; + color: $light-blue; + word-wrap: break-word; + + &:hover { + border-bottom: dashed 1px $light-blue; + } + } + + pre code { + /*background: #262626;*/ + font-size: 1.4em; + line-height: 1.6em; + max-height: none; + /*text-shadow: none;*/ + overflow-y: visible; + margin-bottom: 20px; + } + + p code, li code { + background: #F5F2F0; + color: #262626; + } + + /*Catch all for cleaning comments*/ + h1, h2, h3, h4, h5, li, dt, blockquote, cite { + font-size: 1.5em; + text-transform: none; + font-weight: normal; + font-family: "MuseoSans-300"; + } + + strong { + font-family: "MuseoSans-500"; + } + + li a, li p, li strong, li em, li code, blockquote p { + font-size: 0.9em; + } + + blockquote blockquote { + font-size: 1em; + } + + ul { + margin-bottom: 20px; + } + + li { + list-style-type: disc; + list-style-position: inside; + margin-bottom: 5px; + padding: 5px; + } + + blockquote { + border-left: solid 3px #555; + padding-left: 10px; + margin: 0; + } + } + + .edit-del { + float: left; + li { + float: left; + margin-right: 10px; + padding-right: 10px; + border-right: solid 1px #777; + + &:last-child { + margin: 0; + border: 0; + padding: 0; + } + + a { + font-size: 1.2em; + color: #777777; + &:hover { + color: $light-blue; + } + } + } + } + } + + .top-comment { + background: #dfdfdf; + //padding: 30px 30px 50px 30px; + //margin: 0 40px 30px 40px; + margin: 5% 5%; + padding: 7% 5%; + position: relative; + + &:after { + content: "Top comment"; + //float: right; + font-size: 1.3em; + //padding-right: 20px; + //margin-right: 10px; + position: absolute; + bottom: 16%; + right: 10%; + color: #777777; + } + + &:before { + @include icon-font; + content: "$"; + color: #aeaeae; + font-size: 14px; + position: absolute; + bottom: 17%; + right: 6%; + } + } + } + + .add-comment { + background: #dfdfdf; + padding: 5% 10%; + @include border-radius-bottom(8px); + + input[type="submit"] { + color: #e6e6e6; + background: #757575; + text-align: center; + @include border-radius(4px); + float: right; + font-size: 1.4em; + padding: 0 20px; + //@include ts-bottom-white; + } + + h2 { + color: #aeaeae; + text-transform: uppercase; + font-size: 1.6em; + margin-bottom: 1.3em; + } + + textarea { + width: 93.5%; + padding: 3%; + min-height: 120px; + resize: vertical; + font-size: 1.4em; + line-height: 1.6em; + margin-bottom: 20px; + border: solid 1px rgba(0, 0, 0, 0.2); + } + } + + .edit-comment { + textarea { + width: 93.5%; + padding: 3%; + resize: vertical; + font-size: 1.4em; + line-height: 1.6em; + margin-bottom: 20px; + } + + .save { + margin-right: 10px; + } + + .save, .cancel { + border: 0; + display: inline-block; + color: #757575; + background: #e6e6e6; + text-align: center; + height: 25px; + line-height: 25px; + @include border-radius(4px); + font-size: 1.4em; + padding: 0 20px; + @include ts-bottom-white; + @include transition-all; + + &:hover { + opacity: 0.5; + } + } + } + } + //comments I think? + + .tip-panel { + min-height: 420px; + //display:table; + width: 56%; + padding: 4% 7%; + float: left; + background: #fff; + position: relative; + height: 100%; + word-wrap: break-word; + max-width: 616px; + + .share-this-tip { + background: #58b4db; + display: block; + padding: 0 1.5em; + height: 40px; + line-height: 40px; + color: #247da0; + position: absolute; + font-size: 1.4em; + text-transform: uppercase; + top: -40px; + + &:before { + @include icon-font; + content: "t"; + color: #247da0; + margin-right: 8px; + display: inline-block; + } + + &:hover { + //background: #419cc2; + color: #fff; + } + + &.right { + right: -35%; + } + } + //share-this-tip + + .tip-header { + position: relative; + max-width: inherit; + .tip-title { + width: 75%; + margin-bottom: 1em; + font-size: 3.8em; + font-family: "MuseoSans-300"; + color: #333; + + a { + color: #333; + } + } + //TODO fix this + .timestamp { + position:absolute; + right: 9px; + bottom: -29px; + font-size: 1.1em; + color: #a2a2a2; + } + } + + .views { + color: #b7b7b7; + font-size: 1.6em; + margin-bottom: 1em; + + i:before { + font-size: 20px; + } + } + //views + + #tags, .admin-tag-links { + margin-bottom: 3em; + + li { + float: left; + margin-right: 20px; + margin-bottom: 10px; + position: relative; + } + //li + + a { + color: #a49d9d; + display: block; + background: #ececec; + font-size: 1.2em; + font-family: "MuseoSans-500"; + padding: 0.5em 1em; + box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); + @include border-radius(2px); + + &:after { + font-family: FontAwesome; + content: "\f02c"; //fa-tags + margin-left: 0.5em; + } + + &:hover { + opacity: 0.5; + } + + &.delete { + display: block; + width: 20px; + height: 20px; + background: $red image-url("cross-icon.png") no-repeat center; + box-shadow: none; + padding: 0; + margin: 0; + color: red; + position: absolute; + font-size: 0px; + top: -10px; + right: -10px; + } + } + //a + } + //tags + + .orphan { + color: #ff0000; + font-size: 1.2em; + line-height: 25px; + } + + .report_inappropriate { + float: right; + } + + .upvote { + width: 90px; + height: 85px; + background: #f55641; + display: block; + color: #fff; + font-size: 1.8em; + text-align: center; + position: absolute; + top: 0px; + right: 10%; + z-index: 10; + + &:hover { + color: #ab3a2c; + } + + &:before { + @include icon-font; + font-size: 30px; + display: block; + margin: 25px auto 10px auto; + content: "u"; + } + + &:after { + position: absolute; + bottom: -36px; + left: 0; + display: block; + content: " "; + width: 0; + height: 0; + border-left: 45px solid transparent; + border-right: 45px solid transparent; + border-top: 36px solid #f55641; + } + } + //upvote + } + + .tip-content { + @extend .tip-content-show; + + max-width: inherit; + margin-top: 20px; + + .links { + float: right; + padding-top: 15px; + li { + margin-bottom: 6px; + } + a { + opacity: 0.5; + color: $dark-grey; + font-size: 1.3em; + display: block; + height: 20px; + line-height: 20px; + padding-left: 30px; + background: image-url("protips/protip-links.png") no-repeat 0px 0px; + background-size: 20px 80px; + width: 95px; + @include ellipsis; + + &:hover { + opacity: 0.9; + } + } + + .view-protips { + background-position: 0px -40px; + } + + .follow-user { + background-position: 0px -20px; + + &:hover, &:after { + background-position: 0px -60px; + } + + } + .following-user { + background-position: 0px -60px; + } + } + //links + + //Editing a tip + + &.edit { + font-family: "MuseoSans-500"; + + .rule { + padding: 0 67px; + } + + .edit-tags { + padding-bottom: 50px; + } + + textarea, input[type=text] { + font-family: "MuseoSans-500"; + width: 100%; + border: 0; + border-bottom: 2px dotted #e4e4e4; + font-size: 1.4em; + color: #000; + margin-bottom: 25px; + } + + textarea { + width: 100%; + margin-bottom: 20px; + resize: vertical; + overflow: hidden; + padding-bottom: 10px; + font-size: 1.6em; + line-height: 1.4em; + } + + .protip_body { + display: inline-block; + vertical-align: top; + width: 49%; + } + + .preview-body { + @extend .tip-content-show; + + display: inline-block; + float: right; + margin-left: 3%; + width: 48%; + } + + .hint { + display: block; + font-size: 1.3em; + padding-top: 15px; + color: $light-blue; + margin-bottom: 25px; + } + + h2 { + padding: 50px 67px 0 67px; + margin-bottom: 15px; + font-size: 1.8em; + //width: 496px !important; + } + + p { + margin: 0; + } + + .error { + font-size: 1.3em; + margin-bottom: 25px; + background: #888; + padding: 10px; + @include border-radius(3px); + display: inline-block; + color: #fff; + position: relative; + + &:after { + content: " "; + width: 0; + height: 0; + border-style: solid; + border-color: transparent transparent #888; + border-width: 0 10px 10px; + position: absolute; + top: -10px; + left: 10px; + } + } + //error + + .formatting-tips { + color: #797979; + margin-bottom: 16px; + text-transform: capitalize; + font-family: "MuseoSans-500"; + } + + .formatting { + margin-bottom: 15px; + overflow: auto; + + li { + font-size: 1.2em; + float: left; + margin: 0 10px 12px 0; + border: solid 1px #dddddd; + padding: 6px 16px 5px 40px; + @include border-radius(3px); + color: #555; + position: relative; + background: #f9f9f9; /* Old browsers */ + background: linear-gradient(to right, #f9f9f9 0%, #ffffff 18%); /* W3C */ + list-style-type: none; + + &:before { + content: " "; + display: block; + height: 25px; + width: 33px; + position: absolute; + top: 0px; + left: 0px; + background: image-url("protips/format-icons.png") no-repeat 5px 0px; + background-size: 28px 100px; + } + //before + + &.italic { + &:before { + background-position: 5px -25px; + } + } + + &.code { + &:before { + background-position: 5px -50px; + } + } + + &.drop-image { + &:before { + background-position: 5px -75px; + } + } + + &.full-list { + &:before { + display: none; + } + padding: 0; + background: #ffffff; /* Old browsers */ + background: linear-gradient(to bottom, #ffffff 0%, #f1f1f1 100%); /* W3C */ + } + //full-list + + a { + @include ts-bottom-white; + display: block; + padding: 6px 31px 5px 31px; + color: $dark-grey; + font-size: 1em; + text-align: center; + + &:hover { + opacity: 0.5; + //text-decoration: none; + border: 0; + } + } + //a + } + //li + } + //formatting + } + //edit + + .add-tag { + display: inline-block; + font-size: 1.2em; + margin-top: 20px; + padding: 5px 10px; + color: #757575; + background: #e6e6e6; + text-align: center; + font-family: "MuseoSans-500"; + @include border-radius(4px); + @include ts-bottom-white; + + &:hover { + color: $light-blue; + } + //hover + } + //add-tag + + } + //editing + + .next-tip { + position: absolute; + top: 50%; + right: -20%; + /*float: left;*/ + background: image-url("protips/next-icon.png") no-repeat left; + padding-left: 50px; + @include text-shadow-one-px; + max-width: 100px; + height: 35px; + line-height: 35px; + + a { + display: block; + @include transition-all; + + &:hover { + opacity: 0.5; + } + } + + img { + width: 30px; + height: 30px; + @include border-radius(100px); + } + + h3 { + font-size: 1.6em; + } + + .tip-user { + font-size: 1.4em; + } + + } + //next-tip + + input[type=submit] { + border: 0; + //position: absolute; + //bottom: -75px; + //display: inline-block; + height: 35px; + line-height: 35px; + padding-left: 50px; + color: #fff; + font-size: 1.6em; + @include text-shadow-one-px; + font-family: "MuseoSans-500"; + @include transition-all; + + &:hover { + opacity: 0.8; + } + } + .save-and-publish { + background: image-url("white-tick.png") no-repeat left; + float: right; + } + + .preview-button { + padding: 0 65px 0 50px; + background: image-url("preview-eye.png") no-repeat left, image-url("protips/up-down-arrows.png") no-repeat right; + float: left; + } + + .vertical-floatable { + position: absolute; + width: 56%; + max-width: 1100px; + } +} + +.upload-ready { + //Used when hovering a file to be dropped + //border: 3px solid green; + + &:after { + content: "Drop files here to up-load"; + font-size: 1.8em; + line-height: 35em; + color: #fff; + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + text-align: center; + font-family: "MuseoSans-300"; + background: #343131 image-url("protips/upload-arrow.png") no-repeat center; + //background: rgba(0, 0, 0, 0.9) ; + @include border-radius(3px); + } + +} + +.upload-in-progress { + //Used during upload + //border: 3px solid red; + + &:after { + content: "Uploading"; + font-size: 1.8em; + line-height: 35em; + color: #fff; + position: absolute; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + text-align: center; + font-family: "MuseoSans-100"; + background: #343131 image-url("spinner-half.gif") no-repeat center; + //background: rgba(0, 0, 0, 0.9) ; + @include border-radius(3px); + } + +} + +//Pro tip effects + +.protip-multiple { + +} + +.outside { + margin: 60px auto; + //width: 770px; + width: 56%; + max-width: 1100px; + + .editing { + color: #fff; + font-size: 1.6em; + margin-bottom: 2em; + } +} + +.wrapper { + //background: #fff; +} + +.box-grid { + width: 100%; + + .box-row { + .box { + width: 20%; + margin: 20px; + float: left; + } + } +} + +.card-container { + @include perspective(500); + -moz-perspective: 500px; + + .card { + // Don't remove the browser prefixed tags for this class it will + // remove the 3D effect that happens when previewing a protip. + background: #fff; + width: 100%; + @include transform-style(preserve-3d); + -moz-transform-style: preserve-3d; + @include transition-duration(0.5s); + @include transition(transform, opacity); + -webkit-transition: -webkit-transform 0.5s, opacity 0s ease; + -moz-transition: -moz-transform 0.5s, opacity 0s ease; + -moz-transition-duration: 0.5s; + + .back { + position: absolute; + top: 0; + left: 0; + @include rotateY(180deg); + } + + .side { + @include backface-visibility(hidden); + //@include subtle-box-shadow; + opacity: 1; + min-width: 100%; + } + + &.rotated { + @include rotateY(180deg); + // fix #304: Previewing a protip in firefox doesn't hide back of the card + .front{ + display: none; + } + } + } +} + +.hidden { + display: none; +} + +//Media queries + +@media screen and (max-height: 900px) { + .protip-header { + margin: 54px 0 30px 0 !important; + } +} + +//900 + +@media screen and (max-width: 768px) { + .avatar { + //margin: 0 20px 0 0 !important; + } + .protip-header { + margin: 54px 0 30px 0 !important; + } + .next-tip { + display: none; + } + +} + +//768 + diff --git a/app/assets/stylesheets/protip.scss b/app/assets/stylesheets/protip.scss deleted file mode 100644 index 80300089..00000000 --- a/app/assets/stylesheets/protip.scss +++ /dev/null @@ -1,1395 +0,0 @@ -@import "base"; -@import "compass/css3/"; - -.next-tip-mob { - display: none; -} - -.blur { - min-width: 100%; - min-height: 100%; - position: fixed; - top: 0; - left: 0; - z-index: -2; - opacity: 0.7; -} - -.dimmer { - background: rgba(0, 0, 0, 0.25); - min-width: 100%; - min-height: 100%; - position: fixed; - z-index: 0; - top: 0; - left: 0; -} - -.mobile-job { - display: none; -} - -//Protip single -.conversion-alert { - z-index: 1000; - position: fixed; - top: 0; - width: 100%; - background: rgba(0, 0, 0, 0.9); - padding: 35px 0; - height: 35px; - @include cleaner-text; - - p { - float: left; - font-size: 1.6em; - line-height: 45px; - } - - .convert-signup { - float: right; - @include new-signup-button; - @include border-radius(4px); - - &:hover { - opacity: 0.5; - } - } - - .inside { - width: 630px; - margin: 0 auto; - } -} - -.side-conversion-alert { - display: none !important; - - z-index: 1000; - position: absolute; - top: 110px; - right: -162px; - width: 132px; - background: rgba(0, 0, 0, 0.9); - padding: 15px; - //height: 35px; - @include cleaner-text; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - - p { - font-size: 1.3em; - line-height: 1.6em; - margin-bottom: 10px; - } - - .convert-signup { - @include new-signup-button; - @include border-radius(4px); - - &:hover { - opacity: 0.5; - } - } - - // .inside { - // width: 630px; - // margin: 0 auto; - // } -} - -body.protip-single { - background: #393939; - - .new-logo { - float: left; - @include new-logo; - } - - //for nav - #masthead { - min-width: auto; - .inside-masthead { - width: auto; - max-width: 1180px; - } - } - - .tip-container { - -webkit-box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.1); - box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.1); - } - - #x-active-preview-pane { - position: static; - clear: both; - } - - .editing { - width: 770px; - - .vertical-floatable { - width: 760px; - } - - .card-container { - //width: 616px; - } - - .tip-panel { - max-width: 661px; - width: 661px; - - .tip-content { - max-width: 100%; - margin: 0; - padding: 0; - } - - .upvote { - right: 7%; - } - } - - .share-this-tip { - display: none; - } - - .tip-sidebar { - display: none; - } - } - -} - -.protip-single { - - ////syntax colours - // #5eb14a; //green - // #3f639e; //blue - // #D75959; //red - - pre code { - display: block; - padding: 1em 1.5em; - color: $dark-grey; - background: #f5f2f0; - @include ts-bottom-white; - max-height: 300px; - overflow-y: scroll; - //@include border-radius(4px); - } - - pre code span { - font-family: 'Courier New', monospace, monospace; - } - - pre .keyword, - pre .literal, - pre .change, - pre .winutils, - pre .flow, - pre .lisp .title, - pre .tex .special { - color: #5eb14a; //green - } - - pre code, - pre .ruby .subst { - color: #3f639e; //blue - } - - pre .string, - pre .function .title, - pre .class .title, - pre .haskell .label, - pre .ini .title, - pre .tag .value, - pre .css .rules .value, - pre .preprocessor, - pre .ruby .symbol, - pre .ruby .symbol .string, - pre .ruby .symbol .keyword, - pre .ruby .symbol .keymethods, - pre .ruby .instancevar, - pre .ruby .class .parent, - pre .built_in, - pre .sql .aggregate, - pre .django .template_tag, - pre .django .variable, - pre .smalltalk .class, - pre .javadoc, - pre .ruby .string, - pre .django .filter .argument, - pre .smalltalk .localvars, - pre .smalltalk .array, - pre .attr_selector, - pre .pseudo, - pre .addition, - pre .stream, - pre .envvar, - pre .apache .tag, - pre .apache .cbracket, - pre .tex .command, - pre .input_number { - color: #D75959; //red - } - - pre .comment, - pre .java .annotation, - pre .python .decorator, - pre .template_comment, - pre .pi, - pre .doctype, - pre .deletion, - pre .shebang, - pre .apache .sqbracket, - pre .tex .formula { - color: #888; - } - - pre .keyword, - pre .literal, - pre .css .id, - pre .phpdoc, - pre .function .title, - pre .class .title, - pre .haskell .label, - pre .vbscript .built_in, - pre .sql .aggregate, - pre .rsl .built_in, - pre .smalltalk .class, - pre .xml .tag .title, - pre .diff .header, - pre .chunk, - pre .winutils, - pre .bash .variable, - pre .lisp .title, - pre .apache .tag, - pre .tex .special { - font-weight: bold; - } - - pre .coffeescript .javascript, - pre .xml .css, - pre .xml .javascript, - pre .xml .vbscript, - pre .tex .formula { - //opacity: 0.5; - } - - .comments-header { - color: #aeaeae; - text-transform: uppercase; - font-size: 1.6em; - margin-bottom: 1.3em; - } - - .comments { - background: #ececec; - padding-top: 30px; - //clear: both; - float: left; - z-index: 9999; - //@include border-radius-bottom(8px); - width: 70%; - - a { - color: $dark-grey; - } - - > h2 { - //margin: 0 0 20px 70px; - margin: 5% 10%; - } - - .comment-list { - padding-bottom: 10px; - - > li { - //margin: 0 70px 30px 70px; - margin: 5% 10%; - - header { - height: 44px; - margin-bottom: 20px; - background: #f7f7f7; - //border-top: #0a0a0a solid 1px; - //border-bottom: #3e3d3d solid 1px; - -webkit-border-radius: 44px; - -webkit-border-top-right-radius: 6px; - -webkit-border-bottom-right-radius: 6px; - -moz-border-radius: 44px; - -moz-border-radius-topright: 6px; - -moz-border-radius-bottomright: 6px; - border-radius: 44px; - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; - } - - .comment-avatar { - float: left; - img { - width: 44px; - height: 44px; - @include border-radius(50%); - } - } - .comment-user { - float: left; - font-size: 1.6em; - padding: 12px 0 0 0; - margin-left: 15px; - max-width: 250px; - @include ellipsis; - } - .like { - float: right; - height: 11px; - background: image-url("protips/heart.png") no-repeat right bottom; - padding-right: 20px; - margin: 15px 15px 0 0; - font-size: 1.1em; - - &:hover { - background-position: right top; - } - } - - .liked { - background-position: right top; - &:after { - content: ""; - } - } - - .not-liked { - &:after { - content: "Like?"; - } - } - .comment { - margin-bottom: 20px; - - p { - font-size: 1.5em; - line-height: 1.6em; - margin-bottom: 20px; - - a { - font-size: 1em; - color: $light-blue; - } - } - - a { - font-size: 1.6em; - color: $light-blue; - word-wrap: break-word; - - &:hover { - border-bottom: dashed 1px $light-blue; - } - } - - pre code { - /*background: #262626;*/ - font-size: 1.4em; - line-height: 1.6em; - max-height: none; - /*text-shadow: none;*/ - overflow-y: visible; - margin-bottom: 20px; - } - - p code, li code { - background: #F5F2F0; - color: #262626; - } - - /*Catch all for cleaning comments*/ - h1, h2, h3, h4, h5, li, dt, blockquote, cite { - font-size: 1.5em; - text-transform: none; - font-weight: normal; - font-family: "MuseoSans-300"; - } - - strong { - font-family: "MuseoSans-500"; - } - - li a, li p, li strong, li em, li code, blockquote p { - font-size: 0.9em; - } - - blockquote blockquote { - font-size: 1em; - } - - ul { - margin-bottom: 20px; - } - - li { - list-style-type: disc; - list-style-position: inside; - margin-bottom: 5px; - padding: 5px; - } - - blockquote { - border-left: solid 3px #555; - padding-left: 10px; - margin: 0; - } - } - - .edit-del { - float: left; - li { - float: left; - margin-left: 10px; - padding-left: 10px; - border-left: solid 1px #777; - - &:first-child { - margin: 0; - border: 0; - padding: 0; - } - - a { - font-size: 1.2em; - color: #777777; - &:hover { - color: $light-blue; - } - } - } - } - } - - .top-comment { - background: #dfdfdf; - //padding: 30px 30px 50px 30px; - //margin: 0 40px 30px 40px; - margin: 5% 5%; - padding: 7% 5%; - position: relative; - - &:after { - content: "Top comment"; - //float: right; - font-size: 1.3em; - //padding-right: 20px; - //margin-right: 10px; - position: absolute; - bottom: 16%; - right: 10%; - color: #777777; - } - - &:before { - @include icon-font; - content: "$"; - color: #aeaeae; - font-size: 14px; - position: absolute; - bottom: 17%; - right: 6%; - } - } - } - - .add-comment { - background: #dfdfdf; - padding: 5% 10%; - @include border-radius-bottom(8px); - - input[type="submit"] { - color: #e6e6e6; - background: #757575; - text-align: center; - padding: 0; - @include border-radius(4px); - float: right; - font-size: 1.4em; - padding: 0 20px; - //@include ts-bottom-white; - } - - h2 { - color: #aeaeae; - text-transform: uppercase; - font-size: 1.6em; - margin-bottom: 1.3em; - } - - textarea { - width: 93.5%; - padding: 3%; - min-height: 120px; - resize: vertical; - font-size: 1.4em; - line-height: 1.6em; - margin-bottom: 20px; - border: solid 1px rgba(0, 0, 0, 0.2); - } - } - - .edit-comment { - textarea { - width: 93.5%; - padding: 3%; - resize: vertical; - font-size: 1.4em; - line-height: 1.6em; - margin-bottom: 20px; - } - - .save { - margin-right: 10px; - } - - .save, .cancel { - border: 0; - display: inline-block; - color: #757575; - background: #e6e6e6; - text-align: center; - padding: 0; - height: 25px; - line-height: 25px; - @include border-radius(4px); - font-size: 1.4em; - padding: 0 20px; - @include ts-bottom-white; - @include transition-all; - - &:hover { - opacity: 0.5; - } - } - } - } - //comments I think? - - .tip-panel { - min-height: 420px; - //display:table; - width: 56%; - padding: 4% 7%; - float: left; - background: #fff; - position: relative; - height: 100%; - word-wrap: break-word; - max-width: 616px; - - .share-this-tip { - background: #58b4db; - display: block; - padding: 0 1.5em; - height: 40px; - line-height: 40px; - color: #247da0; - position: absolute; - font-size: 1.4em; - text-transform: uppercase; - top: -40px; - - &:before { - @include icon-font; - content: "t"; - color: #247da0; - margin-right: 8px; - display: inline-block; - } - - &:hover { - //background: #419cc2; - color: #fff; - } - - &.right { - right: -35%; - } - } - //share-this-tip - - .tip-header { - max-width: inherit; - .tip-title { - width: 75%; - margin-bottom: 1em; - font-size: 3.8em; - font-family: "MuseoSans-300"; - color: #333; - - a { - color: #333; - } - } - //h1 - } - - .views { - color: #b7b7b7; - font-size: 1.6em; - margin-bottom: 1em; - - &:before { - @include icon-font; - font-size: 20px; - content: "6"; - margin-right: 5px; - //padding-top: 5px; - display: inline-block; - line-height: 11px; - } - } - //views - - #tags, .admin-tag-links { - margin-bottom: 3em; - - li { - float: left; - margin-right: 20px; - margin-bottom: 10px; - position: relative; - } - //li - - a { - color: #a49d9d; - display: block; - background: #ececec; - font-size: 1.2em; - font-family: "MuseoSans-500"; - padding: 0.5em 1em; - -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); - box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); - @include border-radius(2px); - - &:after { - @include icon-font; - content: "8"; - margin-left: 0.5em; - } - - &:hover { - opacity: 0.5; - } - - &.delete { - display: block; - width: 20px; - height: 20px; - background: $red image-url("cross-icon.png") no-repeat center; - box-shadow: none; - padding: 0; - margin: 0; - color: red; - position: absolute; - font-size: 0px; - top: -10px; - right: -10px; - } - } - //a - } - //tags - - .orphan { - color: #ff0000; - font-size: 1.2em; - line-height: 25px; - } - - .report_inappropriate { - float: right; - } - - .upvote { - width: 90px; - height: 85px; - background: #f55641; - display: block; - color: #fff; - font-size: 1.8em; - text-align: center; - position: absolute; - top: 0px; - right: 10%; - - &:hover { - color: #ab3a2c; - } - - &:before { - @include icon-font; - font-size: 30px; - display: block; - margin: 25px auto 10px auto; - content: "u"; - } - - &:after { - position: absolute; - bottom: -36px; - left: 0; - display: block; - content: " "; - width: 0; - height: 0; - border-left: 45px solid transparent; - border-right: 45px solid transparent; - border-top: 36px solid #f55641; - } - } - //upvote - } - - .tip-content { - max-width: inherit; - - .links { - float: right; - padding-top: 15px; - li { - margin-bottom: 6px; - } - a { - opacity: 0.5; - color: $dark-grey; - font-size: 1.3em; - display: block; - height: 20px; - line-height: 20px; - padding-left: 30px; - background: image-url("protips/protip-links.png") no-repeat 0px 0px; - background-size: 20px 80px; - width: 95px; - @include ellipsis; - - &:hover { - opacity: 0.9; - } - } - - .view-protips { - background-position: 0px -40px; - } - - .follow-user { - background-position: 0px -20px; - - &:hover, &:after { - background-position: 0px -60px; - } - - } - .following-user { - background-position: 0px -60px; - } - } - //links - - strong { - font-weight: normal; - font-family: "MuseoSans-500"; - } - - hr { - margin-bottom: 30px; - border: 0; - height: 5px; - background-color: #efefef; - } - - em { - font-weight: normal; - font-style: normal; - font-family: "MuseoSans-300Italic"; - } - - code { - //white-space:nowrap; - //overflow: scroll; - background: #f5f2f0; - - a { - color: black; - } - } - - h1 { - font-size: 2.2em; - } - - h2 { - font-size: 2em; - } - - h3 { - font-size: 1.8em; - } - - h4 { - font-size: 1.6em; - //text-transform: capitalize; - //font-family: "MuseoSans-500"; - } - - h1, h2, h3, h4 { - margin-bottom: 15px; - - a { - color: $light-blue; - } - } - - ul { - margin-bottom: 15px; - li { - //background: image-url("gold-star.png") no-repeat left 3px; - list-style-type: disc; - //list-style-position: inside; - font-size: 1.6em; - //padding-left: 25px; - margin-bottom: 5px; - - li { - font-size: 1em; - //padding-left: 25px; - list-style-position: inside; - - } - - a { - color: $light-blue; - - &:hover { - border-bottom: 1px dashed $light-blue; - } - } - - p { - font-size: 1em; - margin: 0; - } - - code { - font-size: 0.9em; - } - } - } - - ol { - margin-bottom: 15px; - li { - list-style-type: upper-roman; - list-style-position: inside; - font-size: 1.6em; - //padding-left: 25px; - margin-bottom: 5px; - - a { - color: $light-blue; - - &:hover { - border-bottom: 1px dashed $light-blue; - } - } - - p { - font-size: 1em; - margin: 0; - } - - code { - font-size: 0.9em; - } - } - } - - blockquote { - padding-left: 10px; - border-left: 5px solid #efefef; - //border-bottom: 5px solid #efefef; - margin: 0; - margin-bottom: 1.6em; - //@include border-radius(6px); - - p { - margin: 0; - font-family: "MuseoSans-500Italic"; - } - - blockquote { - padding: 5px; - border: 0; - background: #f9f9f9; - } - } - - p { - font-size: 1.6em; - line-height: 1.4em; - margin-bottom: 1.6em; - - &:last-child { - margin: 0; - } - - a { - color: $light-blue; - - &:hover { - border-bottom: 1px dashed $light-blue; - } - } - - code { - font-size: 0.9em; - } - } - - img { - max-width: 100%; - margin-bottom: 15px; - } - - code { - margin-top: 0px; - margin-bottom: 1.6em; - font-size: 1.4em; - line-height: 1.6em; - } - - pre { - margin: 0px; - } - - //Editing a tip - - &.edit { - font-family: "MuseoSans-500"; - - .rule { - padding: 0 67px; - } - - .edit-tags { - padding-bottom: 50px; - } - - textarea, input[type=text] { - font-family: "MuseoSans-500"; - width: 100%; - border: 0; - border-bottom: 2px dotted #e4e4e4; - font-size: 1.4em; - color: #000; - margin-bottom: 25px; - } - - textarea { - width: 100%; - margin-bottom: 20px; - resize: vertical; - overflow: hidden; - padding-bottom: 10px; - } - - .hint { - display: block; - font-size: 1.3em; - padding-top: 15px; - color: $light-blue; - margin-bottom: 25px; - } - - h2 { - padding: 50px 67px 0 67px; - margin-bottom: 15px; - font-size: 1.8em; - //width: 496px !important; - } - - p { - margin: 0; - } - - .error { - font-size: 1.3em; - margin-bottom: 25px; - background: #888; - padding: 10px; - @include border-radius(3px); - display: inline-block; - color: #fff; - position: relative; - - &:after { - content: " "; - width: 0; - height: 0; - border-style: solid; - border-color: transparent transparent #888; - border-width: 0 10px 10px; - position: absolute; - top: -10px; - left: 10px; - } - } - //error - - .formatting-tips { - color: #797979; - margin-bottom: 16px; - text-transform: capitalize; - font-family: "MuseoSans-500"; - } - - .formatting { - margin-bottom: 15px; - overflow: auto; - - li { - font-size: 1.2em; - float: left; - margin: 0 10px 12px 0; - border: solid 1px #dddddd; - padding: 6px 16px 5px 40px; - @include border-radius(3px); - color: #555; - position: relative; - background: #f9f9f9; /* Old browsers */ - background: -moz-linear-gradient(left, #f9f9f9 0%, #ffffff 18%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, right top, color-stop(0%, #f9f9f9), color-stop(18%, #ffffff)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(left, #f9f9f9 0%, #ffffff 18%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(left, #f9f9f9 0%, #ffffff 18%); /* Opera 11.10+ */ - background: -ms-linear-gradient(left, #f9f9f9 0%, #ffffff 18%); /* IE10+ */ - background: linear-gradient(to right, #f9f9f9 0%, #ffffff 18%); /* W3C */ - list-style-type: none; - - &:before { - content: " "; - display: block; - height: 25px; - width: 33px; - position: absolute; - top: 0px; - left: 0px; - background: image-url("protips/format-icons.png") no-repeat 5px 0px; - background-size: 28px 100px; - } - //before - - &.italic { - &:before { - background-position: 5px -25px; - } - } - - &.code { - &:before { - background-position: 5px -50px; - } - } - - &.drop-image { - &:before { - background-position: 5px -75px; - } - } - - &.full-list { - &:before { - display: none; - } - padding: 0; - background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #f1f1f1 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f1f1f1)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%, #f1f1f1 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%, #f1f1f1 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%, #f1f1f1 100%); /* IE10+ */ - background: linear-gradient(to bottom, #ffffff 0%, #f1f1f1 100%); /* W3C */ - } - //full-list - - a { - @include ts-bottom-white; - display: block; - padding: 6px 31px 5px 31px; - color: $dark-grey; - font-size: 1em; - text-align: center; - - &:hover { - opacity: 0.5; - //text-decoration: none; - border: 0; - } - } - //a - } - //li - } - //formatting - } - //edit - - .add-tag { - display: inline-block; - font-size: 1.2em; - margin-top: 20px; - padding: 5px 10px; - color: #757575; - background: #e6e6e6; - text-align: center; - font-family: "MuseoSans-500"; - @include border-radius(4px); - @include ts-bottom-white; - - &:hover { - color: $light-blue; - } - //hover - } - //add-tag - - } - //editing - - .next-tip { - position: absolute; - top: 50%; - right: -20%; - /*float: left;*/ - background: image-url("protips/next-icon.png") no-repeat left; - padding-left: 50px; - @include text-shadow-one-px; - max-width: 100px; - height: 35px; - line-height: 35px; - - a { - display: block; - @include transition-all; - - &:hover { - opacity: 0.5; - } - } - - img { - width: 30px; - height: 30px; - @include border-radius(100px); - } - - h3 { - font-size: 1.6em; - } - - .tip-user { - font-size: 1.4em; - } - - } - //next-tip - - input[type=submit] { - border: 0; - //position: absolute; - //bottom: -75px; - //display: inline-block; - height: 35px; - line-height: 35px; - padding-left: 50px; - color: #fff; - font-size: 1.6em; - @include text-shadow-one-px; - font-family: "MuseoSans-500"; - @include transition-all; - - &:hover { - opacity: 0.8; - } - } - .save-and-publish { - background: image-url("white-tick.png") no-repeat left; - float: right; - } - - .preview-button { - padding: 0 65px 0 50px; - background: image-url("preview-eye.png") no-repeat left, image-url("protips/up-down-arrows.png") no-repeat right; - float: left; - } - - .vertical-floatable { - position: absolute; - width: 56%; - max-width: 1100px; - } -} - -.upload-ready { - //Used when hovering a file to be dropped - //border: 3px solid green; - - &:after { - content: "Drop files here to up-load"; - font-size: 1.8em; - line-height: 35em; - color: #fff; - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - text-align: center; - font-family: "MuseoSans-300"; - background: #343131 image-url("protips/upload-arrow.png") no-repeat center; - //background: rgba(0, 0, 0, 0.9) ; - @include border-radius(3px); - } - -} - -.upload-in-progress { - //Used during upload - //border: 3px solid red; - - &:after { - content: "Uploading"; - font-size: 1.8em; - line-height: 35em; - color: #fff; - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - text-align: center; - font-family: "MuseoSans-100"; - background: #343131 image-url("spinner-half.gif") no-repeat center; - //background: rgba(0, 0, 0, 0.9) ; - @include border-radius(3px); - } - -} - -//Pro tip effects - -.protip-multiple { - -} - -.outside { - margin: 60px auto; - //width: 770px; - width: 56%; - max-width: 1100px; - - .editing { - color: #fff; - font-size: 1.6em; - margin-bottom: 2em; - } -} - -.wrapper { - //background: #fff; -} - -.box-grid { - width: 100%; - - .box-row { - .box { - width: 20%; - margin: 20px; - float: left; - } - } -} - -.card-container { - @include perspective(500); - -moz-perspective: 500px; - - .card { - //position: absolute; - background: #fff; - width: 100%; - @include transform-style(preserve-3d); - -moz-transform-style: preserve-3d; - @include transition-duration(0.5s); - @include transition(transform, opacity); - -webkit-transition: -webkit-transform 0.5s, opacity 0s ease; - -moz-transition: -moz-transform 0.5s, opacity 0s ease; - -moz-transition-duration: 0.5s; - - .back { - position: absolute; - top: 0; - left: 0; - @include rotateY(180deg); - -moz-transform: rotateY(180deg); - } - - .side { - @include backface-visibility(hidden); - -moz-backface-visibility: hidden; - //@include subtle-box-shadow; - opacity: 1; - min-width: 100%; - } - - &.rotated { - @include rotateY(180deg); - -moz-transform: rotateY(180deg); - } - } -} - -.hidden { - display: none; -} - -//Media queries - -@media screen and (max-height: 900px) { - .protip-header { - margin: 54px 0 30px 0 !important; - } -} - -//900 - -@media screen and (max-width: 768px) { - .avatar { - //margin: 0 20px 0 0 !important; - } - .protip-header { - margin: 54px 0 30px 0 !important; - } - .next-tip { - display: none; - } - -} - -//768 - diff --git a/app/assets/stylesheets/protips-grid.scss b/app/assets/stylesheets/protips-grid.scss new file mode 100644 index 00000000..27a11a56 --- /dev/null +++ b/app/assets/stylesheets/protips-grid.scss @@ -0,0 +1,361 @@ +.protips-grid { + &.connections-list { + > li { + height: 40px; + &.plus-more { + background: #3b3b3b; + a { + display: block; + text-align: center; + color: #afafaf; + font-size: 1.4em; + line-height: 40px; + &:hover { + color: #fff; + } + } + } + } + } + &.new-networks-list { + > li { + width: 18.5%; + padding: 1% 2% 1% 1.5%; + height: auto; + border-left: solid 1.2em #d2c5a5; + @include border-radius(4px); + .new-network { + font-size: 1.3em; + color: $dark-grey; + display: block; + text-transform: uppercase; + @include ellipsis; + &:hover { + color: $light-blue; + } + } + &.plus-more { + background: #3b3b3b; + width: 19.4%; + border: 0; + a { + display: block; + text-align: center; + color: #afafaf; + font-size: 1.4em; + &:hover { + color: #fff; + } + } + } + } + } + > li { + position: relative; + width: 20%; + padding: 1%; + margin: 1%; + height: 255px; + float: left; + background: #fff; + box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.48); + .unfollow { + position: absolute; + top: 2px; + right: 2px; + width: 20px; + height: 20px; + line-height: 20px; + text-align: center; + color: #999897; + display: block; + &:hover { + background: $red; + color: #fff; + } + &:before { + @include icon-font; + font-size: 8px; + content: "x"; + } + } + .hiring-ribbon { + @include hiring-ribbon; + } + &.two-cols { + position: relative; + width: 44%; + .tip-image { + z-index: 0; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 206px; + background: #000; + overflow: hidden; + img { + width: 100%; + height: 100%; + opacity: 0.5; + } + } + header { + z-index: 100; + position: relative; + .avatar, .badge-img { + position: absolute; + top: 0; + right: 0; + width: 53px; + height: 53px; + @include border-radius(53px); + overflow: hidden; + img { + width: 100%; + } + } + p { + color: #fff; + font-size: 1.6em; + float: left; + &:before { + @include icon-font; + color: #fff; + margin-right: 10px; + } + &.job { + &:before { + content: "b"; + font-size: 18px; + } + } + &.mayor { + &:before { + content: "4"; + font-size: 18px; + } + } + &.badge { + &:before { + content: "5"; + font-size: 18px; + } + } + } + .feature-jobs { + color: #fff; + float: right; + font-size: 1.1em; + background: rgba(255, 255, 255, 0.3); + text-transform: uppercase; + padding: 0.6em 0.9em 0.4em 0.9em; + letter-spacing: 0.2em; + @include border-radius(4px); + &:hover { + background: rgba(255, 255, 255, 0.6); + } + } + } + .content { + position: relative; + z-index: 100; + height: 160px; + .job-title { + font-size: 2.4em; + display: block; + margin-bottom: 0.5em; + color: #fff; + @include ellipsis; + &:hover { + opacity: 0.5; + } + } + .job-exrp { + font-size: 1.3em; + line-height: 1.8em; + color: #fff; + height: 50px; + overflow: hidden; + } + h3 { + width: 60%; + font-size: 2.4em; + line-height: 1.4em; + color: #fff; + font-family: "MuseoSans-300"; + } + } + } + &.job { + .author { + li { + margin-top: 1em; + } + } + } + header { + height: 50px; + .delete-tip { + position: absolute; + top: -15px; + right: 0; + background: #c7333a image-url("protips/delete-cross.png") no-repeat center; + border: solid 3px #fff; + width: 22px; + height: 22px; + @include border-radius(100px); + &:hover { + opacity: 0.8; + } + span { + display: none; + } + } + span { + font-size: 1.3em; + color: #b1b4b4; + margin-right: 0.4em; + &:before { + @include icon-font; + margin-right: 5px; + } + &.upvoted { + color: $light-blue; + } + &.upvotes { + &:before { + content: "u"; + font-size: 19px; + } + } + &.comments { + &:before { + @include icon-font; + content: "7"; + font-size: 19px; + } + } + &.views { + &:before { + content: "6"; + font-size: 19px; + } + } + &.hawt { + color: #f35e39; + &:before { + content: "2"; + font-size: 19px; + } + } + } + } + .title { + font-size: 1.8em; + color: #343131; + display: block; + height: 120px; + margin-bottom: 30px; + overflow: hidden; + padding: 10px; + background-color: #F0F0F0; + border: 1px solid #ddd; + text-align: center; + &:hover { + color: $light-blue; + } + } + footer { + .admin { + position: absolute; + top: 5px; + right: 10px; + + p { + font-size: 1.2em; + color: #545454; + display: block; + padding: 0 10px; + background-color: #F0F0F0; + } + } + .job { + z-index: 0; + background: #5bb156; + width: 31px; + height: 28px; + padding-top: 20px; + display: block; + position: absolute; + bottom: 0; + right: 25px; + text-align: center; + &:before { + @include icon-font; + content: "b"; + color: #fff; + font-size: 14px; + } + &:hover { + background: #4c9748; + } + } + } + .author { + float: left; + width: 60%; + li { + font-size: 1.4em; + margin-bottom: 0.4em; + @include ellipsis; + a:hover { + color: $light-blue; + } + } + .user { + color: $dark-grey; + a { + color: $dark-grey; + } + } + .team { + color: #a6a5a5; + a { + color: #a6a5a5; + } + } + } + .avatars { + float: right; + li { + display: inline-block; + vertical-align: top; + position: relative; + a { + display: block; + width: 35px; + height: 35px; + @include border-radius(35px); + overflow: hidden; + img { + width: 35px; + height: 35px + } + } + } + .user { + z-index: 2; + } + .team { + z-index: 1; + margin-left: -15px; + background: #f7f7f7; + @include border-radius(35px); + &:hover { + z-index: 2; + } + } + } + } +} diff --git a/app/assets/stylesheets/reset.scss b/app/assets/stylesheets/reset.scss deleted file mode 100644 index 332ee628..00000000 --- a/app/assets/stylesheets/reset.scss +++ /dev/null @@ -1,176 +0,0 @@ -/* reset */ - -html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-weight: inherit; - font-style: inherit; - font-size: 100%; - font-family: inherit; - vertical-align: baseline; - zoom: 1; -} - -:focus { - outline: 0; -} - -body { - color: #000; - background: #fff; -} - -ol, ul { - list-style: none; -} - -/* tables still need 'cellspacing="0"' in the markup */ - -table { - border-collapse: separate; - border-spacing: 0; -} - -caption, th, td { - text-align: left; - font-weight: normal; -} - -blockquote { - &:before, &:after { - content: ""; - } -} - -q { - &:before, &:after { - content: ""; - } -} - -blockquote, q { - quotes: "" ""; -} - -a { - text-decoration: none; - &:hover { - text-decoration: underline; - } -} - -/***** Global Classes *****/ - -.clear { - clear: both; -} - -.float-left { - float: left; -} - -.float-right { - float: right; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-center { - text-align: center; -} - -.text-justify { - text-align: justify; -} - -.bold { - font-weight: bold; -} - -.italic { - font-style: italic; -} - -.underline { - border-bottom: 1px solid; -} - -.highlight { - background: #ffc; -} - -.wrap { - width: 960px; - margin: 0 auto; -} - -.img-left { - float: left; - margin: 4px 10px 4px 0; -} - -.img-right { - float: right; - margin: 4px 0 4px 10px; -} - -.nopadding { - padding: 0; -} - -.noindent { - margin-left: 0; - padding-left: 0; -} - -.nobullet { - list-style: none; - list-style-image: none; -} - -img, a img { - &.alignright { - float: right; - margin: 0 0 1em 1em; - } - &.alignleft { - float: left; - margin: 0 1em 1em 0; - } - &.aligncenter { - display: block; - margin-left: auto; - margin-right: auto; - } -} - -.clearfix { - &:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; - } - display: inline-block; -} - -/* Hides from IE-mac \*/ - -* html .clearfix { - height: 1%; -} - -.clearfix { - display: block; -} - -/* End hide from IE-mac */ diff --git a/app/assets/stylesheets/saturnv-webfont.eot b/app/assets/stylesheets/saturnv-webfont.eot deleted file mode 100755 index 6ba9921d..00000000 Binary files a/app/assets/stylesheets/saturnv-webfont.eot and /dev/null differ diff --git a/app/assets/stylesheets/saturnv-webfont.svg b/app/assets/stylesheets/saturnv-webfont.svg deleted file mode 100755 index 7017b0b7..00000000 --- a/app/assets/stylesheets/saturnv-webfont.svg +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="SaturnVRegular" horiz-adv-x="2048" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="614" /> -<glyph horiz-adv-x="0" /> -<glyph /> -<glyph unicode=" " horiz-adv-x="614" /> -<glyph unicode="	" horiz-adv-x="614" /> -<glyph unicode=" " horiz-adv-x="614" /> -<glyph unicode="a" horiz-adv-x="1652" d="M102 186v652q0 76 55 131t132 55h518q37 0 64.5 -27.5t27.5 -66.5v-51q0 -16 13 -28.5t34 -12.5q22 0 33.5 12t11.5 29v145h467v-186q0 -39 -27.5 -66t-66.5 -27h-92v-372q0 -39 27.5 -66.5t64.5 -27.5h186v-185q0 -40 -27 -67t-65 -27h-373q-39 0 -66.5 27.5t-27.5 66.5 v41q0 51 -45 51q-22 0 -34.5 -14t-12.5 -37v-41q0 -39 -27.5 -66.5t-64.5 -27.5h-518q-77 0 -132 55t-55 131zM381 373q0 -40 27 -67t67 -27h424q38 0 65 27t27 67v278q0 40 -27 67t-65 27h-424q-40 0 -67 -27t-27 -67v-278z" /> -<glyph unicode="b" horiz-adv-x="1468" d="M102 184v1248h185q39 0 67.5 -28t28.5 -65v-460q0 -14 12 -26.5t27 -12.5q23 0 38 12t15 27v53q0 40 26 66t66 26h613q78 0 132 -53.5t54 -130.5v-656q0 -77 -54 -130.5t-132 -53.5h-893q-77 0 -131 54t-54 130zM383 373q0 -40 26 -66t66 -26h518q40 0 66 26t26 66v276 q0 42 -26.5 70.5t-65.5 28.5h-518q-39 0 -65.5 -28.5t-26.5 -70.5v-276z" /> -<glyph unicode="c" horiz-adv-x="1234" d="M102 184v654q0 78 56.5 134t134.5 56h840v-190q0 -37 -28 -65t-67 -28h-561q-38 0 -65 -27t-27 -65v-280q0 -40 27 -68.5t65 -28.5h561q40 0 67.5 -26.5t27.5 -65.5v-184h-564q-37 0 -63.5 27t-26.5 65v41q0 25 -14 39t-37 14q-18 0 -30.5 -14.5t-12.5 -38.5v-41 q0 -38 -27 -66t-65 -28q-78 0 -134.5 55t-56.5 131z" /> -<glyph unicode="d" horiz-adv-x="1468" d="M102 186v654q0 77 55 130.5t132 53.5h612q39 0 65.5 -26.5t26.5 -65.5v-53q0 -15 13 -27t28 -12q24 0 37.5 11.5t13.5 27.5v460q0 38 28.5 66.5t66.5 28.5h186v-1248q0 -78 -54 -132t-132 -54h-891q-77 0 -132 54t-55 132zM383 373q0 -40 26 -66t66 -26h518q40 0 66 26 t26 66v278q0 40 -26 67t-66 27h-518q-40 0 -66 -27t-26 -67v-278z" /> -<glyph unicode="e" horiz-adv-x="1363" d="M102 186v256l2 312v176q0 40 27 67t66 27h90q40 0 68 -26.5t28 -63.5v-53q0 -19 13.5 -31t31.5 -12t32.5 12t14.5 31v53q0 37 27 63.5t65 26.5h508q78 0 132.5 -53.5t54.5 -132.5v-226q0 -190 -228 -190h-579q-38 0 -56 -22.5t-18 -51.5t18 -51.5t56 -22.5h805v-180 q0 -40 -27 -67t-66 -27h-878q-78 0 -132.5 53.5t-54.5 132.5zM381 668q0 -26 18.5 -51t55.5 -25h454q37 0 55.5 25t18.5 51t-18.5 50.5t-55.5 24.5h-454q-37 0 -55.5 -24.5t-18.5 -50.5z" /> -<glyph unicode="f" horiz-adv-x="1136" d="M102 741v189q0 38 27.5 65t67.5 27h184l2 227q0 77 54 131t130 54h467v-185q0 -41 -27 -68.5t-67 -27.5h-184q-38 0 -65 -27t-27 -65v-187q0 -14 12 -27t29 -13q21 0 36 13t15 27v56q0 38 26.5 65t63.5 27h188v-188q0 -38 -27 -65.5t-67 -27.5h-184q-38 0 -65 -26 t-27 -64v-465q0 -77 -56 -131.5t-133 -54.5h-280v186q0 39 27 67t65 28q41 0 68.5 26.5t27.5 65.5q0 23 -0.5 57.5t-1.5 126.5q-1 61 -1 97v30q1 34 1 57h-279z" /> -<glyph unicode="g" horiz-adv-x="1654" d="M102 188v650q0 77 55.5 131.5t133.5 54.5h608q40 0 67 -26.5t27 -67.5v-49q0 -19 12 -31t31 -12q23 0 36 12t13 31v49q0 41 27.5 67.5t67.5 26.5h278q41 0 67.5 -26.5t26.5 -67.5v-185h-94q-37 0 -65.5 -28t-28.5 -66v-973q0 -78 -53 -133t-131 -55h-281 q-37 0 -63.5 27.5t-26.5 66.5v185h184q39 0 65.5 27.5t26.5 66.5v270q0 55 -49 55q-19 0 -31 -14.5t-12 -40.5v-39q0 -39 -27.5 -66.5t-66.5 -27.5h-608q-78 0 -133.5 55t-55.5 133zM385 371q0 -37 26 -62.5t64 -25.5h518q39 0 65.5 25.5t26.5 62.5v280q0 39 -26.5 66.5 t-65.5 27.5h-518q-38 0 -64 -27.5t-26 -66.5v-280z" /> -<glyph unicode="h" horiz-adv-x="1603" d="M102 0v184q0 41 27.5 68t67.5 27h90v874h-90q-40 0 -67.5 26.5t-27.5 67.5v185h375q37 0 64.5 -27.5t27.5 -65.5v-458q0 -16 12 -29.5t29 -13.5q23 0 37.5 13.5t14.5 29.5v51q0 37 28 65.5t66 28.5h372q77 0 132 -54.5t55 -133.5v-559h92q39 0 66.5 -27t27.5 -68v-184 h-653v184q0 41 26.5 68t65.5 27h94v374q0 38 -27 65t-67 27h-278q-38 0 -65.5 -27.5t-27.5 -64.5v-374h93q40 0 67 -27t27 -68v-184h-654z" /> -<glyph unicode="i" horiz-adv-x="858" d="M102 0v186q0 38 27.5 65.5t67.5 27.5h94v466h-94q-40 0 -67.5 26.5t-27.5 64.5v188h373q38 0 65 -27t27 -67v-651h95q38 0 66 -27.5t28 -65.5v-186h-654z" /> -<glyph unicode="j" horiz-adv-x="669" d="M102 -229h93q40 0 67 26t27 66v880h-94q-38 0 -65.5 27.5t-27.5 67.5v186h465v-1350q0 -78 -53 -131t-131 -53h-188q-38 0 -65.5 27t-27.5 65v189z" /> -<glyph unicode="k" horiz-adv-x="1421" d="M102 1243v191h373q36 0 63 -29t27 -66v-647q0 -15 14.5 -27t30.5 -12h54q15 0 26.5 12t11.5 27v240q0 37 29.5 65.5t67.5 28.5h432v-188q0 -37 -26.5 -63.5t-63.5 -26.5h-195q-21 0 -35 -16t-14 -40q0 -16 14 -27.5t35 -11.5q79 0 134 -56t55 -134v-90q0 -39 26.5 -65.5 t63.5 -26.5q41 0 67.5 -27.5t26.5 -67.5v-186h-277q-39 0 -67.5 27.5t-28.5 68.5v191q0 36 -26 64t-62 28h-199q-37 0 -65.5 -28.5t-28.5 -63.5v-287h-184q-38 0 -66 28t-28 68v1059h-90q-41 0 -68 25.5t-27 62.5z" /> -<glyph unicode="l" horiz-adv-x="856" d="M102 1247v187h371q40 0 67 -27.5t27 -67.5v-1056h187v-187q0 -40 -27.5 -67t-67.5 -27h-276q-40 0 -67 27t-27 67v1057h-92q-39 0 -67 27.5t-28 66.5z" /> -<glyph unicode="m" horiz-adv-x="2344" d="M102 -2v186q0 39 27.5 65.5t65.5 26.5h94v469h-94q-38 0 -65.5 26t-27.5 65v186h373q38 0 65 -27.5t27 -64.5v-53q0 -14 14 -27.5t29 -13.5q21 0 36.5 13.5t15.5 27.5v53q0 37 27 64.5t65 27.5h372q69 0 121 -41t66 -104q0 -41 43 -41q22 0 36.5 13t14.5 28v53 q0 37 27 64.5t65 27.5h375q77 0 130.5 -54t53.5 -132v-560h92q40 0 66.5 -26t26.5 -66v-186h-652v186q0 39 28 65.5t67 26.5h92v373q0 40 -26.5 68t-65.5 28h-279q-38 0 -66 -28t-28 -68v-373h94q39 0 65.5 -26.5t26.5 -65.5v-186h-649v186q0 40 26 66t66 26h92v373 q0 39 -27.5 67.5t-64.5 28.5h-280q-38 0 -66.5 -28.5t-28.5 -67.5v-373h95q40 0 66 -26t26 -66v-186h-652z" /> -<glyph unicode="n" horiz-adv-x="1693" d="M102 0v188q0 38 27.5 64.5t65.5 26.5h96v464h-96q-38 0 -65.5 27.5t-27.5 65.5v188h371q38 0 66 -27t28 -65v-53q0 -17 13 -30t28 -13q24 0 39 12.5t15 30.5v53q0 38 28 65t66 27h463q78 0 132 -55t54 -133v-557h92q39 0 66.5 -26.5t27.5 -64.5v-188h-653v188 q0 38 28 64.5t68 26.5h92v374q0 37 -27 63.5t-65 26.5h-372q-40 0 -67.5 -26.5t-27.5 -63.5v-374h95q39 0 66.5 -26.5t27.5 -64.5v-188h-654z" /> -<glyph unicode="o" horiz-adv-x="1429" d="M102 188v648q0 78 54.5 133t132.5 55h852q75 0 130.5 -55t55.5 -133v-648q0 -78 -55.5 -133t-130.5 -55h-576q-37 0 -63.5 28t-26.5 66v41q0 25 -14 39t-37 14q-18 0 -30.5 -14.5t-12.5 -38.5v-41q0 -38 -27 -66t-65 -28q-78 0 -132.5 55t-54.5 133zM383 375 q0 -41 26.5 -68.5t65.5 -27.5h479q39 0 66 27.5t27 68.5v278q0 37 -27.5 63.5t-65.5 26.5h-479q-38 0 -65 -26.5t-27 -63.5v-278z" /> -<glyph unicode="p" horiz-adv-x="1650" d="M102 745v185q0 40 27.5 67t67.5 27h368v-145q0 -15 13 -27t30 -12q22 0 36.5 11.5t14.5 27.5v51q0 39 28 66.5t67 27.5h608q76 0 131 -54.5t55 -129.5v-654q0 -76 -55 -131t-131 -55h-608q-39 0 -67 27.5t-28 66.5v41q0 24 -13.5 37.5t-37.5 13.5q-18 0 -30.5 -13.5 t-12.5 -37.5v-553q0 -40 -26 -67t-64 -27h-188v1163q0 39 -26 66.5t-64 27.5h-95zM565 373q0 -38 28 -65t66 -27h519q38 0 65 27t27 65v278q0 38 -27 66t-65 28h-519q-38 0 -66 -28t-28 -66v-278z" /> -<glyph unicode="q" horiz-adv-x="1650" d="M102 186v654q0 75 55.5 129.5t131.5 54.5h608q39 0 66.5 -27.5t27.5 -66.5v-51q0 -16 14.5 -27.5t36.5 -11.5q17 0 30 12t13 27v145h369q40 0 67 -27t27 -67v-185h-94q-38 0 -64 -27.5t-26 -66.5v-1163h-188q-38 0 -64.5 27t-26.5 67v553q0 24 -12.5 37.5t-30.5 13.5 q-24 0 -37.5 -13.5t-13.5 -37.5v-41q0 -39 -27.5 -66.5t-66.5 -27.5h-608q-77 0 -132 55t-55 131zM381 373q0 -38 27 -65t65 -27h518q38 0 66 27t28 65v278q0 38 -28 66t-66 28h-518q-38 0 -65 -28t-27 -66v-278z" /> -<glyph unicode="r" horiz-adv-x="1134" d="M102 0v186q0 40 27.5 66.5t67.5 26.5h90v466h-90q-40 0 -67.5 26.5t-27.5 66.5v186h373q38 0 65 -27t27 -67v-51q0 -15 13 -28t28 -13q24 0 39 12.5t15 28.5v51q0 40 27 67t65 27h186q38 0 65 -27t27 -67v-92q0 -40 -27 -66.5t-65 -26.5h-278q-40 0 -67.5 -27t-27.5 -67 v-372h95q38 0 65 -26.5t27 -66.5v-186h-652z" /> -<glyph unicode="s" horiz-adv-x="1363" d="M102 602v236q0 79 54.5 132.5t132.5 53.5h508q38 0 65 -26.5t27 -63.5v-53q0 -19 14.5 -31t32.5 -12t31.5 12t13.5 31v53q0 37 28 63.5t68 26.5h90q39 0 66 -27t27 -67v-176h-805q-37 0 -55.5 -20.5t-18.5 -45.5q0 -24 18.5 -44.5t55.5 -20.5h579q120 0 174 -44t54 -137 v-256q0 -79 -54.5 -132.5t-132.5 -53.5h-508q-38 0 -65 26.5t-27 63.5v53q0 17 -11 30t-34 13t-35 -13t-12 -30v-53q0 -37 -28 -63.5t-68 -26.5h-90q-39 0 -66 27t-27 67v176h805q38 0 56 20.5t18 49.5t-18 50.5t-56 21.5h-579q-228 0 -228 190z" /> -<glyph unicode="t" horiz-adv-x="989" d="M102 186v1155q0 38 27.5 65.5t65.5 27.5h186v-553q0 -15 14 -29t31 -14q21 0 36 13.5t15 29.5v47q0 39 26.5 67.5t65.5 28.5h318v-186q0 -37 -27 -66t-65 -29h-318q-39 0 -67.5 -26.5t-28.5 -65.5v-276q0 -38 29 -67t67 -29h316q38 0 66 -27t28 -66v-186h-598 q-77 0 -132 55t-55 131z" /> -<glyph unicode="u" horiz-adv-x="1601" d="M102 838v186h467v-651q0 -37 27.5 -65.5t65.5 -28.5h278q38 0 66 28.5t28 65.5v368h-94q-39 0 -66.5 28.5t-27.5 68.5v186h467v-745h92q39 0 66.5 -27t27.5 -66v-186h-373q-38 0 -65 27t-27 67v41q0 23 -15 37t-38 14q-16 0 -28.5 -14.5t-12.5 -36.5v-41 q0 -39 -27.5 -66.5t-66.5 -27.5h-371q-78 0 -132 54.5t-54 131.5v555h-92q-40 0 -67.5 28.5t-27.5 68.5z" /> -<glyph unicode="v" horiz-adv-x="1599" d="M102 838v186h652v-186q0 -38 -28.5 -65.5t-66.5 -27.5h-92l92 -374l11 -39q9 -25 33 -39t51 -14h161h-69q25 0 49.5 14t34.5 39q20 80 56 229t44 184h-90q-40 0 -67 27.5t-27 65.5v186h651v-186q0 -39 -26.5 -66t-65.5 -27h-90l-168 -651q-8 -42 -31.5 -68t-60.5 -26 h-508q-38 0 -62 26t-30 68l-166 651h-92q-40 0 -67.5 27.5t-27.5 65.5z" /> -<glyph unicode="w" horiz-adv-x="2342" d="M102 836v188h652v-188q0 -37 -28 -64t-69 -27h-90v-372q0 -41 26.5 -69t63.5 -28h281q38 0 65 28t27 69v372h-92q-38 0 -65 27t-27 64v188h649v-188q0 -37 -26.5 -64t-63.5 -27h-96v-372q0 -41 28.5 -69t67.5 -28h276q40 0 67.5 28t27.5 69v372h-95q-38 0 -65 27t-27 64 v188h652v-188q0 -37 -27.5 -64t-65.5 -27h-94v-559q0 -78 -54 -132t-132 -54h-651q-66 0 -117.5 41t-69.5 104q0 15 -14 28t-37 13q-15 0 -28 -14.5t-13 -34.5v-45q0 -39 -26.5 -65.5t-65.5 -26.5h-375q-75 0 -129.5 54t-54.5 132v559h-92q-38 0 -65.5 27t-27.5 64z" /> -<glyph unicode="x" horiz-adv-x="1611" d="M102 0v190q0 37 29 65t68 28h143l176 239l-162 217h-157q-40 0 -68.5 27t-28.5 65v191h660v-191q0 -38 -28.5 -65t-67.5 -27h-93l84 -123h301l80 123h-92q-39 0 -65.5 26.5t-26.5 65.5v191h655v-191q0 -39 -27.5 -65.5t-68.5 -26.5h-151l-158 -217l168 -239h141 q41 0 68.5 -27.5t27.5 -65.5v-190h-655v190q0 38 26.5 65.5t65.5 27.5h105l-93 143h-301l-96 -143h105q38 0 67 -28t29 -65v-190h-660z" /> -<glyph unicode="y" horiz-adv-x="1601" d="M102 838v186h652v-186q0 -37 -27 -65t-65 -28h-95v-372q0 -39 27.5 -66.5t67.5 -27.5h278q39 0 66.5 27.5t27.5 66.5v372h-94q-38 0 -65 28t-27 65v186h651v-186q0 -37 -27.5 -65t-66.5 -28h-92v-1071q0 -77 -54.5 -131.5t-130.5 -54.5h-188q-38 0 -65 27t-27 67v185h92 q40 0 67 27t27 65v274q0 25 -14 39t-37 14q-18 0 -30.5 -14.5t-12.5 -38.5v-41q0 -38 -27 -66t-65 -28h-375q-76 0 -130 55t-54 133v559h-92q-39 0 -67 28t-28 65z" /> -<glyph unicode="z" horiz-adv-x="1257" d="M102 0v186q0 102 72 146l717 440h-467q-18 0 -30.5 -14.5t-12.5 -38.5v-39q0 -40 -27 -67t-65 -27h-187v344q0 38 27.5 65t65.5 27h983v-279l-768 -464h436q22 0 37.5 13.5t15.5 29.5v51q0 38 27 65t65 27h187v-373q0 -38 -27.5 -65t-65.5 -27h-983z" /> -<glyph unicode=" " horiz-adv-x="717" /> -<glyph unicode=" " horiz-adv-x="1434" /> -<glyph unicode=" " horiz-adv-x="717" /> -<glyph unicode=" " horiz-adv-x="1434" /> -<glyph unicode=" " horiz-adv-x="478" /> -<glyph unicode=" " horiz-adv-x="358" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="239" /> -<glyph unicode=" " horiz-adv-x="179" /> -<glyph unicode=" " horiz-adv-x="286" /> -<glyph unicode=" " horiz-adv-x="79" /> -<glyph unicode=" " horiz-adv-x="286" /> -<glyph unicode=" " horiz-adv-x="358" /> -<glyph unicode="" horiz-adv-x="1024" d="M0 0v1024h1024v-1024h-1024z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/stylesheets/saturnv-webfont.ttf b/app/assets/stylesheets/saturnv-webfont.ttf deleted file mode 100755 index d3e6a36d..00000000 Binary files a/app/assets/stylesheets/saturnv-webfont.ttf and /dev/null differ diff --git a/app/assets/stylesheets/saturnv-webfont.woff b/app/assets/stylesheets/saturnv-webfont.woff deleted file mode 100755 index 249fdd94..00000000 Binary files a/app/assets/stylesheets/saturnv-webfont.woff and /dev/null differ diff --git a/app/assets/stylesheets/screen.css.scss b/app/assets/stylesheets/screen.css.scss deleted file mode 100644 index d1d055b0..00000000 --- a/app/assets/stylesheets/screen.css.scss +++ /dev/null @@ -1,5 +0,0 @@ -/* Welcome to Compass. - * In this file you should write your main styles. (or centralize your imports) - * Import this file using the following HTML or equivalent: - * <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" /> */ -@import "compass/reset"; diff --git a/app/assets/stylesheets/search.scss b/app/assets/stylesheets/search.scss index 820e4497..e598c1ae 100644 --- a/app/assets/stylesheets/search.scss +++ b/app/assets/stylesheets/search.scss @@ -1,5 +1,5 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; .navbar { .navbar-inner { diff --git a/app/assets/stylesheets/team.scss b/app/assets/stylesheets/team.scss index 41e70505..77878ae3 100644 --- a/app/assets/stylesheets/team.scss +++ b/app/assets/stylesheets/team.scss @@ -1,5 +1,5 @@ @import "base"; -@import "compass/css3/"; +@import "compass/css3"; body#team { .inside-main-content { @@ -266,74 +266,6 @@ body#team { padding-right: 0; } - #leaderboard { - float: left; - overflow: auto; - padding: 20px 30px 13px 30px; - //border-right: 1px solid #eee; - - li.pending-team-score { - padding-top: 30px; - width: 350px; - font-family: "MuseoSans-700"; - font-size: 1.4em; - } - - li { - float: left; - background: image-url("team/dot-break.png") no-repeat left 20px; - width: 65px; - //margin-left: 10px; - padding-left: 20px; - //overflow: hidden; - - &:first-child { - background: none; - margin: 0; - padding: 0; - } - - a { - text-align: center; - display: block; - font-size: 1.4em; - color: #393939; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - -o-text-overflow: ellipsis; - -ms-text-overflow: ellipsis; - } - - img { - display: block; - width: 38px; - height: 38px; - @include border-radius(100px); - margin: 0 auto 10px auto; - //border: solid 2px #eee; - } - - span { - font-size: 1.6em; - text-align: center; - display: block; - } - } - - .thisteam { - - img { - width: 45px; - height: 45px; - } - - span { - font-size: 2em; - } - } - } - } .location { diff --git a/app/assets/stylesheets/tipTip.scss b/app/assets/stylesheets/tipTip.scss index ef64a9ce..e2c873a2 100644 --- a/app/assets/stylesheets/tipTip.scss +++ b/app/assets/stylesheets/tipTip.scss @@ -34,11 +34,7 @@ background-color: rgba(25, 25, 25, 0.92); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(#000)); border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; box-shadow: 0 0 3px #555; - -webkit-box-shadow: 0 0 3px #555; - -moz-box-shadow: 0 0 3px #555; } #tiptip_arrow, #tiptip_arrow_inner { diff --git a/app/assets/stylesheets/wisdom_script-webfont.eot b/app/assets/stylesheets/wisdom_script-webfont.eot deleted file mode 100755 index 59c8b544..00000000 Binary files a/app/assets/stylesheets/wisdom_script-webfont.eot and /dev/null differ diff --git a/app/assets/stylesheets/wisdom_script-webfont.svg b/app/assets/stylesheets/wisdom_script-webfont.svg deleted file mode 100755 index 9d6ad510..00000000 --- a/app/assets/stylesheets/wisdom_script-webfont.svg +++ /dev/null @@ -1,131 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="WisdomScriptAIRegular" horiz-adv-x="1005" > -<font-face units-per-em="2048" ascent="1536" descent="-512" /> -<missing-glyph horiz-adv-x="624" /> -<glyph horiz-adv-x="0" /> -<glyph horiz-adv-x="2048" /> -<glyph unicode=" " horiz-adv-x="624" /> -<glyph unicode="	" horiz-adv-x="624" /> -<glyph unicode=" " horiz-adv-x="624" /> -<glyph unicode="!" horiz-adv-x="661" d="M29 102q0 53 35.5 89t87.5 36t88 -36t36 -89q0 -52 -35.5 -87t-88.5 -35t-88 35t-35 87zM162 311l669 1164h213l-667 -1164h-215z" /> -<glyph unicode=""" horiz-adv-x="724" d="M205 1108l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14zM512 1108l4 82h12q37 0 77 20.5t59 49.5q-46 8 -74.5 35.5t-28.5 66.5q0 54 33 83.5t76 29.5 q48 0 84.5 -31t36.5 -84q0 -70 -41.5 -129.5t-102 -91t-121.5 -31.5h-14z" /> -<glyph unicode="#" horiz-adv-x="1538" d="M80 276l82 144h287l118 205h-284l82 143h284l148 256h192l-147 -256h258l147 256h193l-148 -256h277l-82 -143h-277l-116 -205h272l-82 -144h-272l-158 -276h-195l158 276h-256l-158 -276h-194l158 276h-287zM643 420h256l119 205h-258z" /> -<glyph unicode="$" horiz-adv-x="870" d="M24.5 186.5q-30.5 102.5 20.5 225.5h178q-26 -42 -31.5 -92t8 -91.5t48.5 -69.5t84 -28q47 0 90 43t43 119q0 27 -10 58t-20 51t-32.5 60.5t-31.5 57.5q-62 115 -62 211q0 82 27 147t71.5 104.5t98.5 60t112 20.5q22 0 72 -8l121 211h160l-154 -269q101 -80 101 -202 q0 -80 -41 -166h-179q47 81 47 149q0 59 -34 95t-80 36q-47 0 -90 -42.5t-43 -118.5q0 -27 10 -58.5t19.5 -51t32.5 -61t32 -57.5q61 -113 61 -211q0 -82 -27 -147t-71.5 -104.5t-98.5 -60t-112 -20.5q-14 0 -59 5l-101 -179h-159l127 224q-97 57 -127.5 159.5z" /> -<glyph unicode="%" horiz-adv-x="1177" d="M-94 0h215l1147 1024h-213zM319 868q0 74 51 125t124 51q74 0 125 -51t51 -125q0 -73 -51 -123.5t-125 -50.5t-124.5 50.5t-50.5 123.5zM438 868q0 -23 16.5 -39t39.5 -16t39 16t16 39t-16 39.5t-39 16.5t-39.5 -16.5t-16.5 -39.5zM524 152q0 74 50.5 125t123.5 51 q74 0 125 -51t51 -125q0 -73 -51 -124t-125 -51q-73 0 -123.5 50.5t-50.5 124.5zM643 152q0 -23 16 -39.5t39 -16.5t39.5 16.5t16.5 39.5t-16.5 39t-39.5 16t-39 -16t-16 -39z" /> -<glyph unicode="&" horiz-adv-x="800" d="M-104 -197l112 199q-59 33 -88 91t-18 147.5t71 193.5q68 120 139 177t158 73q-39 46 -37 123t52 164q55 96 118.5 149.5t122.5 70.5t142 19l96 166h160l-111 -194q85 -46 109.5 -142.5t-29.5 -210.5h-209l18 31q62 107 32 174q-23 49 -81 43q-77 -8 -150 -109 q-13 -19 -26 -40l-24 -43q-36 -62 -28 -104.5t38.5 -64.5t71.5 -22l-58 -98q-188 0 -284 -162l-72 -123q-63 -110 -18 -163q33 -40 101 -25q79 19 128 97q3 4 6 9l41 72l211 2q-2 -4 -31 -57q-78 -134 -188.5 -204t-220.5 -73l-95 -166h-159z" /> -<glyph unicode="'" horiz-adv-x="358" d="M268 1098l4 82h13q37 0 76.5 20t58.5 49q-46 8 -74.5 36t-28.5 67q0 54 33 83t76 29q48 0 84.5 -31t36.5 -83q0 -105 -84.5 -178.5t-179.5 -73.5h-15z" /> -<glyph unicode="(" horiz-adv-x="774" d="M44 132.5q-5 169.5 41.5 345t142 354.5t223.5 328t296 264.5t349 166.5l73 -53q-112 -50 -222.5 -133.5t-205 -185.5t-180 -222.5t-151 -243.5t-114.5 -248t-73.5 -237.5t-25 -211.5t27.5 -169l-112 -53q-64 129 -69 298.5z" /> -<glyph unicode=")" horiz-adv-x="962" d="M-215 -113q100 44 199 115.5t186 159t168 189.5t146.5 211t119.5 220t89.5 219t54.5 206t16.5 183.5t-27.5 147.5l113 53q64 -129 69 -298.5t-41.5 -345t-142 -354.5t-223.5 -328t-296 -264.5t-349 -166.5z" /> -<glyph unicode="*" horiz-adv-x="983" d="M172 1012l72 125h248l-123 217l108 59l121 -213l125 215h145l-161 -278h319l-72 -125h-247l122 -215l-108 -62l-123 215l-123 -213h-143l157 275h-317z" /> -<glyph unicode="+" horiz-adv-x="1116" d="M133 467l82 143h320l174 299h192l-174 -299h324l-82 -143h-324l-194 -338h-195l195 338h-318z" /> -<glyph unicode="," horiz-adv-x="258" d="M29 -152l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14z" /> -<glyph unicode="-" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="." horiz-adv-x="493" d="M53 96q0 50 34 84.5t83 34.5q50 0 84.5 -34.5t34.5 -84.5q0 -49 -34.5 -82.5t-84.5 -33.5t-83.5 33.5t-33.5 82.5z" /> -<glyph unicode="/" horiz-adv-x="1167" d="M-94 0l1601 1432h213l-1599 -1432h-215z" /> -<glyph unicode="0" horiz-adv-x="890" d="M-11 122q-42 131 64 312q85 146 197 340q89 154 187 216.5t227 62.5q100 0 167.5 -63t75.5 -160t-53 -212l-215 -372q-102 -177 -264 -245q-137 -57 -253 -15q-102 37 -133 136zM183 148q33 -40 101 -25q79 19 128 97q3 4 6 9l272 469q62 107 32 174q-23 49 -81 43 q-77 -8 -150 -109q-13 -19 -26 -40q-76 -126 -264 -455q-63 -110 -18 -163z" /> -<glyph unicode="1" horiz-adv-x="702" d="M-164 0l82 143h176l387 670q-85 -46 -227 -86l-45 133q8 3 43 15t44.5 15.5t41 15t43.5 16.5t40 16.5t42.5 19.5t39 21t42 24.5t39 26.5t41.5 31l82 -187l-422 -731h188l-82 -143h-555z" /> -<glyph unicode="2" horiz-adv-x="956" d="M-143 0l80 137q101 23 180 49.5t163.5 69t154 99t140.5 139.5t134 190q62 105 30 170q-23 49 -81 44q-77 -7 -146 -102q-13 -18 -25 -38l-59 -94h-217l80 139q93 164 249 217q132 45 247 -6q104 -45 135 -145q35 -116 -45 -259q-55 -98 -127 -180t-149 -138t-148 -93.5 t-142 -61.5h375l-80 -137h-749z" /> -<glyph unicode="3" horiz-adv-x="937" d="M-145 19.5q17 83.5 69 150.5h201q-10 -11 -24 -31.5t-38 -79.5t-24 -114q0 -65 53 -92q64 -33 148 16q79 46 143 156q38 67 50.5 128.5t0.5 104.5t-43.5 68.5t-75.5 25.5l80 137q118 0 187.5 37t119.5 123q30 52 43.5 98t9.5 79t-23 52t-52 19q-43 0 -93 -37.5 t-93 -111.5l-43 -74h-218l56 100q89 154 186.5 216.5t226.5 62.5q83 0 141.5 -42t81 -106t15 -141.5t-46.5 -145.5q-68 -118 -144.5 -174.5t-181.5 -76.5q35 -47 49.5 -105t3.5 -131.5t-53 -146.5q-49 -85 -110.5 -145t-126 -90.5t-121 -43t-115.5 -12.5q-95 0 -157 49.5 t-80.5 121.5t-1.5 155.5z" /> -<glyph unicode="4" horiz-adv-x="948" d="M-178 133q166 129 335.5 271.5t292 254.5t221 206t149.5 145l50 51l82 -187l-422 -731h211l-82 -143h-210l-164 -287h-189l164 287h-393zM63 143h279l317 549q-293 -311 -596 -549z" /> -<glyph unicode="5" horiz-adv-x="878" d="M-170 -143q-35 103 35 227l47 84h209l-78 -139q-60 -105 -18 -158q33 -40 104 -23q85 20 145 108q8 11 15 24l168 294q28 49 34.5 93.5t-4.5 74.5t-35.5 47.5t-56 17.5t-69.5 -21t-72 -62q-20 20 -58 56.5t-46 43.5l290 500h551l-94 -164h-369l-133 -233q10 2 35 2 q100 0 167.5 -62.5t75.5 -159t-52 -212.5l-146 -258q-96 -169 -258 -223q-135 -44 -253 6q-102 43 -134 137z" /> -<glyph unicode="6" horiz-adv-x="917" d="M5 146q-31 102 38 225q71 127 205 362t162 285q95 167 245 222q124 46 227 -3q96 -45 118 -149q7 -37 4 -76l-152 -11q16 76 -37 102q-53 25 -126 -14q-70 -36 -114 -114l-40 -72q40 12 90 12q101 0 159 -61t57 -162t-63 -211l-145 -258q-96 -170 -256 -223 q-131 -44 -244 6q-100 44 -128 140zM183 157q34 -41 104 -23q85 21 145 109q7 11 14 23l168 295q24 42 32 81t1 66t-23.5 47.5t-42 25t-54 -2t-61 -33t-60.5 -67.5q-150 -263 -205 -363q-61 -106 -18 -158z" /> -<glyph unicode="7" horiz-adv-x="788" d="M-164 -287q197 331 420 627t418 518h-537l94 166h594l93 -150q-20 -20 -54.5 -56.5t-139 -156.5t-204.5 -247t-233 -319t-242 -382h-209z" /> -<glyph unicode="8" horiz-adv-x="897" d="M14 124q-39 130 64 310l41 72q117 206 307 242q-12 34 -12 75q0 91 63 197q72 127 152.5 178t187.5 51q87 0 142 -56t55 -146q0 -87 -56 -185q-92 -154 -229 -205q43 -60 43.5 -136t-49.5 -171l-59 -104q-102 -178 -266 -246q-136 -57 -251 -14q-102 38 -133 138z M207 148q33 -40 101 -25q79 19 128 97q3 4 6 9l117 201q62 107 32 174q-23 49 -81 43q-77 -8 -150 -109q-13 -19 -26 -40q-105 -181 -109 -187q-63 -110 -18 -163zM591 773q27 -32 75 -17q46 15 77 69l84 148q45 77 17 122q-22 35 -69 20q-55 -20 -99 -97l-78 -137 q-39 -68 -7 -108z" /> -<glyph unicode="9" horiz-adv-x="915" d="M-106 12l151 11q-16 -76 37 -102q53 -25 126 14q70 36 114 114l40 72q-44 -12 -90 -12q-53 0 -95 23t-66 65t-31.5 95.5t7.5 119t52 131.5l146 258q96 169 255 223q130 44 243 -6q100 -44 128 -140q29 -103 -39 -225q-71 -127 -204.5 -362t-161.5 -285 q-94 -166 -247 -222q-127 -46 -235 2q-99 43 -124 144q-9 38 -6 82zM235 290q7 -28 24.5 -46.5t46 -18.5t59 10.5t65 39.5t62.5 71q149 263 204 363q61 106 18 158q-34 41 -104 23q-85 -21 -145 -109q-7 -11 -14 -23l-168 -295q-31 -54 -43 -99.5t-5 -73.5z" /> -<glyph unicode=":" horiz-adv-x="765" d="M29 96q0 50 33.5 84.5t82.5 34.5t84 -34.5t35 -84.5q0 -49 -34.5 -82.5t-84.5 -33.5q-49 0 -82.5 33t-33.5 83zM438 731q0 50 34 84.5t83 34.5t84 -35t35 -84t-34.5 -83t-84.5 -34q-49 0 -83 34t-34 83z" /> -<glyph unicode=";" horiz-adv-x="727" d="M29 -152l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14zM397 668q0 50 34 84t83 34q50 0 84.5 -34.5t34.5 -83.5t-34.5 -83t-84.5 -34t-83.5 33.5t-33.5 83.5z" /> -<glyph unicode="<" horiz-adv-x="1095" d="M18 436l72 127l1071 481l-114 -204l-805 -383l389 -334l-82 -143z" /> -<glyph unicode="=" horiz-adv-x="1003" d="M123 313l82 144h549l-82 -144h-549zM272 569l82 144h549l-82 -144h-549z" /> -<glyph unicode=">" horiz-adv-x="1095" d="M-66 -20l115 204l805 383l-389 334l82 143l530 -456l-71 -127z" /> -<glyph unicode="?" horiz-adv-x="1001" d="M109 96q0 50 33.5 84.5t82.5 34.5t84 -34.5t35 -84.5q0 -49 -34.5 -82.5t-84.5 -33.5t-83 33t-33 83zM242 311q18 32 97.5 170t121.5 213q398 185 483 434q42 123 -7 188q-40 55 -117 34q-101 -26 -191 -163q-44 -67 -80 -155l-164 29q57 228 222 358q133 104 277 103 q135 -1 209 -96q58 -75 58 -193q0 -161 -150.5 -331t-384.5 -306h2l-161 -285h-215z" /> -<glyph unicode="@" horiz-adv-x="1775" d="M-75 464q33 253 197 467q177 231 441 325q218 77 461 44q133 -18 236.5 -67t167 -118t100 -155t42 -178.5t-13.5 -188.5t-60 -184.5t-103 -167t-138 -136.5t-170 -91.5t-194 -33.5q-80 0 -128 38t-56 101q-169 -139 -295 -139q-128 0 -171 92t25 211l299 516 q65 112 169.5 178.5t195.5 66.5q98 0 164 -71t59 -144h121l-344 -602q-33 -63 -24 -89.5t48 -26.5q85 0 165.5 41.5t142 111t105.5 159.5t62.5 186t4.5 192.5t-58.5 177t-137 141.5t-222.5 84q-277 49 -529 -109q-196 -123 -317 -334q-128 -221 -117 -440q12 -241 193 -383 q114 -90 286 -128q92 -21 183.5 -23t171.5 11t161.5 42.5t149.5 65t140.5 87t129.5 99.5t121 111t110.5 113t102.5 114l15 16q22 -9 45.5 -30.5t33.5 -42.5q-71 -85 -143.5 -160.5t-153.5 -147.5t-164.5 -131.5t-172.5 -109.5t-182.5 -83.5t-189.5 -52.5t-198 -18t-203 23 q-325 69 -472 304q-126 201 -92 467zM427 137.5q9 -26.5 48 -26.5q69 0 160 76t184 223l166 290q51 94 9 144q-34 40 -101 23q-82 -20 -140 -113q-2 -5 -5 -9l-297 -518q-33 -63 -24 -89.5z" /> -<glyph unicode="A" horiz-adv-x="2035" d="M40 434q-2 24 -3 48q0 74 20 157q26 109 88 215q57 98 139 169t170.5 107.5t183.5 41.5q15 1 29 1q79 0 149 -23q84 -27 154.5 -90.5t110.5 -156.5l-170 -65q-29 72 -83 116t-121 52q-20 2 -40 3q-47 -1 -97 -15q-70 -20 -141 -80.5t-124 -151.5q-61 -106 -77 -214 q-5 -37 -6 -71q0 -66 20 -122q30 -85 111 -139q80 -53 196 -52h4q87 1 181 50.5t181 132t177 188t176.5 220t172.5 226.5t171.5 208.5t166.5 165.5t164 97q45 15 87 15q36 0 71 -11l-422 -1229q-14 -42 -17.5 -64.5t2.5 -31t22 -8.5q29 0 124.5 87t210.5 220l15 16 q22 -9 46 -30.5t34 -42.5q-53 -62 -88 -101.5t-84 -90.5t-86.5 -82.5t-80.5 -61t-83 -43.5t-78 -14q-74 0 -110 44q-34 42 -34 105v5q2 66 31 149l76 217h-287q-88 -117 -166 -202.5t-171.5 -162t-194.5 -116t-207 -39.5q-109 0 -201.5 35t-158 95t-105.5 144t-48 180z M1368 602h246l213 604q-54 -55 -117 -134t-108.5 -142t-119.5 -168t-114 -160z" /> -<glyph unicode="B" horiz-adv-x="1554" d="M43 492q1 95 29.5 182t86.5 164t140 129l86 -109q-101 -66 -151 -178q-39 -89 -39 -185q0 -25 3 -51q13 -124 85 -225q41 49 82 121l573 991q69 121 164.5 185.5t187.5 64.5q176 0 256 -114q46 -67 46 -151q0 -40 -10 -83q-34 -142 -160 -243q-75 -60 -171 -93 q75 -50 121 -122.5t60 -154.5q8 -43 9 -88q0 -40 -7 -82q-13 -89 -50.5 -173t-101.5 -160t-144.5 -132.5t-186.5 -90t-222 -33.5q-135 0 -250 36t-194.5 96.5t-136 142t-81.5 171.5q-24 87 -24 178v7zM418 98q130 -73 307 -73q148 0 268.5 76.5t174.5 190t61 231.5 q1 10 1 20q0 107 -70 195q-76 96 -220 126l-57 6l-359 -620q-57 -95 -106 -152zM954 995q168 3 264 48t156 157q31 59 31 110q0 32 -12 60q-25 58 -82 62h-9q-73 0 -144 -94q-17 -22 -32 -48z" /> -<glyph unicode="C" horiz-adv-x="1101" d="M39 1059q0 112 54.5 215t164.5 182l70 -125q-68 -53 -103 -123t-35 -145q0 -92 49.5 -173.5t141.5 -129.5l332 571q69 121 164.5 185.5t187.5 64.5q121 0 202 -87.5t81 -229.5q0 -135 -86 -287q-81 -141 -194 -235.5t-227 -134.5t-233 -40q-50 0 -121 11l-59 -105 q-46 -77 -57 -147q-4 -25 -3 -48q0 -39 12 -68q20 -46 60 -72.5t95 -26.5q276 0 552 319l15 16q24 -6 47.5 -27.5t32.5 -45.5q-75 -87 -141 -149.5t-153 -122t-189 -90.5t-216 -31q-109 0 -185 49q-74 49 -104 126q-21 55 -21 120q0 27 3 55q12 98 68 194l63 111 q-127 66 -197.5 180t-70.5 244zM565 709h43q118 0 228.5 59t184 145.5t117.5 181.5t44 171q0 61 -29.5 96t-87.5 35q-47 0 -97.5 -39t-95.5 -117z" /> -<glyph unicode="D" horiz-adv-x="1918" d="M27 8q0 94 78.5 165t220.5 71q107 0 235 -62q123 214 350.5 607.5t288.5 498.5q-5 0 -15.5 1t-15.5 1q-101 0 -190.5 -30t-152 -78.5t-105.5 -112t-59 -129.5q-9 -37 -8 -75q0 -29 5 -57q12 -66 54 -120l-123 -110q-67 60 -95 150q-20 65 -20 132q0 27 3 54 q11 96 63.5 193t135 173t209 124t275.5 48q380 0 568 -229q145 -176 145 -445v-14q-4 -258 -135 -497q-129 -235 -331 -354q-160 -93 -337 -93q-69 0 -130.5 11t-120 35t-94 42.5t-93.5 52.5q-135 -170 -342 -170q-125 0 -194.5 63.5t-69.5 153.5zM213 18q0 -27 26 -45 t76 -18q62 0 99 20.5t69 65.5q-93 39 -178 39q-43 0 -67.5 -18.5t-24.5 -43.5zM721 94q91 -53 171.5 -81.5t174.5 -28.5q97 0 190 46t166.5 122.5t130 178t88.5 210t36 219.5v26q0 96 -24 180q-26 96 -94 172.5t-171 114.5z" /> -<glyph unicode="E" horiz-adv-x="1398" d="M31 307q0 121 39.5 231t108.5 194.5t160 146.5t198 93q95 27 192 27h25q-41 80 -41 166q0 162 102 269.5t258 107.5q146 0 246 -82.5t100 -224.5q0 -47 -13 -91t-31.5 -73t-36.5 -51t-31 -32l-13 -11l-114 121q1 0 8.5 5.5t18.5 17.5t21 28t17.5 41.5t7.5 54.5 q0 94 -75 137q-40 22 -82 22q-32 0 -66 -12q-88 -31 -122 -126q-17 -48 -17 -107q0 -50 16.5 -92.5t42 -69t43 -40.5t31.5 -21q0 -2 4 -2l-63 -111q-28 9 -68 29q-67 24 -137 26h-13q-64 0 -123 -18q-66 -20 -128 -54.5t-113.5 -87t-90 -114.5t-60 -138t-21.5 -155 q0 -114 61.5 -203.5t155 -134.5t197.5 -45q87 0 167 37t133 98.5t83 133.5q23 57 23 117q0 16 -2 32q-8 78 -56 139l125 88q64 -76 86 -168q12 -51 13 -100q-1 -40 -9 -80q-18 -88 -69.5 -172t-126 -147t-175 -101t-207.5 -38q-161 0 -291.5 63.5t-209 188t-78.5 288.5z" /> -<glyph unicode="F" horiz-adv-x="1550" d="M29 252q0 128 68.5 235.5t181 168.5t239.5 61v-162q-130 0 -222.5 -84.5t-92.5 -210.5q0 -117 91 -192.5t222 -75.5q123 0 241 72.5t204 222.5l215 375h-203l55 102h205l317 551q-33 -14 -70.5 -22.5t-81.5 -10.5q-45 -4 -76 -4h-23q-26 0 -64 1q-56 1 -80 1 q-95 0 -171 -10.5t-140 -34.5t-99.5 -67t-35.5 -103v-14h-183q-2 12 -2 36q0 76 32 137t84.5 100t122 65.5t141 37.5t145.5 11h89q36 0 60 -0.5t36 0.5q26 0 87 2.5t95.5 9.5t85 18t93 29t84.5 43l111 -186h-2l-340 -590h176l-55 -102h-180l-240 -416q-65 -113 -144 -197.5 t-161 -134.5t-163 -74t-163 -24q-135 0 -247.5 58.5t-177 159t-64.5 218.5z" /> -<glyph unicode="G" horiz-adv-x="1359" d="M45 1059q0 112 54.5 215t164.5 182l70 -125q-67 -53 -102 -123t-35 -145q0 -92 49.5 -173.5t140.5 -129.5l332 571q69 121 164.5 185.5t187.5 64.5q224 0 308 -142q42 -71 42 -162q0 -66 -22 -142q-54 -184 -208 -333q-194 -186 -453 -226q-61 -9 -124 -9q-48 0 -120 11 l-60 -105q-81 -141 -81 -235q0 -14 1 -28q15 -99 125 -99q117 0 216.5 89t191.5 251l22 36h213l-270 -462q123 53 240.5 150.5t253.5 254.5l14 16q22 -9 46 -30.5t34 -42.5q-332 -384 -672 -492l-164 -280q-44 -75 -107 -121.5t-125 -55.5q-25 -4 -49 -4q-34 0 -65 8 q-54 13 -87.5 55.5t-33.5 102.5q0 223 467 365l55 96q-108 -67 -231 -67q-73 0 -128 22.5t-85.5 61.5t-44.5 92q-9 37 -9 78q0 17 1 34q6 61 28.5 126.5t59.5 129.5l63 111q-127 66 -197.5 180t-70.5 244zM309 -375q0 -28 19 -41q10 -6 22 -6t26 6q29 13 50 51l96 172 q-213 -82 -213 -182zM571 709h43q239 0 418 157q128 113 176 258q20 62 20 112q0 56 -26 98q-40 63 -131 63q-47 0 -97 -39t-95 -117z" /> -<glyph unicode="H" horiz-adv-x="2271" d="M21 430q10 128 81 250q40 69 91.5 120.5t97 76t85 39.5t62.5 18l23 2l39 -158l-16.5 -5.5t-41 -18t-58.5 -33.5t-62 -53.5t-58 -75.5q-57 -99 -57 -194q0 -60 22 -118q47 -123 173 -191q100 -53 214 -53q61 0 126 15q243 58 439 312q53 70 101 153l432 750 q-72 -37 -189 -71t-208 -56t-176 -65t-119 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t40.5 -29.5l18 -9l-80 -137q-57 22 -105.5 63.5t-82.5 99.5q-32 54 -32 128v11q2 80 52 165q41 71 110 121t147 75t177 52t192 51t199 73.5t193 118.5l108 -186 l-342 -590h320l303 522q60 103 130.5 168.5t136.5 87.5q59 20 115 19q6 1 13 1q63 -2 112.5 -29t84 -65.5t45.5 -81.5l-141 -77q-23 51 -59 73q-25 15 -54 15q-12 -1 -26 -3q-42 -10 -90 -54t-91 -119l-704 -1221h-215l380 662h-319l-137 -240q-217 -376 -521 -511 q-148 -65 -294 -65q-91 0 -181 25q-193 54 -312 202q-114 144 -114 318q0 19 1 39z" /> -<glyph unicode="I" horiz-adv-x="1028" d="M12 -512l1024 1778q-72 -37 -189 -71t-208 -56t-176 -65t-119 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t40.5 -29.5l18 -9l-80 -137q-57 22 -105.5 63.5t-82.5 99.5q-32 54 -32 128v11q2 80 52 165q41 71 110 121t147 75t177 52t192 51t199 73.5 t193 118.5l109 -186l-1072 -1866h-219z" /> -<glyph unicode="J" horiz-adv-x="1392" d="M51 428q0 93 37 174t80 133t143 114.5t156.5 91t190.5 90.5l102 48q28 13 134.5 63t148 70t132.5 67t144 80.5t122 82.5t124 98l121 -139l-803 -1376q123 53 241 150.5t254 254.5l15 16q22 -9 46 -30.5t34 -42.5q-329 -384 -674 -492l-162 -280q-44 -75 -107 -121.5 t-124 -55.5q-26 -4 -50 -4q-34 0 -66 8q-53 13 -86.5 55.5t-33.5 102.5q0 225 469 365l735 1280q-32 -25 -66.5 -48.5t-79 -48.5t-72.5 -41t-86 -43t-77.5 -36t-88 -40t-79.5 -36q-36 -16 -89 -39t-89.5 -38.5t-84.5 -37.5t-81.5 -40t-72.5 -42t-65 -46.5t-52 -52 t-41.5 -59.5t-25 -67t-9.5 -78q0 -96 54 -156.5t137 -60.5q53 0 105.5 29t90.5 84l98 -96q-43 -76 -125.5 -120t-175.5 -44q-159 0 -253.5 103t-94.5 251zM342 -375q0 -28 20 -41q9 -6 21 -6t27 6q28 13 49 51l98 172q-215 -82 -215 -182z" /> -<glyph unicode="K" horiz-adv-x="2172" d="M38 430q10 128 81 250q40 69 91.5 120.5t96.5 76t84.5 39.5t62.5 18l23 2l39 -158l-16.5 -5.5t-41 -18t-58 -33.5t-61.5 -53.5t-58 -75.5q-57 -98 -57 -193q0 -59 22 -118q46 -124 172 -191q100 -54 214 -53q60 0 124 14q243 57 439 310q54 70 103 155l433 750 q-72 -37 -189.5 -71t-208 -56t-176 -65t-119.5 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t40.5 -29.5l18 -9l-80 -137q-57 22 -105.5 63.5t-82.5 99.5q-32 54 -32 128v11q2 80 52 165q41 71 110 121t147 75t177 52t192 51t199 73.5t193 118.5l109 -186 l-318 -551q34 -8 67 -8q201 0 365 282l87 150q51 89 110.5 150.5t116 89t113.5 35.5q21 3 40 3q34 0 65 -9q48 -14 88 -38.5t66.5 -59t36.5 -71.5l-141 -78q-23 51 -59 73q-26 15 -55 16q-13 0 -25 -3q-42 -9 -89.5 -53.5t-90.5 -120.5l-88 -155q-42 -75 -77.5 -125 t-88 -101t-120 -78.5t-151.5 -31.5q80 -81 80 -192q0 -114 -84 -261l-315 -547q-17 -27 -23 -63q-2 -12 -2 -24q0 -25 8 -49q12 -36 46 -52l-91 -156q-64 32 -102 84q-38 51 -46 110q-3 24 -3 48q-1 36 7 73q12 62 46 119l316 547q60 103 60 186q0 123 -132 199l-156 -270 q-217 -376 -521 -511q-148 -65 -294 -65q-91 0 -181 25q-193 54 -311 202q-114 144 -114 318q0 19 1 39z" /> -<glyph unicode="L" horiz-adv-x="1568" d="M-61 174q0 108 76.5 188t213.5 80q92 0 172 -38.5t160 -110.5q6 8 16.5 26t12.5 21l170 295q-128 65 -199.5 179t-71.5 245q0 112 55 215t165 182l69 -125q-67 -53 -102 -123t-35 -145q0 -93 49 -174t141 -129l332 571q69 121 165 185.5t188 64.5q121 0 201.5 -87.5 t80.5 -229.5q0 -135 -86 -287q-81 -141 -193.5 -235.5t-226.5 -134.5t-233 -40q-49 0 -121 11l-188 -328q-3 -6 -58 -88q13 -13 36.5 -39t43.5 -47t39 -39q90 -91 142 -142t115.5 -106.5t107.5 -81.5t93 -43.5t97 -17.5q176 0 295 116l104 -110q-5 -7 -15 -19t-46 -42 t-78.5 -52.5t-113.5 -41.5t-150 -19q-55 0 -111.5 15.5t-105 38.5t-104 62.5t-98 75.5t-97 90t-91 93t-91 97t-86.5 91q-160 -133 -338 -133q-144 0 -222.5 79t-78.5 187zM96 172q0 -42 32 -71t91 -29q131 0 232 90q-137 117 -242 117q-51 0 -82 -32t-31 -75zM1016 709h43 q118 0 228.5 59t183.5 145.5t117 181.5t44 171q0 61 -29 96t-87 35q-47 0 -97.5 -39t-95.5 -117z" /> -<glyph unicode="M" horiz-adv-x="1914" d="M16 884q2 80 52 165q36 62 91 106.5t121.5 72t142 48t160 42.5t166.5 47.5t171.5 70t164.5 104.5l109 -186l-57 -101q192 242 366 242q57 0 99 -33.5t52 -91.5q2 -12 2 -25q0 -48 -28 -108q202 258 381 258q61 0 103 -36q44 -36 50 -98q1 -8 0 -16q0 -56 -38 -128 l-789 -1367q-17 -27 -23 -63q-2 -12 -2 -24q0 -25 8 -49q12 -36 46 -52l-90 -156q-64 32 -102 84q-38 50 -46 110q-3 24 -3 49q-1 36 7 73q12 62 46 119l733 1273q28 48 28 78q0 17 -9 28q-10 12 -29 12q-32 0 -87 -34q-159 -102 -385 -419l-10 -13l-2 -2l-495 -864h-218 l701 1214q28 48 28 78q0 18 -10 29q-10 12 -28 12q-32 0 -89 -37q-157 -101 -380 -411l-508 -885h-219l729 1266q-72 -37 -189 -71t-207 -56t-175 -65t-119 -101q-30 -51 -32 -95v-11q0 -37 15 -61q17 -28 38.5 -48.5t39.5 -29.5l18 -9l-79 -137q-57 22 -105.5 63.5 t-82.5 99.5q-32 54 -32 128v11z" /> -<glyph unicode="N" horiz-adv-x="2267" d="M41 564q12 153 94 296q58 101 146 174.5t184 110.5q95 37 199 42q15 1 31 1q87 0 163 -24q90 -28 162.5 -95.5t109.5 -165.5l-149 -78q-31 75 -93 121q-64 46 -140 54q-24 3 -47 2q-53 0 -109 -13q-80 -19 -152 -73.5t-118 -133.5q-79 -136 -79 -262q0 -53 14 -105 q38 -139 159 -212q92 -55 200 -55q58 0 121 16q234 57 436 312q69 87 130 194l462 805h213l-155 -1020l481 831q60 103 129 168.5t132 87.5q57 20 111 19q6 1 12 1q60 -2 107.5 -29t80.5 -65t44 -82l-141 -77q-23 51 -59 73q-25 15 -53 15q-11 -1 -25 -3q-42 -10 -90.5 -54 t-91.5 -119l-705 -1221h-215l154 1014l-197 -344q-266 -462 -590 -630q-163 -84 -317 -84q-81 0 -159 23q-180 52 -288 207q-104 148 -104 331q0 23 2 47z" /> -<glyph unicode="O" horiz-adv-x="1159" d="M61 28q-25 56 -25 122q0 106 66 238q12 23 25 46l340 590h104q-3 26 -3 51q0 127 77 260q114 199 292 257q64 21 125 21q79 0 152 -35q115 -54 160 -167q22 -57 22 -118q0 -105 -65 -221q-1 -1 -2 -3l-164 -285q179 32 344 181l60 -117q-111 -102 -236.5 -152.5 t-249.5 -52.5l-227 -397q-130 -225 -324 -319q-108 -52 -206 -52q-48 0 -94 12q-123 34 -171 141zM243 89q34 -51 108 -50h19q103 9 193 97q42 40 72 93l254 443q-195 62 -279 223l-336 -584q-51 -89 -51 -152q0 -40 20 -70zM752 1042q4 -96 59 -160.5t147 -90.5l207 358 q43 76 43 141q0 38 -14 72q-29 69 -100 86q-19 4 -38 4l-144 -63q-57 -50 -101 -132q-59 -112 -59 -203v-12z" /> -<glyph unicode="P" horiz-adv-x="1355" d="M29 0l829 1434h213l-383 -666q52 -59 130 -84q52 -17 107 -17q27 1 55 5q84 12 170 75t146 168q97 167 97 313q0 68 -21 130q-47 140 -183 213q-99 53 -210 53q-48 0 -98 -10q-189 -39 -314 -205q-24 -33 -45 -70q-34 -60 -58 -122.5t-31 -94.5l-7 -32l-145 22 q2 18 6.5 48t30 111t63.5 148q138 239 373 318q103 35 208 35q103 0 207 -34q190 -63 302 -213q105 -141 105 -312q0 -50 -9 -104q-22 -127 -97 -257q-69 -119 -160.5 -196t-183.5 -104q-75 -22 -150 -22q-18 0 -36 2q-93 6 -172 44t-135 100l-389 -676h-215z" /> -<glyph unicode="Q" horiz-adv-x="1513" d="M47 125q0 88 76.5 151.5t214.5 63.5q149 0 352 -156q134 81 254.5 208.5t204.5 271.5q145 249 145 439q0 50 -10 95q-31 147 -155 210q-71 36 -152 36q-62 0 -131 -21q-179 -56 -309 -232q-27 -37 -50 -77q-60 -104 -88 -194q-26 -82 -26 -140q0 -5 1 -10q2 -62 26 -109 t59 -73.5t80 -38.5l-29 -141q-87 8 -153 45t-103.5 94t-55.5 130q-15 59 -15 121q0 15 1 30q4 78 27.5 158t64.5 151q169 292 417 409q137 64 272 64q72 0 143 -18q180 -46 284 -195q95 -137 95 -317q0 -60 -10 -124q-29 -182 -142 -378q-90 -155 -219 -291t-280 -228 q24 -22 79 -72.5t82 -74.5t77.5 -67.5t81.5 -65.5t77.5 -52t82 -44.5t78 -25.5t81.5 -11q175 0 294 116l105 -110q-5 -7 -15 -19t-46.5 -42t-79 -52.5t-113.5 -41.5t-150 -19q-62 0 -124 15.5t-123.5 49t-112.5 66.5t-114 88t-103.5 92.5t-106 101t-98.5 93.5 q-179 -76 -340 -76q-142 0 -221.5 64.5t-79.5 152.5zM207 135q0 -27 31.5 -45t89.5 -18q98 0 207 39q-125 86 -218 86q-52 0 -81 -18.5t-29 -43.5z" /> -<glyph unicode="R" horiz-adv-x="1359" d="M29 0l798 1382h213l-313 -542q96 -46 186 -46q25 0 51 4q114 17 205.5 90.5t147.5 188.5q43 93 43 172q0 37 -10 69q-30 104 -123 167t-215 63q-74 0 -138 -20.5t-106 -53.5t-75.5 -73t-52 -80t-30.5 -73t-16 -54l-4 -20l-180 28q2 11 6 30t22.5 74.5t44 105.5t74.5 111 t108 105.5t150 74.5t197 30q291 0 434 -171q104 -123 104 -297q0 -15 -1 -31q-9 -187 -125 -338q-129 -169 -332 -213q-59 -12 -121 -13q78 -82 79 -193q0 -115 -85 -260l-316 -547q-17 -27 -23 -63q-2 -12 -2 -24q0 -25 8 -49q12 -36 46 -52l-90 -156q-84 42 -122 118 q-31 62 -31 127q-1 15 1 30q8 82 53 159l316 547q59 105 59 187q0 37 -12 70q-38 104 -190 161l-418 -725h-215z" /> -<glyph unicode="S" horiz-adv-x="1802" d="M20 109l64 79q96 -65 210 -65q44 0 91 10q-30 77 -35 163q-1 19 -1 39q0 65 13 127q17 80 59.5 154t103.5 128.5t149.5 87t191.5 32.5q166 0 281 -112l301 295q11 161 35 278t68.5 205t115 132t168.5 44q60 0 104 -23.5t63 -65.5q17 -37 17 -82v-12q-2 -52 -36.5 -115 t-96.5 -122l-246 -242q-8 -133 -8 -354q0 -188 -44.5 -351t-128.5 -287t-215.5 -195.5t-295.5 -71.5q-172 0 -298 62.5t-201 168.5q-67 -18 -133 -18q-49 0 -97 10q-113 23 -199 101zM525 338q2 -74 28 -139q79 49 139 106l357 350q-80 64 -183 64q-81 0 -148 -32.5 t-108.5 -86.5t-63.5 -121q-21 -62 -21 -129v-12zM621 88q113 -133 327 -133q158 0 270.5 97t166 260.5t53.5 377.5v158l-209 -207q39 -77 45 -161q1 -13 1 -26q0 -70 -27 -137q-32 -80 -101 -137l-88 90q66 63 83 139q6 28 6 54q0 45 -18 84l-325 -320q-90 -87 -184 -139z M1659 1255l86 84q104 99 104 160q0 4 -1 9q-6 35 -46 36q-51 0 -86 -70t-57 -219z" /> -<glyph unicode="T" horiz-adv-x="1337" d="M36 150q2 65 38 135t102 129l115 -111q-71 -71 -78 -147q-1 -9 -1 -16q0 -64 48 -108q54 -48 152 -48q202 0 376 303l607 1059q-151 -80 -330 -80q-28 0 -119 4t-115 4q-132 0 -219.5 -67.5t-87.5 -155.5q0 -109 103 -166l-105 -131q-84 44 -127 117.5t-43 158.5 q0 178 147 293t378 115q22 0 105.5 -1t107.5 -1q101 0 205 26t158 52l54 26l111 -186h-2l-639 -1108q-249 -430 -590 -430q-78 0 -146 27.5t-113.5 73t-69.5 107.5q-22 56 -22 114v12z" /> -<glyph unicode="U" horiz-adv-x="1585" d="M39 872q0 90 37.5 159.5t105 117t151 84t186.5 69t200 63.5t203.5 76.5t185.5 98.5l109 -186l-539 -932q-70 -121 -71 -195q0 -29 12 -51q21 -41 72 -42q18 0 40 6q104 24 214 145q46 49 85 110l623 1080h213l-717 -1248q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27 q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -133.5 41.5t-52.5 109.5q-83 -71 -169 -109q-85 -38 -155 -38h-2q-68 0 -117 36t-67 100q-8 27 -8 61q0 47 15 107q25 104 97 228l455 791q-60 -30 -150.5 -61.5t-167 -54t-159 -55.5t-140 -67 t-94.5 -85.5t-37 -115.5q0 -29 11.5 -55t28.5 -42.5t33.5 -28.5t27.5 -18l12 -5l-80 -137q-89 35 -154 111.5t-65 178.5z" /> -<glyph unicode="V" horiz-adv-x="1431" d="M36 876q6 155 143 275q116 100 306 152q376 103 576 237l121 -139l-267 -924l555 809q69 97 143.5 160t139.5 85q62 21 121 21h5q61 -1 107 -25t78 -60.5t43 -80.5l-141 -77q-38 85 -101 85q-14 0 -30 -4q-85 -24 -188 -169l-869 -1221h-190l379 1325 q-59 -34 -149.5 -67.5t-171 -57t-166 -56.5t-147 -67.5t-101 -88.5t-39.5 -120q0 -71 40 -115.5t96 -52.5q13 -2 26 -2q43 0 93 22q64 28 107 91l98 -96q-43 -76 -125.5 -120t-175.5 -44q-144 0 -235 100q-81 88 -81 208v17z" /> -<glyph unicode="W" horiz-adv-x="1916" d="M35 872q0 90 37.5 159.5t105 117t151 84t186.5 69t200 63.5t203.5 76.5t185.5 98.5l108 -186l-606 -1051q-51 -89 -51 -147q0 -17 4 -32q12 -39 49 -39q11 0 25 4q91 25 211 187q33 43 65 95l637 1104h213l-717 -1248q-25 -45 -25 -78q0 -26 15 -44q19 -22 52 -22 q22 0 50 9q101 35 192 170l28 45l565 979q60 103 130.5 168.5t136.5 87.5q59 20 115 19q6 1 13 1q63 -2 112.5 -29t84 -65.5t45.5 -81.5l-141 -77q-23 51 -59 73q-25 15 -54 15q-12 -1 -26 -3q-42 -10 -90 -54t-91 -119l-524 -918q-51 -88 -114 -155.5t-126.5 -105 t-128.5 -57.5q-53 -16 -101 -16q-11 1 -21 1q-58 4 -105 23t-78.5 57.5t-40.5 88.5q-146 -157 -289 -167q-9 -1 -17 -1q-92 0 -145 70q-39 52 -39 123q0 41 13 87q15 52 45 105l545 951q-69 -34 -181 -71.5t-202.5 -67t-178 -69.5t-137 -98t-49.5 -133q0 -29 11.5 -55 t28.5 -42.5t33.5 -28.5t27.5 -18l12 -5l-80 -137q-89 35 -154 111.5t-65 178.5z" /> -<glyph unicode="X" horiz-adv-x="1572" d="M129 186l154 47q16 -73 66 -99q23 -12 50 -12q33 0 73 17q72 31 149 117l374 424l70 637q-60 -27 -154.5 -59.5t-172 -56.5t-162.5 -59.5t-143 -71.5t-96 -88.5t-38 -113.5q0 -57 26 -98t68 -57q36 -14 77 -14q6 1 12 1q48 2 97 31.5t83 79.5l98 -96q-43 -76 -125.5 -120 t-175.5 -44q-144 0 -235 100q-81 88 -81 208v17q6 155 143 275q116 100 306 152q374 103 575 237l121 -139l-49 -414l-16 -67l39 59l307 342q57 64 118.5 106.5t118 59.5t110.5 19h9q49 0 91 -16q45 -17 81 -45t58.5 -67t29.5 -84l-153 -47q-12 55 -44 83t-76 28h-2 q-44 0 -101 -34.5t-115 -98.5l-494 -551l-49 -422q-2 -19 -2 -35q0 -76 53 -77q2 0 5 1q77 5 215 137q74 70 137 152l14 16q22 -9 46 -30.5t34 -42.5q-109 -154 -269 -271q-169 -124 -284 -124q-8 0 -16 1q-136 10 -138 210q0 43 6 94l11 94l10 49l-29 -43l-199 -223 q-78 -89 -165 -136q-87 -48 -161 -50h-13q-66 0 -124 23q-64 25 -104 75.5t-49 113.5z" /> -<glyph unicode="Y" horiz-adv-x="1519" d="M27 872q0 90 37.5 159.5t105 117t151 84t186.5 69t200 63.5t203.5 76.5t185.5 98.5l108 -186l-538 -932q-69 -120 -69 -193q0 -30 11 -52q21 -43 73 -43q17 0 38 5q104 24 213 144q65 71 117 163l2 -2l587 1029h213l-841 -1448q123 53 241 150.5t254 254.5l15 16 q22 -9 45.5 -30.5t33.5 -42.5q-329 -384 -673 -492l-162 -280q-44 -75 -107 -121.5t-125 -55.5q-25 -4 -49 -4q-34 0 -65 8q-54 13 -87.5 55.5t-33.5 102.5q0 225 469 365l72 123q-78 -52 -154 -74q-54 -15 -100 -15q-18 0 -35 3q-60 8 -100 48t-52 104q-4 20 -4 43 q0 51 19 119q27 98 94 214l455 791q-60 -30 -150.5 -61.5t-167 -54t-159 -55.5t-140 -67t-94.5 -85.5t-37 -115.5q0 -29 11.5 -55t28.5 -42.5t33.5 -28.5t27.5 -18l12 -5l-80 -137q-89 35 -154 111.5t-65 178.5zM469 -375q0 -28 19 -41q10 -6 22 -6t26 6q29 13 50 51l98 172 q-215 -82 -215 -182z" /> -<glyph unicode="Z" horiz-adv-x="1269" d="M47 -414q0 225 473 367q10 19 10 37q0 28 -26 48q-35 30 -86 31q-7 0 -15 -1h-6l2 2l-14 127q147 26 297.5 125t264 230.5t185.5 287t72 290.5q0 141 -90 204q-50 34 -112 34q-44 0 -94 -17q-143 -50 -253 -219q-165 -253 -184 -671l-152 -15q-4 61 -4 119q0 359 164 619 q129 205 325 297q121 57 233 57q54 0 106 -13q154 -40 222 -182q44 -92 44 -215q0 -106 -33.5 -222.5t-100.5 -234.5t-159.5 -222.5t-219 -191.5t-269.5 -136l-9 -2q57 -48 66 -121q146 44 279.5 147t291.5 285l15 16q22 -9 46 -30.5t34 -42.5q-336 -388 -678 -494 q-9 -29 -37 -84l-113 -196q-44 -76 -108 -123q-64 -46 -126 -55q-24 -4 -47 -4q-36 0 -70 9q-55 14 -89.5 57t-34.5 103zM219 -375q0 -29 19 -41q10 -6 22 -6t26 6q28 12 50 51l100 172q-217 -82 -217 -182z" /> -<glyph unicode="[" horiz-adv-x="1075" d="M-231 -373l1282 2220h462l-96 -168h-250l-1087 -1884h248l-97 -168h-462z" /> -<glyph unicode="\" horiz-adv-x="745" d="M90 1432h154l391 -1432h-152z" /> -<glyph unicode="]" horiz-adv-x="1075" d="M-231 -373l96 168h250l1087 1884h-248l97 168h462l-1282 -2220h-462z" /> -<glyph unicode="_" horiz-adv-x="815" d="M-82 -256l82 143h815l-82 -143h-815z" /> -<glyph unicode="a" d="M-135 139q0 66 41 144l299 516q65 112 169 178.5t195 66.5q99 0 165 -71q60 -64 60 -130q0 -7 -1 -14h120l-344 -602q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-80 0 -128 38t-56 101 q-169 -139 -295 -139q-84 0 -134 44q-52 44 -52 115zM66 138q10 -26 49 -27q69 0 160 76t184 223l166 290q27 51 27 89q0 31 -18 54q-24 29 -66 29q-16 0 -35 -4q-82 -21 -140 -113l-6 -10l-297 -518q-26 -49 -26 -76q0 -7 2 -13z" /> -<glyph unicode="b" horiz-adv-x="927" d="M-84 197q0 108 76 237l602 1041h217l-270 -469q70 47 139 47q88 0 140 -54t52 -137q0 -104 -79 -244l-201 -346q82 2 167 42t154 116l15 16q22 -9 46 -30.5t34 -42.5q-78 -92 -206.5 -149.5t-230.5 -57.5q-31 0 -47 2q-76 -99 -172 -149t-190 -50q-106 0 -176 61t-70 167 zM102 201q0 -38 24.5 -60t61.5 -22q43 0 87 26t75 76q-108 68 -135 221l-76 -131q-37 -67 -37 -110zM322 518q0 -125 90 -192l217 372q41 69 41 127q0 42 -22 67.5t-58 25.5q-58 0 -122 -68t-105 -162.5t-41 -169.5z" /> -<glyph unicode="c" horiz-adv-x="792" d="M-72 252q6 80 54 164l223 383q68 118 169.5 181.5t229.5 63.5q88 0 147 -46t69 -122q1 -11 1 -23q0 -68 -47 -153l-31 -53h-174l31 53q39 69 39 115q0 27 -13 45q-18 27 -52 27q-17 0 -38 -7q-79 -25 -141 -122q-4 -6 -8 -13l-219 -380q-44 -78 -44 -132v-11 q5 -56 46 -83.5t109 -27.5q108 0 243 89.5t256 229.5l15 16q22 -9 45.5 -30.5t33.5 -42.5q-148 -172 -318 -282.5t-339 -110.5q-93 0 -161 36t-100 96q-27 51 -27 117q0 11 1 23z" /> -<glyph unicode="d" d="M-135 139q0 66 41 144l299 516q65 112 169 178.5t195 66.5q63 0 114 -31t81 -79l313 541h213l-721 -1248q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-80 0 -128 38t-56 101q-169 -139 -295 -139 q-84 0 -134 44q-52 44 -52 115zM66 138q10 -26 49 -27q71 0 164 79.5t186 231.5l162 278h-2q27 51 27 89q0 31 -18 54q-24 29 -66 29q-16 0 -35 -4q-82 -21 -140 -113l-6 -10l-297 -518q-26 -49 -26 -76q0 -7 2 -13z" /> -<glyph unicode="e" horiz-adv-x="792" d="M-72 252q6 80 54 164l223 383q68 118 169.5 181.5t229.5 63.5q88 0 147 -46t69 -122q1 -11 1 -23q0 -68 -47 -153l-31 -53q-57 -98 -134 -162q-77 -65 -153 -87q-73 -22 -139 -21h-5q-68 1 -124 24l-20 -36q-44 -78 -44 -132v-11q5 -56 46 -83.5t109 -27.5 q108 0 243 89.5t256 229.5l15 16q22 -9 45.5 -30.5t33.5 -42.5q-148 -172 -318 -282.5t-339 -110.5q-93 0 -161 36t-100 96q-27 51 -27 117q0 11 1 23zM250 506q34 -12 70 -14h13q31 0 67 8q44 10 88.5 47.5t80.5 99.5l31 53q39 69 39 115q0 27 -13 45q-18 27 -52 27 q-17 0 -38 -7q-79 -25 -141 -122q-4 -6 -8 -13z" /> -<glyph unicode="f" horiz-adv-x="761" d="M-510 -495q5 64 43 130l881 1530q113 196 265 271q72 36 132 36q41 0 76 -16q81 -35 89 -134q1 -11 1 -22q0 -95 -70 -215l-342 -591q-133 -227 -430 -383q359 25 613 319l14 16q22 -9 46 -30.5t34 -42.5q-284 -329 -733 -355q13 -40 13 -80q0 -67 -38 -135l-160 -280 q-98 -172 -222 -208q-28 -8 -54 -8q-58 0 -102 40q-57 51 -57 134q0 12 1 24zM-327 -524q7 -13 20 -13q12 0 30 12q29 20 56 66l178 314q35 64 35 105q0 36 -27 54h-18l-242 -413q-38 -64 -38 -101q0 -14 6 -24zM33 164q80 35 158.5 105t136 145.5t108.5 163.5l332 575 q36 67 36 105q0 20 -9 32q-10 12 -26 12q-19 0 -49 -19q-58 -38 -110 -128z" /> -<glyph unicode="g" horiz-adv-x="950" d="M-272 -414q0 222 467 365l59 100q-114 -71 -203 -71q-84 0 -134 44q-52 44 -52 115q0 66 41 144l299 516q65 112 169 178.5t195 66.5q94 0 159 -66t65 -138h125l-478 -815q123 53 242 151t254 254l14 16q22 -9 46 -30.5t34 -42.5q-329 -384 -674 -492l-161 -280 q-44 -75 -107 -121.5t-124 -55.5q-26 -4 -50 -4q-34 0 -66 8q-53 13 -86.5 55.5t-33.5 102.5zM-100 -375q0 -28 20 -41q9 -6 21 -6t26 6q28 13 49 51l97 172q-213 -83 -213 -182zM66 138q10 -27 49 -27q70 0 162.5 78.5t185.5 228.5l162 282q27 51 27 89q0 31 -18 54 q-24 29 -66 29q-16 0 -35 -4q-82 -21 -140 -113l-6 -10l-297 -518q-26 -49 -26 -76q0 -8 2 -13z" /> -<glyph unicode="h" d="M-258 0l850 1475h213l-340 -592q154 161 297 161q61 0 103.5 -36t48.5 -98q1 -8 1 -16q0 -56 -38 -128l-308 -539q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 45 -52 115 q0 66 41 144l277 481q28 48 28 78q0 17 -9 28q-10 12 -29 12q-32 0 -87 -36q-120 -77 -284 -283l-324 -563h-215z" /> -<glyph unicode="i" horiz-adv-x="526" d="M-135 139q0 66 41 144l428 741h213l-457 -797q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 44 -52 115zM451 1255q0 53 35 89t87 36q53 0 89 -36t36 -89q0 -52 -36 -87t-89 -35 t-87.5 34.5t-34.5 87.5z" /> -<glyph unicode="j" horiz-adv-x="575" d="M-647 -414q0 226 471 365l244 428q-48 35 -68 67q67 78 139.5 171.5t116.5 153t106 147t76 106.5h213l-583 -999q122 52 239 149.5t254 255.5l14 16q22 -9 46 -30.5t34 -42.5q-332 -385 -671 -492l-164 -280q-44 -75 -107 -121.5t-125 -55.5q-25 -4 -49 -4q-34 0 -65 8 q-54 13 -87.5 55.5t-33.5 102.5zM-475 -375q0 -28 19 -41q10 -6 22 -6t26 6q29 13 50 51l98 172q-215 -83 -215 -182zM504 1255q0 53 35.5 89t87.5 36q53 0 89 -36t36 -89q0 -52 -36 -87t-89 -35t-88 35t-35 87z" /> -<glyph unicode="k" horiz-adv-x="882" d="M-258 0l850 1475h213l-303 -527q45 41 97.5 66.5t100.5 29.5q14 1 27 1q33 -1 63 -7q44 -10 71.5 -39.5t39.5 -70.5q6 -19 5 -42q0 -26 -7 -60q-14 -62 -55 -132l-58 -98q-75 -131 -185 -199q-92 -57 -186 -57q-18 0 -36 2v-88q0 -68 27 -105.5t65 -37.5q121 0 397 319 l15 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-123 0 -165 64t-42 210v170l-244 -424h-215zM268 541q22 -65 82 -73q11 -1 22 -1q50 0 100 30q61 37 93 93l103 176q19 33 19 59q0 20 -11 36q-17 23 -50 23q-21 0 -49 -10q-114 -42 -247 -227z" /> -<glyph unicode="l" horiz-adv-x="526" d="M-135 139q0 66 41 144l688 1192h213l-717 -1248q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 44 -52 115z" /> -<glyph unicode="m" horiz-adv-x="1536" d="M-258 0l592 1024h213l-127 -221q191 241 366 241q57 0 99 -34q41 -32 51 -90q2 -12 3 -26q0 -48 -28 -108q202 258 381 258q61 0 103.5 -36t48.5 -98q1 -8 1 -16q0 -56 -38 -128l-307 -539q-26 -50 -26 -76q0 -7 2 -13q9 -26 48 -27q122 0 398 319l14 16q22 -9 46 -30.5 t34 -42.5q-337 -393 -555 -393q-128 0 -171 92q-17 36 -17 75q0 63 42 136l277 481q28 48 28 78q0 17 -9 28q-10 12 -29 12q-32 0 -87 -35q-160 -102 -387 -421l-6 -8l-239 -418h-217l440 764q28 48 28 77q0 17 -10 29t-29 12q-32 0 -88 -36q-158 -103 -382 -416l-248 -430 h-215z" /> -<glyph unicode="n" d="M-258 0l592 1024h213l-80 -139q152 159 295 159q61 0 103.5 -36t48.5 -98q1 -8 1 -16q0 -56 -38 -128l-308 -539q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 45 -52 115 q0 66 41 144l277 481q28 48 28 78q0 17 -9 28q-10 12 -29 12q-31 0 -85 -34q-120 -75 -284 -281l-326 -567h-215z" /> -<glyph unicode="o" horiz-adv-x="927" d="M-83 197q-1 107 75 237q86 146 196 340q89 154 187 216.5t227 62.5q74 0 132 -37q58 -36 88 -96q25 -50 25 -116q1 -12 -1 -24q-6 -80 -53 -162l-201 -346q82 2 166.5 42t154.5 116l15 16q22 -9 46 -30.5t34 -42.5q-78 -92 -206.5 -149.5t-230.5 -57.5h-47 q-117 -147 -276 -185q-47 -12 -90 -12q-79 0 -142 40q-99 61 -99 188zM121 148q24 -29 67 -30q16 0 34 5q79 19 128 97q3 4 6 9l2 4q-20 33 -20 72q0 53 36.5 90t88.5 37h10l156 266q42 71 42 125q0 26 -10 48q-21 45 -69 45q-6 0 -12 -1q-77 -8 -150 -108q-14 -19 -27 -41 q-74 -126 -264 -455q-37 -64 -37 -109q0 -32 19 -54z" /> -<glyph unicode="p" horiz-adv-x="923" d="M-516 -451l850 1475h213l-43 -74q53 47 114 71.5t115 24.5t96.5 -24.5t63.5 -67.5q14 -27 14 -66q0 -21 -4 -44q-11 -69 -59 -150l-236 -403q-11 -18 -40 -74t-48 -86q94 33 195.5 112t193.5 187l15 16q24 -6 47.5 -27.5t32.5 -45.5q-58 -67 -109 -119t-118.5 -105 t-134.5 -87.5t-151 -57t-174 -24.5h-12q-55 0 -99 17.5t-68 43t-40 51t-21 42.5l-5 18l121 57q29 -53 72 -53h6q47 4 75 53l322 557q12 22 12 41q0 20 -13 37q-19 26 -55 26q-19 0 -43 -8q-107 -33 -233 -205l-637 -1108h-215z" /> -<glyph unicode="q" horiz-adv-x="882" d="M-142 136q5 74 58 165l289 498q65 112 169 178.5t195 66.5q94 0 159 -66t65 -138h118l-413 -709q212 117 370 299l15 16q22 -9 46 -30.5t34 -42.5q-229 -264 -557 -398l-3 -4q11 0 15 -2q61 -26 82 -117q7 -27 7 -54q0 -68 -38 -142l-76 -133q-98 -171 -219 -207 q-29 -9 -56 -9q-55 0 -98 39q-55 50 -55 132q0 13 1 27q6 64 44 130l287 502q-176 -157 -299 -157q-70 0 -108 40q-33 36 -33 97q0 9 1 19zM83 200q-1 -7 -1 -12q0 -26 22 -36q5 -2 13 -2q33 0 103 44q85 54 200 160l223 389q8 26 8 48q0 42 -33 65q-23 16 -52 16t-62 -15 q-70 -31 -117 -112l-256 -446q-43 -72 -48 -99zM151 -524q5 -13 16 -13t27 12q27 21 54 66l94 166q35 64 35 108q0 42 -31 58l-158 -272q-40 -69 -40 -106q0 -11 3 -19z" /> -<glyph unicode="r" horiz-adv-x="868" d="M0 446q133 157 360 478l-18 24q-49 59 -49 130q1 15 3 30q12 88 101 168l111 -121q-34 -33 -35 -67q0 -28 23 -56l118 -143q29 -35 45 -63.5t24 -63.5q4 -16 4 -33q1 -20 -5 -42q-10 -40 -37 -87l-213 -373q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319 l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 45 -52 115q0 66 41 144l225 391q15 26 15 51q0 35 -27 70l-29 34q-236 -321 -352 -456q-55 35 -80 73z" /> -<glyph unicode="s" horiz-adv-x="718" d="M-92 152l133 69q1 -3 3.5 -8.5t11 -19t19 -23.5t28.5 -18.5t38 -8.5q57 0 94 41.5t55 114t29 148.5t26.5 167t37.5 148q-9 -11 -76.5 -102.5t-120 -157.5t-106.5 -129q-55 35 -80 73q67 78 146 179.5t127 167.5t119 165t81 113l160 -86q-57 -118 -87.5 -268t-50.5 -295.5 t-46 -222.5q142 96 256 231l14 16q24 -6 47.5 -27.5t32.5 -45.5q-132 -154 -286 -260.5t-306 -126.5q-1 0 -3 -1t-3 -1q-40 -4 -60 -4q-55 0 -99 17.5t-68 43t-40 51t-21 42.5z" /> -<glyph unicode="t" horiz-adv-x="526" d="M-135 139q0 66 41 144l428 741h-195l62 102h192l201 349h213l-201 -349h176l-61 -102h-174l-457 -797q-26 -49 -26 -76q0 -7 2 -13q10 -26 49 -27q121 0 397 319l14 16q22 -9 46 -30.5t34 -42.5q-337 -393 -555 -393q-84 0 -134 44q-52 44 -52 115z" /> -<glyph unicode="u" d="M-142 136q6 74 58 165l418 723h213l-416 -725q-43 -72 -48 -99q-6 -36 21 -48q6 -2 14 -2q34 0 104 45q88 56 210 167l379 662h213l-455 -797q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q121 0 397 319l15 16q22 -9 45.5 -30.5t33.5 -42.5q-337 -393 -555 -393 q-99 0 -148 58q-38 44 -38 106q0 19 4 40q-212 -204 -350 -204q-70 0 -108 40q-33 35 -33 97q0 10 1 19z" /> -<glyph unicode="v" horiz-adv-x="763" d="M-98 110q-1 9 -1 19q0 66 33 156l297 739h215l-284 -711q-51 -127 -51 -149q0 -4 2 -4h1q8 0 42 48q24 33 67 99l477 717h193l-346 -516q-34 -70 -34 -112q0 -35 24 -51q16 -10 38 -11q34 0 82 25q52 26 93 71l14 16q22 -9 46 -30.5t34 -42.5q-63 -74 -133 -113 q-69 -38 -127 -40q-3 0 -7 -1q-53 1 -96 23q-45 24 -67 67l-111 -166q-48 -72 -116 -115t-127 -45h-8q-54 0 -98 27q-46 28 -52 100z" /> -<glyph unicode="w" horiz-adv-x="1355" d="M-120 72q-17 35 -17 74q0 63 43 137l430 741h211l-457 -797q-26 -49 -25 -76q-1 -7 1 -13q10 -26 49 -27q70 0 162.5 79t187.5 230l350 604h211l-457 -797q-26 -49 -26 -76q1 -7 3 -13q10 -26 48 -27q79 0 194 118q-22 31 -22 76q0 53 36.5 90t88.5 37q27 0 51 -12 q171 255 295 604h137q-165 -490 -360 -752q84 0 169.5 40t157.5 118l15 16q22 -9 46 -30.5t34 -42.5q-78 -92 -206.5 -149.5t-230.5 -57.5q-50 0 -75 4q-184 -190 -394 -190q-80 0 -128.5 37.5t-57.5 99.5q-167 -137 -293 -137q-127 0 -171 92z" /> -<glyph unicode="x" horiz-adv-x="983" d="M-49 2l440 487l47 338q-4 -6 -68.5 -90.5t-99 -129t-92 -116t-98.5 -118.5q-55 35 -80 73q147 174 346 439q102 159 197 159q70 0 91 -57q11 -29 11 -77q0 -45 -10 -107l-21 -129l306 350h157l-495 -567l-35 -230q-3 -21 -4 -38q0 -69 53 -69q80 0 236 156q66 66 137 154 l14 16q22 -9 46 -30.5t34 -42.5q-78 -91 -134.5 -150.5t-126 -120.5t-133.5 -91.5t-124 -30.5q-123 0 -163 79q-27 53 -27 135q0 41 7 89v8l-268 -289h-143z" /> -<glyph unicode="y" horiz-adv-x="950" d="M-272 -414q0 225 469 365l116 201q-192 -172 -315 -172q-70 0 -108 40q-33 36 -33 97q0 9 1 19q5 74 58 165l418 723h213l-416 -725q-43 -72 -48 -99q-6 -36 21 -48q6 -3 14 -3q34 0 106 47q89 59 212 173l377 655h213l-584 -999q123 53 240.5 150.5t253.5 254.5l14 16 q22 -9 46 -30.5t34 -42.5q-332 -384 -672 -492l-163 -280q-44 -75 -107 -121.5t-124 -55.5q-26 -4 -50 -4q-34 0 -66 8q-53 13 -86.5 55.5t-33.5 102.5zM-100 -375q0 -28 20 -41q9 -6 21 -6t26 6q28 13 49 51l99 172q-215 -83 -215 -182z" /> -<glyph unicode="z" horiz-adv-x="950" d="M-272 -414q0 224 473 367q10 19 10 37q1 28 -25 48q-35 30 -87 31q-7 0 -15 -1h-6l2 2l-14 127q63 21 129.5 56.5t127 78t117 93t102 100.5t79.5 101q33 51 51 95q16 41 17 75q-1 3 -1 6q-2 37 -24 60q-17 17 -42 17q-106 0 -364 -295q-42 -49 -116 -138q-45 -54 -62 -73 q-55 35 -80 73q32 38 84 103t92.5 114.5t94 111t103 106t105 83.5t114 59.5t116.5 20.5q134 0 171 -111q13 -38 13 -83q0 -89 -51 -205q-86 -197 -270 -354q-121 -105 -265 -170l-8 -2q57 -48 66 -121q146 44 279.5 147t291.5 285l14 16q22 -9 46 -30.5t34 -42.5 q-336 -388 -678 -494q-9 -29 -37 -84l-112 -196q-44 -76 -107.5 -122.5t-125.5 -55.5q-24 -4 -48 -4q-36 0 -70 9q-55 14 -89.5 57t-34.5 103zM-100 -375q0 -29 19 -41q10 -6 21.5 -6t25.5 6q28 12 50 51l101 172q-217 -82 -217 -182z" /> -<glyph unicode="{" horiz-adv-x="966" d="M-66 -138q6 58 35 109l375 668q24 41 32 76t4.5 55.5t-13.5 37t-16.5 21.5t-10.5 7q12 3 33 13t59 32t78 62t68 89l340 578q68 118 177 177.5t222 59.5h196l-96 -168h-94q-87 0 -139 -32t-105 -123l-299 -508q-24 -41 -55.5 -74.5t-59 -52.5t-53.5 -31.5t-40.5 -17 t-18.5 -4.5q5 -4 11 -10t14 -24.5t10 -40t-7.5 -57.5t-33.5 -77l-397 -705q-41 -75 -13 -129.5t103 -54.5h59l-96 -168h-29q-54 0 -102 24.5t-79.5 66.5t-48 92.5t-10.5 108.5z" /> -<glyph unicode="|" horiz-adv-x="516" d="M-131 0l827 1434h189l-828 -1434h-188z" /> -<glyph unicode="}" horiz-adv-x="1044" d="M-358 -430l96 168h94q86 0 138.5 32.5t105.5 123.5l321 552q24 41 56 75t59.5 52.5t53.5 31.5t40.5 17.5t18.5 4.5q-5 4 -11 10t-14 24.5t-10 40t7.5 57.5t33.5 77l375 659q41 75 12.5 129.5t-103.5 54.5h-59l96 168h29q54 0 102 -24.5t79.5 -66.5t48 -92.5t10.5 -108.5 t-35 -109l-375 -668q-24 -41 -32 -76t-4.5 -55.5t13.5 -36.5t16.5 -21t10.5 -7q-11 -3 -32.5 -13t-59 -32t-77.5 -62.5t-68 -89.5l-340 -578q-68 -118 -177.5 -177.5t-222.5 -59.5h-196z" /> -<glyph unicode="­" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode=" " horiz-adv-x="923" /> -<glyph unicode=" " horiz-adv-x="1847" /> -<glyph unicode=" " horiz-adv-x="923" /> -<glyph unicode=" " horiz-adv-x="1847" /> -<glyph unicode=" " horiz-adv-x="615" /> -<glyph unicode=" " horiz-adv-x="461" /> -<glyph unicode=" " horiz-adv-x="307" /> -<glyph unicode=" " horiz-adv-x="307" /> -<glyph unicode=" " horiz-adv-x="230" /> -<glyph unicode=" " horiz-adv-x="369" /> -<glyph unicode=" " horiz-adv-x="102" /> -<glyph unicode="‐" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="‑" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="‒" horiz-adv-x="1062" d="M133 467l82 143h733l-82 -143h-733z" /> -<glyph unicode="–" horiz-adv-x="1259" d="M133 467l82 143h938l-82 -143h-938z" /> -<glyph unicode="—" horiz-adv-x="1679" d="M133 467l82 143h1348l-82 -143h-1348z" /> -<glyph unicode="‘" horiz-adv-x="393" d="M33 1223q0 105 84.5 178.5t179.5 73.5h14l-4 -82h-12q-37 0 -76.5 -20.5t-58.5 -49.5q46 -8 74 -35.5t28 -66.5q0 -54 -32.5 -83.5t-75.5 -29.5q-48 0 -84.5 31t-36.5 84z" /> -<glyph unicode="’" horiz-adv-x="417" d="M205 1096l4 82h12q37 0 76.5 20t58.5 49q-46 8 -74 35.5t-28 67.5q0 54 32.5 83t75.5 29q48 0 84.5 -31t36.5 -83q0 -105 -84.5 -178.5t-179.5 -73.5h-14z" /> -<glyph unicode="“" horiz-adv-x="464" d="M43 1223q0 105 84.5 178.5t179.5 73.5h15l-5 -82h-12q-37 0 -76.5 -20.5t-58.5 -49.5q46 -8 74 -35.5t28 -66.5q0 -54 -32.5 -83.5t-75.5 -29.5q-48 0 -84.5 31t-36.5 84zM350 1223q0 105 84.5 178.5t179.5 73.5h15l-4 -82h-13q-37 0 -76.5 -20.5t-58.5 -49.5 q46 -8 74.5 -35.5t28.5 -66.5q0 -54 -33 -83.5t-76 -29.5q-48 0 -84.5 31t-36.5 84z" /> -<glyph unicode="”" horiz-adv-x="724" d="M205 1108l4 82h12q37 0 76.5 20.5t58.5 49.5q-46 8 -74 35.5t-28 66.5q0 54 32.5 83.5t75.5 29.5q48 0 84.5 -31t36.5 -84q0 -105 -84.5 -178.5t-179.5 -73.5h-14zM512 1108l4 82h12q37 0 77 20.5t59 49.5q-46 8 -74.5 35.5t-28.5 66.5q0 54 33 83.5t76 29.5 q48 0 84.5 -31t36.5 -84q0 -70 -41.5 -129.5t-102 -91t-121.5 -31.5h-14z" /> -<glyph unicode="•" horiz-adv-x="649" d="M137 506q0 78 55.5 133t133.5 55t133 -55t55 -133t-55 -133.5t-133 -55.5t-133.5 55.5t-55.5 133.5z" /> -<glyph unicode=" " horiz-adv-x="369" /> -<glyph unicode=" " horiz-adv-x="461" /> -<glyph unicode="" horiz-adv-x="1044" d="M0 0v1044h1044v-1044h-1044z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/app/assets/stylesheets/wisdom_script-webfont.ttf b/app/assets/stylesheets/wisdom_script-webfont.ttf deleted file mode 100755 index f8420701..00000000 Binary files a/app/assets/stylesheets/wisdom_script-webfont.ttf and /dev/null differ diff --git a/app/assets/stylesheets/wisdom_script-webfont.woff b/app/assets/stylesheets/wisdom_script-webfont.woff deleted file mode 100755 index a7f21b3b..00000000 Binary files a/app/assets/stylesheets/wisdom_script-webfont.woff and /dev/null differ diff --git a/app/assets/templates/coderwalls/index.jst.eco b/app/assets/templates/coderwalls/index.jst.eco deleted file mode 100644 index e69de29b..00000000 diff --git a/app/models/badges/altruist.rb b/app/badges/altruist.rb similarity index 100% rename from app/models/badges/altruist.rb rename to app/badges/altruist.rb diff --git a/app/models/badges/ashcat.rb b/app/badges/ashcat.rb similarity index 93% rename from app/models/badges/ashcat.rb rename to app/badges/ashcat.rb index 165599a0..cd979eb9 100644 --- a/app/models/badges/ashcat.rb +++ b/app/badges/ashcat.rb @@ -19,7 +19,7 @@ def award? end def self.perform - Github.new.repo_contributors("rails", "rails").each do |contributor| + GithubOld.new.repo_contributors("rails", "rails").each do |contributor| login = contributor[:login] add_contributor(login, contributor[:contributions]) end diff --git a/app/models/badges/badge_base.rb b/app/badges/badge_base.rb similarity index 100% rename from app/models/badges/badge_base.rb rename to app/badges/badge_base.rb diff --git a/app/models/badges/badges.rb b/app/badges/badges.rb similarity index 100% rename from app/models/badges/badges.rb rename to app/badges/badges.rb diff --git a/app/models/badges/bear.rb b/app/badges/bear.rb similarity index 100% rename from app/models/badges/bear.rb rename to app/badges/bear.rb diff --git a/app/models/badges/bear3.rb b/app/badges/bear3.rb similarity index 100% rename from app/models/badges/bear3.rb rename to app/badges/bear3.rb diff --git a/app/models/badges/beaver.rb b/app/badges/beaver.rb similarity index 100% rename from app/models/badges/beaver.rb rename to app/badges/beaver.rb diff --git a/app/models/badges/beaver3.rb b/app/badges/beaver3.rb similarity index 100% rename from app/models/badges/beaver3.rb rename to app/badges/beaver3.rb diff --git a/app/badges/changelogd.rb b/app/badges/changelogd.rb new file mode 100644 index 00000000..9e0608ea --- /dev/null +++ b/app/badges/changelogd.rb @@ -0,0 +1,14 @@ +class Changelogd < BadgeBase + describe "Changelog'd", + skill: 'Open Source', + description: "Have an original repo featured on the Changelog show", + for: "having an original repo featured on the Changelog show.", + image_name: 'changelogd.png', + weight: 2, + providers: :github + + def award? + false + end + +end diff --git a/app/models/badges/charity.rb b/app/badges/charity.rb similarity index 100% rename from app/models/badges/charity.rb rename to app/badges/charity.rb diff --git a/app/models/badges/coming_soon_bitbucket.rb b/app/badges/coming_soon_bitbucket.rb similarity index 100% rename from app/models/badges/coming_soon_bitbucket.rb rename to app/badges/coming_soon_bitbucket.rb diff --git a/app/models/badges/coming_soon_codeplex.rb b/app/badges/coming_soon_codeplex.rb similarity index 100% rename from app/models/badges/coming_soon_codeplex.rb rename to app/badges/coming_soon_codeplex.rb diff --git a/app/models/badges/cub.rb b/app/badges/cub.rb similarity index 100% rename from app/models/badges/cub.rb rename to app/badges/cub.rb diff --git a/app/badges/early_adopter.rb b/app/badges/early_adopter.rb new file mode 100644 index 00000000..c1ed3ef4 --- /dev/null +++ b/app/badges/early_adopter.rb @@ -0,0 +1,23 @@ +class EarlyAdopter < BadgeBase + describe "Opabinia", + skill: 'Open Source', + description: "Started social coding on GitHub within 6 months of its first signs of life", + for: "starting social coding on GitHub within 6 months of its first signs of life.", + image_name: 'earlyadopter.png', + providers: :github, + weight: 2 + + FOUNDING_DATE = Date.parse('Oct 19, 2007') + + def reasons + if user.github_profile && user.github_profile.github_created_at <= FOUNDING_DATE + 6.months + "Created an account within GitHub's first 6 months on #{user.github_profile.github_created_at.to_date.to_s(:long).to_s.capitalize}." + else + nil + end + end + + def award? + !reasons.blank? + end +end diff --git a/app/models/badges/entrepreneur.rb b/app/badges/entrepreneur.rb similarity index 94% rename from app/models/badges/entrepreneur.rb rename to app/badges/entrepreneur.rb index 39840d41..ccd5ae0a 100644 --- a/app/models/badges/entrepreneur.rb +++ b/app/badges/entrepreneur.rb @@ -23,7 +23,7 @@ def self.perform repos.each do |repo| owner, name = repo.split('/')[-2..-1] - Github.new.repo_contributors(owner, name).each do |contributor| + GithubOld.new.repo_contributors(owner, name).each do |contributor| login = contributor[:login] add_contributor(repo, login, contributor[:contributions]) end diff --git a/app/models/badges/epidexipteryx.rb b/app/badges/epidexipteryx.rb similarity index 100% rename from app/models/badges/epidexipteryx.rb rename to app/badges/epidexipteryx.rb diff --git a/app/models/badges/epidexipteryx3.rb b/app/badges/epidexipteryx3.rb similarity index 100% rename from app/models/badges/epidexipteryx3.rb rename to app/badges/epidexipteryx3.rb diff --git a/app/models/badges/event_badge.rb b/app/badges/event_badge.rb similarity index 100% rename from app/models/badges/event_badge.rb rename to app/badges/event_badge.rb diff --git a/app/models/badges/forked.rb b/app/badges/forked.rb similarity index 100% rename from app/models/badges/forked.rb rename to app/badges/forked.rb diff --git a/app/models/badges/forked100.rb b/app/badges/forked100.rb similarity index 100% rename from app/models/badges/forked100.rb rename to app/badges/forked100.rb diff --git a/app/models/badges/forked20.rb b/app/badges/forked20.rb similarity index 79% rename from app/models/badges/forked20.rb rename to app/badges/forked20.rb index b195c9c1..8dfb399f 100644 --- a/app/models/badges/forked20.rb +++ b/app/badges/forked20.rb @@ -2,7 +2,6 @@ class Forked20 < Forked describe 'Forked 20', skill: 'API Design', description: "Have an established project that's been forked at least 20 times", - description: "having an established project that's been forked at least 20 times.", for: 'having a project valued enough to be forked by at least 20 developers.', skip_forks: true, times_forked: 20, diff --git a/app/models/badges/forked50.rb b/app/badges/forked50.rb similarity index 76% rename from app/models/badges/forked50.rb rename to app/badges/forked50.rb index 45a8df50..4bccce08 100644 --- a/app/models/badges/forked50.rb +++ b/app/badges/forked50.rb @@ -2,7 +2,6 @@ class Forked50 < Forked describe 'Forked 50', skill: 'API Design', description: "Have a project with a thriving community of users that's been forked at least 50 times", - description: "having a project with a thriving community of users that's been forked at least 50 times.", for: 'having a project valued enough to be forked by at least 50 developers.', skip_forks: true, times_forked: 50, diff --git a/app/models/badges/github_gameoff.rb b/app/badges/github_gameoff.rb similarity index 100% rename from app/models/badges/github_gameoff.rb rename to app/badges/github_gameoff.rb diff --git a/app/models/badges/goruco.rb b/app/badges/goruco.rb similarity index 100% rename from app/models/badges/goruco.rb rename to app/badges/goruco.rb diff --git a/app/models/badges/hackathon.rb b/app/badges/hackathon.rb similarity index 100% rename from app/models/badges/hackathon.rb rename to app/badges/hackathon.rb diff --git a/app/models/badges/hackathon_cmu.rb b/app/badges/hackathon_cmu.rb similarity index 100% rename from app/models/badges/hackathon_cmu.rb rename to app/badges/hackathon_cmu.rb diff --git a/app/models/badges/hackathon_stanford.rb b/app/badges/hackathon_stanford.rb similarity index 100% rename from app/models/badges/hackathon_stanford.rb rename to app/badges/hackathon_stanford.rb diff --git a/app/models/badges/honeybadger1.rb b/app/badges/honeybadger1.rb similarity index 100% rename from app/models/badges/honeybadger1.rb rename to app/badges/honeybadger1.rb diff --git a/app/models/badges/honeybadger3.rb b/app/badges/honeybadger3.rb similarity index 100% rename from app/models/badges/honeybadger3.rb rename to app/badges/honeybadger3.rb diff --git a/app/models/badges/honeybadger_brood.rb b/app/badges/honeybadger_brood.rb similarity index 100% rename from app/models/badges/honeybadger_brood.rb rename to app/badges/honeybadger_brood.rb diff --git a/app/models/badges/komododragon.rb b/app/badges/komododragon.rb similarity index 100% rename from app/models/badges/komododragon.rb rename to app/badges/komododragon.rb diff --git a/app/models/badges/komododragon3.rb b/app/badges/komododragon3.rb similarity index 100% rename from app/models/badges/komododragon3.rb rename to app/badges/komododragon3.rb diff --git a/app/models/badges/kona.rb b/app/badges/kona.rb similarity index 100% rename from app/models/badges/kona.rb rename to app/badges/kona.rb diff --git a/app/models/badges/labrador.rb b/app/badges/labrador.rb similarity index 100% rename from app/models/badges/labrador.rb rename to app/badges/labrador.rb diff --git a/app/models/badges/labrador3.rb b/app/badges/labrador3.rb similarity index 100% rename from app/models/badges/labrador3.rb rename to app/badges/labrador3.rb diff --git a/app/models/badges/language_badge.rb b/app/badges/language_badge.rb similarity index 100% rename from app/models/badges/language_badge.rb rename to app/badges/language_badge.rb diff --git a/app/models/badges/lemmings100.rb b/app/badges/lemmings100.rb similarity index 100% rename from app/models/badges/lemmings100.rb rename to app/badges/lemmings100.rb diff --git a/app/models/badges/lemmings1000.rb b/app/badges/lemmings1000.rb similarity index 100% rename from app/models/badges/lemmings1000.rb rename to app/badges/lemmings1000.rb diff --git a/app/models/badges/locust.rb b/app/badges/locust.rb similarity index 100% rename from app/models/badges/locust.rb rename to app/badges/locust.rb diff --git a/app/models/badges/locust3.rb b/app/badges/locust3.rb similarity index 100% rename from app/models/badges/locust3.rb rename to app/badges/locust3.rb diff --git a/app/models/badges/mongoose.rb b/app/badges/mongoose.rb similarity index 100% rename from app/models/badges/mongoose.rb rename to app/badges/mongoose.rb diff --git a/app/models/badges/mongoose3.rb b/app/badges/mongoose3.rb similarity index 100% rename from app/models/badges/mongoose3.rb rename to app/badges/mongoose3.rb diff --git a/app/models/badges/narwhal.rb b/app/badges/narwhal.rb similarity index 100% rename from app/models/badges/narwhal.rb rename to app/badges/narwhal.rb diff --git a/app/models/badges/narwhal3.rb b/app/badges/narwhal3.rb similarity index 100% rename from app/models/badges/narwhal3.rb rename to app/badges/narwhal3.rb diff --git a/app/models/badges/neo4j_contest.rb b/app/badges/neo4j_contest.rb similarity index 100% rename from app/models/badges/neo4j_contest.rb rename to app/badges/neo4j_contest.rb diff --git a/app/models/badges/nephila_komaci.rb b/app/badges/nephila_komaci.rb similarity index 100% rename from app/models/badges/nephila_komaci.rb rename to app/badges/nephila_komaci.rb diff --git a/app/models/badges/nephila_komaci3.rb b/app/badges/nephila_komaci3.rb similarity index 100% rename from app/models/badges/nephila_komaci3.rb rename to app/badges/nephila_komaci3.rb diff --git a/app/models/badges/node_knockout.rb b/app/badges/node_knockout.rb similarity index 92% rename from app/models/badges/node_knockout.rb rename to app/badges/node_knockout.rb index b4a71b83..e1eced0a 100644 --- a/app/models/badges/node_knockout.rb +++ b/app/badges/node_knockout.rb @@ -18,16 +18,6 @@ def user_with_github(github_username) where(["UPPER(github) = ?", github_username.upcase]).first end - def scrap - res = Servant.get("http://nodeknockout.com/people") - doc = Nokogiri::HTML(res.to_s) - doc.css('#inner ul li a').each do |element| - if element[:href] =~ /people\//i - award_user(*github_for(element[:href])) - end - end - end - def load_from_file text = File.read(Rails.root.join('db', 'seeds', "nodeknockout-#{@year}.csv")) unless text.nil? @@ -58,7 +48,6 @@ def reset! replace_assignments_and_awards(self.innovation, self.MostInnovativeBadge) replace_assignments_and_awards(self.completeness, self.MostCompleteBadge) replace_assignments_and_awards_for_twitter(self.judges, self.JudgeBadge) - puts "DONE" end def replace_assignments_and_awards(github_usernames, badge_class) @@ -126,13 +115,11 @@ def github_for(path) begin res = Servant.get("http://nodeknockout.com#{path}") doc = Nokogiri::HTML(res.to_s) - username = doc.css("a.github").first[:href].gsub(/https?:\/\/github.com\//, '') + username = doc.css("a.github").first[:href].sub(/https?:\/\/github.com\//, '') role = doc.css(".role").first.text - Rails.logger.info "Found node knockout #{role}: #{username}" - return [role, username] + [role, username] rescue Exception => ex - Rails.logger.warn("Was unable to determine github for #{path}") - return nil + nil end end @@ -140,7 +127,7 @@ def twitter_for(path) begin res = Servant.get("http://nodeknockout.com#{path}") doc = Nokogiri::HTML(res.to_s) - username = doc.css("a.twitter").first[:href].gsub("http://twitter.com/", '').strip + username = doc.css("a.twitter").first[:href].sub("http://twitter.com/", '').strip role = doc.css(".role").first.text Rails.logger.info "Found node knockout #{role}: #{username}" return [role, username] diff --git a/app/models/badges/notes.txt b/app/badges/notes.txt similarity index 100% rename from app/models/badges/notes.txt rename to app/badges/notes.txt diff --git a/app/models/badges/octopussy.rb b/app/badges/octopussy.rb similarity index 88% rename from app/models/badges/octopussy.rb rename to app/badges/octopussy.rb index f3838c5e..c6e6ee10 100644 --- a/app/models/badges/octopussy.rb +++ b/app/badges/octopussy.rb @@ -1,5 +1,6 @@ class Octopussy < BadgeBase - GITHUB_TEAM_ID_IN_PRODUCTION = '4f27193d973bf0000400029d' + # + # GITHUB_TEAM_ID_IN_PRODUCTION = '4f27193d973bf0000400029d' describe "Octopussy", skill: 'Open Source', @@ -11,7 +12,7 @@ class Octopussy < BadgeBase def self.github_team Rails.cache.fetch("octopussy_github_team_members", expires_in: 1.day) do - Team.find(GITHUB_TEAM_ID_IN_PRODUCTION).team_members.collect { |user| user.github }.compact + Team.find_by_name('Github').members.collect { |member| member.user.github }.compact end end diff --git a/app/models/badges/parrot.rb b/app/badges/parrot.rb similarity index 100% rename from app/models/badges/parrot.rb rename to app/badges/parrot.rb diff --git a/app/models/badges/parrot3.rb b/app/badges/parrot3.rb similarity index 100% rename from app/models/badges/parrot3.rb rename to app/badges/parrot3.rb diff --git a/app/models/badges/philanthropist.rb b/app/badges/philanthropist.rb similarity index 100% rename from app/models/badges/philanthropist.rb rename to app/badges/philanthropist.rb diff --git a/app/models/badges/platypus.rb b/app/badges/platypus.rb similarity index 100% rename from app/models/badges/platypus.rb rename to app/badges/platypus.rb diff --git a/app/models/badges/platypus3.rb b/app/badges/platypus3.rb similarity index 100% rename from app/models/badges/platypus3.rb rename to app/badges/platypus3.rb diff --git a/app/models/badges/polygamous.rb b/app/badges/polygamous.rb similarity index 91% rename from app/models/badges/polygamous.rb rename to app/badges/polygamous.rb index f8b0e2a7..170f4c83 100644 --- a/app/models/badges/polygamous.rb +++ b/app/badges/polygamous.rb @@ -9,9 +9,9 @@ class Polygamous < BadgeBase def reasons @reasons ||= begin facts = user.facts.select { |fact| fact.tagged?('personal', 'repo', 'original') } - facts.collect do |fact| + facts.flat_map do |fact| fact.metadata[:languages] - end.flatten.uniq + end.uniq end end @@ -19,4 +19,4 @@ def award? reasons.size >= 4 end -end \ No newline at end of file +end diff --git a/app/models/badges/python.rb b/app/badges/python.rb similarity index 100% rename from app/models/badges/python.rb rename to app/badges/python.rb diff --git a/app/models/badges/python3.rb b/app/badges/python3.rb similarity index 100% rename from app/models/badges/python3.rb rename to app/badges/python3.rb diff --git a/app/models/badges/railsberry.rb b/app/badges/railsberry.rb similarity index 100% rename from app/models/badges/railsberry.rb rename to app/badges/railsberry.rb diff --git a/app/models/badges/railscamp.rb b/app/badges/railscamp.rb similarity index 100% rename from app/models/badges/railscamp.rb rename to app/badges/railscamp.rb diff --git a/app/models/badges/raven.rb b/app/badges/raven.rb similarity index 100% rename from app/models/badges/raven.rb rename to app/badges/raven.rb diff --git a/app/models/badges/tag_badge.rb b/app/badges/tag_badge.rb similarity index 100% rename from app/models/badges/tag_badge.rb rename to app/badges/tag_badge.rb diff --git a/app/models/badges/trex.rb b/app/badges/trex.rb similarity index 100% rename from app/models/badges/trex.rb rename to app/badges/trex.rb diff --git a/app/models/badges/trex3.rb b/app/badges/trex3.rb similarity index 100% rename from app/models/badges/trex3.rb rename to app/badges/trex3.rb diff --git a/app/models/badges/twenty_four_pull_requests.rb b/app/badges/twenty_four_pull_requests.rb similarity index 95% rename from app/models/badges/twenty_four_pull_requests.rb rename to app/badges/twenty_four_pull_requests.rb index fac8e010..00961b01 100644 --- a/app/models/badges/twenty_four_pull_requests.rb +++ b/app/badges/twenty_four_pull_requests.rb @@ -14,7 +14,7 @@ def load_badges Object.const_set "TwentyFourPullRequestsParticipant#{year}", Class.new(BadgeBase) { describe "24PullRequests Participant", skill: 'Open Source', - description: "Sent at least one pull request during during the first 24 days of December #{year}", + description: "Sent at least one pull request during the first 24 days of December #{year}", for: "participating in the 24pullrequest initiative during #{year}", image_name: "24-participant.png", url: "http://24pullrequests.com/" @@ -22,4 +22,4 @@ def load_badges end end end -end \ No newline at end of file +end diff --git a/app/models/badges/velociraptor.rb b/app/badges/velociraptor.rb similarity index 100% rename from app/models/badges/velociraptor.rb rename to app/badges/velociraptor.rb diff --git a/app/models/badges/velociraptor3.rb b/app/badges/velociraptor3.rb similarity index 100% rename from app/models/badges/velociraptor3.rb rename to app/badges/velociraptor3.rb diff --git a/app/models/badges/wroc_lover.rb b/app/badges/wroc_lover.rb similarity index 100% rename from app/models/badges/wroc_lover.rb rename to app/badges/wroc_lover.rb diff --git a/app/blog/2011-07-22-gaming-the-game.markdown b/app/blog/2011-07-22-gaming-the-game.markdown deleted file mode 100644 index ef30bee0..00000000 --- a/app/blog/2011-07-22-gaming-the-game.markdown +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Gaming the Game -posted: Fri, 22 Jul 2011 00:09:00 -0800 -author: mdeiters ---- -We are putting together a page listing all the hacks & utilities that others have created for Coderwall or with the Coderwall API. Much to our surprise, a quick search on github for 'coderwall' came across this: - - - -We had a good laugh at the description but seriously no gaming the system. In reality, this cheat would never work because we do some basic analysis on repos to see if they are "worthy" and this one is clearly not. It is a rather simplistic check today but we are constantly making the system more sophisticated for future achievements. -More importantly we will be rolling out a new feature soon where you'll be able to explore which repos earned someone a specific achievement. We think this is a great way to showcase interesting open source projects and provide more context to your profile. - -Be forewarned then that if you decide to create some cheat repos, they will be prominently showcased on your profile along with a way for users to flag them. :) - -happy coding! \ No newline at end of file diff --git a/app/blog/2012-01-09-starting-off-the-new-year-with-a-bang.markdown b/app/blog/2012-01-09-starting-off-the-new-year-with-a-bang.markdown deleted file mode 100644 index 3f325be0..00000000 --- a/app/blog/2012-01-09-starting-off-the-new-year-with-a-bang.markdown +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: Starting off the new year with a bang -posted: Fri, 09 Jan 2012 14:25:31 -0800 -author: mdeiters ---- -We're starting off the new year at Coderwall with some big news. Let's get right to it. - -### Coderwall is Growing - -First off, I'd like to welcome [Brian Guthrie](http://coderwall.com/bguthrie) to the team. Brian will be joining us to help build out the site and take responsibility for some of the technical direction. He'll also be cracking some bad jokes and generally lowering the tone around here. We're looking forward to him ruining the site in the coming months. - -### New badge dropping: Erlang! - -We've also gone ahead and integrated a new badge to the site. We're proud to announce the addition of Erlang to the list of languages that we track and award achievements for. We're using the fierce [desert locust](http://en.wikipedia.org/wiki/Desert_locust) in homage to Erlang's lightweight, massively scalable process model, and also because Erlang programmers are [gregarious and migratory](http://en.wikipedia.org/wiki/Locust). Here's what the badge looks like: - - - - -If you've already released some open-source Erlang code, great! You should see it show up on your profile in the next couple of days. And if you haven't had a chance to try Erlang before and would like to get cracking with that achievement, we recommend that you go out and [learn you some Erlang for great good](http://learnyousomeerlang.com/). - -You may have have noticed that this badge looks a little bit different than most others. We're trying out some new badge designs on the site, and if you have any feedback on this first one we'd [love to hear it](mailto:support@coderwall.com). - -### Badge Mondays - -Starting from today we're going to be dropping new badges your way every Monday. We're excited to be getting into a rhythm for badge releases, and we hope it gives you some motivation to get cracking on learning some new code this week. \ No newline at end of file diff --git a/app/blog/2012-01-10-represent-get-geek-cred-on-your-blog.markdown b/app/blog/2012-01-10-represent-get-geek-cred-on-your-blog.markdown deleted file mode 100644 index 6fffd39b..00000000 --- a/app/blog/2012-01-10-represent-get-geek-cred-on-your-blog.markdown +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Represent: Get geek cred on your blog" -posted: Tue, 10 Jan 2012 12:04:36 -0800 -author: bguthrie ---- -Besides just generally causing a lot of mayhem, one of my first real tasks at Coderwall has been to get everyone set up with an official way to integrate Coderwall with their blog. You can see [an example of this on my blog here](http://blog.brianguthrie.com). In this I'm hugely thankful for the efforts of existing similar open-source implementations of Coderwall blog badges; in particular, both Mihail Szabolcs' [Proudify](https://github.com/icebreaker/proudify) ([see it in action](http://proudify.me/)) and Mikael Brevik's [Metabrag](https://github.com/mikaelbr/metabrag) are extremely cool, and absolutely gorgeous to boot. - -To integrate it, you need to include the requisite JS and CSS on your blog or web page. (This first pass of the badge requires jQuery; if you'd like support for other frameworks, let us know.) - -<script src="https://gist.github.com/1585413.js?file=coderwall_badge_markup.html"></script> - -The `data-coderwall-username` attribute is required in order for the script to figure out whose badges to retrieve. `data-coderwall-orientation` is optional (default is vertical) but it helps it make some styling choices depending on where you'd like to place the widget. - -In my case, I tacked on a bit of CSS to my existing stylesheets to get the badges placed in the right spot on the page: - -<script src="https://gist.github.com/1585413.js?file=coderwall_badge_style.css"></script> - -That's all! If you have any other questions, don't hesitate to [get in touch](mailto:brian@coderwall.com). Happy hacking! \ No newline at end of file diff --git a/app/blog/2012-01-16-the-hacker-version-of-an-embeddable-social-button.markdown b/app/blog/2012-01-16-the-hacker-version-of-an-embeddable-social-button.markdown deleted file mode 100644 index 1f8ae83c..00000000 --- a/app/blog/2012-01-16-the-hacker-version-of-an-embeddable-social-button.markdown +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: The hacker's version of an embeddable social button -posted: Mon, 16 Jan 2012 11:02:41 -0800 -author: mdeiters ---- - -We wanted to create the inverse of a "share this" button for developers that deserve recognition when they share awesome code. The typical pattern that Twitter and other websites use is to suggest that you embed an iframe or use Javascript to create a button on the client. This is problematic on many pages that don't allow full embedding of HTML (like a GitHub repo README) and often the html itself is cumbersome. To handle this we decided to build a dynamic "endorse button" generated on demand for every user that is as simple as adding an image tag with an enclosing anchor tag. - -[](http://coderwall.com/mdeiters) - -<script src="https://gist.github.com/1619631.js?file=embed.html"></script> - -(To use it, replace my username (*mdeiters*) with your Coderwall username.) - -### Adding the endorsement count to the image with Rmagick - -We started by creating an image with similar dimensions to the Tweet This button but we left the count bubble empty: - - - -ImageMagick and RMagick make it incredibly easy to add to text to an existing image. We just needed to set the right font styles and then use the <code>text</code> method to write the number of endorsements to the bubble. After tweaking the x and y locations we were set. For this first pass we don't even write the image to the file system: we just use Rails' <code>send_data</code> method to stream the newly created image to the client. - -<script src="https://gist.github.com/1622786.js"> </script> - -If you'd like to run the above code yourself, make sure to install ImageMagick and to include RMagick in your Gemfile, as above. - -### Performance - -Being a start up, we are firm believers in JIT development which applies to scaling too. We wanted to do the quickest thing to get this out to coderwall members while having a clear path to scale the infrastructure in the future if we need to. For example, using the different api.coderwall.com domain, we have the ability to independently scale the endorse button processes from the rest of the coderwall website. - -Rendering a dynamic image can be expensive but our current performance metrics are *acceptable* because we aggressively use HTTP caching. Heroku's robust HTTP caching will serve the same member's endorse button for at least 1 minute because we set a Cache-Control header to public with a future 1 minute expiration date. After that expires, we still have etags and last modified HTTP headers to ensure a new button is generated only if the member receives a new endorsement. Rails' <code>stale?</code> and <code>expires_in</code> makes this incredibly easy. - -<script src="https://gist.github.com/1622977.js?file=http_caching_on_controller.rb"></script> - diff --git a/app/blog/2012-02-05-the-companies-id-want-to-work-for.markdown b/app/blog/2012-02-05-the-companies-id-want-to-work-for.markdown deleted file mode 100644 index 40b8db04..00000000 --- a/app/blog/2012-02-05-the-companies-id-want-to-work-for.markdown +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: The companies I'd want to work for -posted: Sun, 05 Feb 2012 20:55:47 -0800 -author: mdeiters ---- -The best way to learn quickly and excel is to surround yourself with people that are smarter and more experienced than you are. When you no longer feel challenged and others view you as the smartest person in the room, you know it's time to move on. The problem then becomes: how do you pick a new team that will challenge you and help you grow? We built Coderwall's [team leaderboard](http://coderwall.com/leaderboard) as a tool to help you find those teams. - -## Warning signs in an interview - -I remember one of my first interviews; the company's product seemed technically challenging and the interviewers talked a great game. I had only been programming professionally for 2 years so I assumed that when they asked me a few situational questions about their architecture that stumped me, it was due to my inexperience. The questions made me think everyone there must be brilliant because I had no idea what they were talking about and I'd certainly learn a lot if I worked with them. Within a few days of accepting the job and starting there I realized the reason the questions stumped me was because they were flawed from the start. Everything about how the team handled building software was absurd. I stayed there about as long as it took me to find another job and from that point forward I put a lot more effort into understanding the team I'd be working with. - -## Evaluating the team - -Employers that seek the best candidates place much more weight on open source, writing, and your other online professional activity more than a traditional resumé. This is getting easier to require, as the last few years have seen a surge of the best developers putting much of what they do online. Why not hold the team you may end up working with up to the same bar that they're holding you to? Finding out who you'd be working with and what they share professionally online, either with open source, writing, or other means, can really help you determine if it's a team that will challenge you. - -## How the leaderboard score works - -The current Coderwall leaderboard is a work in progress and not perfect. Most certainly there are good companies that are missing from the list, so we can't necessarily rule a team out, but we can identify some great ones. A quick glance at the teams and their members' profiles clearly demonstrate that every team on the leaderboard consists of fantastic developers. If you think your team is underrepresented then it's easy to join, create a team, and invite your coworkers to better represent. - -A few things about how the current score works: - -* Each achievement badge in Coderwall has a weight that is factored into the score. We'll still have to make some tweaks to the weights, but they tend to reward newer and less widely-understood languages and frameworks, and achievements that involve accumulating reputation amongst your fellow geeks. -* We're interested in overall team quality rather than sheer badge accumulation, so we score the [central tendency](http://en.wikipedia.org/wiki/Central_tendency) of the team. A large team size will have a small positive effect only if nearly everyone on the team is strong. -* The team members' accumulated [Coderwall endorsements](http://coderwall.com/blog/2012-01-16-the-hacker-version-of-an-embeddable-social-button) also have a strong positive effect on score. Endorsements are received when another member views your profile and endorses one of your skills. Endorsements mean a lot because every member has only select number of endorsements to hand out and they only get more when they unlock more achievements. -* There is no upper limit to score. - -## What is next - -Many of the current badges are based on open source that you may have shared publicly on GitHub. But we are expanding and focusing on integrating with other sources. You'll also be able to earn more individual achievements for things like speaking/attending conferences or publishing on a blog. We'll also be creating a company profile pages to make it easier to learn more about the teams and what technologies they use. - -Head on over to the [team leaderboard](http://coderwall.com/leaderboard), and let us know what you think. \ No newline at end of file diff --git a/app/blog/2012-02-23-hating-on-IE6.markdown b/app/blog/2012-02-23-hating-on-IE6.markdown deleted file mode 100644 index bef61882..00000000 --- a/app/blog/2012-02-23-hating-on-IE6.markdown +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: IE6 is still trolling developers -posted: Thu, 23 Feb 2012 21:37:05 -0800 -author: mdeiters ---- - -I was looking through Coderwall to see how many developers had some crazy skills like this woman: - -<iframe width="420" height="315" src="http://www.youtube.com/embed/0TFMLJVO4qY?start=50" frameborder="0" ></iframe> - -But sadly it turns out that many developers haven't added their skills to their profile. Last week less, just under 50% of developers that joined Coderwall have declared a skill. We thought it would be fun to change things up and make the suggested defaults something you wouldn't normally expect to see: - - - -We originally did this just to make the page more fun, we were surprised by how many developers entered their skills. It seems the thought of IE6 is enough for nearly everyone to add their skills. - - - - -What skills would you hate to have? - -[EDIT] - -We updated the UI to make it very clear these are only suggestions. If you decide not to select a skill, nothing will show up on your public profile. diff --git a/app/clock.rb b/app/clock.rb new file mode 100644 index 00000000..430b5542 --- /dev/null +++ b/app/clock.rb @@ -0,0 +1,44 @@ +# IMPORTANT: Coderwall runs in the Pacific Timezone + +require_relative '../config/boot' +require_relative '../config/environment' + +include Clockwork + +# On the first of every month send the popular protips from the previous month. +every(1.day, 'protip_mailer:popular_protips', if: ->(t){ t.day == 1 }) do + if ENV['PROTIP_MAILER_POPULAR_PROTIPS'] + last_month = 1.month.ago + ProtipMailerPopularProtipsWorker.perform_async(last_month.beginning_of_month, last_month.end_of_month) + else + Rails.logger.warn('PROTIP_MAILER_POPULAR_PROTIPS is disabled. Set `heroku config:set PROTIP_MAILER_POPULAR_PROTIPS=true` to allow sending scheduled emails.') + end +end + +every(1.day, 'award:refresh:stale', at: '00:00') do + RefreshStaleUsersWorker.perform_async +end + +# Runs as 1:00 AM Pacific +every(1.day, 'award:activate:active', at: '01:00') do + ActivatePendingUsersWorker.perform_async +end + +every(1.day, 'cleanup:protips:associate_zombie_upvotes', at: '02:00') do + CleanupProtipsAssociateZombieUpvotesJob.perform_async +end + +every(1.day, 'search:sync', at: '03:00') do + SearchSyncJob.perform_async +end + +every(1.day, 'protips:recalculate_scores', at: '04:00') do + ProtipsRecalculateScoresJob.perform_async +end + +every(1.day, 'sitemap:refresh', at: '06:00') do + SitemapRefreshWorker.perform_async +end + +# This is tied with broken code. Probably should delete +# every(1.day, 'facts:system', at: '00:00') {} diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb index 9235f8df..53097fbb 100644 --- a/app/controllers/accounts_controller.rb +++ b/app/controllers/accounts_controller.rb @@ -1,44 +1,41 @@ class AccountsController < ApplicationController layout 'product_description' - skip_before_filter :verify_authenticity_token, only: [:webhook] - before_filter :lookup_account, except: [:webhook, :send_invoice] - before_filter :ensure_account_admin, except: [:create] - before_filter :determine_plan, only: [:create, :update] - before_filter :ensure_eligibility, only: [:new] - before_filter :paying_user_context, if: ->() { Rails.env.production? } + skip_before_action :verify_authenticity_token, only: [:webhook] + before_action :lookup_account, except: [:webhook, :send_invoice] + before_action :ensure_account_admin, except: [:create] + before_action :determine_plan, only: [:create, :update] + before_action :ensure_eligibility, only: [:new] + # GET /teams/:team_id/account/new(.:format) def new @account ||= current_user.team.build_account @plan = params[:public_id] end + # POST /teams/:team_id/account(.:format) def create redirect_to teamname_path(slug: @team.slug) if @plan.free? - @account = @team.build_account(params[:account]) - @account.admin_id = current_user.id - # TODO: (whatupdave) this doesn't look like it's being used any more. Remove if possible - # @account.trial_end = Date.new(2013, 1, 1).to_time.to_i if session[:discount] == ENV['DISCOUNT_TOKEN'] + @account = @team.build_account(account_params) if @account.save_with_payment(@plan) unless @team.is_member?(current_user) - @team.add_user(current_user) - @team.save + @team.add_member(current_user,:active) end record_event('upgraded team') - Subscription.team_upgrade(current_user.username, @plan.id).deliver + SubscriptionMailer.team_upgrade(current_user.username, @plan.id).deliver redirect_to new_team_opportunity_path(@team), notice: "You are subscribed to #{@plan.name}." + plan_capability(@plan, @team) else - puts "Error creating account #{@account.errors.inspect}" - Honeybadger.notify(error_class: 'Payments', error_message: @account.errors.full_messages.join("\n"), parameters: params) if Rails.env.production? + Rails.logger.error "Error creating account #{@account.errors.inspect}" flash[:error] = @account.errors.full_messages.join("\n") redirect_to employers_path end end + # PUT /teams/:team_id/account(.:format) def update - if @account.update_attributes(params[:account]) && @account.save_with_payment(@plan) + if @account.update_attributes(account_params) && @account.save_with_payment(@plan) redirect_to new_team_opportunity_path(@team), notice: "You are subscribed to #{@plan.name}." + plan_capability(@plan, @team) else flash[:error] = @account.errors.full_messages.join("\n") @@ -46,6 +43,7 @@ def update end end + # GET /webhooks/stripe(.:format) def webhook data = JSON.parse request.body.read if data[:type] == "invoice.payment_succeeded" @@ -61,25 +59,35 @@ def webhook end end + # POST /teams/:team_id/account/send_invoice(.:format) def send_invoice - @team = Team.find(params[:team_id]) - @team.account.send_invoice_for(1.month.ago) - redirect_to teamname_path(slug: @team.slug), notice: "sent invoice for #{1.month.ago.strftime("%B")} to #{@team.account.admin.email}" + team, period = Team.find(params[:team_id]), 1.month.ago + + if team.account.send_invoice_for(period) + flash[:notice] = "sent invoice for #{period.strftime("%B")} to the team's admins " + else + flash[:error] = 'There was an error in sending an invoice' + end + + redirect_to teamname_path(slug: team.slug) end private def lookup_account - @team = (current_user && current_user.team) || (params[:team_id] && Team.find(params[:team_id])) - return redirect_to employers_path if @team.nil? + begin + @team = Team.includes(:account).find(params[:team_id]) + rescue ActiveRecord::RecordNotFound + redirect_to employers_path if @team.nil? + end @account = @team.account end def ensure_account_admin - is_admin? || current_user.team && current_user.team.admin?(current_user) + is_admin? || @team.admins.exists?(user_id: current_user) end def determine_plan - chosen_plan = params[:account].delete(:chosen_plan) + chosen_plan = params[:teams_account].delete(:chosen_plan) @plan = Plan.find_by_public_id(chosen_plan) end @@ -97,8 +105,8 @@ def plan_capability(plan, team) message end - def paying_user_context - Honeybadger.context(user_email: current_user.try(:email)) if current_user + def account_params + params.require(:teams_account).permit(:stripe_card_token) end end diff --git a/app/controllers/achievements_controller.rb b/app/controllers/achievements_controller.rb index ce1d3c2c..c81ea605 100644 --- a/app/controllers/achievements_controller.rb +++ b/app/controllers/achievements_controller.rb @@ -1,18 +1,21 @@ class AchievementsController < ApplicationController - before_filter :ensure_valid_api_key, only: [:award] - skip_before_filter :verify_authenticity_token, only: [:award] + #TODO extract to api.coderwall.com + before_action :ensure_valid_api_key, only: [:award] + skip_before_action :verify_authenticity_token, only: [:award] layout 'protip' respond_to :json, only: [:award] + # GET /:username/achievements/:id(.:format) def show show_achievements_params = params.permit(:id, :username) @badge = Badge.find(show_achievements_params[:id]) - @user = @badge.user - return redirect_to(destination_url) if @badge && @user.username.downcase != show_achievements_params[:username].downcase + @user = @badge.user + redirect_to(destination_url) if @badge && @user.username.downcase != show_achievements_params[:username].downcase end + # POST /award(.:format) def award award_params = params.permit(:badge, :twitter, :linkedin, :github, :date) @@ -23,28 +26,24 @@ def award render_404 else if @api_access.can_award?(award_params[:badge]) - user = User.with_username(award_params[provider], provider) + user = User.find_by_provider_username(award_params[provider], provider) badge = badge_class_factory(award_params[:badge].to_s).new(user, Date.strptime(award_params[:date], '%m/%d/%Y')) badge.generate_fact!(award_params[:badge], award_params[provider], provider) unless user.nil? user.award_and_add_skill badge user.save! end - render nothing: true, status: 200 + render nothing: true, status: :ok else - return render json: { message: "don't have permission to do that. contact support@coderwall.com", status: 403 }.to_json + render json: {message: "don't have permission to do that. contact support@coderwall.com"} , status: 403 end end - rescue Exception => e - return render json: { message: "something went wrong with your request or the end point may not be ready. contact support@coderwall.com" }.to_json end private def ensure_valid_api_key - @api_key = params.permit(:api_key)[:api_key] - @api_access = ApiAccess.for(@api_key) unless @api_key.nil? - return render json: { message: "no/invalid api_key provided. get your api_key from coderwall.com/settings" }.to_json if @api_access.nil? + @api_access = ApiAccess.find_by_api_key!(params.permit(:api_key)[:api_key]) end def badge_class_factory(requested_badge_name) @@ -54,4 +53,12 @@ def badge_class_factory(requested_badge_name) def pick_a_provider(award_params) (User::LINKABLE_PROVIDERS & award_params.keys.select { |key| %w{twitter linkedin github}.include?(key) }).first end + + rescue_from ActiveRecord::RecordNotFound do + render json: {message: 'no/invalid api_key provided. get your api_key from coderwall.com/settings'} + end + + rescue_from Exception do + render json: {message: 'something went wrong with your request or the end point may not be ready. contact support@coderwall.com'} + end end diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb deleted file mode 100644 index 7a7a9a29..00000000 --- a/app/controllers/admin_controller.rb +++ /dev/null @@ -1,57 +0,0 @@ -class AdminController < ApplicationController - before_filter :require_admin! - - def index - end - - def cache_stats - @cache_stats = Rails.cache.stats - end - - def failed_jobs - @page = params[:page].try(:to_i) || 1 - @per_page = params[:per_page].try(:to_i) || 10 - - @total_failed = Delayed::Job. - where("last_error IS NOT NULL"). - count - - @jobs = Delayed::Job. - where("last_error IS NOT NULL"). - offset((@page - 1) * @per_page). - limit(@per_page). - order("updated_at DESC") - end - - if Rails.env.development? - skip_before_filter :require_admin!, only: [:index, :toggle_premium_team] - - def toggle_premium_team - team = current_user.team || begin - team = Team.first - team.add_user(current_user) - end - team.premium = !team.premium - team.save! - return redirect_to('/') - end - - end - - def teams - - end - - def sections_teams - @teams = Team.completed_at_least(params[:num_sections].to_i) - end - - def section_teams - @teams = Team.with_completed_section(parse_section_name(params[:section])) - end - - def parse_section_name(section_name) - name = Team::SECTIONS.select { |section| section == section_name }.first - return name.to_sym unless name.nil? - end -end diff --git a/app/controllers/alerts_controller.rb b/app/controllers/alerts_controller.rb index 6543d11a..b082b83d 100644 --- a/app/controllers/alerts_controller.rb +++ b/app/controllers/alerts_controller.rb @@ -1,12 +1,13 @@ class AlertsController < ApplicationController - skip_before_filter :verify_authenticity_token - before_filter :get_alert, only: :create - before_filter :authenticate_caller, only: :create - before_filter :is_admin?, only: :index + skip_before_action :verify_authenticity_token + before_action :get_alert, only: :create + before_action :authenticate_caller, only: :create + before_action :is_admin?, only: :index GA_VISITORS_ALERT_INTERVAL = 30.minutes TRACTION_ALERT_INTERVAL = 30.minutes + # GET /alerts(.:format) def create case @alert[:type].to_sym when :traction @@ -18,12 +19,13 @@ def create head(:ok) end + #GET /alerts(.:format) def index @alerts = [] [:traction, :google_analytics].each do |type| - count = REDIS.get(count_key(type)) + count = Redis.current.get(count_key(type)) next if count.nil? - @alerts << { type: type, count: count, data: REDIS.zrangebyscore(history_key(type), 0, Time.now.to_i, withscores: true) } + @alerts << { type: type, count: count, data: Redis.current.zrangebyscore(history_key(type), 0, Time.now.to_i, withscores: true) } end end @@ -48,8 +50,8 @@ def get_alert def process_traction_alert(data) if can_report_traction?(data[:url]) update_history - REDIS.set(last_sent_key(:traction, data[:url]), Time.now.to_i) - Notifier.alert_admin(:traction, data[:url], data[:message]).deliver + Redis.current.set(last_sent_key(:traction, data[:url]), Time.now.to_i) + NotifierMailer.alert_admin(:traction, data[:url], data[:message]).deliver end end @@ -60,22 +62,22 @@ def process_google_analytics(data) if can_report_visitors? if data[:viewers] > ENV['SITE_VISITORS_MAX_ALERT_LIMIT'] update_history - REDIS.set(last_sent_key(:google_analytics), Time.now.to_i) - Notifier.alert_admin(:a_lot_of_visitors, data[:url], message).deliver! + Redis.current.set(last_sent_key(:google_analytics), Time.now.to_i) + NotifierMailer.alert_admin(:a_lot_of_visitors, data[:url], message).deliver! elsif data[:viewers] < ENV['SITE_VISITORS_MIN_ALERT_LIMIT'] update_history - REDIS.set(last_sent_key(:google_analytics), Time.now.to_i) - Notifier.alert_admin(:too_few_visitors, data[:url], message).deliver! + Redis.current.set(last_sent_key(:google_analytics), Time.now.to_i) + NotifierMailer.alert_admin(:too_few_visitors, data[:url], message).deliver! end end end def can_report_visitors? - Time.at(REDIS.get(last_sent_key(:google_analytics)).to_i) < GA_VISITORS_ALERT_INTERVAL.ago + Time.at(Redis.current.get(last_sent_key(:google_analytics)).to_i) < GA_VISITORS_ALERT_INTERVAL.ago end def can_report_traction?(url) - Time.at(REDIS.get(last_sent_key(:traction, url)).to_i) < TRACTION_ALERT_INTERVAL.ago + Time.at(Redis.current.get(last_sent_key(:traction, url)).to_i) < TRACTION_ALERT_INTERVAL.ago end def last_sent_key(type, subkey=nil) @@ -93,10 +95,10 @@ def history_key(type) end def update_stats - REDIS.incr(count_key(@alert[:type])) + Redis.current.incr(count_key(@alert[:type])) end def update_history - REDIS.zadd(history_key(@alert[:type]), Time.now.to_i, @alert[:data]) + Redis.current.zadd(history_key(@alert[:type]), Time.now.to_i, @alert[:data]) end end \ No newline at end of file diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c9f9a7f9..ae726b62 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,19 +7,22 @@ class ApplicationController < ActionController::Base helper_method :current_user helper_method :viewing_self? helper_method :is_admin? + helper_method :is_moderator? helper_method :viewing_user helper_method :round - before_filter :ensure_domain - before_filter :apply_flash_message - before_filter :require_registration - before_filter :clear_expired_cookie_if_session_is_empty - before_filter :ensure_and_reconcile_tracking_code - before_filter :track_utm - before_filter :show_achievement + before_action :ensure_domain + before_action :apply_flash_message + before_action :require_registration + before_action :clear_expired_cookie_if_session_is_empty + before_action :ensure_and_reconcile_tracking_code + before_action :track_utm + before_action :show_achievement - after_filter :record_visit - after_filter :record_location + after_action :record_visit + after_action :record_location + + rescue_from ActiveRecord::RecordNotFound, with: :render_404 protected @@ -41,16 +44,22 @@ def clear_expired_cookie_if_session_is_empty def current_user if @current_user.nil? && session[:current_user] - @current_user = User.find(session[:current_user]) + unless @current_user = User.find_by_id(session[:current_user]) + session[:current_user] = nil + store_location! + redirect_to signin_path + end end + @current_user end + #TODO remove this def viewing_user @viewing_user ||= current_user || begin - if cookies[:identity] - User.with_username(cookies[:identity]) - end + if cookies[:identity] + User.find_by_username(cookies[:identity]) + end end end @@ -64,6 +73,9 @@ def sign_in(user) cookies[:signedin] = user.username # this cookie is used by js to show loggedin or not on cached HTML cookies.permanent[:identity] = user.username current_user.increment!(:login_count) + current_user.last_ip = request.remote_ip + current_user.last_ua = request.user_agent + current_user.save ensure_and_reconcile_tracking_code #updated tracking code if appropriate. current_user end @@ -95,8 +107,6 @@ def ensure_and_reconcile_tracking_code def sign_out record_event("signed out") - @current_user = nil - session[:current_user] = nil cookies.delete(:signedin) reset_session end @@ -120,7 +130,7 @@ def show_achievement def record_visit if viewing_user if viewing_user == current_user && (viewing_user.try(:last_request_at) || 1.week.ago) < 1.day.ago && viewing_user.active? && viewing_user.last_refresh_at < 2.days.ago - Resque.enqueue(RefreshUser, current_user.username) + RefreshUserJob.perform_async(current_user.id) end viewing_user.visited! Usage.page_view(viewing_user.id) unless viewing_user.admin? @@ -129,7 +139,7 @@ def record_visit def record_location if viewing_user && viewing_user.ip_lat.nil? && deployment_environment? - Resque.enqueue(ReverseGeolocateUser, viewing_user.username, request.ip) + ReverseGeolocateUserJob.perform_async(viewing_user.username, request.ip) end end @@ -139,7 +149,6 @@ def deployment_environment? def destination_url if session[:return_to] - Rails.logger.debug("Returning user to: #{session[:return_to]}") session.delete(:return_to) elsif signed_in? if current_user.oldest_achievement_since_last_visit @@ -155,7 +164,7 @@ def destination_url end def access_required - redirect_to(root_url) if !signed_in? + redirect_to(root_url) unless signed_in? end def viewing_self? @@ -170,16 +179,10 @@ def not_on_achievements? params[:controller] != 'achievements' end - unless Rails.env.development? || Rails.env.test? - rescue_from(ActiveRecord::RecordNotFound) { |e| render_404 } - rescue_from(ActionController::RoutingError) { |e| render_404 } - # rescue_from(RuntimeError) { |e| render_500 } - end - def render_404 - respond_to do |type| - type.html { render file: File.join(Rails.root, 'public', '404.html'), layout: nil, status: 404 } - type.all { render nothing: true, status: 404 } + respond_to do |format| + format.any(:html, :json, :xml) { render 'errors/not_found', status: :not_found } + format.all { render text: "Not Found", :content_type => Mime::TEXT, status: :not_found } end end @@ -191,15 +194,19 @@ def render_500 end def require_admin! - return head(:forbidden) unless signed_in? && current_user.admin? + return head(:forbidden) unless is_admin? end def is_admin? - signed_in? && current_user.admin? + signed_in? && current_user.role == 'admin' + end + + def is_moderator? + signed_in? && current_user.role.in?(%w(admin moderator)) end - def require_beta_access! - return head(:forbidden) unless signed_in? && current_user.has_beta_access? + def require_moderator! + return head(:forbidden) unless is_moderator? end def iphone_user_agent? @@ -244,7 +251,7 @@ def record_event(action_name, options = {}) #options.merge!('signed up on' => current_user.created_at.to_formatted_s(:mixpanel), # 'achievements' => current_user.badges_count) if signed_in? - Resque.enqueue(MixpanelTracker::TrackEventJob, action_name, options, request.ip) if ENABLE_TRACKING + TrackEventJob.perform_async(action_name, options, request.ip) if ENABLE_TRACKING end rescue Exception => ex Rails.logger.error("MIXPANEL: Swallowing error when trying to record #{action_name}, #{ex.message}") @@ -298,7 +305,7 @@ def redirect_to_signup_if_unauthenticated(return_to=request.referer, message = " end unless ENV['HTTP_BASICAUTH_ON'].blank? - before_filter :require_http_basic + before_action :require_http_basic def require_http_basic authenticate_or_request_with_http_basic do |username, password| diff --git a/app/controllers/bans_controller.rb b/app/controllers/bans_controller.rb new file mode 100644 index 00000000..4a25d0b2 --- /dev/null +++ b/app/controllers/bans_controller.rb @@ -0,0 +1,16 @@ +class BansController < BaseAdminController + + # POST /users/:user_id/bans(.:format) + def create + ban_params = params.permit(:user_id) + user = User.find(ban_params[:user_id]) + return redirect_to(badge_url(username: user.username), notice: 'User is already banned.') if user.banned? + + flash_notice = if UserBannerService.ban(user) + 'User successfully banned.' + else + 'User could not be banned.' + end + redirect_to(badge_url(username: user.username), notice: flash_notice) + end +end diff --git a/app/controllers/base_admin_controller.rb b/app/controllers/base_admin_controller.rb new file mode 100644 index 00000000..9ffe3386 --- /dev/null +++ b/app/controllers/base_admin_controller.rb @@ -0,0 +1,4 @@ +class BaseAdminController < ApplicationController + layout 'admin' + before_action :require_admin! +end diff --git a/app/controllers/blog_posts_controller.rb b/app/controllers/blog_posts_controller.rb deleted file mode 100644 index 0736ee88..00000000 --- a/app/controllers/blog_posts_controller.rb +++ /dev/null @@ -1,17 +0,0 @@ -class BlogPostsController < ApplicationController - skip_before_filter :require_registration - - def index - @blog_posts = BlogPost.all_public[0..5] - respond_to do |f| - f.html - f.atom - end - end - - def show - @blog_post = BlogPost.find(params[:id]) - rescue BlogPost::PostNotFound => e - return head(:not_found) - end -end \ No newline at end of file diff --git a/app/controllers/callbacks/hawt_controller.rb b/app/controllers/callbacks/hawt_controller.rb index 711f2dc7..d52a208c 100644 --- a/app/controllers/callbacks/hawt_controller.rb +++ b/app/controllers/callbacks/hawt_controller.rb @@ -1,12 +1,13 @@ # encoding: utf-8 class Callbacks::HawtController < ApplicationController - before_filter :authenticate - before_filter :set_default_response_format + before_action :authenticate + before_action :set_default_response_format layout nil protect_from_forgery with: :null_session respond_to :json + # POST /callbacks/hawt/feature(.:format) def feature logger.ap(params, :debug) @@ -17,6 +18,7 @@ def feature end end + # POST /callbacks/hawt/unfeature(.:format) def unfeature unfeature!(hawt_callback_params[:protip_id], hawt_callback_params[:hawt?]) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index ef8f3c4c..f11bc377 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -1,52 +1,46 @@ class CommentsController < ApplicationController - before_filter :access_required, only: [:new, :edit, :update, :destroy] - before_filter :verify_ownership, only: [:edit, :update, :destroy] - before_filter :require_admin!, only: [:flag, :index] - before_filter :lookup_comment, only: [:edit, :update, :destroy, :like] - before_filter :lookup_protip, only: [:create] + before_action :access_required, only: [:update, :destroy] - def index - @comments = Comment.where('created_at > ?', 1.day.ago) - end - - def new ; end - - def edit ; end + before_action :lookup_comment, only: [:edit, :update, :destroy, :like, :mark_as_spam] + before_action :verify_ownership, only: [:edit, :update, :destroy] + before_action :lookup_protip, only: [:create] + before_action :require_moderator!, only: [:mark_as_spam] + # POST /p/:protip_id/comments(.:format) def create - create_comment_params = params.require(:comment).permit(:comment) + redirect_to_signup_if_unauthenticated(request.referer + "?" + (comment_params.try(:to_query) || ""), "You must signin/signup to add a comment") do + @comment = @protip.comments.build(comment_params) - redirect_to_signup_if_unauthenticated(request.referer + "?" + (create_comment_params.try(:to_query) || ""), "You must signin/signup to add a comment") do - @comment = @protip.comments.build(create_comment_params) @comment.user = current_user + @comment.request_format = request.format.to_s respond_to do |format| if @comment.save record_event('created comment') - format.html { redirect_to protip_path(@comment.commentable.try(:public_id)) } + format.html { redirect_to protip_path(params[:protip_id]) } format.json { render json: @comment, status: :created, location: @comment } else - format.html { redirect_to protip_path(@comment.commentable.try(:public_id)), error: "could not add your comment. try again" } + format.html { redirect_to protip_path(params[:protip_id]), error: "could not add your comment. try again" } format.json { render json: @comment.errors, status: :unprocessable_entity } end end end end + # PUT /p/:protip_id/comments/:id(.:format) def update - update_comment_params = params.require(:comment).permit(:comment) - respond_to do |format| - if @comment.update_attributes(update_comment_params) - format.html { redirect_to protip_path(@comment.commentable.try(:public_id)) } + if @comment.update_attributes(comment_params) + format.html { redirect_to protip_path(params[:protip_id]) } format.json { head :ok } else - format.html { redirect_to protip_path(@comment.commentable.try(:public_id)), error: "could not update your comment. try again" } + format.html { redirect_to protip_path(params[:protip_id]), error: "could not update your comment. try again" } format.json { render json: @comment.errors, status: :unprocessable_entity } end end end + # DELETE /p/:protip_id/comments/:id(.:format) def destroy return head(:forbidden) if @comment.nil? @comment.destroy @@ -56,6 +50,7 @@ def destroy end end + # POST /p/:protip_id/comments/:id/like(.:format) def like redirect_to_signup_if_unauthenticated(request.referer, "You must signin/signup to like a comment") do @comment.like_by(current_user) @@ -66,21 +61,31 @@ def like end end + # POST /p/:protip_id/comments/:id/mark_as_spam(.:format) + def mark_as_spam + @comment.mark_as_spam + respond_to do |format| + format.json { head :ok } + format.js { head :ok } + end + end + private def lookup_comment - id = params.permit(:id)[:id] - @comment = Comment.find(id) - lookup_protip + @comment = Comment.includes(:protip).find(params[:id]) + @protip = @comment.protip end def lookup_protip - protip_id = params.permit(:protip_id)[:protip_id] - @protip = Protip.with_public_id(protip_id) + @protip = Protip.find_by_public_id(params[:protip_id]) end def verify_ownership - lookup_comment redirect_to(root_url) unless (is_admin? or (@comment && @comment.authored_by?(current_user))) end + + def comment_params + params.require(:comment).permit(:comment) + end end diff --git a/app/controllers/emails_controller.rb b/app/controllers/emails_controller.rb index d9d2bbf7..79fe5c05 100644 --- a/app/controllers/emails_controller.rb +++ b/app/controllers/emails_controller.rb @@ -1,14 +1,17 @@ class EmailsController < ApplicationController + + # GET /unsubscribe(.:format) def unsubscribe - puts("Mailgun Unsubscribe: #{params.inspect}") + Rails.logger.info("Mailgun Unsubscribe: #{params.inspect}") if mailgun?(ENV['MAILGUN_API_KEY'], params['token'], params['timestamp'], params['signature']) - if params[:email_type] == Notifier::WELCOME_EVENT + if params[:email_type] == NotifierMailer::WELCOME_EVENT user = User.where(email: params[:recipient]).first user.update_attribute(:receive_newsletter, false) - elsif params[:email_type] == Notifier::ACTIVITY_EVENT + elsif params[:email_type] == NotifierMailer::ACTIVITY_EVENT user = User.where(email: params[:recipient]).first user.update_attribute(:notify_on_award, false) - elsif params[:email_type] == Notifier::WEEKLY_DIGEST_EVENT + elsif params[:email_type] == NotifierMailer::POPULAR_PROTIPS_EVENT + # Piggybacking off the old 'weekly_digest' subscription list user = User.where(email: params[:recipient]).first user.update_attribute(:receive_weekly_digest, false) end @@ -16,6 +19,7 @@ def unsubscribe return head(200) end + # GET /delivered(.:format) def delivered Rails.logger.info("Mailgun Delivered: #{params.inspect}") if mailgun?(ENV['MAILGUN_API_KEY'], params['token'], params['timestamp'], params['signature']) @@ -37,5 +41,4 @@ def mailgun?(api_key, token, timestamp, signature) def encrypt_signature(api_key, timestamp, token) OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), api_key, '%s%s' % [timestamp, token]) end - end diff --git a/app/controllers/endorsements_controller.rb b/app/controllers/endorsements_controller.rb index 588cc921..23341541 100644 --- a/app/controllers/endorsements_controller.rb +++ b/app/controllers/endorsements_controller.rb @@ -1,5 +1,6 @@ class EndorsementsController < ApplicationController + # GET /users/:user_id/endorsements(.:format) def index flash[:notice] = 'You must be signed in to make an endorsement.' #This is called when someone tries to endorse while unauthenticated @@ -8,6 +9,7 @@ def index redirect_to(signin_path) end + # POST /users/:user_id/endorsements(.:format) def create return head(:forbidden) unless signed_in? && params[:user_id] != current_user.id.to_s @user = User.find(params[:user_id]) @@ -18,11 +20,13 @@ def create render json: { unlocked: !@skill.locked?, message: "Awesome! #{@skill.endorse_message}" - }.to_json + } end + # GET /users/:user_id/endorsements/:id(.:format) + # GET /:username/endorsements.json(.:format) def show #Used by api.coderwall.com - @user = User.with_username(params[:username]) + @user = User.find_by_username(params[:username]) return head(:not_found) if @user.nil? render json: { endorsements: @user.endorsements_count, diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb new file mode 100644 index 00000000..1c4b80a1 --- /dev/null +++ b/app/controllers/errors_controller.rb @@ -0,0 +1,25 @@ +class ErrorsController < ApplicationController + + # GET|POST|PATCH|DELETE /404(.:format) + def not_found + render status: :not_found + end + + # GET|POST|PATCH|DELETE /422(.:format) + def unacceptable + respond_to do |format| + format.html { render 'public/422', status: :unprocessable_entity } + format.xml { head :unprocessable_entity } + format.json { head :unprocessable_entity } + end + end + + # GET|POST|PATCH|DELETE /500(.:format) + def internal_error + respond_to do |format| + format.html { render 'public/500', status: :internal_server_error } + format.xml { head :internal_server_error } + format.json { head :internal_server_error } + end + end +end diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb deleted file mode 100644 index 220d0283..00000000 --- a/app/controllers/events_controller.rb +++ /dev/null @@ -1,45 +0,0 @@ -class EventsController < ApplicationController - before_filter :access_required - before_filter :limit_count, only: [:more] - before_filter :track_request, only: [:more], unless: :is_admin? - before_filter :find_user, only: [:index, :more] - respond_to :html, :json, :js - - def index - @subscribed_channels = @user.subscribed_channels.to_json - @stats = @user.activity_stats.to_json - end - - def more - from = params[:since].try(:to_f) || 0 - to = Time.now.to_f - - Event.user_activity(@user, from, to, @count, true) - respond_with @user.activity_stats - end - - private - - def track_request - end - - def limit_count - @count = params[:count].nil? ? 5 : [params[:count].to_i, 10].min - end - - def verify_ownership - redirect_to(root_url) unless (params[:username] == current_user.username) - end - - def find_user - @user = current_user - end - - def find_featured_protips - if Rails.env.development? && ENV['FEATURED_PROTIPS'].blank? - ENV['FEATURED_PROTIPS'] = Protip.limit(3).collect(&:public_id).join(',') - end - return [] if ENV['FEATURED_PROTIPS'].blank? - Protip.where(public_id: ENV['FEATURED_PROTIPS'].split(',')) - end -end diff --git a/app/controllers/follows_controller.rb b/app/controllers/follows_controller.rb index 973c833c..5bbbef4f 100644 --- a/app/controllers/follows_controller.rb +++ b/app/controllers/follows_controller.rb @@ -1,46 +1,38 @@ class FollowsController < ApplicationController - before_filter :access_required + before_action :access_required cache_sweeper :follow_sweeper helper_method :is_viewing_followers? + # GET /users/:user_id/follows(.:format) + # GET /:username/followers(.:format) + # GET /:username/following(.:format) def index - @user = User.with_username(params[:username]) + @user = User.find_by_username(params[:username]) return redirect_to(user_follows_url(username: current_user.username)) unless @user == current_user || current_user.admin? - @network = @user.followers_by_type(User.name) if is_viewing_followers? - @network = @user.following_by_type(User.name) if is_viewing_following? + @network = case params[:type] + when :followers + @user.followers_by_type(User.name) + else + @user.following_by_type(User.name) + end @network = @network.order('score_cache DESC').page(params[:page]).per(50) end + # POST /users/:username/follow(.:format) def create apply_cache_buster if params[:type] == :user - @user = User.with_username(params[:username]) + @user = User.find_by_username(params[:username]) if current_user.following?(@user) current_user.stop_following(@user) else current_user.follow(@user) end respond_to do |format| - format.json { render json: { dom_id: dom_id(@user), following: current_user.following?(@user) }.to_json } - format.js { render json: { dom_id: dom_id(@user), following: current_user.following?(@user) }.to_json } - end - else - #TODO: Refactor teams to use acts_as_follower after we move Team out of mongodb - if params[:id] =~ /^[0-9A-F]{24}$/i - @team = Team.find(params[:id]) - else - @team = Team.where(slug: params[:id]).first - end - if current_user.following_team?(@team) - current_user.unfollow_team!(@team) - else - current_user.follow_team!(@team) - end - respond_to do |format| - format.json { render json: { dom_id: dom_id(@team), following: current_user.following_team?(@team) }.to_json } - format.js { render json: { dom_id: dom_id(@team), following: current_user.following_team?(@team) }.to_json } + format.json { render json: { dom_id: dom_id(@user), following: current_user.following?(@user) } } + format.js { render json: { dom_id: dom_id(@user), following: current_user.following?(@user) } } end end end @@ -49,8 +41,4 @@ def create def is_viewing_followers? params[:type] == :followers end - - def is_viewing_following? - params[:type] == :following - end end \ No newline at end of file diff --git a/app/controllers/highlights_controller.rb b/app/controllers/highlights_controller.rb deleted file mode 100644 index 6cb48dd8..00000000 --- a/app/controllers/highlights_controller.rb +++ /dev/null @@ -1,50 +0,0 @@ -class HighlightsController < ApplicationController - - def index - @highlight = Highlight.random.first - end - - def create - @badge = nil - if current_user && !params[:highlight].blank? - if @highlight = current_user.highlights.create!(description: params[:highlight].strip) - badge = Beaver.new(current_user) - if current_user.active? && badge.award? && !current_user.has_badge?(Beaver) - begin - @badge = current_user.award(badge) - current_user.save! - @badge_event = Event.create_badge_event(current_user, @badge) - Event.create_timeline_for(current_user) - rescue Exception => ex - @badge = nil #if cant save we should not add achievement to page - Rails.logger.error("Error awarding Beaver to user #{current_user.id}: #{ex.message}") - end - end - @user = current_user - end - else - return render js: "alert('Y YOU NO SHARE SOMETHING BEFORE SUBMITTING');" - end - end - - def destroy - if current_user - @highlight = current_user.highlights.find(params[:id]) - @badge = nil - if @highlight.destroy - #record_event("highlight removed", :mp_note => @highlight.description) - badge = Beaver.new(current_user) - if !badge.award? - @badge = current_user.badges.where(badge_class_name: Beaver.name).first - @badge.destroy if @badge - end - end - Event.create_timeline_for(current_user) - end - end - - def random - render json: Highlight.random_featured - end - -end diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 709384b9..eec5cf3b 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,59 +1,7 @@ class HomeController < ApplicationController layout 'home4-layout' - + # GET /welcome(.:format) def index return redirect_to destination_url, flash: flash if signed_in? - @entrepreneurs = User.username_in(FEATURED_ENTREPRENURES) - @designers = User.username_in(FEATURED_DESIGNERS) - @developers = User.username_in(FEATURED_CODERS) - @teams = Team.any_in(_id: FEATURED_TEAMS).all end - - FEATURED_ENTREPRENURES = %w{ - naveen - tobi - mojombo - anildash - simonw - topfunky - caseorganic - } - - FEATURED_DESIGNERS = %w{ - amyhoy - lessallan - chriscoyier - kylebragger - sahil - csswizardry - davidkaneda - sachagreif - } - - FEATURED_CODERS = %w{ - jeresig - ginatrapani - wycats - unclebob - ry - chad - maccman - shanselman - } - - # wifelette - # yukihiro_matz - # caseorganic - - FEATURED_TEAMS = %w{ - 4f4bef5e9683e0000d000013 - 4f27195a973bf0000400083e - 4f271942973bf000040003b0 - 4f27193d973bf0000400029d - 4f271946973bf000040004a1 - 4f271948973bf00004000515 - 4f271951973bf00004000646 - 4f271937973bf00004000196 - } - end diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 48be6388..954baacd 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -1,12 +1,14 @@ class InvitationsController < ApplicationController + # GET /invitations/:id(.:format) + # GET /i/:id/:r(.:format) def show @team = Team.find(params[:id]) invitation_failed! unless @team.has_user_with_referral_token?(params[:r]) store_location! unless signed_in? session[:referred_by] = params[:r] record_event("viewed", what: "invitation") - rescue Mongoid::Errors::DocumentNotFound + rescue ActiveRecord::RecordNotFound invitation_failed! end diff --git a/app/controllers/links_controller.rb b/app/controllers/links_controller.rb deleted file mode 100644 index 6b5d9fc0..00000000 --- a/app/controllers/links_controller.rb +++ /dev/null @@ -1,11 +0,0 @@ -class LinksController < ApplicationController - before_filter :require_admin! - - def index - @links1, @links2, @links3 = *Link.featured.popular.limit(100).all.chunk(3) - end - - def suppress - Link.find(params[:id]).suppress! - end -end diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb new file mode 100644 index 00000000..19e0aeef --- /dev/null +++ b/app/controllers/members_controller.rb @@ -0,0 +1,28 @@ +class MembersController < ApplicationController + before_action :set_team + + # DELETE /teams/:team_id/members/:id(.:format) + def destroy + self_removal = current_user.id == params[:id] + return head(:forbidden) unless signed_in? && (@team.admin?(current_user) || self_removal) + @team.members.find_by_user_id!(params[:id]).destroy + + if self_removal + flash[:notice] = "Ok, You have left : #{@team.name}." + record_event("removed themselves from team") + redirect_to(teams_url) + else + record_event("removed user from team") + respond_to do |format| + format.js {} + format.html { redirect_to(teamname_url(slug: @team.slug)) } + end + end + end + + private + + def set_team + @team = Team.find(params[:team_id]) + end +end diff --git a/app/controllers/mosaic_controller.rb b/app/controllers/mosaic_controller.rb deleted file mode 100644 index 0a8ed576..00000000 --- a/app/controllers/mosaic_controller.rb +++ /dev/null @@ -1,41 +0,0 @@ -class MosaicController < ApplicationController - - def teams - if Rails.env.development? - @teams = Team.limit(400) - else - @teams = Team.top(400) - end - end - - def users - @users = [User.username_in(FEATURED) + User.top(400)].flatten.uniq - end - - FEATURED = %w{ - naveen - tobi - mojombo - anildash - simonw - topfunky - caseorganic - amyhoy - lessallan - chriscoyier - kylebragger - sahil - csswizardry - davidkaneda - sachagreif - jeresig - ginatrapani - wycats - unclebob - ry - chad - maccman - shanselman - } - -end diff --git a/app/controllers/networks_controller.rb b/app/controllers/networks_controller.rb index 0c3f4041..69e2218f 100644 --- a/app/controllers/networks_controller.rb +++ b/app/controllers/networks_controller.rb @@ -1,29 +1,13 @@ class NetworksController < ApplicationController include ProtipsHelper - before_filter :lookup_network, only: [:show, :members, :join, :leave, :destroy, :add_tag, :remove_tag, :update_tags, :mayor, :expert, :tag, :current_mayor] - before_filter :access_required, only: [:new, :create, :edit, :update, :destroy] - before_filter :require_admin!, only: [:new, :create, :edit, :update, :destroy, :add_tag, :remove_tag, :update_tags] - before_filter :limit_results, only: [:index, :members, :show, :tag] - before_filter :set_search_params, only: [:show, :mayor, :expert, :expert, :tag] - before_filter :redirect_to_search, only: [:show, :tag] + before_action :lookup_network, only: [:show, :join, :leave] + before_action :limit_results, only: [:index, :show] + before_action :set_search_params, only: [:show] + before_action :redirect_to_search, only: [:show] respond_to :html, :json, :js cache_sweeper :follow_sweeper, only: [:join, :leave] - def new - @network = Network.new - end - - def create - @network = Network.new(params[:network].permit(:name)) - respond_to do |format| - if @network.save - format.html { redirect_to networks_path, notice: "#{@network.name} Network was successfully created." } - else - format.html { render action: "new" } - end - end - end - + # GET /n(.:format) def index @index_networks_params = params.permit(:sort, :action) @@ -35,85 +19,9 @@ def index end end - def members - render :show - end - - def show - @protips = [] - @topics = @network.tags - - if (params[:sort].blank? and params[:filter].blank?) or params[:sort] == 'upvotes' - @protips = @network.most_upvoted_protips(@per_page, @page) - @query = "sort:upvotes desc" - params[:sort] = 'upvotes' - elsif params[:sort] == 'new' - @protips = @network.new_protips(@per_page, @page) - @query = "sort:created_at desc" - elsif params[:filter] == 'featured' - @protips = @network.featured_protips(@per_page, @page) - @query = "sort:featured desc" - elsif params[:filter] == 'flagged' - ensure_admin! - @protips = @network.flagged_protips(@per_page, @page) - @query = "sort:flagged desc" - elsif params[:sort] == 'trending' - @protips = @network.highest_scored_protips(@per_page, @page, :trending_score) - @query = "sort:trending_score desc" - elsif params[:sort] == 'hn' - @protips = @network.highest_scored_protips(@per_page, @page, :trending_hn_score) - @query = "sort:trending_hn_score desc" - elsif params[:sort] == 'popular' - @protips = @network.highest_scored_protips(@per_page, @page, :popular_score) - @query = "sort:popular_score desc" - end - end - - def tag - redirect_to network_path(@network.slug) unless @network.nil? or params[:id] - @networks = [@network] unless @network.nil? - tags_array = params[:tags].nil? ? [] : params[:tags].split("/") - @query = "sort:score desc" - @protips = Protip.search_trending_by_topic_tags(@query, tags_array, @page, @per_page) - @topics = tags_array - @topic = tags_array.join(' + ') - @topic_user = nil - @networks = tags_array.collect { |tag| Network.networks_for_tag(tag) }.flatten.uniq if @networks.nil? - end - - def mayor - @protips = @network.mayor_protips(@per_page, @page) - render :show - end - - def expert - @protips = @network.expert_protips(@per_page, @page) - render :show - end - - def featured - featured_networks = Network.featured - if featured_networks.any? - @networks = featured_networks - else - @networks = Network.most_protips.first(7) - end - render :index - end - - def user - redirect_to_signup_if_unauthenticated(request.referer, "You must login/signup to view your networks") do - user = current_user - user = User.with_username(params[:username]) if is_admin? - @networks = user.networks - @user = user - @index_networks_params = params.permit(:sort, :action) - render :index - end - end - + #POST /n/:id/join(.:format) def join - redirect_to_signup_if_unauthenticated(request.referer, "You must login/signup to join a network") do + redirect_to_signup_if_unauthenticated(request.referer, 'You must login/signup to join a network') do return leave if current_user.member_of?(@network) current_user.join(@network) respond_to do |format| @@ -122,9 +30,10 @@ def join end end + # POST /n/:id/leave(.:format) def leave - redirect_to_signup_if_unauthenticated(request.referer, "You must login/signup to leave a network") do - return join if !current_user.member_of?(@network) + redirect_to_signup_if_unauthenticated(request.referer, 'You must login/signup to leave a network') do + return join unless current_user.member_of?(@network) current_user.leave(@network) respond_to do |format| format.js { render js: "$('.follow.#{@network.slug}').removeClass('followed')" } @@ -132,62 +41,19 @@ def leave end end - def destroy - @network.destroy - respond_to do |format| - format.json { head :ok } - end - end - - def add_tag - tag = params[:tag] - @network.tags << tag - - if @network.save - respond_to do |format| - format.html { redirect_to network_path(@network.slug) } - format.json { head :ok } - end - end - end - - def remove_tag - tag = params[:tag] - @network.tags = @network.tags.delete(tag) - - if @network.save - respond_to do |format| - format.html { redirect_to network_path(@network.slug) } - format.json { head :ok } - end - end - end - - def update_tags - tags = params[:tags][:tags] - @network.tags = tags.split(",").map(&:strip).select { |tag| Tag.exists?(name: tag) } - - if @network.save - respond_to do |format| - format.html { redirect_to network_path(@network.slug) } - format.json { head :ok } - end - end - end - - def current_mayor - @mayor = @network.try(:mayor) + def show end private + def lookup_network network_name = params[:id] || params[:tags] - @network = Network.find_by_slug(Network.slugify(network_name)) unless network_name.nil? - redirect_to networks_path if @network.nil? and params[:action] != 'tag' + @network = Network.find_by_slug(network_name.parameterize) unless network_name.nil? + redirect_to networks_path if @network.nil? && params[:action] != 'tag' end def limit_results - params[:per_page] = Protip::PAGESIZE if params[:per_page].nil? or (params[:per_page].to_i > Protip::PAGESIZE and !is_admin?) + params[:per_page] = Protip::PAGESIZE if params[:per_page].nil? || (params[:per_page].to_i > Protip::PAGESIZE && !is_admin?) end def set_search_params @@ -196,17 +62,9 @@ def set_search_params @per_page = params[:per_page] || 15 end - def featured_from_env - ENV['FEATURED_NETWORKS'].split(",").map(&:strip) unless ENV['FEATURED_NETWORKS'].nil? - end - - def ensure_admin! - redirect_to networks_path unless is_admin? - end - def redirect_to_search - tags = @network.try(:slug).try(:to_a) || (params[:tags] && params[:tags].split("/")) || [] - tags = tags.map { |tag| "##{tag}" }.join(" ") + tags = @network.try(:slug).try(:split) || (params[:tags] && params[:tags].split('/')) || [] + tags = tags.map { |tag| "##{tag}" }.join(' ') redirect_to protips_path(search: tags, show_all: params[:show_all]) end end diff --git a/app/controllers/opportunities_controller.rb b/app/controllers/opportunities_controller.rb index 03f7fff7..755b1b14 100644 --- a/app/controllers/opportunities_controller.rb +++ b/app/controllers/opportunities_controller.rb @@ -1,35 +1,39 @@ class OpportunitiesController < ApplicationController - before_filter :lookup_team, only: [:activate, :deactivate, :new, :create, :edit, :update, :visit] - before_filter :lookup_opportunity, only: [:edit, :update, :activate, :deactivate, :visit] - before_filter :cleanup_params_to_prevent_rocket_tag_error - before_filter :validate_permissions, only: [:new, :edit, :create, :update, :activate, :deactivate] - before_filter :verify_payment, only: [:new, :create] - before_filter :stringify_location, only: [:create, :update] - + before_action :lookup_team, only: [:activate, :deactivate, :new, :create, :edit, :update, :visit] + before_action :lookup_opportunity, only: [:edit, :update, :activate, :deactivate, :visit] + before_action :cleanup_params_to_prevent_tagging_error + before_action :validate_permissions, only: [:new, :edit, :create, :update, :activate, :deactivate] + before_action :verify_payment, only: [:new, :create] + before_action :stringify_location, only: [:create, :update] + + # POST /teams/:team_id/opportunities/:id/apply(.:format) def apply redirect_to_signup_if_unauthenticated(request.referer, "You must login/signup to apply for an opportunity") do job = Opportunity.find(params[:id]) if current_user.apply_to(job) - Notifier.new_applicant(current_user.username, job.id).deliver! + NotifierMailer.new_applicant(current_user.id, job.id).deliver! record_event('applied to job', job_public_id: job.public_id, 'job team' => job.team.slug) - end - respond_to do |format| - format.json { head :ok } + respond_to do |format| + format.html { redirect_to :back, notice: "Your resume has been submitted for this job!"} + format.json { head :ok } + end end end end + # GET /teams/:team_id/opportunities/new(.:format) def new - team_id = params.permit(:team_id)[:team_id] - @job = Opportunity.new(team_document_id: team_id) + team_id = params[:team_id] + @job = Opportunity.new(team_id: team_id) end + # GET /teams/:team_id/opportunities/:id/edit(.:format) def edit - end + # POST /teams/:team_id/opportunities(.:format) def create - opportunity_create_params = params.require(:opportunity).permit(:name, :team_document_id, :opportunity_type, :description, :tags, :location, :link, :salary, :apply) + opportunity_create_params = params.require(:opportunity).permit(:name, :team_id, :opportunity_type, :description, :tag_list, :location, :link, :salary, :apply, :remote) @job = Opportunity.new(opportunity_create_params) respond_to do |format| if @job.save @@ -41,8 +45,9 @@ def create end end + # PUT /teams/:team_id/opportunities/:id(.:format) def update - opportunity_update_params = params.require(:opportunity).permit(:id, :name, :team_document_id, :opportunity_type, :description, :tags, :location, :link, :salary, :apply) + opportunity_update_params = params.require(:opportunity).permit(:id, :name, :team_id, :opportunity_type, :description, :tag_list, :location, :link, :salary, :apply) respond_to do |format| if @job.update_attributes(opportunity_update_params) format.html { redirect_to teamname_path(@team.slug), notice: "#{@job.name} updated" } @@ -52,16 +57,19 @@ def update end end + # GET /teams/:team_id/opportunities/:id/activate(.:format) def activate @job.activate! header_ok end + # GET /teams/:team_id/opportunities/:id/deactivate(.:format) def deactivate @job.deactivate! header_ok end + # POST /teams/:team_id/opportunities/:id/visit(.:format) def visit unless is_admin? viewing_user.track_opportunity_view!(@job) if viewing_user @@ -69,39 +77,48 @@ def visit end header_ok end - + + # GET /jobs(/:location(/:skill))(.:format) def index current_user.seen(:jobs) if signed_in? - store_location! if !signed_in? + store_location! unless signed_in? chosen_location = (params[:location] || closest_to_user(current_user)).try(:titleize) - chosen_location = nil if chosen_location == "Worldwide" - @page = params[:page].try(:to_i) || 1 - tag = params[:skill].gsub(/\-/, ' ').downcase unless params[:skill].nil? - @jobs = get_jobs_for(chosen_location, tag, @page) - @jobs_left = @jobs.count - @jobs = @jobs.limit(20) - chosen_location = "Worldwide" if chosen_location.nil? - @locations = Rails.cache.fetch("job_locations_#{params[:location]}_#{params[:skill]}", expires_in: 1.hour) { Opportunity.by_tag(tag).map(&:locations).flatten.reject { |loc| loc == "Worldwide" }.push("Worldwide").uniq.compact } - @locations.delete(chosen_location) unless @locations.frozen? + chosen_location = nil if chosen_location == 'Worldwide' + @remote_allowed = params[:remote] == 'true' + + @page = params[:page].try(:to_i) || 1 + tag = params[:skill].gsub(/\-/, ' ').downcase unless params[:skill].nil? + + @jobs = get_jobs_for(chosen_location, tag, @page, params[:q], @remote_allowed) + @jobs_left = @jobs.count + @jobs = @jobs.limit(20) + + chosen_location = 'Worldwide' if chosen_location.nil? + @locations = Rails.cache.fetch("job_locations_#{params[:location]}_#{params[:skill]}", expires_in: 1.hour) do + Opportunity.by_tag(tag).flat_map(&:locations).reject { |loc| loc == "Worldwide" }.uniq.sort.compact + end + # @locations.delete(chosen_location) unless @locations.frozen? params[:location] = chosen_location - @lat, @lng = geocode_location(chosen_location) + @lat, @lng = geocode_location(chosen_location) respond_to do |format| - format.html { render layout: "jobs" } - format.json { render json: @jobs.map(&:to_public_hash).to_json } + format.html { render layout: 'coderwallv2' } + format.json { render json: @jobs.map(&:to_public_hash) } format.js end end + # GET /jobs-map(.:format) def map @job_locations = all_job_locations - @job_skills = all_job_skills + @job_skills = all_job_skills end private + def validate_permissions - redirect_to :back unless team_admin? + redirect_to(:back, flash:{error: 'This feature is available only for the team admin'}) unless team_admin? end def team_admin? @@ -122,10 +139,10 @@ def header_ok end end - def cleanup_params_to_prevent_rocket_tag_error - if params[:opportunity] && params[:opportunity][:tags] - params[:opportunity][:tags] = "#{params[:opportunity][:tags]}".split(',').map(&:strip).reject(&:empty?).join(",") - params[:opportunity][:tags] = nil if params[:opportunity][:tags].strip.blank? + def cleanup_params_to_prevent_tagging_error + if params[:opportunity] && params[:opportunity][:tag_list] + params[:opportunity][:tag_list] = "#{params[:opportunity][:tag_list]}".split(',').map(&:strip).reject(&:empty?).join(",") + params[:opportunity][:tag_list] = nil if params[:opportunity][:tag_list].strip.blank? end end @@ -138,11 +155,11 @@ def stringify_location end def all_job_locations - Rails.cache.fetch('job_locations', expires_in: 23.hours) { Opportunity.all.map(&:locations).flatten.push("Worldwide").uniq.compact } + Rails.cache.fetch('job_locations', expires_in: 23.hours) { Opportunity.all.flat_map(&:locations).push("Worldwide").uniq.compact } end def all_job_skills - Rails.cache.fetch('job_skills', expires_in: 23.hours) { Opportunity.all.map(&:tags).flatten.uniq.compact } + Rails.cache.fetch('job_skills', expires_in: 23.hours) { Opportunity.all.flat_map(&:tag_list).uniq.compact } end def closest_to_user(user) @@ -155,10 +172,21 @@ def geocode_location(location) Rails.cache.fetch("geocoded_location_of_#{location}") { User.where('LOWER(city) = ?', location.downcase).map { |u| [u.lat, u.lng] }.first || [0.0, 0.0] } end - def get_jobs_for(chosen_location, tag, page) + def get_jobs_for(chosen_location, tag, page, query = nil, remote_allowed = false) scope = Opportunity - scope = scope.by_city(chosen_location) unless chosen_location.nil? + + escaped_query = query.nil? ? query : Regexp.escape(query) + + if remote_allowed + scope = scope.where(remote: true) + else + scope = scope.by_city(chosen_location) if chosen_location && chosen_location.length > 0 + end + scope = scope.by_tag(tag) unless tag.nil? + scope = scope.by_query(escaped_query) if escaped_query + # TODO: Verify that there are no unmigrated teams + scope = scope.where('team_id is not null') scope.offset((page-1) * 20) end end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index c925bb66..363f30af 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -1,6 +1,12 @@ class PagesController < ApplicationController - + # GET /faq(.:format) + # GET /tos(.:format) + # GET /privacy_policy(.:format) + # GET /contact_us(.:format) + # GET /api(.:format) + # GET /achievements(.:format) + # GET /pages/:page(.:format) def show show_pages_params = params.permit(:page, :layout) @@ -13,7 +19,7 @@ def show # Checks whether the requested_page exists in app/views/pages/*.html.haml def whitelist_page(requested_page) - raise "Invalid page: #{requested_page}" unless ::STATIC_PAGES.include?(requested_page.to_s) + raise ActionController::RoutingError.new('Not Found') unless ::STATIC_PAGES.include?(requested_page.to_s) requested_page end @@ -21,7 +27,7 @@ def whitelist_page(requested_page) def whitelist_layout(requested_layout) return 'application' if requested_layout.nil? - raise "Invalid layout: #{requested_layout}" unless ::STATIC_PAGE_LAYOUTS.include?(requested_layout.to_s) + raise ActionController::RoutingError.new('Not Found') unless ::STATIC_PAGE_LAYOUTS.include?(requested_layout.to_s) requested_layout end diff --git a/app/controllers/pictures_controller.rb b/app/controllers/pictures_controller.rb index e585eda3..5b130f8d 100644 --- a/app/controllers/pictures_controller.rb +++ b/app/controllers/pictures_controller.rb @@ -1,6 +1,8 @@ class PicturesController < ApplicationController + + # POST /users/:user_id/pictures(.:format) def create - @picture = Picture.create!(file: params[:picture], user: current_user) - return render json: @picture.to_json + picture = current_user.create_picture(file: params[:picture]) + render json: picture end end \ No newline at end of file diff --git a/app/controllers/processing_queues_controller.rb b/app/controllers/processing_queues_controller.rb deleted file mode 100644 index ef5b8d6c..00000000 --- a/app/controllers/processing_queues_controller.rb +++ /dev/null @@ -1,34 +0,0 @@ -class ProcessingQueuesController < ApplicationController - before_filter :require_admin! - before_filter :lookup_queue, only: [:show, :dequeue] - - def index - @queues = ProcessingQueue.select('DISTINCT(queue)') - end - - def show - cleanup_deleted_items(@items) - @items.compact! - end - - def dequeue - @item = ProcessingQueue.queue(@queue).where(id: params[:item]).first - if @item.nil? - redirect_to :back - else - @item.dequeue - redirect_to processing_queue_path(@item.queue) - end - end - - private - - def lookup_queue - @items = ProcessingQueue.queue(params[:id]) - @queue = params[:id] - end - - def cleanup_deleted_items(items) - items.select { |item| item.queueable.nil? }.map(&:destroy) - end -end diff --git a/app/controllers/protips_controller.rb b/app/controllers/protips_controller.rb index bfcb0045..b17fd94e 100644 --- a/app/controllers/protips_controller.rb +++ b/app/controllers/protips_controller.rb @@ -1,16 +1,16 @@ class ProtipsController < ApplicationController - before_filter :access_required, only: [:new, :create, :edit, :update, :destroy, :me] - before_filter :require_skills_first, only: [:new, :create] - before_filter :lookup_protip, only: [:show, :edit, :update, :destroy, :upvote, :tag, :flag, :queue, :feature, :delete_tag] - before_filter :reformat_tags, only: [:create, :update] - before_filter :verify_ownership, only: [:edit, :update, :destroy] - before_filter :ensure_single_tag, only: [:subscribe, :unsubscribe] - before_filter :limit_results, only: [:topic, :team, :search, :user, :date] - before_filter :track_search, only: [:search], unless: :is_admin? - before_filter :require_admin!, only: [:queue, :feature, :flag, :delete_tag, :admin] - before_filter :determine_scope, only: [:trending, :popular, :fresh, :liked] - before_filter :lookup_user_data, only: [:trending, :popular, :fresh, :liked, :search] + before_action :access_required, only: [:new, :create, :edit, :update, :destroy, :me] + before_action :require_skills_first, only: [:new, :create] + before_action :lookup_protip, only: %i(show edit update destroy upvote tag flag feature delete_tag) + before_action :reformat_tags, only: [:create, :update] + before_action :verify_ownership, only: [:edit, :update, :destroy] + before_action :ensure_single_tag, only: [:subscribe, :unsubscribe] + before_action :limit_results, only: [:topic, :team, :search, :user, :date] + before_action :track_search, only: [:search], unless: :is_admin? + before_action :require_admin!, only: [:feature, :flag, :delete_tag, :admin] + before_action :determine_scope, only: [:trending, :popular, :fresh, :liked] + before_action :lookup_user_data, only: [:trending, :popular, :fresh, :liked, :search] respond_to :html respond_to :json, except: [:show] @@ -18,16 +18,13 @@ class ProtipsController < ApplicationController layout :choose_protip_layout + # root / + #GET /p(.:format) def index - if !params[:search].blank? - search - elsif signed_in? - trending - else - return redirect_to welcome_url - end + trending end + # GET /p/t/trending(.:format) def trending @context = "trending" track_discovery @@ -36,6 +33,7 @@ def trending render :index end + # GET /p/popular(.:format) def popular @context = "popular" track_discovery @@ -44,6 +42,7 @@ def popular render :index end + # GET /p/fresh(.:format) def fresh redirect_to_signup_if_unauthenticated(protips_path, "You must login/signup to view fresh protips from coders, teams and networks you follow") do @context = "fresh" @@ -54,6 +53,7 @@ def fresh end end + # GET /p/liked(.:format) def liked redirect_to_signup_if_unauthenticated(protips_path, "You must login/signup to view protips you have liked/upvoted") do @context = "liked" @@ -64,23 +64,13 @@ def liked end end - def topic - topic_params = params.permit(:tags, :page, :per_page) - - return redirect_to(protips_path) if topic_params[:tags].blank? - tags_array = topic_params[:tags].split("/") - @protips = Protip.search_trending_by_topic_tags(nil, tags_array, topic_params[:page], topic_params[:per_page]) - @topics = tags_array.collect { |topic| "<span class='topic-tag' style='border-color:##{topic.to_hex};'>##{topic}</span>" } - @topic = tags_array.join(' + ') - @topic_user = nil - end - + # GET /p/u/:username(.:format) def user user_params = params.permit(:username, :page, :per_page) - user = User.with_username(params[:username]) unless params[:username].blank? + user = User.find_by_username(params[:username]) unless params[:username].blank? return redirect_to(protips_path) if user.nil? - @protips = Protip.search_trending_by_user(user_params[:username], nil, [], user_params[:page], user_params[:per_page]) + @protips = protips_for_user(user,user_params) @topics = [user.username] @topic = "author:#{user.username}" @topic_user = user @@ -88,6 +78,7 @@ def user render :topic end + # GET /p/team/:team_slug(.:format) def team team_params = params.permit(:team_slug, :page, :per_page) @@ -100,6 +91,7 @@ def team render :topic end + # GET /p/d/:date(/:start)(.:format) def date date_params = params.permit(:date, :query, :page, :per_page) @@ -115,6 +107,7 @@ def date render :topic end + # GET /p/me(.:format) def me me_params = params.permit(:section, :page, :per_page) @@ -125,6 +118,9 @@ def me @topic_user = nil end + # GET /p/dpvbbg(.:format) + # GET /gh(.:format) + # GET /p/:id/:slug(.:format) def show show_params = if is_admin? params.permit(:reply_to, :q, :t, :i, :p) @@ -133,6 +129,8 @@ def show end return redirect_to protip_missing_destination, notice: "The pro tip you were looking for no longer exists" if @protip.nil? + return redirect_to protip_path(@protip.public_id<<'/'<<@protip.friendly_id, :p => params[:p], :q => params[:q]) if params[:slug]!=@protip.friendly_id + @comments = @protip.comments @reply_to = show_params[:reply_to] @next_protip = Protip.search_next(show_params[:q], show_params[:t], show_params[:i], show_params[:p]) if is_admin? @@ -142,33 +140,36 @@ def show respond_with @protip end + # GET /p/random(.:format) def random @protip = Protip.random(1).first render :show end + # GET /p/new(.:format) def new - new_params = params.permit(:topics) + new_params = params.permit(:topic_list) - prefilled_topics = (new_params[:topics] || '').split('+').collect(&:strip) - @protip = Protip.new(topics: prefilled_topics) + prefilled_topics = (new_params[:topic_list] || '').split('+').collect(&:strip) + @protip = Protip.new(topic_list: prefilled_topics) respond_with @protip end + # GET /p/:id/edit(.:format) def edit respond_with @protip end + # POST /p(.:format) def create create_params = if params[:protip] && params[:protip].keys.present? - params.require(:protip).permit(:title, :body, :user_id, topics: []) + params.require(:protip).permit(:title, :body, :user_id, :topic_list) else {} end - @protip = Protip.new(create_params) - @protip.user = current_user + @protip = current_user.protips.build(create_params) respond_to do |format| if @protip.save record_event('created protip') @@ -181,10 +182,11 @@ def create end end + # protips_update GET|PUT /protips/update(.:format) protips#update def update # strong_parameters will intentionally fail if a key is present but has an empty hash. :( update_params = if params[:protip] && params[:protip].keys.present? - params.require(:protip).permit(:title, :body, :user_id, topics: []) + params.require(:protip).permit(:title, :body, :user_id, :topic_list) else {} end @@ -205,35 +207,27 @@ def update end def destroy - return head(:forbidden) unless @protip.try(:owned_by?, current_user) || current_user.admin? + return head(:forbidden) unless @protip.owned_by?(current_user) @protip.destroy respond_to do |format| - format.html { - if request.referer.blank? - redirect_to protips_url - else - - if request.referer.include?(@protip.public_id) - redirect_to protips_url - else - redirect_to request.referer - end - end - } + format.html { redirect_to(protips_url) } format.json { head :ok } end end + # POST /p/:id/upvote(.:format) def upvote @protip.upvote_by(viewing_user, tracking_code, request.remote_ip) @protip end + # POST /p/:id/tag(.:format) def tag - tag_params = params.permit(:topics) - @protip.topics << tag_params[:topics] unless tag_params[:topics].nil? + tag_params = params.permit(:topic_list) + @protip.topic_list.add(tag_params[:topic_list]) unless tag_params[:topic_list].nil? end + # PUT /p/t(/*tags)/subscribe(.:format) def subscribe tags = params.permit(:tags) redirect_to_signup_if_unauthenticated(view_context.topic_protips_path(tags)) do @@ -244,6 +238,7 @@ def subscribe end end + # PUT /p/t(/*tags)/unsubscribe(.:format) def unsubscribe tags = params.permit(:tags) redirect_to_signup_if_unauthenticated(view_context.topic_protips_path(tags)) do @@ -254,33 +249,28 @@ def unsubscribe end end + # POST /p/:id/report_inappropriate(.:format) def report_inappropriate - - report_inappropriate_params = params.permit(:id) - - - protip_public_id = params.permit(:id) - - logger.info "Report Inappropriate: protip_public_id => '#{protip_public_id}', reporting_user => '#{viewing_user.inspect}', ip_address => '#{request.remote_ip}'" - - if cookies["report_inappropriate-#{protip_public_id}"].nil? - opts = { reporting_user: viewing_user, ip_address: request.remote_ip, protip_public_id: protip_public_id } - report_inappropriate_mailer = ::Abuse.report_inappropriate(opts) - report_inappropriate_mailer.deliver + protip_public_id = params[:id] + protip = Protip.find_by_public_id!(protip_public_id) + if protip.report_spam && cookies["report_inappropriate-#{protip_public_id}"].nil? + opts = { user_id: current_user, ip: request.remote_ip} + ::AbuseMailer.report_inappropriate(protip_public_id,opts).deliver cookies["report_inappropriate-#{protip_public_id}"] = true - end - - respond_to do |format| - format.json { head :ok } + render json: {flagged: true} + else + render json: {flagged: false} end end + # POST /p/:id/flag(.:format) def flag - times_to_flag = is_admin? ? Protip::MIN_FLAG_THRESHOLD : 1 + times_to_flag = is_moderator? ? Protip::MIN_FLAG_THRESHOLD : 1 times_to_flag.times do @protip.flag end + @protip.mark_as_spam respond_to do |format| if @protip.save format.json { head :ok } @@ -291,7 +281,7 @@ def flag end def unflag - times_to_flag = is_admin? ? Protip::MIN_FLAG_THRESHOLD : 1 + times_to_flag = is_moderator? ? Protip::MIN_FLAG_THRESHOLD : 1 times_to_flag.times do @protip.unflag end @@ -304,7 +294,9 @@ def unflag end end + # POST /p/:id/feature(.:format) def feature + #TODO change with @protip.toggle_featured_state! if @protip.featured? @protip.unfeature! else @@ -320,30 +312,9 @@ def feature end end - def queue - queue = params.permit(:queue) - - respond_to do |format| - if @protip && queue - if ProcessingQueue.queued?(@protip, queue) - ProcessingQueue.unqueue(@protip, queue) - else - queue_entry = ProcessingQueue.enqueue(@protip, queue) - end - else - queue_entry = nil - end - - if queue_entry.nil? - format.json { render status: :unprocessable_entity } - else - format.json { head :ok } - end - end - end - + #POST /p/:id/delete_tag/:topic(.:format) protips#delete_tag {:topic=>/[A-Za-z0-9#\$\+\-_\.(%23)(%24)(%2B)]+/} def delete_tag - @protip.topics.delete(CGI.unescape(params.permit(:topic))) + @protip.topic_list.remove(params.permit(:topic)) respond_to do |format| if @protip.save format.html { redirect_to protip_path(@protip) } @@ -355,6 +326,7 @@ def delete_tag end end + # GET /p/admin(.:format) def admin admin_params = params.permit(:page, :per_page) @@ -364,19 +336,21 @@ def admin render :topic end + # GET /p/t/by_tags(.:format) def by_tags by_tags_params = params.permit(:page, :per_page) page = by_tags_params[:page] || 1 per_page = by_tags_params[:per_page] || 100 - @tags = Tag.joins("inner join taggings on taggings.tag_id = tags.id").group('tags.id').order('count(tag_id) desc').page(page).per(per_page) + @tags = ActsAsTaggableOn::Tag.joins('inner join taggings on taggings.tag_id = tags.id').group('tags.id').order('count(tag_id) desc').page(page).per(per_page) end + # POST /p/preview(.:format) def preview preview_params = params.require(:protip).permit(:title, :body) - preview_params.delete(:topics) if preview_params[:topics].blank? + preview_params.delete(:topic_list) if preview_params[:topic_list].blank? protip = Protip.new(preview_params) protip.updated_at = protip.created_at = Time.now protip.user = current_user @@ -385,6 +359,7 @@ def preview render partial: 'protip', locals: { protip: protip, mode: 'preview', include_comments: false, job: nil } end + # POST - GET /p/search(.:format) def search search_params = params.permit(:search) @@ -407,6 +382,17 @@ def search private + # Return protips for a user + # If the user is banned, grab protips from their association + # because the tip will have been removed from the search index. + # + # @param [ Hash ] params - Should contain :page and :per_page key/values + def protips_for_user(user,params) + if user.banned? then user.protips.page(params[:page]).per(params[:per_page]) + else Protip.search_trending_by_user(user.username, nil, [], params[:page], params[:per_page]) + end + end + def expand_query(query_string) scopes = [] query = query_string.nil? ? '' : query_string.dup @@ -419,13 +405,13 @@ def expand_query(query_string) end def lookup_protip - @protip = Protip.find_by_public_id(params.permit(:id)[:id].downcase) + @protip = Protip.find_by_public_id!(params[:id]) end def choose_protip_layout - if [:show, :random, :new, :edit, :create, :update].include? action_name.to_sym + if [:show, :random, :new, :edit, :create, :update].include?(action_name.to_sym) 'protip' - elsif [:subscribe, :unsubscribe].include? action_name.to_sym + elsif [:subscribe, :unsubscribe].include?(action_name.to_sym) false else 'application' @@ -437,7 +423,8 @@ def search_options { page: (signed_in? && search_options_params[:page].try(:to_i)) || 1, - per_page: [(signed_in? && search_options_params[:per_page].try(:to_i)) || 18, Protip::PAGESIZE].min + per_page: [(signed_in? && search_options_params[:per_page].try(:to_i)) || 18, Protip::PAGESIZE].min, + load: { include: [:user, :likes, :protip_links, :comments] } } end @@ -534,7 +521,7 @@ def suggested_networks @protips.facets['suggested-networks']['terms'].map { |h| h['term'] } else #gets top 10 tags for the protips and picks up associated networks - Network.tagged_with(@protips.map(&:tags).flatten.reduce(Hash.new(0)) { |h, t| h[t] += 1; h }.sort_by { |k, v| -v }.first(10).flatten.values_at(*(0..20).step(2))).select(:slug).limit(4).map(&:slug) + Network.tagged_with(@protips.flat_map(&:tags).reduce(Hash.new(0)) { |h, t| h[t] += 1; h }.sort_by { |k, v| -v }.first(10).flatten.values_at(*(0..20).step(2))).limit(4).pluck(:slug) end end @@ -542,7 +529,7 @@ def find_a_job_for(protips) return Opportunity.random.first unless protips.present? topics = get_topics_from_protips(protips) - @job = Opportunity.based_on(topics).to_a.sample || Opportunity.random.first + @job = ::Opportunity.based_on(topics).to_a.sample || Opportunity.random.first end def top_tags_facet @@ -554,7 +541,7 @@ def get_topics_from_protips(protips) topics = protips.facets['top-tags']['terms'].map { |h| h['term'] } end - topics = protips.map(&:tags).flatten.uniq.first(8) if topics.blank? && protips.present? + topics = protips.flat_map(&:tags).uniq.first(8) if topics.blank? && protips.present? topics end diff --git a/app/controllers/provider_user_lookups_controller.rb b/app/controllers/provider_user_lookups_controller.rb new file mode 100644 index 00000000..afbbde7b --- /dev/null +++ b/app/controllers/provider_user_lookups_controller.rb @@ -0,0 +1,12 @@ +class ProviderUserLookupsController < ApplicationController + + # GET /providers/:provider/:username(.:format) + def show + service = ProviderUserLookupService.new params[:provider], params[:username] + if user = service.lookup_user + redirect_to badge_path(user.username) + else + redirect_to root_path, flash: { notice: 'User not found' } + end + end +end diff --git a/app/controllers/redemptions_controller.rb b/app/controllers/redemptions_controller.rb deleted file mode 100644 index 72fecb47..00000000 --- a/app/controllers/redemptions_controller.rb +++ /dev/null @@ -1,20 +0,0 @@ -class RedemptionsController < ApplicationController - def show - if @redemption = Redemption.for_code(params[:code]) - if signed_in? - @redemption.award!(current_user) - if current_user.pending? - current_user.activate! - Notifier.welcome_email(current_user.username).deliver - Resque.enqueue(RefreshUser, current_user.username) - end - redirect_to(destination_url) - else - store_location! - end - else - flash[:notice] = "#{params[:code]} is an invalid code." - redirect_to root_url - end - end -end diff --git a/app/controllers/resume_uploads_controller.rb b/app/controllers/resume_uploads_controller.rb new file mode 100644 index 00000000..7f5b9899 --- /dev/null +++ b/app/controllers/resume_uploads_controller.rb @@ -0,0 +1,28 @@ +class ResumeUploadsController < ApplicationController + + before_action :access_required + + # POST /resume_uploads + # Non standard resource controller + # Expected params: + # @param [ String|Integer ] user_id - User id to attach resume + # @param [ File ] resume - Resume file uploaded via file field + def create + user = User.find params[:user_id] + user.resume = params[:resume] + + if user.save! + respond_to do |format| + format.html { redirect_to :back, notice: "Your resume has been uploaded." } + format.js { head :ok } + end + else + respond_to do |format| + format.html { redirect_to :back, notice: "There was an error uploading your resume." } + format.js { head :unprocessable_entity } + end + end + + end + +end diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index c9ab0af5..f4a80feb 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,30 +1,38 @@ class SessionsController < ApplicationController - skip_before_filter :require_registration + skip_before_action :require_registration + # GET /sessions/new(.:format) def new - return redirect_to destination_url if signed_in? + #FIXME + redirect_to destination_url if signed_in? end + # GET /signin(.:format) def signin + #FIXME return redirect_to destination_url if signed_in? store_location!(params[:return_to]) unless params[:return_to].nil? end + # GET /sessions/force(.:format) def force - head(:forbidden) unless Rails.env.test? || Rails.env.development? || current_user.admin? + #REMOVEME + head(:forbidden) unless Rails.env.development? || current_user.admin? sign_out - sign_in(@user = User.with_username(params[:username])) - return redirect_to(badge_url(username: params[:username])) + user = params[:id].present? ? User.find(params[:id]) : User.find_by_username(params[:username]) + sign_in(user) + redirect_to(root_url) end + # GET|POST /auth/:provider/callback(.:format) def create - Rails.logger.debug "Authenticating: #{oauth}" + #FIXME raise "OmniAuth returned error #{params[:error]}" unless params[:error].blank? if signed_in? current_user.apply_oauth(oauth) current_user.save! flash[:notice] = "#{oauth[:provider].humanize} account linked" - redirect_to(destination_url) + redirect_to(edit_user_url(current_user)) else @user = User.find_with_oauth(oauth) if @user && !@user.new_record? @@ -38,28 +46,27 @@ def create end rescue Faraday::Error::ConnectionFailed => ex Rails.logger.error("Faraday::Error::ConnectionFailed => #{ex.message}, #{ex.inspect}") - notify_honeybadger(ex) if Rails.env.production? record_event("error", message: "attempt to reuse a linked account") flash[:error] = "Error linking #{oauth[:info][:nickname]} because it is already associated with a different member." redirect_to(root_url) rescue ActiveRecord::RecordNotUnique => ex - notify_honeybadger(ex) if Rails.env.production? record_event("error", message: "attempt to reuse a linked account") flash[:error] = "Error linking #{oauth[:info] && oauth[:info][:nickname]} because it is already associated with a different member." redirect_to(root_url) rescue Exception => ex Rails.logger.error("Failed to link account because #{ex.message} => '#{oauth}'") - notify_honeybadger(ex) if Rails.env.production? record_event("error", message: "signup failure") flash[:notice] = "Looks like something went wrong. Please try again." redirect_to(root_url) end + # DELETE /sessions/:id(.:format) def destroy sign_out redirect_to(root_url) end + # GET /auth/failure(.:format) def failure flash[:error] = "Authenication error: #{params[:message].humanize}" unless params[:message].nil? render action: :new @@ -68,6 +75,7 @@ def failure protected def oauth + #FIXME @oauth ||= request.env["omniauth.auth"].with_indifferent_access if request.env["omniauth.auth"] end end diff --git a/app/controllers/skills_controller.rb b/app/controllers/skills_controller.rb index 2550aab9..98f9f394 100644 --- a/app/controllers/skills_controller.rb +++ b/app/controllers/skills_controller.rb @@ -1,5 +1,6 @@ class SkillsController < ApplicationController + # POST /users/:user_id/skills(.:format) def create @user = (params[:user_id] && User.find(params[:user_id])) || current_user return head(:forbidden) unless current_user == @user @@ -24,6 +25,7 @@ def create redirect_to(badge_url(username: @user.username)) end + # DELETE /users/:user_id/skills/:id(.:format) def destroy redirect_to_signup_if_unauthenticated do @skill = current_user.skills.find(params[:id]) diff --git a/app/controllers/team_members_controller.rb b/app/controllers/team_members_controller.rb deleted file mode 100644 index 51eb0393..00000000 --- a/app/controllers/team_members_controller.rb +++ /dev/null @@ -1,33 +0,0 @@ -class TeamMembersController < ApplicationController - - def destroy - @user = User.find(params[:id]) - return head(:forbidden) unless signed_in? && (team.admin?(current_user) || current_user == @user) - team.remove_user(@user) - record_event("removed team") if !Team.where(id: team.id.to_s).exists? - - if @user == current_user - flash[:notice] = "Ok, we've removed you from #{team.name}." - record_event("removed themselves from team") - return redirect_to(teams_url) - else - record_event("removed user from team") - respond_to do |format| - format.js {} - format.html { redirect_to(teamname_url(slug: team.slug)) } - end - end - end - - private - def team - @team ||= Team.find(params[:team_id]) - end - - def is_email_address?(value) - m = Mail::Address.new(value) - r = m.domain && m.address == value - t = m.__send__(:tree) - r &&= (t.domain.dot_atom_text.elements.size > 1) - end -end \ No newline at end of file diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index 25b41239..9b0ca740 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -1,104 +1,106 @@ class TeamsController < ApplicationController - skip_before_filter :require_registration, :only => [:accept, :record_exit] - before_filter :access_required, :except => [:index, :leaderboard, :show, :new, :upgrade, :inquiry, :search, :create, :record_exit] - before_filter :ensure_analytics_access, :only => [:visitors] + skip_before_action :require_registration, :only => [:accept, :record_exit] + before_action :access_required, :except => [:index, :show, :new, :inquiry, :search, :create, :record_exit] + before_action :ensure_analytics_access, :only => [:visitors] respond_to :js, :only => [:search, :create, :approve_join, :deny_join] respond_to :json, :only => [:search] + # GET /teams(.:format) def index current_user.seen(:teams) if signed_in? - @featured_teams = Rails.cache.fetch(Team::FEATURED_TEAMS_CACHE_KEY, :expires_in => 4.hours) do - Team.featured.sort_by(&:relevancy).reject { |team| team.jobs.count == 0 }.reverse! - end + #@featured_teams = Rails.cache.fetch(Team::FEATURED_TEAMS_CACHE_KEY, expires_in: 4.hours) do + @featured_teams = Team.featured.sort_by(&:relevancy).reject do |team| + team.jobs.count == 0 + end.reverse! + #end @teams = [] end - def leaderboard - leaderboard_params = params.permit(:refresh, :page, :rank, :country) - - @options = { :expires_in => 1.hour } - @options[:force] = true if !leaderboard_params[:refresh].blank? - if signed_in? - leaderboard_params[:page] = 1 if leaderboard_params[:page].to_i == 0 - leaderboard_params[:page] = page_based_on_rank(leaderboard_params[:rank].to_i) unless params[:rank].nil? - @teams = Team.top(leaderboard_params[:page].to_i, 25) - return redirect_to(leaderboard_url) if @teams.empty? - else - @teams = Team.top(1, 10, leaderboard_params[:country]) - end - respond_to do |format| - format.html - format.json do - render :json => @teams.map(&:public_hash).to_json - end - end - end - + # GET /teams/followed(.:format) def followed @teams = current_user.teams_being_followed end + # GET /team/:slug(/:job_id)(.:format) + # GET /team/:slug(.:format) def show + #FIXME show_params = params.permit(:job_id, :refresh, :callback, :id, :slug) + @team ||= team_from_params(slug: show_params[:slug], id: show_params[:id]) + return render_404 unless @team respond_to do |format| format.html do - @team = team_from_params(slug: show_params[:slug], id: show_params[:id]) - return render_404 if @team.nil? + @team_protips = @team.trending_protips(4) @query = "team:#{@team.slug}" viewing_user.track_team_view!(@team) if viewing_user @team.viewed_by(viewing_user || session_id) unless is_admin? - @job = show_params[:job_id].nil? ? @team.jobs.sample : Opportunity.with_public_id(show_params[:job_id]) + @job = show_params[:job_id].nil? ? @team.jobs.sample : Opportunity.find_by_public_id(show_params[:job_id]) + @other_jobs = @team.jobs.reject { |job| job.id == @job.id } unless @job.nil? + @job_page = !@job.nil? return render(:premium) if show_premium_page? end + format.json do options = { :expires_in => 5.minutes } options[:force] = true if !show_params[:refresh].blank? response = Rails.cache.fetch(['v1', 'team', show_params[:id], :json], options) do - begin - @team = team_from_params(slug: show_params[:slug], id: show_params[:id]) @team.public_json - rescue Mongoid::Errors::DocumentNotFound - return head(:not_found) - end end response = "#{show_params[:callback]}({\"data\":#{response}})" if show_params[:callback] render :json => response end end - rescue BSON::InvalidObjectId - redirect_to teamname_url(:slug => params[:id]) end + # GET /teams/new(.:format) def new return redirect_to employers_path end + # POST /teams(.:format) def create - create_params = params.require(:team).permit(:selected, :slug, :name) + team_params = params.require(:team).permit(:name, :slug, :show_similar, :join_team) + team_name = team_params.fetch(:name, '') - @team, confirmed = selected_or_new(create_params) - @teams = Team.any_of({ :name => /#{team_to_regex(@team)}.*/i }).limit(3).to_a unless confirmed + @teams = Team.with_similar_names(team_name) + if team_params[:show_similar] == 'true' && !@teams.empty? + @new_team_name = team_name + render 'similar_teams' and return + end - if @team.valid? and @teams.blank? and @team.new_record? - @team.add_user(current_user) - @team.edited_by(current_user) - @team.save + if team_params[:join_team] == 'true' + @team = Team.where(slug: team_params[:slug]).first + render :create and return + end + + @team = Team.new(name: team_name) + if @team.save record_event('created team') + @team.add_user(current_user, 'active', 'admin') + + flash.now[:notice] = "Successfully created a team #{@team.name}" + else + message = @team.errors.full_messages.join("\n") + flash[:error] = "There was an error in creating a team #{@team.name}\n#{message}" end end - def edit - edit_params = params.permit(:slug, :id) + #def team_to_regex(team) + #team.name.gsub(/ \-\./, '.*') + #end - @team = team_from_params(slug: edit_params[:slug], id: edit_params[:id]) + # GET /team/:slug/edit(.:format) + def edit + @team = Team.find_by_slug(params[:slug]) return head(:forbidden) unless current_user.belongs_to_team?(@team) || current_user.admin? @edit_mode = true show end + # PUT /teams/:id(.:format) teams#update def update update_params = params.permit(:id, :_id, :job_id, :slug) update_team_params = params.require(:team).permit! @@ -110,11 +112,11 @@ def update update_team_params.delete(:_id) @team.update_attributes(update_team_params) @edit_mode = true - @team.edited_by(current_user) + # @team.edited_by(current_user) @job = if update_params[:job_id].nil? @team.jobs.sample else - Opportunity.with_public_id(update_params[:job_id]) + Opportunity.find_by_public_id(update_params[:job_id]) end if @team.save @@ -125,35 +127,38 @@ def update else respond_with do |format| format.html { render(:action => :edit) } - format.js { render(:json => { errors: @team.errors.full_messages }.to_json, :status => :unprocessable_entity) } + #FIXME + format.js { render(json: {errors: @team.errors.full_messages} , status: :unprocessable_entity) } end end end + # POST /teams/:id/follow(.:format) def follow - apply_cache_buster + # TODO move to concern + @team = if params[:id].present? && (params[:id].to_i rescue nil) + Team.find(params[:id].to_i) + else + Team.where(slug: params[:id]).first + end - follow_params = params.permit(:id) - - @team = Team.find(follow_params[:id]) if current_user.following_team?(@team) current_user.unfollow_team!(@team) else current_user.follow_team!(@team) end respond_to do |format| - format.json { render :json => { :team_id => dom_id(@team), :following => current_user.following_team?(@team) }.to_json } - format.js { render :json => { :team_id => dom_id(@team), :following => current_user.following_team?(@team) }.to_json } - format.html { redirect_to(leaderboard_url + "##{dom_id(@team)}") } + format.json { render json: { dom_id: dom_id(@team), following: current_user.following_team?(@team) } } + format.js { render json: { dom_id: dom_id(@team), following: current_user.following_team?(@team) } } end end + # GET /employers(.:format) def upgrade upgrade_params = params.permit(:discount) - current_user.seen(:product_description) if signed_in? - @team = (current_user && current_user.team) || Team.new - store_location! if !signed_in? + current_user.seen(:product_description) + @team = current_user.membership.try(:team) || Team.new if upgrade_params[:discount] == ENV['DISCOUNT_TOKEN'] session[:discount] = ENV['DISCOUNT_TOKEN'] @@ -161,15 +166,17 @@ def upgrade render :layout => 'product_description' end + # POST /teams/inquiry(.:format) def inquiry inquiry_params = params.permit(:email, :company) current_user.seen(:inquired) if signed_in? record_event('inquired about team page') - Notifier.new_lead(current_user.try(:username), inquiry_params[:email], inquiry_params[:company]).deliver + NotifierMailer.new_lead(current_user.try(:username), inquiry_params[:email], inquiry_params[:company]).deliver render :layout => 'product_description' end + # GET /teams/:id/accept(.:format) def accept apply_cache_buster @@ -177,7 +184,7 @@ def accept @team = Team.find(accept_params[:id]) if accept_params[:r] && @team.has_user_with_referral_token?(accept_params[:r]) - @team.add_user(current_user) + @team.add_member(current_user, 'active') current_user.update_attribute(:referred_by, accept_params[:r]) if current_user.referred_by.nil? flash[:notice] = "Welcome to team #{@team.name}" record_event("accepted team invite") @@ -194,6 +201,7 @@ def accept redirect_to teamname_url(:slug => current_user.reload.team.slug) end + # GET /teams/search(.:format) def search search_params = params.permit(:q, :country, :page) @@ -201,6 +209,7 @@ def search respond_with @teams end + # POST /teams/:id/record-exit(.:format) def record_exit record_exit_params = params.permit(:id, :exit_url, :exit_target_type, :furthest_scrolled, :time_spent) @@ -211,17 +220,18 @@ def record_exit render :nothing => true end + # GET /teams/:id/visitors(.:format) def visitors since = is_admin? ? 0 : 2.weeks.ago.to_i full = is_admin? && params[:full] == 'true' @visitors = @team.aggregate_visitors(since).reject { |visitor| visitor[:user] && @team.on_team?(visitor[:user]) } - @visitors = fake_visitors if @visitors.blank? && Rails.env.development? @visitors = @visitors.first(75) if !is_admin? || !full @views = @team.total_views @impressions = @team.impressions render :analytics unless full end + # POST /teams/:id/join(.:format) def join join_params = params.permit(:id) @@ -233,6 +243,7 @@ def join end end + # POST /teams/:id/join/:user_id/approve(.:format) def approve_join approve_join_params = params.permit(:id, :user_id) @@ -243,6 +254,7 @@ def approve_join render :join_response end + # POST /teams/:id/join/:user_id/deny(.:format) def deny_join deny_join_params = params.permit(:id, :user_id) @@ -255,25 +267,24 @@ def deny_join protected - def fake_visitors - v = [] - 5.times do - user = User.uncached do - User.random(1).first + def team_from_params(opts) + if opts[:slug].present? + Team.where(slug: opts[:slug].downcase).first + else + if valid_id?(opts[:id]) + Team.find(opts[:id]) + else + nil end - v << { :exit_url => "http://heroku.com", :exit_target_type => "company-website", :furthest_scrolled => "challenges", :time_spent => "2016", :user_id => 1736, :visited_at => 1346913596, :user => user, :visits => 3 } end - v end - def team_from_params(opts) - return Team.where(slug: opts[:slug].downcase).first unless opts[:slug].blank? - - Team.find(opts[:id]) + def valid_id?(id) + id.to_i.to_s == id && id.to_i < 2147483647 end def replace_section(section_name) - section_name = section_name.gsub('-', '_') + section_name = section_name.tr('-', '_') "$('##{section_name}').replaceWith('#{escape_javascript(render(:partial => section_name))}');" end @@ -295,36 +306,19 @@ def page_based_on_rank(rank) end def job_public_ids - Rails.cache.fetch('all-jobs-public-ids', :expires_in => 1.hour) { Opportunity.select(:public_id).group('team_document_id, created_at, public_id').map(&:public_id) } + Rails.cache.fetch('all-jobs-public-ids', :expires_in => 1.hour) { Opportunity.group('team_id, created_at, public_id').pluck(:public_id) } end def next_job(job) jobs = job_public_ids public_id = job && jobs[(jobs.index(job.public_id) || -1)+1] - Opportunity.with_public_id(public_id) unless public_id.nil? + Opportunity.find_by_public_id(public_id) unless public_id.nil? end def previous_job(job) jobs = job_public_ids public_id = job && jobs[(jobs.index(job.public_id) || +1)-1] - Opportunity.with_public_id(public_id) unless public_id.nil? - end - - def team_to_regex(team) - team.name.gsub(/ \-\./, '.*') - end - - def selected_or_new(opts) - team = Team.new(name: opts[:name]) - confirm = false - - if opts[:selected] - if opts[:selected] == "true" - team = Team.where(:slug => opts[:slug]).first - end - confirm = true - end - [team, confirm] + Opportunity.find_by_public_id(public_id) unless public_id.nil? end def ensure_analytics_access diff --git a/app/controllers/unbans_controller.rb b/app/controllers/unbans_controller.rb new file mode 100644 index 00000000..e80fb414 --- /dev/null +++ b/app/controllers/unbans_controller.rb @@ -0,0 +1,17 @@ +class UnbansController < BaseAdminController + + # POST /users/:user_id/unbans(.:format) + def create + ban_params = params.permit(:user_id) + user = User.find(ban_params[:user_id]) + return redirect_to(badge_url(username: user.username), notice: 'User is not banned.') unless user.banned? + + flash_notice = if UserBannerService.unban(user) + IndexUserProtipsService.run(user) + 'Ban removed from user.' + else + 'Ban could not be removed from user.' + end + redirect_to(badge_url(username: user.username), notice: flash_notice) + end +end diff --git a/app/controllers/usernames_controller.rb b/app/controllers/usernames_controller.rb index 519b79a0..6f41e3b7 100644 --- a/app/controllers/usernames_controller.rb +++ b/app/controllers/usernames_controller.rb @@ -1,11 +1,23 @@ class UsernamesController < ApplicationController - skip_before_filter :require_registration + skip_before_action :require_registration + # GET /usernames(.:format) + def index + # returns nothing if validation is run agains empty params[:id] + render nothing: true + end + # TODO: Clean up the config/routes for /usernames + # There is no UsernamesController#index for example. Why is there a route? + + # GET /usernames/:id(.:format) def show - if User.with_username(params[:id]) || User::RESERVED.include?(params[:id].downcase) + # allow validation to pass if it's the user's username that they're trying to validate (for edit username) + if signed_in? && current_user.username.downcase == params[:id].downcase + head :ok + elsif User.find_by_username(params[:id]) || User::RESERVED.include?(params[:id].downcase) head :forbidden else head :ok end end -end \ No newline at end of file +end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index f21f6b03..55e54653 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,7 +1,10 @@ class UsersController < ApplicationController - after_filter :track_referrer, only: :show - skip_before_filter :require_registration, only: [:edit, :update] + after_action :track_referrer, only: :show + skip_before_action :require_registration, only: [:edit, :update] + layout 'coderwallv2', only: :edit + + # GET /users/new(.:format) def new return redirect_to(destination_url) if signed_in? return redirect_to(new_session_url) if oauth.blank? @@ -9,17 +12,21 @@ def new @user = User.for_omniauth(oauth) end + # GET /github/:username(.:format) + # GET /twitter/:username(.:format) + # GET /forrst/:username(.:format) + # GET /dribbble/:username(.:format) + # GET /linkedin/:username(.:format) + # GET /codeplex/:username(.:format) + # GET /bitbucket/:username(.:format) + # GET /stackoverflow/:username(.:format) + # GET /:username(.:format) + # GET /users/:id(.:format) def show - @user = User.with_username(user_show_params[:username]) + @user = User.find_by_username!(params[:username]) respond_to do |format| format.html do - raise ActiveRecord::RecordNotFound if @user.nil? - - if Rails.env.development? - @user.migrate_to_skills! if @user.skills.empty? - end - @user.skills = Skill.where(user_id: @user.id).order('weight DESC') if viewing_user && viewing_user == @user @@ -30,7 +37,7 @@ def show @user.viewed_by(viewing_user || session_id) unless is_admin? || (signed_in? && viewing_user == @user) if @user.pending? - if viewing_self = (signed_in? && viewing_user == @user) + if (signed_in? && viewing_user == @user) flash.now[:notice] = "We're still working on your achievements but you can already start basking in the awesomeness of your new coderwall!" else flash.now[:notice] = "We're still working on #{@user.display_name}'s achievements, but its not too early to follow and endorse them." @@ -39,23 +46,20 @@ def show end format.json do - if @user.nil? - return head(:not_found) - else - if stale?(etag: ['v3', @user, user_show_params[:callback], user_show_params[:full]], last_modified: @user.last_modified_at.utc, public: true) - response = Rails.cache.fetch(['v3', @user, :json, user_show_params[:full]]) do - @user.public_hash(user_show_params[:full]) do |badge| - view_context.image_path(badge.image_path) #fully qualified in product - end.to_json - end - response = "#{user_show_params[:callback]}({\"data\":#{response}})" if user_show_params[:callback] - render json: response + if stale?(etag: ['v3', @user, user_show_params[:callback], user_show_params[:full]], last_modified: @user.last_modified_at.utc, public: true) + response = Rails.cache.fetch(['v3', @user, :json, user_show_params[:full]]) do + @user.public_hash(user_show_params[:full]) do |badge| + view_context.image_path(badge.image_path) #fully qualified in product + end.to_json end + response = "#{user_show_params[:callback]}({\"data\":#{response}})" if user_show_params[:callback] + render json: response end end end end + # GET /users(.:format) def index if signed_in? && current_user.admin? return redirect_to(admin_root_url) @@ -66,15 +70,9 @@ def index end end - def beta - return head(:forbidden) unless signed_in? && (current_user.beta_access? || current_user.admin?) - @user = current_user - @users = User.where('banner is not null') - end - + # POST /users(.:format) def create @user = User.for_omniauth(oauth) - Rails.logger.info("Creating User: #{@user.inspect}") ucp = user_create_params.dup @@ -96,6 +94,27 @@ def create end end + def delete_account + return head(:forbidden) unless signed_in? + end + + def delete_account_confirmed + user = User.find(current_user.id) + user.destroy + sign_out + redirect_to root_url + end + + def destroy + destroy_params = params.permit(:id) + return head(:forbidden) unless current_user.admin? || current_user.id == destroy_params[:id] + + @user = User.find(destroy_params[:id]) + @user.destroy + redirect_to badge_url(@user.username) + end + + # GET /settings(.:format) def edit respond_to do |format| format.json do @@ -114,6 +133,7 @@ def edit end end + # PUT /users/:id(.:format) def update user_id = params[:id] @@ -123,23 +143,38 @@ def update return head(:forbidden) unless @user == current_user || admin_of_premium_team? if @user.update_attributes(user_update_params) - @user.activate! if @user.has_badges? && !@user.active? + @user.activate if @user.has_badges? && !@user.active? flash.now[:notice] = "The changes have been applied to your profile." expire_fragment(@user.daily_cache_key) + else + flash.now[:notice] = "There were issues updating your profile." end - auto_upload = params[:user][:auto_upload] - if auto_upload - head :ok - else - if admin_of_premium_team? - redirect_to(teamname_url(slug: @user.team.slug, full: :preview)) - else - redirect_to(edit_user_url(@user)) + respond_to do |format| + format.js + format.html do + if admin_of_premium_team? + redirect_to(teamname_url(slug: @user.team.slug, full: :preview)) + else + redirect_to(edit_user_url(@user)) + end end end + end + # POST /users/teams_update/:membership_id(.:format) + def teams_update + membership=Teams::Member.find(params['membership_id']) + if membership.update_attributes(teams_member) + flash.now[:notice] = "The changes have been applied to your profile." + else + flash.now[:notice] = "There were issues updating your profile." + end + redirect_to(edit_user_url(membership.user)) + end + + # GET /users/autocomplete(.:format) def autocomplete autocomplete_params = params.permit(:query) respond_to do |f| @@ -152,7 +187,7 @@ def autocomplete name: user.display_name, twitter: user.twitter, github: user.github, - thumbnail: user.thumbnail_url + thumbnail: user.avatar.url } }, data: @users.collect(&:username) }.to_json @@ -160,15 +195,7 @@ def autocomplete end end - def refresh - - refresh_params = params.permit(:username) - - Resque.enqueue(RefreshUser, refresh_params[:username], true) - flash[:notice] = "Queued #{refresh_params[:username]} for a refresh" - redirect_to :back - end - + # GET /roll-the-dice(.:format) def randomize random_user = User.random.first if random_user @@ -178,6 +205,7 @@ def randomize end end + # POST /users/:id/specialties(.:format) def specialties @user = current_user specialties = params.permit(:specialties) @@ -185,17 +213,7 @@ def specialties redirect_to badge_url(@user.username) end - def delete_account - return head(:forbidden) unless signed_in? - end - - def delete_account_confirmed - user = User.find(current_user.id) - user.destroy - sign_out - redirect_to root_url - end - + # GET /clear/:id/:provider(.:format) def clear_provider return head(:forbidden) unless current_user.admin? @@ -208,17 +226,6 @@ def clear_provider redirect_to(badge_url(username: @user.username)) end - def destroy - return head(:forbidden) unless current_user.admin? - - destroy_params = params.permit(:id) - - @user = User.find(destroy_params[:id]) - @user.destroy - record_event('deleted account') - redirect_to badge_url(@user.username) - end - def settings if signed_in? record_event("api key requested", username: current_user.username, site: request.env["REMOTE_HOST"]) @@ -228,6 +235,14 @@ def settings end end + # POST /github/unlink(.:format) + # POST /twitter/unlink(.:format) + # POST /forrst/unlink(.:format) + # POST /dribbble/unlink(.:format) + # POST /linkedin/unlink(.:format) + # POST /codeplex/unlink(.:format) + # POST /bitbucket/unlink(.:format) + # POST /stackoverflow/unlink(.:format) def unlink_provider return head(:forbidden) unless signed_in? @@ -265,6 +280,10 @@ def oauth session["oauth.data"] end + def teams_member + params.require(:teams_member).permit(:title,:team_avatar,:team_banner) + end + def user_edit_params params.permit(:id) end @@ -299,7 +318,8 @@ def user_update_params :team_avatar, :team_banner, :team_responsibilities, - :title + :title, + :username ) end diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb index c0100106..42d9b107 100644 --- a/app/helpers/accounts_helper.rb +++ b/app/helpers/accounts_helper.rb @@ -6,4 +6,17 @@ def monthly_plan_price(plan) def purchased_plan(plan) plan.nil? ? "Monthly" : plan.name end + + def card_for(customer) + card = customer[:active_card] || customer[:cards].first + end + + def invoice_date(invoice) + Time.at(invoice[:date]).to_date.to_formatted_s(:long_ordinal) + end + + def subscription_period_for(invoice, period) + subscription_period = invoice[:lines][:data].first[:period][period] + Time.at(subscription_period).to_date.to_formatted_s(:long_ordinal) + end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 23e7465c..94f14971 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,6 @@ module ApplicationHelper include TweetButton + include SchemaOrgHelper def link_twitter_path '/auth/twitter' @@ -68,14 +69,6 @@ def page_keywords(keywords=nil) end end - def blog_posts_nav_class - if params[:controller] == "blogs" - 'active' - else - nil - end - end - def settings_nav_class if params[:controller] == "users" && params[:action] == "edit" 'active' @@ -124,26 +117,6 @@ def connections_nav_class end end - def team_nav_class - if params[:controller] == "teams" && params[:action] != 'index' - if signed_in? && current_user.team_document_id == params[:id] || params[:id].blank? - 'active' - else - nil - end - else - nil - end - end - - def teams_nav_class - if params[:controller] == "teams" && params[:action] == 'index' - 'active' - else - nil - end - end - def jobs_nav_class if params[:controller] == "opportunities" && params[:action] == 'index' 'active' @@ -174,21 +147,21 @@ def user_endorsements endorsements = [] # https://twitter.com/#!/iamdustan/status/104652472181719040 - endorsements << [User.with_username('iamdustan'), "One of the geekiest (and coolest) things I've seen in quite a while"] + endorsements << [User.find_by_username('iamdustan'), "One of the geekiest (and coolest) things I've seen in quite a while"] # https://twitter.com/#!/ang3lfir3/status/72810316882391040 - endorsements << [User.with_username('ang3lfir3'), "the companies I *want* to work for... care about the info on @coderwall"] + endorsements << [User.find_by_username('ang3lfir3'), "the companies I *want* to work for... care about the info on @coderwall"] # https://twitter.com/#!/chase_mccarthy/status/75582647396614145 - endorsements << [User.with_username('ozone1015'), "@coderwall is an awesome idea. It's like having Halo achievements for your resume!!!"] + endorsements << [User.find_by_username('ozone1015'), "@coderwall is an awesome idea. It's like having Halo achievements for your resume!!!"] # https://twitter.com/#!/razorjack/status/75125655322374144 - endorsements << [User.with_username('RazorJack'), "@coderwall is awesome but everyone already knows it."] + endorsements << [User.find_by_username('RazorJack'), "@coderwall is awesome but everyone already knows it."] # https://twitter.com/#!/kennethkalmer/status/86392260555587584 - endorsements << [User.with_username('kennethkalmer'), "@coderwall really dishes out some neat achievements, hope this helps motivate even more folks to contribute to FOSS"] + endorsements << [User.find_by_username('kennethkalmer'), "@coderwall really dishes out some neat achievements, hope this helps motivate even more folks to contribute to FOSS"] - # endorsements << [User.with_username('jeffhogan'), 'I really dig @coderwall...I see great potential in utilizing @coderwall for portfolio/linkedin/professional ref. for developers!'] + # endorsements << [User.find_by_username('jeffhogan'), 'I really dig @coderwall...I see great potential in utilizing @coderwall for portfolio/linkedin/professional ref. for developers!'] endorsements end @@ -239,7 +212,7 @@ def follow_team_link(team) elsif signed_in? link_to('', follow_team_path(team), method: :post, remote: true, class: 'follow-team add-to-network') else - link_to('', signup_path(flash: 'You must signin or signup before you can follow a team'), class: 'follow-team add-to-network noauth') + link_to('', root_path(flash: 'You must signin or signup before you can follow a team'), class: 'follow-team add-to-network noauth') end end @@ -257,14 +230,6 @@ def admin_stat_class(yesterday, today) today > yesterday ? "goodday" : "badday" end - def mperson - "http://data-vocabulary.org/Person" - end - - def maddress - "http://data-vocabulary.org/Address" - end - def image_url(source) abs_path = image_path(source) unless abs_path =~ /^http/ diff --git a/app/helpers/badges_helper.rb b/app/helpers/badges_helper.rb index afb15099..95acba8f 100644 --- a/app/helpers/badges_helper.rb +++ b/app/helpers/badges_helper.rb @@ -1,14 +1,11 @@ -require 'digest/md5' - module BadgesHelper def share_coderwall_on_twitter - text = "Trying to cheat the system so I can check out my geek cred" - custom_tweet_button 'Expedite my access', {text: text, via: 'coderwall'}, {class: 'track expedite-access', 'data-action' => 'share achievement', 'data-action' => 'instantaccess'} + custom_tweet_button 'Expedite my access', {text: 'Trying to cheat the system so I can check out my geek cred', via: 'coderwall'}, {class: 'track expedite-access', 'data-action' => 'share achievement'} end def dom_tag(tag) - sanitize_dom_id(tag).gsub(' ', '-').gsub('+', 'plus').gsub('#', 'sharp') + sanitize_dom_id(tag).tr(' ', '-').gsub('+', 'plus').gsub('#', 'sharp') end def dom_for_badge(badge) @@ -27,4 +24,4 @@ def unlocked_badge_title "#{@user.short_name} leveled up and unlocked the #{@badge.display_name} on Coderwall" end -end \ No newline at end of file +end diff --git a/app/helpers/error_helper.rb b/app/helpers/error_helper.rb new file mode 100644 index 00000000..a9c32c0c --- /dev/null +++ b/app/helpers/error_helper.rb @@ -0,0 +1,5 @@ +module ErrorHelper + def protips_list(type, count) + Protip.method(type).call.first(count) + end +end diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb deleted file mode 100644 index 07d20331..00000000 --- a/app/helpers/events_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -module EventsHelper - def latest_relevant_featured_protips(count) - Protip.where(featured: true).tagged_with(current_user.networks.map(&:tags).flatten.uniq).order('featured_at DESC').limit(count) - end - - def latest_relevant_featured_protips_based_on_skills(count) - Protip.featured.joins("inner join taggings on taggable_id = protips.id and taggable_type = 'Protip'").joins('inner join tags on taggings.tag_id = tags.id').where('tags.id IN (?)', ActiveRecord::Base.connection.select_values(current_user.skills.joins('inner join tags on UPPER(tags.name)=UPPER(skills.name)').select('tags.id'))).limit(count) - end - -end diff --git a/app/helpers/highlights_helper.rb b/app/helpers/highlights_helper.rb deleted file mode 100644 index a8dbf31b..00000000 --- a/app/helpers/highlights_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module HighlightsHelper -end diff --git a/app/helpers/links_helper.rb b/app/helpers/links_helper.rb deleted file mode 100644 index f6bc9881..00000000 --- a/app/helpers/links_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module LinksHelper -end diff --git a/app/helpers/networks_helper.rb b/app/helpers/networks_helper.rb index 532b3fac..c6cfb3b0 100644 --- a/app/helpers/networks_helper.rb +++ b/app/helpers/networks_helper.rb @@ -42,7 +42,7 @@ def join_or_leave_path(network) if signed_in? current_user.member_of?(network) ? leave_network_path(network.slug) : join_network_path(network.slug) else - signup_path + root_path end end diff --git a/app/helpers/opportunities_helper.rb b/app/helpers/opportunities_helper.rb index c7517a14..2f792cb3 100644 --- a/app/helpers/opportunities_helper.rb +++ b/app/helpers/opportunities_helper.rb @@ -9,7 +9,13 @@ def add_job_or_signin_path end def job_location_string(location) - location == "Worldwide" ? location : "in #{location}" + if location == "Worldwide" + "Jobs Worldwide" + elsif location == "Remote" + "Remote Jobs" + else + "Jobs in #{location}" + end end def google_maps_image_url(location) @@ -28,4 +34,4 @@ def location_photo_path(location) photo = LocationPhoto::Panoramic.for(location) asset_path("locations/panoramic/#{photo.image_name}") end -end \ No newline at end of file +end diff --git a/app/helpers/premium_helper.rb b/app/helpers/premium_helper.rb index 2e0d8d7a..0916b771 100644 --- a/app/helpers/premium_helper.rb +++ b/app/helpers/premium_helper.rb @@ -70,7 +70,7 @@ def panel_form_for_section(section_id, title = nil, show_save_button = true, &bl end def partialify_html_section_id(section_id) - section_id.to_s.gsub("-", "_").gsub('#', '') + section_id.to_s.tr("-", "_").gsub('#', '') end def add_active_class_to_first_member @@ -183,9 +183,9 @@ def default_job location: 'Anywhere', link: 'http://coderwall.com', cached_tags: 'Skilled, Awesome', - tags: 'Java, TDD, Heroku', + tag_list: %w(Java TDD Heroku), location_city: 'San Francisco, CA', - team_document_id: @team.id || Team.featured.first.id + team_id: @team.id || Team.featured.first.id ) end @@ -220,12 +220,12 @@ def reason_description_1_or_default(team) end def job_visited(job) - visit_team_opportunity_path(job.team_document_id, job.id) unless job.new_record? + visit_team_opportunity_path(job.team_id, job.id) unless job.new_record? end - def link_to_add_fields(name, f, association) - new_object = f.object.class.reflect_on_association(association).klass.new - fields = f.fields_for(association, new_object, child_index: "new_#{association}") do |builder| + def link_to_add_fields(name, form, association) + new_object = form.object.class.reflect_on_association(association).klass.new + fields = form.fields_for(association, new_object, child_index: "new_#{association}") do |builder| render(association.to_s.singularize + "_fields", f: builder) end link_to_function(name, "add_fields(this, \"#{association}\", \"#{escape_javascript(fields)}\")") diff --git a/app/helpers/protips_helper.rb b/app/helpers/protips_helper.rb index 783202e1..c5fda5a5 100644 --- a/app/helpers/protips_helper.rb +++ b/app/helpers/protips_helper.rb @@ -1,6 +1,11 @@ require 'cfm' + module ProtipsHelper + def protip_search_results_to_render(protips) + (protips.results if protips.respond_to?(:results)) || protips.try(:all) + end + def protip_summary "A protip by #{@protip.user.username} about #{@protip.topics.to_sentence}." end @@ -62,8 +67,6 @@ def users_background_image location_image_url_for(@user) elsif @protip && !@protip.new_record? location_image_url_for(@protip.user) - else - location_image_url_for(current_user) end end @@ -117,9 +120,9 @@ def subscription_link(topic, additional_classes="", options={}) def upvote_link(protip, classname) if protip.already_voted?(current_user, current_user.try(:tracking_code), request.remote_ip) - content_tag :div, "#{protip.upvotes}", class: "upvoted #{classname}" + content_tag :div, "#{protip.upvotes}", class: "upvoted #{classname}", itemprop: 'interactionCount' else - link_to "#{protip.upvotes}", upvote_protip_path(protip.public_id), class: "#{classname} track", remote: true, method: :post, rel: "nofollow", 'data-action' => "upvote protip", 'data-from' => (classname == "small-upvote" ? 'mini protip' : 'protip') + link_to "#{protip.upvotes}", upvote_protip_path(protip.public_id), class: "#{classname} track", remote: true, method: :post, rel: "nofollow", 'data-action' => "upvote protip", 'data-from' => (classname == "small-upvote" ? 'mini protip' : 'protip'), itemprop: 'interactionCount' end end @@ -218,7 +221,7 @@ def topics_to_sentence(topics) def protip_topic_page_title(topics) username = topics.is_a?(Array) ? (topics.size == 1 ? topics.first : nil) : topics - unless username.nil? or (user = User.with_username(username)).blank? + unless username.nil? or (user = User.find_by_username(username)).blank? "Coderwall - Trending Pro tips by #{user.name}" else "Coderwall - Trending Pro tips #{"about #{topics_to_sentence(topics)} " unless topics.blank?}by top developers in the world!" @@ -282,43 +285,42 @@ def display_scope_class end def current_user_upvotes - @upvoted_protip_ids ||= current_user.upvoted_protips.select(:public_id).map(&:public_id) + @upvoted_protip_ids ||= current_user.upvoted_protips.pluck(:public_id) end def user_upvoted?(protip) current_user && current_user_upvotes.include?(protip.public_id) end - def protip_stat_class(protip) - class_name = best_stat_name(protip) - #class_name << " " << (user_upvoted?(protip) ? "upvoted" : "") - end - def formatted_best_stat_value(protip) - value = - case best_stat_name(protip).to_sym - when :views - best_stat_value(protip) * Protip::COUNTABLE_VIEWS_CHUNK - else - best_stat_value(protip) - end - number_to_human(value, units: {unit: "", thousand: "k"}) + value = case best_stat_name(protip).to_sym + when :views + views_stat_value(protip) + else + best_stat_value(protip) + end + + number_to_human(value, units: { unit: '', thousand: 'k' }) end - def blur_protips? - params[:show_all].nil? && !signed_in? + def best_stat_name(protip) + protip.best_stat.is_a?(Tire::Results::Item) ? protip.best_stat.name : protip.best_stat[0] end - def followings_fragment_cache_key(user_id) - ['v1', 'followings_panel', user_id] + def views_stat_value(protip) + best_stat_value(protip) * Protip::COUNTABLE_VIEWS_CHUNK end def best_stat_value(protip) protip.best_stat.is_a?(Tire::Results::Item) ? protip.best_stat.value.to_i : protip.best_stat[1] end - def best_stat_name(protip) - protip.best_stat.is_a?(Tire::Results::Item) ? protip.best_stat.name : protip.best_stat[0] + def blur_protips? + params[:show_all].nil? && !signed_in? + end + + def followings_fragment_cache_key(user_id) + ['v1', 'followings_panel', user_id] end def protip_networks(protip) @@ -348,4 +350,17 @@ def default_featured_job_banner def protip_display_mode mobile_device? ? "fullpage" : "popup" end + + def display_protip_stats?(protip) + stat_name = best_stat_name(protip) + # if stat is present, and the stat we're displaying is views over 50, display. + # otherwise, we're showing stats for something other than views. + return true if protip.best_stat.present? && stat_name == :views && views_stat_value(protip) > 50 + return true if protip.best_stat.present? && stat_name != :views + return false + end + + def protip_editing_text + params[:action] == 'new' ? 'Add new protip' : 'Edit protip' + end end diff --git a/app/helpers/redemptions_helper.rb b/app/helpers/redemptions_helper.rb deleted file mode 100644 index a9db0181..00000000 --- a/app/helpers/redemptions_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module RedemptionsHelper -end diff --git a/app/helpers/schema_org_helper.rb b/app/helpers/schema_org_helper.rb new file mode 100644 index 00000000..187a1712 --- /dev/null +++ b/app/helpers/schema_org_helper.rb @@ -0,0 +1,17 @@ +module SchemaOrgHelper + def meta_person_schema_url + 'https://schema.org/Person' + end + + def meta_address_schema_url + 'https://schema.org/Address' + end + + def meta_article_schema_url + 'https://schema.org/TechArticle' + end + + def meta_comment_schema_url + 'https://schema.org/Comment' + end +end diff --git a/app/helpers/teams_helper.rb b/app/helpers/teams_helper.rb index 8be32ea4..d7a04d2c 100644 --- a/app/helpers/teams_helper.rb +++ b/app/helpers/teams_helper.rb @@ -29,14 +29,6 @@ def following_team_class(team) end end - def on_leaderboard? - params[:action] == 'index' - end - - def top_teams_css_class - on_leaderboard? ? 'active' : '' - end - def followed_teams_css_class current_page?(action: :followed) ? 'active' : '' end @@ -57,7 +49,7 @@ def build_your_team_path if signed_in? new_team_path else - signup_path + root_path end end @@ -98,19 +90,10 @@ def show_team_score? @team.size >= 3 && @team.rank > 0 end - def friendly_team_path(team) teamname_path(slug: team.slug) end - def teams_leaderboard_title(teams) - "Top tech teams in the world | " + teams.first(3).map(&:name).join(", ") + " and many more!" - end - - def leaderboard_css_class - return 'active' if params[:controller] == 'teams' && params[:action] == 'leaderboard' - end - def featured_teams_css_class return 'active' if params[:controller] == 'teams' && params[:action] == 'index' end @@ -123,12 +106,8 @@ def message_to_create_ehanced_team end end - def no_account_no_team? - !signed_in? - end - def member_no_team? - signed_in? && current_user.team.nil? + current_user.membership.nil? end def add_job_path(team) @@ -155,7 +134,7 @@ def team_job_path(team) teamname_path(slug: team.slug) + "#open-positions" end - def edit_team_locations_path(team) + def edit_s_path(team) teamname_path(slug: team.slug) + "/edit/#locations" end @@ -163,7 +142,35 @@ def change_resume_path settings_path(anchor: 'jobs') end - def exact_team_exists?(teams, team) - teams.map { |team| Team.slugify(team.name) }.include? team.slug + def exact_team_exists?(teams, name) + teams.map { |team| Team.slugify(team.name) }.include? name end -end \ No newline at end of file + + def team_connections_links(team) + content_tag(:ul, class: 'connections cf') do + content_tag(:li, team_website_link(team)) + + content_tag(:li, team_github_link(team)) + + content_tag(:li, team_facebook_link(team)) + + content_tag(:li, team_twitter_link(team)) + end + end + + + def team_website_link(team) + link_to('', url_for(team.website), :class => 'url record-exit', :target => '_blank', 'data-target-type' => 'company-website', :alt => team.name) if team.website.present? + end + + def team_github_link(team) + link_to('', "https://github.com/#{team.github}", :class => 'github record-exit', :target => '_blank', 'data-target-type' => 'company-github', :alt => 'On GitHub') if team.github.present? + end + + def team_facebook_link(team) + link_to('', "https://www.facebook.com/#{team.facebook}", :class => 'facebook record-exit', :target => '_blank', 'data-target-type' => 'company-facebook', :alt => 'On Facebook') if team.facebook.present? + end + + def team_twitter_link(team) + link_to('', "https://twitter.com/#{team.twitter}", :class => 'twitter record-exit', :target => '_blank', 'data-target-type' => 'company-twitter', :alt => 'On Twitter') if team.twitter.present? + end + + +end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 9c399d18..3ee8f987 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -10,7 +10,6 @@ def show_private_message? end def avatar_image_tag(user, options = {}) - return nil if user.thumbnail_url.blank? options['data-user'] = user.username link_to( users_image_tag(user), @@ -25,18 +24,18 @@ def users_team_image_tag(user, options = {}) def users_image_tag(user, options = {}) options[:class] ||= 'avatar' - options[:alt] ||= user.username - image_tag(users_image_path(user), options) + #FIXME + if user + options[:alt] ||= user.username + image_tag(users_image_path(user), options) + else + image_tag('blank-mugshot.png', options) + end end + #TODO Remove def users_image_path(user) - url = user.profile_url || user.avatar - if url.include?('secure.gravatar.com') - default_url = (Rails.env.production? || Rails.env.staging?) ? image_path(User::BLANK_PROFILE_URL) : "#{Rails.application.routes.url_helpers.root_url(only_path: true)}#{image_path(User::BLANK_PROFILE_URL)}" - "#{url}?d=#{default_url}" - else - url - end + user.avatar.url end def user_or_team_image_path(user_or_team) @@ -124,7 +123,7 @@ def empty_stats end def estimated_delivery_date - if Date.today.end_of_week == Date.today + if Date.today.end_of_week == Date.today Date.today + 7.days else Date.today.end_of_week @@ -197,7 +196,7 @@ def location_image_url_for(user) photo = LocationPhoto.for(user, params[:location]) asset_path("locations/#{photo.image_name}") else - user.banner_url + user.banner.url end end @@ -232,4 +231,28 @@ def not_signedin_class return nil if signed_in? 'not-signed-in' end + + + + # option={ + # :type=>'paragraph|image|text', + # :content_class=>'', + # :attribute_class=>'', + # :label_class=>'', + # :image_class=>'' + # } + def show_user_attribute(attribute,label,option={}) + if attribute.present? + content_tag :div, class: option[:content_class] do + case option[:type] + when :paragraph + content_tag(:b,label, class: option[:label_class])+' : '+content_tag(:div, attribute, class: option[:attribute_class],style: 'margin-left: 10px;') + when :image + content_tag(:b,label, class: option[:label_class])+' : '+content_tag(:div, image_tag(attribute, class: option[:image_class]), class: option[:attribute_class]) + else #text + content_tag(:b,label, class: option[:label_class])+' : '+content_tag(:span, attribute, class: option[:attribute_class]) + end + end + end + end end diff --git a/app/indexers/protip_indexer.rb b/app/indexers/protip_indexer.rb new file mode 100644 index 00000000..b8d2bcb0 --- /dev/null +++ b/app/indexers/protip_indexer.rb @@ -0,0 +1,14 @@ +class ProtipIndexer + def initialize(protip_or_id) + protip_or_id = Protip.find(protip_or_id) unless protip_or_id.is_a?(Protip) + @protip = protip_or_id + end + + def remove + Protip.index.remove(@protip) + end + + def store + ProtipIndexerWorker.perform_async(@protip.id) + end +end \ No newline at end of file diff --git a/app/jobs/activate_user.rb b/app/jobs/activate_user.rb deleted file mode 100644 index b377e843..00000000 --- a/app/jobs/activate_user.rb +++ /dev/null @@ -1,28 +0,0 @@ -class ActivateUser < RefreshUser - @queue = 'HIGH' - - attr_reader :always_activate - - def initialize(username, always_activate=true) - super(username) - @always_activate = always_activate - end - - def perform - user = User.with_username(username) - return if user.active? - refresh! - if activate_user?(user) - Rails.logger.debug("Activating user #{username}") - user.activate! - Notifier.welcome_email(username).deliver - Rails.logger.debug("Welcome email sent #{username}") - end - end - - def activate_user?(user) - return true if !user.badges.empty? - always_activate - end - -end \ No newline at end of file diff --git a/app/jobs/analyze_spam_job.rb b/app/jobs/analyze_spam_job.rb new file mode 100644 index 00000000..17f483fb --- /dev/null +++ b/app/jobs/analyze_spam_job.rb @@ -0,0 +1,18 @@ +class AnalyzeSpamJob + include Sidekiq::Worker + + sidekiq_options queue: :data_cleanup + + def perform(spammable) + return if Rails.env.test? || Rails.env.development? + begin + thing_to_analyze = spammable['klass'].classify.constantize.find(spammable['id']) + + if thing_to_analyze.spam? + thing_to_analyze.create_spam_report unless thing_to_analyze.spam_report.present? + end + rescue ActiveRecord::RecordNotFound + return + end + end +end diff --git a/app/jobs/analyze_user.rb b/app/jobs/analyze_user.rb deleted file mode 100644 index 92634e14..00000000 --- a/app/jobs/analyze_user.rb +++ /dev/null @@ -1,12 +0,0 @@ -class AnalyzeUser < Struct.new(:username) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - user = User.with_username(username) - unless user.twitter.nil? - RestClient.get "#{ENV['TWITTER_ANALYZER_URL']}/#{user.username}/#{user.twitter}" - end - end -end \ No newline at end of file diff --git a/app/jobs/assign_networks.rb b/app/jobs/assign_networks.rb deleted file mode 100644 index 893d3e34..00000000 --- a/app/jobs/assign_networks.rb +++ /dev/null @@ -1,14 +0,0 @@ -class AssignNetworks < Struct.new(:username) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - user = User.with_username(username) - user.skills.map(&:name).each do |skill| - Network.all_with_tag(skill).each do |network| - user.join(network) - end - end - end -end \ No newline at end of file diff --git a/app/jobs/assign_networks_job.rb b/app/jobs/assign_networks_job.rb new file mode 100644 index 00000000..d0aee647 --- /dev/null +++ b/app/jobs/assign_networks_job.rb @@ -0,0 +1,14 @@ +class AssignNetworksJob + include Sidekiq::Worker + + sidekiq_options queue: :network + + def perform(username) + user = User.find_by_username(username) + user.skills.map(&:name).each do |skill| + Network.all_with_tag(skill).each do |network| + user.join(network) + end + end + end +end diff --git a/app/jobs/award.rb b/app/jobs/award.rb deleted file mode 100644 index c9d4c842..00000000 --- a/app/jobs/award.rb +++ /dev/null @@ -1,10 +0,0 @@ -class Award < Struct.new(:badge, :date, :provider, :candidate) - extend ResqueSupport::Basic - include Awards - - @queue = 'HIGH' - - def perform - award(badge.constantize, date, provider, candidate) - end -end \ No newline at end of file diff --git a/app/jobs/award_job.rb b/app/jobs/award_job.rb new file mode 100644 index 00000000..c74f9ca8 --- /dev/null +++ b/app/jobs/award_job.rb @@ -0,0 +1,10 @@ +class AwardJob + include Sidekiq::Worker + include Awards + + sidekiq_options queue: :user + + def perform(badge, date, provider, candidate) + award(badge.constantize, date, provider, candidate) + end +end diff --git a/app/jobs/award_user.rb b/app/jobs/award_user.rb deleted file mode 100644 index a22931f0..00000000 --- a/app/jobs/award_user.rb +++ /dev/null @@ -1,16 +0,0 @@ -class AwardUser < Struct.new(:username, :badges) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - user = User.with_username(username) - - if badges.first.is_a?(String) - badges.map!(&:constantize) - end - - user.check_achievements!(badges) - end - -end \ No newline at end of file diff --git a/app/jobs/award_user_job.rb b/app/jobs/award_user_job.rb new file mode 100644 index 00000000..05824875 --- /dev/null +++ b/app/jobs/award_user_job.rb @@ -0,0 +1,16 @@ +class AwardUserJob + include Sidekiq::Worker + + sidekiq_options queue: :user + + def perform(username, badges) + user = User.find_by_username(username) + + if badges.first.is_a?(String) + badges.map!(&:constantize) + end + + user.check_achievements!(badges) + end + +end diff --git a/app/jobs/build_activity_stream.rb b/app/jobs/build_activity_stream.rb deleted file mode 100644 index 3b922bcb..00000000 --- a/app/jobs/build_activity_stream.rb +++ /dev/null @@ -1,10 +0,0 @@ -class BuildActivityStream < Struct.new(:username) - extend ResqueSupport::Basic - - @queue = 'MEDIUM' - - def perform - user = User.with_username(username) - user.build_repo_followed_activity! - end -end \ No newline at end of file diff --git a/app/jobs/build_activity_stream_job.rb b/app/jobs/build_activity_stream_job.rb new file mode 100644 index 00000000..47815c3e --- /dev/null +++ b/app/jobs/build_activity_stream_job.rb @@ -0,0 +1,10 @@ +class BuildActivityStreamJob + include Sidekiq::Worker + + sidekiq_options queue: :timeline + + def perform(username) + user = User.find_by_username(username) + user.build_repo_followed_activity! + end +end diff --git a/app/jobs/build_bio_and_joined_dates.rb b/app/jobs/build_bio_and_joined_dates.rb deleted file mode 100644 index 1b713c83..00000000 --- a/app/jobs/build_bio_and_joined_dates.rb +++ /dev/null @@ -1,15 +0,0 @@ -class BuildBioAndJoinedDates < Struct.new(:username) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - user = User.with_username(username) - unless user.github.blank? && user.joined_github_on.blank? - user.joined_github_on = (user.send(:load_github_profile) || {})[:created_at] - end - - user.save! if user.changed? - end - -end diff --git a/app/jobs/cleanup_protips_associate_zombie_upvotes_job.rb b/app/jobs/cleanup_protips_associate_zombie_upvotes_job.rb new file mode 100644 index 00000000..9b3c74a0 --- /dev/null +++ b/app/jobs/cleanup_protips_associate_zombie_upvotes_job.rb @@ -0,0 +1,14 @@ +class CleanupProtipsAssociateZombieUpvotesJob + include Sidekiq::Worker + + sidekiq_options queue: :data_cleanup + + def perform + Like.joins('inner join users on users.tracking_code = likes.tracking_code'). + where('likes.tracking_code is not null'). + where(user_id: nil). + find_each(batch_size: 100) do |like| + ProcessLikeJob.perform_async(:associate_to_user, like.id) + end + end +end diff --git a/app/jobs/create_github_profile_job.rb b/app/jobs/create_github_profile_job.rb new file mode 100644 index 00000000..16528f15 --- /dev/null +++ b/app/jobs/create_github_profile_job.rb @@ -0,0 +1,12 @@ +#TODO DELETE ME + +class CreateGithubProfileJob + include Sidekiq::Worker + sidekiq_options queue: :github + + def perform + User.where('github_id is not null').find_each do |user| + user.create_github_profile if user.github_profile.blank? + end + end +end diff --git a/app/jobs/create_network.rb b/app/jobs/create_network.rb deleted file mode 100644 index e22eab7b..00000000 --- a/app/jobs/create_network.rb +++ /dev/null @@ -1,16 +0,0 @@ -class CreateNetwork < Struct.new(:tag) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - top_tags = Protip.trending_topics - sub_tags = Protip.tagged_with([tag], on: :topics).collect(&:topics).flatten - sub_tags.delete_if { |sub_tag| top_tags.include? sub_tag } - unless sub_tags.blank? - sub_tag_frequency = sub_tags.inject(Hash.new(0)) { |h, sub_tag| h[sub_tag] += 1; h } - sub_tags = sub_tags.uniq.sort_by { |sub_tag| -sub_tag_frequency[sub_tag] } - Network.create(name: tag, tags: sub_tags) - end - end -end \ No newline at end of file diff --git a/app/jobs/create_network_job.rb b/app/jobs/create_network_job.rb new file mode 100644 index 00000000..d85b5f26 --- /dev/null +++ b/app/jobs/create_network_job.rb @@ -0,0 +1,16 @@ +class CreateNetworkJob + include Sidekiq::Worker + + sidekiq_options queue: :network + + def perform(tag) + top_tags = Protip.trending_topics + sub_tags = Protip.tagged_with([tag], on: :topics).flat_map(&:topics) + sub_tags.delete_if { |sub_tag| top_tags.include? sub_tag } + unless sub_tags.blank? + sub_tag_frequency = sub_tags.inject(Hash.new(0)) { |h, sub_tag| h[sub_tag] += 1; h } + sub_tags = sub_tags.uniq.sort_by { |sub_tag| -sub_tag_frequency[sub_tag] } + Network.create(name: tag, tags: sub_tags) + end + end +end diff --git a/app/jobs/deactivate_team_jobs.rb b/app/jobs/deactivate_team_jobs.rb deleted file mode 100644 index bb12dbaa..00000000 --- a/app/jobs/deactivate_team_jobs.rb +++ /dev/null @@ -1,13 +0,0 @@ -class DeactivateTeamJobs < Struct.new(:id) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - team = Team.find(id) - team.jobs.each do |job| - job.deactivate! - end - end - -end diff --git a/app/jobs/deactivate_team_jobs_job.rb b/app/jobs/deactivate_team_jobs_job.rb new file mode 100644 index 00000000..e2511bde --- /dev/null +++ b/app/jobs/deactivate_team_jobs_job.rb @@ -0,0 +1,12 @@ +class DeactivateTeamJobsJob + include Sidekiq::Worker + + sidekiq_options queue: :team + + def perform(id) + team = Team.find(id) + team.jobs.each do |job| + job.deactivate! + end + end +end diff --git a/app/jobs/extract_github_profile.rb b/app/jobs/extract_github_profile.rb new file mode 100644 index 00000000..ca71bf9c --- /dev/null +++ b/app/jobs/extract_github_profile.rb @@ -0,0 +1,42 @@ +class ExtractGithubProfile + include Sidekiq::Worker + sidekiq_options queue: :github + + + def perform(id) + client = Octokit::Client.new + if ENV['TRAVIS'].blank? && client.ratelimit[:remaining] < 1000 + # If we have less than 1000 request remaining, delay this job + # We leaving 1000 for more critical tasks + retry_at = client.ratelimit[:resets_at] + rand(id) + ExtractGithubProfile.perform_at(retry_at, id) + return + end + profile = Users::Github::Profile.find(id) + begin + user = client.user(profile.github_id) + #TODO Rails4 + profile.update_attributes( + { + name: user.name, + hireable: user.hireable, + company: user.company, + location: user.location, + github_id: user.id, + github_created_at: user.created_at, + github_updated_at: user.updated_at, + spider_updated_at: Time.now + } + ) + rescue Octokit::NotFound + #TODO add spec for invalid login + #user don't exist in github: remove all reference to it. + profile.destroy + profile.user.clear_github! + rescue ActiveRecord::RecordNotFound + #Profile don't exist : do nothing and mark as done + true + end + end + +end diff --git a/app/jobs/generate_event.rb b/app/jobs/generate_event.rb deleted file mode 100644 index cea28bec..00000000 --- a/app/jobs/generate_event.rb +++ /dev/null @@ -1,19 +0,0 @@ -class GenerateEvent < Struct.new(:event_type, :audience, :data, :drip_rate) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - if event_still_valid?(event_type, data) - Event.generate_event(event_type, audience.with_indifferent_access, data.with_indifferent_access, drip_rate) - end - end - - def event_still_valid?(event_type, data) - if event_type.to_sym == :new_protip - Protip.where(public_id: (data[:public_id] || data['public_id'])).exists? - else - true - end - end -end \ No newline at end of file diff --git a/app/jobs/generate_event_job.rb b/app/jobs/generate_event_job.rb new file mode 100644 index 00000000..4f6ca054 --- /dev/null +++ b/app/jobs/generate_event_job.rb @@ -0,0 +1,26 @@ +#TODO SPECS +class GenerateEventJob + include Sidekiq::Worker + + sidekiq_options queue: :event_publisher + + def perform(event_type, audience, data, drip_rate=:immediately) + return + data = HashWithIndifferentAccess.new(data) + audience = HashWithIndifferentAccess.new(audience) + if event_still_valid?(event_type, data) + Event.generate_event(event_type, audience, data, drip_rate) + end + end + + private + + def event_still_valid?(event_type, data) + if event_type.to_sym == :new_protip + #TODO check state instead + Protip.where(public_id: data[:public_id]).exists? + else + true + end + end +end diff --git a/app/jobs/generate_top_users_composite.rb b/app/jobs/generate_top_users_composite.rb deleted file mode 100644 index 9424a8c0..00000000 --- a/app/jobs/generate_top_users_composite.rb +++ /dev/null @@ -1,52 +0,0 @@ -class GenerateTopUsersComposite - extend ResqueSupport::Basic - - IMAGE_PATH = Rails.root.join('public', 'images', 'top') - WALL_IMAGE = IMAGE_PATH.join("wall.png") - - def perform - cache_users - cache_images - composite_images - end - - private - - def cache_users - users = User.top(108).map { |u| {u.username => u.thumbnail_url} }.to_json - REDIS.set "top_users", users - end - - def cache_images - IMAGE_PATH.mkpath - - users = JSON.parse(REDIS.get("top_users")) - users.each.with_index do |pair, i| - username, url = pair.keys.first, pair.values.first - - fname = IMAGE_PATH.join("#{i+1}.png") - sh "curl -s #{url} | convert - -resize '65x65' #{fname}" - end - end - - def composite_images - rows = 9.times.map do |row| - start = (row * 12) + 1 - finish = start + 12 - - columns = (start...finish).map { |col| IMAGE_PATH.join("#{col}.png") } - - IMAGE_PATH.join("row#{row + 1}.png").tap do |image| - sh "convert #{columns.join(' ')} +append '#{image}'" - end - end - - sh "convert #{rows.join(' ')} -append '#{WALL_IMAGE}'" - end - - def sh(command) - Rails.logger.info "GenerateTopUsersComposite: executing #{command}" - system command - end - -end \ No newline at end of file diff --git a/app/jobs/generate_top_users_composite_job.rb b/app/jobs/generate_top_users_composite_job.rb new file mode 100644 index 00000000..602a1cc8 --- /dev/null +++ b/app/jobs/generate_top_users_composite_job.rb @@ -0,0 +1,55 @@ +# TODO: Broken, generates errors due to changes in `convert` (ImageMagick) + +class GenerateTopUsersCompositeJob + include Sidekiq::Worker + + sidekiq_options queue: :user + + IMAGE_PATH = Rails.root.join('public', 'images', 'top') + WALL_IMAGE = IMAGE_PATH.join("wall.png") + + def perform + cache_users + cache_images + composite_images + end + + private + + def cache_users + users = User.top(108).map { |u| {u.username => u.avatar.url} }.to_json + Redis.current.set 'top_users', users + end + + def cache_images + IMAGE_PATH.mkpath + + users = JSON.parse(Redis.current.get('top_users')) + users.each.with_index do |pair, i| + username, url = pair.keys.first, pair.values.first + + fname = IMAGE_PATH.join("#{i+1}.png") + sh "curl -s #{url} | convert - -resize '65x65' #{fname}" + end + end + + def composite_images + rows = 9.times.map do |row| + start = (row * 12) + 1 + finish = start + 12 + + columns = (start...finish).map { |col| IMAGE_PATH.join("#{col}.png") } + + IMAGE_PATH.join("row#{row + 1}.png").tap do |image| + sh "convert #{columns.join(' ')} +append '#{image}'" + end + end + + sh "convert #{rows.join(' ')} -append '#{WALL_IMAGE}'" + end + + def sh(command) + system command + end + +end diff --git a/app/jobs/geolocate.rb b/app/jobs/geolocate.rb deleted file mode 100644 index f0897027..00000000 --- a/app/jobs/geolocate.rb +++ /dev/null @@ -1,12 +0,0 @@ -class Geolocate - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - User.active.not_geocoded.each do |user| - user.geocode_location - user.save! - end - end -end \ No newline at end of file diff --git a/app/jobs/geolocate_job.rb b/app/jobs/geolocate_job.rb new file mode 100644 index 00000000..cb210ff6 --- /dev/null +++ b/app/jobs/geolocate_job.rb @@ -0,0 +1,12 @@ +class GeolocateJob + include Sidekiq::Worker + + sidekiq_options queue: :user + + def perform + User.active.not_geocoded.each do |user| + user.geocode_location + user.save! + end + end +end diff --git a/app/jobs/github_badge_org.rb b/app/jobs/github_badge_org.rb deleted file mode 100644 index 53546011..00000000 --- a/app/jobs/github_badge_org.rb +++ /dev/null @@ -1,16 +0,0 @@ -class GithubBadgeOrg < Struct.new(:username, :action) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - user = User.with_username(username) - unless user.nil? or user.github.nil? - if action.to_sym == :add - GithubBadge.new.add_all(user.badges, user.github) - elsif action.to_sym == :remove - GithubBadge.new.remove_all(user.badges, user.github) - end - end - end -end \ No newline at end of file diff --git a/app/jobs/github_badge_org_job.rb b/app/jobs/github_badge_org_job.rb new file mode 100644 index 00000000..3d47c6e8 --- /dev/null +++ b/app/jobs/github_badge_org_job.rb @@ -0,0 +1,16 @@ +class GithubBadgeOrgJob + include Sidekiq::Worker + + sidekiq_options queue: :github + + def perform(username, action) + user = User.find_by_username(username) + unless user.nil? or user.github.nil? + if action.to_sym == :add + GithubBadge.new.add_all(user.badges, user.github) + elsif action.to_sym == :remove + GithubBadge.new.remove_all(user.badges, user.github) + end + end + end +end diff --git a/app/jobs/hawt_service_job.rb b/app/jobs/hawt_service_job.rb new file mode 100644 index 00000000..df22575e --- /dev/null +++ b/app/jobs/hawt_service_job.rb @@ -0,0 +1,27 @@ +class HawtServiceJob + include Sidekiq::Worker + + sidekiq_options queue: :protip + + def perform(id, action) + return '{}' # unless Rails.env.production? + @protip = Protip.find(id) + url = URI.parse("#{ENV['PRIVATE_URL']}/api/v1/protips/#{action}.json").to_s + protip_json = MultiJson.load(protip_hash.to_json) + + Rails.cache.fetch(["hawt_#{action}", @protip], expires: 1.hour) do + RestClient.post(url, protip_json, accept: :json, content_type: 'application/json') + end + end + + private + + def protip_hash + @protip.as_json( + methods: [:upvote_velocity, :upvotes, :flagged?, :ever_featured?, :viewed_by_admin?, :networks, :comments, :public_id], + include: [:user] + ).merge(token: SecureRandom.uuid, protip_id: @protip.id) + end + + +end diff --git a/app/jobs/import_protip.rb b/app/jobs/import_protip.rb deleted file mode 100644 index b1c95f2f..00000000 --- a/app/jobs/import_protip.rb +++ /dev/null @@ -1,34 +0,0 @@ -class ImportProtip < Struct.new(:type, :arg1) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - case type.to_sym - when :github_follows - import_github_follows(arg1) - when :slideshare - import_slideshares(arg1) - when :subscriptions - autosubscribe_users(arg1) - end - end - - def import_github_follows(username) - user = User.with_username(username) - user.build_github_proptips_fast - end - - def import_slideshares(fact_id) - fact = Fact.find(fact_id) - #Importers::Protips::SlideshareImporter.import_from_fact(fact) - end - - def autsubscribe_users(username) - user = User.with_username(username) - user.speciality_tags.each do |speciality| - Tag.find_or_create_by_name(speciality) - user.subscribe_to(speciality) - end - end -end \ No newline at end of file diff --git a/app/jobs/index_protip.rb b/app/jobs/index_protip.rb deleted file mode 100644 index c1a7e72b..00000000 --- a/app/jobs/index_protip.rb +++ /dev/null @@ -1,10 +0,0 @@ -class IndexProtip < Struct.new(:protip_id) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - protip = Protip.find(protip_id) - protip.tire.update_index - end -end \ No newline at end of file diff --git a/app/jobs/index_protip_job.rb b/app/jobs/index_protip_job.rb new file mode 100644 index 00000000..b4087277 --- /dev/null +++ b/app/jobs/index_protip_job.rb @@ -0,0 +1,10 @@ +class IndexProtipJob + include Sidekiq::Worker + + sidekiq_options queue: :index + + def perform(protip_id) + protip = Protip.find(protip_id) + protip.tire.update_index unless protip.user.banned? + end +end diff --git a/app/jobs/index_team.rb b/app/jobs/index_team.rb deleted file mode 100644 index 63ea1530..00000000 --- a/app/jobs/index_team.rb +++ /dev/null @@ -1,10 +0,0 @@ -class IndexTeam < Struct.new(:team_id) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - team = Team.find(team_id) - team.tire.update_index - end -end \ No newline at end of file diff --git a/app/jobs/index_team_job.rb b/app/jobs/index_team_job.rb new file mode 100644 index 00000000..e4e14757 --- /dev/null +++ b/app/jobs/index_team_job.rb @@ -0,0 +1,10 @@ +class IndexTeamJob + include Sidekiq::Worker + + sidekiq_options queue: :index + + def perform(team_id) + team = Team.find(team_id) + team.tire.update_index + end +end diff --git a/app/jobs/merge_duplicate_link.rb b/app/jobs/merge_duplicate_link.rb deleted file mode 100644 index 4d010161..00000000 --- a/app/jobs/merge_duplicate_link.rb +++ /dev/null @@ -1,19 +0,0 @@ -class MergeDuplicateLink < Struct.new(:link) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - all_links = ProtipLink.where(url: link).order('created_at ASC') - protip_to_keep = all_links.shift.protip - #merge - all_links.each do |duplicate_link| - if duplicate_link.protip.created_automagically? - duplicate_link.protip.likes.each do |like| - like.likable_id = protip_to_keep.id - end - duplicate_link.protip.destroy - end - end - end -end \ No newline at end of file diff --git a/app/jobs/merge_duplicate_link_job.rb b/app/jobs/merge_duplicate_link_job.rb new file mode 100644 index 00000000..2c58f02f --- /dev/null +++ b/app/jobs/merge_duplicate_link_job.rb @@ -0,0 +1,19 @@ +class MergeDuplicateLinkJob + include Sidekiq::Worker + + sidekiq_options queue: :data_cleanup + + def perform(link) + all_links = ProtipLink.where(url: link).order('created_at ASC') + protip_to_keep = all_links.shift.protip + #merge + all_links.each do |duplicate_link| + if duplicate_link.protip.created_automagically? + duplicate_link.protip.likes.each do |like| + like.likable_id = protip_to_keep.id + end + duplicate_link.protip.destroy + end + end + end +end diff --git a/app/jobs/merge_skill.rb b/app/jobs/merge_skill.rb deleted file mode 100644 index 1d91565b..00000000 --- a/app/jobs/merge_skill.rb +++ /dev/null @@ -1,19 +0,0 @@ -class MergeSkill < Struct.new(:incorrect_skill_id, :correct_skill_name) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - incorrect_skill = Skill.find(incorrect_skill_id) - correct_skill = incorrect_skill.user.skills.where(name: correct_skill_name).first - - if correct_skill.nil? - incorrect_skill.name = correct_skill_name - incorrect_skill.save! - else - correct_skill.merge_with(incorrect_skill) - correct_skill.save! - incorrect_skill.destroy - end - end -end \ No newline at end of file diff --git a/app/jobs/merge_skill_job.rb b/app/jobs/merge_skill_job.rb new file mode 100644 index 00000000..914d88bc --- /dev/null +++ b/app/jobs/merge_skill_job.rb @@ -0,0 +1,19 @@ +class MergeSkillJob + include Sidekiq::Worker + + sidekiq_options queue: :data_cleanup + + def perform(incorrect_skill_id, correct_skill_name) + incorrect_skill = Skill.find(incorrect_skill_id) + correct_skill = incorrect_skill.user.skills.where(name: correct_skill_name).first + + if correct_skill.nil? + incorrect_skill.name = correct_skill_name + incorrect_skill.save! + else + correct_skill.merge_with(incorrect_skill) + correct_skill.save! + incorrect_skill.destroy + end + end +end diff --git a/app/jobs/merge_tag.rb b/app/jobs/merge_tag.rb deleted file mode 100644 index 8d84e76b..00000000 --- a/app/jobs/merge_tag.rb +++ /dev/null @@ -1,12 +0,0 @@ -class MergeTag < Struct.new(:good_tag_id, :bad_tag_id) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - bad_taggings = Tagging.select(:id).where(tag_id: bad_tag_id) - bad_taggings.find_each(batch_size: 1000) do |bad_tagging| - enqueue(MergeTagging, good_tag_id, bad_tagging.id) - end - end -end \ No newline at end of file diff --git a/app/jobs/merge_tagging.rb b/app/jobs/merge_tagging.rb deleted file mode 100644 index 1f1c091e..00000000 --- a/app/jobs/merge_tagging.rb +++ /dev/null @@ -1,18 +0,0 @@ -class MergeTagging < Struct.new(:good_tag_id, :bad_tagging_id) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - bad_tagging = Tagging.find(bad_tagging_id) - good_tagging = Tagging.where(taggable_type: bad_tagging.taggable_type, taggable_id: bad_tagging.taggable_id, - context: bad_tagging.context, tagger_id: bad_tagging.tagger_id, tagger_type: bad_tagging.tagger_type).first - - if good_tagging.nil? - bad_tagging.tag_id = good_tag_id - bad_tagging.save - else - bad_tagging.destroy - end - end -end \ No newline at end of file diff --git a/app/jobs/process_like.rb b/app/jobs/process_like.rb deleted file mode 100644 index 20e8ae1b..00000000 --- a/app/jobs/process_like.rb +++ /dev/null @@ -1,18 +0,0 @@ -class ProcessLike < Struct.new(:process_type, :like_id) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - like = Like.find(like_id) - case process_type.to_sym - when :associate_to_user - begin - like.user_id = User.find_by_tracking_code(like.tracking_code) - like.save - rescue ActiveRecord::RecordNotUnique - like.destroy - end - end - end -end \ No newline at end of file diff --git a/app/jobs/process_like_job.rb b/app/jobs/process_like_job.rb new file mode 100644 index 00000000..f0a4a94b --- /dev/null +++ b/app/jobs/process_like_job.rb @@ -0,0 +1,22 @@ +class ProcessLikeJob + include Sidekiq::Worker + + sidekiq_options queue: :user + + def perform(process_type, like_id) + like = Like.find(like_id) + case process_type + when 'associate_to_user' + begin + if user = User.find_by_tracking_code(like.tracking_code) + like.user = user + like.save! + else + like.destroy + end + rescue ActiveRecord::RecordNotUnique, ActiveRecord::RecordInvalid => ex + like.destroy + end + end + end +end diff --git a/app/jobs/process_protip.rb b/app/jobs/process_protip.rb deleted file mode 100644 index 0ab02ae3..00000000 --- a/app/jobs/process_protip.rb +++ /dev/null @@ -1,20 +0,0 @@ -class ProcessProtip < Struct.new(:process_type, :protip_id) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - protip = Protip.find(protip_id) - case process_type.to_sym - when :recalculate_score - protip.update_score!(true) - when :resave - protip.save - when :delete - protip.destroy - when :cache_score - protip.upvotes_value = protip.upvotes_value(true) - protip.save(validate: false) - end - end -end \ No newline at end of file diff --git a/app/jobs/process_protip_job.rb b/app/jobs/process_protip_job.rb new file mode 100644 index 00000000..f9f8cf43 --- /dev/null +++ b/app/jobs/process_protip_job.rb @@ -0,0 +1,24 @@ +class ProcessProtipJob + include Sidekiq::Worker + + sidekiq_options queue: :protip + + def perform(process_type, protip_id) + begin + protip = Protip.find(protip_id) + case process_type + when 'recalculate_score' + protip.update_score!(true) + when 'resave' + protip.save + when 'delete' + protip.destroy + when 'cache_score' + protip.upvotes_value = protip.upvotes_value(true) + protip.save(validate: false) + end + rescue ActiveRecord::RecordNotFound + return + end + end +end diff --git a/app/jobs/process_team.rb b/app/jobs/process_team.rb deleted file mode 100644 index be0fc6eb..00000000 --- a/app/jobs/process_team.rb +++ /dev/null @@ -1,29 +0,0 @@ -class ProcessTeam < Struct.new(:process_type, :team_id) - extend ResqueSupport::Basic - - @queue = 'LOW' - - def perform - team = Team.find(team_id) - case process_type.to_sym - when :recalculate - if team.team_members.size <= 0 - puts "Destroying: #{team.name}" - team.destroy - REDIS.zrem(Team::LEADERBOARD_KEY, team.id.to_s) - else - puts "Processing: #{team.name}" - team.recalculate! - if team.team_members.size < 3 - REDIS.zrem(Team::LEADERBOARD_KEY, team.id.to_s) - else - REDIS.zadd(Team::LEADERBOARD_KEY, team.score.to_f, team.id.to_s) - end - end - when :reindex - Team.all.each do |team| - enqueue(IndexTeam, team.id) - end - end - end -end \ No newline at end of file diff --git a/app/jobs/protip_indexer_worker.rb b/app/jobs/protip_indexer_worker.rb new file mode 100644 index 00000000..126ad555 --- /dev/null +++ b/app/jobs/protip_indexer_worker.rb @@ -0,0 +1,14 @@ +class ProtipIndexerWorker + include Sidekiq::Worker + + sidekiq_options :queue => :index + + def perform(protip_id) + begin + protip = Protip.find(protip_id) + Protip.index.store(protip) unless protip.user.banned? + rescue ActiveRecord::RecordNotFound + return + end + end +end diff --git a/app/jobs/protips_recalculate_scores_job.rb b/app/jobs/protips_recalculate_scores_job.rb new file mode 100644 index 00000000..fa118112 --- /dev/null +++ b/app/jobs/protips_recalculate_scores_job.rb @@ -0,0 +1,11 @@ +class ProtipsRecalculateScoresJob + include Sidekiq::Worker + + sidekiq_options queue: :protip + + def perform + Protip.where('created_at > ?', 25.hours.ago).where(upvotes_value_cache: nil).each do |protip| + ProcessProtipJob.perform_async(:recalculate_score, protip.id) + end + end +end diff --git a/app/jobs/refresh_timeline.rb b/app/jobs/refresh_timeline.rb deleted file mode 100644 index 58294602..00000000 --- a/app/jobs/refresh_timeline.rb +++ /dev/null @@ -1,11 +0,0 @@ -class RefreshTimeline < Struct.new(:username) - extend ResqueSupport::Basic - - @queue = 'MEDIUM' - - def perform - user = User.with_username(username) - Event.create_timeline_for(user) - Rails.logger.debug("Refreshed timeline #{username}") - end -end \ No newline at end of file diff --git a/app/jobs/refresh_timeline_job.rb b/app/jobs/refresh_timeline_job.rb new file mode 100644 index 00000000..b4fcb1a8 --- /dev/null +++ b/app/jobs/refresh_timeline_job.rb @@ -0,0 +1,10 @@ +class RefreshTimelineJob + include Sidekiq::Worker + + sidekiq_options queue: :timeline + + def perform(username) + user = User.find_by_username(username) + Event.create_timeline_for(user) + end +end diff --git a/app/jobs/refresh_user.rb b/app/jobs/refresh_user.rb deleted file mode 100644 index 83538518..00000000 --- a/app/jobs/refresh_user.rb +++ /dev/null @@ -1,41 +0,0 @@ -class RefreshUser - extend ResqueSupport::Basic - - @queue = 'REFRESH' - - attr_reader :username - attr_reader :full - - def initialize(username, full=false) - @username = username - @full = full - end - - def perform - refresh! - end - - protected - def refresh! - user = User.with_username(@username) - - if user.github_id - user.destroy_github_cache - end - - return if !@full && user.last_refresh_at > 3.days.ago - - begin - user.build_facts(@full) - user.reload.check_achievements! - user.add_skills_for_unbadgified_facts - - user.calculate_score! - - Rails.logger.debug("Refreshed user #{@username}") - ensure - user.touch(:last_refresh_at) - user.destroy_github_cache - end - end -end diff --git a/app/jobs/refresh_user_job.rb b/app/jobs/refresh_user_job.rb new file mode 100644 index 00000000..979b45a0 --- /dev/null +++ b/app/jobs/refresh_user_job.rb @@ -0,0 +1,25 @@ +class RefreshUserJob + include Sidekiq::Worker + sidekiq_options queue: :user + + def perform(user_id, full=false) + return if Rails.env.test? + begin + user = User.find(user_id) + + return if !full && user.last_refresh_at > 3.days.ago + + begin + user.build_facts(full) + user.reload.check_achievements! + user.add_skills_for_unbadgified_facts + + user.calculate_score! + ensure + user.touch(:last_refresh_at) + end + rescue ActiveRecord::RecordNotFound + return + end + end +end diff --git a/app/jobs/resize_tilt_shift_banner.rb b/app/jobs/resize_tilt_shift_banner.rb deleted file mode 100644 index 218046d2..00000000 --- a/app/jobs/resize_tilt_shift_banner.rb +++ /dev/null @@ -1,14 +0,0 @@ -class ResizeTiltShiftBanner < Struct.new(:klass, :id, :column) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - image = klass.constantize.find(id) - unless image.nil? - image.send(:"#{column}").resize_to_fit(500, 375) - image.send(:"#{column}").apply_tilt_shift - image.save! - end - end -end \ No newline at end of file diff --git a/app/jobs/resize_tilt_shift_banner_job.rb b/app/jobs/resize_tilt_shift_banner_job.rb new file mode 100644 index 00000000..d51fa27b --- /dev/null +++ b/app/jobs/resize_tilt_shift_banner_job.rb @@ -0,0 +1,14 @@ +class ResizeTiltShiftBannerJob + include Sidekiq::Worker + + sidekiq_options queue: :user + + def perform(klass, id, column) + image = klass.constantize.find(id) + unless image.nil? + image.send(:"#{column}").resize_to_fit(500, 375) + image.send(:"#{column}").apply_tilt_shift + image.save! + end + end +end diff --git a/app/jobs/resque_support.rb b/app/jobs/resque_support.rb deleted file mode 100644 index 30f425ee..00000000 --- a/app/jobs/resque_support.rb +++ /dev/null @@ -1,53 +0,0 @@ -require 'resque_scheduler/tasks' - -module ResqueSupport - module Heroku - def after_perform_heroku(*args) - ActiveRecord::Base.connection.disconnect! - end - - def on_failure_heroku(e, *args) - ActiveRecord::Base.connection.disconnect! - end - end - - module Basic - include Heroku - - def perform(*args) - self.new(*args).perform - end - - def enqueue_in(time, *args) - klass = args.shift - if Rails.env.development? or Rails.env.test? - Rails.logger.debug "Resque#enqueue => #{klass}, #{args}" - klass.new(*args).perform - else - Resque.enqueue_in(time, klass, *args) - end - end - - def enqueue(*args) - enqueue_in(0.seconds, *args) - end - end - - module ActiveModel - include Heroku - - def perform(id, method, *args) - self.find(id).send(method, *args) - end - - module Async - def async(method, *args) - Resque.enqueue self.class, self.id, method, *args - end - end - - def self.extended(base_class) - base_class.send :include, ResqueSupport::ActiveModel::Async - end - end -end \ No newline at end of file diff --git a/app/jobs/reverse_geolocate_user.rb b/app/jobs/reverse_geolocate_user.rb deleted file mode 100644 index 82da3647..00000000 --- a/app/jobs/reverse_geolocate_user.rb +++ /dev/null @@ -1,28 +0,0 @@ -require_dependency 'reverse_geocoder' - -class ReverseGeolocateUser < Struct.new(:username, :ip_address) - extend ResqueSupport::Basic - include ReverseGeocoder - - @queue = 'HIGH' - - def perform - user = User.with_username(username) - unless user.nil? or user.ip_lat - geocoder = MaxMind.new - begin - address = geocoder.reverse_geocode(ip_address) - rescue SystemExit - address = nil - end - #puts "got > #{address}" - unless address.nil? - user.ip_lat = address[:latitude].to_f - user.ip_lng = address[:longitude].to_f - user.country = address[:country] if user.country.blank? - user.city = address[:city] if user.city.blank? - user.save(validate: false) - end - end - end -end \ No newline at end of file diff --git a/app/jobs/reverse_geolocate_user_job.rb b/app/jobs/reverse_geolocate_user_job.rb new file mode 100644 index 00000000..3fad13bb --- /dev/null +++ b/app/jobs/reverse_geolocate_user_job.rb @@ -0,0 +1,28 @@ +require_dependency 'reverse_geocoder' + +class ReverseGeolocateUserJob + include Sidekiq::Worker + include ReverseGeocoder + + sidekiq_options queue: :user + + def perform(username, ip_address) + user = User.find_by_username(username) + unless user.nil? or user.ip_lat + geocoder = MaxMind.new + begin + address = geocoder.reverse_geocode(ip_address) + rescue SystemExit + address = nil + end + #puts "got > #{address}" + unless address.nil? + user.ip_lat = address[:latitude].to_f + user.ip_lng = address[:longitude].to_f + user.country = address[:country] if user.country.blank? + user.city = address[:city] if user.city.blank? + user.save(validate: false) + end + end + end +end diff --git a/app/jobs/search_sync_job.rb b/app/jobs/search_sync_job.rb new file mode 100644 index 00000000..351d5d37 --- /dev/null +++ b/app/jobs/search_sync_job.rb @@ -0,0 +1,37 @@ +class SearchSyncJob + include Sidekiq::Worker + sidekiq_options queue: :search_sync + + # TODO refactor this, when we drop Tire. + def perform + return if duplicate_job? # Skip if there is more enqueued jobs + + number_of_protips_in_index = Protip.tire.search { query { all } }.total + number_of_protips_in_database = Protip.count + + if number_of_protips_in_index != number_of_protips_in_database + protips_in_index = Protip.tire.search do + size number_of_protips_in_index + query { all } + end.map { |protip| protip.id.to_i } + + protips_in_database = Protip.pluck(:id) + + #now that we know the sets in db and index, calculate the missing records + nonexistent_protips = (protips_in_index - protips_in_database) + unindexed_protips = (protips_in_database - protips_in_index) + + nonexistent_protips.each do |nonexistent_protip_id| + Protip.index.remove({'_id' => nonexistent_protip_id, '_type' => 'protip'}) + end + + unindexed_protips.each do |unindexed_protip_id| + IndexProtipJob.perform_async(unindexed_protip_id) + end + end + end + + def duplicate_job? + Sidekiq::Queue.new('search_sync').size > 2 + end +end diff --git a/app/jobs/seed_github_protips.rb b/app/jobs/seed_github_protips.rb deleted file mode 100644 index 5352572d..00000000 --- a/app/jobs/seed_github_protips.rb +++ /dev/null @@ -1,11 +0,0 @@ -class SeedGithubProtips < Struct.new(:username) - extend ResqueSupport::Basic - - @queue = 'LOWER' - - def perform - user = User.with_username(username) - Rails.logger.debug "Adding protips for #{username}" - user.build_github_proptips_fast - end -end \ No newline at end of file diff --git a/app/jobs/seed_github_protips_job.rb b/app/jobs/seed_github_protips_job.rb new file mode 100644 index 00000000..3870111a --- /dev/null +++ b/app/jobs/seed_github_protips_job.rb @@ -0,0 +1,10 @@ +class SeedGithubProtipsJob + include Sidekiq::Worker + + sidekiq_options queue: :github + + def perform(username) + user = User.find_by_username(username) + user.build_github_proptips_fast + end +end diff --git a/app/jobs/set_user_visit.rb b/app/jobs/set_user_visit.rb deleted file mode 100644 index 16e88185..00000000 --- a/app/jobs/set_user_visit.rb +++ /dev/null @@ -1,12 +0,0 @@ -class SetUserVisit < Struct.new(:username) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - user = User.with_username(username) - user.append_latest_visits(user.last_request_at || 2.years.ago) - user.save(validate: false) - end - -end \ No newline at end of file diff --git a/app/jobs/track_event_job.rb b/app/jobs/track_event_job.rb new file mode 100644 index 00000000..c4702f8b --- /dev/null +++ b/app/jobs/track_event_job.rb @@ -0,0 +1,13 @@ +class TrackEventJob + include Sidekiq::Worker + + sidekiq_options queue: :event_tracker + + def perform(name, params, request_ip) + mixpanel(request_ip).track(name, params) + end + + def mixpanel(ip) + Mixpanel::Tracker.new(ENV['MIXPANEL_TOKEN'], ip: ip) + end +end diff --git a/app/jobs/update_network.rb b/app/jobs/update_network.rb deleted file mode 100644 index b5ae452b..00000000 --- a/app/jobs/update_network.rb +++ /dev/null @@ -1,22 +0,0 @@ -class UpdateNetwork < Struct.new(:update_type, :public_id, :data) - extend ResqueSupport::Basic - - @queue = 'HIGH' - - def perform - protip = Protip.with_public_id(public_id) - unless protip.nil? - case update_type.to_sym - when :new_protip - protip.networks.each do |network| - network.protips_count_cache += 1 - network.save(validate: false) - end - when :protip_upvote - protip.networks.each do |network| - network.save - end - end - end - end -end \ No newline at end of file diff --git a/app/jobs/update_network_job.rb b/app/jobs/update_network_job.rb new file mode 100644 index 00000000..ac700822 --- /dev/null +++ b/app/jobs/update_network_job.rb @@ -0,0 +1,19 @@ +class UpdateNetworkJob + #TODO move to activejob + #OPTIMIZE + include Sidekiq::Worker + + sidekiq_options queue: :network + + def perform(protip_id) + protip = Protip.find(protip_id) + tags = protip.tags + protip.network_protips.destroy_all + tags.each do |tag| + networks = Network.where("? = any (network_tags)", tag).uniq + networks.each do |network| + protip.network_protips.find_or_create_by_network_id(network.id) + end + end + end +end diff --git a/app/mailers/abuse.rb b/app/mailers/abuse.rb deleted file mode 100644 index 2db1e1d7..00000000 --- a/app/mailers/abuse.rb +++ /dev/null @@ -1,33 +0,0 @@ -class Abuse < ActionMailer::Base - include Resque::Mailer if Rails.env.production? - include ActionView::Helpers::TextHelper - include ActiveSupport::Benchmarkable - - default_url_options[:host] = 'coderwall.com' - default_url_options[:only_path] = false - - default to: Proc.new { User.admins.map(&:email) }, - from: '"Coderwall" <support@coderwall.com>' - - def report_inappropriate(opts) - headers['X-Mailgun-Campaign-Id'] = 'coderwall-abuse-report_inappropriate' - - @ip_address = opts[:ip_address] - @reporting_user = opts[:reporting_user] - protip_public_id = (opts[:protip_public_id] || opts['protip_public_id']) - @protip = Protip.find_by_public_id(protip_public_id) - - mail subject: "Spam Report for Protip: \"#{@protip.title}\" (#{@protip.id})" - end - - if Rails.env.development? - class Preview < MailView - def report_inappropriate - user = User.active.order('Random()').first - protip = Protip.last - mail = ::Abuse.report_inappropriate(reporting_user: user, ip_address: '127.0.0.1', protip: protip) - mail - end - end - end -end diff --git a/app/mailers/abuse_mailer.rb b/app/mailers/abuse_mailer.rb new file mode 100644 index 00000000..0ac0a902 --- /dev/null +++ b/app/mailers/abuse_mailer.rb @@ -0,0 +1,16 @@ +class AbuseMailer < ApplicationMailer + + def report_inappropriate(public_id, opts={}) + begin + headers['X-Mailgun-Campaign-Id'] = 'coderwall-abuse-report_inappropriate' + @protip = Protip.find_by_public_id!(public_id) + @reporting_user = opts[:user_id] + @ip_address = opts[:ip] + + mail to: User.admins.pluck(:email), subject: "Spam Report for Protip: \"#{@protip.title}\" (#{@protip.id})" + rescue ActiveRecord::RecordNotFound + #Protip was probably deleted + true + end + end +end diff --git a/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb new file mode 100644 index 00000000..6e29e666 --- /dev/null +++ b/app/mailers/application_mailer.rb @@ -0,0 +1,9 @@ +class ApplicationMailer < ActionMailer::Base + include ActionView::Helpers::TextHelper + include ActiveSupport::Benchmarkable + + default_url_options[:host] = 'coderwall.com' + default_url_options[:only_path] = false + default from: '"Coderwall" <support@coderwall.com>' + ACTIVITY_SUBJECT_PREFIX = '[Coderwall]' +end diff --git a/app/mailers/campaigns.rb b/app/mailers/campaigns.rb deleted file mode 100644 index 7495218e..00000000 --- a/app/mailers/campaigns.rb +++ /dev/null @@ -1,34 +0,0 @@ -class Campaigns < ActionMailer::Base - include Resque::Mailer if Rails.env.production? - include ActionView::Helpers::TextHelper - add_template_helper(ApplicationHelper) - - def self.queue - :digest_mailer - end - - default_url_options[:host] = "coderwall.com" - default_url_options[:only_path] = false - default from: '"Coderwall" <support@coderwall.com>' - - def asm_badge(username) - headers['X-Mailgun-Campaign-Id'] = 'asm-badge-2013-12-04' - - @user = User.with_username(username) - - mail to: @user.email, subject: "[Coderwall] Unlock the new Entrepreneur badge" - end - - if Rails.env.development? - class Preview < MailView - - def asm_badge - user = User.active.order("Random()").first - mail = ::Campaigns.asm_badge(user.username) - mail - end - - end - end - -end \ No newline at end of file diff --git a/app/mailers/mail_preview.rb b/app/mailers/mail_preview.rb index 4f6363f5..49adc628 100644 --- a/app/mailers/mail_preview.rb +++ b/app/mailers/mail_preview.rb @@ -1,11 +1,16 @@ class MailPreview < MailView - def welcome_email - user = User.find_or_create_by_username('testusername') do |u| - u.email = 'test@example.com' - u.location = 'Chicago, IL' - end - mail = Notifier.welcome_email(user.username) - user.destroy - mail + USERNAME = 'just3ws' + + def popular_protips + from = 60.days.ago + to = 0.days.ago + user = User.find_by_username(USERNAME) + REDIS.srem(ProtipMailer::CAMPAIGN_ID, user.id.to_s) + protips = ProtipMailer::Queries.popular_protips(from, to) + ProtipMailer.popular_protips(user, protips, from, to).deliver + end + + def old_weekly_digest + WeeklyDigestMailer.weekly_digest(USERNAME) end end diff --git a/app/mailers/notifier.rb b/app/mailers/notifier.rb deleted file mode 100644 index a576cd26..00000000 --- a/app/mailers/notifier.rb +++ /dev/null @@ -1,393 +0,0 @@ -class Notifier < ActionMailer::Base - include Resque::Mailer if Rails.env.production? - include ActionView::Helpers::TextHelper - include ActiveSupport::Benchmarkable - add_template_helper(UsersHelper) - add_template_helper(ProtipsHelper) - add_template_helper(ApplicationHelper) - - layout 'email', except: [:weekly_digest, :alert_admin] - - class NothingToSendException < Exception - end - - default_url_options[:host] = "coderwall.com" - default_url_options[:only_path] = false - default from: '"Coderwall" <support@coderwall.com>' - - SPAM_NOTICE = "You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. To change your notification preferences, you can update your email settings here: http://coderwall.com/settings#email or immediately unsubscribe by clicking this link %unsubscribe_url%" - - NEWSLETTER_EVENT = WELCOME_EVENT = 'welcome_email' - ACTIVITY_EVENT = 'new_activity' - FOLLOWER_EVENT = 'new_follower' - RECIPT_EVENT = 'recipt_event' - BADGE_EVENT = 'new_badge' - NEW_COMMENT_EVENT = 'new_comment' - NEW_APPLICANT_EVENT = 'new_applicant' - INVOICE_EVENT = 'invoice' - - ACTIVITY_SUBJECT_PREFIX = "[Coderwall]" - - def welcome_email(username) - headers['X-Mailgun-Variables'] = {email_type: WELCOME_EVENT}.to_json - - @user = User.with_username(username) - @user.touch(:last_email_sent) - - if @user.created_at < 2.days.ago - track_campaign('welcome_delayed') - else - track_campaign('welcome') - end - mail to: @user.email, subject: "Your coderwall welcome package" - end - - def new_lead(username, email, company) - @username = username - @email = email - @company = company - mail to: 'sales@coderwall.com', subject: "[coderwall] New lead for enhanced team page!" - end - - def new_activity(username) - headers['X-Mailgun-Variables'] = {email_type: ACTIVITY_EVENT}.to_json - track_campaign("activity_sent_#{Date.today.wday}") - - @user = User.with_username(username) - @user.touch(:last_email_sent) - - subject, @message = *activity_message_for_user(@user) - - mail to: @user.email, subject: "You've #{subject} on Coderwall!" - end - - def new_badge(username) - headers['X-Mailgun-Variables'] = {email_type: BADGE_EVENT}.to_json - track_campaign("new_badge_earned") - @user = User.with_username(username) - @user.touch(:last_email_sent) - @user.reload - @badge = next_badge_to_send(@user) - - unless @badge.nil? - SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: @badge) - subject, @message = *new_badge_message_for_user(@user, @badge) - mail to: @user.email, subject: "You've #{subject} on Coderwall!" - else - raise NothingToSendException.new - end - end - - def new_follower(username, follower_username) - headers['X-Mailgun-Variables'] = {email_type: FOLLOWER_EVENT}.to_json - track_campaign("new_follower") - - @follower = User.with_username(follower_username) - @user = User.with_username(username) - @user.touch(:last_email_sent) - - congratulation = %w{Awesome Brilliant Epic Sweet}.sample - - mail to: @user.email, subject: "#{congratulation}! You have a new fan on Coderwall" - end - - def new_comment(username, commentor_username, comment_id) - headers['X-Mailgun-Variables'] = {email_type: NEW_COMMENT_EVENT}.to_json - track_campaign("new_comment") - - @commentor = User.with_username(commentor_username) - @user = User.with_username(username) - @comment = Comment.find(comment_id) - @user.touch(:last_email_sent) - - SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: @comment) - - mail to: @user.email, subject: "#{ACTIVITY_SUBJECT_PREFIX} #{@commentor.username} commented on your pro tip" - end - - def comment_reply(username, commentor_username, comment_id) - headers['X-Mailgun-Variables'] = {email_type: NEW_COMMENT_EVENT}.to_json - track_campaign("new_comment") - - @commentor = User.with_username(commentor_username) - @user = User.with_username(username) - @comment = Comment.find(comment_id) - @user.touch(:last_email_sent) - - SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: @comment) - - mail to: @user.email, subject: "#{ACTIVITY_SUBJECT_PREFIX} #{@commentor.username} replied to your comment on a pro tip" - end - - def authy(username) - @user = User.with_username(username) - congratulation = %w{Awesome Brilliant Epic Sweet}.sample - name = @user.short_name - mail to: @user.email, subject: "[Coderwall] #{congratulation} #{name}! You have a new fan and they've sent you a message" - end - - def remind_to_create_team(username) - track_campaign('remind_to_create_team') - headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json - @user = User.with_username(username) - @user.touch(:last_email_sent) - @user.touch(:remind_to_create_team) - - @subject = "Hey #{@user.short_name}, just a quick reminder to reserve your Coderwall team" - mail to: @user.email, subject: @subject - end - - def remind_to_invite_team_members(username) - track_campaign('remind_to_invite_team_members') - headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json - @user = User.with_username(username) - @user.touch(:last_email_sent) - @user.touch(:remind_to_invite_team_members) - - @subject = "Is the #{@user.team.name} team all here?" - mail to: @user.email, subject: @subject - end - - def remind_to_create_protip(username) - raise "NOT IMPLEMENTED" - - track_campaign('remind_to_create_protip') - headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json - @user = User.with_username(username) - @user.touch(:last_email_sent) - @user.touch(:remind_to_create_protip) - - end - - def remind_to_create_skills(username) - raise "NOT IMPLEMENTED" - - track_campaign('remind_to_create_skills') - headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json - @user = User.with_username(username) - @user.touch(:last_email_sent) - @user.touch(:remind_to_create_skills) - - end - - def remind_to_link_accounts(username) - raise "NOT IMPLEMENTED" - - track_campaign('remind_to_link_accounts') - headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json - @user = User.with_username(username) - @user.touch(:last_email_sent) - @user.touch(:remind_to_link_accounts) - - end - - def newsletter_june_18(username) - headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json - track_campaign("newsletter_delicious_coderwall") - - @user = User.with_username(username) - @user.touch(:last_email_sent) - mail to: @user.email, subject: "Coderwall just got delicious" - end - - def newsletter_networks(username) - headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json - track_campaign("newsletter_networks") - - @user = User.with_username(username) - @user.touch(:last_email_sent) - mail to: @user.email, subject: "Introducing Networks" - end - - - def new_applicant(username, job_id) - headers['X-Mailgun-Variables'] = {email_type: NEW_APPLICANT_EVENT}.to_json - #track_campaign("new_applicant") - - @user = User.with_username(username) - @job = Opportunity.find(job_id) - @admin = User.find(@job.team.account.admin_id) - - mail to: @admin.email, bcc: admin_emails, subject: "New applicant for #{@job.title} from Coderwall" - end - - def invoice(team_id, time, invoice_id=nil) - headers['X-Mailgun-Variables'] = {email_type: INVOICE_EVENT}.to_json - #track_campaign("new_applicant") - @team = Team.find(team_id) - @admin = @team.account.admin - @invoice = invoice_id.nil? ? @team.account.invoice_for(Time.at(time)) : Stripe::Invoice.retrieve(invoice_id).to_hash.with_indifferent_access - @customer = @team.account.customer - - mail to: @admin.email, bcc: admin_emails, subject: "Invoice for Coderwall enhanced team profile subscription" - end - - - def alert_admin(type, url = nil, message = nil) - @type = type - @url = url - @message = message - mail to: admin_emails, subject: "Coderwall Alert[#{type}]" - end - - if Rails.env.development? - class Preview < MailView - - def new_follower - user = User.active.order("Random()").first - follower = User.active.order("Random()").first - mail = Notifier.new_follower(user.username, follower.username) - mail - end - - def new_activity - user = User.active.order("Random()").first - User.active.order("Random()").first.endorse(user, 'TEST') - mail = Notifier.new_activity(user.username) - mail - end - - def new_badge - user = User.active.order("Random()").first - user.award Forked20.new(user) - user.save - mail = Notifier.new_badge(user.username) - mail - end - - def new_comment - comment = Comment.order("Random()").first - - mail = Notifier.new_comment(comment.commentable.try(:user).try(:username), comment.author.username, comment.id) - mail - end - - def comment_reply - comment = Comment.order("Random()").where("comment LIKE '@%'").first - - mail = Notifier.comment_reply(comment.username_mentions.first, comment.author.username, comment.id) - mail - end - - def welcome_email_on_team - user = User.on_team.order("Random()").first - mail = Notifier.welcome_email(user.username) - mail - end - - def welcome_email_without_team - user = User.not_on_team.order("Random()").first - mail = Notifier.welcome_email(user.username) - mail - end - - def remind_to_create_team - user = User.not_on_team.order("Random()").first - mail = Notifier.remind_to_create_team(user.username) - mail - end - - def remind_to_invite_team_members - user = User.on_team.order("Random()").first - mail = Notifier.remind_to_invite_team_members(user.username) - mail - end - - def remind_to_create_protip - user = User.without_protip.order("Random()").first - mail = Notifier.remind_to_create_protip(user.username) - mail - end - - def remind_to_create_skills - user = User.without_skill.order("Random()").first - mail = Notifier.remind_to_create_skills(user.username) - mail - end - - def remind_to_link_accounts - user = User.missing_accounts.order("Random()").first - mail = Notifier.remind_to_link_accounts(user.username) - mail - end - - def newsletter_june_18 - user = User.not_on_team.order("Random()").first - mail = Notifier.newsletter_june_18(user.username) - mail - end - - def template_example - user = User.not_on_team.order("Random()").first - mail = Notifier.template_example(user.username) - mail - end - - def newsletter_networks - user = User.active.order("Random()").first - mail = Notifier.newsletter_networks(user.username) - mail - end - - def new_applicant - user = User.active.where('resume IS NOT NULL').order("Random()").first - job = Opportunity.order("Random()").first - mail = ::Notifier.new_applicant(user.username, job.id) - mail - end - - def invoice - team = Team.where(slug: "coderwall").first - mail = ::Notifier.invoice(team.id, 1.month.ago, nil) - mail - end - end - end - - def template_example(username) - @user = User.with_username(username) - mail to: @user.email, subject: "This is a sample of all the template styles" - end if Rails.env.development? - - def next_badge_to_send(user) - next_badge_id = (user.achievements_unlocked_since_last_visit.map(&:id) - SentMail.where(user_id: user.id, mailable_type: Badge.name).map(&:mailable_id)).first - Badge.where(id: next_badge_id).first - end - - private - def track_campaign(id) - headers['X-Mailgun-Campaign-Id'] = id - end - - def activity_message_for_user(user) - raise "Failed notifying user because there was no new activity for #{user.username}" if !user.activity_since_last_visit? - - message = [] - subject = [] - - if user.achievements_unlocked_since_last_visit.count > 0 - subject << "unlocked new achievements" - message << ["unlocked #{pluralize(user.achievements_unlocked_since_last_visit.count, 'achievement')}"] - end - - if user.endorsements_unlocked_since_last_visit.count > 0 - subject << "received endorsements" - message << ["received #{pluralize(user.endorsements_unlocked_since_last_visit.count, 'endorsement')}"] - end - - [subject.join(' and '), message.join(' and ')] - end - - def new_badge_message_for_user(user, badge) - ["unlocked new achievement", badge_for_message(badge)] - end - - def badge_for_message(badge) - skill_name = badge.tokenized_skill_name - skill_name.blank? ? badge.for : "your #{skill_name} hacking skills and contribution." - end - - def admin_emails - YAML.load(ENV['NOTIFIER_ADMIN_EMAILS']) - end -end diff --git a/app/mailers/notifier_mailer.rb b/app/mailers/notifier_mailer.rb new file mode 100644 index 00000000..1410e534 --- /dev/null +++ b/app/mailers/notifier_mailer.rb @@ -0,0 +1,273 @@ +# TODO, Extract components +class NotifierMailer < ApplicationMailer + add_template_helper(UsersHelper) + add_template_helper(ProtipsHelper) + add_template_helper(ApplicationHelper) + add_template_helper(AccountsHelper) + + layout 'email', except: [:weekly_digest, :alert_admin] + + class NothingToSendException < Exception + end + + SPAM_NOTICE = "You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. To change your notification preferences, you can update your email settings here: http://coderwall.com/settings#email or immediately unsubscribe by clicking this link %unsubscribe_url%" + + NEWSLETTER_EVENT = WELCOME_EVENT = 'welcome_email' + ACTIVITY_EVENT = 'new_activity' + FOLLOWER_EVENT = 'new_follower' + RECIPT_EVENT = 'recipt_event' + BADGE_EVENT = 'new_badge' + NEW_COMMENT_EVENT = 'new_comment' + NEW_APPLICANT_EVENT = 'new_applicant' + INVOICE_EVENT = 'invoice' + ACTIVITY_SUBJECT_PREFIX = '[Coderwall]' + + def welcome_email(user_id) + headers['X-Mailgun-Variables'] = {email_type: WELCOME_EVENT}.to_json + + @user = User.find(user_id) + @user.touch(:last_email_sent) + + if @user.created_at < 2.days.ago + track_campaign('welcome_delayed') + else + track_campaign('welcome') + end + mail to: @user.email, subject: "Your coderwall welcome package" + end + + def new_lead(username, email, company) + @username = username + @email = email + @company = company + mail to: 'sales@coderwall.com', subject: "[coderwall] New lead for enhanced team page!" + end + + def new_activity(username) + headers['X-Mailgun-Variables'] = {email_type: ACTIVITY_EVENT}.to_json + track_campaign("activity_sent_#{Date.today.wday}") + + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + + subject, @message = *activity_message_for_user(@user) + + mail to: @user.email, subject: "You've #{subject} on Coderwall!" + end + + def new_badge(username) + headers['X-Mailgun-Variables'] = {email_type: BADGE_EVENT}.to_json + track_campaign("new_badge_earned") + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + @user.reload + @badge = next_badge_to_send(@user) + + unless @badge.nil? + SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: @badge) + subject, @message = *new_badge_message_for_user(@user, @badge) + mail to: @user.email, subject: "You've #{subject} on Coderwall!" + else + raise NothingToSendException.new + end + end + + def new_follower(username, follower_username) + headers['X-Mailgun-Variables'] = {email_type: FOLLOWER_EVENT}.to_json + track_campaign("new_follower") + + @follower = User.find_by_username(follower_username) + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + + congratulation = %w{Awesome Brilliant Epic Sweet}.sample + + mail to: @user.email, subject: "#{congratulation}! You have a new fan on Coderwall" + end + + def new_comment(user_id, commentor_id, comment_id) + headers['X-Mailgun-Variables'] = {email_type: NEW_COMMENT_EVENT}.to_json + track_campaign("new_comment") + + @commentor = User.find(commentor_id) + @user = User.find(user_id) + @comment = Comment.find(comment_id) + @user.touch(:last_email_sent) + + SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: @comment) + + mail to: @user.email, subject: "#{ACTIVITY_SUBJECT_PREFIX} #{@commentor.username} commented on your pro tip" + end + + def comment_reply(username, commentor_username, comment_id) + headers['X-Mailgun-Variables'] = {email_type: NEW_COMMENT_EVENT}.to_json + track_campaign("new_comment") + + @commentor = User.find_by_username(commentor_username) + @user = User.find_by_username(username) + @comment = Comment.find(comment_id) + @user.touch(:last_email_sent) + + SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: @comment) + + mail to: @user.email, subject: "#{ACTIVITY_SUBJECT_PREFIX} #{@commentor.username} replied to your comment on a pro tip" + end + + def authy(username) + @user = User.find_by_username(username) + congratulation = %w{Awesome Brilliant Epic Sweet}.sample + name = @user.short_name + mail to: @user.email, subject: "[Coderwall] #{congratulation} #{name}! You have a new fan and they've sent you a message" + end + + def remind_to_create_team(username) + track_campaign('remind_to_create_team') + headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + @user.touch(:remind_to_create_team) + + @subject = "Hey #{@user.short_name}, just a quick reminder to reserve your Coderwall team" + mail to: @user.email, subject: @subject + end + + def remind_to_invite_team_members(username) + track_campaign('remind_to_invite_team_members') + headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + @user.touch(:remind_to_invite_team_members) + + @subject = "Is the #{@user.team.name} team all here?" + mail to: @user.email, subject: @subject + end + + def remind_to_create_protip(username) + raise "NOT IMPLEMENTED" + + track_campaign('remind_to_create_protip') + headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + @user.touch(:remind_to_create_protip) + + end + + def remind_to_create_skills(username) + raise "NOT IMPLEMENTED" + + track_campaign('remind_to_create_skills') + headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + @user.touch(:remind_to_create_skills) + + end + + def remind_to_link_accounts(username) + raise "NOT IMPLEMENTED" + + track_campaign('remind_to_link_accounts') + headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + @user.touch(:remind_to_link_accounts) + + end + + def newsletter_june_18(username) + headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json + track_campaign("newsletter_delicious_coderwall") + + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + mail to: @user.email, subject: "Coderwall just got delicious" + end + + def newsletter_networks(username) + headers['X-Mailgun-Variables'] = {email_type: NEWSLETTER_EVENT}.to_json + track_campaign("newsletter_networks") + + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + mail to: @user.email, subject: "Introducing Networks" + end + + + def new_applicant(user_id, job_id) + headers['X-Mailgun-Variables'] = {email_type: NEW_APPLICANT_EVENT}.to_json + #track_campaign("new_applicant") + + @user = User.find(user_id) + @job = Opportunity.select([:id, :team_id, :name]).find(job_id) + emails = @job.team.admin_accounts.pluck(:email) + + mail to: emails, bcc: admin_emails, subject: "New applicant for #{@job.title} from Coderwall" + end + + def invoice(team_id, time, invoice_id=nil) + headers['X-Mailgun-Variables'] = {email_type: INVOICE_EVENT}.to_json + #track_campaign("new_applicant") + @team = Team.find(team_id) + team_admin_emails = @team.admin_accounts.pluck :email + @invoice = invoice_id.nil? ? @team.account.invoice_for(Time.at(time)) : Stripe::Invoice.retrieve(invoice_id).to_hash.with_indifferent_access + @customer = @team.account.customer + + mail to: team_admin_emails, bcc: admin_emails, subject: "Invoice for Coderwall enhanced team profile subscription" + end + + + def alert_admin(type, url = nil, message = nil) + @type = type + @url = url + @message = message + mail to: admin_emails, subject: "Coderwall Alert[#{type}]" + end + + def template_example(username) + @user = User.find_by_username(username) + mail to: @user.email, subject: "This is a sample of all the template styles" + end if Rails.env.development? + + def next_badge_to_send(user) + next_badge_id = (user.achievements_unlocked_since_last_visit.map(&:id) - SentMail.where(user_id: user.id, mailable_type: Badge.name).map(&:mailable_id)).first + Badge.where(id: next_badge_id).first + end + + private + def track_campaign(id) + headers['X-Mailgun-Campaign-Id'] = id + end + + def activity_message_for_user(user) + raise "Failed notifying user because there was no new activity for #{user.username}" if !user.activity_since_last_visit? + + message = [] + subject = [] + + if user.achievements_unlocked_since_last_visit.count > 0 + subject << "unlocked new achievements" + message << ["unlocked #{pluralize(user.achievements_unlocked_since_last_visit.count, 'achievement')}"] + end + + if user.endorsements_unlocked_since_last_visit.count > 0 + subject << "received endorsements" + message << ["received #{pluralize(user.endorsements_unlocked_since_last_visit.count, 'endorsement')}"] + end + + [subject.join(' and '), message.join(' and ')] + end + + def new_badge_message_for_user(user, badge) + ["unlocked new achievement", badge_for_message(badge)] + end + + def badge_for_message(badge) + skill_name = badge.tokenized_skill_name + skill_name.blank? ? badge.for : "your #{skill_name} hacking skills and contribution." + end + + def admin_emails + User.admins.pluck(:email) + end +end diff --git a/app/mailers/protip_mailer.rb b/app/mailers/protip_mailer.rb new file mode 100644 index 00000000..f6a5931d --- /dev/null +++ b/app/mailers/protip_mailer.rb @@ -0,0 +1,142 @@ +class ProtipMailer < ApplicationMailer + + add_template_helper(UsersHelper) + add_template_helper(ProtipsHelper) + add_template_helper(ApplicationHelper) + + SPAM_NOTICE = "You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. To change your notification preferences, you can update your email settings here: http://coderwall.com/settings#email or immediately unsubscribe by clicking this link %unsubscribe_url%" + STARS = { + protip_upvotes: 'pro tip upvotes', + followers: 'followers', + endorsements: 'endorsements', + protips_count: 'protips' + } + CAMPAIGN_ID = 'protip_mailer-popular_protips' + POPULAR_PROTIPS_EVENT = 'coderwall-popular_protips' + + ################################################################################# + def popular_protips(user, protips, from, to) + fail 'User is required.' unless user + # Skip if this user has already been sent and email for this campaign id. + fail "Already sent email to #{user.id} please check Redis SET #{CAMPAIGN_ID}." unless REDIS.sadd(CAMPAIGN_ID, user.id.to_s) + + fail 'Protips are required.' if protips.nil? || protips.empty? + fail 'From date is required.' unless from + fail 'To date is required.' unless to + + headers['X-Mailgun-Campaign-Id'] = CAMPAIGN_ID + + @user = user + @protips = protips + @team, @job = self.class.get_team_and_job_for(@user) + unless @job.nil? + self.class.mark_sent(@job, @user) + end + @issue = campaign_params + + stars = @user.following_users.where('last_request_at > ?', 1.month.ago) + @star_stat = star_stat_for_this_week + @star_stat_string = STARS[@star_stat] + + @most = star_stats(stars).sort_by do |star| + -star[@star_stat] + end.first + @most = nil if @most && (@most[@star_stat] <= 0) + + mail(to: @user.email, subject: "It's #{Time.zone.now.strftime('%A')}") + rescue Exception => ex + abort_delivery(ex) + end + ################################################################################# + + def abort_delivery(ex) + Rails.logger.error("[ProtipMailer.popular_protips] Aborted email '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + end + + def self.mark_sent(mailable, user) + SentMail.create!(user: user, sent_at: user.last_email_sent, mailable: mailable) + end + + def self.already_sent?(mailable, user) + SentMail.where(user_id: user.id, mailable_id: mailable.id, mailable_type: mailable.class.name).exists? + end + + def campaign_params + { + utm_campaign: POPULAR_PROTIPS_EVENT, + utm_content: Date.today.midnight, + utm_medium: 'email' + } + end + + def star_stat_for_this_week + STARS.keys[week_of_the_month % 4] + end + + def star_stats(stars, since=1.week.ago) + stars.collect { |star| star.activity_stats(since, true) }.each_with_index.map { |stat, index| stat.merge(user: stars[index]) } + end + + def week_of_the_month + Date.today.cweek - Date.today.at_beginning_of_month.cweek + end + + def self.get_team_and_job_for(user) + if user.team.try(:hiring?) + [user.team, user.team.jobs.sample] + else + teams = teams_for_user(user) + teams.each do |team| + best_job = team.best_positions_for(user).detect{|job| (job.team_id == user.team_id) or !already_sent?(job, user)} + return [team, best_job] unless best_job.nil? + end + end + [nil, nil] + end + + def self.teams_for_user(user) + Team.most_relevant_featured_for(user).select do |team| + team.hiring? + end + end + + module Queries + def self.popular_protips(from, to) + search_results = ProtipMailer::Queries.search_for_popular_protips(from, to) + public_ids = search_results.map { |protip| protip['public_id'] } + + Protip.eager_load(:user, :comments).where('public_id in (?)', public_ids) + end + + def self.search_for_popular_protips(from, to, max_results=10) + url = "#{ENV['ELASTICSEARCH_URL']}/#{ENV['ELASTICSEARCH_PROTIPS_INDEX']}/_search" + query = { + 'query' => { + 'bool' => { + 'must' => [ + { + 'range' => { + 'protip.created_at' => { + 'from' => from.strftime('%Y-%m-%d'), + 'to' => to.strftime('%Y-%m-%d') + } + } + } + ] + } + }, + 'size' => max_results, + 'sort' => [ + { + 'protip.popular_score' => { + 'order' => 'desc' + } + } + ] + } + response = RestClient.post(url, MultiJson.dump(query), content_type: :json, accept: :json) + # TODO: check for response code + MultiJson.load(response.body)['hits']['hits'].map { |protip| protip['_source'] } + end + end +end diff --git a/app/mailers/subscription.rb b/app/mailers/subscription.rb deleted file mode 100644 index 58533887..00000000 --- a/app/mailers/subscription.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Subscription < ActionMailer::Base - include Resque::Mailer if Rails.env.production? - include ActionView::Helpers::TextHelper - add_template_helper(UsersHelper) - add_template_helper(ProtipsHelper) - - layout 'email' - - default_url_options[:host] = "coderwall.com" - default_url_options[:only_path] = false - default from: '"Coderwall" <support@coderwall.com>' - - MONTHLY_SUBSCRIPTION_PURCHASED_EVENT = 'monthly_subscription_purchased' - ONETIME_SUBSCRIPTION_PURCHASED_EVENT = 'onetime_subscription_purchased' - - def team_upgrade(username, plan_id) - plan = Plan.find(plan_id) - event = subscription_event(plan) - headers['X-Mailgun-Variables'] = {email_type: event}.to_json - track_campaign(event) - - @user = User.with_username(username) - @user.touch(:last_email_sent) - @plan = plan - @capability = plan_capability(plan) - - mail to: @user.email, subject: "Your Coderwall Enhanced Team subscription for #{@user.team.name}" - end - - if Rails.env.development? - class Preview < MailView - def team_upgrade - user = User.on_team.order("Random()").first - mail = Subscription.team_upgrade(user.username, Plan.enhanced_team_page_monthly.id) - mail - end - end - end - - private - def track_campaign(id) - headers['X-Mailgun-Campaign-Id'] = id - end - - def subscription_event(plan) - plan.subscription? ? MONTHLY_SUBSCRIPTION_PURCHASED_EVENT : ONETIME_SUBSCRIPTION_PURCHASED_EVENT - end - - def plan_capability(plan) - message = "" - if plan.subscription? - message = "You can now post up to 4 jobs at any time" - elsif plan.one_time? - message = "You can now post one job for 30 days" - end - message - end -end \ No newline at end of file diff --git a/app/mailers/subscription_mailer.rb b/app/mailers/subscription_mailer.rb new file mode 100644 index 00000000..a6b30837 --- /dev/null +++ b/app/mailers/subscription_mailer.rb @@ -0,0 +1,44 @@ +# TODO, Write all the specs +class SubscriptionMailer < ApplicationMailer + add_template_helper(UsersHelper) + add_template_helper(ProtipsHelper) + + layout 'email' + + MONTHLY_SUBSCRIPTION_PURCHASED_EVENT = 'monthly_subscription_purchased' + ONETIME_SUBSCRIPTION_PURCHASED_EVENT = 'onetime_subscription_purchased' + + def team_upgrade(username, plan_id) + plan = Plan.find(plan_id) + event = subscription_event(plan) + headers['X-Mailgun-Variables'] = {email_type: event}.to_json + track_campaign(event) + + @user = User.find_by_username(username) + @user.touch(:last_email_sent) + @plan = plan + @capability = plan_capability(plan) + + mail to: @user.email, subject: "Your Coderwall Enhanced Team subscription for #{@user.team.name}" + end + + private + + def track_campaign(id) + headers['X-Mailgun-Campaign-Id'] = id + end + + def subscription_event(plan) + plan.subscription? ? MONTHLY_SUBSCRIPTION_PURCHASED_EVENT : ONETIME_SUBSCRIPTION_PURCHASED_EVENT + end + + def plan_capability(plan) + message = "" + if plan.subscription? + message = "You can now post up to 4 jobs at any time" + elsif plan.one_time? + message = "You can now post one job for 30 days" + end + message + end +end diff --git a/app/mailers/weekly_digest.rb b/app/mailers/weekly_digest.rb deleted file mode 100644 index c4008b8c..00000000 --- a/app/mailers/weekly_digest.rb +++ /dev/null @@ -1,156 +0,0 @@ -class WeeklyDigest < ActionMailer::Base - include Resque::Mailer if Rails.env.production? - include ActionView::Helpers::TextHelper - include ActiveSupport::Benchmarkable - add_template_helper(UsersHelper) - add_template_helper(ProtipsHelper) - add_template_helper(ApplicationHelper) - - def self.queue - :digest_mailer - end - - default_url_options[:host] = "coderwall.com" - default_url_options[:only_path] = false - default from: '"Coderwall" <support@coderwall.com>' - - SPAM_NOTICE = "You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. To change your notification preferences, you can update your email settings here: http://coderwall.com/settings#email or immediately unsubscribe by clicking this link %unsubscribe_url%" - - - WEEKLY_DIGEST_EVENT = 'weekly_digest' - ACTIVITY_SUBJECT_PREFIX = "[Coderwall]" - - def weekly_digest(username) - headers['X-Mailgun-Variables'] = {email_type: WEEKLY_DIGEST_EVENT}.to_json - track_campaign(WEEKLY_DIGEST_EVENT) - - @user = User.with_username(username) - since = [@user.last_request_at || Time.at(0), 1.week.ago].min - - benchmark "digest:stats" do - @stats = @user.activity_stats(since, true).sort_by { |stat, count| -(count || 0) } - end - - #@networks = @user.following_networks.most_protips - @user.touch(:last_email_sent) - @issue = weekly_digest_utm - benchmark "digest:protips" do - @protips = protips_for(@user, 6) - end - - abort_delivery if @protips.blank? || @protips.count < 4 - - benchmark "digest:stars" do - @stars = @user.following_users.where('last_request_at > ?', 1.month.ago) - @star_stat = star_stat_for_this_week - @star_stat_string = STARS[@star_stat] - @most = star_stats(@stars).sort_by { |star| -star[@star_stat] }.first - @most = nil if @most && (@most[@star_stat] <= 0) - end - - benchmark "digest:team" do - @team, @job = get_team_and_job_for(@user) - end - - benchmark "digest:mark_sent" do - mark_sent(@job) unless @job.nil? - end - - mail to: @user.email, subject: "#{ACTIVITY_SUBJECT_PREFIX} #{weekly_digest_subject_for(@user, @stats, @most)}" - rescue Exception => e - abort_delivery(e.message) - end - - def abort_delivery(message="") - #self.perform_deliveries = false - Rails.logger.error "sending bad email:#{message}" - end - - if Rails.env.development? - class Preview < MailView - - def weekly_digest - user = User.active.order("Random()").first - mail = ::WeeklyDigest.weekly_digest(user.username) - mail - end - - end - end - - private - def track_campaign(id) - headers['X-Mailgun-Campaign-Id'] = id - end - - def benchmark(message, options={}) - Rails.env.development? ? super(message, options) : yield - end - - def weekly_digest_subject_for(user, stats, most) - stat_mention = (stats.first && (stats.first[1] >= 5) && "including #{stats.first[1]} new #{stats.first[0].to_s.humanize.downcase}") || nil - "Your weekly brief #{stat_mention} " - end - - def star_stats(stars, since=1.week.ago) - stars.collect { |star| star.activity_stats(since, true) }.each_with_index.map { |stat, index| stat.merge(user: stars[index]) } - end - - def protips_for(user, how_many=6) - if user.last_request_at && user.last_request_at < 5.days.ago - protips = Protip.trending_for_user(user).first(how_many) - protips += Protip.trending.first(how_many-protips.count) if protips.count < how_many - else - protips =Protip.hawt_for_user(user).results.first(how_many) - protips +=Protip.hawt.results.first(how_many) if protips.count < how_many - end - protips - end - - def mark_all_sent(mailables) - mailables.map { |mailable| mark_sent(mailable) } - end - - def mark_sent(mailable) - SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: mailable) - end - - def already_sent?(mailable, user) - SentMail.where(user_id: user.id, mailable_id: mailable.id, mailable_type: mailable.class.name).exists? - end - - STARS = {protip_upvotes: "pro tip upvotes", followers: "followers", endorsements: "endorsements", protips_count: "protips"} - - def star_stat_for_this_week - STARS.keys[week_of_the_month % 4] - end - - def week_of_the_month - Date.today.cweek - Date.today.at_beginning_of_month.cweek - end - - def teams_for_user(user) - Team.most_relevant_featured_for(user).select { |team| team.hiring? } - end - - def weekly_digest_utm - { - utm_campaign: "weekly_digest", - utm_content: Date.today.midnight, - utm_medium: "email" - } - end - - def get_team_and_job_for(user) - if user.team.try(:hiring?) - [user.team, user.team.jobs.sample] - else - teams = teams_for_user(user) - teams.each do |team| - best_job = team.best_positions_for(user).detect { |job| (job.team_document_id == user.team_document_id) or !already_sent?(job, user) } - return [team, best_job] unless best_job.nil? - end - end - [nil, nil] - end -end diff --git a/app/mailers/weekly_digest_mailer.rb b/app/mailers/weekly_digest_mailer.rb new file mode 100644 index 00000000..ac5ee2a4 --- /dev/null +++ b/app/mailers/weekly_digest_mailer.rb @@ -0,0 +1,138 @@ +# TODO extract this from this project. +# TODO, Write all the specs +class WeeklyDigestMailer < ApplicationMailer + + add_template_helper(UsersHelper) + add_template_helper(ProtipsHelper) + add_template_helper(ApplicationHelper) + + def self.queue + :digest_mailer + end + + SPAM_NOTICE = "You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. To change your notification preferences, you can update your email settings here: http://coderwall.com/settings#email or immediately unsubscribe by clicking this link %unsubscribe_url%" + + WEEKLY_DIGEST_EVENT = 'weekly_digest' + + ################################################################################# + def weekly_digest(username) + headers['X-Mailgun-Variables'] = {email_type: WEEKLY_DIGEST_EVENT}.to_json + track_campaign(WEEKLY_DIGEST_EVENT) + + @user = User.find_by_username(username) + since = [@user.last_request_at || Time.at(0), 1.week.ago].min + + # benchmark "digest:stats" do + @stats = @user.activity_stats(since, true).sort_by { |stat, count| -(count || 0) } + + #@networks = @user.following_networks.most_protips + @user.touch(:last_email_sent) + @issue = weekly_digest_utm + # + # benchmark "digest:protips" do + @protips = protips_for(@user, 6) + + abort_delivery if @protips.blank? || @protips.count < 4 + + # benchmark "digest:stars" do + stars = @user.following_users.where('last_request_at > ?', 1.month.ago) + @star_stat = star_stat_for_this_week + @star_stat_string = STARS[@star_stat] + @most = star_stats(stars).sort_by { |star| -star[@star_stat] }.first + @most = nil if @most && (@most[@star_stat] <= 0) + + # benchmark "digest:team" do + @team, @job = get_team_and_job_for(@user) + + # benchmark "digest:mark_sent" do + mark_sent(@job) unless @job.nil? + + mail to: @user.email, subject: "#{ACTIVITY_SUBJECT_PREFIX} #{weekly_digest_subject_for(@user, @stats, @most)}" + + rescue Exception => e + abort_delivery(e) + end + ################################################################################# + + def abort_delivery(error=nil) + #self.perform_deliveries = false + Rails.logger.error "sending bad email:#{error.message}" + end + + private + + def track_campaign(id) + headers['X-Mailgun-Campaign-Id'] = id + end + + def benchmark(message, options={}) + Rails.env.development? ? super(message, options) : yield + end + + def weekly_digest_subject_for(user, stats, most) + stat_mention = (stats.first && (stats.first[1] >= 5) && "including #{stats.first[1]} new #{stats.first[0].to_s.humanize.downcase}") || nil + "Your weekly brief #{stat_mention} " + end + + def star_stats(stars, since=1.week.ago) + stars.collect { |star| star.activity_stats(since, true) }.each_with_index.map { |stat, index| stat.merge(user: stars[index]) } + end + + def protips_for(user, how_many=6) + if user.last_request_at && user.last_request_at < 5.days.ago + protips = Protip.trending_for_user(user).first(how_many) + protips += Protip.trending.first(how_many-protips.count) if protips.count < how_many + else + protips = Protip.hawt_for_user(user).results.first(how_many) + protips +=Protip.hawt.results.first(how_many) if protips.count < how_many + end + protips + end + + def mark_all_sent(mailables) + mailables.map { |mailable| mark_sent(mailable) } + end + + def mark_sent(mailable) + SentMail.create!(user: @user, sent_at: @user.last_email_sent, mailable: mailable) + end + + def already_sent?(mailable, user) + SentMail.where(user_id: user.id, mailable_id: mailable.id, mailable_type: mailable.class.name).exists? + end + + STARS = {protip_upvotes: "pro tip upvotes", followers: "followers", endorsements: "endorsements", protips_count: "protips"} + + def star_stat_for_this_week + STARS.keys[week_of_the_month % 4] + end + + def week_of_the_month + Date.today.cweek - Date.today.at_beginning_of_month.cweek + end + + def teams_for_user(user) + Team.most_relevant_featured_for(user).select { |team| team.hiring? } + end + + def weekly_digest_utm + { + utm_campaign: "weekly_digest", + utm_content: Date.today.midnight, + utm_medium: "email" + } + end + + def get_team_and_job_for(user) + if user.team.try(:hiring?) + [user.team, user.team.jobs.sample] + else + teams = teams_for_user(user) + teams.each do |team| + best_job = team.best_positions_for(user).detect { |job| (job.team_id == user.team_id) or !already_sent?(job, user) } + return [team, best_job] unless best_job.nil? + end + end + [nil, nil] + end +end diff --git a/app/mappings/opportunity_mapping.rb b/app/mappings/opportunity_mapping.rb new file mode 100644 index 00000000..559edbcc --- /dev/null +++ b/app/mappings/opportunity_mapping.rb @@ -0,0 +1,34 @@ +module OpportunityMapping + extend ActiveSupport::Concern + + included do + settings analysis: { analyzer: { comma: { 'type' => 'pattern', + 'pattern' => ',' } } } + mapping show: { properties: { + public_id: { type: 'string', index: 'not_analyzed' }, + name: { type: 'string', boost: 100, analyzer: 'snowball' }, + description: { type: 'string', boost: 100, analyzer: 'snowball' }, + designation: { type: 'string', index: 'not_analyzed' }, + opportunity_type: { type: 'string', index: 'not_analyzed' }, + location: { type: 'string', boost: 80, analyzer: 'snowball' }, + location_city: { type: 'string', boost: 80, analyzer: 'snowball' }, + tags: { type: 'string', boost: 50, analyzer: 'comma' }, + link: { type: 'string', index: 'not_analyzed' }, + salary: { type: 'integer', boost: 80, index: 'not_analyzed' }, + created_at: { type: 'string', index: 'not_analyzed' }, + updated_at: { type: 'string', index: 'not_analyzed' }, + expires_at: { type: 'string', index: 'not_analyzed' }, + url: { type: 'string', index: 'not_analyzed' }, + apply: { type: 'boolean', index: 'not_analyzed' }, + team: { type: 'multi_field', index: 'not_analyzed', fields: { + name: { type: 'string', index: 'snowball' }, + slug: { type: 'string', boost: 50, index: 'snowball' }, + id: { type: 'string', index: 'not_analyzed' }, + avatar_url: { type: 'string', index: 'not_analyzed' }, + featured_banner_image: { type: 'string', index: 'not_analyzed' }, + big_image: { type: 'string', index: 'not_analyzed' }, + hiring: { type: 'boolean', index: 'not_analyzed' } + } }, + } } + end +end \ No newline at end of file diff --git a/app/mappings/team_mapping.rb b/app/mappings/team_mapping.rb new file mode 100644 index 00000000..4caef3b4 --- /dev/null +++ b/app/mappings/team_mapping.rb @@ -0,0 +1,7 @@ +module TeamMapping + extend ActiveSupport::Concern + + included do + + end +end diff --git a/app/models/account.rb b/app/models/account.rb deleted file mode 100644 index a224ddd1..00000000 --- a/app/models/account.rb +++ /dev/null @@ -1,155 +0,0 @@ -require 'stripe' - -class Account - include Mongoid::Document - include Mongoid::Timestamps - - embedded_in :team - - field :stripe_card_token - field :stripe_customer_token - field :admin_id - field :trial_end, default: nil - field :plan_ids, type: Array, default: [] - - attr_protected :stripe_customer_token, :admin_id - - validate :stripe_customer_token, presence: true - validate :stripe_card_token, presence: true - validate :admin_id, :payer_is_team_admin - - def payer_is_team_admin - if admin_id.nil? #or !team.admin?(admin) - errors.add(:admin_id, "must be team admin to create an account") - end - end - - def subscribe_to!(plan, force=false) - self.plan_ids = [plan.id] - if force || update_on_stripe(plan) - update_job_post_budget(plan) - self.team.premium = true unless plan.free? - self.team.analytics = plan.analytics - self.team.upgraded_at = Time.now - end - team.save! - end - - def save_with_payment(plan=nil) - if valid? - create_customer unless plan.try(:one_time?) - subscribe_to!(plan) unless plan.nil? - team.save! - return true - else - return false - end - rescue Stripe::CardError => e - Honeybadger.notify(e) if Rails.env.production? - Rails.logger.error "Stripe error while creating customer: #{e.message}" - errors.add :base, e.message - return false - rescue Stripe::InvalidRequestError => e - Honeybadger.notify(e) if Rails.env.production? - Rails.logger.error "Stripe error while creating customer: #{e.message}" - errors.add :base, "There was a problem with your credit card." - # throw e if Rails.env.development? - return false - end - - def customer - Stripe::Customer.retrieve(self.stripe_customer_token) - end - - def admin - User.find(self.admin_id) - end - - def create_customer - new_customer = find_or_create_customer - self.stripe_customer_token = new_customer.id - end - - def find_or_create_customer - if self.stripe_customer_token - customer - else - Stripe::Customer.create(description: "#{admin.email} for #{self.team.name}", card: stripe_card_token) - end - end - - def update_on_stripe(plan) - if plan.subscription? - update_subscription_on_stripe!(plan) - else - charge_on_stripe!(plan) - end - end - - def update_subscription_on_stripe!(plan) - customer && customer.update_subscription(plan: plan.stripe_plan_id, trial_end: self.trial_end) - end - - def charge_on_stripe!(plan) - Stripe::Charge.create( - amount: plan.amount, - currency: plan.currency, - card: self.stripe_card_token, - description: plan.name - ) - end - - def update_job_post_budget(plan) - if plan.free? - team.paid_job_posts = 0 - team.monthly_subscription = false - else - team.valid_jobs = true - - if plan.subscription? - team.monthly_subscription = true - else - team.paid_job_posts += 1 - team.monthly_subscription = false - end - end - end - - def suspend! - team.premium = false - team.analytics = false - team.paid_job_posts = 0 - team.monthly_subscription = false - team.valid_jobs = false - team.save - team.jobs.map { |job| job.deactivate! } - end - - def add_analytics - team.analytics = true - end - - def send_invoice(invoice_id) - Notifier.invoice(self.team.id, nil, invoice_id).deliver - end - - def send_invoice_for(time = Time.now) - Notifier.invoice(self.team.id, time.to_i).deliver - end - - def invoice_for(time) - months_ago = ((Time.now.beginning_of_month-time)/1.month).round - invoices(months_ago).last.to_hash.with_indifferent_access - end - - def invoices(count = 100) - Stripe::Invoice.all( - customer: self.stripe_customer_token, - count: count - ).data - end - - def current_plan - Plan.find(self.plan_ids.first) unless self.plan_ids.blank? - end -end diff --git a/app/models/api_access.rb b/app/models/api_access.rb index 75716375..d2584c6c 100644 --- a/app/models/api_access.rb +++ b/app/models/api_access.rb @@ -1,28 +1,18 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `api_accesses` +# Table name: api_accesses # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`api_key`** | `string(255)` | -# **`awards`** | `text` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# api_key :string(255) +# awards :text +# created_at :datetime +# updated_at :datetime # class ApiAccess < ActiveRecord::Base + #TODO change column to postgresql array serialize :awards, Array - class << self - def for(api_key) - where(api_key: api_key).first - end - end - def can_award?(badge_name) awards.include? badge_name end diff --git a/app/models/audience.rb b/app/models/audience.rb deleted file mode 100644 index f267ca20..00000000 --- a/app/models/audience.rb +++ /dev/null @@ -1,138 +0,0 @@ -class Audience - class << self - def all - { all: nil } - end - - def user(user_id) - { user: user_id } - end - - def users(user_ids) - { users: user_ids } - end - - def team(team_id) - { team: team_id } - end - - def following_user(user_id) - { user_followers: user_id } - end - - def following_team(team_id) - { team_followers: team_id } - end - - def network(network_id) - { network: network_id } - end - - def networks(network_ids) - { networks: network_ids } - end - - def team_reach(team_id) - { team_reach: team_id } - end - - def user_reach(user_id) - { user_reach: user_id } - end - - def admin(queue = nil) - { admin: queue } - end - - def to_channels(audience) - audiences = expand(audience) - audiences.map { |a| to_channel(a) } - end - - def to_key(audience) - to_channels(audience).map { |channel| channel_to_key(channel) } - end - - def channel_to_key(channel) - "activityfeed:#{channel}" - end - - def expand(audience) - audience.keys.map(&:to_sym).collect do |target| - if target == :user_reach - user = User.find(audience[target]) - expand_reach(user) unless user.nil? - elsif target == :team_reach - team = Team.find(audience[target]) - expand_reach(team) unless team.nil? - elsif target == :admin - User.admins.map do |admin| - admin.id - end - elsif target == :team - team = Team.find(audience[target]) - team.team_members.map do |team_member| - team_member.id - end unless team.nil? - elsif target == :user_followers - user = User.find(audience[target]) - expand_followers(user) unless user.nil? - elsif target == :team_followers - team = Team.find(audience[target]) - expand_followers(team) unless team.nil? - elsif target == :all - expand_all_users - elsif target == :network - network = Network.find(audience[target]) - expand_network(network) unless network.nil? - elsif target == :networks - networks = Network.where(id: audience[target]) - expand_networks(networks) - else - audience[target] - end - end.flatten.compact.uniq.map { |user_id| Audience.user(user_id) } - end - - private - def expand_followers(user_or_team) - user_or_team.followers.map do |follower| - follower.id - end - end - - def expand_all_users - ActiveRecord::Base.connection.select_values(User.select(:id).to_sql) - end - - def expand_network(network) - ActiveRecord::Base.connection.select_values(network.members.select(:id).to_sql) - end - - def expand_networks(networks) - ActiveRecord::Base.connection.select_values(Follow.where(followable_id: networks.map(&:id)).where(followable_type: Network.name).select(:follower_id).to_sql) - end - - def expand_reach(user_or_team) - audiences = [] - audiences.concat(expand_followers(user_or_team)) - - if user_or_team.is_a?(Team) - team = Team.find(user_or_team) - team.team_members.each do |team_member| - audiences.concat(expand_followers(team_member)) - end unless team.nil? - else - team = User.find(user_or_team).try(:team) - audiences.concat(expand_followers(team)) unless team.nil? - end - audiences - end - - def to_channel(audience) - channel_name = Rails.env + ":" + audience.map { |k, v| "#{k}:#{v}" }.first - #obfiscate for production - (Rails.env.development? or Rails.env.test?) ? channel_name : Digest::MD5.hexdigest(channel_name) - end - end -end \ No newline at end of file diff --git a/app/models/available_coupon.rb b/app/models/available_coupon.rb deleted file mode 100644 index 996561cc..00000000 --- a/app/models/available_coupon.rb +++ /dev/null @@ -1,24 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `available_coupons` -# -# ### Columns -# -# Name | Type | Attributes -# ------------------------ | ------------------ | --------------------------- -# **`codeschool_coupon`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`peepcode_coupon`** | `string(255)` | -# **`recipes_coupon`** | `string(255)` | -# -# ### Indexes -# -# * `index_available_coupons_on_codeschool_coupon` (_unique_): -# * **`codeschool_coupon`** -# * `index_available_coupons_on_peepcode_coupon` (_unique_): -# * **`peepcode_coupon`** -# - -class AvailableCoupon < ActiveRecord::Base -end diff --git a/app/models/badge.rb b/app/models/badge.rb index 9c0bc4a8..b68538e3 100644 --- a/app/models/badge.rb +++ b/app/models/badge.rb @@ -1,51 +1,36 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `badges` +# Table name: badges # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`badge_class_name`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_badges_on_user_id`: -# * **`user_id`** -# * `index_badges_on_user_id_and_badge_class_name` (_unique_): -# * **`user_id`** -# * **`badge_class_name`** +# id :integer not null, primary key +# created_at :datetime +# updated_at :datetime +# user_id :integer +# badge_class_name :string(255) # class Badge < ActiveRecord::Base - include ResqueSupport::Basic - belongs_to :user, counter_cache: :badges_count, touch: true validates_uniqueness_of :badge_class_name, scope: :user_id after_create :generate_event - scope :of_type, lambda { |badge| where(badge_class_name: badge.class.name) } + scope :of_type, ->(badge) { where(badge_class_name: badge.class.name) } + + def self.rename(old_class_name, new_class_name) + Badge.where(badge_class_name: old_class_name).map { |badge| badge.update_attribute(:badge_class_name, new_class_name) } - class << self - def rename(old_class_name, new_class_name) - Badge.where(badge_class_name: old_class_name).map { |badge| badge.update_attribute(:badge_class_name, new_class_name) } - Fact.where('metadata LIKE ?', "%#{old_class_name}%").each do |fact| - if fact.metadata[:award] == old_class_name - fact.metadata[:award] = new_class_name - end - fact.save + Fact.where('metadata LIKE ?', "%#{old_class_name}%").each do |fact| + if fact.metadata[:award] == old_class_name + fact.metadata[:award] = new_class_name end - ApiAccess.where('awards LIKE ?', "%#{old_class_name}%").each do |api_access| - if api_access.awards.delete(old_class_name) - api_access.awards << new_class_name - end - api_access.save + fact.save + end + + ApiAccess.where('awards LIKE ?', "%#{old_class_name}%").each do |api_access| + if api_access.awards.delete(old_class_name) + api_access.awards << new_class_name end + api_access.save end end @@ -67,12 +52,12 @@ def visible? def tokenized_skill_name @tokenized_skill_name ||= begin - if badge_class.respond_to?(:skill) - Skill.tokenize(badge_class.skill) - else - '' - end - end + if badge_class.respond_to?(:skill) + Skill.tokenize(badge_class.skill) + else + '' + end + end end def next @@ -108,18 +93,17 @@ def badge_class end def generate_event - enqueue(GenerateEvent, self.event_type, Audience.user_reach(self.user.id), self.to_event_hash, 30.minutes) - enqueue(GenerateEvent, self.event_type, Audience.user(self.user.id), self.to_event_hash, 30.minutes) + GenerateEventJob.perform_async(self.event_type, Audience.user_reach(self.user.id), self.to_event_hash, 30.minutes) + GenerateEventJob.perform_async(self.event_type, Audience.user(self.user.id), self.to_event_hash, 30.minutes) end def to_event_hash { achievement: { name: self.display_name, description: (self.try(:for) || self.try(:description)), percentage_of_achievers: self.percent_earned, achiever: { first_name: self.user.short_name }, image_path: self.image_path }, - user: { username: self.user.username } } + user: { username: self.user.username } } end def event_type :unlocked_achievement end - end diff --git a/app/models/badge_justification.rb b/app/models/badge_justification.rb deleted file mode 100644 index 80af710d..00000000 --- a/app/models/badge_justification.rb +++ /dev/null @@ -1,4 +0,0 @@ -class BadgeJustification < ActiveRecord::Base - belongs_to :badge - validates_uniqueness_of :description, scope: :badge_id -end diff --git a/app/models/badges/changelogd.rb b/app/models/badges/changelogd.rb deleted file mode 100644 index cc380bb5..00000000 --- a/app/models/badges/changelogd.rb +++ /dev/null @@ -1,79 +0,0 @@ -!class Changelogd < BadgeBase - describe "Changelog'd", - skill: 'Open Source', - description: "Have an original repo featured on the Changelog show", - for: "having an original repo featured on the Changelog show.", - image_name: 'changelogd.png', - weight: 2, - providers: :github - - API_URI = "http://thechangelog.com/api/read" # tagged=episode & tagged=github - REPO = /([http|https]*:\/\/github\.com\/[\w | \-]*\/[\w | \-]*)/i - USERNAME = /github\.com\/([\w | \-]*)\/[\w | \-]*/i - REPO_NAME = /github\.com\/[\S|\D]*\/([\S|\D]*)/i - - def reasons - @reasons ||= begin - links = user.facts.select do |fact| - fact.tagged?('changedlog') - end.collect do |fact| - begin - match = fact.url.match(REPO_NAME) - { match[1] => fact.url } - rescue - { fact.url => fact.url } - end - end - { links: links } - end - end - - def award? - !reasons[:links].empty? - end - - class << self - def perform - create_assignments! all_repos - end - - def quick_refresh - create_assignments! latest_repos - end - - def refresh - perform - end - - def create_assignments!(repos) - repos.each do |repo_url| - match = repo_url.match(USERNAME) - break if match.nil? - github_username = match[1] - Fact.append!("#{repo_url}:changedlogd", "github:#{github_username}", "Repo featured on Changelogd", Time.now, repo_url, ['repo', 'changedlog']) - end - end - - def latest_repos - repos_in(API_URI).flatten.uniq - end - - def all_repos - repos = [] - (1...20).each do |time| - start = ((time * 50) + 1) - 50 - repos << repos_in(API_URI + "?start=#{start}&num=50") - end - repos.flatten.uniq - end - - def repos_in(url) - puts "url #{url}" - res = Servant.get(url) - doc = Nokogiri::HTML(res.to_s) - doc.xpath('//post/link-description').collect do |element| - element.content.scan(REPO) - end - end - end -end diff --git a/app/models/badges/early_adopter.rb b/app/models/badges/early_adopter.rb deleted file mode 100644 index fb2d5cde..00000000 --- a/app/models/badges/early_adopter.rb +++ /dev/null @@ -1,26 +0,0 @@ -class EarlyAdopter < BadgeBase - describe "Opabinia", - skill: 'Open Source', - description: "Started social coding on GitHub within 6 months of its first signs of life", - for: "starting social coding on GitHub within 6 months of its first signs of life.", - image_name: 'earlyadopter.png', - providers: :github, - weight: 2 - - FOUNDING_DATE = Date.parse('Oct 19, 2007') - - def reasons - found = user.facts.detect do |fact| - fact.tagged?('github', 'account-created') - end - if found && found.relevant_on <= FOUNDING_DATE + 6.months - "Created an account within GitHub's first 6 months on #{found.relevant_on.to_date.to_s(:long).to_s.capitalize}." - else - nil - end - end - - def award? - !reasons.blank? - end -end \ No newline at end of file diff --git a/app/models/blog_post.rb b/app/models/blog_post.rb deleted file mode 100644 index 98fd8349..00000000 --- a/app/models/blog_post.rb +++ /dev/null @@ -1,86 +0,0 @@ -class BlogPost - extend ActiveModel::Naming - - BLOG_ROOT = Rails.root.join("app", "blog").expand_path - - class PostNotFound < StandardError - end - - attr_reader :id - - class << self - def all_public - all.select(&:public?) - end - - def all - Rails.cache.fetch("blog_posts", expires_in: 30.minutes) do - all_entries.map { |f| to_post(f) } - end - end - - def first - all.first - end - - def find(id) - found_post = all_entries.select { |f| id_of(f) == id }.first - if found_post.nil? - raise BlogPost::PostNotFound, "Couldn't find post for id #{id}" - else - to_post found_post - end - end - - private - - def to_post(pathname) - BlogPost.new id_of(pathname), BLOG_ROOT.join(pathname) - end - - def all_entries - BLOG_ROOT.entries.reject do |entry| - entry.directory? || entry.to_s =~ /^draft/ - end.sort.reverse - end - - def id_of(pathname) - pathname.basename.to_s.gsub(pathname.extname, "") - end - end - - def initialize(id, content) - @id, @content = id, content - end - - def public? - metadata['private'].blank? - end - - def title - metadata['title'] - end - - def author - metadata['author'] - end - - def posted - DateTime.parse metadata['posted'] - end - - def html - Kramdown::Document.new(cached_content[2]).to_html.html_safe - end - - private - - def metadata - YAML.load(cached_content[1]) - end - - def cached_content - @cached_content ||= @content.read.split("---") - end - -end \ No newline at end of file diff --git a/app/models/comment.rb b/app/models/comment.rb index 5739db40..4e5ade48 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -1,63 +1,62 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `comments` +# Table name: comments # -# ### Columns -# -# Name | Type | Attributes -# ------------------------ | ------------------ | --------------------------- -# **`comment`** | `text` | `default("")` -# **`commentable_id`** | `integer` | -# **`commentable_type`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`likes_cache`** | `integer` | `default(0)` -# **`likes_value_cache`** | `integer` | `default(0)` -# **`title`** | `string(50)` | `default("")` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_comments_on_commentable_id`: -# * **`commentable_id`** -# * `index_comments_on_commentable_type`: -# * **`commentable_type`** -# * `index_comments_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# title :string(50) default("") +# comment :text default("") +# protip_id :integer +# user_id :integer +# likes_cache :integer default(0) +# likes_value_cache :integer default(0) +# created_at :datetime +# updated_at :datetime +# likes_count :integer default(0) +# user_name :string(255) +# user_email :string(255) +# user_agent :string(255) +# user_ip :inet +# request_format :string(255) +# spam_reports_count :integer default(0) +# state :string(255) default("active") # class Comment < ActiveRecord::Base - include ResqueSupport::Basic - include ActsAsCommentable::Comment + include AuthorDetails + include SpamFilter - belongs_to :commentable, polymorphic: true - has_many :likes, as: :likable, dependent: :destroy, after_add: :update_likes_cache, after_remove: :update_likes_cache + belongs_to :protip, touch: true + has_many :likes, as: :likable, dependent: :destroy after_create :generate_event after_save :commented_callback - default_scope order: 'likes_cache DESC, created_at ASC' + default_scope { order('likes_cache DESC').order(:created_at) } + + belongs_to :user, autosave: true - belongs_to :user + scope :showable, -> { with_states(:active, :reported_as_spam) } alias_method :author, :user alias_attribute :body, :comment validates :comment, length: { minimum: 2 } - def self.latest_comments_as_strings(count=5) - Comment.unscoped.order("created_at DESC").limit(count).collect do |comment| - "#{comment.comment} - http://coderwall.com/p/#{comment.commentable.try(:public_id)}" + state_machine initial: :active do + event :report_spam do + transition active: :reported_as_spam end - end - def commented_callback - commentable.try(:commented) + event :mark_as_spam do + transition any => :marked_as_spam + end + + after_transition any => :marked_as_spam do |comment| + comment.spam! + end end - def update_likes_cache(like) - like.destroyed? ? decrement_likes_cache(like.value) : increment_likes_cache(like.value) + def commented_callback + protip.commented end def like_by(user) @@ -67,11 +66,8 @@ def like_by(user) end end - def liked(how_much) - unless how_much.nil? - increment_likes_cache(how_much) - commented_callback - end + def liked(how_much=nil) + commented_callback unless how_much.nil? end def liked_by?(user) @@ -98,53 +94,41 @@ def mentioned?(username) username_mentions.include? username end - def to_commentable_public_hash - self.commentable.try(:to_public_hash).merge( + def to_protip_public_hash + protip.to_public_hash.merge( { - comments: self.commentable.comments.count, + comments: protip.comments.count, likes: likes.count, } ) end def commenting_on_own? - self.author_id == self.commentable.try(:user_id) + user_id == protip.user_id end private - def decrement_likes_cache(value) - self.likes_cache -= 1 - self.likes_value_cache -= value - save(validate: false) - end - - def increment_likes_cache(value) - self.likes_cache += 1 - self.likes_value_cache += value - save(validate: false) - end - def generate_event(options={}) event_type = event_type(options) data = to_event_hash(options) - enqueue(GenerateEvent, event_type, event_audience(event_type), data, 1.minute) + GenerateEventJob.perform_async(event_type, event_audience(event_type), data, 1.minute) if event_type == :new_comment - Notifier.new_comment(self.commentable.try(:user).try(:username), self.author.username, self.id).deliver unless commenting_on_own? + NotifierMailer.new_comment(protip.user_id, user_id, id).deliver unless commenting_on_own? if (mentioned_users = self.mentions).any? - enqueue(GenerateEvent, :comment_reply, Audience.users(mentioned_users.map(&:id)), data, 1.minute) + GenerateEventJob.perform_async(:comment_reply, Audience.users(mentioned_users.pluck(:id)), data, 1.minute) mentioned_users.each do |mention| - Notifier.comment_reply(mention.username, self.author.username, self.id).deliver + NotifierMailer.comment_reply(mention.username, self.author.username, self.id).deliver end end end end def to_event_hash(options={}) - event_hash = to_commentable_public_hash.merge!({ user: { username: user && user.username }, body: {} }) + event_hash = to_protip_public_hash.merge!({ user: { username: user && user.username }, body: {} }) event_hash[:created_at] = event_hash[:created_at].to_i unless options[:liker].nil? @@ -155,12 +139,11 @@ def to_event_hash(options={}) end def event_audience(event_type, options ={}) - audience = {} case event_type - when :new_comment - audience = Audience.user(self.commentable.try(:user_id)) - else - audience = Audience.user(self.author_id) + when :new_comment + audience = Audience.user(protip.user_id) + else + audience = Audience.user(author_id) end audience end diff --git a/app/models/concerns/author_details.rb b/app/models/concerns/author_details.rb new file mode 100644 index 00000000..ca026ad4 --- /dev/null +++ b/app/models/concerns/author_details.rb @@ -0,0 +1,13 @@ +module AuthorDetails + extend ActiveSupport::Concern + + included do + before_save do + self.user_name = user.name + self.user_email = user.email + self.user_agent = user.last_ua + self.user_ip = user.last_ip + end + end + +end \ No newline at end of file diff --git a/app/models/concerns/featurable.rb b/app/models/concerns/featurable.rb index 70c10da6..95175589 100644 --- a/app/models/concerns/featurable.rb +++ b/app/models/concerns/featurable.rb @@ -8,11 +8,11 @@ module Featurable end def hawt_service - @hawt_service ||= Services::Protips::HawtService.new(self) + @hawt_service ||= HawtService.new(self) end def hawt? - @is_hawt ||= hawt_service.hawt? + hawt_service.hawt? end def feature! diff --git a/app/models/concerns/protip_mapping.rb b/app/models/concerns/protip_mapping.rb new file mode 100644 index 00000000..1aedf544 --- /dev/null +++ b/app/models/concerns/protip_mapping.rb @@ -0,0 +1,64 @@ +module ProtipMapping + extend ActiveSupport::Concern + + included do + settings analysis: { + analyzer: { + comma: {"type" => "pattern", + "pattern" => ",", + "filter" => "keyword" + } + + } + } + + mapping show: {properties: { + public_id: {type: 'string', index: 'not_analyzed'}, + kind: {type: 'string', index: 'not_analyzed'}, + title: {type: 'string', boost: 100, analyzer: 'snowball'}, + body: {type: 'string', boost: 80, analyzer: 'snowball'}, + html: {type: 'string', index: 'not_analyzed'}, + tags: {type: 'string', boost: 80, analyzer: 'comma'}, + upvotes: {type: 'integer', index: 'not_analyzed'}, + url: {type: 'string', index: 'not_analyzed'}, + upvote_path: {type: 'string', index: 'not_analyzed'}, + popular_score: {type: 'double', index: 'not_analyzed'}, + score: {type: 'double', index: 'not_analyzed'}, + trending_score: {type: 'double', index: 'not_analyzed'}, + only_link: {type: 'string', index: 'not_analyzed'}, + link: {type: 'string', index: 'not_analyzed'}, + team: {type: 'multi_field', index: 'not_analyzed', fields: { + name: {type: 'string', index: 'snowball'}, + slug: {type: 'string', boost: 50, index: 'snowball'}, + avatar: {type: 'string', index: 'not_analyzed'}, + profile_path: {type: 'string', index: 'not_analyzed'}, + hiring: {type: 'boolean', index: 'not_analyzed'} + }}, + views_count: {type: 'integer', index: 'not_analyzed'}, + comments_count: {type: 'integer', index: 'not_analyzed'}, + best_stat: {type: 'multi_field', index: 'not_analyzed', fields: { + name: {type: 'string', index: 'not_analyzed'}, + value: {type: 'integer', index: 'not_analyzed'}, + }}, + comments: {type: 'object', index: 'not_analyzed', properties: { + title: {type: 'string', boost: 100, analyzer: 'snowball'}, + body: {type: 'string', boost: 80, analyzer: 'snowball'}, + likes: {type: 'integer', index: 'not_analyzed'} + }}, + networks: {type: 'string', boost: 50, analyzer: 'comma'}, + upvoters: {type: 'integer', boost: 50, index: 'not_analyzed'}, + created_at: {type: 'date', boost: 10, index: 'not_analyzed'}, + featured: {type: 'boolean', index: 'not_analyzed'}, + flagged: {type: 'boolean', index: 'not_analyzed'}, + created_automagically: {type: 'boolean', index: 'not_analyzed'}, + reviewed: {type: 'boolean', index: 'not_analyzed'}, + user: {type: 'multi_field', index: 'not_analyzed', fields: { + username: {type: 'string', boost: 40, index: 'not_analyzed'}, + name: {type: 'string', boost: 40, index: 'not_analyzed'}, + user_id: {type: 'integer', boost: 40, index: 'not_analyzed'}, + profile_path: {type: 'string', index: 'not_analyzed'}, + avatar: {type: 'string', index: 'not_analyzed'}, + about: {type: 'string', index: 'not_analyzed'}, + }}}} + end +end diff --git a/app/models/concerns/protip_networkable.rb b/app/models/concerns/protip_networkable.rb new file mode 100644 index 00000000..9ee356ee --- /dev/null +++ b/app/models/concerns/protip_networkable.rb @@ -0,0 +1,19 @@ +module ProtipNetworkable + extend ActiveSupport::Concern + + included do + has_many :network_protips + has_many :networks, through: :network_protips + after_create :update_network + + end + + def orphan? + self.networks.empty? + end + + private + def update_network + UpdateNetworkJob.perform_async(id) + end +end diff --git a/app/models/concerns/protip_ownership.rb b/app/models/concerns/protip_ownership.rb new file mode 100644 index 00000000..084d90de --- /dev/null +++ b/app/models/concerns/protip_ownership.rb @@ -0,0 +1,8 @@ +module ProtipOwnership + extend ActiveSupport::Concern + + def owned_by?(owner) + user == owner || owner.admin? + end + alias_method :owner?, :owned_by? +end \ No newline at end of file diff --git a/app/models/concerns/spam_filter.rb b/app/models/concerns/spam_filter.rb new file mode 100644 index 00000000..8c6f5253 --- /dev/null +++ b/app/models/concerns/spam_filter.rb @@ -0,0 +1,20 @@ +module SpamFilter + extend ActiveSupport::Concern + + included do + has_one :spam_report, as: :spammable + include Rakismet::Model + + rakismet_attrs author: :user_name, + author_email: :user_email, + content: :body, + blog: ENV['AKISMET_URL'], + user_ip: :remote_ip, + user_agent: :user_agent + + after_save do + AnalyzeSpamJob.perform_async({ id: id, klass: self.class.name }) + end + + end +end diff --git a/app/models/concerns/team_analytics.rb b/app/models/concerns/team_analytics.rb new file mode 100644 index 00000000..0a0ad3b0 --- /dev/null +++ b/app/models/concerns/team_analytics.rb @@ -0,0 +1,88 @@ +module TeamAnalytics + extend ActiveSupport::Concern + # TODO, Get out out redis + included do + SECTIONS = %w(team-details members about-members big-headline big-quote challenges favourite-benefits + organization-style office-images jobs stack protips why-work interview-steps + locations team-blog) + + def record_exit(viewer, exit_url, exit_target_type, furthest_scrolled, time_spent) + epoch_now = Time.now.to_i + user_id = (viewer.respond_to?(:id) && viewer.try(:id)) || viewer + data = visitor_data(exit_url, exit_target_type, furthest_scrolled, time_spent, user_id, epoch_now, nil) + Redis.current.zadd(user_detail_views_key, epoch_now, data) + end + + def detailed_visitors(since = 0) + Redis.current.zrangebyscore(user_detail_views_key, since, Time.now.to_i).map do |visitor_string| + visitor = some_crappy_method(visitor_string) + visitor[:user] = identify_visitor(visitor[:user_id]) + visitor + end + end + + def simple_visitors(since = 0) + all_visitors = Redis.current.zrangebyscore(user_views_key, since, Time.now.to_i, withscores: true) + + Redis.current.zrangebyscore(user_anon_views_key, since, Time.now.to_i, withscores: true) + Hash[*all_visitors.flatten].map do |viewer_id, timestamp| + visitor_data(nil, nil, nil, 0, viewer_id, timestamp, identify_visitor(viewer_id)) + end + end + + def visitors(since = 0) + detailed_visitors = self.detailed_visitors + first_detailed_visit = detailed_visitors.last.nil? ? updated_at : detailed_visitors.first[:visited_at] + self.detailed_visitors(since) + simple_visitors(since == 0 ? first_detailed_visit.to_i : since) + end + + def aggregate_visitors(since = 0) + aggregate = {} + visitors(since).map do |visitor| + user_id = visitor[:user_id].to_i + aggregate[user_id] ||= visitor + aggregate[user_id].merge!(visitor) do |key, old, new| + case key + when :time_spent + old.to_i + new.to_i + when :visited_at + [old.to_i, new.to_i].max + when :furthest_scrolled + SECTIONS[[SECTIONS.index(old) || 0, SECTIONS.index(new) || 0].max] + else + old.nil? ? new : old + end + end + aggregate[user_id][:visits] ||= 0 + aggregate[user_id][:visits] += 1 + + end + aggregate.values.sort { |a, b| b[:visited_at] <=> a[:visited_at] } + end + + def sections_up_to(furthest) + SECTIONS.slice(0, SECTIONS.index(furthest)) + end + + def number_of_completed_sections(*excluded_sections) + completed_sections = 0 + + sections = (SECTIONS - excluded_sections).map do |section| + "has_#{section.tr('-', '_')}?" + end + sections.each do |section_complete| + completed_sections += 1 if self.respond_to?(section_complete) && + public_send(section_complete) + end + completed_sections + end + + private + + def some_crappy_method(hash_string_to_parse) + # This code is bad and Mike should feel bad. + JSON.parse('{' + hash_string_to_parse.gsub(/^{|}$/, '').split(', ') + .map { |pair| pair.split('=>') } + .map { |k, v| [k.gsub(/^:(\w*)/, '"\1"'), v == 'nil' ? 'null' : v].join(': ') }.join(', ') + '}') + end + end +end diff --git a/app/models/concerns/team_search.rb b/app/models/concerns/team_search.rb new file mode 100644 index 00000000..bfd0a9fd --- /dev/null +++ b/app/models/concerns/team_search.rb @@ -0,0 +1,32 @@ +module TeamSearch + extend ActiveSupport::Concern + + included do + #include Elasticsearch::Model + + include Tire::Model::Search + include Tire::Model::Callbacks + + mapping team: { + properties: { + id: { type: 'string', index: 'not_analyzed' }, + slug: { type: 'string', index: 'not_analyzed' }, + name: { type: 'string', boost: 100, analyzer: 'snowball' }, + score: { type: 'float', index: 'not_analyzed' }, + size: { type: 'integer', index: 'not_analyzed' }, + avatar: { type: 'string', index: 'not_analyzed' }, + country: { type: 'string', boost: 50, analyzer: 'snowball' }, + url: { type: 'string', index: 'not_analyzed' }, + follow_path: { type: 'string', index: 'not_analyzed' }, + hiring: { type: 'boolean', index: 'not_analyzed' }, + total_member_count: { type: 'integer', index: 'not_analyzed' }, + completed_sections: { type: 'integer', index: 'not_analyzed' }, + members: { type: 'multi_field', fields: { + username: { type: 'string', index: 'not_analyzed' }, + profile_url: { type: 'string', index: 'not_analyzed' }, + avatar: { type: 'string', index: 'not_analyzed' } + } } + } + } + end +end diff --git a/app/models/concerns/user_api.rb b/app/models/concerns/user_api.rb new file mode 100644 index 00000000..4a7b5e2d --- /dev/null +++ b/app/models/concerns/user_api.rb @@ -0,0 +1,15 @@ +module UserApi + extend ActiveSupport::Concern + + def api_key + read_attribute(:api_key) || generate_api_key! + end + + def generate_api_key! + begin + key = SecureRandom.hex(8) + end while User.where(api_key: key).exists? + update_attribute(:api_key, key) + key + end +end diff --git a/app/models/concerns/user_award.rb b/app/models/concerns/user_award.rb new file mode 100644 index 00000000..1abad5fc --- /dev/null +++ b/app/models/concerns/user_award.rb @@ -0,0 +1,32 @@ +module UserAward + extend ActiveSupport::Concern + def award(badge) + badges.of_type(badge).first || badges.build(badge_class_name: badge.class.name) + end + + def add_all_github_badges + GithubBadgeOrgJob.perform_async(username, :add) + end + + def remove_all_github_badges + GithubBadgeOrgJob.perform_async(username, :remove) + end + + def award_and_add_skill(badge) + award badge + if badge.respond_to? :skill + add_skill(badge.skill) + end + end + + def assign_badges(new_badges) + new_badge_classes = new_badges.map { |b| b.class.name } + old_badge_classes = self.badges.map(&:badge_class_name) + + @badges_to_destroy = old_badge_classes - new_badge_classes + + new_badges.each do |badge| + award_and_add_skill(badge) + end + end +end \ No newline at end of file diff --git a/app/models/concerns/user_badge.rb b/app/models/concerns/user_badge.rb new file mode 100644 index 00000000..bfe3296f --- /dev/null +++ b/app/models/concerns/user_badge.rb @@ -0,0 +1,29 @@ +module UserBadge + extend ActiveSupport::Concern + + def has_badges? + badges.any? + end + + def total_achievements + badges_count + end + + def achievement_score + badges.collect(&:weight).sum + end + + def achievements_unlocked_since_last_visit + badges.where("badges.created_at > ?", last_request_at).reorder('badges.created_at ASC') + end + + def oldest_achievement_since_last_visit + badges.where("badges.created_at > ?", last_request_at).order('badges.created_at ASC').last + end + + def check_achievements!(badge_list = Badges.all) + BadgeBase.award!(self, badge_list) + touch(:achievements_checked_at) + save! + end +end diff --git a/app/models/concerns/user_endorser.rb b/app/models/concerns/user_endorser.rb new file mode 100644 index 00000000..9d5df06b --- /dev/null +++ b/app/models/concerns/user_endorser.rb @@ -0,0 +1,19 @@ +module UserEndorser + extend ActiveSupport::Concern + + def endorsements_unlocked_since_last_visit + endorsements_since(last_request_at) + end + + def endorsements_since(since=Time.at(0)) + self.endorsements.where("endorsements.created_at > ?", since).order('endorsements.created_at ASC') + end + + def endorsers(since=Time.at(0)) + User.where(id: self.endorsements.select('distinct(endorsements.endorsing_user_id), endorsements.created_at').where('endorsements.created_at > ?', since).map(&:endorsing_user_id)) + end + + def endorse(user, specialty) + user.add_skill(specialty).endorsed_by(self) + end +end diff --git a/app/models/concerns/user_event_concern.rb b/app/models/concerns/user_event_concern.rb new file mode 100644 index 00000000..a954bcdd --- /dev/null +++ b/app/models/concerns/user_event_concern.rb @@ -0,0 +1,39 @@ +module UserEventConcern + extend ActiveSupport::Concern + + def subscribed_channels + Audience.to_channels(Audience.user(self.id)) + end + + def generate_event(options={}) + event_type = self.event_type(options) + GenerateEventJob.perform_async(event_type, event_audience(event_type, options), self.to_event_hash(options), 30.seconds) + end + + def event_audience(event_type, options={}) + if event_type == :profile_view + Audience.user(self.id) + elsif event_type == :followed_team + Audience.team(options[:team].try(:id)) + end + end + + def to_event_hash(options={}) + event_hash = { user: { username: options[:viewer] || self.username } } + if options[:viewer] + event_hash[:views] = total_views + elsif options[:team] + event_hash[:follow] = { followed: options[:team].try(:name), follower: self.try(:name) } + end + event_hash + end + + def event_type(options={}) + if options[:team] + :followed_team + else + :profile_view + end + end +end + diff --git a/app/models/concerns/user_facts.rb b/app/models/concerns/user_facts.rb new file mode 100644 index 00000000..68862ea0 --- /dev/null +++ b/app/models/concerns/user_facts.rb @@ -0,0 +1,150 @@ +module UserFacts + extend ActiveSupport::Concern + + def build_facts(all=true) + since = (all ? Time.at(0) : self.last_refresh_at) + + build_github_facts(since) + build_lanyrd_facts + build_linkedin_facts + build_bitbucket_facts + build_speakerdeck_facts + build_slideshare_facts + end + + def build_speakerdeck_facts + Rails.logger.info("[FACTS] Building SpeakerDeck facts for #{username}") + begin + if speakerdeck_identity + Speakerdeck.new(speakerdeck).facts + Rails.logger.info("[FACTS] Processed SpeakerDeck facts for #{username}") + else + Rails.logger.info("[FACTS] Skipped SpeakerDeck facts for #{username}") + end + rescue => ex + Rails.logger.error("[FACTS] Unable to build SpeakerDeck facts due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + end + end + + def build_slideshare_facts + Rails.logger.info("[FACTS] Building SlideShare facts for #{username}") + begin + if slideshare_identity + Slideshare.new(slideshare).facts + Rails.logger.info("[FACTS] Processed Slideshare facts for #{username}") + else + Rails.logger.info("[FACTS] Skipped SlideShare facts for #{username}") + end + rescue => ex + Rails.logger.error("[FACTS] Unable to build SlideShare facts due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + end + end + + def build_lanyrd_facts + Rails.logger.info("[FACTS] Building Lanyrd facts for #{username}") + begin + if lanyrd_identity + Lanyrd.new(twitter).facts + Rails.logger.info("[FACTS] Processed Lanyrd facts for #{username}") + else + Rails.logger.info("[FACTS] Skipped Lanyrd facts for #{username}") + end + rescue => ex + Rails.logger.error("[FACTS] Unable to build Lanyrd facts due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + end + end + + def build_bitbucket_facts + Rails.logger.info("[FACTS] Building Bitbucket facts for #{username}") + begin + unless bitbucket.blank? + Bitbucket::V1.new(bitbucket).update_facts! + Rails.logger.info("[FACTS] Processed Bitbucket facts for #{username}") + else + Rails.logger.info("[FACTS] Skipped Bitbucket facts for #{username}") + end + rescue => ex + Rails.logger.error("[FACTS] Unable to build Bitbucket facts due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + end + end + + def build_github_facts(since=Time.at(0)) + Rails.logger.info("[FACTS] Building GitHub facts for #{username}") + begin + if github_profile.present? + github_profile.update_facts! + Rails.logger.info("[FACTS] Processed GitHub facts for #{username}") + else + Rails.logger.info("[FACTS] Skipped GitHub facts for #{username}") + end + rescue => ex + Rails.logger.error("[FACTS] Unable to build GitHub facts due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + end + end + + def build_linkedin_facts + Rails.logger.info("[FACTS] Building LinkedIn facts for #{username}") + begin + if linkedin_identity + LinkedInStream.new(linkedin_token + '::' + linkedin_secret).facts + Rails.logger.info("[FACTS] Processed LinkedIn facts for #{username}") + else + Rails.logger.info("[FACTS] Skipped LinkedIn facts for #{username}") + end + rescue => ex + Rails.logger.error("[FACTS] Unable to build LinkedIn facts due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + end + end + + def repo_facts + self.facts.select { |fact| fact.tagged?('personal', 'repo', 'original') } + end + + def lanyrd_facts + self.facts.select { |fact| fact.tagged?('lanyrd') } + end + + def facts + @facts ||= begin + user_identites = [linkedin_identity, bitbucket_identity, lanyrd_identity, twitter_identity, github_identity, speakerdeck_identity, slideshare_identity, id.to_s].compact + Fact.where(owner: user_identites.collect(&:downcase)).all + end + end + + def times_spoken + facts.select { |fact| fact.tagged?("event", "spoke") }.count + end + + def times_attended + facts.select { |fact| fact.tagged?("event", "attended") }.count + end + + + def add_skills_for_unbadgified_facts + add_skills_for_repo_facts! + add_skills_for_lanyrd_facts! + end + + def add_skills_for_repo_facts! + repo_facts.each do |fact| + fact.metadata[:languages].try(:each) do |language| + unless self.deleted_skill?(language) + skill = add_skill(language) + skill.save + end + end unless fact.metadata[:languages].nil? + end + end + + def add_skills_for_lanyrd_facts! + tokenized_lanyrd_tags.each do |lanyrd_tag| + if self.skills.any? + skill = skill_for(lanyrd_tag) + skill.apply_facts unless skill.nil? + else + skill = add_skill(lanyrd_tag) + end + skill.save unless skill.nil? + end + end +end diff --git a/app/models/concerns/user_following.rb b/app/models/concerns/user_following.rb new file mode 100644 index 00000000..49998be7 --- /dev/null +++ b/app/models/concerns/user_following.rb @@ -0,0 +1,111 @@ +module UserFollowing + extend ActiveSupport::Concern + + def build_follow_list! + if twitter_id + Redis.current.del(followers_key) + people_user_is_following = Twitter.friend_ids(twitter_id.to_i) + people_user_is_following.each do |id| + Redis.current.sadd(followers_key, id) + if user = User.find_by_twitter_id(id.to_s) + self.follow(user) + end + end + end + end + + def follow(user) + super(user) rescue ActiveRecord::RecordNotUnique + end + + def member_of?(network) + self.following?(network) + end + + def following_team?(team) + followed_teams.collect(&:team_id).include?(team.id) + end + + def follow_team!(team) + followed_teams.create!(team: team) + generate_event(team: team) + end + + def unfollow_team!(team) + followed_teams = self.followed_teams.where(team_id: team.id) + followed_teams.destroy_all + end + + def teams_being_followed + Team.find(followed_teams.collect(&:team_id)).sort { |x, y| y.score <=> x.score } + end + + def following_users_ids + self.following_users.pluck(:id) + end + + def following_teams_ids + self.followed_teams.pluck(:team_id) + end + + def following_team_members_ids + User.where(team_id: self.following_teams_ids).pluck(:id) + end + + def following_networks_tags + self.following_networks.map(&:tags).uniq + end + + def following + @following ||= begin + ids = Redis.current.smembers(followers_key) + User.where(twitter_id: ids).order("badges_count DESC").limit(10) + end + end + + def following_in_common(user) + @following_in_common ||= begin + ids = Redis.current.sinter(followers_key, user.followers_key) + User.where(twitter_id: ids).order("badges_count DESC").limit(10) + end + end + + def followed_repos(since=2.months.ago) + Redis.current.zrevrange(followed_repo_key, 0, since.to_i).collect { |link| Users::Github::FollowedRepo.new(link) } + end + + def networks + self.following_networks + end + + def followers_since(since=Time.at(0)) + self.followers_by_type(User.name).where('follows.created_at > ?', since) + end + + def subscribed_to_topic?(topic) + tag = ActsAsTaggableOn::Tag.find_by_name(topic) + tag && following?(tag) + end + + def subscribe_to(topic) + tag = ActsAsTaggableOn::Tag.find_by_name(topic) + follow(tag) unless tag.nil? + end + + def unsubscribe_from(topic) + tag = ActsAsTaggableOn::Tag.find_by_name(topic) + stop_following(tag) unless tag.nil? + end + + def protip_subscriptions + following_tags + end + + def join(network) + self.follow(network) + end + + def leave(network) + self.stop_following(network) + end +end diff --git a/app/models/concerns/user_github.rb b/app/models/concerns/user_github.rb new file mode 100644 index 00000000..fb0509ea --- /dev/null +++ b/app/models/concerns/user_github.rb @@ -0,0 +1,33 @@ +module UserGithub + extend ActiveSupport::Concern + + def clear_github! + self.github_id = nil + self.github = nil + self.github_token = nil + self.joined_github_on = nil + self.github_failures = 0 + save! + end + + def build_github_proptips_fast + repos = followed_repos(since=2.months.ago) + repos.each do |repo| + Importers::Protips::GithubImporter.import_from_follows(repo.description, repo.link, repo.date, self) + end + end + + def build_repo_followed_activity!(refresh=false) + Redis.current.zremrangebyrank(followed_repo_key, 0, Time.now.to_i) if refresh + epoch_now = Time.now.to_i + first_time = refresh || Redis.current.zcount(followed_repo_key, 0, epoch_now) <= 0 + links = GithubOld.new.activities_for(self.github, (first_time ? 20 : 1)) + links.each do |link| + link[:user_id] = self.id + Redis.current.zadd(followed_repo_key, link[:date].to_i, link.to_json) + Importers::Protips::GithubImporter.import_from_follows(link[:description], link[:link], link[:date], self) + end + rescue RestClient::ResourceNotFound + [] + end +end diff --git a/app/models/concerns/user_job.rb b/app/models/concerns/user_job.rb new file mode 100644 index 00000000..508f8c98 --- /dev/null +++ b/app/models/concerns/user_job.rb @@ -0,0 +1,15 @@ +module UserJob + extend ActiveSupport::Concern + + def apply_to(job) + job.apply_for(self) + end + + def already_applied_for?(job) + job.seized_by?(self) + end + + def has_resume? + resume.present? + end +end \ No newline at end of file diff --git a/app/models/concerns/user_linkedin.rb b/app/models/concerns/user_linkedin.rb new file mode 100644 index 00000000..6cb5d2b7 --- /dev/null +++ b/app/models/concerns/user_linkedin.rb @@ -0,0 +1,13 @@ +module UserLinkedin + extend ActiveSupport::Concern + + def clear_linkedin! + self.linkedin = nil + self.linkedin_id = nil + self.linkedin_token = nil + self.linkedin_secret = nil + self.linkedin_public_url = nil + self.linkedin_legacy = nil + save! + end +end diff --git a/app/models/concerns/user_oauth.rb b/app/models/concerns/user_oauth.rb new file mode 100644 index 00000000..80e0cb61 --- /dev/null +++ b/app/models/concerns/user_oauth.rb @@ -0,0 +1,95 @@ +module UserOauth + extend ActiveSupport::Concern + + def apply_oauth(oauth) + case oauth[:provider] + when 'github' + self.github = oauth[:info][:nickname] + self.github_id = oauth[:uid] + self.github_token = oauth[:credentials][:token] + self.blog = oauth[:info][:urls][:Blog] if oauth[:info][:urls] && self.blog.blank? + self.joined_github_on = extract_joined_on(oauth) if self.joined_github_on.blank? + when 'linkedin' + self.linkedin_id = oauth[:uid] + self.linkedin_public_url = oauth[:info][:urls][:public_profile] if oauth[:info][:urls] + self.linkedin_token = oauth[:credentials][:token] + self.linkedin_secret = oauth[:credentials][:secret] + when 'twitter' + self.twitter = oauth[:info][:nickname] + self.twitter_id = oauth[:uid] + self.twitter_token = oauth[:credentials][:token] + self.twitter_secret = oauth[:credentials][:secret] + self.about = extract_from_oauth_extras(:description, oauth) if self.about.blank? + when 'developer' + logger.debug "Using the Developer Strategy for OmniAuth" + logger.ap oauth, :debug + else + raise "Unexpected provider: #{oauth[:provider]}" + end + end + + def extract_joined_on(oauth) + val = extract_from_oauth_extras(:created_at, oauth) + return Date.parse(val) if val + end + + def extract_from_oauth_extras(field, oauth) + oauth[:extra][:raw_info][field] if oauth[:extra] && oauth[:extra][:raw_info] && oauth[:extra][:raw_info][field] + end + + module ClassMethods + def for_omniauth(auth) + if user = find_with_oauth(auth) + user.apply_oauth(auth) + user.save! if user.changed? + else + user = new( + name: auth[:info][:name], + email: auth[:info][:email], + backup_email: auth[:info][:email], + location: location_from(auth)) + #FIXME VCR raise an error when we try to download the image + avatar_url = avatar_url_for(auth) + user.avatar.download! avatar_url if avatar_url.present? && !Rails.env.test? + user.apply_oauth(auth) + user.username = auth[:info][:nickname] + end + user + end + + def find_with_oauth(oauth) + case oauth[:provider] + when 'github' + (oauth[:uid] ? find_by_github_id(oauth[:uid]) : find_by_github(oauth[:info][:nickname])) + when 'linkedin' + find_by_linkedin_id(oauth[:uid]) + when 'twitter' + find_by_twitter_id(oauth[:uid]) + else + fail 'Developer Strategy must not be used in production.' if Rails.env.production? + find_by_email(oauth[:uid]) + end + end + + def location_from(oauth) + if oauth[:extra] && oauth[:extra][:raw_info] && oauth[:extra][:raw_info][:location] + (oauth[:extra][:raw_info][:location].is_a?(Hash) && oauth[:extra][:raw_info][:location][:name]) || oauth[:extra][:raw_info][:location] + elsif oauth[:info] + oauth[:info][:location] + end + end + + def avatar_url_for(oauth) + if oauth[:extra] && oauth[:extra][:raw_info] && oauth[:extra][:raw_info][:gravatar_id] + "https://secure.gravatar.com/avatar/#{oauth[:extra][:raw_info][:gravatar_id]}" + elsif oauth[:info] + if oauth['provider'] == 'twitter' + oauth[:extra][:raw_info][:profile_image_url_https] + else + oauth[:info][:image] + end + end + end + + end +end diff --git a/app/models/concerns/user_protip.rb b/app/models/concerns/user_protip.rb new file mode 100644 index 00000000..44bb2968 --- /dev/null +++ b/app/models/concerns/user_protip.rb @@ -0,0 +1,35 @@ +module UserProtip + extend ActiveSupport::Concern + + def upvoted_protips + Protip.where(id: Like.where(likable_type: "Protip").where(user_id: self.id).pluck(:likable_id)) + end + + def upvoted_protips_public_ids + upvoted_protips.pluck(:public_id) + end + + def bookmarked_protips(count=Protip::PAGESIZE, force=false) + if force + self.likes.where(likable_type: 'Protip').map(&:likable) + else + Protip.search("bookmark:#{self.username}", [], per_page: count) + end + end + + def authored_protips(count=Protip::PAGESIZE, force=false) + if force + self.protips + else + Protip.search("author:#{self.username}", [], per_page: count) + end + end + + private + def refresh_protips + protips.each do |protip| + protip.index_search + end + return true + end +end diff --git a/app/models/concerns/user_redis.rb b/app/models/concerns/user_redis.rb new file mode 100644 index 00000000..3f49c9c9 --- /dev/null +++ b/app/models/concerns/user_redis.rb @@ -0,0 +1,12 @@ +module UserRedis + extend ActiveSupport::Concern + + def seen(feature_name) + Redis.current.SADD("user:seen:#{feature_name}", self.id.to_s) + end + + def seen?(feature_name) + Redis.current.SISMEMBER("user:seen:#{feature_name}", self.id.to_s) == 1 #true + end +end + diff --git a/app/models/concerns/user_redis_keys.rb b/app/models/concerns/user_redis_keys.rb new file mode 100644 index 00000000..0fd26b13 --- /dev/null +++ b/app/models/concerns/user_redis_keys.rb @@ -0,0 +1,64 @@ +module UserRedisKeys + extend ActiveSupport::Concern + + def repo_cache_key + username + end + + def daily_cache_key + "#{repo_cache_key}/#{Date.today.to_time.to_i}" + end + + def timeline_key + @timeline_key ||= "user:#{id}:timeline" + end + + def impressions_key + "user:#{id}:impressions" + end + + def user_views_key + "user:#{id}:views" + end + + def user_anon_views_key + "user:#{id}:views:anon" + end + + def followed_repo_key + "user:#{id}:following:repos" + end + + def followers_key + "user:#{id}:followers" + end + + #Let put these here for now + def bitbucket_identity + "bitbucket:#{bitbucket}" unless bitbucket.blank? + end + + def speakerdeck_identity + "speakerdeck:#{speakerdeck}" if speakerdeck + end + + def slideshare_identity + "slideshare:#{slideshare}" if slideshare + end + + def github_identity + "github:#{github}" if github + end + + def linkedin_identity + "linkedin:#{linkedin_token}::#{linkedin_secret}" if linkedin_token + end + + def lanyrd_identity + "lanyrd:#{twitter}" if twitter + end + + def twitter_identity + "twitter:#{twitter}" if twitter + end +end \ No newline at end of file diff --git a/app/models/concerns/user_search.rb b/app/models/concerns/user_search.rb new file mode 100644 index 00000000..accb676f --- /dev/null +++ b/app/models/concerns/user_search.rb @@ -0,0 +1,31 @@ +module UserSearch + extend ActiveSupport::Concern + + def public_hash(full=false) + hash = { username: username, + name: display_name, + location: location, + endorsements: endorsements.count, + team: team_id, + accounts: { github: github }, + badges: badges_hash = [] } + badges.each do |badge| + badges_hash << { + name: badge.display_name, + description: badge.description, + created: badge.created_at, + badge: block_given? ? yield(badge) : badge + } + end + if full + hash[:about] = about + hash[:title] = title + hash[:company] = company + hash[:specialities] = speciality_tags + hash[:thumbnail] = avatar.url + hash[:accounts][:twitter] = twitter + end + hash + end + +end \ No newline at end of file diff --git a/app/models/concerns/user_state_machine.rb b/app/models/concerns/user_state_machine.rb new file mode 100644 index 00000000..fd4a6794 --- /dev/null +++ b/app/models/concerns/user_state_machine.rb @@ -0,0 +1,37 @@ +module UserStateMachine + extend ActiveSupport::Concern + + def activate + UserActivateWorker.perform_async(id) + end + + def activate! + # TODO: Switch to update, failing validations? + update_attributes!(state: User::ACTIVE, activated_on: DateTime.now) + end + + def unregistered? + state == nil + end + + def not_active? + !active? + end + + def active? + state == User::ACTIVE + end + + def pending? + state == User::PENDING + end + + def banned? + banned_at.present? + end + + def complete_registration! + update_attribute(:state, User::PENDING) + activate + end +end \ No newline at end of file diff --git a/app/models/concerns/user_team.rb b/app/models/concerns/user_team.rb new file mode 100644 index 00000000..e765641f --- /dev/null +++ b/app/models/concerns/user_team.rb @@ -0,0 +1,37 @@ +module UserTeam + extend ActiveSupport::Concern + + def team + if team_id + Team.find(team_id) + else + membership.try(:team) + end + end + + def team_member_ids + User.where(team_id: self.team_id.to_s).pluck(:id) + end + + def on_team? + team_id.present? || membership.present? + end + + def team_member_of?(user) + on_team? && self.team_id == user.team_id + end + + def on_premium_team? + if membership + membership.team.premium? + else + false + end + end + + def belongs_to_team?(team) + team.member_accounts.pluck(:id).include?(id) + end + +end + diff --git a/app/models/concerns/user_track.rb b/app/models/concerns/user_track.rb new file mode 100644 index 00000000..cc0009ac --- /dev/null +++ b/app/models/concerns/user_track.rb @@ -0,0 +1,31 @@ +module UserTrack + extend ActiveSupport::Concern + + def track!(name, data = {}) + user_events.create!(name: name, data: data) + end + + def track_user_view!(user) + track!('viewed user', user_id: user.id, username: user.username) + end + + def track_signin! + track!('signed in') + end + + def track_viewed_self! + track!('viewed self') + end + + def track_team_view!(team) + track!('viewed team', team_id: team.id.to_s, team_name: team.name) + end + + def track_protip_view!(protip) + track!('viewed protip', protip_id: protip.public_id, protip_score: protip.score) + end + + def track_opportunity_view!(opportunity) + track!('viewed opportunity', opportunity_id: opportunity.id, team: opportunity.team_id) + end +end diff --git a/app/models/concerns/user_twitter.rb b/app/models/concerns/user_twitter.rb new file mode 100644 index 00000000..7211b3c4 --- /dev/null +++ b/app/models/concerns/user_twitter.rb @@ -0,0 +1,10 @@ +module UserTwitter + extend ActiveSupport::Concern + + def clear_twitter! + self.twitter = nil + self.twitter_token = nil + self.twitter_secret = nil + save! + end +end diff --git a/app/models/concerns/user_viewer.rb b/app/models/concerns/user_viewer.rb new file mode 100644 index 00000000..a4a732f7 --- /dev/null +++ b/app/models/concerns/user_viewer.rb @@ -0,0 +1,32 @@ +module UserViewer + extend ActiveSupport::Concern + + def viewed_by(viewer) + epoch_now = Time.now.to_i + Redis.current.incr(impressions_key) + if viewer.is_a?(User) + Redis.current.zadd(user_views_key, epoch_now, viewer.id) + generate_event(viewer: viewer.username) + else + Redis.current.zadd(user_anon_views_key, epoch_now, viewer) + count = Redis.current.zcard(user_anon_views_key) + Redis.current.zremrangebyrank(user_anon_views_key, -(count - 100), -1) if count > 100 + end + end + + def viewers(since=0) + epoch_now = Time.now.to_i + viewer_ids = Redis.current.zrevrangebyscore(user_views_key, epoch_now, since) + User.where(id: viewer_ids).all + end + + def total_views(epoch_since = 0) + if epoch_since.to_i == 0 + Redis.current.get(impressions_key).to_i + else + epoch_now = Time.now.to_i + epoch_since = epoch_since.to_i + Redis.current.zcount(user_views_key, epoch_since, epoch_now) + Redis.current.zcount(user_anon_views_key, epoch_since, epoch_now) + end + end +end diff --git a/app/models/concerns/user_visit.rb b/app/models/concerns/user_visit.rb new file mode 100644 index 00000000..340cd34b --- /dev/null +++ b/app/models/concerns/user_visit.rb @@ -0,0 +1,40 @@ +module UserVisit + extend ActiveSupport::Concern + + def visited! + self.append_latest_visits(Time.now) if self.last_request_at && (self.last_request_at < 1.day.ago) + self.touch(:last_request_at) + end + + def latest_visits + @latest_visits ||= self.visits.split(";").map(&:to_time) + end + + def append_latest_visits(timestamp) + self.visits = (self.visits.split(";") << timestamp.to_s).join(";") + self.visits.slice!(0, self.visits.index(';')+1) if self.visits.length >= 64 + calculate_frequency_of_visits! + end + + def average_time_between_visits + @average_time_between_visits ||= (self.latest_visits.each_with_index.map { |visit, index| visit - self.latest_visits[index-1] }.reject { |difference| difference < 0 }.reduce(:+) || 0)/self.latest_visits.count + end + + def calculate_frequency_of_visits! + self.visit_frequency = begin + if average_time_between_visits < 2.days + :daily + elsif average_time_between_visits < 10.days + :weekly + elsif average_time_between_visits < 40.days + :monthly + else + :rarely + end + end + end + + def activity_since_last_visit? + (achievements_unlocked_since_last_visit.count + endorsements_unlocked_since_last_visit.count) > 0 + end +end diff --git a/app/models/country.rb b/app/models/country.rb deleted file mode 100644 index fa0fa65c..00000000 --- a/app/models/country.rb +++ /dev/null @@ -1,18 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `countries` -# -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`code`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`name`** | `string(255)` | -# **`updated_at`** | `datetime` | -# - -class Country < ActiveRecord::Base -end diff --git a/app/models/endorsement.rb b/app/models/endorsement.rb index b47efc96..ef74b504 100644 --- a/app/models/endorsement.rb +++ b/app/models/endorsement.rb @@ -1,38 +1,20 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `endorsements` +# Table name: endorsements # -# ### Columns -# -# Name | Type | Attributes -# ------------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`endorsed_user_id`** | `integer` | -# **`endorsing_user_id`** | `integer` | -# **`id`** | `integer` | `not null, primary key` -# **`skill_id`** | `integer` | -# **`specialty`** | `string(255)` | -# **`updated_at`** | `datetime` | -# -# ### Indexes -# -# * `index_endorsements_on_endorsed_user_id`: -# * **`endorsed_user_id`** -# * `index_endorsements_on_endorsing_user_id`: -# * **`endorsing_user_id`** -# * `only_unique_endorsements` (_unique_): -# * **`endorsed_user_id`** -# * **`endorsing_user_id`** -# * **`specialty`** +# id :integer not null, primary key +# endorsed_user_id :integer +# endorsing_user_id :integer +# specialty :string(255) +# created_at :datetime +# updated_at :datetime +# skill_id :integer # class Endorsement < ActiveRecord::Base - include ResqueSupport::Basic - - belongs_to :endorsed, class_name: User.name, foreign_key: :endorsed_user_id, counter_cache: :endorsements_count, touch: true - belongs_to :endorser, class_name: User.name, foreign_key: :endorsing_user_id - belongs_to :skill, counter_cache: :endorsements_count, touch: :updated_at + belongs_to :endorsed, class_name: 'User', foreign_key: :endorsed_user_id, counter_cache: :endorsements_count, touch: true + belongs_to :endorser, class_name: 'User', foreign_key: :endorsing_user_id + belongs_to :skill, counter_cache: :endorsements_count, touch: true validates_presence_of :skill_id validates_presence_of :endorser @@ -40,7 +22,7 @@ class Endorsement < ActiveRecord::Base after_create :generate_event def generate_event - enqueue(GenerateEvent, self.event_type, Audience.user(self.endorsed.id), self.to_event_hash, 1.minute) + GenerateEventJob.perform_async(self.event_type, Audience.user(self.endorsed.id), self.to_event_hash, 1.minute) end def to_event_hash diff --git a/app/models/fact.rb b/app/models/fact.rb index f64f7578..ba90103c 100644 --- a/app/models/fact.rb +++ b/app/models/fact.rb @@ -1,29 +1,18 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `facts` +# Table name: facts # -# ### Columns -# -# Name | Type | Attributes -# ------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`identity`** | `string(255)` | -# **`metadata`** | `text` | -# **`name`** | `string(255)` | -# **`owner`** | `string(255)` | -# **`relevant_on`** | `datetime` | -# **`tags`** | `text` | -# **`updated_at`** | `datetime` | -# **`url`** | `string(255)` | -# -# ### Indexes -# -# * `index_facts_on_identity`: -# * **`identity`** -# * `index_facts_on_owner`: -# * **`owner`** +# id :integer not null, primary key +# identity :string(255) +# owner :string(255) +# name :string(255) +# url :string(255) +# tags :text +# metadata :text +# relevant_on :datetime +# created_at :datetime +# updated_at :datetime +# user_id :integer # class Fact < ActiveRecord::Base @@ -87,6 +76,6 @@ def tagged?(*required_tags) def user service, username = self.owner.split(":") - User.with_username(username, service) + User.find_by_provider_username(username, service) end end diff --git a/app/models/follow.rb b/app/models/follow.rb index c27f7476..b686966a 100644 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@ -1,38 +1,18 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `follows` +# Table name: follows # -# ### Columns -# -# Name | Type | Attributes -# ---------------------- | ------------------ | --------------------------- -# **`blocked`** | `boolean` | `default(FALSE), not null` -# **`created_at`** | `datetime` | -# **`followable_id`** | `integer` | `not null` -# **`followable_type`** | `string(255)` | `not null` -# **`follower_id`** | `integer` | `not null` -# **`follower_type`** | `string(255)` | `not null` -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# -# ### Indexes -# -# * `fk_followables`: -# * **`followable_id`** -# * **`followable_type`** -# * `fk_follows`: -# * **`follower_id`** -# * **`follower_type`** -# * `follows_uniq_followable_id_type_follower` (_unique_): -# * **`followable_id`** -# * **`followable_type`** -# * **`follower_id`** +# id :integer not null, primary key +# followable_id :integer not null +# followable_type :string(255) not null +# follower_id :integer not null +# follower_type :string(255) not null +# blocked :boolean default(FALSE), not null +# created_at :datetime +# updated_at :datetime # class Follow < ActiveRecord::Base - include ResqueSupport::Basic - extend ActsAsFollower::FollowerLib extend ActsAsFollower::FollowScopes @@ -41,13 +21,9 @@ class Follow < ActiveRecord::Base belongs_to :follower, polymorphic: true after_create :generate_event - def block! - self.update_attribute(:blocked, true) - end - def generate_event if followable.kind_of?(User) or followable.kind_of?(Team) - enqueue(GenerateEvent, self.event_type, Audience.user(self.followable.try(:id)), self.to_event_hash, 1.minute) + GenerateEventJob.perform_async(self.event_type, Audience.user(self.followable.try(:id)), self.to_event_hash, 1.minute) end end diff --git a/app/models/followed_team.rb b/app/models/followed_team.rb index ce97dea2..b40fca3a 100644 --- a/app/models/followed_team.rb +++ b/app/models/followed_team.rb @@ -1,24 +1,15 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `followed_teams` +# Table name: followed_teams # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | `default(2014-02-20 22:39:11 UTC)` -# **`id`** | `integer` | `not null, primary key` -# **`team_document_id`** | `string(255)` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_followed_teams_on_team_document_id`: -# * **`team_document_id`** -# * `index_followed_teams_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# user_id :integer +# team_document_id :string(255) +# created_at :datetime default(2012-03-12 21:01:09 UTC) +# team_id :integer # class FollowedTeam < ActiveRecord::Base + belongs_to :team + belongs_to :user end diff --git a/app/models/github.rb b/app/models/github.rb deleted file mode 100644 index 029cc0b0..00000000 --- a/app/models/github.rb +++ /dev/null @@ -1,183 +0,0 @@ -class Github - @@token = nil - GITHUB_ROOT = "https://github.com" - API_ROOT = 'https://api.github.com/' - - GITHUB_REDIRECT_URL = ENV['GITHUB_REDIRECT_URL'] - GITHUB_CLIENT_ID = ENV['GITHUB_CLIENT_ID'] - GITHUB_SECRET = ENV['GITHUB_SECRET'] - - attr_accessor :last_response, :token - - def initialize(token = nil) - @client = Octokit::Client.new oauth_token: token, auto_traversal: true, client_id: GITHUB_CLIENT_ID, client_secret: GITHUB_SECRET - end - - REPO_ATTRIBUTES_TO_IGNORE = %w{ - open_issues - description - ssh_url - url - master_branch - clone_url - homepage - fork - pushed_at - language - svn_url - private - size - forks - watchers - git_url - created_at - } - - USER_ATTRIBUTES_TO_IGNORE = %w{ - - } - - def profile(github_username = nil, since=Time.at(0)) - (@client.user(github_username) || []).except *%w{followers url public_repos html_url following} - rescue Errno::ECONNREFUSED => e - retry - rescue Octokit::NotFound - user = User.find_by_github(github_username) - user.github_failures += 1 - user.save - {} - end - - def orgs_for(github_username, since=Time.at(0)) - (@client.orgs(github_username, per_page: 100) || []) - rescue Errno::ECONNREFUSED => e - retry - end - - def followers_for(github_username, since=Time.at(0)) - (@client.followers(github_username, per_page: 100) || []).map do |user| - user.except *USER_ATTRIBUTES_TO_IGNORE - end - rescue Errno::ECONNREFUSED => e - retry - end - - def following_for(github_username, since=Time.at(0)) - (@client.following(github_username, per_page: 100) || []).map do |user| - user.except *USER_ATTRIBUTES_TO_IGNORE - end - rescue Errno::ECONNREFUSED => e - retry - end - - def watched_repos_for(github_username, since=Time.at(0)) - (@client.watched(github_username, per_page: 100) || []).map do |repo| - repo.except *REPO_ATTRIBUTES_TO_IGNORE - end - rescue Errno::ECONNREFUSED => e - retry - end - - def activities_for(github_username, times=1) - links = [] - times.times do |index| - index = index + 1 - Rails.logger.debug("Github Activity: Getting page #{index} for #{github_username}") - res = Servant.get("https://github.com/#{github_username}.atom?page=#{index}") - doc = Nokogiri::HTML(res.to_s) - doc.xpath('//entry').each do |entry| - if entry.xpath('id').text.include?('WatchEvent') - date = Time.parse(entry.xpath('published').text) - content = Nokogiri::HTML(entry.xpath('content').text) - links << { - date: date, - link: entry.xpath('link').first['href'], - description: content.css('.message blockquote').text - } - end - end - end - links - end - - def repos_for(github_username, since=Time.at(0)) - (@client.repositories(github_username, per_page: 100) || []).map do |repo| - repo.except *%w{master_branch clone_url ssh_url url svn_url forks} - end - rescue Octokit::NotFound => e - Rails.logger.error("Unable to find repos for #{github_username}") - return [] - rescue Errno::ECONNREFUSED => e - retry - end - - def predominant_repo_lanugage_for_link(link) - owner, repo_name = *link.gsub(/https?:\/\/github.com\//i, '').split('/') - repo(owner, repo_name)[:language] - end - - def repo(owner, name, since=Time.at(0)) - (@client.repo("#{owner}/#{name}") || []) - rescue Octokit::NotFound => e - Rails.logger.error("Unable to find repo #{owner}/#{name}") - return {} - rescue Errno::ECONNREFUSED => e - retry - end - - def repo_languages(owner, name, since=Time.at(0)) - (@client.languages("#{owner}/#{name}", per_page: 100) || []) - rescue Octokit::NotFound => e - Rails.logger.error("Failed to find languages for #{owner}/#{name}") - return [] - rescue Errno::ECONNREFUSED => e - retry - end - - def repo_watchers(owner, name, since=Time.at(0)) - (@client.stargazers("#{owner}/#{name}", per_page: 100, accept: 'application/vnd.github.beta+json') || []).map do |user| - user.select { |k| k=='login' }.with_indifferent_access - end - rescue Octokit::NotFound => e - Rails.logger.error("Failed to find watchers for #{owner}/#{name}") - return [] - rescue Errno::ECONNREFUSED => e - retry - end - - def repo_contributors(owner, name, since=Time.at(0)) - (@client.contributors("#{owner}/#{name}", false, per_page: 100) || []).map do |user| - user.except *USER_ATTRIBUTES_TO_IGNORE - end - rescue Octokit::NotFound => e - Rails.logger.error("Failed to find contributors for #{owner}/#{name}") - return [] - rescue Octokit::InternalServerError => e - Rails.logger.error("Failed to retrieve contributors for #{owner}/#{name}") - return [] - rescue Errno::ECONNREFUSED => e - retry - end - - def repo_collaborators(owner, name, since=Time.at(0)) - (@client.collaborators("#{owner}/#{name}", per_page: 100) || []).map do |user| - user.except *USER_ATTRIBUTES_TO_IGNORE - end - rescue Octokit::NotFound => e - Rails.logger.error("Failed to find collaborators for #{owner}/#{name}") - return [] - rescue Errno::ECONNREFUSED => e - retry - end - - def repo_forks(owner, name, since=Time.at(0)) - (@client.forks("#{owner}/#{name}", per_page: 100) || []).map do |user| - user.except *REPO_ATTRIBUTES_TO_IGNORE - end - rescue Octokit::NotFound => e - Rails.logger.error("Failed to find forks for #{owner}/#{name}") - return [] - rescue Errno::ECONNREFUSED => e - retry - end -end \ No newline at end of file diff --git a/app/models/github_assignment.rb b/app/models/github_assignment.rb deleted file mode 100644 index 1f24ac83..00000000 --- a/app/models/github_assignment.rb +++ /dev/null @@ -1,48 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `github_assignments` -# -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`badge_class_name`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`github_username`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`repo_url`** | `string(255)` | -# **`tag`** | `string(255)` | -# **`updated_at`** | `datetime` | -# -# ### Indexes -# -# * `index_assignments_on_repo_url`: -# * **`repo_url`** -# * `index_assignments_on_username_and_badge_class_name` (_unique_): -# * **`github_username`** -# * **`badge_class_name`** -# * `index_assignments_on_username_and_repo_url_and_badge_class_name` (_unique_): -# * **`github_username`** -# * **`repo_url`** -# * **`tag`** -# - -class GithubAssignment < ActiveRecord::Base - - scope :badge_assignments, where(repo_url: nil) - - def self.for_repo(url) - where(repo_url: url) - end - - def self.tagged(tag) - where(tag: tag) - end - - def self.for_github_username(github_username) - return empty = [] if github_username.nil? - where(["UPPER(github_username) = ?", github_username.upcase]) - end - -end diff --git a/app/models/github_profile.rb b/app/models/github_profile.rb deleted file mode 100644 index e1eeb688..00000000 --- a/app/models/github_profile.rb +++ /dev/null @@ -1,97 +0,0 @@ -class GithubProfile - include Mongoid::Document - include Mongoid::Timestamps - - index "login", unique: true, background: true - index "github_id", unique: true, background: true - - field :github_id - field :name, type: String - field :login, type: String - field :company, type: String - field :avatar_url, type: String - field :location, type: String - field :type, type: String - - embeds_many :followers, class_name: GithubUser.name.to_s, as: :personable - - has_and_belongs_to_many :orgs, class_name: GithubProfile.name.to_s - - ORGANIZATION = "Organization" - USER = "User" - VALID_TYPES = [ORGANIZATION, USER] - - class << self - def for_username(username, since=1.day.ago) - find_or_initialize_by(login: username).tap do |profile| - if profile.new_record? - logger.info "ALERT: No cached profile for user #{username}" - profile.refresh!(nil, since) - end - end - end - end - - def facts - facts = [] - GithubRepo.where('owner.github_id' => github_id).all.each do |repo| - if repo.has_contents? - facts << convert_repo_into_fact(repo) - end - end - GithubRepo.where('contributors.github_id' => github_id, "owner.github_id" => { '$in' => orgs.map(&:github_id) }).all.each do |repo| - if repo.original? && repo.significant_contributions?(github_id) - facts << convert_repo_into_fact(repo, orgrepo = true) - end - end - facts << Fact.append!("github:#{login}", "github:#{login}", "Joined GitHub", created_at, "https://github.com/#{login}", ['github', 'account-created']) - return facts - end - - def convert_repo_into_fact(repo, orgrepo = false) - tags = repo.tags + ['repo', 'github', repo.dominant_language] - if orgrepo - tags << 'org' - else - tags << 'personal' - end - if repo.fork? - tags << 'fork' - else - tags << 'original' - end - metadata = { - languages: repo.languages_that_meet_threshold, - original: repo.original?, - times_forked: repo.forks ? repo.forks.size : 0, - watchers: repo.followers.collect(&:login) - } - Fact.append!("#{repo.html_url}:#{login}", "github:#{login}", repo.name, repo.created_at, repo.html_url, tags, metadata) - end - - def refresh!(client=nil, since) - client ||= Github.new - username = self.login - - profile = client.profile(username, since) - github_id = profile.delete(:id) - - repos = client.repos_for(username, since).map do |repo| - owner, name = repo.owner.login, repo.name - GithubRepo.for_owner_and_name(owner, name, client, repo) - end - - update_attributes! profile.merge( - github_id: github_id, - followers: client.followers_for(username, since), - following: client.following_for(username, since), - watched: client.watched_repos_for(username, since), - orgs: orgs, - repos: repos.map { |r| { id: r.id, name: r.name } } - ) - end - - def stale? - updated_at < 24.hours.ago - end -end diff --git a/app/models/github_repo.rb b/app/models/github_repo.rb deleted file mode 100644 index eda713d3..00000000 --- a/app/models/github_repo.rb +++ /dev/null @@ -1,208 +0,0 @@ -class GithubRepo - include Mongoid::Document - include Mongoid::Timestamps - - field :name, type: String - field :html_url, type: String - field :tags, type: Array, default: [] - field :languages - field :fork, type: Boolean - field :forks - field :pushed_at - field :watchers - - embeds_one :owner, class_name: GithubUser.name.to_s, as: :personable - embeds_many :followers, class_name: GithubUser.name.to_s, as: :personable - embeds_many :contributors, class_name: GithubUser.name.to_s, as: :personable - - index "owner.login" - index "owner.github_id" - index "name" - - before_save :update_tags! - - class << self - def for_owner_and_name(owner, name, client=nil, prefetched={}) - (where('owner.login' => owner, 'name' => name).first || new('name' => name, 'owner' => { 'login' => owner })).tap do |repo| - if repo.new_record? - logger.info "ALERT: No cached repo for #{owner}/#{name}" - repo.refresh!(client, prefetched) - end - end - end - end - - def refresh!(client=nil, repo={}) - client ||= Github.new - owner, name = self.owner.login, self.name - - repo = client.repo(owner, name) if repo.empty? - - if repo[:fork].blank? - repo.merge!( - forks: client.repo_forks(owner, name), - contributors: client.repo_contributors(owner, name), - ) - end - - repo.delete(:id) - - update_attributes! repo.merge( - owner: GithubUser.new(repo[:owner]), - followers: client.repo_watchers(owner, name), - languages: client.repo_languages(owner, name) # needed so we can determine contents - ) - end - - def full_name - "#{self.owner.login}/#{self.name}" - end - - def times_forked - if self[:forks].is_a? Array - self[:forks].size - else - self[:forks] || 0 - end - end - - def dominant_language_percentage - main_language = self.dominant_language - bytes_of_other_langs = languages.collect { |k, v| k != main_language ? v : 0 }.sum - bytes_of_main_lang = languages[main_language] - return 0 if bytes_of_main_lang == 0 - return 100 if bytes_of_other_langs == 0 - 100 - (bytes_of_other_langs.quo(bytes_of_main_lang).to_f * 100).round - end - - def total_commits - self.contributors.to_a.sum do |c| - c['contributions'] - end - end - - def total_contributions_for(github_id) - contributor = self.contributors.first { |c| c['github_id'] == github_id } - (contributor && contributor['contributions']) || 0 - end - - CONTRIBUTION_COUNT_THRESHOLD = 10 - CONTRIBUTION_PERCENT_THRESHOLD = 0.10 - - def percent_contributions_for(github_id) - total_contributions_for(github_id) / self.total_commits.to_f - end - - def significant_contributions?(github_id) - total_contributions_for(github_id) >= CONTRIBUTION_COUNT_THRESHOLD || percent_contributions_for(github_id) > CONTRIBUTION_PERCENT_THRESHOLD - end - - def dominant_language - return '' if languages.blank? - primary_language = languages.sort_by { |k, v| v }.last - if primary_language - primary_language.first - else - '' - end - end - - def languages_that_meet_threshold - languages.collect do |key, value| - key if value.to_i >= 200 - end.compact - end - - def original? - !fork? - end - - def has_contents? - !languages_that_meet_threshold.blank? - end - - def readme - @readme ||= raw_readme - end - - def popularity - @popularity ||= begin - rank = times_forked + watchers #(times_forked + followers.size) - case - when rank > 600 then - 5 - when rank > 300 then - 4 - when rank > 100 then - 3 - when rank > 20 then - 2 - else - 1 - end - end - end - - def raw_readme - %w{ - README - README.markdown - README.md - README.txt - }.each do |file_type| - begin - return Servant.get("#{html_url}/raw/master/#{file_type}").result - rescue RestClient::ResourceNotFound - Rails.logger.debug("Looking for readme, did not find #{file_type}") - end - end - return empty_string = '' - end - - def update_tags! - tag_dominant_lanugage! - tag_project_types! - tags.uniq! - end - - def tag_dominant_lanugage! - tags << dominant_language unless languages.blank? - end - - def add_tag(tag) - self.tags << tag - end - - def tagged?(tag) - tags.include?(tag) - end - - NODE_MATCHER = /(node.js|no.de|nodejs|(\s|\A|^)node(\s|\A|-|_|^))/i - JQUERY_MATCHER = /jquery/i - - def tag_project_types! - tag_when_project_matches('JQuery', JQUERY_MATCHER, disable_readme_inspection = nil, 'JavaScript') || - tag_when_project_matches('Node', NODE_MATCHER, disable_readme_inspection = nil, 'JavaScript') || - tag_when_project_matches('Prototype', /prototype/i, nil, 'JavaScript') - end - - def tag_when_project_matches(tag_name, matcher, readme_matcher, language = nil) - if language && dominant_language.downcase == language.downcase - if field_matches?('name', matcher) || - field_matches?('description', matcher) || - (readme_matcher && dominant_language_percentage > 90 && readme_matches?(readme_matcher)) - tags << tag_name - return true - end - end - return false - end - - def field_matches?(field, regex) - self[field] && !self[field].match(regex).nil? - end - - def readme_matches?(regex) - !readme.match(regex).nil? - end -end diff --git a/app/models/github_user.rb b/app/models/github_user.rb deleted file mode 100644 index de9cd8c9..00000000 --- a/app/models/github_user.rb +++ /dev/null @@ -1,32 +0,0 @@ -class GithubUser - include Mongoid::Document - - field :github_id - field :avatar_url - field :login - field :gravatar - - after_initialize :extract_gravatar_from_avatar_url - before_save :extract_gravatar_from_avatar_url - - after_initialize :extract_github_id - before_save :extract_github_id - - embedded_in :personable, polymorphic: true - - def extract_github_id - temp_id = attributes['id'] || attributes['_id'] - if github_id.nil? && temp_id.is_a?(Fixnum) - self.github_id = temp_id - attributes.delete '_id' - attributes.delete 'id' - end - end - - def extract_gravatar_from_avatar_url - if attributes['avatar_url'] && attributes['avatar_url'] =~ /avatar\/([\w|\d]*)\?/i - self.gravatar = attributes['avatar_url'].match(/avatar\/([\w|\d]*)\?/i)[1] - attributes.delete 'avatar_url' - end - end -end \ No newline at end of file diff --git a/app/models/highlight.rb b/app/models/highlight.rb deleted file mode 100644 index dbfc949a..00000000 --- a/app/models/highlight.rb +++ /dev/null @@ -1,46 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `highlights` -# -# ### Columns -# -# Name | Type | Attributes -# ------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`description`** | `text` | -# **`featured`** | `boolean` | `default(FALSE)` -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_highlights_on_featured`: -# * **`featured`** -# * `index_highlights_on_user_id`: -# * **`user_id`** -# - -class Highlight < ActiveRecord::Base - belongs_to :user - - after_create :add_to_timeline - - def self.random(limit = 1) - order("Random()").limit(limit) - end - - def self.random_featured(limit = 1) - where(featured: true).order("Random()").limit(limit).all(include: :user) - end - - def event - @event || nil - end - - private - def add_to_timeline - @event = Event.create_highlight_event(self.user, self) - end -end diff --git a/app/models/invitation.rb b/app/models/invitation.rb index 6cb47d65..9dda1052 100644 --- a/app/models/invitation.rb +++ b/app/models/invitation.rb @@ -1,21 +1,19 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `invitations` +# Table name: invitations # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`email`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`inviter_id`** | `integer` | -# **`state`** | `string(255)` | -# **`team_document_id`** | `string(255)` | -# **`token`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# email :string(255) +# team_document_id :string(255) +# token :string(255) +# state :string(255) +# inviter_id :integer +# created_at :datetime +# updated_at :datetime +# team_id :integer # class Invitation < ActiveRecord::Base + belongs_to :team + belongs_to :user, foreign_key: :inviter_id end diff --git a/app/models/lifecycle_marketing.rb b/app/models/lifecycle_marketing.rb deleted file mode 100644 index 94b7b643..00000000 --- a/app/models/lifecycle_marketing.rb +++ /dev/null @@ -1,64 +0,0 @@ -class LifecycleMarketing - class << self - - # run with: rake marketing:emails:send - def process! - send_activity_updates - send_reminders_to_create_skill - send_reminders_to_create_team - send_reminders_to_create_protip - send_reminders_to_invite_team_members - send_reminders_to_link_accounts - end - - def send_reminders_to_create_team - Rails.logger.info "Skipping team create reminder. Got more hate than love" - end - - def send_reminders_to_invite_team_members - key = 'email:team-reminders:teams-emailed' - REDIS.del(key) - valid_activity_users.where("team_document_id IS NOT NULL").where(remind_to_invite_team_members: nil).find_each do |user| - unless REDIS.sismember(key, user.team_document_id) or Team.find(user.team_document_id).created_at < 1.week.ago - REDIS.sadd key, user.team_document_id - Notifier.remind_to_invite_team_members(user.username).deliver - end - end - end - - def send_activity_updates - send_new_achievement_reminders - end - - def send_reminders_to_create_protip - Rails.logger.info "Skipping :send_reminders_to_create_protip until implemented" - # remind_to_create_protip - # add scope: without_protip - end - - def send_reminders_to_create_skill - Rails.logger.info "Skipping :send_reminders_to_create_skill until implemented" - # remind_to_create_skills - # add scope: without_skill - end - - def send_reminders_to_link_accounts - Rails.logger.info "Skipping :send_reminders_to_link_accounts until implemented" - # remind_to_link_accounts - end - - def send_new_achievement_reminders - User.where(id: valid_activity_users.joins("inner join badges on badges.user_id = users.id").where("badges.created_at > users.last_request_at").reorder('badges.created_at ASC').select(:id)).select('DISTINCT(username), id').find_each do |user| - Notifier.new_badge(user.username).deliver - end - end - - def valid_newsletter_users - User.active.no_emails_since(1.week.ago).receives_newsletter - end - - def valid_activity_users - User.active.no_emails_since(3.days.ago).receives_activity - end - end -end \ No newline at end of file diff --git a/app/models/like.rb b/app/models/like.rb index 6b14eaed..a0782a3b 100644 --- a/app/models/like.rb +++ b/app/models/like.rb @@ -1,41 +1,29 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `likes` +# Table name: likes # -# ### Columns -# -# Name | Type | Attributes -# -------------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`ip_address`** | `string(255)` | -# **`likable_id`** | `integer` | -# **`likable_type`** | `string(255)` | -# **`tracking_code`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# **`value`** | `integer` | -# -# ### Indexes -# -# * `index_likes_on_user_id` (_unique_): -# * **`likable_id`** -# * **`likable_type`** -# * **`user_id`** +# id :integer not null, primary key +# value :integer +# tracking_code :string(255) +# user_id :integer +# likable_id :integer +# likable_type :string(255) +# created_at :datetime +# updated_at :datetime +# ip_address :string(255) # class Like < ActiveRecord::Base belongs_to :user - belongs_to :likable, polymorphic: true + belongs_to :likable, polymorphic: true, counter_cache: true validates :likable, presence: true validates :value, presence: true, numericality: { min: 1 } after_save :liked_callback - scope :protips, where(likable_type: 'Protip') - scope :protips_score, lambda { |protip_ids| protips.where(likable_id: protip_ids).group(:likable_id).select('SUM(likes.value) as like_score') } + scope :protips, -> { where(likable_type: 'Protip') } + scope :protips_score, ->(protip_ids) { protips.where(likable_id: protip_ids).group(:likable_id).select('SUM(likes.value) as like_score') } def liked_callback likable.try(:liked, value) diff --git a/app/models/link.rb b/app/models/link.rb deleted file mode 100644 index 4fb972fb..00000000 --- a/app/models/link.rb +++ /dev/null @@ -1,119 +0,0 @@ -class Link - class AlreadyLinkForUser < RuntimeError; - end; - class InvalidUrl < RuntimeError; - end; - - include Mongoid::Document - include Mongoid::Timestamps - - index "url", unique: true - index "user_ids" - index "featured_on" - - field :url, type: String - field :user_ids, type: Array, default: [] - field :user_count, type: Integer, default: 0 - field :user_interests, type: Array, default: [] - field :score, type: Integer - field :domain, type: String - field :featured_on, type: DateTime - field :embedded_data - - before_create :extract_host - before_save :clean_collections - - scope :popular, where(user_count: { '$gt' => 1 }).where(score: { '$gt' => 7 }) - scope :featured, where(featured_on: { '$exists' => true }).order_by([[:featured_on, :desc], [:score, :desc]]) - scope :not_featured, where(featured_on: { '$exists' => false }) - - class << self - #def feature_popular_links! - #popular.not_featured.all.each do |link| - #link.feature! - #end - #end - - def register_for_user!(url, user) - link = Link.for_url(url) || begin - url = expand_url(url) - Link.for_url(url) || Link.new(url: url) - end - link.add_user(user) - link.save! - link - end - - def for_url(url) - where(url: url).first - end - - def for_user(user) - user_id = user.is_a?(User) ? user.id : user - where(:user_ids.in => [user_id]) - end - - def expand_url(url) - r = Net::HTTP.get_response(URI.parse(url)) - if r['location'] - return r['location'] - else - return url - end - rescue Exception => ex - Rails.logger.error(ex.message) - raise InvalidUrl - end - end - - #def feature! - #querystring = QueryString.stringify({ url: url }) - #response = RestClient.get("http://api.embed.ly/1/oembed?#{querystring}") - #self.embedded_data = JSON.parse(response) - #self.featured_on = Date.today - #save! - #end - - def add_user(user) - raise AlreadyLinkForUser if knows?(user) - self.score = (self.score || 0) + score_for_user(user) - self.user_ids << user.id - self.user_interests << user.interests - end - - def knows?(user) - self.user_ids.include?(user.id) - end - - def title - embedded_data['title'] - end - - def description - embedded_data['description'] - end - - def thumbnail? - !thumbnail_url.nil? - end - - def thumbnail_url - embedded_data['thumbnail_url'] - end - - private - def extract_host - self.domain = URI.parse(url).host if url - rescue Exception => ex - Rails.logger.warn("Unable to extract host from #{url}") - end - - def score_for_user(user) - [(user.badges_count * 0.30).round, 1].max - end - - def clean_collections - self.user_count = user_ids.size - self.user_interests.flatten! - end -end diff --git a/app/models/network.rb b/app/models/network.rb index e23d61ab..0e67d63b 100644 --- a/app/models/network.rb +++ b/app/models/network.rb @@ -1,73 +1,41 @@ # encoding: utf-8 -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `networks` +# Table name: networks # -# ### Columns -# -# Name | Type | Attributes -# -------------------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`featured`** | `boolean` | `default(FALSE)` -# **`id`** | `integer` | `not null, primary key` -# **`name`** | `string(255)` | -# **`protips_count_cache`** | `integer` | `default(0)` -# **`slug`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# name :string(255) +# slug :string(255) +# created_at :datetime +# updated_at :datetime +# protips_count_cache :integer default(0) +# featured :boolean default(FALSE) +# parent_id :integer +# network_tags :citext is an Array # class Network < ActiveRecord::Base - include Tire::Model::Search - include ResqueSupport::Basic - - settings analysis: { analyzer: { exact_term_search: { "type" => "keyword", - "tokenizer" => "keyword" } } } - mapping show: { properties: { - name: { type: 'string', boost: 100, index: 'not_analyzed' }, - protips_count: { type: 'integer', index: 'not_analyzed' }, - upvotes: { type: 'integer', index: 'not_analyzed' }, - upvotes_score: { type: 'float', index: 'not_analyzed' }, - tags: { type: 'string', boost: 80, index: 'not_analyzed' }, - members: { properties: { - username: { type: 'string', index: 'not_analyzed' }, - user_id: { type: 'integer', boost: 40, index: 'not_analyzed' }, - profile_path: { type: 'string', index: 'not_analyzed' }, - profile_url: { type: 'string', index: 'not_analyzed' }, - } } } } - - attr_taggable :tags + has_closure_tree order: :slug + + acts_as_taggable acts_as_followable - attr_accessor :resident_expert - has_many :network_experts, autosave: true, dependent: :destroy + + has_many :network_protips + has_many :protips, through: :network_protips validates :slug, uniqueness: true before_validation :create_slug! after_validation :tag_with_name! - before_save :assign_mayor! before_save :correct_tags before_save :cache_counts! after_create :assign_members - after_save :cleanup_orphans - scope :most_protips, order('protips_count_cache DESC') - scope :featured, where(featured: true) + scope :most_protips, ->{ order('protips_count_cache DESC') } + scope :featured, ->{ where(featured: true)} class << self - def slugify(name) - if !!(name =~ /\p{Latin}/) - name.to_s.downcase.gsub(/[^a-z0-9]+/i, '-').chomp('-') - else - name.to_s.gsub(/\s/, "-") - end - end - - def unslugify(slug) - slug.gsub(/\-/, ' ') - end - def all_with_tag(tag_name) Network.tagged_with(tag_name) end @@ -77,11 +45,11 @@ def networks_for_tag(tag_name) end def top_tags_not_networks - top_tags.where('tags.name NOT IN (?)', Network.all.map(&:name)) + top_tags.where('tags.name NOT IN (?)', Network.pluck(:slug)) end def top_tags_not_in_any_networks - top_tags.where('tags.name NOT IN (?)', Network.all.map(&:tags).flatten) + top_tags.where('tags.name NOT IN (?)', Network.pluck(:tag_list).flatten) end def top_tags @@ -98,166 +66,77 @@ def cache_counts! end def create_slug! - self.slug = self.class.slugify(self.name) + self.slug = self.name + end + + def slug=value + self[:slug] = value.to_s.parameterize end def tag_with_name! - unless self.tags.include? self.name - self.tags = (self.tags + [self.name, self.slug]) + unless self.tag_list.include? self.name + self.tag_list.add(self.slug) end end def correct_tags - if self.tags_changed? - self.tags = self.tags.uniq.select { |tag| Tag.exists?(name: tag) }.reject { |tag| (tag != self.name) && Network.exists?(name: tag) } + if self.tag_list_changed? + self.tag_list = self.tag_list.uniq.select { |tag| ActsAsTaggableOn::Tag.exists?(name: tag) }.reject { |tag| (tag != self.name) && Network.exists?(name: tag) } end - end - def tags_changed? - self.tags_tags.map(&:name) != self.tags end def protips_tags_with_count self.protips.joins("inner join taggings on taggings.taggable_id = protips.id").joins('inner join tags on taggings.tag_id = tags.id').where("taggings.taggable_type = 'Protip' AND taggings.context = 'topics'").select('tags.name, count(tags.name)').group('tags.name').order('count(tags.name) DESC') end - def ordered_tags - self.protips_tags_with_count.having('count(tags.name) > 5').map(&:name) & self.tags - end - def potential_tags self.protips_tags_with_count.map(&:name).uniq end - def mayor - @mayor ||= self.network_experts.where(designation: 'mayor').last.try(:user) - end - - def assign_mayor! - - candidate = self.in_line_to_the_throne.first - unless candidate.nil? - Rails.logger.debug "finding a mayor among: #{self.tags}" - person_with_most_upvoted_protips_on_topic = User.find(candidate.user_id) - Rails.logger.debug "mayor for #{name} found: #{person_with_most_upvoted_protips_on_topic.username}" - - #if self.mayor && person_with_most_upvoted_protips_on_topic && person_with_most_upvoted_protips_on_topic.id != self.mayor.id - # enqueue(GenerateEvent, :new_mayor, Hash[*[Audience.network(self.id), Audience.admin].map(&:to_a).flatten(2)], self.to_event_hash(:mayor => person_with_most_upvoted_protips_on_topic), 30.minutes) - #end - - self.network_experts.build(user: person_with_most_upvoted_protips_on_topic, designation: :mayor) - end - end - - def to_event_hash(options={}) - { user: { username: options[:mayor] && options[:mayor].try(:username) }, - network: { name: self.name, url: Rails.application.routes.url_helpers.network_path(self.slug) } } - end - - def resident_expert - @resident ||= self.network_experts.where(designation: 'resident_expert').last.try(:user) - end - - def resident_expert=(user) - self.network_experts.build(designation: 'resident_expert', user_id: user.id) - end - - def to_indexed_json - to_public_hash.to_json - end - - def to_public_hash - { - name: name, - protips_count: kind, - title: title, - body: body, - tags: topics, - upvotes: upvotes, - url: path, - upvote_path: upvote_path, - link: link, - created_at: created_at, - user: user_hash - } - end - - def protips - @protips ||= Protip.tagged_with(self.tags, on: :topics) - #@protips ||= Protip.search(nil, self.tags) - - end - def upvotes self.protips.joins("inner join likes on likes.likable_id = protips.id").where("likes.likable_type = 'Protip'").select('count(*)').count end def most_upvoted_protips(limit = nil, offset = 0) - Protip.search_trending_by_topic_tags("sort:upvotes desc", self.tags, offset, limit) + Protip.search_trending_by_topic_tags("sort:upvotes desc", self.tag_list, offset, limit) end def new_protips(limit = nil, offset = 0) - Protip.search("sort:created_at desc", self.tags, page: offset, per_page: limit) + Protip.search("sort:created_at desc", self.tag_list, page: offset, per_page: limit) end def featured_protips(limit = nil, offset = 0) #self.protips.where(:featured => true) - Protip.search("featured:true", self.tags, page: offset, per_page: limit) + Protip.search("featured:true", self.tag_list, page: offset, per_page: limit) end def flagged_protips(limit = nil, offset = 0) - Protip.search("flagged:true", self.tags, page: offset, per_page: limit) + Protip.search("flagged:true", self.tag_list, page: offset, per_page: limit) end def highest_scored_protips(limit=nil, offset =0, field=:trending_score) - Protip.search("sort:#{field} desc", self.tags, page: offset, per_page: limit) - end - - def mayor_protips(limit=nil, offset =0) - Protip.search_trending_by_user(self.mayor.username, nil, self.tags, offset, limit) - end - - def expert_protips(limit=nil, offset =0) - Protip.search_trending_by_user(self.resident_expert.username, nil, self.tags, offset, limit) + Protip.search("sort:#{field} desc", self.tag_list, page: offset, per_page: limit) end def members(limit = -1, offset = 0) - members_scope = User.where(id: Follow.for_followable(self).select(:follower_id)).offset(offset) + members_scope = User.where(id: Follow.for_followable(self).pluck(:follower_id)).offset(offset) limit > 0 ? members_scope.limit(limit) : members_scope end def new_members(limit = nil, offset = 0) - User.where(id: Follow.for_followable(self).select(:follower_id).where('follows.created_at > ?', 1.week.ago)).limit(limit).offset(offset) - end - - def ranked_members(limit = 15) - self.in_line_to_the_throne.limit(limit).map(&:user) - end - - def in_line_to_the_throne - self.protips.select('protips.user_id, SUM(protips.score) AS total_score').group('protips.user_id').order('SUM(protips.score) DESC').where('upvotes_value_cache > 0') - end - - def resident_expert_from_env - ENV['RESIDENT_EXPERTS'].split(",").each do |expert_config| - network, resident_expert = expert_config.split(/:/).map(&:strip) - return User.with_username(resident_expert) if network == self.slug - end unless ENV['RESIDENT_EXPERTS'].nil? - nil + User.where(id: Follow.for_followable(self).where('follows.created_at > ?', 1.week.ago).pluck(:follower_id)).limit(limit).offset(offset) end def assign_members - Skill.where(name: self.tags).select('DISTINCT(user_id)').map(&:user).each do |member| + Skill.where(name: self.tag_list).select('DISTINCT(user_id)').map(&:user).each do |member| member.join(self) end end - def cleanup_orphans - ProcessingQueue.queue(:orphan_protips).each do |orphan| - if orphan.queueable && orphan.queueable.networks.any? - ProcessingQueue.unqueue(orphan.queueable, :orphan_protips) - end - end + def recent_protips_count + self.protips.where('protips.created_at > ?', 1.week.ago).count end + end diff --git a/app/models/network_expert.rb b/app/models/network_expert.rb deleted file mode 100644 index e8238aec..00000000 --- a/app/models/network_expert.rb +++ /dev/null @@ -1,25 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `network_experts` -# -# ### Columns -# -# Name | Type | Attributes -# ------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`designation`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`network_id`** | `integer` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# - -class NetworkExpert < ActiveRecord::Base - belongs_to :network - belongs_to :user - - DESIGNATIONS = %(mayor resident_expert) - - validates :designation, presence: true, inclusion: { in: DESIGNATIONS } -end diff --git a/app/models/network_protip.rb b/app/models/network_protip.rb new file mode 100644 index 00000000..9c9068f9 --- /dev/null +++ b/app/models/network_protip.rb @@ -0,0 +1,17 @@ +# == Schema Information +# +# Table name: network_protips +# +# id :integer not null, primary key +# network_id :integer +# protip_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# + +class NetworkProtip < ActiveRecord::Base + belongs_to :network, counter_cache: :protips_count_cache + belongs_to :protip + + validates_uniqueness_of :protip_id, scope: :network_id +end diff --git a/app/models/opportunity.rb b/app/models/opportunity.rb index 5697e379..454e879c 100644 --- a/app/models/opportunity.rb +++ b/app/models/opportunity.rb @@ -1,31 +1,27 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `opportunities` +# Table name: opportunities # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`apply`** | `boolean` | `default(FALSE)` -# **`cached_tags`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`deleted`** | `boolean` | `default(FALSE)` -# **`deleted_at`** | `datetime` | -# **`description`** | `text` | -# **`designation`** | `string(255)` | -# **`expires_at`** | `datetime` | `default(1970-01-01 00:00:00 UTC)` -# **`id`** | `integer` | `not null, primary key` -# **`link`** | `string(255)` | -# **`location`** | `string(255)` | -# **`location_city`** | `string(255)` | -# **`name`** | `string(255)` | -# **`opportunity_type`** | `string(255)` | `default("full-time")` -# **`options`** | `float` | -# **`public_id`** | `string(255)` | -# **`salary`** | `integer` | -# **`team_document_id`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# name :string(255) +# description :text +# designation :string(255) +# location :string(255) +# cached_tags :string(255) +# link :string(255) +# salary :integer +# options :float +# deleted :boolean default(FALSE) +# deleted_at :datetime +# created_at :datetime +# updated_at :datetime +# expires_at :datetime default(1970-01-01 00:00:00 UTC) +# opportunity_type :string(255) default("full-time") +# location_city :string(255) +# apply :boolean default(FALSE) +# public_id :string(255) +# team_id :integer +# remote :boolean # require 'search' @@ -34,20 +30,23 @@ class Opportunity < ActiveRecord::Base include Tire::Model::Search include Tire::Model::Callbacks include SearchModule - attr_taggable :tags + include OpportunityMapping + + acts_as_taggable OPPORTUNITY_TYPES = %w(full-time part-time contract internship) - has_many :seized_opportunities + has_many :seized_opportunities, dependent: :delete_all + has_many :applicants, through: :seized_opportunities, source: :user - validates :tags, with: :tags_within_length + # Order here dictates the order of validation error messages displayed in views. validates :name, presence: true, allow_blank: false - validates :location, presence: true, allow_blank: false - validates :description, presence: true, length: { minimum: 10, maximum: 600 } - validates :team_document_id, presence: true validates :opportunity_type, inclusion: { in: OPPORTUNITY_TYPES } - validates :salary, presence: true, allow_blank: false, numericality: true, inclusion: 0..800000, allow_blank: true + validates :description, length: { minimum: 100, maximum: 2000 } + validates :tag_list, with: :tags_within_length + validates :location, presence: true, allow_blank: false validates :location_city, presence: true, allow_blank: false, unless: lambda { location && anywhere?(location) } + validates :salary, presence: true, numericality: {only_integer: true, greater_than: 0, less_than_or_equal_to: 800000}, allow_blank: true before_validation :set_location_city before_save :update_cached_tags @@ -56,105 +55,58 @@ class Opportunity < ActiveRecord::Base after_save :remove_from_index, unless: :alive? after_create :pay_for_it! - scope :valid, where(deleted: false).where('expires_at > ?', Time.now).order('created_at DESC') - scope :by_city, lambda { |city| where('LOWER(location_city) LIKE ?', "%#{city.try(:downcase)}%") } - scope :by_tag, lambda { |tag| where('LOWER(cached_tags) LIKE ?', "%#{tag}%") unless tag.nil? } - default_scope valid - - attr_accessor :title - - - settings analysis: { analyzer: { comma: { "type" => "pattern", - "pattern" => "," } } } - mapping show: { properties: { - public_id: { type: 'string', index: 'not_analyzed' }, - name: { type: 'string', boost: 100, analyzer: 'snowball' }, - description: { type: 'string', boost: 100, analyzer: 'snowball' }, - designation: { type: 'string', index: 'not_analyzed' }, - opportunity_type: { type: 'string', index: 'not_analyzed' }, - location: { type: 'string', boost: 80, analyzer: 'snowball' }, - location_city: { type: 'string', boost: 80, analyzer: 'snowball' }, - tags: { type: 'string', boost: 50, analyzer: 'comma' }, - link: { type: 'string', index: 'not_analyzed' }, - salary: { type: 'integer', boost: 80, index: 'not_analyzed' }, - created_at: { type: 'string', index: 'not_analyzed' }, - updated_at: { type: 'string', index: 'not_analyzed' }, - expires_at: { type: 'string', index: 'not_analyzed' }, - url: { type: 'string', index: 'not_analyzed' }, - apply: { type: 'boolean', index: 'not_analyzed' }, - team: { type: 'multi_field', index: 'not_analyzed', fields: { - name: { type: 'string', index: 'snowball' }, - slug: { type: 'string', boost: 50, index: 'snowball' }, - id: { type: 'string', index: 'not_analyzed' }, - avatar_url: { type: 'string', index: 'not_analyzed' }, - featured_banner_image: { type: 'string', index: 'not_analyzed' }, - big_image: { type: 'string', index: 'not_analyzed' }, - hiring: { type: 'boolean', index: 'not_analyzed' } - } }, - } } - - class << self - def parse_salary(salary_string) - salary_string.match(/(\d+)\s*([kK]?)/) - number, thousands = $1, $2 - - if number.nil? - 0 - else - salary = number.to_i - if thousands.downcase == "k" or salary < 1000 - salary * 1000 - else - salary - end - end - end + #this scope should be renamed. + scope :valid, -> { where(deleted: false).where('expires_at > ?', Time.now).order('created_at DESC') } + scope :by_city, ->(city) { where('LOWER(location_city) LIKE ?', "%#{city.try(:downcase)}%") } + scope :by_tag, ->(tag) { where('LOWER(cached_tags) LIKE ?', "%#{tag}%") unless tag.nil? } + scope :by_query, ->(query) { where("name ~* ? OR description ~* ? OR cached_tags ~* ?", query, query, query) } + #remove default scope + default_scope { valid } - def based_on(tags) - query_string = "tags:#{tags.join(" OR ")}" - failover_scope = Opportunity.joins("inner join taggings on taggings.taggable_id = opportunities.id").joins('inner join tags on taggings.tag_id = tags.id').where("taggings.taggable_type = 'Opportunity' AND taggings.context = 'tags'").where('lower(tags.name) in (?)', tags.map(&:downcase)).group('opportunities.id').order('count(opportunities.id) desc') - Opportunity::Search.new(Opportunity, Opportunity::Search::Query.new(query_string), nil, nil, nil, { failover: failover_scope }).execute - end + HUMANIZED_ATTRIBUTES = { name: 'Title' } - def with_public_id(public_id) - where(public_id: public_id).first - end + belongs_to :team, class_name: 'Team', touch: true - def random - uncached do - order('RANDOM()') - end + def self.human_attribute_name(attr,options={}) + HUMANIZED_ATTRIBUTES[attr.to_sym] || super + end + + def self.based_on(tags) + query_string = "tags:#{tags.join(' OR ')}" + failover_scope = Opportunity.joins('inner join taggings on taggings.taggable_id = opportunities.id').joins('inner join tags on taggings.tag_id = tags.id').where("taggings.taggable_type = 'Opportunity' AND taggings.context = 'tags'").where('lower(tags.name) in (?)', tags.map(&:downcase)).group('opportunities.id').order('count(opportunities.id) desc') + Opportunity::Search.new(Opportunity, Opportunity::Search::Query.new(query_string), nil, nil, nil, failover: failover_scope).execute + end + + def self.random + uncached do + order('RANDOM()') end end def tags_within_length - tags_string = self.tags.join(",") - errors.add(:skill_tags, "are too long(Maximum is 250 characters)") if tags_string.length > 250 - errors.add(:base, "You need to specify at least one skill tag") if tags_string.length == 0 + tags_string = tag_list.join(',') + errors.add(:skill_tags, 'are too long(Maximum is 250 characters)') if tags_string.length > 250 + errors.add(:base, 'You need to specify at least one skill tag') if tags_string.length == 0 end def update_cached_tags - self.cached_tags = self.tags.join(",") + self.cached_tags = tag_list.join(',') end def seize_by(user) - self.seized_opportunities.create!(user_id: user.id, team_document_id: self.team_document_id) + seized_opportunities.create(user_id: user.id) end def seized_by?(user) - self.seized_opportunities.where(user_id: user.id).any? - end - - def seizers - User.where(id: self.seized_opportunities.select(:user_id)) + seized_opportunities.exists?(user_id: user.id) end def active? - !self.deleted + !deleted end def activate! - self.deleted = false + self.deleted = false self.deleted_at = nil save end @@ -163,22 +115,22 @@ def deactivate! destroy end - def destroy(force=false) + def destroy(force = false) if force - super + super() else - self.deleted = true + self.deleted = true self.deleted_at = Time.now.utc save end end def set_expiration - self.expires_at = self.team.has_monthly_subscription? ? 1.year.from_now : 1.month.from_now + self.expires_at = team.has_monthly_subscription? ? 1.year.from_now : 1.month.from_now end def title - self.name + name end def title=(new_title) @@ -186,7 +138,7 @@ def title=(new_title) end def accepts_applications? - self.apply + apply end def apply_for(user) @@ -199,17 +151,13 @@ def has_application_from?(user) seized_by?(user) end - def applicants - seizers - end - def viewed_by(viewer) epoch_now = Time.now.to_i - REDIS.incr(impressions_key) + Redis.current.incr(impressions_key) if viewer.is_a?(User) - REDIS.zadd(user_views_key, epoch_now, viewer.id) + Redis.current.zadd(user_views_key, epoch_now, viewer.id) else - REDIS.zadd(user_anon_views_key, epoch_now, viewer) + Redis.current.zadd(user_anon_views_key, epoch_now, viewer) end end @@ -225,19 +173,15 @@ def user_anon_views_key "opportunity:#{id}:views:anon" end - def viewers(since=0) - epoch_now = Time.now.to_i - viewer_ids = REDIS.zrevrange(user_views_key, since, epoch_now) + def viewers(since = 0) + epoch_now = Time.now.to_i + viewer_ids = Redis.current.zrevrange(user_views_key, since, epoch_now) User.where(id: viewer_ids).all end def total_views(epoch_since = 0) epoch_now = Time.now.to_i - REDIS.zcount(user_views_key, epoch_since, epoch_now) + REDIS.zcount(user_anon_views_key, epoch_since, epoch_now) - end - - def team - @team ||= Team.find(team_document_id.to_s) + Redis.current.zcount(user_views_key, epoch_since, epoch_now) + Redis.current.zcount(user_anon_views_key, epoch_since, epoch_now) end def ensure_can_afford @@ -250,90 +194,97 @@ def pay_for_it! end def locations - self.location_city.try(:split, "|") || ["Worldwide"] + location_city.try(:split, '|') || ['Worldwide'] end def alive? - expires_at == nil && deleted_at == nil + expires_at.nil? && deleted_at.nil? + end + + def to_html + CFM::Markdown.render(self.description) end def to_indexed_json to_public_hash.deep_merge( - { - public_id: public_id, - name: name, - description: description, - designation: designation, - opportunity_type: opportunity_type, - tags: cached_tags, - link: link, - salary: salary, - created_at: created_at, - updated_at: updated_at, - expires_at: expires_at, - apply: apply, - team: { - slug: team.slug, - id: team.id.to_s, - featured_banner_image: team.featured_banner_image, - big_image: team.big_image, - avatar_url: team.avatar_url, - name: team.name - } - }).to_json(methods: [:to_param]) + public_id: public_id, + name: name, + description: description, + designation: designation, + opportunity_type: opportunity_type, + tags: cached_tags, + link: link, + salary: salary, + created_at: created_at, + updated_at: updated_at, + expires_at: expires_at, + apply: apply, + team: { + slug: team.slug, + id: team.id.to_s, + featured_banner_image: team.featured_banner_image, + big_image: team.big_image, + avatar_url: team.avatar_url, + name: team.name + } + ).to_json(methods: [:to_param]) end def to_public_hash { - title: self.title, - type: self.opportunity_type, - locations: self.locations, - description: self.description, - company: self.team.name, - url: self.url + title: title, + type: opportunity_type, + locations: locations, + description: description, + company: team.name, + url: url } end def url - Rails.application.routes.url_helpers.job_path(slug: self.team.slug, job_id: self.public_id, host: Rails.application.config.host, only_path: false) + "#open-positions" + Rails.application.routes.url_helpers.job_path(slug: team.slug, job_id: public_id, host: Rails.application.config.host, only_path: false) + '#open-positions' end def assign_random_id - self.public_id = self.title.gsub(/[^a-z0-9]+/i, '-').chomp('-') + "-" + SecureRandom.urlsafe_base64(4).downcase - assign_random_id unless self.class.where(public_id: self.public_id).blank? #retry if not unique + self.public_id = title.gsub(/[^a-z0-9]+/i, '-').chomp('-') + '-' + SecureRandom.urlsafe_base64(4).downcase + assign_random_id unless self.class.where(public_id: public_id).blank? # retry if not unique end protected + def set_location_city - self.location_city = begin - locations = [] - begin - locations = self.team.cities.compact.select { |city| self.location.include?(city) } - end while locations.blank? && add_opportunity_locations_to_team && set_location_city - self.team.cities.join("|") - end unless self.location.nil? - errors.add(:location, "is not valid, please specify one or more cities separated by | (e.g. Miami, FL | San Francisco). put 'anywhere' if location doesn't matter") if !self.location.nil? and !valid_location_city - self.location_city + add_opportunity_locations_to_team + locations = team.cities.compact.select { |city| location.include?(city) } + + return if locations.blank? && anywhere?(location) + + self.location_city = locations.join('|') end def add_opportunity_locations_to_team geocoded_all = true - self.location.split('|').each do |location_string| - geocoded_all &&= self.team.team_locations.where(conditions: ['address LIKE ?', "%#{location_string}%"]).exists? or anywhere?(location_string) ? false : self.team.team_locations.build(address: location_string, name: location_string).geocode + location.split('|').each do |location_string| + # skip if location is anywhere or already exists + if anywhere?(location_string) || team.locations.select{|v| v.address.include?(location_string)}.count > 0 + geocoded_all = false + next + end + + geocoded_all &&= team.locations.build(address: location_string, name: location_string).geocode end geocoded_all || nil end def valid_location_city - self.location_city or anywhere?(self.location) + location_city || anywhere?(location) end def anywhere?(location) - location.downcase.include?("anywhere") + location.downcase.include?('anywhere') end def save_team - self.team.save + team.save end def remove_from_index diff --git a/app/models/picture.rb b/app/models/picture.rb index 2ab1b135..90561f6e 100644 --- a/app/models/picture.rb +++ b/app/models/picture.rb @@ -1,17 +1,12 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `pictures` +# Table name: pictures # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`file`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | +# id :integer not null, primary key +# user_id :integer +# file :string(255) +# created_at :datetime +# updated_at :datetime # class Picture < ActiveRecord::Base diff --git a/app/models/plan.rb b/app/models/plan.rb index d5bbf764..e67bccc7 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -1,118 +1,119 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `plans` +# Table name: plans # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`amount`** | `integer` | -# **`analytics`** | `boolean` | `default(FALSE)` -# **`created_at`** | `datetime` | -# **`currency`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`interval`** | `string(255)` | -# **`name`** | `string(255)` | -# **`public_id`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# amount :integer +# interval :string(255) default("month") +# name :string(255) +# currency :string(255) default("usd") +# public_id :string(255) +# created_at :datetime +# updated_at :datetime +# analytics :boolean default(FALSE) +# interval_in_seconds :integer default(2592000) # require 'stripe' -class Plan < ActiveRecord::Base - has_many :subscriptions +# TODO +# rename amount to price_in_cents +# rename currency to price_currency - after_create :register_on_stripe - after_destroy :deregister_on_stripe +class Plan < ActiveRecord::Base + has_many :subscriptions , class_name: 'Teams::AccountPlan' - before_validation :set_currency before_create :generate_public_id + after_create :register_on_stripe + after_destroy :unregister_from_stripe CURRENCIES = %w(usd) - MONTHLY = 'month' + MONTHLY = 'month' + + validates :amount, presence: true + validates :name, presence: true + validates :currency, inclusion: {in: CURRENCIES}, presence: true - validate :amount, presence: true - validate :name, presence: true - validate :currency, inclusion: { in: CURRENCIES } + scope :monthly, -> { where(interval: MONTHLY) } + scope :one_time, -> { where(interval: nil) } + scope :paid, -> { where('amount > 0') } + scope :free, -> { where(amount: 0) } + scope :with_analytics, -> { where(analytics: true) } + scope :without_analytics, -> { where(analytics: false) } class << self def enhanced_team_page_analytics - Plan.where(interval: MONTHLY).where('amount > 0').where(analytics: true).first + monthly.paid.with_analytics.first end def enhanced_team_page_monthly - Plan.where(interval: MONTHLY).where('amount > 0').first + monthly.paid.first end def enhanced_team_page_one_time - Plan.where(interval: nil).where('amount > 0').first + one_time.paid.first end def enhanced_team_page_free - Plan.where(interval: MONTHLY).where(amount: 0).first + monthly.free.first end - end - def register_on_stripe - if subscription? - Stripe::Plan.create( - amount: self.amount, - interval: self.interval, - name: self.name, - currency: self.currency, - id: self.stripe_plan_id - ) - end - rescue Stripe::InvalidRequestError => e - Rails.logger.error "Stripe error while creating customer: #{e.message}" - errors.add :base, "There was a problem with the plan" - self.destroy - end + alias_attribute :stripe_plan_id, :public_id + alias_attribute :has_analytics?, :analytics def price amount / 100 end - def deregister_on_stripe - if subscription? - plan_on_stripe = stripe_plan - plan_on_stripe.try(:delete) - end - end - - def stripe_plan - Stripe::Plan.retrieve(stripe_plan_id) - rescue Stripe::InvalidRequestError - nil - end - - def stripe_plan_id - self.public_id - end - - def set_currency - self.currency = 'usd' - end - def subscription? - not one_time? + !one_time? end def free? - self.amount == 0 + amount.zero? end + # TODO refactor + # We should avoid nil. def one_time? self.interval.nil? end - def has_analytics? - self.analytics + #copy to sidekiq worker + def stripe_plan + Stripe::Plan.retrieve(stripe_plan_id) + rescue Stripe::InvalidRequestError + nil + end + + #sidekiq it + def register_on_stripe + if subscription? + Stripe::Plan.create( + amount: self.amount, + interval: self.interval, + name: self.name, + currency: self.currency, + id: self.stripe_plan_id + ) + end + rescue Stripe::InvalidRequestError => e + Rails.logger.error "Stripe error while creating customer: #{e.message}" if ENV['DEBUG'] + errors.add :base, "There was a problem with the plan" + self.destroy + end + + #sidekiq it + def unregister_from_stripe + if subscription? + plan_on_stripe = stripe_plan + plan_on_stripe.try(:delete) + end end + #TODO CHANGE with default in rails 4 def generate_public_id - self.public_id = SecureRandom.urlsafe_base64(4).downcase + self.public_id ||= SecureRandom.urlsafe_base64(4).downcase end end diff --git a/app/models/processing_queue.rb b/app/models/processing_queue.rb deleted file mode 100644 index 1469802e..00000000 --- a/app/models/processing_queue.rb +++ /dev/null @@ -1,62 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `processing_queues` -# -# ### Columns -# -# Name | Type | Attributes -# --------------------- | ------------------ | --------------------------- -# **`dequeued_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`queue`** | `string(255)` | -# **`queueable_id`** | `integer` | -# **`queueable_type`** | `string(255)` | -# **`queued_at`** | `datetime` | -# - -class ProcessingQueue < ActiveRecord::Base - - belongs_to :queueable, polymorphic: true - - validates :queueable, presence: true - validates :queue, presence: true - - scope :queue, lambda { |queue_name| where(queue: queue_name.to_s).where(dequeued_at: nil).order('queued_at ASC') } - scope :queue_for_type, lambda { |queue_name, queue_type| queue(queue_name.to_s).where(queueable_type: queue_type) } - - class << self - def enqueue(queueable, queue) - self.create!(queueable_id: queueable.id, queueable_type: queueable.class.name, queue: queue.to_s, queued_at: Time.now.utc) - end - - def dequeue(queue, queueable_type = nil) - item = queueable_type.nil? ? queue(queue.to_s).first : queue_for_type(queue.to_s, queueable_type).first - unless item.nil? - item.dequeued_at = Time.now.utc - item.save - end - item - end - - def unqueue(queueable, queue) - item = queue_for_type(queue.to_s, queueable.class.name).where(queueable_id: queueable.id).first - item.destroy unless item.nil? - end - - def queued?(queueable, queue) - queue_for_type(queue.to_s, queueable.class.name).where(queueable_id: queueable.id).any? - end - - def clear(queue, queueable_type = nil) - items = queueable_type.nil? ? queue(queue.to_s) : queue_for_type(queue.to_s, queueable_type) - items.map(&:destroy) - end - end - - def dequeue - self.dequeued_at = Time.now.utc - save - end - -end diff --git a/app/models/protip.rb b/app/models/protip.rb index a6cb55bc..4d572e66 100644 --- a/app/models/protip.rb +++ b/app/models/protip.rb @@ -1,114 +1,57 @@ -# ## Schema Information -# Schema version: 20131205021701 +# encoding: utf-8 +# == Schema Information # -# Table name: `protips` +# Table name: protips # -# ### Columns -# -# Name | Type | Attributes -# -------------------------- | ------------------ | --------------------------- -# **`body`** | `text` | -# **`boost_factor`** | `float` | `default(1.0)` -# **`created_at`** | `datetime` | -# **`created_by`** | `string(255)` | `default("self")` -# **`featured`** | `boolean` | `default(FALSE)` -# **`featured_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`inappropriate`** | `integer` | `default(0)` -# **`kind`** | `string(255)` | -# **`public_id`** | `string(255)` | -# **`score`** | `float` | -# **`title`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`upvotes_value_cache`** | `integer` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_protips_on_public_id`: -# * **`public_id`** -# * `index_protips_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# public_id :string(255) +# kind :string(255) +# title :string(255) +# body :text +# user_id :integer +# created_at :datetime +# updated_at :datetime +# score :float +# created_by :string(255) default("self") +# featured :boolean default(FALSE) +# featured_at :datetime +# upvotes_value_cache :integer default(0), not null +# boost_factor :float default(1.0) +# inappropriate :integer default(0) +# likes_count :integer default(0) +# slug :string(255) not null +# user_name :string(255) +# user_email :string(255) +# user_agent :string(255) +# user_ip :inet +# spam_reports_count :integer default(0) +# state :string(255) default("active") # require 'net_validators' require 'open-uri' -require 'taggers' require 'cfm' require 'scoring' require 'search' class Protip < ActiveRecord::Base + extend FriendlyId + friendly_id :slug_format, :use => :slugged + include Featurable - # TODO: Break out the various responsibilities on the Protip into modules/concerns. + # TODO: Break out the various responsibilities on the Protip into modules/concerns. include NetValidators include Tire::Model::Search - include ResqueSupport::Basic include Scoring::HotStream include SearchModule - acts_as_commentable - - settings analysis: { - analyzer: { - comma: { "type" => "pattern", - "pattern" => ",", - "filter" => "keyword" - } - - } - } - - mapping show: { properties: { - public_id: { type: 'string', index: 'not_analyzed' }, - kind: { type: 'string', index: 'not_analyzed' }, - title: { type: 'string', boost: 100, analyzer: 'snowball' }, - body: { type: 'string', boost: 80, analyzer: 'snowball' }, - html: { type: 'string', index: 'not_analyzed' }, - tags: { type: 'string', boost: 80, analyzer: 'comma' }, - upvotes: { type: 'integer', index: 'not_analyzed' }, - url: { type: 'string', index: 'not_analyzed' }, - upvote_path: { type: 'string', index: 'not_analyzed' }, - popular_score: { type: 'double', index: 'not_analyzed' }, - score: { type: 'double', index: 'not_analyzed' }, - trending_score: { type: 'double', index: 'not_analyzed' }, - only_link: { type: 'string', index: 'not_analyzed' }, - link: { type: 'string', index: 'not_analyzed' }, - team: { type: 'multi_field', index: 'not_analyzed', fields: { - name: { type: 'string', index: 'snowball' }, - slug: { type: 'string', boost: 50, index: 'snowball' }, - avatar: { type: 'string', index: 'not_analyzed' }, - profile_path: { type: 'string', index: 'not_analyzed' }, - hiring: { type: 'boolean', index: 'not_analyzed' } - } }, - views_count: { type: 'integer', index: 'not_analyzed' }, - comments_count: { type: 'integer', index: 'not_analyzed' }, - best_stat: { type: 'multi_field', index: 'not_analyzed', fields: { - name: { type: 'string', index: 'not_analyzed' }, - value: { type: 'integer', index: 'not_analyzed' }, - } }, - comments: { type: 'object', index: 'not_analyzed', properties: { - title: { type: 'string', boost: 100, analyzer: 'snowball' }, - body: { type: 'string', boost: 80, analyzer: 'snowball' }, - likes: { type: 'integer', index: 'not_analyzed' } - } }, - networks: { type: 'string', boost: 50, analyzer: 'comma' }, - upvoters: { type: 'integer', boost: 50, index: 'not_analyzed' }, - created_at: { type: 'date', boost: 10, index: 'not_analyzed' }, - featured: { type: 'boolean', index: 'not_analyzed' }, - flagged: { type: 'boolean', index: 'not_analyzed' }, - created_automagically: { type: 'boolean', index: 'not_analyzed' }, - reviewed: { type: 'boolean', index: 'not_analyzed' }, - user: { type: 'multi_field', index: 'not_analyzed', fields: { - username: { type: 'string', boost: 40, index: 'not_analyzed' }, - name: { type: 'string', boost: 40, index: 'not_analyzed' }, - user_id: { type: 'integer', boost: 40, index: 'not_analyzed' }, - profile_path: { type: 'string', index: 'not_analyzed' }, - avatar: { type: 'string', index: 'not_analyzed' }, - about: { type: 'string', index: 'not_analyzed' }, - } } } } + include ProtipMapping + include AuthorDetails + include SpamFilter + include ProtipNetworkable + include ProtipOwnership paginates_per(PAGESIZE = 18) @@ -116,9 +59,11 @@ class Protip < ActiveRecord::Base has_many :likes, as: :likable, dependent: :destroy, after_add: :reset_likes_cache, after_remove: :reset_likes_cache has_many :protip_links, autosave: true, dependent: :destroy, after_add: :reset_links_cache, after_remove: :reset_links_cache - belongs_to :user + belongs_to :user , autosave: true + has_many :comments, :dependent => :destroy + - attr_taggable :topics, :users + acts_as_taggable_on :topics, :users attr_accessor :upvotes DEFAULT_IP_ADDRESS = '0.0.0.0' @@ -152,7 +97,8 @@ class Protip < ActiveRecord::Base validates :title, presence: true, length: { minimum: 5, maximum: MAX_TITLE_LENGTH } validates :body, presence: true validates :kind, presence: true, inclusion: { in: KINDS } - validates :topics, length: { minimum: 1 } + validates :topic_list, length: { minimum: 1 } + validates :slug, presence: true after_validation :tag_user before_create :assign_random_id @@ -160,33 +106,41 @@ class Protip < ActiveRecord::Base before_save :recalculate_score! # Begin these three lines fail the test - after_save :reindex_search - after_save :unqueue_flagged, if: :flagged? - after_destroy :reindex_search - after_create :update_network + after_save :index_search + after_destroy :index_search_after_destroy + # End of test failing lines attr_accessor :upvotes_value - scope :random, lambda { |count| order("RANDOM()").limit(count) } - scope :recent, lambda { |count| order("created_at DESC").limit(count) } - scope :for, lambda { |userlist| where(user: userlist.map(&:id)) } - scope :most_upvotes, lambda { |count| joins(:likes).select(['protips.*', 'SUM(likes.value) AS like_score']).group(['likes.likable_id', 'protips.id']).order('like_score DESC').limit(count) } - scope :any_topics, lambda { |topics_list| - where(id: select('DISTINCT protips.id').joins(taggings: :tag).where('tags.name IN (?)', topics_list)) - } + scope :random, ->(count=1) { order("RANDOM()").limit(count) } + scope :recent, ->(count= 1) { order("created_at DESC").limit(count) } + scope :for, ->(userlist) { where(user: userlist.map(&:id)) } + scope :most_upvotes, ->(count) { joins(:likes).select(['protips.*', 'SUM(likes.value) AS like_score']).group(['likes.likable_id', 'protips.id']).order('like_score DESC').limit(count) } + scope :any_topics, ->(topics_list) { where(id: select('DISTINCT protips.id').joins(taggings: :tag).where('tags.name IN (?)', topics_list)) } + + scope :topics, ->(topics_list, match_all) { match_all ? any_topics(topics_list).group('protips.id').having('count(protips.id)=?', topics_list.size) : any_topics(topics_list) } + + scope :for_topic, ->(topic) { any_topics([topic]) } + + scope :with_upvotes, -> { joins("INNER JOIN (#{Like.select('likable_id, SUM(likes.value) as upvotes').where(likable_type: 'Protip').group([:likable_type, :likable_id]).to_sql}) AS upvote_scores ON upvote_scores.likable_id=protips.id") } + scope :trending, -> { order(:score).reverse_order } + scope :flagged, -> { where(state: :reported) } - scope :topics, lambda { |topics_list, match_all| - match_all ? any_topics(topics_list).group('protips.id').having('count(protips.id)=?', topics_list.size) : any_topics(topics_list) - } + state_machine initial: :active do + event :report_spam do + transition active: :reported_as_spam + end - scope :for_topic, lambda { |topic| any_topics([topic]) } + event :mark_as_spam do + transition any => :marked_as_spam + end - scope :with_upvotes, joins("INNER JOIN (#{Like.select('likable_id, SUM(likes.value) as upvotes').where(likable_type: 'Protip').group([:likable_type, :likable_id]).to_sql}) AS upvote_scores ON upvote_scores.likable_id=protips.id") - scope :trending, order('score DESC') - scope :flagged, where(flagged: true) - scope :queued_for, lambda { |queue| ProcessingQueue.queue_for_type(queue, self.class.name) } + after_transition any => :marked_as_spam do |protip| + protip.spam! + end + end class << self @@ -205,10 +159,10 @@ def trending_topics unless trending_protips.respond_to?(:errored?) and trending_protips.errored? static_trending = ENV['FEATURED_TOPICS'].split(",").map(&:strip).map(&:downcase) unless ENV['FEATURED_TOPICS'].blank? - dynamic_trending = trending_protips.map { |p| p.tags }.flatten.reduce(Hash.new(0)) { |h, tag| h.tap { |h| h[tag] += 1 } }.sort { |a1, a2| a2[1] <=> a1[1] }.map { |entry| entry[0] }.reject { |tag| User.where(username: tag).any? } + dynamic_trending = trending_protips.flat_map { |p| p.tags }.reduce(Hash.new(0)) { |h, tag| h.tap { |h| h[tag] += 1 } }.sort { |a1, a2| a2[1] <=> a1[1] }.map { |entry| entry[0] }.reject { |tag| User.where(username: tag).any? } ((static_trending || []) + dynamic_trending).uniq else - Tag.last(20).map(&:name).reject { |name| User.exists?(username: name) } + ActsAsTaggableOn::Tag.last(20).map(&:name).reject { |name| User.exists?(username: name) } end end @@ -230,12 +184,11 @@ def search(query_string, tags =[], options={}) tag_ids = process_tags_for_search(tags) tag_ids = [0] if !tags.blank? and tag_ids.blank? - force_index_commit = Protip.tire.index.refresh if Rails.env.test? - query_fields = [:title, :body] + Protip.tire.index.refresh if Rails.env.test? filters = [] - filters << { term: { upvoters: bookmarked_by } } unless bookmarked_by.nil? - filters << { term: { 'user.user_id' => author } } unless author.nil? - Rails.logger.debug "SEARCH: query=#{query}, tags=#{tags}, team=#{team}, author=#{author}, bookmarked_by=#{bookmarked_by}, execution=#{execution}, sorts=#{sorts} from query-string=#{query_string}, #{options.inspect}" + filters << {term: {upvoters: bookmarked_by}} unless bookmarked_by.nil? + filters << {term: {'user.user_id' => author}} unless author.nil? + Rails.logger.debug "SEARCH: query=#{query}, tags=#{tags}, team=#{team}, author=#{author}, bookmarked_by=#{bookmarked_by}, execution=#{execution}, sorts=#{sorts} from query-string=#{query_string}, #{options.inspect}" if ENV['DEBUG'] begin tire.search(options) do query { string query, default_operator: 'AND', use_dis_max: true } unless query.blank? @@ -248,7 +201,7 @@ def search(query_string, tags =[], options={}) filter *fltr.first end end - sort { by [sorts] } + # sort { by [sorts] } #sort { by [{:upvotes => 'desc' }] } end rescue Tire::Search::SearchRequestFailed => e @@ -319,7 +272,7 @@ def search_trending_by_team(team_id, query_string, page, per_page) Protip.search(query, [], page: page, per_page: per_page) rescue Errno::ECONNREFUSED team = Team.where(slug: team_id).first - team.team_members.collect(&:protips).flatten + team.members.flat_map(&:protips) end def search_trending_by_user(username, query_string, tags, page, per_page) @@ -335,7 +288,7 @@ def search_trending_by_topic_tags(query, tags, page, per_page) def search_trending_by_date(query, date, page, per_page) date_string = "#{date.midnight.strftime('%Y-%m-%dT%H:%M:%S')} TO #{(date.midnight + 1.day).strftime('%Y-%m-%dT%H:%M:%S')}" unless date.is_a?(String) query = "" if query.nil? - query += " created_at:[#{date_string}]" + query += " created_at:[#{date_string}]" Protip.search(query, [], page: page, per_page: per_page) end @@ -344,7 +297,7 @@ def search_bookmarked_protips(username, page, per_page) end def most_interesting_for(user, since=Time.at(0), page = 1, per_page = 10) - search_top_trending_since("only_link:false", since, user.networks.map(&:ordered_tags).flatten.concat(user.skills.map(&:name)), page, per_page) + search_top_trending_since("only_link:false", since, user.networks.flat_map(&:ordered_tags).concat(user.skills.map(&:name)), page, per_page) end def search_top_trending_since(query, since, tags, page = 1, per_page = 10) @@ -361,9 +314,9 @@ def preprocess_query(query_string) team = query.gsub!(/(team:([0-9A-Z\-]+))/i, "") && $2 team = (team =~ /^[a-f0-9]+$/i && team.length == 24 ? team : Team.where(slug: team).first.try(:id)) author = query.gsub!(/author:([^\. ]+)/i, "") && $1.try(:downcase) - author = User.with_username(author).try(:id) || 0 unless author.nil? or (author =~ /^\d+$/) + author = User.find_by_username(author).try(:id) || 0 unless author.nil? or (author =~ /^\d+$/) bookmarked_by = query.gsub!(/bookmark:([^\. ]+)/i, "") && $1 - bookmarked_by = User.with_username(bookmarked_by).try(:id) unless bookmarked_by.nil? or (bookmarked_by =~ /^\d+$/) + bookmarked_by = User.find_by_username(bookmarked_by).try(:id) unless bookmarked_by.nil? or (bookmarked_by =~ /^\d+$/) execution = query.gsub!(/execution:(plain|bool|and)/, "") && $1.to_sym sorts_string = query.gsub!(/sort:([[\w\d_]+\s+(desc|asc),?]+)/i, "") && $1 sorts = Hash[sorts_string.split(",").map { |sort| sort.split(/\s/) }] unless sorts_string.nil? @@ -401,9 +354,10 @@ def already_created_a_protip_for(url) end def valid_reviewers + User # Hack to force loading User model before it gets read from cache and explodes in dev. Rails.cache.fetch('valid_protip_reviewers', expires_in: 1.month) do if ENV['REVIEWERS'] - User.where(username: YAML.load(ENV['REVIEWERS'])).all + User.where(username: YAML.load(ENV['REVIEWERS'])).to_a else [] end @@ -415,75 +369,22 @@ def valid_reviewers ####################### # Homepage 4.0 rewrite ####################### - - class Search < SearchModule::Search - - class Scope < SearchModule::Search::Scope - - def to_hash - case @domain - when :user - followings(@object) - when :network - network(@object) - end - end - - def followings(user) - { - or: [ - { terms: { "user.user_id" => [user.id] + user.following_users_ids + user.following_team_members_ids } }, - { terms: { "tags" => user.following_networks_tags } } - ] - } - end - - def network(tag) - { - terms: { tags: Network.find_by_slug(Network.slugify(tag)).try(&:tags) || [tag, Network.unslugify(tag)].uniq } - } - end - end - - class Query < SearchModule::Search::Query - def default_query - "flagged:false" - end - end - - def failover_strategy - { failover: Protip.order('score DESC') } - end - end - - def reindex_search - if Rails.env.development? or Rails.env.test? or self.destroyed? - self.tire.update_index - else - Resque.enqueue(IndexProtip, self.id) - end - end - - def unqueue_flagged - ProcessingQueue.unqueue(self, :auto_tweet) + #TODO REMOVE + def deindex_search + ProtipIndexer.new(self).remove end - - def networks - Network.tagged_with(self.topics) - end - - def orphan? - self.networks.blank? + def index_search + ProtipIndexer.new(self).store end - def update_network(event=:new_protip) - enqueue(UpdateNetwork, event, self.public_id, self.score) + def index_search_after_destroy + self.tire.update_index end def generate_event(options={}) - unless self.created_automagically? and self.topics.include?("github") + unless self.created_automagically? and self.topic_list.include?("github") event_type = self.event_type(options) - enqueue_in(10.minutes, GenerateEvent, event_type, event_audience(event_type), self.to_event_hash(options), 1.minute) + GenerateEventJob.perform_in(10.minutes, event_type, event_audience(event_type), self.to_event_hash(options), 1.minute) end end @@ -513,7 +414,7 @@ def event_audience(event_type) end def slideshare? - self.topics.count == 1 && self.topics.include?("slideshare") + self.topics.count == 1 && self.topic_list.include?("slideshare") end def event_type(options={}) @@ -527,7 +428,7 @@ def event_type(options={}) end def topic_ids - self.taggings.joins('inner join tags on taggings.tag_id = tags.id').select('tags.id').map(&:id) + topics.pluck(:id) end def to_indexed_json @@ -546,7 +447,7 @@ def to_indexed_json likes: comment.likes_cache } end, - networks: networks.map(&:name).map(&:downcase).join(","), + networks: networks.pluck(:slug).join(','), best_stat: Hash[*[:name, :value].zip(best_stat.to_a).flatten], team: user && user.team && { name: user.team.name, @@ -568,8 +469,8 @@ def to_indexed_json def user_hash user.public_hash(true).select { |k, v| [:username, :name].include? k }.merge( { - profile_url: user.profile_url, - avatar: user.profile_url, + profile_url: user.avatar_url, + avatar: user.avatar_url, profile_path: Rails.application.routes.url_helpers.badge_path(user.username), about: user.about } @@ -583,7 +484,7 @@ def to_public_hash title: Sanitize.clean(title), body: body, html: Sanitize.clean(to_html), - tags: topics, + tags: topic_list, upvotes: upvotes, url: path, upvote_path: upvote_path, @@ -642,7 +543,7 @@ def original? end def tokenized_skills - @tokenized_skills ||= self.topics.collect { |tag| Skill.tokenize(tag) } + @tokenized_skills ||= self.topic_list.collect { |tag| Skill.tokenize(tag) } end def to_param @@ -654,7 +555,6 @@ def liked(how_much=nil) unless how_much.nil? self.upvotes_value= (self.upvotes_value + how_much) recalculate_score! - update_network(:protip_upvote) end self.save(validate: false) end @@ -679,13 +579,15 @@ def best_stat { views: self.total_views/COUNTABLE_VIEWS_CHUNK, upvotes: self.upvotes, - comments: self.comments.count, + comments: self.comments.size, hawt: self.hawt? ? 100 : 0 - }.sort_by { |k, v| -v }.first + }.sort_by do |k, v| + -v + end.first end def upvotes - @upvotes ||= likes.count + likes.size end def upvotes=(count) @@ -711,6 +613,7 @@ def upvotes_score end MAX_SCORE = 100 + def normalized_upvotes_score (upvotes_score * MAX_SCORE) / ([self.class.most_upvotes_for_a_protip.to_f, UPVOTES_SCORE_BENCHMARK].min) end @@ -728,10 +631,17 @@ def views_score end def comments_score - self.comments.collect { |comment| comment.likes_value_cache + comment.author.score }.reduce(:+) || 0 + self.comments.collect do |comment| + if comment.author.present? + comment.likes_value_cache + comment.author.score + else + comment.likes_value_cache + end + end.reduce(:+) || 0 end QUALITY_WEIGHT = 20 + def quality_score self.determine_boost_factor! * QUALITY_WEIGHT end @@ -755,18 +665,18 @@ def upvotes_since(time) end def upvote_velocity(since = Time.at(0)) - Rails.logger.ap since + Rails.logger.ap since if ENV['DEBUG'] us = upvotes_since(since) - Rails.logger.ap us + Rails.logger.ap us if ENV['DEBUG'] more_recent = [self.created_at, since].compact.max - Rails.logger.ap more_recent + Rails.logger.ap more_recent if ENV['DEBUG'] us / (((Time.now - more_recent).to_i + 1) / 3600.00) rescue => e - Rails.logger.ap(e.message, :error) - Rails.logger.ap(e.backtrace, :error) + Rails.logger.ap(e.message, :error) if ENV['DEBUG'] + Rails.logger.ap(e.backtrace, :error) if ENV['DEBUG'] 0.0 end @@ -778,6 +688,7 @@ def upvote_velocity(since = Time.at(0)) ORIGINAL_CONTENT_BOOST = 1.5 IMAGE_BOOST = 0.5 MAX_SCORABLE_IMAGES = 3 + def determine_boost_factor! factor = 1 if article? @@ -879,6 +790,7 @@ def assign_title(html) end MIN_CONTENT_LENGTH = 30 + def only_link? has_featured_image? == false && links.size == 1 && (body.length - link.length) <= MIN_CONTENT_LENGTH end @@ -904,12 +816,18 @@ def images if self.new_record? self.links.select { |link| ProtipLink.is_image? link } else - protip_links.where('kind in (?)', ProtipLink::IMAGE_KINDS).map(&:url) + if protip_links.loaded? + protip_links.select do |p| + ProtipLink::IMAGE_KINDS.include?(p.kind.to_sym) if p.kind + end.map(&:url).compact + else + protip_links.where('kind in (?)', ProtipLink::IMAGE_KINDS).map(&:url) + end end end def retrieve_title_from_html(html) - Nokogiri::XML.fragment(html.xpath("//title").map(&:text).join).text.force_encoding('ASCII-8BIT').gsub(/\P{ASCII}/, '') + Nokogiri::XML.fragment(html.xpath("//title").map(&:text).join).text.gsub(/\P{ASCII}/, '') end def upvote_ancestor(link_identifier, link) @@ -939,30 +857,12 @@ def process_links def extract_data_from_links self.links.each do |link| html = Nokogiri.parse(open(link)) - #auto_tag(html) if self.tags.empty? assign_title(html) if self.title.blank? end if need_to_extract_data_from_links end - # - # This should eventually be done inline as they type in a protip. We should utilize natural language processing and - # coding/technology jargon domain to determine appropriate tags automatically. Perhaps use AlchemyAPIs to tag protips - # with people, authors, places and other useful dimension. - # - def auto_tag(html = nil) - if self.link? and self.topics.blank? - self.topics = Taggers.tag(html, self.links.first) - end - end - - def owned_by?(user) - self.user == user - end - - alias_method :owner?, :owned_by? - def tag_user - self.users = [self.user.try(:username)] if self.users.blank? + self.user_list = [self.user.try(:username)] if self.users.blank? end def reassign_to(user) @@ -971,7 +871,7 @@ def reassign_to(user) end def tags - topics + users + topic_list + user_list end def link @@ -979,37 +879,33 @@ def link end def reformat_tags! - if self.topics.count == 1 && self.topics.first =~ /\s/ - self.topics = self.topics.first.split(/\s/) + if self.topic_list.count == 1 && self.topic_list.first =~ /\s/ + self.topic_list = self.topic_list.first.split(/\s/) end end def sanitize_tags! - new_topics = self.topics.reject { |tag| tag.blank? }.map do |topic| + new_topics = self.topic_list.reject { |tag| tag.blank? }.map do |topic| sanitized_topic = self.class.preprocess_tag(topic) invalid_topic = topic.match("^((?!#{VALID_TAG}).)*$") && $1 errors[:topics] << "The tag '#{topic}' has invalid characters: #{invalid_topic unless invalid_topic.nil?}" if sanitized_topic.nil? sanitized_topic end new_topics = new_topics.compact.uniq - self.topics = new_topics if topics.blank? or topics_changed? - end - - def topics_changed? - self.topics_tags.map(&:name) != self.topics + self.topic_list = new_topics if topic_list.blank? or topic_list_changed? end def viewed_by(viewer) epoch_now = Time.now.to_i - REDIS.incr(impressions_key) + Redis.current.incr(impressions_key) if viewer.is_a?(User) - REDIS.zadd(user_views_key, epoch_now, viewer.id) + Redis.current.zadd(user_views_key, epoch_now, viewer.id) generate_event(viewer: viewer.username) unless viewer_ids(5.minutes.ago.to_i).include? viewer.id.to_s - reindex_search if viewer.admin? + index_search if viewer.admin? else - REDIS.zadd(user_anon_views_key, epoch_now, viewer) - count = REDIS.zcard(user_anon_views_key) - REDIS.zremrangebyrank(user_anon_views_key, -(count - 100), -1) if count > 100 + Redis.current.zadd(user_anon_views_key, epoch_now, viewer) + count = Redis.current.zcard(user_anon_views_key) + Redis.current.zremrangebyrank(user_anon_views_key, -(count - 100), -1) if count > 100 end update_score! if (total_views % COUNTABLE_VIEWS_CHUNK) == 0 @@ -1017,9 +913,9 @@ def viewed_by(viewer) def viewed_by?(viewer) if viewer.is_a?(User) - !REDIS.zrank(user_views_key, viewer.id).nil? + !Redis.current.zrank(user_views_key, viewer.id).nil? else - !REDIS.zrank(user_anon_views_key, viewer).nil? + !Redis.current.zrank(user_anon_views_key, viewer).nil? end end @@ -1050,22 +946,19 @@ def viewers(since=0) def viewer_ids(since=0) epoch_now = Time.now.to_i - REDIS.zrangebyscore(user_views_key, since, epoch_now) + Redis.current.zrangebyscore(user_views_key, since, epoch_now) end def total_views(epoch_since = 0) if epoch_since.to_i == 0 - REDIS.get(impressions_key).to_i + Redis.current.get(impressions_key).to_i else epoch_now = Time.now.to_i epoch_since = epoch_since.to_i - REDIS.zcount(user_views_key, epoch_since, epoch_now) + REDIS.zcount(user_anon_views_key, epoch_since, epoch_now) + Redis.current.zcount(user_views_key, epoch_since, epoch_now) + Redis.current.zcount(user_anon_views_key, epoch_since, epoch_now) end end - def queued_for?(queue_name) - ProcessingQueue.queued?(self, queue_name) - end def best_matching_job matching_jobs.first @@ -1075,7 +968,7 @@ def matching_jobs if self.user.team && self.user.team.hiring? self.user.team.best_positions_for(self.user) else - Opportunity.based_on(self.topics) + Opportunity.based_on(self.topic_list) end end @@ -1083,6 +976,10 @@ def to_html CFM::Markdown.render self.body end + def slug_format + "#{title}" + end + protected def check_links errors[:body] << "one or more of the links are invalid or not publicly reachable/require login" unless valid_links? @@ -1090,95 +987,10 @@ def check_links private def need_to_extract_data_from_links - self.topics.blank? || self.title.blank? + self.topic_list.blank? || self.title.blank? end def adjust_like_value(user, like_value) user.is_a?(User) && self.author.team_member_of?(user) ? [like_value/2, 1].max : like_value end - - class SearchWrapper - attr_reader :item - - def initialize(item) - @item = item.is_a?(Protip) ? item.to_public_hash : item - end - - def username - item[:user][:username] - end - - def profile_url - avatar - end - - def avatar - item[:user][:avatar] - end - - def already_voted?(current_user, tracking, ip_address) - false - end - - def user - self #proxy user calls to self - end - - def owner?(user) - return false if user.nil? - username == user.username - end - - def upvotes - item[:upvotes] - end - - def topics - (item[:tags] - [item[:user][:username]]).uniq - end - - def only_link? - item[:only_link] == true - end - - def link - item[:link] - end - - def title - item[:title] - end - - def to_s - public_id #for url creation - end - - def public_id - item[:public_id] - end - - def created_at - item[:created_at] - end - - def self.model_name - Protip.model_name - end - - def viewed_by?(viewer) - singleton.viewed_by?(viewer) - end - - def total_views - singleton.total_views - end - - def team_profile_url - item[:team][:profile_url] - end - - def singleton - item.is_a?(Protip) ? item : Protip.new(public_id: public_id) - end - end end diff --git a/app/models/protip/search.rb b/app/models/protip/search.rb new file mode 100644 index 00000000..dcc5b12c --- /dev/null +++ b/app/models/protip/search.rb @@ -0,0 +1,6 @@ +class Protip::Search < SearchModule::Search + + def failover_strategy + {failover: Protip.order('score DESC')} + end +end \ No newline at end of file diff --git a/app/models/protip/search/query.rb b/app/models/protip/search/query.rb new file mode 100644 index 00000000..3ef315b5 --- /dev/null +++ b/app/models/protip/search/query.rb @@ -0,0 +1,5 @@ +class Protip::Search::Query < SearchModule::Search::Query + def default_query + "flagged:false" + end +end \ No newline at end of file diff --git a/app/models/protip/search/scope.rb b/app/models/protip/search/scope.rb new file mode 100644 index 00000000..76a7a148 --- /dev/null +++ b/app/models/protip/search/scope.rb @@ -0,0 +1,27 @@ +class Protip::Search::Scope < SearchModule::Search::Scope + + def to_hash + case @domain + when :user + followings(@object) + when :network + network(@object) + end + end + + def followings(user) + { + or: [ + { terms: { "user.user_id" => [user.id] + user.following_users_ids + user.following_team_members_ids } }, + { terms: { "tags" => user.following_networks_tags } } + ] + } + end + + def network(tag) + tags = Network.find_by_slug(tag.parameterize).try(:tags) || tag + { + terms: { tags: tags} + } + end +end \ No newline at end of file diff --git a/app/models/protip/search_wrapper.rb b/app/models/protip/search_wrapper.rb new file mode 100644 index 00000000..4605c719 --- /dev/null +++ b/app/models/protip/search_wrapper.rb @@ -0,0 +1,84 @@ +class Protip::SearchWrapper + attr_accessor :item + + def initialize(item) + @item = item.is_a?(Protip) ? item.to_public_hash : item + end + + def username + item[:user][:username] + end + + def profile_url + avatar + end + + def avatar + item[:user][:avatar] + end + + def already_voted?(current_user, tracking, ip_address) + false + end + + def user + self #proxy user calls to self + end + + def owner?(user) + return false if user.nil? + username == user.username + end + + def upvotes + item[:upvotes] + end + + def topics + (item[:tags] - [item[:user][:username]]).uniq + end + + def only_link? + item[:only_link] == true + end + + def link + item[:link] + end + + def title + item[:title] + end + + def to_s + public_id #for url creation + end + + def public_id + item[:public_id] + end + + def created_at + item[:created_at] + end + + def self.model_name + Protip.model_name + end + + def viewed_by?(viewer) + singleton.viewed_by?(viewer) + end + + def total_views + singleton.total_views + end + + def team_profile_url + item[:team][:profile_url] + end + + def singleton + item.is_a?(Protip) ? item : Protip.new(public_id: public_id) + end +end diff --git a/app/models/protip_link.rb b/app/models/protip_link.rb index 892ac7e8..d7a318f8 100644 --- a/app/models/protip_link.rb +++ b/app/models/protip_link.rb @@ -1,19 +1,14 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `protip_links` +# Table name: protip_links # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`identifier`** | `string(255)` | -# **`kind`** | `string(255)` | -# **`protip_id`** | `integer` | -# **`updated_at`** | `datetime` | -# **`url`** | `string(255)` | +# id :integer not null, primary key +# identifier :string(255) +# url :string(255) +# protip_id :integer +# created_at :datetime +# updated_at :datetime +# kind :string(255) # require 'digest/md5' diff --git a/app/models/redemption.rb b/app/models/redemption.rb deleted file mode 100644 index 8a725ac0..00000000 --- a/app/models/redemption.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Redemption < Struct.new(:code, :name, :url, :relevant_on, :badge, :description, :tags, :metadata) - ALL = [ - STANDFORD_ACM312 = Redemption.new('ACM312', '2012 Winter Hackathon', 'http://stanfordacm.com', Date.parse('12/03/2012'), HackathonStanford, "Participated in Stanford's premier Hackathon on March 3rd 2012.", ['hackathon', 'university', 'award', 'inperson'], { school: 'Stanford', award: HackathonStanford.name }), - CMU_HACKATHON = Redemption.new('CMUHACK', 'CMU Hackathon', 'http://www.scottylabs.org/', Date.parse('01/05/2012'), HackathonCmu, "Participated in Carnegie Mellon's Hackathon.", ['hackathon', 'university', 'award', 'inperson'], { school: 'Carnegie Mellon', award: HackathonCmu.name }), - WROCLOVE = Redemption.new('WROCLOVE', '2012 wroc_love.rb Conference', 'http://wrocloverb.com', Date.parse('09/03/2012'), WrocLover, "Attended the wroc_lover.rb conference on March 9th 2012.", ['conference', 'attended', 'award'], { name: 'WrocLove', award: WrocLover.name }), - UHACK = Redemption.new('UHACK12', 'UHack 2012', 'http://uhack.us', Date.parse('01/4/2012'), Hackathon, "Participated in UHack, organized by the ACM and IEEE at the University of Miami in April 2012.", ['hackathon', 'award', 'inperson'], { school: 'University of Miami', award: Hackathon.name }), - ADVANCE_HACK = Redemption.new('AH12', 'Advance Hackathon 2012', 'https://github.com/railslove/Hackathon2012', Date.parse('29/4/2012'), Hackathon, "Participated in the Advance Hackathon, a 3 day event for collaborative coding, meeting the finest designers and coders from whole NRW at Coworking Space Gasmotorenfabrik, Cologne.", ['hackathon', 'award', 'inperson'], { award: Hackathon.name }), - RAILSBERRY = Redemption.new('RAILSBERRY2012', '2012 Railsberry Conference', 'http://railsberry.com', Date.parse('20/04/2012'), Railsberry, "Attended the Railsberry April 20th 2012.", ['conference', 'attended', 'award'], { name: 'Railsberry', award: Railsberry.name }) - ] - - def self.for_code(code) - ALL.detect { |redemption| redemption.code.downcase == code.downcase } - end - - def award!(user) - Fact.append!("redemption:#{code}:#{user.id}", user.id.to_s, name, relevant_on, url, tags, metadata) - user.redemptions << code - user.award(badge.new(user)) - user.save! - end - -end \ No newline at end of file diff --git a/app/models/seized_opportunity.rb b/app/models/seized_opportunity.rb index 55d7dae4..509bbb61 100644 --- a/app/models/seized_opportunity.rb +++ b/app/models/seized_opportunity.rb @@ -1,20 +1,17 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `seized_opportunities` +# Table name: seized_opportunities # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`opportunity_id`** | `integer` | -# **`opportunity_type`** | `string(255)` | -# **`team_document_id`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | +# id :integer not null, primary key +# opportunity_id :integer +# user_id :integer +# created_at :datetime +# updated_at :datetime # class SeizedOpportunity < ActiveRecord::Base + belongs_to :opportunity + belongs_to :user + validates_presence_of :opportunity_id, :user_id + validates_uniqueness_of :user_id, scope: :opportunity_id end diff --git a/app/models/sent_mail.rb b/app/models/sent_mail.rb index 21bd46c1..ecc63d56 100644 --- a/app/models/sent_mail.rb +++ b/app/models/sent_mail.rb @@ -1,17 +1,12 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `sent_mails` +# Table name: sent_mails # -# ### Columns -# -# Name | Type | Attributes -# -------------------- | ------------------ | --------------------------- -# **`id`** | `integer` | `not null, primary key` -# **`mailable_id`** | `integer` | -# **`mailable_type`** | `string(255)` | -# **`sent_at`** | `datetime` | -# **`user_id`** | `integer` | +# id :integer not null, primary key +# mailable_id :integer +# mailable_type :string(255) +# user_id :integer +# sent_at :datetime # class SentMail < ActiveRecord::Base diff --git a/app/models/skill.rb b/app/models/skill.rb index 441b95dd..14fadb99 100644 --- a/app/models/skill.rb +++ b/app/models/skill.rb @@ -1,44 +1,30 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `skills` +# Table name: skills # -# ### Columns -# -# Name | Type | Attributes -# ------------------------- | ------------------ | --------------------------- -# **`attended_events`** | `text` | -# **`created_at`** | `datetime` | -# **`deleted`** | `boolean` | `default(FALSE), not null` -# **`deleted_at`** | `datetime` | -# **`endorsements_count`** | `integer` | `default(0)` -# **`id`** | `integer` | `not null, primary key` -# **`name`** | `string(255)` | `not null` -# **`repos`** | `text` | -# **`speaking_events`** | `text` | -# **`tokenized`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# **`weight`** | `integer` | `default(0)` -# -# ### Indexes -# -# * `index_skills_on_deleted_and_user_id`: -# * **`deleted`** -# * **`user_id`** -# * `index_skills_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# user_id :integer +# name :citext not null +# endorsements_count :integer default(0) +# created_at :datetime +# updated_at :datetime +# tokenized :string(255) +# weight :integer default(0) +# repos :text +# speaking_events :text +# attended_events :text +# deleted :boolean default(FALSE), not null +# deleted_at :datetime +# links :json default("{}") # class Skill < ActiveRecord::Base - include ResqueSupport::Basic - never_wastes SPACE = ' ' BLANK = '' - belongs_to :user + belongs_to :user, touch: true has_many :endorsements validates_presence_of :tokenized @@ -53,32 +39,33 @@ class Skill < ActiveRecord::Base serialize :repos, Array serialize :attended_events, Array serialize :speaking_events, Array + serialize :links, ActiveRecord::Coders::JSON - default_scope where(deleted: false) - class << self - def tokenize(value) - v = value.to_s.gsub('&', 'and').downcase.gsub(/\s|\./, BLANK) - v = 'nodejs' if v == 'node' - Sanitize.clean(v) - end + default_scope {where(deleted: false)} + scope :deleted, -> { unscoped.where(deleted: true) } - def deleted?(user_id, skill_name) - Skill.with_deleted.where(user_id: user_id, name: skill_name, deleted: true).any? - end + def self.tokenize(value) + v = value.to_s.gsub('&', 'and').downcase.gsub(/\s|\./, BLANK) + v = 'nodejs' if v == 'node' + Sanitize.clean(v) end - def merge_with(another_skill) - if another_skill.user_id == self.user_id - another_skill.endorsements.each do |endorsement| - self.endorsed_by(endorsement.endorser) - end - self.repos += another_skill.repos - self.attended_events += another_skill.attended_events - self.speaking_events += another_skill.speaking_events - end + def self.deleted?(user_id, skill_name) + deleted.where(user_id: user_id, name: skill_name).any? end + # def merge_with(another_skill) + # if another_skill.user_id == self.user_id + # another_skill.endorsements.each do |endorsement| + # self.endorsed_by(endorsement.endorser) + # end + # self.repos += another_skill.repos + # self.attended_events += another_skill.attended_events + # self.speaking_events += another_skill.speaking_events + # end + # end + def endorsed_by(endorser) # endorsed is only in here during migration of endorsement to skill endorsements.create!(endorser: endorser, endorsed: self.user, specialty: self.name) @@ -145,7 +132,7 @@ def apply_facts(facts = nil) end def generate_event - enqueue(GenerateEvent, self.event_type, Audience.user_reach(self.user.id), self.to_event_hash) + GenerateEventJob.perform_async(self.event_type, Audience.user_reach(self.user.id), self.to_event_hash) end def to_event_hash diff --git a/app/models/spam_report.rb b/app/models/spam_report.rb new file mode 100644 index 00000000..32dfc5a9 --- /dev/null +++ b/app/models/spam_report.rb @@ -0,0 +1,20 @@ +# == Schema Information +# +# Table name: spam_reports +# +# id :integer not null, primary key +# spammable_id :integer not null +# spammable_type :string(255) not null +# created_at :datetime not null +# updated_at :datetime not null +# + +class SpamReport < ActiveRecord::Base + belongs_to :spammable, polymorphic: true + + after_create :report_spam_to_spammable + + def report_spam_to_spammable + spammable.report_spam + end +end diff --git a/app/models/tag.rb b/app/models/tag.rb deleted file mode 100644 index f77cbef8..00000000 --- a/app/models/tag.rb +++ /dev/null @@ -1,52 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `tags` -# -# ### Columns -# -# Name | Type | Attributes -# ----------- | ------------------ | --------------------------- -# **`id`** | `integer` | `not null, primary key` -# **`name`** | `string(255)` | -# - -class Tag < ActiveRecord::Base - acts_as_followable - - VALID_PROGRAMMING_LANGUAGES = ["github", "slideshare", "python", "ruby", "javascript", "php", "objective-c", "java", - "viml", "perl", "clojure", "coffeescript", "scala", "erlang", "emacslisp", "go", - "haskell", "actionscript", "lua", "groovy", "git", "commonlisp", "puppet", "hackerdesk", - "css", "assembly", "ocaml", "haxe", "scheme", "vim", "coldfusion", "d", "rails", - "powershell", "objective-j", "bash", "ios", "html", "dart", "matlab", "jquery", - "android", "arduino", "xcode", "osx", "html5", "css3", "visualbasic", "rubyonrails", - "mysql", "delphi", "smalltalk", "mac", "iphone", "linux", "ipad", "mirah", "nodejs", - "tcl", "apex", "wordpress", "cocoa", "nodejs", "heroku", "io", "js", "dcpu-16asm", - "django", "zsh", "rspec", "programming", "vala", "sql", "mongodb", "workspace", - "racket", "twitter", "terminal", "development", "opensource", "testing", "design", - "emberjs", "security", "verilog", "net", "blurandpure", "mobile", "sass", "code", - "webkit", "api", "json", "nginx", "elixir", "agile", "bundler", "emacs", "web", - "drupal", "unix", "csharp", "photoshop", "nodejs", "facebook", "log", "reference", - "cli", "sublimetext", "responsive", "tdd", "puredata", "asp", "codeigniter", "maven", - "rubygems", "gem", "oracle", "nosql", "rvm", "ui", "branch", "responsivedesign", - "fortran", "postgresql", "latex", "nimrod", "documentation", "rubymotion", "redis", - "backbone", "ubuntu", "regex", "textmate", "fancy", "ssh", "performance", "spring", - "sublimetext2", "boo", "flex", "coq", "aliases", "browser", "webdevelopment", "rest", - "eclipse", "tips", "factor", "commandline", "sublimetext", "ooc", "blog", "unittesting", - "server", "history", "lion", "tip", "autohotkey", "alias", "prolog", "apple", - "standardml", "vhdl", "objectivec", "statistics", "impactgameengine", "apache", - "cucumber", "cpp", "meta", "gist", "dropbox", "gitignore", "rails3", "debug", "flask", - "cplusplus", "monitoring", "angularjs", "oauth", "oop", "usability", "flexmojos", - "sentry", "expressionengine", "ee"] - - scope :from_topic, lambda { |topic| where(name: topic) } - - def subscribe(user) - user.follow(self) - end - - def unsubscribe(user) - user.stop_following(self) - end - -end diff --git a/app/models/tagging.rb b/app/models/tagging.rb deleted file mode 100644 index cf559cdf..00000000 --- a/app/models/tagging.rb +++ /dev/null @@ -1,31 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `taggings` -# -# ### Columns -# -# Name | Type | Attributes -# -------------------- | ------------------ | --------------------------- -# **`context`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`tag_id`** | `integer` | -# **`taggable_id`** | `integer` | -# **`taggable_type`** | `string(255)` | -# **`tagger_id`** | `integer` | -# **`tagger_type`** | `string(255)` | -# -# ### Indexes -# -# * `index_taggings_on_tag_id`: -# * **`tag_id`** -# * `index_taggings_on_taggable_id_and_taggable_type_and_context`: -# * **`taggable_id`** -# * **`taggable_type`** -# * **`context`** -# - -class Tagging < ActiveRecord::Base - belongs_to :tag -end diff --git a/app/models/team.rb b/app/models/team.rb index ce9f99bb..b3ce0cea 100644 --- a/app/models/team.rb +++ b/app/models/team.rb @@ -1,215 +1,180 @@ -# encoding: utf-8 - +# == Schema Information +# +# Table name: teams +# +# id :integer not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# website :string(255) +# about :text +# total :decimal(40, 30) default(0.0) +# size :integer default(0) +# mean :decimal(40, 30) default(0.0) +# median :decimal(40, 30) default(0.0) +# score :decimal(40, 30) default(0.0) +# twitter :string(255) +# facebook :string(255) +# slug :citext not null +# premium :boolean default(FALSE) +# analytics :boolean default(FALSE) +# valid_jobs :boolean default(FALSE) +# hide_from_featured :boolean default(FALSE) +# preview_code :string(255) +# youtube_url :string(255) +# github :string(255) +# highlight_tags :string(255) +# branding :text +# headline :text +# big_quote :text +# big_image :string(255) +# featured_banner_image :string(255) +# benefit_name_1 :text +# benefit_description_1 :text +# benefit_name_2 :text +# benefit_description_2 :text +# benefit_name_3 :text +# benefit_description_3 :text +# reason_name_1 :text +# reason_description_1 :text +# reason_name_2 :text +# reason_description_2 :text +# reason_name_3 :text +# reason_description_3 :text +# why_work_image :text +# organization_way :text +# organization_way_name :text +# organization_way_photo :text +# blog_feed :text +# our_challenge :text +# your_impact :text +# hiring_tagline :text +# link_to_careers_page :text +# avatar :string(255) +# achievement_count :integer default(0) +# endorsement_count :integer default(0) +# upgraded_at :datetime +# paid_job_posts :integer default(0) +# monthly_subscription :boolean default(FALSE) +# stack_list :text default("") +# number_of_jobs_to_show :integer default(2) +# location :string(255) +# country_id :integer +# name :string(255) +# github_organization_name :string(255) +# team_size :integer +# mongo_id :string(255) +# office_photos :string(255) default([]), is an Array +# upcoming_events :text default([]), is an Array +# interview_steps :text default([]), is an Array +# invited_emails :string(255) default([]), is an Array +# pending_join_requests :string(255) default([]), is an Array +# state :string(255) default("active") +# + +# encoding utf-8 require 'search' -class Team - include Mongoid::Document - include Mongoid::Timestamps - include Tire::Model::Search - include ResqueSupport::Basic - include LeaderboardRedisRank - include SearchModule - - # Disabled Team indexing because it slows down updates - # we should BG this - #include Tire::Model::Callbacks - - mapping team: { - properties: { - id: { type: 'string', index: 'not_analyzed' }, - slug: { type: 'string', index: 'not_analyzed' }, - name: { type: 'string', boost: 100, analyzer: 'snowball' }, - score: { type: 'float', index: 'not_analyzed' }, - size: { type: 'integer', index: 'not_analyzed' }, - avatar: { type: 'string', index: 'not_analyzed' }, - country: { type: 'string', boost: 50, analyzer: 'snowball' }, - url: { type: 'string', index: 'not_analyzed' }, - follow_path: { type: 'string', index: 'not_analyzed' }, - hiring: { type: 'boolean', index: 'not_analyzed' }, - total_member_count: { type: 'integer', index: 'not_analyzed' }, - completed_sections: { type: 'integer', index: 'not_analyzed' }, - team_members: { type: 'multi_field', fields: { - username: { type: 'string', index: 'not_analyzed' }, - profile_url: { type: 'string', index: 'not_analyzed' }, - avatar: { type: 'string', index: 'not_analyzed' } - } } - } - } - +class Team < ActiveRecord::Base DEFAULT_HEX_BRAND = '#343131' - LEADERBOARD_KEY = 'teams:leaderboard' FEATURED_TEAMS_CACHE_KEY = 'featured_teams_results' MAX_TEAM_SCORE = 400 - field :name - field :website - field :location - field :about - field :total, default: 0 - field :size, default: 0 - field :mean, default: 0 - field :median, default: 0 - field :score, default: 0 - field :twitter - field :facebook - field :slug - field :premium, default: false, type: Boolean - field :analytics, default: false, type: Boolean - field :valid_jobs, default: false, type: Boolean - field :hide_from_featured, default: false, type: Boolean - field :preview_code - field :youtube_url - - field :github_organization_name - alias :github :github_organization_name - - field :highlight_tags - field :branding - field :headline - field :big_quote - field :big_image - field :featured_banner_image - - field :benefit_name_1 - field :benefit_description_1 - field :benefit_name_2 - field :benefit_description_2 - field :benefit_name_3 - field :benefit_description_3 - - field :reason_name_1 - field :reason_description_1 - field :reason_name_2 - field :reason_description_2 - field :reason_name_3 - field :reason_description_3 - field :why_work_image - - field :organization_way - field :organization_way_name - field :organization_way_photo - - field :office_photos, type: Array, default: [] - field :upcoming_events, type: Array, default: [] #just stubbed - - field :featured_links_title - embeds_many :featured_links, class_name: TeamLink.name - - field :blog_feed - field :our_challenge - field :your_impact - - field :interview_steps, type: Array, default: [] - field :hiring_tagline - field :link_to_careers_page - - field :avatar - mount_uploader :avatar, AvatarUploader - - field :achievement_count, default: 0 - field :endorsement_count, default: 0 - field :invited_emails, type: Array, default: [] - field :country_id - - field :admins, type: Array, default: [] - field :editors, type: Array, default: [] - - field :pending_join_requests, type: Array, default: [] - - embeds_one :account - field :upgraded_at - field :paid_job_posts, default: 0 - field :monthly_subscription, default: false - field :stack_list, default: nil - field :number_of_jobs_to_show, default: 2 - - validates_presence_of :name - validates_uniqueness_of :name - validates_uniqueness_of :slug - - index({ name: 1 }, { unique: true }) - index({ slug: 1 }, { unique: true }) - - embeds_many :pending_team_members, class_name: 'TeamMember' - - embeds_many :team_locations - - accepts_nested_attributes_for :team_locations, :featured_links, allow_destroy: true, reject_if: :all_blank - - before_save :update_team_size! - before_save :clear_cache_if_premium_team + include TeamAnalytics + + include TeamSearch + include Blog + include SearchModule + + mount_uploader :avatar, TeamUploader + + has_many :invitations + has_many :opportunities, dependent: :destroy + has_many :followers, through: :follows, source: :team + has_many :follows, class_name: 'FollowedTeam', foreign_key: 'team_id', dependent: :destroy + has_many :jobs, class_name: 'Opportunity', foreign_key: 'team_id', dependent: :destroy + has_many :locations, class_name: 'Teams::Location', foreign_key: 'team_id' + has_many :members, class_name: 'Teams::Member', foreign_key: 'team_id' + def admins + members.admins + end + + has_many :member_accounts, through: :members, source: :user, class_name: 'User' + def admin_accounts + member_accounts.where("teams_members.role = 'admin'") + end + + has_one :account, class_name: 'Teams::Account', foreign_key: 'team_id' + + accepts_nested_attributes_for :locations, allow_destroy: true, reject_if: :all_blank + before_validation :create_slug! before_validation :fix_website_url! - attr_accessor :skip_validations + before_save :clear_cache_if_premium_team after_create :generate_event after_save :reindex_search after_destroy :reindex_search - after_destroy :remove_dependencies - - scope :featured, where(premium: true, valid_jobs: true, hide_from_featured: false) - - if Rails.env.development? #for Oli - def avatar_url - url = super - url = 'team-avatar.png' - if url.include?('http') - 'team-avatar.png' - else - url - end - end + + validates :slug, uniqueness: true, presence: true + validates :name, presence: true + + scope :featured, ->{ where(premium: true, valid_jobs: true, hide_from_featured: false) } + + def top_three_team_members + members.first(3) end - class << self + def sorted_team_members + members.sorted + end - def with_name(name) - where(name: name).first - end + def all_jobs + jobs.order(:created_at).reverse_order + end - def search(query_string, country, page, per_page, search_type = :query_and_fetch) - country = query_string.gsub!(/country:(.+)/, '') && $1 if country.nil? - query = "" - if query_string.blank? or query_string =~ /:/ - query += query_string - else - query += "name:#{query_string}*" - end - #query += "country:#{country}" unless country.nil? - begin - tire.search(load: false, search_type: search_type, page: page, per_page: per_page) do - query { string query, default_operator: 'AND' } if query_string.present? - filter :term, country: country unless country.nil? - sort { by [{ score: 'desc', total_member_count: 'desc', '_score' => {} }] } - end - rescue Tire::Search::SearchRequestFailed => e - SearchResultsWrapper.new(nil, "Looks like our teams server is down. Try again soon.") - end + def self.search(query_string, country, page, per_page, search_type = :query_and_fetch) + country = query_string.gsub!(/country:(.+)/, '') && $1 if country.nil? + query = '' + + if query_string.blank? or query_string =~ /:/ + query += query_string + else + query += "name:#{query_string}*" end - def slugify(name) - if !!(name =~ /\p{Latin}/) - name.to_s.downcase.gsub(/[^a-z0-9]+/i, '-').chomp('-') - else - name.to_s.gsub(/\s/, "-") + begin + tire.search(load: false, search_type: search_type, page: page, per_page: per_page) do + query { string query, default_operator: 'AND' } if query_string.present? + filter :term, country: country unless country.nil? + sort { by [{ score: 'desc', total_member_count: 'desc', '_score' => {} }] } end + rescue Tire::Search::SearchRequestFailed + SearchResultsWrapper.new(nil, "Looks like our teams server is down. Try again soon.") end + end - def has_jobs - Team.find(Opportunity.valid.select(:team_document_id).map(&:team_document_id)) + def self.slugify(name) + if !!(name =~ /\p{Latin}/) + name.to_s.downcase.gsub(/[^a-z0-9]+/i, '-').chomp('-') + else + name.to_s.tr(' ', '-') end + end - def most_relevant_featured_for(user) - Team.featured.sort_by { |team| -team.match_score_for(user) } - end + def self.most_relevant_featured_for(user) + Team.featured.sort_by { |team| -team.match_score_for(user) } + end - def completed_at_least(section_count = 6, page=1, per_page=Team.count, search_type = :query_and_fetch) - Team.search("completed_sections:[ #{section_count} TO * ]", nil, page, per_page, search_type) - end + def self.completed_at_least(section_count = 6, page=1, per_page=Team.count, search_type = :query_and_fetch) + Team.search("completed_sections:[ #{section_count} TO * ]", nil, page, per_page, search_type) + end - def with_completed_section(section) - empty = Team.new.send(section).is_a?(Array) ? [] : nil - Team.where(section.to_sym.ne => empty) - end + def self.with_similar_names(name) + Team.where('name ilike ?', "%#{name}%").limit(3).to_a + end + + def self.with_completed_section(section) + empty = Team.new.send(section).is_a?(Array) ? [] : nil + Team.where(section.to_sym.ne => empty) end def relevancy @@ -227,8 +192,8 @@ def best_positions_for(user) end def most_influential_members_for(user) - influencers = user.following_by_type(User.name).where('follows.followable_id in (?)', self.team_members.map(&:id)) - (influencers + self.team_members.first(3)).uniq + influencers = user.following_by_type(User.name).where('follows.followable_id in (?)', self.members.map(&:id)) + (influencers + self.members.first(3)).uniq end def hiring_message @@ -251,6 +216,10 @@ def has_protips? trending_protips.size > 0 end + def trending_protips(limit=4) + Protip.search_trending_by_team(slug, nil, 1, limit) + end + def company? true end @@ -259,80 +228,50 @@ def university? true end - def trending_protips(limit=4) - Protip.search_trending_by_team(self.slug, nil, 1, limit) - end - - def locations - (location || '').split(';').collect { |location| location.strip } - end - def locations_message if premium? - team_locations.collect(&:name).join(', ') + locations.collect(&:name).join(', ') else locations.join(', ') end end def dominant_country_of_members - User.where(team_document_id: self.id.to_s).select([:country, 'count(country) as count']).group([:country]).order('count DESC').limit(1).map(&:country) - end - - def team_members - @team_members ||= User.where(team_document_id: self.id.to_s).all - end - - def reload_team_members - @team_members = nil + members.map(&:user).map do |user| + [user.country, 1] + end.reduce(Hash.new(0)) do |memo, pair| + memo[pair.first] += pair.last + memo + end.to_a.sort do |x, y| + y[1] <=> x[1] + end.map(&:first).compact.first end def reach - team_member_ids = team_members.map(&:id) + team_member_ids = members.map(&:id) Follow.where(followable_type: 'User', followable_id: team_member_ids).count + Follow.where(follower_id: team_member_ids, follower_type: 'User').count - #team_members.collect{|member| member.followers.count + member.following.count }.sum - end - - def has_member?(user) - team_members.include?(user) end def on_team?(user) has_member?(user) end - def branding_hex_color - branding || DEFAULT_HEX_BRAND - end - - def collective_days_on_github - @collective_days_on_github ||= begin - days = team_members.collect { |user| days_since(user.joined_github_on) }.sum - # [(days / 365), (days % 365)] - end - end - - def collective_days_on_twitter - @collective_days_on_twitter ||= begin - days = team_members.collect { |user| days_since(user.joined_twitter_on) }.sum - # [(days / 365), (days % 365)] - # / ==#{@team.collective_days_on_twitter.first} yrs & #{@team.collective_days_on_twitter.last} days - end + def has_member?(user) + members.include?(user) end - def days_since(date) - return 0 if date.nil? - ((Time.now - date.to_time).abs / 60 / 60 / 24).round + def branding_hex_color + branding || DEFAULT_HEX_BRAND end def events - @events ||= team_members.collect { |user| user.followed_repos }.flatten.sort { |x, y| y.date <=> x.date } + @events ||= members.collect { |user| user.followed_repos }.flatten.sort { |x, y| y.date <=> x.date } end def achievements_with_counts @achievements_with_counts ||= begin achievements = {} - team_members.each do |user| + members.each do |user| user.badges.each do |badge| achievements[badge.badge_class] = 0 if achievements[badge.badge_class].blank? achievements[badge.badge_class] += 1 @@ -342,11 +281,11 @@ def achievements_with_counts end end - def top_team_members - top_three_team_members.map do |member| + def top_members + top_three_members.map do |member| { username: member.username, - profile_url: member.profile_url, + profile_url: member.user.avatar_url, avatar: ApplicationController.helpers.users_image_path(member) } end @@ -358,7 +297,7 @@ def to_indexed_json type: self.class.name.downcase, url: Rails.application.routes.url_helpers.team_path(self), follow_path: Rails.application.routes.url_helpers.follow_team_path(self), - team_members: top_team_members, + members: top_members, total_member_count: total_member_count, completed_sections: number_of_completed_sections, country: dominant_country_of_members, @@ -372,10 +311,8 @@ def public_json end def public_hash - neighbors = Team.find((higher_competitors(5) + lower_competitors(5)).flatten.uniq) summary.merge( - neighbors: neighbors.collect(&:summary), - team_members: team_members.collect { |user| { + members: member_accounts.collect { |user| { name: user.display_name, username: user.username, badges_count: user.badges_count, @@ -389,17 +326,12 @@ def summary name: name, about: about, id: id.to_s, - rank: rank, size: size, slug: slug, avatar: avatar_url, } end - def ranked? - total_member_count >= 3 && rank != 0 - end - def display_name name end @@ -455,19 +387,11 @@ def has_interview_steps? end def has_locations? - !team_locations.blank? - end - - def has_featured_links? - !featured_links.blank? + !locations.blank? end def has_upcoming_events? - !upcoming_events.blank? - end - - def has_team_blog? - !blog_feed.blank? + false end def has_achievements? @@ -481,82 +405,79 @@ def has_specialties? def specialties_with_counts @specialties_with_counts ||= begin specialties = {} - team_members.each do |user| + + member_accounts.each do |user| user.speciality_tags.each do |tag| tag = tag.downcase specialties[tag] = 0 if specialties[tag].blank? specialties[tag] += 1 end end - unless only_one_occurence_of_each = specialties.values.sum == specialties.values.length + + unless specialties.values.sum == specialties.values.length specialties.reject! { |k, v| v <= 1 } end + specialties.sort_by { |k, v| v }.reverse[0..7] end end def empty? - (team_members.size) <= 0 + (members.size) <= 0 end def pending_size - team_members.size + invited_emails.size + members.size + invited_emails.size end def is_invited?(user) - !pending_team_members.where(user_id: id_of(user)).first.nil? + !pending_members.where(user_id: id_of(user)).first.nil? end def is_member?(user) - team_members.include?(user) + members.include?(user) end def membership(user) - team_members.where(user_id: id_of(user)).first + members.where(user_id: id_of(user)).first end def top_team_member - sorted_team_members.first + sorted_members.first end - def top_two_team_members - sorted_team_members[0...2] || [] + def top_two_members + sorted_members[0...2] || [] end - def top_three_team_members - sorted_team_members[0...3] || [] + def top_three_members + sorted_members[0...3] || [] end - def sorted_team_members - @sorted_team_members = User.where(team_document_id: self.id.to_s).order('score_cache DESC') + def sorted_members + @sorted_members = members.order('score_cache DESC') end - def add_user(user) - user.update_attribute(:team_document_id, id.to_s) - touch! - user.save! - user + def add_member(user, state='pending', role='member') + member = members.create(user_id: user.id) + member.update_attributes(state: state, role: role) + member end + alias_method :add_user, :add_member - def remove_user(user) - if user.team_document_id.to_s == self.id.to_s - user.update_attribute(:team_document_id, nil) - touch! - self.destroy if self.reload.empty? - end + def remove_member(user) + members.destroy_all(user_id: user.id) end + attr_accessor :skip_validations + def touch! self.updated_at = Time.now.utc save!(validate: !skip_validations) end def total_member_count - User.where(team_document_id: self.id.to_s).count - end - - def total_highlights_count - team_members.collect { |u| u.highlights.count }.sum + members.count end def team_size_threshold @@ -577,20 +498,17 @@ def <=> y val = size <=> y.size return val unless val == 0 - val = total_highlights_count <=> y.total_highlights_count - return val unless val == 0 - id.to_s <=> y.id.to_s end def recalculate! - return nil if team_members.size <= 0 + return nil if members.size <= 0 log_history! update_team_size! - self.total = team_members.collect(&:score).sum - self.achievement_count = team_members.collect { |t| t.badges.count }.sum - self.endorsement_count = team_members.collect { |t| t.endorsements.count }.sum - self.mean = team_members.empty? ? 0 : (total / team_members_with_scores.size).to_f + self.total = members.collect(&:score).sum + self.achievement_count = members.collect { |t| t.badges.count }.sum + self.endorsement_count = members.collect { |t| t.endorsements.count }.sum + self.mean = members.empty? ? 0 : (total / members_with_scores.size).to_f self.median = calculate_median self.score = [real_score, MAX_TEAM_SCORE].min save! @@ -605,11 +523,11 @@ def leader_score end def leader - sorted_team_members.sort { |x, y| x.score <=> y.score }.reverse.first + sorted_members.sort { |x, y| x.score <=> y.score }.reverse.first end def multipler - team_score = team_members_with_scores.size + team_score = members_with_scores.size if team_score <= 3 0.50 elsif team_score <= 4 @@ -617,18 +535,12 @@ def multipler elsif team_score <= 5 0.90 else - Math.log(team_members_with_scores.size - 2, 3) + Math.log(members_with_scores.size - 2, 3) end - # team_size = team_members_with_scores.size - # if team_size <= 4 - # 0.95 - # else - # 1 - # end end def members_with_score_above(score) - team_members.select { |u| u.score >= score }.size + members.select { |u| u.score >= score }.size end def size_credit @@ -640,19 +552,19 @@ def size_credit end def calculate_median - sorted = team_members.collect(&:score).sort + sorted = members.collect(&:score).sort return 0 if sorted.empty? lower = sorted[(sorted.size/2) - 1] upper = sorted[((sorted.size+1)/2) -1] (lower + upper) / 2 end - def team_members_with_scores - @team_members_with_scores ||= team_members.collect { |t| t.score > 0 } + def members_with_scores + @members_with_scores ||= members.collect { |t| t.score > 0 } end def log_history! - REDIS.rpush("team:#{id.to_s}:score", { + Redis.current.rpush("team:#{id.to_s}:score", { date: Date.today, score: self.score, size: self.size @@ -661,7 +573,7 @@ def log_history! def predominant skill = {} - team_members.each do |member| + members.each do |member| member.user.repositories.each do |repo| repo.tags.each do |tag| skill[tag] = (skill[tag] ||= 0) + 1 @@ -674,11 +586,7 @@ def predominant def admin?(user) return false if user.nil? return true if user.admin? - if everyone_is_an_admin = admins.empty? - team_members.include?(user) - else - admins.include?(user.id) - end + admins.pluck(:user_id).include?(user.id) end def timeline_key @@ -686,7 +594,7 @@ def timeline_key end def has_user_with_referral_token?(token) - team_members.collect(&:referral_token).include?(token) + member_accounts.exists?(referral_token: token) end def impressions_key @@ -707,86 +615,60 @@ def user_detail_views_key def viewed_by(viewer) epoch_now = Time.now.to_i - REDIS.incr(impressions_key) + Redis.current.incr(impressions_key) if viewer.is_a?(User) - REDIS.zadd(user_views_key, epoch_now, viewer.id) + Redis.current.zadd(user_views_key, epoch_now, viewer.id) else - REDIS.zadd(user_anon_views_key, epoch_now, viewer) + Redis.current.zadd(user_anon_views_key, epoch_now, viewer) end end def impressions - REDIS.get(impressions_key).to_i + Redis.current.get(impressions_key).to_i end def viewers(since=0) epoch_now = Time.now.to_i - viewer_ids = REDIS.zrevrangebyscore(user_views_key, epoch_now, since) + viewer_ids = Redis.current.zrevrangebyscore(user_views_key, epoch_now, since) User.where(id: viewer_ids).all end def total_views(epoch_since = 0) epoch_now = Time.now.to_i - REDIS.zcount(user_views_key, epoch_since, epoch_now) + REDIS.zcount(user_anon_views_key, epoch_since, epoch_now) - end - - def followers - FollowedTeam.where(team_document_id: self.id.to_s) + Redis.current.zcount(user_views_key, epoch_since, epoch_now) + Redis.current.zcount(user_anon_views_key, epoch_since, epoch_now) end def self.most_active_countries Country.where(name: User.select([:country, 'count(country) as count']).group(:country).order('count DESC').limit(10).map(&:country)).reverse end - def self.test_scores - [ - 'GitHub', - 'Cubox', - 'Nodejitsu', - 'Code for America', - 'EmberAds', - 'LivingSocial', - 'AppDev', - 'Groupon', - 'Relevance', - 'ThoughtWorks', - 'Heroku', - '37signals', - 'Flattr', - 'Clock' - ].collect { |name| t = Team.where(name: name).first; puts name; t.recalculate!; t }.sort.reverse.each do |t| - puts "#{t.score} => #{t.name}" - end - nil - end - def primary_address - team_locations.first.try(:address) || primary_address_name + locations.first.try(:address) || primary_address_name end def primary_address_name - team_locations.first.try(:name) + locations.first.try(:name) end def primary_address_description - team_locations.first.try(:description) + locations.first.try(:description) end def primary_points_of_interest - team_locations.first.try(:points_of_interest).to_a + locations.first.try(:points_of_interest).to_a end def cities - team_locations.map(&:city).reject { |city| city.blank? } + locations.map(&:city).reject { |city| city.blank? } end def generate_event - only_member_is_creator = team_members.first.try(:id) - enqueue(GenerateEvent, self.event_type, Audience.following_user(only_member_is_creator), self.to_event_hash, 1.minute) unless only_member_is_creator.nil? + only_member_is_creator = members.first.try(:id) + GenerateEventJob.perform_async(self.event_type, Audience.following_user(only_member_is_creator), self.to_event_hash, 1.minute) unless only_member_is_creator.nil? end def to_event_hash - { user: { username: team_members.any? && team_members.first.username } } + { user: { username: members.any? && members.first.username } } end def event_type @@ -799,12 +681,6 @@ def fix_website_url! end end - def upcoming_events - team_members.collect do |member| - - end - end - def active_jobs jobs[0...4] end @@ -813,67 +689,11 @@ def active_job_titles active_jobs.collect(&:title).uniq end - def jobs - all_jobs.valid - end - def all_jobs - Opportunity.where(team_document_id: self.id.to_s).order('created_at DESC') - end - def record_exit(viewer, exit_url, exit_target_type, furthest_scrolled, time_spent) - epoch_now = Time.now.to_i - data = visitor_data(exit_url, exit_target_type, furthest_scrolled, time_spent, (viewer.respond_to?(:id) && viewer.try(:id)) || viewer, epoch_now, nil) - REDIS.zadd(user_detail_views_key, epoch_now, data) - end - def detailed_visitors(since = 0) - REDIS.zrangebyscore(user_detail_views_key, since, Time.now.to_i).map do |visitor_string| - visitor = HashStringParser.better_than_eval(visitor_string) - visitor[:user] = identify_visitor(visitor[:user_id]) - visitor - end - end + SECTION_FIELDS = %w(about headline big_quote our_challenge benefit_description_1 organization_way office_photos stack_list reason_name_1 interview_steps locations blog_feed) - def simple_visitors(since = 0) - all_visitors = REDIS.zrangebyscore(user_views_key, since, Time.now.to_i, withscores: true) + REDIS.zrangebyscore(user_anon_views_key, since, Time.now.to_i, withscores: true) - Hash[*all_visitors.flatten].collect do |viewer_id, timestamp| - visitor_data(nil, nil, nil, 0, viewer_id, timestamp, identify_visitor(viewer_id)) - end - end - - def visitors(since=0) - detailed_visitors = self.detailed_visitors - first_detailed_visit = detailed_visitors.last.nil? ? self.updated_at : detailed_visitors.first[:visited_at] - self.detailed_visitors(since) + self.simple_visitors(since == 0 ? first_detailed_visit.to_i : since) - end - - SECTIONS = %w(team-details members about-members big-headline big-quote challenges favourite-benefits organization-style office-images jobs stack protips why-work interview-steps locations team-blog) - SECTION_FIELDS = %w(about headline big_quote our_challenge benefit_description_1 organization_way office_photos stack_list reason_name_1 interview_steps team_locations blog_feed) - - def aggregate_visitors(since=0) - aggregate ={} - visitors(since).map do |visitor| - user_id = visitor[:user_id].to_i - aggregate[user_id] ||= visitor - aggregate[user_id].merge!(visitor) do |key, old, new| - case key - when :time_spent - old.to_i + new.to_i - when :visited_at - [old.to_i, new.to_i].max - when :furthest_scrolled - SECTIONS[[SECTIONS.index(old) || 0, SECTIONS.index(new) || 0].max] - else - old.nil? ? new : old - end - end - aggregate[user_id][:visits] ||= 0 - aggregate[user_id][:visits] += 1 - - end - aggregate.values.sort { |a, b| b[:visited_at] <=> a[:visited_at] } - end def visitors_interested_in_jobs aggregate_visitors.select { |visitor| visitor[:exit_target_type] == 'job-opportunity' }.collect { |visitor| visitor[:user_id] } @@ -887,10 +707,6 @@ def click_through_rate self.visitors_interested_in_jobs.count/self.total_views(self.upgraded_at) end - def sections_up_to(furthest) - SECTIONS.slice(0, SECTIONS.index(furthest)) - end - def coderwall? slug == 'coderwall' end @@ -899,19 +715,8 @@ def reindex_search if Rails.env.development? or Rails.env.test? or self.destroyed? self.tire.update_index else - Resque.enqueue(IndexTeam, self.id) - end - end - - def remove_dependencies - [FollowedTeam, Invitation, Opportunity, SeizedOpportunity].each do |klass| - klass.where(team_document_id: self.id.to_s).delete_all + IndexTeamJob.perform_async(id) end - User.where(team_document_id: self.id.to_s).update_all('team_document_id = NULL') - end - - def rerank! - enqueue(ProcessTeam, :recalculate, self.id) end def can_post_job? @@ -926,15 +731,6 @@ def has_specified_enough_info? number_of_completed_sections >= 6 end - def number_of_completed_sections(*excluded_sections) - completed_sections = 0 - - (SECTIONS - excluded_sections).map { |section| "has_#{section.gsub(/-/, '_')}?" }.each do |section_complete| - completed_sections +=1 if self.respond_to?(section_complete) && self.send(section_complete) - end - completed_sections - end - def has_team_details? has_external_link? and !self.about.nil? and !self.avatar.nil? end @@ -944,24 +740,13 @@ def has_external_link? end def has_members? - team_members.count >= 2 + members.count >= 2 end def stack @stack_list ||= (self.stack_list || "").split(/,/) end - def blog - unless self.blog_feed.blank? - feed = Feedjira::Feed.fetch_and_parse(self.blog_feed) - feed unless feed.is_a?(Fixnum) - end - end - - def blog_posts - @blog_posts ||= blog.try(:entries) || [] - end - def plan plan_id = self.account && self.account.plan_ids.first plan_id && Plan.find(plan_id) @@ -969,7 +754,7 @@ def plan def plan=(plan) self.build_account - self.account.admin_id = self.admins.first || self.team_members.first.id + self.account.admin_id = self.admins.first || self.members.first.id self.account.subscribe_to!(plan, true) end @@ -983,9 +768,12 @@ def latest_editors end def video_url - if self.youtube_url =~ /vimeo\.com\/(\d+)/ + youtube_pattern = /(youtube\.com|youtu\.be)\/(watch\?v=)?([\w\-_]{11})/i + vimeo_pattern = /vimeo\.com\/(\d+)/ + + if self.youtube_url =~ vimeo_pattern "https://player.vimeo.com/video/#{$1}" - elsif self.youtube_url =~ /(youtube\.com|youtu\.be)\/(watch\?v=)?([\w\-_]{11})/i + elsif self.youtube_url =~ youtube_pattern "https://www.youtube.com/embed/#{$3}" else self.youtube_url @@ -997,7 +785,7 @@ def request_to_join(user) end def approve_join_request(user) - self.add_user(user) + self.add_member(user) self.pending_join_requests.delete user.id end @@ -1006,6 +794,7 @@ def deny_join_request(user) end private + def identify_visitor(visitor_name) visitor_id = visitor_name.to_i if visitor_id != 0 and visitor_name =~ /^[0-9]+$/i @@ -1029,91 +818,11 @@ def id_of(user) user.is_a?(User) ? user.id : user end - def update_team_size! - self.size = User.where(team_document_id: self.id.to_s).count - end - def clear_cache_if_premium_team Rails.cache.delete(Team::FEATURED_TEAMS_CACHE_KEY) if premium? end def create_slug! - self.slug = self.class.slugify(name) - end - - class SearchWrapper - attr_reader :item - - def initialize(item) - @item = item.is_a?(Team) ? item.to_public_hash : item - end - - def about - item[:about] - end - - def updated_at - item[:updated_at] - end - - def rank - item[:rank] - end - - def to_key - item.try(:to_key) || BSON::ObjectId(item[:id]) - end - - def name - item[:name] - end - - def class - Team - end - - def score - item[:score] - end - - def slug - item[:slug] - end - - def avatar_url - item[:avatar] - end - - def thumbnail_url - User::BLANK_PROFILE_URL - end - - def team_members - item[:team_members] || [] - end - - def top_three_team_members - team_members.first(3) - end - - def top_two_team_members - team_members.first(2) - end - - def hiring? - item[:hiring] - end - - def size - item[:size] - end - - def id - item[:id] - end - - def locations_message - (item[:locations] || []).join(", ") - end + self.slug ||= self.class.slugify(name) end end diff --git a/app/models/team/blog.rb b/app/models/team/blog.rb new file mode 100644 index 00000000..0cd9026a --- /dev/null +++ b/app/models/team/blog.rb @@ -0,0 +1,34 @@ +module Team::Blog + def blog_posts + @blog_posts ||= Entry.new(blog_feed).entries + end + + def has_team_blog? + blog_feed.present? + end + + class Entry + attr_reader :feed + + def initialize(url) + @feed = Feedjira::Feed.fetch_and_parse(url) + @valid = true unless @feed.is_a?(Fixnum) + end + + def valid? + !!@valid + end + + def entries + if valid? + feed.entries + else + [] + end + end + + delegate :size, :any?, :empty?, to: :entries + + alias_method :count, :size + end +end \ No newline at end of file diff --git a/app/models/team/search_wrapper.rb b/app/models/team/search_wrapper.rb new file mode 100644 index 00000000..1ee0fa55 --- /dev/null +++ b/app/models/team/search_wrapper.rb @@ -0,0 +1,71 @@ +class Team::SearchWrapper + attr_reader :item + + def initialize(item) + @item = item.is_a?(Team) ? item.to_public_hash : item + end + + def about + item[:about] + end + + def updated_at + item[:updated_at] + end + + def to_key + item.try(:to_key) + end + + def name + item[:name] + end + + def class + Team + end + + def score + item[:score] + end + + def slug + item[:slug] + end + + def avatar_url + item[:avatar] + end + + def thumbnail_url + item[:avatar] + end + + def members + Array(item[:members]) + end + + def top_three_team_members + members.first(3) + end + + def top_two_team_members + members.first(2) + end + + def hiring? + item[:hiring] + end + + def size + item[:size] + end + + def id + item[:id] + end + + def locations_message + Array(item[:locations]).join(", ") + end +end diff --git a/app/models/team_link.rb b/app/models/team_link.rb deleted file mode 100644 index 41f3a77b..00000000 --- a/app/models/team_link.rb +++ /dev/null @@ -1,7 +0,0 @@ -class TeamLink - include Mongoid::Document - embedded_in :team - - field :name - field :url -end diff --git a/app/models/team_location.rb b/app/models/team_location.rb deleted file mode 100644 index 75d0f349..00000000 --- a/app/models/team_location.rb +++ /dev/null @@ -1,26 +0,0 @@ -class TeamLocation - include Mongoid::Document - include Mongoid::Timestamps - include Geocoder::Model::Mongoid - - embedded_in :team - - field :name - field :description - field :points_of_interest, type: Array, default: [] - field :address - field :city, default: nil - field :state_code, default: nil - field :country, default: nil - field :coordinates, type: Array - - geocoded_by :address do |obj, results| - if geo = results.first and obj.address.downcase.include?(geo.city.try(:downcase) || "") - obj.city = geo.city - obj.state_code = geo.state_code - obj.country = geo.country - end - end - - after_validation :geocode, if: lambda { |team_location| team_location.city.nil? } -end \ No newline at end of file diff --git a/app/models/team_member.rb b/app/models/team_member.rb deleted file mode 100644 index cb6b89ed..00000000 --- a/app/models/team_member.rb +++ /dev/null @@ -1,32 +0,0 @@ -class TeamMember - include Mongoid::Document - include Mongoid::Timestamps - - embedded_in :team - - field :user_id - field :inviter_id - field :email - field :name - field :username - field :thumbnail_url - field :badges_count - - validates_uniqueness_of :user_id - - def user - @user ||= User.where(id: self[:user_id]).first - end - - def score - badges.all.sum(&:weight) - end - - def display_name - name || username - end - - [:badges, :title, :endorsements].each do |m| - define_method(m) { user.try(m) } - end -end \ No newline at end of file diff --git a/app/models/teams/account.rb b/app/models/teams/account.rb new file mode 100644 index 00000000..31ece67c --- /dev/null +++ b/app/models/teams/account.rb @@ -0,0 +1,148 @@ +# == Schema Information +# +# Table name: teams_accounts +# +# id :integer not null, primary key +# team_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# stripe_card_token :string(255) not null +# stripe_customer_token :string(255) not null +# + +class Teams::Account < ActiveRecord::Base + belongs_to :team, class_name: 'Team', foreign_key: 'team_id' + has_many :account_plans, :class_name => 'Teams::AccountPlan' + has_many :plans, through: :account_plans + + validates_presence_of :stripe_card_token + validates_presence_of :stripe_customer_token + validates :team_id, presence: true, uniqueness: true + + attr_protected :stripe_customer_token + + def subscribe_to!(plan, force=false) + self.plan_ids = [plan.id] + if force || update_on_stripe(plan) + update_job_post_budget(plan) + team.premium = true unless plan.free? + team.analytics = plan.analytics + team.upgraded_at = Time.now + end + team.save! + end + + def save_with_payment(plan=nil) + if stripe_card_token + create_customer unless plan.try(:one_time?) + subscribe_to!(plan) unless plan.nil? + save! + return true + else + return false + end + rescue Stripe::CardError => e + errors.add :base, e.message + return false + rescue Stripe::InvalidRequestError => e + errors.add :base, "There was a problem with your credit card." + # throw e if Rails.env.development? + return false + end + + def customer + Stripe::Customer.retrieve(self.stripe_customer_token) + end + + def admins + team.admins + end + + def create_customer + new_customer = find_or_create_customer + self.stripe_customer_token = new_customer.id + end + + def find_or_create_customer + if stripe_customer_token.present? + customer + else + Stripe::Customer.create(description: "#{team.name} : #{team_id} ", card: stripe_card_token) + end + end + + def update_on_stripe(plan) + if plan.subscription? + update_subscription_on_stripe!(plan) + else + charge_on_stripe!(plan) + end + end + + def update_subscription_on_stripe!(plan) + customer && customer.update_subscription(plan: plan.stripe_plan_id) + end + + def charge_on_stripe!(plan) + Stripe::Charge.create( + amount: plan.amount, + currency: plan.currency, + card: self.stripe_card_token, + description: plan.name + ) + end + + def update_job_post_budget(plan) + if plan.free? + team.paid_job_posts = 0 + team.monthly_subscription = false + else + team.valid_jobs = true + + if plan.subscription? + team.monthly_subscription = true + else + team.paid_job_posts += 1 + team.monthly_subscription = false + end + end + end + + def suspend! + team.premium = false + team.analytics = false + team.paid_job_posts = 0 + team.monthly_subscription = false + team.valid_jobs = false + team.save + team.jobs.map(&:deactivate!) + end + + def add_analytics + team.analytics = true + end + + def send_invoice(invoice_id) + NotifierMailer.invoice(team_id, nil, invoice_id).deliver + end + + def send_invoice_for(time = Time.now) + NotifierMailer.invoice(team_id, time.to_i).deliver + end + + def invoice_for(time) + months_ago = ((Time.now.beginning_of_month-time)/1.month).round + invoices(months_ago).last.to_hash.with_indifferent_access + end + + def invoices(count = 100) + Stripe::Invoice.all( + customer: self.stripe_customer_token, + count: count + ).data + end + + def current_plan + plans.first + end +end diff --git a/app/models/teams/account_plan.rb b/app/models/teams/account_plan.rb new file mode 100644 index 00000000..158152f4 --- /dev/null +++ b/app/models/teams/account_plan.rb @@ -0,0 +1,15 @@ +# == Schema Information +# +# Table name: teams_account_plans +# +# plan_id :integer +# account_id :integer +# id :integer not null, primary key +# state :string(255) default("active") +# expire_at :datetime +# + +class Teams::AccountPlan < ActiveRecord::Base + belongs_to :plan + belongs_to :account, :class_name => 'Teams::Account' +end diff --git a/app/models/teams/location.rb b/app/models/teams/location.rb new file mode 100644 index 00000000..88a1a9e6 --- /dev/null +++ b/app/models/teams/location.rb @@ -0,0 +1,32 @@ +# == Schema Information +# +# Table name: teams_locations +# +# id :integer not null, primary key +# name :string(255) +# description :text +# address :text +# city :string(255) +# state_code :string(255) +# country :string(255) +# team_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# points_of_interest :string(255) default([]), is an Array +# + +class Teams::Location < ActiveRecord::Base + include Geocoder::Model::ActiveRecord + + belongs_to :team, foreign_key: 'team_id', touch: true + + geocoded_by :address do |obj, results| + if geo = results.first and obj.address.downcase.include?(geo.city.try(:downcase) || "") + obj.city = geo.city + obj.state_code = geo.state_code + obj.country = geo.country + end + end + + after_validation :geocode, if: ->(team_location) { team_location.city.nil? } +end diff --git a/app/models/teams/member.rb b/app/models/teams/member.rb new file mode 100644 index 00000000..87bc5eb5 --- /dev/null +++ b/app/models/teams/member.rb @@ -0,0 +1,72 @@ +# == Schema Information +# +# Table name: teams_members +# +# id :integer not null, primary key +# team_id :integer not null +# user_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# state :string(255) default("pending") +# score_cache :float +# team_banner :string(255) +# team_avatar :string(255) +# role :string(255) default("member") +# + +# TODO: Move team_banner to uhhh... the Team. Maybe that would make sense. + +class Teams::Member < ActiveRecord::Base + belongs_to :team, class_name: 'Team', + foreign_key: 'team_id', + counter_cache: :team_size, + touch: true + belongs_to :user + + validates_uniqueness_of :user_id, scope: :team_id + validates :team_id, :user_id, :presence => true + + mount_uploader :team_avatar, AvatarUploader + + mount_uploader :team_banner, BannerUploader + # process_in_background :team_banner, ResizeTiltShiftBannerJob + + + scope :active, -> { where(state: 'active') } + scope :pending, -> { where(state: 'pending') } + scope :sorted, -> { active.joins(:user).order('users.score_cache DESC') } + scope :top, ->(limit= 1) { sorted.limit(limit) } + scope :members, -> { where(role: 'member') } + scope :admins, -> { where(role: 'admin') } + + def score + badges.all.sum(&:weight) + end + + def display_name + name || username + end + + def admin? + role == 'admin' + end + + %i( + banner + city + username + avatar + name + about + team_responsibilities + speciality_tags + state_name + country + referral_token + badges + endorsements + protips + ).each do |user_method| + delegate user_method, to: :user + end +end diff --git a/app/models/tweet.rb b/app/models/tweet.rb deleted file mode 100644 index 230f3c23..00000000 --- a/app/models/tweet.rb +++ /dev/null @@ -1,22 +0,0 @@ -class Tweet - include Mongoid::Document - - field :text - field :tweet_id - field :created_at, type: Time - - embedded_in :twitter_profile - - def self.to_hash(tweet) - { - tweet_id: tweet['id'], - created_at: tweet['created_at'], - text: tweet['text'], - retweeted: tweet['retweeted'], - retweet_count: tweet['retweet_count'], - favorited: tweet['favorited'], - in_reply_to_screen_name: tweet['in_reply_to_screen_name'], - in_reply_to_user_id: tweet['in_reply_to_user_id'] - } - end -end \ No newline at end of file diff --git a/app/models/twitter_profile.rb b/app/models/twitter_profile.rb deleted file mode 100644 index 3142335d..00000000 --- a/app/models/twitter_profile.rb +++ /dev/null @@ -1,27 +0,0 @@ -class TwitterProfile - include Mongoid::Document - include Mongoid::Timestamps - - index 'username', unique: true, background: true - - field :username, type: String - field :user_id, type: String - - embeds_many :tweets - - class << self - def for_username(username) - where(username: username).first || create!(username: username) - end - end - - def recent_links - urls = [] - tweets.each do |tweet| - tweet.text.split(/[ |"]/).collect(&:strip).select { |part| part =~ /^https?:/ }.each do |tweet_url| - urls << tweet_url - end if tweet.created_at > 10.days.ago - end - urls.uniq - end -end diff --git a/app/models/usage.rb b/app/models/usage.rb deleted file mode 100644 index 4078050c..00000000 --- a/app/models/usage.rb +++ /dev/null @@ -1,20 +0,0 @@ -class Usage - class << self - def page_view(user_id) - REDIS.zadd(dated_key('view'), 1, user_id) - end - - def unique_visitors_on(date = Date.today) - REDIS.zcount(dated_key('view', date), 1, 1000000) - end - - def top_ten_users_today - ids = REDIS.zrevrange(dated_key('view'), 0, 10, withscores: true) - User.where(id: ids).all - end - - def dated_key(keyname, date = Date.today) - "#{keyname}:#{date.strftime('%Y-%m-%d')}" - end - end -end \ No newline at end of file diff --git a/app/models/user.rb b/app/models/user.rb index c205f097..a4912a9c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,132 +1,144 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `users` +# Table name: users # -# ### Columns -# -# Name | Type | Attributes -# ------------------------------------ | ------------------ | --------------------------- -# **`about`** | `text` | -# **`achievements_checked_at`** | `datetime` | `default(1914-02-20 22:39:10 UTC)` -# **`activated_on`** | `datetime` | -# **`admin`** | `boolean` | `default(FALSE)` -# **`api_key`** | `string(255)` | -# **`avatar`** | `string(255)` | -# **`backup_email`** | `string(255)` | -# **`badges_count`** | `integer` | `default(0)` -# **`banner`** | `string(255)` | -# **`beta_access`** | `boolean` | `default(FALSE)` -# **`bitbucket`** | `string(255)` | -# **`blog`** | `string(255)` | -# **`city`** | `string(255)` | -# **`claim_code`** | `text` | -# **`codeplex`** | `string(255)` | -# **`company`** | `string(255)` | -# **`country`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`dribbble`** | `string(255)` | -# **`email`** | `string(255)` | -# **`endorsements_count`** | `integer` | `default(0)` -# **`favorite_websites`** | `string(255)` | -# **`forrst`** | `string(255)` | -# **`github`** | `string(255)` | -# **`github_failures`** | `integer` | `default(0)` -# **`github_id`** | `integer` | -# **`github_token`** | `string(255)` | -# **`google_code`** | `string(255)` | -# **`http_counter`** | `integer` | -# **`id`** | `integer` | `not null, primary key` -# **`ip_lat`** | `float` | -# **`ip_lng`** | `float` | -# **`join_badge_orgs`** | `boolean` | `default(FALSE)` -# **`joined_github_on`** | `date` | -# **`joined_twitter_on`** | `date` | -# **`last_asm_email_at`** | `datetime` | -# **`last_email_sent`** | `datetime` | -# **`last_refresh_at`** | `datetime` | `default(1970-01-01 00:00:00 UTC)` -# **`last_request_at`** | `datetime` | -# **`lat`** | `float` | -# **`linkedin`** | `string(255)` | -# **`linkedin_id`** | `string(255)` | -# **`linkedin_legacy`** | `string(255)` | -# **`linkedin_public_url`** | `string(255)` | -# **`linkedin_secret`** | `string(255)` | -# **`linkedin_token`** | `string(255)` | -# **`lng`** | `float` | -# **`location`** | `string(255)` | -# **`login_count`** | `integer` | `default(0)` -# **`name`** | `string(255)` | -# **`notify_on_award`** | `boolean` | `default(TRUE)` -# **`notify_on_follow`** | `boolean` | `default(TRUE)` -# **`old_github_token`** | `string(255)` | -# **`penalty`** | `float` | `default(0.0)` -# **`receive_newsletter`** | `boolean` | `default(TRUE)` -# **`receive_weekly_digest`** | `boolean` | `default(TRUE)` -# **`redemptions`** | `text` | -# **`referral_token`** | `string(255)` | -# **`referred_by`** | `string(255)` | -# **`remind_to_create_protip`** | `datetime` | -# **`remind_to_create_skills`** | `datetime` | -# **`remind_to_create_team`** | `datetime` | -# **`remind_to_invite_team_members`** | `datetime` | -# **`remind_to_link_accounts`** | `datetime` | -# **`resume`** | `string(255)` | -# **`score_cache`** | `float` | `default(0.0)` -# **`slideshare`** | `string(255)` | -# **`sourceforge`** | `string(255)` | -# **`speakerdeck`** | `string(255)` | -# **`specialties`** | `text` | -# **`stackoverflow`** | `string(255)` | -# **`state`** | `string(255)` | -# **`state_name`** | `string(255)` | -# **`team_avatar`** | `string(255)` | -# **`team_banner`** | `string(255)` | -# **`team_document_id`** | `string(255)` | -# **`team_responsibilities`** | `text` | -# **`thumbnail_url`** | `text` | -# **`title`** | `string(255)` | -# **`tracking_code`** | `string(255)` | -# **`twitter`** | `string(255)` | -# **`twitter_checked_at`** | `datetime` | `default(1914-02-20 22:39:10 UTC)` -# **`twitter_id`** | `string(255)` | -# **`twitter_secret`** | `string(255)` | -# **`twitter_token`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`username`** | `string(255)` | -# **`utm_campaign`** | `string(255)` | -# **`visit_frequency`** | `string(255)` | `default("rarely")` -# **`visits`** | `string(255)` | `default("")` -# **`zerply`** | `string(255)` | -# -# ### Indexes -# -# * `index_users_on_github_token` (_unique_): -# * **`old_github_token`** -# * `index_users_on_linkedin_id` (_unique_): -# * **`linkedin_id`** -# * `index_users_on_team_document_id`: -# * **`team_document_id`** -# * `index_users_on_twitter_id` (_unique_): -# * **`twitter_id`** -# * `index_users_on_username` (_unique_): -# * **`username`** +# id :integer not null, primary key +# username :citext +# name :string(255) +# email :citext +# location :string(255) +# old_github_token :string(255) +# state :string(255) +# created_at :datetime +# updated_at :datetime +# twitter :string(255) +# linkedin_legacy :string(255) +# stackoverflow :string(255) +# admin :boolean default(FALSE) +# backup_email :string(255) +# badges_count :integer default(0) +# bitbucket :string(255) +# codeplex :string(255) +# login_count :integer default(0) +# last_request_at :datetime default(2014-07-23 03:14:36 UTC) +# achievements_checked_at :datetime default(1911-08-12 21:49:21 UTC) +# claim_code :text +# github_id :integer +# country :string(255) +# city :string(255) +# state_name :string(255) +# lat :float +# lng :float +# http_counter :integer +# github_token :string(255) +# twitter_checked_at :datetime default(1911-08-12 21:49:21 UTC) +# title :string(255) +# company :string(255) +# blog :string(255) +# github :citext +# forrst :string(255) +# dribbble :string(255) +# specialties :text +# notify_on_award :boolean default(TRUE) +# receive_newsletter :boolean default(TRUE) +# zerply :string(255) +# linkedin :string(255) +# linkedin_id :string(255) +# linkedin_token :string(255) +# twitter_id :string(255) +# twitter_token :string(255) +# twitter_secret :string(255) +# linkedin_secret :string(255) +# last_email_sent :datetime +# linkedin_public_url :string(255) +# endorsements_count :integer default(0) +# team_document_id :string(255) +# speakerdeck :string(255) +# slideshare :string(255) +# last_refresh_at :datetime default(1970-01-01 00:00:00 UTC) +# referral_token :string(255) +# referred_by :string(255) +# about :text +# joined_github_on :date +# avatar :string(255) +# banner :string(255) +# remind_to_invite_team_members :datetime +# activated_on :datetime +# tracking_code :string(255) +# utm_campaign :string(255) +# score_cache :float default(0.0) +# notify_on_follow :boolean default(TRUE) +# api_key :string(255) +# remind_to_create_team :datetime +# remind_to_create_protip :datetime +# remind_to_create_skills :datetime +# remind_to_link_accounts :datetime +# favorite_websites :string(255) +# team_responsibilities :text +# team_avatar :string(255) +# team_banner :string(255) +# stat_name_1 :string(255) +# stat_number_1 :string(255) +# stat_name_2 :string(255) +# stat_number_2 :string(255) +# stat_name_3 :string(255) +# stat_number_3 :string(255) +# ip_lat :float +# ip_lng :float +# penalty :float default(0.0) +# receive_weekly_digest :boolean default(TRUE) +# github_failures :integer default(0) +# resume :string(255) +# sourceforge :string(255) +# google_code :string(255) +# sales_rep :boolean default(FALSE) +# visits :string(255) default("") +# visit_frequency :string(255) default("rarely") +# pitchbox_id :integer +# join_badge_orgs :boolean default(FALSE) +# use_social_for_pitchbox :boolean default(FALSE) +# last_asm_email_at :datetime +# banned_at :datetime +# last_ip :string(255) +# last_ua :string(255) +# team_id :integer +# role :string(255) default("user") # -require "net_validators" +require 'net_validators' class User < ActiveRecord::Base include ActionController::Caching::Fragments - extend ResqueSupport::ActiveModel - include ResqueSupport::Basic include NetValidators - - attr_protected :admin, :username, :id, :github_id, :twitter_id, :linkedin_id, :api_key + include UserApi + include UserAward + include UserBadge + include UserEndorser + include UserEventConcern + include UserFacts + include UserFollowing + include UserGithub + include UserLinkedin + include UserOauth + include UserProtip + include UserRedis + include UserRedisKeys + include UserTeam + include UserTrack + include UserTwitter + include UserViewer + include UserVisit + include UserSearch + include UserStateMachine + include UserJob + + attr_protected :admin, :role, :id, :github_id, :twitter_id, :linkedin_id, :api_key mount_uploader :avatar, AvatarUploader - mount_uploader :banner, BannerUploader mount_uploader :resume, ResumeUploader - process_in_background :banner, ResizeTiltShiftBanner + + mount_uploader :banner, BannerUploader + process_in_background :banner, ResizeTiltShiftBannerJob RESERVED = %w{ achievements @@ -145,536 +157,97 @@ class User < ActiveRecord::Base users } - BLANK_PROFILE_URL = 'blank-mugshot.png' REGISTRATION = 'registration' PENDING = 'pending' ACTIVE = 'active' - serialize :redemptions, Array acts_as_followable acts_as_follower - before_validation { |u| u && u.username && u.username.downcase! } - before_validation :correct_ids - before_validation :correct_urls - VALID_USERNAME_RIGHT_WAY = /^[a-z0-9]+$/ VALID_USERNAME = /^[^\.]+$/ validates :username, - exclusion: { in: RESERVED, message: "is reserved" }, - format: { with: VALID_USERNAME, message: "must not contain a period" } - - validates_uniqueness_of :username #, :case_sensitive => false, :on => :create + exclusion: {in: RESERVED, message: "is reserved"}, + format: {with: VALID_USERNAME, message: "must not contain a period"}, + uniqueness: true, + if: :username_changed? validates_presence_of :username validates_presence_of :email validates_presence_of :location - validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, if: :not_active? + validates :email, email: true, if: :not_active? + + has_many :badges, order: 'created_at DESC' + has_many :followed_teams + has_many :user_events, dependent: :destroy + has_many :skills, order: "weight DESC" + has_many :endorsements, foreign_key: 'endorsed_user_id' + has_many :endorsings, foreign_key: 'endorsing_user_id', class_name: 'Endorsement' + has_many :protips, dependent: :destroy + has_many :likes, dependent: :destroy + has_many :comments, dependent: :destroy + has_many :sent_mails, dependent: :destroy + + has_one :github_profile, class_name: 'Users::Github::Profile', dependent: :destroy + has_many :github_repositories, through: :github_profile , source: :repositories - has_many :badges, order: 'created_at DESC', dependent: :delete_all - has_many :highlights, order: 'created_at DESC', dependent: :delete_all - has_many :followed_teams, dependent: :delete_all - has_many :user_events - has_many :skills, order: "weight DESC", dependent: :delete_all - has_many :endorsements, foreign_key: 'endorsed_user_id', dependent: :delete_all - has_many :endorsings, foreign_key: 'endorsing_user_id', class_name: Endorsement.name, dependent: :delete_all - has_many :protips, dependent: :delete_all - has_many :likes - has_many :comments, dependent: :delete_all + belongs_to :team, class_name: 'Team' + has_one :membership, class_name: 'Teams::Member' #current_team + has_many :memberships, class_name: 'Teams::Member', dependent: :destroy + + has_one :picture, dependent: :destroy geocoded_by :location, latitude: :lat, longitude: :lng, country: :country, state_code: :state_name + # FIXME: Move to background job after_validation :geocode_location, if: :location_changed? unless Rails.env.test? def near User.near([lat, lng]) end - scope :top, lambda { |num| order("badges_count DESC").limit(num || 10) } - scope :no_emails_since, lambda { |date| where("last_email_sent IS NULL OR last_email_sent < ?", date) } - scope :receives_activity, where(notify_on_award: true) - scope :receives_newsletter, where(receive_newsletter: true) - scope :receives_digest, where(receive_weekly_digest: true) - scope :with_tokens, where("github_token IS NOT NULL") - scope :on_team, where("team_document_id IS NOT NULL") - scope :not_on_team, where("team_document_id IS NULL") - scope :autocomplete, lambda { |filter| + scope :top, ->(limit = 10) { order("badges_count DESC").limit(limit) } + scope :no_emails_since, ->(date) { where("last_email_sent IS NULL OR last_email_sent < ?", date) } + scope :receives_activity, -> { where(notify_on_award: true) } + scope :receives_newsletter, -> { where(receive_newsletter: true) } + scope :receives_digest, -> { where(receive_weekly_digest: true) } + scope :with_tokens, -> { where('github_token IS NOT NULL') } + scope :autocomplete, ->(filter) { filter = "#{filter.upcase}%" where("upper(username) LIKE ? OR upper(twitter) LIKE ? OR upper(github) LIKE ? OR upper(name) LIKE ?", filter, filter, filter, "%#{filter}").order("name ASC") } - scope :admins, where(admin: true) - - class << self - def bootstrap(username, token = nil) - user = User.new(github: username, github_token: token) - user.username = username - profile = user.refresh_github! - user.email = profile[:email] || 'something@test.com' - user.location = profile[:location] || 'Unknown' - user.save! + scope :admins, -> { where(role: 'admin') } + scope :active, -> { where(state: ACTIVE) } + scope :pending, -> { where(state: PENDING) } + scope :abandoned, -> { where(state: 'registration').where('created_at < ?', 1.hour.ago) } + scope :random, -> (limit = 1) { active.where('badges_count > 1').order('RANDOM()').limit(limit) } - user.build_github_facts - user - end - def with_token(token) - where(github_token: token).first + def self.find_by_provider_username(username, provider) + return nil if username.nil? + return self.find_by_username(username) if provider == '' + unless %w{twitter linkedin github}.include?(provider) + raise "Unkown provider type specified, unable to find user by username" end - - def username_in(usernames) - where(["UPPER(username) in (?)", usernames.collect(&:upcase)]) - end - - def with_username(username, provider = :username) - return nil if username.nil? - sql_injection_safe_where_clause = case provider.to_s - when 'username', '' - 'username' - when 'linkedin' - 'linkedin' - when 'twitter' - 'twitter' - when 'github' - 'github' - else - #A user could malicously pass in a provider, thats why we do the string matching above - raise "Unkown provider type specified, unable to find user by username" - end - where(["UPPER(#{sql_injection_safe_where_clause}) = UPPER(?)", username]).first - end - - def with_username_or_email(username_or_email) - where(["UPPER(username) = ? OR email like ?", username_or_email.upcase, username_or_email]).first - end - - def stalest_github_profile(limit = nil) - query = active.order("achievements_checked_at ASC") - limit ? query.limit(limit) : query - end - - def active - where(state: ACTIVE) - end - - def pending - where(state: PENDING) - end - - def abandoned - where(state: 'registration').where('created_at < ?', 1.hour.ago) - end - - def random(limit = 1) - active.where("badges_count > 1").order("Random()").limit(limit) - end - - def for_omniauth(auth) - if user = find_with_oauth(auth) - user.apply_oauth(auth) - user.save! if user.changed? - return user - else - user = new( - name: auth[:info][:name], - email: auth[:info][:email], - backup_email: auth[:info][:email], - location: location_from(auth), - thumbnail_url: thumbnail_url_for(auth)) - user.apply_oauth(auth) - user.username = auth[:info][:nickname] - return user - end - end - - def find_with_oauth(oauth) - case oauth[:provider] - when 'github' - github_scope = (oauth[:uid] ? where(github_id: oauth[:uid]) : where(github: oauth[:info][:nickname])) - raise "Not a unique github credential #{oauth[:uid] || oauth[:info][:nickname]}" if github_scope.count > 1 - return github_scope.first - when 'linkedin' - linkedin_scope = where(linkedin_id: oauth[:uid]) - raise "Not a unique linkedin credential #{oauth[:uid]}" if linkedin_scope.count > 1 - return linkedin_scope.first - when 'twitter' - twitter_scope = where(twitter_id: oauth[:uid]) - raise "Not a unique twitter credential #{oauth[:uid]}" if twitter_scope.count > 1 - return twitter_scope.first - when 'developer' - fail 'Developer Strategy must not be used in production.' if Rails.env.production? - developer_scope = where(email: oauth[:uid]) - raise "Looks like there's duplicate users for the email '#{oauth[:uid]}'. Check user ids: #{developer_scope.map(&:id).join(', ')}" if developer_scope.count > 1 - return developer_scope.first - else - raise "Unexpected provider: #{oauth[:provider]}" - end - end - - def location_from(oauth) - if oauth[:extra] && oauth[:extra][:raw_info] && oauth[:extra][:raw_info][:location] - (oauth[:extra][:raw_info][:location].is_a?(Hash) && oauth[:extra][:raw_info][:location][:name]) || oauth[:extra][:raw_info][:location] - elsif oauth[:info] - oauth[:info][:location] - end - end - - def thumbnail_url_for(oauth) - if github = oauth[:extra] && oauth[:extra][:raw_info] && oauth[:extra][:raw_info][:gravatar_id] - "https://secure.gravatar.com/avatar/#{oauth[:extra][:raw_info][:gravatar_id]}" - elsif oauth[:info] - oauth[:info][:image] - end - end - - def all_tokens - with_tokens.select("github_token").collect(&:github_token) - end - - def signups_by_day - find_by_sql("SELECT to_char(created_at, 'MM DD') AS day, count(*) AS signups from users group by to_char(created_at, 'MM DD') order by to_char(created_at, 'MM DD')").collect { |u| [u.day, u.signups] } - end - - def signups_by_hour - find_by_sql("SELECT to_char(created_at, 'HH24') AS hour, count(*) AS signups from users where created_at > NOW() - interval '24 hours' group by to_char(created_at, 'HH24') order by to_char(created_at, 'HH24')").collect { |u| [u.hour, u.signups] } - end - - def signups_by_month - find_by_sql("SELECT to_char(created_at, 'MON') AS day, count(*) AS signups from users group by to_char(created_at, 'MON') order by to_char(created_at, 'MON') DESC").collect { |u| [u.day, u.signups] } - end - - def repeat_visits_by_count - find_by_sql("SELECT login_count, count(*) AS visits from users group by login_count").collect { |u| [u.login_count, u.visits] } - end - - def monthly_growth - prior = where("created_at < ?", 31.days.ago).count - month = where("created_at >= ?", 31.days.ago).count - ((month.to_f / prior.to_f) * 100) - end - - def weekly_growth - prior = where("created_at < ?", 7.days.ago).count - week = where("created_at >= ?", 7.days.ago).count - ((week.to_f / prior.to_f) * 100) - end - - def most_active_by_country(since=1.week.ago) - select('country, count(distinct(id))').where('last_request_at > ?', since).group(:country).order('count(distinct(id)) DESC') - end - end - - def oldest_achievement_since_last_visit - badges.where("badges.created_at > ?", last_request_at).order('badges.created_at ASC').last - end - - def correct_ids - [:stackoverflow, :slideshare].each do |social_id| - if self.try(social_id) =~ /^https?:.*\/([\w_\-]+)\/([\w\-]+|newsfeed)?/ - self.send("#{social_id}=", $1) - end - end - end - - def correct_urls - self.favorite_websites = self.favorite_websites.split(",").collect do |website| - correct_url(website.strip) - end.join(",") unless self.favorite_websites.nil? - end - - def company_name - team.try(:name) || company - end - - def profile_url - if !avatar.blank? - avatar_url - elsif thumbnail_url.blank? - BLANK_PROFILE_URL - else - thumbnail_url - end - end - - def apply_oauth(oauth) - case oauth[:provider] - when 'github' - self.github = oauth[:info][:nickname] - self.github_id = oauth[:uid] - self.github_token = oauth[:credentials][:token] - self.blog = oauth[:info][:urls][:Blog] if oauth[:info][:urls] && self.blog.blank? - self.joined_github_on = extract_joined_on(oauth) if self.joined_github_on.blank? - when 'linkedin' - self.linkedin_id = oauth[:uid] - self.linkedin_public_url = oauth[:info][:urls][:public_profile] if oauth[:info][:urls] - self.linkedin_token = oauth[:credentials][:token] - self.linkedin_secret = oauth[:credentials][:secret] - when 'twitter' - self.twitter = oauth[:info][:nickname] - self.twitter_id = oauth[:uid] - self.twitter_token = oauth[:credentials][:token] - self.twitter_secret = oauth[:credentials][:secret] - self.about = extract_from_oauth_extras(:description, oauth) if self.about.blank? - self.joined_twitter_on = extract_joined_on(oauth) if self.joined_twitter_on.blank? - when 'developer' - logger.debug "Using the Developer Strategy for OmniAuth" - logger.ap oauth, :debug - else - raise "Unexpected provider: #{oauth[:provider]}" - end - end - - def extract_joined_on(oauth) - val = extract_from_oauth_extras(:created_at, oauth) - return Date.parse(val) if val - end - - def extract_from_oauth_extras(field, oauth) - oauth[:extra][:raw_info][field] if oauth[:extra] && oauth[:extra][:raw_info] && oauth[:extra][:raw_info][field] - end - - def can_be_refreshed? - (achievements_checked_at.nil? || achievements_checked_at < 1.hour.ago) + where(["UPPER(#{provider}) = UPPER(?)", username]).first end def display_name - name.blank? ? username : name + name.presence || username end def short_name display_name.split(' ').first end - def has_badges? - !badges.empty? - end - - def has_badge?(badge_class) - badges.collect(&:badge_class_name).include?(badge_class.name) - end - def achievements_checked? !achievements_checked_at.nil? && achievements_checked_at > 1.year.ago end - def twitter_profile - @twitter_profile ||= TwitterProfile.for_username(twitter) unless twitter.blank? - end - def brief - if about.blank? - if highlight = highlights.last - highlight.description - else - nil - end - else about - end - end - - def team_ids - [team_document_id] - end - - def team - @team ||= team_document_id && Team.find(team_document_id) - rescue Mongoid::Errors::DocumentNotFound - #readonly issue in follows/_user partial from partial iterator - User.connection.execute("UPDATE users set team_document_id = NULL where id = #{self.id}") - @team = nil - end - - def on_premium_team? - team.try(:premium?) || false - end - - def following_team?(team) - followed_teams.collect(&:team_document_id).include?(team.id.to_s) - end - - def follow_team!(team) - followed_teams.create!(team_document_id: team.id.to_s) - generate_event(team: team) - end - - def unfollow_team!(team) - followed_teams = self.followed_teams.where(team_document_id: team.id.to_s).all - followed_teams.each(&:destroy) - end - - def teams_being_followed - Team.find(followed_teams.collect(&:team_document_id)).sort { |x, y| y.score <=> x.score } - end - - def on_team? - !team_document_id.nil? - end - - def team_member_of?(user) - on_team? && self.team_document_id == user.team_document_id end - def belongs_to_team?(team = nil) - if self.team && team - self.team.id.to_s == team.id.to_s - else - !team_document_id.blank? - end - end - - def complete_registration!(opts={}) - update_attribute(:state, PENDING) - Resque.enqueue(ActivateUser, self.username) - Resque.enqueue(AnalyzeUser, self.username) - end - - def activate! - touch(:activated_on) - update_attribute(:state, ACTIVE) - end - - def unregistered? - state == nil - end - - def not_active? - !active? - end - - def active? - state == ACTIVE - end - - def pending? - state == PENDING - end - - def total_achievements - badges_count - end - - def has_beta_access? - admin? || beta_access - end - - def award(badge) - new_badge = self.badges.of_type(badge).first || self.badges.build(badge_class_name: badge.class.name) - end - - def add_github_badge(badge) - GithubBadge.new.add(badge, self.github) - end - - def remove_github_badge(badge) - GithubBadge.new.remove(badge, self.github) - end - - def add_all_github_badges - enqueue(GithubBadgeOrg, self.username, :add) - end - - def remove_all_github_badges - enqueue(GithubBadgeOrg, self.username, :remove) - end - - def award_and_add_skill(badge) - award badge - if badge.respond_to? :skill - add_skill(badge.skill) - end - end - - def assign_badges(new_badges) - new_badge_classes = new_badges.map { |b| b.class.name } - old_badge_classes = self.badges.map(&:badge_class_name) - - @badges_to_destroy = old_badge_classes - new_badge_classes - - new_badges.each do |badge| - award_and_add_skill(badge) - end - end - - def to_csv - [ - display_name, - "\"#{location}\"", - "https://coderwall.com/#{username}", - "https://twitter.com/#{twitter}", - "https://github.com/#{github}", - linkedin_public_url, - skills.collect(&:name).join(' ') - ].join(',') - end - - def public_hash(full=false) - hash = { username: username, - name: display_name, - location: location, - endorsements: endorsements.count, - team: team_document_id, - accounts: { github: github }, - badges: badges_hash = [] } - badges.each do |badge| - badges_hash << { - name: badge.display_name, - description: badge.description, - created: badge.created_at, - badge: block_given? ? yield(badge) : badge - } - end - if full - hash[:title] = title - hash[:company] = company - hash[:specialities] = speciality_tags - hash[:thumbnail] = thumbnail_url - hash[:accomplishments] = highlights.collect(&:description) - hash[:accounts][:twitter] = twitter - end - hash - end - - def facts - @facts ||= begin - user_identites = [linkedin_identity, bitbucket_identity, lanyrd_identity, twitter_identity, github_identity, speakerdeck_identity, slideshare_identity, id.to_s].compact - Fact.where(owner: user_identites.collect(&:downcase)).all - end - end - - def clear_facts! - facts.each { |fact| fact.destroy } - skills.each { |skill| skill.apply_facts && skill.save } - self.github_failures = 0 - save! - Resque.enqueue(RefreshUser, username, true) - end - - def clear_github! - self.github_id = nil - self.github = nil - self.github_token = nil - self.joined_github_on = nil - self.github_failures = 0 - save! - end - - def clear_linkedin! - self.linkedin = nil - self.linkedin_id = nil - self.linkedin_token = nil - self.linkedin_secret = nil - self.linkedin_public_url = nil - self.linkedin_legacy = nil - save! - end - - def clear_twitter! - self.twitter = nil - self.twitter_token = nil - self.twitter_secret = nil - self.joined_twitter_on = nil - save! - end def can_unlink_provider?(provider) self.respond_to?("clear_#{provider}!") && self.send("#{provider}_identity") && num_linked_accounts > 1 @@ -686,133 +259,18 @@ def num_linked_accounts LINKABLE_PROVIDERS.map { |provider| self.send("#{provider}_identity") }.compact.count end - def linkedin_identity - "linkedin:#{linkedin_token}::#{linkedin_secret}" if linkedin_token - end - - def twitter_identity - "twitter:#{twitter}" if twitter - end - - def bitbucket_identity - "bitbucket:#{bitbucket}" unless bitbucket.blank? - end - - def lanyrd_identity - "lanyrd:#{twitter}" if twitter - end - - def github_identity - "github:#{github}" if github - end - - def speakerdeck_identity - "speakerdeck:#{speakerdeck}" if speakerdeck - end - - def slideshare_identity - "slideshare:#{slideshare}" if slideshare - end - - def build_facts(all) - since = (all ? Time.at(0) : self.last_refresh_at) - build_github_facts(since) - build_lanyrd_facts - build_linkedin_facts - build_bitbucket_facts - build_speakerdeck_facts - build_slideshare_facts - end - - def build_speakerdeck_facts - Speakerdeck.new(speakerdeck).facts if speakerdeck_identity - end - - def build_slideshare_facts - Slideshare.new(slideshare).facts if slideshare_identity - end - - def build_github_facts(since=Time.at(0)) - GithubProfile.for_username(github, since).facts if github_identity and github_failures == 0 - end - - def build_linkedin_facts - LinkedInStream.new(linkedin_token + '::' + linkedin_secret).facts if linkedin_identity - rescue => e - logger.error(e.message + "\n " + e.backtrace.join("\n ")) - end - - def build_lanyrd_facts - Lanyrd.new(twitter).facts if lanyrd_identity - end - - def build_bitbucket_facts - Bitbucket::V1.new(bitbucket).update_facts! unless bitbucket.blank? - end - - def check_achievements!(badge_list = Badges.all) - BadgeBase.award!(self, badge_list) - touch(:achievements_checked_at) - save! - end - - def add_skills_for_unbadgified_facts - add_skills_for_repo_facts! - add_skills_for_lanyrd_facts! - end - - def add_skills_for_repo_facts! - repo_facts.each do |fact| - fact.metadata[:languages].try(:each) do |language| - unless self.deleted_skill?(language) - skill = add_skill(language) - skill.save - end - end unless fact.metadata[:languages].nil? - end - end - - def add_skills_for_lanyrd_facts! - tokenized_lanyrd_tags.each do |lanyrd_tag| - if self.skills.any? - skill = skill_for(lanyrd_tag) - skill.apply_facts unless skill.nil? - else - skill = add_skill(lanyrd_tag) - end - skill.save unless skill.nil? - end - end - def deleted_skill?(skill_name) Skill.deleted?(self.id, skill_name) end - def repo_facts - self.facts.select { |fact| fact.tagged?('personal', 'repo', 'original') } - end - - def lanyrd_facts - self.facts.select { |fact| fact.tagged?('lanyrd') } - end - def tokenized_lanyrd_tags - lanyrd_facts.collect { |fact| fact.tags }.flatten.compact.map { |tag| Skill.tokenize(tag) } + lanyrd_facts.flat_map { |fact| fact.tags }.compact.map { |tag| Skill.tokenize(tag) } end def last_modified_at achievements_checked_at || updated_at end - def last_badge_awarded_at - badge = badges.order('created_at DESC').first - badge.created_at if badge - end - - def badges_since_last_visit - badges.where('created_at > ?', last_request_at).count - end - def geocode_location do_lookup(false) do |o, rs| geo = rs.first @@ -822,8 +280,7 @@ def geocode_location self.state_name = geo.state self.city = geo.city end - rescue Exception => ex - Rails.logger.error("Failed geolocating '#{location}': #{ex.message}") + rescue Exception => ex end def activity_stats(since=Time.at(0), full=false) @@ -836,46 +293,16 @@ def activity_stats(since=Time.at(0), full=false) } end - def upvoted_protips - Protip.where(id: Like.where(likable_type: "Protip").where(user_id: self.id).select(:likable_id).map(&:likable_id)) - end - - def upvoted_protips_public_ids - upvoted_protips.select(:public_id).map(&:public_id) - end - - def followers_since(since=Time.at(0)) - self.followers_by_type(User.name).where('follows.created_at > ?', since) - end - def activity Event.user_activity(self, nil, nil, -1) end - def refresh_github! - unless github.blank? - load_github_profile - end - end - - def achievement_score - badges.collect(&:weight).sum - end - def score calculate_score! if score_cache == 0 score_cache end - def team_members - User.where(team_document_id: self.team_document_id.to_s) - end - - def team_member_ids - User.select(:id).where(team_document_id: self.team_document_id.to_s).map(&:id) - end - - def penalize!(amount=(((team && team.team_members.size) || 6) / 6.0)*activitiy_multipler) + def penalize!(amount=(((team && team.members.size) || 6) / 6.0)*activitiy_multipler) self.penalty = amount self.calculate_score! end @@ -884,22 +311,14 @@ def calculate_score! score = ((endorsers.count / 6.0) + (achievement_score) + (times_spoken / 1.50) + (times_attended / 4.0)) * activitiy_multipler self.score_cache = [score - penalty, 0.0].max save! - rescue - Rails.logger.error "Failed cacluating score for #{username}" + rescue => ex + Rails.logger.error("Failed cacluating score for #{username} due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") end def like_value (score || 0) > 0 ? score : 1 end - def times_spoken - facts.select { |fact| fact.tagged?("event", "spoke") }.count - end - - def times_attended - facts.select { |fact| fact.tagged?("event", "attended") }.count - end - def activitiy_multipler return 1 if latest_activity_on.nil? if latest_activity_on > 1.month.ago @@ -917,321 +336,8 @@ def speciality_tags (specialties || '').split(',').collect(&:strip).compact end - def achievements_unlocked_since_last_visit - self.badges.where("badges.created_at > ?", last_request_at).reorder('badges.created_at ASC') - end - - def endorsements_unlocked_since_last_visit - endorsements_since(last_request_at) - end - - def endorsements_since(since=Time.at(0)) - self.endorsements.where("endorsements.created_at > ?", since).order('endorsements.created_at ASC') - end - - def endorsers(since=Time.at(0)) - User.where(id: self.endorsements.select('distinct(endorsements.endorsing_user_id), endorsements.created_at').where('endorsements.created_at > ?', since).map(&:endorsing_user_id)) - end - - def activity_since_last_visit? - (achievements_unlocked_since_last_visit.count + endorsements_unlocked_since_last_visit.count) > 0 - end - - def endorse(user, specialty) - user.add_skill(specialty).endorsed_by(self) - end - - def repo_cache_key - username - end - - def daily_cache_key - "#{username}/#{Date.today.to_time.to_i}" - end - - def timeline_key - @timeline_key ||= "user:#{id}:timeline" - end - - def impressions_key - "user:#{id}:impressions" - end - - def user_views_key - "user:#{id}:views" - end - - def user_anon_views_key - "user:#{id}:views:anon" - end - - def viewed_by(viewer) - epoch_now = Time.now.to_i - REDIS.incr(impressions_key) - if viewer.is_a?(User) - REDIS.zadd(user_views_key, epoch_now, viewer.id) - generate_event(viewer: viewer.username) - else - REDIS.zadd(user_anon_views_key, epoch_now, viewer) - count = REDIS.zcard(user_anon_views_key) - REDIS.zremrangebyrank(user_anon_views_key, -(count - 100), -1) if count > 100 - end - end - - def viewers(since=0) - epoch_now = Time.now.to_i - viewer_ids = REDIS.zrevrangebyscore(user_views_key, epoch_now, since) - User.where(id: viewer_ids).all - end - - def viewed_by_since?(user_id, since=0) - epoch_now = Time.now.to_i - views_since = Hash[*REDIS.zrevrangebyscore(user_views_key, epoch_now, since, withscores: true)] - !views_since[user_id.to_s].nil? - end - - def total_views(epoch_since = 0) - if epoch_since.to_i == 0 - REDIS.get(impressions_key).to_i - else - epoch_now = Time.now.to_i - epoch_since = epoch_since.to_i - REDIS.zcount(user_views_key, epoch_since, epoch_now) + REDIS.zcount(user_anon_views_key, epoch_since, epoch_now) - end - end - - def generate_event(options={}) - event_type = self.event_type(options) - enqueue(GenerateEvent, event_type, event_audience(event_type, options), self.to_event_hash(options), 30.seconds) - end - - def subscribed_channels - Audience.to_channels(Audience.user(self.id)) - end - - def event_audience(event_type, options={}) - if event_type == :profile_view - Audience.user(self.id) - elsif event_type == :followed_team - Audience.team(options[:team].try(:id)) - end - end - - def to_event_hash(options={}) - event_hash = { user: { username: options[:viewer] || self.username } } - if options[:viewer] - event_hash[:views] = total_views - elsif options[:team] - event_hash[:follow] = { followed: options[:team].try(:name), follower: self.try(:name) } - end - event_hash - end - - def event_type(options={}) - if options[:team] - :followed_team - else - :profile_view - end - end - - def build_github_proptips_fast - repos = followed_repos(since=2.months.ago) - repos.each do |repo| - Importers::Protips::GithubImporter.import_from_follows(repo.description, repo.link, repo.date, self) - end - end - - def build_repo_followed_activity!(refresh=false) - REDIS.zremrangebyrank(followed_repo_key, 0, Time.now.to_i) if refresh - epoch_now = Time.now.to_i - first_time = refresh || REDIS.zcount(followed_repo_key, 0, epoch_now) <= 0 - links = Github.new.activities_for(self.github, (first_time ? 20 : 1)) - links.each do |link| - link[:user_id] = self.id - REDIS.zadd(followed_repo_key, link[:date].to_i, link.to_json) - Importers::Protips::GithubImporter.import_from_follows(link[:description], link[:link], link[:date], self) - end - rescue RestClient::ResourceNotFound - Rails.logger.warn("Unable to get activity for github #{github}") - [] - end - - def destroy_github_cache - GithubRepo.where('owner.github_id' => github_id).destroy if github_id - GithubProfile.where('login' => github).destroy if github - end - - def track_user_view!(user) - track!("viewed user", user_id: user.id, username: user.username) - end - - def track_signin! - track!("signed in") - end - - def track_viewed_self! - track!("viewed self") - end - - def track_team_view!(team) - track!("viewed team", team_id: team.id.to_s, team_name: team.name) - end - - def track_protip_view!(protip) - track!("viewed protip", protip_id: protip.public_id, protip_score: protip.score) - end - - def track_opportunity_view!(opportunity) - track!("viewed opportunity", opportunity_id: opportunity.id, team: opportunity.team_document_id) - end - - def track!(name, data = {}) - user_events.create!(name: name, data: data) - end - - def teams_nearby - @teams_nearby ||= nearbys(50).collect { |u| u.team rescue nil }.compact.uniq - end - - def followers_key - "user:#{id}:followers" - end - - def build_follow_list! - if twitter_id - REDIS.del(followers_key) - people_user_is_following = Twitter.friend_ids(twitter_id.to_i) - people_user_is_following.each do |id| - REDIS.sadd(followers_key, id) - if user = User.where(twitter_id: id.to_s).first - self.follow(user) - end - end - end - end - - def follow(user) - super(user) rescue ActiveRecord::RecordNotUnique - end - - def member_of?(network) - self.following?(network) - end - - def following_users_ids - self.following_users.select(:id).map(&:id) - end - - def following_teams_ids - self.followed_teams.map(&:team_document_id) - end - - def following_team_members_ids - User.select(:id).where(team_document_id: self.following_teams_ids).map(&:id) - end - - def following_networks_ids - self.following_networks.select(:id).map(&:id) - end - - def following_networks_tags - self.following_networks.map(&:tags).uniq - end - - def following - @following ||= begin - ids = REDIS.smembers(followers_key) - User.where(twitter_id: ids).order("badges_count DESC").limit(10) - end - end - - def following_in_common(user) - @following_in_common ||= begin - ids = REDIS.sinter(followers_key, user.followers_key) - User.where(twitter_id: ids).order("badges_count DESC").limit(10) - end - end - - def followed_repos(since=2.months.ago) - REDIS.zrevrange(followed_repo_key, 0, since.to_i).collect { |link| FollowedRepo.new(link) } - end - - def networks - self.following_networks - end - - def is_mayor_of?(network) - network.mayor.try(:id) == self.id - end - def networks_based_on_skills - self.skills.collect { |skill| Network.all_with_tag(skill.name) }.flatten.uniq - end - - def visited! - self.append_latest_visits(Time.now) if self.last_request_at && (self.last_request_at < 1.day.ago) - self.touch(:last_request_at) - end - - def latest_visits - @latest_visits ||= self.visits.split(";").map(&:to_time) - end - - def append_latest_visits(timestamp) - self.visits = (self.visits.split(";") << timestamp.to_s).join(";") - self.visits.slice!(0, self.visits.index(';')+1) if self.visits.length >= 64 - calculate_frequency_of_visits! - end - - def average_time_between_visits - @average_time_between_visits ||= (self.latest_visits.each_with_index.map { |visit, index| visit - self.latest_visits[index-1] }.reject { |difference| difference < 0 }.reduce(:+) || 0)/self.latest_visits.count - end - - def calculate_frequency_of_visits! - self.visit_frequency = begin - if average_time_between_visits < 2.days - :daily - elsif average_time_between_visits < 10.days - :weekly - elsif average_time_between_visits < 40.days - :monthly - else - :rarely - end - end - end - - class FollowedRepo - attr_reader :data - - def initialize(data) - @data = JSON.parse(data) - end - - def description - data['description'] - end - - def repo - data['link'].gsub('https://github.com/', '') - end - - def date - @date ||= Date.parse(data['date']) - end - - def link - data['link'] - end - - def user - User.find(data['user_id']) - end - end - - def followed_repo_key - "user:#{id}:following:repos" + self.skills.flat_map { |skill| Network.all_with_tag(skill.name) }.uniq end #This is a temporary method as we migrate to the new 1.0 profile @@ -1268,109 +374,8 @@ def skill_for(name) skills.detect { |skill| skill.tokenized == tokenized_skill } end - def subscribed_to_topic?(topic) - tag = Tag.from_topic(topic).first - tag && following?(tag) - end - - def subscribe_to(topic) - tag = Tag.from_topic(topic).first - tag.subscribe(self) unless tag.nil? - end - - def unsubscribe_from(topic) - tag = Tag.from_topic(topic).first - tag.unsubscribe(self) unless tag.nil? - end - - def protip_subscriptions - following_tags - end - - def bookmarked_protips(count=Protip::PAGESIZE, force=false) - if force - self.likes.where(likable_type: 'Protip').map(&:likable) - else - Protip.search("bookmark:#{self.username}", [], per_page: count) - end - end - - def authored_protips(count=Protip::PAGESIZE, force=false) - if force - self.protips - else - Protip.search("author:#{self.username}", [], per_page: count) - end - end - - def protip_subscriptions_for(topic, count=Protip::PAGESIZE, force=false) - if force - following?(tag) && Protip.for_topic(topic) - else - Protip.search_trending_by_topic_tags(nil, topic.to_a, 1, count) - end - end - - def api_key - read_attribute(:api_key) || generate_api_key! - end - - def generate_api_key! - begin - key = SecureRandom.hex(8) - end while User.where(api_key: key).exists? - update_attribute(:api_key, key) - key - end - - def join(network) - self.follow(network) - end - - def leave(network) - self.stop_following(network) - end - - def apply_to(job) - job.apply_for(self) - end - - def already_applied_for?(job) - job.seized_by?(self) - end - - def seen(feature_name) - REDIS.SADD("user:seen:#{feature_name}", self.id.to_s) - end - - def self.that_have_seen(feature_name) - REDIS.SCARD("user:seen:#{feature_name}") - end - - def seen?(feature_name) - REDIS.SISMEMBER("user:seen:#{feature_name}", self.id.to_s) == 1 #true - end - - def has_resume? - !self.resume.blank? - end - private - def load_github_profile - self.github.blank? ? nil : (cached_profile || fresh_profile) - end - - def cached_profile - self.github_id.present? && GithubProfile.where(github_id: self.github_id).first - end - - def fresh_profile - GithubProfile.for_username(self.github).tap do |profile| - self.update_attribute(:github_id, profile.github_id) - end - end - before_save :destroy_badges def destroy_badges @@ -1380,30 +385,18 @@ def destroy_badges end end - before_create :make_referral_token - - def make_referral_token - if self.referral_token.nil? - self.referral_token = SecureRandom.hex(8) - end + before_create do + self.referral_token ||= SecureRandom.hex(8) end after_save :refresh_dependencies - after_destroy :refresh_protips def refresh_dependencies - if username_changed? or avatar_changed? or team_document_id_changed? + if username_changed? or avatar_changed? or team_id_changed? refresh_protips end end - def refresh_protips - self.protips.each do |protip| - protip.reindex_search - end - return true - end - after_save :manage_github_orgs after_destroy :remove_all_github_badges diff --git a/app/models/user_event.rb b/app/models/user_event.rb index 585aa28f..78602f73 100644 --- a/app/models/user_event.rb +++ b/app/models/user_event.rb @@ -1,17 +1,12 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `user_events` +# Table name: user_events # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | `default(2014-02-20 22:39:11 UTC)` -# **`data`** | `text` | -# **`id`** | `integer` | `not null, primary key` -# **`name`** | `string(255)` | -# **`user_id`** | `integer` | +# id :integer not null, primary key +# user_id :integer +# name :string(255) +# data :text +# created_at :datetime default(2012-03-12 21:01:10 UTC) # class UserEvent < ActiveRecord::Base diff --git a/app/models/users/github.rb b/app/models/users/github.rb new file mode 100644 index 00000000..edf75efa --- /dev/null +++ b/app/models/users/github.rb @@ -0,0 +1,7 @@ +module Users + module Github + def self.table_name_prefix + 'users_github_' + end + end +end diff --git a/app/models/users/github/followed_repo.rb b/app/models/users/github/followed_repo.rb new file mode 100644 index 00000000..9c73d73b --- /dev/null +++ b/app/models/users/github/followed_repo.rb @@ -0,0 +1,31 @@ +module Users + module Github + class FollowedRepo + attr_reader :data + + def initialize(data) + @data = JSON.parse(data) + end + + def description + data['description'] + end + + def repo + data['link'].sub('https://github.com/', '') + end + + def date + @date ||= Date.parse(data['date']) + end + + def link + data['link'] + end + + def user + User.find(data['user_id']) + end + end + end +end diff --git a/app/models/users/github/organization.rb b/app/models/users/github/organization.rb new file mode 100644 index 00000000..f5763901 --- /dev/null +++ b/app/models/users/github/organization.rb @@ -0,0 +1,20 @@ +# == Schema Information +# +# Table name: users_github_organizations +# +# id :integer not null, primary key +# login :string(255) +# company :string(255) +# blog :string(255) +# location :string(255) +# url :string(255) +# github_id :integer +# github_created_at :datetime +# github_updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null +# + +class Users::Github::Organization < ActiveRecord::Base + has_many :followers, class_name: 'Users::Github::Organizations::Follower' +end diff --git a/app/models/users/github/organizations.rb b/app/models/users/github/organizations.rb new file mode 100644 index 00000000..16e09cbc --- /dev/null +++ b/app/models/users/github/organizations.rb @@ -0,0 +1,9 @@ +module Users + module Github + module Organizations + def self.table_name_prefix + 'users_github_organizations_' + end + end + end +end diff --git a/app/models/users/github/organizations/follower.rb b/app/models/users/github/organizations/follower.rb new file mode 100644 index 00000000..da88b8db --- /dev/null +++ b/app/models/users/github/organizations/follower.rb @@ -0,0 +1,20 @@ +# == Schema Information +# +# Table name: users_github_organizations_followers +# +# organization_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +module Users + module Github + module Organizations + class Follower < ActiveRecord::Base + belongs_to :profile, :class_name => 'Users::Github::Profile' + belongs_to :organization, :class_name => 'Users::Github::Organization' + end + end + end +end diff --git a/app/models/users/github/profile.rb b/app/models/users/github/profile.rb new file mode 100644 index 00000000..65575cb2 --- /dev/null +++ b/app/models/users/github/profile.rb @@ -0,0 +1,51 @@ +# == Schema Information +# +# Table name: users_github_profiles +# +# id :integer not null, primary key +# login :citext not null +# name :string(255) +# company :string(255) +# location :string(255) +# github_id :integer +# user_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# hireable :boolean default(FALSE) +# followers_count :integer default(0) +# following_count :integer default(0) +# github_created_at :datetime +# github_updated_at :datetime +# spider_updated_at :datetime +# + +module Users + module Github + class Profile < ActiveRecord::Base + belongs_to :user + has_many :followers, class_name: 'Users::Github::Profiles::Follower', + foreign_key: :follower_id + has_many :repositories, class_name: 'Users::Github::Repository', + foreign_key: :owner_id + validates :github_id, presence: true, uniqueness: true + before_validation :copy_login_from_user, on: :create + after_create :extract_data_from_github + + + def update_facts! + #TODO + end + + private + + def copy_login_from_user + self.login = user.github + end + + def extract_data_from_github + ExtractGithubProfile.perform_async(id) + end + + end + end +end diff --git a/app/models/users/github/profiles.rb b/app/models/users/github/profiles.rb new file mode 100644 index 00000000..0b15ccbd --- /dev/null +++ b/app/models/users/github/profiles.rb @@ -0,0 +1,9 @@ +module Users + module Github + module Profiles + def self.table_name_prefix + 'users_github_profiles_' + end + end + end +end diff --git a/app/models/users/github/profiles/follower.rb b/app/models/users/github/profiles/follower.rb new file mode 100644 index 00000000..351ad710 --- /dev/null +++ b/app/models/users/github/profiles/follower.rb @@ -0,0 +1,20 @@ +# == Schema Information +# +# Table name: users_github_profiles_followers +# +# follower_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +module Users + module Github + module Profiles + class Follower < ActiveRecord::Base + belongs_to :profile, :class_name => 'Users::Github::Profile' + belongs_to :follower, :class_name => 'Users::Github::Profile' + end + end + end +end diff --git a/app/models/users/github/repositories.rb b/app/models/users/github/repositories.rb new file mode 100644 index 00000000..c0719e38 --- /dev/null +++ b/app/models/users/github/repositories.rb @@ -0,0 +1,9 @@ +module Users + module Github + module Repositories + def self.table_name_prefix + 'users_github_repositories_' + end + end + end +end diff --git a/app/models/users/github/repositories/contributor.rb b/app/models/users/github/repositories/contributor.rb new file mode 100644 index 00000000..d98f8c91 --- /dev/null +++ b/app/models/users/github/repositories/contributor.rb @@ -0,0 +1,20 @@ +# == Schema Information +# +# Table name: users_github_repositories_contributors +# +# repository_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +module Users + module Github + module Repositories + class Contributor < ActiveRecord::Base + belongs_to :profile, class_name: 'Users::Github::Profile' + belongs_to :repository, :class_name => 'Users::Github::Repository' + end + end + end +end diff --git a/app/models/users/github/repositories/follower.rb b/app/models/users/github/repositories/follower.rb new file mode 100644 index 00000000..c3a5bd5a --- /dev/null +++ b/app/models/users/github/repositories/follower.rb @@ -0,0 +1,20 @@ +# == Schema Information +# +# Table name: users_github_repositories_followers +# +# repository_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +module Users + module Github + module Repositories + class Follower < ActiveRecord::Base + belongs_to :profile, class_name: 'Users::Github::Profile' + belongs_to :repository, :class_name => 'Users::Github::Repository' + end + end + end +end diff --git a/app/models/users/github/repository.rb b/app/models/users/github/repository.rb new file mode 100644 index 00000000..c058811d --- /dev/null +++ b/app/models/users/github/repository.rb @@ -0,0 +1,33 @@ +# == Schema Information +# +# Table name: users_github_repositories +# +# id :integer not null, primary key +# name :string(255) +# description :text +# full_name :string(255) +# homepage :string(255) +# fork :boolean default(FALSE) +# forks_count :integer default(0) +# forks_count_updated_at :datetime default(2014-07-23 03:14:37 UTC) +# stargazers_count :integer default(0) +# stargazers_count_updated_at :datetime default(2014-07-23 03:14:37 UTC) +# language :string(255) +# followers_count :integer default(0), not null +# github_id :integer not null +# owner_id :integer +# organization_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# + +module Users + module Github + class Repository < ActiveRecord::Base + has_many :followers, :class_name => 'Users::Github::Repositories::Follower' + has_many :contributors, :class_name => 'Users::Github::Repositories::Contributor' + belongs_to :organization, :class_name => 'Users::Github::Organization' + belongs_to :owner, :class_name => 'Users::Github::Profile' + end + end +end diff --git a/app/modules/teams.rb b/app/modules/teams.rb new file mode 100644 index 00000000..12708711 --- /dev/null +++ b/app/modules/teams.rb @@ -0,0 +1,5 @@ +module Teams + def self.table_name_prefix + 'teams_' + end +end \ No newline at end of file diff --git a/app/modules/users.rb b/app/modules/users.rb new file mode 100644 index 00000000..20a27e07 --- /dev/null +++ b/app/modules/users.rb @@ -0,0 +1,5 @@ +module Users + def self.table_name_prefix + 'users_' + end +end \ No newline at end of file diff --git a/app/services/hawt_service.rb b/app/services/hawt_service.rb new file mode 100644 index 00000000..c7a08961 --- /dev/null +++ b/app/services/hawt_service.rb @@ -0,0 +1,26 @@ +class HawtService + def initialize(protip) + @protip = protip + end + + def protip_id + if @protip.class == Hash + @protip[:protip_id] || @protip[:id] + else + @protip.id + end + end + + def feature! + HawtServiceJob.perform_async(protip_id, 'feature') + end + + def unfeature! + HawtServiceJob.perform_async(protip_id, 'unfeature') + end + + #TODO remove + def hawt? + JSON.parse(HawtServiceJob.new.perform(protip_id, 'hawt'))['hawt?'] + end +end diff --git a/app/services/protips/hawt_service.rb b/app/services/protips/hawt_service.rb deleted file mode 100644 index 8eccf609..00000000 --- a/app/services/protips/hawt_service.rb +++ /dev/null @@ -1,81 +0,0 @@ -module Services - module Protips - module FakeHawtService - def feature! - Rails.logger.ap("#{self.class.name}#feature!") - end - - def unfeature! - Rails.logger.ap("#{self.class.name}#unfeature!") - end - - def hawt? - Rails.logger.ap("#{self.class.name}#hawt?") - - false - end - end - - module RealHawtService - def feature! - url = URI.parse("#{ENV['PRIVATE_URL']}/api/v1/protips/feature.json").to_s - protip_json = MultiJson.load(protip_hash.to_json) - - Rails.cache.fetch(['hawt_feature', url, protip_hash[:public_id]], expires: 1.hour) do - RestClient.post(url, protip_json, accept: :json, content_type: 'application/json') - end - end - - def unfeature! - url = URI.parse("#{ENV['PRIVATE_URL']}/api/v1/protips/unfeature.json").to_s - protip_json = MultiJson.load(protip_hash.to_json) - - Rails.cache.fetch(['hawt_unfeature', url, protip_hash[:public_id]], expires: 1.hour) do - RestClient.post(url, protip_json, accept: :json, content_type: 'application/json') - end - end - - def hawt? - url = URI.parse("#{ENV['PRIVATE_URL']}/api/v1/protips/hawt.json").to_s - protip_json = MultiJson.load(protip_hash.to_json) - - Rails.cache.fetch(['hawt_hawt', url, protip_hash[:public_id]], expires: 1.hour) do - JSON.parse(RestClient.post(url, protip_json, accept: :json, content_type: 'application/json').to_s)['hawt?'] - end - end - end - - class HawtService - if ENV['ENABLE_PRIVATE_API'] || Rails.env.production? - include RealHawtService - else - include FakeHawtService - end - - def initialize(protip) - @protip = protip - @token = SecureRandom.uuid - end - - def protip_hash - @protip_hash ||= @protip.as_json( - methods: [:upvote_velocity, :upvotes, :flagged?, :ever_featured?, :viewed_by_admin?, :networks, :comments, :public_id], - include: [:user] - ).merge(token: token, protip_id: protip_id) - end - - def token - @token - end - - - def protip_id - if @protip.class == Hash - @protip[:protip_id] || @protip[:id] - else - @protip.id - end - end - end - end -end diff --git a/app/services/provider_user_lookup_service.rb b/app/services/provider_user_lookup_service.rb new file mode 100644 index 00000000..e6059d84 --- /dev/null +++ b/app/services/provider_user_lookup_service.rb @@ -0,0 +1,24 @@ +class ProviderUserLookupService + def initialize(provider, username) + @provider = provider + @username = username + end + + def lookup_user + if valid_provider? && valid_username? + User.where(@provider.to_sym => @username).first + else + nil + end + end + + private + + def valid_provider? + @provider.present? && [:twitter, :github, :linkedin].include?(@provider.to_sym) + end + + def valid_username? + @username.present? + end +end diff --git a/app/services/user_banner_service.rb b/app/services/user_banner_service.rb new file mode 100644 index 00000000..4521daab --- /dev/null +++ b/app/services/user_banner_service.rb @@ -0,0 +1,12 @@ +class UserBannerService + def self.ban(user) + user.update_attribute(:banned_at, Time.now.utc) + UserProtipsService.deindex_all_for(user) + UserCommentsService.deindex_all_for(user) + end + + def self.unban(user) + user.update_attribute(:banned_at, nil) + UserProtipsService.reindex_all_for(user) + end +end diff --git a/app/services/user_comments_service.rb b/app/services/user_comments_service.rb new file mode 100644 index 00000000..650c44bb --- /dev/null +++ b/app/services/user_comments_service.rb @@ -0,0 +1,8 @@ +module UserCommentsService + def self.deindex_all_for(user) + user.comments.each do |comment| + comment.mark_as_spam + end + end +end + diff --git a/app/services/user_protips_service.rb b/app/services/user_protips_service.rb new file mode 100644 index 00000000..aa2916f4 --- /dev/null +++ b/app/services/user_protips_service.rb @@ -0,0 +1,15 @@ +module UserProtipsService + def self.deindex_all_for(user) + user.protips.each do |protip| + protip.mark_as_spam + ProtipIndexer.new(protip).remove + end + end + + def self.reindex_all_for(user) + user.protips.each do |protip| + ProtipIndexer.new(protip).store + end + end +end + diff --git a/app/structs/audience.rb b/app/structs/audience.rb new file mode 100644 index 00000000..9e0ee9d4 --- /dev/null +++ b/app/structs/audience.rb @@ -0,0 +1,139 @@ +class Audience + def self.all + { all: nil } + end + + def self.user(user_id) + { user: user_id } + end + + def self.users(user_ids) + { users: user_ids } + end + + def self.team(team_id) + { team: team_id } + end + + def self.following_user(user_id) + { user_followers: user_id } + end + + def self.following_team(team_id) + { team_followers: team_id } + end + + def self.network(network_id) + { network: network_id } + end + + def self.networks(network_ids) + { networks: network_ids } + end + + def self.team_reach(team_id) + { team_reach: team_id } + end + + def self.user_reach(user_id) + { user_reach: user_id } + end + + def self.admin(queue = nil) + { admin: queue } + end + + def self.to_channels(audience) + audiences = expand(audience) + audiences.map { |a| to_channel(a) } + end + + def self.to_key(audience) + to_channels(audience).map { |channel| channel_to_key(channel) } + end + + def self.channel_to_key(channel) + "activityfeed:#{channel}" + end + + def self.expand(audience) + audience.keys.map(&:to_sym).collect do |target| + + if target == :user_reach + user = User.find(audience[target]) + expand_reach(user) unless user.nil? + elsif target == :team_reach + team = Team.find(audience[target]) + expand_reach(team) unless team.nil? + elsif target == :admin + User.admins.map do |admin| + admin.id + end + elsif target == :team + team = Team.find(audience[target]) + team.members.map do |team_member| + team_member.id + end unless team.nil? + elsif target == :user_followers + user = User.find(audience[target]) + expand_followers(user) unless user.nil? + elsif target == :team_followers + team = Team.find(audience[target]) + expand_followers(team) unless team.nil? + elsif target == :all + expand_all_users + elsif target == :network + network = Network.find(audience[target]) + expand_network(network) unless network.nil? + elsif target == :networks + networks = Network.where(id: audience[target]) + expand_networks(networks) + else + audience[target] + end + + end.flatten.compact.uniq.map { |user_id| Audience.user(user_id) } + end + + private + + def self.expand_followers(user_or_team) + user_or_team.followers.map do |follower| + follower.id + end + end + + def self.expand_all_users + ActiveRecord::Base.connection.select_values(User.select(:id).to_sql) + end + + def self.expand_network(network) + ActiveRecord::Base.connection.select_values(network.members.select(:id).to_sql) + end + + def self.expand_networks(networks) + ActiveRecord::Base.connection.select_values(Follow.where(followable_id: networks.map(&:id)).where(followable_type: Network.name).select(:follower_id).to_sql) + end + + def self.expand_reach(user_or_team) + audiences = [] + audiences.concat(expand_followers(user_or_team)) + + if user_or_team.is_a?(Team) + team = Team.find(user_or_team) + team.members.each do |team_member| + audiences.concat(expand_followers(team_member)) + end unless team.nil? + else + team = User.find(user_or_team).try(:team) + audiences.concat(expand_followers(team)) unless team.nil? + end + audiences + end + + def self.to_channel(audience) + channel_name = Rails.env + ":" + audience.map { |k, v| "#{k}:#{v}" }.first + #obfiscate for production + (Rails.env.development? or Rails.env.test?) ? channel_name : Digest::MD5.hexdigest(channel_name) + end +end diff --git a/app/models/bitbucket.rb b/app/structs/bitbucket.rb similarity index 100% rename from app/models/bitbucket.rb rename to app/structs/bitbucket.rb diff --git a/app/models/event.rb b/app/structs/event.rb similarity index 76% rename from app/models/event.rb rename to app/structs/event.rb index 31bedd73..bf29e2f1 100644 --- a/app/models/event.rb +++ b/app/structs/event.rb @@ -1,7 +1,6 @@ class Event < Struct.new(:data) include ActiveModel::Conversion extend ActiveModel::Naming - extend Publisher class << self @@ -13,7 +12,6 @@ def generate_event(event_type, audience, data={}, drip_rate=:immediately) data = { version: VERSION, event_id: Time.now.utc.to_i }.with_indifferent_access.merge(data) data.deep_merge!(extra_information(data)) drip_rate = :immediately if drip_rate.nil? - send_admin_notifications(event_type, data, audience[:admin]) if audience.has_key? :admin channels = Audience.to_channels(audience) activity_feed_keys = channels.map { |channel| Audience.channel_to_key(channel) } @@ -25,19 +23,9 @@ def generate_event(event_type, audience, data={}, drip_rate=:immediately) activity_feed_keys.each_with_index do |activity_feed_key, index| data.merge!({ channel: channels[index] }.with_indifferent_access) score_for_event = Time.now.to_f - REDIS.zadd(activity_feed_key, score_for_event.to_f, data) - count = REDIS.zcard(activity_feed_key) - REDIS.zremrangebyrank(activity_feed_key, 0, count - TABLE_SIZE) if count > TABLE_SIZE - end - end - end - - def send_admin_notifications(event_type, data, queue) - unless queue.nil? - if event_type.to_sym == :new_protip - protip = Protip.with_public_id(data[:public_id]) - - ProcessingQueue.enqueue(protip, queue) unless protip.nil? + Redis.current.zadd(activity_feed_key, score_for_event.to_f, data) + count = Redis.current.zcard(activity_feed_key) + Redis.current.zremrangebyrank(activity_feed_key, 0, count - TABLE_SIZE) if count > TABLE_SIZE end end end @@ -57,9 +45,9 @@ def user_activity(user, from, to, limit, publish=false) activity_feed_keys.each do |activity_feed_key| i = 1 - REDIS.zrangebyscore(activity_feed_key, from, to).each do |activity| + Redis.current.zrangebyscore(activity_feed_key, from, to).each do |activity| - Rails.logger.warn("[EVAL:#{i}] Event#user_activity(user = #{user.inspect}, from = #{from.inspect}, limit = #{limit.inspect}, publish = #{publish.inspect}) set to eval activity = #{activity.inspect}") + Rails.logger.warn("[EVAL:#{i}] Event#user_activity(user = #{user.inspect}, from = #{from.inspect}, limit = #{limit.inspect}, publish = #{publish.inspect}) set to eval activity = #{activity.inspect}") if ENV['DEBUG'] i += 1 break if count == limit @@ -68,7 +56,7 @@ def user_activity(user, from, to, limit, publish=false) data.delete(:channel) if publish - publish_event(channel, data) if publish + publish_event(channel, data) else activities << data.merge({ timestamp: (data[:event_id] || Time.now.to_i) }) end @@ -80,7 +68,7 @@ def user_activity(user, from, to, limit, publish=false) def extra_information(data) extra_info = {} - u = User.with_username(data['user']['username']) unless data['user'].nil? + u = User.find_by_username(data['user']['username']) unless data['user'].nil? extra_info.merge!(user_info(u)) unless u.nil? extra_info.merge!(team_info(u.team)) unless u.nil? or u.team.nil? extra_info.with_indifferent_access @@ -89,14 +77,14 @@ def extra_information(data) def user_info(user) { user: { username: user.username, - profile_url: user.profile_url, + profile_url: user.avatar_url, profile_path: Rails.application.routes.url_helpers.badge_path(user.username), } } end def team_info(team) { team: { name: team.name, - avatar: ActionController::Base.helpers.asset_path(team.try(:avatar_url)), + avatar: ActionController::Base.helpers.asset_path(team.avatar_url), url: Rails.application.routes.url_helpers.teamname_path(team.slug), follow_path: Rails.application.routes.url_helpers.follow_team_path(team), skills: team.specialties_with_counts.map { |skills| skills[0] }.first(2), @@ -104,4 +92,8 @@ def team_info(team) } } end end + + def publish(channel, message) + false + end end diff --git a/app/models/github_badge.rb b/app/structs/github_badge.rb similarity index 80% rename from app/models/github_badge.rb rename to app/structs/github_badge.rb index 0716f2ab..2c38969a 100644 --- a/app/models/github_badge.rb +++ b/app/structs/github_badge.rb @@ -1,3 +1,6 @@ +# TODO: Refactor API Calls to Sidekiq Workers +# TODO: Verify that GITHUB_ADMIN_USER is required, and can't be replaced with app based auth +# TODO: Refactor/Reflow Error Handling, Don't rescue fail. Defer to sidekiq job auto retry class GithubBadge def initialize @client = Octokit::Client.new( @@ -7,7 +10,6 @@ def initialize client_secret: ENV['GITHUB_SECRET'] ) rescue Exception => e - Rails.logger.error("Failed to initialize octokit: #{e.message}") end def add(badge, github_username) @@ -15,9 +17,9 @@ def add(badge, github_username) id = @client.organization_teams("coderwall-#{badge_name}")[1].id - @client.add_team_member(id, github_username) + @client.add_team_membership(id, github_username) rescue Octokit::NotFound => e - Rails.logger.error("Failed to add badge #{badge_name} for #{github_username}") + Rails.logger.error("Failed to add badge #{badge_name} for #{github_username}") if ENV['DEBUG'] rescue Errno::ECONNREFUSED => e retry end @@ -27,7 +29,7 @@ def remove(badge, github_username) id = @client.organization_teams("coderwall-#{badge_name}")[1].id @client.remove_team_member(id, github_username) rescue Octokit::NotFound => e - Rails.logger.error("Failed to remove badge #{badge_name} for #{github_username}") + Rails.logger.error("Failed to remove badge #{badge_name} for #{github_username}") if ENV['DEBUG'] rescue Errno::ECONNREFUSED => e retry end diff --git a/app/structs/github_old.rb b/app/structs/github_old.rb new file mode 100644 index 00000000..e046b4cb --- /dev/null +++ b/app/structs/github_old.rb @@ -0,0 +1,179 @@ +#@ deprecated +class GithubOld + @@token = nil + GITHUB_ROOT = "https://github.com" + API_ROOT = 'https://api.github.com/' + + GITHUB_REDIRECT_URL = ENV['GITHUB_REDIRECT_URL'] + GITHUB_CLIENT_ID = ENV['GITHUB_CLIENT_ID'] + GITHUB_SECRET = ENV['GITHUB_SECRET'] + + attr_accessor :last_response, :token + + def initialize(token = nil) + @client = Octokit::Client.new oauth_token: token, auto_traversal: true, client_id: GITHUB_CLIENT_ID, client_secret: GITHUB_SECRET + end + + REPO_ATTRIBUTES_TO_IGNORE = %w{ + open_issues + description + ssh_url + url + master_branch + clone_url + homepage + fork + pushed_at + language + svn_url + private + size + forks + watchers + git_url + created_at + } + + USER_ATTRIBUTES_TO_IGNORE = %w{ + + } + + def profile(github_username = nil, since=Time.at(0)) + @client.user(github_username) || [] + rescue Errno::ECONNREFUSED => e + retry + rescue Octokit::NotFound + user = User.find_by_github(github_username) + user.github_failures += 1 + user.save + {} + end + + def orgs_for(github_username, since=Time.at(0)) + (@client.orgs(github_username, per_page: 100) || []) + rescue Errno::ECONNREFUSED => e + retry + end + + def followers_for(github_username, since=Time.at(0)) + (@client.followers(github_username, per_page: 100) || []).map do |user| + user.except *USER_ATTRIBUTES_TO_IGNORE + end + rescue Errno::ECONNREFUSED => e + retry + end + + def following_for(github_username, since=Time.at(0)) + (@client.following(github_username, per_page: 100) || []).map do |user| + user.except *USER_ATTRIBUTES_TO_IGNORE + end + rescue Errno::ECONNREFUSED => e + retry + end + + def watched_repos_for(github_username, since=Time.at(0)) + (@client.watched(github_username, per_page: 100) || []).map do |repo| + repo.except *REPO_ATTRIBUTES_TO_IGNORE + end + rescue Errno::ECONNREFUSED => e + retry + end + + def activities_for(github_username, times=1) + links = [] + times.times do |index| + index = index + 1 + res = Servant.get("https://github.com/#{github_username}.atom?page=#{index}") + doc = Nokogiri::HTML(res.to_s) + doc.xpath('//entry').each do |entry| + if entry.xpath('id').text.include?('WatchEvent') + date = Time.parse(entry.xpath('published').text) + content = Nokogiri::HTML(entry.xpath('content').text) + links << { + date: date, + link: entry.xpath('link').first['href'], + description: content.css('.message blockquote').text + } + end + end + end + links + end + + def repos_for(github_username, since=Time.at(0)) + @client.repositories(github_username, per_page: 100) || [] + rescue Octokit::NotFound => e + Rails.logger.error("Unable to find repos for #{github_username}") + return [] + rescue Errno::ECONNREFUSED => e + retry + end + + def predominant_repo_lanugage_for_link(link) + owner, repo_name = *link.sub(/https?:\/\/github.com\//i, '').split('/') + repo(owner, repo_name)[:language] + end + + def repo(owner, name, since=Time.at(0)) + (@client.repo("#{owner}/#{name}") || []) + rescue Octokit::NotFound => e + Rails.logger.error("Unable to find repo #{owner}/#{name}") + return {} + rescue Errno::ECONNREFUSED => e + retry + end + + def repo_languages(owner, name, since=Time.at(0)) + (@client.languages("#{owner}/#{name}", per_page: 100) || []) + rescue Octokit::NotFound => e + Rails.logger.error("Failed to find languages for #{owner}/#{name}") + return [] + rescue Errno::ECONNREFUSED => e + retry + end + + def repo_watchers(owner, name, since=Time.at(0)) + (@client.stargazers("#{owner}/#{name}", per_page: 100, accept: 'application/vnd.github.beta+json') || []).map do |user| + user.select { |k| k=='login' }.with_indifferent_access + end + rescue Octokit::NotFound => e + Rails.logger.error("Failed to find watchers for #{owner}/#{name}") + return [] + rescue Errno::ECONNREFUSED => e + retry + end + + def repo_contributors(owner, name, since=Time.at(0)) + @client.contributors("#{owner}/#{name}", false, per_page: 100) || [] + rescue Octokit::NotFound => e + Rails.logger.error("Failed to find contributors for #{owner}/#{name}") + return [] + rescue Octokit::InternalServerError => e + Rails.logger.error("Failed to retrieve contributors for #{owner}/#{name}") + return [] + rescue Errno::ECONNREFUSED => e + retry + end + + def repo_collaborators(owner, name, since=Time.at(0)) + (@client.collaborators("#{owner}/#{name}", per_page: 100) || []).map do |user| + user.except *USER_ATTRIBUTES_TO_IGNORE + end + rescue Octokit::NotFound => e + Rails.logger.error("Failed to find collaborators for #{owner}/#{name}") + return [] + rescue Errno::ECONNREFUSED => e + retry + end + + def repo_forks(owner, name, since=Time.at(0)) + (@client.forks("#{owner}/#{name}", per_page: 100) || []).map do |user| + user.except *REPO_ATTRIBUTES_TO_IGNORE + end + rescue Octokit::NotFound => e + Rails.logger.error("Failed to find forks for #{owner}/#{name}") + return [] + rescue Errno::ECONNREFUSED => e + retry + end +end diff --git a/app/models/lanyrd.rb b/app/structs/lanyrd.rb similarity index 81% rename from app/models/lanyrd.rb rename to app/structs/lanyrd.rb index 8765f43b..e4c3d5b4 100644 --- a/app/models/lanyrd.rb +++ b/app/structs/lanyrd.rb @@ -5,15 +5,11 @@ class Lanyrd < Struct.new(:username) def facts events.collect do |event| - id = event[:url].gsub(HOST, '') + ":#{username}" + id = event[:url].sub(HOST, '') + ":#{username}" Fact.append!(id, "lanyrd:#{username}", event[:name], event[:date], event[:url], event[:tags]) end end - def self.upcoming(username) - Lanyrd.new(username).events.select { |event| puts event[:date].to_s } - end - def events events = [] profile[:history] && profile[:history].each do |conference| @@ -38,8 +34,7 @@ def profile response = RestClient.get("#{API_URL}?twitter=#{username}&view=history") JSON.parse(response).with_indifferent_access rescue RestClient::ResourceNotFound - Rails.logger.error("Was unable to find lanyrd data for #{username}") {} end end -end \ No newline at end of file +end diff --git a/app/structs/lifecycle_marketing.rb b/app/structs/lifecycle_marketing.rb new file mode 100644 index 00000000..c974fb7f --- /dev/null +++ b/app/structs/lifecycle_marketing.rb @@ -0,0 +1,59 @@ +class LifecycleMarketing + class << self + + # run with: rake marketing:emails:send + def process! + send_activity_updates + send_reminders_to_create_skill + send_reminders_to_create_team + send_reminders_to_create_protip + send_reminders_to_invite_team_members + send_reminders_to_link_accounts + end + + def send_reminders_to_create_team + Rails.logger.info "Skipping team create reminder. Got more hate than love" + end + + def send_reminders_to_invite_team_members + key = 'email:team-reminders:teams-emailed' + Redis.current.del(key) + valid_activity_users.where("team_id IS NOT NULL").where(remind_to_invite_team_members: nil).find_each do |user| + unless Redis.current.sismember(key, user.team_id) or Team.find(user.team_id).created_at < 1.week.ago + Redis.current.sadd key, user.team_id + NotifierMailer.remind_to_invite_team_members(user.username).deliver + end + end + end + + def send_activity_updates + send_new_achievement_reminders + end + + def send_reminders_to_create_protip + Rails.logger.info "Skipping :send_reminders_to_create_protip until implemented" + end + + def send_reminders_to_create_skill + Rails.logger.info "Skipping :send_reminders_to_create_skill until implemented" + end + + def send_reminders_to_link_accounts + Rails.logger.info "Skipping :send_reminders_to_link_accounts until implemented" + end + + def send_new_achievement_reminders + User.where(id: valid_activity_users.joins("inner join badges on badges.user_id = users.id").where("badges.created_at > users.last_request_at").reorder('badges.created_at ASC').select(:id)).select('DISTINCT(username), id').find_each do |user| + NotifierMailer.new_badge(user.username).deliver + end + end + + def valid_newsletter_users + User.active.no_emails_since(1.week.ago).receives_newsletter + end + + def valid_activity_users + User.active.no_emails_since(3.days.ago).receives_activity + end + end +end diff --git a/app/models/linked_in_stream.rb b/app/structs/linked_in_stream.rb similarity index 97% rename from app/models/linked_in_stream.rb rename to app/structs/linked_in_stream.rb index 0b62a993..34bb64c2 100644 --- a/app/models/linked_in_stream.rb +++ b/app/structs/linked_in_stream.rb @@ -34,10 +34,10 @@ def facts end facts rescue RestClient::Unauthorized => ex - Rails.logger.error("Was unable to find linkedin data for #{username}") + Rails.logger.error("Was unable to find linkedin data for #{username}") if ENV['DEBUG'] return [] rescue LinkedIn::Unauthorized - Rails.logger.error("Was unable to find linkedin data for #{username}") + Rails.logger.error("Was unable to find linkedin data for #{username}") if ENV['DEBUG'] return [] end diff --git a/app/models/location_photo.rb b/app/structs/location_photo.rb similarity index 99% rename from app/models/location_photo.rb rename to app/structs/location_photo.rb index 8cde3451..50b73a59 100644 --- a/app/models/location_photo.rb +++ b/app/structs/location_photo.rb @@ -41,128 +41,128 @@ def for(location) end end -LocationPhoto::Panoramic.photo 'San_Francisco.jpg', 'patrick-smith-photography', 'https://www.flickr.com/photos/patrick-smith-photography/5624097073', 'San Francisco' -LocationPhoto::Panoramic.photo 'Boston.jpg', 'rickharris', 'https://www.flickr.com/photos/rickharris/144287116/', 'Boston' -LocationPhoto::Panoramic.photo 'Palo_Alto.jpg', 'moonsoleil', 'http://www.flickr.com/photos/moonsoleil/5816814203/', 'Palo Alto' -LocationPhoto::Panoramic.photo 'Ottawa.jpg', 'alexindigo', 'http://www.flickr.com/photos/alexindigo/1473500746/', 'Ottawa' -LocationPhoto::Panoramic.photo 'New_York.jpg', 'dennoit', 'http://www.flickr.com/photos/dennoit/4982584929/', 'New York' -LocationPhoto::Panoramic.photo 'Chicago.jpg', 'dherholz', 'http://www.flickr.com/photos/dherholz/2651752852/', 'Chicago' -LocationPhoto::Panoramic.photo 'Toronto.jpg', 'dcronin', 'http://www.flickr.com/photos/dcronin/5362386184/', 'Toronto' -LocationPhoto::Panoramic.photo 'Austin.jpg', 'jrandallc', 'http://www.flickr.com/photos/jrandallc/5269793786/', 'Austin' -LocationPhoto::Panoramic.photo 'Portland.jpg', 'oceanyamaha', 'http://www.flickr.com/photos/oceanyamaha/214822573/', 'Portland' -LocationPhoto::Panoramic.photo 'Miami.jpg', 'greyloch', 'http://www.flickr.com/photos/greyloch/5690979394/', 'Miami' -LocationPhoto::Panoramic.photo 'Worldwide.jpg', 'wwworks', 'http://www.flickr.com/photos/wwworks/2712985992/', 'Worldwide' LocationPhoto::Panoramic.photo 'Atlanta.jpg', 'hectoralejandro', 'http://www.flickr.com/photos/hectoralejandro/5845851927/', 'Atlanta' +LocationPhoto::Panoramic.photo 'Austin.jpg', 'jrandallc', 'http://www.flickr.com/photos/jrandallc/5269793786/', 'Austin' +LocationPhoto::Panoramic.photo 'Barcelona.jpg', 'bcnbits', 'http://www.flickr.com/photos/bcnbits/3092562270', 'Barcelona' +LocationPhoto::Panoramic.photo 'Boston.jpg', 'rickharris', 'https://www.flickr.com/photos/rickharris/144287116/', 'Boston' +LocationPhoto::Panoramic.photo 'Boulder.jpg', 'frankenstoen', 'http://www.flickr.com/photos/frankenstoen/2718673998', 'Boulder' +LocationPhoto::Panoramic.photo 'Cambridge.jpg', 'docsearls', 'http://www.flickr.com/photos/docsearls/3530162411', 'Cambridge' LocationPhoto::Panoramic.photo 'Capetown.jpg', 'blyzz', 'http://www.flickr.com/photos/blyzz/5092353659', 'Capetown' -LocationPhoto::Panoramic.photo 'Johannesburg.jpg', 'mister-e', 'http://www.flickr.com/photos/mister-e/196266116', 'Johannesburg' +LocationPhoto::Panoramic.photo 'Chicago.jpg', 'dherholz', 'http://www.flickr.com/photos/dherholz/2651752852/', 'Chicago' +LocationPhoto::Panoramic.photo 'Copenhagen.jpg', 'stignygaard', 'http://www.flickr.com/photos/stignygaard/160827308', 'Copenhagen' LocationPhoto::Panoramic.photo 'Hamburg.jpg', 'visualities', 'http://www.flickr.com/photos/visualities/2768964900/', 'Hamburg' +LocationPhoto::Panoramic.photo 'Johannesburg.jpg', 'mister-e', 'http://www.flickr.com/photos/mister-e/196266116', 'Johannesburg' +LocationPhoto::Panoramic.photo 'Miami.jpg', 'greyloch', 'http://www.flickr.com/photos/greyloch/5690979394/', 'Miami' LocationPhoto::Panoramic.photo 'Munich.jpg', 'justinm', 'http://www.flickr.com/photos/justinm/1785895161', 'Munich' -LocationPhoto::Panoramic.photo 'Barcelona.jpg', 'bcnbits', 'http://www.flickr.com/photos/bcnbits/3092562270', 'Barcelona' +LocationPhoto::Panoramic.photo 'New_York.jpg', 'dennoit', 'http://www.flickr.com/photos/dennoit/4982584929/', 'New York' +LocationPhoto::Panoramic.photo 'Ottawa.jpg', 'alexindigo', 'http://www.flickr.com/photos/alexindigo/1473500746/', 'Ottawa' +LocationPhoto::Panoramic.photo 'Palo_Alto.jpg', 'moonsoleil', 'http://www.flickr.com/photos/moonsoleil/5816814203/', 'Palo Alto' +LocationPhoto::Panoramic.photo 'Portland.jpg', 'oceanyamaha', 'http://www.flickr.com/photos/oceanyamaha/214822573/', 'Portland' +LocationPhoto::Panoramic.photo 'San_Francisco.jpg', 'patrick-smith-photography', 'https://www.flickr.com/photos/patrick-smith-photography/5624097073', 'San Francisco' LocationPhoto::Panoramic.photo 'Seattle.jpg', 'severud', 'http://www.flickr.com/photos/severud/2446381722', 'Seattle' -LocationPhoto::Panoramic.photo 'Cambridge.jpg', 'docsearls', 'http://www.flickr.com/photos/docsearls/3530162411', 'Cambridge' -LocationPhoto::Panoramic.photo 'Copenhagen.jpg', 'stignygaard', 'http://www.flickr.com/photos/stignygaard/160827308', 'Copenhagen' -LocationPhoto::Panoramic.photo 'Boulder.jpg', 'frankenstoen', 'http://www.flickr.com/photos/frankenstoen/2718673998', 'Boulder' +LocationPhoto::Panoramic.photo 'Toronto.jpg', 'dcronin', 'http://www.flickr.com/photos/dcronin/5362386184/', 'Toronto' +LocationPhoto::Panoramic.photo 'Worldwide.jpg', 'wwworks', 'http://www.flickr.com/photos/wwworks/2712985992/', 'Worldwide' -LocationPhoto.photo 'San_Francisco.jpg', 'salim', 'http://www.flickr.com/photos/salim/402618628', 'San Francisco' -LocationPhoto.photo 'Seattle.jpg', 'acradenia', 'http://www.flickr.com/photos/acradenia/5858166551/', 'Seattle' # LocationPhoto.photo 'Seattle.jpg', 'acradenia', 'http://www.flickr.com/photos/acradenia/5858166551/', 'Washington' conflicts with washington dc -LocationPhoto.photo 'France.jpg', 'cheindel', 'http://www.flickr.com/photos/cheindel/3270957323/', 'France' -LocationPhoto.photo 'Paris.jpg', '26700188@N05', 'http://www.flickr.com/photos/26700188@N05/4451676248/', 'Paris' -LocationPhoto.photo 'Los_Angeles.jpg', 'danielaltamirano', 'http://www.flickr.com/photos/danielaltamirano/2763173103', 'Los Angeles' -LocationPhoto.photo 'Portland.jpg', 'congaman', 'http://www.flickr.com/photos/congaman/4358234584', 'Portland' -LocationPhoto.photo 'Portland.jpg', 'congaman', 'http://www.flickr.com/photos/congaman/4358234584', 'Oregon' -LocationPhoto.photo 'Berlin.jpg', 'wordridden', 'http://www.flickr.com/photos/wordridden/1900892029', 'Berlin' -LocationPhoto.photo 'Sao_Paulo.jpg', 'thomashobbs', 'http://www.flickr.com/photos/thomashobbs/96794488', 'Sao Paulo' -LocationPhoto.photo 'Toronto.jpg', 'davidcjones', 'http://www.flickr.com/photos/davidcjones/4222408288', 'Toronto' -LocationPhoto.photo 'Austin.jpg', 'haggismac', 'http://www.flickr.com/photos/haggismac/5050364022', 'Austin' -LocationPhoto.photo 'Melbourne.jpg', 'rykneethling', 'http://www.flickr.com/photos/rykneethling/4616216715', 'Melbourne' -LocationPhoto.photo 'Sweden.jpg', 'mispahn', 'http://www.flickr.com/photos/mispahn/2750008975', 'Sweden' -LocationPhoto.photo 'Sweden.jpg', 'mispahn', 'http://www.flickr.com/photos/mispahn/2750008975', 'Kingdom of Sweden' +LocationPhoto.photo 'Alabama.jpg', 'acnatta', 'http://www.flickr.com/photos/acnatta/264575595', 'Alabama' +LocationPhoto.photo 'Alaska.jpg', '24736216@N07', 'http://www.flickr.com/photos/24736216@N07/3840895221', 'Alaska' +LocationPhoto.photo 'Amsterdam.jpg', 'mauro9', 'http://www.flickr.com/photos/mauro9/5068223866', 'Amsterdam' +LocationPhoto.photo 'Amsterdam.jpg', 'mauro9', 'http://www.flickr.com/photos/mauro9/5068223866', 'Netherlands' +LocationPhoto.photo 'Amsterdam.jpg', 'mauro9', 'http://www.flickr.com/photos/mauro9/5068223866', 'The Netherlands' +LocationPhoto.photo 'Arizona.jpg', 'combusean', 'http://www.flickr.com/photos/combusean/2568503883', 'Arizona' LocationPhoto.photo 'Atlanta.jpg', 'docsearls', 'http://www.flickr.com/photos/docsearls/3287944095', 'Atlanta' -LocationPhoto.photo 'Georgia.jpg', 'jongos', 'http://www.flickr.com/photos/jongos/326337675', 'Georgia' +LocationPhoto.photo 'Auckland.jpg', 'jasonpratt', 'http://www.flickr.com/photos/jasonpratt/5355889516', 'Auckland' +LocationPhoto.photo 'Austin.jpg', 'haggismac', 'http://www.flickr.com/photos/haggismac/5050364022', 'Austin' +LocationPhoto.photo 'Australia.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/396072534', 'Australia' +LocationPhoto.photo 'Austria.jpg', 'roblisameehan', 'http://www.flickr.com/photos/roblisameehan/875194614', 'Austria' +LocationPhoto.photo 'Barcelona.jpg', '22746515@N02', 'http://www.flickr.com/photos/22746515@N02/2418242475', 'Barcelona' +LocationPhoto.photo 'Belgium.jpg', 'erasmushogeschool', 'http://www.flickr.com/photos/erasmushogeschool/3179361408', 'Belgium' LocationPhoto.photo 'Bengaluru.jpg', 'hpnadig', 'http://www.flickr.com/photos/hpnadig/5341916872', 'Bengaluru' -LocationPhoto.photo 'Sydney.jpg', 'robertpaulyoung', 'http://www.flickr.com/photos/robertpaulyoung/2677399791', 'Sydney' +LocationPhoto.photo 'Berlin.jpg', 'wordridden', 'http://www.flickr.com/photos/wordridden/1900892029', 'Berlin' LocationPhoto.photo 'Boston.jpg', 'rosenkranz', 'http://www.flickr.com/photos/rosenkranz/2788839653', 'Boston' -LocationPhoto.photo 'Rio_de_Janeiro.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/6658699023', 'Rio de Janeiro' -LocationPhoto.photo 'Hamburg.jpg', 'lhoon', 'http://www.flickr.com/photos/lhoon/1330132713', 'Hamburg' -LocationPhoto.photo 'Montreal.jpg', 'sergemelki', 'http://www.flickr.com/photos/sergemelki/2613093643', 'Montreal' -LocationPhoto.photo 'Vancouver.jpg', 'poudyal', 'http://www.flickr.com/photos/poudyal/30924248', 'Vancouver' -LocationPhoto.photo 'San_Diego.jpg', 'chris_radcliff', 'http://www.flickr.com/photos/chris_radcliff/4488396247', 'San Diego' -LocationPhoto.photo 'Philadelphia.jpg', 'garyisajoke', 'http://www.flickr.com/photos/garyisajoke/5565916600', 'Philadelphia' -LocationPhoto.photo 'Denver.jpg', 'anneh632', 'http://www.flickr.com/photos/anneh632/3832540818', 'Denver' +LocationPhoto.photo 'Brazil.jpg', 'rob_sabino', 'http://www.flickr.com/photos/rob_sabino/4460055296', 'Brazil' LocationPhoto.photo 'Brisbane.jpg', 'eguidetravel', 'http://www.flickr.com/photos/eguidetravel/5662399294', 'Brisbane' LocationPhoto.photo 'Buenos_Aires.jpg', 'davidberkowitz', 'http://www.flickr.com/photos/davidberkowitz/5269251427', 'Buenos Aires' +LocationPhoto.photo 'Canada.jpg', '62904109@N00', 'http://www.flickr.com/photos/62904109@N00/257831124', 'Canada' +LocationPhoto.photo 'Cape_Town.jpg', 'nolandstooforeign', 'http://www.flickr.com/photos/nolandstooforeign/5512625043', 'Cape Town' +LocationPhoto.photo 'Chennai.jpg', 'vinothchandar', 'http://www.flickr.com/photos/vinothchandar/4215634377', 'Chennai' +LocationPhoto.photo 'Chicago.jpg', 'dgriebeling', 'http://www.flickr.com/photos/dgriebeling/3858526828', 'Chicago' +LocationPhoto.photo 'Chicago.jpg', 'endymion120', 'http://www.flickr.com/photos/endymion120/4800209439', 'Illinois' +LocationPhoto.photo 'Chile.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/4282194530', 'Chile' +LocationPhoto.photo 'Cologne.jpg', '11742539@N03', 'http://www.flickr.com/photos/11742539@N03/3849238477', 'Cologne' +LocationPhoto.photo 'Colorado.jpg', 'jumpyjodes', 'http://www.flickr.com/photos/jumpyjodes/122371179', 'Colorado' LocationPhoto.photo 'Columbus.jpg', 'dougtone', 'http://www.flickr.com/photos/dougtone/4103926290', 'Columbus' -LocationPhoto.photo 'Pittsburgh.jpg', 'dougtone', 'http://www.flickr.com/photos/dougtone/4189402481', 'Pittsburgh' -LocationPhoto.photo 'Amsterdam.jpg', 'mauro9', 'http://www.flickr.com/photos/mauro9/5068223866', 'Amsterdam' -LocationPhoto.photo 'Amsterdam.jpg', 'mauro9', 'http://www.flickr.com/photos/mauro9/5068223866', 'The Netherlands' -LocationPhoto.photo 'Amsterdam.jpg', 'mauro9', 'http://www.flickr.com/photos/mauro9/5068223866', 'Netherlands' -LocationPhoto.photo 'Washington_D_C_.jpg', '24736216@N07', 'http://www.flickr.com/photos/24736216@N07/4412624398', 'District of Columbia' +LocationPhoto.photo 'Connecticut.jpg', 'global-jet', 'http://www.flickr.com/photos/global-jet/2051525208', 'Connecticut' LocationPhoto.photo 'Dallas.jpg', '28795465@N03/3282536921', 'http://www.flickr.com/photos/28795465@N03/3282536921/', 'Dallas' -LocationPhoto.photo 'Vienna.jpg', 'muppetspanker', 'http://www.flickr.com/photos/muppetspanker/718665493', 'Vienna' -LocationPhoto.photo 'Colorado.jpg', 'jumpyjodes', 'http://www.flickr.com/photos/jumpyjodes/122371179', 'Colorado' +LocationPhoto.photo 'Denmark.jpg', 'jamesz_flickr/2440962462', 'http://www.flickr.com/photos/jamesz_flickr/2440962462/', 'Denmark' +LocationPhoto.photo 'Denver.jpg', 'anneh632', 'http://www.flickr.com/photos/anneh632/3832540818', 'Denver' LocationPhoto.photo 'Edinburgh.jpg', 'chris-yunker', 'http://www.flickr.com/photos/chris-yunker/2504695724', 'Edinburgh' LocationPhoto.photo 'Edinburgh.jpg', 'chris-yunker', 'http://www.flickr.com/photos/chris-yunker/2504695724', 'Scotland' -LocationPhoto.photo 'Minneapolis.jpg', 'dougtone', 'http://www.flickr.com/photos/dougtone/6188186129', 'Minnesota' -LocationPhoto.photo 'New_York.jpg', 'isherwoodchris', 'http://www.flickr.com/photos/isherwoodchris/3096255994', 'New York' -LocationPhoto.photo 'Ukraine.jpg', 'anaroz', 'http://www.flickr.com/photos/anaroz/1299717637', 'Ukraine' -LocationPhoto.photo 'Texas.jpg', 'theodorescott', 'http://www.flickr.com/photos/theodorescott/4155884901', 'Texas' -LocationPhoto.photo 'Texas.jpg', 'theodorescott', 'http://www.flickr.com/photos/theodorescott/4155884901', 'Houstan' -LocationPhoto.photo 'Norway.jpg', 'nelsonminar', 'http://www.flickr.com/photos/nelsonminar/5982537085', 'Norway' -LocationPhoto.photo 'Barcelona.jpg', '22746515@N02', 'http://www.flickr.com/photos/22746515@N02/2418242475', 'Barcelona' -LocationPhoto.photo 'Spain.jpg', 'promomadrid', 'http://www.flickr.com/photos/promomadrid/5781941734', 'Spain' -LocationPhoto.photo 'Mountain_View.jpg', 'ogachin', 'http://www.flickr.com/photos/ogachin/4940228785', 'Mountain View' -LocationPhoto.photo 'Tennessee.jpg', 'brent_nashville', 'http://www.flickr.com/photos/brent_nashville/133323377', 'Tennessee' -LocationPhoto.photo 'Palo_Alto.jpg', 'cytech', 'http://www.flickr.com/photos/cytech/4111311671', 'California' -LocationPhoto.photo 'North_Carolina.jpg', 'kamoteus', 'http://www.flickr.com/photos/kamoteus/2329402291', 'North Carolina' -LocationPhoto.photo 'Moscow.jpg', 'yourdon', 'http://www.flickr.com/photos/yourdon/2899648837', 'Moscow' -LocationPhoto.photo 'Russian_Federation.jpg', 'bbmexplorer', 'http://www.flickr.com/photos/bbmexplorer/1387630903', 'Russian Federation' -LocationPhoto.photo 'Denmark.jpg', 'jamesz_flickr/2440962462', 'http://www.flickr.com/photos/jamesz_flickr/2440962462/', 'Denmark' -LocationPhoto.photo 'Poland.jpg', 'wm_archiv', 'http://www.flickr.com/photos/wm_archiv/3360514904', 'Poland' -LocationPhoto.photo 'Chennai.jpg', 'vinothchandar', 'http://www.flickr.com/photos/vinothchandar/4215634377', 'Chennai' -LocationPhoto.photo 'Munich.jpg', 'moonsoleil', 'http://www.flickr.com/photos/moonsoleil/482606062', 'Munich' -LocationPhoto.photo 'Brazil.jpg', 'rob_sabino', 'http://www.flickr.com/photos/rob_sabino/4460055296', 'Brazil' -LocationPhoto.photo 'Chicago.jpg', 'endymion120', 'http://www.flickr.com/photos/endymion120/4800209439', 'Illinois' -LocationPhoto.photo 'Chicago.jpg', 'dgriebeling', 'http://www.flickr.com/photos/dgriebeling/3858526828', 'Chicago' -LocationPhoto.photo 'Cape_Town.jpg', 'nolandstooforeign', 'http://www.flickr.com/photos/nolandstooforeign/5512625043', 'Cape Town' -LocationPhoto.photo 'Canada.jpg', '62904109@N00', 'http://www.flickr.com/photos/62904109@N00/257831124', 'Canada' -LocationPhoto.photo 'Cologne.jpg', '11742539@N03', 'http://www.flickr.com/photos/11742539@N03/3849238477', 'Cologne' -LocationPhoto.photo 'Belgium.jpg', 'erasmushogeschool', 'http://www.flickr.com/photos/erasmushogeschool/3179361408', 'Belgium' -LocationPhoto.photo 'Wisconsin.jpg', 'midnightcomm', 'http://www.flickr.com/photos/midnightcomm/2708323382', 'Wisconsin' -LocationPhoto.photo 'Switzerland.jpg', 'jeffwilcox', 'http://www.flickr.com/photos/jeffwilcox/121769869', 'Switzerland' +LocationPhoto.photo 'Finland.jpg', 'seisdeagosto', 'http://www.flickr.com/photos/seisdeagosto/4308508577', 'Finland' +LocationPhoto.photo 'Flordia.jpg', 'alan-light', 'http://www.flickr.com/photos/alan-light/4316330444', 'Florida' +LocationPhoto.photo 'France.jpg', 'cheindel', 'http://www.flickr.com/photos/cheindel/3270957323/', 'France' +LocationPhoto.photo 'Georgia.jpg', 'jongos', 'http://www.flickr.com/photos/jongos/326337675', 'Georgia' LocationPhoto.photo 'Germany.jpg', '27752998@N04', 'http://www.flickr.com/photos/27752998@N04/3018494595', 'Germany' -LocationPhoto.photo 'Tokyo.jpg', 'manuuuuuu', 'http://www.flickr.com/photos/manuuuuuu/6136157876', 'Tokyo' -LocationPhoto.photo 'Japan.jpg', 'jseita', 'http://www.flickr.com/photos/jseita/5499535860', 'Japan' -LocationPhoto.photo 'Taiwan.jpg', 'http2007', 'http://www.flickr.com/photos/http2007/524982681', 'Taiwan' -LocationPhoto.photo 'Alaska.jpg', '24736216@N07', 'http://www.flickr.com/photos/24736216@N07/3840895221', 'Alaska' -LocationPhoto.photo 'Portugal.jpg', 'hom26', 'http://www.flickr.com/photos/hom26/6647457947', 'Portugal' -LocationPhoto.photo 'United_Kingdom.jpg', 'anniemole', 'http://www.flickr.com/photos/anniemole/2758348852', 'United Kingdom' -LocationPhoto.photo 'London.jpg', 'flamesworddragon', 'http://www.flickr.com/photos/flamesworddragon/5030767739', 'London' +LocationPhoto.photo 'Hamburg.jpg', 'lhoon', 'http://www.flickr.com/photos/lhoon/1330132713', 'Hamburg' LocationPhoto.photo 'Hungry.jpg', 'fatguyinalittlecoat', 'http://www.flickr.com/photos/fatguyinalittlecoat/4027128545', 'Hungary' -LocationPhoto.photo 'Massachusetts.jpg', '91829349@N00', 'http://www.flickr.com/photos/91829349@N00/2953131136', 'Massachusetts' -LocationPhoto.photo 'Kentucky.jpg', 'dougtone', 'http://www.flickr.com/photos/dougtone/4111366477', 'Kentucky' -LocationPhoto.photo 'Chile.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/4282194530', 'Chile' +LocationPhoto.photo 'India.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/322071722', 'India' LocationPhoto.photo 'Indiana.jpg', 'netmonkey', 'http://www.flickr.com/photos/netmonkey/47901838', 'Indiana' -LocationPhoto.photo 'Flordia.jpg', 'alan-light', 'http://www.flickr.com/photos/alan-light/4316330444', 'Florida' -LocationPhoto.photo 'Arizona.jpg', 'combusean', 'http://www.flickr.com/photos/combusean/2568503883', 'Arizona' -LocationPhoto.photo 'Ohio.jpg', 'theclevelandkid24', 'http://www.flickr.com/photos/theclevelandkid24/3956087366', 'Ohio' -LocationPhoto.photo 'Missouri.jpg', 'orijinal', 'http://www.flickr.com/photos/orijinal/3985603991', 'Missouri' -LocationPhoto.photo 'Michigan.jpg', 'patriciadrury/3381026294', 'http://www.flickr.com/photos/patriciadrury/3381026294/', 'Michigan' -LocationPhoto.photo 'Milian.jpg', 'ikkoskinen', 'http://www.flickr.com/photos/ikkoskinen/5883454794', 'Milan' -LocationPhoto.photo 'Rome.jpg', 'z_wenjie', 'http://www.flickr.com/photos/z_wenjie/5644842473', 'Italy' -LocationPhoto.photo 'Rome.jpg', 'z_wenjie', 'http://www.flickr.com/photos/z_wenjie/5644842473', 'Rome' +LocationPhoto.photo 'Japan.jpg', 'jseita', 'http://www.flickr.com/photos/jseita/5499535860', 'Japan' +LocationPhoto.photo 'Kentucky.jpg', 'dougtone', 'http://www.flickr.com/photos/dougtone/4111366477', 'Kentucky' +LocationPhoto.photo 'London.jpg', 'flamesworddragon', 'http://www.flickr.com/photos/flamesworddragon/5030767739', 'London' +LocationPhoto.photo 'Los_Angeles.jpg', 'danielaltamirano', 'http://www.flickr.com/photos/danielaltamirano/2763173103', 'Los Angeles' +LocationPhoto.photo 'Louisiana.jpg', 'cavemanlawyer15', 'http://www.flickr.com/photos/cavemanlawyer15/29345340', 'Louisiana' +LocationPhoto.photo 'Louisiana.jpg', 'moralesphoto', 'http://www.flickr.com/photos/moralesphoto/411678050', 'Louisiana' LocationPhoto.photo 'Maryland.jpg', 'davies', 'http://www.flickr.com/photos/davies/5047932', 'Maryland' -LocationPhoto.photo 'India.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/322071722', 'India' +LocationPhoto.photo 'Massachusetts.jpg', '91829349@N00', 'http://www.flickr.com/photos/91829349@N00/2953131136', 'Massachusetts' +LocationPhoto.photo 'Melbourne.jpg', 'rykneethling', 'http://www.flickr.com/photos/rykneethling/4616216715', 'Melbourne' LocationPhoto.photo 'Mexico.jpg', '22240293@N05', 'http://www.flickr.com/photos/22240293@N05/4526847801', 'Mexico' LocationPhoto.photo 'Mexico_City.jpg', 'jorgebrazil', 'http://www.flickr.com/photos/jorgebrazil/6644379931', 'Mexico City' -LocationPhoto.photo 'New_Jersey.jpg', 'r0sss', 'http://www.flickr.com/photos/r0sss/899920125', 'New Jersey' +LocationPhoto.photo 'Michigan.jpg', 'patriciadrury/3381026294', 'http://www.flickr.com/photos/patriciadrury/3381026294/', 'Michigan' +LocationPhoto.photo 'Milian.jpg', 'ikkoskinen', 'http://www.flickr.com/photos/ikkoskinen/5883454794', 'Milan' +LocationPhoto.photo 'Minneapolis.jpg', 'dougtone', 'http://www.flickr.com/photos/dougtone/6188186129', 'Minnesota' +LocationPhoto.photo 'Missouri.jpg', 'orijinal', 'http://www.flickr.com/photos/orijinal/3985603991', 'Missouri' +LocationPhoto.photo 'Montreal.jpg', 'sergemelki', 'http://www.flickr.com/photos/sergemelki/2613093643', 'Montreal' +LocationPhoto.photo 'Moscow.jpg', 'yourdon', 'http://www.flickr.com/photos/yourdon/2899648837', 'Moscow' +LocationPhoto.photo 'Mountain_View.jpg', 'ogachin', 'http://www.flickr.com/photos/ogachin/4940228785', 'Mountain View' +LocationPhoto.photo 'Munich.jpg', 'moonsoleil', 'http://www.flickr.com/photos/moonsoleil/482606062', 'Munich' LocationPhoto.photo 'New_Jersey.jpg', 'hobokencondos', 'http://www.flickr.com/photos/hobokencondos/6461676753', 'New Jersey' -LocationPhoto.photo 'Connecticut.jpg', 'global-jet', 'http://www.flickr.com/photos/global-jet/2051525208', 'Connecticut' -LocationPhoto.photo 'Alabama.jpg', 'acnatta', 'http://www.flickr.com/photos/acnatta/264575595', 'Alabama' -LocationPhoto.photo 'Finland.jpg', 'seisdeagosto', 'http://www.flickr.com/photos/seisdeagosto/4308508577', 'Finland' -LocationPhoto.photo 'Auckland.jpg', 'jasonpratt', 'http://www.flickr.com/photos/jasonpratt/5355889516', 'Auckland' +LocationPhoto.photo 'New_Jersey.jpg', 'r0sss', 'http://www.flickr.com/photos/r0sss/899920125', 'New Jersey' +LocationPhoto.photo 'New_York.jpg', 'isherwoodchris', 'http://www.flickr.com/photos/isherwoodchris/3096255994', 'New York' LocationPhoto.photo 'New_Zealand.jpg', 'glutnix/6063846', 'http://www.flickr.com/photos/glutnix/6063846/', 'New Zealand' -LocationPhoto.photo 'Australia.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/396072534', 'Australia' -LocationPhoto.photo 'Louisiana.jpg', 'moralesphoto', 'http://www.flickr.com/photos/moralesphoto/411678050', 'Louisiana' -LocationPhoto.photo 'Louisiana.jpg', 'cavemanlawyer15', 'http://www.flickr.com/photos/cavemanlawyer15/29345340', 'Louisiana' -LocationPhoto.photo 'Austria.jpg', 'roblisameehan', 'http://www.flickr.com/photos/roblisameehan/875194614', 'Austria' \ No newline at end of file +LocationPhoto.photo 'North_Carolina.jpg', 'kamoteus', 'http://www.flickr.com/photos/kamoteus/2329402291', 'North Carolina' +LocationPhoto.photo 'Norway.jpg', 'nelsonminar', 'http://www.flickr.com/photos/nelsonminar/5982537085', 'Norway' +LocationPhoto.photo 'Ohio.jpg', 'theclevelandkid24', 'http://www.flickr.com/photos/theclevelandkid24/3956087366', 'Ohio' +LocationPhoto.photo 'Palo_Alto.jpg', 'cytech', 'http://www.flickr.com/photos/cytech/4111311671', 'California' +LocationPhoto.photo 'Paris.jpg', '26700188@N05', 'http://www.flickr.com/photos/26700188@N05/4451676248/', 'Paris' +LocationPhoto.photo 'Philadelphia.jpg', 'garyisajoke', 'http://www.flickr.com/photos/garyisajoke/5565916600', 'Philadelphia' +LocationPhoto.photo 'Pittsburgh.jpg', 'dougtone', 'http://www.flickr.com/photos/dougtone/4189402481', 'Pittsburgh' +LocationPhoto.photo 'Poland.jpg', 'wm_archiv', 'http://www.flickr.com/photos/wm_archiv/3360514904', 'Poland' +LocationPhoto.photo 'Portland.jpg', 'congaman', 'http://www.flickr.com/photos/congaman/4358234584', 'Oregon' +LocationPhoto.photo 'Portland.jpg', 'congaman', 'http://www.flickr.com/photos/congaman/4358234584', 'Portland' +LocationPhoto.photo 'Portugal.jpg', 'hom26', 'http://www.flickr.com/photos/hom26/6647457947', 'Portugal' +LocationPhoto.photo 'Rio_de_Janeiro.jpg', 'hectorgarcia', 'http://www.flickr.com/photos/hectorgarcia/6658699023', 'Rio de Janeiro' +LocationPhoto.photo 'Rome.jpg', 'z_wenjie', 'http://www.flickr.com/photos/z_wenjie/5644842473', 'Italy' +LocationPhoto.photo 'Rome.jpg', 'z_wenjie', 'http://www.flickr.com/photos/z_wenjie/5644842473', 'Rome' +LocationPhoto.photo 'Russian_Federation.jpg', 'bbmexplorer', 'http://www.flickr.com/photos/bbmexplorer/1387630903', 'Russian Federation' +LocationPhoto.photo 'San_Diego.jpg', 'chris_radcliff', 'http://www.flickr.com/photos/chris_radcliff/4488396247', 'San Diego' +LocationPhoto.photo 'San_Francisco.jpg', 'salim', 'http://www.flickr.com/photos/salim/402618628', 'San Francisco' +LocationPhoto.photo 'Sao_Paulo.jpg', 'thomashobbs', 'http://www.flickr.com/photos/thomashobbs/96794488', 'Sao Paulo' +LocationPhoto.photo 'Seattle.jpg', 'acradenia', 'http://www.flickr.com/photos/acradenia/5858166551/', 'Seattle' +LocationPhoto.photo 'Spain.jpg', 'promomadrid', 'http://www.flickr.com/photos/promomadrid/5781941734', 'Spain' +LocationPhoto.photo 'Sweden.jpg', 'mispahn', 'http://www.flickr.com/photos/mispahn/2750008975', 'Kingdom of Sweden' +LocationPhoto.photo 'Sweden.jpg', 'mispahn', 'http://www.flickr.com/photos/mispahn/2750008975', 'Sweden' +LocationPhoto.photo 'Switzerland.jpg', 'jeffwilcox', 'http://www.flickr.com/photos/jeffwilcox/121769869', 'Switzerland' +LocationPhoto.photo 'Sydney.jpg', 'robertpaulyoung', 'http://www.flickr.com/photos/robertpaulyoung/2677399791', 'Sydney' +LocationPhoto.photo 'Taiwan.jpg', 'http2007', 'http://www.flickr.com/photos/http2007/524982681', 'Taiwan' +LocationPhoto.photo 'Tennessee.jpg', 'brent_nashville', 'http://www.flickr.com/photos/brent_nashville/133323377', 'Tennessee' +LocationPhoto.photo 'Texas.jpg', 'theodorescott', 'http://www.flickr.com/photos/theodorescott/4155884901', 'Houstan' +LocationPhoto.photo 'Texas.jpg', 'theodorescott', 'http://www.flickr.com/photos/theodorescott/4155884901', 'Texas' +LocationPhoto.photo 'Tokyo.jpg', 'manuuuuuu', 'http://www.flickr.com/photos/manuuuuuu/6136157876', 'Tokyo' +LocationPhoto.photo 'Toronto.jpg', 'davidcjones', 'http://www.flickr.com/photos/davidcjones/4222408288', 'Toronto' +LocationPhoto.photo 'Ukraine.jpg', 'anaroz', 'http://www.flickr.com/photos/anaroz/1299717637', 'Ukraine' +LocationPhoto.photo 'United_Kingdom.jpg', 'anniemole', 'http://www.flickr.com/photos/anniemole/2758348852', 'United Kingdom' +LocationPhoto.photo 'Vancouver.jpg', 'poudyal', 'http://www.flickr.com/photos/poudyal/30924248', 'Vancouver' +LocationPhoto.photo 'Vienna.jpg', 'muppetspanker', 'http://www.flickr.com/photos/muppetspanker/718665493', 'Vienna' +LocationPhoto.photo 'Washington_D_C_.jpg', '24736216@N07', 'http://www.flickr.com/photos/24736216@N07/4412624398', 'District of Columbia' +LocationPhoto.photo 'Wisconsin.jpg', 'midnightcomm', 'http://www.flickr.com/photos/midnightcomm/2708323382', 'Wisconsin' diff --git a/app/models/percentile.rb b/app/structs/percentile.rb similarity index 100% rename from app/models/percentile.rb rename to app/structs/percentile.rb diff --git a/app/models/priority.rb b/app/structs/priority.rb similarity index 100% rename from app/models/priority.rb rename to app/structs/priority.rb diff --git a/app/structs/search.rb b/app/structs/search.rb new file mode 100644 index 00000000..ea552588 --- /dev/null +++ b/app/structs/search.rb @@ -0,0 +1,151 @@ +module SearchModule + module ClassMethods + def rebuild_index(name = nil) + raise 'Unable to rebuild search index in production because it is disabled by Bonsai' if Rails.env.staging? || Rails.env.production? + klass = self + Tire.index name || self.index_name || self.class.name do + delete + create + klass.find_in_batches { |batch| import batch } + end + end + end + + def self.included(base) + base.extend(ClassMethods) + end + + class Search + def initialize(context, query=nil, scope=nil, sort=nil, facet=nil, options={}) + @context = context + @query = query + @scope = scope + @sort = sort + @facet = facet + @options = failover_strategy.merge(options || {}) + end + + def execute + query_criteria, filter_criteria, sort_criteria, facets, context = [@query, @scope, @sort, @facet, @context] + + @context.tire.search(@options) do + query do + signature = query_criteria.to_tire + method = signature.shift + self.send(method, *signature) + end unless query_criteria.nil? || query_criteria.to_tire.blank? + + filter_criteria.to_tire.each do |fltr| + filter *fltr + end unless filter_criteria.nil? + + sort do + sort_criteria.to_tire.each do |k| + by k + end + end unless sort_criteria.nil? + + # Eval ? Really ? + eval(facets.to_tire) unless facets.nil? + + end + rescue Tire::Search::SearchRequestFailed, Errno::ECONNREFUSED + if @options[:failover].nil? + raise + else + @options[:failover].limit(@options[:per_page] || 18).offset(((@options[:page] || 1)-1) * (@options[:per_page] || 19)) + end + end + + def sort_criteria + @sort + end + + def failover_strategy + { failover: @context.order('created_at DESC') } + end + + class Scope + def initialize(domain, object) + @domain = domain + @object = object + @filter = to_hash + end + + def to_tire + @filter + end + + def to_hash + {} + end + + def <<(other) + @filter.deep_merge(other.to_tire) + self + end + end + + class Sort + def initialize(fields, direction = 'desc') + @fields = fields.is_a?(Array) ? fields.map(&:to_s) : [fields.to_s] + @direction = direction + end + + def to_tire + @fields.map do |field| + {field => {order: @direction}} + end + end + + alias_method :to_s, :to_tire + end + + class Query + def default_query; + ''; + end + + def initialize(query_string, default_operator = 'AND', default_query_string = default_query) + @query_string = default_query_string + ' ' + query_string + @default_operator = default_operator + end + + def to_tire + [:string, "#{@query_string}", {default_operator: "#{@default_operator}"}] unless @query_string.blank? + end + end + + class Facet + def initialize(name, type, field, options) + @name = name + @type = type + @field = field + @global = options.delete(:global) || false + @options = options + @facet = to_eval_form + end + + def to_eval_form + "facet '#{@name}', :global => #{@global} do \n"\ + "#{@type} :#{@field} #{evaluatable_options} \n"\ + "end" + end + + def to_tire + @facet + end + + def <<(other_facet) + @facet << "\n" << other_facet.to_eval_form + self + end + + private + + def evaluatable_options + ', ' + @options.join(', ') unless @options.blank? + end + end + end +end diff --git a/lib/search_results_wrapper.rb b/app/structs/search_results_wrapper.rb similarity index 90% rename from lib/search_results_wrapper.rb rename to app/structs/search_results_wrapper.rb index 0e201622..b5bfcd80 100644 --- a/lib/search_results_wrapper.rb +++ b/app/structs/search_results_wrapper.rb @@ -30,4 +30,5 @@ def total end alias_method :count, :total + alias_method :failure?, :errored? end \ No newline at end of file diff --git a/app/models/slideshare.rb b/app/structs/slideshare.rb similarity index 93% rename from app/models/slideshare.rb rename to app/structs/slideshare.rb index 074a3327..c0f11007 100644 --- a/app/models/slideshare.rb +++ b/app/structs/slideshare.rb @@ -25,7 +25,6 @@ def facts end end.compact rescue RestClient::ResourceNotFound - Rails.logger.error("Was unable to find slideshare data for #{username}") [] end end diff --git a/app/models/speakerdeck.rb b/app/structs/speakerdeck.rb similarity index 91% rename from app/models/speakerdeck.rb rename to app/structs/speakerdeck.rb index 00a82c23..c2af1103 100644 --- a/app/models/speakerdeck.rb +++ b/app/structs/speakerdeck.rb @@ -24,7 +24,6 @@ def facts end end.compact rescue RestClient::ResourceNotFound - Rails.logger.error("Was unable to find speakerdeck data for #{username}") [] end end \ No newline at end of file diff --git a/app/models/stat.rb b/app/structs/stat.rb similarity index 100% rename from app/models/stat.rb rename to app/structs/stat.rb diff --git a/app/structs/usage.rb b/app/structs/usage.rb new file mode 100644 index 00000000..26f85551 --- /dev/null +++ b/app/structs/usage.rb @@ -0,0 +1,20 @@ +class Usage + class << self + def page_view(user_id) + Redis.current.zadd(dated_key('view'), 1, user_id) + end + + def unique_visitors_on(date = Date.today) + Redis.current.zcount(dated_key('view', date), 1, 1000000) + end + + def top_ten_users_today + ids = Redis.current.zrevrange(dated_key('view'), 0, 10, withscores: true) + User.where(id: ids).all + end + + def dated_key(keyname, date = Date.today) + "#{keyname}:#{date.strftime('%Y-%m-%d')}" + end + end +end \ No newline at end of file diff --git a/app/uploaders/avatar_uploader.rb b/app/uploaders/avatar_uploader.rb index 46f4a13c..3ab75be8 100644 --- a/app/uploaders/avatar_uploader.rb +++ b/app/uploaders/avatar_uploader.rb @@ -2,11 +2,9 @@ class AvatarUploader < CoderwallUploader process resize_and_pad: [100, 100] - def extension_white_list - %w(jpg jpeg gif png) - end - + #TODO migrate each model to it own uploader def default_url - asset_path "team-avatar.png" + model_name = model.class.name.downcase + ActionController::Base.helpers.asset_path "#{model_name}-avatar.png" end end diff --git a/app/uploaders/banner_uploader.rb b/app/uploaders/banner_uploader.rb index 03ebdeb2..7295f435 100644 --- a/app/uploaders/banner_uploader.rb +++ b/app/uploaders/banner_uploader.rb @@ -1,20 +1,14 @@ +require 'fileutils' class BannerUploader < CoderwallUploader - - #process :apply_tilt_shift - # process :resize_to_fill => [500, 375] - #process :resize_to_fit => [500, 375] - - def extension_white_list - %w(jpg jpeg gif png) - end - def apply_tilt_shift directory = File.dirname(current_path) tmpfile = File.join(directory, "tmpfile") - #record_event('uploading bg image') - #Resque.enqueue(ProcessImage, :background_image, ) - File.send(:move, current_path, tmpfile) + FileUtils.mv(current_path, tmpfile) system "convert #{tmpfile} -sigmoidal-contrast 7x50% \\( +clone -sparse-color Barycentric '0,0 black 0,%h white' -function polynomial 4.5,-4.5,1 \\) -compose Blur -set option:compose:args 15 -composite #{current_path}" File.delete(tmpfile) end -end \ No newline at end of file + + def default_url + model.avatar.url + end +end diff --git a/app/uploaders/coderwall_uploader.rb b/app/uploaders/coderwall_uploader.rb index 107472c6..84d6ec94 100644 --- a/app/uploaders/coderwall_uploader.rb +++ b/app/uploaders/coderwall_uploader.rb @@ -1,15 +1,12 @@ class CoderwallUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick - include Sprockets::Helpers::RailsHelper - include Sprockets::Helpers::IsolatedHelper include ::CarrierWave::Backgrounder::Delay - def store_dir - if Rails.env.development? || Rails.env.test? - "development/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" - else - "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" - end + def extension_white_list + %w(jpg jpeg gif png) end -end \ No newline at end of file + def store_dir + "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" + end +end diff --git a/app/uploaders/picture_uploader.rb b/app/uploaders/picture_uploader.rb index 5506ec40..cdc156d3 100644 --- a/app/uploaders/picture_uploader.rb +++ b/app/uploaders/picture_uploader.rb @@ -1,9 +1,5 @@ class PictureUploader < CoderwallUploader - def extension_white_list - %w(jpg jpeg gif png) - end - process :auto_orient def auto_orient diff --git a/app/uploaders/resume_uploader.rb b/app/uploaders/resume_uploader.rb index f0247d39..47ff1523 100644 --- a/app/uploaders/resume_uploader.rb +++ b/app/uploaders/resume_uploader.rb @@ -1,2 +1,7 @@ class ResumeUploader < CoderwallUploader + + def extension_white_list + %w(pdf doc docx odt txt jpg jpeg png) + end + end diff --git a/app/uploaders/team_uploader.rb b/app/uploaders/team_uploader.rb new file mode 100644 index 00000000..bc73aa8e --- /dev/null +++ b/app/uploaders/team_uploader.rb @@ -0,0 +1,12 @@ +class TeamUploader < CoderwallUploader + + process resize_and_pad: [100, 100] + + def store_dir + "uploads/team/avatar/#{model.mongo_id || model.id}" + end + + def default_url + ActionController::Base.helpers.asset_path 'team-avatar.png' + end +end diff --git a/app/validators/email_validator.rb b/app/validators/email_validator.rb new file mode 100644 index 00000000..bd232c51 --- /dev/null +++ b/app/validators/email_validator.rb @@ -0,0 +1,7 @@ +class EmailValidator < ActiveModel::EachValidator + def validate_each(record, attribute, value) + unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i + record.errors[attribute] << (options[:message] || 'is not a valid e-mail address') + end + end +end \ No newline at end of file diff --git a/app/validators/uri_validator.rb b/app/validators/uri_validator.rb new file mode 100644 index 00000000..e71e7be1 --- /dev/null +++ b/app/validators/uri_validator.rb @@ -0,0 +1,23 @@ +#TODO Find where this validator is used +class UriValidator < ActiveModel::EachValidator + def validate_each(object, attribute, value) + raise(ArgumentError, "A regular expression must be supplied as the :format option of the options hash") unless options[:format].nil? or options[:format].is_a?(Regexp) + configuration = {message: "is invalid or not responding", format: URI::regexp(%w(http https))} + configuration.update(options) + + if value =~ (configuration[:format]) + begin # check header response + case Net::HTTP.get_response(URI.parse(value)) + when Net::HTTPSuccess, Net::HTTPRedirection then + true + else + object.errors.add(attribute, configuration[:message]) and false + end + rescue # Recover on DNS failures.. + object.errors.add(attribute, configuration[:message]) and false + end + else + object.errors.add(attribute, configuration[:message]) and false + end + end +end diff --git a/app/views/abuse/report_inappropriate.text.erb b/app/views/abuse/report_inappropriate.text.erb deleted file mode 100644 index a95d3491..00000000 --- a/app/views/abuse/report_inappropriate.text.erb +++ /dev/null @@ -1,29 +0,0 @@ -Spam Report for Protip -====================== - -"<%= @protip.title %>" (<%= @protip.id %>) -by "<%= @protip.user.name %>" <<%= @protip.user.email %>> (<%= @protip.user.id %>) -<%= protip_url @protip %> - -<% if @reporting_user %> - Reported by: "<%= @reporting_user.name %>" <<%= @reporting_user.email %>> (<%= @reporting_user.id %>) - <%= user_url @reporting_user %> -<% else %> - Reported by: Anonymous User -<% end %> - -Reported from IP: <%= @ip_address %> - -MORE INFO... - -@protip -------- -<%= @protip.inspect.html_safe %> - -@protip.user ------------- -<%= @protip.user.inspect.html_safe %> - -@reporting_user ---------------- -<%= @reporting_user.inspect.html_safe %> diff --git a/app/views/abuse_mailer/report_inappropriate.html.slim b/app/views/abuse_mailer/report_inappropriate.html.slim new file mode 100644 index 00000000..0a1bb1c5 --- /dev/null +++ b/app/views/abuse_mailer/report_inappropriate.html.slim @@ -0,0 +1,19 @@ +header + h1 Spam Report for Protip +hr + +section + h3 = "#{@protip.title}" + = link_to(@protip.id, protip_url(@protip)) + + div ="by #{@protip.user.name}" + + - if @reporting_user + div + | Reported by: + = link_to(@reporting_user.name, user_url(@reporting_user)) + - else + div Reported by: Anonymous User + +footer + h5 ="Reported from IP: #{@ip_address}" diff --git a/app/views/accounts/new.html.haml b/app/views/accounts/new.html.haml index 024d9070..9b8d8a2f 100644 --- a/app/views/accounts/new.html.haml +++ b/app/views/accounts/new.html.haml @@ -3,7 +3,7 @@ =tag :meta, :name => "stripe-key", :content => STRIPE_PUBLIC_KEY -content_for :javascript do - =javascript_include_tag "https://js.stripe.com/v1/", "application" + =javascript_include_tag "https://js.stripe.com/v1/", "coderwall" =javascript_include_tag 'accounts' .main-content diff --git a/app/views/achievements/show.html.haml b/app/views/achievements/show.html.haml index b398b5c3..cc686440 100644 --- a/app/views/achievements/show.html.haml +++ b/app/views/achievements/show.html.haml @@ -36,5 +36,5 @@ =link_to "See #{@user.display_name}'s other achievements", badge_path(:username => @user.username), :class => 'seeprofile track', 'data-action' => 'view user achievements', 'data-from' => 'achievement', 'data-properties' => {'achievement' => @badge.display_name}.to_json .clear .clear.center - #getyourachievements=link_to 'See Your Achievements', signup_path, :class => 'clickme track','data-action' => 'view own achievements', 'data-from' => 'achievement', 'data-properties' => {'achievement' => @badge.display_name}.to_json + #getyourachievements=link_to 'See Your Achievements', root_path, :class => 'clickme track','data-action' => 'view own achievements', 'data-from' => 'achievement', 'data-properties' => {'achievement' => @badge.display_name}.to_json .see-all=link_to("View #{@user.display_name}'s profile", badge_path(:username => @user.username), 'data-action' => 'view user profile', 'data-from' => 'achievement', 'data-properties' => {'achievement' => @badge.display_name}.to_json) diff --git a/app/views/admin/_signups.html.erb b/app/views/admin/_signups.html.erb deleted file mode 100644 index dbaa2d14..00000000 --- a/app/views/admin/_signups.html.erb +++ /dev/null @@ -1,78 +0,0 @@ -<script type="text/javascript" src="https://www.google.com/jsapi"></script> -<script type="text/javascript"> - google.load("visualization", "1", {packages: ["corechart"]}); - google.setOnLoadCallback(drawChart1); - google.setOnLoadCallback(drawChart2); - google.setOnLoadCallback(drawChart3); - google.setOnLoadCallback(drawChart4); - function drawChart1() { - var data = new google.visualization.DataTable(); - data.addColumn('string', 'Year'); - data.addColumn('number', 'New Signups'); - data.addRows([ - <%= User.signups_by_day.collect{|signup| "['#{signup.first}', #{signup.last}]"}.join(',') %> - ]); - - var chart = new google.visualization.AreaChart(document.getElementById('signups_by_day')); - chart.draw(data, {width: 250, height: 400, title: 'Signups by Day', - hAxis: {title: 'Day', titleTextStyle: {color: '#FF0000'}} - }); - } - - - function drawChart2() { - var data = new google.visualization.DataTable(); - data.addColumn('string', 'Hour'); - data.addColumn('number', 'New Signups'); - data.addRows([ - <%= User.signups_by_hour.collect{|signup| "['#{signup.first}', #{signup.last}]"}.join(',') %> - ]); - - var chart = new google.visualization.AreaChart(document.getElementById('signups_by_hour')); - chart.draw(data, {width: 250, height: 400, title: 'Signups by Hour', - hAxis: {title: 'Hour', titleTextStyle: {color: '#FF0000'}} - }); - } - - - function drawChart3() { - var data = new google.visualization.DataTable(); - data.addColumn('string', 'Month'); - data.addColumn('number', 'New Signups'); - data.addRows([ - <%= User.signups_by_month.collect{|signup| "['#{signup.first}', #{signup.last}]"}.join(',') %> - ]); - - var chart = new google.visualization.AreaChart(document.getElementById('signups_by_month')); - chart.draw(data, {width: 250, height: 400, title: 'Signups by Month', - hAxis: {title: 'Month', titleTextStyle: {color: '#FF0000'}} - }); - } - - // function drawChart4() { - // var data = new google.visualization.DataTable(); - // - // data.addColumn('number', 'Logins'); - // data.addColumn('number', 'Number'); - // - <%= "data.addRows(#{User.repeat_visits_by_count.size});" %> - // - // data.setValue(0, 0, 'Work'); - // data.setValue(0, 1, 11); - // data.setValue(1, 0, 'Eat'); - // data.setValue(1, 1, 2); - // data.setValue(2, 0, 'Commute'); - // data.setValue(2, 1, 2); - // data.setValue(3, 0, 'Watch TV'); - // data.setValue(3, 1, 2); - // data.setValue(4, 0, 'Sleep'); - // data.setValue(4, 1, 7); - // - // var chart = new google.visualization.PieChart(document.getElementById('repeat_vists')); - // chart.draw(data, {width: 450, height: 300, title: 'Repeat Visits'}); - // } -</script> -<div id="repeat_vists"></div> -<div id="signups_by_hour" style="float:left;"></div> -<div id="signups_by_day" style="float:left;"></div> -<div id="signups_by_month" style="float:left;"></div> diff --git a/app/views/admin/cache_stats.html.haml b/app/views/admin/cache_stats.html.haml deleted file mode 100644 index ec09d80e..00000000 --- a/app/views/admin/cache_stats.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -%h1 Cache stats -= link_to "Home", admin_root_path -%table{:style => "padding: 4px; border: 1px solid #ddd; background-color: #eee; margin-bottom: 10px;"} - - @cache_stats.each do |host, stats| - %tr - %td{:style => "vertical-align: top;"}= host - %td{:style => "vertical-align: top;"} - %table{:style => "margin-bottom: 0"} - - stats.each do |stat, value| - %tr - %td= stat - %td= value - diff --git a/app/views/admin/failed_jobs.html.haml b/app/views/admin/failed_jobs.html.haml deleted file mode 100644 index a7fffb62..00000000 --- a/app/views/admin/failed_jobs.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -%h1 Failed jobs - -%div= "Showing page #{@page} of #{@total_failed} total results." -= link_to "Home", admin_root_path -= link_to "<< Prev page", admin_failed_jobs_path(:page => @page - 1, :per_page => @per_page) -= link_to "Next page >>", admin_failed_jobs_path(:page => @page + 1, :per_page => @per_page) -- @jobs.each do |job| - %div.job{:style => "padding: 4px; border: 1px solid #ddd; background-color: #eee; margin-bottom: 10px;"} - - job.last_error.split(/\\n/).each do |error| - %div - %code= error \ No newline at end of file diff --git a/app/views/admin/index.html.haml b/app/views/admin/index.html.haml deleted file mode 100644 index a554b8eb..00000000 --- a/app/views/admin/index.html.haml +++ /dev/null @@ -1,95 +0,0 @@ -= content_for :body_id do - admin - -/ .left -/ =image_tag 'mediaWhiteBackground.png' - -.left.clear - %ul{:style => "float:right; width:100%"} - %li{:style => "float:left; padding: 10px"}=link_to 'teams', admin_teams_path - %li{:style => "float:left; padding: 10px"}=link_to 'comments', latest_comments_path - %li{:style => "float:left; padding: 10px"}=link_to 'featured', processing_queue_path(:auto_tweet) - %li{:style => "float:left; padding: 10px"}=link_to 'hackernews', processing_queue_path(:hackernews) - - - midnight = DateTime.now.in_time_zone("Pacific Time (US & Canada)").midnight - - signups_y = User.where("created_at > ? AND created_at <= ?", midnight - 1.day, midnight).count - - signups_t = User.where("created_at > ?", midnight).count - - referred_signups_y = User.where('referred_by IS NOT NULL').where("created_at > ? AND created_at <= ?", midnight - 1.day, midnight).count - - referred_signups_t = User.where('referred_by IS NOT NULL').where("created_at > ? ", midnight).count - - visited_y = User.active.where("last_request_at > ? AND last_request_at <= ?", midnight - 1.day, midnight).count - - visited_t = User.active.where("last_request_at > ?", midnight).count - - protips_created_y = Protip.where("created_at > ? AND created_at <= ?", midnight - 1.day, midnight).count - - protips_created_t = Protip.where("created_at > ?", midnight).count - - original_protips_created_y = Protip.where("created_at > ? AND created_at <= ?", midnight - 1.day, midnight).reject(&:created_automagically?).count - - original_protips_created_t = Protip.where("created_at > ?", midnight).reject(&:created_automagically?).count - - protip_upvotes_y = Like.where(:likable_type => "Protip").where("created_at > ? AND created_at <= ?", midnight - 1.day, midnight).count - - protip_upvotes_t = Like.where(:likable_type => "Protip").where("created_at > ?", midnight).count - - mau_l = User.where("last_request_at >= ? AND last_request_at < ?", 2.months.ago, 31.days.ago).count - - mau_minus_new_signups_l = User.where("last_request_at >= ? AND last_request_at < ? AND created_at < ?", 2.months.ago, 31.days.ago, 2.months.ago).count - - mau_t = User.where("last_request_at >= ?", 31.days.ago).count - - mau_minus_new_signups_t = User.where("last_request_at >= ? AND created_at < ?", 31.days.ago, 31.days.ago).count - %table.stats - %thead - %tr - %td - %td Yesterday - %td Today - %tbody - %tr - %td Signed Up - %td= "#{signups_y} (#{(referred_signups_y*100/signups_y.to_f rescue 0).round(2)}%)" - %td{:class => admin_stat_class(signups_y, signups_t)}= "#{signups_t} (#{(referred_signups_t*100/signups_t.to_f rescue 0).round(2)}%)" - %tr - %td Visited - %td= visited_y - %td{:class => admin_stat_class(visited_y, visited_t)}= visited_t - %tr - %td Protips Created - %td= link_to "#{protips_created_y} (#{(original_protips_created_y*100/protips_created_y.to_f rescue 0).round(2)}%)", date_protips_path('yesterday') - %td{:class => admin_stat_class(protips_created_y, protips_created_t)}= link_to "#{protips_created_t} (#{(original_protips_created_t*100/protips_created_t.to_f rescue 0).round(2)}%)", date_protips_path('today') - %tr - %td Protip Upvotes - %td= protip_upvotes_y - %td{:class => admin_stat_class(protip_upvotes_y, protip_upvotes_t)}= protip_upvotes_t - %tr.heading - %td{:colspan => 3} - %tr - %td Active Users - %td{:colspan => 2}= User.active.count - %tr - %td Monthly Active Users - %td= "#{mau_l}/#{mau_minus_new_signups_l}" - %td - %span{:class => admin_stat_class(mau_l, mau_t)}= mau_t - %span{:class => admin_stat_class(mau_minus_new_signups_l, mau_minus_new_signups_t)}=mau_minus_new_signups_t - %tr - %td Pending Users - %td{:colspan => 2}= User.pending.count - %tr - %td 31 day growth rate - %td{:colspan => 2}= User.monthly_growth - %tr - %td 7 day growth rate - %td{:colspan => 2}= User.weekly_growth - %tr - %td Redis Stats - %td{:colspan => 2}= link_to "Resque stats", "/admin/resque" - %tr - %td Cache Stats - %td{:colspan => 2}= link_to "Cache stats", admin_cache_stats_path - %tr - %td{:colspan => 2} Pro tips created in networks in past week - -Network.all.each do |network| - %tr - %td= link_to network.name, network_path(network) - %td= network.protips.where('created_at > ?', 1.week.ago).count - %tr - %td{:colspan => 2} Active users in past week - -User.most_active_by_country.first(10).each do |user_group| - %tr - %td= user_group.country - %td= user_group.count --if Rails.env.development? - .right.clear - %h4=link_to('Toggle Premium Team', url_for(:controller => 'admin', :action => :toggle_premium_team)) - .clear diff --git a/app/views/admin/section_teams.html.haml b/app/views/admin/section_teams.html.haml deleted file mode 100644 index 81c3e506..00000000 --- a/app/views/admin/section_teams.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%ul.featured-team-list.normal-view-three.cf - =render collection: @teams, partial: 'teams/team_card' unless @teams.blank? \ No newline at end of file diff --git a/app/views/admin/sections_teams.html.haml b/app/views/admin/sections_teams.html.haml deleted file mode 100644 index 81c3e506..00000000 --- a/app/views/admin/sections_teams.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%ul.featured-team-list.normal-view-three.cf - =render collection: @teams, partial: 'teams/team_card' unless @teams.blank? \ No newline at end of file diff --git a/app/views/admin/teams.html.haml b/app/views/admin/teams.html.haml deleted file mode 100644 index 9b59c21f..00000000 --- a/app/views/admin/teams.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -=content_for :body_id do - admin -%table.stats - - 12.downto(0).each do |num_sections| - %tr - %td== #{num_sections}+ sections completed - %td= link_to Team.completed_at_least(num_sections, 1, Team.count, :count).total, admin_sections_teams_path(num_sections) - - -%table.sections - - Team::SECTION_FIELDS.each do |section| - %tr - %td= section.to_s - %td= link_to Team.with_completed_section(section).count, admin_section_teams_path(section) \ No newline at end of file diff --git a/app/views/alerts/index.html.haml b/app/views/alerts/index.html.haml index 5a474a55..181351ad 100644 --- a/app/views/alerts/index.html.haml +++ b/app/views/alerts/index.html.haml @@ -1,5 +1,5 @@ - content_for :head do - = stylesheet_link_tag 'admin' + = stylesheet_link_tag 'alerts' %ul.alerts - @alerts.each do |alert| diff --git a/app/views/application/_analytics.html.erb b/app/views/application/_analytics.html.erb new file mode 100644 index 00000000..99357dec --- /dev/null +++ b/app/views/application/_analytics.html.erb @@ -0,0 +1,36 @@ +<meta name="google" value="notranslate"> + +<% if ENV['GOOGLE_SITE_VERIFICATION'] %> + <meta name="google-site-verification" content="<%= ENV['GOOGLE_SITE_VERIFICATION'] %>"> +<% end %> + +<% if ENV['GOOGLE_ANALYTICS'] %> + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', "<%= ENV['GOOGLE_ANALYTICS'] %>", 'auto'); + ga('require', 'linkid', 'linkid.js'); + ga('require', 'displayfeatures'); + ga('send', 'pageview'); + </script> +<% end %> + + +<% if ENV['ASMLYTICS'] %> + <script type="text/javascript"> + ;(function(p,l,o,w,i){if(!p[i]){p.__asml=p.__asml||[]; + p.__asml.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) + };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; + n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","https://d1uxm17u44dmmr.cloudfront.net/1.0.0/asml.js","asml")); + + asml('create', '<%= ENV['ASMLYTICS'] %>'); + <% if signed_in? %> + asml('track', '<%= current_user.email %>'); + <% else %> + asml('track'); + <% end %> + </script> +<% end %> diff --git a/app/views/application/_current_user_js.html.slim b/app/views/application/_current_user_js.html.slim new file mode 100644 index 00000000..03981e3e --- /dev/null +++ b/app/views/application/_current_user_js.html.slim @@ -0,0 +1,12 @@ +javascript: + window.current_user = "#{@current_user ? @current_user.username : "null"}"; + function show_hide_by_current_user(){ + if(window.current_user != null){ + $('.show-for-user[data-user="' + window.current_user + '"]').show(); + $('.hide-for-user[data-user="' + window.current_user + '"]').hide(); + $('.remove-for-user[data-user="' + window.current_user + '"]').remove(); + } + } + $(function(){ + show_hide_by_current_user(); + }); diff --git a/app/views/application/_fav_icons.slim b/app/views/application/_fav_icons.slim new file mode 100644 index 00000000..291c4e9a --- /dev/null +++ b/app/views/application/_fav_icons.slim @@ -0,0 +1,5 @@ +link rel = 'icon' href = image_url('favicon.png') type = 'image/x-icon' +link rel = 'icon' href = image_url('fav32x32.png') type = 'image/x-icon' sizes = '32x32' +link rel = 'icon' href = image_url('fav64x64.png') type = 'image/x-icon' sizes = '64x64' +link rel = 'icon' href = image_url('fav128x128.png') type = 'image/x-icon' sizes = '128x128' +link rel = 'shortcut icon' href = image_url('favicon.png') type = 'image/x-icon' \ No newline at end of file diff --git a/app/views/application/_footer.html.slim b/app/views/application/_footer.html.slim new file mode 100644 index 00000000..eef2b79d --- /dev/null +++ b/app/views/application/_footer.html.slim @@ -0,0 +1,28 @@ +footer#footer + .inside-footer.cf + nav#footer-nav + ul.footer-links.cf + li= link_to('Contact', contact_us_path) + li= link_to('API & Hacks', api_path) + li= link_to('FAQ', faq_path) + li= link_to('Privacy Policy', privacy_policy_path) + li= link_to('Terms of Service', tos_path) + =yield :footer_menu + + .right_part + span#tweetbtn + a.twitter-follow-button data-show-count="false" data-width="300" href="https://twitter.com/coderwall" Follow @coderwall + script src="https://platform.twitter.com/widgets.js" type="text/javascript" + span.mixpanel + a href="https://mixpanel.com/f/partner" + img alt="Real Time Web Analytics" src="https://mixpanel.com/site_media/images/partner/badge_light.png" + + .copyright + |Copyright © 2012-2015 Assembly Made, Inc. All rights reserved. + .credits + = yield :credits + + += javascript_include_tag 'coderwall' += render 'shared/mixpanel_properties' += yield :javascript diff --git a/app/views/application/_mixpanel.html.erb b/app/views/application/_mixpanel.html.erb new file mode 100644 index 00000000..dbad2b87 --- /dev/null +++ b/app/views/application/_mixpanel.html.erb @@ -0,0 +1,73 @@ +<% if ENABLE_TRACKING %> + + <!-- start Mixpanel --> + <script type="text/javascript">(function (e, b) { + if (!b.__SV) { + var a, f, i, g; + window.mixpanel = b; + a = e.createElement("script"); + a.type = "text/javascript"; + a.async = !0; + a.src = ("https:" === e.location.protocol ? "https:" : "http:") + '//cdn.mxpnl.com/libs/mixpanel-2.2.min.js'; + f = e.getElementsByTagName("script")[0]; + f.parentNode.insertBefore(a, f); + b._i = []; + b.init = function (a, e, d) { + function f(b, h) { + var a = h.split("."); + 2 == a.length && (b = b[a[0]], h = a[1]); + b[h] = function () { + b.push([h].concat(Array.prototype.slice.call(arguments, 0))) + } + } + + var c = b; + "undefined" !== typeof d ? c = b[d] = [] : d = "mixpanel"; + c.people = c.people || []; + c.toString = function (b) { + var a = "mixpanel"; + "mixpanel" !== d && (a += "." + d); + b || (a += " (stub)"); + return a + }; + c.people.toString = function () { + return c.toString(1) + ".people (stub)" + }; + i = "disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.increment".split(" "); + for (g = 0; g < i.length; g++)f(c, i[g]); + b._i.push([a, e, d]) + }; + b.__SV = 1.2 + } + })(document, window.mixpanel || []); + mixpanel.init("<%= ENV['MIXPANEL_TOKEN'] %>", { + 'track_pageview': true, + 'debug': true, + 'verbose': true + }); + </script><!-- end Mixpanel --> + + + <script type="text/javascript"> + adroll_adv_id = "KGZQACVKNRCUTCCXGWXOW7"; + adroll_pix_id = "F3IHUZYRFFHCHE7ZMGC7TX"; + /* OPTIONAL: provide email to improve user identification */ + /* adroll_email = "username@example.com"; */ + (function () { + var _onload = function(){ + if (document.readyState && !/loaded|complete/.test(document.readyState)){setTimeout(_onload, 10);return} + if (!window.__adroll_loaded){__adroll_loaded=true;setTimeout(_onload, 50);return} + var scr = document.createElement("script"); + var host = (("https:" == document.location.protocol) ? "https://s.adroll.com" : "http://a.adroll.com"); + scr.setAttribute('async', 'true'); + scr.type = "text/javascript"; + scr.src = host + "/j/roundtrip.js"; + ((document.getElementsByTagName('head') || [null])[0] || + document.getElementsByTagName('script')[0].parentNode).appendChild(scr); + }; + if (window.addEventListener) {window.addEventListener('load', _onload, false);} + else {window.attachEvent('onload', _onload)} + }()); + </script> + +<% end %> diff --git a/app/views/application/_nav_bar.slim b/app/views/application/_nav_bar.slim new file mode 100644 index 00000000..be7a981e --- /dev/null +++ b/app/views/application/_nav_bar.slim @@ -0,0 +1,24 @@ +header#masthead + .inside-masthead.cf + .mobile-panel.cf + = link_to root_path, class: 'logo' + span Coderwall + a.menu-btn + + nav#nav + ul + li = link_to(t('protips'), root_path) + - if signed_in? + li + .account-dropdown + a href="#" data-jq-dropdown="#dropdown-profile" + = image_tag current_user.avatar.url, class: 'avatar' + span.username = current_user.username + #dropdown-profile.jq-dropdown.jq-dropdown-tip + .jq-dropdown-panel + div = link_to(t('profile'), badge_path(username: current_user.username), class: mywall_nav_class) + div = link_to(t('settings'), settings_path, class: settings_nav_class) + div = link_to(t('sign_out'), sign_out_path) + - else + li = link_to(t('sign_in'), signin_path, class: signin_nav_class) + li = link_to(t('register'), signin_path, class: signup_nav_class) diff --git a/app/views/application/coderwallv2/_footer.html.slim b/app/views/application/coderwallv2/_footer.html.slim new file mode 100644 index 00000000..c4125272 --- /dev/null +++ b/app/views/application/coderwallv2/_footer.html.slim @@ -0,0 +1,26 @@ +footer.page-footer.grey.lighten-4 + .container + .row + .col.l8.s12 + ul.pagination + li.waves-effect= link_to('Contact', contact_us_path) + li.waves-effect= link_to('API & Hacks', api_path) + li.waves-effect= link_to('FAQ', faq_path) + li.waves-effect= link_to('Privacy Policy', privacy_policy_path) + li.waves-effect= link_to('Terms of Service', tos_path) + li.waves-effect= link_to('Jobs', '/jobs') + li.waves-effect.active= link_to('Employers', employers_path) + =yield :footer_menu + .col.l4.s12.right_part + span#tweetbtn + a.twitter-follow-button data-show-count="false" data-width="300" href="https://twitter.com/coderwall" Follow @coderwall + script src="https://platform.twitter.com/widgets.js" type="text/javascript" + span.mixpanel + a href="https://mixpanel.com/f/partner" + img alt="Real Time Web Analytics" src="https://mixpanel.com/site_media/images/partner/badge_light.png" + + .footer-copyright + .container + .credits + = yield :credits + .copyright Copyright © 2012-2016 Assembly Made, Inc. All rights reserved. diff --git a/app/views/application/coderwallv2/_nav_bar.html.slim b/app/views/application/coderwallv2/_nav_bar.html.slim new file mode 100644 index 00000000..43723968 --- /dev/null +++ b/app/views/application/coderwallv2/_nav_bar.html.slim @@ -0,0 +1,17 @@ + +header#masthead + nav.grey.darken-4 role="navigation" + + .nav-wrapper.container + + = link_to root_path, class: 'brand-logo logo' + span Coderwall + + a.button-collapse data-activates="nav-mobile" href="#" + i.material-icons menu + + ul.right.hide-on-med-and-down + =render 'application/coderwallv2/nav_bar_menu', dropdown: 'dropdown1' + + ul#nav-mobile.side-nav + =render 'application/coderwallv2/nav_bar_menu', dropdown: 'dropdown2' diff --git a/app/views/application/coderwallv2/_nav_bar_menu.html.slim b/app/views/application/coderwallv2/_nav_bar_menu.html.slim new file mode 100644 index 00000000..9d710703 --- /dev/null +++ b/app/views/application/coderwallv2/_nav_bar_menu.html.slim @@ -0,0 +1,17 @@ +li = link_to(t('protips'), root_path) +li = link_to(t('awesome_jobs'), jobs_path, class: jobs_nav_class) +- if signed_in? + li + a.dropdown-button data-activates="#{dropdown}" href="#!" + i.material-icons.left + = image_tag current_user.avatar.url, class: 'avatar' + = current_user.username + i.material-icons.right + ul.dropdown-content id="#{dropdown}" + li = link_to(t('profile'), badge_path(username: current_user.username), class: mywall_nav_class) + li= link_to(t('settings'), settings_path, class: settings_nav_class) + li.divider + li= link_to(t('sign_out'), sign_out_path) +- else + li = link_to(t('sign_in'), signin_path, class: signin_nav_class) + li = link_to(t('register'), signin_path, class: signup_nav_class) \ No newline at end of file diff --git a/app/views/badges/_endorse.html.haml b/app/views/badges/_endorse.html.haml index 773bf9bc..02fdb832 100644 --- a/app/views/badges/_endorse.html.haml +++ b/app/views/badges/_endorse.html.haml @@ -42,7 +42,7 @@ -if !signed_in? .message You must be signed in to make endorsements. .join - =link_to("or join coderwall", signup_path, :class => 'track', 'data-category' => 'click', 'data-action' => 'endorsement sign up') + =link_to("or join coderwall", root_path, :class => 'track', 'data-category' => 'click', 'data-action' => 'endorsement sign up') %ul %li %a.button{:href => link_github_path} diff --git a/app/views/blog_posts/_blog_post.html.haml b/app/views/blog_posts/_blog_post.html.haml deleted file mode 100644 index 83c75e5a..00000000 --- a/app/views/blog_posts/_blog_post.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -%article.blog-post - %h1.post-title - %a{:href => blog_post_path(blog_post.id)} - = blog_post.title - %section.post-details - = image_tag "icon.png", :width => 15, :style => "vertical-align: middle" - %a.badge-link{:href => badge_path(blog_post.author)}= blog_post.author - on - %span= blog_post.posted.to_s(:long) - %a{:href => blog_post_path(blog_post.id) + "#disqus_thread", :'data-disqus-identifier' => blog_post.id} - %section.post-content - = blog_post.html - %div#disqus_thread - %noscript - Please enable JavaScript to view the - %a{:href => "https://disqus.com/?ref_noscript"} comments powered by Disqus. - - if @comments - %a.dsq-brlink{:href => "https://disqus.com"} - blog comments powered by - %span.logo-disqus Disqus diff --git a/app/views/blog_posts/_disqus_comment_count.html.erb b/app/views/blog_posts/_disqus_comment_count.html.erb deleted file mode 100644 index a2d0b605..00000000 --- a/app/views/blog_posts/_disqus_comment_count.html.erb +++ /dev/null @@ -1,13 +0,0 @@ -<script type="text/javascript"> - /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ - var disqus_shortname = 'coderwall'; // required: replace example with your forum shortname - - /* * * DON'T EDIT BELOW THIS LINE * * */ - (function () { - var s = document.createElement('script'); - s.async = true; - s.type = 'text/javascript'; - s.src = 'https://' + disqus_shortname + '.disqus.com/count.js'; - (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); - }()); -</script> \ No newline at end of file diff --git a/app/views/blog_posts/_disqus_comment_thread.html.erb b/app/views/blog_posts/_disqus_comment_thread.html.erb deleted file mode 100644 index 93690744..00000000 --- a/app/views/blog_posts/_disqus_comment_thread.html.erb +++ /dev/null @@ -1,16 +0,0 @@ -<script type="text/javascript"> - /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ - var disqus_shortname = 'coderwall', - disqus_identifier = '<%= blog_post.id %>', - <% if Rails.env.development? %>disqus_developer = true, <% end %> - disqus_url = '<%= blog_post_path(blog_post.id) %>'; - - /* * * DON'T EDIT BELOW THIS LINE * * */ - (function () { - var dsq = document.createElement('script'); - dsq.type = 'text/javascript'; - dsq.async = true; - dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); - })(); -</script> \ No newline at end of file diff --git a/app/views/blog_posts/index.atom.erb b/app/views/blog_posts/index.atom.erb deleted file mode 100644 index 071da785..00000000 --- a/app/views/blog_posts/index.atom.erb +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom"> - <id>tag:coderwall.com,<%= Date.today.year %>:/articles</id> - <link rel="alternate" type="text/html" href="<%= blog_path %>"/> - <link rel="self" type="application/atom+xml" href="<%= atom_path %>"/> - <title>Official Coderwall Blog</title> - <subtitle type="html">Establish your geek cred.</subtitle> - <updated><%= @blog_posts.first.posted.to_s(:xmlschema) %></updated> - - <% @blog_posts.each do |blog_post| %> - <entry> - <id>tag:coderwall.com,<%= blog_post.posted.year %>:article/<%= blog_post.id %></id> - <published><%= blog_post.posted.to_s(:xmlschema) %></published> - <updated><%= blog_post.posted.to_s(:xmlschema) %></updated> - <link rel="alternate" type="text/html" href="<%= blog_post_path(blog_post.id) %>"/> - <title><%= blog_post.title %></title> - <author> - <name><%= blog_post.author %></name> - <email><%= blog_post.author %>@coderwall.com</email> - </author> - <content type="html"><%= blog_post.html %></content> - </entry> - <% end %> -</feed> \ No newline at end of file diff --git a/app/views/blog_posts/index.html.haml b/app/views/blog_posts/index.html.haml deleted file mode 100644 index ede693ba..00000000 --- a/app/views/blog_posts/index.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -- content_for :head do - = render :partial => 'disqus_comment_count' - -- content_for :mixpanel do - = record_event('viewed blog', :post => "index") - -- content_for :title do - = "coderwall.com: Blog" - -=content_for :body_id do - blog - -%h1.big-title Blog - -%section{:class => "blog"} - .panel - .inside-panel-align-left - = render @blog_posts \ No newline at end of file diff --git a/app/views/blog_posts/show.html.haml b/app/views/blog_posts/show.html.haml deleted file mode 100644 index 32d373b9..00000000 --- a/app/views/blog_posts/show.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -=content_for :body_id do - blog - -- content_for :head do - = render :partial => 'disqus_comment_count' - = render :partial => 'disqus_comment_thread', :locals => { :blog_post => @blog_post } - -- content_for :mixpanel do - = record_event('viewed blog', :post => @blog_post.title) - -- content_for :title do - = "coderwall.com: Blog - #{@blog_post.title}" - -%section{:class => "blog"} - .panel - .inside-panel-align-left - = render @blog_post, :locals => { :comments => true } - diff --git a/app/views/campaigns/asm_badge.html.haml b/app/views/campaigns/asm_badge.html.haml deleted file mode 100644 index 0fe058ff..00000000 --- a/app/views/campaigns/asm_badge.html.haml +++ /dev/null @@ -1,59 +0,0 @@ -!!! -%html{:style => "margin: 0;padding: 0;"} - %head{:style => "margin: 0;padding: 0;"} - %body{:style => "margin: 0;padding: 60px 0;background-color: #48494e; -webkit-font-smoothing: antialiased;width:100% !important; -webkit-text-size-adjust:none;"} - - %table.outside{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "margin: 20px auto;padding: 0 40px 20px 40px;width: 800px;", :width => "800"} - %tr{:style => "margin: 0;padding: 0;"} - %td{:style => "margin: 0;padding: 0;"} - %table.tips{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "margin: 0;padding: 0;border: #cbc9c4 solid 2px;-webkit-border-radius: 6px;border-radius: 6px;overflow: hidden;"} - %tr.title{:style => "margin: 0;padding: 0;height: 50px;line-height: 50px;"} - %td{:colspan => "6", :style => "margin: 0;padding: 0;"} - %h2{:style => "margin: 0;padding: 0;font-weight: normal;font-family: Georgia, Times, Times New Roman, serif;text-align: center;background: #ECE9E2;font-size: 19px;color: #48494e;"} - Unlock the new Entrepreneur badge - - %tr.tip{:style => 'background-color:#fff'} - %td{:style => 'padding: 20px;font: 14px Helvetica Neue, Helvetica, Arial, sans-serif;'} - %div{style: 'float:right'} - = image_tag("badges/entrepreneur.png") - - %p Hey #{@user.short_name}, - - %p You're getting the first chance to unlock the brand new Entrepreneur Badge. Get a commit accepted to an Assembly product, earn the badge and let the money start rolling in! - - %p If you didn't know about Assembly, it's a crowd-building platform for Apps. Each month, the community picks an idea for an application. Then using Assembly, the app is built collaboratively and monthly profits are rewarded to all the contributors. - - %p Follow these three steps to unlock the badge: - - %p - %ol{style: 'padding-left:20px'} - %li{style: 'margin-bottom: 10px'} - Visit Assembly to learn more about - %a{href: 'https://assemblymade.com/helpful', style: 'color: #48494E;text-decoration: none'} Helpful (a support tool). - - %li{style: 'margin-bottom: 10px'} - Find an open task on the - %a{href: 'https://assemblymade.com/helpful/wips', style: 'color: #48494E;text-decoration: none'} WIPs page - or jump in and create your own WIP - - %li{style: 'margin-bottom: 10px'} - Once done, submit your pull request to the - %a{href: 'https://github.com/asm-helpful/helpful-web', style: 'color: #48494E;text-decoration: none'} GitHub repo - and kick back with your new Entrepreneur badge - - %p Happy Coding - - - - %table.outside{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "margin: 0 auto;padding: 0 40px 20px 40px;width: 600px;background: #48494e;", :width => "600"} - %tr{:style => "margin: 0;padding: 0;"} - %td{:style => "margin: 0;padding: 0;text-align:center"} - %p.reminder{:style => "color:#fff;font-size:12px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';margin-top:0;margin-bottom:15px;padding-top:0;padding-bottom:0;line-height:18px;"} You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. - %p{:style => "color:#c9c9c9;font-size:12px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %preferences{:style => "color:#3ca7dd;text-decoration:none;"}> - %strong - %a{:href => "https://coderwall.com/settings#email", :style => "color:#3ca7dd;text-decoration:none;"} Edit your subscription - \ | - %unsubscribe{:style => "color:#3ca7dd;text-decoration:none;"} - %strong - %a{:href => '%unsubscribe_url%', :style => "color:#3ca7dd;text-decoration:none;"} Unsubscribe instantly \ No newline at end of file diff --git a/app/views/campaigns/asm_badge.text.erb b/app/views/campaigns/asm_badge.text.erb deleted file mode 100644 index 7cb02573..00000000 --- a/app/views/campaigns/asm_badge.text.erb +++ /dev/null @@ -1,17 +0,0 @@ -Hey <%= @user.short_name %>, - -You're getting the first chance to unlock the brand new Entrepreneur Badge. Get a commit accepted to an Assembly product, earn the badge and let the money start rolling in! - -If you didn't know about Assembly, it's a crowd-building platform for Apps. Each month, the community picks an idea for an application. Then using Assembly, the app is built collaboratively and monthly profits are rewarded to all the contributors. - -Follow these three steps to unlock the badge: - -1. Visit Assembly to learn more about Helpful (a support tool) https://assemblymade.com/helpful. - -2. Find an open task on the WIPs page (https://assemblymade.com/helpful/wips) or jump in and create your own WIP - -3. Once done, submit your pull request to the GitHub repo (https://github.com/asm-helpful/helpful-web) and kick back with your new Entrepreneur badge - -Happy Coding - -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/comments/_add_comment.html.haml b/app/views/comments/_add_comment.html.haml index 1c408447..564a007b 100644 --- a/app/views/comments/_add_comment.html.haml +++ b/app/views/comments/_add_comment.html.haml @@ -1,5 +1,7 @@ #add-comment.add-comment.cf - %h2 Add a comment + %h2 + %i.fa.fa-comment + Add a comment =form_for [@protip, @protip.comments.build] do |f| =f.text_area :comment, :label => false, :rows => 5, :value => @reply_to || params[:comment] %input{:type => "submit", :value => "Submit comment", :class => "button"} \ No newline at end of file diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml deleted file mode 100644 index c330ace4..00000000 --- a/app/views/comments/_comment.html.haml +++ /dev/null @@ -1,31 +0,0 @@ -%li.cf{:class => top_comment?(comment, comment_counter) ? "top-comment" : "" , :id => "comment_#{comment.id}"} - %header.cf - .comment-avatar - =image_tag(users_image_path(comment.user), :class => 'avatar') - %a.comment-user{:href => profile_path(comment.user.username), 'data-reply-to' => comment.user.username} - = comment.user.username - %a.like{:href =>like_protip_comment_path(comment.commentable.try(:public_id), comment.id), 'data-remote' => 'true', 'data-method' => :post, :class => comment_liked_class(comment), :rel => "nofollow"} - =comment_likes(comment) - .comment - %p - =raw sanitize(formatted_comment(comment.body)) - - if can_edit_comment?(comment) - .edit-comment.hidden - =form_for [comment.commentable, comment] do |f| - =f.text_area :comment, :label => false, :rows => 5 - %input{:type => "submit", :value => "Save", :class => "button save"} - %input{:type => "button", :value => "Cancel", :class => "button cancel"} - %ul.edit-del.cf - - if signed_in? - - if can_edit_comment?(comment) - %li - %a.edit{:href => '#', :onclick => 'return false;'} - Edit - %li - %a.delete{:href => protip_comment_path(comment.commentable.try(:public_id), comment.id), 'data-method' => :delete} - Delete - - -if !comment_author?(comment) - %li - %a.reply{:href => "#add-comment", :rel => "nofollow"} - Reply diff --git a/app/views/comments/_comment.html.slim b/app/views/comments/_comment.html.slim new file mode 100644 index 00000000..f32ab809 --- /dev/null +++ b/app/views/comments/_comment.html.slim @@ -0,0 +1,30 @@ +li.cf.comment class=(top_comment?(comment, comment_counter) ? 'top-comment' : '') id="comment_#{comment.id}" itemscope=true itemtype=meta_comment_schema_url itemprop=:comment + meta itemprop=:commentTime content=comment.created_at + meta itemprop=:name content=comment.id + header.cf itemprop="creator"itemscope=true itemtype=meta_person_schema_url + meta itemprop=:name content=comment.user.display_name + meta itemprop=:alternateName content=comment.user.username + .comment-avatar + = image_tag(users_image_path(comment.user), class: 'avatar') + + =link_to comment.user.username, profile_path(comment.user.username), class: 'comment-user', 'data-reply-to' => comment.user.username, 'itemprop' => 'author' + =link_to comment_likes(comment), like_protip_comment_path(comment.protip.public_id , comment.id), 'data-remote' => 'true', 'data-method' => :post, class: "like #{comment_liked_class(comment)}", rel: "nofollow" + =link_to('Spam!', mark_as_spam_protip_comment_path(comment.protip.public_id , comment.id), 'data-remote' => 'true', 'data-method' => :post, rel: 'nofollow') if is_moderator? + + .comment itemprop=:commentText + = raw sanitize(formatted_comment(comment.body)) + / TODO: Rework the comment editing bar outside of the same element as the commentText + - if can_edit_comment?(comment) + .edit-comment.hidden + = form_for [comment.protip, comment] do |f| + = f.text_area :comment, label: false, rows: 5 + input type='submit' value='Save' class='button save' + input type='button' value='Cancel' class='button cancel' + - if signed_in? + ul.edit-del.cf + li.hidden.show-for-user data-user=comment.user.username + =link_to 'Edit', '#', class: 'edit', onclick: 'return false;' + li.hidden.show-for-user data-user=comment.user.username + =link_to 'Delete', protip_comment_path(comment.protip.public_id, comment.id), class: 'delete', 'data-method' => :delete + li.remove-for-user data-user=comment.user.username + =link_to 'Reply', '#add-comment', class: 'reply', rel: 'nofollow' \ No newline at end of file diff --git a/app/views/comments/index.html.haml b/app/views/comments/index.html.haml deleted file mode 100644 index 10523719..00000000 --- a/app/views/comments/index.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -= content_for :body_id do - admin - -.comment-admin - %ul.titles.cf - %li index - %li likes - %li comment - - - @comments.each_with_index do |comment, index| - %ul.comments-list.cf - %li - = index+1 - %li - = comment.likes_cache - %li - = link_to comment.body, protip_path(comment.commentable.try(:public_id)) unless comment.commentable.nil? diff --git a/app/views/errors/_helpful_links.html.haml b/app/views/errors/_helpful_links.html.haml new file mode 100644 index 00000000..71c9c279 --- /dev/null +++ b/app/views/errors/_helpful_links.html.haml @@ -0,0 +1,9 @@ +%div.columns + %div.column.popular-list + %h3="Top 5 Most Popular Protips" + %ol + - protips_list(:trending, 5).each do |protip| + %li + =link_to "#{protip.title} by #{protip.user.name}", protip_path(protip.public_id) + %div.column.signup-list + =render :partial => "sessions/join_buttons", :locals => {:message => "Join to start earning badges for your open source contributions, discover protips and connect with other developers"} diff --git a/app/views/errors/not_found.html.haml b/app/views/errors/not_found.html.haml new file mode 100644 index 00000000..48329300 --- /dev/null +++ b/app/views/errors/not_found.html.haml @@ -0,0 +1,12 @@ +%div.error-body + %section.not-found + %header.cf + %h2 Uh oh, something went wrong! + %p.error-desc + Unfortunately, you are looking for something that isn't here. Maybe we can help you find something? + Use the links below to check out a few of the most popular protips or + #{ link_to "sign up and start submitting your own protips", signin_path }. + If you don't believe you should be seeing this error, + #{ link_to "please contact us", contact_us_path }! + + = render partial: "errors/helpful_links" diff --git a/app/views/errors/not_found.json b/app/views/errors/not_found.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/app/views/errors/not_found.json @@ -0,0 +1 @@ +{} diff --git a/app/views/errors/not_found.xml b/app/views/errors/not_found.xml new file mode 100644 index 00000000..d97b09fe --- /dev/null +++ b/app/views/errors/not_found.xml @@ -0,0 +1 @@ +<error>404</error> diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml deleted file mode 100644 index d91f67e1..00000000 --- a/app/views/events/_event.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -/ %a.more-btn{:href => "#"} More - - --if event.highlight? - .item.event{:id => dom_id(event)} - / %p.date This month - -if viewing_self? - =link_to('', user_highlight_path(@user, event.id), :method => :delete, :remote => true, :class => 'close') - %p=auto_link(event.name) - --elsif event.presentation? - .item - %p=event.name - .presentation=event.html.html_safe --elsif event.conference? - .item - %p=event.name - -if event.links && !event.links.empty? - .item-footer - -event.links.each do |link_pair| - %a{:href => link_pair.first.last}=link_pair.first.first --else - .item - / %p.date Jan 2012 - %p - -if event.image_path - =image_tag(event.image_path, :class => 'float-badge') - =event.description - -if event.links && !event.links.empty? - %ul - -event.links.each do |link_pair| - %li=link_to(link_pair.first.first, link_pair.first.last, :target => :new) - .clear - / =event.date.strftime("%^b '%y") diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml deleted file mode 100644 index 90ad9391..00000000 --- a/app/views/events/index.html.haml +++ /dev/null @@ -1,68 +0,0 @@ -=content_for :javascript do - - unless is_admin? - :javascript - window.console.log = function(){} - - =render :partial => 'shared/pubnub' - =javascript_include_tag 'protips' - =javascript_include_tag 'ember/dashboard' - - :javascript - Coderwall.activityFeedController.loadSubscriptions(#{@subscribed_channels}) - Coderwall.activityFeedController.set('username', '#{current_user.username}') - Coderwall.activityFeedController.set('skills', #{current_user.skills.map(&:name)}) - Coderwall.activityFeedController.set('achievements', #{current_user.badges.map(&:display_name)}) - Coderwall.activityFeedController.set('profileUrl', '#{profile_path(current_user.username)}') - Coderwall.activityFeedController.set('protipsUrl', '#{my_protips_path}') - Coderwall.activityFeedController.set('connectionsUrl', '#{followers_path(current_user.username)}') - Coderwall.activityFeedController.loadEvents( #{current_user.activity.to_json}) - Coderwall.activityFeedController.releaseUnreadActivities() - Coderwall.activityFeedController.updateStats(#{@stats}) - Coderwall.activityFeedController.start() - -=content_for :body_id do - activity - --#-content_for :mixpanel do --# =record_event('viewed dashboard', :viewing_minutes => 0) - -%section.activity - #activity_feed - -.sidebar - %aside.profile-sidebar - %ul.profile-details - %li.activity-view.cf - .user-details - %h4 - =current_user.display_name - %ul - %li - %a.view-tips{:href => my_protips_path} - View upvoted protips - - =image_tag(users_image_path(current_user), :class => 'profile-avatar', :width => 80, :height => 80) - -#.coderwall-level - -# %p coderwall level 1 - %li.stats.cf - #stats - - %aside.secondary-sidebar - - %a.add-tip.track{:href => new_protip_path, 'data-action' => 'create protip', 'data-from' => 'dashboard sidebar'} - Share a protip - - - featured_protips = latest_relevant_featured_protips(4) - %h2 Featured Pro tips - %ul.tips-list - - if current_user.networks.blank? - %li.no-networks - %p - You do not yet belong to any networks. To see the best protips featured here, - = link_to "join some networks.", networks_path - %p New & trending pro tips from networks you are a member of will appear on your feed to the left. - - - else - -featured_protips.each do |protip| - %li{:style => right_border_css(protip.networks.first.try(:slug))}=link_to protip.title, protip_path(protip.public_id), 'data-action' => 'view protip', 'data-from' => 'dashboard (featured protips)', :class => 'track' - diff --git a/app/views/follows/index.html.haml b/app/views/follows/index.html.haml index ed1d7329..b2de6d21 100644 --- a/app/views/follows/index.html.haml +++ b/app/views/follows/index.html.haml @@ -2,7 +2,7 @@ network -content_for :javascript do - =javascript_include_tag 'connections.js' + =javascript_include_tag 'connections' -#-if is_viewing_followers? -# %script="logUsage('viewed', 'followers');" -#-else diff --git a/app/views/highlights/_highlight.html.haml b/app/views/highlights/_highlight.html.haml deleted file mode 100644 index c5d25881..00000000 --- a/app/views/highlights/_highlight.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -%li.badge{:id => dom_id(highlight)} - -if viewing_self? - =link_to('', user_highlight_path(@user, highlight), :method => :delete, :remote => true, :class => 'close') - .white-container - %p=highlight.description \ No newline at end of file diff --git a/app/views/highlights/_highlight.js.haml b/app/views/highlights/_highlight.js.haml deleted file mode 100644 index 43d67b9b..00000000 --- a/app/views/highlights/_highlight.js.haml +++ /dev/null @@ -1,4 +0,0 @@ -%li.badge{:id => dom_id(highlight)} - =link_to('', user_highlight_path(@user, highlight), :method => :delete, :remote => true, :class => 'close') - .white-container - %p=highlight.description \ No newline at end of file diff --git a/app/views/highlights/_random.html.haml b/app/views/highlights/_random.html.haml deleted file mode 100644 index 793a2f03..00000000 --- a/app/views/highlights/_random.html.haml +++ /dev/null @@ -1,7 +0,0 @@ --cache 'featured_highlights', :expires_in => 1.hour do - -Highlight.random_featured(10).each do |highlight| - .featuredAccomplishment{:class => hide_all_but_first} - ="\"#{highlight.description}\"" - .author - =link_to(image_tag(highlight.user.thumbnail_url), badge_path(:username => highlight.user.username)) - %span=link_to(highlight.user.display_name, badge_path(:username => highlight.user.username)) \ No newline at end of file diff --git a/app/views/highlights/create.js.erb b/app/views/highlights/create.js.erb deleted file mode 100644 index 5562d40a..00000000 --- a/app/views/highlights/create.js.erb +++ /dev/null @@ -1,6 +0,0 @@ -<% if @badge %> -$('.your-achievements ul').append('<li><%=image_tag(@badge.image_path, :title => @badge.description, :class => "tip") %></li>').fadeIn(); -$('#profile-main-col .time-line').prepend('<%=escape_javascript render(@badge_event) %>').fadeIn(); -<% end %> -$('#profile-main-col .time-line').prepend('<%=escape_javascript render(@highlight.event) %>').fadeIn(); -$('.time-line-share textarea').val(null); \ No newline at end of file diff --git a/app/views/highlights/destroy.js.erb b/app/views/highlights/destroy.js.erb deleted file mode 100644 index d4bb0585..00000000 --- a/app/views/highlights/destroy.js.erb +++ /dev/null @@ -1 +0,0 @@ -$('#<%= "event_#{@highlight.id}"%>').slideUp(); \ No newline at end of file diff --git a/app/views/highlights/index.js.erb b/app/views/highlights/index.js.erb deleted file mode 100644 index adf197bd..00000000 --- a/app/views/highlights/index.js.erb +++ /dev/null @@ -1 +0,0 @@ -alert("<%= @highlight.description} %>"); diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml deleted file mode 100644 index c17fb398..00000000 --- a/app/views/home/index.html.haml +++ /dev/null @@ -1,52 +0,0 @@ -=content_for :footer_menu do - %li=link_to 'Protips', by_tags_protips_path - -%section.users-top - .inside - %a.sign-in{:href => signin_path} - Sign in - - %a.new-logo{:href=> '/'} - - %h1.mainline A community for developers to unlock & share new skills. - - / %a.join-us{:href => '/'} - / Join us - / %p.join - / join us - .sign-up-panel - =render :partial => "sessions/join_buttons" - -%section.home-section - .inside.cf - .text - %h2 Share protips, learn from the community - %p Learn from the experts about the latest languages, tools & technologies or share your own pro tip and get feedback from thousands of developers. Share code snippets, tutorials or thought pieces with your peers. - - .image - =image_tag("protip.jpg") - -%section.home-section.badge-section - .inside.cf - .text - %h2 Unlock & earn badges for your coding achievements - %p Earn unique Coderwall badges to display on your user profile. Based on your github repositories, earn badges for all major language types, represent your skills, level-up. - - .image - =image_tag("badges2.jpg") - - -%section.home-section.team-section - .inside.cf - .text - %h2 Represent your team, curate its culture - %p Discover over 6,000 brilliant engineering teams, how they're solving interesting challenges, and even find your next dream job. Curate your team's page by adding unique content, illustrating it's culture. - - .image - =image_tag("team.jpg") - -%section.second-signup - .inside.cf - %h2.subline - Start building your coderwall: - =render :partial => "sessions/join_buttons" diff --git a/app/views/home/index.html.slim b/app/views/home/index.html.slim new file mode 100644 index 00000000..96116f45 --- /dev/null +++ b/app/views/home/index.html.slim @@ -0,0 +1,35 @@ += content_for :footer_menu do + li=link_to 'Protips', by_tags_protips_path + +section.users-top + .inside + = link_to 'Sign in', signin_path, class: 'sign-in' + = link_to nil , root_path, class: 'new-logo' + h1.mainline A community for developers to unlock & share new skills. + .sign-up-panel + = render 'sessions/join_buttons' +section.home-section + .inside.cf + .text + h2 Share protips, learn from the community + p Learn from the experts about the latest languages, tools & technologies or share your own pro tip and get feedback from thousands of developers. Share code snippets, tutorials or thought pieces with your peers. + .image + = image_tag('protip.jpg') +section.home-section.badge-section + .inside.cf + .text + h2 Unlock & earn badges for your coding achievements + p Earn unique Coderwall badges to display on your user profile. Based on your github repositories, earn badges for all major language types, represent your skills, level-up. + .image + = image_tag('badges2.jpg') +section.home-section.team-section + .inside.cf + .text + h2 Represent your team, curate its culture + p Discover over 6,000 brilliant engineering teams, how they're solving interesting challenges, and even find your next dream job. Curate your team's page by adding unique content, illustrating it's culture. + .image + = image_tag('team.jpg') +section.second-signup + .inside.cf + h2.subline Start building your coderwall: + = render 'sessions/join_buttons' diff --git a/app/views/invitations/_team_members.html.haml b/app/views/invitations/_team_members.html.haml new file mode 100644 index 00000000..0c186895 --- /dev/null +++ b/app/views/invitations/_team_members.html.haml @@ -0,0 +1,17 @@ +- # Local params +- # @param [ Team ] - team + +%ul#teams + %li.team{id: dom_id(team)} + .team-inside.cf + %h3= team.name + .members + - team.top_three_team_members.each do |member| + =link_to(image_tag(member.avatar.url, class: 'avatar', alt: member.username), profile_path(member.username)) + -if team.size > 3 + .size + ="+ #{team.size - 3}" + -if current_user.belongs_to_team?(team) + =link_to('Stay with this team', team_path(current_user.team, flash: "Great, you're still on team #{current_user.team.name}"), class: 'button stay') + -else + =link_to('Join this team', accept_team_path(team, r: params[:r]), class: 'join') diff --git a/app/views/invitations/show.html.haml b/app/views/invitations/show.html.haml index 6a9503e8..d7604cd3 100644 --- a/app/views/invitations/show.html.haml +++ b/app/views/invitations/show.html.haml @@ -9,36 +9,13 @@ -if !signed_in? %p Before you can accept the invitation you need to create a coderwall account or sign in. %ul.sign-btns - %li=link_to('Sign Up', signup_path, :class => 'join') - %li=link_to('Sign In', signin_path, :id => 'signin', :class => 'join') + %li=link_to('Sign Up', root_path, class: 'join') + %li=link_to('Sign In', signin_path, id: 'signin', class: 'join') -else - -if current_user.team + -if users_team = current_user.membership #currentteam - %h2==You are currently on team #{current_user.team.name} - %ul#teams - %li.team{:id => dom_id(current_user.team)} - .team-inside.cf - %h3=current_user.team.name - .members - -current_user.team.top_three_team_members.each do |member| - =link_to(image_tag(member.thumbnail_url, :class => 'avatar', :alt => member.username), profile_path(member.username)) - -if current_user.team.size > 3 - .size="+ #{current_user.team.size - 3}" - =link_to('Stay with this team', team_path(current_user.team, :flash => "Great, you're still on team #{current_user.team.name}"), :class => 'button stay') - + %h2==You are currently on team #{users_team.team.name} + = render "invitations/team_members", team: users_team.team .clear %h2 Team invitations - %ul#teams - %li.team{:id => dom_id(@team)} - .team-inside.cf - %h3=@team.name - .members - -@team.top_three_team_members.each do |member| - =link_to(image_tag(member.thumbnail_url, :class => 'avatar', :alt => member.username), profile_path(member.username)) - -if @team.size > 3 - .size - ="+ #{@team.size - 3}" - -if current_user.belongs_to_team?(@team) - =link_to('Stay with this team', accept_team_path(@team, :r => params[:r]), :class => 'button stay') - -else - =link_to('Join this team', accept_team_path(@team, :r => params[:r]), :class => 'join') + = render "invitations/team_members", team: @team diff --git a/app/views/layouts/_navigation.html.haml b/app/views/layouts/_navigation.html.haml deleted file mode 100644 index 180187eb..00000000 --- a/app/views/layouts/_navigation.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -%header#masthead - .inside-masthead.cf - .mobile-panel.cf - %a.logo{href: '/'} - %span coderwall - %a.menu-btn - - %nav#nav - %ul - %li= link_to('Discover', root_path) - -if signed_in? - %li= link_to('Admin', admin_root_path) if is_admin? - %li= link_to('Feed', dashboard_path) - %li= link_to('Profile', badge_path(username: current_user.username), class: mywall_nav_class) - - %li= link_to('Teams', teams_path, class: teams_nav_class) - %li= link_to('Jobs', jobs_path, class: jobs_nav_class) - -if signed_in? - %li= link_to('Settings', settings_path, class: settings_nav_class) - %li= link_to('Sign out', sign_out_path) - -else - %li= link_to('Sign In', signin_path, class: signin_nav_class) - %li= link_to('Sign Up', signin_path, class: signup_nav_class) - diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml deleted file mode 100644 index 0dea5d8b..00000000 --- a/app/views/layouts/application.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -!!! 5 -%html.no-js{lang: 'en'} - %head - /[if IE] <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - %meta{ content: 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type' } - %title= page_title(yield(:page_title)) - %link{ rel: 'icon', href: image_url('favicon.png'), type: 'image/x-icon' } - %link{ rel: 'shortcut icon', href: image_url('favicon.png'), type: 'image/x-icon' } - %meta{ content: page_description(yield(:page_description)), name: 'description', property: 'og:description' } - %meta{ content: page_keywords(yield(:page_keywords)), name: 'keywords' } - %meta{ name: 'google', value: 'notranslate' } - %meta{ name: 'twitter:account_id', content: ENV['TWITTER_ACCOUNT_ID'] } - - = stylesheet_link_tag 'application' - = csrf_meta_tag - = render partial: 'shared/mixpanel' - = yield :head - - %body{ id: yield(:body_id) } - = render partial: 'layouts/navigation' - #main-content - - if main_content_wrapper(yield(:content_wrapper)) - - if flash[:notice] || flash[:error] - .notification-bar - .notification-bar-inside{ class: (flash[:error].blank? ? 'notice' : 'error') } - %p= flash[:notice] || flash[:error] - %a.close-notification.remove-parent{href: '/', 'data-parent' => 'notification-bar' } - %span Close - = yield :top_of_main_content - .inside-main-content.cf= yield - - else - = yield - = render partial: 'shared/analytics' - = render partial: 'shared/footer' diff --git a/app/views/layouts/application.html.slim b/app/views/layouts/application.html.slim new file mode 100644 index 00000000..f01ef953 --- /dev/null +++ b/app/views/layouts/application.html.slim @@ -0,0 +1,38 @@ +doctype html +html.no-js lang=I18n.locale + head + title= page_title(yield(:page_title)) + link rel= 'author' href= '/humans.txt' + meta name="viewport" content="initial-scale=1.0,width=device-width" + - if Rails.env.production? + = render 'mixpanel' + = render 'analytics' + = render 'fav_icons' + = stylesheet_link_tag 'coderwall' + = csrf_meta_tag + + meta content= page_description(yield(:page_description)) name= 'description' property= 'og:description' + meta content= page_keywords(yield(:page_keywords)) name= 'keywords' + + meta name= 'twitter:account_id' content= ENV['TWITTER_ACCOUNT_ID'] + = metamagic + + = yield :head + + body id=yield(:body_id) + = render partial: 'nav_bar' + #main-content + - if main_content_wrapper(yield(:content_wrapper)) + - if flash[:notice] || flash[:error] + .notification-bar + .notification-bar-inside class=(flash[:error].blank? ? 'notice' : 'error') + p= flash[:notice] || flash[:error] + =link_to '/', class: 'close-notification remove-parent', 'data-parent' => 'notification-bar' + span Close + = yield :top_of_main_content + .inside-main-content.cf= yield + - else + = yield + = render 'footer' + = render 'current_user_js' + diff --git a/app/views/layouts/change_the_ratio.html.haml b/app/views/layouts/change_the_ratio.html.haml deleted file mode 100644 index c3192f5d..00000000 --- a/app/views/layouts/change_the_ratio.html.haml +++ /dev/null @@ -1,22 +0,0 @@ -!!! 5 -%html.no-js{lang: "en"} - %head - = stylesheet_link_tag 'application' - = yield :head - %body.change-the-ratio - %header.ratio-header - .ratio-header-inside - %a.ratio-logo{href: "/"} coderwall - %nav.top-nav - %ul - %li - %a{href: "/"} Share - %li - %a{href: "/"} Sign-up - =yield - %footer.ratio-footer - .ratio-footer-inside - %p.geek-cred - %a{href: "/"} - Establish your geek cred - diff --git a/app/views/layouts/coderwallv2.html.slim b/app/views/layouts/coderwallv2.html.slim new file mode 100644 index 00000000..ac00233d --- /dev/null +++ b/app/views/layouts/coderwallv2.html.slim @@ -0,0 +1,44 @@ +doctype html +html.no-js lang=I18n.locale + head + title= page_title(yield(:page_title)) + link rel= 'author' href= '/humans.txt' + meta name="viewport" content="initial-scale=1.0,width=device-width" + - if Rails.env.production? + = render 'mixpanel' + = render 'analytics' + = render 'fav_icons' + link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" + = stylesheet_link_tag 'coderwallv2' + = csrf_meta_tag + + meta content= page_description(yield(:page_description)) name= 'description' property= 'og:description' + meta content= page_keywords(yield(:page_keywords)) name= 'keywords' + + meta name= 'twitter:account_id' content= ENV['TWITTER_ACCOUNT_ID'] + = metamagic + + = yield :head + + body id=yield(:body_id) + = render 'application/coderwallv2/nav_bar' + #main-content + - if main_content_wrapper(yield(:content_wrapper)) + - if flash[:notice] || flash[:error] + .notification-bar + .notification-bar-inside class=(flash[:error].blank? ? 'notice' : 'error') + p= flash[:notice] || flash[:error] + =link_to '/', class: 'close-notification remove-parent', 'data-parent' => 'notification-bar' + span Close + = yield :top_of_main_content + .inside-main-content.cf= yield + - else + = yield + + = render 'application/coderwallv2/footer' + + = javascript_include_tag 'coderwallv2' + = render 'shared/mixpanel_properties' + = yield :javascript + + = render 'current_user_js' diff --git a/app/views/layouts/email.html.erb b/app/views/layouts/email.html.erb index 1a02cb14..263c80ef 100644 --- a/app/views/layouts/email.html.erb +++ b/app/views/layouts/email.html.erb @@ -2,10 +2,10 @@ "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> -<head style="margin-top: <%= Rails.env.development? ? 120 : 20 %>;margin-bottom: 0;margin-right: 0;margin-left: 0;padding-top: 0;padding-bottom: 0;padding-right: 0;padding-left: 0;background-color: #48494e;margin: 0;padding: 0;-webkit-text-size-adjust:none;"> +<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>A message from Coderwall</title> - <style> + <style type="text/css"> @media only screen and (max-device-width: 480px) { div[class="header"] { font-size: 16px !important; @@ -74,7 +74,7 @@ <tr> <td width="600" bgcolor="#48494e" class="logocell"> <center> - <img id='messageLogo' src="<%= image_path('email/email-logo.jpg') %>" height='auto' style="height: auto;line-height: 100%;outline: none;text-decoration: none;display: block;width: 211px;margin: 0 auto;"/> + <img id='messageLogo' src="<%= image_path('email/email-logo.jpg') %>" height='auto' style="height: auto;line-height: 100%;outline: none;text-decoration: none;display: block;width: 211px;margin: 0 auto;" alt=""/> </center> </td> </tr> @@ -99,13 +99,13 @@ </td> </tr> </table> - <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="15" class="divider"><br> + <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="15" class="divider" alt=""><br> <table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#48494e"> <tr> <td> <center> - <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="0"><br> + <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="0" alt=""><br> <table width="600" cellpadding="0" cellspacing="0" border="0" align="center" class="table"> <tr> @@ -115,26 +115,24 @@ <tr> <td width="380" valign="top" class="footershow"> - <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="8"><br> + <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="8" alt=""><br> <p style="color:#fff;font-size:12px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';margin-top:0;margin-bottom:15px;padding-top:0;padding-bottom:0;line-height:18px;" class="reminder">You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum.</p> <p style="color:#c9c9c9;font-size:12px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"> - <preferences style="color:#3ca7dd;text-decoration:none;"> - <strong><a href='https://coderwall.com/settings#email' style="color:#3ca7dd;text-decoration:none;">Edit - your subscription</a></strong></preferences> + <strong style="color:#3ca7dd;text-decoration:none;"><a href='https://coderwall.com/settings#email' style="color:#3ca7dd;text-decoration:none;">Edit + your subscription</a></strong> | - <unsubscribe style="color:#3ca7dd;text-decoration:none;"> - <strong><a href='%unsubscribe_url%' style="color:#3ca7dd;text-decoration:none;">Unsubscribe - instantly</a></strong></unsubscribe> + <strong style="color:#3ca7dd;text-decoration:none;"><a href='%unsubscribe_url%' style="color:#3ca7dd;text-decoration:none;">Unsubscribe + instantly</a></strong> </p> </td> </tr> </table> </center> - <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="25"><br> + <img border="0" src="<%= image_path('email/spacer.gif') %>" width="1" height="25" alt=""><br> </center> </td> @@ -146,4 +144,4 @@ </table> </body> -</html> \ No newline at end of file +</html> diff --git a/app/views/layouts/error.html.haml b/app/views/layouts/error.html.haml deleted file mode 100644 index 686dfadc..00000000 --- a/app/views/layouts/error.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -!!! 5 -%html.no-js{lang: "en"} - %head - %meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ - = stylesheet_link_tag 'application' - - %body{style: "background:#bacbd8;"} - = yield diff --git a/app/views/layouts/error.html.slim b/app/views/layouts/error.html.slim new file mode 100644 index 00000000..0d7ef668 --- /dev/null +++ b/app/views/layouts/error.html.slim @@ -0,0 +1,15 @@ +doctype html +html.no-js lang=I18n.locale + head + title= page_title(yield(:page_title)) + link rel= 'author' href= '/humans.txt' + meta name="viewport" content="initial-scale=1.0,width=device-width" + - if Rails.env.production? + = render 'mixpanel' + = render 'analytics' + = render 'fav_icons' + = stylesheet_link_tag 'coderwall' + + body style = 'background: #bacbd8;' + = yield + diff --git a/app/views/layouts/home4-layout.html.haml b/app/views/layouts/home4-layout.html.haml deleted file mode 100644 index 496f2889..00000000 --- a/app/views/layouts/home4-layout.html.haml +++ /dev/null @@ -1,16 +0,0 @@ -!!! 5 -%html.no-js{lang: "en"} - %head - /[if IE] <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - %meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ - %meta{name: "viewport", content: "width=device-width,initial-scale=1.0,maximum-scale=1.0"} - %title= page_title(yield(:page_title)) - %link{rel: "icon", href: image_url('favicon.ico'), type: 'image/x-icon'} - %link{rel: "shortcut icon", href: image_url('favicon.png'), type: 'image/x-icon'} - = stylesheet_link_tag 'application' - = render partial: 'shared/mixpanel' - = csrf_meta_tag - = yield :head - %body - = yield - = render partial: 'shared/footer' diff --git a/app/views/layouts/home4-layout.html.slim b/app/views/layouts/home4-layout.html.slim new file mode 100644 index 00000000..f00a9b4c --- /dev/null +++ b/app/views/layouts/home4-layout.html.slim @@ -0,0 +1,23 @@ +doctype html +html.no-js lang=I18n.locale + head + title= page_title(yield(:page_title)) + link rel= 'author' href= '/humans.txt' + meta name="viewport" content="initial-scale=1.0,width=device-width" + - if Rails.env.production? + = render 'mixpanel' + = render 'analytics' + = render 'fav_icons' + = stylesheet_link_tag 'coderwall' + = csrf_meta_tag + + meta name='twitter:account_id' content=ENV['TWITTER_ACCOUNT_ID'] + = metamagic + + + + = yield :head + body + = yield + = render 'footer' + diff --git a/app/views/layouts/jobs.html.haml b/app/views/layouts/jobs.html.haml deleted file mode 100644 index c0cd97d9..00000000 --- a/app/views/layouts/jobs.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -!!! 5 -%html.no-js{lang: "en"} - %head - /[if IE] <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - %meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ - <meta name="viewport" content="initial-scale=1.0,width=device-width" /> - %title= page_title(yield(:page_title)) - %link{rel: "icon", href: image_url('favicon.ico'), type: 'image/x-icon'} - %link{rel: "shortcut icon", href: image_url('favicon.png'), type: 'image/x-icon'} - = stylesheet_link_tag 'application' - = render partial: 'shared/mixpanel' - = csrf_meta_tag - = yield :head - = render partial: 'layouts/navigation' - %body#jobs - #main-content - =yield - =render partial: 'shared/footer' diff --git a/app/views/layouts/jobs.html.slim b/app/views/layouts/jobs.html.slim new file mode 100644 index 00000000..9ebca99e --- /dev/null +++ b/app/views/layouts/jobs.html.slim @@ -0,0 +1,25 @@ +doctype html +html.no-js lang=I18n.locale + head + title= page_title(yield(:page_title)) + link rel= 'author' href= '/humans.txt' + meta name="viewport" content="initial-scale=1.0,width=device-width" + - if Rails.env.production? + = render 'mixpanel' + = render 'analytics' + = render 'fav_icons' + = stylesheet_link_tag 'coderwall' + = csrf_meta_tag + + = yield :head + = render 'nav_bar' + body#jobs + #main-content + - if flash[:notice] || flash[:error] + .notification-bar + .notification-bar-inside class=(flash[:error].blank? ? 'notice' : 'error') + p= flash[:notice] || flash[:error] + = link_to(jobs_path, {class: 'close-notification remove-parent', data: {parent: 'notification-bar'}}) + span Close + = yield + = render 'footer' diff --git a/app/views/layouts/oli.email.html.haml b/app/views/layouts/oli.email.html.haml deleted file mode 100644 index 37a41032..00000000 --- a/app/views/layouts/oli.email.html.haml +++ /dev/null @@ -1,188 +0,0 @@ -%html{style: "margin-top: #{Rails.env.development? ? 120 : 20};margin-bottom: 0;margin-right: 0;margin-left: 0;padding-top: 0;padding-bottom: 0;padding-right: 0;padding-left: 0;background-color: #48494e;margin: 0;padding: 0;-webkit-text-size-adjust:none;"} - %head - %title - %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}/ - :css - /**/ - #outlook a { padding: 0; } - body { width: 100% !important; } - .ReadMsgBody { width: 100%; } - .ExternalClass { width: 100%; display:block !important; } - html, body { background-color: #48494e; margin: 0; padding: 0; } - img { height: auto; line-height: 100%; outline: none; text-decoration: none; display: block; } - br, strong br, b br, em br, i br { line-height:100%; } - h1, h2, h3, h4, h5, h6 { line-height: 100% !important; -webkit-font-smoothing: antialiased; } - h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: #3d8dcc !important; } - h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active { color: #3d8dcc !important; } - h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited { color: #3d8dcc !important; } - table { border: none; } - - body { - background: #48494e;font-family: "helvetica", "arial", "sans-serif";padding-bottom: 20px; - } - - html, body{ - -webkit-text-size-adjust:none !important; - } - - a { - color: #3d8dcc; - text-decoration: none; - font-size: 14px; - } - - a:hover { - text-decoration: underline; - } - - h1 { - color: #393939; - font-size: 28px; - margin-bottom: 20px; - } - - h2 { - color: #393939; - font-size: 20px; - margin-bottom: 20px; - } - - h2 a { - color: #3d8dcc; - text-decoration: none; - font-size: 20px; - } - - - p { - font-size: 14px; - line-height: 22px; - } - - li { - font-size: 14px; - line-height: 22px; - } - - .header { - width: 600px; - margin: 0 auto 40px auto; - } - - .logo { - width: 211px; - margin: 0 auto; - } - - .content-box { - background: #fff; - width: 600px; - margin: 0 auto 20px auto; - border-radius:6px; - -moz-border-radius:6px; - -webkit-border-radius:6px; - } - - .content-head { - padding: 30px 60px; - border-bottom: solid 1px #d4cfc4; - } - - .content-head h1 { - text-align: center; - font-size: 26px; - color: #393939; - margin: 0; - } - - .main-content-grey { - padding: 30px 60px; - background: #ece9e2; - } - - .main-content-grey .divider { - height: 10px; - background: #dbd7cd; - } - - .main-content-white { - padding: 30px 60px; - background: #fff; - } - - .main-content-white .divider { - height: 10px; - background: #eee; - } - - .image-right { - float: right; - margin: 10px 0px 10px 20px; - } - - .image-left { - float: left; - margin: 10px 20px 10px 0; - } - - .footer { - width: 400px; - margin: 0 auto; - text-align: center; - } - - .footer p { - font-size: 12px; - color: #fff; - line-height: 18px; - margin-bottom: 20px; - } - - .footer a { - font-size: 11px; - text-decoration: none; - } - - .update { - margin: 0 15px; - padding-right: 15px; - border-right: solid 1px #eee; - } - - @media only screen and (max-device-width: 480px) { - .hide { display: none !important; } - .table, .cell { width: 300px !important; } - .divider { height: 1px !important; } - } - /**/ - %meta{content: "noindex,nofollow", name: "robots"}/ - %meta{content: "", property: "og:title"}/ - %body{background: "#48494e;font-family: 'helvetica', 'arial', 'sans-serif';padding-bottom: 20px;", style: "background: #48494e;font-family: 'helvetica', 'arial', 'sans-serif';padding-bottom: 20px;background-color: #48494e;margin: 0;padding: 0;width: 100%;-webkit-text-size-adjust:none;"} - %center - %table.header{style: "border: none;width: 600px; margin: 10px auto 40px auto;background: #48494e;font-family: 'helvetica', 'arial', 'sans-serif';background-color: #48494e;"} - %tbody - %tr - %td - %img.logo{alt: "Email-logo", src: image_path("email/email-logo.jpg"), style: "height: auto;line-height: 100%;outline: none;text-decoration: none;display: block;width: 211px;margin: 0 auto;"}/ - %table.content-box{border: "0", cellpadding: "0", cellspacing: "0", style: "border: none;background: #fff;width: 600px;margin: 0 auto 20px auto;border-radius: 6px;-moz-border-radius: 6px;-webkit-border-radius: 6px;"} - %tbody - =yield - %tr - %td.main-content-white{style: "padding: 30px 60px;background: #fff;"} - %p{style: "font-size: 14px;line-height: 22px;"} Matt & the Coderwall team - %p{style: "font-size: 14px;line-height: 22px;"} - P.S. Make sure to follow us on twitter ( - %a{href: "https://twitter.com/coderwall", style: "color: #3d8dcc;text-decoration: none;font-size: 14px;"}> @coderwall - ) - %table.footer{style: "border: none;width: 400px;margin: 0 auto;text-align: center;background: #48494e;font-family: 'helvetica', 'arial', 'sans-serif';background-color: #48494e;"} - %tbody - %tr - %td - %p{style: "font-size: 12px;line-height: 18px;color: #fff;margin-bottom: 20px;"} - You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. - %tr - %td{style: "padding: 10px; margin-bottom:30px"} - %a.update{href: "https://coderwall.com/settings#email", style: "color: #3d8dcc;text-decoration: none;font-size: 11px;margin: 0 15px;padding-right: 15px;border-right: solid 1px #eee;"} - Easily Update Email Preferences - %a{href: "%unsubscribe_url%", style: "color: #3d8dcc;text-decoration: none;font-size: 11px;"} - Immediately Unsubscribe diff --git a/app/views/layouts/product_description.html.haml b/app/views/layouts/product_description.html.haml deleted file mode 100644 index 8d1d3603..00000000 --- a/app/views/layouts/product_description.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -!!! 5 -%html.no-js{lang: "en"} - %head - /[if IE] <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> - %meta{content: "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ - <meta name="viewport" content="initial-scale=1.0,width=device-width" /> - %title= page_title(yield(:page_title)) - %link{rel: "icon", href: image_url('favicon.ico'), type: 'image/x-icon'} - %link{rel: "shortcut icon", href: image_url('favicon.png'), type: 'image/x-icon'} - = stylesheet_link_tag 'application' - = render partial: 'shared/mixpanel' - = csrf_meta_tag - = yield :head - - %body#product-description - =yield - =render partial: 'shared/footer' diff --git a/app/views/layouts/product_description.html.slim b/app/views/layouts/product_description.html.slim new file mode 100644 index 00000000..51ab24c8 --- /dev/null +++ b/app/views/layouts/product_description.html.slim @@ -0,0 +1,19 @@ +doctype html +html.no-js lang=I18n.locale + head + title= page_title(yield(:page_title)) + link rel= 'author' href= '/humans.txt' + meta name="viewport" content="initial-scale=1.0,width=device-width" + - if Rails.env.production? + = render 'mixpanel' + = render 'analytics' + = render 'fav_icons' + = stylesheet_link_tag 'coderwall' + = csrf_meta_tag + + = yield :head + + body#product-description + = render partial: 'shared/notification_bar' + = yield + = render 'footer' diff --git a/app/views/layouts/protip.html.haml b/app/views/layouts/protip.html.haml deleted file mode 100644 index 11d0f865..00000000 --- a/app/views/layouts/protip.html.haml +++ /dev/null @@ -1,48 +0,0 @@ -!!! 5 -%html.no-js{lang: "en"} - %head - %link{rel: "shortcut icon", href: image_url('favicon.png'), type: 'image/x-icon'} - = stylesheet_link_tag 'application' - = render partial: 'shared/analytics' - = render partial: 'shared/mixpanel' - = yield :head - = csrf_meta_tag - %body.protip-single - = render partial: 'layouts/navigation' - - .mobile-top - %a.new-logo{href: '/'} - %a.mobile-nav-btn#x-mobile-toggle - - %nav.mobile-nav#x-mobile-menu - %ul - %li= link_to('Discover', root_path) - -if signed_in? - %li= link_to('Admin', admin_root_path) if is_admin? - %li= link_to('Feed', dashboard_path) - %li= link_to('Profile', badge_path(username: current_user.username), class: mywall_nav_class) - - %li= link_to('Teams', teams_path, class: teams_nav_class) - %li= link_to('Jobs', jobs_path, class: jobs_nav_class) - -if signed_in? - %li= link_to('Settings', settings_path, class: settings_nav_class) - %li= link_to('Sign out', sign_out_path) - -else - %li= link_to('Sign In', signin_path, class: signin_nav_class) - %li= link_to('Sign Up', signin_path, class: signup_nav_class) - %canvas.blur{src: image_path(users_background_image)} - =yield - - - unless is_admin? - :javascript - window.console.log = function(){} - - = javascript_include_tag 'jquery' - = javascript_include_tag 'jquery_ujs' - = render partial: 'shared/mixpanel_properties' - = javascript_include_tag 'highlight/highlight.js' - = javascript_include_tag 'highlight/language.js' - - = javascript_include_tag 'protips' - - = yield :javascript diff --git a/app/views/layouts/protip.html.slim b/app/views/layouts/protip.html.slim new file mode 100644 index 00000000..18c99801 --- /dev/null +++ b/app/views/layouts/protip.html.slim @@ -0,0 +1,45 @@ +doctype html +html.no-js lang=I18n.locale + head + title= page_title(yield(:page_title)) + link rel= 'author' href= '/humans.txt' + meta name="viewport" content="initial-scale=1.0,width=device-width" + - if Rails.env.production? + = render 'mixpanel' + = render 'analytics' + = render 'fav_icons' + = stylesheet_link_tag 'coderwall' + = csrf_meta_tag + + meta name='twitter:account_id' content=ENV['TWITTER_ACCOUNT_ID'] + = metamagic + + + + = yield :head + body.protip-single + = render 'nav_bar' + + canvas.blur src=image_path(users_background_image) + = yield + + - if current_user + #x-following-users.hide data-users=current_user.following_users.map(&:username) + #x-following-networks.hide data-networks=current_user.following_networks.map(&:slug) + #x-following-teams.hide data-teams=current_user.teams_being_followed.map(&:name) + + - unless is_admin? + javascript: + window.console.log = function(){}; + + = javascript_include_tag 'coderwall' + = render partial: 'shared/mixpanel_properties' + = javascript_include_tag 'highlight/highlight.js' + = javascript_include_tag 'highlight/language.js' + = javascript_include_tag 'autosaver.js' + = javascript_include_tag 'protips' + + = yield :javascript + + = render partial: 'current_user_js' + diff --git a/app/views/layouts/sitemap.xml.haml b/app/views/layouts/sitemap.xml.haml deleted file mode 100644 index c0055487..00000000 --- a/app/views/layouts/sitemap.xml.haml +++ /dev/null @@ -1,8 +0,0 @@ -!!! XML -%urlset{xmlns: "http://www.sitemaps.org/schemas/sitemap/0.9"} - =yield - -#About page - %loc /about - %lastmod 2009-08-28 - / %changefreq monthly - / %priority 0.5 diff --git a/app/views/links/_link.html.haml b/app/views/links/_link.html.haml deleted file mode 100644 index 096cc889..00000000 --- a/app/views/links/_link.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -.link - %h4=link_to(link.title, link.url, :target => :new) - .content - -if link.thumbnail? - =link_to(image_tag(link.thumbnail_url), link.url, :target => :new) - %p=link.description - .users - -User.find(link.user_ids).each do |user| - =avatar_image_tag(user) - - / $('.link').live('mouseover', function(){ - / $('.users').fadeOut(); - / $(this).children('.users').fadeIn(); - / }); - diff --git a/app/views/links/index.html.haml b/app/views/links/index.html.haml deleted file mode 100644 index 6e9ed2ca..00000000 --- a/app/views/links/index.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -/ probably need to filter by tech -/ allow users to add from this page -/ allow users to add TL;DR -/ pagination -/ need to be able to suppress - -%h2 Trending tech headlines -.links - .col1=render @links1 - .col2=render @links2 - .col3=render @links3 \ No newline at end of file diff --git a/app/views/mosaic/teams.html.haml b/app/views/mosaic/teams.html.haml deleted file mode 100644 index 597b03cd..00000000 --- a/app/views/mosaic/teams.html.haml +++ /dev/null @@ -1,2 +0,0 @@ --@teams.each do |team| - .team-mosiac=link_to(image_tag(team.avatar_url, :width => 80, :height => 80), team_path(team)) \ No newline at end of file diff --git a/app/views/mosaic/users.html.haml b/app/views/mosaic/users.html.haml deleted file mode 100644 index 47951a4b..00000000 --- a/app/views/mosaic/users.html.haml +++ /dev/null @@ -1,2 +0,0 @@ --@users.each do |user| - .user-mosaic=link_to(users_image_tag(user, :width => 80, :height => 80), badge_path(:username => user.username)) diff --git a/app/views/networks/_alphabetized_list.html.haml b/app/views/networks/_alphabetized_list.html.haml index 71005bca..820bead7 100644 --- a/app/views/networks/_alphabetized_list.html.haml +++ b/app/views/networks/_alphabetized_list.html.haml @@ -1,13 +1,11 @@ - --cache ['v4', 'network_list', networks_list.count, params[:sort] || "unsorted", is_admin?, user.try(:id)], :expires_in => 1.day do - - networks = networks_list.sort_by(&:name) - - unless networks.blank? - - current_char = networks.first.name[0] - - alpha_networks = [] - - networks.each do |network| - - if current_char != network.name[0] - = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} - - alpha_networks = [] - - alpha_networks << network - - current_char = network.name[0] - = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} +- networks = networks_list.sort_by(&:name) +- unless networks.blank? + - current_char = networks.first.name[0] + - alpha_networks = [] + - networks.each do |network| + - if current_char != network.name[0] + = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} + - alpha_networks = [] + - alpha_networks << network + - current_char = network.name[0] + = render :partial => "alpha_network", :locals => {:alphabet => current_char, :networks => alpha_networks} diff --git a/app/views/networks/_navigation.html.haml b/app/views/networks/_navigation.html.haml deleted file mode 100644 index a0da6a36..00000000 --- a/app/views/networks/_navigation.html.haml +++ /dev/null @@ -1,21 +0,0 @@ -%header.cf.second-level-header - -#%input.network-search(type='text' value='search networks') - / %h1 - - unless network.nil? - %h1.underline-test{:style => "border-color:##{color_signature(network.slug)}"} - = network.name - - else - %h1 - Networks - / All Networks - %ul.second-level-toplinks - %li - %a{:href => networks_path, :class => networks_nav_class(:index)} - All networks - %li - %a{:href => signed_in? ? user_networks_path(current_user.username) : signup_path, :class => networks_nav_class(:user)} - %span - My networks - -#%li - -# %a{:href => featured_networks_path, :class => networks_nav_class(:featured)} - -# Featured \ No newline at end of file diff --git a/app/views/networks/_network.html.haml b/app/views/networks/_network.html.haml deleted file mode 100644 index dceb5e01..00000000 --- a/app/views/networks/_network.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -.network.cf{:style => right_border_css(network.slug, 14)} - - if new_network?(network) - .new - %span - new - -if is_admin? - = link_to '', network_url(network.slug), :method => :delete, :remote => true, :class => 'remove' - %h2 - %a{:href => network_path(network.slug)} - =network.name - - %ul.tags.cf - - network.ordered_tags.first(3).each do |tag| - %li - = link_to tag, network_path(network.slug) - - / %ul.tips-and-users - / %li - / / %a.users{:href => members_network_url(network.slug)} - / / Members - / / %span - / / = network.members.count - / %li - / / %a.tips{:href => network_path(network.slug)} - / / Protips - / / %span - / / = network.protips_count_cache - - =link_to '', join_or_leave_path(network), :remote => signed_in?, :method => :post, :rel => "nofollow", :class => join_or_leave_class(network)+" join-or-leave track", 'data-action' => (join_or_leave_tracking(network) + ' network'), 'data-from' => 'networks page', 'data-properties' => {'network name' => network.name}.to_json diff --git a/app/views/networks/_network.html.slim b/app/views/networks/_network.html.slim new file mode 100644 index 00000000..b846fdc7 --- /dev/null +++ b/app/views/networks/_network.html.slim @@ -0,0 +1,8 @@ +.network.cf style=(right_border_css(network.slug, 14)) + - if new_network?(network) + .new + span new + h2 = link_to network.name, network_path(network.slug) + p = "Protips: #{network.protips_count_cache}" + + =link_to '', join_or_leave_path(network), :remote => signed_in?, :method => :post, :rel => "nofollow", :class => join_or_leave_class(network)+" join-or-leave track", 'data-action' => (join_or_leave_tracking(network) + ' network'), 'data-from' => 'networks page', 'data-properties' => {'network name' => network.name}.to_json diff --git a/app/views/networks/_network_navigation.html.haml b/app/views/networks/_network_navigation.html.haml new file mode 100644 index 00000000..fc1d681c --- /dev/null +++ b/app/views/networks/_network_navigation.html.haml @@ -0,0 +1,14 @@ +%header.cf.second-level-header.networks-header + -#%input.network-search(type='text' value='search networks') + / %h1 + - unless network.nil? + %h1.underline-test{:style => "border-color:##{color_signature(network.slug)}"} + = network.name + - else + %h1 + Networks + / All Networks + %ul.second-level-toplinks + %li + %a{:href => networks_path, :class => networks_nav_class(:index)} + All networks diff --git a/app/views/networks/current_mayor.html.haml b/app/views/networks/current_mayor.html.haml deleted file mode 100644 index 4da19aba..00000000 --- a/app/views/networks/current_mayor.html.haml +++ /dev/null @@ -1,34 +0,0 @@ --content_for :page_title do - ==#{@mayor.display_name} unlocked #{@badge.display_name} - --content_for :mixpanel do - =record_event('viewed achievement', :viewing_self => viewing_self?, :achievement => "mayor") - -.achievement-unlocked - .tip-content - %h1 Achievement Unlocked - #award=image_tag(@badge.image_path) - %h2=@badge.display_name - -if viewing_self? - #plaque - %p - ="Congrats, you leveled up! You've unlocked the #{@badge.display_name} achievement for #{@badge.for}" - ==#{@badge.friendly_percent_earned} of developers on Coderwall have earned this. - .clear.center - #getyourachievements - =custom_tweet_button 'Share on Twitter', {:text => "Achievement Unlocked: #{@badge.display_name}", :via => 'coderwall'}, {:class => 'clickme first track', 'data-action' => 'share achievement', 'data-from' => 'achievement', 'data-properties' => {'achievement' => 'mayor'}.to_json, :action => 'unlocked_achievement'} - .see-all - -if @badge.next - =link_to 'See Next Achievement', user_achievement_path(:username=>@user.username,:id=>@badge.next) - -else - =link_to 'View your profile', badge_path(:username => @mayor.username) - -else - #plaque - %p - ==#{@mayor.display_name} unlocked the #{@badge.display_name} achievement for #{@badge.for} - ==#{@badge.friendly_percent_earned} of developers on Coderwall have earned this. - =link_to "See #{@mayor.display_name}'s other achievements", badge_path(:username => @mayor.username), :class => 'seeprofile track', 'data-action' => 'view user achievements', 'data-from' => 'achievement', 'data-properties' => {'achievement' => 'mayor'}.to_json - .clear - .clear.center - #getyourachievements=link_to 'See Your Achievements', signup_path, :class => 'clickme track', 'data-action' => 'view own achievements', 'data-from' => 'achievement', 'data-properties' => {'achievement' => 'mayor'}.to_json - .see-all=link_to("View #{@mayor.display_name}'s profile", badge_path(:username => @mayor.username), 'data-action' => 'view user profile', 'data-from' => 'achievement', 'data-properties' => {'achievement' => 'mayor'}.to_json) diff --git a/app/views/networks/index.html.haml b/app/views/networks/index.html.haml index 71ddabf8..8039b70e 100644 --- a/app/views/networks/index.html.haml +++ b/app/views/networks/index.html.haml @@ -21,14 +21,14 @@ %li=link_to 'Protips', by_tags_protips_path .inside-main-content.cf - = render partial: 'navigation', locals: {network: nil} + = render partial: 'network_navigation', locals: {network: nil} %ul.networks-filter.cf %li %a{href: networks_path, class: networks_sub_nav_class('') + networks_sub_nav_class('a_z')} A - Z - if @index_networks_params[:action] == 'index' %li.add-network - =link_to('Add Network', add_network_url, class: '') + =link_to('Add Network', 'mailto:support@coderwall.com?subject=Request for a new network') %ol.networks-list - if @networks.blank? diff --git a/app/views/networks/new.html.haml b/app/views/networks/new.html.haml deleted file mode 100644 index 8817a007..00000000 --- a/app/views/networks/new.html.haml +++ /dev/null @@ -1,26 +0,0 @@ - -= content_for :body_id do - protip-multiple - -.inside-main-content.cf - %ol.networks-list - = form_for @network do |f| - .network.cf - .new - %span - new - %h2 - = f.text_field :name - %ul.tips-and-users - %li - %a.users - Members - %span - 0 - %li - %a.tips - Protips - %span - 0 - %li - = f.submit 'Add' diff --git a/app/views/networks/show.html.haml b/app/views/networks/show.html.haml deleted file mode 100644 index 0bc25eb6..00000000 --- a/app/views/networks/show.html.haml +++ /dev/null @@ -1,178 +0,0 @@ --content_for :mixpanel do - =record_event('viewed network', :network => @network.slug, :sort => (params[:sort] || 'upvotes')) - -= content_for :body_id do - protip-multiple - -= content_for :content_wrapper do - = false - -=content_for :javascript do - = javascript_include_tag 'hyphenator/hyphenator' - =javascript_include_tag 'protips' - =javascript_include_tag 'networks' - :javascript - Hyphenator.run() - -.inside-main-content.cf - = render :partial => 'navigation', :locals => {:network => @network} - %aside.protips-sidebar - %ul.protip-actions - %li - =link_to('', join_or_leave_path(@network), :remote => signed_in?, :method => :post, :rel => "nofollow", :class => join_or_leave_class(@network)+" join-or-leave track", 'data-action' => (join_or_leave_tracking(@network) + ' network'), 'data-from' => 'network', 'data-properties' => {'network name' => @network.name}.to_json) - - %li - %a.share{:href => new_protip_path(:topics => @network.name), :class => "track", 'data-action' => "create protip", 'data-from' => 'network'} - Share a protip - %ul.filter - %li - %a{:href => network_path(@network.slug, :sort => 'upvotes'), :class => (selected_class('') + selected_class('upvotes'))} - Popular - -if is_admin? - %li - %a{:href => network_path(@network.slug, :sort => 'trending'), :class => (selected_class('') + selected_class('trending'))} - Trending - %li - %a{:href => network_path(@network.slug, :sort => 'hn'), :class => (selected_class('') + selected_class('hn'))} - HN - %li - %a{:href => network_path(@network.slug, :sort => 'popular'), :class => (selected_class('') + selected_class('popular'))} - Popular(new) - %li - %a{:href => network_path(@network.slug, :sort => 'new'), :class => selected_class('new')} - New - -#- if @network.recent_protips_count > 0 - -# %span - -# = @network.recent_protips_count - %li - %a{:href => members_network_path(@network.slug), :class => selected_class('members')} - Members - -#- if @network.members(nil).count > 0 - -# %span - -# = @network.members(nil).count - - if is_admin? - %li - %a{:href => network_path(@network.slug, :filter => 'featured'), :class => selected_class('featured')} - Featured - - if @network.featured_protips.count > 0 - %span - = @network.featured_protips.count - %li - %a{:href => network_path(@network.slug, :filter => 'flagged'), :class => selected_class('flagged')} - Flagged - - if @network.flagged_protips.count > 0 - %span - = @network.flagged_protips.count - - if @network.resident_expert - .side-box - %a{:href => faq_path(:anchor => "resident-expert")} - .side-box-header.expert - %h3 Resident Expert - .inside.cf - %a.avatar{:href => badge_path(@network.resident_expert.username)} - =image_tag(users_image_path(@network.resident_expert)) - %ul.details - %li - %a.users{:href => badge_path(@network.resident_expert.username)} - = @network.resident_expert.username - %li - %a.tips{:href => expert_network_path(@network.slug)} - Show protips - -#%p.resident-text - -# Our resident experts are industry leaders in their field. - - - if @network.mayor - .side-box - %a{:href => faq_path(:anchor => "mayor")} - .side-box-header.mayor - %h3 Mayor - .inside.cf - %a.avatar{:href => badge_path(@network.mayor.username)} - =image_tag(users_image_path(@network.mayor)) - %ul.details - %li - %a.users{:href => badge_path(@network.mayor.username)} - = @network.mayor.username - %li - %a.tips{:href => mayor_network_path(@network.slug)} - Show protips - - else - .side-box - .side-box-header.mayor - %h3 Mayor - .inside.cf - %p - Want to become the mayor of - = "#{@network.name}?" - start - =link_to 'sharing', new_protip_path(:topics => @network.name) - great pro tips - - - if is_admin? - .network-details - %h3 Tags in this network - %p - %ul.tag-list.cf - - @network.ordered_tags.each do |tag| - %li - %a{:href => tagged_network_path(@network.slug, :tags => [tag])} - = tag - - if is_admin? - .admin-tags - = form_for :tags, :url => update_tags_network_url(@network.slug), :method => :post do |f| - = f.text_area :tags, :label => false, :value => (@network.ordered_tags + @network.tags).uniq.join(", ") - = f.submit 'Update Tags', :class => "update-tags" - - - else - - cache ['v1',"network_details", @network.slug, @network.tags.count, @network.updated_at.to_i], :expires_in => 1.week do - .network-details - %h3 Tags in this network - %p - %ul.tag-list.cf - - @network.ordered_tags.each do |tag| - %li - %a{:href => tagged_network_path(@network.slug, :tags => [tag])} - = tag - - - - if @protips.blank? - %ul.list-of-members.cf - - @network.ranked_members.each_with_index do |member, index| - %li - .header.cf - - the_mayor = member.is_mayor_of?(@network) - .mayor-level{:class => ("the-mayor" if the_mayor)} - %span - = (index+1).ordinalize unless the_mayor - %a.user.track{:href => badge_path(member.username), 'data-action' => 'view user profile', 'data-from' => 'network members (avatar)', 'data-properties' => {'network name' => @network.name}.to_json} - =image_tag(users_image_path(member)) - .details - %h2 - %a{:href => badge_path(member.username), 'data-action' => 'view user profile', 'data-from' => 'network members (username)', 'data-properties' => {'network name' => @network.name}.to_json} - = member.username - - unless member.team.nil? - %ul - %li - of team - %a.user{:href => teamname_path(member.team.slug), 'data-action' => 'view team', 'data-from' => 'network members (team name)', 'data-properties' => {'network name' => @network.name}.to_json} - = member.team.name - %li - = member.title - - %ul.actions-list - %li - %a.view{:href => profile_path(member.username), 'data-action' => 'view user profile', 'data-from' => 'network members (view profile)', 'data-properties' => {'network name' => @network.name}.to_json} - View Profile - -#%li - -# %a.write-tip{:href => user_protips_path(member.username), 'data-action' => "#{@network.name} member protips view"} - -# Protips - .three-cols-more - - more_members = @network.members.count-@network.ranked_members.count - - if more_members > 0 - .more-members - - = more_members - more members - - else - .protips-content - = render :partial => "protips/grid", :locals => {:protips => @protips.results, :collection => @protips, :url => :protips_path, :hide_more => false, :width => 3, :opportunity => @job, :mode => 'popup'} diff --git a/app/views/networks/tag.html.haml b/app/views/networks/tag.html.haml deleted file mode 100644 index 7e7ec972..00000000 --- a/app/views/networks/tag.html.haml +++ /dev/null @@ -1,20 +0,0 @@ --content_for :mixpanel do - =record_event('viewed tagged protips', :tag => @topics.join("+")) --# --#= content_for :content_wrapper do --# = false -= render :partial => "protips/head", :locals => {:topic => @topics} - -%aside.protips-sidebar - %ul.protip-actions - %li - =link_to('Share a protip', new_protip_path(:topics => @topics.join(",")), :class => 'share track', 'data-action' => 'create protip', 'data-from' => 'tagged protips page') - -.protips-content - -if @protips.blank? - .message - Be the first to share your expertise on - = link_to @topics.to_sentence.html_safe, new_protip_path(:topics => @topics.join(",")) - == . - - else - = render :partial => "protips/grid", :locals => {:protips => @protips.results, :collection => @protips, :url => :protips_path, :hide_more => false, :width => 3, :mode => 'popup'} \ No newline at end of file diff --git a/app/views/networks/tag.js.erb b/app/views/networks/tag.js.erb deleted file mode 100644 index 8096845e..00000000 --- a/app/views/networks/tag.js.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'protips/search_response', :locals => {:append_to => '.protips-content'} %> \ No newline at end of file diff --git a/app/views/notifier/comment_reply.html.haml b/app/views/notifier/comment_reply.html.haml deleted file mode 100644 index fbc23684..00000000 --- a/app/views/notifier/comment_reply.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -%tr - %td.main-content-grey{:style => "padding: 30px 60px; background:#ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %p{:style => "font-size: 16px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'; margin-bottom: 10px;"} - Hey - == #{@user.short_name}, - - %p{:style => "font-size: 14px; margin: 0; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - #{@commentor.username} has replied to your comment on the pro tip: - =link_to @comment.commentable.try(:title), protip_url(@comment.commentable.public_id), {:style => "color: #3D8DCC;"} - == - %div{:style => "border-left: solid 5px #ECE9E2; padding-left: 10px; font-family:'Georgia','Times','Serif'; font-style: italic; font-size: 14px; line-height: 22px;"} - =raw CFM::Markdown.render(escape_scripts(@comment.body)) - =link_to 'View/Reply', protip_url(@comment.commentable.try(:public_id)) + "#comment_#{@comment.id}", {:style => "color: #3d8dcc; font-size: 14px;"} \ No newline at end of file diff --git a/app/views/notifier/comment_reply.text.erb b/app/views/notifier/comment_reply.text.erb deleted file mode 100644 index e7b7d8d2..00000000 --- a/app/views/notifier/comment_reply.text.erb +++ /dev/null @@ -1,9 +0,0 @@ -Hey <%= @user.short_name %>, - -<%= @commentor.username %> replied to your comment on the pro tip: <%= @comment.commentable.try(:title) %> - -<%= @comment.body %> - -View/Reply: <%= protip_url(@comment.commentable.try(:public_id), :reply_to => "@#{@commentor.username}") + "#comment_#{@comment.id}" %> - -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier/invoice.html.haml b/app/views/notifier/invoice.html.haml deleted file mode 100644 index c146017b..00000000 --- a/app/views/notifier/invoice.html.haml +++ /dev/null @@ -1,30 +0,0 @@ -%tr - %td.main-content-grey{:style => "padding: 30px 60px; background:#ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %p{:style => "font-size: 16px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'; margin-bottom: 10px;"} - ==Your card has ending in #{@customer[:active_card][:last4]} been charged - %table{:style => "width:600"} - %tr - %td - == Bill Date: #{Time.at(@invoice[:date]).strftime("%B %d, %Y")} - %tr - %td - %tr - %td - Assembly Made, Inc - 548 Market St #45367 - San Francisco, CA 94104-5401 - %td - Bill To: - ==#{@team.account.admin.display_name} - = @team.name - %tr - %td - Duration: - ==#{Time.at(@invoice[:lines][:subscriptions].first[:period][:start]).strftime("%B %d, %Y")}-#{Time.at(@invoice[:lines][:subscriptions].first[:period][:end]).strftime("%B %d, %Y")} - %td - Description: - Enhanced Team Profile (4 job posts anytime) - =link_to teamname_url(:slug => @team.slug), teamname_url(:slug => @team.slug) - %td - Price: - = number_to_currency(@invoice[:amount_due]/100) diff --git a/app/views/notifier/new_applicant.html.haml b/app/views/notifier/new_applicant.html.haml deleted file mode 100644 index 900ada45..00000000 --- a/app/views/notifier/new_applicant.html.haml +++ /dev/null @@ -1,20 +0,0 @@ -# encoding: utf-8 -%tr - %td.main-content-grey{:style => "padding: 30px 60px;background: #ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - = @user.display_name - has applied for - = link_to @job.title, job_path(@job), {:style => "color: #3D8DCC;"} - - .divider{:style => "height: 3px;background: #dbd7cd; margin-bottom: 15px;"} - %p{:style => "font-size: 14px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - == #{@user.short_name}'s info: - %ul - %li{:style => "font-size: 14px;line-height: 22px;"} - = @user.email - %li{:style => "font-size: 14px;line-height: 22px;"} - =link_to('Coderwall Profile', badge_url(@user.username), {:style => "color: #3D8DCC;"}) - %li{:style => "font-size: 14px;line-height: 22px;"} - =link_to('Resume', @user.resume_url, {:style => "color: #3D8DCC;"}) - - diff --git a/app/views/notifier/new_comment.html.haml b/app/views/notifier/new_comment.html.haml deleted file mode 100644 index fc9e5af7..00000000 --- a/app/views/notifier/new_comment.html.haml +++ /dev/null @@ -1,13 +0,0 @@ -%tr - %td.main-content-grey{:style => "padding: 30px 60px; background:#ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %p{:style => "font-size: 16px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'; margin-bottom: 10px;"} - Hey - == #{@user.short_name}, - - %p{:style => "font-size: 14px; margin: 0; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - #{@commentor.username} has commented on your pro tip: - =link_to @comment.commentable.try(:title), protip_url(@comment.commentable.public_id), {:style => "color: #3D8DCC;"} - == - %div{:style => "border-left: solid 5px #ECE9E2; padding-left: 10px; font-family:'Georgia','Times','Serif'; font-style: italic; font-size: 14px; line-height: 22px;"} - =raw CFM::Markdown.render(escape_scripts(@comment.body)) - =link_to 'View/Reply', protip_url(@comment.commentable.try(:public_id)) + "#comment_#{@comment.id}", {:style => "color: #3d8dcc; font-size: 14px;"} diff --git a/app/views/notifier/new_comment.text.erb b/app/views/notifier/new_comment.text.erb deleted file mode 100644 index 929ef974..00000000 --- a/app/views/notifier/new_comment.text.erb +++ /dev/null @@ -1,9 +0,0 @@ -Hey <%= @user.short_name %>, - -<%= @commentor.username %> has commented on your pro tip: <%= @comment.commentable.try(:title) %> - -<%= @comment.body %> - -View/Reply: <%= protip_url(@comment.commentable.try(:public_id)) + "#comment_#{@comment.id}" %> - -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier/remind_to_create_team.text.erb b/app/views/notifier/remind_to_create_team.text.erb deleted file mode 100644 index 0d0c3b1c..00000000 --- a/app/views/notifier/remind_to_create_team.text.erb +++ /dev/null @@ -1,18 +0,0 @@ -Hey Friend, - -Creating a team page on Coderwall has some great advantages. Getting on the Team Leaderboard is a great way to show off your team’s geek cred and increase your visibility on Coderwall. Plus, members can stay up to date with teams by following them and receiving the team’s updates in their dashboard. - -Starting your team page is simple: -1. reserve a team name -2. add your company logo -3. invite your team members - -Plus, here are a few things we'll do to make your new team page better. -* grab your member's pro tips and put them on your page -* scan your member's profile to populate your skills -* assign your team a score to rank against others -* beautifully display all of your members - -Voilà! You'll have a awesome page like Github and many others. - -What are you waiting for? Reserve your company's team page now. \ No newline at end of file diff --git a/app/views/notifier/remind_to_invite_team_members.html.haml b/app/views/notifier/remind_to_invite_team_members.html.haml deleted file mode 100644 index 049f7b33..00000000 --- a/app/views/notifier/remind_to_invite_team_members.html.haml +++ /dev/null @@ -1,43 +0,0 @@ -%tr - %td.content-head{:style => "padding: 30px 60px;border-bottom: solid 1px #d4cfc4;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'"} - %h1{:style => "-webkit-font-smoothing: antialiased;color: #393939;font-size: 26px;margin-bottom: 20px;text-align: center;margin: 0;line-height: 100%;font-size: 28px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - Is the #{@user.team.name} team all here? - -%tr - %td.main-content-grey{:style => "padding: 30px 60px;background: #ece9e2;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - Hey Friend, - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - The - = @user.team.name - team page looks great. Have you invited your whole team to join yet? There are a lot of advantages to having all your team members on the - = @user.team.name - page. - - - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %b 1) More team members can lead to a higher score <br> - Your team score is determined by each team member’s achievements, peer endorsements, speaking history, and then adjusted to the team’s central tendency. - - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %b 2) Higher score = higher ranking on team leaderboard <br> - The leaderboard is a fun way to showcase some of Coderwall’s most innovative and interesting teams. We know - = @user.team.name - is doing awesome things. With a higher team score, everyone else can know that, too. - - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - %b 3) Every team member counts <br> - Github is currently in 1st place on the Team Leaderboard with 61 members while Groupon is ranked 22nd with 60 members. Who is the one teammate that will push - = @user.team.name - up the leaderboard? - - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - - To add team members, share this private link with them: - =link_to(invitation_url(@user.team.id, :r => CGI.escape(@user.referral_token)), invitation_url(@user.team.id, :r => CGI.escape(@user.referral_token)), {:style => "color: #3d8dcc;"}) - - .divider{:style => "height: 10px;background: #dbd7cd;"} - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - Check out the FAQ (https://coderwall.com/faq) if you have questions about how teams work. - .divider{:style => "height: 10px;background: #dbd7cd;"} diff --git a/app/views/notifier/remind_to_invite_team_members.text.erb b/app/views/notifier/remind_to_invite_team_members.text.erb deleted file mode 100644 index a743fc9c..00000000 --- a/app/views/notifier/remind_to_invite_team_members.text.erb +++ /dev/null @@ -1,19 +0,0 @@ -Hey Friend, - -The <%= @user.team.name %> team page looks great. Have you invited your whole team to join yet? There are a lot of advantages to having all your team members on the <%= @user.team.name %> page. - -1) More team members can lead to a higher score -Your team score is determined by each team member’s achievements, peer endorsements, speaking history, and then adjusted to the team’s central tendency. - -2) Higher score = higher ranking on team leaderboard -The leaderboard is a fun way to showcase some of Coderwall’s most innovative and interesting teams. We know <%= @user.team.name %> is doing awesome things. With a higher team score, everyone else can know that, too. - -3) Every team member counts -Github is currently in 1st place on the Team Leaderboard with 61 members while Groupon is ranked 22nd with 60 members. Who is the one teammate that will push <%= @user.team.name %> up the leaderboard? - -To add team members, just share this private link: <%= invitation_url(@user.team.id, :r => CGI.escape(@user.referral_token)) %> - -Matt & the Coderwall team -P.S. Make sure to follow us on twitter (@coderwall) - -Check out the FAQ (https://coderwall.com/faq) if you have questions about how teams work. \ No newline at end of file diff --git a/app/views/notifier/welcome_email.html.haml b/app/views/notifier/welcome_email.html.haml deleted file mode 100644 index 908736a3..00000000 --- a/app/views/notifier/welcome_email.html.haml +++ /dev/null @@ -1,44 +0,0 @@ -- font_family = "font-family: 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'" -- main_content_grey = "padding: 30px 60px; background: #ece9e2; #{font_family};" -- paragraph = "font-size: 14px; line-height: 22px; #{font_family};" -- h1 = "-webkit-font-smoothing: antialiased; color: #393939; font-size: 26px; margin-bottom: 20px; text-align: center; margin: 0; line-height: 100%; font-size: 28px; font-family: 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif';" -- list_item = "font-size: 14px; line-height: 22px;" -- content_head = "padding: 30px 60px; border-bottom: solid 1px #d4cfc4; #{font_family};" -- anchor = "color: #3d8dcc; text-decoration: none; font-size: 14px;" - -%tr - %td.content-head{style: content_head} - %h1{style: h1} - Good news friend, your Coderwall is up! -%tr - %td.main-content-grey{style: main_content_grey} - %p{style: paragraph} - We’re thrilled to welcome you to the Coderwall community. Let’s get started! - %p{style: paragraph} - Here are three ways to enhance your Coderwall experience: - %ol - - if @user.on_team? - - invite_to_team_url = invitation_url(@user.team.id, r: CGI.escape(@user.referral_token)) - %li{style: list_item} - == Invite others to team #{@user.team.name}. Share this private link with your coworkers so they can join your team: #{link_to(invite_to_team_url, invite_to_team_url)} - - else - %li{style: list_item} - = "#{link_to("Reserve your company's team page", new_team_url, style: anchor)}. Invite at least 3 coworkers to have your team show up on the #{link_to('leaderboard', leaderboard_url, style: "color: #3d8dcc; text-decoration: none; font-size: 14px;")}.".html_safe - - %li{style: list_item} - Check out the - = link_to('trending', 'https://coderwall.com/trending', style: anchor) - pro tips and - = link_to('share your own', 'https://coderwall.com/p/new', style: anchor) - %li{style: list_item} - == Display your achievements on your personal website or blog using our #{link_to('badge widget', api_url, style: anchor)}. -%tr - %td.main-content-grey{style: main_content_grey} - %h1{style: h1} - Have ideas to improve Coderwall? - %p{style: paragraph} - :erb - Coderwall is a community supported, open product built on <a href="http://assemblymade.com" style="<%= anchor %>">Assembly</a>. That means anyone (you!) can build new features, improve old code and help Coderwall grow. Every month revenue is shared among everyone who helps build and maintain it. Visit Coderwall on Assembly to learn more. - %p{style: paragraph} - :erb - <a href="https://assemblymade.com/coderwall" style="<%= anchor %>">Check out Coderwall on Assembly</a> diff --git a/app/views/notifier/alert_admin.html.haml b/app/views/notifier_mailer/alert_admin.html.haml similarity index 100% rename from app/views/notifier/alert_admin.html.haml rename to app/views/notifier_mailer/alert_admin.html.haml diff --git a/app/views/notifier/authy.text.erb b/app/views/notifier_mailer/authy.text.erb similarity index 100% rename from app/views/notifier/authy.text.erb rename to app/views/notifier_mailer/authy.text.erb diff --git a/app/views/notifier_mailer/comment_reply.html.haml b/app/views/notifier_mailer/comment_reply.html.haml new file mode 100644 index 00000000..a553fb09 --- /dev/null +++ b/app/views/notifier_mailer/comment_reply.html.haml @@ -0,0 +1,13 @@ +%tr + %td.main-content-grey{:style => "padding: 30px 60px; background:#ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + %p{:style => "font-size: 16px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'; margin-bottom: 10px;"} + Hey + == #{@user.short_name}, + + %p{:style => "font-size: 14px; margin: 0; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + #{@commentor.username} has replied to your comment on the pro tip: + =link_to @comment.protip.title, protip_url(@comment.protip.public_id), {:style => "color: #3D8DCC;"} + == + %div{:style => "border-left: solid 5px #ECE9E2; padding-left: 10px; font-family:'Georgia','Times','Serif'; font-style: italic; font-size: 14px; line-height: 22px;"} + =raw CFM::Markdown.render(escape_scripts(@comment.body)) + =link_to 'View/Reply', protip_url(@comment.protip.public_id) + "#comment_#{@comment.id}", {:style => "color: #3d8dcc; font-size: 14px;"} \ No newline at end of file diff --git a/app/views/notifier_mailer/comment_reply.text.erb b/app/views/notifier_mailer/comment_reply.text.erb new file mode 100644 index 00000000..fcc06f5b --- /dev/null +++ b/app/views/notifier_mailer/comment_reply.text.erb @@ -0,0 +1,9 @@ +Hey <%= @user.short_name %>, + +<%= @commentor.username %> replied to your comment on the pro tip: <%= @comment.protip.title %> + +<%= @comment.body %> + +View/Reply: <%= protip_url(@comment.protip.public_id, :reply_to => "@#{@commentor.username}") + "#comment_#{@comment.id}" %> + +<%= NotifierMailer::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier_mailer/invoice.html.slim b/app/views/notifier_mailer/invoice.html.slim new file mode 100644 index 00000000..1121220e --- /dev/null +++ b/app/views/notifier_mailer/invoice.html.slim @@ -0,0 +1,32 @@ +tr + td.main-content-grey style= "padding: 30px 60px; background:#ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';" + p style="font-size: 16px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'; margin-bottom: 10px;" + ="Your card ending in #{card_for(@customer)[:last4]} has been charged" + table style="width:600" + tr + td + ="Bill Date: #{invoice_date(@invoice)} " + tr + td + tr + td + |Assembly Made, Inc + br + |548 Market St #45367 + br + |San Francisco, CA 94104-5401 + td + |Bill To: + ="#{@team.account.admin.display_name} " + = @team.name + tr + td + |Duration: + ="#{subscription_period_for(@invoice, :start)}-#{subscription_period_for(@invoice, :end)}" + td + |Description: + |Enhanced Team Profile (4 job posts anytime) + =link_to teamname_url(:slug => @team.slug), teamname_url(:slug => @team.slug) + td + |Price: + = number_to_currency(@invoice[:amount_due]/100) diff --git a/app/views/notifier/new_activity.html.haml b/app/views/notifier_mailer/new_activity.html.haml similarity index 100% rename from app/views/notifier/new_activity.html.haml rename to app/views/notifier_mailer/new_activity.html.haml diff --git a/app/views/notifier/new_activity.text.erb b/app/views/notifier_mailer/new_activity.text.erb similarity index 89% rename from app/views/notifier/new_activity.text.erb rename to app/views/notifier_mailer/new_activity.text.erb index 77993b16..98000e05 100644 --- a/app/views/notifier/new_activity.text.erb +++ b/app/views/notifier_mailer/new_activity.text.erb @@ -6,4 +6,4 @@ Matt & the Coderwall team P.S. Make sure to follow us on twitter (@coderwall) -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file +<%= NotifierMailer::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier_mailer/new_applicant.html.haml b/app/views/notifier_mailer/new_applicant.html.haml new file mode 100644 index 00000000..e6d0b0a3 --- /dev/null +++ b/app/views/notifier_mailer/new_applicant.html.haml @@ -0,0 +1,21 @@ +# encoding: utf-8 +%tr + %td.main-content-grey{style: "padding: 30px 60px;background: #ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + %p{style: "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + = @user.display_name + has applied for + = link_to @job.title, job_path(@job), {style: "color: #3D8DCC;"} + + .divider{style: "height: 3px;background: #dbd7cd; margin-bottom: 15px;"} + %p{style: "font-size: 14px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + == #{@user.short_name}'s info: + %ul + %li{style: "font-size: 14px;line-height: 22px;"} + = @user.email + %li{style: "font-size: 14px;line-height: 22px;"} + =link_to('Coderwall Profile', badge_url(@user.username), {style: "color: #3D8DCC;"}) + - if resume_url = @user.resume.url.presence + %li{style: "font-size: 14px;line-height: 22px;"} + =link_to('Resume', asset_path(resume_url), {style: "color: #3D8DCC;"}) + + diff --git a/app/views/notifier/new_badge.html.haml b/app/views/notifier_mailer/new_badge.html.haml similarity index 100% rename from app/views/notifier/new_badge.html.haml rename to app/views/notifier_mailer/new_badge.html.haml diff --git a/app/views/notifier/new_badge.text.erb b/app/views/notifier_mailer/new_badge.text.erb similarity index 84% rename from app/views/notifier/new_badge.text.erb rename to app/views/notifier_mailer/new_badge.text.erb index 7ce7e389..420a8dea 100644 --- a/app/views/notifier/new_badge.text.erb +++ b/app/views/notifier_mailer/new_badge.text.erb @@ -3,4 +3,4 @@ Congrats <%= @user.short_name %>, You've earned a new badge for <%= @message %> <%= link_to 'See Earned Badge', user_achievement_url(:username => @user.username, :id => @badge.id) %> -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file +<%= NotifierMailer::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier_mailer/new_comment.html.haml b/app/views/notifier_mailer/new_comment.html.haml new file mode 100644 index 00000000..a5ae4cc1 --- /dev/null +++ b/app/views/notifier_mailer/new_comment.html.haml @@ -0,0 +1,13 @@ +%tr + %td.main-content-grey{:style => "padding: 30px 60px; background:#ffffff;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + %p{:style => "font-size: 16px; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'; margin-bottom: 10px;"} + Hey + == #{@user.short_name}, + + %p{:style => "font-size: 14px; margin: 0; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + #{@commentor.username} has commented on your pro tip: + =link_to @comment.protip.title, protip_url(@comment.protip.public_id), {:style => "color: #3D8DCC;"} + == + %div{:style => "border-left: solid 5px #ECE9E2; padding-left: 10px; font-family:'Georgia','Times','Serif'; font-style: italic; font-size: 14px; line-height: 22px;"} + =raw CFM::Markdown.render(escape_scripts(@comment.body)) + =link_to 'View/Reply', protip_url(@comment.protip.public_id) + "#comment_#{@comment.id}", {:style => "color: #3d8dcc; font-size: 14px;"} diff --git a/app/views/notifier_mailer/new_comment.text.erb b/app/views/notifier_mailer/new_comment.text.erb new file mode 100644 index 00000000..e57d99f4 --- /dev/null +++ b/app/views/notifier_mailer/new_comment.text.erb @@ -0,0 +1,9 @@ +Hey <%= @user.short_name %>, + +<%= @commentor.username %> has commented on your pro tip: <%= @comment.protip.title %> + +<%= @comment.body %> + +View/Reply: <%= protip_url(@comment.protip.public_id) + "#comment_#{@comment.id}" %> + +<%= NotifierMailer::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier/new_follower.text.erb b/app/views/notifier_mailer/new_follower.text.erb similarity index 89% rename from app/views/notifier/new_follower.text.erb rename to app/views/notifier_mailer/new_follower.text.erb index c4cc9262..fa5bcc3b 100644 --- a/app/views/notifier/new_follower.text.erb +++ b/app/views/notifier_mailer/new_follower.text.erb @@ -5,4 +5,4 @@ Hey <%= @user.short_name %> Matt & the Coderwall team P.S. Make sure to follow us on twitter (@coderwall) -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file +<%= NotifierMailer::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier/new_lead.text.erb b/app/views/notifier_mailer/new_lead.text.erb similarity index 100% rename from app/views/notifier/new_lead.text.erb rename to app/views/notifier_mailer/new_lead.text.erb diff --git a/app/views/notifier/newsletter_june_18.html.haml b/app/views/notifier_mailer/newsletter_june_18.html.haml similarity index 100% rename from app/views/notifier/newsletter_june_18.html.haml rename to app/views/notifier_mailer/newsletter_june_18.html.haml diff --git a/app/views/notifier/newsletter_june_18.text.erb b/app/views/notifier_mailer/newsletter_june_18.text.erb similarity index 96% rename from app/views/notifier/newsletter_june_18.text.erb rename to app/views/notifier_mailer/newsletter_june_18.text.erb index 1b40f021..932b89e9 100644 --- a/app/views/notifier/newsletter_june_18.text.erb +++ b/app/views/notifier_mailer/newsletter_june_18.text.erb @@ -10,4 +10,4 @@ To help us launch coderwall's new pro tip feature, we asked some of the awesome Matt & the Coderwall team P.S. Make sure to follow us on twitter (@coderwall) -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file +<%= NotifierMailer::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/notifier/newsletter_networks.html.haml b/app/views/notifier_mailer/newsletter_networks.html.haml similarity index 100% rename from app/views/notifier/newsletter_networks.html.haml rename to app/views/notifier_mailer/newsletter_networks.html.haml diff --git a/app/views/notifier/remind_to_create_team.html.haml b/app/views/notifier_mailer/remind_to_create_team.html.haml similarity index 83% rename from app/views/notifier/remind_to_create_team.html.haml rename to app/views/notifier_mailer/remind_to_create_team.html.haml index b0e2ae8b..0e5089d8 100644 --- a/app/views/notifier/remind_to_create_team.html.haml +++ b/app/views/notifier_mailer/remind_to_create_team.html.haml @@ -8,9 +8,6 @@ %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} Hey Friend, - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} - Creating a team page on Coderwall has some great advantages. Getting on the Team Leaderboard is a great way to show off your team’s geek cred and increase your visibility on Coderwall. Plus, members can stay up to date with teams by following them and receiving the team’s updates in their dashboard. - %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} Starting your team page is simple: %ol{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} @@ -28,7 +25,6 @@ %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} Voilà! You'll have a awesome page like Github and - =link_to('many others.', "https://coderwall.com/leaderboard") %p %img{:width => "500"}(src = "/images/email/github_profile.jpg") diff --git a/app/views/notifier_mailer/remind_to_create_team.text.erb b/app/views/notifier_mailer/remind_to_create_team.text.erb new file mode 100644 index 00000000..532c8f6c --- /dev/null +++ b/app/views/notifier_mailer/remind_to_create_team.text.erb @@ -0,0 +1,18 @@ +Hey Friend, + +Creating a team page on Coderwall has some great advantages. + +Starting your team page is simple: +1. reserve a team name +2. add your company logo +3. invite your team members + +Plus, here are a few things we'll do to make your new team page better. +* grab your member's pro tips and put them on your page +* scan your member's profile to populate your skills +* assign your team a score to rank against others +* beautifully display all of your members + +Voilà! You'll have a awesome page like Github and many others. + +What are you waiting for? Reserve your company's team page now. \ No newline at end of file diff --git a/app/views/notifier_mailer/remind_to_invite_team_members.html.haml b/app/views/notifier_mailer/remind_to_invite_team_members.html.haml new file mode 100644 index 00000000..456b38e0 --- /dev/null +++ b/app/views/notifier_mailer/remind_to_invite_team_members.html.haml @@ -0,0 +1,31 @@ +%tr + %td.content-head{:style => "padding: 30px 60px;border-bottom: solid 1px #d4cfc4;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif'"} + %h1{:style => "-webkit-font-smoothing: antialiased;color: #393939;font-size: 26px;margin-bottom: 20px;text-align: center;margin: 0;line-height: 100%;font-size: 28px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + Is the #{@user.team.name} team all here? + +%tr + %td.main-content-grey{:style => "padding: 30px 60px;background: #ece9e2;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + + %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + Hey Friend, + %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + The + = @user.team.name + team page looks great. Have you invited your whole team to join yet? There are a lot of advantages to having all your team members on the + = @user.team.name + page. + + + %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + %b 1) More team members can lead to a higher score <br> + Your team score is determined by each team member’s achievements, peer endorsements, speaking history, and then adjusted to the team’s central tendency. + + %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + + To add team members, share this private link with them: + =link_to(invitation_url(@user.team.id, :r => CGI.escape(@user.referral_token)), invitation_url(@user.team.id, :r => CGI.escape(@user.referral_token)), {:style => "color: #3d8dcc;"}) + + .divider{:style => "height: 10px;background: #dbd7cd;"} + %p{:style => "font-size: 14px;line-height: 22px;font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} + Check out the FAQ (https://coderwall.com/faq) if you have questions about how teams work. + .divider{:style => "height: 10px;background: #dbd7cd;"} diff --git a/app/views/notifier_mailer/remind_to_invite_team_members.text.erb b/app/views/notifier_mailer/remind_to_invite_team_members.text.erb new file mode 100644 index 00000000..8044e99e --- /dev/null +++ b/app/views/notifier_mailer/remind_to_invite_team_members.text.erb @@ -0,0 +1,10 @@ +Hey Friend, + +The <%= @user.team.name %> team page looks great. Have you invited your whole team to join yet? + +To add team members, just share this private link: <%= invitation_url(@user.team.id, :r => CGI.escape(@user.referral_token)) %> + +Matt & the Coderwall team +P.S. Make sure to follow us on twitter (@coderwall) + +Check out the FAQ (https://coderwall.com/faq) if you have questions about how teams work. \ No newline at end of file diff --git a/app/views/notifier/template_example.html.haml b/app/views/notifier_mailer/template_example.html.haml similarity index 100% rename from app/views/notifier/template_example.html.haml rename to app/views/notifier_mailer/template_example.html.haml diff --git a/app/views/notifier_mailer/welcome_email.html.haml b/app/views/notifier_mailer/welcome_email.html.haml new file mode 100644 index 00000000..8573d95c --- /dev/null +++ b/app/views/notifier_mailer/welcome_email.html.haml @@ -0,0 +1,48 @@ +- font_family = "font-family: 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'" +- main_content_grey = "padding: 30px 60px; background: #ece9e2; #{font_family};" +- paragraph = "font-size: 14px; line-height: 22px; #{font_family};" +- h1 = "-webkit-font-smoothing: antialiased; color: #393939; font-size: 26px; margin-bottom: 20px; text-align: center; margin: 0; line-height: 100%; font-size: 28px; font-family: 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif';" +- list_item = "font-size: 14px; line-height: 22px;" +- content_head = "padding: 30px 60px; border-bottom: solid 1px #d4cfc4; #{font_family};" +- anchor = "color: #3d8dcc; text-decoration: none; font-size: 14px;" + +%tr + %td.content-head{style: content_head} + %h1{style: h1} + Good news friend, your Coderwall is up! +%tr + %td.main-content-grey{style: main_content_grey} + %p{style: paragraph} + We’re thrilled to welcome you to the Coderwall community. Let’s get started! + %p{style: paragraph} + Here are some ways to enhance your Coderwall experience: + %ol + %li{style: list_item} + Check out the + = link_to('trending', 'https://coderwall.com/trending', style: anchor) + pro tips and + = link_to('share your own', 'https://coderwall.com/p/new', style: anchor) + %li{style: list_item} + == Display your achievements on your personal website or blog using our #{link_to('badge widget', api_url, style: anchor)}. +%tr + %td.main-content-grey{style: main_content_grey} + %h1{style: h1} + Love free swag? + %p{style: paragraph} + Level up your wardrobe with this free limited edition Coderwall tee from our friends at New Relic. + %p{style: "#{paragraph}; text-align: center;"} + :erb + <a href="http://newrelic.com/sp/coderwall?utm_source=CWAL&utm_medium=promotion&utm_content=coderwall&utm_campaign=coderwall&mpc=PM-CWAL-web-Signup-100-coderwall-shirtpromo"><img src="https://d3levm2kxut31z.cloudfront.net/assets/relic-tee-780a53200fbd09b7be640692b021b3a7.png" alt="free t-shirt"></a> + %p{style: "#{paragraph}; text-align: center;"} + :erb + <a href="https://coderwall.com/team/new-relic" style="<%= anchor %>">Test drive New Relic for free and get a Coderwall tee</a> +%tr + %td.main-content-grey{style: main_content_grey} + %h1{style: h1} + Have ideas to improve Coderwall? + %p{style: paragraph} + :erb + Coderwall is a community supported, open product built on <a href="http://assemblymade.com" style="<%= anchor %>">Assembly</a>. That means anyone (you!) can build new features, improve old code and help Coderwall grow. Every month revenue is shared among everyone who helps build and maintain it. Visit Coderwall on Assembly to learn more. + %p{style: paragraph} + :erb + <a href="https://assemblymade.com/coderwall" style="<%= anchor %>">Check out Coderwall on Assembly</a> diff --git a/app/views/notifier/welcome_email.text.erb b/app/views/notifier_mailer/welcome_email.text.erb similarity index 87% rename from app/views/notifier/welcome_email.text.erb rename to app/views/notifier_mailer/welcome_email.text.erb index 911c0815..1d9722a4 100644 --- a/app/views/notifier/welcome_email.text.erb +++ b/app/views/notifier_mailer/welcome_email.text.erb @@ -5,12 +5,14 @@ Here is how you can get started: <% if @user.on_team? %> * Invite others to team <%= @user.team.name %>. Share this private link with your coworkers so they can join your team: <%= invitation_url(@user.team.id, :r => CGI.escape(@user.referral_token)) %> -<% else %> -* Reserve your company's team page. Invite at least 3 coworkers to have your team show up on the leaderboard: <%= leaderboard_url %> <% end %> * Check out the trending pro tips and share your own. <%= link_to('trending', 'https://coderwall.com/trending') %> * Display your achievements on your personal website or blog using our javascript badge: <%= api_url %> +Link free swag? + +<a href="https://coderwall.com/team/new-relic">Test drive New Relic for free and get a Coderwall tee</a> + Have ideas to improve Coderwall? Coderwall is a community supported, open product built on <a href="http://assemblymade.com">Assembly</a>. That means anyone (you!) can build new features, improve old code and help Coderwall grow. Every month revenue is shared among everyone who helps build and maintain it. Visit Coderwall on Assembly to learn more. @@ -20,4 +22,4 @@ Coderwall is a community supported, open product built on <a href="http://assemb Matt & the Coderwall team P.S. Make sure to follow us on twitter (@coderwall) -<%= Notifier::SPAM_NOTICE %> +<%= NotifierMailer::SPAM_NOTICE %> diff --git a/app/views/opportunities/_form.html.haml b/app/views/opportunities/_form.html.haml index 5cdc3036..2fd17762 100644 --- a/app/views/opportunities/_form.html.haml +++ b/app/views/opportunities/_form.html.haml @@ -1,31 +1,42 @@ =form_for [@team, @job] do |j| - =render "shared/error_messages", :target => @job - =j.hidden_field :team_document_id - %fieldset - =j.label :name, 'Position Title' - =j.text_field :name - %fieldset - =j.label :opportunity_type, 'Type of position' - =j.select :opportunity_type, Opportunity::OPPORTUNITY_TYPES, :selected => "full-time" + =render "shared/error_messages", target: @job + =j.hidden_field :team_id + + .horizontal + %fieldset.job-title + =j.label :name, 'Title of Position' + =j.text_field :name + + %fieldset.job-type + =j.label :opportunity_type, 'Type of position' + =j.select :opportunity_type, Opportunity::OPPORTUNITY_TYPES, selected: "full-time" + %fieldset - =j.label :description, '1 sentence describing what the candidate will do (Role)' + =j.label :description, 'Description about this role (Markdown formatting supported)' =j.text_area :description + %fieldset - =j.label :tags, 'Primary skills the person will use. (comma separated)' - =j.text_field :tags, :value => params[:tags] || @job.tags.join(",") + =j.label :tag_list, 'Primary skills the person will use. (comma separated)' + =j.text_field :tag_list, value: params[:tag_list] || @job.tag_list.join(",") + %fieldset - -if @team.team_locations.any? + -if @team.locations.any? =j.label :location do - == Select one or more locations where the candidate must be located or #{link_to('add/manage team locations', edit_team_locations_path(@team))} - =j.select(:location, @team.cities+["anywhere"], {:selected => @job.locations}, {:multiple => true}) + == Select one or more locations where the candidate must be located or #{link_to('add/manage team locations', teamname_edit_path(slug: @team.slug, anchor: "locations"))} + =j.select(:location, @team.cities+["anywhere"], {selected: (@job.location.blank? ? [] : @job.location.split("|"))}, {multiple: true}) -else =j.label :location, 'Specify the city/location where the candidate must be located' =j.text_field :location %fieldset - =j.label :link, 'Link to full job posting on your career site' + =j.label :remote do + =j.check_box :remote + Allow remote + + %fieldset + =j.label :link, 'Link to full job posting on your career site (ex: http://example.com/career)' =j.text_field :link %fieldset =j.label :max_salary, "Maximum compensation/salary (remains private)" @@ -39,7 +50,7 @@ ==Coderwall #{link_to 'learn more', faq_path(:anchor => 'apply'), :target => :new} %li =j.radio_button :apply, true - ==Applicants mailed to #{@team.account.admin.email} + = "Applicants mailed to #{@team.name}'s admins emails" %ul %li =j.label "#{@team.name}'s website" diff --git a/app/views/opportunities/_opportunity.html.haml b/app/views/opportunities/_opportunity.html.haml index 983297ca..d700bd7c 100644 --- a/app/views/opportunities/_opportunity.html.haml +++ b/app/views/opportunities/_opportunity.html.haml @@ -1,18 +1,15 @@ %li.cf - %a.job.track{:href => job_path(:slug => opportunity.team.slug, :job_id => opportunity.public_id), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => {:team => opportunity.team.name, :public_id => opportunity.public_id}.to_json} - %h2 - = opportunity.title + %a.job.track{ href: job_path(slug: opportunity.team.slug, job_id: opportunity.public_id), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => { team: opportunity.team.name, public_id: opportunity.public_id }.to_json } + %h2= opportunity.title %h3 - = opportunity.opportunity_type.capitalize - %p - = opportunity.description + = opportunity.opportunity_type + - if opportunity.remote? + and remote + %p= opportunity.description .team.cf .details - %a.team-name.track{:href => friendly_team_path(opportunity.team), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => {:team => opportunity.team.name, :public_id => opportunity.public_id}.to_json} + %a.team-name.track{ href: friendly_team_path(opportunity.team), 'data-action' => 'view job', 'data-from' => 'jobs page', 'data-properties' => { team: opportunity.team.name, public_id: opportunity.public_id}.to_json } %h4= opportunity.team.name - %p.location - = (params[:location] != "Worldwide" && params[:location]) || opportunity.locations.first - %p.tag-line - = opportunity.team.hiring_tagline || opportunity.team.about - .team-avatar - = link_to image_tag(opportunity.team.avatar_url), friendly_team_path(opportunity.team) \ No newline at end of file + %p.location= opportunity.locations.first || "Worldwide" + %p.tag-line= opportunity.team.hiring_tagline || opportunity.team.about + .team-avatar= link_to image_tag(opportunity.team.avatar_url), friendly_team_path(opportunity.team) diff --git a/app/views/opportunities/edit.html.haml b/app/views/opportunities/edit.html.haml index 0f30461d..057b9168 100644 --- a/app/views/opportunities/edit.html.haml +++ b/app/views/opportunities/edit.html.haml @@ -1,5 +1,5 @@ -content_for :head do =stylesheet_link_tag 'premium-teams' -%h2.edit-update Update the position -=render :partial => "form" \ No newline at end of file +%h2.edit-update Update this position +=render :partial => "form" diff --git a/app/views/opportunities/index.html.haml b/app/views/opportunities/index.html.haml index 3d41ee55..ed5c967f 100644 --- a/app/views/opportunities/index.html.haml +++ b/app/views/opportunities/index.html.haml @@ -1,48 +1,49 @@ --content_for :javascript do - =javascript_include_tag 'jobs.js' +- content_for :javascript do + = javascript_include_tag 'jobs.js' --content_for :credits do - -cc_attribution_for_location_photo(params[:location]) +- content_for :credits do + - cc_attribution_for_location_photo(params[:location]) --content_for :mixpanel do - =record_view_event('jobs page') +- content_for :mixpanel do + = record_view_event('jobs page') -%section.jobs-top{:style => "background: #343131 url('#{location_photo_path(params[:location])}') no-repeat top center; background-size: 100% 226px;"} +%section.jobs-top{ style: "background: #343131 url('#{location_photo_path(params[:location])}') no-repeat top center; background-size: 100% 226px;" } #dimmer .inside - .filter-outside - %a.filter{:href => '/'} - %h3 - =params[:skill].try(:titleize) + .heading-outside + .heading + %h3= params[:skill].try(:titleize) %h1 - Jobs - %span - =job_location_string(params[:location].titleize) - - %ul.location-drop-down.hide - - @locations.each do |location| - %li - %a{:href => jobs_path(:location => location.parameterize, :skill => params[:skill]), :class => location.downcase, 'data-action' => "view jobs in #{location.downcase}", 'data-from' => 'jobs page', 'data-properties' => {'location' => params[:location]}.to_json} - = location - - - + %span= job_location_string(params[:location].titleize) .top-box .post-box.cf %p.post-text Starting at $99 for 30 days - %a.post-job.track{:href => add_job_or_signin_path, 'data-action' => 'add job', 'data-from' => 'jobs page (post a job)', 'data-properties' => {'location' => params[:location]}.to_json} + %a.post-job.track{ href: add_job_or_signin_path, 'data-action' => 'add job', 'data-from' => 'jobs page (post a job)', 'data-properties' => { 'location' => params[:location] }.to_json } Post a job .blurb %p Jobs at companies attracting the best developers to help them solve unique challenges in an awesome environment. - .inside-main-content.cf + %form{:action => '/jobs', :method => 'get', :id => 'filter-jobs'} + .filter-outside + .filter-option.keywords + = text_field_tag(:q, params[:q], :placeholder => 'Job role, language, skills', :class => 'query') + .query-icon + .filter-option + .custom-select + %select.location{:name => 'location'} + %option{:value => 'Worldwide', :selected => params[:location] == "Worldwide"}= "Worldwide" + - @locations.each do |location| + %option{:value => location.parameterize, :selected => params[:location] == location}= location + .filter-option + = label_tag(:remote, nil, :class => "checkbox") do + = check_box_tag(:remote, true, @remote_allowed) + = "Only Remote" + .filter-option.submit + = submit_tag(:search, :class => 'submit-btn') %ul.jobs - @jobs.each do |job| - =render job, :locals => {:job => job} - + = render(job, locals: { job: job }) - if @jobs_left > 20 - =link_to 'more jobs', jobs_path(:location => params[:location].parameterize, :skill => params[:skill], :page => @page+1), :remote => true, :class => "new-more", 'data-action' => 'view more jobs', 'data-from' => 'jobs page', 'data-properties' => {'location' => params[:location]}.to_json - - + = link_to 'more jobs', jobs_path(q: params[:q], location: params[:location].parameterize, skill: params[:skill], remote: @remote_allowed, page: @page+1), remote: true, class: "new-more", 'data-action' => 'view more jobs', 'data-from' => 'jobs page', 'data-properties' => {'location' => params[:location]}.to_json diff --git a/app/views/pages/_lady.html.haml b/app/views/pages/_lady.html.haml deleted file mode 100644 index afe55fc1..00000000 --- a/app/views/pages/_lady.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -%li - %a{:href => "/"} - =image_tag('ratio/lady-avatar.jpg', :class => 'avatar') - %span name of lady diff --git a/app/views/pages/achievements.html.haml b/app/views/pages/achievements.html.haml deleted file mode 100644 index d58e6804..00000000 --- a/app/views/pages/achievements.html.haml +++ /dev/null @@ -1,62 +0,0 @@ --content_for :page_title do - coderwall : achievements - --content_for :mixpanel do - =record_view_event('achievements') - -#achievements - %h1.center Achievements - %h3.center Want more? New achievements added weekly. - - %h2 1 Personal Accomplishment Achievement - .featured_badges.more - %p - Inspire others and show off your skills by sharing an accomplishment on your wall. Some personal accomplishments will even unlock special achievements like Castor. - %ul - %li=image_tag(Beaver.image_path, :title => Beaver.description, :class => 'tip') - %li - %h4 Castor Achievement - %p Create an accomplishment using the words "created", "coded", "built", or "developed" to earn Castor, the first personal accomplishment achievement. - - - .clear - - %h2 28 Language Achievements - %ul.badges.achievements=render :collection => [Epidexipteryx3, Epidexipteryx, Locust3, Locust, Narwhal3, Narwhal, Honeybadger3, Honeybadger1, Cub, Kona, Raven, Polygamous , NephilaKomaci3, NephilaKomaci, Mongoose3, Mongoose, Python3, Python, Velociraptor3,Velociraptor, Trex3, Trex, Labrador3, Labrador, Komododragon3, Komododragon, Bear3, Bear], :partial => 'badges/badge' - .clear - - %h2 - 10 Social Coding Achievements (GitHub, - %em CodePlex, - %em Bitbucket - ) - %ul.badges.achievements=render :collection => [Ashcat, Philanthropist, Altruist, Lemmings1000, Lemmings100, Forked100, Forked50, Forked20, Forked, Charity], :partial => 'badges/badge' - .clear - - %h2 3 GitHub Achievements - %ul.badges.achievements=render :collection => [Octopussy, Changelogd, EarlyAdopter], :partial => 'badges/badge' - .clear - - %h2 Limited Edition Achievements - .featured_badges - %p - Make something awesome with node.js and earn 1 of 8 achievements by participating in the - =link_to('2011 Node Knockout Competition', 'http://nodeknockout.com/') - %ul - -NodeKnockout::ALL.reverse.each_with_index do |badge_class, index| - %li{:class => (index == 0 ? '' : 'stack')}=image_tag(badge_class.image_path, :title => badge_class.description, :class => 'tip') - .clear - - / %h2 - / %em CodePlex Specific Achievements - / %ul.badges.achievements=render :collection => [ComingSoonCodeplex], :partial => 'badges/badge' - / .clear - / - / %h2 - / %em Bitbucket Specific Achievements - / %ul.badges.achievements=render :collection => [ComingSoonBitbucket], :partial => 'badges/badge' - / .clear - - %h6.center - Achievement badges are licensed under the - =link_to('CC-SA License, Version 3.0','http://creativecommons.org/licenses/by-sa/3.0') diff --git a/app/views/pages/activity.html.haml b/app/views/pages/activity.html.haml deleted file mode 100644 index 6c23dbd1..00000000 --- a/app/views/pages/activity.html.haml +++ /dev/null @@ -1,567 +0,0 @@ -=content_for :body_id do - activity - -%section.activity - / %header.cf - / %h1 News feed - / %ul - / %li - / %a.add-protip{:href => '/'} - / Add protip - %ul.feed - - //New items - %li.more-activity.cf - %a{:href => '/'} - +2 New activity items - - //comment and comment reply - %li.comment.cf - .graphic - .item - .header.cf - %a.hiring-ribbon{:href => '/'} - %span Join us - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - replyed to your comment - .content.cf - %a.small-upvote{:href => '/'} - 3 - %h1 - Your protip - %a{:href => '/'} - %blockquote - Geolocation on the iPhone - now has 3 comments - .footer.cf - %ul.actions-list - %li - %a.reply{:href => '/'} - Reply - - //comment-liked - %li.comment-liked.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - liked your comment - .content.cf - %a.small-upvote{:href => '/'} - 3 - %h1 - Your comment on the protip - %a{:href => '/'} - %blockquote - Geolocation on the iPhone - now has 3 likes - - - //new mayor viewed - %li.mayor.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - is mayor of CSS - .content.cf - %h1 Your friend Matt Deiters is now mayor of CSS - - //Profile viewed - %li.profile-viewed.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - viewed your profile - .content.cf - %h1 Your profile now has 201 views - - //Protip upvoted - %li.protip-upvoted.ptip.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - upvoted your protip - .content.cf - %a.small-upvote{:href => '/'} - 3 - %h1 - Your protip - %a{:href => '/'} - %blockquote - Geolocation on the iPhone - now has 53 upvotes - - //Protip viewed - %li.protip-viewed.ptip.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - viewed your protip - .content.cf - %a.small-upvote{:href => '/'} - 3 - %h1 - Your protip - %a{:href => '/'} - %blockquote - Geolocation on the iPhone - now has 201 views - - //New protip - %li.new-protip.ptip.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - New protip by - %a.user-name{:href => '/'} - mediters - %li.team - %span - of - =image_tag("profile/team-avatar.jpg") - %a{:href => '/'} - Github - .content.cf - %a.small-upvote{:href => '/'} - 3 - %a{:href => '/'} - %h1 Determine Geolocation on the iPhone - %ul.tags.cf - %li - %a.tag{:href => '/'} - Hackerdesk - .footer.cf - %ul.actions-list - %li - %a.view{:href => '/'} - View - %li - %a.write-tip{:href => '/'} - Create a tip about X - %li - %a.tweet{:href => '/'} - Tweet this - - - //Link protip - %li.link-protip.ptip.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - New protip link by - %a.user-name{:href => '/'} - mediters - %li.team - %span - of - =image_tag("profile/team-avatar.jpg") - %a{:href => '/'} - Github - .content.cf - %a.small-upvote{:href => '/'} - 3 - %a{:href => '/'} - %h1 This is a simple app with just enough features to exercise Amazon Web Services. It will also help you make an excellent zombie-fighting weapon using household items. - %ul.tags.cf - %li - %a.tag{:href => '/'} - Hackerdesk - %li - %a.tag{:href => '/'} - Hackerdesk - .footer.cf - %ul.actions-list - %li - %a.view{:href => '/'} - View - %li - %a.write-tip{:href => '/'} - Create a tip about X - %li - %a.tweet{:href => '/'} - Tweet this - - //Trending protip - %li.trending-protip.ptip.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - Trending protip by - %a.user-name{:href => '/'} - mediters mdeiters - %li.team - %span - of - =image_tag("profile/team-avatar.jpg") - %a{:href => '/'} - Github Coderwall Github Coderwall Github - .content.cf - %a.small-upvote{:href => '/'} - 3 - %a{:href => '/'} - %h1 Determine Geolocation on the iPhone - %ul.tags.cf - %li - %a.tag{:href => '/'} - Hackerdesk - .footer.cf - %ul.actions-list - %li - %a.view{:href => '/'} - View - %li - %a.write-tip{:href => '/'} - Create a tip about X - %li - %a.tweet{:href => '/'} - Tweet this - - //New team - %li.new-team.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - created a new team - .content.cf - .team-added - =image_tag("profile/team-example.png") - %a{:href => '/'} - Coderwall - .footer - %p - Coderwall builds awesome stuff with - %a{:href => '/'} - ruby - and - %a{:href => '/'} - css3 - - //Quest - %li.quest.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - completed a quest - .content.cf - %h1 Wooooooo! - .footer - %p Your friend completed a quest! :) - - //Job - %li.job.cf - .graphic - .item - .header.cf - %ul.cf - %li.team - =image_tag("profile/team-example.png") - %a{:href => '/'} - Coderwall - are hiring - .content.cf - %h1 Web Developer - WordPress, PHP and Front-End - .footer - %p - Want to become part one of SF's hottest start ups? - %a.user-name{:href => '/'} - read more - - - //New member - %li.new-member.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - just joined coderwall - .content.cf - %h1 Sweet, your friend Matt Deiters is now on Coderwall - .footer - %ul.actions-list - %li - %a.view{:href => '/'} - View profile - %li - %a.follow{:href => '/'} - Follow - - //New follow - %li.new-follow.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - just followed you - .content.cf - %h1 Nice, Matt Deiters is now following you. Your protips and achievements will now show up in his activity feed. - .footer - %p - Check out his - %a.user-name{:href => '/'} - profile - - //New team follow - %li.new-team-follow.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - just followed you - .content.cf - %h1 Neat, Matt Deiters is now following Github. Your team now has 201 followers. - .footer - %p - Check out his - %a.user-name{:href => '/'} - profile - - //New team request - %li.new-team-request.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - wants to join your team - .content.cf - %h1 You know Matt Deiters, right? he has requested to join your team. - .footer - %p - ok, - %a.user-name{:href => '/'} - allow Matt to join! - - //level up - %li.level-up.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - leveled up - .content.cf - %h1 Matt is now a level 2! - woot! - .footer - %p - Level up by completing quests, writing protips and being an all round good egg. - - //Badge unlocked - %li.badge-unlocked.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - %li.team - %span - of - =image_tag("profile/team-avatar.jpg") - %a{:href => '/'} - Github - just unlocked an achievement - .content.cf - .badge-unlocked - =image_tag("badges/altrustic.png") - %a{:href => '/'} - Altruist - .footer - %p Matt unlocked the Altruist achievement for increasing developer well-being by sharing at least 20 open source projects. Only 9% of developers on Coderwall have earned this. - - - //Added a skill - %li.added-skill.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - %li.team - %span - of - =image_tag("profile/team-avatar.jpg") - %a{:href => '/'} - Github - added a skill - .content.cf - %h1 Illustration - - //Endorsement - %li.endorsement.cf - .graphic - .item - .header.cf - %ul.cf - %li.user - =image_tag("profile/profile-img.jpg") - %a.user-name{:href => '/'} - mediters - %li.team - %span - of - =image_tag("profile/team-avatar.jpg") - %a{:href => '/'} - Github - endorsed you - - .content.cf - %h1 Matt Deiters thinks you are awesome at PHP, sweet! - - - //More btn - %li.more-activity.cf - %a{:href => '/'} - Show more activity - -.sidebar - %aside.profile-sidebar - - %ul.profile-details - %li.activity-view.cf - .user-details - %h4 Bashir Eghbali - %ul - %li - %a.view-profile{:href => '/'} - View my profile - %li - %a.view-network{:href => '/'} - View my network - =image_tag("profile/profile-img.jpg") - / .coderwall-level - / %p coderwall level 1 - %li.stats.cf - %ul - %li.profile-views - %span - 1009 - Profile views - %li.followers - %span - 231 - Followers - %li.protips - %span - 22 - Protips - %li.upvotes - %span - 67 - Upvotes - - %aside.secondary-sidebar - - %a.add-tip{:href => '/'} - Share a protip - - %h2 Featured Protips - %ul.tips-list - %li.no-networks - %p - You do not yet belong to any networks. To see the best protips featured here, - %a{:href => '/'} - join some networks - or check out the - %a{:href => '/'} - FAQ - for more info. - - - %h2 Featured Protips - %ul.tips-list - %li - %a{:href => '/'} - Creating A Pixelated Background in Photoshop CS6 - %li - %a{:href => '/'} - Git “Command Not Found” Error In Mountain Lion [Quickfix] - %li - %a{:href => '/'} - Run a Shell Script from NodeJs - - %h2 Trending topics - %ul.topics-list - %li - %a{:href => '/'} - hackerdesks - %li - %a{:href => '/'} - github - %li - %a{:href => '/'} - git - %li - %a{:href => '/'} - ruby - - diff --git a/app/views/pages/analytics.html.haml b/app/views/pages/analytics.html.haml deleted file mode 100644 index ee359096..00000000 --- a/app/views/pages/analytics.html.haml +++ /dev/null @@ -1,111 +0,0 @@ -.analytics - %header - %h1 - Shopify - %span - Last 20 visitors - %table.analytics-table - %tr.top-list.cf - %td.user User details - %td.sections Sections explored - %td.time Time on page - %td.last-visit Time since last visit - %td.exited Exited to url - - %tr.main-list.cf - %td.user - .avatar - =image_tag("profile/profile-img.jpg") - .details - %h3 medeiters mofemomf mfeofmo - %h4 San Francisco, CAfemofeo - %td.sections - %ul.explored - %li Members - %li Benefits - %li Our stack - %td.time - Less than 1 min - %td.last-visit - 6 Weeks - %td.exited - .fix - %a{:href => '/'} - www.googlegooglegooglegooglegoogle.com - - %tr.main-list.cf - %td.user - .avatar - =image_tag("profile/profile-img.jpg") - .details - %h3 medeiters - %h4 San Francisco, CA - %td.sections - %ul.explored - %li Members - %li Benefits - %li Our stack - %li Members - %li Benefits - %li Our stack - %li Our stack - %td.time - Less than 1 min - %td.last-visit - 6 Weeks - %td.exited - .top-pick - %span - Top pick - %a{:href => '/'} - www.google.com - - %tr.main-list.cf - %td.user - .avatar - =image_tag("profile/profile-img.jpg") - .details - %h3 medeiters - %h4 San Francisco, CA - %td.sections - %ul.explored - %li Members - %li Benefits - %li Our stack - %td.time - Less than 1 min - %td.last-visit - 6 Weeks - %td.exited - %a{:href => '/'} - www.google.com - - %tr.main-list.cf - %td.user - .avatar - =image_tag("profile/profile-img.jpg") - .details - %h3 medeiters - %h4 San Francisco, CA - %td.sections - %ul.explored - %li Members - %li Benefits - %li Our stack - %td.time - Less than 1 min - %td.last-visit - 6 Weeks - %td.exited - %a{:href => '/'} - www.google.com - - - - - - - - - - diff --git a/app/views/pages/api.html.haml b/app/views/pages/api.html.haml deleted file mode 100644 index 59582b3b..00000000 --- a/app/views/pages/api.html.haml +++ /dev/null @@ -1,296 +0,0 @@ --content_for :mixpanel do - =record_view_event('API') - -%section{:id => "api"} - %h1.big-title API and Badge Hacks - -.panel.cf - %aside.questions - %ul.question-list - %li - %a{:href => "#profileapi"} Profile API - %li - %a{:href => "#blogbadge"} Blog Badge - %li - %a{:href => "#devhacks"} Mashups and hacks - - %section.answers - %section{:id => "profileapi"} - %h2 Profile API - %p - Coderwall exposes a simple JSON representation of every profile. To access it, make an HTTP GET request to your profile URL (https://coderwall.com/username) but append <code>.json</code> to the end, like so: - - %pre - $ curl https://coderwall.com/username.json - %p - :erb - If you'd like to use JSONP - (<%= link_to "what is JSONP?", "http://en.wikipedia.org/wiki/JSONP" %>) - instead, append a <code>callback</code> paramater to the end of your request: - - %pre - $ curl https://coderwall.com/username.json?callback=someMethod - %p - Here's an example JSONP response: - :erb - <script src="https://gist.github.com/1100834.js?file=response.json"></script> - - %section{:id => "blogbadge"} - %h2 Official blog badge - %p - If you'd like, you can add show off your achievements on your blog or personal site just by - including a little bit of code (jQuery-only at the moment). To integrate it, just include - the requisite JS and CSS on your blog or web page. - - :erb - <script src="https://gist.github.com/1585413.js?file=coderwall_badge_markup.html"></script> - - %p - The <code>data-coderwall-username</code> attribute is required in order for the script to figure - out whose badges to retrieve. <code>data-coderwall-orientation</code> is optional (default - is vertical) but it helps it make some styling choices depending on where you'd like to place - the widget. - - %p - In this particular case, I've used a bit of CSS to get the badges placed in just the right spot: - - :erb - <script src="https://gist.github.com/1585413.js?file=coderwall_badge_style.css"></script> - - %section{:id => "devhacks"} - %a{:href => '#devhacks'} - %h2 Dev Hacks - %p - This is a showcase of the cool hacks and tools developers are building around Coderwall. - If you use coderwall in something you do, drop us a line at - = mail_to('support@coderwall.com', 'support@coderwall.com') - or tell us about it - %a{:href => 'https://twitter.com/#!/coderwall'} on Twitter. - - %ul - %li - %h4 - =link_to("Unofficial Coderwall iPhone app", "http://oinutter.github.com/Coderwall-iOS/", :target => :new) - by - =link_to('OiNutter', badge_path(:username => 'OiNutter'), :class => 'author') - %h5 iOS - - %ul - %li - %h4 - =link_to("Unofficial Coderwall Android app", "https://github.com/florianmski/Coderwall-Android", :target => :new) - by - =link_to('florianmski', badge_path(:username => 'florianmski'), :class => 'author') - %h5 Android - - %li - %h4 - =link_to('jQuery plugin to display team badges', 'http://amsul.github.com/coderwall.js') - by - =link_to('amsul', badge_path(:username => 'amsul'), :class => 'author') - %h5 jQuery coffeescript - - %li - %h4 - =link_to('See what badges your missing', 'https://gist.github.com/2013594') - by - =link_to('marcinbunsch', badge_path(:username => 'marcinbunsch'), :class => 'author') - %h5 Javascript - %li - %h4 - =link_to("Racket client for coderwall", "https://github.com/shawnps/coderwall-racket", :target => :new) - by - =link_to('shawnps', badge_path(:username => 'shawnps'), :class => 'author') - %h5 Racket - - %li - %h4 - =link_to("Wordpress plugin to display coderwall badges on your blog.", "http://wordpress.org/extend/plugins/my-coderwall-badges", :target => :new) - by - =link_to('tpk', badge_path(:username => 'tpk'), :class => 'author') - %h5 Wordpress - - %li - %h4 - =link_to("GO implementation of the Coderwall API.", "http://nickpresta.github.com/go-wall/", :target => :new) - by - =link_to('nickpresta', badge_path(:username => 'nickpresta'), :class => 'author') - %h5 Go - - %li - %h4 - =link_to('Redmine coderwall plugin', 'https://github.com/syntacticvexation/redmine_coderwall') - by - =link_to('syntacticvexation', badge_path(:username => 'syntacticvexation'), :class => 'author') - %h5 Ruby - - %li - %h4 - =link_to("C# Coderwall API client", "https://github.com/tomvdb/coderwall-csharp-wrapper") - by - =link_to('tomvdb', badge_path(:username => 'tomvdb'), :class => 'author') - %h5 API C# - %li - %h4 - =link_to('Achievement API used for Ashcat achievement', 'https://github.com/leereilly/octocoder') - by - =link_to('leereilly', badge_path(:username => 'leereilly'), :class => 'author') - %h5 Ruby REST - - %li - %h4 - =link_to('Coderwall Python client', 'https://github.com/cwc/coderwall-python') - by - =link_to('cwc', badge_path(:username => 'cwc'), :class => 'author') - %h5 Pythong - %li - %h4 - =link_to("jQuery plugin to display your GitHub projects and Coderwall badges", "https://github.com/icebreaker/proudify", :target => :new) - by - =link_to('icebreaker', badge_path(:username => 'icebreaker'), :class => 'author') - %h5 Javascript jQuery - - %li - %h4 - =link_to('IRC coderwall bot', 'https://github.com/dev-co/ninja-bot/blob/bdb443cc6c46046a8bf4b0b03da468e78430f1b6/plugins/coderwall.rb', :target => :new) - %h5 IRC Ruby - - %li - %h4 - =link_to("Coderwall Badge Script for Blogs (or any other Web Page) - coffescript", "https://gist.github.com/1074399", :target => :new) - by - =link_to('kyoto', badge_path(:username => 'kyoto'), :class => 'author') - %h5 CoffeeScript - - %li - %h4 - =link_to("Coderwall Badge Script for Blogs (or any other Web Page) - jquery", "http://hermanjunge.com/post/6131651487/coderwall-badge-in-your-blog-d", :target => :new) - by - =link_to('hermanjunge', badge_path(:username => 'hermanjunge'), :class => 'author') - %h5 CoffeeScript - - %li - %h4 - =link_to("HTML5 Coderwall Badge", "http://coderwall-widget.appspot.com/install/index.html", :target => :new) - by - =link_to('lp', badge_path(:username => 'lp'), :class => 'author') - %h5 HTML5 Javascript - - %li - %h4 - =link_to("Metabrag: jQuery plugin for showing off your GitHub and Coderwall stats", "https://github.com/mikaelbr/metabrag", :target => :new) - by - =link_to('mikaelbr', badge_path(:username => 'mikaelbr'), :class => 'author') - %h5 Javascript jQuery - - %li - %h4 - =link_to("jQuery plugin to get Coderwall badges", "https://github.com/adlermedrado/myCoderwall", :target => :new) - by - =link_to('adlermedrado', badge_path(:username => 'adlermedrado'), :class => 'author') - %h5 Javascript jQuery - - %li - %h4 - =link_to("Ruby client for the coderwall API", "https://gist.github.com/1007591", :target => :new) - by - =link_to('v0n', badge_path(:username => 'v0n'), :class => 'author') - %h5 Ruby - - %li - %h4 - =link_to("Another Ruby client for the coderwall API", "https://github.com/fidelisrafael/coderwall-ruby-api", :target => :new) - by - =link_to('fidelisrafael', badge_path(:username => 'fidelisrafael'), :class => 'author') - %h5 Ruby - - %li - %h4 - =link_to("A .NET client for for the coderwall API", "https://github.com/sergiotapia/CoderwallDotNet", :target => :new) - by - =link_to('sergiotapia', badge_path(:username => 'sergiotapia'), :class => 'author') - %h5 C#/.Net - - %li - %h4 - =link_to("Java client for the coderwall API", "https://github.com/caseydunham/coderwall-java", :target => :new) - by - =link_to('caseydunham', badge_path(:username => 'caseydunham'), :class => 'author') - %h5 Java - - %li - %h4 - =link_to("PHP client for the coderwall API", "https://github.com/fredefl/coderwall-php", :target => :new) - by - =link_to('fredefl', badge_path(:username => 'fredefl'), :class => 'author') - %h5 PHP - - %li - %h4 - =link_to("C client for the coderwall API", "http://maher4ever.github.com/libcoderwall", :target => :new) - by - =link_to('maher4ever', badge_path(:username => 'maher4ever'), :class => 'author') - %h5 C - - %li - %h4 - =link_to("Command line client for coderwall", "https://github.com/lest/coderwall-cli", :target => :new) - by - =link_to('lest', badge_path(:username => 'lest'), :class => 'author') - %h5 CLI - - %li - %h4 - =link_to("Octopress plugin to show coderwall badges", "https://github.com/robertkowalski/octopress-coderwall", :target => :new) - by - =link_to('robertkowalski', badge_path(:username => 'robertkowalski'), :class => 'author') - %h5 plugin octopress - - %li - %h4 - =link_to("Konami Code", "http://blog.bltavares.com/post/7910553226/coderwall-konami-code-bookmarklet", :target => :new) - by - =link_to('bltavares', badge_path(:username => 'bltavares'), :class => 'author') - %h5 Javascript - - %li - %h4 - =link_to("Perl Interface for the coderwall API", "https://metacpan.org/module/WWW::Coderwall", :target => :new) - by - =link_to('robert', badge_path(:username => 'robert'), :class => 'author') - %h5 Perl - - %li - %h4 - =link_to("Badges Viewer for Android", "https://github.com/marti1125/CoderWall-Badges", :target => :new) - by - =link_to('marti1125', badge_path(:username => 'marti1125'), :class => 'author') - %h5 Phonegap - - %li - %h4 - =link_to("Display your Coderwall badges without using a library like jQuery", "https://gist.github.com/4109968", :target => :new) - by - =link_to('optikfluffel', badge_path(:username => 'optikfluffel'), :class => 'author') - %h5 CoffeeScript - - %li - %h4 - =link_to("Coderwall Badges Chrome Extension", "https://github.com/vinitcool76/coderwall-badges", :target => :new) - by - =link_to('vinitcool76', badge_path(:username => 'vinitcool76'), :class => 'author') - %h5 Javascript - - %li - %h4 - =link_to("Coderwall Badges Chrome Extension (2)", "https://chrome.google.com/webstore/detail/coderwall-badges/dbdopkgkkmjlkepgekngaajkhajbkian", :target => :new) - by - =link_to('piperchester', badge_path(:username => 'piperchester'), :class => 'author') - %h5 Javascript - - %li - %h4 - =link_to("Hubot Coderwall", "https://github.com/bobwilliams/hubot-coderwall", :target => :new) - by - =link_to('bobwilliams', badge_path(:username => 'bobwilliams'), :class => 'author') - %h5 CoffeeScript diff --git a/app/views/pages/api.html.slim b/app/views/pages/api.html.slim new file mode 100644 index 00000000..f7ac16d7 --- /dev/null +++ b/app/views/pages/api.html.slim @@ -0,0 +1,304 @@ +-content_for :mixpanel do + =record_view_event('API') + +section id="api" + h1.big-title API and Badge Hacks + +.panel.cf + aside.questions + ul.question-list + li =link_to 'Profile API', "#profileapi" + li =link_to 'Blog Badge', "#blogbadge" + li =link_to 'Mashups and hacks', "#devhacks" + + section.answers + section id="profileapi" + h2 Profile API + p + | Coderwall exposes a simple JSON representation of every profile. To access it, make an HTTP GET request to your profile URL (https://coderwall.com/username) but append <code>.json</code> to the end, like so: + + pre + | $ curl https://coderwall.com/username.json + p + | If you'd like to use JSONP + | (<%= link_to "what is JSONP?", "http://en.wikipedia.org/wiki/JSONP" %>) + | instead, append a <code>callback</code> paramater to the end of your request: + + pre + | $ curl https://coderwall.com/username.json?callback=someMethod + p + | Here's an example JSONP response: + | <script src="https://gist.github.com/1100834.js?file=response.json"></script> + + section id="blogbadge" + h2 Official blog badge + p + | If you'd like, you can add show off your achievements on your blog or personal site just by + | including a little bit of code (jQuery-only at the moment). To integrate it, just include + | the requisite JS and CSS on your blog or web page. + + |<script src="https://gist.github.com/1585413.js?file=coderwall_badge_markup.html"></script> + + p + | The <code>data-coderwall-username</code> attribute is required in order for the script to figure + | out whose badges to retrieve. <code>data-coderwall-orientation</code> is optional (default + | is vertical) but it helps it make some styling choices depending on where you'd like to place + | the widget. + + p + | In this particular case, I've used a bit of CSS to get the badges placed in just the right spot: + + | <script src="https://gist.github.com/1585413.js?file=coderwall_badge_style.css"></script> + + section id="devhacks" + =link_to '', "#devhacks" + h2 Dev Hacks + p + | This is a showcase of the cool hacks and tools developers are building around Coderwall. + | If you use coderwall in something you do, drop us a line at + = mail_to('support@coderwall.com', 'support@coderwall.com') + | or tell us about it + =link_to 'on Twitter.', 'https://twitter.com/#!/coderwall' + + ul + li + h4 + =link_to("Unofficial Coderwall iPhone app", "http://oinutter.github.com/Coderwall-iOS/", :target => :new) + | by + =link_to('OiNutter', badge_path(:username => 'OiNutter'), :class => 'author') + h5 iOS + + ul + li + h4 + =link_to("Unofficial Coderwall Android app", "https://github.com/florianmski/Coderwall-Android", :target => :new) + | by + =link_to('florianmski', badge_path(:username => 'florianmski'), :class => 'author') + h5 Android + + li + h4 + =link_to('jQuery plugin to display team badges', 'http://amsul.github.com/coderwall.js') + | by + =link_to('amsul', badge_path(:username => 'amsul'), :class => 'author') + h5 jQuery coffeescript + + li + h4 + =link_to('See what badges your missing', 'https://gist.github.com/2013594') + | by + =link_to('marcinbunsch', badge_path(:username => 'marcinbunsch'), :class => 'author') + h5 Javascript + + li + h4 + =link_to("Racket client for coderwall", "https://github.com/shawnps/coderwall-racket", :target => :new) + | by + =link_to('shawnps', badge_path(:username => 'shawnps'), :class => 'author') + h5 Racket + + li + h4 + =link_to("Wordpress plugin to display coderwall badges on your blog.", "http://wordpress.org/extend/plugins/my-coderwall-badges", :target => :new) + | by + =link_to('tpk', badge_path(:username => 'tpk'), :class => 'author') + h5 Wordpress + + li + h4 + =link_to("GO implementation of the Coderwall API.", "http://nickpresta.github.com/go-wall/", :target => :new) + | by + =link_to('nickpresta', badge_path(:username => 'nickpresta'), :class => 'author') + h5 Go + + li + h4 + =link_to('Redmine coderwall plugin', 'https://github.com/syntacticvexation/redmine_coderwall') + | by + =link_to('syntacticvexation', badge_path(:username => 'syntacticvexation'), :class => 'author') + h5 Ruby + + li + h4 + =link_to("C# Coderwall API client", "https://github.com/tomvdb/coderwall-csharp-wrapper") + | by + =link_to('tomvdb', badge_path(:username => 'tomvdb'), :class => 'author') + h5 API C# + li + h4 + =link_to('Achievement API used for Ashcat achievement', 'https://github.com/leereilly/octocoder') + | by + =link_to('leereilly', badge_path(:username => 'leereilly'), :class => 'author') + h5 Ruby REST + + li + h4 + =link_to('Coderwall Python client', 'https://github.com/cwc/coderwall-python') + | by + =link_to('cwc', badge_path(:username => 'cwc'), :class => 'author') + h5 Pythong + li + h4 + =link_to("jQuery plugin to display your GitHub projects and Coderwall badges", "https://github.com/icebreaker/proudify", :target => :new) + | by + =link_to('icebreaker', badge_path(:username => 'icebreaker'), :class => 'author') + h5 Javascript jQuery + + li + h4 + =link_to('IRC coderwall bot', 'https://github.com/dev-co/ninja-bot/blob/bdb443cc6c46046a8bf4b0b03da468e78430f1b6/plugins/coderwall.rb', :target => :new) + h5 IRC Ruby + + li + h4 + =link_to("Coderwall Badge Script for Blogs (or any other Web Page) - coffescript", "https://gist.github.com/1074399", :target => :new) + | by + =link_to('kyoto', badge_path(:username => 'kyoto'), :class => 'author') + h5 CoffeeScript + + li + h4 + =link_to("Coderwall Badge Script for Blogs (or any other Web Page) - jquery", "http://hermanjunge.com/post/6131651487/coderwall-badge-in-your-blog-d", :target => :new) + | by + =link_to('hermanjunge', badge_path(:username => 'hermanjunge'), :class => 'author') + h5 CoffeeScript + + li + h4 + =link_to("HTML5 Coderwall Badge", "http://coderwall-widget.appspot.com/install/index.html", :target => :new) + | by + =link_to('lp', badge_path(:username => 'lp'), :class => 'author') + h5 HTML5 Javascript + + li + h4 + =link_to("Metabrag: jQuery plugin for showing off your GitHub and Coderwall stats", "https://github.com/mikaelbr/metabrag", :target => :new) + | by + =link_to('mikaelbr', badge_path(:username => 'mikaelbr'), :class => 'author') + h5 Javascript jQuery + + li + h4 + =link_to("jQuery plugin to get Coderwall badges", "https://github.com/adlermedrado/myCoderwall", :target => :new) + | by + =link_to('adlermedrado', badge_path(:username => 'adlermedrado'), :class => 'author') + h5 Javascript jQuery + + li + h4 + =link_to("Ruby client for the coderwall API", "https://gist.github.com/1007591", :target => :new) + | by + =link_to('v0n', badge_path(:username => 'v0n'), :class => 'author') + h5 Ruby + + li + h4 + =link_to("Another Ruby client for the coderwall API", "https://github.com/fidelisrafael/coderwall-ruby-api", :target => :new) + | by + =link_to('fidelisrafael', badge_path(:username => 'fidelisrafael'), :class => 'author') + h5 Ruby + + li + h4 + =link_to("A .NET client for for the coderwall API", "https://github.com/sergiotapia/CoderwallDotNet", :target => :new) + | by + =link_to('sergiotapia', badge_path(:username => 'sergiotapia'), :class => 'author') + h5 C#/.Net + + li + h4 + =link_to("Java client for the coderwall API", "https://github.com/caseydunham/coderwall-java", :target => :new) + | by + =link_to('caseydunham', badge_path(:username => 'caseydunham'), :class => 'author') + h5 Java + + li + h4 + =link_to("PHP client for the coderwall API", "https://github.com/fredefl/coderwall-php", :target => :new) + | by + =link_to('fredefl', badge_path(:username => 'fredefl'), :class => 'author') + h5 PHP + + li + h4 + =link_to("C client for the coderwall API", "http://maher4ever.github.com/libcoderwall", :target => :new) + | by + =link_to('maher4ever', badge_path(:username => 'maher4ever'), :class => 'author') + h5 C + + li + h4 + =link_to("Clojure client for the coderwall API", "https://github.com/vbauer/coderwall-clj", :target => :new) + | by + =link_to('vbauer', badge_path(:username => 'vbauer'), :class => 'author') + h5 Clojure + + li + h4 + =link_to("Node and commandline client for the coderwall API", "https://github.com/StoneCypher/noderwall", :target => :new) + | by + =link_to('johnhaugeland', badge_path(:username => 'johnhaugeland'), :class => 'author') + h5 C + + li + h4 + =link_to("Command line client for coderwall", "https://github.com/lest/coderwall-cli", :target => :new) + | by + =link_to('lest', badge_path(:username => 'lest'), :class => 'author') + h5 CLI + + li + h4 + =link_to("Octopress plugin to show coderwall badges", "https://github.com/robertkowalski/octopress-coderwall", :target => :new) + | by + =link_to('robertkowalski', badge_path(:username => 'robertkowalski'), :class => 'author') + h5 plugin octopress + + li + h4 + =link_to("Konami Code", "http://blog.bltavares.com/post/7910553226/coderwall-konami-code-bookmarklet", :target => :new) + | by + =link_to('bltavares', badge_path(:username => 'bltavares'), :class => 'author') + h5 Javascript + + li + h4 + =link_to("Perl Interface for the coderwall API", "https://metacpan.org/module/WWW::Coderwall", :target => :new) + | by + =link_to('robert', badge_path(:username => 'robert'), :class => 'author') + h5 Perl + + li + h4 + =link_to("Badges Viewer for Android", "https://github.com/marti1125/CoderWall-Badges", :target => :new) + | by + =link_to('marti1125', badge_path(:username => 'marti1125'), :class => 'author') + h5 Phonegap + + li + h4 + =link_to("Display your Coderwall badges without using a library like jQuery", "https://gist.github.com/4109968", :target => :new) + | by + =link_to('optikfluffel', badge_path(:username => 'optikfluffel'), :class => 'author') + h5 CoffeeScript + + li + h4 + =link_to("Coderwall Badges Chrome Extension", "https://github.com/vinitcool76/coderwall-badges", :target => :new) + | by + =link_to('vinitcool76', badge_path(:username => 'vinitcool76'), :class => 'author') + h5 Javascript + + li + h4 + =link_to("Coderwall Badges Chrome Extension (2)", "https://chrome.google.com/webstore/detail/coderwall-badges/dbdopkgkkmjlkepgekngaajkhajbkian", :target => :new) + | by + =link_to('piperchester', badge_path(:username => 'piperchester'), :class => 'author') + h5 Javascript + + li + h4 + =link_to("Hubot Coderwall", "https://github.com/bobwilliams/hubot-coderwall", :target => :new) + | by + =link_to('bobwilliams', badge_path(:username => 'bobwilliams'), :class => 'author') + h5 CoffeeScript diff --git a/app/views/pages/contact_us.html.haml b/app/views/pages/contact_us.html.haml deleted file mode 100644 index a57f0e27..00000000 --- a/app/views/pages/contact_us.html.haml +++ /dev/null @@ -1,26 +0,0 @@ --content_for :page_title do - coderwall : contact us - -%h1.big-title Contact Us - -.contact-hero - %h2 Do you have an idea to improve Coderwall? - %p - Coderwall is built, maintained and owned by its community. We call it crowd-<strong>founding</strong>. - %a.learn-more{href: "http://hackernoons.com/all-our-coderwall-are-belong-to-you"} - Learn more about how this works and how you can get involved. - -.contact-panels - .panel.half-panel.half-panel-margin - %header - %h3 Questions - .inside-panel - %p If you have questions about achievements we encourage you to first look at the - =link_to('View FAQ', faq_path) - - .panel.half-panel - %header - %h3 Support - .inside-panel - %p For support and feedback please send us a support email, and we will be in touch. - =mail_to('support@coderwall.com', 'support@coderwall.com') diff --git a/app/views/pages/contact_us.html.slim b/app/views/pages/contact_us.html.slim new file mode 100644 index 00000000..30e4e440 --- /dev/null +++ b/app/views/pages/contact_us.html.slim @@ -0,0 +1,28 @@ +-content_for :page_title do + | coderwall : contact us + +h1.big-title Contact Us + +.contact-hero + h2 Do you have an idea to improve Coderwall? + p + | Coderwall is built, maintained and owned by its community. We call it crowd- + strong founding + |. + =link_to "http://hackernoons.com/all-our-coderwall-are-belong-to-you", class: 'learn-more' + | Learn more about how this works and how you can get involved. + +.contact-panels + .panel.half-panel.half-panel-margin + header + h3 Questions + .inside-panel + p If you have questions about achievements we encourage you to first look at the + =link_to('View FAQ', faq_path) + + .panel.half-panel + header + h3 Support + .inside-panel + p For support and feedback please send us a support email, and we will be in touch. + =mail_to('support@coderwall.com', 'support@coderwall.com') diff --git a/app/views/pages/copyright.html.haml b/app/views/pages/copyright.html.haml deleted file mode 100644 index 40a3789e..00000000 --- a/app/views/pages/copyright.html.haml +++ /dev/null @@ -1,66 +0,0 @@ -DMCA Takedown - -GitHub, Inc. ("GitHub") supports the protection of intellectual property and asks the users of the website GitHub.com to do the same. It is the policy of GitHub to respond to all notices of alleged copyright infringement. - -Notice is specifically given that GitHub is not responsible for the content on other websites that any user may find or access when using GitHub.com. This notice describes the information that should be provided in notices alleging copyright infringement found specifically on GitHub.com, and this notice is designed to make alleged infringement notices to GitHub as straightforward as possible and, at the same time, minimize the number of notices that GitHub receives that are spurious or difficult to verify. The form of notice set forth below is consistent with the form suggested by the United States Digital Millennium Copyright Act ("DMCA") which may be found at the U.S. Copyright official website: http://www.copyright.gov. - -It is the policy of GitHub, in appropriate circumstances and in its sole discretion, to disable and/or terminate the accounts of users of GitHub.com who may infringe upon the copyrights or other intellectual property rights of GitHub and/or others. - -Our response to a notice of alleged copyright infringement may result in removing or disabling access to material claimed to be a copyright infringement and/or termination of the subscriber. If GitHub removes or disables access in response to such a notice, we will make a reasonable effort to contact the responsible party of our decision so that they may make an appropriate response. - -To file a notice of an alleged copyright infringement with us, you are required to provide a written communication only by email or postal mail. Notice is also given that you may be liable for damages (including costs and attorney fees) if you materially misrepresent that a product or activity is infringing upon your copyright. - -A. Copyright Claims - -To expedite our handling of your notice, please use the following format or refer to Section 512(c)(3) of the Copyright Act. - -Identify in sufficient detail the copyrighted work you believe has been infringed upon. This includes identification of the web page or specific posts, as opposed to entire sites. Posts must be referenced by either the dates in which they appear or by the permalink of the post. Include the URL to the concerned material infringing your copyright (URL of a website or URL to a post, with title, date, name of the emitter), or link to initial post with sufficient data to find it. - -Identify the material that you allege is infringing upon the copyrighted work listed in Item #1 above. Include the name of the concerned litigious material (all images or posts if relevant) with its complete reference. - -Provide information on which GitHub may contact you, including your email address, name, telephone number and physical address. - -Provide the address, if available, to allow GitHub to notify the owner/administrator of the allegedly infringing webpage or other content, including email address. - -Also include a statement of the following: “I have a good faith belief that use of the copyrighted materials described above on the infringing web pages is not authorized by the copyright owner, or its agent, or the law.” - -Also include the following statement: “I swear, under penalty of perjury, that the information in this notification is accurate and that I am the copyright owner, or am authorized to act on behalf of the owner, of an exclusive right that is allegedly infringed.” - -Your physical or electronic signature - -Send the written notification via regular postal mail to the following: - -GitHub Inc -Attn: DMCA takedown -548 4th St. -San Francisco, CA. 94107 - -or email notification to copyright@github.com. - -For the fastest response, please send a plain text email. Written notification and emails with PDF file or image attachements may delay processing of your request. - -B. Counter-Notification Policy - -To be effective, a Counter-Notification must be a written communication by the alleged infringer provided to GitHub’s Designated Agent (as set forth above) that includes substantially the following: - -A physical or electronic signature of the Subscriber; - -Identification of the material that has been removed or to which access has been disabled and the location at which the material appeared before it was removed or access to it was disabled; - -A statement under penalty of perjury that the Subscriber has a good faith belief that the material was removed or disabled as a result of a mistake or misidentification of the material to be removed or disabled; - -The Subscriber’s name, address, and telephone number, and a statement that the Subscriber consents to the jurisdiction of Federal District Court for the judicial district of California, or if the Subscriber’s address is outside of the United States, for any judicial district in which GitHub may be found, and that the Subscriber will accept service of process from the person who provided notification or an agent of such person. - -Upon receipt of a Counter Notification containing the information as outlined in 1 through 4 above: - -GitHub shall promptly provide the Complaining Party with a copy of the Counter Notification; - -GitHub shall inform the Complaining Party that it will replace the removed material or cease disabling access to it within ten (10) business days; - -GitHub shall replace the removed material or cease disabling access to the material within ten (10) to fourteen (14) business days following receipt of the Counter Notification, provided GitHub’s Designated Agent has not received notice from the Complaining Party that an action has been filed seeking a court order to restrain Subscriber from engaging in infringing activity relating to the material on GitHub’s system. - -Finally Notices and Counter-Notices with respect to this website must meet then current statutory requirements imposed by the DMCA; see http://www.copyright.gov for details. - -C. Disclosure - -Please note that in addition to being forwarded to the person who provided the allegedly infringing content, a copy of this legal notice (with your personal information removed) will be published diff --git a/app/views/pages/error.html b/app/views/pages/error.html deleted file mode 100644 index 975479cc..00000000 --- a/app/views/pages/error.html +++ /dev/null @@ -1,27 +0,0 @@ -<section class='error-top' style="background:image-url('waves.png'); background-color:#dde6eb;"> - <div style='width:960px; margin:0 auto; padding:100px 0;'> - <h1 style="font-family:'MuseoSans-300'; text-align:center; text-transform:uppercase; color: #6e8597; font-size: 4em;"> - 404, End of the road - </h1> - - <div style="background:image-url('bridge.png'); width: 100px; height: 100px;"> - <!-- /=image_tag("bridge.png") --> - </div> - </div> -</section> -<section class='error-bottom' style='background:#bacbd8; padding-top: 40px;'> - <h2 style="font-family:'MuseoSans-300'; font-size: 1.9em; text-align: center; color: #6e8597; width: 450px; margin: 0 auto; line-height: 1.8em;"> - Perhaps you wanted to go to your - <a href='/' style='background:#6e8597; color: #dce5ea; margin-right: 5px; padding: 0 5px;'> - dashboard, - </a> - view - <a href='/' style='background:#6e8597; color: #dce5ea; margin-right: 5px; padding: 0 5px;'> - networks - </a> - or see some - <a href='/' style='background:#6e8597; color: #dce5ea; margin-right: 5px; padding: 0 5px;'> - cool teams? - </a> - </h2> -</section> diff --git a/app/views/pages/error.html.haml b/app/views/pages/error.html.haml deleted file mode 100644 index ff765078..00000000 --- a/app/views/pages/error.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -%section.error-top{:style => "background:image-url('waves.png'); background-color:#dde6eb;"} - %div{:style => "width:960px; margin:0 auto; padding:100px 0;"} - %h1{:style => "font-family:'MuseoSans-300'; text-align:center; text-transform:uppercase; color: #6e8597; font-size: 4em;"} - 404, End of the road - %div{:style => "background:image-url('bridge.png'); width: 100px; height: 100px;"} - //=image_tag("bridge.png") - -%section.error-bottom{:style => "background:#bacbd8; padding-top: 40px;"} - %h2{:style => "font-family:'MuseoSans-300'; font-size: 1.9em; text-align: center; color: #6e8597; width: 450px; margin: 0 auto; line-height: 1.8em;"} - Perhaps you wanted to go to your - %a{:href => '/', :style => "background:#6e8597; color: #dce5ea; margin-right: 5px; padding: 0 5px;"} - dashboard, - view - %a{:href => '/', :style => "background:#6e8597; color: #dce5ea; margin-right: 5px; padding: 0 5px;"} - networks - or see some - %a{:href => '/', :style => "background:#6e8597; color: #dce5ea; margin-right: 5px; padding: 0 5px;"} - cool teams? diff --git a/app/views/pages/faq.html.haml b/app/views/pages/faq.html.haml deleted file mode 100644 index 72618f7b..00000000 --- a/app/views/pages/faq.html.haml +++ /dev/null @@ -1,122 +0,0 @@ --content_for :page_title do - coderwall : FAQ - -%h1.big-title FAQ - -.panel.cf - %aside.questions - %h2 Questions - %ul.question-list - %li=link_to("What are these pro tips all about?", '#describeprotips') - %li=link_to("How are pro tips organized?", '#trendingprotips') - %li=link_to("What is a network?", '#networks') - %li=link_to("How is the team score calculated?", '#scoredetails') - %li=link_to("How often is the team score calculated?", '#scorefrequency') - %li=link_to("How do I join my company's team?", '#jointeam') - %li=link_to("How do I leave the team I'm on?", '#leaveteam') - %li=link_to("How do I delete a team?", '#deleteteam') - %li=link_to("I just qualified for a new achievement, why isn't it on my profile?", '#profileupdates') - %li=link_to("Where are the lua/haskell/etc achievements?", '#languages') - %li=link_to("My Lanyrd events do not show on my profile?", '#lanyrd') - %li=link_to("My Bitbucket repos do not show on my profile?", '#bitbucket') - %li=link_to("What is the mayor of a network and how do I become one?", '#mayor') - %li=link_to("What is the resident expert of a network?", '#resident-expert') - %li=link_to("How to apply for jobs through Coderwall?", '#apply') - - if signed_in? - %li=link_to("What are Coderwall badge orgs on Github?", '#badge-orgs') - - %section.answers - %h2 Amazingly Awesome Answers - %h3 - %a{:name => 'describeprotips'} - What are these pro tips all about? - %p - Pro tips are an easy way to share and save interesting links, code, and ideas. Pro tips can be upvoted by the community, earning the author more geek cred and also raise the visibility of the pro tip for the community. You can also quickly retrieve pro tips you've shared from your profile. - - %h3 - %a{:name => 'trendingprotips'} - How are pro tips organized? - %p - Pro tips are grouped into Networks. In networks, you'll notice that protips with more upvotes don't always appear on the top of the page. This is because our trending algorithm takes several things into account. Things that affect the placement of a pro tip include how old the pro tip is, the author's coderwall level, and the coderwall level of each member that upvotes the pro tip. The higher a member's level, the more weight their vote holds. - - %h3 - %a{:name => 'networks'} - What is a network? - %p - A network is a way to group pro tips and members. Each network is built around a specific topic, and includes all the members whose skills relate to that topic, as well as all the relevant pro tips. - - %h3 - %a{:name => 'scoredetails'} - How is the team score calculated? - %p - The leaderboard is a fun way to showcase some of coderwall’s most interesting and innovative teams. We continue to refine the algorithm behind the score to most accurately deliver on that purpose. Currently, each team’s score and ranking are determined by each team member’s achievements, peer endorsements, speaking history, and then adjusted to the team’s - %a{:href => 'http://en.wikipedia.org/wiki/Central_tendency'} central tendency. - In the future we plan to provide more transparency around the score and when it changes. - - %h3 - %a{:name => 'scorefrequency'} - How often is the team score calculated? - %p - Team scores are calculated nightly - - %h3 - %a{:name => 'jointeam'} - How do I join my company's team? - %p - If your company doesn't have a team, just click on the "Reserve Team Name" link on the top of the page. If a team already exists, anyone on that team can invite you with a special invite link they can get when they sign in and view their team page. - - %h3 - %a{:name => 'leaveteam'} - How do I leave the team I'm on? - %p - Sign in and visit your team page. Go to "Edit" and edit the team members section where you can press the 'remove' button under your name and confirm. If you have designated a team admin, they need to do this for you. - - %h3 - %a{:name => 'deleteteam'} - How do I delete a team? - %p - The team will be deleted once all the members leave the team. - - %h3 - %a{:name => 'profileupdates'} - I just qualified for a new achievement, why isn't it on my profile? - %p - We review everyones achievements approximately once a week to see if you've earned anything new. - - %h3 - %a{:name => 'languages'} - Where are the lua/haskell/etc achievements? - %p Coderwall is actively working on achievements for all languages found on GitHub, BitBucket, and Codeplex. The lack of an achievements for a given language does not reflect coderwall's views of that language. - - %h3 - %a{:name => 'lanyrd'} - My Lanyrd events do not show on my profile? - %p Look at your lanyrd event's topics and ensure at least one appears as a skill under your profile. - - %h3 - %a{:name => 'bitbucket'} - My Bitbucket repos do not show on my profile? - %p Ensure your Bitbucket repo is tagged with a language. - - %h3 - %a{:name => 'mayor'} - What is the mayor of a network and how do I become one? - %p The mayor is the person who has authored the most popular pro tips for a network. Start writing great pro tips that people find useful and you'll be on your way to becoming the next mayor. - - %h3 - %a{:name => 'resident-expert'} - What is the resident expert of a network? - %p Resident experts are a generally recognized authority on the network topic and are designated by Coderwall. - - %h3 - %a{:name => 'apply'} - How to apply for jobs through Coderwall? - -if current_user && current_user.on_team? && current_user.team.premium? - %p Applicants will see an apply button on each job if the employer has configured it. Applicant's email, profile link and resume are emailed to the team admin - %p For jobs that have the feature enabled by the employer, you can click the apply button, upload your resume and you're done. Other jobs take you to the employer's site where you can follow their application process - - -if signed_in? - %h3 - %a{:name => 'badge-orgs'} - What are Coderwall badge orgs on Github? - %p There is an org for each badge you earn on Coderwall. If you mark the 'Join Coderwall Badge Orgs' in your settings page (Github link), you will automatically be added to the orgs for which you've earned the badge. You can then go to that org on Github and choose to publicize membership which will make the badge appear on your Github profile diff --git a/app/views/pages/faq.html.slim b/app/views/pages/faq.html.slim new file mode 100644 index 00000000..68b6ed0f --- /dev/null +++ b/app/views/pages/faq.html.slim @@ -0,0 +1,70 @@ +-content_for :page_title do + | coderwall : FAQ + +h1.big-title FAQ + +.panel.cf + aside.questions + h2 Questions + ul.question-list + li= link_to("What are these pro tips all about?", '#describeprotips') + li= link_to("How are pro tips organized?", '#trendingprotips') + li= link_to("What is a network?", '#networks') + li= link_to("How is the team score calculated?", '#scoredetails') + li= link_to("How often is the team score calculated?", '#scorefrequency') + li= link_to("How do I join my company's team?", '#jointeam') + li= link_to("How do I leave the team I'm on?", '#leaveteam') + li= link_to("How do I delete a team?", '#deleteteam') + li= link_to("I just qualified for a new achievement, why isn't it on my profile?", '#profileupdates') + li= link_to("Where are the lua/haskell/etc achievements?", '#languages') + li= link_to("What comes with a premium subscription?", '#premium-subscription') + li= link_to("How to apply for jobs through Coderwall?", '#apply') + - if signed_in? + li=link_to("What are Coderwall badge orgs on Github?", '#badge-orgs') + + section.answers + h2 Amazingly Awesome Answers + h3 = link_to 'What are these pro tips all about?', '#', 'name' => 'describeprotips' + p Pro tips are an easy way to share and save interesting links, code, and ideas. Pro tips can be upvoted by the community, earning the author more geek cred and also raise the visibility of the pro tip for the community. You can also quickly retrieve pro tips you've shared from your profile. + + h3 = link_to 'How are pro tips organized?', '#', 'name' => 'trendingprotips' + p Pro tips are grouped into Networks. In networks, you'll notice that protips with more upvotes don't always appear on the top of the page. This is because our trending algorithm takes several things into account. Things that affect the placement of a pro tip include how old the pro tip is, the author's coderwall level, and the coderwall level of each member that upvotes the pro tip. The higher a member's level, the more weight their vote holds. + + h3 = link_to 'What is a network?', '#', 'name' => 'networks' + p A network is a way to group pro tips and members. Each network is built around a specific topic, and includes all the members whose skills relate to that topic, as well as all the relevant pro tips. + + h3 = link_to 'How is the team score calculated?', '#', 'name' => 'scoredetails' + p Nobody remember that exactly. + + h3 = link_to 'How often is the team score calculated?', '#', 'name' => 'scorefrequency' + p Team scores are calculated nightly + + h3 = link_to 'How do I join my company\'s team?', '#', 'name' => 'jointeam' + p If your company doesn't have a team, just click on the "Reserve Team Name" link on the top of the page. If a team already exists, anyone on that team can invite you with a special invite link they can get when they sign in and view their team page. + + h3 = link_to 'How do I leave the team I\'m on?', '#', 'name' => 'leaveteam' + p Sign in and visit your team page. Go to "Edit" and edit the team members section where you can press the 'remove' button under your name and confirm. If you have designated a team admin, they need to do this for you. + + h3 = link_to 'How do I delete a team?', '#', 'name' => 'deleteteam' + p The team will be deleted once all the members leave the team. + + h3 = link_to 'I just qualified for a new achievement, why isn\'t it on my profile?', '#', 'name' => 'profileupdates' + p We review everyones achievements approximately once a week to see if you've earned anything new. + + h3 = link_to 'Where are the Lua/Haskell/etc achievements?', '#', 'name' => 'languages' + p Coderwall is actively working on achievements for all languages found on GitHub, BitBucket, and Codeplex. The lack of an achievements for a given language does not reflect coderwall's views of that language. + h3 = link_to 'What comes with a premium subscription?', '#', 'name' => 'premium-subscription' + p Organizations looking to hire amazing engineers can post jobs and even view visitor analytics for each posting. + p + |Complete details for premium subscriptions are available on the + = link_to 'Employers', employers_path + |page. + + h3 = link_to 'How to apply for jobs through Coderwall?', '#', 'name' => 'apply' + -if current_user && current_user.on_team? && current_user.team.premium? + p Applicants will see an apply button on each job if the employer has configured it. Applicant's email, profile link and resume are emailed to the team admin + p For jobs that have the feature enabled by the employer, you can click the apply button, upload your resume and you're done. Other jobs take you to the employer's site where you can follow their application process + + -if signed_in? + h3 = link_to 'What are Coderwall badge orgs on Github?', '#', 'name' => 'badge-orgs' + p There is an org for each badge you earn on Coderwall. If you mark the 'Join Coderwall Badge Orgs' in your settings page (Github link), you will automatically be added to the orgs for which you've earned the badge. You can then go to that org on Github and choose to publicize membership which will make the badge appear on your Github profile diff --git a/app/views/pages/home4.html.haml b/app/views/pages/home4.html.haml deleted file mode 100644 index 894920a8..00000000 --- a/app/views/pages/home4.html.haml +++ /dev/null @@ -1,213 +0,0 @@ -/ %section.home-top -/ .home-top-inside -/ %h1 A community for developers to unlock and share new skills -/ %a.sign-up-btn{:href => '/'} Sign up - -%section.new-main-content - - //following on - / .filter-bar - / .inside.cf - / %ul.filter-nav - / %li - / %a{:href => '/'} Fresh - / %li - / %a.selected{:href => '/'} Trending - / %li - / %a{:href => '/'} Popular - / %li - / %a{:href => '/'} Upvoted - / - / %ul.toggle-filter-nav - / %li - / %a{:href => '/'} Fresh - / %li - / %a.selected{:href => '/'} Trending - / %li - / %a{:href => '/'} Popular - / %li - / %a{:href => '/'} Upvoted - / - / %ul.toggle-nav - / %li - / %a.switch.following{:href => '/'} - / %li - / %a.action.following-settings{:href => '/'} - / %li - / %a.action.search{:href => '/'} - - //everything on - .filter-bar - .inside.cf - %ul.toggle-nav - %li - %a.switch.everything{:href => '/'} - %li - %a.action.following-settings{:href => '/'} - %li - %a.action.search{:href => '/'} - - //search bar - / .filter-bar.search-bar - / .inside.cf - / %form.search-bar - / %input{:name => "search", :type => "text", :placeholder => "Type here to search, for exmaple: Ruby on Rails"} - / - / %ul.toggle-nav - / %li - / %a.action.search{:href => '/'} - - - - - //inside for tips - .inside - %ul.protips-grid.cf - - %li.two-cols - %header - %p.badge New achievement - .badge-img - =image_tag("badges/beaver.png") - - .content - %p.job-title{:href => '/'} Joe unlocked Beaver 3 - %p.job-exrp Joe Petterson unlocked the Beaver 3 achievement for having at least three original repo where go is the dominant language. - - .tip-image - .blur-image - =image_tag("blur-image2.jpg") - - %footer - %ul.author - %li.user - by - %a{:href => '/'} cassianoleal - %li.team - of - %a{:href => '/'} Klout - - %ul.avatars - %li.user - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li.team - %a{:href => '/'} - =image_tag("team-avatar.png") - - - %li.two-cols.job - %header - %p.job Hiring - %a.feature-jobs{:href => '/'} - Feature your jobs here - - - .content - %a.job-title{:href => '/'} Senior Ruby on Rails Developer Senior Ruby on Rails Developer - %p.job-exrp We're looking for an experienced Ruby on Rails developer to join us as a technical lead. You will be working at a small startup with a flat We're looking for an experienced Ruby on Rails developer to join us as a technical lead. You will be working at a small startup with a flat We're looking for an experienced Ruby on Rails developer to join us as a technical lead. You will be working at a small startup with a flat - - .tip-image.blur-image - =image_tag("blur-image.jpg") - - %footer - %ul.author - %li.team - %a{:href => '/'} Klout - %ul.avatars - %li.team - %a{:href => '/'} - =image_tag("team-avatar.png") - - - %li - %header - %span 75 - %a.title{:href => '/'} jsDelivr - A free public CDN for javascript - %footer - %ul.author - %li.user - by - %a{:href => '/'} cassianoleal - %li.team - of - %a{:href => '/'} Klout - - %ul.avatars - %li.user - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li.team - %a{:href => '/'} - =image_tag("team-avatar.png") - - - - %li - %header - %span 75 - %a.title{:href => '/'} jsDelivr - A free public CDN for javascript - %footer - %ul.author - %li.user - by - %a{:href => '/'} cassianoleal - %li.team - of - %a{:href => '/'} Klout - - %ul.avatars - %li.user - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li.team - %a{:href => '/'} - =image_tag("team-avatar.png") - - - %li - %header - %span 75 - %a.title{:href => '/'} jsDelivr - A free public CDN for javascript - %footer - %ul.author - %li.user - by - %a{:href => '/'} cassianoleal - %li.team - of - %a{:href => '/'} Klout - - %ul.avatars - %li.user - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li.team - %a{:href => '/'} - =image_tag("team-avatar.png") - - - %li - %header - %span 75 - %a.title{:href => '/'} jsDelivr - A free public CDN for javascript - %footer - %ul.author - %li.user - by - %a{:href => '/'} cassianoleal - %li.team - of - %a{:href => '/'} Klout - - %ul.avatars - %li.user - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li.team - %a{:href => '/'} - =image_tag("team-avatar.png") - - - - diff --git a/app/views/pages/icon-font.html.haml b/app/views/pages/icon-font.html.haml deleted file mode 100644 index 921d9e11..00000000 --- a/app/views/pages/icon-font.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -.icon-font-test - g t c w a p l u * b ! $ & > s % < v . m i @ 0 f + d 4 x ~ \ No newline at end of file diff --git a/app/views/pages/jobs.html.haml b/app/views/pages/jobs.html.haml deleted file mode 100644 index 84dd7304..00000000 --- a/app/views/pages/jobs.html.haml +++ /dev/null @@ -1,150 +0,0 @@ -%section.jobs-top - .inside - .filter-outside - %a.filter{:href => '/'} - %h1 - Jobs - %span - Worldwide - - %ul.location-drop-down - %li - %a{:href => '/'} - Worldwide - %li - %a{:href => '/'} - New York City, NY - %li - %a{:href => '/'} - San Francisco, CA - %li - %a{:href => '/'} - Los Angeles, CA - %li - %a{:href => '/'} - Really really long location - %li - %a{:href => '/'} - London, UKs - - - - .top-box - .post-box.cf - %p.post-text - Starting at $99 for 30 days - %a.post-job{:href => '/'} - Post a job - .blurb - %p - Jobs at companies attracting the best developers to help them solve unique challenges in an awesome environment. - -.inside-main-content.cf - %ul.jobs - %li.cf - %a.job{:href => '/'} - %h2 - Software engineer - %h3 - Full-time - %p - Our designers make web and mobile products for our clients. - .team.cf - .details - %a.team-name{:href => '/'} - %h4 Heroku - %p.location - San Francisco, CA - %p.tag-line - Reinvent the way millions of people experience their cities - .team-avatar - %a{:href => '/'} - =image_tag("team-avatar.png") - - %li.cf - %a.job{:href => '/'} - %h2 - Senior Rubyist - %h3 - Full-time - %p - We’re on the hunt for engineering talent who can make software languages bend to their will. Due to our high traffic, there are technical scaling challenges that few companies' experience. As a member of our skilled team, you will build and maintain applications deployed to millions of users. This is a fast-paced agile environment where code you write today will be live on our site tomorrow (Continuous Deployment FTW!). We need the best and the brightest to help us build better, more robust applications. - .team.cf - .details - %a.team-name{:href => '/'} - %h4 Really long team name - %p.location - Really long location yes - %p.tag-line - Help us change the way software is made - .team-avatar - %a{:href => '/'} - =image_tag("team-avatar.png") - - - %li.cf - %a.job{:href => '/'} - %h2 - Senior Rubyist - %h3 - Full-time - %p - We’re on the hunt for engineering talent who can make software languages bend to their will. Due to our high traffic, there are technical scaling challenges that few companies' experience. As a member of our skilled team, you will build and maintain applications deployed to millions of users. This is a fast-paced agile environment where code you write today will be live on our site tomorrow (Continuous Deployment FTW!). We need the best and the brightest to help us build better, more robust applications. - .team.cf - .details - %a.team-name{:href => '/'} - %h4 Heroku - %p.location - San Francisco, CA - %p.tag-line - Help us change the way software is made - .team-avatar - %a{:href => '/'} - =image_tag("team-avatar.png") - - - %li.cf - %a.job{:href => '/'} - %h2 - Software engineer - %h3 - Full-time - %p - You believe in the fundamentals, and you will architect a full featured web application used by thousands of mobile developers around the world. You will self direct your projects, as we move towards a continuous deployment model. - .team.cf - .details - %a.team-name{:href => '/'} - %h4 Heroku - %p.location - San Francisco, CA - %p.tag-line - Help us change the way software is made - .team-avatar - %a{:href => '/'} - =image_tag("team-avatar.png") - - - %li.cf - %a.job{:href => '/'} - %h2 - Senior Rubyist - %h3 - Full-time - %p - We’re on the hunt for engineering talent who can make software languages bend to their will. Due to our high traffic, there are technical scaling challenges that few companies' experience. - .team.cf - .details - %a.team-name{:href => '/'} - %h4 Heroku - %p.location - San Francisco, CA - %p.tag-line - Help us change the way software is made - .team-avatar - %a{:href => '/'} - =image_tag("team-avatar.png") - - %a.new-more{:href => '/'} - more jobs - - diff --git a/app/views/pages/livingsocial.html.haml b/app/views/pages/livingsocial.html.haml deleted file mode 100644 index a48b3c50..00000000 --- a/app/views/pages/livingsocial.html.haml +++ /dev/null @@ -1,335 +0,0 @@ -.page - %header.team-header.cf - .team-logo - =image_tag("premium-teams/livingsocial/livingsocial-logo.jpg") - %h1 LivingSocial - %a.follow{:href => '/'} - Follow - //header - - %section.team-details.cf - %ul.connections - %li - %a.url{:href => '/'} - livingsocial.com - %li - %a.twitter{:href => '/'} - On Twitter - %li - %a.facebook{:href => '/'} - On Facebook - %li - %a.github{:href => '/'} - On Github - .switch-section - %p - LivingSocial is the local marketplace to buy and share the best things in your city. We inspire our members to find, share, and enjoy the best of their neighborhoods by connecting them with handpicked local businesses. - //team details - - %section.members - %ul.members-list.cf - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %ul - %li - Matt Aimonetti - %li - Web dev - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %ul - %li - Chad Fowler - %li - VP Engineering - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %ul - %li - Nick Sieger - %li - Web dev - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %ul - %li - David Copeland - %li - Web dev - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %ul - %li - Nick Sieger - %li - Web dev - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %ul - %li - David Copeland - %li - Web dev - //members list - - %section.about-members.cf - .member-details - %h3 - Matt Aimonetti - %p - Sr Software Architect at LivingSocial - Former Sony PlayStation developer. - %h3 - What I work on - %p - Matt creates the platform for tracking ad performance. He also once built an electronic database of medical records for a hospital in rural Burundi. - .member-pic - =image_tag("premium-teams/livingsocial/matt-img.jpg") - .member-box.cf - .member-basics - %h3 - Matt Aimonetti - %h4 - Web developer - %a.view-profile{:href => '/'} - View profile - .member-stats - %ul.cf - %li - %p - Languages grokked - %span - 20 - %li - %p - Kittens Saved - %span - 392 - %li - %p - Apps deployed today - %span - 5 - //about members - - %section.big-headline - %h2 - This company truly values hard work. If you're flexible, friendly, and love to hustle, you're born to be a LivingSocialite. - //big headline - - %section.big-image.cf - %blockquote - %span - " - %p - If you're not nervous about one or two decisions every day, you aren't trying hard enough. - =image_tag("premium-teams/livingsocial/big-img.jpg") - //big image - - %section.favourite-benefits.cf - =image_tag("premium-teams/our-favourite-benefits.png") - %ol - %li - %h3 - Offices around the world - %p - Want to work in SF? Check. DC? Check. Barcelona? Portland? Seattle? Seoul? Check. We built a distributed team of smart people that build amazing products. Location? Your choice. - %li - %h3 - Flexible PTO - %p - We're all professionals. Take as much time as you need. Doing great work matters more than tracking sick days. - %li - %h3 - Opportunity to Reinvent Commerce - %p - You may know us for just daily deals, but that was just the gateway drug to local commerce. Join us to reinvent the new way we interact with merchants in our cities every day. - //favourite benefits - - %section.half-img - .img - =image_tag("profile/profile-img.jpg") - .text - %h3 - The LivingSocial Way - %p - We move fast, take risks, and pride ourselves on staying flexible, fun, and ferociously committed to executing each day. Do you want to be challenged by your job and be surrounded by passionate, dedicated, and creative people? Are you hungry? Prove it. - //half image - - %section.office-images - %h2 - Images from the office - //office images - - %section#open-positions - %header - =image_tag("profile/profile-img.jpg") - %h2 - Reinvent the way millions of people experience their cities - %ul - %li.job - %h3 - Mobile/iOS Developer - %ul - %li - Come and create beautiful mobile experiences. - %li - San Francisco, CA - %li.job - %h3 - Software Engineer - Ruby - %ul - %li - Come and create beautiful web experiences. - %li - San Francisco, CA - //jobs - - %section.why-work - %header - %h2 - Why work for LivingSocial? - .img - =image_tag("profile/profile-img.jpg") - %ol - %li - %h3 - Move Fast - %p - Everyone on our team is responsible for moving the needle. We push code dozens of times a day. Big ideas are broken into small pieces so that we can learn quickly. Want to move faster? - %li - %h3 - Reach Millions - %p - Per day, we touch millions of people and generate millions of dollars of transactions. Want to build applications at scale? - %li - %h3 - Help Transform Small Businesses - %p - We build tools that help small businesses succeed in hundreds of cities around the world. Want to make a difference in the life of a small business owner? - //why work for - - %section.location - .location-details - %h3 - Washington, DC - %p.address - 1445 New York Ave Washington, DC - %p - LivingSocial's HQ, located steps from US's HQ, the White House. We do team standups walking around the National Mall. - %ul.locations - %li - %a{:href => '/'} - San Diego, CA - %li - %a{:href => '/'} - Boulder, CO - %li - %a{:href => '/'} - Seattle, WA - %li - %a{:href => '/'} - Dallas, TX - %li - %a{:href => '/'} - Montpellier, France - %li - %a{:href => '/'} - Edinburgh, Scotland - %li - %a{:href => '/'} - Rochester, NC - %li - %a{:href => '/'} - Rio de Janiero - %li - %a{:href => '/'} - Wake Forrest, NC - %li - %a{:href => '/'} - Dubai, UAE - %li - %a{:href => '/'} - Portland, OR - //location - - %section.books - %header - %h2 - Books our team has written - %ul - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - %li - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - //books - - %section.meet - %ol - %li.event - %h3 - Rubyconf - %ul - %li - United States / Denver, CO - %li - November 1 - 3, 2012 - %p.date - 1 - %span.month - Nov - - %li.event - %h3 - Scotland on Rails - %ul - %li - United States / Denver, CO - %li - November 1 - 3, 2012 - %p.date - 1 - %span.month - Nov - %li.event - %h3 - RubyNation - %ul - %li - United States / Denver, CO - %li - November 1 - 3, 2012 - %p.date - 1 - %span.month - Nov - //meet - - - - - - - - - - diff --git a/app/views/pages/network.html.haml b/app/views/pages/network.html.haml deleted file mode 100644 index 3f9d7bc4..00000000 --- a/app/views/pages/network.html.haml +++ /dev/null @@ -1,110 +0,0 @@ -=content_for :body_id do - network - -#network-header.cf - %ul - %li - %a.current{:href => '/'} - %h1 Following - %li - %a{:href => '/'} - %h1 Followers - %a.back-up{:href => '/'} - Back up - -.network-panel.cf - %ul.network-list.cf - / %li.no-followers - / %h1 Darn, no followers - / %p - / The best way to get followers is to start following some other - / %a{:href => '/'} - / cool folks, - / or even - / %a{:href => '/'} - / share a protip. - %li.cf - .user - .level - %p 8 - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - .user-details - %h2 - %a{:href => '/'} - Chris Wanstrath forked blah blah - %h3 Web designer - .team - %a{:href => '/'} - =image_tag("team-avatar.png") - .team-details - %h4 - %a{:href => '/'} - Github - - %li.cf - .user - .level - %p 8 - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - .user-details - %h2 - %a{:href => '/'} - Chris Wanstrath forked blah blah - %h3 Web designer at the end of the world - .team - %a{:href => '/'} - =image_tag("team-avatar.png") - .team-details - %h4 - %a{:href => '/'} - Github - %a.hiring{:href => '/'} - We're hiring! - %li.cf.me - .user - .level - %p 8 - %p.pts - 73 - %span - pts - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - .user-details - %h2 Chris Wanstrath - %h3 Web designer - .team - .team-details - %h4.you This is you! - - %li.cf - .user - .level - %p 8 - %a{:href => '/'} - =image_tag("profile/profile-img.jpg") - .user-details - %h2 - %a{:href => '/'} - Chris Wanstrath forked blah blah - %h3 Web designer - .team - %a{:href => '/'} - =image_tag("team-avatar.png") - .team-details - %h4 - %a{:href => '/'} - Github - %a.hiring{:href => '/'} - We're hiring! - - - - .more - %a{:href => '/'} - more - - - diff --git a/app/views/pages/networks.html b/app/views/pages/networks.html deleted file mode 100644 index ae428168..00000000 --- a/app/views/pages/networks.html +++ /dev/null @@ -1,568 +0,0 @@ -<div class='cf' id='protip-grid-top'> - <header class='cf grid-header'> - <input class='network-search' type='text' value='search networks'/> - <!-- %h1 --> - <!-- All Networks --> - <ul class='network-toplinks'> - <li> - <a href='/'> - Trending - </a> - </li> - <li> - <a href='/'> - <span> - My networks - </span> - </a> - </li> - <li> - <a class='current' href='/'> - All networks - </a> - </li> - </ul> - </header> -</div> -<div class='inside-main-content cf'> -<ul class='networks-filter'> - <li> - <a class='current' href='/'> - A - Z - </a> - </li> - <li> - <a href='/'> - Most upvotes - </a> - </li> - <li> - <a href='/'> - New users - </a> - </li> - <li> - <a href='/'> - New protips - </a> - </li> -</ul> -<ol class='networks-list'> -<!-- A --> -<li class='cf'> - <span class='letter'> - A - </span> - <!-- Network --> - <div class='network cf'> - <h2> - <a href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - </li> - <li> - <a class='tips' href='/'> - Protips - <span> - 13 - </span> - </a> - </li> - </ul> - <a class='join' href='/'> - Join - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - </li> - <li> - <a class='tips' href='/'> - Protips - <span> - 13 - </span> - </a> - </li> - </ul> - <a class='join' href='/'> - Join - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- More networks --> - <!-- %a.more-networks{:href => '/'} --> - <!-- More networks --> -</li> -<!-- B --> -<li class='cf'> - <span class='letter'> - B - </span> - <!-- Network --> - <div class='network cf'> - <h2> - <a href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - </li> - <li> - <a class='tips' href='/'> - Protips - <span> - 13 - </span> - </a> - </li> - </ul> - <a class='join' href='/'> - Join - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - </li> - <li> - <a class='tips' href='/'> - Protips - <span> - 13 - </span> - </a> - </li> - </ul> - <a class='join' href='/'> - Join - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- More networks --> - <!-- %a.more-networks{:href => '/'} --> - <!-- More networks --> -</li> -<!-- C --> -<li class='cf'> - <span class='letter'> - C - </span> - <!-- Network --> - <div class='network cf'> - <h2> - <a href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - </li> - <li> - <a class='tips' href='/'> - Protips - <span> - 13 - </span> - </a> - </li> - </ul> - <a class='join' href='/'> - Join - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - </li> - <li> - <a class='tips' href='/'> - Protips - <span> - 13 - </span> - </a> - </li> - </ul> - <a class='join' href='/'> - Join - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- Network --> - <div class='network cf'> - <h2> - <a class='class' href='/'> - ActionScript - </a> - </h2> - <ul class='tips-and-users'> - <li> - <a class='users' href='/'> - Members - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - <li> - <a class='tips' href='/'> - Pro tips - <span> - 13 - </span> - </a> - <a class='new' href='/'> - 13 - </a> - </li> - </ul> - <a class='join member' href='/'> - Member - </a> - </div> - <!-- More networks --> - <!-- %a.more-networks{:href => '/'} --> - <!-- More networks --> -</li> -</ol> -</div> diff --git a/app/views/pages/networks.html.haml b/app/views/pages/networks.html.haml deleted file mode 100644 index 01ceef40..00000000 --- a/app/views/pages/networks.html.haml +++ /dev/null @@ -1,392 +0,0 @@ -#protip-grid-top.cf - %header.cf.grid-header - %input.network-search(type='text' value='search networks') - / %h1 - / All Networks - %ul.network-toplinks - %li - %a{:href => '/'} - Trending - %li - %a{:href => '/'} - %span - My networks - %li - %a.current{:href => '/'} - All networks -.inside-main-content.cf - %ul.networks-filter - %li - %a.current{:href => '/'} - A - Z - %li - %a{:href => '/'} - Most upvotes - %li - %a{:href => '/'} - New users - %li - %a{:href => '/'} - New protips - - %ol.networks-list - - / A - %li.cf - %span.letter - A - - /Network - .network.cf - %h2 - %a{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %li - %a.tips{:href => '/'} - Protips - %span - 13 - %a.join{:href => '/'} - Join - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /Network - .network.cf - %h2 - %a{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %li - %a.tips{:href => '/'} - Protips - %span - 13 - %a.join{:href => '/'} - Join - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /More networks - / %a.more-networks{:href => '/'} - / More networks - - - / B - %li.cf - %span.letter - B - - /Network - .network.cf - %h2 - %a{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %li - %a.tips{:href => '/'} - Protips - %span - 13 - %a.join{:href => '/'} - Join - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /Network - .network.cf - %h2 - %a{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %li - %a.tips{:href => '/'} - Protips - %span - 13 - %a.join{:href => '/'} - Join - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /More networks - / %a.more-networks{:href => '/'} - / More networks - - / C - %li.cf - %span.letter - C - - /Network - .network.cf - %h2 - %a{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %li - %a.tips{:href => '/'} - Protips - %span - 13 - %a.join{:href => '/'} - Join - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /Network - .network.cf - %h2 - %a{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %li - %a.tips{:href => '/'} - Protips - %span - 13 - %a.join{:href => '/'} - Join - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /Network - .network.cf - %h2 - %a.class{:href => '/'} - ActionScript - %ul.tips-and-users - %li - %a.users{:href => '/'} - Members - %span - 13 - %a.new{:href => '/'} - 13 - - %li - %a.tips{:href => '/'} - Pro tips - %span - 13 - %a.new{:href => '/'} - 13 - %a.join.member{:href => '/'} - Member - - /More networks - / %a.more-networks{:href => '/'} - / More networks - - diff --git a/app/views/pages/new-home.html.haml b/app/views/pages/new-home.html.haml deleted file mode 100644 index 2abb49c2..00000000 --- a/app/views/pages/new-home.html.haml +++ /dev/null @@ -1,49 +0,0 @@ -.wrapper - %header.site-header.cf - %a.new-home-logo{:href => '/'} - %span - Coderwall - %p.login - Already have an account? - %a{:href => '/'} - Login - %section.intro - %h1 - Where developers meet developers doing interesting things. - %h2 - Join us - %ul.sign-up-list - %li - %a{:href => '/'} - %span.git - Git hub - %li - %a{:href => '/'} - %span.twitter - Twitter - %li - %a{:href => '/'} - %span.linkedin - Linkedin - %section.slides - %ul - %li.profile-slide - .browser - .bubble - %h3 - What type of developer are you? Share, unlock achievements, and establish your geek cred. - - %li.protips-slide - .browser - .bubble - %h3 - Learn new pro tips from the experts, develop your craft. - - %li.teams-slide - .browser - .bubble - %h3 - Discover brilliant engineering teams, find your dream job with one - =render :partial => 'shared/footer' - - diff --git a/app/views/pages/new-new-home.html.haml b/app/views/pages/new-new-home.html.haml deleted file mode 100644 index 4fad1ef7..00000000 --- a/app/views/pages/new-new-home.html.haml +++ /dev/null @@ -1,49 +0,0 @@ -%section.users-top - .inside - %a.new-logo{:href=> '/'} - - %a.sign-in{:href => '/'} - Sign in - - %h1.mainline A community for developers to unlock & share new skills, join us. - - / %a.join-us{:href => '/'} - / Join us - / %p.join - / join us - =render :partial => "sessions/join_buttons" - -%section.home-section - .inside.cf - .text - %h2 Share protips, learn from the community - %p Learn from the experts about the latest languages, tools & technologies or share your own pro tip and get feedback from thousands of developers. Share code snippets, tutorials or thought pieces with your peers. - - .image - =image_tag("protip.jpg") - -%section.home-section.badge-section - .inside.cf - .text - %h2 Unlock & earn badges for your coding achievements - %p Earn unique Coderwall badges to display on your user profile. Based on your github repositories, earn badges for all major language types, represent your skills, level-up. - - .image - =image_tag("badges2.jpg") - - -%section.home-section.team-section - .inside.cf - .text - %h2 Represent your team, curate it's culture - %p Discover over 6,000 brilliant engineering teams, how they're solving interesting challenges, and even find your next dream job. Curate your team's page by adding unique content, illustrating it's culture. - - .image - =image_tag("team.jpg") - -%section.second-signup - .inside.cf - %h2.subline - Start building your coderwall. - =render :partial => "sessions/join_buttons" - diff --git a/app/views/pages/new-protip.html.haml b/app/views/pages/new-protip.html.haml deleted file mode 100644 index a49281be..00000000 --- a/app/views/pages/new-protip.html.haml +++ /dev/null @@ -1,81 +0,0 @@ -.inside.cf - .dark-screen - //.blur-screen - .tip-container.cf - %article.protip-content - %a.share-this-tip{:href => '/'} - Share this - %a.upvote{:href => '/'} - %span 100 - %h1 styling ordered list numbers - %p.views - %span 340 - views - %ul#tags.cf - %li - %a{:href => '/'} Ruby on rails - %li - %a{:href => '/'} Ruby on rails - .tip-body - %p When styling lists I inevitably remove the default bullet points or numbers with CSS, using something like. - - %p And end up replacing the bullet or number with a background image. This works great, until you need those incrementing numbers back and don't want to get into the situation where you are hard coding numbers and using extra mark up to re-create them. - - %p However the styling options for the default bullets and numbers are limited to say the least and we all want pretty numbers, don't we. - - %p So, I found a great solution for this today (via Mr Ashley Stevens) using pseudo selectors and the little known CSS generated content properties: - - %aside.tip-sidebar - .user-box - %a.avatar{:href => '/'} - =image_tag("profile/profile-img.jpg") - - %ul.user-team - %li.user - by - %a{:href => '/'} - Oli Lisher - %li.team - of - %a{:href => '/'} - Klout - - %p.bio - Web interface designer & front end developer. Head pixel pusher at Coderwall. - - %ul.side-bar-list - - %li - %a.name{:href => '/'} Olilish - %a.follow{:href => '/'} - - %li - %a.name{:href => '/'} Klout - %a.follow{:href => '/'} - - - .side-btm - %h3 Networks - %ul.side-bar-list.side-bar-networks - - %li.design - %a.name{:href => '/'} Design - %a.follow{:href => '/'} - - %li.python - %a.name{:href => '/'} Python - %a.follow{:href => '/'} - - %li.wordpress - %a.name{:href => '/'} Wordpress - %a.follow{:href => '/'} - - %h3 Featured team - .team-box - .image-top - =image_tag("home-top-bg.jpg") - .content - %a.avatar{:href => '/'} - =image_tag("profile/profile-img.jpg") - %h4 SoundCloud - %p Calling all front end devs, SoundCloud is awesome and hiring! diff --git a/app/views/pages/oli.html.haml b/app/views/pages/oli.html.haml deleted file mode 100644 index 586df541..00000000 --- a/app/views/pages/oli.html.haml +++ /dev/null @@ -1,40 +0,0 @@ -%section.ratio-content.cf - .ratio-content-inside.cf - .ratio-left - %h1 Change the ratio - %p coderwall represents the best web developers in the world. Currently only 3% of our users have 2 X chromosomes. - %p.last We want to help change the ratio and encourage more female developers to sign up and show off their geek cred. - .feature-box.cf - %h2 The lady devs in our 3% - %ul.ladies-list.cf - -12.times do - =render :partial => 'lady' - - %ul.tabs.cf - %li - %a.our-ladies{:href => "/"} Our ladies - %li - %a.the-stats{:href => "/"} The stats - - .ratio-right - %a.bubble{:href => "/"} - %h3 Help to change the ratio - .lady - %h4 3 - .man - %h4 97 -%section.ratio-sub-content - .ratio-sub-content-inside.cf - %h2 - %span Help make the change - %ol.actions.cf - %li - %p.number 1 - %h3 Share - %p.text-box Invite fellow female coders via Facebook & LinkedIn. Spread the word, change the ratio! - %a{:href= => "/"} Share - %li - %p.number 2 - %h3 Join us - %p.text-box Stand out and be recognised for the awesome things you're learning and building. - %a{:href => "/"} Sign-up for coderwall diff --git a/app/views/pages/pb.html.haml b/app/views/pages/pb.html.haml deleted file mode 100644 index c3327db5..00000000 --- a/app/views/pages/pb.html.haml +++ /dev/null @@ -1,124 +0,0 @@ -%section.top-heading - .inside - %h1 - Learn your market value, - %strong - find a team that challenges you, - and discover a company building something you - %strong - absolutely love. - -.inside-main-content.cf - %ul.icon-list.cf - %li - .image.no - No Recruiters, only amazing companies matched to you and your goals. - %li - .image.coffee - No work to do, we’ll screen companies and you choose who you’d like to talk with. - %li - .image.eye - 100% private. You can learn your market value without your employer knowing. - - %form.pb-form - .form-section.cf.needs-and-or - .header.cf - %h2 What do you want to do next? - %p.private Private - .left - .use-account.cf - %label.normal-label Use my github & linkedin account to start my personalized matchmaking algorithm. - %input{:name => "vehicle", :type => "checkbox", :value => "Bike"} - - %p.hint - We only send pitches that pass your personalized matching algorithm. It continuously improves, making pitches get even better over time. - %label.normal-label - Interested in: - %ul.interested-in.cf - %li - %input{:name => "full-time", :type => "checkbox", :for => "full-time"} - %label.btn.full-time{:for => "full-time"} Full time - %li - %input{:name => "full-time", :type => "checkbox", :for => "part-time"} - %label.btn.part-time{:for => "part-time"} Part time - - .right - %label.normal-label - Tell us about your goals? (Max 140 characters) - %textarea.goals - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt. - - .form-section.cf - .header.cf - %h2 How much do you want to make? - %p.private Private - %ul.amount-btns.cf - %li - %input{:name => "80k", :type => "radio", :value => "80k"} - %label.btn{:for => "full-time"} 80k - %li - %input{:name => "80k", :type => "radio", :value => "80k"} - %label.btn{:for => "full-time"} 80k - %li - %input{:name => "80k", :type => "radio", :value => "80k"} - %label.btn{:for => "full-time"} 80k - %li - %input{:name => "80k", :type => "radio", :value => "80k"} - %label.btn{:for => "full-time"} 80k - %li - %input{:name => "80k", :type => "radio", :value => "80k"} - %label.btn{:for => "full-time"} 80k - %li - %input{:name => "80k", :type => "radio", :value => "80k"} - %label.btn{:for => "full-time"} 80k - - .form-section.cf - .header.cf - %h2 Your background - %p.private Private - %ul.form-list.cf - %li - %label.normal-label Current title - %input{:type => "text", :value => "e.g: Web Developer"} - %li - %label.normal-label Location - %input{:type => "text", :value => "e.g: Chichester, UK"} - %li - %label.normal-label Current Employer - %input{:type => "text", :value => "e.g: Facebook"} - - %li - %label.normal-label Working Status - %ul.inside-list - %li - Requires Visa assistance to work in the US - %input{:name => "vehicle", :type => "checkbox", :value => "Bike"} - %li - Interested in relocating - %input{:name => "vehicle", :type => "checkbox", :value => "Bike"} - - .submit-section.cf - %input{:type => "submit", :value => "Sure, I’ll privately try it", :class => "try-it btn"} - %a.skip.btn{:href => '/'} - Skip for now - - - - %section.how-it-works - %h2.sub-header - How it works - %ul.how-icon-list.cf - %li - %span.number 1 - Briefly tell us what you want from your job. - %li - %span.number 2 - You'll received pitch when we matchmake you with only the best companies we've hand picked. - %li - %span.number 3 - A personally curated pitch is packed with rich information about the company, the team you'd work with, and the interesting challenges. - %li - %span.number 4 - We'll arrange a no-commitment phone conversation with developers at companies with pitches you like. Only interview with awesome companies. - - diff --git a/app/views/pages/privacy_policy.html.haml b/app/views/pages/privacy_policy.html.haml deleted file mode 100644 index 202bf023..00000000 --- a/app/views/pages/privacy_policy.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -%h1.big-title Privacy Policy - -.panel - .inside-panel-align-left - %h4 UPDATED April 17th 2014 - - %p Assembly Made, Inc. (“Assembly Made”, “our”, “us” or “we”) provides this Privacy Policy to inform you of our policies and procedures regarding the collection, use and disclosure of personal information we receive from users of coderwall.com (this “Site” or "Coderwall"). - - %h3 Website Visitors - %p Like most website operators, Coderwall collects non-personally-identifying information of the sort that web browsers and servers typically make available, such as the browser type, language preference, referring site, and the date and time of each visitor request. Coderwall’s purpose in collecting non-personally identifying information is to better understand how Coderwall’s visitors use its website. From time to time, Coderwall may release non-personally-identifying information in the aggregate, e.g., by publishing a report on trends in the usage of its website. - - %p Coderwall also collects potentially personally-identifying information like Internet Protocol (IP) addresses for logged in users. Coderwall only discloses logged in user IP addresses under the same circumstances that it uses and discloses personally-identifying information as described below. - - %h3 Gathering of Personally-Identifying Information - %p We collect the personally-identifying information you provide to us. For example, if you provide us feedback or contact us via e-mail, we may collect your name, your email address and the content of your email in order to send you a reply. When you post messages or other content on our Site, the information contained in your posting will be stored on our servers and other users will be able to see it. - %p If you log into the Site using your account login information from certain third party sites (“Third Party Account”), e.g. Linked In, Twitter, we may receive information about you from such Third Party Account, in accordance with the terms of use and privacy policy of such Third Party Account (“Third Party Terms”). We may add this information to the information we have already collected from the Site. For instance, if you login to our Site with your LinkedIn account, LinkedIn may provide your name, email address, location and other information you store on LinkedIn. If you elect to share your information with your Third Party Account, we will share information with your Third Party Account in accordance with your election. The Third Party Terms will apply to the information we disclose to them. - %p - %strong Do Not Track Signals: - Your web browser may enable you to indicate your preference as to whether you wish to allow websites to collect personal information about your online activities over time and across different websites or online services. At this time our site does not respond to the preferences you may have set in your web browser regarding the collection of such personal information, and our site may continue to collect personal information in the manner described in this Privacy Policy. We may enable third parties to collect information in connection with our site. This policy does not apply to, and we are not responsible for, any collection of personal information by third parties on our site. - - %h3 Protection of Certain Personally-Identifying Information - %p Coderwall discloses potentially personally-identifying and personally-identifying information only to those of its employees, contractors and affiliated organizations that (i) need to know that information in order to process it on Coderwall’s behalf or to provide services available at Coderwall’s websites, and (ii) that have agreed not to disclose it to others. Some of those employees, contractors and affiliated organizations may be located outside of your home country; by using Coderwall’s websites, you consent to the transfer of such information to them. If you are a registered user of a Coderwall website and have supplied your email address, Coderwall may occasionally send you an email to tell you about new features, solicit your feedback, or just keep you up to date with what’s going on with Coderwall and our products. We primarily use our various product blogs to communicate this type of information, so we expect to keep this type of email to a minimum. If you send us a request (for example via a support email or via one of our feedback mechanisms), we reserve the right to publish it in order to help us clarify or respond to your request or to help us support other users. Coderwall uses reasonable efforts to protect against the unauthorized access, use, alteration or destruction of your personally-identifying information. - %p You may opt out of receiving promotional emails from us by following the instructions in those emails. If you opt out, we may still send you non-promotional emails, such as emails about your accounts or our ongoing business relations. You may also send requests about your contact preferences and changes to your information by emailing support@coderwall.com. - - %h3 Third Party Advertisements - %p We may also use third parties to serve ads on the Site. Certain third parties may automatically collect information about your visits to our Site and other websites, your IP address, your ISP, the browser you use to visit our Site (but not your name, address, email address, or telephone number). They do this using cookies, clear gifs, or other technologies. Information collected may be used, among other things, to deliver advertising targeted to your interests and to better understand the usage and visitation of our Site and the other sites tracked by these third parties. This Privacy Policy does not apply to, and we are not responsible for, cookies, clear gifs, or other technologies in third party ads, and we encourage you to check the privacy policies of advertisers and/or ad services to learn about their use of cookies, clear gifs, and other technologies. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here: http://www.aboutads.info/choices/. - - %h3 Cookies - %p A cookie is a string of information that a website stores on a visitor’s computer, and that the visitor’s browser provides to the website each time the visitor returns. Coderwall uses cookies to help Coderwall identify and track visitors, their usage of Coderwall website, and their website access preferences. Coderwall visitors who do not wish to have cookies placed on their computers should set their browsers to refuse cookies before using Coderwall’s websites, with the drawback that certain features of Coderwall’s websites may not function properly without the aid of cookies. - - %h3 Business Transfers - %p If Assembly Made, or substantially all of its assets were acquired, or in the unlikely event that Assembly Made goes out of business or enters bankruptcy, user information would be one of the assets that is transferred or acquired by a third party. You acknowledge that such transfers may occur, and that any acquiror of Assembly Made may continue to use your personal information as set forth in this policy. - - %h3 Privacy Policy Changes - %p Although most changes are likely to be minor, we may change our Privacy Policy from time to time, and in our sole discretion. We encourage visitors to frequently check this page for any changes to its Privacy Policy. Your continued use of this site after any change in this Privacy Policy will constitute your acceptance of such change. - - %p This Privacy Policy was crafted from Wordpress.com's version, which is available under a Creative Commons Sharealike license. diff --git a/app/views/pages/privacy_policy.html.slim b/app/views/pages/privacy_policy.html.slim new file mode 100644 index 00000000..8b67725f --- /dev/null +++ b/app/views/pages/privacy_policy.html.slim @@ -0,0 +1,37 @@ +h1.big-title Privacy Policy + +.panel + .inside-panel-align-left + h4 UPDATED April 17th 2014 + + p Assembly Made, Inc. (“Assembly Made”, “our”, “us” or “we”) provides this Privacy Policy to inform you of our policies and procedures regarding the collection, use and disclosure of personal information we receive from users of coderwall.com (this “Site” or "Coderwall"). + + h3 Website Visitors + p Like most website operators, Coderwall collects non-personally-identifying information of the sort that web browsers and servers typically make available, such as the browser type, language preference, referring site, and the date and time of each visitor request. Coderwall’s purpose in collecting non-personally identifying information is to better understand how Coderwall’s visitors use its website. From time to time, Coderwall may release non-personally-identifying information in the aggregate, e.g., by publishing a report on trends in the usage of its website. + + p Coderwall also collects potentially personally-identifying information like Internet Protocol (IP) addresses for logged in users. Coderwall only discloses logged in user IP addresses under the same circumstances that it uses and discloses personally-identifying information as described below. + + h3 Gathering of Personally-Identifying Information + p We collect the personally-identifying information you provide to us. For example, if you provide us feedback or contact us via e-mail, we may collect your name, your email address and the content of your email in order to send you a reply. When you post messages or other content on our Site, the information contained in your posting will be stored on our servers and other users will be able to see it. + p If you log into the Site using your account login information from certain third party sites (“Third Party Account”), e.g. Linked In, Twitter, we may receive information about you from such Third Party Account, in accordance with the terms of use and privacy policy of such Third Party Account (“Third Party Terms”). We may add this information to the information we have already collected from the Site. For instance, if you login to our Site with your LinkedIn account, LinkedIn may provide your name, email address, location and other information you store on LinkedIn. If you elect to share your information with your Third Party Account, we will share information with your Third Party Account in accordance with your election. The Third Party Terms will apply to the information we disclose to them. + p + strong Do Not Track Signals: + | Your web browser may enable you to indicate your preference as to whether you wish to allow websites to collect personal information about your online activities over time and across different websites or online services. At this time our site does not respond to the preferences you may have set in your web browser regarding the collection of such personal information, and our site may continue to collect personal information in the manner described in this Privacy Policy. We may enable third parties to collect information in connection with our site. This policy does not apply to, and we are not responsible for, any collection of personal information by third parties on our site. + + h3 Protection of Certain Personally-Identifying Information + p Coderwall discloses potentially personally-identifying and personally-identifying information only to those of its employees, contractors and affiliated organizations that (i) need to know that information in order to process it on Coderwall’s behalf or to provide services available at Coderwall’s websites, and (ii) that have agreed not to disclose it to others. Some of those employees, contractors and affiliated organizations may be located outside of your home country; by using Coderwall’s websites, you consent to the transfer of such information to them. If you are a registered user of a Coderwall website and have supplied your email address, Coderwall may occasionally send you an email to tell you about new features, solicit your feedback, or just keep you up to date with what’s going on with Coderwall and our products. We primarily use our various product blogs to communicate this type of information, so we expect to keep this type of email to a minimum. If you send us a request (for example via a support email or via one of our feedback mechanisms), we reserve the right to publish it in order to help us clarify or respond to your request or to help us support other users. Coderwall uses reasonable efforts to protect against the unauthorized access, use, alteration or destruction of your personally-identifying information. + p You may opt out of receiving promotional emails from us by following the instructions in those emails. If you opt out, we may still send you non-promotional emails, such as emails about your accounts or our ongoing business relations. You may also send requests about your contact preferences and changes to your information by emailing support@coderwall.com. + + h3 Third Party Advertisements + p We may also use third parties to serve ads on the Site. Certain third parties may automatically collect information about your visits to our Site and other websites, your IP address, your ISP, the browser you use to visit our Site (but not your name, address, email address, or telephone number). They do this using cookies, clear gifs, or other technologies. Information collected may be used, among other things, to deliver advertising targeted to your interests and to better understand the usage and visitation of our Site and the other sites tracked by these third parties. This Privacy Policy does not apply to, and we are not responsible for, cookies, clear gifs, or other technologies in third party ads, and we encourage you to check the privacy policies of advertisers and/or ad services to learn about their use of cookies, clear gifs, and other technologies. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here: http://www.aboutads.info/choices/. + + h3 Cookies + p A cookie is a string of information that a website stores on a visitor’s computer, and that the visitor’s browser provides to the website each time the visitor returns. Coderwall uses cookies to help Coderwall identify and track visitors, their usage of Coderwall website, and their website access preferences. Coderwall visitors who do not wish to have cookies placed on their computers should set their browsers to refuse cookies before using Coderwall’s websites, with the drawback that certain features of Coderwall’s websites may not function properly without the aid of cookies. + + h3 Business Transfers + p If Assembly Made, or substantially all of its assets were acquired, or in the unlikely event that Assembly Made goes out of business or enters bankruptcy, user information would be one of the assets that is transferred or acquired by a third party. You acknowledge that such transfers may occur, and that any acquiror of Assembly Made may continue to use your personal information as set forth in this policy. + + h3 Privacy Policy Changes + p Although most changes are likely to be minor, we may change our Privacy Policy from time to time, and in our sole discretion. We encourage visitors to frequently check this page for any changes to its Privacy Policy. Your continued use of this site after any change in this Privacy Policy will constitute your acceptance of such change. + + p This Privacy Policy was crafted from Wordpress.com's version, which is available under a Creative Commons Sharealike license. diff --git a/app/views/pages/protips.html.haml b/app/views/pages/protips.html.haml deleted file mode 100644 index a4cd10f8..00000000 --- a/app/views/pages/protips.html.haml +++ /dev/null @@ -1,200 +0,0 @@ -#protip-grid-top.cf - %header.cf.grid-header - /%input.network-search(type='text' value='search networks') - %h1.underline-test - Javascript - / %a.about-networks{:href => '/'} - / Read more - %ul.network-toplinks - %li - %a{:href => '/'} - Trending - %li - %a{:href => '/'} - %span - My networks - %li - %a.current{:href => '/'} - All networks - -.inside-main-content.cf - / .combined-networks.cf - / %a.close{:href => '/'} - / %span - / Close - / %p - / This network includes: - / %ul.cf - / %li - / jQuery, - / %li - / MooTools - - %aside.protips-sidebar - %ul.protip-actions - %li - %a.member{:href => '/'} - %li - %a.share{:href => '/'} - Share a protip - %ul.filter - %li - %a{:href => '/'} - Most upvotes - %li - %a.active{:href => '/'} - New - %span - 4 - %li - %a{:href => '/'} - Featured - %span - 4 - %li - %a{:href => '/'} - Members - - .network-details - %h3 Network details - %p - %ul.tag-list.cf - %li - %a{:href => '/'} - jQuery - %li - %a{:href => '/'} - MooTools - %li - %a{:href => '/'} - Node.js - %li - %a{:href => '/'} - Backbone.js - - / .side-box - / .side-box-header - / %h3 Network details - / .inside.cf - / %p - / This network includes: jQuery, MooTools, Node.js, Backbone.js - - / .side-box - / .side-box-header.expert - / %h3 Resident Expert - / .inside.cf - / %a.avatar{:href => '/'} - / =image_tag("profile/profile-img.jpg") - / %ul.details - / %li - / %a.users{:href => '/'} - / Mdeiters mdeiters mdetiers - / %li - / %a.tips{:href => '/'} - / View protips - / %p.resident-text - / Our resident experts are industry leaders in their field. - - .side-box - .side-box-header.mayor - %h3 Mayor - .inside.cf - %a.avatar{:href => '/'} - =image_tag("profile/profile-img.jpg") - %ul.details - %li - %a.users{:href => '/'} - Mdeiters mdeiters mdetiers - %li - %a.tips{:href => '/'} - View protips - - / .side-box - / .side-box-header.mayor - / %h3 Mayor - / .inside.cf - / %p - / Want to become the mayor of Javascript? Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod. - / - - - - %ul.list-of-tips.threecols.cf - %li - %li - %li - - - %ul.list-of-members.cf - %li - .header.cf - %a.user{:href => '/'} - =image_tag("profile/profile-img.jpg") - .details - %h2 - %a{:href => '/'} - Oliver Lisher - %ul - %li - Member of - %a.user{:href => '/'} - Coderwall - %li - Web designer and developer - - %ul.actions-list - %li - %a.view{:href => '/'} - Profile - %li - %a.write-tip{:href => '/'} - Protips - - %li - .header.cf - %a.user{:href => '/'} - =image_tag("profile/profile-img.jpg") - .details - %h2 - %a{:href => '/'} - Oliver Lisher Oliver Lisher - %ul - %li - On team - %a.user{:href => '/'} - Coderwall coderwall coderwall - %li - Developer - - %ul.actions-list - %li - %a.view{:href => '/'} - Profile - %li - %a.write-tip{:href => '/'} - Protips - - %li - .header.cf - %a.user{:href => '/'} - =image_tag("profile/profile-img.jpg") - .details - %h2 - %a{:href => '/'} - Oliver Lisher - %ul - %li - %a.user{:href => '/'} - Coderwall - - %ul.actions-list - %li - %a.view{:href => '/'} - Profile - %li - %a.write-tip{:href => '/'} - Protips - - .three-cols-more - %a.protip-pagination{:href => '/'} - More diff --git a/app/views/pages/signup.html.haml b/app/views/pages/signup.html.haml deleted file mode 100644 index 3c27d6d3..00000000 --- a/app/views/pages/signup.html.haml +++ /dev/null @@ -1,115 +0,0 @@ -.main-content - %section.wrapper - %header.masthead.cf - %a.desc-logo{:href => 'https://coderwall.com'} - %span Coderwall - =image_tag("premium-team-description/logo.png") - %h2 Enhanced team profile - - %section.title#learnmore - %h1 Signup to publish your shiny new team page - %section.packages - %ul - %li.free - %h2 Starter - %h3 $0 - %ul - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %footer - %a{:href => '/'} - go back - - %li.center.monthly - %h2 Monthly - %h3 - $150 - %span - pm - %ul - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %li - Beautiful, personally branded team page - %a{:href => '/'} - hiring teams page - %li Beautiful, personally branded team page Beautiful, personally branded team page - %li Beautiful, personally branded team page - %footer - %a{:href => '/'} - go back - - %li.one-off - %h2 One-off - %h3 - $300 - %span - Per job - %ul - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %li - Beautiful, personally branded team page Beautiful, personally branded team page - %a{:href => '/'} - hiring teams page - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %li Beautiful, personally branded team page - %footer - %a{:href => '/'} - go back - - %section.card-section.cf - %h2 Enter your payment details - / %form.sign-up-form{:name => "whatever"} - / %fieldset - / %ol - / %li - / %label{:for => "cc"} CC Number: - / %input{:type => "text", :name => "cc", :class => "number", :placeholder =>"1234123412341234"} - / %li - / %label{:for => "cvc"} CVC Number: - / %input{:type => "text", :name => "cvc", :class => "short-number"} - / %li - / %label{:for => "mm"} MM Expiration: - / %input{:type => "text", :name => "mm", :class => "short-number"} - / %li - / %label{:for => "yyyy"} YYYY Expiration: - / %input{:type => "text", :name => "yyyy", :class => "short-number"} - / %li - / %input{:type => "submit", :value => "Send", :class => "button"} - / %small *You will not be charged until you publish a job position. - %form.sign-up-form - %fieldset.credit-card - %h3 Payment Details - .card-btm - .card-number - %label{:for => "name"} Long card number - %input{:name => "name", :placeholder => "XXXX XXXX XXXX XXXX", :type => "text"}/ - .expiration - %label Expiration - %input{:name => "mm", :placeholder => "XX", :type => "text"}/ - %input{:name => "yy", :placeholder => "XX", :type => "text"}/ - .cvc - %label CVC - %input{:name => "cvc", :placeholder => "XX", :type => "text"}/ - %input{:type => "submit", :value => "Subscribe $15 a month"}/ - %section.faq - %h2 FAQ - %ul - %li - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do? - %li - eiusmod tempor incididunt ut labore et dolore magna aliqua. - %li - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do? - %li - eiusmod tempor incididunt ut labore et dolore magna aliqua. - %li - Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do? - %li - eiusmod tempor incididunt ut labore et dolore magna aliqua. diff --git a/app/views/pages/tags.html.haml b/app/views/pages/tags.html.haml deleted file mode 100644 index e1930269..00000000 --- a/app/views/pages/tags.html.haml +++ /dev/null @@ -1,32 +0,0 @@ -#protip-grid-top.cf - %header.cf.grid-header - %h1.underline-test - Tip - %a.about-networks{:href => '/'} - Part of the JavaScript Network - -.inside-main-content.cf - %aside.protips-sidebar - %ul.protip-actions - %li - %a.share{:href => '/'} - Share a protip - %ul.filter - %li - %a{:href => '/'} - Most upvotes - %li - %a{:href => '/'} - New - %span - 4 - %li - %a{:href => '/'} - Featured - %span - 4 - - %ul.list-of-tips.threecols.cf - %li - %li - %li diff --git a/app/views/pages/tos.html.haml b/app/views/pages/tos.html.haml deleted file mode 100644 index a5a6d7f8..00000000 --- a/app/views/pages/tos.html.haml +++ /dev/null @@ -1,105 +0,0 @@ -%h1.big-title Terms of Service - -.panel - .inside-panel-align-left - %h4 UPDATED April 15th 2014 - - %p - Welcome to Coderwall! Assembly Made Inc. ("Assembly Made", "our", "us" or "we") provides the coderwall website. The following terms and conditions govern all use of the website (this “Site” or "Coderwall") and all content, services and products available at or through the website. The Website is owned and operated by Assembly Made Inc. The Website is offered subject to your acceptance without modification of all of the terms and conditions contained herein and all other operating rules, policies (including, without limitation, our Privacy Policy) and procedures that may be published from time to time on this Site (collectively, the Agreement). - - %p - Please read this Agreement carefully before accessing or using the Website. By accessing or using any part of the web site, you agree to become bound by the terms and conditions of this agreement. If you do not agree to all the terms and conditions of this agreement, then you may not access the Website or use any services. If these terms and conditions are considered an offer by Coderwall, acceptance is expressly limited to these terms. The Website is available only to individuals who are at least 13 years old. - - %h3 Your Coderwall Account and Site. - %p - If you create an account on the Website, you are responsible for maintaining the security of your account and its content, and you are fully responsible for all activities that occur under the account and any other actions taken in connection with the Website. You must not describe or assign content to your account in a misleading or unlawful manner, including in a manner intended to trade on the name or reputation of others, and we may change or remove any data that it considers inappropriate or unlawful, or otherwise likely to cause us liability. You must immediately notify us of any unauthorized uses of your account or any other breaches of security. We will not be liable for any acts or omissions by You, including any damages of any kind incurred as a result of such acts or omissions. - - %h3 Responsibility of Contributors - %p - If you operate an account, post material to the Website, post links on the Website, or otherwise make (or allow any third party to make) material available by means of the Website (any such material, Content), You are entirely responsible for the content of, and any harm resulting from, that Content. That is the case regardless of whether the Content in question constitutes text or graphics. By making Content available, you represent and warrant that: - %ul - %li the downloading, copying and use of the Content will not infringe the proprietary rights, including but not limited to the copyright, patent, trademark or trade secret rights, of any third party; - %li if your employer has rights to intellectual property you create, you have either (i) received permission from your employer to post or make available the Content, including but not limited to any software, or (ii) secured from your employer a waiver as to all rights in or to the Content; - %li you have fully complied with any third-party licenses relating to the Content, and have done all things necessary to successfully pass through to end users any required terms; - %li the Content does not contain or install any viruses, worms, malware, Trojan horses or other harmful or destructive content; - %li the Content is not spam, is not machine&8212;or randomly-generated, and does not contain unethical or unwanted commercial content designed to drive traffic to third party sites or boost the search engine rankings of third party sites, or to further unlawful acts (such as phishing) or mislead recipients as to the source of the material (such as spoofing); - %li the Content is not obscene, libelous or defamatory, hateful or racially or ethnically objectionable, and does not violate the privacy or publicity rights of any third party; - %li your account is not getting advertised via unwanted electronic messages such as spam links on newsgroups, email lists, other blogs and web sites, and similar unsolicited promotional methods; - %li your account is not named in a manner that misleads your readers into thinking that you are another person or company. For example, your account’s URL or name is not the name of a person other than yourself or company other than your own; and - %li you have, in the case of Content that includes computer code, accurately categorized and/or described the type, nature, uses and effects of the materials, whether requested to do so by Coderwall or otherwise. - - %p - Coderwall reserves the right to remove any screenshot for any reason whatsoever. - - %p - We reserve the right to ban any member or website from using the service for any reason. - - %p - If you delete Content, we will use reasonable efforts to remove it from the Website, but you acknowledge that caching or references to the Content may not be made immediately unavailable. - - %p - Without limiting any of those representations or warranties, We have the right (though not the obligation) to, in our sole discretion (i) refuse or remove any content that, in our reasonable opinion, violates any of our policies or is in any way harmful or objectionable, or (ii) terminate or deny access to and use of the Website to any individual or entity for any reason, in our sole discretion. We will have no obligation to provide a refund of any amounts previously paid. - - %h3 Responsibility of Website Visitors. - %p We have not reviewed, and cannot review, all of the material posted to the Website, and cannot therefore be responsible for that materials content, use or effects. By operating the Website, We do not represent or imply that it endorses the material there posted, or that it believes such material to be accurate, useful or non-harmful. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. The Website may contain content that is offensive, indecent, or otherwise objectionable, as well as content containing technical inaccuracies, typographical mistakes, and other errors. The Website may also contain material that violates the privacy or publicity rights, or infringes the intellectual property and other proprietary rights, of third parties, or the downloading, copying or use of which is subject to additional terms and conditions, stated or unstated. We disclaim any responsibility for any harm resulting from the use by visitors of the Website, or from any downloading by those visitors of content there posted. - - - %H3 Content Posted on Other Websites. - %p We have not reviewed, and cannot review, all of the material, including computer software, made available through the websites and webpages to which we link, and that link to us. We do not have any control over those non-Coderwall websites and webpages, and is not responsible for their contents or their use. By linking to a non-Coderwall website or webpage, we do not represent or imply that it endorses such website or webpage. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. We disclaims any responsibility for any harm resulting from your use of non-Coderwall websites and webpages. - - %h3 Copyright Infringement. - %p As we asks others to respect its intellectual property rights, it respects the intellectual property rights of others. If you believe that material located on or linked to by us violates your copyright, you are encouraged to notify us. We will respond to all such notices, including as required or appropriate by removing the infringing material or disabling all links to the infringing material. In the case of a visitor who may infringe or repeatedly infringes the copyrights or other intellectual property rights of us or others, we may, in its discretion, terminate or deny access to and use of the Website. In the case of such termination, we will have no obligation to provide a refund of any amounts previously paid to us. The form of notice set forth below is consistent with the form suggested by the United States Digital Millennium Copyright Act ("DMCA") which may be found at the U.S. Copyright official website: http://www.copyright.gov. - - %p To expedite our handling of your notice, please use the following format or refer to Section 512(c)(3) of the Copyright Act. - - %ol - %li Identify in sufficient detail the copyrighted work you believe has been infringed upon. This includes identification of the web page or specific posts, as opposed to entire sites. Posts must be referenced by either the dates in which they appear or by the permalink of the post. Include the URL to the concerned material infringing your copyright (URL of a website or URL to a post, with title, date, name of the emitter), or link to initial post with sufficient data to find it. - %li Identify the material that you allege is infringing upon the copyrighted work listed in Item #1 above. Include the name of the concerned litigious material (all images or posts if relevant) with its complete reference. - %li Provide information on which Assembly Made may contact you, including your email address, name, telephone number and physical address. - %li Provide the address, if available, to allow Assembly Made to notify the owner/administrator of the allegedly infringing webpage or other content, including email address. - %li Also include a statement of the following: “I have a good faith belief that use of the copyrighted materials described above on the infringing web pages is not authorized by the copyright owner, or its agent, or the law.” - %li Also include the following statement: “I swear, under penalty of perjury, that the information in this notification is accurate and that I am the copyright owner, or am authorized to act on behalf of the owner, of an exclusive right that is allegedly infringed.” - %li Your physical or electronic signature - - %p - Send the written notification via regular postal mail to the following: - %br - %br - Assembly Made Inc. - %br - Attn: DMCA takedown - %br - 548 Market St #45367 - %br - San Francisco, CA 94104-5401 - - %p or email notification to copyright@coderwall.com. - - %p For the fastest response, please send a plain text email. Written notification and emails with PDF file or image attachements may delay processing of your request. - - - %h3 Intellectual Property. - %p This Agreement does not transfer from us to you any Coderwall or third party intellectual property, and all right, title and interest in and to such property will remain (as between the parties) solely with us. Coderwall, the Coderwall logo, and all other trademarks, service marks, graphics and logos used in connection with us, or the Website are trademarks or registered trademarks of Assembly Made or Assembly Made's licensors. Other trademarks, service marks, graphics and logos used in connection with the Website may be the trademarks of other third parties. Your use of the Website grants you no right or license to reproduce or otherwise use any Coderwall or third-party trademarks. - - %h3 Changes. - %p Assembly Made reserves the right, at its sole discretion, to modify or replace any part of this Agreement. It is your responsibility to check this Agreement periodically for changes. Your continued use of or access to the Website following the posting of any changes to this Agreement constitutes acceptance of those changes. We may also, in the future, offer new services and/or features through the Website (including, the release of new tools and resources). Such new features and/or services shall be subject to the terms and conditions of this Agreement. - - %h3 Termination. - %p We may terminate your access to all or any part of the Website at any time, with or without cause, with or without notice, effective immediately. If you wish to terminate this Agreement or your Coderwall account (if you have one), you may simply discontinue using the Website. We can terminate the Website immediately as part of a general shut down of our service. All provisions of this Agreement which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability. - - %h3 Disclaimer of Warranties. - %p The Website is provided “as is”. Assembly Made and its suppliers and licensors hereby disclaim all warranties of any kind, express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement. Neither Assembly Made nor its suppliers and licensors, makes any warranty that the Website will be error free or that access thereto will be continuous or uninterrupted. You understand that you download from, or otherwise obtain content or services through, the Website at your own discretion and risk. - - %h3 Limitation of Liability. - %p In no event will we, or our suppliers or licensors, be liable with respect to any subject matter of this agreement under any contract, negligence, strict liability or other legal or equitable theory for: (i) any special, incidental or consequential damages; (ii) the cost of procurement or substitute products or services; (iii) for interuption of use or loss or corruption of data; or (iv) for any amounts that exceed the fees paid by you to us under this agreement during the twelve (12) month period prior to the cause of action. We shall have no liability for any failure or delay due to matters beyond their reasonable control. The foregoing shall not apply to the extent prohibited by applicable law. - - %h3 General Representation and Warranty. - %p You represent and warrant that (i) your use of the Website will be in strict accordance with the Coderwall Privacy Policy, with this Agreement and with all applicable laws and regulations (including without limitation any local laws or regulations in your country, state, city, or other governmental area, regarding online conduct and acceptable content, and including all applicable laws regarding the transmission of technical data exported from the United States or the country in which you reside) and (ii) your use of the Website will not infringe or misappropriate the intellectual property rights of any third party. - - %h3 Indemnification. - %p You agree to indemnify and hold harmless Assembly Made, its contractors, and its licensors, and their respective directors, officers, employees and agents from and against any and all claims and expenses, including attorneys fees, arising out of your use of the Website, including but not limited to out of your violation this Agreement. - - %h3 Miscellaneous. - %p This Agreement constitutes the entire agreement between Assembly Made and you concerning the subject matter hereof, and they may only be modified by a written amendment signed by an authorized executive of Assembly Made, or by the posting by us of a revised version. Except to the extent applicable law, if any, provides otherwise, this Agreement, any access to or use of the Website will be governed by the laws of the state of California, U.S.A. - - %p This Terms of Service was crafted from Wordpress.com's version, which is available under a Creative Commons Sharealike license. diff --git a/app/views/pages/tos.html.slim b/app/views/pages/tos.html.slim new file mode 100644 index 00000000..f473f46f --- /dev/null +++ b/app/views/pages/tos.html.slim @@ -0,0 +1,105 @@ +h1.big-title Terms of Service + +.panel + .inside-panel-align-left + h4 UPDATED April 15th 2014 + + p + | Welcome to Coderwall! Assembly Made Inc. ("Assembly Made", "our", "us" or "we") provides the coderwall website. The following terms and conditions govern all use of the website (this “Site” or "Coderwall") and all content, services and products available at or through the website. The Website is owned and operated by Assembly Made Inc. The Website is offered subject to your acceptance without modification of all of the terms and conditions contained herein and all other operating rules, policies (including, without limitation, our Privacy Policy) and procedures that may be published from time to time on this Site (collectively, the Agreement). + + p + | Please read this Agreement carefully before accessing or using the Website. By accessing or using any part of the web site, you agree to become bound by the terms and conditions of this agreement. If you do not agree to all the terms and conditions of this agreement, then you may not access the Website or use any services. If these terms and conditions are considered an offer by Coderwall, acceptance is expressly limited to these terms. The Website is available only to individuals who are at least 13 years old. + + h3 Your Coderwall Account and Site. + p + | If you create an account on the Website, you are responsible for maintaining the security of your account and its content, and you are fully responsible for all activities that occur under the account and any other actions taken in connection with the Website. You must not describe or assign content to your account in a misleading or unlawful manner, including in a manner intended to trade on the name or reputation of others, and we may change or remove any data that it considers inappropriate or unlawful, or otherwise likely to cause us liability. You must immediately notify us of any unauthorized uses of your account or any other breaches of security. We will not be liable for any acts or omissions by You, including any damages of any kind incurred as a result of such acts or omissions. + + h3 Responsibility of Contributors + p + | If you operate an account, post material to the Website, post links on the Website, or otherwise make (or allow any third party to make) material available by means of the Website (any such material, Content), You are entirely responsible for the content of, and any harm resulting from, that Content. That is the case regardless of whether the Content in question constitutes text or graphics. By making Content available, you represent and warrant that: + ul + li the downloading, copying and use of the Content will not infringe the proprietary rights, including but not limited to the copyright, patent, trademark or trade secret rights, of any third party; + li if your employer has rights to intellectual property you create, you have either (i) received permission from your employer to post or make available the Content, including but not limited to any software, or (ii) secured from your employer a waiver as to all rights in or to the Content; + li you have fully complied with any third-party licenses relating to the Content, and have done all things necessary to successfully pass through to end users any required terms; + li the Content does not contain or install any viruses, worms, malware, Trojan horses or other harmful or destructive content; + li the Content is not spam, is not machine&8212;or randomly-generated, and does not contain unethical or unwanted commercial content designed to drive traffic to third party sites or boost the search engine rankings of third party sites, or to further unlawful acts (such as phishing) or mislead recipients as to the source of the material (such as spoofing); + li the Content is not obscene, libelous or defamatory, hateful or racially or ethnically objectionable, and does not violate the privacy or publicity rights of any third party; + li your account is not getting advertised via unwanted electronic messages such as spam links on newsgroups, email lists, other blogs and web sites, and similar unsolicited promotional methods; + li your account is not named in a manner that misleads your readers into thinking that you are another person or company. For example, your account’s URL or name is not the name of a person other than yourself or company other than your own; and + li you have, in the case of Content that includes computer code, accurately categorized and/or described the type, nature, uses and effects of the materials, whether requested to do so by Coderwall or otherwise. + + p + | Coderwall reserves the right to remove any screenshot for any reason whatsoever. + + p + | We reserve the right to ban any member or website from using the service for any reason. + + p + | If you delete Content, we will use reasonable efforts to remove it from the Website, but you acknowledge that caching or references to the Content may not be made immediately unavailable. + + p + | Without limiting any of those representations or warranties, We have the right (though not the obligation) to, in our sole discretion (i) refuse or remove any content that, in our reasonable opinion, violates any of our policies or is in any way harmful or objectionable, or (ii) terminate or deny access to and use of the Website to any individual or entity for any reason, in our sole discretion. We will have no obligation to provide a refund of any amounts previously paid. + + h3 Responsibility of Website Visitors. + p We have not reviewed, and cannot review, all of the material posted to the Website, and cannot therefore be responsible for that materials content, use or effects. By operating the Website, We do not represent or imply that it endorses the material there posted, or that it believes such material to be accurate, useful or non-harmful. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. The Website may contain content that is offensive, indecent, or otherwise objectionable, as well as content containing technical inaccuracies, typographical mistakes, and other errors. The Website may also contain material that violates the privacy or publicity rights, or infringes the intellectual property and other proprietary rights, of third parties, or the downloading, copying or use of which is subject to additional terms and conditions, stated or unstated. We disclaim any responsibility for any harm resulting from the use by visitors of the Website, or from any downloading by those visitors of content there posted. + + + H3 Content Posted on Other Websites. + p We have not reviewed, and cannot review, all of the material, including computer software, made available through the websites and webpages to which we link, and that link to us. We do not have any control over those non-Coderwall websites and webpages, and is not responsible for their contents or their use. By linking to a non-Coderwall website or webpage, we do not represent or imply that it endorses such website or webpage. You are responsible for taking precautions as necessary to protect yourself and your computer systems from viruses, worms, Trojan horses, and other harmful or destructive content. We disclaims any responsibility for any harm resulting from your use of non-Coderwall websites and webpages. + + h3 Copyright Infringement. + p As we asks others to respect its intellectual property rights, it respects the intellectual property rights of others. If you believe that material located on or linked to by us violates your copyright, you are encouraged to notify us. We will respond to all such notices, including as required or appropriate by removing the infringing material or disabling all links to the infringing material. In the case of a visitor who may infringe or repeatedly infringes the copyrights or other intellectual property rights of us or others, we may, in its discretion, terminate or deny access to and use of the Website. In the case of such termination, we will have no obligation to provide a refund of any amounts previously paid to us. The form of notice set forth below is consistent with the form suggested by the United States Digital Millennium Copyright Act ("DMCA") which may be found at the U.S. Copyright official website: http://www.copyright.gov. + + p To expedite our handling of your notice, please use the following format or refer to Section 512(c)(3) of the Copyright Act. + + ol + li Identify in sufficient detail the copyrighted work you believe has been infringed upon. This includes identification of the web page or specific posts, as opposed to entire sites. Posts must be referenced by either the dates in which they appear or by the permalink of the post. Include the URL to the concerned material infringing your copyright (URL of a website or URL to a post, with title, date, name of the emitter), or link to initial post with sufficient data to find it. + li Identify the material that you allege is infringing upon the copyrighted work listed in Item #1 above. Include the name of the concerned litigious material (all images or posts if relevant) with its complete reference. + li Provide information on which Assembly Made may contact you, including your email address, name, telephone number and physical address. + li Provide the address, if available, to allow Assembly Made to notify the owner/administrator of the allegedly infringing webpage or other content, including email address. + li Also include a statement of the following: “I have a good faith belief that use of the copyrighted materials described above on the infringing web pages is not authorized by the copyright owner, or its agent, or the law.” + li Also include the following statement: “I swear, under penalty of perjury, that the information in this notification is accurate and that I am the copyright owner, or am authorized to act on behalf of the owner, of an exclusive right that is allegedly infringed.” + li Your physical or electronic signature + + p + | Send the written notification via regular postal mail to the following: + br + br + | Assembly Made Inc. + br + | Attn: DMCA takedown + br + | 548 Market St #45367 + br + | San Francisco, CA 94104-5401 + + p or email notification to copyright@coderwall.com. + + p For the fastest response, please send a plain text email. Written notification and emails with PDF file or image attachements may delay processing of your request. + + + h3 Intellectual Property. + p This Agreement does not transfer from us to you any Coderwall or third party intellectual property, and all right, title and interest in and to such property will remain (as between the parties) solely with us. Coderwall, the Coderwall logo, and all other trademarks, service marks, graphics and logos used in connection with us, or the Website are trademarks or registered trademarks of Assembly Made or Assembly Made's licensors. Other trademarks, service marks, graphics and logos used in connection with the Website may be the trademarks of other third parties. Your use of the Website grants you no right or license to reproduce or otherwise use any Coderwall or third-party trademarks. + + h3 Changes. + p Assembly Made reserves the right, at its sole discretion, to modify or replace any part of this Agreement. It is your responsibility to check this Agreement periodically for changes. Your continued use of or access to the Website following the posting of any changes to this Agreement constitutes acceptance of those changes. We may also, in the future, offer new services and/or features through the Website (including, the release of new tools and resources). Such new features and/or services shall be subject to the terms and conditions of this Agreement. + + h3 Termination. + p We may terminate your access to all or any part of the Website at any time, with or without cause, with or without notice, effective immediately. If you wish to terminate this Agreement or your Coderwall account (if you have one), you may simply discontinue using the Website. We can terminate the Website immediately as part of a general shut down of our service. All provisions of this Agreement which by their nature should survive termination shall survive termination, including, without limitation, ownership provisions, warranty disclaimers, indemnity and limitations of liability. + + h3 Disclaimer of Warranties. + p The Website is provided “as is”. Assembly Made and its suppliers and licensors hereby disclaim all warranties of any kind, express or implied, including, without limitation, the warranties of merchantability, fitness for a particular purpose and non-infringement. Neither Assembly Made nor its suppliers and licensors, makes any warranty that the Website will be error free or that access thereto will be continuous or uninterrupted. You understand that you download from, or otherwise obtain content or services through, the Website at your own discretion and risk. + + h3 Limitation of Liability. + p In no event will we, or our suppliers or licensors, be liable with respect to any subject matter of this agreement under any contract, negligence, strict liability or other legal or equitable theory for: (i) any special, incidental or consequential damages; (ii) the cost of procurement or substitute products or services; (iii) for interuption of use or loss or corruption of data; or (iv) for any amounts that exceed the fees paid by you to us under this agreement during the twelve (12) month period prior to the cause of action. We shall have no liability for any failure or delay due to matters beyond their reasonable control. The foregoing shall not apply to the extent prohibited by applicable law. + + h3 General Representation and Warranty. + p You represent and warrant that (i) your use of the Website will be in strict accordance with the Coderwall Privacy Policy, with this Agreement and with all applicable laws and regulations (including without limitation any local laws or regulations in your country, state, city, or other governmental area, regarding online conduct and acceptable content, and including all applicable laws regarding the transmission of technical data exported from the United States or the country in which you reside) and (ii) your use of the Website will not infringe or misappropriate the intellectual property rights of any third party. + + h3 Indemnification. + p You agree to indemnify and hold harmless Assembly Made, its contractors, and its licensors, and their respective directors, officers, employees and agents from and against any and all claims and expenses, including attorneys fees, arising out of your use of the Website, including but not limited to out of your violation this Agreement. + + h3 Miscellaneous. + p This Agreement constitutes the entire agreement between Assembly Made and you concerning the subject matter hereof, and they may only be modified by a written amendment signed by an authorized executive of Assembly Made, or by the posting by us of a revised version. Except to the extent applicable law, if any, provides otherwise, this Agreement, any access to or use of the Website will be governed by the laws of the state of California, U.S.A. + + p This Terms of Service was crafted from Wordpress.com's version, which is available under a Creative Commons Sharealike license. diff --git a/app/views/processing_queues/index.html.haml b/app/views/processing_queues/index.html.haml deleted file mode 100644 index 93b05bce..00000000 --- a/app/views/processing_queues/index.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -%ul - - @queues.each do |queue| - %li= link_to queue.queue, processing_queue_path(:id => queue.queue) diff --git a/app/views/processing_queues/show.html.haml b/app/views/processing_queues/show.html.haml deleted file mode 100644 index cdb1c114..00000000 --- a/app/views/processing_queues/show.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.queue - %h1= @queue - %ol - - @items.each_with_index do |item, index| - %li - %ul.item - %li - = index+1 - ) - %li= item.queueable.class.name - %li=link_to polymorphic_url(item.queueable), item.queueable - %li=link_to 'Done', dequeue_processing_queue_path(:item => item.id), :method => :post diff --git a/app/views/protip_mailer/_new_relic.html.haml b/app/views/protip_mailer/_new_relic.html.haml new file mode 100644 index 00000000..ecf4866b --- /dev/null +++ b/app/views/protip_mailer/_new_relic.html.haml @@ -0,0 +1,18 @@ +%table.outside{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "margin: 0 auto;padding: 0 40px 20px 40px;width: 600px;background: #fff;", :width => "600"} + %tr{:style => "margin: 0;padding: 0;"} + %td{:style => "margin: 0;padding: 0;"} + %table.activity{:border => "0", :cellpadding => "0", :cellspacing => "0", :style => "background: #fafafa; margin: 0;padding: 0;width: 520px;border: #cbc9c4 solid 2px;-webkit-border-radius: 6px;border-radius: 6px;overflow: hidden;"} + %tr + %td{:colspan => "2", :style => "margin: 0;padding: 10px;"} + %h3{:style => "margin: 0;padding: 0;font-family: Helvetica Neue, Helvetica, Arial, sans-serif;font-size: 14px;line-height: 22px;color: #48494E;text-decoration: none;display: block; text-align:center"} + ❤ clothes? Level up your wardrobe with this free limited edition Coderwall tee from our friends at New Relic. + + %tr.title{:style => "margin: 0;padding: 0;height: 50px;line-height: 50px;"} + %td{:colspan => "2", :style => "margin: 0;padding: 0;"} + %h2{:style => "margin: 0;padding: 20px 0 0 20px;font-weight: normal;font-family: Georgia, Times, Times New Roman, serif;text-align: center;font-size: 19px;color: #48494e;"} + =image_tag("relic-tee.png", style: 'width: 200px') + + %tr.btns{:style => "margin: 0;padding: 0;"} + %td.btns-box{:colspan => "7", :style => "margin: 0;padding: 20px 90px;border-top: solid 1px #cbc9c4;"} + %a.browse-networks{:href => "http://newrelic.com/sp/coderwall?utm_source=CWAL&utm_medium=promotion&utm_content=coderwall&utm_campaign=coderwall&mpc=PM-CWAL-web-Signup-100-coderwall-shirtpromo", :style => "margin: 0;padding: 8px 16px;background: #3d8dcc;font-family: Helvetica Neue, Helvetica, Arial, sans-serif;font-size: 14px;line-height: 22px;display: inline-block;width: 300px;color: #fff;text-decoration: none;-webkit-border-radius: 4px;border-radius: 4px;text-align: center;"} + Test drive New Relic for free and get a Coderwall tee diff --git a/app/views/protip_mailer/popular_protips.html.haml b/app/views/protip_mailer/popular_protips.html.haml new file mode 100644 index 00000000..b20aa33d --- /dev/null +++ b/app/views/protip_mailer/popular_protips.html.haml @@ -0,0 +1,183 @@ +- nopad = 'margin: 0; padding: 0; ' +- sans_serif = 'font-family: Helvetica Neue, Helvetica, Arial, sans-serif;' +- serif = 'font-family: Georgia, Times, Times New Roman, serif;' +!!! +%html{style: nopad} + %head{style: nopad} + %body{style: "margin: 0; padding: 60px 0; background-color: #48494e; -webkit-font-smoothing: antialiased; width: 100% !important; -webkit-text-size-adjust: none;"} + %table{style: "width: 100%; margin: 0 auto; background: #48494e;"} + %tr + %td{style: "background: #48494e;"} + %table{style: "margin: 0 auto 40px auto; padding: 0; width: 100%;"} + %tr + %td{style: "margin: 0 auto; padding: 0; width: 600px;"} + %table.logo{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto 40px auto; padding: 0; width: 211px;", width: 211} + %tr{style: nopad} + %td{style: nopad} + %img{alt: "Coderwall Logo", height: 35, src: image_url('email/coderwall-logo.jpg'), style: nopad, width: 211} + %table.header{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0; width: 600px; background: #fff; -webkit-border-top-left-radius: 6px; -webkit-border-top-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %img{alt: "Email Header", height: 159, src: image_url('email/email-popular_protip-header.png'), style: nopad, width: 600} + + + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.top-tip{border: 0, cellpadding: 0, cellspacing: 0, style: nopad} + %tr{style: nopad} + %td.glasses{style: "margin: 0; padding: 0 10px 30px 0; vertical-align: middle;"} + %img{alt: "Assembly", height: 114, src: image_url("email/logo-wordmark-muted@2x.png"), style: nopad} + %td.tip{style: "margin: 0; padding: 0 0 30px 0; text-align: right;"} + %h2{style: "#{nopad} font-weight: normal; #{serif} color: #99958b; margin-bottom: 10px;"} + Coderwall is Open Source! + %h3{style: "#{nopad} #{sans_serif} font-size: 16px; line-height: 22px; color: #48494E; font-weight: normal;"} + Coderwall is an open product on Assembly. Every software product on Assembly is a collaborative effort including the vision, development, design, and marketing. Each month a product's revenue is collected & split amongst all involved. Want to help make Coderwall better? + %a{href: 'http://hackernoons.com/all-our-coderwall-are-belong-to-you', style: "#{nopad} color: #3d8dcc;"} Read the announcement + or + %a{href: 'https://assembly.com/coderwall', style: "#{nopad} color: #3d8dcc;"} jump in and get started! + + + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.tips{border: 0, cellpadding: 0, cellspacing: 0, style: "#{nopad} width: 520px; border: #cbc9c4 solid 2px; -webkit-border-radius: 6px; border-radius: 6px; overflow: hidden;"} + %tr.title{style: "#{nopad} height: 50px; line-height: 50px;"} + %td{colspan: 6, style: nopad} + %h2{style: "#{nopad} font-weight: normal; #{serif} text-align: center; background: #ECE9E2; font-size: 19px; color: #48494e; margin-bottom: 20px;"} + Popular protips + + - @protips.each do |protip| + - best_stat = OpenStruct.new(name: protip.best_stat.first.to_s, value: protip.best_stat.last) + + %tr.tip{style: nopad} + %td.avatar{style: "#{nopad} padding-left: 30px; width: 36px; padding-bottom: 20px;"} + %img{alt: "Avatar", height: 36, src: image_url(protip.user.avatar.url), style: "#{nopad} border: solid 2px #fff; -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1);", width: 36} + %td.link{style: "#{nopad} padding-right: 20px; padding-left: 10px; width: 270px; padding-bottom: 20px;"} + %a{href: protip_url(protip.public_id, @issue), style: "#{nopad} #{sans_serif} font-size: 14px; line-height: 22px; color: #48494E; text-decoration: none; display: block;"} + = protip.title + - if best_stat.value.try(:to_i) == 0 + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: 'u'; font-size: 19px;"} + - elsif best_stat.name == "upvotes" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: 'u'; font-size: 19px;"} + = image_tag("email/upvote.png") + - elsif best_stat.name == "comments" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; font-family: 'oli'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; content: '7'; font-size: 19px;"} + = image_tag("email/comment.png") + - elsif best_stat.name == "views" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: '6'; font-size: 19px;"} + = image_tag("email/eye.png") + - elsif best_stat.name == "hawt" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: '2'; font-size: 19px; color: #f35e39;"} + = image_tag("email/flame.png") + %td.upvotes{style: "margin: 0; padding: 0 5px; #{sans_serif} font-size: 14px; line-height: 22px; width: 15px; height: 36px; padding-bottom: 20px;"} + %h4{style: "#{nopad} font-weight: normal;"} + = formatted_best_stat_value(protip) unless best_stat.name =~ /hawt/ || best_stat.value.try(:to_i) == 0 + %tr.btns{style: nopad} + %td.btns-box{colspan: 6, style: "margin: 0; padding: 20px 90px; border-top: solid 1px #cbc9c4;"} + %a.share-tip{href: new_protip_url(@issue), style: "margin: 0; padding: 6px 16px; background: #d75959; margin-right: 20px; #{sans_serif} font-size: 14px; line-height: 22px; display: inline-block; width: 120px; color: #fff; text-decoration: none; -webkit-border-radius: 4px; border-radius: 4px; text-align: center;"} + Share a protip + %a.browse-networks{href: root_url(@issue), style: "margin: 0; padding: 6px 16px; background: #3d8dcc; #{sans_serif} font-size: 14px; line-height: 22px; display: inline-block; width: 120px; color: #fff; text-decoration: none; -webkit-border-radius: 4px; border-radius: 4px; text-align: center;"} + Trending protips + + - unless @most.nil? + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.activity{border: 0, cellpadding: 0, cellspacing: 0, style: "#{nopad} width: 520px; border: #cbc9c4 solid 2px; -webkit-border-radius: 6px; border-radius: 6px; overflow: hidden;"} + %tr.title{style: "#{nopad} height: 50px; line-height: 50px;"} + %td{colspan: 2, style: nopad} + %h2{style: "#{nopad} font-weight: normal; #{serif} text-align: center; background: #ECE9E2; font-size: 19px; color: #48494e; margin-bottom: 20px;"} + Activity from your connections + %tr{style: nopad} + %td.activity-title{style: "margin: 0; padding: 0 0 0 30px;"} + %h2{style: "#{nopad} font-weight: normal; #{serif} font-size: 20px; background: url(#{image_url('email/big-gold-star.png')}) no-repeat left top; padding-left: 30px;"} + == Most #{@star_stat_string} + %td.activity-avatar{style: "#{nopad} padding-right: 30px;"} + %img{alt: "User Avatar", src: image_url(users_image_path(@most[:user])), style: "#{nopad} border: solid 2px #fff; -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1);"} + + %tr{style: nopad} + %td.activity-message{style: "margin: 0; padding: 10px 20px 20px 30px;"} + %p{style: "#{nopad} #{sans_serif} font-size: 14px; line-height: 22px;"} + %a{href: badge_url(@most[:user].username, @issue), style: "#{nopad} color: #3d8dcc;"} + = @most[:user].short_name + had + = @most[@star_stat] > 1 ? "#{@most[@star_stat]}" : "most" + ==#{@star_stat_string} this week. + = succeed "." do + %a{href: badge_url(@most[:user].username, @issue), style: "#{nopad} color: #3d8dcc;"} + == View #{@most[:user].username}'s profile + - unless @team.nil? + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.team{border: 0, cellpadding: 0, cellspacing: 0, style: "#{nopad} width: 520px; border: #cbc9c4 solid 2px; -webkit-border-radius: 6px; border-radius: 6px; overflow: hidden;"} + %tr.title{style: "#{nopad} height: 50px; line-height: 50px;"} + %td{colspan: 2, style: nopad} + %h2{style: "#{nopad} font-weight: normal; #{serif} text-align: center; background: #ECE9E2; font-size: 19px; color: #48494e; margin-bottom: 20px;"} + Featured engineering team + %tr{style: nopad} + %td.team-avatar{style: "margin: 0; padding: 10px 0 30px 20px; width: 120px;"} + %img{alt: 'Team Avatar', height: 89, src: image_url(@team.avatar_url), style: "#{nopad} border: solid 3px #eaeaea;", width: 89} + %td.job-info{style: 'margin: 0; padding: 25px;'} + %h2{style: "#{nopad} font-weight: normal; #{serif} font-size: 24px; line-height: 22px; margin-bottom: 6px;"} + = @team.name + %h3{style: "#{nopad} font-weight: normal; #{serif} font-size: 16px; line-height: 22px; margin-bottom: 6px;"} + = truncate(@team.hiring_message, length: 80) + %a{href: teamname_url(@team.slug, @issue) + "#open-positions", style: "#{nopad} color: #3d8dcc;"} + = @team.name + is looking for + = @job.title + %tr + %td{colspan: 2, style: "width: 100%;"} + %table{style: "width: 100%;"} + %tr.team-btm{style: nopad} + %td.team-members{style: "margin: 0; padding: 25px 15px 25px 25px; width: 158px; border-top: solid 1px #eaeaea; border-right: solid 1px #eaeaea;"} + -@team.most_influential_members_for(@user).first(3).each do |member| + %img{alt: "Avatar", height: 36, src: image_url(users_image_path(member)), style: "#{nopad} border: solid 2px #fff; -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); margin-right: 10px;", width: 36} + %td.stack{style: "margin: 0; padding: 0 0 0 25px; border-top: solid 1px #eaeaea;"} + %p{style: "#{nopad} #{serif} font-size: 16px; line-height: 22px;"} + = truncate(@team.tags_for_jobs.join(", "), length: 35) + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.top-tip{border: 0, cellpadding: 0, cellspacing: 0, style: nopad} + %tr{style: nopad} + %td.glasses{style: "margin: 0; padding: 0 40px 30px 0;"} + %img{alt: "Glasses", height: 114, src: image_url("email/glasses.png"), style: nopad, width: 155} + %td.tip{style: "margin: 0; padding: 0 0 30px 0; text-align: right;"} + %h2{style: "#{nopad} font-weight: normal; #{serif} color: #99958b; margin-bottom: 10px;"} + This weeks top tip: + %h3{style: "#{nopad} font-weight: bold; #{sans_serif} font-size: 16px; line-height: 22px; color: #48494E;"} + - unless @user.team.nil? + -if @user.team.premium? + - if @user.team.hiring? + The more popular protips + = @user.team.name + team members author, the more exposure your jobs receive + - else + add open positions to your team page and they will get featured here + -else + Want + =@user.team.name + featured here? + %a{href: employers_url(@issue), style: "#{nopad} color: #3d8dcc;"} add open positions + - else + Want your team featured here? + %a{href: employers_url(@issue), style: "#{nopad} color: #3d8dcc;"} create team + + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #48494e;", width: 600} + %tr{style: nopad} + %td{style: "#{nopad} text-align: center"} + %p.reminder{style: "color: #fff; font-size: 12px; #{sans_serif} margin-top: 0; margin-bottom: 15px; padding-top: 0; padding-bottom: 0; line-height: 18px;"} + You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. + %p{style: "color: #c9c9c9; font-size: 12px; #{sans_serif}"} + %preferences{style: "color: #3ca7dd; text-decoration: none;"}> + %strong + %a{ href: 'https://coderwall.com/settings#email', style: 'color: #3ca7dd; text-decoration: none;' } + Edit your subscription + \ | + %unsubscribe{style: "color: #3ca7dd; text-decoration: none;"} + %strong + %a{href: '%unsubscribe_url%', style: "color: #3ca7dd; text-decoration: none;"} + Unsubscribe instantly diff --git a/app/views/protips/_cacheable_protip.html.haml b/app/views/protips/_cacheable_protip.html.haml index f824ca91..b9bf7f52 100644 --- a/app/views/protips/_cacheable_protip.html.haml +++ b/app/views/protips/_cacheable_protip.html.haml @@ -1,5 +1,5 @@ --if get_uncached_version?(protip, mode) - =render :partial => 'protip', :locals => {:protip => protip, :mode => mode, :include_comments => include_comments, :job => job} --else - -cache(['v2', 'protip', protip.public_id, protip.updated_at.min, protip.score], :expires_in => 1.week) do - =render :partial => 'protip', :locals => {:protip => protip, :mode => mode, :include_comments => include_comments, :job => job} +- if get_uncached_version?(protip, mode) + = render partial: 'protip', locals: { protip: protip, mode: mode, include_comments: include_comments, job: job } +- else + - cache(['v2', 'protip', protip.public_id, protip.updated_at.min, protip.score], expires_in: 1.week) do + = render partial: 'protip', locals: { protip: protip, mode: mode, include_comments: include_comments, job: job } diff --git a/app/views/protips/_grid.html.haml b/app/views/protips/_grid.html.haml index 5ee3b110..2d8ee674 100644 --- a/app/views/protips/_grid.html.haml +++ b/app/views/protips/_grid.html.haml @@ -1,29 +1,26 @@ --reset_protip_result_index --show_job = defined?(opportunity) && !opportunity.nil? +- reset_protip_result_index +- show_job = defined?(opportunity) && opportunity.present? - width = (defined?(width) && width) || 4 -- show_ad_every = width*2+width-2 -- items = show_job ? protips.each_slice(show_ad_every).map{|row| row.count == show_ad_every ? row.concat(['show-ad', nil]) : row }.flatten : protips +- show_ad_every = width * 2 + width - 2 +- items = show_job ? protips.each_slice(show_ad_every).map{ |row| row.count == show_ad_every ? row.concat(['show-ad', nil]) : row }.flatten : protips -- if collection.respond_to?(:error) +- logger.debug("Grid receiving type: #{collection.class}") +- if collection.respond_to?(:failure?) && collection.failure? .error - ="#{collection.error} Meanwhile you can " - =link_to 'create a pro tip', new_protip_path + = "#{collection.error} Meanwhile you can " + = link_to 'create a pro tip', new_protip_path = "about #{@topic}" unless @topic.nil? --items.in_groups_of(width, nil).each_with_index do |group, row| - -if (row > 0) && blur_protips? +- items.in_groups_of(width, nil).each_with_index do |group, row| + - if (row > 0) && blur_protips? .blurred-tips - =render :partial => "sessions/join_buttons", :locals => {:message => "Join to start earning badges for your open source contributions, discover protips and connect with other developers"} - -break + = render(partial: 'sessions/join_buttons', locals: { message: 'Join to start earning badges for your open source contributions, discover protips and connect with other developers' }) + - break %ul.protips-grid.cf - -group.each do |protip| - -if protip == 'show-ad' - =render :partial => 'opportunities/mini', :locals => {:opportunity => opportunity} - -elsif !protip.nil? - %li{:class => (protip.kind == 'link' ? 'ext-link' : '') } - = render :partial => 'protips/mini', :locals => {:protip => protip, :mode => mode} + - group.each do |protip| + = render 'grid_item', protip: protip, mode: mode - unless collection.nil? || !collection.respond_to?(:next_page) || collection.next_page.nil? || hide_more - - next_url = url_for(params.merge(:tags=> params[:tags], :q => params[:q], :source => params[:action], :controller =>params[:controller], :page => collection.current_page + 1, :section => (defined?(section) ? section : nil), :width => width, :mode => mode )) - %div{:class => ("#{number_to_word(width)}-cols-more" unless width.nil?)} - #more=link_to 'More', next_url, :class => 'final-more track' , :rel => 'next', :remote => true, :method => (params[:action] == "search" ? :post : :get), 'data-action' => 'more protips', 'data-from' => params[:action] \ No newline at end of file + - next_url = url_for(params.merge(tags: params[:tags], q: params[:q], source: params[:action], controller:params[:controller], page: collection.current_page + 1, section: (defined?(section) ? section : nil), width: width, mode: mode )) + %div{ class: ("#{number_to_word(width)}-cols-more" unless width.nil?) } + #more= link_to('More', next_url, class: 'final-more track', rel: 'next', remote: true, method: (params[:action] == 'search' ? :post : :get), 'data-action' => 'more protips', 'data-from' => params[:action]) diff --git a/app/views/protips/_grid_item.slim b/app/views/protips/_grid_item.slim new file mode 100644 index 00000000..fa92b174 --- /dev/null +++ b/app/views/protips/_grid_item.slim @@ -0,0 +1,5 @@ +- if protip == 'show-ad' + = render('opportunities/mini', opportunity: @job) +-elsif protip.present? + li class=(protip.kind == 'link' ? 'ext-link' : '') + = render('protips/mini', protip: protip, mode: mode) diff --git a/app/views/protips/_head.html.haml b/app/views/protips/_head.html.haml index 3fbb7019..e2ac7af9 100644 --- a/app/views/protips/_head.html.haml +++ b/app/views/protips/_head.html.haml @@ -5,51 +5,47 @@ :javascript Hyphenator.run() --cache ['v1', 'protip_index_page_meta_data', @topics.to_s], :expires_in => 1.week do - -content_for :page_title do - =protip_topic_page_title(@topics) - -content_for :page_description do - =protip_topic_page_description(@topics) - -content_for :page_keywords do - =protip_topic_page_keywords(@topics) --content_for :body_id do +- cache ['v1', 'protip_index_page_meta_data', @topics.to_s], expires_in: 1.week do + - content_for :page_title do + = protip_topic_page_title(@topics) + - content_for :page_description do + = protip_topic_page_description(@topics) + - content_for :page_keywords do + = protip_topic_page_keywords(@topics) + +- content_for :body_id do protip-multiple --#= render :partial => "search_topic", :locals => {:topics => @topic} %header.cf.second-level-header -if @topic_user - %a{:href => user_or_team_profile_path(@topic_user)} + %a{href: user_or_team_profile_path(@topic_user)} %h1 - =image_tag(user_or_team_image_path(@topic_user)) - ="#{@topic_user.display_name}'s Protips" + = image_tag(user_or_team_image_path(@topic_user)) + = "#{@topic_user.display_name}'s Protips" -else %h1 - if my_protips?(@topics) Your pro tips - else - -#=link_to('Trending Pro tips', protips_path) - -unless @topics.blank? + - unless @topics.blank? == #{@topics.to_sentence.html_safe} %ul.second-level-toplinks - -#%li=search_protips_by_topics(@topic) - -unless on_trending_page? || unsubscribable_topic?(@topic, @topics) || !signed_in? + - unless on_trending_page? || unsubscribable_topic?(@topic, @topics) || !signed_in? -if @topic_user.is_a?(Team) %li.follow-team-option=follow_team_link(@topic_user) -else - -if !@networks.blank? - -unless @topics.blank? + - unless @networks.blank? + - unless @topics.blank? - if @networks.size > 1 - .about-networks{:href => network_url(@networks.first.slug)} + .about-networks{href: network_url(@networks.first.slug)} Part of the =raw @networks.map {|network| link_to(network.name, network_path(network.slug))}.join(", ") == Network#{"s" if @networks.size > 1} - elsif @networks.size != 0 - %a.about-networks{:href => network_url(@networks.first.slug)} + %a.about-networks{href: network_url(@networks.first.slug)} Part of the = @networks.first.name Network - -#%li=subscription_link(@topic, 'top-subscribe', 'data-action' => 'subscribed') -else - -#%li=link_to('My tips', '/p/me', :class => 'my-tips track', 'data-action' => 'my tips') - %li=link_to('Share', new_protip_path, :class => 'share-a-tip track', 'data-action' => 'create protip', 'data-from' => @topic_user.nil? ? 'tagged protips page' : 'user protips page') + %li= link_to('Share', new_protip_path, class: 'share-a-tip track', 'data-action' => 'create protip', 'data-from' => @topic_user.nil? ? 'tagged protips page' : 'user protips page') diff --git a/app/views/protips/_mini.html.haml b/app/views/protips/_mini.html.haml index 19c78468..c839b37f 100644 --- a/app/views/protips/_mini.html.haml +++ b/app/views/protips/_mini.html.haml @@ -1,34 +1,37 @@ --#-protip = Protip::SearchWrapper.new(protip) -%article{:class => dom_class(protip), :id => protip.public_id} +%article{class: dom_class(protip), id: protip.public_id} %header - -unless protip.best_stat.nil? || best_stat_value(protip) == 0 - %span{:class => protip_stat_class(protip)} + - if display_protip_stats?(protip) + %span{class: best_stat_name(protip)} = formatted_best_stat_value(protip) unless best_stat_name(protip) =~ /hawt/ - -if protip_owner?(protip, current_user) - =link_to(' ', protip_path(protip.public_id), :method => :delete, :class => 'delete-tip', :title => 'remove protip', :confirm => "Are you sure you permanently want to remove this pro tip?") - = link_to protip.title, protip_or_link_path(protip), 'data-action' => 'view protip', 'data-from' => 'mini protip', :class => "title hyphenate track x-mode-#{mode || 'fullpage'}" + + -# TODO: We should remove this to cache , deleting should be from dashboard + - if protip_owner?(protip, current_user) + = link_to(' ', protip_path(protip.public_id), method: :delete, class: 'delete-tip', title: 'remove protip', confirm: "Are you sure you permanently want to remove this pro tip?") + + = link_to protip.title, protip_or_link_path(protip), 'data-action' => 'view protip', 'data-from' => 'mini protip', class: "title hyphenate track x-mode-#{mode || 'fullpage'}" %footer.cf - -if is_admin? + -# TODO: We should remove this to cache + - if is_admin? %ul %li.admin %p== #{distance_of_time_in_words_to_now(protip.created_at)} ago %ul.author - -unless protip.user.nil? + - if protip.user.present? %li.user by - =link_to protip.user.username, profile_path(protip.user.username), 'data-action' => 'view protip author', 'data-from' => 'mini protip', :title => "Authored by: #{protip.user.username}", :class => "track" - -unless protip.team.nil? + = link_to protip.user.username, profile_path(protip.user.username), 'data-action' => 'view protip author', 'data-from' => 'mini protip', title: "Authored by: #{protip.user.username}", class: "track" + - if protip.team.present? %li.team of - =link_to protip.team.name, teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'mini protip', :class => "track" + = link_to protip.team.name, teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'mini protip', class: "track" %ul.avatars - -unless protip.user.nil? + - if protip.user.present? %li.user - =link_to profile_path(protip.user.username) do - =image_tag(protip.user.profile_url) - -unless protip.team.nil? + = link_to profile_path(protip.user.username) do + = image_tag(protip.user.avatar_url) + - if protip.team.present? && protip.team.avatar.present? %li.team - =link_to teamname_path(protip.team.slug) do - =image_tag(protip.team.avatar) unless protip.team.avatar.blank? - -if protip.team && protip.team.hiring - %a.job{:href => teamname_path(protip.team.slug)} + = link_to teamname_path(protip.team.slug) do + = image_tag(protip.team.avatar) + - if protip.team && protip.team.hiring + %a.job{href: teamname_path(protip.team.slug)} diff --git a/app/views/protips/_new_or_edit.html.haml b/app/views/protips/_new_or_edit.html.haml index 31f0c4ed..b44acd6f 100644 --- a/app/views/protips/_new_or_edit.html.haml +++ b/app/views/protips/_new_or_edit.html.haml @@ -1,5 +1,5 @@ .outside.editing - %h1.editing Editing... + %h1.editing= protip_editing_text .wrapper = simple_form_for @protip, url: create_or_update_url(@protip) do |p| .card-container @@ -12,6 +12,7 @@ .rule = p.input :body, placeholder: "Share link(s), text, code, or images", label: false, as: :text + .preview-body %h4.formatting-tips Formatting tips %ul.formatting %li.bold @@ -30,11 +31,11 @@ %li.full-list=link_to('How to write a great pro tip', 'https://coderwall.com/p/o42nvq', target: "_blank") .rule.edit-tags - = p.input :topics, placeholder: "Tags, comma separated", label: false, input_html: {class: "tags cf", value: @protip.topics.join(","), id: "protip_tags", :autocomplete=>'off'} + = p.input :topic_list, label: false, input_html: {class: "tags cf", value: @protip.topic_list.join(","), id: "protip_tags", :autocomplete=>'off'} .x-tip-content.preview.back.side.cf#x-protip-preview .vertical-floatable = p.button :submit, 'Preview or cmd +', class: "preview-button" - = p.submit 'Save & Publish', class: "save-and-publish" + = p.submit 'Save & Publish', class: "save-and-publish",id: "protip-save-and-publish-button" diff --git a/app/views/protips/_protip.html.haml b/app/views/protips/_protip.html.haml index 92dfaeb9..8afd1f94 100644 --- a/app/views/protips/_protip.html.haml +++ b/app/views/protips/_protip.html.haml @@ -1,141 +1,124 @@ -.inside.cf.x-protip-pane - //.blur-screen - .tip-container.cf.x-protip-content.protip-single#x-protip{:class => mode} +-content_for :page_title do + =sanitize(protip.title) + +.inside.cf.x-protip-pane{itemscope: true, itemtype: meta_article_schema_url} + %meta{itemprop: :dateCreated, content: protip.created_at} + .tip-container.cf.x-protip-content.protip-single#x-protip{class: mode} %aside.tip-sidebar .user-box - %a.avatar{:href => profile_path(protip.user.username), 'data-action' => 'view user profile', 'data-from' => 'protip author avatar on top', 'data-properties' => {'mode' => mode}.to_json} - =image_tag(users_image_path(protip.user), :class => 'avatar') + %a.avatar{ href: profile_path(protip.user.username), 'data-action' => 'view user profile', 'data-from' => 'protip author avatar on top', 'data-properties' => { 'mode' => mode }.to_json } + = image_tag(users_image_path(protip.user), class: 'avatar') %ul.user-team - %li.user + %li.user{itemprop: :author, itemscope: true ,itemtype: meta_person_schema_url} + %meta{itemprop: :name, content: protip.user.display_name} + %meta{itemprop: :alternateName, content: protip.user.username} by - %a.track{:href => profile_path(protip.user.username), 'data-action' => 'view user profile', 'data-from' => 'protip author name on top', 'data-properties' => {'mode' => mode}.to_json} + %a.track{ href: profile_path(protip.user.username), 'data-action' => 'view user profile', 'data-from' => 'protip author name on top', 'data-properties' => { 'mode' => mode }.to_json } = protip.user.display_name - unless protip.team.nil? %li.team of - %a.track{:href => teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'protip author teamname on top', 'data-properties' => {'mode' => mode}.to_json} + %a.track{ href: teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'protip author teamname on top', 'data-properties' => { 'mode' => mode }.to_json } = protip.team.name %p.bio - =protip.user.about + = protip.user.about %ul.side-bar-list - %li.username - %a.name.track{:href => profile_path(protip.user.username), 'data-action' => 'view user profile', 'data-from' => 'protip author name(follow)', 'data-properties' => {'mode' => mode}.to_json}=protip.user.username - =link_to '', follow_user_path(protip.user.username), :class => "follow", :remote => true, :method => :post, :rel => "nofollow", :'data-follow-type' => 'Users', :'data-value' => "#{protip.user.username}" + %a.name.track{ href: profile_path(protip.user.username), 'data-action' => 'view user profile', 'data-from' => 'protip author name(follow)', 'data-properties' => { 'mode' => mode }.to_json } + = protip.user.username + = link_to '', follow_user_path(protip.user.username), class: "follow", remote: true, method: :post, rel: 'nofollow', :'data-follow-type' => 'Users', :'data-value' => "#{ protip.user.username }" - unless protip.team.nil? %li.teamname - %a.name.track{:href => teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'protip teamname(follow)', 'data-properties' => {'mode' => mode}.to_json}=protip.team.name - =link_to '', follow_team_path(protip.team.slug), :class => "follow", :remote => true, :method => :post, :rel => "nofollow", :'data-follow-type' => 'Teams', :'data-value' => "#{protip.team.slug}" + %a.name.track{ href: teamname_path(protip.team.slug), 'data-action' => 'view team', 'data-from' => 'protip teamname(follow)', 'data-properties' => { 'mode' => mode }.to_json }=protip.team.name + = link_to '', follow_team_path(protip.team.slug), class: "follow", remote: true, method: :post, rel: "nofollow", :'data-follow-type' => 'Teams', :'data-value' => "#{ protip.team.slug }" .side-btm - -unless protip.networks.blank? + - unless protip.networks.blank? %h3 Networks %ul.side-bar-list.side-bar-networks - protip_networks(protip).each do |name| - -slug = Network.slugify(name) - %li{:style => "border-color:##{color_signature(slug)}"} - %a.name{:href => network_path(:id => slug)}= name - =link_to '', leave_network_path(:id => slug), :class => "follow #{slug}", :remote => true, :method => :post, :rel => "nofollow", :'data-follow-type' => 'Networks', :'data-value' => "#{slug}" - - -unless mode == 'preview' - -if protip_owner?(protip, current_user) || is_admin? + - slug = name.parameterize + %li{ style: "border-color:##{ color_signature(slug) }" } + %a.name{ href: network_path(id: slug) }= name + - followed = current_user.try(:member_of?, Network.find_by_slug(slug)) + = link_to '', followed ? leave_network_path(id: slug) : join_network_path(id: slug), class: followed ? "follow followed #{ slug }" : "follow #{ slug }", remote: true, method: :post, rel: "nofollow", :'data-follow-type' => 'Networks', :'data-value' => "#{ slug }" + + - unless mode == 'preview' + - if protip_owner?(protip, current_user) || is_admin? %ul.admin-links %li - = link_to 'Edit protip', edit_protip_path(protip.public_id), :class => 'edit', :rel => 'nofollow' + = link_to 'Edit protip', edit_protip_path(protip.public_id), class: 'edit', rel: 'nofollow' %li - = link_to('Delete protip ', protip_path(protip.public_id), :method => :delete, :class => 'delete-tip del', :rel => 'nofollow', :title => 'remove protip', :confirm => "Are you sure you permanently want to remove this pro tip?") + = link_to('Delete protip ', protip_path(protip.public_id), method: :delete, class: 'delete-tip del', rel: 'nofollow', title: 'remove protip', confirm: "Are you sure you permanently want to remove this pro tip?") - if is_admin? %ul.admin-links %li - =link_to '', flag_protip_path(protip), :method => :post, :remote => true, :class => (protip.flagged? ? 'flagged' : "") + " flag" - %li - =link_to '', queue_protip_path(protip, :queue => 'hackernews'), :method => :post, :remote => true, :class => (protip.queued_for?(:hackernews) ? 'queued' : "") + " queue" + = link_to '', flag_protip_path(protip), method: :post, remote: true, class: (protip.flagged? ? 'flagged' : "") + " flag" %li - =link_to '', feature_protip_path(protip), :method => :post, :remote => true, :class => (protip.featured? ? 'featured' : "") + " feature" + = link_to '', feature_protip_path(protip), method: :post, remote: true, class: (protip.featured? ? 'featured' : "") + " feature" %li %p.reviewed - =protip_reviewer(protip) + = protip_reviewer(protip) - else %ul.admin-links %li - = link_to '', report_inappropriate_protip_path(protip), method: :post, remote: true, class: (cookies["report_inappropriate-#{protip.public_id}"] ? 'user-flagged' : '') + ' user-flag' + = link_to '', report_inappropriate_protip_path(protip), method: :post, remote: true, class: (cookies["report_inappropriate-#{ protip.public_id }"] ? 'user-flagged' : '') + ' user-flag' -if defined?(:job) && !job.nil? - %h3 Featured team - - adjective = ["is amazing", "is awesome", "has a great engineering team"].sample - =link_to teamname_path(job.team.slug), :class => 'team-box', 'data-action' => 'view team jobs', 'data-from' => 'job on protip', 'data-properties' => {"author's team" => protip.user.belongs_to_team?(job.team), 'adjective' => adjective, 'mode' => mode}.to_json do - .image-top - =image_tag(featured_team_banner(job.team)) - .content - -#-team_member = protip.user.belongs_to_team?(job.team) ? protip.user : job.team.top_team_member - .avatar - =image_tag(job.team.avatar_url) - %h4= job.team.name + = render partial: "sidebar_featured_team", locals: { job: job, mode: mode, protip: protip } - %p - ==Calling all #{job.title.pluralize}. #{job.team.name} #{adjective} and is hiring! - %a.feature-jobs.track{:href => employers_path, 'data-action' => 'upgrade team', 'data-from' => 'protip page'} - feature your jobs here - - %pm:widget{"max-item-count" => "4", "show-thumbs" => "false", :title => "Recommended", :width => "244"}/ - - %article.tip-panel{:id => protip.public_id} - -ab_test(TWITTER_SHARE_TEST, 'left', 'right') do |direction| - =share_on_twitter(protip, 'share-this-tip direction') - -#%a.share-this-tip{:href => '/'} - -# Share this - =upvote_link(protip, "upvote") + %article.tip-panel{ id: protip.public_id } + = share_on_twitter(protip, 'share-this-tip direction') + = upvote_link(protip, 'upvote') %header.tip-header - %h1.tip-title + %h1.tip-title{itemprop: :headline} -if mode == 'popup' - %a.track{:href => protip_path(protip), 'data-action' => 'view protip', 'data-from' => 'popup protip title'}=sanitize(protip.title) + %a.track{href: protip_path(protip), 'data-action' => 'view protip', 'data-from' => 'popup protip title'}=sanitize(protip.title) -else = sanitize(protip.title) - if is_admin? || protip_owner?(protip, current_user) || protip.total_views > 100 %p.views + %i.fa.fa-eye %span = protip.total_views views - %ul#tags.cf - - protip.topics.each do |tag| + %ul#tags.cf{itemprop: :keywords} + - protip.topic_list.each do |tag| %li - %a{:href => "/p/t/#{tag.parameterize}"}=tag + = link_to tag, protips_path(search: tag.parameterize) - if is_admin? - =link_to 'delete', delete_tag_protip_path(protip.public_id, CGI.escape(tag)), :method => :post, :class => "delete" + = link_to 'delete', delete_tag_protip_path(protip.public_id, CGI.escape(tag)), method: :post, class: "delete" + + %div.timestamp.cf{ title: 'Publish time' } + %i.fa.fa-clock-o{ itemprop: 'datePublished' } + = local_time_ago(protip.created_at) - if is_admin? %ul.admin-tag-links.cf - %li=link_to 'flag', flag_protip_path(protip), :method => :post, :remote => true, :class => (protip.flagged? ? 'flagged' : "") + " flag" - %li=link_to 'feature', feature_protip_path(protip), :method => :post, :remote => true, :class => (protip.featured? ? 'featured' : "") + " feature" - %li=link_to('delete', protip_path(protip.public_id), :method => :delete, :class => 'delete-tip del', :rel => 'nofollow', :title => 'remove protip', :confirm => "Are you sure you permanently want to remove this pro tip?") - - //.tip-body.tip-content - %div.tip-content - =raw sanitize(protip.to_html) + %li= link_to 'flag', flag_protip_path(protip), method: :post, remote: true, class: (protip.flagged? ? 'flagged' : '') + ' flag' + %li= link_to 'feature', feature_protip_path(protip), method: :post, remote: true, class: (protip.featured? ? 'featured' : '') + ' feature' + %li= link_to('delete', protip_path(protip.public_id), method: :delete, class: 'delete-tip del', rel: 'nofollow', title: 'remove protip', confirm: "Are you sure you permanently want to remove this pro tip?") - -if include_comments - %section.comments - %h2.comments-header Comments - %ul.comment-list - = render protip.comments + %hr + %div.tip-content{itemprop: :articleBody} + = raw sanitize(protip.to_html) - = render 'comments/add_comment' + = render('protip_comments', comments: protip.comments.showable) if include_comments - -if defined?(:job) && !job.nil? + - if defined?(:job) && !job.nil? .mobile-job - - adjective = ["is amazing", "is awesome", "has a great engineering team"].sample - =link_to teamname_path(job.team.slug), :class => 'team-box', 'data-action' => 'view team jobs', 'data-from' => 'job on protip', 'data-properties' => {"author's team" => protip.user.belongs_to_team?(job.team), 'adjective' => adjective, 'mode' => mode}.to_json do + - adjective = ['is amazing', 'is awesome', 'has a great engineering team'].sample + = link_to teamname_path(job.team.slug), class: 'team-box', 'data-action' => 'view team jobs', 'data-from' => 'job on protip', 'data-properties' => { "author's team" => protip.user.belongs_to_team?(job.team), 'adjective' => adjective, 'mode' => mode }.to_json do .image-top - =image_tag(featured_team_banner(job.team)) + = image_tag(featured_team_banner(job.team)) .content - -#-team_member = protip.user.belongs_to_team?(job.team) ? protip.user : job.team.top_team_member .avatar - =image_tag(job.team.avatar_url) + = image_tag(job.team.avatar_url) %h4= job.team.name %p - ==Calling all #{job.title.pluralize}. #{job.team.name} #{adjective} and is hiring! + == Calling all #{ job.title.pluralize }. #{ job.team.name } #{ adjective } and is hiring! diff --git a/app/views/protips/_protip_comments.slim b/app/views/protips/_protip_comments.slim new file mode 100644 index 00000000..420de51b --- /dev/null +++ b/app/views/protips/_protip_comments.slim @@ -0,0 +1,8 @@ +section.comments class=('no-comments' if comments.empty? ) + - if comments.any? + h2.comments-header + i.fa.fa-comments + | Comments + ul.comment-list + = render comments + = render 'comments/add_comment' \ No newline at end of file diff --git a/app/views/protips/_search_topic.html.haml b/app/views/protips/_search_topic.html.haml index 0212cd77..53d63daa 100644 --- a/app/views/protips/_search_topic.html.haml +++ b/app/views/protips/_search_topic.html.haml @@ -1,16 +1,10 @@ - content_for :javascript do - =javascript_include_tag 'vendor/history.adapter.jquery.js' - =javascript_include_tag 'vendor/history.js' + = javascript_include_tag 'history.adapter.jquery.js' + = javascript_include_tag 'history.js' .search-container#search %section.inside-search-container %header.search-header.cf - -# %h1 Search Protips - -# %a=link_to('Close search', '', :class => 'slideup close-search', :id => 'close-search', 'data-target' => 'search') - -#=simple_form_for :search, :url => search_protips_path, :remote => true do |s| - -# /=#s.input :q, :label => false, :input_html => {:class => "submit-on-enter delayed-search", 'data-min-match' => 3} - -# =text_field_tag :q, topics_to_query(topics), :label => false, :class => "submit-on-enter delayed-search", 'data-min-match' => 3, :autocomplete=>'off' - %section.tips-section %header.cf#search-results #more diff --git a/app/views/protips/_sidebar_featured_team.html.haml b/app/views/protips/_sidebar_featured_team.html.haml new file mode 100644 index 00000000..99dd1cdb --- /dev/null +++ b/app/views/protips/_sidebar_featured_team.html.haml @@ -0,0 +1,33 @@ +- # Locals params +- # @param job [ Opportunity ] - job needed to render this partial +- # @param protip [ Protip ] - protip page this job is being rendered on +- # @param mode [ String ] - page mode + +:ruby + team = job.team + adjective = ["is amazing", "is awesome", "has a great engineering team"].sample + team_has_featured_banner = team.featured_banner_image.present? + team_has_big_image = team.big_image.present? + team_has_custom_image = (team_has_featured_banner || team_has_big_image) ? true : false + + banner_image = if team_has_featured_banner then team.featured_banner_image + elsif team_has_big_image then team.big_image + else default_featured_job_banner + end + +-# .featured-team{class: team_has_custom_image ? "custom-image" : "default-image"} +-# %h3 Featured team +-# +-# =link_to teamname_path(team.slug), class: 'team-box', 'data-action' => 'view team jobs', 'data-from' => 'job on protip', 'data-properties' => {"author's team" => protip.user.belongs_to_team?(team), 'adjective' => adjective, 'mode' => mode}.to_json do +-# .image-top +-# =image_tag(banner_image) +-# .content +-# .avatar +-# =image_tag(team.avatar_url) +-# %h4= team.name +-# %p +-# ==Calling all #{job.title.pluralize}. #{job.team.name} #{adjective} and is hiring! +-# %a.feature-jobs.track{href: employers_path, 'data-action' => 'upgrade team', 'data-from' => 'protip page'} +-# feature your jobs here +-# +-# %pm:widget{"max-item-count" => "4", "show-thumbs" => "false", title: "Recommended", width: "244"} diff --git a/app/views/protips/_trending_topics.html.haml b/app/views/protips/_trending_topics.html.haml index 754a10b2..5226d2c9 100644 --- a/app/views/protips/_trending_topics.html.haml +++ b/app/views/protips/_trending_topics.html.haml @@ -1,7 +1,7 @@ --cache ['v1','trending_protip_topics', ENV['FEATURED_TOPICS'], count], :expires_in => 1.hour do +- cache ['v1','trending_protip_topics', ENV['FEATURED_TOPICS'], count], expires_in: 1.hour do - trending_protips_topics(count).in_groups_of(4, false) do |group| %ul.topics-list - group.each do |topic| - %li{:style => right_border_css(topic) } - %a{:href => topic_protips_path(topic)} - %h3= topic \ No newline at end of file + %li{style: right_border_css(topic) } + %a{href: topic_protips_path(topic)} + %h3= topic diff --git a/app/views/protips/by_tags.html.haml b/app/views/protips/by_tags.html.haml index b37d9f08..a3c3dcda 100644 --- a/app/views/protips/by_tags.html.haml +++ b/app/views/protips/by_tags.html.haml @@ -1,5 +1,6 @@ %ul.by-tags-list - -@tags.each do |tag| - %li{:style => right_border_css(tag.name, 14)}=link_to tag.name, tagged_protips_path(tag.name, :show_all => true) + - @tags.each do |tag| + %li{style: right_border_css(tag.name, 14)} + = link_to tag.name, tagged_protips_path(tag.name, show_all: true) -=paginate @tags \ No newline at end of file += paginate @tags diff --git a/app/views/protips/index.html.haml b/app/views/protips/index.html.haml index a4855bb8..0016cb79 100644 --- a/app/views/protips/index.html.haml +++ b/app/views/protips/index.html.haml @@ -1,24 +1,19 @@ -=content_for :content_wrapper do +- content_for :content_wrapper do false --content_for :javascript do - =javascript_include_tag 'protips-grid' +- content_for :head do + = stylesheet_link_tag 'protip' --content_for :head do - =stylesheet_link_tag 'protip' +- content_for :footer_menu do + %li= link_to 'Protips', by_tags_protips_path -=content_for :footer_menu do - %li=link_to 'Protips', by_tags_protips_path - --unless signed_in? +- unless signed_in? %section.home-top.cf - .inside-home-top + .home-top .left-panel %h1 A community for developers to unlock and share new skills, join us - / %a.sign-up-btn{:href => signin_path} - / Sign up - =render :partial => "sessions/join_buttons" + = render partial: "sessions/join_buttons" %ul.features-list %li.achievements @@ -34,78 +29,51 @@ %h2 Represent your team %p Gather your team mates from work to establish your team's geek cred --else +- else #upvoted-protips{'data-protips' => @upvoted_protips_public_ids} %section.new-main-content#x-protips-grid.cf //following on - .filter-bar#x-scopes-bar{:class => display_scopes_class} + .filter-bar#x-scopes-bar{class: display_scopes_class} .inside.cf %ul.filter-nav#x-scopes -if signed_in? %li - =link_to "Fresh", fresh_protips_path(:scope => params[:scope]), :class => selected_search_context_class("fresh"), :id => "x-scope-fresh" + = link_to "Fresh", fresh_protips_path(scope: params[:scope]), class: selected_search_context_class("fresh"), id: "x-scope-fresh" %li - =link_to "Trending", trending_protips_path(:scope => params[:scope]), :class => selected_search_context_class("trending"), :id => "x-scope-trending" + = link_to "Trending", trending_protips_path(scope: params[:scope]), class: selected_search_context_class("trending"), id: "x-scope-trending" %li - =link_to "Popular", popular_protips_path(:scope => params[:scope]), :class => selected_search_context_class("popular"), :id => "x-scope-popular" + = link_to "Popular", popular_protips_path(scope: params[:scope]), class: selected_search_context_class("popular"), id: "x-scope-popular" -if signed_in? %li - =link_to "Liked", liked_protips_path(:scope => params[:scope]), :class => selected_search_context_class("liked"), :id => "x-scope-liked" + = link_to "Liked", liked_protips_path(scope: params[:scope]), class: selected_search_context_class("liked"), id: "x-scope-liked" - %ul.toggle-nav - - if signed_in? + - if signed_in? + %ul.toggle-nav %li - %a.switch#x-scope-toggle{:href => '/', :class => display_scope_class} - %li - %a.action.followings#x-followings-toggle{:href => '/'} + %a.action.share-tip{href: new_protip_path, class: "track", 'data-action' => 'create protip', 'data-from' => 'homepage', 'data-properties' => {'context' => @context}.to_json} - %li - %a.action.share-tip{:href => new_protip_path, :class => "track", 'data-action' => 'create protip', 'data-from' => 'homepage', 'data-properties' => {'context' => @context}.to_json} - - %li - %a.action.search#x-show-search{:href => '/'} //search bar - .filter-bar.search-bar#x-search{:class => display_search_class} + .filter-bar.search-bar#x-search{class: display_search_class} .inside.cf - %form.search-bar{:href => search_protips_path} - %input{:name => "search", :type => "text", :placeholder => "Type here to search, for example: Ruby on Rails", :value => params[:search]} + %form.search-bar{href: search_protips_path} + %input{name: "search", type: "text", placeholder: "Type here to search, for example: Ruby on Rails", value: params[:search]} %ul.toggle-nav %li - %a.action.search#x-hide-search{:href => '/'} - + %a.action.search#x-hide-search{href: '/'} -if signed_in? //followings - -cache(followings_fragment_cache_key(current_user.id), :expires_in => 15.minutes) do + -cache(followings_fragment_cache_key(current_user.id), expires_in: 15.minutes) do .following-panel#x-followings.hide .inside %h1 Following .inside-panel - %h2 Networks - %ul.protips-grid.new-networks-list.cf - - following_networks = current_user.following_networks - #x-following-networks.hide{'data-networks' => following_networks.map(&:slug)} - - - following_networks.limit(11).map(&:slug).each do |slug| - %li{:style => "border-color:##{color_signature(slug)}"} - =link_to '', leave_network_path(:id => slug), :class => "unfollow followed #{slug}", :remote => true, :method => :post, :rel => "nofollow" - %a.new-network{:href => network_path(:id => slug)} - = slug.humanize - - if following_networks.count > 11 - %li.plus-more - %a{:href => user_networks_path(:username =>current_user.username)} - - %span.x-follow-count - = following_networks.count - 11 - more - - %h2 Connections %ul.protips-grid.connections-list.cf - following_users = current_user.following_users @@ -113,26 +81,26 @@ - following_users.limit(11).each do |user| %li - =link_to '', follow_user_path(user.username), :class => "unfollow followed", :remote => true, :method => :post, :rel => "nofollow" + = link_to '', follow_user_path(user.username), class: 'unfollow followed', remote: true, method: :post, rel: 'nofollow' %ul.author %li.user - %a{:href => profile_path(user.username)}= user.username + %a{href: profile_path(user.username)}= user.username -if user.on_team? %li.team - %a{:href => friendly_team_path(user.team)}= user.team.name + %a{href: friendly_team_path(user.team)}= user.team.name %ul.avatars %li.user - %a{:href => profile_path(user.username)} - =image_tag(user.profile_url) + %a{href: profile_path(user.username)} + = image_tag(user.avatar_url) -if user.on_team? %li.team - %a{:href => friendly_team_path(user.team)} - =image_tag(user.team.avatar_url) + %a{href: friendly_team_path(user.team)} + = image_tag(user.team.avatar_url) - if following_users.count > 11 %li.plus-more - %a{:href => following_path(current_user.username)} + %a{href: following_path(current_user.username)} %span.x-follow-count = following_users.count - 11 @@ -146,45 +114,44 @@ - following_teams.first(11).each do |team| %li - =link_to '', follow_team_path(team.slug), :class => "unfollow followed", :remote => true, :method => :post, :rel => "nofollow" + = link_to '', follow_team_path(team.slug), class: "unfollow followed", remote: true, method: :post, rel: "nofollow" %ul.author %li.user - %a{:href => friendly_team_path(team)}= team.name + %a{href: friendly_team_path(team)}= team.name - team_protips_count = team.trending_protips(1000).count - if team_protips_count > 0 %li.team - %a{:href => team_protips_path(team)}== #{team_protips_count} Protips + %a{href: team_protips_path(team)}== #{team_protips_count} Protips %ul.avatars %li.team - %a{:href => friendly_team_path(team)} - =image_tag(team.avatar_url) + %a{href: friendly_team_path(team)} + = image_tag(team.avatar_url) - if following_teams.count > 11 %li.plus-more - %a{:href => teams_path} + %a{href: teams_path} %span.x-follow-count = following_teams.count - 11 more - .inside.cf -unless @suggested_networks.blank? .suggested .inside-panel %h2 Suggested networks to follow %ul.protips-grid.new-networks-list.cf - -@suggested_networks.each do |name| - -slug = Network.slugify(name) - %li{:style => "border-color:##{color_signature(slug)}"} - =link_to '', join_network_path(:id => slug), :class => "follow #{slug} #{signed_in? && current_user.following_networks.exists?(:slug => slug) ? "followed" : ""}", :remote => true, :method => :post, :rel => "nofollow" - %a.new-network{:href => network_path(:id => slug)} + - @suggested_networks.each do |name| + - slug = name.parameterize + %li{style: "border-color:##{color_signature(slug)}"} + = link_to '', join_network_path(id: slug), class: "follow #{slug} #{signed_in? && current_user.following_networks.exists?(slug: slug) ? "followed" : ""}", remote: true, method: :post, rel: "nofollow" + %a.new-network{href: network_path(id: slug)} = name - - if @protips.count == 0 + - if @protips && @protips.count == 0 .no-tips %h1 No results %p You are not following anything yet. Follow people, teams or networks to see protips from them here. boom. - -else - = render :partial => "protips/grid", :locals => {:protips => @protips.respond_to?(:results) ? @protips.results : @protips, :collection => @protips, :url => :protips_path, :hide_more => blur_protips?, :width => 4, :mode => protip_display_mode, :opportunity => @job} + - else + = render partial: 'protips/grid', locals: { protips: @protips.respond_to?(:results) ? @protips.results : @protips, collection: @protips, url: :protips_path, hide_more: blur_protips?, width: 4, mode: protip_display_mode, opportunity: @job } diff --git a/app/views/protips/index.js.erb b/app/views/protips/index.js.erb index 235f074c..e7f5a0b8 100644 --- a/app/views/protips/index.js.erb +++ b/app/views/protips/index.js.erb @@ -1 +1 @@ -<%= render :partial => 'search_response', :locals => {:append_to => '.four-cols-more'} %> \ No newline at end of file +<%= render partial: 'search_response', locals: {append_to: '.four-cols-more'} %> diff --git a/app/views/protips/me.html.haml b/app/views/protips/me.html.haml index 80526b74..eab27ce0 100644 --- a/app/views/protips/me.html.haml +++ b/app/views/protips/me.html.haml @@ -1,8 +1,9 @@ -=content_for :content_wrapper do += content_for :content_wrapper do false + %section.new-main-content .inside - = render :partial => "head", :locals => {:topic => Protip::USER_SCOPE} + = render partial: "head", locals: {topic: Protip::USER_SCOPE} - if signed_in? %section.my-protips.tips-section %header.cf @@ -10,7 +11,7 @@ - if current_user.protips.any? - authored_protips = current_user.authored_protips(12) #author.cf - = render :partial => "grid", :locals => {:protips => authored_protips.try(:results), :collection => authored_protips, :url => :protips_path, :hide_more => false, :section => "author", :mode => 'popup'} + = render partial: "grid", locals: {protips: authored_protips.try(:results), collection: authored_protips, url: :protips_path, hide_more: false, section: "author", mode: 'popup'} - else .secondary-notice %p @@ -22,7 +23,7 @@ - if current_user.bookmarked_protips.any? - bookmarks = current_user.bookmarked_protips(12) #bookmark.cf - = render :partial => "grid", :locals => {:protips => bookmarks.try(:results), :collection => bookmarks, :url => :protips_path, :hide_more => false, :section => "bookmark", :mode => 'popup'} + = render partial: "grid", locals: {protips: bookmarks.try(:results), collection: bookmarks, url: :protips_path, hide_more: false, section: "bookmark", mode: 'popup'} - else .secondary-notice %p diff --git a/app/views/protips/search.js.erb b/app/views/protips/search.js.erb index d6058109..a732df46 100644 --- a/app/views/protips/search.js.erb +++ b/app/views/protips/search.js.erb @@ -1 +1 @@ -<%= render :partial => 'search_response', :locals => {:append_to => "#search-results"}%> \ No newline at end of file +<%= render partial: 'search_response', locals: {append_to: "#search-results"}%> diff --git a/app/views/protips/show.html.haml b/app/views/protips/show.html.haml index 347f56d6..6c951979 100644 --- a/app/views/protips/show.html.haml +++ b/app/views/protips/show.html.haml @@ -1,149 +1,27 @@ -=content_for :head do - %title==#{@protip.user.display_name} : #{sanitize(@protip.title)} - %link{:rel => 'canonical', :href => protip_path(@protip)} - %meta{:name => :description, :property => "og:description", :content => protip_summary } - %meta{:property => "og:image", :content => users_image_path(@protip.user)} - %meta{:name => "viewport", :content => "width=device-width,initial-scale=1.0,maximum-scale=1.0"} - - -if ENV['ENABLE_TWITTER_CARDS'] - %meta{:name => 'twitter:card', :content => 'summary' } - %meta{:name => 'twitter:site', :content => '@coderwall' } - %meta{:name => 'twitter:title', :content => sanitize(@protip.title) } - %meta{:name => 'twitter:url', :content => protip_url(@protip)} - %meta{:name => 'twitter:description', :content => protip_summary } - -if @protip.has_featured_image? - %meta{:name => 'twitter:image', :content => @protip.featured_image } - -unless @protip.author.twitter_id.blank? - %meta{:name => 'twitter:creator:id', :content => @protip.author.twitter_id } - - --content_for :mixpanel do - =record_event("viewed protip", :featured => @protip.featured, :distinction => @protip.best_stat[0]) - --if params[:old] == 'true' - %article{:id => @protip.public_id} - -unless signed_in? - =link_to('upvote', upvote_protip_path(@protip.public_id), :remote => true, :method => :post, :rel => "nofollow", :class => 'track slide-signup', 'data-action' => 'upvote protip', 'data-from' => 'protip ribbon') - %header.cf - -if !signed_in? - .side-conversion-alert.hide - %p Where developers come to connect, share, build and be inspired. - %a.convert-signup.track{:href => '/', 'data-action' => 'view homepage', 'data-from' => 'convert button on protip'} Join Coderwall - =image_tag(users_image_path(@protip.user), :class => 'avatar') - %ul.who-and-when - %li - %h2 - %a.track{:href => profile_path(@protip.user.username), 'data-action' => 'view user profile', 'data-from' => 'protip author name on top'} - = @protip.user.display_name - - if is_admin? or viewing_self? or @protip.total_views > 100 - %li.views - = @protip.total_views - Views - =share_on_twitter(@protip) - .tip-content - -#.hide=text_area_tag :protip_markdown, escape_scripts(@protip.body) - %h1.tip-title=sanitize(@protip.title) - %ul#tags.tags.cf - - @protip.topics.each_with_index do |tag, index| - %li - %a{:href => "/p/t/#{tag.parameterize}"} - = tag - - if is_admin? - =link_to 'delete', delete_tag_protip_path(@protip.public_id, CGI.escape(tag)), :method => :post, :class => "delete" - - if is_admin? && @protip.orphan? - %li.orphan Orphan - .tip-body - #body=sanitize(formatted_protip(@protip)) - - if is_admin? - %ul.admin-links - %li - =link_to '', flag_protip_path(@protip), :method => :post, :remote => true, :class => (@protip.flagged? ? 'flagged' : "") + " flag" - %li - =link_to '', queue_protip_path(@protip, :queue => 'hackernews'), :method => :post, :remote => true, :class => (@protip.queued_for?(:hackernews) ? 'queued' : "") + " queue" - %li - =link_to '', feature_protip_path(@protip), :method => :post, :remote => true, :class => (@protip.featured? ? 'featured' : "") + " feature" - %li - %p.reviewed - =protip_reviewer(@protip) - - -if is_admin? or (signed_in? && @protip.owned_by?(current_user)) - %a.add-tag{:href => edit_protip_path(@protip.public_id)} Edit Protip - = upvote_link(@protip, "upvote") - - authors_team = @job && @protip.author.belongs_to_team?(@job.team) - - -if @protip.user.about.blank? - %footer.about-footer.no-about.cf - %ul.links.cf - %li=link_to('View profile', profile_path(@protip.user.username), :class => 'view-profile track', 'data-action' => 'view user profile', 'data-from' => 'protip about (view profile)') - %li=link_to('View pro tips', user_protips_path(@protip.user.username), :class => 'view-protips track', 'data-action' => 'view user protips', 'data-from' => 'protip about (view pro tips)') - %li - - follow = follow_or_following(@protip.user) - =link_to "#{follow} #{@protip.user.short_name}", follow == "follow" ? follow_user_path(@protip.user.username) : '', :method => :post, :remote => true, :class => "#{follow}-user track", 'data-action' => 'follow user', 'data-from' => 'protip about (follow xxx)' - -else - %footer.about-footer.cf - .about - %h4==About #{@protip.user.short_name} - %p - =@protip.user.about - -if @protip.user.team - Member of team - =link_to(@protip.user.team.name, friendly_team_path(@protip.user.team), :class => "track", 'data-action' => 'view team', 'data-from' => 'protip job (member of team xxx)', 'data-properties' => {"author's team" => authors_team}.to_json) - %ul.links.cf - %li=link_to('View profile', profile_path(@protip.user.username), :class => 'view-profile track', 'data-action' => 'view user profile', 'data-from' => 'protip about (view profile)') - %li=link_to('View pro tips', user_protips_path(@protip.user.username), :class => 'view-protips track', 'data-action' => 'view user protips', 'data-from' => 'protip about (view pro tips)') - %li - - follow = follow_or_following(@protip.user) - =link_to "#{follow} #{@protip.user.short_name}", follow == "follow" ? follow_user_path(@protip.user.username) : '', :method => :post, :remote => true, :class => "#{follow}-user track", 'data-action' => 'follow user', 'data-from' => 'protip about (follow xxx)' - - if @job - .work-for-wrap - .works-for.cf - .left - %a.team-ava.track{:href => team_job_path(@job.team), 'data-action' => 'view team jobs', 'data-from' => 'job on protip (team avatar)', 'data-properties' => {"author's team" => authors_team}.to_json} - =image_tag(@job.team.avatar_url) - .right - %p - - if authors_team - = @protip.author.short_name - works for - %a.team.track{:href => team_job_path(@protip.author.team), 'data-action' => 'view team jobs', 'data-from' => 'job on protip (team name)', 'data-properties' => {"author's team" => authors_team}.to_json} - = @protip.user.team.name - ==– want to join them as a - = succeed "?" do - %a.position.track{:href => team_job_path(@protip.user.team), 'data-action' => 'view team jobs', 'data-from' => 'job on protip (job title)', 'data-properties' => {"author's team" => authors_team}.to_json} - =@job.title - - else - - adjective = ["is amazing", "is awesome", "has a great engineering team"].sample - Calling all - == #{@job.title.pluralize}. - %a.team.track{:href => team_job_path(@job.team), 'data-action' => 'view team jobs', 'data-from' => 'job on protip (team name)', 'data-properties' => {"author's team" => authors_team, 'adjective' => adjective}.to_json} - = @job.team.name - = adjective - and is - %a.position.track{:href => team_job_path(@job.team), 'data-action' => 'view team jobs', 'data-from' => 'job on protip (hiring)', 'data-properties' => {"author's team" => authors_team, 'adjective' => adjective}.to_json} - hiring - - -if !@next_protip.nil? - -next_protip = Protip::SearchWrapper.new(@next_protip) - - %a.main-link.track{:href => protip_or_link_path(next_protip), 'data-action' => 'next protip', 'data-from' => 'protip', 'data-properties' => {'mobile' => false}.to_json} - %article.next-tip{:class => dom_class(next_protip), :id => next_protip.public_id} - - %section.comments - %h2.comments-header Comments - %ul.comment-list - = render @comments - - = render 'comments/add_comment' - - - - if !next_protip.nil? and mobile_device? - %a.next-tip-mob.track{:href => protip_or_link_path(next_protip), 'data-action' => 'next protip', 'data-from' => 'protip', 'data-properties' => {'mobile' => true}.to_json} - Next pro tip - --else - #x-active-preview-pane - -if !signed_in? - .side-conversion-alert.hide - %p Where developers come to connect, share, build and be inspired. - %a.convert-signup.track{:href => '/', 'data-action' => 'view homepage', 'data-from' => 'convert button on protip'} Join Coderwall - =render :partial => 'cacheable_protip', :locals => {:protip => @protip, :mode => 'fullpage', :include_comments => true, :job => @job} +- meta title: "#{ @protip.user.display_name } : #{ sanitize(@protip.title) }" +- meta description: protip_summary +- meta og: { description: protip_summary } +- meta og: { image: users_image_path(@protip.user) } + +- if ENV['ENABLE_TWITTER_CARDS'] + - meta twitter: { card: 'summary' } + - meta twitter: { site: '@coderwall' } + - meta twitter: { title: sanitize(@protip.title) } + - meta twitter: { url: protip_url(@protip) } + - meta twitter: { description: protip_summary } + - meta twitter: { image: @protip.featured_image } + - meta twitter: { creator: { id: @protip.author.twitter_id } } + += content_for :head do + %link{ rel: 'canonical', href: protip_path(@protip) } + %meta{ name: 'viewport', content: 'width=device-width,initial-scale=1.0,maximum-scale=1.0' } + +- content_for :mixpanel do + = record_event('viewed protip', featured: @protip.featured, distinction: @protip.best_stat[0]) + +#x-active-preview-pane + - unless signed_in? + .side-conversion-alert.hide + %p Where developers come to connect, share, build and be inspired. + %a.convert-signup.track{ href: '/', 'data-action' => 'view homepage', 'data-from' => 'convert button on protip' } Join Coderwall + = render partial: 'cacheable_protip', locals: { protip: @protip, mode: 'fullpage', include_comments: true, job: @job } diff --git a/app/views/protips/show.js.erb b/app/views/protips/show.js.erb deleted file mode 100644 index a91d3504..00000000 --- a/app/views/protips/show.js.erb +++ /dev/null @@ -1,6 +0,0 @@ -$('#x-active-preview-pane').append('<%= escape_javascript(render :partial => 'cacheable_protip', :locals => {:protip => @protip, :mode => (@mode || params[:mode]), :include_comments => true, :job => @job}) %> '); -$('.dark-screen').height($('#x-active-preview-pane').height()); -registerProtipClickOff(); -protipGrid.markFollowings(); -window.initializeProtip(); -hljs.highlightBlock($('#x-active-preview-pane')[0]) \ No newline at end of file diff --git a/app/views/protips/topic.html.haml b/app/views/protips/topic.html.haml index f1a66747..6ae5da79 100644 --- a/app/views/protips/topic.html.haml +++ b/app/views/protips/topic.html.haml @@ -1,33 +1,25 @@ --#-content_for :javascript do --# -if @topic_user --# %script="logUsage('viewed', 'users protips');" --# -else --# %script="logUsage('viewed', 'topics protips');" - -= render :partial => "head", :locals => {:topic => @topic} += render(partial: 'head', locals: { topic: @topic }) .secondary-notice %p - -if @topic_user - -if @topic_user && signed_in? && @topic_user == current_user + - if @topic_user + - if @topic_user && signed_in? && @topic_user == current_user These are your links, code snippets, posts and other pro tips you have created or upvoted. Have a quick pro tip to - =link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'own protips page') + = link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'own protips page') or - =link_to('learn more', faq_path, :class => 'track', 'data-action' => 'view faq', 'data-from' => 'own protips page') + = link_to('learn more', faq_path, class: 'track', 'data-action' => 'view faq', 'data-from' => 'own protips page') - if @topic_user.protips.reject(&:created_automagically?).count == 0 %br Pro tips you currently see here are created automagically from repos you follow/consider useful or slideshares you've created - -else - ==These are the links, code snippets, posts, and other pro tips #{@topic_user.display_name} has created. Have your own to - =link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'user protips page') + - else + == These are the links, code snippets, posts, and other pro tips #{@topic_user.display_name} has created. Have your own to + = link_to('share?', new_protip_path, 'data-action' => 'create protip', 'data-from' => 'user protips page') or - =link_to('learn more', faq_path, :class => 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') - -elsif signed_in? - %p - =link_to('Share', new_protip_path(:topics => @topic), 'data-action' => 'create protip', 'data-from' => 'user protips page') + " a link, code snippet, post or other pro tip about #{@topic}" - -else - =link_to('Sign in', signup_path) - ==to start sharing your #{@topic} pro tips or - =link_to('learn more', faq_path, :class => 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') + = link_to('learn more', faq_path, class: 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') + - elsif signed_in? + %p= link_to('Share', new_protip_path(topics: @topic), 'data-action' => 'create protip', 'data-from' => 'user protips page') + " a link, code snippet, post or other pro tip about #{@topic}" + - else + = link_to('Sign in', root_path) + == to start sharing your #{@topic} pro tips or + = link_to('learn more', faq_path, class: 'track', 'data-action' => 'view faq', 'data-from' => 'user protips page') -#browse-results - = render :partial => "grid", :locals => {:protips => (@protips.results if @protips.respond_to?(:results)) || @protips.try(:all), :collection => @protips, :url => :tagged_protips_path, :hide_more => false, :mode => 'popup'} +#browse-results= render(partial: 'grid', locals: { protips: protip_search_results_to_render(@protips), collection: @protips, url: :tagged_protips_path, hide_more: false, mode: 'popup' }) diff --git a/app/views/protips/topic.js.erb b/app/views/protips/topic.js.erb index d0e9db6b..ff5fa75b 100644 --- a/app/views/protips/topic.js.erb +++ b/app/views/protips/topic.js.erb @@ -1 +1 @@ -<%= render :partial => 'search_response', :locals => {:append_to => '#browse-results'} %> \ No newline at end of file +<%= render partial: 'search_response', locals: {append_to: '#browse-results'} %> diff --git a/app/views/protips/trending.html.haml b/app/views/protips/trending.html.haml index 0320dc3a..c98e5619 100644 --- a/app/views/protips/trending.html.haml +++ b/app/views/protips/trending.html.haml @@ -1,10 +1,7 @@ --#-content_for :javascript do --# %script="logUsage('viewed', 'protip topics');" - -= render :partial => "head", :locals => {:topic => []} += render partial: 'head', locals: {topic: []} %section.trending-topics %header.cf %h2 Trending Topics - %a.protip-more{:href => trending_topics_protips_path} More topics + %a.protip-more{href: trending_topics_protips_path} More topics - = render :partial => "trending_topics", :locals => {:count => 12} \ No newline at end of file + = render partial: 'trending_topics', locals: {count: 12} diff --git a/app/views/redemptions/show.html.haml b/app/views/redemptions/show.html.haml deleted file mode 100644 index dfc6e8ef..00000000 --- a/app/views/redemptions/show.html.haml +++ /dev/null @@ -1,8 +0,0 @@ --content_for :mixpanel do - =record_view_event('redemption page') - -#invitations - %h1==You have earned the #{@redemption.badge.display_name} badge - %p Before you can accept the achievement you need to create a coderwall account or sign in. - =link_to('Sign Up', signup_path, :class => 'button') - =link_to('Sign In', signin_path, :id => 'signin') \ No newline at end of file diff --git a/app/views/search/_teams.haml b/app/views/search/_teams.haml deleted file mode 100644 index c512221f..00000000 --- a/app/views/search/_teams.haml +++ /dev/null @@ -1,31 +0,0 @@ -=content_for :javascript do - =javascript_include_tag 'https://www.google.com/jsapi' - =javascript_include_tag 'vendor/underscore' - =javascript_include_tag 'search' -.navbar.span10 - .navbar-inner - .container - %a.brand{:href => "#"} - =image_tag 'icon.png' - Coderwall - %h5.subscript Teams - #worldmap.span2 - =image_tag 'world-map-small.png' - %ul.nav.country-nav - %li.dropdown - %a.dropdown-toggle{ 'data-toggle' => "dropdown"} - Countries - %b.caret - %ul.dropdown-menu - - cache('most_active_countries') do - - Team.most_active_countries.each_with_index do |country, rank| - %li.country-choice.span3 - = link_to "##{country.name}", :class => "country-link", 'data-code' => "#{country.code}", 'data-rank' => "#{rank+1}" do - .country-name=country.name - .country-flag - .flag{:class => "flag-#{country.code.downcase}"} - =form_for :search, :html => {:class => "navbar-search pull-right span5"}, :remote => true do |f| - .input-prepend.span5 - =image_tag 'team-avatar.png', :class => "search-icon" - =f.text_field :q, :class => "search-query", 'placeholder' => "Search All Teams", :id => "teams-search" - diff --git a/app/views/sessions/_join_buttons.html.haml b/app/views/sessions/_join_buttons.html.haml deleted file mode 100644 index 59d33a8f..00000000 --- a/app/views/sessions/_join_buttons.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -.join-panel.cf - - unless !defined?(message) || message.nil? - %p.join - = message - %ul.sign-btns - %li - %a.btn.twitter{:href => link_twitter_path, :rel => "nofollow"} - Twitter - %li - %a.btn.github{:href => link_github_path, :rel => "nofollow"} - Github - %li - %a.btn.linkedin{:href => link_linkedin_path, :rel => "nofollow"} - Linkedin \ No newline at end of file diff --git a/app/views/sessions/_join_buttons.html.slim b/app/views/sessions/_join_buttons.html.slim new file mode 100644 index 00000000..3a39c04b --- /dev/null +++ b/app/views/sessions/_join_buttons.html.slim @@ -0,0 +1,17 @@ +.join-panel.cf + - unless !defined?(message) || message.nil? + p.join + = message + ul.sign-btns + li + = link_to link_twitter_path, rel: 'nofollow', class: 'btn' + i.fa.fa-twitter + | Twitter + li + = link_to link_github_path, rel: 'nofollow', class: 'btn' + i.fa.fa-github + | Github + li + = link_to link_linkedin_path, rel: 'nofollow', class: 'btn' + i.fa.fa-linkedin + | Linkedin \ No newline at end of file diff --git a/app/views/sessions/_signin.html.haml b/app/views/sessions/_signin.html.haml index 35883309..ee416640 100644 --- a/app/views/sessions/_signin.html.haml +++ b/app/views/sessions/_signin.html.haml @@ -21,6 +21,3 @@ %a{href: link_developer_path, rel: 'nofollow'} Sign in via local developer strategy (doesn't require an external account). -%p.sign-up-terms - Need an account? - =link_to('Join coderwall', signup_path) + "." diff --git a/app/views/sessions/_signin_old.html.haml b/app/views/sessions/_signin_old.html.haml deleted file mode 100644 index 5bb0d309..00000000 --- a/app/views/sessions/_signin_old.html.haml +++ /dev/null @@ -1,22 +0,0 @@ -#accounts - %h4.center - Sign in with your GitHub, Twitter, or LinkedIn account below - = reason + "." - %em (We never post without your permission. blah) - %ul - %li - %a.button{:href => link_github_path} - .signin.github - Sign in via GitHub - %li - %a.button{:href => link_twitter_path} - .signin.twitter - Sign in via Twitter - %li - %a.button{:href => link_linkedin_path} - .signin.linkedin - Sign in via Linkedin - .clear - %p - Need an account? - =link_to('Join coderwall', signup_path) + "." diff --git a/app/views/shared/_analytics.html.erb b/app/views/shared/_analytics.html.erb deleted file mode 100644 index 8c060cc0..00000000 --- a/app/views/shared/_analytics.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -<% if ENABLE_TRACKING %> - <script type="text/javascript"> - - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-797907-8']); - _gaq.push(['_trackPageview']); - - (function () { - var ga = document.createElement('script'); - ga.type = 'text/javascript'; - ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(ga, s); - })(); - - </script> -<% end %> \ No newline at end of file diff --git a/app/views/shared/_assembly_banner.html.erb b/app/views/shared/_assembly_banner.html.erb new file mode 100644 index 00000000..22c1e039 --- /dev/null +++ b/app/views/shared/_assembly_banner.html.erb @@ -0,0 +1,21 @@ +<div class="bg-primary" data-dismissable="announcement" style="display:none"> + <div class="container"> + <div class="row"> + <div class="announcement col-md-12"> + <p class="text-center"> + <a href='https://assembly.com/coderwall?utm_campaign=assemblage&utm_source=coderwall&utm_medium=flair_widget&utm_content=flag'> + <img src='https://d1b1o966bfdaym.cloudfront.net/a7b405350025be8ab1ebeb53f8bd98a5.svg' class="asm-brand" /> + </a> + See what we’re up to on + <a href="https://assembly.com/coderwall?utm_campaign=coderwall&utm_source=coderwall&utm_medium=text_link" target="_blank"> Coderwall’s Changelog </a> + and give us some feedback + <a class="js-dismiss close" href="#close">x</a> + </p> + </div> + </div> + </div> +</div> + +<% content_for :javascript do %> + <%= javascript_include_tag 'dismissable' %> +<% end %> diff --git a/app/views/shared/_error_messages.html.haml b/app/views/shared/_error_messages.html.haml index db249d41..f1c6a4d2 100644 --- a/app/views/shared/_error_messages.html.haml +++ b/app/views/shared/_error_messages.html.haml @@ -1,6 +1,7 @@ -if target.errors.any? .errors - %h4==#{pluralize(target.errors.count, "error")} prohibited this user from being saved: + %h4 + = "#{pluralize(target.errors.count, "error")} prohibited this #{target.class.model_name.human.downcase} from being saved:" %ul -target.errors.full_messages.each do |message| %li=raw message diff --git a/app/views/shared/_footer.html.haml b/app/views/shared/_footer.html.haml deleted file mode 100644 index a1b3fdf2..00000000 --- a/app/views/shared/_footer.html.haml +++ /dev/null @@ -1,35 +0,0 @@ -%footer#footer - .inside-footer.cf - #tweetbtn - :erb - <a href="https://twitter.com/coderwall" class="twitter-follow-button" data-show-count="false" data-width="300">Follow @coderwall</a> - <script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script> - %nav#footer-nav - %ul.footer-links.cf - %li= link_to('Contact', contact_us_path) - %li= link_to('Blog', blog_path) - %li= link_to('API & Hacks', api_path) - %li= link_to('FAQ', faq_path) - %li= link_to('Privacy Policy', privacy_policy_path) - %li= link_to('Terms of Service', tos_path) - %li= link_to('Jobs', '/jobs') - %li.employers= link_to('Employers', employers_path) - =yield :footer_menu - - %ul.copyright - %li Copyright © 2014 Assembly Made, Inc. All rights reserved. - %ul.credits - %li= yield :credits - %ul.mixpanel - %li - :erb - <a href="https://mixpanel.com/f/partner"><img src="https://mixpanel.com/site_media/images/partner/badge_light.png" alt="Real Time Web Analytics" /></a> -=javascript_include_tag 'jquery' -=javascript_include_tag 'application' -=render :partial => 'shared/mixpanel_properties' -=yield :javascript -:erb - <!--[if lt IE 9]> - <%= javascript_include_tag('html5shiv.js') %> - <![endif]--> --#=render :partial => 'shared/olark' diff --git a/app/views/shared/_mixpanel.html.erb b/app/views/shared/_mixpanel.html.erb deleted file mode 100644 index c49a1fba..00000000 --- a/app/views/shared/_mixpanel.html.erb +++ /dev/null @@ -1,63 +0,0 @@ -<% if ENABLE_TRACKING %> - - <!-- start Petametrics --> - <script type="text/javascript">(function(w,d,s,p,v,e,r) { - w['$petametrics_var']=v;w[v]=w[v]||function(){ - (w[v].q=w[v].q||[]).push(arguments)}; - w[v].l=1*new Date();e=d.createElement(s),r=d.getElementsByTagName(s)[0]; - e.async=1;e.src=p; - r.parentNode.insertBefore(e,r)}) - (window,document,'script','//cdn.petametrics.com/p.js','$p'); - - $p("init", "cd8014kif8htt6tt"); - $p("send", "pageview"); - </script> - - <!-- start Mixpanel --> - <script type="text/javascript">(function (e, b) { - if (!b.__SV) { - var a, f, i, g; - window.mixpanel = b; - a = e.createElement("script"); - a.type = "text/javascript"; - a.async = !0; - a.src = ("https:" === e.location.protocol ? "https:" : "http:") + '//cdn.mxpnl.com/libs/mixpanel-2.2.min.js'; - f = e.getElementsByTagName("script")[0]; - f.parentNode.insertBefore(a, f); - b._i = []; - b.init = function (a, e, d) { - function f(b, h) { - var a = h.split("."); - 2 == a.length && (b = b[a[0]], h = a[1]); - b[h] = function () { - b.push([h].concat(Array.prototype.slice.call(arguments, 0))) - } - } - - var c = b; - "undefined" !== typeof d ? c = b[d] = [] : d = "mixpanel"; - c.people = c.people || []; - c.toString = function (b) { - var a = "mixpanel"; - "mixpanel" !== d && (a += "." + d); - b || (a += " (stub)"); - return a - }; - c.people.toString = function () { - return c.toString(1) + ".people (stub)" - }; - i = "disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.increment".split(" "); - for (g = 0; g < i.length; g++)f(c, i[g]); - b._i.push([a, e, d]) - }; - b.__SV = 1.2 - } - })(document, window.mixpanel || []); - mixpanel.init("<%= ENV['MIXPANEL_TOKEN'] %>", { - 'track_pageview': true, - 'debug': true, - 'verbose': true - }); - </script><!-- end Mixpanel --> - -<% end %> diff --git a/app/views/shared/_notification_bar.html.haml b/app/views/shared/_notification_bar.html.haml new file mode 100644 index 00000000..d442590c --- /dev/null +++ b/app/views/shared/_notification_bar.html.haml @@ -0,0 +1,7 @@ +#main-content + .notification-bar.hidden + .notification-bar-inside{ class: (flash[:error].blank? ? 'notice' : 'error') } + %p= flash[:notice] || flash[:error] + %a.close-notification{ onclick: "$(this).parent().parent().hide();" } + %span Close + diff --git a/app/views/shared/_pubnub.html.haml b/app/views/shared/_pubnub.html.haml deleted file mode 100644 index e02b7175..00000000 --- a/app/views/shared/_pubnub.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%div{:id => "pubnub", 'sub-key' => ENV['PUBNUB_SUBSCRIBE_KEY'], 'pub-key' => is_admin? ? ENV['PUBNUB_PUBLISH_KEY'] : "deadbeef", :ssl => "on", :origin => "pubsub.pubnub.com"} -%script{:src => "https://pubnub.a.ssl.fastly.net/pubnub-3.3.min.js"} diff --git a/app/views/shared/_schema.org.html.erb b/app/views/shared/_schema.org.html.erb new file mode 100644 index 00000000..83d14287 --- /dev/null +++ b/app/views/shared/_schema.org.html.erb @@ -0,0 +1,14 @@ +<!-- schema.org markup for Google Search integration (https://developers.google.com/webmasters/richsnippets/sitelinkssearch?utm_source=wmc-blog&utm_medium=direct-referral&utm_campaign=sitelinks-searchbox) --> + +<script type="application/ld+json"> +{ + "@context": "http://schema.org", + "@type": "WebSite", + "url": "<%= root_url %>", + "potentialAction": { + "@type": "SearchAction", + "target": "<%= raw search_protips_url(scope: "everything") %>&search={search_term_string}", + "query-input": "required name=search_term_string" + } +} +</script> diff --git a/app/views/subscription/team_upgrade.text.erb b/app/views/subscription/team_upgrade.text.erb deleted file mode 100644 index 9d700510..00000000 --- a/app/views/subscription/team_upgrade.text.erb +++ /dev/null @@ -1,13 +0,0 @@ -Hi! Welcome to Coderwall's premium services for teams. - - -<%= @user.team.name %> has been upgraded to the <%= @plan.name %> plan and is ready to become a great engineering magnet. Start posting your open positions here: <%= new_team_opportunity_url(@user.team) %> - -If you have any questions or concerns, please contact us: support@coderwall.com - - - -Matt & the Coderwall team -P.S. Make sure to follow us on twitter (@coderwall) - -<%= Notifier::SPAM_NOTICE %> \ No newline at end of file diff --git a/app/views/subscription/team_upgrade.html.haml b/app/views/subscription_mailer/team_upgrade.html.haml similarity index 99% rename from app/views/subscription/team_upgrade.html.haml rename to app/views/subscription_mailer/team_upgrade.html.haml index ef0eec34..a3ea5b96 100644 --- a/app/views/subscription/team_upgrade.html.haml +++ b/app/views/subscription_mailer/team_upgrade.html.haml @@ -16,6 +16,3 @@ %p{:style => "font-size: 14px; margin: 0; font-family:'Helvetica Neue','Helvetica','Arial','sans-serif';"} If you have any questions or concerns about your account, please contact us: =mail_to('support@coderwall.com', nil, :style => "color:3D8DCC;") - - - diff --git a/app/views/team_members/_team_member.html.haml b/app/views/team_members/_team_member.html.haml index f4770f10..40a63141 100644 --- a/app/views/team_members/_team_member.html.haml +++ b/app/views/team_members/_team_member.html.haml @@ -1,6 +1,6 @@ %li.team_member =avatar_image_tag(team_member) %h3=team_member.display_name - = form_tag team_team_member_path(@team, team_member), :method => :delete do + = form_tag team_members_path(@team, team_member), :method => :delete do %input.button.cancel.track{:type => "submit", :value => "Remove", 'data-action' => 'leave team', 'data-from' => 'team member remove'} - .clear \ No newline at end of file + .clear diff --git a/app/views/teams/_featured_links.html.haml b/app/views/teams/_featured_links.html.haml deleted file mode 100644 index fc129401..00000000 --- a/app/views/teams/_featured_links.html.haml +++ /dev/null @@ -1,39 +0,0 @@ -%section#featured-links{:class => section_enabled_class(@team.has_featured_links?)} - -if !@team.has_featured_links? - -inactive_box('#featured-links', "Featured Links") do - Interesting links about your team or product. - - -if can_edit? - -panel_form_for_section('#featured-links', "Interesting links about your team or product.") do |f| - %aside - -ideas_list do - %li Press coverage - %li Books or articles your team has published - .form-inputs - %fieldset - =f.label :featured_links_title, 'Title of this section related to what type of links are you featuring' - =f.text_field :featured_links_title - %fieldset - =link_to('Add Link & Photo','#',:class=>'photos-chooser', 'data-fit-w' => 260) - %ul.edit-links - =f.fields_for :featured_links do |fields| - %li - .image - =image_tag(fields.object.photo) - =fields.hidden_field :id - =fields.hidden_field :photo - %ul.fields - %li - =fields.label :url, "URL" - =fields.text_field :url - %li - =fields.label :_destroy, "Remove Link" - =fields.check_box :_destroy - - %header.header - %h2.heading=@team.featured_links_title - .inside - %ul.the-books.cf - -@team.featured_links.each do |link| - %li=link_to(image_tag(link.photo), link.url, :target => :new, :class => "record-exit", 'data-target-type' => 'featured-link') - %footer.footer \ No newline at end of file diff --git a/app/views/teams/_featured_team.html.haml b/app/views/teams/_featured_team.html.haml index fe6f6652..529fadc5 100644 --- a/app/views/teams/_featured_team.html.haml +++ b/app/views/teams/_featured_team.html.haml @@ -15,11 +15,11 @@ -if featured_banner == default_featured_banner and featured_team.admin?(current_user) .overlay-message You need to set a banner image for your team in the edit jobs section .content - -if !featured_team.highlight_tags.blank? + -if featured_team.highlight_tags.present? %ul.tags.cf -featured_team.highlight_tags.split(',').each do |tag| %li=tag.strip - -if !featured_team.active_jobs.blank? + -if featured_team.active_jobs.present? .opportunities %h3 Open opportunities %ul.jobs.cf diff --git a/app/views/teams/_form.html.haml b/app/views/teams/_form.html.haml index f8507f83..1e2ded22 100644 --- a/app/views/teams/_form.html.haml +++ b/app/views/teams/_form.html.haml @@ -7,5 +7,6 @@ = f.text_field :name -if @team.new_record? + = hidden_field_tag('team[show_similar]', true) .save %input.button{ type: 'submit', value: 'Next' } diff --git a/app/views/teams/_jobs.html.haml b/app/views/teams/_jobs.html.haml index b2a97b98..bf451c51 100644 --- a/app/views/teams/_jobs.html.haml +++ b/app/views/teams/_jobs.html.haml @@ -1,5 +1,5 @@ +-job ||= default_job %section.jobs-top#jobs - -@job ||= default_job %article.job-panel{:class => section_enabled_class(@team.has_open_positions?)} -if !@team.has_open_positions? @@ -12,7 +12,7 @@ -admin_hint do Up to the latest four active positions will appear on your team profile. .form-inputs - =hidden_field_tag :job_id, (params[:job_id] || @job.try(:public_id)) + =hidden_field_tag :job_id, (params[:job_id] || job.try(:public_id)) %fieldset =f.label :featured_banner_image, 'Banner photo to appear on featured page' =f.hidden_field :featured_banner_image @@ -43,49 +43,77 @@ - activation = activate_or_deactivate(job) %li.deactivate= link_to '', send("#{activation}_team_opportunity_path",@team, job), :remote => true, :class => job_activation_css(job) - -unless @job.nil? + -unless job.nil? %header.job-panel-header.cf - %h1.job-title=@job.title - - .content.cf - %h4.contract= @job.opportunity_type - %p.job-text= @job.description - %ul.skills.cf - -@job.tags.each do |tag| - %li=tag - %ul.locations.cf - -@job.locations.each do |location| - %li= location + %h1.job-title + = job.title + %h2.job-type + = job.opportunity_type + + .job-details.content.cf + .job-description + = sanitize(job.to_html) + - unless @other_jobs.blank? - .opportunities - %h3==Other opportunities at #{@team.name} + .job-opportunities + %h3 + ==Other opportunities at #{@team.name} %ul.jobs.cf - @other_jobs.each do |opportunity| %li - %a{:href => job_path(:slug => opportunity.team.slug, :job_id => opportunity.public_id), 'data-action' => 'view job', 'data-from' => 'team page', 'data-properties' => {:team => opportunity.team.name, :public_id => opportunity.public_id}.to_json} + %a{href: job_path(slug: opportunity.team.slug, job_id: opportunity.public_id), 'data-action' => 'view job', 'data-from' => 'team page', 'data-properties' => {team: opportunity.team.name, public_id: opportunity.public_id}.to_json} = opportunity.title + .job-sidebar + .job-apply.section + -if job.accepts_applications? + -if signed_in? + =link_to('', '#apply', class: 'track apply record-exit', 'data-opportunity-visit-path' => job_visited(job), 'data-target-type' => 'job-opportunity', 'data-action' => 'view job application', 'data-from' => 'job on team page') + + .apply-section.application.hide + - if already_applied = current_user.already_applied_for?(job) + = link_to '', "#already-applied", class: "track btn send #{application_status_css(job)}" + + - else + - if current_user.has_resume? + %p.status Upload your resume and click send to apply privately + = link_to current_user.resume_url[current_user.resume_url.rindex('/')+1..-1], current_user.resume_url, :target => "_blank" + = link_to 'change', change_resume_path, class: 'change' + + - else + %p.status Upload your resume and click send to apply privately + + - # Find javascript for resume auto upload in premium.js.coffee #registerApplication + = form_tag resume_uploads_url, html: {multipart: true, class: "resume"} do + = file_field_tag :resume, :class => 'track btn upload', 'data-action' => 'upload resume', 'data-from' => 'job application' + = hidden_field_tag :user_id, current_user.id + + - disabled_class = already_applied ? "disabled" : "" + = link_to('', apply_url(job), method: :post, class: " #{disabled_class} track btn send #{application_status_css(job)}", 'data-action' => 'apply for job', 'data-from' => 'job on team page') + + + -else + =link_to('', signin_path(return_to: team_job_path(job.team)), class: 'track apply noauth record-exit', 'data-opportunity-visit-path' => job_visited(job), 'data-target-type' => 'job-opportunity', 'data-action' => 'view job application', 'data-from' => 'job on team page') + - else + =link_to('Learn More', job.link, target: :new, class: 'track record-exit learn-more', 'data-opportunity-visit-path' => job_visited(job), 'data-target-type' => 'job-opportunity', 'data-action' => 'view external job', 'data-from' => 'job on teams page (learn more)') + + + + .job-skills.section + %ul.skills + -job.tags.each do |tag| + %li + =tag + + .job-locations.section + %ul.locations + -job.locations.each do |location| + %li= location + + %footer.job-panel-footer.cf - -if signed_in? && @job.accepts_applications? - .apply-section.application.hide - - if current_user.has_resume? - %p.status Upload your resume and click send to apply privately - = link_to current_user.resume_url[current_user.resume_url.rindex('/')+1..-1], current_user.resume_url, :target => "_blank" - = link_to 'change', change_resume_path, :class => 'change' - - else - %p.status Upload your resume and click send to apply privately - = form_for current_user, :html => {:multipart => true, :class => "resume"}, :remote => true do |u| - =u.file_field :resume, :class => 'track btn upload', 'data-action' => 'upload resume', 'data-from' => 'job application' - =u.hidden_field :auto_upload, :value => true - =link_to('', apply_url(@job), :method => :post, :remote => true, :class => "track btn send #{application_status_css(@job)}", 'data-action' => 'apply for job', 'data-from' => 'job on team page') - -if @job.accepts_applications? - -if signed_in? - =link_to('', '#apply', :class => 'track apply record-exit', 'data-opportunity-visit-path' => job_visited(@job), 'data-target-type' => 'job-opportunity', 'data-action' => 'view job application', 'data-from' => 'job on team page') - -else - =link_to('', signin_path(:return_to => team_job_path(@job.team)), :class => 'track apply noauth record-exit', 'data-opportunity-visit-path' => job_visited(@job), 'data-target-type' => 'job-opportunity', 'data-action' => 'view job application', 'data-from' => 'job on team page') - - else - =link_to('Learn More', @job.link, :target => :new, :class => 'track record-exit learn-more', 'data-opportunity-visit-path' => job_visited(@job), 'data-target-type' => 'job-opportunity', 'data-action' => 'view external job', 'data-from' => 'job on teams page (learn more)') - %a.other-jobs{:href => jobs_path} + %a.other-jobs{href: jobs_path} View other amazing jobs + .learn-more-about %p== Learn more about #{@team.name} diff --git a/app/views/teams/_location_fields.html.haml b/app/views/teams/_location_fields.html.haml new file mode 100644 index 00000000..3cc74b34 --- /dev/null +++ b/app/views/teams/_location_fields.html.haml @@ -0,0 +1,12 @@ +%fieldset + = f.label :name, 'Location Name' + = f.text_field :name +%fieldset + = f.label :description, 'Highlights for this office location' + = f.text_area :description +%fieldset + = f.label :address, 'Full address of this office location' + = f.text_field :address +%fieldset + = f.label :_destroy, "Remove Location" + = f.check_box :_destroy diff --git a/app/views/teams/_locations.html.haml b/app/views/teams/_locations.html.haml index ed431cb2..7fc21163 100644 --- a/app/views/teams/_locations.html.haml +++ b/app/views/teams/_locations.html.haml @@ -1,51 +1,50 @@ %section.location#locations{:class => section_enabled_class(@team.has_locations?)} - -if !@team.has_locations? - -inactive_box('#locations', "Office Locations") do - =nil + - if !@team.has_locations? + - inactive_box('#locations', "Office Locations") do + = nil - -if can_edit? - -panel_form_for_section('#locations', 'Where do you have offices?') do |f| + - if can_edit? + - panel_form_for_section('#locations', 'Where do you have offices?') do |f| %aside - -admin_hint do + - admin_hint do Specify points of interest (e.g. restaurants, bars, public transportation) and other amenities and highlights for each office location .form-inputs %fieldset - .add-map-location=link_to_add_fields('Add new location', f, :team_locations) + .add-map-location= link_to_add_fields('Add new location', f, :locations) -if @team.has_locations? .location-list - =f.fields_for :team_locations do |fields| + = f.fields_for :locations do |fields| .item - =fields.hidden_field :id %fieldset - =fields.label :name, 'Location Name' - =fields.text_field :name + = fields.label :name, 'Location Name' + = fields.text_field :name %fieldset - =fields.label :description, 'Highlights for this office location' - =fields.text_area :description + = fields.label :description, 'Highlights for this office location' + = fields.text_area :description %fieldset - =fields.label :address, 'Full street address of this office location' - =fields.text_field :address + = fields.label :address, 'Full street address of this office location' + = fields.text_field :address %fieldset.remove-location - =fields.label :_destroy, "Remove Location" - =fields.check_box :_destroy + = fields.label :_destroy, "Remove Location" + = fields.check_box :_destroy #location-map .location-details .selected - %h3=@team.primary_address_name - %p.address=@team.primary_address - %p.description=@team.primary_address_description + %h3= @team.primary_address_name + %p.address= @team.primary_address + %p.description= @team.primary_address_description %ul.poi - -@team.primary_points_of_interest.each do |point| - %li=point - -if @team.team_locations.size > 1 + - @team.primary_points_of_interest.each do |point| + %li= point + -if @team.locations.size > 1 %ul.locations.cf - -@team.team_locations.each do |location| + - @team.locations.each do |location| %li.team_location %a.mapLocation{:href => '#position'} - .name=location.name - .address.hide=location.address || location.name - .description.hide=location.description + .name= location.name + .address.hide= location.address || location.name + .description.hide= location.description %ul.poi - -location.points_of_interest.each do |point| - %li=point \ No newline at end of file + - location.points_of_interest.each do |point| + %li= point diff --git a/app/views/teams/_new_relic.html.haml b/app/views/teams/_new_relic.html.haml index 4b3c74d4..e9fec0f1 100644 --- a/app/views/teams/_new_relic.html.haml +++ b/app/views/teams/_new_relic.html.haml @@ -1,6 +1,6 @@ .relic-bar .inside %h1 Level up your wardrobe with this tee! + %a.test-drive.track{:href => 'http://newrelic.com/sp/coderwall?utm_source=CWAL&utm_medium=promotion&utm_content=coderwall&utm_campaign=coderwall&mpc=PM-CWAL-web-Signup-100-coderwall-shirtpromo', 'data-action' => 'go get tee', :target => :new} + Get a free Coderwall tee %p Coderwall helps you level up your skills and New Relic helps you level up your app. Now when you try out New Relic for free, they'll send you this Coderwall tee. - %a.test-drive.track{:href => ' http://newrelic.com/lp/coderwall?utm_source=CWAL&utm_medium=banner_ad&utm_content=site&utm_campaign=coderwall&mpc=BA-CWAL-web-en-100-coderwall-website', 'data-action' => 'go get tee', :target => :new} - Get a free Coderwall tee \ No newline at end of file diff --git a/app/views/teams/_payment.html.haml b/app/views/teams/_payment.html.haml index 8989edc9..33af820d 100644 --- a/app/views/teams/_payment.html.haml +++ b/app/views/teams/_payment.html.haml @@ -1,6 +1,11 @@ .intro - if @team.can_upgrade? %h2.plans-heading Select a plan and enter payment details to get started + - unless flash[:notice].blank? + %span.notice#notice + -flash[:notice].split("\n").each do |notice| + = notice + %br - unless flash[:error].blank? %span.error#error -flash[:error].split("\n").each do |error| diff --git a/app/views/teams/_similar_teams.html.haml b/app/views/teams/_similar_teams.html.haml index 9aaaebb3..db19978d 100644 --- a/app/views/teams/_similar_teams.html.haml +++ b/app/views/teams/_similar_teams.html.haml @@ -7,9 +7,9 @@ .team-avatar =image_tag(team.avatar_url) %h4= link_to team.name, teamname_path(:slug => team.slug), :target => :new - = link_to 'Select', teams_path(Team.new, :slug=> team.slug, :selected => true), :remote => true, :method => :post, :class => "select" + = link_to 'Select', teams_path(:team => { :slug=> team.slug, join_team: true }), :remote => true, :method => :post, :class => "select" -- unless exact_team_exists?(@teams, @team) +- unless exact_team_exists?(@teams, @new_team_name) .just-create-team %h3 None of the above are my team - = link_to "Create team #{@team.name}", teams_path(@team, :team => {:name => @team.name}, :selected => false), :remote => true, :method => :post, :class => "create-team" + = link_to "Create team #{@new_team_name}", teams_path(:team => { :name => @new_team_name }), :remote => true, :method => :post, :class => "create-team" diff --git a/app/views/teams/_team.html.haml b/app/views/teams/_team.html.haml index 537905c5..f591b778 100644 --- a/app/views/teams/_team.html.haml +++ b/app/views/teams/_team.html.haml @@ -1,10 +1,8 @@ --cache ['v7', team.rank, team.score, team.slug, team.avatar_url, team.hiring?] do +-cache ['v7', team.score, team.slug, team.avatar_url, team.hiring?] do %li.cf{:id => dom_id(team)} -if team.hiring? %a.hiring-ribbon{:href => friendly_team_path(team)} %span Join Us - .rank - %h3=team.rank.ordinalize .team %a{:href => friendly_team_path(team) } =image_tag(team.avatar_url, :width => 40, :height => 40) diff --git a/app/views/teams/_team_blog.html.haml b/app/views/teams/_team_blog.html.haml deleted file mode 100644 index 973ecfa8..00000000 --- a/app/views/teams/_team_blog.html.haml +++ /dev/null @@ -1,37 +0,0 @@ - -%section#team-blog{:class => section_enabled_class(@team.has_team_blog?)} - -if !@team.has_team_blog? - -inactive_box('#team-blog', "Team Blog") do - Team Blog RSS Feed - - -if can_edit? - -panel_form_for_section('#team-blog', "Team Blog RSS Feed.") do |f| - %aside - -admin_hint do - URL of your team blog rss/atom feed - .form-inputs - %fieldset - =f.label :blog_feed, 'RSS URL of your team blog' - =f.text_field :blog_feed - - %header - %h2 - From the - = @team.name - blog - -cache ['v2', 'team-blog', @team, @team.has_team_blog?, @team.slug], :expires_in => 1.day do - .inside.cf - -@team.blog_posts.first(2).each_with_index do |entry, index| - %article - .date{:style => "background-color:#{@team.branding_hex_color}"} - %p - =entry.published.try(:day) || (index+1).ordinalize - %span - =entry.published && entry.published.strftime("%b") - %h3 - %a{:href => entry.url, :style => "color:#{@team.branding_hex_color}", :target => :new} - =entry.title - %p - = blog_content(entry) - %a.read-more{:href => entry.url, :style => "background-color:#{@team.branding_hex_color}", :target => :new} - Read more diff --git a/app/views/teams/_team_blog.html.slim b/app/views/teams/_team_blog.html.slim new file mode 100644 index 00000000..e240be38 --- /dev/null +++ b/app/views/teams/_team_blog.html.slim @@ -0,0 +1,45 @@ +section#team-blog class=section_enabled_class(@team.has_team_blog?) + -unless @team.has_team_blog? + .inactive-box + h2 Team Blog Inactive + p Team Blog RSS Feed + = link_to 'Activate', '#team-blog', class: 'activate-editor' + + -if can_edit? + .edit + = link_to('edit', '#team-blog', class: 'launch-editor') + .form.hide.cf + = link_to(' ', '#team-blog', class: 'close-editor circle') + = form_for(@team, remote: true) do |f| + header + h2 Team Blog RSS Feed. + aside + .hint + h3 Pro tip + p URL of your team blog rss/atom feed + .form-inputs + fieldset + =f.label :blog_feed, 'RSS URL of your team blog' + =f.text_field :blog_feed + + = hidden_field_tag(:section_id, '#team-blog') + footer + = f.submit('Save') + = link_to('Close', '#team-blog', class: 'close-editor') + + -cache ['teams', 'blogs', @team], :expires_in => 1.day do + -if @team.blog_posts.any? + header + h2 = "From the #{@team.name} blog" + .inside.cf + -@team.blog_posts.first(2).each_with_index do |entry, index| + article + .date style="background-color:#{@team.branding_hex_color}" + p =entry.published.try(:day) || (index+1).ordinalize + span + =entry.published && entry.published.strftime("%b") + h3 + =link_to entry.title,entry.url , class: '',style: "color:#{@team.branding_hex_color}", target: :new + + p = blog_content(entry) + =link_to 'Read more',entry.url , class: 'read-more',style: "background-color:#{@team.branding_hex_color}", target: :new \ No newline at end of file diff --git a/app/views/teams/_team_location_fields.html.haml b/app/views/teams/_team_location_fields.html.haml deleted file mode 100644 index 1faa0b4f..00000000 --- a/app/views/teams/_team_location_fields.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%fieldset - =f.label :name, 'Location Name' - =f.text_field :name -%fieldset - =f.label :description, 'Highlights for this office location' - =f.text_area :description -%fieldset - =f.label :address, 'Full address of this office location' - =f.text_field :address -%fieldset - =f.label :_destroy, "Remove Location" - =f.check_box :_destroy diff --git a/app/views/teams/_team_members.html.haml b/app/views/teams/_team_members.html.haml index 4013f6bd..c9e081f3 100644 --- a/app/views/teams/_team_members.html.haml +++ b/app/views/teams/_team_members.html.haml @@ -12,26 +12,20 @@ .filler %fieldset %ul.members-admin - -@team.sorted_team_members.each do |member| - %li{:id => dom_id(member)} + - @team.sorted_team_members.each do |member| + %li{ :id => dom_id(member) } %p - =member.display_name + = member.display_name %div %ul %li - =link_to('edit bio', edit_user_path(member), :target => :new) + = link_to('edit bio', edit_user_path(member), :target => :new) %li - =form_tag team_team_member_path(@team, member), :method => :delete, :remote => true do - =submit_tag "Remove", :class => 'leave button', :remote => true, :confirm => 'Are you sure?' + = form_tag team_member_path(@team, member), :method => :delete, :remote => true do + = submit_tag 'Remove', :class => 'leave button', :remote => true, :confirm => 'Are you sure?' - =users_image_tag(member) + = users_image_tag(member) - - - - - / -cache ['v1', 'premium-team-members', @team, @team.size, :expires_in => 5.minutes] do - / Cache issue with this because members may update their profile and this wont be updated %a.arrow.right{:href => '#next'} %span left diff --git a/app/views/teams/_team_nav.html.haml b/app/views/teams/_team_nav.html.haml index f2f465aa..d4b864ea 100644 --- a/app/views/teams/_team_nav.html.haml +++ b/app/views/teams/_team_nav.html.haml @@ -11,12 +11,11 @@ -elsif signed_in? =link_to("Get your team's index score", new_team_path, options) -else - =link_to("Get your team's index score", signup_path, options) + =link_to("Get your team's index score", root_path, options) -%h2.headline Team Leaderboard +%h2.headline Team .barnav %ul - %li=link_to('Coderwall Index',leaderboard_path, :class => top_teams_css_class ) -if signed_in? %li=link_to('Following', followed_teams_path, :class => followed_teams_css_class) .clear diff --git a/app/views/teams/create.js.erb b/app/views/teams/create.js.erb index ae5eac71..3a29041b 100644 --- a/app/views/teams/create.js.erb +++ b/app/views/teams/create.js.erb @@ -1,9 +1,5 @@ -<% if @teams.blank? %> $('section.feature:not(.payment)').hide(); $('section.feature.payment').append('<%= escape_javascript(render :partial => "payment", :locals => {:account => @team.account || @team.build_account, :plan => @team.account.try(:current_plan)}) %>'); $('section.feature.payment').show(); setupPayment(); -<% else %> -$('section.feature .intro .results').html('<%= escape_javascript(render :partial => 'similar_teams') %>'); -$('section.feature:not(.payment)').addClass('find-team'); -<% end %> \ No newline at end of file + diff --git a/app/views/teams/followed.html.haml b/app/views/teams/followed.html.haml index 46468b8e..4b8b8661 100644 --- a/app/views/teams/followed.html.haml +++ b/app/views/teams/followed.html.haml @@ -1,6 +1,4 @@ =render 'teams/team_nav' --if @teams.empty? - %h2#noteams==You're not following any teams but you really should. #{link_to('Follow a few teams that inspire you', leaderboard_path)}. --else +-unless @teams.empty? %ul#teams=render @teams \ No newline at end of file diff --git a/app/views/teams/index.html.haml b/app/views/teams/index.html.haml index 516d4c4e..67e4b520 100644 --- a/app/views/teams/index.html.haml +++ b/app/views/teams/index.html.haml @@ -1,7 +1,3 @@ --content_for :javascript do - -#%script="logUsage('viewed', 'amazing teams');" - =javascript_include_tag 'ember/teams' - -content_for :mixpanel do =record_view_event('teams page') @@ -15,7 +11,6 @@ %input{:type => "submit", :class => "submit", :value => " "} %ul %li=link_to("Hiring", teams_path, :class => featured_teams_css_class) - %li=link_to('Leaderboard', leaderboard_path, :class => leaderboard_css_class) #search-results =link_to(message_to_create_ehanced_team, employers_path, :class => 'feature-signup track', 'data-action' => 'upgrade team', 'data-from' => 'teams page') unless message_to_create_ehanced_team.nil? diff --git a/app/views/teams/leaderboard.html.haml b/app/views/teams/leaderboard.html.haml deleted file mode 100644 index 5734ceed..00000000 --- a/app/views/teams/leaderboard.html.haml +++ /dev/null @@ -1,41 +0,0 @@ --#-content_for :javascript do --# %script="logUsage('viewed', 'leaderboard');" - --content_for :mixpanel do - =record_view_event('leaderboard') - --content_for :page_title do - =teams_leaderboard_title(@teams) - -.second-level-header.cf - %h1 Leaderboard - / %form.network-search{:name => "form"} - / %input{:type => 'text', :placeholder => 'search teams'} - / %input{:type => "submit", :class => "submit", :value => " "} - %ul - %li=link_to('Hiring', teams_path, :class => featured_teams_css_class) - %li=link_to('Leaderboard', leaderboard_path, :class => leaderboard_css_class) - - -%section.leader-board.cf - %header - %ul.leader-board-head.cf - %li.rank - %h2 Rank - %li.team - %h2 Team - %li.members - %h2 Members - %li.score - %h2 Score - %ol.team-list.cf - =render @teams - -if !signed_in? - %li.extended - =link_to 'Sign in to see the Full Leaderboard', signup_path - -.pagination.cf - -unless params[:page].to_i <= 1 - =link_to('Prev', leaderboard_path(:page=>params[:page].to_i - 1), :class => "prev") - -if @teams.size >= 25 - =link_to('Next', leaderboard_path(:page=>params[:page].to_i + 1), :class => "next") diff --git a/app/views/teams/premium.html.haml b/app/views/teams/premium.html.haml deleted file mode 100644 index 37487c31..00000000 --- a/app/views/teams/premium.html.haml +++ /dev/null @@ -1,158 +0,0 @@ --content_for :head do - =stylesheet_link_tag 'premium-teams' - --content_for :javascript do - =javascript_include_tag 'https://maps.google.com/maps/api/js?sensor=true' - =javascript_include_tag 'jquery.scrolldepth.js' - =javascript_include_tag 'premium.js' - =javascript_include_tag 'protips.js' - -if can_edit? - =javascript_include_tag 'https://s3.amazonaws.com/cdn.getchute.com/media-chooser.min.js' - =javascript_include_tag 'premium-admin.js' - --content_for :page_title do - ="Team #{@team.name} : coderwall.com" - -=content_for :head do - %link{:rel => 'canonical', :href => friendly_team_path(@team)} - -=content_for :body_id do - = admin_of_team? ? "prem-team" : "signed-out" - --content_for :mixpanel do - =record_event('viewed team', :name => @team.name, 'own team' => @team.has_member?(current_user), :premium => @team.premium?, :job => @job.try(:title)) - --if can_see_analytics? - %ul.legend - %li.team-visitors - =link_to 'Visitors', visitors_team_path(@team) - -if is_admin? - %li.send-invoice - =link_to 'Send Invoice', send_invoice_team_account_path(@team), :method => :post - -- if admin_of_team? - .admin-bar.cf - .rank - %a{:href => leaderboard_path(:rank => @team.rank)+"#team_#{@team.id.to_s}"} - Rank - %span - = @team.ranked? ? @team.rank : "N/A" - .alert - -unless @team.has_specified_enough_info? - %p Your team profile is incomplete. You need to fill out at least 6 sections before you can post a job - .actions - =mail_to('', 'Invite team members', :body => invite_to_team_message(@team), :subject => "You've been invited to team #{@team.name}", :class => 'edit track', 'data-action' => 'invite team members', 'data-from' => 'team admin bar') - /give a class of 'done' when in edit mode - turns green - -if can_edit? - %a.edit{:href => teamname_path(@team.slug)} - Preview - -else - %a.edit{:href => teamname_edit_path(@team.slug)} - Edit - %a.add-job{:href => add_job_path(@team), :class => add_job_class} - Add job - - - requested_membership = @team.pending_join_requests.map{|user_id| User.find(user_id)}.compact - - unless requested_membership.empty? - .requested-members - %h3 Requested team members - %ul.requested-members-list.cf - - requested_membership.each do |potential_team_member| - %li{:id => "join_#{potential_team_member.id}"} - =link_to(profile_path(potential_team_member.username), :class => "member") do - = users_image_tag(potential_team_member, :title => potential_team_member.display_name) - = potential_team_member.display_name - =link_to 'Approve', approve_join_team_path(@team, potential_team_member.id), :method => :post, :remote => true, :class => "action accept" - =link_to 'Deny', deny_join_team_path(@team, potential_team_member.id), :method => :post, :remote => true, :class => "action deny" - --if @team.has_open_positions? || can_edit? - =render :partial => 'jobs' - -.page - #record-exit-path{'data-record-path' => record_exit_team_path(@team)} - #furthest-scrolled{'data-section' => nil, 'data-time-spent' => 0} - - %header.team-header.cf{:style => "background-color:#{@team.branding_hex_color}"} - .team-logo=image_tag(@team.avatar_url, :width => '104', :height => '104', :class => 'team-page-avatar') - %h1=@team.name - =follow_team_link(@team) - - %ul.connections.cf - -unless @team.website.blank? - %li=link_to('', @team.website, :class => 'url record-exit', :target => :new, 'data-target-type' => 'company-website', :alt => @team.website.to_s.gsub('http://', '')) - -unless @team.twitter.blank? - %li=link_to('', "https://twitter.com/#{@team.twitter}", :class => 'twitter record-exit', :target => :new, 'data-target-type' => 'company-twitter', :alt => 'On Twitter') - -unless @team.facebook.blank? - %li=link_to('', "https://www.facebook.com/#{@team.facebook}", :class => 'facebook record-exit', :target => :new, 'data-target-type' => 'company-facebook', :alt => 'On Facebook') - -unless @team.github.blank? - %li=link_to('', "https://github.com/#{@team.github}", :class => 'github record-exit', :target => :new, 'data-target-type' => 'company-github', :alt => 'On GitHub') - - -if @team.has_open_positions? - .join-us-banner - %p - %span - =hiring_tagline_or_default(@team) - =link_to('View jobs', '#jobs', :class => 'view-jobs') - - =render :partial => 'team_details' - =render :partial => 'team_members' - %section#about-members.single-member.about-members.cf - - first_member = @team.sorted_team_members.first - - unless first_member.nil? - =render :partial => 'member_expanded', object: first_member, :locals => {:show_avatar => (@team.sorted_team_members.count == 1)} - - -cache ['v1', 'team-top-sections', @team, can_edit?] do - - -if @team.has_big_headline? || can_edit? - =render :partial => 'big_headline' - - -if @team.has_big_quote? || can_edit? - =render :partial => 'big_quote' - - -unless @team.youtube_url.blank? - %section#video - %iframe{:width => '100%', :height => '600px', :src => @team.video_url, :frameborder => "0", :allowfullscreen=>true} - - -if @team.has_challenges? || can_edit? - =render :partial => 'challenges' - - -if @team.has_favourite_benefits? || can_edit? - =render :partial => 'favourite_benefits' - - -if @team.has_organization_style? || can_edit? - =render :partial => 'organization_style' - - -if @team.has_office_images? || can_edit? - =render :partial => 'office_images' - - -if @team.has_stack? || can_edit? - =render :partial => 'stack' - - - / -cache ['v1', 'team-bottom-sections', @team, can_edit?] do - -if @team.has_why_work? || can_edit? - =render :partial => 'why_work' - - -if @team.has_interview_steps? || can_edit? - =render :partial => 'interview_steps' - - -if @team.has_team_blog? || can_edit? - =render :partial => 'team_blog' - - -if @team.has_locations? || can_edit? - =render :partial => 'locations' - - -if @team.has_featured_links? #|| can_edit? - =render :partial => 'featured_links' - - / -if @team.has_upcoming_events? || can_edit? - / =render :partial => 'meet_us' - - -if @team.has_protips? - =render :partial => 'protips' - - - %footer.page-footer - %p.watermark=@team.name - -#dimmer diff --git a/app/views/teams/premium.html.slim b/app/views/teams/premium.html.slim new file mode 100644 index 00000000..ecb91b26 --- /dev/null +++ b/app/views/teams/premium.html.slim @@ -0,0 +1,153 @@ +- if ENV['ENABLE_TWITTER_CARDS'] + - meta twitter: {card: "summary"} + - meta twitter: {site: "@coderwall"} + - meta twitter: {image: @team.avatar_url} + - meta twitter: {creator: {id: @team.twitter}} + - if @job_page + - meta twitter: {title: sanitize(@job.title)} + - meta twitter: {url: job_path(@team, @job.public_id)} + - meta twitter: {description: @job.description} + - else + - meta twitter: {title: sanitize(@team.name)} + - meta twitter: {url: teamname_path(@team.slug)} + - meta twitter: {description: @team.about} + +-content_for :head do + =stylesheet_link_tag 'premium-teams' + +-content_for :javascript do + =javascript_include_tag 'https://maps.google.com/maps/api/js?sensor=true' + =javascript_include_tag 'jquery.scrolldepth.js' + =javascript_include_tag 'premium.js' + =javascript_include_tag 'protips.js' + -if can_edit? + =javascript_include_tag '//s3.amazonaws.com/cdn.getchute.com/media-chooser.min.js' + =javascript_include_tag 'premium-admin.js' + +-content_for :page_title do + ="Team #{@team.name} : coderwall.com" + +=content_for :head do + link rel='canonical' href=friendly_team_path(@team) + +=content_for :body_id do + = admin_of_team? ? "prem-team" : "signed-out" + +-content_for :mixpanel do + = record_event('viewed team', :name => @team.name, 'own team' => @team.has_member?(current_user), :premium => @team.premium?, :job => @job.try(:title)) + + +- if ENV['NEW_RELIC_PROMOTION'] + - if @team.slug == 'new-relic' + = render(partial: 'new_relic') + +-if can_see_analytics? + ul.legend + li.team-visitors + =link_to 'Visitors', visitors_team_path(@team) + -if is_admin? && @team.account + li.send-invoice + =link_to 'Send Invoice', send_invoice_team_account_path(@team), :method => :post + +- if admin_of_team? + .admin-bar.cf + .alert + -unless @team.has_specified_enough_info? + p Your team profile is incomplete. You need to fill out at least 6 sections before you can post a job + .actions + =mail_to('', 'Invite team members', :body => invite_to_team_message(@team), :subject => "You've been invited to team #{@team.name}", :class => 'edit track', 'data-action' => 'invite team members', 'data-from' => 'team admin bar') + /!give a class of 'done' when in edit mode - turns green + -if can_edit? + =link_to 'Preview',teamname_path(@team.slug) , class: 'edit' + -else + =link_to 'Edit', teamname_edit_path(@team.slug), class: 'edit' + =link_to 'Add job',add_job_path(@team) , class: 'add-job ',class:add_job_class + + - requested_membership = @team.pending_join_requests.map{|user_id| User.find(user_id)}.compact + - unless requested_membership.empty? + .requested-members + h3 Requested team members + ul.requested-members-list.cf + - requested_membership.each do |potential_team_member| + li id="join_#{potential_team_member.id}" + =link_to(profile_path(potential_team_member.username), :class => "member") do + = users_image_tag(potential_team_member, :title => potential_team_member.display_name) + = potential_team_member.display_name + =link_to 'Approve', approve_join_team_path(@team, potential_team_member.id), :method => :post, :remote => true, :class => "action accept" + =link_to 'Deny', deny_join_team_path(@team, potential_team_member.id), :method => :post, :remote => true, :class => "action deny" + +-if @team.has_open_positions? || can_edit? + =render partial: "/teams/jobs", locals: {job: @job} + +.page + #record-exit-path data-record-path= record_exit_team_path(@team) + #furthest-scrolled data-section=nil data-time-spent=0 + + header.team-header.cf style="background-color:#{@team.branding_hex_color}" + .team-logo=image_tag(@team.avatar_url, :width => '104', :height => '104', :class => 'team-page-avatar') + h1=@team.name + = follow_team_link(@team) + + = team_connections_links(@team) + + -if @team.has_open_positions? + .join-us-banner + p + span + =hiring_tagline_or_default(@team) + =link_to('View jobs', '#jobs', :class => 'view-jobs') + + =render 'team_details' + =render 'team_members' + section#about-members.single-member.about-members.cf + - first_member = @team.sorted_team_members.first + - unless first_member.nil? + =render :partial => 'member_expanded', object: first_member, :locals => {:show_avatar => (@team.sorted_team_members.count == 1)} + + -cache ['v1', 'team-top-sections', @team, can_edit?] do + + -if @team.has_big_headline? || can_edit? + =render 'big_headline' + + -if @team.has_big_quote? || can_edit? + =render 'big_quote' + + -unless @team.youtube_url.blank? + section#video + iframe width='100%' height='600px' src=@team.video_url frameborder="0" allowfullscreen=true + + -if @team.has_challenges? || can_edit? + =render 'challenges' + + -if @team.has_favourite_benefits? || can_edit? + =render 'favourite_benefits' + + -if @team.has_organization_style? || can_edit? + =render 'organization_style' + + -if @team.has_office_images? || can_edit? + =render 'office_images' + + -if @team.has_stack? || can_edit? + =render 'stack' + + -if @team.has_why_work? || can_edit? + =render 'why_work' + + -if @team.has_interview_steps? || can_edit? + =render 'interview_steps' + + -if @team.has_team_blog? || can_edit? + =render 'team_blog' + + -if @team.has_locations? || can_edit? + =render 'locations' + + -if @team.has_protips? + =render 'protips' + + + footer.page-footer + p.watermark=@team.name + +#dimmer diff --git a/app/views/teams/show.html.haml b/app/views/teams/show.html.haml index 9779fa31..f2fd7795 100644 --- a/app/views/teams/show.html.haml +++ b/app/views/teams/show.html.haml @@ -31,7 +31,7 @@ %li =link_to('Edit Team', edit_team_path(@team), :class => 'edit') %li - =form_tag team_team_member_path(@team, current_user), :method => :delete do + =form_tag team_members_path(@team, current_user), :method => :delete do %input.button.cancel.track{:type => "submit", :value => "Leave Team", :class => 'leave'} =follow_team_link(@team) @@ -51,7 +51,7 @@ %li %a.team-url{:href => '#team-top'} =@team.name - %li=link_to(pluralize(@team.team_members.size, 'Members'), '#team-members', :class => 'team-members') + %li=link_to(pluralize(@team.members.size, 'Members'), '#team-members', :class => 'team-members') -if display_protips? %li=link_to(pluralize(@team_protips.total, 'Protips'), '#team-activity', :class => 'team-activity') %li @@ -90,27 +90,6 @@ %span=@team.followers.count Followers - %ul#leaderboard - -if show_team_score? - -unless @team.next_highest_competitors.empty? - -@team.next_highest_competitors.each do |competitor| - %li.higher - %a.track{:href=>teamname_url(:slug => competitor.slug), 'data-category'=>'team clicked', 'data-action'=>'competitor'} - =image_tag(competitor.avatar_url) - =competitor.name - %span=competitor.rank.ordinalize - %li.thisteam - %a.track{:href => team_path(@team), 'data-category' => 'team clicked', 'data-action' => 'competitor'} - =image_tag(@team.avatar_url) - -unless @team.next_lowest_competitors.empty? - -@team.next_lowest_competitors.each do |competitor| - %li.lower - %a.track{:href=>teamname_url(:slug => competitor.slug), 'data-category'=>'team clicked','data-action'=>'competitor'} - =image_tag(competitor.avatar_url) - =competitor.name - %span=competitor.rank.ordinalize - -elsif viewing_my_team? - %li.pending-team-score Teams with 3 or more members will receive a coderwall score. The score is calculated once a week. -cache ['v2', @team, @team_protips.total, 'team-protips', viewing_my_team?] do -if display_protips? @@ -169,13 +148,4 @@ .add-members-header %h3 Invite team members %h4 Email this link to your colleagues so they can join this team - =mail_to('', invite_to_team_url, :body => invite_to_team_url, :subject => "You've been invited to team #{@team.name}", :class => 'join-link') - -elsif viewing_my_team_while_unauthenticated? - #add-to-team.hide - .add-members-header - %h3 Add team members - %h4 Sign in to get an invite link to send to your colleagues - =link_to("Sign In", signin_path, :class => 'join-link record-exit', 'data-target-type' => 'signin') - --#-if signed_in? && current_user.try(:team) == @team --# =mail_to('teams@coderwall.com', "Is #{current_user.team.name} awesome and hiring? Upgrade to the new enhanced team profile now.", :subject => "Create an enhanced team profile on Coderwall", :body => "Company Name: #{current_user.try(:team).try(:name)}", :class => 'feature-signup track', 'data-action' => 'upgrade-from-my-team-page') + =mail_to('', invite_to_team_url, :body => invite_to_team_url, :subject => "You've been invited to team #{@team.name}", :class => 'join-link') \ No newline at end of file diff --git a/app/views/teams/similar_teams.js.erb b/app/views/teams/similar_teams.js.erb new file mode 100644 index 00000000..76b952ab --- /dev/null +++ b/app/views/teams/similar_teams.js.erb @@ -0,0 +1,2 @@ +$('section.feature .intro .results').html('<%= escape_javascript(render :partial => 'similar_teams') %>'); +$('section.feature:not(.payment)').addClass('find-team'); diff --git a/app/views/teams/upgrade.html.haml b/app/views/teams/upgrade.html.haml index 7e59b11a..e1c89056 100644 --- a/app/views/teams/upgrade.html.haml +++ b/app/views/teams/upgrade.html.haml @@ -11,8 +11,8 @@ -content_for :javascript do =javascript_include_tag "https://checkout.stripe.com/v2/checkout.js" =javascript_include_tag 'accounts' - =javascript_include_tag "jquery.effects.core.js" - =javascript_include_tag "jquery.effects.slide.js" + =javascript_include_tag 'jquery.effects.core' + =javascript_include_tag 'jquery.effects.slide' .main-content %section.wrapper @@ -25,28 +25,22 @@ %section.title#learnmore %h1 A simple & engaging way to turn your organizations’ best qualities into an engineer magnet - -if no_account_no_team? - %section.feature.cf - .intro - %h2 Signin to create your team - .signup-buttons - =render 'sessions/signup' - -elsif member_no_team? + - if member_no_team? %section.feature.cf .intro =render 'form' .results %section.feature.payment.cf.hide - -elsif @team.can_post_job? + - elsif @team.can_post_job? %section.feature.cf .intro = form_tag new_team_opportunity_path(@team), :method => :get do #post-a-job .save %input.button{:type => "submit", :value => "Post A Job"} - -else + - else %section.feature.payment.cf - =render :partial => "payment", :locals => {:account => @team.account || current_user.team.build_account, :plan => @team.account.try(:current_plan)} + = render partial: "payment", locals: { account: @team.account || @team.build_account, plan: @team.account.try(:current_plan) } diff --git a/app/views/users/_add_skill.html.haml b/app/views/users/_add_skill.html.haml deleted file mode 100644 index 7a1b1875..00000000 --- a/app/views/users/_add_skill.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -#add-skill.skill-input.hide - =form_for [@user, Skill.new] do |f| - %h3 Skill - =f.text_field :name, :placeholder => "skills separated by comma" - =f.submit 'Save' \ No newline at end of file diff --git a/app/views/users/_add_skill.html.slim b/app/views/users/_add_skill.html.slim new file mode 100644 index 00000000..4e67db27 --- /dev/null +++ b/app/views/users/_add_skill.html.slim @@ -0,0 +1,5 @@ +#add-skill.skill-input.hide + =form_for [@user, Skill.new] do |f| + h3 Skill + =f.text_field :name, :placeholder => "skills separated by comma" + =f.submit 'Save' diff --git a/app/views/users/_edit.html.slim b/app/views/users/_edit.html.slim new file mode 100644 index 00000000..f2b5d9ae --- /dev/null +++ b/app/views/users/_edit.html.slim @@ -0,0 +1,33 @@ +.row + .col.s12 + ul.tabs.grey.lighten-4 + li.tab + =link_to('Summary', '#summary-tab', class: 'filternav active') + li.tab + =link_to('Profile', '#basic-tab', class: 'filternav your-profile') + -if @user.membership.present? + li.tab + = link_to('Teams', '#team-tab', class: 'filternav team-prefs') + li.tab + = link_to('Social links', '#social-tab', class: 'filternav social-bookmarks') + li.tab + = link_to('Jobs', '#jobs-tab', class: 'filternav personalize') + li.tab + = link_to('Email', '#email-tab', class: 'filternav email-prefs') + .tab_content.grey.lighten-4 + #summary-tab.col.s12 + =render 'users/edit/summary', user: @user + #basic-tab.col.s12 + =render 'users/edit/basic', user: @user + -if @user.membership.present? + #team-tab.col.s12.team_section + =render 'users/edit/teams', user: @user,team: current_user.membership.team + #social-tab.col.s12 + =render 'users/edit/social', user: @user + #jobs-tab.col.s12 + =render 'users/edit/jobs', user: @user + #email-tab.col.s12 + =render 'users/edit/email', user: @user + .clearboth + + diff --git a/app/views/users/_link_accounts.haml b/app/views/users/_link_accounts.haml deleted file mode 100644 index e8deeee3..00000000 --- a/app/views/users/_link_accounts.haml +++ /dev/null @@ -1,27 +0,0 @@ -%ul.linked-accounts - %li - .linkaccount Github - -if @user.github.blank? - =link_to('Link Account', link_github_path, :class => "button") - -else - .linked=@user.github - =link_to('Unlink account', unlink_github_path, :method => :post, :class => "unlink") if current_user.can_unlink_provider?(:github) - .join-badge-orgs - =form.check_box :join_badge_orgs - =form.label :join_badge_orgs do - ==Join #{link_to 'Coderwall Badge Orgs', faq_path(:anchor => "badge-orgs"), :target => :new} - %li - .linkaccount Twitter - -if @user.twitter.blank? - =link_to('Link Account', link_twitter_path, :class => "button") - -else - .linked=@user.twitter - =link_to('Unlink account', unlink_twitter_path, :method => :post, :class => "unlink") if current_user.can_unlink_provider?(:twitter) - - %li - .linkaccount LinkedIn - -if @user.linkedin_id.blank? - =link_to('Link Account', link_linkedin_path, :class => "button") - -else - .linked= link_to "Profile", @user.linkedin_public_url - =link_to('Unlink account', unlink_linkedin_path, :method => :post, :class => "unlink") if current_user.can_unlink_provider?(:linkedin) diff --git a/app/views/users/_link_accounts.html.slim b/app/views/users/_link_accounts.html.slim new file mode 100644 index 00000000..183f68f6 --- /dev/null +++ b/app/views/users/_link_accounts.html.slim @@ -0,0 +1,39 @@ +ul.linked-accounts + li + .linkaccount + i.fa.fa-5x.fa-github-square + div + u Github + -if @user.github.blank? + =link_to('Link Account', link_github_path, :class => "button") + -else + b.linked=@user.github + br + =link_to('Unlink account', unlink_github_path, :method => :post, :class => "unlink") if current_user.can_unlink_provider?(:github) + .join-badge-orgs + =form.check_box :join_badge_orgs + =form.label :join_badge_orgs do + =="Join #{link_to 'Coderwall Badge Orgs', faq_path(:anchor => "badge-orgs"), :target => :new}" + li + .linkaccount + i.fa.fa-5x.fa-twitter-square + div + u Twitter + -if @user.twitter.blank? + =link_to('Link Account', link_twitter_path, :class => "button") + -else + b.linked=@user.twitter + br + =link_to('Unlink account', unlink_twitter_path, :method => :post, :class => "unlink") if current_user.can_unlink_provider?(:twitter) + + li + .linkaccount + i.fa.fa-5x.fa-linkedin-square + div + u LinkedIn + -if @user.linkedin_id.blank? + =link_to('Link Account', link_linkedin_path, :class => "button") + -else + b.linked= link_to "Profile", @user.linkedin_public_url + br + =link_to('Unlink account', unlink_linkedin_path, :method => :post, :class => "unlink") if current_user.can_unlink_provider?(:linkedin) diff --git a/app/views/users/_show_admin_panel.slim b/app/views/users/_show_admin_panel.slim new file mode 100644 index 00000000..f7203cc2 --- /dev/null +++ b/app/views/users/_show_admin_panel.slim @@ -0,0 +1,27 @@ +-if is_admin? + .hint-box + ul.hint + li= mail_to(user.email) + li= "Total Views: #{user.total_views}" + li= "Last Request: #{time_ago_in_words(user.last_request_at || Time.at(0))} ago" + li= "Login Count: #{user.login_count}" + li= "Achievements last reviewed #{time_ago_in_words(user.achievements_checked_at)} ago" + li= "Score: #{user.score}" + - if user.banned? + li= "Banned: #{user.banned_at.to_s(:long)}" + li.admin-action= link_to("Impersonate", "/sessions/force?id=#{user.id}") + li.admin-action + - if user.banned? + =link_to("Unban this user", user_unbans_path(user), method: :post) + - else + =link_to("Ban this user", user_bans_path(user), method: :post) + + li.admin-action= link_to('Delete User', user_path(user), :confirm => 'Are you sure?', :method => :delete) + li.admin-action= link_to_if(user.twitter,'Clear Twitter!', clear_provider_path(user, :provider => 'twitter'), :confirm => 'Are you sure?') + li.admin-action= link_to_if(user.twitter,'Clear Twitter!', clear_provider_path(user, :provider => 'twitter'), :confirm => 'Are you sure?') + li.admin-action= link_to_if(user.github,'Clear GitHub!', clear_provider_path(user, :provider => 'github'), :confirm => 'Are you sure?') + -if user.linkedin || user.linkedin_id + li.admin-action + =link_to('Clear LinkedIn!', clear_provider_path(user, :provider => 'linkedin'), :confirm => 'Are you sure?') + li.admin-action + =link_to('Delete Facts', clear_provider_path(user, :provider => 'facts'), :confirm => 'Are you sure?', :method => :delete) diff --git a/app/views/users/_user.html.haml b/app/views/users/_user.html.slim similarity index 100% rename from app/views/users/_user.html.haml rename to app/views/users/_user.html.slim diff --git a/app/views/users/beta.html.haml b/app/views/users/beta.html.haml deleted file mode 100644 index 285ceedf..00000000 --- a/app/views/users/beta.html.haml +++ /dev/null @@ -1,17 +0,0 @@ --content_for(:page_title) do - asdf - - --@users.each do |user| - #feed - #bannerbg=location_image_tag_for(user) - #businessCard - .background - .member=users_image_tag(user) - %h1=user.display_name - #titlecompany=business_card_for(user) - #location=user.location - -if user.team - #currentteam=link_to(user.team.name, team_url(user.team), :class => 'track', 'data-action' => 'view team', 'data-from' => 'beta') - .clear - diff --git a/app/views/users/delete_account.html.haml b/app/views/users/delete_account.html.haml index f82060ce..fa088465 100644 --- a/app/views/users/delete_account.html.haml +++ b/app/views/users/delete_account.html.haml @@ -1,6 +1,3 @@ --content_for :mixpanel do - =record_view_event('delete account page') - =content_for :body_id do member-settings @@ -14,5 +11,3 @@ .setting =form_tag delete_account_confirmed_path do |form| .save=submit_tag 'Delete your account & sign out', :class => 'button', :confirm => "This is the point of no return. Are you sure you want to delete your account?" - - diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml deleted file mode 100644 index 8e26d78d..00000000 --- a/app/views/users/edit.html.haml +++ /dev/null @@ -1,230 +0,0 @@ -= content_for :javascript do - = javascript_include_tag 'https://s3.amazonaws.com/cdn.getchute.com/media-chooser.min.js' - = javascript_include_tag 'settings.js' - -- content_for :mixpanel do - = record_view_event('settings') - -= content_for :body_id do - member-settings - -#lflf - %h1.big-title - - if @user == current_user - Your Settings - - elsif admin_of_premium_team? - == #{@user.display_name}'s #{@user.team.name} Profile - - - if @user == current_user - %ul.member-nav - %li=link_to('Profile', '#basic', class: 'filternav your-profile active') - - if @user.on_premium_team? - %li= link_to("Team Profile", '#team', class: 'filternav team-prefs') - %li= link_to('Social links', '#social', class: 'filternav social-bookmarks') - %li= link_to('Jobs', '#jobs', class: 'filternav personalize') - %li= link_to('Email', '#email', class: 'filternav email-prefs') - - .panel.cf - .inside-panel-align-left - = form_for @user, html: { multipart: true } do |form| - - - if @user == current_user - #basic_section.editsection - .account-box - = render partial: 'users/link_accounts', locals: {form: form} - %p.neverpost We'll never post without your permission - - =render "shared/error_messages", target: @user - - %p.special-p Avatar: - .special-setting - - if @user.avatar.blank? - = image_tag(@user.thumbnail_url, class: 'avatar') - - else - = image_tag(@user.avatar_url, class: 'avatar') - .div - = form.check_box :remove_avatar - = form.label :remove_avatar, "Remove Avatar", class: 'checkbox-label' - .div - = form.file_field :avatar - = form.hidden_field :avatar_cache - - .setting - = form.label :name, 'Name:' - = form.text_field :name - - - .setting - = form.label :title, 'Title:' - = form.text_field :title - .setting - = form.label :company, 'Company:' - = form.text_field :company - .setting - = form.label :location, "Location: <em>required</em>".html_safe - = form.text_field :location - .setting - = form.label :about, "Bio:" - = form.text_area :about - -#.save=submit_tag 'Save', class: 'button' - - .left - %p Personalize your profile by uploading your own background photo. Please note hipsterizing your photo can take up to one or two minutes. - - if !@user.banner.blank? - = image_tag(@user.banner_url) - .div - = form.check_box :remove_banner - = form.label :remove_banner, "Remove Banner", class: 'checkbox-label' - .div - = form.file_field :banner - = form.hidden_field :banner_cache - - .setting - = form.label :api_key, 'API Key:' - = form.label @user.api_key - .save=submit_tag 'Save', class: 'button' - - - -if @user == current_user - #email_section.editsection.hide - .left - = render "shared/error_messages", target: @user - .setting - = form.label :email, 'Email Address:'.html_safe - = form.text_field :email - - .setting - = form.check_box :notify_on_award - = form.label :notify_on_award, 'Receive a notification when you are awarded a new achievement'.html_safe - - .setting - = form.check_box :notify_on_follow - = form.label :notify_on_follow, 'Receive a notification when someone follows you'.html_safe - - .setting - = form.check_box :receive_newsletter - = form.label :receive_newsletter, 'Receive infrequent but important announcements'.html_safe - - .setting - = form.check_box :receive_weekly_digest - = form.label :receive_weekly_digest, 'Receive weekly brief'.html_safe - - .save=submit_tag 'Save', class: 'button' - - -if @user == current_user - #social_section.editsection.hide - .left - = render "shared/error_messages", target: @user - .setting - = form.label :blog, 'Blog:' - = form.text_field :blog - - .setting - = form.label :bitbucket, 'Bitbucket username:' - = form.text_field :bitbucket - - .setting - = form.label :codeplex, 'CodePlex username:' - = form.text_field :codeplex - - .setting - = form.label :forrst, 'Forrst username:' - = form.text_field :forrst - - .setting - = form.label :dribbble, 'Dribbble username:' - = form.text_field :dribbble - - .setting - = form.label :speakerdeck, 'Speakerdeck username:' - = form.text_field :speakerdeck - - .setting - = form.label :slideshare, 'Slideshare username: <em>(http://www.slideshare.net/YOUR_USERNAME/newsfeed)</em>'.html_safe - = form.text_field :slideshare - - .setting - = form.label :stackoverflow, 'Stackoverflow id: <em>(http://stackoverflow.com/users/YOUR_ID/name)</em>'.html_safe - = form.text_field :stackoverflow - - .setting - = form.label :google_code, 'Google Code id: <em>(http://code.google.com/u/YOUR_ID/</em>'.html_safe - = form.text_field :google_code - - .setting - = form.label :sourceforge, 'SourceForge id: <em>(http://sourceforge.net/users/YOUR_ID/</em>'.html_safe - = form.text_field :sourceforge - - .setting - = form.label :favorite_websites, 'Favorite Websites: <em>comma separated list of sites you enjoy visiting daily</em>'.html_safe - = form.text_field :favorite_websites - - .save= submit_tag 'Save', class: 'button' - - -if @user.on_premium_team? || admin_of_premium_team? - #team_section.editsection{class: admin_of_premium_team? ? '' : 'hide'} - %p.team-title - Updating team - = link_to(@user.team.name, teamname_url(slug: @user.team.slug, full: :preview)) - settings - .left - = render "shared/error_messages", target: @user - .special-setting.explaination - %p.number.one - 1 - %p.number.two - 2 - %p.number.three - 3 - %p.number.four - 4 - %h3.name - The users name - %p.bio - The users bio Lorem ipsum dolor sit amet, consectetur adipisicing elit. - %label - This graphic shows what area of your team profile you are upadting - = image_tag("prem-profile-explaination.jpg") - - .special-setting.name-bio - %p - This infomation is taken from your min profile name and bio, change them in the - %a{href: '/'} - profile section. - %p.number.one - 1 - .special-setting - %p.number.two - 2 - = form.label :team_responsibilities, "What you work on at #{@user.team.name} (1 or 2 short sentences)" - = form.text_area :team_responsibilities - - .special-setting - %p= "Optionally select unique avatar for the #{@user.team.name} team page. If you do not select an avatar it will default to the same avatar on your profile." - = form.hidden_field :team_avatar - .preview - = image_tag(@user.team_avatar) unless @user.team_avatar.blank? - = link_to('Choose Photo','#', class: 'photo-chooser','data-input' => 'user_team_avatar', 'data-fit-w' => 80, 'data-fit-h' => 80) - - .special-setting.team-profile-img - %p.number.three - 3 - %p= "Optionally select unique background image for the #{@user.team.name} team page. If you do not select a background photo, it will default to the same banner that is on your personal profile." - = form.hidden_field :team_banner - .preview - = image_tag(@user.team_banner) unless @user.team_banner.blank? - = link_to('Choose Photo','#', class: 'photo-chooser','data-input' => 'user_team_banner','data-fit-w' => 478, 'data-fit-h' => 321) - - .save= submit_tag 'Save', class: 'button' - - .clear - - #jobs_section.editsection.hide - %p Upload your resume. It will be sent automatically to positions you apply for through Coderwall. - .left - .setting - .current-resume - - if current_user.has_resume? - = link_to 'Your current resume', current_user.resume_url, class: 'track', 'data-action' => 'upload resume', 'data-from' => 'job application' - .upload-resume - = form.file_field :resume diff --git a/app/views/users/edit.html.slim b/app/views/users/edit.html.slim new file mode 100644 index 00000000..58b8c21f --- /dev/null +++ b/app/views/users/edit.html.slim @@ -0,0 +1,6 @@ +- content_for :javascript, javascript_include_tag('username-validation') +- content_for :mixpanel, record_view_event('settings') +- content_for :body_id, 'member-settings' + +.container.edit_tabs + =render 'users/edit' \ No newline at end of file diff --git a/app/views/users/edit/_basic.html.slim b/app/views/users/edit/_basic.html.slim new file mode 100644 index 00000000..f021ae31 --- /dev/null +++ b/app/views/users/edit/_basic.html.slim @@ -0,0 +1,68 @@ +.card.no_shadow + .card-content + = form_for @user, html: { id: 'edit_user_basic_tab', multipart: true }do |form| + .row + .col.s12 + =render "shared/error_messages", target: user + p.special-p Avatar: + .special-setting + .div + = image_tag(@user.avatar_url, class: 'avatar') + .div + = form.check_box :remove_avatar + = form.label :remove_avatar, "Remove Avatar", class: 'checkbox-label' + .div + = form.file_field :avatar + = form.hidden_field :avatar_cache + hr + .row + .input-field.col.s12.m6 + = form.label :name, 'Name:' + = form.text_field :name + .input-field.col.s12.m6 + = form.label :title, 'Title:' + = form.text_field :title + .row + .input-field.col.s12.m6 + = form.label :company, 'Company:' + = form.text_field :company + .input-field.col.s12.m6 + = form.label :location, 'Location: (required)' + = form.text_field :location + .row + .input-field.col.s12.m6 + = form.label :username, 'Username: (required)' + = form.text_field :username, 'data-validation' => usernames_path, :maxlength => 15 + #username_validation.info-post + p.info-post Changing your username will make your previous username available to someone else. + .input-field.col.s12.m6 + = form.label :about, 'Bio:' + = form.text_area :about , class: 'materialize-textarea' + hr + .row + .input-field.col.s12 + p Personalize your profile by uploading your own background photo. Please note hipsterizing your photo can take up to one or two minutes. + .row + .input-field.col.s12.m6 + - if !@user.banner.blank? + = image_tag(@user.banner.url) + .input-field + = form.check_box :remove_banner + = form.label :remove_banner, 'Remove Banner', class: 'checkbox-label' + + .input-field.col.s12.m6 + = form.file_field :banner + = form.hidden_field :banner_cache + .row + .input-field.col.s12.m6 + = form.label :api_key, "API Key : #{@user.api_key}" + .input-field.col.s6 + .delete + p + |Deleting your account is permanent and will make your username available to someone else. If you would still like to delete your account, + = link_to " click here.", user_path(user), :confirm => 'Are you sure?', :method => :delete + + .row + .input-field.col.s12.m6 + .input-field.col.s12.m6 + .save =submit_tag 'Save', class: 'btn right' diff --git a/app/views/users/edit/_email.html.slim b/app/views/users/edit/_email.html.slim new file mode 100644 index 00000000..e44c8709 --- /dev/null +++ b/app/views/users/edit/_email.html.slim @@ -0,0 +1,27 @@ +.card.no_shadow + .card-content + = form_for @user, html: {id: 'edit_user_email_tab' } do |form| + .row + .col.s12 + = render "shared/error_messages", target: @user + .row + .input-field.col.s12 + = form.label :email, 'Email Address:' + = form.text_field :email + .row + .input-field.col.s12.m6 + = form.check_box :notify_on_award + = form.label :notify_on_award, 'Receive a notification when you are awarded a new achievement' + .input-field.col.s12.m6 + = form.check_box :notify_on_follow + = form.label :notify_on_follow, 'Receive a notification when someone follows you' + .row + .input-field.col.s12.m6 + = form.check_box :receive_newsletter + = form.label :receive_newsletter, 'Receive infrequent but important announcements' + .input-field.col.s12.m6 + = form.check_box :receive_weekly_digest + = form.label :receive_weekly_digest, 'Receive weekly brief' + .row + .input-field.col.s12 + .save=submit_tag 'Save', class: 'btn right' diff --git a/app/views/users/edit/_jobs.html.slim b/app/views/users/edit/_jobs.html.slim new file mode 100644 index 00000000..9e711569 --- /dev/null +++ b/app/views/users/edit/_jobs.html.slim @@ -0,0 +1,18 @@ +.card.no_shadow + .card-content + .row + .col.s6.center-align + - if current_user.has_resume? + p= link_to 'Your current resume', current_user.resume_url, class: 'black darken-2 track waves-effect waves-light btn-large', 'data-action' => 'upload resume', 'data-from' => 'job application' + br + br + p.info-post Upload your resume. It will be sent automatically to positions you apply for through Coderwall. + .col.s6 + = form_tag(resume_uploads_url, method: :post, multipart: true) do + = hidden_field_tag :user_id, current_user.id + .file-field.input-field + .btn + span File + = file_field_tag :resume + input.file-path.validate type="text" / + .save =submit_tag 'Save', class: 'btn' \ No newline at end of file diff --git a/app/views/users/edit/_social.html.slim b/app/views/users/edit/_social.html.slim new file mode 100644 index 00000000..c96002a0 --- /dev/null +++ b/app/views/users/edit/_social.html.slim @@ -0,0 +1,50 @@ +.card.no_shadow + .card-content + = form_for @user, html: {id: 'edit_user_social_tab'} do |form| + .row + .col.s12 + = render "shared/error_messages", target: @user + .row + .col.s12 + p.neverpost.info-post We'll never post without your permission + .row + .col.s12.account-box.m8.offset-m2 + = render partial: 'users/link_accounts', locals: {form: form} + .row + .input-field.col.s12.m6 + = form.label :blog, 'Blog:' + = form.text_field :blog + .input-field.col.s12.m6 + = form.label :stackoverflow, 'Stackoverflow id: (Ex : http://stackoverflow.com/users/YOUR_ID/name)' + = form.text_field :stackoverflow + .row + .input-field.col.s12.m6 + = form.label :codeplex, 'CodePlex username:' + = form.text_field :codeplex + .input-field.col.s12.m6 + = form.label :forrst, 'Forrst username:' + = form.text_field :forrst + .row + .input-field.col.s12.m6 + = form.label :dribbble, 'Dribbble username:' + = form.text_field :dribbble + .input-field.col.s12.m6 + = form.label :speakerdeck, 'Speakerdeck username:' + = form.text_field :speakerdeck + .row + .input-field.col.s12.m6 + = form.label :bitbucket, 'Bitbucket username:' + = form.text_field :bitbucket + .input-field.col.s6 + = form.label :sourceforge, 'SourceForge id: (Ex : http://sourceforge.net/users/YOUR_ID/)' + = form.text_field :sourceforge + .row + .input-field.col.s12.m6 + = form.label :slideshare, 'Slideshare username:' + = form.text_field :slideshare + .input-field.col.s12.m6 + = form.label :favorite_websites, 'Favorite Websites: comma separated list of sites you enjoy visiting daily' + = form.text_field :favorite_websites + .row + .input-field.col.s12 + .save =submit_tag 'Save', class: 'btn right' diff --git a/app/views/users/edit/_summary.html.slim b/app/views/users/edit/_summary.html.slim new file mode 100644 index 00000000..a977178a --- /dev/null +++ b/app/views/users/edit/_summary.html.slim @@ -0,0 +1,64 @@ +.row + .col.s12.m6 + .card.profile_card.no_shadow + .card-image + =image_tag(user.banner.url) + span.card-title + ul.collection + li.collection-item.avatar + =image_tag(user.avatar.url,class: 'circle') + span.title =user.name + li.collection-item.dismissable + div + =user.username + =link_to badge_path(username: user.username), class: 'secondary-content', target:'_blanck' + i.material-icons send + li.collection-item + div=show_user_attribute(user.location,'Location') + .card-action + =show_user_attribute(user.title,'Title') + =show_user_attribute(user.company,'Company') + =show_user_attribute(user.api_key,'API Key') + =show_user_attribute(user.about,'Bio',{type: :paragraph}) + + .col.s12.m6 + .card.no_shadow + .card-content + .row + .col.s12 + h5.light Email + =show_user_attribute(user.email,'Email Address') + ul.email_list + li + i class="material-icons" ="#{ user.notify_on_award ? 'done' : 'stop'}" + |Receive a notification when you are awarded a new achievement + + li + i class="material-icons" ="#{ user.notify_on_follow ? 'done' : 'stop'}" + |Receive a notification when someone follows you + + li + i class="material-icons" ="#{ user.receive_newsletter ? 'done' : 'stop'}" + |Receive infrequent but important announcements + + li + i class="material-icons" ="#{ user.receive_weekly_digest ? 'done' : 'stop'}" + |Receive weekly brief + + .col.s12 + h5.light Social links + =show_user_attribute(user.github,'Github') + =show_user_attribute(user.twitter,'Twitter') + =show_user_attribute(user.linkedin_public_url,'LinkedIn') + =show_user_attribute(user.blog,'Blog') + =show_user_attribute(user.bitbucket,'Bitbucket username') + =show_user_attribute(user.codeplex,'CodePlex username') + =show_user_attribute(user.forrst,'Forrst username') + =show_user_attribute(user.dribbble,'Dribbble username') + =show_user_attribute(user.speakerdeck,'Speakerdeck username') + =show_user_attribute(user.favorite_websites,'Favorite Websites') + +.row + .col.s12 + -if @user.membership.present? + =render 'users/edit/summary_teams', user: user diff --git a/app/views/users/edit/_summary_team_collapsible.html.slim b/app/views/users/edit/_summary_team_collapsible.html.slim new file mode 100644 index 00000000..4e924d36 --- /dev/null +++ b/app/views/users/edit/_summary_team_collapsible.html.slim @@ -0,0 +1,11 @@ +li.collection-item.avatar + =image_tag(membership.team.avatar_url, class: "circle") + span.title + b Name + =": #{membership.team.name}" + p + b Title + =": #{membership.title}" + br + b State + =": #{membership.state}" diff --git a/app/views/users/edit/_summary_teams.html.slim b/app/views/users/edit/_summary_teams.html.slim new file mode 100644 index 00000000..560e3a67 --- /dev/null +++ b/app/views/users/edit/_summary_teams.html.slim @@ -0,0 +1,6 @@ +.card.no_shadow + .card-content + h5.light Teams + ul.collection + -user.memberships.each do |membership| + =render 'users/edit/summary_team_collapsible', membership: membership diff --git a/app/views/users/edit/_team.html.slim b/app/views/users/edit/_team.html.slim new file mode 100644 index 00000000..1018a164 --- /dev/null +++ b/app/views/users/edit/_team.html.slim @@ -0,0 +1,34 @@ +li.no_shadow.active + .collapsible-header.active + i=image_tag(membership.team.avatar_url) + ="#{membership.team.name} ( #{membership.state} )" + .collapsible-body style=("display: none;") + = form_for membership, url: teams_update_users_path(membership),method: :post, html: { multipart: true} do |form| + .row + .col.s12 + = render "shared/error_messages", target: membership + .row + .input-field.col.s12 + = form.label :title, 'Title:' + = form.text_field :title + .row + .input-field.col.s12.m6 + .special-setting + = form.label :team_avatar, 'Avatar:' + p= "Optionally select unique avatar for the #{membership.team.name} team page. If you do not select an avatar it will default to the same avatar on your profile." + .preview + = image_tag(membership.team_avatar) unless membership.team_avatar.blank? + = form.file_field :team_avatar + .input-field.col.s12.m6 + .special-setting.team-profile-img + = form.label :team_banner, 'Banner:' + p= "Optionally select unique background image for the #{membership.team.name} team page. If you do not select a background photo, it will default to the same banner that is on your personal profile." + .preview + = image_tag(membership.team_banner) unless membership.team_banner.blank? + = form.file_field :team_banner + .row + .input-field.col.s12.m6 + .input-field.col.s12.m6 + .save=submit_tag 'Save', class: 'btn right' + +.clearboth diff --git a/app/views/users/edit/_teams.html.slim b/app/views/users/edit/_teams.html.slim new file mode 100644 index 00000000..cd57fdc0 --- /dev/null +++ b/app/views/users/edit/_teams.html.slim @@ -0,0 +1,5 @@ +.card.no_shadow + .card-content + ul.collapsible.popout.collapsible-accordion data-collapsible="accordion" + -user.memberships.each do |membership| + =render 'users/edit/team', user: user , membership: membership diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml deleted file mode 100644 index f636bbc4..00000000 --- a/app/views/users/index.html.haml +++ /dev/null @@ -1,18 +0,0 @@ -%h1 test - -.left{:style => "float:left; margin-right: 50px;"} - %h2==Active Users: #{User.active.count} - %h2==Signed up Today: #{User.where("created_at > ?", 24.hour.ago).count} - %h2==Visited Today: #{User.active.where("last_request_at > ?", 24.hour.ago).count} - %h2==Pending Users: #{User.pending.count} - -.left{:style => "float:left;"} - %h2==Failed Jobs: #{Delayed::Job.where('last_error IS NOT NULL').count} - %h2==Pending Jobs: #{Delayed::Job.where('last_error IS NULL').count} -.clear -=render :partial => 'signups' -.clear -.left{:style => 'margin-top: 30px;'} - %h2==Cache Stats: #{Rails.cache.stats} - -=image_tag 'mediaWhiteBackground.png' \ No newline at end of file diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml deleted file mode 100644 index 59bf9142..00000000 --- a/app/views/users/new.html.haml +++ /dev/null @@ -1,50 +0,0 @@ -=content_for :javascript do - =javascript_include_tag 'jquery.ketchup.all.min.js' - =javascript_include_tag 'signup.js' - --content_for :page_title do - coderwall : level up (step 2 of 2) - --content_for :body_id do - registration - --content_for :mixpanel do - =record_view_event('registration page') - -#account - .panel.cf - .inside-panel-align-left - %h1.account-box Last step - finish registering to level up - =form_for @user do |form| - =render "shared/error_messages", :target => @user - .special-setting - =form.label :username, 'Username:'.html_safe - =form.text_field :username, 'data-validation' => usernames_path, :maxlength => 15 - #username_validation - - =form.label :name, 'Name:'.html_safe - =form.text_field :name - - =form.label :location, 'Location:'.html_safe - =form.text_field :location - - =form.label :email, 'Email Address:'.html_safe - =form.text_field :email - / %p - / -@user.receive_newsletter = false #this is here for campaign monitor - / =form.check_box :receive_newsletter - / =form.label :receive_newsletter, 'Receive infrequent but relevant updates'.html_safe - %p.neverpost - We respect the sanctity of your email and share your dislike for spam and unnecessarily frequent newsletters. - =follow_coderwall_on_twitter - to stay up to date with updates from coderwall. - .save - =submit_tag 'Finish', :class => 'button' - .clear - .special-setting.already-signedup - %h4 - Already have an account? Try signing in again with - =link_to('GitHub,', '/auth/github', :rel => 'nofollow') - =link_to('Twitter,', '/auth/twitter', :rel => 'nofollow') - or - =link_to('LinkedIn', '/auth/linkedin', :rel => 'nofollow') \ No newline at end of file diff --git a/app/views/users/new.html.slim b/app/views/users/new.html.slim new file mode 100644 index 00000000..e9263311 --- /dev/null +++ b/app/views/users/new.html.slim @@ -0,0 +1,37 @@ +-content_for :javascript, javascript_include_tag('username-validation') +-content_for :page_title, 'coderwall : level up (step 2 of 2)' +-content_for :body_id, 'registration' +-content_for :mixpanel, record_view_event('registration page') +#account + .panel.cf + .inside-panel-align-left + h1.account-box Last step - finish registering to level up + =form_for @user do |form| + =render "shared/error_messages", :target => @user + .special-setting + =form.label :username, 'Username:' + =form.text_field :username, 'data-validation' => usernames_path, :maxlength => 15 + #username_validation + + =form.label :name, 'Name:' + =form.text_field :name + + =form.label :location, 'Location:' + =form.text_field :location + + =form.label :email, 'Email Address:' + =form.text_field :email + p.neverpost + ="We respect the sanctity of your email and share your dislike for spam and unnecessarily frequent newsletters." + =" #{follow_coderwall_on_twitter} to stay up to date with updates from coderwall." + .save + = submit_tag 'Finish', class: 'button', + data: { disable_with: "Submitted" } + .clear + .special-setting.already-signedup + h4 + ="Already have an account? Try signing in again with " + =" #{link_to('GitHub,', '/auth/github', :rel => 'nofollow')}" + =" #{link_to('Twitter,', '/auth/twitter', :rel => 'nofollow')}" + =" or" + =" #{link_to('LinkedIn', '/auth/linkedin', :rel => 'nofollow')}" diff --git a/app/views/users/pending.html.haml b/app/views/users/pending.html.haml deleted file mode 100644 index 947225c9..00000000 --- a/app/views/users/pending.html.haml +++ /dev/null @@ -1,55 +0,0 @@ --content_for :mixpanel do - =record_event('viewed pending profile', :viewing_self => viewing_self?) - -#inprogress - %h1 Heavy Lifting In Progress - -unless viewing_self? - #members - %h3==Looks like #{@user.display_name}'s Coderwall is not ready yet. Why not check out some other hackers in the meantime? - -User.random(8).each do |user| - .member - =avatar_image_tag(user) - =link_to user.username, badge_path(:username => user.username) - .clear - -else - %h3==Welcome to Coderwall! We add new members to our beta at the end of every week. Your estimated delivery is #{estimated_delivery_date.to_words}. While you wait for your welcome email, below are some things you can do to get the most out of coderwall. - %ul.badges - %li - %h2 1 - %p.desc Maximize the potential to earn new achievements - %p - Badges are awarded when we discover your achievements. By linking more accounts, we can find more of these achievements on the internet. (we - %strong never - post to your accounts) - .linkaccounts=render :partial => 'users/link_accounts' - / %li - / %h2 2 - / %p.desc Share an accomplishment - / %p Inspire others, be proud of your skills, and earn achievements by sharing a personal accomplishment. - / .createwhilepending - / =form_tag user_highlights_path(@user), :remote => true do - / .white-container - / =text_area_tag :highlight, nil, :placeholder => 'Enter an accomplishment', :id => "new_accomplishment" - / / #countdown 100 - / =link_to 'save', '#', {:class => 'submitter button'} - %li - %h2 2 - %p.desc Can't wait and need your Coderwall today? - %p - Help us spread the word and we'll help you cut to the front of the queue. Tweet a link to your profile and have your account activated within 2 hours. - -if event_checkin_class == 'show' - %p - %strong Checking in to NodeSummit will put you in the front of the queue. - #spread=share_coderwall_on_twitter - - .clear - -if @user.highlights.empty? - #personalAccomplishments.hide - %h2.section - .headline Personal Accomplishments - %ul.accomplishments=render @user.highlights - -else - #personalAccomplishments - %h2.section - .headline Personal Accomplishments - %ul.accomplishments=render @user.highlights diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml deleted file mode 100644 index 472b1b39..00000000 --- a/app/views/users/show.html.haml +++ /dev/null @@ -1,302 +0,0 @@ -=content_for :body_id do - profile - -=content_for :javascript do - =javascript_include_tag 'users.js' - --content_for :mixpanel do - -if viewing_self? - =record_view_event('own profile') - -else - =record_view_event('user profile') - --content_for :credits do - -if @user.banner.blank? - =location_image_tag_credits_for(@user) - =link_to(image_tag('cclicense.png'), 'http://creativecommons.org/licenses/by-sa/2.0/', :target => :new) - -%section.profile{:itemscope => true, :itemtype => mperson} - .special-image - =location_image_tag_for(@user) - .business-card - =image_tag(users_image_path(@user), :class => 'profile-avatar', :width => 80, :height => 80, :itemprop => :image) - .bc-right - %h1{:itemprop => :name}=@user.display_name - -if signed_in? - %p.location{:itemscope => true, :itemtype => maddress, :itemprop => :address}=@user.location - %p.title{:itemprop => :title}=business_card_for(@user) - -if !@user.protips.empty? || viewing_self? - .user-pro-tip.cf - %a.pro-tip-number.track{:href => user_protips_path(@user.username), 'data-action' => 'view user protips', 'data-from' => 'profile card'} - %span= @user.protips.count - = @user.protips.count > 1 ? 'Pro Tip'.pluralize : 'Pro Tip' - .recent-pro-tip - -if viewing_self? - %a.tip.share-a-protip.track{:href => new_protip_path, 'data-action' => 'create protip', 'data-from' => 'profile card', 'title' => @user.skills.empty? ? "Fill out your profile by adding some skills first, then share some Pro Tips!" : "Share your best coding tidbits!" } - Share a Pro Tip - -else - %h4 Most recent Protip - - recent_protips(1).each do |protip| - = link_to protip.title, protip_path(protip.public_id), :class => 'track', 'data-action' => 'view protip', 'data-from' => 'profile card' - - -if @user.skills.empty? - -if viewing_self? - .no-skills - %p - Adding a few skills you're good at will get you started earning some cred and unlocking achievements. Here are some suggestions: - %br - %br - %strong.no-skill Loving Visual Basic - %strong.no-skill IE6 - %br - =link_to("Of course not, add a real skill", '#addskill', :class => 'add-skill track', 'data-action' => 'add skill', 'data-from' => 'profile (first skill)') - =render 'add_skill' - -else - .profile-head - %h2 Skills & Achievements - -if viewing_self? - =link_to('Add Skill', '#addskill', :class => 'add-skill track', 'data-action' => 'add skill', 'data-from' => 'profile') - =render 'add_skill' - %ul.skills - -@user.skills.each do |skill| - -cache ['v4', skill, skill.protips.size, skill.badges_count, skill.repos.count, signed_in?, viewing_self?] do - %li{:class => (skill.locked? ? 'locked' : 'unlocked')} - .skill-left - %h3=skill.name.downcase - %ul - -if skill.has_endorsements? - %li==Received #{pluralize(skill.endorsements_count, 'endorsement')} - -if skill.has_repos? - %li==Has open sourced #{pluralize(skill.repos.count, "#{skill.name.downcase} project")} - -if skill.has_events? - %li=skill_event_message(skill) - -if skill.has_protips? - %li==Has shared #{pluralize(skill.protips.count, 'original protip')} - .skill-right - -if skill.locked? - %p.help-text{'data-skill' => skill.id}=skill_help_text(skill) - -else - %ul - -skill.matching_badges_in(@user.badges).each do |badge| - %li=image_tag(badge.image_path, :title => badge.description, :class => 'tip') - .details.cf.hide - -if skill.has_endorsements? - %h4 Endorsed by - %ul.endorsements - -skill.endorsements.each do |endorsement| - %li - =avatar_image_tag(endorsement.endorser, 'data-skill' => skill.id, :class => 'tip', :title => endorsement.endorser.display_name) - - -if skill.has_repos? - %h4 Repos - %ul.repos - -skill.repos.each do |repo| - %li - =link_to(repo[:name], repo[:url],:class=>'track','data-action' =>'view repo', 'data-from' => 'profile skill') - -if skill.has_protips? - %h4 Protips shared - %ul.protips - -skill.protips.each do |protip| - %li - =link_to(protip.title,protip_path(protip),:class=>'track','data-action' =>'view protip', 'data-from' => 'profile skill') - -if skill.has_events? - %h4 Events attended - %ul.events - -skill.speaking_events.each do |event| - %li - Spoke at - =link_to(event[:name], event[:url],:class=>'track','data-action' =>'view speaking event', 'data-from' => 'profile skill') - -skill.attended_events.each do |event| - %li - Attended - =link_to(event[:name], event[:url],:class=>'track','data-action' =>'view attending event', 'data-from' => 'profile skill') - -if !viewing_self? - .endorse-wrap - =form_tag(user_endorsements_path(@user)) do - =hidden_field_tag :skill_id, skill.id - =link_to('Endorse', user_endorsements_path(@user),:class=>"track endorse #{not_signedin_class}",'data-skill'=>skill.id, 'data-action' => 'endorse user', 'data-from' => 'profile skill') - -elsif viewing_self? && signed_in? && skill.deletable? - .remove - =button_to('Remove', user_skill_path(@user, skill), :method=>:delete, :class=>'track destroy', 'data-skill' => skill.id, 'data-action' => 'delete skill', 'data-from' => 'profile skill') - -.sidebar - %aside.profile-sidebar - -if Rails.env.development? - / .coderwall-level - / %p coderwall level 1 - / - / .score-box - / .tip-box - / %p You have 73pts, 18 more needed to level up. blah blah blah blah blah blah blah blah - / - / .score-base - / %ul - / %li 1 - / %li - / %li - / %li - / %li - / %li - / %li - / %li 2 - / - / .score-over{:style => 'width: 50%'} - / %ul - / %li 1 - / %li - / %li - / %li - / %li - / %li - / %li - / %li 2 - / - / .label.cf - / %span.current-points - / 0 pts - / %span.next-points - / 100 pts - / - / .user-notifications - / %ol - / %li - / Quests - / %li - / %span - / 1 - / Endorse - / %a.class{:href => '/'} - / Mdeiters - / for Javascript to gain 5pts. - / %li - / %span - / 2 - / Write your first - / %a.class{:href => '/'} - / Protip - / to gain 5pts. - / %li - / %span - / 3 - / %a.class{:href => '/'} - / Bashir - / just endorsed you for CSS, awesome! - %ul.profile-details - -unless @user.about.blank? - %li - %h4 About - %p=@user.about - %li - %h4 Links - %ul.social-links - -social_bookmarks(@user).each do |bookmark| - =bookmark.html_safe - -if viewing_self? && !remaining_bookmarks(@user).empty? - %li.link-to-level-up - %h4 Link to level up - %ul.social-links - -remaining_bookmarks(@user).each do |bookmark| - =bookmark.html_safe - -if viewing_self? - %li=link_to('', edit_user_path(@user) + '#social', :class=>'add-network track', 'data-action' => 'add social bookmark', 'data-from' => 'profile sidebar') - - - -if @user.team - %li - %h4 Team - %a.team-link.track{:href => friendly_team_path(@user.team), 'data-action' => 'view team', 'data-from' => 'profile sidebar'} - %span.team-avatar=image_tag(@user.team.avatar_url, :width => 22, :height => 22) - %div{:itemprop => :affiliation}=truncate("#{@user.team.name}", :length => 28) - -if viewing_self? - =link_to 'Leave team', team_team_member_path(@user.team, @user), :method => :delete, :confirm => "Are you sure you want to leave team #{@user.team.name}", :class => "leave-team track", 'data-action' => 'leave team', 'data-from' => 'profile page' - - -elsif viewing_self? - %li.team-self - %a.profile-create-team.track{:href => new_team_path, 'data-action' => 'create team', 'data-from' => 'profile sidebar'} - %span.team-avatar Reserve Team's Name - - - .network - -if viewing_self? - -unless @user.user_followers.empty? - %h4.your-followers-header - ==You have #{@user.user_followers.size} followers - =link_to('Your Connections', followers_path(:username => @user.username), :class => "your-network track #{@user.team.nil? ? 'no-team' : ''}", 'data-action' => 'view connections', 'data-from' => 'profile sidebar') - - -else - -if signed_in? && current_user.following?(@user) - =link_to(defined_in_css = '', follow_user_path(@user.username), :method => :post, :remote => true, :class => 'add-to-network following track', 'data-action' => 'unfollow user', 'data-from' => 'profile sidebar') - -elsif signed_in? - =link_to(defined_in_css = '', follow_user_path(@user.username), :method => :post, :remote => true, :class => 'add-to-network track', 'data-action' => 'follow user', 'data-from' => 'profile sidebar') - -else - =link_to(defined_in_css = '', signup_path(:flash => 'You must signin or signup before you can follow someone'), :class => 'add-to-network noauth track', 'data-action' => 'follow user', 'data-from' => 'profile sidebar') - -if signed_in? && @user.following?(current_user) - .followed-back - %p== #{@user.short_name} is following you - - -if viewing_self? - =share_profile('Share profile on Twitter', @user, :class => 'share-profile-side track', 'data-action' => 'share profile', 'data-from' => 'profile sidebar') - - -if viewing_self? - .rev-share-box - %h2 Share your profile - %ul.share - %li.embed-code - %p - Easily embed your personal endorse button on your open source projects or blog - .count - = html_embed_code_with_count - .embed-code-button - %a.show-embed-codes.track{:href => '#', 'data-action' => 'view embed code', 'data-from' => 'profile sidebar'} - .embed-codes.hide - .embed.embed-markdown - .hint.markdown - %h4 Markdown code - %span (put in Github README.md) - =text_area_tag 'Markdown', markdown_embed_code_with_count - .embed.embed-html - .hint.html - %h4 HTML code - =text_area_tag 'HTML', html_embed_code_with_count - -# - -#.embed-btn - =link_to'Embed in all my Github project READMEs' - - -#-if viewing_self? && @user.has_badges? - -# .hint-box - -# .hint - -# %p - -# Those are some pretty awesome achievements! Did you know you can - -# %a.track{:href => api_path + '#blogbadge', 'data-category' => 'click', 'data-action' => 'embed badges'} - -# easily embed them - -# on your blog in a line or two of html? - - -if is_admin? - .hint-box - %ul.hint - %li=mail_to(@user.email) - %li.impersonate - =link_to("Impersonate", "/sessions/force?username=#{@user.username}") - %li.refresh - =link_to("Refresh", refresh_path(@user.username)) - %li - ==Total Views: #{@user.total_views} - %li - ==Last Request: #{time_ago_in_words(@user.last_request_at || Time.at(0))} ago - %li - ==Login Count: #{@user.login_count} - %li - ==Achievements last reviewed #{time_ago_in_words(@user.achievements_checked_at)} ago - %li - ==Score: #{@user.score} - -if @user.twitter - %li=link_to('Clear Twitter!', clear_provider_path(@user, :provider => 'twitter'), :confirm => 'Are you sure?') - / -unless @user.linkedin.blank? && user.linkedin_legacy.blank? && user.linkedin_public_url.blank? - / %li=link_to('Clear Linkedin!', clear_provider_path(@user, :provider => 'linkedin'), :confirm => 'Are you sure?') - -if @user.github - %li=link_to('Clear GitHub!', clear_provider_path(@user, :provider => 'github'), :confirm => 'Are you sure?') - -if @user.linkedin || @user.linkedin_id - %li=link_to('Clear LinkedIn!', clear_provider_path(@user, :provider => 'linkedin'), :confirm => 'Are you sure?') - - %li=link_to('Delete Facts', clear_provider_path(@user, :provider => 'facts'),:confirm => 'Are you sure?', :method => :delete) - %li=link_to('Delete User', user_path(@user),:confirm => 'Are you sure?', :method => :delete) diff --git a/app/views/users/show.html.slim b/app/views/users/show.html.slim new file mode 100644 index 00000000..194ef6d5 --- /dev/null +++ b/app/views/users/show.html.slim @@ -0,0 +1,199 @@ +-content_for :body_id, 'profile' +-content_for :javascript, javascript_include_tag('users.js') +-content_for :mixpanel do + -if viewing_self? + =record_view_event('own profile') + -else + =record_view_event('user profile') +-content_for :credits do + -if @user.banner.blank? + =location_image_tag_credits_for(@user) + =link_to(image_tag('cclicense.png'), 'http://creativecommons.org/licenses/by-sa/2.0/', :target => :new) + +section.profile itemscope="true" itemtype="#{meta_person_schema_url}" + .special-image + =location_image_tag_for(@user) + .business-card + =image_tag(users_image_path(@user), :class => 'profile-avatar', :width => 80, :height => 80, :itemprop => :image) + .bc-right + h1 itemprop="name" =@user.display_name + -if signed_in? + p.location itemscope="true" itemtype="#{meta_address_schema_url}" itemprop="address" + =@user.location + p.title itemprop="title"=business_card_for(@user) + -if !@user.protips.empty? || viewing_self? + .user-pro-tip.cf + =link_to user_protips_path(@user.username), class: 'pro-tip-number track', 'data-action' => 'view user protips', 'data-from' => 'profile card' + span= @user.protips.count + = @user.protips.count > 1 ? 'Pro Tip'.pluralize : 'Pro Tip' + .recent-pro-tip + -if viewing_self? + =link_to 'Share a Pro Tip',new_protip_path, class: 'tip share-a-protip track', 'data-action' => 'create protip', 'data-from' => 'profile card', 'title' => @user.skills.empty? ? "Fill out your profile by adding some skills first, then share some Pro Tips!" : "Share your best coding tidbits!" + + -else + h4 Most recent Protip + - recent_protips(1).each do |protip| + = link_to protip.title, protip_path(protip.public_id), :class => 'track', 'data-action' => 'view protip', 'data-from' => 'profile card' + + -if @user.skills.empty? + -if viewing_self? + .no-skills + p + |Adding a few skills you're good at will get you started earning some cred and unlocking achievements. Here are some suggestions: + br + br + strong.no-skill =" Loving Visual Basic" + strong.no-skill =" IE6" + br + =link_to(" Of course not, add a real skill ", '#addskill', :class => 'add-skill track', 'data-action' => 'add skill', 'data-from' => 'profile (first skill)') + =render 'add_skill' + -else + .profile-head + h2 Skills & Achievements + -if viewing_self? + =link_to('Add Skill', '#addskill', :class => 'add-skill track', 'data-action' => 'add skill', 'data-from' => 'profile') + =render 'add_skill' + ul.skills + -@user.skills.each do |skill| + -cache ['v4', skill, skill.protips.size, skill.badges_count, skill.repos.count, signed_in?, viewing_self?] do + li class=(skill.locked? ? 'locked' : 'unlocked') + .skill-left + h3=skill.name.downcase + ul + -if skill.has_endorsements? + li="Received #{pluralize(skill.endorsements_count, 'endorsement')}" + -if skill.has_repos? + li="Has open sourced #{pluralize(skill.repos.count, "#{skill.name.downcase} project")}" + -if skill.has_events? + li=skill_event_message(skill) + -if skill.has_protips? + li="Has shared #{pluralize(skill.protips.count, 'original protip')}" + .skill-right + -if skill.locked? + p.help-text data-skill="#{skill.id}" =skill_help_text(skill) + -else + ul + -skill.matching_badges_in(@user.badges).each do |badge| + li=image_tag(badge.image_path, :title => badge.description, :class => 'tip') + .details.cf.hide + -if skill.has_endorsements? + h4 Endorsed by + ul.endorsements + -skill.endorsements.each do |endorsement| + li + =avatar_image_tag(endorsement.endorser, 'data-skill' => skill.id, :class => 'tip', :title => endorsement.endorser.display_name) + + -if skill.has_repos? + h4 Repos + ul.repos + -skill.repos.each do |repo| + li + =link_to(repo[:name], repo[:url],:class=>'track','data-action' =>'view repo', 'data-from' => 'profile skill', :target => '_blank') + -if skill.has_protips? + h4 Protips shared + ul.protips + -skill.protips.each do |protip| + li + =link_to(protip.title,protip_path(protip),:class=>'track','data-action' =>'view protip', 'data-from' => 'profile skill') + -if skill.has_events? + h4 Events attended + ul.events + -skill.speaking_events.each do |event| + li + |Spoke at + =link_to(event[:name], event[:url],:class=>'track','data-action' =>'view speaking event', 'data-from' => 'profile skill') + -skill.attended_events.each do |event| + li + |Attended + =link_to(event[:name], event[:url],:class=>'track','data-action' =>'view attending event', 'data-from' => 'profile skill') + -if !viewing_self? + .endorse-wrap + =form_tag(user_endorsements_path(@user)) do + =hidden_field_tag :skill_id, skill.id + =link_to('Endorse', user_endorsements_path(@user),:class=>"track endorse #{not_signedin_class}",'data-skill'=>skill.id, 'data-action' => 'endorse user', 'data-from' => 'profile skill') + -elsif viewing_self? && signed_in? && skill.deletable? + .remove + =button_to('Remove', user_skill_path(@user, skill), :method=>:delete, :class=>'track destroy', 'data-skill' => skill.id, 'data-action' => 'delete skill', 'data-from' => 'profile skill') + +.sidebar + aside.profile-sidebar + ul.profile-details + -unless @user.about.blank? + li + h4 About + p=@user.about + li + h4 Links + ul.social-links + -social_bookmarks(@user).each do |bookmark| + =bookmark.html_safe + -if viewing_self? && !remaining_bookmarks(@user).empty? + li.link-to-level-up + h4 Link to level up + ul.social-links + -remaining_bookmarks(@user).each do |bookmark| + =bookmark.html_safe + -if viewing_self? + li=link_to('', edit_user_path(@user) + '#social', :class=>'add-network track', 'data-action' => 'add social bookmark', 'data-from' => 'profile sidebar') + + + -if @user.membership + li + h4 Team + =link_to friendly_team_path(@user.membership.team),class:'team-link track', 'data-action' => 'view team', 'data-from' => 'profile sidebar' + span.team-avatar=image_tag(@user.membership.team.avatar_url, :width => 22, :height => 22) + div itemprop="affiliation" =truncate("#{@user.membership.team.name}", :length => 28) + -if viewing_self? + = link_to 'Leave team', team_member_path(@user.membership.team, @user), :method => :delete, :confirm => "Are you sure you want to leave team #{@user.membership.team.name}", :class => "leave-team track", 'data-action' => 'leave team', 'data-from' => 'profile page' + + -elsif viewing_self? + li.team-self + =link_to new_team_path,class:'profile-create-team track', 'data-action' => 'create team', 'data-from' => 'profile sidebar' + span.team-avatar Reserve Team's Name + + + .network + -if viewing_self? + -unless @user.user_followers.empty? + h4.your-followers-header + ="You have #{@user.user_followers.size} followers" + =link_to('Your Connections', followers_path(:username => @user.username), :class => "your-network track #{@user.team.nil? ? 'no-team' : ''}", 'data-action' => 'view connections', 'data-from' => 'profile sidebar') + + -else + -if signed_in? && current_user.following?(@user) + =link_to('', follow_user_path(@user.username), :method => :post, :remote => true, :class => 'add-to-network following track', 'data-action' => 'unfollow user', 'data-from' => 'profile sidebar') + -elsif signed_in? + =link_to('', follow_user_path(@user.username), :method => :post, :remote => true, :class => 'add-to-network track', 'data-action' => 'follow user', 'data-from' => 'profile sidebar') + -else + =link_to('', signin_path(:flash => 'You must signin or signup before you can follow someone'), :class => 'add-to-network noauth track', 'data-action' => 'follow user', 'data-from' => 'profile sidebar') + -if signed_in? && @user.following?(current_user) + .followed-back + p="#{@user.short_name} is following you" + + -if viewing_self? + =share_profile('Share profile on Twitter', @user, :class => 'share-profile-side track', 'data-action' => 'share profile', 'data-from' => 'profile sidebar') + + -if viewing_self? + .rev-share-box + h2 Share your profile + ul.share + li.embed-code + p + |Easily embed your personal endorse button on your open source projects or blog + .count + = html_embed_code_with_count + .embed-code-button + =link_to '','#', class:'show-embed-codes track', 'data-action' => 'view embed code', 'data-from' => 'profile sidebar' + .embed-codes.hide + .embed.embed-markdown + .hint.markdown + h4 Markdown code + span + |(put in Github README.md) + =text_area_tag 'Markdown', markdown_embed_code_with_count + .embed.embed-html + .hint.html + h4 HTML code + =text_area_tag 'HTML', html_embed_code_with_count + + = render('show_admin_panel', user: @user) if is_admin? diff --git a/app/views/users/update.js.erb b/app/views/users/update.js.erb new file mode 100644 index 00000000..6a934d55 --- /dev/null +++ b/app/views/users/update.js.erb @@ -0,0 +1,5 @@ +<% if(flash.now[:notice]) %> + alert(<%= flash.now[:notice] %>); +<% end %> + +$('.edit_tabs').html(<%=j render 'users/edit', user: @user %>); \ No newline at end of file diff --git a/app/views/weekly_digest/_new_relic.html.haml b/app/views/weekly_digest/_new_relic.html.haml index 21b8fe4a..ecf4866b 100644 --- a/app/views/weekly_digest/_new_relic.html.haml +++ b/app/views/weekly_digest/_new_relic.html.haml @@ -14,5 +14,5 @@ %tr.btns{:style => "margin: 0;padding: 0;"} %td.btns-box{:colspan => "7", :style => "margin: 0;padding: 20px 90px;border-top: solid 1px #cbc9c4;"} - %a.browse-networks{:href => "http://newrelic.com/lp/coderwall?utm_source=CWAL&utm_medium=banner_ad&utm_content=newsletter&utm_campaign=coderwall&mpc=BA-CWAL-web-en-100-coderwall-newsletter", :style => "margin: 0;padding: 8px 16px;background: #3d8dcc;font-family: Helvetica Neue, Helvetica, Arial, sans-serif;font-size: 14px;line-height: 22px;display: inline-block;width: 300px;color: #fff;text-decoration: none;-webkit-border-radius: 4px;border-radius: 4px;text-align: center;"} + %a.browse-networks{:href => "http://newrelic.com/sp/coderwall?utm_source=CWAL&utm_medium=promotion&utm_content=coderwall&utm_campaign=coderwall&mpc=PM-CWAL-web-Signup-100-coderwall-shirtpromo", :style => "margin: 0;padding: 8px 16px;background: #3d8dcc;font-family: Helvetica Neue, Helvetica, Arial, sans-serif;font-size: 14px;line-height: 22px;display: inline-block;width: 300px;color: #fff;text-decoration: none;-webkit-border-radius: 4px;border-radius: 4px;text-align: center;"} Test drive New Relic for free and get a Coderwall tee diff --git a/app/views/weekly_digest/digest_template.html.haml b/app/views/weekly_digest_mailer/digest_template.html.haml similarity index 100% rename from app/views/weekly_digest/digest_template.html.haml rename to app/views/weekly_digest_mailer/digest_template.html.haml diff --git a/app/views/weekly_digest_mailer/weekly_digest.html.haml b/app/views/weekly_digest_mailer/weekly_digest.html.haml new file mode 100644 index 00000000..c0819287 --- /dev/null +++ b/app/views/weekly_digest_mailer/weekly_digest.html.haml @@ -0,0 +1,179 @@ +- nopad = 'margin: 0; padding: 0; ' +- sans_serif = 'font-family: Helvetica Neue, Helvetica, Arial, sans-serif;' +- serif = 'font-family: Georgia, Times, Times New Roman, serif;' +!!! +%html{style: nopad} + %head{style: nopad} + %body{style: "margin: 0; padding: 60px 0; background-color: #48494e; -webkit-font-smoothing: antialiased; width: 100% !important; -webkit-text-size-adjust: none;"} + %table{style: "width: 100%; margin: 0 auto; background: ##48494e;"} + %tr + %td{style: "background: ##48494e;"} + %table{style: "margin: 0 auto 40px auto; padding: 0; width: 100%;"} + %tr + %td{style: "margin: 0 auto; padding: 0; width: 600px;"} + %table.logo{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto 40px auto; padding: 0; width: 211px;", width: 211} + %tr{style: nopad} + %td{style: nopad} + %img{alt: "Coderwall Logo", height: 35, src: image_url('email/coderwall-logo.jpg'), style: nopad, width: 211} + %table.header{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0; width: 600px; background: #fff; -webkit-border-top-left-radius: 6px; -webkit-border-top-right-radius: 6px; border-top-left-radius: 6px; border-top-right-radius: 6px;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %img{alt: "Email Header", height: 159, src: image_url('email/email-header.png'), style: nopad, width: 600} + - if @stats.map{|stat| stat[1]}.reduce(:+) >= 5 + %table.stats{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0; width: 600px; background: #fff; height: 140px; background-color: #ece9e2; border-top: solid 2px #cbc9c4; border-bottom: solid 2px #cbc9c4;", width: 600} + %tr.stats{style: "margin: 0 auto; padding: 0; width: 600px; background: #fff; height: 140px; background-color: #ece9e2; border-top: solid 2px #cbc9c4; border-bottom: solid 2px #cbc9c4;"} + -[@stats.second, @stats.first, @stats.third].compact.each do |stat, count| + %td{style: "#{nopad} width: 120px; background: url(images/dots.png) no-repeat right center;"} + %h2{style: "#{nopad} font-weight: normal; #{serif} text-align: center; font-size: 70px; color: #48494e; line-height: 72px;"} + = count + %h3{style: "#{nopad} font-weight: bold; #{sans_serif} font-size: 14px; line-height: 22px; text-align: center; text-transform: uppercase; color: #99958b;"} + = stat.to_s.humanize + %table.comment{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 20px 30px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %p{style: "#{nopad} #{sans_serif} font-size: 14px; line-height: 22px; text-align: center;"} + View all your stats + = succeed "." do + %a{href: dashboard_url(@issue), style: "#{nopad} color: #3d8dcc; text-decoration: underline;"} on your dashboard + + + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.tips{border: 0, cellpadding: 0, cellspacing: 0, style: "#{nopad} width: 520px; border: #cbc9c4 solid 2px; -webkit-border-radius: 6px; border-radius: 6px; overflow: hidden;"} + %tr.title{style: "#{nopad} height: 50px; line-height: 50px;"} + %td{colspan: 6, style: nopad} + %h2{style: "#{nopad} font-weight: normal; #{serif} text-align: center; background: #ECE9E2; font-size: 19px; color: #48494e; margin-bottom: 20px;"} + This week's pro tips for you + + - @protips.first(5).each do |protip| + %tr.tip{style: nopad} + %td.avatar{style: "#{nopad} padding-left: 30px; width: 36px; padding-bottom: 20px;"} + %img{alt: "Avatar", height: 36, src: image_url(users_image_path(protip.user)), style: "#{nopad} border: solid 2px #fff; -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1);", width: 36} + %td.link{style: "#{nopad} padding-right: 20px; padding-left: 10px; width: 270px; padding-bottom: 20px;"} + %a{href: protip_url(protip.public_id, @issue), style: "#{nopad} #{sans_serif} font-size: 14px; line-height: 22px; color: #48494E; text-decoration: none; display: block;"} + = protip.title + -if protip.best_stat.value.try(:to_i) == 0 + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: 'u'; font-size: 19px;"} + -elsif protip.best_stat.name == "upvotes" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: 'u'; font-size: 19px;"} + =image_tag("email/upvote.png") + -elsif protip.best_stat.name == "comments" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; font-family: 'oli'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; content: '7'; font-size: 19px;"} + =image_tag("email/comment.png") + -elsif protip.best_stat.name == "views" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: '6'; font-size: 19px;"} + =image_tag("email/eye.png") + -elsif protip.best_stat.name == "hawt" + %td.thumb{style: "margin: 0; padding: 0 5px; width: 15px; padding-bottom: 20px; content: '2'; font-size: 19px; color: #f35e39;"} + =image_tag("email/flame.png") + %td.upvotes{style: "margin: 0; padding: 0 5px; #{sans_serif} font-size: 14px; line-height: 22px; width: 15px; height: 36px; padding-bottom: 20px;"} + %h4{style: "#{nopad} font-weight: normal;"} + = formatted_best_stat_value(protip) unless protip.best_stat.name =~ /hawt/ || protip.best_stat.value.try(:to_i) == 0 + %tr.btns{style: nopad} + %td.btns-box{colspan: 6, style: "margin: 0; padding: 20px 90px; border-top: solid 1px #cbc9c4;"} + %a.share-tip{href: new_protip_url(@issue), style: "margin: 0; padding: 6px 16px; background: #d75959; margin-right: 20px; #{sans_serif} font-size: 14px; line-height: 22px; display: inline-block; width: 120px; color: #fff; text-decoration: none; -webkit-border-radius: 4px; border-radius: 4px; text-align: center;"} + Share a protip + %a.browse-networks{href: root_url(@issue), style: "margin: 0; padding: 6px 16px; background: #3d8dcc; #{sans_serif} font-size: 14px; line-height: 22px; display: inline-block; width: 120px; color: #fff; text-decoration: none; -webkit-border-radius: 4px; border-radius: 4px; text-align: center;"} + Trending protips + - unless @most.nil? + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.activity{border: 0, cellpadding: 0, cellspacing: 0, style: "#{nopad} width: 520px; border: #cbc9c4 solid 2px; -webkit-border-radius: 6px; border-radius: 6px; overflow: hidden;"} + %tr.title{style: "#{nopad} height: 50px; line-height: 50px;"} + %td{colspan: 2, style: nopad} + %h2{style: "#{nopad} font-weight: normal; #{serif} text-align: center; background: #ECE9E2; font-size: 19px; color: #48494e; margin-bottom: 20px;"} + Activity from your connections + %tr{style: nopad} + %td.activity-title{style: "margin: 0; padding: 0 0 0 30px;"} + %h2{style: "#{nopad} font-weight: normal; #{serif} font-size: 20px; background: url(#{image_url('email/big-gold-star.png')}) no-repeat left top; padding-left: 30px;"} + == Most #{@star_stat_string} + %td.activity-avatar{style: "#{nopad} padding-right: 30px;"} + %img{alt: "User Avatar", src: image_url(users_image_path(@most[:user])), style: "#{nopad} border: solid 2px #fff; -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1);"} + + %tr{style: nopad} + %td.activity-message{style: "margin: 0; padding: 10px 20px 20px 30px;"} + %p{style: "#{nopad} #{sans_serif} font-size: 14px; line-height: 22px;"} + %a{href: badge_url(@most[:user].username, @issue), style: "#{nopad} color: #3d8dcc;"} + = @most[:user].short_name + had + = @most[@star_stat] > 1 ? "#{@most[@star_stat]}" : "most" + ==#{@star_stat_string} this week. + = succeed "." do + %a{href: badge_url(@most[:user].username, @issue), style: "#{nopad} color: #3d8dcc;"} + == View #{@most[:user].username}'s profile + - unless @team.nil? + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.team{border: 0, cellpadding: 0, cellspacing: 0, style: "#{nopad} width: 520px; border: #cbc9c4 solid 2px; -webkit-border-radius: 6px; border-radius: 6px; overflow: hidden;"} + %tr.title{style: "#{nopad} height: 50px; line-height: 50px;"} + %td{colspan: 2, style: nopad} + %h2{style: "#{nopad} font-weight: normal; #{serif} text-align: center; background: #ECE9E2; font-size: 19px; color: #48494e; margin-bottom: 20px;"} + Featured engineering team + %tr{style: nopad} + %td.team-avatar{style: "margin: 0; padding: 10px 0 30px 20px; width: 120px;"} + %img{alt: "Team Avatar", height: 89, src: image_url(@team.avatar_url), style: "#{nopad} border: solid 3px #eaeaea;", width: 89} + %td.job-info{style: "margin: 0; padding: 25px;"} + %h2{style: "#{nopad} font-weight: normal; #{serif} font-size: 24px; line-height: 22px; margin-bottom: 6px;"} + = @team.name + %h3{style: "#{nopad} font-weight: normal; #{serif} font-size: 16px; line-height: 22px; margin-bottom: 6px;"} + = truncate(@team.hiring_message, length: 80) + %a{href: teamname_url(@team.slug, @issue) + "#open-positions", style: "#{nopad} color: #3d8dcc;"} + = @team.name + is looking for + = @job.title + %tr + %td{colspan: 2, style: "width: 100%;"} + %table{style: "width: 100%;"} + %tr.team-btm{style: nopad} + %td.team-members{style: "margin: 0; padding: 25px 15px 25px 25px; width: 158px; border-top: solid 1px #eaeaea; border-right: solid 1px #eaeaea;"} + -@team.most_influential_members_for(@user).first(3).each do |member| + %img{alt: "Avatar", height: 36, src: image_url(users_image_path(member)), style: "#{nopad} border: solid 2px #fff; -webkit-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.1); margin-right: 10px;", width: 36} + %td.stack{style: "margin: 0; padding: 0 0 0 25px; border-top: solid 1px #eaeaea;"} + %p{style: "#{nopad} #{serif} font-size: 16px; line-height: 22px;"} + =truncate(@team.tags_for_jobs.join(", "), length: 35) + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #fff;", width: 600} + %tr{style: nopad} + %td{style: nopad} + %table.top-tip{border: 0, cellpadding: 0, cellspacing: 0, style: nopad} + %tr{style: nopad} + %td.glasses{style: "margin: 0; padding: 0 40px 30px 0;"} + %img{alt: "Glasses", height: 114, src: image_url("email/glasses.png"), style: nopad, width: 155} + %td.tip{style: "margin: 0; padding: 0 0 30px 0; text-align: right;"} + %h2{style: "#{nopad} font-weight: normal; #{serif} color: #99958b; margin-bottom: 10px;"} + This weeks top tip: + %h3{style: "#{nopad} font-weight: bold; #{sans_serif} font-size: 16px; line-height: 22px; color: #48494E;"} + - unless @user.team.nil? + -if @user.team.premium? + - if @user.team.hiring? + The more popular pro tips + = @user.team.name + team members author, the more exposure your jobs receive + - else + add open positions to your team page and they will get featured here + -else + Want + =@user.team.name + featured here? + %a{href: employers_url(@issue), style: "#{nopad} color: #3d8dcc;"} add open positions + - else + Want your team featured here? + %a{href: employers_url(@issue), style: "#{nopad} color: #3d8dcc;"} create team + + %table.outside{border: 0, cellpadding: 0, cellspacing: 0, style: "margin: 0 auto; padding: 0 40px 20px 40px; width: 600px; background: #48494e;", width: 600} + %tr{style: nopad} + %td{style: "#{nopad} text-align: center"} + %p.reminder{style: "color: #fff; font-size: 12px; #{sans_serif} margin-top: 0; margin-bottom: 15px; padding-top: 0; padding-bottom: 0; line-height: 18px;"} + You're receiving this email because you signed up for Coderwall. We hate spam and make an effort to keep notifications to a minimum. + %p{style: "color: #c9c9c9; font-size: 12px; #{sans_serif}"} + %preferences{style: "color: #3ca7dd; text-decoration: none;"}> + %strong + %a{href: "https: //coderwall.com/settings#email", style: "color: #3ca7dd; text-decoration: none;"} + Edit your subscription + \ | + %unsubscribe{style: "color: #3ca7dd; text-decoration: none;"} + %strong + %a{href: '%unsubscribe_url%', style: "color: #3ca7dd; text-decoration: none;"} + Unsubscribe instantly diff --git a/app/views/weekly_digest/weekly_digest.text.erb b/app/views/weekly_digest_mailer/weekly_digest.text.erb similarity index 95% rename from app/views/weekly_digest/weekly_digest.text.erb rename to app/views/weekly_digest_mailer/weekly_digest.text.erb index d9ad4579..b41ba37f 100644 --- a/app/views/weekly_digest/weekly_digest.text.erb +++ b/app/views/weekly_digest_mailer/weekly_digest.text.erb @@ -6,7 +6,7 @@ Your weekly brief <% end %> <% end %> -View all your stats on your dashboard: <%= dashboard_url(@issue) %> +View all your stats on your dashboard: DASHBOARD URL This week's protips for you @@ -58,4 +58,4 @@ This weeks top tip: Want your team featured here? create team: <%= employers_url(@issue) %> <% end %> -<%= Notifier::SPAM_NOTICE %> +<%= NotifierMailer::SPAM_NOTICE %> diff --git a/app/workers/activate_pending_users_worker.rb b/app/workers/activate_pending_users_worker.rb new file mode 100644 index 00000000..f18b6fbf --- /dev/null +++ b/app/workers/activate_pending_users_worker.rb @@ -0,0 +1,15 @@ +class ActivatePendingUsersWorker + include Sidekiq::Worker + sidekiq_options queue: :user + + def perform + # Spawning possibly many thousands + # of workers the order doesn't really matter + # but would like to spread their execution + # over the next hour to avoid overloading + # the database. + User.pending.find_each(batch_size: 100) do |user| + UserActivateWorker.perform_in(Random.rand(0..59).minutes, user.id) + end + end +end diff --git a/app/workers/protip_mailer_popular_protips_send_worker.rb b/app/workers/protip_mailer_popular_protips_send_worker.rb new file mode 100644 index 00000000..7bbc5882 --- /dev/null +++ b/app/workers/protip_mailer_popular_protips_send_worker.rb @@ -0,0 +1,28 @@ +class ProtipMailerPopularProtipsSendWorker + include Sidekiq::Worker + sidekiq_options queue: :mailer + + def perform(user_id, protip_ids, from, to) + fail "Only #{protip_ids.count} protips but expected 10" unless protip_ids.count == 10 + + begin + if REDIS.sismember(ProtipMailer::CAMPAIGN_ID, user_id.to_s) + Rails.logger.warn("Already sent email to #{user_id} please check Redis SET #{ProtipMailer::CAMPAIGN_ID}.") + else + Rails.logger.warn("Sending email to #{user_id}.") + # In development the arguments are the correct type but in production + # they have to be recast from string back to date types :D + from = Time.zone.parse(from.to_s) + to = Time.zone.parse(to.to_s) + user = User.find(user_id.to_i) + protips = Protip.where('id in (?)', protip_ids.map(&:to_i) ) + fail "Only #{protips.count} protips but expected 10" unless protips.count == 10 + + ProtipMailer.popular_protips(user, protips, from, to).deliver + end + rescue => ex + Rails.logger.error("[ProtipMailer.popular_protips] Unable to send email due to '#{ex}' >>\n#{ex.backtrace.join("\n ")}") + Rails.logger.ap([from, to, user_id, protip_ids], :error) + end + end +end diff --git a/app/workers/protip_mailer_popular_protips_worker.rb b/app/workers/protip_mailer_popular_protips_worker.rb new file mode 100644 index 00000000..8d26d146 --- /dev/null +++ b/app/workers/protip_mailer_popular_protips_worker.rb @@ -0,0 +1,20 @@ +class ProtipMailerPopularProtipsWorker + include Sidekiq::Worker + sidekiq_options queue: :mailer + + def perform(from, to) + + # In development the arguments are the correct type but in production + # they have to be recast from string back to date types :D + from = Time.zone.parse(from.to_s) + to = Time.zone.parse(to.to_s) + + protip_ids = ProtipMailer::Queries.popular_protips(from, to).map(&:id) + + fail "Only #{protip_ids.count} protips but expected 10" unless protip_ids.count == 10 + + User.receives_digest.order('updated_at desc').find_each(batch_size: 100) do |user| + ProtipMailerPopularProtipsSendWorker.perform_async(user.id, protip_ids, from, to) + end + end +end diff --git a/app/workers/refresh_stale_users_worker.rb b/app/workers/refresh_stale_users_worker.rb new file mode 100644 index 00000000..06a3adab --- /dev/null +++ b/app/workers/refresh_stale_users_worker.rb @@ -0,0 +1,23 @@ +class RefreshStaleUsersWorker + include Sidekiq::Worker + sidekiq_options queue: :user + + def perform + user_records.find_each(batch_size: 1000) do |user| + RefreshUserJob.perform_in(minutes, user.id) + end + end + + def minutes + # spread the execution of the spawned jobs across the next 24 hours + Random.rand(0..1439).minutes + end + + def user_records + User. + active. + where('last_refresh_at < ?', 5.days.ago). + order('last_refresh_at ASC'). + select(:id) + end +end diff --git a/app/workers/sitemap_refresh_worker.rb b/app/workers/sitemap_refresh_worker.rb new file mode 100644 index 00000000..f8166dc0 --- /dev/null +++ b/app/workers/sitemap_refresh_worker.rb @@ -0,0 +1,43 @@ +class SitemapRefreshWorker + include Sidekiq::Worker + + sidekiq_options queue: :index + + def perform + # ArgumentError: Missing host to link to! Please provide the :host parameter, set default_path_options[:host], or set :only_path to true + SitemapGenerator::Sitemap.default_host = 'https://coderwall.com' + SitemapGenerator::Sitemap.public_path = 'tmp/' + SitemapGenerator::Sitemap.sitemaps_host = "http://#{ENV['FOG_DIRECTORY']}.s3.amazonaws.com/" + SitemapGenerator::Sitemap.sitemaps_path = 'sitemaps/' + SitemapGenerator::Sitemap.adapter = SitemapGenerator::WaveAdapter.new + + SitemapGenerator::Sitemap.create do + add('/welcome', priority: 0.7, changefreq: 'monthly') + add('/contact_us', priority: 0.2, changefreq: 'monthly') + add('/blog', priority: 0.5, changefreq: 'weekly') + add('/api', priority: 0.2, changefreq: 'monthly') + add('/faq', priority: 0.2, changefreq: 'monthly') + add('/privacy_policy', priority: 0.2, changefreq: 'monthly') + add('/tos', priority: 0.2, changefreq: 'monthly') + add('/jobs', priority: 0.8, changefreq: 'daily') + add('/employers', priority: 0.7, changefreq: 'monthly') + + Protip.find_each(batch_size: 30) do |protip| + add(protip_path(protip), lastmod: protip.updated_at, priority: 1.0) + end + + Team.all.each do |team| + add(teamname_path(slug: team.slug), lastmod: team.updated_at, priority: 0.9) + team.jobs.each do |job| + add(job_path(slug: team.slug, job_id: job.public_id), lastmod: job.updated_at, priority: 1.0) + end + end + + User.find_each(batch_size: 30) do |user| + add(badge_path(user.username), lastmod: user.updated_at, priority: 0.9) + end + end + + SitemapGenerator::Sitemap.ping_search_engines + end +end diff --git a/app/workers/user_activate_worker.rb b/app/workers/user_activate_worker.rb new file mode 100644 index 00000000..7dd28c56 --- /dev/null +++ b/app/workers/user_activate_worker.rb @@ -0,0 +1,29 @@ +class UserActivateWorker + include Sidekiq::Worker + sidekiq_options queue: :user + + def perform(user_id) + begin + user = User.find(user_id) + return if user.active? + + begin + NotifierMailer.welcome_email(user.id).deliver + RefreshUserJob.new.perform(user.id) + user.activate! + + rescue => e + #User provided corrupted email, we can't email. + if e.message == '550 5.1.3 Invalid address' + user.destroy + return + else + raise e + end + + end + rescue ActiveRecord::RecordNotFound + return + end + end +end diff --git a/bin/autospec b/bin/autospec deleted file mode 100755 index 34630a4c..00000000 --- a/bin/autospec +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'autospec' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rspec-core', 'autospec') diff --git a/bin/b2json b/bin/b2json deleted file mode 100755 index 3ecf48d0..00000000 --- a/bin/b2json +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'b2json' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('bson', 'b2json') diff --git a/bin/cdiff b/bin/cdiff deleted file mode 100755 index e38c32e0..00000000 --- a/bin/cdiff +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'cdiff' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('term-ansicolor', 'cdiff') diff --git a/bin/compass b/bin/compass deleted file mode 100755 index ef9e0af9..00000000 --- a/bin/compass +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'compass' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('compass', 'compass') diff --git a/bin/decolor b/bin/decolor deleted file mode 100755 index af4d210b..00000000 --- a/bin/decolor +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'decolor' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('term-ansicolor', 'decolor') diff --git a/bin/erubis b/bin/erubis deleted file mode 100755 index 29e2718d..00000000 --- a/bin/erubis +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'erubis' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('erubis', 'erubis') diff --git a/bin/fog b/bin/fog deleted file mode 100755 index 58188c3e..00000000 --- a/bin/fog +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'fog' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('fog', 'fog') diff --git a/bin/geocode b/bin/geocode deleted file mode 100755 index 433a5478..00000000 --- a/bin/geocode +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'geocode' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('geocoder', 'geocode') diff --git a/bin/haml b/bin/haml deleted file mode 100755 index f2d49122..00000000 --- a/bin/haml +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'haml' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('haml', 'haml') diff --git a/bin/heroku b/bin/heroku deleted file mode 100755 index e77b5562..00000000 --- a/bin/heroku +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'heroku' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('heroku', 'heroku') diff --git a/bin/html2haml b/bin/html2haml deleted file mode 100755 index a940f8d9..00000000 --- a/bin/html2haml +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'html2haml' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('haml', 'html2haml') diff --git a/bin/htmldiff b/bin/htmldiff deleted file mode 100755 index 4d6f8828..00000000 --- a/bin/htmldiff +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'htmldiff' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('diff-lcs', 'htmldiff') diff --git a/bin/httparty b/bin/httparty deleted file mode 100755 index cbd27798..00000000 --- a/bin/httparty +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'httparty' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('httparty', 'httparty') diff --git a/bin/j2bson b/bin/j2bson deleted file mode 100755 index 08890904..00000000 --- a/bin/j2bson +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'j2bson' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('bson', 'j2bson') diff --git a/bin/kramdown b/bin/kramdown deleted file mode 100755 index 3234c871..00000000 --- a/bin/kramdown +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'kramdown' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('kramdown', 'kramdown') diff --git a/bin/launchy b/bin/launchy deleted file mode 100755 index 293ce231..00000000 --- a/bin/launchy +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'launchy' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('launchy', 'launchy') diff --git a/bin/ldiff b/bin/ldiff deleted file mode 100755 index cf6e117d..00000000 --- a/bin/ldiff +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'ldiff' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('diff-lcs', 'ldiff') diff --git a/bin/mongo_console b/bin/mongo_console deleted file mode 100755 index 5e8a028e..00000000 --- a/bin/mongo_console +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'mongo_console' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('mongo', 'mongo_console') diff --git a/bin/nokogiri b/bin/nokogiri deleted file mode 100755 index e0521fbc..00000000 --- a/bin/nokogiri +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'nokogiri' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('nokogiri', 'nokogiri') diff --git a/bin/oauth b/bin/oauth deleted file mode 100755 index 12085461..00000000 --- a/bin/oauth +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'oauth' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('oauth', 'oauth') diff --git a/bin/rackup b/bin/rackup deleted file mode 100755 index b047c817..00000000 --- a/bin/rackup +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'rackup' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rack', 'rackup') diff --git a/bin/rails b/bin/rails index 330b4cc1..215a2ea0 100755 --- a/bin/rails +++ b/bin/rails @@ -3,18 +3,5 @@ begin load File.expand_path("../spring", __FILE__) rescue LoadError end -# -# This file was generated by Bundler. -# -# The application 'rails' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' require 'bundler/setup' - load Gem.bin_path('rails', 'rails') diff --git a/bin/rake b/bin/rake index 04e51973..0fb4e07e 100755 --- a/bin/rake +++ b/bin/rake @@ -3,18 +3,5 @@ begin load File.expand_path("../spring", __FILE__) rescue LoadError end -# -# This file was generated by Bundler. -# -# The application 'rake' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' require 'bundler/setup' - load Gem.bin_path('rake', 'rake') diff --git a/bin/rake2thor b/bin/rake2thor deleted file mode 100755 index 9c6d5ee4..00000000 --- a/bin/rake2thor +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'rake2thor' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('thor', 'rake2thor') diff --git a/bin/redcarpet b/bin/redcarpet deleted file mode 100755 index 9ac0c3a7..00000000 --- a/bin/redcarpet +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'redcarpet' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('redcarpet', 'redcarpet') diff --git a/bin/resque b/bin/resque deleted file mode 100755 index 746c469b..00000000 --- a/bin/resque +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'resque' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('resque', 'resque') diff --git a/bin/resque-web b/bin/resque-web deleted file mode 100755 index ca1209ce..00000000 --- a/bin/resque-web +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'resque-web' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('resque', 'resque-web') diff --git a/bin/restclient b/bin/restclient deleted file mode 100755 index bffddc7d..00000000 --- a/bin/restclient +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'restclient' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rest-client', 'restclient') diff --git a/bin/ri b/bin/ri deleted file mode 100755 index eaefbc0b..00000000 --- a/bin/ri +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'ri' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rdoc', 'ri') diff --git a/bin/rspec b/bin/rspec index bf2daff7..20060ebd 100755 --- a/bin/rspec +++ b/bin/rspec @@ -3,18 +3,5 @@ begin load File.expand_path("../spring", __FILE__) rescue LoadError end -# -# This file was generated by Bundler. -# -# The application 'rspec' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' require 'bundler/setup' - load Gem.bin_path('rspec-core', 'rspec') diff --git a/bin/ruby-prof b/bin/ruby-prof deleted file mode 100755 index dcb78b20..00000000 --- a/bin/ruby-prof +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'ruby-prof' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('ruby-prof', 'ruby-prof') diff --git a/bin/sass b/bin/sass deleted file mode 100755 index 395e9d5b..00000000 --- a/bin/sass +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'sass' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('sass', 'sass') diff --git a/bin/sass-convert b/bin/sass-convert deleted file mode 100755 index 76471530..00000000 --- a/bin/sass-convert +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'sass-convert' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('sass', 'sass-convert') diff --git a/bin/schema b/bin/schema deleted file mode 100755 index f6463e4d..00000000 --- a/bin/schema +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'schema' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('taps', 'schema') diff --git a/bin/scss b/bin/scss deleted file mode 100755 index cda9c4b3..00000000 --- a/bin/scss +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'scss' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('sass', 'scss') diff --git a/bin/sequel b/bin/sequel deleted file mode 100755 index e38b67c2..00000000 --- a/bin/sequel +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'sequel' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('sequel', 'sequel') diff --git a/bin/spork b/bin/spork deleted file mode 100755 index e329cb0d..00000000 --- a/bin/spork +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'spork' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('spork', 'spork') diff --git a/bin/stripe-console b/bin/stripe-console deleted file mode 100755 index c55a0c0a..00000000 --- a/bin/stripe-console +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'stripe-console' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('stripe', 'stripe-console') diff --git a/bin/taps b/bin/taps deleted file mode 100755 index 842656ea..00000000 --- a/bin/taps +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'taps' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('taps', 'taps') diff --git a/bin/thin b/bin/thin deleted file mode 100755 index 5396bd5e..00000000 --- a/bin/thin +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'thin' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('thin', 'thin') diff --git a/bin/thor b/bin/thor deleted file mode 100755 index 395fa69d..00000000 --- a/bin/thor +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'thor' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('thor', 'thor') diff --git a/bin/tilt b/bin/tilt deleted file mode 100755 index 5867e87c..00000000 --- a/bin/tilt +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'tilt' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('tilt', 'tilt') diff --git a/bin/tt b/bin/tt deleted file mode 100755 index b88d3046..00000000 --- a/bin/tt +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'tt' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('treetop', 'tt') diff --git a/bin/unicorn b/bin/unicorn deleted file mode 100755 index f03f325e..00000000 --- a/bin/unicorn +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'unicorn' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('unicorn', 'unicorn') diff --git a/bin/unicorn_rails b/bin/unicorn_rails deleted file mode 100755 index 269b4620..00000000 --- a/bin/unicorn_rails +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'unicorn_rails' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('unicorn', 'unicorn_rails') diff --git a/config.ru b/config.ru index be8e0c34..1c8eba36 100644 --- a/config.ru +++ b/config.ru @@ -1,21 +1,3 @@ -if ENV['RAILS_ENV'] == 'production' - require 'unicorn/worker_killer' - - max_request_min = 500 - max_request_max = 600 - - # Max requests per worker - use Unicorn::WorkerKiller::MaxRequests, max_request_min, max_request_max - - oom_min = (240) * (1024**2) - oom_max = (260) * (1024**2) - - # Max memory size (RSS) per worker - use Unicorn::WorkerKiller::Oom, oom_min, oom_max -end - require ::File.expand_path('../config/environment', __FILE__) -use Rack::Deflater - -run Badgiy::Application +run Coderwall::Application diff --git a/config/application.rb b/config/application.rb index d32f6bbe..fb8a2ccc 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,46 +1,34 @@ require File.expand_path('../boot', __FILE__) -require 'rails/all' -require 'sprockets/engines' +require 'active_record/railtie' +require 'action_mailer/railtie' +require 'sprockets/railtie' +I18n.config.enforce_available_locales = false -Bundler.require(:default, :assets, Rails.env) if defined?(Bundler) +Bundler.require(:default, Rails.env) if defined?(Bundler) -module Badgiy +module Coderwall class Application < Rails::Application - config.autoload_paths += %W(#{config.root}/app) - - config.autoload_paths += Dir[ Rails.root.join('app', 'models', 'concerns', '**/') ] - config.autoload_paths += Dir[ Rails.root.join('app', 'controllers', 'concerns', '**/') ] - config.autoload_paths += Dir[ Rails.root.join('app', 'services', '**/' ) ] - - config.autoload_paths << File.join(config.root, 'app', 'models', 'badges') - config.autoload_paths << File.join(config.root, 'lib') - - config.i18n.enforce_available_locales = true + config.autoload_paths += Dir[Rails.root.join('app', 'models', 'concerns', '**/' )] + config.autoload_paths += Dir[Rails.root.join('app', 'controllers', 'concerns', '**/' )] + config.autoload_paths += Dir[Rails.root.join('lib', '**/' )] config.assets.enabled = true config.assets.initialize_on_precompile = false config.encoding = 'utf-8' config.filter_parameters += [:password] - config.generators do |g| - g.test_framework :rspec, fixture: true - g.fixture_replacement :fabrication - g.orm :active_record - end - config.ember.variant = Rails.env.downcase.to_sym - config.assets.js_compressor = :uglifier - - config.logger = Logger.new(STDOUT) - config.logger.level = Logger.const_get(ENV['LOG_LEVEL'] ? ENV['LOG_LEVEL'].upcase : 'INFO') + config.assets.js_compressor = :uglifier config.after_initialize do - if %w{development test}.include?(Rails.env) + if ENV['ENABLE_HIRB'] && %w{development test}.include?(Rails.env) Hirb.enable end end + + config.exceptions_app = self.routes end end @@ -49,6 +37,3 @@ class Application < Rails::Application ActionView::Base.field_error_proc = Proc.new { |html_tag, instance| %(<span class="field_with_errors">#{html_tag}</span>).html_safe } - -require "#{Rails.root}/app/jobs/resque_support.rb" -require 'font_assets/railtie' # => loads font middleware so cloudfront can serve fonts that render in Firefox diff --git a/config/database.travis.yml b/config/database.travis.yml index bbcec564..f3d04a7b 100644 --- a/config/database.travis.yml +++ b/config/database.travis.yml @@ -1,5 +1,5 @@ test: adapter: postgresql - database: uglst_test + database: coderwall_test encoding: unicode username: postgres diff --git a/config/database.yml b/config/database.yml index f0e5de77..9b63ec9a 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,11 +1,7 @@ default: &default adapter: postgresql encoding: unicode - host: localhost - password: pool: 5 - port: <%= ENV['DEV_POSTGRES_PORT'] || 5432 %> - username: vagrant development: <<: *default @@ -14,3 +10,7 @@ development: test: <<: *default database: coderwall_test + +production: + <<: *default + database: coderwall_production diff --git a/config/environment.rb b/config/environment.rb index 69922d3e..62c37b3e 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,2 +1,2 @@ require File.expand_path('../application', __FILE__) -Badgiy::Application.initialize! +Coderwall::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 62a6cb76..73db916d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,26 +1,54 @@ -Badgiy::Application.configure do - config.action_controller.perform_caching = false +Coderwall::Application.configure do + config.eager_load = true + + require 'sidekiq/testing/inline' + + config.action_controller.perform_caching = false config.action_dispatch.best_standards_support = :builtin - config.action_mailer.delivery_method = :letter_opener + config.active_support.deprecation = :log + config.assets.compile = true + config.assets.compress = false + config.assets.debug = false + config.cache_classes = false + config.consider_all_requests_local = true + config.host = 'localhost:3000' + config.serve_static_assets = true + config.whiny_nils = true + + # Mailer settings config.action_mailer.raise_delivery_errors = false - config.active_support.deprecation = :log - config.assets.compile = true - config.assets.compress = false - config.assets.debug = false - config.cache_classes = false - config.consider_all_requests_local = true - config.host = 'localhost:3000' - config.serve_static_assets = false - config.whiny_nils = true + config.action_mailer.delivery_method = :file + config.action_mailer.file_settings = { location: "#{Rails.root}/tmp/mailers" } + config.action_mailer.asset_host = "http://#{config.host}" + # Raise exception on mass assignment protection for Active Record models config.active_record.mass_assignment_sanitizer = :strict # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) - config.active_record.auto_explain_threshold_in_seconds = 0.5 - - # Move cache dir's out of vagrant NFS directory - config.cache_store = [:file_store,"/tmp/codewall-cache/"] - config.assets.cache_store = [:file_store,"/tmp/codewall-cache/assets/"] - Rails.application.config.sass.cache_location = "/tmp/codewall-cache/sass/" + # config.active_record.auto_explain_threshold_in_seconds = 0.5 + + # Mock account credentials + OmniAuth.config.test_mode = true + OmniAuth.config.mock_auth[:linkedin] = OmniAuth::AuthHash.new({ + :provider => 'linkedin', + :uid => 'linkedin12345', + :info => {:nickname => 'linkedinuser'}, + :credentials => { + :token => 'linkedin1', + :secret => 'secret'}}) + OmniAuth.config.mock_auth[:twitter] = OmniAuth::AuthHash.new({ + :provider => 'twitter', + :uid => 'twitter123545', + :info => {:nickname => 'twitteruser'}, + :credentials => { + :token => 'twitter1', + :secret => 'secret'}}) + OmniAuth.config.mock_auth[:github] = OmniAuth::AuthHash.new({ + :provider => 'github', + :uid => 'github123545', + :info => {:nickname => 'githubuser'}, + :credentials => { + :token => 'github1', + :secret => 'secret'}}) end diff --git a/config/environments/production.rb b/config/environments/production.rb index 9108b3ff..18d02370 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,32 +1,20 @@ -Badgiy::Application.configure do +Coderwall::Application.configure do + config.eager_load = true config.cache_classes = true config.consider_all_requests_local = false config.action_controller.perform_caching = true - config.cache_store = :dalli_store config.force_ssl = true config.action_controller.asset_host = ENV['CDN_ASSET_HOST'] config.action_mailer.asset_host = ENV['CDN_ASSET_HOST'] - config.font_assets.origin = ENV['FONT_ASSETS_ORIGIN'] config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true - config.action_mailer.smtp_settings = { - authentication: :plain, - address: ENV['MAILGUN_SMTP_SERVER'], - port: ENV['MAILGUN_SMTP_PORT'], - domain: 'coderwall.com', - user_name: ENV['MAILGUN_SMTP_LOGIN'], - password: ENV['MAILGUN_SMTP_PASSWORD'] - } config.i18n.fallbacks = true config.active_support.deprecation = :notify config.serve_static_assets = true - config.assets.precompile = [/^[^_]/] config.assets.compile = true config.assets.compress = true config.assets.digest = true config.static_cache_control = 'public, max-age=31536000' config.host = ENV['HOST_DOMAIN'] end - -Rails.logger = Le.new(ENV['LOGENTRIES_TOKEN'], ssl: true) diff --git a/config/environments/test.rb b/config/environments/test.rb index 80bd9799..38d23c00 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,15 +1,17 @@ -Badgiy::Application.configure do +Coderwall::Application.configure do + config.eager_load = true config.cache_classes = false config.whiny_nils = true config.consider_all_requests_local = true - config.action_dispatch.show_exceptions = false + config.action_dispatch.show_exceptions = true config.action_controller.allow_forgery_protection = false config.action_mailer.delivery_method = :test config.active_support.deprecation = :stderr config.action_controller.perform_caching = false - Tire::Model::Search.index_prefix "#{Rails.application.class.parent_name.downcase}_#{Rails.env.to_s.downcase}" + Tire::Model::Search.index_prefix 'coderwall_test' config.host = 'localhost:3000' # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets config.assets.allow_debugging = true + config.middleware.use RackSessionAccess::Middleware # allows to set session from within Capybara end diff --git a/config/initializers/acts_as_taggable_on.rb b/config/initializers/acts_as_taggable_on.rb new file mode 100644 index 00000000..8d7bc883 --- /dev/null +++ b/config/initializers/acts_as_taggable_on.rb @@ -0,0 +1,2 @@ +ActsAsTaggableOn.force_lowercase = true +ActsAsTaggableOn::Tag.class_eval { acts_as_followable } \ No newline at end of file diff --git a/config/initializers/asset_logging.rb b/config/initializers/asset_logging.rb deleted file mode 100644 index 27b56ec1..00000000 --- a/config/initializers/asset_logging.rb +++ /dev/null @@ -1 +0,0 @@ -Rails.application.assets.logger = Logger.new($stdout) diff --git a/config/initializers/asset_sync.rb b/config/initializers/asset_sync.rb deleted file mode 100644 index 54d0e100..00000000 --- a/config/initializers/asset_sync.rb +++ /dev/null @@ -1,24 +0,0 @@ -if defined?(AssetSync) - AssetSync.configure do |config| - config.fog_provider = 'AWS' - config.aws_access_key_id = ENV['AWS_ACCESS_KEY_ID'] - config.aws_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY'] - config.fog_directory = ENV['FOG_DIRECTORY'] - - # Increase upload performance by configuring your region - # config.fog_region = 'eu-west-1' - # - # Don't delete files from the store - config.existing_remote_files = "keep" #"delete" - # - # Automatically replace files with their equivalent gzip compressed version - #config.gzip_compression = true - # - # Use the Rails generated 'manifest.yml' file to produce the list of files to - # upload instead of searching the assets directory. - #config.manifest = true - # - # Fail silently. Useful for environments such as Heroku - config.fail_silently = true - end -end \ No newline at end of file diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb new file mode 100644 index 00000000..44226a0a --- /dev/null +++ b/config/initializers/assets.rb @@ -0,0 +1,38 @@ +Coderwall::Application.configure do + config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/ + config.assets.precompile << 'alert.css' + config.assets.precompile << 'coderwall.css' + config.assets.precompile << 'coderwall.js' + config.assets.precompile << 'coderwallv2.css' + config.assets.precompile << 'coderwallv2.js' + config.assets.precompile << 'product_description.css' + config.assets.precompile << 'premium-teams.css' + config.assets.precompile << 'protip.css' + config.assets.precompile << 'account.js' + config.assets.precompile << 'protips.js' + config.assets.precompile << 'connections.js' + config.assets.precompile << 'jquery.js' + config.assets.precompile << 'jquery_ujs.js' + config.assets.precompile << 'hyphernator/hyphernator.js' + config.assets.precompile << 'search.js' + config.assets.precompile << 'history.adapter.jquery.js' + config.assets.precompile << 'history.js' + config.assets.precompile << 'protips-grid.js' + config.assets.precompile << 'underscore.js' + config.assets.precompile << 'html5shiv.js' + config.assets.precompile << 'tracking.js' + config.assets.precompile << 'teams.js' + config.assets.precompile << 'jquery.scrolldepth.js' + config.assets.precompile << 'premium.js' + config.assets.precompile << 'premium-admin.js' + config.assets.precompile << 'accounts.js' + config.assets.precompile << 'jquery.effects.core.js' + config.assets.precompile << 'jquery.effects.slide.js' + config.assets.precompile << 'settings.js' + config.assets.precompile << 'username-validation.js' + # config.assets.precompile << 'jquery-ketchup.all.min.js' + config.assets.precompile << 'user.js' + config.assets.precompile << 'autosaver.js' + config.assets.version = '1.5' +end + diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf..00000000 --- a/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/bonsai.rb b/config/initializers/bonsai.rb deleted file mode 100644 index 6276239c..00000000 --- a/config/initializers/bonsai.rb +++ /dev/null @@ -1,17 +0,0 @@ -if ENV['ELASTICSEARCH_URL'] - Tire.configure { logger $stdout, :level => (ENV['ELASTICSEARCH_LOG_LEVEL'] || 'debug') } - Tire.configure do - url ENV['ELASTICSEARCH_URL'] - end - BONSAI_INDEX_NAME = ENV['ELASTICSEARCH_INDEX'] -elsif ENV['BONSAI_INDEX_URL'] - Tire.configure { logger $stdout, :level => (ENV['ELASTICSEARCH_LOG_LEVEL'] || 'debug') } - Tire.configure do - url "http://index.bonsai.io" - end - BONSAI_INDEX_NAME = ENV['BONSAI_INDEX_URL'][/[^\/]+$/] -else - Tire.configure { logger Rails.root + "log/tire_#{Rails.env}.log" } - app_name = Rails.application.class.parent_name.underscore.dasherize - BONSAI_INDEX_NAME = "#{app_name}-#{Rails.env}" -end \ No newline at end of file diff --git a/config/initializers/cache_store.rb b/config/initializers/cache_store.rb new file mode 100644 index 00000000..118e9114 --- /dev/null +++ b/config/initializers/cache_store.rb @@ -0,0 +1,3 @@ +Coderwall::Application.configure do + config.cache_store = :redis_store, "#{ENV[ENV['REDIS_PROVIDER'] || 'REDIS_URL']}/#{ENV['REDIS_CACHE_STORE'] || 3}" +end diff --git a/config/initializers/carrier_wave.rb b/config/initializers/carrier_wave.rb index dd8cbe54..213d2a65 100644 --- a/config/initializers/carrier_wave.rb +++ b/config/initializers/carrier_wave.rb @@ -1,7 +1,7 @@ CarrierWave.configure do |config| config.root = Rails.root.join('tmp') - if Rails.env.test? or Rails.env.cucumber? + if Rails.env.test? config.storage = :file config.enable_processing = false elsif Rails.env.development? @@ -11,9 +11,9 @@ config.storage = :fog config.fog_directory = ENV['FOG_DIRECTORY'] config.fog_credentials = { - :provider => 'AWS', - :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'], - :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'] + provider: 'AWS', + aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'], + aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'] } end end @@ -21,5 +21,6 @@ CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+]/ CarrierWave::Backgrounder.configure do |c| - c.backend = :resque + c.backend :sidekiq end + diff --git a/config/initializers/database_connection.rb b/config/initializers/database_connection.rb new file mode 100644 index 00000000..bccd8977 --- /dev/null +++ b/config/initializers/database_connection.rb @@ -0,0 +1,14 @@ +# https://devcenter.heroku.com/articles/concurrency-and-database-connections#connection-pool +# +# Recommendation is to set pool equal to MAX_THREADS +# +Rails.application.config.after_initialize do + ActiveRecord::Base.connection_pool.disconnect! + + ActiveSupport.on_load(:active_record) do + config = ActiveRecord::Base.configurations[Rails.env] || Rails.application.config.database_configuration[Rails.env] + config['reaping_frequency'] = ENV['DB_REAP_FREQ'] || 10 # seconds + config['pool'] = ENV['DB_POOL'] || ENV['MAX_THREADS'] || 5 + ActiveRecord::Base.establish_connection(config) + end +end diff --git a/config/initializers/elasticsearch.rb b/config/initializers/elasticsearch.rb new file mode 100644 index 00000000..e181d660 --- /dev/null +++ b/config/initializers/elasticsearch.rb @@ -0,0 +1,5 @@ +Tire.configure do + url ENV['ELASTICSEARCH_URL'] +end + +Elasticsearch::Model.client = Elasticsearch::Client.new url: ENV['ELASTICSEARCH_URL'] diff --git a/config/initializers/extend_array.rb b/config/initializers/extend_array.rb deleted file mode 100644 index 7aac5dcf..00000000 --- a/config/initializers/extend_array.rb +++ /dev/null @@ -1,13 +0,0 @@ -Array.class_eval do - def chunk(pieces=2) - results = [] - counter = 0 - self.each do |item| - counter = 0 if counter == pieces - (results[counter] || (results << Array.new)) - results[counter] << item - counter = counter + 1 - end - results - end -end \ No newline at end of file diff --git a/config/initializers/feature_toggles.rb b/config/initializers/feature_toggles.rb deleted file mode 100644 index e5a44a95..00000000 --- a/config/initializers/feature_toggles.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Feature - -end \ No newline at end of file diff --git a/config/initializers/github.rb b/config/initializers/github.rb new file mode 100644 index 00000000..7efc8663 --- /dev/null +++ b/config/initializers/github.rb @@ -0,0 +1,5 @@ +Octokit.configure do |config| + config.client_id = ENV['GITHUB_CLIENT_ID'] + config.client_secret = ENV['GITHUB_SECRET'] + config.user_agent = 'Coderwall spider' +end \ No newline at end of file diff --git a/config/initializers/hamlbars.rb b/config/initializers/hamlbars.rb deleted file mode 100644 index abeaf303..00000000 --- a/config/initializers/hamlbars.rb +++ /dev/null @@ -1,2 +0,0 @@ -Hamlbars::Template.render_templates_for :ember -#Hamlbars::Template.enable_precompiler! diff --git a/config/initializers/honeybadger.rb b/config/initializers/honeybadger.rb deleted file mode 100644 index 0c9d4c30..00000000 --- a/config/initializers/honeybadger.rb +++ /dev/null @@ -1,5 +0,0 @@ -if Rails.env.production? - Honeybadger.configure do |config| - config.api_key = ENV['HONEYBADGER_API_KEY'] - end -end diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 9e8b0131..ac937e9d 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -1,10 +1,4 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end +ActiveSupport::Inflector.inflections do |inflect| + inflect.acronym 'RESTful' + inflect.acronym 'API' +end diff --git a/config/initializers/mail.rb b/config/initializers/mail.rb new file mode 100644 index 00000000..1c5e2e54 --- /dev/null +++ b/config/initializers/mail.rb @@ -0,0 +1,10 @@ +Coderwall::Application.configure do + config.action_mailer.smtp_settings = { + authentication: :plain, + address: ENV['MAILGUN_SMTP_SERVER'], + port: ENV['MAILGUN_SMTP_PORT'], + domain: 'coderwall.com', + user_name: ENV['MAILGUN_SMTP_LOGIN'], + password: ENV['MAILGUN_SMTP_PASSWORD'] + } +end \ No newline at end of file diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb deleted file mode 100644 index 72aca7e4..00000000 --- a/config/initializers/mime_types.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new mime types for use in respond_to blocks: -# Mime::Type.register "text/richtext", :rtf -# Mime::Type.register_alias "text/html", :iphone diff --git a/config/initializers/new_relic.rb b/config/initializers/new_relic.rb index 43a5f8db..70ef457e 100644 --- a/config/initializers/new_relic.rb +++ b/config/initializers/new_relic.rb @@ -1,4 +1,6 @@ -# Ensure the agent is started using Unicorn -# This is needed when using Unicorn and preload_app is not set to true. -# See http://support.newrelic.com/kb/troubleshooting/unicorn-no-data -#NewRelic::Agent.after_fork(:force_reconnect => true) if defined? Unicorn \ No newline at end of file +if Rails.env.production? + ::NewRelic::Agent.manual_start() + ::NewRelic::Agent.after_fork(force_reconnect: true) + + GC::Profiler.enable +end diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index a538dedd..4221750c 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -2,9 +2,9 @@ # http://rubydoc.info/gems/omniauth/OmniAuth/Strategies/Developer provider :developer unless Rails.env.production? - provider :github, Github::GITHUB_CLIENT_ID, Github::GITHUB_SECRET + provider :github, ENV['GITHUB_CLIENT_ID'], ENV['GITHUB_SECRET'] provider :twitter, ENV['TWITTER_CONSUMER_KEY'], ENV['TWITTER_CONSUMER_SECRET'] - provider :linkedin, LinkedInStream::KEY, LinkedInStream::SECRET + provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'] end OmniAuth.config.on_failure do |env| @@ -13,7 +13,6 @@ strategy = env['omniauth.error.strategy'] Rails.logger.error("OmniAuth #{strategy.class.name}::#{error_type}: #{exception.inspect}") - Honeybadger::Rack.new(Rack::Request.new(env)).notify_honeybadger(exception, env) if Rails.env.production? new_path = "#{env['SCRIPT_NAME']}#{OmniAuth.config.path_prefix}/failure?message=#{error_type}" [302, {'Location' => new_path, 'Content-Type' => 'text/html'}, []] diff --git a/config/initializers/pages.rb b/config/initializers/pages.rb index cdb67159..c2a495c5 100644 --- a/config/initializers/pages.rb +++ b/config/initializers/pages.rb @@ -1,15 +1,15 @@ -# Look at the *.html.haml files in the app/views/pages directory -STATIC_PAGES ||= Dir.glob('app/views/pages/*.html.{erb,haml}') - .map { |f| File.basename(f, '.html.erb') } - .map { |f| File.basename(f, '.html.haml') } +# Look at the *.html files in the app/views/pages directory +STATIC_PAGES ||= Dir.glob('app/views/pages/*.html*') + .map { |f| File.basename(f, '.html.slim') } + .map { |f| File.basename(f, '.html') } .reject{ |f| f =~ /^_/ } .sort .uniq -# Look at the *.html.haml files in the app/views/pages directory -STATIC_PAGE_LAYOUTS ||= Dir.glob('app/views/layouts/*.html.{erb,haml}') +# Look at the *.html files in the app/views/pages directory +STATIC_PAGE_LAYOUTS ||= Dir.glob('app/views/layouts/*.html*') .map { |f| File.basename(f, '.html.erb') } - .map { |f| File.basename(f, '.html.haml') } + .map { |f| File.basename(f, '.html.slim') } .reject{ |f| f =~ /^_/ } .sort .uniq diff --git a/config/initializers/rails_footnotes.rb b/config/initializers/rails_footnotes.rb deleted file mode 100644 index 4152df6f..00000000 --- a/config/initializers/rails_footnotes.rb +++ /dev/null @@ -1,4 +0,0 @@ -if defined?(Footnotes) && (Rails.env.development? || Rails.env.live?) - Footnotes.run! - # ... other init code -end diff --git a/config/initializers/rakismet.rb b/config/initializers/rakismet.rb new file mode 100644 index 00000000..d5664cbd --- /dev/null +++ b/config/initializers/rakismet.rb @@ -0,0 +1,4 @@ +Coderwall::Application.configure do + config.rakismet.key = ENV['AKISMET_KEY'] + config.rakismet.url = ENV['AKISMET_URL'] +end \ No newline at end of file diff --git a/config/initializers/redis.rb b/config/initializers/redis.rb index 63090fba..8d9d469f 100644 --- a/config/initializers/redis.rb +++ b/config/initializers/redis.rb @@ -1,3 +1 @@ -REDIS = Redis.connect(url: ENV['REDIS_URL']) -Resque.redis = REDIS - +REDIS = Redis.new(url: ENV[ENV['REDIS_PROVIDER'] || 'REDIS_URL']) diff --git a/config/initializers/resque.rb b/config/initializers/resque.rb deleted file mode 100644 index d1b456f1..00000000 --- a/config/initializers/resque.rb +++ /dev/null @@ -1,9 +0,0 @@ -Resque.before_fork do - defined?(ActiveRecord::Base) and - ActiveRecord::Base.connection.disconnect! -end - -Resque.after_fork do - defined?(ActiveRecord::Base) and - ActiveRecord::Base.establish_connection -end diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 6ced6a8f..013a0568 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -1,7 +1 @@ -# Be sure to restart your server when you modify this file. - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. -Badgiy::Application.config.secret_token = ENV['SECRET_TOKEN_BASE'] +Coderwall::Application.config.secret_token = ENV['SECRET_TOKEN_BASE'] diff --git a/config/initializers/security_patch.rb b/config/initializers/security_patch.rb deleted file mode 100644 index 8f4b4ad8..00000000 --- a/config/initializers/security_patch.rb +++ /dev/null @@ -1,3 +0,0 @@ -puts "Removing XML parsing due to security vulernability. Upgrade to rails ASAP" -# https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion -ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML) \ No newline at end of file diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 83f3ecf5..564699cf 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,18 +1,2 @@ # Be sure to restart your server when you modify this file. - -# Badgiy::Application.config.session_store :cookie_store, :key => '_coderwall_session' -# Badgiy::Application.config.session_store :cache_store, :key => '_coderwall_session' - -# Badgiy::Application.config.session_store :cookie_store, :key => '_coderwall_session' - -# Use the database for sessions instead of the cookie-based default, -# which shouldn't be used to store highly confidential information -# (create the session table with "rails generate session_migration") - -# require 'action_dispatch/middleware/session/dalli_store' -# -# ENV['MEMCACHE_SERVERS'] ||= '127.0.0.1' -# -# Rails.application.config.session_store = :dalli_store, ENV['MEMCACHE_SERVERS'], { :namespace => 'sessions', :key => '_cw', :expires_in => 1.day, :compress => false} - -Badgiy::Application.config.session_store :active_record_store, expire_after: 1.month, session_key: '_session', secret: ENV['SESSION_SECRET'] +Rails.application.config.session_store :redis_store, {:db => 4, :namespace => 'cache'} diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb new file mode 100644 index 00000000..f94ff312 --- /dev/null +++ b/config/initializers/sidekiq.rb @@ -0,0 +1,23 @@ +# https://devcenter.heroku.com/articles/forked-pg-connections#sidekiq +redis_url = (ENV[ENV['REDIS_PROVIDER'] || 'REDIS_URL']) +sidekiq_redis_url = redis_url.to_s + '/2' # Use third database + +Sidekiq.configure_server do |config| + database_url = ENV['DATABASE_URL'] + if database_url + ENV['DATABASE_URL'] = "#{database_url}?pool=25" + ActiveRecord::Base.establish_connection + end + if redis_url + config.redis = { url: sidekiq_redis_url } + end +end + +Sidekiq.configure_client do |config| + if redis_url + config.redis = { url: sidekiq_redis_url } + end +end + +require 'sidekiq/web' +Sidekiq::Web.app_url = '/admin' diff --git a/config/initializers/split.rb b/config/initializers/split.rb deleted file mode 100644 index c2947445..00000000 --- a/config/initializers/split.rb +++ /dev/null @@ -1,16 +0,0 @@ -Split.redis = REDIS -Split.redis.namespace = "split:coderwall" -Split.configure do |config| - # config.robot_regex = // - # config.ignore_ip_addresses << 'disable chute office' '1.2.3.4' - # config.enabled = !Rails.env.development? - config.db_failover = true # handle redis errors gracefully - config.db_failover_on_db_error = proc { |error| Rails.logger.error(error.message) } - config.allow_multiple_experiments = true -end - -Split::Dashboard.use(Rack::Auth::Basic) do |user, password| - user == 'coderwall' && password == ENV['BASIC_AUTH_PASSWORD'] -end unless Rails.env.development? - -TWITTER_SHARE_TEST = 'Left-Or-Right-Of-Protip' \ No newline at end of file diff --git a/config/initializers/timeout.rb b/config/initializers/timeout.rb deleted file mode 100644 index af3d04dd..00000000 --- a/config/initializers/timeout.rb +++ /dev/null @@ -1 +0,0 @@ -Rack::Timeout.timeout = Integer(ENV['TIMEOUT'] || 45) diff --git a/config/locales/en.yml b/config/locales/en.yml index 179c14ca..7c759712 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2,4 +2,10 @@ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: - hello: "Hello world" + protips: "Protips" + awesome_jobs: "Job Board" + profile: "Profile" + settings: "Settings" + sign_out: "Sign out" + sign_in: "Sign In" + register: "Register" diff --git a/config/mongoid.yml b/config/mongoid.yml deleted file mode 100644 index 5035d066..00000000 --- a/config/mongoid.yml +++ /dev/null @@ -1,13 +0,0 @@ -development: - host: localhost - database: badgify_development - -test: - host: localhost - database: badgify_test - -staging: - uri: <%= ENV['MONGOLAB_URI'] %> - -production: - uri: <%= ENV['MONGOLAB_URI'] %> diff --git a/app/assets/javascripts/ember/controllers/.gitkeep b/config/nginx.conf.erb similarity index 100% rename from app/assets/javascripts/ember/controllers/.gitkeep rename to config/nginx.conf.erb diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 00000000..2a970575 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,23 @@ +# Current Configuration +# ===================== +# MAX_THREADS: 32 +# MIN_THREADS: 8 +# PUMA_WORKERS: 4 +# +# half the unicorn config +# +# workers 4 +# threads 2 +# +# let Heroku go and do it's timeouts +# +# bringing up a legacy app try starting with workers running 1 thread until confident about thread-safety +# is threadsafe even on? <= Rails 4 + +port ENV['PORT'] || '3000' + +workers Integer(ENV['PUMA_WORKERS'] || 3) +threads Integer(ENV['MIN_THREADS'] || 1), Integer(ENV['MAX_THREADS'] || 16) + +rackup DefaultRackup +environment ENV['RACK_ENV'] || 'development' diff --git a/config/routes.rb b/config/routes.rb index fcaab908..86ce64cd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,223 +1,428 @@ -require 'resque/server' - -Badgiy::Application.routes.draw do +# == Route Map +# +# GET /.json(.:format) #<Proc:0x007f8ea9ae9d60@/home/abdelkader/RubymineProjects/coderwall/config/routes.rb:236> +# GET /teams/.json(.:format) #<Proc:0x007f8ea9b17b20@/home/abdelkader/RubymineProjects/coderwall/config/routes.rb:237> +# /mail_view MailPreview +# protips_update GET|PUT /protips/update(.:format) protips#update +# protip_update GET|PUT /protip/update(.:format) protip#update +# welcome GET /welcome(.:format) home#index +# root / protips#index +# p_dpvbbg GET /p/dpvbbg(.:format) protips#show {:id=>"devsal"} +# gh GET /gh(.:format) protips#show {:utm_campaign=>"github_orgs_badges", :utm_source=>"github"} +# jobs GET /jobs(/:location(/:skill))(.:format) opportunities#index +# jobs_map GET /jobs-map(.:format) opportunities#map +# user_protips GET /p/u/:username(.:format) protips#user +# slug_protips GET /p/:id/:slug(.:format) protips#show {:slug=>/(?!.*?edit).*/} +# random_protips GET /p/random(.:format) protips#random +# search_protips GET /p/search(.:format) protips#search +# POST /p/search(.:format) protips#search +# my_protips GET /p/me(.:format) protips#me +# reviewable_protips GET /p/admin(.:format) protips#admin +# team_protips GET /p/team/:team_slug(.:format) protips#team +# date_protips GET /p/d/:date(/:start)(.:format) protips#date +# trending_topics_protips GET /p/t/trending(.:format) protips#trending +# by_tags_protips GET /p/t/by_tags(.:format) protips#by_tags +# tagged_protips GET /p/t(/*tags)(.:format) networks#tag +# subscribe_protips PUT /p/t(/*tags)/subscribe(.:format) protips#subscribe +# unsubscribe_protips PUT /p/t(/*tags)/unsubscribe(.:format) protips#unsubscribe +# fresh_protips GET /p/fresh(.:format) protips#fresh +# trending_protips GET /p/trending(.:format) protips#trending +# popular_protips GET /p/popular(.:format) protips#popular +# liked_protips GET /p/liked(.:format) protips#liked +# preview_protips POST /p/preview(.:format) protips#preview +# upvote_protip POST /p/:id/upvote(.:format) protips#upvote +# report_inappropriate_protip POST /p/:id/report_inappropriate(.:format) protips#report_inappropriate +# tag_protip POST /p/:id/tag(.:format) protips#tag +# flag_protip POST /p/:id/flag(.:format) protips#flag +# feature_protip POST /p/:id/feature(.:format) protips#feature +# delete_tag_protip POST /p/:id/delete_tag/:topic(.:format) protips#delete_tag {:topic=>/[A-Za-z0-9#\$\+\-_\.(%23)(%24)(%2B)]+/} +# like_protip_comment POST /p/:protip_id/comments/:id/like(.:format) comments#like {:id=>/\d+/} +# mark_as_spam_protip_comment POST /p/:protip_id/comments/:id/mark_as_spam(.:format) comments#mark_as_spam {:id=>/\d+/} +# protip_comments GET /p/:protip_id/comments(.:format) comments#index {:id=>/\d+/} +# POST /p/:protip_id/comments(.:format) comments#create {:id=>/\d+/} +# new_protip_comment GET /p/:protip_id/comments/new(.:format) comments#new {:id=>/\d+/} +# edit_protip_comment GET /p/:protip_id/comments/:id/edit(.:format) comments#edit {:id=>/\d+/} +# protip_comment GET /p/:protip_id/comments/:id(.:format) comments#show {:id=>/\d+/} +# PUT /p/:protip_id/comments/:id(.:format) comments#update {:id=>/\d+/} +# DELETE /p/:protip_id/comments/:id(.:format) comments#destroy {:id=>/\d+/} +# protips GET /p(.:format) protips#index +# POST /p(.:format) protips#create +# new_protip GET /p/new(.:format) protips#new +# edit_protip GET /p/:id/edit(.:format) protips#edit +# protip GET /p/:id(.:format) protips#show +# PUT /p/:id(.:format) protips#update +# DELETE /p/:id(.:format) protips#destroy +# join_network POST /n/:id/join(.:format) networks#join {:slug=>/[\dA-Z\-]/i} +# leave_network POST /n/:id/leave(.:format) networks#leave {:slug=>/[\dA-Z\-]/i} +# networks GET /n(.:format) networks#index {:slug=>/[\dA-Z\-]/i} +# network GET /n/:id(.:format) networks#show {:slug=>/[\dA-Z\-]/i} +# protips GET /trending(.:format) protips#index +# faq GET /faq(.:format) pages#show {:page=>:faq} +# tos GET /tos(.:format) pages#show {:page=>:tos} +# privacy_policy GET /privacy_policy(.:format) pages#show {:page=>:privacy_policy} +# contact_us GET /contact_us(.:format) pages#show {:page=>:contact_us} +# api GET /api(.:format) pages#show {:page=>:api} +# achievements GET /achievements(.:format) pages#show {:page=>:achievements} +# GET /pages/:page(.:format) pages#show +# award_badge POST /award(.:format) achievements#award +# authenticate GET|POST /auth/:provider/callback(.:format) sessions#create +# authentication_failure GET /auth/failure(.:format) sessions#failure +# settings GET /settings(.:format) users#edit +# unsubscribe GET /unsubscribe(.:format) emails#unsubscribe +# delivered GET /delivered(.:format) emails#delivered +# authentications GET /authentications(.:format) authentications#index +# POST /authentications(.:format) authentications#create +# new_authentication GET /authentications/new(.:format) authentications#new +# edit_authentication GET /authentications/:id/edit(.:format) authentications#edit +# authentication GET /authentications/:id(.:format) authentications#show +# PUT /authentications/:id(.:format) authentications#update +# DELETE /authentications/:id(.:format) authentications#destroy +# usernames GET /usernames(.:format) usernames#index +# POST /usernames(.:format) usernames#create +# new_username GET /usernames/new(.:format) usernames#new +# edit_username GET /usernames/:id/edit(.:format) usernames#edit +# username GET /usernames/:id(.:format) usernames#show +# PUT /usernames/:id(.:format) usernames#update +# DELETE /usernames/:id(.:format) usernames#destroy +# invitations GET /invitations(.:format) invitations#index +# POST /invitations(.:format) invitations#create +# new_invitation GET /invitations/new(.:format) invitations#new +# edit_invitation GET /invitations/:id/edit(.:format) invitations#edit +# invitation GET /invitations/:id(.:format) invitations#show +# PUT /invitations/:id(.:format) invitations#update +# DELETE /invitations/:id(.:format) invitations#destroy +# invitation GET /i/:id/:r(.:format) invitations#show +# force_sessions GET /sessions/force(.:format) sessions#force +# sessions GET /sessions(.:format) sessions#index +# POST /sessions(.:format) sessions#create +# new_session GET /sessions/new(.:format) sessions#new +# edit_session GET /sessions/:id/edit(.:format) sessions#edit +# session GET /sessions/:id(.:format) sessions#show +# PUT /sessions/:id(.:format) sessions#update +# DELETE /sessions/:id(.:format) sessions#destroy +# webhooks_stripe GET /webhooks/stripe(.:format) accounts#webhook +# alerts GET /alerts(.:format) alerts#create +# GET /alerts(.:format) alerts#index +# follow_user POST /users/:username/follow(.:format) follows#create {:type=>:user} +# teamname_edit GET /team/:slug/edit(.:format) teams#edit +# job GET /team/:slug(/:job_id)(.:format) teams#show +# teamname GET /team/:slug(.:format) teams#show +# accept_team GET /teams/:id/accept(.:format) teams#accept +# record_exit_team POST /teams/:id/record-exit(.:format) teams#record_exit +# visitors_team GET /teams/:id/visitors(.:format) teams#visitors +# follow_team POST /teams/:id/follow(.:format) teams#follow +# join_team POST /teams/:id/join(.:format) teams#join +# approve_join_team POST /teams/:id/join/:user_id/approve(.:format) teams#approve_join +# deny_join_team POST /teams/:id/join/:user_id/deny(.:format) teams#deny_join +# inquiry_teams POST /teams/inquiry(.:format) teams#inquiry +# followed_teams GET /teams/followed(.:format) teams#followed +# search_teams GET /teams/search(.:format) teams#search +# team_members GET /teams/:team_id/members(.:format) members#index +# POST /teams/:team_id/members(.:format) members#create +# new_team_member GET /teams/:team_id/members/new(.:format) members#new +# edit_team_member GET /teams/:team_id/members/:id/edit(.:format) members#edit +# team_member GET /teams/:team_id/members/:id(.:format) members#show +# PUT /teams/:team_id/members/:id(.:format) members#update +# DELETE /teams/:team_id/members/:id(.:format) members#destroy +# apply_team_opportunity POST /teams/:team_id/opportunities/:id/apply(.:format) opportunities#apply +# activate_team_opportunity GET /teams/:team_id/opportunities/:id/activate(.:format) opportunities#activate +# deactivate_team_opportunity GET /teams/:team_id/opportunities/:id/deactivate(.:format) opportunities#deactivate +# visit_team_opportunity POST /teams/:team_id/opportunities/:id/visit(.:format) opportunities#visit +# team_opportunities GET /teams/:team_id/opportunities(.:format) opportunities#index +# POST /teams/:team_id/opportunities(.:format) opportunities#create +# new_team_opportunity GET /teams/:team_id/opportunities/new(.:format) opportunities#new +# edit_team_opportunity GET /teams/:team_id/opportunities/:id/edit(.:format) opportunities#edit +# team_opportunity GET /teams/:team_id/opportunities/:id(.:format) opportunities#show +# PUT /teams/:team_id/opportunities/:id(.:format) opportunities#update +# DELETE /teams/:team_id/opportunities/:id(.:format) opportunities#destroy +# send_invoice_team_account POST /teams/:team_id/account/send_invoice(.:format) accounts#send_invoice +# team_account POST /teams/:team_id/account(.:format) accounts#create +# new_team_account GET /teams/:team_id/account/new(.:format) accounts#new +# edit_team_account GET /teams/:team_id/account/edit(.:format) accounts#edit +# GET /teams/:team_id/account(.:format) accounts#show +# PUT /teams/:team_id/account(.:format) accounts#update +# DELETE /teams/:team_id/account(.:format) accounts#destroy +# teams GET /teams(.:format) teams#index +# POST /teams(.:format) teams#create +# new_team GET /teams/new(.:format) teams#new +# edit_team GET /teams/:id/edit(.:format) teams#edit +# team GET /teams/:id(.:format) teams#show +# PUT /teams/:id(.:format) teams#update +# DELETE /teams/:id(.:format) teams#destroy +# employers GET /employers(.:format) teams#upgrade +# unlink_github POST /github/unlink(.:format) users#unlink_provider {:provider=>"github"} +# GET /github/:username(.:format) users#show {:provider=>"github"} +# unlink_twitter POST /twitter/unlink(.:format) users#unlink_provider {:provider=>"twitter"} +# GET /twitter/:username(.:format) users#show {:provider=>"twitter"} +# unlink_forrst POST /forrst/unlink(.:format) users#unlink_provider {:provider=>"forrst"} +# GET /forrst/:username(.:format) users#show {:provider=>"forrst"} +# unlink_dribbble POST /dribbble/unlink(.:format) users#unlink_provider {:provider=>"dribbble"} +# GET /dribbble/:username(.:format) users#show {:provider=>"dribbble"} +# unlink_linkedin POST /linkedin/unlink(.:format) users#unlink_provider {:provider=>"linkedin"} +# GET /linkedin/:username(.:format) users#show {:provider=>"linkedin"} +# unlink_codeplex POST /codeplex/unlink(.:format) users#unlink_provider {:provider=>"codeplex"} +# GET /codeplex/:username(.:format) users#show {:provider=>"codeplex"} +# unlink_bitbucket POST /bitbucket/unlink(.:format) users#unlink_provider {:provider=>"bitbucket"} +# GET /bitbucket/:username(.:format) users#show {:provider=>"bitbucket"} +# unlink_stackoverflow POST /stackoverflow/unlink(.:format) users#unlink_provider {:provider=>"stackoverflow"} +# GET /stackoverflow/:username(.:format) users#show {:provider=>"stackoverflow"} +# resume_uploads POST /resume_uploads(.:format) resume_uploads#create +# teams_update_users POST /users/teams_update/:membership_id(.:format) users#teams_update +# invite_users POST /users/invite(.:format) users#invite +# autocomplete_users GET /users/autocomplete(.:format) users#autocomplete +# status_users GET /users/status(.:format) users#status +# specialties_user POST /users/:id/specialties(.:format) users#specialties +# user_skills GET /users/:user_id/skills(.:format) skills#index +# POST /users/:user_id/skills(.:format) skills#create +# new_user_skill GET /users/:user_id/skills/new(.:format) skills#new +# edit_user_skill GET /users/:user_id/skills/:id/edit(.:format) skills#edit +# user_skill GET /users/:user_id/skills/:id(.:format) skills#show +# PUT /users/:user_id/skills/:id(.:format) skills#update +# DELETE /users/:user_id/skills/:id(.:format) skills#destroy +# user_endorsements GET /users/:user_id/endorsements(.:format) endorsements#index +# POST /users/:user_id/endorsements(.:format) endorsements#create +# new_user_endorsement GET /users/:user_id/endorsements/new(.:format) endorsements#new +# edit_user_endorsement GET /users/:user_id/endorsements/:id/edit(.:format) endorsements#edit +# user_endorsement GET /users/:user_id/endorsements/:id(.:format) endorsements#show +# PUT /users/:user_id/endorsements/:id(.:format) endorsements#update +# DELETE /users/:user_id/endorsements/:id(.:format) endorsements#destroy +# user_pictures GET /users/:user_id/pictures(.:format) pictures#index +# POST /users/:user_id/pictures(.:format) pictures#create +# new_user_picture GET /users/:user_id/pictures/new(.:format) pictures#new +# edit_user_picture GET /users/:user_id/pictures/:id/edit(.:format) pictures#edit +# user_picture GET /users/:user_id/pictures/:id(.:format) pictures#show +# PUT /users/:user_id/pictures/:id(.:format) pictures#update +# DELETE /users/:user_id/pictures/:id(.:format) pictures#destroy +# user_follows GET /users/:user_id/follows(.:format) follows#index +# POST /users/:user_id/follows(.:format) follows#create +# new_user_follow GET /users/:user_id/follows/new(.:format) follows#new +# edit_user_follow GET /users/:user_id/follows/:id/edit(.:format) follows#edit +# user_follow GET /users/:user_id/follows/:id(.:format) follows#show +# PUT /users/:user_id/follows/:id(.:format) follows#update +# DELETE /users/:user_id/follows/:id(.:format) follows#destroy +# user_bans POST /users/:user_id/bans(.:format) bans#create +# user_unbans POST /users/:user_id/unbans(.:format) unbans#create +# users GET /users(.:format) users#index +# POST /users(.:format) users#create +# new_user GET /users/new(.:format) users#new +# edit_user GET /users/:id/edit(.:format) users#edit +# user GET /users/:id(.:format) users#show +# PUT /users/:id(.:format) users#update +# DELETE /users/:id(.:format) users#destroy +# clear_provider GET /clear/:id/:provider(.:format) users#clear_provider +# add_skill GET /add-skill(.:format) skills#create +# signin GET /signin(.:format) sessions#signin +# signout GET /signout(.:format) sessions#destroy +# sign_out GET /goodbye(.:format) sessions#destroy +# random_wall GET /roll-the-dice(.:format) users#randomize +# GET /providers/:provider/:username(.:format) provider_user_lookups#show +# GET|POST|PATCH|DELETE /404(.:format) errors#not_found +# GET|POST|PATCH|DELETE /422(.:format) errors#unacceptable +# GET|POST|PATCH|DELETE /500(.:format) errors#internal_error +# badge GET /:username(.:format) users#show +# user_achievement GET /:username/achievements/:id(.:format) achievements#show +# GET /:username/endorsements.json(.:format) endorsements#show +# followers GET /:username/followers(.:format) follows#index {:type=>:followers} +# following GET /:username/following(.:format) follows#index {:type=>:following} +# callbacks_hawt_feature POST /callbacks/hawt/feature(.:format) callbacks/hawt#feature +# callbacks_hawt_unfeature POST /callbacks/hawt/unfeature(.:format) callbacks/hawt#unfeature +# + +Coderwall::Application.routes.draw do + + # We get 10K's of requests for this route. We should configure nginx to drop these. + get '/.json', to: proc { [444, {}, ['']] } + get '/teams/.json', to: proc { [444, {}, ['']] } if Rails.env.development? mount MailPreview => 'mail_view' end - get 'protips/update' - put 'protips/update' + namespace :api, path: '/', constraints: { subdomain: 'api' } do + end + + # TODO: REMOVE + match 'protips/update', via: %w(get put) + match 'protip/update' , via: %w(get put) - get 'protip/update' - put 'protip/update' + get 'welcome' => 'home#index', as: :welcome root to: 'protips#index' - match 'welcome' => 'home#index', as: :welcome - - mount ServeFonts.new, at: '/fonts' - match '/p/dpvbbg' => redirect('https://coderwall.com/p/devsal') - match '/gh' => redirect('/?utm_campaign=github_orgs_badges&utm_source=github') - - topic_regex = /[A-Za-z0-9#\$\+\-_\.(%23)(%24)(%2B)]+/ - - match '/comments' => 'comments#index', as: :latest_comments - match '/jobs(/:location(/:skill))' => 'opportunities#index', as: :jobs - match '/jobs-map' => 'opportunities#map', as: :jobs_map - - mount Split::Dashboard, at: 'split' - - resources :protips, :path => '/p', :constraints => {id: /[\dA-Z\-_]{6}/i} do - collection { get 'random' } - collection { get 'search' => 'protips#search', as: :search } - collection { post 'search' => 'protips#search' } - collection { get 'me' => 'protips#me', as: :my } - collection { get 'admin' => 'protips#admin', as: :reviewable } - collection { get 'team/:team_slug' => 'protips#team', as: :team } - collection { get 'd/:date(/:start)' => 'protips#date', as: :date } - collection { get 't/trending' => 'protips#trending', as: :trending_topics } - collection { get 't/by_tags' => 'protips#by_tags', as: :by_tags } - collection { get 'u/:username' => 'protips#user', as: :user } - collection { get 't/(/*tags)' => 'networks#tag', as: :tagged } - collection { put 't/(/*tags)/subscribe' => 'protips#subscribe', as: :subscribe } - collection { put 't/(/*tags)/unsubscribe' => 'protips#unsubscribe', as: :unsubscribe } - collection { get 'fresh' } - collection { get 'trending' } - collection { get 'popular' } - collection { get 'liked' } - collection { post 'preview' } - - member { post 'upvote' } - member { post 'report_inappropriate' } - member { post 'tag' } - member { post 'flag' } - member { post 'feature' } - member { post 'queue/:queue' => 'protips#queue', as: :queue } - member { post 'delete_tag/:topic' => 'protips#delete_tag', as: :delete_tag, :topic => topic_regex } - resources :comments, :constraints => {id: /\d+/} do - member { post 'like' } + + get '/p/dpvbbg', controller: :protips, action: :show, id: 'devsal' + get '/gh' , controller: :protips, action: :show, utm_campaign: 'github_orgs_badges' , utm_source: 'github' + + get '/jobs(/:location(/:skill))' => 'opportunities#index', as: :jobs + get '/jobs-map' => 'opportunities#map', as: :jobs_map + + resources :protips, path: '/p' do + collection do + get 'u/:username' => 'protips#user', as: :user + get ':id/:slug' => 'protips#show', as: :slug, :constraints => { slug: /(?!.*?edit).*/ } + get 'random' + get 'search' => 'protips#search', as: :search + post 'search' => 'protips#search' + get 'me' => 'protips#me', as: :my + get 'admin' => 'protips#admin', as: :reviewable + get 'team/:team_slug' => 'protips#team', as: :team + get 'd/:date(/:start)' => 'protips#date', as: :date + get 't/trending' => 'protips#trending', as: :trending_topics + get 't/by_tags' => 'protips#by_tags', as: :by_tags + get 't/(*tags)' => 'networks#tag', as: :tagged + put 't/(*tags)/subscribe' => 'protips#subscribe', as: :subscribe + put 't/(*tags)/unsubscribe' => 'protips#unsubscribe', as: :unsubscribe + get 'fresh' + get 'trending' + get 'popular' + get 'liked' + post 'preview' end - end - resources :networks, :path => '/n', :constraints => {:slug => /[\dA-Z\-]/i} do - collection { get 'featured' => 'networks#featured', as: :featured } - collection { get '/u/:username' => 'networks#user', as: :user } - member { get '/t/(/*tags)' => 'networks#tag', as: :tagged } - member { get '/members' => 'networks#members', as: :members } - member { get '/mayor' => 'networks#mayor', as: :mayor } - member { get '/expert' => 'networks#expert', as: :expert } - member { post '/join' => 'networks#join', as: :join } - member { post '/leave' => 'networks#leave', as: :leave } - member { post '/update-tags' => 'networks#update_tags', as: :update_tags } - member { get '/current-mayor' => 'networks#current_mayor', as: :current_mayor } + member do + post 'upvote' + post 'report_inappropriate' + post 'tag' + post 'flag' + post 'feature' + topic_regex = /[A-Za-z0-9#\$\+\-_\.(%23)(%24)(%2B)]+/ + post 'delete_tag/:topic' => 'protips#delete_tag', as: :delete_tag, :topic => topic_regex + end + resources :comments, constraints: { id: /\d+/ } do + member do + post 'like' + post 'mark_as_spam' + end + end end - resources :processing_queues, :path => '/q' do - member { post '/dequeue/:item' => 'processing_queues#dequeue', as: :dequeue } + resources :networks, path: '/n', constraints: { slug: /[\dA-Z\-]/i } , only: [ :index, :show]do + member do + post '/join' => 'networks#join', as: :join + post '/leave' => 'networks#leave', as: :leave + end end - match 'trending' => 'protips#index', as: :protips + get 'trending' => 'protips#index', as: :protips - if Rails.env.development? - match '/letter_opener' => 'letter_opener/letters#index', as: :letter_opener_letters - match '/letter_opener/:id/:style.html' => 'letter_opener/letters#show', as: :letter_opener_letter - mount Campaigns::Preview => 'campaigns' - mount Notifier::Preview => 'mail' - mount WeeklyDigest::Preview => 'digest' - mount Subscription::Preview => 'subscription' - end + get 'faq' => 'pages#show', :page => :faq, as: :faq + get 'tos' => 'pages#show', :page => :tos, as: :tos + get 'privacy_policy' => 'pages#show', :page => :privacy_policy, as: :privacy_policy + get 'contact_us' => 'pages#show', :page => :contact_us, as: :contact_us + get 'api' => 'pages#show', :page => :api, as: :api + get 'achievements' => 'pages#show', :page => :achievements, as: :achievements if Rails.env.development? + get '/pages/:page' => 'pages#show' + + post 'award' => 'achievements#award', as: :award_badge - match 'faq' => 'pages#show', :page => :faq, as: :faq - match 'tos' => 'pages#show', :page => :tos, as: :tos - match 'privacy_policy' => 'pages#show', :page => :privacy_policy, as: :privacy_policy - match 'contact_us' => 'pages#show', :page => :contact_us, as: :contact_us - match 'api' => 'pages#show', :page => :api, as: :api - match 'achievements' => 'pages#show', :page => :achievements, as: :achievements if Rails.env.development? - match '/pages/:page' => 'pages#show' - - match 'award' => 'achievements#award', as: :award_badge - - match '/auth/:provider/callback' => 'sessions#create', as: :authenticate - match '/auth/failure' => 'sessions#failure', as: :authentication_failure - match '/settings' => 'users#edit', as: :settings - match '/redeem/:code' => 'redemptions#show' - match '/unsubscribe' => 'emails#unsubscribe' - match '/delivered' => 'emails#delivered' - match '/delete_account' => 'users#delete_account', as: :delete_account - match '/delete_account_confirmed' => 'users#delete_account_confirmed', as: :delete_account_confirmed, :via => :post + match '/auth/:provider/callback' => 'sessions#create', as: :authenticate, via: [:get, :post] + get '/auth/failure' => 'sessions#failure', as: :authentication_failure + get '/settings' => 'users#edit', as: :settings + get '/unsubscribe' => 'emails#unsubscribe' + get '/delivered' => 'emails#delivered' + get '/delete_account' => 'users#delete_account', as: :delete_account + post '/delete_account_confirmed' => 'users#delete_account_confirmed', as: :delete_account_confirmed resources :authentications, :usernames resources :invitations - match '/i/:id/:r' => 'invitations#show', as: :invitation + get '/i/:id/:r' => 'invitations#show', as: :invitation resources :sessions do collection { get('force') } end - match 'webhooks/stripe' => 'accounts#webhook' - match '/alerts' => 'alerts#create', :via => :post - match '/alerts' => 'alerts#index', :via => :get + get 'webhooks/stripe' => 'accounts#webhook' + get '/alerts' => 'alerts#create', :via => :post + get '/alerts' => 'alerts#index', :via => :get - #match '/payment' => 'accounts#new', as: :payment + # get '/payment' => 'accounts#new', as: :payment - match '/users/:username/follow' => 'follows#create', as: :follow_user, :type => :user, :via => :post + post '/users/:username/follow' => 'follows#create', as: :follow_user, :type => :user - match '/team/:slug' => 'teams#show', as: :teamname - match '/team/:slug/edit' => 'teams#edit', as: :teamname_edit - match '/team/:slug/(:job_id)' => 'teams#show', as: :job + get '/team/:slug/edit' => 'teams#edit', as: :teamname_edit + get '/team/:slug/(:job_id)' => 'teams#show', as: :job + get '/team/:slug' => 'teams#show', as: :teamname resources :teams do - collection { post 'inquiry' } - member { get 'accept' } - member { post 'record-exit' => 'teams#record_exit', as: :record_exit } - member { get 'visitors' } - member { post 'follow' => 'follows#create', :type => :team } - member { post 'join' } - member { post 'join/:user_id/approve' => 'teams#approve_join', as: :approve_join } - member { post 'join/:user_id/deny' => 'teams#deny_join', as: :deny_join } - collection { get 'followed' } - collection { get 'search' } - resources :team_members - resources :team_locations, as: :locations + member do + get 'accept' + post 'record-exit' => 'teams#record_exit', as: :record_exit + get 'visitors' + # TODO following and unfollowing should use different HTTP verbs (:post, :delete) + # Fix views and specs when changing this. + post 'follow' + post 'join' + post 'join/:user_id/approve' => 'teams#approve_join', as: :approve_join + post 'join/:user_id/deny' => 'teams#deny_join', as: :deny_join + end + collection do + post 'inquiry' + get 'followed' + get 'search' + end + resources :members + resources :opportunities do - member { post 'apply' } - member { get 'activate' } - member { get 'deactivate' } - member { post 'visit' } + member do + post 'apply' + get 'activate' + get 'deactivate' + post 'visit' + end end resource :account do collection { post 'send_invoice' => 'accounts#send_invoice' } end end - match '/leaderboard' => 'teams#leaderboard', as: :leaderboard - match '/employers' => 'teams#upgrade', as: :employers + get '/employers' => 'teams#upgrade', as: :employers - ['github', 'twitter', 'forrst', 'dribbble', 'linkedin', 'codeplex', 'bitbucket', 'stackoverflow'].each do |provider| - match "/#{provider}/unlink" => 'users#unlink_provider', :provider => provider, :via => :post, as: "unlink_#{provider}".to_sym - match "/#{provider}/:username" => 'users#show', :provider => provider + %w(github twitter forrst dribbble linkedin codeplex bitbucket stackoverflow).each do |provider| + post "/#{provider}/unlink" => 'users#unlink_provider', :provider => provider, as: "unlink_#{provider}".to_sym + get "/#{provider}/:username" => 'users#show', :provider => provider end + resources :resume_uploads, only: [:create] + resources :users do - collection { + collection do + post '/teams/:membership_id' => 'users#teams_update', as: :teams_update post 'invite' get 'autocomplete' get 'status' - } - member { + end + member do post 'specialties' - } + end resources :skills - resources :highlights resources :endorsements resources :pictures resources :follows + resources :bans, only: [:create] + resources :unbans, only: [:create] end - match 'clear/:id/:provider' => 'users#clear_provider', as: :clear_provider - match '/visual' => 'users#beta' - match '/refresh/:username' => 'users#refresh', as: :refresh - match '/nextaccomplishment' => 'highlights#random', as: :random_accomplishment - match '/add-skill' => 'skills#create', as: :add_skill, :via => :post - - require_admin = ->(params, req) { User.where(id: req.session[:current_user]).first.try(:admin?) } - - scope :admin, as: :admin, :path => '/admin', :constraints => require_admin do - match '/' => 'admin#index', as: :root - match '/failed_jobs' => 'admin#failed_jobs' - match '/cache_stats' => 'admin#cache_stats' - match '/teams' => 'admin#teams', as: :teams - match '/teams/sections/:num_sections' => 'admin#sections_teams', as: :sections_teams - match '/teams/section/:section' => 'admin#section_teams', as: :section_teams - mount Resque::Server.new, at: '/resque' - end + get '/clear/:id/:provider' => 'users#clear_provider', as: :clear_provider + get '/add-skill' => 'skills#create', as: :add_skill, :via => :post - match '/blog' => 'blog_posts#index', as: :blog - match '/blog/:id' => 'blog_posts#show', as: :blog_post - match '/articles.atom' => 'blog_posts#index', as: :atom, :format => :atom - - match '/' => 'protips#index', as: :signup - match '/signin' => 'sessions#signin', as: :signin - match '/signout' => 'sessions#destroy', as: :signout - match '/goodbye' => 'sessions#destroy', as: :sign_out - - match '/dashboard' => 'events#index', as: :dashboard - match '/roll-the-dice' => 'users#randomize', as: :random_wall - match '/trending' => 'links#index', as: :trending - match '/:username' => 'users#show', as: :badge - match '/:username/achievements/:id' => 'achievements#show', as: :user_achievement - match '/:username/endorsements.json' => 'endorsements#show' - match '/:username/followers' => 'follows#index', as: :followers, :type => :followers - match '/:username/following' => 'follows#index', as: :following, :type => :following - match '/:username/events' => 'events#index', as: :user_activity_feed - match '/:username/events/more' => 'events#more' - - match '/javascripts/*filename.js' => 'legacy#show', extension: 'js' - match '/stylesheets/*filename.css' => 'legacy#show', extension: 'css' - match '/images/*filename.png' => 'legacy#show', extension: 'png' - match '/images/*filename.jpg' => 'legacy#show', extension: 'jpg' - - match ':controller(/:action(/:id(.:format)))' if Rails.env.test? || Rails.env.development? + get '/signin' => 'sessions#signin', as: :signin + get '/signout' => 'sessions#destroy', as: :signout + get '/goodbye' => 'sessions#destroy', as: :sign_out + + get '/roll-the-dice' => 'users#randomize', as: :random_wall + + get '/providers/:provider/:username' => 'provider_user_lookups#show' + + match '/404' => 'errors#not_found', via: [:get, :post, :patch, :delete] + match '/422' => 'errors#unacceptable', via: [:get, :post, :patch, :delete] + match '/500' => 'errors#internal_error', via: [:get, :post, :patch, :delete] + + constraints ->(params, _) { params[:username] != 'admin' } do + get '/:username' => 'users#show', as: :badge + get '/:username/achievements/:id' => 'achievements#show', as: :user_achievement + get '/:username/endorsements.json' => 'endorsements#show' + get '/:username/followers' => 'follows#index', as: :followers, :type => :followers + get '/:username/following' => 'follows#index', as: :following, :type => :following + end namespace :callbacks do post '/hawt/feature' => 'hawt#feature' diff --git a/config/sidekiq.yml b/config/sidekiq.yml new file mode 100644 index 00000000..baeaedc7 --- /dev/null +++ b/config/sidekiq.yml @@ -0,0 +1,20 @@ +--- +:concurrency: 5 +staging: + :concurrency: 10 +production: + :concurrency: <%= ENV['SIDEKIQ_CONCURRENCY'] || 20 %> +:queues: + - [event_tracker, 5] + - [index, 4] + - [timeline, 3] + - [search_sync, 2] + - [user, 2] + - [data_cleanup, 1] + - [default, 1] + - [event_publisher, 1] + - [github, 1] + - [mailer, 1] + - [network, 1] + - [protip, 1] + - [team, 1] diff --git a/config/unicorn.rb b/config/unicorn.rb deleted file mode 100644 index f1d7a894..00000000 --- a/config/unicorn.rb +++ /dev/null @@ -1,33 +0,0 @@ -preload_app true -worker_processes Integer(ENV['WEB_CONCURRENCY'] || 3) -timeout Integer(ENV['TIMEOUT'] || 45) - -before_fork do |server, worker| - Signal.trap 'TERM' do - puts 'Unicorn master intercepting TERM and sending myself QUIT instead' - Process.kill 'QUIT', Process.pid - end - - defined?(ActiveRecord::Base) and - ActiveRecord::Base.connection.disconnect! - - if defined?(Resque) - Resque.redis.quit - Rails.logger.info('Disconnected from Redis') - end -end - -after_fork do |server, worker| - - Signal.trap 'TERM' do - puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT' - end - - defined?(ActiveRecord::Base) and - ActiveRecord::Base.establish_connection(Rails.application.config.database_configuration[Rails.env]) - - if defined?(Resque) - Resque.redis = ENV['REDIS_URL'] - Rails.logger.info('Connected to Redis') - end -end diff --git a/db/migrate/20140628045757_add_banned_at_to_user.rb b/db/migrate/20140628045757_add_banned_at_to_user.rb new file mode 100644 index 00000000..61de1dbb --- /dev/null +++ b/db/migrate/20140628045757_add_banned_at_to_user.rb @@ -0,0 +1,5 @@ +class AddBannedAtToUser < ActiveRecord::Migration + def change + add_column :users, :banned_at, :datetime + end +end diff --git a/db/migrate/20140630201109_add_last_ip_to_user.rb b/db/migrate/20140630201109_add_last_ip_to_user.rb new file mode 100644 index 00000000..f75ce64a --- /dev/null +++ b/db/migrate/20140630201109_add_last_ip_to_user.rb @@ -0,0 +1,6 @@ +class AddLastIpToUser < ActiveRecord::Migration + def change + add_column :users, :last_ip, :string + add_column :users, :last_ua, :string + end +end diff --git a/db/migrate/20140701170008_enable_pg_stat_statements.rb b/db/migrate/20140701170008_enable_pg_stat_statements.rb new file mode 100644 index 00000000..9a6a00ae --- /dev/null +++ b/db/migrate/20140701170008_enable_pg_stat_statements.rb @@ -0,0 +1,9 @@ +class EnablePgStatStatements < ActiveRecord::Migration + def up + execute "CREATE EXTENSION IF NOT EXISTS pg_stat_statements" + end + + def down + execute "DROP EXTENSION IF EXISTS pg_stat_statements" + end +end diff --git a/db/migrate/20140703223632_create_case_insensitive_indexes_on_user.rb b/db/migrate/20140703223632_create_case_insensitive_indexes_on_user.rb new file mode 100644 index 00000000..7e2f1789 --- /dev/null +++ b/db/migrate/20140703223632_create_case_insensitive_indexes_on_user.rb @@ -0,0 +1,29 @@ +class CreateCaseInsensitiveIndexesOnUser < ActiveRecord::Migration + + # User.with_username looks up on following fields almost + # constantly but with a UPPER(fieldname) = UPPER(val) + # which is nasty and slow, add upcase and downcase indexes + # to avoid the problem + + def up + execute 'create index ix_users_github_lower on users (lower(github) varchar_pattern_ops)' + execute 'create index ix_users_github_upper on users (upper(github) varchar_pattern_ops)' + execute 'create index ix_users_linkedin_lower on users (lower(linkedin) varchar_pattern_ops)' + execute 'create index ix_users_linkedin_upper on users (upper(linkedin) varchar_pattern_ops)' + execute 'create index ix_users_twitter_lower on users (lower(twitter) varchar_pattern_ops)' + execute 'create index ix_users_twitter_upper on users (upper(twitter) varchar_pattern_ops)' + execute 'create index ix_users_username_lower on users (lower(username) varchar_pattern_ops)' + execute 'create index ix_users_username_upper on users (upper(username) varchar_pattern_ops)' + end + + def down + execute 'drop index if exists ix_users_github_lower' + execute 'drop index if exists ix_users_github_upper' + execute 'drop index if exists ix_users_linkedin_lower' + execute 'drop index if exists ix_users_linkedin_upper' + execute 'drop index if exists ix_users_twitter_lower' + execute 'drop index if exists ix_users_twitter_upper' + execute 'drop index if exists ix_users_username_lower' + execute 'drop index if exists ix_users_username_upper' + end +end diff --git a/db/migrate/20140709044301_create_spam_reports.rb b/db/migrate/20140709044301_create_spam_reports.rb new file mode 100644 index 00000000..d358e879 --- /dev/null +++ b/db/migrate/20140709044301_create_spam_reports.rb @@ -0,0 +1,9 @@ +class CreateSpamReports < ActiveRecord::Migration + def change + create_table "spam_reports", force: true do |t| + t.integer "spammable_id", null: false + t.string "spammable_type", null: false + t.timestamps + end + end +end diff --git a/db/migrate/20140713162421_add_like_counter_to_models.rb b/db/migrate/20140713162421_add_like_counter_to_models.rb new file mode 100644 index 00000000..af5534f5 --- /dev/null +++ b/db/migrate/20140713162421_add_like_counter_to_models.rb @@ -0,0 +1,14 @@ +class AddLikeCounterToModels < ActiveRecord::Migration + def change + add_column :comments, :likes_count, :integer, default: 0 + add_column :protips, :likes_count, :integer, default: 0 + + Comment.pluck(:id) do |id| + Comment.reset_counters(id, :likes) + end + + Protip.pluck(:id) do |id| + Protip.reset_counters(id, :likes) + end + end +end diff --git a/db/migrate/20140713193201_set_default_score_for_protip.rb b/db/migrate/20140713193201_set_default_score_for_protip.rb new file mode 100644 index 00000000..458190da --- /dev/null +++ b/db/migrate/20140713193201_set_default_score_for_protip.rb @@ -0,0 +1,5 @@ +class SetDefaultScoreForProtip < ActiveRecord::Migration + def change + change_column :protips, :upvotes_value_cache, :integer, default: 0, null: false + end +end diff --git a/db/migrate/20140717105025_set_default_to_user_last_request.rb b/db/migrate/20140717105025_set_default_to_user_last_request.rb new file mode 100644 index 00000000..1b4ba2f5 --- /dev/null +++ b/db/migrate/20140717105025_set_default_to_user_last_request.rb @@ -0,0 +1,5 @@ +class SetDefaultToUserLastRequest < ActiveRecord::Migration + def up + change_column :users, :last_request_at, :datetime, default: 'NOW' + end +end diff --git a/db/migrate/20140718083741_create_teams_accounts.rb b/db/migrate/20140718083741_create_teams_accounts.rb new file mode 100644 index 00000000..1042b8c6 --- /dev/null +++ b/db/migrate/20140718083741_create_teams_accounts.rb @@ -0,0 +1,8 @@ +class CreateTeamsAccounts < ActiveRecord::Migration + def change + create_table :teams_accounts do |t| + t.integer :team_id, null: false + t.timestamps + end + end +end diff --git a/db/migrate/20140718083912_create_teams_links.rb b/db/migrate/20140718083912_create_teams_links.rb new file mode 100644 index 00000000..55b4a149 --- /dev/null +++ b/db/migrate/20140718083912_create_teams_links.rb @@ -0,0 +1,10 @@ +class CreateTeamsLinks < ActiveRecord::Migration + def change + create_table :teams_links do |t| + t.string :name + t.string :url + t.integer :team_id, null: false + t.timestamps + end + end +end diff --git a/db/migrate/20140718083928_create_teams_locations.rb b/db/migrate/20140718083928_create_teams_locations.rb new file mode 100644 index 00000000..435f0065 --- /dev/null +++ b/db/migrate/20140718083928_create_teams_locations.rb @@ -0,0 +1,16 @@ +class CreateTeamsLocations < ActiveRecord::Migration + def change + create_table :teams_locations do |t| + t.string :name + t.string :description + t.string :address + t.string :city, default: nil + t.string :state_code, default: nil + t.string :country, default: nil + t.integer :team_id, null: false + t.timestamps + end + # field :points_of_interest, type: Array, default: [] + # field :coordinates, type: Array + end +end diff --git a/db/migrate/20140718083944_create_teams_members.rb b/db/migrate/20140718083944_create_teams_members.rb new file mode 100644 index 00000000..b27a0ab5 --- /dev/null +++ b/db/migrate/20140718083944_create_teams_members.rb @@ -0,0 +1,9 @@ +class CreateTeamsMembers < ActiveRecord::Migration + def change + create_table :teams_members do |t| + t.integer :team_id, null: false + t.integer :user_id, null: false + t.timestamps + end + end +end diff --git a/db/migrate/20140718084025_create_pg_teams.rb b/db/migrate/20140718084025_create_pg_teams.rb new file mode 100644 index 00000000..4d42af3b --- /dev/null +++ b/db/migrate/20140718084025_create_pg_teams.rb @@ -0,0 +1,8 @@ +class CreatePgTeams < ActiveRecord::Migration + def change + create_table :teams do |t| + + t.timestamps + end + end +end diff --git a/db/migrate/20140718115310_add_team_id_to_opportunities.rb b/db/migrate/20140718115310_add_team_id_to_opportunities.rb new file mode 100644 index 00000000..47a9e339 --- /dev/null +++ b/db/migrate/20140718115310_add_team_id_to_opportunities.rb @@ -0,0 +1,5 @@ +class AddTeamIdToOpportunities < ActiveRecord::Migration + def change + add_column :opportunities, :team_id, :integer + end +end diff --git a/db/migrate/20140718120040_add_teamsize_to_teams_member.rb b/db/migrate/20140718120040_add_teamsize_to_teams_member.rb new file mode 100644 index 00000000..63c33c7a --- /dev/null +++ b/db/migrate/20140718120040_add_teamsize_to_teams_member.rb @@ -0,0 +1,5 @@ +class AddTeamsizeToTeamsMember < ActiveRecord::Migration + def change + add_column :teams_members, :team_size, :integer, default: 0 + end +end diff --git a/db/migrate/20140718190051_create_users_github_profiles.rb b/db/migrate/20140718190051_create_users_github_profiles.rb new file mode 100644 index 00000000..93100162 --- /dev/null +++ b/db/migrate/20140718190051_create_users_github_profiles.rb @@ -0,0 +1,13 @@ +class CreateUsersGithubProfiles < ActiveRecord::Migration + def change + create_table :users_github_profiles do |t| + t.string :login + t.string :name + t.string :company + t.string :location + t.integer :github_id, index: true, null: false, unique: true + t.integer :user_id + t.timestamps + end + end +end diff --git a/db/migrate/20140718190052_create_users_github_repositories.rb b/db/migrate/20140718190052_create_users_github_repositories.rb new file mode 100644 index 00000000..5aefe1ad --- /dev/null +++ b/db/migrate/20140718190052_create_users_github_repositories.rb @@ -0,0 +1,23 @@ +class CreateUsersGithubRepositories < ActiveRecord::Migration + def change + create_table :users_github_repositories do |t| + t.string :name + t.text :description + t.string :full_name + t.string :homepage + t.boolean :fork , default: false + t.integer :forks_count, default: 0 + #TODO remigrate default in rails 4. rails 3 schema dumper is stupid + t.datetime :forks_count_updated_at, default:'NOW()' + t.integer :stargazers_count, default: 0 + t.datetime :stargazers_count_updated_at, default:'NOW()' + t.string :language + t.integer :followers_count, default: 0, null: false + t.integer :github_id, index: true, null: false, unique: true + t.integer :owner_id, index: true + t.integer :organization_id, index: true + t.timestamps + + end + end +end diff --git a/db/migrate/20140718190053_create_users_github_repositories_followers.rb b/db/migrate/20140718190053_create_users_github_repositories_followers.rb new file mode 100644 index 00000000..b4d10d4a --- /dev/null +++ b/db/migrate/20140718190053_create_users_github_repositories_followers.rb @@ -0,0 +1,10 @@ +class CreateUsersGithubRepositoriesFollowers < ActiveRecord::Migration + def change + create_table :users_github_repositories_followers, id: false do |t| + t.integer :repository_id, null: false + t.integer :profile_id , null: false + t.timestamps + end + # add_index :users_github_repositories_followers , [:repository_id, :profile_id] , unique: true + end +end diff --git a/db/migrate/20140718190054_create_users_github_repositories_contributors.rb b/db/migrate/20140718190054_create_users_github_repositories_contributors.rb new file mode 100644 index 00000000..e0ac3b08 --- /dev/null +++ b/db/migrate/20140718190054_create_users_github_repositories_contributors.rb @@ -0,0 +1,10 @@ +class CreateUsersGithubRepositoriesContributors < ActiveRecord::Migration + def change + create_table :users_github_repositories_contributors, id: false do |t| + t.integer :repository_id, null: false + t.integer :profile_id , null: false + t.timestamps + end + # add_index :users_github_repositories_contributors , [:repository_id, :profile_id] , unique: true + end +end diff --git a/db/migrate/20140718190055_create_users_github_profiles_followers.rb b/db/migrate/20140718190055_create_users_github_profiles_followers.rb new file mode 100644 index 00000000..bf725b35 --- /dev/null +++ b/db/migrate/20140718190055_create_users_github_profiles_followers.rb @@ -0,0 +1,10 @@ +class CreateUsersGithubProfilesFollowers < ActiveRecord::Migration + def change + create_table :users_github_profiles_followers, id: false do |t| + t.integer :follower_id, null: false + t.integer :profile_id , null: false + t.timestamps + end + # add_index :users_github_profiles_followers , [:follower_id, :profile_id], unique: true + end +end diff --git a/db/migrate/20140718190056_create_users_github_organizations.rb b/db/migrate/20140718190056_create_users_github_organizations.rb new file mode 100644 index 00000000..7657aa09 --- /dev/null +++ b/db/migrate/20140718190056_create_users_github_organizations.rb @@ -0,0 +1,15 @@ +class CreateUsersGithubOrganizations < ActiveRecord::Migration + def change + create_table :users_github_organizations do |t| + t.string :login + t.string :company + t.string :blog + t.string :location + t.string :url + t.integer :github_id + t.datetime :github_created_at + t.datetime :github_updated_at + t.timestamps + end + end +end diff --git a/db/migrate/20140718190057_create_users_github_organizations_followers.rb b/db/migrate/20140718190057_create_users_github_organizations_followers.rb new file mode 100644 index 00000000..bc333d35 --- /dev/null +++ b/db/migrate/20140718190057_create_users_github_organizations_followers.rb @@ -0,0 +1,10 @@ +class CreateUsersGithubOrganizationsFollowers < ActiveRecord::Migration + def change + create_table :users_github_organizations_followers, id: false do |t| + t.integer :organization_id, null: false + t.integer :profile_id , null: false + t.timestamps + end + # add_index :users_github_organizations_followers , [:organization_id, :profile_id], unique: true + end +end diff --git a/db/migrate/20140719160422_remove_beta_access.rb b/db/migrate/20140719160422_remove_beta_access.rb new file mode 100644 index 00000000..8084f2ad --- /dev/null +++ b/db/migrate/20140719160422_remove_beta_access.rb @@ -0,0 +1,5 @@ +class RemoveBetaAccess < ActiveRecord::Migration + def up + remove_column :users, :beta_access + end +end diff --git a/db/migrate/20140719221934_create_teams_account_plans.rb b/db/migrate/20140719221934_create_teams_account_plans.rb new file mode 100644 index 00000000..66f4236f --- /dev/null +++ b/db/migrate/20140719221934_create_teams_account_plans.rb @@ -0,0 +1,9 @@ +class CreateTeamsAccountPlans < ActiveRecord::Migration + def change + create_table :teams_account_plans, id: false do |t| + t.integer :plan_id + t.integer :account_id + end + #TODO index in rails 4 + end +end diff --git a/db/migrate/20140720113851_add_stripeto_team_account.rb b/db/migrate/20140720113851_add_stripeto_team_account.rb new file mode 100644 index 00000000..29a15f10 --- /dev/null +++ b/db/migrate/20140720113851_add_stripeto_team_account.rb @@ -0,0 +1,10 @@ +class AddStripetoTeamAccount < ActiveRecord::Migration + def up + add_column :teams_accounts, :stripe_card_token, :string, null: false + add_column :teams_accounts, :stripe_customer_token, :string, null: false + add_column :teams_accounts, :admin_id, :integer, null: false + add_column :teams_accounts, :trial_end, :datetime, default: nil + change_column :teams_accounts, :team_id, :integer, null: false, unique: true + end + +end diff --git a/db/migrate/20140720121419_set_default_to_plan_currency.rb b/db/migrate/20140720121419_set_default_to_plan_currency.rb new file mode 100644 index 00000000..7df36362 --- /dev/null +++ b/db/migrate/20140720121419_set_default_to_plan_currency.rb @@ -0,0 +1,7 @@ +class SetDefaultToPlanCurrency < ActiveRecord::Migration + def up + change_column :plans , :currency, :string, default: 'usd' + change_column :plans , :interval, :string, default: 'month' + add_column :plans, :interval_in_seconds, :integer, default: 1.month.to_i + end +end diff --git a/db/migrate/20140726214006_drop_proccessing_queue.rb b/db/migrate/20140726214006_drop_proccessing_queue.rb new file mode 100644 index 00000000..c00e01c1 --- /dev/null +++ b/db/migrate/20140726214006_drop_proccessing_queue.rb @@ -0,0 +1,5 @@ +class DropProccessingQueue < ActiveRecord::Migration + def up + drop_table :processing_queues + end +end diff --git a/db/migrate/20140726233900_add_columsto_pgteam.rb b/db/migrate/20140726233900_add_columsto_pgteam.rb new file mode 100644 index 00000000..fa5143c8 --- /dev/null +++ b/db/migrate/20140726233900_add_columsto_pgteam.rb @@ -0,0 +1,83 @@ +class AddColumstoPgteam < ActiveRecord::Migration + def up + add_column :teams, :website, :string + add_column :teams, :about, :text + add_column :teams, :total, :integer, default: 0 + add_column :teams, :size, :integer, default: 0 + add_column :teams, :mean, :integer, default: 0 + add_column :teams, :median, :integer, default: 0 + add_column :teams, :score, :integer, default: 0 + add_column :teams, :twitter, :string + add_column :teams, :facebook, :string + add_column :teams, :slug, :string + add_column :teams, :premium, :boolean, default: false + add_column :teams, :analytics, :boolean, default: false + add_column :teams, :valid_jobs, :boolean, default: false + add_column :teams, :hide_from_featured, :boolean, default: false + add_column :teams, :preview_code, :string + add_column :teams, :youtube_url, :string + + add_column :teams, :github, :string + + add_column :teams, :highlight_tags, :string + add_column :teams, :branding, :text + add_column :teams, :headline, :text + add_column :teams, :big_quote, :text + add_column :teams, :big_image, :string + add_column :teams, :featured_banner_image, :string + + add_column :teams, :benefit_name_1, :text + add_column :teams, :benefit_description_1, :text + add_column :teams, :benefit_name_2, :text + add_column :teams, :benefit_description_2, :text + add_column :teams, :benefit_name_3, :text + add_column :teams, :benefit_description_3, :text + + add_column :teams, :reason_name_1, :text + add_column :teams, :reason_description_1, :text + add_column :teams, :reason_name_2, :text + add_column :teams, :reason_description_2, :text + add_column :teams, :reason_name_3, :text + add_column :teams, :reason_description_3, :text + add_column :teams, :why_work_image, :text + + add_column :teams, :organization_way, :text + add_column :teams, :organization_way_name, :text + add_column :teams, :organization_way_photo, :text + + add_column :teams, :office_photos, :string, array: true, default: '{}' + add_column :teams, :upcoming_events, :string, array: true, default: '{}' #just stubbed + + add_column :teams, :featured_links_title, :string + # embeds_many :featured_links, class_name: TeamLink.name + # => has_many :links + + add_column :teams, :blog_feed, :text + add_column :teams, :our_challenge, :text + add_column :teams, :your_impact, :text + + add_column :teams, :interview_steps, :string, array: true, default: '{}' + add_column :teams, :hiring_tagline, :text + add_column :teams, :link_to_careers_page, :text + + add_column :teams, :avatar, :string + + add_column :teams, :achievement_count, :integer, default: 0 + add_column :teams, :endorsement_count, :integer, default: 0 + add_column :teams, :invited_emails, :string, array: true, default: '{}' + + + add_column :teams, :admins, :string, array: true, default: '{}' + add_column :teams, :editors, :string, array: true, default: '{}' + + add_column :teams, :pending_join_requests, :string, array: true, default: '{}' + + add_column :teams, :upgraded_at, :datetime + add_column :teams, :paid_job_posts, :integer, default: 0 + add_column :teams, :monthly_subscription,:boolean, default: false + add_column :teams, :stack_list, :text, default: '' + add_column :teams, :number_of_jobs_to_show, :integer, default: 2 + add_column :teams, :location, :string + add_column :teams, :country_id, :integer + end +end diff --git a/db/migrate/20140728165706_add_name_to_teams.rb b/db/migrate/20140728165706_add_name_to_teams.rb new file mode 100644 index 00000000..64aaeb86 --- /dev/null +++ b/db/migrate/20140728165706_add_name_to_teams.rb @@ -0,0 +1,5 @@ +class AddNameToTeams < ActiveRecord::Migration + def change + add_column :teams, :name, :string + end +end diff --git a/db/migrate/20140728170247_add_github_organization_name_to_teams.rb b/db/migrate/20140728170247_add_github_organization_name_to_teams.rb new file mode 100644 index 00000000..29500d14 --- /dev/null +++ b/db/migrate/20140728170247_add_github_organization_name_to_teams.rb @@ -0,0 +1,5 @@ +class AddGithubOrganizationNameToTeams < ActiveRecord::Migration + def change + add_column :teams, :github_organization_name, :string + end +end diff --git a/db/migrate/20140728205954_add_fields_to_teams_members.rb b/db/migrate/20140728205954_add_fields_to_teams_members.rb new file mode 100644 index 00000000..c3d85f0d --- /dev/null +++ b/db/migrate/20140728205954_add_fields_to_teams_members.rb @@ -0,0 +1,10 @@ +class AddFieldsToTeamsMembers < ActiveRecord::Migration + def change + add_column :teams_members, :badges_count, :integer + add_column :teams_members, :email, :string + add_column :teams_members, :inviter_id, :integer + add_column :teams_members, :name, :string + add_column :teams_members, :thumbnail_url, :string + add_column :teams_members, :username, :string + end +end diff --git a/db/migrate/20140728214411_add_team_size_to_teams.rb b/db/migrate/20140728214411_add_team_size_to_teams.rb new file mode 100644 index 00000000..6702d2a6 --- /dev/null +++ b/db/migrate/20140728214411_add_team_size_to_teams.rb @@ -0,0 +1,5 @@ +class AddTeamSizeToTeams < ActiveRecord::Migration + def change + add_column :teams, :team_size, :integer + end +end diff --git a/db/migrate/20140729091832_enable_citext_for_user_user_name.rb b/db/migrate/20140729091832_enable_citext_for_user_user_name.rb new file mode 100644 index 00000000..f06d16fc --- /dev/null +++ b/db/migrate/20140729091832_enable_citext_for_user_user_name.rb @@ -0,0 +1,7 @@ +class EnableCitextForUserUserName < ActiveRecord::Migration + def up + execute 'CREATE EXTENSION IF NOT EXISTS "citext"' + change_column :users, :username, :citext, index:true, unique: true + change_column :users, :email, :citext, index:true, unique: true + end +end diff --git a/db/migrate/20140730225739_remove_thumnail_url_from_user.rb b/db/migrate/20140730225739_remove_thumnail_url_from_user.rb new file mode 100644 index 00000000..d0ba1650 --- /dev/null +++ b/db/migrate/20140730225739_remove_thumnail_url_from_user.rb @@ -0,0 +1,6 @@ +class RemoveThumnailUrlFromUser < ActiveRecord::Migration + def up + remove_column :users, :thumbnail_url + end + +end diff --git a/db/migrate/20140731132710_remove_useless_fields_from_pg_team.rb b/db/migrate/20140731132710_remove_useless_fields_from_pg_team.rb new file mode 100644 index 00000000..7e74185b --- /dev/null +++ b/db/migrate/20140731132710_remove_useless_fields_from_pg_team.rb @@ -0,0 +1,6 @@ +class RemoveUselessFieldsFromPgTeam < ActiveRecord::Migration + def up + remove_column :teams, :admins + remove_column :teams, :editors + end +end diff --git a/db/migrate/20140731225657_change_github_profiles.rb b/db/migrate/20140731225657_change_github_profiles.rb new file mode 100644 index 00000000..ad5159f1 --- /dev/null +++ b/db/migrate/20140731225657_change_github_profiles.rb @@ -0,0 +1,12 @@ +class ChangeGithubProfiles < ActiveRecord::Migration + def up + change_column :users_github_profiles, :github_id, :integer, null: true + change_column :users_github_profiles, :login, :citext, null: false + add_column :users_github_profiles, :hireable, :boolean, default: false + add_column :users_github_profiles, :followers_count, :integer, default: 0 + add_column :users_github_profiles, :following_count, :integer, default: 0 + add_column :users_github_profiles, :github_created_at, :datetime + add_column :users_github_profiles, :github_updated_at, :datetime + add_column :users_github_profiles, :spider_updated_at, :datetime + end +end diff --git a/db/migrate/20140801145543_add_github_unique_index_to_user.rb b/db/migrate/20140801145543_add_github_unique_index_to_user.rb new file mode 100644 index 00000000..201959cc --- /dev/null +++ b/db/migrate/20140801145543_add_github_unique_index_to_user.rb @@ -0,0 +1,6 @@ +class AddGithubUniqueIndexToUser < ActiveRecord::Migration + def change + change_column :users, :github, :citext, index:true, unique: true + #TODO add unique to github_id + end +end diff --git a/db/migrate/20140807214719_remove_joined_twitter_on_from_user.rb b/db/migrate/20140807214719_remove_joined_twitter_on_from_user.rb new file mode 100644 index 00000000..cee57529 --- /dev/null +++ b/db/migrate/20140807214719_remove_joined_twitter_on_from_user.rb @@ -0,0 +1,6 @@ +class RemoveJoinedTwitterOnFromUser < ActiveRecord::Migration + def up + remove_column :users, :joined_twitter_on + end + +end diff --git a/db/migrate/20140823103534_add_migration_fields.rb b/db/migrate/20140823103534_add_migration_fields.rb new file mode 100644 index 00000000..db21cb30 --- /dev/null +++ b/db/migrate/20140823103534_add_migration_fields.rb @@ -0,0 +1,7 @@ +class AddMigrationFields < ActiveRecord::Migration + def up + add_column :teams, :mongo_id, :string, unique: true + add_column :teams_members, :state, :string, unique: true , default: 'pending' + add_column :users, :team_id, :integer, index: true + end +end diff --git a/db/migrate/20140823174046_fix_pg_team.rb b/db/migrate/20140823174046_fix_pg_team.rb new file mode 100644 index 00000000..1262b1e9 --- /dev/null +++ b/db/migrate/20140823174046_fix_pg_team.rb @@ -0,0 +1,26 @@ +class FixPgTeam < ActiveRecord::Migration + def up + remove_column :teams, :office_photos + add_column :teams, :office_photos, :string, array: true, default: [] + remove_column :teams, :upcoming_events + add_column :teams, :upcoming_events, :text, array: true, default: [] + remove_column :teams, :interview_steps + add_column :teams, :interview_steps, :text, array: true, default: [] + remove_column :teams, :invited_emails + add_column :teams, :invited_emails, :string, array: true, default: [] + remove_column :teams, :pending_join_requests + add_column :teams, :pending_join_requests, :string, array: true, default: [] + add_column :teams, :state, :string, default: 'active' + change_column :teams_locations, :description, :text + change_column :teams_locations, :address, :text + change_column :teams_links, :url, :text + add_column :followed_teams, :team_id, :integer, index: true + remove_column :teams_members, :team_size + remove_column :teams_members, :badges_count + remove_column :teams_members, :email + remove_column :teams_members, :inviter_id + remove_column :teams_members, :name + remove_column :teams_members, :thumbnail_url + remove_column :teams_members, :username + end +end diff --git a/db/migrate/20140914051313_fix_types_on_pg_teams.rb b/db/migrate/20140914051313_fix_types_on_pg_teams.rb new file mode 100644 index 00000000..0e40761f --- /dev/null +++ b/db/migrate/20140914051313_fix_types_on_pg_teams.rb @@ -0,0 +1,8 @@ +class FixTypesOnPgTeams < ActiveRecord::Migration + def change + change_column(:teams, :mean, :decimal, precision: 40, scale: 30, default: 0.0) + change_column(:teams, :median, :decimal, precision: 40, scale: 30, default: 0.0) + change_column(:teams, :score, :decimal, precision: 40, scale: 30, default: 0.0) + change_column(:teams, :total, :decimal, precision: 40, scale: 30, default: 0.0) + end +end diff --git a/db/migrate/20140918030009_add_team_id_to_invitations.rb b/db/migrate/20140918030009_add_team_id_to_invitations.rb new file mode 100644 index 00000000..79c0c7c8 --- /dev/null +++ b/db/migrate/20140918030009_add_team_id_to_invitations.rb @@ -0,0 +1,5 @@ +class AddTeamIdToInvitations < ActiveRecord::Migration + def change + add_column :invitations, :team_id, :integer + end +end diff --git a/db/migrate/20140918031936_add_team_id_to_seized_opportunities.rb b/db/migrate/20140918031936_add_team_id_to_seized_opportunities.rb new file mode 100644 index 00000000..c7ab6f14 --- /dev/null +++ b/db/migrate/20140918031936_add_team_id_to_seized_opportunities.rb @@ -0,0 +1,5 @@ +class AddTeamIdToSeizedOpportunities < ActiveRecord::Migration + def change + add_column :seized_opportunities, :team_id, :integer + end +end diff --git a/db/migrate/20140919035232_add_score_cache_to_teams_members.rb b/db/migrate/20140919035232_add_score_cache_to_teams_members.rb new file mode 100644 index 00000000..92ac07d4 --- /dev/null +++ b/db/migrate/20140919035232_add_score_cache_to_teams_members.rb @@ -0,0 +1,5 @@ +class AddScoreCacheToTeamsMembers < ActiveRecord::Migration + def change + add_column :teams_members, :score_cache, :float + end +end diff --git a/db/migrate/20140919041335_add_team_banner_to_teams_member.rb b/db/migrate/20140919041335_add_team_banner_to_teams_member.rb new file mode 100644 index 00000000..42e2e509 --- /dev/null +++ b/db/migrate/20140919041335_add_team_banner_to_teams_member.rb @@ -0,0 +1,5 @@ +class AddTeamBannerToTeamsMember < ActiveRecord::Migration + def change + add_column :teams_members, :team_banner, :string + end +end diff --git a/db/migrate/20140919042707_add_team_avatar_to_teams_member.rb b/db/migrate/20140919042707_add_team_avatar_to_teams_member.rb new file mode 100644 index 00000000..15c95938 --- /dev/null +++ b/db/migrate/20140919042707_add_team_avatar_to_teams_member.rb @@ -0,0 +1,5 @@ +class AddTeamAvatarToTeamsMember < ActiveRecord::Migration + def change + add_column :teams_members, :team_avatar, :string + end +end diff --git a/db/migrate/20141015182230_add_slug_to_protips.rb b/db/migrate/20141015182230_add_slug_to_protips.rb new file mode 100644 index 00000000..882b8494 --- /dev/null +++ b/db/migrate/20141015182230_add_slug_to_protips.rb @@ -0,0 +1,6 @@ +class AddSlugToProtips < ActiveRecord::Migration + def change + add_column :protips, :slug, :string + add_index :protips, :slug + end +end diff --git a/db/migrate/20141111082038_add_points_of_interest_to_teams_locations.rb b/db/migrate/20141111082038_add_points_of_interest_to_teams_locations.rb new file mode 100644 index 00000000..3cbbab26 --- /dev/null +++ b/db/migrate/20141111082038_add_points_of_interest_to_teams_locations.rb @@ -0,0 +1,5 @@ +class AddPointsOfInterestToTeamsLocations < ActiveRecord::Migration + def change + add_column :teams_locations, :points_of_interest, :string, array: true, default: [] + end +end diff --git a/db/migrate/20141221211825_add_remote_to_opportunity.rb b/db/migrate/20141221211825_add_remote_to_opportunity.rb new file mode 100644 index 00000000..d771ac32 --- /dev/null +++ b/db/migrate/20141221211825_add_remote_to_opportunity.rb @@ -0,0 +1,5 @@ +class AddRemoteToOpportunity < ActiveRecord::Migration + def change + add_column :opportunities, :remote, :boolean + end +end diff --git a/db/migrate/20141231203425_replace_rocket_tag_with_aato.rb b/db/migrate/20141231203425_replace_rocket_tag_with_aato.rb new file mode 100644 index 00000000..c52dee38 --- /dev/null +++ b/db/migrate/20141231203425_replace_rocket_tag_with_aato.rb @@ -0,0 +1,28 @@ +class ReplaceRocketTagWithAato < ActiveRecord::Migration + def up + # This was created by rocket_tag but not used anywhere. + drop_table :alias_tags + + # This is something that AATO has that rocket_tag doesn't. + add_column :tags, :taggings_count, :integer, default: 0 + + # Populate the taggings_count properly + ActsAsTaggableOn::Tag.reset_column_information + ActsAsTaggableOn::Tag.find_each do |tag| + ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings) + end + + add_index 'tags', ['name'], name: 'index_tags_on_name' + #TODO, add unique constraint to index_tags_on_name + + remove_index 'taggings', name: "index_taggings_on_tag_id" + remove_index 'taggings', name: "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index 'taggings', ['tag_id', 'taggable_id', 'taggable_type', 'context', 'tagger_id', 'tagger_type'], + unique: true, + name: 'taggings_idx' + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20150103105333_tag_aato_cleanup.rb b/db/migrate/20150103105333_tag_aato_cleanup.rb new file mode 100644 index 00000000..eb48020a --- /dev/null +++ b/db/migrate/20150103105333_tag_aato_cleanup.rb @@ -0,0 +1,13 @@ +class TagAatoCleanup < ActiveRecord::Migration + def up + ActsAsTaggableOn::Tag.delete_all(taggings_count: 0) + ActsAsTaggableOn::Tag.destroy_all(name: '') + ActsAsTaggableOn::Tag.destroy_all(name: %w(navarro etagwerker mattvvhat Assembly angels capital combinations turbulenz semerda)) + remove_index! 'tags', 'index_tags_on_name' + add_index 'tags', ['name'], name: 'index_tags_on_name', unique: true + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20150108152023_cleanup_endorsements_without_skill.rb b/db/migrate/20150108152023_cleanup_endorsements_without_skill.rb new file mode 100644 index 00000000..10becd3d --- /dev/null +++ b/db/migrate/20150108152023_cleanup_endorsements_without_skill.rb @@ -0,0 +1,9 @@ +class CleanupEndorsementsWithoutSkill < ActiveRecord::Migration + def up + Endorsement.delete_all(skill_id: [nil,'']) + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20150109004213_add_role_to_team_member.rb b/db/migrate/20150109004213_add_role_to_team_member.rb new file mode 100644 index 00000000..1b17eefa --- /dev/null +++ b/db/migrate/20150109004213_add_role_to_team_member.rb @@ -0,0 +1,5 @@ +class AddRoleToTeamMember < ActiveRecord::Migration + def change + add_column :teams_members, :role, :string, default: 'member' + end +end diff --git a/db/migrate/20150109101515_set_team_admins.rb b/db/migrate/20150109101515_set_team_admins.rb new file mode 100644 index 00000000..871d77f6 --- /dev/null +++ b/db/migrate/20150109101515_set_team_admins.rb @@ -0,0 +1,8 @@ +class SetTeamAdmins < ActiveRecord::Migration + def up + # doing that for teams with one member for now + Team.where(team_size: 1).find_each do |team| + team.members.first.update_attribute('role', 'admin') + end + end +end diff --git a/db/migrate/20150110084027_change_team_slug_to_citext.rb b/db/migrate/20150110084027_change_team_slug_to_citext.rb new file mode 100644 index 00000000..e4a9ef74 --- /dev/null +++ b/db/migrate/20150110084027_change_team_slug_to_citext.rb @@ -0,0 +1,5 @@ +class ChangeTeamSlugToCitext < ActiveRecord::Migration + def change + change_column :teams, :slug, :citext, null: false, index: true , unique: true + end +end diff --git a/db/migrate/20150110140000_restore_premium_team_admins.rb b/db/migrate/20150110140000_restore_premium_team_admins.rb new file mode 100644 index 00000000..4f4843fc --- /dev/null +++ b/db/migrate/20150110140000_restore_premium_team_admins.rb @@ -0,0 +1,10 @@ +class RestorePremiumTeamAdmins < ActiveRecord::Migration + def up + premium_admins = Teams::Account.pluck(:admin_id) + Teams::Member.where(user_id: premium_admins).update_all(role: 'admin') + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end diff --git a/db/migrate/20150225094555_add_not_nullto_protips_slug.rb b/db/migrate/20150225094555_add_not_nullto_protips_slug.rb new file mode 100644 index 00000000..8f0675c7 --- /dev/null +++ b/db/migrate/20150225094555_add_not_nullto_protips_slug.rb @@ -0,0 +1,9 @@ +class AddNotNulltoProtipsSlug < ActiveRecord::Migration + def up + change_column_null :protips, :slug, false + end + + def down + change_column_null :protips, :slug, true + end +end diff --git a/db/migrate/20150428091725_add_userdata_to_comment.rb b/db/migrate/20150428091725_add_userdata_to_comment.rb new file mode 100644 index 00000000..898ce398 --- /dev/null +++ b/db/migrate/20150428091725_add_userdata_to_comment.rb @@ -0,0 +1,9 @@ +class AddUserdataToComment < ActiveRecord::Migration + def change + add_column :comments, :user_name, :string + add_column :comments, :user_email, :string + add_column :comments, :user_agent, :string + add_column :comments, :remote_ip, :inet + add_column :comments, :request_format, :string + end +end diff --git a/db/migrate/20150503075957_rename_comment_remote_ip_to_user_ip.rb b/db/migrate/20150503075957_rename_comment_remote_ip_to_user_ip.rb new file mode 100644 index 00000000..07315736 --- /dev/null +++ b/db/migrate/20150503075957_rename_comment_remote_ip_to_user_ip.rb @@ -0,0 +1,5 @@ +class RenameCommentRemoteIpToUserIp < ActiveRecord::Migration + def change + rename_column :comments, :remote_ip, :user_ip + end +end diff --git a/db/migrate/20150504132134_add_author_details_to_protip.rb b/db/migrate/20150504132134_add_author_details_to_protip.rb new file mode 100644 index 00000000..1b0fa139 --- /dev/null +++ b/db/migrate/20150504132134_add_author_details_to_protip.rb @@ -0,0 +1,8 @@ +class AddAuthorDetailsToProtip < ActiveRecord::Migration + def change + add_column :protips, :user_name, :string + add_column :protips, :user_email, :string + add_column :protips, :user_agent, :string + add_column :protips, :user_ip, :inet + end +end diff --git a/db/migrate/20150514141341_deleteorphantables.rb b/db/migrate/20150514141341_deleteorphantables.rb new file mode 100644 index 00000000..c4a34b32 --- /dev/null +++ b/db/migrate/20150514141341_deleteorphantables.rb @@ -0,0 +1,9 @@ +class Deleteorphantables < ActiveRecord::Migration + def up + drop_table :countries + drop_table :network_experts + end + + def down + end +end diff --git a/db/migrate/20150514164819_linkopportunitiestoteam.rb b/db/migrate/20150514164819_linkopportunitiestoteam.rb new file mode 100644 index 00000000..7da0b481 --- /dev/null +++ b/db/migrate/20150514164819_linkopportunitiestoteam.rb @@ -0,0 +1,13 @@ +class Linkopportunitiestoteam < ActiveRecord::Migration + def up + puts "Opportunities before cleanup : #{Opportunity.unscoped.count}" + Opportunity.unscoped.where(team_id: nil).find_each do |op| + team = Team.find_by_mongo_id(op.team_document_id) + op.update_attribute(:team, team) if team + end + Opportunity.where(team_id: nil).delete_all + remove_column :opportunities, :team_document_id + + puts "Opportunities after cleanup : #{Opportunity.unscoped.count}" + end +end diff --git a/db/migrate/20150519051740_cleanup_seized_opportunities.rb b/db/migrate/20150519051740_cleanup_seized_opportunities.rb new file mode 100644 index 00000000..a77b4d18 --- /dev/null +++ b/db/migrate/20150519051740_cleanup_seized_opportunities.rb @@ -0,0 +1,12 @@ +class CleanupSeizedOpportunities < ActiveRecord::Migration + def up + remove_column :seized_opportunities, :team_id + remove_column :seized_opportunities, :opportunity_type + remove_column :seized_opportunities, :team_document_id + drop_table :available_coupons + drop_table :purchased_bundles + drop_table :tokens + drop_table :sessions + drop_table :highlights + end +end diff --git a/db/migrate/20150519184842_remove_github_assignement.rb b/db/migrate/20150519184842_remove_github_assignement.rb new file mode 100644 index 00000000..385a9590 --- /dev/null +++ b/db/migrate/20150519184842_remove_github_assignement.rb @@ -0,0 +1,7 @@ +class RemoveGithubAssignement < ActiveRecord::Migration + def up + drop_table :github_assignments + remove_column :users, :gender + remove_column :users, :redemptions + end +end diff --git a/db/migrate/20150523090756_create_network_hierarchies.rb b/db/migrate/20150523090756_create_network_hierarchies.rb new file mode 100644 index 00000000..5ea1d161 --- /dev/null +++ b/db/migrate/20150523090756_create_network_hierarchies.rb @@ -0,0 +1,20 @@ +class CreateNetworkHierarchies < ActiveRecord::Migration + def change + add_column :networks, :parent_id, :integer + + create_table :network_hierarchies, id: false do |t| + t.integer :ancestor_id, null: false + t.integer :descendant_id, null: false + t.integer :generations, null: false + end + + add_index :network_hierarchies, [:ancestor_id, :descendant_id, :generations], + unique: true, + name: 'network_anc_desc_idx' + + add_index :network_hierarchies, [:descendant_id], + name: 'network_desc_idx' + + Network.rebuild! + end +end diff --git a/db/migrate/20150523214130_create_network_protips.rb b/db/migrate/20150523214130_create_network_protips.rb new file mode 100644 index 00000000..9b536aab --- /dev/null +++ b/db/migrate/20150523214130_create_network_protips.rb @@ -0,0 +1,18 @@ +class CreateNetworkProtips < ActiveRecord::Migration + def change + create_table :network_protips do |t| + t.integer :network_id + t.integer :protip_id + t.timestamps + end + + add_column :networks, :network_tags, :citext, array: true + + Network.find_each do |n| + tags = n.tags.pluck(:name) + tags = tags.map(&:downcase) + n.network_tags = tags + n.save + end + end +end diff --git a/db/migrate/20150703215747_add_role_to_user.rb b/db/migrate/20150703215747_add_role_to_user.rb new file mode 100644 index 00000000..83bc6777 --- /dev/null +++ b/db/migrate/20150703215747_add_role_to_user.rb @@ -0,0 +1,5 @@ +class AddRoleToUser < ActiveRecord::Migration + def change + add_column :users, :role, :string, default: 'user' + end +end diff --git a/db/migrate/20150718093835_add_missing_f_ks.rb b/db/migrate/20150718093835_add_missing_f_ks.rb new file mode 100644 index 00000000..0fe04330 --- /dev/null +++ b/db/migrate/20150718093835_add_missing_f_ks.rb @@ -0,0 +1,52 @@ +class AddMissingFKs < ActiveRecord::Migration + def change + add_column :facts , :user_id, :integer + drop_table :reserved_teams + add_foreign_key 'facts', 'users', name: 'facts_user_id_fk', dependent: :delete + add_foreign_key 'badges', 'users', name: 'badges_user_id_fk', dependent: :delete + add_foreign_key 'comments', 'users', name: 'comments_user_id_fk', dependent: :delete + add_foreign_key 'endorsements', 'users', name: 'endorsements_endorsed_user_id_fk', column: 'endorsed_user_id', dependent: :delete + add_foreign_key 'endorsements', 'users', name: 'endorsements_endorsing_user_id_fk', column: 'endorsing_user_id', dependent: :delete + add_foreign_key 'endorsements', 'skills', name: 'endorsements_skill_id_fk', dependent: :delete + add_foreign_key 'followed_teams', 'teams', name: 'followed_teams_team_id_fk' + add_foreign_key 'followed_teams', 'users', name: 'followed_teams_user_id_fk', dependent: :delete + add_foreign_key 'invitations', 'users', name: 'invitations_inviter_id_fk', column: 'inviter_id' + add_foreign_key 'invitations', 'teams', name: 'invitations_team_id_fk', dependent: :delete + add_foreign_key 'likes', 'users', name: 'likes_user_id_fk' + add_foreign_key 'network_hierarchies', 'networks', name: 'network_hierarchies_ancestor_id_fk', column: 'ancestor_id' + add_foreign_key 'network_hierarchies', 'networks', name: 'network_hierarchies_descendant_id_fk', column: 'descendant_id' + add_foreign_key 'network_protips', 'networks', name: 'network_protips_network_id_fk' + add_foreign_key 'network_protips', 'protips', name: 'network_protips_protip_id_fk' + add_foreign_key 'networks', 'networks', name: 'networks_parent_id_fk', column: 'parent_id' + add_foreign_key 'opportunities', 'teams', name: 'opportunities_team_id_fk' + add_foreign_key 'pictures', 'users', name: 'pictures_user_id_fk' + add_foreign_key 'protip_links', 'protips', name: 'protip_links_protip_id_fk' + add_foreign_key 'protips', 'users', name: 'protips_user_id_fk', dependent: :delete + add_foreign_key 'seized_opportunities', 'opportunities', name: 'seized_opportunities_opportunity_id_fk', dependent: :delete + add_foreign_key 'seized_opportunities', 'users', name: 'seized_opportunities_user_id_fk' + add_foreign_key 'sent_mails', 'users', name: 'sent_mails_user_id_fk' + add_foreign_key 'skills', 'users', name: 'skills_user_id_fk', dependent: :delete + add_foreign_key 'taggings', 'tags', name: 'taggings_tag_id_fk' + add_foreign_key 'teams_account_plans', 'teams_accounts', name: 'teams_account_plans_account_id_fk', column: 'account_id' + add_foreign_key 'teams_account_plans', 'plans', name: 'teams_account_plans_plan_id_fk' + add_foreign_key 'teams_accounts', 'users', name: 'teams_accounts_admin_id_fk', column: 'admin_id' + add_foreign_key 'teams_accounts', 'teams', name: 'teams_accounts_team_id_fk', dependent: :delete + add_foreign_key 'teams_links', 'teams', name: 'teams_links_team_id_fk', dependent: :delete + add_foreign_key 'teams_locations', 'teams', name: 'teams_locations_team_id_fk', dependent: :delete + add_foreign_key 'teams_members', 'teams', name: 'teams_members_team_id_fk', dependent: :delete + add_foreign_key 'teams_members', 'users', name: 'teams_members_user_id_fk' + add_foreign_key 'user_events', 'users', name: 'user_events_user_id_fk' + add_foreign_key 'users_github_organizations_followers', 'users_github_organizations', name: 'users_github_organizations_followers_organization_id_fk', column: 'organization_id', dependent: :delete + add_foreign_key 'users_github_organizations_followers', 'users_github_profiles', name: 'users_github_organizations_followers_profile_id_fk', column: 'profile_id' + add_foreign_key 'users_github_profiles_followers', 'users_github_profiles', name: 'users_github_profiles_followers_follower_id_fk', column: 'follower_id', dependent: :delete + add_foreign_key 'users_github_profiles_followers', 'users_github_profiles', name: 'users_github_profiles_followers_profile_id_fk', column: 'profile_id' + add_foreign_key 'users_github_profiles', 'users', name: 'users_github_profiles_user_id_fk' + add_foreign_key 'users_github_repositories_contributors', 'users_github_profiles', name: 'users_github_repositories_contributors_profile_id_fk', column: 'profile_id' + add_foreign_key 'users_github_repositories_contributors', 'users_github_repositories', name: 'users_github_repositories_contributors_repository_id_fk', column: 'repository_id', dependent: :delete + add_foreign_key 'users_github_repositories_followers', 'users_github_profiles', name: 'users_github_repositories_followers_profile_id_fk', column: 'profile_id' + add_foreign_key 'users_github_repositories_followers', 'users_github_repositories', name: 'users_github_repositories_followers_repository_id_fk', column: 'repository_id', dependent: :delete + add_foreign_key 'users_github_repositories', 'users_github_organizations', name: 'users_github_repositories_organization_id_fk', column: 'organization_id' + add_foreign_key 'users_github_repositories', 'users_github_profiles', name: 'users_github_repositories_owner_id_fk', column: 'owner_id' + add_foreign_key 'users', 'teams', name: 'users_team_id_fk' + end +end diff --git a/db/migrate/20150718114825_drop_admin_from_team_account.rb b/db/migrate/20150718114825_drop_admin_from_team_account.rb new file mode 100644 index 00000000..a79b3e12 --- /dev/null +++ b/db/migrate/20150718114825_drop_admin_from_team_account.rb @@ -0,0 +1,9 @@ +class DropAdminFromTeamAccount < ActiveRecord::Migration + def up + remove_column :teams_accounts, :admin_id + remove_column :teams_accounts, :trial_end + add_column :teams_account_plans, :id, :primary_key + add_column :teams_account_plans, :state, :string, default: :active + add_column :teams_account_plans, :expire_at, :datetime + end +end diff --git a/db/migrate/20150718141045_remove_team_links.rb b/db/migrate/20150718141045_remove_team_links.rb new file mode 100644 index 00000000..6f2b90a5 --- /dev/null +++ b/db/migrate/20150718141045_remove_team_links.rb @@ -0,0 +1,6 @@ +class RemoveTeamLinks < ActiveRecord::Migration + def up + drop_table :teams_links + remove_column :teams, :featured_links_title + end +end diff --git a/db/migrate/20150719111620_add_spam_report_to_protip_and_comment.rb b/db/migrate/20150719111620_add_spam_report_to_protip_and_comment.rb new file mode 100644 index 00000000..f883ab96 --- /dev/null +++ b/db/migrate/20150719111620_add_spam_report_to_protip_and_comment.rb @@ -0,0 +1,9 @@ +class AddSpamReportToProtipAndComment < ActiveRecord::Migration + def change + add_column :comments, :spam_reports_count, :integer, default: 0 + add_column :comments, :state, :string, default: 'active' + + add_column :protips, :spam_reports_count, :integer, default: 0 + add_column :protips, :state, :string, default: 'active' + end +end diff --git a/db/migrate/20150719222345_drop_network_protip_in_cascade.rb b/db/migrate/20150719222345_drop_network_protip_in_cascade.rb new file mode 100644 index 00000000..aaf00581 --- /dev/null +++ b/db/migrate/20150719222345_drop_network_protip_in_cascade.rb @@ -0,0 +1,8 @@ +class DropNetworkProtipInCascade < ActiveRecord::Migration + def up + remove_foreign_key 'network_protips', 'networks' + remove_foreign_key 'network_protips', 'protips' + add_foreign_key 'network_protips', 'networks', name: 'network_protips_network_id_fk', dependent: :delete + add_foreign_key 'network_protips', 'protips', name: 'network_protips_protip_id_fk', dependent: :delete + end +end diff --git a/db/migrate/20150720001425_link_comment_to_protip_without_polymorphism.rb b/db/migrate/20150720001425_link_comment_to_protip_without_polymorphism.rb new file mode 100644 index 00000000..6fbdd638 --- /dev/null +++ b/db/migrate/20150720001425_link_comment_to_protip_without_polymorphism.rb @@ -0,0 +1,10 @@ +class LinkCommentToProtipWithoutPolymorphism < ActiveRecord::Migration + def up + remove_column :comments, :commentable_type + rename_column :comments, :commentable_id, :protip_id + add_foreign_key :comments, :protips, name: "comments_protip_id_fk" + end + + def down + end +end diff --git a/db/migrate/20150726134416_change_skill_name_to_citex.rb b/db/migrate/20150726134416_change_skill_name_to_citex.rb new file mode 100644 index 00000000..5ace798b --- /dev/null +++ b/db/migrate/20150726134416_change_skill_name_to_citex.rb @@ -0,0 +1,5 @@ +class ChangeSkillNameToCitex < ActiveRecord::Migration + def up + change_column :skills, :name, :citext + end +end diff --git a/db/migrate/20150726135616_convert_skills_columns_to_database_json.rb b/db/migrate/20150726135616_convert_skills_columns_to_database_json.rb new file mode 100644 index 00000000..9778c744 --- /dev/null +++ b/db/migrate/20150726135616_convert_skills_columns_to_database_json.rb @@ -0,0 +1,5 @@ +class ConvertSkillsColumnsToDatabaseJson < ActiveRecord::Migration + def up + add_column :skills, :links, :json, default: '{}' + end +end diff --git a/db/migrate/20150809160133_add_title_to_membership.rb b/db/migrate/20150809160133_add_title_to_membership.rb new file mode 100644 index 00000000..8f5ecd07 --- /dev/null +++ b/db/migrate/20150809160133_add_title_to_membership.rb @@ -0,0 +1,5 @@ +class AddTitleToMembership < ActiveRecord::Migration + def change + add_column :teams_members, :title, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 980147f6..3162c3ae 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,15 +11,11 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20131205021701) do +ActiveRecord::Schema.define(:version => 20150809160133) do - create_table "alias_tags", :id => false, :force => true do |t| - t.integer "tag_id" - t.integer "alias_id" - end - - add_index "alias_tags", ["alias_id"], :name => "index_alias_tags_on_alias_id" - add_index "alias_tags", ["tag_id"], :name => "index_alias_tags_on_tag_id" + add_extension "citext" + add_extension "hstore" + add_extension "pg_stat_statements" create_table "api_accesses", :force => true do |t| t.string "api_key" @@ -28,15 +24,6 @@ t.datetime "updated_at" end - create_table "available_coupons", :force => true do |t| - t.string "codeschool_coupon" - t.string "peepcode_coupon" - t.string "recipes_coupon" - end - - add_index "available_coupons", ["codeschool_coupon"], :name => "index_available_coupons_on_codeschool_coupon", :unique => true - add_index "available_coupons", ["peepcode_coupon"], :name => "index_available_coupons_on_peepcode_coupon", :unique => true - create_table "badges", :force => true do |t| t.datetime "created_at" t.datetime "updated_at" @@ -48,28 +35,27 @@ add_index "badges", ["user_id"], :name => "index_badges_on_user_id" create_table "comments", :force => true do |t| - t.string "title", :limit => 50, :default => "" - t.text "comment", :default => "" - t.integer "commentable_id" - t.string "commentable_type" + t.string "title", :limit => 50, :default => "" + t.text "comment", :default => "" + t.integer "protip_id" t.integer "user_id" - t.integer "likes_cache", :default => 0 - t.integer "likes_value_cache", :default => 0 + t.integer "likes_cache", :default => 0 + t.integer "likes_value_cache", :default => 0 t.datetime "created_at" t.datetime "updated_at" + t.integer "likes_count", :default => 0 + t.string "user_name" + t.string "user_email" + t.string "user_agent" + t.inet "user_ip" + t.string "request_format" + t.integer "spam_reports_count", :default => 0 + t.string "state", :default => "active" end - add_index "comments", ["commentable_id"], :name => "index_comments_on_commentable_id" - add_index "comments", ["commentable_type"], :name => "index_comments_on_commentable_type" + add_index "comments", ["protip_id"], :name => "index_comments_on_commentable_id" add_index "comments", ["user_id"], :name => "index_comments_on_user_id" - create_table "countries", :force => true do |t| - t.string "name" - t.string "code" - t.datetime "created_at" - t.datetime "updated_at" - end - create_table "endorsements", :force => true do |t| t.integer "endorsed_user_id" t.integer "endorsing_user_id" @@ -93,6 +79,7 @@ t.datetime "relevant_on" t.datetime "created_at" t.datetime "updated_at" + t.integer "user_id" end add_index "facts", ["identity"], :name => "index_facts_on_identity" @@ -101,7 +88,8 @@ create_table "followed_teams", :force => true do |t| t.integer "user_id" t.string "team_document_id" - t.datetime "created_at", :default => '2014-02-20 22:39:11' + t.datetime "created_at", :default => '2012-03-12 21:01:09' + t.integer "team_id" end add_index "followed_teams", ["team_document_id"], :name => "index_followed_teams_on_team_document_id" @@ -121,30 +109,6 @@ add_index "follows", ["followable_id", "followable_type"], :name => "fk_followables" add_index "follows", ["follower_id", "follower_type"], :name => "fk_follows" - create_table "github_assignments", :force => true do |t| - t.string "github_username" - t.string "repo_url" - t.string "tag" - t.datetime "created_at" - t.datetime "updated_at" - t.string "badge_class_name" - end - - add_index "github_assignments", ["github_username", "badge_class_name"], :name => "index_assignments_on_username_and_badge_class_name", :unique => true - add_index "github_assignments", ["github_username", "repo_url", "tag"], :name => "index_assignments_on_username_and_repo_url_and_badge_class_name", :unique => true - add_index "github_assignments", ["repo_url"], :name => "index_assignments_on_repo_url" - - create_table "highlights", :force => true do |t| - t.integer "user_id" - t.text "description" - t.datetime "created_at" - t.datetime "updated_at" - t.boolean "featured", :default => false - end - - add_index "highlights", ["featured"], :name => "index_highlights_on_featured" - add_index "highlights", ["user_id"], :name => "index_highlights_on_user_id" - create_table "invitations", :force => true do |t| t.string "email" t.string "team_document_id" @@ -153,6 +117,7 @@ t.integer "inviter_id" t.datetime "created_at" t.datetime "updated_at" + t.integer "team_id" end create_table "likes", :force => true do |t| @@ -168,12 +133,20 @@ add_index "likes", ["likable_id", "likable_type", "user_id"], :name => "index_likes_on_user_id", :unique => true - create_table "network_experts", :force => true do |t| - t.string "designation" + create_table "network_hierarchies", :id => false, :force => true do |t| + t.integer "ancestor_id", :null => false + t.integer "descendant_id", :null => false + t.integer "generations", :null => false + end + + add_index "network_hierarchies", ["ancestor_id", "descendant_id", "generations"], :name => "network_anc_desc_idx", :unique => true + add_index "network_hierarchies", ["descendant_id"], :name => "network_desc_idx" + + create_table "network_protips", :force => true do |t| t.integer "network_id" - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + t.integer "protip_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false end create_table "networks", :force => true do |t| @@ -183,6 +156,8 @@ t.datetime "updated_at" t.integer "protips_count_cache", :default => 0 t.boolean "featured", :default => false + t.integer "parent_id" + t.citext "network_tags", :array => true end create_table "opportunities", :force => true do |t| @@ -191,7 +166,6 @@ t.string "designation" t.string "location" t.string "cached_tags" - t.string "team_document_id" t.string "link" t.integer "salary" t.float "options" @@ -204,6 +178,8 @@ t.string "location_city" t.boolean "apply", :default => false t.string "public_id" + t.integer "team_id" + t.boolean "remote" end create_table "pictures", :force => true do |t| @@ -215,21 +191,14 @@ create_table "plans", :force => true do |t| t.integer "amount" - t.string "interval" + t.string "interval", :default => "month" t.string "name" - t.string "currency" + t.string "currency", :default => "usd" t.string "public_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "analytics", :default => false - end - - create_table "processing_queues", :force => true do |t| - t.integer "queueable_id" - t.string "queueable_type" - t.string "queue" - t.datetime "queued_at" - t.datetime "dequeued_at" + t.boolean "analytics", :default => false + t.integer "interval_in_seconds", :default => 2592000 end create_table "protip_links", :force => true do |t| @@ -253,44 +222,26 @@ t.string "created_by", :default => "self" t.boolean "featured", :default => false t.datetime "featured_at" - t.integer "upvotes_value_cache" + t.integer "upvotes_value_cache", :default => 0, :null => false t.float "boost_factor", :default => 1.0 t.integer "inappropriate", :default => 0 + t.integer "likes_count", :default => 0 + t.string "slug", :null => false + t.string "user_name" + t.string "user_email" + t.string "user_agent" + t.inet "user_ip" + t.integer "spam_reports_count", :default => 0 + t.string "state", :default => "active" end add_index "protips", ["public_id"], :name => "index_protips_on_public_id" + add_index "protips", ["slug"], :name => "index_protips_on_slug" add_index "protips", ["user_id"], :name => "index_protips_on_user_id" - create_table "purchased_bundles", :force => true do |t| - t.integer "user_id" - t.string "email" - t.string "codeschool_coupon" - t.string "peepcode_coupon" - t.string "credit_card_id" - t.string "stripe_purchase_id" - t.string "stripe_customer_id" - t.text "stripe_response" - t.integer "total_amount" - t.integer "coderwall_proceeds" - t.integer "codeschool_proceeds" - t.integer "charity_proceeds" - t.integer "peepcode_proceeds" - t.datetime "created_at" - t.datetime "updated_at" - t.string "recipes_coupon" - end - - create_table "reserved_teams", :force => true do |t| - t.integer "user_id" - t.text "name" - t.text "company" - end - create_table "seized_opportunities", :force => true do |t| t.integer "opportunity_id" - t.string "opportunity_type" t.integer "user_id" - t.string "team_document_id" t.datetime "created_at" t.datetime "updated_at" end @@ -302,19 +253,9 @@ t.datetime "sent_at" end - create_table "sessions", :force => true do |t| - t.string "session_id", :null => false - t.text "data" - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" - add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" - create_table "skills", :force => true do |t| t.integer "user_id" - t.string "name", :null => false + t.citext "name", :null => false t.integer "endorsements_count", :default => 0 t.datetime "created_at" t.datetime "updated_at" @@ -325,11 +266,19 @@ t.text "attended_events" t.boolean "deleted", :default => false, :null => false t.datetime "deleted_at" + t.json "links", :default => "{}" end add_index "skills", ["deleted", "user_id"], :name => "index_skills_on_deleted_and_user_id" add_index "skills", ["user_id"], :name => "index_skills_on_user_id" + create_table "spam_reports", :force => true do |t| + t.integer "spammable_id", :null => false + t.string "spammable_type", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "taggings", :force => true do |t| t.integer "tag_id" t.integer "taggable_id" @@ -340,35 +289,136 @@ t.datetime "created_at" end - add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" - add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context" + add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], :name => "taggings_idx", :unique => true create_table "tags", :force => true do |t| - t.string "name" + t.string "name" + t.integer "taggings_count", :default => 0 end - create_table "tokens", :force => true do |t| - t.string "token" - t.string "secret" - t.string "kind" - t.integer "user_id" - t.datetime "created_at" - t.datetime "updated_at" + add_index "tags", ["name"], :name => "index_tags_on_name", :unique => true + + create_table "teams", :force => true do |t| + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "website" + t.text "about" + t.decimal "total", :precision => 40, :scale => 30, :default => 0.0 + t.integer "size", :default => 0 + t.decimal "mean", :precision => 40, :scale => 30, :default => 0.0 + t.decimal "median", :precision => 40, :scale => 30, :default => 0.0 + t.decimal "score", :precision => 40, :scale => 30, :default => 0.0 + t.string "twitter" + t.string "facebook" + t.citext "slug", :null => false + t.boolean "premium", :default => false + t.boolean "analytics", :default => false + t.boolean "valid_jobs", :default => false + t.boolean "hide_from_featured", :default => false + t.string "preview_code" + t.string "youtube_url" + t.string "github" + t.string "highlight_tags" + t.text "branding" + t.text "headline" + t.text "big_quote" + t.string "big_image" + t.string "featured_banner_image" + t.text "benefit_name_1" + t.text "benefit_description_1" + t.text "benefit_name_2" + t.text "benefit_description_2" + t.text "benefit_name_3" + t.text "benefit_description_3" + t.text "reason_name_1" + t.text "reason_description_1" + t.text "reason_name_2" + t.text "reason_description_2" + t.text "reason_name_3" + t.text "reason_description_3" + t.text "why_work_image" + t.text "organization_way" + t.text "organization_way_name" + t.text "organization_way_photo" + t.text "blog_feed" + t.text "our_challenge" + t.text "your_impact" + t.text "hiring_tagline" + t.text "link_to_careers_page" + t.string "avatar" + t.integer "achievement_count", :default => 0 + t.integer "endorsement_count", :default => 0 + t.datetime "upgraded_at" + t.integer "paid_job_posts", :default => 0 + t.boolean "monthly_subscription", :default => false + t.text "stack_list", :default => "" + t.integer "number_of_jobs_to_show", :default => 2 + t.string "location" + t.integer "country_id" + t.string "name" + t.string "github_organization_name" + t.integer "team_size" + t.string "mongo_id" + t.string "office_photos", :default => [], :array => true + t.text "upcoming_events", :default => [], :array => true + t.text "interview_steps", :default => [], :array => true + t.string "invited_emails", :default => [], :array => true + t.string "pending_join_requests", :default => [], :array => true + t.string "state", :default => "active" + end + + create_table "teams_account_plans", :force => true do |t| + t.integer "plan_id" + t.integer "account_id" + t.string "state", :default => "active" + t.datetime "expire_at" end - add_index "tokens", ["kind", "user_id"], :name => "index_tokens_on_kind_and_user_id", :unique => true + create_table "teams_accounts", :force => true do |t| + t.integer "team_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "stripe_card_token", :null => false + t.string "stripe_customer_token", :null => false + end + + create_table "teams_locations", :force => true do |t| + t.string "name" + t.text "description" + t.text "address" + t.string "city" + t.string "state_code" + t.string "country" + t.integer "team_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "points_of_interest", :default => [], :array => true + end + + create_table "teams_members", :force => true do |t| + t.integer "team_id", :null => false + t.integer "user_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "state", :default => "pending" + t.float "score_cache" + t.string "team_banner" + t.string "team_avatar" + t.string "role", :default => "member" + t.string "title" + end create_table "user_events", :force => true do |t| t.integer "user_id" t.string "name" t.text "data" - t.datetime "created_at", :default => '2014-02-20 22:39:11' + t.datetime "created_at", :default => '2012-03-12 21:01:10' end create_table "users", :force => true do |t| - t.string "username" + t.citext "username" t.string "name" - t.string "email" + t.citext "email" t.string "location" t.string "old_github_token" t.string "state" @@ -383,8 +433,8 @@ t.string "bitbucket" t.string "codeplex" t.integer "login_count", :default => 0 - t.datetime "last_request_at" - t.datetime "achievements_checked_at", :default => '1914-02-20 22:39:10' + t.datetime "last_request_at", :default => '2014-07-23 03:14:36' + t.datetime "achievements_checked_at", :default => '1911-08-12 21:49:21' t.text "claim_code" t.integer "github_id" t.string "country" @@ -394,18 +444,17 @@ t.float "lng" t.integer "http_counter" t.string "github_token" - t.datetime "twitter_checked_at", :default => '1914-02-20 22:39:10' + t.datetime "twitter_checked_at", :default => '1911-08-12 21:49:21' t.string "title" t.string "company" t.string "blog" - t.string "github" + t.citext "github" t.string "forrst" t.string "dribbble" t.text "specialties" t.boolean "notify_on_award", :default => true t.boolean "receive_newsletter", :default => true t.string "zerply" - t.text "thumbnail_url" t.string "linkedin" t.string "linkedin_id" t.string "linkedin_token" @@ -415,8 +464,6 @@ t.string "linkedin_secret" t.datetime "last_email_sent" t.string "linkedin_public_url" - t.boolean "beta_access", :default => false - t.text "redemptions" t.integer "endorsements_count", :default => 0 t.string "team_document_id" t.string "speakerdeck" @@ -426,7 +473,6 @@ t.string "referred_by" t.text "about" t.date "joined_github_on" - t.date "joined_twitter_on" t.string "avatar" t.string "banner" t.datetime "remind_to_invite_team_members" @@ -444,6 +490,12 @@ t.text "team_responsibilities" t.string "team_avatar" t.string "team_banner" + t.string "stat_name_1" + t.string "stat_number_1" + t.string "stat_name_2" + t.string "stat_number_2" + t.string "stat_name_3" + t.string "stat_number_3" t.float "ip_lat" t.float "ip_lng" t.float "penalty", :default => 0.0 @@ -452,10 +504,18 @@ t.string "resume" t.string "sourceforge" t.string "google_code" + t.boolean "sales_rep", :default => false t.string "visits", :default => "" t.string "visit_frequency", :default => "rarely" + t.integer "pitchbox_id" t.boolean "join_badge_orgs", :default => false + t.boolean "use_social_for_pitchbox", :default => false t.datetime "last_asm_email_at" + t.datetime "banned_at" + t.string "last_ip" + t.string "last_ua" + t.integer "team_id" + t.string "role", :default => "user" end add_index "users", ["linkedin_id"], :name => "index_users_on_linkedin_id", :unique => true @@ -464,4 +524,156 @@ add_index "users", ["twitter_id"], :name => "index_users_on_twitter_id", :unique => true add_index "users", ["username"], :name => "index_users_on_username", :unique => true + create_table "users_github_organizations", :force => true do |t| + t.string "login" + t.string "company" + t.string "blog" + t.string "location" + t.string "url" + t.integer "github_id" + t.datetime "github_created_at" + t.datetime "github_updated_at" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "users_github_organizations_followers", :id => false, :force => true do |t| + t.integer "organization_id", :null => false + t.integer "profile_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "users_github_profiles", :force => true do |t| + t.citext "login", :null => false + t.string "name" + t.string "company" + t.string "location" + t.integer "github_id" + t.integer "user_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "hireable", :default => false + t.integer "followers_count", :default => 0 + t.integer "following_count", :default => 0 + t.datetime "github_created_at" + t.datetime "github_updated_at" + t.datetime "spider_updated_at" + end + + create_table "users_github_profiles_followers", :id => false, :force => true do |t| + t.integer "follower_id", :null => false + t.integer "profile_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "users_github_repositories", :force => true do |t| + t.string "name" + t.text "description" + t.string "full_name" + t.string "homepage" + t.boolean "fork", :default => false + t.integer "forks_count", :default => 0 + t.datetime "forks_count_updated_at", :default => '2014-07-23 03:14:37' + t.integer "stargazers_count", :default => 0 + t.datetime "stargazers_count_updated_at", :default => '2014-07-23 03:14:37' + t.string "language" + t.integer "followers_count", :default => 0, :null => false + t.integer "github_id", :null => false + t.integer "owner_id" + t.integer "organization_id" + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "users_github_repositories_contributors", :id => false, :force => true do |t| + t.integer "repository_id", :null => false + t.integer "profile_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + create_table "users_github_repositories_followers", :id => false, :force => true do |t| + t.integer "repository_id", :null => false + t.integer "profile_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + + add_foreign_key "badges", "users", name: "badges_user_id_fk", dependent: :delete + + add_foreign_key "comments", "protips", name: "comments_protip_id_fk" + add_foreign_key "comments", "users", name: "comments_user_id_fk", dependent: :delete + + add_foreign_key "endorsements", "skills", name: "endorsements_skill_id_fk", dependent: :delete + add_foreign_key "endorsements", "users", name: "endorsements_endorsed_user_id_fk", column: "endorsed_user_id", dependent: :delete + add_foreign_key "endorsements", "users", name: "endorsements_endorsing_user_id_fk", column: "endorsing_user_id", dependent: :delete + + add_foreign_key "facts", "users", name: "facts_user_id_fk", dependent: :delete + + add_foreign_key "followed_teams", "teams", name: "followed_teams_team_id_fk" + add_foreign_key "followed_teams", "users", name: "followed_teams_user_id_fk", dependent: :delete + + add_foreign_key "invitations", "teams", name: "invitations_team_id_fk", dependent: :delete + add_foreign_key "invitations", "users", name: "invitations_inviter_id_fk", column: "inviter_id" + + add_foreign_key "likes", "users", name: "likes_user_id_fk" + + add_foreign_key "network_hierarchies", "networks", name: "network_hierarchies_ancestor_id_fk", column: "ancestor_id" + add_foreign_key "network_hierarchies", "networks", name: "network_hierarchies_descendant_id_fk", column: "descendant_id" + + add_foreign_key "network_protips", "networks", name: "network_protips_network_id_fk", dependent: :delete + add_foreign_key "network_protips", "protips", name: "network_protips_protip_id_fk", dependent: :delete + + add_foreign_key "networks", "networks", name: "networks_parent_id_fk", column: "parent_id" + + add_foreign_key "opportunities", "teams", name: "opportunities_team_id_fk" + + add_foreign_key "pictures", "users", name: "pictures_user_id_fk" + + add_foreign_key "protip_links", "protips", name: "protip_links_protip_id_fk" + + add_foreign_key "protips", "users", name: "protips_user_id_fk", dependent: :delete + + add_foreign_key "seized_opportunities", "opportunities", name: "seized_opportunities_opportunity_id_fk", dependent: :delete + add_foreign_key "seized_opportunities", "users", name: "seized_opportunities_user_id_fk" + + add_foreign_key "sent_mails", "users", name: "sent_mails_user_id_fk" + + add_foreign_key "skills", "users", name: "skills_user_id_fk", dependent: :delete + + add_foreign_key "taggings", "tags", name: "taggings_tag_id_fk" + + add_foreign_key "teams_account_plans", "plans", name: "teams_account_plans_plan_id_fk" + add_foreign_key "teams_account_plans", "teams_accounts", name: "teams_account_plans_account_id_fk", column: "account_id" + + add_foreign_key "teams_accounts", "teams", name: "teams_accounts_team_id_fk", dependent: :delete + + add_foreign_key "teams_locations", "teams", name: "teams_locations_team_id_fk", dependent: :delete + + add_foreign_key "teams_members", "teams", name: "teams_members_team_id_fk", dependent: :delete + add_foreign_key "teams_members", "users", name: "teams_members_user_id_fk" + + add_foreign_key "user_events", "users", name: "user_events_user_id_fk" + + add_foreign_key "users", "teams", name: "users_team_id_fk" + + add_foreign_key "users_github_organizations_followers", "users_github_organizations", name: "users_github_organizations_followers_organization_id_fk", column: "organization_id", dependent: :delete + add_foreign_key "users_github_organizations_followers", "users_github_profiles", name: "users_github_organizations_followers_profile_id_fk", column: "profile_id" + + add_foreign_key "users_github_profiles", "users", name: "users_github_profiles_user_id_fk" + + add_foreign_key "users_github_profiles_followers", "users_github_profiles", name: "users_github_profiles_followers_follower_id_fk", column: "follower_id", dependent: :delete + add_foreign_key "users_github_profiles_followers", "users_github_profiles", name: "users_github_profiles_followers_profile_id_fk", column: "profile_id" + + add_foreign_key "users_github_repositories", "users_github_organizations", name: "users_github_repositories_organization_id_fk", column: "organization_id" + add_foreign_key "users_github_repositories", "users_github_profiles", name: "users_github_repositories_owner_id_fk", column: "owner_id" + + add_foreign_key "users_github_repositories_contributors", "users_github_profiles", name: "users_github_repositories_contributors_profile_id_fk", column: "profile_id" + add_foreign_key "users_github_repositories_contributors", "users_github_repositories", name: "users_github_repositories_contributors_repository_id_fk", column: "repository_id", dependent: :delete + + add_foreign_key "users_github_repositories_followers", "users_github_profiles", name: "users_github_repositories_followers_profile_id_fk", column: "profile_id" + add_foreign_key "users_github_repositories_followers", "users_github_repositories", name: "users_github_repositories_followers_repository_id_fk", column: "repository_id", dependent: :delete + end diff --git a/db/seeds.rb b/db/seeds.rb index 474a337c..6a4aaf41 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,8 +5,21 @@ def self.create_protip_for(user) yield protip = user.protips.build protip.save! end + + def self.create_network_for(name) + Network.find_or_create_by_name(name) do |n| + n.create_slug! + end + end end +puts '---- NETWORKS ----' + +S.create_network_for('Ruby') +S.create_network_for('JavaScript') + +puts '---- PLANS ----' + Plan.find_or_create_by_id(1) do |s| s.amount = 0 s.interval = 'month' @@ -107,27 +120,27 @@ def self.create_protip_for(user) S.create_protip_for(bryce) do |p| p.title = 'Suspendisse potenti' p.body = '<p>Suspendisse potenti. Nunc iaculis risus vel ‘Orci Ornare’ dignissim sed vitae nulla. Nulla lobortis tempus commodo. Suspendisse <em>potenti</em>. Duis sagittis, est sit amet gravida tristique, purus lectus venenatis urna, id ‘molestie’ magna risus ut nunc. Donec tempus tempus tellus, ac <abbr title="Hypertext Markup Language">HTML</abbr> lacinia turpis mattis ac. Fusce ac sodales magna. Fusce ac sodales <abbr title="Cascading Style Sheets">CSS</abbr> magna.</p>' - p.topics = %w{suspendisse potenti} + p.topic_list = %w{suspendisse potenti} end S.create_protip_for(bryce) do |p| p.title = 'Vinyl Blue Bottle four loko wayfarers' p.body = 'Austin try-hard artisan, bicycle rights salvia squid dreamcatcher hoodie before they sold out Carles scenester ennui. Organic mumblecore Tumblr, gentrify retro 90\'s fanny pack flexitarian raw denim roof party cornhole. Hella direct trade mixtape +1 cliche, slow-carb Neutra craft beer tousled fap DIY.' - p.topics = %w{etsy hipster} + p.topic_list = %w{etsy hipster} end S.create_protip_for(lisa) do |p| p.title = 'Cras molestie risus a enim convallis vitae luctus libero lacinia' p.body = '<p>Cras molestie risus a enim convallis vitae luctus libero lacinia. Maecenas sit <q cite="http://www.heydonworks.com">amet tellus nec mi gravida posuere</q> non pretium magna. Nulla vel magna sit amet dui <a href="#">lobortis</a> commodo vitae vel nulla. </p>' - p.topics = %w{cras molestie} + p.topic_list = %w{cras molestie} end puts '---- TEAMS ----' team_name = 'Put a Bird on It' paboi = Team.where(name: team_name).try(:first) || Team.create!(name: team_name) -paboi.add_user(lisa) -paboi.add_user(bryce) +paboi.add_member(lisa) +paboi.add_member(bryce) paboi.benefit_name_1 = 'Putting birds on things.' paboi.big_quote = 'The dream of the 90s is alive in Portland!' @@ -148,4 +161,11 @@ def self.create_protip_for(user) paboi.save! -Protip.rebuild_index unless Rails.env.staging? || Rails.env.production? +unless Rails.env.staging? || Rails.env.production? + #Network.rebuild_index + Opportunity.rebuild_index + Protip.rebuild_index + + #Team.rebuild_index #TODO: Disabled until switched from mongo + Team.all.each { |team| team.tire.update_index } +end diff --git a/design-wip/config.rb b/design-wip/config.rb new file mode 100644 index 00000000..60c04ca8 --- /dev/null +++ b/design-wip/config.rb @@ -0,0 +1,18 @@ +# Require any additional compass plugins here. +require 'compass-normalize' + +# Set this to the root of your project when deployed: +http_path = "/" +css_dir = "css" +sass_dir = "sass" +images_dir = "img" +javascripts_dir = "js" + +# You can select your preferred output style here (can be overridden via the command line): +output_style = :compressed + +# To enable relative paths to assets via compass helper functions. Uncomment: +# relative_assets = true + +# To disable debugging comments that display the original location of your selectors. Uncomment: +line_comments = false diff --git a/design-wip/css/arrow-down.svg b/design-wip/css/arrow-down.svg new file mode 100644 index 00000000..8c5c2ade --- /dev/null +++ b/design-wip/css/arrow-down.svg @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="-239 241 20 20" enable-background="new -239 241 20 20" xml:space="preserve"> +<g id="icomoon-ignore"> +</g> +<path fill="#999999" d="M-223.5,249.6c-0.4,0.4-4.7,4.5-4.7,4.5c-0.2,0.2-0.5,0.3-0.8,0.3s-0.6-0.1-0.8-0.3c0,0-4.3-4.1-4.7-4.5 + c-0.4-0.4-0.4-1.2,0-1.6c0.4-0.4,1-0.5,1.6,0l3.9,3.7l3.9-3.7c0.5-0.5,1.1-0.4,1.6,0C-223.1,248.4-223.1,249.1-223.5,249.6z"/> +</svg> diff --git a/design-wip/css/icomoon.eot b/design-wip/css/icomoon.eot new file mode 100755 index 00000000..4b3d146d Binary files /dev/null and b/design-wip/css/icomoon.eot differ diff --git a/design-wip/css/icomoon.svg b/design-wip/css/icomoon.svg new file mode 100755 index 00000000..214621d4 --- /dev/null +++ b/design-wip/css/icomoon.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > +<svg xmlns="http://www.w3.org/2000/svg"> +<metadata>Generated by IcoMoon</metadata> +<defs> +<font id="icomoon" horiz-adv-x="1024"> +<font-face units-per-em="1024" ascent="960" descent="-64" /> +<missing-glyph horiz-adv-x="1024" /> +<glyph unicode=" " d="" horiz-adv-x="512" /> +<glyph unicode="" d="M819.2 819.2h-614.4c-56.32 0-102.4-46.080-102.4-102.4v-358.4c0-56.32 46.080-102.4 102.4-102.4h204.8l204.8-153.6v153.6h204.8c56.32 0 102.4 46.080 102.4 102.4v358.4c0 56.32-46.080 102.4-102.4 102.4z" /> +<glyph unicode="" d="M512 890.88c-237.568 0-430.080-192.614-430.080-430.080 0-237.568 192.563-430.080 430.080-430.080s430.080 192.563 430.080 430.080c0 237.517-192.563 430.080-430.080 430.080zM564.326 408.474v-206.182h-104.653v206.182h-206.234v104.653h206.182v206.234h104.704v-206.182h206.182v-104.704h-206.182z" /> +<glyph unicode="" d="M901.12 461.568l-195.994-0.051 0.051-359.219h-386.662v359.27l-195.635-0.051 389.171 388.301z" /> +<glyph unicode="" d="M585.574 741.581c-21.402-20.89-230.502-240.435-230.502-240.435-11.418-11.162-17.101-25.754-17.101-40.346s5.683-29.184 17.101-40.346c0 0 209.101-219.546 230.502-240.384 21.402-20.89 59.904-22.323 82.739 0 22.784 22.272 24.576 53.35-0.051 80.64l-191.846 200.090 191.846 200.090c24.627 27.341 22.835 58.419 0.051 80.691-22.886 22.272-61.389 20.89-82.739 0z" /> +<glyph unicode="" d="M438.426 741.581c21.402-20.89 230.502-240.435 230.502-240.435 11.469-11.162 17.152-25.754 17.152-40.346s-5.683-29.184-17.152-40.346c0 0-209.101-219.546-230.502-240.384-21.402-20.89-59.853-22.323-82.739 0-22.835 22.272-24.627 53.35 0 80.64l191.898 200.090-191.846 200.090c-24.627 27.341-22.835 58.419 0 80.691s61.338 20.89 82.688 0z" /> +</font></defs></svg> \ No newline at end of file diff --git a/design-wip/css/icomoon.ttf b/design-wip/css/icomoon.ttf new file mode 100755 index 00000000..a3ce12e1 Binary files /dev/null and b/design-wip/css/icomoon.ttf differ diff --git a/design-wip/css/icomoon.woff b/design-wip/css/icomoon.woff new file mode 100755 index 00000000..3b48a346 Binary files /dev/null and b/design-wip/css/icomoon.woff differ diff --git a/design-wip/css/style.css b/design-wip/css/style.css new file mode 100644 index 00000000..9989859d --- /dev/null +++ b/design-wip/css/style.css @@ -0,0 +1 @@ +/*! normalize.css v3.0.0 | MIT License | git.io/normalize *//*! normalize.css v3.0.0 | HTML5 Display Definitions | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}/*! normalize.css v3.0.0 | Base | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}/*! normalize.css v3.0.0 | Links | MIT License | git.io/normalize */a{background:transparent}a:active,a:hover{outline:0}/*! normalize.css v3.0.0 | Typography | MIT License | git.io/normalize */abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1,.h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}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}/*! normalize.css v3.0.0 | Embedded Content | MIT License | git.io/normalize */img{border:0}svg:not(:root){overflow:hidden}/*! normalize.css v3.0.0 | Figures | MIT License | git.io/normalize */figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}/*! normalize.css v3.0.0 | Forms | MIT License | git.io/normalize */button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}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}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}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}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}/*! normalize.css v3.0.0 | Tables | MIT License | git.io/normalize */table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.grid,.grid-uniform{list-style:none;margin:0;padding:0;margin-left:-24px}.grid:before,.grid:after,.grid-uniform:before,.grid-uniform:after{content:"";display:table}.grid:after,.grid-uniform:after{clear:both}.grid__item{float:left;min-height:1px;padding-left:24px;vertical-align:top;width:100%}.grid--narrow{margin-left:-12px}.grid--narrow>.grid__item{padding-left:12px}.grid--wide{margin-left:-48px}.grid--wide>.grid__item{padding-left:48px}.one-whole{width:100%}.one-half,.two-quarters,.three-sixths,.four-eighths,.five-tenths,.six-twelfths{width:50%}.one-third,.two-sixths,.four-twelfths{width:33.333%}.two-thirds,.four-sixths,.eight-twelfths{width:66.666%}.one-quarter,.two-eighths,.three-twelfths{width:25%}.three-quarters,.six-eighths,.nine-twelfths{width:75%}.one-fifth,.two-tenths{width:20%}.two-fifths,.four-tenths{width:40%}.three-fifths,.six-tenths{width:60%}.four-fifths,.eight-tenths{width:80%}.one-sixth,.two-twelfths{width:16.666%}.five-sixths,.ten-twelfths{width:83.333%}.one-eighth{width:12.5%}.three-eighths{width:37.5%}.five-eighths{width:62.5%}.seven-eighths{width:87.5%}.one-tenth{width:10%}.three-tenths{width:30%}.seven-tenths{width:70%}.nine-tenths{width:90%}.one-twelfth{width:8.333%}.five-twelfths{width:41.666%}.seven-twelfths{width:58.333%}.eleven-twelfths{width:91.666%}.show{display:block !important}.hide{display:none !important}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}.left{float:left !important}.right{float:right !important}@media only screen and (max-width: 485px){.small--one-whole{width:100%}.small--one-half,.small--two-quarters,.small--three-sixths,.small--four-eighths,.small--five-tenths,.small--six-twelfths{width:50%}.small--one-third,.small--two-sixths,.small--four-twelfths{width:33.333%}.small--two-thirds,.small--four-sixths,.small--eight-twelfths{width:66.666%}.small--one-quarter,.small--two-eighths,.small--three-twelfths{width:25%}.small--three-quarters,.small--six-eighths,.small--nine-twelfths{width:75%}.small--one-fifth,.small--two-tenths{width:20%}.small--two-fifths,.small--four-tenths{width:40%}.small--three-fifths,.small--six-tenths{width:60%}.small--four-fifths,.small--eight-tenths{width:80%}.small--one-sixth,.small--two-twelfths{width:16.666%}.small--five-sixths,.small--ten-twelfths{width:83.333%}.small--one-eighth{width:12.5%}.small--three-eighths{width:37.5%}.small--five-eighths{width:62.5%}.small--seven-eighths{width:87.5%}.small--one-tenth{width:10%}.small--three-tenths{width:30%}.small--seven-tenths{width:70%}.small--nine-tenths{width:90%}.small--one-twelfth{width:8.333%}.small--five-twelfths{width:41.666%}.small--seven-twelfths{width:58.333%}.small--eleven-twelfths{width:91.666%}.small--show{display:block !important}.small--hide{display:none !important}.small--text-left{text-align:left !important}.small--text-right{text-align:right !important}.small--text-center{text-align:center !important}.small--left{float:left !important}.small--right{float:right !important}}@media only screen and (min-width: 486px) and (max-width: 768px){.medium--one-whole{width:100%}.medium--one-half,.medium--two-quarters,.medium--three-sixths,.medium--four-eighths,.medium--five-tenths,.medium--six-twelfths{width:50%}.medium--one-third,.medium--two-sixths,.medium--four-twelfths{width:33.333%}.medium--two-thirds,.medium--four-sixths,.medium--eight-twelfths{width:66.666%}.medium--one-quarter,.medium--two-eighths,.medium--three-twelfths{width:25%}.medium--three-quarters,.medium--six-eighths,.medium--nine-twelfths{width:75%}.medium--one-fifth,.medium--two-tenths{width:20%}.medium--two-fifths,.medium--four-tenths{width:40%}.medium--three-fifths,.medium--six-tenths{width:60%}.medium--four-fifths,.medium--eight-tenths{width:80%}.medium--one-sixth,.medium--two-twelfths{width:16.666%}.medium--five-sixths,.medium--ten-twelfths{width:83.333%}.medium--one-eighth{width:12.5%}.medium--three-eighths{width:37.5%}.medium--five-eighths{width:62.5%}.medium--seven-eighths{width:87.5%}.medium--one-tenth{width:10%}.medium--three-tenths{width:30%}.medium--seven-tenths{width:70%}.medium--nine-tenths{width:90%}.medium--one-twelfth{width:8.333%}.medium--five-twelfths{width:41.666%}.medium--seven-twelfths{width:58.333%}.medium--eleven-twelfths{width:91.666%}.medium--show{display:block !important}.medium--hide{display:none !important}.medium--text-left{text-align:left !important}.medium--text-right{text-align:right !important}.medium--text-center{text-align:center !important}.medium--left{float:left !important}.medium--right{float:right !important}}@media only screen and (min-width: 769px){.large--one-whole{width:100%}.large--one-half,.large--two-quarters,.large--three-sixths,.large--four-eighths,.large--five-tenths,.large--six-twelfths{width:50%}.large--one-third,.large--two-sixths,.large--four-twelfths{width:33.333%}.large--two-thirds,.large--four-sixths,.large--eight-twelfths{width:66.666%}.large--one-quarter,.large--two-eighths,.large--three-twelfths{width:25%}.large--three-quarters,.large--six-eighths,.large--nine-twelfths{width:75%}.large--one-fifth,.large--two-tenths{width:20%}.large--two-fifths,.large--four-tenths{width:40%}.large--three-fifths,.large--six-tenths{width:60%}.large--four-fifths,.large--eight-tenths{width:80%}.large--one-sixth,.large--two-twelfths{width:16.666%}.large--five-sixths,.large--ten-twelfths{width:83.333%}.large--one-eighth{width:12.5%}.large--three-eighths{width:37.5%}.large--five-eighths{width:62.5%}.large--seven-eighths{width:87.5%}.large--one-tenth{width:10%}.large--three-tenths{width:30%}.large--seven-tenths{width:70%}.large--nine-tenths{width:90%}.large--one-twelfth{width:8.333%}.large--five-twelfths{width:41.666%}.large--seven-twelfths{width:58.333%}.large--eleven-twelfths{width:91.666%}.large--show{display:block !important}.large--hide{display:none !important}.large--text-left{text-align:left !important}.large--text-right{text-align:right !important}.large--text-center{text-align:center !important}.large--left{float:left !important}.large--right{float:right !important}}[class*="push--"]{position:relative}.push--one-whole{left:100%}.push--one-half,.push--two-quarters,.push--three-sixths,.push--four-eighths,.push--five-tenths,.push--six-twelfths{left:50%}.push--one-third,.push--two-sixths,.push--four-twelfths{left:33.333%}.push--two-thirds,.push--four-sixths,.push--eight-twelfths{left:66.666%}.push--one-quarter,.push--two-eighths,.push--three-twelfths{left:25%}.push--three-quarters,.push--six-eighths,.push--nine-twelfths{left:75%}.push--one-fifth,.push--two-tenths{left:20%}.push--two-fifths,.push--four-tenths{left:40%}.push--three-fifths,.push--six-tenths{left:60%}.push--four-fifths,.push--eight-tenths{left:80%}.push--one-sixth,.push--two-twelfths{left:16.666%}.push--five-sixths,.push--ten-twelfths{left:83.333%}.push--one-eighth{left:12.5%}.push--three-eighths{left:37.5%}.push--five-eighths{left:62.5%}.push--seven-eighths{left:87.5%}.push--one-tenth{left:10%}.push--three-tenths{left:30%}.push--seven-tenths{left:70%}.push--nine-tenths{left:90%}.push--one-twelfth{left:8.333%}.push--five-twelfths{left:41.666%}.push--seven-twelfths{left:58.333%}.push--eleven-twelfths{left:91.666%}@media only screen and (max-width: 485px){.push--small--one-whole{left:100%}.push--small--one-half,.push--small--two-quarters,.push--small--three-sixths,.push--small--four-eighths,.push--small--five-tenths,.push--small--six-twelfths{left:50%}.push--small--one-third,.push--small--two-sixths,.push--small--four-twelfths{left:33.333%}.push--small--two-thirds,.push--small--four-sixths,.push--small--eight-twelfths{left:66.666%}.push--small--one-quarter,.push--small--two-eighths,.push--small--three-twelfths{left:25%}.push--small--three-quarters,.push--small--six-eighths,.push--small--nine-twelfths{left:75%}.push--small--one-fifth,.push--small--two-tenths{left:20%}.push--small--two-fifths,.push--small--four-tenths{left:40%}.push--small--three-fifths,.push--small--six-tenths{left:60%}.push--small--four-fifths,.push--small--eight-tenths{left:80%}.push--small--one-sixth,.push--small--two-twelfths{left:16.666%}.push--small--five-sixths,.push--small--ten-twelfths{left:83.333%}.push--small--one-eighth{left:12.5%}.push--small--three-eighths{left:37.5%}.push--small--five-eighths{left:62.5%}.push--small--seven-eighths{left:87.5%}.push--small--one-tenth{left:10%}.push--small--three-tenths{left:30%}.push--small--seven-tenths{left:70%}.push--small--nine-tenths{left:90%}.push--small--one-twelfth{left:8.333%}.push--small--five-twelfths{left:41.666%}.push--small--seven-twelfths{left:58.333%}.push--small--eleven-twelfths{left:91.666%}}@media only screen and (min-width: 486px) and (max-width: 768px){.push--medium--one-whole{left:100%}.push--medium--one-half,.push--medium--two-quarters,.push--medium--three-sixths,.push--medium--four-eighths,.push--medium--five-tenths,.push--medium--six-twelfths{left:50%}.push--medium--one-third,.push--medium--two-sixths,.push--medium--four-twelfths{left:33.333%}.push--medium--two-thirds,.push--medium--four-sixths,.push--medium--eight-twelfths{left:66.666%}.push--medium--one-quarter,.push--medium--two-eighths,.push--medium--three-twelfths{left:25%}.push--medium--three-quarters,.push--medium--six-eighths,.push--medium--nine-twelfths{left:75%}.push--medium--one-fifth,.push--medium--two-tenths{left:20%}.push--medium--two-fifths,.push--medium--four-tenths{left:40%}.push--medium--three-fifths,.push--medium--six-tenths{left:60%}.push--medium--four-fifths,.push--medium--eight-tenths{left:80%}.push--medium--one-sixth,.push--medium--two-twelfths{left:16.666%}.push--medium--five-sixths,.push--medium--ten-twelfths{left:83.333%}.push--medium--one-eighth{left:12.5%}.push--medium--three-eighths{left:37.5%}.push--medium--five-eighths{left:62.5%}.push--medium--seven-eighths{left:87.5%}.push--medium--one-tenth{left:10%}.push--medium--three-tenths{left:30%}.push--medium--seven-tenths{left:70%}.push--medium--nine-tenths{left:90%}.push--medium--one-twelfth{left:8.333%}.push--medium--five-twelfths{left:41.666%}.push--medium--seven-twelfths{left:58.333%}.push--medium--eleven-twelfths{left:91.666%}}@media only screen and (min-width: 769px){.push--large--one-whole{left:100%}.push--large--one-half,.push--large--two-quarters,.push--large--three-sixths,.push--large--four-eighths,.push--large--five-tenths,.push--large--six-twelfths{left:50%}.push--large--one-third,.push--large--two-sixths,.push--large--four-twelfths{left:33.333%}.push--large--two-thirds,.push--large--four-sixths,.push--large--eight-twelfths{left:66.666%}.push--large--one-quarter,.push--large--two-eighths,.push--large--three-twelfths{left:25%}.push--large--three-quarters,.push--large--six-eighths,.push--large--nine-twelfths{left:75%}.push--large--one-fifth,.push--large--two-tenths{left:20%}.push--large--two-fifths,.push--large--four-tenths{left:40%}.push--large--three-fifths,.push--large--six-tenths{left:60%}.push--large--four-fifths,.push--large--eight-tenths{left:80%}.push--large--one-sixth,.push--large--two-twelfths{left:16.666%}.push--large--five-sixths,.push--large--ten-twelfths{left:83.333%}.push--large--one-eighth{left:12.5%}.push--large--three-eighths{left:37.5%}.push--large--five-eighths{left:62.5%}.push--large--seven-eighths{left:87.5%}.push--large--one-tenth{left:10%}.push--large--three-tenths{left:30%}.push--large--seven-tenths{left:70%}.push--large--nine-tenths{left:90%}.push--large--one-twelfth{left:8.333%}.push--large--five-twelfths{left:41.666%}.push--large--seven-twelfths{left:58.333%}.push--large--eleven-twelfths{left:91.666%}}.hljs{display:block;font-family:Courier;font-size:14px;line-height:18px;overflow-x:auto;padding:7.5px 30px;background:#1d1f21;-webkit-text-size-adjust:none}.hljs::selection,.hljs span::selection{background:#373b41}.hljs::-moz-selection,.hljs span::-moz-selection{background:#373b41}.hljs,.hljs-setting .hljs-value,.hljs-expression .hljs-variable,.hljs-expression .hljs-begin-block,.hljs-expression .hljs-end-block,.hljs-class .hljs-params,.hljs-function .hljs-params,.hljs-at_rule .hljs-preprocessor{color:#c5c8c6}.hljs-title,.hljs-function .hljs-title,.hljs-keyword .hljs-common,.hljs-class .hljs-title,.hljs-decorator,.hljs-tag .hljs-title,.hljs-header,.hljs-sub,.hljs-function{color:#f0c674}.hljs-comment,.hljs-javadoc,.hljs-output .hljs-value,.hljs-pi,.hljs-shebang,.hljs-doctype{color:#707880}.hljs-number,.hljs-symbol,.hljs-literal,.hljs-deletion,.hljs-link_url,.hljs-symbol .hljs-string,.hljs-argument,.hljs-hexcolor,.hljs-input .hljs-prompt,.hljs-char{color:#c66}.hljs-string,.hljs-special,.hljs-javadoctag,.hljs-addition,.hljs-important,.hljs-tag .hljs-value,.hljs-at.rule .hljs-keyword,.hljs-regexp,.hljs-attr_selector{color:#b5bd68}.hljs-variable,.hljs-property,.hljs-envar,.hljs-code,.hljs-expression,.hljs-localvars,.hljs-id,.hljs-variable .hljs-filter,.hljs-variable .hljs-filter .hljs-keyword,.hljs-template_tag .hljs-filter .hljs-keyword{color:#b294bb}.hljs-statement,.hljs-label,.hljs-keyword,.hljs-xmlDocTag,.hljs-function .hljs-keyword,.hljs-chunk,.hljs-cdata,.hljs-link_label,.hljs-bullet,.hljs-class .hljs-keyword,.hljs-smartquote,.hljs-method,.hljs-list .hljs-title,.hljs-tag{color:#81a2be}.hljs-pseudo,.hljs-exception,.hljs-annotation,.hljs-subst,.hljs-change,.hljs-cbracket,.hljs-operator,.hljs-horizontal_rule,.hljs-preprocessor .hljs-keyword,.hljs-typedef,.hljs-template_tag,.hljs-variable,.hljs-variable .hljs-filter .hljs-argument,.hljs-at_rule,.hljs-at_rule .hljs-string,.hljs-at_rule .hljs-keyword{color:#8abeb7}.hljs-type,.hljs-typename,.hljs-inheritance .hljs-parent,.hljs-constant,.hljs-built_in,.hljs-setting,.hljs-structure,.hljs-link_reference,.hljs-attribute,.hljs-blockquote,.hljs-quoted,.hljs-class,.hljs-header{color:#de935f}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}@font-face{font-family:'icomoon';src:url("icomoon.eot?-a8rj9i");src:url("icomoon.eot?#iefix-a8rj9i") format("embedded-opentype"),url("icomoon.woff?-a8rj9i") format("woff"),url("icomoon.ttf?-a8rj9i") format("truetype"),url("icomoon.svg?-a8rj9i#icomoon") format("svg");font-weight:normal;font-style:normal}[class^="icon-"],[class*=" icon-"]{font-family:'icomoon';speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-comment:before{content:"\e600"}.icon-plus:before{content:"\e601"}.icon-arrow-up-upload:before{content:"\e602"}.icon-arrow-left:before{content:"\e603"}.icon-arrow-right:before{content:"\e604"}h1,.h1,h2,.h2,h3,.h3,h4,.h4,.site-header,.job__title,h5,.h5,.secondary-menu .addprotip,.footer-nav,.protip__content,h6,.h6,.btn .icon,.upvote .icon,.upvote--popular .icon,.job__label .icon,.pagination .btn,.pagination .upvote,.pagination .upvote--popular,.pagination .job__label,.author-block__company,.job__loc,.protip__comments,.comment-meta,.tag{font-weight:400}h1,.h1{font-size:1.875em;line-height:1.25em}@media screen and (min-width: 770px){h1,.h1{font-size:3em}}h2,.h2{font-size:1.5em;line-height:1.25em}@media screen and (min-width: 770px){h2,.h2{font-size:2em}}h3,.h3{font-size:1.375em;line-height:1.375em}@media screen and (min-width: 770px){h3,.h3{font-size:1.5em}}h4,.h4,.site-header,.job__title{font-size:1.125em;line-height:1.5em}@media screen and (min-width: 770px){h4,.h4,.site-header,.job__title{font-size:1.25em}}h5,.h5,.secondary-menu .addprotip,.footer-nav,.protip__content{font-size:1em;line-height:1.125em}h6,.h6,.btn .icon,.upvote .icon,.upvote--popular .icon,.job__label .icon,.pagination .btn,.pagination .upvote,.pagination .upvote--popular,.pagination .job__label,.author-block__company,.job__loc,.protip__comments,.comment-meta,.tag{font-size:0.875em;line-height:1.125em}p,ul,ul li{color:gray;font-size:1em;line-height:1.75em}p{margin:0 0 15px}a{color:#87A3A9;text-decoration:none;-webkit-transition:all 0.35s ease;-moz-transition:all 0.35s ease;-o-transition:all 0.35s ease;transition:all 0.35s ease}a:hover,a:active{color:#94BA00}ul{padding:0 0 0 45px}@media screen and (min-width: 770px){ul{padding:0 0 0 30px}}html,body{background-color:#fff;color:#4A4A4A;font-family:"Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;margin:0;padding:0}hr{border:0;border-bottom:1px solid #E2ECED;margin:15px 0}@media screen and (min-width: 770px){hr{margin:30px 0}}textarea{border-radius:15px;border:1px solid #E2ECED;font-size:0.875em;height:28px;padding:3px 15px;width:100%}@media screen and (min-width: 770px){textarea{font-size:1em;height:34px;padding:6px 15px}}pre{margin:0;padding:0}.container{margin:0 auto;max-width:1000px;padding:0 22.5px}.container.full{padding-top:0;padding-bottom:0}@media screen and (min-width: 486px){.container{padding:0 30px}}.inline{list-style-type:none;margin:0;padding:0}.inline li{display:inline-block;margin-left:15px}.inline li:first-child{margin-left:0}.page-body{background-color:#F0F5F6;padding:15px 0}@media screen and (min-width: 486px){.page-body{padding:22.5px 0}}@media screen and (min-width: 486px){.page-body{padding:30px 0}}.relative{position:relative}.btn,.upvote,.upvote--popular,.job__label{background-color:#11A1BB;border-radius:999px;color:#fff;font-size:0.875em;display:block;text-align:center;padding:9px 15px 11px}.btn:hover,.upvote:hover,.upvote--popular:hover,.job__label:hover,.btn:active,.upvote:active,.upvote--popular:active,.job__label:active{color:#fff;background-color:#0f8da4}.btn .icon,.upvote .icon,.upvote--popular .icon,.job__label .icon{position:relative;top:1px}.btn--small,.upvote,.upvote--popular,.job__label{font-weight:bold;font-size:0.875em;padding:4px}@media screen and (min-width: 770px){.btn--small,.upvote,.upvote--popular,.job__label{padding:8px}}.upvote,.upvote--popular{background-color:transparent;border:2px solid #E2ECED;color:#4A4A4A;width:auto}.upvote:hover,.upvote--popular:hover{background-color:transparent;border-color:#11A1BB;color:#4A4A4A;cursor:pointer}.upvote:hover .icon,.upvote--popular:hover .icon{position:relative;top:-2px}.upvote .icon,.upvote--popular .icon{color:#11A1BB;-webkit-transition:all 0.35s ease;-moz-transition:all 0.35s ease;-o-transition:all 0.35s ease;transition:all 0.35s ease}.upvote--voted,.upvote--voted:hover{background-color:#11A1BB;border-color:#11A1BB;color:#fff}.upvote--voted .icon,.upvote--voted:hover .icon{color:#fff}.upvote--popular .icon{color:#F6563C}.upvote--popvoted,.upvote--popvoted:hover{background-color:#F6563C;border-color:#F6563C;color:#fff}.upvote--popvoted .icon,.upvote--popvoted:hover .icon{color:#fff}.logo{margin:0 auto 20px;text-align:center;width:100%}@media screen and (min-width: 770px){.logo{display:inline-block;margin:0;width:auto}}.main-nav{padding:30px 0 15px}.main-nav:before,.main-nav:after{content:"";display:table}.main-nav:after{clear:both}@media screen and (min-width: 486px){.main-nav{padding:45px 0 30px}}.main-nav .menu{display:inline}@media screen and (min-width: 770px){.main-nav .menu{margin-left:30px;position:relative;top:-7.5px}}.secondary-menu{border-bottom:1px solid #E2ECED;padding-bottom:15px}@media screen and (min-width: 486px){.secondary-menu{padding-bottom:0}}.secondary-menu li{padding:22.5px 0}.secondary-menu li.active a{border-bottom:3px solid #94BA00;color:#4A4A4A;font-weight:bold}.secondary-menu .addprotip{position:relative;margin-top:15px}@media screen and (min-width: 486px){.secondary-menu .addprotip{margin-top:15px}}@media screen and (min-width: 770px){.secondary-menu .addprotip{float:right;display:inline-block}}.secondary-menu--mobile{background-color:#fff;margin-bottom:15px}.secondary-menu--mobile select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;background:transparent url("arrow-down.svg") no-repeat right center;background-position:right 15px center;background-size:15px;border-bottom:1px solid #E2ECED;border-radius:0;border:0;cursor:pointer;padding:10px 15px;width:100%}@media screen and (min-width: 486px){.secondary-menu--mobile{display:none}}.site-header{border-bottom:1px solid #E2ECED}.site-header .active{color:#94BA00}.user-block{float:right}.user-block__img{height:36px;width:36px;float:left;margin-right:10px;position:relative;border-radius:99px;top:-5px}.site-footer{background-color:#fff;padding:30px 0}.copy{color:#7d7d7d;font-size:0.75em}.footer-nav{line-height:1.5em;margin-bottom:7.5px}.mixpanel img{height:19px}.pagination{margin-top:15px}@media screen and (min-width: 486px){.pagination{margin-top:30px}}.pagination .btn,.pagination .upvote,.pagination .upvote--popular,.pagination .job__label{background-color:#fff;color:#4A4A4A;font-weight:bold;padding:9px 6px}.pagination .btn:hover,.pagination .upvote:hover,.pagination .upvote--popular:hover,.pagination .job__label:hover{background-color:#11A1BB;color:#fff}.pagination .next{padding-left:10px}.pagination .prev{padding-right:10px}.author-block{height:32px}@media screen and (min-width: 770px){.author-block{height:36px}}.author-block__company{color:#87A3A9;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}@media screen and (min-width: 770px){.author-block__company{width:90%}}.author-block__img{border-radius:99px;border:1px solid #E2ECED;float:right;height:32px;width:32px}@media screen and (min-width: 770px){.author-block__img{float:none;height:36px;width:36px}}.author-block__user{right:42px;line-height:20px;text-align:right;position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}@media screen and (min-width: 770px){.author-block__user{left:55px;right:auto;text-align:left}}.author-block__username{color:#4A4A4A}.job__desc{margin-bottom:0}.job__label:hover{background-color:#11A1BB}.job__loc{color:#87A3A9;display:block;margin:6px 0;text-transform:uppercase}.job__title{color:#4A4A4A;display:block;margin-bottom:6px}@media screen and (min-width: 770px){.job__title{margin-top:6px}}.protip,.protip__job{padding:15px}@media screen and (min-width: 486px){.protip,.protip__job{padding:22.5px}}@media screen and (min-width: 770px){.protip,.protip__job{padding:15px}}.protip hr,.protip__job hr{border-color:transparent;margin:7.5px 0}.protip{background-color:#fff;border-bottom:1px solid #E2ECED}.protip__comments{color:#87A3A9;font-weight:bold;margin-left:6px;display:inline-block;text-transform:uppercase;-webkit-transition:all 0.35s ease;-moz-transition:all 0.35s ease;-o-transition:all 0.35s ease;transition:all 0.35s ease}.protip__comments .icon-comment{position:relative;top:2px}.protip__content{margin:15px 0 0;line-height:1.3125em}@media screen and (min-width: 770px){.protip__content{margin:7px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.protip__content a{color:#4A4A4A}.protip__content a:hover,.protip__content a:hover .protip__comments{color:#94BA00}.protip__job{border:2px solid #E2ECED;margin:15px 0}@media screen and (min-width: 486px){.protip__job{margin:30px 0}}@media screen and (min-width: 770px){.protip__job{margin:30px}}.comment-avatar{border:1px solid #E2ECED;border-radius:99px;height:32px;width:32px}@media screen and (min-width: 770px){.comment-avatar{height:36px;width:36px}}.comment-body{margin-left:42px}@media screen and (min-width: 770px){.comment-body{margin-left:46px}}.comment-meta{color:#87A3A9}.protip-avatar{height:32px;width:32px;border-radius:99px;position:relative;top:12px;margin:0 3px}.protip-comment{margin-bottom:15px}.protip-comment .comment-avatar{position:relative;top:12px;margin-right:6px}.protip-comment h5,.protip-comment .h5,.protip-comment .secondary-menu .addprotip,.secondary-menu .protip-comment .addprotip,.protip-comment .footer-nav,.protip-comment .protip__content{font-weight:600;margin:0 !important;position:relative;top:-12px}.protip-comment form{margin-left:46px}@media screen and (min-width: 770px){.protip-comment{margin-bottom:30px}}.protip-comment.comment-box{margin:0}.protip-header{background-color:#fff;border-bottom:1px solid #E2ECED;padding:15px}.protip-single{background-color:#fff;padding:15px;word-wrap:break-word}@media screen and (min-width: 486px){.protip-single{padding:30px}}@media screen and (min-width: 770px){.protip-single{padding:60px}}.protip-single h1,.protip-single .h1{margin:0;text-align:center}.protip-meta{text-align:center}.protip-meta p{color:#87A3A9;font-size:0.875em;margin:0 0 15px}.protip-meta a{color:#4A4A4A}.tag-block{float:right;margin-top:1px}.tag-block li{margin:0 0 0 3px}@media screen and (min-width: 770px){.tag-block{margin-top:3px}}.tag{background-color:#87A3A9;border-radius:30px;color:#fff;padding:3px 15px} diff --git a/design-wip/img/avatar1.png b/design-wip/img/avatar1.png new file mode 100644 index 00000000..8c45e6d1 Binary files /dev/null and b/design-wip/img/avatar1.png differ diff --git a/design-wip/img/avatar10.png b/design-wip/img/avatar10.png new file mode 100644 index 00000000..60161e41 Binary files /dev/null and b/design-wip/img/avatar10.png differ diff --git a/design-wip/img/avatar2.png b/design-wip/img/avatar2.png new file mode 100644 index 00000000..99fa8ce5 Binary files /dev/null and b/design-wip/img/avatar2.png differ diff --git a/design-wip/img/avatar3.png b/design-wip/img/avatar3.png new file mode 100644 index 00000000..e633250e Binary files /dev/null and b/design-wip/img/avatar3.png differ diff --git a/design-wip/img/avatar4.png b/design-wip/img/avatar4.png new file mode 100644 index 00000000..233b5753 Binary files /dev/null and b/design-wip/img/avatar4.png differ diff --git a/design-wip/img/avatar5.png b/design-wip/img/avatar5.png new file mode 100644 index 00000000..a80cef67 Binary files /dev/null and b/design-wip/img/avatar5.png differ diff --git a/design-wip/img/avatar6.png b/design-wip/img/avatar6.png new file mode 100644 index 00000000..19f3c9df Binary files /dev/null and b/design-wip/img/avatar6.png differ diff --git a/design-wip/img/avatar7.png b/design-wip/img/avatar7.png new file mode 100644 index 00000000..0e6a2423 Binary files /dev/null and b/design-wip/img/avatar7.png differ diff --git a/design-wip/img/avatar8.png b/design-wip/img/avatar8.png new file mode 100644 index 00000000..b2b1276a Binary files /dev/null and b/design-wip/img/avatar8.png differ diff --git a/design-wip/img/avatar9.png b/design-wip/img/avatar9.png new file mode 100644 index 00000000..4ae14f84 Binary files /dev/null and b/design-wip/img/avatar9.png differ diff --git a/design-wip/img/logo.png b/design-wip/img/logo.png new file mode 100644 index 00000000..e6b654ab Binary files /dev/null and b/design-wip/img/logo.png differ diff --git a/design-wip/img/user-avatar.png b/design-wip/img/user-avatar.png new file mode 100644 index 00000000..190c6d6f Binary files /dev/null and b/design-wip/img/user-avatar.png differ diff --git a/design-wip/index.html b/design-wip/index.html new file mode 100644 index 00000000..e4468e56 --- /dev/null +++ b/design-wip/index.html @@ -0,0 +1,454 @@ +<!DOCTYPE html> +<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]--> +<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]--> +<!--[if IE 8]> <html class="lt-ie9"> <![endif]--> +<!--[if gt IE 8]><!--> <html class=""> <!--<![endif]--> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>Coderwall</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <link rel="stylesheet" href="css/style.css"> + </head> + + <body> + <header class="site-header"> + <div class="container"> + + <div class="main-nav"> + <div class="logo"> + <a href="index.html"><img src="img/logo.png"></a> + </div> + <ul class="inline menu"> + <li><a href="index.html" class="active">Protips</a></li> + <li><a href="#">Job Board</a></li> + </ul> + <a href="#" class="user-block"> + <img src="img/user-avatar.png" class="user-block__img"> <span class="user-block__user">tranhelen</span> + </a> + </div> + + </div> + </header> + + <nav class="secondary-menu"> + <div class="container"> + + <div class="grid"> + <div class="grid__item small--hide medium--two-thirds large--three-quarters"> + <ul class="inline"> + <li class="active"><a href="#">Latest</a></li> + <li><a href="#">Popular</a></li> + </ul> + </div> + <div class="grid__item medium--one-third large--one-quarter"> + <a href="#" class="btn addprotip"> + <span class="icon icon-plus"></span> New Protip + </a> + </div> + </div> + + </div> + </nav> + + <div class="page-body"> + <div class="container"> + + <div class="secondary-menu--mobile"> + <select> + <option>Fresh</option> + <option>Trend</option> + <option>Popular</option> + <option>Liked</option> + </select> + </div> + + <div class="protip"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <a class="upvote--popular"> + <span class="icon icon-arrow-up-upload"></span> 2 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar1.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Maverick</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <p class="protip__content"> + <a href="protip.html"> + Super sweet Vim split manipulation on mac + <span class="protip__comments"> + <span class="icon-comment"></span> 2 comments + </span> + </a> + </p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar1.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Maverick</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="protip"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <a class="upvote--popular"> + <span class="icon icon-arrow-up-upload"></span> 1 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar2.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">irwin</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <p class="protip__content"> + <a href="protip.html"> + Importance of Element Indentation + <span class="protip__comments"> + <span class="icon-comment"></span> 1 comment + </span> + </a> + </p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar2.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">irwin</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="protip"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <a class="upvote--popular"> + <span class="icon icon-arrow-up-upload"></span> 6 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar3.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Gavin</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <p class="protip__content"> + <a href="protip.html"> + Rubyists! Tap and bang your way to more succinct code. + <span class="protip__comments"> + <span class="icon-comment"></span> 1 comment + </span> + </a> + </p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar3.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Gavin</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="protip"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <a class="upvote"> + <span class="icon icon-arrow-up-upload"></span> 8 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar4.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Ryan</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <p class="protip__content"> + <a href="protip.html"> + Best practice: Team workflow for Github + <span class="protip__comments"> + <span class="icon-comment"></span> 1 comment + </span> + </a> + </p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar4.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Ryan</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="protip"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <a class="upvote"> + <span class="icon icon-arrow-up-upload"></span> 0 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar5.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">ma2gedev</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <p class="protip__content"> + <a href="protip.html"> + ChronoLogger logging is 1.5x faster than ruby's stdlib Logger + </a> + </p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar5.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">ma2gedev</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="protip__job"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <span class="job__label">Job</span> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar6.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Speicher 210</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <a href="protip.html" class="job__title">PHP Software Engineer (m/f)</a> + <label class="job__loc">Hamburg • Full-time</label> + <p class="job__desc">Speicher 210 is looking for a skilled PHP developer. Your main activities will be application development and implementation of business related applications.</p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar6.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Speicher 210</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="protip"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <a class="upvote"> + <span class="icon icon-arrow-up-upload"></span> 1 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar7.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">David</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <p class="protip__content"> + <a href="protip.html"> + Javascript's getElementsByClass Name Gotcha's + </a> + </p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar7.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">David</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="protip"> + <div class="grid"> + <div class="grid__item large--one-tenth"> + <div class="grid grid--narrow"> + <div class="grid__item small--one-quarter medium--one-sixth"> + <a class="upvote"> + <span class="icon icon-arrow-up-upload"></span> 0 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--hide relative"> + <div class="author-block"> + <img src="img/avatar8.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Louis</a> + <br><a href="#" class="author-block__company">Caroline's Comedy Club</a> + </div> + </div> + </div> + </div> + </div> + <div class="grid__item large--nine-tenths"> + <div class="grid grid--narrow relative"> + <div class="grid__item large--six-eighths"> + <p class="protip__content"> + <a href="protip.html"> + CodeIgniter and Hashing + </a> + </p> + </div> + <div class="grid__item small--hide medium--hide large--show large--two-eighths relative"> + <div class="author-block"> + <img src="img/avatar8.png" class="author-block__img"> + <div class="author-block__user"> + <a href="#" class="author-block__username">Louis</a> + <br><a href="#" class="author-block__company">Caroline's Comedy Club</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + + <div class="pagination"> + <div class="grid"> + <div class="grid__item small--one-quarter medium--one-quarter large--one-eighth"> + <a href="" class="btn btn--small prev"><span class="icon icon-arrow-left"></span> Prev</a> + </div> + <div class="grid__item push--small--one-half push--medium--one-half push--large--six-eighths small--one-quarter medium--one-quarter large--one-eighth text-right"> + <a href="" class="btn btn--small next">Next <span class="icon icon-arrow-right"></span></a> + </div> + </div> + </div> + + </div> + </div> + + <footer class="site-footer"> + <div class="container"> + <div class="grid"> + <div class="grid__item large--two-quarters small--text-center medium--text-center"> + <ul class="inline footer-nav"> + <li><a href="">API & Hacks</a></li> + <li><a href="">Privacy</a></li> + <li><a href="">Terms of Service</a></li> + </ul> + <p class="copy">Copyright © 2014 Assembly Made, Inc. All rights reserved.</p> + </div> + <div class="grid__item large--two-quarters small--text-center medium--text-center large--text-right"> + <a href="https://twitter.com/coderwall" class="twitter-follow-button" data-show-count="false">Follow @coderwall</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> + <a href="https://mixpanel.com/f/partner" class="mixpanel"><img src="http://cdn.mxpnl.com/site_media/images/partner/badge_light.png" alt="Mobile Analytics" /></a> + </div> + </div> + </div> + </footer> + + <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> + <script src="js/highlight.js"></script> + <script> + hljs.initHighlightingOnLoad(); + + $('.upvote').on('click', function() { + $(this).toggleClass('upvote--voted'); + }); + + $('.upvote--popular').on('click', function() { + $(this).toggleClass('upvote--popvoted'); + }); + </script> + + </body> +</html> diff --git a/design-wip/js/highlight.js b/design-wip/js/highlight.js new file mode 100644 index 00000000..7755b90f --- /dev/null +++ b/design-wip/js/highlight.js @@ -0,0 +1 @@ +!function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return window.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){var n=(e.className+" "+(e.parentNode?e.parentNode.className:"")).split(/\s+/);return n=n.map(function(e){return e.replace(/^lang(uage)?-/,"")}),n.filter(function(e){return N(e)||/no(-?)highlight/.test(e)})[0]}function o(e,n){var t={};for(var r in e)t[r]=e[r];if(n)for(var r in n)t[r]=n[r];return t}function i(e){var n=[];return function r(e,a){for(var o=e.firstChild;o;o=o.nextSibling)3==o.nodeType?a+=o.nodeValue.length:1==o.nodeType&&(n.push({event:"start",offset:a,node:o}),a=r(o,a),t(o).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:o}));return a}(e,0),n}function c(e,r,a){function o(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset<r[0].offset?e:r:"start"==r[0].event?e:r:e.length?e:r}function i(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+Array.prototype.map.call(e.attributes,r).join("")+">"}function c(e){l+="</"+t(e)+">"}function u(e){("start"==e.event?i:c)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=o();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){f.reverse().forEach(c);do u(g.splice(0,1)[0]),g=o();while(g==e&&g.length&&g[0].offset==s);f.reverse().forEach(i)}else"start"==g[0].event?f.push(g[0].node):f.pop(),u(g.splice(0,1)[0])}return l+n(a.substr(s))}function u(e){function n(e){return e&&e.source||e}function t(t,r){return RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var c={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");c[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):Object.keys(a.k).forEach(function(e){u(e,a.k[e])}),a.k=c}a.lR=t(a.l||/\b[A-Za-z0-9_]+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function s(e,t,a,o){function i(e,n){for(var t=0;t<n.c.length;t++)if(r(n.c[t].bR,e))return n.c[t]}function c(e,n){return r(e.eR,n)?e:e.eW?c(e.parent,n):void 0}function f(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=x.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":E.classPrefix,o='<span class="'+a,i=t?"":"</span>";return o+=e+'">',o+n+i}function d(){if(!w.k)return n(y);var e="",t=0;w.lR.lastIndex=0;for(var r=w.lR.exec(y);r;){e+=n(y.substr(t,r.index-t));var a=g(w,r);a?(B+=a[1],e+=p(a[0],n(r[0]))):e+=n(r[0]),t=w.lR.lastIndex,r=w.lR.exec(y)}return e+n(y.substr(t))}function h(){if(w.sL&&!R[w.sL])return n(y);var e=w.sL?s(w.sL,y,!0,L[w.sL]):l(y);return w.r>0&&(B+=e.r),"continuous"==w.subLanguageMode&&(L[w.sL]=e.top),p(e.language,e.value,!1,!0)}function v(){return void 0!==w.sL?h():d()}function b(e,t){var r=e.cN?p(e.cN,"",!0):"";e.rB?(M+=r,y=""):e.eB?(M+=n(t)+r,y=""):(M+=r,y=t),w=Object.create(e,{parent:{value:w}})}function m(e,t){if(y+=e,void 0===t)return M+=v(),0;var r=i(t,w);if(r)return M+=v(),b(r,t),r.rB?0:t.length;var a=c(w,t);if(a){var o=w;o.rE||o.eE||(y+=t),M+=v();do w.cN&&(M+="</span>"),B+=w.r,w=w.parent;while(w!=a.parent);return o.eE&&(M+=n(t)),y="",a.starts&&b(a.starts,""),o.rE?0:t.length}if(f(t,w))throw new Error('Illegal lexeme "'+t+'" for mode "'+(w.cN||"<unnamed>")+'"');return y+=t,t.length||1}var x=N(e);if(!x)throw new Error('Unknown language: "'+e+'"');u(x);for(var w=o||x,L={},M="",k=w;k!=x;k=k.parent)k.cN&&(M=p(k.cN,"",!0)+M);var y="",B=0;try{for(var C,j,I=0;;){if(w.t.lastIndex=I,C=w.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}m(t.substr(I));for(var k=w;k.parent;k=k.parent)k.cN&&(M+="</span>");return{r:B,value:M,language:e,top:w}}catch(A){if(-1!=A.message.indexOf("Illegal"))return{r:0,value:n(t)};throw A}}function l(e,t){t=t||E.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(N(n)){var t=s(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function f(e){return E.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,E.tabReplace)})),E.useBR&&(e=e.replace(/\n/g,"<br>")),e}function g(e,n,t){var r=n?x[n]:t,a=[e.trim()];return e.match(/(\s|^)hljs(\s|$)/)||a.push("hljs"),r&&a.push(r),a.join(" ").trim()}function p(e){var n=a(e);if(!/no(-?)highlight/.test(n)){var t;E.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var r=t.textContent,o=n?s(n,r,!0):l(r),u=i(t);if(u.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(u,i(p),r)}o.value=f(o.value),e.innerHTML=o.value,e.className=g(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){E=o(E,e)}function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)}function b(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){x[e]=n})}function m(){return Object.keys(R)}function N(e){return R[e]||R[x[e]]}var E={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},x={};return e.highlight=s,e.highlightAuto=l,e.fixMarkup=f,e.highlightBlock=p,e.configure=d,e.initHighlighting=h,e.initHighlightingOnLoad=v,e.registerLanguage=b,e.listLanguages=m,e.getLanguage=N,e.inherit=o,e.IR="[a-zA-Z][a-zA-Z0-9_]*",e.UIR="[a-zA-Z_][a-zA-Z0-9_]*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/},e.CLCM={cN:"comment",b:"//",e:"$",c:[e.PWM]},e.CBCM={cN:"comment",b:"/\\*",e:"\\*/",c:[e.PWM]},e.HCM={cN:"comment",b:"#",e:"$",c:[e.PWM]},e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",t={cN:"subst",b:/#\{/,e:/}/,k:c},r=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,t]},{b:/"/,e:/"/,c:[e.BE,t]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[t,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{cN:"property",b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];t.c=r;var i=e.inherit(e.TM,{b:n}),s="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(r)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:r.concat([{cN:"comment",b:"###",e:"###",c:[e.PWM]},e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+s,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:s,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{cN:"attribute",b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("http",function(){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:!0}}]}});hljs.registerLanguage("cs",function(e){var r="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",t=e.IR+"(<"+e.IR+">)?";return{aliases:["csharp"],k:r,i:/::/,c:[{cN:"comment",b:"///",e:"$",rB:!0,c:[{cN:"xmlDocTag",v:[{b:"///",r:0},{b:"<!--|-->"},{b:"</?",e:">"}]}]},e.CLCM,e.CBCM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},e.ASM,e.QSM,e.CNM,{bK:"class namespace interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("java",function(e){var a=e.UIR+"(<"+e.UIR+">)?",t="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",c="(\\b(0b[01_]+)|\\b0[xX][a-fA-F0-9_]+|(\\b[\\d_]+(\\.[\\d_]*)?|\\.[\\d_]+)([eE][-+]?\\d+)?)[lLfF]?",r={cN:"number",b:c,r:0};return{aliases:["jsp"],k:t,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",r:0,c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}]},e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return",r:0},{cN:"function",b:"("+a+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},r,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("sql",function(e){var t={cN:"comment",b:"--",e:"$"};return{cI:!0,i:/[<>]/,c:[{cN:"operator",bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate savepoint release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup",e:/;/,eW:!0,k:{keyword:"abs absolute acos action add adddate addtime aes_decrypt aes_encrypt after aggregate all allocate alter analyze and any are as asc ascii asin assertion at atan atan2 atn2 authorization authors avg backup before begin benchmark between bin binlog bit_and bit_count bit_length bit_or bit_xor both by cache call cascade cascaded case cast catalog ceil ceiling chain change changed char_length character_length charindex charset check checksum checksum_agg choose close coalesce coercibility collate collation collationproperty column columns columns_updated commit compress concat concat_ws concurrent connect connection connection_id consistent constraint constraints continue contributors conv convert convert_tz corresponding cos cot count count_big crc32 create cross cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime data database databases datalength date_add date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts datetimeoffsetfromparts day dayname dayofmonth dayofweek dayofyear deallocate declare decode default deferrable deferred degrees delayed delete des_decrypt des_encrypt des_key_file desc describe descriptor diagnostics difference disconnect distinct distinctrow div do domain double drop dumpfile each else elt enclosed encode encrypt end end-exec engine engines eomonth errors escape escaped event eventdata events except exception exec execute exists exp explain export_set extended external extract fast fetch field fields find_in_set first first_value floor flush for force foreign format found found_rows from from_base64 from_days from_unixtime full function get get_format get_lock getdate getutcdate global go goto grant grants greatest group group_concat grouping grouping_id gtid_subset gtid_subtract handler having help hex high_priority hosts hour ident_current ident_incr ident_seed identified identity if ifnull ignore iif ilike immediate in index indicator inet6_aton inet6_ntoa inet_aton inet_ntoa infile initially inner innodb input insert install instr intersect into is is_free_lock is_ipv4 is_ipv4_compat is_ipv4_mapped is_not is_not_null is_used_lock isdate isnull isolation join key kill language last last_day last_insert_id last_value lcase lead leading least leaves left len lenght level like limit lines ln load load_file local localtime localtimestamp locate lock log log10 log2 logfile logs low_priority lower lpad ltrim make_set makedate maketime master master_pos_wait match matched max md5 medium merge microsecond mid min minute mod mode module month monthname mutex name_const names national natural nchar next no no_write_to_binlog not now nullif nvarchar oct octet_length of old_password on only open optimize option optionally or ord order outer outfile output pad parse partial partition password patindex percent_rank percentile_cont percentile_disc period_add period_diff pi plugin position pow power pragma precision prepare preserve primary prior privileges procedure procedure_analyze processlist profile profiles public publishingservername purge quarter query quick quote quotename radians rand read references regexp relative relaylog release release_lock rename repair repeat replace replicate reset restore restrict return returns reverse revoke right rlike rollback rollup round row row_count rows rpad rtrim savepoint schema scroll sec_to_time second section select serializable server session session_user set sha sha1 sha2 share show sign sin size slave sleep smalldatetimefromparts snapshot some soname soundex sounds_like space sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sql_variant_property sqlstate sqrt square start starting status std stddev stddev_pop stddev_samp stdev stdevp stop str str_to_date straight_join strcmp string stuff subdate substr substring subtime subtring_index sum switchoffset sysdate sysdatetime sysdatetimeoffset system_user sysutcdatetime table tables tablespace tan temporary terminated tertiary_weights then time time_format time_to_sec timediff timefromparts timestamp timestampadd timestampdiff timezone_hour timezone_minute to to_base64 to_days to_seconds todatetimeoffset trailing transaction translation trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse ucase uncompress uncompressed_length unhex unicode uninstall union unique unix_timestamp unknown unlock update upgrade upped upper usage use user user_resources using utc_date utc_time utc_timestamp uuid uuid_short validate_password_strength value values var var_pop var_samp variables variance varp version view warnings week weekday weekofyear weight_string when whenever where with work write xml xor year yearweek zon",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int integer interval number numeric real serial smallint varchar varying int8 serial8 text"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"title",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("xml",function(){var t="[A-Za-z0-9\\._:-]+",e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"},c={eW:!0,i:/</,r:0,c:[e,{cN:"attribute",b:t,r:0},{b:"=",r:0,c:[{cN:"value",c:[e],v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[c],starts:{e:"</style>",rE:!0,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[c],starts:{e:"</script>",rE:!0,sL:"javascript"}},e,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:/[^ \/><\n\t]+/,r:0},c]}]}});hljs.registerLanguage("diff",function(){return{aliases:["patch"],c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("javascript",function(r){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document"},c:[{cN:"pi",r:10,v:[{b:/^\s*('|")use strict('|")/},{b:/^\s*('|")use asm('|")/}]},r.ASM,r.QSM,r.CLCM,r.CBCM,r.CNM,{b:"("+r.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[r.CLCM,r.CBCM,r.RM,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[r.inherit(r.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[r.CLCM,r.CBCM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+r.IR,r:0}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,e.NM,s,a,t]}});hljs.registerLanguage("objectivec",function(e){var t={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSData NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection NSURLSession NSURLSessionDataTask NSURLSessionDownloadTask NSURLSessionUploadTask NSURLResponseUIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},o=/[a-zA-Z@][a-zA-Z0-9_]*/,a="@interface @class @protocol @implementation";return{aliases:["m","mm","objc","obj-c"],k:t,l:o,i:"</",c:[e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[e.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"preprocessor",b:"#",e:"$",c:[{cN:"title",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+a.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:a,l:o,c:[e.UTM]},{cN:"variable",b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("markdown",function(){return{aliases:["md","mkdown","mkd"],c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:"^\\[.+\\]:",rB:!0,c:[{cN:"link_reference",b:"\\[",e:"\\]:",eB:!0,eE:!0,starts:{cN:"link_url",e:"$"}}]}]}});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],l={cN:"value",e:",",eW:!0,eE:!0,c:i,k:t},c={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:l}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(l,{cN:null})],i:"\\S"};return i.splice(i.length,0,c,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("python",function(e){var r={cN:"prompt",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},l={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},c={cN:"params",b:/\(/,e:/\)/,c:["self",r,l,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[r,l,b,e.HCM,{v:[{cN:"function",bK:"def",r:10},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n]/,c:[e.UTM,c]},{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",c={cN:"yardoctag",b:"@[A-Za-z]+"},a={cN:"value",b:"#<",e:">"},s={cN:"comment",v:[{b:"#",e:"$",c:[c]},{b:"^\\=begin",e:"^\\=end",c:[c],r:10},{b:"^__END__",e:"\\n$"}]},n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},i={cN:"params",b:"\\(",e:"\\)",k:r},d=[t,a,s,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},s]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:b}),i,s]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[a,s,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];n.c=d,i.c=d;var l="[>?]>",u="[\\w#]+\\(\\w+\\):\\d+:\\d+>",N="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",o=[{b:/^\s*=>/,cN:"status",starts:{e:"$",c:d}},{cN:"prompt",b:"^("+l+"|"+u+"|"+N+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,c:[s].concat(o).concat(d)}});hljs.registerLanguage("cpp",function(t){var i={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginaryintmax_t uintmax_t int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_tint_least8_t uint_least8_t int_least16_t uint_least16_t int_least32_t uint_least32_tint_least64_t uint_least64_t int_fast8_t uint_fast8_t int_fast16_t uint_fast16_t int_fast32_tuint_fast32_t int_fast64_t uint_fast64_t intptr_t uintptr_t atomic_bool atomic_char atomic_scharatomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llongatomic_ullong atomic_wchar_t atomic_char16_t atomic_char32_t atomic_intmax_t atomic_uintmax_tatomic_intptr_t atomic_uintptr_t atomic_size_t atomic_ptrdiff_t atomic_int_least8_t atomic_int_least16_tatomic_int_least32_t atomic_int_least64_t atomic_uint_least8_t atomic_uint_least16_t atomic_uint_least32_tatomic_uint_least64_t atomic_int_fast8_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_tatomic_uint_fast8_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c","h","c++","h++"],k:i,i:"</",c:[t.CLCM,t.CBCM,t.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},t.CNM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line pragma",c:[{b:'include\\s*[<"]',e:'[>"]',k:"include",i:"\\n"},t.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:i,c:["self"]},{b:t.IR+"::"},{bK:"new throw return",r:0},{cN:"function",b:"("+t.IR+"\\s+)+"+t.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:t.IR+"\\s*\\(",rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:i,r:0,c:[t.CBCM]},t.CLCM,t.CBCM]}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",a={cN:"function",b:c+"\\(",rB:!0,eE:!0,e:"\\("};return{cI:!0,i:"[=/|']",c:[e.CBCM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[a,e.ASM,e.QSM,e.CSSNM]}]},{cN:"tag",b:c,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[e.CBCM,{cN:"rule",b:"[^\\s]",rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{cN:"value",eW:!0,eE:!0,c:[a,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("php",function(e){var c={cN:"variable",b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"preprocessor",b:/<\?(php)?|\?>/},a={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.CLCM,e.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},i]},{cN:"comment",b:"__halt_compiler.+?;",eW:!0,k:"__halt_compiler",l:e.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},i,c,{b:/->+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,a,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},a,n]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@][^\s\w{]/,r:0}]},o={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5},i=[e.BE,r,n],c=[n,e.HCM,o,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:!0},s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,o,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];return r.c=c,s.c=c,{aliases:["pl"],k:t,c:c}});hljs.registerLanguage("ini",function(e){return{cI:!0,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:!0,k:"on off true false yes no",c:[e.QSM,e.NM],r:0}]}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}}); \ No newline at end of file diff --git a/design-wip/protip.html b/design-wip/protip.html new file mode 100644 index 00000000..9689f153 --- /dev/null +++ b/design-wip/protip.html @@ -0,0 +1,337 @@ +<!DOCTYPE html> +<!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]--> +<!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]--> +<!--[if IE 8]> <html class="lt-ie9"> <![endif]--> +<!--[if gt IE 8]><!--> <html class=""> <!--<![endif]--> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>ChronoLogger logging is 1.5x faster than ruby's stdlib Logger - Protip - Coderwall</title> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <link rel="stylesheet" href="css/style.css"> + </head> + + <body> + <header class="site-header"> + <div class="container"> + + <div class="main-nav"> + <div class="logo"> + <a href="index.html"><img src="img/logo.png"></a> + </div> + <ul class="inline menu"> + <li><a href="index.html" class="active">Protips</a></li> + <li><a href="#">Job Board</a></li> + </ul> + <a href="#" class="user-block"> + <img src="img/user-avatar.png" class="user-block__img"> <span class="user-block__user">tranhelen</span> + </a> + </div> + + </div> + </header> + + <nav class="secondary-menu"> + <div class="container"> + + <div class="grid"> + <div class="grid__item small--hide medium--two-thirds large--three-quarters"> + <ul class="inline"> + <li class="active"><a href="#">Latest</a></li> + <li><a href="#">Popular</a></li> + </ul> + </div> + <div class="grid__item medium--one-third large--one-quarter"> + <a href="#" class="btn addprotip"> + <span class="icon icon-plus"></span> New Protip + </a> + </div> + </div> + + </div> + </nav> + + <div class="page-body"> + <div class="container"> + + <div class="grid"> + + <div class="grid__item push--large--one-twelfth large--ten-twelfths"> + <header class="protip-header"> + <div class="grid"> + <div class="grid__item small--one-quarter medium--one-sixth large--one-eighth"> + <a class="upvote--popular"> + <span class="icon icon-arrow-up-upload"></span> 2 + </a> + </div> + <div class="grid__item small--three-quarters medium--five-sixths large--seven-eighths"> + <ul class="tag-block inline"> + <li><a href="" class="tag">#browser</a></li> + <li><a href="" class="tag">#html5</a></li> + <li><a href="" class="tag">#notepad</a></li> + </ul> + </div> + </div> + </header> + </div> + </div> + + <div class="grid"> + + <article class="grid__item push--large--one-twelfth large--ten-twelfths"> + <div class="protip-single"> + <header> + <h1>ChronoLogger logging is 1.5x faster than ruby's stdlib Logger</h1> + <div class="protip-meta"> + <p>Posted by <a href=""><img src="img/avatar9.png" class="protip-avatar"> Tim</a> from <a href=""><img src="img/avatar10.png" class="protip-avatar"> Shopify</a> on December 4, 2014</p> + </div> + </header> + + <h2>Introduction</h2> + <p>Recently I created a ruby logger library named ChronoLogger (gem name is chrono_logger) that has lock free writing and time based file rotation. This post introduces ChronoLogger features and what I learned throughout created it.</p> + <p>Let's just start with, see the following result comparing logging speed by ChronoLogger from ruby's stdlib Logger (hereinafter: ::Logger). The condition is 100,000 writings by 2 threads at the same time. ChronoLogger's logging speed is 1.5x faster, more than ::Logger.</p> + + <pre> + <code> + user system total real +std_logger: 20.220000 14.530000 34.750000 ( 24.209075) +chrono_logger: 11.950000 8.650000 20.600000 ( 13.843873) + </code> + </pre> + + <p>The code is here to profiling it.</p> + + <pre> + <code> +require 'benchmark' +require 'parallel' + +std_logger = ::Logger.new('_std_logger') +chrono_logger = ChronoLogger.new('_chrono_logger.%Y%m%d') + +COUNT = 100_000 +Benchmark.bm(10) do |bm| + bm.report('std_logger:') do + Parallel.map(['1 logged', '2 logged'], in_threads: 2) do |letter| + COUNT.times { std_logger.info letter } + end + end + bm.report('chrono_logger:') do + Parallel.map(['1 logged', '2 logged'], in_threads: 2) do |letter| + COUNT.times { chrono_logger.info letter } + end + end +end + </code> + </pre> + + <p>Why fast? There is secret that Chronologger has the advantage in the above case. I'm writing details about it by introducing features.</p> + + <h2>ChronoLogger's features</h2> + + <p>ChronoLogger has 2 features comparing with ::Logger.</p> + + <ul> + <li>Lock free when logging</li> + <li>Time based file rotation</li> + </ul> + + <p>Let's see the details.</p> + + <h2>Lock free log writing</h2> + + <h3>What is lock?</h3> + + <p>What is the lock in this article? It's a ::Logger's mutex for writing atomicity when multi-threading. Specifically, mutex block in ::Logger::LogDevice class's write method.</p> + + <h3>Why Chronologger could be lock free logger?</h3> + + <p>::Logger locked for atomicity, why it can be removed? In fact, log writing is atomicly by OS in some specific environments. See the linux documentation, write(2) provides atomic writing when data size is under PIPEBUF, but does not say atomic when data size more than PIPEBUF. However some file system takes lock when writing any size of data, so writing is atomic in these environments. Therefore ChronoLogger removed lock when writing and reduce it's cost.</p> + + <p>Please note it's not always true about lock, for this reason it's safe to check multi process behaviour in your environment. In real, logs aren't mixed in my CentOS envirionments that has ext4 file system. On the other hand logs are mixed when writing to pipe when data size more than PIPE_BUF.</p> + + <h3>Lock free world</h3> + + <p>Limiting environment leads lock free logger. ChronoLogger's 1.5x faster writing is removing mutex when multi threading on top of the article. That solves ChronoLogger's advantage in multi threading. I also tried checking performance in multi processing its results only small percent faster.</p> + + <h3>Break time :coffee:</h3> + + <p>The idea about lock free is originally from MonoLogger project. My colleague @yteraoka told me MonoLogger a year or so ago. MonoLogger has no file rotation function so we could not use it in production. Anyway, it's benefit existing expert colleague, I'm thankful to my environments. :)</p> + + <h3>Time based file rotation</h3> + + <h4>Logging to file having time based filename</h4> + + <p>You would notice ::Logger already has daily file rotation. That's right, but there is a difference the way to rotate file. Actually, ::Logger rotates file when first writing to log file in the next day. Specifically, there is not rotated file existed when first writing in the next day.</p> + + <pre> + <code> +# 2015/02/01 +logger = Logger.new('stdlib.log', 'daily') +# => stdlib.log generated +logger.info 'today' + +# 2015/02/02 +logger.info 'next day' +# => stdlib.log.20150201 generated + </code> + </pre> + + <p>This makes a tiny problem. For instance, you would compress the log file when starting the next day. You cannot compress rotated file if first writing is not started. ChronoLogger solves this problem the way to writing a file that has time based filename. This way is same as cronolog. The result is the following when using ChronoLogger.</p> + + <pre> + <code> +# 2015/02/01 +logger = ChronoLogger.new('chrono.log.%Y%m%d') +# => chrono.log.20150201 generated +logger.info 'today' + +# 2015/02/02 +logger.info 'next day' +# => chrono.log.20150202 generated + </code> + </pre> + + <p>ChronoLogger ensure existing rotated log file when starting the next day. Except there is no writing during a day... This is fitted about the last use case to compressing a log file. Additionally, this way only writes to file that has a new name so it's simple, this simplicity leads also simple code.</p> + + <h3>Wrap up</h3> + + <p>ChronoLogger's pros comparing with ::Logger's are</p> + + <ul> + <li>Logging faster when multi threading by lock free</li> + <li>Ensure rotated file existence when starting the next day by time based file rotation</li> + </ul> + + <p>ChronoLogger's cons is a risk that logs are mixed depending on environment. I'm beginning to use ChronoLogger and currently there is no problem in my Rails project. I'm looking forward to receive your feedback. HackerNews post is <a href="https://news.ycombinator.com/item?id=8991004">here</a>. Thanks for reading.</p> + + <p>If you like ChronoLogger, checkout the <a href="https://github.com/ma2gedev/chrono_logger">github repository.</a></p> + + <h3>References</h3> + + <h4>ChronoLogger</h4> + + <ul> + <li>github + <ul> + <li><a href="https://github.com/ma2gedev/chrono_logger">https://github.com/ma2gedev/chrono_logger</a></li> + </ul> + </li> + <li>rubygems.org + <ul> + <li><a href="https://rubygems.org/gems/chrono_logger">https://rubygems.org/gems/chrono_logger</a></li> + </ul> + </li> + </ul> + + <h4>about <b>the lock</b></h4> + + <ul> + <li>Pointing out mutex block in ruby's logger code + <ul> + <li><a href="https://github.com/ruby/ruby/blob/8be3f74e19492a313c930e031254116df3994078/lib/logger.rb#L595">https://github.com/ruby/ruby/blob/8be3f74e19492a313c930e031254116df3994078/lib/logger.rb#L595</a></li> + </ul> + </li> + <li>Is lock-free logging safe? + <ul> + <li><a href="http://www.jstorimer.com/blogs/workingwithcode/7982047-is-lock-free-logging-safe">http://www.jstorimer.com/blogs/workingwithcode/7982047-is-lock-free-logging-safe</a></li> + </ul> + </li> + <li>write(2) documentation + <ul> + <li><a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html">http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html</a></li> + </ul> + </li> + </ul> + + <p>Enjoy!</p> + + <hr> + + <div class="protip-comments"> + <h2>Comments</h2> + + <!-- If there are no comments --> + <!-- <p>There are currently no comments.</p> --> + + <div class="protip-comment"> + <h5><img src="img/avatar1.png" class="comment-avatar"> Doug</h5> + <div class="comment-body"> + <p>I made a version that is a full blown Ruby editor with syntax highlighting from Ace. + <br><a href="">https://gist.github.com/4666256</a></p> + <div class="comment-meta"> + <a href=""><span class="icon icon-heart"></span> Like</a> • <a href="">Flag</a> • <time>12 minutes ago</time> + </div> + </div> + </div> + <div class="protip-comment"> + <h5><img src="img/avatar2.png" class="comment-avatar"> Steve</h5> + <div class="comment-body"> + <p>Forgive me for the shameless plug, but thought this might be useful for others. I put together a little project that uses the browsers localstorage so you can jot notes down and Forgive me for the shameless plus, but thought this might be useful for others. I put together a little p</p> + <div class="comment-meta"> + <a href=""><span class="icon icon-heart"></span> Like</a> • <a href="">Flag</a> • <time>12 minutes ago</time> + </div> + </div> + </div> + + <div class="protip-comment comment-box"> + <h5><img src="img/user-avatar.png" class="comment-avatar"> tranhelen</h5> + <form> + <div class="grid"> + <div class="grid__item three-quarters"> + <textarea placeholder="Start writing here..."></textarea> + </div> + <div class="grid__item one-quarter"> + <a href="" class="btn btn--small">Send</a> + </div> + </div> + </form> + </div> + + </div> + + </div> + + </article> + + </div> + </div> + </div> + + <footer class="site-footer"> + <div class="container"> + <div class="grid"> + <div class="grid__item large--two-quarters small--text-center medium--text-center"> + <ul class="inline footer-nav"> + <li><a href="">API & Hacks</a></li> + <li><a href="">Privacy</a></li> + <li><a href="">Terms of Service</a></li> + </ul> + <p class="copy">Copyright © 2014 Assembly Made, Inc. All rights reserved.</p> + </div> + <div class="grid__item large--two-quarters small--text-center medium--text-center large--text-right"> + <a href="https://twitter.com/coderwall" class="twitter-follow-button" data-show-count="false">Follow @coderwall</a> + <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> + <a href="https://mixpanel.com/f/partner" class="mixpanel"><img src="http://cdn.mxpnl.com/site_media/images/partner/badge_light.png" alt="Mobile Analytics" /></a> + </div> + </div> + </div> + </footer> + + <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> + <script src="js/highlight.js"></script> + <script> + hljs.initHighlightingOnLoad(); + + $('.upvote').on('click', function() { + $(this).toggleClass('upvote--voted'); + }); + + $('.upvote--popular').on('click', function() { + $(this).toggleClass('upvote--popvoted'); + }); + </script> + + </body> +</html> diff --git a/design-wip/sass/commons/_grids.scss b/design-wip/sass/commons/_grids.scss new file mode 100644 index 00000000..3e775364 --- /dev/null +++ b/design-wip/sass/commons/_grids.scss @@ -0,0 +1,487 @@ +/*------------------------------------*\ + $CSSWIZARDRY-GRIDS +\*------------------------------------*/ +/** + * CONTENTS + * INTRODUCTION.........How the grid system works. + * VARIABLES............Your settings. + * MIXINS...............Library mixins. + * GRID SETUP...........Build the grid structure. + * WIDTHS...............Build our responsive widths around our breakpoints. + * PUSH.................Push classes. + * PULL.................Pull classes. + */ + + + + + +/*------------------------------------*\ + $VARIABLES +\*------------------------------------*/ +$responsive: true !default; +$mobile-first: true !default; +$gutter: 24px !default; +$use-silent-classes: false !default; +$push: true !default; +$pull: false !default; + +$small: 485px; +$medium: 768px; +$large: 769px; + +$postSmall: $small + 1px; + +$breakpoints: ( + 'small' '(max-width: #{$small})', + 'medium' '(min-width: #{$postSmall}) and (max-width: #{$medium})', + 'large' '(min-width: #{$large})' +); + +$breakpoint-has-widths: ('small', 'medium', 'large'); +$breakpoint-has-push: ('small', 'medium', 'large'); +$breakpoint-has-pull: ('small', 'medium', 'large'); + +$class-type: if($use-silent-classes, unquote("%"), unquote(".")); + +@mixin grid-media-query($media-query) { + $breakpoint-found: false; + + @each $breakpoint in $breakpoints { + $name: nth($breakpoint, 1); + $declaration: nth($breakpoint, 2); + + @if $media-query == $name and $declaration { + $breakpoint-found: true; + + @media only screen and #{$declaration} { + @content; + } + } + } + + @if not $breakpoint-found { + @warn "Breakpoint ‘#{$media-query}’ does not exist"; + } +} + +@mixin silent-relative { + @if $use-silent-classes { + position:relative; + } +} + +/*------------------------------------*\ + $GRID SETUP +\*------------------------------------*/ + +#{$class-type}grid, +#{$class-type}grid-uniform { + list-style:none; + margin:0; + padding:0; + margin-left:-$gutter; + + @include clearfix; +} + +#{$class-type}grid__item { + float: left; + min-height: 1px; + padding-left:$gutter; + vertical-align:top; + @if $mobile-first { + width:100%; + } +} + +/** + * Create grids with narrower gutters. Extends `.grid`. + */ +#{$class-type}grid--narrow { + margin-left:-($gutter / 2); + + > #{$class-type}grid__item { + padding-left:$gutter / 2; + } +} + + +/** + * Create grids with wider gutters. Extends `.grid`. + */ +#{$class-type}grid--wide { + margin-left:-($gutter * 2); + + > #{$class-type}grid__item { + padding-left:$gutter * 2; + } +} + + + + + +/*------------------------------------*\ + $WIDTHS +\*------------------------------------*/ +/** + * Create our width classes, prefixed by the specified namespace. + */ +@mixin device-type($namespace:"") { + $prefix: $class-type + $namespace; + + /** + * Whole + */ + #{$prefix}one-whole { width:100%; } + + + /** + * Halves + */ + #{$prefix}one-half { width:50%; } + + + /** + * Thirds + */ + #{$prefix}one-third { width:33.333%; } + #{$prefix}two-thirds { width:66.666%; } + + + /** + * Quarters + */ + #{$prefix}one-quarter { width:25%; } + #{$prefix}two-quarters { @extend #{$prefix}one-half; } + #{$prefix}three-quarters { width:75%; } + + + /** + * Fifths + */ + #{$prefix}one-fifth { width:20%; } + #{$prefix}two-fifths { width:40%; } + #{$prefix}three-fifths { width:60%; } + #{$prefix}four-fifths { width:80%; } + + + /** + * Sixths + */ + #{$prefix}one-sixth { width:16.666%; } + #{$prefix}two-sixths { @extend #{$prefix}one-third; } + #{$prefix}three-sixths { @extend #{$prefix}one-half; } + #{$prefix}four-sixths { @extend #{$prefix}two-thirds; } + #{$prefix}five-sixths { width:83.333%; } + + + /** + * Eighths + */ + #{$prefix}one-eighth { width:12.5%; } + #{$prefix}two-eighths { @extend #{$prefix}one-quarter; } + #{$prefix}three-eighths { width:37.5%; } + #{$prefix}four-eighths { @extend #{$prefix}one-half; } + #{$prefix}five-eighths { width:62.5%; } + #{$prefix}six-eighths { @extend #{$prefix}three-quarters; } + #{$prefix}seven-eighths { width:87.5%; } + + + /** + * Tenths + */ + #{$prefix}one-tenth { width:10%; } + #{$prefix}two-tenths { @extend #{$prefix}one-fifth; } + #{$prefix}three-tenths { width:30%; } + #{$prefix}four-tenths { @extend #{$prefix}two-fifths; } + #{$prefix}five-tenths { @extend #{$prefix}one-half; } + #{$prefix}six-tenths { @extend #{$prefix}three-fifths; } + #{$prefix}seven-tenths { width:70%; } + #{$prefix}eight-tenths { @extend #{$prefix}four-fifths; } + #{$prefix}nine-tenths { width:90%; } + + + /** + * Twelfths + */ + #{$prefix}one-twelfth { width:8.333%; } + #{$prefix}two-twelfths { @extend #{$prefix}one-sixth; } + #{$prefix}three-twelfths { @extend #{$prefix}one-quarter; } + #{$prefix}four-twelfths { @extend #{$prefix}one-third; } + #{$prefix}five-twelfths { width:41.666% } + #{$prefix}six-twelfths { @extend #{$prefix}one-half; } + #{$prefix}seven-twelfths { width:58.333%; } + #{$prefix}eight-twelfths { @extend #{$prefix}two-thirds; } + #{$prefix}nine-twelfths { @extend #{$prefix}three-quarters; } + #{$prefix}ten-twelfths { @extend #{$prefix}five-sixths; } + #{$prefix}eleven-twelfths { width:91.666%; } +} + +@mixin device-helper($namespace:"") { + $prefix: $class-type + $namespace; + + #{$prefix}show { display: block!important; } + #{$prefix}hide { display: none!important; } + + #{$prefix}text-left { text-align: left!important; } + #{$prefix}text-right { text-align: right!important; } + #{$prefix}text-center { text-align: center!important; } + + #{$prefix}left { float: left!important; } + #{$prefix}right { float: right!important; } +} + +/** + * Our regular, non-responsive width classes. + */ +@include device-type; +@include device-helper; + + +/** + * Our responsive classes, if we have enabled them. + */ +@if $responsive { + + @each $name in $breakpoint-has-widths { + @include grid-media-query($name) { + @include device-type('#{$name}--'); + @include device-helper('#{$name}--'); + } + } + +} + + + + + +/*------------------------------------*\ + $PUSH +\*------------------------------------*/ +/** + * Push classes, to move grid items over to the right by certain amounts. + */ +@mixin push-setup($namespace: "") { + $prefix: $class-type + "push--" + $namespace; + + /** + * Whole + */ + #{$prefix}one-whole { left:100%; @include silent-relative; } + + + /** + * Halves + */ + #{$prefix}one-half { left:50%; @include silent-relative; } + + + /** + * Thirds + */ + #{$prefix}one-third { left:33.333%; @include silent-relative; } + #{$prefix}two-thirds { left:66.666%; @include silent-relative; } + + + /** + * Quarters + */ + #{$prefix}one-quarter { left:25%; @include silent-relative; } + #{$prefix}two-quarters { @extend #{$prefix}one-half; } + #{$prefix}three-quarters { left:75%; @include silent-relative; } + + + /** + * Fifths + */ + #{$prefix}one-fifth { left:20%; @include silent-relative; } + #{$prefix}two-fifths { left:40%; @include silent-relative; } + #{$prefix}three-fifths { left:60%; @include silent-relative; } + #{$prefix}four-fifths { left:80%; @include silent-relative; } + + + /** + * Sixths + */ + #{$prefix}one-sixth { left:16.666%; @include silent-relative; } + #{$prefix}two-sixths { @extend #{$prefix}one-third; } + #{$prefix}three-sixths { @extend #{$prefix}one-half; } + #{$prefix}four-sixths { @extend #{$prefix}two-thirds; } + #{$prefix}five-sixths { left:83.333%; @include silent-relative; } + + + /** + * Eighths + */ + #{$prefix}one-eighth { left:12.5%; @include silent-relative; } + #{$prefix}two-eighths { @extend #{$prefix}one-quarter; } + #{$prefix}three-eighths { left:37.5%; @include silent-relative; } + #{$prefix}four-eighths { @extend #{$prefix}one-half; } + #{$prefix}five-eighths { left:62.5%; @include silent-relative; } + #{$prefix}six-eighths { @extend #{$prefix}three-quarters; } + #{$prefix}seven-eighths { left:87.5%; @include silent-relative; } + + + /** + * Tenths + */ + #{$prefix}one-tenth { left:10%; @include silent-relative; } + #{$prefix}two-tenths { @extend #{$prefix}one-fifth; } + #{$prefix}three-tenths { left:30%; @include silent-relative; } + #{$prefix}four-tenths { @extend #{$prefix}two-fifths; } + #{$prefix}five-tenths { @extend #{$prefix}one-half; } + #{$prefix}six-tenths { @extend #{$prefix}three-fifths; } + #{$prefix}seven-tenths { left:70%; @include silent-relative; } + #{$prefix}eight-tenths { @extend #{$prefix}four-fifths; } + #{$prefix}nine-tenths { left:90%; @include silent-relative; } + + + /** + * Twelfths + */ + #{$prefix}one-twelfth { left:8.333%; @include silent-relative; } + #{$prefix}two-twelfths { @extend #{$prefix}one-sixth; } + #{$prefix}three-twelfths { @extend #{$prefix}one-quarter; } + #{$prefix}four-twelfths { @extend #{$prefix}one-third; } + #{$prefix}five-twelfths { left:41.666%; @include silent-relative; } + #{$prefix}six-twelfths { @extend #{$prefix}one-half; } + #{$prefix}seven-twelfths { left:58.333%; @include silent-relative; } + #{$prefix}eight-twelfths { @extend #{$prefix}two-thirds; } + #{$prefix}nine-twelfths { @extend #{$prefix}three-quarters; } + #{$prefix}ten-twelfths { @extend #{$prefix}five-sixths; } + #{$prefix}eleven-twelfths { left:91.666%; @include silent-relative; } +} + +@if $push { + [class*="push--"] { position:relative; } + + @include push-setup; + + @if $responsive { + @each $name in $breakpoint-has-push { + @include grid-media-query($name) { + @include push-setup('#{$name}--'); + } + } + } + +} + + + + + +/*------------------------------------*\ + $PULL +\*------------------------------------*/ +/** + * Pull classes, to move grid items back to the left by certain amounts. + */ +@mixin pull-setup($namespace: "") { + $prefix: $class-type + "pull--" + $namespace; + + /** + * Whole + */ + #{$prefix}one-whole { right:100%; @include silent-relative; } + + + /** + * Halves + */ + #{$prefix}one-half { right:50%; @include silent-relative; } + + + /** + * Thirds + */ + #{$prefix}one-third { right:33.333%; @include silent-relative; } + #{$prefix}two-thirds { right:66.666%; @include silent-relative; } + + + /** + * Quarters + */ + #{$prefix}one-quarter { right:25%; @include silent-relative; } + #{$prefix}two-quarters { @extend #{$prefix}one-half; } + #{$prefix}three-quarters { right:75%; @include silent-relative; } + + + /** + * Fifths + */ + #{$prefix}one-fifth { right:20%; @include silent-relative; } + #{$prefix}two-fifths { right:40%; @include silent-relative; } + #{$prefix}three-fifths { right:60%; @include silent-relative; } + #{$prefix}four-fifths { right:80%; @include silent-relative; } + + + /** + * Sixths + */ + #{$prefix}one-sixth { right:16.666%; @include silent-relative; } + #{$prefix}two-sixths { @extend #{$prefix}one-third; } + #{$prefix}three-sixths { @extend #{$prefix}one-half; } + #{$prefix}four-sixths { @extend #{$prefix}two-thirds; } + #{$prefix}five-sixths { right:83.333%; @include silent-relative; } + + + /** + * Eighths + */ + #{$prefix}one-eighth { right:12.5%; @include silent-relative; } + #{$prefix}two-eighths { @extend #{$prefix}one-quarter; } + #{$prefix}three-eighths { right:37.5%; @include silent-relative; } + #{$prefix}four-eighths { @extend #{$prefix}one-half; } + #{$prefix}five-eighths { right:62.5%; @include silent-relative; } + #{$prefix}six-eighths { @extend #{$prefix}three-quarters; } + #{$prefix}seven-eighths { right:87.5%; @include silent-relative; } + + + /** + * Tenths + */ + #{$prefix}one-tenth { right:10%; @include silent-relative; } + #{$prefix}two-tenths { @extend #{$prefix}one-fifth; } + #{$prefix}three-tenths { right:30%; @include silent-relative; } + #{$prefix}four-tenths { @extend #{$prefix}two-fifths; } + #{$prefix}five-tenths { @extend #{$prefix}one-half; } + #{$prefix}six-tenths { @extend #{$prefix}three-fifths; } + #{$prefix}seven-tenths { right:70%; @include silent-relative; } + #{$prefix}eight-tenths { @extend #{$prefix}four-fifths; } + #{$prefix}nine-tenths { right:90%; @include silent-relative; } + + + /** + * Twelfths + */ + #{$prefix}one-twelfth { right:8.333%; @include silent-relative; } + #{$prefix}two-twelfths { @extend #{$prefix}one-sixth; } + #{$prefix}three-twelfths { @extend #{$prefix}one-quarter; } + #{$prefix}four-twelfths { @extend #{$prefix}one-third; } + #{$prefix}five-twelfths { right:41.666%; @include silent-relative; } + #{$prefix}six-twelfths { @extend #{$prefix}one-half; } + #{$prefix}seven-twelfths { right:58.333%; @include silent-relative; } + #{$prefix}eight-twelfths { @extend #{$prefix}two-thirds; } + #{$prefix}nine-twelfths { @extend #{$prefix}three-quarters; } + #{$prefix}ten-twelfths { @extend #{$prefix}five-sixths; } + #{$prefix}eleven-twelfths { right:91.666%; @include silent-relative; } +} + +@if $pull { + [class*="pull--"] { position:relative; } + + @include pull-setup; + + @if $responsive { + @each $name in $breakpoint-has-pull { + @include grid-media-query($name) { + @include pull-setup('#{$name}--'); + } + } + } + +} diff --git a/design-wip/sass/commons/_hybrid.scss b/design-wip/sass/commons/_hybrid.scss new file mode 100644 index 00000000..9dcb921e --- /dev/null +++ b/design-wip/sass/commons/_hybrid.scss @@ -0,0 +1,172 @@ +/* + +vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) + +*/ + +/*background color*/ +.hljs { + display: block; + font-family: Courier; + font-size: 14px; + line-height: 18px; + overflow-x: auto; + padding: 7.5px 30px; + background: #1d1f21; + -webkit-text-size-adjust: none; +} + +/*selection color*/ +.hljs::selection, +.hljs span::selection { + background: #373b41; +} +.hljs::-moz-selection, +.hljs span::-moz-selection { + background: #373b41; +} + +/*foreground color*/ +.hljs, +.hljs-setting .hljs-value, +.hljs-expression .hljs-variable, +.hljs-expression .hljs-begin-block, +.hljs-expression .hljs-end-block, +.hljs-class .hljs-params, +.hljs-function .hljs-params, +.hljs-at_rule .hljs-preprocessor { + color: #c5c8c6; +} + +/*color: fg_yellow*/ +.hljs-title, +.hljs-function .hljs-title, +.hljs-keyword .hljs-common, +.hljs-class .hljs-title, +.hljs-decorator, +.hljs-tag .hljs-title, +.hljs-header, +.hljs-sub, +.hljs-function { + color: #f0c674; +} + +/*color: fg_comment*/ +.hljs-comment, +.hljs-javadoc, +.hljs-output .hljs-value, +.hljs-pi, +.hljs-shebang, +.hljs-doctype { + color: #707880; +} + +/*color: fg_red*/ +.hljs-number, +.hljs-symbol, +.hljs-literal, +.hljs-deletion, +.hljs-link_url, +.hljs-symbol .hljs-string, +.hljs-argument, +.hljs-hexcolor, +.hljs-input .hljs-prompt, +.hljs-char { + color: #cc6666 +} + +/*color: fg_green*/ +.hljs-string, +.hljs-special, +.hljs-javadoctag, +.hljs-addition, +.hljs-important, +.hljs-tag .hljs-value, +.hljs-at.rule .hljs-keyword, +.hljs-regexp, +.hljs-attr_selector { + color: #b5bd68; +} + +/*color: fg_purple*/ +.hljs-variable, +.hljs-property, +.hljs-envar, +.hljs-code, +.hljs-expression, +.hljs-localvars, +.hljs-id, +.hljs-variable .hljs-filter, +.hljs-variable .hljs-filter .hljs-keyword, +.hljs-template_tag .hljs-filter .hljs-keyword { + color: #b294bb; +} + +/*color: fg_blue*/ +.hljs-statement, +.hljs-label, +.hljs-keyword, +.hljs-xmlDocTag, +.hljs-function .hljs-keyword, +.hljs-chunk, +.hljs-cdata, +.hljs-link_label, +.hljs-bullet, +.hljs-class .hljs-keyword, +.hljs-smartquote, +.hljs-method, +.hljs-list .hljs-title, +.hljs-tag { + color: #81a2be; +} + +/*color: fg_aqua*/ +.hljs-pseudo, +.hljs-exception, +.hljs-annotation, +.hljs-subst, +.hljs-change, +.hljs-cbracket, +.hljs-operator, +.hljs-horizontal_rule, +.hljs-preprocessor .hljs-keyword, +.hljs-typedef, +.hljs-template_tag, +.hljs-variable, +.hljs-variable .hljs-filter .hljs-argument, +.hljs-at_rule, +.hljs-at_rule .hljs-string, +.hljs-at_rule .hljs-keyword { + color: #8abeb7; +} + + +/*color: fg_orange*/ +.hljs-type, +.hljs-typename, +.hljs-inheritance .hljs-parent, +.hljs-constant, +.hljs-built_in, +.hljs-setting, +.hljs-structure, +.hljs-link_reference, +.hljs-attribute, +.hljs-blockquote, +.hljs-quoted, +.hljs-class, +.hljs-header { + color: #de935f; +} + +.hljs-emphasis +{ + font-style: italic; +} + +.hljs-strong +{ + font-weight: bold; +} + + + diff --git a/design-wip/sass/commons/_mixins.scss b/design-wip/sass/commons/_mixins.scss new file mode 100644 index 00000000..50895ab4 --- /dev/null +++ b/design-wip/sass/commons/_mixins.scss @@ -0,0 +1,31 @@ +@mixin clearfix { + &:before,&:after { + content: ""; + display: table; + } + &:after { + clear: both; + } +} + +@function em($target, $context: $baseFontSize) { + @if $target == 0 { + @return 0; + } + @return $target / $context + 0em; +} + +@mixin transition { + -webkit-transition: all 0.35s ease; + -moz-transition: all 0.35s ease; + -o-transition: all 0.35s ease; + transition: all 0.35s ease; +} + +@mixin vertical { + position: absolute; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); +} diff --git a/design-wip/sass/style.scss b/design-wip/sass/style.scss new file mode 100644 index 00000000..42c2e875 --- /dev/null +++ b/design-wip/sass/style.scss @@ -0,0 +1,860 @@ +/*------------------------------------*\ + #About the File +\*------------------------------------*/ +/* + + Copyright 2014 Coderwall + Author Helen Tran @tranhelen + Built with Sass - http://sass-lang.com + + Table of Contents + #Variables + #Basic Styles + #Navigations + #Pagination + #Protips + + */ + + +@import "normalize"; + +@import "commons/mixins"; +@import "commons/grids"; +@import "commons/hybrid"; + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-font-smoothing:antialiased; + text-rendering:optimizeLegibility; +} + +/*============================================================================ + #Variables +==============================================================================*/ + +// Colours +$colorBrandBlue: #11A1BB; +$colorBrandOrange: #F6563C; +$colorBrandGreen: #94BA00; + +$colorBG: #fff; +$colorBGPage: #F0F5F6; +$colorBGProtip: #fff; +$colorBGProtipJob: #F2F2F2; +$colorBGLight: #87A3A9; + +$colorTextBody: #4A4A4A; +$colorTextLight: #87A3A9; +$colorTextProtip: #808080; + +$colorLink: #87A3A9; +$colorLinkHover: $colorBrandGreen; +$colorLinkActive: $colorLinkHover; + +$colorBorder: #E2ECED; + +$colorButton: $colorBrandBlue; + +// Type +$stack: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif; + +// Misc variables +$baseFontSize: 16px; +$unit: 30px; +$medium: 486px; +$large: 770px; + +@mixin at-query ($bp) { + @media screen and (min-width: $bp) { + @content; + } +} + +/*============================================================================ + #Typography +==============================================================================*/ + +@font-face { + font-family: 'icomoon'; + src:url('icomoon.eot?-a8rj9i'); + src:url('icomoon.eot?#iefix-a8rj9i') format('embedded-opentype'), + url('icomoon.woff?-a8rj9i') format('woff'), + url('icomoon.ttf?-a8rj9i') format('truetype'), + url('icomoon.svg?-a8rj9i#icomoon') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="icon-"], [class*=" icon-"] { + font-family: 'icomoon'; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-comment:before { content: "\e600"; } +.icon-plus:before { content: "\e601"; } +.icon-arrow-up-upload:before { content: "\e602"; } +.icon-arrow-left:before { content: "\e603"; } +.icon-arrow-right:before { content: "\e604"; } + +h1,h2,h3,h4,h5,h6 { + font-weight: 400; +} + +h1 { + font-size: em(30px); + line-height: em(20px); + + @include at-query($large) { + font-size: em(48px); + } +} + +h2 { + font-size: em(24px); + line-height: em(20px); + + @include at-query($large) { + font-size: em(32px); + } +} + +h3 { + font-size: em(22px); + line-height: em(22px); + + @include at-query($large) { + font-size: em(24px); + } +} + +h4 { + font-size: em(18px); + line-height: em(24px); + + @include at-query($large) { + font-size: em(20px); + } +} + +h5 { + font-size: em(16px); + line-height: em(18px); +} + +h6 { + font-size: em(14px); + line-height: em(18px); +} + +.h1 { @extend h1; } +.h2 { @extend h2; } +.h3 { @extend h3; } +.h4 { @extend h4; } +.h5 { @extend h5; } +.h6 { @extend h6; } + +p, +ul, +ul li { + color: $colorTextProtip; + font-size: em(16px); + line-height: em(28px); +} + +p { + margin: 0 0 ($unit / 2); +} + +a { + color: $colorLink; + text-decoration: none; + + @include transition; + + &:hover, + &:active { + color: $colorLinkHover; + } +} + +ul { + padding: 0 0 0 ($unit * 1.5); + + @include at-query($large) { + padding: 0 0 0 $unit; + } +} + +/*============================================================================ + #Basic Styles +==============================================================================*/ + +html, +body { + background-color: $colorBG; + color: $colorTextBody; + font-family: $stack; + margin: 0; + padding: 0; +} + +hr { + border: 0; + border-bottom: 1px solid $colorBorder; + margin: ($unit / 2) 0; + + @include at-query($large) { + margin: $unit 0; + } +} + +textarea { + border-radius: ($unit / 2); + border: 1px solid $colorBorder; + font-size: em(14px); + height: 28px; + padding: ($unit / 10) ($unit / 2); + width: 100%; + + @include at-query($large) { + font-size: em(16px); + height: 34px; + padding: ($unit / 5) ($unit / 2); + } +} + +pre { + margin: 0; + padding: 0; +} + +.container { + margin: 0 auto; + max-width: 1000px; + padding: 0 ($unit * 0.75); + + &.full { + padding-top: 0; + padding-bottom: 0; + } + + @include at-query($medium) { + padding: 0 $unit; + } +} + +.inline { + list-style-type: none; + margin: 0; + padding: 0; + + li { + display: inline-block; + margin-left: ($unit / 2); + } + + li:first-child { + margin-left: 0; + } +} + +.page-body { + background-color: $colorBGPage; + padding: ($unit / 2) 0; + + @include at-query($medium) { + padding: ($unit * 0.75) 0; + } + + @include at-query($medium) { + padding: $unit 0; + } +} + +.relative { + position: relative; +} + +/*============================================================================ + #Buttons +==============================================================================*/ + +.btn { + background-color: $colorButton; + border-radius: 999px; + color: #fff; + font-size: em(14px); + display: block; + text-align: center; + padding: 9px ($unit / 2) 11px; + + &:hover, + &:active { + color: #fff; + background-color: darken($colorButton,5%); + } + + .icon { + @extend .h6; + + position: relative; + top: 1px; + } +} + +.btn--small { + font-weight: bold; + font-size: em(14px); + padding: 4px; + + @include at-query($large) { + padding: 8px; + } +} + +.upvote { + @extend .btn; + @extend .btn--small; + + background-color: transparent; + border: 2px solid $colorBorder; + color: $colorTextBody; + width: auto; + + &:hover { + background-color: transparent; + border-color: $colorBrandBlue; + color: $colorTextBody; + cursor: pointer; + + .icon { + position: relative; + top: -2px; + } + } + + .icon { + color: $colorBrandBlue; + + @include transition; + } +} + +.upvote--voted, +.upvote--voted:hover { + background-color: $colorBrandBlue; + border-color: $colorBrandBlue; + color: #fff; + + .icon { + color: #fff; + } +} + +.upvote--popular { + @extend .upvote; + + .icon { + color: $colorBrandOrange; + } +} + +.upvote--popvoted, +.upvote--popvoted:hover { + background-color: $colorBrandOrange; + border-color: $colorBrandOrange; + color: #fff; + + .icon { + color: #fff; + } +} + +/*============================================================================ + #Header +==============================================================================*/ + +.logo { + margin: 0 auto ($unit / 1.5); + text-align: center; + width: 100%; + + @include at-query($large) { + display: inline-block; + margin: 0; + width: auto; + } +} + +.main-nav { + padding: $unit 0 ($unit / 2); + + @include clearfix; + + @include at-query($medium) { + padding: ($unit * 1.5) 0 $unit; + } + + .menu { + display: inline; + + @include at-query($large) { + margin-left: $unit; + position: relative; + top: -$unit / 4; + } + } +} + +.secondary-menu { + border-bottom: 1px solid $colorBorder; + padding-bottom: $unit / 2; + + @include at-query($medium) { + padding-bottom: 0; + } + + li { + padding: ($unit * 0.75) 0; + + &.active a { + border-bottom: 3px solid $colorBrandGreen; + color: $colorTextBody; + font-weight: bold; + } + } + + .addprotip { + @extend .h5; + + position: relative; + margin-top: $unit / 2; + + @include at-query($medium) { + margin-top: $unit / 2; + } + + @include at-query($large) { + float: right; + display: inline-block; + } + } +} + +.secondary-menu--mobile { + background-color: #fff; + margin-bottom: $unit / 2; + + select { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; + -o-appearance: none; + appearance: none; + background: transparent url("arrow-down.svg") no-repeat right center; + background-position: right ($unit / 2) center; + background-size: $unit / 2; + border-bottom: 1px solid $colorBorder; + border-radius: 0; + border: 0; + cursor: pointer; + padding: ($unit / 3) ($unit / 2); + width: 100%; + } + + @include at-query ($medium) { + display: none; + } +} + +.site-header { + @extend .h4; + + border-bottom: 1px solid $colorBorder; + + .active { + color: $colorLinkActive; + } +} + +.user-block { + float: right; +} + +.user-block__img { + height: 36px; + width: 36px; + float: left; + margin-right: 10px; + position: relative; + border-radius: 99px; + top: -5px; +} + +/*============================================================================ + #Footer +==============================================================================*/ + +.site-footer { + background-color: #fff; + padding: $unit 0; +} + +.copy { + color: lighten($colorTextBody,20%); + font-size: em(12px); +} + +.footer-nav { + @extend .h5; + + line-height: em(24px); + margin-bottom: $unit / 4; +} + +.mixpanel img { + height: 19px; +} + +/*============================================================================ + #Pagination +==============================================================================*/ + +.pagination { + margin-top: $unit / 2; + + @include at-query($medium) { + margin-top: $unit; + } + + .btn { + @extend .h6; + + background-color: #fff; + color: $colorTextBody; + font-weight: bold; + padding: 9px 6px; + + &:hover { + background-color: $colorBrandBlue; + color: #fff; + } + } + + .next { + padding-left: $unit / 3; + } + + .prev { + padding-right: $unit / 3; + } +} + +/*============================================================================ + #Protips +==============================================================================*/ + +.author-block { + height: 32px; + + @include at-query($large) { + height: 36px; + } +} + +.author-block__company { + @extend .h6; + + color: $colorTextLight; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + display: block; + + @include at-query($large) { + width: 90%; + } +} + +.author-block__img { + border-radius: 99px; + border: 1px solid $colorBorder; + float: right; + height: 32px; + width: 32px; + + @include at-query($large) { + float: none; + height: 36px; + width: 36px; + } +} + +.author-block__user { + right: 42px; + line-height: 20px; + text-align: right; + + @include vertical; + + @include at-query($large) { + left: 55px; + right: auto; + text-align: left; + } +} + +.author-block__username { + color: $colorTextBody; +} + +.job__desc { + margin-bottom: 0; +} + +.job__label { + @extend .btn; + @extend .btn--small; + + &:hover { + background-color: $colorBrandBlue; + } +} + +.job__loc { + @extend .h6; + + color: $colorTextLight; + display: block; + margin: ($unit / 5) 0; + text-transform: uppercase; +} + +.job__title { + @extend .h4; + + color: $colorTextBody; + display: block; + margin-bottom: ($unit / 5); + + @include at-query($large) { + margin-top: ($unit / 5); + } +} + +.protip, +.protip__job { + padding: $unit / 2; + + @include at-query($medium) { + padding: ($unit * 0.75); + } + + @include at-query($large) { + padding: $unit / 2; + } + + hr { + border-color: transparent; + margin: ($unit / 4) 0; + } +} + +.protip { + background-color: $colorBGProtip; + border-bottom: 1px solid $colorBorder; +} + +.protip__comments { + @extend .h6; + + color: $colorTextLight; + font-weight: bold; + margin-left: $unit / 5; + display: inline-block; + text-transform: uppercase; + + @include transition; + + .icon-comment { + position: relative; + top: 2px; + } +} + +.protip__content { + @extend .h5; + + margin: ($unit / 2) 0 0; + line-height: em(21px); + + @include at-query($large) { + margin: 7px 0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + a { + color: $colorTextBody; + + &:hover, + &:hover .protip__comments { + color: $colorLinkHover; + } + } +} + +.protip__job { + border: 2px solid $colorBorder; + margin: ($unit / 2) 0; + + @include at-query($medium) { + margin: $unit 0; + } + + @include at-query($large) { + margin: $unit; + } +} + +/*============================================================================ + #Protip Single +==============================================================================*/ + +.comment-avatar { + border: 1px solid $colorBorder; + border-radius: 99px; + height: 32px; + width: 32px; + + @include at-query($large) { + height: 36px; + width: 36px; + } +} + +.comment-body { + margin-left: 42px; + + @include at-query($large) { + margin-left: 46px; + } +} + +.comment-meta { + @extend .h6; + + color: $colorLink; +} + +.protip-avatar { + height: 32px; + width: 32px; + border-radius: 99px; + position: relative; + top: 12px; + margin: 0 ($unit / 10); +} + +.protip-comment { + margin-bottom: $unit / 2; + + .comment-avatar { + position: relative; + top: 12px; + margin-right: 6px; + } + + h5 { + font-weight: 600; + margin: 0!important; + position: relative; + top: -12px; + } + + form { + margin-left: 46px; + } + + @include at-query($large) { + margin-bottom: $unit; + } + + &.comment-box { + margin: 0; + } +} + +.protip-header { + background-color: $colorBG; + border-bottom: 1px solid $colorBorder; + padding: ($unit / 2); +} + +.protip-single { + background-color: $colorBG; + padding: ($unit / 2); + word-wrap: break-word; + + @include at-query($medium) { + padding: $unit; + } + + @include at-query($large) { + padding: ($unit * 2); + } + + h1 { + margin: 0; + text-align: center; + } +} + +.protip-meta { + text-align: center; + + p { + color: $colorTextLight; + font-size: em(14px); + margin: 0 0 ($unit / 2); + } + + a { + color: $colorTextBody; + } +} + +.tag-block { + float: right; + margin-top: 1px; + + li { + margin: 0 0 0 ($unit / 10); + } + + @include at-query($large) { + margin-top: ($unit / 10); + } +} + +.tag { + @extend .h6; + + background-color: $colorBGLight; + border-radius: $unit; + color: #fff; + padding: ($unit / 10) ($unit / 2); +} diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 00000000..2aeae38d --- /dev/null +++ b/docs/configuration.md @@ -0,0 +1,27 @@ +# Configuration + +## Environment Variables + +### Github +Github presently requires both a uses auth details, and an attached application respective auth tokens. The application settings may be found at [github.com/settings/applications/new](https://github.com/settings/applications/new) + +``` +GITHUB_ADMIN_USER +GITHUB_ADMIN_USER_PASSWORD +GITHUB_REDIRECT_URL +GITHUB_CLIENT_ID +GITHUB_SECRET +``` + +### Stripe +A stripe testing account may be freely signed up for over at [dashboard.stripe.com/register](https://dashboard.stripe.com/register). By default your account will be set to testing mode, unless you choice to activate it. Once your account is created your going to want to create the following plans to match what coderwall currently provides, as defined below. Finally [dashboard.stripe.com/account/apikeys](https://dashboard.stripe.com/account/apikeys) will provide test keys for you to use. + +Set your `STRIPE_PUBLISHABLE_KEY` and `STRIPE_SECRET_KEY` in the `.env` file. + +You will also need to create the recurring billing plans on Stripe. You can do this by hand (e.g. in the Stripe admin dashboard), or via the rails console. Use `vagrant ssh` to connect to the Rails console, and issue the following command: + +`Plan.all.each { |p| p.register_on_stripe }` + +You can verify that your Stripe account is configured correctly by registering a new team in development and granting it an upgraded team level. + +[How to verify that Stripe is configured correctly](https://www.evernote.com/shard/s13/sh/9f7bb4ab-087b-4557-a35e-91b70812a921/582a7335834b8254020316760621165b/deep/0/A-simple-&-engaging-way-to-turn-your-organizations--best-qualities-into-an-engineer-magnet-and-Error-when-attempting-to-join-a-team-instead-of-create-a-team----391---Coderwall---Assembly.png) diff --git a/docs/getting_started_on_windows.md b/docs/getting_started_on_windows.md index d8fa8e92..4dfc9374 100644 --- a/docs/getting_started_on_windows.md +++ b/docs/getting_started_on_windows.md @@ -1,41 +1,41 @@ # Getting Started on Windows -I wrote this guide after having trouble getting CoderWall to work on my computer. If you're a beginner to this and want to help build, this guide is for you! +I wrote this guide after having trouble getting Coderwall to work on my computer. If you're a beginner to this and want to help build, this guide is for you! ## First Steps -To run CoderWall on Windows you'll need to download and install three programs on your computer. Make sure to have administrator privileges. I believe that your computer should also be 64-bit, not 32-bit. [Here's a guide on how to find out.](http://windows.microsoft.com/en-ca/windows/32-bit-and-64-bit-windows) +To run Coderwall on Windows you'll need to download and install three programs on your computer. Make sure to have administrator privileges. I believe that your computer should also be 64-bit, not 32-bit. [Here's a guide on how to find out.](http://windows.microsoft.com/en-ca/windows/32-bit-and-64-bit-windows) ###[Git](http://git-scm.com/downloads) -You need Git to be able to clone the CoderWall repository on GitHub. On the installer, make sure to select the option that allows you to use Git in the Windows Command Prompt. +You need Git to be able to clone the Coderwall repository on GitHub. On the installer, make sure to select the option that allows you to use Git in the Windows Command Prompt. ###[VirtualBox](https://www.virtualbox.org/wiki/Downloads) Vagrant needs VirtualBox to create its virtual environment. You might not be able to run VirtualBox if your processor doesn't support virtualization. If you think it does, and later on it doesn't work, your computer BIOS might have disabled the feature. Check out the [Troubleshooting section below.](https://github.com/assemblymade/coderwall/docs/getting_started_on_windows.md#troubleshooting) ###[Vagrant](http://vagrantup.com) -You need Vagrant to be able to create the development environment. +You need Vagrant to be able to create the development environment. Once you've got all that done, restart your computer! ## Part Two -###Clone the CoderWall repo +###Clone the Coderwall repo Start the Command Prompt. Type the following in and press enter - + depending on your choice of protocols : _(this will take a while to run so you may want to grab some coffee)_ git clone https://github.com/assemblymade/coderwall.git coderwall - git clone git@github.com:assemblymade/coderwall.git coderwall - + git clone git@github.com:assemblymade/coderwall.git coderwall + Next type in - - cd CoderWall + + cd Coderwall ### Start Vagrant This is a simple command. Ready? Enter in - + vagrant up - + Vagrant should now connect and begin to download the box needed to set things up. This will take a bit of time, but only needs to be downloaded once. If you're getting an error message, I've put some troubleshooting stuff below. When you're done, you have a virtual machine box open, and you should be able to access [http://localhost:3000](http://localhost:3000) @@ -43,12 +43,12 @@ When you're done, you have a virtual machine box open, and you should be able to ## Troubleshooting -If Vagrant says that it can't find the `VBoxManage` binary, you will need to set up the path for VirtualBox. Go to Control Panel and find the "System Environment Variables" setting. Then add +If Vagrant says that it can't find the `VBoxManage` binary, you will need to set up the path for VirtualBox. Go to Control Panel and find the "System Environment Variables" setting. Then add c:\Program Files\Oracle\VirtualBox to your PATH variable. Make sure to add a semicolon if there are other files listed there already. [There's a good guide on how to set it here.](http://www.computerhope.com/issues/ch000549.htm) If VirtualBox isn't starting up the virtual machine, you might need to edit the BIOS. Entering BIOS is different for each computer manufacturer, so you will need to search that up. After you're able to get into BIOS, the setting to enable 'Virtualization Technology' should be under the 'Security' tab. - + If you're getting a timeout error, where your computer is unable to connect to the virtual machine, I haven't been able to find a solution to that yet :( diff --git a/docs/getting_started_with_fig.md b/docs/getting_started_with_fig.md new file mode 100644 index 00000000..09903dcc --- /dev/null +++ b/docs/getting_started_with_fig.md @@ -0,0 +1,30 @@ +# Getting started with Fig + +## Prerequisites + +Head to [http://www.fig.sh/install.html](http://www.fig.sh/install.html) and install Docker and Fig. You'll find instructions there for Linux, Mac and Windows. + +## Git'r done + +fig pull +fig builu + + let's bootstrap the database and start up the app: + + $ fig up + +This will take a while to download all the Docker images to run Postgres, Redis, Elasticsearch and MongoDB. Once it's all done, kill it with ctrl-c and we'll create the databases: + + $ fig run web rake db:setup + +Now we're all ready! + + $ fig up + +If you're running on Linux, you should be able to open up the app at http://0.0.0.0:5000 + +If you're running `boot2docker` then you can get the address with: + + $ boot2docker ip + +Then open up http://192.168.59.103:5000 diff --git a/fig.yml b/fig.yml new file mode 100644 index 00000000..fab8d926 --- /dev/null +++ b/fig.yml @@ -0,0 +1,40 @@ +postgres: + image: postgres + ports: + - "5432:5432" + +redis: + image: redis:2.8.13 + ports: + - "6379:6379" + +elasticsearch: + image: barnybug/elasticsearch:0.90.13 + ports: + - "9200:9200" + +mongo: + image: mongo:2.4.10 + ports: + - "27017:27017" + +#web: + #build: . + #command: echo hello # foreman start -p 5000 web + #volumes: + #- .:/app + #ports: + #- "5000:5000" + #links: + #- postgres + #- redis + #- elasticsearch + #- mongo + #environment: + #- DEV_POSTGRES_USER=postgres + #- DEV_POSTGRES_HOST=postgres + #- STRIPE_SECRET_KEY=sk_test_BQokikJOvBiI2HlWgH4olfQ2 + #- STRIPE_PUBLISHABLE_KEY= + #- REDIS_URL=redis://redis:6379 + #- ELASTICSEARCH_URL=http://elasticsearch:9200 + #- MONGO_URL=mongo:27017 diff --git a/lib/awards.rb b/lib/awards.rb index 008f14fd..2d9ff32d 100644 --- a/lib/awards.rb +++ b/lib/awards.rb @@ -1,9 +1,7 @@ module Awards - include ResqueSupport::Basic - def award_from_file(filename) text = File.read(filename) - puts "read #{filename}" + unless text.nil? csv = CSV.parse(text, headers: false) csv.each do |row| @@ -11,8 +9,7 @@ def award_from_file(filename) date = row.shift provider = row.shift row.to_a.each do |candidate| - puts "award #{badge} to #{candidate}" - enqueue(Award, badge, date, provider, candidate) + AwardJob.perform_async(badge, date, provider, candidate) end end end @@ -21,4 +18,4 @@ def award_from_file(filename) def award(badge, date, provider, candidate) RestClient.post(award_badge_url(only_path: false, host: Rails.application.config.host, protocol: (Rails.application.config.force_ssl ? "https" : "http")), badge: badge, date: date, provider.to_sym => candidate, api_key: ENV['ADMIN_API_KEY']) end -end \ No newline at end of file +end diff --git a/lib/cfm.rb b/lib/cfm.rb index 21cdc015..ca386798 100644 --- a/lib/cfm.rb +++ b/lib/cfm.rb @@ -5,23 +5,55 @@ module CFM class Markdown class << self def render(text) - renderer = Redcarpet::Render::HTML.new - extensions = {fenced_code_blocks: true, strikethrough: true, autolink: true} - redcarpet = Redcarpet::Markdown.new(renderer, extensions) - redcarpet.render(render_cfm(text)) unless text.nil? - end + return nil if text.nil? - def render_cfm(text) - #hotlink coderwall usernames to their profile - text.gsub(/((?<!\s{4}).*)@([a-zA-Z_\-0-9]+)/) { $1+coderwall_user_link($2) } + extensions = { + fenced_code_blocks: true, + strikethrough: true, + autolink: true + } + + renderer = Redcarpet::Render::HTML.new( link_attributes: {rel: "nofollow"}) + redcarpet = Redcarpet::Markdown.new(renderer, extensions) + html = redcarpet.render(render_cfm(text)) + html = add_nofollow(html) + html end USERNAME_BLACKLIST = %w(include) private + + def add_nofollow( html) + #redcarpet isn't adding nofollow like it is suppose to. + html.scan(/(\<a href=["'].*?["']\>.*?\<\/a\>)/).flatten.each do |link| + if link.match(/\<a href=["'](http:\/\/|www){0,1}((coderwall.com)(\/.*?){0,1}|\/.*?)["']\>(.*?)\<\/a\>/) + else + link.match(/(\<a href=["'](.*?)["']\>(.*?)\<\/a\>)/) + html.gsub!(link, "<a href='#{$2}' rel='nofollow' >#{$3}</a>" ) + end + end + html + end + + def render_cfm(text) + text.lines.map do |x| + inspect_line(x) + end.join('') + end + def coderwall_user_link(username) (User.where(username: username).exists? && !USERNAME_BLACKLIST.include?(username)) ? ActionController::Base.helpers.link_to("@#{username}", "/#{username}") : "@#{username}" end + + def inspect_line(line) + #hotlink coderwall usernames to their profile, but don't search for @mentions in code blocks + if line.start_with?(' ') + line + else + line.gsub(/((?<!\s{4}).*)@([a-zA-Z_\-0-9]+)/) { $1+coderwall_user_link($2) } + end + end end end -end \ No newline at end of file +end diff --git a/lib/date_to_words.rb b/lib/date_to_words.rb deleted file mode 100644 index 6b96d435..00000000 --- a/lib/date_to_words.rb +++ /dev/null @@ -1,35 +0,0 @@ -Date.class_eval do - def to_words - if self == Date.today - "today" - elsif self <= Date.today - 1 - if self == Date.today - 1 - "yesterday" - elsif ((Date.today - 7)..(Date.today - 1)).include?(self) - "last #{self.strftime("%A")}" - elsif ((Date.today - 14)..(Date.today - 8)).include?(self) - "two #{self.strftime("%A")}s ago" - elsif ((Date.today - 21)..(Date.today - 15)).include?(self) - "three #{self.strftime("%A")}s ago" - elsif ((Date.today - 29)..(Date.today - 22)).include?(self) - "four #{self.strftime("%A")}s ago" - elsif Date.today - 30 < self - "more than a month ago" - end - else - if self == Date.today + 1 - "tomorrow" - elsif ((Date.today + 1)..(Date.today + 6)).include?(self) - "this coming #{self.strftime("%A")}" - elsif ((Date.today + 7)..(Date.today + 14)).include?(self) - "next #{self.strftime("%A")}" - elsif ((Date.today + 15)..(Date.today + 21)).include?(self) - "two #{self.strftime("%A")}s away" - elsif ((Date.today + 22)..(Date.today + 29)).include?(self) - "three #{self.strftime("%A")}s away" - elsif Date.today + 30 > self - "more than a month in the future" - end - end - end -end \ No newline at end of file diff --git a/lib/hash_string_parser.rb b/lib/hash_string_parser.rb deleted file mode 100644 index a45636ca..00000000 --- a/lib/hash_string_parser.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'json' - -class HashStringParser - def self.better_than_eval(hash_string_to_parse) - # This code is bad and I should feel bad. - JSON.parse("{" + hash_string_to_parse.gsub(/^{|}$/, '').split(', '). - map { |pair| pair.split('=>') }. - map {|k, v| [k.gsub(/^:(\w*)/, '"\1"'), v == 'nil' ? "null" : v].join(": ") }.join(", ") + "}") - end -end diff --git a/lib/importers.rb b/lib/importers.rb index 49654017..27163d7c 100644 --- a/lib/importers.rb +++ b/lib/importers.rb @@ -1,32 +1,27 @@ module Importers module Protips class SlideshareImporter - class << self - def import_from_fact(fact) - #slideshare_display_url = "http://www.slideshare.net/slideshow/embed_code/#{fact.identity}" - #unless Protip.already_created_a_protip_for(slideshare_display_url) - # user = User.where(:slideshare => fact.owner.match(/slideshare:(.+)/)[1]).first - # return if user.nil? - # Rails.logger.debug "creating slideshare: #{fact.url} by #{fact.owner}/#{user.username unless user.nil?}" - # user.protips.create(title: fact.name, body: slideshare_display_url, created_at: fact.relevant_on, topics: ["Slideshare"], created_by: Protip::IMPORTER, user: user) - #end - end + def self.import_from_fact(fact) + #slideshare_display_url = "http://www.slideshare.net/slideshow/embed_code/#{fact.identity}" + #unless Protip.already_created_a_protip_for(slideshare_display_url) + # user = User.where(:slideshare => fact.owner.match(/slideshare:(.+)/)[1]).first + # return if user.nil? + # Rails.logger.debug "creating slideshare: #{fact.url} by #{fact.owner}/#{user.username unless user.nil?}" + # user.protips.create(title: fact.name, body: slideshare_display_url, created_at: fact.relevant_on, topics: ["Slideshare"], created_by: Protip::IMPORTER, user: user) + #end end end class GithubImporter - class << self - def import_from_follows(description, link, date, owner) - #if protiplink = ProtipLink.find_by_encoded_url(link) - # protiplink.protip.upvote_by(owner, owner.tracking_code, Protip::DEFAULT_IP_ADDRESS) unless protiplink.protip.nil? - #else - # #Rails.logger.debug "creating protip:#{description}, #{link}" - # #language = Github.new.predominant_repo_lanugage_for_link(link) - # #description = (description && description.slice(0, Protip::MAX_TITLE_LENGTH)) - # #owner.protips.create(title: description, body: link, created_at: date, topics: ["Github", language].compact, created_by: Protip::IMPORTER, user: owner) - #end + def self.import_from_follows(description, link, date, owner) + if protiplink = ProtipLink.find_by_encoded_url(link) + protiplink.protip.upvote_by(owner, owner.tracking_code, Protip::DEFAULT_IP_ADDRESS) unless protiplink.protip.nil? + else + language = GithubOld.new.predominant_repo_lanugage_for_link(link) + description = (description && description.slice(0, Protip::MAX_TITLE_LENGTH)) + owner.protips.create(title: description, body: link, created_at: date, topics: ["Github", language].compact, created_by: Protip::IMPORTER, user: owner) end end end end -end \ No newline at end of file +end diff --git a/lib/leaderboard_elasticsearch_rank.rb b/lib/leaderboard_elasticsearch_rank.rb deleted file mode 100644 index 498d1d31..00000000 --- a/lib/leaderboard_elasticsearch_rank.rb +++ /dev/null @@ -1,53 +0,0 @@ -module LeaderboardElasticsearchRank - - def self.included(klass) - klass.extend(ClassMethods) - end - - module ClassMethods - @@ranks = nil - - def rank_teams - i = 0 - @@ranks ||= [] - teams = top(1, Team.count) - teams.is_a?(Team::SearchResultsWrapper) ? {} : teams.inject(Hash.new(0)) { |h, team| h[team.id.to_s] = (i = i+ 1); @@ranks[i]= Team::SearchResultsWrapper.new(team, i); h } - end - - def ranked_teams - @@ranked_teams ||= Rails.cache.fetch("teams_ranked_teams", expires_in: 1.hour) { rank_teams } - end - - def ranks - @@ranks ||= Rails.cache.fetch("teams_ranks", expires_in: 1.hour) { (rank_teams && @@ranks) } - end - - def team_rank(team) - ranked_teams[team.id.to_s] || 0 - end - - def top(page = 1, total = 50, country=nil) - Team.search("", nil, page, total) - end - end - - def next_highest_competitors(number = 2) - @higher_competitor ||= Team.ranks[rank-number..rank-1].compact - end - - def higher_competitors(number = 1) - Team.ranks[rank-number..rank-1].compact - end - - def lower_competitors(number = 1) - Team.ranks[rank+1..rank+number].compact - end - - def next_lowest_competitors(number = 2) - @lower_competitor ||= Team.ranks[rank+1..rank+number].compact - end - - def rank - @rank ||= Team.team_rank(self) - end -end diff --git a/lib/leaderboard_redis_rank.rb b/lib/leaderboard_redis_rank.rb deleted file mode 100644 index ab204c24..00000000 --- a/lib/leaderboard_redis_rank.rb +++ /dev/null @@ -1,40 +0,0 @@ -module LeaderboardRedisRank - - def self.included(klass) - klass.extend(ClassMethods) - end - - module ClassMethods - def top(page = 1, total = 50, country=nil) - end_range = (page * total) - 1 - start_range = (end_range - total) + 1 - ids = REDIS.zrevrange(Team::LEADERBOARD_KEY, start_range, end_range) - Team.find(ids).sort_by(&:rank) - end - end - - def next_highest_competitors(number = 2) - @higher_competitor ||= Team.find(higher_competitors(number)).sort_by(&:rank) - end - - def higher_competitors(number = 1) - low = [rank - number - 1, 0].max - high = [rank - 2, 0].max - total_member_count >= 3 && rank-1 != low ? REDIS.zrevrange(Team::LEADERBOARD_KEY, low, high) : [] - end - - def lower_competitors(number = 1) - low = [rank, 0].max - high = [rank + number - 1, 0].max - total_member_count >= 3 && rank != high ? REDIS.zrevrange(Team::LEADERBOARD_KEY, low, high) : [] - end - - def next_lowest_competitors(number = 2) - @lower_competitor ||= Team.find(lower_competitors(number)).sort_by(&:rank) - end - - def rank - @rank ||= (REDIS.zrevrank(Team::LEADERBOARD_KEY, id.to_s) || -1).to_i + 1 - end - -end diff --git a/lib/mixpanel_tracker.rb b/lib/mixpanel_tracker.rb deleted file mode 100644 index 656d51e3..00000000 --- a/lib/mixpanel_tracker.rb +++ /dev/null @@ -1,14 +0,0 @@ -module MixpanelTracker - class TrackEventJob - @queue = 'CRITICAL' - class << self - def mixpanel(ip) - Mixpanel::Tracker.new(ENV['MIXPANEL_TOKEN'], ip: ip) - end - - def perform(name, params, request_ip) - mixpanel(request_ip).track(name, params) - end - end - end -end diff --git a/lib/net_validators.rb b/lib/net_validators.rb index a69473fd..5817215a 100644 --- a/lib/net_validators.rb +++ b/lib/net_validators.rb @@ -23,29 +23,5 @@ def correct_url(url) url end end - - - class UriValidator < ActiveModel::EachValidator - def validate_each(object, attribute, value) - raise(ArgumentError, "A regular expression must be supplied as the :format option of the options hash") unless options[:format].nil? or options[:format].is_a?(Regexp) - configuration = {message: "is invalid or not responding", format: URI::regexp(%w(http https))} - configuration.update(options) - - if value =~ (configuration[:format]) - begin # check header response - case Net::HTTP.get_response(URI.parse(value)) - when Net::HTTPSuccess, Net::HTTPRedirection then - true - else - object.errors.add(attribute, configuration[:message]) and false - end - rescue # Recover on DNS failures.. - object.errors.add(attribute, configuration[:message]) and false - end - else - object.errors.add(attribute, configuration[:message]) and false - end - end - end end diff --git a/lib/publisher.rb b/lib/publisher.rb deleted file mode 100644 index 8cac2353..00000000 --- a/lib/publisher.rb +++ /dev/null @@ -1,25 +0,0 @@ -module Publisher - def agent - @@pubnub ||= Pubnub.new( - ENV['PUBNUB_PUBLISH_KEY'], - ENV['PUBNUB_SUBSCRIBE_KEY'], - ENV['PUBNUB_SECRET_KEY'], - "", ## CIPHER_KEY (Cipher key is Optional) - ssl_on = false - ) - @@pubnub - end - - def publish(channel, message) - agent.publish({'channel' => channel, 'message' => message}) if agent_active? - end - - def agent_active? - @@agent_active ||= begin - active = !ENV['PUBNUB_PUBLISH_KEY'].blank? && !ENV['PUBNUB_SUBSCRIBE_KEY'].blank? && !ENV['PUBNUB_SECRET_KEY'].blank? - Rails.logger.warn("Disabling notifications, env settings not present") unless active - active - end - end - -end diff --git a/lib/search.rb b/lib/search.rb deleted file mode 100644 index b8eb6900..00000000 --- a/lib/search.rb +++ /dev/null @@ -1,128 +0,0 @@ -module SearchModule - module ClassMethods - def rebuild_index(name = nil) - raise 'Unable to rebuild search index in production because it is disabled by Bonsai' if Rails.env.staging? || Rails.env.production? - klass = self - Tire.index name || self.index_name || self.class.name do - delete - create - klass.find_in_batches { |batch| import batch } - end - end - end - - def self.included(base) ; base.extend(ClassMethods) ; end - - class Search - def initialize(context, query=nil, scope=nil, sort=nil, facet=nil, options={}) - @context = context - @query = query - @scope = scope - @sort = sort - @facet = facet - @options = failover_strategy.merge(options || {}) - end - - def execute - query_criteria, filter_criteria, sort_criteria, facets, context = [@query, @scope, @sort, @facet, @context] - - @context.tire.search(@options) do - query do - signature = query_criteria.to_tire - method = signature.shift - self.send(method, *signature) - end unless query_criteria.nil? || query_criteria.to_tire.blank? - - filter_criteria.to_tire.each do |fltr| - filter *fltr - end unless filter_criteria.nil? - - sort { by sort_criteria.to_tire } unless sort_criteria.nil? - - ap facets - ap facets.to_tire unless facets.nil? - eval(facets.to_tire) unless facets.nil? - - Rails.logger.debug "[search](#{context.to_s}):" + JSON.pretty_generate(to_hash) - end - rescue Tire::Search::SearchRequestFailed, Errno::ECONNREFUSED - if @options[:failover].nil? - raise - else - @options[:failover].limit(@options[:per_page] || 18).offset(((@options[:page] || 1)-1) * (@options[:per_page] || 19)) - end - end - - def sort_criteria ; @sort ; end - - def failover_strategy ; { failover: @context.order('created_at DESC') } ; end - - class Scope - def initialize(domain, object) - @domain = domain - @object = object - @filter = to_hash - end - - def to_tire ; @filter ; end - def to_hash ; {} ; end - - def <<(other) - @filter.deep_merge(other.to_tire) - self - end - end - - class Sort - def initialize(fields, direction = 'desc') - @fields = fields.is_a?(Array) ? fields.map(&:to_s) : [fields.to_s] - @direction = direction - end - - def to_tire ; @fields.map { |field| {field => @direction} } ; end - end - - class Query - def default_query ; '' ; end - - def initialize(query_string, default_operator = 'AND', default_query_string = default_query) - @query_string = default_query_string + ' ' + query_string - @default_operator = default_operator - end - - def to_tire - [:string, "#{@query_string}", { default_operator: "#{@default_operator}" }] unless @query_string.blank? - end - end - - class Facet - def initialize(name, type, field, options) - @name = name - @type = type - @field = field - @global = options.delete(:global) || false - @options = options - @facet = to_eval_form - end - - def to_eval_form - "facet '#{@name}', :global => #{@global} do \n"\ - "#{@type} :#{@field} #{evaluatable_options} \n"\ - "end" - end - - def to_tire ; @facet ; end - - def <<(other_facet) - @facet << "\n" << other_facet.to_eval_form - self - end - - private - - def evaluatable_options - ', ' + @options.join(', ') unless @options.blank? - end - end - end -end diff --git a/lib/servant.rb b/lib/servant.rb index 50fa1bcf..1d103a1d 100644 --- a/lib/servant.rb +++ b/lib/servant.rb @@ -16,11 +16,9 @@ def capture_api_calls def get(url) increment! - Rails.logger.debug("Making request: #{url}") response = RestClient.get(url, verify_ssl: false) response = ServiceResponse.new(response.to_s, response.headers) - Rails.logger.debug("GitHub requests left: #{response.requests_left}") return response end end -end \ No newline at end of file +end diff --git a/lib/serve_fonts.rb b/lib/serve_fonts.rb deleted file mode 100644 index 6e425fe0..00000000 --- a/lib/serve_fonts.rb +++ /dev/null @@ -1,23 +0,0 @@ -class ServeFonts < Sinatra::Base - ONE_YEAR = 31557600 - TEN_YEARS_IN_TEXT = "Sun, 12 Jun 2022 22:13:16 GMT" - - get '/:font_face' do - headers['Cache-Control'] = "public, max-age=#{ONE_YEAR}" - headers['Expires'] = TEN_YEARS_IN_TEXT - headers['Access-Control-Allow-Origin'] = '*' - headers['Content-Type'] = case params[:font_face] - when /\.ttf$/ then - 'font/truetype' - when /\.otf$/ then - 'font/opentype' - when /\.woff$/ then - 'font/woff' - when /\.eot$/ then - 'application/vnd.ms-fontobject' - when /\.svg$/ then - 'image/svg+xml' - end - File.read(File.join(Rails.root, 'app', 'assets', 'fonts', params[:font_face])) - end -end \ No newline at end of file diff --git a/lib/service_response.rb b/lib/service_response.rb index fc19d67e..0a368ca0 100644 --- a/lib/service_response.rb +++ b/lib/service_response.rb @@ -18,7 +18,6 @@ def requests_left def next_page @next_page ||= begin if links = headers[:link] - Rails.logger.debug("Found multiple links: #{links}") links = links.split(',').collect { |parts| normalize_link(parts) } next_link = links.detect { |link| link[:name] == 'next' } next_link[:url] if next_link @@ -36,4 +35,4 @@ def normalize_link(link) } end -end \ No newline at end of file +end diff --git a/lib/taggers.rb b/lib/taggers.rb deleted file mode 100644 index 8d228c56..00000000 --- a/lib/taggers.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'net/http' -require 'rexml/document' -require 'uri' - -class Taggers - - def self.acronyms(text) - text.scan(/[A-Z][A-Z0-9]{2,}/).uniq - end - - def self.tag(html = nil, url) - html ||= Nokogiri.parse(open(url)) - title, *text = html.xpath("//title|//h1|//h2").map(&:text) - text = (text + title).join - tags = (YahooTagger.extract(text) + acronyms(text)).map(&:strip).uniq - tags << title if tags.empty? - tags - end - - class YahooTagger - class << self - def extract(text) - options = {} - options[:context] = text - tag_xml = retrieve(options) - - parse(tag_xml) - end - - private - # pass the content to YTE for term extraction - def retrieve(options) - options['appid'] = ENV['YAHOO_APP_KEY'] - response, data = Net::HTTP.post_form(URI.parse(ENV['YAHOO_TERM_EXTRACTION_URL']), options) - response == Net::HTTPSuccess ? data : "" - end - - private - def parse(xml) - tags = [] - doc = REXML::Document.new(xml) - doc.elements.each("*/Result") do |result| - tags << result.text - end - tags - end - end - end -end \ No newline at end of file diff --git a/lib/tasks/_prepend/deploy.rake b/lib/tasks/_prepend/deploy.rake new file mode 100644 index 00000000..5b6d176f --- /dev/null +++ b/lib/tasks/_prepend/deploy.rake @@ -0,0 +1,17 @@ +# List of environments and their heroku git remotes +ENVIRONMENTS = { + staging: 'coderwall-staging', + production: 'coderwall-production' +} +namespace :deploy do + ENVIRONMENTS.keys.each do |env| + desc "Deploy to #{env}" + task env do + Rake::Task['deploy:after_deploy'].invoke + end + end + + task :after_deploy do |t, args| + Rake::Task['humans'].invoke + end +end \ No newline at end of file diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake deleted file mode 100644 index 10b5c071..00000000 --- a/lib/tasks/assets.rake +++ /dev/null @@ -1,11 +0,0 @@ -pt = Rake::Task['assets:precompile'] -Rake.application.send(:eval, "@tasks.delete('assets:precompile')") - -namespace :assets do - task :precompile do - Hamlbars::Template.render_templates_for :ember - - #Hamlbars::Template.enable_precompiler! - pt.execute - end -end \ No newline at end of file diff --git a/lib/tasks/award.rake b/lib/tasks/award.rake deleted file mode 100644 index 4bcd4298..00000000 --- a/lib/tasks/award.rake +++ /dev/null @@ -1,99 +0,0 @@ -require 'awards' - -namespace :award do - - task :catchup => :environment do - badges = ENV['BADGES'].split(",") - badges = Badges.all.map(&:name) if badges.first == "*" - raise "Must supply list of badge classes (BADGES=Mongoose,Narwhal)" if badges.empty? - - User.active.find_each(:batch_size => 1000) do |user| - Resque.enqueue(AwardUser, user.username, badges) - end - end - - namespace :activate do - task :now => :environment do - username = ENV["USER"] - raise "Must supply a username (USER=username)" if username.blank? - ActivateUser.new(username).perform - end - - task :async => :environment do - username = ENV["USER"] - raise "Must supply a username (USER=username)" if username.blank? - Resque.enqueue(ActivateUser, username) - end - - # PRODUCTION: RUNS DAILY - task :active => :environment do - User.pending.where('last_request_at > ?', 1.week.ago).find_each(:batch_size => 1000) do |user| - Resque.enqueue(ActivateUser, user.username, always_activate=false) - end - end - end - - namespace :refresh do - task :now => :environment do - username = ENV["USER"] - raise "Must supply a username (USER=username)" if username.blank? - RefreshUser.new(username).perform - end - - task :async => :environment do - username = ENV["USER"] - raise "Must supply a username (USER=username)" if username.blank? - Resque.enqueue(RefreshUser, username) - end - - # PRODUCTION: RUNS DAILY - task :stale => :environment do - daily_count = User.count/10 - User.active.order("last_refresh_at ASC").limit(daily_count).find_each do |user| - if user.last_refresh_at < 5.days.ago - Resque.enqueue(RefreshUser, user.username) - end - end - end - - task :activity => :environment do - User.active.find_each(:batch_size => 1000) do |user| - Resque.enqueue(BuildActivityStream, user.username) - end - end - end - - namespace :github do - task :remove, [:who] => :environment do |t, args| - who = args.who || "last_month" - users = get_users(who) - users.find_each(:batch_size => 1000) do |user| - user.join_badge_orgs = false - user.save - end - end - - task :add, [:who] => :environment do |t, args| - who = args.who || "last_month" - users = get_users(who) - users.find_each(:batch_size => 1000) do |user| - user.join_badge_orgs = true - user.save - end - end - - def get_users(who) - if who == 'last_month' - User.where('created_at > ?', 1.month.ago) - elsif who == 'last_three_months' - User.where('created_at > ?', 3.months.ago) - elsif who == 'last_six_months' - User.where('created_at > ?', 6.months.ago) - elsif who == 'all' - User.all - else - User.where(:github => who) - end - end - end -end \ No newline at end of file diff --git a/lib/tasks/cleanup.rake b/lib/tasks/cleanup.rake deleted file mode 100644 index 2daeedef..00000000 --- a/lib/tasks/cleanup.rake +++ /dev/null @@ -1,115 +0,0 @@ -namespace :cleanup do - include ResqueSupport::Basic - - namespace :skills do - task :merge => :environment do - SKILLS = {'objective c' => 'objective-c'} - - SKILLS.each do |incorrect_skill, correct_skill| - Skill.where(:name => incorrect_skill).each do |skill| - puts "merging skill" - enqueue(MergeSkill, skill.id, correct_skill) - end - end - end - - task :duplicates => :environment do - Skill.group('lower(name), user_id').having('count(user_id) > 1').select('lower(name) as name, user_id').each do |skill| - skills = Skill.where('lower(name) = ?', skill.name).where(:user_id => skill.user_id) - skill_to_keep = skills.shift - skills.each do |skill_to_delete| - skill_to_delete.endorsements.each do |endorsement| - skill_to_keep.endorsements << endorsement - end - end - skill_to_keep.save - skills.destroy_all - end - end - end - - namespace :protips do - task :duplicate_tags => :environment do - Tag.select('name, count(name)').group(:name).having('count(name) > 1').map(&:name).each do |tag_name| - duplicate_tags = Tag.where(:name => tag_name).map(&:id) - original_tag = duplicate_tags.shift - while (duplicate_tag = duplicate_tags.shift) - enqueue(MergeTag, original_tag, duplicate_tag) - Tag.find(duplicate_tag).destroy - end - end - end - - task :duplicate_slideshares => :environment do - ProtipLink.select('url, count(url)').group(:url).having('count(url) > 1').where("url LIKE '%www.slideshare.net/slideshow/embed_code%'").map(&:url).each do |link| - enqueue(MergeDuplicateLink, link) - end - end - - task :zombie_taggings => :environment do - Tagging.where('tag_id not in (select id from tags)').find_each(:batch_size => 1000) do |zombie_tagging| - zombie_tagging.destroy - end - end - - task :delete_github_protips => :environment do - Protip.where(:created_by => "coderwall:importer").find_each(:batch_size => 1000) do |protip| - if protip.topics.include? "github" - enqueue(ProcessProtip, :delete, protip.id) - end - end - end - - # PRODUCTION: RUNS DAILY - task :associate_zombie_upvotes => :environment do - Like.joins('inner join users on users.tracking_code = likes.tracking_code').where('likes.tracking_code is not null').where(:user_id => nil).find_each(:batch_size => 1000) do |like| - enqueue(ProcessLike, :associate_to_user, like.id) - end - end - - task :queue_orphan_protips => :environment do - network_tags = Network.all.collect(&:tags).flatten - Protip.where('id NOT IN (?)', Protip.any_topics(network_tags).select(:id)+Protip.tagged_with("slideshare")).select([:id, :public_id]).find_each(:batch_size => 1000) do |protip| - Event.send_admin_notifications(:new_protip, {:public_id => protip.public_id}, :orphan_protips) - end - end - - task :retag_space_delimited_tags => :environment do - Protip.joins("inner join taggings on taggable_id = protips.id and taggable_type = 'Protip'").where("taggings.context = 'topics'").select("protips.*").group('protips.id').having('count(protips.id) = 1').each do |protip| - protip.save if protip.topics.first =~ /\s/ - end - end - - namespace :downvote do - task :github_links_protips => :environment do - Protip.where('LENGTH(body) < 300').where("body LIKE '%https://github.com%'").each do |protip| - protip.likes.where('value < 20').delete_all - enqueue(ProcessProtip, :recalculate_score, protip.id) - end - end - end - - end - - namespace :users do - task :set_initial_visit => :environment do - User.select([:username, :id]).find_each(:batch_size => 1000) do |user| - enqueue(SetUserVisit, user.username) - end - end - end - - namespace :teams do - task :remove_deleted_teams_dependencies => :environment do - valid_team_ids = Team.only(:id).all.map(&:_id).map(&:to_s) - [FollowedTeam, Invitation, Opportunity, SeizedOpportunity, User].each do |klass| - puts "deleting #{klass.where('team_document_id IS NOT NULL').where('team_document_id NOT IN (?)', valid_team_ids).count} #{klass.name}" - if klass == User - klass.where('team_document_id IS NOT NULL').where('team_document_id NOT IN (?)', valid_team_ids).update_all('team_document_id = NULL') - else - klass.where('team_document_id IS NOT NULL').where('team_document_id NOT IN (?)', valid_team_ids).delete_all - end - end - end - end -end diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index fae6b5cb..f7837bb5 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -1,26 +1,34 @@ -# PRODUCTION: RUNS DAILY -task :clear_expired_sessions => :environment do - ActiveRecord::SessionStore::Session.delete_all(["updated_at < ?", 7.days.ago]) -end - namespace :db do + task smash: %w(redis:flush db:schema:load db:test:prepare db:seed) + namespace :download do - desc 'Kickoff a backup of the production database. Expires the oldest backup so don\'t go crazy.' + def db_dump_file + "coderwall-production.dump" + end + + # https://www.mongolab.com/downloadbackup/543ea81670096301db49ddd2 + + desc 'Create a production database backup' task :generate do Bundler.with_clean_env do - sh("heroku pgbackups:capture --expire --app coderwall-production") + cmd = "heroku pg:backups capture DATABASE_URL --app coderwall-production" + sh(cmd) end end - desc 'Fetch the last backup.' + desc 'Download latest database backup' task :latest do - Bundler.with_clean_env do - sh("curl `heroku pgbackups:url --app coderwall-production` -o latest.dump") + unless File.exists?(db_dump_file) + Bundler.with_clean_env do + sh("curl `heroku pg:backups public-url --app coderwall-production` -o #{db_dump_file}") + end end end - desc 'Overwrite the local database from the backup.' - task :load => :environment do + desc 'Load local database backup into dev' + task load: :environment do + raise 'local dump not found' unless File.exists?(db_dump_file) + puts 'Cleaning out local database tables' ActiveRecord::Base.connection.tables.each do |table| puts "Dropping #{table}" @@ -28,23 +36,19 @@ namespace :db do end puts 'Loading Production database locally' - `pg_restore --verbose --clean --no-acl --no-owner -h localhost -d coderwall_development latest.dump` - - puts '!!!!========= YOU MUST RESTART YOUR SERVER =========!!!!' + `pg_restore --verbose --clean --no-acl --no-owner -h localhost -d coderwall_development #{db_dump_file}` end task :clean do - `rm latest.dump` + `rm #{db_dump_file}` end end - desc 'Fetch the production database and overwrite the local development database.' - task restore: %w{ - db:download:generate - db:download:latest - db:download:load - db:download:clean - db:migrate + task restore: %w(db:download:generate db:download:latest db:download:load vagrant:db:restart db:download:clean db:migrate) + task reload: %w(db:download:latest db:download:load vagrant:db:restart db:migrate) - } + desc 'ActiveRecord can you shut up for 30 minutes?' + task mute: :environment do + ActiveRecord::Base.logger = nil + end end diff --git a/lib/tasks/digest.rake b/lib/tasks/digest.rake index 8075f03b..8fad35f3 100644 --- a/lib/tasks/digest.rake +++ b/lib/tasks/digest.rake @@ -19,7 +19,7 @@ namespace :weekly do users = users.where('last_request_at < ?', 1.month.ago) end users.find_each(:batch_size => 1000) do |user| - WeeklyDigest.weekly_digest(user.username).deliver + WeeklyDigestMailer.weekly_digest(user.username).deliver end end end diff --git a/lib/tasks/facts.rake b/lib/tasks/facts.rake index ad275001..945881c5 100644 --- a/lib/tasks/facts.rake +++ b/lib/tasks/facts.rake @@ -1,22 +1,7 @@ namespace :facts do - # PRODUCTION: RUNS DAILY - task :system => :environment do - puts "Changelogd" - Changelogd.refresh + task system: :environment do puts "Ashcat" Ashcat.perform - NodeKnockout.new(2011, '2011/09/06').reset! - NodeKnockout.new(2012, '2012/11/17').reset! end - - namespace :node_knockout do - task :import_2011 => :environment do - NodeKnockout.new(2011, '2011/09/06').reset! - end - - task :import_2012 => :environment do - NodeKnockout.new(2012, '2012/11/17').reset! - end - end -end \ No newline at end of file +end diff --git a/lib/tasks/generate_protip_slugs.rake b/lib/tasks/generate_protip_slugs.rake new file mode 100644 index 00000000..27fcc0b5 --- /dev/null +++ b/lib/tasks/generate_protip_slugs.rake @@ -0,0 +1,10 @@ +desc 'Generate slugs for existing protips' +task :generate_protip_slugs => :environment do + begin + Protip.all.each do |pt| + pt.save + end + rescue => e + puts "Rake task protip slugs failed: #{e}" + end +end diff --git a/lib/tasks/humans.rake b/lib/tasks/humans.rake new file mode 100644 index 00000000..622f40d1 --- /dev/null +++ b/lib/tasks/humans.rake @@ -0,0 +1,12 @@ +desc 'Generate the humans.txt file to publicly acknowledge contributors' +task :humans do + begin + erb = ERB.new(File.read(Rails.root.join('lib', 'templates', 'erb', 'humans.txt.erb')), nil, '-') + + File.open(Rails.root.join('public', 'humans.txt'), 'w') do |file| + file.write(erb.result) + end + rescue => e + puts "Rake task humans failed: #{e}" + end +end diff --git a/lib/tasks/mailers.rake b/lib/tasks/mailers.rake new file mode 100644 index 00000000..534e8d0e --- /dev/null +++ b/lib/tasks/mailers.rake @@ -0,0 +1,9 @@ +namespace :mailers do + task popular_protips: :environment do + from = 60.days.ago + to = 0.days.ago + user = User.find_by_username('mcansky') + protips = ProtipMailer::Queries.popular_protips(from, to) + ProtipMailer.popular_protips(user, protips, from, to).deliver + end +end diff --git a/lib/tasks/marketing.rake b/lib/tasks/marketing.rake index ef05c8e3..4b569419 100644 --- a/lib/tasks/marketing.rake +++ b/lib/tasks/marketing.rake @@ -3,5 +3,7 @@ namespace :marketing do task :send => :environment do LifecycleMarketing.process! end + + end -end \ No newline at end of file +end diff --git a/lib/tasks/protips.rake b/lib/tasks/protips.rake deleted file mode 100644 index 954e0471..00000000 --- a/lib/tasks/protips.rake +++ /dev/null @@ -1,75 +0,0 @@ -require 'importers' - -namespace :protips do - include ResqueSupport::Basic - include ActionView::Helpers::TextHelper - - def progressbar(max) - @progressbar ||= ProgressBar.create(max) - end - - # PRODUCTION: RUNS DAILY - task recalculate_scores: :environment do - Protip.where('created_at > ?', 25.hours.ago).where(upvotes_value_cache: nil).each do |protip| - enqueue(ProcessProtip, :recalculate_score, protip.id) - end - end - - task recalculate_all_scores: :environment do - total = Protip.count - Protip.order('created_at DESC').select(:id).find_each(batch_size: 1000) do |protip| - progressbar(title: "Protips", format: '%a |%b %i| %p%% %t', total: total).increment - enqueue(ProcessProtip, :recalculate_score, protip.id) - end - end - - task import_unindexed_protips: :environment do - Protip.where('created_at > ?', 25.hours.ago).find_each(batch_size: 1000) do |protip| - unless Protip.search("public_id:#{protip.public_id}").any? - enqueue(ProcessProtip, :resave, protip.id) - end - end - end - - task cache_scores: :environment do - Protip.find_each(batch_size: 1000) do |protip| - enqueue(ProcessProtip, :cache_score, protip.id) - end - end - - namespace :seed do - task github_follows: :environment do - User.find_each(batch_size: 1000) do |user| - enqueue(ImportProtip, :github_follows, user.username) - end - end - - task slideshare: :environment do - slideshare_facts.each do |fact| - enqueue(ImportProtip, :slideshare, fact.id) - end - end - - task subscriptions: :environment do - User.find_each(batch_size: 1000) do |user| - enqueue(ImportProtip, :subscriptions, user.username) - end - end - end - - namespace :comments do - task send_emails: :environment do - Comment.find_each do |comment| - Notifier.new_comment(comment.commentable.try(:user).try(:username), comment.author.username, comment.id).deliver - - comment.mentions.each do |mention| - Notifier.comment_reply(mention.username, self.author.username, self.id).deliver - end - end - end - end -end - -def slideshare_facts - (Fact.where('tags LIKE ?', '% slideshare%')).uniq -end diff --git a/lib/tasks/redis.rake b/lib/tasks/redis.rake new file mode 100644 index 00000000..85987595 --- /dev/null +++ b/lib/tasks/redis.rake @@ -0,0 +1,5 @@ +namespace :redis do + task :flush => :environment do + $redis.flushdb + end +end diff --git a/lib/tasks/resque.rake b/lib/tasks/resque.rake deleted file mode 100644 index 4c04f473..00000000 --- a/lib/tasks/resque.rake +++ /dev/null @@ -1,34 +0,0 @@ -require 'resque/tasks' -require 'resque_scheduler/tasks' - -task "resque:setup" => :environment do - ENV['QUEUE'] = '*' if ENV['QUEUE'].blank? - - # http://stackoverflow.com/questions/2611747/rails-resque-workers-fail-with-pgerror-server-closed-the-connection-unexpectedly - Resque.after_fork do |worker| - ActiveRecord::Base.establish_connection - end -end - -task "resque:scheduler_setup" => :environment - -namespace :resque do - desc "Clear pending tasks" - task :clear => :environment do - queues = Resque.queues - queues.each do |queue_name| - puts "Clearing #{queue_name}..." - Resque.redis.del "queue:#{queue_name}" - end - - puts "Clearing delayed..." # in case of scheduler - doesn't break if no scheduler module is installed - Resque.redis.keys("delayed:*").each do |key| - Resque.redis.del "#{key}" - end - Resque.redis.del "delayed_queue_schedule" - - puts "Clearing stats..." - Resque.redis.set "stat:failed", 0 - Resque.redis.set "stat:processed", 0 - end -end \ No newline at end of file diff --git a/lib/tasks/search.rake b/lib/tasks/search.rake deleted file mode 100644 index 79423ca0..00000000 --- a/lib/tasks/search.rake +++ /dev/null @@ -1,110 +0,0 @@ -namespace :search do - include ResqueSupport::Basic - - namespace :rebuild do - desc 'Reindex all the searchable classes' - task :all => :environment do - klasses = [Team, Protip, Opportunity] - klasses.each do |klass| - reindex_class(klass) - end - end - - desc 'Reindex teams' - task :teams => :environment do - reindex_class(Team) - end - - desc 'Reindex protips' - task :protips => :environment do - reindex_class(Protip) - end - - desc 'Reindex opportunities' - task :opportunities => :environment do - reindex_class(Opportunity) - end - - def reindex_class(klass) - ENV['CLASS'] = klass.name - ENV['INDEX'] = new_index = klass.tire.index.name.dup << '_' << Rails.env.to_s << '_' << Time.now.strftime('%Y%m%d%H%M%S') - - if Rails.env.production? || Rails.env.staging? - Rake::Task["tire:import"].invoke - else - klass.rebuild_index(new_index) - end - - puts '[IMPORT] about to swap index' - if a = Tire::Alias.find(klass.tire.index.name) - puts "[IMPORT] aliases found: #{Tire::Alias.find(klass.tire.index.name).indices.to_ary.join(',')}. deleting." - old_indices = Tire::Alias.find(klass.tire.index.name).indices - old_indices.each do |index| - a.indices.delete index - end - a.indices.add new_index - a.save - old_indices.each do |index| - puts "[IMPORT] deleting index: #{index}" - i = Tire::Index.new(index) - i.delete if i.exists? - end - else - puts "[IMPORT] no aliases found. deleting index. creating new one and setting up alias." - klass.tire.index.delete - a = Tire::Alias.new - a.name(klass.tire.index.name) - a.index(new_index) - a.save - puts "Saved alias #{klass.tire.index.name} pointing to #{new_index}" - end - - puts "[IMPORT] done. Index: '#{new_index}' created." - end - end - - desc 'Tap. Tap. Is this thing on?' - task :ping do - system('curl -X GET "http://cw-proxy.herokuapp.com/production/protip/_search?from=0&page=1&per_page=16&size=16&pretty=true" -d \'{"query":{"query_string":{"query":"flagged:false ","default_operator":"AND"}},"sort":[[{"popular_score":"desc"}]],"size":16,"from":0}\'') - end - - # PRODUCTION: RUNS DAILY - desc 'Sychronize index of the protips between the database and ElasticSearch' - task :sync => :environment do - number_of_protips_in_index = Protip.tire.search { query { all } }.total - number_of_protips_in_database = Protip.count - - if number_of_protips_in_index != number_of_protips_in_database - protips_in_index = Protip.tire.search do - size number_of_protips_in_index - query { all } - end.map { |protip| protip.id.to_i } - - protips_in_database = Protip.select(:id).map(&:id) - - #now that we know the sets in db and index, calculate the missing records - nonexistent_protips = (protips_in_index - protips_in_database) - unindexed_protips = (protips_in_database - protips_in_index) - - nonexistent_protips.each do |nonexistent_protip_id| - Protip.index.remove({'_id' => nonexistent_protip_id, '_type' => 'protip'}) - end - - unindexed_protips.each do |unindexed_protip_id| - enqueue(IndexProtip, unindexed_protip_id) - end - - puts "removed #{nonexistent_protips.count} protips and added #{unindexed_protips.count} protips" - end - end - - desc 'Index the protips for a given Network' - task :index_network => :environment do - unless ENV['NETWORK'].blank? - network = Network.find_by_slug(ENV['NETWORK']) - network.protips.select(:id).each do |protip| - enqueue(ProcessProtip, :recalculate_score, protip.id) - end - end - end -end diff --git a/lib/tasks/teams.rake b/lib/tasks/teams.rake deleted file mode 100644 index fddf6d86..00000000 --- a/lib/tasks/teams.rake +++ /dev/null @@ -1,119 +0,0 @@ -namespace :teams do - include ResqueSupport::Basic - - task :suspend_payment => :environment do - puts "Suspending #{ENV['slug']}" - t = Team.where(:slug => ENV['slug']).first - t.account.stripe_customer_token = nil - t.account.suspend! - t.valid_jobs = false - t.monthly_subscription = false - t.paid_job_posts = 0 - t.save! - end - - task :leadgen => :environment do - require 'csv' - CSV.open(filename = 'elasticsales.csv', 'w') do |csv| - csv << header_row = ['Team Name', 'Team URL', 'Name', 'Title', 'Email', 'Profile', 'Score', 'Last Visit', 'Last Email', 'Joined', 'Login Count', 'Country', 'City', 'Receives Newsletter'] - Team.all.each do |team| - if team.number_of_completed_sections(remove_protips = 'protips') >= 3 && !team.hiring? - puts "Processing: #{team.name}" - team.team_members.each do |m| - csv << [team.name, "https://coderwall.com/team/#{team.slug}", - m.display_name, - m.title, - m.email, - "https://coderwall.com/#{m.username}", - m.score_cache.to_i, - m.last_request_at, - m.last_email_sent, - m.created_at, - m.login_count, - m.country, - m.city, - m.receive_newsletter] - end - end - end - end - end - - task :killleaderboard => :environment do - REDIS.del(Team::LEADERBOARD_KEY) - end - - # PRODUCTION: RUNS DAILY - task :refresh => [:recalculate] - - task :recalculate => :environment do - Team.all.each do |team| - enqueue(ProcessTeam, :recalculate, team.id) - end - end - - task :reindex => :environment do - enqueue(ProcessTeam, :reindex, Team.first.id) - end - - task :expire_jobs => :environment do - Team.featured.each do |team| - unless team.premium? - enqueue(DeactivateTeamJobs, team.id.to_s) - end - end - end - - namespace :hiring do - - task :coderwall => :environment do - # {$or:[{"website": /career|job|hiring/i}, {"about": /career|job|hiring/i}]} - matcher = /career|job|hiring/i - matching = [] - [Team.where(:website => matcher).all, - Team.where(:about => matcher).all].flatten.each do |team| - matching << team - puts "#{team.name}: http://coderwall.com/team/#{team.slug}" - end - end - - task :authenticjobs => :environment do - 0.upto(10) do |page| - positions = JSON.parse(RestClient.get("http://www.authenticjobs.com/filter.php?page=#{page}&page_size=50&location=&onlyremote=0&search=&category=0&types=1%2C2%2C3%2C4")) - positions['listings'].each do |position| - company = position['company'] - team = Team.where(:name => /#{company}/i).first - fields = [scrub(company)] - fields << (team.nil? ? nil : "http://coderwall/team/#{team.slug}") - fields << scrub(position['title']) - fields << scrub(position['loc']) - fields << DateTime.strptime(position['post_date'].to_s, '%s').to_s.split('T').first - fields << "http://www.authenticjobs.com/#{position['url_relative']}" - puts fields.join(', ') - end - end - end - - task :github => :environment do - # positions = Nokogiri::HTML(open('https://jobs.github.com/positions')) - 0.upto(5) do |page| - positions = JSON.parse(RestClient.get("https://jobs.github.com/positions.json?page=#{page}")) - positions.each do |position| - company = position['company'] - team = Team.where(:name => /#{company}/i).first - fields = [scrub(company)] - fields << (team.nil? ? nil : "http://coderwall/team/#{team.slug}") - fields << scrub(position['title']) - fields << scrub(position['location']) - fields << position['created_at'] - fields << position['url'] - puts fields.join(', ') - end - end - end - - def scrub(val) - val.gsub(/, |,/, ' - ') - end - end -end diff --git a/lib/tasks/top_users.rake b/lib/tasks/top_users.rake index ccea75c4..7f3a8e38 100644 --- a/lib/tasks/top_users.rake +++ b/lib/tasks/top_users.rake @@ -1,11 +1,12 @@ +# TODO: The underlying job is broken namespace :top_users do task :generate => :environment do - GenerateTopUsersComposite.perform + GenerateTopUsersCompositeJob.new.perform end namespace :generate do task :async => :environment do - Resque.enqueue GenerateTopUsersComposite + GenerateTopUsersCompositeJob.perform_async end end -end \ No newline at end of file +end diff --git a/lib/templates/erb/humans.txt.erb b/lib/templates/erb/humans.txt.erb new file mode 100644 index 00000000..db01798a --- /dev/null +++ b/lib/templates/erb/humans.txt.erb @@ -0,0 +1,64 @@ +<% + require 'json' + require 'net/http' + require 'uri' + + repo_name = 'assemblymade/coderwall' + + # TODO: Do in native ruby so that errors may be handled + curl_cmd = "curl https://api.github.com/repos/#{repo_name}/contributors" + contributors = JSON.parse(`#{curl_cmd}`).map do |contributor| + JSON.parse(`curl #{contributor['url']}`) + end.reject do |contributor| + %w{just3ws mdeiters whatupdave}.include?(contributor['login']) + end +-%> + + +/* TEAM */ +Founder: Matt Deiters +Contact: mdeiters [at] assembly.com +GitHub: @mdeiters +From: San Francisco, CA, United States + +Core Team/Assembly: Dave Newman +Contact: dave [at] assembly.com +GitHub: @whatupdave +From: San Francisco, CA, United States + +Core Team: Mike Hall +Contact: mike [at] just3ws.com +GitHub: @just3ws +From: Crystal Lake, IL, United States + +<% contributors.each do |contributor| + output = '' + output << "Contributor: #{contributor['name']}\n" + output << "Email: #{contributor['email'].gsub(/@/, ' [at] ')}\n" if contributor['email'].present? + output << "GitHub: @#{contributor['login']}\n" + output << "Location: #{contributor['location']}\n" if contributor['location'].present? +-%> +<%= output %> +<% end -%> + +/* SITE */ +Last update: <%= Date.today.strftime('%Y/%m/%d') %> +Standards: HTML5, CSS3 +Components: Ruby on Rails, jQuery, Sass, Backbone.js, PostgreSQL, ElasticSearch, Redis, etc. +Software: Vim, Tmux, Vagrant, Git, etc. +Language: English +IDE: Vim +Doctype: HTML5 + + ____ _ _ _ + / ___|___ __| | ___ _ ____ ____ _| | | + | | / _ \ / _` |/ _ \ '__\ \ /\ / / _` | | | + | |__| (_) | (_| | __/ | \ V V / (_| | | | + \____\___/ \__,_|\___|_| \_/\_/ \__,_|_|_| + + +Coderwall is a professional network for software engineers. + +We're an open-source company on Assembly. Contribute to Coderwall to earn a stake in the company. + +Join our chat room at https://assembly.com/coderwall. diff --git a/public/404.html b/public/404.html deleted file mode 100644 index b1ec5ed3..00000000 --- a/public/404.html +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title>Y U NO USE REAL URL (404)</title> - <style type="text/css"> - body { - background-color: #fff; - color: #666; - text-align: center; - font-family: arial, sans-serif; - } - - h1 { - padding-top: 100px - } - </style> -</head> -<body> -<h1>404 NOT FOUND</h1> -<img src='/images/y-u-no-guy.jpg'/> - -<h2>Y U NO USE REAL URL?</h2> -<a href='http://coderwall.com'>sorry</a> -</body> -</html> diff --git a/public/500.html b/public/500.html index 60478af1..0de77bce 100644 --- a/public/500.html +++ b/public/500.html @@ -4,11 +4,15 @@ body { font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; + background-color: #f0f0f0; } h1, h2, h3, h4, h5, h6 { color: #5e6469; font-weight: bold; + font-size: 50px; + text-align: center; + margin-top: 30px; } p { @@ -16,29 +20,49 @@ } #container { - width: 750px; + width: 100%; margin: auto; - margin-top: 150px; + margin-top: 20px; text-decoration: none; color: #ff9900; } - a { + .error { + font-size: 200px; + color: #343131; + } + + .error span { + font-weight: 300; + margin-right: -30px; + } + + #badge { + margin-bottom: -40px; + margin-right: -30px; + } + + .links { + text-align: center; + margin-bottom: 0px; + font-size: 30px; + } + + p.links a { color: #ff9900; - margin-right: 20px; + margin:0px 20px; } + </style> <title>coderwall.com : Errors Suck</title> </head> <body> <div id='container'> - <h2>Coderwall broke, sorry.</h2> + <h2>Coderwall had an issue but hold on to your localhosts, we're looking into it.</h2> + <h2 class="error"><img id="badge" src="https://d3levm2kxut31z.cloudfront.net/assets/badges/100lemming-255ce58645c6a62da473027717042e01.png"> <span>|</span> 500</h2> - <p> - <a href='http://coderwall.com'>back to coderwall</a> - <a href='mailto:support@coderwall.com'>contact support</a> - </p> +<p class="links"><a href="/">Protips</a><a href="/jobs">Jobs</a><a href='mailto:support@coderwall.com'>Contact Support</a></p> </div> </body> <script type="text/javascript"> @@ -57,4 +81,4 @@ <h2>Coderwall broke, sorry.</h2> })(); </script> -</html> \ No newline at end of file +</html> diff --git a/public/Icon32X32.png b/public/Icon32X32.png deleted file mode 100644 index 41a9d7fe..00000000 Binary files a/public/Icon32X32.png and /dev/null differ diff --git a/public/Icon48X48.png b/public/Icon48X48.png deleted file mode 100644 index 80fb8c45..00000000 Binary files a/public/Icon48X48.png and /dev/null differ diff --git a/public/apple-touch-icon-152x152-precomposed.png b/public/apple-touch-icon-152x152-precomposed.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/apple-touch-icon-152x152-precomposed.png differ diff --git a/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/apple-touch-icon-precomposed.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/apple-touch-icon.png differ diff --git a/public/fav128x128.png b/public/fav128x128.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/fav128x128.png differ diff --git a/public/fav32x32.png b/public/fav32x32.png new file mode 100644 index 00000000..bef89128 Binary files /dev/null and b/public/fav32x32.png differ diff --git a/public/fav64x64.png b/public/fav64x64.png new file mode 100644 index 00000000..a2e61f21 Binary files /dev/null and b/public/fav64x64.png differ diff --git a/public/fonts/Univers 65 Bold.ttf b/public/fonts/Univers 65 Bold.ttf deleted file mode 100644 index 27e6345a..00000000 Binary files a/public/fonts/Univers 65 Bold.ttf and /dev/null differ diff --git a/public/humans.txt b/public/humans.txt new file mode 100644 index 00000000..1fa35f4d --- /dev/null +++ b/public/humans.txt @@ -0,0 +1,166 @@ +/* TEAM */ +Founder: Matt Deiters +Contact: mdeiters [at] assembly.com +GitHub: @mdeiters +From: San Francisco, CA, United States + +Core Team/Assembly: Dave Newman +Contact: dave [at] assembly.com +GitHub: @whatupdave +From: San Francisco, CA, United States + +Core Team/Assembly: Chris Lloyd +Email: chris [at] assembly.com +GitHub: @chrislloyd +Location: San Francisco, CA, United States + +Core Team: Abdelkader Boudih +Email: terminale [at] googlemail.com +GitHub: @seuros +Location: Morocco + +Core Team: Jonathan Archer +Email: ja [at] jonathanarcher.co +GitHub: @j0narch3r +Location: San Francisco, CA, United States + + +Contributor: Mike Hall +Email: mike [at] just3ws.com +GitHub: @just3ws +Location: Crystal Lake, IL + +Contributor: Rohit Paul Kuruvilla +Email: rohitpaulk [at] live.com +GitHub: @rohitpaulk +Location: Punjab, India + +Contributor: Zane Wolfgang Pickett +Email: Zane.Wolfgang.Pickett [at] Gmail.com +GitHub: @sirwolfgang +Location: United States + +Contributor: Yaro +Email: yaro [at] mail.ru +GitHub: @YaroSpace +Location: Tenerife + +Contributor: Britt Mileshosky +GitHub: @Mileshosky + +Contributor: Nícolas Iensen +Email: nicolas.iensen [at] gmail.com +GitHub: @nicolasiensen +Location: Rio de Janeiro + +Contributor: Dane Lyons +GitHub: @DaneLyons +Location: SF + +Contributor: Matthew Bender +GitHub: @codebender +Location: Denver, CO + +Contributor: Rex Morgan +GitHub: @RexMorgan +Location: Austin, Texas + +Contributor: Wesley Lancel +GitHub: @wesleylancel +Location: Belgium / The Netherlands + +Contributor: Vinoth kumar A +Email: mail [at] avinoth.com +GitHub: @avinoth +Location: India + +Contributor: Silas Sao +Email: silassao [at] gmail.com +GitHub: @sao +Location: Portland, OR + +Contributor: Brandon Fish +GitHub: @bjfish +Location: Minneapolis, MN + +Contributor: Carl Woodward +Email: carl [at] 88cartell.com +GitHub: @carlwoodward +Location: Sydney + +Contributor: Justin Raines +Email: justraines [at] gmail.com +GitHub: @dvito +Location: Washington, DC + +Contributor: Ben +Email: hello [at] benshyong.com +GitHub: @bshyong + +Contributor: Anthony Kosednar +Email: anthony.kosednar [at] gmail.com +GitHub: @akosednar +Location: USA + +Contributor: Aaron Raimist +Email: aaronraimist [at] protonmail.ch +GitHub: @aaronraimist +Location: St. Louis + +Contributor: Daniel Yang +GitHub: @ddyy +Location: Atlanta -> Chicago + +Contributor: Lixon Louis +Email: lixonic [at] gmail.com +GitHub: @lixonic +Location: Cochin, Kerala + +Contributor: Anton Podviaznikov +Email: podviaznikov [at] gmail.com +GitHub: @podviaznikov +Location: San Francisco + +Contributor: Mohamed Alouane +Email: 3louane [at] gmail.com +GitHub: @alouanemed +Location: Morocco + +Contributor: Hector Yee +Email: hector.yee [at] gmail.com +GitHub: @hectorgon +Location: San Francisco, CA + +Contributor: Jake Gavin +Email: jake [at] pco.bz +GitHub: @jakegavin +Location: Seattle + +Contributor: Jon Khaykin +GitHub: @jkhaykin + +Contributor: Drew Blas +GitHub: @drewblas + + +/* SITE */ +Last update: 2015/03/10 +Standards: HTML5, CSS3 +Components: Ruby on Rails, jQuery, Sass, Backbone.js, PostgreSQL, ElasticSearch, Redis, etc. +Software: Vim, Tmux, Vagrant, Git, etc. +Language: English +IDE: Vim +Doctype: HTML5 + + ____ _ _ _ + / ___|___ __| | ___ _ ____ ____ _| | | + | | / _ \ / _` |/ _ \ '__\ \ /\ / / _` | | | + | |__| (_) | (_| | __/ | \ V V / (_| | | | + \____\___/ \__,_|\___|_| \_/\_/ \__,_|_|_| + + +Coderwall is a professional network for software engineers. + +We're an open-source company on Assembly. Contribute to Coderwall to earn a stake in the company. + +Join our chat room at https://assembly.com/coderwall. diff --git a/public/javascripts/jquery.coderwall.js b/public/javascripts/jquery.coderwall.js new file mode 100644 index 00000000..8f53261a --- /dev/null +++ b/public/javascripts/jquery.coderwall.js @@ -0,0 +1,53 @@ +(function ($) { + var CODERWALL_API_URL = "http://coderwall.com/:username.json?source=jqcw&callback=?", + CODERWALL_USER_URL = "http://coderwall.com/:username"; + + var DEFAULTS = { + width: 65, + opacity: 0.8, + orientation: "vertical" + }; + + var LOGO_HTML = "" + + "<div class='coderwall-logo'>" + + " <a href='http://coderwall.com'>" + + " <img src='http://coderwall.com/favicon.png' class='coderwall-icon' />" + + " <div class='coderwall-tag-container'>" + + " <div class='coderwall-tag-name'>Coderwall</div>" + + " </div>" + + " </a>" + + "</div>"; + + $.fn.coderwall = function (opts) { + opts = $.extend({}, DEFAULTS, opts); + + return $(".coderwall").each(function () { + var root = $(this), + username = $(this).attr("data-coderwall-username") || opts.username, + width = $(this).attr("data-coderwall-badge-width") || opts.width, + orientation = $(this).attr("data-coderwall-orientation") || opts.orientation, + url = CODERWALL_API_URL.replace(/:username/, username); + if (!jQuery.isEmptyObject(username)) { + root.addClass("coderwall-root").addClass(orientation); + + $.getJSON(url, function (response) { + $(response.data.badges).each(function () { + var link = $("<a/>").attr({ href: CODERWALL_USER_URL.replace(/:username/, username) }), + img = $("<img/>") + .addClass("coderwall-badge") + .attr({ src: this.badge, width: width, height: width, alt: this.description }); + + link.append(img); + root.append(link); + }); + + root.append(LOGO_HTML); + }); + } + }); + }; + + $(function () { + $(".coderwall").coderwall(); + }); +})(jQuery); \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt index 085187fa..4ecc8d99 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,5 +1,7 @@ -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file -# -# To ban all spiders from the entire site uncomment the next two lines: -# User-Agent: * -# Disallow: / +Sitemap: https://coderwall-assets-0.s3.amazonaws.com/sitemaps/sitemap.xml.gz + +User-agent: * +Disallow: /admin/ + +User-agent: EasouSpider +Disallow: / diff --git a/app/assets/stylesheets/jquery.coderwall.css b/public/stylesheets/jquery.coderwall.css similarity index 94% rename from app/assets/stylesheets/jquery.coderwall.css rename to public/stylesheets/jquery.coderwall.css index 38c93b56..6616379a 100644 --- a/app/assets/stylesheets/jquery.coderwall.css +++ b/public/stylesheets/jquery.coderwall.css @@ -13,12 +13,12 @@ } .coderwall-root.horizontal .coderwall-logo { - margin: 18px 0px 0px 8px; + margin: 18px 0 0 8px; } .coderwall-root .coderwall-logo { float: left; - margin: 14px 0px 0px 0px; + margin: 14px 0 0 0; border-radius: 5px; padding: 8px 10px 8px 8px; background: -webkit-gradient(linear, left top, left bottom, from(#6A7176), to(#4D5256)); diff --git a/public/touch-icon-ipad-retina.png b/public/touch-icon-ipad-retina.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/touch-icon-ipad-retina.png differ diff --git a/public/touch-icon-ipad.png b/public/touch-icon-ipad.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/touch-icon-ipad.png differ diff --git a/public/touch-icon-iphone-retina.png b/public/touch-icon-iphone-retina.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/touch-icon-iphone-retina.png differ diff --git a/public/touch-icon-iphone.png b/public/touch-icon-iphone.png new file mode 100644 index 00000000..1ce85958 Binary files /dev/null and b/public/touch-icon-iphone.png differ diff --git a/run.bat b/run.bat new file mode 100644 index 00000000..2644ec96 --- /dev/null +++ b/run.bat @@ -0,0 +1,2 @@ +vagrant up +vagrant ssh -c ". /home/vagrant/web/vagrant/run" diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..8b482150 --- /dev/null +++ b/run.sh @@ -0,0 +1,39 @@ +vagrant up +vagrant ssh -c ". /home/vagrant/web/vagrant/run" + +#export DOCKER_HOST=tcp://192.168.59.103:2376 +#echo $DOCKER_HOST + +#export DOCKER_CERT_PATH=/Users/mike/.boot2docker/certs/boot2docker-vm +#echo $DOCKER_CERT_PATH + +#export DOCKER_TLS_VERIFY=1 +#echo $DOCKER_TLS_VERIFY + +#export REDIS_URL=redis://$(echo $DOCKER_HOST | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'):6379 +#echo $REDIS_URL + +#export POSTGRES_URL=postgres://postgres@$(echo $DOCKER_HOST | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'):5432/postgres +#echo $POSTGRES_URL + +#export MONGO_URL=mongodb://$(echo $DOCKER_HOST | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'):27017/badgify +#echo $MONGO_URL + +#export DOCKER_DATABASE_URL=$POSTGRES_URL +#echo $DOCKER_DATABASE_URL + +#fig build postgres redis mongo +#fig up -d postgres redis mongo + +#rvm use ruby@coderwall --install --create +#bundle check || bundle install + +#export RAILS_ENV=development +#export RACK_ENV=development + +#bundle exec rake db:drop +#bundle exec rake db:create +#bundle exec rake db:migrate +#bundle exec rake db:test:prepare + +#bundle exec rails server webrick -p 3000 diff --git a/script/ide b/script/ide index 8b17a0d8..6ac06c9b 100755 --- a/script/ide +++ b/script/ide @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Define session name @@ -6,9 +6,11 @@ SESSION=coderwall # Go to working directory -cd ~/assemblymade/coderwall +cd $HOME/assemblymade/coderwall -vagrant up --no-provision +rvm current + +vagrant up # Session Exists? @@ -20,6 +22,13 @@ if [ $? -eq 0 ]; then exit 0; fi +rm -rf log/*.log +rm -rf tmp/cache + +bundle check || bundle install +bundle clean --force +bundle exec spring binstub --all + # Pre-flight Configuration tmux -2 new-session -d -s $SESSION @@ -27,7 +36,8 @@ tmux -2 new-session -d -s $SESSION # Create windows tmux new-window -t $SESSION:1 -n "code" tmux new-window -t $SESSION:2 -n "web" -tmux new-window -t $SESSION:3 -n "background jobs" +tmux new-window -t $SESSION:3 -n "sidekiq" +tmux new-window -t $SESSION:4 -n "clock" # Define window roles @@ -47,23 +57,19 @@ tmux send-keys "clear ; bundle exec guard -c -g rspec" C-m # Web tmux select-window -t $SESSION:2 tmux select-pane -t 0 -tmux send-keys "clear ; env bin/rails server webrick -p3000" C-m +tmux send-keys "clear ; bundle exec rails server webrick -p3000" C-m +#tmux send-keys "clear ; bundle exec puma -C ./config/puma.rb" C-m -# Background Jobs +# Sidekiq tmux select-window -t $SESSION:3 -tmux split-window -v -tmux split-window -v -tmux split-window -v -tmux select-layout even-vertical +tmux select-pane -t 0 +tmux send-keys "clear ; bundle exec sidekiq -C ./config/sidekiq.yml" C-m +# Clock +tmux select-window -t $SESSION:4 tmux select-pane -t 0 -tmux send-keys "clear ; env QUEUE=CRITICAL,HIGH,MEDIUM,LOW,LOWER bin/rake resque:work" C-m -tmux select-pane -t 1 -tmux send-keys "clear ; env bin/rake resque:scheduler" C-m -tmux select-pane -t 2 -tmux send-keys "clear ; env QUEUE=REFRESH bin/rake resque:work" C-m -tmux select-pane -t 3 -tmux send-keys "clear ; env QUEUE=mailer,digest_mailer bin/rake resque:work" C-m +tmux send-keys "clear ; bundle exec clockwork app/clock.rb" C-m + # Set the initial working window tmux select-window -t $SESSION:1 diff --git a/script/rails b/script/rails index bd79dce5..f8da2cff 100755 --- a/script/rails +++ b/script/rails @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. -APP_PATH = File.expand_path('../../config/application', __FILE__) -require File.expand_path('../../config/boot', __FILE__) +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' diff --git a/spec/controllers/accounts_controller_spec.rb b/spec/controllers/accounts_controller_spec.rb index ac9575d4..fad922cd 100644 --- a/spec/controllers/accounts_controller_spec.rb +++ b/spec/controllers/accounts_controller_spec.rb @@ -1,15 +1,17 @@ -describe AccountsController do - let(:team) { Fabricate(:team) } - let(:plan) { Plan.create(amount: 20000, interval: Plan::MONTHLY, name: 'Monthly') } +require 'spec_helper' + +RSpec.describe AccountsController, type: :controller, skip: true do + let(:team) { Fabricate(:team, account: nil) } + let(:plan) { Plan.create(amount: 20_000, interval: Plan::MONTHLY, name: 'Monthly') } let(:current_user) { Fabricate(:user) } - before { - team.add_user(current_user) + before do + team.add_member(current_user) controller.send :sign_in, current_user - } + end def new_token - Stripe::Token.create(card: { number: 4242424242424242, cvc: 224, exp_month: 12, exp_year: 14 }).try(:id) + Stripe::Token.create(card: { number: 4_242_424_242_424_242, cvc: 224, exp_month: 12, exp_year: 14 }).try(:id) end def valid_params @@ -20,9 +22,48 @@ def valid_params end it 'should create an account and send email' do - post :create, { team_id: team.id, account: valid_params } - ActionMailer::Base.deliveries.size.should == 1 - ActionMailer::Base.deliveries.first.body.encoded.should include(team.name) - ActionMailer::Base.deliveries.first.body.encoded.should include(plan.name) + # TODO: Refactor API call to Sidekiq Job + VCR.use_cassette('AccountsController') do + + post :create, team_id: team.id, account: valid_params + expect(ActionMailer::Base.deliveries.size).to eq(1) + expect(ActionMailer::Base.deliveries.first.body.encoded).to include(team.name) + expect(ActionMailer::Base.deliveries.first.body.encoded).to include(plan.name) + + end + end + + describe '#send_inovice' do + before do + team.account = Account.new + + allow(Team).to receive(:find) { team } + allow(team.account).to receive(:send_invoice_for) { true } + allow(team.account).to receive(:admin) { current_user } + + allow(Time).to receive(:current) { Date.parse('02/11/15').to_time } # so we do not bother with the time portion of the day + end + + it 'calls send_invoice for the last month' do + expect(team.account).to receive(:send_invoice_for).with(Date.parse('02/10/15').to_time) + get :send_invoice, id: '123' + end + + it 'displays success message' do + get :send_invoice, id: '123' + expect(flash[:notice]).to eq("sent invoice for October to #{current_user.email}") + end + + it 'redirects to team profile' do + get :send_invoice, id: '123' + expect(response).to redirect_to(teamname_path(slug: team.slug)) + end + + it 'displays failure message' do + allow(team.account).to receive(:send_invoice_for) { false } + get :send_invoice, id: '123' + expect(flash[:error]).to eq('There was an error in sending an invoice') + end + end end diff --git a/spec/controllers/achievements_controller_spec.rb b/spec/controllers/achievements_controller_spec.rb index e6660005..3a751a8f 100644 --- a/spec/controllers/achievements_controller_spec.rb +++ b/spec/controllers/achievements_controller_spec.rb @@ -1,32 +1,32 @@ require 'spec_helper' -describe AchievementsController do +RSpec.describe AchievementsController, type: :controller, skip: true do describe 'awarding badges' do - let(:api_key) { "abcd" } + let(:api_key) { 'abcd' } - it 'should award 24pullrequests badges' do - api_access = Fabricate(:api_access, api_key: api_key, awards: %w(TwentyFourPullRequestsParticipant2012 TwentyFourPullRequestsContinuous2012)) - participant = Fabricate(:user, github: "bashir") - post :award, badge: 'TwentyFourPullRequestsParticipant2012', date: '12/24/2012', github: participant.github, api_key: api_key - participant.badges.count.should == 1 - participant.badges.first.is_a? TwentyFourPullRequestsParticipant2012 - post :award, badge: 'TwentyFourPullRequestsContinuous2012', date: '12/24/2012', github: participant.github, api_key: api_key - participant.badges.count.should == 2 - participant.badges.last.is_a? TwentyFourPullRequestsContinuous2012 - end + it 'should award 24pullrequests badges' do + api_access = Fabricate(:api_access, api_key: api_key, awards: %w(TwentyFourPullRequestsParticipant2012 TwentyFourPullRequestsContinuous2012)) + participant = Fabricate(:user, github: 'bashir') + post :award, badge: 'TwentyFourPullRequestsParticipant2012', date: '12/24/2012', github: participant.github, api_key: api_key + expect(participant.badges.count).to eq(1) + participant.badges.first.is_a? TwentyFourPullRequestsParticipant2012 + post :award, badge: 'TwentyFourPullRequestsContinuous2012', date: '12/24/2012', github: participant.github, api_key: api_key + expect(participant.badges.count).to eq(2) + participant.badges.last.is_a? TwentyFourPullRequestsContinuous2012 + end - it 'should fail to allow awards with no api key' do - api_access = Fabricate(:api_access, api_key: api_key, awards: %w(TwentyFourPullRequestsParticipant2012 TwentyFourPullRequestsContinuous2012)) - participant = Fabricate(:user, github: "bashir") - post :award, badge: 'TwentyFourPullRequestsParticipant2012', date: '12/24/2012', github: participant.github - participant.badges.count.should == 0 - end + it 'should fail to allow awards with no api key' do + api_access = Fabricate(:api_access, api_key: api_key, awards: %w(TwentyFourPullRequestsParticipant2012 TwentyFourPullRequestsContinuous2012)) + participant = Fabricate(:user, github: 'bashir') + post :award, badge: 'TwentyFourPullRequestsParticipant2012', date: '12/24/2012', github: participant.github + expect(participant.badges.count).to eq(0) + end - it 'should fail to allow awards if api_key does not have award privileges for the requested badge' do - api_access = Fabricate(:api_access, api_key: api_key, awards: %w(TwentyFourPullRequestsParticipant2012 TwentyFourPullRequestsContinuous2012)) - participant = Fabricate(:user, github: "bashir") - post :award, badge: 'SomeRandomBadge', date: '12/24/2012', github: participant.github, api_key: api_key - participant.badges.count.should == 0 - end - end -end \ No newline at end of file + it 'should fail to allow awards if api_key does not have award privileges for the requested badge' do + api_access = Fabricate(:api_access, api_key: api_key, awards: %w(TwentyFourPullRequestsParticipant2012 TwentyFourPullRequestsContinuous2012)) + participant = Fabricate(:user, github: 'bashir') + post :award, badge: 'SomeRandomBadge', date: '12/24/2012', github: participant.github, api_key: api_key + expect(participant.badges.count).to eq(0) + end + end +end diff --git a/spec/controllers/bans_controller_spec.rb b/spec/controllers/bans_controller_spec.rb new file mode 100644 index 00000000..4be46a44 --- /dev/null +++ b/spec/controllers/bans_controller_spec.rb @@ -0,0 +1,19 @@ +RSpec.describe BansController, type: :controller, skip: true do + + def valid_session + {} + end + + describe 'POST create' do + it_behaves_like 'admin controller with #create' + + it 'bans a user' do + user = Fabricate(:user, admin: true) + controller.send :sign_in, user + post :create, { user_id: user.id }, valid_session + + expect(user.reload.banned?).to eq(true) + end + end + +end diff --git a/spec/controllers/blog_posts_controller_spec.rb b/spec/controllers/blog_posts_controller_spec.rb deleted file mode 100644 index 093e055e..00000000 --- a/spec/controllers/blog_posts_controller_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -describe BlogPostsController do - - describe 'GET /blog/:id' do - it 'should retrieve the post for the given id' do - BlogPost.stub(:find) { double(text: 'Some text') } - get :show, id: '2011-07-22-gaming-the-game' - assigns(:blog_post).text.should == 'Some text' - end - end - - describe 'GET /blog' do - it 'should retrieve a list of all posts' do - BlogPost.stub(:all) { [double(text: 'Some text', public?: true)] } - get :index - assigns(:blog_posts).size.should == 1 - assigns(:blog_posts).first.text.should == 'Some text' - end - end -end diff --git a/spec/controllers/callbacks/hawt_controller_spec.rb b/spec/controllers/callbacks/hawt_controller_spec.rb index bd8b3a76..5e2ac93c 100644 --- a/spec/controllers/callbacks/hawt_controller_spec.rb +++ b/spec/controllers/callbacks/hawt_controller_spec.rb @@ -1,26 +1,24 @@ # encoding: utf-8 -require 'services/protips/hawt_service' -describe Callbacks::HawtController do +RSpec.describe Callbacks::HawtController, type: :controller do include AuthHelper before { http_authorize!(Rails.env, Rails.env) } let(:current_user) { Fabricate(:user, admin: true) } - let(:protip) { + let(:protip) do Protip.create!( title: 'hello world', body: 'somethings that\'s meaningful and nice', - topics: ['java', 'javascript'], + topics: %w(java javascript), user_id: current_user.id ) - } + end describe 'GET \'feature\'', pending: 'fixing the test auth' do it 'returns http success' do - Services::Protips::HawtService.any_instance.should_receive(:feature!).with(protip.id, true) - post 'feature', { protip_id: protip.id, hawt?: true, token: 'atoken' } - ap response.status - response.should be_success + expect_any_instance_of(HawtService).to receive(:feature!).with(protip.id, true) + post 'feature', protip_id: protip.id, hawt?: true, token: 'atoken' + expect(response).to be_success end end diff --git a/spec/controllers/emails_controller_spec.rb b/spec/controllers/emails_controller_spec.rb index 834828fc..6141854d 100644 --- a/spec/controllers/emails_controller_spec.rb +++ b/spec/controllers/emails_controller_spec.rb @@ -1,36 +1,35 @@ -describe EmailsController do - let(:mailgun_params) { { +RSpec.describe EmailsController, type: :controller, skip: true do + let(:mailgun_params) do { 'domain' => ENV['MAILGUN_DOMAIN'], 'tag' => '*', 'recipient' => 'someone@example.com', 'event' => 'unsubscribed', - 'email_type' => Notifier::ACTIVITY_EVENT, + 'email_type' => NotifierMailer::ACTIVITY_EVENT, 'timestamp' => '1327043027', 'token' => ENV['MAILGUN_TOKEN'], 'signature' => ENV['MAILGUN_SIGNATURE'], 'controller' => 'emails', - 'action' => 'unsubscribe'} - } + 'action' => 'unsubscribe' } + end it 'unsubscribes member from notifications when they unsubscribe from a notification email on mailgun' do user = Fabricate(:user, email: 'someone@example.com') - user.notify_on_award.should == true - EmailsController.any_instance.should_receive(:encrypt_signature).and_return(ENV['MAILGUN_SIGNATURE']) + expect(user.notify_on_award).to eq(true) + expect_any_instance_of(EmailsController).to receive(:encrypt_signature).and_return(ENV['MAILGUN_SIGNATURE']) post :unsubscribe, mailgun_params user.reload - user.notify_on_award.should == false - user.receive_newsletter.should == true + expect(user.notify_on_award).to eq(false) + expect(user.receive_newsletter).to eq(true) end it 'unsubscribes member from everything when they unsubscribe from a welcome email on mailgun' do user = Fabricate(:user, email: 'someone@example.com') new_params = mailgun_params - new_params["email_type"] = Notifier::WELCOME_EVENT - EmailsController.any_instance.should_receive(:encrypt_signature).and_return(ENV['MAILGUN_SIGNATURE']) + new_params['email_type'] = NotifierMailer::WELCOME_EVENT + expect_any_instance_of(EmailsController).to receive(:encrypt_signature).and_return(ENV['MAILGUN_SIGNATURE']) post :unsubscribe, mailgun_params user.reload - user.notify_on_award.should == true - user.receive_newsletter.should == false + expect(user.notify_on_award).to eq(true) + expect(user.receive_newsletter).to eq(false) end - end diff --git a/spec/controllers/endorsements_controller_spec.rb b/spec/controllers/endorsements_controller_spec.rb index 74ca79d6..48197b40 100644 --- a/spec/controllers/endorsements_controller_spec.rb +++ b/spec/controllers/endorsements_controller_spec.rb @@ -1,5 +1,5 @@ require 'spec_helper' -describe EndorsementsController do +RSpec.describe EndorsementsController, type: :controller do end diff --git a/spec/controllers/events_controller_spec.rb b/spec/controllers/events_controller_spec.rb deleted file mode 100644 index 79df3483..00000000 --- a/spec/controllers/events_controller_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe EventsController do - -end diff --git a/spec/controllers/highlights_controller_spec.rb b/spec/controllers/highlights_controller_spec.rb deleted file mode 100644 index df29f98f..00000000 --- a/spec/controllers/highlights_controller_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe HighlightsController do - -end diff --git a/spec/controllers/invitations_controller_spec.rb b/spec/controllers/invitations_controller_spec.rb index 50f764f2..0cd9391b 100644 --- a/spec/controllers/invitations_controller_spec.rb +++ b/spec/controllers/invitations_controller_spec.rb @@ -1,12 +1,60 @@ require 'spec_helper' -describe InvitationsController do +RSpec.describe InvitationsController, type: :controller, skip: true do it 'should capture referred by when viewing team invitation' do user = Fabricate(:user, referral_token: 'asdfasdf') team = Fabricate(:team) get :show, id: team.id, r: user.referral_token - session[:referred_by].should == 'asdfasdf' + expect(session[:referred_by]).to eq('asdfasdf') end -end \ No newline at end of file + describe 'GET invitations#show' do + + let(:current_user) { Fabricate(:user) } + let(:team) { Fabricate(:team) } + + describe 'logged in' do + before { controller.send :sign_in, current_user } + + it 'should render invitation page successfully with valid referral' do + allow(Team).to receive(:find).with(team.id).and_return(team) + allow(team).to receive(:has_user_with_referral_token?).and_return(true) + + get :show, id: team.id + expect(assigns(:team)).to eq(team) + expect(response).to render_template('invitations/show') + end + + it 'should redirect to root_url with invalid referral' do + allow(Team).to receive(:find).with(team.id).and_return(team) + allow(team).to receive(:has_user_with_referral_token?).and_return(false) + + get :show, id: team.id + expect(response).to redirect_to(root_url) + end + + end + + describe 'logged out' do + it 'should render invitation page successfully with valid referral' do + allow(Team).to receive(:find).with(team.id).and_return(team) + allow(team).to receive(:has_user_with_referral_token?).and_return(true) + + get :show, id: team.id + expect(assigns(:team)).to eq(team) + expect(response).to render_template('invitations/show') + end + + it 'should redirect to root_url with invalid referral' do + allow(Team).to receive(:find).with(team.id).and_return(team) + allow(team).to receive(:has_user_with_referral_token?).and_return(false) + + get :show, id: team.id + expect(response).to redirect_to(root_url) + end + end + + end + +end diff --git a/spec/controllers/links_controller_spec.rb b/spec/controllers/links_controller_spec.rb deleted file mode 100644 index 5e661185..00000000 --- a/spec/controllers/links_controller_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe LinksController do - -end diff --git a/spec/controllers/members_controller_spec.rb b/spec/controllers/members_controller_spec.rb new file mode 100644 index 00000000..c01638d5 --- /dev/null +++ b/spec/controllers/members_controller_spec.rb @@ -0,0 +1,28 @@ +require 'spec_helper' + +RSpec.describe MembersController, type: :controller, skip: true do + let(:current_user) { Fabricate(:user) } + let(:invitee) { Fabricate(:user) } + let(:team) { Fabricate(:team) } + before { controller.send :sign_in, current_user } + + describe 'DELETE #destroy' do + it 'should remove the team member from the current users team' do + member_added = team.add_member(invitee) + team.add_member(current_user) + + controller.send(:current_user).reload + delete :destroy, team_id: team.id, id: member_added.id + + expect(team.reload).not_to have_member(invitee) + expect(response).to redirect_to(teamname_url(slug: current_user.team.slug)) + end + + it 'redirects back to leader board when you remove yourself' do + member = team.add_member(current_user) + controller.send(:current_user).reload + delete :destroy, team_id: team.id, id: member.id + expect(response).to redirect_to(teams_url) + end + end +end diff --git a/spec/controllers/networks_controller_spec.rb b/spec/controllers/networks_controller_spec.rb new file mode 100644 index 00000000..9738b701 --- /dev/null +++ b/spec/controllers/networks_controller_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe NetworksController, type: :controller do + pending 'Add tests for join and leave' +end diff --git a/spec/controllers/opportunity_controlller_spec.rb b/spec/controllers/opportunity_controlller_spec.rb new file mode 100644 index 00000000..7220f3b1 --- /dev/null +++ b/spec/controllers/opportunity_controlller_spec.rb @@ -0,0 +1,62 @@ +require 'spec_helper' + +RSpec.describe OpportunitiesController, type: :controller do + + describe "GET index" do + it "should respond with 200" do + get :index + expect(response.status).to eq(200) + end + + it "should render the opportunities index template with jobs layout" do + get :index + expect(response).to render_template(['opportunities/index', 'layouts/jobs']) + end + + context "when it's filtered" do + context "by remote opportunities" do + before(:all) { @opportunity1 = Fabricate(:opportunity, remote: true, location: "Anywhere") } + + it "should assign the remote opportunities to @jobs" do + get :index, location: nil, remote: 'true' + expect(assigns(:jobs)).to be_include(@opportunity1) + end + end + + context "by query" do + before(:all) { @opportunity2 = Fabricate(:opportunity, remote: true, location: "Anywhere", location_city: "San Francisco") } + + it "should assign the remote opportunities to @jobs which have the keyword 'senior rails' [attr: name]" do + get :index, location: nil, q: 'senior rails' + expect(assigns(:jobs)).to be_include(@opportunity2) + end + + it "should assign the remote opportunities to @jobs which have the keyword 'underpinnings' [attr: description]" do + get :index, location: nil, q: 'underpinnings' + expect(assigns(:jobs)).to be_include(@opportunity2) + end + + it "should assign the remote opportunities to @jobs which have the keyword 'jquery' [attr: tag]" do + get :index, location: nil, q: 'jquery' + expect(assigns(:jobs)).to be_include(@opportunity2) + end + + it "should NOT assign the remote opportunities to @jobs which have the keyword dev-ops" do + get :index, location: nil, q: 'dev-ops' + expect(assigns(:jobs)).to_not be_include(@opportunity2) + end + end + + context "by query with keywords containing regexp special characters" do + it "should NOT fail when querying with keywords containing '+'" do + get :index, location: nil, q: 'C++' + expect(assigns(:jobs)) + end + it "should NOT fail when querying with keywords containing '.^$*+?()[{\|'" do + get :index, location: nil, q: 'java .^$*+?()[{\|' + expect(assigns(:jobs)) + end + end + end + end +end diff --git a/spec/controllers/pages_controller_spec.rb b/spec/controllers/pages_controller_spec.rb index 9f92a06b..9a802386 100644 --- a/spec/controllers/pages_controller_spec.rb +++ b/spec/controllers/pages_controller_spec.rb @@ -1,24 +1,21 @@ require 'spec_helper' -describe PagesController do +RSpec.describe PagesController, type: :controller do + let(:unregistered_user) { Fabricate(:user, state: User::REGISTRATION) } + it 'should be able to access privacy policy while user is logged in but not registered' do - unregisterd_user = Fabricate(:user, state: User::REGISTRATION) - controller.send :sign_in, unregisterd_user + controller.send :sign_in, unregistered_user get :show, page: 'tos', layout: 'application' - response.should be_success + expect(response).to be_success end it 'fails when presented an non-whitelisted page' do - unregisterd_user = Fabricate(:user, state: User::REGISTRATION) - controller.send :sign_in, unregisterd_user - - expect { get :show, page: 'IMNOTREAL' }.to raise_error 'Invalid page: IMNOTREAL' + controller.send :sign_in, unregistered_user + expect { get :show, page: 'IMNOTREAL' }.to raise_error ActionController::RoutingError end it 'fails when presented an non-whitelisted layout' do - unregisterd_user = Fabricate(:user, state: User::REGISTRATION) - controller.send :sign_in, unregisterd_user - - expect { get :show, page: 'tos', layout: 'IMNOTREAL' }.to raise_error 'Invalid layout: IMNOTREAL' + controller.send :sign_in, unregistered_user + expect { get :show, page: 'tos', layout: 'IMNOTREAL' }.to raise_error ActionController::RoutingError end end diff --git a/spec/controllers/protips_controller_spec.rb b/spec/controllers/protips_controller_spec.rb index 77a2c484..24b842e6 100644 --- a/spec/controllers/protips_controller_spec.rb +++ b/spec/controllers/protips_controller_spec.rb @@ -1,177 +1,212 @@ -describe ProtipsController do +RSpec.describe ProtipsController, type: :controller do let(:current_user) { Fabricate(:user) } before { controller.send :sign_in, current_user } def valid_attributes { - title: "hello world", - body: "somethings that's meaningful and nice", - topics: ["java", "javascript"], - user_id: current_user.id + title: 'hello world', + body: "somethings that's meaningful and nice", + topic_list: "java, javascript", + user_id: current_user.id } end - def valid_session - {} + describe 'GET user' do + describe 'banned' do + it 'should assign user @protips for page, despite not being in search index' do + current_user.update_attribute(:banned_at, Time.now) + expect(current_user.banned?).to eq(true) + Protip.rebuild_index + protip = Protip.create! valid_attributes + get :user, { username: current_user.username } + expect(assigns(:protips).first.title).to eq(protip.title) + end + end + + describe 'not banned' do + it 'should assign user @protips for page' do + Protip.rebuild_index + protip = Protip.create! valid_attributes + get :user, { username: current_user.username } + expect(assigns(:protips).results.first.title).to eq(protip.title) + end + end end - describe "GET topic" do - it "assigns all protips as @protips" do - Protip.rebuild_index + # describe "GET topic" do + # it "assigns all protips as @protips" do + # Protip.rebuild_index + # protip = Protip.create! valid_attributes + # get :topic, {tags: "java"} + # expect(assigns(:protips).results.first.title).to eq(protip.title) + # end + # end + + describe 'GET show using public_id' do + it 'redirects to GET show if slug is empty' do + protip = Protip.create! valid_attributes + protip.save + get :show, { id: protip.to_param } + expect(response).to redirect_to slug_protips_path(protip, protip.friendly_id) + end + + it 'redirects to GET show if slug is invalid' do protip = Protip.create! valid_attributes - get :topic, {tags: "java"}, valid_session - assigns(:protips).results.first.title.should eq(protip.title) + protip.save + get :show, { id: protip.to_param, slug: "an_invalid_slug" } + expect(response).to redirect_to slug_protips_path(protip, protip.friendly_id) end end - describe "GET show" do - it "assigns the requested protip as @protip" do + describe 'GET show using slug' do + it 'assigns the requested protip as @protip' do protip = Protip.create! valid_attributes - get :show, {id: protip.to_param}, valid_session - assigns(:protip).should eq(protip) + protip.save + get :show, { id: protip.public_id, slug: protip.friendly_id } + expect(assigns(:protip)).to eq(protip) end end - describe "GET new" do - before { User.any_instance.stub(:skills).and_return(['skill']) } # User must have a skill to create protips + describe 'GET new' do + before { allow_any_instance_of(User).to receive(:skills).and_return(['skill']) } # User must have a skill to create protips - it "assigns a new protip as @protip" do - get :new, {}, valid_session - assigns(:protip).should be_a_new(Protip) + it 'assigns a new protip as @protip' do + get :new, {} + expect(assigns(:protip)).to be_a_new(Protip) end - it "allows viewing the page when you have a skill" do - get :new, {}, valid_session - response.should render_template('new') + it 'allows viewing the page when you have a skill' do + get :new, {} + expect(response).to render_template('new') end it "prevents viewing the page when you don't have a skill" do - User.any_instance.stub(:skills).and_return([]) - get :new, {}, valid_session - response.should redirect_to badge_path(username: current_user.username, anchor: 'add-skill') + allow_any_instance_of(User).to receive(:skills).and_return([]) + get :new, {} + expect(response).to redirect_to badge_path(username: current_user.username, anchor: 'add-skill') end end - describe "GET edit" do - it "assigns the requested protip as @protip" do + describe 'GET edit' do + it 'assigns the requested protip as @protip' do protip = Protip.create! valid_attributes - get :edit, {id: protip.to_param}, valid_session - assigns(:protip).should eq(protip) + get :edit, { id: protip.to_param } + expect(assigns(:protip)).to eq(protip) end end - describe "POST create" do - before { User.any_instance.stub(:skills).and_return(['skill']) } # User must have a skill to create protips + describe 'POST create' do + before { allow_any_instance_of(User).to receive(:skills).and_return(['skill']) } # User must have a skill to create protips - describe "with valid params" do - it "creates a new Protip" do - expect { - post :create, {protip: valid_attributes}, valid_session - }.to change(Protip, :count).by(1) + describe 'with valid params' do + it 'creates a new Protip' do + expect do + post :create, { protip: valid_attributes } + end.to change(Protip, :count).by(1) end - it "assigns a newly created protip as @protip" do - post :create, {protip: valid_attributes}, valid_session - assigns(:protip).should be_a(Protip) - assigns(:protip).should be_persisted + it 'assigns a newly created protip as @protip' do + post :create, { protip: valid_attributes } + expect(assigns(:protip)).to be_a(Protip) + expect(assigns(:protip)).to be_persisted end - it "redirects to the created protip" do - post :create, { protip: valid_attributes }, valid_session - response.should redirect_to(Protip.last) + it 'redirects to the created protip' do + post :create, { protip: valid_attributes } + expect(response).to redirect_to(Protip.last) end end - describe "with invalid params" do - it "assigns a newly created but unsaved protip as @protip" do + describe 'with invalid params' do + it 'assigns a newly created but unsaved protip as @protip' do # Trigger the behavior that occurs when invalid params are submitted - Protip.any_instance.stub(:save).and_return(false) - post :create, {protip: {}}, valid_session - assigns(:protip).should be_a_new(Protip) + allow_any_instance_of(Protip).to receive(:save).and_return(false) + post :create, { protip: {} } + expect(assigns(:protip)).to be_a_new(Protip) end it "re-renders the 'new' template" do # Trigger the behavior that occurs when invalid params are submitted - Protip.any_instance.stub(:save).and_return(false) - post :create, { protip: {} }, valid_session - response.should render_template("new") + allow_any_instance_of(Protip).to receive(:save).and_return(false) + post :create, { protip: {} } + expect(response).to render_template('new') end end it "prevents creating when you don't have a skill" do - User.any_instance.stub(:skills).and_return([]) - post :create, {protip: valid_attributes}, valid_session - response.should redirect_to badge_path(username: current_user.username, anchor: 'add-skill') + allow_any_instance_of(User).to receive(:skills).and_return([]) + post :create, { protip: valid_attributes } + expect(response).to redirect_to badge_path(username: current_user.username, anchor: 'add-skill') end end - describe "PUT update" do - describe "with valid params" do - it "updates the requested protip" do + describe 'PUT update' do + describe 'with valid params' do + it 'updates the requested protip' do protip = Protip.create! valid_attributes # Assuming there are no other protips in the database, this # specifies that the Protip created on the previous line # receives the :update_attributes message with whatever params are # submitted in the request. - Protip.any_instance.should_receive(:update_attributes).with({'body' => 'params'}) - put :update, {id: protip.to_param, protip: {'body' => 'params'}}, valid_session + expect_any_instance_of(Protip).to receive(:update_attributes).with('body' => 'params') + put :update, { id: protip.to_param, protip: { 'body' => 'params' } } end - it "assigns the requested protip as @protip" do + it 'assigns the requested protip as @protip' do protip = Protip.create! valid_attributes - put :update, {id: protip.to_param, protip: valid_attributes}, valid_session - assigns(:protip).should eq(protip) + put :update, { id: protip.to_param, protip: valid_attributes } + expect(assigns(:protip)).to eq(protip) end - it "redirects to the protip" do + it 'redirects to the protip' do protip = Protip.create! valid_attributes - put :update, {id: protip.to_param, protip: valid_attributes}, valid_session - response.should redirect_to(protip) + put :update, { id: protip.to_param, protip: valid_attributes } + expect(response).to redirect_to(protip) end end - describe "with invalid params" do - it "assigns the protip as @protip" do + describe 'with invalid params' do + it 'assigns the protip as @protip' do protip = Protip.create! valid_attributes # Trigger the behavior that occurs when invalid params are submitted - Protip.any_instance.stub(:save).and_return(false) - put :update, {id: protip.to_param, protip: {}}, valid_session - assigns(:protip).should eq(protip) + allow_any_instance_of(Protip).to receive(:save).and_return(false) + put :update, { id: protip.to_param, protip: {} } + expect(assigns(:protip)).to eq(protip) end it "re-renders the 'edit' template" do protip = Protip.create!(valid_attributes) # Trigger the behavior that occurs when invalid params are submitted - Protip.any_instance.stub(:save).and_return(false) + allow_any_instance_of(Protip).to receive(:save).and_return(false) - put :update, { id: protip.to_param, protip: {} }, valid_session - response.should render_template("edit") + put :update, { id: protip.to_param, protip: {} } + expect(response).to render_template('edit') end end end - describe "DELETE destroy" do - it "returns forbidden if current user not owner" do + describe 'DELETE destroy' do + it 'returns forbidden if current user not owner' do attributes = valid_attributes attributes[:user_id] = Fabricate(:user).id protip = Protip.create! attributes - delete :destroy, {id: protip.to_param}, valid_session - lambda { protip.reload }.should_not raise_error + delete :destroy, { id: protip.to_param } + expect { protip.reload }.not_to raise_error end - it "destroys the requested protip" do + it 'destroys the requested protip' do protip = Protip.create! valid_attributes expect { - delete :destroy, {id: protip.to_param}, valid_session + delete :destroy, { id: protip.to_param } }.to change(Protip, :count).by(-1) end it 'redirects to the protips list' do protip = Protip.create!(valid_attributes) - delete :destroy, {id: protip.to_param}, valid_session - response.should redirect_to(protips_url) + delete :destroy, { id: protip.to_param } + expect(response).to redirect_to(protips_url) end end diff --git a/spec/controllers/provider_user_lookups_controller_spec.rb b/spec/controllers/provider_user_lookups_controller_spec.rb new file mode 100644 index 00000000..65020cab --- /dev/null +++ b/spec/controllers/provider_user_lookups_controller_spec.rb @@ -0,0 +1,34 @@ +require 'spec_helper' + +RSpec.describe ProviderUserLookupsController, type: :controller, skip: true do + let(:twitter_username) { 'birdy' } + let(:github_username) { 'birdy' } + let(:linked_in_username) { 'birdy' } + let(:attrs) do + { + twitter: twitter_username, + github: github_username, + linkedin: linked_in_username + } + end + let!(:user) do + Fabricate.create(:user, attrs) + end + + describe 'GET /providers/:provider/:username' do + describe 'known user' do + it 'redirects to the current user for twitter' do + get :show, provider: 'twitter', username: twitter_username + expect(response).to redirect_to(badge_path(user.username)) + end + end + + describe 'unknown user' do + it 'redirects to the current user for twitter' do + get :show, provider: 'twitter', username: 'unknown' + expect(response).to redirect_to(root_path) + expect(flash[:notice]).to eql('User not found') + end + end + end +end diff --git a/spec/controllers/redemptions_controller_spec.rb b/spec/controllers/redemptions_controller_spec.rb deleted file mode 100644 index 3ed556fa..00000000 --- a/spec/controllers/redemptions_controller_spec.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'spec_helper' - -describe RedemptionsController do - - it 'should render page if user not signed in' do - get :show, code: Redemption::STANDFORD_ACM312.code - response.should be_success - end - - describe 'signed in' do - before :each do - sign_in(@current_user = Fabricate(:pending_user, last_request_at: 5.minutes.ago)) - get :show, code: Redemption::STANDFORD_ACM312.code - @current_user.reload - end - - it 'should activate a new user' do - @current_user.should be_active - end - - it 'should redirect the user' do - response.should redirect_to(user_achievement_url(username: @current_user.username, id: @current_user.badges.first.id)) - end - end -end diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index 19907a38..4c5f5439 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -1,35 +1,35 @@ require 'spec_helper' -describe SessionsController do - let(:github_response) { { - "provider" => "github", - "uid" => 1310330, - "info" => {"nickname" => "throwaway1", - "email" => nil, - "name" => nil, - "urls" => {"GitHub" => "https://github.com/throwaway1", "Blog" => nil}}, - "credentials" => {"token" => "59cdff603a4e70d47f0a28b5ccaa3935aaa790cf", "expires" => false}, - "extra" => {"raw_info" => {"owned_private_repos" => 0, - "type" => "User", - "avatar_url" => "https://secure.gravatar.com/avatar/b08ed2199f8a88360c9679a57c4f9305?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", - "created_at" => "2012-01-06T20:49:02Z", - "login" => "throwaway1", - "disk_usage" => 0, - "plan" => {"space" => 307200, - "private_repos" => 0, - "name" => "free", - "collaborators" => 0}, - "public_repos" => 0, - "following" => 0, - "public_gists" => 0, - "followers" => 0, - "gravatar_id" => "b08ed2199f8a88360c9679a57c4f9305", - "total_private_repos" => 0, - "collaborators" => 0, - "html_url" => "https://github.com/throwaway1", - "url" => "https://api.github.com/users/throwaway1", - "id" => 1310330, - "private_gists" => 0}}} } +RSpec.describe SessionsController, type: :controller, skip: true do + let(:github_response) do { + 'provider' => 'github', + 'uid' => 1_310_330, + 'info' => { 'nickname' => 'throwaway1', + 'email' => nil, + 'name' => nil, + 'urls' => { 'GitHub' => 'https://github.com/throwaway1', 'Blog' => nil } }, + 'credentials' => { 'token' => '59cdff603a4e70d47f0a28b5ccaa3935aaa790cf', 'expires' => false }, + 'extra' => { 'raw_info' => { 'owned_private_repos' => 0, + 'type' => 'User', + 'avatar_url' => 'https://secure.gravatar.com/avatar/b08ed2199f8a88360c9679a57c4f9305?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png', + 'created_at' => '2012-01-06T20:49:02Z', + 'login' => 'throwaway1', + 'disk_usage' => 0, + 'plan' => { 'space' => 307_200, + 'private_repos' => 0, + 'name' => 'free', + 'collaborators' => 0 }, + 'public_repos' => 0, + 'following' => 0, + 'public_gists' => 0, + 'followers' => 0, + 'gravatar_id' => 'b08ed2199f8a88360c9679a57c4f9305', + 'total_private_repos' => 0, + 'collaborators' => 0, + 'html_url' => 'https://github.com/throwaway1', + 'url' => 'https://api.github.com/users/throwaway1', + 'id' => 1_310_330, + 'private_gists' => 0 } } } end before :each do OmniAuth.config.test_mode = true end @@ -40,15 +40,15 @@ describe 'tracking code' do it 'applies the exsiting tracking code to a on sign in' do - user = Fabricate(:user, github_id: 1310330, username: 'alreadyauser', tracking_code: nil) + user = Fabricate(:user, github_id: 1_310_330, username: 'alreadyauser', tracking_code: nil) - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:github] = github_response + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] = github_response request.cookies['trc'] = 'asdf' get :create - response.should redirect_to(badge_url(username: 'alreadyauser')) + expect(response).to redirect_to(badge_url(username: 'alreadyauser')) - user.reload.tracking_code.should == 'asdf' + expect(user.reload.tracking_code).to eq('asdf') end it 'updates the tracking code even if the user isnt logged in' do @@ -57,27 +57,27 @@ get :new - response.cookies['trc'].should == 'somethingelse' + expect(response.cookies['trc']).to eq('somethingelse') end it 'updates the tracking code to the one already setup for a user' do request.cookies['trc'] = 'asdf' - user = Fabricate(:user, github_id: 1310330, username: 'alreadyauser', tracking_code: 'somethingelse') - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:github] = github_response + user = Fabricate(:user, github_id: 1_310_330, username: 'alreadyauser', tracking_code: 'somethingelse') + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] = github_response get :create - response.should redirect_to(badge_url(username: 'alreadyauser')) + expect(response).to redirect_to(badge_url(username: 'alreadyauser')) - response.cookies['trc'].should == 'somethingelse' + expect(response.cookies['trc']).to eq('somethingelse') end it 'creates a tracking code when one doesnt exist' do - controller.stub(:mixpanel_cookie).and_return({'distinct_id' => 1234}) - user = Fabricate(:user, github_id: 1310330, username: 'alreadyauser') - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:github] = github_response + allow(controller).to receive(:mixpanel_cookie).and_return('distinct_id' => 1234) + user = Fabricate(:user, github_id: 1_310_330, username: 'alreadyauser') + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] = github_response get :create - response.should redirect_to(badge_url(username: 'alreadyauser')) - response.cookies['trc'].should_not be_blank + expect(response).to redirect_to(badge_url(username: 'alreadyauser')) + expect(response.cookies['trc']).not_to be_blank end end @@ -85,112 +85,112 @@ describe 'github' do it 'redirects user to profile when they already have account' do - user = Fabricate(:user, github_id: 1310330, username: 'alreadyauser') - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:github] = github_response + user = Fabricate(:user, github_id: 1_310_330, username: 'alreadyauser') + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] = github_response get :create - response.should redirect_to(badge_url(username: 'alreadyauser')) + expect(response).to redirect_to(badge_url(username: 'alreadyauser')) end it 'logs oauth response if it is an unexpected structure' do github_response.delete('info') github_response.delete('uid') - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:github] = github_response + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] = github_response get :create - response.should redirect_to(root_url) - flash[:notice].should include("Looks like something went wrong") + expect(response).to redirect_to(root_url) + expect(flash[:notice]).to include('Looks like something went wrong') end it 'sets up a new user and redirects to signup page' do - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:github] = github_response + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] = github_response get :create - response.should redirect_to(new_user_url) + expect(response).to redirect_to(new_user_url) end - it 'redirects back to profile page if user is already signed in' do + it 'redirects back to settings page if user is already signed in' do sign_in(user = Fabricate(:user, username: 'darth')) - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:github] = github_response + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:github] = github_response get :create - flash[:notice].should include('linked') - response.should redirect_to(badge_url(username: 'darth')) + expect(flash[:notice]).to include('linked') + expect(response).to redirect_to(edit_user_url(controller.send :current_user)) end end describe 'twitter' do - let(:twitter_response) { { - "provider" => "twitter", - "uid" => "6271932", - "info" => {"nickname" => "mdeiters", - "name" => "matthew deiters", - "location" => "San Francisco", - "image" => "http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", - "description" => "Dad. Amateur Foodie. Founder Extraordinaire of @coderwall", - "urls" => {"Website" => "http://coderwall.com/mdeiters", "Twitter" => "http://twitter.com/mdeiters"}}, - "credentials" => {"token" => "6271932-8erxrXfJykBNMrvsdCEq5WqKd6FIcO97L9BzvPq7", - "secret" => "8fRS1ZARd6Wm53wvvDwHNrBmZcW0H2aSwmQjuOTHl"}, - "extra" => { - "raw_info" => {"lang" => "en", - "profile_background_image_url" => "http://a2.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg", - "protected" => false, - "time_zone" => "Pacific Time (US & Canada)", - "created_at" => "Wed May 23 21:14:29 +0000 2007", - "profile_link_color" => "0084B4", - "name" => "matthew deiters", - "listed_count" => 27, - "contributors_enabled" => false, - "followers_count" => 375, - "profile_image_url" => "http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", - "utc_offset" => -28800, - "profile_background_color" => "9AE4E8", - "description" => "Dad. Amateur Foodie. Founder Extraordinaire of @coderwall", - "statuses_count" => 720, - "profile_background_tile" => false, - "following" => false, - "verified" => false, - "profile_sidebar_fill_color" => "DDFFCC", - "status" => {"in_reply_to_user_id" => 5446832, - "favorited" => false, "place" => nil, - "created_at" => "Sat Jan 07 01:57:54 +0000 2012", - "retweet_count" => 0, - "in_reply_to_screen_name" => "chrislloyd", - "in_reply_to_status_id_str" => "155460652457148416", - "retweeted" => false, - "in_reply_to_user_id_str" => "5446832", - "geo" => nil, - "in_reply_to_status_id" => 155460652457148416, - "id_str" => "155468169815932928", - "contributors" => nil, - "coordinates" => nil, - "truncated" => false, - "source" => "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", - "id" => 155468169815932928, - "text" => "@minefold @chrislloyd FYI your losing seo juice with a blog sub domain"}, - "default_profile_image" => false, - "friends_count" => 301, - "location" => "San Francisco", - "screen_name" => "mdeiters", - "default_profile" => false, - "profile_background_image_url_https" => "https://si0.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg", - "profile_sidebar_border_color" => "BDDCAD", - "id_str" => "6271932", - "is_translator" => false, - "geo_enabled" => true, - "url" => "http://coderwall.com/mdeiters", - "profile_image_url_https" => "https://si0.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", - "profile_use_background_image" => true, - "favourites_count" => 178, - "id" => 6271932, - "show_all_inline_media" => false, - "follow_request_sent" => false, - "notifications" => false, - "profile_text_color" => "333333"}}} } + let(:twitter_response) do { + 'provider' => 'twitter', + 'uid' => '6271932', + 'info' => { 'nickname' => 'mdeiters', + 'name' => 'matthew deiters', + 'location' => 'San Francisco', + 'image' => 'http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg', + 'description' => 'Dad. Amateur Foodie. Founder Extraordinaire of @coderwall', + 'urls' => { 'Website' => 'http://coderwall.com/mdeiters', 'Twitter' => 'http://twitter.com/mdeiters' } }, + 'credentials' => { 'token' => '6271932-8erxrXfJykBNMrvsdCEq5WqKd6FIcO97L9BzvPq7', + 'secret' => '8fRS1ZARd6Wm53wvvDwHNrBmZcW0H2aSwmQjuOTHl' }, + 'extra' => { + 'raw_info' => { 'lang' => 'en', + 'profile_background_image_url' => 'http://a2.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg', + 'protected' => false, + 'time_zone' => 'Pacific Time (US & Canada)', + 'created_at' => 'Wed May 23 21:14:29 +0000 2007', + 'profile_link_color' => '0084B4', + 'name' => 'matthew deiters', + 'listed_count' => 27, + 'contributors_enabled' => false, + 'followers_count' => 375, + 'profile_image_url' => 'http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg', + 'utc_offset' => -28_800, + 'profile_background_color' => '9AE4E8', + 'description' => 'Dad. Amateur Foodie. Founder Extraordinaire of @coderwall', + 'statuses_count' => 720, + 'profile_background_tile' => false, + 'following' => false, + 'verified' => false, + 'profile_sidebar_fill_color' => 'DDFFCC', + 'status' => { 'in_reply_to_user_id' => 5_446_832, + 'favorited' => false, 'place' => nil, + 'created_at' => 'Sat Jan 07 01:57:54 +0000 2012', + 'retweet_count' => 0, + 'in_reply_to_screen_name' => 'chrislloyd', + 'in_reply_to_status_id_str' => '155460652457148416', + 'retweeted' => false, + 'in_reply_to_user_id_str' => '5446832', + 'geo' => nil, + 'in_reply_to_status_id' => 155_460_652_457_148_416, + 'id_str' => '155468169815932928', + 'contributors' => nil, + 'coordinates' => nil, + 'truncated' => false, + 'source' => "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", + 'id' => 155_468_169_815_932_928, + 'text' => '@minefold @chrislloyd FYI your losing seo juice with a blog sub domain' }, + 'default_profile_image' => false, + 'friends_count' => 301, + 'location' => 'San Francisco', + 'screen_name' => 'mdeiters', + 'default_profile' => false, + 'profile_background_image_url_https' => 'https://si0.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg', + 'profile_sidebar_border_color' => 'BDDCAD', + 'id_str' => '6271932', + 'is_translator' => false, + 'geo_enabled' => true, + 'url' => 'http://coderwall.com/mdeiters', + 'profile_image_url_https' => 'https://si0.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg', + 'profile_use_background_image' => true, + 'favourites_count' => 178, + 'id' => 6_271_932, + 'show_all_inline_media' => false, + 'follow_request_sent' => false, + 'notifications' => false, + 'profile_text_color' => '333333' } } } end it 'does not override a users about if its already set' do - user = Fabricate(:user, twitter_id: 6271932, username: 'alreadyauser', about: 'something original') - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:twitter] = twitter_response + user = Fabricate(:user, twitter_id: 6_271_932, username: 'alreadyauser', about: 'something original') + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:twitter] = twitter_response get :create user.reload - user.about.should_not == 'Dad. Amateur Foodie. Founder Extraordinaire of @coderwall' - user.about.should == 'something original' + expect(user.about).not_to eq('Dad. Amateur Foodie. Founder Extraordinaire of @coderwall') + expect(user.about).to eq('something original') end it 'attempting to link an account already used should notify user' do @@ -198,9 +198,18 @@ current_user = Fabricate(:user, username: 'something') sign_in(current_user) - request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:twitter] = twitter_response + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:twitter] = twitter_response get :create - flash[:error].should include('already associated with a different member') + expect(flash[:error]).to include('already associated with a different member') + end + + it 'successful linking of an account should redirect to settings page' do + user = Fabricate(:user, twitter: 'mdeiters', twitter_id: '6271932') + sign_in(user) + request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:twitter] = twitter_response + get :create + expect(flash[:notice]).to include('linked') + expect(response).to redirect_to(edit_user_url(controller.send :current_user)) end end diff --git a/spec/controllers/skills_controller_spec.rb b/spec/controllers/skills_controller_spec.rb index 29431789..247aa1a2 100644 --- a/spec/controllers/skills_controller_spec.rb +++ b/spec/controllers/skills_controller_spec.rb @@ -1,5 +1,5 @@ require 'spec_helper' -describe SkillsController do +RSpec.describe SkillsController, type: :controller do end diff --git a/spec/controllers/team_members_controller_spec.rb b/spec/controllers/team_members_controller_spec.rb deleted file mode 100644 index b14c9363..00000000 --- a/spec/controllers/team_members_controller_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'spec_helper' - -describe TeamMembersController do - let(:current_user) { Fabricate(:user) } - let(:invitee) { Fabricate(:user) } - let(:team) { Fabricate(:team) } - before { controller.send :sign_in, current_user } - - describe "DELETE #destroy" do - it "should remove the team member from the current users team" do - member_added = team.add_user(invitee) - team.add_user(current_user) - - controller.send(:current_user).reload - delete :destroy, team_id: team.id, id: member_added.id - - team.reload.should_not have_member(invitee) - response.should redirect_to(teamname_url(slug: current_user.team.slug)) - end - - it 'redirects back to leader board when you remove yourself' do - member = team.add_user(current_user) - controller.send(:current_user).reload - delete :destroy, team_id: team.id, id: member.id - response.should redirect_to(teams_url) - end - end -end \ No newline at end of file diff --git a/spec/controllers/teams_controller_spec.rb b/spec/controllers/teams_controller_spec.rb index 725227fc..b503a77a 100644 --- a/spec/controllers/teams_controller_spec.rb +++ b/spec/controllers/teams_controller_spec.rb @@ -1,21 +1,145 @@ require 'spec_helper' -describe TeamsController do +RSpec.describe TeamsController, type: :controller do let(:current_user) { Fabricate(:user) } let(:team) { Fabricate(:team) } before { controller.send :sign_in, current_user } it 'allows user to follow team' do - get :follow, id: team.id.to_s - current_user.following_team?(team).should == true + post :follow, id: team.id, format: :js + + expect(response).to be_success + current_user.reload + expect(current_user.following_team?(team)).to eq(true) end it 'allows user to stop follow team' do current_user.follow_team!(team) - get :follow, id: team.id.to_s current_user.reload - current_user.following_team?(team).should == false + expect(current_user.following_team?(team)).to eq(true) + post :follow, id: team.id + current_user.reload + expect(current_user.following_team?(team)).to eq(false) + end + + describe 'GET #index' do + it 'responds successfully with an HTTP 200 status code' do + get :index + expect(response).to be_success + expect(response).to have_http_status(200) + end + end + + describe 'GET #show' do + before do + url = 'http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,%20CA&language=en&sensor=false' + @body ||= File.read(File.join(Rails.root, 'spec', 'fixtures', 'google_maps.json')) + stub_request(:get, url).to_return(body: @body) + end + + it 'responds successfully with an HTTP 200 status code' do + team = Fabricate(:team) do + name FFaker::Company.name + slug FFaker::Internet.user_name + end + get :show, slug: team.slug + expect(response).to be_success + expect(response).to have_http_status(200) + end + + it 'sets job_page to true if job is found' do + opportunity = Fabricate(:opportunity) + get :show, slug: opportunity.team.slug, job_id: opportunity.public_id + expect(assigns(:job_page)).to eq(true) + end + + it 'sets job_page to false if job is not found' do + team = Fabricate(:team) + get :show, slug: team.slug, job_id: 'not-a-real-job-slug' + expect(assigns(:job_page)).to eq(false) + end + + context 'when searching by an out of bounds or non-integer id' do + it 'should render 404' do + get :show, id: '54209333547a9e5' + expect(response).to have_http_status(404) + end + end + end + + describe '#create' do + let(:team) { Fabricate.build(:team, name: 'team_name') } + + before do + allow(Team).to receive(:with_similar_names).and_return([]) + end + + context 'a team is selected from a list of similar teams' do + it 'renders a template with a choice of tariff plans when user joins and existing team' do + allow(Team).to receive(:where).and_return(%w(team_1 team_2)) + post :create, team: { join_team: 'true', slug: 'team_name' }, format: :js + + expect(assigns[:team]).to eq('team_1') + expect(response).to render_template('create') + end + + it 'renders a template with a choice of tariff plans if user picks supplied team name' do + post :create, team: { name: 'team_name' }, format: :js + expect(response).to render_template('create') + end + end + + context 'a team does not exist' do + let(:response) { post :create, team: { name: 'team_name' }, format: :js } + + before do + allow(Team).to receive(:new).and_return(team) + allow(team).to receive(:save).and_return(true) + allow(team).to receive(:add_user).and_return(true) + end + + it 'creates a new team' do + expect(team).to receive(:save) + response + end + + it 'adds current user to the team' do + expect(team).to receive(:add_user).with(current_user, 'active', 'admin') + response + end + + it 'records an event "created team"' do + expect(controller).to receive(:record_event).with('created team') + response + end + + it 'renders template with option to join' do + expect(response).to be_success + expect(response).to render_template('create') + expect(flash[:notice]).to include('Successfully created a team team_name') + end + + it 'renders failure notice' do + allow(team).to receive(:save).and_return(false) + response + expect(flash[:error]).to include('There was an error in creating a team team_name') + end + end + + context 'a team with similar name already exists' do + before do + allow(Team).to receive(:new).and_return(team) + allow(Team).to receive(:with_similar_names).and_return([team]) + end + + it 'renders a template with a list of similar teams' do + post :create, team: { name: 'team_name', show_similar: 'true' }, format: :js + + expect(assigns[:new_team_name]).to eq('team_name') + expect(response).to render_template('similar_teams') + end + end end -end \ No newline at end of file +end diff --git a/spec/controllers/unbans_controller_spec.rb b/spec/controllers/unbans_controller_spec.rb new file mode 100644 index 00000000..9067934e --- /dev/null +++ b/spec/controllers/unbans_controller_spec.rb @@ -0,0 +1,22 @@ +RSpec.describe UnbansController, type: :controller do + + def valid_session + {} + end + + describe 'POST create' do + + it_behaves_like 'admin controller with #create' + + it 'bans a user', skip: true do + user = Fabricate(:user, admin: true, banned_at: Time.now) + expect(user.reload.banned?).to eq(true) + + controller.send :sign_in, user + post :create, { user_id: user.id }, valid_session + + expect(user.reload.banned?).to eq(false) + end + end + +end diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 4ba8547c..fe984966 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -1,50 +1,29 @@ require 'spec_helper' -describe UsersController do - let(:user) { +RSpec.describe UsersController, type: :controller do + let(:user) do user = Fabricate.build(:user) - user.badges << Fabricate.build(:badge, badge_class_name: "Octopussy") + user.badges << Fabricate.build(:badge, badge_class_name: 'Octopussy') user.save! user - } - - let(:github_response) { { - "provider" => "github", - "uid" => 1310330, - "info" => {"nickname" => "throwaway1", - "email" => 'md@asdf.com', - "name" => nil, - "urls" => {"GitHub" => "https://github.com/throwaway1", "Blog" => nil}}, - "credentials" => {"token" => "59cdff603a4e70d47f0a28b5ccaa3935aaa790cf", "expires" => false}, - "extra" => {"raw_info" => {"owned_private_repos" => 0, - "type" => "User", - "avatar_url" => "https://secure.gravatar.com/avatar/b08ed2199f8a88360c9679a57c4f9305?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", - "created_at" => "2012-01-06T20:49:02Z", - "login" => "throwaway1", - "disk_usage" => 0, - "plan" => {"space" => 307200, - "private_repos" => 0, - "name" => "free", - "collaborators" => 0}, - "public_repos" => 0, - "following" => 0, - "public_gists" => 0, - "followers" => 0, - "gravatar_id" => "b08ed2199f8a88360c9679a57c4f9305", - "total_private_repos" => 0, - "collaborators" => 0, - "html_url" => "https://github.com/throwaway1", - "url" => "https://api.github.com/users/throwaway1", - "id" => 1310330, - "private_gists" => 0}}}.with_indifferent_access } + end + + let(:github_response) { JSON.parse(File.read('./spec/fixtures/oauth/github_response.json')).with_indifferent_access } + it 'should get user page by ignoring the case' do + get :show, username: user.username.downcase + expect(response).to be_success + get :show, username: user.username.upcase + expect(response).to be_success + expect(assigns(:user)).to eq(user) + end it 'multiple json requests should have same etag' do get :show, username: user.username, format: :json first_etag = response.headers['ETag'] get :show, username: user.username, format: :json second_etag = response.headers['ETag'] - first_etag.should == second_etag + expect(first_etag).to eq(second_etag) end it 'should have different etags for json and jsonp' do @@ -54,196 +33,109 @@ get :show, username: user.username, format: :json, callback: 'foo' jsonp_etag = response.headers['ETag'] - jsonp_etag.should_not == json_etag + expect(jsonp_etag).not_to eq(json_etag) end it 'should save referral if first hit' do get :show, username: user.username - session[:referred_by].should == user.referral_token + expect(session[:referred_by]).to eq(user.referral_token) end it 'should not save referral if they have already been to site' do request.cookies[:trc] = 'asdfsdafsadfdsafadsfda' get :show, username: user.username - session[:referred_by].should be_blank + expect(session[:referred_by]).to be_blank end describe 'tracking viral coefficient on signup' do it 'should add referred by if present in session to new user' do session[:referred_by] = 'asdfasdf' - session["oauth.data"] = github_response - post :create, user: {location: 'SF', username: 'testingReferredBy'} - user = User.with_username('testingReferredBy') - user.referred_by.should == 'asdfasdf' + session['oauth.data'] = github_response + post :create, user: { location: 'SF', username: 'testingReferredBy' } + user = User.find_by_username('testingReferredBy') + expect(user.referred_by).to eq('asdfasdf') end it 'should not add referred by if not present' do - session["oauth.data"] = github_response - post :create, user: {location: 'SF', username: 'testingReferredBy'} - user = User.with_username('testingReferredBy') - user.referred_by.should be_nil + session['oauth.data'] = github_response + post :create, user: { location: 'SF', username: 'testingReferredBy' } + user = User.find_by_username('testingReferredBy') + expect(user.referred_by).to be_nil end end it 'should tracking utm UTM_CAMPAIGN on signup' do session[:utm_campaign] = 'asdfasdf' - session["oauth.data"] = github_response - post :create, user: {location: 'SF', username: 'testingUTM_campaign'} - user = User.with_username('testingUTM_campaign') - user.utm_campaign.should == 'asdfasdf' + session['oauth.data'] = github_response + post :create, user: { location: 'SF', username: 'testingUTM_campaign' } + user = User.find_by_username('testingUTM_campaign') + expect(user.utm_campaign).to eq('asdfasdf') end it 'should capture utm_campaign if ever in params' do get :show, username: user.username, utm_campaign: 'asdfasdf' - session[:utm_campaign].should == 'asdfasdf' + expect(session[:utm_campaign]).to eq('asdfasdf') end it 'applies oauth information to user on creation' do - session["oauth.data"] = github_response - post :create, user: {location: 'SF'} - assigns[:user].thumbnail_url == 'https://secure.gravatar.com/avatar/b08ed2199f8a88360c9679a57c4f9305' + session['oauth.data'] = github_response + post :create, user: { location: 'SF' } assigns[:user].github == 'throwaway1' assigns[:user].github_token == '59cdff603a4e70d47f0a28b5ccaa3935aaa790cf' end it 'extracts location from oauth' do github_response['extra']['raw_info']['location'] = 'San Francisco' - session["oauth.data"] = github_response + session['oauth.data'] = github_response post :create, user: {} - assigns[:user].location.should == 'San Francisco' + expect(assigns[:user].location).to eq('San Francisco') end it 'extracts blog if present from oauth' do github_response['info']['urls']['Blog'] = 'http://theagiledeveloper.com' - session["oauth.data"] = github_response - post :create, user: {location: 'SF'} - assigns[:user].blog.should == 'http://theagiledeveloper.com' + session['oauth.data'] = github_response + post :create, user: { location: 'SF' } + expect(assigns[:user].blog).to eq('http://theagiledeveloper.com') end it 'extracts joined date from oauth' do github_response['info']['urls']['Blog'] = 'http://theagiledeveloper.com' - session["oauth.data"] = github_response - post :create, user: {location: 'SF'} - assigns[:user].joined_github_on.should == Date.parse("2012-01-06T20:49:02Z") + session['oauth.data'] = github_response + post :create, user: { location: 'SF' } + expect(assigns[:user].joined_github_on).to eq(Date.parse('2012-01-06T20:49:02Z')) end describe 'linkedin' do - let(:linkedin_response) { { - "provider" => "linkedin", - "uid" => "DlC5AmUPnM", - "info" => {"first_name" => "Matthew", - "last_name" => "Deiters", - "name" => "Matthew Deiters", - "headline" => "-", - "image" => "http://media.linkedin.com/mpr/mprx/0_gPLYkP6hYm6ap1Vcxq5TkrTSYulmpzUc0tA3krFxTW5YiluBAvztoKPlKGAlx-sRyKF8wBv2M2QD", - "industry" => "Computer Software", - "urls" => {"public_profile" => "http://www.linkedin.com/in/matthewdeiters"}}, - "credentials" => {"token" => "acafe540-606a-4f73-aef7-f6eba276603", "secret" => "df7427be-3d93-4563-baef-d1d38826686"}, - "extra" => {"raw_info" => {"firstName" => "Matthew", - "headline" => "-", - "id" => "DlC5AmUPnM", - "industry" => "Computer Software", - "lastName" => "Deiters", - "pictureUrl" => "http://media.linkedin.com/mpr/mprx/0_gPLYkP6hYm6ap1Vcxq5TkrTSYulmpzUc0tA3krFxTW5YiluBAvztoKPlKGAlx-sRyKF8wBv2M2QD", - "publicProfileUrl" => "http://www.linkedin.com/in/matthewdeiters"}}}.with_indifferent_access } + let(:linkedin_response) { JSON.parse(File.read('./spec/fixtures/oauth/linkedin_response.json')).with_indifferent_access } it 'setups up new user and redirects to signup page' do - session["oauth.data"] = linkedin_response + session['oauth.data'] = linkedin_response post :create, user: {} - assigns[:user].username.should be_nil - assigns[:user].location.should be_nil - assigns[:user].linkedin.should be_nil - assigns[:user].linkedin_token == 'acafe540-606a-4f73-aef7-f6eba276603' - assigns[:user].linkedin_secret == 'df7427be-3d93-4563-baef-d1d38826686' - assigns[:user].linkedin_id == 'DlC5AmUPnM' - assigns[:user].linkedin_public_url == 'http://www.linkedin.com/in/matthewdeiters' - assigns[:user].thumbnail_url == 'http://media.linkedin.com/mpr/mprx/0_gPLYkP6hYm6ap1Vcxq5TkrTSYulmpzUc0tA3krFxTW5YiluBAvztoKPlKGAlx-sRyKF8wBv2M2QD' + expect(assigns[:user].username).to be_nil + expect(assigns[:user].location).to be_nil + expect(assigns[:user].linkedin).to be_nil + expect(assigns[:user].linkedin_token).to eq('acafe540-606a-4f73-aef7-f6eba276603') + expect(assigns[:user].linkedin_secret).to eq('df7427be-3d93-4563-baef-d1d38826686') + expect(assigns[:user].linkedin_id).to eq('DlC5AmUPnM') + expect(assigns[:user].linkedin_public_url).to eq('http://www.linkedin.com/in/matthewdeiters') end end describe 'twitter' do - let(:twitter_response) { { - "provider" => "twitter", - "uid" => "6271932", - "info" => {"nickname" => "mdeiters", - "name" => "matthew deiters", - "location" => "San Francisco", - "image" => "http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", - "description" => "Dad. Amateur Foodie. Founder Extraordinaire of @coderwall", - "urls" => {"Website" => "http://coderwall.com/mdeiters", "Twitter" => "http://twitter.com/mdeiters"}}, - "credentials" => {"token" => "6271932-8erxrXfJykBNMrvsdCEq5WqKd6FIcO97L9BzvPq7", - "secret" => "8fRS1ZARd6Wm53wvvDwHNrBmZcW0H2aSwmQjuOTHl"}, - "extra" => { - "raw_info" => {"lang" => "en", - "profile_background_image_url" => "http://a2.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg", - "protected" => false, - "time_zone" => "Pacific Time (US & Canada)", - "created_at" => "Wed May 23 21:14:29 +0000 2007", - "profile_link_color" => "0084B4", - "name" => "matthew deiters", - "listed_count" => 27, - "contributors_enabled" => false, - "followers_count" => 375, - "profile_image_url" => "http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", - "utc_offset" => -28800, - "profile_background_color" => "9AE4E8", - "description" => "Dad. Amateur Foodie. Founder Extraordinaire of @coderwall", - "statuses_count" => 720, - "profile_background_tile" => false, - "following" => false, - "verified" => false, - "profile_sidebar_fill_color" => "DDFFCC", - "status" => {"in_reply_to_user_id" => 5446832, - "favorited" => false, "place" => nil, - "created_at" => "Sat Jan 07 01:57:54 +0000 2012", - "retweet_count" => 0, - "in_reply_to_screen_name" => "chrislloyd", - "in_reply_to_status_id_str" => "155460652457148416", - "retweeted" => false, - "in_reply_to_user_id_str" => "5446832", - "geo" => nil, - "in_reply_to_status_id" => 155460652457148416, - "id_str" => "155468169815932928", - "contributors" => nil, - "coordinates" => nil, - "truncated" => false, - "source" => "<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", - "id" => 155468169815932928, - "text" => "@minefold @chrislloyd FYI your losing seo juice with a blog sub domain"}, - "default_profile_image" => false, - "friends_count" => 301, - "location" => "San Francisco", - "screen_name" => "mdeiters", - "default_profile" => false, - "profile_background_image_url_https" => "https://si0.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg", - "profile_sidebar_border_color" => "BDDCAD", - "id_str" => "6271932", - "is_translator" => false, - "geo_enabled" => true, - "url" => "http://coderwall.com/mdeiters", - "profile_image_url_https" => "https://si0.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", - "profile_use_background_image" => true, - "favourites_count" => 178, - "id" => 6271932, - "show_all_inline_media" => false, - "follow_request_sent" => false, - "notifications" => false, - "profile_text_color" => "333333"}}}.with_indifferent_access } + let(:twitter_response) { JSON.parse(File.read('./spec/fixtures/oauth/twitter_response.json')).with_indifferent_access } it 'setups up new user and redirects to signup page' do - session["oauth.data"] = twitter_response + session['oauth.data'] = twitter_response post :create, user: {} - assigns[:user].username.should == 'mdeiters' - assigns[:user].thumbnail_url.should == 'http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg' - assigns[:user].twitter.should == 'mdeiters' - assigns[:user].twitter_token.should == '6271932-8erxrXfJykBNMrvsdCEq5WqKd6FIcO97L9BzvPq7' - assigns[:user].twitter_secret.should == '8fRS1ZARd6Wm53wvvDwHNrBmZcW0H2aSwmQjuOTHl' - assigns[:user].twitter_id.should == '6271932' - assigns[:user].location.should == 'San Francisco' - assigns[:user].joined_twitter_on.should == Date.parse('Wed May 23 21:14:29 +0000 2007') - assigns[:user].about.should == 'Dad. Amateur Foodie. Founder Extraordinaire of @coderwall' + expect(assigns[:user].username).to eq('mdeiters') + expect(assigns[:user].twitter).to eq('mdeiters') + expect(assigns[:user].twitter_token).to eq('6271932-8erxrXfJykBNMrvsdCEq5WqKd6FIcO97L9BzvPq7') + expect(assigns[:user].twitter_secret).to eq('8fRS1ZARd6Wm53wvvDwHNrBmZcW0H2aSwmQjuOTHl') + expect(assigns[:user].twitter_id).to eq('6271932') + expect(assigns[:user].location).to eq('San Francisco') + expect(assigns[:user].about).to eq('Dad. Amateur Foodie. Founder Extraordinaire of @coderwall') end end end diff --git a/spec/email_previews/mail_preview.rb b/spec/email_previews/mail_preview.rb new file mode 100644 index 00000000..4aeb3dd3 --- /dev/null +++ b/spec/email_previews/mail_preview.rb @@ -0,0 +1,13 @@ +# class MailPreview < MailView +# def welcome_email +# user = User.find_or_create_by_username('testusername') do |u| +# u.email = 'test@example.com' +# u.location = 'Chicago, IL' +# end +# mail = Notifier.welcome_email(user.username) +# user.destroy +# mail +# end +# end + +# TODO restore in rails 4.1 diff --git a/spec/fabricators/account_fabricator.rb b/spec/fabricators/account_fabricator.rb index 7a31c15d..962824f7 100644 --- a/spec/fabricators/account_fabricator.rb +++ b/spec/fabricators/account_fabricator.rb @@ -1,2 +1,4 @@ -Fabricator(:account) do +Fabricator(:account, from: 'Teams::Account') do + stripe_card_token { "tok_14u7LDFs0zmMxCeEU3OGRUa0_#{rand(1000)}" } + stripe_customer_token { "cus_54FsD2W2VkrKpW_#{rand(1000)}" } end diff --git a/spec/fabricators/api_access_fabricator.rb b/spec/fabricators/api_access_fabricator.rb index 7f793438..cfebdc82 100644 --- a/spec/fabricators/api_access_fabricator.rb +++ b/spec/fabricators/api_access_fabricator.rb @@ -1,20 +1,15 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `api_accesses` +# Table name: api_accesses # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`api_key`** | `string(255)` | -# **`awards`** | `text` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# api_key :string(255) +# awards :text +# created_at :datetime +# updated_at :datetime # Fabricator(:api_access) do - api_key "MyString" - awards "MyText" + api_key 'MyString' + awards 'MyText' end diff --git a/spec/fabricators/badge_fabricator.rb b/spec/fabricators/badge_fabricator.rb index 27015993..70ce83e1 100644 --- a/spec/fabricators/badge_fabricator.rb +++ b/spec/fabricators/badge_fabricator.rb @@ -1,27 +1,14 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `badges` +# Table name: badges # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`badge_class_name`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_badges_on_user_id`: -# * **`user_id`** -# * `index_badges_on_user_id_and_badge_class_name` (_unique_): -# * **`user_id`** -# * **`badge_class_name`** +# id :integer not null, primary key +# created_at :datetime +# updated_at :datetime +# user_id :integer +# badge_class_name :string(255) # Fabricator(:badge) do - badge_class_name { sequence(:badge_name) { |i| "Octopussy" } } + badge_class_name { sequence(:badge_name) { |_i| 'Octopussy' } } end diff --git a/spec/fabricators/badge_justification_fabricator.rb b/spec/fabricators/badge_justification_fabricator.rb deleted file mode 100644 index b1b973a6..00000000 --- a/spec/fabricators/badge_justification_fabricator.rb +++ /dev/null @@ -1,2 +0,0 @@ -Fabricator(:badge_justification) do -end diff --git a/spec/fabricators/comment_fabricator.rb b/spec/fabricators/comment_fabricator.rb new file mode 100644 index 00000000..6b198c3f --- /dev/null +++ b/spec/fabricators/comment_fabricator.rb @@ -0,0 +1,28 @@ +# == Schema Information +# +# Table name: comments +# +# id :integer not null, primary key +# title :string(50) default("") +# comment :text default("") +# protip_id :integer +# user_id :integer +# likes_cache :integer default(0) +# likes_value_cache :integer default(0) +# created_at :datetime +# updated_at :datetime +# likes_count :integer default(0) +# user_name :string(255) +# user_email :string(255) +# user_agent :string(255) +# user_ip :inet +# request_format :string(255) +# spam_reports_count :integer default(0) +# state :string(255) default("active") +# + +Fabricator(:comment) do + body { 'Lorem Ipsum is simply dummy text...' } + protip { Fabricate.build(:protip) } + user { Fabricate.build(:user) } +end diff --git a/spec/fabricators/endorsement_fabricator.rb b/spec/fabricators/endorsement_fabricator.rb index 5736106f..3c1247e0 100644 --- a/spec/fabricators/endorsement_fabricator.rb +++ b/spec/fabricators/endorsement_fabricator.rb @@ -1,30 +1,14 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `endorsements` +# Table name: endorsements # -# ### Columns -# -# Name | Type | Attributes -# ------------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`endorsed_user_id`** | `integer` | -# **`endorsing_user_id`** | `integer` | -# **`id`** | `integer` | `not null, primary key` -# **`skill_id`** | `integer` | -# **`specialty`** | `string(255)` | -# **`updated_at`** | `datetime` | -# -# ### Indexes -# -# * `index_endorsements_on_endorsed_user_id`: -# * **`endorsed_user_id`** -# * `index_endorsements_on_endorsing_user_id`: -# * **`endorsing_user_id`** -# * `only_unique_endorsements` (_unique_): -# * **`endorsed_user_id`** -# * **`endorsing_user_id`** -# * **`specialty`** +# id :integer not null, primary key +# endorsed_user_id :integer +# endorsing_user_id :integer +# specialty :string(255) +# created_at :datetime +# updated_at :datetime +# skill_id :integer # Fabricator(:endorsement) do diff --git a/spec/fabricators/fact_fabricator.rb b/spec/fabricators/fact_fabricator.rb index a0289951..1de17546 100644 --- a/spec/fabricators/fact_fabricator.rb +++ b/spec/fabricators/fact_fabricator.rb @@ -1,59 +1,48 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `facts` +# Table name: facts # -# ### Columns -# -# Name | Type | Attributes -# ------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`identity`** | `string(255)` | -# **`metadata`** | `text` | -# **`name`** | `string(255)` | -# **`owner`** | `string(255)` | -# **`relevant_on`** | `datetime` | -# **`tags`** | `text` | -# **`updated_at`** | `datetime` | -# **`url`** | `string(255)` | -# -# ### Indexes -# -# * `index_facts_on_identity`: -# * **`identity`** -# * `index_facts_on_owner`: -# * **`owner`** +# id :integer not null, primary key +# identity :string(255) +# owner :string(255) +# name :string(255) +# url :string(255) +# tags :text +# metadata :text +# relevant_on :datetime +# created_at :datetime +# updated_at :datetime +# user_id :integer # -Fabricator(:fact) do +Fabricator(:fact, from: 'fact') do context { Fabricate(:user) } end Fabricator(:lanyrd_original_fact, from: :fact) do - owner { |fact| fact.context.lanyrd_identity } - url { Faker::Internet.domain_name } - identity { |fact| "/#{rand(1000)}/speakerconf/:" + fact.context.lanyrd_identity } - name { Faker::Company.catch_phrase } + owner { |fact| fact[:context].lanyrd_identity } + url { FFaker::Internet.domain_name } + identity { |fact| "/#{rand(1000)}/speakerconf/:" + fact[:owner] } + name { FFaker::Company.catch_phrase } relevant_on { rand(100).days.ago } - tags { ['lanyrd', 'event', 'spoke', 'Software', 'Ruby'] } + tags { %w(lanyrd event spoke Software Ruby) } end Fabricator(:github_original_fact, from: :fact) do - owner { |fact| fact.context.github_identity } - url { Faker::Internet.domain_name } - identity { |fact| fact.url + ':' + fact.context.github_identity } - name { Faker::Company.catch_phrase } + owner { |fact| fact[:context].github_identity } + url { FFaker::Internet.domain_name } + identity { |fact| fact[:url] + ':' + fact[:owner] } + name { FFaker::Company.catch_phrase } relevant_on { rand(100).days.ago } - metadata { { - language: 'Ruby', - languages: ["Python", "Shell"], - times_forked: 0, - watchers: ['pjhyat', 'frank'] - } } - tags { ['Ruby', 'repo', 'original', 'personal', 'github'] } + metadata do { + language: 'Ruby', + languages: %w(Python Shell), + times_forked: 0, + watchers: %w(pjhyat frank) + } end + tags { %w(Ruby repo original personal github) } end Fabricator(:github_fork_fact, from: :github_original_fact) do - tags { ['repo', 'github', 'fork', 'personal'] } + tags { %w(repo github fork personal) } end diff --git a/spec/fabricators/github_profile_fabricator.rb b/spec/fabricators/github_profile_fabricator.rb deleted file mode 100644 index a8b637de..00000000 --- a/spec/fabricators/github_profile_fabricator.rb +++ /dev/null @@ -1,42 +0,0 @@ -Fabricator(:github_profile) do - name { Faker::Name.name } - login { 'mdeiters' } - _id { 7330 } - type { GithubProfile::ORGANIZATION } -end - -Fabricator(:owner, from: :github_user) do - _id { 7330 } - login { 'mdeiters' } - gravatar { 'aacb7c97f7452b3ff11f67151469e3b0' } -end - -Fabricator(:follower, from: :github_user) do - github_id { sequence(:github_id) } - login { sequence(:login) { |i| "user#{i}" } } - gravatar { 'aacb7c97f7452b3ff11f67151469e3b0' } -end - -Fabricator(:watcher, from: :github_user) do - github_id { 1 } - login { 'mojombo' } - gravatar { '25c7c18223fb42a4c6ae1c8db6f50f9b' } -end - -Fabricator(:github_repo) do - after_build { |repo| repo.forks = 1 } - name { sequence(:repo) { |i| "repo#{i}" } } - owner { Fabricate.attributes_for(:owner) } - html_url { "https://github.com/mdeiters/semr" } - languages { { - "Ruby" => 111435, - "JavaScript" => 50164 - } } -end - -Fabricator(:github_org, class_name: 'GithubProfile') do - name { Faker::Company.name } - login { 'coderwall' } - _id { 1234 } - type { GithubProfile::ORGANIZATION } -end \ No newline at end of file diff --git a/spec/fabricators/highlight_fabricator.rb b/spec/fabricators/highlight_fabricator.rb deleted file mode 100644 index 74b75270..00000000 --- a/spec/fabricators/highlight_fabricator.rb +++ /dev/null @@ -1,27 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `highlights` -# -# ### Columns -# -# Name | Type | Attributes -# ------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`description`** | `text` | -# **`featured`** | `boolean` | `default(FALSE)` -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_highlights_on_featured`: -# * **`featured`** -# * `index_highlights_on_user_id`: -# * **`user_id`** -# - -Fabricator(:highlight) do - -end diff --git a/spec/fabricators/like_fabricator.rb b/spec/fabricators/like_fabricator.rb index 3fb56ded..04f40cd3 100644 --- a/spec/fabricators/like_fabricator.rb +++ b/spec/fabricators/like_fabricator.rb @@ -1,28 +1,16 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `likes` +# Table name: likes # -# ### Columns -# -# Name | Type | Attributes -# -------------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`ip_address`** | `string(255)` | -# **`likable_id`** | `integer` | -# **`likable_type`** | `string(255)` | -# **`tracking_code`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# **`value`** | `integer` | -# -# ### Indexes -# -# * `index_likes_on_user_id` (_unique_): -# * **`likable_id`** -# * **`likable_type`** -# * **`user_id`** +# id :integer not null, primary key +# value :integer +# tracking_code :string(255) +# user_id :integer +# likable_id :integer +# likable_type :string(255) +# created_at :datetime +# updated_at :datetime +# ip_address :string(255) # Fabricator(:like) do diff --git a/spec/fabricators/link_fabricator.rb b/spec/fabricators/link_fabricator.rb deleted file mode 100644 index 1e907df4..00000000 --- a/spec/fabricators/link_fabricator.rb +++ /dev/null @@ -1,2 +0,0 @@ -Fabricator(:link) do -end diff --git a/spec/fabricators/opportunity_fabricator.rb b/spec/fabricators/opportunity_fabricator.rb index a68c9615..d4d6d7b4 100644 --- a/spec/fabricators/opportunity_fabricator.rb +++ b/spec/fabricators/opportunity_fabricator.rb @@ -1,43 +1,37 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `opportunities` +# Table name: opportunities # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`apply`** | `boolean` | `default(FALSE)` -# **`cached_tags`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`deleted`** | `boolean` | `default(FALSE)` -# **`deleted_at`** | `datetime` | -# **`description`** | `text` | -# **`designation`** | `string(255)` | -# **`expires_at`** | `datetime` | `default(1970-01-01 00:00:00 UTC)` -# **`id`** | `integer` | `not null, primary key` -# **`link`** | `string(255)` | -# **`location`** | `string(255)` | -# **`location_city`** | `string(255)` | -# **`name`** | `string(255)` | -# **`opportunity_type`** | `string(255)` | `default("full-time")` -# **`options`** | `float` | -# **`public_id`** | `string(255)` | -# **`salary`** | `integer` | -# **`team_document_id`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# name :string(255) +# description :text +# designation :string(255) +# location :string(255) +# cached_tags :string(255) +# link :string(255) +# salary :integer +# options :float +# deleted :boolean default(FALSE) +# deleted_at :datetime +# created_at :datetime +# updated_at :datetime +# expires_at :datetime default(1970-01-01 00:00:00 UTC) +# opportunity_type :string(255) default("full-time") +# location_city :string(255) +# apply :boolean default(FALSE) +# public_id :string(255) +# team_id :integer +# remote :boolean # Fabricator(:opportunity) do - salary 100000 - name "Senior Rails Web Developer" - description "Architect and implement the Ruby and Javascript underpinnings of our various user-facing and internal web apps like api.heroku.com." - tags ["rails", "sinatra", "JQuery", "Clean, beautiful code"] - location "San Francisco, CA" - cached_tags "java, python" - team_document_id { Fabricate(:team, paid_job_posts: 1).id } -end - -Fabricator(:job, from: :opportunity, class_name: :opportunity) do - + salary 100_000 + name 'Senior Rails Web Developer' + description 'Architect and implement the Ruby and Javascript underpinnings of our various user-facing and internal web apps like api.heroku.com.' + tag_list ['rails', 'sinatra', 'JQuery'] + location 'San Francisco, CA' + cached_tags 'java, python' + team_id { Fabricate(:team, paid_job_posts: 1).id } + remote false + expires_at { Time.now + 1.year } end diff --git a/spec/fabricators/plan_fabricator.rb b/spec/fabricators/plan_fabricator.rb index 297179cd..e0eef649 100644 --- a/spec/fabricators/plan_fabricator.rb +++ b/spec/fabricators/plan_fabricator.rb @@ -1,22 +1,20 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `plans` +# Table name: plans # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`amount`** | `integer` | -# **`analytics`** | `boolean` | `default(FALSE)` -# **`created_at`** | `datetime` | -# **`currency`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`interval`** | `string(255)` | -# **`name`** | `string(255)` | -# **`public_id`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# amount :integer +# interval :string(255) default("month") +# name :string(255) +# currency :string(255) default("usd") +# public_id :string(255) +# created_at :datetime +# updated_at :datetime +# analytics :boolean default(FALSE) +# interval_in_seconds :integer default(2592000) # Fabricator(:plan) do + name { sequence(:name) { |i| "plan_no_#{i}" } } + amount { rand * 100 } end diff --git a/spec/fabricators/protip_fabricator.rb b/spec/fabricators/protip_fabricator.rb index 832be50c..5f93020c 100644 --- a/spec/fabricators/protip_fabricator.rb +++ b/spec/fabricators/protip_fabricator.rb @@ -1,43 +1,39 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `protips` +# Table name: protips # -# ### Columns -# -# Name | Type | Attributes -# -------------------------- | ------------------ | --------------------------- -# **`body`** | `text` | -# **`boost_factor`** | `float` | `default(1.0)` -# **`created_at`** | `datetime` | -# **`created_by`** | `string(255)` | `default("self")` -# **`featured`** | `boolean` | `default(FALSE)` -# **`featured_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`inappropriate`** | `integer` | `default(0)` -# **`kind`** | `string(255)` | -# **`public_id`** | `string(255)` | -# **`score`** | `float` | -# **`title`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`upvotes_value_cache`** | `integer` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_protips_on_public_id`: -# * **`public_id`** -# * `index_protips_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# public_id :string(255) +# kind :string(255) +# title :string(255) +# body :text +# user_id :integer +# created_at :datetime +# updated_at :datetime +# score :float +# created_by :string(255) default("self") +# featured :boolean default(FALSE) +# featured_at :datetime +# upvotes_value_cache :integer default(0), not null +# boost_factor :float default(1.0) +# inappropriate :integer default(0) +# likes_count :integer default(0) +# slug :string(255) not null +# user_name :string(255) +# user_email :string(255) +# user_agent :string(255) +# user_ip :inet +# spam_reports_count :integer default(0) +# state :string(255) default("active") # Fabricator(:protip) do - topics ["Javascript", "CoffeeScript"] - title { Faker::Company.catch_phrase } - body { Faker::Lorem.sentences(8).join(' ') } - user { Fabricate(:user) } + topic_list %w(Javascript CoffeeScript) + title { FFaker::Company.catch_phrase } + body { FFaker::Lorem.sentences(8).join(' ') } + user { Fabricate.build(:user) } end Fabricator(:link_protip, from: :protip) do - body "http://www.google.com" + body 'http://www.google.com' end diff --git a/spec/fabricators/protip_link_fabricator.rb b/spec/fabricators/protip_link_fabricator.rb index 5ca3a3d2..0acabc9c 100644 --- a/spec/fabricators/protip_link_fabricator.rb +++ b/spec/fabricators/protip_link_fabricator.rb @@ -1,22 +1,17 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `protip_links` +# Table name: protip_links # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`identifier`** | `string(255)` | -# **`kind`** | `string(255)` | -# **`protip_id`** | `integer` | -# **`updated_at`** | `datetime` | -# **`url`** | `string(255)` | +# id :integer not null, primary key +# identifier :string(255) +# url :string(255) +# protip_id :integer +# created_at :datetime +# updated_at :datetime +# kind :string(255) # Fabricator(:protip_link) do identifier 1 - url "MyString" + url 'MyString' end diff --git a/spec/fabricators/sent_mail_fabricator.rb b/spec/fabricators/sent_mail_fabricator.rb index 02091a80..ac446646 100644 --- a/spec/fabricators/sent_mail_fabricator.rb +++ b/spec/fabricators/sent_mail_fabricator.rb @@ -1,17 +1,12 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `sent_mails` +# Table name: sent_mails # -# ### Columns -# -# Name | Type | Attributes -# -------------------- | ------------------ | --------------------------- -# **`id`** | `integer` | `not null, primary key` -# **`mailable_id`** | `integer` | -# **`mailable_type`** | `string(255)` | -# **`sent_at`** | `datetime` | -# **`user_id`** | `integer` | +# id :integer not null, primary key +# mailable_id :integer +# mailable_type :string(255) +# user_id :integer +# sent_at :datetime # Fabricator(:sent_mail) do diff --git a/spec/fabricators/skill_fabricator.rb b/spec/fabricators/skill_fabricator.rb index 1ac23623..93472388 100644 --- a/spec/fabricators/skill_fabricator.rb +++ b/spec/fabricators/skill_fabricator.rb @@ -1,33 +1,21 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `skills` +# Table name: skills # -# ### Columns -# -# Name | Type | Attributes -# ------------------------- | ------------------ | --------------------------- -# **`attended_events`** | `text` | -# **`created_at`** | `datetime` | -# **`deleted`** | `boolean` | `default(FALSE), not null` -# **`deleted_at`** | `datetime` | -# **`endorsements_count`** | `integer` | `default(0)` -# **`id`** | `integer` | `not null, primary key` -# **`name`** | `string(255)` | `not null` -# **`repos`** | `text` | -# **`speaking_events`** | `text` | -# **`tokenized`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# **`weight`** | `integer` | `default(0)` -# -# ### Indexes -# -# * `index_skills_on_deleted_and_user_id`: -# * **`deleted`** -# * **`user_id`** -# * `index_skills_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# user_id :integer +# name :citext not null +# endorsements_count :integer default(0) +# created_at :datetime +# updated_at :datetime +# tokenized :string(255) +# weight :integer default(0) +# repos :text +# speaking_events :text +# attended_events :text +# deleted :boolean default(FALSE), not null +# deleted_at :datetime +# links :json default("{}") # Fabricator(:skill) do diff --git a/spec/fabricators/spam_report_fabricator.rb b/spec/fabricators/spam_report_fabricator.rb new file mode 100644 index 00000000..cb4328cf --- /dev/null +++ b/spec/fabricators/spam_report_fabricator.rb @@ -0,0 +1,13 @@ +# == Schema Information +# +# Table name: spam_reports +# +# id :integer not null, primary key +# spammable_id :integer not null +# spammable_type :string(255) not null +# created_at :datetime not null +# updated_at :datetime not null +# + +Fabricator(:spam_report) do +end diff --git a/spec/fabricators/team_fabricator.rb b/spec/fabricators/team_fabricator.rb index 804db506..f8cfa7a8 100644 --- a/spec/fabricators/team_fabricator.rb +++ b/spec/fabricators/team_fabricator.rb @@ -1,3 +1,77 @@ -Fabricator(:team) do - name { 'Coderwall' } -end \ No newline at end of file +# == Schema Information +# +# Table name: teams +# +# id :integer not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# website :string(255) +# about :text +# total :decimal(40, 30) default(0.0) +# size :integer default(0) +# mean :decimal(40, 30) default(0.0) +# median :decimal(40, 30) default(0.0) +# score :decimal(40, 30) default(0.0) +# twitter :string(255) +# facebook :string(255) +# slug :citext not null +# premium :boolean default(FALSE) +# analytics :boolean default(FALSE) +# valid_jobs :boolean default(FALSE) +# hide_from_featured :boolean default(FALSE) +# preview_code :string(255) +# youtube_url :string(255) +# github :string(255) +# highlight_tags :string(255) +# branding :text +# headline :text +# big_quote :text +# big_image :string(255) +# featured_banner_image :string(255) +# benefit_name_1 :text +# benefit_description_1 :text +# benefit_name_2 :text +# benefit_description_2 :text +# benefit_name_3 :text +# benefit_description_3 :text +# reason_name_1 :text +# reason_description_1 :text +# reason_name_2 :text +# reason_description_2 :text +# reason_name_3 :text +# reason_description_3 :text +# why_work_image :text +# organization_way :text +# organization_way_name :text +# organization_way_photo :text +# blog_feed :text +# our_challenge :text +# your_impact :text +# hiring_tagline :text +# link_to_careers_page :text +# avatar :string(255) +# achievement_count :integer default(0) +# endorsement_count :integer default(0) +# upgraded_at :datetime +# paid_job_posts :integer default(0) +# monthly_subscription :boolean default(FALSE) +# stack_list :text default("") +# number_of_jobs_to_show :integer default(2) +# location :string(255) +# country_id :integer +# name :string(255) +# github_organization_name :string(255) +# team_size :integer +# mongo_id :string(255) +# office_photos :string(255) default([]), is an Array +# upcoming_events :text default([]), is an Array +# interview_steps :text default([]), is an Array +# invited_emails :string(255) default([]), is an Array +# pending_join_requests :string(255) default([]), is an Array +# state :string(255) default("active") +# + +Fabricator(:team, from: 'Team') do + name { FFaker::Company.name } + account { Fabricate.build(:account) } +end diff --git a/spec/fabricators/teams_account_fabricator.rb b/spec/fabricators/teams_account_fabricator.rb new file mode 100644 index 00000000..1e427e3a --- /dev/null +++ b/spec/fabricators/teams_account_fabricator.rb @@ -0,0 +1,2 @@ +Fabricator(:team_account, from: 'teams/account') do +end diff --git a/spec/fabricators/teams_location_fabricator.rb b/spec/fabricators/teams_location_fabricator.rb new file mode 100644 index 00000000..431a29a5 --- /dev/null +++ b/spec/fabricators/teams_location_fabricator.rb @@ -0,0 +1,2 @@ +Fabricator(:team_location, from: 'teams/location') do +end diff --git a/spec/fabricators/teams_member_fabricator.rb b/spec/fabricators/teams_member_fabricator.rb new file mode 100644 index 00000000..db989d88 --- /dev/null +++ b/spec/fabricators/teams_member_fabricator.rb @@ -0,0 +1,2 @@ +Fabricator(:team_member, from: 'teams/member') do +end diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb index 8e4767a4..d056571f 100644 --- a/spec/fabricators/user_fabricator.rb +++ b/spec/fabricators/user_fabricator.rb @@ -1,135 +1,126 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `users` +# Table name: users # -# ### Columns -# -# Name | Type | Attributes -# ------------------------------------ | ------------------ | --------------------------- -# **`about`** | `text` | -# **`achievements_checked_at`** | `datetime` | `default(1914-02-20 22:39:10 UTC)` -# **`activated_on`** | `datetime` | -# **`admin`** | `boolean` | `default(FALSE)` -# **`api_key`** | `string(255)` | -# **`avatar`** | `string(255)` | -# **`backup_email`** | `string(255)` | -# **`badges_count`** | `integer` | `default(0)` -# **`banner`** | `string(255)` | -# **`beta_access`** | `boolean` | `default(FALSE)` -# **`bitbucket`** | `string(255)` | -# **`blog`** | `string(255)` | -# **`city`** | `string(255)` | -# **`claim_code`** | `text` | -# **`codeplex`** | `string(255)` | -# **`company`** | `string(255)` | -# **`country`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`dribbble`** | `string(255)` | -# **`email`** | `string(255)` | -# **`endorsements_count`** | `integer` | `default(0)` -# **`favorite_websites`** | `string(255)` | -# **`forrst`** | `string(255)` | -# **`github`** | `string(255)` | -# **`github_failures`** | `integer` | `default(0)` -# **`github_id`** | `integer` | -# **`github_token`** | `string(255)` | -# **`google_code`** | `string(255)` | -# **`http_counter`** | `integer` | -# **`id`** | `integer` | `not null, primary key` -# **`ip_lat`** | `float` | -# **`ip_lng`** | `float` | -# **`join_badge_orgs`** | `boolean` | `default(FALSE)` -# **`joined_github_on`** | `date` | -# **`joined_twitter_on`** | `date` | -# **`last_asm_email_at`** | `datetime` | -# **`last_email_sent`** | `datetime` | -# **`last_refresh_at`** | `datetime` | `default(1970-01-01 00:00:00 UTC)` -# **`last_request_at`** | `datetime` | -# **`lat`** | `float` | -# **`linkedin`** | `string(255)` | -# **`linkedin_id`** | `string(255)` | -# **`linkedin_legacy`** | `string(255)` | -# **`linkedin_public_url`** | `string(255)` | -# **`linkedin_secret`** | `string(255)` | -# **`linkedin_token`** | `string(255)` | -# **`lng`** | `float` | -# **`location`** | `string(255)` | -# **`login_count`** | `integer` | `default(0)` -# **`name`** | `string(255)` | -# **`notify_on_award`** | `boolean` | `default(TRUE)` -# **`notify_on_follow`** | `boolean` | `default(TRUE)` -# **`old_github_token`** | `string(255)` | -# **`penalty`** | `float` | `default(0.0)` -# **`receive_newsletter`** | `boolean` | `default(TRUE)` -# **`receive_weekly_digest`** | `boolean` | `default(TRUE)` -# **`redemptions`** | `text` | -# **`referral_token`** | `string(255)` | -# **`referred_by`** | `string(255)` | -# **`remind_to_create_protip`** | `datetime` | -# **`remind_to_create_skills`** | `datetime` | -# **`remind_to_create_team`** | `datetime` | -# **`remind_to_invite_team_members`** | `datetime` | -# **`remind_to_link_accounts`** | `datetime` | -# **`resume`** | `string(255)` | -# **`score_cache`** | `float` | `default(0.0)` -# **`slideshare`** | `string(255)` | -# **`sourceforge`** | `string(255)` | -# **`speakerdeck`** | `string(255)` | -# **`specialties`** | `text` | -# **`stackoverflow`** | `string(255)` | -# **`state`** | `string(255)` | -# **`state_name`** | `string(255)` | -# **`team_avatar`** | `string(255)` | -# **`team_banner`** | `string(255)` | -# **`team_document_id`** | `string(255)` | -# **`team_responsibilities`** | `text` | -# **`thumbnail_url`** | `text` | -# **`title`** | `string(255)` | -# **`tracking_code`** | `string(255)` | -# **`twitter`** | `string(255)` | -# **`twitter_checked_at`** | `datetime` | `default(1914-02-20 22:39:10 UTC)` -# **`twitter_id`** | `string(255)` | -# **`twitter_secret`** | `string(255)` | -# **`twitter_token`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`username`** | `string(255)` | -# **`utm_campaign`** | `string(255)` | -# **`visit_frequency`** | `string(255)` | `default("rarely")` -# **`visits`** | `string(255)` | `default("")` -# **`zerply`** | `string(255)` | -# -# ### Indexes -# -# * `index_users_on_github_token` (_unique_): -# * **`old_github_token`** -# * `index_users_on_linkedin_id` (_unique_): -# * **`linkedin_id`** -# * `index_users_on_team_document_id`: -# * **`team_document_id`** -# * `index_users_on_twitter_id` (_unique_): -# * **`twitter_id`** -# * `index_users_on_username` (_unique_): -# * **`username`** +# id :integer not null, primary key +# username :citext +# name :string(255) +# email :citext +# location :string(255) +# old_github_token :string(255) +# state :string(255) +# created_at :datetime +# updated_at :datetime +# twitter :string(255) +# linkedin_legacy :string(255) +# stackoverflow :string(255) +# admin :boolean default(FALSE) +# backup_email :string(255) +# badges_count :integer default(0) +# bitbucket :string(255) +# codeplex :string(255) +# login_count :integer default(0) +# last_request_at :datetime default(2014-07-23 03:14:36 UTC) +# achievements_checked_at :datetime default(1911-08-12 21:49:21 UTC) +# claim_code :text +# github_id :integer +# country :string(255) +# city :string(255) +# state_name :string(255) +# lat :float +# lng :float +# http_counter :integer +# github_token :string(255) +# twitter_checked_at :datetime default(1911-08-12 21:49:21 UTC) +# title :string(255) +# company :string(255) +# blog :string(255) +# github :citext +# forrst :string(255) +# dribbble :string(255) +# specialties :text +# notify_on_award :boolean default(TRUE) +# receive_newsletter :boolean default(TRUE) +# zerply :string(255) +# linkedin :string(255) +# linkedin_id :string(255) +# linkedin_token :string(255) +# twitter_id :string(255) +# twitter_token :string(255) +# twitter_secret :string(255) +# linkedin_secret :string(255) +# last_email_sent :datetime +# linkedin_public_url :string(255) +# endorsements_count :integer default(0) +# team_document_id :string(255) +# speakerdeck :string(255) +# slideshare :string(255) +# last_refresh_at :datetime default(1970-01-01 00:00:00 UTC) +# referral_token :string(255) +# referred_by :string(255) +# about :text +# joined_github_on :date +# avatar :string(255) +# banner :string(255) +# remind_to_invite_team_members :datetime +# activated_on :datetime +# tracking_code :string(255) +# utm_campaign :string(255) +# score_cache :float default(0.0) +# notify_on_follow :boolean default(TRUE) +# api_key :string(255) +# remind_to_create_team :datetime +# remind_to_create_protip :datetime +# remind_to_create_skills :datetime +# remind_to_link_accounts :datetime +# favorite_websites :string(255) +# team_responsibilities :text +# team_avatar :string(255) +# team_banner :string(255) +# stat_name_1 :string(255) +# stat_number_1 :string(255) +# stat_name_2 :string(255) +# stat_number_2 :string(255) +# stat_name_3 :string(255) +# stat_number_3 :string(255) +# ip_lat :float +# ip_lng :float +# penalty :float default(0.0) +# receive_weekly_digest :boolean default(TRUE) +# github_failures :integer default(0) +# resume :string(255) +# sourceforge :string(255) +# google_code :string(255) +# sales_rep :boolean default(FALSE) +# visits :string(255) default("") +# visit_frequency :string(255) default("rarely") +# pitchbox_id :integer +# join_badge_orgs :boolean default(FALSE) +# use_social_for_pitchbox :boolean default(FALSE) +# last_asm_email_at :datetime +# banned_at :datetime +# last_ip :string(255) +# last_ua :string(255) +# team_id :integer +# role :string(255) default("user") # -Fabricator(:user) do +Fabricator(:user, from: 'User') do github { 'mdeiters' } twitter { 'mdeiters' } - username { Faker::Internet.user_name.gsub(/\./, "_") } + username { FFaker::Internet.user_name.gsub(/\./, '_') } name { 'Matthew Deiters' } email { 'someone@example.com' } location { 'San Francisco' } - github_token { Faker::Internet.ip_v4_address } + github_token { FFaker::Internet.ip_v4_address } state { User::ACTIVE } end Fabricator(:pending_user, from: :user) do - github { 'bguthrie' } - username { Faker::Internet.user_name.gsub(/\./, "_") } - name { 'Brian Guthrie' } - email { 'someone@example.com' } - location { 'Mountain View' } - github_token { Faker::Internet.ip_v4_address } state { User::PENDING } end + +Fabricator(:admin, from: :user ) do + email { FFaker::Internet.email('admin') } + role 'admin' +end diff --git a/spec/fabricators/users_github_organization_fabricator.rb b/spec/fabricators/users_github_organization_fabricator.rb new file mode 100644 index 00000000..632fbc0f --- /dev/null +++ b/spec/fabricators/users_github_organization_fabricator.rb @@ -0,0 +1,2 @@ +Fabricator(:github_organization, from: 'users/github/organization') do +end diff --git a/spec/fabricators/users_github_profile_fabricator.rb b/spec/fabricators/users_github_profile_fabricator.rb new file mode 100644 index 00000000..52f49699 --- /dev/null +++ b/spec/fabricators/users_github_profile_fabricator.rb @@ -0,0 +1,2 @@ +Fabricator(:github_profile, from: 'users/github/profile') do +end diff --git a/spec/fabricators/users_github_repository_fabricator.rb b/spec/fabricators/users_github_repository_fabricator.rb new file mode 100644 index 00000000..3d95d2bd --- /dev/null +++ b/spec/fabricators/users_github_repository_fabricator.rb @@ -0,0 +1,3 @@ +Fabricator(:github_repository, from: 'users/github/repository') do + github_id 123456789 +end diff --git a/spec/features/errors/internal_error_spec.rb b/spec/features/errors/internal_error_spec.rb new file mode 100644 index 00000000..69f049e2 --- /dev/null +++ b/spec/features/errors/internal_error_spec.rb @@ -0,0 +1,22 @@ +require 'rails_helper' + +feature 'Custom 500 Page', skip: true do + before(:all) do + Rails.application.config.action_dispatch.show_exceptions = true + Rails.application.config.consider_all_requests_local = false + end + + after(:all) do + Rails.application.config.action_dispatch.show_exceptions = false + Rails.application.config.consider_all_requests_local = true + end + + scenario 'User is presented 500 page when an exception is raised' do + allow(User).to receive(:find_by_username!).and_raise(StandardError) + + visit '/user_causes_500_error' + + expect(page). + to have_content('Coderwall had an issue but hold on to your localhosts') + end +end diff --git a/spec/features/errors/not_found_spec.rb b/spec/features/errors/not_found_spec.rb new file mode 100644 index 00000000..0dea7501 --- /dev/null +++ b/spec/features/errors/not_found_spec.rb @@ -0,0 +1,25 @@ +require 'rails_helper' + +feature 'Custom 404 Page', skip: true do + before(:all) do + Rails.application.config.action_dispatch.show_exceptions = true + Rails.application.config.consider_all_requests_local = false + end + + after(:all) do + Rails.application.config.action_dispatch.show_exceptions = false + Rails.application.config.consider_all_requests_local = true + end + + scenario 'user is presented 404 page when they visit invalid path' do + visit '/fake/path/doesnt/match/route' + + expect(page).to have_content('Uh oh, something went wrong!') + end + + scenario 'user is presented 404 page when then visit a bad user path' do + visit '/not_a_real_username' + + expect(page).to have_content('Uh oh, something went wrong!') + end +end diff --git a/spec/features/helpers/general_helpers.rb b/spec/features/helpers/general_helpers.rb new file mode 100644 index 00000000..64302a57 --- /dev/null +++ b/spec/features/helpers/general_helpers.rb @@ -0,0 +1,37 @@ +module Features + module GeneralHelpers + def login_as(settings = {}) + settings.reverse_merge!( + username: 'test_user', + email: 'test_user@test.com', + location: 'Iceland', + bypass_ui_login: false + ) + + if settings[:bypass_ui_login] + settings.delete(:bypass_ui_login) + + user = User.create(settings) + page.set_rack_session(current_user: user.id) + else + visit '/auth/developer' + + fill_in 'name', with: settings[:username] + fill_in 'email', with: settings[:email] + click_button 'Sign In' + + fill_in 'user_username', with: settings[:username] + fill_in 'user_location', with: settings[:location] + click_button 'Finish' + end + + user + end + + def create_team(name = 'TEST_TEAM') + visit '/employers' + fill_in 'team_name', with: name + click_button 'Next' + end + end +end diff --git a/spec/features/steps/basic_steps.rb b/spec/features/steps/basic_steps.rb new file mode 100644 index 00000000..efddc645 --- /dev/null +++ b/spec/features/steps/basic_steps.rb @@ -0,0 +1,43 @@ +step 'I am logged in as :name with email :email' do |name, email| + login_as(username: name, email: email, bypass_ui_login: true) + @logged_in_user = User.where(username: name).first +end + +step 'I go/am to/on page for :pupropse' do |purpose| + path = case purpose + when 'team management' then team_path(@logged_in_user.reload.team) + end + + visit path +end + +step 'show me the page' do + page.save_screenshot('tmp/screenshot.png', full: true) +end + +step 'I click :link_name' do |name| + click_link name +end + +step 'I am an administrator' do + @logged_in_user.admin = true + @logged_in_user.save +end + +step 'I should see :text' do |text| + expect(page).to have_content(text) +end + +step 'I should see:' do |table| + table.hashes.each do |text| + expect(page).to have_content(text.values.first) + end +end + +step 'the last email should contain:' do |table| + mail = ActionMailer::Base.deliveries.last + + table.hashes.each do |text| + expect(mail).to have_content(text.values.first) + end +end diff --git a/spec/features/steps/team_steps.rb b/spec/features/steps/team_steps.rb new file mode 100644 index 00000000..a13d56f2 --- /dev/null +++ b/spec/features/steps/team_steps.rb @@ -0,0 +1,49 @@ +step 'a team :team_name exists' do |team_name| + Fabricate(:team, name: team_name) +end + +step 'team :team_name is subscribed to plan :plan_name with card :card_no' do |team_name, plan_name, card_no| + plan = Fabricate.build(:plan, name: plan_name) + + stripe_plan = JSON.parse(File.read('./spec/fixtures/stripe/stripe_plan.json')).with_indifferent_access.tap do |h| + h[:interval] = plan.interval + h[:name] = plan.name + h[:created] = plan.created_at + h[:amount] = plan.amount + h[:currency] = plan.currency + h[:id] = plan.public_id + end + stub_request(:post, /api.stripe.com\/v1\/plans/).to_return(body: stripe_plan.to_json) + + plan.save + + team = Team.where(name: team_name).first + team.account.plan_ids = [plan.id] + team.save + + stripe_customer = JSON.parse(File.read('./spec/fixtures/stripe/stripe_customer.json')).with_indifferent_access.tap do |h| + h[:id] = team.account.stripe_customer_token + h[:description] = "test@test.com for #{team_name}" + h[:cards][:data].first[:last4] = card_no + end + stub_request(:get, /api.stripe.com\/v1\/customers\/#{team.account.stripe_customer_token}/).to_return(body: stripe_customer.to_json) +end + +step 'team :team_name has invoices with data:' do |team_name, table| + team = Team.where(name: team_name).first + data = table.rows_hash + + stripe_invoices = JSON.parse(File.read('./spec/fixtures/stripe/stripe_invoices.json')).with_indifferent_access.tap do |h| + h[:data].first[:date] = Date.parse(data['Date']).to_time.to_i + h[:data].first[:lines][:data].first[:period][:start] = Date.parse(data['Start']).to_time.to_i + h[:data].first[:lines][:data].first[:period][:end] = Date.parse(data['End']).to_time.to_i + end + stub_request(:get, /api.stripe.com\/v1\/invoices/).to_return(body: stripe_invoices.to_json) +end + +step 'I am member of team :team_name' do |team_name| + team = Team.find_by(name: team_name) + team.add_user(@logged_in_user) + team.account.admin_id = @logged_in_user.id + team.save +end diff --git a/spec/features/teams/account_management.feature b/spec/features/teams/account_management.feature new file mode 100644 index 00000000..4b6ef2fc --- /dev/null +++ b/spec/features/teams/account_management.feature @@ -0,0 +1,36 @@ +@js +Feature: Generating an invoice + In order to know what I was charged for + As a customer + I would like to receive invoice by email + + Background: + Given a team BOB_TEAM exists + And team BOB_TEAM is subscribed to plan 'monthly' with card '1234' + + Given I am logged in as Bob with email 'bob@bob.com' + And I am an administrator + And I am member of team BOB_TEAM + + @skip + Scenario: Request an invoice + Given team 'BOB_TEAM' has invoices with data: + | Field | Value | + | Date | 10/11/2015 | + | Start | 02/11/2015 | + | End | 02/12/2015 | + When I go to page for "team management" + And I click 'Send Invoice' + Then show me the page + Then I should see 'sent invoice for October to bob@bob.com' + And the last email should contain: + | Text | + | Your card ending in 1234 has been charged | + | Bill Date: November 10th, 2015 | + | Bill To: bob BOB_TEAM | + | Duration: November 2nd, 2015-December 2nd, 2015 | + | Description: Enhanced Team Profile | + | Price: $99.00 | + | Assembly Made, Inc | + | 548 Market St #45367 | + | San Francisco, CA 94104-5401 | diff --git a/spec/features/teams/team_management_spec.rb b/spec/features/teams/team_management_spec.rb new file mode 100644 index 00000000..e47ced8c --- /dev/null +++ b/spec/features/teams/team_management_spec.rb @@ -0,0 +1,94 @@ +require 'rails_helper' + +feature 'Teams management', js: true, skip: true do + + background do + stub_request(:post, /api.mixpanel.com/) + login_as(username: 'alice', bypass_ui_login: true) + end + + context 'creating a team with no similar names in db' do + scenario 'create a new team' do + create_team('TEST_TEAM') + expect(page).to have_content('Successfully created a team TEST_TEAM') + end + + scenario 'add user to the newly created team' do + create_team('TEST_TEAM') + + find('section.feature.payment') # ensures that we wait until the create_team action completes + visit '/alice' + + expect(page).to have_content('TEST_TEAM') + end + + scenario 'show payment plans selection' do + create_team('TEST_TEAM') + + expect(page).to have_content('Select a plan and enter payment details to get started') + expect(page).to have_content('FREE') + expect(page).to have_content('MONTHLY') + expect(page).to have_content('ANALYTICS') + end + + scenario 'redirect to team profile page when user selects FREE plan' do + create_team('TEST_TEAM') + find('section.feature.payment').find('.plans .plan.free').click_link 'Select plan' + + team_id = Team.any_of(name: 'TEST_TEAM').first.id + expect(current_path).to eq(team_path(team_id)) + end + end + + context 'create a team with similar names already in db' do + let!(:team) { Team.create(name: 'EXISTING_TEAM') } + + scenario 'create a new team' do + create_team('TEAM') + + expect(page).to have_content('We found some matching teams') + expect(page).to have_content('EXISTING_TEAM') + expect(page).to have_content('Select') + expect(page).to have_content('None of the above are my team') + expect(page).to have_content('Create team TEAM') + end + + scenario 'create a new team with originally supplied name' do + create_team('TEAM') + find('.just-create-team').click_link('Create team TEAM') + expect(page).to have_content('Successfully created a team TEAM') + end + + scenario 'attempt to create a team with exact name already in db' do + create_team('EXISTING_TEAM') + find('.just-create-team').click_link('Create team EXISTING_TEAM') + expect(page).to have_content('There was an error in creating a team EXISTING_TEAM') + expect(page).to have_content('Name is already taken') + end + end + + context 'join a team with a similar name' do + let!(:team) { Team.create(name: 'EXISTING_TEAM') } + + scenario 'join an existing team' do + create_team('TEAM') + + find('.results-list').click_link('Select') + + expect(page).to have_content('Select a plan and enter payment details to get started') + expect(page).to have_content('I work at EXISTING_TEAM and just want to join the team') + expect(page).to have_content('Request to join team') + end + + scenario 'request to join a team' do + create_team('TEAM') + + find('.results-list').click_link('Select') + find('section.feature.payment').click_link 'Request to join team' + + expect(current_path).to eq(teamname_path(team.slug)) + expect(page).to have_content('We have submitted your join request to the team admin to approve') + end + end + +end diff --git a/spec/features/users/user_management_spec.rb b/spec/features/users/user_management_spec.rb new file mode 100644 index 00000000..3c97a3e0 --- /dev/null +++ b/spec/features/users/user_management_spec.rb @@ -0,0 +1,58 @@ +require 'rails_helper' + +feature 'User management', js: true, skip: true do + describe 'deleting a user' do + before do + stub_request(:post, /api.mixpanel.com/) + end + + let!(:user) { login_as(username: 'alice', bypass_ui_login: true) } + + scenario 'user is presented with confirmation dialog when deletes his account' do + visit '/settings' + find('.delete').click_link 'click here.' + + expect(page).to have_content 'Warning: clicking this link below will permenatly delete your Coderwall account and its data.' + expect(page).to have_button 'Delete your account & sign out' + end + + scenario 'user is redirected to /welcome after deleting hios account' do + visit '/settings' + find('.delete').click_link 'click here.' + find('.save').click_button 'Delete your account & sign out' + + expect(current_path).to eq('/welcome') + end + + scenario 'user cannot login after deleting his account' do + visit '/settings' + find('.delete').click_link 'click here.' + find('.save').click_button 'Delete your account & sign out' + + visit '/auth/developer' + fill_in 'name', with: user.username + fill_in 'email', with: user.email + click_button 'Sign In' + + expect(current_path).to eq(new_user_path) + end + + scenario 'users protips are not displayed after he deletes his account' do + Protip.rebuild_index + protip_1, protip_2 = Fabricate.times(2, :protip, user: user) + protip_3 = Fabricate(:protip) + + visit '/settings' + find('.delete').click_link 'click here.' + find('.save').click_button 'Delete your account & sign out' + + login_as(username: 'bob', bypass_ui_login: true) + visit '/p/fresh' + + expect(page).not_to have_content(protip_1.title) + expect(page).not_to have_content(protip_2.title) + expect(page).to have_content(protip_3.title) + end + end + +end diff --git a/spec/fixtures/oauth/github_response.json b/spec/fixtures/oauth/github_response.json new file mode 100644 index 00000000..bf5eb88b --- /dev/null +++ b/spec/fixtures/oauth/github_response.json @@ -0,0 +1,46 @@ +{ + "provider": "github", + "uid": "1_310_330", + "info": { + "nickname": "throwaway1", + "email": "md@asdf.com", + "name": null, + "urls": { + "GitHub": "https://github.com/throwaway1", + "Blog": null + } + }, + "credentials": { + "token": "59cdff603a4e70d47f0a28b5ccaa3935aaa790cf", + "expires": false + }, + "extra": { + "raw_info": { + "owned_private_repos": 0, + "type": "User", + "avatar_url" : "https://secure.gravatar.com/avatar/b08ed2199f8a88360c9679a57c4f9305?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png", + "created_at" : "2012-01-06T20:49:02Z", + "login" : "throwaway1", + "disk_usage" : 0, + "plan" : { + "space" : "307_200", + "private_repos" : 0, + "name" : "free", + "collaborators" : 0 + }, + "public_repos": 0, + "following": 0, + "public_gists": 0, + "followers": 0, + "gravatar_id": "b08ed2199f8a88360c9679a57c4f9305", + "total_private_repos": 0, + "collaborators": 0, + "html_url": "https://github.com/throwaway1", + "url": "https://api.github.com/users/throwaway1", + "id": "1_310_330", + "private_gists": 0 + } + } +} + + diff --git a/spec/fixtures/oauth/linkedin_response.json b/spec/fixtures/oauth/linkedin_response.json new file mode 100644 index 00000000..1434bfa2 --- /dev/null +++ b/spec/fixtures/oauth/linkedin_response.json @@ -0,0 +1,30 @@ +{ + "provider":"linkedin", + "uid":"DlC5AmUPnM", + "info":{ + "first_name":"Matthew", + "last_name":"Deiters", + "name":"Matthew Deiters", + "headline":"-", + "image":"http://media.linkedin.com/mpr/mprx/0_gPLYkP6hYm6ap1Vcxq5TkrTSYulmpzUc0tA3krFxTW5YiluBAvztoKPlKGAlx-sRyKF8wBv2M2QD", + "industry":"Computer Software", + "urls":{ + "public_profile":"http://www.linkedin.com/in/matthewdeiters" + } + }, + "credentials":{ + "token":"acafe540-606a-4f73-aef7-f6eba276603", + "secret":"df7427be-3d93-4563-baef-d1d38826686" + }, + "extra":{ + "raw_info":{ + "firstName":"Matthew", + "headline":"-", + "id":"DlC5AmUPnM", + "industry":"Computer Software", + "lastName":"Deiters", + "pictureUrl":"http://media.linkedin.com/mpr/mprx/0_gPLYkP6hYm6ap1Vcxq5TkrTSYulmpzUc0tA3krFxTW5YiluBAvztoKPlKGAlx-sRyKF8wBv2M2QD", + "publicProfileUrl":"http://www.linkedin.com/in/matthewdeiters" + } + } +} diff --git a/spec/fixtures/oauth/twitter_response.json b/spec/fixtures/oauth/twitter_response.json new file mode 100644 index 00000000..1ff331b9 --- /dev/null +++ b/spec/fixtures/oauth/twitter_response.json @@ -0,0 +1,81 @@ +{ + "provider":"twitter", + "uid":"6271932", + "info":{ + "nickname":"mdeiters", + "name":"matthew deiters", + "location":"San Francisco", + "image":"http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", + "description":"Dad. Amateur Foodie. Founder Extraordinaire of @coderwall", + "urls":{ + "Website":"http://coderwall.com/mdeiters", + "Twitter":"http://twitter.com/mdeiters" + } + }, + "credentials":{ + "token":"6271932-8erxrXfJykBNMrvsdCEq5WqKd6FIcO97L9BzvPq7", + "secret":"8fRS1ZARd6Wm53wvvDwHNrBmZcW0H2aSwmQjuOTHl" + }, + "extra":{ + "raw_info":{ + "lang":"en", + "profile_background_image_url":"http://a2.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg", + "protected":false, + "time_zone":"Pacific Time (US & Canada)", + "created_at":"Wed May 23 21:14:29 +0000 2007", + "profile_link_color":"0084B4", + "name":"matthew deiters", + "listed_count":27, + "contributors_enabled":false, + "followers_count":375, + "profile_image_url":"http://a1.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", + "utc_offset":-28800, + "profile_background_color":"9AE4E8", + "description":"Dad. Amateur Foodie. Founder Extraordinaire of @coderwall", + "statuses_count":720, + "profile_background_tile":false, + "following":false, + "verified":false, + "profile_sidebar_fill_color":"DDFFCC", + "status":{ + "in_reply_to_user_id":5446832, + "favorited":false, + "place":null, + "created_at":"Sat Jan 07 01:57:54 +0000 2012", + "retweet_count":0, + "in_reply_to_screen_name":"chrislloyd", + "in_reply_to_status_id_str":"155460652457148416", + "retweeted":false, + "in_reply_to_user_id_str":"5446832", + "geo":null, + "in_reply_to_status_id":155460652457148416, + "id_str":"155468169815932928", + "contributors":null, + "coordinates":null, + "truncated":false, + "source":"<a href=\"http://twitter.com/#!/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>", + "id":155468169815932928, + "text":"@minefold @chrislloyd FYI your losing seo juice with a blog sub domain" + }, + "default_profile_image":false, + "friends_count":301, + "location":"San Francisco", + "screen_name":"mdeiters", + "default_profile":false, + "profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/6771536/Fresh-Grass_1600.jpg", + "profile_sidebar_border_color":"BDDCAD", + "id_str":"6271932", + "is_translator":false, + "geo_enabled":true, + "url":"http://coderwall.com/mdeiters", + "profile_image_url_https":"https://si0.twimg.com/profile_images/1672080012/instagram_profile_normal.jpg", + "profile_use_background_image":true, + "favourites_count":178, + "id":6271932, + "show_all_inline_media":false, + "follow_request_sent":false, + "notifications":false, + "profile_text_color":"333333" + } + } +} diff --git a/spec/fixtures/protip_mailer/popular_protips b/spec/fixtures/protip_mailer/popular_protips new file mode 100644 index 00000000..160a966a --- /dev/null +++ b/spec/fixtures/protip_mailer/popular_protips @@ -0,0 +1,3 @@ +ProtipMailer#popular_protips + +Hi, find me in app/views/protip_mailer/popular_protips diff --git a/spec/fixtures/stripe/stripe_customer.json b/spec/fixtures/stripe/stripe_customer.json new file mode 100644 index 00000000..3c1ea389 --- /dev/null +++ b/spec/fixtures/stripe/stripe_customer.json @@ -0,0 +1,88 @@ +{ + "object": "customer", + "created": 1414869388, + "id": "id", + "livemode": false, + "description": "description", + "email": null, + "delinquent": false, + "metadata": { + }, + "subscriptions": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_54FsD2W2VkrKpW/subscriptions", + "data": [ + { + "id": "sub_54Fs1HFcWAAIpq", + "plan": { + "interval": "month", + "name": "Monthly", + "created": 1414770688, + "amount": 9900, + "currency": "usd", + "id": "xdvd6q", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": { + }, + "statement_description": null + }, + "object": "subscription", + "start": 1414869391, + "status": "active", + "customer": "cus_54FsD2W2VkrKpW", + "cancel_at_period_end": false, + "current_period_start": 1414869391, + "current_period_end": 1417461391, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": { + } + } + ] + }, + "discount": null, + "account_balance": 0, + "currency": "eur", + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_54FsD2W2VkrKpW/cards", + "data": [ + { + "id": "card_14u7LDFs0zmMxCeEcXXov7c3", + "object": "card", + "last4": "#{card_no}", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2015, + "fingerprint": "ki37AQ0kNMxXqji5", + "country": "US", + "name": "test@test.com", + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "dynamic_last4": null, + "customer": "cus_54FsD2W2VkrKpW" + } + ] + }, + "default_card": "card_14u7LDFs0zmMxCeEcXXov7c3" +} diff --git a/spec/fixtures/stripe/stripe_invoices.json b/spec/fixtures/stripe/stripe_invoices.json new file mode 100644 index 00000000..08bda14d --- /dev/null +++ b/spec/fixtures/stripe/stripe_invoices.json @@ -0,0 +1,78 @@ +{ + "object": "list", + "count": 3, + "url": "/v1/invoices", + "data": [ + { + "date": 1351728000, + "id": "in_14u7MRFs0zmMxCeEaT5cKVge", + "period_start": 1414869391, + "period_end": 1414869391, + "lines": { + "data": [ + { + "id": "sub_54eOiJskbnJ8Fn", + "object": "line_item", + "type": "subscription", + "livemode": true, + "amount": 3, + "currency": "eur", + "proration": false, + "period": { + "start": 1351728000, + "end": 1351728000 + }, + "subscription": null, + "quantity": 1, + "plan": { + "interval": "month", + "name": "plan_no_1", + "created": 1414956345, + "amount": 3, + "currency": "eur", + "id": "aja7sg", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": { + }, + "statement_description": null + }, + "description": null, + "metadata": { + } + } + ], + "count": 1, + "object": "list", + "url": "/v1/invoices/in_14u7MRFs0zmMxCeEaT5cKVge/lines" + }, + "subtotal": 9900, + "total": 9900, + "customer": "cus_54FsD2W2VkrKpW", + "object": "invoice", + "attempted": true, + "closed": true, + "forgiven": false, + "paid": true, + "livemode": false, + "attempt_count": 1, + "amount_due": 9900, + "currency": "eur", + "starting_balance": 0, + "ending_balance": 0, + "next_payment_attempt": null, + "webhooks_delivered_at": 1414869391, + "charge": "ch_14u7MRFs0zmMxCeE4GIkvsLG", + "discount": null, + "application_fee": null, + "subscription": "sub_54Fs1HFcWAAIpq", + "metadata": { + }, + "statement_description": null, + "description": null, + "receipt_number": null + } + ] +} diff --git a/spec/fixtures/stripe/stripe_plan.json b/spec/fixtures/stripe/stripe_plan.json new file mode 100644 index 00000000..42e48689 --- /dev/null +++ b/spec/fixtures/stripe/stripe_plan.json @@ -0,0 +1,13 @@ +{ + "interval": "interval", + "name": "name", + "created": 1351728000, + "amount": 29.99, + "currency": "usd", + "id": "asn53dl", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": "", + "statement_description": "" +} diff --git a/spec/fixtures/vcr_cassettes/Account.yml b/spec/fixtures/vcr_cassettes/Account.yml new file mode 100644 index 00000000..1063f20e --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Account.yml @@ -0,0 +1,3223 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdkc92GIWGvM + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:49 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364588, + "id": "cus_4TNdkc92GIWGvM", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdkc92GIWGvM/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdkc92GIWGvM/cards", + "data": [ + { + "id": "card_14KQsB4AnjI1zHWBRaAUrENZ", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdkc92GIWGvM" + } + ] + }, + "default_card": "card_14KQsB4AnjI1zHWBRaAUrENZ" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:49 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdkc92GIWGvM + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:49 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Max-Age: + - '300' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364588, + "id": "cus_4TNdkc92GIWGvM", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdkc92GIWGvM/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdkc92GIWGvM/cards", + "data": [ + { + "id": "card_14KQsB4AnjI1zHWBRaAUrENZ", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdkc92GIWGvM" + } + ] + }, + "default_card": "card_14KQsB4AnjI1zHWBRaAUrENZ" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:50 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNdkc92GIWGvM/subscription + body: + encoding: US-ASCII + string: plan=e0xbaw + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:50 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '733' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNdJ2lhA0faFB", + "plan": { + "interval": "month", + "name": "Starter", + "created": 1406364588, + "amount": 0, + "currency": "usd", + "id": "e0xbaw", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364590, + "status": "active", + "customer": "cus_4TNdkc92GIWGvM", + "cancel_at_period_end": false, + "current_period_start": 1406364590, + "current_period_end": 1409042990, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:50 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdBL7wMg5gl3 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:52 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364591, + "id": "cus_4TNdBL7wMg5gl3", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdBL7wMg5gl3/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdBL7wMg5gl3/cards", + "data": [ + { + "id": "card_14KQsF4AnjI1zHWBXdzm90Ms", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdBL7wMg5gl3" + } + ] + }, + "default_card": "card_14KQsF4AnjI1zHWBXdzm90Ms" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:52 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdBL7wMg5gl3 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:53 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364591, + "id": "cus_4TNdBL7wMg5gl3", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdBL7wMg5gl3/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdBL7wMg5gl3/cards", + "data": [ + { + "id": "card_14KQsF4AnjI1zHWBXdzm90Ms", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdBL7wMg5gl3" + } + ] + }, + "default_card": "card_14KQsF4AnjI1zHWBXdzm90Ms" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:53 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNdBL7wMg5gl3/subscription + body: + encoding: US-ASCII + string: plan=0a4_rq + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:54 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '733' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNdjcz54N4fBW", + "plan": { + "interval": "month", + "name": "Starter", + "created": 1406364592, + "amount": 0, + "currency": "usd", + "id": "0a4_rq", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364593, + "status": "active", + "customer": "cus_4TNdBL7wMg5gl3", + "cancel_at_period_end": false, + "current_period_start": 1406364593, + "current_period_end": 1409042993, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:54 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdFAlM4jh4r5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:59 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '2224' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364595, + "id": "cus_4TNdFAlM4jh4r5", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdFAlM4jh4r5/subscriptions", + "data": [ + { + "id": "sub_4TNdruQ8FLO4l3", + "plan": { + "interval": "month", + "name": "Starter", + "created": 1406364596, + "amount": 0, + "currency": "usd", + "id": "cjvtbq", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364598, + "status": "active", + "customer": "cus_4TNdFAlM4jh4r5", + "cancel_at_period_end": false, + "current_period_start": 1406364598, + "current_period_end": 1409042998, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + ] + }, + "discount": null, + "account_balance": 0, + "currency": "usd", + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdFAlM4jh4r5/cards", + "data": [ + { + "id": "card_14KQsI4AnjI1zHWBN6qwAjw6", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdFAlM4jh4r5" + } + ] + }, + "default_card": "card_14KQsI4AnjI1zHWBN6qwAjw6" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:59 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdFAlM4jh4r5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:00 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '2224' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364595, + "id": "cus_4TNdFAlM4jh4r5", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdFAlM4jh4r5/subscriptions", + "data": [ + { + "id": "sub_4TNdruQ8FLO4l3", + "plan": { + "interval": "month", + "name": "Starter", + "created": 1406364596, + "amount": 0, + "currency": "usd", + "id": "cjvtbq", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364598, + "status": "active", + "customer": "cus_4TNdFAlM4jh4r5", + "cancel_at_period_end": false, + "current_period_start": 1406364598, + "current_period_end": 1409042998, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + ] + }, + "discount": null, + "account_balance": 0, + "currency": "usd", + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdFAlM4jh4r5/cards", + "data": [ + { + "id": "card_14KQsI4AnjI1zHWBN6qwAjw6", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdFAlM4jh4r5" + } + ] + }, + "default_card": "card_14KQsI4AnjI1zHWBN6qwAjw6" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:00 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdFAlM4jh4r5 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:00 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '2224' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364595, + "id": "cus_4TNdFAlM4jh4r5", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdFAlM4jh4r5/subscriptions", + "data": [ + { + "id": "sub_4TNdruQ8FLO4l3", + "plan": { + "interval": "month", + "name": "Starter", + "created": 1406364596, + "amount": 0, + "currency": "usd", + "id": "cjvtbq", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364598, + "status": "active", + "customer": "cus_4TNdFAlM4jh4r5", + "cancel_at_period_end": false, + "current_period_start": 1406364598, + "current_period_end": 1409042998, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + ] + }, + "discount": null, + "account_balance": 0, + "currency": "usd", + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdFAlM4jh4r5/cards", + "data": [ + { + "id": "card_14KQsI4AnjI1zHWBN6qwAjw6", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdFAlM4jh4r5" + } + ] + }, + "default_card": "card_14KQsI4AnjI1zHWBN6qwAjw6" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:00 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNdFAlM4jh4r5/subscription + body: + encoding: US-ASCII + string: plan=hptmoq + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:01 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '747' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNdruQ8FLO4l3", + "plan": { + "interval": "month", + "name": "Recruiting Magnet", + "created": 1406364599, + "amount": 15000, + "currency": "usd", + "id": "hptmoq", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364601, + "status": "active", + "customer": "cus_4TNdFAlM4jh4r5", + "cancel_at_period_end": false, + "current_period_start": 1406364601, + "current_period_end": 1409043001, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:01 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNd4v7FfVoPZB + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:03 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364602, + "id": "cus_4TNd4v7FfVoPZB", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNd4v7FfVoPZB/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNd4v7FfVoPZB/cards", + "data": [ + { + "id": "card_14KQsQ4AnjI1zHWB3UC3Qs6t", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNd4v7FfVoPZB" + } + ] + }, + "default_card": "card_14KQsQ4AnjI1zHWB3UC3Qs6t" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:04 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNd4v7FfVoPZB + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:04 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364602, + "id": "cus_4TNd4v7FfVoPZB", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNd4v7FfVoPZB/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNd4v7FfVoPZB/cards", + "data": [ + { + "id": "card_14KQsQ4AnjI1zHWB3UC3Qs6t", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNd4v7FfVoPZB" + } + ] + }, + "default_card": "card_14KQsQ4AnjI1zHWB3UC3Qs6t" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:04 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNd4v7FfVoPZB/subscription + body: + encoding: US-ASCII + string: plan=ir3fnq + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:05 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '733' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNdUQelePgIxb", + "plan": { + "interval": "month", + "name": "Starter", + "created": 1406364603, + "amount": 0, + "currency": "usd", + "id": "ir3fnq", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364605, + "status": "active", + "customer": "cus_4TNd4v7FfVoPZB", + "cancel_at_period_end": false, + "current_period_start": 1406364605, + "current_period_end": 1409043005, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:05 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdjnHIIgSIzT + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:09 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Max-Age: + - '300' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364608, + "id": "cus_4TNdjnHIIgSIzT", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdjnHIIgSIzT/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdjnHIIgSIzT/cards", + "data": [ + { + "id": "card_14KQsV4AnjI1zHWBBQsjLseP", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdjnHIIgSIzT" + } + ] + }, + "default_card": "card_14KQsV4AnjI1zHWBBQsjLseP" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:09 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdjnHIIgSIzT + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:09 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364608, + "id": "cus_4TNdjnHIIgSIzT", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdjnHIIgSIzT/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdjnHIIgSIzT/cards", + "data": [ + { + "id": "card_14KQsV4AnjI1zHWBBQsjLseP", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdjnHIIgSIzT" + } + ] + }, + "default_card": "card_14KQsV4AnjI1zHWBBQsjLseP" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:09 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNdjnHIIgSIzT/subscription + body: + encoding: US-ASCII + string: plan=y9pwhw + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:10 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '747' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNd2dHaCMzenk", + "plan": { + "interval": "month", + "name": "Recruiting Magnet", + "created": 1406364608, + "amount": 15000, + "currency": "usd", + "id": "y9pwhw", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364610, + "status": "active", + "customer": "cus_4TNdjnHIIgSIzT", + "cancel_at_period_end": false, + "current_period_start": 1406364610, + "current_period_end": 1409043010, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:10 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdLaGHupFM5P + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:13 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364611, + "id": "cus_4TNdLaGHupFM5P", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdLaGHupFM5P/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdLaGHupFM5P/cards", + "data": [ + { + "id": "card_14KQsZ4AnjI1zHWBWaCSHSz1", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdLaGHupFM5P" + } + ] + }, + "default_card": "card_14KQsZ4AnjI1zHWBWaCSHSz1" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:13 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdLaGHupFM5P + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:14 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364611, + "id": "cus_4TNdLaGHupFM5P", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdLaGHupFM5P/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdLaGHupFM5P/cards", + "data": [ + { + "id": "card_14KQsZ4AnjI1zHWBWaCSHSz1", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdLaGHupFM5P" + } + ] + }, + "default_card": "card_14KQsZ4AnjI1zHWBWaCSHSz1" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:14 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNdLaGHupFM5P/subscription + body: + encoding: US-ASCII + string: plan=j4f7bw + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:14 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '747' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNdeOGbUpaVnW", + "plan": { + "interval": "month", + "name": "Recruiting Magnet", + "created": 1406364612, + "amount": 15000, + "currency": "usd", + "id": "j4f7bw", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364614, + "status": "active", + "customer": "cus_4TNdLaGHupFM5P", + "cancel_at_period_end": false, + "current_period_start": 1406364614, + "current_period_end": 1409043014, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:14 GMT +- request: + method: post + uri: https://api.stripe.com/v1/plans + body: + encoding: US-ASCII + string: amount=15000&interval=month&name=Recruiting%20Magnet¤cy=usd&id=xj9meg + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '75' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:21 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '284' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "interval": "month", + "name": "Recruiting Magnet", + "created": 1406364621, + "amount": 15000, + "currency": "usd", + "id": "xj9meg", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:21 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers + body: + encoding: US-ASCII + string: description=someone%40example.com%20for%20Coderwall&card=tok_14KQsi4AnjI1zHWBPaAy5qjQ + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '85' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:21 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364621, + "id": "cus_4TNem1Qjkdh9ft", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/cards", + "data": [ + { + "id": "card_14KQsi4AnjI1zHWBMlnioiSW", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNem1Qjkdh9ft" + } + ] + }, + "default_card": "card_14KQsi4AnjI1zHWBMlnioiSW" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:22 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNem1Qjkdh9ft + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:22 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364621, + "id": "cus_4TNem1Qjkdh9ft", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/cards", + "data": [ + { + "id": "card_14KQsi4AnjI1zHWBMlnioiSW", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNem1Qjkdh9ft" + } + ] + }, + "default_card": "card_14KQsi4AnjI1zHWBMlnioiSW" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:22 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNem1Qjkdh9ft + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:22 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364621, + "id": "cus_4TNem1Qjkdh9ft", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/cards", + "data": [ + { + "id": "card_14KQsi4AnjI1zHWBMlnioiSW", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNem1Qjkdh9ft" + } + ] + }, + "default_card": "card_14KQsi4AnjI1zHWBMlnioiSW" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:23 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNem1Qjkdh9ft/subscription + body: + encoding: US-ASCII + string: plan=xj9meg + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:23 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '747' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Access-Control-Max-Age: + - '300' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNedQOs35XlY5", + "plan": { + "interval": "month", + "name": "Recruiting Magnet", + "created": 1406364621, + "amount": 15000, + "currency": "usd", + "id": "xj9meg", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364623, + "status": "active", + "customer": "cus_4TNem1Qjkdh9ft", + "cancel_at_period_end": false, + "current_period_start": 1406364623, + "current_period_end": 1409043023, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:23 GMT +- request: + method: post + uri: https://api.stripe.com/v1/tokens + body: + encoding: US-ASCII + string: card[number]=4242424242424242&card[cvc]=224&card[exp_month]=12&card[exp_year]=14 + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '80' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:26 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '597' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "tok_14KQso4AnjI1zHWB5BMaPNFK", + "livemode": false, + "created": 1406364626, + "used": false, + "object": "token", + "type": "card", + "card": { + "id": "card_14KQso4AnjI1zHWBJNP8P8Le", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "customer": null + } + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:26 GMT +- request: + method: post + uri: https://api.stripe.com/v1/charges + body: + encoding: US-ASCII + string: amount=30000¤cy=usd&card=tok_14KQso4AnjI1zHWB5BMaPNFK&description=Single%20Job%20Post + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '91' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:26 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1214' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "ch_14KQso4AnjI1zHWBIWtTIUds", + "object": "charge", + "created": 1406364626, + "livemode": false, + "paid": true, + "amount": 30000, + "currency": "usd", + "refunded": false, + "card": { + "id": "card_14KQso4AnjI1zHWBJNP8P8Le", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": null + }, + "captured": true, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_14KQso4AnjI1zHWBIWtTIUds/refunds", + "data": [] + }, + "balance_transaction": "txn_14KQso4AnjI1zHWBQIxoSth5", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": null, + "invoice": null, + "description": "Single Job Post", + "dispute": null, + "metadata": {}, + "statement_description": null, + "receipt_email": null + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:27 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNem1Qjkdh9ft + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:55:57 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '2238' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364621, + "id": "cus_4TNem1Qjkdh9ft", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/subscriptions", + "data": [ + { + "id": "sub_4TNedQOs35XlY5", + "plan": { + "interval": "month", + "name": "Recruiting Magnet", + "created": 1406364621, + "amount": 15000, + "currency": "usd", + "id": "xj9meg", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364623, + "status": "active", + "customer": "cus_4TNem1Qjkdh9ft", + "cancel_at_period_end": false, + "current_period_start": 1406364623, + "current_period_end": 1409043023, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + ] + }, + "discount": null, + "account_balance": 0, + "currency": "usd", + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNem1Qjkdh9ft/cards", + "data": [ + { + "id": "card_14KQsi4AnjI1zHWBMlnioiSW", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNem1Qjkdh9ft" + } + ] + }, + "default_card": "card_14KQsi4AnjI1zHWBMlnioiSW" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:55:57 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdkc92GIWGvM + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:49 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364588, + "id": "cus_4TNdkc92GIWGvM", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdkc92GIWGvM/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdkc92GIWGvM/cards", + "data": [ + { + "id": "card_14KQsB4AnjI1zHWBRaAUrENZ", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdkc92GIWGvM" + } + ] + }, + "default_card": "card_14KQsB4AnjI1zHWBRaAUrENZ" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:49 GMT +- request: + method: get + uri: http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,%20CA&language=en&sensor=false + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sat, 26 Jul 2014 08:50:27 GMT + Expires: + - Sun, 27 Jul 2014 08:50:27 GMT + Cache-Control: + - public, max-age=86400 + Access-Control-Allow-Origin: + - "*" + Server: + - mafe + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - SAMEORIGIN + Alternate-Protocol: + - 80:quic + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: | + { + "results" : [ + { + "address_components" : [ + { + "long_name" : "San Francisco", + "short_name" : "SF", + "types" : [ "locality", "political" ] + }, + { + "long_name" : "San Francisco County", + "short_name" : "San Francisco County", + "types" : [ "administrative_area_level_2", "political" ] + }, + { + "long_name" : "California", + "short_name" : "CA", + "types" : [ "administrative_area_level_1", "political" ] + }, + { + "long_name" : "United States", + "short_name" : "US", + "types" : [ "country", "political" ] + } + ], + "formatted_address" : "San Francisco, CA, USA", + "geometry" : { + "bounds" : { + "northeast" : { + "lat" : 37.9297707, + "lng" : -122.3279149 + }, + "southwest" : { + "lat" : 37.6933354, + "lng" : -123.1077733 + } + }, + "location" : { + "lat" : 37.7749295, + "lng" : -122.4194155 + }, + "location_type" : "APPROXIMATE", + "viewport" : { + "northeast" : { + "lat" : 37.812, + "lng" : -122.3482 + }, + "southwest" : { + "lat" : 37.70339999999999, + "lng" : -122.527 + } + } + }, + "types" : [ "locality", "political" ] + } + ], + "status" : "OK" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:27 GMT +- request: + method: get + uri: http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,%20CA&language=en&sensor=false + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sat, 26 Jul 2014 08:50:27 GMT + Expires: + - Sun, 27 Jul 2014 08:50:27 GMT + Cache-Control: + - public, max-age=86400 + Access-Control-Allow-Origin: + - "*" + Server: + - mafe + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - SAMEORIGIN + Alternate-Protocol: + - 80:quic + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: | + { + "results" : [ + { + "address_components" : [ + { + "long_name" : "San Francisco", + "short_name" : "SF", + "types" : [ "locality", "political" ] + }, + { + "long_name" : "San Francisco County", + "short_name" : "San Francisco County", + "types" : [ "administrative_area_level_2", "political" ] + }, + { + "long_name" : "California", + "short_name" : "CA", + "types" : [ "administrative_area_level_1", "political" ] + }, + { + "long_name" : "United States", + "short_name" : "US", + "types" : [ "country", "political" ] + } + ], + "formatted_address" : "San Francisco, CA, USA", + "geometry" : { + "bounds" : { + "northeast" : { + "lat" : 37.9297707, + "lng" : -122.3279149 + }, + "southwest" : { + "lat" : 37.6933354, + "lng" : -123.1077733 + } + }, + "location" : { + "lat" : 37.7749295, + "lng" : -122.4194155 + }, + "location_type" : "APPROXIMATE", + "viewport" : { + "northeast" : { + "lat" : 37.812, + "lng" : -122.3482 + }, + "southwest" : { + "lat" : 37.70339999999999, + "lng" : -122.527 + } + } + }, + "types" : [ "locality", "political" ] + } + ], + "status" : "OK" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:27 GMT +- request: + method: get + uri: http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,%20CA&language=en&sensor=false + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sat, 26 Jul 2014 08:50:27 GMT + Expires: + - Sun, 27 Jul 2014 08:50:27 GMT + Cache-Control: + - public, max-age=86400 + Access-Control-Allow-Origin: + - "*" + Server: + - mafe + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - SAMEORIGIN + Alternate-Protocol: + - 80:quic + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: | + { + "results" : [ + { + "address_components" : [ + { + "long_name" : "San Francisco", + "short_name" : "SF", + "types" : [ "locality", "political" ] + }, + { + "long_name" : "San Francisco County", + "short_name" : "San Francisco County", + "types" : [ "administrative_area_level_2", "political" ] + }, + { + "long_name" : "California", + "short_name" : "CA", + "types" : [ "administrative_area_level_1", "political" ] + }, + { + "long_name" : "United States", + "short_name" : "US", + "types" : [ "country", "political" ] + } + ], + "formatted_address" : "San Francisco, CA, USA", + "geometry" : { + "bounds" : { + "northeast" : { + "lat" : 37.9297707, + "lng" : -122.3279149 + }, + "southwest" : { + "lat" : 37.6933354, + "lng" : -123.1077733 + } + }, + "location" : { + "lat" : 37.7749295, + "lng" : -122.4194155 + }, + "location_type" : "APPROXIMATE", + "viewport" : { + "northeast" : { + "lat" : 37.812, + "lng" : -122.3482 + }, + "southwest" : { + "lat" : 37.70339999999999, + "lng" : -122.527 + } + } + }, + "types" : [ "locality", "political" ] + } + ], + "status" : "OK" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:27 GMT +- request: + method: get + uri: http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,%20CA&language=en&sensor=false + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sat, 26 Jul 2014 08:50:27 GMT + Expires: + - Sun, 27 Jul 2014 08:50:27 GMT + Cache-Control: + - public, max-age=86400 + Access-Control-Allow-Origin: + - "*" + Server: + - mafe + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - SAMEORIGIN + Alternate-Protocol: + - 80:quic + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: | + { + "results" : [ + { + "address_components" : [ + { + "long_name" : "San Francisco", + "short_name" : "SF", + "types" : [ "locality", "political" ] + }, + { + "long_name" : "San Francisco County", + "short_name" : "San Francisco County", + "types" : [ "administrative_area_level_2", "political" ] + }, + { + "long_name" : "California", + "short_name" : "CA", + "types" : [ "administrative_area_level_1", "political" ] + }, + { + "long_name" : "United States", + "short_name" : "US", + "types" : [ "country", "political" ] + } + ], + "formatted_address" : "San Francisco, CA, USA", + "geometry" : { + "bounds" : { + "northeast" : { + "lat" : 37.9297707, + "lng" : -122.3279149 + }, + "southwest" : { + "lat" : 37.6933354, + "lng" : -123.1077733 + } + }, + "location" : { + "lat" : 37.7749295, + "lng" : -122.4194155 + }, + "location_type" : "APPROXIMATE", + "viewport" : { + "northeast" : { + "lat" : 37.812, + "lng" : -122.3482 + }, + "southwest" : { + "lat" : 37.70339999999999, + "lng" : -122.527 + } + } + }, + "types" : [ "locality", "political" ] + } + ], + "status" : "OK" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:27 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/Account_Invalid.yml b/spec/fixtures/vcr_cassettes/Account_Invalid.yml new file mode 100644 index 00000000..de2ffbc0 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Account_Invalid.yml @@ -0,0 +1,142 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/tokens + body: + encoding: US-ASCII + string: card[number]=4242424242424242&card[cvc]=224&card[exp_month]=12&card[exp_year]=14 + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '80' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 09:00:59 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '597' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "tok_14KR314AnjI1zHWBAXjC5l9w", + "livemode": false, + "created": 1406365259, + "used": false, + "object": "token", + "type": "card", + "card": { + "id": "card_14KR314AnjI1zHWB3D7lqZT5", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "customer": null + } + } + http_version: + recorded_at: Sat, 26 Jul 2014 09:00:59 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers + body: + encoding: US-ASCII + string: description=someone%40example.com%20for%20Coderwall&card=invalid + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '64' + response: + status: + code: 400 + message: Bad Request + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 09:00:59 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '101' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "error": { + "type": "invalid_request_error", + "message": "Invalid token id: invalid" + } + } + http_version: + recorded_at: Sat, 26 Jul 2014 09:00:59 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/AccountsController.yml b/spec/fixtures/vcr_cassettes/AccountsController.yml new file mode 100644 index 00000000..0e5a5500 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/AccountsController.yml @@ -0,0 +1,590 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.stripe.com/v1/plans + body: + encoding: US-ASCII + string: amount=20000&interval=month&name=Monthly¤cy=usd&id=rocrla + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '63' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:32 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '274' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "interval": "month", + "name": "Monthly", + "created": 1406364572, + "amount": 20000, + "currency": "usd", + "id": "rocrla", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:32 GMT +- request: + method: post + uri: https://api.stripe.com/v1/tokens + body: + encoding: US-ASCII + string: card[number]=4242424242424242&card[cvc]=224&card[exp_month]=12&card[exp_year]=14 + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '80' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:32 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '597' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "tok_14KQrw4AnjI1zHWBtmUZGUsz", + "livemode": false, + "created": 1406364572, + "used": false, + "object": "token", + "type": "card", + "card": { + "id": "card_14KQrw4AnjI1zHWBapPpMR1r", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "customer": null + } + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:32 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers + body: + encoding: US-ASCII + string: description=someone%40example.com%20for%20Coderwall&card=tok_14KQrw4AnjI1zHWBtmUZGUsz + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '85' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:33 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364573, + "id": "cus_4TNdzSTo0NMF0A", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdzSTo0NMF0A/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdzSTo0NMF0A/cards", + "data": [ + { + "id": "card_14KQrw4AnjI1zHWBapPpMR1r", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdzSTo0NMF0A" + } + ] + }, + "default_card": "card_14KQrw4AnjI1zHWBapPpMR1r" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:33 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdzSTo0NMF0A + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:33 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Stripe-Version: + - '2014-07-22' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Max-Age: + - '300' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364573, + "id": "cus_4TNdzSTo0NMF0A", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdzSTo0NMF0A/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdzSTo0NMF0A/cards", + "data": [ + { + "id": "card_14KQrw4AnjI1zHWBapPpMR1r", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdzSTo0NMF0A" + } + ] + }, + "default_card": "card_14KQrw4AnjI1zHWBapPpMR1r" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:33 GMT +- request: + method: get + uri: https://api.stripe.com/v1/customers/cus_4TNdzSTo0NMF0A + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:34 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '1293' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "object": "customer", + "created": 1406364573, + "id": "cus_4TNdzSTo0NMF0A", + "livemode": false, + "description": "someone@example.com for Coderwall", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_4TNdzSTo0NMF0A/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_4TNdzSTo0NMF0A/cards", + "data": [ + { + "id": "card_14KQrw4AnjI1zHWBapPpMR1r", + "object": "card", + "last4": "4242", + "brand": "Visa", + "funding": "credit", + "exp_month": 12, + "exp_year": 2014, + "fingerprint": "GuemeI8uOeJZ5eck", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": "pass", + "address_line1_check": null, + "address_zip_check": null, + "customer": "cus_4TNdzSTo0NMF0A" + } + ] + }, + "default_card": "card_14KQrw4AnjI1zHWBapPpMR1r" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:34 GMT +- request: + method: post + uri: https://api.stripe.com/v1/customers/cus_4TNdzSTo0NMF0A/subscription + body: + encoding: US-ASCII + string: plan=rocrla + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '11' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:49:35 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '737' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "id": "sub_4TNdea1UIpRy6r", + "plan": { + "interval": "month", + "name": "Monthly", + "created": 1406364572, + "amount": 20000, + "currency": "usd", + "id": "rocrla", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + }, + "object": "subscription", + "start": 1406364574, + "status": "active", + "customer": "cus_4TNdzSTo0NMF0A", + "cancel_at_period_end": false, + "current_period_start": 1406364574, + "current_period_end": 1409042974, + "ended_at": null, + "trial_start": null, + "trial_end": null, + "canceled_at": null, + "quantity": 1, + "application_fee_percent": null, + "discount": null, + "metadata": {} + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:35 GMT +- request: + method: post + uri: http://api.mixpanel.com/track/ + body: + encoding: US-ASCII + string: data=eyJldmVudCI6InVwZ3JhZGVkIHRlYW0iLCJwcm9wZXJ0aWVzIjp7InRpbWUiOjE0MDYzNjQ1NzUsImlwIjpudWxsLCJtcF9uYW1lX3RhZyI6ImV2ZXJhcmRvIiwic2NvcmUiOjAsImZvbGxvd2VycyI6MCwiYWNoaWV2ZW1lbnRzIjowLCJvbiB0ZWFtIjp0cnVlLCJwcmVtaXVtIHRlYW0iOnRydWUsInNpZ25lZCBpbiI6dHJ1ZSwibWVtYmVyIjp0cnVlLCJmaXJzdCB2aXNpdCI6ZmFsc2UsInZpc2l0IGZyZXF1ZW5jeSI6InJhcmVseSIsInRva2VuIjoibWl4cGFuZWxfdG9rZW4ifX0%3D + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + Content-Type: + - application/x-www-form-urlencoded + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx/1.7.3 + Date: + - Sat, 26 Jul 2014 08:49:35 GMT + Content-Type: + - application/json + Content-Length: + - '1' + Connection: + - keep-alive + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Origin: + - "*" + Access-Control-Allow-Headers: + - X-Requested-With + Access-Control-Allow-Methods: + - GET, POST, OPTIONS + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Max-Age: + - '1728000' + body: + encoding: UTF-8 + string: '1' + http_version: + recorded_at: Sat, 26 Jul 2014 08:49:35 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/Ashcat.yml b/spec/fixtures/vcr_cassettes/Ashcat.yml new file mode 100644 index 00000000..515cb32c --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Ashcat.yml @@ -0,0 +1,155 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.github.com/repos/rails/rails/contributors?client_id=<GITHUB_CLIENT_ID>&client_secret=<GITHUB_SECRET>&per_page=100 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/vnd.github.v3+json + User-Agent: + - Coderwall spider + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Server: + - GitHub.com + Date: + - Fri, 02 Jan 2015 18:09:47 GMT + Content-Type: + - application/json; charset=utf-8 + Transfer-Encoding: + - chunked + Status: + - 200 OK + X-Ratelimit-Limit: + - '5000' + X-Ratelimit-Remaining: + - '4999' + X-Ratelimit-Reset: + - '1420225787' + Cache-Control: + - public, max-age=60, s-maxage=60 + Last-Modified: + - Fri, 02 Jan 2015 17:36:33 GMT + Etag: + - '"e106f673b4ecbd04cfc70c9c1d8ce4bd"' + Vary: + - Accept + - Accept-Encoding + X-Github-Media-Type: + - github.v3; format=json + Link: + - <https://api.github.com/repositories/8514/contributors?client_id=<GITHUB_CLIENT_ID>&client_secret=<GITHUB_SECRET>&per_page=100&page=2>; + rel="next", <https://api.github.com/repositories/8514/contributors?client_id=<GITHUB_CLIENT_ID>&client_secret=<GITHUB_SECRET>&per_page=100&page=26>; + rel="last" + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - deny + Content-Security-Policy: + - default-src 'none' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, + X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval + Access-Control-Allow-Origin: + - "*" + X-Github-Request-Id: + - B18EAFF7:7F07:424688A:54A6DEE9 + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + X-Content-Type-Options: + - nosniff + X-Served-By: + - 01d096e6cfe28f8aea352e988c332cd3 + body: + encoding: UTF-8 + string: '[{"login":"tenderlove","id":3124,"avatar_url":"https://avatars.githubusercontent.com/u/3124?v=3","gravatar_id":"","url":"https://api.github.com/users/tenderlove","html_url":"https://github.com/tenderlove","followers_url":"https://api.github.com/users/tenderlove/followers","following_url":"https://api.github.com/users/tenderlove/following{/other_user}","gists_url":"https://api.github.com/users/tenderlove/gists{/gist_id}","starred_url":"https://api.github.com/users/tenderlove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tenderlove/subscriptions","organizations_url":"https://api.github.com/users/tenderlove/orgs","repos_url":"https://api.github.com/users/tenderlove/repos","events_url":"https://api.github.com/users/tenderlove/events{/privacy}","received_events_url":"https://api.github.com/users/tenderlove/received_events","type":"User","site_admin":false,"contributions":3606},{"login":"dhh","id":2741,"avatar_url":"https://avatars.githubusercontent.com/u/2741?v=3","gravatar_id":"","url":"https://api.github.com/users/dhh","html_url":"https://github.com/dhh","followers_url":"https://api.github.com/users/dhh/followers","following_url":"https://api.github.com/users/dhh/following{/other_user}","gists_url":"https://api.github.com/users/dhh/gists{/gist_id}","starred_url":"https://api.github.com/users/dhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhh/subscriptions","organizations_url":"https://api.github.com/users/dhh/orgs","repos_url":"https://api.github.com/users/dhh/repos","events_url":"https://api.github.com/users/dhh/events{/privacy}","received_events_url":"https://api.github.com/users/dhh/received_events","type":"User","site_admin":false,"contributions":3597},{"login":"jeremy","id":199,"avatar_url":"https://avatars.githubusercontent.com/u/199?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremy","html_url":"https://github.com/jeremy","followers_url":"https://api.github.com/users/jeremy/followers","following_url":"https://api.github.com/users/jeremy/following{/other_user}","gists_url":"https://api.github.com/users/jeremy/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremy/subscriptions","organizations_url":"https://api.github.com/users/jeremy/orgs","repos_url":"https://api.github.com/users/jeremy/repos","events_url":"https://api.github.com/users/jeremy/events{/privacy}","received_events_url":"https://api.github.com/users/jeremy/received_events","type":"User","site_admin":false,"contributions":3491},{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false,"contributions":3044},{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false,"contributions":2573},{"login":"fxn","id":3387,"avatar_url":"https://avatars.githubusercontent.com/u/3387?v=3","gravatar_id":"","url":"https://api.github.com/users/fxn","html_url":"https://github.com/fxn","followers_url":"https://api.github.com/users/fxn/followers","following_url":"https://api.github.com/users/fxn/following{/other_user}","gists_url":"https://api.github.com/users/fxn/gists{/gist_id}","starred_url":"https://api.github.com/users/fxn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxn/subscriptions","organizations_url":"https://api.github.com/users/fxn/orgs","repos_url":"https://api.github.com/users/fxn/repos","events_url":"https://api.github.com/users/fxn/events{/privacy}","received_events_url":"https://api.github.com/users/fxn/received_events","type":"User","site_admin":false,"contributions":1910},{"login":"carlosantoniodasilva","id":26328,"avatar_url":"https://avatars.githubusercontent.com/u/26328?v=3","gravatar_id":"","url":"https://api.github.com/users/carlosantoniodasilva","html_url":"https://github.com/carlosantoniodasilva","followers_url":"https://api.github.com/users/carlosantoniodasilva/followers","following_url":"https://api.github.com/users/carlosantoniodasilva/following{/other_user}","gists_url":"https://api.github.com/users/carlosantoniodasilva/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosantoniodasilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosantoniodasilva/subscriptions","organizations_url":"https://api.github.com/users/carlosantoniodasilva/orgs","repos_url":"https://api.github.com/users/carlosantoniodasilva/repos","events_url":"https://api.github.com/users/carlosantoniodasilva/events{/privacy}","received_events_url":"https://api.github.com/users/carlosantoniodasilva/received_events","type":"User","site_admin":false,"contributions":1372},{"login":"spastorino","id":52642,"avatar_url":"https://avatars.githubusercontent.com/u/52642?v=3","gravatar_id":"","url":"https://api.github.com/users/spastorino","html_url":"https://github.com/spastorino","followers_url":"https://api.github.com/users/spastorino/followers","following_url":"https://api.github.com/users/spastorino/following{/other_user}","gists_url":"https://api.github.com/users/spastorino/gists{/gist_id}","starred_url":"https://api.github.com/users/spastorino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spastorino/subscriptions","organizations_url":"https://api.github.com/users/spastorino/orgs","repos_url":"https://api.github.com/users/spastorino/repos","events_url":"https://api.github.com/users/spastorino/events{/privacy}","received_events_url":"https://api.github.com/users/spastorino/received_events","type":"User","site_admin":false,"contributions":1206},{"login":"senny","id":5402,"avatar_url":"https://avatars.githubusercontent.com/u/5402?v=3","gravatar_id":"","url":"https://api.github.com/users/senny","html_url":"https://github.com/senny","followers_url":"https://api.github.com/users/senny/followers","following_url":"https://api.github.com/users/senny/following{/other_user}","gists_url":"https://api.github.com/users/senny/gists{/gist_id}","starred_url":"https://api.github.com/users/senny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senny/subscriptions","organizations_url":"https://api.github.com/users/senny/orgs","repos_url":"https://api.github.com/users/senny/repos","events_url":"https://api.github.com/users/senny/events{/privacy}","received_events_url":"https://api.github.com/users/senny/received_events","type":"User","site_admin":false,"contributions":1136},{"login":"josh","id":137,"avatar_url":"https://avatars.githubusercontent.com/u/137?v=3","gravatar_id":"","url":"https://api.github.com/users/josh","html_url":"https://github.com/josh","followers_url":"https://api.github.com/users/josh/followers","following_url":"https://api.github.com/users/josh/following{/other_user}","gists_url":"https://api.github.com/users/josh/gists{/gist_id}","starred_url":"https://api.github.com/users/josh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josh/subscriptions","organizations_url":"https://api.github.com/users/josh/orgs","repos_url":"https://api.github.com/users/josh/repos","events_url":"https://api.github.com/users/josh/events{/privacy}","received_events_url":"https://api.github.com/users/josh/received_events","type":"User","site_admin":true,"contributions":1107},{"login":"vijaydev","id":146214,"avatar_url":"https://avatars.githubusercontent.com/u/146214?v=3","gravatar_id":"","url":"https://api.github.com/users/vijaydev","html_url":"https://github.com/vijaydev","followers_url":"https://api.github.com/users/vijaydev/followers","following_url":"https://api.github.com/users/vijaydev/following{/other_user}","gists_url":"https://api.github.com/users/vijaydev/gists{/gist_id}","starred_url":"https://api.github.com/users/vijaydev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vijaydev/subscriptions","organizations_url":"https://api.github.com/users/vijaydev/orgs","repos_url":"https://api.github.com/users/vijaydev/repos","events_url":"https://api.github.com/users/vijaydev/events{/privacy}","received_events_url":"https://api.github.com/users/vijaydev/received_events","type":"User","site_admin":false,"contributions":1009},{"login":"jonleighton","id":1979,"avatar_url":"https://avatars.githubusercontent.com/u/1979?v=3","gravatar_id":"","url":"https://api.github.com/users/jonleighton","html_url":"https://github.com/jonleighton","followers_url":"https://api.github.com/users/jonleighton/followers","following_url":"https://api.github.com/users/jonleighton/following{/other_user}","gists_url":"https://api.github.com/users/jonleighton/gists{/gist_id}","starred_url":"https://api.github.com/users/jonleighton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonleighton/subscriptions","organizations_url":"https://api.github.com/users/jonleighton/orgs","repos_url":"https://api.github.com/users/jonleighton/repos","events_url":"https://api.github.com/users/jonleighton/events{/privacy}","received_events_url":"https://api.github.com/users/jonleighton/received_events","type":"User","site_admin":false,"contributions":945},{"login":"lifo","id":91,"avatar_url":"https://avatars.githubusercontent.com/u/91?v=3","gravatar_id":"","url":"https://api.github.com/users/lifo","html_url":"https://github.com/lifo","followers_url":"https://api.github.com/users/lifo/followers","following_url":"https://api.github.com/users/lifo/following{/other_user}","gists_url":"https://api.github.com/users/lifo/gists{/gist_id}","starred_url":"https://api.github.com/users/lifo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lifo/subscriptions","organizations_url":"https://api.github.com/users/lifo/orgs","repos_url":"https://api.github.com/users/lifo/repos","events_url":"https://api.github.com/users/lifo/events{/privacy}","received_events_url":"https://api.github.com/users/lifo/received_events","type":"User","site_admin":false,"contributions":849},{"login":"guilleiguaran","id":160941,"avatar_url":"https://avatars.githubusercontent.com/u/160941?v=3","gravatar_id":"","url":"https://api.github.com/users/guilleiguaran","html_url":"https://github.com/guilleiguaran","followers_url":"https://api.github.com/users/guilleiguaran/followers","following_url":"https://api.github.com/users/guilleiguaran/following{/other_user}","gists_url":"https://api.github.com/users/guilleiguaran/gists{/gist_id}","starred_url":"https://api.github.com/users/guilleiguaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guilleiguaran/subscriptions","organizations_url":"https://api.github.com/users/guilleiguaran/orgs","repos_url":"https://api.github.com/users/guilleiguaran/repos","events_url":"https://api.github.com/users/guilleiguaran/events{/privacy}","received_events_url":"https://api.github.com/users/guilleiguaran/received_events","type":"User","site_admin":false,"contributions":574},{"login":"NZKoz","id":197,"avatar_url":"https://avatars.githubusercontent.com/u/197?v=3","gravatar_id":"","url":"https://api.github.com/users/NZKoz","html_url":"https://github.com/NZKoz","followers_url":"https://api.github.com/users/NZKoz/followers","following_url":"https://api.github.com/users/NZKoz/following{/other_user}","gists_url":"https://api.github.com/users/NZKoz/gists{/gist_id}","starred_url":"https://api.github.com/users/NZKoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NZKoz/subscriptions","organizations_url":"https://api.github.com/users/NZKoz/orgs","repos_url":"https://api.github.com/users/NZKoz/repos","events_url":"https://api.github.com/users/NZKoz/events{/privacy}","received_events_url":"https://api.github.com/users/NZKoz/received_events","type":"User","site_admin":false,"contributions":556},{"login":"drogus","id":5004,"avatar_url":"https://avatars.githubusercontent.com/u/5004?v=3","gravatar_id":"","url":"https://api.github.com/users/drogus","html_url":"https://github.com/drogus","followers_url":"https://api.github.com/users/drogus/followers","following_url":"https://api.github.com/users/drogus/following{/other_user}","gists_url":"https://api.github.com/users/drogus/gists{/gist_id}","starred_url":"https://api.github.com/users/drogus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drogus/subscriptions","organizations_url":"https://api.github.com/users/drogus/orgs","repos_url":"https://api.github.com/users/drogus/repos","events_url":"https://api.github.com/users/drogus/events{/privacy}","received_events_url":"https://api.github.com/users/drogus/received_events","type":"User","site_admin":false,"contributions":517},{"login":"miloops","id":3359,"avatar_url":"https://avatars.githubusercontent.com/u/3359?v=3","gravatar_id":"","url":"https://api.github.com/users/miloops","html_url":"https://github.com/miloops","followers_url":"https://api.github.com/users/miloops/followers","following_url":"https://api.github.com/users/miloops/following{/other_user}","gists_url":"https://api.github.com/users/miloops/gists{/gist_id}","starred_url":"https://api.github.com/users/miloops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miloops/subscriptions","organizations_url":"https://api.github.com/users/miloops/orgs","repos_url":"https://api.github.com/users/miloops/repos","events_url":"https://api.github.com/users/miloops/events{/privacy}","received_events_url":"https://api.github.com/users/miloops/received_events","type":"User","site_admin":false,"contributions":472},{"login":"technoweenie","id":21,"avatar_url":"https://avatars.githubusercontent.com/u/21?v=3","gravatar_id":"","url":"https://api.github.com/users/technoweenie","html_url":"https://github.com/technoweenie","followers_url":"https://api.github.com/users/technoweenie/followers","following_url":"https://api.github.com/users/technoweenie/following{/other_user}","gists_url":"https://api.github.com/users/technoweenie/gists{/gist_id}","starred_url":"https://api.github.com/users/technoweenie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technoweenie/subscriptions","organizations_url":"https://api.github.com/users/technoweenie/orgs","repos_url":"https://api.github.com/users/technoweenie/repos","events_url":"https://api.github.com/users/technoweenie/events{/privacy}","received_events_url":"https://api.github.com/users/technoweenie/received_events","type":"User","site_admin":true,"contributions":461},{"login":"wycats","id":4,"avatar_url":"https://avatars.githubusercontent.com/u/4?v=3","gravatar_id":"","url":"https://api.github.com/users/wycats","html_url":"https://github.com/wycats","followers_url":"https://api.github.com/users/wycats/followers","following_url":"https://api.github.com/users/wycats/following{/other_user}","gists_url":"https://api.github.com/users/wycats/gists{/gist_id}","starred_url":"https://api.github.com/users/wycats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wycats/subscriptions","organizations_url":"https://api.github.com/users/wycats/orgs","repos_url":"https://api.github.com/users/wycats/repos","events_url":"https://api.github.com/users/wycats/events{/privacy}","received_events_url":"https://api.github.com/users/wycats/received_events","type":"User","site_admin":false,"contributions":431},{"login":"sgrif","id":1529387,"avatar_url":"https://avatars.githubusercontent.com/u/1529387?v=3","gravatar_id":"","url":"https://api.github.com/users/sgrif","html_url":"https://github.com/sgrif","followers_url":"https://api.github.com/users/sgrif/followers","following_url":"https://api.github.com/users/sgrif/following{/other_user}","gists_url":"https://api.github.com/users/sgrif/gists{/gist_id}","starred_url":"https://api.github.com/users/sgrif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgrif/subscriptions","organizations_url":"https://api.github.com/users/sgrif/orgs","repos_url":"https://api.github.com/users/sgrif/repos","events_url":"https://api.github.com/users/sgrif/events{/privacy}","received_events_url":"https://api.github.com/users/sgrif/received_events","type":"User","site_admin":false,"contributions":409},{"login":"arunagw","id":3948,"avatar_url":"https://avatars.githubusercontent.com/u/3948?v=3","gravatar_id":"","url":"https://api.github.com/users/arunagw","html_url":"https://github.com/arunagw","followers_url":"https://api.github.com/users/arunagw/followers","following_url":"https://api.github.com/users/arunagw/following{/other_user}","gists_url":"https://api.github.com/users/arunagw/gists{/gist_id}","starred_url":"https://api.github.com/users/arunagw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunagw/subscriptions","organizations_url":"https://api.github.com/users/arunagw/orgs","repos_url":"https://api.github.com/users/arunagw/repos","events_url":"https://api.github.com/users/arunagw/events{/privacy}","received_events_url":"https://api.github.com/users/arunagw/received_events","type":"User","site_admin":false,"contributions":398},{"login":"radar","id":2687,"avatar_url":"https://avatars.githubusercontent.com/u/2687?v=3","gravatar_id":"","url":"https://api.github.com/users/radar","html_url":"https://github.com/radar","followers_url":"https://api.github.com/users/radar/followers","following_url":"https://api.github.com/users/radar/following{/other_user}","gists_url":"https://api.github.com/users/radar/gists{/gist_id}","starred_url":"https://api.github.com/users/radar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radar/subscriptions","organizations_url":"https://api.github.com/users/radar/orgs","repos_url":"https://api.github.com/users/radar/repos","events_url":"https://api.github.com/users/radar/events{/privacy}","received_events_url":"https://api.github.com/users/radar/received_events","type":"User","site_admin":false,"contributions":397},{"login":"pixeltrix","id":6321,"avatar_url":"https://avatars.githubusercontent.com/u/6321?v=3","gravatar_id":"","url":"https://api.github.com/users/pixeltrix","html_url":"https://github.com/pixeltrix","followers_url":"https://api.github.com/users/pixeltrix/followers","following_url":"https://api.github.com/users/pixeltrix/following{/other_user}","gists_url":"https://api.github.com/users/pixeltrix/gists{/gist_id}","starred_url":"https://api.github.com/users/pixeltrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pixeltrix/subscriptions","organizations_url":"https://api.github.com/users/pixeltrix/orgs","repos_url":"https://api.github.com/users/pixeltrix/repos","events_url":"https://api.github.com/users/pixeltrix/events{/privacy}","received_events_url":"https://api.github.com/users/pixeltrix/received_events","type":"User","site_admin":false,"contributions":393},{"login":"amatsuda","id":11493,"avatar_url":"https://avatars.githubusercontent.com/u/11493?v=3","gravatar_id":"","url":"https://api.github.com/users/amatsuda","html_url":"https://github.com/amatsuda","followers_url":"https://api.github.com/users/amatsuda/followers","following_url":"https://api.github.com/users/amatsuda/following{/other_user}","gists_url":"https://api.github.com/users/amatsuda/gists{/gist_id}","starred_url":"https://api.github.com/users/amatsuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amatsuda/subscriptions","organizations_url":"https://api.github.com/users/amatsuda/orgs","repos_url":"https://api.github.com/users/amatsuda/repos","events_url":"https://api.github.com/users/amatsuda/events{/privacy}","received_events_url":"https://api.github.com/users/amatsuda/received_events","type":"User","site_admin":false,"contributions":391},{"login":"frodsan","id":840464,"avatar_url":"https://avatars.githubusercontent.com/u/840464?v=3","gravatar_id":"","url":"https://api.github.com/users/frodsan","html_url":"https://github.com/frodsan","followers_url":"https://api.github.com/users/frodsan/followers","following_url":"https://api.github.com/users/frodsan/following{/other_user}","gists_url":"https://api.github.com/users/frodsan/gists{/gist_id}","starred_url":"https://api.github.com/users/frodsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frodsan/subscriptions","organizations_url":"https://api.github.com/users/frodsan/orgs","repos_url":"https://api.github.com/users/frodsan/repos","events_url":"https://api.github.com/users/frodsan/events{/privacy}","received_events_url":"https://api.github.com/users/frodsan/received_events","type":"User","site_admin":false,"contributions":377},{"login":"jamis","id":1627,"avatar_url":"https://avatars.githubusercontent.com/u/1627?v=3","gravatar_id":"","url":"https://api.github.com/users/jamis","html_url":"https://github.com/jamis","followers_url":"https://api.github.com/users/jamis/followers","following_url":"https://api.github.com/users/jamis/following{/other_user}","gists_url":"https://api.github.com/users/jamis/gists{/gist_id}","starred_url":"https://api.github.com/users/jamis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamis/subscriptions","organizations_url":"https://api.github.com/users/jamis/orgs","repos_url":"https://api.github.com/users/jamis/repos","events_url":"https://api.github.com/users/jamis/events{/privacy}","received_events_url":"https://api.github.com/users/jamis/received_events","type":"User","site_admin":false,"contributions":354},{"login":"neerajdotname","id":6399,"avatar_url":"https://avatars.githubusercontent.com/u/6399?v=3","gravatar_id":"","url":"https://api.github.com/users/neerajdotname","html_url":"https://github.com/neerajdotname","followers_url":"https://api.github.com/users/neerajdotname/followers","following_url":"https://api.github.com/users/neerajdotname/following{/other_user}","gists_url":"https://api.github.com/users/neerajdotname/gists{/gist_id}","starred_url":"https://api.github.com/users/neerajdotname/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neerajdotname/subscriptions","organizations_url":"https://api.github.com/users/neerajdotname/orgs","repos_url":"https://api.github.com/users/neerajdotname/repos","events_url":"https://api.github.com/users/neerajdotname/events{/privacy}","received_events_url":"https://api.github.com/users/neerajdotname/received_events","type":"User","site_admin":false,"contributions":334},{"login":"zzak","id":277819,"avatar_url":"https://avatars.githubusercontent.com/u/277819?v=3","gravatar_id":"","url":"https://api.github.com/users/zzak","html_url":"https://github.com/zzak","followers_url":"https://api.github.com/users/zzak/followers","following_url":"https://api.github.com/users/zzak/following{/other_user}","gists_url":"https://api.github.com/users/zzak/gists{/gist_id}","starred_url":"https://api.github.com/users/zzak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzak/subscriptions","organizations_url":"https://api.github.com/users/zzak/orgs","repos_url":"https://api.github.com/users/zzak/repos","events_url":"https://api.github.com/users/zzak/events{/privacy}","received_events_url":"https://api.github.com/users/zzak/received_events","type":"User","site_admin":false,"contributions":327},{"login":"chancancode","id":55829,"avatar_url":"https://avatars.githubusercontent.com/u/55829?v=3","gravatar_id":"","url":"https://api.github.com/users/chancancode","html_url":"https://github.com/chancancode","followers_url":"https://api.github.com/users/chancancode/followers","following_url":"https://api.github.com/users/chancancode/following{/other_user}","gists_url":"https://api.github.com/users/chancancode/gists{/gist_id}","starred_url":"https://api.github.com/users/chancancode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chancancode/subscriptions","organizations_url":"https://api.github.com/users/chancancode/orgs","repos_url":"https://api.github.com/users/chancancode/repos","events_url":"https://api.github.com/users/chancancode/events{/privacy}","received_events_url":"https://api.github.com/users/chancancode/received_events","type":"User","site_admin":false,"contributions":299},{"login":"mikel","id":3366,"avatar_url":"https://avatars.githubusercontent.com/u/3366?v=3","gravatar_id":"","url":"https://api.github.com/users/mikel","html_url":"https://github.com/mikel","followers_url":"https://api.github.com/users/mikel/followers","following_url":"https://api.github.com/users/mikel/following{/other_user}","gists_url":"https://api.github.com/users/mikel/gists{/gist_id}","starred_url":"https://api.github.com/users/mikel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikel/subscriptions","organizations_url":"https://api.github.com/users/mikel/orgs","repos_url":"https://api.github.com/users/mikel/repos","events_url":"https://api.github.com/users/mikel/events{/privacy}","received_events_url":"https://api.github.com/users/mikel/received_events","type":"User","site_admin":false,"contributions":241},{"login":"ffmike","id":2514,"avatar_url":"https://avatars.githubusercontent.com/u/2514?v=3","gravatar_id":"","url":"https://api.github.com/users/ffmike","html_url":"https://github.com/ffmike","followers_url":"https://api.github.com/users/ffmike/followers","following_url":"https://api.github.com/users/ffmike/following{/other_user}","gists_url":"https://api.github.com/users/ffmike/gists{/gist_id}","starred_url":"https://api.github.com/users/ffmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ffmike/subscriptions","organizations_url":"https://api.github.com/users/ffmike/orgs","repos_url":"https://api.github.com/users/ffmike/repos","events_url":"https://api.github.com/users/ffmike/events{/privacy}","received_events_url":"https://api.github.com/users/ffmike/received_events","type":"User","site_admin":false,"contributions":234},{"login":"kennyj","id":13426,"avatar_url":"https://avatars.githubusercontent.com/u/13426?v=3","gravatar_id":"","url":"https://api.github.com/users/kennyj","html_url":"https://github.com/kennyj","followers_url":"https://api.github.com/users/kennyj/followers","following_url":"https://api.github.com/users/kennyj/following{/other_user}","gists_url":"https://api.github.com/users/kennyj/gists{/gist_id}","starred_url":"https://api.github.com/users/kennyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennyj/subscriptions","organizations_url":"https://api.github.com/users/kennyj/orgs","repos_url":"https://api.github.com/users/kennyj/repos","events_url":"https://api.github.com/users/kennyj/events{/privacy}","received_events_url":"https://api.github.com/users/kennyj/received_events","type":"User","site_admin":false,"contributions":233},{"login":"seckar","id":41155,"avatar_url":"https://avatars.githubusercontent.com/u/41155?v=3","gravatar_id":"","url":"https://api.github.com/users/seckar","html_url":"https://github.com/seckar","followers_url":"https://api.github.com/users/seckar/followers","following_url":"https://api.github.com/users/seckar/following{/other_user}","gists_url":"https://api.github.com/users/seckar/gists{/gist_id}","starred_url":"https://api.github.com/users/seckar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seckar/subscriptions","organizations_url":"https://api.github.com/users/seckar/orgs","repos_url":"https://api.github.com/users/seckar/repos","events_url":"https://api.github.com/users/seckar/events{/privacy}","received_events_url":"https://api.github.com/users/seckar/received_events","type":"User","site_admin":false,"contributions":231},{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false,"contributions":214},{"login":"kaspth","id":350807,"avatar_url":"https://avatars.githubusercontent.com/u/350807?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspth","html_url":"https://github.com/kaspth","followers_url":"https://api.github.com/users/kaspth/followers","following_url":"https://api.github.com/users/kaspth/following{/other_user}","gists_url":"https://api.github.com/users/kaspth/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspth/subscriptions","organizations_url":"https://api.github.com/users/kaspth/orgs","repos_url":"https://api.github.com/users/kaspth/repos","events_url":"https://api.github.com/users/kaspth/events{/privacy}","received_events_url":"https://api.github.com/users/kaspth/received_events","type":"User","site_admin":false,"contributions":195},{"login":"vipulnsward","id":567626,"avatar_url":"https://avatars.githubusercontent.com/u/567626?v=3","gravatar_id":"","url":"https://api.github.com/users/vipulnsward","html_url":"https://github.com/vipulnsward","followers_url":"https://api.github.com/users/vipulnsward/followers","following_url":"https://api.github.com/users/vipulnsward/following{/other_user}","gists_url":"https://api.github.com/users/vipulnsward/gists{/gist_id}","starred_url":"https://api.github.com/users/vipulnsward/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vipulnsward/subscriptions","organizations_url":"https://api.github.com/users/vipulnsward/orgs","repos_url":"https://api.github.com/users/vipulnsward/repos","events_url":"https://api.github.com/users/vipulnsward/events{/privacy}","received_events_url":"https://api.github.com/users/vipulnsward/received_events","type":"User","site_admin":false,"contributions":182},{"login":"sikachu","id":4912,"avatar_url":"https://avatars.githubusercontent.com/u/4912?v=3","gravatar_id":"","url":"https://api.github.com/users/sikachu","html_url":"https://github.com/sikachu","followers_url":"https://api.github.com/users/sikachu/followers","following_url":"https://api.github.com/users/sikachu/following{/other_user}","gists_url":"https://api.github.com/users/sikachu/gists{/gist_id}","starred_url":"https://api.github.com/users/sikachu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sikachu/subscriptions","organizations_url":"https://api.github.com/users/sikachu/orgs","repos_url":"https://api.github.com/users/sikachu/repos","events_url":"https://api.github.com/users/sikachu/events{/privacy}","received_events_url":"https://api.github.com/users/sikachu/received_events","type":"User","site_admin":false,"contributions":179},{"login":"strzalek","id":11562,"avatar_url":"https://avatars.githubusercontent.com/u/11562?v=3","gravatar_id":"","url":"https://api.github.com/users/strzalek","html_url":"https://github.com/strzalek","followers_url":"https://api.github.com/users/strzalek/followers","following_url":"https://api.github.com/users/strzalek/following{/other_user}","gists_url":"https://api.github.com/users/strzalek/gists{/gist_id}","starred_url":"https://api.github.com/users/strzalek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strzalek/subscriptions","organizations_url":"https://api.github.com/users/strzalek/orgs","repos_url":"https://api.github.com/users/strzalek/repos","events_url":"https://api.github.com/users/strzalek/events{/privacy}","received_events_url":"https://api.github.com/users/strzalek/received_events","type":"User","site_admin":false,"contributions":156},{"login":"schneems","id":59744,"avatar_url":"https://avatars.githubusercontent.com/u/59744?v=3","gravatar_id":"","url":"https://api.github.com/users/schneems","html_url":"https://github.com/schneems","followers_url":"https://api.github.com/users/schneems/followers","following_url":"https://api.github.com/users/schneems/following{/other_user}","gists_url":"https://api.github.com/users/schneems/gists{/gist_id}","starred_url":"https://api.github.com/users/schneems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schneems/subscriptions","organizations_url":"https://api.github.com/users/schneems/orgs","repos_url":"https://api.github.com/users/schneems/repos","events_url":"https://api.github.com/users/schneems/events{/privacy}","received_events_url":"https://api.github.com/users/schneems/received_events","type":"User","site_admin":false,"contributions":155},{"login":"fcheung","id":5927,"avatar_url":"https://avatars.githubusercontent.com/u/5927?v=3","gravatar_id":"","url":"https://api.github.com/users/fcheung","html_url":"https://github.com/fcheung","followers_url":"https://api.github.com/users/fcheung/followers","following_url":"https://api.github.com/users/fcheung/following{/other_user}","gists_url":"https://api.github.com/users/fcheung/gists{/gist_id}","starred_url":"https://api.github.com/users/fcheung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcheung/subscriptions","organizations_url":"https://api.github.com/users/fcheung/orgs","repos_url":"https://api.github.com/users/fcheung/repos","events_url":"https://api.github.com/users/fcheung/events{/privacy}","received_events_url":"https://api.github.com/users/fcheung/received_events","type":"User","site_admin":false,"contributions":149},{"login":"smartinez87","id":83449,"avatar_url":"https://avatars.githubusercontent.com/u/83449?v=3","gravatar_id":"","url":"https://api.github.com/users/smartinez87","html_url":"https://github.com/smartinez87","followers_url":"https://api.github.com/users/smartinez87/followers","following_url":"https://api.github.com/users/smartinez87/following{/other_user}","gists_url":"https://api.github.com/users/smartinez87/gists{/gist_id}","starred_url":"https://api.github.com/users/smartinez87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartinez87/subscriptions","organizations_url":"https://api.github.com/users/smartinez87/orgs","repos_url":"https://api.github.com/users/smartinez87/repos","events_url":"https://api.github.com/users/smartinez87/events{/privacy}","received_events_url":"https://api.github.com/users/smartinez87/received_events","type":"User","site_admin":false,"contributions":148},{"login":"arthurnn","id":833383,"avatar_url":"https://avatars.githubusercontent.com/u/833383?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurnn","html_url":"https://github.com/arthurnn","followers_url":"https://api.github.com/users/arthurnn/followers","following_url":"https://api.github.com/users/arthurnn/following{/other_user}","gists_url":"https://api.github.com/users/arthurnn/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurnn/subscriptions","organizations_url":"https://api.github.com/users/arthurnn/orgs","repos_url":"https://api.github.com/users/arthurnn/repos","events_url":"https://api.github.com/users/arthurnn/events{/privacy}","received_events_url":"https://api.github.com/users/arthurnn/received_events","type":"User","site_admin":false,"contributions":140},{"login":"oscardelben","id":3892,"avatar_url":"https://avatars.githubusercontent.com/u/3892?v=3","gravatar_id":"","url":"https://api.github.com/users/oscardelben","html_url":"https://github.com/oscardelben","followers_url":"https://api.github.com/users/oscardelben/followers","following_url":"https://api.github.com/users/oscardelben/following{/other_user}","gists_url":"https://api.github.com/users/oscardelben/gists{/gist_id}","starred_url":"https://api.github.com/users/oscardelben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscardelben/subscriptions","organizations_url":"https://api.github.com/users/oscardelben/orgs","repos_url":"https://api.github.com/users/oscardelben/repos","events_url":"https://api.github.com/users/oscardelben/events{/privacy}","received_events_url":"https://api.github.com/users/oscardelben/received_events","type":"User","site_admin":false,"contributions":138},{"login":"robin850","id":354185,"avatar_url":"https://avatars.githubusercontent.com/u/354185?v=3","gravatar_id":"","url":"https://api.github.com/users/robin850","html_url":"https://github.com/robin850","followers_url":"https://api.github.com/users/robin850/followers","following_url":"https://api.github.com/users/robin850/following{/other_user}","gists_url":"https://api.github.com/users/robin850/gists{/gist_id}","starred_url":"https://api.github.com/users/robin850/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robin850/subscriptions","organizations_url":"https://api.github.com/users/robin850/orgs","repos_url":"https://api.github.com/users/robin850/repos","events_url":"https://api.github.com/users/robin850/events{/privacy}","received_events_url":"https://api.github.com/users/robin850/received_events","type":"User","site_admin":false,"contributions":137},{"login":"lest","id":36079,"avatar_url":"https://avatars.githubusercontent.com/u/36079?v=3","gravatar_id":"","url":"https://api.github.com/users/lest","html_url":"https://github.com/lest","followers_url":"https://api.github.com/users/lest/followers","following_url":"https://api.github.com/users/lest/following{/other_user}","gists_url":"https://api.github.com/users/lest/gists{/gist_id}","starred_url":"https://api.github.com/users/lest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lest/subscriptions","organizations_url":"https://api.github.com/users/lest/orgs","repos_url":"https://api.github.com/users/lest/repos","events_url":"https://api.github.com/users/lest/events{/privacy}","received_events_url":"https://api.github.com/users/lest/received_events","type":"User","site_admin":false,"contributions":137},{"login":"gbuesing","id":6653,"avatar_url":"https://avatars.githubusercontent.com/u/6653?v=3","gravatar_id":"","url":"https://api.github.com/users/gbuesing","html_url":"https://github.com/gbuesing","followers_url":"https://api.github.com/users/gbuesing/followers","following_url":"https://api.github.com/users/gbuesing/following{/other_user}","gists_url":"https://api.github.com/users/gbuesing/gists{/gist_id}","starred_url":"https://api.github.com/users/gbuesing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbuesing/subscriptions","organizations_url":"https://api.github.com/users/gbuesing/orgs","repos_url":"https://api.github.com/users/gbuesing/repos","events_url":"https://api.github.com/users/gbuesing/events{/privacy}","received_events_url":"https://api.github.com/users/gbuesing/received_events","type":"User","site_admin":false,"contributions":131},{"login":"matthewd","id":1034,"avatar_url":"https://avatars.githubusercontent.com/u/1034?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewd","html_url":"https://github.com/matthewd","followers_url":"https://api.github.com/users/matthewd/followers","following_url":"https://api.github.com/users/matthewd/following{/other_user}","gists_url":"https://api.github.com/users/matthewd/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewd/subscriptions","organizations_url":"https://api.github.com/users/matthewd/orgs","repos_url":"https://api.github.com/users/matthewd/repos","events_url":"https://api.github.com/users/matthewd/events{/privacy}","received_events_url":"https://api.github.com/users/matthewd/received_events","type":"User","site_admin":false,"contributions":130},{"login":"joshk","id":8701,"avatar_url":"https://avatars.githubusercontent.com/u/8701?v=3","gravatar_id":"","url":"https://api.github.com/users/joshk","html_url":"https://github.com/joshk","followers_url":"https://api.github.com/users/joshk/followers","following_url":"https://api.github.com/users/joshk/following{/other_user}","gists_url":"https://api.github.com/users/joshk/gists{/gist_id}","starred_url":"https://api.github.com/users/joshk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshk/subscriptions","organizations_url":"https://api.github.com/users/joshk/orgs","repos_url":"https://api.github.com/users/joshk/repos","events_url":"https://api.github.com/users/joshk/events{/privacy}","received_events_url":"https://api.github.com/users/joshk/received_events","type":"User","site_admin":false,"contributions":116},{"login":"avakhov","id":92554,"avatar_url":"https://avatars.githubusercontent.com/u/92554?v=3","gravatar_id":"","url":"https://api.github.com/users/avakhov","html_url":"https://github.com/avakhov","followers_url":"https://api.github.com/users/avakhov/followers","following_url":"https://api.github.com/users/avakhov/following{/other_user}","gists_url":"https://api.github.com/users/avakhov/gists{/gist_id}","starred_url":"https://api.github.com/users/avakhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avakhov/subscriptions","organizations_url":"https://api.github.com/users/avakhov/orgs","repos_url":"https://api.github.com/users/avakhov/repos","events_url":"https://api.github.com/users/avakhov/events{/privacy}","received_events_url":"https://api.github.com/users/avakhov/received_events","type":"User","site_admin":false,"contributions":106},{"login":"seuros","id":2394703,"avatar_url":"https://avatars.githubusercontent.com/u/2394703?v=3","gravatar_id":"","url":"https://api.github.com/users/seuros","html_url":"https://github.com/seuros","followers_url":"https://api.github.com/users/seuros/followers","following_url":"https://api.github.com/users/seuros/following{/other_user}","gists_url":"https://api.github.com/users/seuros/gists{/gist_id}","starred_url":"https://api.github.com/users/seuros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seuros/subscriptions","organizations_url":"https://api.github.com/users/seuros/orgs","repos_url":"https://api.github.com/users/seuros/repos","events_url":"https://api.github.com/users/seuros/events{/privacy}","received_events_url":"https://api.github.com/users/seuros/received_events","type":"User","site_admin":false,"contributions":104},{"login":"prathamesh-sonpatki","id":621238,"avatar_url":"https://avatars.githubusercontent.com/u/621238?v=3","gravatar_id":"","url":"https://api.github.com/users/prathamesh-sonpatki","html_url":"https://github.com/prathamesh-sonpatki","followers_url":"https://api.github.com/users/prathamesh-sonpatki/followers","following_url":"https://api.github.com/users/prathamesh-sonpatki/following{/other_user}","gists_url":"https://api.github.com/users/prathamesh-sonpatki/gists{/gist_id}","starred_url":"https://api.github.com/users/prathamesh-sonpatki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prathamesh-sonpatki/subscriptions","organizations_url":"https://api.github.com/users/prathamesh-sonpatki/orgs","repos_url":"https://api.github.com/users/prathamesh-sonpatki/repos","events_url":"https://api.github.com/users/prathamesh-sonpatki/events{/privacy}","received_events_url":"https://api.github.com/users/prathamesh-sonpatki/received_events","type":"User","site_admin":false,"contributions":104},{"login":"FooBarWidget","id":819,"avatar_url":"https://avatars.githubusercontent.com/u/819?v=3","gravatar_id":"","url":"https://api.github.com/users/FooBarWidget","html_url":"https://github.com/FooBarWidget","followers_url":"https://api.github.com/users/FooBarWidget/followers","following_url":"https://api.github.com/users/FooBarWidget/following{/other_user}","gists_url":"https://api.github.com/users/FooBarWidget/gists{/gist_id}","starred_url":"https://api.github.com/users/FooBarWidget/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FooBarWidget/subscriptions","organizations_url":"https://api.github.com/users/FooBarWidget/orgs","repos_url":"https://api.github.com/users/FooBarWidget/repos","events_url":"https://api.github.com/users/FooBarWidget/events{/privacy}","received_events_url":"https://api.github.com/users/FooBarWidget/received_events","type":"User","site_admin":false,"contributions":102},{"login":"svenfuchs","id":2208,"avatar_url":"https://avatars.githubusercontent.com/u/2208?v=3","gravatar_id":"","url":"https://api.github.com/users/svenfuchs","html_url":"https://github.com/svenfuchs","followers_url":"https://api.github.com/users/svenfuchs/followers","following_url":"https://api.github.com/users/svenfuchs/following{/other_user}","gists_url":"https://api.github.com/users/svenfuchs/gists{/gist_id}","starred_url":"https://api.github.com/users/svenfuchs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svenfuchs/subscriptions","organizations_url":"https://api.github.com/users/svenfuchs/orgs","repos_url":"https://api.github.com/users/svenfuchs/repos","events_url":"https://api.github.com/users/svenfuchs/events{/privacy}","received_events_url":"https://api.github.com/users/svenfuchs/received_events","type":"User","site_admin":false,"contributions":100},{"login":"sstephenson","id":2603,"avatar_url":"https://avatars.githubusercontent.com/u/2603?v=3","gravatar_id":"","url":"https://api.github.com/users/sstephenson","html_url":"https://github.com/sstephenson","followers_url":"https://api.github.com/users/sstephenson/followers","following_url":"https://api.github.com/users/sstephenson/following{/other_user}","gists_url":"https://api.github.com/users/sstephenson/gists{/gist_id}","starred_url":"https://api.github.com/users/sstephenson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstephenson/subscriptions","organizations_url":"https://api.github.com/users/sstephenson/orgs","repos_url":"https://api.github.com/users/sstephenson/repos","events_url":"https://api.github.com/users/sstephenson/events{/privacy}","received_events_url":"https://api.github.com/users/sstephenson/received_events","type":"User","site_admin":false,"contributions":96},{"login":"vatrai","id":111473,"avatar_url":"https://avatars.githubusercontent.com/u/111473?v=3","gravatar_id":"","url":"https://api.github.com/users/vatrai","html_url":"https://github.com/vatrai","followers_url":"https://api.github.com/users/vatrai/followers","following_url":"https://api.github.com/users/vatrai/following{/other_user}","gists_url":"https://api.github.com/users/vatrai/gists{/gist_id}","starred_url":"https://api.github.com/users/vatrai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vatrai/subscriptions","organizations_url":"https://api.github.com/users/vatrai/orgs","repos_url":"https://api.github.com/users/vatrai/repos","events_url":"https://api.github.com/users/vatrai/events{/privacy}","received_events_url":"https://api.github.com/users/vatrai/received_events","type":"User","site_admin":false,"contributions":92},{"login":"jaimeiniesta","id":2629,"avatar_url":"https://avatars.githubusercontent.com/u/2629?v=3","gravatar_id":"","url":"https://api.github.com/users/jaimeiniesta","html_url":"https://github.com/jaimeiniesta","followers_url":"https://api.github.com/users/jaimeiniesta/followers","following_url":"https://api.github.com/users/jaimeiniesta/following{/other_user}","gists_url":"https://api.github.com/users/jaimeiniesta/gists{/gist_id}","starred_url":"https://api.github.com/users/jaimeiniesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaimeiniesta/subscriptions","organizations_url":"https://api.github.com/users/jaimeiniesta/orgs","repos_url":"https://api.github.com/users/jaimeiniesta/repos","events_url":"https://api.github.com/users/jaimeiniesta/events{/privacy}","received_events_url":"https://api.github.com/users/jaimeiniesta/received_events","type":"User","site_admin":false,"contributions":91},{"login":"jasonnoble","id":22501,"avatar_url":"https://avatars.githubusercontent.com/u/22501?v=3","gravatar_id":"","url":"https://api.github.com/users/jasonnoble","html_url":"https://github.com/jasonnoble","followers_url":"https://api.github.com/users/jasonnoble/followers","following_url":"https://api.github.com/users/jasonnoble/following{/other_user}","gists_url":"https://api.github.com/users/jasonnoble/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonnoble/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonnoble/subscriptions","organizations_url":"https://api.github.com/users/jasonnoble/orgs","repos_url":"https://api.github.com/users/jasonnoble/repos","events_url":"https://api.github.com/users/jasonnoble/events{/privacy}","received_events_url":"https://api.github.com/users/jasonnoble/received_events","type":"User","site_admin":false,"contributions":88},{"login":"rizwanreza","id":16111,"avatar_url":"https://avatars.githubusercontent.com/u/16111?v=3","gravatar_id":"","url":"https://api.github.com/users/rizwanreza","html_url":"https://github.com/rizwanreza","followers_url":"https://api.github.com/users/rizwanreza/followers","following_url":"https://api.github.com/users/rizwanreza/following{/other_user}","gists_url":"https://api.github.com/users/rizwanreza/gists{/gist_id}","starred_url":"https://api.github.com/users/rizwanreza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rizwanreza/subscriptions","organizations_url":"https://api.github.com/users/rizwanreza/orgs","repos_url":"https://api.github.com/users/rizwanreza/repos","events_url":"https://api.github.com/users/rizwanreza/events{/privacy}","received_events_url":"https://api.github.com/users/rizwanreza/received_events","type":"User","site_admin":false,"contributions":88},{"login":"bogdan","id":122436,"avatar_url":"https://avatars.githubusercontent.com/u/122436?v=3","gravatar_id":"","url":"https://api.github.com/users/bogdan","html_url":"https://github.com/bogdan","followers_url":"https://api.github.com/users/bogdan/followers","following_url":"https://api.github.com/users/bogdan/following{/other_user}","gists_url":"https://api.github.com/users/bogdan/gists{/gist_id}","starred_url":"https://api.github.com/users/bogdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bogdan/subscriptions","organizations_url":"https://api.github.com/users/bogdan/orgs","repos_url":"https://api.github.com/users/bogdan/repos","events_url":"https://api.github.com/users/bogdan/events{/privacy}","received_events_url":"https://api.github.com/users/bogdan/received_events","type":"User","site_admin":false,"contributions":84},{"login":"wangjohn","id":1075780,"avatar_url":"https://avatars.githubusercontent.com/u/1075780?v=3","gravatar_id":"","url":"https://api.github.com/users/wangjohn","html_url":"https://github.com/wangjohn","followers_url":"https://api.github.com/users/wangjohn/followers","following_url":"https://api.github.com/users/wangjohn/following{/other_user}","gists_url":"https://api.github.com/users/wangjohn/gists{/gist_id}","starred_url":"https://api.github.com/users/wangjohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangjohn/subscriptions","organizations_url":"https://api.github.com/users/wangjohn/orgs","repos_url":"https://api.github.com/users/wangjohn/repos","events_url":"https://api.github.com/users/wangjohn/events{/privacy}","received_events_url":"https://api.github.com/users/wangjohn/received_events","type":"User","site_admin":false,"contributions":83},{"login":"akshay-vishnoi","id":1928523,"avatar_url":"https://avatars.githubusercontent.com/u/1928523?v=3","gravatar_id":"","url":"https://api.github.com/users/akshay-vishnoi","html_url":"https://github.com/akshay-vishnoi","followers_url":"https://api.github.com/users/akshay-vishnoi/followers","following_url":"https://api.github.com/users/akshay-vishnoi/following{/other_user}","gists_url":"https://api.github.com/users/akshay-vishnoi/gists{/gist_id}","starred_url":"https://api.github.com/users/akshay-vishnoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akshay-vishnoi/subscriptions","organizations_url":"https://api.github.com/users/akshay-vishnoi/orgs","repos_url":"https://api.github.com/users/akshay-vishnoi/repos","events_url":"https://api.github.com/users/akshay-vishnoi/events{/privacy}","received_events_url":"https://api.github.com/users/akshay-vishnoi/received_events","type":"User","site_admin":false,"contributions":77},{"login":"bitserf","id":167841,"avatar_url":"https://avatars.githubusercontent.com/u/167841?v=3","gravatar_id":"","url":"https://api.github.com/users/bitserf","html_url":"https://github.com/bitserf","followers_url":"https://api.github.com/users/bitserf/followers","following_url":"https://api.github.com/users/bitserf/following{/other_user}","gists_url":"https://api.github.com/users/bitserf/gists{/gist_id}","starred_url":"https://api.github.com/users/bitserf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitserf/subscriptions","organizations_url":"https://api.github.com/users/bitserf/orgs","repos_url":"https://api.github.com/users/bitserf/repos","events_url":"https://api.github.com/users/bitserf/events{/privacy}","received_events_url":"https://api.github.com/users/bitserf/received_events","type":"User","site_admin":false,"contributions":77},{"login":"goncalossilva","id":102931,"avatar_url":"https://avatars.githubusercontent.com/u/102931?v=3","gravatar_id":"","url":"https://api.github.com/users/goncalossilva","html_url":"https://github.com/goncalossilva","followers_url":"https://api.github.com/users/goncalossilva/followers","following_url":"https://api.github.com/users/goncalossilva/following{/other_user}","gists_url":"https://api.github.com/users/goncalossilva/gists{/gist_id}","starred_url":"https://api.github.com/users/goncalossilva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goncalossilva/subscriptions","organizations_url":"https://api.github.com/users/goncalossilva/orgs","repos_url":"https://api.github.com/users/goncalossilva/repos","events_url":"https://api.github.com/users/goncalossilva/events{/privacy}","received_events_url":"https://api.github.com/users/goncalossilva/received_events","type":"User","site_admin":false,"contributions":77},{"login":"tgxworld","id":4335742,"avatar_url":"https://avatars.githubusercontent.com/u/4335742?v=3","gravatar_id":"","url":"https://api.github.com/users/tgxworld","html_url":"https://github.com/tgxworld","followers_url":"https://api.github.com/users/tgxworld/followers","following_url":"https://api.github.com/users/tgxworld/following{/other_user}","gists_url":"https://api.github.com/users/tgxworld/gists{/gist_id}","starred_url":"https://api.github.com/users/tgxworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgxworld/subscriptions","organizations_url":"https://api.github.com/users/tgxworld/orgs","repos_url":"https://api.github.com/users/tgxworld/repos","events_url":"https://api.github.com/users/tgxworld/events{/privacy}","received_events_url":"https://api.github.com/users/tgxworld/received_events","type":"User","site_admin":false,"contributions":76},{"login":"claudiob","id":10076,"avatar_url":"https://avatars.githubusercontent.com/u/10076?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiob","html_url":"https://github.com/claudiob","followers_url":"https://api.github.com/users/claudiob/followers","following_url":"https://api.github.com/users/claudiob/following{/other_user}","gists_url":"https://api.github.com/users/claudiob/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiob/subscriptions","organizations_url":"https://api.github.com/users/claudiob/orgs","repos_url":"https://api.github.com/users/claudiob/repos","events_url":"https://api.github.com/users/claudiob/events{/privacy}","received_events_url":"https://api.github.com/users/claudiob/received_events","type":"User","site_admin":false,"contributions":75},{"login":"agis-","id":827224,"avatar_url":"https://avatars.githubusercontent.com/u/827224?v=3","gravatar_id":"","url":"https://api.github.com/users/agis-","html_url":"https://github.com/agis-","followers_url":"https://api.github.com/users/agis-/followers","following_url":"https://api.github.com/users/agis-/following{/other_user}","gists_url":"https://api.github.com/users/agis-/gists{/gist_id}","starred_url":"https://api.github.com/users/agis-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agis-/subscriptions","organizations_url":"https://api.github.com/users/agis-/orgs","repos_url":"https://api.github.com/users/agis-/repos","events_url":"https://api.github.com/users/agis-/events{/privacy}","received_events_url":"https://api.github.com/users/agis-/received_events","type":"User","site_admin":false,"contributions":73},{"login":"dmathieu","id":9347,"avatar_url":"https://avatars.githubusercontent.com/u/9347?v=3","gravatar_id":"","url":"https://api.github.com/users/dmathieu","html_url":"https://github.com/dmathieu","followers_url":"https://api.github.com/users/dmathieu/followers","following_url":"https://api.github.com/users/dmathieu/following{/other_user}","gists_url":"https://api.github.com/users/dmathieu/gists{/gist_id}","starred_url":"https://api.github.com/users/dmathieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmathieu/subscriptions","organizations_url":"https://api.github.com/users/dmathieu/orgs","repos_url":"https://api.github.com/users/dmathieu/repos","events_url":"https://api.github.com/users/dmathieu/events{/privacy}","received_events_url":"https://api.github.com/users/dmathieu/received_events","type":"User","site_admin":false,"contributions":71},{"login":"kuldeepaggarwal","id":1930730,"avatar_url":"https://avatars.githubusercontent.com/u/1930730?v=3","gravatar_id":"","url":"https://api.github.com/users/kuldeepaggarwal","html_url":"https://github.com/kuldeepaggarwal","followers_url":"https://api.github.com/users/kuldeepaggarwal/followers","following_url":"https://api.github.com/users/kuldeepaggarwal/following{/other_user}","gists_url":"https://api.github.com/users/kuldeepaggarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/kuldeepaggarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuldeepaggarwal/subscriptions","organizations_url":"https://api.github.com/users/kuldeepaggarwal/orgs","repos_url":"https://api.github.com/users/kuldeepaggarwal/repos","events_url":"https://api.github.com/users/kuldeepaggarwal/events{/privacy}","received_events_url":"https://api.github.com/users/kuldeepaggarwal/received_events","type":"User","site_admin":false,"contributions":69},{"login":"rohit","id":14514,"avatar_url":"https://avatars.githubusercontent.com/u/14514?v=3","gravatar_id":"","url":"https://api.github.com/users/rohit","html_url":"https://github.com/rohit","followers_url":"https://api.github.com/users/rohit/followers","following_url":"https://api.github.com/users/rohit/following{/other_user}","gists_url":"https://api.github.com/users/rohit/gists{/gist_id}","starred_url":"https://api.github.com/users/rohit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rohit/subscriptions","organizations_url":"https://api.github.com/users/rohit/orgs","repos_url":"https://api.github.com/users/rohit/repos","events_url":"https://api.github.com/users/rohit/events{/privacy}","received_events_url":"https://api.github.com/users/rohit/received_events","type":"User","site_admin":false,"contributions":67},{"login":"JuanitoFatas","id":1000669,"avatar_url":"https://avatars.githubusercontent.com/u/1000669?v=3","gravatar_id":"","url":"https://api.github.com/users/JuanitoFatas","html_url":"https://github.com/JuanitoFatas","followers_url":"https://api.github.com/users/JuanitoFatas/followers","following_url":"https://api.github.com/users/JuanitoFatas/following{/other_user}","gists_url":"https://api.github.com/users/JuanitoFatas/gists{/gist_id}","starred_url":"https://api.github.com/users/JuanitoFatas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuanitoFatas/subscriptions","organizations_url":"https://api.github.com/users/JuanitoFatas/orgs","repos_url":"https://api.github.com/users/JuanitoFatas/repos","events_url":"https://api.github.com/users/JuanitoFatas/events{/privacy}","received_events_url":"https://api.github.com/users/JuanitoFatas/received_events","type":"User","site_admin":false,"contributions":65},{"login":"nashby","id":200500,"avatar_url":"https://avatars.githubusercontent.com/u/200500?v=3","gravatar_id":"","url":"https://api.github.com/users/nashby","html_url":"https://github.com/nashby","followers_url":"https://api.github.com/users/nashby/followers","following_url":"https://api.github.com/users/nashby/following{/other_user}","gists_url":"https://api.github.com/users/nashby/gists{/gist_id}","starred_url":"https://api.github.com/users/nashby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nashby/subscriptions","organizations_url":"https://api.github.com/users/nashby/orgs","repos_url":"https://api.github.com/users/nashby/repos","events_url":"https://api.github.com/users/nashby/events{/privacy}","received_events_url":"https://api.github.com/users/nashby/received_events","type":"User","site_admin":false,"contributions":64},{"login":"asanghi","id":762,"avatar_url":"https://avatars.githubusercontent.com/u/762?v=3","gravatar_id":"","url":"https://api.github.com/users/asanghi","html_url":"https://github.com/asanghi","followers_url":"https://api.github.com/users/asanghi/followers","following_url":"https://api.github.com/users/asanghi/following{/other_user}","gists_url":"https://api.github.com/users/asanghi/gists{/gist_id}","starred_url":"https://api.github.com/users/asanghi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asanghi/subscriptions","organizations_url":"https://api.github.com/users/asanghi/orgs","repos_url":"https://api.github.com/users/asanghi/repos","events_url":"https://api.github.com/users/asanghi/events{/privacy}","received_events_url":"https://api.github.com/users/asanghi/received_events","type":"User","site_admin":false,"contributions":62},{"login":"marcandre","id":33770,"avatar_url":"https://avatars.githubusercontent.com/u/33770?v=3","gravatar_id":"","url":"https://api.github.com/users/marcandre","html_url":"https://github.com/marcandre","followers_url":"https://api.github.com/users/marcandre/followers","following_url":"https://api.github.com/users/marcandre/following{/other_user}","gists_url":"https://api.github.com/users/marcandre/gists{/gist_id}","starred_url":"https://api.github.com/users/marcandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcandre/subscriptions","organizations_url":"https://api.github.com/users/marcandre/orgs","repos_url":"https://api.github.com/users/marcandre/repos","events_url":"https://api.github.com/users/marcandre/events{/privacy}","received_events_url":"https://api.github.com/users/marcandre/received_events","type":"User","site_admin":false,"contributions":60},{"login":"aditya-kapoor","id":1955930,"avatar_url":"https://avatars.githubusercontent.com/u/1955930?v=3","gravatar_id":"","url":"https://api.github.com/users/aditya-kapoor","html_url":"https://github.com/aditya-kapoor","followers_url":"https://api.github.com/users/aditya-kapoor/followers","following_url":"https://api.github.com/users/aditya-kapoor/following{/other_user}","gists_url":"https://api.github.com/users/aditya-kapoor/gists{/gist_id}","starred_url":"https://api.github.com/users/aditya-kapoor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aditya-kapoor/subscriptions","organizations_url":"https://api.github.com/users/aditya-kapoor/orgs","repos_url":"https://api.github.com/users/aditya-kapoor/repos","events_url":"https://api.github.com/users/aditya-kapoor/events{/privacy}","received_events_url":"https://api.github.com/users/aditya-kapoor/received_events","type":"User","site_admin":false,"contributions":58},{"login":"tarmo","id":3509,"avatar_url":"https://avatars.githubusercontent.com/u/3509?v=3","gravatar_id":"","url":"https://api.github.com/users/tarmo","html_url":"https://github.com/tarmo","followers_url":"https://api.github.com/users/tarmo/followers","following_url":"https://api.github.com/users/tarmo/following{/other_user}","gists_url":"https://api.github.com/users/tarmo/gists{/gist_id}","starred_url":"https://api.github.com/users/tarmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarmo/subscriptions","organizations_url":"https://api.github.com/users/tarmo/orgs","repos_url":"https://api.github.com/users/tarmo/repos","events_url":"https://api.github.com/users/tarmo/events{/privacy}","received_events_url":"https://api.github.com/users/tarmo/received_events","type":"User","site_admin":false,"contributions":58},{"login":"gaurish","id":235844,"avatar_url":"https://avatars.githubusercontent.com/u/235844?v=3","gravatar_id":"","url":"https://api.github.com/users/gaurish","html_url":"https://github.com/gaurish","followers_url":"https://api.github.com/users/gaurish/followers","following_url":"https://api.github.com/users/gaurish/following{/other_user}","gists_url":"https://api.github.com/users/gaurish/gists{/gist_id}","starred_url":"https://api.github.com/users/gaurish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaurish/subscriptions","organizations_url":"https://api.github.com/users/gaurish/orgs","repos_url":"https://api.github.com/users/gaurish/repos","events_url":"https://api.github.com/users/gaurish/events{/privacy}","received_events_url":"https://api.github.com/users/gaurish/received_events","type":"User","site_admin":false,"contributions":57},{"login":"eileencodes","id":1080678,"avatar_url":"https://avatars.githubusercontent.com/u/1080678?v=3","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":false,"contributions":57},{"login":"cassiomarques","id":13071,"avatar_url":"https://avatars.githubusercontent.com/u/13071?v=3","gravatar_id":"","url":"https://api.github.com/users/cassiomarques","html_url":"https://github.com/cassiomarques","followers_url":"https://api.github.com/users/cassiomarques/followers","following_url":"https://api.github.com/users/cassiomarques/following{/other_user}","gists_url":"https://api.github.com/users/cassiomarques/gists{/gist_id}","starred_url":"https://api.github.com/users/cassiomarques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cassiomarques/subscriptions","organizations_url":"https://api.github.com/users/cassiomarques/orgs","repos_url":"https://api.github.com/users/cassiomarques/repos","events_url":"https://api.github.com/users/cassiomarques/events{/privacy}","received_events_url":"https://api.github.com/users/cassiomarques/received_events","type":"User","site_admin":false,"contributions":56},{"login":"rsim","id":4736,"avatar_url":"https://avatars.githubusercontent.com/u/4736?v=3","gravatar_id":"","url":"https://api.github.com/users/rsim","html_url":"https://github.com/rsim","followers_url":"https://api.github.com/users/rsim/followers","following_url":"https://api.github.com/users/rsim/following{/other_user}","gists_url":"https://api.github.com/users/rsim/gists{/gist_id}","starred_url":"https://api.github.com/users/rsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsim/subscriptions","organizations_url":"https://api.github.com/users/rsim/orgs","repos_url":"https://api.github.com/users/rsim/repos","events_url":"https://api.github.com/users/rsim/events{/privacy}","received_events_url":"https://api.github.com/users/rsim/received_events","type":"User","site_admin":false,"contributions":56},{"login":"dasch","id":6351,"avatar_url":"https://avatars.githubusercontent.com/u/6351?v=3","gravatar_id":"","url":"https://api.github.com/users/dasch","html_url":"https://github.com/dasch","followers_url":"https://api.github.com/users/dasch/followers","following_url":"https://api.github.com/users/dasch/following{/other_user}","gists_url":"https://api.github.com/users/dasch/gists{/gist_id}","starred_url":"https://api.github.com/users/dasch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dasch/subscriptions","organizations_url":"https://api.github.com/users/dasch/orgs","repos_url":"https://api.github.com/users/dasch/repos","events_url":"https://api.github.com/users/dasch/events{/privacy}","received_events_url":"https://api.github.com/users/dasch/received_events","type":"User","site_admin":false,"contributions":54},{"login":"madrobby","id":3390,"avatar_url":"https://avatars.githubusercontent.com/u/3390?v=3","gravatar_id":"","url":"https://api.github.com/users/madrobby","html_url":"https://github.com/madrobby","followers_url":"https://api.github.com/users/madrobby/followers","following_url":"https://api.github.com/users/madrobby/following{/other_user}","gists_url":"https://api.github.com/users/madrobby/gists{/gist_id}","starred_url":"https://api.github.com/users/madrobby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madrobby/subscriptions","organizations_url":"https://api.github.com/users/madrobby/orgs","repos_url":"https://api.github.com/users/madrobby/repos","events_url":"https://api.github.com/users/madrobby/events{/privacy}","received_events_url":"https://api.github.com/users/madrobby/received_events","type":"User","site_admin":false,"contributions":53},{"login":"cristianbica","id":150381,"avatar_url":"https://avatars.githubusercontent.com/u/150381?v=3","gravatar_id":"","url":"https://api.github.com/users/cristianbica","html_url":"https://github.com/cristianbica","followers_url":"https://api.github.com/users/cristianbica/followers","following_url":"https://api.github.com/users/cristianbica/following{/other_user}","gists_url":"https://api.github.com/users/cristianbica/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianbica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianbica/subscriptions","organizations_url":"https://api.github.com/users/cristianbica/orgs","repos_url":"https://api.github.com/users/cristianbica/repos","events_url":"https://api.github.com/users/cristianbica/events{/privacy}","received_events_url":"https://api.github.com/users/cristianbica/received_events","type":"User","site_admin":false,"contributions":52},{"login":"thedarkone","id":15688,"avatar_url":"https://avatars.githubusercontent.com/u/15688?v=3","gravatar_id":"","url":"https://api.github.com/users/thedarkone","html_url":"https://github.com/thedarkone","followers_url":"https://api.github.com/users/thedarkone/followers","following_url":"https://api.github.com/users/thedarkone/following{/other_user}","gists_url":"https://api.github.com/users/thedarkone/gists{/gist_id}","starred_url":"https://api.github.com/users/thedarkone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedarkone/subscriptions","organizations_url":"https://api.github.com/users/thedarkone/orgs","repos_url":"https://api.github.com/users/thedarkone/repos","events_url":"https://api.github.com/users/thedarkone/events{/privacy}","received_events_url":"https://api.github.com/users/thedarkone/received_events","type":"User","site_admin":false,"contributions":52},{"login":"pftg","id":125715,"avatar_url":"https://avatars.githubusercontent.com/u/125715?v=3","gravatar_id":"","url":"https://api.github.com/users/pftg","html_url":"https://github.com/pftg","followers_url":"https://api.github.com/users/pftg/followers","following_url":"https://api.github.com/users/pftg/following{/other_user}","gists_url":"https://api.github.com/users/pftg/gists{/gist_id}","starred_url":"https://api.github.com/users/pftg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pftg/subscriptions","organizations_url":"https://api.github.com/users/pftg/orgs","repos_url":"https://api.github.com/users/pftg/repos","events_url":"https://api.github.com/users/pftg/events{/privacy}","received_events_url":"https://api.github.com/users/pftg/received_events","type":"User","site_admin":false,"contributions":49},{"login":"yahonda","id":73684,"avatar_url":"https://avatars.githubusercontent.com/u/73684?v=3","gravatar_id":"","url":"https://api.github.com/users/yahonda","html_url":"https://github.com/yahonda","followers_url":"https://api.github.com/users/yahonda/followers","following_url":"https://api.github.com/users/yahonda/following{/other_user}","gists_url":"https://api.github.com/users/yahonda/gists{/gist_id}","starred_url":"https://api.github.com/users/yahonda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahonda/subscriptions","organizations_url":"https://api.github.com/users/yahonda/orgs","repos_url":"https://api.github.com/users/yahonda/repos","events_url":"https://api.github.com/users/yahonda/events{/privacy}","received_events_url":"https://api.github.com/users/yahonda/received_events","type":"User","site_admin":false,"contributions":47},{"login":"karmi","id":4790,"avatar_url":"https://avatars.githubusercontent.com/u/4790?v=3","gravatar_id":"","url":"https://api.github.com/users/karmi","html_url":"https://github.com/karmi","followers_url":"https://api.github.com/users/karmi/followers","following_url":"https://api.github.com/users/karmi/following{/other_user}","gists_url":"https://api.github.com/users/karmi/gists{/gist_id}","starred_url":"https://api.github.com/users/karmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karmi/subscriptions","organizations_url":"https://api.github.com/users/karmi/orgs","repos_url":"https://api.github.com/users/karmi/repos","events_url":"https://api.github.com/users/karmi/events{/privacy}","received_events_url":"https://api.github.com/users/karmi/received_events","type":"User","site_admin":false,"contributions":45},{"login":"nicksieger","id":154,"avatar_url":"https://avatars.githubusercontent.com/u/154?v=3","gravatar_id":"","url":"https://api.github.com/users/nicksieger","html_url":"https://github.com/nicksieger","followers_url":"https://api.github.com/users/nicksieger/followers","following_url":"https://api.github.com/users/nicksieger/following{/other_user}","gists_url":"https://api.github.com/users/nicksieger/gists{/gist_id}","starred_url":"https://api.github.com/users/nicksieger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicksieger/subscriptions","organizations_url":"https://api.github.com/users/nicksieger/orgs","repos_url":"https://api.github.com/users/nicksieger/repos","events_url":"https://api.github.com/users/nicksieger/events{/privacy}","received_events_url":"https://api.github.com/users/nicksieger/received_events","type":"User","site_admin":false,"contributions":45},{"login":"r00k","id":46677,"avatar_url":"https://avatars.githubusercontent.com/u/46677?v=3","gravatar_id":"","url":"https://api.github.com/users/r00k","html_url":"https://github.com/r00k","followers_url":"https://api.github.com/users/r00k/followers","following_url":"https://api.github.com/users/r00k/following{/other_user}","gists_url":"https://api.github.com/users/r00k/gists{/gist_id}","starred_url":"https://api.github.com/users/r00k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r00k/subscriptions","organizations_url":"https://api.github.com/users/r00k/orgs","repos_url":"https://api.github.com/users/r00k/repos","events_url":"https://api.github.com/users/r00k/events{/privacy}","received_events_url":"https://api.github.com/users/r00k/received_events","type":"User","site_admin":false,"contributions":44},{"login":"zuhao","id":681699,"avatar_url":"https://avatars.githubusercontent.com/u/681699?v=3","gravatar_id":"","url":"https://api.github.com/users/zuhao","html_url":"https://github.com/zuhao","followers_url":"https://api.github.com/users/zuhao/followers","following_url":"https://api.github.com/users/zuhao/following{/other_user}","gists_url":"https://api.github.com/users/zuhao/gists{/gist_id}","starred_url":"https://api.github.com/users/zuhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zuhao/subscriptions","organizations_url":"https://api.github.com/users/zuhao/orgs","repos_url":"https://api.github.com/users/zuhao/repos","events_url":"https://api.github.com/users/zuhao/events{/privacy}","received_events_url":"https://api.github.com/users/zuhao/received_events","type":"User","site_admin":false,"contributions":44},{"login":"bensie","id":4595,"avatar_url":"https://avatars.githubusercontent.com/u/4595?v=3","gravatar_id":"","url":"https://api.github.com/users/bensie","html_url":"https://github.com/bensie","followers_url":"https://api.github.com/users/bensie/followers","following_url":"https://api.github.com/users/bensie/following{/other_user}","gists_url":"https://api.github.com/users/bensie/gists{/gist_id}","starred_url":"https://api.github.com/users/bensie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensie/subscriptions","organizations_url":"https://api.github.com/users/bensie/orgs","repos_url":"https://api.github.com/users/bensie/repos","events_url":"https://api.github.com/users/bensie/events{/privacy}","received_events_url":"https://api.github.com/users/bensie/received_events","type":"User","site_admin":false,"contributions":43},{"login":"dchelimsky","id":1075,"avatar_url":"https://avatars.githubusercontent.com/u/1075?v=3","gravatar_id":"","url":"https://api.github.com/users/dchelimsky","html_url":"https://github.com/dchelimsky","followers_url":"https://api.github.com/users/dchelimsky/followers","following_url":"https://api.github.com/users/dchelimsky/following{/other_user}","gists_url":"https://api.github.com/users/dchelimsky/gists{/gist_id}","starred_url":"https://api.github.com/users/dchelimsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchelimsky/subscriptions","organizations_url":"https://api.github.com/users/dchelimsky/orgs","repos_url":"https://api.github.com/users/dchelimsky/repos","events_url":"https://api.github.com/users/dchelimsky/events{/privacy}","received_events_url":"https://api.github.com/users/dchelimsky/received_events","type":"User","site_admin":false,"contributions":42},{"login":"laurocaetano","id":611891,"avatar_url":"https://avatars.githubusercontent.com/u/611891?v=3","gravatar_id":"","url":"https://api.github.com/users/laurocaetano","html_url":"https://github.com/laurocaetano","followers_url":"https://api.github.com/users/laurocaetano/followers","following_url":"https://api.github.com/users/laurocaetano/following{/other_user}","gists_url":"https://api.github.com/users/laurocaetano/gists{/gist_id}","starred_url":"https://api.github.com/users/laurocaetano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurocaetano/subscriptions","organizations_url":"https://api.github.com/users/laurocaetano/orgs","repos_url":"https://api.github.com/users/laurocaetano/repos","events_url":"https://api.github.com/users/laurocaetano/events{/privacy}","received_events_url":"https://api.github.com/users/laurocaetano/received_events","type":"User","site_admin":false,"contributions":42},{"login":"tilsammans","id":14680,"avatar_url":"https://avatars.githubusercontent.com/u/14680?v=3","gravatar_id":"","url":"https://api.github.com/users/tilsammans","html_url":"https://github.com/tilsammans","followers_url":"https://api.github.com/users/tilsammans/followers","following_url":"https://api.github.com/users/tilsammans/following{/other_user}","gists_url":"https://api.github.com/users/tilsammans/gists{/gist_id}","starred_url":"https://api.github.com/users/tilsammans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilsammans/subscriptions","organizations_url":"https://api.github.com/users/tilsammans/orgs","repos_url":"https://api.github.com/users/tilsammans/repos","events_url":"https://api.github.com/users/tilsammans/events{/privacy}","received_events_url":"https://api.github.com/users/tilsammans/received_events","type":"User","site_admin":false,"contributions":42},{"login":"mislav","id":887,"avatar_url":"https://avatars.githubusercontent.com/u/887?v=3","gravatar_id":"","url":"https://api.github.com/users/mislav","html_url":"https://github.com/mislav","followers_url":"https://api.github.com/users/mislav/followers","following_url":"https://api.github.com/users/mislav/following{/other_user}","gists_url":"https://api.github.com/users/mislav/gists{/gist_id}","starred_url":"https://api.github.com/users/mislav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mislav/subscriptions","organizations_url":"https://api.github.com/users/mislav/orgs","repos_url":"https://api.github.com/users/mislav/repos","events_url":"https://api.github.com/users/mislav/events{/privacy}","received_events_url":"https://api.github.com/users/mislav/received_events","type":"User","site_admin":true,"contributions":41},{"login":"trevorturk","id":402,"avatar_url":"https://avatars.githubusercontent.com/u/402?v=3","gravatar_id":"","url":"https://api.github.com/users/trevorturk","html_url":"https://github.com/trevorturk","followers_url":"https://api.github.com/users/trevorturk/followers","following_url":"https://api.github.com/users/trevorturk/following{/other_user}","gists_url":"https://api.github.com/users/trevorturk/gists{/gist_id}","starred_url":"https://api.github.com/users/trevorturk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trevorturk/subscriptions","organizations_url":"https://api.github.com/users/trevorturk/orgs","repos_url":"https://api.github.com/users/trevorturk/repos","events_url":"https://api.github.com/users/trevorturk/events{/privacy}","received_events_url":"https://api.github.com/users/trevorturk/received_events","type":"User","site_admin":false,"contributions":41},{"login":"waynn","id":318137,"avatar_url":"https://avatars.githubusercontent.com/u/318137?v=3","gravatar_id":"","url":"https://api.github.com/users/waynn","html_url":"https://github.com/waynn","followers_url":"https://api.github.com/users/waynn/followers","following_url":"https://api.github.com/users/waynn/following{/other_user}","gists_url":"https://api.github.com/users/waynn/gists{/gist_id}","starred_url":"https://api.github.com/users/waynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waynn/subscriptions","organizations_url":"https://api.github.com/users/waynn/orgs","repos_url":"https://api.github.com/users/waynn/repos","events_url":"https://api.github.com/users/waynn/events{/privacy}","received_events_url":"https://api.github.com/users/waynn/received_events","type":"User","site_admin":false,"contributions":40},{"login":"y-yagi","id":987638,"avatar_url":"https://avatars.githubusercontent.com/u/987638?v=3","gravatar_id":"","url":"https://api.github.com/users/y-yagi","html_url":"https://github.com/y-yagi","followers_url":"https://api.github.com/users/y-yagi/followers","following_url":"https://api.github.com/users/y-yagi/following{/other_user}","gists_url":"https://api.github.com/users/y-yagi/gists{/gist_id}","starred_url":"https://api.github.com/users/y-yagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y-yagi/subscriptions","organizations_url":"https://api.github.com/users/y-yagi/orgs","repos_url":"https://api.github.com/users/y-yagi/repos","events_url":"https://api.github.com/users/y-yagi/events{/privacy}","received_events_url":"https://api.github.com/users/y-yagi/received_events","type":"User","site_admin":false,"contributions":39},{"login":"norman","id":5042,"avatar_url":"https://avatars.githubusercontent.com/u/5042?v=3","gravatar_id":"","url":"https://api.github.com/users/norman","html_url":"https://github.com/norman","followers_url":"https://api.github.com/users/norman/followers","following_url":"https://api.github.com/users/norman/following{/other_user}","gists_url":"https://api.github.com/users/norman/gists{/gist_id}","starred_url":"https://api.github.com/users/norman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norman/subscriptions","organizations_url":"https://api.github.com/users/norman/orgs","repos_url":"https://api.github.com/users/norman/repos","events_url":"https://api.github.com/users/norman/events{/privacy}","received_events_url":"https://api.github.com/users/norman/received_events","type":"User","site_admin":false,"contributions":39},{"login":"Mik-die","id":426230,"avatar_url":"https://avatars.githubusercontent.com/u/426230?v=3","gravatar_id":"","url":"https://api.github.com/users/Mik-die","html_url":"https://github.com/Mik-die","followers_url":"https://api.github.com/users/Mik-die/followers","following_url":"https://api.github.com/users/Mik-die/following{/other_user}","gists_url":"https://api.github.com/users/Mik-die/gists{/gist_id}","starred_url":"https://api.github.com/users/Mik-die/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mik-die/subscriptions","organizations_url":"https://api.github.com/users/Mik-die/orgs","repos_url":"https://api.github.com/users/Mik-die/repos","events_url":"https://api.github.com/users/Mik-die/events{/privacy}","received_events_url":"https://api.github.com/users/Mik-die/received_events","type":"User","site_admin":false,"contributions":38},{"login":"ernie","id":14947,"avatar_url":"https://avatars.githubusercontent.com/u/14947?v=3","gravatar_id":"","url":"https://api.github.com/users/ernie","html_url":"https://github.com/ernie","followers_url":"https://api.github.com/users/ernie/followers","following_url":"https://api.github.com/users/ernie/following{/other_user}","gists_url":"https://api.github.com/users/ernie/gists{/gist_id}","starred_url":"https://api.github.com/users/ernie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ernie/subscriptions","organizations_url":"https://api.github.com/users/ernie/orgs","repos_url":"https://api.github.com/users/ernie/repos","events_url":"https://api.github.com/users/ernie/events{/privacy}","received_events_url":"https://api.github.com/users/ernie/received_events","type":"User","site_admin":false,"contributions":38}]' + http_version: + recorded_at: Fri, 02 Jan 2015 18:09:47 GMT +- request: + method: get + uri: https://api.github.com/users/dhh?client_id=<GITHUB_CLIENT_ID>&client_secret=<GITHUB_SECRET> + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/vnd.github.v3+json + User-Agent: + - Coderwall spider + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Server: + - GitHub.com + Date: + - Fri, 02 Jan 2015 18:09:51 GMT + Content-Type: + - application/json; charset=utf-8 + Transfer-Encoding: + - chunked + Status: + - 200 OK + X-Ratelimit-Limit: + - '5000' + X-Ratelimit-Remaining: + - '4998' + X-Ratelimit-Reset: + - '1420225787' + Cache-Control: + - public, max-age=60, s-maxage=60 + Last-Modified: + - Thu, 01 Jan 2015 19:59:56 GMT + Etag: + - '"e3e160ed1520648366aba65bb3e35085"' + Vary: + - Accept + - Accept-Encoding + X-Github-Media-Type: + - github.v3; format=json + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - deny + Content-Security-Policy: + - default-src 'none' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, + X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval + Access-Control-Allow-Origin: + - "*" + X-Github-Request-Id: + - B18EAFF7:7F05:235DF92:54A6DEEF + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + X-Content-Type-Options: + - nosniff + X-Served-By: + - a241e1a8264a6ace03db946c85b92db3 + body: + encoding: UTF-8 + string: '{"login":"dhh","id":2741,"avatar_url":"https://avatars.githubusercontent.com/u/2741?v=3","gravatar_id":"","url":"https://api.github.com/users/dhh","html_url":"https://github.com/dhh","followers_url":"https://api.github.com/users/dhh/followers","following_url":"https://api.github.com/users/dhh/following{/other_user}","gists_url":"https://api.github.com/users/dhh/gists{/gist_id}","starred_url":"https://api.github.com/users/dhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhh/subscriptions","organizations_url":"https://api.github.com/users/dhh/orgs","repos_url":"https://api.github.com/users/dhh/repos","events_url":"https://api.github.com/users/dhh/events{/privacy}","received_events_url":"https://api.github.com/users/dhh/received_events","type":"User","site_admin":false,"name":"David + Heinemeier Hansson","company":"Basecamp","blog":"http://david.heinemeierhansson.com","location":"Chicago, + USA","email":"david@basecamp.com","hireable":false,"bio":null,"public_repos":15,"public_gists":44,"followers":6075,"following":0,"created_at":"2008-03-10T17:53:51Z","updated_at":"2015-01-01T19:59:56Z"}' + http_version: + recorded_at: Fri, 02 Jan 2015 18:09:51 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/GithubProfile.yml b/spec/fixtures/vcr_cassettes/GithubProfile.yml new file mode 100644 index 00000000..92198c55 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/GithubProfile.yml @@ -0,0 +1,3068 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.github.com/users/mdeiters?client_id=<GITHUB_CLIENT_ID>&client_secret=<GITHUB_SECRET> + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/vnd.github.v3+json + User-Agent: + - Coderwall spider + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Server: + - GitHub.com + Date: + - Tue, 06 Jan 2015 19:10:37 GMT + Content-Type: + - application/json; charset=utf-8 + Transfer-Encoding: + - chunked + Status: + - 200 OK + X-Ratelimit-Limit: + - '5000' + X-Ratelimit-Remaining: + - '4997' + X-Ratelimit-Reset: + - '1420572605' + Cache-Control: + - public, max-age=60, s-maxage=60 + Last-Modified: + - Sat, 03 Jan 2015 01:46:39 GMT + Vary: + - Accept + - Accept-Encoding + X-Github-Media-Type: + - github.v3; format=json + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - deny + Content-Security-Policy: + - default-src 'none' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, + X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval + Access-Control-Allow-Origin: + - "*" + X-Github-Request-Id: + - B18EAFF7:06DF:349A6DA:54AC332D + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + X-Content-Type-Options: + - nosniff + X-Served-By: + - 2811da37fbdda4367181b328b22b2499 + body: + encoding: UTF-8 + string: '{"login":"mdeiters","id":7330,"avatar_url":"https://avatars.githubusercontent.com/u/7330?v=3","gravatar_id":"","url":"https://api.github.com/users/mdeiters","html_url":"https://github.com/mdeiters","followers_url":"https://api.github.com/users/mdeiters/followers","following_url":"https://api.github.com/users/mdeiters/following{/other_user}","gists_url":"https://api.github.com/users/mdeiters/gists{/gist_id}","starred_url":"https://api.github.com/users/mdeiters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdeiters/subscriptions","organizations_url":"https://api.github.com/users/mdeiters/orgs","repos_url":"https://api.github.com/users/mdeiters/repos","events_url":"https://api.github.com/users/mdeiters/events{/privacy}","received_events_url":"https://api.github.com/users/mdeiters/received_events","type":"User","site_admin":false,"name":"Matthew + Deiters","company":"Assembly","blog":"http://twitter.com/@mdeiters","location":"San + Francisco","email":"mdeiters@gmail.com","hireable":false,"bio":null,"public_repos":27,"public_gists":41,"followers":76,"following":34,"created_at":"2008-04-14T22:53:10Z","updated_at":"2015-01-03T01:46:39Z"}' + http_version: + recorded_at: Tue, 06 Jan 2015 19:10:37 GMT +- request: + method: get + uri: https://api.github.com/users/mdeiters/repos?client_id=<GITHUB_CLIENT_ID>&client_secret=<GITHUB_SECRET>&per_page=100 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/vnd.github.v3+json + User-Agent: + - Coderwall spider + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Server: + - GitHub.com + Date: + - Tue, 06 Jan 2015 19:12:01 GMT + Content-Type: + - application/json; charset=utf-8 + Transfer-Encoding: + - chunked + Status: + - 200 OK + X-Ratelimit-Limit: + - '5000' + X-Ratelimit-Remaining: + - '4996' + X-Ratelimit-Reset: + - '1420572605' + Cache-Control: + - public, max-age=60, s-maxage=60 + Vary: + - Accept + - Accept-Encoding + X-Github-Media-Type: + - github.v3; format=json + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - deny + Content-Security-Policy: + - default-src 'none' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Expose-Headers: + - ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, + X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval + Access-Control-Allow-Origin: + - "*" + X-Github-Request-Id: + - B18EAFF7:098C:31721F1:54AC3380 + Strict-Transport-Security: + - max-age=31536000; includeSubdomains; preload + X-Content-Type-Options: + - nosniff + X-Served-By: + - 065b43cd9674091fec48a221b420fbb3 + body: + encoding: ASCII-8BIT + string: !binary |- + W3siaWQiOjIyOTg2NzQsIm5hbWUiOiJhY3RpdmVfYWRtaW4iLCJmdWxsX25h + bWUiOiJtZGVpdGVycy9hY3RpdmVfYWRtaW4iLCJvd25lciI6eyJsb2dpbiI6 + Im1kZWl0ZXJzIiwiaWQiOjczMzAsImF2YXRhcl91cmwiOiJodHRwczovL2F2 + YXRhcnMuZ2l0aHVidXNlcmNvbnRlbnQuY29tL3UvNzMzMD92PTMiLCJncmF2 + YXRhcl9pZCI6IiIsInVybCI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vdXNl + cnMvbWRlaXRlcnMiLCJodG1sX3VybCI6Imh0dHBzOi8vZ2l0aHViLmNvbS9t + ZGVpdGVycyIsImZvbGxvd2Vyc191cmwiOiJodHRwczovL2FwaS5naXRodWIu + Y29tL3VzZXJzL21kZWl0ZXJzL2ZvbGxvd2VycyIsImZvbGxvd2luZ191cmwi + OiJodHRwczovL2FwaS5naXRodWIuY29tL3VzZXJzL21kZWl0ZXJzL2ZvbGxv + d2luZ3svb3RoZXJfdXNlcn0iLCJnaXN0c191cmwiOiJodHRwczovL2FwaS5n + aXRodWIuY29tL3VzZXJzL21kZWl0ZXJzL2dpc3Rzey9naXN0X2lkfSIsInN0 + YXJyZWRfdXJsIjoiaHR0cHM6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pY2F0aW9uL2NvbnRlbnRzL3srcGF0aH0i + LCJjb21wYXJlX3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3Mv + bWRlaXRlcnMvb3Blbl9pZF9hdXRoZW50aWNhdGlvbi9jb21wYXJlL3tiYXNl + fS4uLntoZWFkfSIsIm1lcmdlc191cmwiOiJodHRwczovL2FwaS5naXRodWIu + Y29tL3JlcG9zL21kZWl0ZXJzL29wZW5faWRfYXV0aGVudGljYXRpb24vbWVy + Z2VzIiwiYXJjaGl2ZV91cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3Jl + cG9zL21kZWl0ZXJzL29wZW5faWRfYXV0aGVudGljYXRpb24ve2FyY2hpdmVf + Zm9ybWF0fXsvcmVmfSIsImRvd25sb2Fkc191cmwiOiJodHRwczovL2FwaS5n + aXRodWIuY29tL3JlcG9zL21kZWl0ZXJzL29wZW5faWRfYXV0aGVudGljYXRp + b24vZG93bmxvYWRzIiwiaXNzdWVzX3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1 + Yi5jb20vcmVwb3MvbWRlaXRlcnMvb3Blbl9pZF9hdXRoZW50aWNhdGlvbi9p + c3N1ZXN7L251bWJlcn0iLCJwdWxsc191cmwiOiJodHRwczovL2FwaS5naXRo + dWIuY29tL3JlcG9zL21kZWl0ZXJzL29wZW5faWRfYXV0aGVudGljYXRpb24v + cHVsbHN7L251bWJlcn0iLCJtaWxlc3RvbmVzX3VybCI6Imh0dHBzOi8vYXBp + LmdpdGh1Yi5jb20vcmVwb3MvbWRlaXRlcnMvb3Blbl9pZF9hdXRoZW50aWNh + dGlvbi9taWxlc3RvbmVzey9udW1iZXJ9Iiwibm90aWZpY2F0aW9uc191cmwi + OiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL21kZWl0ZXJzL29wZW5f + aWRfYXV0aGVudGljYXRpb24vbm90aWZpY2F0aW9uc3s/c2luY2UsYWxsLHBh + cnRpY2lwYXRpbmd9IiwibGFiZWxz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+ bC1saWdodC9zdWJzY3JpYmVycyIsInN1YnNjcmlwdGlvbl91cmwiOiJodHRw + czovL2FwaS5naXRodWIuY29tL3JlcG9zL21kZWl0ZXJzL3NvbHItc3BhdGlh + bC1saWdodC9zdWJzY3JpcHRpb24iLCJjb21taXRzX3VybCI6Imh0dHBzOi8v + YXBpLmdpdGh1Yi5jb20vcmVwb3MvbWRlaXRlcnMvc29sci1zcGF0aWFsLWxp + Z2h0L2NvbW1pdHN7L3NoYX0iLCJnaXRfY29tbWl0c191cmwiOiJodHRwczov + L2FwaS5naXRodWIuY29tL3JlcG9zL21kZWl0ZXJzL3NvbHItc3BhdGlhbC1s + aWdodC9naXQvY29tbWl0c3svc2hhfSIsImNvbW1lbnRzX3VybCI6Imh0dHBz + Oi8vYXBpLmdpdGh1Yi5jb20vcmVwb3MvbWRlaXRlcnMvc29sci1zcGF0aWFs + LWxpZ2h0L2NvbW1lbnRzey9udW1iZXJ9IiwiaXNzdWVfY29tbWVudF91cmwi + OiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL21kZWl0ZXJzL3NvbHIt + c3BhdGlhbC1saWdodC9pc3N1ZXMvY29tbWVudHMve251bWJlcn0iLCJjb250 + ZW50c191cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL21kZWl0 + ZXJzL3NvbHItc3BhdGlhbC1saWdodC9jb250ZW50cy97K3BhdGh9IiwiY29t + cGFyZV91cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL21kZWl0 + ZXJzL3NvbHItc3BhdGlhbC1saWdodC9jb21wYXJlL3tiYXNlfS4uLntoZWFk + fSIsIm1lcmdlc191cmwiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9z + L21kZWl0ZXJzL3NvbHItc3BhdGlhbC1saWdodC9tZXJnZXMiLCJhcmNoaXZl + X3VybCI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3MvbWRlaXRlcnMv + c29sci1zcGF0aWFs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AsIm1pcnJvcl91 + cmwiOm51bGwsIm9wZW5faXNzdWVzX2NvdW50IjowLCJmb3JrcyI6MCwib3Bl + bl9pc3N1ZXMiOjAsIndhdGNoZXJzIjoxLCJkZWZhdWx0X2JyYW5jaCI6Im1h + c3RlciJ9XQ== + http_version: + recorded_at: Tue, 06 Jan 2015 19:12:01 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/Lanyrd.yml b/spec/fixtures/vcr_cassettes/Lanyrd.yml new file mode 100644 index 00000000..bf361717 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Lanyrd.yml @@ -0,0 +1,130 @@ +--- +http_interactions: +- request: + method: get + uri: http://lanyrd.com/partners/coderwall/profile-api/?twitter=mdeiters&view=history + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx/1.4.7 + Date: + - Sat, 26 Jul 2014 08:50:30 GMT + Content-Type: + - application/javascript; charset=utf-8 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + X-Servedby: + - softlayer-frontend2 + X-Instrumented: + - fd102384-bda2-4d0b-ae1a-ca873127800e + X-Varnish: + - '1164525732' + Age: + - '0' + Via: + - 1.1 varnish + X-Cache: + - MISS + X-Varnish-Backend: + - default + Set-Cookie: + - nt=bKj+2lPTa9YYcDSYOdGoAg==; expires=Thu, 31-Dec-37 23:55:55 GMT; domain=.lanyrd.com; + path=/ + Content-Encoding: + - gzip + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAAAAAAAAA82U3WrbQBCF7/MUiy5KC5EluSnGuUpJCRRaKHbTUkIIa2lt + iUg7YneEK0LevbMbaS17bWhdU+obY8/fmTOf9HTG6BMsCgguWXADjcyEYrBk + V6jausA0X8BP9opdpUCBNS9L9vrHNfuejN+M2Aeejdj7iqNoFLsByAoxCs7Z + S0uNHDU1fbI/7RSOKGRWyNVDzTVSLO6Sd6LLBhslduO6FvxxUPx2WOyCm1o7 + 97mXI3llOgakFnOxZpkoUCjt5DaqNOEcsb6MopLLVmWjFKqoVrAsShFVXUXk + SuCRKlA1op+RFxpBtfTvnVt6s75dMiOzjCtBkmAeJheYs7moUVQLsn0cJ0nf + 3TpmKuqSp1b5DCqa9BF52XpJ/XbWBqFSkEtm8k3LsZdNR3gwQkxXMzOMpyTF + S9NC6wKkkXt3PzDbyjrol2kYDXSEinQ409xaCHWR2tbOqj62bZmrODjxpVWE + Is0llLBqvWmuR+/TV5cbeON7ZPoi832kJA1LXHPlr+8JmneZe+RsCfTugG1t + 79g57h8RuUL/2slm0HDfQ7QSp+GEWP3MW0IqnnpjHKWfuGbfxIrrc3Yr6RHL + 2JxeBMT8LkD9KWa8KPW1AXZv421WCdT4XRhPvG7HshpPI2UEmCfGwyY4PaSq + WfwGnjPK2kPCjoV/AaaREYIM7e7e3h6dRg8Dyeyt9gg7LaLdkS/+DNGE+AzH + 8QZSHxIH6RdQSK/47ChG/b47jE4Mo+P4dIxO/j2j/y8c1t1kMoDD0nd/9vwL + DHLseMwIAAA= + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:30 GMT +- request: + method: get + uri: http://lanyrd.com/partners/coderwall/profile-api/?twitter=asfjkdsfkjldsafdskljfdsdsfdsafas&view=history + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 404 + message: NOT FOUND + headers: + Server: + - nginx/1.4.7 + Date: + - Sat, 26 Jul 2014 08:50:30 GMT + Content-Type: + - application/json; charset=utf-8 + Content-Length: + - '191' + Connection: + - keep-alive + X-Servedby: + - softlayer-frontend1 + X-Instrumented: + - a39303d7-da6e-4ac7-98da-b5b93375cffb + Accept-Ranges: + - bytes + X-Varnish: + - '1164525735' + Age: + - '0' + Via: + - 1.1 varnish + X-Cache: + - MISS + X-Varnish-Backend: + - default + Set-Cookie: + - nt=bKj+2lPTa9YYcDSYOdGrAg==; expires=Thu, 31-Dec-37 23:55:55 GMT; domain=.lanyrd.com; + path=/ + body: + encoding: UTF-8 + string: |- + { + "path": "/partners/coderwall/profile-api/?twitter=asfjkdsfkjldsafdskljfdsdsfdsafas&view=history", + "version": 1, + "ok": false, + "error": { + "msg": "Not found", + "code": 404 + } + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:30 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/Opportunity.yml b/spec/fixtures/vcr_cassettes/Opportunity.yml new file mode 100644 index 00000000..a3bcdd29 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Opportunity.yml @@ -0,0 +1,459 @@ +--- +http_interactions: +- request: + method: get + uri: http://maps.googleapis.com/maps/api/geocode/json?address=Amsterdam&language=en&sensor=false + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sat, 26 Jul 2014 08:50:32 GMT + Expires: + - Sun, 27 Jul 2014 08:50:32 GMT + Cache-Control: + - public, max-age=86400 + Access-Control-Allow-Origin: + - "*" + Server: + - mafe + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - SAMEORIGIN + Alternate-Protocol: + - 80:quic + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: | + { + "results" : [ + { + "address_components" : [ + { + "long_name" : "Amsterdam", + "short_name" : "Amsterdam", + "types" : [ "locality", "political" ] + }, + { + "long_name" : "Government of Amsterdam", + "short_name" : "Government of Amsterdam", + "types" : [ "administrative_area_level_2", "political" ] + }, + { + "long_name" : "North Holland", + "short_name" : "NH", + "types" : [ "administrative_area_level_1", "political" ] + }, + { + "long_name" : "The Netherlands", + "short_name" : "NL", + "types" : [ "country", "political" ] + } + ], + "formatted_address" : "Amsterdam, The Netherlands", + "geometry" : { + "bounds" : { + "northeast" : { + "lat" : 52.4311573, + "lng" : 5.0683775 + }, + "southwest" : { + "lat" : 52.3182742, + "lng" : 4.7288558 + } + }, + "location" : { + "lat" : 52.3702157, + "lng" : 4.895167900000001 + }, + "location_type" : "APPROXIMATE", + "viewport" : { + "northeast" : { + "lat" : 52.4311573, + "lng" : 5.0683775 + }, + "southwest" : { + "lat" : 52.3182742, + "lng" : 4.7288558 + } + } + }, + "types" : [ "locality", "political" ] + }, + { + "address_components" : [ + { + "long_name" : "Amsterdam", + "short_name" : "Amsterdam", + "types" : [ "locality", "political" ] + }, + { + "long_name" : "Montgomery County", + "short_name" : "Montgomery County", + "types" : [ "administrative_area_level_2", "political" ] + }, + { + "long_name" : "New York", + "short_name" : "NY", + "types" : [ "administrative_area_level_1", "political" ] + }, + { + "long_name" : "United States", + "short_name" : "US", + "types" : [ "country", "political" ] + } + ], + "formatted_address" : "Amsterdam, NY, USA", + "geometry" : { + "bounds" : { + "northeast" : { + "lat" : 42.9663009, + "lng" : -74.1613418 + }, + "southwest" : { + "lat" : 42.919027, + "lng" : -74.22211390000001 + } + }, + "location" : { + "lat" : 42.9377453, + "lng" : -74.19035599999999 + }, + "location_type" : "APPROXIMATE", + "viewport" : { + "northeast" : { + "lat" : 42.9663009, + "lng" : -74.1613418 + }, + "southwest" : { + "lat" : 42.919027, + "lng" : -74.22211390000001 + } + } + }, + "types" : [ "locality", "political" ] + } + ], + "status" : "OK" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:32 GMT +- request: + method: get + uri: http://maps.googleapis.com/maps/api/geocode/json?address=San%20Francisco,%20CA&language=en&sensor=false + body: + encoding: US-ASCII + string: '' + headers: + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Content-Type: + - application/json; charset=UTF-8 + Date: + - Sat, 26 Jul 2014 08:50:33 GMT + Expires: + - Sun, 27 Jul 2014 08:50:33 GMT + Cache-Control: + - public, max-age=86400 + Access-Control-Allow-Origin: + - "*" + Server: + - mafe + X-Xss-Protection: + - 1; mode=block + X-Frame-Options: + - SAMEORIGIN + Alternate-Protocol: + - 80:quic + Transfer-Encoding: + - chunked + body: + encoding: UTF-8 + string: | + { + "results" : [ + { + "address_components" : [ + { + "long_name" : "San Francisco", + "short_name" : "SF", + "types" : [ "locality", "political" ] + }, + { + "long_name" : "San Francisco County", + "short_name" : "San Francisco County", + "types" : [ "administrative_area_level_2", "political" ] + }, + { + "long_name" : "California", + "short_name" : "CA", + "types" : [ "administrative_area_level_1", "political" ] + }, + { + "long_name" : "United States", + "short_name" : "US", + "types" : [ "country", "political" ] + } + ], + "formatted_address" : "San Francisco, CA, USA", + "geometry" : { + "bounds" : { + "northeast" : { + "lat" : 37.9297707, + "lng" : -122.3279149 + }, + "southwest" : { + "lat" : 37.6933354, + "lng" : -123.1077733 + } + }, + "location" : { + "lat" : 37.7749295, + "lng" : -122.4194155 + }, + "location_type" : "APPROXIMATE", + "viewport" : { + "northeast" : { + "lat" : 37.812, + "lng" : -122.3482 + }, + "southwest" : { + "lat" : 37.70339999999999, + "lng" : -122.527 + } + } + }, + "types" : [ "locality", "political" ] + } + ], + "status" : "OK" + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:33 GMT +- request: + method: post + uri: https://api.stripe.com/v1/plans + body: + encoding: US-ASCII + string: amount=0&interval=month&name=Basic¤cy=usd&id=pqjjcw + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '57' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:43 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '268' + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Cache-Control: + - no-cache, no-store + Access-Control-Max-Age: + - '300' + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "interval": "month", + "name": "Basic", + "created": 1406364643, + "amount": 0, + "currency": "usd", + "id": "pqjjcw", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:44 GMT +- request: + method: post + uri: https://api.stripe.com/v1/plans + body: + encoding: US-ASCII + string: amount=9900&interval=month&name=Monthly¤cy=usd&id=qb0ztq + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '62' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:44 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '273' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "interval": "month", + "name": "Monthly", + "created": 1406364644, + "amount": 9900, + "currency": "usd", + "id": "qb0ztq", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:44 GMT +- request: + method: post + uri: https://api.stripe.com/v1/plans + body: + encoding: US-ASCII + string: amount=19900&interval=month&name=Analytics¤cy=usd&id=vjvxja + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Stripe/v1 RubyBindings/1.14.0 + Authorization: + - Bearer <STRIPE_SECRET_KEY> + Content-Type: + - application/x-www-form-urlencoded + X-Stripe-Client-User-Agent: + - '{"bindings_version":"1.14.0","lang":"ruby","lang_version":"2.1.2 p95 (2014-05-08)","platform":"x86_64-linux","publisher":"stripe","uname":"Linux + chapter-alamo 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 + x86_64 x86_64 x86_64 GNU/Linux"}' + Content-Length: + - '65' + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Date: + - Sat, 26 Jul 2014 08:50:44 GMT + Content-Type: + - application/json;charset=utf-8 + Content-Length: + - '276' + Access-Control-Max-Age: + - '300' + Access-Control-Allow-Credentials: + - 'true' + Cache-Control: + - no-cache, no-store + Access-Control-Allow-Methods: + - GET, POST, HEAD, OPTIONS, DELETE + Stripe-Version: + - '2014-07-22' + Strict-Transport-Security: + - max-age=31556926; includeSubDomains + body: + encoding: UTF-8 + string: | + { + "interval": "month", + "name": "Analytics", + "created": 1406364644, + "amount": 19900, + "currency": "usd", + "id": "vjvxja", + "object": "plan", + "livemode": false, + "interval_count": 1, + "trial_period_days": null, + "metadata": {}, + "statement_description": null + } + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:44 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/Slideshare.yml b/spec/fixtures/vcr_cassettes/Slideshare.yml new file mode 100644 index 00000000..d2f579c1 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Slideshare.yml @@ -0,0 +1,1484 @@ +--- +http_interactions: +- request: + method: get + uri: http://www.slideshare.net/ndecrock/presentations + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + Verify-Ssl: + - 'false' + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - text/html; charset=utf-8 + Status: + - 200 OK + X-Runtime: + - '0.616322' + X-Xss-Protection: + - '0' + X-Content-Type-Options: + - nosniff + X-Request-Id: + - af53c89919f567e67dd8c68d83eef20d + X-Bench-Route: + - profile/mySlideshows + X-Frame-Options: + - SAMEORIGIN + X-Ua-Compatible: + - IE=Edge,chrome=1 + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Content-Encoding: + - gzip + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '12726' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:39 GMT + X-Varnish: + - '1358036300' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr4|U9Nr4; path=/ + - _uv_id=1361947068; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - PROD-ELA4 + X-Li-Uuid: + - a3uLHjBphBMQeG99sioAAA== + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAAAAAAAAA919+XIbR9Ln/46Ydyi3NQIwYuPifYD6qNPa0TWibH/fMjSI + vgA02eiGuxukaEkR8w77x8a+wG7E/rfPMG8yT7K/rKO7+gAB0PQ1nrFJdl2Z + VVlZmVmZWUdfP3nz+P1/vX3KJuk0OP7qiH6wwArHA8MLjeOvGDuaeJbLZrE3 + 8j8OjGh8gKrp7KDTicaz9tTrhMk3bGRXv3ZG9jesv7Xf7fd723s7tRU6efk3 + fDAMN/VSizkTK068dGDM05G5p4pSPw2849e+c8GeeE4cORf/+sf/Stjb2Eu8 + MLVSPwoTFoXsNPBd7xRdeEcd0UbrOrSm3sC49L2rWRSnBnOiMEXrgXHlu+lk + 4HqXvuOZ/I8N5od+6luBmThW4A167W4BStGV6yVO7M9odK23dzRrVugyN7oK + g0hMoQamfc10RGr69UMnmLvecBq5ntaxlVyHjqyO6Qr88ILFXjAwHCuMQh+A + GmyC1RoYcp2urq7aCc1IQjPSDr20E7pi+jpY1hwmg3WOvxIzxXst9DKb24Hv + aB05bth2omnH7tj+2I6itOMkSSdJTCfCKPj9YXe0Y1luf+TsGGzqub41MDBT + HuhKAJyk1wGA8jysQno9w6qk3kfeDYeEqEEhuCooeZcJcItGfuD1OSxbW13H + 7m5u73dvBYuY5ttAcf7j3IuvzblvJgmHxNvf3t3eckf9zVtBwphcoq9N88wf + sSD12IunbPfDsQ5jp3PDeumT5POlug0kR1+feaHrjz6Ypty5GUQE0P6HbAXF + 9mBJ7AyMGwE7ty4tURmrF8zHfph0iCFtt88T4/ioI8rUaNrwgmjlOJyUGpyU + 8g4bolWnwwD34ycn70/OJIFdWjFL/akXswFrht4Ve2KlXrPVao+99D2+N1uH + vCaafpA45ZCIgYH4PPHiyD73nJQlqRWnCZt4sZdNzQqg0RhXfgh20R5a83Qy + TKMLLxwSjwFkBn0Cm/IdP70WRYaAq74dNQlm/3nx04u3W5t/++Hiyv740/P/ + Phmdz/ovHzyeJx+/f3S57W+f/vjgJ+fxuDtAZ3I+gOfzE3bqjaeKp8oCBdzY + +hG96399/szOPhyyIUras3kyaZ41huDeJ44TzcO0scEa352Y/c3N7tbOjtlr + fGgdlqs+iaaWH74GrlS7xK4qDSzXfTEOwWbcd96IGhTZW6U+YAHKaTT93opR + vYcWU29qe/GQaIU6ePnm+fOnT958956KAZ9EmRVxSmPLuXhrjXFEeFc0Sj5l + j6NpQox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FhOYnr7gb6WIdTVpimp2T + 0I0j3/185dlvTj8LYyp+WC7+E7mfH1H43SO4kFx/fvFUdPqZX7DgJAn9jt9q + Uya+2tvufN2/aAaAv7BTbAJ62Qj7dJ5Nt1n7D5lMsyoCMdkaMMC0txS/3Jdi + YiXSl0KmRDchWiMlGHWjS5O6NEojpjCiBN4rwLp4MKp3j3w2UCUbsSDVYt0e + I6uvNeNvZZBySMILo2mA5gOlC0oMwaKRHxmHim+hoDbERjA4vA8icaE2BL3W + DkPR5HTEwxwSWa2c34YmhWmE9bakwHNsikPVT5vWMdfI3nmmVIpJU2SQ1oE2 + hZ6SWUfebpLPBP5P6w/PTWTvLXRyr2kUnEWMVnseUr7hZiON5s6EsC+K/7Vm + KoFB7kFTDz7tV/VPHc7icR16vC2nlDLKT8TRyFXjxQiTVg1tOb6G3ozp8D46 + 3gyPtYEW+Dyo+SgRASnTlekoT4YmRVaV/ZuthbknkZgF7dJeI6p8F8HdqsGt + kxBdyXZJ4Jra1OoSbcVsmUChJWcCC34x5LhV0HnyfaZ/LxoP/8IkW8u3zy0Y + CF/TR1a8MgvBAginfDEsfwuq1c4ZitqEipDqWYjwFsG4a/ORnETl3i1iULN7 + iWZqQK5hHW24fWFntQtvKYHL2ME8LmuWq26QHN76nbkAunyvigldBNoIRt+k + HjZtu9ftXG2zC369CofTsMmITV/hJZujsA633x43b2OxeTIKW7iDFsGqO+ep + 16d+KVhXOn/quQG4VfUgW7YZbpgbvb8Kp/ETZx3mgrMP6j8OO9abfST7KM+X + L1ZfuRAmuM2AaZueHeOlIFcKgyExAJFhSGnqsRe4vBcOMbnLlZgxwfrKm13q + HOiJG+1ecvMs7K3wY8VrOTfYF6A30W0t5Md6L1RB9rJ7cYy/j5rwxuuVTXkb + rFv4VDBQKMlEfcyFYxKUScrAwwMdstAff/X/AUSVSfkrwwAA + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:39 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/youre-buying-on-the-wrong-market + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Content-Type-Options: + - nosniff + X-Runtime: + - '0.021502' + X-Bench-Route: + - oembed/get_oembed_code + X-Request-Id: + - 98581eda56eee8e303f8dad69b4930e6 + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Xss-Protection: + - '0' + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1424' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:40 GMT + X-Varnish: + - '973020237' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r8|U9Nr4|U9Nr4; path=/ + - _uv_id=652800707; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - prod-lva1 + X-Li-Uuid: + - FGkcVDBphBMQrC3pdSsAAA== + body: + encoding: UTF-8 + string: '{"author_url":"http://www.slideshare.net/ndecrock","html":"\u003Ciframe + src=\"http://www.slideshare.net/slideshow/embed_code/27018843\" width=\"427\" + height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" + style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: + 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/youre-buying-on-the-wrong-market\" + title=\"You\u0026#x27;re buying on the wrong market!\" target=\"_blank\"\u003EYou\u0026#x27;re + buying on the wrong market!\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","slide_image_baseurl":"//image.slidesharecdn.com/wrongmarket-131009084827-phpapp02/95/slide-","provider_url":"http://www.slideshare.net","height":355,"conversion_version":2,"width":425,"provider_name":"SlideShare","total_slides":18,"type":"rich","version":"1.0","thumbnail_width":170,"thumbnail_height":128,"slideshow_id":27018843,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/wrongmarket-131009084827-phpapp02-thumbnail.jpg?cb=1381474458","version_no":"1381474458","slide_image_baseurl_suffix":"-1024.jpg","title":"You''re + buying on the wrong market!","author_name":"Nick Decrock"}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:40 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/terugblik-op-vijf-jaar-kaai16 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Request-Id: + - e9c2ef7a9d10dff33994fe9b7a45d984 + X-Xss-Protection: + - '0' + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Content-Type-Options: + - nosniff + X-Bench-Route: + - oembed/get_oembed_code + X-Runtime: + - '0.017545' + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1401' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:40 GMT + X-Varnish: + - '1358036510' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr4|U9Nr4; path=/ + - _uv_id=107420334; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - prod-lva1 + X-Li-Uuid: + - a0WNXDBphBMQ3jlYTisAAA== + body: + encoding: UTF-8 + string: '{"author_url":"http://www.slideshare.net/ndecrock","author_name":"Nick + Decrock","version_no":"1372673152","html":"\u003Ciframe src=\"http://www.slideshare.net/slideshow/embed_code/23615445\" + width=\"427\" height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" + scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; + max-width: 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/terugblik-op-vijf-jaar-kaai16\" + title=\"Terugblik op vijf jaar KAAI.16\" target=\"_blank\"\u003ETerugblik + op vijf jaar KAAI.16\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","slide_image_baseurl":"//image.slidesharecdn.com/terugblikopkaai16-130628071008-phpapp02/95/slide-","slide_image_baseurl_suffix":"-1024.jpg","title":"Terugblik + op vijf jaar KAAI.16","thumbnail_width":170,"thumbnail_height":128,"provider_name":"SlideShare","height":355,"conversion_version":2,"type":"rich","width":425,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/terugblikopkaai16-130628071008-phpapp02-thumbnail.jpg?cb=1372673152","total_slides":20,"version":"1.0","provider_url":"http://www.slideshare.net","slideshow_id":23615445}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:40 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/slideshare-revisited + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Content-Type-Options: + - nosniff + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Request-Id: + - 4b88c7cc126f5d4206dc8b74caeaef83 + X-Bench-Route: + - oembed/get_oembed_code + X-Runtime: + - '0.020722' + X-Xss-Protection: + - '0' + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1366' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:40 GMT + X-Varnish: + - '1358036555' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr4|U9Nr4; path=/ + - _uv_id=2143129704; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - PROD-ELA4 + X-Li-Uuid: + - M4FlajBphBOQFw5oVSsAAA== + body: + encoding: UTF-8 + string: '{"slideshow_id":21512209,"slide_image_baseurl":"//image.slidesharecdn.com/slidesharerevisited-130520061038-phpapp01/95/slide-","conversion_version":2,"version_no":"1369080354","provider_name":"SlideShare","slide_image_baseurl_suffix":"-1024.jpg","thumbnail_width":170,"title":"Slideshare + ReVisited","height":355,"html":"\u003Ciframe src=\"http://www.slideshare.net/slideshow/embed_code/21512209\" + width=\"427\" height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" + scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; + max-width: 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/slideshare-revisited\" + title=\"Slideshare ReVisited\" target=\"_blank\"\u003ESlideshare ReVisited\u003C/a\u003E + \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca href=\"http://www.slideshare.net/ndecrock\" + target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E \u003C/div\u003E\n\n","width":425,"thumbnail_height":128,"total_slides":15,"author_name":"Nick + Decrock","provider_url":"http://www.slideshare.net","thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/slidesharerevisited-130520061038-phpapp01-thumbnail.jpg?cb=1369080354","version":"1.0","author_url":"http://www.slideshare.net/ndecrock","type":"rich"}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:40 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/the-comeback-of-the-watch + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Content-Type-Options: + - nosniff + X-Runtime: + - '0.020164' + X-Bench-Route: + - oembed/get_oembed_code + X-Request-Id: + - 0345d7b51c034b19d8b8d9e4ba025e5a + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Xss-Protection: + - '0' + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1370' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:40 GMT + X-Varnish: + - '1358036615' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr4|U9Nr4; path=/ + - _uv_id=1503945199; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - PROD-ELA4 + X-Li-Uuid: + - xexLezBphBMQiAbcqCsAAA== + body: + encoding: UTF-8 + string: '{"author_url":"http://www.slideshare.net/ndecrock","html":"\u003Ciframe + src=\"http://www.slideshare.net/slideshow/embed_code/16469108\" width=\"427\" + height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" + style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: + 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/the-comeback-of-the-watch\" + title=\"The Comeback of the Watch\" target=\"_blank\"\u003EThe Comeback of + the Watch\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","slide_image_baseurl":"//image.slidesharecdn.com/timetowatch-130211082848-phpapp02/95/slide-","provider_url":"http://www.slideshare.net","height":355,"conversion_version":2,"width":425,"provider_name":"SlideShare","total_slides":21,"type":"rich","version":"1.0","thumbnail_width":170,"thumbnail_height":128,"slideshow_id":16469108,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/timetowatch-130211082848-phpapp02-thumbnail.jpg?cb=1377534222","version_no":"1377534222","slide_image_baseurl_suffix":"-1024.jpg","title":"The + Comeback of the Watch","author_name":"Nick Decrock"}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:40 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/kaai16-toekomstperspectief + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Request-Id: + - 98177df428d279e076215c755aeb19d0 + X-Xss-Protection: + - '0' + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Content-Type-Options: + - nosniff + X-Bench-Route: + - oembed/get_oembed_code + X-Runtime: + - '0.016540' + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1397' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:40 GMT + X-Varnish: + - '1358036679' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr4|U9Nr4; path=/ + - _uv_id=541645316; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - PROD-ELA4 + X-Li-Uuid: + - S/upijBphBMQoOzwqCsAAA== + body: + encoding: UTF-8 + string: '{"author_url":"http://www.slideshare.net/ndecrock","author_name":"Nick + Decrock","version_no":"1350051854","html":"\u003Ciframe src=\"http://www.slideshare.net/slideshow/embed_code/14698076\" + width=\"427\" height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" + scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; + max-width: 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/kaai16-toekomstperspectief\" + title=\"KAAI.16 Toekomstperspectief\" target=\"_blank\"\u003EKAAI.16 Toekomstperspectief\u003C/a\u003E + \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca href=\"http://www.slideshare.net/ndecrock\" + target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E \u003C/div\u003E\n\n","slide_image_baseurl":"//image.slidesharecdn.com/kaai16presoslideshare-121012043951-phpapp01/95/slide-","slide_image_baseurl_suffix":"-1024.jpg","title":"KAAI.16 + Toekomstperspectief","thumbnail_width":170,"thumbnail_height":128,"provider_name":"SlideShare","height":355,"conversion_version":2,"type":"rich","width":425,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/kaai16presoslideshare-121012043951-phpapp01-thumbnail.jpg?cb=1350051854","total_slides":27,"version":"1.0","provider_url":"http://www.slideshare.net","slideshow_id":14698076}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:40 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/the-kama-sutra-for-business-pleasures-preview + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Runtime: + - '0.019597' + X-Bench-Route: + - oembed/get_oembed_code + X-Xss-Protection: + - '0' + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Request-Id: + - 903eda09057f3bc971ca9b57a42b85b9 + X-Content-Type-Options: + - nosniff + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1476' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:41 GMT + X-Varnish: + - '1358036720' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr5|U9Nr5; path=/ + - _uv_id=104958154; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - prod-lva1 + X-Li-Uuid: + - 6ooSlDBphBMQeObodSsAAA== + body: + encoding: UTF-8 + string: '{"slideshow_id":11463347,"thumbnail_height":128,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/kamasutrapresentation-120207074819-phpapp01-thumbnail.jpg?cb=1328688383","height":355,"slide_image_baseurl":"//image.slidesharecdn.com/kamasutrapresentation-120207074819-phpapp01/95/slide-","provider_name":"SlideShare","thumbnail_width":170,"version":"1.0","conversion_version":2,"width":425,"author_name":"Nick + Decrock","html":"\u003Ciframe src=\"http://www.slideshare.net/slideshow/embed_code/11463347\" + width=\"427\" height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" + scrolling=\"no\" style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; + max-width: 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/the-kama-sutra-for-business-pleasures-preview\" + title=\"The Kama Sutra for Business Pleasures - Preview\" target=\"_blank\"\u003EThe + Kama Sutra for Business Pleasures - Preview\u003C/a\u003E \u003C/strong\u003E + from \u003Cstrong\u003E\u003Ca href=\"http://www.slideshare.net/ndecrock\" + target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E \u003C/div\u003E\n\n","version_no":"1328688383","provider_url":"http://www.slideshare.net","author_url":"http://www.slideshare.net/ndecrock","slide_image_baseurl_suffix":"-1024.jpg","type":"rich","title":"The + Kama Sutra for Business Pleasures - Preview","total_slides":31}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:41 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/waking-up-in-the-post-social-media-era + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Request-Id: + - e947bf7b12cf6d5db22da8b1717e5b9f + X-Xss-Protection: + - '0' + X-Runtime: + - '0.016479' + X-Bench-Route: + - oembed/get_oembed_code + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Content-Type-Options: + - nosniff + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1456' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:41 GMT + X-Varnish: + - '1358036751' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr5|U9Nr5; path=/ + - _uv_id=238130546; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - prod-lva1 + X-Li-Uuid: + - N2NbnDBphBMQBg14UysAAA== + body: + encoding: UTF-8 + string: '{"author_url":"http://www.slideshare.net/ndecrock","provider_name":"SlideShare","title":"Waking + up in the Post Social Media Era","slide_image_baseurl_suffix":"-1024.jpg","thumbnail_height":128,"slideshow_id":11055436,"version":"1.0","html":"\u003Ciframe + src=\"http://www.slideshare.net/slideshow/embed_code/11055436\" width=\"427\" + height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" + style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: + 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/waking-up-in-the-post-social-media-era\" + title=\"Waking up in the Post Social Media Era\" target=\"_blank\"\u003EWaking + up in the Post Social Media Era\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","slide_image_baseurl":"//image.slidesharecdn.com/postsocialmediaeraslideshare-120115054445-phpapp02/95/slide-","width":425,"type":"rich","total_slides":58,"version_no":"1326865026","provider_url":"http://www.slideshare.net","thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/postsocialmediaeraslideshare-120115054445-phpapp02-thumbnail.jpg?cb=1326865026","height":355,"conversion_version":2,"author_name":"Nick + Decrock","thumbnail_width":170}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:41 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/how-to-survive-burning-man + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Request-Id: + - 54442eb7b47568ef29030f633470225a + X-Content-Type-Options: + - nosniff + X-Bench-Route: + - oembed/get_oembed_code + X-Runtime: + - '0.017010' + X-Xss-Protection: + - '0' + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1378' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:41 GMT + X-Varnish: + - '973020553' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r8|U9Nr5|U9Nr5; path=/ + - _uv_id=629882058; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - PROD-ELA4 + X-Li-Uuid: + - FwjqqTBphBMQKM4IQSsAAA== + body: + encoding: UTF-8 + string: '{"conversion_version":2,"slide_image_baseurl_suffix":"-1024.jpg","thumbnail_width":170,"thumbnail_height":128,"slide_image_baseurl":"//image.slidesharecdn.com/burningmantips-110912095809-phpapp01/95/slide-","title":"How + to survive Burning Man","type":"rich","slideshow_id":9226423,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/burningmantips-110912095809-phpapp01-thumbnail.jpg?cb=1315878673","version_no":"1315878673","total_slides":20,"author_name":"Nick + Decrock","provider_name":"SlideShare","version":"1.0","author_url":"http://www.slideshare.net/ndecrock","height":355,"width":425,"html":"\u003Ciframe + src=\"http://www.slideshare.net/slideshow/embed_code/9226423\" width=\"427\" + height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" + style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: + 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/how-to-survive-burning-man\" + title=\"How to survive Burning Man\" target=\"_blank\"\u003EHow to survive + Burning Man\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","provider_url":"http://www.slideshare.net"}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:41 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/looking-through-a-black-mirror + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Request-Id: + - f92cd10a3d287d56dfd8bb4d43424acc + X-Content-Type-Options: + - nosniff + X-Bench-Route: + - oembed/get_oembed_code + X-Runtime: + - '0.021250' + X-Xss-Protection: + - '0' + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1408' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:41 GMT + X-Varnish: + - '1358036866' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr5|U9Nr5; path=/ + - _uv_id=1210403509; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - PROD-ELA4 + X-Li-Uuid: + - FfJJuTBphBMQgg3AqCsAAA== + body: + encoding: UTF-8 + string: '{"conversion_version":2,"slide_image_baseurl_suffix":"-1024.jpg","thumbnail_width":170,"thumbnail_height":128,"slide_image_baseurl":"//image.slidesharecdn.com/blackmirrorslideshare-100917020454-phpapp02/95/slide-","title":"Looking + through a black mirror","type":"rich","slideshow_id":5220833,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/blackmirrorslideshare-100917020454-phpapp02-thumbnail.jpg?cb=1284898242","version_no":"1284898242","total_slides":49,"author_name":"Nick + Decrock","provider_name":"SlideShare","version":"1.0","author_url":"http://www.slideshare.net/ndecrock","height":355,"width":425,"html":"\u003Ciframe + src=\"http://www.slideshare.net/slideshow/embed_code/5220833\" width=\"427\" + height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" + style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: + 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/looking-through-a-black-mirror\" + title=\"Looking through a black mirror\" target=\"_blank\"\u003ELooking through + a black mirror\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","provider_url":"http://www.slideshare.net"}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:41 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/engaging-to-social-media + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Runtime: + - '0.020809' + X-Xss-Protection: + - '0' + X-Content-Type-Options: + - nosniff + X-Request-Id: + - 9b082593712c8a0c99bd7baed793e06e + X-Bench-Route: + - oembed/get_oembed_code + X-Ua-Compatible: + - IE=Edge,chrome=1 + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1423' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:41 GMT + X-Varnish: + - '1358036933' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr5|U9Nr5; path=/ + - _uv_id=1800653539; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - PROD-ELA4 + X-Li-Uuid: + - UZU3yDBphBMQwEXQrSoAAA== + body: + encoding: UTF-8 + string: '{"conversion_version":2,"slideshow_id":3331949,"width":425,"version":"1.0","author_name":"Nick + Decrock","thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/engagingtosocialmedia-100304014843-phpapp02-thumbnail.jpg?cb=1268602180","slide_image_baseurl":"//image.slidesharecdn.com/engagingtosocialmedia-100304014843-phpapp02/95/slide-","thumbnail_height":128,"thumbnail_width":170,"author_url":"http://www.slideshare.net/ndecrock","html":"\u003Ciframe + src=\"http://www.slideshare.net/slideshow/embed_code/3331949\" width=\"427\" + height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" + style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: + 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/engaging-to-social-media\" + title=\"How to get engaged to/in social media\" target=\"_blank\"\u003EHow + to get engaged to/in social media\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","slide_image_baseurl_suffix":"-1024.jpg","version_no":"1268602180","provider_name":"SlideShare","height":355,"total_slides":58,"provider_url":"http://www.slideshare.net","title":"How + to get engaged to/in social media","type":"rich"}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:42 GMT +- request: + method: get + uri: http://www.slideshare.net/api/oembed/2?format=json&url=http://www.slideshare.net/ndecrock/social-media-the-rainbow-theory + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Server: + - nginx + Content-Type: + - application/json; charset=utf-8 + Status: + - 200 OK + X-Bench-Route: + - oembed/get_oembed_code + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - '0' + X-Runtime: + - '0.017933' + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Request-Id: + - 36c8a194fbe96ecf7340087360a26775 + P3p: + - CP="OTI DSP COR CUR ADM DEV PSD IVD CONo OUR IND" + Cache-Control: + - no-cache, must-revalidate, private, must-revalidate + Content-Length: + - '1405' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:42 GMT + X-Varnish: + - '1358036972' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r86|U9Nr5|U9Nr5; path=/ + - _uv_id=1808563314; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - prod-lva1 + X-Li-Uuid: + - OP7i0TBphBMQmqNDASsAAA== + body: + encoding: UTF-8 + string: '{"slideshow_id":3331858,"type":"rich","author_name":"Nick Decrock","thumbnail_width":170,"conversion_version":2,"slide_image_baseurl":"//image.slidesharecdn.com/therainbowtheory-100304011824-phpapp02/95/slide-","version":"1.0","author_url":"http://www.slideshare.net/ndecrock","html":"\u003Ciframe + src=\"http://www.slideshare.net/slideshow/embed_code/3331858\" width=\"427\" + height=\"356\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" + style=\"border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: + 100%;\" allowfullscreen\u003E \u003C/iframe\u003E \u003Cdiv style=\"margin-bottom:5px\"\u003E + \u003Cstrong\u003E \u003Ca href=\"https://www.slideshare.net/ndecrock/social-media-the-rainbow-theory\" + title=\"Social Media: the Rainbow Theory\" target=\"_blank\"\u003ESocial Media: + the Rainbow Theory\u003C/a\u003E \u003C/strong\u003E from \u003Cstrong\u003E\u003Ca + href=\"http://www.slideshare.net/ndecrock\" target=\"_blank\"\u003ENick Decrock\u003C/a\u003E\u003C/strong\u003E + \u003C/div\u003E\n\n","thumbnail_height":128,"thumbnail":"//cdn.slidesharecdn.com/ss_thumbnails/therainbowtheory-100304011824-phpapp02-thumbnail.jpg?cb=1375345774","provider_name":"SlideShare","total_slides":21,"provider_url":"http://www.slideshare.net","slide_image_baseurl_suffix":"-1024.jpg","version_no":"1375345774","width":425,"title":"Social + Media: the Rainbow Theory","height":355}' + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:42 GMT +- request: + method: get + uri: http://www.slideshare.net/asfjkdsfkjldsafdskljfdsdsfdsafas/presentations + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + Verify-Ssl: + - 'false' + User-Agent: + - Ruby + response: + status: + code: 404 + message: Not Found + headers: + Server: + - nginx + Content-Type: + - text/html; charset=utf-8 + Status: + - 404 Not Found + X-Runtime: + - '0.098634' + X-Ua-Compatible: + - IE=Edge,chrome=1 + X-Bench-Route: + - profile/mySlideshows + X-Request-Id: + - a97f6bb2cf793bf556b55e92d9736fae + X-Frame-Options: + - SAMEORIGIN + X-Content-Type-Options: + - nosniff + X-Xss-Protection: + - '0' + Content-Encoding: + - gzip + Cache-Control: + - no-cache + Content-Length: + - '9805' + Accept-Ranges: + - bytes + Date: + - Sat, 26 Jul 2014 08:50:42 GMT + X-Varnish: + - '973020747' + Age: + - '0' + Via: + - 1.1 varnish + Set-Cookie: + - SERVERID=r8|U9Nr5|U9Nr5; path=/ + - _uv_id=1162817258; Path=/; Domain=.slideshare.net + Connection: + - keep-alive + X-Li-Pop: + - prod-lva1 + X-Li-Uuid: + - XknP3DBphBMQ8KAxUSsAAA== + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAAAAAAAAA9V963bbSJLm/3qKLJTbJMciKcmXsiVRXlmW3Z4uX8ZydfWs + jpsHBBIkLBBgAaBkte1z9h32Ifac/bfP0G+yT7JfRGYCiQslUUe1066ZtiTk + LSIzMjIiMiNi78fnbw8//Oe7Iz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xmyoieF + QcvuJZppAbmFdQwgG2JnDSp+qeAyk2iZ1jXL626QEt72nbkCunKvqgldBVoA + 1Tprh83a7m07twSsfbdfejBgXQtis1f4is1RWYebb4/Lt7HaPAVdrNxBq2C1 + H+cZT94/CtZrnT/t3MBegmtvhkvmprKkdU6DlOfrMBecfVD/cdiJLXjiwT5K + 3hja48E8IcxwmwHTNrnpcSnIlZwYSAyAX08UnkrxCpf36kFM+eRKzZhiffXN + rnUO9MRGu1/YPAt7q0NGQ9ztrrQvQG/6gOtfGD0ti39NCijM/uoY/5B08Rpv + q3JgYAo3xGb1DGmT/MwxUwrHJCjTiUt5RclCv//D/wN6QYf4xo4AAA== + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:42 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/fixtures/vcr_cassettes/Speakerdeck.yml b/spec/fixtures/vcr_cassettes/Speakerdeck.yml new file mode 100644 index 00000000..cc890839 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/Speakerdeck.yml @@ -0,0 +1,388 @@ +--- +http_interactions: +- request: + method: get + uri: https://speakerdeck.com/u/jnunemaker + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + Verify-Ssl: + - 'false' + User-Agent: + - Ruby + response: + status: + code: 301 + message: Moved Permanently + headers: + Cache-Control: + - no-cache + Content-Encoding: + - gzip + Content-Type: + - text/html + Date: + - Sat, 26 Jul 2014 08:50:42 GMT + Location: + - https://speakerdeck.com/jnunemaker + Status: + - 301 Moved Permanently + Strict-Transport-Security: + - max-age=0 + Vary: + - Accept-Encoding + X-Rack-Cache: + - miss + X-Request-Id: + - 2571d61f-27ec-4e4a-9e28-d575c6039c9f + X-Runtime: + - '0.004021' + X-Ua-Compatible: + - IE=Edge,chrome=1 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAOJr01MAAxzMsQ2AIBAF0FUIA3i9OdnDEuEriIA5oHB7o+0rHoeeL8Nb + 9Y9Z61BWoDbEcii2Kgj2RYfe7zYTtRs2QTxcmlzNdJZRkD/SRuCjwHV4Jmsm + pj9k+vcXAAD//wMA02OERWQAAAA= + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:42 GMT +- request: + method: get + uri: https://speakerdeck.com/jnunemaker + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + Verify-Ssl: + - 'false' + User-Agent: + - Ruby + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - max-age=0, private, must-revalidate + Content-Encoding: + - gzip + Content-Type: + - text/html; charset=utf-8 + Date: + - Sat, 26 Jul 2014 08:50:42 GMT + Etag: + - '"0f748656802927b7f913d84d243a5456"' + Set-Cookie: + - _secure_speakerd_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTA4YmRhNmY5N2IwYjUxMDlkNjU1MzI1OGE5NmViMzM2BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMUdqelcvZjJRMUVxNHRZdlBRRXpoRkNpZWNlZ01XckdsRTdTU3E3UVI5aGM9BjsARg%3D%3D--3e0210cd9b27408771b623201f1650ac42c42bec; + path=/; expires=Sat, 09-Aug-2014 08:50:42 GMT; secure; HttpOnly + Status: + - 200 OK + Strict-Transport-Security: + - max-age=0 + Vary: + - Accept-Encoding + X-Frame-Options: + - SAMEORIGIN + X-Rack-Cache: + - miss + X-Request-Id: + - 8db1899c-7809-4814-959f-1e55d6b7044f + X-Runtime: + - '0.045141' + X-Ua-Compatible: + - IE=Edge,chrome=1 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAOJr01MAA9ybfVPbOBrA/+dTaH0zDUxx/B4nhaRDF9hlb0tpobvb7XQY + 2ZZfwLGMJYdmb2/mPs19sPsk90i2EwcStk3LcYUZElt6JD0vPz2yHXn3u/1X + 35+9OzlAMR+no43d5ov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WW0l6ZIpsJm87XM + BAGpdtfLjeK4IIheZ4AIpAoek6RAfkEwpwXrtlJdK2jiUPj7Njlij3tr1+oC + MyG+gjvb7l73dXeRkZuCnEIXZwRugREN4eqwmCQ+ubtJXiQT7E+V0Ul1gE4o + LIvTZSy2mGvQqgmq3nlY8UKClJngAp1H+AoNq68//0TvP+zIKnHezUsWb77v + nAMre75cZDvbqPN2TzUG5kB3DFc1Oh+2ljfYp2Iz8TEeE9Gme+PVgOXNeIH9 + yxMcydVaikiZzbDM5Gza3EL/qP0lVI8wKB5QvxwDCF0ZZHKQEnG22akM7Wzt + gFhXOAFkOzfc0JGVmE0zH2p5UZKdunsohtkEhZudakJ10LA1Vkqrtw+6eUHF + jvMUPUed2YrP0g56Vp3D6fX1dWcLPQUfVK+4zLcmyCQaifdGOjsts1jbqojw + 2iT2YnqGI+HQuXHv9Q87iHVzYD7jx+LdmSRjMKNfkJAWZDPC24jVjv7n1qY8 + mr+JItPRJ1Cyyv0cvj/B/3ULXgVhaRRmIstCwbtJgORQnQiXEWGqxIQUrXYC + UM6LxCs5eKe6MoSED1eQne3W6tr664gNB9j0nJ5hhU5g6mb1m67T1rhCoDNf + /WD8LmGaVOALw1a3XB08fmfsdjXxbomY9dULif8VAAAA//8DANnN2oWoOAAA + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:42 GMT +- request: + method: get + uri: https://speakerdeck.com/u/asfjkdsfkjldsafdskljfdsdsfdsafas + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + Verify-Ssl: + - 'false' + User-Agent: + - Ruby + response: + status: + code: 301 + message: Moved Permanently + headers: + Cache-Control: + - no-cache + Content-Encoding: + - gzip + Content-Type: + - text/html + Date: + - Sat, 26 Jul 2014 08:50:43 GMT + Location: + - https://speakerdeck.com/asfjkdsfkjldsafdskljfdsdsfdsafas + Status: + - 301 Moved Permanently + Strict-Transport-Security: + - max-age=0 + Vary: + - Accept-Encoding + X-Rack-Cache: + - miss + X-Request-Id: + - 055ce279-50ba-40ae-80b9-90bd4b0a9205 + X-Runtime: + - '0.006065' + X-Ua-Compatible: + - IE=Edge,chrome=1 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAONr01MAAxyNMQ6DMAwAvxLxALwjN//oaGKnIQ4E2enQ3xdYTrpbDsvY + W8S18y+++zeQSVhlOz4BKRST/JrKGKcvAH4KqRhL0jn1HchzVfastbFTZtdW + L17lVvIpmvBmkoYwAsUZ4dkgPM8/AAAA//8DAAPPh9h6AAAA + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:43 GMT +- request: + method: get + uri: https://speakerdeck.com/asfjkdsfkjldsafdskljfdsdsfdsafas + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - "*/*; q=0.5, application/xml" + Accept-Encoding: + - gzip, deflate + Verify-Ssl: + - 'false' + User-Agent: + - Ruby + response: + status: + code: 404 + message: Not Found + headers: + Cache-Control: + - no-cache + Content-Encoding: + - gzip + Content-Type: + - text/html; charset=utf-8 + Date: + - Sat, 26 Jul 2014 08:50:43 GMT + Set-Cookie: + - _secure_speakerd_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTA5YTk4MmJiZTkyMjQyZTcwYjc1M2EwOTJlYjAzNzEzBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMU1JZkl5bDNiQ3VLSHJDMVBNYjVzcDdDQjNVeGtEdlVzVmQ2citIUlJ2NFU9BjsARg%3D%3D--1227cff2f07f5d6a2213fe35b1dda7c962e9f54b; + path=/; expires=Sat, 09-Aug-2014 08:50:43 GMT; secure; HttpOnly + Status: + - 404 Not Found + Strict-Transport-Security: + - max-age=0 + Vary: + - Accept-Encoding + X-Frame-Options: + - SAMEORIGIN + X-Rack-Cache: + - miss + X-Request-Id: + - b2985d47-290e-4b73-903b-df1475f7f7e9 + X-Runtime: + - '0.064625' + X-Ua-Compatible: + - IE=Edge,chrome=1 + Transfer-Encoding: + - chunked + Connection: + - keep-alive + body: + encoding: ASCII-8BIT + string: !binary |- + H4sIAONr01MAA9xc63LbOLL+n6fAak9FTiUU77rEtqaciyfJ5OIZx5tNUqkU + CIAiY4pgCNCK5uyp2qfZqn2OfZN9km0AlETZshxp7Gz5uBKJBBqNRveHRjdI + aO9PT948fvv+6ClK5Dgb3tmbfTFMh3cQ2hsziRFJcCmY3G+dvD20+i1dIVOZ + seGJYCV6zSU65FVOkW2j44LhUyh8wsjpnm2o5owSKQuLfa3Ss/3WX62TA+sx + HxdYplHGWojwXLIcenn+dP8pHTHTT5bmpygpWbzftu0YSERnxPkoY7hIRYfw + sU2E+CnG4zSb7r8pWH7/GOfiYeA4D3z433Wcu6KKlPQZdJQ/0J8W+yYfkGmZ + ZllK5heqtI1Klu23hZxmTCSMQYGcFmy/LaFSddU+J1VLjUk8tG3q0TjhQdmV + PSzSDsl4ReMSBO7kTNpYgAjCztgIk6mNiwL6A0l4bvku60WuywY9l7juwI1D + 36WuH/heSCn24w502kJjRlO83xKkZCxvaSFbCyFbRsjWTMgWsod37hid53gM + NZxInk1lSoQFnVspbehbGJNRsJhqeEmzhAvZaER4ljGoLTujVCZVBFyVNdYw + ANnTQl7KxyI0r3nNGN2BMZhWSJRkQ1U3ddzzKCYspk4UUcIG/X7s+Rj3ek6A + sRvEceeLWFLhF3yGTcet4Z5trmBW/MmyPqYxyiR6/hQNPg2XpbNtNXlCkaRn + NUQJp0xDVJzltiyr/NSQqO6W+H5kOU3jT5a16GRnJJnqpnvv7k5mLvv3Pmnw + ba0SwZSq07P099ICzAURBaR53SBiUTfuE78fOv6ADEjcd/D3qqQpunEWM8vi + SiZwkZJUTj9Lfqpwa0BBRBlbBS6xsfK5dh9e/Hzy4TV+R4/evTv2w2+vTt4d + vizll/eYv3EHr4r3H5z820ufvP+WnRxm0yp13PuH357lJ78HB/fvj188vv9L + PxyXH16MTpxfg0l/+t4n+cH+/lLvtTwKYwitntCNaaGNWNgxw7I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s4dimE1QuNM2E6qN + 9ht9ZdwEBB3wxuqEcIZ+Qu35JoTI2uihuYdbyGLb99B90IH5HQAL59j8CILe + mBipw/Xt3cawRHNUIybrIYlH07d4pBS6GNxH59MuEp0Cq1DxtfqBgTQXMKMf + sZiXbGeEHyBRK/r/7u3oq8Vxfe2OvgMll6lfwvd36L9uIY0RVlphTrLKFLKT + UqS7ao9wNWLC0jBhZaOdAqiUZRpVErRj9qvAdVspbT+Yh/ZLf+2AUg97Udh1 + /TiknuO5jvoLmxIbCLRt5c4hru6o/jtM2FqAP2i2uuXlxpNrbbdnq98CULPe + /EjLfwQAAAD//wMAxuGDVLxFAAA= + http_version: + recorded_at: Sat, 26 Jul 2014 08:50:43 GMT +recorded_with: VCR 2.9.2 diff --git a/spec/helpers/accounts_helper_spec.rb b/spec/helpers/accounts_helper_spec.rb index 67573132..dae3bd22 100644 --- a/spec/helpers/accounts_helper_spec.rb +++ b/spec/helpers/accounts_helper_spec.rb @@ -1,5 +1,28 @@ require 'spec_helper' -describe AccountsHelper do +RSpec.describe AccountsHelper, type: :helper, skip: true do + it '#invoice_date formats inovoice date from unix time' do + invoice = { date: 1_068_854_400 } + expect(helper.invoice_date(invoice)).to eq('November 15th, 2003') + end -end \ No newline at end of file + it '#card_for returns card for a customer' do + customer = { cards: ['test'] } + expect(helper.card_for(customer)).to eq('test') + end + + it '#subscription_period returns start and end dates for a subscription in the invoice' do + invoice = { + lines: { + data: [{ + period: { + start: 1_005_523_200, + end: 1_351_728_000 + } + }] + } + } + expect(helper.subscription_period_for(invoice, :start)).to eq('November 12th, 2001') + expect(helper.subscription_period_for(invoice, :end)).to eq('November 1st, 2012') + end +end diff --git a/spec/helpers/endorsements_helper_spec.rb b/spec/helpers/endorsements_helper_spec.rb index 81cc9f53..9b6f3c29 100644 --- a/spec/helpers/endorsements_helper_spec.rb +++ b/spec/helpers/endorsements_helper_spec.rb @@ -1,6 +1,5 @@ require 'spec_helper' -describe EndorsementsHelper do +RSpec.describe EndorsementsHelper, type: :helper do - -end \ No newline at end of file +end diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb deleted file mode 100644 index fc62e8d3..00000000 --- a/spec/helpers/events_helper_spec.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'spec_helper' - -describe EventsHelper do - - -end \ No newline at end of file diff --git a/spec/helpers/highlights_helper_spec.rb b/spec/helpers/highlights_helper_spec.rb deleted file mode 100644 index b418d3cb..00000000 --- a/spec/helpers/highlights_helper_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe HighlightsHelper do - -end diff --git a/spec/helpers/links_helper_spec.rb b/spec/helpers/links_helper_spec.rb deleted file mode 100644 index db1d1b98..00000000 --- a/spec/helpers/links_helper_spec.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'spec_helper' - -describe LinksHelper do - - -end \ No newline at end of file diff --git a/spec/helpers/premium_helper_spec.rb b/spec/helpers/premium_helper_spec.rb index 68f97661..e2a26ea6 100644 --- a/spec/helpers/premium_helper_spec.rb +++ b/spec/helpers/premium_helper_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -describe PremiumHelper do +RSpec.describe PremiumHelper, type: :helper do it 'should strip p tags from markdown' do - markdown("some raw text markdown").should == "some raw text markdown\n" + expect(markdown('some raw text markdown')).to eq("some raw text markdown\n") end end diff --git a/spec/helpers/protips_helper_spec.rb b/spec/helpers/protips_helper_spec.rb index 2161cc18..1bf85191 100644 --- a/spec/helpers/protips_helper_spec.rb +++ b/spec/helpers/protips_helper_spec.rb @@ -1,6 +1,45 @@ -require 'spec_helper' +RSpec.describe ProtipsHelper, type: :helper do + describe '.protip_search_results_to_render' do + it 'has no protips to render' do + expect(helper.protip_search_results_to_render(nil)).to be_nil + end + end -describe ProtipsHelper do + describe '#users_background_image' do + context 'user is logged in' do + it 'returns #location_image_url_for @user' do + assign(:user, 'test_user') + allow(helper).to receive(:location_image_url_for).with('test_user').and_return('image_path') + expect(helper.users_background_image).to eq 'image_path' + end + end + context 'user is not logged in' do + it 'returns nil' do + assign(:user, nil) + expect(helper.users_background_image).to be_nil + end + end -end \ No newline at end of file + context 'protip is set' do + it 'returns #location_image_url_for @protip.user if @protip is not new_record' do + @protip = double('protip', 'user' => 'test_user', 'new_record?' => false) + allow(helper).to receive(:location_image_url_for).with('test_user').and_return('image_path') + expect(helper.users_background_image).to eq 'image_path' + end + + it 'returns nil if @protip is new_record' do + @protip = double('protip', 'user' => 'test_user', 'new_record?' => true) + expect(helper.users_background_image).to be_nil + end + end + + context 'protip is not set' do + it 'returns nil' do + assign(:protip, nil) + expect(helper.users_background_image).to be_nil + end + end + end + +end diff --git a/spec/helpers/redemptions_helper_spec.rb b/spec/helpers/redemptions_helper_spec.rb deleted file mode 100644 index 24836b20..00000000 --- a/spec/helpers/redemptions_helper_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe RedemptionsHelper do - -end \ No newline at end of file diff --git a/spec/helpers/skills_helper_spec.rb b/spec/helpers/skills_helper_spec.rb index c2ab47d7..236ca8f2 100644 --- a/spec/helpers/skills_helper_spec.rb +++ b/spec/helpers/skills_helper_spec.rb @@ -1,6 +1,5 @@ require 'spec_helper' -describe SkillsHelper do - +RSpec.describe SkillsHelper, type: :helper do end diff --git a/spec/helpers/teams_helper_spec.rb b/spec/helpers/teams_helper_spec.rb new file mode 100644 index 00000000..cf4e2776 --- /dev/null +++ b/spec/helpers/teams_helper_spec.rb @@ -0,0 +1,17 @@ +require 'spec_helper' + +RSpec.describe TeamsHelper, type: :helper do + describe '#exact_team_exists?' do + let(:teams) { Fabricate.build_times(3, :team) } + + it 'returns true if there is a team with exact matching name' do + teams << Fabricate.build(:team, name: 'test_name', slug: 'test-name') + expect(helper.exact_team_exists?(teams, 'test-name')).to be_truthy + end + + it 'returns false if there is no team with exact mathcing name' do + expect(helper.exact_team_exists?(teams, 'non-existent team name')).to be_falsey + end + + end +end diff --git a/spec/indexers/protip_indexer_spec.rb b/spec/indexers/protip_indexer_spec.rb new file mode 100644 index 00000000..c6ba1b9f --- /dev/null +++ b/spec/indexers/protip_indexer_spec.rb @@ -0,0 +1,28 @@ +RSpec.describe ProtipIndexer, skip: true do + before(:all) { Protip.rebuild_index } + describe '#store' do + it 'should add a users protip to the search index' do + protip = Fabricate(:protip, body: 'something to ignore', + title: 'look at this content') + ProtipIndexer.new(protip).remove + expect(Protip.search('this content').count).to eq(0) + ProtipIndexer.new(protip).store + expect(Protip.search('this content').count).to eq(1) + end + + it 'should not add a users protip to search index if user is banned' do + banned_user = Fabricate(:user, banned_at: Time.now) + Fabricate(:protip, body: 'Some body.', title: 'Some title.', user: banned_user) + expect(Protip.search('Some title').count).to eq(0) + end + end + + describe '#remove' do + it 'should remove a users protip from search index' do + protip = Fabricate(:protip, body: 'something to ignore', title: 'look at that troll') + expect(Protip.search('that troll').count).to eq(1) + ProtipIndexer.new(protip).remove + expect(Protip.search('that troll').count).to eq(0) + end + end +end diff --git a/spec/jobs/activate_user_spec.rb b/spec/jobs/activate_user_spec.rb deleted file mode 100644 index 0eda2184..00000000 --- a/spec/jobs/activate_user_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -describe ActivateUser, :pending, functional: true do - it 'should activate a user regardless of achievements by default', slow: true do - user = Fabricate(:pending_user, github: 'hirelarge') - ActivateUser.new(user.username).perform - user.reload.should be_active - end - - it 'should not activate a user if no achievements and only_if_achievements flag is true', slow: true do - user = Fabricate(:pending_user, github: 'hirelarge') - ActivateUser.new(user.username, always_activate=false).perform - user.reload.should_not be_active - end - - it 'should activate a user if achievements even if only_if_achievements flag is true', slow: true do - user = Fabricate(:pending_user, github: 'mdeiters') - ActivateUser.new(user.username).perform - user.reload.should be_active - end -end diff --git a/spec/jobs/analyze_spam_job_spec.rb b/spec/jobs/analyze_spam_job_spec.rb new file mode 100644 index 00000000..6fe77107 --- /dev/null +++ b/spec/jobs/analyze_spam_job_spec.rb @@ -0,0 +1,31 @@ +require 'sidekiq/testing' + +RSpec.describe AnalyzeSpamJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(AnalyzeSpamJob.get_sidekiq_options['queue']).to eql :data_cleanup + end + end + + # TODO FIXME + # describe '#perform' do + # context 'when it is a spam' do + # it 'should create a spam report' do + # allow_any_instance_of(Comment).to receive(:spam?).and_return(true) + # spammable = Fabricate(:comment) + # AnalyzeSpamJob.perform_async(id: spammable.id, klass: spammable.class.name) + # expect(spammable.spam_report).not_to be_nil + # end + # end + + # context 'when it is not a spam' do + # it 'should not create a spam report' do + # allow_any_instance_of(Comment).to receive(:spam?).and_return(false) + # spammable = Fabricate(:comment) + # AnalyzeSpamJob.perform_async(id: spammable.id, klass: spammable.class.name) + # expect(spammable.spam_report).to be_nil + # end + # end + # end +end diff --git a/spec/jobs/assign_networks_job_spec.rb b/spec/jobs/assign_networks_job_spec.rb new file mode 100644 index 00000000..0eb9dcb2 --- /dev/null +++ b/spec/jobs/assign_networks_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe AssignNetworksJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(AssignNetworksJob.get_sidekiq_options['queue']).to eql :network + end + end + +end diff --git a/spec/jobs/award_job_spec.rb b/spec/jobs/award_job_spec.rb new file mode 100644 index 00000000..448c3390 --- /dev/null +++ b/spec/jobs/award_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe AwardJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(AwardJob.get_sidekiq_options['queue']).to eql :user + end + end + +end diff --git a/spec/jobs/award_user_job_spec.rb b/spec/jobs/award_user_job_spec.rb new file mode 100644 index 00000000..58e598d0 --- /dev/null +++ b/spec/jobs/award_user_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe AwardUserJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(AwardUserJob.get_sidekiq_options['queue']).to eql :user + end + end + +end diff --git a/spec/jobs/build_activity_stream_job_spec.rb b/spec/jobs/build_activity_stream_job_spec.rb new file mode 100644 index 00000000..71799ce2 --- /dev/null +++ b/spec/jobs/build_activity_stream_job_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe BuildActivityStreamJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(BuildActivityStreamJob.get_sidekiq_options['queue']). + to eql :timeline + end + end + +end diff --git a/spec/jobs/cleanup_protips_associate_zombie_upvotes_job_spec.rb b/spec/jobs/cleanup_protips_associate_zombie_upvotes_job_spec.rb new file mode 100644 index 00000000..f025d314 --- /dev/null +++ b/spec/jobs/cleanup_protips_associate_zombie_upvotes_job_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe CleanupProtipsAssociateZombieUpvotesJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(CleanupProtipsAssociateZombieUpvotesJob. + get_sidekiq_options['queue']).to eql :data_cleanup + end + end + +end diff --git a/spec/jobs/create_github_profile_job_spec.rb b/spec/jobs/create_github_profile_job_spec.rb new file mode 100644 index 00000000..1309e15c --- /dev/null +++ b/spec/jobs/create_github_profile_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe CreateGithubProfileJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(CreateGithubProfileJob.get_sidekiq_options['queue']).to eql :github + end + end + +end diff --git a/spec/jobs/create_network_job_spec.rb b/spec/jobs/create_network_job_spec.rb new file mode 100644 index 00000000..9c7c475c --- /dev/null +++ b/spec/jobs/create_network_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe CreateNetworkJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(CreateNetworkJob.get_sidekiq_options['queue']).to eql :network + end + end + +end diff --git a/spec/jobs/deactivate_team_jobs_job_spec.rb b/spec/jobs/deactivate_team_jobs_job_spec.rb new file mode 100644 index 00000000..56ccabd0 --- /dev/null +++ b/spec/jobs/deactivate_team_jobs_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe DeactivateTeamJobsJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(DeactivateTeamJobsJob.get_sidekiq_options['queue']).to eql :team + end + end + +end diff --git a/spec/jobs/extract_github_profile_spec.rb b/spec/jobs/extract_github_profile_spec.rb new file mode 100644 index 00000000..7c721f13 --- /dev/null +++ b/spec/jobs/extract_github_profile_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe ExtractGithubProfile do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ExtractGithubProfile.get_sidekiq_options['queue']).to eql :github + end + end + +end diff --git a/spec/jobs/generate_event_job_spec.rb b/spec/jobs/generate_event_job_spec.rb new file mode 100644 index 00000000..4f82a27b --- /dev/null +++ b/spec/jobs/generate_event_job_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe GenerateEventJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(GenerateEventJob.get_sidekiq_options['queue']). + to eql :event_publisher + end + end + +end diff --git a/spec/jobs/generate_top_users_composite_job_spec.rb b/spec/jobs/generate_top_users_composite_job_spec.rb new file mode 100644 index 00000000..8d52265c --- /dev/null +++ b/spec/jobs/generate_top_users_composite_job_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe GenerateTopUsersCompositeJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(GenerateTopUsersCompositeJob.get_sidekiq_options['queue']). + to eql :user + end + end + +end diff --git a/spec/jobs/geolocate_job_spec.rb b/spec/jobs/geolocate_job_spec.rb new file mode 100644 index 00000000..c8398c0a --- /dev/null +++ b/spec/jobs/geolocate_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe GeolocateJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(GeolocateJob.get_sidekiq_options['queue']).to eql :user + end + end + +end diff --git a/spec/jobs/github_badge_org_job_spec.rb b/spec/jobs/github_badge_org_job_spec.rb new file mode 100644 index 00000000..94a8400c --- /dev/null +++ b/spec/jobs/github_badge_org_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe GithubBadgeOrgJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(GithubBadgeOrgJob.get_sidekiq_options['queue']).to eql :github + end + end + +end diff --git a/spec/jobs/hawt_service_job_spec.rb b/spec/jobs/hawt_service_job_spec.rb new file mode 100644 index 00000000..930081a8 --- /dev/null +++ b/spec/jobs/hawt_service_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe HawtServiceJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(HawtServiceJob.get_sidekiq_options['queue']).to eql :protip + end + end + +end diff --git a/spec/jobs/index_protip_job_spec.rb b/spec/jobs/index_protip_job_spec.rb new file mode 100644 index 00000000..fe6dd4f8 --- /dev/null +++ b/spec/jobs/index_protip_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe IndexProtipJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(IndexProtipJob.get_sidekiq_options['queue']).to eql :index + end + end + +end diff --git a/spec/jobs/index_team_job_spec.rb b/spec/jobs/index_team_job_spec.rb new file mode 100644 index 00000000..a62d87d9 --- /dev/null +++ b/spec/jobs/index_team_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe IndexTeamJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(IndexTeamJob.get_sidekiq_options['queue']).to eql :index + end + end + +end diff --git a/spec/jobs/merge_duplicate_link_job_spec.rb b/spec/jobs/merge_duplicate_link_job_spec.rb new file mode 100644 index 00000000..3c239177 --- /dev/null +++ b/spec/jobs/merge_duplicate_link_job_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe MergeDuplicateLinkJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(MergeDuplicateLinkJob.get_sidekiq_options['queue']). + to eql :data_cleanup + end + end + +end diff --git a/spec/jobs/merge_skill_job_spec.rb b/spec/jobs/merge_skill_job_spec.rb new file mode 100644 index 00000000..703ce22b --- /dev/null +++ b/spec/jobs/merge_skill_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe MergeSkillJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(MergeSkillJob.get_sidekiq_options['queue']).to eql :data_cleanup + end + end + +end diff --git a/spec/jobs/process_like_job_spec.rb b/spec/jobs/process_like_job_spec.rb new file mode 100644 index 00000000..26a9f229 --- /dev/null +++ b/spec/jobs/process_like_job_spec.rb @@ -0,0 +1,54 @@ +RSpec.describe ProcessLikeJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ProcessLikeJob.get_sidekiq_options['queue']).to eql :user + end + end + + describe 'processing' do + let(:user) { Fabricate(:user, tracking_code: 'fake_tracking_code') } + let(:protip) { Fabricate(:protip) } + + it 'associates the zombie like to the correct user' do + zombie_like = Fabricate(:like, likable: protip, + tracking_code: user.tracking_code) + + ProcessLikeJob.new.perform('associate_to_user', zombie_like.id) + + zombie_like.reload + + expect(zombie_like.user_id).to eql user.id + end + + it 'destroys like that are invalid' do + invalid_like = Like.new(value: 1, tracking_code: user.tracking_code) + invalid_like.save(validate: false) + + ProcessLikeJob.new.perform('associate_to_user', invalid_like.id) + + expect(Like.where(id: invalid_like.id)).not_to exist + end + + it 'destroys likes that are non-unique' do + original_like = Fabricate(:like, user: user, likable: protip) + + duplicate_like = Fabricate(:like, likable: protip, + tracking_code: user.tracking_code) + + ProcessLikeJob.new.perform('associate_to_user', duplicate_like.id) + + expect(Like.where(id: duplicate_like.id)).not_to exist + end + + it 'destroys likes if no user with the tracking code exists' do + unassociatable_like = Fabricate(:like, likable: protip, + tracking_code: 'unassociatable_tracking_code') + + ProcessLikeJob.new.perform('associate_to_user', unassociatable_like.id) + + expect(Like.where(id: unassociatable_like.id)).not_to exist + end + end + +end diff --git a/spec/jobs/process_protip_job_spec.rb b/spec/jobs/process_protip_job_spec.rb new file mode 100644 index 00000000..1c4a01dd --- /dev/null +++ b/spec/jobs/process_protip_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe ProcessProtipJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ProcessProtipJob.get_sidekiq_options['queue']).to eql :protip + end + end + +end diff --git a/spec/jobs/protip_indexer_worker_spec.rb b/spec/jobs/protip_indexer_worker_spec.rb new file mode 100644 index 00000000..a916e722 --- /dev/null +++ b/spec/jobs/protip_indexer_worker_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe ProtipIndexerWorker do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ProtipIndexerWorker.get_sidekiq_options['queue']).to eql :index + end + end + +end diff --git a/spec/jobs/protips_recalculate_scores_job_spec.rb b/spec/jobs/protips_recalculate_scores_job_spec.rb new file mode 100644 index 00000000..79ab3072 --- /dev/null +++ b/spec/jobs/protips_recalculate_scores_job_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe ProtipsRecalculateScoresJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ProtipsRecalculateScoresJob.get_sidekiq_options['queue']). + to eql :protip + end + end + +end diff --git a/spec/jobs/refresh_timeline_job_spec.rb b/spec/jobs/refresh_timeline_job_spec.rb new file mode 100644 index 00000000..9b007d1f --- /dev/null +++ b/spec/jobs/refresh_timeline_job_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe RefreshTimelineJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(RefreshTimelineJob.get_sidekiq_options['queue']). + to eql :timeline + end + end + +end diff --git a/spec/jobs/refresh_user_job_spec.rb b/spec/jobs/refresh_user_job_spec.rb new file mode 100644 index 00000000..fe6ac382 --- /dev/null +++ b/spec/jobs/refresh_user_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe RefreshUserJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(RefreshUserJob.get_sidekiq_options['queue']).to eql :user + end + end + +end diff --git a/spec/jobs/resize_tilt_shift_banner_job_spec.rb b/spec/jobs/resize_tilt_shift_banner_job_spec.rb new file mode 100644 index 00000000..25d18789 --- /dev/null +++ b/spec/jobs/resize_tilt_shift_banner_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe ResizeTiltShiftBannerJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ResizeTiltShiftBannerJob.get_sidekiq_options['queue']).to eql :user + end + end + +end diff --git a/spec/jobs/reverse_geolocate_user_job_spec.rb b/spec/jobs/reverse_geolocate_user_job_spec.rb new file mode 100644 index 00000000..7f4611d7 --- /dev/null +++ b/spec/jobs/reverse_geolocate_user_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe ReverseGeolocateUserJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ReverseGeolocateUserJob.get_sidekiq_options['queue']).to eql :user + end + end + +end diff --git a/spec/jobs/search_sync_job_spec.rb b/spec/jobs/search_sync_job_spec.rb new file mode 100644 index 00000000..a80f3a06 --- /dev/null +++ b/spec/jobs/search_sync_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe SearchSyncJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(SearchSyncJob.get_sidekiq_options['queue']).to eql :search_sync + end + end + +end diff --git a/spec/jobs/seed_github_protips_job_spec.rb b/spec/jobs/seed_github_protips_job_spec.rb new file mode 100644 index 00000000..1a050994 --- /dev/null +++ b/spec/jobs/seed_github_protips_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe SeedGithubProtipsJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(SeedGithubProtipsJob.get_sidekiq_options['queue']).to eql :github + end + end + +end diff --git a/spec/jobs/track_event_job_spec.rb b/spec/jobs/track_event_job_spec.rb new file mode 100644 index 00000000..c2b0609f --- /dev/null +++ b/spec/jobs/track_event_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe TrackEventJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(TrackEventJob.get_sidekiq_options['queue']).to eql :event_tracker + end + end + +end diff --git a/spec/jobs/update_network_job_spec.rb b/spec/jobs/update_network_job_spec.rb new file mode 100644 index 00000000..20a6e8d7 --- /dev/null +++ b/spec/jobs/update_network_job_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe UpdateNetworkJob do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(UpdateNetworkJob.get_sidekiq_options['queue']).to eql :network + end + end + +end diff --git a/spec/lib/hash_string_parser_spec.rb b/spec/lib/hash_string_parser_spec.rb deleted file mode 100644 index 92881f05..00000000 --- a/spec/lib/hash_string_parser_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -# encoding: utf-8 - -describe HashStringParser do - it 'converts a simple hash string to Ruby' do - HashStringParser.better_than_eval('{:x=>"example"}').should == {'x' => 'example'} - end - - it 'converts a simple hash string to Ruby with a nil' do - HashStringParser.better_than_eval('{:x=>nil}').should == {'x' => nil} - end - - it 'converts a simple hash string to Ruby with a number' do - HashStringParser.better_than_eval('{:x=>1}').should == {'x' => 1} - end - - it 'converts a simple hash string to Ruby with a null string' do - HashStringParser.better_than_eval('{:x=>"null"}').should == {'x' => 'null'} - end -end diff --git a/spec/lib/omniauth_spec.rb b/spec/lib/omniauth_spec.rb deleted file mode 100644 index f2f92565..00000000 --- a/spec/lib/omniauth_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'spec_helper' - -describe 'omniauth configuration' do - let(:app) { lambda { |env| [404, {}, ['Awesome']] } } - let(:strategy) { ExampleStrategy.new(app, @options || {}) } - - - it 'should log exception to honeybadger API when auth fails', :pending do - Honeybadger.should_receive(:notify_or_ignore) - - @options = {failure: :forced_fail} - strategy.call(make_env('/auth/test/callback', 'rack.session' => {'omniauth.origin' => '/awesome'})) - end -end diff --git a/spec/lib/servant_spec.rb b/spec/lib/servant_spec.rb index 8d06240d..eff4632f 100644 --- a/spec/lib/servant_spec.rb +++ b/spec/lib/servant_spec.rb @@ -1,19 +1,19 @@ -describe Servant do +RSpec.describe Servant do let(:url) { 'http://www.google.com' } it 'captures calls to api' do stub_request(:get, url).to_return(body: 'TESTING') - Servant.capture_api_calls do + expect(Servant.capture_api_calls do Servant.get(url) Servant.get(url) - end.should == 2 + end).to eq(2) - Servant.capture_api_calls do + expect(Servant.capture_api_calls do Servant.get(url) Servant.get(url) Servant.get(url) Servant.get(url) - end.should == 4 + end).to eq(4) end end diff --git a/spec/lib/server_response_spec.rb b/spec/lib/server_response_spec.rb index 394134c3..e6689c0c 100644 --- a/spec/lib/server_response_spec.rb +++ b/spec/lib/server_response_spec.rb @@ -1,23 +1,23 @@ require 'spec_helper' -describe ServiceResponse do +RSpec.describe ServiceResponse do let(:response) { ServiceResponse.new(body = '', headers) } - let(:headers) { { - status: "200 OK", date: "Fri, 24 Jun 2011 19:53:08 GMT", - x_ratelimit_limit: "5000", - transfer_encoding: "chunked", - x_ratelimit_remaining: "4968", - content_encoding: "gzip", - link: "<https://api.github.com/users/defunkt/followers?page=2&per_page=>100>; rel=\"next\", <https://api.github.com/users/defunkt/followers?page=97&per_page=>100>; rel=\"last\"", - content_type: "application/json", - server: "nginx/0.7.67", connection: "keep-alive"} - } + let(:headers) do { + status: '200 OK', date: 'Fri, 24 Jun 2011 19:53:08 GMT', + x_ratelimit_limit: '5000', + transfer_encoding: 'chunked', + x_ratelimit_remaining: '4968', + content_encoding: 'gzip', + link: "<https://api.github.com/users/defunkt/followers?page=2&per_page=>100>; rel=\"next\", <https://api.github.com/users/defunkt/followers?page=97&per_page=>100>; rel=\"last\"", + content_type: 'application/json', + server: 'nginx/0.7.67', connection: 'keep-alive' } + end it 'indicates more results if it has next link header' do - response.more?.should == true + expect(response.more?).to eq(true) end it 'indicates next result' do - response.next_page.should == 'https://api.github.com/users/defunkt/followers?page=2&per_page=>100' + expect(response.next_page).to eq('https://api.github.com/users/defunkt/followers?page=2&per_page=>100') end -end \ No newline at end of file +end diff --git a/spec/mailers/abuse_mailer_spec.rb b/spec/mailers/abuse_mailer_spec.rb new file mode 100644 index 00000000..8a12e9e3 --- /dev/null +++ b/spec/mailers/abuse_mailer_spec.rb @@ -0,0 +1,28 @@ +RSpec.describe AbuseMailer, type: :mailer do + describe 'report_inappropriate' do + + let(:mail) { AbuseMailer.report_inappropriate(protip.to_param) } + + let!(:current_user) { Fabricate(:admin) } + + let(:protip) do + Protip.create!( + title: 'hello world', + body: "somethings that's meaningful and nice", + topic_list: %w(java javascript), + user_id: current_user.id + ) + end + + it 'renders the headers' do + expect(mail.subject).to match('Spam Report for Protip: "hello world"') + expect(mail.to).to eq([current_user.email]) + expect(mail.from).to eq(['support@coderwall.com']) + end + + #Use capybara + it 'renders the body', skip: 'FIX ME' do + expect(mail.body.encoded).to match("<header><h1>Spam Report for Protip</h1></header><hr /><section><h3>hello world</h3><a href=\"http://coderwall.com/p/06tlva\">22</a><div>by Matthew Deiters</div><div>Reported by: Anonymous User</div></section><footer><h5>Reported from IP: </h5></footer>") + end + end +end diff --git a/spec/mailers/abuse_spec.rb b/spec/mailers/abuse_spec.rb deleted file mode 100644 index 38631c13..00000000 --- a/spec/mailers/abuse_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -describe Abuse do - describe 'report_inappropriate' do - - let(:mail) { Abuse.report_inappropriate({ protip_public_id: protip.to_param }) } - - let(:current_user) { Fabricate(:user, admin: true) } - - let(:protip) { - Protip.create!( - title: "hello world", - body: "somethings that's meaningful and nice", - topics: ["java", "javascript"], - user_id: current_user.id - ) - } - - it 'renders the headers' do - mail.subject.should match('Spam Report for Protip: "hello world"') - mail.to.should eq(['someone@example.com']) - mail.from.should eq(['support@coderwall.com']) - end - - it 'renders the body' do - mail.body.encoded.should match("somethings that's meaningful and nice") - end - end -end - diff --git a/spec/mailers/notifier_mailer_spec.rb b/spec/mailers/notifier_mailer_spec.rb new file mode 100644 index 00000000..f7adcf49 --- /dev/null +++ b/spec/mailers/notifier_mailer_spec.rb @@ -0,0 +1,95 @@ +RSpec.describe NotifierMailer, type: :mailer do + let(:user) { user = Fabricate(:user, email: 'some.user@example.com') } + + it 'should send welcome email to user' do + email = NotifierMailer.welcome_email(user.id).deliver + expect(email.body.encoded).to include("http://coderwall.com/#{user.username}") + end + + it 'should record when welcome email was sent' do + expect(user.last_email_sent).to be_nil + email = NotifierMailer.welcome_email(user.id).deliver + expect(user.reload.last_email_sent).not_to be_nil + end + + it 'should send an email when a user receives an endorsement' do + endorsements = Fabricate(:user).endorse(user, 'Ruby') + user.update_attributes last_request_at: 1.day.ago + + email = NotifierMailer.new_activity(user.reload.username) + expect(email.body.encoded).to include("Congrats friend, you've received 1 endorsement") + end + + it 'should send an email when a user receives an endorsement and achievement' do + badge = Fabricate(:badge, user: user, badge_class_name: Badges.all.first.to_s) + endorsements = Fabricate(:user).endorse(user, 'Ruby') + user.update_attributes last_request_at: 1.day.ago + + email = NotifierMailer.new_activity(user.reload.username) + expect(email.body.encoded).to include("Congrats friend, you've unlocked 1 achievement and received 1 endorsement") + end + + describe 'achievement emails' do + + it 'should send an email when a user receives a new achievement' do + badge = Fabricate(:badge, user: user, badge_class_name: Badges.all.sample.to_s) + user.update_attributes last_request_at: 1.day.ago + expect(user.achievements_unlocked_since_last_visit.count).to eq(1) + + email = NotifierMailer.new_badge(user.reload.username) + check_badge_message(email, badge) + expect(email.body.encoded).to include(user_achievement_url(username: user.username, id: badge.id, host: 'coderwall.com')) + end + + it 'should send one achievement email at a time until user visits' do + badge1 = Fabricate(:badge, user: user, badge_class_name: Badges.all.first.to_s, created_at: Time.now) + badge2 = Fabricate(:badge, user: user, badge_class_name: Badges.all.second.to_s, created_at: Time.now + 1.second) + badge3 = Fabricate(:badge, user: user, badge_class_name: Badges.all.third.to_s, created_at: Time.now + 2.seconds) + user.update_attributes last_request_at: 1.day.ago + + expect(user.achievements_unlocked_since_last_visit.count).to eq(3) + email = NotifierMailer.new_badge(user.reload.username) + check_badge_message(email, badge1) + expect(user.achievements_unlocked_since_last_visit.count).to eq(3) + email = NotifierMailer.new_badge(user.reload.username) + check_badge_message(email, badge2) + user.last_request_at = Time.now + 3.second + user.save + expect(user.achievements_unlocked_since_last_visit.count).to eq(0) + expect { NotifierMailer.new_badge(user.reload.username) }.to raise_error(NotifierMailer::NothingToSendException) + end + + def check_badge_message(email, badge) + if badge.tokenized_skill_name.blank? + expect(email.body.encoded).to include("You've earned a new badge for #{badge.for}") + else + expect(email.body.encoded).to include("You've earned a new badge for your #{badge.tokenized_skill_name} hacking skills and contribution.") + end + end + end + + describe 'comment emails' do + let(:protip) { Fabricate(:protip, user: user) } + let(:commentor) { Fabricate(:user) } + + it 'should send an email when a user receives a comment on their protip' do + protip.comments.create(user: commentor, body: 'hello') + expect(ActionMailer::Base.deliveries.size).to eq(1) + email = ActionMailer::Base.deliveries.first + expect(email.body.encoded).to include(user.short_name) + expect(email.body.encoded).to include("#{commentor.username} has commented on your pro tip") + expect(email.body.encoded).to include(protip.title) + end + + it 'should send an email when a user is mentioned in a comment' do + mentioned_user = Fabricate(:user) + protip.comments.create(user: commentor, body: "hello @#{mentioned_user.username}") + expect(ActionMailer::Base.deliveries.size).to eq(2) + email = ActionMailer::Base.deliveries.last + expect(email.body.encoded).to include(mentioned_user.short_name) + expect(email.body.encoded).to include("#{commentor.username} replied to your comment on the pro tip") + expect(email.body.encoded).to include(protip.title) + expect(email.to).to include(mentioned_user.email) + end + end +end diff --git a/spec/mailers/notifier_spec.rb b/spec/mailers/notifier_spec.rb deleted file mode 100644 index 22beeb4a..00000000 --- a/spec/mailers/notifier_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -describe Notifier do - let(:user) { user = Fabricate(:user, email: 'some.user@example.com') } - - it 'should send welcome email to user' do - email = Notifier.welcome_email(user.username).deliver - email.body.encoded.should include("http://coderwall.com/#{user.username}") - end - - it 'should record when welcome email was sent' do - user.last_email_sent.should be_nil - email = Notifier.welcome_email(user.username).deliver - user.reload.last_email_sent.should_not be_nil - end - - it "should send an email when a user receives an endorsement" do - endorsements = Fabricate(:user).endorse(user, 'Ruby') - user.update_attributes last_request_at: 1.day.ago - - email = Notifier.new_activity(user.reload.username) - email.body.encoded.should include("Congrats friend, you've received 1 endorsement") - end - - it "should send an email when a user receives an endorsement and achievement" do - badge = Fabricate(:badge, user: user, badge_class_name: Badges.all.first.to_s) - endorsements = Fabricate(:user).endorse(user, 'Ruby') - user.update_attributes last_request_at: 1.day.ago - - email = Notifier.new_activity(user.reload.username) - email.body.encoded.should include("Congrats friend, you've unlocked 1 achievement and received 1 endorsement") - end - - describe 'achievement emails' do - - it "should send an email when a user receives a new achievement" do - badge = Fabricate(:badge, user: user, badge_class_name: Badges.all.sample.to_s) - user.update_attributes last_request_at: 1.day.ago - user.achievements_unlocked_since_last_visit.count.should == 1 - - email = Notifier.new_badge(user.reload.username) - check_badge_message(email, badge) - email.body.encoded.should include(user_achievement_url(username: user.username, id: badge.id, host: "coderwall.com")) - end - - it "should send one achievement email at a time until user visits" do - badge1 = Fabricate(:badge, user: user, badge_class_name: Badges.all.first.to_s, created_at: Time.now) - badge2 = Fabricate(:badge, user: user, badge_class_name: Badges.all.second.to_s, created_at: Time.now + 1.second) - badge3 = Fabricate(:badge, user: user, badge_class_name: Badges.all.third.to_s, created_at: Time.now + 2.seconds) - user.update_attributes last_request_at: 1.day.ago - - user.achievements_unlocked_since_last_visit.count.should == 3 - email = Notifier.new_badge(user.reload.username) - check_badge_message(email, badge1) - user.achievements_unlocked_since_last_visit.count.should == 3 - email = Notifier.new_badge(user.reload.username) - check_badge_message(email, badge2) - user.last_request_at = Time.now + 3.second - user.save - user.achievements_unlocked_since_last_visit.count.should == 0 - expect { Notifier.new_badge(user.reload.username) }.to raise_error(Notifier::NothingToSendException) - end - - def check_badge_message(email, badge) - if badge.tokenized_skill_name.blank? - email.body.encoded.should include("You've earned a new badge for #{badge.for}") - else - email.body.encoded.should include("You've earned a new badge for your #{badge.tokenized_skill_name} hacking skills and contribution.") - end - end - end - - describe 'comment emails' do - let(:protip) { Fabricate(:protip, user: user) } - let(:commentor) { Fabricate(:user) } - - it 'should send an email when a user receives a comment on their protip' do - protip.comments.create(user: commentor, body: "hello") - ActionMailer::Base.deliveries.size.should == 1 - email = ActionMailer::Base.deliveries.first - email.body.encoded.should include(user.short_name) - email.body.encoded.should include("#{commentor.username} has commented on your pro tip") - email.body.encoded.should include(protip.title) - end - - it 'should send an email when a user is mentioned in a comment' do - mentioned_user = Fabricate(:user) - protip.comments.create(user: commentor, body: "hello @#{mentioned_user.username}") - ActionMailer::Base.deliveries.size.should == 2 - email = ActionMailer::Base.deliveries.last - email.body.encoded.should include(mentioned_user.short_name) - email.body.encoded.should include("#{commentor.username} replied to your comment on the pro tip") - email.body.encoded.should include(protip.title) - email.to.should include(mentioned_user.email) - end - end -end diff --git a/spec/mailers/protip_mailer_spec.rb b/spec/mailers/protip_mailer_spec.rb new file mode 100644 index 00000000..4ccd3023 --- /dev/null +++ b/spec/mailers/protip_mailer_spec.rb @@ -0,0 +1,2 @@ +RSpec.describe ProtipMailer, type: :mailer do +end diff --git a/spec/models/account_spec.rb b/spec/models/account_spec.rb deleted file mode 100644 index e362dd6f..00000000 --- a/spec/models/account_spec.rb +++ /dev/null @@ -1,201 +0,0 @@ -describe Account do - let(:team) { Fabricate(:team) } - let(:account) { { stripe_card_token: new_token } } - - let(:admin) { - user = Fabricate(:user, team_document_id: team.id.to_s) - team.admins << user.id - team.save - user - } - - before(:all) do - url = 'http://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco%2C+CA&language=en&sensor=false' - @body ||= File.read(File.join(Rails.root, 'spec', 'fixtures', 'google_maps.json')) - stub_request(:get, url).to_return(body: @body) - end - - def new_token - Stripe::Token.create(card: { number: 4242424242424242, cvc: 224, exp_month: 12, exp_year: 14 }).try(:id) - end - - def post_job_for(team) - Fabricate(:opportunity, team_document_id: team.id) - end - - describe 'account creation' do - - it 'should create a valid account locally and on stripe' do - team.account.should be_nil - team.build_account(account) - team.account.admin_id = admin.id - team.account.save_with_payment - team.reload - team.account.stripe_card_token.should == account[:stripe_card_token] - team.account.stripe_customer_token.should_not be_nil - team.account.plan_ids.should == [] - end - - it 'should still create an account if account admin not team admin' do - team.build_account(account) - some_random_user = Fabricate(:user) - team.account.admin_id = some_random_user.id - team.account.save_with_payment - team.reload - team.account.should_not be_nil - end - - it 'should not create an account if stripe_card_token invalid' do - account[:stripe_card_token] = "invalid" - team.build_account(account) - team.account.admin_id = admin.id - team.account.save_with_payment - team.reload - team.account.should be_nil - end - - it 'should not allow stripe_customer_token or admin to be set/updated' do - some_random_user = Fabricate(:user) - account[:stripe_customer_token] = "invalid_customer_token" - account[:admin_id] = some_random_user.id - team.build_account(account) - team.account.save_with_payment - team.reload - team.account.should be_nil - end - end - - describe 'subscriptions' do - let(:free_plan) { Plan.create!(amount: 0, interval: Plan::MONTHLY, name: "Starter") } - let(:monthly_plan) { Plan.create!(amount: 15000, interval: Plan::MONTHLY, name: "Recruiting Magnet") } - let(:onetime_plan) { Plan.create!(amount: 30000, interval: nil, name: "Single Job Post") } - - describe 'free subscription' do - before(:each) do - team.account.should be_nil - team.build_account(account) - team.account.admin_id = admin.id - team.account.save_with_payment - team.account.subscribe_to!(free_plan) - team.reload - end - - it 'should add a free subscription' do - team.account.plan_ids.should include(free_plan.id) - team.paid_job_posts.should == 0 - end - - it 'should not allow any job posts' do - team.can_post_job?.should == false - team.premium?.should == false - team.valid_jobs?.should == false - lambda { Fabricate(:opportunity, team_document_id: team.id) }.should raise_error(ActiveRecord::RecordNotSaved) - end - - it 'should allow upgrade to monthly subscription' do - team.account.save_with_payment(monthly_plan) - team.reload - team.can_post_job?.should == true - team.paid_job_posts.should == 0 - team.valid_jobs?.should == true - team.has_monthly_subscription?.should == true - team.premium?.should == true - end - - it 'should allow upgrade to one-time job post charge' do - team.account.update_attributes({stripe_card_token: new_token}) - team.account.save_with_payment(onetime_plan) - team.reload - team.can_post_job?.should == true - team.valid_jobs?.should == true - team.paid_job_posts.should == 1 - team.premium?.should == true - end - end - - describe 'monthly paid subscription' do - before(:each) do - team.account.should be_nil - team.build_account(account) - team.account.admin_id = admin.id - team.account.save_with_payment - team.account.subscribe_to!(monthly_plan) - team.reload - end - - it 'should add a paid monthly subscription' do - team.account.plan_ids.should include(monthly_plan.id) - team.paid_job_posts.should == 0 - team.valid_jobs?.should == true - team.can_post_job?.should == true - team.premium?.should == true - end - - it 'should allow unlimited job posts' do - team.can_post_job?.should == true - 5.times do - Fabricate(:opportunity, team_document_id: team.id) - end - team.can_post_job?.should == true - end - end - - describe 'one-time job post charge' do - before(:each) do - team.account.should be_nil - team.build_account(account) - team.account.admin_id = admin.id - team.account.save_with_payment(onetime_plan) - team.reload - end - it 'should add a one-time job post charge' do - team.account.plan_ids.should include(onetime_plan.id) - team.paid_job_posts.should == 1 - team.valid_jobs?.should == true - team.can_post_job?.should == true - team.premium?.should == true - end - - it 'should allow only one job-post' do - team.can_post_job?.should == true - Fabricate(:opportunity, team_document_id: team.id) - team.reload - team.paid_job_posts.should == 0 - team.can_post_job?.should == false - lambda { Fabricate(:opportunity, team_document_id: team.id) }.should raise_error(ActiveRecord::RecordNotSaved) - end - - it 'should allow upgrade to monthly subscription' do - team.account.update_attributes({stripe_card_token: new_token}) - team.account.save_with_payment(monthly_plan) - team.reload - team.can_post_job?.should == true - team.valid_jobs?.should == true - team.paid_job_posts.should == 1 - team.has_monthly_subscription?.should == true - 5.times do - Fabricate(:opportunity, team_document_id: team.id) - end - team.can_post_job?.should == true - team.paid_job_posts.should == 1 - team.premium?.should == true - end - - it 'should allow additional one time job post charges' do - team.account.update_attributes({stripe_card_token: new_token}) - team.account.save_with_payment(onetime_plan) - team.reload - team.paid_job_posts.should == 2 - team.can_post_job?.should == true - 2.times do - Fabricate(:opportunity, team_document_id: team.id) - end - team.reload - team.paid_job_posts.should == 0 - team.has_monthly_subscription?.should == false - team.premium?.should == true - team.valid_jobs?.should == true - end - end - end -end diff --git a/spec/models/api_access_spec.rb b/spec/models/api_access_spec.rb index c00b5b8c..ffe31ff4 100644 --- a/spec/models/api_access_spec.rb +++ b/spec/models/api_access_spec.rb @@ -1,21 +1,16 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `api_accesses` +# Table name: api_accesses # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`api_key`** | `string(255)` | -# **`awards`** | `text` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# api_key :string(255) +# awards :text +# created_at :datetime +# updated_at :datetime # require 'spec_helper' -describe ApiAccess do +RSpec.describe ApiAccess, type: :model do end diff --git a/spec/models/badge_justification_spec.rb b/spec/models/badge_justification_spec.rb deleted file mode 100644 index 694d82fc..00000000 --- a/spec/models/badge_justification_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe BadgeJustification do - -end diff --git a/spec/models/badge_spec.rb b/spec/models/badge_spec.rb index 6d11da81..6d20570c 100644 --- a/spec/models/badge_spec.rb +++ b/spec/models/badge_spec.rb @@ -1,42 +1,29 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `badges` +# Table name: badges # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`badge_class_name`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_badges_on_user_id`: -# * **`user_id`** -# * `index_badges_on_user_id_and_badge_class_name` (_unique_): -# * **`user_id`** -# * **`badge_class_name`** +# id :integer not null, primary key +# created_at :datetime +# updated_at :datetime +# user_id :integer +# badge_class_name :string(255) # require 'spec_helper' -describe Badge do +RSpec.describe Badge, type: :model do let(:badge) { Badge.new(badge_class_name: 'Polygamous') } it 'gets name from badge class' do - badge.display_name.should == 'Walrus' + expect(badge.display_name).to eq('Walrus') end it 'gets description from badge class' do - badge.description.should include('The walrus is no stranger') + expect(badge.description).to include('The walrus is no stranger') end it 'creates an image path from image name in class' do - badge.image_path.should == 'badges/walrus.png' + expect(badge.image_path).to eq('badges/walrus.png') end end diff --git a/spec/models/badges/altruist_spec.rb b/spec/models/badges/altruist_spec.rb index 2f814875..c1213a56 100644 --- a/spec/models/badges/altruist_spec.rb +++ b/spec/models/badges/altruist_spec.rb @@ -1,12 +1,12 @@ require 'spec_helper' -describe Altruist do +RSpec.describe Altruist, type: :model do it 'should have a name and description' do - Altruist.description.should include('20') + expect(Altruist.description).to include('20') end - it 'should award user if they have 50 or more original repos with contents' do + it 'should award user if they have 20 or more original repos with contents' do user = Fabricate(:user, github: 'mdeiters') 20.times do @@ -14,8 +14,8 @@ end badge = Altruist.new(user.reload) - badge.award?.should == true - badge.reasons.should == "for having shared 20 individual projects." + expect(badge.award?).to eq(true) + expect(badge.reasons).to eq('for having shared 20 individual projects.') end it 'should not award empty repos' do @@ -26,6 +26,6 @@ end badge = Altruist.new(user.reload) - badge.award?.should == false + expect(badge.award?).to eq(false) end -end \ No newline at end of file +end diff --git a/spec/models/badges/ashcat_spec.rb b/spec/models/badges/ashcat_spec.rb index 762cb165..e8d405cb 100644 --- a/spec/models/badges/ashcat_spec.rb +++ b/spec/models/badges/ashcat_spec.rb @@ -1,16 +1,24 @@ -describe Ashcat, pending: 'the BSON document coming back is too large' do - let(:profile) { Fabricate(:github_profile) } - let(:contributor) { Fabricate(:user, github_id: profile.github_id, github: 'dhh') } +require 'vcr_helper' + +VCR.configure do |c| + c.default_cassette_options = { + match_requests_on: + [ :method, + VCR.request_matchers.uri_without_param(:client_id, :client_secret)] + } +end + +RSpec.describe Ashcat, type: :model do + let(:contributor) { Fabricate(:user, github: 'dhh') } it 'creates facts for each contributor' do - VCR.use_cassette('ashcat_creates_facts_for_each_contributor') do + # TODO: Refactor to utilize sidekiq job + VCR.use_cassette('Ashcat') do Ashcat.perform - contributor.build_github_facts - badge = Ashcat.new(contributor) - badge.award?.should == true - badge.reasons.should =~ /Contributed \d+ times to Rails Core/ + expect(badge.award?).to eq(true) + expect(badge.reasons).to match(/Contributed \d+ times to Rails Core/) end end end diff --git a/spec/models/badges/badge_base_spec.rb b/spec/models/badges/badge_base_spec.rb index bf7052fd..3b3677ee 100644 --- a/spec/models/badges/badge_base_spec.rb +++ b/spec/models/badges/badge_base_spec.rb @@ -1,16 +1,15 @@ require 'spec_helper' -describe BadgeBase do - let(:repo) { Fabricate(:github_repo) } - let(:profile) { Fabricate(:github_profile, github_id: repo.owner.github_id) } - let(:user) { Fabricate(:user, github_id: profile.github_id) } +RSpec.describe BadgeBase, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } it 'should check to see if it needs to award users' do - stub_request(:get, 'http://octocoder.heroku.com/rails/rails/mdeiters').to_return(body: '{}') - Octopussy.stub(:new).and_return do |*args| - octopussy_mock = double("Octopussy") - octopussy_mock.should_receive(:valid?).and_return(true) - octopussy_mock.should_receive(:award?).and_return(false) + stub_request(:get, 'http://octocoder.heroku.com/rails/rails/mdeiters'). + to_return(body: '{}') + allow(Octopussy).to receive(:new) do |*_args| + octopussy_mock = double('Octopussy') + expect(octopussy_mock).to receive(:valid?).and_return(true) + expect(octopussy_mock).to receive(:award?).and_return(false) octopussy_mock end BadgeBase.award!(user) @@ -18,29 +17,20 @@ it 'allows sub classes to have their own description' do foo = Class.new(BadgeBase) do - describe "Foo", description: "Foo", image_name: 'foo.png' + describe 'Foo', description: 'Foo', image_name: 'foo.png' end bar = Class.new(foo) do - describe "Bar", description: "Bar", image_name: 'bar.png' + describe 'Bar', description: 'Bar', image_name: 'bar.png' end - foo.display_name.should == 'Foo' - foo.description.should == 'Foo' - foo.image_name.should == 'foo.png' + expect(foo.display_name).to eq('Foo') + expect(foo.description).to eq('Foo') + expect(foo.image_name).to eq('foo.png') - bar.display_name.should == 'Bar' - bar.description.should == 'Bar' - bar.image_name.should == 'bar.png' + expect(bar.display_name).to eq('Bar') + expect(bar.description).to eq('Bar') + expect(bar.image_name).to eq('bar.png') end - class NotaBadge < BadgeBase - def award?; - true; - end - - def reasons; - ["I don't need a reason"]; - end - end end diff --git a/spec/models/badges/bear_spec.rb b/spec/models/badges/bear_spec.rb index f783c669..a6c2bcc9 100644 --- a/spec/models/badges/bear_spec.rb +++ b/spec/models/badges/bear_spec.rb @@ -1,26 +1,26 @@ require 'spec_helper' -describe Bear do +RSpec.describe Bear, type: :model do it 'should have a name and description' do - Bear.description.should_not be_blank + expect(Bear.description).not_to be_blank end it 'awards user bear if they have a repo tagged objective-c' do Fact.delete_all user = Fabricate(:user) - fact = Fabricate(:github_original_fact, context: user, tags: ['Objective-C', 'repo', 'original', 'personal', 'github']) + fact = Fabricate(:github_original_fact, context: user, tags: %w(Objective-C repo original personal github)) badge = Bear.new(user) - badge.award?.should == true - badge.reasons[:links].first[fact.name].should == fact.url + expect(badge.award?).to eq(true) + expect(badge.reasons[:links].first[fact.name]).to eq(fact.url) end it 'does not award user if they dont have objective c as a dominant language' do Fact.delete_all user = Fabricate(:user) - fact = Fabricate(:github_original_fact, context: user, tags: ['Ruby', 'repo', 'original', 'personal', 'github']) + fact = Fabricate(:github_original_fact, context: user, tags: %w(Ruby repo original personal github)) badge = Bear.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end end diff --git a/spec/models/badges/beaver_spec.rb b/spec/models/badges/beaver_spec.rb index 0762f4ea..f2da7e99 100644 --- a/spec/models/badges/beaver_spec.rb +++ b/spec/models/badges/beaver_spec.rb @@ -1,6 +1,5 @@ require 'spec_helper' -describe Beaver do +RSpec.describe Beaver, type: :model do - -end \ No newline at end of file +end diff --git a/spec/models/badges/changelogd_spec.rb b/spec/models/badges/changelogd_spec.rb index 9cb0c572..89b3468d 100644 --- a/spec/models/badges/changelogd_spec.rb +++ b/spec/models/badges/changelogd_spec.rb @@ -1,40 +1,13 @@ require 'spec_helper' -describe Changelogd do - it 'should award a user if there is a tag' do - stub_request(:get, Changelogd::API_URI).to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'changelogd_feed.xml'))) - Changelogd.quick_refresh - - user = Fabricate(:user, github: 'CloudMade') - - changelogd = Changelogd.new(user) - changelogd.award?.should == true - changelogd.reasons[:links].first['Leaflet'].should == 'http://github.com/CloudMade/Leaflet' - end - +RSpec.describe Changelogd, type: :model do it 'should have a name and description' do - Changelogd.name.should_not be_blank - Changelogd.description.should_not be_blank - end - - it 'should should find github projects' do - stub_request(:get, Changelogd::API_URI).to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'changelogd_feed.xml'))) - Changelogd.latest_repos.first.should == 'http://github.com/CloudMade/Leaflet' - end - - it 'should create a fact' do - stub_request(:get, Changelogd::API_URI).to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'changelogd_feed.xml'))) - Changelogd.quick_refresh - fact = Fact.where(identity: 'http://github.com/CloudMade/Leaflet:changedlogd').first - fact.should_not be_nil - end - - it 'should find the first and last project', functional: true, slow: true, pending: 'resource not found' do - Changelogd.all_repos.should include('http://github.com/kennethreitz/tablib') - Changelogd.all_repos.should include('http://github.com/johnsheehan/RestSharp') + expect(Changelogd.name).not_to be_blank + expect(Changelogd.description).not_to be_blank end - it 'should find repos in episodes too', functional: true, pending: 'resource not found' do - Changelogd.all_repos.should include('https://github.com/geemus/excon') + it 'is not awardable' do + user = Fabricate(:user, github: 'codebender') + expect(Changelogd.new(user).award?).to be false end end diff --git a/spec/models/badges/charity_spec.rb b/spec/models/badges/charity_spec.rb index 72922a0c..d7b40232 100644 --- a/spec/models/badges/charity_spec.rb +++ b/spec/models/badges/charity_spec.rb @@ -1,10 +1,10 @@ require 'spec_helper' -describe Charity do +RSpec.describe Charity, type: :model do it 'should have a name and description' do - Charity.name.should_not be_blank - Charity.description.should_not be_blank + expect(Charity.name).not_to be_blank + expect(Charity.description).not_to be_blank end it 'if the project is a fork and has languages then the user should be award' do @@ -14,7 +14,7 @@ fact = Fabricate(:github_fork_fact, context: user) badge = Charity.new(user) - badge.award?.should == true - badge.reasons[:links].first[fact.name].should == fact.url + expect(badge.award?).to eq(true) + expect(badge.reasons[:links].first[fact.name]).to eq(fact.url) end end diff --git a/spec/models/badges/cub_spec.rb b/spec/models/badges/cub_spec.rb index 69ed445e..dfd1a1ed 100644 --- a/spec/models/badges/cub_spec.rb +++ b/spec/models/badges/cub_spec.rb @@ -1,55 +1,46 @@ require 'spec_helper' -describe Cub do - let(:languages) { { - "JavaScript" => 111435 - } } - let(:repo) { Fabricate(:github_repo, languages: languages) } - let(:profile) { Fabricate(:github_profile, github_id: repo.owner.github_id) } - let(:user) { Fabricate(:user, github_id: profile.github_id) } +RSpec.describe Cub, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } it 'should have a name and description' do - Cub.description.should_not be_nil + expect(Cub.description).not_to be_nil end it 'should award the user if they have a repo tagged with JQuery' do - repo.add_tag('JQuery') - repo.save! - - user.build_github_facts + fact = Fabricate(:github_original_fact, context: user, + tags: %w(JQuery repo original personal github)) badge = Cub.new(user) - badge.award?.should == true - badge.reasons[:links].should_not be_empty + expect(badge.award?).to eq(true) + expect(badge.reasons[:links]).not_to be_empty end - it 'should not award if repo when readme contains text and is less then 90 javascript' do - languages["JavaScript"] = 230486 - languages["Ruby"] = 20364 - - user.build_github_facts + it 'should not award if javascript is not the dominent language' do + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Objective-C repo original personal github)) badge = Cub.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end it 'should award the user if they have a repo tagged with Prototype' do - repo.add_tag('Prototype') - repo.save! - - user.build_github_facts + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Prototype repo original personal github)) badge = Cub.new(user) - badge.award?.should == true + expect(badge.award?).to eq(true) end it 'should not support forks' do - repo.fork = true - repo.save! + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Prototype repo fork personal github)) + fact = Fabricate(:github_original_fact, context: user, + tags: %w(JQuery repo fork personal github)) user.build_github_facts badge = Cub.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end -end \ No newline at end of file +end diff --git a/spec/models/badges/early_adopter_spec.rb b/spec/models/badges/early_adopter_spec.rb index 4f072cfb..a7be0c2e 100644 --- a/spec/models/badges/early_adopter_spec.rb +++ b/spec/models/badges/early_adopter_spec.rb @@ -1,30 +1,37 @@ require 'spec_helper' -describe EarlyAdopter do +RSpec.describe EarlyAdopter, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } + + before(:each) do + allow(ExtractGithubProfile).to receive(:perform_async) + end + it 'should have a name and description' do - EarlyAdopter.name.should_not be_blank - EarlyAdopter.description.should_not be_blank + expect(EarlyAdopter.name).not_to be_blank + expect(EarlyAdopter.description).not_to be_blank end it 'should award user if they joined github within 6 months of founding' do - profile = Fabricate(:github_profile, created_at: '2008/04/14 15:53:10 -0700') - user = Fabricate(:user, github_id: profile.github_id) - - user.build_github_facts + profile = Fabricate(:github_profile, user: user, + github_created_at: '2008/04/14 15:53:10 -0700', github_id: 987305) badge = EarlyAdopter.new(user) - badge.award?.should == true - badge.reasons.should == "Created an account within GitHub's first 6 months on April 14, 2008." + expect(badge.award?).to eq(true) + expect(badge.reasons).to eq("Created an account within GitHub's first 6 months on April 14, 2008.") end it 'should not award the user if the they joined after 6 mounts of github founding' do - profile = Fabricate(:github_profile, created_at: '2009/04/14 15:53:10 -0700') - user = Fabricate(:user, github_id: profile.github_id) + profile = Fabricate(:github_profile, user: user, + github_created_at: '2009/04/14 15:53:10 -0700', github_id: 987305) - user.build_github_facts + badge = EarlyAdopter.new(user) + expect(badge.award?).to eq(false) + end + it 'does not award the badge if the user doesnt have a github profile' do badge = EarlyAdopter.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end -end \ No newline at end of file +end diff --git a/spec/models/badges/forked50_spec.rb b/spec/models/badges/forked50_spec.rb index 7157d611..152d7409 100644 --- a/spec/models/badges/forked50_spec.rb +++ b/spec/models/badges/forked50_spec.rb @@ -1,28 +1,28 @@ require 'spec_helper' -describe Forked50 do +RSpec.describe Forked50, type: :model do before :all do Fact.delete_all end it 'should have a name and description' do - Forked50.name.should include('50') + expect(Forked50.name).to include('50') end it 'should award user if a repo has been forked 100 times' do user = Fabricate(:user, github: 'mdeiters') - fact = Fabricate(:github_original_fact, context: user, metadata: {times_forked: 50}) + fact = Fabricate(:github_original_fact, context: user, metadata: { times_forked: 50 }) badge = Forked50.new(user) - badge.award?.should == true + expect(badge.award?).to eq(true) end it 'should not award user a repo has been forked 20 if it is a fork' do user = Fabricate(:user, github: 'mdeiters') - fact = Fabricate(:github_original_fact, context: user, tags: ['Ruby', 'repo', 'original', 'fork', 'github'], metadata: {times_forked: 20}) + fact = Fabricate(:github_original_fact, context: user, tags: %w(Ruby repo original fork github), metadata: { times_forked: 20 }) badge = Forked20.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end end diff --git a/spec/models/badges/forked_spec.rb b/spec/models/badges/forked_spec.rb index 313f5971..78adb803 100644 --- a/spec/models/badges/forked_spec.rb +++ b/spec/models/badges/forked_spec.rb @@ -1,31 +1,31 @@ require 'spec_helper' -describe Forked do +RSpec.describe Forked, type: :model do before :all do Fact.delete_all end it 'should have a name and description' do - Forked.name.should_not be_blank - Forked.description.should_not be_blank + expect(Forked.name).not_to be_blank + expect(Forked.description).not_to be_blank end it 'should award user if a repo has been forked once' do user = Fabricate(:user, github: 'mdeiters') - fact = Fabricate(:github_original_fact, context: user, metadata: {times_forked: 2}) + fact = Fabricate(:github_original_fact, context: user, metadata: { times_forked: 2 }) badge = Forked.new(user) - badge.award?.should == true - badge.reasons[:links].first[fact.name].should == fact.url + expect(badge.award?).to eq(true) + expect(badge.reasons[:links].first[fact.name]).to eq(fact.url) end it 'should not award user if no repo has been forked' do user = Fabricate(:user, github: 'mdeiters') - fact = Fabricate(:github_original_fact, context: user, metadata: {times_forked: 0}) + fact = Fabricate(:github_original_fact, context: user, metadata: { times_forked: 0 }) badge = Forked.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end -end \ No newline at end of file +end diff --git a/spec/models/badges/lemmings1000_spec.rb b/spec/models/badges/lemmings1000_spec.rb index 3e76b9af..90b1d72f 100644 --- a/spec/models/badges/lemmings1000_spec.rb +++ b/spec/models/badges/lemmings1000_spec.rb @@ -1,14 +1,14 @@ require 'spec_helper' -describe Lemmings1000 do +RSpec.describe Lemmings1000, type: :model do before :all do Fact.delete_all end it 'should have a name and description' do - Lemmings1000.name.should_not be_blank - Lemmings1000.description.should_not be_blank + expect(Lemmings1000.name).not_to be_blank + expect(Lemmings1000.description).not_to be_blank end it 'should not award users with less then 1000 followers' do @@ -16,20 +16,20 @@ fact = Fabricate(:github_original_fact, context: user) badge = Lemmings1000.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end it 'should award the user the badge if any of their projects have over 1000 followers' do user = Fabricate(:user) watchers = [] 1000.times do - watchers << Faker::Internet.user_name + watchers << FFaker::Internet.user_name end - fact = Fabricate(:github_original_fact, context: user, metadata: {watchers: watchers}) + fact = Fabricate(:github_original_fact, context: user, metadata: { watchers: watchers }) badge = Lemmings1000.new(user) - badge.award?.should == true - badge.reasons[:links].first[fact.name].should == fact.url + expect(badge.award?).to eq(true) + expect(badge.reasons[:links].first[fact.name]).to eq(fact.url) end -end \ No newline at end of file +end diff --git a/spec/models/badges/mongoose_spec.rb b/spec/models/badges/mongoose_spec.rb index 29a1d585..79fc25a1 100644 --- a/spec/models/badges/mongoose_spec.rb +++ b/spec/models/badges/mongoose_spec.rb @@ -1,36 +1,38 @@ require 'spec_helper' -describe Mongoose do - let(:languages) { { - "Ruby" => 2519686, - "JavaScript" => 6107, - "Python" => 76867 - } } - let(:repo) { Fabricate(:github_repo, languages: languages) } - let(:profile) { Fabricate(:github_profile, github_id: repo.owner.github_id) } - let(:user) { Fabricate(:user, github_id: profile.github_id) } +RSpec.describe Mongoose, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } before :all do Fact.delete_all end it 'should have a name and description' do - Mongoose.description.should_not be_blank + expect(Mongoose.description).not_to be_blank end it 'should award ruby dev with one ruby repo' do - user.build_github_facts + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Ruby repo original personal github)) badge = Mongoose.new(user) - badge.award?.should == true - badge.reasons[:links].should_not be_empty + expect(badge.award?).to eq(true) + expect(badge.reasons[:links]).not_to be_empty end - it 'should not for a python dev' do - languages.delete('Ruby') - user.build_github_facts + it 'should not for a dev with no repo with ruby as the dominent language' do + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Python repo original personal github)) badge = Mongoose.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) + end + + it 'doesnt award the badge if the repo is a fork' do + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Ruby repo fork personal github)) + + badge = Mongoose.new(user) + expect(badge.award?).to eq(false) end end diff --git a/spec/models/badges/nephila_komaci_spec.rb b/spec/models/badges/nephila_komaci_spec.rb index b9eae2a1..43e718e3 100644 --- a/spec/models/badges/nephila_komaci_spec.rb +++ b/spec/models/badges/nephila_komaci_spec.rb @@ -1,28 +1,23 @@ require 'spec_helper' -describe NephilaKomaci do - let(:languages) { { - "PHP" => 2519686, - "Python" => 76867 - } } - let(:repo) { Fabricate(:github_repo, languages: languages) } - let(:profile) { Fabricate(:github_profile, github_id: repo.owner.github_id) } - let(:user) { Fabricate(:user, github_id: profile.github_id) } +RSpec.describe NephilaKomaci, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } before :all do Fact.delete_all end it 'should have a name and description' do - NephilaKomaci.description.should_not be_blank + expect(NephilaKomaci.description).not_to be_blank end - it 'should award php dev with badge' do - user.build_github_facts + it 'should award the badge if the user has a original PHP dominent repo' do + fact = Fabricate(:github_original_fact, context: user, + tags: %w(PHP repo original personal github)) badge = NephilaKomaci.new(user) - badge.award?.should == true - badge.reasons[:links].should_not be_empty + expect(badge.award?).to eq(true) + expect(badge.reasons[:links]).not_to be_empty end end diff --git a/spec/models/badges/node_knockout_spec.rb b/spec/models/badges/node_knockout_spec.rb index addf02cf..4b0ee647 100644 --- a/spec/models/badges/node_knockout_spec.rb +++ b/spec/models/badges/node_knockout_spec.rb @@ -1,5 +1,5 @@ require 'spec_helper' -describe NodeKnockout do +RSpec.describe NodeKnockout, type: :model do end diff --git a/spec/models/badges/octopussy_spec.rb b/spec/models/badges/octopussy_spec.rb index e8728f1e..993c5e5e 100644 --- a/spec/models/badges/octopussy_spec.rb +++ b/spec/models/badges/octopussy_spec.rb @@ -1,51 +1,60 @@ require 'spec_helper' -describe Octopussy do - let(:repo) { Fabricate(:github_repo) } - let(:profile) { Fabricate(:github_profile, github_id: repo.owner.github_id) } - let(:user) { Fabricate(:user, github_id: profile.github_id) } +RSpec.describe Octopussy, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } let(:pjhyett) { Fabricate(:user, github: 'pjhyett') } it 'should have a name and description' do - Octopussy.name.should_not be_blank - Octopussy.description.should_not be_blank + expect(Octopussy.name).not_to be_blank + expect(Octopussy.description).not_to be_blank end it 'does not award the badge if no followers work at github' do - create_team_github = Fabricate(:team, _id: Octopussy::GITHUB_TEAM_ID_IN_PRODUCTION) - create_team_github.add_user(pjhyett) + create_team_github = Fabricate(:team, name: "Github") + create_team_github.add_member(pjhyett) - random_dude = repo.followers.create! login: 'jmcneese' - - user.build_github_facts + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Ruby repo original personal github), + metadata: { watchers: 'rubysolos' }) badge = Octopussy.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end it 'awards badge when repo followed by github team' do - create_team_github = Fabricate(:team, _id: Octopussy::GITHUB_TEAM_ID_IN_PRODUCTION) - create_team_github.add_user(pjhyett) + create_team_github = Fabricate(:team, name: "Github") + create_team_github.add_member(pjhyett) + + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Ruby repo original personal github), + metadata: { watchers: 'pjhyett' }) + + badge = Octopussy.new(user) + expect(badge.award?).to eq(true) + expect(badge.reasons[:links]).not_to be_empty + end - github_founder = repo.followers.create! login: 'pjhyett' - repo.save! + it 'does not award forked repos' do + create_team_github = Fabricate(:team, name: "Github") + create_team_github.add_member(pjhyett) - user.build_github_facts + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Ruby repo fork personal github), + metadata: { watchers: 'pjhyett' }) badge = Octopussy.new(user) - badge.award?.should == true - badge.reasons[:links].should_not be_empty + expect(badge.award?).to eq(false) end it 'should cache github team members' do - create_team_github = Fabricate(:team, _id: Octopussy::GITHUB_TEAM_ID_IN_PRODUCTION) - create_team_github.add_user(pjhyett) + create_team_github = Fabricate(:team, name: "Github") + create_team_github.add_member(pjhyett) - Octopussy.github_team.size.should == 1 + expect(Octopussy.github_team.size).to eq(1) - create_team_github.add_user(Fabricate(:user, github: 'defunkt')) + create_team_github.add_member(Fabricate(:user, github: 'defunkt')) - Octopussy.github_team.size.should == 1 + expect(Octopussy.github_team.size).to eq(1) end -end \ No newline at end of file +end diff --git a/spec/models/badges/parrot_spec.rb b/spec/models/badges/parrot_spec.rb index 14f25919..f7dd07f3 100644 --- a/spec/models/badges/parrot_spec.rb +++ b/spec/models/badges/parrot_spec.rb @@ -1,24 +1,24 @@ require 'spec_helper' -describe Parrot do - it "should award the badge to a user with a single talk" do +RSpec.describe Parrot, type: :model do + it 'should award the badge to a user with a single talk' do user = Fabricate(:user) fact = Fabricate(:lanyrd_original_fact, context: user) badge = Parrot.new(user) - badge.award?.should be_true - badge.reasons[:links].first[fact.name].should == fact.url + expect(badge.award?).to be_truthy + expect(badge.reasons[:links].first[fact.name]).to eq(fact.url) end - it "should not award the badge to a user without any talks" do + it 'should not award the badge to a user without any talks' do user = Fabricate(:user) badge = Parrot.new(user) - badge.award?.should_not be_true + expect(badge.award?).not_to be_truthy end - it "should have a name and description" do - Parrot.name.should_not be_blank - Parrot.description.should_not be_blank + it 'should have a name and description' do + expect(Parrot.name).not_to be_blank + expect(Parrot.description).not_to be_blank end -end \ No newline at end of file +end diff --git a/spec/models/badges/philanthropist_spec.rb b/spec/models/badges/philanthropist_spec.rb index 428cb759..ad7200dc 100644 --- a/spec/models/badges/philanthropist_spec.rb +++ b/spec/models/badges/philanthropist_spec.rb @@ -1,9 +1,9 @@ require 'spec_helper' -describe Philanthropist do +RSpec.describe Philanthropist, type: :model do it 'should have a name and description' do - Philanthropist.name.should_not be_blank - Philanthropist.description.should_not be_blank + expect(Philanthropist.name).not_to be_blank + expect(Philanthropist.description).not_to be_blank end it 'should award user if they have 50 or more original repos with contents' do @@ -14,8 +14,8 @@ end badge = Philanthropist.new(user.reload) - badge.award?.should == true - badge.reasons.should == "for having shared 50 individual projects." + expect(badge.award?).to eq(true) + expect(badge.reasons).to eq('for having shared 50 individual projects.') end it 'should not award empty repos' do @@ -26,7 +26,7 @@ end badge = Philanthropist.new(user.reload) - badge.award?.should == false + expect(badge.award?).to eq(false) end -end \ No newline at end of file +end diff --git a/spec/models/badges/polygamous_spec.rb b/spec/models/badges/polygamous_spec.rb index adb4e48f..bcf62cee 100644 --- a/spec/models/badges/polygamous_spec.rb +++ b/spec/models/badges/polygamous_spec.rb @@ -1,29 +1,29 @@ require 'spec_helper' -describe Polygamous do +RSpec.describe Polygamous, type: :model do it 'should have a name and description' do - Polygamous.name.should_not be_blank - Polygamous.description.should_not be_blank + expect(Polygamous.name).not_to be_blank + expect(Polygamous.description).not_to be_blank end it 'should not award the user the badge if they have less then languages with at least 200 bytes' do user = Fabricate(:user, github: 'mdeiters') - Fabricate(:github_original_fact, context: user, metadata: {languages: ['Ruby', 'PHP']}) - Fabricate(:github_original_fact, context: user, metadata: {languages: ['C']}) + Fabricate(:github_original_fact, context: user, metadata: { languages: %w(Ruby PHP) }) + Fabricate(:github_original_fact, context: user, metadata: { languages: ['C'] }) badge = Polygamous.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end it 'should award the user the badge if they have 4 more different languages with at least 200 bytes' do user = Fabricate(:user, github: 'mdeiters') - Fabricate(:github_original_fact, context: user, metadata: {languages: ['Ruby', 'PHP']}) - Fabricate(:github_original_fact, context: user, metadata: {languages: ['C', 'Erlang']}) + Fabricate(:github_original_fact, context: user, metadata: { languages: %w(Ruby PHP) }) + Fabricate(:github_original_fact, context: user, metadata: { languages: %w(C Erlang) }) badge = Polygamous.new(user) - badge.award?.should == true - badge.reasons.should include('C', 'Erlang', 'PHP', 'Ruby') + expect(badge.award?).to eq(true) + expect(badge.reasons).to include('C', 'Erlang', 'PHP', 'Ruby') end end diff --git a/spec/models/badges/profile_spec.rb b/spec/models/badges/profile_spec.rb deleted file mode 100644 index f7e326f6..00000000 --- a/spec/models/badges/profile_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -describe 'profile badges', :pending do - it 'mdeiters', functional: true, slow: true, pending: 'the data bootstrap is incorrect' do - VCR.use_cassette('github_for_mdeiters') do - User.delete_all - Fact.delete_all - @user = User.bootstrap('mdeiters', GITHUB_SECRET) - - badge = Charity.new(@user) - badge.award?.should == false - - badge = Cub.new(@user) - badge.award?.should == false - - badge = EarlyAdopter.new(@user) - badge.award?.should == true - end - end - - it 'verdammelt', functional: true, slow: true do - VCR.use_cassette('github_for_verdammelt') do - User.delete_all - @user = User.bootstrap('verdammelt', ENV['GITHUB_CLIENT_ID']) - - badge = Charity.new(@user) - badge.award?.should == true - end - end - - it 'mrdg', functional: true, slow: true do - VCR.use_cassette('github_for_mrdg') do - User.delete_all - @user = User.bootstrap('mrdg', ENV['GITHUB_CLIENT_ID']) - badge = Cub.new(@user) - badge.award?.should == true - end - end -end diff --git a/spec/models/badges/python_spec.rb b/spec/models/badges/python_spec.rb index 19045565..cc22845b 100644 --- a/spec/models/badges/python_spec.rb +++ b/spec/models/badges/python_spec.rb @@ -1,31 +1,26 @@ require 'spec_helper' -describe Python do - let(:languages) { { - "Python" => 2519686, - "Java" => 76867 - } } - let(:repo) { Fabricate(:github_repo, languages: languages) } - let(:profile) { Fabricate(:github_profile, github_id: repo.owner.github_id) } - let(:user) { Fabricate(:user, github_id: profile.github_id) } +RSpec.describe Python, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } it 'should have a name and description' do - Python.description.should_not be_blank + expect(Python.description).not_to be_blank end - it 'should not award ruby dev with one ruby repo' do - user.build_github_facts + it 'awards the user if the user has a Python dominent repo' do + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Python repo original personal github)) badge = Python.new(user) - badge.award?.should == true - badge.reasons[:links].should_not be_empty + expect(badge.award?).to eq(true) + expect(badge.reasons[:links]).not_to be_empty end - it 'should not for a python dev' do - languages.delete('Python') - user.build_github_facts + it 'does not award the user if the user has no Python dominent repo' do + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Ruby repo original personal github)) badge = Python.new(user) - badge.award?.should == false + expect(badge.award?).to eq(false) end end diff --git a/spec/models/badges/velociraptor_spec.rb b/spec/models/badges/velociraptor_spec.rb index bbf9af8b..b7fc34ee 100644 --- a/spec/models/badges/velociraptor_spec.rb +++ b/spec/models/badges/velociraptor_spec.rb @@ -1,24 +1,18 @@ require 'spec_helper' -describe Velociraptor do - let(:languages) { { - "C" => 194738, - "C++" => 105902, - "Perl" => 2519686 - } } - let(:repo) { Fabricate(:github_repo, languages: languages) } - let(:profile) { Fabricate(:github_profile, github_id: repo.owner.github_id) } - let(:user) { Fabricate(:user, github_id: profile.github_id) } +RSpec.describe Velociraptor, type: :model do + let(:user) { Fabricate(:user, github: 'codebender') } it 'should have a name and description' do - Velociraptor.description.should_not be_blank + expect(Velociraptor.description).not_to be_blank end it 'should award perl dev with badge' do - user.build_github_facts + fact = Fabricate(:github_original_fact, context: user, + tags: %w(Perl repo original personal github)) badge = Velociraptor.new(user) - badge.award?.should == true - badge.reasons[:links].should_not be_empty + expect(badge.award?).to eq(true) + expect(badge.reasons[:links]).not_to be_empty end end diff --git a/spec/models/bitbucket_spec.rb b/spec/models/bitbucket_spec.rb index 2eb57fce..cbe4eeb2 100644 --- a/spec/models/bitbucket_spec.rb +++ b/spec/models/bitbucket_spec.rb @@ -1,13 +1,13 @@ -describe Bitbucket do +RSpec.describe Bitbucket, type: :model do describe 'facts' do before(:all) do stub_request(:get, 'https://api.bitbucket.org/1.0/users/jespern').to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'bitbucketv1', 'repositories.js'))) stub_request(:get, 'https://api.bitbucket.org/1.0/users/jespern/followers').to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'bitbucketv1', 'user_followers.js'))) - stub_request(:get, "https://bitbucket.org/jespern").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'bitbucketv1', "user_profile.js"))) + stub_request(:get, 'https://bitbucket.org/jespern').to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'bitbucketv1', 'user_profile.js'))) - [{repo: 'django-piston', commits: 297}, - {repo: 'par2-drobofs', commits: 0}, - {repo: 'heechee-fixes', commits: 18}].each do |info| + [{ repo: 'django-piston', commits: 297 }, + { repo: 'par2-drobofs', commits: 0 }, + { repo: 'heechee-fixes', commits: 18 }].each do |info| stub_request(:get, "https://api.bitbucket.org/1.0/repositories/jespern/#{info[:repo]}").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'bitbucketv1', 'repositories', "#{info[:repo]}.js"))) stub_request(:get, "https://api.bitbucket.org/1.0/repositories/jespern/#{info[:repo]}/followers").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'bitbucketv1', 'repositories', "#{info[:repo]}_followers.js"))) stub_request(:get, "https://api.bitbucket.org/1.0/repositories/jespern/#{info[:repo]}/src/tip/README.rst").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'bitbucketv1', 'repositories', "#{info[:repo]}_followers.js"))) @@ -18,60 +18,60 @@ end end - @bitbucket = Bitbucket::V1.new('jespern') - @bitbucket.update_facts! + @bitbucket = Bitbucket::V1.new('jespern') + @bitbucket.update_facts! end it 'creates facts for original repos' do - @bitbucket.facts.should_not be_empty + expect(@bitbucket.facts).not_to be_empty fact = @bitbucket.facts.first - fact.identity.should == 'https://bitbucket.org/jespern/django-piston/overview:jespern' - fact.owner.should == "bitbucket:jespern" - fact.name.should == 'django-piston' - fact.relevant_on.to_date.should == Date.parse('2009-04-19') - fact.url.should == 'https://bitbucket.org/jespern/django-piston/overview' - fact.tags.should include('repo', 'bitbucket', 'personal', 'original', 'Python', 'Django') - fact.metadata[:languages].should include("Python") - fact.metadata[:original].should be_true - fact.metadata[:times_forked].should == 243 - fact.metadata[:watchers].first.should be_a_kind_of String - fact.metadata[:watchers].count.should == 983 - fact.metadata[:website].should == "http://bitbucket.org/jespern/" + expect(fact.identity).to eq('https://bitbucket.org/jespern/django-piston/overview:jespern') + expect(fact.owner).to eq('bitbucket:jespern') + expect(fact.name).to eq('django-piston') + expect(fact.relevant_on.to_date).to eq(Date.parse('2009-04-19')) + expect(fact.url).to eq('https://bitbucket.org/jespern/django-piston/overview') + expect(fact.tags).to include('repo', 'bitbucket', 'personal', 'original', 'Python', 'Django') + expect(fact.metadata[:languages]).to include('Python') + expect(fact.metadata[:original]).to be_truthy + expect(fact.metadata[:times_forked]).to eq(243) + expect(fact.metadata[:watchers].first).to be_a_kind_of String + expect(fact.metadata[:watchers].count).to eq(983) + expect(fact.metadata[:website]).to eq('http://bitbucket.org/jespern/') end it 'creates facts for small repos' do - @bitbucket.facts.count.should == 3 - @bitbucket.repos.collect(&:name).should_not include('par2-drobofs') + expect(@bitbucket.facts.count).to eq(3) + expect(@bitbucket.repos.map(&:name)).not_to include('par2-drobofs') end it 'creates facts for forked repos' do - @bitbucket.facts.should_not be_empty + expect(@bitbucket.facts).not_to be_empty fact = @bitbucket.facts.second - fact.identity.should == 'https://bitbucket.org/jespern/heechee-fixes/overview:jespern' - fact.owner.should == 'bitbucket:jespern' - fact.name.should == 'heechee-fixes' - fact.relevant_on.to_date.should == Date.parse('2010-04-14') - fact.url.should == 'https://bitbucket.org/jespern/heechee-fixes/overview' - fact.tags.should include('repo', 'bitbucket', 'personal', 'fork') - fact.metadata[:languages].should be_empty - fact.metadata[:original].should be_false - fact.metadata[:times_forked].should == 0 - fact.metadata[:watchers].count.should == 2 - fact.metadata[:website].should be_nil + expect(fact.identity).to eq('https://bitbucket.org/jespern/heechee-fixes/overview:jespern') + expect(fact.owner).to eq('bitbucket:jespern') + expect(fact.name).to eq('heechee-fixes') + expect(fact.relevant_on.to_date).to eq(Date.parse('2010-04-14')) + expect(fact.url).to eq('https://bitbucket.org/jespern/heechee-fixes/overview') + expect(fact.tags).to include('repo', 'bitbucket', 'personal', 'fork') + expect(fact.metadata[:languages]).to be_empty + expect(fact.metadata[:original]).to be_falsey + expect(fact.metadata[:times_forked]).to eq(0) + expect(fact.metadata[:watchers].count).to eq(2) + expect(fact.metadata[:website]).to be_nil end it 'creates facts for when user signed up' do - @bitbucket.facts.should_not be_empty + expect(@bitbucket.facts).not_to be_empty fact = @bitbucket.facts.last - fact.identity.should == 'bitbucket:jespern' - fact.owner.should == "bitbucket:jespern" - fact.name.should == 'Joined Bitbucket' - fact.relevant_on.to_date.should == Date.parse('2008-06-13') - fact.url.should == 'https://bitbucket.org/jespern' - fact.tags.should include('bitbucket', 'account-created') - fact.tags.should include('account-created') - fact.metadata[:avatar_url].should == "https://secure.gravatar.com/avatar/b658715b9635ef057daf2a22d4a8f36e?d=identicon&s=32" - fact.metadata[:followers].count.should == 218 + expect(fact.identity).to eq('bitbucket:jespern') + expect(fact.owner).to eq('bitbucket:jespern') + expect(fact.name).to eq('Joined Bitbucket') + expect(fact.relevant_on.to_date).to eq(Date.parse('2008-06-13')) + expect(fact.url).to eq('https://bitbucket.org/jespern') + expect(fact.tags).to include('bitbucket', 'account-created') + expect(fact.tags).to include('account-created') + expect(fact.metadata[:avatar_url]).to eq('https://secure.gravatar.com/avatar/b658715b9635ef057daf2a22d4a8f36e?d=identicon&s=32') + expect(fact.metadata[:followers].count).to eq(218) end it 'should fail gracefully if bitbucket user does not exist', functional: true do diff --git a/spec/models/blog_post_spec.rb b/spec/models/blog_post_spec.rb deleted file mode 100644 index 2a30ee36..00000000 --- a/spec/models/blog_post_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'spec_helper' - -describe BlogPost do - - let(:post_markdown) do - "" " ---- -title: Hello World -posted: Mon, 09 Jan 2012 00:27:01 -0800 -author: gthreepwood ---- -This is a test of the thing. _Markdown_ should work. -" "" - end - - let(:post) { BlogPost.new("2012-01-09-hello-world", StringIO.new(post_markdown)) } - - describe "class methods" do - # Hack. - before do - @old_root = BlogPost::BLOG_ROOT - silence_warnings { BlogPost::BLOG_ROOT = Rails.root.join("spec", "fixtures", "blog") } - end - - after do - silence_warnings { BlogPost::BLOG_ROOT = @old_root } - end - - it "should find a post by its id" do - post = BlogPost.find("2011-07-22-gaming-the-game") - post.should_not be_nil - post.id.should == "2011-07-22-gaming-the-game" - end - - it "should raise PostNotFound if the post does not exist" do - lambda { BlogPost.find("2012-01-09-hello-world") }.should raise_error(BlogPost::PostNotFound) - end - - it "should retrieve a list of all posts and skip posts that begin with draft-" do - posts = BlogPost.all - posts.map(&:id).should == ["2011-07-22-gaming-the-game"] - end - end - - describe "instance methods" do - it "should have an id" do - post.id.should == "2012-01-09-hello-world" - end - - it "should have a title" do - post.title.should == "Hello World" - end - - it "should have a posted-on date" do - post.posted.should == DateTime.parse("Mon, 09 Jan 2012 00:27:01 -0800") - end - - it "should have an author" do - post.author.should == "gthreepwood" - end - - it "should have html that's been parsed with Markdown" do - post.html.should match("<p>This is a test of the thing. <em>Markdown</em> should work.</p>") - end - end - -end \ No newline at end of file diff --git a/spec/models/comment_spec.rb b/spec/models/comment_spec.rb new file mode 100644 index 00000000..d5fec4d2 --- /dev/null +++ b/spec/models/comment_spec.rb @@ -0,0 +1,49 @@ +# == Schema Information +# +# Table name: comments +# +# id :integer not null, primary key +# title :string(50) default("") +# comment :text default("") +# protip_id :integer +# user_id :integer +# likes_cache :integer default(0) +# likes_value_cache :integer default(0) +# created_at :datetime +# updated_at :datetime +# likes_count :integer default(0) +# user_name :string(255) +# user_email :string(255) +# user_agent :string(255) +# user_ip :inet +# request_format :string(255) +# spam_reports_count :integer default(0) +# state :string(255) default("active") +# + +require 'spec_helper' + +RSpec.describe Comment, type: :model, skip: true do + let(:comment) { Fabricate(:comment) } + + describe '#spam_report' do + subject { super().spam_report } + it { is_expected.to be_nil } + end + + context 'counter_cache' do + + it 'should update count' do + + expect(comment.likes_count).to be_zero + # Random tests + rand(2..10).times do + comment.likes.create(user: Fabricate(:user)) + end + expect(comment.likes_count).to eq(comment.likes.count) + comment.likes.last.destroy + expect(comment.likes_count).to eq(comment.likes.count) + end + + end +end diff --git a/spec/models/concerns/protip_ownership_spec.rb b/spec/models/concerns/protip_ownership_spec.rb new file mode 100644 index 00000000..00f5b6c1 --- /dev/null +++ b/spec/models/concerns/protip_ownership_spec.rb @@ -0,0 +1,9 @@ +require 'rails_helper' + +RSpec.describe Protip, type: :model do + let(:protip) {Fabricate(:protip)} + it 'should respond to ownership instance methods' do + expect(protip).to respond_to :owned_by? + expect(protip).to respond_to :owner? + end +end diff --git a/spec/models/concerns/user_api_spec.rb b/spec/models/concerns/user_api_spec.rb new file mode 100644 index 00000000..25fe1870 --- /dev/null +++ b/spec/models/concerns/user_api_spec.rb @@ -0,0 +1,35 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :api_key + expect(user).to respond_to :generate_api_key! + end + + describe 'api key' do + let(:user) { Fabricate(:user) } + + it 'should assign and save an api_key if not exists' do + api_key = user.api_key + expect(api_key).not_to be_nil + expect(api_key).to eq(user.api_key) + user.reload + expect(user.api_key).to eq(api_key) + end + + it 'should assign a new api_key if the one generated already exists' do + RandomSecure = double('RandomSecure') + allow(RandomSecure).to receive(:hex).and_return('0b5c141c21c15b34') + user2 = Fabricate(:user) + api_key2 = user2.api_key + user2.api_key = RandomSecure.hex(8) + expect(user2.api_key).not_to eq(api_key2) + api_key1 = user.api_key + expect(api_key1).not_to eq(api_key2) + end + end + + +end diff --git a/spec/models/concerns/user_award_spec.rb b/spec/models/concerns/user_award_spec.rb new file mode 100644 index 00000000..6d82759f --- /dev/null +++ b/spec/models/concerns/user_award_spec.rb @@ -0,0 +1,83 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + + let(:user) {Fabricate(:user)} + it 'should respond to methods' do + expect(user).to respond_to :award + expect(user).to respond_to :add_all_github_badges + expect(user).to respond_to :remove_all_github_badges + expect(user).to respond_to :award_and_add_skill + expect(user).to respond_to :assign_badges + end + + describe 'badges and award' do + it 'should return users with most badges' do + user_with_2_badges = Fabricate :user, username: 'somethingelse' + user_with_2_badges.badges.create!(badge_class_name: Mongoose3.name) + user_with_2_badges.badges.create!(badge_class_name: Octopussy.name) + + user_with_3_badges = Fabricate :user + user_with_3_badges.badges.create!(badge_class_name: Mongoose3.name) + user_with_3_badges.badges.create!(badge_class_name: Octopussy.name) + user_with_3_badges.badges.create!(badge_class_name: Mongoose.name) + + expect(User.top(1)).to include(user_with_3_badges) + expect(User.top(1)).not_to include(user_with_2_badges) + end + + it 'returns badges in order created with latest first' do + user = Fabricate :user + badge1 = user.badges.create!(badge_class_name: Mongoose3.name) + user.badges.create!(badge_class_name: Octopussy.name) + badge3 = user.badges.create!(badge_class_name: Mongoose.name) + + expect(user.badges.first).to eq(badge3) + expect(user.badges.last).to eq(badge1) + end + + class NotaBadge < BadgeBase + end + + class AlsoNotaBadge < BadgeBase + end + + it 'should award user with badge' do + user.award(NotaBadge.new(user)) + expect(user.badges.size).to eq(1) + expect(user.badges.first.badge_class_name).to eq(NotaBadge.name) + end + + it 'should not allow adding the same badge twice' do + user.award(NotaBadge.new(user)) + user.award(NotaBadge.new(user)) + user.save! + expect(user.badges.count).to eq(1) + end + + it 'increments the badge count when you add new badges' do + user.award(NotaBadge.new(user)) + user.save! + user.reload + expect(user.badges_count).to eq(1) + + user.award(AlsoNotaBadge.new(user)) + user.save! + user.reload + expect(user.badges_count).to eq(2) + end + + it 'should randomly select the user with badges' do + user.award(NotaBadge.new(user)) + user.award(NotaBadge.new(user)) + user.save! + + user2 = Fabricate(:user, username: 'different', github_token: 'unique') + + 4.times do + expect(User.random).not_to eq(user2) + end + end + end + +end \ No newline at end of file diff --git a/spec/models/concerns/user_badge_spec.rb b/spec/models/concerns/user_badge_spec.rb new file mode 100644 index 00000000..d68ffe36 --- /dev/null +++ b/spec/models/concerns/user_badge_spec.rb @@ -0,0 +1,24 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :has_badges? + expect(user).to respond_to :total_achievements + expect(user).to respond_to :achievement_score + expect(user).to respond_to :achievements_unlocked_since_last_visit + expect(user).to respond_to :oldest_achievement_since_last_visit + expect(user).to respond_to :check_achievements! + end + + describe '#has_badges' do + xit 'return nil if no badge is present' do + expect(user.has_badges?).to eq(0) + end + xit 'return identity if badge is present' do + BadgeBase.new(user) + user.badges.build + expect(user.has_badges?).to eq(1) + end + end +end diff --git a/spec/models/concerns/user_endorser_spec.rb b/spec/models/concerns/user_endorser_spec.rb new file mode 100644 index 00000000..7d23ef5d --- /dev/null +++ b/spec/models/concerns/user_endorser_spec.rb @@ -0,0 +1,12 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :endorsements_unlocked_since_last_visit + expect(user).to respond_to :endorsements_since + expect(user).to respond_to :endorsers + expect(user).to respond_to :endorse + end + +end diff --git a/spec/models/concerns/user_event_concern_spec.rb b/spec/models/concerns/user_event_concern_spec.rb new file mode 100644 index 00000000..625ece6f --- /dev/null +++ b/spec/models/concerns/user_event_concern_spec.rb @@ -0,0 +1,13 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :subscribed_channels + expect(user).to respond_to :generate_event + expect(user).to respond_to :event_audience + expect(user).to respond_to :to_event_hash + expect(user).to respond_to :event_type + end + +end diff --git a/spec/models/concerns/user_facts_spec.rb b/spec/models/concerns/user_facts_spec.rb new file mode 100644 index 00000000..83fccc0d --- /dev/null +++ b/spec/models/concerns/user_facts_spec.rb @@ -0,0 +1,24 @@ +require 'vcr_helper' + +RSpec.describe User, type: :model, vcr: true do + + let(:user) { Fabricate(:user) } + it 'should respond to methods' do + expect(user).to respond_to :build_facts + expect(user).to respond_to :build_speakerdeck_facts + expect(user).to respond_to :build_slideshare_facts + expect(user).to respond_to :build_lanyrd_facts + expect(user).to respond_to :build_bitbucket_facts + expect(user).to respond_to :build_github_facts + expect(user).to respond_to :build_linkedin_facts + expect(user).to respond_to :repo_facts + expect(user).to respond_to :lanyrd_facts + expect(user).to respond_to :times_spoken + expect(user).to respond_to :times_attended + expect(user).to respond_to :add_skills_for_unbadgified_facts + expect(user).to respond_to :add_skills_for_repo_facts! + expect(user).to respond_to :add_skills_for_lanyrd_facts! + end + + +end \ No newline at end of file diff --git a/spec/models/concerns/user_following_spec.rb b/spec/models/concerns/user_following_spec.rb new file mode 100644 index 00000000..0085149b --- /dev/null +++ b/spec/models/concerns/user_following_spec.rb @@ -0,0 +1,80 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :build_follow_list! + expect(user).to respond_to :follow + expect(user).to respond_to :member_of? + expect(user).to respond_to :following_team? + expect(user).to respond_to :follow_team! + expect(user).to respond_to :unfollow_team! + expect(user).to respond_to :teams_being_followed + expect(user).to respond_to :following_users_ids + expect(user).to respond_to :following_teams_ids + expect(user).to respond_to :following_team_members_ids + expect(user).to respond_to :following_networks_tags + expect(user).to respond_to :following + expect(user).to respond_to :following_in_common + expect(user).to respond_to :followed_repos + expect(user).to respond_to :networks + expect(user).to respond_to :followers_since + expect(user).to respond_to :subscribed_to_topic? + expect(user).to respond_to :subscribe_to + expect(user).to respond_to :unsubscribe_from + expect(user).to respond_to :protip_subscriptions + expect(user).to respond_to :join + expect(user).to respond_to :leave + end + + + describe 'following users' do + let(:user) { Fabricate(:user) } + let(:other_user) { Fabricate(:user) } + + it 'can follow another user' do + user.follow(other_user) + + expect(other_user.followed_by?(user)).to eq(true) + expect(user.following?(other_user)).to eq(true) + end + + it 'should pull twitter follow list and follow any users on our system' do + expect(Twitter).to receive(:friend_ids).with(6_271_932).and_return(%w(1111 2222)) + + user = Fabricate(:user, twitter_id: 6_271_932) + other_user = Fabricate(:user, twitter_id: '1111') + expect(user).not_to be_following(other_user) + user.build_follow_list! + + expect(user).to be_following(other_user) + end + + it 'should follow another user only once' do + expect(user.following_by_type(User.name).size).to eq(0) + 2.times do + user.follow(other_user) + expect(user.following_by_type(User.name).size).to eq(1) + end + end + end + + describe 'following teams' do + let(:user) { Fabricate(:user) } + let(:team) { Fabricate(:team) } + + it 'can follow a team' do + user.follow_team!(team) + user.reload + expect(user.following_team?(team)).to eq(true) + end + + it 'can unfollow a team' do + user.follow_team!(team) + user.unfollow_team!(team) + user.reload + expect(user.following_team?(team)).to eq(false) + end + end + +end diff --git a/spec/models/concerns/user_github_spec.rb b/spec/models/concerns/user_github_spec.rb new file mode 100644 index 00000000..34e46f22 --- /dev/null +++ b/spec/models/concerns/user_github_spec.rb @@ -0,0 +1,19 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :clear_github! + expect(user).to respond_to :build_github_proptips_fast + expect(user).to respond_to :build_repo_followed_activity! + end + + it 'should clear github' do + user.clear_github! + expect(user.github_id).to be_nil + expect(user.github).to be_nil + expect(user.github_token).to be_nil + expect(user.joined_github_on).to be_nil + expect(user.github_failures).to be_zero + end +end diff --git a/spec/models/concerns/user_job_spec.rb b/spec/models/concerns/user_job_spec.rb new file mode 100644 index 00000000..7e8f03ff --- /dev/null +++ b/spec/models/concerns/user_job_spec.rb @@ -0,0 +1,10 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) { Fabricate(:user) } + it 'should respond to instance methods' do + expect(user).to respond_to :apply_to + expect(user).to respond_to :already_applied_for? + expect(user).to respond_to :has_resume? + end +end diff --git a/spec/models/concerns/user_linkedin_spec.rb b/spec/models/concerns/user_linkedin_spec.rb new file mode 100644 index 00000000..4dde609d --- /dev/null +++ b/spec/models/concerns/user_linkedin_spec.rb @@ -0,0 +1,18 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :clear_linkedin! + end + + it 'should clear linkedin' do + user.clear_linkedin! + expect(user.linkedin).to be_nil + expect(user.linkedin_id).to be_nil + expect(user.linkedin_token).to be_nil + expect(user.linkedin_secret).to be_nil + expect(user.linkedin_public_url).to be_nil + expect(user.linkedin_legacy).to be_nil + end +end diff --git a/spec/models/concerns/user_oauth_spec.rb b/spec/models/concerns/user_oauth_spec.rb new file mode 100644 index 00000000..17b402fb --- /dev/null +++ b/spec/models/concerns/user_oauth_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :apply_oauth + expect(user).to respond_to :extract_joined_on + expect(user).to respond_to :extract_from_oauth_extras + end + +end diff --git a/spec/models/concerns/user_protip_spec.rb b/spec/models/concerns/user_protip_spec.rb new file mode 100644 index 00000000..1dc02233 --- /dev/null +++ b/spec/models/concerns/user_protip_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :upvoted_protips + expect(user).to respond_to :upvoted_protips_public_ids + expect(user).to respond_to :bookmarked_protips + expect(user).to respond_to :authored_protips + end +end diff --git a/spec/models/concerns/user_redis_keys_spec.rb b/spec/models/concerns/user_redis_keys_spec.rb new file mode 100644 index 00000000..0e815749 --- /dev/null +++ b/spec/models/concerns/user_redis_keys_spec.rb @@ -0,0 +1,131 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to methods' do + expect(user).to respond_to :repo_cache_key + expect(user).to respond_to :daily_cache_key + expect(user).to respond_to :timeline_key + expect(user).to respond_to :impressions_key + expect(user).to respond_to :user_views_key + expect(user).to respond_to :user_anon_views_key + expect(user).to respond_to :followed_repo_key + expect(user).to respond_to :followers_key + expect(user).to respond_to :bitbucket_identity + expect(user).to respond_to :speakerdeck_identity + expect(user).to respond_to :slideshare_identity + expect(user).to respond_to :github_identity + expect(user).to respond_to :linkedin_identity + expect(user).to respond_to :lanyrd_identity + expect(user).to respond_to :twitter_identity + end + + it 'should use username as repo_cache_key' do + expect(user.repo_cache_key).to eq(user.username) + end + + it 'should use a daily cache key' do + expect(user.daily_cache_key).to eq("#{user.repo_cache_key}/#{Date.today.to_time.to_i}") + end + + it 'should return correct timeline namespace' do + expect(user.timeline_key).to eq("user:#{user.id}:timeline") + end + + it 'should return correct impression namespace' do + expect(user.impressions_key).to eq("user:#{user.id}:impressions") + end + + it 'should return correct view namespace' do + expect(user.user_views_key).to eq("user:#{user.id}:views") + end + + it 'should return correct anon view namespace' do + expect(user.user_anon_views_key).to eq("user:#{user.id}:views:anon") + end + + it 'should return correct followed repo namespace' do + expect(user.followed_repo_key).to eq("user:#{user.id}:following:repos") + end + + it 'should return correct followers namespace' do + expect(user.followers_key).to eq("user:#{user.id}:followers") + end + + describe '#bitbucket_identity' do + it 'return nil if no account is present' do + expect(user.bitbucket_identity).to be_nil + end + it 'return identity if account is present' do + bitbucket_account = FFaker::Internet.user_name + user.bitbucket = bitbucket_account + expect(user.bitbucket_identity).to eq("bitbucket:#{bitbucket_account}") + end + end + describe '#speakerdeck_identity' do + it 'return nil if no account is present' do + expect(user.speakerdeck_identity).to be_nil + end + it 'return identity if account is present' do + speakerdeck_account = FFaker::Internet.user_name + user.speakerdeck = speakerdeck_account + expect(user.speakerdeck_identity).to eq("speakerdeck:#{speakerdeck_account}") + end + end + describe '#slideshare_identity' do + it 'return nil if no account is present' do + expect(user.slideshare_identity).to be_nil + end + it 'return identity if account is present' do + slideshare_account = FFaker::Internet.user_name + user.slideshare = slideshare_account + expect(user.slideshare_identity).to eq("slideshare:#{slideshare_account}") + end + end + + describe '#github_identity' do + it 'return nil if no account is present' do + user.github = nil + expect(user.github_identity).to be_nil + end + it 'return identity if account is present' do + github_account = FFaker::Internet.user_name + user.github = github_account + expect(user.github_identity).to eq("github:#{github_account}") + end + end + describe '#linkedin_identity' do + it 'return nil if no account is present' do + expect(user.linkedin_identity).to be_nil + end + it 'return identity if account is present' do + linkedin_token_account = FFaker::Internet.user_name + linkedin_secret_account = FFaker::Internet.user_name + user.linkedin_token = linkedin_token_account + user.linkedin_secret = linkedin_secret_account + expect(user.linkedin_identity).to eq("linkedin:#{linkedin_token_account}::#{linkedin_secret_account}") + end + end + describe '#lanyrd_identity' do + it 'return nil if no account is present' do + user.twitter = nil + expect(user.lanyrd_identity).to be_nil + end + it 'return identity if account is present' do + twitter_account = FFaker::Internet.user_name + user.twitter = twitter_account + expect(user.lanyrd_identity).to eq("lanyrd:#{twitter_account}") + end + end + describe '#twitter_identity' do + it 'return nil if no account is present' do + user.twitter = nil + expect(user.twitter_identity).to be_nil + end + it 'return identity if account is present' do + twitter_account = FFaker::Internet.user_name + user.twitter = twitter_account + expect(user.twitter_identity).to eq("twitter:#{twitter_account}") + end + end +end diff --git a/spec/models/concerns/user_redis_spec.rb b/spec/models/concerns/user_redis_spec.rb new file mode 100644 index 00000000..68dab871 --- /dev/null +++ b/spec/models/concerns/user_redis_spec.rb @@ -0,0 +1,10 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :seen + expect(user).to respond_to :seen? + end + +end diff --git a/spec/models/concerns/user_search_spec.rb b/spec/models/concerns/user_search_spec.rb new file mode 100644 index 00000000..ceaf6765 --- /dev/null +++ b/spec/models/concerns/user_search_spec.rb @@ -0,0 +1,9 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :api_key + expect(user).to respond_to :generate_api_key! + end +end diff --git a/spec/models/concerns/user_state_machine_spec.rb b/spec/models/concerns/user_state_machine_spec.rb new file mode 100644 index 00000000..84d3d353 --- /dev/null +++ b/spec/models/concerns/user_state_machine_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) { Fabricate(:user) } + it 'should respond to instance methods' do + expect(user).to respond_to :activate + expect(user).to respond_to :activate! + expect(user).to respond_to :unregistered? + expect(user).to respond_to :not_active? + expect(user).to respond_to :active? + expect(user).to respond_to :pending? + expect(user).to respond_to :banned? + expect(user).to respond_to :complete_registration! + end +end diff --git a/spec/models/concerns/user_team_spec.rb b/spec/models/concerns/user_team_spec.rb new file mode 100644 index 00000000..7bad5eee --- /dev/null +++ b/spec/models/concerns/user_team_spec.rb @@ -0,0 +1,73 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :team + expect(user).to respond_to :team_member_ids + expect(user).to respond_to :on_team? + expect(user).to respond_to :team_member_of? + expect(user).to respond_to :belongs_to_team? + end + + describe '#team' do + let(:team) { Fabricate(:team) } + let(:user) { Fabricate(:user) } + + it 'returns membership team if user has membership' do + team.add_member(user) + expect(user.team).to eq(team) + end + + it 'returns team if team_id is set' do + user.team_id = team.id + user.save + expect(user.team).to eq(team) + end + + it 'returns nil if no team_id or membership' do + expect(user.team).to eq(nil) + end + + it 'should not error if the users team has been deleted' do + team = Fabricate(:team) + user = Fabricate(:user) + team.add_member(user) + team.destroy + expect(user.team).to be_nil + end + end + + describe '#on_team?' do + let(:team) { Fabricate(:team) } + let(:user) { Fabricate(:user) } + + it 'is true if user has a membership' do + expect(user.on_team?).to eq(false) + team.add_member(user) + expect(user.reload.on_team?).to eq(true) + end + + it 'is true if user is on a team' do + expect(user.on_team?).to eq(false) + user.team = team + user.save + expect(user.reload.on_team?).to eq(true) + end + end + + + describe "#on_premium_team?" do + it 'should indicate when user is on a premium team' do + team = Fabricate(:team, premium: true) + member = team.add_member(user = Fabricate(:user)) + expect(user.on_premium_team?).to eq(true) + end + + it 'should indicate a user not on a premium team when they dont belong to a team at all' do + user = Fabricate(:user) + expect(user.on_premium_team?).to eq(false) + end + end + +end diff --git a/spec/models/concerns/user_track_spec.rb b/spec/models/concerns/user_track_spec.rb new file mode 100644 index 00000000..cc6a158a --- /dev/null +++ b/spec/models/concerns/user_track_spec.rb @@ -0,0 +1,49 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :track! + expect(user).to respond_to :track_user_view! + expect(user).to respond_to :track_signin! + expect(user).to respond_to :track_viewed_self! + expect(user).to respond_to :track_team_view! + expect(user).to respond_to :track_protip_view! + expect(user).to respond_to :track_opportunity_view! + end + + describe '#track' do + it 'should use track!' do + name = FFaker::Internet.user_name + user.track!(name) + expect(user.user_events.count).to eq(1) + end + it 'should use track_user_view!' do + user.track_user_view!(user) + expect(user.user_events.count).to eq(1) + end + it 'should use track_signin!' do + user.track_signin! + expect(user.user_events.count).to eq(1) + end + it 'should use track_viewed_self!' do + user.track_viewed_self! + expect(user.user_events.count).to eq(1) + end + it 'should use track_team_view!' do + team=Fabricate(:team) + user.track_team_view!(team) + expect(user.user_events.count).to eq(1) + end + it 'should use track_protip_view!' do + protip=Fabricate(:protip) + user.track_protip_view!(protip) + expect(user.user_events.count).to eq(1) + end + # xit 'should use track_opportunity_view!' do + # opportunity=Fabricate(:opportunity) + # user.track_opportunity_view!(opportunity) + # expect(user.user_events.count).to eq(1) + # end + end +end diff --git a/spec/models/concerns/user_twitter_spec.rb b/spec/models/concerns/user_twitter_spec.rb new file mode 100644 index 00000000..ac366a47 --- /dev/null +++ b/spec/models/concerns/user_twitter_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :clear_twitter! + end + + it 'should clear twitter' do + user.clear_twitter! + expect(user.twitter).to be_nil + expect(user.twitter_token).to be_nil + expect(user.twitter_secret).to be_nil + end +end diff --git a/spec/models/concerns/user_viewer_spec.rb b/spec/models/concerns/user_viewer_spec.rb new file mode 100644 index 00000000..ef7539ba --- /dev/null +++ b/spec/models/concerns/user_viewer_spec.rb @@ -0,0 +1,25 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :viewed_by + expect(user).to respond_to :viewers + expect(user).to respond_to :total_views + end + + it 'tracks when a user views a profile' do + user = Fabricate :user + viewer = Fabricate :user + user.viewed_by(viewer) + expect(user.viewers.first).to eq(viewer) + expect(user.total_views).to eq(1) + end + + it 'tracks when a user views a profile' do + user = Fabricate :user + user.viewed_by(nil) + expect(user.total_views).to eq(1) + end + +end diff --git a/spec/models/concerns/user_visit_spec.rb b/spec/models/concerns/user_visit_spec.rb new file mode 100644 index 00000000..4d68e01e --- /dev/null +++ b/spec/models/concerns/user_visit_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +RSpec.describe User, type: :model do + let(:user) {Fabricate(:user)} + it 'should respond to instance methods' do + expect(user).to respond_to :visited! + expect(user).to respond_to :latest_visits + expect(user).to respond_to :append_latest_visits + expect(user).to respond_to :average_time_between_visits + expect(user).to respond_to :calculate_frequency_of_visits! + expect(user).to respond_to :activity_since_last_visit? + end + +end diff --git a/spec/models/endorsement_spec.rb b/spec/models/endorsement_spec.rb index dea956bb..56a07cee 100644 --- a/spec/models/endorsement_spec.rb +++ b/spec/models/endorsement_spec.rb @@ -1,49 +1,33 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `endorsements` +# Table name: endorsements # -# ### Columns -# -# Name | Type | Attributes -# ------------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`endorsed_user_id`** | `integer` | -# **`endorsing_user_id`** | `integer` | -# **`id`** | `integer` | `not null, primary key` -# **`skill_id`** | `integer` | -# **`specialty`** | `string(255)` | -# **`updated_at`** | `datetime` | -# -# ### Indexes -# -# * `index_endorsements_on_endorsed_user_id`: -# * **`endorsed_user_id`** -# * `index_endorsements_on_endorsing_user_id`: -# * **`endorsing_user_id`** -# * `only_unique_endorsements` (_unique_): -# * **`endorsed_user_id`** -# * **`endorsing_user_id`** -# * **`specialty`** +# id :integer not null, primary key +# endorsed_user_id :integer +# endorsing_user_id :integer +# specialty :string(255) +# created_at :datetime +# updated_at :datetime +# skill_id :integer # require 'spec_helper' -describe Endorsement do +RSpec.describe Endorsement, type: :model, skip: true do it 'requires a specialty' do endorsement = Fabricate.build(:endorsement, specialty: nil) - endorsement.should_not be_valid + expect(endorsement).not_to be_valid end it 'requires an endorsed user' do endorsement = Fabricate.build(:endorsement, endorsed: nil) - endorsement.should_not be_valid + expect(endorsement).not_to be_valid end it 'requires an endorsing user' do endorsement = Fabricate.build(:endorsement, endorser: nil) - endorsement.should_not be_valid + expect(endorsement).not_to be_valid end it 'udates the users updated_at timestamp when they recieve a new endorsement' do @@ -51,29 +35,29 @@ original_updated_at = endorsed.updated_at Fabricate(:user).endorse(endorsed, 'skill') endorsed.reload - endorsed.updated_at.should_not == original_updated_at + expect(endorsed.updated_at).not_to eq(original_updated_at) end describe User do let(:endorser) { Fabricate(:user) } - let(:endorsed) { + let(:endorsed) do user = Fabricate(:user, username: 'somethingelse') endorser.endorse(user, 'ruby') user - } + end it 'saves the specialty' do - endorsed.endorsements.first.specialty.should == 'ruby' + expect(endorsed.endorsements.first.specialty).to eq('ruby') end it 'saves the endorsed' do - endorsed.endorsements.first.endorsed.should == endorsed + expect(endorsed.endorsements.first.endorsed).to eq(endorsed) end it 'saves the endorser' do endorsed.reload - endorsed.endorsements.size.should == 1 - endorsed.endorsements.first.endorser.should == endorser + expect(endorsed.endorsements.size).to eq(1) + expect(endorsed.endorsements.first.endorser).to eq(endorser) end class NotaBadge < BadgeBase @@ -81,7 +65,7 @@ class NotaBadge < BadgeBase it 'should increment counter cache' do endorsed.reload - endorsed.endorsements_count.should == 1 + expect(endorsed.endorsements_count).to eq(1) end end diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index c1152dc0..c63f7c00 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -1,6 +1,5 @@ require 'spec_helper' -describe Event do - +RSpec.describe Event, type: :model do end diff --git a/spec/models/followed_team_spec.rb b/spec/models/followed_team_spec.rb new file mode 100644 index 00000000..877a1564 --- /dev/null +++ b/spec/models/followed_team_spec.rb @@ -0,0 +1,17 @@ +# == Schema Information +# +# Table name: followed_teams +# +# id :integer not null, primary key +# user_id :integer +# team_document_id :string(255) +# created_at :datetime default(2012-03-12 21:01:09 UTC) +# team_id :integer +# + +require 'rails_helper' + +RSpec.describe FollowedTeam, type: :model do + it { is_expected.to belong_to(:team) } + it { is_expected.to belong_to(:user) } +end diff --git a/spec/models/github_assignment_spec.rb b/spec/models/github_assignment_spec.rb deleted file mode 100644 index 84f20960..00000000 --- a/spec/models/github_assignment_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `github_assignments` -# -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`badge_class_name`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`github_username`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`repo_url`** | `string(255)` | -# **`tag`** | `string(255)` | -# **`updated_at`** | `datetime` | -# -# ### Indexes -# -# * `index_assignments_on_repo_url`: -# * **`repo_url`** -# * `index_assignments_on_username_and_badge_class_name` (_unique_): -# * **`github_username`** -# * **`badge_class_name`** -# * `index_assignments_on_username_and_repo_url_and_badge_class_name` (_unique_): -# * **`github_username`** -# * **`repo_url`** -# * **`tag`** -# - -require 'spec_helper' - -describe GithubAssignment do - -end diff --git a/spec/models/github_profile_spec.rb b/spec/models/github_profile_spec.rb deleted file mode 100644 index 00685287..00000000 --- a/spec/models/github_profile_spec.rb +++ /dev/null @@ -1,112 +0,0 @@ -describe GithubProfile, :pending do - let(:languages) { - { - 'C' => 194738, - 'C++' => 105902, - 'Perl' => 2519686 - } - } - ## test we don't create a fact for an empty repo - let(:access_token) { '9432ed76b16796ec034670524d8176b3f5fee9aa' } - let(:client_id) { '974695942065a0e00033' } - let(:client_secret) { '7d49c0deb57b5f6c75e6264ca12d20d6a8ffcc68' } - - it 'should have a timesamp' do - profile = Fabricate(:github_profile) - profile.created_at.should_not be_nil - profile.updated_at.should_not be_nil - end - - def response_body(file) - File.read(File.join(Rails.root, "spec", 'fixtures', 'githubv3', file)) - end - - describe 'facts' do - let (:profile) { - VCR.use_cassette('github_profile_for_mdeiters') do - GithubProfile.for_username('mdeiters') - end - } - - it 'creates facts for original repos' do - profile.facts.should_not be_empty - fact = profile.facts.select { |fact| fact.identity =~ /mdeiters\/semr:mdeiters$/i }.first - - fact.identity.should == 'https://github.com/mdeiters/semr:mdeiters' - fact.owner.should == "github:mdeiters" - fact.name.should == 'semr' - fact.relevant_on.to_date.should == Date.parse('2008-05-08') - fact.url.should == 'https://github.com/mdeiters/semr' - fact.tags.should include('repo') - fact.metadata[:languages].should include("Ruby", "JavaScript") - end - - it 'creates facts for when user signed up' do - profile.facts.should_not be_empty - fact = profile.facts.last - fact.identity.should == 'github:mdeiters' - fact.owner.should == "github:mdeiters" - fact.name.should == 'Joined GitHub' - fact.relevant_on.to_date.should == Date.parse('2008-04-14') - fact.url.should == 'https://github.com/mdeiters' - fact.tags.should include('account-created') - end - end - - describe 'profile not on file' do - let (:profile) { - VCR.use_cassette('github_profile_for_mdeiters') do - GithubProfile.for_username('mdeiters') - end - } - - it 'will indicate stale if older then an 24 hours', pending: 'timezone is incorrect' do - profile.updated_at.should > 1.minute.ago - profile.should_not be_stale - profile.should_receive(:updated_at).and_return(25.hours.ago) - profile.should be_stale - end - - it 'builds a profile if there is none on file' do - profile.name.should == 'Matthew Deiters' - end - - it 'populates followers' do - profile.followers.map { |f| f[:login] }.should include('amanelis') - end - - it 'populates following' do - profile.following.map { |f| f[:login] }.should include('atmos') - end - - it 'populates watched repos' do - profile.watched.map { |w| w[:name] }.should include('rails') - end - - describe 'populates owned repos' do - before do - @repo = GithubRepo.find(profile.repos.first[:id]) - end - - it 'gets a list of repos' do - profile.repos.map { |r| r[:name] }.should include ('semr') - end - - it 'adds languages' do - @repo.language.should == 'Ruby' - end - - it 'adds watchers' do - @repo.followers.first.login.should == 'mdeiters' - end - - it 'adds contributors', pending: 'fragile integration' do - @repo.contributors.first['login'].should == 'mdeiters' - end - - it 'adds forks', pending: 'fragile integration' do - @repo.forks.size.should == 1 - end - end - end -end diff --git a/spec/models/github_repo_spec.rb b/spec/models/github_repo_spec.rb deleted file mode 100644 index 16aee648..00000000 --- a/spec/models/github_repo_spec.rb +++ /dev/null @@ -1,149 +0,0 @@ -describe GithubRepo, :pending do - before :each do - register_fake_paths - - u = Fabricate(:user) - u.admin = true - u.github_token = access_token - u.save - end - - def register_fake_paths - access_token = "9432ed76b16796ec034670524d8176b3f5fee9aa" - client_id = "974695942065a0e00033" - client_secret = "7d49c0deb57b5f6c75e6264ca12d20d6a8ffcc68" - - stub_request(:get, "https://api.github.com/repos/mdeiters/semr/languages?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_languages.js')), content_type: 'application/json; charset=utf-8') - stub_request(:get, "https://api.github.com/repos/mdeiters/semr/forks?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_forks.js')), content_type: 'application/json; charset=utf-8') - stub_request(:get, "https://api.github.com/repos/mdeiters/semr/contributors?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100&anon=false").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_contributors.js')), content_type: 'application/json; charset=utf-8') - stub_request(:get, "https://api.github.com/repos/mdeiters/semr/stargazers?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_watchers.js')), content_type: 'application/json; charset=utf-8') - end - - let(:data) { JSON.parse(File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'user_repo.js'))).with_indifferent_access } - let(:repo) { - GithubRepo.for_owner_and_name('mdeiters', 'semr', nil, data) - } - let(:access_token) { "9432ed76b16796ec034670524d8176b3f5fee9aa" } - let(:client_id) { "974695942065a0e00033" } - let(:client_secret) { "7d49c0deb57b5f6c75e6264ca12d20d6a8ffcc68" } - - describe "contributions" do - it "should filter the repos the user has contributed to" do - user = Fabricate(:user) - org = Fabricate(:github_org) - profile = Fabricate(:github_profile, github_id: user.github_id, orgs: [org]) - - contributed_by_count_repo = Fabricate(:github_repo, owner: {github_id: org.github_id}, contributors: [ - {'github_id' => user.github_id, 'contributions' => 10}, - {'github_id' => nil, 'contributions' => 1000} - ]) - - non_contributed_repo = Fabricate(:github_repo, owner: {github_id: org.github_id}, contributors: [ - {'github_id' => user.github_id, 'contributions' => 5}, - {'github_id' => nil, 'contributions' => 18000} - ]) - - contributed_by_count_repo.significant_contributions?(user.github_id).should == true - non_contributed_repo.significant_contributions?(user.github_id).should == false - end - end - - it 'should have an owner' do - repo.owner.github_id.should == 7330 - repo.owner.login.should == 'mdeiters' - repo.owner.gravatar.should == 'aacb7c97f7452b3ff11f67151469e3b0' - end - - it 'should update repo on second call' do - data = JSON.parse(File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'user_repo.js'))).with_indifferent_access - 2.times do - GithubRepo.for_owner_and_name('mdeiters', 'semr', nil, data) - end - GithubRepo.count.should == 1 - end - - it 'should indicate dominant language' do - repo.dominant_language.should == 'Ruby' - end - - it 'should indicate dominant language percantage' do - repo.dominant_language_percentage.should == 55 - end - - it 'should indicate if contents' do - repo.has_contents?.should == true - end - - it 'should indicate no contents if there are no languages', pending: 'incorrect data' do - stub_request(:get, "https://api.github.com/repos/mdeiters/semr/languages?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_languages_empty.js')), content_type: 'application/json; charset=utf-8') - repo.has_contents?.should == false - end - - it 'should not modify users on refresh' do - original_follower = repo.followers.first - - refreshed_repo = GithubRepo.for_owner_and_name('mdeiters', 'semr', nil, data) - refreshed_follower = refreshed_repo.followers.first - - refreshed_follower.login.should == original_follower.login - refreshed_follower.gravatar.should == original_follower.gravatar - end - - describe 'tagging' do - - it 'contains tags between refreshes' do - modified_repo = GithubRepo.find(repo._id) - modified_repo.add_tag 'a' - modified_repo.add_tag 'b' - modified_repo.save! - - refreshed_repo = GithubRepo.for_owner_and_name('mdeiters', 'semr', nil, data) - refreshed_repo.tags.should include('a', 'b') - end - - it 'should tag dominant language' do - repo.tags.should include("Ruby") - end - - it 'does not duplicate tags on refresh' do - repo.tags.should == GithubRepo.for_owner_and_name('mdeiters', 'semr', nil, data).tags - end - - describe 'tags javascript projects' do - it 'tags jquery if dominant lanugage is js and description to include jquery' do - stub_request(:get, 'https://github.com/mdeiters/semr/raw/master/README').to_return(body: 'empty') - stub_request(:get, "https://api.github.com/repos/mdeiters/semr/languages?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100").to_return(body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_languages_js.js')), content_type: 'application/json; charset=utf-8') - - data[:description] = 'something for jquery' - repo.tags.should include('Ruby') - end - - it 'tags node if dominant lanugage is js and description has nodejs in it' do - pending "Disabled inspecting README because of false positives" - #FakeWeb.register_uri(:get, 'https://github.com/mdeiters/semr/raw/master/README', body: 'empty') - #FakeWeb.register_uri(:get, "https://api.github.com/repos/mdeiters/semr/languages?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100", body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_languages_js.js')), content_type: 'application/json; charset=utf-8') - - data[:description] = 'Node Routing' - repo.tags.should include('Node') - end - - it 'tags node if dominant lanugage is js and readme has node in it' do - pending "Disabled inspecting README because of false positives" - #FakeWeb.register_uri(:get, "https://api.github.com/repos/mdeiters/semr/languages?client_id=#{client_id}&client_secret=#{client_secret}&per_page=100", body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'githubv3', 'repo_languages_js.js')), content_type: 'application/json; charset=utf-8') - #FakeWeb.register_uri(:get, 'https://github.com/mdeiters/semr/raw/master/README', body: 'trying out node') - repo.tags.should include('Node') - end - end - end - - describe 'viewing readme' do - it 'finds the readme for .txt files', functional: true do - repo.readme.should =~ /semr gem uses the oniguruma library/ - end - - it 'should cache readme for repeat calls' do - #FakeWeb.register_uri(:get, 'https://github.com/mdeiters/semr/raw/master/README', [body: 'test readme']) - repo.readme.should == repo.readme - end - end -end diff --git a/spec/models/github_spec.rb b/spec/models/github_spec.rb deleted file mode 100644 index 319bba00..00000000 --- a/spec/models/github_spec.rb +++ /dev/null @@ -1,58 +0,0 @@ -describe Github, :pending, functional: true do - let(:github) { Github.new } - - it 'can get profile' do - github.profile('mdeiters')[:name].should == 'Matthew Deiters' - end - - it 'can get orgs' do - github.orgs_for('defunkt', 2.years.ago).first['login'].should == 'github' - end - - it 'can get followers' do - github.followers_for('mdeiters').map { |follower| follower['login'] }.should include('alexrothenberg') - end - - it 'gets all followers if multiple pages' do - total_followers = github.followers_for('obie').size - total_followers.should > 200 - end - - it 'gets all repos for user' do - github.repos_for('mdeiters').map { |follower| follower['name'] }.should include('travis-ci') - end - - it 'gets all watched repos for user' do - github.watched_repos_for('mdeiters').map { |repo| repo[:name] }.should include('readraptor') - end - - it 'gets watchers of a repo' do - github.repo_watchers('mdeiters', 'semr', 10.years.ago).first[:login].should == 'pius' - end - - it 'gets languages of a repo' do - github.repo_languages('mdeiters', 'semr', 2.years.ago).should include("Ruby", "JavaScript") - end - - it 'gets contributors of a repo' do - github.repo_contributors('mdeiters', 'healthy', 2.years.ago).collect { |r| r[:login] }.should include("flyingmachine") - end - - it 'recovers if getting contributors errors out' do - lambda { github.repo_contributors('dmtrs', 'EJNestedTreeActions', 2.years.ago) }.should_not raise_error - end - - it 'gets all forks of a repo' do - github.repo_forks('mdeiters', 'semr', 2.years.ago).collect { |r| r[:owner][:login] }.should include('derfred') - end - - it 'should scope requests by user' do - daniel = Github.new(daniel_h = '697b68755f419b475299873164e3c60fca21ae58') - daniel.profile['login'].should == 'flyingmachine' - end - - it 'should scope requests by user but allow override' do - daniel = Github.new(daniel_h = '697b68755f419b475299873164e3c60fca21ae58') - daniel.profile['login'].should_not == daniel.profile('bguthrie')['login'] - end -end diff --git a/spec/models/highlight_spec.rb b/spec/models/highlight_spec.rb deleted file mode 100644 index 6537531c..00000000 --- a/spec/models/highlight_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -# ## Schema Information -# Schema version: 20131205021701 -# -# Table name: `highlights` -# -# ### Columns -# -# Name | Type | Attributes -# ------------------ | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`description`** | `text` | -# **`featured`** | `boolean` | `default(FALSE)` -# **`id`** | `integer` | `not null, primary key` -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_highlights_on_featured`: -# * **`featured`** -# * `index_highlights_on_user_id`: -# * **`user_id`** -# - -require 'spec_helper' - -describe Highlight do - - -end diff --git a/spec/models/lanyrd_spec.rb b/spec/models/lanyrd_spec.rb index 0f750d1e..a6a73c6c 100644 --- a/spec/models/lanyrd_spec.rb +++ b/spec/models/lanyrd_spec.rb @@ -1,25 +1,29 @@ require 'spec_helper' -describe Lanyrd, functional: true, pending: 'expected data has changed' do +RSpec.describe Lanyrd, type: :model, functional: true do it 'should pull events for user' do - lanyrd = Lanyrd.new('mdeiters') - lanyrd.facts.size.should >= 3 + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Lanyrd') do + lanyrd = Lanyrd.new('mdeiters') + expect(lanyrd.facts.size).to be >= 3 - event = lanyrd.facts.first + event = lanyrd.facts.first - event.identity.should == '/2011/speakerconf-rome/:mdeiters' - event.owner.should == 'lanyrd:mdeiters' - event.name.should == "Speaker Conf" - event.relevant_on.to_date.should == Date.parse('2011-09-11') - event.url.should == 'http://lanyrd.com/2011/speakerconf-rome/' - event.tags.should include('event', 'Software', 'Technology') + expect(event.identity).to eq('/2011/speakerconf-rome/:mdeiters') + expect(event.owner).to eq('lanyrd:mdeiters') + expect(event.name).to eq('speakerconf Rome 2012') + expect(event.relevant_on.to_date).to eq(Date.parse('2011-09-11')) + expect(event.url).to eq('http://lanyrd.com/2011/speakerconf-rome/') + expect(event.tags).to include('event', 'Software', 'Technology') + end end - pending 'should pull future events' - + skip 'should pull future events' it 'should return no events for a user that does not exist' do - deck = Lanyrd.new('asfjkdsfkjldsafdskljfdsdsfdsafas') - deck.facts.should be_empty + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Lanyrd') do + deck = Lanyrd.new('asfjkdsfkjldsafdskljfdsdsfdsafas') + expect(deck.facts).to be_empty + end end - end diff --git a/spec/models/lifecycle_marketing_spec.rb b/spec/models/lifecycle_marketing_spec.rb index 53a92703..68c71512 100644 --- a/spec/models/lifecycle_marketing_spec.rb +++ b/spec/models/lifecycle_marketing_spec.rb @@ -1,60 +1,60 @@ require 'spec_helper' -describe LifecycleMarketing do +RSpec.describe LifecycleMarketing, type: :model, skip: true do describe 'valid_newsletter_users' do it 'should only find users with newsletter enabled' do receive_newsletter = Fabricate(:user, receive_newsletter: true) does_not_receive_newsletter = Fabricate(:user, receive_newsletter: false) users_to_email = LifecycleMarketing.valid_newsletter_users.all - users_to_email.should include(receive_newsletter) - users_to_email.should_not include(does_not_receive_newsletter) + expect(users_to_email).to include(receive_newsletter) + expect(users_to_email).not_to include(does_not_receive_newsletter) end it 'should only find users that have not recieved an email in a week' do emailed_last_week = Fabricate(:user, receive_newsletter: true, last_email_sent: 8.days.ago) just_emailed = Fabricate(:user, receive_newsletter: true, last_email_sent: 1.day.ago) users_to_email = LifecycleMarketing.valid_newsletter_users.all - users_to_email.should include(emailed_last_week) - users_to_email.should_not include(just_emailed) + expect(users_to_email).to include(emailed_last_week) + expect(users_to_email).not_to include(just_emailed) end end describe 'reminding user to invite team members' do it 'should only if they are on a team' do - user_on_team = Fabricate(:user, receive_newsletter: true, team_document_id: Fabricate(:team).id.to_s) + user_on_team = Fabricate(:user, receive_newsletter: true, team_id: Fabricate(:team).id.to_s) LifecycleMarketing.send_reminders_to_invite_team_members - ActionMailer::Base.deliveries.size.should == 1 + expect(ActionMailer::Base.deliveries.size).to eq(1) end it 'should not send multiple reminders' do - user_on_team = Fabricate(:user, receive_newsletter: true, team_document_id: Fabricate(:team).id.to_s) + user_on_team = Fabricate(:user, receive_newsletter: true, team_id: Fabricate(:team).id.to_s) LifecycleMarketing.send_reminders_to_invite_team_members user_on_team.update_attributes!(last_email_sent: 2.weeks.ago) LifecycleMarketing.send_reminders_to_invite_team_members - ActionMailer::Base.deliveries.size.should == 1 + expect(ActionMailer::Base.deliveries.size).to eq(1) end it 'should not if they are not on a team' do - user_on_team = Fabricate(:user, receive_newsletter: true, team_document_id: nil) + user_on_team = Fabricate(:user, receive_newsletter: true, team_id: nil) LifecycleMarketing.send_reminders_to_invite_team_members - ActionMailer::Base.deliveries.should be_empty + expect(ActionMailer::Base.deliveries).to be_empty end it 'should only send email to a team once a day' do team_id = Fabricate(:team).id.to_s - member1 = Fabricate(:user, email: 'member1@test.com', receive_newsletter: true, team_document_id: team_id) - member2 = Fabricate(:user, email: 'member2@test.com', receive_newsletter: true, team_document_id: team_id) + member1 = Fabricate(:user, email: 'member1@test.com', receive_newsletter: true, team_id: team_id) + member2 = Fabricate(:user, email: 'member2@test.com', receive_newsletter: true, team_id: team_id) LifecycleMarketing.send_reminders_to_invite_team_members - ActionMailer::Base.deliveries.size.should == 1 - ActionMailer::Base.deliveries.last.to.should include(member1.email) + expect(ActionMailer::Base.deliveries.size).to eq(1) + expect(ActionMailer::Base.deliveries.last.to).to include(member1.email) end end describe 'reminding users when they get new achievements' do it 'should send only one email at a time' do team_id = Fabricate(:team).id.to_s - user = Fabricate(:user, email: 'member2@test.com', receive_newsletter: true, team_document_id: team_id) + user = Fabricate(:user, email: 'member2@test.com', receive_newsletter: true, team_id: team_id) badge1 = Fabricate(:badge, user: user, badge_class_name: Badges.all.first.to_s, created_at: Time.now) badge2 = Fabricate(:badge, user: user, badge_class_name: Badges.all.second.to_s, created_at: Time.now + 1.second) badge3 = Fabricate(:badge, user: user, badge_class_name: Badges.all.third.to_s, created_at: Time.now + 2.seconds) @@ -62,21 +62,21 @@ LifecycleMarketing.send_new_achievement_reminders LifecycleMarketing.send_new_achievement_reminders - ActionMailer::Base.deliveries.size.should == 1 - ActionMailer::Base.deliveries.last.to.should include(user.email) + expect(ActionMailer::Base.deliveries.size).to eq(1) + expect(ActionMailer::Base.deliveries.last.to).to include(user.email) end it 'should not send email if user visited since earning achievements' do team_id = Fabricate(:team).id.to_s - user = Fabricate(:user, email: 'member2@test.com', receive_newsletter: true, team_document_id: team_id) + user = Fabricate(:user, email: 'member2@test.com', receive_newsletter: true, team_id: team_id) badge1 = Fabricate(:badge, user: user, badge_class_name: Badges.all.first.to_s, created_at: Time.now) badge2 = Fabricate(:badge, user: user, badge_class_name: Badges.all.second.to_s, created_at: Time.now + 1.second) badge3 = Fabricate(:badge, user: user, badge_class_name: Badges.all.third.to_s, created_at: Time.now + 2.seconds) user.update_attributes last_request_at: Time.now + 1.hour LifecycleMarketing.send_new_achievement_reminders - ActionMailer::Base.deliveries.size.should == 0 + expect(ActionMailer::Base.deliveries.size).to eq(0) end end -end \ No newline at end of file +end diff --git a/spec/models/like_spec.rb b/spec/models/like_spec.rb index 85edc641..85d3de76 100644 --- a/spec/models/like_spec.rb +++ b/spec/models/like_spec.rb @@ -1,32 +1,20 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `likes` +# Table name: likes # -# ### Columns -# -# Name | Type | Attributes -# -------------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`ip_address`** | `string(255)` | -# **`likable_id`** | `integer` | -# **`likable_type`** | `string(255)` | -# **`tracking_code`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# **`value`** | `integer` | -# -# ### Indexes -# -# * `index_likes_on_user_id` (_unique_): -# * **`likable_id`** -# * **`likable_type`** -# * **`user_id`** +# id :integer not null, primary key +# value :integer +# tracking_code :string(255) +# user_id :integer +# likable_id :integer +# likable_type :string(255) +# created_at :datetime +# updated_at :datetime +# ip_address :string(255) # require 'spec_helper' -describe Like do - pending "add some examples to (or delete) #{__FILE__}" +RSpec.describe Like, type: :model do + skip "add some examples to (or delete) #{__FILE__}" end diff --git a/spec/models/link_spec.rb b/spec/models/link_spec.rb deleted file mode 100644 index 9d08bb05..00000000 --- a/spec/models/link_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'spec_helper' - -describe Link do - let(:url) { "http://test.google.com" } - before :each do - #FakeWeb.register_uri(:get, 'http://test.google.com/', body: 'OK') - end - - it 'retrieves popular links with score higher then 2 and has at least 2 or mor users' do - enough_users = Link.create!(score: 8, user_ids: [1, 2]) - not_enought_user = Link.create!(score: 3, user_ids: [1]) - Link.popular.all.collect.should include(enough_users) - Link.popular.all.collect.should_not include(not_enought_user) - end - - describe 'featuring' do - before :each do - @earliest = Link.create!(featured_on: 1.day.ago) - @latest = Link.create!(featured_on: 1.hour.ago) - @not_featured = Link.create!() - end - - it 'finds items featured by featured date' do - Link.featured.first.should == @latest - Link.featured.last.should == @earliest - Link.featured.should_not include(@not_featured) - end - - it 'finds items not featured' do - Link.not_featured.should_not include(@latest) - Link.not_featured.should_not include(@earliest) - Link.not_featured.should include(@not_featured) - end - end - - it 'expands twitter urls', functional: true do - Link.expand_url('http://t.co/eWplTxA').should == 'https://github.com/RailsApps/rails3-application-templates' - end - - it 'expands bitly urls', functional: true do - Link.expand_url('http://bit.ly/pPzKX5').should == 'http://lokka.org/if-you-forget-a-password' - end - - it 'should find links for a user' do - the_link = Link.create!(url: url, user_ids: [123]) - Link.for_user(123).should include(the_link) - Link.for_user(444).should_not include(the_link) - end -end diff --git a/spec/models/linked_in_stream_spec.rb b/spec/models/linked_in_stream_spec.rb index c6afba23..a05862c5 100644 --- a/spec/models/linked_in_stream_spec.rb +++ b/spec/models/linked_in_stream_spec.rb @@ -1,26 +1,25 @@ require 'spec_helper' -describe LinkedInStream, functional: true, pending: 'expected data has changed' do +RSpec.describe LinkedInStream, type: :model, functional: true, pending: 'expected data has changed' do let(:username) { '3869d2ac-5293-4dfb-a9c7-926d84f7070c::01db0bce-cd44-4cbd-ac0e-24f3766a3083' } it 'should create events for work experiences and educataions' do linkedin = LinkedInStream.new(username) fact = linkedin.facts.first - fact.identity.should == '205050716' - fact.owner.should == "linkedin:#{username}" - fact.name.should == "Software Developer at Highgroove" - fact.url.should == 'http://www.linkedin.com/in/srbiv' - fact.tags.should include("linkedin", "job") - fact.relevant_on.to_date.should == Date.parse("2011-08-01") - + expect(fact.identity).to eq('205050716') + expect(fact.owner).to eq("linkedin:#{username}") + expect(fact.name).to eq('Software Developer at Highgroove') + expect(fact.url).to eq('http://www.linkedin.com/in/srbiv') + expect(fact.tags).to include('linkedin', 'job') + expect(fact.relevant_on.to_date).to eq(Date.parse('2011-08-01')) fact = linkedin.facts.last - fact.identity.should == '15080101' - fact.owner.should == "linkedin:#{username}" - fact.name.should == "Studied Management at Georgia Institute of Technology" - fact.url.should == 'http://www.linkedin.com/in/srbiv' - fact.tags.should include("linkedin", "education") - fact.relevant_on.to_date.should == Date.parse("1998/01/01") + expect(fact.identity).to eq('15080101') + expect(fact.owner).to eq("linkedin:#{username}") + expect(fact.name).to eq('Studied Management at Georgia Institute of Technology') + expect(fact.url).to eq('http://www.linkedin.com/in/srbiv') + expect(fact.tags).to include('linkedin', 'education') + expect(fact.relevant_on.to_date).to eq(Date.parse('1998/01/01')) end end diff --git a/spec/models/network_protip_spec.rb b/spec/models/network_protip_spec.rb new file mode 100644 index 00000000..d6559991 --- /dev/null +++ b/spec/models/network_protip_spec.rb @@ -0,0 +1,17 @@ +# == Schema Information +# +# Table name: network_protips +# +# id :integer not null, primary key +# network_id :integer +# protip_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'rails_helper' + +RSpec.describe NetworkProtip, :type => :model do + it { is_expected.to belong_to :network} + it { is_expected.to belong_to :protip} +end diff --git a/spec/models/network_spec.rb b/spec/models/network_spec.rb new file mode 100644 index 00000000..c5bc9c15 --- /dev/null +++ b/spec/models/network_spec.rb @@ -0,0 +1,21 @@ +# == Schema Information +# +# Table name: networks +# +# id :integer not null, primary key +# name :string(255) +# slug :string(255) +# created_at :datetime +# updated_at :datetime +# protips_count_cache :integer default(0) +# featured :boolean default(FALSE) +# parent_id :integer +# network_tags :citext is an Array +# + +require 'rails_helper' +require 'closure_tree/test/matcher' + +RSpec.describe Network, type: :model do + it { is_expected.to be_a_closure_tree.ordered(:name) } +end diff --git a/spec/models/opportunity_spec.rb b/spec/models/opportunity_spec.rb index 535ff448..17d4bb84 100644 --- a/spec/models/opportunity_spec.rb +++ b/spec/models/opportunity_spec.rb @@ -1,104 +1,127 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `opportunities` +# Table name: opportunities # -# ### Columns -# -# Name | Type | Attributes -# ----------------------- | ------------------ | --------------------------- -# **`apply`** | `boolean` | `default(FALSE)` -# **`cached_tags`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`deleted`** | `boolean` | `default(FALSE)` -# **`deleted_at`** | `datetime` | -# **`description`** | `text` | -# **`designation`** | `string(255)` | -# **`expires_at`** | `datetime` | `default(1970-01-01 00:00:00 UTC)` -# **`id`** | `integer` | `not null, primary key` -# **`link`** | `string(255)` | -# **`location`** | `string(255)` | -# **`location_city`** | `string(255)` | -# **`name`** | `string(255)` | -# **`opportunity_type`** | `string(255)` | `default("full-time")` -# **`options`** | `float` | -# **`public_id`** | `string(255)` | -# **`salary`** | `integer` | -# **`team_document_id`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# name :string(255) +# description :text +# designation :string(255) +# location :string(255) +# cached_tags :string(255) +# link :string(255) +# salary :integer +# options :float +# deleted :boolean default(FALSE) +# deleted_at :datetime +# created_at :datetime +# updated_at :datetime +# expires_at :datetime default(1970-01-01 00:00:00 UTC) +# opportunity_type :string(255) default("full-time") +# location_city :string(255) +# apply :boolean default(FALSE) +# public_id :string(255) +# team_id :integer +# remote :boolean # require 'spec_helper' -describe Opportunity do - #before(:each) do - #FakeWeb.register_uri(:get, 'http://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco%2C+CA&language=en&sensor=false', body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'google_maps.json'))) - #end +RSpec.describe Opportunity, type: :model do - describe "creating and validating a new opportunity" do - it "should create a valid opportunity" do - tags = ["rails", "sinatra", "JQuery", "Clean, beautiful code"] - opportunity = Fabricate(:opportunity, tags: tags) + it 'should create a valid opportunity' do + VCR.use_cassette('Opportunity') do + tags = ['rails', 'sinatra', 'JQuery'] + opportunity = Fabricate(:opportunity, tag_list: tags) opportunity.save! - opportunity.name.should_not be_nil - opportunity.description.should_not be_nil - opportunity.team_document_id.should_not be_nil - opportunity.tags.size.should == tags.size - opportunity.cached_tags.should == tags.join(",") + expect(opportunity.name).not_to be_nil + expect(opportunity.description).not_to be_nil + expect(opportunity.team_id).not_to be_nil + expect(opportunity.tags.size).to eq(tags.size) + expect(opportunity.cached_tags).to eq(tags.map(&:downcase).join(',')) end + end - it 'can create opportunity with no tags without error' do - pending "need to upgrade to latest rocket tag" - lambda { Fabricate(:opportunity, tags: "") }.should_not raise_error + describe 'destroying opportunity' do + it 'should not destroy the opportunity and only lazy delete it' do + VCR.use_cassette('Opportunity') do + opportunity = Fabricate(:opportunity) + opportunity.save + expect(opportunity.deleted).to be_falsey + opportunity.destroy + expect(opportunity).to be_valid + expect(opportunity.deleted).to be_truthy + expect(opportunity.deleted_at).not_to be_nil + end end end - describe "destroying opportunity" do - it "should not destroy the opportunity and only lazy delete it" do - opportunity = Fabricate(:opportunity) - opportunity.save - opportunity.deleted.should be_false - opportunity.destroy - opportunity.should be_valid - opportunity.deleted.should be_true - opportunity.deleted_at.should_not be_nil + describe 'apply for job' do + it 'should create a valid application' do + VCR.use_cassette('Opportunity') do + job = Fabricate(:opportunity) + job.salary = 25_000 + user = Fabricate(:user) + job.apply_for(user) + expect(job.applicants.size).to eq(1) + expect(job.applicants.first).to eq(user) + end end - end - describe "parse job salary" do - it "should parse salaries correctly" do - salary = Opportunity.parse_salary("100000") - salary.should == 100000 - salary = Opportunity.parse_salary("100") - salary.should == 100000 - salary = Opportunity.parse_salary("100k") - salary.should == 100000 - salary = Opportunity.parse_salary("100 K") - salary.should == 100000 + it 'should not allow multiple applications' do + VCR.use_cassette('Opportunity') do + job = Fabricate(:opportunity) + user = Fabricate(:user) + expect(user.already_applied_for?(job)).to be_falsey + expect(job.has_application_from?(user)).to be_falsey + job.apply_for(user) + user.apply_to(job) + expect(job.applicants.size).to eq(1) + expect(job.applicants.first).to eq(user) + expect(user.already_applied_for?(job)).to be_truthy + expect(job.has_application_from?(user)).to be_truthy + end end end - describe "apply for job" do - it "should create a valid application" do - job = Fabricate(:job) - job.salary = 25000 - user = Fabricate(:user) - job.apply_for(user) - job.applicants.size.should == 1 - job.applicants.first.should == user + describe 'changing job location' do + it 'should set location_city' do + VCR.use_cassette('Opportunity') do + job = Fabricate(:opportunity) + expect(job.location_city.split('|')).to match_array(['San Francisco']) + job.location = 'Amsterdam|San Francisco' + job.save + expect(job.location_city.split('|')).to match_array(['Amsterdam', 'San Francisco']) + end + end + + it 'should not add anywhere to location_city' do + VCR.use_cassette('Opportunity') do + job = Fabricate(:opportunity) + job.location = 'Amsterdam|San Francisco|anywhere' + job.save + expect(job.location_city.split('|')).to match_array(['Amsterdam', 'San Francisco']) + end + end + + it 'should update location_city with changes' do + VCR.use_cassette('Opportunity') do + job = Fabricate(:opportunity) + job.location = 'Amsterdam|San Francisco' + job.save + expect(job.location_city.split('|')).to match_array(['Amsterdam', 'San Francisco']) + job.location = 'Amsterdam' + job.save + expect(job.location_city).to eq('Amsterdam') + end end - it "should not allow multiple applications" do - job = Fabricate(:job) - user = Fabricate(:user) - user.already_applied_for?(job).should be_false - job.has_application_from?(user).should be_false - job.apply_for(user) - user.apply_to(job) - job.applicants.size.should == 1 - job.applicants.first.should == user - user.already_applied_for?(job).should be_true - job.has_application_from?(user).should be_true + it 'should not add existing locations to the team' do + VCR.use_cassette('Opportunity') do + job = Fabricate(:opportunity) + job.location = 'San Francisco' + job.save + expect(job.team.locations.count).to eq(1) + end end end end diff --git a/spec/models/plan_spec.rb b/spec/models/plan_spec.rb index 1f945ed3..7d5d7ad9 100644 --- a/spec/models/plan_spec.rb +++ b/spec/models/plan_spec.rb @@ -1,25 +1,24 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `plans` +# Table name: plans # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`amount`** | `integer` | -# **`analytics`** | `boolean` | `default(FALSE)` -# **`created_at`** | `datetime` | -# **`currency`** | `string(255)` | -# **`id`** | `integer` | `not null, primary key` -# **`interval`** | `string(255)` | -# **`name`** | `string(255)` | -# **`public_id`** | `string(255)` | -# **`updated_at`** | `datetime` | +# id :integer not null, primary key +# amount :integer +# interval :string(255) default("month") +# name :string(255) +# currency :string(255) default("usd") +# public_id :string(255) +# created_at :datetime +# updated_at :datetime +# analytics :boolean default(FALSE) +# interval_in_seconds :integer default(2592000) # require 'spec_helper' -describe Plan do - pending "add some examples to (or delete) #{__FILE__}" +RSpec.describe Plan, type: :model do + it { is_expected.to have_many(:subscriptions) } + it { is_expected.to validate_presence_of(:amount) } + it { is_expected.to validate_presence_of(:name) } + it { is_expected.to validate_presence_of(:currency) } end diff --git a/spec/models/protip/score_spec.rb b/spec/models/protip/score_spec.rb new file mode 100644 index 00000000..70bcee07 --- /dev/null +++ b/spec/models/protip/score_spec.rb @@ -0,0 +1,8 @@ +RSpec.describe 'Protip::Score' do + let(:protip) { Fabricate(:protip) } + + it 'should have a score of 75 by default' do + # expect(protip.score). + end + +end diff --git a/spec/models/protip_link_spec.rb b/spec/models/protip_link_spec.rb index a1966f62..a348d120 100644 --- a/spec/models/protip_link_spec.rb +++ b/spec/models/protip_link_spec.rb @@ -1,23 +1,18 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `protip_links` +# Table name: protip_links # -# ### Columns -# -# Name | Type | Attributes -# ----------------- | ------------------ | --------------------------- -# **`created_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`identifier`** | `string(255)` | -# **`kind`** | `string(255)` | -# **`protip_id`** | `integer` | -# **`updated_at`** | `datetime` | -# **`url`** | `string(255)` | +# id :integer not null, primary key +# identifier :string(255) +# url :string(255) +# protip_id :integer +# created_at :datetime +# updated_at :datetime +# kind :string(255) # require 'spec_helper' -describe ProtipLink do - pending "add some examples to (or delete) #{__FILE__}" +RSpec.describe ProtipLink, type: :model do + skip "add some examples to (or delete) #{__FILE__}" end diff --git a/spec/models/protip_spec.rb b/spec/models/protip_spec.rb index 70453373..d46fbe6c 100644 --- a/spec/models/protip_spec.rb +++ b/spec/models/protip_spec.rb @@ -1,40 +1,37 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `protips` +# Table name: protips # -# ### Columns -# -# Name | Type | Attributes -# -------------------------- | ------------------ | --------------------------- -# **`body`** | `text` | -# **`boost_factor`** | `float` | `default(1.0)` -# **`created_at`** | `datetime` | -# **`created_by`** | `string(255)` | `default("self")` -# **`featured`** | `boolean` | `default(FALSE)` -# **`featured_at`** | `datetime` | -# **`id`** | `integer` | `not null, primary key` -# **`inappropriate`** | `integer` | `default(0)` -# **`kind`** | `string(255)` | -# **`public_id`** | `string(255)` | -# **`score`** | `float` | -# **`title`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`upvotes_value_cache`** | `integer` | -# **`user_id`** | `integer` | -# -# ### Indexes -# -# * `index_protips_on_public_id`: -# * **`public_id`** -# * `index_protips_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# public_id :string(255) +# kind :string(255) +# title :string(255) +# body :text +# user_id :integer +# created_at :datetime +# updated_at :datetime +# score :float +# created_by :string(255) default("self") +# featured :boolean default(FALSE) +# featured_at :datetime +# upvotes_value_cache :integer default(0), not null +# boost_factor :float default(1.0) +# inappropriate :integer default(0) +# likes_count :integer default(0) +# slug :string(255) not null +# user_name :string(255) +# user_email :string(255) +# user_agent :string(255) +# user_ip :inet +# spam_reports_count :integer default(0) +# state :string(255) default("active") # -describe Protip do +require 'vcr_helper' - describe 'indexing linked content' do +RSpec.describe Protip, type: :model do + describe 'indexing linked content' do it 'indexes page' end @@ -43,42 +40,42 @@ user = Fabricate(:user) protip = Fabricate(:protip, user: user) protip.save! - protip.title.should_not be_nil - protip.body.should_not be_nil - protip.tags.count.should == 3 - protip.topics =~ ["Javascript", "CoffeeScript"] + expect(protip.title).not_to be_nil + expect(protip.body).not_to be_nil + expect(protip.tags.count).to eq(3) + protip.topics =~ %w(Javascript CoffeeScript) protip.users =~ [user.username] - protip.public_id.should have(6).characters - protip.should be_article + expect(protip.public_id.size).to eq(6) + expect(protip).to be_article end end describe 'creating and validating link protips' do it 'should create a valid link protip' do - title = "A link" - link = "http://www.ruby-doc.org/core/classes/Object.html#M001057" + title = 'A link' + link = 'http://www.ruby-doc.org/core/classes/Object.html#M001057' protip = Fabricate(:protip, body: link, title: title, user: Fabricate(:user)) protip.save! - protip.title.should == title - protip.body.should_not be_nil - protip.should be_link - protip.should be_only_link - protip.images.count.should == 0 - protip.links.count.should == 1 - protip.links.first.should == link + expect(protip.title).to eq(title) + expect(protip.body).not_to be_nil + expect(protip).to be_link + expect(protip).to be_only_link + expect(protip.images.count).to eq(0) + expect(protip.links.count).to eq(1) + expect(protip.links.first).to eq(link) protip.protip_links.count == 1 end it 'should indicate an image protip as not being treated as link' do - link = ''; - protip = Fabricate(:protip, body: link, title: "not a link", user: Fabricate(:user)) - protip.should_not be_link - protip.should_not be_only_link - protip.images.count.should == 1 - protip.has_featured_image?.should == true - protip.links.count.should == 1 - protip.should have(1).protip_links - protip.protip_links.first.kind.to_sym.should == :jpg + link = '' + protip = Fabricate(:protip, body: link, title: 'not a link', user: Fabricate(:user)) + expect(protip).not_to be_link + expect(protip).not_to be_only_link + expect(protip.images.count).to eq(1) + expect(protip.has_featured_image?).to eq(true) + expect(protip.links.count).to eq(1) + expect(protip.protip_links.size).to eq(1) + expect(protip.protip_links.first.kind.to_sym).to eq(:jpg) end end @@ -89,123 +86,131 @@ it 'is searchable by title' do protip = Fabricate(:protip, body: 'something to ignore', title: "look at this content #{r = rand(100)}", user: Fabricate(:user)) - Protip.search('this content').results.first.title.should == protip.title + expect(Protip.search('this content').results.first.title).to eq(protip.title) end it 'should be an and query' do protip1 = Fabricate(:protip, body: 'thing one', title: "content #{r = rand(100)}", user: Fabricate(:user)) protip1 = Fabricate(:protip, body: 'thing two', title: "content #{r = rand(100)}", user: Fabricate(:user)) - Protip.search('one two').results.size.should == 0 + expect(Protip.search('one two').results.size).to eq(0) end it 'is not searchable if deleted' do protip = Fabricate(:protip, title: "I don't exist'", user: Fabricate(:user)) - Protip.search("I don't exist").results.first.title.should == protip.title + expect(Protip.search("I don't exist").results.first.title).to eq(protip.title) protip.destroy - Protip.search("I don't exist").results.count.should == 0 + expect(Protip.search("I don't exist").results.count).to eq(0) end it 'is reindexed if username or team change' do - team = Fabricate(:team, name: "first-team") - user = Fabricate(:user, username: "initial-username") - team.add_user(user) - protip = Fabricate(:protip, body: 'protip by user on team', title: "content #{r = rand(100)}", user: user) + pending "Not implemented yet" + team = Fabricate(:team, name: 'first-team') + user = Fabricate(:user, username: 'initial-username') + team.add_member(user) + protip = Fabricate(:protip, body: 'protip by user on team', title: "content #{rand(100)}", user: user) user.reload - Protip.search("team.name:first-team").results.first.title.should == protip.title - team2 = Fabricate(:team, name: "second-team") - team.remove_user(user) + expect(Protip.search('team.name:first-team').results.first.title).to eq(protip.title) + team2 = Fabricate(:team, name: 'second-team') + team.remove_member(user) user.reload - team2.add_user(user) + team2.add_member(user) user.reload - Protip.search("team.name:first-team").results.count.should == 0 - Protip.search("team.name:second-team").results.first.title.should == protip.title - Protip.search("author:#{user.username}").results.first.title.should == protip.title - user.username = "second-username" + expect(Protip.search('team.name:first-team').results.count).to eq(0) + expect(Protip.search('team.name:second-team').results.first.title).to eq(protip.title) + expect(Protip.search("author:#{user.username}").results.first.title).to eq(protip.title) + user.username = 'second-username' user.save! - Protip.search("author:initial-username").results.count.should == 0 - Protip.search("author:#{user.username}").results.first.title.should == protip.title - user.github = "something" - user.save.should_not_receive(:refresh_index) + expect(Protip.search('author:initial-username').results.count).to eq(0) + expect(Protip.search("author:#{user.username}").results.first.title).to eq(protip.title) + user.github = 'something' + expect(user.save).not_to receive(:refresh_index) end end describe 'tagging protip' do it 'should sanitize tags into normalized form' do - protip = Fabricate(:protip, topics: ["Javascript", "CoffeeScript"], user: Fabricate(:user)) + protip = Fabricate(:protip, topic_list: %w(Javascript CoffeeScript), user: Fabricate(:user)) protip.save! - protip.topics.should =~ ["javascript", "coffeescript"] - protip.topics.count.should == 2 + expect(protip.topic_list).to match_array(%w(javascript coffeescript)) + expect(protip.topics.count).to eq(2) end it 'should sanitize empty tag' do - protip = Fabricate(:protip, topics: "Javascript, ", user: Fabricate(:user)) + protip = Fabricate(:protip, topic_list: 'Javascript, ', user: Fabricate(:user)) protip.save! - protip.topics.should =~ ["javascript"] - protip.topics.count.should == 1 + expect(protip.topic_list).to match_array(['javascript']) + expect(protip.topics.count).to eq(1) end it 'should remove duplicate tags' do - protip = Fabricate(:protip, topics: ["github", "github", "Github", "GitHub"], user: Fabricate(:user)) + protip = Fabricate(:protip, topic_list: %w(github github Github GitHub), user: Fabricate(:user)) protip.save! - protip.topics.should == ["github"] - protip.topics.count.should == 1 + expect(protip.topic_list).to eq(['github']) + expect(protip.topics.count).to eq(1) end - it 'should accept tags separated by spaces only' do - protip = Fabricate(:protip, topics: "ruby python heroku", user: Fabricate(:user)) + it 'should accept tags separated by commas only' do + protip = Fabricate(:protip, topic_list: 'ruby, python, heroku', user: Fabricate(:user)) protip.save! - protip.topics.should == ["ruby", "python", "heroku"] - protip.topics.count.should == 3 + expect(protip.topic_list).to eq(%w(ruby python heroku)) + expect(protip.topics.count).to eq(3) + end + + it '#topic_ids should return ids of topics only' do + protip = Fabricate(:protip, topic_list: 'ruby, python', user: Fabricate.build(:user)) + ruby_id = ActsAsTaggableOn::Tag.find_by_name("ruby").id + python_id = ActsAsTaggableOn::Tag.find_by_name("python").id + expect(protip.topic_ids).to match_array([ruby_id, python_id]) end end describe 'linking and featuring an image' do it 'should indicate when the protip is only a link' do protip = Fabricate(:protip, body: 'http://www.google.com', user: Fabricate(:user)) - protip.should be_link + expect(protip).to be_link protip = Fabricate(:protip, body: '', user: Fabricate(:user)) - protip.should_not be_only_link + expect(protip).not_to be_only_link end it 'should indicate when the protip is only a link if it is followed by little content' do protip = Fabricate(:protip, body: 'http://www.google.com go check it out!', user: Fabricate(:user)) - protip.should be_only_link + expect(protip).to be_only_link end it 'should indicate when the protip starts with an image' do protip = Fabricate(:protip, body: '', user: Fabricate(:user)) - protip.has_featured_image?.should == true + expect(protip.has_featured_image?).to eq(true) end it 'should indicate when the protip starts with an image' do protip = Fabricate(:protip, body: '', user: Fabricate(:user)) - protip.featured_image.should == 'https://coderwall-assets-0.s3.amazonaws.com/development/picture/file/51/photo.JPG' + expect(protip.featured_image).to eq('https://coderwall-assets-0.s3.amazonaws.com/development/picture/file/51/photo.JPG') end it 'should have a featured_image when the protip has some content before image' do protip = Fabricate(:protip, body: 'some text here ', user: Fabricate(:user)) - protip.featured_image.should_not be_nil + expect(protip.featured_image).not_to be_nil end end describe 'protip wrapper' do - let(:protip) { + let(:protip) do Fabricate(:protip, user: Fabricate(:user)) - } + end it 'provides a consistence api to a protip' do wrapper = Protip::SearchWrapper.new(protip) - wrapper.user.username.should == protip.user.username - wrapper.user.profile_url.should == protip.user.profile_url - wrapper.upvotes.should == protip.upvotes - wrapper.topics.should == protip.topics - wrapper.only_link?.should == protip.only_link? - wrapper.link.should == protip.link - wrapper.title.should == protip.title - wrapper.to_s.should == protip.public_id - wrapper.public_id.should == protip.public_id + expect(wrapper.user.username).to eq(protip.user.username) + expect(wrapper.user.profile_url).to eq(protip.user.avatar_url) + expect(wrapper.upvotes).to eq(protip.upvotes) + expect(wrapper.topics).to eq(protip.topic_list) + expect(wrapper.only_link?).to eq(protip.only_link?) + expect(wrapper.link).to eq(protip.link) + expect(wrapper.title).to eq(protip.title) + expect(wrapper.to_s).to eq(protip.public_id) + expect(wrapper.public_id).to eq(protip.public_id) end it 'handles link only protips' do @@ -213,8 +218,8 @@ link_protip = Fabricate(:protip, body: 'http://google.com', user: Fabricate(:user)) result = Protip.search(link_protip.title).results.first wrapper = Protip::SearchWrapper.new(result) - wrapper.only_link?.should == link_protip.only_link? - wrapper.link.should == link_protip.link + expect(wrapper.only_link?).to eq(link_protip.only_link?) + expect(wrapper.link).to eq(link_protip.link) end it 'provides a consistence api to a protip search result' do @@ -222,103 +227,106 @@ result = Protip.search(protip.title).results.first wrapper = Protip::SearchWrapper.new(result) - wrapper.user.username.should == protip.user.username - wrapper.user.profile_url.should == protip.user.profile_url - wrapper.upvotes.should == protip.upvotes - wrapper.topics.should == protip.topics - wrapper.only_link?.should == protip.only_link? - wrapper.link.should == protip.link - wrapper.title.should == protip.title - wrapper.to_s.should == protip.public_id - wrapper.public_id.should == protip.public_id - wrapper.class.model_name.should == Protip.model_name + expect(wrapper.user.username).to eq(protip.user.username) + expect(wrapper.user.profile_url).to eq(protip.user.avatar_url) + expect(wrapper.upvotes).to eq(protip.upvotes) + expect(wrapper.topics).to match_array(protip.topic_list) + expect(wrapper.only_link?).to eq(protip.only_link?) + expect(wrapper.link).to eq(protip.link) + expect(wrapper.title).to eq(protip.title) + expect(wrapper.to_s).to eq(protip.public_id) + expect(wrapper.public_id).to eq(protip.public_id) + expect(wrapper.class.model_name).to eq(Protip.model_name) end end - describe "Admin upvoted protips" do + describe 'Admin upvoted protips' do before(:all) do @user = Fabricate(:user) @author = Fabricate(:user) @author.score_cache = 5 @user.admin = true @user.score_cache = 2 - @protip = Fabricate(:protip, user: @author, body: "http://www.yahoo.com") + @protip = Fabricate(:protip, user: @author, body: 'http://www.yahoo.com') @initial_score = @protip.score @protip.upvote_by(@user, @user.tracking_code, Protip::DEFAULT_IP_ADDRESS) end - it 'should not be featured' do - @protip.should_not be_featured + it 'should not be featured', skip: true do + pending + + expect(@protip).not_to be_featured end - it 'should be liked' do - @protip.likes.count.should == 1 - @protip.likes.first.user_id.should == @user.id - @protip.likes.first.value.should == @user.like_value + it 'should be liked', skip: true do + pending + + expect(@protip.likes.count).to eq(1) + expect(@protip.likes.first.user_id).to eq(@user.id) + expect(@protip.likes.first.value).to eq(@user.like_value) end end describe 'upvotes' do - let(:protip) { Fabricate(:protip, user: Fabricate(:user)) } - let(:user) { - u = Fabricate(:user) - u.score_cache = 5 - u - } + let(:protip) { Fabricate(:protip) } + let(:user) { Fabricate(:user) { score_cache 5 } } + it 'should upvote by right amount' do protip.upvote_by(user, user.tracking_code, Protip::DEFAULT_IP_ADDRESS) - protip.upvotes.should == 1 - protip.upvotes_value.should be_within(0.1).of(5) - protip.upvoters_ids.should == [user.id] + protip.reload + expect(protip.upvotes).to eq(1) + expect(protip.upvotes_value).to be_within(0.1).of(5) + expect(protip.upvoters_ids).to eq([user.id]) end it 'should upvote only once per user' do protip.upvote_by(user, user.tracking_code, Protip::DEFAULT_IP_ADDRESS) protip.upvote_by(user, user.tracking_code, Protip::DEFAULT_IP_ADDRESS) - protip.upvotes.should == 1 - protip.likes.count.should == 1 + protip.reload + expect(protip.upvotes).to eq(1) + expect(protip.likes.count).to eq(1) end it 'should weigh team member upvotes less' do - protip.author.team_document_id = "4f271930973bf00004000001" + protip.author.team = Fabricate(:team) protip.author.save - team_member = Fabricate(:user, team_document_id: protip.author.team_document_id) + team_member = Fabricate(:user, team: protip.author.team) team_member.score_cache = 5 protip.upvote_by(team_member, team_member.tracking_code, Protip::DEFAULT_IP_ADDRESS) - protip.upvotes_value.should == 2 - non_team_member = Fabricate(:user, team_document_id: "4f271930973bf00004000002") + protip.reload + expect(protip.upvotes_value).to eq(2) + non_team_member = Fabricate(:user, team: Fabricate(:team)) non_team_member.score_cache = 5 protip.upvote_by(non_team_member, non_team_member.tracking_code, Protip::DEFAULT_IP_ADDRESS) - protip.upvotes.should == 2 - protip.upvotes_value.should == 7 + protip.reload + expect(protip.upvotes).to eq(2) + expect(protip.upvotes_value).to eq(7) end end describe 'scoring' do - let(:first_protip) { Fabricate(:protip, user: Fabricate(:user), body: 'some text') } - let(:second_protip) { Timecop.travel(1.minute.from_now) { Fabricate(:protip, user: Fabricate(:user), body: 'some text') } } + let(:first_protip) { Fabricate(:protip, body: 'some text') } + let(:second_protip) { Timecop.travel(1.minute.from_now) { Fabricate(:protip, body: 'some text') } } - let(:user) { - u = Fabricate(:user) - u.score_cache = 2 - u.tracking_code = "ghi" - u - } + let(:user) { Fabricate(:user, score_cache: 2, tracking_code: 'ghi') } it 'should have second protip with higher score than first' do - second_protip.score.should be > first_protip.score + expect(second_protip.score).to be > first_protip.score end it 'calculated score should be same as score' do - first_protip.calculated_score.should be == first_protip.score + expect(first_protip.calculated_score).to eq(first_protip.score) end it 'upvoted protip should have higher score than unupvoted protip created around same time' do twin_protip = Fabricate(:protip, created_at: first_protip.created_at + 1.second, user: Fabricate(:user)) initial_score = twin_protip.score twin_protip.upvote_by(user, user.tracking_code, Protip::DEFAULT_IP_ADDRESS) - twin_protip.calculated_score.should be > initial_score + expect(twin_protip.calculated_score).to be > initial_score end end + context 'counter_cache' do + describe 'like_' + end end diff --git a/spec/models/seized_opportunity_spec.rb b/spec/models/seized_opportunity_spec.rb new file mode 100644 index 00000000..931da820 --- /dev/null +++ b/spec/models/seized_opportunity_spec.rb @@ -0,0 +1,17 @@ +# == Schema Information +# +# Table name: seized_opportunities +# +# id :integer not null, primary key +# opportunity_id :integer +# user_id :integer +# created_at :datetime +# updated_at :datetime +# + +require 'spec_helper' + +RSpec.describe SeizedOpportunity, type: :model do + it { is_expected.to belong_to(:user) } + it { is_expected.to belong_to(:opportunity) } +end diff --git a/spec/models/skill_spec.rb b/spec/models/skill_spec.rb index 090a86bc..183c6e02 100644 --- a/spec/models/skill_spec.rb +++ b/spec/models/skill_spec.rb @@ -1,128 +1,116 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `skills` +# Table name: skills # -# ### Columns -# -# Name | Type | Attributes -# ------------------------- | ------------------ | --------------------------- -# **`attended_events`** | `text` | -# **`created_at`** | `datetime` | -# **`deleted`** | `boolean` | `default(FALSE), not null` -# **`deleted_at`** | `datetime` | -# **`endorsements_count`** | `integer` | `default(0)` -# **`id`** | `integer` | `not null, primary key` -# **`name`** | `string(255)` | `not null` -# **`repos`** | `text` | -# **`speaking_events`** | `text` | -# **`tokenized`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`user_id`** | `integer` | -# **`weight`** | `integer` | `default(0)` -# -# ### Indexes -# -# * `index_skills_on_deleted_and_user_id`: -# * **`deleted`** -# * **`user_id`** -# * `index_skills_on_user_id`: -# * **`user_id`** +# id :integer not null, primary key +# user_id :integer +# name :citext not null +# endorsements_count :integer default(0) +# created_at :datetime +# updated_at :datetime +# tokenized :string(255) +# weight :integer default(0) +# repos :text +# speaking_events :text +# attended_events :text +# deleted :boolean default(FALSE), not null +# deleted_at :datetime +# links :json default("{}") # -require 'spec_helper' +require 'vcr_helper' -describe Skill do +RSpec.describe Skill, type: :model, skip: true do let(:user) { Fabricate(:user) } it 'soft deletes a users skill' do ruby_skill = user.add_skill('ruby') - user.skills.should include(ruby_skill) + expect(user.skills).to include(ruby_skill) ruby_skill.destroy user.reload - user.skills.should_not include(ruby_skill) - user.skills.with_deleted.should include(ruby_skill) + expect(user.skills).not_to include(ruby_skill) + expect(user.skills.with_deleted).to include(ruby_skill) end it 'downcases and removes ambersands and spaces' do - Skill.tokenize('Ruby & Rails').should == 'rubyandrails' + expect(Skill.tokenize('Ruby & Rails')).to eq('rubyandrails') end it 'removes spacing from skills' do - Skill.create!(name: 'ruby ', user: user).name.should == 'ruby' + expect(Skill.create!(name: 'ruby ', user: user).name).to eq('ruby') end it 'tokenizes every skill on creation' do - Skill.create!(name: 'Ruby ', user: user).tokenized.should == 'ruby' + expect(Skill.create!(name: 'Ruby ', user: user).tokenized).to eq('ruby') end it 'does not create duplicate skills differing in only case' do - Skill.create!(name: 'javascript', user: user).tokenized.should == 'javascript' + expect(Skill.create!(name: 'javascript', user: user).tokenized).to eq('javascript') duplicate_skill = Skill.new(name: 'JavaScript', user: user) - duplicate_skill.should_not be_valid + expect(duplicate_skill).not_to be_valid end it 'increments the owners endorsement count when a skill is endorsed' do ruby = user.add_skill('ruby') ruby.endorsed_by(endorser = Fabricate(:user)) ruby.reload - ruby.endorsements_count.should == 1 + expect(ruby.endorsements_count).to eq(1) user.reload - user.endorsements_count.should == 1 + expect(user.endorsements_count).to eq(1) end it 'should return the users badges for the skill' do user.award(objective_c_badge = Bear.new(user)) user.award(git_badge = Octopussy.new(user)) objective_c = user.add_skill(objective_c_badge.skill) - objective_c.matching_badges_in(user.badges).should have(1).badge - objective_c.matching_badges_in(user.badges).first.badge_class.should == Bear + expect(objective_c.matching_badges_in(user.badges).size).to eq(1) + expect(objective_c.matching_badges_in(user.badges).first.badge_class).to eq(Bear) end it 'should build repos from facts on creation' do ruby_fact = Fabricate(:github_original_fact, context: user) skill = user.add_skill('ruby') - skill.repos.size.should == 1 - skill.repos.first[:name].should == ruby_fact.name - skill.repos.first[:url].should == ruby_fact.url + expect(skill.repos.size).to eq(1) + expect(skill.repos.first[:name]).to eq(ruby_fact.name) + expect(skill.repos.first[:url]).to eq(ruby_fact.url) end it 'should build speaking events from facts on creation' do ruby_fact = Fabricate(:lanyrd_original_fact, context: user) skill = user.add_skill('Ruby') - skill.speaking_events.size.should == 1 - skill.speaking_events.first[:name].should == ruby_fact.name - skill.speaking_events.first[:url].should == ruby_fact.url + expect(skill.speaking_events.size).to eq(1) + expect(skill.speaking_events.first[:name]).to eq(ruby_fact.name) + expect(skill.speaking_events.first[:url]).to eq(ruby_fact.url) end it 'should build attended events from facts on creation' do - ruby_fact = Fabricate(:lanyrd_original_fact, context: user, tags: ['lanyrd', 'event', 'attended', 'Software', 'Ruby']) + ruby_fact = Fabricate(:lanyrd_original_fact, context: user, tags: %w(lanyrd event attended Software Ruby)) skill = user.add_skill('Ruby') - skill.attended_events.size.should == 1 - skill.attended_events.first[:name].should == ruby_fact.name - skill.attended_events.first[:url].should == ruby_fact.url + expect(skill.attended_events.size).to eq(1) + expect(skill.attended_events.first[:name]).to eq(ruby_fact.name) + expect(skill.attended_events.first[:url]).to eq(ruby_fact.url) end it 'should not add duplicate skills' do skill = user.add_skill('Javascript') - skill.tokenized.should == "javascript" + expect(skill.tokenized).to eq('javascript') user.add_skill('JavaScript') - user.skills.count.should == 1 + expect(user.skills.count).to eq(1) skill.destroy user.reload user.add_skill('Javascript') - user.skills.count.should == 1 + expect(user.skills.count).to eq(1) end describe 'matching protips' do it 'should not be a link' do - original_protip = Fabricate(:protip, topics: ['Ruby', 'Java'], user: Fabricate(:user)) - link_protip = Fabricate(:link_protip, topics: ['Ruby', 'Java'], user: Fabricate(:user)) + original_protip = Fabricate(:protip, topics: %w(Ruby Java), user: Fabricate(:user)) + link_protip = Fabricate(:link_protip, topics: %w(Ruby Java), user: Fabricate(:user)) skill = user.add_skill('Ruby') matching = skill.matching_protips_in([original_protip, link_protip]) - matching.should include(original_protip) - matching.should_not include(link_protip) + expect(matching).to include(original_protip) + expect(matching).not_to include(link_protip) end it 'should have the same token' do @@ -130,8 +118,8 @@ java_protip = Fabricate(:protip, topics: ['Java'], user: Fabricate(:user)) ruby_skill = user.add_skill('Ruby') matching = ruby_skill.matching_protips_in([ruby_protip, java_protip]) - matching.should include(ruby_protip) - matching.should_not include(java_protip) + expect(matching).to include(ruby_protip) + expect(matching).not_to include(java_protip) end end end diff --git a/spec/models/slideshare_spec.rb b/spec/models/slideshare_spec.rb index be519e54..0aa9d7cd 100644 --- a/spec/models/slideshare_spec.rb +++ b/spec/models/slideshare_spec.rb @@ -1,27 +1,31 @@ -require 'spec_helper' - -describe 'slideshare', functional: true do +require 'vcr_helper' +RSpec.describe 'slideshare', type: :model, functional: true, skip: true do it 'should pull events for user and create protips' do - deck = Slideshare.new('ndecrock') - author = Fabricate(:user, slideshare: 'ndecrock') - author.save! - facts = deck.facts - facts.size.should > 2 + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Slideshare') do + deck = Slideshare.new('ndecrock') + author = Fabricate(:user, slideshare: 'ndecrock') + author.save! + facts = deck.facts + expect(facts.size).to be > 2 - event = facts.select { |f| f.identity == '16469108' }.first + event = facts.select { |f| f.identity == '16469108' }.first - event.identity.should == '16469108' - event.owner.should == 'slideshare:ndecrock' - event.name.should == "The Comeback of the Watch" - event.relevant_on.to_date.year.should == 2013 - event.url.should == 'http://www.slideshare.net/ndecrock/the-comeback-of-the-watch' - event.tags.should include('slideshare', 'presentation') + expect(event.identity).to eq('16469108') + expect(event.owner).to eq('slideshare:ndecrock') + expect(event.name).to eq('The Comeback of the Watch') + expect(event.relevant_on.to_date.year).to eq(2013) + expect(event.url).to eq('http://www.slideshare.net/ndecrock/the-comeback-of-the-watch') + expect(event.tags).to include('slideshare', 'presentation') + end end it 'should return no events for a user that does not exist' do - deck = Slideshare.new('asfjkdsfkjldsafdskljfdsdsfdsafas') - deck.facts.should be_empty + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Slideshare') do + deck = Slideshare.new('asfjkdsfkjldsafdskljfdsdsfdsafas') + expect(deck.facts).to be_empty + end end - end diff --git a/spec/models/spam_report_spec.rb b/spec/models/spam_report_spec.rb new file mode 100644 index 00000000..562aa040 --- /dev/null +++ b/spec/models/spam_report_spec.rb @@ -0,0 +1,19 @@ +# == Schema Information +# +# Table name: spam_reports +# +# id :integer not null, primary key +# spammable_id :integer not null +# spammable_type :string(255) not null +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'spec_helper' + +RSpec.describe SpamReport, type: :model do + describe '#spammable' do + subject { super().spammable } + it { is_expected.to be_nil } + end +end diff --git a/spec/models/speakerdeck_spec.rb b/spec/models/speakerdeck_spec.rb index bfe57d20..80474b2f 100644 --- a/spec/models/speakerdeck_spec.rb +++ b/spec/models/speakerdeck_spec.rb @@ -1,23 +1,27 @@ -require 'spec_helper' - -describe 'speakerdeck', functional: true do +require 'vcr_helper' +RSpec.describe 'speakerdeck', type: :model, functional: true do it 'should pull events for user' do - deck = Speakerdeck.new('jnunemaker') - deck.facts.size.should > 5 + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Speakerdeck') do + deck = Speakerdeck.new('jnunemaker') + expect(deck.facts.size).to be > 5 - event = deck.facts.last - event.identity.should == '4cbf544157530814c0000006' - event.owner.should == 'speakerdeck:jnunemaker' - event.name.should == 'MongoMapper - Mapping Ruby To and From Mongo' - event.relevant_on.to_date.should == Date.parse('2010-10-20') - event.url.should == 'https://speakerdeck.com/jnunemaker/mongomapper-mapping-ruby-to-and-from-mongo' - event.tags.should include('speakerdeck', 'presentation') + event = deck.facts.last + expect(event.identity).to eq('4cbf544157530814c0000006') + expect(event.owner).to eq('speakerdeck:jnunemaker') + expect(event.name).to eq('MongoMapper - Mapping Ruby To and From Mongo') + expect(event.relevant_on.to_date).to eq(Date.parse('2010-10-20')) + expect(event.url).to eq('https://speakerdeck.com/jnunemaker/mongomapper-mapping-ruby-to-and-from-mongo') + expect(event.tags).to include('speakerdeck', 'presentation') + end end it 'should return no events for a user that does not exist' do - deck = Speakerdeck.new('asfjkdsfkjldsafdskljfdsdsfdsafas') - deck.facts.should be_empty + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Speakerdeck') do + deck = Speakerdeck.new('asfjkdsfkjldsafdskljfdsdsfdsafas') + expect(deck.facts).to be_empty + end end - -end \ No newline at end of file +end diff --git a/spec/models/team_spec.rb b/spec/models/team_spec.rb index ad11eac0..b1e91df5 100644 --- a/spec/models/team_spec.rb +++ b/spec/models/team_spec.rb @@ -1,72 +1,171 @@ -require 'spec_helper' +# == Schema Information +# +# Table name: teams +# +# id :integer not null, primary key +# created_at :datetime not null +# updated_at :datetime not null +# website :string(255) +# about :text +# total :decimal(40, 30) default(0.0) +# size :integer default(0) +# mean :decimal(40, 30) default(0.0) +# median :decimal(40, 30) default(0.0) +# score :decimal(40, 30) default(0.0) +# twitter :string(255) +# facebook :string(255) +# slug :citext not null +# premium :boolean default(FALSE) +# analytics :boolean default(FALSE) +# valid_jobs :boolean default(FALSE) +# hide_from_featured :boolean default(FALSE) +# preview_code :string(255) +# youtube_url :string(255) +# github :string(255) +# highlight_tags :string(255) +# branding :text +# headline :text +# big_quote :text +# big_image :string(255) +# featured_banner_image :string(255) +# benefit_name_1 :text +# benefit_description_1 :text +# benefit_name_2 :text +# benefit_description_2 :text +# benefit_name_3 :text +# benefit_description_3 :text +# reason_name_1 :text +# reason_description_1 :text +# reason_name_2 :text +# reason_description_2 :text +# reason_name_3 :text +# reason_description_3 :text +# why_work_image :text +# organization_way :text +# organization_way_name :text +# organization_way_photo :text +# blog_feed :text +# our_challenge :text +# your_impact :text +# hiring_tagline :text +# link_to_careers_page :text +# avatar :string(255) +# achievement_count :integer default(0) +# endorsement_count :integer default(0) +# upgraded_at :datetime +# paid_job_posts :integer default(0) +# monthly_subscription :boolean default(FALSE) +# stack_list :text default("") +# number_of_jobs_to_show :integer default(2) +# location :string(255) +# country_id :integer +# name :string(255) +# github_organization_name :string(255) +# team_size :integer +# mongo_id :string(255) +# office_photos :string(255) default([]), is an Array +# upcoming_events :text default([]), is an Array +# interview_steps :text default([]), is an Array +# invited_emails :string(255) default([]), is an Array +# pending_join_requests :string(255) default([]), is an Array +# state :string(255) default("active") +# -describe Team do - let(:team) { Fabricate(:team) } - let(:invitee) { Fabricate(:user) } +require 'rails_helper' + +RSpec.describe Team, type: :model do + let(:team) { Fabricate(:team) } + let(:invitee) { Fabricate(:user) } + + it { is_expected.to have_one :account } + it { is_expected.to have_many :locations } + it { is_expected.to have_many :members } + it { is_expected.to have_many :jobs } + it { is_expected.to have_many :followers } + it { is_expected.to respond_to :admins } + it { is_expected.to respond_to :admin_accounts } + + describe '#with_similar_names' do + let!(:team_1) { Fabricate(:team, name: 'dream_team') } + let!(:team_2) { Fabricate(:team, name: 'dream_group') } + let!(:team_3) { Fabricate(:team, name: 'test_team') } + + it 'returns teams with similar names' do + result = Team.with_similar_names('team') + expect(result.count).to eq 2 + end + + it 'returns teams using wildcards' do + result = Team.with_similar_names('dr%') + expect(result).to include(team_1, team_2) + end + end + + describe "#public_json" do + + it "returns valid JSON" do + json = team.public_json + expect{JSON.parse(json)}.to_not raise_error + end + + end it 'adds the team id to the user when they are added to a team' do team.add_user(invitee) - invitee.reload.team.should == team + expect(invitee.reload.membership.team).to eq(team) end it 'should indicate if team member has referral' do - member_that_invited_user = Fabricate(:user, referral_token: 'asdfasdf') + member_that_invited_user = Fabricate(:user) team.add_user(member_that_invited_user) - team.reload_team_members - - team.has_user_with_referral_token?('asdfasdf').should == true - team.has_user_with_referral_token?("something else").should == false + expect(team.has_user_with_referral_token?(member_that_invited_user.referral_token)).to eq(true) + expect(team.has_user_with_referral_token?('something else')).to eq(false) end - it 'updates team size when adding and removing member' do + xit 'updates team size when adding and removing member' do team_owner = Fabricate(:user) @team = Team.find(team.id) - @team.size.should == 0 + expect(@team.size).to eq(0) @team.add_user(team_owner) - @team.reload.size.should == 1 + expect(@team.reload.size).to eq(1) @team.remove_user(team_owner) - @team.reload.size.should == 0 + expect(@team.reload.size).to eq(0) end it 'should create a unique slug with no trailing - for each character' do team = Team.new(name: 'Tilde Inc .') team.valid? - team.slug.should == 'tilde-inc' + expect(team.slug).to eq('tilde-inc') end - it 'should clear the cache when a premium team is updated' do - seed_plans! - Rails.cache.write(Team::FEATURED_TEAMS_CACHE_KEY, 'test') - team.team_members << admin = Fabricate(:user) - team.build_account - team.account.admin_id = admin.id - team.account.subscribe_to!(Plan.enhanced_team_page_monthly, true) - Rails.cache.fetch(Team::FEATURED_TEAMS_CACHE_KEY).should be_nil + skip 'should clear the cache when a premium team is updated' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Opportunity') do + seed_plans! + Rails.cache.write(Team::FEATURED_TEAMS_CACHE_KEY, 'test') + team.members << admin = Fabricate(:user) + team.build_account + team.account.admin_id = admin.id + team.account.subscribe_to!(Plan.enhanced_team_page_monthly, true) + expect(Rails.cache.fetch(Team::FEATURED_TEAMS_CACHE_KEY)).to be_nil + end end it 'should not clear cache when a normal team is updated' do Rails.cache.write(Team::FEATURED_TEAMS_CACHE_KEY, 'test') team.name = 'something-else' team.save! - Rails.cache.fetch(Team::FEATURED_TEAMS_CACHE_KEY).should == 'test' + expect(Rails.cache.fetch(Team::FEATURED_TEAMS_CACHE_KEY)).to eq('test') end - it 'should be able to add team link' do - team.update_attributes( - featured_links: [{ - name: 'Google', - url: 'http://www.google.com' - }]) - team.featured_links.should have(1).link - end - - def seed_plans!(reset=false) + def seed_plans!(reset = false) Plan.destroy_all if reset - Plan.create(amount: 0, interval: Plan::MONTHLY, name: "Basic") if Plan.enhanced_team_page_free.nil? - Plan.create(amount: 9900, interval: Plan::MONTHLY, name: "Monthly") if Plan.enhanced_team_page_monthly.nil? - Plan.create(amount: 19900, interval: nil, name: "Single") if Plan.enhanced_team_page_one_time.nil? - Plan.create(amount: 19900, interval: Plan::MONTHLY, analytics: true, name: "Analytics") if Plan.enhanced_team_page_analytics.nil? + Plan.create(amount: 0, interval: Plan::MONTHLY, name: 'Basic') if Plan.enhanced_team_page_free.nil? + Plan.create(amount: 9900, interval: Plan::MONTHLY, name: 'Monthly') if Plan.enhanced_team_page_monthly.nil? + Plan.create(amount: 19_900, interval: nil, name: 'Single') if Plan.enhanced_team_page_one_time.nil? + Plan.create(amount: 19_900, interval: Plan::MONTHLY, analytics: true, name: 'Analytics') if Plan.enhanced_team_page_analytics.nil? end + end diff --git a/spec/models/teams/account_plan_spec.rb b/spec/models/teams/account_plan_spec.rb new file mode 100644 index 00000000..a2486b27 --- /dev/null +++ b/spec/models/teams/account_plan_spec.rb @@ -0,0 +1,17 @@ +# == Schema Information +# +# Table name: teams_account_plans +# +# plan_id :integer +# account_id :integer +# id :integer not null, primary key +# state :string(255) default("active") +# expire_at :datetime +# + +require 'rails_helper' + +RSpec.describe Teams::AccountPlan, type: :model do + it { is_expected.to belong_to :plan } + it { is_expected.to belong_to :account } +end diff --git a/spec/models/teams/account_spec.rb b/spec/models/teams/account_spec.rb new file mode 100644 index 00000000..276e8a47 --- /dev/null +++ b/spec/models/teams/account_spec.rb @@ -0,0 +1,287 @@ +# == Schema Information +# == Schema Information +# +# Table name: teams_accounts +# +# id :integer not null, primary key +# team_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# stripe_card_token :string(255) not null +# stripe_customer_token :string(255) not null +# + +require 'vcr_helper' + +RSpec.describe Teams::Account, type: :model do + let(:team) { Fabricate(:team, account: nil) } + let(:account) { { stripe_card_token: new_token } } + + before(:all) do + url = 'http://maps.googleapis.com/maps/api/geocode/json?address=San+Francisco%2C+CA&language=en&sensor=false' + @body ||= File.read(File.join(Rails.root, 'spec', 'fixtures', 'google_maps.json')) + stub_request(:get, url).to_return(body: @body) + end + + def new_token + Stripe::Token.create(card: { number: 4_242_424_242_424_242, cvc: 224, exp_month: 12, exp_year: 14 }).try(:id) + end + + def post_job_for(team) + Fabricate(:opportunity, team_id: team.id) + end + + describe 'account creation' do + + it 'should create a valid account locally and on stripe' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + + expect(team.account).to be_nil + team.build_account(account) + team.account.stripe_customer_token = "cus_4TNdkc92GIWGvM" + team.account.save_with_payment + team.reload + expect(team.account.stripe_card_token).to eq(account[:stripe_card_token]) + expect(team.account.stripe_customer_token).not_to be_nil + expect(team.account.plan_ids).to eq([]) + + end + end + + it 'should still create an account if account admin not team admin' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + + team.build_account(account) + team.account.stripe_customer_token = "cus_4TNdkc92GIWGvM" + team.account.save_with_payment + team.reload + expect(team.account).not_to be_nil + + end + end + + # FIXME: This request does not produce the same results out of two calls, under the Account cassette. + # Something is stomping its request. + # 1st call, under record all will pass this test + # 2nd call, under new or none will fail, returning a previously recorded request + it 'should not create an account if stripe_card_token invalid' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account_Invalid') do + + account[:stripe_card_token] = 'invalid' + team.build_account(account) + team.account.save_with_payment + team.reload + expect(team.account).to be_nil + + end + end + + it 'should not allow stripe_customer_token or admin to be set/updated' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + + some_random_user = Fabricate(:user) + account[:stripe_customer_token] = 'invalid_customer_token' + team.build_account(account) + expect(team.account.stripe_customer_token).to be_nil + end + end + end + + describe 'subscriptions' do + let(:free_plan) { Plan.create!(amount: 0, interval: Plan::MONTHLY, name: 'Starter') } + let(:monthly_plan) { Plan.create!(amount: 15_000, interval: Plan::MONTHLY, name: 'Recruiting Magnet') } + let(:onetime_plan) { Plan.create!(amount: 30_000, interval: nil, name: 'Single Job Post') } + + describe 'free subscription' do + before(:each) do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + team.build_account(account) + end + + team.account.stripe_customer_token = "cus_4TNdkc92GIWGvM" + + VCR.use_cassette('Account') do + team.account.save_with_payment + end + + VCR.use_cassette('Account') do + team.account.subscribe_to!(free_plan) + end + + team.account.save + team.reload + end + + it 'should add a free subscription' do + expect(team.account.plan_ids).to include(free_plan.id) + expect(team.paid_job_posts).to eq(0) + end + + it 'should not allow any job posts' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + expect(team.can_post_job?).to eq(false) + expect(team.premium?).to eq(false) + expect(team.valid_jobs?).to eq(false) + end + + VCR.use_cassette('Account') do + expect { Fabricate(:opportunity, team_id: team.id) }.to raise_error(ActiveRecord::RecordNotSaved) + end + end + + # FIXME: This request does not produce the same results out of two calls. + # 1st call, under record all will pass this test + # 2nd call, under non will fail to match with previously recorded request + # 3rd call, under new will record a worket set of data for this test + it 'should allow upgrade to monthly subscription' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + team.account.save_with_payment(monthly_plan) + end + + team.reload + expect(team.can_post_job?).to eq(true) + expect(team.paid_job_posts).to eq(0) + expect(team.valid_jobs?).to eq(true) + expect(team.has_monthly_subscription?).to eq(true) + expect(team.premium?).to eq(true) + end + + it 'should allow upgrade to one-time job post charge' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + + team.account.update_attributes(stripe_card_token: new_token) + team.account.save_with_payment(onetime_plan) + team.reload + expect(team.can_post_job?).to eq(true) + expect(team.valid_jobs?).to eq(true) + expect(team.paid_job_posts).to eq(1) + expect(team.premium?).to eq(true) + + end + end + end + + describe 'monthly paid subscription' do + before(:each) do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + expect(team.account).to be_nil + team.build_account(account) + team.account.stripe_customer_token = "cus_4TNdkc92GIWGvM" + team.account.save_with_payment + team.account.subscribe_to!(monthly_plan) + team.reload + end + end + + it 'should add a paid monthly subscription' do + expect(team.account.plan_ids).to include(monthly_plan.id) + expect(team.paid_job_posts).to eq(0) + expect(team.valid_jobs?).to eq(true) + expect(team.can_post_job?).to eq(true) + expect(team.premium?).to eq(true) + end + + it 'should allow unlimited job posts' do + # TODO: Refactor api calls to Sidekiq job + expect(team.can_post_job?).to eq(true) + + 5.times do + VCR.use_cassette('Account') do + Fabricate(:opportunity, team_id: team.id) + end + end + + expect(team.can_post_job?).to eq(true) + end + end + + describe 'one-time job post charge' do + before(:each) do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + expect(team.account).to be_nil + team.build_account(account) + team.account.stripe_customer_token = "cus_4TNdkc92GIWGvM" + team.account.save_with_payment(onetime_plan) + team.reload + end + end + + it 'should add a one-time job post charge' do + expect(team.account.plan_ids).to include(onetime_plan.id) + expect(team.paid_job_posts).to eq(1) + expect(team.valid_jobs?).to eq(true) + expect(team.can_post_job?).to eq(true) + expect(team.premium?).to eq(true) + end + + it 'should allow only one job-post' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + + expect(team.can_post_job?).to eq(true) + Fabricate(:opportunity, team_id: team.id) + team.reload + expect(team.paid_job_posts).to eq(0) + expect(team.can_post_job?).to eq(false) + expect { Fabricate(:opportunity, team_id: team.id) }.to raise_error(ActiveRecord::RecordNotSaved) + + end + end + + it 'should allow upgrade to monthly subscription' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + team.account.update_attributes(stripe_card_token: new_token) + team.account.save_with_payment(monthly_plan) + team.reload + end + + expect(team.can_post_job?).to eq(true) + expect(team.valid_jobs?).to eq(true) + expect(team.paid_job_posts).to eq(1) + expect(team.has_monthly_subscription?).to eq(true) + + 5.times do + VCR.use_cassette('Account') do + Fabricate(:opportunity, team_id: team.id) + end + end + + expect(team.can_post_job?).to eq(true) + expect(team.paid_job_posts).to eq(1) + expect(team.premium?).to eq(true) + end + + it 'should allow additional one time job post charges' do + # TODO: Refactor api calls to Sidekiq job + VCR.use_cassette('Account') do + + team.account.update_attributes(stripe_card_token: new_token) + team.account.save_with_payment(onetime_plan) + team.reload + expect(team.paid_job_posts).to eq(2) + expect(team.can_post_job?).to eq(true) + 2.times do + Fabricate(:opportunity, team_id: team.id) + end + team.reload + expect(team.paid_job_posts).to eq(0) + expect(team.has_monthly_subscription?).to eq(false) + expect(team.premium?).to eq(true) + expect(team.valid_jobs?).to eq(true) + + end + end + end + end +end diff --git a/spec/models/teams/location_spec.rb b/spec/models/teams/location_spec.rb new file mode 100644 index 00000000..eb4abc49 --- /dev/null +++ b/spec/models/teams/location_spec.rb @@ -0,0 +1,22 @@ +# == Schema Information +# +# Table name: teams_locations +# +# id :integer not null, primary key +# name :string(255) +# description :text +# address :text +# city :string(255) +# state_code :string(255) +# country :string(255) +# team_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# points_of_interest :string(255) default([]), is an Array +# + +require 'rails_helper' + +RSpec.describe Teams::Location, type: :model do + it { is_expected.to belong_to(:team) } +end diff --git a/spec/models/teams/member_spec.rb b/spec/models/teams/member_spec.rb new file mode 100644 index 00000000..53f82205 --- /dev/null +++ b/spec/models/teams/member_spec.rb @@ -0,0 +1,23 @@ +# == Schema Information +# +# Table name: teams_members +# +# id :integer not null, primary key +# team_id :integer not null +# user_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# state :string(255) default("pending") +# score_cache :float +# team_banner :string(255) +# team_avatar :string(255) +# role :string(255) default("member") +# title :string(255) +# + +require 'rails_helper' + +RSpec.describe Teams::Member, type: :model do + it { is_expected.to belong_to(:team).counter_cache(:team_size) } + it { is_expected.to belong_to(:user) } +end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index c2295988..3416a0f9 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,297 +1,185 @@ -# ## Schema Information -# Schema version: 20131205021701 +# == Schema Information # -# Table name: `users` +# Table name: users # -# ### Columns -# -# Name | Type | Attributes -# ------------------------------------ | ------------------ | --------------------------- -# **`about`** | `text` | -# **`achievements_checked_at`** | `datetime` | `default(1914-02-20 22:39:10 UTC)` -# **`activated_on`** | `datetime` | -# **`admin`** | `boolean` | `default(FALSE)` -# **`api_key`** | `string(255)` | -# **`avatar`** | `string(255)` | -# **`backup_email`** | `string(255)` | -# **`badges_count`** | `integer` | `default(0)` -# **`banner`** | `string(255)` | -# **`beta_access`** | `boolean` | `default(FALSE)` -# **`bitbucket`** | `string(255)` | -# **`blog`** | `string(255)` | -# **`city`** | `string(255)` | -# **`claim_code`** | `text` | -# **`codeplex`** | `string(255)` | -# **`company`** | `string(255)` | -# **`country`** | `string(255)` | -# **`created_at`** | `datetime` | -# **`dribbble`** | `string(255)` | -# **`email`** | `string(255)` | -# **`endorsements_count`** | `integer` | `default(0)` -# **`favorite_websites`** | `string(255)` | -# **`forrst`** | `string(255)` | -# **`github`** | `string(255)` | -# **`github_failures`** | `integer` | `default(0)` -# **`github_id`** | `integer` | -# **`github_token`** | `string(255)` | -# **`google_code`** | `string(255)` | -# **`http_counter`** | `integer` | -# **`id`** | `integer` | `not null, primary key` -# **`ip_lat`** | `float` | -# **`ip_lng`** | `float` | -# **`join_badge_orgs`** | `boolean` | `default(FALSE)` -# **`joined_github_on`** | `date` | -# **`joined_twitter_on`** | `date` | -# **`last_asm_email_at`** | `datetime` | -# **`last_email_sent`** | `datetime` | -# **`last_refresh_at`** | `datetime` | `default(1970-01-01 00:00:00 UTC)` -# **`last_request_at`** | `datetime` | -# **`lat`** | `float` | -# **`linkedin`** | `string(255)` | -# **`linkedin_id`** | `string(255)` | -# **`linkedin_legacy`** | `string(255)` | -# **`linkedin_public_url`** | `string(255)` | -# **`linkedin_secret`** | `string(255)` | -# **`linkedin_token`** | `string(255)` | -# **`lng`** | `float` | -# **`location`** | `string(255)` | -# **`login_count`** | `integer` | `default(0)` -# **`name`** | `string(255)` | -# **`notify_on_award`** | `boolean` | `default(TRUE)` -# **`notify_on_follow`** | `boolean` | `default(TRUE)` -# **`old_github_token`** | `string(255)` | -# **`penalty`** | `float` | `default(0.0)` -# **`receive_newsletter`** | `boolean` | `default(TRUE)` -# **`receive_weekly_digest`** | `boolean` | `default(TRUE)` -# **`redemptions`** | `text` | -# **`referral_token`** | `string(255)` | -# **`referred_by`** | `string(255)` | -# **`remind_to_create_protip`** | `datetime` | -# **`remind_to_create_skills`** | `datetime` | -# **`remind_to_create_team`** | `datetime` | -# **`remind_to_invite_team_members`** | `datetime` | -# **`remind_to_link_accounts`** | `datetime` | -# **`resume`** | `string(255)` | -# **`score_cache`** | `float` | `default(0.0)` -# **`slideshare`** | `string(255)` | -# **`sourceforge`** | `string(255)` | -# **`speakerdeck`** | `string(255)` | -# **`specialties`** | `text` | -# **`stackoverflow`** | `string(255)` | -# **`state`** | `string(255)` | -# **`state_name`** | `string(255)` | -# **`team_avatar`** | `string(255)` | -# **`team_banner`** | `string(255)` | -# **`team_document_id`** | `string(255)` | -# **`team_responsibilities`** | `text` | -# **`thumbnail_url`** | `text` | -# **`title`** | `string(255)` | -# **`tracking_code`** | `string(255)` | -# **`twitter`** | `string(255)` | -# **`twitter_checked_at`** | `datetime` | `default(1914-02-20 22:39:10 UTC)` -# **`twitter_id`** | `string(255)` | -# **`twitter_secret`** | `string(255)` | -# **`twitter_token`** | `string(255)` | -# **`updated_at`** | `datetime` | -# **`username`** | `string(255)` | -# **`utm_campaign`** | `string(255)` | -# **`visit_frequency`** | `string(255)` | `default("rarely")` -# **`visits`** | `string(255)` | `default("")` -# **`zerply`** | `string(255)` | -# -# ### Indexes -# -# * `index_users_on_github_token` (_unique_): -# * **`old_github_token`** -# * `index_users_on_linkedin_id` (_unique_): -# * **`linkedin_id`** -# * `index_users_on_team_document_id`: -# * **`team_document_id`** -# * `index_users_on_twitter_id` (_unique_): -# * **`twitter_id`** -# * `index_users_on_username` (_unique_): -# * **`username`** +# id :integer not null, primary key +# username :citext +# name :string(255) +# email :citext +# location :string(255) +# old_github_token :string(255) +# state :string(255) +# created_at :datetime +# updated_at :datetime +# twitter :string(255) +# linkedin_legacy :string(255) +# stackoverflow :string(255) +# admin :boolean default(FALSE) +# backup_email :string(255) +# badges_count :integer default(0) +# bitbucket :string(255) +# codeplex :string(255) +# login_count :integer default(0) +# last_request_at :datetime default(2014-07-23 03:14:36 UTC) +# achievements_checked_at :datetime default(1911-08-12 21:49:21 UTC) +# claim_code :text +# github_id :integer +# country :string(255) +# city :string(255) +# state_name :string(255) +# lat :float +# lng :float +# http_counter :integer +# github_token :string(255) +# twitter_checked_at :datetime default(1911-08-12 21:49:21 UTC) +# title :string(255) +# company :string(255) +# blog :string(255) +# github :citext +# forrst :string(255) +# dribbble :string(255) +# specialties :text +# notify_on_award :boolean default(TRUE) +# receive_newsletter :boolean default(TRUE) +# zerply :string(255) +# linkedin :string(255) +# linkedin_id :string(255) +# linkedin_token :string(255) +# twitter_id :string(255) +# twitter_token :string(255) +# twitter_secret :string(255) +# linkedin_secret :string(255) +# last_email_sent :datetime +# linkedin_public_url :string(255) +# endorsements_count :integer default(0) +# team_document_id :string(255) +# speakerdeck :string(255) +# slideshare :string(255) +# last_refresh_at :datetime default(1970-01-01 00:00:00 UTC) +# referral_token :string(255) +# referred_by :string(255) +# about :text +# joined_github_on :date +# avatar :string(255) +# banner :string(255) +# remind_to_invite_team_members :datetime +# activated_on :datetime +# tracking_code :string(255) +# utm_campaign :string(255) +# score_cache :float default(0.0) +# notify_on_follow :boolean default(TRUE) +# api_key :string(255) +# remind_to_create_team :datetime +# remind_to_create_protip :datetime +# remind_to_create_skills :datetime +# remind_to_link_accounts :datetime +# favorite_websites :string(255) +# team_responsibilities :text +# team_avatar :string(255) +# team_banner :string(255) +# stat_name_1 :string(255) +# stat_number_1 :string(255) +# stat_name_2 :string(255) +# stat_number_2 :string(255) +# stat_name_3 :string(255) +# stat_number_3 :string(255) +# ip_lat :float +# ip_lng :float +# penalty :float default(0.0) +# receive_weekly_digest :boolean default(TRUE) +# github_failures :integer default(0) +# resume :string(255) +# sourceforge :string(255) +# google_code :string(255) +# sales_rep :boolean default(FALSE) +# visits :string(255) default("") +# visit_frequency :string(255) default("rarely") +# pitchbox_id :integer +# join_badge_orgs :boolean default(FALSE) +# use_social_for_pitchbox :boolean default(FALSE) +# last_asm_email_at :datetime +# banned_at :datetime +# last_ip :string(255) +# last_ua :string(255) +# team_id :integer +# role :string(255) default("user") # -require 'spec_helper' +require 'rails_helper' -describe User do - before :each do - User.destroy_all - end +RSpec.describe User, type: :model do + it { is_expected.to have_one :github_profile } + it { is_expected.to have_many :github_repositories } + + describe 'validation' do + it 'should not allow a username in the reserved list' do + User::RESERVED.each do |reserved| + user = Fabricate.build(:user, username: reserved) + expect(user).not_to be_valid + expect(user.errors[:username]).to eq(['is reserved']) + end + end - describe 'viewing' do - it 'tracks when a user views a profile' do - user = Fabricate :user - viewer = Fabricate :user - user.viewed_by(viewer) - user.viewers.first.should == viewer - user.total_views.should == 1 + it 'should not allow a username with a period character' do + user = Fabricate.build(:user, username: 'foo.bar') + expect(user).not_to be_valid + expect(user.errors[:username]).to eq(['must not contain a period']) end - it 'tracks when a user views a profile' do - user = Fabricate :user - user.viewed_by(nil) - user.total_views.should == 1 + it 'should require valid email when instantiating' do + user = Fabricate.build(:user, email: 'someting @ not valid.com', state: nil) + expect(user.save).to be_falsey + expect(user).not_to be_valid + expect(user.errors[:email]).not_to be_empty end end it 'should create a token on creation' do user = Fabricate(:user) - user.referral_token.should_not be_nil + expect(user.referral_token).not_to be_nil end it 'should not allow the username in multiple cases to be use on creation' do - user = Fabricate(:user, username: 'MDEITERS') - lambda { - Fabricate(:user, username: 'mdeiters').should raise_error('Validation failed: Username has already been taken') - } + Fabricate(:user, username: 'MDEITERS') + expect { Fabricate(:user, username: 'mdeiters') }.to raise_error('Validation failed: Username has already been taken') end - it 'should not return incorrect user because of pattern matching' do - user = Fabricate(:user, username: 'MDEITERS') - found = User.with_username('M_EITERS') - found.should_not == user - end - - it 'should find users by username when provider is blank' do - user = Fabricate(:user, username: 'mdeiters') - User.with_username('mdeiters', '').should == user - User.with_username('mdeiters', nil).should == user - end - - it 'should find users ignoring case' do - user = Fabricate(:user, username: 'MDEITERS', twitter: 'MDEITERS', github: 'MDEITERS', linkedin: 'MDEITERS') - User.with_username('mdeiters').should == user - User.with_username('mdeiters', :twitter).should == user - User.with_username('mdeiters', :github).should == user - User.with_username('mdeiters', :linkedin).should == user - end - - it 'should return users with most badges' do - user_with_2_badges = Fabricate :user, username: 'somethingelse' - badge1 = user_with_2_badges.badges.create!(badge_class_name: Mongoose3.name) - badge2 = user_with_2_badges.badges.create!(badge_class_name: Octopussy.name) - - user_with_3_badges = Fabricate :user - badge1 = user_with_3_badges.badges.create!(badge_class_name: Mongoose3.name) - badge2 = user_with_3_badges.badges.create!(badge_class_name: Octopussy.name) - badge3 = user_with_3_badges.badges.create!(badge_class_name: Mongoose.name) - - User.top(1).should include(user_with_3_badges) - User.top(1).should_not include(user_with_2_badges) - end - - it 'should require valid email when instantiating' do - u = Fabricate.build(:user, email: 'someting @ not valid.com', state: nil) - u.save.should be_false - u.should_not be_valid - u.errors[:email].should_not be_empty - end - - it 'returns badges in order created with latest first' do - user = Fabricate :user - badge1 = user.badges.create!(badge_class_name: Mongoose3.name) - badge2 = user.badges.create!(badge_class_name: Octopussy.name) - badge3 = user.badges.create!(badge_class_name: Mongoose.name) - - user.badges.first.should == badge3 - user.badges.last.should == badge1 - end - - class NotaBadge < BadgeBase - end - - class AlsoNotaBadge < BadgeBase - end - - it 'should award user with badge' do - user = Fabricate :user - user.award(NotaBadge.new(user)) - user.badges.should have(1).badge - user.badges.first.badge_class_name.should == NotaBadge.name - end - - it 'instantiates new user with omniauth if the user is not on file' do - omniauth = {"info" => {"name" => "Matthew Deiters", "urls" => {"Blog" => "http://www.theagiledeveloper.com", "GitHub" => "http://github.com/mdeiters"}, "nickname" => "mdeiters", "email" => ""}, "uid" => 7330, "credentials" => {"token" => "f0f6946eb12c4156a7a567fd73aebe4d3cdde4c8"}, "extra" => {"user_hash" => {"plan" => {"name" => "micro", "collaborators" => 1, "space" => 614400, "private_repos" => 5}, "gravatar_id" => "aacb7c97f7452b3ff11f67151469e3b0", "company" => nil, "name" => "Matthew Deiters", "created_at" => "2008/04/14 15:53:10 -0700", "location" => "", "disk_usage" => 288049, "collaborators" => 0, "public_repo_count" => 18, "public_gist_count" => 31, "blog" => "http://www.theagiledeveloper.com", "following_count" => 27, "id" => 7330, "owned_private_repo_count" => 2, "private_gist_count" => 2, "type" => "User", "permission" => nil, "total_private_repo_count" => 2, "followers_count" => 19, "login" => "mdeiters", "email" => ""}}, "provider" => "github"} - - user = User.for_omniauth(omniauth.with_indifferent_access) - user.should be_new_record - end - - it 'increments the badge count when you add new badges' do - user = Fabricate :user - - user.award(NotaBadge.new(user)) - user.save! - user.reload - user.badges_count.should == 1 - - user.award(AlsoNotaBadge.new(user)) - user.save! - user.reload - user.badges_count.should == 2 - end - - it 'should randomly select the user with badges' do - user = Fabricate :user - user.award(NotaBadge.new(user)) - user.award(NotaBadge.new(user)) - user.save! - - user2 = Fabricate :user, username: 'different', github_token: 'unique' - - 4.times do - User.random.should_not == user2 - end + it 'should find user by username no matter the case' do + user = Fabricate(:user, username: 'seuros') + expect(User.find_by_username('Seuros')).to eq(user) end - it 'should not allow adding the same badge twice' do - user = Fabricate :user - user.award(NotaBadge.new(user)) - user.award(NotaBadge.new(user)) - user.save! - user.badges.count.should == 1 + it 'should not return incorrect user because of pattern matching' do + user = Fabricate(:user, username: 'MDEITERS') + found = User.find_by_username('M_EITERS') + expect(found).not_to eq(user) end - describe "redemptions" do - it "should have an empty list of redemptions when new" do - Fabricate.build(:user).redemptions.should be_empty - end - - it "should have a single redemption with a redemptions list of one item" do - user = Fabricate.build(:user, redemptions: %w{railscampx nodeknockout}) - user.save - user.reload.redemptions.should == %w{railscampx nodeknockout} - end - - it "should allow you to add a redemption" do - user = Fabricate.build(:user, redemptions: %w{foo}) - user.update_attributes redemptions: %w{bar} - user.reload.redemptions.should == %w{bar} + describe '::find_by_provider_username' do + it 'should find users by username when provider is blank' do + user = Fabricate(:user, username: 'mdeiters') + expect(User.find_by_provider_username('mdeiters', '')).to eq(user) end - it "should allow you to remove redemptions" do - user = Fabricate.build(:user, redemptions: %w{foo}) - user.update_attributes redemptions: [] - user.reload.redemptions.should be_empty + it 'should find users ignoring case' do + user = Fabricate(:user) do + username FFaker::Internet.user_name.upcase.gsub('.','') + twitter FFaker::Internet.user_name.upcase + github FFaker::Internet.user_name.upcase + linkedin FFaker::Internet.user_name.upcase + end + expect(User.find_by_provider_username(user.username.downcase, '')).to eq(user) + expect(User.find_by_provider_username(user.twitter.downcase, 'twitter')).to eq(user) + expect(User.find_by_provider_username(user.github.downcase, 'github')).to eq(user) + expect(User.find_by_provider_username(user.linkedin.downcase, 'linkedin')).to eq(user) end end - describe "validation" do - it "should not allow a username in the reserved list" do - User::RESERVED.each do |reserved| - user = Fabricate.build(:user, username: reserved) - user.should_not be_valid - user.errors[:username].should == ["is reserved"] - end - end + it 'instantiates new user with omniauth if the user is not on file' do + omniauth = { 'info' => { 'name' => 'Matthew Deiters', 'urls' => { 'Blog' => 'http://www.theagiledeveloper.com', 'GitHub' => 'http://github.com/mdeiters' }, 'nickname' => 'mdeiters', 'email' => '' }, 'uid' => 7330, 'credentials' => { 'token' => 'f0f6946eb12c4156a7a567fd73aebe4d3cdde4c8' }, 'extra' => { 'user_hash' => { 'plan' => { 'name' => 'micro', 'collaborators' => 1, 'space' => 614_400, 'private_repos' => 5 }, 'gravatar_id' => 'aacb7c97f7452b3ff11f67151469e3b0', 'company' => nil, 'name' => 'Matthew Deiters', 'created_at' => '2008/04/14 15:53:10 -0700', 'location' => '', 'disk_usage' => 288_049, 'collaborators' => 0, 'public_repo_count' => 18, 'public_gist_count' => 31, 'blog' => 'http://www.theagiledeveloper.com', 'following_count' => 27, 'id' => 7330, 'owned_private_repo_count' => 2, 'private_gist_count' => 2, 'type' => 'User', 'permission' => nil, 'total_private_repo_count' => 2, 'followers_count' => 19, 'login' => 'mdeiters', 'email' => '' } }, 'provider' => 'github' } - it "should not allow a username with a period character" do - user = Fabricate.build(:user, username: "foo.bar") - user.should_not be_valid - user.errors[:username].should == ["must not contain a period"] - end + user = User.for_omniauth(omniauth.with_indifferent_access) + expect(user).to be_new_record end describe 'score' do @@ -299,69 +187,30 @@ class AlsoNotaBadge < BadgeBase let(:endorser) { Fabricate(:user) } it 'calculates weight of badges' do - user.achievement_score.should == 0 + expect(user.achievement_score).to eq(0) user.award(Cub.new(user)) - user.achievement_score.should == 1 + expect(user.achievement_score).to eq(1) user.award(Philanthropist.new(user)) - user.achievement_score.should == 4 + expect(user.achievement_score).to eq(4) end it 'should penalize by amount or 1' do user.award(Cub.new(user)) - user.score.should == 1 + expect(user.score).to eq(1) user.penalize! - user.reload.score.should == 0 + expect(user.reload.score).to eq(0) endorser.endorse(user, 'Ruby') endorser.endorse(user, 'C++') endorser.endorse(user, 'CSS') user.reload - user.score.should == 0.16666666666666674 + expect(user.score).to eq(0.16666666666666674) user.penalize!(0.3) - user.reload.score.should == 0.866666666666667 + expect(user.reload.score).to eq(0.866666666666667) user.penalize!(2.0) - user.reload.score.should == 0 + expect(user.reload.score).to eq(0) end end - it 'should indicate when user is on a premium team' do - team = Fabricate(:team, premium: true) - team.add_user(user = Fabricate(:user)) - user.on_premium_team?.should == true - end - - it 'should indicate a user not on a premium team when they dont belong to a team at all' do - user = Fabricate(:user) - user.on_premium_team?.should == false - end - - it 'should not error if the users team has been deleted' do - team = Fabricate(:team) - user = Fabricate(:user) - team.add_user(user) - team.destroy - user.team.should be_nil - end - - it 'can follow another user' do - user = Fabricate(:user) - other_user = Fabricate(:user) - user.follow(other_user) - other_user.followed_by?(user).should == true - - user.following?(other_user).should == true - end - - it 'should pull twitter follow list and follow any users on our system' do - Twitter.should_receive(:friend_ids).with(6271932).and_return(['1111', '2222']) - - user = Fabricate(:user, twitter_id: 6271932) - other_user = Fabricate(:user, twitter_id: '1111') - user.should_not be_following(other_user) - user.build_follow_list! - - user.should be_following(other_user) - end - describe 'skills' do let(:user) { Fabricate(:user) } @@ -369,35 +218,12 @@ class AlsoNotaBadge < BadgeBase user.add_skill('Ruby') user.add_skill('Ruby ') user.reload - user.should have(1).skill + expect(user.skills.size).to eq(1) end it 'finds skill by name' do skill_created = user.add_skill('Ruby') - user.skill_for('ruby').should == skill_created - end - end - - describe 'api key' do - let(:user) { Fabricate(:user) } - - it 'should assign and save an api_key if not exists' do - api_key = user.api_key - api_key.should_not be_nil - api_key.should == user.api_key - user.reload - user.api_key.should == api_key - end - - it 'should assign a new api_key if the one generated already exists' do - RandomSecure = double('RandomSecure') - RandomSecure.stub(:hex).and_return("0b5c141c21c15b34") - user2 = Fabricate(:user) - api_key2 = user2.api_key - user2.api_key = RandomSecure.hex(8) - user2.api_key.should_not == api_key2 - api_key1 = user.api_key - api_key1.should_not == api_key2 + expect(user.skill_for('ruby')).to eq(skill_created) end end @@ -405,25 +231,26 @@ class AlsoNotaBadge < BadgeBase let(:user) { Fabricate(:user) } it 'indicates when a user has not seen a feature' do - user.seen?('some_feature').should == false + expect(user.seen?('some_feature')).to eq(false) end it 'indicates when a user has seen a feature' do user.seen('some_feature') - user.seen?('some_feature').should == true + expect(user.seen?('some_feature')).to eq(true) end end - describe 'following' do - let(:user) { Fabricate(:user) } - let(:followable) { Fabricate(:user) } + describe 'banning' do + let(:user) { Fabricate(:user) } + + it 'should respond to banned? public method' do + expect(user.respond_to?(:banned?)).to be_truthy + end + + it 'should not default to banned' do + expect(user.banned?).to eq(false) + end + end + - it 'should follow another user only once' do - user.following_by_type(User.name).size.should == 0 - user.follow(followable) - user.following_by_type(User.name).size.should == 1 - user.follow(followable) - user.following_by_type(User.name).size.should == 1 - end - end end diff --git a/spec/models/users/github/organization_spec.rb b/spec/models/users/github/organization_spec.rb new file mode 100644 index 00000000..8403f297 --- /dev/null +++ b/spec/models/users/github/organization_spec.rb @@ -0,0 +1,22 @@ +# == Schema Information +# +# Table name: users_github_organizations +# +# id :integer not null, primary key +# login :string(255) +# company :string(255) +# blog :string(255) +# location :string(255) +# url :string(255) +# github_id :integer +# github_created_at :datetime +# github_updated_at :datetime +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'rails_helper' + +RSpec.describe Users::Github::Organization, type: :model do + it { is_expected.to have_many :followers } +end diff --git a/spec/models/users/github/organizations/follower_spec.rb b/spec/models/users/github/organizations/follower_spec.rb new file mode 100644 index 00000000..d22813fb --- /dev/null +++ b/spec/models/users/github/organizations/follower_spec.rb @@ -0,0 +1,16 @@ +# == Schema Information +# +# Table name: users_github_organizations_followers +# +# organization_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'rails_helper' + +RSpec.describe Users::Github::Organizations::Follower, type: :model do + it { is_expected.to belong_to :profile } + it { is_expected.to belong_to :organization } +end diff --git a/spec/models/users/github/profile_spec.rb b/spec/models/users/github/profile_spec.rb new file mode 100644 index 00000000..75f6974f --- /dev/null +++ b/spec/models/users/github/profile_spec.rb @@ -0,0 +1,40 @@ +# == Schema Information +# +# Table name: users_github_profiles +# +# id :integer not null, primary key +# login :citext not null +# name :string(255) +# company :string(255) +# location :string(255) +# github_id :integer +# user_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# hireable :boolean default(FALSE) +# followers_count :integer default(0) +# following_count :integer default(0) +# github_created_at :datetime +# github_updated_at :datetime +# spider_updated_at :datetime +# + +require 'rails_helper' +require 'vcr_helper' + +RSpec.describe Users::Github::Profile, type: :model, skip: true do + it { is_expected.to belong_to :user } + it { is_expected.to have_many :followers } + it { is_expected.to have_many :repositories } + + context 'creation', vcr: { cassette_name: 'github_for seuros'} do + it 'should get info from github' do + user = Fabricate(:user) { github 'seuros' } + profile = user.create_github_profile + profile.reload + + expect(profile.name).to eq('Abdelkader Boudih') + expect(profile.github_id).to eq(2_394_703) + end + end +end diff --git a/spec/models/users/github/profiles/follower_spec.rb b/spec/models/users/github/profiles/follower_spec.rb new file mode 100644 index 00000000..5ed466f3 --- /dev/null +++ b/spec/models/users/github/profiles/follower_spec.rb @@ -0,0 +1,16 @@ +# == Schema Information +# +# Table name: users_github_profiles_followers +# +# follower_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'rails_helper' + +RSpec.describe Users::Github::Profiles::Follower, type: :model do + it { is_expected.to belong_to :profile } + it { is_expected.to belong_to :follower } +end diff --git a/spec/models/users/github/repositories/contributor_spec.rb b/spec/models/users/github/repositories/contributor_spec.rb new file mode 100644 index 00000000..43c9ec2f --- /dev/null +++ b/spec/models/users/github/repositories/contributor_spec.rb @@ -0,0 +1,16 @@ +# == Schema Information +# +# Table name: users_github_repositories_contributors +# +# repository_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'rails_helper' + +RSpec.describe Users::Github::Repositories::Contributor, type: :model do + it { is_expected.to belong_to :profile } + it { is_expected.to belong_to :repository } +end diff --git a/spec/models/users/github/repositories/follower_spec.rb b/spec/models/users/github/repositories/follower_spec.rb new file mode 100644 index 00000000..25fa9960 --- /dev/null +++ b/spec/models/users/github/repositories/follower_spec.rb @@ -0,0 +1,16 @@ +# == Schema Information +# +# Table name: users_github_repositories_followers +# +# repository_id :integer not null +# profile_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'rails_helper' + +RSpec.describe Users::Github::Repositories::Follower, type: :model do + it { is_expected.to belong_to :profile } + it { is_expected.to belong_to :repository } +end diff --git a/spec/models/users/github/repository_spec.rb b/spec/models/users/github/repository_spec.rb new file mode 100644 index 00000000..24a08831 --- /dev/null +++ b/spec/models/users/github/repository_spec.rb @@ -0,0 +1,31 @@ +# == Schema Information +# +# Table name: users_github_repositories +# +# id :integer not null, primary key +# name :string(255) +# description :text +# full_name :string(255) +# homepage :string(255) +# fork :boolean default(FALSE) +# forks_count :integer default(0) +# forks_count_updated_at :datetime default(2014-07-23 03:14:37 UTC) +# stargazers_count :integer default(0) +# stargazers_count_updated_at :datetime default(2014-07-23 03:14:37 UTC) +# language :string(255) +# followers_count :integer default(0), not null +# github_id :integer not null +# owner_id :integer +# organization_id :integer +# created_at :datetime not null +# updated_at :datetime not null +# + +require 'rails_helper' + +RSpec.describe Users::Github::Repository, type: :model do + it { is_expected.to have_many :followers } + it { is_expected.to have_many :contributors } + it { is_expected.to belong_to :organization } + it { is_expected.to belong_to :owner } +end diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb new file mode 100644 index 00000000..cf38678b --- /dev/null +++ b/spec/rails_helper.rb @@ -0,0 +1,18 @@ +require 'spec_helper.rb' + +require 'capybara/poltergeist' +require 'capybara-screenshot/rspec' +require 'rack_session_access/capybara' +require 'features/helpers/general_helpers.rb' + +Capybara.javascript_driver = :poltergeist +Capybara.default_wait_time = 5 + +RSpec.configure do |config| + config.before(:example, js: :true) do + DatabaseCleaner.strategy = :truncation + ActiveRecord::Base.establish_connection + end + + config.include Features::GeneralHelpers, type: :feature +end diff --git a/spec/requests/invitations_spec.rb b/spec/requests/invitations_spec.rb new file mode 100644 index 00000000..6bfc4b8e --- /dev/null +++ b/spec/requests/invitations_spec.rb @@ -0,0 +1,49 @@ +require 'spec_helper' + +RSpec.describe 'Viewing an invitation', type: :request, skip: true do + + before :each do + @user = Fabricate(:user) + @team = Fabricate(:team) + end + + describe 'when logged in' do + + def sign_in + allow(User).to receive(:find_with_oauth).and_return(@user) + post '/sessions' + end + + it 'should render invitation page for logged in user' do + sign_in + + # Stub out what we need from our controller + allow(Team).to receive(:find).with(@team.id).and_return(@team) + allow(@team).to receive(:has_user_with_referral_token?).and_return(true) + allow(@team).to receive(:top_three_team_members).and_return([@user]) + + get invitation_url(id: @team.id, r: @user.referral_token) + + expect(response.body).to include('Join this team') + expect(response).to render_template('invitations/show') + expect(response.code).to eq('200') + end + + end + + describe 'when logged out' do + it 'should show invitation page asking user to sign in' do + # Stub out what we need from our controller + allow(Team).to receive(:find).with(@team.id).and_return(@team) + allow(@team).to receive(:has_user_with_referral_token?).and_return(true) + + get invitation_url(id: @team.id, r: @user.referral_token) + + expect(response.body).to include('you need to create a coderwall account') + expect(response).to render_template('invitations/show') + expect(response.code).to eq('200') + end + + end + +end diff --git a/spec/requests/protips_spec.rb b/spec/requests/protips_spec.rb index aea1fc2f..b6699c3f 100644 --- a/spec/requests/protips_spec.rb +++ b/spec/requests/protips_spec.rb @@ -1,4 +1,4 @@ -describe "Viewing a protip" do +RSpec.describe 'Viewing a protip', type: :request do describe 'when user coming from topic page' do let(:topic) { 'Ruby' } @@ -10,30 +10,30 @@ @protip3 = Fabricate(:protip, topics: topic, user: Fabricate(:user)) end - it 'returns them to the topic page when they use :back', pending: 'obsolete?' do + it 'returns them to the topic page when they use :back', skip: 'obsolete?' do visit tagged_protips_path(tags: topic) - #save_and_open_page + # save_and_open_page click_link @protip1.title - page.should have_content(@protip1.title) + expect(page).to have_content(@protip1.title) click_link 'Back' - page.should have_content(@protip1.title) - page.should have_content(@protip2.title) - page.should have_content(@protip3.title) + expect(page).to have_content(@protip1.title) + expect(page).to have_content(@protip2.title) + expect(page).to have_content(@protip3.title) end - it 'has a link that takes them to next protip in topic page if there is one', search: true, pending: 'obsolete?' do + it 'has a link that takes them to next protip in topic page if there is one', search: true, skip: 'obsolete?' do visit tagged_protips_path(tags: topic) click_link @protip1.title - #save_and_open_page - page.should have_content(@protip1.title) - page.should have_content(protip_path(@protip2)) - page.should_not have_content(protip_path(@protip3)) + # save_and_open_page + expect(page).to have_content(@protip1.title) + expect(page).to have_content(protip_path(@protip2)) + expect(page).not_to have_content(protip_path(@protip3)) click_link @protip2.title - page.should_not have_content(@protip1.title) + expect(page).not_to have_content(@protip1.title) end end diff --git a/spec/requests/users_spec.rb b/spec/requests/users_spec.rb new file mode 100644 index 00000000..c5ab4421 --- /dev/null +++ b/spec/requests/users_spec.rb @@ -0,0 +1,20 @@ +RSpec.describe 'User management', type: :request do + + describe 'deleting a user' do + it 'deletes associated protips and reindex search index' do + user = Fabricate(:user) + + Protip.rebuild_index + protip_1, protip_2 = Fabricate.times(2, :protip, user: user) + protip_3 = Fabricate(:protip) + + user.reload.destroy + search = Protip.search('*').map(&:title) + + expect(search).not_to include(protip_1.title) + expect(search).not_to include(protip_2.title) + expect(search).to include(protip_3.title) + end + end + +end diff --git a/spec/routing/achievements_routing_spec.rb b/spec/routing/achievements_routing_spec.rb new file mode 100644 index 00000000..17f1377c --- /dev/null +++ b/spec/routing/achievements_routing_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe AchievementsController, type: :routing do + describe 'routing' do + + it 'routes to #award' do + expect(post('/award')).to route_to(controller: 'achievements', action: 'award') + end + + end +end diff --git a/spec/routing/opportunities_routing_spec.rb b/spec/routing/opportunities_routing_spec.rb new file mode 100644 index 00000000..d15c72b5 --- /dev/null +++ b/spec/routing/opportunities_routing_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe OpportunitiesController, type: :routing do + describe 'routing' do + + it 'routes to #new' do + expect(get('/teams/12345/opportunities/new')).to route_to(controller: 'opportunities', action: 'new', team_id: '12345') + end + + end +end diff --git a/spec/routing/protips_routing_spec.rb b/spec/routing/protips_routing_spec.rb index b3e9446b..5710d404 100644 --- a/spec/routing/protips_routing_spec.rb +++ b/spec/routing/protips_routing_spec.rb @@ -1,29 +1,11 @@ -describe ProtipsController do - describe "routing" do - - it "routes to #topic" do - get("/p/t").should route_to("networks#tag") - end - - it "routes to #new" do - get("/p/new").should route_to("protips#new") - end - - it "routes to #show" do - get("/p/hazc5q").should route_to("protips#show", id: "hazc5q") +RSpec.describe ProtipsController, type: :routing do + describe 'routing' do + it 'GET p/:id/:slug routes to #show' do + expect(get('/p/1234/abcd')).to route_to(controller: 'protips', action: 'show', id: '1234', slug: 'abcd') end - it "routes to #edit" do - get("/p/hazc5q/edit").should route_to("protips#edit", id: "hazc5q") + it 'POST p/:id/upvote routes to #upvote' do + expect(post('/p/abcd/upvote')).to route_to(controller: 'protips', action: 'upvote', id: 'abcd') end - - it "routes to #create" do - post("/p").should route_to("protips#create") - end - - it "routes to #update" do - put("/p/hazc5q").should route_to("protips#update", id: "hazc5q") - end - end end diff --git a/spec/routing/resume_uploads_spec.rb b/spec/routing/resume_uploads_spec.rb new file mode 100644 index 00000000..48772c69 --- /dev/null +++ b/spec/routing/resume_uploads_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe ResumeUploadsController, type: :routing do + describe 'routing' do + + it 'routes to #create' do + expect(post('/resume_uploads')).to route_to(controller: 'resume_uploads', action: 'create') + end + + end +end diff --git a/spec/routing/teams_routing_spec.rb b/spec/routing/teams_routing_spec.rb new file mode 100644 index 00000000..43929898 --- /dev/null +++ b/spec/routing/teams_routing_spec.rb @@ -0,0 +1,19 @@ +RSpec.describe TeamsController, type: :routing do + describe 'routing' do + it 'routes to #show' do + expect(get('/team/coderwall')).to route_to(controller: 'teams', action: 'show', slug: 'coderwall') + end + + it 'routes to #edit with ' do + expect(get('/team/test-team/edit')).to route_to(controller: 'teams', action: 'edit', slug: 'test-team') + end + + it 'routes to #edit' do + expect(get('/team/coderwall/edit')).to route_to(controller: 'teams', action: 'edit', slug: 'coderwall') + end + + it 'routes to #show with job id' do + expect(get('/team/coderwall/666')).to route_to(controller: 'teams', action: 'show', slug: 'coderwall', job_id: '666') + end + end +end diff --git a/spec/routing/unbans_routing_spec.rb b/spec/routing/unbans_routing_spec.rb new file mode 100644 index 00000000..b075925f --- /dev/null +++ b/spec/routing/unbans_routing_spec.rb @@ -0,0 +1,10 @@ +# TODO This file should be removed +RSpec.describe UnbansController, type: :routing do + describe 'routing' do + + it 'routes to #create' do + expect(post('/users/666/bans')).to route_to(controller: 'bans', action: 'create', user_id: '666') + end + + end +end diff --git a/spec/routing/users_routing_spec.rb b/spec/routing/users_routing_spec.rb new file mode 100644 index 00000000..c1713a06 --- /dev/null +++ b/spec/routing/users_routing_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe UsersController, type: :routing do + describe 'routing' do + + it 'routes to #show' do + expect(get('/seuros')).to route_to(controller: 'users', action: 'show', username: 'seuros') + end + + end +end diff --git a/spec/services/banning/banning_spec.rb b/spec/services/banning/banning_spec.rb new file mode 100644 index 00000000..8652a41e --- /dev/null +++ b/spec/services/banning/banning_spec.rb @@ -0,0 +1,57 @@ +require 'spec_helper' + +RSpec.describe 'Services::Banning::', skip: true do + + describe 'User' do + let(:user) { Fabricate(:user) } + + it 'should ban a user ' do + expect(user.banned?).to eq(false) + Services::Banning::UserBanner.ban(user) + expect(user.banned?).to eq(true) + end + + it 'should unban a user' do + Services::Banning::UserBanner.ban(user) + expect(user.banned?).to eq(true) + Services::Banning::UserBanner.unban(user) + expect(user.banned?).to eq(false) + end + end + + describe 'DeindexUserProtips' do + before(:each) do + Protip.rebuild_index + end + + it 'should deindex all of a users protips' do + user = Fabricate(:user) + protip_1 = Fabricate(:protip, body: 'First', title: 'look at this content 1', user: user) + protip_2 = Fabricate(:protip, body: 'Second', title: 'look at this content 2', user: user) + user.reload + + expect(Protip.search('this content').count).to eq(2) + Services::Banning::DeindexUserProtips.run(user) + expect(Protip.search('this content').count).to eq(0) + end + end + + describe 'IndexUserProtips' do + before(:each) do + Protip.rebuild_index + end + + it 'should deindex all of a users protips' do + user = Fabricate(:user) + protip_1 = Fabricate(:protip, body: 'First', title: 'look at this content 1', user: user) + protip_2 = Fabricate(:protip, body: 'Second', title: 'look at this content 2', user: user) + search = lambda { Protip.search('this content') } + user.reload + + Services::Banning::DeindexUserProtips.run(user) + expect(search.call.count).to eq(0) + Services::Banning::IndexUserProtips.run(user) + expect(search.call.count).to eq(2) + end + end +end diff --git a/spec/services/provider_user_lookup_service_spec.rb b/spec/services/provider_user_lookup_service_spec.rb new file mode 100644 index 00000000..4c1e1e5e --- /dev/null +++ b/spec/services/provider_user_lookup_service_spec.rb @@ -0,0 +1,38 @@ +require 'spec_helper' + +RSpec.describe ProviderUserLookupService do + let(:twitter_username) { 'birdy' } + let!(:user) do + Fabricate.create(:user, twitter: twitter_username) + end + + describe '#lookup_user' do + let(:provider) { 'twitter' } + let(:service) { ProviderUserLookupService.new(provider, username) } + + describe 'unknown provider' do + let(:provider) { 'unknown' } + let(:username) { 'unknown' } + + it 'returns nil' do + expect(service.lookup_user).to be_nil + end + end + + describe 'unknown user' do + let(:username) { 'unknown' } + + it 'returns nil' do + expect(service.lookup_user).to be_nil + end + end + + describe 'known provider and user' do + let(:username) { twitter_username } + + it 'returns the user' do + expect(service.lookup_user).to eql(user) + end + end + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a55c1f46..75291c2e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,47 +1,43 @@ -require 'simplecov' -SimpleCov.start 'rails' - -ENV['RAILS_ENV'] ||= 'test' -require File.expand_path("../../config/environment", __FILE__) +ENV['RAILS_ENV'] = 'test' +require File.expand_path('../../config/environment', __FILE__) require 'rspec/rails' -require 'rspec/autorun' require 'capybara/rspec' require 'database_cleaner' require 'webmock/rspec' -WebMock.disable_net_connect!(allow_localhost: true) + +require 'sidekiq/testing/inline' Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } DatabaseCleaner.logger = Rails.logger +Rails.logger.level = 5 -LOCAL_ELASTIC_SEARCH_SERVER = %r[^http://localhost:9200] unless defined?(LOCAL_ELASTIC_SEARCH_SERVER) +LOCAL_ELASTIC_SEARCH_SERVER = %r{^http://localhost:9200} unless defined?(LOCAL_ELASTIC_SEARCH_SERVER) RSpec.configure do |config| - config.treat_symbols_as_metadata_keys_with_true_values = true - + config.raise_errors_for_deprecations! config.mock_with :rspec config.use_transactional_fixtures = false config.use_transactional_examples = false - config.before(:all) do - REDIS.SELECT(testdb = 1) - REDIS.flushdb - + config.before(:suite) do + Redis.current.SELECT(testdb = 1) + Redis.current.flushdb end config.before(:suite) do - DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with(:truncation) end - config.before(:each) do - Mongoid.master.collections.reject { |c| c.name =~ /^system/ }.each(&:drop) + config.before(:example) do + DatabaseCleaner.strategy = :transaction DatabaseCleaner.start + ActionMailer::Base.deliveries.clear end - config.after(:each) do + config.after(:example) do DatabaseCleaner.clean end diff --git a/spec/support/admin_shared_examples.rb b/spec/support/admin_shared_examples.rb new file mode 100644 index 00000000..97738bff --- /dev/null +++ b/spec/support/admin_shared_examples.rb @@ -0,0 +1,8 @@ +shared_examples 'admin controller with #create' do + it 'only allows admins on #create', skip: true do + user = Fabricate(:user) + controller.send :sign_in, user + post :create, { user_id: 1 }, {} + expect(response.response_code).to eq(403) + end +end diff --git a/spec/support/auth_helper.rb b/spec/support/auth_helper.rb index c5290de3..089a1bc7 100644 --- a/spec/support/auth_helper.rb +++ b/spec/support/auth_helper.rb @@ -5,4 +5,3 @@ def http_authorize!(username = ENV['HTTP_AUTH_USERNAME'], password = ENV['HTTP_A request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(username, password) end end - diff --git a/spec/support/fixture_helper.rb b/spec/support/fixture_helper.rb index 57be49f6..2d3e494c 100644 --- a/spec/support/fixture_helper.rb +++ b/spec/support/fixture_helper.rb @@ -1,10 +1,10 @@ -#def listen_and_respond_with(url, filename) - #FakeWeb.register_uri(:get, url, body: response_from_disk(filename)) -#end +# def listen_and_respond_with(url, filename) +# FakeWeb.register_uri(:get, url, body: response_from_disk(filename)) +# end -#def listen_and_return(url, contents) - #FakeWeb.register_uri(:get, url, body: contents) -#end +# def listen_and_return(url, contents) +# FakeWeb.register_uri(:get, url, body: contents) +# end def response_from_disk(name) filename = "#{name}.js" diff --git a/spec/support/omniauth_support.rb b/spec/support/omniauth_support.rb index 68db4b31..4b7793d6 100644 --- a/spec/support/omniauth_support.rb +++ b/spec/support/omniauth_support.rb @@ -1,9 +1,9 @@ def make_env(path = '/auth/test', props = {}) { - 'REQUEST_METHOD' => 'GET', - 'PATH_INFO' => path, - 'rack.session' => {}, - 'rack.input' => StringIO.new('test=true') + 'REQUEST_METHOD' => 'GET', + 'PATH_INFO' => path, + 'rack.session' => {}, + 'rack.input' => StringIO.new('test=true') }.merge(props) end @@ -21,13 +21,13 @@ def request_phase @fail = fail!(options[:failure]) if options[:failure] @last_env = env return @fail if @fail - raise "Request Phase" + fail 'Request Phase' end def callback_phase @fail = fail!(options[:failure]) if options[:failure] @last_env = env return @fail if @fail - raise "Callback Phase" + fail 'Callback Phase' end -end \ No newline at end of file +end diff --git a/spec/support/test_accounts.rb b/spec/support/test_accounts.rb deleted file mode 100644 index 8d866fbb..00000000 --- a/spec/support/test_accounts.rb +++ /dev/null @@ -1,3 +0,0 @@ -def test_github_token - 'f0f6946eb12c4156a7a567fd73aebe4d3cdde4c8' -end \ No newline at end of file diff --git a/spec/support/vcr.rb b/spec/support/vcr.rb deleted file mode 100644 index 822f5d42..00000000 --- a/spec/support/vcr.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'vcr' - -VCR.configure do |c| - c.cassette_library_dir = 'vcr_cassettes' - c.hook_into :webmock - c.ignore_localhost = true - c.default_cassette_options = { record: :new_episodes } - c.allow_http_connections_when_no_cassette = true -end - -RSpec.configure do |c| - c.around(:each) do |example| - VCR.use_cassette(example.metadata[:full_description]) do - example.run - end - end -end diff --git a/spec/support/web_helper.rb b/spec/support/web_helper.rb deleted file mode 100644 index 2e75480f..00000000 --- a/spec/support/web_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ -#def allow_http - #begin - #FakeWeb.allow_net_connect = true - #yield - #ensure - #FakeWeb.allow_net_connect = false - #end -#end diff --git a/spec/uploaders/avatar_uploader_spec.rb b/spec/uploaders/avatar_uploader_spec.rb new file mode 100644 index 00000000..cae73773 --- /dev/null +++ b/spec/uploaders/avatar_uploader_spec.rb @@ -0,0 +1,23 @@ +require 'rails_helper' + +RSpec.describe AvatarUploader do + + context 'user' do + describe 'default url' do + it 'should provide the default url' do + user = Fabricate(:user) + expect(user.avatar.url).to eq('/assets/user-avatar.png') + end + end + end + + context 'team' do + describe 'default url' do + it 'should provide the default url' do + team = Fabricate(:team) + expect(team.avatar.url).to eq('/assets/team-avatar.png') + end + end + end + +end diff --git a/spec/vcr_helper.rb b/spec/vcr_helper.rb new file mode 100644 index 00000000..1475b0de --- /dev/null +++ b/spec/vcr_helper.rb @@ -0,0 +1,55 @@ +require 'vcr' +require 'rails_helper.rb' + +def record_mode + case ENV['VCR_RECORD_MODE'] + when 'all' + :all + when 'new' + :new_episodes + when 'once' + :once + else + :none + end +end + +VCR.configure do |c| + c.cassette_library_dir = 'spec/fixtures/vcr_cassettes' + c.hook_into :webmock + c.ignore_localhost = true + c.default_cassette_options = { record: record_mode } + c.allow_http_connections_when_no_cassette = false + c.configure_rspec_metadata! + + # Github + c.filter_sensitive_data('<GITHUB_ADMIN_USER_PASSWORD>') { ENV['GITHUB_ADMIN_USER_PASSWORD'] } + c.filter_sensitive_data('<GITHUB_CLIENT_ID>') { ENV['GITHUB_CLIENT_ID'] } + c.filter_sensitive_data('<GITHUB_SECRET>') { ENV['GITHUB_SECRET'] } + + # LinkedIn + c.filter_sensitive_data('<LINKEDIN_KEY>') { ENV['LINKEDIN_KEY'] } + c.filter_sensitive_data('<LINKEDIN_SECRET>') { ENV['LINKEDIN_SECRET'] } + + # Mailgun + c.filter_sensitive_data('<MAILGUN_API_KEY>') { ENV['MAILGUN_API_KEY'] } + c.filter_sensitive_data('<MAILGUN_TOKEN>') { ENV['MAILGUN_TOKEN'] } + + # Mixpanel + c.filter_sensitive_data('<MIXPANEL_API_SECRET>') { ENV['MIXPANEL_API_SECRET'] } + c.filter_sensitive_data('<MIXPANEL_TOKEN>') { ENV['MIXPANEL_TOKEN'] } + + # Twitter + c.filter_sensitive_data('<TWITTER_ACCOUNT_ID>') { ENV['TWITTER_ACCOUNT_ID'] } + c.filter_sensitive_data('<TWITTER_CONSUMER_KEY>') { ENV['TWITTER_CONSUMER_KEY'] } + c.filter_sensitive_data('<TWITTER_CONSUMER_SECRET>') { ENV['TWITTER_CONSUMER_SECRET'] } + c.filter_sensitive_data('<TWITTER_OAUTH_SECRET>') { ENV['TWITTER_OAUTH_SECRET'] } + c.filter_sensitive_data('<TWITTER_OAUTH_TOKEN>') { ENV['TWITTER_OAUTH_TOKEN'] } + + # Stripe + c.filter_sensitive_data('<STRIPE_PUBLISHABLE_KEY>') { ENV['STRIPE_PUBLISHABLE_KEY'] } + c.filter_sensitive_data('<STRIPE_SECRET_KEY>') { ENV['STRIPE_SECRET_KEY'] } + + # Akismet + c.filter_sensitive_data('<AKISMET_KEY>') { ENV['AKISMET_KEY'] } +end diff --git a/spec/views/callbacks/protip/update.html.erb_spec.rb b/spec/views/callbacks/protip/update.html.erb_spec.rb deleted file mode 100644 index 25d42323..00000000 --- a/spec/views/callbacks/protip/update.html.erb_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe "protip/update.html.erb" do - pending "add some examples to (or delete) #{__FILE__}" -end diff --git a/spec/views/callbacks/protips/update.html.erb_spec.rb b/spec/views/callbacks/protips/update.html.erb_spec.rb deleted file mode 100644 index 05a00b63..00000000 --- a/spec/views/callbacks/protips/update.html.erb_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe "protips/update.html.erb" do - pending "add some examples to (or delete) #{__FILE__}" -end diff --git a/spec/workers/activate_pending_users_worker_spec.rb b/spec/workers/activate_pending_users_worker_spec.rb new file mode 100644 index 00000000..2c820620 --- /dev/null +++ b/spec/workers/activate_pending_users_worker_spec.rb @@ -0,0 +1,8 @@ +RSpec.describe ActivatePendingUsersWorker do + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ActivatePendingUsersWorker.get_sidekiq_options['queue']). + to eql :user + end + end +end diff --git a/spec/workers/protip_mailer_popular_protips_send_worker_spec.rb b/spec/workers/protip_mailer_popular_protips_send_worker_spec.rb new file mode 100644 index 00000000..b3ddaf88 --- /dev/null +++ b/spec/workers/protip_mailer_popular_protips_send_worker_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe ProtipMailerPopularProtipsSendWorker do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ProtipMailerPopularProtipsSendWorker.get_sidekiq_options['queue']). + to eql :mailer + end + end + +end diff --git a/spec/workers/protip_mailer_popular_protips_worker_spec.rb b/spec/workers/protip_mailer_popular_protips_worker_spec.rb new file mode 100644 index 00000000..32eb0779 --- /dev/null +++ b/spec/workers/protip_mailer_popular_protips_worker_spec.rb @@ -0,0 +1,10 @@ +RSpec.describe ProtipMailerPopularProtipsWorker do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(ProtipMailerPopularProtipsWorker.get_sidekiq_options['queue']). + to eql :mailer + end + end + +end diff --git a/spec/workers/refresh_stale_users_worker_spec.rb b/spec/workers/refresh_stale_users_worker_spec.rb new file mode 100644 index 00000000..0db08378 --- /dev/null +++ b/spec/workers/refresh_stale_users_worker_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe RefreshStaleUsersWorker do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(RefreshStaleUsersWorker.get_sidekiq_options['queue']).to eql :user + end + end + +end diff --git a/spec/workers/sitemap_refresh_worker_spec.rb b/spec/workers/sitemap_refresh_worker_spec.rb new file mode 100644 index 00000000..d2cc3618 --- /dev/null +++ b/spec/workers/sitemap_refresh_worker_spec.rb @@ -0,0 +1,9 @@ +RSpec.describe SitemapRefreshWorker do + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(SitemapRefreshWorker.get_sidekiq_options['queue']).to eql :index + end + end + +end diff --git a/spec/workers/user_activate_worker_spec.rb b/spec/workers/user_activate_worker_spec.rb new file mode 100644 index 00000000..c32abc26 --- /dev/null +++ b/spec/workers/user_activate_worker_spec.rb @@ -0,0 +1,58 @@ +require 'vcr_helper' +require 'sidekiq/testing' + +Sidekiq::Testing.inline! + +RSpec.describe UserActivateWorker do + let(:worker) { UserActivateWorker.new } + + describe 'queueing' do + it 'pushes jobs to the correct queue' do + expect(UserActivateWorker.get_sidekiq_options['queue']).to eql :user + end + end + + describe('#perform') do + context 'when invalid user' do + let(:user_id) { 1 } + + it { expect { worker.perform(user_id) }.not_to raise_error } + end + + context 'when pending user' do + let(:user) { Fabricate(:pending_user) } + + it 'should activate user' do + worker.perform(user.id) + user.reload + + expect(user.active?).to eq(true) + expect(user.activated_on).not_to eq(nil) + end + + it 'should send welcome mail' do + mail = double('mail') + expect(NotifierMailer).to receive(:welcome_email).with(user.id).and_return(mail) + expect(mail).to receive(:deliver) + worker.perform(user.id) + end + + it 'should create refresh job' do + expect_any_instance_of(RefreshUserJob).to receive(:perform).with(user.id) + worker.perform(user.id) + end + + end + + context 'when activate user' do + let(:user) { Fabricate(:user) } + + it 'should do nothing' do + worker.perform(user.id) + user.reload + + expect(user.updated_at).to eq(user.created_at) + end + end + end +end diff --git a/tail_logs.sh b/tail_logs.sh new file mode 100644 index 00000000..77f953ce --- /dev/null +++ b/tail_logs.sh @@ -0,0 +1 @@ +heroku logs -t -p web --app coderwall-production diff --git a/vagrant.yml.example b/vagrant.yml.example new file mode 100644 index 00000000..45a45be9 --- /dev/null +++ b/vagrant.yml.example @@ -0,0 +1,13 @@ +# Custom Vagrant Settings [Example] +# +# This file allows the override of Vagrant settings. +# In order to use, create a copy named vagrant.yml +# + +use_nfs: false +virtualbox: + cpus: 2 + memory: 2048 +network: + port_mappings: + rails: 3000 diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index 59d56651..25df8392 100755 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -1,13 +1,13 @@ #!/bin/bash -x export DEBIAN_FRONTEND=noninteractive -cd /home/vagrant -echo Who am I? You are `whoami`. -echo Where am I? You are in `pwd` -echo I think my home is $HOME -echo export EDITOR=vim >> $HOME/.bashrc -# Enable accessing Postgres from the host machin -echo "listen_addresses = '*'" | tee -a /var/pgsql/data/postgresql.conf -echo host all all 0.0.0.0/0 trust | tee -a /var/pgsql/data/pg_hba.conf -sudo su postgres -c 'pg_ctl stop -D /var/pgsql/data 2>&1' -sudo su postgres -c 'pg_ctl start -D /var/pgsql/data 2>&1 &' -su -c "source /home/vagrant/web/vagrant/user-config.sh" vagrant + +# Ensure the database is started +su -c '/usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data' postgres + +su - vagrant <<-'EOF' + cd ~/web + bundle check || bundle install + # Force the app to use the internal Postgres port number and ignore .env + bundle exec rake db:migrate + bundle exec rake db:test:prepare +EOF diff --git a/vagrant/coderwall-box/rebuild.sh b/vagrant/coderwall-box/rebuild.sh new file mode 100755 index 00000000..8922823e --- /dev/null +++ b/vagrant/coderwall-box/rebuild.sh @@ -0,0 +1,11 @@ +cd ~/assemblymade/coderwall +vagrant halt +vagrant destroy -f +vagrant box remove coderwall +cd vagrant/coderwall-box +rm -rf output-virtualbox-iso +rm -rf packer_virtualbox-iso_virtualbox.box +rm -rf packer_cache +packer validate template.json +packer build template.json +vagrant box add coderwall ./packer_virtualbox-iso_virtualbox.box diff --git a/vagrant/coderwall-box/scripts/postinstall.sh b/vagrant/coderwall-box/scripts/postinstall.sh index cbb5533d..35935b22 100644 --- a/vagrant/coderwall-box/scripts/postinstall.sh +++ b/vagrant/coderwall-box/scripts/postinstall.sh @@ -1,6 +1,53 @@ # postinstall.sh created from Mitchell's official lucid32/64 baseboxes # and then further defaced by just3ws to create the Coderwall devenv +export AKISMET_KEY=NEEDS_TO_COPY_FROM_DOTENV +export AKISMET_URL=NEEDS_TO_COPY_FROM_DOTENV +export CODECLIMATE_REPO_TOKEN=NEEDS_TO_COPY_FROM_DOTENV +export DISCOUNT_TOKEN=NEEDS_TO_COPY_FROM_DOTENV +export ELASTICSEARCH_PROTIPS_INDEX=NEEDS_TO_COPY_FROM_DOTENV +export ELASTICSEARCH_URL=NEEDS_TO_COPY_FROM_DOTENV +export GITHUB_ACCESS_TOKEN=NEEDS_TO_COPY_FROM_DOTENV +export GITHUB_ADMIN_USER=NEEDS_TO_COPY_FROM_DOTENV +export GITHUB_ADMIN_USER_PASSWORD=NEEDS_TO_COPY_FROM_DOTENV +export GITHUB_CLIENT_ID=NEEDS_TO_COPY_FROM_DOTENV +export GITHUB_REDIRECT_URL=NEEDS_TO_COPY_FROM_DOTENV +export GITHUB_SECRET=NEEDS_TO_COPY_FROM_DOTENV +export GOOGLE_ANALYTICS=NEEDS_TO_COPY_FROM_DOTENV +export GOOGLE_SITE_VERIFICATION=NEEDS_TO_COPY_FROM_DOTENV +export HEROKU_APP_NAME=NEEDS_TO_COPY_FROM_DOTENV +export HOST_DOMAIN=NEEDS_TO_COPY_FROM_DOTENV +export LANG=NEEDS_TO_COPY_FROM_DOTENV +export LC_ALL=NEEDS_TO_COPY_FROM_DOTENV +export LINKEDIN_KEY=NEEDS_TO_COPY_FROM_DOTENV +export LINKEDIN_SECRET=NEEDS_TO_COPY_FROM_DOTENV +export MAILGUN_API_KEY=NEEDS_TO_COPY_FROM_DOTENV +export MAILGUN_DOMAIN=NEEDS_TO_COPY_FROM_DOTENV +export MAILGUN_SIGNATURE=NEEDS_TO_COPY_FROM_DOTENV +export MAILGUN_TOKEN=NEEDS_TO_COPY_FROM_DOTENV +export MIXPANEL_API_SECRET=NEEDS_TO_COPY_FROM_DOTENV +export MIXPANEL_TOKEN=NEEDS_TO_COPY_FROM_DOTENV +export NEW_RELIC_PROMOTION=NEEDS_TO_COPY_FROM_DOTENV +export NOTIFIER_ADMIN_EMAILS=NEEDS_TO_COPY_FROM_DOTENV +export PARTY_FOUL_OAUTH_TOKEN=NEEDS_TO_COPY_FROM_DOTENV +export PRIVATE_ADMIN_PATH=NEEDS_TO_COPY_FROM_DOTENV +export PRIVATE_ADMIN_PATH=NEEDS_TO_COPY_FROM_DOTENV +export PRIVATE_URL=NEEDS_TO_COPY_FROM_DOTENV +export REVIEWERS=NEEDS_TO_COPY_FROM_DOTENV +export SESSION_SECRET=NEEDS_TO_COPY_FROM_DOTENV +export STRIPE_PUBLISHABLE_KEY=NEEDS_TO_COPY_FROM_DOTENV +export STRIPE_SECRET_KEY=NEEDS_TO_COPY_FROM_DOTENV +export SUPPORT_EMAIL=NEEDS_TO_COPY_FROM_DOTENV +export TRAVIS=NEEDS_TO_COPY_FROM_DOTENV +export TRUSTED_IP=NEEDS_TO_COPY_FROM_DOTENV +export TWITTER_ACCOUNT_ID=NEEDS_TO_COPY_FROM_DOTENV +export TWITTER_CONSUMER_KEY=NEEDS_TO_COPY_FROM_DOTENV +export TWITTER_CONSUMER_SECRET=NEEDS_TO_COPY_FROM_DOTENV +export TWITTER_OAUTH_SECRET=NEEDS_TO_COPY_FROM_DOTENV +export TWITTER_OAUTH_TOKEN=NEEDS_TO_COPY_FROM_DOTENV +export TWITTER_REDIRECT_URL=NEEDS_TO_COPY_FROM_DOTENV +export VCR_RECORD_MODE=NEEDS_TO_COPY_FROM_DOTENV + set -x date > /etc/vagrant_box_build_time @@ -13,24 +60,127 @@ dpkg-reconfigure --frontend noninteractive tzdata # etc., and remove optional things to trim down the machine. apt-get -y update apt-get -y upgrade -apt-get -y install linux-headers-$(uname -r) build-essential +apt-get -y install build-essential +apt-get -y install linux-headers-$(uname -r) +apt-get -y install virtualbox-guest-x11 +# Apt-install python tools and libraries # General dependencies and tools just... mashed, just mashed all together. -apt-get -y install ack-grep autoconf automake bison ca-certificates \ - curl g++ gcc git-core htop iotop libc6-dev libffi-dev \ - libgdbm-dev libncurses5-dev libopenssl-ruby libreadline6 \ - libreadline6-dev libsqlite3-0 libsqlite3-dev libssl-dev \ - libtool libxml2-dev libxslt-dev libyaml-dev make openssl \ - patch pkg-config sqlite3 tmux vim zlib1g zlib1g-dev gawk \ - libxml2-dev curl libcurl4-openssl-dev \ - imagemagick libmagickcore-dev libmagickwand-dev tcl8.5 - # Install NFS client +# libpq-dev lets us compile psycopg for Postgres +apt-get -y install ack-grep +apt-get -y install autoconf +apt-get -y install automake +apt-get -y install bash +apt-get -y install bison +apt-get -y install build-essential +apt-get -y install bzip2 +apt-get -y install ca-certificates +apt-get -y install curl +apt-get -y install fontconfig +apt-get -y install g++ +apt-get -y install gawk +apt-get -y install gcc +apt-get -y install git-core +apt-get -y install htop +apt-get -y install imagemagick +apt-get -y install iotop +apt-get -y install libc6-dev +apt-get -y install libcurl3 +apt-get -y install libcurl3-dev +apt-get -y install libcurl3-gnutls +apt-get -y install libcurl4-openssl-dev +apt-get -y install libffi-dev +apt-get -y install libgdbm-dev +apt-get -y install libmagickcore-dev +apt-get -y install libmagickwand-dev +apt-get -y install libncurses5-dev +apt-get -y install libopenssl-ruby +apt-get -y install libpq-dev +apt-get -y install libreadline6 +apt-get -y install libreadline6-dev +apt-get -y install libsqlite3-0 +apt-get -y install libsqlite3-dev +apt-get -y install libssl-dev +apt-get -y install libtool +apt-get -y install libxml2 +apt-get -y install libxml2-dev +apt-get -y install libxslt-dev +apt-get -y install libxslt1-dev +apt-get -y install libyaml-dev +apt-get -y install make +apt-get -y install nfs-common apt-get -y install nfs-common portmap +apt-get -y install openssl +apt-get -y install patch +apt-get -y install pep8 +apt-get -y install pkg-config +apt-get -y install portmap +apt-get -y install python-dev +apt-get -y install python-setuptools +apt-get -y install sqlite3 +apt-get -y install tcl8.5 +apt-get -y install tmux +apt-get -y install vim +apt-get -y install wget +apt-get -y install zlib1g +apt-get -y install zlib1g-dev + +POSTGRES_VERSION="9.3.3" +wget http://ftp.postgresql.org/pub/source/v$POSTGRES_VERSION/postgresql-$POSTGRES_VERSION.tar.bz2 +tar jxf postgresql-$POSTGRES_VERSION.tar.bz2 +cd postgresql-$POSTGRES_VERSION +./configure --prefix=/usr +make world +make install-world +cd .. +rm -rf postgresql-$POSTGRES_VERSION* -# Apt-install python tools and libraries -# libpq-dev lets us compile psycopg for Postgres -apt-get -y install python-setuptools python-dev libpq-dev pep8 +# Initialize postgres DB +useradd -p postgres postgres +mkdir -p /var/pgsql/data +chown postgres /var/pgsql/data +su -c "/usr/bin/initdb -D /var/pgsql/data --locale=en_US.UTF-8 --encoding=UNICODE" postgres +mkdir /var/pgsql/data/log +chown postgres /var/pgsql/data/log + +# Set the PG instance to listen and accept connections from anywhere +echo "listen_addresses = '*'" | tee -a /var/pgsql/data/postgresql.conf +echo host all all 0.0.0.0/0 trust | tee -a /var/pgsql/data/pg_hba.conf + +# Start postgres at boot +sed -i -e 's/exit 0//g' /etc/rc.local +echo "su -c '/usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data' postgres" >> /etc/rc.local + +# Restart postgres +su -c 'pg_ctl stop -D /var/pgsql/data 2>&1' postgres +su -c '/usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data' postgres + +sleep 60 + +# Add 'vagrant' role +su -c 'createuser -s vagrant' postgres +su -c 'createuser -s coderwall' postgres + +RUBY_VERSION="2.1.5" +wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-$RUBY_VERSION.tar.bz2 +tar jxf ruby-$RUBY_VERSION.tar.bz2 +cd ruby-$RUBY_VERSION +./configure --prefix=/opt/ruby +make +make install +cd .. +rm -rf ruby-$RUBY_VERSION* +chown -R root:admin /opt/ruby +chmod -R g+w /opt/ruby + +RUBYGEMS_VERSION="2.4.4" +wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz +tar xzf rubygems-$RUBYGEMS_VERSION.tgz +cd rubygems-$RUBYGEMS_VERSION +/opt/ruby/bin/ruby setup.rb +cd .. +rm -rf rubygems-$RUBYGEMS_VERSION* # Setup sudo to allow no-password sudo for "admin" cp /etc/sudoers /etc/sudoers.orig @@ -51,7 +201,7 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java7-installer oracle- echo "export JAVA_OPTS=\"-Xmx400m -XX:MaxPermSize=80M -XX:+UseCompressedOops -XX:+AggressiveOpts\"" >> /etc/profile.d/jdk.sh echo "setenv JAVA_OPTS \"-Xmx400m -XX:MaxPermSize=80M -XX:+UseCompressedOops -XX:+AggressiveOpts\"" >> /etc/profile.d/jdk.csh -NODEJS_VERSION="0.11.12" +NODEJS_VERSION="0.10.31" git clone https://github.com/joyent/node.git cd node git checkout v$NODE_VERSION @@ -61,25 +211,6 @@ make install cd .. rm -rf node* -RUBY_VERSION="2.1.0" -wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-$RUBY_VERSION.tar.bz2 -tar jxf ruby-$RUBY_VERSION.tar.bz2 -cd ruby-$RUBY_VERSION -./configure --prefix=/opt/ruby -make -make install -cd .. -rm -rf ruby-$RUBY_VERSION* -chown -R root:admin /opt/ruby -chmod -R g+w /opt/ruby - -RUBYGEMS_VERSION="2.2.2" -wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz -tar xzf rubygems-$RUBYGEMS_VERSION.tgz -cd rubygems-$RUBYGEMS_VERSION -/opt/ruby/bin/ruby setup.rb -cd .. -rm -rf rubygems-$RUBYGEMS_VERSION* # Installing chef & Puppet /opt/ruby/bin/gem install chef --no-ri --no-rdoc @@ -92,41 +223,7 @@ groupadd puppet # Install Foreman /opt/ruby/bin/gem install foreman --no-ri --no-rdoc -POSTGRES_VERSION="9.3.2" -wget http://ftp.postgresql.org/pub/source/v$POSTGRES_VERSION/postgresql-$POSTGRES_VERSION.tar.bz2 -tar jxf postgresql-$POSTGRES_VERSION.tar.bz2 -cd postgresql-$POSTGRES_VERSION -./configure --prefix=/usr -make world -make install-world -cd .. -rm -rf postgresql-$POSTGRES_VERSION* - -# Add 'vagrant' role -su -c 'createuser vagrant -s' postgres - -# Initialize postgres DB -useradd -p postgres postgres -mkdir -p /var/pgsql/data -chown postgres /var/pgsql/data -su -c "/usr/bin/initdb -D /var/pgsql/data --locale=en_US.UTF-8 --encoding=UNICODE" postgres -mkdir /var/pgsql/data/log -chown postgres /var/pgsql/data/log - -# Start postgres -su -c '/usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data' postgres - -# Start postgres at boot -sed -i -e 's/exit 0//g' /etc/rc.local -echo "su -c '/usr/bin/pg_ctl start -l /var/pgsql/data/log/logfile -D /var/pgsql/data' postgres" >> /etc/rc.local - -# MongoDB -apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 -echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/mongodb.list -apt-get -y update -apt-get -y install mongodb-10gen - -REDIS_VERSION="2.8.3" +REDIS_VERSION="2.8.4" wget http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz tar xzf redis-$REDIS_VERSION.tar.gz cd redis-$REDIS_VERSION @@ -138,13 +235,21 @@ yes | sudo ./install_server.sh cd ../.. rm -rf ~/redis-$REDIS_VERSION -ES_VERSION="0.20.5" +ES_VERSION="0.90.13" wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ES_VERSION.deb dpkg -i elasticsearch-$ES_VERSION.deb rm -rf ~/elasticsearch-$ES_VERSION.deb -# Memcached -apt-get -y install memcached + +PHANTOMJS_VERSION="1.9.2" +cd /usr/local/share +wget https://phantomjs.googlecode.com/files/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 +tar xjf phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 +ln -s /usr/local/share/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs +ln -s /usr/local/share/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs +ln -s /usr/local/share/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/phantomjs /usr/bin/phantomjs +phantomjs --version +cd # Add /opt/ruby/bin to the global path as the last resort so # Ruby, RubyGems, and Chef/Puppet are visible @@ -186,63 +291,171 @@ rm /lib/udev/rules.d/75-persistent-net-generator.rules # Install Heroku toolbelt wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh -# Install some libraries -apt-get -y clean -apt-get -y autoclean -apt-get -y autoremove - # Set locale echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale -echo "==> Installed packages before cleanup" -dpkg --get-selections | grep -v deinstall +echo ----------------------- +echo `whoami` + +su - vagrant <<-'EOF' + clear + echo ----------------------- + echo `whoami` + pwd + cd + pwd + echo ----------------------- + + echo export EDITOR=vim >> $HOME/.bashrc + echo insecure > $HOME/.curlrc + echo progress-bar >> $HOME/.curlrc + echo gem: --no-document >> $HOME/.gemrc + + echo rvm_install_on_use_flag=1 >> $HOME/.rvmrc + echo rvm_project_rvmrc=1 >> $HOME/.rvmrc + echo rvm_trust_rvmrcs_flag=1 >> $HOME/.rvmrc + + gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 + curl -k -L https://get.rvm.io | bash -s stable --autolibs=install-packages + source "$HOME/.rvm/scripts/rvm" + [[ -s "$rvm_path/hooks/after_cd_bundle" ]] && chmod +x $rvm_path/hooks/after_cd_bundle + rvm autolibs enable + rvm requirements + rvm reload + + _RUBY_VERSION=ruby-2.1.5 + rvm install $_RUBY_VERSION + rvm gemset create coderwall + rvm use $_RUBY_VERSION --default + gem update --system + gem update bundler + rvm use $_RUBY_VERSION@coderwall + gem update --system + gem update bundler + gem install curb -v '0.8.6' + + mkdir -p ~/tmp + + git clone https://github.com/assemblymade/coderwall.git ~/bootstrap/coderwall + cd ~/bootstrap/coderwall + rvm current + rvm use ruby@coderwall --create --install + gem update --system + gem update bundler + + bundle config --global jobs 3 + bundle install + + export AKISMET_KEY=NEEDS_TO_COPY_FROM_DOTENV + export AKISMET_URL=NEEDS_TO_COPY_FROM_DOTENV + export CODECLIMATE_REPO_TOKEN=NEEDS_TO_COPY_FROM_DOTENV + export DISCOUNT_TOKEN=NEEDS_TO_COPY_FROM_DOTENV + export ELASTICSEARCH_PROTIPS_INDEX=NEEDS_TO_COPY_FROM_DOTENV + export ELASTICSEARCH_URL=NEEDS_TO_COPY_FROM_DOTENV + export GITHUB_ACCESS_TOKEN=NEEDS_TO_COPY_FROM_DOTENV + export GITHUB_ADMIN_USER=NEEDS_TO_COPY_FROM_DOTENV + export GITHUB_ADMIN_USER_PASSWORD=NEEDS_TO_COPY_FROM_DOTENV + export GITHUB_CLIENT_ID=NEEDS_TO_COPY_FROM_DOTENV + export GITHUB_REDIRECT_URL=NEEDS_TO_COPY_FROM_DOTENV + export GITHUB_SECRET=NEEDS_TO_COPY_FROM_DOTENV + export GOOGLE_ANALYTICS=NEEDS_TO_COPY_FROM_DOTENV + export GOOGLE_SITE_VERIFICATION=NEEDS_TO_COPY_FROM_DOTENV + export HEROKU_APP_NAME=NEEDS_TO_COPY_FROM_DOTENV + export HOST_DOMAIN=NEEDS_TO_COPY_FROM_DOTENV + export LANG=NEEDS_TO_COPY_FROM_DOTENV + export LC_ALL=NEEDS_TO_COPY_FROM_DOTENV + export LINKEDIN_KEY=NEEDS_TO_COPY_FROM_DOTENV + export LINKEDIN_SECRET=NEEDS_TO_COPY_FROM_DOTENV + export MAILGUN_API_KEY=NEEDS_TO_COPY_FROM_DOTENV + export MAILGUN_DOMAIN=NEEDS_TO_COPY_FROM_DOTENV + export MAILGUN_SIGNATURE=NEEDS_TO_COPY_FROM_DOTENV + export MAILGUN_TOKEN=NEEDS_TO_COPY_FROM_DOTENV + export MIXPANEL_API_SECRET=NEEDS_TO_COPY_FROM_DOTENV + export MIXPANEL_TOKEN=NEEDS_TO_COPY_FROM_DOTENV + export NEW_RELIC_PROMOTION=NEEDS_TO_COPY_FROM_DOTENV + export NOTIFIER_ADMIN_EMAILS=NEEDS_TO_COPY_FROM_DOTENV + export PARTY_FOUL_OAUTH_TOKEN=NEEDS_TO_COPY_FROM_DOTENV + export PRIVATE_ADMIN_PATH=NEEDS_TO_COPY_FROM_DOTENV + export PRIVATE_ADMIN_PATH=NEEDS_TO_COPY_FROM_DOTENV + export PRIVATE_URL=NEEDS_TO_COPY_FROM_DOTENV + export REVIEWERS=NEEDS_TO_COPY_FROM_DOTENV + export SESSION_SECRET=NEEDS_TO_COPY_FROM_DOTENV + export STRIPE_PUBLISHABLE_KEY=NEEDS_TO_COPY_FROM_DOTENV + export STRIPE_SECRET_KEY=NEEDS_TO_COPY_FROM_DOTENV + export SUPPORT_EMAIL=NEEDS_TO_COPY_FROM_DOTENV + export TRAVIS=NEEDS_TO_COPY_FROM_DOTENV + export TRUSTED_IP=NEEDS_TO_COPY_FROM_DOTENV + export TWITTER_ACCOUNT_ID=NEEDS_TO_COPY_FROM_DOTENV + export TWITTER_CONSUMER_KEY=NEEDS_TO_COPY_FROM_DOTENV + export TWITTER_CONSUMER_SECRET=NEEDS_TO_COPY_FROM_DOTENV + export TWITTER_OAUTH_SECRET=NEEDS_TO_COPY_FROM_DOTENV + export TWITTER_OAUTH_TOKEN=NEEDS_TO_COPY_FROM_DOTENV + export TWITTER_REDIRECT_URL=NEEDS_TO_COPY_FROM_DOTENV + export VCR_RECORD_MODE=NEEDS_TO_COPY_FROM_DOTENV + + bundle exec rake db:drop:all + bundle exec rake db:create:all + RAILS_ENV=test bundle exec rake db:create + bundle exec rake db:schema:load + bundle exec rake db:migrate + bundle exec rake db:seed + bundle exec rake db:test:prepare +EOF + +## Install some libraries +#apt-get -y clean +#apt-get -y autoclean +#apt-get -y autoremove + +#echo "==> Installed packages before cleanup" +#dpkg --get-selections | grep -v deinstall # Remove some packages to get a minimal install -echo "==> Removing all linux kernels except the currrent one" -dpkg --list | awk '{ print $2 }' | grep 'linux-image-3.*-generic' | grep -v $(uname -r) | xargs apt-get -y purge -echo "==> Removing linux source" -dpkg --list | awk '{ print $2 }' | grep linux-source | xargs apt-get -y purge -echo "==> Removing development packages" -dpkg --list | awk '{ print $2 }' | grep -- '-dev$' | xargs apt-get -y purge -echo "==> Removing documentation" -dpkg --list | awk '{ print $2 }' | grep -- '-doc$' | xargs apt-get -y purge -echo "==> Removing development tools" +#echo "==> Removing all linux kernels except the currrent one" +#dpkg --list | awk '{ print $2 }' | grep 'linux-image-3.*-generic' | grep -v $(uname -r) | xargs apt-get -y purge +#echo "==> Removing linux source" +#dpkg --list | awk '{ print $2 }' | grep linux-source | xargs apt-get -y purge +#echo "==> Removing development packages" +#dpkg --list | awk '{ print $2 }' | grep -- '-dev$' | xargs apt-get -y purge +#echo "==> Removing documentation" +#dpkg --list | awk '{ print $2 }' | grep -- '-doc$' | xargs apt-get -y purge +#echo "==> Removing development tools" #dpkg --list | grep -i compiler | awk '{ print $2 }' | xargs apt-get -y purge #apt-get -y purge cpp gcc g++ -apt-get -y purge build-essential -echo "==> Removing default system Ruby" -apt-get -y purge ruby ri doc -echo "==> Removing default system Python" -apt-get -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 -echo "==> Removing X11 libraries" -apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 -echo "==> Removing obsolete networking components" -apt-get -y purge ppp pppconfig pppoeconf -echo "==> Removing other oddities" -apt-get -y purge popularity-contest installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide - -# Clean up the apt cache -apt-get -y autoremove --purge -apt-get -y autoclean -apt-get -y clean - -# Clean up orphaned packages with deborphan -apt-get -y install deborphan -while [ -n "$(deborphan --guess-all --libdevel)" ]; do - deborphan --guess-all --libdevel | xargs apt-get -y purge -done -apt-get -y purge deborphan dialog - -echo "==> Removing man pages" -rm -rf /usr/share/man/* -echo "==> Removing APT files" -find /var/lib/apt -type f | xargs rm -f -echo "==> Removing anything in /usr/src" -rm -rf /usr/src/* -echo "==> Removing any docs" -rm -rf /usr/share/doc/* -echo "==> Removing caches" -find /var/cache -type f -exec rm -rf {} \; +#apt-get -y purge build-essential +#echo "==> Removing default system Ruby" +#apt-get -y purge ruby ri doc +#echo "==> Removing default system Python" +#apt-get -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 +#echo "==> Removing X11 libraries" +#apt-get -y purge libx11-data xauth libxmuu1 libxcb1 libx11-6 libxext6 +#echo "==> Removing obsolete networking components" +#apt-get -y purge ppp pppconfig pppoeconf +#echo "==> Removing other oddities" +#apt-get -y purge popularity-contest installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide + +## Clean up the apt cache +#apt-get -y autoremove --purge +#apt-get -y autoclean +#apt-get -y clean + +## Clean up orphaned packages with deborphan +#apt-get -y install deborphan +#while [ -n "$(deborphan --guess-all --libdevel)" ]; do + #deborphan --guess-all --libdevel | xargs apt-get -y purge +#done +#apt-get -y purge deborphan dialog + +#echo "==> Removing man pages" +#rm -rf /usr/share/man/* +#echo "==> Removing APT files" +#find /var/lib/apt -type f | xargs rm -f +#echo "==> Removing anything in /usr/src" +#rm -rf /usr/src/* +#echo "==> Removing any docs" +#rm -rf /usr/share/doc/* +#echo "==> Removing caches" +#find /var/cache -type f -exec rm -rf {} \; echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" echo "pre-up sleep 2" >> /etc/network/interfaces diff --git a/vagrant/coderwall-box/template.json b/vagrant/coderwall-box/template.json index 81ca8d1b..c524d36d 100644 --- a/vagrant/coderwall-box/template.json +++ b/vagrant/coderwall-box/template.json @@ -1,8 +1,8 @@ { "builders": [{ "type": "virtualbox-iso", - "boot_wait": "10s", - "disk_size": 10140, + "boot_wait": "30s", + "disk_size": 65536, "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso", "guest_os_type": "Ubuntu_64", "http_directory": "http", @@ -13,7 +13,7 @@ "ssh_password": "vagrant", "ssh_port": 22, "ssh_username": "vagrant", - "ssh_wait_timeout": "10000s", + "ssh_wait_timeout": "30000s", "virtualbox_version_file": ".vbox_version", "boot_command": [ "<esc><esc><enter><wait>", @@ -25,8 +25,8 @@ "initrd=/install/initrd.gz -- <enter><wait>" ], "vboxmanage": [ - [ "modifyvm", "{{.Name}}", "--memory", "2048" ], - [ "modifyvm", "{{.Name}}", "--cpus", "2" ] + [ "modifyvm", "{{.Name}}", "--memory", "4096" ], + [ "modifyvm", "{{.Name}}", "--cpus", "4" ] ] } ], @@ -35,7 +35,9 @@ ], "provisioners": [ { "type": "shell", - "scripts": [ "scripts/postinstall.sh" ], + "scripts": [ + "scripts/postinstall.sh" + ], "override": { "virtualbox-iso": { "execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'" } } diff --git a/vagrant/run b/vagrant/run new file mode 100755 index 00000000..a1424c4d --- /dev/null +++ b/vagrant/run @@ -0,0 +1,14 @@ +#!/bin/bash -e + +cd /home/vagrant/web + +rvm current +bundle check || bundle install +bundle clean --force + +bundle exec foreman check + +bundle exec rake db:migrate +bundle exec rake db:test:prepare + +bundle exec foreman start all diff --git a/vagrant/user-config.sh b/vagrant/user-config.sh deleted file mode 100755 index 1a65a86e..00000000 --- a/vagrant/user-config.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -x -export DEBIAN_FRONTEND=noninteractive -cd /home/vagrant -echo Who am I? You are `whoami`. -echo Where am I? You are in `pwd` -echo I think my home is $HOME -echo export EDITOR=vim >> $HOME/.bashrc -echo insecure > $HOME/.curlrc -echo rvm_install_on_use_flag=1 >> $HOME/.rvmrc -echo rvm_project_rvmrc=1 >> $HOME/.rvmrc -echo rvm_trust_rvmrcs_fag=1 >> $HOME/.rvmrc -curl -k -L https://get.rvm.io | bash -s stable --autolibs=enabled -source "$HOME/.rvm/scripts/rvm" -[[ -s "$rvm_path/hooks/after_cd_bundle" ]] && chmod +x $rvm_path/hooks/after_cd_bundle -rvm requirements -rvm reload -_RUBY_VERSION=ruby-2.1.0 -rvm install $_RUBY_VERSION -rvm gemset create coderwall -rvm use $_RUBY_VERSION --default -rvm use $_RUBY_VERSION@coderwall -cd $HOME/web -gem update --system && gem update bundler -bundle config --global jobs 3 -bundle install - -# Setup .env -cp .env.example .env -n - -sudo su postgres -c 'pg_ctl stop -D /var/pgsql/data 2>&1' -sudo su postgres -c 'pg_ctl start -D /var/pgsql/data 2>&1 &' - -export DEV_POSTGRES_PORT=5432 -export REDIS_URL=redis://127.0.0.1:6379 - -bundle exec rake db:drop:all -bundle exec rake db:create:all -bundle exec rake db:setup -bundle exec rake db:test:prepare diff --git a/app/assets/javascripts/ember/helpers/.gitkeep b/vcr_cassettes/.keep similarity index 100% rename from app/assets/javascripts/ember/helpers/.gitkeep rename to vcr_cassettes/.keep diff --git a/app/assets/images/bootstrap/glyphicons-halflings-white.png b/vendor/assets/images/bootstrap/glyphicons-halflings-white.png similarity index 100% rename from app/assets/images/bootstrap/glyphicons-halflings-white.png rename to vendor/assets/images/bootstrap/glyphicons-halflings-white.png diff --git a/app/assets/images/bootstrap/glyphicons-halflings.png b/vendor/assets/images/bootstrap/glyphicons-halflings.png similarity index 100% rename from app/assets/images/bootstrap/glyphicons-halflings.png rename to vendor/assets/images/bootstrap/glyphicons-halflings.png diff --git a/app/assets/images/chosen-sprite.png b/vendor/assets/images/chosen-sprite.png similarity index 100% rename from app/assets/images/chosen-sprite.png rename to vendor/assets/images/chosen-sprite.png diff --git a/app/assets/images/fancybox/blank.gif b/vendor/assets/images/fancybox/blank.gif similarity index 100% rename from app/assets/images/fancybox/blank.gif rename to vendor/assets/images/fancybox/blank.gif diff --git a/app/assets/images/fancybox/fancy_close.png b/vendor/assets/images/fancybox/fancy_close.png similarity index 100% rename from app/assets/images/fancybox/fancy_close.png rename to vendor/assets/images/fancybox/fancy_close.png diff --git a/app/assets/images/fancybox/fancy_loading.png b/vendor/assets/images/fancybox/fancy_loading.png similarity index 100% rename from app/assets/images/fancybox/fancy_loading.png rename to vendor/assets/images/fancybox/fancy_loading.png diff --git a/app/assets/images/fancybox/fancy_nav_left.png b/vendor/assets/images/fancybox/fancy_nav_left.png similarity index 100% rename from app/assets/images/fancybox/fancy_nav_left.png rename to vendor/assets/images/fancybox/fancy_nav_left.png diff --git a/app/assets/images/fancybox/fancy_nav_right.png b/vendor/assets/images/fancybox/fancy_nav_right.png similarity index 100% rename from app/assets/images/fancybox/fancy_nav_right.png rename to vendor/assets/images/fancybox/fancy_nav_right.png diff --git a/app/assets/images/fancybox/fancy_shadow_e.png b/vendor/assets/images/fancybox/fancy_shadow_e.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_e.png rename to vendor/assets/images/fancybox/fancy_shadow_e.png diff --git a/app/assets/images/fancybox/fancy_shadow_n.png b/vendor/assets/images/fancybox/fancy_shadow_n.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_n.png rename to vendor/assets/images/fancybox/fancy_shadow_n.png diff --git a/app/assets/images/fancybox/fancy_shadow_ne.png b/vendor/assets/images/fancybox/fancy_shadow_ne.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_ne.png rename to vendor/assets/images/fancybox/fancy_shadow_ne.png diff --git a/app/assets/images/fancybox/fancy_shadow_nw.png b/vendor/assets/images/fancybox/fancy_shadow_nw.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_nw.png rename to vendor/assets/images/fancybox/fancy_shadow_nw.png diff --git a/app/assets/images/fancybox/fancy_shadow_s.png b/vendor/assets/images/fancybox/fancy_shadow_s.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_s.png rename to vendor/assets/images/fancybox/fancy_shadow_s.png diff --git a/app/assets/images/fancybox/fancy_shadow_se.png b/vendor/assets/images/fancybox/fancy_shadow_se.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_se.png rename to vendor/assets/images/fancybox/fancy_shadow_se.png diff --git a/app/assets/images/fancybox/fancy_shadow_sw.png b/vendor/assets/images/fancybox/fancy_shadow_sw.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_sw.png rename to vendor/assets/images/fancybox/fancy_shadow_sw.png diff --git a/app/assets/images/fancybox/fancy_shadow_w.png b/vendor/assets/images/fancybox/fancy_shadow_w.png similarity index 100% rename from app/assets/images/fancybox/fancy_shadow_w.png rename to vendor/assets/images/fancybox/fancy_shadow_w.png diff --git a/app/assets/images/fancybox/fancy_title_left.png b/vendor/assets/images/fancybox/fancy_title_left.png similarity index 100% rename from app/assets/images/fancybox/fancy_title_left.png rename to vendor/assets/images/fancybox/fancy_title_left.png diff --git a/app/assets/images/fancybox/fancy_title_main.png b/vendor/assets/images/fancybox/fancy_title_main.png similarity index 100% rename from app/assets/images/fancybox/fancy_title_main.png rename to vendor/assets/images/fancybox/fancy_title_main.png diff --git a/app/assets/images/fancybox/fancy_title_over.png b/vendor/assets/images/fancybox/fancy_title_over.png similarity index 100% rename from app/assets/images/fancybox/fancy_title_over.png rename to vendor/assets/images/fancybox/fancy_title_over.png diff --git a/app/assets/images/fancybox/fancy_title_right.png b/vendor/assets/images/fancybox/fancy_title_right.png similarity index 100% rename from app/assets/images/fancybox/fancy_title_right.png rename to vendor/assets/images/fancybox/fancy_title_right.png diff --git a/app/assets/images/fancybox/fancybox-x.png b/vendor/assets/images/fancybox/fancybox-x.png similarity index 100% rename from app/assets/images/fancybox/fancybox-x.png rename to vendor/assets/images/fancybox/fancybox-x.png diff --git a/app/assets/images/fancybox/fancybox-y.png b/vendor/assets/images/fancybox/fancybox-y.png similarity index 100% rename from app/assets/images/fancybox/fancybox-y.png rename to vendor/assets/images/fancybox/fancybox-y.png diff --git a/app/assets/images/fancybox/fancybox.png b/vendor/assets/images/fancybox/fancybox.png similarity index 100% rename from app/assets/images/fancybox/fancybox.png rename to vendor/assets/images/fancybox/fancybox.png diff --git a/app/assets/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png b/vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png rename to vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/app/assets/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png b/vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png rename to vendor/assets/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/app/assets/images/jquery-ui/ui-bg_flat_10_000000_40x100.png b/vendor/assets/images/jquery-ui/ui-bg_flat_10_000000_40x100.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_flat_10_000000_40x100.png rename to vendor/assets/images/jquery-ui/ui-bg_flat_10_000000_40x100.png diff --git a/app/assets/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png b/vendor/assets/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png rename to vendor/assets/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/app/assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png b/vendor/assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png rename to vendor/assets/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png b/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png rename to vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png diff --git a/app/assets/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png b/vendor/assets/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png rename to vendor/assets/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png diff --git a/app/assets/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png b/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png rename to vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/app/assets/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png b/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png similarity index 100% rename from app/assets/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png rename to vendor/assets/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/app/assets/images/jquery-ui/ui-icons_222222_256x240.png b/vendor/assets/images/jquery-ui/ui-icons_222222_256x240.png similarity index 100% rename from app/assets/images/jquery-ui/ui-icons_222222_256x240.png rename to vendor/assets/images/jquery-ui/ui-icons_222222_256x240.png diff --git a/app/assets/images/jquery-ui/ui-icons_228ef1_256x240.png b/vendor/assets/images/jquery-ui/ui-icons_228ef1_256x240.png similarity index 100% rename from app/assets/images/jquery-ui/ui-icons_228ef1_256x240.png rename to vendor/assets/images/jquery-ui/ui-icons_228ef1_256x240.png diff --git a/app/assets/images/jquery-ui/ui-icons_ef8c08_256x240.png b/vendor/assets/images/jquery-ui/ui-icons_ef8c08_256x240.png similarity index 100% rename from app/assets/images/jquery-ui/ui-icons_ef8c08_256x240.png rename to vendor/assets/images/jquery-ui/ui-icons_ef8c08_256x240.png diff --git a/app/assets/images/jquery-ui/ui-icons_ffd27a_256x240.png b/vendor/assets/images/jquery-ui/ui-icons_ffd27a_256x240.png similarity index 100% rename from app/assets/images/jquery-ui/ui-icons_ffd27a_256x240.png rename to vendor/assets/images/jquery-ui/ui-icons_ffd27a_256x240.png diff --git a/app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png b/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png similarity index 100% rename from app/assets/images/jquery-ui/ui-icons_ffffff_256x240.png rename to vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png diff --git a/app/assets/javascripts/bootstrap/bootstrap-button.js b/vendor/assets/javascripts/bootstrap/bootstrap-button.js similarity index 100% rename from app/assets/javascripts/bootstrap/bootstrap-button.js rename to vendor/assets/javascripts/bootstrap/bootstrap-button.js diff --git a/app/assets/javascripts/highlight/highlight.js b/vendor/assets/javascripts/highlight/highlight.js similarity index 100% rename from app/assets/javascripts/highlight/highlight.js rename to vendor/assets/javascripts/highlight/highlight.js diff --git a/app/assets/javascripts/highlight/language.js.coffee b/vendor/assets/javascripts/highlight/language.js.coffee similarity index 100% rename from app/assets/javascripts/highlight/language.js.coffee rename to vendor/assets/javascripts/highlight/language.js.coffee diff --git a/app/assets/javascripts/highlight/languages/1c.js b/vendor/assets/javascripts/highlight/languages/1c.js similarity index 100% rename from app/assets/javascripts/highlight/languages/1c.js rename to vendor/assets/javascripts/highlight/languages/1c.js diff --git a/app/assets/javascripts/highlight/languages/actionscript.js b/vendor/assets/javascripts/highlight/languages/actionscript.js similarity index 100% rename from app/assets/javascripts/highlight/languages/actionscript.js rename to vendor/assets/javascripts/highlight/languages/actionscript.js diff --git a/app/assets/javascripts/highlight/languages/apache.js b/vendor/assets/javascripts/highlight/languages/apache.js similarity index 100% rename from app/assets/javascripts/highlight/languages/apache.js rename to vendor/assets/javascripts/highlight/languages/apache.js diff --git a/app/assets/javascripts/highlight/languages/avrasm.js b/vendor/assets/javascripts/highlight/languages/avrasm.js similarity index 100% rename from app/assets/javascripts/highlight/languages/avrasm.js rename to vendor/assets/javascripts/highlight/languages/avrasm.js diff --git a/app/assets/javascripts/highlight/languages/axapta.js b/vendor/assets/javascripts/highlight/languages/axapta.js similarity index 100% rename from app/assets/javascripts/highlight/languages/axapta.js rename to vendor/assets/javascripts/highlight/languages/axapta.js diff --git a/app/assets/javascripts/highlight/languages/bash.js b/vendor/assets/javascripts/highlight/languages/bash.js similarity index 100% rename from app/assets/javascripts/highlight/languages/bash.js rename to vendor/assets/javascripts/highlight/languages/bash.js diff --git a/app/assets/javascripts/highlight/languages/cmake.js b/vendor/assets/javascripts/highlight/languages/cmake.js similarity index 100% rename from app/assets/javascripts/highlight/languages/cmake.js rename to vendor/assets/javascripts/highlight/languages/cmake.js diff --git a/app/assets/javascripts/highlight/languages/coffeescript.js b/vendor/assets/javascripts/highlight/languages/coffeescript.js similarity index 100% rename from app/assets/javascripts/highlight/languages/coffeescript.js rename to vendor/assets/javascripts/highlight/languages/coffeescript.js diff --git a/app/assets/javascripts/highlight/languages/cpp.js b/vendor/assets/javascripts/highlight/languages/cpp.js similarity index 100% rename from app/assets/javascripts/highlight/languages/cpp.js rename to vendor/assets/javascripts/highlight/languages/cpp.js diff --git a/app/assets/javascripts/highlight/languages/cs.js b/vendor/assets/javascripts/highlight/languages/cs.js similarity index 100% rename from app/assets/javascripts/highlight/languages/cs.js rename to vendor/assets/javascripts/highlight/languages/cs.js diff --git a/app/assets/javascripts/highlight/languages/css.js b/vendor/assets/javascripts/highlight/languages/css.js similarity index 100% rename from app/assets/javascripts/highlight/languages/css.js rename to vendor/assets/javascripts/highlight/languages/css.js diff --git a/app/assets/javascripts/highlight/languages/delphi.js b/vendor/assets/javascripts/highlight/languages/delphi.js similarity index 100% rename from app/assets/javascripts/highlight/languages/delphi.js rename to vendor/assets/javascripts/highlight/languages/delphi.js diff --git a/app/assets/javascripts/highlight/languages/diff.js b/vendor/assets/javascripts/highlight/languages/diff.js similarity index 100% rename from app/assets/javascripts/highlight/languages/diff.js rename to vendor/assets/javascripts/highlight/languages/diff.js diff --git a/app/assets/javascripts/highlight/languages/django.js b/vendor/assets/javascripts/highlight/languages/django.js similarity index 100% rename from app/assets/javascripts/highlight/languages/django.js rename to vendor/assets/javascripts/highlight/languages/django.js diff --git a/app/assets/javascripts/highlight/languages/dos.js b/vendor/assets/javascripts/highlight/languages/dos.js similarity index 100% rename from app/assets/javascripts/highlight/languages/dos.js rename to vendor/assets/javascripts/highlight/languages/dos.js diff --git a/app/assets/javascripts/highlight/languages/erlang-repl.js b/vendor/assets/javascripts/highlight/languages/erlang-repl.js similarity index 100% rename from app/assets/javascripts/highlight/languages/erlang-repl.js rename to vendor/assets/javascripts/highlight/languages/erlang-repl.js diff --git a/app/assets/javascripts/highlight/languages/erlang.js b/vendor/assets/javascripts/highlight/languages/erlang.js similarity index 100% rename from app/assets/javascripts/highlight/languages/erlang.js rename to vendor/assets/javascripts/highlight/languages/erlang.js diff --git a/app/assets/javascripts/highlight/languages/go.js b/vendor/assets/javascripts/highlight/languages/go.js similarity index 100% rename from app/assets/javascripts/highlight/languages/go.js rename to vendor/assets/javascripts/highlight/languages/go.js diff --git a/app/assets/javascripts/highlight/languages/haskell.js b/vendor/assets/javascripts/highlight/languages/haskell.js similarity index 100% rename from app/assets/javascripts/highlight/languages/haskell.js rename to vendor/assets/javascripts/highlight/languages/haskell.js diff --git a/app/assets/javascripts/highlight/languages/ini.js b/vendor/assets/javascripts/highlight/languages/ini.js similarity index 100% rename from app/assets/javascripts/highlight/languages/ini.js rename to vendor/assets/javascripts/highlight/languages/ini.js diff --git a/app/assets/javascripts/highlight/languages/java.js b/vendor/assets/javascripts/highlight/languages/java.js similarity index 100% rename from app/assets/javascripts/highlight/languages/java.js rename to vendor/assets/javascripts/highlight/languages/java.js diff --git a/app/assets/javascripts/highlight/languages/javascript.js b/vendor/assets/javascripts/highlight/languages/javascript.js similarity index 100% rename from app/assets/javascripts/highlight/languages/javascript.js rename to vendor/assets/javascripts/highlight/languages/javascript.js diff --git a/app/assets/javascripts/highlight/languages/lisp.js b/vendor/assets/javascripts/highlight/languages/lisp.js similarity index 100% rename from app/assets/javascripts/highlight/languages/lisp.js rename to vendor/assets/javascripts/highlight/languages/lisp.js diff --git a/app/assets/javascripts/highlight/languages/lua.js b/vendor/assets/javascripts/highlight/languages/lua.js similarity index 100% rename from app/assets/javascripts/highlight/languages/lua.js rename to vendor/assets/javascripts/highlight/languages/lua.js diff --git a/app/assets/javascripts/highlight/languages/markdown.js b/vendor/assets/javascripts/highlight/languages/markdown.js similarity index 100% rename from app/assets/javascripts/highlight/languages/markdown.js rename to vendor/assets/javascripts/highlight/languages/markdown.js diff --git a/app/assets/javascripts/highlight/languages/matlab.js b/vendor/assets/javascripts/highlight/languages/matlab.js similarity index 100% rename from app/assets/javascripts/highlight/languages/matlab.js rename to vendor/assets/javascripts/highlight/languages/matlab.js diff --git a/app/assets/javascripts/highlight/languages/mel.js b/vendor/assets/javascripts/highlight/languages/mel.js similarity index 100% rename from app/assets/javascripts/highlight/languages/mel.js rename to vendor/assets/javascripts/highlight/languages/mel.js diff --git a/app/assets/javascripts/highlight/languages/nginx.js b/vendor/assets/javascripts/highlight/languages/nginx.js similarity index 100% rename from app/assets/javascripts/highlight/languages/nginx.js rename to vendor/assets/javascripts/highlight/languages/nginx.js diff --git a/app/assets/javascripts/highlight/languages/objectivec.js b/vendor/assets/javascripts/highlight/languages/objectivec.js similarity index 100% rename from app/assets/javascripts/highlight/languages/objectivec.js rename to vendor/assets/javascripts/highlight/languages/objectivec.js diff --git a/app/assets/javascripts/highlight/languages/parser3.js b/vendor/assets/javascripts/highlight/languages/parser3.js similarity index 100% rename from app/assets/javascripts/highlight/languages/parser3.js rename to vendor/assets/javascripts/highlight/languages/parser3.js diff --git a/app/assets/javascripts/highlight/languages/perl.js b/vendor/assets/javascripts/highlight/languages/perl.js similarity index 100% rename from app/assets/javascripts/highlight/languages/perl.js rename to vendor/assets/javascripts/highlight/languages/perl.js diff --git a/app/assets/javascripts/highlight/languages/php.js b/vendor/assets/javascripts/highlight/languages/php.js similarity index 100% rename from app/assets/javascripts/highlight/languages/php.js rename to vendor/assets/javascripts/highlight/languages/php.js diff --git a/app/assets/javascripts/highlight/languages/profile.js b/vendor/assets/javascripts/highlight/languages/profile.js similarity index 100% rename from app/assets/javascripts/highlight/languages/profile.js rename to vendor/assets/javascripts/highlight/languages/profile.js diff --git a/app/assets/javascripts/highlight/languages/python.js b/vendor/assets/javascripts/highlight/languages/python.js similarity index 100% rename from app/assets/javascripts/highlight/languages/python.js rename to vendor/assets/javascripts/highlight/languages/python.js diff --git a/app/assets/javascripts/highlight/languages/renderman.js b/vendor/assets/javascripts/highlight/languages/renderman.js similarity index 100% rename from app/assets/javascripts/highlight/languages/renderman.js rename to vendor/assets/javascripts/highlight/languages/renderman.js diff --git a/app/assets/javascripts/highlight/languages/ruby.js b/vendor/assets/javascripts/highlight/languages/ruby.js similarity index 100% rename from app/assets/javascripts/highlight/languages/ruby.js rename to vendor/assets/javascripts/highlight/languages/ruby.js diff --git a/app/assets/javascripts/highlight/languages/rust.js b/vendor/assets/javascripts/highlight/languages/rust.js similarity index 100% rename from app/assets/javascripts/highlight/languages/rust.js rename to vendor/assets/javascripts/highlight/languages/rust.js diff --git a/app/assets/javascripts/highlight/languages/scala.js b/vendor/assets/javascripts/highlight/languages/scala.js similarity index 100% rename from app/assets/javascripts/highlight/languages/scala.js rename to vendor/assets/javascripts/highlight/languages/scala.js diff --git a/app/assets/javascripts/highlight/languages/smalltalk.js b/vendor/assets/javascripts/highlight/languages/smalltalk.js similarity index 100% rename from app/assets/javascripts/highlight/languages/smalltalk.js rename to vendor/assets/javascripts/highlight/languages/smalltalk.js diff --git a/app/assets/javascripts/highlight/languages/sql.js b/vendor/assets/javascripts/highlight/languages/sql.js similarity index 100% rename from app/assets/javascripts/highlight/languages/sql.js rename to vendor/assets/javascripts/highlight/languages/sql.js diff --git a/app/assets/javascripts/highlight/languages/tex.js b/vendor/assets/javascripts/highlight/languages/tex.js similarity index 100% rename from app/assets/javascripts/highlight/languages/tex.js rename to vendor/assets/javascripts/highlight/languages/tex.js diff --git a/app/assets/javascripts/highlight/languages/vala.js b/vendor/assets/javascripts/highlight/languages/vala.js similarity index 100% rename from app/assets/javascripts/highlight/languages/vala.js rename to vendor/assets/javascripts/highlight/languages/vala.js diff --git a/app/assets/javascripts/highlight/languages/vbscript.js b/vendor/assets/javascripts/highlight/languages/vbscript.js similarity index 100% rename from app/assets/javascripts/highlight/languages/vbscript.js rename to vendor/assets/javascripts/highlight/languages/vbscript.js diff --git a/app/assets/javascripts/highlight/languages/vhdl.js b/vendor/assets/javascripts/highlight/languages/vhdl.js similarity index 100% rename from app/assets/javascripts/highlight/languages/vhdl.js rename to vendor/assets/javascripts/highlight/languages/vhdl.js diff --git a/app/assets/javascripts/highlight/languages/xml.js b/vendor/assets/javascripts/highlight/languages/xml.js similarity index 100% rename from app/assets/javascripts/highlight/languages/xml.js rename to vendor/assets/javascripts/highlight/languages/xml.js diff --git a/app/assets/javascripts/vendor/history.adapter.jquery.js b/vendor/assets/javascripts/history.adapter.jquery.js similarity index 100% rename from app/assets/javascripts/vendor/history.adapter.jquery.js rename to vendor/assets/javascripts/history.adapter.jquery.js diff --git a/app/assets/javascripts/vendor/history.js b/vendor/assets/javascripts/history.js similarity index 100% rename from app/assets/javascripts/vendor/history.js rename to vendor/assets/javascripts/history.js diff --git a/app/assets/javascripts/html5placeholder.jquery.js b/vendor/assets/javascripts/html5placeholder.jquery.js similarity index 100% rename from app/assets/javascripts/html5placeholder.jquery.js rename to vendor/assets/javascripts/html5placeholder.jquery.js diff --git a/app/assets/javascripts/html5shiv.js b/vendor/assets/javascripts/html5shiv.js similarity index 100% rename from app/assets/javascripts/html5shiv.js rename to vendor/assets/javascripts/html5shiv.js diff --git a/app/assets/javascripts/hyphenator/hyphenator.js b/vendor/assets/javascripts/hyphenator/hyphenator.js similarity index 100% rename from app/assets/javascripts/hyphenator/hyphenator.js rename to vendor/assets/javascripts/hyphenator/hyphenator.js diff --git a/app/assets/javascripts/hyphenator/patterns/en-us.js b/vendor/assets/javascripts/hyphenator/patterns/en-us.js similarity index 100% rename from app/assets/javascripts/hyphenator/patterns/en-us.js rename to vendor/assets/javascripts/hyphenator/patterns/en-us.js diff --git a/app/assets/javascripts/vendor/inflection.js b/vendor/assets/javascripts/inflection.js similarity index 100% rename from app/assets/javascripts/vendor/inflection.js rename to vendor/assets/javascripts/inflection.js diff --git a/vendor/assets/javascripts/jquery-migrate.js b/vendor/assets/javascripts/jquery-migrate.js new file mode 100644 index 00000000..62149c28 --- /dev/null +++ b/vendor/assets/javascripts/jquery-migrate.js @@ -0,0 +1,2 @@ +/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */ +jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("<input/>",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); \ No newline at end of file diff --git a/app/assets/javascripts/jquery.autocomplete.js b/vendor/assets/javascripts/jquery.autocomplete.js similarity index 100% rename from app/assets/javascripts/jquery.autocomplete.js rename to vendor/assets/javascripts/jquery.autocomplete.js diff --git a/app/assets/javascripts/jquery.chosen.min.js b/vendor/assets/javascripts/jquery.chosen.min.js similarity index 100% rename from app/assets/javascripts/jquery.chosen.min.js rename to vendor/assets/javascripts/jquery.chosen.min.js diff --git a/app/assets/javascripts/jquery.effects.core.js b/vendor/assets/javascripts/jquery.effects.core.js similarity index 100% rename from app/assets/javascripts/jquery.effects.core.js rename to vendor/assets/javascripts/jquery.effects.core.js diff --git a/app/assets/javascripts/jquery.effects.slide.js b/vendor/assets/javascripts/jquery.effects.slide.js similarity index 100% rename from app/assets/javascripts/jquery.effects.slide.js rename to vendor/assets/javascripts/jquery.effects.slide.js diff --git a/app/assets/javascripts/jquery.fancybox.min.js b/vendor/assets/javascripts/jquery.fancybox.min.js similarity index 100% rename from app/assets/javascripts/jquery.fancybox.min.js rename to vendor/assets/javascripts/jquery.fancybox.min.js diff --git a/app/assets/javascripts/jquery.filedrop.js b/vendor/assets/javascripts/jquery.filedrop.js similarity index 100% rename from app/assets/javascripts/jquery.filedrop.js rename to vendor/assets/javascripts/jquery.filedrop.js diff --git a/app/assets/javascripts/jquery.flexslider-min.js b/vendor/assets/javascripts/jquery.flexslider-min.js similarity index 100% rename from app/assets/javascripts/jquery.flexslider-min.js rename to vendor/assets/javascripts/jquery.flexslider-min.js diff --git a/app/assets/javascripts/jquery.masonry.min.js b/vendor/assets/javascripts/jquery.masonry.min.js similarity index 100% rename from app/assets/javascripts/jquery.masonry.min.js rename to vendor/assets/javascripts/jquery.masonry.min.js diff --git a/app/assets/javascripts/jquery.modal.js b/vendor/assets/javascripts/jquery.modal.js similarity index 100% rename from app/assets/javascripts/jquery.modal.js rename to vendor/assets/javascripts/jquery.modal.js diff --git a/app/assets/javascripts/jquery.placeholder.min.js b/vendor/assets/javascripts/jquery.placeholder.min.js similarity index 100% rename from app/assets/javascripts/jquery.placeholder.min.js rename to vendor/assets/javascripts/jquery.placeholder.min.js diff --git a/app/assets/javascripts/jquery.scrolldepth.js b/vendor/assets/javascripts/jquery.scrolldepth.js similarity index 100% rename from app/assets/javascripts/jquery.scrolldepth.js rename to vendor/assets/javascripts/jquery.scrolldepth.js diff --git a/app/assets/javascripts/jquery.scrollto.js b/vendor/assets/javascripts/jquery.scrollto.js similarity index 100% rename from app/assets/javascripts/jquery.scrollto.js rename to vendor/assets/javascripts/jquery.scrollto.js diff --git a/app/assets/javascripts/jquery.sortElements.js b/vendor/assets/javascripts/jquery.sortElements.js similarity index 100% rename from app/assets/javascripts/jquery.sortElements.js rename to vendor/assets/javascripts/jquery.sortElements.js diff --git a/app/assets/javascripts/vendor/jquery.textselection.js b/vendor/assets/javascripts/jquery.textselection.js similarity index 100% rename from app/assets/javascripts/vendor/jquery.textselection.js rename to vendor/assets/javascripts/jquery.textselection.js diff --git a/vendor/assets/javascripts/jquery.tipTip.js b/vendor/assets/javascripts/jquery.tipTip.js new file mode 100644 index 00000000..1a5c6f63 --- /dev/null +++ b/vendor/assets/javascripts/jquery.tipTip.js @@ -0,0 +1,191 @@ +/* + * TipTip + * Copyright 2010 Drew Wilson + * www.drewwilson.com + * code.drewwilson.com/entry/tiptip-jquery-plugin + * + * Version 1.3 - Updated: Mar. 23, 2010 + * + * This Plug-In will create a custom tooltip to replace the default + * browser tooltip. It is extremely lightweight and very smart in + * that it detects the edges of the browser window and will make sure + * the tooltip stays within the current window size. As a result the + * tooltip will adjust itself to be displayed above, below, to the left + * or to the right depending on what is necessary to stay within the + * browser window. It is completely customizable as well via CSS. + * + * This TipTip jQuery plug-in is dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + */ + +(function($){ + $.fn.tipTip = function(options) { + var defaults = { + activation: "hover", + keepAlive: false, + maxWidth: "200px", + edgeOffset: 3, + defaultPosition: "bottom", + delay: 400, + fadeIn: 200, + fadeOut: 200, + attribute: "title", + content: false, // HTML or String to fill TipTIp with + enter: function(){}, + exit: function(){} + }; + var opts = $.extend(defaults, options); + + // Setup tip tip elements and render them to the DOM + if($("#tiptip_holder").length <= 0){ + var tiptip_holder = $('<div id="tiptip_holder" style="max-width:'+ opts.maxWidth +';"></div>'); + var tiptip_content = $('<div id="tiptip_content"></div>'); + var tiptip_arrow = $('<div id="tiptip_arrow"></div>'); + $("body").append(tiptip_holder.html(tiptip_content).prepend(tiptip_arrow.html('<div id="tiptip_arrow_inner"></div>'))); + } else { + var tiptip_holder = $("#tiptip_holder"); + var tiptip_content = $("#tiptip_content"); + var tiptip_arrow = $("#tiptip_arrow"); + } + + return this.each(function(){ + var org_elem = $(this); + if(opts.content){ + var org_title = opts.content; + } else { + var org_title = org_elem.attr(opts.attribute); + } + if(org_title != ""){ + if(!opts.content){ + org_elem.removeAttr(opts.attribute); //remove original Attribute + } + var timeout = false; + + if(opts.activation == "hover"){ + org_elem.hover(function(){ + active_tiptip(); + }, function(){ + if(!opts.keepAlive){ + deactive_tiptip(); + } + }); + if(opts.keepAlive){ + tiptip_holder.hover(function(){}, function(){ + deactive_tiptip(); + }); + } + } else if(opts.activation == "focus"){ + org_elem.focus(function(){ + active_tiptip(); + }).blur(function(){ + deactive_tiptip(); + }); + } else if(opts.activation == "click"){ + org_elem.click(function(){ + active_tiptip(); + return false; + }).hover(function(){},function(){ + if(!opts.keepAlive){ + deactive_tiptip(); + } + }); + if(opts.keepAlive){ + tiptip_holder.hover(function(){}, function(){ + deactive_tiptip(); + }); + } + } + + function active_tiptip(){ + opts.enter.call(this); + tiptip_content.html(org_title); + tiptip_holder.hide().removeAttr("class").css("margin","0"); + tiptip_arrow.removeAttr("style"); + + var top = parseInt(org_elem.offset()['top']); + var left = parseInt(org_elem.offset()['left']); + var org_width = parseInt(org_elem.outerWidth()); + var org_height = parseInt(org_elem.outerHeight()); + var tip_w = tiptip_holder.outerWidth(); + var tip_h = tiptip_holder.outerHeight(); + var w_compare = Math.round((org_width - tip_w) / 2); + var h_compare = Math.round((org_height - tip_h) / 2); + var marg_left = Math.round(left + w_compare); + var marg_top = Math.round(top + org_height + opts.edgeOffset); + var t_class = ""; + var arrow_top = ""; + var arrow_left = Math.round(tip_w - 12) / 2; + + if(opts.defaultPosition == "bottom"){ + t_class = "_bottom"; + } else if(opts.defaultPosition == "top"){ + t_class = "_top"; + } else if(opts.defaultPosition == "left"){ + t_class = "_left"; + } else if(opts.defaultPosition == "right"){ + t_class = "_right"; + } + + var right_compare = (w_compare + left) < parseInt($(window).scrollLeft()); + var left_compare = (tip_w + left) > parseInt($(window).width()); + + if((right_compare && w_compare < 0) || (t_class == "_right" && !left_compare) || (t_class == "_left" && left < (tip_w + opts.edgeOffset + 5))){ + t_class = "_right"; + arrow_top = Math.round(tip_h - 13) / 2; + arrow_left = -12; + marg_left = Math.round(left + org_width + opts.edgeOffset); + marg_top = Math.round(top + h_compare); + } else if((left_compare && w_compare < 0) || (t_class == "_left" && !right_compare)){ + t_class = "_left"; + arrow_top = Math.round(tip_h - 13) / 2; + arrow_left = Math.round(tip_w); + marg_left = Math.round(left - (tip_w + opts.edgeOffset + 5)); + marg_top = Math.round(top + h_compare); + } + + var top_compare = (top + org_height + opts.edgeOffset + tip_h + 8) > parseInt($(window).height() + $(window).scrollTop()); + var bottom_compare = ((top + org_height) - (opts.edgeOffset + tip_h + 8)) < 0; + + if(top_compare || (t_class == "_bottom" && top_compare) || (t_class == "_top" && !bottom_compare)){ + if(t_class == "_top" || t_class == "_bottom"){ + t_class = "_top"; + } else { + t_class = t_class+"_top"; + } + arrow_top = tip_h; + marg_top = Math.round(top - (tip_h + 5 + opts.edgeOffset)); + } else if(bottom_compare | (t_class == "_top" && bottom_compare) || (t_class == "_bottom" && !top_compare)){ + if(t_class == "_top" || t_class == "_bottom"){ + t_class = "_bottom"; + } else { + t_class = t_class+"_bottom"; + } + arrow_top = -12; + marg_top = Math.round(top + org_height + opts.edgeOffset); + } + + if(t_class == "_right_top" || t_class == "_left_top"){ + marg_top = marg_top + 5; + } else if(t_class == "_right_bottom" || t_class == "_left_bottom"){ + marg_top = marg_top - 5; + } + if(t_class == "_left_top" || t_class == "_left_bottom"){ + marg_left = marg_left + 5; + } + tiptip_arrow.css({"margin-left": arrow_left+"px", "margin-top": arrow_top+"px"}); + tiptip_holder.css({"margin-left": marg_left+"px", "margin-top": marg_top+"px"}).attr("class","tip"+t_class); + + if (timeout){ clearTimeout(timeout); } + timeout = setTimeout(function(){ tiptip_holder.stop(true,true).fadeIn(opts.fadeIn); }, opts.delay); + } + + function deactive_tiptip(){ + opts.exit.call(this); + if (timeout){ clearTimeout(timeout); } + tiptip_holder.fadeOut(opts.fadeOut); + } + } + }); + } +})(jQuery); diff --git a/vendor/assets/javascripts/marked.js b/vendor/assets/javascripts/marked.js new file mode 100644 index 00000000..e1b1b9e8 --- /dev/null +++ b/vendor/assets/javascripts/marked.js @@ -0,0 +1,6 @@ +/** + * marked - a markdown parser + * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) + * https://github.com/chjj/marked + */ +(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].split(/ *\| */)}this.tokens.push(item);continue}if(cap=this.rules.lheading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[2]==="="?1:2,text:cap[1]});continue}if(cap=this.rules.hr.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"hr"});continue}if(cap=this.rules.blockquote.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"blockquote_start"});cap=cap[0].replace(/^ *> ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i<l;i++){item=cap[i];space=item.length;item=item.replace(/^ *([*+-]|\d+\.) +/,"");if(~item.indexOf("\n ")){space-=item.length;item=!this.options.pedantic?item.replace(new RegExp("^ {1,"+space+"}","gm"),""):item.replace(/^ {1,4}/gm,"")}if(this.options.smartLists&&i!==l-1){b=block.bullet.exec(cap[i+1])[0];if(bull!==b&&!(bull.length>1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:cap[1]==="pre"||cap[1]==="script"||cap[1]==="style",text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i<item.align.length;i++){if(/^ *-+: *$/.test(item.align[i])){item.align[i]="right"}else if(/^ *:-+: *$/.test(item.align[i])){item.align[i]="center"}else if(/^ *:-+ *$/.test(item.align[i])){item.align[i]="left"}else{item.align[i]=null}}for(i=0;i<item.cells.length;i++){item.cells[i]=item.cells[i].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */)}this.tokens.push(item);continue}if(top&&(cap=this.rules.paragraph.exec(src))){src=src.substring(cap[0].length);this.tokens.push({type:"paragraph",text:cap[1].charAt(cap[1].length-1)==="\n"?cap[1].slice(0,-1):cap[1]});continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"text",text:cap[0]});continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return this.tokens};var inline={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};inline._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;inline._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^<a /i.test(cap[0])){this.inLink=true}else if(this.inLink&&/^<\/a>/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=escape(this.smartypants(cap[0]));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){var out="",l=text.length,i=0,ch;for(;i<l;i++){ch=text.charCodeAt(i);if(Math.random()>.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"<pre><code>"+(escaped?code:escape(code,true))+"\n</code></pre>"}return'<pre><code class="'+this.options.langPrefix+escape(lang,true)+'">'+(escaped?code:escape(code,true))+"\n</code></pre>\n"};Renderer.prototype.blockquote=function(quote){return"<blockquote>\n"+quote+"</blockquote>\n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"<h"+level+' id="'+this.options.headerPrefix+raw.toLowerCase().replace(/[^\w]+/g,"-")+'">'+text+"</h"+level+">\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"</"+type+">\n"};Renderer.prototype.listitem=function(text){return"<li>"+text+"</li>\n"};Renderer.prototype.paragraph=function(text){return"<p>"+text+"</p>\n"};Renderer.prototype.table=function(header,body){return"<table>\n"+"<thead>\n"+header+"</thead>\n"+"<tbody>\n"+body+"</tbody>\n"+"</table>\n"};Renderer.prototype.tablerow=function(content){return"<tr>\n"+content+"</tr>\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"</"+type+">\n"};Renderer.prototype.strong=function(text){return"<strong>"+text+"</strong>"};Renderer.prototype.em=function(text){return"<em>"+text+"</em>"};Renderer.prototype.codespan=function(text){return"<code>"+text+"</code>"};Renderer.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"};Renderer.prototype.del=function(text){return"<del>"+text+"</del>"};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0){return""}}var out='<a href="'+href+'"';if(title){out+=' title="'+title+'"'}out+=">"+text+"</a>";return out};Renderer.prototype.image=function(href,title,text){var out='<img src="'+href+'" alt="'+text+'"';if(title){out+=' title="'+title+'"'}out+=this.options.xhtml?"/>":">";return out};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i<this.token.header.length;i++){flags={header:true,align:this.token.align[i]};cell+=this.renderer.tablecell(this.inline.output(this.token.header[i]),{header:true,align:this.token.align[i]})}header+=this.renderer.tablerow(cell);for(i=0;i<this.token.cells.length;i++){row=this.token.cells[i];cell="";for(j=0;j<row.length;j++){cell+=this.renderer.tablecell(this.inline.output(row[j]),{header:false,align:this.token.align[j]})}body+=this.renderer.tablerow(cell)}return this.renderer.table(header,body)}case"blockquote_start":{var body="";while(this.next().type!=="blockquote_end"){body+=this.tok()}return this.renderer.blockquote(body)}case"list_start":{var body="",ordered=this.token.ordered;while(this.next().type!=="list_end"){body+=this.tok()}return this.renderer.list(body,ordered)}case"list_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.token.type==="text"?this.parseText():this.tok()}return this.renderer.listitem(body)}case"loose_item_start":{var body="";while(this.next().type!=="list_item_end"){body+=this.tok()}return this.renderer.listitem(body)}case"html":{var html=!this.token.pre&&!this.options.pedantic?this.inline.output(this.token.text):this.token.text;return this.renderer.html(html)}case"paragraph":{return this.renderer.paragraph(this.inline.output(this.token.text))}case"text":{return this.renderer.paragraph(this.parseText())}}};function escape(html,encode){return html.replace(!encode?/&(?!#?\w+;)/g:/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;i<arguments.length;i++){target=arguments[i];for(key in target){if(Object.prototype.hasOwnProperty.call(target,key)){obj[key]=target[key]}}}return obj}function marked(src,opt,callback){if(callback||typeof opt==="function"){if(!callback){callback=opt;opt=null}opt=merge({},marked.defaults,opt||{});var highlight=opt.highlight,tokens,pending,i=0;try{tokens=Lexer.lex(src,opt)}catch(e){return callback(e)}pending=tokens.length;var done=function(err){if(err){opt.highlight=highlight;return callback(err)}var out;try{out=Parser.parse(tokens,opt)}catch(e){err=e}opt.highlight=highlight;return err?callback(err):callback(null,out)};if(!highlight||highlight.length<3){return done()}delete opt.highlight;if(!pending)return done();for(;i<tokens.length;i++){(function(token){if(token.type!=="code"){return--pending||done()}return highlight(token.text,token.lang,function(err,code){if(err)return done(err);if(code==null||code===token.text){return--pending||done()}token.text=code;token.escaped=true;--pending||done()})})(tokens[i])}return}try{if(opt)opt=merge({},marked.defaults,opt);return Parser.parse(Lexer.lex(src,opt),opt)}catch(e){e.message+="\nPlease report this to https://github.com/chjj/marked.";if((opt||marked.defaults).silent){return"<p>An error occured:</p><pre>"+escape(e.message+"",true)+"</pre>"}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); diff --git a/app/assets/javascripts/showdown.js b/vendor/assets/javascripts/showdown.js similarity index 100% rename from app/assets/javascripts/showdown.js rename to vendor/assets/javascripts/showdown.js diff --git a/app/assets/javascripts/vendor/underscore.js b/vendor/assets/javascripts/underscore.js similarity index 100% rename from app/assets/javascripts/vendor/underscore.js rename to vendor/assets/javascripts/underscore.js diff --git a/app/assets/stylesheets/bootstrap/bootstrap.css b/vendor/assets/stylesheets/bootstrap/bootstrap.css similarity index 100% rename from app/assets/stylesheets/bootstrap/bootstrap.css rename to vendor/assets/stylesheets/bootstrap/bootstrap.css diff --git a/app/assets/stylesheets/fancybox.scss b/vendor/assets/stylesheets/fancybox.scss similarity index 100% rename from app/assets/stylesheets/fancybox.scss rename to vendor/assets/stylesheets/fancybox.scss diff --git a/app/assets/stylesheets/highlight/styles/default.css b/vendor/assets/stylesheets/highlight/styles/default.css similarity index 100% rename from app/assets/stylesheets/highlight/styles/default.css rename to vendor/assets/stylesheets/highlight/styles/default.css diff --git a/app/assets/stylesheets/highlight/styles/github.css b/vendor/assets/stylesheets/highlight/styles/github.css similarity index 100% rename from app/assets/stylesheets/highlight/styles/github.css rename to vendor/assets/stylesheets/highlight/styles/github.css diff --git a/vendor/assets/stylesheets/selectize/selectize.bootstrap3.scss b/vendor/assets/stylesheets/selectize/selectize.bootstrap3.scss new file mode 100755 index 00000000..a9bc5630 --- /dev/null +++ b/vendor/assets/stylesheets/selectize/selectize.bootstrap3.scss @@ -0,0 +1,133 @@ +@import 'selectize'; + +$selectize-font-family: $font-family-base; +$selectize-font-size: $font-size-base; +$selectize-line-height: $line-height-computed; + +$selectize-color-text: $text-color; +$selectize-color-highlight: rgba(255, 237, 40, .4); +$selectize-color-input: $input-bg; +$selectize-color-input-full: $input-bg; +$selectize-color-disabled: $input-bg; +$selectize-color-item: #efefef; +$selectize-color-item-border: rgba(0, 0, 0, 0); +$selectize-color-item-active: $component-active-bg; +$selectize-color-item-active-text: #fff; +$selectize-color-item-active-border: rgba(0, 0, 0, 0); +$selectize-color-optgroup: $dropdown-bg; +$selectize-color-optgroup-text: $dropdown-header-color; +$selectize-color-optgroup-border: $dropdown-divider-bg; +$selectize-color-dropdown: $dropdown-bg; +$selectize-color-dropdown-border-top: mix($input-border, $input-bg, .8); +$selectize-color-dropdown-item-active: $dropdown-link-hover-bg; +$selectize-color-dropdown-item-active-text: $dropdown-link-hover-color; +$selectize-color-dropdown-item-create-active-text: $dropdown-link-hover-color; +$selectize-opacity-disabled: .5; +$selectize-shadow-input: none; +$selectize-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, .15); +$selectize-border: 1px solid $input-border; +$selectize-border-radius: $input-border-radius; + +$selectize-width-item-border: 0; +$selectize-padding-x: $padding-base-horizontal; +$selectize-padding-y: $padding-base-vertical; +$selectize-padding-dropdown-item-x: $padding-base-horizontal; +$selectize-padding-dropdown-item-y: 3px; +$selectize-padding-item-x: 3px; +$selectize-padding-item-y: 1px; +$selectize-margin-item-x: 3px; +$selectize-margin-item-y: 3px; +$selectize-caret-margin: 0; + +$selectize-arrow-size: 5px; +$selectize-arrow-color: $selectize-color-text; +$selectize-arrow-offset: $selectize-padding-x + 5px; + +.selectize-dropdown, +.selectize-dropdown.form-control { + height: auto; + padding: 0; + margin: 2px 0 0 0; + z-index: $zindex-dropdown; + background: $selectize-color-dropdown; + border: 1px solid $dropdown-fallback-border; + border: 1px solid $dropdown-border; + @include selectize-border-radius($border-radius-base); + @include selectize-box-shadow(0 6px 12px rgba(0, 0, 0, .175)); +} + +.selectize-dropdown { + + .optgroup-header { + font-size: $font-size-small; + line-height: $line-height-base; + } + + .optgroup:first-child:before { + display: none; + } + + .optgroup:before { + content: ' '; + display: block; + margin-left: $selectize-padding-dropdown-item-x * -1; + margin-right: $selectize-padding-dropdown-item-x * -1; + @include nav-divider; + } + +} + +.selectize-dropdown-content { + padding: 5px 0; +} + +.selectize-dropdown-header { + padding: $selectize-padding-dropdown-item-y * 2 $selectize-padding-dropdown-item-x; +} + +.selectize-input { + min-height: $input-height-base; + + &.dropdown-active { + @include selectize-border-radius($selectize-border-radius); + } + + &.dropdown-active:before { + display: none; + } + + &.focus { + $color: $input-border-focus; + $color-rgba: rgba(red($color), green($color), blue($color), .6); + border-color: $color; + outline: 0; + @include selectize-box-shadow(#{inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px $color-rgba}); + } + +} + +.selectize-control { + + &.multi { + + .selectize-input.has-items { + padding-left: $selectize-padding-x - $selectize-padding-item-x; + padding-right: $selectize-padding-x - $selectize-padding-item-x; + } + + .selectize-input > div { + @include selectize-border-radius($selectize-border-radius - 1px); + } + + } + +} + +.form-control.selectize-control { + padding: 0; + height: auto; + border: none; + background: none; + @include selectize-box-shadow(none); + @include selectize-border-radius(0); +} \ No newline at end of file diff --git a/vendor/assets/stylesheets/selectize/selectize.default.scss b/vendor/assets/stylesheets/selectize/selectize.default.scss new file mode 100755 index 00000000..662ead7b --- /dev/null +++ b/vendor/assets/stylesheets/selectize/selectize.default.scss @@ -0,0 +1,89 @@ +@import 'selectize'; + +$selectize-color-item: #1da7ee; +$selectize-color-item-text: #fff; +$selectize-color-item-active-text: #fff; +$selectize-color-item-border: #0073bb; +$selectize-color-item-active: #92c836; +$selectize-color-item-active-border: #00578d; +$selectize-width-item-border: 1px; +$selectize-caret-margin: 0 1px; + +.selectize-control { + + &.multi { + + .selectize-input { + + &.has-items { + $padding-x: $selectize-padding-x - 3px; + padding-left: $padding-x; + padding-right: $padding-x; + } + + &.disabled [data-value] { + color: #999; + text-shadow: none; + background: none; + @include selectize-box-shadow(none); + + &, + .remove { + border-color: #e6e6e6; + } + + .remove { + background: none; + } + + } + [data-value] { + text-shadow: 0 1px 0 rgba(0, 51, 83, .3); + @include selectize-border-radius(3px); + @include selectize-vertical-gradient(#1da7ee, #178ee9); + @include selectize-box-shadow(#{0 1px 0 rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .03)}); + + &.active { + @include selectize-vertical-gradient(#008fd8, #0075cf); + } + + } + + } + + } + + &.single { + + .selectize-input { + @include selectize-box-shadow(#{0 1px 0 rgba(0, 0, 0, .05), inset 0 1px 0 rgba(255, 255, 255, .8)}); + @include selectize-vertical-gradient(#fefefe, #f2f2f2); + } + + } + +} + +.selectize-control.single .selectize-input, +.selectize-dropdown.single { + border-color: #b8b8b8; +} + +.selectize-dropdown { + + .optgroup-header { + padding-top: $selectize-padding-dropdown-item-y + 2px; + font-weight: bold; + font-size: .85em; + } + + .optgroup { + border-top: 1px solid $selectize-color-dropdown-border-top; + + &:first-child { + border-top: 0 none; + } + + } + +} \ No newline at end of file diff --git a/vendor/assets/stylesheets/selectize/selectize.scss b/vendor/assets/stylesheets/selectize/selectize.scss new file mode 100755 index 00000000..25fd64ed --- /dev/null +++ b/vendor/assets/stylesheets/selectize/selectize.scss @@ -0,0 +1,315 @@ +/** + * selectize.scss (v0.8.7) + * Copyright (c) 2014 Emanuel Kluge + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this + * file except in compliance with the License. You may obtain a copy of the License at: + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF + * ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + * + * @author Emanuel Kluge <mail@emanuel-kluge.de> + */ + +$selectize-font-family: inherit !default; +$selectize-font-smoothing: inherit !default; +$selectize-font-size: 13px !default; +$selectize-line-height: 18px !default; + +$selectize-color-text: #303030 !default; +$selectize-color-border: #d0d0d0 !default; +$selectize-color-highlight: rgba(125, 168, 208, .2) !default; +$selectize-color-input: #fff !default; +$selectize-color-input-full: $selectize-color-input !default; +$selectize-color-disabled: #fafafa !default; +$selectize-color-item: #f2f2f2 !default; +$selectize-color-item-text: $selectize-color-text !default; +$selectize-color-item-border: #d0d0d0 !default; +$selectize-color-item-active: #e8e8e8 !default; +$selectize-color-item-active-text: $selectize-color-text !default; +$selectize-color-item-active-border: #cacaca !default; +$selectize-color-dropdown: #fff !default; +$selectize-color-dropdown-border: $selectize-color-border !default; +$selectize-color-dropdown-border-top: #f0f0f0 !default; +$selectize-color-dropdown-item-active: #f5fafd !default; +$selectize-color-dropdown-item-active-text: #495c68 !default; +$selectize-color-dropdown-item-create-text: rgba(red($selectize-color-text), green($selectize-color-text), blue($selectize-color-text), .5) !default; +$selectize-color-dropdown-item-create-active-text: $selectize-color-dropdown-item-active-text !default; +$selectize-color-optgroup: $selectize-color-dropdown !default; +$selectize-color-optgroup-text: $selectize-color-text !default; +$selectize-lighten-disabled-item: 30% !default; +$selectize-lighten-disabled-item-text: 30% !default; +$selectize-lighten-disabled-item-border: 30% !default; +$selectize-opacity-disabled: 0.5 !default; + +$selectize-shadow-input: inset 0 1px 1px rgba(0, 0, 0, .1) !default; +$selectize-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, .15) !default; +$selectize-border: 1px solid $selectize-color-border !default; +$selectize-border-radius: 3px !default; + +$selectize-width-item-border: 0 !default; +$selectize-max-height-dropdown: 200px !default; + +$selectize-padding-x: 8px !default; +$selectize-padding-y: 8px !default; +$selectize-padding-item-x: 6px !default; +$selectize-padding-item-y: 2px !default; +$selectize-padding-dropdown-item-x: $selectize-padding-x !default; +$selectize-padding-dropdown-item-y: 5px !default; +$selectize-margin-item-x: 3px !default; +$selectize-margin-item-y: 3px !default; + +$selectize-arrow-size: 5px !default; +$selectize-arrow-color: #808080 !default; +$selectize-arrow-offset: 15px !default; + +$selectize-caret-margin: 0 2px 0 0 !default; +$selectize-caret-margin-rtl: 0 4px 0 -2px !default; + +@mixin selectize-border-radius ($radii) { + -webkit-border-radius: $radii; + -moz-border-radius: $radii; + border-radius: $radii; +} + +@mixin selectize-select ($type: none) { + -webkit-user-select: $type; + -moz-user-select: $type; + -ms-user-select: $type; + user-select: $type; +} + +@mixin selectize-box-shadow ($shadow) { + -webkit-box-shadow: $shadow; + box-shadow: $shadow; +} + +@mixin selectize-box-sizing ($type: border-box) { + -webkit-box-sizing: $type; + -moz-box-sizing: $type; + box-sizing: $type; +} + +@mixin selectize-vertical-gradient ($color-top, $color-bottom) { + background-color: mix($color-top, $color-bottom, 60%); + background-image: -moz-linear-gradient(top, $color-top, $color-bottom); // FF 3.6+ + background-image: -webkit-gradient(linear, 0 0, 0 100%, from($color-top), to($color-bottom)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, $color-top, $color-bottom); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, $color-top, $color-bottom); // Opera 11.10 + background-image: linear-gradient(to bottom, $color-top, $color-bottom); // Standard, IE10 + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient( + startColorstr='#{$color-top}', + endColorstr='#{$color-bottom}', + GradientType=0); // IE9 and down +} + +.selectize-control { + position: relative; +} + +.selectize-dropdown, +.selectize-input, +.selectize-input input { + color: $selectize-color-text; + font-family: $selectize-font-family; + font-size: $selectize-font-size; + line-height: $selectize-line-height; + -webkit-font-smoothing: $selectize-font-smoothing; +} + +.selectize-input, +.selectize-control.single .selectize-input.input-active { + background: $selectize-color-input; + cursor: text; + display: inline-block; +} + +.selectize-input { + border: $selectize-border; + padding: $selectize-padding-y $selectize-padding-x; + display: inline-block; + width: 100%; + overflow: hidden; + position: relative; + z-index: 1; + @include selectize-box-sizing(border-box); + @include selectize-box-shadow($selectize-shadow-input); + @include selectize-border-radius($selectize-border-radius); + + .selectize-control.multi &.has-items { + $padding-x: $selectize-padding-x; + $padding-top: $selectize-padding-y - $selectize-padding-item-y - $selectize-width-item-border; + $padding-bottom: $selectize-padding-y - $selectize-padding-item-y - $selectize-margin-item-y - $selectize-width-item-border; + padding: $padding-top $padding-x $padding-bottom; + } + + &.full { + background-color: $selectize-color-input-full; + } + &.disabled, &.disabled * { + cursor: default !important; + } + &.focus { + @include selectize-box-shadow($selectize-shadow-input-focus); + } + &.dropdown-active { + @include selectize-border-radius($selectize-border-radius $selectize-border-radius 0 0); + } + + > * { + vertical-align: baseline; + display: -moz-inline-stack; + display: inline-block; + zoom: 1; + *display: inline; + } + .selectize-control.multi & > div { + cursor: pointer; + margin: 0 $selectize-margin-item-x $selectize-margin-item-y 0; + padding: $selectize-padding-item-y $selectize-padding-item-x; + background: $selectize-color-item; + color: $selectize-color-item-text; + border: $selectize-width-item-border solid $selectize-color-item-border; + + &.active { + background: $selectize-color-item-active; + color: $selectize-color-item-active-text; + border: $selectize-width-item-border solid $selectize-color-item-active-border; + } + } + .selectize-control.multi &.disabled > div { + &, &.active { + color: lighten(desaturate($selectize-color-item-text, 100%), $selectize-lighten-disabled-item-text); + background: lighten(desaturate($selectize-color-item, 100%), $selectize-lighten-disabled-item); + border: $selectize-width-item-border solid lighten(desaturate($selectize-color-item-border, 100%), $selectize-lighten-disabled-item-border); + } + } + > input { + &::-ms-clear { + display: none; + } + padding: 0 !important; + min-height: 0 !important; + max-height: none !important; + max-width: 100% !important; + margin: $selectize-caret-margin !important; + text-indent: 0 !important; + border: 0 none !important; + background: none !important; + line-height: inherit !important; + @include selectize-select(auto !important); + @include selectize-box-shadow(none !important); + + &:focus { + outline: none !important; + } + } +} + +.selectize-input:after { + content: ' '; + display: block; + clear: left; +} + +.selectize-input.dropdown-active:before { + content: ' '; + display: block; + position: absolute; + background: $selectize-color-dropdown-border-top; + height: 1px; + bottom: 0; + left: 0; + right: 0; +} + +.selectize-dropdown { + position: absolute; + z-index: 10; + border: $selectize-border; + background: $selectize-color-dropdown; + margin: -1px 0 0 0; + border-top: 0 none; + @include selectize-box-sizing(border-box); + @include selectize-box-shadow(0 1px 3px rgba(0, 0, 0, .1)); + @include selectize-border-radius(0 0 $selectize-border-radius $selectize-border-radius); + + [data-selectable] { + cursor: pointer; + overflow: hidden; + .highlight { + background: $selectize-color-highlight; + @include selectize-border-radius(1px); + } + } + [data-selectable], .optgroup-header { + padding: $selectize-padding-dropdown-item-y $selectize-padding-dropdown-item-x; + } + .optgroup:first-child .optgroup-header { + border-top: 0 none; + } + .optgroup-header { + color: $selectize-color-optgroup-text; + background: $selectize-color-optgroup; + cursor: default; + } + .active { + background-color: $selectize-color-dropdown-item-active; + color: $selectize-color-dropdown-item-active-text; + &.create { + color: $selectize-color-dropdown-item-create-active-text; + } + } + .create { + color: $selectize-color-dropdown-item-create-text; + } +} + +.selectize-dropdown-content { + overflow-y: auto; + overflow-x: hidden; + max-height: $selectize-max-height-dropdown; +} + +.selectize-control.single .selectize-input { + &, input { cursor: pointer; } + &.input-active, &.input-active input { cursor: text; } + + &:after { + content: ' '; + display: block; + position: absolute; + top: 50%; + right: $selectize-arrow-offset; + margin-top: round(-$selectize-arrow-size / 2); + width: 0; + height: 0; + border-style: solid; + border-width: $selectize-arrow-size $selectize-arrow-size 0 $selectize-arrow-size; + border-color: $selectize-arrow-color transparent transparent transparent; + } + &.dropdown-active:after { + margin-top: $selectize-arrow-size * -.8; + border-width: 0 $selectize-arrow-size $selectize-arrow-size $selectize-arrow-size; + border-color: transparent transparent $selectize-arrow-color transparent; + } +} + +.selectize-control.rtl { + &.single .selectize-input:after { + left: $selectize-arrow-offset; + right: auto; + } + .selectize-input > input { + margin: $selectize-caret-margin-rtl !important; + } +} + +.selectize-control .selectize-input.disabled { + opacity: $selectize-opacity-disabled; + background-color: $selectize-color-disabled; +} \ No newline at end of file