bookends 2.8.0 → 3.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -8
  3. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-book.eot +0 -0
  4. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-book.svg +0 -0
  5. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-book.ttf +0 -0
  6. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-book.woff +0 -0
  7. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-medium.eot +0 -0
  8. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-medium.svg +0 -0
  9. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-medium.ttf +0 -0
  10. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-medium.woff +0 -0
  11. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-regular.eot +0 -0
  12. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-regular.svg +0 -0
  13. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-regular.ttf +0 -0
  14. data/{fixtures/dummy-rails/app → app}/assets/fonts/bentonsans-regular.woff +0 -0
  15. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  16. data/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  17. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  18. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  19. data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  20. data/app/assets/fonts/hk-icon.eot +0 -0
  21. data/app/assets/fonts/hk-icon.svg +268 -0
  22. data/app/assets/fonts/hk-icon.ttf +0 -0
  23. data/app/assets/fonts/hk-icon.woff +0 -0
  24. data/app/assets/fonts/inconsolata-bold.eot +0 -0
  25. data/app/assets/fonts/inconsolata-bold.svg +239 -0
  26. data/app/assets/fonts/inconsolata-bold.ttf +0 -0
  27. data/app/assets/fonts/inconsolata-bold.woff +0 -0
  28. data/app/assets/fonts/inconsolata-regular.eot +0 -0
  29. data/app/assets/fonts/inconsolata-regular.svg +239 -0
  30. data/app/assets/fonts/inconsolata-regular.ttf +0 -0
  31. data/app/assets/fonts/inconsolata-regular.woff +0 -0
  32. data/{lib/bookends/templates/footer_images → app/assets/images/bookends/footer}/footer_sprite.png +0 -0
  33. data/app/assets/images/bookends/footer/footer_sprite@2x.png +0 -0
  34. data/{lib/bookends/templates/footer_images → app/assets/images/bookends/footer}/salesforce.png +0 -0
  35. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/dashboard.svg +0 -0
  36. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/databases.svg +0 -0
  37. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/dataclips.svg +0 -0
  38. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/docs.svg +0 -0
  39. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/elements.svg +0 -0
  40. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/heroku-logo.svg +0 -0
  41. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/navigator-purple.svg +0 -0
  42. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/navigator.svg +0 -0
  43. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/settings.svg +0 -0
  44. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/signout.svg +0 -0
  45. data/{lib/bookends/templates → app/assets/images/bookends}/glostick_icons/support.svg +0 -0
  46. data/{lib/bookends/templates → app/assets/images/bookends}/icons/addons.svg +0 -0
  47. data/{lib/bookends/templates → app/assets/images/bookends}/icons/buildpacks.svg +0 -0
  48. data/{lib/bookends/templates → app/assets/images/bookends}/icons/buttons.svg +0 -0
  49. data/{lib/bookends/templates → app/assets/images/bookends}/icons/connect.svg +0 -0
  50. data/{lib/bookends/templates → app/assets/images/bookends}/icons/elements-information.svg +0 -0
  51. data/{lib/bookends/templates → app/assets/images/bookends}/icons/enterprise.svg +0 -0
  52. data/{lib/bookends/templates → app/assets/images/bookends}/icons/platform.svg +0 -0
  53. data/{lib/bookends/templates → app/assets/images/bookends}/icons/postgres.svg +0 -0
  54. data/{lib/bookends/templates → app/assets/images/bookends}/icons/redis.svg +0 -0
  55. data/{lib/bookends/templates → app/assets/images/bookends}/icons/teams.svg +0 -0
  56. data/app/assets/images/logo.svg +14 -0
  57. data/app/assets/images/nav-dropdown-caret.svg +16 -0
  58. data/app/assets/javascripts/blog-fetcher.js +131 -0
  59. data/{fixtures/dummy-rails/app/assets/javascripts/application.js → app/assets/javascripts/bookends.js} +1 -2
  60. data/{lib/bookends/templates/js → app/assets/javascripts}/header.js +0 -0
  61. data/app/assets/javascripts/heroku-namespace.js +1 -0
  62. data/app/assets/javascripts/lscache.js +359 -0
  63. data/{lib/bookends/templates/js → app/assets/javascripts}/md5.js +0 -0
  64. data/app/assets/javascripts/moment.js +3195 -0
  65. data/{lib/bookends/templates/js → app/assets/javascripts}/newsletter-init.js +1 -1
  66. data/{lib/bookends/templates/js → app/assets/javascripts}/newsletter.js +0 -0
  67. data/app/assets/stylesheets/bookends/_base.scss +21 -0
  68. data/app/assets/stylesheets/bookends/_colors.scss +62 -0
  69. data/app/assets/stylesheets/bookends/_fonts.scss +12 -0
  70. data/{lib/bookends/templates/scss/footer.scss → app/assets/stylesheets/bookends/_footer.scss} +17 -14
  71. data/{lib/bookends/templates/scss/glostick.scss → app/assets/stylesheets/bookends/_glostick.scss} +0 -0
  72. data/app/assets/stylesheets/bookends/_grid-settings.scss +18 -0
  73. data/app/assets/stylesheets/bookends/_header.scss +745 -0
  74. data/app/assets/stylesheets/bookends/_mixins.scss +72 -0
  75. data/app/assets/stylesheets/bookends/_responsive.scss +129 -0
  76. data/app/assets/stylesheets/bookends/_variables.scss +82 -0
  77. data/app/assets/stylesheets/bookends/bookends.scss +13 -0
  78. data/app/controllers/bookends/application_controller.rb +5 -0
  79. data/app/helpers/bookends/application_helper.rb +93 -0
  80. data/{lib/bookends/templates/footer.html → app/views/bookends/_footer.html.erb} +4 -6
  81. data/{lib/bookends/templates/rails_header.html.erb → app/views/bookends/_header.html.erb} +1 -2
  82. data/config/routes.rb +2 -0
  83. data/lib/bookends.rb +2 -2
  84. data/lib/bookends/config.rb +24 -0
  85. data/lib/bookends/engine.rb +15 -2
  86. data/lib/bookends/version.rb +1 -1
  87. data/lib/tasks/bookends_tasks.rake +4 -0
  88. metadata +221 -152
  89. data/.gitignore +0 -17
  90. data/.rspec +0 -2
  91. data/.ruby-version +0 -1
  92. data/.travis.yml +0 -8
  93. data/Gemfile +0 -4
  94. data/bin/bookends +0 -5
  95. data/bin/setup +0 -7
  96. data/bookends.gemspec +0 -31
  97. data/fixtures/dummy-jekyll/.gitkeep +0 -0
  98. data/fixtures/dummy-rails/README.md +0 -9
  99. data/fixtures/dummy-rails/Rakefile +0 -6
  100. data/fixtures/dummy-rails/app/assets/images/.keep +0 -0
  101. data/fixtures/dummy-rails/app/assets/images/bookends/footer/footer_sprite.png +0 -0
  102. data/fixtures/dummy-rails/app/assets/images/bookends/footer/footer_sprite@2x.png +0 -0
  103. data/fixtures/dummy-rails/app/assets/images/bookends/footer/salesforce_heroku_gray.png +0 -0
  104. data/fixtures/dummy-rails/app/assets/stylesheets/application.css.scss +0 -11
  105. data/fixtures/dummy-rails/app/controllers/application_controller.rb +0 -5
  106. data/fixtures/dummy-rails/app/controllers/concerns/.keep +0 -0
  107. data/fixtures/dummy-rails/app/controllers/pages_controller.rb +0 -5
  108. data/fixtures/dummy-rails/app/helpers/application_helper.rb +0 -2
  109. data/fixtures/dummy-rails/app/mailers/.keep +0 -0
  110. data/fixtures/dummy-rails/app/models/.keep +0 -0
  111. data/fixtures/dummy-rails/app/models/concerns/.keep +0 -0
  112. data/fixtures/dummy-rails/app/views/layouts/application.html.erb +0 -16
  113. data/fixtures/dummy-rails/app/views/pages/home.html.erb +0 -1
  114. data/fixtures/dummy-rails/bin/bundle +0 -3
  115. data/fixtures/dummy-rails/bin/rails +0 -4
  116. data/fixtures/dummy-rails/bin/rake +0 -4
  117. data/fixtures/dummy-rails/bin/setup +0 -29
  118. data/fixtures/dummy-rails/config.ru +0 -4
  119. data/fixtures/dummy-rails/config/application.rb +0 -34
  120. data/fixtures/dummy-rails/config/boot.rb +0 -5
  121. data/fixtures/dummy-rails/config/database.yml +0 -25
  122. data/fixtures/dummy-rails/config/environment.rb +0 -5
  123. data/fixtures/dummy-rails/config/environments/development.rb +0 -41
  124. data/fixtures/dummy-rails/config/environments/production.rb +0 -79
  125. data/fixtures/dummy-rails/config/environments/test.rb +0 -42
  126. data/fixtures/dummy-rails/config/initializers/assets.rb +0 -11
  127. data/fixtures/dummy-rails/config/initializers/backtrace_silencers.rb +0 -7
  128. data/fixtures/dummy-rails/config/initializers/cookies_serializer.rb +0 -3
  129. data/fixtures/dummy-rails/config/initializers/filter_parameter_logging.rb +0 -4
  130. data/fixtures/dummy-rails/config/initializers/inflections.rb +0 -16
  131. data/fixtures/dummy-rails/config/initializers/mime_types.rb +0 -4
  132. data/fixtures/dummy-rails/config/initializers/session_store.rb +0 -3
  133. data/fixtures/dummy-rails/config/initializers/wrap_parameters.rb +0 -14
  134. data/fixtures/dummy-rails/config/locales/en.yml +0 -23
  135. data/fixtures/dummy-rails/config/routes.rb +0 -6
  136. data/fixtures/dummy-rails/config/secrets.yml +0 -22
  137. data/fixtures/dummy-rails/db/development.sqlite3 +0 -0
  138. data/fixtures/dummy-rails/lib/assets/.keep +0 -0
  139. data/fixtures/dummy-rails/public/404.html +0 -67
  140. data/fixtures/dummy-rails/public/422.html +0 -67
  141. data/fixtures/dummy-rails/public/500.html +0 -66
  142. data/fixtures/dummy-rails/public/favicon.ico +0 -0
  143. data/lib/bookends/cli.rb +0 -95
  144. data/lib/bookends/config/framework.rb +0 -24
  145. data/lib/bookends/config/turbolinks.rb +0 -18
  146. data/lib/bookends/file_actions.rb +0 -13
  147. data/lib/bookends/flag_handler.rb +0 -17
  148. data/lib/bookends/jekyll_handler.rb +0 -25
  149. data/lib/bookends/rails_handler.rb +0 -41
  150. data/lib/bookends/templates/bookends_helper.rb +0 -63
  151. data/lib/bookends/templates/bookends_helper_spec.rb +0 -57
  152. data/lib/bookends/templates/footer_images/footer_sprite@2x.png +0 -0
  153. data/lib/bookends/templates/icons/kafka.svg +0 -37
  154. data/lib/bookends/templates/icons/spaces.svg +0 -1
  155. data/lib/bookends/templates/jekyll_header.html +0 -102
  156. data/lib/bookends/templates/js/header-turbolinks.js +0 -18
  157. data/lib/bookends/templates/js/newsletter-init-turbolinks.js +0 -6
  158. data/lib/bookends/templates/scss/bookends.scss +0 -21
