1<!DOCTYPE html> 2 3<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> 4 5<head> 6 <meta charset="utf-8"/> 7 <meta name="viewport" content="width=device-width, initial-scale=1"/> 8 <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/> 9 <meta name="generator" content="distill" /> 10 11 <style type="text/css"> 12 /* Hide doc at startup (prevent jankiness while JS renders/transforms) */ 13 body { 14 visibility: hidden; 15 } 16 </style> 17 18 <!--radix_placeholder_import_source--> 19 <!--/radix_placeholder_import_source--> 20 21<style type="text/css">code{white-space: pre;}</style> 22<style type="text/css" data-origin="pandoc"> 23pre > code.sourceCode { white-space: pre; position: relative; } 24pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } 25pre > code.sourceCode > span:empty { height: 1.2em; } 26.sourceCode { overflow: visible; } 27code.sourceCode > span { color: inherit; text-decoration: inherit; } 28div.sourceCode { margin: 1em 0; } 29pre.sourceCode { margin: 0; } 30@media screen { 31div.sourceCode { overflow: auto; } 32} 33@media print { 34pre > code.sourceCode { white-space: pre-wrap; } 35pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } 36} 37pre.numberSource code 38 { counter-reset: source-line 0; } 39pre.numberSource code > span 40 { position: relative; left: -4em; counter-increment: source-line; } 41pre.numberSource code > span > a:first-child::before 42 { content: counter(source-line); 43 position: relative; left: -1em; text-align: right; vertical-align: baseline; 44 border: none; display: inline-block; 45 -webkit-touch-callout: none; -webkit-user-select: none; 46 -khtml-user-select: none; -moz-user-select: none; 47 -ms-user-select: none; user-select: none; 48 padding: 0 4px; width: 4em; 49 color: #aaaaaa; 50 } 51pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } 52div.sourceCode 53 { color: #00769e; background-color: #f1f3f5; } 54@media screen { 55pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } 56} 57code span { color: #00769e; } /* Normal */ 58code span.al { color: #ad0000; } /* Alert */ 59code span.an { color: #5e5e5e; } /* Annotation */ 60code span.at { color: #657422; } /* Attribute */ 61code span.bn { color: #ad0000; } /* BaseN */ 62code span.bu { } /* BuiltIn */ 63code span.cf { color: #00769e; } /* ControlFlow */ 64code span.ch { color: #20794d; } /* Char */ 65code span.cn { color: #8f5902; } /* Constant */ 66code span.co { color: #5e5e5e; } /* Comment */ 67code span.cv { color: #5e5e5e; font-style: italic; } /* CommentVar */ 68code span.do { color: #5e5e5e; font-style: italic; } /* Documentation */ 69code span.dt { color: #ad0000; } /* DataType */ 70code span.dv { color: #ad0000; } /* DecVal */ 71code span.er { color: #ad0000; } /* Error */ 72code span.ex { } /* Extension */ 73code span.fl { color: #ad0000; } /* Float */ 74code span.fu { color: #4758ab; } /* Function */ 75code span.im { } /* Import */ 76code span.in { color: #5e5e5e; } /* Information */ 77code span.kw { color: #00769e; } /* Keyword */ 78code span.op { color: #5e5e5e; } /* Operator */ 79code span.ot { color: #00769e; } /* Other */ 80code span.pp { color: #ad0000; } /* Preprocessor */ 81code span.sc { color: #5e5e5e; } /* SpecialChar */ 82code span.ss { color: #20794d; } /* SpecialString */ 83code span.st { color: #20794d; } /* String */ 84code span.va { color: #111111; } /* Variable */ 85code span.vs { color: #20794d; } /* VerbatimString */ 86code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */ 87</style> 88 89 90 <!--radix_placeholder_meta_tags--> 91 <title>Elizabeth Stanny: Posts</title> 92 93 94 95 96 <!-- https://developers.facebook.com/docs/sharing/webmasters#markup --> 97 <meta property="og:title" content="Elizabeth Stanny: Posts"/> 98 <meta property="og:type" content="article"/> 99 <meta property="og:locale" content="en_US"/> 100 <meta property="og:site_name" content="Elizabeth Stanny"/> 101 102 <!-- https://dev.twitter.com/cards/types/summary --> 103 <meta property="twitter:card" content="summary"/> 104 <meta property="twitter:title" content="Elizabeth Stanny: Posts"/> 105 106 <!--/radix_placeholder_meta_tags--> 107 <!--radix_placeholder_rmarkdown_metadata--> 108 109
109<script type="text/json" id="radix-rmarkdown-metadata"> 110 {"type":"list","attributes":{"names":{"type":"character","attributes":{},"value":["title","site","listing"]}},"value":[{"type":"character","attributes":{},"value":["Posts"]},{"type":"character","attributes":{},"value":["distill::distill_website"]},{"type":"character","attributes":{},"value":["posts"]}]} 111 </script>
111 112 <!--/radix_placeholder_rmarkdown_metadata--> 113 <!--radix_placeholder_navigation_in_header--> 114 <meta name="distill:offset" content=""/> 115 116
116<script type="application/javascript"> 117 118 window.headroom_prevent_pin = false; 119 120 window.document.addEventListener("DOMContentLoaded", function (event) { 121 122 // initialize headroom for banner 123 var header = $('header').get(0); 124 var headerHeight = header.offsetHeight; 125 var headroom = new Headroom(header, { 126 tolerance: 5, 127 onPin : function() { 128 if (window.headroom_prevent_pin) { 129 window.headroom_prevent_pin = false; 130 headroom.unpin(); 131 } 132 } 133 }); 134 headroom.init(); 135 if(window.location.hash) 136 headroom.unpin(); 137 $(header).addClass('headroom--transition'); 138 139 // offset scroll location for banner on hash change 140 // (see: https://github.com/WickyNilliams/headroom.js/issues/38) 141 window.addEventListener("hashchange", function(event) { 142 window.scrollTo(0, window.pageYOffset - (headerHeight + 25)); 143 }); 144 145 // responsive menu 146 $('.distill-site-header').each(function(i, val) { 147 var topnav = $(this); 148 var toggle = topnav.find('.nav-toggle'); 149 toggle.on('click', function() { 150 topnav.toggleClass('responsive'); 151 }); 152 }); 153 154 // nav dropdowns 155 $('.nav-dropbtn').click(function(e) { 156 $(this).next('.nav-dropdown-content').toggleClass('nav-dropdown-active'); 157 $(this).parent().siblings('.nav-dropdown') 158 .children('.nav-dropdown-content').removeClass('nav-dropdown-active'); 159 }); 160 $("body").click(function(e){ 161 $('.nav-dropdown-content').removeClass('nav-dropdown-active'); 162 }); 163 $(".nav-dropdown").click(function(e){ 164 e.stopPropagation(); 165 }); 166 }); 167 </script>
167 168 169 <style type="text/css"> 170 171 /* Theme (user-documented overrideables for nav appearance) */ 172 173 .distill-site-nav { 174 color: rgba(255, 255, 255, 0.8); 175 background-color: #0F2E3D; 176 font-size: 15px; 177 font-weight: 300; 178 } 179 180 .distill-site-nav a { 181 color: inherit; 182 text-decoration: none; 183 } 184 185 .distill-site-nav a:hover { 186 color: white; 187 } 188 189 @media print { 190 .distill-site-nav { 191 display: none; 192 } 193 } 194 195 .distill-site-header { 196 197 } 198 199 .distill-site-footer { 200 201 } 202 203 204 /* Site Header */ 205 206 .distill-site-header { 207 width: 100%; 208 box-sizing: border-box; 209 z-index: 3; 210 } 211 212 .distill-site-header .nav-left { 213 display: inline-block; 214 margin-left: 8px; 215 } 216 217 @media screen and (max-width: 768px) { 218 .distill-site-header .nav-left { 219 margin-left: 0; 220 } 221 } 222 223 224 .distill-site-header .nav-right { 225 float: right; 226 margin-right: 8px; 227 } 228 229 .distill-site-header a, 230 .distill-site-header .title { 231 display: inline-block; 232 text-align: center; 233 padding: 14px 10px 14px 10px; 234 } 235 236 .distill-site-header .title { 237 font-size: 18px; 238 min-width: 150px; 239 } 240 241 .distill-site-header .logo { 242 padding: 0; 243 } 244 245 .distill-site-header .logo img { 246 display: none; 247 max-height: 20px; 248 width: auto; 249 margin-bottom: -4px; 250 } 251 252 .distill-site-header .nav-image img { 253 max-height: 18px; 254 width: auto; 255 display: inline-block; 256 margin-bottom: -3px; 257 } 258 259 260 261 @media screen and (min-width: 1000px) { 262 .distill-site-header .logo img { 263 display: inline-block; 264 } 265 .distill-site-header .nav-left { 266 margin-left: 20px; 267 } 268 .distill-site-header .nav-right { 269 margin-right: 20px; 270 } 271 .distill-site-header .title { 272 padding-left: 12px; 273 } 274 } 275 276 277 .distill-site-header .nav-toggle { 278 display: none; 279 } 280 281 .nav-dropdown { 282 display: inline-block; 283 position: relative; 284 } 285 286 .nav-dropdown .nav-dropbtn { 287 border: none; 288 outline: none; 289 color: rgba(255, 255, 255, 0.8); 290 padding: 16px 10px; 291 background-color: transparent; 292 font-family: inherit; 293 font-size: inherit; 294 font-weight: inherit; 295 margin: 0;
296 margin-top: 1px; 297 z-index: 2; 298 } 299 300 .nav-dropdown-content { 301 display: none; 302 position: absolute; 303 background-color: white; 304 min-width: 200px; 305 border: 1px solid rgba(0,0,0,0.15); 306 border-radius: 4px; 307 box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1); 308 z-index: 1; 309 margin-top: 2px; 310 white-space: nowrap; 311 padding-top: 4px; 312 padding-bottom: 4px; 313 } 314 315 .nav-dropdown-content hr { 316 margin-top: 4px; 317 margin-bottom: 4px; 318 border: none; 319 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 320 } 321 322 .nav-dropdown-active { 323 display: block; 324 } 325 326 .nav-dropdown-content a, .nav-dropdown-content .nav-dropdown-header { 327 color: black; 328 padding: 6px 24px; 329 text-decoration: none; 330 display: block; 331 text-align: left; 332 } 333 334 .nav-dropdown-content .nav-dropdown-header { 335 display: block; 336 padding: 5px 24px; 337 padding-bottom: 0; 338 text-transform: uppercase; 339 font-size: 14px; 340 color: #999999; 341 white-space: nowrap; 342 } 343 344 .nav-dropdown:hover .nav-dropbtn { 345 color: white; 346 } 347 348 .nav-dropdown-content a:hover { 349 background-color: #ddd; 350 color: black; 351 } 352 353 .nav-right .nav-dropdown-content { 354 margin-left: -45%; 355 right: 0; 356 } 357 358 @media screen and (max-width: 768px) { 359 .distill-site-header a, .distill-site-header .nav-dropdown {display: none;} 360 .distill-site-header a.nav-toggle { 361 float: right; 362 display: block; 363 } 364 .distill-site-header .title { 365 margin-left: 0; 366 } 367 .distill-site-header .nav-right { 368 margin-right: 0; 369 } 370 .distill-site-header { 371 overflow: hidden; 372 } 373 .nav-right .nav-dropdown-content { 374 margin-left: 0; 375 } 376 } 377 378 379 @media screen and (max-width: 768px) { 380 .distill-site-header.responsive {position: relative; min-height: 500px; } 381 .distill-site-header.responsive a.nav-toggle { 382 position: absolute; 383 right: 0; 384 top: 0; 385 } 386 .distill-site-header.responsive a, 387 .distill-site-header.responsive .nav-dropdown { 388 display: block; 389 text-align: left; 390 } 391 .distill-site-header.responsive .nav-left, 392 .distill-site-header.responsive .nav-right { 393 width: 100%; 394 } 395 .distill-site-header.responsive .nav-dropdown {float: none;} 396 .distill-site-header.responsive .nav-dropdown-content {position: relative;} 397 .distill-site-header.responsive .nav-dropdown .nav-dropbtn { 398 display: block; 399 width: 100%; 400 text-align: left; 401 } 402 } 403 404 /* Site Footer */ 405 406 .distill-site-footer { 407 width: 100%; 408 overflow: hidden; 409 box-sizing: border-box; 410 z-index: 3; 411 margin-top: 30px; 412 padding-top: 30px; 413 padding-bottom: 30px; 414 text-align: center; 415 } 416 417 /* Headroom */ 418 419 d-title { 420 padding-top: 6rem; 421 } 422 423 @media print { 424 d-title { 425 padding-top: 4rem; 426 } 427 } 428 429 .headroom { 430 z-index: 1000; 431 position: fixed; 432 top: 0; 433 left: 0; 434 right: 0; 435 } 436 437 .headroom--transition { 438 transition: all .4s ease-in-out; 439 } 440 441 .headroom--unpinned { 442 top: -100px; 443 } 444 445 .headroom--pinned { 446 top: 0; 447 } 448 449 /* adjust viewport for navbar height */ 450 /* helps vertically center bootstrap (non-distill) content */ 451 .min-vh-100 { 452 min-height: calc(100vh - 100px) !important; 453 } 454 455 </style> 456 457
457<script src="site_libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
457 458 <link href="site_libs/font-awesome-5.1.0/css/all.css" rel="stylesheet"/> 459 <link href="site_libs/font-awesome-5.1.0/css/v4-shims.css" rel="stylesheet"/> 460
460<script src="site_libs/headroom-0.9.4/headroom.min.js"></script>
460 461
461<script src="site_libs/autocomplete-0.37.1/autocomplete.min.js"></script>
461 462
462<script src="site_libs/fuse-6.4.1/fuse.min.js"></script>
462 463 464
464<script type="application/javascript"> 465 466 function getMeta(metaName) { 467 var metas = document.getElementsByTagName('meta'); 468 for (let i = 0; i < metas.length; i++) { 469 if (metas[i].getAttribute('name') === metaName) { 470 return metas[i].getAttribute('content'); 471 } 472 } 473 return ''; 474 } 475 476 function offsetURL(url) { 477 var offset = getMeta('distill:offset'); 478 return offset ? offset + '/' + url : url; 479 } 480 481 function createFuseIndex() { 482 483 // create fuse index 484 var options = { 485 keys: [ 486 { name: 'title', weight: 20 }, 487 { name: 'categories', weight: 15 }, 488 { name: 'description', weight: 10 }, 489 { name: 'contents', weight: 5 }, 490 ], 491 ignoreLocation: true, 492 threshold: 0 493 }; 494 var fuse = new window.Fuse([], options); 495 496 // fetch the main search.json 497 return fetch(offsetURL('search.json')) 498 .then(function(response) { 499 if (response.status == 200) { 500 return response.json().then(function(json) { 501 // index main articles 502 json.articles.forEach(function(article) { 503 fuse.add(article); 504 }); 505 // download collections and index their articles 506 return Promise.all(json.collections.map(function(collection) { 507 return fetch(offsetURL(collection)).then(function(response) { 508 if (response.status === 200) { 509 return response.json().then(function(articles) { 510 articles.forEach(function(article) { 511 fuse.add(article); 512 }); 513 }) 514 } else { 515 return Promise.reject( 516 new Error('Unexpected status from search index request: ' + 517 response.status) 518 ); 519 } 520 }); 521 })).then(function() { 522 return fuse; 523 }); 524 }); 525 526 } else { 527 return Promise.reject( 528 new Error('Unexpected status from search index request: ' + 529 response.status) 530 ); 531 } 532 }); 533 } 534 535 window.document.addEventListener("DOMContentLoaded", function (event) { 536 537 // get search element (bail if we don't have one) 538 var searchEl = window.document.getElementById('distill-search'); 539 if (!searchEl) 540 return; 541 542 createFuseIndex() 543 .then(function(fuse) { 544 545 // make search box visible 546 searchEl.classList.remove('hidden'); 547 548 // initialize autocomplete 549 var options = { 550 autoselect: true, 551 hint: false, 552 minLength: 2, 553 }; 554 window.autocomplete(searchEl, options, [{ 555 source: function(query, callback) { 556 const searchOptions = { 557 isCaseSensitive: false, 558 shouldSort: true, 559 minMatchCharLength: 2, 560 limit: 10, 561 }; 562 var results = fuse.search(query, searchOptions); 563 callback(results 564 .map(function(result) { return result.item; }) 565 ); 566 }, 567 templates: { 568 suggestion: function(suggestion) { 569 var img = suggestion.preview && Object.keys(suggestion.preview).length > 0 570 ? `<img src="${offsetURL(suggestion.preview)}"</img>` 571 : ''; 572 var html = ` 573 <div class="search-item"> 574 <h3>${suggestion.title}</h3> 575 <div class="search-item-description"> 576 ${suggestion.description || ''} 577 </div> 578 <div class="search-item-preview"> 579 ${img} 580 </div> 581 </div> 582 `; 583 return html; 584 } 585 } 586 }]).on('autocomplete:selected', function(event, suggestion) { 587 window.location.href = offsetURL(suggestion.path); 588 }); 589 // remove inline display style on autocompleter (we want to 590 // manage responsive display via css) 591 $('.algolia-autocomplete').css("display", ""); 592 }) 593 .catch(function(error) { 594 console.log(error); 595 }); 596 597 }); 598 599 </script>
599 600 601 <style type="text/css"> 602 603 .nav-search { 604 font-size: x-small; 605 } 606 607 /* Algolioa Autocomplete */ 608 609 .algolia-autocomplete { 610 display: inline-block; 611 margin-left: 10px; 612 vertical-align: sub; 613 background-color: white; 614 color: black; 615 padding: 6px; 616 padding-top: 8px; 617 padding-bottom: 0; 618 border-radius: 6px; 619 border: 1px #0F2E3D solid; 620 width: 180px; 621 } 622 623 624 @media screen and (max-width: 768px) { 625 .distill-site-nav .algolia-autocomplete { 626 display: none; 627 visibility: hidden; 628 } 629 .distill-site-nav.responsive .algolia-autocomplete { 630 display: inline-block; 631 visibility: visible; 632 } 633 .distill-site-nav.responsive .algolia-autocomplete .aa-dropdown-menu { 634 margin-left: 0; 635 width: 400px; 636 max-height: 400px; 637 } 638 } 639 640 .algolia-autocomplete .aa-input, .algolia-autocomplete .aa-hint { 641 width: 90%; 642 outline: none; 643 border: none; 644 } 645 646 .algolia-autocomplete .aa-hint { 647 color: #999; 648 } 649 .algolia-autocomplete .aa-dropdown-menu { 650 width: 550px; 651 max-height: 70vh; 652 overflow-x: visible; 653 overflow-y: scroll; 654 padding: 5px; 655 margin-top: 3px; 656 margin-left: -150px; 657 background-color: #fff; 658 border-radius: 5px; 659 border: 1px solid #999; 660 border-top: none; 661 } 662 663 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion { 664 cursor: pointer; 665 padding: 5px 4px; 666 border-bottom: 1px solid #eee; 667 } 668 669 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion:last-of-type { 670 border-bottom: none; 671 margin-bottom: 2px; 672 } 673 674 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item { 675 overflow: hidden; 676 font-size: 0.8em; 677 line-height: 1.4em; 678 } 679 680 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item h3 { 681 font-size: 1rem; 682 margin-block-start: 0; 683 margin-block-end: 5px; 684 } 685 686 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-description { 687 display: inline-block; 688 overflow: hidden; 689 height: 2.8em; 690 width: 80%; 691 margin-right: 4%; 692 } 693 694 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-preview { 695 display: inline-block; 696 width: 15%; 697 } 698 699 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-preview img { 700 height: 3em; 701 width: auto; 702 display: none; 703 } 704 705 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion .search-item-preview img[src] { 706 display: initial; 707 } 708 709 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion.aa-cursor { 710 background-color: #eee; 711 } 712 .algolia-autocomplete .aa-dropdown-menu .aa-suggestion em { 713 font-weight: bold; 714 font-style: normal; 715 } 716 717 </style> 718 719 720 <!--/radix_placeholder_navigation_in_header--> 721 <!--radix_placeholder_distill--> 722 723 <style type="text/css"> 724 725 body { 726 background-color: white; 727 } 728 729 .pandoc-table { 730 width: 100%; 731 } 732 733 .pandoc-table>caption { 734 margin-bottom: 10px; 735 } 736 737 .pandoc-table th:not([align]) { 738 text-align: left; 739 } 740 741 .pagedtable-footer { 742 font-size: 15px; 743 } 744 745 d-byline .byline { 746 grid-template-columns: 2fr 2fr; 747 } 748 749 d-byline .byline h3 { 750 margin-block-start: 1.5em; 751 } 752 753 d-byline .byline .authors-affiliations h3 { 754 margin-block-start: 0.5em; 755 } 756 757 .authors-affiliations .orcid-id { 758 width: 16px; 759 height:16px; 760 margin-left: 4px; 761 margin-right: 4px; 762 vertical-align: middle; 763 padding-bottom: 2px; 764 } 765 766 d-title .dt-tags { 767 margin-top: 1em; 768 grid-column: text; 769 } 770 771 .dt-tags .dt-tag { 772 text-decoration: none; 773 display: inline-block; 774 color: rgba(0,0,0,0.6); 775 padding: 0em 0.4em; 776 margin-right: 0.5em; 777 margin-bottom: 0.4em; 778 font-size: 70%; 779 border: 1px solid rgba(0,0,0,0.2); 780 border-radius: 3px; 781 text-transform: uppercase; 782 font-weight: 500; 783 } 784 785 d-article table.gt_table td, 786 d-article table.gt_table th { 787 border-bottom: none; 788 font-size: 100%; 789 } 790 791 .html-widget { 792 margin-bottom: 2.0em; 793 } 794 795 .l-screen-inset { 796 padding-right: 16px; 797 } 798 799 .l-screen .caption { 800 margin-left: 10px; 801 } 802 803 .shaded { 804 background: rgb(247, 247, 247); 805 padding-top: 20px; 806 padding-bottom: 20px; 807 border-top: 1px solid rgba(0, 0, 0, 0.1); 808 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 809 } 810 811 .shaded .html-widget { 812 margin-bottom: 0; 813 border: 1px solid rgba(0, 0, 0, 0.1); 814 } 815 816 .shaded .shaded-content { 817 background: white; 818 } 819 820 .text-output { 821 margin-top: 0; 822 line-height: 1.5em; 823 } 824 825 .hidden { 826 display: none !important; 827 } 828 829 d-article { 830 padding-top: 2.5rem; 831 padding-bottom: 30px; 832 } 833 834 d-appendix { 835 padding-top: 30px; 836 } 837 838 d-article>p>img { 839 width: 100%; 840 } 841 842 d-article h2 { 843 margin: 1rem 0 1.5rem 0; 844 } 845 846 d-article h3 { 847 margin-top: 1.5rem; 848 } 849 850 d-article iframe { 851 border: 1px solid rgba(0, 0, 0, 0.1); 852 margin-bottom: 2.0em; 853 width: 100%; 854 } 855 856 /* Tweak code blocks */ 857 858 d-article div.sourceCode code, 859 d-article pre code {
860 font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 861 } 862 863 d-article pre, 864 d-article div.sourceCode, 865 d-article div.sourceCode pre { 866 overflow: auto; 867 } 868 869 d-article div.sourceCode { 870 background-color: white; 871 } 872 873 d-article div.sourceCode pre { 874 padding-left: 10px; 875 font-size: 12px; 876 border-left: 2px solid rgba(0,0,0,0.1); 877 } 878 879 d-article pre { 880 font-size: 12px; 881 color: black; 882 background: none; 883 margin-top: 0; 884 text-align: left; 885 white-space: pre; 886 word-spacing: normal; 887 word-break: normal; 888 word-wrap: normal; 889 line-height: 1.5; 890 891 -moz-tab-size: 4; 892 -o-tab-size: 4; 893 tab-size: 4; 894 895 -webkit-hyphens: none; 896 -moz-hyphens: none; 897 -ms-hyphens: none; 898 hyphens: none; 899 } 900 901 d-article pre a { 902 border-bottom: none; 903 } 904 905 d-article pre a:hover { 906 border-bottom: none; 907 text-decoration: underline; 908 } 909 910 d-article details { 911 grid-column: text; 912 margin-bottom: 0.8em; 913 } 914 915 @media(min-width: 768px) { 916 917 d-article pre, 918 d-article div.sourceCode, 919 d-article div.sourceCode pre { 920 overflow: visible !important; 921 } 922 923 d-article div.sourceCode pre { 924 padding-left: 18px; 925 font-size: 14px; 926 } 927 928 d-article pre { 929 font-size: 14px; 930 } 931 932 } 933 934 figure img.external { 935 background: white; 936 border: 1px solid rgba(0, 0, 0, 0.1); 937 box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); 938 padding: 18px; 939 box-sizing: border-box; 940 } 941 942 /* CSS for d-contents */ 943 944 .d-contents { 945 grid-column: text; 946 color: rgba(0,0,0,0.8); 947 font-size: 0.9em; 948 padding-bottom: 1em; 949 margin-bottom: 1em; 950 padding-bottom: 0.5em; 951 margin-bottom: 1em; 952 padding-left: 0.25em; 953 justify-self: start; 954 } 955 956 @media(min-width: 1000px) { 957 .d-contents.d-contents-float { 958 height: 0; 959 grid-column-start: 1; 960 grid-column-end: 4; 961 justify-self: center; 962 padding-right: 3em; 963 padding-left: 2em; 964 } 965 } 966 967 .d-contents nav h3 { 968 font-size: 18px; 969 margin-top: 0; 970 margin-bottom: 1em; 971 } 972 973 .d-contents li { 974 list-style-type: none 975 } 976 977 .d-contents nav > ul { 978 padding-left: 0; 979 } 980 981 .d-contents ul { 982 padding-left: 1em 983 } 984 985 .d-contents nav ul li { 986 margin-top: 0.6em; 987 margin-bottom: 0.2em; 988 } 989 990 .d-contents nav a { 991 font-size: 13px; 992 border-bottom: none; 993 text-decoration: none 994 color: rgba(0, 0, 0, 0.8); 995 } 996 997 .d-contents nav a:hover { 998 text-decoration: underline solid rgba(0, 0, 0, 0.6) 999 } 1000 1001 .d-contents nav > ul > li > a { 1002 font-weight: 600; 1003 } 1004 1005 .d-contents nav > ul > li > ul { 1006 font-weight: inherit; 1007 } 1008 1009 .d-contents nav > ul > li > ul > li { 1010 margin-top: 0.2em; 1011 } 1012 1013 1014 .d-contents nav ul { 1015 margin-top: 0; 1016 margin-bottom: 0.25em; 1017 } 1018 1019 .d-article-with-toc h2:nth-child(2) { 1020 margin-top: 0; 1021 } 1022 1023 1024 /* Figure */ 1025 1026 .figure { 1027 position: relative; 1028 margin-bottom: 2.5em; 1029 margin-top: 1.5em; 1030 } 1031 1032 .figure .caption { 1033 color: rgba(0, 0, 0, 0.6); 1034 font-size: 12px; 1035 line-height: 1.5em; 1036 } 1037 1038 .figure img.external { 1039 background: white; 1040 border: 1px solid rgba(0, 0, 0, 0.1); 1041 box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1); 1042 padding: 18px; 1043 box-sizing: border-box; 1044 } 1045 1046 .figure .caption a { 1047 color: rgba(0, 0, 0, 0.6); 1048 } 1049 1050 .figure .caption b, 1051 .figure .caption strong, { 1052 font-weight: 600; 1053 color: rgba(0, 0, 0, 1.0); 1054 } 1055 1056 /* Citations */ 1057 1058 d-article .citation { 1059 color: inherit; 1060 cursor: inherit; 1061 } 1062 1063 div.hanging-indent{ 1064 margin-left: 1em; text-indent: -1em; 1065 } 1066 1067 /* Citation hover box */ 1068 1069 .tippy-box[data-theme~=light-border] { 1070 background-color: rgba(250, 250, 250, 0.95); 1071 } 1072 1073 .tippy-content > p { 1074 margin-bottom: 0; 1075 padding: 2px; 1076 } 1077 1078 1079 /* Tweak 1000px media break to show more text */ 1080 1081 @media(min-width: 1000px) { 1082 .base-grid, 1083 distill-header, 1084 d-title, 1085 d-abstract, 1086 d-article, 1087 d-appendix, 1088 distill-appendix, 1089 d-byline, 1090 d-footnote-list, 1091 d-citation-list, 1092 distill-footer { 1093 grid-template-columns: [screen-start] 1fr [page-start kicker-start] 80px [middle-start] 50px [text-start kicker-end] 65px 65px 65px 65px 65px 65px 65px 65px [text-end gutter-start] 65px [middle-end] 65px [page-end gutter-end] 1fr [screen-end]; 1094 grid-column-gap: 16px; 1095 } 1096 1097 .grid { 1098 grid-column-gap: 16px; 1099 } 1100 1101 d-article { 1102 font-size: 1.06rem; 1103 line-height: 1.7em; 1104 } 1105 figure .caption, .figure .caption, figure figcaption { 1106 font-size: 13px; 1107 } 1108 } 1109 1110 @media(min-width: 1180px) { 1111 .base-grid, 1112 distill-header, 1113 d-title, 1114 d-abstract, 1115 d-article, 1116 d-appendix, 1117 distill-appendix, 1118 d-byline, 1119 d-footnote-list, 1120 d-citation-list, 1121 distill-footer { 1122 grid-template-columns: [screen-start] 1fr [page-start kicker-start] 60px [middle-start] 60px [text-start kicker-end] 60px 60px 60px 60px 60px 60px 60px 60px [text-end gutter-start] 60px [middle-end] 60px [page-end gutter-end] 1fr [screen-end]; 1123 grid-column-gap: 32px; 1124 } 1125 1126 .grid { 1127 grid-column-gap: 32px; 1128 } 1129 } 1130 1131 1132 /* Get the citation styles for the appendix (not auto-injected on render since 1133 we do our own rendering of the citation appendix) */ 1134 1135 d-appendix .citation-appendix, 1136 .d-appendix .citation-appendix { 1137 font-size: 11px; 1138 line-height: 15px; 1139 border-left: 1px solid rgba(0, 0, 0, 0.1); 1140 padding-left: 18px; 1141 border: 1px solid rgba(0,0,0,0.1); 1142 background: rgba(0, 0, 0, 0.02); 1143 padding: 10px 18px; 1144 border-radius: 3px; 1145 color: rgba(150, 150, 150, 1); 1146 overflow: hidden; 1147 margin-top: -12px; 1148 white-space: pre-wrap; 1149 word-wrap: break-word; 1150 } 1151 1152 /* Include appendix styles here so they can be overridden */ 1153 1154 d-appendix { 1155 contain: layout style; 1156 font-size: 0.8em; 1157 line-height: 1.7em; 1158 margin-top: 60px; 1159 margin-bottom: 0; 1160 border-top: 1px solid rgba(0, 0, 0, 0.1); 1161 color: rgba(0,0,0,0.5); 1162 padding-top: 60px; 1163 padding-bottom: 48px; 1164 } 1165 1166 d-appendix h3 { 1167 grid-column: page-start / text-start; 1168 font-size: 15px; 1169 font-weight: 500; 1170 margin-top: 1em; 1171 margin-bottom: 0; 1172 color: rgba(0,0,0,0.65); 1173 } 1174 1175 d-appendix h3 + * { 1176 margin-top: 1em; 1177 } 1178 1179 d-appendix ol { 1180 padding: 0 0 0 15px; 1181 } 1182 1183 @media (min-width: 768px) { 1184 d-appendix ol { 1185 padding: 0 0 0 30px; 1186 margin-left: -30px; 1187 } 1188 } 1189 1190 d-appendix li { 1191 margin-bottom: 1em; 1192 } 1193 1194 d-appendix a { 1195 color: rgba(0, 0, 0, 0.6); 1196 } 1197 1198 d-appendix > * { 1199 grid-column: text; 1200 } 1201 1202 d-appendix > d-footnote-list, 1203 d-appendix > d-citation-list, 1204 d-appendix > distill-appendix { 1205 grid-column: screen; 1206 } 1207 1208 /* Include footnote styles here so they can be overridden */ 1209 1210 d-footnote-list { 1211 contain: layout style; 1212 } 1213 1214 d-footnote-list > * { 1215 grid-column: text; 1216 } 1217
1218 d-footnote-list a.footnote-backlink { 1219 color: rgba(0,0,0,0.3); 1220 padding-left: 0.5em; 1221 } 1222 1223 1224 1225 /* Anchor.js */ 1226 1227 .anchorjs-link { 1228 /*transition: all .25s linear; */ 1229 text-decoration: none; 1230 border-bottom: none; 1231 } 1232 *:hover > .anchorjs-link { 1233 margin-left: -1.125em !important; 1234 text-decoration: none; 1235 border-bottom: none; 1236 } 1237 1238 /* Social footer */ 1239 1240 .social_footer { 1241 margin-top: 30px; 1242 margin-bottom: 0; 1243 color: rgba(0,0,0,0.67); 1244 } 1245 1246 .disqus-comments { 1247 margin-right: 30px; 1248 } 1249 1250 .disqus-comment-count { 1251 border-bottom: 1px solid rgba(0, 0, 0, 0.4); 1252 cursor: pointer; 1253 } 1254 1255 #disqus_thread { 1256 margin-top: 30px; 1257 } 1258 1259 .article-sharing a { 1260 border-bottom: none; 1261 margin-right: 8px; 1262 } 1263 1264 .article-sharing a:hover { 1265 border-bottom: none; 1266 } 1267 1268 .sidebar-section.subscribe { 1269 font-size: 12px; 1270 line-height: 1.6em; 1271 } 1272 1273 .subscribe p { 1274 margin-bottom: 0.5em; 1275 } 1276 1277 1278 .article-footer .subscribe { 1279 font-size: 15px; 1280 margin-top: 45px; 1281 } 1282 1283 1284 .sidebar-section.custom { 1285 font-size: 12px; 1286 line-height: 1.6em; 1287 } 1288 1289 .custom p { 1290 margin-bottom: 0.5em; 1291 } 1292 1293 /* Styles for listing layout (hide title) */ 1294 .layout-listing d-title, .layout-listing .d-title { 1295 display: none; 1296 } 1297 1298 /* Styles for posts lists (not auto-injected) */ 1299 1300 1301 .posts-with-sidebar { 1302 padding-left: 45px; 1303 padding-right: 45px; 1304 } 1305 1306 .posts-list .description h2, 1307 .posts-list .description p { 1308 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif; 1309 } 1310 1311 .posts-list .description h2 { 1312 font-weight: 700; 1313 border-bottom: none; 1314 padding-bottom: 0; 1315 } 1316 1317 .posts-list h2.post-tag { 1318 border-bottom: 1px solid rgba(0, 0, 0, 0.2); 1319 padding-bottom: 12px; 1320 } 1321 .posts-list { 1322 margin-top: 60px; 1323 margin-bottom: 24px; 1324 } 1325 1326 .posts-list .post-preview { 1327 text-decoration: none; 1328 overflow: hidden; 1329 display: block; 1330 border-bottom: 1px solid rgba(0, 0, 0, 0.1); 1331 padding: 24px 0; 1332 } 1333 1334 .post-preview-last { 1335 border-bottom: none !important; 1336 } 1337 1338 .posts-list .posts-list-caption { 1339 grid-column: screen; 1340 font-weight: 400; 1341 } 1342 1343 .posts-list .post-preview h2 { 1344 margin: 0 0 6px 0; 1345 line-height: 1.2em; 1346 font-style: normal; 1347 font-size: 24px; 1348 } 1349 1350 .posts-list .post-preview p { 1351 margin: 0 0 12px 0; 1352 line-height: 1.4em; 1353 font-size: 16px; 1354 } 1355 1356 .posts-list .post-preview .thumbnail { 1357 box-sizing: border-box; 1358 margin-bottom: 24px; 1359 position: relative; 1360 max-width: 500px; 1361 } 1362 .posts-list .post-preview img { 1363 width: 100%; 1364 display: block; 1365 } 1366 1367 .posts-list .metadata { 1368 font-size: 12px; 1369 line-height: 1.4em; 1370 margin-bottom: 18px; 1371 } 1372 1373 .posts-list .metadata > * { 1374 display: inline-block; 1375 } 1376 1377 .posts-list .metadata .publishedDate { 1378 margin-right: 2em; 1379 } 1380 1381 .posts-list .metadata .dt-authors { 1382 display: block; 1383 margin-top: 0.3em; 1384 margin-right: 2em; 1385 } 1386 1387 .posts-list .dt-tags { 1388 display: block; 1389 line-height: 1em; 1390 } 1391 1392 .posts-list .dt-tags .dt-tag { 1393 display: inline-block; 1394 color: rgba(0,0,0,0.6); 1395 padding: 0.3em 0.4em; 1396 margin-right: 0.2em; 1397 margin-bottom: 0.4em; 1398 font-size: 60%; 1399 border: 1px solid rgba(0,0,0,0.2); 1400 border-radius: 3px; 1401 text-transform: uppercase; 1402 font-weight: 500; 1403 } 1404 1405 .posts-list img { 1406 opacity: 1; 1407 } 1408 1409 .posts-list img[data-src] { 1410 opacity: 0; 1411 } 1412 1413 .posts-more { 1414 clear: both; 1415 } 1416 1417 1418 .posts-sidebar { 1419 font-size: 16px; 1420 } 1421 1422 .posts-sidebar h3 { 1423 font-size: 16px; 1424 margin-top: 0; 1425 margin-bottom: 0.5em; 1426 font-weight: 400; 1427 text-transform: uppercase; 1428 } 1429 1430 .sidebar-section { 1431 margin-bottom: 30px; 1432 } 1433 1434 .categories ul { 1435 list-style-type: none; 1436 margin: 0; 1437 padding: 0; 1438 } 1439 1440 .categories li { 1441 color: rgba(0, 0, 0, 0.8); 1442 margin-bottom: 0; 1443 } 1444 1445 .categories li>a { 1446 border-bottom: none; 1447 } 1448 1449 .categories li>a:hover { 1450 border-bottom: 1px solid rgba(0, 0, 0, 0.4); 1451 } 1452 1453 .categories .active { 1454 font-weight: 600; 1455 } 1456 1457 .categories .category-count { 1458 color: rgba(0, 0, 0, 0.4); 1459 } 1460 1461 1462 @media(min-width: 768px) { 1463 .posts-list .post-preview h2 { 1464 font-size: 26px; 1465 } 1466 .posts-list .post-preview .thumbnail { 1467 float: right; 1468 width: 30%; 1469 margin-bottom: 0; 1470 } 1471 .posts-list .post-preview .description { 1472 float: left; 1473 width: 45%; 1474 } 1475 .posts-list .post-preview .metadata { 1476 float: left; 1477 width: 20%; 1478 margin-top: 8px; 1479 } 1480 .posts-list .post-preview p { 1481 margin: 0 0 12px 0; 1482 line-height: 1.5em; 1483 font-size: 16px; 1484 } 1485 .posts-with-sidebar .posts-list { 1486 float: left; 1487 width: 75%; 1488 } 1489 .posts-with-sidebar .posts-sidebar { 1490 float: right; 1491 width: 20%; 1492 margin-top: 60px; 1493 padding-top: 24px; 1494 padding-bottom: 24px; 1495 } 1496 } 1497 1498 1499 /* Improve display for browsers without grid (IE/Edge <= 15) */ 1500 1501 .downlevel { 1502 line-height: 1.6em; 1503 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif; 1504 margin: 0; 1505 } 1506 1507 .downlevel .d-title { 1508 padding-top: 6rem; 1509 padding-bottom: 1.5rem; 1510 } 1511 1512 .downlevel .d-title h1 { 1513 font-size: 50px; 1514 font-weight: 700; 1515 line-height: 1.1em; 1516 margin: 0 0 0.5rem; 1517 } 1518 1519 .downlevel .d-title p { 1520 font-weight: 300; 1521 font-size: 1.2rem; 1522 line-height: 1.55em; 1523 margin-top: 0; 1524 } 1525 1526 .downlevel .d-byline { 1527 padding-top: 0.8em; 1528 padding-bottom: 0.8em; 1529 font-size: 0.8rem; 1530 line-height: 1.8em; 1531 } 1532 1533 .downlevel .section-separator { 1534 border: none; 1535 border-top: 1px solid rgba(0, 0, 0, 0.1); 1536 } 1537 1538 .downlevel .d-article { 1539 font-size: 1.06rem; 1540 line-height: 1.7em; 1541 padding-top: 1rem; 1542 padding-bottom: 2rem; 1543 } 1544 1545 1546 .downlevel .d-appendix { 1547 padding-left: 0; 1548 padding-right: 0; 1549 max-width: none; 1550 font-size: 0.8em; 1551 line-height: 1.7em; 1552 margin-bottom: 0; 1553 color: rgba(0,0,0,0.5); 1554 padding-top: 40px; 1555 padding-bottom: 48px; 1556 } 1557 1558 .downlevel .footnotes ol { 1559 padding-left: 13px; 1560 } 1561 1562 .downlevel .base-grid, 1563 .downlevel .distill-header, 1564 .downlevel .d-title, 1565 .downlevel .d-abstract, 1566 .downlevel .d-article, 1567 .downlevel .d-appendix, 1568 .downlevel .distill-appendix, 1569 .downlevel .d-byline, 1570 .downlevel .d-footnote-list, 1571 .downlevel .d-citation-list, 1572 .downlevel .distill-footer, 1573 .downlevel .appendix-bottom, 1574 .downlevel .posts-container { 1575 padding-left: 40px; 1576 padding-right: 40px; 1577 } 1578 1579 @media(min-width: 768px) { 1580 .downlevel .base-grid, 1581 .downlevel .distill-header, 1582 .downlevel .d-title, 1583 .downlevel .d-abstract, 1584 .downlevel .d-article, 1585 .downlevel .d-appendix, 1586 .downlevel .distill-appendix, 1587 .downlevel .d-byline, 1588 .downlevel .d-footnote-list, 1589 .downlevel .d-citation-list, 1590 .downlevel .distill-footer, 1591 .downlevel .appendix-bottom, 1592 .downlevel .posts-container { 1593 padding-left: 150px; 1594 padding-right: 150px; 1595 max-width: 900px; 1596 } 1597 } 1598 1599 .downlevel pre code { 1600 display: block; 1601 border-left: 2px solid rgba(0, 0, 0, .1); 1602 padding: 0 0 0 20px; 1603 font-size: 14px; 1604 } 1605 1606 .downlevel code, .downlevel pre { 1607 color: black; 1608 background: none;
1609 font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 1610 text-align: left; 1611 white-space: pre; 1612 word-spacing: normal; 1613 word-break: normal; 1614 word-wrap: normal; 1615 line-height: 1.5; 1616 1617 -moz-tab-size: 4; 1618 -o-tab-size: 4; 1619 tab-size: 4; 1620 1621 -webkit-hyphens: none; 1622 -moz-hyphens: none; 1623 -ms-hyphens: none; 1624 hyphens: none; 1625 } 1626 1627 .downlevel .posts-list .post-preview { 1628 color: inherit; 1629 } 1630 1631 1632 1633 </style> 1634 1635
1635<script type="application/javascript"> 1636 1637 function is_downlevel_browser() { 1638 if (bowser.isUnsupportedBrowser({ msie: "12", msedge: "16"}, 1639 window.navigator.userAgent)) { 1640 return true; 1641 } else { 1642 return window.load_distill_framework === undefined; 1643 } 1644 } 1645 1646 // show body when load is complete 1647 function on_load_complete() { 1648 1649 // add anchors 1650 if (window.anchors) { 1651 window.anchors.options.placement = 'left'; 1652 window.anchors.add('d-article > h2, d-article > h3, d-article > h4, d-article > h5'); 1653 } 1654 1655 1656 // set body to visible 1657 document.body.style.visibility = 'visible'; 1658 1659 // force redraw for leaflet widgets 1660 if (window.HTMLWidgets) { 1661 var maps = window.HTMLWidgets.findAll(".leaflet"); 1662 $.each(maps, function(i, el) { 1663 var map = this.getMap(); 1664 map.invalidateSize(); 1665 map.eachLayer(function(layer) { 1666 if (layer instanceof L.TileLayer) 1667 layer.redraw(); 1668 }); 1669 }); 1670 } 1671 1672 // trigger 'shown' so htmlwidgets resize 1673 $('d-article').trigger('shown'); 1674 } 1675 1676 function init_distill() { 1677 1678 init_common(); 1679 1680 // create front matter 1681 var front_matter = $('<d-front-matter></d-front-matter>'); 1682 $('#distill-front-matter').wrap(front_matter); 1683 1684 // create d-title 1685 $('.d-title').changeElementType('d-title'); 1686 1687 // create d-byline 1688 var byline = $('<d-byline></d-byline>'); 1689 $('.d-byline').replaceWith(byline); 1690 1691 // create d-article 1692 var article = $('<d-article></d-article>'); 1693 $('.d-article').wrap(article).children().unwrap(); 1694 1695 // move posts container into article 1696 $('.posts-container').appendTo($('d-article')); 1697 1698 // create d-appendix 1699 $('.d-appendix').changeElementType('d-appendix'); 1700 1701 // flag indicating that we have appendix items 1702 var appendix = $('.appendix-bottom').children('h3').length > 0; 1703 1704 // replace footnotes with <d-footnote> 1705 $('.footnote-ref').each(function(i, val) { 1706 appendix = true; 1707 var href = $(this).attr('href'); 1708 var id = href.replace('#', ''); 1709 var fn = $('#' + id); 1710 var fn_p = $('#' + id + '>p'); 1711 fn_p.find('.footnote-back').remove(); 1712 var text = fn_p.html(); 1713 var dtfn = $('<d-footnote></d-footnote>'); 1714 dtfn.html(text); 1715 $(this).replaceWith(dtfn); 1716 }); 1717 // remove footnotes 1718 $('.footnotes').remove(); 1719 1720 // move refs into #references-listing 1721 $('#references-listing').replaceWith($('#refs')); 1722 1723 $('h1.appendix, h2.appendix').each(function(i, val) { 1724 $(this).changeElementType('h3'); 1725 }); 1726 $('h3.appendix').each(function(i, val) { 1727 var id = $(this).attr('id'); 1728 $('.d-contents a[href="#' + id + '"]').parent().remove(); 1729 appendix = true; 1730 $(this).nextUntil($('h1, h2, h3')).addBack().appendTo($('d-appendix')); 1731 }); 1732 1733 // show d-appendix if we have appendix content 1734 $("d-appendix").css('display', appendix ? 'grid' : 'none'); 1735 1736 // localize layout chunks to just output 1737 $('.layout-chunk').each(function(i, val) { 1738 1739 // capture layout 1740 var layout = $(this).attr('data-layout'); 1741 1742 // apply layout to markdown level block elements 1743 var elements = $(this).children().not('details, div.sourceCode, pre, script'); 1744 elements.each(function(i, el) { 1745 var layout_div = $('<div class="' + layout + '"></div>'); 1746 if (layout_div.hasClass('shaded')) { 1747 var shaded_content = $('<div class="shaded-content"></div>'); 1748 $(this).wrap(shaded_content); 1749 $(this).parent().wrap(layout_div); 1750 } else { 1751 $(this).wrap(layout_div); 1752 } 1753 }); 1754 1755 1756 // unwrap the layout-chunk div 1757 $(this).children().unwrap(); 1758 }); 1759 1760 // remove code block used to force highlighting css 1761 $('.distill-force-highlighting-css').parent().remove(); 1762 1763 // remove empty line numbers inserted by pandoc when using a 1764 // custom syntax highlighting theme 1765 $('code.sourceCode a:empty').remove(); 1766 1767 // load distill framework 1768 load_distill_framework(); 1769 1770 // wait for window.distillRunlevel == 4 to do post processing 1771 function distill_post_process() { 1772 1773 if (!window.distillRunlevel || window.distillRunlevel < 4) 1774 return; 1775 1776 // hide author/affiliations entirely if we have no authors 1777 var front_matter = JSON.parse($("#distill-front-matter").html()); 1778 var have_authors = front_matter.authors && front_matter.authors.length > 0; 1779 if (!have_authors) 1780 $('d-byline').addClass('hidden'); 1781 1782 // article with toc class 1783 $('.d-contents').parent().addClass('d-article-with-toc'); 1784 1785 // strip links that point to # 1786 $('.authors-affiliations').find('a[href="#"]').removeAttr('href'); 1787 1788 // add orcid ids 1789 $('.authors-affiliations').find('.author').each(function(i, el) {
1790 var orcid_id = front_matter.authors[i].orcidID; 1791 if (orcid_id) { 1792 var a = $('<a></a>'); 1793 a.attr('href', 'https://orcid.org/' + orcid_id); 1794 var img = $('<img></img>'); 1795 img.addClass('orcid-id'); 1796 img.attr('alt', 'ORCID ID'); 1797 img.attr('src','data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1N0NEMjA4MDI1MjA2ODExOTk0QzkzNTEzRjZEQTg1NyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozM0NDOEJGNEZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozM0NDOEJGM0ZGNTcxMUUxODdBOEVCODg2RjdCQ0QwOSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZDN0YxMTc0MDcyMDY4MTE5NUZFRDc5MUM2MUUwNEREIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU3Q0QyMDgwMjUyMDY4MTE5OTRDOTM1MTNGNkRBODU3Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+84NovQAAAR1JREFUeNpiZEADy85ZJgCpeCB2QJM6AMQLo4yOL0AWZETSqACk1gOxAQN+cAGIA4EGPQBxmJA0nwdpjjQ8xqArmczw5tMHXAaALDgP1QMxAGqzAAPxQACqh4ER6uf5MBlkm0X4EGayMfMw/Pr7Bd2gRBZogMFBrv01hisv5jLsv9nLAPIOMnjy8RDDyYctyAbFM2EJbRQw+aAWw/LzVgx7b+cwCHKqMhjJFCBLOzAR6+lXX84xnHjYyqAo5IUizkRCwIENQQckGSDGY4TVgAPEaraQr2a4/24bSuoExcJCfAEJihXkWDj3ZAKy9EJGaEo8T0QSxkjSwORsCAuDQCD+QILmD1A9kECEZgxDaEZhICIzGcIyEyOl2RkgwAAhkmC+eAm0TAAAAABJRU5ErkJggg=='); 1798 a.append(img); 1799 $(this).append(a); 1800 } 1801 }); 1802 1803 // hide elements of author/affiliations grid that have no value 1804 function hide_byline_column(caption) { 1805 $('d-byline').find('h3:contains("' + caption + '")').parent().css('visibility', 'hidden'); 1806 } 1807 1808 // affiliations 1809 var have_affiliations = false; 1810 for (var i = 0; i<front_matter.authors.length; ++i) { 1811 var author = front_matter.authors[i]; 1812 if (author.affiliation !== " ") { 1813 have_affiliations = true; 1814 break; 1815 } 1816 } 1817 if (!have_affiliations) 1818 $('d-byline').find('h3:contains("Affiliations")').css('visibility', 'hidden'); 1819 1820 // published date 1821 if (!front_matter.publishedDate) 1822 hide_byline_column("Published"); 1823 1824 // document object identifier 1825 var doi = $('d-byline').find('h3:contains("DOI")'); 1826 var doi_p = doi.next().empty(); 1827 if (!front_matter.doi) { 1828 // if we have a citation and valid citationText then link to that 1829 if ($('#citation').length > 0 && front_matter.citationText) { 1830 doi.html('Citation'); 1831 $('<a href="#citation"></a>') 1832 .text(front_matter.citationText) 1833 .appendTo(doi_p); 1834 } else { 1835 hide_byline_column("DOI"); 1836 } 1837 } else { 1838 $('<a></a>') 1839 .attr('href', "https://doi.org/" + front_matter.doi) 1840 .html(front_matter.doi) 1841 .appendTo(doi_p); 1842 } 1843 1844 // change plural form of authors/affiliations 1845 if (front_matter.authors.length === 1) { 1846 var grid = $('.authors-affiliations'); 1847 grid.children('h3:contains("Authors")').text('Author'); 1848 grid.children('h3:contains("Affiliations")').text('Affiliation'); 1849 } 1850 1851 // remove d-appendix and d-footnote-list local styles 1852 $('d-appendix > style:first-child').remove(); 1853 $('d-footnote-list > style:first-child').remove(); 1854 1855 // move appendix-bottom entries to the bottom 1856 $('.appendix-bottom').appendTo('d-appendix').children().unwrap(); 1857 $('.appendix-bottom').remove(); 1858 1859 // hoverable references 1860 $('span.citation[data-cites]').each(function() { 1861 const citeChild = $(this).children()[0]
1862 // Do not process if @xyz has been used without escaping and without bibliography activated 1863 // https://github.com/rstudio/distill/issues/466 1864 if (citeChild === undefined) return true 1865 1866 if (citeChild.nodeName == "D-FOOTNOTE") { 1867 var fn = citeChild 1868 $(this).html(fn.shadowRoot.querySelector("sup")) 1869 $(this).id = fn.id 1870 fn.remove() 1871 } 1872 var refs = $(this).attr('data-cites').split(" "); 1873 var refHtml = refs.map(function(ref) { 1874 // Could use CSS.escape too here, we insure backward compatibility in navigator 1875 return "<p>" + $('div[id="ref-' + ref + '"]').html() + "</p>"; 1876 }).join("\n"); 1877 window.tippy(this, { 1878 allowHTML: true, 1879 content: refHtml, 1880 maxWidth: 500, 1881 interactive: true, 1882 interactiveBorder: 10, 1883 theme: 'light-border', 1884 placement: 'bottom-start' 1885 }); 1886 }); 1887 1888 // fix footnotes in tables (#411) 1889 // replacing broken distill.pub feature 1890 $('table d-footnote').each(function() { 1891 // we replace internal showAtNode methode which is triggered when hovering a footnote 1892 this.hoverBox.showAtNode = function(node) { 1893 // ported from https://github.com/distillpub/template/pull/105/files 1894 calcOffset = function(elem) { 1895 let x = elem.offsetLeft; 1896 let y = elem.offsetTop; 1897 // Traverse upwards until an `absolute` element is found or `elem` 1898 // becomes null. 1899 while (elem = elem.offsetParent && elem.style.position != 'absolute') { 1900 x += elem.offsetLeft; 1901 y += elem.offsetTop; 1902 } 1903 1904 return { left: x, top: y }; 1905 } 1906 // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop 1907 const bbox = node.getBoundingClientRect(); 1908 const offset = calcOffset(node); 1909 this.show([offset.left + bbox.width, offset.top + bbox.height]); 1910 } 1911 }) 1912 1913 // clear polling timer 1914 clearInterval(tid); 1915 1916 // show body now that everything is ready 1917 on_load_complete(); 1918 } 1919 1920 var tid = setInterval(distill_post_process, 50); 1921 distill_post_process(); 1922 1923 } 1924 1925 function init_downlevel() { 1926 1927 init_common(); 1928 1929 // insert hr after d-title 1930 $('.d-title').after($('<hr class="section-separator"/>')); 1931 1932 // check if we have authors 1933 var front_matter = JSON.parse($("#distill-front-matter").html()); 1934 var have_authors = front_matter.authors && front_matter.authors.length > 0; 1935
1936 // manage byline/border 1937 if (!have_authors) 1938 $('.d-byline').remove(); 1939 $('.d-byline').after($('<hr class="section-separator"/>')); 1940 $('.d-byline a').remove(); 1941 1942 // remove toc 1943 $('.d-contents').remove(); 1944 1945 // move appendix elements 1946 $('h1.appendix, h2.appendix').each(function(i, val) { 1947 $(this).changeElementType('h3'); 1948 }); 1949 $('h3.appendix').each(function(i, val) { 1950 $(this).nextUntil($('h1, h2, h3')).addBack().appendTo($('.d-appendix')); 1951 }); 1952 1953 1954 // inject headers into references and footnotes 1955 var refs_header = $('<h3></h3>'); 1956 refs_header.text('References'); 1957 $('#refs').prepend(refs_header); 1958 1959 var footnotes_header = $('<h3></h3'); 1960 footnotes_header.text('Footnotes'); 1961 $('.footnotes').children('hr').first().replaceWith(footnotes_header); 1962 1963 // move appendix-bottom entries to the bottom 1964 $('.appendix-bottom').appendTo('.d-appendix').children().unwrap(); 1965 $('.appendix-bottom').remove(); 1966 1967 // remove appendix if it's empty 1968 if ($('.d-appendix').children().length === 0) 1969 $('.d-appendix').remove(); 1970 1971 // prepend separator above appendix 1972 $('.d-appendix').before($('<hr class="section-separator" style="clear: both"/>')); 1973 1974 // trim code 1975 $('pre>code').each(function(i, val) { 1976 $(this).html($.trim($(this).html())); 1977 }); 1978 1979 // move posts-container right before article 1980 $('.posts-container').insertBefore($('.d-article')); 1981 1982 $('body').addClass('downlevel'); 1983 1984 on_load_complete(); 1985 } 1986 1987 1988 function init_common() { 1989 1990 // jquery plugin to change element types 1991 (function($) { 1992 $.fn.changeElementType = function(newType) { 1993 var attrs = {}; 1994 1995 $.each(this[0].attributes, function(idx, attr) { 1996 attrs[attr.nodeName] = attr.nodeValue; 1997 }); 1998 1999 this.replaceWith(function() { 2000 return $("<" + newType + "/>", attrs).append($(this).contents()); 2001 }); 2002 }; 2003 })(jQuery); 2004 2005 // prevent underline for linked images 2006 $('a > img').parent().css({'border-bottom' : 'none'}); 2007 2008 // mark non-body figures created by knitr chunks as 100% width 2009 $('.layout-chunk').each(function(i, val) { 2010 var figures = $(this).find('img, .html-widget'); 2011 // ignore leaflet img layers (#106) 2012 figures = figures.filter(':not(img[class*="leaflet"])') 2013 if ($(this).attr('data-layout') !== "l-body") { 2014 figures.css('width', '100%'); 2015 } else { 2016 figures.css('max-width', '100%'); 2017 figures.filter("[width]").each(function(i, val) { 2018 var fig = $(this); 2019 fig.css('width', fig.attr('width') + 'px'); 2020 }); 2021 2022 } 2023 }); 2024 2025 // auto-append index.html to post-preview links in file: protocol 2026 // and in rstudio ide preview 2027 $('.post-preview').each(function(i, val) { 2028 if (window.location.protocol === "file:") 2029 $(this).attr('href', $(this).attr('href') + "index.html"); 2030 }); 2031 2032 // get rid of index.html references in header 2033 if (window.location.protocol !== "file:") { 2034 $('.distill-site-header a[href]').each(function(i,val) { 2035 $(this).attr('href', $(this).attr('href').replace(/^index[.]html/, "./")); 2036 }); 2037 } 2038 2039 // add class to pandoc style tables 2040 $('tr.header').parent('thead').parent('table').addClass('pandoc-table'); 2041 $('.kable-table').children('table').addClass('pandoc-table'); 2042 2043 // add figcaption style to table captions 2044 $('caption').parent('table').addClass("figcaption"); 2045 2046 // initialize posts list 2047 if (window.init_posts_list) 2048 window.init_posts_list(); 2049 2050 // implmement disqus comment link 2051 $('.disqus-comment-count').click(function() { 2052 window.headroom_prevent_pin = true; 2053 $('#disqus_thread').toggleClass('hidden'); 2054 if (!$('#disqus_thread').hasClass('hidden')) { 2055 var offset = $(this).offset(); 2056 $(window).resize(); 2057 $('html, body').animate({ 2058 scrollTop: offset.top - 35 2059 }); 2060 } 2061 }); 2062 } 2063 2064 document.addEventListener('DOMContentLoaded', function() { 2065 if (is_downlevel_browser()) 2066 init_downlevel(); 2067 else 2068 window.addEventListener('WebComponentsReady', init_distill); 2069 }); 2070 2071 </script>
2071 2072 2073 <style type="text/css"> 2074 /* base variables */ 2075 2076 /* Edit the CSS properties in this file to create a custom 2077 Distill theme. Only edit values in the right column 2078 for each row; values shown are the CSS defaults. 2079 To return any property to the default, 2080 you may set its value to: unset 2081 All rows must end with a semi-colon. */ 2082 2083 /* Optional: embed custom fonts here with `@import` */ 2084 /* This must remain at the top of this file. */ 2085 2086 2087 2088 html { 2089 /*-- Main font sizes --*/ 2090 --title-size: 50px; 2091 --body-size: 1.06rem; 2092 --code-size: 14px; 2093 --aside-size: 12px; 2094 --fig-cap-size: 13px; 2095 /*-- Main font colors --*/ 2096 --title-color: #000000; 2097 --header-color: rgba(0, 0, 0, 0.8); 2098 --body-color: rgba(0, 0, 0, 0.8); 2099 --aside-color: rgba(0, 0, 0, 0.6); 2100 --fig-cap-color: rgba(0, 0, 0, 0.6); 2101 /*-- Specify custom fonts ~~~ must be imported above --*/ 2102 --heading-font: sans-serif; 2103 --mono-font: monospace; 2104 --body-font: sans-serif; 2105 --navbar-font: sans-serif; /* websites + blogs only */ 2106 } 2107 2108 /*-- ARTICLE METADATA --*/ 2109 d-byline { 2110 --heading-size: 0.6rem; 2111 --heading-color: rgba(0, 0, 0, 0.5); 2112 --body-size: 0.8rem; 2113 --body-color: rgba(0, 0, 0, 0.8); 2114 } 2115 2116 /*-- ARTICLE TABLE OF CONTENTS --*/ 2117 .d-contents { 2118 --heading-size: 18px; 2119 --contents-size: 13px; 2120 } 2121 2122 /*-- ARTICLE APPENDIX --*/ 2123 d-appendix { 2124 --heading-size: 15px; 2125 --heading-color: rgba(0, 0, 0, 0.65); 2126 --text-size: 0.8em; 2127 --text-color: rgba(0, 0, 0, 0.5); 2128 } 2129 2130 /*-- WEBSITE HEADER + FOOTER --*/ 2131 /* These properties only apply to Distill sites and blogs */ 2132 2133 .distill-site-header { 2134 --title-size: 18px; 2135 --text-color: rgba(255, 255, 255, 0.8); 2136 --text-size: 15px; 2137 --hover-color: white; 2138 --bkgd-color: #0F2E3D; 2139 } 2140 2141 .distill-site-footer { 2142 --text-color: rgba(255, 255, 255, 0.8); 2143 --text-size: 15px; 2144 --hover-color: white; 2145 --bkgd-color: #0F2E3D; 2146 } 2147 2148 /*-- Additional custom styles --*/ 2149 /* Add any additional CSS rules below */ 2150 </style> 2151 <style type="text/css"> 2152 /* base variables */ 2153 2154 /* Edit the CSS properties in this file to create a custom 2155 Distill theme. Only edit values in the right column 2156 for each row; values shown are the CSS defaults. 2157 To return any property to the default, 2158 you may set its value to: unset 2159 All rows must end with a semi-colon. */ 2160 2161 /* Optional: embed custom fonts here with `@import` */ 2162 /* This must remain at the top of this file. */ 2163 2164 2165 2166 html { 2167 /*-- Main font sizes --*/ 2168 --title-size: 50px; 2169 --body-size: 1.06rem; 2170 --code-size: 14px; 2171 --aside-size: 12px; 2172 --fig-cap-size: 13px; 2173 /*-- Main font colors --*/ 2174 --title-color: #000000; 2175 --header-color: rgba(0, 0, 0, 0.8); 2176 --body-color: rgba(0, 0, 0, 0.8); 2177 --aside-color: rgba(0, 0, 0, 0.6); 2178 --fig-cap-color: rgba(0, 0, 0, 0.6); 2179 /*-- Specify custom fonts ~~~ must be imported above --*/ 2180 --heading-font: sans-serif; 2181 --mono-font: monospace; 2182 --body-font: sans-serif; 2183 --navbar-font: sans-serif; /* websites + blogs only */ 2184 } 2185 2186 /*-- ARTICLE METADATA --*/ 2187 d-byline { 2188 --heading-size: 0.6rem; 2189 --heading-color: rgba(0, 0, 0, 0.5); 2190 --body-size: 0.8rem; 2191 --body-color: rgba(0, 0, 0, 0.8); 2192 } 2193 2194 /*-- ARTICLE TABLE OF CONTENTS --*/ 2195 .d-contents { 2196 --heading-size: 18px; 2197 --contents-size: 13px; 2198 } 2199 2200 /*-- ARTICLE APPENDIX --*/ 2201 d-appendix { 2202 --heading-size: 15px; 2203 --heading-color: rgba(0, 0, 0, 0.65); 2204 --text-size: 0.8em; 2205 --text-color: rgba(0, 0, 0, 0.5); 2206 } 2207 2208 /*-- WEBSITE HEADER + FOOTER --*/ 2209 /* These properties only apply to Distill sites and blogs */ 2210 2211 .distill-site-header { 2212 --title-size: 18px; 2213 --text-color: rgba(255, 255, 255, 0.8); 2214 --text-size: 15px; 2215 --hover-color: white; 2216 --bkgd-color: #908FB6; 2217 /*--bkgd-color: #0F2E3D;*/ 2218 } 2219 2220 .distill-site-footer { 2221 --text-color: rgba(255, 255, 255, 0.8); 2222 --text-size: 12px; 2223 --hover-color: white; 2224 --bkgd-color: #908FB6; 2225 } 2226 2227 /*-- Additional custom styles --*/ 2228 /* Add any additional CSS rules below */ 2229 </style> 2230 <style type="text/css"> 2231 /* base style */ 2232 2233 /* FONT FAMILIES */ 2234 2235 :root { 2236 --heading-default: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
2237 --mono-default: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 2238 --body-default: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif; 2239 } 2240 2241 body, 2242 .posts-list .post-preview p, 2243 .posts-list .description p { 2244 font-family: var(--body-font), var(--body-default); 2245 } 2246 2247 h1, h2, h3, h4, h5, h6, 2248 .posts-list .post-preview h2, 2249 .posts-list .description h2 { 2250 font-family: var(--heading-font), var(--heading-default); 2251 } 2252 2253 d-article div.sourceCode code, 2254 d-article pre code { 2255 font-family: var(--mono-font), var(--mono-default); 2256 } 2257 2258 2259 /*-- TITLE --*/ 2260 d-title h1, 2261 .posts-list > h1 { 2262 color: var(--title-color, black); 2263 } 2264 2265 d-title h1 { 2266 font-size: var(--title-size, 50px); 2267 } 2268 2269 /*-- HEADERS --*/ 2270 d-article h1, 2271 d-article h2, 2272 d-article h3, 2273 d-article h4, 2274 d-article h5, 2275 d-article h6 { 2276 color: var(--header-color, rgba(0, 0, 0, 0.8)); 2277 } 2278 2279 /*-- BODY --*/ 2280 d-article > p, /* only text inside of <p> tags */ 2281 d-article > ul, /* lists */ 2282 d-article > ol { 2283 color: var(--body-color, rgba(0, 0, 0, 0.8)); 2284 font-size: var(--body-size, 1.06rem); 2285 } 2286 2287 2288 /*-- CODE --*/ 2289 d-article div.sourceCode code, 2290 d-article pre code { 2291 font-size: var(--code-size, 14px); 2292 } 2293 2294 /*-- ASIDE --*/ 2295 d-article aside { 2296 font-size: var(--aside-size, 12px); 2297 color: var(--aside-color, rgba(0, 0, 0, 0.6)); 2298 } 2299 2300 /*-- FIGURE CAPTIONS --*/ 2301 figure .caption, 2302 figure figcaption, 2303 .figure .caption { 2304 font-size: var(--fig-cap-size, 13px); 2305 color: var(--fig-cap-color, rgba(0, 0, 0, 0.6)); 2306 } 2307 2308 /*-- METADATA --*/ 2309 d-byline h3 { 2310 font-size: var(--heading-size, 0.6rem); 2311 color: var(--heading-color, rgba(0, 0, 0, 0.5)); 2312 } 2313 2314 d-byline { 2315 font-size: var(--body-size, 0.8rem); 2316 color: var(--body-color, rgba(0, 0, 0, 0.8)); 2317 } 2318 2319 d-byline a, 2320 d-article d-byline a { 2321 color: var(--body-color, rgba(0, 0, 0, 0.8)); 2322 } 2323 2324 /*-- TABLE OF CONTENTS --*/ 2325 .d-contents nav h3 { 2326 font-size: var(--heading-size, 18px); 2327 } 2328 2329 .d-contents nav a { 2330 font-size: var(--contents-size, 13px); 2331 } 2332 2333 /*-- APPENDIX --*/ 2334 d-appendix h3 { 2335 font-size: var(--heading-size, 15px); 2336 color: var(--heading-color, rgba(0, 0, 0, 0.65)); 2337 } 2338 2339 d-appendix { 2340 font-size: var(--text-size, 0.8em); 2341 color: var(--text-color, rgba(0, 0, 0, 0.5)); 2342 } 2343 2344 d-appendix d-footnote-list a.footnote-backlink { 2345 color: var(--text-color, rgba(0, 0, 0, 0.5)); 2346 } 2347 2348 /*-- WEBSITE HEADER + FOOTER --*/ 2349 .distill-site-header .title { 2350 font-size: var(--title-size, 18px); 2351 font-family: var(--navbar-font), var(--heading-default); 2352 } 2353 2354 .distill-site-header a, 2355 .nav-dropdown .nav-dropbtn { 2356 font-family: var(--navbar-font), var(--heading-default); 2357 } 2358 2359 .nav-dropdown .nav-dropbtn { 2360 color: var(--text-color, rgba(255, 255, 255, 0.8)); 2361 font-size: var(--text-size, 15px); 2362 } 2363 2364 .distill-site-header a:hover, 2365 .nav-dropdown:hover .nav-dropbtn { 2366 color: var(--hover-color, white); 2367 } 2368 2369 .distill-site-header { 2370 font-size: var(--text-size, 15px); 2371 color: var(--text-color, rgba(255, 255, 255, 0.8)); 2372 background-color: var(--bkgd-color, #0F2E3D); 2373 } 2374 2375 .distill-site-footer { 2376 font-size: var(--text-size, 15px); 2377 color: var(--text-color, rgba(255, 255, 255, 0.8)); 2378 background-color: var(--bkgd-color, #0F2E3D); 2379 } 2380 2381 .distill-site-footer a:hover { 2382 color: var(--hover-color, white); 2383 }</style> 2384 <!--/radix_placeholder_distill--> 2385
2385<script src="site_libs/header-attrs-2.16/header-attrs.js"></script>
2385 2386
2386<script src="site_libs/popper-2.6.0/popper.min.js"></script>
2386 2387 <link href="site_libs/tippy-6.2.7/tippy.css" rel="stylesheet" /> 2388 <link href="site_libs/tippy-6.2.7/tippy-light-border.css" rel="stylesheet" /> 2389
2389<script src="site_libs/tippy-6.2.7/tippy.umd.min.js"></script>
2389 2390
2390<script src="site_libs/anchor-4.2.2/anchor.min.js"></script>
2390 2391
2391<script src="site_libs/bowser-1.9.3/bowser.min.js"></script>
2391 2392
2392<script src="site_libs/webcomponents-2.0.0/webcomponents.js"></script>
2392 2393
2393<script src="site_libs/distill-2.2.21/template.v2.js"></script>
2393 2394 <!--radix_placeholder_site_in_header--> 2395 <!--/radix_placeholder_site_in_header--> 2396 2397 2398</head> 2399 2400<body class="layout-listing"> 2401 2402<!--radix_placeholder_front_matter--> 2403
2404<script id="distill-front-matter" type="text/json"> 2405{"title":"Posts","authors":[]} 2406</script>
2406 2407 2408<!--/radix_placeholder_front_matter--> 2409<!--radix_placeholder_navigation_before_body--> 2410<header class="header header--fixed" role="banner"> 2411<nav class="distill-site-nav distill-site-header"> 2412<div class="nav-left"> 2413<a class="logo"> 2414<img src="img/favicon.png" alt="Logo"/> 2415</a> 2416<a class='title' href='/'>Elizabeth Stanny</a> 2417<input id="distill-search" class="nav-search hidden" type="text" placeholder="Search..."/> 2418</div> 2419<div class="nav-right"> 2420<a href='/'>Home</a> 2421<a href='/about'>About</a> 2422<div class="nav-dropdown"> 2423<button class="nav-dropbtn"> 2424Courses 2425 2426<span class="down-arrow">▾</span> 2427</button> 2428<div class="nav-dropdown-content"> 2429<a href='/data-analysis-fa-22'>Data Analysis - Fall 2022</a> 2430<hr/> 2431<a href='/intermediate_accounting_sum'>Intermediate Accounting I- Summer 2022</a> 2432<hr/> 2433<a href='/intermediate_accounting_ii_sum'>Intermediate Accounting II - Summer 2022</a> 2434<hr/> 2435<a href='/financial-accounting-sp-22'>Financial Accounting - Spring 2022</a> 2436<hr/> 2437<a href='/data-analysis-sp-22'>Data Analysis - Spring 2022</a> 2438<hr/> 2439<a href='/slides'>BUS 320 Slides</a> 2440</div> 2441</div> 2442<a href='/advising'>Advising</a> 2443<a href="javascript:void(0);" class="nav-toggle">☰</a> 2444</div> 2445</nav> 2446</header> 2447<!--/radix_placeholder_navigation_before_body--> 2448<!--radix_placeholder_site_before_body--> 2449<!--/radix_placeholder_site_before_body--> 2450<!--radix_placeholder_article_listing--> 2451 2452
2453<script type="application/javascript"> 2454 2455function init_posts_list() { 2456 2457 function load_image(img) { 2458 var src = $(img).attr('data-src'); 2459 if (src) { 2460 $(img).attr('src', src); 2461 $(img).on("load", function() { 2462 img.removeAttribute('data-src'); 2463 }); 2464 } 2465 } 2466 2467 function set_posts_visible(posts, visible) { 2468 if (visible) { 2469 2470 // show bottom border by default 2471 $(posts).removeClass('post-preview-last'); 2472 2473 // apply limits if need be 2474 var max_posts = 25; 2475 var apply_limits = $('.posts-container').hasClass('posts-apply-limit'); 2476 if (apply_limits && posts.length > max_posts) { 2477 posts = $(posts).slice(0, max_posts); 2478 } else { 2479 $('.posts-more a').addClass('hidden'); 2480 } 2481 2482 // apply last style 2483 $(posts.slice(-1)[0]).addClass('post-preview-last'); 2484 2485 $(posts).removeClass('hidden'); 2486 $(posts).find('img[data-src]').each(function(i, img) { 2487 load_image(img); 2488 }); 2489 } else { 2490 $(posts).addClass('hidden'); 2491 } 2492 } 2493 2494 function apply_hash_filter() { 2495 2496 // clear active state 2497 $('.categories .active').removeClass('active'); 2498 2499 // mark all posts invisible to start 2500 set_posts_visible($('.posts-list').children('a'), false); 2501 2502 // if we have a hash filter 2503 if (window.location.hash && window.location.hash.startsWith("#category:")) { 2504 2505 // mark posts that match the category visible 2506 var page_category = window.location.hash.replace(/^#category:/, ""); 2507 page_category = decodeURIComponent(page_category) 2508 var posts = $('.post-metadata').map(function(idx, script) { 2509 var metadata = $.parseJSON($(script).html()); 2510 var post = null; 2511 $.each(metadata.categories, function(idx, category) { 2512 category = category.replace(/ /g,"_"); 2513 if ((page_category || '').toLowerCase() === "articles" || category === page_category) { 2514 post = $(script).parent().get(); 2515 return false; 2516 } 2517 }); 2518 return post; 2519 }); 2520 set_posts_visible(posts, true); 2521 2522 // mark the hash active 2523 $('.categories li>a[href="' + decodeURIComponent(window.location.hash) + '"]').addClass('active'); 2524 2525 // update the list_caption 2526 var list_caption = $('.posts-list-caption'); 2527 var caption = (page_category || '').toLowerCase() === "articles" 2528 ? list_caption.attr('data-caption') 2529 : ('Category: ' + page_category.replace(/_/g," ")); 2530 list_caption.text(caption); 2531 2532 } else { 2533 2534 // no hash filter, make all posts visible (subject to max display) 2535 set_posts_visible($('.posts-list').children(), true); 2536 2537 // reset list caption 2538 var list_caption = $('.posts-list-caption'); 2539 list_caption.text(list_caption.attr('data-caption')); 2540 2541 2542 } 2543 } 2544 2545 // more articles 2546 function apply_post_limits(apply) { 2547 if (apply) { 2548 $('.posts-container').addClass('posts-apply-limit'); 2549 $('.posts-more a').removeClass('hidden'); 2550 } else { 2551 $('.posts-container').removeClass('posts-apply-limit'); 2552 $('.posts-more a').addClass('hidden'); 2553 } 2554 } 2555 2556 // click handling for tags 2557 $('.dt-tag').click(function(ev) { 2558 window.location.hash = '#category:' + $(this).text().replace(/ /g, "_"); 2559 return false; 2560 }) 2561 2562 // hash filter handling 2563 apply_hash_filter(); 2564 $(window).on('hashchange',function() { 2565 apply_post_limits(true); 2566 apply_hash_filter(); 2567 }); 2568 2569 // more articles link 2570 $('.posts-more a').click(function(e) { 2571 e.preventDefault(); 2572 apply_post_limits(false); 2573 apply_hash_filter(); 2574 return false; 2575 }); 2576 2577} 2578 2579</script>
2579 2580 2581 2582 2583<div class="posts-container posts-with-sidebar posts-apply-limit l-screen-inset"> 2584<div class="posts-list"> 2585<h1 class="posts-list-caption" data-caption="Posts">Posts</h1> 2586<a href="posts/create-a-banner-and-buttons-with-r/" class="post-preview">
2587<script class="post-metadata" type="text/json">{"categories":["jasmines","tidyverse","magick"]}</script>
2587 2588<div class="metadata"> 2589<div class="publishedDate">June 7, 2021</div> 2590<div class="dt-authors"></div> 2591</div> 2592<div class="thumbnail"> 2593<img src="posts/create-a-banner-and-buttons-with-r/index_files/figure-html5/unnamed-chunk-3-1.png"/> 2594</div> 2595<div class="description"> 2596<h2>Create a banner and buttons with R</h2> 2597<div class="dt-tags"> 2598<div class="dt-tag">jasmines</div> 2599<div class="dt-tag">tidyverse</div> 2600<div class="dt-tag">magick</div> 2601</div> 2602<p>with a few lines of code.</p> 2603</div> 2604</a> 2605<a href="posts/googledrive-urls/" class="post-preview">
2606<script class="post-metadata" type="text/json">{"categories":["tidyverse","googledrive","glue"]}</script>
2606 2607<div class="metadata"> 2608<div class="publishedDate">Jan. 22, 2021</div> 2609<div class="dt-authors"></div> 2610</div> 2611<div class="thumbnail"> 2612<img src="posts/googledrive-urls/preview.png"/> 2613</div> 2614<div class="description"> 2615<h2>Use the R package googledrive</h2> 2616<div class="dt-tags"> 2617<div class="dt-tag">tidyverse</div> 2618<div class="dt-tag">googledrive</div> 2619<div class="dt-tag">glue</div> 2620</div> 2621<p>to create a list of urls</p> 2622</div> 2623</a> 2624<a href="posts/facebook-financial-statements/" class="post-preview">
2625<script class="post-metadata" type="text/json">{"categories":["SEC","Facebook","teaching"]}</script>
2625 2626<div class="metadata"> 2627<div class="publishedDate">Jan. 14, 2019</div> 2628<div class="dt-authors"></div> 2629</div> 2630<div class="thumbnail"> 2631<img src="posts/facebook-financial-statements/preview.png"/> 2632</div> 2633<div class="description"> 2634<h2>Facebook Financial Statements</h2> 2635<div class="dt-tags"> 2636<div class="dt-tag">SEC</div> 2637<div class="dt-tag">Facebook</div> 2638<div class="dt-tag">teaching</div> 2639</div> 2640<p>for fiscal years 2014 and 2015</p> 2641</div> 2642</a> 2643</div> 2644<div class="posts-sidebar"> 2645<div class="sidebar-section categories"> 2646<h3>Categories</h3> 2647<ul> 2648<li> 2649<a href="#category:Articles">Articles</a> 2650<span class="category-count">(3)</span> 2651</li> 2652<li> 2653<a href="#category:Facebook">Facebook</a> 2654<span class="category-count">(1)</span> 2655</li> 2656<li> 2657<a href="#category:glue">glue</a> 2658<span class="category-count">(1)</span> 2659</li> 2660<li> 2661<a href="#category:googledrive">googledrive</a> 2662<span class="category-count">(1)</span> 2663</li> 2664<li> 2665<a href="#category:jasmines">jasmines</a> 2666<span class="category-count">(1)</span> 2667</li> 2668<li> 2669<a href="#category:magick">magick</a> 2670<span class="category-count">(1)</span> 2671</li> 2672<li> 2673<a href="#category:SEC">SEC</a> 2674<span class="category-count">(1)</span> 2675</li> 2676<li> 2677<a href="#category:teaching">teaching</a> 2678<span class="category-count">(1)</span> 2679</li> 2680<li> 2681<a href="#category:tidyverse">tidyverse</a> 2682<span class="category-count">(2)</span> 2683</li> 2684</ul> 2685</div> 2686</div> 2687<div class="posts-more"> 2688<a href="#">More articles »</a> 2689</div> 2690</div> 2691<!--/radix_placeholder_article_listing--> 2692 2693<div class="d-title"> 2694<h1>Posts</h1> 2695<!--radix_placeholder_categories--> 2696<!--/radix_placeholder_categories--> 2697 2698</div> 2699 2700 2701<div class="d-article"> 2702<div class="sourceCode" id="cb1"><pre class="sourceCode r distill-force-highlighting-css"><code class="sourceCode r"></code></pre></div> 2703<!--radix_placeholder_article_footer--> 2704<!--/radix_placeholder_article_footer--> 2705</div> 2706 2707<div class="d-appendix"> 2708</div> 2709 2710 2711<!--radix_placeholder_site_after_body--> 2712<!--/radix_placeholder_site_after_body--> 2713<!--radix_placeholder_appendices--> 2714<div class="appendix-bottom"></div> 2715<!--/radix_placeholder_appendices--> 2716<!--radix_placeholder_navigation_after_body--> 2717<div class="distill-site-nav distill-site-footer"> 2718<p>© Copyright 2021-2022 Elizabeth Stanny. Website template is by <a 2719href="https://distill.pub/about/">Distill.pub</a> and <a 2720href="https://www.rstudio.com">RStudio, Inc</a>.</p> 2721</div> 2722<!--/radix_placeholder_navigation_after_body--> 2723 2724 2725</body> 2726 2727</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.