bookwatch 1.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.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/bookwatch.gemspec +40 -0
  3. data/install_bin/bookwatch +5 -0
  4. data/lib/bookwatch/cli.rb +109 -0
  5. data/lib/bookwatch/code_example_reader.rb +95 -0
  6. data/lib/bookwatch/colorizer.rb +16 -0
  7. data/lib/bookwatch/commands/bind.rb +119 -0
  8. data/lib/bookwatch/commands/collection.rb +181 -0
  9. data/lib/bookwatch/commands/components/bind/directory_preparer.rb +33 -0
  10. data/lib/bookwatch/commands/components/bind/layout_preparer.rb +27 -0
  11. data/lib/bookwatch/commands/components/command_options.rb +45 -0
  12. data/lib/bookwatch/commands/components/imprint/directory_preparer.rb +24 -0
  13. data/lib/bookwatch/commands/generate.rb +92 -0
  14. data/lib/bookwatch/commands/imprint.rb +55 -0
  15. data/lib/bookwatch/commands/punch.rb +33 -0
  16. data/lib/bookwatch/commands/update_local_doc_repos.rb +42 -0
  17. data/lib/bookwatch/commands/watch.rb +100 -0
  18. data/lib/bookwatch/config/checkers/archive_menu_checker.rb +29 -0
  19. data/lib/bookwatch/config/checkers/ditamap_presence_checker.rb +27 -0
  20. data/lib/bookwatch/config/checkers/duplicate_section_name_checker.rb +33 -0
  21. data/lib/bookwatch/config/checkers/products_checker.rb +34 -0
  22. data/lib/bookwatch/config/checkers/repository_name_presence_checker.rb +34 -0
  23. data/lib/bookwatch/config/checkers/required_keys_checker.rb +18 -0
  24. data/lib/bookwatch/config/checkers/section_presence_checker.rb +15 -0
  25. data/lib/bookwatch/config/configuration.rb +119 -0
  26. data/lib/bookwatch/config/configuration_decorator.rb +54 -0
  27. data/lib/bookwatch/config/dita_config_generator.rb +61 -0
  28. data/lib/bookwatch/config/fetcher.rb +64 -0
  29. data/lib/bookwatch/config/imprint/configuration.rb +24 -0
  30. data/lib/bookwatch/config/product_config.rb +34 -0
  31. data/lib/bookwatch/config/section_config.rb +85 -0
  32. data/lib/bookwatch/config/validator.rb +33 -0
  33. data/lib/bookwatch/config/yaml_loader.rb +34 -0
  34. data/lib/bookwatch/css_link_checker.rb +67 -0
  35. data/lib/bookwatch/directory_helpers.rb +15 -0
  36. data/lib/bookwatch/dita_command_creator.rb +95 -0
  37. data/lib/bookwatch/dita_html_for_middleman_formatter.rb +45 -0
  38. data/lib/bookwatch/errors/programmer_mistake.rb +5 -0
  39. data/lib/bookwatch/html_document_manipulator.rb +21 -0
  40. data/lib/bookwatch/ingest/cloner_factory.rb +26 -0
  41. data/lib/bookwatch/ingest/destination_directory.rb +21 -0
  42. data/lib/bookwatch/ingest/git_accessor.rb +102 -0
  43. data/lib/bookwatch/ingest/git_cloner.rb +36 -0
  44. data/lib/bookwatch/ingest/local_filesystem_cloner.rb +66 -0
  45. data/lib/bookwatch/ingest/missing_working_copy.rb +27 -0
  46. data/lib/bookwatch/ingest/repo_identifier.rb +45 -0
  47. data/lib/bookwatch/ingest/section_repository.rb +49 -0
  48. data/lib/bookwatch/ingest/update_failure.rb +15 -0
  49. data/lib/bookwatch/ingest/update_success.rb +12 -0
  50. data/lib/bookwatch/ingest/working_copy.rb +36 -0
  51. data/lib/bookwatch/local_filesystem_accessor.rb +122 -0
  52. data/lib/bookwatch/middleman_runner.rb +48 -0
  53. data/lib/bookwatch/postprocessing/link_checker.rb +125 -0
  54. data/lib/bookwatch/postprocessing/redirection.rb +38 -0
  55. data/lib/bookwatch/preprocessing/dita_html_preprocessor.rb +91 -0
  56. data/lib/bookwatch/preprocessing/dita_pdf_preprocessor.rb +48 -0
  57. data/lib/bookwatch/preprocessing/link_to_site_gen_dir.rb +39 -0
  58. data/lib/bookwatch/preprocessing/preprocessor.rb +26 -0
  59. data/lib/bookwatch/server_director.rb +30 -0
  60. data/lib/bookwatch/sheller.rb +52 -0
  61. data/lib/bookwatch/streams/colorized_stream.rb +25 -0
  62. data/lib/bookwatch/streams/filter_stream.rb +22 -0
  63. data/lib/bookwatch/subnav/navigation_entries_from_html_toc.rb +59 -0
  64. data/lib/bookwatch/subnav/navigation_entries_from_markdown_root.rb +116 -0
  65. data/lib/bookwatch/subnav/pdf_config_creator.rb +50 -0
  66. data/lib/bookwatch/subnav/subnav_generator.rb +28 -0
  67. data/lib/bookwatch/subnav/subnav_generator_factory.rb +29 -0
  68. data/lib/bookwatch/subnav/template_creator.rb +71 -0
  69. data/lib/bookwatch/terminal.rb +19 -0
  70. data/lib/bookwatch/values/output_locations.rb +91 -0
  71. data/lib/bookwatch/values/product_info.rb +11 -0
  72. data/lib/bookwatch/values/section.rb +58 -0
  73. data/lib/bookwatch/values/subnav_template.rb +4 -0
  74. data/lib/bookwatch/values/user_message.rb +15 -0
  75. data/master_middleman/archive_drop_down_menu.rb +50 -0
  76. data/master_middleman/bookwatch_helpers.rb +259 -0
  77. data/master_middleman/compass_runner.rb +0 -0
  78. data/master_middleman/config.rb +34 -0
  79. data/master_middleman/quicklinks_renderer.rb +80 -0
  80. data/master_middleman/source/javascripts/all.js +2 -0
  81. data/master_middleman/source/javascripts/book.js +1 -0
  82. data/master_middleman/source/javascripts/bookwatch.js +103 -0
  83. data/master_middleman/source/layouts/_additional-scripts.erb +0 -0
  84. data/master_middleman/source/layouts/_book-footer.erb +0 -0
  85. data/master_middleman/source/layouts/_book-search.erb +0 -0
  86. data/master_middleman/source/layouts/_book-title.erb +3 -0
  87. data/master_middleman/source/layouts/_header.erb +34 -0
  88. data/master_middleman/source/layouts/_local-header.erb +0 -0
  89. data/master_middleman/source/layouts/_page-footer.erb +1 -0
  90. data/master_middleman/source/layouts/_title.erb +5 -0
  91. data/master_middleman/source/layouts/layout.erb +69 -0
  92. data/master_middleman/source/stylesheets/all.css.scss +3 -0
  93. data/master_middleman/source/stylesheets/base.scss +380 -0
  94. data/master_middleman/source/stylesheets/book-styles.css.scss +0 -0
  95. data/master_middleman/source/stylesheets/layout-styles.scss +0 -0
  96. data/master_middleman/source/stylesheets/partials/_book-base-values.scss +0 -0
  97. data/master_middleman/source/stylesheets/partials/_book-vars.scss +0 -0
  98. data/master_middleman/source/stylesheets/partials/_default.scss +300 -0
  99. data/master_middleman/source/stylesheets/partials/_footer.scss +64 -0
  100. data/master_middleman/source/stylesheets/partials/_header.scss +419 -0
  101. data/master_middleman/source/stylesheets/partials/_layout-vars.scss +0 -0
  102. data/master_middleman/source/stylesheets/partials/_mixins.scss +53 -0
  103. data/master_middleman/source/stylesheets/partials/_reset.scss +233 -0
  104. data/master_middleman/source/stylesheets/partials/_search.scss +78 -0
  105. data/master_middleman/source/stylesheets/partials/_sidenav.scss +191 -0
  106. data/master_middleman/source/stylesheets/partials/_syntax-highlight.scss +64 -0
  107. data/master_middleman/source/stylesheets/partials/_vars.scss +64 -0
  108. data/master_middleman/source/stylesheets/print.css.scss +58 -0
  109. data/master_middleman/source/subnavs/_default.erb +0 -0
  110. data/master_middleman/source/subnavs/_nav-links.erb +10 -0
  111. data/master_middleman/source/subnavs/_subnav_template.erb +8 -0
  112. data/master_middleman/subdirectory_aware_assets.rb +47 -0
  113. data/template_app/Gemfile +10 -0
  114. data/template_app/Gemfile.lock +43 -0
  115. data/template_app/config.ru +9 -0
  116. data/template_app/lib/rack_static_if_exists.rb +19 -0
  117. data/template_app/lib/search/handler.rb +47 -0
  118. data/template_app/lib/search/hit.rb +21 -0
  119. data/template_app/lib/search/query.rb +74 -0
  120. data/template_app/lib/search/renderer.rb +29 -0
  121. data/template_app/lib/server.rb +52 -0
  122. data/template_app/mail_sender.rb +69 -0
  123. data/template_app/rack_app.rb +110 -0
  124. data/template_app/search-results.html.erb +75 -0
  125. data/template_app/search.yml +22 -0
  126. metadata +491 -0