@@ -0,0 +1,72 @@
1
+ // ==========================================================================
2
+ // Mixins (not provided by Bourbon)
3
+ // ==========================================================================
4
+
5
+ @mixin horizontal-line($position, $from: $white, $to: #ddd, $width: 2px, $inflection: 35%) {
6
+ @include background-image(linear-gradient(left, $from, $to 0% + $inflection, $to 100% - $inflection, $from));
7
+
8
+ background-position: $position center;
9
+ background-repeat: no-repeat;
10
+ background-size: 100% $width;
11
+ }
12
+
13
+ @mixin vertical-line($position, $from: $white, $to: #ddd, $width: 2px, $inflection: 35%) {
14
+ @include background-image(linear-gradient(top, $from, $to 0% + $inflection, $to 100% - $inflection, $from));
15
+
16
+ background-position: $position center;
17
+ background-repeat: no-repeat;
18
+ background-size: $width 100%;
19
+ }
20
+
21
+ @mixin transition-delay($delay...) {
22
+ -moz-transition-delay: $delay;
23
+ -o-transition-delay: $delay;
24
+ -webkit-transition-delay: $delay;
25
+ transition-delay: $delay;
26
+ }
27
+
28
+ @mixin box-sizing($box) {
29
+ -webkit-box-sizing: border-box;
30
+ -moz-box-sizing: border-box;
31
+ box-sizing: border-box;
32
+ }
33
+
34
+ @mixin clearfix {
35
+ &:after {
36
+ content: "";
37
+ display: table;
38
+ clear: both;
39
+ }
40
+ }
41
+
42
+ @mixin transition($transition...) {
43
+ -moz-transition: $transition;
44
+ -o-transition: $transition;
45
+ -webkit-transition: $transition;
46
+ transition: $transition;
47
+ }
48
+
49
+ @mixin font-face(
50
+ $font-family,
51
+ $file-path,
52
+ $weight: normal,
53
+ $style: normal,
54
+ $asset-pipeline: $asset-pipeline,
55
+ $file-formats: eot woff2 woff ttf svg) {
56
+
57
+ $font-url-prefix: font-url-prefixer($asset-pipeline);
58
+
59
+ @font-face {
60
+ font-family: $font-family;
61
+ font-style: $style;
62
+ font-weight: $weight;
63
+
64
+ src: font-source-declaration(
65
+ $font-family,
66
+ $file-path,
67
+ $asset-pipeline,
68
+ $file-formats,
69
+ $font-url-prefix
70
+ );
71
+ }
72
+ }
@@ -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: $bp-med + 1) {
9
+ @content;
10
+ }
11
+ }
12
+
13
+ @mixin mobile {
14
+ @media (max-width: $bp-sm) {
15
+ @content;
16
+ }
17
+ }
18
+
19
+ @mixin mobile-landscape {
20
+ @media (max-width: $bp-sm) {
21
+ @content;
22
+ }
23
+ }
24
+
25
+ @mixin tablet {
26
+ @media (max-width: $bp-med) {
27
+ @content;
28
+ }
29
+ }
30
+
31
+ @mixin tablet-landscape {
32
+ @media (max-width: $bp-lg) {
33
+ @content;
34
+ }
35
+ }
36
+
37
+ @mixin large-screen {
38
+ @media (min-width: $bp-xl) {
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,82 @@
1
+ // ==========================================================================
2
+ // Variables
3
+ // ==========================================================================
4
+
5
+ $asset-pipeline: false;
6
+ $image-path: '/images';
7
+
8
+ //- Spacing
9
+ $space: 30px;
10
+ $pad-xl: $space;
11
+ $pad-lg: 20px;
12
+ $pad: ceil($space/3);
13
+ $pad-sm: ceil($space/6);
14
+
15
+ //- Typography
16
+ $font-base: 14px;
17
+ $font-xxl: 24px;
18
+ $font-xl: 18px;
19
+ $font-lg: 16px;
20
+ $font-sm: 13px;
21
+ $font-xs: 10px;
22
+
23
+ $font-h1: 36px;
24
+ $font-h2: 30px;
25
+ $font-h3: 24px;
26
+ $font-h4: 20px;
27
+ $font-h5: 18px;
28
+ $font-h6: 16px;
29
+
30
+ $line-height-base: 1.5;
31
+ $line-height-sm: 1.2;
32
+
33
+ //- Fonts
34
+ $font-main: "BentonSans", "Helvetica Neue", sans-serif;
35
+ $font-mono: "Inconsolata", monospace;
36
+
37
+ //- Font Weights
38
+ $font-light: 100;
39
+ $font-normal: normal;
40
+ $font-bold: bold;
41
+
42
+ //- Layout
43
+ $grid-full: 100%;
44
+ $grid-large-screen: 1200px;
45
+ $grid-desktop: 95%;
46
+ $grid-tablet: 95%;
47
+ $grid-mobile: 95%;
48
+
49
+ //- Wrapper sizes
50
+ $wrapper-sm: 800px;
51
+ $wrapper-md: 960px;
52
+ $wrapper-lg: 1080px;
53
+
54
+ //- Z-index
55
+ $z-foreground: 200;
56
+ $z-middleground: 100;
57
+ $z-default: 0;
58
+ $z-background: -100;
59
+
60
+ //- Borders
61
+ $border-color: #ddd;
62
+ $border: 1px solid $border-color;
63
+
64
+ $border-radius: 4px;
65
+ $border-radius-sm: $border-radius - 1;
66
+ $border-radius-lg: $border-radius + 2;
67
+ $border-radius-circle: 50%;
68
+
69
+ $box-shadow: 0 2px 4px 0 fade-out($black, .88);
70
+
71
+ //- Breakpoints
72
+ $bp-xs: 480px; // $mobile
73
+ $bp-sm: 600px; // $mobile-landscape
74
+ $bp-med: 768px; // $tablet
75
+ $bp-med-plus: 1024px; // $tablet-landscape
76
+ $bp-lg: 1100px; // $desktop
77
+ $bp-xl: 1400px; // $large-screen
78
+
79
+ $tablet: $bp-med;
80
+
81
+ //-Aniamtion
82
+ $transition: .1s linear;
@@ -0,0 +1,13 @@
1
+ @charset "utf-8";
2
+ @import 'bourbon';
3
+ @import 'neat';
4
+ @import 'colors';
5
+ @import 'variables';
6
+ @import 'mixins';
7
+ @import 'fonts';
8
+ @import 'base';
9
+ @import 'responsive';
10
+ @import 'grid-settings';
11
+ @import 'glostick';
12
+ @import 'header';
13
+ @import 'footer';
@@ -0,0 +1,5 @@
1
+ module Bookends
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+ end
5
+ end
@@ -0,0 +1,93 @@
1
+ module Bookends
2
+ module ApplicationHelper
3
+ def search_path
4
+ '/search'
5
+ end
6
+
7
+ def relative_search_path
8
+ '/search'
9
+ end
10
+
11
+ def login_path
12
+ 'https://id.heroku.com'
13
+ end
14
+
15
+ def search_disabled?
16
+ false
17
+ end
18
+
19
+ def google_search_form
20
+ "<gcse:searchbox-only resultsUrl='#{search_path}'></gcse:searchbox-only>".html_safe
21
+ end
22
+
23
+ def google_search_results
24
+ "<gcse:searchresults-only linkTarget='_parent'></gcse:searchresults-only>".html_safe
25
+ end
26
+
27
+ def logged_in?
28
+ !!cookies[:heroku_session]
29
+ end
30
+
31
+ def glostick_user_name
32
+ glostick_user['full_name']
33
+ end
34
+
35
+ def glostick_user_email
36
+ glostick_user['email']
37
+ end
38
+
39
+ def signup_link(title, options = {})
40
+ url = "https://signup.heroku.com"
41
+ data = { trackable: { category: "Sign Up Links", action: "Clicked", label: "#{options[:referral] || options[:branded_signup]}" } }
42
+
43
+ url += "/#{options[:branded_signup]}" if options[:branded_signup]
44
+
45
+ if options[:campaign_id]
46
+ url = url + "?c=" + options[:campaign_id]
47
+ elsif options[:referral]
48
+ url = url + "/" + options[:referral]
49
+ end
50
+
51
+ link_to title, url, class: options[:class], data: data
52
+ end
53
+
54
+ private
55
+ def glostick_user
56
+ @glostick_user ||= GlostickUserExtractor.new(cookies).user
57
+ end
58
+
59
+ class GlostickUserExtractor
60
+ attr_reader :secret,
61
+ :token
62
+
63
+ def initialize(cookies)
64
+ @secret = ENV['SESSION_COOKIE_SECRET_PRIMARY'] || ENV['SESSION_COOKIE_SECRET_SECONDARY']
65
+ @token = CGI::unescape(cookies[:heroku_user_session]) if cookies[:heroku_user_session]
66
+ end
67
+
68
+ def user
69
+ session_info = decrypt_session_cookie
70
+ if session_info && session_info['user']
71
+ session_info['user']
72
+ else
73
+ {
74
+ 'email' => '',
75
+ 'full_name' => ''
76
+ }
77
+ end
78
+ end
79
+
80
+ private
81
+ def decrypt_session_cookie
82
+ return nil unless token && secret
83
+
84
+ verifier = Fernet.verifier(secret, token)
85
+ verifier.enforce_ttl = false
86
+
87
+ return nil unless verifier.valid?
88
+
89
+ JSON.parse(verifier.message)
90
+ end
91
+ end
92
+ end
93
+ end
@@ -8,7 +8,6 @@
8
8
  <li><a href="https://www.heroku.com/connect">Heroku Connect</a></li>
9
9
  <li><a href="https://www.heroku.com/postgres">Heroku Postgres</a></li>
10
10
  <li><a href="https://www.heroku.com/redis">Heroku Redis</a></li>
11
- <li><a href="https://www.heroku.com/kafka">Kafka on Heroku</a></li>
12
11
  <li><a href="https://www.heroku.com/enterprise">Heroku Enterprise</a></li>
13
12
  <li><a href="https://www.heroku.com/teams">Heroku Teams</a></li>
14
13
  <li><a href="https://elements.heroku.com/">Elements Marketplace</a></li>
@@ -31,16 +30,15 @@
31
30
  <li><a href="https://www.heroku.com/customers">Our Customers</a></li>
32
31
  <li><a href="https://www.heroku.com/careers">Careers</a></li>
33
32
  <li><a href="https://partners.heroku.com/">Partners</a></li>
34
- <li><a href="https://www.heroku.com/elements">Elements</a></li>
35
33
  </ul>
36
34
  </nav>
37
35
  <nav class="col">
38
36
  <h4>Support</h4>
39
37
  <ul>
40
- <li><a href="https://help.heroku.com/">Help Center</a></li>
38
+ <li><a href="https://help.heroku.com/">Help</a></li>
41
39
  <li><a href="https://status.heroku.com/">Status</a></li>
42
- <li><a href="https://www.heroku.com/critical">Premium Support</a></li>
43
- <li><a href="https://www.heroku.com/contact">Contact Us</a></li>
40
+ <li><a href="https://www.heroku.com/critical">Critical Apps</a></li>
41
+ <li><a href="https://www.heroku.com/contact">Contact</a></li>
44
42
  </ul>
45
43
  </nav>
46
44
  </div>
@@ -77,7 +75,7 @@
77
75
  </div>
78
76
  </li>
79
77
  <li><a class="heroku-footer-icon-facebook" href="https://facebook.com/heroku" target="_blank" title="Heroku's Facebook">Facebook</a></li>
80
- <li><a class="heroku-footer-icon-instagram" href="https://www.instagram.com/heroku/" target="_blank" title="Heroku's Instagram">Instagram</a></li>
78
+ <li><a class="heroku-footer-icon-instagram" href="https://instagram.com/heroku" target="_blank" title="Heroku's Instagram">Instagram</a></li>
81
79
  <li><a class="heroku-footer-icon-github" href="https://github.com/heroku" target="_blank" title="Heroku's GitHub">GitHub</a></li>
82
80
  <li><a class="heroku-footer-icon-linkedin" href="https://www.linkedin.com/company/heroku" target="_blank" title="Heroku's LinkedIn">LinkedIn</a></li>
83
81
  </ul>
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div class="wrapper-full">
12
12
  <div id="logo">
13
- <a href="https://www.heroku.com/home">Heroku</a>
13
+ <a href="<%= Bookends::Config.logo_link %>">Heroku</a>
14
14
  </div>
15
15
  <div class="nav-wrapper">
16
16
  <ul class="main-nav">
@@ -20,7 +20,6 @@
20
20
  <li><a class="bookends-icon platform" href="https://www.heroku.com/platform">Heroku Platform</a></li>
21
21
  <li><a class="bookends-icon postgres" href="https://www.heroku.com/postgres">Heroku Postgres</a></li>
22
22
  <li><a class="bookends-icon redis" href="https://www.heroku.com/redis">Heroku Redis</a></li>
23
- <li><a class="bookends-icon kafka" href="https://www.heroku.com/kafka">Kafka on Heroku</a></li>
24
23
  <li><a class="bookends-icon connect" href="https://www.heroku.com/connect">Heroku Connect</a></li>
25
24
  <li><a class="bookends-icon enterprise" href="https://www.heroku.com/enterprise">Heroku Enterprise</a></li>
26
25
  <li><a class="bookends-icon teams" href="https://www.heroku.com/teams">Heroku Teams</a></li>