-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit with magnific popup assets and readme
- Loading branch information
Joshua Jansen
committed
May 2, 2013
0 parents
commit eef8497
Showing
12 changed files
with
2,144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Public domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module MagnificPopup | ||
module Rails | ||
VERSION = "0.0.1" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= require ./magnific-popup-rails |
Oops, something went wrong.