-
Notifications
You must be signed in to change notification settings - Fork 0
/
try.html
63 lines (51 loc) · 1.6 KB
/
try.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
layout: default
---
<h1>Frontsearch Playground</h1>
<p>Try out our library here!</p>
<p style="display: block; margin: 0 auto;"><a href="https://frontsearch.js.org">Back</a></p>
<br>
<!-- Search Bar -->
<input type="search" id="search-input" placeholder="Search Database" style="width: 80% !important; height: 50px !important;">
<!-- Important Part -->
<div class="entries-container"></div>
<script>
var frontsearchMessage = 'type * to show all entries'
var frontsearchNoResultsMessage = 'no results'
var frontsearchFilterTerm = '*'
var frontsearchShowAll = false
function getEntryHTML(entry) {
console.log(entry);
//if (typeof entryStructure === 'undefined') {
// entryStructure = `
// <div>
// <h2>${entry.name}</h2>
// <small><p>${entry.category}</p></small>
// <p>${entry.description}</p>
// </div>
// `;
//} else {
// entryStructure = entryStructure.replace("'", ``);
//}
//console.log(entryStructure);
return `
<div>
<h2>${entry.name}</h2>
<small><p>${entry.category}</p></small>
<p>${entry.description}</p>
</div>
`;
};
//var entryStructure = '\
//<div>\
//<h2>${entry.name}</h2>\
//<p>${entry.description}</p>\
//</div>';
const jsonUrls = [
'https://frontsearch.js.org/src/sample.json'
// Add more URLs as needed
];
</script>
<!-- Place this tag in your head or just before your close body tag. For writers, please ignore this tag. -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
<script src="https://frontsearch.js.org/src/[email protected]"></script>