regenerated
This commit is contained in:
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<link href='tailwind.css?instanceId=7bed6aba-2ac0-4b33-bcfe-215581a3352f' rel='stylesheet' type='text/css' />
|
||||
<link href='tailwind.css?instanceId=491bb520-566c-4957-b60d-e90510adcf88' rel='stylesheet' type='text/css' />
|
||||
|
||||
<style>
|
||||
/* Heist error element */
|
||||
@ -57,17 +57,6 @@
|
||||
}
|
||||
|
||||
/* External link icon */
|
||||
a[data-linkicon]:not([data-linkicon=""]):not([data-linkicon="none"])::after {
|
||||
/* filter converts black to rgb(156,163,175) */
|
||||
filter: invert(71%) sepia(3%) saturate(904%) hue-rotate(179deg) brightness(92%) contrast(87%);
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
a[data-linkicon]:not([data-linkicon=""]):not([data-linkicon="none"]):hover::after {
|
||||
/* filter converts black to rgb(175,85,99) */
|
||||
filter: invert(32%) sepia(10%) saturate(834%) hue-rotate(176deg) brightness(92%) contrast(88%);
|
||||
}
|
||||
|
||||
a[data-linkicon=""]::after {
|
||||
content: ""
|
||||
}
|
||||
@ -77,11 +66,34 @@
|
||||
}
|
||||
|
||||
a[data-linkicon="external"]::after {
|
||||
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1em' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14' /%3E%3C/svg%3E");
|
||||
content: url('data:image/svg+xml,\
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="0.7em" viewBox="0 0 20 20"> \
|
||||
<g style="stroke:gray;stroke-width:1"> \
|
||||
<line x1="5" y1="5" x2="5" y2="14" /> \
|
||||
<line x1="14" y1="9" x2="14" y2="14" /> \
|
||||
<line x1="5" y1="14" x2="14" y2="14" /> \
|
||||
<line x1="5" y1="5" x2="9" y2="5" /> \
|
||||
<line x1="10" y1="2" x2="17" y2="2" /> \
|
||||
<line x1="17" y1="2" x2="17" y2="9" /> \
|
||||
<line x1="10" y1="9" x2="17" y2="2" style="stroke-width:1.0" /> \
|
||||
</g> \
|
||||
</svg>');
|
||||
}
|
||||
|
||||
a[data-linkicon="external"][href^="mailto:"]::after {
|
||||
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='1em' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z' /%3E%3C/svg%3E");
|
||||
content: url('data:image/svg+xml,\
|
||||
<svg \
|
||||
xmlns="http://www.w3.org/2000/svg" \
|
||||
height="0.7em" \
|
||||
fill="none" \
|
||||
viewBox="0 0 24 24" \
|
||||
stroke="gray" \
|
||||
stroke-width="2"> \
|
||||
<path \
|
||||
stroke-linecap="round" \
|
||||
stroke-linejoin="round" \
|
||||
d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /> \
|
||||
</svg>');
|
||||
}
|
||||
</style>
|
||||
<!-- What goes in this file will appear on near the end of <head>--><link rel='preload' href='_emanote-static/fonts/Work_Sans/WorkSans-VariableFont_wght.ttf' as='font' type='font/ttf' crossorigin />
|
||||
@ -150,11 +162,13 @@
|
||||
<script src='_emanote-static/stork/stork.js'></script>
|
||||
|
||||
|
||||
<script data-emanote-base-url='/'>
|
||||
<script id='emanote-stork' data-emanote-base-url='/'>
|
||||
window.emanote = {};
|
||||
window.emanote.stork = {
|
||||
searchShown: false,
|
||||
indexIsStale: false,
|
||||
toggleSearch: function () {
|
||||
window.emanote.stork.refreshIndex();
|
||||
document.getElementById('stork-search-container').classList.toggle('hidden');
|
||||
window.emanote.stork.searchShown = document.body.classList.toggle('stork-overflow-hidden-important');
|
||||
if (window.emanote.stork.searchShown) {
|
||||
@ -167,14 +181,25 @@
|
||||
window.emanote.stork.searchShown = false;
|
||||
},
|
||||
|
||||
init: function () {
|
||||
getBaseUrl: function () {
|
||||
const baseUrl = document.getElementById("emanote-stork").getAttribute('data-emanote-base-url') || '/';
|
||||
return baseUrl;
|
||||
},
|
||||
|
||||
registerIndex: function (options) {
|
||||
const indexName = 'emanote-search'; // used to match input[data-stork] attribute value
|
||||
const baseUrl = document.currentScript.getAttribute('data-emanote-base-url') || '/';
|
||||
const indexUrl = baseUrl + '-/stork.st';
|
||||
const indexUrl = window.emanote.stork.getBaseUrl() + '-/stork.st';
|
||||
stork.register(
|
||||
indexName,
|
||||
indexUrl,
|
||||
options);
|
||||
},
|
||||
|
||||
init: function () {
|
||||
if (document.readyState !== 'complete') {
|
||||
window.addEventListener('load', function () {
|
||||
stork.initialize(baseUrl + '_emanote-static/stork/stork.wasm');
|
||||
stork.register(indexName, indexUrl);
|
||||
stork.initialize(window.emanote.stork.getBaseUrl() + '_emanote-static/stork/stork.wasm');
|
||||
window.emanote.stork.registerIndex();
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', event => {
|
||||
@ -187,10 +212,32 @@
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Override existing on Ema's hot-reload
|
||||
stork.register(indexName, indexUrl, { forceOverwrite: true });
|
||||
// This section is called during Ema's hot reload.
|
||||
//
|
||||
// Mark the current index as stale, and refresh it *only when* the
|
||||
// user actually invokes search.
|
||||
//
|
||||
// We do not refresh the index *right away*, as that will cause
|
||||
// memory leaks in the browser. See
|
||||
// https://github.com/srid/emanote/issues/411#issuecomment-1402056235
|
||||
console.log("stork: Marking index as stale");
|
||||
window.emanote.stork.markIndexAsStale();
|
||||
}
|
||||
},
|
||||
|
||||
markIndexAsStale: function () {
|
||||
window.emanote.stork.indexIsStale = true;
|
||||
},
|
||||
|
||||
refreshIndex: function () {
|
||||
if (window.emanote.stork.indexIsStale) {
|
||||
console.log("stork: Reloading index");
|
||||
window.emanote.stork.indexIsStale = false;
|
||||
// NOTE: This will leak memory. See the comment above.
|
||||
window.emanote.stork.registerIndex({ forceOverwrite: true });
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
window.emanote.stork.init();
|
||||
@ -240,7 +287,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href='https://emanote.srid.ca' target='_blank' title='Generated by Emanote 0.8.1.10'>
|
||||
<a href='https://emanote.srid.ca' target='_blank' title='Generated by Emanote 1.0.3.11'>
|
||||
<img class='w-6 h-6 hover:text-purple-700' src='_emanote-static/emanote-logo.svg' />
|
||||
</a>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user