compass-responsive-embeds 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in compass-responsive-embeds.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Matthieu Sadouni
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Compass Responsive Embeds
2
+
3
+ This extension helps embedding videos and iframes in responsive designs.
4
+
5
+ See the blogs posts from [Anders M. Andersen](http://amobil.se/2011/11/responsive-embeds/) and [A List Apart](http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/) for more information.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'compass-responsive-embeds'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install compass-responsive-embeds
20
+
21
+ Add to a project:
22
+
23
+ // rails: compass.config, other: config.rb
24
+ require 'compass-responsive-embeds'
25
+
26
+ // command line
27
+ compass install compass-responsive-embeds
28
+
29
+ ## Usage
30
+
31
+ @import 'compass-responsive-embeds';
32
+
33
+ // 16/9 embed
34
+ .embed-16-9 {
35
+ @include embed-container(16/9);
36
+ }
37
+
38
+ // 4/3 embed
39
+ .embed-4-3 {
40
+ @include embed-container(4/3);
41
+ }
42
+
43
+ ## Contributing
44
+
45
+ 1. Fork it
46
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
47
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
48
+ 4. Push to the branch (`git push origin my-new-feature`)
49
+ 5. Create new Pull Request
50
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'compass-responsive-embeds/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "compass-responsive-embeds"
8
+ gem.version = Compass::Responsive::Embeds::VERSION
9
+ gem.authors = ["Matthieu Sadouni"]
10
+ gem.email = ["matthieusadouni@gmail.com"]
11
+ gem.description = <<-EOF
12
+ see http://amobil.se/2011/11/responsive-embeds/ and http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ for more information
13
+ EOF
14
+ gem.summary = %q{a compass extension to help embed videos and iframes in responsive designs}
15
+ gem.homepage = ""
16
+
17
+ gem.files = `git ls-files`.split($/)
18
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
19
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
20
+ gem.require_paths = ["lib"]
21
+
22
+ gem.add_dependency("compass")
23
+ end
@@ -0,0 +1,5 @@
1
+ require "compass-responsive-embeds/version"
2
+ require 'compass'
3
+ Compass::Frameworks.register('compass-responsive-embeds',
4
+ :stylesheets_directory => File.join(File.dirname(__FILE__), '..', 'stylesheets'),
5
+ :templates_directory => File.join(File.dirname(__FILE__), '..', 'templates'))
@@ -0,0 +1,7 @@
1
+ module Compass
2
+ module Responsive
3
+ module Embeds
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ // This is your framework's main stylesheet. Use it to import all default modules.
2
+ @import 'compass-responsive-embeds/responsive-embeds';
3
+
@@ -0,0 +1,20 @@
1
+ // Mixin
2
+ //
3
+ // $ratio : any valid ratio like 16/9, 4/3...
4
+ @mixin embed-container($ratio) {
5
+ position: relative;
6
+ padding-bottom: 100%/$ratio;
7
+ padding-top: 30px; /* IE6 workaround*/
8
+ height: 0;
9
+ overflow: hidden;
10
+ & iframe,
11
+ & object,
12
+ & embed {
13
+ position: absolute;
14
+ top: 0;
15
+ left: 0;
16
+ width: 100%;
17
+ height: 100%;
18
+ }
19
+ }
20
+
@@ -0,0 +1,2 @@
1
+ # Make sure you list all the project template files here in the manifest.
2
+ stylesheet 'screen.sass', :media => 'screen, projection'
@@ -0,0 +1,2 @@
1
+ // This is where you put the contents of the main stylesheet for the user's project.
2
+ // It should import your sass stylesheets and demonstrate how to use them.
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: compass-responsive-embeds
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Matthieu Sadouni
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-10-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: compass
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: ! ' see http://amobil.se/2011/11/responsive-embeds/ and http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
31
+ for more information
32
+
33
+ '
34
+ email:
35
+ - matthieusadouni@gmail.com
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - .gitignore
41
+ - Gemfile
42
+ - LICENSE.txt
43
+ - README.md
44
+ - Rakefile
45
+ - compass-responsive-embeds.gemspec
46
+ - lib/compass-responsive-embeds.rb
47
+ - lib/compass-responsive-embeds/version.rb
48
+ - stylesheets/_compass-responsive-embeds.scss
49
+ - stylesheets/compass-responsive-embeds/_responsive-embeds.scss
50
+ - templates/project/manifest.rb
51
+ - templates/project/screen.scss
52
+ homepage: ''
53
+ licenses: []
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 1.8.24
73
+ signing_key:
74
+ specification_version: 3
75
+ summary: a compass extension to help embed videos and iframes in responsive designs
76
+ test_files: []