mirror of
https://github.com/mipmip/home-manager-option-search.git
synced 2024-09-11 15:16:31 +03:00
deploy: 96340352f8
This commit is contained in:
parent
b269d556ae
commit
775decd01f
@ -56,9 +56,18 @@ header {
|
||||
text-decoration: none; }
|
||||
header .logo {
|
||||
min-width: 295px;
|
||||
font-size: 100%; }
|
||||
font-size: 100%;
|
||||
}
|
||||
header .logo a,
|
||||
header .logo a:visited {
|
||||
color:white;
|
||||
font-size: 120%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
header .logo * {
|
||||
vertical-align: middle; }
|
||||
vertical-align: middle;
|
||||
}
|
||||
header .logo img {
|
||||
height: 32px;
|
||||
margin-right: 0.5rem; }
|
||||
@ -192,7 +201,7 @@ article > aside {
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
@ -770,7 +779,7 @@ table.nur-stats tr td{
|
||||
table {
|
||||
text-align: left;
|
||||
position: relative;
|
||||
border-collapse: collapse;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th {
|
||||
background: white;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
<!doctype html><html lang=en><head><meta name=generator content="Hugo 0.125.3"><meta charset=UTF-8><title>Home Manager - Option Search</title>
|
||||
<link rel="shortcut icon" href=images/favicon.png type=image/x-icon><link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css integrity=sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u crossorigin=anonymous><link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css integrity=sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp crossorigin=anonymous><link rel=search type=application/opensearchdescription+xml title="Home Manager - Option Search" href=opensearch.xml><script src=https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js></script><script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js integrity=sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa crossorigin=anonymous></script><script async src=https://umami.pimsnel.com/script.js data-website-id=8e970d59-b517-4ba6-9b92-207e7dbdb4b1></script><link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css><link href=css/nucleus.css rel=stylesheet><link href=css/style-nix.css rel=stylesheet><link rel=stylesheet href=css/style-q2.css><script async src=https://media.ethicalads.io/media/client/ethicalads.min.js></script></head><body><div id=eadiv data-ea-publisher=extranixcom data-ea-type=text></div><header><div id=lastUpdateElement style=position:absolute;line-height:11px;right:37px;top:59px></div><div class=logo><a class=baselink href=./><img src=images/home-manager-option-search2.png></a></div><nav class=shortcuts><li style=padding-top:10px><a href=https://nix-community.github.io/home-manager/ rel=noopener><i class="fa fa-book"></i> <label>HM Documentation</label></a></li><li style=padding-top:10px><a href=https://github.com/mipmip/home-manager-option-search rel=noopener><i class="fa fa-github"></i> <label>Source</label></a></li><li style=margin-left:9px;padding-top:14px><iframe style=width:51px src="https://ghbtns.com/github-btn.html?user=mipmip&repo=home-manager-option-search&type=star&count=false&text=true" frameborder=0 scrolling=0 width=150 height=20 title=GitHub></iframe></li></nav></header><div class=xcontainer style=padding-top:70px><div class=modal id=myModal tabindex=-1 role=dialog aria-labelledby=myModalLabel><div class="modal-dialog modal-lg" role=document><div class=modal-content><div class=modal-header><button type=button class=close data-dismiss=modal aria-label=Close><span aria-hidden=true>×</span></button><h4 class=modal-title id=myModalLabel>Modal title</h4></div><div class=modal-body id=myModalBody>...</div><div class=modal-footer><button type=button class="btn btn-default" data-dismiss=modal>Close</button></div></div></div></div><div id=searchform xstyle="background-color: white;top:54px;position:sticky;"><form method=get action=? onsubmit=searchEnter()><div class=form-group><label for=searchInput>Option Search
|
||||
<link rel="shortcut icon" href=images/favicon.png type=image/x-icon><link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css integrity=sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u crossorigin=anonymous><link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css integrity=sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp crossorigin=anonymous><meta name=description content><meta name=keywords content><link rel=search type=application/opensearchdescription+xml title="Home Manager - Option Search" href=opensearch.xml><script src=https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js></script><script src=https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js integrity=sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa crossorigin=anonymous></script><link rel=stylesheet href=https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css><link href=css/nucleus.css rel=stylesheet><link href=css/style-nix.css rel=stylesheet><link rel=stylesheet href=css/style-q2.css><script async src=https://umami.pimsnel.com/script.js data-website-id=8e970d59-b517-4ba6-9b92-207e7dbdb4b1></script><script async src=https://media.ethicalads.io/media/client/ethicalads.min.js></script></head><body><div id=eadiv data-ea-publisher=extranixcom data-ea-type=text></div><header><div id=lastUpdateElement style=position:absolute;line-height:11px;right:37px;top:59px></div><div class=logo><a class=baselink href=./><img src=images/home-manager-option-search2.png></a></div><nav class=shortcuts><li style=padding-top:10px><a href=https://nix-community.github.io/home-manager/><i class="fa fa-book"></i> <label>HM Documentation</label></a></li><li style=padding-top:10px><a href=https://github.com/mipmip/home-manager-option-search><i class="fa fa-github"></i> <label>Source</label></a></li><li style=margin-left:9px;padding-top:14px><iframe src="https://ghbtns.com/github-btn.html?user=mipmip&repo=home-manager-option-search&type=star&count=true&text=true" style=width:101px frameborder=0 scrolling=0 width=150 height=20 title=GitHub></iframe></li></nav></header><div class=xcontainer style=padding-top:70px><div class=modal id=myModal tabindex=-1 role=dialog aria-labelledby=myModalLabel><div class="modal-dialog modal-lg" role=document><div class=modal-content><div class=modal-header><button type=button class=close data-dismiss=modal aria-label=Close><span aria-hidden=true>×</span></button><h4 class=modal-title id=myModalLabel>Modal title</h4></div><div class=modal-body id=myModalBody>...</div><div class=modal-footer><button type=button class="btn btn-default" data-dismiss=modal>Close</button></div></div></div></div><div id=searchform xstyle="background-color: white;top:54px;position:sticky;"><form method=get action=? onsubmit=searchEnter()><div class=form-group><label for=searchInput>Option Search
|
||||
<span style=font-weight:400;font-size:smaller>(<span><span id=optionCountBadge style=font-weight:400;font-size:smaller xclass=badge></span><span style=font-weight:400;font-size:smaller>)<span>
|
||||
</label><input class=form-control type=search id=searchInput autofocus placeholder="Search.. e.g. vim"></div><div class=form-group><label for=release>Home Manager release
|
||||
</label><select id=releaseSelect><option value=master>unstable</option><option value=release-23.11>23.11</option><option value=release-23.05>23.05</option><option value=release-22.11>22.11</option></select></div></form><div class=collapse id=advanced><ul class=list-inline style=margin-top:5px;margin-bottom:5px><li>Search in</li><li><input type=checkbox checked id=indexOnTitleCheckbox> Title</li><li><input type=checkbox checked id=indexOnDescriptionCheckbox> Description</li><li>Strategy</li><li><select id=indexStrategySelect style=margin-bottom:0><option value=JsSearch.AllSubstringsIndexStrategy>All substrings</option><option value=JsSearch.ExactWordIndexStrategy>Exact match</option><option value=JsSearch.PrefixIndexStrategy selected>Prefix matching</option></select></li></div><table id=indexedOptionsTableHeader style=margin-bottom:0 class="table table-striped table-condensed hidden"><thead><tr><th>Title</th><th class=phonehide>Description</th><th class=phonehide>Type</th></tr></thead><tbody></tbody></table></div><table id=indexedOptionsTable class="table table-striped table-condensed hidden"><tbody></tbody></table><div id=loadingProgressBar class=progress><div class="progress-bar progress-bar-striped active" role=progressbar aria-valuenow=100 aria-valuemin=0 aria-valuemax=100 style=width:100%>Loading option data...</div></div></div><footer class=navbar-fixed-bottom><div><p>Powered by the <a href=https://nix-community.org/>Nix Community</a> |
|
||||
<a href=https://github.com/mipmip/home-manager-option-search#credits>Credits</a> |
|
||||
<a href=https://nix-community.github.io/home-manager/>Home Manager Documentation</a></p><p>Made with ❤️ by <a href=https://github.com/mipmip>Pim Snel</a></p></div></footer><script type=text/javascript src=https://unpkg.com/js-search@2.0.1/dist/umd/js-search.min.js></script><script type=text/javascript src="js/script.js?version=2024-03-23"></script></body></html>
|
||||
<a href=https://nix-community.github.io/home-manager/>Home Manager Documentation</a></p><p>Made with ❤️ by <a href=https://github.com/mipmip>Pim Snel</a> - © 2022-2024</p></div></footer><script type=text/javascript src=https://unpkg.com/js-search@2.0.1/dist/umd/js-search.min.js></script><script type=text/javascript src="js/script.js?version=2024-03-23"></script></body></html>
|
23
js/script.js
23
js/script.js
@ -21,7 +21,6 @@ var docOnload = function(){
|
||||
searchOptions(query);
|
||||
|
||||
$("#advcheck").prop("checked", false);
|
||||
// $("#advcheck").removeAttr("checked");
|
||||
}
|
||||
|
||||
indexOnDescriptionCheckbox.onchange = rebuildAndRerunSearch;
|
||||
@ -193,8 +192,8 @@ var searchOptions = function(query) {
|
||||
// No reason to index beyond result of lastIndex +aIndex + term.length,
|
||||
// as a would come first in that case.
|
||||
const bIndex = bConcat
|
||||
.slice(lastIndex, lastIndex + aIndex + term.length)
|
||||
.indexOf(term);
|
||||
.slice(lastIndex, lastIndex + aIndex + term.length)
|
||||
.indexOf(term);
|
||||
|
||||
// Not found in b, a must come first
|
||||
if (bIndex == -1) return -1;
|
||||
@ -237,20 +236,12 @@ searchInput.oninput = function() {
|
||||
|
||||
releaseSelect.onchange = function(){
|
||||
|
||||
const query = searchInput.value;
|
||||
const release = releaseSelect.selectedOptions[0].value;
|
||||
const query = searchInput.value;
|
||||
const release = releaseSelect.selectedOptions[0].value;
|
||||
|
||||
setSearchQueryToUrlParam(query, release);
|
||||
setSearchQueryToUrlParam(query, release);
|
||||
|
||||
//window.location.reload(false);
|
||||
|
||||
window.location.replace(newUrl);
|
||||
|
||||
//newSearch();
|
||||
|
||||
//var release = releaseSelect.selectedOptions[0].value;
|
||||
//xmlhttp.open('GET', 'data/hm-options-'+release+'.json', true);
|
||||
//xmlhttp.send();
|
||||
window.location.replace(newUrl);
|
||||
}
|
||||
|
||||
var updateOptionCount = function(numOptions) {
|
||||
@ -291,5 +282,5 @@ const urlParams = new URLSearchParams(window.location.search);
|
||||
const release = urlParams.get('release') ?? 'master';
|
||||
document.getElementById('releaseSelect').value = release;
|
||||
|
||||
xmlhttp.open('GET', 'data/hm-options-'+release+'.json', true);
|
||||
xmlhttp.open('GET', 'data/options-'+release+'.json', true);
|
||||
xmlhttp.send();
|
||||
|
Loading…
Reference in New Issue
Block a user