Skip to content

Commit

Permalink
Initial commit with magnific popup assets and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Jansen committed May 2, 2013
0 parents commit eef8497
Show file tree
Hide file tree
Showing 12 changed files with 2,144 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in magnific-popup-rails.gemspec
gemspec
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Public domain
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Magnific-Popup-Rails

Integrates [magnific-popup.css](http://dimsemenov.com/plugins/magnific-popup/) with the rails asset pipeline.

Magnific Popup is a free responsive jQuery lightbox plugin that is focused on performance and providing best experience for user with any device (Zepto.js compatible).

The magnific popup is created by Created by Dmitry Semenov.

I used [markmcconachie's](https://github.com/markmcconachie) [normalize-rails](https://github.com/markmcconachie/normalize-rails) gem as an example for setting up this magnific popup gem.

# For Rails 3.1+ only

## Installation

Add this line to your application's Gemfile:

gem 'maginific-popup-rails', github: "joshuajansen/magnific-popup-rails"

And then execute:

$ bundle

## Usage


And then in your application.css

*= require magnific-popup

And then in your application.js

//= require magnific-popup

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
23 changes: 23 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env rake
require "bundler/gem_tasks"
require 'open-uri'

desc "Download the latest magnific-popup.css and magnific-popup.js"
task :update do
# CSS
url = "https://raw.github.com/dimsemenov/Magnific-Popup/master/dist/magnific-popup.css"
outputfile = "vendor/assets/stylesheets/magnific-popup-rails/magnific-popup.css"

open(outputfile, 'wb') do |file|
file << open(url).read
end

# JS
url = "https://raw.github.com/dimsemenov/Magnific-Popup/master/dist/jquery.magnific-popup.js"
outputfile = "vendor/assets/javascripts/magnific-popup-rails/magnific-popup.js"

open(outputfile, 'wb') do |file|
file << open(url).read
end

end
8 changes: 8 additions & 0 deletions lib/magnific-popup-rails.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require "magnific-popup-rails/version"
require "magnific-popup-rails/engine"

module MagnificPopup
module Rails
# Your code goes here...
end
end
9 changes: 9 additions & 0 deletions lib/magnific-popup-rails/engine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module MagnificPopup
module Rails
class Engine < ::Rails::Engine
initializer "configure assets of magnific-popup-rails", :group => :all do |app|
app.config.assets.precompile += %w( magnific-popup-rails/*.css magnific-popup-rails/*.js )
end
end
end
end
5 changes: 5 additions & 0 deletions lib/magnific-popup-rails/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module MagnificPopup
module Rails
VERSION = "0.0.1"
end
end
19 changes: 19 additions & 0 deletions magnific-popup-rails.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/magnific-popup-rails/version', __FILE__)

Gem::Specification.new do |gem|
gem.authors = ["Joshua Jansen"]
gem.email = ["joshua@itflows.nl"]
gem.description = %q{Magnific Popup is a free responsive jQuery lightbox plugin that is focused on performance and providing best experience for user with any device}
gem.summary = %q{Magnific Popup displays images before they're completely loaded to take full advantage of progressive loading. For in and out transitions CSS3 is used instead of slow JavaScript animation.}
gem.homepage = "https://github.com/joshuajansen/magnific-popup-rails"

gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = "magnific-popup-rails"
gem.require_paths = ["lib"]
gem.version = MagnificPopup::Rails::VERSION

gem.add_development_dependency "rake"
end
1 change: 1 addition & 0 deletions vendor/assets/javascripts/magnific-popup-rails/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//= require ./magnific-popup-rails
Loading

0 comments on commit eef8497

Please sign in to comment.