@@ -165,11 +165,9 @@ function makeTeaser(body, terms) {
165function formatSearchResultTitle(item) {
165function formatSearchResultTitle(item) {
166 var pathArray = item.ref.split( '/' );
166 var pathArray = item.ref.split( '/' );
168− // first directory is in 4th element of split path array
169 var firstPartTitle = pathArray[3];
168 var firstPartTitle = pathArray[3];
170 let firstTitleCapitals = firstPartTitle.charAt(0).toUpperCase() + firstPartTitle.slice(1);
169 let firstTitleCapitals = firstPartTitle.charAt(0).toUpperCase() + firstPartTitle.slice(1);
172− // last directory is in 2nd to last element of array
173 var lastPartTitle = item.doc.title;
171 var lastPartTitle = item.doc.title;
175 var fullTitle = firstTitleCapitals + '<span class="gray1 dib pl2">' + ' / ' + lastPartTitle + '</span>';
173 var fullTitle = firstTitleCapitals + '<span class="gray1 dib pl2">' + ' / ' + lastPartTitle + '</span>';
@@ -390,22 +388,26 @@ window.addEventListener("scroll", event => {
390 link.classList.remove("current");
388 link.classList.remove("current");
394− // this is honestly weird UX when selecting a link,
393+// homepage video load behaviour on mobile
395− // as every header flies open as you scroll.
394+
396− // for later discussion and experimentation --
395+
397− // may just need debouncing.
396+if (document.body.classList.contains("index")) {
398− // Also still working out the logic for closing other summary
397+ if( navigator.userAgent.match(/Android/i)
399− // headers as you scroll.
398+ || navigator.userAgent.match(/webOS/i)
400−
399+ || navigator.userAgent.match(/iPhone/i)
401−// headers.forEach(summary => {
400+ || navigator.userAgent.match(/iPad/i)
402−// let thisH2 = document.querySelector("h2#" + CSS.escape(summary.id));
401+ || navigator.userAgent.match(/iPod/i)
403−// if (
402+ || navigator.userAgent.match(/BlackBerry/i)
404−// (thisH2.offsetTop <= fromTop) &&
403+ || navigator.userAgent.match(/Windows Phone/i)
405−// (thisH2.offsetTop + thisH2.offsetHeight > fromTop)
404+ ){
407−// summary.parentElement.open = true;
406+ document.getElementById("landscapevid").innerHTML = `
407+ <source src="https://media.urbit.org/site/understanding-urbit/landscape.webm" type="video/webm">
408+ <source src="https://media.urbit.org/site/understanding-urbit/landscape.mp4" type="video/mp4">`;
409+ document.getElementById("oceanvid").innerHTML = `
410+ <source src="https://media.urbit.org/site/understanding-urbit/ocean.webm" type="video/webm">
411+ <source src="https://media.urbit.org/site/understanding-urbit/ocean.mp4" type="video/mp4">`;