22< html xmlns ="http://www.w3.org/1999/xhtml " lang ="en " xml:lang ="en "> < head >
33
44< meta charset ="utf-8 ">
5- < meta name ="generator " content ="quarto-1.3.450 ">
5+ < meta name ="generator " content ="quarto-1.4.549 ">
66
77< meta name ="viewport " content ="width=device-width, initial-scale=1.0, user-scalable=yes ">
88
4646 "collapse-after" : 3 ,
4747 "panel-placement" : "end" ,
4848 "type" : "overlay" ,
49- "limit" : 20 ,
49+ "limit" : 50 ,
50+ "keyboard-shortcut" : [
51+ "f" ,
52+ "/" ,
53+ "s"
54+ ] ,
55+ "show-item-context" : false ,
5056 "language" : {
5157 "search-no-results-text" : "No results" ,
5258 "search-matching-documents-text" : "matching documents" ,
5561 "search-more-match-text" : "more match in this document" ,
5662 "search-more-matches-text" : "more matches in this document" ,
5763 "search-clear-button-title" : "Clear" ,
64+ "search-text-placeholder" : "" ,
5865 "search-detached-cancel-button-title" : "Cancel" ,
5966 "search-submit-button-title" : "Submit" ,
6067 "search-label" : "Search"
6976
7077< div id ="quarto-search-results "> </ div >
7178 < header id ="quarto-header " class ="headroom fixed-top ">
72- < nav class ="navbar navbar-expand-lg navbar- dark ">
79+ < nav class ="navbar navbar-expand-lg " data-bs-theme =" dark ">
7380 < div class ="navbar-container container-fluid ">
74- < div class ="navbar-brand-container ">
81+ < div class ="navbar-brand-container mx-auto ">
7582 < a href ="../index.html " class ="navbar-brand navbar-brand-logo ">
7683 < img src ="../images/pi-logotype-canonical-whole-white.svg " alt ="" class ="navbar-logo ">
7784 </ a >
8390 < div class ="collapse navbar-collapse " id ="navbarCollapse ">
8491 < ul class ="navbar-nav navbar-nav-scroll ms-auto ">
8592 < li class ="nav-item ">
86- < a class ="nav-link " href ="../blog/index.html " rel ="" target ="" >
87- < span class ="menu-text "> News</ span > </ a >
93+ < a class ="nav-link " href ="../blog/index.html ">
94+ < span class ="menu-text "> News</ span > </ a >
8895 </ li >
8996 < li class ="nav-item dropdown ">
90- < a class ="nav-link dropdown-toggle " href ="# " id ="nav-menu-about-us " role ="button " data-bs-toggle ="dropdown " aria-expanded ="false " rel ="" target ="" >
97+ < a class ="nav-link dropdown-toggle " href ="# " id ="nav-menu-about-us " role ="button " data-bs-toggle ="dropdown " aria-expanded ="false ">
9198 < span class ="menu-text "> About Us</ span >
9299 </ a >
93100 < ul class ="dropdown-menu dropdown-menu-end " aria-labelledby ="nav-menu-about-us ">
94101 < li >
95- < a class ="dropdown-item " href ="../about/ " rel ="" target ="" >
102+ < a class ="dropdown-item " href ="../about/ ">
96103 < span class ="dropdown-text "> Pattern Institute</ span > </ a >
97104 </ li >
98105 < li >
99- < a class ="dropdown-item " href ="../team/index.html " rel ="" target ="" >
106+ < a class ="dropdown-item " href ="../team/index.html ">
100107 < span class ="dropdown-text "> Team</ span > </ a >
101108 </ li >
102109 < li >
103- < a class ="dropdown-item " href ="../about/org.html " rel ="" target ="" >
110+ < a class ="dropdown-item " href ="../about/org.html ">
104111 < span class ="dropdown-text "> Organization</ span > </ a >
105112 </ li >
106113 </ ul >
107114 </ li >
108115 < li class ="nav-item dropdown ">
109- < a class ="nav-link dropdown-toggle " href ="# " id ="nav-menu-by-laws " role ="button " data-bs-toggle ="dropdown " aria-expanded ="false " rel ="" target ="" >
116+ < a class ="nav-link dropdown-toggle " href ="# " id ="nav-menu-by-laws " role ="button " data-bs-toggle ="dropdown " aria-expanded ="false ">
110117 < span class ="menu-text "> By-Laws</ span >
111118 </ a >
112119 < ul class ="dropdown-menu dropdown-menu-end " aria-labelledby ="nav-menu-by-laws ">
113120 < li >
114- < a class ="dropdown-item " href ="../doc/by-laws-en.pdf " rel ="" target ="" >
121+ < a class ="dropdown-item " href ="../doc/by-laws-en.pdf ">
115122 < span class ="dropdown-text "> English version</ span > </ a >
116123 </ li >
117124 < li >
118- < a class ="dropdown-item " href ="../doc/by-laws-pt.pdf " rel ="" target ="" >
125+ < a class ="dropdown-item " href ="../doc/by-laws-pt.pdf ">
119126 < span class ="dropdown-text "> Portuguese version</ span > </ a >
120127 </ li >
121128 </ ul >
122129 </ li >
123130 < li class ="nav-item ">
124- < a class ="nav-link " href ="../about/contact.html " rel ="" target ="" >
125- < span class ="menu-text "> Contact</ span > </ a >
131+ < a class ="nav-link " href ="../about/contact.html ">
132+ < span class ="menu-text "> Contact</ span > </ a >
126133 </ li >
127134</ ul >
128- < div class ="quarto-navbar-tools ">
129- </ div >
130135 </ div > <!-- /navcollapse -->
136+ < div class ="quarto-navbar-tools ">
137+ </ div >
131138 </ div > <!-- /container-fluid -->
132139 </ nav >
133140</ header >
@@ -154,8 +161,10 @@ <h1 class="title">Pattern Institute By-Laws</h1>
154161 </ div >
155162
156163
164+
157165</ header >
158166
167+
159168< p > The current by-laws of the Pattern Institute approved in 2 February 2023.</ p >
160169< p > < object data ="../doc/by-laws-pt.pdf " type ="application/pdf " width ="100% " height ="1070 "> < p > Unable to display PDF file. < a href ="../doc/by-laws-pt.pdf "> Download</ a > instead.</ p > </ object > </ p >
161170
@@ -241,10 +250,9 @@ <h1 class="title">Pattern Institute By-Laws</h1>
241250 // clear code selection
242251 e . clearSelection ( ) ;
243252 } ) ;
244- function tippyHover ( el , contentFn ) {
253+ function tippyHover ( el , contentFn , onTriggerFn , onUntriggerFn ) {
245254 const config = {
246255 allowHTML : true ,
247- content : contentFn ,
248256 maxWidth : 500 ,
249257 delay : 100 ,
250258 arrow : false ,
@@ -254,8 +262,17 @@ <h1 class="title">Pattern Institute By-Laws</h1>
254262 interactive : true ,
255263 interactiveBorder : 10 ,
256264 theme : 'quarto' ,
257- placement : 'bottom-start'
265+ placement : 'bottom-start' ,
258266 } ;
267+ if ( contentFn ) {
268+ config . content = contentFn ;
269+ }
270+ if ( onTriggerFn ) {
271+ config . onTrigger = onTriggerFn ;
272+ }
273+ if ( onUntriggerFn ) {
274+ config . onUntrigger = onUntriggerFn ;
275+ }
259276 window . tippy ( el , config ) ;
260277 }
261278 const noterefs = window . document . querySelectorAll ( 'a[role="doc-noteref"]' ) ;
@@ -269,6 +286,125 @@ <h1 class="title">Pattern Institute By-Laws</h1>
269286 const note = window . document . getElementById ( id ) ;
270287 return note . innerHTML ;
271288 } ) ;
289+ }
290+ const xrefs = window . document . querySelectorAll ( 'a.quarto-xref' ) ;
291+ const processXRef = ( id , note ) => {
292+ // Strip column container classes
293+ const stripColumnClz = ( el ) => {
294+ el . classList . remove ( "page-full" , "page-columns" ) ;
295+ if ( el . children ) {
296+ for ( const child of el . children ) {
297+ stripColumnClz ( child ) ;
298+ }
299+ }
300+ }
301+ stripColumnClz ( note )
302+ if ( id === null || id . startsWith ( 'sec-' ) ) {
303+ // Special case sections, only their first couple elements
304+ const container = document . createElement ( "div" ) ;
305+ if ( note . children && note . children . length > 2 ) {
306+ container . appendChild ( note . children [ 0 ] . cloneNode ( true ) ) ;
307+ for ( let i = 1 ; i < note . children . length ; i ++ ) {
308+ const child = note . children [ i ] ;
309+ if ( child . tagName === "P" && child . innerText === "" ) {
310+ continue ;
311+ } else {
312+ container . appendChild ( child . cloneNode ( true ) ) ;
313+ break ;
314+ }
315+ }
316+ if ( window . Quarto ?. typesetMath ) {
317+ window . Quarto . typesetMath ( container ) ;
318+ }
319+ return container . innerHTML
320+ } else {
321+ if ( window . Quarto ?. typesetMath ) {
322+ window . Quarto . typesetMath ( note ) ;
323+ }
324+ return note . innerHTML ;
325+ }
326+ } else {
327+ // Remove any anchor links if they are present
328+ const anchorLink = note . querySelector ( 'a.anchorjs-link' ) ;
329+ if ( anchorLink ) {
330+ anchorLink . remove ( ) ;
331+ }
332+ if ( window . Quarto ?. typesetMath ) {
333+ window . Quarto . typesetMath ( note ) ;
334+ }
335+ // TODO in 1.5, we should make sure this works without a callout special case
336+ if ( note . classList . contains ( "callout" ) ) {
337+ return note . outerHTML ;
338+ } else {
339+ return note . innerHTML ;
340+ }
341+ }
342+ }
343+ for ( var i = 0 ; i < xrefs . length ; i ++ ) {
344+ const xref = xrefs [ i ] ;
345+ tippyHover ( xref , undefined , function ( instance ) {
346+ instance . disable ( ) ;
347+ let url = xref . getAttribute ( 'href' ) ;
348+ let hash = undefined ;
349+ if ( url . startsWith ( '#' ) ) {
350+ hash = url ;
351+ } else {
352+ try { hash = new URL ( url ) . hash ; } catch { }
353+ }
354+ if ( hash ) {
355+ const id = hash . replace ( / ^ # \/ ? / , "" ) ;
356+ const note = window . document . getElementById ( id ) ;
357+ if ( note !== null ) {
358+ try {
359+ const html = processXRef ( id , note . cloneNode ( true ) ) ;
360+ instance . setContent ( html ) ;
361+ } finally {
362+ instance . enable ( ) ;
363+ instance . show ( ) ;
364+ }
365+ } else {
366+ // See if we can fetch this
367+ fetch ( url . split ( '#' ) [ 0 ] )
368+ . then ( res => res . text ( ) )
369+ . then ( html => {
370+ const parser = new DOMParser ( ) ;
371+ const htmlDoc = parser . parseFromString ( html , "text/html" ) ;
372+ const note = htmlDoc . getElementById ( id ) ;
373+ if ( note !== null ) {
374+ const html = processXRef ( id , note ) ;
375+ instance . setContent ( html ) ;
376+ }
377+ } ) . finally ( ( ) => {
378+ instance . enable ( ) ;
379+ instance . show ( ) ;
380+ } ) ;
381+ }
382+ } else {
383+ // See if we can fetch a full url (with no hash to target)
384+ // This is a special case and we should probably do some content thinning / targeting
385+ fetch ( url )
386+ . then ( res => res . text ( ) )
387+ . then ( html => {
388+ const parser = new DOMParser ( ) ;
389+ const htmlDoc = parser . parseFromString ( html , "text/html" ) ;
390+ const note = htmlDoc . querySelector ( 'main.content' ) ;
391+ if ( note !== null ) {
392+ // This should only happen for chapter cross references
393+ // (since there is no id in the URL)
394+ // remove the first header
395+ if ( note . children . length > 0 && note . children [ 0 ] . tagName === "HEADER" ) {
396+ note . children [ 0 ] . remove ( ) ;
397+ }
398+ const html = processXRef ( null , note ) ;
399+ instance . setContent ( html ) ;
400+ }
401+ } ) . finally ( ( ) => {
402+ instance . enable ( ) ;
403+ instance . show ( ) ;
404+ } ) ;
405+ }
406+ } , function ( instance ) {
407+ } ) ;
272408 }
273409 let selectedAnnoteEl ;
274410 const selectorForAnnotation = ( cell , annotation ) => {
@@ -311,6 +447,7 @@ <h1 class="title">Pattern Institute By-Laws</h1>
311447 }
312448 div . style . top = top - 2 + "px" ;
313449 div . style . height = height + 4 + "px" ;
450+ div . style . left = 0 ;
314451 let gutterDiv = window . document . getElementById ( "code-annotation-line-highlight-gutter" ) ;
315452 if ( gutterDiv === null ) {
316453 gutterDiv = window . document . createElement ( "div" ) ;
@@ -336,6 +473,32 @@ <h1 class="title">Pattern Institute By-Laws</h1>
336473 } ) ;
337474 selectedAnnoteEl = undefined ;
338475 } ;
476+ // Handle positioning of the toggle
477+ window . addEventListener (
478+ "resize" ,
479+ throttle ( ( ) => {
480+ elRect = undefined ;
481+ if ( selectedAnnoteEl ) {
482+ selectCodeLines ( selectedAnnoteEl ) ;
483+ }
484+ } , 10 )
485+ ) ;
486+ function throttle ( fn , ms ) {
487+ let throttle = false ;
488+ let timer ;
489+ return ( ...args ) => {
490+ if ( ! throttle ) { // first call gets through
491+ fn . apply ( this , args ) ;
492+ throttle = true ;
493+ } else { // all the others get throttled
494+ if ( timer ) clearTimeout ( timer ) ; // cancel #2
495+ timer = setTimeout ( ( ) => {
496+ fn . apply ( this , args ) ;
497+ timer = throttle = false ;
498+ } , ms ) ;
499+ }
500+ } ;
501+ }
339502 // Attach click handler to the DT
340503 const annoteDls = window . document . querySelectorAll ( 'dt[data-target-cell]' ) ;
341504 for ( const annoteDlNode of annoteDls ) {
@@ -399,4 +562,5 @@ <h1 class="title">Pattern Institute By-Laws</h1>
399562
400563
401564
565+
402566</ body > </ html >
0 commit comments