Sha256: e7f4f5b1af9ee06e7725e03d25b6074c5750cdab117986ec6cb1e14e2ed927f8
Contents?: true
Size: 1.49 KB
Versions: 4
Compression:
Stored size: 1.49 KB
Contents
--- layout: default --- <script type="text/javascript"> function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } $(document).ready(function() { var urlParams = getUrlVars() $('#querystring').text(urlParams.q) $('#q').val(urlParams.q) $.getJSON(api_gateway_url + '/search?q=' + urlParams.q, null, function(msg) { for (let index = 0; index < msg.length; index++) { const result = msg[index]; $('#results').append('<p class="h4"><a href="' + result.url + '">' + result.title + '</a></p>') $('#results').append('<p>' + result.extract.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"') + '...</p>') } }); }) </script> <div> </div> <div class="jumbotron"> <div class="container"> <div class="row"> <div class="col"> <h1 class="display-4">{{ page.title | escape }}</h1> </div> </div> </div> </div> {{ content }} <p class="h5" style="padding-bottom: 10px;">Showing search results for '<span id="querystring"></span>'</p> <div id="results"></div>
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
bfdotcom-theme-0.3.5 | _layouts/search.html |
bfdotcom-theme-0.3.4 | _layouts/search.html |
bfdotcom-theme-0.3.3 | _layouts/search.html |
bfdotcom-theme-0.3.1 | _layouts/search.html |