jekyll-theme-open-project 1.1.27 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  layout: default
3
+ html-class: docs-page
3
4
  ---
4
5
 
5
6
  {% include item-doc-page.html items=site.software item_type='software' %}
data/_sass/headroom.scss CHANGED
@@ -1,6 +1,6 @@
1
1
  .headroom {
2
2
  will-change: transform;
3
- transition: transform 200ms linear;
3
+ transition: transform .1s linear;
4
4
  }
5
5
  .headroom--pinned {
6
6
  transform: translateY(0%);
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  body.with-headroom {
13
- &.layout--docs, &.layout--product, &.layout--spec {
13
+ &.docs-page {
14
14
  .underlay.header {
15
15
  position: fixed;
16
16
  top: 0;
@@ -665,11 +665,7 @@ main {
665
665
  &.layout--spec > main > article {
666
666
  @extend .main-article;
667
667
  }
668
- &.layout--spec > main,
669
- &.layout--product > main,
670
- &.layout--docs > main {
671
- > .documentation:only-child {
672
- @include docs-page($primary-dark-color);
673
- }
668
+ &.docs-page > main {
669
+ @include docs-page($primary-dark-color);
674
670
  }
675
671
  }
@@ -1,5 +1,7 @@
1
1
  @import 'open-project-mixins';
2
2
 
3
+ $easeOutCirc: cubic-bezier(0.075, 0.82, 0.165, 1);
4
+
3
5
  body {
4
6
  font-family: $font-family;
5
7
  font-size: 15px;
@@ -32,14 +34,13 @@ a {
32
34
 
33
35
  > .item {
34
36
  margin-right: $gutter;
35
- flex: 1;
36
37
 
37
38
  &.featured-item::before {
38
39
  // Reposition featured item label for grid layout
39
40
  // !important overrides .item-card which ends up with higher specificity
40
- top: -1em !important;
41
- left: 30px !important; // Matches corresponding item card padding
42
- right: auto !important;
41
+ top: 0 !important;
42
+ right: 0 !important;
43
+ left: auto !important;
43
44
  bottom: auto !important;
44
45
  }
45
46
  }
@@ -168,6 +168,7 @@ body > .underlay > footer {
168
168
 
169
169
  body > .underlay.footer {
170
170
  background: #2E333B;
171
+ z-index: 5;
171
172
  }
172
173
 
173
174
  body > .underlay > header {
@@ -188,73 +188,47 @@
188
188
  }
189
189
 
190
190
  @mixin docs-page($primary-dark-color) {
191
- $side-margin: 16px; // for external links
192
-
193
- flex: 1;
194
- display: flex;
195
- flex-flow: column nowrap;
196
-
197
- .external-links {
198
- margin-left: -$side-margin;
199
-
200
- ul.section-items {
201
- @include reset-list();
202
- }
203
-
204
- > .section-items > .item {
205
- margin-bottom: 10px;
206
- margin-right: -$side-margin;
191
+ > header.documentation-header,
192
+ > section.documentation {
193
+ align-self: stretch;
194
+ width: auto;
195
+ }
207
196
 
208
- > a {
209
- @include static-link-color(#444);
210
- background-color: #F7F7F7;
197
+ > header.documentation-header {
198
+ display: flex;
199
+ flex-flow: row nowrap;
200
+ align-items: center;
201
+ padding: 0 0 0 2em;
202
+ position: fixed;
203
+ left: 0;
204
+ right: 0;
205
+ z-index: 4;
211
206
 
212
- display: block;
213
- font-weight: bold;
214
- padding: 4px $side-margin 4px $side-margin;
215
- border-radius: 10px;
207
+ transition: background .1s linear, border-bottom .1s linear, transform .1s linear;
216
208
 
217
- display: flex;
218
- flex-flow: row nowrap;
209
+ cursor: pointer;
219
210
 
220
- .lbl {
221
- flex: 1;
222
- white-space: nowrap;
223
- text-overflow: ellipsis;
224
- overflow: hidden;
225
- }
226
- .ico {
227
- flex-shrink: 0;
228
- text-align: right;
229
- width: 32px;
230
- padding-right: 10px;
231
- }
232
- .ico-ext {
233
- flex-shrink: 0;
234
- text-align: right;
235
- width: 32px;
236
- padding-left: 10px;
237
- padding-right: 10px;
238
- }
239
- }
240
- }
241
- }
211
+ .section-title {
212
+ flex: 1;
213
+ flex-grow: 0;
242
214
 
243
- > .docs-nav {
244
- padding-top: 50px;
245
- background: transparent;
215
+ flex-grow: 1;
216
+ transition: transform .2s ease-out;
217
+ opacity: 1;
218
+ overflow: hidden;
246
219
 
247
- > .sidebar-header, > section {
248
- margin-bottom: 15px;
220
+ text-overflow: ellipsis;
221
+ font-weight: bold;
249
222
  }
250
223
 
251
- > .sidebar-header {
224
+ .nav-header {
225
+ padding: 10px 2em 10px 2em;
252
226
  display: flex;
253
227
  flex-flow: row nowrap;
254
228
  align-items: center;
229
+ transition: background .6s $easeOutCirc;
255
230
 
256
231
  .title {
257
- flex: 1;
258
232
  white-space: nowrap;
259
233
  line-height: 1;
260
234
  font-weight: normal;
@@ -264,300 +238,376 @@
264
238
 
265
239
  a { @include static-link-color(#444); }
266
240
  }
241
+
267
242
  .logo-container {
243
+ $logoSize: 32px;
244
+
268
245
  margin-right: 10px;
246
+ height: $logoSize;
247
+ width: $logoSize;
269
248
 
270
249
  .logo > :only-child {
271
- width: 32px;
272
- height: 32px;
250
+ width: $logoSize;
251
+ height: $logoSize;
273
252
  }
274
253
  }
254
+
255
+ .nav-toggle-icon {
256
+ margin-left: 1em;
257
+
258
+ > .close { display: none; }
259
+ > .open { display: block; }
260
+ }
275
261
  }
276
262
 
277
- > section {
278
- > .section-title {
279
- font-size: 20px;
280
- font-weight: bold;
281
- margin: 0;
282
- line-height: 1.8;
263
+ &.nav-expanded {
264
+ .nav-header {
265
+ background-color: #f7f7f7;
283
266
  }
267
+ .nav-header .nav-toggle-icon {
268
+ > .open { display: none; }
269
+ > .close { display: block; }
270
+ }
271
+ }
284
272
 
285
- > .section-items {
286
- @include reset-list;
273
+ .item-type {
274
+ display: none;
275
+ margin-right: 10px;
276
+ }
287
277
 
288
- line-height: 2;
278
+ &.headroom--not-top {
279
+ background: rgba(white, 0.9);
280
+ box-shadow: rbga(white, 0.9) 0 20px 30px;
281
+ }
289
282
 
290
- > .item {
291
- font-size: 15px;
292
- font-weight: normal;
283
+ &.headroom--top {
284
+ .section-title {
285
+ transform: translateY(-5em);
286
+ transition: none; // To avoid flashing on initial page open
287
+ }
288
+ }
293
289
 
294
- &.selected {
295
- span {
296
- font-weight: bold;
297
- color: $primary-dark-color;
298
- }
299
- }
300
- a { @include static-link-color(#444); }
301
- }
290
+ &.unpinned {
291
+ .item-type, .subsection {
292
+ display: inline-block;
302
293
  }
303
294
  }
304
295
  }
305
296
 
306
- > article {
307
- @extend .main-article;
297
+ > section.documentation {
298
+ $external-links-side-margin: 16px; // for external links
299
+
308
300
  flex: 1;
301
+ display: flex;
302
+ flex-flow: column nowrap;
303
+
304
+ overflow-x: auto; // on narrow screens, code snippets & tables may overflow width
309
305
 
310
- background: white;
311
- z-index: 1;
306
+ .docs-nav {
307
+ $navFlexShare: 20%;
312
308
 
313
- > header > nav,
314
- > footer > nav {
315
- line-height: 1;
309
+ background: transparent;
310
+ flex-basis: 20%;
316
311
 
317
- button, a {
318
- border: 0;
319
- padding: 0;
320
- margin-right: 1em;
312
+ transition: flex-basis .6s $easeOutCirc;
321
313
 
322
- font-family: inherit;
323
- font-size: 80%;
324
- font-weight: bold;
314
+ > section {
315
+ margin-bottom: 15px;
316
+ }
325
317
 
326
- background: white;
327
- color: $primary-dark-color;
328
- cursor: pointer;
318
+ // New style: Nav with nested items
319
+ > ul.nav-items {
320
+ $sidePadding: 2em;
329
321
 
330
- text-decoration: none;
322
+ @include reset-list;
331
323
 
332
- &:last-child {
333
- margin-right: 0;
334
- }
324
+ position: fixed;
325
+ overflow-y: auto;
326
+ bottom: 0;
327
+ right: 0;
335
328
 
336
- .ico-ext {
337
- margin-left: .5em;
338
- }
339
- }
340
- }
329
+ padding: 0 $sidePadding;
341
330
 
342
- > header > nav {
343
- margin-top: -2em;
344
- margin-bottom: 4em;
345
- }
331
+ z-index: 5;
332
+ background: #f7f7f7;
333
+ box-shadow: black -20px 0px 60px -45px;
346
334
 
347
- > footer > nav {
348
- margin-top: 2em;
349
- @media screen and (min-width: $bigscreen-breakpoint) {
350
- margin-left: 2em;
351
- }
352
- }
335
+ transition:
336
+ // Collapsing of header when scrolling (w/headroom):
337
+ top .1s linear,
338
+ // Toggling sidebar open/closed
339
+ transform .6s $easeOutCirc,
340
+ opacity .6s $easeOutCirc,
341
+ box-shadow .6s $easeOutCirc;
353
342
 
354
- > header {
355
- > .title {
356
343
  @media screen and (min-width: $bigscreen-breakpoint) {
357
- display: flex;
358
- flex-flow: row nowrap;
344
+ max-width: calc(#{$navFlexShare} - #{$sidePadding});
359
345
  }
360
346
 
361
- border-bottom: 2px solid $primary-dark-color;
362
- padding-top: 70px;
363
- padding-bottom: 20px;
364
-
365
- > .logo-container {
366
- margin-right: 22px;
347
+ li.item {
348
+ font-size: 15px;
349
+ font-weight: normal;
367
350
 
368
- > :only-child {
369
- width: 58px;
370
- height: 58px;
351
+ &.selected {
352
+ span {
353
+ font-weight: bold;
354
+ color: $primary-dark-color;
355
+ }
371
356
  }
357
+ a { @include static-link-color(#444); }
372
358
  }
373
359
 
374
- .text {
375
- flex: 1;
376
- font-size: 36px;
377
-
378
- margin: 0;
379
- font-weight: 500;
360
+ > li.item {
361
+ > .item-title {
362
+ font-size: 20px;
363
+ font-weight: bold;
364
+ margin: 0;
365
+ line-height: 1.8;
366
+ }
367
+ > ul {
368
+ @include reset-list;
369
+ line-height: 2;
370
+ }
380
371
  }
381
372
  }
382
- .lead {
383
- font-weight: normal;
384
- font-size: 20px;
385
- }
386
373
  }
387
374
 
388
- > .body {
389
- @include asciidoc-markup($primary-dark-color);
390
- }
391
- }
375
+ > article {
376
+ @extend .main-article;
392
377
 
393
- &.docs-landing {
394
- flex-direction: column-reverse;
378
+ margin: 0 auto;
379
+ flex: 1;
395
380
 
396
- .external-links > .section-items > .item {
397
- margin: 0 $side-margin $side-margin $side-margin;
381
+ background: white;
382
+ z-index: 1;
398
383
 
399
- > a {
400
- @include static-link-color(#fff);
401
- background-color: $primary-dark-color;
402
- }
403
- }
384
+ > header, > footer {
385
+ nav {
386
+ line-height: 1;
404
387
 
405
- > .docs-nav {
406
- padding-top: 0;
407
- }
388
+ button, a {
389
+ border: 0;
390
+ padding: 0;
391
+ margin-right: 1em;
408
392
 
409
- > article {
410
- max-width: none; // Overrides .main-article base style
393
+ font-family: inherit;
394
+ font-size: 80%;
395
+ font-weight: bold;
396
+
397
+ background: white;
398
+ color: $primary-dark-color;
399
+ cursor: pointer;
400
+
401
+ text-decoration: none;
402
+
403
+ &:last-child {
404
+ margin-right: 0;
405
+ }
411
406
 
412
- > header > .title {
413
- border-bottom-width: 0;
414
- padding-bottom: 0;
407
+ .ico-ext {
408
+ margin-left: .5em;
409
+ }
410
+ }
411
+ }
415
412
  }
416
- }
417
- }
418
413
 
419
- &.specs {
420
- > article {
421
- max-width: none;
422
- }
423
- }
414
+ > header {
415
+ > nav {
416
+ margin-top: -2em;
417
+ margin-bottom: 4em;
418
+ }
419
+ > .title {
420
+ @media screen and (min-width: $bigscreen-breakpoint) {
421
+ display: flex;
422
+ flex-flow: row nowrap;
423
+ }
424
424
 
425
- @media screen and (min-width: $bigscreen-breakpoint) {
426
- flex-flow: row nowrap;
425
+ border-bottom: 2px solid $primary-dark-color;
426
+ padding-top: 70px;
427
+ padding-bottom: 20px;
427
428
 
428
- > .docs-nav {
429
- flex: 1;
430
- flex-grow: 1;
431
- padding-top: 70px;
429
+ > .logo-container {
430
+ margin-right: 22px;
432
431
 
433
- > section > .section-items {
434
- padding-right: 40px;
435
- }
436
- }
432
+ > :only-child {
433
+ width: 58px;
434
+ height: 58px;
435
+ }
436
+ }
437
437
 
438
- > article {
439
- flex: 2;
440
- border-left: #F7F7F7 2px solid;
438
+ .text {
439
+ flex: 1;
440
+ font-size: 36px;
441
+
442
+ margin: 0;
443
+ font-weight: 500;
444
+ }
445
+ }
446
+ .lead {
447
+ font-weight: normal;
448
+ font-size: 20px;
449
+ }
450
+ }
441
451
 
442
- > header,
443
452
  > .body {
444
- margin-left: 60px;
453
+ @include asciidoc-markup($primary-dark-color);
454
+ }
455
+
456
+ > footer > nav {
457
+ margin-top: 2em;
458
+ @media screen and (min-width: $bigscreen-breakpoint) {
459
+ margin-left: 2em;
460
+ }
445
461
  }
446
462
  }
447
463
 
448
- &.docs-landing {
449
- flex-direction: column-reverse;
464
+ .docs-nav,
465
+ &.docs-landing > article > header {
466
+ .external-links {
467
+ margin-left: -$external-links-side-margin;
450
468
 
451
- > article {
452
- border-left-width: 0;
469
+ ul.nav-items {
470
+ @include reset-list();
471
+ }
472
+
473
+ > .nav-items > .item {
474
+ margin-bottom: 10px;
475
+ margin-right: -$external-links-side-margin;
476
+
477
+ > a {
478
+ @include static-link-color(#444);
479
+ background-color: #F7F7F7;
480
+
481
+ display: block;
482
+ font-weight: bold;
483
+ padding: 4px 0 4px 0;
484
+ border-radius: 10px;
453
485
 
454
- .external-links {
455
- > .section-items {
456
486
  display: flex;
457
487
  flex-flow: row nowrap;
458
- justify-content: space-between;
459
488
 
460
- > * {
489
+ .lbl {
461
490
  flex: 1;
491
+ white-space: nowrap;
492
+ text-overflow: ellipsis;
493
+ overflow: hidden;
494
+ }
495
+ .ico {
496
+ flex-shrink: 0;
497
+ text-align: right;
498
+ width: 32px;
499
+ padding-right: 10px;
500
+ }
501
+ .ico-ext {
502
+ flex-shrink: 0;
503
+ text-align: right;
504
+ width: 32px;
505
+ padding-left: 10px;
506
+ padding-right: 10px;
462
507
  }
463
508
  }
464
509
  }
510
+ }
511
+ }
465
512
 
466
- > header,
467
- > .body {
468
- margin-left: 0;
513
+ &.docs-landing > article {
514
+ max-width: none; // Overrides .main-article base style
515
+
516
+ > header {
517
+ .external-links > .nav-items > .item > a {
518
+ @include static-link-color(#fff);
519
+ background-color: $primary-dark-color;
469
520
  }
470
521
 
471
- @media screen and (min-width: $bigscreen-breakpoint) {
472
- > .body {
473
- padding-top: 70px;
474
- }
522
+ > .title {
523
+ border-bottom-width: 0;
524
+ padding-bottom: 0;
475
525
  }
476
526
  }
477
- }
478
- }
479
-
480
- &.with-expandable-toc {
481
- // Is enabled by a script.
482
527
 
483
- position: relative;
484
-
485
- > article {
486
- border-left-width: 0;
487
- padding-top: 2em;
528
+ ul.nav-items {
529
+ @include reset-list;
530
+ font-size: 15px;
531
+ }
488
532
 
489
- > header, > .body {
490
- margin-left: 0;
533
+ > ul.nav-items > li {
534
+ > .item-title {
535
+ font-size: 20px;
536
+ font-weight: bold;
537
+ margin: 0;
538
+ line-height: 1.8;
539
+ }
540
+ ul {
541
+ line-height: 2;
542
+ }
491
543
  }
492
544
  }
493
545
 
494
- > .docs-nav {
495
- z-index: 4;
546
+ &.specs > article {
547
+ max-width: none; // Overrides .main-article base style
548
+ }
496
549
 
497
- &.top-expandable {
498
- border-bottom: 1px solid silver;
499
- z-index: 4;
550
+ @media screen and (min-width: $bigscreen-breakpoint) {
551
+ flex-flow: row nowrap;
552
+ flex-direction: row-reverse;
500
553
 
501
- position: fixed;
502
- left: 0;
503
- right: 0;
554
+ > article {
555
+ flex: 2;
556
+ }
504
557
 
505
- padding-top: 0;
506
- padding-left: 2em;
507
- padding-right: 2em;
558
+ > .docs-nav {
559
+ padding: 70px 0 0 0;
560
+ }
508
561
 
509
- transition:
510
- background 200ms cubic-bezier(0.23, 1, 0.32, 1),
511
- transform 200ms linear;
562
+ &.docs-landing {
563
+ flex-direction: column-reverse;
512
564
 
513
- overflow: hidden;
565
+ > article {
566
+ border-left-width: 0;
514
567
 
515
- .sidebar-header {
516
- background: white;
517
- cursor: pointer;
518
- padding-top: 10px;
519
- padding-bottom: 10px;
568
+ .external-links {
569
+ > .nav-items {
570
+ display: flex;
571
+ flex-flow: row nowrap;
572
+ justify-content: space-between;
520
573
 
521
- &:after {
522
- content: "▼";
574
+ > * {
575
+ flex: 1;
576
+ }
577
+ }
523
578
  }
524
579
 
525
- .item-type {
526
- display: none;
527
- margin-right: 10px;
528
- }
529
- .title {
530
- flex-grow: 0;
531
- }
532
- .section-title {
533
- margin-left: 10px;
534
- margin-right: 10px;
535
- overflow: hidden;
536
- text-overflow: ellipsis;
537
- flex-grow: 1;
538
- transition: transform .2s ease-out;
580
+ > header,
581
+ > .body {
582
+ margin-left: 0;
539
583
  }
540
584
 
541
- &.headroom--top {
542
- .section-title {
543
- transform: translateY(-5em);
544
- transition: none;
585
+ @media screen and (min-width: $bigscreen-breakpoint) {
586
+ > .body {
587
+ padding-top: 70px;
545
588
  }
546
589
  }
590
+ }
591
+ }
547
592
 
548
- &.unpinned {
549
- .item-type, .subsection {
550
- display: inline-block;
551
- }
593
+ &.with-collapsed-toc {
594
+ > article {
595
+ > header, > .body {
596
+ margin-right: 0;
552
597
  }
553
598
  }
599
+ }
600
+ }
601
+
602
+ &.with-collapsed-toc {
603
+ position: relative;
604
+
605
+ > .docs-nav {
606
+ flex-basis: 0;
554
607
 
555
- &.expanded {
556
- box-shadow: 0px -5px 20px 0 rgba(black, 0.4);
557
- z-index: 6;
558
- overflow-y: scroll;
559
- background: white;
560
- border-bottom: none;
608
+ .nav-items {
609
+ transform: translateX(100%);
610
+ opacity: 0;
561
611
  }
562
612
  }
563
613
  }