bookends 0.6.0 → 2.0.0
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.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/README.md +28 -24
- data/Rakefile +7 -3
- data/bin/bookends +5 -0
- data/bookends.gemspec +5 -2
- data/fixtures/dummy-jekyll/README.md +64 -0
- data/fixtures/dummy-jekyll/_config.yml +8 -0
- data/fixtures/dummy-jekyll/_layouts/default.html +118 -0
- data/fixtures/dummy-jekyll/_layouts/post.html +14 -0
- data/fixtures/dummy-jekyll/_sass/_base.scss +478 -0
- data/fixtures/dummy-jekyll/_sass/_google-cse.scss +372 -0
- data/fixtures/dummy-jekyll/_sass/_header.scss +780 -0
- data/fixtures/dummy-jekyll/_sass/_legacy.scss +567 -0
- data/fixtures/dummy-jekyll/_sass/_menu-icon.scss +68 -0
- data/fixtures/dummy-jekyll/_sass/_mixins.scss +12 -0
- data/fixtures/dummy-jekyll/_sass/_search.scss +51 -0
- data/{lib/generators/bookends/install/templates/footer.scss → fixtures/dummy-jekyll/_sass/bookends/_footer.scss} +0 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_background-image.scss +48 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_border-radius.scss +22 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_box-sizing.scss +4 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_hide-text.scss +5 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_hidpi.scss +10 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_linear-gradient.scss +41 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_prefixer.scss +49 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_responsiveness.scss +129 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_retina-image.scss +31 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_size.scss +44 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_transition.scss +34 -0
- data/fixtures/dummy-jekyll/_sass/mixins/_triangle.scss +45 -0
- data/fixtures/dummy-jekyll/app.json +15 -0
- data/fixtures/dummy-jekyll/bin/from-gdoc +3 -0
- data/fixtures/dummy-jekyll/bin/platform-setup +15 -0
- data/fixtures/dummy-jekyll/feed.xml +34 -0
- data/fixtures/dummy-jekyll/index.html +40 -0
- data/fixtures/dummy-jekyll/static.json +3 -0
- data/fixtures/dummy-rails/README.md +9 -0
- data/fixtures/dummy-rails/Rakefile +6 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-book.eot +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-book.svg +400 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-book.ttf +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-book.woff +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-medium.eot +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-medium.svg +416 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-medium.ttf +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-medium.woff +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-regular.eot +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-regular.svg +416 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-regular.ttf +0 -0
- data/fixtures/dummy-rails/app/assets/fonts/bentonsans-regular.woff +0 -0
- data/fixtures/dummy-rails/app/assets/images/.keep +0 -0
- data/{lib/generators/bookends/install/templates/footer_images → fixtures/dummy-rails/app/assets/images/bookends/footer}/footer_sprite.png +0 -0
- data/{lib/generators/bookends/install/templates/footer_images → fixtures/dummy-rails/app/assets/images/bookends/footer}/footer_sprite@2x.png +0 -0
- data/{lib/generators/bookends/install/templates/footer_images → fixtures/dummy-rails/app/assets/images/bookends/footer}/salesforce_heroku_gray.png +0 -0
- data/fixtures/dummy-rails/app/assets/javascripts/application.js +15 -0
- data/fixtures/dummy-rails/app/assets/stylesheets/application.css.scss +11 -0
- data/fixtures/dummy-rails/app/controllers/application_controller.rb +5 -0
- data/fixtures/dummy-rails/app/controllers/concerns/.keep +0 -0
- data/fixtures/dummy-rails/app/controllers/pages_controller.rb +5 -0
- data/fixtures/dummy-rails/app/helpers/application_helper.rb +2 -0
- data/fixtures/dummy-rails/app/mailers/.keep +0 -0
- data/fixtures/dummy-rails/app/models/.keep +0 -0
- data/fixtures/dummy-rails/app/models/concerns/.keep +0 -0
- data/fixtures/dummy-rails/app/views/layouts/application.html.erb +16 -0
- data/fixtures/dummy-rails/app/views/pages/home.html.erb +1 -0
- data/fixtures/dummy-rails/bin/bundle +3 -0
- data/fixtures/dummy-rails/bin/rails +4 -0
- data/fixtures/dummy-rails/bin/rake +4 -0
- data/fixtures/dummy-rails/bin/setup +29 -0
- data/fixtures/dummy-rails/config/application.rb +34 -0
- data/fixtures/dummy-rails/config/boot.rb +5 -0
- data/fixtures/dummy-rails/config/database.yml +25 -0
- data/fixtures/dummy-rails/config/environment.rb +5 -0
- data/fixtures/dummy-rails/config/environments/development.rb +41 -0
- data/fixtures/dummy-rails/config/environments/production.rb +79 -0
- data/fixtures/dummy-rails/config/environments/test.rb +42 -0
- data/fixtures/dummy-rails/config/initializers/assets.rb +11 -0
- data/fixtures/dummy-rails/config/initializers/backtrace_silencers.rb +7 -0
- data/fixtures/dummy-rails/config/initializers/cookies_serializer.rb +3 -0
- data/fixtures/dummy-rails/config/initializers/filter_parameter_logging.rb +4 -0
- data/fixtures/dummy-rails/config/initializers/inflections.rb +16 -0
- data/fixtures/dummy-rails/config/initializers/mime_types.rb +4 -0
- data/fixtures/dummy-rails/config/initializers/session_store.rb +3 -0
- data/fixtures/dummy-rails/config/initializers/wrap_parameters.rb +14 -0
- data/fixtures/dummy-rails/config/locales/en.yml +23 -0
- data/fixtures/dummy-rails/config/routes.rb +6 -0
- data/fixtures/dummy-rails/config/secrets.yml +22 -0
- data/fixtures/dummy-rails/config.ru +4 -0
- data/fixtures/dummy-rails/db/development.sqlite3 +0 -0
- data/fixtures/dummy-rails/lib/assets/.keep +0 -0
- data/fixtures/dummy-rails/log/.keep +0 -0
- data/fixtures/dummy-rails/log/development.log +1893 -0
- data/fixtures/dummy-rails/public/404.html +67 -0
- data/fixtures/dummy-rails/public/422.html +67 -0
- data/fixtures/dummy-rails/public/500.html +66 -0
- data/fixtures/dummy-rails/public/favicon.ico +0 -0
- data/lib/bookends/cli.rb +88 -0
- data/lib/bookends/config/framework.rb +24 -0
- data/lib/bookends/config/turbolinks.rb +18 -0
- data/lib/bookends/file_actions.rb +13 -0
- data/lib/bookends/jekyll_handler.rb +21 -0
- data/lib/bookends/rails_handler.rb +30 -0
- data/lib/{generators/bookends/install/templates/footer.html.erb → bookends/templates/footer.html} +18 -18
- data/lib/bookends/templates/footer.scss +403 -0
- data/lib/bookends/templates/footer_images/footer_sprite.png +0 -0
- data/lib/bookends/templates/footer_images/footer_sprite@2x.png +0 -0
- data/lib/bookends/templates/footer_images/salesforce.png +0 -0
- data/lib/bookends/templates/newsletter-init-turbolinks.js +6 -0
- data/lib/bookends/templates/newsletter-init.js +6 -0
- data/lib/{generators/bookends/install → bookends}/templates/newsletter.js +0 -4
- data/lib/bookends/version.rb +1 -1
- data/lib/bookends.rb +1 -1
- metadata +138 -11
- data/lib/generators/bookends/install/install_generator.rb +0 -21
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//************************************************************************//
|
|
2
|
+
// Background-image property for adding multiple background images with
|
|
3
|
+
// gradients, or for stringing multiple gradients together.
|
|
4
|
+
//************************************************************************//
|
|
5
|
+
|
|
6
|
+
@mixin background-image($images...) {
|
|
7
|
+
background-image: _add-prefix($images, webkit);
|
|
8
|
+
background-image: _add-prefix($images);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@function _add-prefix($images, $vendor: false) {
|
|
12
|
+
$images-prefixed: ();
|
|
13
|
+
$gradient-positions: false;
|
|
14
|
+
@for $i from 1 through length($images) {
|
|
15
|
+
$type: type-of(nth($images, $i)); // Get type of variable - List or String
|
|
16
|
+
|
|
17
|
+
// If variable is a list - Gradient
|
|
18
|
+
@if $type == list {
|
|
19
|
+
$gradient-type: nth(nth($images, $i), 1); // linear or radial
|
|
20
|
+
$gradient-pos: null;
|
|
21
|
+
$gradient-args: null;
|
|
22
|
+
|
|
23
|
+
@if ($gradient-type == linear) or ($gradient-type == radial) {
|
|
24
|
+
$gradient-pos: nth(nth($images, $i), 2); // Get gradient position
|
|
25
|
+
$gradient-args: nth(nth($images, $i), 3); // Get actual gradient (red, blue)
|
|
26
|
+
}
|
|
27
|
+
@else {
|
|
28
|
+
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
$gradient-positions: _gradient-positions-parser($gradient-type, $gradient-pos);
|
|
32
|
+
$gradient: _render-gradients($gradient-positions, $gradient-args, $gradient-type, $vendor);
|
|
33
|
+
$images-prefixed: append($images-prefixed, $gradient, comma);
|
|
34
|
+
}
|
|
35
|
+
// If variable is a string - Image
|
|
36
|
+
@else if $type == string {
|
|
37
|
+
$images-prefixed: join($images-prefixed, nth($images, $i), comma);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
@return $images-prefixed;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//Examples:
|
|
44
|
+
//@include background-image(linear-gradient(top, orange, red));
|
|
45
|
+
//@include background-image(radial-gradient(50% 50%, cover circle, orange, red));
|
|
46
|
+
//@include background-image(url("/images/a.png"), linear-gradient(orange, red));
|
|
47
|
+
//@include background-image(url("image.png"), linear-gradient(orange, red), url("image.png"));
|
|
48
|
+
//@include background-image(linear-gradient(hsla(0, 100%, 100%, 0.25) 0%, hsla(0, 100%, 100%, 0.08) 50%, transparent 50%), linear-gradient(orange, red));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//************************************************************************//
|
|
2
|
+
// Shorthand Border-radius mixins
|
|
3
|
+
//************************************************************************//
|
|
4
|
+
@mixin border-top-radius($radii) {
|
|
5
|
+
@include prefixer(border-top-left-radius, $radii, spec);
|
|
6
|
+
@include prefixer(border-top-right-radius, $radii, spec);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin border-bottom-radius($radii) {
|
|
10
|
+
@include prefixer(border-bottom-left-radius, $radii, spec);
|
|
11
|
+
@include prefixer(border-bottom-right-radius, $radii, spec);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin border-left-radius($radii) {
|
|
15
|
+
@include prefixer(border-top-left-radius, $radii, spec);
|
|
16
|
+
@include prefixer(border-bottom-left-radius, $radii, spec);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin border-right-radius($radii) {
|
|
20
|
+
@include prefixer(border-top-right-radius, $radii, spec);
|
|
21
|
+
@include prefixer(border-bottom-right-radius, $radii, spec);
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/)
|
|
2
|
+
@mixin hidpi($ratio: 1.3) {
|
|
3
|
+
@media only screen and (-webkit-min-device-pixel-ratio: $ratio),
|
|
4
|
+
only screen and (min--moz-device-pixel-ratio: $ratio),
|
|
5
|
+
only screen and (-o-min-device-pixel-ratio: #{$ratio}/1),
|
|
6
|
+
only screen and (min-resolution: #{round($ratio*96)}dpi),
|
|
7
|
+
only screen and (min-resolution: #{$ratio}dppx) {
|
|
8
|
+
@content;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@mixin linear-gradient($pos, $G1, $G2: false,
|
|
2
|
+
$G3: false, $G4: false,
|
|
3
|
+
$G5: false, $G6: false,
|
|
4
|
+
$G7: false, $G8: false,
|
|
5
|
+
$G9: false, $G10: false,
|
|
6
|
+
$deprecated-pos1: left top,
|
|
7
|
+
$deprecated-pos2: left bottom,
|
|
8
|
+
$fallback: false) {
|
|
9
|
+
// Detect what type of value exists in $pos
|
|
10
|
+
$pos-type: type-of(nth($pos, 1));
|
|
11
|
+
$pos-spec: null;
|
|
12
|
+
$pos-degree: null;
|
|
13
|
+
|
|
14
|
+
// If $pos is missing from mixin, reassign vars and add default position
|
|
15
|
+
@if ($pos-type == color) or (nth($pos, 1) == "transparent") {
|
|
16
|
+
$G10: $G9; $G9: $G8; $G8: $G7; $G7: $G6; $G6: $G5;
|
|
17
|
+
$G5: $G4; $G4: $G3; $G3: $G2; $G2: $G1; $G1: $pos;
|
|
18
|
+
$pos: null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@if $pos {
|
|
22
|
+
$positions: _linear-positions-parser($pos);
|
|
23
|
+
$pos-degree: nth($positions, 1);
|
|
24
|
+
$pos-spec: nth($positions, 2);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
|
|
28
|
+
|
|
29
|
+
// Set $G1 as the default fallback color
|
|
30
|
+
$fallback-color: nth($G1, 1);
|
|
31
|
+
|
|
32
|
+
// If $fallback is a color use that color as the fallback color
|
|
33
|
+
@if (type-of($fallback) == color) or ($fallback == "transparent") {
|
|
34
|
+
$fallback-color: $fallback;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
background-color: $fallback-color;
|
|
38
|
+
background-image: _deprecated-webkit-gradient(linear, $deprecated-pos1, $deprecated-pos2, $full); // Safari <= 5.0
|
|
39
|
+
background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome
|
|
40
|
+
background-image: unquote("linear-gradient(#{$pos-spec}#{$full})");
|
|
41
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//************************************************************************//
|
|
2
|
+
// Example: @include prefixer(border-radius, $radii, webkit ms spec);
|
|
3
|
+
//************************************************************************//
|
|
4
|
+
$prefix-for-webkit: true !default;
|
|
5
|
+
$prefix-for-mozilla: true !default;
|
|
6
|
+
$prefix-for-microsoft: true !default;
|
|
7
|
+
$prefix-for-opera: true !default;
|
|
8
|
+
$prefix-for-spec: true !default; // required for keyframe mixin
|
|
9
|
+
|
|
10
|
+
@mixin prefixer ($property, $value, $prefixes) {
|
|
11
|
+
@each $prefix in $prefixes {
|
|
12
|
+
@if $prefix == webkit {
|
|
13
|
+
@if $prefix-for-webkit {
|
|
14
|
+
-webkit-#{$property}: $value;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
@else if $prefix == moz {
|
|
18
|
+
@if $prefix-for-mozilla {
|
|
19
|
+
-moz-#{$property}: $value;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
@else if $prefix == ms {
|
|
23
|
+
@if $prefix-for-microsoft {
|
|
24
|
+
-ms-#{$property}: $value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
@else if $prefix == o {
|
|
28
|
+
@if $prefix-for-opera {
|
|
29
|
+
-o-#{$property}: $value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
@else if $prefix == spec {
|
|
33
|
+
@if $prefix-for-spec {
|
|
34
|
+
#{$property}: $value;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
@else {
|
|
38
|
+
@warn "Unrecognized prefix: #{$prefix}";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin disable-prefix-for-all() {
|
|
44
|
+
$prefix-for-webkit: false;
|
|
45
|
+
$prefix-for-mozilla: false;
|
|
46
|
+
$prefix-for-microsoft: false;
|
|
47
|
+
$prefix-for-opera: false;
|
|
48
|
+
$prefix-for-spec: false;
|
|
49
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
@mixin screen($threshold: max-width, $screen: 1080px) {
|
|
2
|
+
@media ($threshold: $screen) {
|
|
3
|
+
@content;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin desktop {
|
|
8
|
+
@media (min-width: $tablet-threshold + 1) {
|
|
9
|
+
@content;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin mobile {
|
|
14
|
+
@media (max-width: $mobile-threshold) {
|
|
15
|
+
@content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@mixin mobile-landscape {
|
|
20
|
+
@media (max-width: $mobile-landscape-threshold) {
|
|
21
|
+
@content;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@mixin tablet {
|
|
26
|
+
@media (max-width: $tablet-threshold) {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin tablet-landscape {
|
|
32
|
+
@media (max-width: $tablet-landscape-threshold) {
|
|
33
|
+
@content;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin large-screen {
|
|
38
|
+
@media (min-width: $large-screen-threshold) {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin screen-max-height($screen-height: 750px) {
|
|
44
|
+
@media (max-height: $screen-height) {
|
|
45
|
+
@content;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@mixin columns(
|
|
50
|
+
$desktop: $tartan-column-count,
|
|
51
|
+
$tablet: "",
|
|
52
|
+
$mobile: ""
|
|
53
|
+
) {
|
|
54
|
+
@include tartan-span-columns($desktop);
|
|
55
|
+
|
|
56
|
+
@if ($desktop == 1) {
|
|
57
|
+
&:nth-child(12n + 12) { @include tartan-omega; }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@if ($desktop == 2) {
|
|
61
|
+
&:nth-child(6n + 6) { @include tartan-omega; }
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@if ($desktop == 3) {
|
|
65
|
+
&:nth-child(4n + 4) { @include tartan-omega; }
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@if ($desktop == 4) {
|
|
69
|
+
&:nth-child(3n + 3) { @include tartan-omega; }
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@if ($desktop == 6) {
|
|
73
|
+
&:nth-child(even) { @include tartan-omega; }
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@if ($tablet != "") {
|
|
77
|
+
@include tablet {
|
|
78
|
+
&:nth-child(n) { @include tartan-no-omega } // Specificity
|
|
79
|
+
@include tartan-span-columns($tablet);
|
|
80
|
+
|
|
81
|
+
@if ($tablet == 1) {
|
|
82
|
+
&:nth-child(12n + 12) { @include tartan-omega; }
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@if ($tablet == 2) {
|
|
86
|
+
&:nth-child(6n + 6) { @include tartan-omega; }
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@if ($tablet == 3) {
|
|
90
|
+
&:nth-child(4n + 4) { @include tartan-omega; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@if ($tablet == 4) {
|
|
94
|
+
&:nth-child(3n + 3) { @include tartan-omega; }
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@if ($tablet == 6) {
|
|
98
|
+
&:nth-child(2n + 2) { @include tartan-omega; }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@if ($mobile != "") {
|
|
104
|
+
@include mobile-landscape {
|
|
105
|
+
&:nth-child(n) { @include tartan-no-omega } // Specificity
|
|
106
|
+
@include tartan-span-columns($mobile);
|
|
107
|
+
|
|
108
|
+
@if ($mobile == 1) {
|
|
109
|
+
&:nth-child(12n + 12) { @include tartan-omega; }
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@if ($mobile == 2) {
|
|
113
|
+
&:nth-child(6n + 6) { @include tartan-omega; }
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@if ($mobile == 3) {
|
|
117
|
+
&:nth-child(4n + 4) { @include tartan-omega; }
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@if ($mobile == 4) {
|
|
121
|
+
&:nth-child(3n + 3) { @include tartan-omega; }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@if ($mobile == 6) {
|
|
125
|
+
&:nth-child(even) { @include tartan-omega; }
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@mixin retina-image($filename, $background-size, $extension: png, $retina-filename: null, $asset-pipeline: false) {
|
|
2
|
+
@if $asset-pipeline {
|
|
3
|
+
background-image: image-url("#{$filename}.#{$extension}");
|
|
4
|
+
}
|
|
5
|
+
@else {
|
|
6
|
+
background-image: url("#{$filename}.#{$extension}");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@include hidpi {
|
|
10
|
+
@if $asset-pipeline {
|
|
11
|
+
@if $retina-filename {
|
|
12
|
+
background-image: image-url("#{$retina-filename}.#{$extension}");
|
|
13
|
+
}
|
|
14
|
+
@else {
|
|
15
|
+
background-image: image-url("#{$filename}@2x.#{$extension}");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@else {
|
|
20
|
+
@if $retina-filename {
|
|
21
|
+
background-image: url("#{$retina-filename}.#{$extension}");
|
|
22
|
+
}
|
|
23
|
+
@else {
|
|
24
|
+
background-image: url("#{$filename}@2x.#{$extension}");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
background-size: $background-size;
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@mixin size($size) {
|
|
2
|
+
@if length($size) == 1 {
|
|
3
|
+
@if $size == auto {
|
|
4
|
+
width: $size;
|
|
5
|
+
height: $size;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@else if unitless($size) {
|
|
9
|
+
width: $size + px;
|
|
10
|
+
height: $size + px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@else if not(unitless($size)) {
|
|
14
|
+
width: $size;
|
|
15
|
+
height: $size;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Width x Height
|
|
20
|
+
@if length($size) == 2 {
|
|
21
|
+
$width: nth($size, 1);
|
|
22
|
+
$height: nth($size, 2);
|
|
23
|
+
|
|
24
|
+
@if $width == auto {
|
|
25
|
+
width: $width;
|
|
26
|
+
}
|
|
27
|
+
@else if not(unitless($width)) {
|
|
28
|
+
width: $width;
|
|
29
|
+
}
|
|
30
|
+
@else if unitless($width) {
|
|
31
|
+
width: $width + px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@if $height == auto {
|
|
35
|
+
height: $height;
|
|
36
|
+
}
|
|
37
|
+
@else if not(unitless($height)) {
|
|
38
|
+
height: $height;
|
|
39
|
+
}
|
|
40
|
+
@else if unitless($height) {
|
|
41
|
+
height: $height + px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Shorthand mixin. Supports multiple parentheses-deliminated values for each variable.
|
|
2
|
+
// Example: @include transition (all, 2.0s, ease-in-out);
|
|
3
|
+
// @include transition ((opacity, width), (1.0s, 2.0s), ease-in, (0, 2s));
|
|
4
|
+
// @include transition ($property:(opacity, width), $delay: (1.5s, 2.5s));
|
|
5
|
+
|
|
6
|
+
@mixin transition ($properties...) {
|
|
7
|
+
@if length($properties) >= 1 {
|
|
8
|
+
@include prefixer(transition, $properties, webkit moz spec);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@else {
|
|
12
|
+
$properties: all 0.15s ease-out 0;
|
|
13
|
+
@include prefixer(transition, $properties, webkit moz spec);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin transition-property ($properties...) {
|
|
18
|
+
-webkit-transition-property: transition-property-names($properties, 'webkit');
|
|
19
|
+
-moz-transition-property: transition-property-names($properties, 'moz');
|
|
20
|
+
transition-property: transition-property-names($properties, false);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin transition-duration ($times...) {
|
|
24
|
+
@include prefixer(transition-duration, $times, webkit moz spec);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin transition-timing-function ($motions...) {
|
|
28
|
+
// ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier()
|
|
29
|
+
@include prefixer(transition-timing-function, $motions, webkit moz spec);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin transition-delay ($times...) {
|
|
33
|
+
@include prefixer(transition-delay, $times, webkit moz spec);
|
|
34
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@mixin triangle ($size, $color, $direction) {
|
|
2
|
+
height: 0;
|
|
3
|
+
width: 0;
|
|
4
|
+
|
|
5
|
+
@if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
|
|
6
|
+
border-color: transparent;
|
|
7
|
+
border-style: solid;
|
|
8
|
+
border-width: $size / 2;
|
|
9
|
+
|
|
10
|
+
@if $direction == up {
|
|
11
|
+
border-bottom-color: $color;
|
|
12
|
+
|
|
13
|
+
} @else if $direction == right {
|
|
14
|
+
border-left-color: $color;
|
|
15
|
+
|
|
16
|
+
} @else if $direction == down {
|
|
17
|
+
border-top-color: $color;
|
|
18
|
+
|
|
19
|
+
} @else if $direction == left {
|
|
20
|
+
border-right-color: $color;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@else if ($direction == up-right) or ($direction == up-left) {
|
|
25
|
+
border-top: $size solid $color;
|
|
26
|
+
|
|
27
|
+
@if $direction == up-right {
|
|
28
|
+
border-left: $size solid transparent;
|
|
29
|
+
|
|
30
|
+
} @else if $direction == up-left {
|
|
31
|
+
border-right: $size solid transparent;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@else if ($direction == down-right) or ($direction == down-left) {
|
|
36
|
+
border-bottom: $size solid $color;
|
|
37
|
+
|
|
38
|
+
@if $direction == down-right {
|
|
39
|
+
border-left: $size solid transparent;
|
|
40
|
+
|
|
41
|
+
} @else if $direction == down-left {
|
|
42
|
+
border-right: $size solid transparent;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Engineering",
|
|
3
|
+
"description": "Heroku engineering blog",
|
|
4
|
+
"website": "https://engineering.heroku.com/",
|
|
5
|
+
"repository": "https://github.com/heroku/engineering",
|
|
6
|
+
"success_url": "/",
|
|
7
|
+
"buildpacks": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/dmathieu/heroku-buildpack-jekyll.git"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"url": "https://github.com/hone/heroku-buildpack-static"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
if [ -z "$DEPLOY" ]; then
|
|
4
|
+
echo "Missing DEPLOY" 1>&2; exit 1
|
|
5
|
+
fi
|
|
6
|
+
|
|
7
|
+
set -exo pipefail
|
|
8
|
+
|
|
9
|
+
heroku create -r $DEPLOY heroku-engineering-$DEPLOY
|
|
10
|
+
|
|
11
|
+
heroku buildpacks:add https://github.com/dmathieu/heroku-buildpack-jekyll.git -r $DEPLOY
|
|
12
|
+
heroku buildpacks:add https://github.com/hone/heroku-buildpack-static.git -r $DEPLOY
|
|
13
|
+
|
|
14
|
+
git push $DEPLOY $(git rev-parse --abbrev-ref HEAD):master
|
|
15
|
+
heroku open -r $DEPLOY
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: null
|
|
3
|
+
---
|
|
4
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
5
|
+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
6
|
+
<channel>
|
|
7
|
+
<title>{{ site.title | xml_escape }}</title>
|
|
8
|
+
<description>{{ site.description | xml_escape }}</description>
|
|
9
|
+
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
|
10
|
+
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
|
|
11
|
+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
|
12
|
+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
|
13
|
+
<generator>Jekyll v{{ jekyll.version }}</generator>
|
|
14
|
+
|
|
15
|
+
{% for post in site.posts limit:10 %}
|
|
16
|
+
<item>
|
|
17
|
+
<title>{{ post.title | xml_escape }}</title>
|
|
18
|
+
<description>{{ post.content | xml_escape }}</description>
|
|
19
|
+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
|
20
|
+
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
|
|
21
|
+
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
|
|
22
|
+
|
|
23
|
+
{% for tag in post.tags %}
|
|
24
|
+
<category>{{ tag | xml_escape }}</category>
|
|
25
|
+
{% endfor %}
|
|
26
|
+
|
|
27
|
+
{% for cat in post.categories %}
|
|
28
|
+
<category>{{ cat | xml_escape }}</category>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
|
|
31
|
+
</item>
|
|
32
|
+
{% endfor %}
|
|
33
|
+
</channel>
|
|
34
|
+
</rss>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: default
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<div class="row">
|
|
6
|
+
<div class="col-xs-12">
|
|
7
|
+
<h1>Heroku Engineering Blog</h1>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
{% for post in site.posts %}
|
|
11
|
+
<div class="col-xs-12">
|
|
12
|
+
<article>
|
|
13
|
+
<div class="row">
|
|
14
|
+
<div class="col-xs-12 col-md-6">
|
|
15
|
+
<header>
|
|
16
|
+
<h2><a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a></h2>
|
|
17
|
+
<div class="byline">
|
|
18
|
+
<time>{{ post.date | date: "%B %-d, %Y" }}</time>
|
|
19
|
+
|
|
20
|
+
{% if post.author_name %}
|
|
21
|
+
by {{ post.author_name }}
|
|
22
|
+
{% endif %}
|
|
23
|
+
</div>
|
|
24
|
+
</header>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="col-xs-12 col-md-6">
|
|
27
|
+
{{ post.excerpt }}
|
|
28
|
+
<a href="{{ post.url | prepend: site.baseurl }}">Read more →</a>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</article>
|
|
32
|
+
</div>
|
|
33
|
+
{% endfor %}
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div id="feeds" style="margin-top:30px">
|
|
37
|
+
<p>
|
|
38
|
+
Subscribe to the <a title="Full-text RSS feed" href="/feed.xml">full-text</a> feed.
|
|
39
|
+
</p>
|
|
40
|
+
</div>
|
|
Binary file
|