maggicl
6faa2d5ffe
git-svn-id: svn+ssh://atelier.inf.usi.ch/home/bevilj/group-1@55 a672b425-5310-4d7a-af5c-997e18724b81
35 lines
970 B
HTML
35 lines
970 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
{% include head.html %}
|
|
<body>
|
|
<header class="header">
|
|
{% include header.html %}
|
|
</header>
|
|
<main class="container">
|
|
{{ content }}
|
|
</main>
|
|
{% include footer.html %}
|
|
<script src="https://cdn.rawgit.com/christian-fei/Simple-Jekyll-Search/master/dest/simple-jekyll-search.min.js"></script>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
var searchBar = document.getElementById('search-bar');
|
|
var results = document.getElementById('search-results');
|
|
|
|
var sjs = SimpleJekyllSearch({
|
|
searchInput: searchBar,
|
|
resultsContainer: results,
|
|
json: '/search.json',
|
|
searchResultTemplate:
|
|
'<a href="{url}"><h3>{title}</h3><h4>{category}</h4></a>',
|
|
success: function(sr) {
|
|
results.setAttribute("class", sr.length <= 1 ? "" : "show");
|
|
}
|
|
});
|
|
|
|
searchBar.addEventListener('keypress', function () {
|
|
sjs.search();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|