bookbindery 9.5.0 → 9.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/bookbinder.gemspec +3 -1
  3. data/lib/bookbinder/commands/collection.rb +1 -1
  4. data/lib/bookbinder/commands/generate.rb +1 -1
  5. data/lib/bookbinder/css_link_checker.rb +6 -2
  6. data/lib/bookbinder/preprocessing/dita_html_preprocessor.rb +3 -3
  7. data/lib/bookbinder/preprocessing/link_to_site_gen_dir.rb +2 -2
  8. data/lib/bookbinder/subnav/{json_from_html_toc.rb → navigation_entries_from_html_toc.rb} +3 -5
  9. data/lib/bookbinder/subnav/{json_from_markdown_toc.rb → navigation_entries_from_markdown_root.rb} +4 -4
  10. data/lib/bookbinder/subnav/pdf_config_creator.rb +3 -5
  11. data/lib/bookbinder/subnav/subnav_generator.rb +9 -6
  12. data/lib/bookbinder/subnav/subnav_generator_factory.rb +2 -8
  13. data/lib/bookbinder/subnav/template_creator.rb +33 -21
  14. data/master_middleman/archive_drop_down_menu.rb +3 -3
  15. data/master_middleman/bookbinder_helpers.rb +1 -1
  16. data/master_middleman/source/javascripts/sidenav.js +45 -0
  17. data/master_middleman/source/layouts/_additional-scripts.erb +0 -0
  18. data/master_middleman/source/layouts/_book-footer.erb +0 -0
  19. data/master_middleman/source/layouts/_book-search.erb +0 -0
  20. data/master_middleman/source/layouts/_book-title.erb +3 -0
  21. data/master_middleman/source/layouts/_header.erb +34 -0
  22. data/master_middleman/source/layouts/_local-header.erb +0 -0
  23. data/master_middleman/source/layouts/layout.erb +73 -0
  24. data/master_middleman/source/stylesheets/base.scss +365 -0
  25. data/master_middleman/source/stylesheets/partials/_book-base-values.scss +0 -0
  26. data/master_middleman/source/stylesheets/partials/_book-vars.scss +0 -0
  27. data/master_middleman/source/stylesheets/partials/_default.scss +300 -0
  28. data/master_middleman/source/stylesheets/partials/_footer.scss +63 -0
  29. data/master_middleman/source/stylesheets/partials/_header.scss +429 -0
  30. data/master_middleman/source/stylesheets/partials/_mixins.scss +43 -0
  31. data/master_middleman/source/stylesheets/partials/_reset.scss +233 -0
  32. data/master_middleman/source/stylesheets/partials/_search.scss +78 -0
  33. data/master_middleman/source/stylesheets/partials/_sidenav.scss +143 -0
  34. data/master_middleman/source/stylesheets/partials/_syntax-highlight.scss +64 -0
  35. data/master_middleman/source/stylesheets/partials/_vars.scss +62 -0
  36. data/master_middleman/source/subnavs/_default.erb +0 -0
  37. data/master_middleman/source/subnavs/_nav-links.erb +10 -0
  38. data/master_middleman/source/subnavs/_subnav_template.erb +8 -0
  39. metadata +55 -5
  40. data/lib/bookbinder/subnav/json_props_creator.rb +0 -35