@@ -0,0 +1,300 @@
1
+ /*
2
+ * FILE: _default.scss
3
+ ======================================================================== */
4
+ * {
5
+ -webkit-font-smoothing: antialiased;
6
+ }
7
+ html {
8
+ font-size: 1em;
9
+ }
10
+ body {
11
+ background-color: #fff;
12
+ // background-color: $color-bg;
13
+ font-family: $font-primary;
14
+ font-weight: 400;
15
+ line-height: 1.45;
16
+ color: #333;
17
+ margin: 0;
18
+ padding: 0;
19
+ }
20
+
21
+ // Paragraphs
22
+ p {
23
+ margin-bottom: 1.3em;
24
+ }
25
+ li p {
26
+ margin: 0; // Hack to fix broken markdown.
27
+ }
28
+
29
+ /*doc
30
+ ---
31
+ title: Link Default
32
+ name: link_default
33
+ category: basics
34
+ ---
35
+ ```html_example
36
+ <a class="link" href="#">Link</a>
37
+ ```
38
+ */
39
+
40
+ a, .link {
41
+ border-bottom: 1px dotted lighten(desaturate($color-link, 40%), 40%);
42
+ color: $color-link;
43
+ text-decoration: none;
44
+ @include transition(all 0.1s linear);
45
+ }
46
+
47
+ img {
48
+ height: auto;
49
+ max-width: 100%;
50
+ }
51
+
52
+ // Type Scale: Major Third 1.250
53
+ h1, h2, h3, h4, h5, h6 {
54
+ margin: 60px 0 0.5em;
55
+ font-weight: inherit;
56
+ line-height: 1.2;
57
+ }
58
+
59
+ .steps-header {
60
+ margin-top: -0.2em;
61
+ }
62
+
63
+ /*doc
64
+ ---
65
+ title: Headings
66
+ name: headings
67
+ category: basics
68
+ ---
69
+ ```html_example
70
+ <h1>h1. heading level 1</h1>
71
+ <h2>h2. heading level 2</h2>
72
+ <h3>h3. heading level 3</h3>
73
+ <h4>h4. heading level 4</h4>
74
+ <div class="h2">this is a div with an h2 class</div>
75
+ <h5 class="h3">this is an h5 with an h3 class</h5>
76
+ <h2><a id='fake-anchor'></a>h2. heading with link</h2>
77
+ <h3><a id='other-fake-anchor'></a>h3. heading with link</h3>
78
+ ```
79
+ */
80
+
81
+ h1, .h1 {
82
+ margin-top: 0;
83
+ font-size: $font-size-xxl;
84
+ }
85
+ h2, .h2 {
86
+ font-size: $font-size-xl;
87
+ }
88
+ h3, .h3 {
89
+ font-size: $font-size-l;
90
+ }
91
+ h4, h5, .h4 {
92
+ font-size: $font-size-m;
93
+ }
94
+ small,
95
+ .font_small {
96
+ font-size: 0.8em;
97
+ }
98
+ h2 > a:before, h3 > a:before {
99
+ @media (min-width: $bp-wide) {
100
+ content: "";
101
+ display: block;
102
+ height: 80px;
103
+ margin: -80px 0 0;
104
+ }
105
+ }
106
+
107
+ // Lists
108
+ ul,
109
+ ol {
110
+ margin: 0 0 1em;
111
+ }
112
+ ul {
113
+ padding: 0 0 0 1.2em;
114
+ }
115
+ ol {
116
+ padding: 0 0 0 1.4em;
117
+ }
118
+ ul ul,
119
+ ol ol {
120
+ margin-top: 1em;
121
+ padding-bottom: 0
122
+ }
123
+
124
+ // Vertical spacing for ordered lists
125
+ ol li {
126
+ margin: 0 0 1.3em;
127
+ padding: 0;
128
+ }
129
+
130
+ // Tight spacing for unordered lists
131
+ ul li {
132
+ margin: 0 0 0.5em;
133
+ padding: 0;
134
+ }
135
+
136
+ // Tight spacing for nested lists
137
+ li li {
138
+ margin-bottom: 0;
139
+ }
140
+
141
+ // Image spacing inside lists
142
+ ol img,
143
+ ul img {
144
+ margin: 0.5em 0;
145
+ }
146
+
147
+ // Input forms
148
+ input {
149
+ background-color: #f1f1f1;
150
+ border: 1px solid $color-border;
151
+ border-radius: $radius;
152
+ box-shadow: $color-border 1px 1px 4px -2px inset;
153
+ color: $color-text;
154
+ display: block;
155
+ padding: 0.5em 1em;
156
+ @include transition(all 0.1s linear);
157
+ width: 100%;
158
+
159
+ &:hover {
160
+ border-color: transparentize(darken($color-accent, 10%), 0.5);
161
+ background-color: #fff;
162
+ }
163
+ &:focus {
164
+ background-color: #fff;
165
+ border-color: $color-accent;
166
+ box-shadow: $color-border 0 0 4px;
167
+ outline: 0;
168
+ }
169
+ }
170
+
171
+ // Tables
172
+ table {
173
+ border-color: #b5b5b5;
174
+ border-collapse: collapse;
175
+ border-style: solid;
176
+ border-width: 1px;
177
+ color: #333333;
178
+ font-size: 1em;
179
+ margin-top: 1em;
180
+ padding: 0.8em 0.7rem;
181
+ width: 100%;
182
+ }
183
+ th {
184
+ background-color: #f8f8f8;
185
+ border-color: #b5b5b5;
186
+ color: #4b6475;
187
+ line-height: 1.1;
188
+ font-size: $font-size-s;
189
+ text-align: left;
190
+ }
191
+ tr {
192
+ color: #686868;
193
+ }
194
+
195
+ .content td, .content th, .content tr {
196
+ border: solid 1px grey;
197
+ }
198
+
199
+ .content tr:hover {
200
+ background-color: #fdfdfd;
201
+ color: #333;
202
+ }
203
+
204
+ caption {
205
+ font-size: $font-size-m;
206
+ padding: 0.5em;
207
+ }
208
+
209
+ // Code
210
+
211
+ /*doc
212
+ ---
213
+ title: Code Example - Default
214
+ name: code_example-default
215
+ category: basics
216
+ ---
217
+ ```html_example
218
+ <pre><code class="highlight ruby"><span class="nb">require</span> <span class="s1">'ova_manager'</span>
219
+ <span class="nb">require</span> <span class="s1">'vsphere_clients'</span>
220
+
221
+ <span class="no">OvaManager</span><span class="o">::</span><span class="no">Deployer</span><span class="p">.</span><span class="nf">new</span><span class="p">({</span>
222
+ <span class="ss">host: </span><span class="s2">"172.16.74.3"</span><span class="p">,</span>
223
+ <span class="ss">user: </span><span class="s2">"root"</span><span class="p">,</span>
224
+ <span class="ss">password: </span><span class="s2">"vmware"</span>
225
+ <span class="p">})</span>
226
+ </code></pre>
227
+ ```
228
+ */
229
+
230
+ pre {
231
+ background-color: #f0f0f0;
232
+ border-radius: 3px;
233
+ font-size: rem(13);
234
+ padding: 1em;
235
+ white-space: pre;
236
+ // max-width: 20em;
237
+ overflow: auto;
238
+ }
239
+ pre code {
240
+ background-color: transparent;
241
+ border: 0;
242
+ color: $color-text;
243
+ direction: ltr;
244
+ font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
245
+ overflow: auto;
246
+ text-align: left;
247
+ margin: 0;
248
+ padding: 0;
249
+ word-spacing: normal;
250
+ word-break: normal;
251
+ }
252
+
253
+ /*doc
254
+ ---
255
+ title: Code Example - Inline
256
+ name: code_example-inline
257
+
258
+ category: basics
259
+ ---
260
+ ```html_example
261
+ <code>"mbus"=&gt;"nats://nats:nats@192.168.86.17:4222"</code>
262
+ ```
263
+ */
264
+
265
+ code {
266
+ background-color: #f5f5ff;
267
+ border: 1px solid #e4e4e4;
268
+ display: inline-block;
269
+ font-size: rem(13);
270
+ line-height: 1.4;
271
+ margin: 0.2em 0.1em 0.1em;
272
+ padding: 0 0.4em 0 0.4em;
273
+ vertical-align: text-top;
274
+ }
275
+ code a {
276
+ color: #fefefe;
277
+ }
278
+
279
+ hr {
280
+ background-color: $color-border-light;
281
+ border: 0;
282
+ height: 1px;
283
+ float: left;
284
+ width: 100%;
285
+ }
286
+ .content pre {
287
+ &::-webkit-scrollbar {
288
+ -webkit-appearance: none;
289
+ width: 7px;
290
+ height: 7px;
291
+ }
292
+ &::-webkit-scrollbar-thumb {
293
+ border-radius: 4px;
294
+ background-color: rgba(0,0,0,.5);
295
+ -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
296
+ }
297
+ }
298
+ .hidden {
299
+ display: none !important;
300
+ }
@@ -0,0 +1,64 @@
1
+ /*
2
+ * FILE: _footer.scss
3
+ ======================================================================== */
4
+ .site-footer-links {
5
+ font-size: $font-size-xs;
6
+ clear: both;
7
+ padding: 1em 30px 4em 30px;
8
+ a {
9
+ color: $color-text;
10
+ }
11
+ }
12
+
13
+ .copyright {
14
+ @media (min-width: $bp-wide) {
15
+ float: left;
16
+ }
17
+ }
18
+
19
+ .support {
20
+ @media (min-width: $bp-wide) {
21
+ float: right;
22
+ }
23
+ }
24
+
25
+ #feedback {
26
+ #feedback-comments {
27
+ margin-top: 1em;
28
+ width: 49%;
29
+ }
30
+ #feedback-helpful {
31
+ border: none;
32
+ margin-top: 1em;
33
+ }
34
+ .feedback-option {
35
+ float: left;
36
+ margin-left: 2em;
37
+ margin-top: 0.5em;
38
+ width: 22%;
39
+ }
40
+ form fieldset {
41
+ width: 11em;
42
+ float: left;
43
+ }
44
+ textarea {
45
+ width: 100%;
46
+ }
47
+ input[type='submit'] {
48
+ background-color: transparentize($color-accent-bright, 0.8);
49
+ float: left;
50
+ margin-left: 1em;
51
+ margin-top: 2.5em;
52
+ padding: 1em;
53
+ width: 8em;
54
+ }
55
+ }
56
+
57
+ #repo-link {
58
+ display: block;
59
+ border-bottom: solid 1px #eceae9;
60
+ border-top: solid 1px #eceae9;
61
+ text-align: center;
62
+ padding: 1em 0;
63
+ font-weight: bold;
64
+ }
@@ -0,0 +1,419 @@
1
+ /*
2
+ * FILE: _header.scss
3
+ ======================================================================== */
4
+ .header-layout {
5
+ @media (min-width: $bp-wide) {
6
+ left: 0;
7
+ padding-left: em(30);
8
+ padding-right: em(30);
9
+ position: fixed;
10
+ top: 0;
11
+ width: 100%;
12
+ z-index: 11;
13
+ }
14
+ }
15
+
16
+ /*doc
17
+ ---
18
+ title: Header Bar
19
+ name: header_bar
20
+ category: basics
21
+ ---
22
+ Add <code>.header-layout</code> to header tag to get fixed positioning.
23
+
24
+ ```html_example
25
+ <header class="header">
26
+ <h1 class="logo">
27
+ Pivotal Cloud Foundry Documentation
28
+ </h1>
29
+ <div class="header-links js-bar-links">
30
+ <div class="btn-menu" data-behavior="MenuMobile"></div>
31
+ <div class="header-item">
32
+ <a href="/">Docs Home</a>
33
+ </div>
34
+ <div class="header-item">
35
+ <a href="<%=vars.support_url%>" target="_blank">Support</a>
36
+ </div>
37
+ <div class="header-item searchbar js-searchbar">
38
+ <a class="search-icon" data-behavior="Search"></a>
39
+ <div class="search-input">
40
+ </div>
41
+ </div>
42
+ </div>
43
+ </header>
44
+ ```
45
+ */
46
+ .header {
47
+ background: $color-bg-header;
48
+ border-bottom: 3px solid $color-accent-bright;
49
+ color: #fefefe;
50
+ min-height: em(38);
51
+ padding: em(5) 1em em(5) 1em;
52
+ @include clearfix;
53
+ }
54
+ .header a {
55
+ color: #fff;
56
+ display: inline-block;
57
+ }
58
+ .header img {
59
+ height: 1;
60
+ margin-right: 0.5em;
61
+ width: 25px;
62
+ vertical-align: top;
63
+ }
64
+
65
+ // logo
66
+ .logo {
67
+ float: left;
68
+ font-size: 1em;
69
+ font-weight: bold;
70
+ line-height: rem(25);
71
+ margin-bottom: 0;
72
+ }
73
+ .logo a {
74
+ border: 0;
75
+ }
76
+
77
+ // header links
78
+ .header-links {
79
+ @media (min-width: $bp-wide) {
80
+ float: right;
81
+ text-align: right;
82
+ width: 50%;
83
+ }
84
+ }
85
+ .btn-menu {
86
+ float: right;
87
+ position: relative;
88
+ right: -1em;
89
+ &:before {
90
+ content: $fa-var-bars;
91
+ @extend .fa;
92
+ padding-right: 0.4em;
93
+ padding-top: 0.4em;
94
+ }
95
+ &:hover {
96
+ cursor: pointer;
97
+ }
98
+ padding: 0 1em;
99
+ @media (min-width: $bp-wide) {
100
+ display: none;
101
+ }
102
+ }
103
+ .menu-active .btn-menu {
104
+ &:before {
105
+ content: '\d7';
106
+ }
107
+ //@extend .fa-plus;
108
+ margin-bottom: 0.5em;
109
+ //&:before {
110
+ // @include transform(rotate(45deg));
111
+ // @include transform-origin(0.4em 0.7em);
112
+ //}
113
+ }
114
+ .header-item {
115
+ clear: both;
116
+ display: none;
117
+ font-weight: bold;
118
+ @include transition (opacity);
119
+ font-size: $font-size-xs;
120
+ line-height: 1;
121
+ @media (min-width: $bp-wide) {
122
+ clear: none;
123
+ display: inline-block;
124
+ padding-top: 0.55em;
125
+ }
126
+ }
127
+ .menu-active .header-item {
128
+ @media (max-width: $bp-wide) {
129
+ display: block;
130
+ }
131
+ }
132
+ .header-item:after {
133
+ @media (min-width: $bp-wide) {
134
+ content: "|";
135
+ }
136
+ }
137
+ .header-item:last-child:after {
138
+ @media (min-width: $bp-wide) {
139
+ content: "";
140
+ }
141
+ }
142
+
143
+ /*doc
144
+ ---
145
+ title: Link Header
146
+ name: link header
147
+ category: basics
148
+ ---
149
+ ```html_example
150
+ <div style="background: black">
151
+ <div class="header-item">
152
+ <a href="#">Link</a>
153
+ </div>
154
+ <div class="header-item">
155
+ <a href="#">Link</a>
156
+ </div>
157
+ <div class="header-item">
158
+ <a href="#">Link</a>
159
+ </div>
160
+ </div>
161
+ ```
162
+ */
163
+ .header-item a {
164
+ border-bottom-color: $gray2;
165
+ border-style: dotted;
166
+ border-width: 0 0 1px;
167
+ color: #fff;
168
+ display: block;
169
+ padding: 0.5em 0;
170
+ @media (min-width: $bp-wide) {
171
+ display: inline;
172
+ margin-left: 1em;
173
+ margin-right: 1em;
174
+ padding: 0
175
+ }
176
+ }
177
+ .header-item a:hover {
178
+ @media (min-width: $bp-wide) {
179
+ background-color: transparent;
180
+ border-bottom: 0;
181
+ }
182
+ }
183
+
184
+ // ~HOME
185
+ // ===================================================
186
+
187
+ .header-home {
188
+ border-top: 5px solid $color-accent-bright;
189
+ background: $color-bg-header;
190
+ color: #fff;
191
+ padding: 0 1.5em 4em 1.5em;
192
+ text-align: center;
193
+ margin-bottom: 3em;
194
+ }
195
+
196
+ .home-links {
197
+ padding-top: .5rem;
198
+ margin-bottom: 3em;
199
+ text-align: left;
200
+ @media (min-width: $bp-wide) {
201
+ text-align: right;
202
+ margin-bottom: 0;
203
+ }
204
+ }
205
+ /*doc
206
+ ---
207
+ title: Title Flashy
208
+ name: title_flashy
209
+ category: basics
210
+ ---
211
+ ```html_example
212
+ <h1 class="title-flashy">
213
+ <span class="title-deemph">Pivotal</span> Documentation
214
+ </h1>
215
+ ```
216
+ */
217
+ .title-flashy {
218
+ display: inline-block;
219
+ font-weight: 600;
220
+ font-size: $font-size-l;
221
+ text-align: left;
222
+ margin-left: 1rem;
223
+ img {
224
+ height: rem(61);
225
+ vertical-align: middle;
226
+ padding-right: .5rem;
227
+ float: left;
228
+ @media (min-width: $bp-wide) {
229
+ height: rem(45);
230
+ float: none;
231
+ }
232
+ }
233
+ @media (min-width: $bp-wide) {
234
+ font-size: $font-size-xxl;
235
+ margin-left: 0;
236
+ padding-left: 1.8em;
237
+ padding-top: 2rem;
238
+ text-align: center;
239
+ }
240
+ }
241
+ /*doc
242
+ ---
243
+ title: Title Intro
244
+ name: title_intro
245
+ category: basics
246
+ ---
247
+ ```html_example
248
+ <h2 class="title-intro">
249
+ Everything you need to know about Pivotal Software.
250
+ </h2>
251
+ ```
252
+ */
253
+ .title-intro {
254
+ font-size: $font-size-m;
255
+ font-weight: 300;
256
+ margin: 0 auto 0.5em;
257
+ max-width: 30em;
258
+ text-align: center;
259
+ @media (min-width: $bp-wide) {
260
+ font-size: $font-size-l;
261
+ }
262
+ }
263
+
264
+ .title-deemph {
265
+ font-weight: 300;
266
+ }
267
+
268
+
269
+ // ~HEADER SEARCH
270
+ // ===================================================
271
+ .searchbar {
272
+ @include transition(all 0.2s linear);
273
+ color: #eee;
274
+ margin-bottom: 1em;
275
+ margin-top: 1.3em;
276
+ padding-top: 0;
277
+ @media (min-width: $bp-wide) {
278
+ margin-bottom: 0;
279
+ margin-top: 0;
280
+ position: relative;
281
+ }
282
+ }
283
+ .searchbar:hover {
284
+ cursor: pointer;
285
+ }
286
+ .searchbar a {
287
+ margin: 0;
288
+ padding: 0.55em 1em;
289
+ }
290
+ .searchbar a,
291
+ .searchbar a:hover {
292
+ border-bottom: 0;
293
+ }
294
+ .search-input-inner {
295
+ position: relative;
296
+ }
297
+
298
+ // search icon
299
+ .search-icon {
300
+ &:before {
301
+ content: $fa-var-search;
302
+ color: #c7c7c7;
303
+ @extend .fa;
304
+ }
305
+ }
306
+ .header-item .search-icon {
307
+ display: none;
308
+ @media (min-width: $bp-wide) {
309
+ display: block;
310
+ }
311
+ }
312
+
313
+ // search input
314
+ .search-input {
315
+ //@include border-bottom-radius(3px);
316
+ display: none;
317
+ @media (min-width: $bp-wide) {
318
+ padding: 1em;
319
+ position: absolute;
320
+ right: 0;
321
+ top: 100%;
322
+ width: 30em;
323
+ }
324
+ }
325
+ // wide view
326
+ .active .search-input {
327
+ display: block;
328
+ }
329
+ // narrow view
330
+ .menu-active .search-input {
331
+ @media (max-width: $bp-wide) {
332
+ display: block;
333
+ }
334
+ }
335
+ // search
336
+ #search-dropdown-box {
337
+ display: none;
338
+ }
339
+
340
+
341
+ // ~VERSION
342
+ // ===================================================
343
+
344
+ /*doc
345
+ ---
346
+ title: Version Menu
347
+ name: version menu
348
+ category: basics
349
+ ---
350
+ ```html_example
351
+ <div class="header-dropdown">
352
+ <a class="subnav-link" href="#">
353
+ v1.2.0.0
354
+ </a>
355
+ <div class="header-dropdown-content">
356
+ <ul>
357
+ <li><a href="">v1.2.0.0</a></li>
358
+ </ul>
359
+ </div>
360
+ </div>
361
+ ```
362
+ */
363
+ .header-dropdown {
364
+ border-radius: 0.5em;
365
+ float: left;
366
+ font-size: 0.9em;
367
+ font-weight: bold;
368
+ line-height: rem(25);
369
+ margin-left: 0.5em;
370
+ margin-top: 0.04em;
371
+ position: relative;
372
+ }
373
+ .header-dropdown:hover .header-dropdown-content {
374
+ display: block;
375
+ }
376
+ .header-dropdown-link {
377
+ border: 0;
378
+ display: block;
379
+ line-height: 1.4;
380
+ padding: 0 0.5em;
381
+ }
382
+ .header-dropdown-link:after {
383
+ @extend .fa;
384
+ color: $color-bg-dark;
385
+ content: $fa-var-caret-down;
386
+ font-size: 0.8em;
387
+ padding-left: 0.2em;
388
+ }
389
+ .header-dropdown:hover {
390
+ //@include border-bottom-radius(0);
391
+ }
392
+ .header-dropdown-content {
393
+ background: $color-bg-light;
394
+ box-shadow: 2px 1px 5px rgba(153, 153, 153, 0.2);
395
+ border: 1px solid $color-border-light;
396
+ display: none;
397
+ left: rem(-14);
398
+ min-width: em(100);
399
+ padding: 0.5em;
400
+ position: absolute;
401
+ top: 100%;
402
+ z-index: 11;
403
+ }
404
+ .header-dropdown-content a {
405
+ border: 0;
406
+ color: $color-text;
407
+ display: block;
408
+ padding-left: 0.9em;
409
+ }
410
+ .header-dropdown-content ol,
411
+ .header-dropdown-content ul {
412
+ list-style: none;
413
+ margin: 0;
414
+ padding: 0;
415
+ }
416
+ .header-dropdown-content li {
417
+ display: block;
418
+ margin: 0;
419
+ }