opendoc-theme 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.
Files changed (74) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +43 -0
  4. data/_includes/directory.html +95 -0
  5. data/_includes/document-title.txt +58 -0
  6. data/_includes/toc.html +107 -0
  7. data/_includes/toolbar.html +53 -0
  8. data/_includes/welcome.html +5 -0
  9. data/_layouts/default.html +147 -0
  10. data/_layouts/home.html +4 -0
  11. data/_layouts/iframe.html +13 -0
  12. data/_layouts/page.html +4 -0
  13. data/_layouts/print.html +27 -0
  14. data/_sass/_base.scss +381 -0
  15. data/_sass/_constants.scss +87 -0
  16. data/_sass/_iframe.scss +7 -0
  17. data/_sass/_layout.scss +419 -0
  18. data/_sass/_nav.scss +592 -0
  19. data/_sass/_print.scss +43 -0
  20. data/_sass/_syntax-highlighting.scss +61 -0
  21. data/_sass/_toolbar.scss +372 -0
  22. data/_sass/_welcome.scss +41 -0
  23. data/assets/export.md +30 -0
  24. data/assets/images/chevron-up-white.svg +1 -0
  25. data/assets/images/chevron-up.svg +1 -0
  26. data/assets/images/close.svg +17 -0
  27. data/assets/images/favicon.ico +0 -0
  28. data/assets/images/feedback-hover.svg +3 -0
  29. data/assets/images/feedback-mobile.svg +1 -0
  30. data/assets/images/feedback.svg +1 -0
  31. data/assets/images/github-hover.svg +3 -0
  32. data/assets/images/github.svg +1 -0
  33. data/assets/images/home.svg +14 -0
  34. data/assets/images/index-img.png +0 -0
  35. data/assets/images/logo.png +0 -0
  36. data/assets/images/menu.svg +1 -0
  37. data/assets/images/opendoc-logo-full.svg +10 -0
  38. data/assets/images/pdf-hover.svg +11 -0
  39. data/assets/images/pdf.svg +9 -0
  40. data/assets/images/search-icon-dark.svg +19 -0
  41. data/assets/images/search-icon-white.svg +12 -0
  42. data/assets/images/share.svg +1 -0
  43. data/assets/images/sidebar-hover.svg +3 -0
  44. data/assets/images/sidebar.svg +1 -0
  45. data/assets/images/vertical-dots.svg +1 -0
  46. data/assets/images/x-mobile.svg +1 -0
  47. data/assets/index.html +5 -0
  48. data/assets/js/banner.js +20 -0
  49. data/assets/js/google_analytics.js +11 -0
  50. data/assets/js/header.js +31 -0
  51. data/assets/js/helpers.js +24 -0
  52. data/assets/js/lunr.min.js +6 -0
  53. data/assets/js/navigation.js +202 -0
  54. data/assets/js/page-index.js +57 -0
  55. data/assets/js/pqueue.js +373 -0
  56. data/assets/js/pre-loader.js +43 -0
  57. data/assets/js/search.js +580 -0
  58. data/assets/js/toolbar.js +130 -0
  59. data/assets/siteIndex.json +56 -0
  60. data/assets/startup/build.sh +18 -0
  61. data/assets/startup/docprint.html +20 -0
  62. data/assets/startup/pdf-gen.js +309 -0
  63. data/assets/startup/prebuild-lunr-index.js +52 -0
  64. data/assets/styles/main.scss +13 -0
  65. data/assets/styles/normalize.css +427 -0
  66. data/assets/vendor/babel-polyfill.min.js +3 -0
  67. data/assets/vendor/dom4.js +2 -0
  68. data/assets/vendor/fetch.umd.js +531 -0
  69. data/assets/vendor/headroom.min.js +7 -0
  70. data/assets/vendor/jump.min.js +2 -0
  71. data/assets/vendor/mark.min.js +7 -0
  72. data/assets/vendor/popper.min.js +5 -0
  73. data/assets/vendor/web-share-shim.bundle.min.js +2 -0
  74. metadata +158 -0
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {{ content }}
@@ -0,0 +1,13 @@
1
+ <head>
2
+ <link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,600" rel="stylesheet" type="text/css">
3
+ <link href="https://fonts.googleapis.com/css?family=Noto+Serif:400,700" rel="stylesheet" type="text/css">
4
+ <link href="https://fonts.googleapis.com/css?family=Noto+Sans:400,700" rel="stylesheet" type="text/css">
5
+ <link rel="stylesheet" href="{{ '/assets/styles/normalize.css' | relative_url }}">
6
+ <link rel="stylesheet" href="{{ '/assets/styles/main.css' | relative_url }}">
7
+ </head>
8
+
9
+ <body>
10
+ <div class="site-main" style="top: 0; left: 0; padding: 0">
11
+ {{ content }}
12
+ </div>
13
+ </body>
@@ -0,0 +1,4 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {{ content }}
@@ -0,0 +1,27 @@
1
+ ---
2
+ ---
3
+ <!-- layout for print export.html -->
4
+ <!DOCTYPE html>
5
+ <html lang="{{ page.lang | default: site.lang | default: "en" }}">
6
+
7
+ <head>
8
+ <meta charset="utf-8">
9
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
10
+ <meta name="viewport" content="width=device-width, initial-scale=1">
11
+ <link rel="icon" href="./assets/images/favicon.ico">
12
+ <link rel="stylesheet" href="./assets/styles/normalize.css">
13
+ <link rel="stylesheet" href="./assets/styles/main.css">
14
+ </head>
15
+
16
+ <body id="print-content">
17
+ <section class="description">
18
+ <img class="description-logo" src="{{ '.' | append: site.styling_options.logo_path }}">
19
+ <div class="description-title">{{ site.title }}</div>
20
+ </section>
21
+
22
+ <div class="site-main" aria-label="Content" >
23
+ {{ content }}
24
+ </div>
25
+ </body>
26
+
27
+ </html>
data/_sass/_base.scss ADDED
@@ -0,0 +1,381 @@
1
+ // Implementation
2
+ // ============================================================================
3
+ @mixin desktop-screen() {
4
+ @media (min-width: $desktop-screen-breakpoint) {
5
+ @content;
6
+ }
7
+ }
8
+ @mixin large-screen() {
9
+ @media (min-width: $large-screen-breakpoint) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ @mixin mobile-screen() {
15
+ @media (max-width: 991.999px) {
16
+ @content;
17
+ }
18
+ }
19
+
20
+ @mixin mobile-only($display: block) {
21
+ display: $display;
22
+ @include desktop-screen {
23
+ display: none;
24
+ }
25
+ }
26
+
27
+ @mixin desktop-only($display: block) {
28
+ display: $display;
29
+ @include mobile-screen {
30
+ display: none;
31
+ }
32
+ }
33
+
34
+ @mixin flex-center() {
35
+ display: flex;
36
+ justify-content: center;
37
+ align-items: center;
38
+ }
39
+
40
+ // Typography Defaults
41
+ // -------------------
42
+ body {
43
+ background-color: $base-background-color;
44
+ color: $primary-text-color;
45
+ font-family: $base-font-family;
46
+ font-size: $base-font-size;
47
+ font-weight: $base-font-weight;
48
+ line-height: $base-line-height;
49
+ word-wrap: break-word;
50
+ }
51
+
52
+ // Headers
53
+ // -------
54
+ h1,
55
+ h2,
56
+ h3,
57
+ h4,
58
+ h5,
59
+ h6 {
60
+ font-family: $header-font-family;
61
+ margin-top: 0;
62
+ margin-bottom: 2rem;
63
+ font-weight: 700;
64
+ color: $header-text-color;
65
+ }
66
+
67
+ h1 {
68
+ font-size: 34px;
69
+ line-height: 1.25;
70
+ letter-spacing: -0.5px;
71
+ }
72
+ h2 {
73
+ font-size: 28px;
74
+ line-height: 1.22;
75
+ letter-spacing: 0;
76
+ }
77
+ h3 {
78
+ font-size: 24px;
79
+ line-height: 1.5;
80
+ letter-spacing: 0;
81
+ }
82
+ h4 {
83
+ font-size: 20px;
84
+ line-height: 1.5;
85
+ letter-spacing: 0;
86
+ }
87
+ h5 {
88
+ font-size: 20px;
89
+ line-height: 1.5;
90
+ letter-spacing: 0;
91
+ }
92
+ h6 {
93
+ font-size: 20px;
94
+ line-height: 1.5;
95
+ letter-spacing: 0;
96
+ }
97
+
98
+ // For text directly under a h1 heading
99
+ // h1 + p {
100
+ // font-size: 20px;
101
+ // }
102
+
103
+ @include mobile-screen {
104
+ body {
105
+ font-size: $mobile-font-size;
106
+ }
107
+ h1 {
108
+ font-size: 30px;
109
+ line-height: 1.25;
110
+ letter-spacing: -0.5px;
111
+ }
112
+ h2 {
113
+ font-size: 24px;
114
+ line-height: 1.22;
115
+ letter-spacing: 0;
116
+ }
117
+ h3 {
118
+ font-size: 20px;
119
+ line-height: 1.5;
120
+ letter-spacing: 0;
121
+ }
122
+ h4 {
123
+ font-size: 18px;
124
+ line-height: 1.5;
125
+ letter-spacing: 0;
126
+ }
127
+ h5 {
128
+ font-size: 18px;
129
+ line-height: 1.5;
130
+ letter-spacing: 0;
131
+ }
132
+ h6 {
133
+ font-size: 18px;
134
+ line-height: 1.5;
135
+ letter-spacing: 0;
136
+ }
137
+ }
138
+
139
+ // Blocks
140
+ // ------
141
+ blockquote,
142
+ figure,
143
+ p,
144
+ pre {
145
+ margin-bottom: $block-spacing;
146
+ }
147
+
148
+ // Lists
149
+ // -----
150
+ dl {
151
+ list-style: none;
152
+ }
153
+ ol,
154
+ ul {
155
+ padding-left: 2em;
156
+ }
157
+ dl {
158
+ padding-left: 0;
159
+ }
160
+ ol,
161
+ ul,
162
+ dl {
163
+ margin-bottom: $block-spacing;
164
+ ol,
165
+ ul,
166
+ dl {
167
+ margin: $item-spacing 0 $item-spacing 2em;
168
+ }
169
+ }
170
+ li,
171
+ dt,
172
+ dd {
173
+ margin-bottom: $item-spacing;
174
+ }
175
+ dd + dt {
176
+ margin-top: $block-spacing;
177
+ }
178
+
179
+ // indentations
180
+ // this is a hack to allow users to create custom lists and indent text
181
+ ul[type="*"] {
182
+ list-style-type: none;
183
+ }
184
+
185
+ // Code
186
+ // ----
187
+ pre {
188
+ // Box
189
+ padding: $item-spacing;
190
+ margin: $item-spacing * 2 0;
191
+ // Layout
192
+ font-size: 90%;
193
+ white-space: pre-wrap;
194
+ word-wrap: break-word;
195
+ // Appearance
196
+ background: $well-background-color;
197
+ border-radius: $base-border-radius;
198
+ }
199
+
200
+ pre > code {
201
+ display: block;
202
+ font-family: $mono-font-family;
203
+ padding: $base-vertical-padding $base-horizontal-padding;
204
+ margin: 0;
205
+ }
206
+
207
+ // Tables
208
+ // ------
209
+ table {
210
+ box-sizing: border-box;
211
+ width: 100%;
212
+ margin-bottom: $block-spacing;
213
+ }
214
+ th,
215
+ td {
216
+ padding: $base-vertical-padding $base-horizontal-padding/2;
217
+ text-align: left;
218
+ border-bottom: 1px solid $divider-color;
219
+ border-right: 1px solid $divider-color;
220
+ }
221
+ th:first-child,
222
+ td:first-child {
223
+ padding-left: 0;
224
+ }
225
+ th:last-child,
226
+ td:last-child {
227
+ padding-right: 0;
228
+ border-right: 0;
229
+ }
230
+
231
+ // Links
232
+ // -----
233
+ a {
234
+ text-decoration: none;
235
+ &:hover {
236
+ text-decoration: underline;
237
+ }
238
+ }
239
+
240
+ // Forms
241
+ // -----
242
+ form {
243
+ margin-bottom: $block-spacing;
244
+ }
245
+ // Common Input Box Design
246
+ input[type="email"],
247
+ input[type="number"],
248
+ input[type="search"],
249
+ input[type="text"],
250
+ input[type="tel"],
251
+ input[type="url"],
252
+ input[type="password"],
253
+ textarea,
254
+ select {
255
+ // Box
256
+ box-sizing: border-box;
257
+ height: 2em;
258
+ padding: $base-vertical-padding $base-horizontal-padding;
259
+ border: 1px solid $divider-color;
260
+ // Appearance
261
+ background-color: transparent;
262
+ border-radius: $base-border-radius;
263
+ box-shadow: none;
264
+ }
265
+ // Block Inputs
266
+ textarea,
267
+ input,
268
+ select,
269
+ legend,
270
+ fieldset {
271
+ margin-bottom: $item-spacing;
272
+ }
273
+ // Specific Element Tweaks
274
+ fieldset {
275
+ padding: 0;
276
+ border: none;
277
+ }
278
+ legend {
279
+ display: block;
280
+ }
281
+ textarea {
282
+ display: block;
283
+ min-height: 5em;
284
+ }
285
+ // Removes awkward default styles on some inputs for iOS
286
+ input[type="email"],
287
+ input[type="number"],
288
+ input[type="search"],
289
+ input[type="text"],
290
+ input[type="tel"],
291
+ input[type="url"],
292
+ input[type="password"],
293
+ textarea {
294
+ -webkit-appearance: none;
295
+ -moz-appearance: none;
296
+ appearance: none;
297
+ }
298
+
299
+ // Buttons
300
+ // -------
301
+ button,
302
+ input[type="submit"],
303
+ input[type="reset"],
304
+ input[type="button"] {
305
+ // Box
306
+ display: inline-block;
307
+ padding: calc(#{$base-vertical-padding} * 1.5) calc(#{$base-horizontal-padding} * 2);
308
+ margin-bottom: $item-spacing;
309
+ border: 1px solid $primary-brand-color;
310
+ // Layout
311
+ line-height: inherit;
312
+ text-align: center;
313
+ white-space: nowrap;
314
+ // Appearance
315
+ background-color: $primary-brand-color;
316
+ border-radius: $base-border-radius;
317
+
318
+ color: white;
319
+ cursor: pointer;
320
+ outline: none;
321
+ text-decoration: none;
322
+ text-transform: uppercase;
323
+ font-size: $button-font-size;
324
+ letter-spacing: 1.6px;
325
+
326
+ @include mobile-screen {
327
+ font-size: $mobile-button-font-size;
328
+ }
329
+ }
330
+ button:hover,
331
+ input[type="submit"]:hover,
332
+ input[type="reset"]:hover,
333
+ input[type="button"]:hover,
334
+ button:focus,
335
+ input[type="submit"]:focus,
336
+ input[type="reset"]:focus,
337
+ input[type="button"]:focus {
338
+ border-color: darken($primary-brand-color, 5%);
339
+ background-color: darken($primary-brand-color, 5%);
340
+ }
341
+ button:active,
342
+ input[type="submit"]:active,
343
+ input[type="reset"]:active,
344
+ input[type="button"]:active {
345
+ border-color: darken($primary-brand-color, 10%);
346
+ background-color: darken($primary-brand-color, 10%);
347
+ }
348
+
349
+ // Horizontal Rule
350
+ // ---------------
351
+ hr {
352
+ margin-top: $block-spacing * 2;
353
+ margin-bottom: $block-spacing * 2;
354
+ }
355
+
356
+ // Images
357
+ // ------
358
+ img {
359
+ max-width: 100%;
360
+ }
361
+
362
+ // Links
363
+ a {
364
+ color: $primary-brand-color;
365
+ font-size: $base-font-size;
366
+
367
+ @include mobile-screen {
368
+ font-size: $mobile-font-size;
369
+ }
370
+ }
371
+
372
+ .flex {
373
+ display: flex;
374
+ }
375
+
376
+ .desktop {
377
+ @include desktop-only();
378
+ }
379
+ .mobile {
380
+ @include mobile-only();
381
+ }
@@ -0,0 +1,87 @@
1
+ // Variables
2
+ // ============================================================================
3
+ // Fonts
4
+ $base-font-family: "Noto Sans", "Times New Roman", sans-serif;
5
+ $header-font-family: "Noto Serif", "Arial", serif;
6
+ $base-font-size: 17px;
7
+ $button-font-size: 16px;
8
+ $mobile-font-size: 15px;
9
+ $mobile-button-font-size: 14px;
10
+ $nav-font-size: 15px;
11
+ $base-font-weight: 400;
12
+ $mono-font-family: "Fira Mono", monospace;
13
+ // Colors
14
+ $slate-gray: #454f5b;
15
+ $primary-text-color: $slate-gray;
16
+ $secondary-text-color: #999;
17
+ $header-text-color: $slate-gray;
18
+ $subheader-text-color: #9b9b9b;
19
+ $selected-text-color: #000;
20
+ $divider-color: #d8d8d8;
21
+ $base-background-color: #fff;
22
+ $border-color: #edeced;
23
+ $well-background-color: #eeeeee;
24
+ $search-box-background-color: #f3f3f3;
25
+ $nav-text-color: #a3a9ad;
26
+ $nav-background-hover-color: rgba($primary-brand-color, 0.1);
27
+ $dark-button-color: #272e36;
28
+ $highlight-color: #FFF59D;
29
+ // Spacing
30
+ // 1em -> 14px
31
+ $base-line-height: 2;
32
+ $base-horizontal-padding: 1em;
33
+ $base-vertical-padding: 0.5em;
34
+ $block-spacing: 1.5rem;
35
+ $item-spacing: 1rem;
36
+ $inline-spacing: 0.2em;
37
+ $base-border-radius: 0.2rem;
38
+ // Breakpoints, if this breakpoint is changed, be sure to change those in the .js files too
39
+ $desktop-screen-breakpoint: 992px;
40
+ $large-screen-breakpoint: 1400px;
41
+
42
+ // Variables
43
+ // ============================================================================
44
+ $small-spacing: 10px;
45
+ $spacing: 12px;
46
+ $med-spacing: 1.5 * $spacing;
47
+ $large-spacing: 2 * $spacing;
48
+ $desktop-spacing: 3.25 * $large-spacing;
49
+ $site-padding: 27px;
50
+ $max-content-width: 864px;
51
+ $body-padding: calc((100vw - 420px - #{$max-content-width}) / 2);
52
+ $body-full-view-padding: calc((100vw - #{$max-content-width}) / 2);
53
+ $body-sidebar-right-padding: 50px;
54
+
55
+ $site-header-height: 80px;
56
+ $mobile-site-header-height: 60px;
57
+ $doc-header-height: 80px;
58
+ $toggled-doc-header-height: 80px;
59
+ $site-nav-collapse-duration: 0.2s;
60
+ $site-nav-collapse-timing: ease-out;
61
+ $site-nav-width: 30vw;
62
+ $back-to-docs-width: $doc-header-height - 1px;
63
+ $mobile-back-to-docs-width: $mobile-site-header-height - 1px;
64
+
65
+ $max-site-nav-width: 420px;
66
+ $site-nav-shadow-inset: inset -7px 0 13px -5px rgba(0, 0, 0, 0.15);
67
+ $site-nav-shadow-outset: 7px 0 13px 5px rgba(0, 0, 0, 0.15);
68
+ $site-doc-header-height: $site-header-height + $doc-header-height;
69
+ $mobile-site-doc-header-height: $mobile-site-header-height + $doc-header-height;
70
+
71
+ $toolbar-button-height: 50px;
72
+ $toolbar-container-height: calc(#{$toolbar-button-height} * 3);
73
+
74
+ $fab-button-size: 50px;
75
+ $fab-transtition-duration: 0.2s;
76
+
77
+ // z-index
78
+ // ============================================================================
79
+ $site-main-z-index: 0;
80
+ $desktop-navigation-z-index: 1;
81
+ $doc-header-z-index: 2;
82
+ $fab-z-index: 3;
83
+ $fab-trigger-z-index: 3;
84
+ $site-header-z-index: 10;
85
+ $mobile-navigation-z-index: 11;
86
+ $search-results-z-index: 12;
87
+ $toolbar-z-index: 12;