first commit
This commit is contained in:
495
public/docs/example-page/index.html
Normal file
495
public/docs/example-page/index.html
Normal file
@@ -0,0 +1,495 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<html lang="en-us"><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||||
<meta charset="utf-8" />
|
||||
<title>Hello | Federated Computer Enterprise</title>
|
||||
<meta name="robots" content="noindex">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="keywords" content="Documentation, Hugo, Hugo Theme, Bootstrap" />
|
||||
<meta name="author" content="Colin Wilson - Lotus Labs" />
|
||||
<meta name="email" content="support@aigis.uk" />
|
||||
<meta name="website" content="https://lotusdocs.dev" />
|
||||
<meta name="Version" content="v0.1.0" />
|
||||
|
||||
<link rel="icon" href="http://localhost:1313/favicon.ico" sizes="any">
|
||||
<link rel="icon" type="image/svg+xml" href="http://localhost:1313/favicon.svg">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="http://localhost:1313/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="http://localhost:1313/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="http://localhost:1313/favicon-16x16.png">
|
||||
<link rel="manifest" crossorigin="use-credentials" href="http://localhost:1313/site.webmanifest">
|
||||
<meta property="og:title" content="Hello" />
|
||||
<meta property="og:description" content="" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="http://localhost:1313/docs/example-page/" /><meta property="og:image" content="http://localhost:1313/opengraph/card-base-2_hu_91f7166aabb5235b.png"/><meta property="article:section" content="docs" />
|
||||
<meta property="article:published_time" content="2025-08-25T12:13:47-06:00" />
|
||||
<meta property="article:modified_time" content="2025-08-25T12:13:47-06:00" /><meta name="twitter:card" content="summary_large_image"/>
|
||||
<meta name="twitter:image" content="http://localhost:1313/opengraph/card-base-2_hu_91f7166aabb5235b.png"/>
|
||||
<meta name="twitter:title" content="Hello"/>
|
||||
<meta name="twitter:description" content=""/>
|
||||
|
||||
|
||||
<link rel="alternate" type="application/atom+xml" title="Atom feed for Federated Computer Enterprise" href="/index.xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" src="http://localhost:1313/docs/js/flexsearch.bundle.js"></script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/docs/scss/style.css" crossorigin="anonymous">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div class="page-wrapper toggled">
|
||||
<nav id="sidebar" class="sidebar-wrapper">
|
||||
<div class="sidebar-brand">
|
||||
<a href='/' aria-label="HomePage" alt="HomePage">
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"><path d="m143,39.5c-18,0-18,18-18,18,0,0,0-18-18-18H22c-2.76,0-5,2.24-5,5v143c0,2.76,2.24,5,5,5h76c7.2,0,8.64,11.52,8.93,16.13.07,1.05.95,1.87,2,1.87h32.14c1.06,0,1.94-.82,2-1.87.29-4.61,1.73-16.13,8.93-16.13h76c2.76,0,5-2.24,5-5V44.5c0-2.76-2.24-5-5-5h-85Zm63,123.5c0,1.38-1.12,2.5-2.5,2.5h-60.5c-18,0-18,18-18,18,0,0,0-18-18-18h-60.5c-1.38,0-2.5-1.12-2.5-2.5v-94c0-1.38,1.12-2.5,2.5-2.5h51.5c7.2,0,8.64,11.52,8.93,16.13.07,1.05.95,1.87,2,1.87h32.14c1.06,0,1.94-.82,2-1.87.29-4.61,1.73-16.13,8.93-16.13h51.5c1.38,0,2.5,1.12,2.5,2.5v94Z" style="fill:#06f;"/></svg>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
<div class="sidebar-content" style="height: calc(100% - 131px);">
|
||||
<ul class="sidebar-menu">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="current">
|
||||
<a class="sidebar-root-link" href="http://localhost:1313/docs/example-page/">
|
||||
|
||||
Hello
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="sidebar-footer list-unstyled mb-0">
|
||||
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
|
||||
<main class="page-content bg-transparent">
|
||||
|
||||
<div id="top-header" class="top-header d-print-none">
|
||||
<div class="header-bar d-flex justify-content-between">
|
||||
<div class="d-flex align-items-center">
|
||||
<a href='/' class="logo-icon me-3" aria-label="HomePage" alt="HomePage">
|
||||
<div class="small">
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"><path d="m143,39.5c-18,0-18,18-18,18,0,0,0-18-18-18H22c-2.76,0-5,2.24-5,5v143c0,2.76,2.24,5,5,5h76c7.2,0,8.64,11.52,8.93,16.13.07,1.05.95,1.87,2,1.87h32.14c1.06,0,1.94-.82,2-1.87.29-4.61,1.73-16.13,8.93-16.13h76c2.76,0,5-2.24,5-5V44.5c0-2.76-2.24-5-5-5h-85Zm63,123.5c0,1.38-1.12,2.5-2.5,2.5h-60.5c-18,0-18,18-18,18,0,0,0-18-18-18h-60.5c-1.38,0-2.5-1.12-2.5-2.5v-94c0-1.38,1.12-2.5,2.5-2.5h51.5c7.2,0,8.64,11.52,8.93,16.13.07,1.05.95,1.87,2,1.87h32.14c1.06,0,1.94-.82,2-1.87.29-4.61,1.73-16.13,8.93-16.13h51.5c1.38,0,2.5,1.12,2.5,2.5v94Z" style="fill:#06f;"/></svg>
|
||||
|
||||
</div>
|
||||
<div class="big">
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"><path d="m143,39.5c-18,0-18,18-18,18,0,0,0-18-18-18H22c-2.76,0-5,2.24-5,5v143c0,2.76,2.24,5,5,5h76c7.2,0,8.64,11.52,8.93,16.13.07,1.05.95,1.87,2,1.87h32.14c1.06,0,1.94-.82,2-1.87.29-4.61,1.73-16.13,8.93-16.13h76c2.76,0,5-2.24,5-5V44.5c0-2.76-2.24-5-5-5h-85Zm63,123.5c0,1.38-1.12,2.5-2.5,2.5h-60.5c-18,0-18,18-18,18,0,0,0-18-18-18h-60.5c-1.38,0-2.5-1.12-2.5-2.5v-94c0-1.38,1.12-2.5,2.5-2.5h51.5c7.2,0,8.64,11.52,8.93,16.13.07,1.05.95,1.87,2,1.87h32.14c1.06,0,1.94-.82,2-1.87.29-4.61,1.73-16.13,8.93-16.13h51.5c1.38,0,2.5,1.12,2.5,2.5v94Z" style="fill:#06f;"/></svg>
|
||||
|
||||
</div>
|
||||
</a>
|
||||
<button id="close-sidebar" class="btn btn-icon btn-soft">
|
||||
<span class="material-icons size-20 menu-icon align-middle">menu</span>
|
||||
</button>
|
||||
|
||||
|
||||
|
||||
<button id="flexsearch-button" class="ms-3 btn btn-soft" data-bs-toggle="collapse" data-bs-target="#FlexSearchCollapse" aria-expanded="false" aria-controls="FlexSearchCollapse">
|
||||
<span class="material-icons size-20 menu-icon align-middle">search</span>
|
||||
<span class="flexsearch-button-placeholder ms-1 me-2 d-none d-sm-block">Search</span>
|
||||
<div class="d-none d-sm-block">
|
||||
<span class="flexsearch-button-keys">
|
||||
<kbd class="flexsearch-button-cmd-key">
|
||||
<svg width="44" height="15"><path d="M2.118,11.5A1.519,1.519,0,0,1,1,11.042,1.583,1.583,0,0,1,1,8.815a1.519,1.519,0,0,1,1.113-.458h.715V6.643H2.118A1.519,1.519,0,0,1,1,6.185,1.519,1.519,0,0,1,.547,5.071,1.519,1.519,0,0,1,1,3.958,1.519,1.519,0,0,1,2.118,3.5a1.519,1.519,0,0,1,1.114.458A1.519,1.519,0,0,1,3.69,5.071v.715H5.4V5.071A1.564,1.564,0,0,1,6.976,3.5,1.564,1.564,0,0,1,8.547,5.071,1.564,1.564,0,0,1,6.976,6.643H6.261V8.357h.715a1.575,1.575,0,0,1,1.113,2.685,1.583,1.583,0,0,1-2.227,0A1.519,1.519,0,0,1,5.4,9.929V9.214H3.69v.715a1.519,1.519,0,0,1-.458,1.113A1.519,1.519,0,0,1,2.118,11.5Zm0-.857a.714.714,0,0,0,.715-.714V9.214H2.118a.715.715,0,1,0,0,1.429Zm4.858,0a.715.715,0,1,0,0-1.429H6.261v.715a.714.714,0,0,0,.715.714ZM3.69,8.357H5.4V6.643H3.69ZM2.118,5.786h.715V5.071a.714.714,0,0,0-.715-.714.715.715,0,0,0-.5,1.22A.686.686,0,0,0,2.118,5.786Zm4.143,0h.715a.715.715,0,0,0,.5-1.22.715.715,0,0,0-1.22.5Z" fill="currentColor"></path><path d="M12.4,11.475H11.344l3.879-7.95h1.056Z" fill="currentColor"></path><path d="M25.073,5.384l-.864.576a2.121,2.121,0,0,0-1.786-.923,2.207,2.207,0,0,0-2.266,2.326,2.206,2.206,0,0,0,2.266,2.325,2.1,2.1,0,0,0,1.782-.918l.84.617a3.108,3.108,0,0,1-2.622,1.293,3.217,3.217,0,0,1-3.349-3.317,3.217,3.217,0,0,1,3.349-3.317A3.046,3.046,0,0,1,25.073,5.384Z" fill="currentColor"></path><path d="M30.993,5.142h-2.07v5.419H27.891V5.142h-2.07V4.164h5.172Z" fill="currentColor"></path><path d="M34.67,4.164c1.471,0,2.266.658,2.266,1.851,0,1.087-.832,1.809-2.134,1.855l2.107,2.691h-1.28L33.591,7.87H33.07v2.691H32.038v-6.4Zm-1.6.969v1.8h1.572c.832,0,1.22-.3,1.22-.918s-.411-.882-1.22-.882Z" fill="currentColor"></path><path d="M42.883,10.561H38.31v-6.4h1.033V9.583h3.54Z" fill="currentColor"></path></svg>
|
||||
</kbd>
|
||||
<kbd class="flexsearch-button-key">
|
||||
<svg width="15" height="15"><path d="M5.926,12.279H4.41L9.073,2.721H10.59Z" fill="currentColor"/></svg>
|
||||
</kbd>
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<ul class="list-unstyled mb-0">
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="collapse" id="FlexSearchCollapse">
|
||||
<div class="flexsearch-container">
|
||||
<div class="flexsearch-keymap">
|
||||
<li>
|
||||
<kbd class="flexsearch-button-cmd-key"><svg width="15" height="15" aria-label="Arrow down" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M7.5 3.5v8M10.5 8.5l-3 3-3-3"></path></g></svg></kbd>
|
||||
<kbd class="flexsearch-button-cmd-key"><svg width="15" height="15" aria-label="Arrow up" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M7.5 11.5v-8M10.5 6.5l-3-3-3 3"></path></g></svg></kbd>
|
||||
<span class="flexsearch-key-label">to navigate</span>
|
||||
</li>
|
||||
<li>
|
||||
<kbd class="flexsearch-button-cmd-key"><svg width="15" height="15" aria-label="Enter key" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"></path></g></svg></kbd>
|
||||
<span class="flexsearch-key-label">to select</span>
|
||||
</li>
|
||||
<li>
|
||||
<kbd class="flexsearch-button-cmd-key"><svg width="15" height="15" aria-label="Escape key" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"></path></g></svg></kbd>
|
||||
<span class="flexsearch-key-label">to close</span>
|
||||
</li>
|
||||
</div>
|
||||
<form class="flexsearch position-relative flex-grow-1 ms-2 me-2">
|
||||
<div class="d-flex flex-row">
|
||||
<input id="flexsearch" class="form-control" type="search" placeholder="Search" aria-label="Search" autocomplete="off">
|
||||
<button id="hideFlexsearch" type="button" class="ms-2 btn btn-soft">
|
||||
cancel
|
||||
</button>
|
||||
</div>
|
||||
<div id="suggestions" class="shadow rounded-1 d-none"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="layout-spacing">
|
||||
|
||||
<div class="d-md-flex justify-content-between align-items-center"><nav aria-label="breadcrumb" class="d-inline-block pb-2 mt-1 mt-sm-0">
|
||||
<ul id="breadcrumbs" class="breadcrumb bg-transparent mb-0" itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||
|
||||
|
||||
<li class="breadcrumb-item text-capitalize active" aria-current="page" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a itemprop="item" href="/docs/">
|
||||
<i class="material-icons size-20 align-text-bottom" itemprop="name">Home</i>
|
||||
</a>
|
||||
<meta itemprop="position" content='1' />
|
||||
</li>
|
||||
|
||||
|
||||
<li class="breadcrumb-item text-capitalize active" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<span itemprop="name">Hello</span>
|
||||
<meta itemprop="position" content='2' />
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav></div>
|
||||
|
||||
<div class="row flex-xl-nowrap">
|
||||
|
||||
<div class="docs-toc col-xl-3 visually-hidden d-xl-block"><toc>
|
||||
<div class="fw-bold text-uppercase mb-2">On this page</div>
|
||||
<nav id="TableOfContents"></nav>
|
||||
</toc></div>
|
||||
|
||||
|
||||
<div class="docs-toc-mobile visually-hidden d-print-none d-xl-none">
|
||||
<button id="toc-dropdown-btn" class="btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" data-bs-offset="0,0" aria-expanded="false">
|
||||
Table of Contents
|
||||
</button>
|
||||
<nav id="toc-mobile"></nav></div>
|
||||
<div class="docs-content col-12 mt-0">
|
||||
<div class="mb-0 d-flex">
|
||||
|
||||
<h1 class="content-title mb-0">
|
||||
Hello
|
||||
|
||||
<span class="badge bg-default fs-6 mb-1 align-middle">DRAFT</span>
|
||||
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div id="content" class="main-content" >
|
||||
|
||||
|
||||
<div data-prismjs-copy="" data-prismjs-copy-success="" data-prismjs-copy-error="">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div><hr class="doc-hr">
|
||||
<div id="doc-nav" class="d-print-none">
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="shadow py-3 d-print-none">
|
||||
<div class="container-fluid">
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<div class="text-sm-start text-center mx-md-2">
|
||||
<p class="mb-0">
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<button onclick="topFunction()" id="back-to-top" aria-label="Back to Top Button" class="back-to-top fs-5"><svg width="24" height="24"><path d="M12,10.224l-6.3,6.3L4.32,15.152,12,7.472l7.68,7.68L18.3,16.528Z" style="fill:#fff"/></svg></button>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="/docs/js/bootstrap.js" defer></script>
|
||||
|
||||
|
||||
<script type="text/javascript" src="http://localhost:1313/docs/js/bundle.js" defer></script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="module">
|
||||
var suggestions = document.getElementById('suggestions');
|
||||
var search = document.getElementById('flexsearch');
|
||||
|
||||
const flexsearchContainer = document.getElementById('FlexSearchCollapse');
|
||||
|
||||
const hideFlexsearchBtn = document.getElementById('hideFlexsearch');
|
||||
|
||||
const configObject = { toggle: false }
|
||||
const flexsearchContainerCollapse = new Collapse(flexsearchContainer, configObject)
|
||||
|
||||
if (search !== null) {
|
||||
document.addEventListener('keydown', inputFocus);
|
||||
flexsearchContainer.addEventListener('shown.bs.collapse', function () {
|
||||
search.focus();
|
||||
});
|
||||
|
||||
var topHeader = document.getElementById("top-header");
|
||||
document.addEventListener('click', function(elem) {
|
||||
if (!flexsearchContainer.contains(elem.target) && !topHeader.contains(elem.target))
|
||||
flexsearchContainerCollapse.hide();
|
||||
});
|
||||
}
|
||||
|
||||
hideFlexsearchBtn.addEventListener('click', () =>{
|
||||
flexsearchContainerCollapse.hide()
|
||||
})
|
||||
|
||||
function inputFocus(e) {
|
||||
if (e.ctrlKey && e.key === '/') {
|
||||
e.preventDefault();
|
||||
flexsearchContainerCollapse.toggle();
|
||||
}
|
||||
if (e.key === 'Escape' ) {
|
||||
search.blur();
|
||||
|
||||
flexsearchContainerCollapse.hide();
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('click', function(event) {
|
||||
|
||||
var isClickInsideElement = suggestions.contains(event.target);
|
||||
|
||||
if (!isClickInsideElement) {
|
||||
suggestions.classList.add('d-none');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
document.addEventListener('keydown',suggestionFocus);
|
||||
|
||||
function suggestionFocus(e) {
|
||||
const suggestionsHidden = suggestions.classList.contains('d-none');
|
||||
if (suggestionsHidden) return;
|
||||
|
||||
const focusableSuggestions= [...suggestions.querySelectorAll('a')];
|
||||
if (focusableSuggestions.length === 0) return;
|
||||
|
||||
const index = focusableSuggestions.indexOf(document.activeElement);
|
||||
|
||||
if (e.key === "ArrowUp") {
|
||||
e.preventDefault();
|
||||
const nextIndex = index > 0 ? index - 1 : 0;
|
||||
focusableSuggestions[nextIndex].focus();
|
||||
}
|
||||
else if (e.key === "ArrowDown") {
|
||||
e.preventDefault();
|
||||
const nextIndex= index + 1 < focusableSuggestions.length ? index + 1 : index;
|
||||
focusableSuggestions[nextIndex].focus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
(function(){
|
||||
|
||||
var index = new FlexSearch.Document({
|
||||
|
||||
tokenize: "forward",
|
||||
minlength: 0 ,
|
||||
cache: 100 ,
|
||||
optimize: true ,
|
||||
document: {
|
||||
id: 'id',
|
||||
store: [
|
||||
"href", "title", "description"
|
||||
],
|
||||
index: ["title", "description", "content"]
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
index.add(
|
||||
{
|
||||
id: 0 ,
|
||||
href: "\/docs\/example-page\/",
|
||||
title: "Hello",
|
||||
description: "",
|
||||
content: ""
|
||||
}
|
||||
);
|
||||
index.add(
|
||||
{
|
||||
id: 1 ,
|
||||
href: "\/docs\/",
|
||||
title: "Docs",
|
||||
description: "",
|
||||
content: ""
|
||||
}
|
||||
);
|
||||
search.addEventListener('input', show_results, true);
|
||||
|
||||
function show_results(){
|
||||
const maxResult = 5 ;
|
||||
const minlength = 0 ;
|
||||
var searchQuery = sanitizeHTML(this.value);
|
||||
var results = index.search(searchQuery, {limit: maxResult, enrich: true});
|
||||
|
||||
|
||||
const flatResults = new Map();
|
||||
for (const result of results.flatMap(r => r.result)) {
|
||||
if (flatResults.has(result.doc.href)) continue;
|
||||
flatResults.set(result.doc.href, result.doc);
|
||||
}
|
||||
|
||||
suggestions.innerHTML = "";
|
||||
suggestions.classList.remove('d-none');
|
||||
|
||||
|
||||
if (searchQuery.length < minlength) {
|
||||
const minCharMessage = document.createElement('div')
|
||||
minCharMessage.innerHTML = `Please type at least <strong>${minlength}</strong> characters`
|
||||
minCharMessage.classList.add("suggestion__no-results");
|
||||
suggestions.appendChild(minCharMessage);
|
||||
return;
|
||||
} else {
|
||||
|
||||
if (flatResults.size === 0 && searchQuery) {
|
||||
const noResultsMessage = document.createElement('div')
|
||||
noResultsMessage.innerHTML = "No results for" + ` "<strong>${searchQuery}</strong>"`
|
||||
noResultsMessage.classList.add("suggestion__no-results");
|
||||
suggestions.appendChild(noResultsMessage);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for(const [href, doc] of flatResults) {
|
||||
const entry = document.createElement('div');
|
||||
suggestions.appendChild(entry);
|
||||
|
||||
const a = document.createElement('a');
|
||||
a.href = href;
|
||||
entry.appendChild(a);
|
||||
|
||||
const title = document.createElement('span');
|
||||
title.textContent = doc.title;
|
||||
title.classList.add("suggestion__title");
|
||||
a.appendChild(title);
|
||||
|
||||
const description = document.createElement('span');
|
||||
description.textContent = doc.description;
|
||||
description.classList.add("suggestion__description");
|
||||
a.appendChild(description);
|
||||
|
||||
suggestions.appendChild(entry);
|
||||
|
||||
if(suggestions.childElementCount == maxResult) break;
|
||||
}
|
||||
}
|
||||
}());
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user