Skip to content

Commit

Permalink
Add search menu script.
Browse files Browse the repository at this point in the history
  • Loading branch information
hcayless committed Jul 22, 2024
1 parent c8b33ce commit c4508f0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/_includes/searchmenu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script>
function setSearch(target) {
const input = document.getElementById("sitesearch");
const query = document.getElementById("query_string");
if (target == 'all') {
input.setAttribute('value', 'https://tei-c.org');
query.setAttribute('placeholder', 'Search');
}
if (target == 'guidelines') {
input.setAttribute('value', `https://tei-c.org/release/doc/tei-p5-doc/en/html/`);
query.setAttribute('placeholder', 'Search Guidelines');
}
}
</script>

0 comments on commit c4508f0

Please sign in to comment.