bookends 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: df2b9e7bc4b037c73565f06096b0b8196d5e9164
4
+ data.tar.gz: d9fd5a160723aa2e0cb3d9a2a14ae8e394bf63d7
5
+ SHA512:
6
+ metadata.gz: defb8a2394d54a068093154b0f901e5cb4c4b585c29991c33120ff1e3f0202e46c8e61d0db926dd82507d56165badc152d7517f5a8cb0f6796faffc73680fe36
7
+ data.tar.gz: 6dcd7d0585db0364190e99e85875602fd96a1a4e4dabec1bfd3d7419ae7a0cef9c864befa1deb8d9c38d855f6dfcfe9802002c46838ff63b16b0172f199bee13
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .rbenv-gemsets
11
+ .ruby-gemset
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1 @@
1
+ 2.2.2
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bookends.gemspec
4
+ gemspec
@@ -0,0 +1 @@
1
+ Copyright 2015 Heroku. All rights reserved.
@@ -0,0 +1,30 @@
1
+ # Bookends
2
+ Shared footer (and eventually header) for Heroku properties.
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'bookends', # path info coming soon
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ $ bundle
15
+
16
+ ## Usage
17
+
18
+ * `rails g bookends:install`
19
+ * add `@import 'bookends/footer';` to your application.css.scss
20
+ * add `<%= render partial: "bookends/footer" %>` to your layout where you want the footer.
21
+
22
+ ## Development
23
+
24
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests.
25
+
26
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
27
+
28
+ ## Contributing
29
+
30
+ Bug reports and pull requests are welcome on GitHub at https://github.com/heroku/bookends.
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'bookends/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "bookends"
8
+ spec.version = Bookends::VERSION
9
+ spec.authors = ["Marketing Web Ops at heroku"]
10
+ spec.email = ["max.beizer@gmail.com"]
11
+
12
+ spec.summary = %q{an engine to abstract common html/css elements across Heroku properties}
13
+ spec.description = %q{an engine to abstract common html/css elements across Heroku properties}
14
+ spec.homepage = "https://www.heroku.com"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "rails", ">= 3.2.22"
22
+ spec.add_development_dependency "bundler", "~> 1.10"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec"
25
+ end
@@ -0,0 +1,5 @@
1
+ require "bookends/version"
2
+
3
+ module Bookends
4
+ require 'bookends/engine' if defined?(Rails)
5
+ end
@@ -0,0 +1,4 @@
1
+ require 'rails'
2
+ module Bookends
3
+ class Engine < Rails::Engine; end
4
+ end
@@ -0,0 +1,3 @@
1
+ module Bookends
2
+ VERSION = "0.4.4"
3
+ end
@@ -0,0 +1,20 @@
1
+ require 'rails/generators'
2
+
3
+ module Bookends
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ source_root File.expand_path('../templates', __FILE__)
7
+
8
+ desc "Generates footer's shared html/css"
9
+
10
+ def copy_footer
11
+ FileUtils.mkdir_p 'app/assets/stylesheets/bookends'
12
+ FileUtils.mkdir_p 'app/views/bookends'
13
+
14
+ copy_file 'footer.html.erb', 'app/views/bookends/_footer.html.erb'
15
+ copy_file 'footer.css.scss', 'app/assets/stylesheets/bookends/_footer.css.scss'
16
+ directory 'footer_images' , 'app/assets/images/bookends/footer/'
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,344 @@
1
+ #heroku-footer {
2
+
3
+ $asset-path: 'bookends/footer';
4
+
5
+ $footer-width: 94%;
6
+ $footer-max-width: 1060px;
7
+
8
+ $color-header: #211746;
9
+ $color-purple: #6e5baa;
10
+ $color-link: #999;
11
+ $color-background: #f0f0f0;
12
+ $color-border: darken($color-background, 10%);
13
+
14
+ $threshold-tablet: 900px;
15
+ $threshold-mobile: 700px;
16
+
17
+ @mixin hidpi($ratio: 1.3) {
18
+ @media only screen and (-webkit-min-device-pixel-ratio: $ratio),
19
+ only screen and (min--moz-device-pixel-ratio: $ratio),
20
+ only screen and (-o-min-device-pixel-ratio: #{$ratio}/1),
21
+ only screen and (min-resolution: #{round($ratio*96)}dpi),
22
+ only screen and (min-resolution: #{$ratio}dppx) {
23
+ @content;
24
+ }
25
+ }
26
+
27
+ @mixin hide-text {
28
+ color: transparent;
29
+ font: 0/0 a;
30
+ text-shadow: none;
31
+ }
32
+
33
+ @mixin screen($threshold: max-width, $screen: $threshold-tablet) {
34
+ @media ($threshold: $screen) {
35
+ @content;
36
+ }
37
+ }
38
+
39
+ @mixin clearfix {
40
+ *zoom: 1;
41
+
42
+ &:before,
43
+ &:after {
44
+ content: " ";
45
+ display: table;
46
+ }
47
+
48
+ &:after {
49
+ clear: both;
50
+ }
51
+ }
52
+
53
+ padding-top: 15px;
54
+ background: $color-background;
55
+ box-shadow: 0 1px 1px 0 fade-out($color-background, .9) inset;
56
+ font-size: 13px;
57
+ color: #999;
58
+
59
+ * {
60
+ @include box-sizing(border-box);
61
+ }
62
+
63
+ .wrapper {
64
+ @include clearfix();
65
+ position: relative;
66
+ width: $footer-width;
67
+ max-width: $footer-max-width;
68
+ padding: 2em 0;
69
+ margin: 0 auto;
70
+ }
71
+
72
+ a:link,
73
+ a:visited {
74
+ color: $color-link;
75
+ text-decoration: none;
76
+ }
77
+
78
+ a:hover,
79
+ a:active {
80
+ color: darken($color-link, 30%);
81
+ }
82
+
83
+ ul {
84
+ list-style: none;
85
+ padding-left: 0;
86
+ font-weight: 200;
87
+ }
88
+
89
+ h3 {
90
+ color: $color-purple;
91
+ font-size: 14px;
92
+ }
93
+
94
+ h4 {
95
+ margin: 1.33em 0;
96
+ padding: 0;
97
+ font-size: 12px;
98
+ text-align: left;
99
+ font-weight: bold;
100
+ text-transform: uppercase;
101
+ letter-spacing: .1em;
102
+ color: $color-header;
103
+ @include screen($screen: $threshold-mobile) {
104
+ text-align: center;
105
+ }
106
+ }
107
+
108
+ .tertiary {
109
+ background: fade-out(white, .6);
110
+ @include screen() {
111
+ text-align: center;
112
+ }
113
+
114
+ a:link,
115
+ a:visited {
116
+ text-decoration: underline;
117
+ }
118
+
119
+ .col {
120
+ width: 50%;
121
+ }
122
+ }
123
+
124
+ .col {
125
+ display: block;
126
+ float: left;
127
+ @include screen($screen: $threshold-mobile) {
128
+ width: auto;
129
+ float: none;
130
+ }
131
+ }
132
+
133
+ .wrapper > .col {
134
+ ul {
135
+ margin-left: 0;
136
+ }
137
+
138
+ li {
139
+ margin-left: 0;
140
+ }
141
+
142
+ @include screen() {
143
+ float: none;
144
+ width: 100%;
145
+ }
146
+ }
147
+
148
+ .heroku-footer-links {
149
+ @include clearfix();
150
+ width: 70%;
151
+
152
+ .col {
153
+ width: 25%;
154
+ padding-right: 2%;
155
+ @include screen($screen: $threshold-mobile) {
156
+ width: auto;
157
+ padding-right: 0;
158
+ text-align: center;
159
+ }
160
+ }
161
+ }
162
+
163
+ .heroku-footer-social {
164
+ width: 30%;
165
+ @include screen() {
166
+ border-top: 1px solid $color-border;
167
+ text-align: center;
168
+ margin-top: 30px;
169
+ padding-top: 10px;
170
+ }
171
+
172
+ h3 {
173
+ margin: 7px 0 15px;
174
+ text-align: left;
175
+ span {
176
+ margin-right: 6px;
177
+ top: 4px;
178
+ }
179
+ }
180
+
181
+ // This has been commented out because the form is styled inside of Pardot.
182
+ // See template "Newsletter Signup - WWW Footer" to style the newsletter form.
183
+
184
+ // form {
185
+ // $input-height: 40px;
186
+
187
+ // position: relative;
188
+ // width: 100%;
189
+ // padding-bottom: 10px;
190
+ // @include screen(min-width, $threshold-tablet) {
191
+ // border-bottom: 1px solid $color-border;
192
+ // }
193
+
194
+ // input[type="text"],
195
+ // input[type="email"], {
196
+ // -webkit-appearance: none;
197
+ // width: 100%;
198
+ // height: $input-height;
199
+ // padding: 0 10px;
200
+ // border-radius: 4px;
201
+ // border: 1px solid $color-border;
202
+ // box-shadow: 0 0 4px fade-out($color-purple, 1);
203
+ // transition: all .2s ease;
204
+ // -webkit-transition: all .2s ease;
205
+ // &:focus {
206
+ // outline: none;
207
+ // box-shadow: 0 0 4px fade-out($color-purple, .5);
208
+ // border-color: $color-purple;
209
+ // }
210
+ // }
211
+
212
+ // button {
213
+ // -webkit-appearance: none;
214
+ // position: absolute;
215
+ // top: 0;
216
+ // right: 0;
217
+ // width: $input-height;
218
+ // height: $input-height;
219
+ // border: 0;
220
+ // background-color: transparent;
221
+ // border-radius: 3px;
222
+ // &:focus {
223
+ // outline: none;
224
+ // border: 1px solid fade-out($color-purple, .5);
225
+ // }
226
+ // }
227
+ // }
228
+
229
+ .social-list {
230
+ margin: 0;
231
+ li {
232
+ display: inline-block;
233
+ margin-right: 5px;
234
+ }
235
+ }
236
+
237
+ iframe {
238
+ position: relative;
239
+ width: 100%;
240
+ @include screen(min-width, $threshold-tablet) {
241
+ border-bottom: 1px solid $color-border;
242
+ }
243
+ }
244
+
245
+ }
246
+
247
+ .tertiary {
248
+ p {
249
+ font-size: 13px;
250
+ color: #999;
251
+ }
252
+ ul {
253
+ margin: 13px 0 10px;
254
+ float: right;
255
+ @include screen() {
256
+ float: none;
257
+ }
258
+ }
259
+
260
+ li {
261
+ display: inline-block;
262
+ margin-right: 7px;
263
+ @include screen() {
264
+ &:last-child {
265
+ margin-right: 0;
266
+ }
267
+ }
268
+ a {
269
+ display: block;
270
+ }
271
+ }
272
+ }
273
+
274
+ .sfdc-heroku-logo {
275
+ @include hide-text;
276
+ display: block;
277
+ float: left;
278
+ width: 142px;
279
+ height: 54px;
280
+ margin-right: 18px;
281
+ background-image: asset-url("#{$asset-path}/salesforce_heroku_gray.png");
282
+ background-size: 100%;
283
+ @include screen() {
284
+ display: inline-block;
285
+ float: none;
286
+ margin-right: 0;
287
+ }
288
+ }
289
+
290
+ //Icons
291
+ [class^="heroku-footer-icon-"] {
292
+ position: relative;
293
+ display: inline-block;
294
+ width: 21px;
295
+ height: 21px;
296
+ background-color: transparent;
297
+ background-repeat: no-repeat;
298
+ background-image: asset-url("#{$asset-path}/footer_sprite.png");
299
+ @include hide-text;
300
+ @include hidpi {
301
+ background-image: asset-url("#{$asset-path}/footer_sprite@2x.png");
302
+ background-size: 200px 100px;
303
+ }
304
+ }
305
+
306
+ //Icon array (class, background position x, y)
307
+ $icons: (rss 0 0,
308
+ twitter -21px 0,
309
+ facebook -42px 0,
310
+ github -63px 0,
311
+ vimeo -84px 0,
312
+ linkedin -105px 0,
313
+ newsletter -21px -63px,
314
+ submit 0 -42px
315
+ );
316
+
317
+ //Each loop to create classes
318
+ .heroku-footer-icon {
319
+ @each $var in $icons {
320
+ &-#{nth($var, 1)} {
321
+ background-position: #{nth($var, 2)} #{nth($var, 3)};
322
+ }
323
+ }
324
+ }
325
+
326
+ //Hover state for social links
327
+ .social-list .heroku-footer-icon {
328
+ @each $var in $icons {
329
+ &-#{nth($var, 1)} {
330
+ &:hover {
331
+ background-position: #{nth($var, 2)} -21px;
332
+ }
333
+ }
334
+ }
335
+ }
336
+
337
+ .heroku-footer-icon-submit {
338
+ top: -8px;
339
+ &:hover {
340
+ background-position: 0 -63px;
341
+ }
342
+ }
343
+
344
+ }
@@ -0,0 +1,72 @@
1
+ <footer id="heroku-footer">
2
+ <div class="wrapper">
3
+ <div class="col heroku-footer-links">
4
+ <nav class="col">
5
+ <h4>Products</h4>
6
+ <ul>
7
+ <li><%= link_to "Platform Features", "https://www.heroku.com/features" %></li>
8
+ <li><%= link_to "Heroku Connect", "https://www.heroku.com/connect" %></li>
9
+ <li><%= link_to "Heroku Postgres", "https://www.heroku.com/postgres" %></li>
10
+ <li><%= link_to "Heroku Redis", "https://www.heroku.com/redis" %></li>
11
+ <li><%= link_to "Heroku Enterprise", "https://www.heroku.com/enterprise" %></li>
12
+ <li><a href="https://elements.heroku.com/">Elements Marketplace</a></li>
13
+ <li><%= link_to "Pricing", "https://www.heroku.com/pricing" %></li>
14
+ </ul>
15
+ </nav>
16
+ <nav class="col">
17
+ <h4>Resources</h4>
18
+ <ul>
19
+ <li><a href="https://devcenter.heroku.com/">Documentation</a></li>
20
+ <li><a href="https://blog.heroku.com/">Blog</a></li>
21
+ <li><a href="https://devcenter.heroku.com/start">Get Started</a></li>
22
+ </ul>
23
+ </nav>
24
+ <nav class="col">
25
+ <h4>About</h4>
26
+ <ul>
27
+ <li><%= link_to "About Us", "https://www.heroku.com/about" %></li>
28
+ <li><%= link_to "What is Heroku", "https://www.heroku.com/what" %></li>
29
+ <li><%= link_to "Our Customers", "https://www.heroku.com/customers" %></li>
30
+ <li><%= link_to "Careers", "https://www.heroku.com/careers" %></li>
31
+ <li><a href="https://partners.heroku.com/">Partners</a></li>
32
+ </ul>
33
+ </nav>
34
+ <nav class="col">
35
+ <h4>Support</h4>
36
+ <ul>
37
+ <li><a href="https://help.heroku.com/">Help</a></li>
38
+ <li><a href="https://status.heroku.com/">Status</a></li>
39
+ <li><%= link_to "Critical Apps", "https://www.heroku.com/critical" %></li>
40
+ <li><%= link_to "Contact", "https://www.heroku.com/contact" %></li>
41
+ </ul>
42
+ </nav>
43
+ </div>
44
+ <div class="col heroku-footer-social">
45
+ <h3><span class="heroku-footer-icon-newsletter"></span>Subscribe to our monthly newsletter</h3>
46
+ <iframe src="https://go.pardot.com/l/36622/2015-07-20/5l8m8r" width="100%" height="80" type="text/html" frameborder="0" allowTransparency="true" scrolling="no"></iframe>
47
+ <ul class="social-list">
48
+ <li><a class="heroku-footer-icon-rss" href="http://feeds2.feedburner.com/heroku" target="_blank">RSS Feed</a></li>
49
+ <li><a class="heroku-footer-icon-twitter" href="https://twitter.com/heroku" target="_blank">Twitter</a></li>
50
+ <li><a class="heroku-footer-icon-facebook" href="https://facebook.com/heroku" target="_blank">Facebook</a></li>
51
+ <li><a class="heroku-footer-icon-github" href="https://github.com/heroku" target="_blank">Github</a></li>
52
+ <li><a class="heroku-footer-icon-linkedin" href="https://www.linkedin.com/company/heroku" target="_blank">LinkedIn</a></li>
53
+ </ul>
54
+ </div>
55
+ </div>
56
+ <div class="tertiary">
57
+ <div class="wrapper">
58
+ <div class="col">
59
+ <a href='/home' class="sfdc-heroku-logo">Salesfore Heroku</a>
60
+ <p>&copy; 2015 Salesforce.com</p>
61
+ </div>
62
+ <div class="col">
63
+ <ul>
64
+ <li><%= link_to "heroku.com", "https://www.heroku.com/home" %></li>
65
+ <li><%= link_to "Terms of Service", "https://www.heroku.com/policy/tos" %></li>
66
+ <li><%= link_to "Privacy", "https://www.heroku.com/policy/privacy" %></li>
67
+ <li><%= link_to "Cookies", "https://www.heroku.com/policy/privacy#web_site_navigational_information" %></li>
68
+ </ul>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </footer>
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bookends
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.4
5
+ platform: ruby
6
+ authors:
7
+ - Marketing Web Ops at heroku
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.2.22
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.2.22
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: an engine to abstract common html/css elements across Heroku properties
70
+ email:
71
+ - max.beizer@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".ruby-version"
79
+ - ".travis.yml"
80
+ - Gemfile
81
+ - LICENSE.txt
82
+ - README.md
83
+ - Rakefile
84
+ - bin/setup
85
+ - bookends.gemspec
86
+ - lib/bookends.rb
87
+ - lib/bookends/engine.rb
88
+ - lib/bookends/version.rb
89
+ - lib/generators/bookends/install/install_generator.rb
90
+ - lib/generators/bookends/install/templates/footer.css.scss
91
+ - lib/generators/bookends/install/templates/footer.html.erb
92
+ - lib/generators/bookends/install/templates/footer_images/footer_sprite.png
93
+ - lib/generators/bookends/install/templates/footer_images/footer_sprite@2x.png
94
+ - lib/generators/bookends/install/templates/footer_images/salesforce_heroku_gray.png
95
+ homepage: https://www.heroku.com
96
+ licenses: []
97
+ metadata: {}
98
+ post_install_message:
99
+ rdoc_options: []
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ requirements: []
113
+ rubyforge_project:
114
+ rubygems_version: 2.4.8
115
+ signing_key:
116
+ specification_version: 4
117
+ summary: an engine to abstract common html/css elements across Heroku properties
118
+ test_files: []