@@ -0,0 +1,43 @@
1
+ @mixin transition($properties...) {
2
+ -webkit-transition: $properties;
3
+ -moz-transition: $properties;
4
+ transition: $properties;
5
+ }
6
+
7
+ // Modern micro clearfix provides an easy way to contain floats without adding additional markup.
8
+ //
9
+ // Example usage:
10
+ //
11
+ // // Contain all floats within .wrapper
12
+ // .wrapper {
13
+ // @include clearfix;
14
+ // .content,
15
+ // .sidebar {
16
+ // float : left;
17
+ // }
18
+ // }
19
+
20
+ @mixin clearfix {
21
+ &:after {
22
+ content:"";
23
+ display:table;
24
+ clear:both;
25
+ }
26
+ }
27
+
28
+ // Acknowledgements
29
+ // Beat *that* clearfix: [Thierry Koblentz](http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php)
30
+
31
+ @function strip-units($val) {
32
+ @return ($val / ($val * 0 + 1));
33
+ }
34
+
35
+ @function em($pxval, $base: $em-base) {
36
+ @if not unitless($pxval) {
37
+ $pxval: strip-units($pxval);
38
+ }
39
+ @if not unitless($base) {
40
+ $base: strip-units($base);
41
+ }
42
+ @return ($pxval / $base) * 1em;
43
+ }
@@ -0,0 +1,233 @@
1
+ /*
2
+ * FILE: _reset.scss
3
+ ========================================================================== */
4
+
5
+ //! normalize.css v3.0.0 | MIT License | git.io/normalize
6
+
7
+ // 1. Set default font family to sans-serif.
8
+ // 2. Prevent iOS text size adjust after orientation change, without disabling user zoom.
9
+ html {
10
+ font-family: sans-serif; /* 1 */
11
+ -ms-text-size-adjust: 100%; /* 2 */
12
+ -webkit-text-size-adjust: 100%; /* 2 */
13
+ }
14
+
15
+ // 1. Correct `inline-block` display not defined in IE 8/9.
16
+ // 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
17
+ audio,
18
+ canvas,
19
+ progress,
20
+ video {
21
+ display: inline-block; /* 1 */
22
+ vertical-align: baseline; /* 2 */
23
+ }
24
+
25
+ // Prevent modern browsers from displaying `audio` without controls.
26
+ // Remove excess height in iOS 5 devices.
27
+ audio:not([controls]) {
28
+ display: none;
29
+ height: 0;
30
+ }
31
+
32
+ // Address `[hidden]` styling not present in IE 8/9/10.
33
+ // Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
34
+ [hidden],
35
+ template {
36
+ display: none;
37
+ }
38
+
39
+ // Remove the gray background color from active links in IE 10.
40
+ a {
41
+ background: transparent;
42
+ }
43
+
44
+ // Improve readability when focused and also mouse hovered in all browsers.
45
+ a:active,
46
+ a:hover {
47
+ outline: 0;
48
+ }
49
+
50
+ // Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
51
+ b,
52
+ strong {
53
+ font-weight: bold;
54
+ }
55
+
56
+ // Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari, and Chrome.
57
+ h1 {
58
+ font-size: 2em;
59
+ margin: 0.67em 0;
60
+ }
61
+
62
+ // Prevent `sub` and `sup` affecting `line-height` in all browsers.
63
+ sub,
64
+ sup {
65
+ font-size: 75%;
66
+ line-height: 0;
67
+ position: relative;
68
+ vertical-align: baseline;
69
+ }
70
+
71
+ sup {
72
+ top: -0.5em;
73
+ }
74
+
75
+ sub {
76
+ bottom: -0.25em;
77
+ }
78
+
79
+ // Correct overflow not hidden in IE 9/10/11.
80
+ svg:not(:root) {
81
+ overflow: hidden;
82
+ }
83
+
84
+ // Address margin not present in IE 8/9 and Safari.
85
+ figure {
86
+ margin: 1em 40px;
87
+ }
88
+
89
+ // Address differences between Firefox and other browsers.
90
+ hr {
91
+ -moz-box-sizing: content-box;
92
+ box-sizing: content-box;
93
+ height: 0;
94
+ }
95
+
96
+ // Contain overflow in all browsers.
97
+ pre {
98
+ overflow: auto;
99
+ }
100
+
101
+ //Address odd `em`-unit font size rendering in all browsers.
102
+ code,
103
+ kbd,
104
+ pre,
105
+ samp,
106
+ .filepath {
107
+ font-family: monospace, monospace;
108
+ font-size: 1em;
109
+ }
110
+
111
+ //1. Correct color not being inherited. Known issue: affects color of disabled elements.
112
+ // 2. Correct font properties not being inherited.
113
+ // 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
114
+ button,
115
+ input,
116
+ optgroup,
117
+ select,
118
+ textarea {
119
+ color: inherit; /* 1 */
120
+ font: inherit; /* 2 */
121
+ margin: 0; /* 3 */
122
+ }
123
+
124
+ // Address `overflow` set to `hidden` in IE 8/9/10/11.
125
+ button {
126
+ overflow: visible;
127
+ }
128
+
129
+ // Address inconsistent `text-transform` inheritance for `button` and `select`.
130
+ button,
131
+ select {
132
+ text-transform: none;
133
+ }
134
+
135
+ // 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls.
136
+ // 2. Correct inability to style clickable `input` types in iOS.
137
+ // 3. Improve usability and consistency of cursor style between image-type `input` and others.
138
+ button,
139
+ html input[type="button"], /* 1 */
140
+ input[type="reset"],
141
+ input[type="submit"] {
142
+ -webkit-appearance: button; /* 2 */
143
+ cursor: pointer; /* 3 */
144
+ }
145
+
146
+ // Re-set default cursor for disabled elements.
147
+ button[disabled],
148
+ html input[disabled] {
149
+ cursor: default;
150
+ }
151
+
152
+ // Remove inner padding and border in Firefox 4+.
153
+ button::-moz-focus-inner,
154
+ input::-moz-focus-inner {
155
+ border: 0;
156
+ padding: 0;
157
+ }
158
+
159
+ // Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet.
160
+ input {
161
+ line-height: normal;
162
+ }
163
+
164
+ //It's recommended that you don't attempt to style these elements. Firefox's
165
+ // implementation doesn't respect box-sizing, padding, or width.
166
+ // 1. Address box sizing set to `content-box` in IE 8/9/10.
167
+ // 2. Remove excess padding in IE 8/9/10.
168
+ input[type="checkbox"],
169
+ input[type="radio"] {
170
+ box-sizing: border-box; /* 1 */
171
+ padding: 0; /* 2 */
172
+ }
173
+
174
+ //Fix the cursor style for Chrome's increment/decrement buttons.
175
+ // For certain `font-size` values of the `input`, it causes the cursor style of
176
+ // the decrement button to change from `default` to `text`.
177
+ input[type="number"]::-webkit-inner-spin-button,
178
+ input[type="number"]::-webkit-outer-spin-button {
179
+ height: auto;
180
+ }
181
+
182
+ // 1. Address `appearance` set to `searchfield` in Safari and Chrome.
183
+ // 2. Address `box-sizing` set to `border-box` in Safari and Chrome (include `-moz` to future-proof).
184
+ input[type="search"] {
185
+ -webkit-appearance: textfield; /* 1 */
186
+ -moz-box-sizing: content-box;
187
+ -webkit-box-sizing: content-box; /* 2 */
188
+ box-sizing: content-box;
189
+ }
190
+
191
+ // Remove inner padding and search cancel button in Safari and Chrome on OS X.
192
+ // Safari (but not Chrome) clips the cancel button when the search input has
193
+ // padding (and `textfield` appearance).
194
+ input[type="search"]::-webkit-search-cancel-button,
195
+ input[type="search"]::-webkit-search-decoration {
196
+ -webkit-appearance: none;
197
+ }
198
+
199
+ // Define consistent border, margin, and padding.
200
+ fieldset {
201
+ border: 1px solid #c0c0c0;
202
+ margin: 0 2px;
203
+ padding: 0.35em 0.625em 0.75em;
204
+ }
205
+
206
+ // 1. Correct `color` not being inherited in IE 8/9/10/11.
207
+ // 2. Remove padding so people aren't caught out if they zero out fieldsets.
208
+ legend {
209
+ border: 0; /* 1 */
210
+ padding: 0; /* 2 */
211
+ }
212
+
213
+ // Remove default vertical scrollbar in IE 8/9/10/11.
214
+ textarea {
215
+ overflow: auto;
216
+ }
217
+
218
+ // Don't inherit the `font-weight` (applied by a rule above).
219
+ // NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
220
+ optgroup {
221
+ font-weight: bold;
222
+ }
223
+
224
+ //Remove most spacing between table cells.
225
+ table {
226
+ border-collapse: collapse;
227
+ border-spacing: 0;
228
+ }
229
+
230
+ td,
231
+ th {
232
+ padding: 0.3em 0.5em;
233
+ }
@@ -0,0 +1,78 @@
1
+ .search-results {
2
+ .result-summary {
3
+ margin: 20px;
4
+ }
5
+
6
+ .search-results-list {
7
+ list-style: none;
8
+ padding-left: 20px;
9
+
10
+ li {
11
+ margin-top: 30px;
12
+
13
+ &:first-child {
14
+ margin-top: 0;
15
+ }
16
+ }
17
+ }
18
+
19
+ .no-results {
20
+ text-align: center;
21
+ padding: 50px 0;
22
+ border-bottom: 2px solid #F4F4F4;
23
+ font-size: 20px;
24
+ color: #66747B;
25
+ font-weight: bold;
26
+ }
27
+
28
+ .pagination {
29
+ margin-top: 30px;
30
+ text-align: center;
31
+
32
+ a.page {
33
+ border: 0;
34
+ }
35
+
36
+ .page {
37
+ display: inline-block;
38
+ margin: 0 8px;
39
+
40
+ &.disabled {
41
+ color: #D3D3D3;
42
+ }
43
+
44
+ &.current {
45
+ color: #808080;
46
+ border-bottom: 2px solid #808080;
47
+ }
48
+
49
+ &.first:before {
50
+ content: "\F053\F053";
51
+ font-family: FontAwesome;
52
+ font-size: 12px;
53
+ padding-right: 4px;
54
+ }
55
+
56
+ &.previous:before {
57
+ content: "\F053";
58
+ font-family: FontAwesome;
59
+ font-size: 12px;
60
+ padding-right: 4px;
61
+ }
62
+
63
+ &.next:after {
64
+ content: "\F054";
65
+ font-family: FontAwesome;
66
+ font-size: 12px;
67
+ padding-left: 4px;
68
+ }
69
+
70
+ &.last:after {
71
+ content: "\F054\F054";
72
+ font-family: FontAwesome;
73
+ font-size: 12px;
74
+ padding-left: 4px;
75
+ }
76
+ }
77
+ }
78
+ }
@@ -0,0 +1,143 @@
1
+
2
+ .sidenav-title {
3
+ border: 0;
4
+ color: $color-text;
5
+ display: block;
6
+ padding: 1em;
7
+ text-align: center;
8
+ text-transform: uppercase;
9
+ @media (min-width: $bp-wide) {
10
+ display: none;
11
+ }
12
+ }
13
+ .sidenav-title:after {
14
+ @extend .fa;
15
+ content: $fa-var-angle-down;
16
+ padding-left: 1.5em;
17
+ }
18
+ .sidenav-title:hover,
19
+ .active .sidenav-title {
20
+ @include contrasted($color-accent-bright);
21
+ cursor: pointer;
22
+ }
23
+ .active .sidenav-title:after {
24
+ content: $fa-var-angle-up;
25
+ }
26
+ // ~SIDE NAVIGATION
27
+ .nav-container {
28
+ background: $gray5;
29
+ @media (min-width: $bp-wide) {
30
+ padding: 1.9em 0 1.9em 1em;
31
+ }
32
+ }
33
+ .nav-content {
34
+ height: 0;
35
+ opacity: 0;
36
+ @include transition(all 0.2s linear);
37
+ overflow: hidden;
38
+ padding-left: 1em;
39
+ @media (min-width: $bp-wide) {
40
+ height: auto;
41
+ display: block;
42
+ opacity: 1;
43
+ padding-left: 0;
44
+ }
45
+ @media (min-width: $bp-widest) {
46
+ padding-left: 0.875em;
47
+ }
48
+ }
49
+ .active .nav-content {
50
+ border-top: 1px solid #ededed;
51
+ height: auto;
52
+ opacity: 1;
53
+ padding-bottom: 1.9em; // Allows nav to be hidden in mobile view.
54
+ padding-top: 1em;
55
+ }
56
+ .nav-content ul,
57
+ .nav-content ol {
58
+ clear: both;
59
+ display: block;
60
+ margin: 0.5em 0;
61
+ padding: 0;
62
+ }
63
+ .nav-content li {
64
+ display: block;
65
+ margin: 0;
66
+ overflow: hidden;
67
+ padding: 0;
68
+ }
69
+
70
+ // navigation links
71
+ .nav-content a {
72
+ border-width: 1px 0 1px 1px;
73
+ border-style: solid;
74
+ border-color: transparent;
75
+ color: $gray2;
76
+ font-size: 0.9rem; // Custom font-size
77
+ display: block;
78
+ float: left;
79
+ padding: .75em 30px .75em 2em;
80
+ text-decoration: none;
81
+ width: 100%;
82
+ }
83
+ .nav-content a:hover,
84
+ .nav-content a:focus,
85
+ .nav-content a:active {
86
+ border-color: #EEE;
87
+ background-color: #fff;
88
+ color: $color-text;
89
+ }
90
+ .nav-content .active,
91
+ .nav-content .active:hover,
92
+ .nav-content .active:focus {
93
+ background-color: transparentize($color-accent-bright, 0.8);
94
+ border-style: solid;
95
+ color: $gray1;
96
+ @extend %h-bold;
97
+ }
98
+
99
+
100
+
101
+ .nav-content {
102
+ .has_submenu {
103
+ cursor: pointer;
104
+
105
+ &:before {
106
+ @extend .fa;
107
+ content: $fa-var-angle-right;
108
+ float: left;
109
+ width: 1rem;
110
+ margin-top: 1em;
111
+ display: inline-block;
112
+ font-style: normal;
113
+ font-weight: normal;
114
+ line-height: 1;
115
+ }
116
+
117
+ > a {
118
+ margin-left: 1em;
119
+ float: none;
120
+ width: inherit;
121
+ padding-left: 1em;
122
+ }
123
+
124
+ > ul {
125
+ display: none;
126
+ }
127
+
128
+ li {
129
+ padding-left: 1em;
130
+ }
131
+
132
+ &.expanded {
133
+ &:before {
134
+ content: $fa-var-angle-down;
135
+ }
136
+
137
+ > ul {
138
+ display: block;
139
+ }
140
+ }
141
+ }
142
+ }
143
+